AptosModulesProcessor

Class in @sentio/sdk/aptos

Defined in @sentio/sdk/aptos

Extends

Properties

PropertyModifierTypeDefault valueInherited from
callHandlerspublicCallHandler<AptCall>[][]AptosTransactionProcessor.callHandlers
coderpublicMoveCoderundefinedAptosTransactionProcessor.coder
configpublicIndexConfigureundefinedAptosTransactionProcessor.config
eventHandlerspublicEventHandler<AptEvent>[][]AptosTransactionProcessor.eventHandlers
moduleNamereadonlystringundefinedAptosTransactionProcessor.moduleName
resourceChangeHandlerspublicResourceChangeHandler<AptResource>[][]AptosTransactionProcessor.resourceChangeHandlers
transactionIntervalHandlerspublicTransactionIntervalHandler[][]AptosTransactionProcessor.transactionIntervalHandlers

Methods

getChainId()

getChainId(): string;

Returns

string

Inherited from

AptosTransactionProcessor.getChainId


onEvent()

onEvent(handler: (event: Event, ctx: AptosContext) => void, handlerOptions?: HandlerOptions<MoveFetchConfig, Event>): this;

Parameters

ParameterType
handler(event: Event, ctx: AptosContext) => void
handlerOptions?HandlerOptions<MoveFetchConfig, Event>

Returns

this

Inherited from

AptosTransactionProcessor.onEvent


onMoveEvent()

onMoveEvent<T extends Event = Event>(
   handler: (event: T, ctx: AptosContext) => PromiseOrVoid, 
   filter: 
  | EventFilter
  | EventFilter[], 
   handlerOptions?: HandlerOptions<MoveFetchConfig, T>
): AptosModulesProcessor;

Type Parameters

Type ParameterDefault type
T extends EventEvent

Parameters

ParameterType
handler(event: T, ctx: AptosContext) => PromiseOrVoid
filter| EventFilter | EventFilter[]
handlerOptions?HandlerOptions<MoveFetchConfig, T>

Returns

AptosModulesProcessor

Overrides

AptosTransactionProcessor.onMoveEvent

onResourceChange()

Call Signature

onResourceChange<T>(
   handler: (changes: ResourceChange<T>[], ctx: AptosResourcesContext) => PromiseOrVoid, 
   typeDesc: 
  | string
  | TypeDescriptor<T>, 
   handlerOptions?: HandlerOptions<object, ResourceChange<T>[]>
): this;
Type Parameters
Type Parameter
T
Parameters
ParameterType
handler(changes: ResourceChange<T>[], ctx: AptosResourcesContext) => PromiseOrVoid
typeDesc| string | TypeDescriptor<T>
handlerOptions?HandlerOptions<object, ResourceChange<T>[]>
Returns

this

Inherited from

AptosTransactionProcessor.onResourceChange

Call Signature

onResourceChange<Descs extends readonly (
  | string
  | TypeDescriptor<any>)[]>(
   handler: (changes: ResourceChange<ExtractDescriptorType<Descs[number]>>[], ctx: AptosResourcesContext) => PromiseOrVoid, 
   typeDesc: [...Descs[]], 
   handlerOptions?: HandlerOptions<object, ResourceChange<ExtractDescriptorType<Descs[number]>>[]>
): this;
Type Parameters
Type Parameter
Descs extends readonly ( | string | TypeDescriptor<any>)[]
Parameters
ParameterType
handler(changes: ResourceChange<ExtractDescriptorType<Descs[number]>>[], ctx: AptosResourcesContext) => PromiseOrVoid
typeDesc[...Descs[]]
handlerOptions?HandlerOptions<object, ResourceChange<ExtractDescriptorType<Descs[number]>>[]>
Returns

this

Inherited from

AptosTransactionProcessor.onResourceChange


onTimeInterval()

onTimeInterval(
   handler: (transaction: GeneralTransactionResponse, ctx: AptosTransactionContext) => PromiseOrVoid, 
   timeIntervalInMinutes?: number, 
   backfillTimeIntervalInMinutes?: number, 
   handlerOptions?: HandlerOptions<MoveFetchConfig, GeneralTransactionResponse>
): this;

Parameters

ParameterTypeDefault value
handler(transaction: GeneralTransactionResponse, ctx: AptosTransactionContext) => PromiseOrVoidundefined
timeIntervalInMinutesnumber60
backfillTimeIntervalInMinutesnumber240
handlerOptions?HandlerOptions<MoveFetchConfig, GeneralTransactionResponse>undefined

Returns

this

Inherited from

AptosTransactionProcessor.onTimeInterval


onTransaction()

onTransaction(
   handler: (transaction: UserTransactionResponse, ctx: AptosContext) => PromiseOrVoid, 
   transactionFilter?: object, 
   handleOptions?: HandlerOptions<MoveFetchConfig, UserTransactionResponse>
): this;

Parameters

ParameterType
handler(transaction: UserTransactionResponse, ctx: AptosContext) => PromiseOrVoid
transactionFilter?{ includeFailed?: boolean; sender?: string; }
transactionFilter.includeFailed?boolean
transactionFilter.sender?string
handleOptions?HandlerOptions<MoveFetchConfig, UserTransactionResponse>

Returns

this

Inherited from

AptosTransactionProcessor.onTransaction


onVersionInterval()

onVersionInterval(
   handler: (transaction: GeneralTransactionResponse, context: AptosTransactionContext) => PromiseOrVoid, 
   versionInterval?: number, 
   backfillVersionInterval?: number, 
   handlerOptions?: HandlerOptions<MoveFetchConfig, GeneralTransactionResponse>
): this;

Parameters

ParameterTypeDefault value
handler(transaction: GeneralTransactionResponse, context: AptosTransactionContext) => PromiseOrVoidundefined
versionIntervalnumber100000
backfillVersionIntervalnumber400000
handlerOptions?HandlerOptions<MoveFetchConfig, GeneralTransactionResponse>undefined

Returns

this

Inherited from

AptosTransactionProcessor.onVersionInterval


bind()

static bind(options: AptosBindOptions): AptosModulesProcessor;

For a given function, creates a bound function that has the same body as the original function. The this object of the bound function is associated with the specified object, and has the specified initial parameters.

Parameters

ParameterType
optionsAptosBindOptions

Returns

AptosModulesProcessor

On this page