@sentio/sdk-bundle 2.44.0 → 2.44.1-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 (45) 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/chunk-F6O7Z5YC.js +6 -0
  7. package/lib/chunk-F6O7Z5YC.js.map +1 -0
  8. package/lib/{chunk-QTRTXIKL.js → chunk-FAZ3MF2Y.js} +2 -2
  9. package/lib/{chunk-TVLODLMF.js → chunk-KJU5FRRJ.js} +2 -2
  10. package/lib/chunk-LN5QJQIM.js +5 -0
  11. package/lib/chunk-LN5QJQIM.js.map +1 -0
  12. package/lib/{chunk-43AULYHS.js → chunk-NCOPZM3S.js} +2 -2
  13. package/lib/chunk-TTZSFKIM.js +16 -0
  14. package/lib/chunk-TTZSFKIM.js.map +1 -0
  15. package/lib/{chunk-HRWNB6TA.js → chunk-UNDTHQXJ.js} +2 -2
  16. package/lib/{chunk-FOPG6CCD.js → chunk-VQRG4IVB.js} +2 -2
  17. package/lib/{chunk-GJZNIDSI.js → chunk-Y5C3UST2.js} +2 -2
  18. package/lib/fuel/fuel-plugin.d.ts.map +1 -1
  19. package/lib/fuel/index.js +1 -1
  20. package/lib/solana/builtin/types.d.ts +4 -4
  21. package/lib/sui/builtin/0x1.js +1 -1
  22. package/lib/sui/builtin/0x2.js +1 -1
  23. package/lib/sui/builtin/0x3.js +1 -1
  24. package/lib/sui/builtin/index.js +1 -1
  25. package/lib/sui/ext/index.js +1 -1
  26. package/lib/sui/index.js +1 -1
  27. package/lib/testing/index.js +1 -1
  28. package/lib/utils/index.js +1 -1
  29. package/lib/utils/price.d.ts +4 -338
  30. package/lib/utils/price.d.ts.map +1 -1
  31. package/package.json +2 -2
  32. package/src/fuel/fuel-plugin.ts +9 -2
  33. package/src/utils/price.ts +19 -27
  34. package/lib/chunk-GELZJPWE.js +0 -6
  35. package/lib/chunk-GELZJPWE.js.map +0 -1
  36. package/lib/chunk-RFCXI7MC.js +0 -16
  37. package/lib/chunk-RFCXI7MC.js.map +0 -1
  38. package/lib/chunk-Y5DGYRRN.js +0 -5
  39. package/lib/chunk-Y5DGYRRN.js.map +0 -1
  40. /package/lib/{chunk-QTRTXIKL.js.map → chunk-FAZ3MF2Y.js.map} +0 -0
  41. /package/lib/{chunk-TVLODLMF.js.map → chunk-KJU5FRRJ.js.map} +0 -0
  42. /package/lib/{chunk-43AULYHS.js.map → chunk-NCOPZM3S.js.map} +0 -0
  43. /package/lib/{chunk-HRWNB6TA.js.map → chunk-UNDTHQXJ.js.map} +0 -0
  44. /package/lib/{chunk-FOPG6CCD.js.map → chunk-VQRG4IVB.js.map} +0 -0
  45. /package/lib/{chunk-GJZNIDSI.js.map → chunk-Y5C3UST2.js.map} +0 -0
@@ -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,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,gBAAkD;IAEnE,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
+ {"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;IAqE7C,iBAAiB,gBAAkD;IAEnE,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;IAWtD,KAAK,CAAC,OAAO,EAAE,YAAY;IAUjC,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"}
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,p,q,r,s,t,u}from"../chunk-Y5DGYRRN.js";import"../chunk-S2KNAER3.js";import"../chunk-SF3GAPKY.js";import"../chunk-6TCLX2EB.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-FC546GTB.js";import"../chunk-LLHU72AA.js";export{h as DEFAULT_FUEL_FETCH_CONFIG,t as FuelAbstractProcessor,o as FuelAssetProcessor,s as FuelBaseProcessorTemplate,e as FuelCall,f as FuelContext,g as FuelContractContext,p as FuelGlobalProcessor,b as FuelNetwork,q as FuelPlugin,k as FuelProcessor,a as FuelProcessorState,r as FuelProcessorTemplateProcessorState,u as TypedCall,n as addFuelProcessor,i as decodeFuelTransaction,j as decodeFuelTransactionWithAbi,m as getFuelProcessor,l as getOptionsSignature,d as getProvider,c as getRpcEndpoint};
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u}from"../chunk-LN5QJQIM.js";import"../chunk-S2KNAER3.js";import"../chunk-SF3GAPKY.js";import"../chunk-6TCLX2EB.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-FC546GTB.js";import"../chunk-LLHU72AA.js";export{h as DEFAULT_FUEL_FETCH_CONFIG,t as FuelAbstractProcessor,o as FuelAssetProcessor,s as FuelBaseProcessorTemplate,e as FuelCall,f as FuelContext,g as FuelContractContext,p as FuelGlobalProcessor,b as FuelNetwork,q as FuelPlugin,k as FuelProcessor,a as FuelProcessorState,r as FuelProcessorTemplateProcessorState,u as TypedCall,n as addFuelProcessor,i as decodeFuelTransaction,j as decodeFuelTransactionWithAbi,m as getFuelProcessor,l as getOptionsSignature,d as getProvider,c as getRpcEndpoint};
3
3
  //# sourceMappingURL=index.js.map
@@ -74,8 +74,8 @@ declare const InitializeMultisig: import("superstruct_solana").Struct<{
74
74
  }>;
75
75
  export type Transfer = Infer<typeof Transfer>;
76
76
  export declare const Transfer: import("superstruct_solana").Struct<{
77
- source: String;
78
77
  amount: string | number;
78
+ source: String;
79
79
  destination: String;
80
80
  signers?: String[] | undefined;
81
81
  authority?: String | undefined;
@@ -90,8 +90,8 @@ export declare const Transfer: import("superstruct_solana").Struct<{
90
90
  }>;
91
91
  export type Approve = Infer<typeof Approve>;
92
92
  declare const Approve: import("superstruct_solana").Struct<{
93
- source: String;
94
93
  amount: string | number;
94
+ source: String;
95
95
  delegate: String;
96
96
  owner?: String | undefined;
97
97
  signers?: String[] | undefined;
@@ -213,8 +213,8 @@ declare const ThawAccount: import("superstruct_solana").Struct<{
213
213
  }>;
214
214
  export type TransferChecked = Infer<typeof TransferChecked>;
215
215
  export declare const TransferChecked: import("superstruct_solana").Struct<{
216
- source: String;
217
216
  mint: String;
217
+ source: String;
218
218
  destination: String;
219
219
  tokenAmount: {
220
220
  decimals: number;
@@ -243,8 +243,8 @@ export declare const TransferChecked: import("superstruct_solana").Struct<{
243
243
  }>;
244
244
  export type ApproveChecked = Infer<typeof ApproveChecked>;
245
245
  declare const ApproveChecked: import("superstruct_solana").Struct<{
246
- source: String;
247
246
  mint: String;
247
+ source: String;
248
248
  delegate: String;
249
249
  tokenAmount: {
250
250
  decimals: number;
@@ -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-FOPG6CCD.js";import"../../chunk-TVLODLMF.js";import"../../chunk-HRWNB6TA.js";import"../../chunk-ZGALPNQV.js";import"../../chunk-HCZJEB6X.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-TWQHG3K7.js";import"../../chunk-RFCXI7MC.js";import"../../chunk-77WBP3SS.js";import"../../chunk-4TVQXTHY.js";import"../../chunk-XTYX5UX2.js";import"../../chunk-JOOYR6WO.js";import"../../chunk-PYAIESZU.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-S2KNAER3.js";import"../../chunk-SF3GAPKY.js";import"../../chunk-6TCLX2EB.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.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-VQRG4IVB.js";import"../../chunk-KJU5FRRJ.js";import"../../chunk-UNDTHQXJ.js";import"../../chunk-ZGALPNQV.js";import"../../chunk-HCZJEB6X.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-TWQHG3K7.js";import"../../chunk-F6O7Z5YC.js";import"../../chunk-77WBP3SS.js";import"../../chunk-4TVQXTHY.js";import"../../chunk-XTYX5UX2.js";import"../../chunk-JOOYR6WO.js";import"../../chunk-PYAIESZU.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-S2KNAER3.js";import"../../chunk-SF3GAPKY.js";import"../../chunk-6TCLX2EB.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.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-43AULYHS.js";import"../../chunk-FOPG6CCD.js";import"../../chunk-TVLODLMF.js";import"../../chunk-HRWNB6TA.js";import"../../chunk-ZGALPNQV.js";import"../../chunk-HCZJEB6X.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-TWQHG3K7.js";import"../../chunk-RFCXI7MC.js";import"../../chunk-77WBP3SS.js";import"../../chunk-4TVQXTHY.js";import"../../chunk-XTYX5UX2.js";import"../../chunk-JOOYR6WO.js";import"../../chunk-PYAIESZU.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-S2KNAER3.js";import"../../chunk-SF3GAPKY.js";import"../../chunk-6TCLX2EB.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.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-NCOPZM3S.js";import"../../chunk-VQRG4IVB.js";import"../../chunk-KJU5FRRJ.js";import"../../chunk-UNDTHQXJ.js";import"../../chunk-ZGALPNQV.js";import"../../chunk-HCZJEB6X.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-TWQHG3K7.js";import"../../chunk-F6O7Z5YC.js";import"../../chunk-77WBP3SS.js";import"../../chunk-4TVQXTHY.js";import"../../chunk-XTYX5UX2.js";import"../../chunk-JOOYR6WO.js";import"../../chunk-PYAIESZU.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-S2KNAER3.js";import"../../chunk-SF3GAPKY.js";import"../../chunk-6TCLX2EB.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.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-QTRTXIKL.js";import"../../chunk-43AULYHS.js";import"../../chunk-FOPG6CCD.js";import"../../chunk-TVLODLMF.js";import"../../chunk-HRWNB6TA.js";import"../../chunk-ZGALPNQV.js";import"../../chunk-HCZJEB6X.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-TWQHG3K7.js";import"../../chunk-RFCXI7MC.js";import"../../chunk-77WBP3SS.js";import"../../chunk-4TVQXTHY.js";import"../../chunk-XTYX5UX2.js";import"../../chunk-JOOYR6WO.js";import"../../chunk-PYAIESZU.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-S2KNAER3.js";import"../../chunk-SF3GAPKY.js";import"../../chunk-6TCLX2EB.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.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-FAZ3MF2Y.js";import"../../chunk-NCOPZM3S.js";import"../../chunk-VQRG4IVB.js";import"../../chunk-KJU5FRRJ.js";import"../../chunk-UNDTHQXJ.js";import"../../chunk-ZGALPNQV.js";import"../../chunk-HCZJEB6X.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-TWQHG3K7.js";import"../../chunk-F6O7Z5YC.js";import"../../chunk-77WBP3SS.js";import"../../chunk-4TVQXTHY.js";import"../../chunk-XTYX5UX2.js";import"../../chunk-JOOYR6WO.js";import"../../chunk-PYAIESZU.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-S2KNAER3.js";import"../../chunk-SF3GAPKY.js";import"../../chunk-6TCLX2EB.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.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 s}from"../../chunk-QTRTXIKL.js";import{N as r}from"../../chunk-43AULYHS.js";import{h as o}from"../../chunk-FOPG6CCD.js";import"../../chunk-TVLODLMF.js";import"../../chunk-HRWNB6TA.js";import"../../chunk-ZGALPNQV.js";import"../../chunk-HCZJEB6X.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-TWQHG3K7.js";import"../../chunk-RFCXI7MC.js";import"../../chunk-77WBP3SS.js";import"../../chunk-4TVQXTHY.js";import"../../chunk-XTYX5UX2.js";import"../../chunk-JOOYR6WO.js";import"../../chunk-PYAIESZU.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-S2KNAER3.js";import"../../chunk-SF3GAPKY.js";import"../../chunk-6TCLX2EB.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-FC546GTB.js";import"../../chunk-LLHU72AA.js";process.stdout.write("");export{o as _0x1,r as _0x2,s as _0x3};
2
+ import{m as s}from"../../chunk-FAZ3MF2Y.js";import{N as r}from"../../chunk-NCOPZM3S.js";import{h as o}from"../../chunk-VQRG4IVB.js";import"../../chunk-KJU5FRRJ.js";import"../../chunk-UNDTHQXJ.js";import"../../chunk-ZGALPNQV.js";import"../../chunk-HCZJEB6X.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-TWQHG3K7.js";import"../../chunk-F6O7Z5YC.js";import"../../chunk-77WBP3SS.js";import"../../chunk-4TVQXTHY.js";import"../../chunk-XTYX5UX2.js";import"../../chunk-JOOYR6WO.js";import"../../chunk-PYAIESZU.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-S2KNAER3.js";import"../../chunk-SF3GAPKY.js";import"../../chunk-6TCLX2EB.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-FC546GTB.js";import"../../chunk-LLHU72AA.js";process.stdout.write("");export{o as _0x1,r as _0x2,s 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 as m,b as p}from"../../chunk-S745TAEB.js";import{a as d,b as n,c as s,d as u,e as f,f as C,g as l}from"../../chunk-HRWNB6TA.js";import"../../chunk-HCZJEB6X.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-RFCXI7MC.js";import"../../chunk-77WBP3SS.js";import"../../chunk-4TVQXTHY.js";import"../../chunk-XTYX5UX2.js";import"../../chunk-JOOYR6WO.js";import"../../chunk-PYAIESZU.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-S2KNAER3.js";import"../../chunk-SF3GAPKY.js";import"../../chunk-6TCLX2EB.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-FC546GTB.js";import"../../chunk-LLHU72AA.js";var r=class{calculateValueInUsd(o,t,i){return l(o,t,i)}getCoinInfo(o){return u(o)}whiteListed(o){return s(o)}whitelistCoins(){return n()}},c=new r,a=class extends m{coinList=c};async function w(e,o,t,i,S){return p(c,e,o,t,i,S)}process.stdout.write("");process.stdout.write("");export{r as CoinList,c as SuiCoinList,a as SuiDex,l as calculateValueInUsd,u as getCoinInfo,f as getCoinInfoWithFallback,w as getPairValue,C as getPrice,d as initCoinList,s as whiteListed,n as whitelistCoins};
2
+ import{a as m,b as p}from"../../chunk-S745TAEB.js";import{a as d,b as n,c as s,d as u,e as f,f as C,g as l}from"../../chunk-UNDTHQXJ.js";import"../../chunk-HCZJEB6X.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-F6O7Z5YC.js";import"../../chunk-77WBP3SS.js";import"../../chunk-4TVQXTHY.js";import"../../chunk-XTYX5UX2.js";import"../../chunk-JOOYR6WO.js";import"../../chunk-PYAIESZU.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-S2KNAER3.js";import"../../chunk-SF3GAPKY.js";import"../../chunk-6TCLX2EB.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-FC546GTB.js";import"../../chunk-LLHU72AA.js";var r=class{calculateValueInUsd(o,t,i){return l(o,t,i)}getCoinInfo(o){return u(o)}whiteListed(o){return s(o)}whitelistCoins(){return n()}},c=new r,a=class extends m{coinList=c};async function w(e,o,t,i,S){return p(c,e,o,t,i,S)}process.stdout.write("");process.stdout.write("");export{r as CoinList,c as SuiCoinList,a as SuiDex,l as calculateValueInUsd,u as getCoinInfo,f as getCoinInfoWithFallback,w as getPairValue,C as getPrice,d as initCoinList,s 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-TVLODLMF.js";import"../chunk-HRWNB6TA.js";import"../chunk-ZGALPNQV.js";import{f as b,g as c,h as d}from"../chunk-HCZJEB6X.js";import"../chunk-F2HFFA4Z.js";import"../chunk-NHARQGR7.js";import"../chunk-DJQ5RDDN.js";import"../chunk-TWQHG3K7.js";import"../chunk-RFCXI7MC.js";import"../chunk-77WBP3SS.js";import{q as a}from"../chunk-4TVQXTHY.js";import"../chunk-XTYX5UX2.js";import"../chunk-JOOYR6WO.js";import"../chunk-PYAIESZU.js";import"../chunk-2GOCSOX5.js";import"../chunk-S2KNAER3.js";import"../chunk-SF3GAPKY.js";import"../chunk-6TCLX2EB.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.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-KJU5FRRJ.js";import"../chunk-UNDTHQXJ.js";import"../chunk-ZGALPNQV.js";import{f as b,g as c,h as d}from"../chunk-HCZJEB6X.js";import"../chunk-F2HFFA4Z.js";import"../chunk-NHARQGR7.js";import"../chunk-DJQ5RDDN.js";import"../chunk-TWQHG3K7.js";import"../chunk-F6O7Z5YC.js";import"../chunk-77WBP3SS.js";import{q as a}from"../chunk-4TVQXTHY.js";import"../chunk-XTYX5UX2.js";import"../chunk-JOOYR6WO.js";import"../chunk-PYAIESZU.js";import"../chunk-2GOCSOX5.js";import"../chunk-S2KNAER3.js";import"../chunk-SF3GAPKY.js";import"../chunk-6TCLX2EB.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.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-Y5DGYRRN.js";import"../chunk-P6EWMO4E.js";import{g as _}from"../chunk-TVLODLMF.js";import"../chunk-HRWNB6TA.js";import"../chunk-ZGALPNQV.js";import{f as g}from"../chunk-HCZJEB6X.js";import"../chunk-GELZJPWE.js";import{c as T}from"../chunk-LKCFAPQL.js";import"../chunk-KWMVHRRB.js";import"../chunk-3RFIQSEL.js";import"../chunk-EBOI7P4R.js";import"../chunk-F2HFFA4Z.js";import"../chunk-NHARQGR7.js";import"../chunk-DJQ5RDDN.js";import"../chunk-TWQHG3K7.js";import{d as M}from"../chunk-RFCXI7MC.js";import"../chunk-PNA6LFOX.js";import"../chunk-77WBP3SS.js";import{a as D,d as u,n as E}from"../chunk-4TVQXTHY.js";import"../chunk-XTYX5UX2.js";import"../chunk-JOOYR6WO.js";import"../chunk-PYAIESZU.js";import"../chunk-2GOCSOX5.js";import{a as m}from"../chunk-S2KNAER3.js";import{D as a}from"../chunk-SF3GAPKY.js";import"../chunk-6TCLX2EB.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.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}}}};process.stdout.write("");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}))})}};process.stdout.write("");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}};process.stdout.write("");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}}}};process.stdout.write("");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}};process.stdout.write("");var R=h(m(),1),x={INJECTIVE_MAINNET:R.CosmosChainId.INJECTIVE_MAINNET,INJECTIVE_TESTNET:R.CosmosChainId.INJECTIVE_TESTNET};process.stdout.write("");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}};process.stdout.write("");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}};process.stdout.write("");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}};process.stdout.write("");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.")}};process.stdout.write("");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)}}process.stdout.write("");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}process.stdout.write("");process.stdout.write("");export{A as MetricValueToNumber,k as TestProcessorServer,X as firstCounterValue,z as firstGaugeValue,W as loadTestProvidersFromEnv};
2
+ import{b as F}from"../chunk-LN5QJQIM.js";import"../chunk-P6EWMO4E.js";import{g as _}from"../chunk-KJU5FRRJ.js";import"../chunk-UNDTHQXJ.js";import"../chunk-ZGALPNQV.js";import{f as g}from"../chunk-HCZJEB6X.js";import"../chunk-TTZSFKIM.js";import{c as T}from"../chunk-LKCFAPQL.js";import"../chunk-KWMVHRRB.js";import"../chunk-3RFIQSEL.js";import"../chunk-EBOI7P4R.js";import"../chunk-F2HFFA4Z.js";import"../chunk-NHARQGR7.js";import"../chunk-DJQ5RDDN.js";import"../chunk-TWQHG3K7.js";import{b as M}from"../chunk-F6O7Z5YC.js";import"../chunk-PNA6LFOX.js";import"../chunk-77WBP3SS.js";import{a as D,d as u,n as E}from"../chunk-4TVQXTHY.js";import"../chunk-XTYX5UX2.js";import"../chunk-JOOYR6WO.js";import"../chunk-PYAIESZU.js";import"../chunk-2GOCSOX5.js";import{a as m}from"../chunk-S2KNAER3.js";import{D as a}from"../chunk-SF3GAPKY.js";import"../chunk-6TCLX2EB.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.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}}}};process.stdout.write("");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}))})}};process.stdout.write("");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}};process.stdout.write("");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}}}};process.stdout.write("");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}};process.stdout.write("");var R=h(m(),1),x={INJECTIVE_MAINNET:R.CosmosChainId.INJECTIVE_MAINNET,INJECTIVE_TESTNET:R.CosmosChainId.INJECTIVE_TESTNET};process.stdout.write("");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}};process.stdout.write("");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}};process.stdout.write("");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}};process.stdout.write("");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.")}};process.stdout.write("");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)}}process.stdout.write("");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}process.stdout.write("");process.stdout.write("");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-RFCXI7MC.js";import"../chunk-XTYX5UX2.js";import"../chunk-JOOYR6WO.js";import"../chunk-PYAIESZU.js";import"../chunk-2GOCSOX5.js";import"../chunk-S2KNAER3.js";import"../chunk-SF3GAPKY.js";import"../chunk-6TCLX2EB.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.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{a,b,c,d,e,f,g,h,i,j,k,l}from"../chunk-F6O7Z5YC.js";import"../chunk-XTYX5UX2.js";import"../chunk-JOOYR6WO.js";import"../chunk-PYAIESZU.js";import"../chunk-2GOCSOX5.js";import"../chunk-S2KNAER3.js";import"../chunk-SF3GAPKY.js";import"../chunk-6TCLX2EB.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.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
@@ -1,345 +1,11 @@
1
- import { PriceServiceClient } from '@sentio/protos/price';
2
1
  import { CoinID } from '@sentio/protos';
3
- import { RetryOptions } from 'nice-grpc-client-middleware-retry';
4
2
  import { ChainId } from '@sentio/chain';
5
- export declare function getPriceClient(address?: string): import("nice-grpc").RawClient<import("nice-grpc/lib/service-definitions/ts-proto.js").FromTsProtoServiceDefinition<{
6
- readonly name: "PriceService";
7
- readonly fullName: "price_service.PriceService";
8
- readonly methods: {
9
- readonly getPrice: {
10
- readonly name: "GetPrice";
11
- readonly requestType: {
12
- encode(message: import("@sentio/protos/price").GetPriceRequest, writer?: import("protobufjs").Writer): import("protobufjs").Writer;
13
- decode(input: import("protobufjs").Reader | Uint8Array, length?: number): import("@sentio/protos/price").GetPriceRequest;
14
- fromJSON(object: any): import("@sentio/protos/price").GetPriceRequest;
15
- toJSON(message: import("@sentio/protos/price").GetPriceRequest): unknown;
16
- create(base?: {
17
- timestamp?: Date | undefined;
18
- coinId?: {
19
- symbol?: string | undefined;
20
- address?: {
21
- address?: string | undefined;
22
- chain?: string | undefined;
23
- } | undefined;
24
- } | undefined;
25
- source?: string | undefined;
26
- }): import("@sentio/protos/price").GetPriceRequest;
27
- fromPartial(object: {
28
- timestamp?: Date | undefined;
29
- coinId?: {
30
- symbol?: string | undefined;
31
- address?: {
32
- address?: string | undefined;
33
- chain?: string | undefined;
34
- } | undefined;
35
- } | undefined;
36
- source?: string | undefined;
37
- }): import("@sentio/protos/price").GetPriceRequest;
38
- };
39
- readonly requestStream: false;
40
- readonly responseType: {
41
- encode(message: import("@sentio/protos/price").GetPriceResponse, writer?: import("protobufjs").Writer): import("protobufjs").Writer;
42
- decode(input: import("protobufjs").Reader | Uint8Array, length?: number): import("@sentio/protos/price").GetPriceResponse;
43
- fromJSON(object: any): import("@sentio/protos/price").GetPriceResponse;
44
- toJSON(message: import("@sentio/protos/price").GetPriceResponse): unknown;
45
- create(base?: {
46
- price?: number | undefined;
47
- timestamp?: Date | undefined;
48
- }): import("@sentio/protos/price").GetPriceResponse;
49
- fromPartial(object: {
50
- price?: number | undefined;
51
- timestamp?: Date | undefined;
52
- }): import("@sentio/protos/price").GetPriceResponse;
53
- };
54
- readonly responseStream: false;
55
- readonly options: {
56
- readonly _unknownFields: {
57
- readonly 578365826: readonly [Uint8Array];
58
- };
59
- };
60
- };
61
- readonly batchGetPrices: {
62
- readonly name: "BatchGetPrices";
63
- readonly requestType: {
64
- encode(message: import("@sentio/protos/price").BatchGetPricesRequest, writer?: import("protobufjs").Writer): import("protobufjs").Writer;
65
- decode(input: import("protobufjs").Reader | Uint8Array, length?: number): import("@sentio/protos/price").BatchGetPricesRequest;
66
- fromJSON(object: any): import("@sentio/protos/price").BatchGetPricesRequest;
67
- toJSON(message: import("@sentio/protos/price").BatchGetPricesRequest): unknown;
68
- create(base?: {
69
- timestamps?: Date[] | undefined;
70
- coinIds?: {
71
- symbol?: string | undefined;
72
- address?: {
73
- address?: string | undefined;
74
- chain?: string | undefined;
75
- } | undefined;
76
- }[] | undefined;
77
- }): import("@sentio/protos/price").BatchGetPricesRequest;
78
- fromPartial(object: {
79
- timestamps?: Date[] | undefined;
80
- coinIds?: {
81
- symbol?: string | undefined;
82
- address?: {
83
- address?: string | undefined;
84
- chain?: string | undefined;
85
- } | undefined;
86
- }[] | undefined;
87
- }): import("@sentio/protos/price").BatchGetPricesRequest;
88
- };
89
- readonly requestStream: false;
90
- readonly responseType: {
91
- encode(message: import("@sentio/protos/price").BatchGetPricesResponse, writer?: import("protobufjs").Writer): import("protobufjs").Writer;
92
- decode(input: import("protobufjs").Reader | Uint8Array, length?: number): import("@sentio/protos/price").BatchGetPricesResponse;
93
- fromJSON(object: any): import("@sentio/protos/price").BatchGetPricesResponse;
94
- toJSON(message: import("@sentio/protos/price").BatchGetPricesResponse): unknown;
95
- create(base?: {
96
- prices?: {
97
- coinId?: {
98
- symbol?: string | undefined;
99
- address?: {
100
- address?: string | undefined;
101
- chain?: string | undefined;
102
- } | undefined;
103
- } | undefined;
104
- price?: {
105
- results?: {
106
- price?: number | undefined;
107
- timestamp?: Date | undefined;
108
- }[] | undefined;
109
- } | undefined;
110
- error?: string | undefined;
111
- }[] | undefined;
112
- }): import("@sentio/protos/price").BatchGetPricesResponse;
113
- fromPartial(object: {
114
- prices?: {
115
- coinId?: {
116
- symbol?: string | undefined;
117
- address?: {
118
- address?: string | undefined;
119
- chain?: string | undefined;
120
- } | undefined;
121
- } | undefined;
122
- price?: {
123
- results?: {
124
- price?: number | undefined;
125
- timestamp?: Date | undefined;
126
- }[] | undefined;
127
- } | undefined;
128
- error?: string | undefined;
129
- }[] | undefined;
130
- }): import("@sentio/protos/price").BatchGetPricesResponse;
131
- };
132
- readonly responseStream: false;
133
- readonly options: {
134
- readonly _unknownFields: {
135
- readonly 578365826: readonly [Uint8Array];
136
- };
137
- };
138
- };
139
- readonly listCoins: {
140
- readonly name: "ListCoins";
141
- readonly requestType: {
142
- encode(message: import("@sentio/protos/price").ListCoinsRequest, writer?: import("protobufjs").Writer): import("protobufjs").Writer;
143
- decode(input: import("protobufjs").Reader | Uint8Array, length?: number): import("@sentio/protos/price").ListCoinsRequest;
144
- fromJSON(object: any): import("@sentio/protos/price").ListCoinsRequest;
145
- toJSON(message: import("@sentio/protos/price").ListCoinsRequest): unknown;
146
- create(base?: {
147
- limit?: number | undefined;
148
- offset?: number | undefined;
149
- searchQuery?: string | undefined;
150
- chain?: string | undefined;
151
- }): import("@sentio/protos/price").ListCoinsRequest;
152
- fromPartial(object: {
153
- limit?: number | undefined;
154
- offset?: number | undefined;
155
- searchQuery?: string | undefined;
156
- chain?: string | undefined;
157
- }): import("@sentio/protos/price").ListCoinsRequest;
158
- };
159
- readonly requestStream: false;
160
- readonly responseType: {
161
- encode(message: import("@sentio/protos/price").ListCoinsResponse, writer?: import("protobufjs").Writer): import("protobufjs").Writer;
162
- decode(input: import("protobufjs").Reader | Uint8Array, length?: number): import("@sentio/protos/price").ListCoinsResponse;
163
- fromJSON(object: any): import("@sentio/protos/price").ListCoinsResponse;
164
- toJSON(message: import("@sentio/protos/price").ListCoinsResponse): unknown;
165
- create(base?: {
166
- coins?: {
167
- symbol?: string | undefined;
168
- address?: {
169
- address?: string | undefined;
170
- chain?: string | undefined;
171
- } | undefined;
172
- }[] | undefined;
173
- coinAddressesInChain?: {
174
- [x: string]: {
175
- symbol?: string | undefined;
176
- address?: {
177
- address?: string | undefined;
178
- chain?: string | undefined;
179
- } | undefined;
180
- } | undefined;
181
- } | undefined;
182
- }): import("@sentio/protos/price").ListCoinsResponse;
183
- fromPartial(object: {
184
- coins?: {
185
- symbol?: string | undefined;
186
- address?: {
187
- address?: string | undefined;
188
- chain?: string | undefined;
189
- } | undefined;
190
- }[] | undefined;
191
- coinAddressesInChain?: {
192
- [x: string]: {
193
- symbol?: string | undefined;
194
- address?: {
195
- address?: string | undefined;
196
- chain?: string | undefined;
197
- } | undefined;
198
- } | undefined;
199
- } | undefined;
200
- }): import("@sentio/protos/price").ListCoinsResponse;
201
- };
202
- readonly responseStream: false;
203
- readonly options: {
204
- readonly _unknownFields: {
205
- readonly 578365826: readonly [Uint8Array];
206
- };
207
- };
208
- };
209
- readonly checkLatestPrice: {
210
- readonly name: "CheckLatestPrice";
211
- readonly requestType: {
212
- encode(_: import("@sentio/protos").Empty, writer?: import("protobufjs").Writer): import("protobufjs").Writer;
213
- decode(input: import("protobufjs").Reader | Uint8Array, length?: number): import("@sentio/protos").Empty;
214
- fromJSON(_: any): import("@sentio/protos").Empty;
215
- toJSON(_: import("@sentio/protos").Empty): unknown;
216
- create(base?: {}): import("@sentio/protos").Empty;
217
- fromPartial(_: {}): import("@sentio/protos").Empty;
218
- };
219
- readonly requestStream: false;
220
- readonly responseType: {
221
- encode(message: import("@sentio/protos/price").CheckLatestPriceResponse, writer?: import("protobufjs").Writer): import("protobufjs").Writer;
222
- decode(input: import("protobufjs").Reader | Uint8Array, length?: number): import("@sentio/protos/price").CheckLatestPriceResponse;
223
- fromJSON(object: any): import("@sentio/protos/price").CheckLatestPriceResponse;
224
- toJSON(message: import("@sentio/protos/price").CheckLatestPriceResponse): unknown;
225
- create(base?: {
226
- prices?: {
227
- coinId?: {
228
- symbol?: string | undefined;
229
- address?: {
230
- address?: string | undefined;
231
- chain?: string | undefined;
232
- } | undefined;
233
- } | undefined;
234
- price?: number | undefined;
235
- timestamp?: Date | undefined;
236
- }[] | undefined;
237
- latestPrice?: {
238
- coinId?: {
239
- symbol?: string | undefined;
240
- address?: {
241
- address?: string | undefined;
242
- chain?: string | undefined;
243
- } | undefined;
244
- } | undefined;
245
- price?: number | undefined;
246
- timestamp?: Date | undefined;
247
- } | undefined;
248
- }): import("@sentio/protos/price").CheckLatestPriceResponse;
249
- fromPartial(object: {
250
- prices?: {
251
- coinId?: {
252
- symbol?: string | undefined;
253
- address?: {
254
- address?: string | undefined;
255
- chain?: string | undefined;
256
- } | undefined;
257
- } | undefined;
258
- price?: number | undefined;
259
- timestamp?: Date | undefined;
260
- }[] | undefined;
261
- latestPrice?: {
262
- coinId?: {
263
- symbol?: string | undefined;
264
- address?: {
265
- address?: string | undefined;
266
- chain?: string | undefined;
267
- } | undefined;
268
- } | undefined;
269
- price?: number | undefined;
270
- timestamp?: Date | undefined;
271
- } | undefined;
272
- }): import("@sentio/protos/price").CheckLatestPriceResponse;
273
- };
274
- readonly responseStream: false;
275
- readonly options: {
276
- readonly _unknownFields: {
277
- readonly 578365826: readonly [Uint8Array];
278
- };
279
- };
280
- };
281
- readonly backfillCoin: {
282
- readonly name: "BackfillCoin";
283
- readonly requestType: {
284
- encode(message: import("@sentio/protos/price").BackfillCoinRequest, writer?: import("protobufjs").Writer): import("protobufjs").Writer;
285
- decode(input: import("protobufjs").Reader | Uint8Array, length?: number): import("@sentio/protos/price").BackfillCoinRequest;
286
- fromJSON(object: any): import("@sentio/protos/price").BackfillCoinRequest;
287
- toJSON(message: import("@sentio/protos/price").BackfillCoinRequest): unknown;
288
- create(base?: {
289
- name?: string | undefined;
290
- symbol?: string | undefined;
291
- chain?: string | undefined;
292
- address?: string | undefined;
293
- coingeckoId?: string | undefined;
294
- decimals?: number | undefined;
295
- logoUrl?: string | undefined;
296
- projectUrl?: string | undefined;
297
- accountAddress?: string | undefined;
298
- moduleName?: string | undefined;
299
- structName?: string | undefined;
300
- }): import("@sentio/protos/price").BackfillCoinRequest;
301
- fromPartial(object: {
302
- name?: string | undefined;
303
- symbol?: string | undefined;
304
- chain?: string | undefined;
305
- address?: string | undefined;
306
- coingeckoId?: string | undefined;
307
- decimals?: number | undefined;
308
- logoUrl?: string | undefined;
309
- projectUrl?: string | undefined;
310
- accountAddress?: string | undefined;
311
- moduleName?: string | undefined;
312
- structName?: string | undefined;
313
- }): import("@sentio/protos/price").BackfillCoinRequest;
314
- };
315
- readonly requestStream: false;
316
- readonly responseType: {
317
- encode(message: import("@sentio/protos/price").BackfillCoinResponse, writer?: import("protobufjs").Writer): import("protobufjs").Writer;
318
- decode(input: import("protobufjs").Reader | Uint8Array, length?: number): import("@sentio/protos/price").BackfillCoinResponse;
319
- fromJSON(object: any): import("@sentio/protos/price").BackfillCoinResponse;
320
- toJSON(message: import("@sentio/protos/price").BackfillCoinResponse): unknown;
321
- create(base?: {
322
- symbol?: string | undefined;
323
- message?: string | undefined;
324
- }): import("@sentio/protos/price").BackfillCoinResponse;
325
- fromPartial(object: {
326
- symbol?: string | undefined;
327
- message?: string | undefined;
328
- }): import("@sentio/protos/price").BackfillCoinResponse;
329
- };
330
- readonly responseStream: false;
331
- readonly options: {
332
- readonly _unknownFields: {
333
- readonly 578365826: readonly [Uint8Array];
334
- };
335
- };
336
- };
337
- };
338
- }>, RetryOptions>;
3
+ import { PriceApi } from '@sentio/api';
4
+ export declare function getPriceClient(address?: string): PriceApi;
339
5
  interface PriceOptions {
340
6
  toleranceInDays?: number;
341
7
  }
342
- export declare function getPriceByTypeOrSymbolInternal(priceClient: PriceServiceClient<RetryOptions>, date: Date, coinId: CoinID, options?: PriceOptions): Promise<number | undefined>;
8
+ export declare function getPriceByTypeOrSymbolInternal(priceClient: PriceApi, date: Date, coinId: CoinID, options?: PriceOptions): Promise<number | undefined>;
343
9
  /**
344
10
  *
345
11
  * @param chainId chain id refers to CHAIN_MAP
@@ -358,6 +24,6 @@ export declare function getPriceBySymbol(symbol: string, date: Date, options?: P
358
24
  * get coins that has price, return results are list of coin id with both symbol and address field set
359
25
  * @param chainId
360
26
  */
361
- export declare function getCoinsThatHasPrice(chainId: ChainId): Promise<import("@sentio/protos/price").CoinID[]>;
27
+ export declare function getCoinsThatHasPrice(chainId: ChainId): Promise<import("@sentio/api").PriceServiceCoinID[]>;
362
28
  export {};
363
29
  //# sourceMappingURL=price.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"price.d.ts","sourceRoot":"","sources":["../../src/utils/price.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAA0B,MAAM,sBAAsB,CAAA;AACjF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAGvC,OAAO,EAAmB,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAEjF,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGvC,wBAAgB,cAAc,CAAC,OAAO,CAAC,EAAE,MAAM;;;;;;;sFA6Jo1K,CAAC;8EAAwF,CAAC;;;2BAA0K,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;uFAA6R,CAAC;8EAAwF,CAAC;;;2BAA6K,CAAC;;;;;;;;;;;;;;;;;;;4FAA6iB,CAAC;8EAAwF,CAAC;;;2BAA4L,CAAC;;;;;;;;;;;;;;;;;;;;;;;6FAA2T,CAAC;8EAAwF,CAAC;;;2BAA+L,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uFAAsjB,CAAC;8EAAwF,CAAC;;;2BAA6K,CAAC;;;;;;;;;;;;;;;wFAAkS,CAAC;8EAAwF,CAAC;;;2BAAgL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gEAA+hB,CAAC;8EAAwF,CAAC;;;2BAAiI,CAAC;;;;;+FAAwN,CAAC;8EAAwF,CAAC;;;2BAAqM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0FAAukB,CAAC;8EAAwF,CAAC;;;2BAAsL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2FAAiT,CAAC;8EAAwF,CAAC;;;2BAAyL,CAAC;;;;;;;;;;;;;;;;;kBAnJhkX;AASD,UAAU,YAAY;IACpB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAQD,wBAAsB,8BAA8B,CAClD,WAAW,EAAE,kBAAkB,CAAC,YAAY,CAAC,EAC7C,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CA6D7B;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAW7B;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAE7B;AAMD;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,OAAO,oDAa1D"}
1
+ {"version":3,"file":"price.d.ts","sourceRoot":"","sources":["../../src/utils/price.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAEvC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,OAAO,EAAiB,QAAQ,EAAE,MAAM,aAAa,CAAA;AAErD,wBAAgB,cAAc,CAAC,OAAO,CAAC,EAAE,MAAM,YAM9C;AASD,UAAU,YAAY;IACpB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAQD,wBAAsB,8BAA8B,CAClD,WAAW,EAAE,QAAQ,EACrB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAyD7B;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAW7B;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAE7B;AAMD;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,OAAO,uDAgB1D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentio/sdk-bundle",
3
- "version": "2.44.0",
3
+ "version": "2.44.1-rc.2",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -48,7 +48,7 @@
48
48
  "!{lib,src}/*/tests"
49
49
  ],
50
50
  "dependencies": {
51
- "@sentio/runtime": "^2.44.0"
51
+ "@sentio/runtime": "^2.44.1-rc.2"
52
52
  },
53
53
  "peerDependencies": {},
54
54
  "devDependencies": {},
@@ -36,7 +36,6 @@ export class FuelPlugin extends Plugin {
36
36
  }
37
37
 
38
38
  for (const processor of FuelProcessorState.INSTANCE.getValues()) {
39
- await processor.configure()
40
39
  const contractConfig = ContractConfig.fromPartial({
41
40
  processorType: USER_PROCESSOR,
42
41
  contract: {
@@ -112,7 +111,15 @@ export class FuelPlugin extends Plugin {
112
111
  }
113
112
  }
114
113
 
115
- async start(request: StartRequest) {}
114
+ async start(request: StartRequest) {
115
+ try {
116
+ for (const processor of FuelProcessorState.INSTANCE.getValues()) {
117
+ await processor.configure()
118
+ }
119
+ } catch (e) {
120
+ throw new ServerError(Status.INTERNAL, 'error starting FuelPlugin: ' + errorString(e))
121
+ }
122
+ }
116
123
 
117
124
  stateDiff(config: ProcessConfigResponse): boolean {
118
125
  return TemplateInstanceState.INSTANCE.getValues().length !== config.templateInstances.length