Skip to content
On this page

Function: createIndexerState

createIndexerState<ABI, ProcessResultType, ProcessorConfig>(processor, options?): object

Type parameters

ParameterDefault
ABI extends readonly (AbiConstructor | AbiError | AbiEvent | AbiFallback | AbiFunction | AbiReceive)[]-
ProcessResultType-
ProcessorConfigundefined

Parameters

ParameterType
processorEventProcessorWithInitialState< ABI, ProcessResultType, ProcessorConfig >
options?object
options.keepState?KeepState< ABI, ProcessResultType, unknown, ProcessorConfig >
options.keepStream?ExistingStream< ABI >
options.trackNumRequests?boolean

Returns

indexMore

indexMore: () => Promise< LastSync< ABI > >

Returns

Promise< LastSync< ABI > >

indexMoreAndCatchupIfNeeded

indexMoreAndCatchupIfNeeded: () => Promise< LastSync< ABI > >

Returns

Promise< LastSync< ABI > >

indexToLatest

indexToLatest: () => Promise< LastSync< ABI > >

Returns

Promise< LastSync< ABI > >

init

init: InitFunction< ABI, ProcessorConfig >

startAutoIndexing

startAutoIndexing: (intervalInSeconds) => Promise< boolean >

Parameters

ParameterTypeDefault value
intervalInSecondsnumber4

Returns

Promise< boolean >

state

state: object

Type declaration

state.subscribe

subscribe: (this, run, invalidate?) => Unsubscriber = readableState.subscribe

Subscribe on value changes.

Parameters
ParameterTypeDescription
thisvoid-
runSubscriber< ProcessResultType >subscription callback
invalidate?Invalidator< ProcessResultType >cleanup callback
Returns

Unsubscriber

state.$state

get $state(): ProcessResultType

status

status: object

Type declaration

status.subscribe

subscribe: (this, run, invalidate?) => Unsubscriber = readableStatus.subscribe

Subscribe on value changes.

Parameters
ParameterTypeDescription
thisvoid-
runSubscriber< StatusState >subscription callback
invalidate?Invalidator< StatusState >cleanup callback
Returns

Unsubscriber

status.$state

get $state(): StatusState

stopAutoIndexing

stopAutoIndexing: () => boolean

Returns

boolean

syncing

syncing: object

Type declaration

syncing.subscribe

subscribe: (this, run, invalidate?) => Unsubscriber = readableSyncing.subscribe

Subscribe on value changes.

Parameters
ParameterTypeDescription
thisvoid-
runSubscriber< SyncingState< ABI > >subscription callback
invalidate?Invalidator< SyncingState< ABI > >cleanup callback
Returns

Unsubscriber

syncing.$state

get $state(): SyncingState< ABI >

updateIndexer

updateIndexer

updateProcessor

updateProcessor

withHooks

withHooks

Defined In

packages/ethereum-indexer-browser/src/IndexerState.ts:59


Generated using TypeDoc and typedoc-plugin-markdown