Documentation / @etherfold/js-processor / JSProcessor
Type Alias: JSProcessor<ABI, ProcessResultType, ProcessorConfig>
JSProcessor<
ABI,ProcessResultType,ProcessorConfig> =EventFunctions<ABI,ProcessResultType,ProcessorConfig> &object
Defined in: js-processor/src/processor/utils.ts:16
Type Declaration
version
version:
string
REQUIRED. The identity of this processor's logic.
The indexer discards state computed by a previous version by comparing this, so a processor with no version can never invalidate anything: every edit to a handler would keep serving state computed by the code you replaced. Ideally generate it (from a content hash, a build id, a git sha) so it cannot be forgotten; if you edit it by hand, bump it whenever a handler changes, and watch for the drift report when you forget.
construct()
construct():
ProcessResultType
Returns
ProcessResultType
handleUnparsedEvent()?
optionalhandleUnparsedEvent(json,event):void|Promise<void>
Parameters
json
ProcessResultType
event
Returns
void | Promise<void>
Type Parameters
ABI
ABI extends Abi
ProcessResultType
ProcessResultType extends JSObject
ProcessorConfig
ProcessorConfig = undefined