@sentio/sdk-bundle 2.41.1 → 2.41.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 (47) hide show
  1. package/lib/aptos/builtin/0x1.d.ts +47 -0
  2. package/lib/aptos/builtin/0x1.d.ts.map +1 -1
  3. package/lib/aptos/builtin/0x1.js +1 -1
  4. package/lib/aptos/builtin/0x3.js +1 -1
  5. package/lib/aptos/builtin/index.js +1 -1
  6. package/lib/aptos/codegen/index.js +1 -1
  7. package/lib/aptos/codegen/index.js.map +1 -1
  8. package/lib/aptos/ext/index.js +1 -1
  9. package/lib/aptos/index.js +1 -1
  10. package/lib/chunk-4BXAHA3X.js +6 -0
  11. package/lib/chunk-4BXAHA3X.js.map +1 -0
  12. package/lib/{chunk-OBRJRXIU.js → chunk-6GBBRUCQ.js} +2 -2
  13. package/lib/{chunk-BJV226SY.js → chunk-7C7JTEPD.js} +2 -2
  14. package/lib/{chunk-BJV226SY.js.map → chunk-7C7JTEPD.js.map} +1 -1
  15. package/lib/{chunk-QDD4GOGS.js → chunk-E5HXKQGH.js} +2 -2
  16. package/lib/{chunk-RDRQUUED.js → chunk-FIYTXSME.js} +2 -2
  17. package/lib/{chunk-RDRQUUED.js.map → chunk-FIYTXSME.js.map} +1 -1
  18. package/lib/{chunk-OD4OZRJP.js → chunk-FN65HFOF.js} +2 -2
  19. package/lib/{chunk-TOIWKQ7V.js → chunk-FQ65UWWO.js} +2 -2
  20. package/lib/{chunk-TOIWKQ7V.js.map → chunk-FQ65UWWO.js.map} +1 -1
  21. package/lib/{chunk-LHCTFLPI.js → chunk-LJHDU2VC.js} +2 -2
  22. package/lib/{chunk-MFBM2O66.js → chunk-OJBUITSA.js} +2 -2
  23. package/lib/{chunk-F3YPXS5A.js → chunk-RTIGRFG6.js} +1 -1
  24. package/lib/{chunk-F3YPXS5A.js.map → chunk-RTIGRFG6.js.map} +1 -1
  25. package/lib/{chunk-AZ3ASLNE.js → chunk-XRETVDPO.js} +2 -2
  26. package/lib/eth/codegen/index.js +1 -1
  27. package/lib/move/index.js +1 -1
  28. package/lib/sui/builtin/0x1.js +1 -1
  29. package/lib/sui/builtin/0x2.js +1 -1
  30. package/lib/sui/builtin/0x3.js +1 -1
  31. package/lib/sui/builtin/index.js +1 -1
  32. package/lib/sui/codegen/index.js +1 -1
  33. package/lib/sui/codegen/index.js.map +1 -1
  34. package/lib/sui/ext/index.js +1 -1
  35. package/lib/sui/index.js +1 -1
  36. package/lib/testing/index.js +1 -1
  37. package/package.json +2 -2
  38. package/src/aptos/abis/0x1.json +210 -8
  39. package/src/aptos/builtin/0x1.ts +111 -1
  40. package/lib/chunk-UWNTLPFS.js +0 -6
  41. package/lib/chunk-UWNTLPFS.js.map +0 -1
  42. /package/lib/{chunk-OBRJRXIU.js.map → chunk-6GBBRUCQ.js.map} +0 -0
  43. /package/lib/{chunk-QDD4GOGS.js.map → chunk-E5HXKQGH.js.map} +0 -0
  44. /package/lib/{chunk-OD4OZRJP.js.map → chunk-FN65HFOF.js.map} +0 -0
  45. /package/lib/{chunk-LHCTFLPI.js.map → chunk-LJHDU2VC.js.map} +0 -0
  46. /package/lib/{chunk-MFBM2O66.js.map → chunk-OJBUITSA.js.map} +0 -0
  47. /package/lib/{chunk-AZ3ASLNE.js.map → chunk-XRETVDPO.js.map} +0 -0
@@ -182,4 +182,4 @@ in order for it to be formatted.`,cliCategory:"Other"},tabWidth:{type:"int",cate
182
182
 
183
183
  ${this.moduleGen.generateLoadAll(this.moduleGen.SYSTEM_MODULES.has(t))}
184
184
  `;return[{fileName:this.config.fileName+".ts",fileContent:s}]}};var Tl=class{moduleMapping=new Map;typeMapping=new Map;funcMapping=new Map;adapter;constructor(t){this.adapter=t}contains(t,r){return this.moduleMapping.has(_t({address:t,name:r}))}loadInternal(t,r){let u=xr(t.address),n=xr(r);this._loadInternal(t,u),u!==n&&this._loadInternal(t,n)}_loadInternal(t,r){if(!this.contains(r,t.name)){this.moduleMapping.set(_t({address:r,name:t.name}),t);for(let u of t.structs){let n=[r,t.name,u.name].join(Ce);this.typeMapping.set(n,u)}for(let u of t.exposedFunctions){let n=[r,t.name,u.name].join(Ce);this.funcMapping.set(n,u)}}}decodeBigInt(t){if(Array.isArray(t))throw new Error("data is in byte array");return BigInt(t)}requestMap=new Map;async getMoveStruct(t){let[r,u,n]=t.split(Ce),i=xr(r);t=[i,u,n].join(Ce);let s=this.typeMapping.get(t);if(s)return s;let a=this.requestMap.get(i);if(a||(a=this.adapter.fetchModules(i).then(o=>{for(let l of o)this.load(l,i)}),this.requestMap.set(i,a)),await a,s=this.typeMapping.get(t),s)return s;throw new Error("Failed to load function "+t+" type are not imported anywhere")}async getMoveFunction(t){let[r,u,n]=t.split(Ce),i=xr(r);t=[i,u,n].join(Ce);let s=this.funcMapping.get(t);if(s)return s;let a=this.requestMap.get(i);if(a||(a=this.adapter.fetchModules(i).then(o=>{for(let l of o)this.load(l,i)}).catch(o=>{this.requestMap.delete(i)}),this.requestMap.set(i,a)),await a,s=this.funcMapping.get(t),s)return s;throw new Error("Failed to load function "+t+" type are not imported anywhere")}async decode(t,r){if(r.reference)return t;switch(r.qname){case"signer":case"address":case"Address":case"0x1::string::String":case"bool":case"Bool":case"u8":case"U8":case"u16":case"U16":case"u32":case"U32":return t;case"u64":case"U64":case"u128":case"U128":case"u256":case"U256":return this.decodeBigInt(t)}if(r.qname.toLowerCase()===vt){if(r.typeArgs[0].qname==="u8"||r.typeArgs[0].qname==="U8")return t;let s=[];for(let a of t)s.push(await this.decode(a,r.typeArgs[0]));return s}let u=await this.getMoveStruct(r.qname),n=new Map;for(let[s,a]of r.typeArgs.entries())n.set("T"+s,a);let i={};for(let s of u.fields){let a=s.type;a=a.applyTypeArgs(n);let o=this.adapter.getData(t)[s.name],l=await this.decode(o,a);i[s.name]=l}return i}async decodeArray(t,r,u=!0){let n=[];for(let[i,s]of t.entries()){let a=r[i];try{!u&&s===void 0?n.push(s):n.push(await this.decode(s,a))}catch(o){throw Error("Decoding error for "+JSON.stringify(s)+"using type"+a+o.toString())}}return n}encode(t){if(t){if(typeof t=="bigint")return t.toString();if(Array.isArray(t))return this.encodeArray(t);for(let[r,u]of Object.entries(t))u&&typeof u=="bigint"&&(t[r]=u.toString());return t}}encodeArray(t){let r=[];for(let[u,n]of t.entries())r.push(this.encode(n));return r}async decodeCallResult(t,r){let u=await this.getMoveFunction(r);return this.decodeArray(t,u.return)}async filterAndDecodeStruct(t,r){if(!r)return[];let u=[];for(let n of r){let i=this.adapter.getType(n),s=cu(i);if(!Du(t,s))continue;let a=await this.decodedStruct(n);a?u.push(a):console.error("decoding error")}return u}async decodedStruct(t){let r=cu(this.adapter.getType(t)),u=r.typeArgs.map(i=>i.getSignature()),n;try{n=await this.decode(t,r)}catch(i){throw Error("Decoding error for struct"+JSON.stringify(t)+i.toString())}return{...t,data_decoded:n,type_arguments:u}}async decodedType(t,r){if(t===null||t==null)return t;if(typeof t=="object"&&"type"in t){let u=cu(t.type.toString()||"");if(!Du(r,u))return}return await this.decode(t,r)}};var Ol;(function(e){e.PRIVATE="private",e.PUBLIC="public",e.FRIEND="friend"})(Ol||(Ol={}));export{Ce as a,vt as b,hn as c,ou as d,Ml as e,xr as f,lu as g,pn as h,_t as i,Gg as j,Wg as k,Vg as l,Se as m,cu as n,$l as o,Ul as p,rs as q,Du as r,Mr as s,fu as t,us as u,Rl as v,tn as w,Tl as x,Ol as y};
185
- //# sourceMappingURL=chunk-F3YPXS5A.js.map
185
+ //# sourceMappingURL=chunk-RTIGRFG6.js.map