WatchEntityEventsParameters
WatchEntityEventsParameters =
object
Defined in: src/actions/public/watchEntityEvents.ts:32
Handlers and options for client.watchEntityEvents. Every handler is optional; the watcher does
the work for the ones you pass.
Properties
Section titled “Properties”fromBlock?
Section titled “fromBlock?”
optionalfromBlock:bigint
Defined in: src/actions/public/watchEntityEvents.ts:54
Replay from this block before following the head. Defaults to the head.
onEntityCreated()?
Section titled “onEntityCreated()?”
optionalonEntityCreated: (event) =>void
Defined in: src/actions/public/watchEntityEvents.ts:33
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
onEntityDeleted()?
Section titled “onEntityDeleted()?”
optionalonEntityDeleted: (event) =>void
Defined in: src/actions/public/watchEntityEvents.ts:37
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
onEntityPatched()?
Section titled “onEntityPatched()?”
optionalonEntityPatched: (event) =>void
Defined in: src/actions/public/watchEntityEvents.ts:34
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
onError()?
Section titled “onError()?”
optionalonError: (error) =>void
Defined in: src/actions/public/watchEntityEvents.ts:52
Transport failures, logs that will not decode, and anything one of your own handlers throws.
Defaults to console.error. A watcher whose filter the node dropped otherwise just goes quiet,
and a quiet watcher is indistinguishable from a quiet chain.
Parameters
Section titled “Parameters”Error
Returns
Section titled “Returns”void
onEvent()?
Section titled “onEvent()?”
optionalonEvent: (event) =>void
Defined in: src/actions/public/watchEntityEvents.ts:45
Every event, in application order, whatever its type. Runs before the per-event handler for the same event.
This is the replay seam: operations apply in batch order and emit one event each, so an off-chain replica that consumes this in order sees exactly what the engine did.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
onExpiryExtended()?
Section titled “onExpiryExtended()?”
optionalonExpiryExtended: (event) =>void
Defined in: src/actions/public/watchEntityEvents.ts:35
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
onOwnershipTransferred()?
Section titled “onOwnershipTransferred()?”
optionalonOwnershipTransferred: (event) =>void
Defined in: src/actions/public/watchEntityEvents.ts:36
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
pollingInterval?
Section titled “pollingInterval?”
optionalpollingInterval:number
Defined in: src/actions/public/watchEntityEvents.ts:56
How often to poll, in milliseconds. Defaults to half a block.