AptosResourcesProcessor
Class in @sentio/sdk/aptos
Defined in @sentio/sdk/aptos
Properties
| Property | Type | Default value |
|---|---|---|
config | IndexConfigure | undefined |
resourceIntervalHandlers | ResourceIntervalHandler[] | [] |
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
| Parameter | Type |
|---|---|
handler | (resources: MoveResource[], ctx: AptosResourcesContext) => PromiseOrVoid |
timeInterval | | HandleInterval | undefined |
versionInterval | | HandleInterval | undefined |
type | string | 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
| Parameter | Type |
|---|---|
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
| Parameter | Type |
|---|---|
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
| Parameter | Type | Default value |
|---|---|---|
handler | (resources: MoveResource[], ctx: AptosResourcesContext) => PromiseOrVoid | undefined |
timeIntervalInMinutes | number | 60 |
backfillTimeIntervalInMinutes | number | 240 |
type? | string | undefined |
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
| Parameter | Type | Default value |
|---|---|---|
handler | (resources: MoveResource[], ctx: AptosResourcesContext) => PromiseOrVoid | undefined |
versionInterval | number | 100000 |
backfillVersionInterval | number | 400000 |
typePrefix? | string | undefined |
handlerOptions? | HandlerOptions<MoveAccountFetchConfig, MoveResource[]> | undefined |
Returns
this
bind()
static bind(options: AptosBindOptions): AptosResourcesProcessor;Parameters
| Parameter | Type |
|---|---|
options | AptosBindOptions |
Returns
AptosResourcesProcessor