@sentio/sdk-bundle 2.42.1 → 2.43.0-rc.2

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.
Files changed (97) hide show
  1. package/lib/aptos/builtin/0x1.js +1 -1
  2. package/lib/aptos/builtin/0x3.js +1 -1
  3. package/lib/aptos/builtin/index.js +1 -1
  4. package/lib/aptos/ext/index.js +1 -1
  5. package/lib/aptos/index.js +1 -1
  6. package/lib/btc/index.js +1 -1
  7. package/lib/{chunk-7BEMS4NV.js → chunk-2DKKSB3Q.js} +2 -2
  8. package/lib/{chunk-2JLUHA3R.js → chunk-445FSAJP.js} +2 -2
  9. package/lib/{chunk-MF5KGJWT.js → chunk-4O5AYOIW.js} +2 -2
  10. package/lib/chunk-4XDWWAOR.js +1054 -0
  11. package/lib/chunk-4XDWWAOR.js.map +1 -0
  12. package/lib/{chunk-SBU7XQ42.js → chunk-5ZKQRZMR.js} +3 -3
  13. package/lib/chunk-5ZKQRZMR.js.map +1 -0
  14. package/lib/{chunk-HWTRE7ZA.js → chunk-B35KZPC6.js} +2 -2
  15. package/lib/{chunk-T4HXXSET.js → chunk-DD4573FW.js} +2 -2
  16. package/lib/{chunk-DTZPQWAR.js → chunk-DLSAUULX.js} +2 -2
  17. package/lib/{chunk-QRX2UVZ3.js → chunk-EIZ4SUA5.js} +2 -2
  18. package/lib/{chunk-LW4OLSFS.js → chunk-F4FBNBOO.js} +2 -2
  19. package/lib/{chunk-ZLEKYV7V.js → chunk-HYUXOS4C.js} +2 -2
  20. package/lib/chunk-HZPD32NX.js +5 -0
  21. package/lib/chunk-HZPD32NX.js.map +1 -0
  22. package/lib/{chunk-3MJI3F52.js → chunk-IDIPUIJS.js} +2 -2
  23. package/lib/{chunk-CG7IRNK3.js → chunk-MDJARXZT.js} +2 -2
  24. package/lib/{chunk-ZIGQO7R5.js → chunk-MZ2FIAD2.js} +2 -2
  25. package/lib/{chunk-M5LNOTPX.js → chunk-SHDD6PWL.js} +2 -2
  26. package/lib/{chunk-HC2IIOHY.js → chunk-SWU2T3IV.js} +2 -2
  27. package/lib/{chunk-EU2WV53M.js → chunk-WS4VFEL7.js} +2 -2
  28. package/lib/{chunk-SWTOKXE3.js → chunk-Y5WJ4P52.js} +2 -2
  29. package/lib/core/index.js +1 -1
  30. package/lib/eth/builtin/eacaggregatorproxy.js +1 -1
  31. package/lib/eth/builtin/erc1155.js +1 -1
  32. package/lib/eth/builtin/erc20.js +1 -1
  33. package/lib/eth/builtin/erc721.js +1 -1
  34. package/lib/eth/builtin/index.js +1 -1
  35. package/lib/eth/builtin/weth9.js +1 -1
  36. package/lib/eth/codegen/index.js +1 -1
  37. package/lib/eth/index.js +1 -1
  38. package/lib/fuel/asset-processor.d.ts +1 -0
  39. package/lib/fuel/asset-processor.d.ts.map +1 -1
  40. package/lib/fuel/codegen/index.js +1 -1
  41. package/lib/fuel/codegen/index.js.map +1 -1
  42. package/lib/fuel/context.d.ts +6 -4
  43. package/lib/fuel/context.d.ts.map +1 -1
  44. package/lib/fuel/fuel-plugin.d.ts +3 -1
  45. package/lib/fuel/fuel-plugin.d.ts.map +1 -1
  46. package/lib/fuel/fuel-processor.d.ts +8 -3
  47. package/lib/fuel/fuel-processor.d.ts.map +1 -1
  48. package/lib/fuel/global-processor.d.ts +3 -2
  49. package/lib/fuel/global-processor.d.ts.map +1 -1
  50. package/lib/fuel/index.js +1 -1
  51. package/lib/fuel/transaction.d.ts +2 -7
  52. package/lib/fuel/transaction.d.ts.map +1 -1
  53. package/lib/fuel/types.d.ts +15 -1
  54. package/lib/fuel/types.d.ts.map +1 -1
  55. package/lib/index.js +1 -1
  56. package/lib/move/index.js +1 -1
  57. package/lib/solana/builtin/index.js +1 -1
  58. package/lib/solana/index.js +1 -1
  59. package/lib/stark/index.js +1 -1
  60. package/lib/store/index.js +1 -1
  61. package/lib/sui/builtin/0x1.js +1 -1
  62. package/lib/sui/builtin/0x2.js +1 -1
  63. package/lib/sui/builtin/0x3.js +1 -1
  64. package/lib/sui/builtin/index.js +1 -1
  65. package/lib/sui/ext/index.js +1 -1
  66. package/lib/sui/index.js +1 -1
  67. package/lib/testing/index.js +1 -1
  68. package/lib/utils/index.js +1 -1
  69. package/package.json +2 -2
  70. package/src/fuel/asset-processor.ts +8 -1
  71. package/src/fuel/context.ts +8 -3
  72. package/src/fuel/fuel-plugin.ts +44 -2
  73. package/src/fuel/fuel-processor.ts +100 -6
  74. package/src/fuel/global-processor.ts +10 -3
  75. package/src/fuel/transaction.ts +2 -9
  76. package/src/fuel/types.ts +26 -1
  77. package/lib/chunk-O3IGCLZM.js +0 -4
  78. package/lib/chunk-O3IGCLZM.js.map +0 -1
  79. package/lib/chunk-SBU7XQ42.js.map +0 -1
  80. package/lib/chunk-TO35Z22E.js +0 -1037
  81. package/lib/chunk-TO35Z22E.js.map +0 -1
  82. /package/lib/{chunk-7BEMS4NV.js.map → chunk-2DKKSB3Q.js.map} +0 -0
  83. /package/lib/{chunk-2JLUHA3R.js.map → chunk-445FSAJP.js.map} +0 -0
  84. /package/lib/{chunk-MF5KGJWT.js.map → chunk-4O5AYOIW.js.map} +0 -0
  85. /package/lib/{chunk-HWTRE7ZA.js.map → chunk-B35KZPC6.js.map} +0 -0
  86. /package/lib/{chunk-T4HXXSET.js.map → chunk-DD4573FW.js.map} +0 -0
  87. /package/lib/{chunk-DTZPQWAR.js.map → chunk-DLSAUULX.js.map} +0 -0
  88. /package/lib/{chunk-QRX2UVZ3.js.map → chunk-EIZ4SUA5.js.map} +0 -0
  89. /package/lib/{chunk-LW4OLSFS.js.map → chunk-F4FBNBOO.js.map} +0 -0
  90. /package/lib/{chunk-ZLEKYV7V.js.map → chunk-HYUXOS4C.js.map} +0 -0
  91. /package/lib/{chunk-3MJI3F52.js.map → chunk-IDIPUIJS.js.map} +0 -0
  92. /package/lib/{chunk-CG7IRNK3.js.map → chunk-MDJARXZT.js.map} +0 -0
  93. /package/lib/{chunk-ZIGQO7R5.js.map → chunk-MZ2FIAD2.js.map} +0 -0
  94. /package/lib/{chunk-M5LNOTPX.js.map → chunk-SHDD6PWL.js.map} +0 -0
  95. /package/lib/{chunk-HC2IIOHY.js.map → chunk-SWU2T3IV.js.map} +0 -0
  96. /package/lib/{chunk-EU2WV53M.js.map → chunk-WS4VFEL7.js.map} +0 -0
  97. /package/lib/{chunk-SWTOKXE3.js.map → chunk-Y5WJ4P52.js.map} +0 -0
@@ -3,8 +3,7 @@ import { ChainId } from '@sentio/chain';
3
3
  import { RecordMetaData } from '@sentio/protos';
4
4
  import type { CallResult, Contract } from 'fuels';
5
5
  import { InvocationScopeLike } from 'fuels';
6
- import { FuelTransaction } from './transaction.js';
7
- import { FuelLog } from './types.js';
6
+ import { FuelLog, FuelTransaction } from './types.js';
8
7
  export declare class FuelCall {
9
8
  readonly args?: Record<string, any> | undefined;
10
9
  readonly logs?: FuelLog<unknown>[] | undefined;
@@ -14,9 +13,10 @@ export declare class FuelContext extends BaseContext {
14
13
  readonly chainId: ChainId;
15
14
  readonly contractAddress: string;
16
15
  readonly contractName: string;
16
+ readonly timestamp: Date;
17
17
  readonly transaction: FuelTransaction | null;
18
18
  private logIndex;
19
- constructor(chainId: ChainId, contractAddress: string, contractName: string, transaction: FuelTransaction | null);
19
+ constructor(chainId: ChainId, contractAddress: string, contractName: string, timestamp: Date, transaction: FuelTransaction | null);
20
20
  getChainId(): ChainId;
21
21
  setLogIndex(logIndex: number): void;
22
22
  protected getMetaDataInternal(name: string, labels: Labels): RecordMetaData;
@@ -26,7 +26,9 @@ export declare class FuelContractContext<TContract extends Contract> extends Fue
26
26
  readonly contract: TContract;
27
27
  readonly contractAddress: string;
28
28
  readonly contractName: string;
29
+ readonly timestamp: Date;
29
30
  readonly transaction: FuelTransaction | null;
30
- constructor(chainId: ChainId, contract: TContract, contractAddress: string, contractName: string, transaction: FuelTransaction | null);
31
+ constructor(chainId: ChainId, contract: TContract, contractAddress: string, contractName: string, timestamp: Date, transaction: FuelTransaction | null);
32
+ get provider(): import("fuels").Provider;
31
33
  }
32
34
  //# sourceMappingURL=context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/fuel/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAmB,MAAM,kBAAkB,CAAA;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEpC,qBAAa,QAAQ;IAKjB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IACnC,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE;gBAJlC,UAAU,EAAE,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC,EAC5D,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,OAAO,EACX,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,YAAA,EAC1B,IAAI,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,YAAA;CAIrC;AAED,qBAAa,WAAY,SAAQ,WAAW;IAGxC,QAAQ,CAAC,OAAO,EAAE,OAAO;IACzB,QAAQ,CAAC,eAAe,EAAE,MAAM;IAChC,QAAQ,CAAC,YAAY,EAAE,MAAM;IAC7B,QAAQ,CAAC,WAAW,EAAE,eAAe,GAAG,IAAI;IAL9C,OAAO,CAAC,QAAQ,CAAa;gBAElB,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,eAAe,GAAG,IAAI;IAK9C,UAAU,IAAI,OAAO;IAIrB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAInC,SAAS,CAAC,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc;CAa5E;AAED,qBAAa,mBAAmB,CAAC,SAAS,SAAS,QAAQ,CAAE,SAAQ,WAAW;IAE5E,QAAQ,CAAC,OAAO,EAAE,OAAO;IACzB,QAAQ,CAAC,QAAQ,EAAE,SAAS;IAC5B,QAAQ,CAAC,eAAe,EAAE,MAAM;IAChC,QAAQ,CAAC,YAAY,EAAE,MAAM;IAC7B,QAAQ,CAAC,WAAW,EAAE,eAAe,GAAG,IAAI;gBAJnC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,SAAS,EACnB,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,eAAe,GAAG,IAAI;CAI/C"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/fuel/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAmB,MAAM,kBAAkB,CAAA;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAErD,qBAAa,QAAQ;IAKjB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IACnC,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE;gBAJlC,UAAU,EAAE,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC,EAC5D,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,OAAO,EACX,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,YAAA,EAC1B,IAAI,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,YAAA;CAIrC;AAED,qBAAa,WAAY,SAAQ,WAAW;IAGxC,QAAQ,CAAC,OAAO,EAAE,OAAO;IACzB,QAAQ,CAAC,eAAe,EAAE,MAAM;IAChC,QAAQ,CAAC,YAAY,EAAE,MAAM;IAC7B,QAAQ,CAAC,SAAS,EAAE,IAAI;IACxB,QAAQ,CAAC,WAAW,EAAE,eAAe,GAAG,IAAI;IAN9C,OAAO,CAAC,QAAQ,CAAa;gBAElB,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,IAAI,EACf,WAAW,EAAE,eAAe,GAAG,IAAI;IAK9C,UAAU,IAAI,OAAO;IAIrB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAInC,SAAS,CAAC,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc;CAa5E;AAED,qBAAa,mBAAmB,CAAC,SAAS,SAAS,QAAQ,CAAE,SAAQ,WAAW;IAE5E,QAAQ,CAAC,OAAO,EAAE,OAAO;IACzB,QAAQ,CAAC,QAAQ,EAAE,SAAS;IAC5B,QAAQ,CAAC,eAAe,EAAE,MAAM;IAChC,QAAQ,CAAC,YAAY,EAAE,MAAM;IAC7B,QAAQ,CAAC,SAAS,EAAE,IAAI;IACxB,QAAQ,CAAC,WAAW,EAAE,eAAe,GAAG,IAAI;gBALnC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,SAAS,EACnB,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,IAAI,EACf,WAAW,EAAE,eAAe,GAAG,IAAI;IAK9C,IAAI,QAAQ,6BAEX;CACF"}
@@ -1,7 +1,8 @@
1
1
  import { Plugin } from '@sentio/runtime';
2
- import { Data_FuelCall, DataBinding, HandlerType, ProcessConfigResponse, ProcessResult, StartRequest } from '@sentio/protos';
2
+ import { Data_FuelBlock, Data_FuelCall, DataBinding, HandlerType, ProcessConfigResponse, ProcessResult, StartRequest } from '@sentio/protos';
3
3
  interface Handlers {
4
4
  callHandlers: ((trace: Data_FuelCall) => Promise<ProcessResult>)[];
5
+ blockHandlers: ((block: Data_FuelBlock) => Promise<ProcessResult>)[];
5
6
  }
6
7
  export declare class FuelPlugin extends Plugin {
7
8
  name: string;
@@ -12,6 +13,7 @@ export declare class FuelPlugin extends Plugin {
12
13
  start(request: StartRequest): Promise<void>;
13
14
  stateDiff(config: ProcessConfigResponse): boolean;
14
15
  processTransaction(binding: DataBinding): Promise<ProcessResult>;
16
+ processBlock(binding: DataBinding): Promise<ProcessResult>;
15
17
  }
16
18
  export {};
17
19
  //# sourceMappingURL=fuel-plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fuel-plugin.d.ts","sourceRoot":"","sources":["../../src/fuel/fuel-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmD,MAAM,EAAiC,MAAM,iBAAiB,CAAA;AACxH,OAAO,EAEL,aAAa,EACb,WAAW,EACX,WAAW,EACX,qBAAqB,EACrB,aAAa,EACb,YAAY,EACb,MAAM,gBAAgB,CAAA;AASvB,UAAU,QAAQ;IAChB,YAAY,EAAE,CAAC,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC,EAAE,CAAA;CACnE;AAED,qBAAa,UAAW,SAAQ,MAAM;IACpC,IAAI,EAAE,MAAM,CAAe;IAC3B,QAAQ,EAAE,QAAQ,CAEjB;IAEK,SAAS,CAAC,MAAM,EAAE,qBAAqB;IAwD7C,iBAAiB,gBAA0B;IAE3C,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;IAStD,KAAK,CAAC,OAAO,EAAE,YAAY;IAEjC,SAAS,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO;IAI3C,kBAAkB,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;CAsBvE"}
1
+ {"version":3,"file":"fuel-plugin.d.ts","sourceRoot":"","sources":["../../src/fuel/fuel-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmD,MAAM,EAAiC,MAAM,iBAAiB,CAAA;AACxH,OAAO,EAEL,cAAc,EACd,aAAa,EACb,WAAW,EACX,WAAW,EACX,qBAAqB,EACrB,aAAa,EACb,YAAY,EACb,MAAM,gBAAgB,CAAA;AASvB,UAAU,QAAQ;IAChB,YAAY,EAAE,CAAC,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC,EAAE,CAAA;IAClE,aAAa,EAAE,CAAC,CAAC,KAAK,EAAE,cAAc,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC,EAAE,CAAA;CACrE;AAED,qBAAa,UAAW,SAAQ,MAAM;IACpC,IAAI,EAAE,MAAM,CAAe;IAC3B,QAAQ,EAAE,QAAQ,CAGjB;IAEK,SAAS,CAAC,MAAM,EAAE,qBAAqB;IAsE7C,iBAAiB,gBAA0B;IAE3C,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;IAWtD,KAAK,CAAC,OAAO,EAAE,YAAY;IAEjC,SAAS,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO;IAI3C,kBAAkB,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;IAuBhE,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;CAsBjE"}
@@ -1,12 +1,14 @@
1
- import { Data_FuelCall } from '@sentio/protos';
1
+ import { Data_FuelCall, HandleInterval } from '@sentio/protos';
2
2
  import { FuelContractContext } from './context.js';
3
3
  import { Contract, JsonAbi } from 'fuels';
4
4
  import { FuelNetwork } from './network.js';
5
- import { FuelFetchConfig, FuelTransaction } from './transaction.js';
6
- import { CallHandler, FuelBaseProcessor, FuelLog } from './types.js';
5
+ import { FuelFetchConfig } from './transaction.js';
6
+ import { BlockHandler, CallHandler, FuelBaseProcessor, FuelBlock, FuelLog, FuelTransaction } from './types.js';
7
+ import { PromiseOrVoid } from '../core/index.js';
7
8
  export declare class FuelProcessor<TContract extends Contract> implements FuelBaseProcessor<FuelProcessorConfig> {
8
9
  readonly config: FuelProcessorConfig;
9
10
  callHandlers: CallHandler<Data_FuelCall>[];
11
+ blockHandlers: BlockHandler[];
10
12
  private provider;
11
13
  private contract;
12
14
  static bind(config: FuelProcessorConfig): FuelProcessor<any>;
@@ -16,6 +18,9 @@ export declare class FuelProcessor<TContract extends Contract> implements FuelBa
16
18
  onTransaction(handler: (transaction: FuelTransaction, ctx: FuelContractContext<TContract>) => void | Promise<void>, config?: FuelFetchConfig): this;
17
19
  private onCall;
18
20
  onLog<T>(logIdFilter: string | string[], handler: (logs: FuelLog<T>, ctx: FuelContractContext<TContract>) => void | Promise<void>): this;
21
+ onInterval(handler: (block: FuelBlock, ctx: FuelContractContext<TContract>) => PromiseOrVoid, timeInterval: HandleInterval | undefined, blockInterval: HandleInterval | undefined): this;
22
+ onBlockInterval(handler: (block: FuelBlock, ctx: FuelContractContext<TContract>) => PromiseOrVoid, blockInterval?: number, backfillBlockInterval?: number): this;
23
+ onTimeInterval(handler: (block: FuelBlock, ctx: FuelContractContext<TContract>) => PromiseOrVoid, timeIntervalInMinutes?: number, backfillTimeIntervalInMinutes?: number): this;
19
24
  }
20
25
  export type FuelProcessorConfig = {
21
26
  address: string;
@@ -1 +1 @@
1
- {"version":3,"file":"fuel-processor.d.ts","sourceRoot":"","sources":["../../src/fuel/fuel-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAiC,MAAM,gBAAgB,CAAA;AAC7E,OAAO,EAAyB,mBAAmB,EAAE,MAAM,cAAc,CAAA;AACzE,OAAO,EAAM,QAAQ,EAAa,OAAO,EAAY,MAAM,OAAO,CAAA;AAClE,OAAO,EAAE,WAAW,EAAkB,MAAM,cAAc,CAAA;AAC1D,OAAO,EAGL,eAAe,EACf,eAAe,EAChB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,OAAO,EAAsB,MAAM,YAAY,CAAA;AAGxF,qBAAa,aAAa,CAAC,SAAS,SAAS,QAAQ,CAAE,YAAW,iBAAiB,CAAC,mBAAmB,CAAC;IAY1F,QAAQ,CAAC,MAAM,EAAE,mBAAmB;IAXhD,YAAY,EAAE,WAAW,CAAC,aAAa,CAAC,EAAE,CAAK;IAE/C,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,QAAQ,CAAW;IAE3B,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,mBAAmB,GAAG,aAAa,CAAC,GAAG,CAAC;gBAMvC,MAAM,EAAE,mBAAmB;IAEhD,cAAc,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,SAAS;IAgBR,aAAa,CAClB,OAAO,EAAE,CAAC,WAAW,EAAE,eAAe,EAAE,GAAG,EAAE,mBAAmB,CAAC,SAAS,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EACpG,MAAM,GAAE,eAA2C;IA+BrD,OAAO,CAAC,MAAM;IA0EP,KAAK,CAAC,CAAC,EACZ,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,EAC9B,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,mBAAmB,CAAC,SAAS,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAiD3F;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,WAAW,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,GAAG,EAAE,OAAO,CAAA;CACb,CAAA"}
1
+ {"version":3,"file":"fuel-processor.d.ts","sourceRoot":"","sources":["../../src/fuel/fuel-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,aAAa,EAAkB,cAAc,EAAiB,MAAM,gBAAgB,CAAA;AAC7G,OAAO,EAAyB,mBAAmB,EAAE,MAAM,cAAc,CAAA;AACzE,OAAO,EAAM,QAAQ,EAAa,OAAO,EAAY,MAAM,OAAO,CAAA;AAClE,OAAO,EAAE,WAAW,EAAkB,MAAM,cAAc,CAAA;AAC1D,OAAO,EAA2D,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAC3G,OAAO,EACL,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,SAAS,EACT,OAAO,EAEP,eAAe,EAChB,MAAM,YAAY,CAAA;AAEnB,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAGhD,qBAAa,aAAa,CAAC,SAAS,SAAS,QAAQ,CAAE,YAAW,iBAAiB,CAAC,mBAAmB,CAAC;IAa1F,QAAQ,CAAC,MAAM,EAAE,mBAAmB;IAZhD,YAAY,EAAE,WAAW,CAAC,aAAa,CAAC,EAAE,CAAK;IAC/C,aAAa,EAAE,YAAY,EAAE,CAAK;IAElC,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,QAAQ,CAAW;IAE3B,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,mBAAmB,GAAG,aAAa,CAAC,GAAG,CAAC;gBAMvC,MAAM,EAAE,mBAAmB;IAEhD,cAAc,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,SAAS;IAgBR,aAAa,CAClB,OAAO,EAAE,CAAC,WAAW,EAAE,eAAe,EAAE,GAAG,EAAE,mBAAmB,CAAC,SAAS,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EACpG,MAAM,GAAE,eAA2C;IAgCrD,OAAO,CAAC,MAAM;IA2EP,KAAK,CAAC,CAAC,EACZ,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,EAC9B,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,mBAAmB,CAAC,SAAS,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAmDnF,UAAU,CACf,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,mBAAmB,CAAC,SAAS,CAAC,KAAK,aAAa,EACjF,YAAY,EAAE,cAAc,GAAG,SAAS,EACxC,aAAa,EAAE,cAAc,GAAG,SAAS,GAExC,IAAI;IAiDA,eAAe,CACpB,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,mBAAmB,CAAC,SAAS,CAAC,KAAK,aAAa,EACjF,aAAa,SAAM,EACnB,qBAAqB,SAAO,GAE3B,IAAI;IAYA,cAAc,CACnB,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,mBAAmB,CAAC,SAAS,CAAC,KAAK,aAAa,EACjF,qBAAqB,SAAK,EAC1B,6BAA6B,SAAM,GAElC,IAAI;CAQR;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,WAAW,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,GAAG,EAAE,OAAO,CAAA;CACb,CAAA"}
@@ -1,12 +1,13 @@
1
- import { CallHandler, FuelBaseProcessor } from './types.js';
1
+ import { CallHandler, FuelBaseProcessor, FuelTransaction } from './types.js';
2
2
  import { Data_FuelCall } from '@sentio/protos';
3
- import { FuelFetchConfig, FuelTransaction } from './transaction.js';
3
+ import { FuelFetchConfig } from './transaction.js';
4
4
  import { FuelContext } from './context.js';
5
5
  import { FuelProcessorConfig } from './fuel-processor.js';
6
6
  type GlobalFuelProcessorConfig = Omit<FuelProcessorConfig, 'address' | 'abi'>;
7
7
  export declare class FuelGlobalProcessor implements FuelBaseProcessor<GlobalFuelProcessorConfig> {
8
8
  readonly config: GlobalFuelProcessorConfig;
9
9
  callHandlers: CallHandler<Data_FuelCall>[];
10
+ blockHandlers: never[];
10
11
  private provider;
11
12
  static bind(config: GlobalFuelProcessorConfig): FuelGlobalProcessor;
12
13
  constructor(config: GlobalFuelProcessorConfig);
@@ -1 +1 @@
1
- {"version":3,"file":"global-processor.d.ts","sourceRoot":"","sources":["../../src/fuel/global-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAsB,MAAM,YAAY,CAAA;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAG9C,OAAO,EAAoD,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACrH,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAGzD,KAAK,yBAAyB,GAAG,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,KAAK,CAAC,CAAA;AAE7E,qBAAa,mBAAoB,YAAW,iBAAiB,CAAC,yBAAyB,CAAC;IAW1E,QAAQ,CAAC,MAAM,EAAE,yBAAyB;IAVtD,YAAY,EAAE,WAAW,CAAC,aAAa,CAAC,EAAE,CAAK;IAE/C,OAAO,CAAC,QAAQ,CAAU;IAE1B,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,yBAAyB,GAAG,mBAAmB;gBAM9C,MAAM,EAAE,yBAAyB;IAEhD,SAAS;IAKR,aAAa,CAClB,OAAO,EAAE,CAAC,WAAW,EAAE,eAAe,EAAE,GAAG,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EACjF,MAAM,GAAE,eAA2C;CAuBtD"}
1
+ {"version":3,"file":"global-processor.d.ts","sourceRoot":"","sources":["../../src/fuel/global-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAsB,eAAe,EAAE,MAAM,YAAY,CAAA;AAChG,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAG9C,OAAO,EAAoD,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAGzD,KAAK,yBAAyB,GAAG,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,KAAK,CAAC,CAAA;AAE7E,qBAAa,mBAAoB,YAAW,iBAAiB,CAAC,yBAAyB,CAAC;IAY1E,QAAQ,CAAC,MAAM,EAAE,yBAAyB;IAXtD,YAAY,EAAE,WAAW,CAAC,aAAa,CAAC,EAAE,CAAK;IAC/C,aAAa,UAAK;IAElB,OAAO,CAAC,QAAQ,CAAU;IAE1B,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,yBAAyB,GAAG,mBAAmB;gBAM9C,MAAM,EAAE,yBAAyB;IAEhD,SAAS;IAKR,aAAa,CAClB,OAAO,EAAE,CAAC,WAAW,EAAE,eAAe,EAAE,GAAG,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EACjF,MAAM,GAAE,eAA2C;CA6BtD"}
package/lib/fuel/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"../chunk-O3IGCLZM.js";import"../chunk-7H2MCYRO.js";import"../chunk-TO35Z22E.js";import"../chunk-SBU7XQ42.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-K6FJLTBX.js";import"../chunk-GQE2JYJW.js";import"../chunk-DJQ5RDDN.js";import"../chunk-FC546GTB.js";import"../chunk-LLHU72AA.js";export{g as DEFAULT_FUEL_FETCH_CONFIG,n as FuelAbstractProcessor,j as FuelAssetProcessor,d as FuelCall,e as FuelContext,f as FuelContractContext,l as FuelGlobalProcessor,b as FuelNetwork,m as FuelPlugin,k as FuelProcessor,a as FuelProcessorState,o as TypedCall,h as decodeFuelTransaction,i as decodeFuelTransactionWithAbi,c as getRpcEndpoint};
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"../chunk-HZPD32NX.js";import"../chunk-7H2MCYRO.js";import"../chunk-4XDWWAOR.js";import"../chunk-5ZKQRZMR.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-K6FJLTBX.js";import"../chunk-GQE2JYJW.js";import"../chunk-DJQ5RDDN.js";import"../chunk-FC546GTB.js";import"../chunk-LLHU72AA.js";export{g as DEFAULT_FUEL_FETCH_CONFIG,n as FuelAbstractProcessor,j as FuelAssetProcessor,d as FuelCall,e as FuelContext,f as FuelContractContext,l as FuelGlobalProcessor,b as FuelNetwork,m as FuelPlugin,k as FuelProcessor,a as FuelProcessorState,o as TypedCall,h as decodeFuelTransaction,i as decodeFuelTransactionWithAbi,c as getRpcEndpoint};
3
3
  //# sourceMappingURL=index.js.map
@@ -1,14 +1,9 @@
1
- import { AbiMap, Provider, TransactionSummary } from 'fuels';
2
- import { FuelLog } from './types.js';
1
+ import { AbiMap, Provider } from 'fuels';
2
+ import { FuelTransaction } from './types.js';
3
3
  export type FuelFetchConfig = {
4
4
  includeFailed?: boolean;
5
5
  };
6
6
  export declare const DEFAULT_FUEL_FETCH_CONFIG: FuelFetchConfig;
7
- export type FuelTransaction = TransactionSummary & {
8
- blockNumber?: string;
9
- logs?: FuelLog<any>[];
10
- sender?: string;
11
- };
12
7
  export declare function decodeFuelTransaction(gqlTransaction: any, provider: Provider): FuelTransaction;
13
8
  export declare function decodeFuelTransactionWithAbi(gqlTransaction: any, abiMap: AbiMap, provider: Provider): Promise<FuelTransaction>;
14
9
  //# sourceMappingURL=transaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../src/fuel/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EASN,QAAQ,EAIR,kBAAkB,EACnB,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEpC,MAAM,MAAM,eAAe,GAAG;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,yBAAyB,EAAE,eAEvC,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,kBAAkB,GAAG;IACjD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAA;IACrB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAWD,wBAAgB,qBAAqB,CAAC,cAAc,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,GAAG,eAAe,CA+B9F;AAED,wBAAsB,4BAA4B,CAChD,cAAc,EAAE,GAAG,EACnB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,eAAe,CAAC,CAgE1B"}
1
+ {"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../src/fuel/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EASN,QAAQ,EAIT,MAAM,OAAO,CAAA;AACd,OAAO,EAAW,eAAe,EAAE,MAAM,YAAY,CAAA;AAErD,MAAM,MAAM,eAAe,GAAG;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,yBAAyB,EAAE,eAEvC,CAAA;AAWD,wBAAgB,qBAAqB,CAAC,cAAc,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,GAAG,eAAe,CA+B9F;AAED,wBAAsB,4BAA4B,CAChD,cAAc,EAAE,GAAG,EACnB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,eAAe,CAAC,CAgE1B"}
@@ -1,9 +1,11 @@
1
1
  import { ListStateStorage } from '@sentio/runtime';
2
- import { Data_FuelCall, FuelAssetHandlerConfig, FuelCallHandlerConfig, ProcessResult } from '@sentio/protos';
2
+ import { Data_FuelBlock, Data_FuelCall, FuelAssetHandlerConfig, FuelCallHandlerConfig, HandleInterval, OnIntervalConfig, ProcessResult } from '@sentio/protos';
3
+ import { Block, TransactionSummary } from 'fuels';
3
4
  export interface FuelBaseProcessor<T> {
4
5
  configure(): Promise<void>;
5
6
  config: T;
6
7
  callHandlers: CallHandler<Data_FuelCall>[];
8
+ blockHandlers: BlockHandler[];
7
9
  }
8
10
  export declare class FuelProcessorState extends ListStateStorage<FuelBaseProcessor<any>> {
9
11
  static INSTANCE: FuelProcessorState;
@@ -16,9 +18,21 @@ export type CallHandler<T> = {
16
18
  logIds: string[];
17
19
  };
18
20
  };
21
+ export type BlockHandler = {
22
+ blockInterval?: HandleInterval;
23
+ timeIntervalInMinutes?: HandleInterval;
24
+ handler: (block: Data_FuelBlock) => Promise<ProcessResult>;
25
+ fetchConfig?: Partial<OnIntervalConfig>;
26
+ };
19
27
  export interface FuelLog<T> {
20
28
  logId: string;
21
29
  data: T;
22
30
  receiptIndex: number;
23
31
  }
32
+ export type FuelTransaction = TransactionSummary & {
33
+ blockNumber?: string;
34
+ logs?: FuelLog<any>[];
35
+ sender?: string;
36
+ };
37
+ export type FuelBlock = Omit<Block, 'transactionIds'>;
24
38
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/fuel/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAE5G,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,MAAM,EAAE,CAAC,CAAA;IACT,YAAY,EAAE,WAAW,CAAC,aAAa,CAAC,EAAE,CAAA;CAC3C;AAED,qBAAa,kBAAmB,SAAQ,gBAAgB,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAC9E,MAAM,CAAC,QAAQ,qBAA2B;CAC3C;AAED,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;IAC3B,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,aAAa,CAAC,CAAA;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAA;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAA;IAC7C,SAAS,CAAC,EAAE;QACV,MAAM,EAAE,MAAM,EAAE,CAAA;KACjB,CAAA;CACF,CAAA;AAED,MAAM,WAAW,OAAO,CAAC,CAAC;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,CAAC,CAAA;IACP,YAAY,EAAE,MAAM,CAAA;CACrB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/fuel/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EACL,cAAc,EACd,aAAa,EACb,sBAAsB,EACtB,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,aAAa,EACd,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAEjD,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,MAAM,EAAE,CAAC,CAAA;IACT,YAAY,EAAE,WAAW,CAAC,aAAa,CAAC,EAAE,CAAA;IAC1C,aAAa,EAAE,YAAY,EAAE,CAAA;CAC9B;AAED,qBAAa,kBAAmB,SAAQ,gBAAgB,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAC9E,MAAM,CAAC,QAAQ,qBAA2B;CAC3C;AAED,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;IAC3B,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,aAAa,CAAC,CAAA;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAA;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAA;IAC7C,SAAS,CAAC,EAAE;QACV,MAAM,EAAE,MAAM,EAAE,CAAA;KACjB,CAAA;CACF,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,aAAa,CAAC,EAAE,cAAc,CAAA;IAC9B,qBAAqB,CAAC,EAAE,cAAc,CAAA;IACtC,OAAO,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,OAAO,CAAC,aAAa,CAAC,CAAA;IAC1D,WAAW,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;CACxC,CAAA;AAED,MAAM,WAAW,OAAO,CAAC,CAAC;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,CAAC,CAAA;IACP,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,MAAM,eAAe,GAAG,kBAAkB,GAAG;IACjD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAA;IACrB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAA"}
package/lib/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import"./chunk-PE6MZT4O.js";import{$ as Z,$a as Za,A as y,Aa as ya,Ab as yb,Ac as Xb,B as z,Ba as za,Bb as zb,Bc as Yb,C as A,Ca as Aa,Cb as Ab,Cc as Zb,D as B,Da as Ba,Db as Bb,Dc as _b,E as C,Ea as Ca,Eb as Cb,Ec as $b,F as D,Fa as Da,Fb as Db,Fc as ac,G as E,Ga as Ea,Gb as Eb,Gc as bc,H as F,Ha as Fa,Hb as Fb,Hc as cc,I as G,Ia as Ga,Ib as Gb,J as H,Ja as Ha,Jb as Hb,K as I,Ka as Ia,Kb as Ib,L as J,La as Ja,Lb as Jb,M as K,Ma as Ka,Mb as Kb,N as L,Na as La,Nb as Lb,O as M,Oa as Ma,Ob as Mb,P as N,Pa as Na,Pb as Nb,Q as O,Qa as Oa,R as P,Ra as Pa,S as Q,Sa as Qa,T as R,Ta as Ra,U as S,Ua as Sa,V as T,Va as Ta,W as U,Wa as Ua,X as V,Xa as Va,Y as W,Ya as Wa,Z as X,Za as Xa,_ as Y,_a as Ya,aa as _,ab as _a,ba as $,bb as $a,c as a,ca as aa,cb as ab,d as b,da as ba,db as bb,e as c,ea as ca,eb as cb,f as d,fa as da,fb as db,fd as dc,g as e,ga as ea,gb as eb,gd as ec,h as f,ha as fa,hb as fb,hd as fc,i as g,ia as ga,ib as gb,id as gc,j as h,ja as ha,jb as hb,jd as hc,k as i,ka as ia,kb as ib,l as j,la as ja,lb as jb,ld as ic,m as k,ma as ka,mb as kb,n as l,na as la,nb as lb,o as m,oa as ma,ob as mb,p as n,pa as na,pb as nb,q as o,qa as oa,qb as ob,r as p,ra as pa,rb as pb,s as q,sa as qa,sb as qb,sc as Pb,t as r,ta as ra,tb as rb,tc as Qb,u as s,ua as sa,ub as sb,uc as Rb,v as t,va as ta,vb as tb,vc as Sb,w as u,wa as ua,wb as ub,wc as Tb,x as v,xa as va,xb as vb,xc as Ub,y as w,ya as wa,yb as wb,yc as Vb,z as x,za as xa,zb as xb,zc as Wb}from"./chunk-TO35Z22E.js";import"./chunk-SBU7XQ42.js";import"./chunk-PLLN42GP.js";import"./chunk-NMFPLO65.js";import"./chunk-K6FJLTBX.js";import"./chunk-GQE2JYJW.js";import"./chunk-DJQ5RDDN.js";import{a as Ob}from"./chunk-FC546GTB.js";import"./chunk-LLHU72AA.js";export{da as AccountConfig,hc as AccountEventTracker,y as AddressType,ca as AggregationConfig,s as AggregationType,ga as AptosOnIntervalConfig,Ha as BTCTransactionFilter,Ia as BTCTransactionFilter_Condition,Ja as BTCTransactionFilter_Filter,Ka as BTCTransactionFilter_Filter_ConditionsEntry,La as BTCTransactionFilter_Filters,Na as BTCTransactionFilter_VOutFilter,Ma as BTCTransactionFilter_VinFilter,Ga as BTCTransactionHandlerConfig,dc as BaseContext,Ub as BasicFieldType,Ob as BigDecimal,o as BigInteger,la as BlockHandlerConfig,k as CoinID,U as ContractConfig,ia as ContractInfo,ic as CorePlugin,ta as CosmosLogHandlerConfig,_b as Counter,$b as CounterBinding,Kb as CounterResult,ab as DBRequest,eb as DBRequest_DBDelete,fb as DBRequest_DBFilter,bb as DBRequest_DBGet,cb as DBRequest_DBList,N as DBRequest_DBOperator,db as DBRequest_DBUpsert,Za as DBResponse,gb as Data,V as DataBaseSchema,xb as DataBinding,nb as Data_AptCall,mb as Data_AptEvent,ob as Data_AptResource,wb as Data_BTCTransaction,ub as Data_CosmosCall,ib as Data_EthBlock,hb as Data_EthLog,kb as Data_EthTrace,jb as Data_EthTransaction,tb as Data_FuelCall,lb as Data_SolInstruction,vb as Data_StarknetEvent,qb as Data_SuiCall,pb as Data_SuiEvent,rb as Data_SuiObject,sb as Data_SuiObjectChange,Rb as DatabaseSchema,a as Empty,_a as Entity,$a as EntityList,Bb as EthCallContext,Ab as EthCallParam,ma as EthFetchConfig,$ as EventLogConfig,K as EventLogConfig_BasicFieldType,ba as EventLogConfig_Field,aa as EventLogConfig_StructFieldType,Wb as EventLogger,Tb as EventLoggerBinding,Sb as EventLoggerState,gc as EventTracker,fc as EventTrackerState,Y as EventTrackingConfig,Lb as EventTrackingResult,R as ExecutionConfig,Z as ExportConfig,Mb as ExportResult,ec as Exporter,qa as FuelAssetHandlerConfig,ra as FuelAssetHandlerConfig_AssetFilter,Pa as FuelCallFilter,Qa as FuelCallHandlerConfig,sa as FuelLogHandlerConfig,ac as Gauge,bc as GaugeBinding,Jb as GaugeResult,ea as HandleInterval,B as HandlerType,va as InstructionHandlerConfig,h as ListValue,ua as LogFilter,pa as LogHandlerConfig,E as LogLevel,cc as Meter,_ as MetricConfig,Zb as MetricOptions,p as MetricType,Hb as MetricValue,ya as MoveAccountFetchConfig,Da as MoveCallFilter,Ea as MoveCallFilter_FromAndToAddress,Ba as MoveCallHandlerConfig,Aa as MoveEventFilter,za as MoveEventHandlerConfig,xa as MoveFetchConfig,ha as MoveOnIntervalConfig,v as MoveOwnerType,Ca as MoveResourceChangeConfig,b as NullValue,fa as OnIntervalConfig,Db as PreparedData,Eb as PreparedData_EthCallResultsEntry,Cb as PreprocessResult,Wa as PreprocessStreamRequest,Xa as PreprocessStreamRequest_DataBindings,Ya as PreprocessStreamResponse,Ta as ProcessBindingResponse,Sa as ProcessBindingsRequest,S as ProcessConfigRequest,T as ProcessConfigResponse,zb as ProcessResult,Ua as ProcessStreamRequest,Va as ProcessStreamResponse,Nb as ProcessorDefinition,Q as ProjectConfig,Fb as RecordMetaData,Gb as RecordMetaData_LabelsEntry,wa as ResourceConfig,X as RetentionConfig,m as RichStruct,n as RichStructList,l as RichValue,j as RichValue_NullValue,Ib as RuntimeInfo,Oa as StarknetEventFilter,Fa as StarknetEventHandlerConfig,ka as StartRequest,yb as StateResult,e as Struct,f as Struct_FieldsEntry,ja as TemplateInstance,i as Timestamp,Ra as Topic,W as TotalPerEntityAggregation,H as TotalPerEntityAggregation_Type,na as TraceHandlerConfig,oa as TransactionHandlerConfig,g as Value,z as addressTypeFromJSON,A as addressTypeToJSON,t as aggregationTypeFromJSON,u as aggregationTypeToJSON,O as dBRequest_DBOperatorFromJSON,P as dBRequest_DBOperatorToJSON,L as eventLogConfig_BasicFieldTypeFromJSON,M as eventLogConfig_BasicFieldTypeToJSON,Vb as fieldsToProtos,C as handlerTypeFromJSON,D as handlerTypeToJSON,F as logLevelFromJSON,G as logLevelToJSON,q as metricTypeFromJSON,r as metricTypeToJSON,w as moveOwnerTypeFromJSON,x as moveOwnerTypeToJSON,Qb as normalizeLabels,c as nullValueFromJSON,d as nullValueToJSON,Pb as scaleDown,Yb as toBigInteger,Xb as toMetricValue,I as totalPerEntityAggregation_TypeFromJSON,J as totalPerEntityAggregation_TypeToJSON};
2
+ import"./chunk-PE6MZT4O.js";import{$ as Z,$a as Za,A as y,Aa as ya,Ab as yb,Ac as Xb,B as z,Ba as za,Bb as zb,Bc as Yb,C as A,Ca as Aa,Cb as Ab,Cc as Zb,D as B,Da as Ba,Db as Bb,Dc as _b,E as C,Ea as Ca,Eb as Cb,Ec as $b,F as D,Fa as Da,Fb as Db,Fc as ac,G as E,Ga as Ea,Gb as Eb,Gc as bc,H as F,Ha as Fa,Hb as Fb,Hc as cc,I as G,Ia as Ga,Ib as Gb,Ic as dc,J as H,Ja as Ha,Jb as Hb,K as I,Ka as Ia,Kb as Ib,L as J,La as Ja,Lb as Jb,M as K,Ma as Ka,Mb as Kb,N as L,Na as La,Nb as Lb,O as M,Oa as Ma,Ob as Mb,P as N,Pa as Na,Pb as Nb,Q as O,Qa as Oa,Qb as Ob,R as P,Ra as Pa,S as Q,Sa as Qa,T as R,Ta as Ra,U as S,Ua as Sa,V as T,Va as Ta,W as U,Wa as Ua,X as V,Xa as Va,Y as W,Ya as Wa,Z as X,Za as Xa,_ as Y,_a as Ya,aa as _,ab as _a,ba as $,bb as $a,c as a,ca as aa,cb as ab,d as b,da as ba,db as bb,e as c,ea as ca,eb as cb,f as d,fa as da,fb as db,g as e,ga as ea,gb as eb,gd as ec,h as f,ha as fa,hb as fb,hd as fc,i as g,ia as ga,ib as gb,id as gc,j as h,ja as ha,jb as hb,jd as hc,k as i,ka as ia,kb as ib,kd as ic,l as j,la as ja,lb as jb,m as k,ma as ka,mb as kb,md as jc,n as l,na as la,nb as lb,o as m,oa as ma,ob as mb,p as n,pa as na,pb as nb,q as o,qa as oa,qb as ob,r as p,ra as pa,rb as pb,s as q,sa as qa,sb as qb,t as r,ta as ra,tb as rb,tc as Qb,u as s,ua as sa,ub as sb,uc as Rb,v as t,va as ta,vb as tb,vc as Sb,w as u,wa as ua,wb as ub,wc as Tb,x as v,xa as va,xb as vb,xc as Ub,y as w,ya as wa,yb as wb,yc as Vb,z as x,za as xa,zb as xb,zc as Wb}from"./chunk-4XDWWAOR.js";import"./chunk-5ZKQRZMR.js";import"./chunk-PLLN42GP.js";import"./chunk-NMFPLO65.js";import"./chunk-K6FJLTBX.js";import"./chunk-GQE2JYJW.js";import"./chunk-DJQ5RDDN.js";import{a as Pb}from"./chunk-FC546GTB.js";import"./chunk-LLHU72AA.js";export{da as AccountConfig,ic as AccountEventTracker,y as AddressType,ca as AggregationConfig,s as AggregationType,ga as AptosOnIntervalConfig,Ha as BTCTransactionFilter,Ia as BTCTransactionFilter_Condition,Ja as BTCTransactionFilter_Filter,Ka as BTCTransactionFilter_Filter_ConditionsEntry,La as BTCTransactionFilter_Filters,Na as BTCTransactionFilter_VOutFilter,Ma as BTCTransactionFilter_VinFilter,Ga as BTCTransactionHandlerConfig,ec as BaseContext,Vb as BasicFieldType,Pb as BigDecimal,o as BigInteger,la as BlockHandlerConfig,k as CoinID,U as ContractConfig,ia as ContractInfo,jc as CorePlugin,ta as CosmosLogHandlerConfig,$b as Counter,ac as CounterBinding,Lb as CounterResult,ab as DBRequest,eb as DBRequest_DBDelete,fb as DBRequest_DBFilter,bb as DBRequest_DBGet,cb as DBRequest_DBList,N as DBRequest_DBOperator,db as DBRequest_DBUpsert,Za as DBResponse,gb as Data,V as DataBaseSchema,yb as DataBinding,nb as Data_AptCall,mb as Data_AptEvent,ob as Data_AptResource,xb as Data_BTCTransaction,vb as Data_CosmosCall,ib as Data_EthBlock,hb as Data_EthLog,kb as Data_EthTrace,jb as Data_EthTransaction,ub as Data_FuelBlock,tb as Data_FuelCall,lb as Data_SolInstruction,wb as Data_StarknetEvent,qb as Data_SuiCall,pb as Data_SuiEvent,rb as Data_SuiObject,sb as Data_SuiObjectChange,Sb as DatabaseSchema,a as Empty,_a as Entity,$a as EntityList,Cb as EthCallContext,Bb as EthCallParam,ma as EthFetchConfig,$ as EventLogConfig,K as EventLogConfig_BasicFieldType,ba as EventLogConfig_Field,aa as EventLogConfig_StructFieldType,Xb as EventLogger,Ub as EventLoggerBinding,Tb as EventLoggerState,hc as EventTracker,gc as EventTrackerState,Y as EventTrackingConfig,Mb as EventTrackingResult,R as ExecutionConfig,Z as ExportConfig,Nb as ExportResult,fc as Exporter,qa as FuelAssetHandlerConfig,ra as FuelAssetHandlerConfig_AssetFilter,Pa as FuelCallFilter,Qa as FuelCallHandlerConfig,sa as FuelLogHandlerConfig,bc as Gauge,cc as GaugeBinding,Kb as GaugeResult,ea as HandleInterval,B as HandlerType,va as InstructionHandlerConfig,h as ListValue,ua as LogFilter,pa as LogHandlerConfig,E as LogLevel,dc as Meter,_ as MetricConfig,_b as MetricOptions,p as MetricType,Ib as MetricValue,ya as MoveAccountFetchConfig,Da as MoveCallFilter,Ea as MoveCallFilter_FromAndToAddress,Ba as MoveCallHandlerConfig,Aa as MoveEventFilter,za as MoveEventHandlerConfig,xa as MoveFetchConfig,ha as MoveOnIntervalConfig,v as MoveOwnerType,Ca as MoveResourceChangeConfig,b as NullValue,fa as OnIntervalConfig,Eb as PreparedData,Fb as PreparedData_EthCallResultsEntry,Db as PreprocessResult,Wa as PreprocessStreamRequest,Xa as PreprocessStreamRequest_DataBindings,Ya as PreprocessStreamResponse,Ta as ProcessBindingResponse,Sa as ProcessBindingsRequest,S as ProcessConfigRequest,T as ProcessConfigResponse,Ab as ProcessResult,Ua as ProcessStreamRequest,Va as ProcessStreamResponse,Ob as ProcessorDefinition,Q as ProjectConfig,Gb as RecordMetaData,Hb as RecordMetaData_LabelsEntry,wa as ResourceConfig,X as RetentionConfig,m as RichStruct,n as RichStructList,l as RichValue,j as RichValue_NullValue,Jb as RuntimeInfo,Oa as StarknetEventFilter,Fa as StarknetEventHandlerConfig,ka as StartRequest,zb as StateResult,e as Struct,f as Struct_FieldsEntry,ja as TemplateInstance,i as Timestamp,Ra as Topic,W as TotalPerEntityAggregation,H as TotalPerEntityAggregation_Type,na as TraceHandlerConfig,oa as TransactionHandlerConfig,g as Value,z as addressTypeFromJSON,A as addressTypeToJSON,t as aggregationTypeFromJSON,u as aggregationTypeToJSON,O as dBRequest_DBOperatorFromJSON,P as dBRequest_DBOperatorToJSON,L as eventLogConfig_BasicFieldTypeFromJSON,M as eventLogConfig_BasicFieldTypeToJSON,Wb as fieldsToProtos,C as handlerTypeFromJSON,D as handlerTypeToJSON,F as logLevelFromJSON,G as logLevelToJSON,q as metricTypeFromJSON,r as metricTypeToJSON,w as moveOwnerTypeFromJSON,x as moveOwnerTypeToJSON,Rb as normalizeLabels,c as nullValueFromJSON,d as nullValueToJSON,Qb as scaleDown,Zb as toBigInteger,Yb as toMetricValue,I as totalPerEntityAggregation_TypeFromJSON,J as totalPerEntityAggregation_TypeToJSON};
3
3
  //# sourceMappingURL=index.js.map
package/lib/move/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{a as A,b as B,c as C,d as D,e as E}from"../chunk-ZIGQO7R5.js";import{a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j,j as k,k as l,l as m,m as n,n as o,o as p,p as q,q as r,r as s,s as t,t as u,u as v,v as w,w as x,x as y,y as z}from"../chunk-4TVQXTHY.js";import{za as a}from"../chunk-TO35Z22E.js";import"../chunk-SBU7XQ42.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-K6FJLTBX.js";import"../chunk-GQE2JYJW.js";import"../chunk-DJQ5RDDN.js";import"../chunk-FC546GTB.js";import"../chunk-LLHU72AA.js";export{p as ANY_TYPE,w as AbstractCodegen,y as AbstractMoveCoder,x as AccountCodegen,t as AccountModulesImportInfo,u as AccountRegister,r as BUILTIN_TYPES,B as CallHandler,v as ChainAdapter,A as EventHandler,z as InternalMoveFunctionVisibility,E as MoveAccountContext,D as MoveContext,a as MoveFetchConfig,C as ObjectChangeHandler,b as SPLITTER,n as TypeDescriptor,c as VECTOR_STR,g as accountAddressString,e as accountTypeString,m as camel,d as isFrameworkAccount,f as isValidMoveAddress,s as matchType,j as moduleQname,i as moduleQnameForType,h as normalizeToJSName,o as parseMoveType,k as structQname,l as upperFirst,q as vectorType};
2
+ import{a as A,b as B,c as C,d as D,e as E}from"../chunk-MZ2FIAD2.js";import{a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j,j as k,k as l,l as m,m as n,n as o,o as p,p as q,q as r,r as s,s as t,t as u,u as v,v as w,w as x,x as y,y as z}from"../chunk-4TVQXTHY.js";import{za as a}from"../chunk-4XDWWAOR.js";import"../chunk-5ZKQRZMR.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-K6FJLTBX.js";import"../chunk-GQE2JYJW.js";import"../chunk-DJQ5RDDN.js";import"../chunk-FC546GTB.js";import"../chunk-LLHU72AA.js";export{p as ANY_TYPE,w as AbstractCodegen,y as AbstractMoveCoder,x as AccountCodegen,t as AccountModulesImportInfo,u as AccountRegister,r as BUILTIN_TYPES,B as CallHandler,v as ChainAdapter,A as EventHandler,z as InternalMoveFunctionVisibility,E as MoveAccountContext,D as MoveContext,a as MoveFetchConfig,C as ObjectChangeHandler,b as SPLITTER,n as TypeDescriptor,c as VECTOR_STR,g as accountAddressString,e as accountTypeString,m as camel,d as isFrameworkAccount,f as isValidMoveAddress,s as matchType,j as moduleQname,i as moduleQnameForType,h as normalizeToJSName,o as parseMoveType,k as structQname,l as upperFirst,q as vectorType};
3
3
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{c as e}from"../../chunk-7BEMS4NV.js";import"../../chunk-DEW7KMCM.js";import"../../chunk-SSMP6EWG.js";import"../../chunk-PE6MZT4O.js";import"../../chunk-7H2MCYRO.js";import"../../chunk-TO35Z22E.js";import"../../chunk-SBU7XQ42.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-K6FJLTBX.js";import"../../chunk-GQE2JYJW.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-FC546GTB.js";import"../../chunk-LLHU72AA.js";var i=class extends e{static bind(n){return n&&!n.name&&(n.name="SPL Token Program"),new i(n)}fromParsedInstruction=n=>n.type?{name:n.type,data:{...n.info}}:null;onInitializeMint(n){return this.onInstruction("initializeMint",(t,o)=>{t&&n(t.data,o)}),this}onInitializeAccount(n){return this.onInstruction("initializeAccount",(t,o)=>{t&&n(t.data,o)}),this}onInitializeAccount2(n){return this.onInstruction("initializeAccount2",(t,o)=>{t&&n(t.data,o)}),this}onInitializeAccount3(n){return this.onInstruction("initializeAccount3",(t,o)=>{t&&n(t.data,o)}),this}onInitializeMultisig(n){return this.onInstruction("initializeMultisig",(t,o)=>{t&&n(t.data,o)}),this}onTransfer(n){return this.onInstruction("transfer",(t,o)=>{t&&n(t.data,o)}),this}onApprovend(n){return this.onInstruction("approve",(t,o)=>{t&&n(t.data,o)}),this}onRevoke(n){return this.onInstruction("revoke",(t,o)=>{t&&n(t.data,o)}),this}onSetAuthority(n){return this.onInstruction("setAuthority",(t,o)=>{t&&n(t.data,o)}),this}onMintTo(n){return this.onInstruction("mintTo",(t,o)=>{t&&n(t.data,o)}),this}onBurn(n){return this.onInstruction("burn",(t,o)=>{t&&n(t.data,o)}),this}onCloseAccount(n){return this.onInstruction("closeAccount",(t,o)=>{t&&n(t.data,o)}),this}onFreezeAccount(n){return this.onInstruction("freezeAccount",(t,o)=>{t&&n(t.data,o)}),this}onThawAccount(n){return this.onInstruction("thawAccount",(t,o)=>{t&&n(t.data,o)}),this}onTransferChecked(n){return this.onInstruction("transferChecked",(t,o)=>{t&&n(t.data,o)}),this}onApproveChecked(n){return this.onInstruction("approveChecked",(t,o)=>{t&&n(t.data,o)}),this}onMintToChecked(n){return this.onInstruction("mintToChecked",(t,o)=>{t&&n(t.data,o)}),this}onBurnChecked(n){return this.onInstruction("burnChecked",(t,o)=>{t&&n(t.data,o)}),this}onSyncNative(n){return this.onInstruction("syncNative",(t,o)=>{t&&n(t.data,o)}),this}onGetAccountDataSize(n){return this.onInstruction("getAccountDataSize",(t,o)=>{t&&n(t.data,o)}),this}onInitializeImmutableOwner(n){return this.onInstruction("initializeImmutableOwner",(t,o)=>{t&&n(t.data,o)}),this}onAmountToUiAmount(n){return this.onInstruction("amountToUiAmount",(t,o)=>{t&&n(t.data,o)}),this}onUiAmountToAmount(n){return this.onInstruction("uiAmountToAmount",(t,o)=>{t&&n(t.data,o)}),this}onInitializeMintCloseAuthority(n){return this.onInstruction("initializeMintCloseAuthority",(t,o)=>{t&&n(t.data,o)}),this}onTransferFeeExtension(n){return this.onInstruction("transferFeeExtension",(t,o)=>{t&&n(t.data,o)}),this}onDefaultAccountStateExtension(n){return this.onInstruction("defaultAccountStateExtension",(t,o)=>{t&&n(t.data,o)}),this}onReallocate(n){return this.onInstruction("reallocate",(t,o)=>{t&&n(t.data,o)}),this}onMemoTransferExtension(n){return this.onInstruction("memoTransferExtension",(t,o)=>{t&&n(t.data,o)}),this}onCreateNativeMint(n){return this.onInstruction("createNativeMint",(t,o)=>{t&&n(t.data,o)}),this}};export{i as SPLTokenProcessor};
2
+ import{c as e}from"../../chunk-2DKKSB3Q.js";import"../../chunk-DEW7KMCM.js";import"../../chunk-SSMP6EWG.js";import"../../chunk-PE6MZT4O.js";import"../../chunk-7H2MCYRO.js";import"../../chunk-4XDWWAOR.js";import"../../chunk-5ZKQRZMR.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-K6FJLTBX.js";import"../../chunk-GQE2JYJW.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-FC546GTB.js";import"../../chunk-LLHU72AA.js";var i=class extends e{static bind(n){return n&&!n.name&&(n.name="SPL Token Program"),new i(n)}fromParsedInstruction=n=>n.type?{name:n.type,data:{...n.info}}:null;onInitializeMint(n){return this.onInstruction("initializeMint",(t,o)=>{t&&n(t.data,o)}),this}onInitializeAccount(n){return this.onInstruction("initializeAccount",(t,o)=>{t&&n(t.data,o)}),this}onInitializeAccount2(n){return this.onInstruction("initializeAccount2",(t,o)=>{t&&n(t.data,o)}),this}onInitializeAccount3(n){return this.onInstruction("initializeAccount3",(t,o)=>{t&&n(t.data,o)}),this}onInitializeMultisig(n){return this.onInstruction("initializeMultisig",(t,o)=>{t&&n(t.data,o)}),this}onTransfer(n){return this.onInstruction("transfer",(t,o)=>{t&&n(t.data,o)}),this}onApprovend(n){return this.onInstruction("approve",(t,o)=>{t&&n(t.data,o)}),this}onRevoke(n){return this.onInstruction("revoke",(t,o)=>{t&&n(t.data,o)}),this}onSetAuthority(n){return this.onInstruction("setAuthority",(t,o)=>{t&&n(t.data,o)}),this}onMintTo(n){return this.onInstruction("mintTo",(t,o)=>{t&&n(t.data,o)}),this}onBurn(n){return this.onInstruction("burn",(t,o)=>{t&&n(t.data,o)}),this}onCloseAccount(n){return this.onInstruction("closeAccount",(t,o)=>{t&&n(t.data,o)}),this}onFreezeAccount(n){return this.onInstruction("freezeAccount",(t,o)=>{t&&n(t.data,o)}),this}onThawAccount(n){return this.onInstruction("thawAccount",(t,o)=>{t&&n(t.data,o)}),this}onTransferChecked(n){return this.onInstruction("transferChecked",(t,o)=>{t&&n(t.data,o)}),this}onApproveChecked(n){return this.onInstruction("approveChecked",(t,o)=>{t&&n(t.data,o)}),this}onMintToChecked(n){return this.onInstruction("mintToChecked",(t,o)=>{t&&n(t.data,o)}),this}onBurnChecked(n){return this.onInstruction("burnChecked",(t,o)=>{t&&n(t.data,o)}),this}onSyncNative(n){return this.onInstruction("syncNative",(t,o)=>{t&&n(t.data,o)}),this}onGetAccountDataSize(n){return this.onInstruction("getAccountDataSize",(t,o)=>{t&&n(t.data,o)}),this}onInitializeImmutableOwner(n){return this.onInstruction("initializeImmutableOwner",(t,o)=>{t&&n(t.data,o)}),this}onAmountToUiAmount(n){return this.onInstruction("amountToUiAmount",(t,o)=>{t&&n(t.data,o)}),this}onUiAmountToAmount(n){return this.onInstruction("uiAmountToAmount",(t,o)=>{t&&n(t.data,o)}),this}onInitializeMintCloseAuthority(n){return this.onInstruction("initializeMintCloseAuthority",(t,o)=>{t&&n(t.data,o)}),this}onTransferFeeExtension(n){return this.onInstruction("transferFeeExtension",(t,o)=>{t&&n(t.data,o)}),this}onDefaultAccountStateExtension(n){return this.onInstruction("defaultAccountStateExtension",(t,o)=>{t&&n(t.data,o)}),this}onReallocate(n){return this.onInstruction("reallocate",(t,o)=>{t&&n(t.data,o)}),this}onMemoTransferExtension(n){return this.onInstruction("memoTransferExtension",(t,o)=>{t&&n(t.data,o)}),this}onCreateNativeMint(n){return this.onInstruction("createNativeMint",(t,o)=>{t&&n(t.data,o)}),this}};export{i as SPLTokenProcessor};
3
3
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{a,b,c,d,e,f}from"../chunk-7BEMS4NV.js";import"../chunk-DEW7KMCM.js";import"../chunk-SSMP6EWG.js";import"../chunk-PE6MZT4O.js";import"../chunk-7H2MCYRO.js";import"../chunk-TO35Z22E.js";import"../chunk-SBU7XQ42.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-K6FJLTBX.js";import"../chunk-GQE2JYJW.js";import"../chunk-DJQ5RDDN.js";import"../chunk-FC546GTB.js";import"../chunk-LLHU72AA.js";export{f as BorshInstructionCoder,c as SolanaBaseProcessor,e as SolanaBindOptions,a as SolanaContext,d as SolanaPlugin,b as SolanaProcessorState};
2
+ import{a,b,c,d,e,f}from"../chunk-2DKKSB3Q.js";import"../chunk-DEW7KMCM.js";import"../chunk-SSMP6EWG.js";import"../chunk-PE6MZT4O.js";import"../chunk-7H2MCYRO.js";import"../chunk-4XDWWAOR.js";import"../chunk-5ZKQRZMR.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-K6FJLTBX.js";import"../chunk-GQE2JYJW.js";import"../chunk-DJQ5RDDN.js";import"../chunk-FC546GTB.js";import"../chunk-LLHU72AA.js";export{f as BorshInstructionCoder,c as SolanaBaseProcessor,e as SolanaBindOptions,a as SolanaContext,d as SolanaPlugin,b as SolanaProcessorState};
3
3
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{a as E,b as d,c as V,d as B,e as S,f as L,g as F}from"../chunk-APX6ZQ7B.js";import"../chunk-DEW7KMCM.js";import"../chunk-3FX7DHPT.js";import{a as O}from"../chunk-7H2MCYRO.js";import{D as v,Lc as j,W as x,fd as _,kd as D,tc as H}from"../chunk-TO35Z22E.js";import"../chunk-SBU7XQ42.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-K6FJLTBX.js";import"../chunk-GQE2JYJW.js";import"../chunk-DJQ5RDDN.js";import"../chunk-FC546GTB.js";import{e as b,g as T}from"../chunk-LLHU72AA.js";import{errorString as Z,GLOBAL_CONFIG as $,mergeProcessResults as tt,Plugin as rt,PluginManager as et,USER_PROCESSOR as st}from"@sentio/runtime";var c=b(j(),1);var G=b(O(),1);var f=class{constructor(t,r,e,s){this.abi=t;this.address=r;this.provider=e;this.blockNumber=s;this._contract=new F(t,r,e);let n=new d(t);for(let a of n.abi)if(a.type=="function"&&a.state_mutability=="view"){let o=a.name;Object.defineProperty(this,o,{enumerable:!0,writable:!1,value:J(this,o)})}}_contract;call(t,r,e){return this._contract.call(t,r,{...e,blockIdentifier:this.blockNumber})}};function J(i,t){return async function(...r){let e=L(r);return i.call(t,e.args,{parseRequest:!0,parseResponse:!0,...e.options})}}var y=class extends _{constructor(r,e,s,n,a,o,u=-1,P="",N){super({});this.provider=r;this.contractAddress=e;this.chainId=s;this.blockNumber=n;this.blockHash=a;this.transactionHash=o;this.logIndex=u;this.contractName=P;this.abi=N}getMetaDataInternal(r,e){return{address:this.contractAddress,contractName:"",blockNumber:BigInt(this.blockNumber),transactionIndex:0,transactionHash:this.transactionHash,chainId:this.getChainId(),name:r,logIndex:this.logIndex,labels:H(e)}}getChainId(){return this.chainId}},g=class extends y{constructor(r,e,s,n,a,o,u){super(e,r.address,r.chainId,s,n,a,o,r.name??u.slice(0,8),r.abi);this.classHash=u}_contract;getContract(){if(!this.abi)throw new Error("abi not found");return this._contract||(this._contract=new f(this.abi,this.contractAddress,this.provider,this.blockNumber)),this._contract}};var h=class{constructor(t,r,e){this.caller=t;this.transactionHash=r;this.data=e}};import{ListStateStorage as Q,mergeProcessResults as X}from"@sentio/runtime";var p=class{constructor(t){this.config=t}callHandlers=[];provider;static bind(t){let r=new p(t);return l.INSTANCE.addValue(r),r}classHash;async configure(){this.provider=new B({nodeUrl:Y(this.config.chainId)});let t=await this.provider.getClassHashAt(this.config.address);if(!t)throw new Error("can't find the class hash defined at "+this.config.address);if(this.classHash=t,!this.config.abi){let r=await this.provider.getClass(t,"latest");this.config.abi=r.abi}}onEvent(t,r){let e=Array.isArray(t)?t:[t];if(!this.config.abi)throw new Error("abi not found");let s=this.config.abi,n={handler:async a=>{try{let o=[a.result],u=S.getAbiEvents(s),P=d.getAbiStruct(s),N=d.getAbiEnum(s),I=S.parseEvents(o,u,P,N),w=[],{block_hash:U,block_number:q,transaction_hash:A,from_address:z}=a.result;for(let m=0;m<I.length;m++){let R=new g(this.config,this.provider,q,U,A,m,this.classHash),K=new h(z,A,I[m]);try{await r(K,R)}catch(W){console.error(W)}w.push(R.stopAndGetResult())}return X(w)}catch(o){return console.error(o),{gauges:[],counters:[],events:[],exports:[],states:{configUpdated:!1}}}},eventFilter:e};return this.callHandlers.push(n),this}};function Y(i){switch(i){case G.StarknetChainId.STARKNET_MAINNET:return E.NetworkName.SN_MAIN;default:return E.NetworkName.SN_SEPOLIA}}var k=class extends Q{},l=k;T(l,"INSTANCE",new k);var M=class{constructor(t,r){this.abi=t;this.config=r;this.processor=new p(r),l.INSTANCE.addValue(this.processor)}processor;onEvent(t,r,e){return this.processor.onEvent(t,async(s,n)=>{let a=s.data[r],o=new h(s.caller,s.transactionHash,a);await e(o,n)}),this}};var C=class extends rt{name="StarknetPlugin";handlers={callHandlers:[]};async configure(t){let r={callHandlers:[]};for(let e of l.INSTANCE.getValues()){await e.configure();let s=x.fromPartial({processorType:st,contract:{name:e.config.name,chainId:e.config.chainId.toString(),address:e.config.address||"*",abi:""},startBlock:e.config.startBlock,endBlock:e.config.endBlock});for(let n of e.callHandlers){let a=r.callHandlers.push(n.handler)-1;n.eventFilter&&s.starknetEventConfigs.push({filters:n.eventFilter.map(o=>({address:e.config.address,keys:[V.getSelectorFromName(o)]})),handlerId:a})}t.contractConfigs.push(s)}this.handlers=r}supportedHandlers=[v.STARKNET_EVENT];processBinding(t){switch(t.handlerType){case v.STARKNET_EVENT:return this.processEvent(t);default:throw new c.ServerError(c.Status.INVALID_ARGUMENT,"No handle type registered "+t.handlerType)}}async start(t){}stateDiff(t){return D.INSTANCE.getValues().length!==t.templateInstances.length}async processEvent(t){if(!t.data?.starknetEvents?.result)throw new c.ServerError(c.Status.INVALID_ARGUMENT,"starknetEvents can't be null");let r=[],e=t.data?.starknetEvents?.result;for(let s of t.handlerIds){let n=this.handlers.callHandlers[s](t.data?.starknetEvents).catch(a=>{throw new c.ServerError(c.Status.INTERNAL,"error processing transaction: "+JSON.stringify(e)+`
2
+ import{a as E,b as d,c as V,d as B,e as S,f as L,g as F}from"../chunk-APX6ZQ7B.js";import"../chunk-DEW7KMCM.js";import"../chunk-3FX7DHPT.js";import{a as O}from"../chunk-7H2MCYRO.js";import{D as v,Mc as j,W as x,gd as _,ld as D,uc as H}from"../chunk-4XDWWAOR.js";import"../chunk-5ZKQRZMR.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-K6FJLTBX.js";import"../chunk-GQE2JYJW.js";import"../chunk-DJQ5RDDN.js";import"../chunk-FC546GTB.js";import{e as b,g as T}from"../chunk-LLHU72AA.js";import{errorString as Z,GLOBAL_CONFIG as $,mergeProcessResults as tt,Plugin as rt,PluginManager as et,USER_PROCESSOR as st}from"@sentio/runtime";var c=b(j(),1);var G=b(O(),1);var f=class{constructor(t,r,e,s){this.abi=t;this.address=r;this.provider=e;this.blockNumber=s;this._contract=new F(t,r,e);let n=new d(t);for(let a of n.abi)if(a.type=="function"&&a.state_mutability=="view"){let o=a.name;Object.defineProperty(this,o,{enumerable:!0,writable:!1,value:J(this,o)})}}_contract;call(t,r,e){return this._contract.call(t,r,{...e,blockIdentifier:this.blockNumber})}};function J(i,t){return async function(...r){let e=L(r);return i.call(t,e.args,{parseRequest:!0,parseResponse:!0,...e.options})}}var y=class extends _{constructor(r,e,s,n,a,o,u=-1,P="",N){super({});this.provider=r;this.contractAddress=e;this.chainId=s;this.blockNumber=n;this.blockHash=a;this.transactionHash=o;this.logIndex=u;this.contractName=P;this.abi=N}getMetaDataInternal(r,e){return{address:this.contractAddress,contractName:"",blockNumber:BigInt(this.blockNumber),transactionIndex:0,transactionHash:this.transactionHash,chainId:this.getChainId(),name:r,logIndex:this.logIndex,labels:H(e)}}getChainId(){return this.chainId}},g=class extends y{constructor(r,e,s,n,a,o,u){super(e,r.address,r.chainId,s,n,a,o,r.name??u.slice(0,8),r.abi);this.classHash=u}_contract;getContract(){if(!this.abi)throw new Error("abi not found");return this._contract||(this._contract=new f(this.abi,this.contractAddress,this.provider,this.blockNumber)),this._contract}};var h=class{constructor(t,r,e){this.caller=t;this.transactionHash=r;this.data=e}};import{ListStateStorage as Q,mergeProcessResults as X}from"@sentio/runtime";var p=class{constructor(t){this.config=t}callHandlers=[];provider;static bind(t){let r=new p(t);return l.INSTANCE.addValue(r),r}classHash;async configure(){this.provider=new B({nodeUrl:Y(this.config.chainId)});let t=await this.provider.getClassHashAt(this.config.address);if(!t)throw new Error("can't find the class hash defined at "+this.config.address);if(this.classHash=t,!this.config.abi){let r=await this.provider.getClass(t,"latest");this.config.abi=r.abi}}onEvent(t,r){let e=Array.isArray(t)?t:[t];if(!this.config.abi)throw new Error("abi not found");let s=this.config.abi,n={handler:async a=>{try{let o=[a.result],u=S.getAbiEvents(s),P=d.getAbiStruct(s),N=d.getAbiEnum(s),I=S.parseEvents(o,u,P,N),w=[],{block_hash:U,block_number:q,transaction_hash:A,from_address:z}=a.result;for(let m=0;m<I.length;m++){let R=new g(this.config,this.provider,q,U,A,m,this.classHash),K=new h(z,A,I[m]);try{await r(K,R)}catch(W){console.error(W)}w.push(R.stopAndGetResult())}return X(w)}catch(o){return console.error(o),{gauges:[],counters:[],events:[],exports:[],states:{configUpdated:!1}}}},eventFilter:e};return this.callHandlers.push(n),this}};function Y(i){switch(i){case G.StarknetChainId.STARKNET_MAINNET:return E.NetworkName.SN_MAIN;default:return E.NetworkName.SN_SEPOLIA}}var k=class extends Q{},l=k;T(l,"INSTANCE",new k);var M=class{constructor(t,r){this.abi=t;this.config=r;this.processor=new p(r),l.INSTANCE.addValue(this.processor)}processor;onEvent(t,r,e){return this.processor.onEvent(t,async(s,n)=>{let a=s.data[r],o=new h(s.caller,s.transactionHash,a);await e(o,n)}),this}};var C=class extends rt{name="StarknetPlugin";handlers={callHandlers:[]};async configure(t){let r={callHandlers:[]};for(let e of l.INSTANCE.getValues()){await e.configure();let s=x.fromPartial({processorType:st,contract:{name:e.config.name,chainId:e.config.chainId.toString(),address:e.config.address||"*",abi:""},startBlock:e.config.startBlock,endBlock:e.config.endBlock});for(let n of e.callHandlers){let a=r.callHandlers.push(n.handler)-1;n.eventFilter&&s.starknetEventConfigs.push({filters:n.eventFilter.map(o=>({address:e.config.address,keys:[V.getSelectorFromName(o)]})),handlerId:a})}t.contractConfigs.push(s)}this.handlers=r}supportedHandlers=[v.STARKNET_EVENT];processBinding(t){switch(t.handlerType){case v.STARKNET_EVENT:return this.processEvent(t);default:throw new c.ServerError(c.Status.INVALID_ARGUMENT,"No handle type registered "+t.handlerType)}}async start(t){}stateDiff(t){return D.INSTANCE.getValues().length!==t.templateInstances.length}async processEvent(t){if(!t.data?.starknetEvents?.result)throw new c.ServerError(c.Status.INVALID_ARGUMENT,"starknetEvents can't be null");let r=[],e=t.data?.starknetEvents?.result;for(let s of t.handlerIds){let n=this.handlers.callHandlers[s](t.data?.starknetEvents).catch(a=>{throw new c.ServerError(c.Status.INTERNAL,"error processing transaction: "+JSON.stringify(e)+`
3
3
  `+Z(a))});$.execution.sequential&&await n,r.push(n)}return tt(await Promise.all(r))}};et.INSTANCE.register(new C);var nt=b(O(),1);var export_StarknetChainId=nt.StarknetChainId;export{M as AbstractStarknetProcessor,export_StarknetChainId as StarknetChainId,g as StarknetContext,h as StarknetEvent,C as StarknetPlugin,p as StarknetProcessor,l as StarknetProcessorState};
4
4
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{$c as ae,Mc as re,Nc as A,Oc as Z,Pc as ne,Qc as Q,Rc as pt,Sc as vt,Tc as mt,Uc as wt,Vc as gt,Wc as _t,Xc as bt,Yc as B,Zc as F,_c as ie,ad as U,cd as Mt,dd as oe,ed as X}from"../chunk-TO35Z22E.js";import"../chunk-SBU7XQ42.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-K6FJLTBX.js";import"../chunk-GQE2JYJW.js";import"../chunk-DJQ5RDDN.js";import"../chunk-FC546GTB.js";import{c as te,e as ee}from"../chunk-LLHU72AA.js";var kt=te(()=>{var Ot;(function(s){(function(c){var d=typeof globalThis=="object"?globalThis:typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:I(),v=y(s);typeof d.Reflect<"u"&&(v=y(d.Reflect,v)),c(v,d),typeof d.Reflect>"u"&&(d.Reflect=s);function y(S,P){return function(O,E){Object.defineProperty(S,O,{configurable:!0,writable:!0,value:E}),P&&P(O,E)}}function b(){try{return Function("return this;")()}catch{}}function k(){try{return(0,eval)("(function() { return this; })()")}catch{}}function I(){return b()||k()}})(function(c,d){var v=Object.prototype.hasOwnProperty,y=typeof Symbol=="function",b=y&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",k=y&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",I=typeof Object.create=="function",S={__proto__:[]}instanceof Array,P=!I&&!S,O={create:I?function(){return L(Object.create(null))}:S?function(){return L({__proto__:null})}:function(){return L({})},has:P?function(t,e){return v.call(t,e)}:function(t,e){return e in t},get:P?function(t,e){return v.call(t,e)?t[e]:void 0}:function(t,e){return t[e]}},E=Object.getPrototypeOf(Function),D=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Zt(),z=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Qt(),H=typeof WeakMap=="function"?WeakMap:Xt(),R=y?Symbol.for("@reflect-metadata:registry"):void 0,G=qt(),Y=Jt(G);function Tt(t,e,r,n){if(l(r)){if(!ut(t))throw new TypeError;if(!ft(e))throw new TypeError;return At(t,e)}else{if(!ut(t))throw new TypeError;if(!w(e))throw new TypeError;if(!w(n)&&!l(n)&&!j(n))throw new TypeError;return j(n)&&(n=void 0),r=T(r),Bt(t,e,r,n)}}c("decorate",Tt);function Et(t,e){function r(n,f){if(!w(n))throw new TypeError;if(!l(f)&&!Ht(f))throw new TypeError;rt(t,e,n,f)}return r}c("metadata",Et);function It(t,e,r,n){if(!w(r))throw new TypeError;return l(n)||(n=T(n)),rt(t,e,r,n)}c("defineMetadata",It);function Pt(t,e,r){if(!w(e))throw new TypeError;return l(r)||(r=T(r)),K(t,e,r)}c("hasMetadata",Pt);function Rt(t,e,r){if(!w(e))throw new TypeError;return l(r)||(r=T(r)),$(t,e,r)}c("hasOwnMetadata",Rt);function jt(t,e,r){if(!w(e))throw new TypeError;return l(r)||(r=T(r)),tt(t,e,r)}c("getMetadata",jt);function Vt(t,e,r){if(!w(e))throw new TypeError;return l(r)||(r=T(r)),et(t,e,r)}c("getOwnMetadata",Vt);function Dt(t,e){if(!w(t))throw new TypeError;return l(e)||(e=T(e)),nt(t,e)}c("getMetadataKeys",Dt);function Nt(t,e){if(!w(t))throw new TypeError;return l(e)||(e=T(e)),it(t,e)}c("getOwnMetadataKeys",Nt);function Gt(t,e,r){if(!w(e))throw new TypeError;if(l(r)||(r=T(r)),!w(e))throw new TypeError;l(r)||(r=T(r));var n=N(e,r,!1);return l(n)?!1:n.OrdinaryDeleteMetadata(t,e,r)}c("deleteMetadata",Gt);function At(t,e){for(var r=t.length-1;r>=0;--r){var n=t[r],f=n(e);if(!l(f)&&!j(f)){if(!ft(f))throw new TypeError;e=f}}return e}function Bt(t,e,r,n){for(var f=t.length-1;f>=0;--f){var g=t[f],M=g(e,r,n);if(!l(M)&&!j(M)){if(!w(M))throw new TypeError;n=M}}return n}function K(t,e,r){var n=$(t,e,r);if(n)return!0;var f=J(e);return j(f)?!1:K(t,f,r)}function $(t,e,r){var n=N(e,r,!1);return l(n)?!1:ot(n.OrdinaryHasOwnMetadata(t,e,r))}function tt(t,e,r){var n=$(t,e,r);if(n)return et(t,e,r);var f=J(e);if(!j(f))return tt(t,f,r)}function et(t,e,r){var n=N(e,r,!1);if(!l(n))return n.OrdinaryGetOwnMetadata(t,e,r)}function rt(t,e,r,n){var f=N(r,n,!0);f.OrdinaryDefineOwnMetadata(t,e,r,n)}function nt(t,e){var r=it(t,e),n=J(t);if(n===null)return r;var f=nt(n,e);if(f.length<=0)return r;if(r.length<=0)return f;for(var g=new z,M=[],h=0,i=r;h<i.length;h++){var a=i[h],o=g.has(a);o||(g.add(a),M.push(a))}for(var u=0,p=f;u<p.length;u++){var a=p[u],o=g.has(a);o||(g.add(a),M.push(a))}return M}function it(t,e){var r=N(t,e,!1);return r?r.OrdinaryOwnMetadataKeys(t,e):[]}function at(t){if(t===null)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return t===null?1:6;default:return 6}}function l(t){return t===void 0}function j(t){return t===null}function Ft(t){return typeof t=="symbol"}function w(t){return typeof t=="object"?t!==null:typeof t=="function"}function Ut(t,e){switch(at(t)){case 0:return t;case 1:return t;case 2:return t;case 3:return t;case 4:return t;case 5:return t}var r=e===3?"string":e===5?"number":"default",n=st(t,b);if(n!==void 0){var f=n.call(t,r);if(w(f))throw new TypeError;return f}return Wt(t,r==="default"?"number":r)}function Wt(t,e){if(e==="string"){var r=t.toString;if(V(r)){var n=r.call(t);if(!w(n))return n}var f=t.valueOf;if(V(f)){var n=f.call(t);if(!w(n))return n}}else{var f=t.valueOf;if(V(f)){var n=f.call(t);if(!w(n))return n}var g=t.toString;if(V(g)){var n=g.call(t);if(!w(n))return n}}throw new TypeError}function ot(t){return!!t}function zt(t){return""+t}function T(t){var e=Ut(t,3);return Ft(e)?e:zt(e)}function ut(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:Object.prototype.toString.call(t)==="[object Array]"}function V(t){return typeof t=="function"}function ft(t){return typeof t=="function"}function Ht(t){switch(at(t)){case 3:return!0;case 4:return!0;default:return!1}}function q(t,e){return t===e||t!==t&&e!==e}function st(t,e){var r=t[e];if(r!=null){if(!V(r))throw new TypeError;return r}}function ct(t){var e=st(t,k);if(!V(e))throw new TypeError;var r=e.call(t);if(!w(r))throw new TypeError;return r}function lt(t){return t.value}function dt(t){var e=t.next();return e.done?!1:e}function ht(t){var e=t.return;e&&e.call(t)}function J(t){var e=Object.getPrototypeOf(t);if(typeof t!="function"||t===E||e!==E)return e;var r=t.prototype,n=r&&Object.getPrototypeOf(r);if(n==null||n===Object.prototype)return e;var f=n.constructor;return typeof f!="function"||f===t?e:f}function $t(){var t;!l(R)&&typeof d.Reflect<"u"&&!(R in d.Reflect)&&typeof d.Reflect.defineMetadata=="function"&&(t=Lt(d.Reflect));var e,r,n,f=new H,g={registerProvider:M,getProvider:i,setProvider:o};return g;function M(u){if(!Object.isExtensible(g))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case t===u:break;case l(e):e=u;break;case e===u:break;case l(r):r=u;break;case r===u:break;default:n===void 0&&(n=new z),n.add(u);break}}function h(u,p){if(!l(e)){if(e.isProviderFor(u,p))return e;if(!l(r)){if(r.isProviderFor(u,p))return e;if(!l(n))for(var m=ct(n);;){var _=dt(m);if(!_)return;var C=lt(_);if(C.isProviderFor(u,p))return ht(m),C}}}if(!l(t)&&t.isProviderFor(u,p))return t}function i(u,p){var m=f.get(u),_;return l(m)||(_=m.get(p)),l(_)&&(_=h(u,p),l(_)||(l(m)&&(m=new D,f.set(u,m)),m.set(p,_))),_}function a(u){if(l(u))throw new TypeError;return e===u||r===u||!l(n)&&n.has(u)}function o(u,p,m){if(!a(m))throw new Error("Metadata provider not registered.");var _=i(u,p);if(_!==m){if(!l(_))return!1;var C=f.get(u);l(C)&&(C=new D,f.set(u,C)),C.set(p,m)}return!0}}function qt(){var t;return!l(R)&&w(d.Reflect)&&Object.isExtensible(d.Reflect)&&(t=d.Reflect[R]),l(t)&&(t=$t()),!l(R)&&w(d.Reflect)&&Object.isExtensible(d.Reflect)&&Object.defineProperty(d.Reflect,R,{enumerable:!1,configurable:!1,writable:!1,value:t}),t}function Jt(t){var e=new H,r={isProviderFor:function(a,o){var u=e.get(a);return l(u)?!1:u.has(o)},OrdinaryDefineOwnMetadata:M,OrdinaryHasOwnMetadata:f,OrdinaryGetOwnMetadata:g,OrdinaryOwnMetadataKeys:h,OrdinaryDeleteMetadata:i};return G.registerProvider(r),r;function n(a,o,u){var p=e.get(a),m=!1;if(l(p)){if(!u)return;p=new D,e.set(a,p),m=!0}var _=p.get(o);if(l(_)){if(!u)return;if(_=new D,p.set(o,_),!t.setProvider(a,o,r))throw p.delete(o),m&&e.delete(a),new Error("Wrong provider for target.")}return _}function f(a,o,u){var p=n(o,u,!1);return l(p)?!1:ot(p.has(a))}function g(a,o,u){var p=n(o,u,!1);if(!l(p))return p.get(a)}function M(a,o,u,p){var m=n(u,p,!0);m.set(a,o)}function h(a,o){var u=[],p=n(a,o,!1);if(l(p))return u;for(var m=p.keys(),_=ct(m),C=0;;){var yt=dt(_);if(!yt)return u.length=C,u;var Yt=lt(yt);try{u[C]=Yt}catch(Kt){try{ht(_)}finally{throw Kt}}C++}}function i(a,o,u){var p=n(o,u,!1);if(l(p)||!p.delete(a))return!1;if(p.size===0){var m=e.get(o);l(m)||(m.delete(u),m.size===0&&e.delete(m))}return!0}}function Lt(t){var e=t.defineMetadata,r=t.hasOwnMetadata,n=t.getOwnMetadata,f=t.getOwnMetadataKeys,g=t.deleteMetadata,M=new H,h={isProviderFor:function(i,a){var o=M.get(i);return!l(o)&&o.has(a)?!0:f(i,a).length?(l(o)&&(o=new z,M.set(i,o)),o.add(a),!0):!1},OrdinaryDefineOwnMetadata:e,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:f,OrdinaryDeleteMetadata:g};return h}function N(t,e,r){var n=G.getProvider(t,e);if(!l(n))return n;if(r){if(G.setProvider(t,e,Y))return Y;throw new Error("Illegal state.")}}function Zt(){var t={},e=[],r=function(){function h(i,a,o){this._index=0,this._keys=i,this._values=a,this._selector=o}return h.prototype["@@iterator"]=function(){return this},h.prototype[k]=function(){return this},h.prototype.next=function(){var i=this._index;if(i>=0&&i<this._keys.length){var a=this._selector(this._keys[i],this._values[i]);return i+1>=this._keys.length?(this._index=-1,this._keys=e,this._values=e):this._index++,{value:a,done:!1}}return{value:void 0,done:!0}},h.prototype.throw=function(i){throw this._index>=0&&(this._index=-1,this._keys=e,this._values=e),i},h.prototype.return=function(i){return this._index>=0&&(this._index=-1,this._keys=e,this._values=e),{value:i,done:!0}},h}(),n=function(){function h(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(h.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),h.prototype.has=function(i){return this._find(i,!1)>=0},h.prototype.get=function(i){var a=this._find(i,!1);return a>=0?this._values[a]:void 0},h.prototype.set=function(i,a){var o=this._find(i,!0);return this._values[o]=a,this},h.prototype.delete=function(i){var a=this._find(i,!1);if(a>=0){for(var o=this._keys.length,u=a+1;u<o;u++)this._keys[u-1]=this._keys[u],this._values[u-1]=this._values[u];return this._keys.length--,this._values.length--,q(i,this._cacheKey)&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},h.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},h.prototype.keys=function(){return new r(this._keys,this._values,f)},h.prototype.values=function(){return new r(this._keys,this._values,g)},h.prototype.entries=function(){return new r(this._keys,this._values,M)},h.prototype["@@iterator"]=function(){return this.entries()},h.prototype[k]=function(){return this.entries()},h.prototype._find=function(i,a){if(!q(this._cacheKey,i)){this._cacheIndex=-1;for(var o=0;o<this._keys.length;o++)if(q(this._keys[o],i)){this._cacheIndex=o;break}}return this._cacheIndex<0&&a&&(this._cacheIndex=this._keys.length,this._keys.push(i),this._values.push(void 0)),this._cacheIndex},h}();return n;function f(h,i){return h}function g(h,i){return i}function M(h,i){return[h,i]}}function Qt(){var t=function(){function e(){this._map=new D}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(r){return this._map.has(r)},e.prototype.add=function(r){return this._map.set(r,r),this},e.prototype.delete=function(r){return this._map.delete(r)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[k]=function(){return this.keys()},e}();return t}function Xt(){var t=16,e=O.create(),r=n();return function(){function i(){this._key=n()}return i.prototype.has=function(a){var o=f(a,!1);return o!==void 0?O.has(o,this._key):!1},i.prototype.get=function(a){var o=f(a,!1);return o!==void 0?O.get(o,this._key):void 0},i.prototype.set=function(a,o){var u=f(a,!0);return u[this._key]=o,this},i.prototype.delete=function(a){var o=f(a,!1);return o!==void 0?delete o[this._key]:!1},i.prototype.clear=function(){this._key=n()},i}();function n(){var i;do i="@@WeakMap@@"+h();while(O.has(e,i));return e[i]=!0,i}function f(i,a){if(!v.call(i,r)){if(!a)return;Object.defineProperty(i,r,{value:O.create()})}return i[r]}function g(i,a){for(var o=0;o<a;++o)i[o]=Math.random()*255|0;return i}function M(i){if(typeof Uint8Array=="function"){var a=new Uint8Array(i);return typeof crypto<"u"?crypto.getRandomValues(a):typeof msCrypto<"u"?msCrypto.getRandomValues(a):g(a,i),a}return g(new Array(i),i)}function h(){var i=M(t);i[6]=i[6]&79|64,i[8]=i[8]&191|128;for(var a="",o=0;o<t;++o){var u=i[o];(o===4||o===6||o===8)&&(a+="-"),u<16&&(a+="0"),a+=u.toString(16).toLowerCase()}return a}}function L(t){return t.__=void 0,delete t.__,t}})})(Ot||(Ot={}))});var se=ee(kt(),1);function W(s,c,d){try{return d()}catch(v){throw new Error(`Get property "${c}" from Entity "${s}" failed: ${v.message}`)}}function he(s){return function(c){let d=c.meta||{},v=c.prototype;for(let[y,b]of Object.entries(d))if(b.isRelation&&b.relationName){let k=b.relationName,I=function(){return W(this.constructor.entityName,y,()=>b.to(this._data.fields[y]))},S=function(O){this._data.fields[y]=W(this.constructor.entityName,y,()=>b.from(O))},P=b.isArray?y+"IDs":y+"ID";Reflect.defineProperty(v,P,{get:I,set:S}),Reflect.defineProperty(v,y,{get:function(){let O=I.call(this);return Array.isArray(O)?Promise.all(O.map(E=>X()?.get(k,E))):X()?.get(k,O)},set:function(O){O instanceof Promise?O.then(E=>{S.call(this,E)}):S.call(this,O)}})}else Reflect.defineProperty(v,y,{configurable:!0,get:function(){return W(this.constructor.entityName,y,()=>b.to(this._data.fields[y]))},set:function(k){this._data.fields[y]=W(this.constructor.entityName,y,()=>b.from(k))}});return class extends c{_data={fields:{}};static entityName=s;constructor(...y){super();for(let b of Object.getOwnPropertyNames(this))c.prototype.hasOwnProperty(b)&&delete this[b];y[0]&&Object.assign(this,y[0])}}}}function ye(s){return function(c,d){let v=!1;s.endsWith("!")&&(v=!0,s=s.slice(0,-1));let y=U[s];if(!y)throw new Error(`Unsupported type ${s}`);v&&(y=A(y)),x(y)(c,d)}}function pe(s=""){return function(c,d){let v=!1;s.endsWith("!")&&(v=!0,s=s.slice(0,-1));let y=U[s];if(!y){let k=(c.constructor.meta||{})[d];if(k)y=k;else throw new Error("Can't find inner type convert")}v&&(y=A(y)),x(Z(y))(c,d)}}function x(s){return function(c,d){let v=Reflect.getMetadata("design:type",c,d);if(!s){let b=v.name;if(s=U[b],!s)throw new Error(`Unsupported type ${b}`)}let y=c.constructor.meta||{};y[d]=s,c.constructor.meta=y}}var ve=x(bt),me=x(vt),we=x(mt),ge=x(B),_e=x(F),be=x(pt),Me=x(wt),Oe=x(gt),ke=x(_t);function xe(s,c){let d=s.constructor.meta||{},v=d[c];v&&(d[c]=A(v)),s.constructor.meta=d}function Ce(s){return function(c,d){x(Q(s))(c,d)}}function Se(s){return function(c,d){x(Z(Q(s)))(c,d)}}var xt=class{_data;toJSON(){let c={};for(let[d,v]of Object.entries(this._data.fields))c[d]=Ct(v);return c}toString(){let c=this.toJSON();return`${Mt(this)} ${JSON.stringify(c)}`}};function Ct(s){if(s.nullValue)return null;if(s.bytesValue)return s.bytesValue;if(s.stringValue)return s.stringValue;if(s.bigdecimalValue)return B.to(s);if(s.bigintValue)return F.to(s);if(s.boolValue)return s.boolValue;if(s.timestampValue)return s.timestampValue;if(s.floatValue)return s.floatValue;if(s.intValue)return s.intValue;if(s.listValue)return s.listValue.values.map(Ct);throw new Error("Unknown value type:"+JSON.stringify(s))}import{StoreContext as De}from"@sentio/runtime";var St=class{_cursor;_done=!1;pageSize;constructor(c){this._cursor=c?.initCursor,this.pageSize=c?.pageSize}get cursor(){return this._cursor}set cursor(c){c||(this._done=!0),this._cursor=c}get hasNext(){return!this._done}};export{xt as AbstractEntity,ge as BigDecimalColumn,B as BigDecimalConverter,_e as BigIntColumn,F as BigIntConverter,Me as BooleanColumn,wt as BooleanConverter,ke as BytesColumn,_t as BytesConverter,ye as Column,St as Cursor,he as Entity,we as FloatColumn,mt as FloatConverter,ve as IDColumn,bt as IDConverter,me as IntColumn,vt as IntConverter,pe as ListColumn,Se as Many,Ce as One,xe as Required,oe as Store,De as StoreContext,be as StringColumn,pt as StringConverter,Oe as TimestampColumn,gt as TimestampConverter,U as TypeConverters,re as ValueRequiredError,Z as array_,ie as bytesToBigInt,x as column,ne as enumerate_,Mt as getEntityName,X as getStore,Q as objectId_,A as required_,ae as toBigInteger};
2
+ import{$c as ie,Nc as re,Oc as A,Pc as Z,Qc as ne,Rc as Q,Sc as pt,Tc as vt,Uc as mt,Vc as wt,Wc as gt,Xc as _t,Yc as bt,Zc as B,_c as F,ad as ae,bd as U,dd as Mt,ed as oe,fd as X}from"../chunk-4XDWWAOR.js";import"../chunk-5ZKQRZMR.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-K6FJLTBX.js";import"../chunk-GQE2JYJW.js";import"../chunk-DJQ5RDDN.js";import"../chunk-FC546GTB.js";import{c as te,e as ee}from"../chunk-LLHU72AA.js";var kt=te(()=>{var Ot;(function(s){(function(c){var d=typeof globalThis=="object"?globalThis:typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:I(),v=y(s);typeof d.Reflect<"u"&&(v=y(d.Reflect,v)),c(v,d),typeof d.Reflect>"u"&&(d.Reflect=s);function y(S,P){return function(O,E){Object.defineProperty(S,O,{configurable:!0,writable:!0,value:E}),P&&P(O,E)}}function b(){try{return Function("return this;")()}catch{}}function k(){try{return(0,eval)("(function() { return this; })()")}catch{}}function I(){return b()||k()}})(function(c,d){var v=Object.prototype.hasOwnProperty,y=typeof Symbol=="function",b=y&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",k=y&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",I=typeof Object.create=="function",S={__proto__:[]}instanceof Array,P=!I&&!S,O={create:I?function(){return L(Object.create(null))}:S?function(){return L({__proto__:null})}:function(){return L({})},has:P?function(t,e){return v.call(t,e)}:function(t,e){return e in t},get:P?function(t,e){return v.call(t,e)?t[e]:void 0}:function(t,e){return t[e]}},E=Object.getPrototypeOf(Function),D=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Zt(),z=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Qt(),H=typeof WeakMap=="function"?WeakMap:Xt(),R=y?Symbol.for("@reflect-metadata:registry"):void 0,G=qt(),Y=Jt(G);function Tt(t,e,r,n){if(l(r)){if(!ut(t))throw new TypeError;if(!ft(e))throw new TypeError;return At(t,e)}else{if(!ut(t))throw new TypeError;if(!w(e))throw new TypeError;if(!w(n)&&!l(n)&&!j(n))throw new TypeError;return j(n)&&(n=void 0),r=T(r),Bt(t,e,r,n)}}c("decorate",Tt);function Et(t,e){function r(n,f){if(!w(n))throw new TypeError;if(!l(f)&&!Ht(f))throw new TypeError;rt(t,e,n,f)}return r}c("metadata",Et);function It(t,e,r,n){if(!w(r))throw new TypeError;return l(n)||(n=T(n)),rt(t,e,r,n)}c("defineMetadata",It);function Pt(t,e,r){if(!w(e))throw new TypeError;return l(r)||(r=T(r)),K(t,e,r)}c("hasMetadata",Pt);function Rt(t,e,r){if(!w(e))throw new TypeError;return l(r)||(r=T(r)),$(t,e,r)}c("hasOwnMetadata",Rt);function jt(t,e,r){if(!w(e))throw new TypeError;return l(r)||(r=T(r)),tt(t,e,r)}c("getMetadata",jt);function Vt(t,e,r){if(!w(e))throw new TypeError;return l(r)||(r=T(r)),et(t,e,r)}c("getOwnMetadata",Vt);function Dt(t,e){if(!w(t))throw new TypeError;return l(e)||(e=T(e)),nt(t,e)}c("getMetadataKeys",Dt);function Nt(t,e){if(!w(t))throw new TypeError;return l(e)||(e=T(e)),it(t,e)}c("getOwnMetadataKeys",Nt);function Gt(t,e,r){if(!w(e))throw new TypeError;if(l(r)||(r=T(r)),!w(e))throw new TypeError;l(r)||(r=T(r));var n=N(e,r,!1);return l(n)?!1:n.OrdinaryDeleteMetadata(t,e,r)}c("deleteMetadata",Gt);function At(t,e){for(var r=t.length-1;r>=0;--r){var n=t[r],f=n(e);if(!l(f)&&!j(f)){if(!ft(f))throw new TypeError;e=f}}return e}function Bt(t,e,r,n){for(var f=t.length-1;f>=0;--f){var g=t[f],M=g(e,r,n);if(!l(M)&&!j(M)){if(!w(M))throw new TypeError;n=M}}return n}function K(t,e,r){var n=$(t,e,r);if(n)return!0;var f=J(e);return j(f)?!1:K(t,f,r)}function $(t,e,r){var n=N(e,r,!1);return l(n)?!1:ot(n.OrdinaryHasOwnMetadata(t,e,r))}function tt(t,e,r){var n=$(t,e,r);if(n)return et(t,e,r);var f=J(e);if(!j(f))return tt(t,f,r)}function et(t,e,r){var n=N(e,r,!1);if(!l(n))return n.OrdinaryGetOwnMetadata(t,e,r)}function rt(t,e,r,n){var f=N(r,n,!0);f.OrdinaryDefineOwnMetadata(t,e,r,n)}function nt(t,e){var r=it(t,e),n=J(t);if(n===null)return r;var f=nt(n,e);if(f.length<=0)return r;if(r.length<=0)return f;for(var g=new z,M=[],h=0,i=r;h<i.length;h++){var a=i[h],o=g.has(a);o||(g.add(a),M.push(a))}for(var u=0,p=f;u<p.length;u++){var a=p[u],o=g.has(a);o||(g.add(a),M.push(a))}return M}function it(t,e){var r=N(t,e,!1);return r?r.OrdinaryOwnMetadataKeys(t,e):[]}function at(t){if(t===null)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return t===null?1:6;default:return 6}}function l(t){return t===void 0}function j(t){return t===null}function Ft(t){return typeof t=="symbol"}function w(t){return typeof t=="object"?t!==null:typeof t=="function"}function Ut(t,e){switch(at(t)){case 0:return t;case 1:return t;case 2:return t;case 3:return t;case 4:return t;case 5:return t}var r=e===3?"string":e===5?"number":"default",n=st(t,b);if(n!==void 0){var f=n.call(t,r);if(w(f))throw new TypeError;return f}return Wt(t,r==="default"?"number":r)}function Wt(t,e){if(e==="string"){var r=t.toString;if(V(r)){var n=r.call(t);if(!w(n))return n}var f=t.valueOf;if(V(f)){var n=f.call(t);if(!w(n))return n}}else{var f=t.valueOf;if(V(f)){var n=f.call(t);if(!w(n))return n}var g=t.toString;if(V(g)){var n=g.call(t);if(!w(n))return n}}throw new TypeError}function ot(t){return!!t}function zt(t){return""+t}function T(t){var e=Ut(t,3);return Ft(e)?e:zt(e)}function ut(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:Object.prototype.toString.call(t)==="[object Array]"}function V(t){return typeof t=="function"}function ft(t){return typeof t=="function"}function Ht(t){switch(at(t)){case 3:return!0;case 4:return!0;default:return!1}}function q(t,e){return t===e||t!==t&&e!==e}function st(t,e){var r=t[e];if(r!=null){if(!V(r))throw new TypeError;return r}}function ct(t){var e=st(t,k);if(!V(e))throw new TypeError;var r=e.call(t);if(!w(r))throw new TypeError;return r}function lt(t){return t.value}function dt(t){var e=t.next();return e.done?!1:e}function ht(t){var e=t.return;e&&e.call(t)}function J(t){var e=Object.getPrototypeOf(t);if(typeof t!="function"||t===E||e!==E)return e;var r=t.prototype,n=r&&Object.getPrototypeOf(r);if(n==null||n===Object.prototype)return e;var f=n.constructor;return typeof f!="function"||f===t?e:f}function $t(){var t;!l(R)&&typeof d.Reflect<"u"&&!(R in d.Reflect)&&typeof d.Reflect.defineMetadata=="function"&&(t=Lt(d.Reflect));var e,r,n,f=new H,g={registerProvider:M,getProvider:i,setProvider:o};return g;function M(u){if(!Object.isExtensible(g))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case t===u:break;case l(e):e=u;break;case e===u:break;case l(r):r=u;break;case r===u:break;default:n===void 0&&(n=new z),n.add(u);break}}function h(u,p){if(!l(e)){if(e.isProviderFor(u,p))return e;if(!l(r)){if(r.isProviderFor(u,p))return e;if(!l(n))for(var m=ct(n);;){var _=dt(m);if(!_)return;var C=lt(_);if(C.isProviderFor(u,p))return ht(m),C}}}if(!l(t)&&t.isProviderFor(u,p))return t}function i(u,p){var m=f.get(u),_;return l(m)||(_=m.get(p)),l(_)&&(_=h(u,p),l(_)||(l(m)&&(m=new D,f.set(u,m)),m.set(p,_))),_}function a(u){if(l(u))throw new TypeError;return e===u||r===u||!l(n)&&n.has(u)}function o(u,p,m){if(!a(m))throw new Error("Metadata provider not registered.");var _=i(u,p);if(_!==m){if(!l(_))return!1;var C=f.get(u);l(C)&&(C=new D,f.set(u,C)),C.set(p,m)}return!0}}function qt(){var t;return!l(R)&&w(d.Reflect)&&Object.isExtensible(d.Reflect)&&(t=d.Reflect[R]),l(t)&&(t=$t()),!l(R)&&w(d.Reflect)&&Object.isExtensible(d.Reflect)&&Object.defineProperty(d.Reflect,R,{enumerable:!1,configurable:!1,writable:!1,value:t}),t}function Jt(t){var e=new H,r={isProviderFor:function(a,o){var u=e.get(a);return l(u)?!1:u.has(o)},OrdinaryDefineOwnMetadata:M,OrdinaryHasOwnMetadata:f,OrdinaryGetOwnMetadata:g,OrdinaryOwnMetadataKeys:h,OrdinaryDeleteMetadata:i};return G.registerProvider(r),r;function n(a,o,u){var p=e.get(a),m=!1;if(l(p)){if(!u)return;p=new D,e.set(a,p),m=!0}var _=p.get(o);if(l(_)){if(!u)return;if(_=new D,p.set(o,_),!t.setProvider(a,o,r))throw p.delete(o),m&&e.delete(a),new Error("Wrong provider for target.")}return _}function f(a,o,u){var p=n(o,u,!1);return l(p)?!1:ot(p.has(a))}function g(a,o,u){var p=n(o,u,!1);if(!l(p))return p.get(a)}function M(a,o,u,p){var m=n(u,p,!0);m.set(a,o)}function h(a,o){var u=[],p=n(a,o,!1);if(l(p))return u;for(var m=p.keys(),_=ct(m),C=0;;){var yt=dt(_);if(!yt)return u.length=C,u;var Yt=lt(yt);try{u[C]=Yt}catch(Kt){try{ht(_)}finally{throw Kt}}C++}}function i(a,o,u){var p=n(o,u,!1);if(l(p)||!p.delete(a))return!1;if(p.size===0){var m=e.get(o);l(m)||(m.delete(u),m.size===0&&e.delete(m))}return!0}}function Lt(t){var e=t.defineMetadata,r=t.hasOwnMetadata,n=t.getOwnMetadata,f=t.getOwnMetadataKeys,g=t.deleteMetadata,M=new H,h={isProviderFor:function(i,a){var o=M.get(i);return!l(o)&&o.has(a)?!0:f(i,a).length?(l(o)&&(o=new z,M.set(i,o)),o.add(a),!0):!1},OrdinaryDefineOwnMetadata:e,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:f,OrdinaryDeleteMetadata:g};return h}function N(t,e,r){var n=G.getProvider(t,e);if(!l(n))return n;if(r){if(G.setProvider(t,e,Y))return Y;throw new Error("Illegal state.")}}function Zt(){var t={},e=[],r=function(){function h(i,a,o){this._index=0,this._keys=i,this._values=a,this._selector=o}return h.prototype["@@iterator"]=function(){return this},h.prototype[k]=function(){return this},h.prototype.next=function(){var i=this._index;if(i>=0&&i<this._keys.length){var a=this._selector(this._keys[i],this._values[i]);return i+1>=this._keys.length?(this._index=-1,this._keys=e,this._values=e):this._index++,{value:a,done:!1}}return{value:void 0,done:!0}},h.prototype.throw=function(i){throw this._index>=0&&(this._index=-1,this._keys=e,this._values=e),i},h.prototype.return=function(i){return this._index>=0&&(this._index=-1,this._keys=e,this._values=e),{value:i,done:!0}},h}(),n=function(){function h(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(h.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),h.prototype.has=function(i){return this._find(i,!1)>=0},h.prototype.get=function(i){var a=this._find(i,!1);return a>=0?this._values[a]:void 0},h.prototype.set=function(i,a){var o=this._find(i,!0);return this._values[o]=a,this},h.prototype.delete=function(i){var a=this._find(i,!1);if(a>=0){for(var o=this._keys.length,u=a+1;u<o;u++)this._keys[u-1]=this._keys[u],this._values[u-1]=this._values[u];return this._keys.length--,this._values.length--,q(i,this._cacheKey)&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},h.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},h.prototype.keys=function(){return new r(this._keys,this._values,f)},h.prototype.values=function(){return new r(this._keys,this._values,g)},h.prototype.entries=function(){return new r(this._keys,this._values,M)},h.prototype["@@iterator"]=function(){return this.entries()},h.prototype[k]=function(){return this.entries()},h.prototype._find=function(i,a){if(!q(this._cacheKey,i)){this._cacheIndex=-1;for(var o=0;o<this._keys.length;o++)if(q(this._keys[o],i)){this._cacheIndex=o;break}}return this._cacheIndex<0&&a&&(this._cacheIndex=this._keys.length,this._keys.push(i),this._values.push(void 0)),this._cacheIndex},h}();return n;function f(h,i){return h}function g(h,i){return i}function M(h,i){return[h,i]}}function Qt(){var t=function(){function e(){this._map=new D}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(r){return this._map.has(r)},e.prototype.add=function(r){return this._map.set(r,r),this},e.prototype.delete=function(r){return this._map.delete(r)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[k]=function(){return this.keys()},e}();return t}function Xt(){var t=16,e=O.create(),r=n();return function(){function i(){this._key=n()}return i.prototype.has=function(a){var o=f(a,!1);return o!==void 0?O.has(o,this._key):!1},i.prototype.get=function(a){var o=f(a,!1);return o!==void 0?O.get(o,this._key):void 0},i.prototype.set=function(a,o){var u=f(a,!0);return u[this._key]=o,this},i.prototype.delete=function(a){var o=f(a,!1);return o!==void 0?delete o[this._key]:!1},i.prototype.clear=function(){this._key=n()},i}();function n(){var i;do i="@@WeakMap@@"+h();while(O.has(e,i));return e[i]=!0,i}function f(i,a){if(!v.call(i,r)){if(!a)return;Object.defineProperty(i,r,{value:O.create()})}return i[r]}function g(i,a){for(var o=0;o<a;++o)i[o]=Math.random()*255|0;return i}function M(i){if(typeof Uint8Array=="function"){var a=new Uint8Array(i);return typeof crypto<"u"?crypto.getRandomValues(a):typeof msCrypto<"u"?msCrypto.getRandomValues(a):g(a,i),a}return g(new Array(i),i)}function h(){var i=M(t);i[6]=i[6]&79|64,i[8]=i[8]&191|128;for(var a="",o=0;o<t;++o){var u=i[o];(o===4||o===6||o===8)&&(a+="-"),u<16&&(a+="0"),a+=u.toString(16).toLowerCase()}return a}}function L(t){return t.__=void 0,delete t.__,t}})})(Ot||(Ot={}))});var se=ee(kt(),1);function W(s,c,d){try{return d()}catch(v){throw new Error(`Get property "${c}" from Entity "${s}" failed: ${v.message}`)}}function he(s){return function(c){let d=c.meta||{},v=c.prototype;for(let[y,b]of Object.entries(d))if(b.isRelation&&b.relationName){let k=b.relationName,I=function(){return W(this.constructor.entityName,y,()=>b.to(this._data.fields[y]))},S=function(O){this._data.fields[y]=W(this.constructor.entityName,y,()=>b.from(O))},P=b.isArray?y+"IDs":y+"ID";Reflect.defineProperty(v,P,{get:I,set:S}),Reflect.defineProperty(v,y,{get:function(){let O=I.call(this);return Array.isArray(O)?Promise.all(O.map(E=>X()?.get(k,E))):X()?.get(k,O)},set:function(O){O instanceof Promise?O.then(E=>{S.call(this,E)}):S.call(this,O)}})}else Reflect.defineProperty(v,y,{configurable:!0,get:function(){return W(this.constructor.entityName,y,()=>b.to(this._data.fields[y]))},set:function(k){this._data.fields[y]=W(this.constructor.entityName,y,()=>b.from(k))}});return class extends c{_data={fields:{}};static entityName=s;constructor(...y){super();for(let b of Object.getOwnPropertyNames(this))c.prototype.hasOwnProperty(b)&&delete this[b];y[0]&&Object.assign(this,y[0])}}}}function ye(s){return function(c,d){let v=!1;s.endsWith("!")&&(v=!0,s=s.slice(0,-1));let y=U[s];if(!y)throw new Error(`Unsupported type ${s}`);v&&(y=A(y)),x(y)(c,d)}}function pe(s=""){return function(c,d){let v=!1;s.endsWith("!")&&(v=!0,s=s.slice(0,-1));let y=U[s];if(!y){let k=(c.constructor.meta||{})[d];if(k)y=k;else throw new Error("Can't find inner type convert")}v&&(y=A(y)),x(Z(y))(c,d)}}function x(s){return function(c,d){let v=Reflect.getMetadata("design:type",c,d);if(!s){let b=v.name;if(s=U[b],!s)throw new Error(`Unsupported type ${b}`)}let y=c.constructor.meta||{};y[d]=s,c.constructor.meta=y}}var ve=x(bt),me=x(vt),we=x(mt),ge=x(B),_e=x(F),be=x(pt),Me=x(wt),Oe=x(gt),ke=x(_t);function xe(s,c){let d=s.constructor.meta||{},v=d[c];v&&(d[c]=A(v)),s.constructor.meta=d}function Ce(s){return function(c,d){x(Q(s))(c,d)}}function Se(s){return function(c,d){x(Z(Q(s)))(c,d)}}var xt=class{_data;toJSON(){let c={};for(let[d,v]of Object.entries(this._data.fields))c[d]=Ct(v);return c}toString(){let c=this.toJSON();return`${Mt(this)} ${JSON.stringify(c)}`}};function Ct(s){if(s.nullValue)return null;if(s.bytesValue)return s.bytesValue;if(s.stringValue)return s.stringValue;if(s.bigdecimalValue)return B.to(s);if(s.bigintValue)return F.to(s);if(s.boolValue)return s.boolValue;if(s.timestampValue)return s.timestampValue;if(s.floatValue)return s.floatValue;if(s.intValue)return s.intValue;if(s.listValue)return s.listValue.values.map(Ct);throw new Error("Unknown value type:"+JSON.stringify(s))}import{StoreContext as De}from"@sentio/runtime";var St=class{_cursor;_done=!1;pageSize;constructor(c){this._cursor=c?.initCursor,this.pageSize=c?.pageSize}get cursor(){return this._cursor}set cursor(c){c||(this._done=!0),this._cursor=c}get hasNext(){return!this._done}};export{xt as AbstractEntity,ge as BigDecimalColumn,B as BigDecimalConverter,_e as BigIntColumn,F as BigIntConverter,Me as BooleanColumn,wt as BooleanConverter,ke as BytesColumn,_t as BytesConverter,ye as Column,St as Cursor,he as Entity,we as FloatColumn,mt as FloatConverter,ve as IDColumn,bt as IDConverter,me as IntColumn,vt as IntConverter,pe as ListColumn,Se as Many,Ce as One,xe as Required,oe as Store,De as StoreContext,be as StringColumn,pt as StringConverter,Oe as TimestampColumn,gt as TimestampConverter,U as TypeConverters,re as ValueRequiredError,Z as array_,ie as bytesToBigInt,x as column,ne as enumerate_,Mt as getEntityName,X as getStore,Q as objectId_,A as required_,ae as toBigInteger};
3
3
  /*! Bundled license information:
4
4
 
5
5
  reflect-metadata/Reflect.js:
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{a,b,c,d,e,f,g}from"../../chunk-EU2WV53M.js";import"../../chunk-SWTOKXE3.js";import"../../chunk-T4HXXSET.js";import"../../chunk-ZGALPNQV.js";import"../../chunk-EKN4H4RV.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-PE6MZT4O.js";import"../../chunk-HWTRE7ZA.js";import"../../chunk-ZIGQO7R5.js";import"../../chunk-4TVQXTHY.js";import"../../chunk-MF5KGJWT.js";import"../../chunk-QRX2UVZ3.js";import"../../chunk-ZLEKYV7V.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-7H2MCYRO.js";import"../../chunk-TO35Z22E.js";import"../../chunk-SBU7XQ42.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-K6FJLTBX.js";import"../../chunk-GQE2JYJW.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-FC546GTB.js";import"../../chunk-LLHU72AA.js";export{a as ascii,b as bit_vector,c as fixed_point32,g as loadAllTypes,d as option,e as string_,f as type_name};
2
+ import{a,b,c,d,e,f,g}from"../../chunk-WS4VFEL7.js";import"../../chunk-Y5WJ4P52.js";import"../../chunk-DD4573FW.js";import"../../chunk-ZGALPNQV.js";import"../../chunk-EKN4H4RV.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-PE6MZT4O.js";import"../../chunk-B35KZPC6.js";import"../../chunk-MZ2FIAD2.js";import"../../chunk-4TVQXTHY.js";import"../../chunk-4O5AYOIW.js";import"../../chunk-EIZ4SUA5.js";import"../../chunk-HYUXOS4C.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-7H2MCYRO.js";import"../../chunk-4XDWWAOR.js";import"../../chunk-5ZKQRZMR.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-K6FJLTBX.js";import"../../chunk-GQE2JYJW.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-FC546GTB.js";import"../../chunk-LLHU72AA.js";export{a as ascii,b as bit_vector,c as fixed_point32,g as loadAllTypes,d as option,e as string_,f as type_name};
3
3
  //# sourceMappingURL=0x1.js.map
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{A,B,C,D,E,F,G,H,I,J,K,L,M,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../../chunk-HC2IIOHY.js";import"../../chunk-EU2WV53M.js";import"../../chunk-SWTOKXE3.js";import"../../chunk-T4HXXSET.js";import"../../chunk-ZGALPNQV.js";import"../../chunk-EKN4H4RV.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-PE6MZT4O.js";import"../../chunk-HWTRE7ZA.js";import"../../chunk-ZIGQO7R5.js";import"../../chunk-4TVQXTHY.js";import"../../chunk-MF5KGJWT.js";import"../../chunk-QRX2UVZ3.js";import"../../chunk-ZLEKYV7V.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-7H2MCYRO.js";import"../../chunk-TO35Z22E.js";import"../../chunk-SBU7XQ42.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-K6FJLTBX.js";import"../../chunk-GQE2JYJW.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-FC546GTB.js";import"../../chunk-LLHU72AA.js";export{a as authenticator_state,b as bag,c as balance,d as bcs,e as bls12381,f as borrow,g as clock,h as coin,i as config,j as deny_list,k as display,l as dynamic_field,m as dynamic_object_field,n as groth16,o as group_ops,p as kiosk,q as kiosk_extension,r as linked_table,M as loadAllTypes,s as object_,t as object_bag,u as object_table,v as package_,w as pay,x as priority_queue,y as random,z as sui,A as table,B as table_vec,C as token,D as transfer,E as transfer_policy,F as tx_context,G as url,H as vec_map,I as vec_set,J as versioned,K as zklogin_verified_id,L as zklogin_verified_issuer};
2
+ import{A,B,C,D,E,F,G,H,I,J,K,L,M,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../../chunk-SWU2T3IV.js";import"../../chunk-WS4VFEL7.js";import"../../chunk-Y5WJ4P52.js";import"../../chunk-DD4573FW.js";import"../../chunk-ZGALPNQV.js";import"../../chunk-EKN4H4RV.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-PE6MZT4O.js";import"../../chunk-B35KZPC6.js";import"../../chunk-MZ2FIAD2.js";import"../../chunk-4TVQXTHY.js";import"../../chunk-4O5AYOIW.js";import"../../chunk-EIZ4SUA5.js";import"../../chunk-HYUXOS4C.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-7H2MCYRO.js";import"../../chunk-4XDWWAOR.js";import"../../chunk-5ZKQRZMR.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-K6FJLTBX.js";import"../../chunk-GQE2JYJW.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-FC546GTB.js";import"../../chunk-LLHU72AA.js";export{a as authenticator_state,b as bag,c as balance,d as bcs,e as bls12381,f as borrow,g as clock,h as coin,i as config,j as deny_list,k as display,l as dynamic_field,m as dynamic_object_field,n as groth16,o as group_ops,p as kiosk,q as kiosk_extension,r as linked_table,M as loadAllTypes,s as object_,t as object_bag,u as object_table,v as package_,w as pay,x as priority_queue,y as random,z as sui,A as table,B as table_vec,C as token,D as transfer,E as transfer_policy,F as tx_context,G as url,H as vec_map,I as vec_set,J as versioned,K as zklogin_verified_id,L as zklogin_verified_issuer};
3
3
  //# sourceMappingURL=0x2.js.map
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{a,b,c,d,e,f,g,h,i,j,k,l}from"../../chunk-CG7IRNK3.js";import"../../chunk-HC2IIOHY.js";import"../../chunk-EU2WV53M.js";import"../../chunk-SWTOKXE3.js";import"../../chunk-T4HXXSET.js";import"../../chunk-ZGALPNQV.js";import"../../chunk-EKN4H4RV.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-PE6MZT4O.js";import"../../chunk-HWTRE7ZA.js";import"../../chunk-ZIGQO7R5.js";import"../../chunk-4TVQXTHY.js";import"../../chunk-MF5KGJWT.js";import"../../chunk-QRX2UVZ3.js";import"../../chunk-ZLEKYV7V.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-7H2MCYRO.js";import"../../chunk-TO35Z22E.js";import"../../chunk-SBU7XQ42.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-K6FJLTBX.js";import"../../chunk-GQE2JYJW.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-FC546GTB.js";import"../../chunk-LLHU72AA.js";export{a as genesis,l as loadAllTypes,b as stake_subsidy,c as staking_pool,d as storage_fund,e as sui_system,f as sui_system_state_inner,g as validator,h as validator_cap,i as validator_set,j as validator_wrapper,k as voting_power};
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l}from"../../chunk-MDJARXZT.js";import"../../chunk-SWU2T3IV.js";import"../../chunk-WS4VFEL7.js";import"../../chunk-Y5WJ4P52.js";import"../../chunk-DD4573FW.js";import"../../chunk-ZGALPNQV.js";import"../../chunk-EKN4H4RV.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-PE6MZT4O.js";import"../../chunk-B35KZPC6.js";import"../../chunk-MZ2FIAD2.js";import"../../chunk-4TVQXTHY.js";import"../../chunk-4O5AYOIW.js";import"../../chunk-EIZ4SUA5.js";import"../../chunk-HYUXOS4C.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-7H2MCYRO.js";import"../../chunk-4XDWWAOR.js";import"../../chunk-5ZKQRZMR.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-K6FJLTBX.js";import"../../chunk-GQE2JYJW.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-FC546GTB.js";import"../../chunk-LLHU72AA.js";export{a as genesis,l as loadAllTypes,b as stake_subsidy,c as staking_pool,d as storage_fund,e as sui_system,f as sui_system_state_inner,g as validator,h as validator_cap,i as validator_set,j as validator_wrapper,k as voting_power};
3
3
  //# sourceMappingURL=0x3.js.map
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{m as x}from"../../chunk-CG7IRNK3.js";import{N as r}from"../../chunk-HC2IIOHY.js";import{h as o}from"../../chunk-EU2WV53M.js";import"../../chunk-SWTOKXE3.js";import"../../chunk-T4HXXSET.js";import"../../chunk-ZGALPNQV.js";import"../../chunk-EKN4H4RV.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-PE6MZT4O.js";import"../../chunk-HWTRE7ZA.js";import"../../chunk-ZIGQO7R5.js";import"../../chunk-4TVQXTHY.js";import"../../chunk-MF5KGJWT.js";import"../../chunk-QRX2UVZ3.js";import"../../chunk-ZLEKYV7V.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-7H2MCYRO.js";import"../../chunk-TO35Z22E.js";import"../../chunk-SBU7XQ42.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-K6FJLTBX.js";import"../../chunk-GQE2JYJW.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-FC546GTB.js";import"../../chunk-LLHU72AA.js";export{o as _0x1,r as _0x2,x as _0x3};
2
+ import{m as x}from"../../chunk-MDJARXZT.js";import{N as r}from"../../chunk-SWU2T3IV.js";import{h as o}from"../../chunk-WS4VFEL7.js";import"../../chunk-Y5WJ4P52.js";import"../../chunk-DD4573FW.js";import"../../chunk-ZGALPNQV.js";import"../../chunk-EKN4H4RV.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-PE6MZT4O.js";import"../../chunk-B35KZPC6.js";import"../../chunk-MZ2FIAD2.js";import"../../chunk-4TVQXTHY.js";import"../../chunk-4O5AYOIW.js";import"../../chunk-EIZ4SUA5.js";import"../../chunk-HYUXOS4C.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-7H2MCYRO.js";import"../../chunk-4XDWWAOR.js";import"../../chunk-5ZKQRZMR.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-K6FJLTBX.js";import"../../chunk-GQE2JYJW.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-FC546GTB.js";import"../../chunk-LLHU72AA.js";export{o as _0x1,r as _0x2,x as _0x3};
3
3
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{a,b as p}from"../../chunk-TMGVB5QH.js";import{a as d,b as n,c as l,d as u,e as f,f as C,g as m}from"../../chunk-T4HXXSET.js";import"../../chunk-EKN4H4RV.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-HWTRE7ZA.js";import"../../chunk-ZIGQO7R5.js";import"../../chunk-4TVQXTHY.js";import"../../chunk-MF5KGJWT.js";import"../../chunk-QRX2UVZ3.js";import"../../chunk-ZLEKYV7V.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-7H2MCYRO.js";import"../../chunk-TO35Z22E.js";import"../../chunk-SBU7XQ42.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-K6FJLTBX.js";import"../../chunk-GQE2JYJW.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-FC546GTB.js";import"../../chunk-LLHU72AA.js";var r=class{calculateValueInUsd(o,t,i){return m(o,t,i)}getCoinInfo(o){return u(o)}whiteListed(o){return l(o)}whitelistCoins(){return n()}},c=new r,s=class extends a{coinList=c};async function w(e,o,t,i,S){return p(c,e,o,t,i,S)}export{r as CoinList,c as SuiCoinList,s as SuiDex,m as calculateValueInUsd,u as getCoinInfo,f as getCoinInfoWithFallback,w as getPairValue,C as getPrice,d as initCoinList,l as whiteListed,n as whitelistCoins};
2
+ import{a,b as p}from"../../chunk-TMGVB5QH.js";import{a as d,b as n,c as l,d as u,e as f,f as C,g as m}from"../../chunk-DD4573FW.js";import"../../chunk-EKN4H4RV.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-B35KZPC6.js";import"../../chunk-MZ2FIAD2.js";import"../../chunk-4TVQXTHY.js";import"../../chunk-4O5AYOIW.js";import"../../chunk-EIZ4SUA5.js";import"../../chunk-HYUXOS4C.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-7H2MCYRO.js";import"../../chunk-4XDWWAOR.js";import"../../chunk-5ZKQRZMR.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-K6FJLTBX.js";import"../../chunk-GQE2JYJW.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-FC546GTB.js";import"../../chunk-LLHU72AA.js";var r=class{calculateValueInUsd(o,t,i){return m(o,t,i)}getCoinInfo(o){return u(o)}whiteListed(o){return l(o)}whitelistCoins(){return n()}},c=new r,s=class extends a{coinList=c};async function w(e,o,t,i,S){return p(c,e,o,t,i,S)}export{r as CoinList,c as SuiCoinList,s as SuiDex,m as calculateValueInUsd,u as getCoinInfo,f as getCoinInfoWithFallback,w as getPairValue,C as getPrice,d as initCoinList,l as whiteListed,n as whitelistCoins};
3
3
  //# sourceMappingURL=index.js.map
package/lib/sui/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{a as e,b as f,c as g,d as h,e as i,f as j,h as k,i as l,j as m,k as n,l as o,m as p,n as q,o as r,p as s,q as t}from"../chunk-SWTOKXE3.js";import"../chunk-T4HXXSET.js";import"../chunk-ZGALPNQV.js";import{f as b,g as c,h as d}from"../chunk-EKN4H4RV.js";import"../chunk-F2HFFA4Z.js";import"../chunk-NHARQGR7.js";import"../chunk-PE6MZT4O.js";import"../chunk-HWTRE7ZA.js";import"../chunk-ZIGQO7R5.js";import{q as a}from"../chunk-4TVQXTHY.js";import"../chunk-MF5KGJWT.js";import"../chunk-QRX2UVZ3.js";import"../chunk-ZLEKYV7V.js";import"../chunk-2GOCSOX5.js";import"../chunk-7H2MCYRO.js";import"../chunk-TO35Z22E.js";import"../chunk-SBU7XQ42.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-K6FJLTBX.js";import"../chunk-GQE2JYJW.js";import"../chunk-DJQ5RDDN.js";import"../chunk-FC546GTB.js";import"../chunk-LLHU72AA.js";export{a as BUILTIN_TYPES,e as MoveCoder,i as SuiAddressContext,n as SuiAddressProcessor,q as SuiAddressProcessorTemplate,k as SuiBaseProcessor,g as SuiContext,m as SuiGlobalProcessor,l as SuiModulesProcessor,b as SuiNetwork,h as SuiObjectChangeContext,j as SuiObjectContext,o as SuiObjectProcessor,r as SuiObjectProcessorTemplate,t as SuiPlugin,p as SuiWrappedObjectProcessor,s as SuiWrappedObjectProcessorTemplate,f as defaultMoveCoder,c as getClient,d as getRpcEndpoint};
2
+ import{a as e,b as f,c as g,d as h,e as i,f as j,h as k,i as l,j as m,k as n,l as o,m as p,n as q,o as r,p as s,q as t}from"../chunk-Y5WJ4P52.js";import"../chunk-DD4573FW.js";import"../chunk-ZGALPNQV.js";import{f as b,g as c,h as d}from"../chunk-EKN4H4RV.js";import"../chunk-F2HFFA4Z.js";import"../chunk-NHARQGR7.js";import"../chunk-PE6MZT4O.js";import"../chunk-B35KZPC6.js";import"../chunk-MZ2FIAD2.js";import{q as a}from"../chunk-4TVQXTHY.js";import"../chunk-4O5AYOIW.js";import"../chunk-EIZ4SUA5.js";import"../chunk-HYUXOS4C.js";import"../chunk-2GOCSOX5.js";import"../chunk-7H2MCYRO.js";import"../chunk-4XDWWAOR.js";import"../chunk-5ZKQRZMR.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-K6FJLTBX.js";import"../chunk-GQE2JYJW.js";import"../chunk-DJQ5RDDN.js";import"../chunk-FC546GTB.js";import"../chunk-LLHU72AA.js";export{a as BUILTIN_TYPES,e as MoveCoder,i as SuiAddressContext,n as SuiAddressProcessor,q as SuiAddressProcessorTemplate,k as SuiBaseProcessor,g as SuiContext,m as SuiGlobalProcessor,l as SuiModulesProcessor,b as SuiNetwork,h as SuiObjectChangeContext,j as SuiObjectContext,o as SuiObjectProcessor,r as SuiObjectProcessorTemplate,t as SuiPlugin,p as SuiWrappedObjectProcessor,s as SuiWrappedObjectProcessorTemplate,f as defaultMoveCoder,c as getClient,d as getRpcEndpoint};
3
3
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{b as F}from"../chunk-O3IGCLZM.js";import"../chunk-DTZPQWAR.js";import{g as _}from"../chunk-SWTOKXE3.js";import"../chunk-T4HXXSET.js";import"../chunk-ZGALPNQV.js";import{f as g}from"../chunk-EKN4H4RV.js";import"../chunk-2JLUHA3R.js";import{c as T}from"../chunk-QYIO43ZC.js";import"../chunk-3FX7DHPT.js";import"../chunk-SSMP6EWG.js";import"../chunk-F2HFFA4Z.js";import"../chunk-NHARQGR7.js";import"../chunk-PE6MZT4O.js";import{d as M}from"../chunk-HWTRE7ZA.js";import"../chunk-PNA6LFOX.js";import"../chunk-ZIGQO7R5.js";import{a as D,d as u,n as E}from"../chunk-4TVQXTHY.js";import"../chunk-MF5KGJWT.js";import"../chunk-QRX2UVZ3.js";import"../chunk-ZLEKYV7V.js";import"../chunk-2GOCSOX5.js";import{a as m}from"../chunk-7H2MCYRO.js";import{D as a}from"../chunk-TO35Z22E.js";import"../chunk-SBU7XQ42.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-K6FJLTBX.js";import"../chunk-GQE2JYJW.js";import"../chunk-DJQ5RDDN.js";import{a as L}from"../chunk-FC546GTB.js";import{e as h}from"../chunk-LLHU72AA.js";var U=h(m(),1);import{Endpoints as q,ProcessorServiceImpl as G,State as j}from"@sentio/runtime";var I=class{server;constructor(e){this.server=e}testEntryFunctionCall(e,t=T.MAIN_NET){return this.testEntryFunctionCalls([e],t)}testEntryFunctionCalls(e,t=T.MAIN_NET){let n=[];for(let r of e){let s=this.buildEntryFunctionCallBinding(r,t);if(!s)throw Error("Invalid test transaction: "+JSON.stringify(r));n.push(s)}return this.server.processBindings({bindings:n})}buildEntryFunctionCallBinding(e,t=T.MAIN_NET){let n=e.payload;for(let r of this.server.contractConfigs)if(r.contract?.chainId===t){for(let s of r.moveCallConfigs)for(let o of s.filters)if(u(r.contract.address)+"::"+o.function===n.function)return{data:{aptCall:{transaction:e}},handlerIds:[s.handlerId],handlerType:a.APT_CALL}}}testEvent(e,t=T.MAIN_NET){let n=this.buildEventBinding(e,t);if(!n)throw Error("Invalid test event: "+JSON.stringify(e));return this.server.processBinding(n)}buildEventBinding(e,t=T.MAIN_NET){for(let n of this.server.contractConfigs)if(n.contract?.chainId===t){for(let r of n.moveEventConfigs)for(let s of r.filters)for(let o of e.events)if(u(n.contract.address)+"::"+s.type===E(o.type).qname)return{data:{aptEvent:{transaction:e}},handlerIds:[r.handlerId],handlerType:a.APT_EVENT}}}};var v=class{server;constructor(e){this.server=e}testInstructions(e){return this.server.processBindings({bindings:e.map(t=>({data:{raw:new Uint8Array,solInstruction:t},handlerIds:[],handlerType:a.SOL_INSTRUCTION}))})}};var f=h(m(),1),B=class{server;constructor(e){this.server=e}testTrace(e,t=f.EthChainId.ETHEREUM){return this.testTraces([e],t)}testTraces(e,t=f.EthChainId.ETHEREUM){let n=[];for(let r of e){let s=this.buildTraceBinding(r,t);if(!s)throw Error("Invalid test trace: "+JSON.stringify(r));n.push(s)}return this.server.processBindings({bindings:n})}buildTraceBinding(e,t=f.EthChainId.ETHEREUM){if(e.type!=="call"||!e.action.input)throw Error("Invalid test trace: "+JSON.stringify(e));let n=e.action.input.slice(0,10);for(let r of this.server.contractConfigs)if(r.contract?.chainId===t&&!(e.action.to?.toLowerCase()!==r.contract?.address.toLowerCase()&&r.contract?.address!=="*")){for(let s of r.traceConfigs)if(s.signature==n)return{data:{ethTrace:{trace:e,timestamp:new Date}},handlerIds:[s.handlerId],handlerType:a.ETH_TRACE}}}testLog(e,t=f.EthChainId.ETHEREUM){return this.testLogs([e],t)}testLogs(e,t=f.EthChainId.ETHEREUM){let n=[];for(let r of e){let s=this.buildLogBinding(r,t);if(!s)throw Error("Invalid test log: "+JSON.stringify(r));n.push(s)}return this.server.processBindings({bindings:n})}buildLogBinding(e,t=f.EthChainId.ETHEREUM){for(let n of this.server.contractConfigs)if(n.contract?.chainId===t&&!(e.address.toLowerCase()!==n.contract?.address.toLowerCase()&&n.contract?.address!=="*"))for(let r of n.logConfigs)for(let s of r.filters){let o=!0;for(let c in s.topics){let d=e.topics[c],l=s.topics[c].hashes;if(l.length!==0&&!l.find(p=>p.toLowerCase()===d.toLowerCase())){o=!1;break}}if(o)return{data:{ethLog:{log:e,timestamp:new Date}},handlerIds:[r.handlerId],handlerType:a.ETH_LOG}}}testAccountLog(e,t,n=f.EthChainId.ETHEREUM){return this.testAccountLogs(e,[t],n)}testAccountLogs(e,t,n=f.EthChainId.ETHEREUM){let r=[];for(let s of t){let o=this.buildAccountLogBinding(e,s,n);if(!o)throw Error("Invalid test log: "+JSON.stringify(s));r.push(o)}return this.server.processBindings({bindings:r})}buildAccountLogBinding(e,t,n=f.EthChainId.ETHEREUM){for(let r of this.server.accountConfigs)if(r.chainId===n&&e.toLowerCase()===r.address.toLowerCase())for(let s of r.logConfigs)for(let o of s.filters){let c=!0;for(let d in o.topics){let l=t.topics[d],p=o.topics[d].hashes;if(p.length!==0&&!p.find(w=>w.toLowerCase()===l.toLowerCase())){c=!1;break}}if(c)return{data:{ethLog:{log:t,timestamp:new Date}},handlerIds:[s.handlerId],handlerType:a.ETH_LOG}}}testBlock(e,t=f.EthChainId.ETHEREUM){return this.testBlocks([e],t)}testBlocks(e,t=f.EthChainId.ETHEREUM){let n=[];for(let r of e){let s=this.buildBlockBinding(r,t);if(!s)throw Error("Invalid test block: "+JSON.stringify(r));n.push(s)}return this.server.processBindings({bindings:n})}buildBlockBinding(e,t=f.EthChainId.ETHEREUM){let n={data:{ethBlock:{block:e}},handlerType:a.ETH_BLOCK,handlerIds:[]};for(let r of this.server.contractConfigs){if(r.contract?.chainId!==t)continue;let s=e.number;if(!(s<r.startBlock)&&!(r.endBlock!==0n&&s>=r.endBlock))for(let o of r.intervalConfigs)n.handlerIds.push(o.handlerId)}return n}};var S=class{server;constructor(e){this.server=e}testEntryFunctionCall(e,t=g.MAIN_NET){return this.testEntryFunctionCalls([e],t)}testEntryFunctionCalls(e,t=g.MAIN_NET){let n=[];for(let r of e){let s=this.buildEntryFunctionCallBinding(r,t);if(!s)throw Error("Invalid test transaction: "+JSON.stringify(r));n.push(s)}return this.server.processBindings({bindings:n})}buildEntryFunctionCallBinding(e,t=g.MAIN_NET){let n=_(e);for(let r of n){let s=[u(r.package),r.module,r.function].join(D);for(let o of this.server.contractConfigs)if(o.contract?.chainId===t){for(let c of o.moveCallConfigs)for(let d of c.filters)if(u(o.contract.address)+"::"+d.function===s)return{data:{suiCall:{transaction:e,timestamp:new Date,slot:10000n}},handlerIds:[c.handlerId],handlerType:a.SUI_CALL}}}}testEvent(e,t=g.MAIN_NET){let n=this.buildEventBinding(e,t);if(!n)throw Error("Invalid test event: "+JSON.stringify(e));return this.server.processBinding(n)}testGlobalTransaction(e,t=g.MAIN_NET){let n=[];for(let s of this.server.contractConfigs)if(s.contract?.address==="*")for(let o of s.moveCallConfigs)o.filters.length===1&&o.filters[0].function===""&&n.push(o.handlerId);if(n.length===0)throw Error("Invalid test global transaction: "+JSON.stringify(e));let r={handlerIds:n,handlerType:a.SUI_CALL,data:{suiCall:{transaction:e,timestamp:e.timestampMs?new Date(e.timestampMs):new Date,slot:BigInt(e.checkpoint||0)}}};return this.server.processBinding(r)}buildEventBinding(e,t=g.MAIN_NET){for(let n of this.server.contractConfigs)if(n.contract?.chainId===t){for(let r of n.moveEventConfigs)for(let s of r.filters)for(let o of e.events||[])if(u(n.contract.address)+"::"+s.type===E(o.type).qname)return{data:{suiEvent:{transaction:e,timestamp:new Date(e.timestampMs||0),slot:10000n}},handlerIds:[r.handlerId],handlerType:a.SUI_EVENT}}}};var N=class{server;constructor(e){this.server=e}testOnTransaction(e,t=F.TEST_NET){let n=this.buildBinding(e,t);if(!n)throw Error("Invalid test transaction: "+JSON.stringify(e));return this.server.processBindings({bindings:n})}buildBinding(e,t){let n=[];for(let r of this.server.contractConfigs)if(r.contract?.chainId===t){for(let s of r.fuelCallConfigs){let o={data:{fuelCall:{transaction:e,timestamp:new Date}},handlerIds:[s.handlerId],handlerType:a.FUEL_CALL},c=s.filters[0]?.function;if(c)for(let d of e.status.receipts||[])d.receiptType=="CALL"&&d.param1==c&&n.push(o);else n.push(o)}for(let s of r.fuelLogConfigs){let o={data:{fuelCall:{transaction:e,timestamp:new Date}},handlerIds:[s.handlerId],handlerType:a.FUEL_CALL},c=s.logIds;for(let d of e.status.receipts||[])if((d.receiptType=="LOG"||d.receiptType=="LOG_DATA")&&c.includes(d.rb)){n.push(o);break}}for(let s of r.assetConfigs){let o={data:{fuelCall:{transaction:e,timestamp:new Date}},handlerIds:[s.handlerId],handlerType:a.FUEL_CALL};n.push(o)}}return n}};var R=h(m(),1),x={INJECTIVE_MAINNET:R.CosmosChainId.INJECTIVE_MAINNET,INJECTIVE_TESTNET:R.CosmosChainId.INJECTIVE_TESTNET};var P=class{server;constructor(e){this.server=e}testOnTransaction(e,t=x.INJECTIVE_TESTNET){let n=this.buildBinding(e,t);if(!n)throw Error("Invalid test transaction: "+JSON.stringify(e));return this.server.processBindings({bindings:n})}buildBinding(e,t){let n=[];for(let r of this.server.contractConfigs)if(r.contract?.chainId===t)for(let s of r.cosmosLogConfigs){let o={data:{cosmosCall:{transaction:e,timestamp:new Date}},handlerIds:[s.handlerId],handlerType:a.COSMOS_CALL},c=s.logFilters;for(let d of e.logs||[])if(d.events.find(l=>c.includes(l.type))){n.push(o);break}}return n}};var O=h(m(),1),y=class{server;constructor(e){this.server=e}testOnEvents(e,t=O.StarknetChainId.STARKNET_SEPOLIA){let n=this.buildBinding(e,t);if(!n)throw Error("Invalid test : "+JSON.stringify(e));return this.server.processBindings({bindings:n})}buildBinding(e,t){let n=[],r=Array.isArray(e)?e:[e];for(let s of r)for(let o of this.server.contractConfigs)if(o.contract?.chainId===t)for(let c of o.starknetEventConfigs){let d={data:{starknetEvents:{result:s,timestamp:new Date}},handlerIds:[c.handlerId],handlerType:a.STARKNET_EVENT},l=c.filters,p=s.keys;for(let w of p)for(let J of l)if(J.keys.includes(w))return n.push(d),n}return n}};var H=h(m(),1);var b=class{server;constructor(e){this.server=e}testOnTransactions(e,t=H.BTCChainId.BTC_TESTNET){let n=this.buildBinding(e,t);if(!n)throw Error("Invalid test : "+JSON.stringify(e));return this.server.processBindings({bindings:n})}buildBinding(e,t){let n=[];for(let r of this.server.contractConfigs)if(r.contract?.chainId===t)for(let s of r.btcTransactionConfigs){let o={data:{btcTransaction:e},handlerIds:[s.handlerId],handlerType:a.BTC_TRANSACTION};n.push(o)}return n}};var C={};function K(){j.reset()}var k=class{service;contractConfigs;accountConfigs;aptos;eth;solana;sui;fuel;cosmos;starknet;btc;constructor(e,t={}){K(),this.service=new G(e),this.aptos=new I(this),this.solana=new v(this),this.eth=new B(this),this.sui=new S(this),this.fuel=new N(this),this.cosmos=new P(this),this.starknet=new y(this),this.btc=new b(this);for(let n in U.CHAIN_MAP){let r=t[n]||"";q.INSTANCE.chainServer.set(n,r)}}async start(e={templateInstances:[]},t=C){let n=await this.service.start(e,t),r=await this.getConfig({});return this.contractConfigs=r.contractConfigs,this.accountConfigs=r.accountConfigs,n}stop(e,t=C){return this.service.stop(e,t)}getConfig(e,t=C){return this.service.getConfig(e,t)}processBindings(e,t=C){return this.service.processBindings(e,t)}processBinding(e,t=C){return this.service.processBindings({bindings:[e]},t)}processBindingsStream(e,t){throw new Error("Method not implemented.")}preprocessBindingsStream(e,t){throw new Error("Method not implemented.")}};function A(i){if(i!==void 0){if(i.doubleValue!==void 0)return i.doubleValue;if(i.bigInteger!==void 0){let e=M(i.bigInteger.data);return i.bigInteger.negative&&(e=-e),e}if(i.bigDecimal!==void 0)return new L(i.bigDecimal)}}function X(i,e){if(i){for(let t of i.counters)if(t.metadata?.name===e)return A(t.metricValue)}}function z(i,e){if(i){for(let t of i.gauges)if(t.metadata?.name===e)return A(t.metricValue)}}var V=h(m(),1);import{Endpoints as Q}from"@sentio/runtime";function W(i){let e=[];Array.isArray(i)||(i=[i]);for(let t of Object.keys(V.CHAIN_MAP)){let n="TEST_ENDPOINT_"+t,r=process.env[n];r&&(e.push(t),Q.INSTANCE.chainServer.set(t,r))}for(let t of i)if(!e.includes(t))return!1;return!0}export{A as MetricValueToNumber,k as TestProcessorServer,X as firstCounterValue,z as firstGaugeValue,W as loadTestProvidersFromEnv};
2
+ import{b as F}from"../chunk-HZPD32NX.js";import"../chunk-DLSAUULX.js";import{g as _}from"../chunk-Y5WJ4P52.js";import"../chunk-DD4573FW.js";import"../chunk-ZGALPNQV.js";import{f as g}from"../chunk-EKN4H4RV.js";import"../chunk-445FSAJP.js";import{c as T}from"../chunk-QYIO43ZC.js";import"../chunk-3FX7DHPT.js";import"../chunk-SSMP6EWG.js";import"../chunk-F2HFFA4Z.js";import"../chunk-NHARQGR7.js";import"../chunk-PE6MZT4O.js";import{d as M}from"../chunk-B35KZPC6.js";import"../chunk-PNA6LFOX.js";import"../chunk-MZ2FIAD2.js";import{a as D,d as u,n as E}from"../chunk-4TVQXTHY.js";import"../chunk-4O5AYOIW.js";import"../chunk-EIZ4SUA5.js";import"../chunk-HYUXOS4C.js";import"../chunk-2GOCSOX5.js";import{a as m}from"../chunk-7H2MCYRO.js";import{D as a}from"../chunk-4XDWWAOR.js";import"../chunk-5ZKQRZMR.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-K6FJLTBX.js";import"../chunk-GQE2JYJW.js";import"../chunk-DJQ5RDDN.js";import{a as L}from"../chunk-FC546GTB.js";import{e as h}from"../chunk-LLHU72AA.js";var U=h(m(),1);import{Endpoints as q,ProcessorServiceImpl as G,State as j}from"@sentio/runtime";var I=class{server;constructor(e){this.server=e}testEntryFunctionCall(e,t=T.MAIN_NET){return this.testEntryFunctionCalls([e],t)}testEntryFunctionCalls(e,t=T.MAIN_NET){let n=[];for(let r of e){let s=this.buildEntryFunctionCallBinding(r,t);if(!s)throw Error("Invalid test transaction: "+JSON.stringify(r));n.push(s)}return this.server.processBindings({bindings:n})}buildEntryFunctionCallBinding(e,t=T.MAIN_NET){let n=e.payload;for(let r of this.server.contractConfigs)if(r.contract?.chainId===t){for(let s of r.moveCallConfigs)for(let o of s.filters)if(u(r.contract.address)+"::"+o.function===n.function)return{data:{aptCall:{transaction:e}},handlerIds:[s.handlerId],handlerType:a.APT_CALL}}}testEvent(e,t=T.MAIN_NET){let n=this.buildEventBinding(e,t);if(!n)throw Error("Invalid test event: "+JSON.stringify(e));return this.server.processBinding(n)}buildEventBinding(e,t=T.MAIN_NET){for(let n of this.server.contractConfigs)if(n.contract?.chainId===t){for(let r of n.moveEventConfigs)for(let s of r.filters)for(let o of e.events)if(u(n.contract.address)+"::"+s.type===E(o.type).qname)return{data:{aptEvent:{transaction:e}},handlerIds:[r.handlerId],handlerType:a.APT_EVENT}}}};var v=class{server;constructor(e){this.server=e}testInstructions(e){return this.server.processBindings({bindings:e.map(t=>({data:{raw:new Uint8Array,solInstruction:t},handlerIds:[],handlerType:a.SOL_INSTRUCTION}))})}};var f=h(m(),1),B=class{server;constructor(e){this.server=e}testTrace(e,t=f.EthChainId.ETHEREUM){return this.testTraces([e],t)}testTraces(e,t=f.EthChainId.ETHEREUM){let n=[];for(let r of e){let s=this.buildTraceBinding(r,t);if(!s)throw Error("Invalid test trace: "+JSON.stringify(r));n.push(s)}return this.server.processBindings({bindings:n})}buildTraceBinding(e,t=f.EthChainId.ETHEREUM){if(e.type!=="call"||!e.action.input)throw Error("Invalid test trace: "+JSON.stringify(e));let n=e.action.input.slice(0,10);for(let r of this.server.contractConfigs)if(r.contract?.chainId===t&&!(e.action.to?.toLowerCase()!==r.contract?.address.toLowerCase()&&r.contract?.address!=="*")){for(let s of r.traceConfigs)if(s.signature==n)return{data:{ethTrace:{trace:e,timestamp:new Date}},handlerIds:[s.handlerId],handlerType:a.ETH_TRACE}}}testLog(e,t=f.EthChainId.ETHEREUM){return this.testLogs([e],t)}testLogs(e,t=f.EthChainId.ETHEREUM){let n=[];for(let r of e){let s=this.buildLogBinding(r,t);if(!s)throw Error("Invalid test log: "+JSON.stringify(r));n.push(s)}return this.server.processBindings({bindings:n})}buildLogBinding(e,t=f.EthChainId.ETHEREUM){for(let n of this.server.contractConfigs)if(n.contract?.chainId===t&&!(e.address.toLowerCase()!==n.contract?.address.toLowerCase()&&n.contract?.address!=="*"))for(let r of n.logConfigs)for(let s of r.filters){let o=!0;for(let c in s.topics){let d=e.topics[c],l=s.topics[c].hashes;if(l.length!==0&&!l.find(p=>p.toLowerCase()===d.toLowerCase())){o=!1;break}}if(o)return{data:{ethLog:{log:e,timestamp:new Date}},handlerIds:[r.handlerId],handlerType:a.ETH_LOG}}}testAccountLog(e,t,n=f.EthChainId.ETHEREUM){return this.testAccountLogs(e,[t],n)}testAccountLogs(e,t,n=f.EthChainId.ETHEREUM){let r=[];for(let s of t){let o=this.buildAccountLogBinding(e,s,n);if(!o)throw Error("Invalid test log: "+JSON.stringify(s));r.push(o)}return this.server.processBindings({bindings:r})}buildAccountLogBinding(e,t,n=f.EthChainId.ETHEREUM){for(let r of this.server.accountConfigs)if(r.chainId===n&&e.toLowerCase()===r.address.toLowerCase())for(let s of r.logConfigs)for(let o of s.filters){let c=!0;for(let d in o.topics){let l=t.topics[d],p=o.topics[d].hashes;if(p.length!==0&&!p.find(w=>w.toLowerCase()===l.toLowerCase())){c=!1;break}}if(c)return{data:{ethLog:{log:t,timestamp:new Date}},handlerIds:[s.handlerId],handlerType:a.ETH_LOG}}}testBlock(e,t=f.EthChainId.ETHEREUM){return this.testBlocks([e],t)}testBlocks(e,t=f.EthChainId.ETHEREUM){let n=[];for(let r of e){let s=this.buildBlockBinding(r,t);if(!s)throw Error("Invalid test block: "+JSON.stringify(r));n.push(s)}return this.server.processBindings({bindings:n})}buildBlockBinding(e,t=f.EthChainId.ETHEREUM){let n={data:{ethBlock:{block:e}},handlerType:a.ETH_BLOCK,handlerIds:[]};for(let r of this.server.contractConfigs){if(r.contract?.chainId!==t)continue;let s=e.number;if(!(s<r.startBlock)&&!(r.endBlock!==0n&&s>=r.endBlock))for(let o of r.intervalConfigs)n.handlerIds.push(o.handlerId)}return n}};var S=class{server;constructor(e){this.server=e}testEntryFunctionCall(e,t=g.MAIN_NET){return this.testEntryFunctionCalls([e],t)}testEntryFunctionCalls(e,t=g.MAIN_NET){let n=[];for(let r of e){let s=this.buildEntryFunctionCallBinding(r,t);if(!s)throw Error("Invalid test transaction: "+JSON.stringify(r));n.push(s)}return this.server.processBindings({bindings:n})}buildEntryFunctionCallBinding(e,t=g.MAIN_NET){let n=_(e);for(let r of n){let s=[u(r.package),r.module,r.function].join(D);for(let o of this.server.contractConfigs)if(o.contract?.chainId===t){for(let c of o.moveCallConfigs)for(let d of c.filters)if(u(o.contract.address)+"::"+d.function===s)return{data:{suiCall:{transaction:e,timestamp:new Date,slot:10000n}},handlerIds:[c.handlerId],handlerType:a.SUI_CALL}}}}testEvent(e,t=g.MAIN_NET){let n=this.buildEventBinding(e,t);if(!n)throw Error("Invalid test event: "+JSON.stringify(e));return this.server.processBinding(n)}testGlobalTransaction(e,t=g.MAIN_NET){let n=[];for(let s of this.server.contractConfigs)if(s.contract?.address==="*")for(let o of s.moveCallConfigs)o.filters.length===1&&o.filters[0].function===""&&n.push(o.handlerId);if(n.length===0)throw Error("Invalid test global transaction: "+JSON.stringify(e));let r={handlerIds:n,handlerType:a.SUI_CALL,data:{suiCall:{transaction:e,timestamp:e.timestampMs?new Date(e.timestampMs):new Date,slot:BigInt(e.checkpoint||0)}}};return this.server.processBinding(r)}buildEventBinding(e,t=g.MAIN_NET){for(let n of this.server.contractConfigs)if(n.contract?.chainId===t){for(let r of n.moveEventConfigs)for(let s of r.filters)for(let o of e.events||[])if(u(n.contract.address)+"::"+s.type===E(o.type).qname)return{data:{suiEvent:{transaction:e,timestamp:new Date(e.timestampMs||0),slot:10000n}},handlerIds:[r.handlerId],handlerType:a.SUI_EVENT}}}};var N=class{server;constructor(e){this.server=e}testOnTransaction(e,t=F.TEST_NET){let n=this.buildBinding(e,t);if(!n)throw Error("Invalid test transaction: "+JSON.stringify(e));return this.server.processBindings({bindings:n})}buildBinding(e,t){let n=[];for(let r of this.server.contractConfigs)if(r.contract?.chainId===t){for(let s of r.fuelCallConfigs){let o={data:{fuelCall:{transaction:e,timestamp:new Date}},handlerIds:[s.handlerId],handlerType:a.FUEL_CALL},c=s.filters[0]?.function;if(c)for(let d of e.status.receipts||[])d.receiptType=="CALL"&&d.param1==c&&n.push(o);else n.push(o)}for(let s of r.fuelLogConfigs){let o={data:{fuelCall:{transaction:e,timestamp:new Date}},handlerIds:[s.handlerId],handlerType:a.FUEL_CALL},c=s.logIds;for(let d of e.status.receipts||[])if((d.receiptType=="LOG"||d.receiptType=="LOG_DATA")&&c.includes(d.rb)){n.push(o);break}}for(let s of r.assetConfigs){let o={data:{fuelCall:{transaction:e,timestamp:new Date}},handlerIds:[s.handlerId],handlerType:a.FUEL_CALL};n.push(o)}}return n}};var R=h(m(),1),x={INJECTIVE_MAINNET:R.CosmosChainId.INJECTIVE_MAINNET,INJECTIVE_TESTNET:R.CosmosChainId.INJECTIVE_TESTNET};var P=class{server;constructor(e){this.server=e}testOnTransaction(e,t=x.INJECTIVE_TESTNET){let n=this.buildBinding(e,t);if(!n)throw Error("Invalid test transaction: "+JSON.stringify(e));return this.server.processBindings({bindings:n})}buildBinding(e,t){let n=[];for(let r of this.server.contractConfigs)if(r.contract?.chainId===t)for(let s of r.cosmosLogConfigs){let o={data:{cosmosCall:{transaction:e,timestamp:new Date}},handlerIds:[s.handlerId],handlerType:a.COSMOS_CALL},c=s.logFilters;for(let d of e.logs||[])if(d.events.find(l=>c.includes(l.type))){n.push(o);break}}return n}};var O=h(m(),1),y=class{server;constructor(e){this.server=e}testOnEvents(e,t=O.StarknetChainId.STARKNET_SEPOLIA){let n=this.buildBinding(e,t);if(!n)throw Error("Invalid test : "+JSON.stringify(e));return this.server.processBindings({bindings:n})}buildBinding(e,t){let n=[],r=Array.isArray(e)?e:[e];for(let s of r)for(let o of this.server.contractConfigs)if(o.contract?.chainId===t)for(let c of o.starknetEventConfigs){let d={data:{starknetEvents:{result:s,timestamp:new Date}},handlerIds:[c.handlerId],handlerType:a.STARKNET_EVENT},l=c.filters,p=s.keys;for(let w of p)for(let J of l)if(J.keys.includes(w))return n.push(d),n}return n}};var H=h(m(),1);var b=class{server;constructor(e){this.server=e}testOnTransactions(e,t=H.BTCChainId.BTC_TESTNET){let n=this.buildBinding(e,t);if(!n)throw Error("Invalid test : "+JSON.stringify(e));return this.server.processBindings({bindings:n})}buildBinding(e,t){let n=[];for(let r of this.server.contractConfigs)if(r.contract?.chainId===t)for(let s of r.btcTransactionConfigs){let o={data:{btcTransaction:e},handlerIds:[s.handlerId],handlerType:a.BTC_TRANSACTION};n.push(o)}return n}};var C={};function K(){j.reset()}var k=class{service;contractConfigs;accountConfigs;aptos;eth;solana;sui;fuel;cosmos;starknet;btc;constructor(e,t={}){K(),this.service=new G(e),this.aptos=new I(this),this.solana=new v(this),this.eth=new B(this),this.sui=new S(this),this.fuel=new N(this),this.cosmos=new P(this),this.starknet=new y(this),this.btc=new b(this);for(let n in U.CHAIN_MAP){let r=t[n]||"";q.INSTANCE.chainServer.set(n,r)}}async start(e={templateInstances:[]},t=C){let n=await this.service.start(e,t),r=await this.getConfig({});return this.contractConfigs=r.contractConfigs,this.accountConfigs=r.accountConfigs,n}stop(e,t=C){return this.service.stop(e,t)}getConfig(e,t=C){return this.service.getConfig(e,t)}processBindings(e,t=C){return this.service.processBindings(e,t)}processBinding(e,t=C){return this.service.processBindings({bindings:[e]},t)}processBindingsStream(e,t){throw new Error("Method not implemented.")}preprocessBindingsStream(e,t){throw new Error("Method not implemented.")}};function A(i){if(i!==void 0){if(i.doubleValue!==void 0)return i.doubleValue;if(i.bigInteger!==void 0){let e=M(i.bigInteger.data);return i.bigInteger.negative&&(e=-e),e}if(i.bigDecimal!==void 0)return new L(i.bigDecimal)}}function X(i,e){if(i){for(let t of i.counters)if(t.metadata?.name===e)return A(t.metricValue)}}function z(i,e){if(i){for(let t of i.gauges)if(t.metadata?.name===e)return A(t.metricValue)}}var V=h(m(),1);import{Endpoints as Q}from"@sentio/runtime";function W(i){let e=[];Array.isArray(i)||(i=[i]);for(let t of Object.keys(V.CHAIN_MAP)){let n="TEST_ENDPOINT_"+t,r=process.env[n];r&&(e.push(t),Q.INSTANCE.chainServer.set(t,r))}for(let t of i)if(!e.includes(t))return!1;return!0}export{A as MetricValueToNumber,k as TestProcessorServer,X as firstCounterValue,z as firstGaugeValue,W as loadTestProvidersFromEnv};
3
3
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{c as a,d as b,e as c,f as d,g as e,h as f,i as g,j as h,k as i,l as j,m as k,n as l}from"../chunk-HWTRE7ZA.js";import"../chunk-MF5KGJWT.js";import"../chunk-QRX2UVZ3.js";import"../chunk-ZLEKYV7V.js";import"../chunk-2GOCSOX5.js";import"../chunk-7H2MCYRO.js";import"../chunk-TO35Z22E.js";import"../chunk-SBU7XQ42.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-K6FJLTBX.js";import"../chunk-GQE2JYJW.js";import"../chunk-DJQ5RDDN.js";import"../chunk-FC546GTB.js";import"../chunk-LLHU72AA.js";export{f as EthereumDexPrice,d as PriceUnit,g as SepoliaDexPrice,b as bytesToBigInt,a as estimateBlockNumberAtDate,k as getCoinsThatHasPrice,e as getPackageRoot,j as getPriceBySymbol,i as getPriceByType,h as getPriceClient,l as ignoreEthCallException,c as token};
2
+ import{c as a,d as b,e as c,f as d,g as e,h as f,i as g,j as h,k as i,l as j,m as k,n as l}from"../chunk-B35KZPC6.js";import"../chunk-4O5AYOIW.js";import"../chunk-EIZ4SUA5.js";import"../chunk-HYUXOS4C.js";import"../chunk-2GOCSOX5.js";import"../chunk-7H2MCYRO.js";import"../chunk-4XDWWAOR.js";import"../chunk-5ZKQRZMR.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-K6FJLTBX.js";import"../chunk-GQE2JYJW.js";import"../chunk-DJQ5RDDN.js";import"../chunk-FC546GTB.js";import"../chunk-LLHU72AA.js";export{f as EthereumDexPrice,d as PriceUnit,g as SepoliaDexPrice,b as bytesToBigInt,a as estimateBlockNumberAtDate,k as getCoinsThatHasPrice,e as getPackageRoot,j as getPriceBySymbol,i as getPriceByType,h as getPriceClient,l as ignoreEthCallException,c as token};
3
3
  //# sourceMappingURL=index.js.map