AptosResourcesProcessor

Class in @sentio/sdk/aptos

Defined in @sentio/sdk/aptos

Properties

PropertyTypeDefault value
configIndexConfigureundefined
resourceIntervalHandlersResourceIntervalHandler[][]

Methods

getChainId()

getChainId(): string;

Returns

string


onInterval()

onInterval(
   handler: (resources: MoveResource[], ctx: AptosResourcesContext) => PromiseOrVoid, 
   timeInterval: 
  | HandleInterval
  | undefined, 
   versionInterval: 
  | HandleInterval
  | undefined, 
   type: string | undefined, 
   handlerOptions?: HandlerOptions<MoveAccountFetchConfig, MoveResource[]>, 
   handlerName?: string
): this;

Parameters

ParameterType
handler(resources: MoveResource[], ctx: AptosResourcesContext) => PromiseOrVoid
timeInterval| HandleInterval | undefined
versionInterval| HandleInterval | undefined
typestring | undefined
handlerOptions?HandlerOptions<MoveAccountFetchConfig, MoveResource[]>
handlerName?string

Returns

this


onResourceChange()

Call Signature

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

this

Call Signature

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

this


onTimeInterval()

onTimeInterval(
   handler: (resources: MoveResource[], ctx: AptosResourcesContext) => PromiseOrVoid, 
   timeIntervalInMinutes?: number, 
   backfillTimeIntervalInMinutes?: number, 
   type?: string, 
   handlerOptions?: HandlerOptions<MoveAccountFetchConfig, MoveResource[]>
): this;

Parameters

ParameterTypeDefault value
handler(resources: MoveResource[], ctx: AptosResourcesContext) => PromiseOrVoidundefined
timeIntervalInMinutesnumber60
backfillTimeIntervalInMinutesnumber240
type?stringundefined
handlerOptions?HandlerOptions<MoveAccountFetchConfig, MoveResource[]>undefined

Returns

this


onVersionInterval()

onVersionInterval(
   handler: (resources: MoveResource[], ctx: AptosResourcesContext) => PromiseOrVoid, 
   versionInterval?: number, 
   backfillVersionInterval?: number, 
   typePrefix?: string, 
   handlerOptions?: HandlerOptions<MoveAccountFetchConfig, MoveResource[]>
): this;

Parameters

ParameterTypeDefault value
handler(resources: MoveResource[], ctx: AptosResourcesContext) => PromiseOrVoidundefined
versionIntervalnumber100000
backfillVersionIntervalnumber400000
typePrefix?stringundefined
handlerOptions?HandlerOptions<MoveAccountFetchConfig, MoveResource[]>undefined

Returns

this


bind()

static bind(options: AptosBindOptions): AptosResourcesProcessor;

Parameters

ParameterType
optionsAptosBindOptions

Returns

AptosResourcesProcessor

On this page