@xoxno/sdk-js 0.1.308 → 0.1.314

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 (56) hide show
  1. package/dist/index.cjs.js +1 -1
  2. package/dist/index.esm.js +1 -1
  3. package/dist/interactor.cjs.js +1 -1
  4. package/dist/interactor.esm.js +1 -1
  5. package/dist/types/trading.d.ts +2 -0
  6. package/package.json +1 -1
  7. package/dist/13.cjs.js +0 -1
  8. package/dist/13.esm.js +0 -1
  9. package/dist/132.cjs.js +0 -1
  10. package/dist/132.esm.js +0 -1
  11. package/dist/145.cjs.js +0 -1
  12. package/dist/145.esm.js +0 -1
  13. package/dist/147.cjs.js +0 -1
  14. package/dist/147.esm.js +0 -1
  15. package/dist/242.cjs.js +0 -1
  16. package/dist/242.esm.js +0 -1
  17. package/dist/385.cjs.js +0 -1
  18. package/dist/385.esm.js +0 -1
  19. package/dist/392.cjs.js +0 -1
  20. package/dist/392.esm.js +0 -1
  21. package/dist/401.cjs.js +0 -2
  22. package/dist/401.cjs.js.LICENSE.txt +0 -10
  23. package/dist/401.esm.js +0 -2
  24. package/dist/401.esm.js.LICENSE.txt +0 -10
  25. package/dist/403.cjs.js +0 -1
  26. package/dist/403.esm.js +0 -1
  27. package/dist/415.cjs.js +0 -1
  28. package/dist/415.esm.js +0 -1
  29. package/dist/425.cjs.js +0 -1
  30. package/dist/425.esm.js +0 -1
  31. package/dist/473.cjs.js +0 -1
  32. package/dist/473.esm.js +0 -1
  33. package/dist/528.cjs.js +0 -1
  34. package/dist/528.esm.js +0 -1
  35. package/dist/54.cjs.js +0 -1
  36. package/dist/54.esm.js +0 -1
  37. package/dist/586.cjs.js +0 -1
  38. package/dist/586.esm.js +0 -1
  39. package/dist/626.cjs.js +0 -1
  40. package/dist/626.esm.js +0 -1
  41. package/dist/661.cjs.js +0 -1
  42. package/dist/661.esm.js +0 -1
  43. package/dist/766.cjs.js +0 -1
  44. package/dist/766.esm.js +0 -1
  45. package/dist/820.cjs.js +0 -2
  46. package/dist/820.cjs.js.LICENSE.txt +0 -3
  47. package/dist/820.esm.js +0 -2
  48. package/dist/820.esm.js.LICENSE.txt +0 -3
  49. package/dist/854.cjs.js +0 -1
  50. package/dist/854.esm.js +0 -1
  51. package/dist/966.cjs.js +0 -1
  52. package/dist/966.esm.js +0 -1
  53. package/dist/979.cjs.js +0 -1
  54. package/dist/979.esm.js +0 -1
  55. package/dist/989.cjs.js +0 -1
  56. package/dist/989.esm.js +0 -1
@@ -1,3 +0,0 @@
1
- /*! noble-ed25519 - MIT License (c) 2019 Paul Miller (paulmillr.com) */
2
-
3
- /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
package/dist/854.cjs.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_xoxno_sdk_js=self.webpackChunk_xoxno_sdk_js||[]).push([[854],{4473:function(e,s,a){var t=this&&this.__createBinding||(Object.create?function(e,s,a,t){void 0===t&&(t=a),Object.defineProperty(e,t,{enumerable:!0,get:function(){return s[a]}})}:function(e,s,a,t){void 0===t&&(t=a),e[t]=s[a]}),r=this&&this.__setModuleDefault||(Object.create?function(e,s){Object.defineProperty(e,"default",{enumerable:!0,value:s})}:function(e,s){e.default=s}),u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var s={};if(null!=e)for(var a in e)"default"!==a&&Object.prototype.hasOwnProperty.call(e,a)&&t(s,e,a);return r(s,e),s},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s,"__esModule",{value:!0}),s.BigIntValue=s.BigUIntValue=s.I64Value=s.U64Value=s.I32Value=s.U32Value=s.I16Value=s.U16Value=s.I8Value=s.U8Value=s.NumericalValue=s.BigIntType=s.BigUIntType=s.I64Type=s.U64Type=s.I32Type=s.U32Type=s.I16Type=s.U16Type=s.I8Type=s.U8Type=s.NumericalType=void 0;const n=l(a(1594)),i=u(a(2581)),c=a(5626);class m extends c.PrimitiveType{constructor(e,s,a){super(e),this.sizeInBytes=s,this.withSign=a}getClassName(){return m.ClassName}hasFixedSize(){return!!this.sizeInBytes}hasArbitrarySize(){return!this.hasFixedSize()}}s.NumericalType=m,m.ClassName="NumericalType";class o extends m{constructor(){super("u8",1,!1)}getClassName(){return o.ClassName}}s.U8Type=o,o.ClassName="U8Type";class N extends m{constructor(){super("i8",1,!0)}getClassName(){return N.ClassName}}s.I8Type=N,N.ClassName="I8Type";class p extends m{constructor(){super("u16",2,!1)}getClassName(){return p.ClassName}}s.U16Type=p,p.ClassName="U16Type";class C extends m{constructor(){super("i16",2,!0)}getClassName(){return C.ClassName}}s.I16Type=C,C.ClassName="I16Type";class g extends m{constructor(){super("u32",4,!1)}getClassName(){return g.ClassName}}s.U32Type=g,g.ClassName="U32Type";class y extends m{constructor(){super("i32",4,!0)}getClassName(){return y.ClassName}}s.I32Type=y,y.ClassName="I32Type";class d extends m{constructor(){super("u64",8,!1)}getClassName(){return d.ClassName}}s.U64Type=d,d.ClassName="U64Type";class I extends m{constructor(){super("i64",8,!0)}getClassName(){return I.ClassName}}s.I64Type=I,I.ClassName="I64Type";class T extends m{constructor(){super("BigUint",0,!1)}getClassName(){return T.ClassName}}s.BigUIntType=T,T.ClassName="BigUIntType";class h extends m{constructor(){super("Bigint",0,!0)}getClassName(){return h.ClassName}}s.BigIntType=h,h.ClassName="BigIntType";class V extends c.PrimitiveValue{constructor(e,s){if(super(e),"bigint"==typeof s&&(s=s.toString()),this.value=new n.default(s),this.sizeInBytes=e.sizeInBytes,this.withSign=e.withSign,this.value.isNaN())throw new i.ErrInvalidArgument(`not a number: ${s}`);if(!this.withSign&&this.value.isNegative())throw new i.ErrInvalidArgument(`negative, but type is unsigned: ${s}`)}getClassName(){return V.ClassName}equals(e){return this.value.isEqualTo(e.value)}valueOf(){return this.value}toString(){return this.value.toString()}}s.NumericalValue=V,V.ClassName="NumericalValue";class U extends V{constructor(e){super(new o,e)}getClassName(){return U.ClassName}}s.U8Value=U,U.ClassName="U8Value";class x extends V{constructor(e){super(new N,e)}getClassName(){return x.ClassName}}s.I8Value=x,x.ClassName="I8Value";class f extends V{constructor(e){super(new p,e)}getClassName(){return f.ClassName}}s.U16Value=f,f.ClassName="U16Value";class v extends V{constructor(e){super(new C,e)}getClassName(){return v.ClassName}}s.I16Value=v,v.ClassName="I16Value";class w extends V{constructor(e){super(new g,e)}getClassName(){return w.ClassName}}s.U32Value=w,w.ClassName="U32Value";class _ extends V{constructor(e){super(new y,e)}getClassName(){return _.ClassName}}s.I32Value=_,_.ClassName="I32Value";class B extends V{constructor(e){super(new d,e)}getClassName(){return B.ClassName}}s.U64Value=B,B.ClassName="U64Value";class b extends V{constructor(e){super(new I,e)}getClassName(){return b.ClassName}}s.I64Value=b,b.ClassName="I64Value";class S extends V{constructor(e){super(new T,e)}getClassName(){return S.ClassName}}s.BigUIntValue=S,S.ClassName="BigUIntValue";class j extends V{constructor(e){super(new h,e)}getClassName(){return j.ClassName}}s.BigIntValue=j,j.ClassName="BigIntValue"}}]);
package/dist/854.esm.js DELETED
@@ -1 +0,0 @@
1
- export const __webpack_id__=854;export const __webpack_ids__=[854];export const __webpack_modules__={4473:function(e,s,a){var t=this&&this.__createBinding||(Object.create?function(e,s,a,t){void 0===t&&(t=a),Object.defineProperty(e,t,{enumerable:!0,get:function(){return s[a]}})}:function(e,s,a,t){void 0===t&&(t=a),e[t]=s[a]}),r=this&&this.__setModuleDefault||(Object.create?function(e,s){Object.defineProperty(e,"default",{enumerable:!0,value:s})}:function(e,s){e.default=s}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var s={};if(null!=e)for(var a in e)"default"!==a&&Object.prototype.hasOwnProperty.call(e,a)&&t(s,e,a);return r(s,e),s},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s,"__esModule",{value:!0}),s.BigIntValue=s.BigUIntValue=s.I64Value=s.U64Value=s.I32Value=s.U32Value=s.I16Value=s.U16Value=s.I8Value=s.U8Value=s.NumericalValue=s.BigIntType=s.BigUIntType=s.I64Type=s.U64Type=s.I32Type=s.U32Type=s.I16Type=s.U16Type=s.I8Type=s.U8Type=s.NumericalType=void 0;const n=u(a(1594)),i=l(a(2581)),c=a(5626);class o extends c.PrimitiveType{constructor(e,s,a){super(e),this.sizeInBytes=s,this.withSign=a}getClassName(){return o.ClassName}hasFixedSize(){return!!this.sizeInBytes}hasArbitrarySize(){return!this.hasFixedSize()}}s.NumericalType=o,o.ClassName="NumericalType";class m extends o{constructor(){super("u8",1,!1)}getClassName(){return m.ClassName}}s.U8Type=m,m.ClassName="U8Type";class N extends o{constructor(){super("i8",1,!0)}getClassName(){return N.ClassName}}s.I8Type=N,N.ClassName="I8Type";class p extends o{constructor(){super("u16",2,!1)}getClassName(){return p.ClassName}}s.U16Type=p,p.ClassName="U16Type";class C extends o{constructor(){super("i16",2,!0)}getClassName(){return C.ClassName}}s.I16Type=C,C.ClassName="I16Type";class g extends o{constructor(){super("u32",4,!1)}getClassName(){return g.ClassName}}s.U32Type=g,g.ClassName="U32Type";class d extends o{constructor(){super("i32",4,!0)}getClassName(){return d.ClassName}}s.I32Type=d,d.ClassName="I32Type";class y extends o{constructor(){super("u64",8,!1)}getClassName(){return y.ClassName}}s.U64Type=y,y.ClassName="U64Type";class I extends o{constructor(){super("i64",8,!0)}getClassName(){return I.ClassName}}s.I64Type=I,I.ClassName="I64Type";class T extends o{constructor(){super("BigUint",0,!1)}getClassName(){return T.ClassName}}s.BigUIntType=T,T.ClassName="BigUIntType";class V extends o{constructor(){super("Bigint",0,!0)}getClassName(){return V.ClassName}}s.BigIntType=V,V.ClassName="BigIntType";class h extends c.PrimitiveValue{constructor(e,s){if(super(e),"bigint"==typeof s&&(s=s.toString()),this.value=new n.default(s),this.sizeInBytes=e.sizeInBytes,this.withSign=e.withSign,this.value.isNaN())throw new i.ErrInvalidArgument(`not a number: ${s}`);if(!this.withSign&&this.value.isNegative())throw new i.ErrInvalidArgument(`negative, but type is unsigned: ${s}`)}getClassName(){return h.ClassName}equals(e){return this.value.isEqualTo(e.value)}valueOf(){return this.value}toString(){return this.value.toString()}}s.NumericalValue=h,h.ClassName="NumericalValue";class U extends h{constructor(e){super(new m,e)}getClassName(){return U.ClassName}}s.U8Value=U,U.ClassName="U8Value";class _ extends h{constructor(e){super(new N,e)}getClassName(){return _.ClassName}}s.I8Value=_,_.ClassName="I8Value";class x extends h{constructor(e){super(new p,e)}getClassName(){return x.ClassName}}s.U16Value=x,x.ClassName="U16Value";class f extends h{constructor(e){super(new C,e)}getClassName(){return f.ClassName}}s.I16Value=f,f.ClassName="I16Value";class w extends h{constructor(e){super(new g,e)}getClassName(){return w.ClassName}}s.U32Value=w,w.ClassName="U32Value";class v extends h{constructor(e){super(new d,e)}getClassName(){return v.ClassName}}s.I32Value=v,v.ClassName="I32Value";class B extends h{constructor(e){super(new y,e)}getClassName(){return B.ClassName}}s.U64Value=B,B.ClassName="U64Value";class b extends h{constructor(e){super(new I,e)}getClassName(){return b.ClassName}}s.I64Value=b,b.ClassName="I64Value";class S extends h{constructor(e){super(new T,e)}getClassName(){return S.ClassName}}s.BigUIntValue=S,S.ClassName="BigUIntValue";class O extends h{constructor(e){super(new V,e)}getClassName(){return O.ClassName}}s.BigIntValue=O,O.ClassName="BigIntValue"}};
package/dist/966.cjs.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_xoxno_sdk_js=self.webpackChunk_xoxno_sdk_js||[]).push([[54,145,242,392,586,854,966,979],{8095:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeFormula=void 0,t.TypeFormula=class{constructor(e,t,s){this.name=e,this.typeParameters=t,this.metadata=s}toString(){const e=this.typeParameters.length>0?`<${this.typeParameters.map((e=>e.toString())).join(", ")}>`:"",t=`${this.name}${e}`;return void 0!==this.metadata?`${t}*${this.metadata}*`:t}}},9132:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeFormulaParser=void 0;const a=s(8095);class n{parseExpression(e){e=e.trim();const t=this.tokenizeExpression(e).filter((e=>e!==n.COMMA)),s=[];for(const e of t)if(this.isPunctuation(e))if(this.isEndOfTypeParameters(e)){const e=this.acquireTypeWithParameters(s);s.push(e)}else{if(!this.isBeginningOfTypeParameters(e))throw new Error(`Unexpected token (punctuation): ${e}`);s.push(e)}else s.push(e);if(1!==s.length)throw new Error(`Unexpected stack length at end of parsing: ${s.length}`);if(n.PUNCTUATION.includes(s[0]))throw new Error("Unexpected root element.");const i=s[0];if(i instanceof a.TypeFormula)return i;if("string"==typeof i)return new a.TypeFormula(i,[]);throw new Error(`Unexpected item on stack: ${i}`)}tokenizeExpression(e){const t=[];let s="";for(const a of e)this.isPunctuation(a)?(s&&(t.push(s.trim()),s=""),t.push(a)):s+=a;return s&&t.push(s.trim()),t}acquireTypeWithParameters(e){const t=this.acquireTypeParameters(e),s=e.pop();if("ManagedDecimal"===s||"ManagedDecimalSigned"===s){const e=t[0].name;return new a.TypeFormula(s,[],e)}return new a.TypeFormula(s,t.reverse())}acquireTypeParameters(e){const t=[];for(;;){const s=e.pop();if(void 0===s)throw new Error("Badly specified type parameters");if(this.isBeginningOfTypeParameters(s))break;if(s instanceof a.TypeFormula)t.push(s);else{if("string"!=typeof s)throw new Error(`Unexpected type parameter object in stack: ${s}`);t.push(new a.TypeFormula(s,[]))}}return t}isPunctuation(e){return n.PUNCTUATION.includes(e)}isEndOfTypeParameters(e){return e===n.END_TYPE_PARAMETERS}isBeginningOfTypeParameters(e){return e===n.BEGIN_TYPE_PARAMETERS}}t.TypeFormulaParser=n,n.BEGIN_TYPE_PARAMETERS="<",n.END_TYPE_PARAMETERS=">",n.COMMA=",",n.PUNCTUATION=[n.COMMA,n.BEGIN_TYPE_PARAMETERS,n.END_TYPE_PARAMETERS]},4966:function(e,t,s){var a=this&&this.__createBinding||(Object.create?function(e,t,s,a){void 0===a&&(a=s),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,a){void 0===a&&(a=s),e[a]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&a(t,e,s);return n(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AbiRegistry=void 0;const r=i(s(2581)),u=s(1069),l=s(5730),o=s(1414),p=s(4143),c=s(9229),m=s(7586),d=s(7654);class y{constructor(e){this.endpoints=[],this.customTypes=[],this.events=[],this.name=e.name,this.constructorDefinition=e.constructorDefinition,this.upgradeConstructorDefinition=e.upgradeConstructorDefinition,this.endpoints=e.endpoints,this.customTypes=e.customTypes,this.events=e.events||[]}static create(e){const t=e.name||"?",s=e.constructor||{},a=e.upgradeConstructor||{},n=e.endpoints||[],i=e.types||{},u=e.events||[],d=l.EndpointDefinition.fromJSON({name:"constructor",...s}),h=l.EndpointDefinition.fromJSON({name:"upgradeConstructor",...a}),f=n.map((e=>l.EndpointDefinition.fromJSON(e))),g=[];for(const e in i){const t=i[e];if("struct"==t.type)g.push(m.StructType.fromJSON({name:e,fields:t.fields}));else if("enum"==t.type)g.push(o.EnumType.fromJSON({name:e,variants:t.variants}));else{if("explicit-enum"!=t.type)throw new r.ErrTypingSystem(`Cannot handle custom type: ${e}`);g.push(c.ExplicitEnumType.fromJSON({name:e,variants:t.variants}))}}const T=u.map((e=>p.EventDefinition.fromJSON(e)));return new y({name:t,constructorDefinition:d,upgradeConstructorDefinition:h,endpoints:f,customTypes:g,events:T}).remapToKnownTypes()}getCustomType(e){const t=this.customTypes.find((t=>t.getName()==e));return u.guardValueIsSetWithMessage(`custom type [${e}] not found`,t),t}getStruct(e){const t=this.customTypes.find((t=>t.getName()==e&&t.hasExactClass(m.StructType.ClassName)));return u.guardValueIsSetWithMessage(`struct [${e}] not found`,t),t}getStructs(e){return e.map((e=>this.getStruct(e)))}getEnum(e){const t=this.customTypes.find((t=>t.getName()==e&&t.hasExactClass(o.EnumType.ClassName)));return u.guardValueIsSetWithMessage(`enum [${e}] not found`,t),t}getExplicitEnum(e){const t=this.customTypes.find((t=>t.getName()==e&&t.hasExactClass(c.ExplicitEnumType.ClassName)));return u.guardValueIsSetWithMessage(`enum [${e}] not found`,t),t}getEnums(e){return e.map((e=>this.getEnum(e)))}getEndpoints(){return this.endpoints}getEndpoint(e){const t=this.endpoints.find((t=>t.name==e));return u.guardValueIsSetWithMessage(`endpoint [${e}] not found`,t),t}getEvent(e){const t=this.events.find((t=>t.identifier==e));return u.guardValueIsSetWithMessage(`event [${e}] not found`,t),t}remapToKnownTypes(){const e=new d.TypeMapper([]),t=[];for(const s of this.customTypes)this.mapCustomTypeDepthFirst(s,this.customTypes,e,t);if(this.customTypes.length!=t.length)throw new r.ErrTypingSystem("Did not re-map all custom types");const s=h(this.constructorDefinition,e),a=this.upgradeConstructorDefinition?h(this.upgradeConstructorDefinition,e):void 0,n=[];for(const t of this.endpoints)n.push(h(t,e));const i=this.events.map((t=>function(e,t){const s=e.inputs.map((e=>new p.EventTopicDefinition({name:e.name,type:t.mapType(e.type),indexed:e.indexed})));return new p.EventDefinition(e.identifier,s)}(t,e)));return new y({name:this.name,constructorDefinition:s,upgradeConstructorDefinition:a,endpoints:n,customTypes:t,events:i})}mapCustomTypeDepthFirst(e,t,s,a){if(a.findIndex((t=>t.getName()==e.getName()))>=0)return;for(const n of e.getNamesOfDependencies()){const e=t.find((e=>e.getName()==n));e&&this.mapCustomTypeDepthFirst(e,t,s,a)}const n=s.mapType(e);a.push(n)}}function h(e,t){const s=e.input.map((e=>new l.EndpointParameterDefinition(e.name,e.description,t.mapType(e.type)))),a=e.output.map((e=>new l.EndpointParameterDefinition(e.name,e.description,t.mapType(e.type))));return new l.EndpointDefinition(e.name,s,a,e.modifiers,e.title)}t.AbiRegistry=y},8551:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AddressValue=t.AddressType=void 0;const a=s(236),n=s(5626);class i extends n.PrimitiveType{constructor(){super("Address")}getClassName(){return i.ClassName}}t.AddressType=i,i.ClassName="AddressType";class r extends n.PrimitiveValue{constructor(e){super(new i),this.value=a.Address.newFromBech32(e.bech32())}getClassName(){return r.ClassName}equals(e){return this.value.equals(e.value)}valueOf(){return this.value}}t.AddressValue=r,r.ClassName="AddressValue"},1055:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalValue=t.OptionalType=void 0;const a=s(1069),n=s(5626);class i extends n.Type{constructor(e){super("Optional",[e],n.TypeCardinality.variable(1))}getClassName(){return i.ClassName}isAssignableFrom(e){if(!e.hasExactClass(i.ClassName))return!1;let t=this.getFirstTypeParameter().equals(e.getFirstTypeParameter()),s=e.getFirstTypeParameter().hasExactClass(n.NullType.ClassName);return t||s}}t.OptionalType=i,i.ClassName="OptionalType";class r extends n.TypedValue{constructor(e,t=null){super(e),this.value=t}getClassName(){return r.ClassName}static newMissing(){let e=new i(new n.NullType);return new r(e)}isSet(){return!!this.value}getTypedValue(){return a.guardValueIsSet("value",this.value),this.value}valueOf(){return this.value?this.value.valueOf():null}equals(e){return this.value?.equals(e.value)||!1}}t.OptionalValue=r,r.ClassName="OptionalValue"},3979:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanValue=t.BooleanType=void 0;const a=s(5626);class n extends a.PrimitiveType{constructor(){super("bool")}getClassName(){return n.ClassName}}t.BooleanType=n,n.ClassName="BooleanType";class i extends a.PrimitiveValue{constructor(e){super(new n),this.value=e}getClassName(){return i.ClassName}equals(e){return this.value===e.value}isTrue(){return!0===this.value}isFalse(){return!this.isTrue()}valueOf(){return this.value}}t.BooleanValue=i,i.ClassName="BooleanValue"},1392:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BytesValue=t.BytesType=void 0;const a=s(5626);class n extends a.PrimitiveType{constructor(){super("bytes")}getClassName(){return n.ClassName}}t.BytesType=n,n.ClassName="BytesType";class i extends a.PrimitiveValue{constructor(e){super(new n),this.value=e}getClassName(){return i.ClassName}static fromUTF8(e){let t=Buffer.from(e,"utf-8");return new i(t)}static fromHex(e){let t=Buffer.from(e,"hex");return new i(t)}getLength(){return this.value.length}equals(e){return this.getLength()==e.getLength()&&this.value.equals(e.value)}valueOf(){return this.value}toString(){return this.value.toString()}}t.BytesValue=i,i.ClassName="BytesValue"},1847:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CodeMetadataValue=t.CodeMetadataType=void 0;const a=s(5626);class n extends a.PrimitiveType{constructor(){super("CodeMetadata")}}t.CodeMetadataType=n;class i extends a.PrimitiveValue{constructor(e){super(new n),this.value=e}equals(e){return this.value.equals(e.value)}valueOf(){return this.value}}t.CodeMetadataValue=i},902:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionOfTypedValues=void 0,t.CollectionOfTypedValues=class{constructor(e){this.items=e}getLength(){return this.items.length}getItems(){return this.items}valueOf(){return this.items.map((e=>e.valueOf()))}equals(e){if(this.getLength()!=e.getLength())return!1;for(let t=0;t<this.getLength();t++){let s=this.items[t],a=e.items[t];if(!s.equals(a))return!1}return!0}}},7472:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeValue=t.CompositeType=void 0;const a=s(1069),n=s(5626);class i extends n.Type{constructor(...e){super("Composite",e,n.TypeCardinality.variable(e.length))}getClassName(){return i.ClassName}}t.CompositeType=i,i.ClassName="CompositeType";class r extends n.TypedValue{constructor(e,t){super(e),a.guardLength(t,e.getTypeParameters().length),this.items=t}getClassName(){return r.ClassName}static fromItems(...e){let t=e.map((e=>e.getType())),s=new i(...t);return new r(s,e)}getItems(){return this.items}valueOf(){return this.items.map((e=>e?.valueOf()))}equals(e){if(this.getType().differs(e.getType()))return!1;for(let t=0;t<this.items.length;t++){let s=this.items[t],a=e.items[t];if(!s.equals(a))return!1}return!0}}t.CompositeValue=r,r.ClassName="CompositeValue"},5730:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EndpointParameterDefinition=t.EndpointModifiers=t.EndpointDefinition=void 0;const a=s(7966);class n{constructor(e,t,s,a,n){this.input=[],this.output=[],this.name=e,this.title=n||"",this.input=t||[],this.output=s||[],this.modifiers=a}isConstructor(){return"constructor"==this.name}static fromJSON(e){e.name=null==e.name?"?":e.name,e.onlyOwner=e.onlyOwner||!1,e.title=e.title||"",e.payableInTokens=e.payableInTokens||[],e.inputs=e.inputs||[],e.outputs=e.outputs||[];let t=e.inputs.map((e=>r.fromJSON(e))),s=e.outputs.map((e=>r.fromJSON(e))),a=new i(e.mutability,e.payableInTokens,e.onlyOwner);return new n(e.name,t,s,a,e.title)}}t.EndpointDefinition=n;class i{constructor(e,t,s){this.mutability=e||"",this.payableInTokens=t||[],this.onlyOwner=s||!1}isPayableInEGLD(){return this.isPayableInToken("EGLD")}isPayableInToken(e){return!!this.payableInTokens.includes(e)||!this.payableInTokens.includes(`!${e}`)&&!!this.payableInTokens.includes("*")}isPayable(){return 0!=this.payableInTokens.length}isReadonly(){return"readonly"==this.mutability}isOnlyOwner(){return this.onlyOwner}}t.EndpointModifiers=i;class r{constructor(e,t,s){this.name=e,this.description=t,this.type=s}static fromJSON(e){let t=(new a.TypeExpressionParser).parse(e.type);return new r(e.name||"?",e.description||"N / A",t)}}t.EndpointParameterDefinition=r},1414:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EnumValue=t.EnumVariantDefinition=t.EnumType=void 0;const a=s(2581),n=s(1069),i=s(5766),r=s(5626);class u extends r.CustomType{constructor(e,t){super(e),this.variants=[],this.variants=t}getClassName(){return u.ClassName}static fromJSON(e){const t=u.assignMissingDiscriminants(e.variants||[]).map((e=>l.fromJSON(e)));return new u(e.name,t)}static assignMissingDiscriminants(e){return e.every((e=>null==e.discriminant))?e.map(((e,t)=>({...e,discriminant:t}))):e}getVariantByDiscriminant(e){let t=this.variants.find((t=>t.discriminant==e));return n.guardValueIsSet(`variant by discriminant (${e})`,t),t}getVariantByName(e){let t=this.variants.find((t=>t.name==e));return n.guardValueIsSet(`variant by name (${e})`,t),t}getNamesOfDependencies(){const e=[];for(const t of this.variants)e.push(...t.getNamesOfDependencies());return[...new Set(e)]}}t.EnumType=u,u.ClassName="EnumType";class l{constructor(e,t,s=[]){this.fieldsDefinitions=[],n.guardTrue(t<256,"discriminant for simple enum should be less than 256"),this.name=e,this.discriminant=t,this.fieldsDefinitions=s}static fromJSON(e){let t=(e.fields||[]).map((e=>i.FieldDefinition.fromJSON(e)));return new l(e.name,e.discriminant,t)}getFieldsDefinitions(){return this.fieldsDefinitions}getFieldDefinition(e){return this.fieldsDefinitions.find((t=>t.name==e))}getNamesOfDependencies(){return i.Fields.getNamesOfTypeDependencies(this.fieldsDefinitions)}}t.EnumVariantDefinition=l;class o extends r.TypedValue{constructor(e,t,s){super(e),this.fields=[],this.name=t.name,this.discriminant=t.discriminant,this.fields=s,this.fieldsByName=new Map(s.map((e=>[e.name,e])));let a=t.getFieldsDefinitions();i.Fields.checkTyping(this.fields,a)}getClassName(){return o.ClassName}static fromName(e,t){let s=e.getVariantByName(t);return new o(e,s,[])}static fromDiscriminant(e,t){let s=e.getVariantByDiscriminant(t);return new o(e,s,[])}equals(e){if(!this.getType().equals(e.getType()))return!1;let t=this.getFields(),s=e.getFields();const a=this.name==e.name,n=this.discriminant==e.discriminant,r=i.Fields.equals(t,s);return a&&n&&r}getFields(){return this.fields}getFieldValue(e){let t=this.fieldsByName.get(e);if(t)return t.value.valueOf();throw new a.ErrMissingFieldOnEnum(e,this.getType().getName())}valueOf(){let e={name:this.name,fields:[]};return this.fields.forEach(((t,s)=>e.fields[s]=t.value.valueOf())),e}}t.EnumValue=o,o.ClassName="EnumValue"},4143:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EventTopicDefinition=t.EventDefinition=void 0;const a=s(7966);class n{constructor(e,t){this.inputs=[],this.identifier=e,this.inputs=t||[]}static fromJSON(e){e.identifier=null==e.identifier?"?":e.identifier,e.inputs=e.inputs||[];const t=e.inputs.map((e=>i.fromJSON(e)));return new n(e.identifier,t)}}t.EventDefinition=n;class i{constructor(e){this.name=e.name,this.type=e.type,this.indexed=e.indexed}static fromJSON(e){const t=(new a.TypeExpressionParser).parse(e.type);return new i({name:e.name||"?",type:t,indexed:e.indexed})}}t.EventTopicDefinition=i},9229:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExplicitEnumValue=t.ExplicitEnumVariantDefinition=t.ExplicitEnumType=void 0;const a=s(1069),n=s(5626);class i extends n.CustomType{constructor(e,t){super(e),this.variants=[],this.variants=t}getClassName(){return i.ClassName}static fromJSON(e){const t=e.variants.map((e=>r.fromJSON(e)));return new i(e.name,t)}getVariantByName(e){let t=this.variants.find((t=>t.name==e));return a.guardValueIsSet(`variant by name (${e})`,t),t}}t.ExplicitEnumType=i,i.ClassName="ExplicitEnumType";class r{constructor(e){this.name=e}static fromJSON(e){return new r(e.name)}}t.ExplicitEnumVariantDefinition=r;class u extends n.TypedValue{constructor(e,t){super(e),this.name=t.name}getClassName(){return u.ClassName}static fromName(e,t){let s=e.getVariantByName(t);return new u(e,s)}equals(e){return!!this.getType().equals(e.getType())&&this.name==e.name}valueOf(){return{name:this.name}}}t.ExplicitEnumValue=u,u.ClassName="ExplicitEnumValue"},5766:function(e,t,s){var a=this&&this.__createBinding||(Object.create?function(e,t,s,a){void 0===a&&(a=s),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,a){void 0===a&&(a=s),e[a]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&a(t,e,s);return n(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Fields=t.Field=t.FieldDefinition=void 0;const r=i(s(2581)),u=s(7966);class l{constructor(e,t,s){this.name=e,this.description=t,this.type=s}static fromJSON(e){let t=(new u.TypeExpressionParser).parse(e.type);return new l(e.name,e.description,t)}}t.FieldDefinition=l,t.Field=class{constructor(e,t=""){this.value=e,this.name=t}checkTyping(e){const t=this.value.getType();if(!t.equals(e.type))throw new r.ErrTypingSystem(`check type of field "${e.name}; expected: ${e.type}, actual: ${t}"`);if(this.name!=e.name)throw new r.ErrTypingSystem(`check name of field "${e.name}"`)}equals(e){return this.name==e.name&&this.value.equals(e.value)}},t.Fields=class{static checkTyping(e,t){if(e.length!=t.length)throw new r.ErrTypingSystem("fields length vs. field definitions length");for(let s=0;s<e.length;s++){let a=e[s],n=t[s];a.checkTyping(n)}}static equals(e,t){if(e.length!=t.length)return!1;for(let s=0;s<e.length;s++){let a=e[s],n=t[s];if(!a.equals(n))return!1}return!0}static getNamesOfTypeDependencies(e){const t=[];for(const s of e)t.push(s.type.getName()),t.push(...s.type.getNamesOfDependencies());return[...new Set(t)]}}},926:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.List=t.OptionValue=t.ListType=t.OptionType=void 0;const a=s(1069),n=s(902),i=s(5626);class r extends i.Type{constructor(e){super("Option",[e])}getClassName(){return r.ClassName}isAssignableFrom(e){if(!e.hasExactClass(r.ClassName))return!1;let t=this.getFirstTypeParameter().equals(e.getFirstTypeParameter()),s=e.getFirstTypeParameter().hasExactClass(i.NullType.ClassName);return t||s}}t.OptionType=r,r.ClassName="OptionType";class u extends i.Type{constructor(e){super("List",[e])}getClassName(){return u.ClassName}}t.ListType=u,u.ClassName="ListType";class l extends i.TypedValue{constructor(e,t=null){super(e),this.value=t}getClassName(){return l.ClassName}static newMissing(){let e=new r(new i.NullType);return new l(e)}static newMissingTyped(e){return new l(new r(e))}static newProvided(e){let t=new r(e.getType());return new l(t,e)}isSet(){return!!this.value}getTypedValue(){return a.guardValueIsSet("value",this.value),this.value}valueOf(){return this.value?this.value.valueOf():null}equals(e){return this.value?.equals(e.value)||!1}}t.OptionValue=l,l.ClassName="OptionValue";class o extends i.TypedValue{constructor(e,t){super(e),this.backingCollection=new n.CollectionOfTypedValues(t)}getClassName(){return o.ClassName}static fromItems(e){if(0==e.length)return new o(new i.TypePlaceholder,[]);let t=e[0].getType(),s=new u(t);return new o(s,e)}getLength(){return this.backingCollection.getLength()}getItems(){return this.backingCollection.getItems()}valueOf(){return this.backingCollection.valueOf()}equals(e){return this.backingCollection.equals(e.backingCollection)}}t.List=o,o.ClassName="List"},177:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayVec=t.ArrayVecType=void 0;const a=s(1069),n=s(902),i=s(5626);class r extends i.Type{constructor(e,t){super("Array",[t]),a.guardTrue(e>0,"array length > 0"),this.length=e}getClassName(){return r.ClassName}}t.ArrayVecType=r,r.ClassName="ArrayVecType";class u extends i.TypedValue{constructor(e,t){super(e),a.guardLength(t,e.length),this.backingCollection=new n.CollectionOfTypedValues(t)}getClassName(){return u.ClassName}getLength(){return this.backingCollection.getLength()}getItems(){return this.backingCollection.getItems()}valueOf(){return this.backingCollection.valueOf()}equals(e){return this.backingCollection.equals(e.backingCollection)}}t.ArrayVec=u,u.ClassName="ArrayVec"},1038:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.H256Value=t.H256Type=void 0;const a=s(5626);class n extends a.PrimitiveType{constructor(){super("H256")}getClassName(){return n.ClassName}}t.H256Type=n,n.ClassName="H256Type";class i extends a.PrimitiveValue{constructor(e){super(new n),this.value=e}getClassName(){return i.ClassName}equals(e){return this.value.equals(e.value)}valueOf(){return this.value}}t.H256Value=i,i.ClassName="H256Value"},4647:function(e,t,s){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ManagedDecimalValue=t.ManagedDecimalType=void 0;const n=a(s(1594)),i=s(5626);class r extends i.Type{constructor(e){super("ManagedDecimal",void 0,void 0,e)}getClassName(){return r.ClassName}getMetadata(){return this.metadata}isVariable(){return"usize"==this.metadata}}t.ManagedDecimalType=r,r.ClassName="ManagedDecimalType";class u extends i.TypedValue{constructor(e,t,s=!1){super(new r(s?"usize":t)),this.value=new n.default(e),this.scale=t,this.variable=s}getClassName(){return u.ClassName}getScale(){return this.scale}getPrecision(){return this.value.toFixed(this.scale).replace(".","").length}equals(e){return this.getPrecision()==e.getPrecision()&&new n.default(this.value).eq(e.value)}valueOf(){return this.value}toString(){return this.value.toFixed(this.scale)}isVariable(){return this.variable}}t.ManagedDecimalValue=u,u.ClassName="ManagedDecimalValue"},8303:function(e,t,s){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ManagedDecimalSignedValue=t.ManagedDecimalSignedType=void 0;const n=a(s(1594)),i=s(5626);class r extends i.Type{constructor(e){super("ManagedDecimalSigned",void 0,void 0,e)}getClassName(){return r.ClassName}getMetadata(){return this.metadata}isVariable(){return"usize"==this.metadata}}t.ManagedDecimalSignedType=r,r.ClassName="ManagedDecimalSignedType";class u extends i.TypedValue{constructor(e,t,s=!1){super(new r(s?"usize":t)),this.value=new n.default(e),this.scale=t,this.variable=s}getClassName(){return u.ClassName}getPrecision(){return this.value.toFixed(this.scale).replace(".","").length}getScale(){return this.scale}equals(e){return this.getPrecision()==e.getPrecision()&&new n.default(this.value).eq(e.value)}valueOf(){return this.value}toString(){return this.value.toFixed(this.scale)}isVariable(){return this.variable}}t.ManagedDecimalSignedValue=u,u.ClassName="ManagedDecimalSignedValue"},1782:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NothingValue=t.NothingType=void 0;const a=s(5626);class n extends a.PrimitiveType{constructor(){super("nothing")}getClassName(){return n.ClassName}}t.NothingType=n,n.ClassName="NothingType";class i extends a.PrimitiveValue{constructor(){super(new n)}getClassName(){return i.ClassName}equals(e){return!1}valueOf(){return{}}}t.NothingValue=i,i.ClassName="NothingValue"},4473:function(e,t,s){var a=this&&this.__createBinding||(Object.create?function(e,t,s,a){void 0===a&&(a=s),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,a){void 0===a&&(a=s),e[a]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&a(t,e,s);return n(t,e),t},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BigIntValue=t.BigUIntValue=t.I64Value=t.U64Value=t.I32Value=t.U32Value=t.I16Value=t.U16Value=t.I8Value=t.U8Value=t.NumericalValue=t.BigIntType=t.BigUIntType=t.I64Type=t.U64Type=t.I32Type=t.U32Type=t.I16Type=t.U16Type=t.I8Type=t.U8Type=t.NumericalType=void 0;const u=r(s(1594)),l=i(s(2581)),o=s(5626);class p extends o.PrimitiveType{constructor(e,t,s){super(e),this.sizeInBytes=t,this.withSign=s}getClassName(){return p.ClassName}hasFixedSize(){return!!this.sizeInBytes}hasArbitrarySize(){return!this.hasFixedSize()}}t.NumericalType=p,p.ClassName="NumericalType";class c extends p{constructor(){super("u8",1,!1)}getClassName(){return c.ClassName}}t.U8Type=c,c.ClassName="U8Type";class m extends p{constructor(){super("i8",1,!0)}getClassName(){return m.ClassName}}t.I8Type=m,m.ClassName="I8Type";class d extends p{constructor(){super("u16",2,!1)}getClassName(){return d.ClassName}}t.U16Type=d,d.ClassName="U16Type";class y extends p{constructor(){super("i16",2,!0)}getClassName(){return y.ClassName}}t.I16Type=y,y.ClassName="I16Type";class h extends p{constructor(){super("u32",4,!1)}getClassName(){return h.ClassName}}t.U32Type=h,h.ClassName="U32Type";class f extends p{constructor(){super("i32",4,!0)}getClassName(){return f.ClassName}}t.I32Type=f,f.ClassName="I32Type";class g extends p{constructor(){super("u64",8,!1)}getClassName(){return g.ClassName}}t.U64Type=g,g.ClassName="U64Type";class T extends p{constructor(){super("i64",8,!0)}getClassName(){return T.ClassName}}t.I64Type=T,T.ClassName="I64Type";class N extends p{constructor(){super("BigUint",0,!1)}getClassName(){return N.ClassName}}t.BigUIntType=N,N.ClassName="BigUIntType";class v extends p{constructor(){super("Bigint",0,!0)}getClassName(){return v.ClassName}}t.BigIntType=v,v.ClassName="BigIntType";class C extends o.PrimitiveValue{constructor(e,t){if(super(e),"bigint"==typeof t&&(t=t.toString()),this.value=new u.default(t),this.sizeInBytes=e.sizeInBytes,this.withSign=e.withSign,this.value.isNaN())throw new l.ErrInvalidArgument(`not a number: ${t}`);if(!this.withSign&&this.value.isNegative())throw new l.ErrInvalidArgument(`negative, but type is unsigned: ${t}`)}getClassName(){return C.ClassName}equals(e){return this.value.isEqualTo(e.value)}valueOf(){return this.value}toString(){return this.value.toString()}}t.NumericalValue=C,C.ClassName="NumericalValue";class w extends C{constructor(e){super(new c,e)}getClassName(){return w.ClassName}}t.U8Value=w,w.ClassName="U8Value";class O extends C{constructor(e){super(new m,e)}getClassName(){return O.ClassName}}t.I8Value=O,O.ClassName="I8Value";class V extends C{constructor(e){super(new d,e)}getClassName(){return V.ClassName}}t.U16Value=V,V.ClassName="U16Value";class E extends C{constructor(e){super(new y,e)}getClassName(){return E.ClassName}}t.I16Value=E,E.ClassName="I16Value";class P extends C{constructor(e){super(new h,e)}getClassName(){return P.ClassName}}t.U32Value=P,P.ClassName="U32Value";class _ extends C{constructor(e){super(new f,e)}getClassName(){return _.ClassName}}t.I32Value=_,_.ClassName="I32Value";class M extends C{constructor(e){super(new g,e)}getClassName(){return M.ClassName}}t.U64Value=M,M.ClassName="U64Value";class b extends C{constructor(e){super(new T,e)}getClassName(){return b.ClassName}}t.I64Value=b,b.ClassName="I64Value";class x extends C{constructor(e){super(new N,e)}getClassName(){return x.ClassName}}t.BigUIntValue=x,x.ClassName="BigUIntValue";class S extends C{constructor(e){super(new v,e)}getClassName(){return S.ClassName}}t.BigIntValue=S,S.ClassName="BigIntValue"},6514:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StringValue=t.StringType=void 0;const a=s(5626);class n extends a.PrimitiveType{constructor(){super("utf-8 string")}getClassName(){return n.ClassName}}t.StringType=n,n.ClassName="StringType";class i extends a.PrimitiveValue{constructor(e){super(new n),this.value=e}getClassName(){return i.ClassName}static fromUTF8(e){return new i(e)}static fromHex(e){let t=Buffer.from(e,"hex").toString();return new i(t)}getLength(){return this.value.length}equals(e){return this.value===e.value}valueOf(){return this.value}}t.StringValue=i,i.ClassName="StringValue"},7586:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Struct=t.StructType=void 0;const a=s(2581),n=s(5766),i=s(5626);class r extends i.CustomType{constructor(e,t){super(e),this.fieldsDefinitions=[],this.fieldsDefinitions=t}getClassName(){return r.ClassName}static fromJSON(e){let t=(e.fields||[]).map((e=>n.FieldDefinition.fromJSON(e)));return new r(e.name,t)}getFieldsDefinitions(){return this.fieldsDefinitions}getFieldDefinition(e){return this.fieldsDefinitions.find((t=>t.name==e))}getNamesOfDependencies(){return n.Fields.getNamesOfTypeDependencies(this.fieldsDefinitions)}}t.StructType=r,r.ClassName="StructType";class u extends i.TypedValue{constructor(e,t){super(e),this.fields=t,this.fieldsByName=new Map(t.map((e=>[e.name,e]))),this.checkTyping()}getClassName(){return u.ClassName}checkTyping(){let e=this.getType().getFieldsDefinitions();n.Fields.checkTyping(this.fields,e)}getFields(){return this.fields}getFieldValue(e){let t=this.fieldsByName.get(e);if(t)return t.value.valueOf();throw new a.ErrMissingFieldOnStruct(e,this.getType().getName())}valueOf(){let e={};for(const t of this.fields)e[t.name]=t.value.valueOf();return e}equals(e){if(!this.getType().equals(e.getType()))return!1;let t=this.getFields(),s=e.getFields();return n.Fields.equals(t,s)}}t.Struct=u,u.ClassName="Struct"},3145:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TokenIdentifierValue=t.TokenIdentifierType=void 0;const a=s(5626);class n extends a.PrimitiveType{constructor(){super("TokenIdentifier")}getClassName(){return n.ClassName}}t.TokenIdentifierType=n,n.ClassName="TokenIdentifierType";class i extends a.PrimitiveValue{constructor(e){super(new n),this.value=e}static egld(){return new i("EGLD")}static esdtTokenIdentifier(e){return new i(e)}getClassName(){return i.ClassName}getLength(){return this.value.length}equals(e){return this.getLength()==e.getLength()&&this.value==e.value}valueOf(){return this.value}toString(){return this.value.toString()}}t.TokenIdentifierValue=i,i.ClassName="TokenIdentifierValue"},1025:function(e,t,s){var a=this&&this.__createBinding||(Object.create?function(e,t,s,a){void 0===a&&(a=s),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,a){void 0===a&&(a=s),e[a]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&a(t,e,s);return n(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Tuple=t.TupleType=void 0;const r=i(s(2581)),u=s(5766),l=s(7586);class o extends l.StructType{constructor(...e){super(o.prepareName(e),o.prepareFieldDefinitions(e))}getClassName(){return o.ClassName}static prepareName(e){return`tuple<${e.map((e=>e.toString())).join(", ")}>`}static prepareFieldDefinitions(e){return e.map(((e,t)=>new u.FieldDefinition(p(t),"anonymous tuple field",e)))}}function p(e){return`field${e}`}t.TupleType=o,o.ClassName="TupleType";class c extends l.Struct{constructor(e,t){super(e,t)}getClassName(){return c.ClassName}static fromItems(e){if(e.length<1)throw new r.ErrTypingSystem("bad tuple items");let t=e.map((e=>e.getType())),s=new o(...t),a=e.map(((e,t)=>new u.Field(e,p(t))));return new c(s,a)}}t.Tuple=c,c.ClassName="Tuple"},7966:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeExpressionParser=void 0;const a=s(9132),n=s(2581),i=s(5626);t.TypeExpressionParser=class{constructor(){this.backingTypeFormulaParser=new a.TypeFormulaParser}parse(e){try{return this.doParse(e)}catch(t){throw new n.ErrTypingSystem(`Failed to parse type expression: ${e}. Error: ${t}`)}}doParse(e){const t=this.backingTypeFormulaParser.parseExpression(e);return this.typeFormulaToType(t)}typeFormulaToType(e){const t=e.typeParameters.map((e=>this.typeFormulaToType(e)));return new i.Type(e.name,t,void 0,e.metadata)}}},7654:function(e,t,s){var a=this&&this.__createBinding||(Object.create?function(e,t,s,a){void 0===a&&(a=s),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,a){void 0===a&&(a=s),e[a]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&a(t,e,s);return n(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TypeMapper=void 0;const r=i(s(2581)),u=s(8551),l=s(1055),o=s(3979),p=s(1392),c=s(1847),m=s(7472),d=s(1414),y=s(9229),h=s(5766),f=s(926),g=s(177),T=s(1038),N=s(4647),v=s(8303),C=s(1782),w=s(4473),O=s(6514),V=s(7586),E=s(3145),P=s(1025),_=s(6054);t.TypeMapper=class{constructor(e=[]){this.openTypesFactories=new Map([["Option",(...e)=>new f.OptionType(e[0])],["List",(...e)=>new f.ListType(e[0])],["VarArgs",(...e)=>new _.VariadicType(e[0])],["MultiResultVec",(...e)=>new _.VariadicType(e[0])],["variadic",(...e)=>new _.VariadicType(e[0])],["counted-variadic",(...e)=>new _.VariadicType(e[0],!0)],["OptionalArg",(...e)=>new l.OptionalType(e[0])],["optional",(...e)=>new l.OptionalType(e[0])],["OptionalResult",(...e)=>new l.OptionalType(e[0])],["multi",(...e)=>new m.CompositeType(...e)],["MultiArg",(...e)=>new m.CompositeType(...e)],["MultiResult",(...e)=>new m.CompositeType(...e)],["multi",(...e)=>new m.CompositeType(...e)],["tuple",(...e)=>new P.TupleType(...e)],["tuple2",(...e)=>new P.TupleType(...e)],["tuple3",(...e)=>new P.TupleType(...e)],["tuple4",(...e)=>new P.TupleType(...e)],["tuple5",(...e)=>new P.TupleType(...e)],["tuple6",(...e)=>new P.TupleType(...e)],["tuple7",(...e)=>new P.TupleType(...e)],["tuple8",(...e)=>new P.TupleType(...e)],["array2",(...e)=>new g.ArrayVecType(2,e[0])],["array8",(...e)=>new g.ArrayVecType(8,e[0])],["array16",(...e)=>new g.ArrayVecType(16,e[0])],["array20",(...e)=>new g.ArrayVecType(20,e[0])],["array32",(...e)=>new g.ArrayVecType(32,e[0])],["array46",(...e)=>new g.ArrayVecType(46,e[0])],["array48",(...e)=>new g.ArrayVecType(48,e[0])],["array64",(...e)=>new g.ArrayVecType(64,e[0])],["array128",(...e)=>new g.ArrayVecType(128,e[0])],["array256",(...e)=>new g.ArrayVecType(256,e[0])],["ManagedDecimal",(...e)=>new N.ManagedDecimalType(e)],["ManagedDecimalSigned",(...e)=>new v.ManagedDecimalSignedType(e)]]),this.closedTypesMap=new Map([["u8",new w.U8Type],["u16",new w.U16Type],["u32",new w.U32Type],["u64",new w.U64Type],["U64",new w.U64Type],["BigUint",new w.BigUIntType],["i8",new w.I8Type],["i16",new w.I16Type],["i32",new w.I32Type],["i64",new w.I64Type],["Bigint",new w.BigIntType],["BigInt",new w.BigIntType],["bool",new o.BooleanType],["bytes",new p.BytesType],["Address",new u.AddressType],["H256",new T.H256Type],["utf-8 string",new O.StringType],["TokenIdentifier",new E.TokenIdentifierType],["EgldOrEsdtTokenIdentifier",new E.TokenIdentifierType],["CodeMetadata",new c.CodeMetadataType],["nothing",new C.NothingType],["AsyncCall",new C.NothingType]]),this.learnedTypesMap=new Map;for(const t of e)"ManagedDecimal"===t.getName()||"ManagedDecimalSigned"===t.getName()?this.learnedTypesMap.set(`${t.getName()}_${t.getMetadata()}`,t):this.learnedTypesMap.set(t.getName(),t)}mapType(e){let t=this.mapTypeRecursively(e);if(t)return t.isGenericType()||this.learnType(t),t;throw new r.ErrTypingSystem(`Cannot map the type "${e.getName()}" to a known type`)}mapTypeRecursively(e){let t=e.isGenericType(),s=e.hasMetadata(),a=this.learnedTypesMap.get(e.getName());return a||(this.closedTypesMap.get(e.getName())||(e.hasExactClass(d.EnumType.ClassName)?this.mapEnumType(e):e.hasExactClass(y.ExplicitEnumType.ClassName)?this.mapExplicitEnumType(e):e.hasExactClass(V.StructType.ClassName)?this.mapStructType(e):t||s?this.mapGenericType(e):null))}learnType(e){if("ManagedDecimal"===e.getName()||"ManagedDecimalSigned"===e.getName()){const t=`${e.getName()}_${e.getMetadata()}`;this.learnedTypesMap.delete(t),this.learnedTypesMap.set(t,e)}else{const t=e.getName();this.learnedTypesMap.delete(t),this.learnedTypesMap.set(t,e)}}mapStructType(e){let t=this.mappedFields(e.getFieldsDefinitions());return new V.StructType(e.getName(),t)}mapEnumType(e){let t=e.variants.map((e=>new d.EnumVariantDefinition(e.name,e.discriminant,this.mappedFields(e.getFieldsDefinitions()))));return new d.EnumType(e.getName(),t)}mapExplicitEnumType(e){let t=e.variants.map((e=>new y.ExplicitEnumVariantDefinition(e.name)));return new y.ExplicitEnumType(e.getName(),t)}mappedFields(e){return e.map((e=>new h.FieldDefinition(e.name,e.description,this.mapType(e.type))))}mapGenericType(e){let t=e.getTypeParameters().map((e=>this.mapType(e))),s=this.openTypesFactories.get(e.getName());if(!s)throw new r.ErrTypingSystem(`Cannot map the generic type "${e.getName()}" to a known type`);return e.hasMetadata()?s(e.getMetadata()):s(...t)}}},6054:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VariadicValue=t.CountedVariadicType=t.VariadicType=void 0;const a=s(5626);class n extends a.Type{constructor(e,t=!1){super("Variadic",[e],a.TypeCardinality.variable()),this.isCounted=t}getClassName(){return n.ClassName}}t.VariadicType=n,n.ClassName="VariadicType";class i extends a.Type{constructor(e){super("Variadic",[e],a.TypeCardinality.variable())}getClassName(){return n.ClassName}}t.CountedVariadicType=i,i.ClassName="VariadicType";class r extends a.TypedValue{constructor(e,t){super(e),this.items=t}getClassName(){return r.ClassName}static fromItems(...e){return this.createFromItems(e,!1)}static fromItemsCounted(...e){return this.createFromItems(e,!0)}static createFromItems(e,t){if(0==e.length)return new r(new n(new a.TypePlaceholder,t),[]);const s=e[0].getType();return new r(new n(s,t),e)}getItems(){return this.items}valueOf(){return this.items.map((e=>e.valueOf()))}equals(e){if(this.getType().differs(e.getType()))return!1;for(let t=0;t<this.items.length;t++){let s=this.items[t],a=e.items[t];if(!s.equals(a))return!1}return!0}}t.VariadicValue=r,r.ClassName="VariadicValue"}}]);
package/dist/966.esm.js DELETED
@@ -1 +0,0 @@
1
- export const __webpack_id__=966;export const __webpack_ids__=[54,145,242,392,586,854,966,979];export const __webpack_modules__={8095:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeFormula=void 0,t.TypeFormula=class{constructor(e,t,s){this.name=e,this.typeParameters=t,this.metadata=s}toString(){const e=this.typeParameters.length>0?`<${this.typeParameters.map((e=>e.toString())).join(", ")}>`:"",t=`${this.name}${e}`;return void 0!==this.metadata?`${t}*${this.metadata}*`:t}}},9132:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeFormulaParser=void 0;const a=s(8095);class n{parseExpression(e){e=e.trim();const t=this.tokenizeExpression(e).filter((e=>e!==n.COMMA)),s=[];for(const e of t)if(this.isPunctuation(e))if(this.isEndOfTypeParameters(e)){const e=this.acquireTypeWithParameters(s);s.push(e)}else{if(!this.isBeginningOfTypeParameters(e))throw new Error(`Unexpected token (punctuation): ${e}`);s.push(e)}else s.push(e);if(1!==s.length)throw new Error(`Unexpected stack length at end of parsing: ${s.length}`);if(n.PUNCTUATION.includes(s[0]))throw new Error("Unexpected root element.");const i=s[0];if(i instanceof a.TypeFormula)return i;if("string"==typeof i)return new a.TypeFormula(i,[]);throw new Error(`Unexpected item on stack: ${i}`)}tokenizeExpression(e){const t=[];let s="";for(const a of e)this.isPunctuation(a)?(s&&(t.push(s.trim()),s=""),t.push(a)):s+=a;return s&&t.push(s.trim()),t}acquireTypeWithParameters(e){const t=this.acquireTypeParameters(e),s=e.pop();if("ManagedDecimal"===s||"ManagedDecimalSigned"===s){const e=t[0].name;return new a.TypeFormula(s,[],e)}return new a.TypeFormula(s,t.reverse())}acquireTypeParameters(e){const t=[];for(;;){const s=e.pop();if(void 0===s)throw new Error("Badly specified type parameters");if(this.isBeginningOfTypeParameters(s))break;if(s instanceof a.TypeFormula)t.push(s);else{if("string"!=typeof s)throw new Error(`Unexpected type parameter object in stack: ${s}`);t.push(new a.TypeFormula(s,[]))}}return t}isPunctuation(e){return n.PUNCTUATION.includes(e)}isEndOfTypeParameters(e){return e===n.END_TYPE_PARAMETERS}isBeginningOfTypeParameters(e){return e===n.BEGIN_TYPE_PARAMETERS}}t.TypeFormulaParser=n,n.BEGIN_TYPE_PARAMETERS="<",n.END_TYPE_PARAMETERS=">",n.COMMA=",",n.PUNCTUATION=[n.COMMA,n.BEGIN_TYPE_PARAMETERS,n.END_TYPE_PARAMETERS]},4966:function(e,t,s){var a=this&&this.__createBinding||(Object.create?function(e,t,s,a){void 0===a&&(a=s),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,a){void 0===a&&(a=s),e[a]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&a(t,e,s);return n(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AbiRegistry=void 0;const r=i(s(2581)),u=s(1069),l=s(5730),o=s(1414),p=s(4143),c=s(9229),m=s(7586),d=s(7654);class y{constructor(e){this.endpoints=[],this.customTypes=[],this.events=[],this.name=e.name,this.constructorDefinition=e.constructorDefinition,this.upgradeConstructorDefinition=e.upgradeConstructorDefinition,this.endpoints=e.endpoints,this.customTypes=e.customTypes,this.events=e.events||[]}static create(e){const t=e.name||"?",s=e.constructor||{},a=e.upgradeConstructor||{},n=e.endpoints||[],i=e.types||{},u=e.events||[],d=l.EndpointDefinition.fromJSON({name:"constructor",...s}),h=l.EndpointDefinition.fromJSON({name:"upgradeConstructor",...a}),f=n.map((e=>l.EndpointDefinition.fromJSON(e))),g=[];for(const e in i){const t=i[e];if("struct"==t.type)g.push(m.StructType.fromJSON({name:e,fields:t.fields}));else if("enum"==t.type)g.push(o.EnumType.fromJSON({name:e,variants:t.variants}));else{if("explicit-enum"!=t.type)throw new r.ErrTypingSystem(`Cannot handle custom type: ${e}`);g.push(c.ExplicitEnumType.fromJSON({name:e,variants:t.variants}))}}const T=u.map((e=>p.EventDefinition.fromJSON(e)));return new y({name:t,constructorDefinition:d,upgradeConstructorDefinition:h,endpoints:f,customTypes:g,events:T}).remapToKnownTypes()}getCustomType(e){const t=this.customTypes.find((t=>t.getName()==e));return u.guardValueIsSetWithMessage(`custom type [${e}] not found`,t),t}getStruct(e){const t=this.customTypes.find((t=>t.getName()==e&&t.hasExactClass(m.StructType.ClassName)));return u.guardValueIsSetWithMessage(`struct [${e}] not found`,t),t}getStructs(e){return e.map((e=>this.getStruct(e)))}getEnum(e){const t=this.customTypes.find((t=>t.getName()==e&&t.hasExactClass(o.EnumType.ClassName)));return u.guardValueIsSetWithMessage(`enum [${e}] not found`,t),t}getExplicitEnum(e){const t=this.customTypes.find((t=>t.getName()==e&&t.hasExactClass(c.ExplicitEnumType.ClassName)));return u.guardValueIsSetWithMessage(`enum [${e}] not found`,t),t}getEnums(e){return e.map((e=>this.getEnum(e)))}getEndpoints(){return this.endpoints}getEndpoint(e){const t=this.endpoints.find((t=>t.name==e));return u.guardValueIsSetWithMessage(`endpoint [${e}] not found`,t),t}getEvent(e){const t=this.events.find((t=>t.identifier==e));return u.guardValueIsSetWithMessage(`event [${e}] not found`,t),t}remapToKnownTypes(){const e=new d.TypeMapper([]),t=[];for(const s of this.customTypes)this.mapCustomTypeDepthFirst(s,this.customTypes,e,t);if(this.customTypes.length!=t.length)throw new r.ErrTypingSystem("Did not re-map all custom types");const s=h(this.constructorDefinition,e),a=this.upgradeConstructorDefinition?h(this.upgradeConstructorDefinition,e):void 0,n=[];for(const t of this.endpoints)n.push(h(t,e));const i=this.events.map((t=>function(e,t){const s=e.inputs.map((e=>new p.EventTopicDefinition({name:e.name,type:t.mapType(e.type),indexed:e.indexed})));return new p.EventDefinition(e.identifier,s)}(t,e)));return new y({name:this.name,constructorDefinition:s,upgradeConstructorDefinition:a,endpoints:n,customTypes:t,events:i})}mapCustomTypeDepthFirst(e,t,s,a){if(a.findIndex((t=>t.getName()==e.getName()))>=0)return;for(const n of e.getNamesOfDependencies()){const e=t.find((e=>e.getName()==n));e&&this.mapCustomTypeDepthFirst(e,t,s,a)}const n=s.mapType(e);a.push(n)}}function h(e,t){const s=e.input.map((e=>new l.EndpointParameterDefinition(e.name,e.description,t.mapType(e.type)))),a=e.output.map((e=>new l.EndpointParameterDefinition(e.name,e.description,t.mapType(e.type))));return new l.EndpointDefinition(e.name,s,a,e.modifiers,e.title)}t.AbiRegistry=y},8551:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AddressValue=t.AddressType=void 0;const a=s(236),n=s(5626);class i extends n.PrimitiveType{constructor(){super("Address")}getClassName(){return i.ClassName}}t.AddressType=i,i.ClassName="AddressType";class r extends n.PrimitiveValue{constructor(e){super(new i),this.value=a.Address.newFromBech32(e.bech32())}getClassName(){return r.ClassName}equals(e){return this.value.equals(e.value)}valueOf(){return this.value}}t.AddressValue=r,r.ClassName="AddressValue"},1055:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalValue=t.OptionalType=void 0;const a=s(1069),n=s(5626);class i extends n.Type{constructor(e){super("Optional",[e],n.TypeCardinality.variable(1))}getClassName(){return i.ClassName}isAssignableFrom(e){if(!e.hasExactClass(i.ClassName))return!1;let t=this.getFirstTypeParameter().equals(e.getFirstTypeParameter()),s=e.getFirstTypeParameter().hasExactClass(n.NullType.ClassName);return t||s}}t.OptionalType=i,i.ClassName="OptionalType";class r extends n.TypedValue{constructor(e,t=null){super(e),this.value=t}getClassName(){return r.ClassName}static newMissing(){let e=new i(new n.NullType);return new r(e)}isSet(){return!!this.value}getTypedValue(){return a.guardValueIsSet("value",this.value),this.value}valueOf(){return this.value?this.value.valueOf():null}equals(e){return this.value?.equals(e.value)||!1}}t.OptionalValue=r,r.ClassName="OptionalValue"},3979:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanValue=t.BooleanType=void 0;const a=s(5626);class n extends a.PrimitiveType{constructor(){super("bool")}getClassName(){return n.ClassName}}t.BooleanType=n,n.ClassName="BooleanType";class i extends a.PrimitiveValue{constructor(e){super(new n),this.value=e}getClassName(){return i.ClassName}equals(e){return this.value===e.value}isTrue(){return!0===this.value}isFalse(){return!this.isTrue()}valueOf(){return this.value}}t.BooleanValue=i,i.ClassName="BooleanValue"},1392:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BytesValue=t.BytesType=void 0;const a=s(5626);class n extends a.PrimitiveType{constructor(){super("bytes")}getClassName(){return n.ClassName}}t.BytesType=n,n.ClassName="BytesType";class i extends a.PrimitiveValue{constructor(e){super(new n),this.value=e}getClassName(){return i.ClassName}static fromUTF8(e){let t=Buffer.from(e,"utf-8");return new i(t)}static fromHex(e){let t=Buffer.from(e,"hex");return new i(t)}getLength(){return this.value.length}equals(e){return this.getLength()==e.getLength()&&this.value.equals(e.value)}valueOf(){return this.value}toString(){return this.value.toString()}}t.BytesValue=i,i.ClassName="BytesValue"},1847:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CodeMetadataValue=t.CodeMetadataType=void 0;const a=s(5626);class n extends a.PrimitiveType{constructor(){super("CodeMetadata")}}t.CodeMetadataType=n;class i extends a.PrimitiveValue{constructor(e){super(new n),this.value=e}equals(e){return this.value.equals(e.value)}valueOf(){return this.value}}t.CodeMetadataValue=i},902:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionOfTypedValues=void 0,t.CollectionOfTypedValues=class{constructor(e){this.items=e}getLength(){return this.items.length}getItems(){return this.items}valueOf(){return this.items.map((e=>e.valueOf()))}equals(e){if(this.getLength()!=e.getLength())return!1;for(let t=0;t<this.getLength();t++){let s=this.items[t],a=e.items[t];if(!s.equals(a))return!1}return!0}}},7472:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeValue=t.CompositeType=void 0;const a=s(1069),n=s(5626);class i extends n.Type{constructor(...e){super("Composite",e,n.TypeCardinality.variable(e.length))}getClassName(){return i.ClassName}}t.CompositeType=i,i.ClassName="CompositeType";class r extends n.TypedValue{constructor(e,t){super(e),a.guardLength(t,e.getTypeParameters().length),this.items=t}getClassName(){return r.ClassName}static fromItems(...e){let t=e.map((e=>e.getType())),s=new i(...t);return new r(s,e)}getItems(){return this.items}valueOf(){return this.items.map((e=>e?.valueOf()))}equals(e){if(this.getType().differs(e.getType()))return!1;for(let t=0;t<this.items.length;t++){let s=this.items[t],a=e.items[t];if(!s.equals(a))return!1}return!0}}t.CompositeValue=r,r.ClassName="CompositeValue"},5730:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EndpointParameterDefinition=t.EndpointModifiers=t.EndpointDefinition=void 0;const a=s(7966);class n{constructor(e,t,s,a,n){this.input=[],this.output=[],this.name=e,this.title=n||"",this.input=t||[],this.output=s||[],this.modifiers=a}isConstructor(){return"constructor"==this.name}static fromJSON(e){e.name=null==e.name?"?":e.name,e.onlyOwner=e.onlyOwner||!1,e.title=e.title||"",e.payableInTokens=e.payableInTokens||[],e.inputs=e.inputs||[],e.outputs=e.outputs||[];let t=e.inputs.map((e=>r.fromJSON(e))),s=e.outputs.map((e=>r.fromJSON(e))),a=new i(e.mutability,e.payableInTokens,e.onlyOwner);return new n(e.name,t,s,a,e.title)}}t.EndpointDefinition=n;class i{constructor(e,t,s){this.mutability=e||"",this.payableInTokens=t||[],this.onlyOwner=s||!1}isPayableInEGLD(){return this.isPayableInToken("EGLD")}isPayableInToken(e){return!!this.payableInTokens.includes(e)||!this.payableInTokens.includes(`!${e}`)&&!!this.payableInTokens.includes("*")}isPayable(){return 0!=this.payableInTokens.length}isReadonly(){return"readonly"==this.mutability}isOnlyOwner(){return this.onlyOwner}}t.EndpointModifiers=i;class r{constructor(e,t,s){this.name=e,this.description=t,this.type=s}static fromJSON(e){let t=(new a.TypeExpressionParser).parse(e.type);return new r(e.name||"?",e.description||"N / A",t)}}t.EndpointParameterDefinition=r},1414:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EnumValue=t.EnumVariantDefinition=t.EnumType=void 0;const a=s(2581),n=s(1069),i=s(5766),r=s(5626);class u extends r.CustomType{constructor(e,t){super(e),this.variants=[],this.variants=t}getClassName(){return u.ClassName}static fromJSON(e){const t=u.assignMissingDiscriminants(e.variants||[]).map((e=>l.fromJSON(e)));return new u(e.name,t)}static assignMissingDiscriminants(e){return e.every((e=>null==e.discriminant))?e.map(((e,t)=>({...e,discriminant:t}))):e}getVariantByDiscriminant(e){let t=this.variants.find((t=>t.discriminant==e));return n.guardValueIsSet(`variant by discriminant (${e})`,t),t}getVariantByName(e){let t=this.variants.find((t=>t.name==e));return n.guardValueIsSet(`variant by name (${e})`,t),t}getNamesOfDependencies(){const e=[];for(const t of this.variants)e.push(...t.getNamesOfDependencies());return[...new Set(e)]}}t.EnumType=u,u.ClassName="EnumType";class l{constructor(e,t,s=[]){this.fieldsDefinitions=[],n.guardTrue(t<256,"discriminant for simple enum should be less than 256"),this.name=e,this.discriminant=t,this.fieldsDefinitions=s}static fromJSON(e){let t=(e.fields||[]).map((e=>i.FieldDefinition.fromJSON(e)));return new l(e.name,e.discriminant,t)}getFieldsDefinitions(){return this.fieldsDefinitions}getFieldDefinition(e){return this.fieldsDefinitions.find((t=>t.name==e))}getNamesOfDependencies(){return i.Fields.getNamesOfTypeDependencies(this.fieldsDefinitions)}}t.EnumVariantDefinition=l;class o extends r.TypedValue{constructor(e,t,s){super(e),this.fields=[],this.name=t.name,this.discriminant=t.discriminant,this.fields=s,this.fieldsByName=new Map(s.map((e=>[e.name,e])));let a=t.getFieldsDefinitions();i.Fields.checkTyping(this.fields,a)}getClassName(){return o.ClassName}static fromName(e,t){let s=e.getVariantByName(t);return new o(e,s,[])}static fromDiscriminant(e,t){let s=e.getVariantByDiscriminant(t);return new o(e,s,[])}equals(e){if(!this.getType().equals(e.getType()))return!1;let t=this.getFields(),s=e.getFields();const a=this.name==e.name,n=this.discriminant==e.discriminant,r=i.Fields.equals(t,s);return a&&n&&r}getFields(){return this.fields}getFieldValue(e){let t=this.fieldsByName.get(e);if(t)return t.value.valueOf();throw new a.ErrMissingFieldOnEnum(e,this.getType().getName())}valueOf(){let e={name:this.name,fields:[]};return this.fields.forEach(((t,s)=>e.fields[s]=t.value.valueOf())),e}}t.EnumValue=o,o.ClassName="EnumValue"},4143:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EventTopicDefinition=t.EventDefinition=void 0;const a=s(7966);class n{constructor(e,t){this.inputs=[],this.identifier=e,this.inputs=t||[]}static fromJSON(e){e.identifier=null==e.identifier?"?":e.identifier,e.inputs=e.inputs||[];const t=e.inputs.map((e=>i.fromJSON(e)));return new n(e.identifier,t)}}t.EventDefinition=n;class i{constructor(e){this.name=e.name,this.type=e.type,this.indexed=e.indexed}static fromJSON(e){const t=(new a.TypeExpressionParser).parse(e.type);return new i({name:e.name||"?",type:t,indexed:e.indexed})}}t.EventTopicDefinition=i},9229:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExplicitEnumValue=t.ExplicitEnumVariantDefinition=t.ExplicitEnumType=void 0;const a=s(1069),n=s(5626);class i extends n.CustomType{constructor(e,t){super(e),this.variants=[],this.variants=t}getClassName(){return i.ClassName}static fromJSON(e){const t=e.variants.map((e=>r.fromJSON(e)));return new i(e.name,t)}getVariantByName(e){let t=this.variants.find((t=>t.name==e));return a.guardValueIsSet(`variant by name (${e})`,t),t}}t.ExplicitEnumType=i,i.ClassName="ExplicitEnumType";class r{constructor(e){this.name=e}static fromJSON(e){return new r(e.name)}}t.ExplicitEnumVariantDefinition=r;class u extends n.TypedValue{constructor(e,t){super(e),this.name=t.name}getClassName(){return u.ClassName}static fromName(e,t){let s=e.getVariantByName(t);return new u(e,s)}equals(e){return!!this.getType().equals(e.getType())&&this.name==e.name}valueOf(){return{name:this.name}}}t.ExplicitEnumValue=u,u.ClassName="ExplicitEnumValue"},5766:function(e,t,s){var a=this&&this.__createBinding||(Object.create?function(e,t,s,a){void 0===a&&(a=s),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,a){void 0===a&&(a=s),e[a]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&a(t,e,s);return n(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Fields=t.Field=t.FieldDefinition=void 0;const r=i(s(2581)),u=s(7966);class l{constructor(e,t,s){this.name=e,this.description=t,this.type=s}static fromJSON(e){let t=(new u.TypeExpressionParser).parse(e.type);return new l(e.name,e.description,t)}}t.FieldDefinition=l,t.Field=class{constructor(e,t=""){this.value=e,this.name=t}checkTyping(e){const t=this.value.getType();if(!t.equals(e.type))throw new r.ErrTypingSystem(`check type of field "${e.name}; expected: ${e.type}, actual: ${t}"`);if(this.name!=e.name)throw new r.ErrTypingSystem(`check name of field "${e.name}"`)}equals(e){return this.name==e.name&&this.value.equals(e.value)}},t.Fields=class{static checkTyping(e,t){if(e.length!=t.length)throw new r.ErrTypingSystem("fields length vs. field definitions length");for(let s=0;s<e.length;s++){let a=e[s],n=t[s];a.checkTyping(n)}}static equals(e,t){if(e.length!=t.length)return!1;for(let s=0;s<e.length;s++){let a=e[s],n=t[s];if(!a.equals(n))return!1}return!0}static getNamesOfTypeDependencies(e){const t=[];for(const s of e)t.push(s.type.getName()),t.push(...s.type.getNamesOfDependencies());return[...new Set(t)]}}},926:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.List=t.OptionValue=t.ListType=t.OptionType=void 0;const a=s(1069),n=s(902),i=s(5626);class r extends i.Type{constructor(e){super("Option",[e])}getClassName(){return r.ClassName}isAssignableFrom(e){if(!e.hasExactClass(r.ClassName))return!1;let t=this.getFirstTypeParameter().equals(e.getFirstTypeParameter()),s=e.getFirstTypeParameter().hasExactClass(i.NullType.ClassName);return t||s}}t.OptionType=r,r.ClassName="OptionType";class u extends i.Type{constructor(e){super("List",[e])}getClassName(){return u.ClassName}}t.ListType=u,u.ClassName="ListType";class l extends i.TypedValue{constructor(e,t=null){super(e),this.value=t}getClassName(){return l.ClassName}static newMissing(){let e=new r(new i.NullType);return new l(e)}static newMissingTyped(e){return new l(new r(e))}static newProvided(e){let t=new r(e.getType());return new l(t,e)}isSet(){return!!this.value}getTypedValue(){return a.guardValueIsSet("value",this.value),this.value}valueOf(){return this.value?this.value.valueOf():null}equals(e){return this.value?.equals(e.value)||!1}}t.OptionValue=l,l.ClassName="OptionValue";class o extends i.TypedValue{constructor(e,t){super(e),this.backingCollection=new n.CollectionOfTypedValues(t)}getClassName(){return o.ClassName}static fromItems(e){if(0==e.length)return new o(new i.TypePlaceholder,[]);let t=e[0].getType(),s=new u(t);return new o(s,e)}getLength(){return this.backingCollection.getLength()}getItems(){return this.backingCollection.getItems()}valueOf(){return this.backingCollection.valueOf()}equals(e){return this.backingCollection.equals(e.backingCollection)}}t.List=o,o.ClassName="List"},177:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayVec=t.ArrayVecType=void 0;const a=s(1069),n=s(902),i=s(5626);class r extends i.Type{constructor(e,t){super("Array",[t]),a.guardTrue(e>0,"array length > 0"),this.length=e}getClassName(){return r.ClassName}}t.ArrayVecType=r,r.ClassName="ArrayVecType";class u extends i.TypedValue{constructor(e,t){super(e),a.guardLength(t,e.length),this.backingCollection=new n.CollectionOfTypedValues(t)}getClassName(){return u.ClassName}getLength(){return this.backingCollection.getLength()}getItems(){return this.backingCollection.getItems()}valueOf(){return this.backingCollection.valueOf()}equals(e){return this.backingCollection.equals(e.backingCollection)}}t.ArrayVec=u,u.ClassName="ArrayVec"},1038:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.H256Value=t.H256Type=void 0;const a=s(5626);class n extends a.PrimitiveType{constructor(){super("H256")}getClassName(){return n.ClassName}}t.H256Type=n,n.ClassName="H256Type";class i extends a.PrimitiveValue{constructor(e){super(new n),this.value=e}getClassName(){return i.ClassName}equals(e){return this.value.equals(e.value)}valueOf(){return this.value}}t.H256Value=i,i.ClassName="H256Value"},4647:function(e,t,s){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ManagedDecimalValue=t.ManagedDecimalType=void 0;const n=a(s(1594)),i=s(5626);class r extends i.Type{constructor(e){super("ManagedDecimal",void 0,void 0,e)}getClassName(){return r.ClassName}getMetadata(){return this.metadata}isVariable(){return"usize"==this.metadata}}t.ManagedDecimalType=r,r.ClassName="ManagedDecimalType";class u extends i.TypedValue{constructor(e,t,s=!1){super(new r(s?"usize":t)),this.value=new n.default(e),this.scale=t,this.variable=s}getClassName(){return u.ClassName}getScale(){return this.scale}getPrecision(){return this.value.toFixed(this.scale).replace(".","").length}equals(e){return this.getPrecision()==e.getPrecision()&&new n.default(this.value).eq(e.value)}valueOf(){return this.value}toString(){return this.value.toFixed(this.scale)}isVariable(){return this.variable}}t.ManagedDecimalValue=u,u.ClassName="ManagedDecimalValue"},8303:function(e,t,s){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ManagedDecimalSignedValue=t.ManagedDecimalSignedType=void 0;const n=a(s(1594)),i=s(5626);class r extends i.Type{constructor(e){super("ManagedDecimalSigned",void 0,void 0,e)}getClassName(){return r.ClassName}getMetadata(){return this.metadata}isVariable(){return"usize"==this.metadata}}t.ManagedDecimalSignedType=r,r.ClassName="ManagedDecimalSignedType";class u extends i.TypedValue{constructor(e,t,s=!1){super(new r(s?"usize":t)),this.value=new n.default(e),this.scale=t,this.variable=s}getClassName(){return u.ClassName}getPrecision(){return this.value.toFixed(this.scale).replace(".","").length}getScale(){return this.scale}equals(e){return this.getPrecision()==e.getPrecision()&&new n.default(this.value).eq(e.value)}valueOf(){return this.value}toString(){return this.value.toFixed(this.scale)}isVariable(){return this.variable}}t.ManagedDecimalSignedValue=u,u.ClassName="ManagedDecimalSignedValue"},1782:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NothingValue=t.NothingType=void 0;const a=s(5626);class n extends a.PrimitiveType{constructor(){super("nothing")}getClassName(){return n.ClassName}}t.NothingType=n,n.ClassName="NothingType";class i extends a.PrimitiveValue{constructor(){super(new n)}getClassName(){return i.ClassName}equals(e){return!1}valueOf(){return{}}}t.NothingValue=i,i.ClassName="NothingValue"},4473:function(e,t,s){var a=this&&this.__createBinding||(Object.create?function(e,t,s,a){void 0===a&&(a=s),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,a){void 0===a&&(a=s),e[a]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&a(t,e,s);return n(t,e),t},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BigIntValue=t.BigUIntValue=t.I64Value=t.U64Value=t.I32Value=t.U32Value=t.I16Value=t.U16Value=t.I8Value=t.U8Value=t.NumericalValue=t.BigIntType=t.BigUIntType=t.I64Type=t.U64Type=t.I32Type=t.U32Type=t.I16Type=t.U16Type=t.I8Type=t.U8Type=t.NumericalType=void 0;const u=r(s(1594)),l=i(s(2581)),o=s(5626);class p extends o.PrimitiveType{constructor(e,t,s){super(e),this.sizeInBytes=t,this.withSign=s}getClassName(){return p.ClassName}hasFixedSize(){return!!this.sizeInBytes}hasArbitrarySize(){return!this.hasFixedSize()}}t.NumericalType=p,p.ClassName="NumericalType";class c extends p{constructor(){super("u8",1,!1)}getClassName(){return c.ClassName}}t.U8Type=c,c.ClassName="U8Type";class m extends p{constructor(){super("i8",1,!0)}getClassName(){return m.ClassName}}t.I8Type=m,m.ClassName="I8Type";class d extends p{constructor(){super("u16",2,!1)}getClassName(){return d.ClassName}}t.U16Type=d,d.ClassName="U16Type";class y extends p{constructor(){super("i16",2,!0)}getClassName(){return y.ClassName}}t.I16Type=y,y.ClassName="I16Type";class h extends p{constructor(){super("u32",4,!1)}getClassName(){return h.ClassName}}t.U32Type=h,h.ClassName="U32Type";class f extends p{constructor(){super("i32",4,!0)}getClassName(){return f.ClassName}}t.I32Type=f,f.ClassName="I32Type";class g extends p{constructor(){super("u64",8,!1)}getClassName(){return g.ClassName}}t.U64Type=g,g.ClassName="U64Type";class T extends p{constructor(){super("i64",8,!0)}getClassName(){return T.ClassName}}t.I64Type=T,T.ClassName="I64Type";class N extends p{constructor(){super("BigUint",0,!1)}getClassName(){return N.ClassName}}t.BigUIntType=N,N.ClassName="BigUIntType";class v extends p{constructor(){super("Bigint",0,!0)}getClassName(){return v.ClassName}}t.BigIntType=v,v.ClassName="BigIntType";class C extends o.PrimitiveValue{constructor(e,t){if(super(e),"bigint"==typeof t&&(t=t.toString()),this.value=new u.default(t),this.sizeInBytes=e.sizeInBytes,this.withSign=e.withSign,this.value.isNaN())throw new l.ErrInvalidArgument(`not a number: ${t}`);if(!this.withSign&&this.value.isNegative())throw new l.ErrInvalidArgument(`negative, but type is unsigned: ${t}`)}getClassName(){return C.ClassName}equals(e){return this.value.isEqualTo(e.value)}valueOf(){return this.value}toString(){return this.value.toString()}}t.NumericalValue=C,C.ClassName="NumericalValue";class w extends C{constructor(e){super(new c,e)}getClassName(){return w.ClassName}}t.U8Value=w,w.ClassName="U8Value";class O extends C{constructor(e){super(new m,e)}getClassName(){return O.ClassName}}t.I8Value=O,O.ClassName="I8Value";class V extends C{constructor(e){super(new d,e)}getClassName(){return V.ClassName}}t.U16Value=V,V.ClassName="U16Value";class E extends C{constructor(e){super(new y,e)}getClassName(){return E.ClassName}}t.I16Value=E,E.ClassName="I16Value";class _ extends C{constructor(e){super(new h,e)}getClassName(){return _.ClassName}}t.U32Value=_,_.ClassName="U32Value";class P extends C{constructor(e){super(new f,e)}getClassName(){return P.ClassName}}t.I32Value=P,P.ClassName="I32Value";class b extends C{constructor(e){super(new g,e)}getClassName(){return b.ClassName}}t.U64Value=b,b.ClassName="U64Value";class M extends C{constructor(e){super(new T,e)}getClassName(){return M.ClassName}}t.I64Value=M,M.ClassName="I64Value";class x extends C{constructor(e){super(new N,e)}getClassName(){return x.ClassName}}t.BigUIntValue=x,x.ClassName="BigUIntValue";class S extends C{constructor(e){super(new v,e)}getClassName(){return S.ClassName}}t.BigIntValue=S,S.ClassName="BigIntValue"},6514:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StringValue=t.StringType=void 0;const a=s(5626);class n extends a.PrimitiveType{constructor(){super("utf-8 string")}getClassName(){return n.ClassName}}t.StringType=n,n.ClassName="StringType";class i extends a.PrimitiveValue{constructor(e){super(new n),this.value=e}getClassName(){return i.ClassName}static fromUTF8(e){return new i(e)}static fromHex(e){let t=Buffer.from(e,"hex").toString();return new i(t)}getLength(){return this.value.length}equals(e){return this.value===e.value}valueOf(){return this.value}}t.StringValue=i,i.ClassName="StringValue"},7586:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Struct=t.StructType=void 0;const a=s(2581),n=s(5766),i=s(5626);class r extends i.CustomType{constructor(e,t){super(e),this.fieldsDefinitions=[],this.fieldsDefinitions=t}getClassName(){return r.ClassName}static fromJSON(e){let t=(e.fields||[]).map((e=>n.FieldDefinition.fromJSON(e)));return new r(e.name,t)}getFieldsDefinitions(){return this.fieldsDefinitions}getFieldDefinition(e){return this.fieldsDefinitions.find((t=>t.name==e))}getNamesOfDependencies(){return n.Fields.getNamesOfTypeDependencies(this.fieldsDefinitions)}}t.StructType=r,r.ClassName="StructType";class u extends i.TypedValue{constructor(e,t){super(e),this.fields=t,this.fieldsByName=new Map(t.map((e=>[e.name,e]))),this.checkTyping()}getClassName(){return u.ClassName}checkTyping(){let e=this.getType().getFieldsDefinitions();n.Fields.checkTyping(this.fields,e)}getFields(){return this.fields}getFieldValue(e){let t=this.fieldsByName.get(e);if(t)return t.value.valueOf();throw new a.ErrMissingFieldOnStruct(e,this.getType().getName())}valueOf(){let e={};for(const t of this.fields)e[t.name]=t.value.valueOf();return e}equals(e){if(!this.getType().equals(e.getType()))return!1;let t=this.getFields(),s=e.getFields();return n.Fields.equals(t,s)}}t.Struct=u,u.ClassName="Struct"},3145:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TokenIdentifierValue=t.TokenIdentifierType=void 0;const a=s(5626);class n extends a.PrimitiveType{constructor(){super("TokenIdentifier")}getClassName(){return n.ClassName}}t.TokenIdentifierType=n,n.ClassName="TokenIdentifierType";class i extends a.PrimitiveValue{constructor(e){super(new n),this.value=e}static egld(){return new i("EGLD")}static esdtTokenIdentifier(e){return new i(e)}getClassName(){return i.ClassName}getLength(){return this.value.length}equals(e){return this.getLength()==e.getLength()&&this.value==e.value}valueOf(){return this.value}toString(){return this.value.toString()}}t.TokenIdentifierValue=i,i.ClassName="TokenIdentifierValue"},1025:function(e,t,s){var a=this&&this.__createBinding||(Object.create?function(e,t,s,a){void 0===a&&(a=s),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,a){void 0===a&&(a=s),e[a]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&a(t,e,s);return n(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Tuple=t.TupleType=void 0;const r=i(s(2581)),u=s(5766),l=s(7586);class o extends l.StructType{constructor(...e){super(o.prepareName(e),o.prepareFieldDefinitions(e))}getClassName(){return o.ClassName}static prepareName(e){return`tuple<${e.map((e=>e.toString())).join(", ")}>`}static prepareFieldDefinitions(e){return e.map(((e,t)=>new u.FieldDefinition(p(t),"anonymous tuple field",e)))}}function p(e){return`field${e}`}t.TupleType=o,o.ClassName="TupleType";class c extends l.Struct{constructor(e,t){super(e,t)}getClassName(){return c.ClassName}static fromItems(e){if(e.length<1)throw new r.ErrTypingSystem("bad tuple items");let t=e.map((e=>e.getType())),s=new o(...t),a=e.map(((e,t)=>new u.Field(e,p(t))));return new c(s,a)}}t.Tuple=c,c.ClassName="Tuple"},7966:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeExpressionParser=void 0;const a=s(9132),n=s(2581),i=s(5626);t.TypeExpressionParser=class{constructor(){this.backingTypeFormulaParser=new a.TypeFormulaParser}parse(e){try{return this.doParse(e)}catch(t){throw new n.ErrTypingSystem(`Failed to parse type expression: ${e}. Error: ${t}`)}}doParse(e){const t=this.backingTypeFormulaParser.parseExpression(e);return this.typeFormulaToType(t)}typeFormulaToType(e){const t=e.typeParameters.map((e=>this.typeFormulaToType(e)));return new i.Type(e.name,t,void 0,e.metadata)}}},7654:function(e,t,s){var a=this&&this.__createBinding||(Object.create?function(e,t,s,a){void 0===a&&(a=s),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,a){void 0===a&&(a=s),e[a]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&a(t,e,s);return n(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TypeMapper=void 0;const r=i(s(2581)),u=s(8551),l=s(1055),o=s(3979),p=s(1392),c=s(1847),m=s(7472),d=s(1414),y=s(9229),h=s(5766),f=s(926),g=s(177),T=s(1038),N=s(4647),v=s(8303),C=s(1782),w=s(4473),O=s(6514),V=s(7586),E=s(3145),_=s(1025),P=s(6054);t.TypeMapper=class{constructor(e=[]){this.openTypesFactories=new Map([["Option",(...e)=>new f.OptionType(e[0])],["List",(...e)=>new f.ListType(e[0])],["VarArgs",(...e)=>new P.VariadicType(e[0])],["MultiResultVec",(...e)=>new P.VariadicType(e[0])],["variadic",(...e)=>new P.VariadicType(e[0])],["counted-variadic",(...e)=>new P.VariadicType(e[0],!0)],["OptionalArg",(...e)=>new l.OptionalType(e[0])],["optional",(...e)=>new l.OptionalType(e[0])],["OptionalResult",(...e)=>new l.OptionalType(e[0])],["multi",(...e)=>new m.CompositeType(...e)],["MultiArg",(...e)=>new m.CompositeType(...e)],["MultiResult",(...e)=>new m.CompositeType(...e)],["multi",(...e)=>new m.CompositeType(...e)],["tuple",(...e)=>new _.TupleType(...e)],["tuple2",(...e)=>new _.TupleType(...e)],["tuple3",(...e)=>new _.TupleType(...e)],["tuple4",(...e)=>new _.TupleType(...e)],["tuple5",(...e)=>new _.TupleType(...e)],["tuple6",(...e)=>new _.TupleType(...e)],["tuple7",(...e)=>new _.TupleType(...e)],["tuple8",(...e)=>new _.TupleType(...e)],["array2",(...e)=>new g.ArrayVecType(2,e[0])],["array8",(...e)=>new g.ArrayVecType(8,e[0])],["array16",(...e)=>new g.ArrayVecType(16,e[0])],["array20",(...e)=>new g.ArrayVecType(20,e[0])],["array32",(...e)=>new g.ArrayVecType(32,e[0])],["array46",(...e)=>new g.ArrayVecType(46,e[0])],["array48",(...e)=>new g.ArrayVecType(48,e[0])],["array64",(...e)=>new g.ArrayVecType(64,e[0])],["array128",(...e)=>new g.ArrayVecType(128,e[0])],["array256",(...e)=>new g.ArrayVecType(256,e[0])],["ManagedDecimal",(...e)=>new N.ManagedDecimalType(e)],["ManagedDecimalSigned",(...e)=>new v.ManagedDecimalSignedType(e)]]),this.closedTypesMap=new Map([["u8",new w.U8Type],["u16",new w.U16Type],["u32",new w.U32Type],["u64",new w.U64Type],["U64",new w.U64Type],["BigUint",new w.BigUIntType],["i8",new w.I8Type],["i16",new w.I16Type],["i32",new w.I32Type],["i64",new w.I64Type],["Bigint",new w.BigIntType],["BigInt",new w.BigIntType],["bool",new o.BooleanType],["bytes",new p.BytesType],["Address",new u.AddressType],["H256",new T.H256Type],["utf-8 string",new O.StringType],["TokenIdentifier",new E.TokenIdentifierType],["EgldOrEsdtTokenIdentifier",new E.TokenIdentifierType],["CodeMetadata",new c.CodeMetadataType],["nothing",new C.NothingType],["AsyncCall",new C.NothingType]]),this.learnedTypesMap=new Map;for(const t of e)"ManagedDecimal"===t.getName()||"ManagedDecimalSigned"===t.getName()?this.learnedTypesMap.set(`${t.getName()}_${t.getMetadata()}`,t):this.learnedTypesMap.set(t.getName(),t)}mapType(e){let t=this.mapTypeRecursively(e);if(t)return t.isGenericType()||this.learnType(t),t;throw new r.ErrTypingSystem(`Cannot map the type "${e.getName()}" to a known type`)}mapTypeRecursively(e){let t=e.isGenericType(),s=e.hasMetadata(),a=this.learnedTypesMap.get(e.getName());return a||(this.closedTypesMap.get(e.getName())||(e.hasExactClass(d.EnumType.ClassName)?this.mapEnumType(e):e.hasExactClass(y.ExplicitEnumType.ClassName)?this.mapExplicitEnumType(e):e.hasExactClass(V.StructType.ClassName)?this.mapStructType(e):t||s?this.mapGenericType(e):null))}learnType(e){if("ManagedDecimal"===e.getName()||"ManagedDecimalSigned"===e.getName()){const t=`${e.getName()}_${e.getMetadata()}`;this.learnedTypesMap.delete(t),this.learnedTypesMap.set(t,e)}else{const t=e.getName();this.learnedTypesMap.delete(t),this.learnedTypesMap.set(t,e)}}mapStructType(e){let t=this.mappedFields(e.getFieldsDefinitions());return new V.StructType(e.getName(),t)}mapEnumType(e){let t=e.variants.map((e=>new d.EnumVariantDefinition(e.name,e.discriminant,this.mappedFields(e.getFieldsDefinitions()))));return new d.EnumType(e.getName(),t)}mapExplicitEnumType(e){let t=e.variants.map((e=>new y.ExplicitEnumVariantDefinition(e.name)));return new y.ExplicitEnumType(e.getName(),t)}mappedFields(e){return e.map((e=>new h.FieldDefinition(e.name,e.description,this.mapType(e.type))))}mapGenericType(e){let t=e.getTypeParameters().map((e=>this.mapType(e))),s=this.openTypesFactories.get(e.getName());if(!s)throw new r.ErrTypingSystem(`Cannot map the generic type "${e.getName()}" to a known type`);return e.hasMetadata()?s(e.getMetadata()):s(...t)}}},6054:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VariadicValue=t.CountedVariadicType=t.VariadicType=void 0;const a=s(5626);class n extends a.Type{constructor(e,t=!1){super("Variadic",[e],a.TypeCardinality.variable()),this.isCounted=t}getClassName(){return n.ClassName}}t.VariadicType=n,n.ClassName="VariadicType";class i extends a.Type{constructor(e){super("Variadic",[e],a.TypeCardinality.variable())}getClassName(){return n.ClassName}}t.CountedVariadicType=i,i.ClassName="VariadicType";class r extends a.TypedValue{constructor(e,t){super(e),this.items=t}getClassName(){return r.ClassName}static fromItems(...e){return this.createFromItems(e,!1)}static fromItemsCounted(...e){return this.createFromItems(e,!0)}static createFromItems(e,t){if(0==e.length)return new r(new n(new a.TypePlaceholder,t),[]);const s=e[0].getType();return new r(new n(s,t),e)}getItems(){return this.items}valueOf(){return this.items.map((e=>e.valueOf()))}equals(e){if(this.getType().differs(e.getType()))return!1;for(let t=0;t<this.items.length;t++){let s=this.items[t],a=e.items[t];if(!s.equals(a))return!1}return!0}}t.VariadicValue=r,r.ClassName="VariadicValue"}};
package/dist/979.cjs.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_xoxno_sdk_js=self.webpackChunk_xoxno_sdk_js||[]).push([[979],{3979:(e,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.BooleanValue=s.BooleanType=void 0;const l=a(5626);class u extends l.PrimitiveType{constructor(){super("bool")}getClassName(){return u.ClassName}}s.BooleanType=u,u.ClassName="BooleanType";class o extends l.PrimitiveValue{constructor(e){super(new u),this.value=e}getClassName(){return o.ClassName}equals(e){return this.value===e.value}isTrue(){return!0===this.value}isFalse(){return!this.isTrue()}valueOf(){return this.value}}s.BooleanValue=o,o.ClassName="BooleanValue"}}]);
package/dist/979.esm.js DELETED
@@ -1 +0,0 @@
1
- export const __webpack_id__=979;export const __webpack_ids__=[979];export const __webpack_modules__={3979:(e,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.BooleanValue=s.BooleanType=void 0;const l=a(5626);class t extends l.PrimitiveType{constructor(){super("bool")}getClassName(){return t.ClassName}}s.BooleanType=t,t.ClassName="BooleanType";class o extends l.PrimitiveValue{constructor(e){super(new t),this.value=e}getClassName(){return o.ClassName}equals(e){return this.value===e.value}isTrue(){return!0===this.value}isFalse(){return!this.isTrue()}valueOf(){return this.value}}s.BooleanValue=o,o.ClassName="BooleanValue"}};
package/dist/989.cjs.js DELETED
@@ -1 +0,0 @@
1
- (self.webpackChunk_xoxno_sdk_js=self.webpackChunk_xoxno_sdk_js||[]).push([[147,385,766,989],{7867:(n,e,o)=>{var r={"./bls.js":2989,"./bls_c.js":7683};function s(n){var e=t(n);return o(e)}function t(n){if(!o.o(r,n)){var e=new Error("Cannot find module '"+n+"'");throw e.code="MODULE_NOT_FOUND",e}return r[n]}s.keys=function(){return Object.keys(r)},s.resolve=t,n.exports=s,s.id=7867},899:()=>{},6137:()=>{},4181:()=>{},4197:()=>{},3086:()=>{},7406:()=>{},5340:()=>{},9838:()=>{},2831:()=>{},1281:()=>{}}]);
package/dist/989.esm.js DELETED
@@ -1 +0,0 @@
1
- export const __webpack_id__=989;export const __webpack_ids__=[147,385,766,989];export const __webpack_modules__={7867:(e,o,r)=>{var _={"./bls.js":2989,"./bls_c.js":7683};function n(e){var o=t(e);return r(o)}function t(e){if(!r.o(_,e)){var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}return _[e]}n.keys=function(){return Object.keys(_)},n.resolve=t,e.exports=n,n.id=7867},899:()=>{},6137:()=>{},4181:()=>{},4197:()=>{},3086:()=>{},7406:()=>{},5340:()=>{},9838:()=>{},2831:()=>{},1281:()=>{}};