AptosTransactionProcessor

Class in @sentio/sdk/aptos

Defined in @sentio/sdk/aptos

Extended by

Type Parameters

Type Parameter
T extends GeneralTransactionResponse
CT extends AptosTransactionContext<T>

Constructors

Constructor

new AptosTransactionProcessor<T extends GeneralTransactionResponse, CT extends AptosTransactionContext<T>>(moduleName: string, options: AptosBindOptions): AptosTransactionProcessor<T, CT>;

Parameters

ParameterType
moduleNamestring
optionsAptosBindOptions

Returns

AptosTransactionProcessor<T, CT>

Properties

PropertyModifierTypeDefault value
callHandlerspublicCallHandler<AptCall>[][]
coderpublicMoveCoderundefined
configpublicIndexConfigureundefined
eventHandlerspublicEventHandler<AptEvent>[][]
moduleNamereadonlystringundefined
resourceChangeHandlerspublicResourceChangeHandler<AptResource>[][]
transactionIntervalHandlerspublicTransactionIntervalHandler[][]

Methods

getChainId()

getChainId(): string;

Returns

string


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


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

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


onTimeInterval()

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

Parameters

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

Returns

this


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


onVersionInterval()

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

Parameters

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

Returns

this

On this page