@sentio/sdk-bundle 2.40.2-rc.2 → 2.41.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 (67) 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/codegen/index.js +1 -1
  5. package/lib/aptos/ext/index.js +1 -1
  6. package/lib/aptos/index.js +1 -1
  7. package/lib/{chunk-YSIRZN5R.js → chunk-2B7T7ZQC.js} +2 -2
  8. package/lib/{chunk-3SIHUEOL.js → chunk-2MPTHBNK.js} +2 -2
  9. package/lib/{chunk-XTCOAXZ5.js → chunk-BEPQ76K7.js} +2 -2
  10. package/lib/{chunk-RVQ3CWCA.js → chunk-DJTFWVND.js} +2 -2
  11. package/lib/{chunk-FIKV2W35.js → chunk-DYYBLGB6.js} +2 -2
  12. package/lib/{chunk-HGQB674R.js → chunk-HUWVEJAW.js} +2 -2
  13. package/lib/{chunk-3PL7HVAM.js → chunk-JATD5IYX.js} +2 -2
  14. package/lib/{chunk-3U3ONZCE.js → chunk-JHUZNSX5.js} +2 -2
  15. package/lib/chunk-MU5GNHEP.js +3 -0
  16. package/lib/chunk-MU5GNHEP.js.map +1 -0
  17. package/lib/{chunk-UIJIPDZR.js → chunk-OJNBQE6P.js} +2 -2
  18. package/lib/{chunk-P4TSAHPX.js → chunk-PTVGF3KH.js} +2 -2
  19. package/lib/{chunk-OJQ3RVC4.js → chunk-RNPQHMMK.js} +2 -2
  20. package/lib/{chunk-G6LDP4TH.js → chunk-TI7EPCKS.js} +2 -2
  21. package/lib/{chunk-NJEZLW52.js → chunk-UAXO6AAE.js} +2 -2
  22. package/lib/{chunk-7ZTSTQEQ.js → chunk-W2ZUZZ6P.js} +2 -2
  23. package/lib/{chunk-NV2T3INF.js → chunk-XFEQ4ICE.js} +2 -2
  24. package/lib/{chunk-QQUKR766.js → chunk-XTURBU3W.js} +2 -2
  25. package/lib/{chunk-O2CR53AR.js → chunk-YDN4Y3SM.js} +2 -2
  26. package/lib/eth/builtin/eacaggregatorproxy.js +1 -1
  27. package/lib/eth/builtin/erc1155.js +1 -1
  28. package/lib/eth/builtin/erc20.js +1 -1
  29. package/lib/eth/builtin/erc721.js +1 -1
  30. package/lib/eth/builtin/index.js +1 -1
  31. package/lib/eth/builtin/weth9.js +1 -1
  32. package/lib/eth/codegen/index.js +1 -1
  33. package/lib/eth/index.js +1 -1
  34. package/lib/fuel/index.js +1 -1
  35. package/lib/solana/builtin/index.js +1 -1
  36. package/lib/solana/index.js +1 -1
  37. package/lib/stark/codegen/index.js +1 -1
  38. package/lib/stark/index.js +1 -1
  39. package/lib/sui/builtin/0x1.js +1 -1
  40. package/lib/sui/builtin/0x2.js +1 -1
  41. package/lib/sui/builtin/0x3.js +1 -1
  42. package/lib/sui/builtin/index.js +1 -1
  43. package/lib/sui/codegen/index.js +1 -1
  44. package/lib/sui/ext/index.js +1 -1
  45. package/lib/sui/index.js +1 -1
  46. package/lib/testing/index.js +1 -1
  47. package/lib/utils/index.js +1 -1
  48. package/package.json +2 -2
  49. package/lib/chunk-GAETTSNN.js +0 -3
  50. package/lib/chunk-GAETTSNN.js.map +0 -1
  51. /package/lib/{chunk-YSIRZN5R.js.map → chunk-2B7T7ZQC.js.map} +0 -0
  52. /package/lib/{chunk-3SIHUEOL.js.map → chunk-2MPTHBNK.js.map} +0 -0
  53. /package/lib/{chunk-XTCOAXZ5.js.map → chunk-BEPQ76K7.js.map} +0 -0
  54. /package/lib/{chunk-RVQ3CWCA.js.map → chunk-DJTFWVND.js.map} +0 -0
  55. /package/lib/{chunk-FIKV2W35.js.map → chunk-DYYBLGB6.js.map} +0 -0
  56. /package/lib/{chunk-HGQB674R.js.map → chunk-HUWVEJAW.js.map} +0 -0
  57. /package/lib/{chunk-3PL7HVAM.js.map → chunk-JATD5IYX.js.map} +0 -0
  58. /package/lib/{chunk-3U3ONZCE.js.map → chunk-JHUZNSX5.js.map} +0 -0
  59. /package/lib/{chunk-UIJIPDZR.js.map → chunk-OJNBQE6P.js.map} +0 -0
  60. /package/lib/{chunk-P4TSAHPX.js.map → chunk-PTVGF3KH.js.map} +0 -0
  61. /package/lib/{chunk-OJQ3RVC4.js.map → chunk-RNPQHMMK.js.map} +0 -0
  62. /package/lib/{chunk-G6LDP4TH.js.map → chunk-TI7EPCKS.js.map} +0 -0
  63. /package/lib/{chunk-NJEZLW52.js.map → chunk-UAXO6AAE.js.map} +0 -0
  64. /package/lib/{chunk-7ZTSTQEQ.js.map → chunk-W2ZUZZ6P.js.map} +0 -0
  65. /package/lib/{chunk-NV2T3INF.js.map → chunk-XFEQ4ICE.js.map} +0 -0
  66. /package/lib/{chunk-QQUKR766.js.map → chunk-XTURBU3W.js.map} +0 -0
  67. /package/lib/{chunk-O2CR53AR.js.map → chunk-YDN4Y3SM.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{e as S}from"../../chunk-W5WPNZMT.js";import"../../chunk-DEW7KMCM.js";import"../../chunk-CIVWUI2F.js";import{a as I}from"../../chunk-LIAVTR6B.js";import{a as A}from"../../chunk-OG7SKRZJ.js";import{a as E}from"../../chunk-GAETTSNN.js";import"../../chunk-NMFPLO65.js";import"../../chunk-MIWCD4RB.js";import"../../chunk-DJQ5RDDN.js";import{e as v}from"../../chunk-LLHU72AA.js";import P,{readFileSync as N,writeFileSync as k}from"fs";var j=v(I(),1);import d from"path";var b=v(E(),1);async function F(a,c){if(!P.existsSync(a))return;let m=await T(a,c);console.log(A.green(`Generated ${m} files for Starknet`))}async function T(a,c){let m=P.readdirSync(a,{recursive:!0}),l={},u=0;function x(t,e){if(Array.isArray(t)){let f=t;for(let o of f)if(o.type=="impl")return o.name.replace("Impl","")}return"Contract"+e.replace("0x","").slice(0,6)}for(let t of m)if(t.toLowerCase().endsWith(".json")){let e=t.replace(".json",""),f=N(d.join(a,t)),o=JSON.parse(f.toString()),n=b.StarknetChainId.STARKNET_MAINNET;e.startsWith("sepolia/")&&(n=b.StarknetChainId.STARKNET_SEPOLIA,e=e.slice(8));let s=e.split("-"),p=s.pop();s.length>0?e=s.join(""):e=x(o,p),l[e]={name:e,address:p,chain:n,abi:o}}let y=[];for(let[t,e]of Object.entries(l))y.push(`export const ABI_${t} = ${JSON.stringify(e.abi,null,2)} as const;`);j.default.sync(c),k(d.join(c,"tabi.ts"),y.join(`
2
+ import{e as S}from"../../chunk-W5WPNZMT.js";import"../../chunk-DEW7KMCM.js";import"../../chunk-CIVWUI2F.js";import{a as I}from"../../chunk-LIAVTR6B.js";import{a as A}from"../../chunk-OG7SKRZJ.js";import{a as E}from"../../chunk-MU5GNHEP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-MIWCD4RB.js";import"../../chunk-DJQ5RDDN.js";import{e as v}from"../../chunk-LLHU72AA.js";import P,{readFileSync as N,writeFileSync as k}from"fs";var j=v(I(),1);import d from"path";var b=v(E(),1);async function F(a,c){if(!P.existsSync(a))return;let m=await T(a,c);console.log(A.green(`Generated ${m} files for Starknet`))}async function T(a,c){let m=P.readdirSync(a,{recursive:!0}),l={},u=0;function x(t,e){if(Array.isArray(t)){let f=t;for(let o of f)if(o.type=="impl")return o.name.replace("Impl","")}return"Contract"+e.replace("0x","").slice(0,6)}for(let t of m)if(t.toLowerCase().endsWith(".json")){let e=t.replace(".json",""),f=N(d.join(a,t)),o=JSON.parse(f.toString()),n=b.StarknetChainId.STARKNET_MAINNET;e.startsWith("sepolia/")&&(n=b.StarknetChainId.STARKNET_SEPOLIA,e=e.slice(8));let s=e.split("-"),p=s.pop();s.length>0?e=s.join(""):e=x(o,p),l[e]={name:e,address:p,chain:n,abi:o}}let y=[];for(let[t,e]of Object.entries(l))y.push(`export const ABI_${t} = ${JSON.stringify(e.abi,null,2)} as const;`);j.default.sync(c),k(d.join(c,"tabi.ts"),y.join(`
3
3
  `)),u++;for(let{name:t,address:e,chain:f,abi:o}of Object.values(l)){let n=[];n.push("import { StarknetProcessorConfig, StarknetEvent, AbstractStarknetProcessor, StarknetContext } from '@sentio/sdk/starknet'"),n.push('import { EventToPrimitiveType, TypedContractView, Abi } from "@sentio/abi-wan-kanabi"'),n.push(`import { ABI_${t} } from "./tabi.js"
4
4
  `),n.push(`export type ${t} = TypedContractView<typeof ABI_${t}>`);let s=o,p=s.filter(r=>r.type=="event"&&r.kind==="enum"),h={};for(let r of Object.values(S.getAbiEvents(s))){let i=r.name,g=i;for(let C of p)for(let $ of C.variants)if($.type===i){g=$.name;break}h[g]=i,n.push(`export type ${g} = EventToPrimitiveType<typeof ABI_${t}, "${i}">`)}n.push(`
5
5
  export class ${t}Processor extends AbstractStarknetProcessor {
@@ -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-W5WPNZMT.js";import"../chunk-DEW7KMCM.js";import"../chunk-CIVWUI2F.js";import{a as O}from"../chunk-GAETTSNN.js";import{D as v,Ic as _,Nc as D,W as x,Xb as H,nc as j}from"../chunk-3VPV7RP4.js";import"../chunk-H5VPHIYT.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-CS6HUFI7.js";import"../chunk-MIWCD4RB.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-W5WPNZMT.js";import"../chunk-DEW7KMCM.js";import"../chunk-CIVWUI2F.js";import{a as O}from"../chunk-MU5GNHEP.js";import{D as v,Ic as _,Nc as D,W as x,Xb as H,nc as j}from"../chunk-3VPV7RP4.js";import"../chunk-H5VPHIYT.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-CS6HUFI7.js";import"../chunk-MIWCD4RB.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,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-3SIHUEOL.js";import"../../chunk-QQUKR766.js";import"../../chunk-FIKV2W35.js";import"../../chunk-BJV226SY.js";import"../../chunk-3U3ONZCE.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-PE6MZT4O.js";import"../../chunk-P4TSAHPX.js";import"../../chunk-5KAFAPS3.js";import"../../chunk-F3YPXS5A.js";import"../../chunk-O2CR53AR.js";import"../../chunk-RVQ3CWCA.js";import"../../chunk-UIJIPDZR.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-GAETTSNN.js";import"../../chunk-3VPV7RP4.js";import"../../chunk-H5VPHIYT.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-CS6HUFI7.js";import"../../chunk-MIWCD4RB.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-2MPTHBNK.js";import"../../chunk-XTURBU3W.js";import"../../chunk-DYYBLGB6.js";import"../../chunk-BJV226SY.js";import"../../chunk-JHUZNSX5.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-PE6MZT4O.js";import"../../chunk-PTVGF3KH.js";import"../../chunk-5KAFAPS3.js";import"../../chunk-F3YPXS5A.js";import"../../chunk-YDN4Y3SM.js";import"../../chunk-DJTFWVND.js";import"../../chunk-OJNBQE6P.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-MU5GNHEP.js";import"../../chunk-3VPV7RP4.js";import"../../chunk-H5VPHIYT.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-CS6HUFI7.js";import"../../chunk-MIWCD4RB.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-7ZTSTQEQ.js";import"../../chunk-3SIHUEOL.js";import"../../chunk-QQUKR766.js";import"../../chunk-FIKV2W35.js";import"../../chunk-BJV226SY.js";import"../../chunk-3U3ONZCE.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-PE6MZT4O.js";import"../../chunk-P4TSAHPX.js";import"../../chunk-5KAFAPS3.js";import"../../chunk-F3YPXS5A.js";import"../../chunk-O2CR53AR.js";import"../../chunk-RVQ3CWCA.js";import"../../chunk-UIJIPDZR.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-GAETTSNN.js";import"../../chunk-3VPV7RP4.js";import"../../chunk-H5VPHIYT.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-CS6HUFI7.js";import"../../chunk-MIWCD4RB.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-W2ZUZZ6P.js";import"../../chunk-2MPTHBNK.js";import"../../chunk-XTURBU3W.js";import"../../chunk-DYYBLGB6.js";import"../../chunk-BJV226SY.js";import"../../chunk-JHUZNSX5.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-PE6MZT4O.js";import"../../chunk-PTVGF3KH.js";import"../../chunk-5KAFAPS3.js";import"../../chunk-F3YPXS5A.js";import"../../chunk-YDN4Y3SM.js";import"../../chunk-DJTFWVND.js";import"../../chunk-OJNBQE6P.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-MU5GNHEP.js";import"../../chunk-3VPV7RP4.js";import"../../chunk-H5VPHIYT.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-CS6HUFI7.js";import"../../chunk-MIWCD4RB.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-3PL7HVAM.js";import"../../chunk-7ZTSTQEQ.js";import"../../chunk-3SIHUEOL.js";import"../../chunk-QQUKR766.js";import"../../chunk-FIKV2W35.js";import"../../chunk-BJV226SY.js";import"../../chunk-3U3ONZCE.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-PE6MZT4O.js";import"../../chunk-P4TSAHPX.js";import"../../chunk-5KAFAPS3.js";import"../../chunk-F3YPXS5A.js";import"../../chunk-O2CR53AR.js";import"../../chunk-RVQ3CWCA.js";import"../../chunk-UIJIPDZR.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-GAETTSNN.js";import"../../chunk-3VPV7RP4.js";import"../../chunk-H5VPHIYT.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-CS6HUFI7.js";import"../../chunk-MIWCD4RB.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-JATD5IYX.js";import"../../chunk-W2ZUZZ6P.js";import"../../chunk-2MPTHBNK.js";import"../../chunk-XTURBU3W.js";import"../../chunk-DYYBLGB6.js";import"../../chunk-BJV226SY.js";import"../../chunk-JHUZNSX5.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-PE6MZT4O.js";import"../../chunk-PTVGF3KH.js";import"../../chunk-5KAFAPS3.js";import"../../chunk-F3YPXS5A.js";import"../../chunk-YDN4Y3SM.js";import"../../chunk-DJTFWVND.js";import"../../chunk-OJNBQE6P.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-MU5GNHEP.js";import"../../chunk-3VPV7RP4.js";import"../../chunk-H5VPHIYT.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-CS6HUFI7.js";import"../../chunk-MIWCD4RB.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-3PL7HVAM.js";import{N as r}from"../../chunk-7ZTSTQEQ.js";import{h as o}from"../../chunk-3SIHUEOL.js";import"../../chunk-QQUKR766.js";import"../../chunk-FIKV2W35.js";import"../../chunk-BJV226SY.js";import"../../chunk-3U3ONZCE.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-PE6MZT4O.js";import"../../chunk-P4TSAHPX.js";import"../../chunk-5KAFAPS3.js";import"../../chunk-F3YPXS5A.js";import"../../chunk-O2CR53AR.js";import"../../chunk-RVQ3CWCA.js";import"../../chunk-UIJIPDZR.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-GAETTSNN.js";import"../../chunk-3VPV7RP4.js";import"../../chunk-H5VPHIYT.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-CS6HUFI7.js";import"../../chunk-MIWCD4RB.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-JATD5IYX.js";import{N as r}from"../../chunk-W2ZUZZ6P.js";import{h as o}from"../../chunk-2MPTHBNK.js";import"../../chunk-XTURBU3W.js";import"../../chunk-DYYBLGB6.js";import"../../chunk-BJV226SY.js";import"../../chunk-JHUZNSX5.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-PE6MZT4O.js";import"../../chunk-PTVGF3KH.js";import"../../chunk-5KAFAPS3.js";import"../../chunk-F3YPXS5A.js";import"../../chunk-YDN4Y3SM.js";import"../../chunk-DJTFWVND.js";import"../../chunk-OJNBQE6P.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-MU5GNHEP.js";import"../../chunk-3VPV7RP4.js";import"../../chunk-H5VPHIYT.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-CS6HUFI7.js";import"../../chunk-MIWCD4RB.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,5 +1,5 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{a as f}from"../../chunk-5ZK3KFUA.js";import{b as $}from"../../chunk-BJV226SY.js";import{e as A,f as c,h as E}from"../../chunk-3U3ONZCE.js";import{a as h}from"../../chunk-OG7SKRZJ.js";import{g as m,j as i,l,v as y,y as S}from"../../chunk-F3YPXS5A.js";import"../../chunk-GAETTSNN.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-LLHU72AA.js";import*as M from"fs";var T=class extends y{ADDRESS_TYPE="string";SYSTEM_PACKAGE="@typemove/sui";PREFIX="Sui";PAYLOAD_OPTIONAL=!0;constructor(r){super(new $(new A({url:r})))}readModulesFile(r){let e=super.readModulesFile(r);return e.result?e.result:e}generateStructs(r,e,t){let n="";switch(i(r,e)){case"0x1::ascii::Char":case"0x1::ascii::String":case"0x2::object::ID":n+=`export type ${e.name} = string`;break;case"0x2::coin::Coin":n+=`export type ${e.name}<T> = string`;break;case"0x2::balance::Balance":n+=`export type ${e.name}<T> = bigint`;break;case"0x1::option::Option":n+="export type Option<T> = T | undefined";break}return n+super.generateStructs(r,e,t,n!=="")}generateForEvents(r,e){switch(i(r,e)){case"0x1::ascii::Char":case"0x1::ascii::String":case"0x2::object::ID":case"0x2::coin::Coin":case"0x1::option::Option":case"0x2::balance::Balance":return""}return super.generateForEvents(r,e)}generateExtra(r,e){let t=e.exposedFunctions.map(a=>this.generateBuilderForFunction(r||e.address,e,a)),n=e.exposedFunctions.map(a=>this.generateViewFunction(e,a));return`
2
+ import{a as f}from"../../chunk-5ZK3KFUA.js";import{b as $}from"../../chunk-BJV226SY.js";import{e as A,f as c,h as E}from"../../chunk-JHUZNSX5.js";import{a as h}from"../../chunk-OG7SKRZJ.js";import{g as m,j as i,l,v as y,y as S}from"../../chunk-F3YPXS5A.js";import"../../chunk-MU5GNHEP.js";import"../../chunk-DJQ5RDDN.js";import"../../chunk-LLHU72AA.js";import*as M from"fs";var T=class extends y{ADDRESS_TYPE="string";SYSTEM_PACKAGE="@typemove/sui";PREFIX="Sui";PAYLOAD_OPTIONAL=!0;constructor(r){super(new $(new A({url:r})))}readModulesFile(r){let e=super.readModulesFile(r);return e.result?e.result:e}generateStructs(r,e,t){let n="";switch(i(r,e)){case"0x1::ascii::Char":case"0x1::ascii::String":case"0x2::object::ID":n+=`export type ${e.name} = string`;break;case"0x2::coin::Coin":n+=`export type ${e.name}<T> = string`;break;case"0x2::balance::Balance":n+=`export type ${e.name}<T> = bigint`;break;case"0x1::option::Option":n+="export type Option<T> = T | undefined";break}return n+super.generateStructs(r,e,t,n!=="")}generateForEvents(r,e){switch(i(r,e)){case"0x1::ascii::Char":case"0x1::ascii::String":case"0x2::object::ID":case"0x2::coin::Coin":case"0x1::option::Option":case"0x2::balance::Balance":return""}return super.generateForEvents(r,e)}generateExtra(r,e){let t=e.exposedFunctions.map(a=>this.generateBuilderForFunction(r||e.address,e,a)),n=e.exposedFunctions.map(a=>this.generateViewFunction(e,a));return`
3
3
  export namespace builder {
4
4
  ${t.join(`
5
5
  `)}
@@ -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-FIKV2W35.js";import"../../chunk-3U3ONZCE.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-P4TSAHPX.js";import"../../chunk-5KAFAPS3.js";import"../../chunk-F3YPXS5A.js";import"../../chunk-O2CR53AR.js";import"../../chunk-RVQ3CWCA.js";import"../../chunk-UIJIPDZR.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-GAETTSNN.js";import"../../chunk-3VPV7RP4.js";import"../../chunk-H5VPHIYT.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-CS6HUFI7.js";import"../../chunk-MIWCD4RB.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-DYYBLGB6.js";import"../../chunk-JHUZNSX5.js";import"../../chunk-F2HFFA4Z.js";import"../../chunk-NHARQGR7.js";import"../../chunk-PTVGF3KH.js";import"../../chunk-5KAFAPS3.js";import"../../chunk-F3YPXS5A.js";import"../../chunk-YDN4Y3SM.js";import"../../chunk-DJTFWVND.js";import"../../chunk-OJNBQE6P.js";import"../../chunk-2GOCSOX5.js";import"../../chunk-MU5GNHEP.js";import"../../chunk-3VPV7RP4.js";import"../../chunk-H5VPHIYT.js";import"../../chunk-PLLN42GP.js";import"../../chunk-NMFPLO65.js";import"../../chunk-CS6HUFI7.js";import"../../chunk-MIWCD4RB.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-QQUKR766.js";import"../chunk-FIKV2W35.js";import"../chunk-BJV226SY.js";import{f as b,g as c,h as d}from"../chunk-3U3ONZCE.js";import"../chunk-F2HFFA4Z.js";import"../chunk-NHARQGR7.js";import"../chunk-PE6MZT4O.js";import"../chunk-P4TSAHPX.js";import"../chunk-5KAFAPS3.js";import{q as a}from"../chunk-F3YPXS5A.js";import"../chunk-O2CR53AR.js";import"../chunk-RVQ3CWCA.js";import"../chunk-UIJIPDZR.js";import"../chunk-2GOCSOX5.js";import"../chunk-GAETTSNN.js";import"../chunk-3VPV7RP4.js";import"../chunk-H5VPHIYT.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-CS6HUFI7.js";import"../chunk-MIWCD4RB.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-XTURBU3W.js";import"../chunk-DYYBLGB6.js";import"../chunk-BJV226SY.js";import{f as b,g as c,h as d}from"../chunk-JHUZNSX5.js";import"../chunk-F2HFFA4Z.js";import"../chunk-NHARQGR7.js";import"../chunk-PE6MZT4O.js";import"../chunk-PTVGF3KH.js";import"../chunk-5KAFAPS3.js";import{q as a}from"../chunk-F3YPXS5A.js";import"../chunk-YDN4Y3SM.js";import"../chunk-DJTFWVND.js";import"../chunk-OJNBQE6P.js";import"../chunk-2GOCSOX5.js";import"../chunk-MU5GNHEP.js";import"../chunk-3VPV7RP4.js";import"../chunk-H5VPHIYT.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-CS6HUFI7.js";import"../chunk-MIWCD4RB.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 _}from"../chunk-HGQB674R.js";import{g as M}from"../chunk-QQUKR766.js";import"../chunk-FIKV2W35.js";import"../chunk-BJV226SY.js";import{f as g}from"../chunk-3U3ONZCE.js";import"../chunk-OJQ3RVC4.js";import{c as m}from"../chunk-YSIRZN5R.js";import"../chunk-CIVWUI2F.js";import"../chunk-UJEEK2X5.js";import"../chunk-F2HFFA4Z.js";import"../chunk-NHARQGR7.js";import"../chunk-PE6MZT4O.js";import{c as D}from"../chunk-P4TSAHPX.js";import"../chunk-PNA6LFOX.js";import"../chunk-5KAFAPS3.js";import{a as A,d as u,n as C}from"../chunk-F3YPXS5A.js";import"../chunk-O2CR53AR.js";import"../chunk-RVQ3CWCA.js";import"../chunk-UIJIPDZR.js";import"../chunk-2GOCSOX5.js";import{a as T}from"../chunk-GAETTSNN.js";import{D as a}from"../chunk-3VPV7RP4.js";import"../chunk-H5VPHIYT.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-CS6HUFI7.js";import"../chunk-MIWCD4RB.js";import"../chunk-DJQ5RDDN.js";import{a as L}from"../chunk-FC546GTB.js";import{e as h}from"../chunk-LLHU72AA.js";var O=h(T(),1);import{Endpoints as V,ProcessorServiceImpl as J,State as q}from"@sentio/runtime";var I=class{server;constructor(e){this.server=e}testEntryFunctionCall(e,t=m.MAIN_NET){return this.testEntryFunctionCalls([e],t)}testEntryFunctionCalls(e,t=m.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=m.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=m.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=m.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===C(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(T(),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(b=>b.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=M(e);for(let r of n){let s=[u(r.package),r.module,r.function].join(A);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===C(o.type).qname)return{data:{suiEvent:{transaction:e,timestamp:new Date(e.timestampMs||0),slot:10000n}},handlerIds:[r.handlerId],handlerType:a.SUI_EVENT}}}};var P=class{server;constructor(e){this.server=e}testOnTransaction(e,t=_.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 w=h(T(),1),F={INJECTIVE_MAINNET:w.CosmosChainId.INJECTIVE_MAINNET,INJECTIVE_TESTNET:w.CosmosChainId.INJECTIVE_TESTNET};var N=class{server;constructor(e){this.server=e}testOnTransaction(e,t=F.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 x=h(T(),1),y=class{server;constructor(e){this.server=e}testOnEvents(e,t=x.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 b of p)for(let H of l)if(H.keys.includes(b))return n.push(d),n}return n}};var E={};function G(){q.reset()}var R=class{service;contractConfigs;accountConfigs;aptos;eth;solana;sui;fuel;cosmos;starknet;constructor(e,t={}){G(),this.service=new J(e),this.aptos=new I(this),this.solana=new v(this),this.eth=new B(this),this.sui=new S(this),this.fuel=new P(this),this.cosmos=new N(this),this.starknet=new y(this);for(let n in O.CHAIN_MAP){let r=t[n]||"";V.INSTANCE.chainServer.set(n,r)}}async start(e={templateInstances:[]},t=E){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=E){return this.service.stop(e,t)}getConfig(e,t=E){return this.service.getConfig(e,t)}processBindings(e,t=E){return this.service.processBindings(e,t)}processBinding(e,t=E){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 k(i){if(i!==void 0){if(i.doubleValue!==void 0)return i.doubleValue;if(i.bigInteger!==void 0){let e=D(i.bigInteger.data);return i.bigInteger.negative&&(e=-e),e}if(i.bigDecimal!==void 0)return new L(i.bigDecimal)}}function j(i,e){if(i){for(let t of i.counters)if(t.metadata?.name===e)return k(t.metricValue)}}function K(i,e){if(i){for(let t of i.gauges)if(t.metadata?.name===e)return k(t.metricValue)}}var U=h(T(),1);import{Endpoints as X}from"@sentio/runtime";function z(i){let e=[];Array.isArray(i)||(i=[i]);for(let t of Object.keys(U.CHAIN_MAP)){let n="TEST_ENDPOINT_"+t,r=process.env[n];r&&(e.push(t),X.INSTANCE.chainServer.set(t,r))}for(let t of i)if(!e.includes(t))return!1;return!0}export{k as MetricValueToNumber,R as TestProcessorServer,j as firstCounterValue,K as firstGaugeValue,z as loadTestProvidersFromEnv};
2
+ import{b as _}from"../chunk-HUWVEJAW.js";import{g as M}from"../chunk-XTURBU3W.js";import"../chunk-DYYBLGB6.js";import"../chunk-BJV226SY.js";import{f as g}from"../chunk-JHUZNSX5.js";import"../chunk-RNPQHMMK.js";import{c as m}from"../chunk-2B7T7ZQC.js";import"../chunk-CIVWUI2F.js";import"../chunk-UJEEK2X5.js";import"../chunk-F2HFFA4Z.js";import"../chunk-NHARQGR7.js";import"../chunk-PE6MZT4O.js";import{c as D}from"../chunk-PTVGF3KH.js";import"../chunk-PNA6LFOX.js";import"../chunk-5KAFAPS3.js";import{a as A,d as u,n as C}from"../chunk-F3YPXS5A.js";import"../chunk-YDN4Y3SM.js";import"../chunk-DJTFWVND.js";import"../chunk-OJNBQE6P.js";import"../chunk-2GOCSOX5.js";import{a as T}from"../chunk-MU5GNHEP.js";import{D as a}from"../chunk-3VPV7RP4.js";import"../chunk-H5VPHIYT.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-CS6HUFI7.js";import"../chunk-MIWCD4RB.js";import"../chunk-DJQ5RDDN.js";import{a as L}from"../chunk-FC546GTB.js";import{e as h}from"../chunk-LLHU72AA.js";var O=h(T(),1);import{Endpoints as V,ProcessorServiceImpl as J,State as q}from"@sentio/runtime";var I=class{server;constructor(e){this.server=e}testEntryFunctionCall(e,t=m.MAIN_NET){return this.testEntryFunctionCalls([e],t)}testEntryFunctionCalls(e,t=m.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=m.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=m.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=m.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===C(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(T(),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(b=>b.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=M(e);for(let r of n){let s=[u(r.package),r.module,r.function].join(A);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===C(o.type).qname)return{data:{suiEvent:{transaction:e,timestamp:new Date(e.timestampMs||0),slot:10000n}},handlerIds:[r.handlerId],handlerType:a.SUI_EVENT}}}};var P=class{server;constructor(e){this.server=e}testOnTransaction(e,t=_.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 w=h(T(),1),F={INJECTIVE_MAINNET:w.CosmosChainId.INJECTIVE_MAINNET,INJECTIVE_TESTNET:w.CosmosChainId.INJECTIVE_TESTNET};var N=class{server;constructor(e){this.server=e}testOnTransaction(e,t=F.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 x=h(T(),1),y=class{server;constructor(e){this.server=e}testOnEvents(e,t=x.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 b of p)for(let H of l)if(H.keys.includes(b))return n.push(d),n}return n}};var E={};function G(){q.reset()}var R=class{service;contractConfigs;accountConfigs;aptos;eth;solana;sui;fuel;cosmos;starknet;constructor(e,t={}){G(),this.service=new J(e),this.aptos=new I(this),this.solana=new v(this),this.eth=new B(this),this.sui=new S(this),this.fuel=new P(this),this.cosmos=new N(this),this.starknet=new y(this);for(let n in O.CHAIN_MAP){let r=t[n]||"";V.INSTANCE.chainServer.set(n,r)}}async start(e={templateInstances:[]},t=E){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=E){return this.service.stop(e,t)}getConfig(e,t=E){return this.service.getConfig(e,t)}processBindings(e,t=E){return this.service.processBindings(e,t)}processBinding(e,t=E){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 k(i){if(i!==void 0){if(i.doubleValue!==void 0)return i.doubleValue;if(i.bigInteger!==void 0){let e=D(i.bigInteger.data);return i.bigInteger.negative&&(e=-e),e}if(i.bigDecimal!==void 0)return new L(i.bigDecimal)}}function j(i,e){if(i){for(let t of i.counters)if(t.metadata?.name===e)return k(t.metricValue)}}function K(i,e){if(i){for(let t of i.gauges)if(t.metadata?.name===e)return k(t.metricValue)}}var U=h(T(),1);import{Endpoints as X}from"@sentio/runtime";function z(i){let e=[];Array.isArray(i)||(i=[i]);for(let t of Object.keys(U.CHAIN_MAP)){let n="TEST_ENDPOINT_"+t,r=process.env[n];r&&(e.push(t),X.INSTANCE.chainServer.set(t,r))}for(let t of i)if(!e.includes(t))return!1;return!0}export{k as MetricValueToNumber,R as TestProcessorServer,j as firstCounterValue,K as firstGaugeValue,z 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}from"../chunk-P4TSAHPX.js";import"../chunk-O2CR53AR.js";import"../chunk-RVQ3CWCA.js";import"../chunk-UIJIPDZR.js";import"../chunk-2GOCSOX5.js";import"../chunk-GAETTSNN.js";import"../chunk-3VPV7RP4.js";import"../chunk-H5VPHIYT.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-CS6HUFI7.js";import"../chunk-MIWCD4RB.js";import"../chunk-DJQ5RDDN.js";import"../chunk-FC546GTB.js";import"../chunk-LLHU72AA.js";export{e as EthereumDexPrice,c as PriceUnit,f as SepoliaDexPrice,a as bytesToBigInt,j as getCoinsThatHasPrice,d as getPackageRoot,i as getPriceBySymbol,h as getPriceByType,g as getPriceClient,k as ignoreEthCallException,b 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}from"../chunk-PTVGF3KH.js";import"../chunk-YDN4Y3SM.js";import"../chunk-DJTFWVND.js";import"../chunk-OJNBQE6P.js";import"../chunk-2GOCSOX5.js";import"../chunk-MU5GNHEP.js";import"../chunk-3VPV7RP4.js";import"../chunk-H5VPHIYT.js";import"../chunk-PLLN42GP.js";import"../chunk-NMFPLO65.js";import"../chunk-CS6HUFI7.js";import"../chunk-MIWCD4RB.js";import"../chunk-DJQ5RDDN.js";import"../chunk-FC546GTB.js";import"../chunk-LLHU72AA.js";export{e as EthereumDexPrice,c as PriceUnit,f as SepoliaDexPrice,a as bytesToBigInt,j as getCoinsThatHasPrice,d as getPackageRoot,i as getPriceBySymbol,h as getPriceByType,g as getPriceClient,k as ignoreEthCallException,b as token};
3
3
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentio/sdk-bundle",
3
- "version": "2.40.2-rc.2",
3
+ "version": "2.41.0-rc.2",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -47,7 +47,7 @@
47
47
  "!{lib,src}/*/tests"
48
48
  ],
49
49
  "dependencies": {
50
- "@sentio/runtime": "^2.40.2-rc.2"
50
+ "@sentio/runtime": "^2.41.0-rc.2"
51
51
  },
52
52
  "peerDependencies": {},
53
53
  "devDependencies": {},
@@ -1,3 +0,0 @@
1
- import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{c as E}from"./chunk-LLHU72AA.js";var m=E(o=>{"use strict";Object.defineProperty(o,"__esModule",{value:!0});o.getChainBlockscoutUrl=o.getChainExternalUrl=o.SupportedChains=o.getChainScanUrl=o.getChainType=o.getChainName=o.CHAIN_MAP=o.ChainId=o.StarknetChainId=o.CosmosChainId=o.FuelChainId=o.SolanaChainId=o.SuiChainId=o.AptosChainId=o.EthChainId=o.ChainType=void 0;var a;(function(e){e.SOLANA="solana",e.SUI="sui",e.APTOS="aptos",e.ETH="evm"})(a||(o.ChainType=a={}));var r;(function(e){e.ETHEREUM="1",e.GOERLI="5",e.OPTIMISM="10",e.CRONOS="25",e.BINANCE="56",e.POLYGON="137",e.MANTA_PACIFIC="169",e.XLAYER_TESTNET="195",e.XLAYER_MAINNET="196",e.B2_MAINNET="223",e.FANTOM="250",e.FRAXTAL="252",e.KUCOIN="321",e.ZKSYNC_ERA="324",e.CRONOS_TESTNET="338",e.ASTAR="592",e.POLYGON_ZKEVM="1101",e.CONFLUX="1030",e.METIS="1088",e.MOONBEAM="1284",e.BEVM_CANARY="1501",e.BEVM="11501",e.MERLIN_MAINNET="4200",e.MANTLE="5000",e.BASE="8453",e.LUMIO_TESTNET="9990",e.HOLESKY="17000",e.ASTAR_ZKEVM="3776",e.MODE="34443",e.ARBITRUM="42161",e.AVALANCHE="43114",e.ZIRCUIT_TESTNET="48899",e.ZIRCUIT_MAINNET="48900",e.BOB="60808",e.LINEA="59144",e.BLAST="81457",e.BASE_GOERLI="84531",e.CHILIZ="88888",e.TAIKO="167000",e.TAIKO_TESTNET="167008",e.BITLAYER="200901",e.ARBITRUM_GOERLI="421613",e.SCROLL="534352",e.ZKLINK_NOVA="810180",e.ZKATANA="1261120",e.SEPOLIA="11155111",e.AURORA="1313161554",e.BLAST_SEPOLIA="168587773"})(r||(o.EthChainId=r={}));var l;(function(e){e.APTOS_MAINNET="aptos_mainnet",e.APTOS_TESTNET="aptos_testnet",e.APTOS_DEVNET="aptos_devnet",e.APTOS_M2_TESTNET="aptos_m2_testnet",e.APTOS_M2_MAINNET="aptos_m2_mainnet"})(l||(o.AptosChainId=l={}));var x;(function(e){e.SUI_MAINNET="sui_mainnet",e.SUI_TESTNET="sui_testnet",e.SUI_DEVNET="sui_devnet",e.SUI_M2_TESTNET="sui_m2_testnet",e.SUI_M2_MAINNET="sui_m2_mainnet"})(x||(o.SuiChainId=x={}));var k;(function(e){e.SOLANA_MAINNET="sol_mainnet",e.SOLANA_DEVNET="sol_devnet",e.SOLANA_TESTNET="sol_testnet",e.SOLANA_PYTH="sol_pyth"})(k||(o.SolanaChainId=k={}));var p;(function(e){e.FUEL_MAINNET="fuel_mainnet",e.FUEL_TESTNET="fuel_testnet"})(p||(o.FuelChainId=p={}));var d;(function(e){e.INJECTIVE_MAINNET="injective_mainnet",e.INJECTIVE_TESTNET="injective_testnet"})(d||(o.CosmosChainId=d={}));var f;(function(e){e.STARKNET_MAINNET="starknet_mainnet",e.STARKNET_SEPOLIA="starknet_sepolia"})(f||(o.StarknetChainId=f={}));o.ChainId={...r,...l,...x,...k,...p,...d,...f};o.CHAIN_MAP={[o.ChainId.POLYGON_ZKEVM]:"Polygon zkEVM",[o.ChainId.ZKSYNC_ERA]:"zkSync Era",[o.ChainId.APTOS_M2_MAINNET]:"Movement M2 Mainnet (Aptos)",[o.ChainId.APTOS_M2_TESTNET]:"Movement M2 Testnet (Aptos)",[o.ChainId.SUI_M2_MAINNET]:"Movement M2 Mainnet (Sui)",[o.ChainId.SUI_M2_TESTNET]:"Movement M2 Testnet (Sui)"};for(let[e,t]of Object.entries(o.ChainId)){if(o.CHAIN_MAP[t])continue;let n=e.split("_");o.CHAIN_MAP[t]=n.map((s,c)=>s[0]+s.slice(1).toLowerCase()).join(" ")}function A(e){if(typeof e=="number"&&(e=e.toString()),e){let t=o.CHAIN_MAP[e];if(t)return t}return e||""}o.getChainName=A;function b(e){let t=String(e).toLowerCase();return t.startsWith("sol")?a.SOLANA:t.startsWith("sui")?a.SUI:t.startsWith("apt")?a.APTOS:a.ETH}o.getChainType=b;function T(e,t,n){let s=A(e);if(s==="Ethereum")return n==="block"?`https://etherscan.io/block/${t}`:n==="address"?`https://etherscan.io/address/${t}`:`https://etherscan.io/tx/${t}`;if(s==="Polygon")return n==="block"?`https://polygonscan.com/block/${t}`:n==="address"?`https://polygonscan.com/address/${t}`:`https://polygonscan.com/tx/${t}`;if(s.startsWith("Aptos ")){let c="";return s.includes("Testnet")?c="?network=testnet":s.includes("Devnet")&&(c="?network=devnet"),n==="block"?`https://explorer.aptoslabs.com/block/${t}/${c}`:n==="address"?`https://explorer.aptoslabs.com/account/${t}/${c}`:`https://explorer.aptoslabs.com/txn/${t}/${c}`}if(s.startsWith("Solana "))return n==="block"?`https://explorer.solana.com/block/${t}`:n==="address"?`https://explorer.solana.com/address/${t}`:`https://explorer.solana.io/tx/${t}`;if(s.startsWith("Sui "))return n==="block"?`https://suivision.xyz/checkpoint/${t}`:n==="address"?`https://suivision.xyz/account/${t}`:`https://suivision.xyz/txblock/${t}`}o.getChainScanUrl=T;o.SupportedChains={[r.ETHEREUM]:{name:"Ethereum Mainnet",chainId:r.ETHEREUM,priceAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,blockExplorerPrefix:"https://etherscan.io/block/",tokenExplorerPrefix:"https://etherscan.io/token/",addressExplorerPrefix:"https://etherscan.io/address/",transactionExplorerPrefix:"https://etherscan.io/tx/",blockscoutBlockPrefix:"https://eth.blockscout.com/block/",blockscoutTokenPrefix:"https://eth.blockscout.com/token/",blockscoutAddressPrefix:"https://eth.blockscout.com/address/",blockscoutTransactionPrefix:"https://eth.blockscout.com/tx/"},[r.GOERLI]:{name:"Goerli Testnet",chainId:r.GOERLI,priceAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,blockExplorerPrefix:"https://goerli.etherscan.io/block/",tokenExplorerPrefix:"https://goerli.etherscan.io/token/",addressExplorerPrefix:"https://goerli.etherscan.io/address/",transactionExplorerPrefix:"https://goerli.etherscan.io/tx/",blockscoutBlockPrefix:"https://eth-goerli.blockscout.com/block/",blockscoutTokenPrefix:"https://eth-goerli.blockscout.com/token/",blockscoutAddressPrefix:"https://eth-goerli.blockscout.com/address/",blockscoutTransactionPrefix:"https://eth-goerli.blockscout.com/tx/"},[r.SEPOLIA]:{name:"Sepolia Testnet",chainId:r.SEPOLIA,priceAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,blockExplorerPrefix:"https://sepolia.etherscan.io/block/",tokenExplorerPrefix:"https://sepolia.etherscan.io/token/",addressExplorerPrefix:"https://sepolia.etherscan.io/address/",transactionExplorerPrefix:"https://sepolia.etherscan.io/tx/",blockscoutBlockPrefix:"https://eth-sepolia.blockscout.com/block/",blockscoutTokenPrefix:"https://eth-sepolia.blockscout.com/token/",blockscoutAddressPrefix:"https://eth-sepolia.blockscout.com/address/",blockscoutTransactionPrefix:"https://eth-sepolia.blockscout.com/tx/"},[r.HOLESKY]:{name:"Holesky Testnet",chainId:r.HOLESKY,priceAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,blockExplorerPrefix:"https://holesky.etherscan.io/block/",tokenExplorerPrefix:"https://holesky.etherscan.io/token/",addressExplorerPrefix:"https://holesky.etherscan.io/address/",transactionExplorerPrefix:"https://holesky.etherscan.io/tx/",blockscoutBlockPrefix:"https://eth-holesky.blockscout.com/block/",blockscoutTokenPrefix:"https://eth-holesky.blockscout.com/token/",blockscoutAddressPrefix:"https://eth-holesky.blockscout.com/address/",blockscoutTransactionPrefix:"https://eth-holesky.blockscout.com/tx/"},[r.BINANCE]:{name:"Binance Smart Chain",chainId:r.BINANCE,priceAddress:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",tokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"BNB",tokenDecimals:18,blockExplorerPrefix:"https://bscscan.com/block/",tokenExplorerPrefix:"https://bscscan.com/token/",addressExplorerPrefix:"https://bscscan.com/address/",transactionExplorerPrefix:"https://bscscan.com/tx/"},[r.POLYGON]:{name:"Polygon",chainId:r.POLYGON,priceAddress:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",tokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"MATIC",tokenDecimals:18,blockExplorerPrefix:"https://polygonscan.com/block/",tokenExplorerPrefix:"https://polygonscan.com/token/",addressExplorerPrefix:"https://polygonscan.com/address/",transactionExplorerPrefix:"https://polygonscan.com/tx/"},[r.ARBITRUM]:{name:"Arbitrum",chainId:r.ARBITRUM,priceAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,blockExplorerPrefix:"https://arbiscan.io/block/",tokenExplorerPrefix:"https://arbiscan.io/token/",addressExplorerPrefix:"https://arbiscan.io/address/",transactionExplorerPrefix:"https://arbiscan.io/tx/"},[r.AVALANCHE]:{name:"Avalanche",chainId:r.AVALANCHE,priceAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,blockExplorerPrefix:"https://snowtrace.io/block/",tokenExplorerPrefix:"https://snowtrace.io/token/",addressExplorerPrefix:"https://snowtrace.io/address/",transactionExplorerPrefix:"https://snowtrace.io/tx/"},[r.POLYGON_ZKEVM]:{name:"Polygon zkEVM",chainId:r.POLYGON_ZKEVM,priceAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,blockExplorerPrefix:"https://zkevm.polygonscan.com/block/",tokenExplorerPrefix:"https://zkevm.polygonscan.com/token/",addressExplorerPrefix:"https://zkevm.polygonscan.com/address/",transactionExplorerPrefix:"https://zkevm.polygonscan.com/tx/"},[r.MOONBEAM]:{name:"Moonbeam",chainId:r.MOONBEAM,priceAddress:"0xacc15dc74880c9944775448304b263d191c6077f",tokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"GLMR",tokenDecimals:18,blockExplorerPrefix:"https://moonscan.io/block/",tokenExplorerPrefix:"https://moonscan.io/token/",addressExplorerPrefix:"https://moonscan.io/address/",transactionExplorerPrefix:"https://moonscan.io/tx/"},[r.ASTAR]:{name:"Astar",chainId:r.ASTAR,priceAddress:"0xaeaaf0e2c81af264101b9129c00f4440ccf0f720",tokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ASTR",tokenDecimals:18,blockExplorerPrefix:"https://blockscout.com/astar/block/",tokenExplorerPrefix:"https://blockscout.com/astar/token/",addressExplorerPrefix:"https://blockscout.com/astar/address/",transactionExplorerPrefix:"https://blockscout.com/astar/tx/"},[r.ASTAR_ZKEVM]:{name:"Astar zkEVM",chainId:r.ASTAR_ZKEVM,priceAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,blockExplorerPrefix:"https://astar-zkevm.explorer.startale.com/block/",tokenExplorerPrefix:"https://astar-zkevm.explorer.startale.com/token/",addressExplorerPrefix:"https://astar-zkevm.explorer.startale.com/address/",transactionExplorerPrefix:"https://astar-zkevm.explorer.startale.com/tx/"},[r.ZKATANA]:{name:"zKatana",chainId:r.ZKATANA,priceAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,blockExplorerPrefix:"https://zkatana.blockscout.com/block/",tokenExplorerPrefix:"https://zkatana.blockscout.com/token/",addressExplorerPrefix:"https://zkatana.blockscout.com/address/",transactionExplorerPrefix:"https://zkatana.blockscout.com/tx/"},[r.LINEA]:{name:"Linea",chainId:r.LINEA,priceAddress:"0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f",tokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,blockExplorerPrefix:"https://lineascan.build/block/",tokenExplorerPrefix:"https://lineascan.build/token/",addressExplorerPrefix:"https://lineascan.build/address/",transactionExplorerPrefix:"https://lineascan.build/tx/"},[r.SCROLL]:{name:"Scroll",chainId:r.SCROLL,priceAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,blockExplorerPrefix:"https://scrollscan.com/block/",tokenExplorerPrefix:"https://scrollscan.com/token/",addressExplorerPrefix:"https://scrollscan.com/address/",transactionExplorerPrefix:"https://scrollscan.com/tx/"},[r.TAIKO]:{name:"Taiko",chainId:r.TAIKO,priceAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,blockExplorerPrefix:"https://taikoscan.io/block/",tokenExplorerPrefix:"https://taikoscan.io/token/",addressExplorerPrefix:"https://taikoscan.io/address/",transactionExplorerPrefix:"https://taikoscan.io/tx/"},[r.XLAYER_TESTNET]:{name:"X1 Testnet",chainId:r.XLAYER_TESTNET,priceAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,blockExplorerPrefix:"https://www.oklink.com/x1-test/block/",tokenExplorerPrefix:"https://www.oklink.com/x1-test/token/",addressExplorerPrefix:"https://www.oklink.com/x1-test/address/",transactionExplorerPrefix:"https://www.oklink.com/x1-test/tx/tx/"},[r.XLAYER_MAINNET]:{name:"X Layer",chainId:r.XLAYER_MAINNET,priceAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,blockExplorerPrefix:"https://www.oklink.com/xlayer/block/",tokenExplorerPrefix:"https://www.oklink.com/xlayer/token/",addressExplorerPrefix:"https://www.oklink.com/xlayer/address/",transactionExplorerPrefix:"https://www.oklink.com/xlayer/tx/"},[r.BLAST]:{name:"Blast",chainId:r.BLAST,priceAddress:"0x4300000000000000000000000000000000000004",tokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,blockExplorerPrefix:"https://blastscan.io/block/",tokenExplorerPrefix:"https://blastscan.io/token/",addressExplorerPrefix:"https://blastscan.io/address/",transactionExplorerPrefix:"https://blastscan.io/tx/"},[r.BASE]:{name:"Base",chainId:r.BASE,priceAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,blockExplorerPrefix:"https://basescan.org/block/",tokenExplorerPrefix:"https://basescan.org/token/",addressExplorerPrefix:"https://basescan.org/address/",transactionExplorerPrefix:"https://basescan.org/tx/"}};function u(e,t,n){if(!e||!t||!n)return;let s=o.SupportedChains[e];if(s)switch(n){case"block":return`${s.blockExplorerPrefix}${t}`;case"address":return`${s.addressExplorerPrefix}${t}`;case"transaction":return`${s.transactionExplorerPrefix}${t}`;case"token":return`${s.tokenExplorerPrefix}${t}`;default:return}}o.getChainExternalUrl=u;function P(e,t,n){if(!e||!t||!n)return;let s=o.SupportedChains[e];if(s)switch(n){case"block":return s.blockscoutBlockPrefix?`${s.blockscoutBlockPrefix}${t}`:void 0;case"address":return s.blockscoutAddressPrefix?`${s.blockscoutAddressPrefix}${t}`:void 0;case"transaction":return s.blockscoutTransactionPrefix?`${s.blockscoutTransactionPrefix}${t}`:void 0;case"token":return s.blockscoutTokenPrefix?`${s.blockscoutTokenPrefix}${t}`:void 0;default:return}}o.getChainBlockscoutUrl=P});var _=E(i=>{"use strict";var S=i&&i.__createBinding||(Object.create?function(e,t,n,s){s===void 0&&(s=n);var c=Object.getOwnPropertyDescriptor(t,n);(!c||("get"in c?!t.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,c)}:function(e,t,n,s){s===void 0&&(s=n),e[s]=t[n]}),N=i&&i.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&S(t,e,n)};Object.defineProperty(i,"__esModule",{value:!0});N(m(),i)});export{_ as a};
3
- //# sourceMappingURL=chunk-GAETTSNN.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../node_modules/.pnpm/@sentio+chain@1.1.15/node_modules/@sentio/chain/src/chain-id.ts","../../../node_modules/.pnpm/@sentio+chain@1.1.15/node_modules/@sentio/chain/src/index.ts"],"sourcesContent":["// copy from https://github.com/DefiLlama/chainlist/blob/main/constants/chainIds.js\n// and https://besu.hyperledger.org/en/stable/Concepts/NetworkID-And-ChainID/\n\nexport enum ChainType {\n SOLANA = 'solana',\n SUI = 'sui',\n APTOS = 'aptos',\n ETH = 'evm'\n}\n\nexport enum EthChainId {\n ETHEREUM = '1',\n GOERLI = '5',\n OPTIMISM = '10',\n CRONOS = '25',\n BINANCE = '56',\n POLYGON = '137',\n MANTA_PACIFIC = '169',\n XLAYER_TESTNET = '195',\n XLAYER_MAINNET = '196',\n B2_MAINNET = '223',\n FANTOM = '250',\n FRAXTAL = '252',\n KUCOIN = '321',\n ZKSYNC_ERA = '324',\n CRONOS_TESTNET = '338',\n ASTAR = '592',\n POLYGON_ZKEVM = '1101',\n CONFLUX = '1030',\n METIS = '1088',\n MOONBEAM = '1284',\n BEVM_CANARY = '1501',\n BEVM = '11501',\n MERLIN_MAINNET = '4200',\n MANTLE = '5000',\n BASE = '8453',\n LUMIO_TESTNET = '9990',\n HOLESKY = '17000',\n ASTAR_ZKEVM = '3776',\n MODE = '34443',\n ARBITRUM = '42161',\n AVALANCHE = '43114',\n ZIRCUIT_TESTNET = '48899',\n ZIRCUIT_MAINNET = '48900',\n BOB = '60808',\n LINEA = '59144',\n BLAST = '81457',\n BASE_GOERLI = '84531',\n CHILIZ = '88888',\n TAIKO = '167000',\n TAIKO_TESTNET = '167008',\n BITLAYER = '200901',\n ARBITRUM_GOERLI = '421613',\n SCROLL = '534352',\n ZKLINK_NOVA = '810180',\n ZKATANA = '1261120',\n SEPOLIA = '11155111',\n AURORA = '1313161554',\n BLAST_SEPOLIA = '168587773'\n}\n\nexport enum AptosChainId {\n APTOS_MAINNET = 'aptos_mainnet',\n APTOS_TESTNET = 'aptos_testnet',\n APTOS_DEVNET = 'aptos_devnet',\n APTOS_M2_TESTNET = 'aptos_m2_testnet',\n APTOS_M2_MAINNET = 'aptos_m2_mainnet'\n}\n\nexport enum SuiChainId {\n SUI_MAINNET = 'sui_mainnet',\n SUI_TESTNET = 'sui_testnet',\n SUI_DEVNET = 'sui_devnet',\n SUI_M2_TESTNET = 'sui_m2_testnet',\n SUI_M2_MAINNET = 'sui_m2_mainnet'\n}\n\nexport enum SolanaChainId {\n SOLANA_MAINNET = 'sol_mainnet',\n SOLANA_DEVNET = 'sol_devnet',\n SOLANA_TESTNET = 'sol_testnet',\n SOLANA_PYTH = 'sol_pyth'\n}\nexport enum FuelChainId {\n FUEL_MAINNET = 'fuel_mainnet',\n FUEL_TESTNET = 'fuel_testnet'\n}\n\nexport enum CosmosChainId {\n INJECTIVE_MAINNET = 'injective_mainnet',\n INJECTIVE_TESTNET = 'injective_testnet'\n}\n\nexport enum StarknetChainId {\n STARKNET_MAINNET = 'starknet_mainnet',\n STARKNET_SEPOLIA = 'starknet_sepolia'\n}\n\nexport type ChainId =\n | EthChainId\n | AptosChainId\n | SuiChainId\n | SolanaChainId\n | FuelChainId\n | CosmosChainId\n | StarknetChainId\nexport const ChainId = {\n ...EthChainId,\n ...AptosChainId,\n ...SuiChainId,\n ...SolanaChainId,\n ...FuelChainId,\n ...CosmosChainId,\n ...StarknetChainId\n}\n\nexport const CHAIN_MAP: Record<string, string> = {\n [ChainId.POLYGON_ZKEVM]: 'Polygon zkEVM',\n [ChainId.ZKSYNC_ERA]: 'zkSync Era',\n [ChainId.APTOS_M2_MAINNET]: 'Movement M2 Mainnet (Aptos)',\n [ChainId.APTOS_M2_TESTNET]: 'Movement M2 Testnet (Aptos)',\n [ChainId.SUI_M2_MAINNET]: 'Movement M2 Mainnet (Sui)',\n [ChainId.SUI_M2_TESTNET]: 'Movement M2 Testnet (Sui)'\n}\n\nfor (const [key, value] of Object.entries(ChainId)) {\n if (CHAIN_MAP[value]) {\n continue\n }\n const parts = key.split('_')\n CHAIN_MAP[value] = parts\n .map((part, index) => {\n return part[0] + part.slice(1).toLowerCase()\n })\n .join(' ')\n}\n\nexport function getChainName(chainId: string | number | null | undefined): string {\n if (typeof chainId === 'number') {\n chainId = chainId.toString()\n }\n if (chainId) {\n const name = CHAIN_MAP[chainId]\n if (name) {\n return name\n }\n }\n return chainId || ''\n}\n\nexport function getChainType(chainId?: string | number): ChainType {\n const id = String(chainId).toLowerCase()\n if (id.startsWith('sol')) {\n return ChainType.SOLANA\n }\n if (id.startsWith('sui')) {\n return ChainType.SUI\n }\n if (id.startsWith('apt')) {\n return ChainType.APTOS\n }\n return ChainType.ETH\n}\n\n/**\n * @deprecated use getChainExternalUrl instead\n * @param chainId\n * @param hash\n * @param subtype\n * @returns\n */\nexport function getChainScanUrl(\n chainId?: string | number,\n hash?: string,\n subtype?: 'block' | 'address' | 'transaction'\n): string | undefined {\n const chainName = getChainName(chainId)\n if (chainName === 'Ethereum') {\n if (subtype === 'block') {\n return `https://etherscan.io/block/${hash}`\n } else if (subtype === 'address') {\n return `https://etherscan.io/address/${hash}`\n } else {\n return `https://etherscan.io/tx/${hash}`\n }\n }\n if (chainName === 'Polygon') {\n if (subtype === 'block') {\n return `https://polygonscan.com/block/${hash}`\n } else if (subtype === 'address') {\n return `https://polygonscan.com/address/${hash}`\n } else {\n return `https://polygonscan.com/tx/${hash}`\n }\n }\n if (chainName.startsWith('Aptos ')) {\n let suffix = ''\n if (chainName.includes('Testnet')) {\n suffix = '?network=testnet'\n } else if (chainName.includes('Devnet')) {\n suffix = '?network=devnet'\n }\n\n if (subtype === 'block') {\n return `https://explorer.aptoslabs.com/block/${hash}/${suffix}`\n } else if (subtype === 'address') {\n return `https://explorer.aptoslabs.com/account/${hash}/${suffix}`\n } else {\n return `https://explorer.aptoslabs.com/txn/${hash}/${suffix}`\n }\n }\n if (chainName.startsWith('Solana ')) {\n if (subtype === 'block') {\n return `https://explorer.solana.com/block/${hash}`\n } else if (subtype === 'address') {\n return `https://explorer.solana.com/address/${hash}`\n } else {\n return `https://explorer.solana.io/tx/${hash}`\n }\n }\n if (chainName.startsWith('Sui ')) {\n if (subtype === 'block') {\n return `https://suivision.xyz/checkpoint/${hash}`\n } else if (subtype === 'address') {\n return `https://suivision.xyz/account/${hash}`\n } else {\n return `https://suivision.xyz/txblock/${hash}`\n }\n }\n return undefined\n}\n\nexport type SupportedChainType = {\n name: string\n chainId: ChainId\n priceAddress: string // price feed address, normally Wxxx (Wrapped xxx)\n tokenAddress: string // gas token address\n tokenSymbol: string // gas token symbol\n tokenDecimals: number // gas token decimals\n blockExplorerPrefix: string\n tokenExplorerPrefix: string\n addressExplorerPrefix: string\n transactionExplorerPrefix: string\n blockscoutBlockPrefix?: string\n blockscoutTokenPrefix?: string\n blockscoutAddressPrefix?: string\n blockscoutTransactionPrefix?: string\n}\n\nexport const SupportedChains: Record<ChainId | string, SupportedChainType> = {\n [EthChainId.ETHEREUM]: {\n name: 'Ethereum Mainnet',\n chainId: EthChainId.ETHEREUM,\n priceAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n blockExplorerPrefix: 'https://etherscan.io/block/',\n tokenExplorerPrefix: 'https://etherscan.io/token/',\n addressExplorerPrefix: 'https://etherscan.io/address/',\n transactionExplorerPrefix: 'https://etherscan.io/tx/',\n blockscoutBlockPrefix: 'https://eth.blockscout.com/block/',\n blockscoutTokenPrefix: 'https://eth.blockscout.com/token/',\n blockscoutAddressPrefix: 'https://eth.blockscout.com/address/',\n blockscoutTransactionPrefix: 'https://eth.blockscout.com/tx/'\n },\n [EthChainId.GOERLI]: {\n name: 'Goerli Testnet',\n chainId: EthChainId.GOERLI,\n priceAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n blockExplorerPrefix: 'https://goerli.etherscan.io/block/',\n tokenExplorerPrefix: 'https://goerli.etherscan.io/token/',\n addressExplorerPrefix: 'https://goerli.etherscan.io/address/',\n transactionExplorerPrefix: 'https://goerli.etherscan.io/tx/',\n blockscoutBlockPrefix: 'https://eth-goerli.blockscout.com/block/',\n blockscoutTokenPrefix: 'https://eth-goerli.blockscout.com/token/',\n blockscoutAddressPrefix: 'https://eth-goerli.blockscout.com/address/',\n blockscoutTransactionPrefix: 'https://eth-goerli.blockscout.com/tx/'\n },\n [EthChainId.SEPOLIA]: {\n name: 'Sepolia Testnet',\n chainId: EthChainId.SEPOLIA,\n priceAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n blockExplorerPrefix: 'https://sepolia.etherscan.io/block/',\n tokenExplorerPrefix: 'https://sepolia.etherscan.io/token/',\n addressExplorerPrefix: 'https://sepolia.etherscan.io/address/',\n transactionExplorerPrefix: 'https://sepolia.etherscan.io/tx/',\n blockscoutBlockPrefix: 'https://eth-sepolia.blockscout.com/block/',\n blockscoutTokenPrefix: 'https://eth-sepolia.blockscout.com/token/',\n blockscoutAddressPrefix: 'https://eth-sepolia.blockscout.com/address/',\n blockscoutTransactionPrefix: 'https://eth-sepolia.blockscout.com/tx/'\n },\n [EthChainId.HOLESKY]: {\n name: 'Holesky Testnet',\n chainId: EthChainId.HOLESKY,\n priceAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n blockExplorerPrefix: 'https://holesky.etherscan.io/block/',\n tokenExplorerPrefix: 'https://holesky.etherscan.io/token/',\n addressExplorerPrefix: 'https://holesky.etherscan.io/address/',\n transactionExplorerPrefix: 'https://holesky.etherscan.io/tx/',\n blockscoutBlockPrefix: 'https://eth-holesky.blockscout.com/block/',\n blockscoutTokenPrefix: 'https://eth-holesky.blockscout.com/token/',\n blockscoutAddressPrefix: 'https://eth-holesky.blockscout.com/address/',\n blockscoutTransactionPrefix: 'https://eth-holesky.blockscout.com/tx/'\n },\n [EthChainId.BINANCE]: {\n name: 'Binance Smart Chain',\n chainId: EthChainId.BINANCE,\n priceAddress: '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'BNB',\n tokenDecimals: 18,\n blockExplorerPrefix: 'https://bscscan.com/block/',\n tokenExplorerPrefix: 'https://bscscan.com/token/',\n addressExplorerPrefix: 'https://bscscan.com/address/',\n transactionExplorerPrefix: 'https://bscscan.com/tx/'\n },\n [EthChainId.POLYGON]: {\n name: 'Polygon',\n chainId: EthChainId.POLYGON,\n priceAddress: '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270', // WMATIC\n tokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'MATIC',\n tokenDecimals: 18,\n blockExplorerPrefix: 'https://polygonscan.com/block/',\n tokenExplorerPrefix: 'https://polygonscan.com/token/',\n addressExplorerPrefix: 'https://polygonscan.com/address/',\n transactionExplorerPrefix: 'https://polygonscan.com/tx/'\n // blockscoutBlockPrefix: 'https://polygon.blockscout.com/block/',\n // blockscoutTokenPrefix: 'https://polygon.blockscout.com/token/',\n // blockscoutAddressPrefix: 'https://polygon.blockscout.com/address/',\n // blockscoutTransactionPrefix: 'https://polygon.blockscout.com/tx/'\n },\n [EthChainId.ARBITRUM]: {\n name: 'Arbitrum',\n chainId: EthChainId.ARBITRUM,\n priceAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n blockExplorerPrefix: 'https://arbiscan.io/block/',\n tokenExplorerPrefix: 'https://arbiscan.io/token/',\n addressExplorerPrefix: 'https://arbiscan.io/address/',\n transactionExplorerPrefix: 'https://arbiscan.io/tx/'\n },\n [EthChainId.AVALANCHE]: {\n name: 'Avalanche',\n chainId: EthChainId.AVALANCHE,\n priceAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n blockExplorerPrefix: 'https://snowtrace.io/block/',\n tokenExplorerPrefix: 'https://snowtrace.io/token/',\n addressExplorerPrefix: 'https://snowtrace.io/address/',\n transactionExplorerPrefix: 'https://snowtrace.io/tx/'\n },\n [EthChainId.POLYGON_ZKEVM]: {\n name: 'Polygon zkEVM',\n chainId: EthChainId.POLYGON_ZKEVM,\n priceAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n blockExplorerPrefix: 'https://zkevm.polygonscan.com/block/',\n tokenExplorerPrefix: 'https://zkevm.polygonscan.com/token/',\n addressExplorerPrefix: 'https://zkevm.polygonscan.com/address/',\n transactionExplorerPrefix: 'https://zkevm.polygonscan.com/tx/'\n },\n [EthChainId.MOONBEAM]: {\n name: 'Moonbeam',\n chainId: EthChainId.MOONBEAM,\n priceAddress: '0xacc15dc74880c9944775448304b263d191c6077f', // WGLMR\n tokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'GLMR',\n tokenDecimals: 18,\n blockExplorerPrefix: 'https://moonscan.io/block/',\n tokenExplorerPrefix: 'https://moonscan.io/token/',\n addressExplorerPrefix: 'https://moonscan.io/address/',\n transactionExplorerPrefix: 'https://moonscan.io/tx/'\n },\n [EthChainId.ASTAR]: {\n name: 'Astar',\n chainId: EthChainId.ASTAR,\n priceAddress: '0xaeaaf0e2c81af264101b9129c00f4440ccf0f720', // WASTR\n tokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'ASTR',\n tokenDecimals: 18,\n blockExplorerPrefix: 'https://blockscout.com/astar/block/',\n tokenExplorerPrefix: 'https://blockscout.com/astar/token/',\n addressExplorerPrefix: 'https://blockscout.com/astar/address/',\n transactionExplorerPrefix: 'https://blockscout.com/astar/tx/'\n },\n [EthChainId.ASTAR_ZKEVM]: {\n name: 'Astar zkEVM',\n chainId: EthChainId.ASTAR_ZKEVM,\n priceAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n blockExplorerPrefix: 'https://astar-zkevm.explorer.startale.com/block/',\n tokenExplorerPrefix: 'https://astar-zkevm.explorer.startale.com/token/',\n addressExplorerPrefix: 'https://astar-zkevm.explorer.startale.com/address/',\n transactionExplorerPrefix: 'https://astar-zkevm.explorer.startale.com/tx/'\n },\n [EthChainId.ZKATANA]: {\n name: 'zKatana',\n chainId: EthChainId.ZKATANA,\n priceAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n blockExplorerPrefix: 'https://zkatana.blockscout.com/block/',\n tokenExplorerPrefix: 'https://zkatana.blockscout.com/token/',\n addressExplorerPrefix: 'https://zkatana.blockscout.com/address/',\n transactionExplorerPrefix: 'https://zkatana.blockscout.com/tx/'\n },\n [EthChainId.LINEA]: {\n name: 'Linea',\n chainId: EthChainId.LINEA,\n priceAddress: '0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f', // WETH\n tokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n blockExplorerPrefix: 'https://lineascan.build/block/',\n tokenExplorerPrefix: 'https://lineascan.build/token/',\n addressExplorerPrefix: 'https://lineascan.build/address/',\n transactionExplorerPrefix: 'https://lineascan.build/tx/'\n },\n [EthChainId.SCROLL]: {\n name: 'Scroll',\n chainId: EthChainId.SCROLL,\n priceAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n blockExplorerPrefix: 'https://scrollscan.com/block/',\n tokenExplorerPrefix: 'https://scrollscan.com/token/',\n addressExplorerPrefix: 'https://scrollscan.com/address/',\n transactionExplorerPrefix: 'https://scrollscan.com/tx/'\n },\n [EthChainId.TAIKO]: {\n name: 'Taiko',\n chainId: EthChainId.TAIKO,\n priceAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n blockExplorerPrefix: 'https://taikoscan.io/block/',\n tokenExplorerPrefix: 'https://taikoscan.io/token/',\n addressExplorerPrefix: 'https://taikoscan.io/address/',\n transactionExplorerPrefix: 'https://taikoscan.io/tx/'\n },\n [EthChainId.XLAYER_TESTNET]: {\n name: 'X1 Testnet',\n chainId: EthChainId.XLAYER_TESTNET,\n priceAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n blockExplorerPrefix: 'https://www.oklink.com/x1-test/block/',\n tokenExplorerPrefix: 'https://www.oklink.com/x1-test/token/',\n addressExplorerPrefix: 'https://www.oklink.com/x1-test/address/',\n transactionExplorerPrefix: 'https://www.oklink.com/x1-test/tx/tx/'\n },\n [EthChainId.XLAYER_MAINNET]: {\n name: 'X Layer',\n chainId: EthChainId.XLAYER_MAINNET,\n priceAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n blockExplorerPrefix: 'https://www.oklink.com/xlayer/block/',\n tokenExplorerPrefix: 'https://www.oklink.com/xlayer/token/',\n addressExplorerPrefix: 'https://www.oklink.com/xlayer/address/',\n transactionExplorerPrefix: 'https://www.oklink.com/xlayer/tx/'\n },\n [EthChainId.BLAST]: {\n name: 'Blast',\n chainId: EthChainId.BLAST,\n priceAddress: '0x4300000000000000000000000000000000000004',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n blockExplorerPrefix: 'https://blastscan.io/block/',\n tokenExplorerPrefix: 'https://blastscan.io/token/',\n addressExplorerPrefix: 'https://blastscan.io/address/',\n transactionExplorerPrefix: 'https://blastscan.io/tx/'\n },\n [EthChainId.BASE]: {\n name: 'Base',\n chainId: EthChainId.BASE,\n priceAddress: '0x4200000000000000000000000000000000000006',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n blockExplorerPrefix: 'https://basescan.org/block/',\n tokenExplorerPrefix: 'https://basescan.org/token/',\n addressExplorerPrefix: 'https://basescan.org/address/',\n transactionExplorerPrefix: 'https://basescan.org/tx/'\n }\n}\n\nexport function getChainExternalUrl(\n chainId?: string | number,\n hash?: string,\n subtype?: 'block' | 'address' | 'transaction' | 'token'\n): string | undefined {\n if (!chainId || !hash || !subtype) {\n return\n }\n const supportedChain = SupportedChains[chainId as ChainId]\n if (!supportedChain) {\n return\n }\n switch (subtype) {\n case 'block':\n return `${supportedChain.blockExplorerPrefix}${hash}`\n case 'address':\n return `${supportedChain.addressExplorerPrefix}${hash}`\n case 'transaction':\n return `${supportedChain.transactionExplorerPrefix}${hash}`\n case 'token':\n return `${supportedChain.tokenExplorerPrefix}${hash}`\n default:\n return\n }\n}\n\nexport function getChainBlockscoutUrl(\n chainId?: string | number,\n hash?: string,\n subtype?: 'block' | 'address' | 'transaction' | 'token'\n): string | undefined {\n if (!chainId || !hash || !subtype) {\n return\n }\n const supportedChain = SupportedChains[chainId as ChainId]\n if (!supportedChain) {\n return\n }\n switch (subtype) {\n case 'block':\n return supportedChain.blockscoutBlockPrefix ? `${supportedChain.blockscoutBlockPrefix}${hash}` : undefined\n case 'address':\n return supportedChain.blockscoutAddressPrefix ? `${supportedChain.blockscoutAddressPrefix}${hash}` : undefined\n case 'transaction':\n return supportedChain.blockscoutTransactionPrefix\n ? `${supportedChain.blockscoutTransactionPrefix}${hash}`\n : undefined\n case 'token':\n return supportedChain.blockscoutTokenPrefix ? `${supportedChain.blockscoutTokenPrefix}${hash}` : undefined\n default:\n return\n }\n}\n","export * from './chain-id'\n"],"mappings":";oXAGA,IAAYA,GAAZ,SAAYA,EAAS,CACnBA,EAAA,OAAA,SACAA,EAAA,IAAA,MACAA,EAAA,MAAA,QACAA,EAAA,IAAA,KACF,GALYA,IAASC,EAAA,UAATD,EAAS,CAAA,EAAA,EAOrB,IAAYE,GAAZ,SAAYA,EAAU,CACpBA,EAAA,SAAA,IACAA,EAAA,OAAA,IACAA,EAAA,SAAA,KACAA,EAAA,OAAA,KACAA,EAAA,QAAA,KACAA,EAAA,QAAA,MACAA,EAAA,cAAA,MACAA,EAAA,eAAA,MACAA,EAAA,eAAA,MACAA,E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,IAAK,UACH,MAAO,GAAGK,EAAe,wBAAwBL,IACnD,IAAK,cACH,MAAO,GAAGK,EAAe,4BAA4BL,IACvD,IAAK,QACH,MAAO,GAAGK,EAAe,sBAAsBL,IACjD,QACE,OAEN,CAxBAnB,EAAA,oBAAAuB,EA0BA,SAAgBE,EACdX,EACAK,EACAC,EAAuD,CAEvD,GAAI,CAACN,GAAW,CAACK,GAAQ,CAACC,EACxB,OAEF,IAAMI,EAAiBxB,EAAA,gBAAgBc,CAAkB,EACzD,GAAKU,EAGL,OAAQJ,EAAS,CACf,IAAK,QACH,OAAOI,EAAe,sBAAwB,GAAGA,EAAe,wBAAwBL,IAAS,OACnG,IAAK,UACH,OAAOK,EAAe,wBAA0B,GAAGA,EAAe,0BAA0BL,IAAS,OACvG,IAAK,cACH,OAAOK,EAAe,4BAClB,GAAGA,EAAe,8BAA8BL,IAChD,OACN,IAAK,QACH,OAAOK,EAAe,sBAAwB,GAAGA,EAAe,wBAAwBL,IAAS,OACnG,QACE,OAEN,CA1BAnB,EAAA,sBAAAyB,yfC1hBAC,EAAA,IAAAC,CAAA","names":["ChainType","exports","EthChainId","AptosChainId","SuiChainId","SolanaChainId","FuelChainId","CosmosChainId","StarknetChainId","key","value","parts","part","index","getChainName","chainId","name","getChainType","id","getChainScanUrl","hash","subtype","chainName","suffix","getChainExternalUrl","supportedChain","getChainBlockscoutUrl","__exportStar","exports"]}