import { type Data_SuiCall, type Data_SuiObject, type Data_SuiObjectChange, type HandleInterval, type MoveAccountFetchConfig, type MoveFetchConfig, MoveOwnerType, type ProcessResult } from '@sentio/protos'; import { ListStateStorage } from '@sentio/runtime'; import { SuiNetwork } from './network.js'; import { SuiAddressContext, SuiContext, SuiObjectChangeContext, SuiObjectContext } from './context.js'; import type { GrpcTypes } from '@mysten/sui/grpc'; import type { SuiClientTypes } from '@mysten/sui/client'; import type { SuiMoveObjectInput } from '@typemove/sui'; import { PromiseOrVoid } from '../core/index.js'; import { IndexConfigure, SuiBindOptions } from './sui-processor.js'; import { CallHandler, TransactionFilter, ObjectChangeHandler } from '../move/index.js'; import { TypeDescriptor } from '@typemove/move'; import { TypedSuiMoveObject } from './models.js'; export interface SuiObjectBindOptions { objectId: string; network?: SuiNetwork; startCheckpoint?: bigint; endCheckpoint?: bigint; baseLabels?: { [key: string]: string; }; } export interface SuiObjectTypeBindOptions { objectType: TypeDescriptor; network?: SuiNetwork; startCheckpoint?: bigint; endCheckpoint?: bigint; baseLabels?: { [key: string]: string; }; } interface ObjectHandler { type?: string; checkPointInterval?: HandleInterval; timeIntervalInMinutes?: HandleInterval; fetchConfig: MoveAccountFetchConfig; handler: (resource: Data_SuiObject) => Promise; handlerName: string; } export declare const DEFAULT_ACCOUNT_FETCH_CONFIG: MoveAccountFetchConfig; export declare class SuiAccountProcessorState extends ListStateStorage> { static INSTANCE: SuiAccountProcessorState; } export interface SuiInternalObjectsBindOptions extends SuiBindOptions { ownerType: MoveOwnerType; } export declare abstract class SuiBaseObjectOrAddressProcessor { config: IndexConfigure; ownerType: MoveOwnerType; templateId: number | undefined; objectHandlers: ObjectHandler[]; objectChangeHandlers: ObjectChangeHandler[]; protected constructor(options: SuiInternalObjectsBindOptions); getChainId(): string; protected abstract doHandle(handler: HandlerType, data: Data_SuiObject, ctx: SuiObjectContext): Promise; onInterval(handler: HandlerType, //(resources: SuiMoveObjectInput[], ctx: SuiObjectsContext) => PromiseOrVoid, timeInterval: HandleInterval | undefined, checkpointInterval: HandleInterval | undefined, type: string | undefined, fetchConfig: Partial | undefined, handlerName?: string): this; } declare abstract class SuiBaseObjectOrAddressProcessorInternal extends SuiBaseObjectOrAddressProcessor { onTimeInterval(handler: HandlerType, timeIntervalInMinutes?: number, backfillTimeIntervalInMinutes?: number, type?: string, fetchConfig?: Partial): this; onCheckpointInterval(handler: HandlerType, checkpointInterval?: number, backfillCheckpointInterval?: number, type?: string, fetchConfig?: Partial): this; } export declare class SuiAddressProcessor extends SuiBaseObjectOrAddressProcessorInternal<(objects: SuiMoveObjectInput[], ctx: SuiAddressContext) => PromiseOrVoid> { callHandlers: CallHandler[]; static bind(options: SuiBindOptions): SuiAddressProcessor; protected doHandle(handler: (objects: SuiMoveObjectInput[], ctx: SuiObjectContext) => PromiseOrVoid, data: Data_SuiObject, ctx: SuiObjectContext): Promise; onTransactionBlock(handler: (transaction: GrpcTypes.ExecutedTransaction, ctx: SuiContext) => PromiseOrVoid, filter?: TransactionFilter, fetchConfig?: Partial): this; } export declare class SuiObjectProcessor extends SuiBaseObjectOrAddressProcessorInternal<(self: SuiMoveObjectInput, dynamicFieldObjects: SuiMoveObjectInput[], ctx: SuiObjectContext) => PromiseOrVoid> { static bind(options: SuiObjectBindOptions): SuiObjectProcessor; protected doHandle(handler: (self: SuiMoveObjectInput, dynamicFieldObjects: SuiMoveObjectInput[], ctx: SuiObjectContext) => PromiseOrVoid, data: Data_SuiObject, ctx: SuiObjectContext): Promise; } export declare class SuiObjectTypeProcessor extends SuiBaseObjectOrAddressProcessor<(self: TypedSuiMoveObject, dynamicFieldObjects: SuiMoveObjectInput[], ctx: SuiObjectContext) => PromiseOrVoid> { objectType: TypeDescriptor; static bind(options: SuiObjectTypeBindOptions): SuiObjectTypeProcessor; protected doHandle(handler: (self: TypedSuiMoveObject, dynamicFieldObjects: SuiMoveObjectInput[], ctx: SuiObjectContext) => PromiseOrVoid, data: Data_SuiObject, ctx: SuiObjectContext): Promise; onObjectChange(handler: (changes: SuiClientTypes.ChangedObject[], ctx: SuiObjectChangeContext) => PromiseOrVoid): this; onTimeInterval(handler: (self: TypedSuiMoveObject, dynamicFieldObjects: SuiMoveObjectInput[], ctx: SuiObjectContext) => PromiseOrVoid, timeIntervalInMinutes?: number, backfillTimeIntervalInMinutes?: number, fetchConfig?: Partial): this; onCheckpointInterval(handler: (self: TypedSuiMoveObject, dynamicFieldObjects: SuiMoveObjectInput[], ctx: SuiObjectContext) => PromiseOrVoid, checkpointInterval?: number, backfillCheckpointInterval?: number, fetchConfig?: Partial): this; } export declare class SuiWrappedObjectProcessor extends SuiBaseObjectOrAddressProcessorInternal<(dynamicFieldObjects: SuiMoveObjectInput[], ctx: SuiObjectContext) => PromiseOrVoid> { static bind(options: SuiObjectBindOptions): SuiWrappedObjectProcessor; protected doHandle(handler: (dynamicFieldObjects: SuiMoveObjectInput[], ctx: SuiObjectContext) => PromiseOrVoid, data: Data_SuiObject, ctx: SuiObjectContext): Promise; } export {}; //# sourceMappingURL=sui-object-processor.d.ts.map