Function: createIndexerState
createIndexerState<
ABI
,ProcessResultType
,ProcessorConfig
>(processor
,options
?):object
Type parameters
Parameter | Default |
---|---|
ABI extends readonly (AbiConstructor | AbiError | AbiEvent | AbiFallback | AbiFunction | AbiReceive )[] | - |
ProcessResultType | - |
ProcessorConfig | undefined |
Parameters
Parameter | Type |
---|---|
processor | EventProcessorWithInitialState < 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
Parameter | Type | Default value |
---|---|---|
intervalInSeconds | number | 4 |
Returns
Promise
< boolean
>
state
state:
object
Type declaration
state.subscribe
subscribe: (
this
,run
,invalidate
?) =>Unsubscriber
=readableState.subscribe
Subscribe on value changes.
Parameters
Parameter Type Description this
void
- run
Subscriber
<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
Parameter Type Description this
void
- run
Subscriber
<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
Parameter Type Description this
void
- run
Subscriber
<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