import { MoveCoder } from './index.js'; import { EntryFunctionPayloadResponse, Event, MoveResource, UserTransactionResponse } from '@aptos-labs/ts-sdk'; import { AptosBindOptions, AptosNetwork } from './network.js'; import { AptosContext, AptosResourcesContext, AptosTransactionContext } from './context.js'; import { ListStateStorage } from '@sentio/runtime'; import { HandleInterval, MoveAccountFetchConfig, MoveFetchConfig } from '@sentio/protos'; import { CallHandler, EventFilter, EventHandler, FunctionNameAndCallFilter, ResourceChangeHandler, ResourceIntervalHandler, TransactionIntervalHandler } from '../move/index.js'; import { Labels, PromiseOrVoid } from '../core/index.js'; import { TypeDescriptor } from '@typemove/move'; import { ResourceChange } from '@typemove/aptos'; import { GeneralTransactionResponse, HandlerOptions } from './models.js'; import { AptCall, AptEvent, AptResource } from './data.js'; export declare const DEFAULT_RESOURCE_FETCH_CONFIG: MoveAccountFetchConfig; type IndexConfigure = { address: string; network: AptosNetwork; startVersion: bigint; endVersion?: bigint; baseLabels?: Labels; }; export declare class AptosProcessorState extends ListStateStorage> { static INSTANCE: AptosProcessorState; } export declare class AptosTransactionProcessor> { readonly moduleName: string; config: IndexConfigure; eventHandlers: EventHandler[]; callHandlers: CallHandler[]; resourceChangeHandlers: ResourceChangeHandler[]; transactionIntervalHandlers: TransactionIntervalHandler[]; coder: MoveCoder; constructor(moduleName: string, options: AptosBindOptions); protected onMoveEvent(handler: (event: Event, ctx: AptosContext) => PromiseOrVoid, filter: EventFilter | EventFilter[], handlerOptions?: HandlerOptions): this; protected onEntryFunctionCall(handler: (call: EntryFunctionPayloadResponse, ctx: AptosContext) => PromiseOrVoid, filter: FunctionNameAndCallFilter | FunctionNameAndCallFilter[], handlerOptions?: HandlerOptions): this; onTransaction(handler: (transaction: UserTransactionResponse, ctx: AptosContext) => PromiseOrVoid, transactionFilter?: { includeFailed?: boolean; sender?: string; }, handleOptions?: HandlerOptions): this; onEvent(handler: (event: Event, ctx: AptosContext) => void, handlerOptions?: HandlerOptions): this; onResourceChange(handler: (changes: ResourceChange[], ctx: AptosResourcesContext) => PromiseOrVoid, typeDesc: TypeDescriptor | string, handlerOptions?: HandlerOptions[]>): this; protected onInterval(handler: (transaction: T, ctx: CT) => PromiseOrVoid, timeInterval: HandleInterval | undefined, versionInterval: HandleInterval | undefined, handlerOptions?: HandlerOptions): this; onTimeInterval(handler: (transaction: T, ctx: CT) => PromiseOrVoid, timeIntervalInMinutes?: number, backfillTimeIntervalInMinutes?: number, handlerOptions?: HandlerOptions): this; onVersionInterval(handler: (transaction: T, context: CT) => PromiseOrVoid, versionInterval?: number, backfillVersionInterval?: number, handlerOptions?: HandlerOptions): this; getChainId(): string; } export declare class AptosBaseProcessor extends AptosTransactionProcessor { } export declare class AptosModulesProcessor extends AptosTransactionProcessor> { private constructor(); static bind(options: AptosBindOptions): AptosModulesProcessor; onMoveEvent(handler: (event: Event, ctx: AptosContext) => PromiseOrVoid, filter: EventFilter | EventFilter[], handlerOptions?: HandlerOptions): this; } export declare class AptosGlobalProcessor { private baseProcessor; private constructor(); static bind(options: AptosBindOptions): AptosGlobalProcessor; onTransaction(handler: (transaction: UserTransactionResponse, ctx: AptosContext) => PromiseOrVoid, transactionFilter?: { includeFailed?: boolean; sender?: string; }, fetchConfig?: Partial): this; onTimeInterval(handler: (transaction: GeneralTransactionResponse, ctx: AptosTransactionContext) => PromiseOrVoid, timeIntervalInMinutes?: number, backfillTimeIntervalInMinutes?: number, handlerOptions?: HandlerOptions): this; onVersionInterval(handler: (transaction: GeneralTransactionResponse, ctx: AptosTransactionContext) => PromiseOrVoid, versionInterval?: number, backfillVersionInterval?: number, handlerOptions?: HandlerOptions): this; } export declare class AptosResourceProcessorState extends ListStateStorage { static INSTANCE: AptosResourceProcessorState; } export declare class AptosResourcesProcessor { config: IndexConfigure; resourceIntervalHandlers: ResourceIntervalHandler[]; static bind(options: AptosBindOptions): AptosResourcesProcessor; protected constructor(options: AptosBindOptions); getChainId(): string; onInterval(handler: (resources: MoveResource[], ctx: AptosResourcesContext) => PromiseOrVoid, timeInterval: HandleInterval | undefined, versionInterval: HandleInterval | undefined, type: string | undefined, handlerOptions?: HandlerOptions, handlerName?: string): this; onTimeInterval(handler: (resources: MoveResource[], ctx: AptosResourcesContext) => PromiseOrVoid, timeIntervalInMinutes?: number, backfillTimeIntervalInMinutes?: number, type?: string, handlerOptions?: HandlerOptions): this; onVersionInterval(handler: (resources: MoveResource[], ctx: AptosResourcesContext) => PromiseOrVoid, versionInterval?: number, backfillVersionInterval?: number, typePrefix?: string, handlerOptions?: HandlerOptions): this; onResourceChange(handler: (changes: ResourceChange[], ctx: AptosResourcesContext) => PromiseOrVoid, typeDesc: TypeDescriptor | string): this; } export {}; //# sourceMappingURL=aptos-processor.d.ts.map