Skip to content

Documentation / @etherfold/js-processor / SingleEventJSONProcessor

Type Alias: SingleEventJSONProcessor<ABI, ProcessResultType, ProcessorConfig>

SingleEventJSONProcessor<ABI, ProcessResultType, ProcessorConfig> = EventFunctions<ABI, ProcessResultType> & object

Defined in: js-processor/src/processor/JSObjectEventProcessor.ts:24

Type Declaration

version

version: string

REQUIRED. The identity of this processor's logic, and the only thing that makes the core discard state computed by a previous version. It used to be optional with an unknown fallback, so a processor whose author never declared a version looked exactly like an unchanged one, forever.

configure()

configure(config): void

Parameters

config

ProcessorConfig

Returns

void

createInitialState()

createInitialState(): ProcessResultType

Returns

ProcessResultType

getCodeFingerprint()?

optional getCodeFingerprint(): string | undefined

The advisory fingerprint of the AUTHOR's handlers; see EventProcessor.getCodeFingerprint.

Returns

string | undefined

processEvent()

processEvent(json, event): void | Promise<void>

Parameters

json

ProcessResultType

event

LogEvent<ABI>

Returns

void | Promise<void>

Type Parameters

ABI

ABI extends Abi

ProcessResultType

ProcessResultType extends JSObject

ProcessorConfig

ProcessorConfig = undefined