@sentio/sdk 2.12.3 → 2.13.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,7 +28,7 @@ export declare class AptosBaseProcessor {
28
28
  constructor(moduleName: string, options: AptosBindOptions);
29
29
  onTransaction(handler: (transaction: Transaction_UserTransaction, ctx: AptosContext) => void, includedFailed?: boolean, fetchConfig?: MoveFetchConfig): this;
30
30
  onMoveEvent(handler: (event: EventInstance, ctx: AptosContext) => void, filter: EventFilter | EventFilter[], fetchConfig?: MoveFetchConfig): this;
31
- onEntryFunctionCall(handler: (call: TransactionPayload_EntryFunctionPayload, ctx: AptosContext) => void, filter: FunctionNameAndCallFilter | FunctionNameAndCallFilter[], fetchConfig?: MoveFetchConfig): this;
31
+ onEntryFunctionCall(handler: (call: TransactionPayload_EntryFunctionPayload, ctx: AptosContext) => void, filter: FunctionNameAndCallFilter | FunctionNameAndCallFilter[], fetchConfig?: Partial<MoveFetchConfig>): this;
32
32
  getChainId(): string;
33
33
  loadTypes(registry: MoveCoder): void;
34
34
  protected loadTypesInternal(registry: MoveCoder): void;
@@ -1,9 +1,10 @@
1
1
  import { MOVE_CODER } from './move-coder.js';
2
2
  import { AptosNetwork, getChainId } from './network.js';
3
3
  import { AptosContext, AptosResourcesContext } from './context.js';
4
- import { ListStateStorage } from '@sentio/runtime';
4
+ import { ListStateStorage, mergeProcessResults } from '@sentio/runtime';
5
5
  import { MoveFetchConfig, } from '@sentio/protos';
6
6
  import { ServerError, Status } from 'nice-grpc';
7
+ import { parseMoveType } from '../move/index.js';
7
8
  class ResourceHandlder {
8
9
  type;
9
10
  versionInterval;
@@ -39,7 +40,7 @@ export class AptosBaseProcessor {
39
40
  throw new ServerError(Status.INVALID_ARGUMENT, 'call is null');
40
41
  }
41
42
  const call = data.transaction;
42
- const ctx = new AptosContext(processor.moduleName, processor.config.network, processor.config.address, BigInt(data.transaction.version), call);
43
+ const ctx = new AptosContext(processor.moduleName, processor.config.network, processor.config.address, BigInt(data.transaction.version), call, 0);
43
44
  await handler(call, ctx);
44
45
  return ctx.getProcessResult();
45
46
  },
@@ -57,9 +58,10 @@ export class AptosBaseProcessor {
57
58
  else {
58
59
  _filters.push(filter);
59
60
  }
60
- // const address = this.config.address
61
+ const address = this.config.address;
61
62
  // const moduleName = this.moduleName
62
63
  const processor = this;
64
+ const allEventType = new Set(_filters.map((f) => address + '::' + f.type));
63
65
  this.eventHandlers.push({
64
66
  handler: async function (data) {
65
67
  if (!data.transaction) {
@@ -69,15 +71,21 @@ export class AptosBaseProcessor {
69
71
  if (!txn.events.length) {
70
72
  throw new ServerError(Status.INVALID_ARGUMENT, 'no event in the transactions');
71
73
  }
72
- const ctx = new AptosContext(processor.moduleName, processor.config.network, processor.config.address, BigInt(txn.version), txn);
73
74
  const events = txn.events;
74
75
  txn.events = [];
75
- for (const evt of events) {
76
+ const processResults = [];
77
+ for (const [idx, evt] of events.entries()) {
78
+ const typeQname = parseMoveType(evt.type).qname;
79
+ if (!allEventType.has(typeQname)) {
80
+ continue;
81
+ }
82
+ const ctx = new AptosContext(processor.moduleName, processor.config.network, processor.config.address, BigInt(txn.version), txn, idx);
76
83
  const eventInstance = evt;
77
84
  const decoded = MOVE_CODER.decodeEvent(eventInstance);
78
85
  await handler(decoded || eventInstance, ctx);
86
+ processResults.push(ctx.getProcessResult());
79
87
  }
80
- return ctx.getProcessResult();
88
+ return mergeProcessResults(processResults);
81
89
  },
82
90
  filters: _filters,
83
91
  fetchConfig: _fetchConfig,
@@ -86,7 +94,7 @@ export class AptosBaseProcessor {
86
94
  }
87
95
  onEntryFunctionCall(handler, filter, fetchConfig) {
88
96
  let _filters = [];
89
- const _fetchConfig = fetchConfig || MoveFetchConfig.fromPartial({});
97
+ const _fetchConfig = MoveFetchConfig.fromPartial(fetchConfig || {});
90
98
  if (Array.isArray(filter)) {
91
99
  _filters = filter;
92
100
  }
@@ -102,7 +110,7 @@ export class AptosBaseProcessor {
102
110
  throw new ServerError(Status.INVALID_ARGUMENT, 'call is null');
103
111
  }
104
112
  const tx = data.transaction;
105
- const ctx = new AptosContext(processor.moduleName, processor.config.network, processor.config.address, BigInt(tx.version), tx);
113
+ const ctx = new AptosContext(processor.moduleName, processor.config.network, processor.config.address, BigInt(tx.version), tx, 0);
106
114
  if (tx) {
107
115
  const payload = tx.payload;
108
116
  const decoded = MOVE_CODER.decodeFunctionPayload(payload);
@@ -1 +1 @@
1
- {"version":3,"file":"aptos-processor.js","sourceRoot":"","sources":["../../src/aptos/aptos-processor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAa,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAoB,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzE,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAElE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EACL,eAAe,GAMhB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAU/C,MAAM,gBAAgB;IACpB,IAAI,CAAS;IACb,eAAe,CAAiB;IAChC,qBAAqB,CAAiB;IACtC,OAAO,CAAwD;CAChE;AAED,MAAa,mBAAoB,SAAQ,gBAAoC;IAC3E,MAAM,CAAC,QAAQ,GAAG,IAAI,mBAAmB,EAAE,CAAA;;SADhC,mBAAmB;AAIhC,MAAM,OAAO,kBAAkB;IACpB,UAAU,CAAQ;IAC3B,MAAM,CAAgB;IACtB,aAAa,GAAkC,EAAE,CAAA;IACjD,YAAY,GAAgC,EAAE,CAAA;IAE9C,YAAY,UAAkB,EAAE,OAAyB;QACvD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,OAAO,CAAC,CAAA;QAChC,mBAAmB,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAA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AAE;YAC5C,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;SAC5C;aAAM;YACL,YAAY,GAAG,OAAO,CAAC,YAAY,CAAA;SACpC;KACF;IAED,OAAO;QACL,YAAY,EAAE,YAAY;QAC1B,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,YAAY,CAAC,QAAQ;KAClD,CAAA;AACH,CAAC","sourcesContent":["import { MoveResource, Transaction_UserTransaction, TransactionPayload_EntryFunctionPayload } from './move-types.js'\n\nimport { MOVE_CODER, MoveCoder } from './move-coder.js'\nimport { AptosBindOptions, AptosNetwork, getChainId } from './network.js'\nimport { AptosContext, AptosResourcesContext } from './context.js'\nimport { EventInstance } from './models.js'\nimport { ListStateStorage } from '@sentio/runtime'\nimport {\n MoveFetchConfig,\n Data_AptResource,\n HandleInterval,\n ProcessResult,\n Data_AptEvent,\n Data_AptCall,\n} from '@sentio/protos'\nimport { ServerError, Status } from 'nice-grpc'\nimport { CallHandler, EventFilter, EventHandler, FunctionNameAndCallFilter } from '../move/index.js'\n\ntype IndexConfigure = {\n address: string\n network: AptosNetwork\n startVersion: bigint\n // endSeqNumber?: Long\n}\n\nclass ResourceHandlder {\n type?: string\n versionInterval?: HandleInterval\n timeIntervalInMinutes?: HandleInterval\n handler: (resource: Data_AptResource) => Promise<ProcessResult>\n}\n\nexport class AptosProcessorState extends ListStateStorage<AptosBaseProcessor> {\n static INSTANCE = new AptosProcessorState()\n}\n\nexport class AptosBaseProcessor {\n readonly moduleName: string\n config: IndexConfigure\n eventHandlers: EventHandler<Data_AptEvent>[] = []\n callHandlers: CallHandler<Data_AptCall>[] = []\n\n constructor(moduleName: string, options: AptosBindOptions) {\n this.moduleName = moduleName\n this.config = configure(options)\n AptosProcessorState.INSTANCE.addValue(this)\n this.loadTypes(MOVE_CODER)\n }\n\n // getABI(): MoveModule | undefined {\n // return undefined\n // }\n\n public onTransaction(\n handler: (transaction: Transaction_UserTransaction, ctx: AptosContext) => void,\n includedFailed = false,\n fetchConfig?: MoveFetchConfig\n ): this {\n const _fetchConfig = fetchConfig || MoveFetchConfig.fromPartial({})\n\n // const address = this.config.address\n // const moduleName = this.moduleName\n const processor = this\n this.callHandlers.push({\n handler: async function (data) {\n if (!data.transaction) {\n throw new ServerError(Status.INVALID_ARGUMENT, 'call is null')\n }\n const call = data.transaction as Transaction_UserTransaction\n const ctx = new AptosContext(\n processor.moduleName,\n processor.config.network,\n processor.config.address,\n BigInt(data.transaction.version),\n call\n )\n await handler(call, ctx)\n return ctx.getProcessResult()\n },\n filters: [{ function: '', includeFailed: includedFailed }],\n fetchConfig: _fetchConfig,\n })\n return this\n }\n\n public onMoveEvent(\n handler: (event: EventInstance, ctx: AptosContext) => void,\n filter: EventFilter | EventFilter[],\n fetchConfig?: MoveFetchConfig\n ): this {\n let _filters: EventFilter[] = []\n const _fetchConfig = fetchConfig || MoveFetchConfig.fromPartial({})\n\n if (Array.isArray(filter)) {\n _filters = filter\n } else {\n _filters.push(filter)\n }\n\n // const address = this.config.address\n // const moduleName = this.moduleName\n\n const processor = this\n\n this.eventHandlers.push({\n handler: async function (data) {\n if (!data.transaction) {\n throw new ServerError(Status.INVALID_ARGUMENT, 'event is null')\n }\n const txn = data.transaction as Transaction_UserTransaction\n if (!txn.events.length) {\n throw new ServerError(Status.INVALID_ARGUMENT, 'no event in the transactions')\n }\n\n const ctx = new AptosContext(\n processor.moduleName,\n processor.config.network,\n processor.config.address,\n BigInt(txn.version),\n txn\n )\n\n const events = txn.events\n txn.events = []\n for (const evt of events) {\n const eventInstance = evt as EventInstance\n const decoded = MOVE_CODER.decodeEvent<any>(eventInstance)\n await handler(decoded || eventInstance, ctx)\n }\n\n return ctx.getProcessResult()\n },\n filters: _filters,\n fetchConfig: _fetchConfig,\n })\n return this\n }\n\n public onEntryFunctionCall(\n handler: (call: TransactionPayload_EntryFunctionPayload, ctx: AptosContext) => void,\n filter: FunctionNameAndCallFilter | FunctionNameAndCallFilter[],\n fetchConfig?: MoveFetchConfig\n ): this {\n let _filters: FunctionNameAndCallFilter[] = []\n const _fetchConfig = fetchConfig || MoveFetchConfig.fromPartial({})\n\n if (Array.isArray(filter)) {\n _filters = filter\n } else {\n _filters.push(filter)\n }\n\n // const address = this.config.address\n // const moduleName = this.moduleName\n const processor = this\n\n this.callHandlers.push({\n handler: async function (data) {\n if (!data.transaction) {\n throw new ServerError(Status.INVALID_ARGUMENT, 'call is null')\n }\n const tx = data.transaction as Transaction_UserTransaction\n\n const ctx = new AptosContext(\n processor.moduleName,\n processor.config.network,\n processor.config.address,\n BigInt(tx.version),\n tx\n )\n if (tx) {\n const payload = tx.payload as TransactionPayload_EntryFunctionPayload\n const decoded = MOVE_CODER.decodeFunctionPayload(payload)\n await handler(decoded, ctx)\n }\n return ctx.getProcessResult()\n },\n filters: _filters,\n fetchConfig: _fetchConfig,\n })\n return this\n }\n\n getChainId(): string {\n return getChainId(this.config.network)\n }\n\n loadTypes(registry: MoveCoder) {\n if (registry.contains(this.config.address, this.moduleName)) {\n return\n }\n this.loadTypesInternal(registry)\n }\n\n protected loadTypesInternal(registry: MoveCoder) {\n // should be override by subclass\n console.log('')\n }\n}\n\nexport class AptosAccountProcessorState extends ListStateStorage<AptosResourcesProcessor> {\n static INSTANCE = new AptosAccountProcessorState()\n}\n\nexport class AptosResourcesProcessor {\n config: IndexConfigure\n\n resourcesHandlers: ResourceHandlder[] = []\n\n static bind(options: AptosBindOptions): AptosResourcesProcessor {\n return new AptosResourcesProcessor(options)\n }\n\n protected constructor(options: AptosBindOptions) {\n this.config = configure(options)\n AptosAccountProcessorState.INSTANCE.addValue(this)\n }\n\n getChainId(): string {\n return getChainId(this.config.network)\n }\n\n private onInterval(\n handler: (resources: MoveResource[], ctx: AptosResourcesContext) => void,\n timeInterval: HandleInterval | undefined,\n versionInterval: HandleInterval | undefined,\n type: string | undefined\n ): this {\n const processor = this\n this.resourcesHandlers.push({\n handler: async function (data) {\n if (data.timestampMicros > Number.MAX_SAFE_INTEGER) {\n throw new ServerError(Status.INVALID_ARGUMENT, 'timestamp is too large')\n }\n const timestamp = Number(data.timestampMicros)\n\n const ctx = new AptosResourcesContext(\n processor.config.network,\n processor.config.address,\n data.version,\n timestamp\n )\n await handler(data.resources as MoveResource[], ctx)\n return ctx.getProcessResult()\n },\n timeIntervalInMinutes: timeInterval,\n versionInterval: versionInterval,\n type: type,\n })\n return this\n }\n\n public onTimeInterval(\n handler: (resources: MoveResource[], ctx: AptosResourcesContext) => void,\n timeIntervalInMinutes = 60,\n backfillTimeIntervalInMinutes = 240,\n type?: string\n ): this {\n return this.onInterval(\n handler,\n {\n recentInterval: timeIntervalInMinutes,\n backfillInterval: backfillTimeIntervalInMinutes,\n },\n undefined,\n type\n )\n }\n\n public onVersionInterval(\n handler: (resources: MoveResource[], ctx: AptosResourcesContext) => void,\n versionInterval = 100000,\n backfillVersionInterval = 400000,\n typePrefix?: string\n ): this {\n return this.onInterval(\n handler,\n undefined,\n { recentInterval: versionInterval, backfillInterval: backfillVersionInterval },\n typePrefix\n )\n }\n}\n\nfunction configure(options: AptosBindOptions): IndexConfigure {\n let startVersion = 0n\n if (options.startVersion !== undefined) {\n if (typeof options.startVersion === 'number') {\n startVersion = BigInt(options.startVersion)\n } else {\n startVersion = options.startVersion\n }\n }\n\n return {\n startVersion: startVersion,\n address: options.address,\n network: options.network || AptosNetwork.MAIN_NET,\n }\n}\n"]}
1
+ {"version":3,"file":"aptos-processor.js","sourceRoot":"","sources":["../../src/aptos/aptos-processor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAa,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAoB,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzE,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAElE,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACvE,OAAO,E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AE;YAC5C,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;SAC5C;aAAM;YACL,YAAY,GAAG,OAAO,CAAC,YAAY,CAAA;SACpC;KACF;IAED,OAAO;QACL,YAAY,EAAE,YAAY;QAC1B,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,YAAY,CAAC,QAAQ;KAClD,CAAA;AACH,CAAC","sourcesContent":["import { MoveResource, Transaction_UserTransaction, TransactionPayload_EntryFunctionPayload } from './move-types.js'\n\nimport { MOVE_CODER, MoveCoder } from './move-coder.js'\nimport { AptosBindOptions, AptosNetwork, getChainId } from './network.js'\nimport { AptosContext, AptosResourcesContext } from './context.js'\nimport { EventInstance } from './models.js'\nimport { ListStateStorage, mergeProcessResults } from '@sentio/runtime'\nimport {\n MoveFetchConfig,\n Data_AptResource,\n HandleInterval,\n ProcessResult,\n Data_AptEvent,\n Data_AptCall,\n} from '@sentio/protos'\nimport { ServerError, Status } from 'nice-grpc'\nimport { CallHandler, EventFilter, EventHandler, FunctionNameAndCallFilter, parseMoveType } from '../move/index.js'\n\ntype IndexConfigure = {\n address: string\n network: AptosNetwork\n startVersion: bigint\n // endSeqNumber?: Long\n}\n\nclass ResourceHandlder {\n type?: string\n versionInterval?: HandleInterval\n timeIntervalInMinutes?: HandleInterval\n handler: (resource: Data_AptResource) => Promise<ProcessResult>\n}\n\nexport class AptosProcessorState extends ListStateStorage<AptosBaseProcessor> {\n static INSTANCE = new AptosProcessorState()\n}\n\nexport class AptosBaseProcessor {\n readonly moduleName: string\n config: IndexConfigure\n eventHandlers: EventHandler<Data_AptEvent>[] = []\n callHandlers: CallHandler<Data_AptCall>[] = []\n\n constructor(moduleName: string, options: AptosBindOptions) {\n this.moduleName = moduleName\n this.config = configure(options)\n AptosProcessorState.INSTANCE.addValue(this)\n this.loadTypes(MOVE_CODER)\n }\n\n // getABI(): MoveModule | undefined {\n // return undefined\n // }\n\n public onTransaction(\n handler: (transaction: Transaction_UserTransaction, ctx: AptosContext) => void,\n includedFailed = false,\n fetchConfig?: MoveFetchConfig\n ): this {\n const _fetchConfig = fetchConfig || MoveFetchConfig.fromPartial({})\n\n // const address = this.config.address\n // const moduleName = this.moduleName\n const processor = this\n this.callHandlers.push({\n handler: async function (data) {\n if (!data.transaction) {\n throw new ServerError(Status.INVALID_ARGUMENT, 'call is null')\n }\n const call = data.transaction as Transaction_UserTransaction\n const ctx = new AptosContext(\n processor.moduleName,\n processor.config.network,\n processor.config.address,\n BigInt(data.transaction.version),\n call,\n 0\n )\n await handler(call, ctx)\n return ctx.getProcessResult()\n },\n filters: [{ function: '', includeFailed: includedFailed }],\n fetchConfig: _fetchConfig,\n })\n return this\n }\n\n public onMoveEvent(\n handler: (event: EventInstance, ctx: AptosContext) => void,\n filter: EventFilter | EventFilter[],\n fetchConfig?: MoveFetchConfig\n ): this {\n let _filters: EventFilter[] = []\n const _fetchConfig = fetchConfig || MoveFetchConfig.fromPartial({})\n\n if (Array.isArray(filter)) {\n _filters = filter\n } else {\n _filters.push(filter)\n }\n\n const address = this.config.address\n // const moduleName = this.moduleName\n\n const processor = this\n const allEventType = new Set(_filters.map((f) => address + '::' + f.type))\n\n this.eventHandlers.push({\n handler: async function (data) {\n if (!data.transaction) {\n throw new ServerError(Status.INVALID_ARGUMENT, 'event is null')\n }\n const txn = data.transaction as Transaction_UserTransaction\n if (!txn.events.length) {\n throw new ServerError(Status.INVALID_ARGUMENT, 'no event in the transactions')\n }\n\n const events = txn.events\n txn.events = []\n const processResults = []\n\n for (const [idx, evt] of events.entries()) {\n const typeQname = parseMoveType(evt.type).qname\n if (!allEventType.has(typeQname)) {\n continue\n }\n\n const ctx = new AptosContext(\n processor.moduleName,\n processor.config.network,\n processor.config.address,\n BigInt(txn.version),\n txn,\n idx\n )\n const eventInstance = evt as EventInstance\n const decoded = MOVE_CODER.decodeEvent<any>(eventInstance)\n await handler(decoded || eventInstance, ctx)\n processResults.push(ctx.getProcessResult())\n }\n\n return mergeProcessResults(processResults)\n },\n filters: _filters,\n fetchConfig: _fetchConfig,\n })\n return this\n }\n\n public onEntryFunctionCall(\n handler: (call: TransactionPayload_EntryFunctionPayload, ctx: AptosContext) => void,\n filter: FunctionNameAndCallFilter | FunctionNameAndCallFilter[],\n fetchConfig?: Partial<MoveFetchConfig>\n ): this {\n let _filters: FunctionNameAndCallFilter[] = []\n const _fetchConfig = MoveFetchConfig.fromPartial(fetchConfig || {})\n\n if (Array.isArray(filter)) {\n _filters = filter\n } else {\n _filters.push(filter)\n }\n\n // const address = this.config.address\n // const moduleName = this.moduleName\n const processor = this\n\n this.callHandlers.push({\n handler: async function (data) {\n if (!data.transaction) {\n throw new ServerError(Status.INVALID_ARGUMENT, 'call is null')\n }\n const tx = data.transaction as Transaction_UserTransaction\n\n const ctx = new AptosContext(\n processor.moduleName,\n processor.config.network,\n processor.config.address,\n BigInt(tx.version),\n tx,\n 0\n )\n if (tx) {\n const payload = tx.payload as TransactionPayload_EntryFunctionPayload\n const decoded = MOVE_CODER.decodeFunctionPayload(payload)\n await handler(decoded, ctx)\n }\n return ctx.getProcessResult()\n },\n filters: _filters,\n fetchConfig: _fetchConfig,\n })\n return this\n }\n\n getChainId(): string {\n return getChainId(this.config.network)\n }\n\n loadTypes(registry: MoveCoder) {\n if (registry.contains(this.config.address, this.moduleName)) {\n return\n }\n this.loadTypesInternal(registry)\n }\n\n protected loadTypesInternal(registry: MoveCoder) {\n // should be override by subclass\n console.log('')\n }\n}\n\nexport class AptosAccountProcessorState extends ListStateStorage<AptosResourcesProcessor> {\n static INSTANCE = new AptosAccountProcessorState()\n}\n\nexport class AptosResourcesProcessor {\n config: IndexConfigure\n\n resourcesHandlers: ResourceHandlder[] = []\n\n static bind(options: AptosBindOptions): AptosResourcesProcessor {\n return new AptosResourcesProcessor(options)\n }\n\n protected constructor(options: AptosBindOptions) {\n this.config = configure(options)\n AptosAccountProcessorState.INSTANCE.addValue(this)\n }\n\n getChainId(): string {\n return getChainId(this.config.network)\n }\n\n private onInterval(\n handler: (resources: MoveResource[], ctx: AptosResourcesContext) => void,\n timeInterval: HandleInterval | undefined,\n versionInterval: HandleInterval | undefined,\n type: string | undefined\n ): this {\n const processor = this\n this.resourcesHandlers.push({\n handler: async function (data) {\n if (data.timestampMicros > Number.MAX_SAFE_INTEGER) {\n throw new ServerError(Status.INVALID_ARGUMENT, 'timestamp is too large')\n }\n const timestamp = Number(data.timestampMicros)\n\n const ctx = new AptosResourcesContext(\n processor.config.network,\n processor.config.address,\n data.version,\n timestamp\n )\n await handler(data.resources as MoveResource[], ctx)\n return ctx.getProcessResult()\n },\n timeIntervalInMinutes: timeInterval,\n versionInterval: versionInterval,\n type: type,\n })\n return this\n }\n\n public onTimeInterval(\n handler: (resources: MoveResource[], ctx: AptosResourcesContext) => void,\n timeIntervalInMinutes = 60,\n backfillTimeIntervalInMinutes = 240,\n type?: string\n ): this {\n return this.onInterval(\n handler,\n {\n recentInterval: timeIntervalInMinutes,\n backfillInterval: backfillTimeIntervalInMinutes,\n },\n undefined,\n type\n )\n }\n\n public onVersionInterval(\n handler: (resources: MoveResource[], ctx: AptosResourcesContext) => void,\n versionInterval = 100000,\n backfillVersionInterval = 400000,\n typePrefix?: string\n ): this {\n return this.onInterval(\n handler,\n undefined,\n { recentInterval: versionInterval, backfillInterval: backfillVersionInterval },\n typePrefix\n )\n }\n}\n\nfunction configure(options: AptosBindOptions): IndexConfigure {\n let startVersion = 0n\n if (options.startVersion !== undefined) {\n if (typeof options.startVersion === 'number') {\n startVersion = BigInt(options.startVersion)\n } else {\n startVersion = options.startVersion\n }\n }\n\n return {\n startVersion: startVersion,\n address: options.address,\n network: options.network || AptosNetwork.MAIN_NET,\n }\n}\n"]}
@@ -20,7 +20,7 @@ export declare class code extends AptosBaseProcessor {
20
20
  constructor(options: AptosBindOptions);
21
21
  static DEFAULT_OPTIONS: AptosBindOptions;
22
22
  static bind(options?: Partial<AptosBindOptions>): code;
23
- onEntryPublishPackageTxn(func: (call: code.PublishPackageTxnPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): code;
23
+ onEntryPublishPackageTxn(func: (call: code.PublishPackageTxnPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): code;
24
24
  }
25
25
  export declare namespace code {
26
26
  class AllowedDep {
@@ -68,10 +68,10 @@ export declare class coin extends AptosBaseProcessor {
68
68
  constructor(options: AptosBindOptions);
69
69
  static DEFAULT_OPTIONS: AptosBindOptions;
70
70
  static bind(options?: Partial<AptosBindOptions>): coin;
71
- onEntryFreezeCoinStore(func: (call: coin.FreezeCoinStorePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): coin;
72
- onEntryTransfer(func: (call: coin.TransferPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): coin;
73
- onEntryUnfreezeCoinStore(func: (call: coin.UnfreezeCoinStorePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): coin;
74
- onEntryUpgradeSupply(func: (call: coin.UpgradeSupplyPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): coin;
71
+ onEntryFreezeCoinStore(func: (call: coin.FreezeCoinStorePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): coin;
72
+ onEntryTransfer(func: (call: coin.TransferPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): coin;
73
+ onEntryUnfreezeCoinStore(func: (call: coin.UnfreezeCoinStorePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): coin;
74
+ onEntryUpgradeSupply(func: (call: coin.UpgradeSupplyPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): coin;
75
75
  onEventDepositEvent(func: (event: coin.DepositEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): coin;
76
76
  onEventWithdrawEvent(func: (event: coin.WithdrawEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): coin;
77
77
  }
@@ -213,19 +213,19 @@ export declare class stake extends AptosBaseProcessor {
213
213
  constructor(options: AptosBindOptions);
214
214
  static DEFAULT_OPTIONS: AptosBindOptions;
215
215
  static bind(options?: Partial<AptosBindOptions>): stake;
216
- onEntryAddStake(func: (call: stake.AddStakePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): stake;
217
- onEntryIncreaseLockup(func: (call: stake.IncreaseLockupPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): stake;
218
- onEntryInitializeStakeOwner(func: (call: stake.InitializeStakeOwnerPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): stake;
219
- onEntryInitializeValidator(func: (call: stake.InitializeValidatorPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): stake;
220
- onEntryJoinValidatorSet(func: (call: stake.JoinValidatorSetPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): stake;
221
- onEntryLeaveValidatorSet(func: (call: stake.LeaveValidatorSetPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): stake;
222
- onEntryReactivateStake(func: (call: stake.ReactivateStakePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): stake;
223
- onEntryRotateConsensusKey(func: (call: stake.RotateConsensusKeyPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): stake;
224
- onEntrySetDelegatedVoter(func: (call: stake.SetDelegatedVoterPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): stake;
225
- onEntrySetOperator(func: (call: stake.SetOperatorPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): stake;
226
- onEntryUnlock(func: (call: stake.UnlockPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): stake;
227
- onEntryUpdateNetworkAndFullnodeAddresses(func: (call: stake.UpdateNetworkAndFullnodeAddressesPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): stake;
228
- onEntryWithdraw(func: (call: stake.WithdrawPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): stake;
216
+ onEntryAddStake(func: (call: stake.AddStakePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): stake;
217
+ onEntryIncreaseLockup(func: (call: stake.IncreaseLockupPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): stake;
218
+ onEntryInitializeStakeOwner(func: (call: stake.InitializeStakeOwnerPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): stake;
219
+ onEntryInitializeValidator(func: (call: stake.InitializeValidatorPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): stake;
220
+ onEntryJoinValidatorSet(func: (call: stake.JoinValidatorSetPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): stake;
221
+ onEntryLeaveValidatorSet(func: (call: stake.LeaveValidatorSetPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): stake;
222
+ onEntryReactivateStake(func: (call: stake.ReactivateStakePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): stake;
223
+ onEntryRotateConsensusKey(func: (call: stake.RotateConsensusKeyPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): stake;
224
+ onEntrySetDelegatedVoter(func: (call: stake.SetDelegatedVoterPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): stake;
225
+ onEntrySetOperator(func: (call: stake.SetOperatorPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): stake;
226
+ onEntryUnlock(func: (call: stake.UnlockPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): stake;
227
+ onEntryUpdateNetworkAndFullnodeAddresses(func: (call: stake.UpdateNetworkAndFullnodeAddressesPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): stake;
228
+ onEntryWithdraw(func: (call: stake.WithdrawPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): stake;
229
229
  onEventRegisterValidatorCandidateEvent(func: (event: stake.RegisterValidatorCandidateEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): stake;
230
230
  onEventSetOperatorEvent(func: (event: stake.SetOperatorEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): stake;
231
231
  onEventAddStakeEvent(func: (event: stake.AddStakeEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): stake;
@@ -488,7 +488,7 @@ export declare class object_ extends AptosBaseProcessor {
488
488
  constructor(options: AptosBindOptions);
489
489
  static DEFAULT_OPTIONS: AptosBindOptions;
490
490
  static bind(options?: Partial<AptosBindOptions>): object_;
491
- onEntryTransferCall(func: (call: object_.TransferCallPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): object_;
491
+ onEntryTransferCall(func: (call: object_.TransferCallPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): object_;
492
492
  onEventTransferEvent(func: (event: object_.TransferEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): object_;
493
493
  }
494
494
  export declare namespace object_ {
@@ -643,14 +643,14 @@ export declare class account extends AptosBaseProcessor {
643
643
  constructor(options: AptosBindOptions);
644
644
  static DEFAULT_OPTIONS: AptosBindOptions;
645
645
  static bind(options?: Partial<AptosBindOptions>): account;
646
- onEntryOfferRotationCapability(func: (call: account.OfferRotationCapabilityPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): account;
647
- onEntryOfferSignerCapability(func: (call: account.OfferSignerCapabilityPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): account;
648
- onEntryRevokeAnyRotationCapability(func: (call: account.RevokeAnyRotationCapabilityPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): account;
649
- onEntryRevokeAnySignerCapability(func: (call: account.RevokeAnySignerCapabilityPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): account;
650
- onEntryRevokeRotationCapability(func: (call: account.RevokeRotationCapabilityPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): account;
651
- onEntryRevokeSignerCapability(func: (call: account.RevokeSignerCapabilityPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): account;
652
- onEntryRotateAuthenticationKey(func: (call: account.RotateAuthenticationKeyPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): account;
653
- onEntryRotateAuthenticationKeyWithRotationCapability(func: (call: account.RotateAuthenticationKeyWithRotationCapabilityPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): account;
646
+ onEntryOfferRotationCapability(func: (call: account.OfferRotationCapabilityPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): account;
647
+ onEntryOfferSignerCapability(func: (call: account.OfferSignerCapabilityPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): account;
648
+ onEntryRevokeAnyRotationCapability(func: (call: account.RevokeAnyRotationCapabilityPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): account;
649
+ onEntryRevokeAnySignerCapability(func: (call: account.RevokeAnySignerCapabilityPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): account;
650
+ onEntryRevokeRotationCapability(func: (call: account.RevokeRotationCapabilityPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): account;
651
+ onEntryRevokeSignerCapability(func: (call: account.RevokeSignerCapabilityPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): account;
652
+ onEntryRotateAuthenticationKey(func: (call: account.RotateAuthenticationKeyPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): account;
653
+ onEntryRotateAuthenticationKeyWithRotationCapability(func: (call: account.RotateAuthenticationKeyWithRotationCapabilityPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): account;
654
654
  onEventCoinRegisterEvent(func: (event: account.CoinRegisterEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): account;
655
655
  onEventKeyRotationEvent(func: (event: account.KeyRotationEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): account;
656
656
  }
@@ -824,7 +824,7 @@ export declare class version extends AptosBaseProcessor {
824
824
  constructor(options: AptosBindOptions);
825
825
  static DEFAULT_OPTIONS: AptosBindOptions;
826
826
  static bind(options?: Partial<AptosBindOptions>): version;
827
- onEntrySetVersion(func: (call: version.SetVersionPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): version;
827
+ onEntrySetVersion(func: (call: version.SetVersionPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): version;
828
828
  }
829
829
  export declare namespace version {
830
830
  class SetVersionCapability {
@@ -844,22 +844,22 @@ export declare class vesting extends AptosBaseProcessor {
844
844
  constructor(options: AptosBindOptions);
845
845
  static DEFAULT_OPTIONS: AptosBindOptions;
846
846
  static bind(options?: Partial<AptosBindOptions>): vesting;
847
- onEntryAdminWithdraw(func: (call: vesting.AdminWithdrawPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): vesting;
848
- onEntryDistribute(func: (call: vesting.DistributePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): vesting;
849
- onEntryDistributeMany(func: (call: vesting.DistributeManyPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): vesting;
850
- onEntryResetBeneficiary(func: (call: vesting.ResetBeneficiaryPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): vesting;
851
- onEntryResetLockup(func: (call: vesting.ResetLockupPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): vesting;
852
- onEntrySetBeneficiary(func: (call: vesting.SetBeneficiaryPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): vesting;
853
- onEntrySetBeneficiaryResetter(func: (call: vesting.SetBeneficiaryResetterPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): vesting;
854
- onEntrySetManagementRole(func: (call: vesting.SetManagementRolePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): vesting;
855
- onEntryTerminateVestingContract(func: (call: vesting.TerminateVestingContractPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): vesting;
856
- onEntryUnlockRewards(func: (call: vesting.UnlockRewardsPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): vesting;
857
- onEntryUnlockRewardsMany(func: (call: vesting.UnlockRewardsManyPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): vesting;
858
- onEntryUpdateOperator(func: (call: vesting.UpdateOperatorPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): vesting;
859
- onEntryUpdateOperatorWithSameCommission(func: (call: vesting.UpdateOperatorWithSameCommissionPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): vesting;
860
- onEntryUpdateVoter(func: (call: vesting.UpdateVoterPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): vesting;
861
- onEntryVest(func: (call: vesting.VestPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): vesting;
862
- onEntryVestMany(func: (call: vesting.VestManyPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): vesting;
847
+ onEntryAdminWithdraw(func: (call: vesting.AdminWithdrawPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): vesting;
848
+ onEntryDistribute(func: (call: vesting.DistributePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): vesting;
849
+ onEntryDistributeMany(func: (call: vesting.DistributeManyPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): vesting;
850
+ onEntryResetBeneficiary(func: (call: vesting.ResetBeneficiaryPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): vesting;
851
+ onEntryResetLockup(func: (call: vesting.ResetLockupPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): vesting;
852
+ onEntrySetBeneficiary(func: (call: vesting.SetBeneficiaryPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): vesting;
853
+ onEntrySetBeneficiaryResetter(func: (call: vesting.SetBeneficiaryResetterPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): vesting;
854
+ onEntrySetManagementRole(func: (call: vesting.SetManagementRolePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): vesting;
855
+ onEntryTerminateVestingContract(func: (call: vesting.TerminateVestingContractPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): vesting;
856
+ onEntryUnlockRewards(func: (call: vesting.UnlockRewardsPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): vesting;
857
+ onEntryUnlockRewardsMany(func: (call: vesting.UnlockRewardsManyPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): vesting;
858
+ onEntryUpdateOperator(func: (call: vesting.UpdateOperatorPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): vesting;
859
+ onEntryUpdateOperatorWithSameCommission(func: (call: vesting.UpdateOperatorWithSameCommissionPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): vesting;
860
+ onEntryUpdateVoter(func: (call: vesting.UpdateVoterPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): vesting;
861
+ onEntryVest(func: (call: vesting.VestPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): vesting;
862
+ onEntryVestMany(func: (call: vesting.VestManyPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): vesting;
863
863
  onEventCreateVestingContractEvent(func: (event: vesting.CreateVestingContractEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): vesting;
864
864
  onEventUpdateOperatorEvent(func: (event: vesting.UpdateOperatorEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): vesting;
865
865
  onEventUpdateVoterEvent(func: (event: vesting.UpdateVoterEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): vesting;
@@ -1182,9 +1182,9 @@ export declare class aptos_coin extends AptosBaseProcessor {
1182
1182
  constructor(options: AptosBindOptions);
1183
1183
  static DEFAULT_OPTIONS: AptosBindOptions;
1184
1184
  static bind(options?: Partial<AptosBindOptions>): aptos_coin;
1185
- onEntryClaimMintCapability(func: (call: aptos_coin.ClaimMintCapabilityPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): aptos_coin;
1186
- onEntryDelegateMintCapability(func: (call: aptos_coin.DelegateMintCapabilityPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): aptos_coin;
1187
- onEntryMint(func: (call: aptos_coin.MintPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): aptos_coin;
1185
+ onEntryClaimMintCapability(func: (call: aptos_coin.ClaimMintCapabilityPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): aptos_coin;
1186
+ onEntryDelegateMintCapability(func: (call: aptos_coin.DelegateMintCapabilityPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): aptos_coin;
1187
+ onEntryMint(func: (call: aptos_coin.MintPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): aptos_coin;
1188
1188
  }
1189
1189
  export declare namespace aptos_coin {
1190
1190
  class AptosCoin {
@@ -1352,10 +1352,10 @@ export declare class managed_coin extends AptosBaseProcessor {
1352
1352
  constructor(options: AptosBindOptions);
1353
1353
  static DEFAULT_OPTIONS: AptosBindOptions;
1354
1354
  static bind(options?: Partial<AptosBindOptions>): managed_coin;
1355
- onEntryBurn(func: (call: managed_coin.BurnPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): managed_coin;
1356
- onEntryInitialize(func: (call: managed_coin.InitializePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): managed_coin;
1357
- onEntryMint(func: (call: managed_coin.MintPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): managed_coin;
1358
- onEntryRegister(func: (call: managed_coin.RegisterPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): managed_coin;
1355
+ onEntryBurn(func: (call: managed_coin.BurnPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): managed_coin;
1356
+ onEntryInitialize(func: (call: managed_coin.InitializePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): managed_coin;
1357
+ onEntryMint(func: (call: managed_coin.MintPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): managed_coin;
1358
+ onEntryRegister(func: (call: managed_coin.RegisterPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): managed_coin;
1359
1359
  }
1360
1360
  export declare namespace managed_coin {
1361
1361
  class Capabilities<T0> {
@@ -1408,12 +1408,12 @@ export declare class aptos_account extends AptosBaseProcessor {
1408
1408
  constructor(options: AptosBindOptions);
1409
1409
  static DEFAULT_OPTIONS: AptosBindOptions;
1410
1410
  static bind(options?: Partial<AptosBindOptions>): aptos_account;
1411
- onEntryBatchTransfer(func: (call: aptos_account.BatchTransferPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): aptos_account;
1412
- onEntryBatchTransferCoins(func: (call: aptos_account.BatchTransferCoinsPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): aptos_account;
1413
- onEntryCreateAccount(func: (call: aptos_account.CreateAccountPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): aptos_account;
1414
- onEntrySetAllowDirectCoinTransfers(func: (call: aptos_account.SetAllowDirectCoinTransfersPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): aptos_account;
1415
- onEntryTransfer(func: (call: aptos_account.TransferPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): aptos_account;
1416
- onEntryTransferCoins(func: (call: aptos_account.TransferCoinsPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): aptos_account;
1411
+ onEntryBatchTransfer(func: (call: aptos_account.BatchTransferPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): aptos_account;
1412
+ onEntryBatchTransferCoins(func: (call: aptos_account.BatchTransferCoinsPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): aptos_account;
1413
+ onEntryCreateAccount(func: (call: aptos_account.CreateAccountPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): aptos_account;
1414
+ onEntrySetAllowDirectCoinTransfers(func: (call: aptos_account.SetAllowDirectCoinTransfersPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): aptos_account;
1415
+ onEntryTransfer(func: (call: aptos_account.TransferPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): aptos_account;
1416
+ onEntryTransferCoins(func: (call: aptos_account.TransferCoinsPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): aptos_account;
1417
1417
  onEventDirectCoinTransferConfigUpdatedEvent(func: (event: aptos_account.DirectCoinTransferConfigUpdatedEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): aptos_account;
1418
1418
  }
1419
1419
  export declare namespace aptos_account {
@@ -1480,14 +1480,14 @@ export declare class staking_proxy extends AptosBaseProcessor {
1480
1480
  constructor(options: AptosBindOptions);
1481
1481
  static DEFAULT_OPTIONS: AptosBindOptions;
1482
1482
  static bind(options?: Partial<AptosBindOptions>): staking_proxy;
1483
- onEntrySetOperator(func: (call: staking_proxy.SetOperatorPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): staking_proxy;
1484
- onEntrySetStakePoolOperator(func: (call: staking_proxy.SetStakePoolOperatorPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): staking_proxy;
1485
- onEntrySetStakePoolVoter(func: (call: staking_proxy.SetStakePoolVoterPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): staking_proxy;
1486
- onEntrySetStakingContractOperator(func: (call: staking_proxy.SetStakingContractOperatorPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): staking_proxy;
1487
- onEntrySetStakingContractVoter(func: (call: staking_proxy.SetStakingContractVoterPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): staking_proxy;
1488
- onEntrySetVestingContractOperator(func: (call: staking_proxy.SetVestingContractOperatorPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): staking_proxy;
1489
- onEntrySetVestingContractVoter(func: (call: staking_proxy.SetVestingContractVoterPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): staking_proxy;
1490
- onEntrySetVoter(func: (call: staking_proxy.SetVoterPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): staking_proxy;
1483
+ onEntrySetOperator(func: (call: staking_proxy.SetOperatorPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): staking_proxy;
1484
+ onEntrySetStakePoolOperator(func: (call: staking_proxy.SetStakePoolOperatorPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): staking_proxy;
1485
+ onEntrySetStakePoolVoter(func: (call: staking_proxy.SetStakePoolVoterPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): staking_proxy;
1486
+ onEntrySetStakingContractOperator(func: (call: staking_proxy.SetStakingContractOperatorPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): staking_proxy;
1487
+ onEntrySetStakingContractVoter(func: (call: staking_proxy.SetStakingContractVoterPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): staking_proxy;
1488
+ onEntrySetVestingContractOperator(func: (call: staking_proxy.SetVestingContractOperatorPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): staking_proxy;
1489
+ onEntrySetVestingContractVoter(func: (call: staking_proxy.SetVestingContractVoterPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): staking_proxy;
1490
+ onEntrySetVoter(func: (call: staking_proxy.SetVoterPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): staking_proxy;
1491
1491
  }
1492
1492
  export declare namespace staking_proxy {
1493
1493
  interface SetOperatorPayload extends TypedFunctionPayload<[Address, Address]> {
@@ -1555,14 +1555,14 @@ export declare class delegation_pool extends AptosBaseProcessor {
1555
1555
  constructor(options: AptosBindOptions);
1556
1556
  static DEFAULT_OPTIONS: AptosBindOptions;
1557
1557
  static bind(options?: Partial<AptosBindOptions>): delegation_pool;
1558
- onEntryAddStake(func: (call: delegation_pool.AddStakePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): delegation_pool;
1559
- onEntryInitializeDelegationPool(func: (call: delegation_pool.InitializeDelegationPoolPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): delegation_pool;
1560
- onEntryReactivateStake(func: (call: delegation_pool.ReactivateStakePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): delegation_pool;
1561
- onEntrySetDelegatedVoter(func: (call: delegation_pool.SetDelegatedVoterPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): delegation_pool;
1562
- onEntrySetOperator(func: (call: delegation_pool.SetOperatorPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): delegation_pool;
1563
- onEntrySynchronizeDelegationPool(func: (call: delegation_pool.SynchronizeDelegationPoolPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): delegation_pool;
1564
- onEntryUnlock(func: (call: delegation_pool.UnlockPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): delegation_pool;
1565
- onEntryWithdraw(func: (call: delegation_pool.WithdrawPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): delegation_pool;
1558
+ onEntryAddStake(func: (call: delegation_pool.AddStakePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): delegation_pool;
1559
+ onEntryInitializeDelegationPool(func: (call: delegation_pool.InitializeDelegationPoolPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): delegation_pool;
1560
+ onEntryReactivateStake(func: (call: delegation_pool.ReactivateStakePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): delegation_pool;
1561
+ onEntrySetDelegatedVoter(func: (call: delegation_pool.SetDelegatedVoterPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): delegation_pool;
1562
+ onEntrySetOperator(func: (call: delegation_pool.SetOperatorPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): delegation_pool;
1563
+ onEntrySynchronizeDelegationPool(func: (call: delegation_pool.SynchronizeDelegationPoolPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): delegation_pool;
1564
+ onEntryUnlock(func: (call: delegation_pool.UnlockPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): delegation_pool;
1565
+ onEntryWithdraw(func: (call: delegation_pool.WithdrawPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): delegation_pool;
1566
1566
  onEventAddStakeEvent(func: (event: delegation_pool.AddStakeEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): delegation_pool;
1567
1567
  onEventReactivateStakeEvent(func: (event: delegation_pool.ReactivateStakeEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): delegation_pool;
1568
1568
  onEventUnlockStakeEvent(func: (event: delegation_pool.UnlockStakeEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): delegation_pool;
@@ -1720,10 +1720,10 @@ export declare class aptos_governance extends AptosBaseProcessor {
1720
1720
  constructor(options: AptosBindOptions);
1721
1721
  static DEFAULT_OPTIONS: AptosBindOptions;
1722
1722
  static bind(options?: Partial<AptosBindOptions>): aptos_governance;
1723
- onEntryAddApprovedScriptHashScript(func: (call: aptos_governance.AddApprovedScriptHashScriptPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): aptos_governance;
1724
- onEntryCreateProposal(func: (call: aptos_governance.CreateProposalPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): aptos_governance;
1725
- onEntryCreateProposalV2(func: (call: aptos_governance.CreateProposalV2Payload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): aptos_governance;
1726
- onEntryVote(func: (call: aptos_governance.VotePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): aptos_governance;
1723
+ onEntryAddApprovedScriptHashScript(func: (call: aptos_governance.AddApprovedScriptHashScriptPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): aptos_governance;
1724
+ onEntryCreateProposal(func: (call: aptos_governance.CreateProposalPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): aptos_governance;
1725
+ onEntryCreateProposalV2(func: (call: aptos_governance.CreateProposalV2Payload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): aptos_governance;
1726
+ onEntryVote(func: (call: aptos_governance.VotePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): aptos_governance;
1727
1727
  onEventCreateProposalEvent(func: (event: aptos_governance.CreateProposalEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): aptos_governance;
1728
1728
  onEventUpdateConfigEvent(func: (event: aptos_governance.UpdateConfigEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): aptos_governance;
1729
1729
  onEventVoteEvent(func: (event: aptos_governance.VoteEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): aptos_governance;
@@ -1819,21 +1819,21 @@ export declare class multisig_account extends AptosBaseProcessor {
1819
1819
  constructor(options: AptosBindOptions);
1820
1820
  static DEFAULT_OPTIONS: AptosBindOptions;
1821
1821
  static bind(options?: Partial<AptosBindOptions>): multisig_account;
1822
- onEntryAddOwner(func: (call: multisig_account.AddOwnerPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): multisig_account;
1823
- onEntryAddOwners(func: (call: multisig_account.AddOwnersPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): multisig_account;
1824
- onEntryApproveTransaction(func: (call: multisig_account.ApproveTransactionPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): multisig_account;
1825
- onEntryCreate(func: (call: multisig_account.CreatePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): multisig_account;
1826
- onEntryCreateTransaction(func: (call: multisig_account.CreateTransactionPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): multisig_account;
1827
- onEntryCreateTransactionWithHash(func: (call: multisig_account.CreateTransactionWithHashPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): multisig_account;
1828
- onEntryCreateWithExistingAccount(func: (call: multisig_account.CreateWithExistingAccountPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): multisig_account;
1829
- onEntryCreateWithOwners(func: (call: multisig_account.CreateWithOwnersPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): multisig_account;
1830
- onEntryExecuteRejectedTransaction(func: (call: multisig_account.ExecuteRejectedTransactionPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): multisig_account;
1831
- onEntryRejectTransaction(func: (call: multisig_account.RejectTransactionPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): multisig_account;
1832
- onEntryRemoveOwner(func: (call: multisig_account.RemoveOwnerPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): multisig_account;
1833
- onEntryRemoveOwners(func: (call: multisig_account.RemoveOwnersPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): multisig_account;
1834
- onEntryUpdateMetadata(func: (call: multisig_account.UpdateMetadataPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): multisig_account;
1835
- onEntryUpdateSignaturesRequired(func: (call: multisig_account.UpdateSignaturesRequiredPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): multisig_account;
1836
- onEntryVoteTransanction(func: (call: multisig_account.VoteTransanctionPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): multisig_account;
1822
+ onEntryAddOwner(func: (call: multisig_account.AddOwnerPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): multisig_account;
1823
+ onEntryAddOwners(func: (call: multisig_account.AddOwnersPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): multisig_account;
1824
+ onEntryApproveTransaction(func: (call: multisig_account.ApproveTransactionPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): multisig_account;
1825
+ onEntryCreate(func: (call: multisig_account.CreatePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): multisig_account;
1826
+ onEntryCreateTransaction(func: (call: multisig_account.CreateTransactionPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): multisig_account;
1827
+ onEntryCreateTransactionWithHash(func: (call: multisig_account.CreateTransactionWithHashPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): multisig_account;
1828
+ onEntryCreateWithExistingAccount(func: (call: multisig_account.CreateWithExistingAccountPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): multisig_account;
1829
+ onEntryCreateWithOwners(func: (call: multisig_account.CreateWithOwnersPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): multisig_account;
1830
+ onEntryExecuteRejectedTransaction(func: (call: multisig_account.ExecuteRejectedTransactionPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): multisig_account;
1831
+ onEntryRejectTransaction(func: (call: multisig_account.RejectTransactionPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): multisig_account;
1832
+ onEntryRemoveOwner(func: (call: multisig_account.RemoveOwnerPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): multisig_account;
1833
+ onEntryRemoveOwners(func: (call: multisig_account.RemoveOwnersPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): multisig_account;
1834
+ onEntryUpdateMetadata(func: (call: multisig_account.UpdateMetadataPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): multisig_account;
1835
+ onEntryUpdateSignaturesRequired(func: (call: multisig_account.UpdateSignaturesRequiredPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): multisig_account;
1836
+ onEntryVoteTransanction(func: (call: multisig_account.VoteTransanctionPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): multisig_account;
1837
1837
  onEventAddOwnersEvent(func: (event: multisig_account.AddOwnersEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): multisig_account;
1838
1838
  onEventRemoveOwnersEvent(func: (event: multisig_account.RemoveOwnersEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): multisig_account;
1839
1839
  onEventUpdateSignaturesRequiredEvent(func: (event: multisig_account.UpdateSignaturesRequiredEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): multisig_account;
@@ -2065,9 +2065,9 @@ export declare class resource_account extends AptosBaseProcessor {
2065
2065
  constructor(options: AptosBindOptions);
2066
2066
  static DEFAULT_OPTIONS: AptosBindOptions;
2067
2067
  static bind(options?: Partial<AptosBindOptions>): resource_account;
2068
- onEntryCreateResourceAccount(func: (call: resource_account.CreateResourceAccountPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): resource_account;
2069
- onEntryCreateResourceAccountAndFund(func: (call: resource_account.CreateResourceAccountAndFundPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): resource_account;
2070
- onEntryCreateResourceAccountAndPublishPackage(func: (call: resource_account.CreateResourceAccountAndPublishPackagePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): resource_account;
2068
+ onEntryCreateResourceAccount(func: (call: resource_account.CreateResourceAccountPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): resource_account;
2069
+ onEntryCreateResourceAccountAndFund(func: (call: resource_account.CreateResourceAccountAndFundPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): resource_account;
2070
+ onEntryCreateResourceAccountAndPublishPackage(func: (call: resource_account.CreateResourceAccountAndPublishPackagePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): resource_account;
2071
2071
  }
2072
2072
  export declare namespace resource_account {
2073
2073
  class Container {
@@ -2091,17 +2091,17 @@ export declare class staking_contract extends AptosBaseProcessor {
2091
2091
  constructor(options: AptosBindOptions);
2092
2092
  static DEFAULT_OPTIONS: AptosBindOptions;
2093
2093
  static bind(options?: Partial<AptosBindOptions>): staking_contract;
2094
- onEntryAddStake(func: (call: staking_contract.AddStakePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): staking_contract;
2095
- onEntryCreateStakingContract(func: (call: staking_contract.CreateStakingContractPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): staking_contract;
2096
- onEntryDistribute(func: (call: staking_contract.DistributePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): staking_contract;
2097
- onEntryRequestCommission(func: (call: staking_contract.RequestCommissionPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): staking_contract;
2098
- onEntryResetLockup(func: (call: staking_contract.ResetLockupPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): staking_contract;
2099
- onEntrySwitchOperator(func: (call: staking_contract.SwitchOperatorPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): staking_contract;
2100
- onEntrySwitchOperatorWithSameCommission(func: (call: staking_contract.SwitchOperatorWithSameCommissionPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): staking_contract;
2101
- onEntryUnlockRewards(func: (call: staking_contract.UnlockRewardsPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): staking_contract;
2102
- onEntryUnlockStake(func: (call: staking_contract.UnlockStakePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): staking_contract;
2103
- onEntryUpdateCommision(func: (call: staking_contract.UpdateCommisionPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): staking_contract;
2104
- onEntryUpdateVoter(func: (call: staking_contract.UpdateVoterPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): staking_contract;
2094
+ onEntryAddStake(func: (call: staking_contract.AddStakePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): staking_contract;
2095
+ onEntryCreateStakingContract(func: (call: staking_contract.CreateStakingContractPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): staking_contract;
2096
+ onEntryDistribute(func: (call: staking_contract.DistributePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): staking_contract;
2097
+ onEntryRequestCommission(func: (call: staking_contract.RequestCommissionPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): staking_contract;
2098
+ onEntryResetLockup(func: (call: staking_contract.ResetLockupPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): staking_contract;
2099
+ onEntrySwitchOperator(func: (call: staking_contract.SwitchOperatorPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): staking_contract;
2100
+ onEntrySwitchOperatorWithSameCommission(func: (call: staking_contract.SwitchOperatorWithSameCommissionPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): staking_contract;
2101
+ onEntryUnlockRewards(func: (call: staking_contract.UnlockRewardsPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): staking_contract;
2102
+ onEntryUnlockStake(func: (call: staking_contract.UnlockStakePayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): staking_contract;
2103
+ onEntryUpdateCommision(func: (call: staking_contract.UpdateCommisionPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): staking_contract;
2104
+ onEntryUpdateVoter(func: (call: staking_contract.UpdateVoterPayload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): staking_contract;
2105
2105
  onEventUpdateCommissionEvent(func: (event: staking_contract.UpdateCommissionEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): staking_contract;
2106
2106
  onEventCreateStakingContractEvent(func: (event: staking_contract.CreateStakingContractEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): staking_contract;
2107
2107
  onEventUpdateVoterEvent(func: (event: staking_contract.UpdateVoterEventInstance, ctx: AptosContext) => void, fetchConfig?: MoveFetchConfig): staking_contract;