Skip to content

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.

optional onEntityCreated: (event) => void

Defined in: src/actions/public/watchEntityEvents.ts:33

EntityCreatedEvent

void


optional onEntityDeleted: (event) => void

Defined in: src/actions/public/watchEntityEvents.ts:37

EntityDeletedEvent

void


optional onEntityPatched: (event) => void

Defined in: src/actions/public/watchEntityEvents.ts:34

EntityPatchedEvent

void


optional onError: (error) => void

Defined in: src/actions/public/watchEntityEvents.ts:53

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.

Error

void


optional onEvent: (event) => void

Defined in: src/actions/public/watchEntityEvents.ts:46

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 what the engine did once the watcher is running — see watchEntityEvents for when that is.

EntityEvent

void


optional onExpiryExtended: (event) => void

Defined in: src/actions/public/watchEntityEvents.ts:35

ExpiryExtendedEvent

void


optional onOwnershipTransferred: (event) => void

Defined in: src/actions/public/watchEntityEvents.ts:36

OwnershipTransferredEvent

void


optional pollingInterval: number

Defined in: src/actions/public/watchEntityEvents.ts:55

How often to poll, in milliseconds. Defaults to half a block.