@xoxno/sdk-js 0.1.307 → 0.1.313
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.
- package/dist/collection/index.d.ts +0 -1
- package/dist/common/index.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/interactions/index.d.ts +0 -1
- package/dist/interactor.cjs.js +1 -1
- package/dist/interactor.d.ts +0 -1
- package/dist/interactor.esm.js +1 -1
- package/dist/launchpad/index.d.ts +0 -1
- package/dist/nft/index.d.ts +0 -1
- package/dist/staking/index.d.ts +0 -1
- package/dist/types/collection.d.ts +0 -1
- package/dist/types/common.d.ts +0 -1
- package/dist/types/event.d.ts +0 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/interactions.d.ts +0 -1
- package/dist/types/nft.d.ts +0 -1
- package/dist/types/staking.d.ts +0 -1
- package/dist/types/trading.d.ts +0 -1
- package/dist/types/user.d.ts +0 -1
- package/dist/users/index.d.ts +0 -1
- package/dist/utils/SmartContractAbis.d.ts +0 -1
- package/dist/utils/SmartContractService.d.ts +0 -1
- package/dist/utils/api.d.ts +0 -1
- package/dist/utils/const.d.ts +0 -1
- package/dist/utils/getActivity.d.ts +0 -1
- package/dist/utils/helpers.d.ts +0 -1
- package/dist/utils/regex.d.ts +0 -1
- package/dist/utils/scCalls.d.ts +0 -1
- package/package.json +1 -1
- package/dist/13.cjs.js +0 -1
- package/dist/13.esm.js +0 -1
- package/dist/132.cjs.js +0 -1
- package/dist/132.esm.js +0 -1
- package/dist/145.cjs.js +0 -1
- package/dist/145.esm.js +0 -1
- package/dist/147.cjs.js +0 -1
- package/dist/147.esm.js +0 -1
- package/dist/242.cjs.js +0 -1
- package/dist/242.esm.js +0 -1
- package/dist/385.cjs.js +0 -1
- package/dist/385.esm.js +0 -1
- package/dist/392.cjs.js +0 -1
- package/dist/392.esm.js +0 -1
- package/dist/401.cjs.js +0 -2
- package/dist/401.cjs.js.LICENSE.txt +0 -10
- package/dist/401.esm.js +0 -2
- package/dist/401.esm.js.LICENSE.txt +0 -10
- package/dist/403.cjs.js +0 -1
- package/dist/403.esm.js +0 -1
- package/dist/415.cjs.js +0 -1
- package/dist/415.esm.js +0 -1
- package/dist/425.cjs.js +0 -1
- package/dist/425.esm.js +0 -1
- package/dist/473.cjs.js +0 -1
- package/dist/473.esm.js +0 -1
- package/dist/528.cjs.js +0 -1
- package/dist/528.esm.js +0 -1
- package/dist/54.cjs.js +0 -1
- package/dist/54.esm.js +0 -1
- package/dist/586.cjs.js +0 -1
- package/dist/586.esm.js +0 -1
- package/dist/626.cjs.js +0 -1
- package/dist/626.esm.js +0 -1
- package/dist/661.cjs.js +0 -1
- package/dist/661.esm.js +0 -1
- package/dist/766.cjs.js +0 -1
- package/dist/766.esm.js +0 -1
- package/dist/820.cjs.js +0 -2
- package/dist/820.cjs.js.LICENSE.txt +0 -3
- package/dist/820.esm.js +0 -2
- package/dist/820.esm.js.LICENSE.txt +0 -3
- package/dist/854.cjs.js +0 -1
- package/dist/854.esm.js +0 -1
- package/dist/966.cjs.js +0 -1
- package/dist/966.esm.js +0 -1
- package/dist/979.cjs.js +0 -1
- package/dist/979.esm.js +0 -1
- package/dist/989.cjs.js +0 -1
- package/dist/989.esm.js +0 -1
- package/dist/collection/index.d.ts.map +0 -1
- package/dist/common/index.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/interactions/index.d.ts.map +0 -1
- package/dist/interactor.d.ts.map +0 -1
- package/dist/launchpad/index.d.ts.map +0 -1
- package/dist/nft/index.d.ts.map +0 -1
- package/dist/staking/index.d.ts.map +0 -1
- package/dist/types/collection.d.ts.map +0 -1
- package/dist/types/common.d.ts.map +0 -1
- package/dist/types/event.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/interactions.d.ts.map +0 -1
- package/dist/types/nft.d.ts.map +0 -1
- package/dist/types/staking.d.ts.map +0 -1
- package/dist/types/trading.d.ts.map +0 -1
- package/dist/types/user.d.ts.map +0 -1
- package/dist/users/index.d.ts.map +0 -1
- package/dist/utils/SmartContractAbis.d.ts.map +0 -1
- package/dist/utils/SmartContractService.d.ts.map +0 -1
- package/dist/utils/api.d.ts.map +0 -1
- package/dist/utils/const.d.ts.map +0 -1
- package/dist/utils/getActivity.d.ts.map +0 -1
- package/dist/utils/helpers.d.ts.map +0 -1
- package/dist/utils/regex.d.ts.map +0 -1
- package/dist/utils/scCalls.d.ts.map +0 -1
package/dist/425.esm.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const __webpack_id__=425;export const __webpack_ids__=[425];export const __webpack_modules__={6425:(e,t,n)=>{function r(e,t){return function(){return e.apply(t,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:s}=Object,i=(a=Object.create(null),e=>{const t=o.call(e);return a[t]||(a[t]=t.slice(8,-1).toLowerCase())});var a;const c=e=>(e=e.toLowerCase(),t=>i(t)===e),u=e=>t=>typeof t===e,{isArray:l}=Array,f=u("undefined"),d=c("ArrayBuffer"),p=u("string"),h=u("function"),m=u("number"),y=e=>null!==e&&"object"==typeof e,b=e=>{if("object"!==i(e))return!1;const t=s(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},g=c("Date"),w=c("File"),E=c("Blob"),R=c("FileList"),O=c("URLSearchParams"),[S,T,v,A]=["ReadableStream","Request","Response","Headers"].map(c);function x(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),l(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let i;for(r=0;r<s;r++)i=o[r],t.call(null,e[i],i,e)}}function _(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,j=e=>!f(e)&&e!==C,N=(P="undefined"!=typeof Uint8Array&&s(Uint8Array),e=>P&&e instanceof P);var P;const L=c("HTMLFormElement"),U=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),F=c("RegExp"),B=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};x(n,((n,o)=>{let s;!1!==(s=t(n,o,e))&&(r[o]=s||n)})),Object.defineProperties(e,r)},k="abcdefghijklmnopqrstuvwxyz",D="0123456789",q={DIGIT:D,ALPHA:k,ALPHA_DIGIT:k+k.toUpperCase()+D},I=c("AsyncFunction"),M=(z="function"==typeof setImmediate,H=h(C.postMessage),z?setImmediate:H?(J=`axios@${Math.random()}`,W=[],C.addEventListener("message",(({source:e,data:t})=>{e===C&&t===J&&W.length&&W.shift()()}),!1),e=>{W.push(e),C.postMessage(J,"*")}):e=>setTimeout(e));var z,H,J,W;const K="undefined"!=typeof queueMicrotask?queueMicrotask.bind(C):"undefined"!=typeof process&&process.nextTick||M;var V={isArray:l,isArrayBuffer:d,isBuffer:function(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&h(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||h(e.append)&&("formdata"===(t=i(e))||"object"===t&&h(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&d(e.buffer),t},isString:p,isNumber:m,isBoolean:e=>!0===e||!1===e,isObject:y,isPlainObject:b,isReadableStream:S,isRequest:T,isResponse:v,isHeaders:A,isUndefined:f,isDate:g,isFile:w,isBlob:E,isRegExp:F,isFunction:h,isStream:e=>y(e)&&h(e.pipe),isURLSearchParams:O,isTypedArray:N,isFileList:R,forEach:x,merge:function e(){const{caseless:t}=j(this)&&this||{},n={},r=(r,o)=>{const s=t&&_(n,o)||o;b(n[s])&&b(r)?n[s]=e(n[s],r):b(r)?n[s]=e({},r):l(r)?n[s]=r.slice():n[s]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&x(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:o}={})=>(x(t,((t,o)=>{n&&h(t)?e[o]=r(t,n):e[o]=t}),{allOwnKeys:o}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const c={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&s(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:i,kindOfTest:c,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(l(e))return e;let t=e.length;if(!m(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:L,hasOwnProperty:U,hasOwnProp:U,reduceDescriptors:B,freezeMethods:e=>{B(e,((t,n)=>{if(h(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];h(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return l(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:_,global:C,isContextDefined:j,ALPHABET:q,generateString:(e=16,t=q.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&h(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(y(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=l(e)?[]:{};return x(e,((e,t)=>{const s=n(e,r+1);!f(s)&&(o[t]=s)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:I,isThenable:e=>e&&(y(e)||h(e))&&h(e.then)&&h(e.catch),setImmediate:M,asap:K};function $(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}V.inherits($,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:V.toJSONObject(this.config),code:this.code,status:this.status}}});const G=$.prototype,X={};function Q(e){return V.isPlainObject(e)||V.isArray(e)}function Z(e){return V.endsWith(e,"[]")?e.slice(0,-2):e}function Y(e,t,n){return e?e.concat(t).map((function(e,t){return e=Z(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{X[e]={value:e}})),Object.defineProperties($,X),Object.defineProperty(G,"isAxiosError",{value:!0}),$.from=(e,t,n,r,o,s)=>{const i=Object.create(G);return V.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),$.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const ee=V.toFlatObject(V,{},null,(function(e){return/^is[A-Z]/.test(e)}));function te(e,t,n){if(!V.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=V.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!V.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,s=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&V.isSpecCompliantForm(t);if(!V.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(V.isDate(e))return e.toISOString();if(!a&&V.isBlob(e))throw new $("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(e)||V.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(V.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(V.isArray(e)&&function(e){return V.isArray(e)&&!e.some(Q)}(e)||(V.isFileList(e)||V.endsWith(n,"[]"))&&(a=V.toArray(e)))return n=Z(n),a.forEach((function(e,r){!V.isUndefined(e)&&null!==e&&t.append(!0===i?Y([n],r,s):null===i?n:n+"[]",c(e))})),!1;return!!Q(e)||(t.append(Y(o,n,s),c(e)),!1)}const l=[],f=Object.assign(ee,{defaultVisitor:u,convertValue:c,isVisitable:Q});if(!V.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!V.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),V.forEach(n,(function(n,s){!0===(!(V.isUndefined(n)||null===n)&&o.call(t,n,V.isString(s)?s.trim():s,r,f))&&e(n,r?r.concat(s):[s])})),l.pop()}}(e),t}function ne(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function re(e,t){this._pairs=[],e&&te(e,this,t)}const oe=re.prototype;function se(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ie(e,t,n){if(!t)return e;const r=n&&n.encode||se;V.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(s=o?o(t,n):V.isURLSearchParams(t)?t.toString():new re(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}oe.append=function(e,t){this._pairs.push([e,t])},oe.toString=function(e){const t=e?function(t){return e.call(this,t,ne)}:ne;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var ae=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){V.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ce={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ue={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:re,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const le="undefined"!=typeof window&&"undefined"!=typeof document,fe="object"==typeof navigator&&navigator||void 0,de=le&&(!fe||["ReactNative","NativeScript","NS"].indexOf(fe.product)<0),pe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,he=le&&window.location.href||"http://localhost";var me={...Object.freeze({__proto__:null,hasBrowserEnv:le,hasStandardBrowserWebWorkerEnv:pe,hasStandardBrowserEnv:de,navigator:fe,origin:he}),...ue};function ye(e){function t(e,n,r,o){let s=e[o++];if("__proto__"===s)return!0;const i=Number.isFinite(+s),a=o>=e.length;return s=!s&&V.isArray(r)?r.length:s,a?(V.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!i):(r[s]&&V.isObject(r[s])||(r[s]=[]),t(e,n,r[s],o)&&V.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}(r[s])),!i)}if(V.isFormData(e)&&V.isFunction(e.entries)){const n={};return V.forEachEntry(e,((e,r)=>{t(function(e){return V.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const be={transitional:ce,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=V.isObject(e);if(o&&V.isHTMLForm(e)&&(e=new FormData(e)),V.isFormData(e))return r?JSON.stringify(ye(e)):e;if(V.isArrayBuffer(e)||V.isBuffer(e)||V.isStream(e)||V.isFile(e)||V.isBlob(e)||V.isReadableStream(e))return e;if(V.isArrayBufferView(e))return e.buffer;if(V.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return te(e,new me.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return me.isNode&&V.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=V.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return te(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e){if(V.isString(e))try{return(0,JSON.parse)(e),V.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||be.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(V.isResponse(e)||V.isReadableStream(e))return e;if(e&&V.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw $.from(e,$.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:me.classes.FormData,Blob:me.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch"],(e=>{be.headers[e]={}}));var ge=be;const we=V.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ee=Symbol("internals");function Re(e){return e&&String(e).trim().toLowerCase()}function Oe(e){return!1===e||null==e?e:V.isArray(e)?e.map(Oe):String(e)}function Se(e,t,n,r,o){return V.isFunction(r)?r.call(this,t,n):(o&&(t=n),V.isString(t)?V.isString(r)?-1!==t.indexOf(r):V.isRegExp(r)?r.test(t):void 0:void 0)}class Te{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Re(t);if(!o)throw new Error("header name must be a non-empty string");const s=V.findKey(r,o);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=Oe(e))}const s=(e,t)=>V.forEach(e,((e,n)=>o(e,n,t)));if(V.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(V.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&we[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(V.isHeaders(e))for(const[t,r]of e.entries())o(r,t,n);else null!=e&&o(t,e,n);return this}get(e,t){if(e=Re(e)){const n=V.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(V.isFunction(t))return t.call(this,e,n);if(V.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Re(e)){const n=V.findKey(this,e);return!(!n||void 0===this[n]||t&&!Se(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Re(e)){const o=V.findKey(n,e);!o||t&&!Se(0,n[o],o,t)||(delete n[o],r=!0)}}return V.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Se(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return V.forEach(this,((r,o)=>{const s=V.findKey(n,o);if(s)return t[s]=Oe(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();i!==o&&delete t[o],t[i]=Oe(r),n[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return V.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&V.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Ee]=this[Ee]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Re(e);t[r]||(function(e,t){const n=V.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return V.isArray(e)?e.forEach(r):r(e),this}}Te.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),V.reduceDescriptors(Te.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),V.freezeMethods(Te);var ve=Te;function Ae(e,t){const n=this||ge,r=t||n,o=ve.from(r.headers);let s=r.data;return V.forEach(e,(function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function xe(e){return!(!e||!e.__CANCEL__)}function _e(e,t,n){$.call(this,null==e?"canceled":e,$.ERR_CANCELED,t,n),this.name="CanceledError"}function Ce(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new $("Request failed with status code "+n.status,[$.ERR_BAD_REQUEST,$.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}V.inherits(_e,$,{__CANCEL__:!0});const je=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[i];o||(o=c),n[s]=a,r[s]=c;let l=i,f=0;for(;l!==s;)f+=n[l++],l%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-o<t)return;const d=u&&c-u;return d?Math.round(1e3*f/d):void 0}}(50,250);return function(e,t){let n,r,o=0,s=1e3/t;const i=(t,s=Date.now())=>{o=s,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=s?i(e,t):(n=e,r||(r=setTimeout((()=>{r=null,i(n)}),s-a)))},()=>n&&i(n)]}((n=>{const s=n.loaded,i=n.lengthComputable?n.total:void 0,a=s-r,c=o(a);r=s,e({loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&s<=i?(i-s)/c:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})}),n)},Ne=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Pe=e=>(...t)=>V.asap((()=>e(...t)));var Le=me.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,me.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(me.origin),me.navigator&&/(msie|trident)/i.test(me.navigator.userAgent)):()=>!0,Ue=me.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];V.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),V.isString(r)&&i.push("path="+r),V.isString(o)&&i.push("domain="+o),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Fe(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Be=e=>e instanceof ve?{...e}:e;function ke(e,t){t=t||{};const n={};function r(e,t,n,r){return V.isPlainObject(e)&&V.isPlainObject(t)?V.merge.call({caseless:r},e,t):V.isPlainObject(t)?V.merge({},t):V.isArray(t)?t.slice():t}function o(e,t,n,o){return V.isUndefined(t)?V.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function s(e,t){if(!V.isUndefined(t))return r(void 0,t)}function i(e,t){return V.isUndefined(t)?V.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,s){return s in t?r(n,o):s in e?r(void 0,n):void 0}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t,n)=>o(Be(e),Be(t),0,!0)};return V.forEach(Object.keys(Object.assign({},e,t)),(function(r){const s=c[r]||o,i=s(e[r],t[r],r);V.isUndefined(i)&&s!==a||(n[r]=i)})),n}var De=e=>{const t=ke({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:c}=t;if(t.headers=a=ve.from(a),t.url=ie(Fe(t.baseURL,t.url),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),V.isFormData(r))if(me.hasStandardBrowserEnv||me.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(me.hasStandardBrowserEnv&&(o&&V.isFunction(o)&&(o=o(t)),o||!1!==o&&Le(t.url))){const e=s&&i&&Ue.read(i);e&&a.set(s,e)}return t},qe="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=De(e);let o=r.data;const s=ve.from(r.headers).normalize();let i,a,c,u,l,{responseType:f,onUploadProgress:d,onDownloadProgress:p}=r;function h(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;function y(){if(!m)return;const r=ve.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Ce((function(e){t(e),h()}),(function(e){n(e),h()}),{data:f&&"text"!==f&&"json"!==f?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=y:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(y)},m.onabort=function(){m&&(n(new $("Request aborted",$.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new $("Network Error",$.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||ce;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new $(t,o.clarifyTimeoutError?$.ETIMEDOUT:$.ECONNABORTED,e,m)),m=null},void 0===o&&s.setContentType(null),"setRequestHeader"in m&&V.forEach(s.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),V.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),f&&"json"!==f&&(m.responseType=r.responseType),p&&([c,l]=je(p,!0),m.addEventListener("progress",c)),d&&m.upload&&([a,u]=je(d),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(i=t=>{m&&(n(!t||t.type?new _e(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);b&&-1===me.protocols.indexOf(b)?n(new $("Unsupported protocol "+b+":",$.ERR_BAD_REQUEST,e)):m.send(o||null)}))},Ie=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;r.abort(t instanceof $?t:new _e(t instanceof Error?t.message:t))}};let s=t&&setTimeout((()=>{s=null,o(new $(`timeout ${t} of ms exceeded`,$.ETIMEDOUT))}),t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:a}=r;return a.unsubscribe=()=>V.asap(i),a}};const Me=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},ze=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*Me(n,t)}(e,t);let s,i=0,a=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return a(),void e.close();let s=r.byteLength;if(n){let e=i+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},He="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Je=He&&"function"==typeof ReadableStream,We=He&&("function"==typeof TextEncoder?(Ke=new TextEncoder,e=>Ke.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Ke;const Ve=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},$e=Je&&Ve((()=>{let e=!1;const t=new Request(me.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Ge=Je&&Ve((()=>V.isReadableStream(new Response("").body))),Xe={stream:Ge&&(e=>e.body)};var Qe;He&&(Qe=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Xe[e]&&(Xe[e]=V.isFunction(Qe[e])?t=>t[e]():(t,n)=>{throw new $(`Response type '${e}' is not supported`,$.ERR_NOT_SUPPORT,n)})})));const Ze={http:null,xhr:qe,fetch:He&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:l,withCredentials:f="same-origin",fetchOptions:d}=De(e);u=u?(u+"").toLowerCase():"text";let p,h=Ie([o,s&&s.toAbortSignal()],i);const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let y;try{if(c&&$e&&"get"!==n&&"head"!==n&&0!==(y=await(async(e,t)=>{const n=V.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(V.isBlob(e))return e.size;if(V.isSpecCompliantForm(e)){const t=new Request(me.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return V.isArrayBufferView(e)||V.isArrayBuffer(e)?e.byteLength:(V.isURLSearchParams(e)&&(e+=""),V.isString(e)?(await We(e)).byteLength:void 0)})(t):n})(l,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(V.isFormData(r)&&(e=n.headers.get("content-type"))&&l.setContentType(e),n.body){const[e,t]=Ne(y,je(Pe(c)));r=ze(n.body,65536,e,t)}}V.isString(f)||(f=f?"include":"omit");const o="credentials"in Request.prototype;p=new Request(t,{...d,signal:h,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:o?f:void 0});let s=await fetch(p);const i=Ge&&("stream"===u||"response"===u);if(Ge&&(a||i&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=s[t]}));const t=V.toFiniteNumber(s.headers.get("content-length")),[n,r]=a&&Ne(t,je(Pe(a),!0))||[];s=new Response(ze(s.body,65536,n,(()=>{r&&r(),m&&m()})),e)}u=u||"text";let b=await Xe[V.findKey(Xe,u)||"text"](s,e);return!i&&m&&m(),await new Promise(((t,n)=>{Ce(t,n,{data:b,headers:ve.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:p})}))}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new $("Network Error",$.ERR_NETWORK,e,p),{cause:t.cause||t});throw $.from(t,t&&t.code,e,p)}})};V.forEach(Ze,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ye=e=>`- ${e}`,et=e=>V.isFunction(e)||null===e||!1===e;var tt=e=>{e=V.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){let t;if(n=e[s],r=n,!et(n)&&(r=Ze[(t=String(n)).toLowerCase()],void 0===r))throw new $(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+s]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new $("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Ye).join("\n"):" "+Ye(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function nt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new _e(null,e)}function rt(e){return nt(e),e.headers=ve.from(e.headers),e.data=Ae.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tt(e.adapter||ge.adapter)(e).then((function(t){return nt(e),t.data=Ae.call(e,e.transformResponse,t),t.headers=ve.from(t.headers),t}),(function(t){return xe(t)||(nt(e),t&&t.response&&(t.response.data=Ae.call(e,e.transformResponse,t.response),t.response.headers=ve.from(t.response.headers))),Promise.reject(t)}))}const ot={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{ot[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const st={};ot.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.9] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,s)=>{if(!1===e)throw new $(r(o," has been removed"+(t?" in "+t:"")),$.ERR_DEPRECATED);return t&&!st[o]&&(st[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}},ot.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var it={assertOptions:function(e,t,n){if("object"!=typeof e)throw new $("options must be an object",$.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=t[s];if(i){const t=e[s],n=void 0===t||i(t,s,e);if(!0!==n)throw new $("option "+s+" must be "+n,$.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new $("Unknown option "+s,$.ERR_BAD_OPTION)}},validators:ot};const at=it.validators;class ct{constructor(e){this.defaults=e,this.interceptors={request:new ae,response:new ae}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ke(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&it.assertOptions(n,{silentJSONParsing:at.transitional(at.boolean),forcedJSONParsing:at.transitional(at.boolean),clarifyTimeoutError:at.transitional(at.boolean)},!1),null!=r&&(V.isFunction(r)?t.paramsSerializer={serialize:r}:it.assertOptions(r,{encode:at.function,serialize:at.function},!0)),it.assertOptions(t,{baseUrl:at.spelling("baseURL"),withXsrfToken:at.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&V.merge(o.common,o[t.method]);o&&V.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=ve.concat(s,o);const i=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,f=0;if(!a){const e=[rt.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);f<l;)u=u.then(e[f++],e[f++]);return u}l=i.length;let d=t;for(f=0;f<l;){const e=i[f++],t=i[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=rt.call(this,d)}catch(e){return Promise.reject(e)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(e){return ie(Fe((e=ke(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}V.forEach(["delete","get","head","options"],(function(e){ct.prototype[e]=function(t,n){return this.request(ke(n||{},{method:e,url:t,data:(n||{}).data}))}})),V.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(ke(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}ct.prototype[e]=t(),ct.prototype[e+"Form"]=t(!0)}));var ut=ct;class lt{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new _e(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new lt((function(t){e=t})),cancel:e}}}var ft=lt;const dt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(dt).forEach((([e,t])=>{dt[t]=e}));var pt=dt;const ht=function e(t){const n=new ut(t),o=r(ut.prototype.request,n);return V.extend(o,ut.prototype,n,{allOwnKeys:!0}),V.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return e(ke(t,n))},o}(ge);ht.Axios=ut,ht.CanceledError=_e,ht.CancelToken=ft,ht.isCancel=xe,ht.VERSION="1.7.9",ht.toFormData=te,ht.AxiosError=$,ht.Cancel=ht.CanceledError,ht.all=function(e){return Promise.all(e)},ht.spread=function(e){return function(t){return e.apply(null,t)}},ht.isAxiosError=function(e){return V.isObject(e)&&!0===e.isAxiosError},ht.mergeConfig=ke,ht.AxiosHeaders=ve,ht.formToJSON=e=>ye(V.isHTMLForm(e)?new FormData(e):e),ht.getAdapter=tt,ht.HttpStatusCode=pt,ht.default=ht,e.exports=ht}};
|
package/dist/473.cjs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_xoxno_sdk_js=self.webpackChunk_xoxno_sdk_js||[]).push([[473],{6424:(i,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LibraryConfig=void 0;class s{}t.LibraryConfig=s,s.DefaultAddressHrp="erd"},3473:(i,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionsFactoryConfig=void 0;const a=s(6424);t.TransactionsFactoryConfig=class{constructor(i){this.chainID=i.chainID,this.addressHrp=a.LibraryConfig.DefaultAddressHrp,this.minGasLimit=50000n,this.gasLimitPerByte=1500n,this.gasLimitIssue=60000000n,this.gasLimitToggleBurnRoleGlobally=60000000n,this.gasLimitEsdtLocalMint=300000n,this.gasLimitEsdtLocalBurn=300000n,this.gasLimitSetSpecialRole=60000000n,this.gasLimitPausing=60000000n,this.gasLimitFreezing=60000000n,this.gasLimitWiping=60000000n,this.gasLimitEsdtNftCreate=3000000n,this.gasLimitEsdtNftUpdateAttributes=1000000n,this.gasLimitEsdtNftAddQuantity=1000000n,this.gasLimitEsdtNftBurn=1000000n,this.gasLimitStorePerByte=10000n,this.issueCost=50000000000000000n,this.gasLimitEsdtModifyRoyalties=60000000n,this.gasLimitEsdtModifyCreator=60000000n,this.gasLimitEsdtMetadataUpdate=60000000n,this.gasLimitSetNewUris=60000000n,this.gasLimitNftMetadataRecreate=60000000n,this.gasLimitNftChangeToDynamic=60000000n,this.gasLimitUpdateTokenId=60000000n,this.gasLimitRegisterDynamic=60000000n,this.gasLimitStake=5000000n,this.gasLimitUnstake=5000000n,this.gasLimitUnbond=5000000n,this.gasLimitCreateDelegationContract=50000000n,this.gasLimitDelegationOperations=1000000n,this.additionalGasLimitPerValidatorNode=6000000n,this.additionalGasLimitForDelegationOperations=10000000n,this.gasLimitSaveKeyValue=100000n,this.gasLimitPersistPerByte=1000n,this.gasLimitSetGuardian=250000n,this.gasLimitGuardAccount=250000n,this.gasLimitUnguardAccount=250000n,this.gasLimitESDTTransfer=200000n,this.gasLimitESDTNFTTransfer=200000n,this.gasLimitMultiESDTNFTTransfer=200000n,this.gasLimitClaimDeveloperRewards=6000000n,this.gasLimitChangeOwnerAddress=6000000n}}}}]);
|
package/dist/473.esm.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const __webpack_id__=473;export const __webpack_ids__=[473];export const __webpack_modules__={6424:(i,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LibraryConfig=void 0;class s{}t.LibraryConfig=s,s.DefaultAddressHrp="erd"},3473:(i,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionsFactoryConfig=void 0;const a=s(6424);t.TransactionsFactoryConfig=class{constructor(i){this.chainID=i.chainID,this.addressHrp=a.LibraryConfig.DefaultAddressHrp,this.minGasLimit=50000n,this.gasLimitPerByte=1500n,this.gasLimitIssue=60000000n,this.gasLimitToggleBurnRoleGlobally=60000000n,this.gasLimitEsdtLocalMint=300000n,this.gasLimitEsdtLocalBurn=300000n,this.gasLimitSetSpecialRole=60000000n,this.gasLimitPausing=60000000n,this.gasLimitFreezing=60000000n,this.gasLimitWiping=60000000n,this.gasLimitEsdtNftCreate=3000000n,this.gasLimitEsdtNftUpdateAttributes=1000000n,this.gasLimitEsdtNftAddQuantity=1000000n,this.gasLimitEsdtNftBurn=1000000n,this.gasLimitStorePerByte=10000n,this.issueCost=50000000000000000n,this.gasLimitEsdtModifyRoyalties=60000000n,this.gasLimitEsdtModifyCreator=60000000n,this.gasLimitEsdtMetadataUpdate=60000000n,this.gasLimitSetNewUris=60000000n,this.gasLimitNftMetadataRecreate=60000000n,this.gasLimitNftChangeToDynamic=60000000n,this.gasLimitUpdateTokenId=60000000n,this.gasLimitRegisterDynamic=60000000n,this.gasLimitStake=5000000n,this.gasLimitUnstake=5000000n,this.gasLimitUnbond=5000000n,this.gasLimitCreateDelegationContract=50000000n,this.gasLimitDelegationOperations=1000000n,this.additionalGasLimitPerValidatorNode=6000000n,this.additionalGasLimitForDelegationOperations=10000000n,this.gasLimitSaveKeyValue=100000n,this.gasLimitPersistPerByte=1000n,this.gasLimitSetGuardian=250000n,this.gasLimitGuardAccount=250000n,this.gasLimitUnguardAccount=250000n,this.gasLimitESDTTransfer=200000n,this.gasLimitESDTNFTTransfer=200000n,this.gasLimitMultiESDTNFTTransfer=200000n,this.gasLimitClaimDeveloperRewards=6000000n,this.gasLimitChangeOwnerAddress=6000000n}}}};
|
package/dist/528.cjs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_xoxno_sdk_js=self.webpackChunk_xoxno_sdk_js||[]).push([[528],{6458:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.LogLevel=void 0,function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warn=3]="Warn",e[e.Error=4]="Error",e[e.None=5]="None"}(n=t.LogLevel||(t.LogLevel={}));class r{static setLevel(e){r.logLevel=e}static trace(e,...t){r.logLevel>=n.Debug||console.debug(e,t)}static debug(e,...t){r.logLevel>=n.Debug||console.debug(e,t)}static info(e,...t){r.logLevel>=n.Info||console.log(e,t)}static warn(e,...t){r.logLevel>=n.Warn||console.warn(e,t)}static error(e,...t){r.logLevel>=n.Error||console.error(e,t)}}t.Logger=r,r.logLevel=n.Debug},1157:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArgSerializer=void 0;const r=n(7353),o=n(9272),i=n(2747),s=n(1055),a=n(7472),d=n(6054),c={codec:new o.BinaryCodec};t.ArgSerializer=class{constructor(e){e={...c,...e},this.codec=e.codec}stringToValues(e,t){let n=this.stringToBuffers(e);return this.buffersToValues(n,t)}stringToBuffers(e){return e.split(r.ARGUMENTS_SEPARATOR).map((e=>Buffer.from(e,"hex")))}buffersToValues(e,t){const n=this;let r=[],o=0,c=(e=e||[]).length;for(let e=0;e<t.length;e++){let n=l(t[e].type);r.push(n)}function l(t){if(t.hasExactClass(s.OptionalType.ClassName)){const e=l(t.getFirstTypeParameter());return new s.OptionalValue(t,e)}if(t.hasExactClass(d.VariadicType.ClassName))return function(e){const t=e,n=[];if(t.isCounted){const t=l(new i.U32Type).valueOf().toNumber();for(let r=0;r<t;r++)n.push(l(e.getFirstTypeParameter()))}else for(;!u();)n.push(l(e.getFirstTypeParameter()));return new d.VariadicValue(t,n)}(t);if(t.hasExactClass(a.CompositeType.ClassName)){const e=[];for(const n of t.getTypeParameters())e.push(l(n));return new a.CompositeValue(t,e)}const r=function(t){if(u())return null;let r=e[o++];return n.codec.decodeTopLevel(r,t)}(t);return r}function u(){return o>=c}return r}valuesToString(e){let t=this.valuesToStrings(e);return{argumentsString:t.join(r.ARGUMENTS_SEPARATOR),count:t.length}}valuesToStrings(e){return this.valuesToBuffers(e).map((e=>e.toString("hex")))}valuesToBuffers(e){const t=this,n=[];for(const t of e)r(t);function r(e){if(e.hasExactClass(s.OptionalValue.ClassName)){const t=e;return void(t.isSet()&&r(t.getTypedValue()))}if(e.hasExactClass(d.VariadicValue.ClassName))return void function(e){if(e.getType().isCounted){const r=new i.U32Value(e.getItems().length);n.push(t.codec.encodeTopLevel(r))}for(const t of e.getItems())r(t)}(e);if(e.hasExactClass(a.CompositeValue.ClassName)){const t=e;for(const e of t.getItems())r(e);return}const o=t.codec.encodeTopLevel(e);n.push(o)}return n}}},5225:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CodeMetadata=t.CodeMetadataLength=void 0,t.CodeMetadataLength=2;class n{constructor(e=!0,t=!1,n=!1,r=!1){this.upgradeable=e,this.readable=t,this.payable=n,this.payableBySc=r}static fromBytes(e){return n.fromBuffer(Buffer.from(e))}static fromBuffer(e){if(e.length!=t.CodeMetadataLength)throw new Error(`code metadata buffer has length ${e.length}, expected ${t.CodeMetadataLength}`);const r=e[0],o=e[1],i=!!(r&n.ByteZero.Upgradeable),s=!!(r&n.ByteZero.Readable),a=!!(o&n.ByteOne.Payable),d=!!(o&n.ByteOne.PayableBySc);return new n(i,s,a,d)}toggleUpgradeable(e){this.upgradeable=e}toggleReadable(e){this.readable=e}togglePayable(e){this.payable=e}togglePayableBySc(e){this.payableBySc=e}toBuffer(){let e=0,t=0;return this.upgradeable&&(e|=n.ByteZero.Upgradeable),this.readable&&(e|=n.ByteZero.Readable),this.payable&&(t|=n.ByteOne.Payable),this.payableBySc&&(t|=n.ByteOne.PayableBySc),Buffer.from([e,t])}toString(){return this.toBuffer().toString("hex")}toJSON(){return{upgradeable:this.upgradeable,readable:this.readable,payable:this.payable,payableBySc:this.payableBySc}}equals(e){return this.upgradeable==e.upgradeable&&this.readable==e.readable&&this.payable==e.payable&&this.payableBySc==e.payableBySc}}t.CodeMetadata=n,n.ByteZero={Upgradeable:1,Reserved2:2,Readable:4},n.ByteOne={Reserved1:1,Payable:2,PayableBySc:4}},7648:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AddressBinaryCodec=void 0;const r=n(236),o=n(2747);t.AddressBinaryCodec=class{decodeNested(e){let t=e.slice(0,32),n=new r.Address(t);return[new o.AddressValue(n),32]}decodeTopLevel(e){let[t,n]=this.decodeNested(e);return t}encodeNested(e){return e.valueOf().pubkey()}encodeTopLevel(e){return e.valueOf().pubkey()}}},2739:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayVecBinaryCodec=void 0;const r=n(2747);t.ArrayVecBinaryCodec=class{constructor(e){this.binaryCodec=e}decodeNested(e,t){let n=t.length,o=t.getFirstTypeParameter(),i=[],s=0;for(let t=0;t<n;t++){let[t,n]=this.binaryCodec.decodeNested(e,o);i.push(t),s+=n,e=e.slice(n)}return[new r.ArrayVec(t,i),s]}decodeTopLevel(e,t){let[n,r]=this.decodeNested(e,t);return n}encodeNested(e){let t=[];for(const n of e.getItems()){let e=this.binaryCodec.encodeNested(n);t.push(e)}return Buffer.concat(t)}encodeTopLevel(e){return this.encodeNested(e)}}},675:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=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 n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BinaryCodecConstraints=t.BinaryCodec=void 0;const s=i(n(2581)),a=n(1069),d=n(2747),c=n(2739),l=n(6855),u=n(1698),f=n(82),h=n(4998),g=n(8118),p=n(9603),C=n(8673),v=n(3551),y=n(8954);t.BinaryCodec=class{constructor(e=null){this.constraints=e||new m,this.optionCodec=new p.OptionValueBinaryCodec(this),this.listCodec=new f.ListBinaryCodec(this),this.arrayCodec=new c.ArrayVecBinaryCodec(this),this.primitiveCodec=new C.PrimitiveBinaryCodec(this),this.structCodec=new v.StructBinaryCodec(this),this.tupleCodec=new y.TupleBinaryCodec(this),this.enumCodec=new l.EnumBinaryCodec(this),this.explicitEnumCodec=new u.ExplicitEnumBinaryCodec,this.managedDecimalCodec=new h.ManagedDecimalCodec(this),this.managedDecimalSignedCodec=new g.ManagedDecimalSignedCodec(this)}decodeTopLevel(e,t){return this.constraints.checkBufferLength(e),d.onTypeSelect(t,{onOption:()=>this.optionCodec.decodeTopLevel(e,t.getFirstTypeParameter()),onList:()=>this.listCodec.decodeTopLevel(e,t),onArray:()=>this.arrayCodec.decodeTopLevel(e,t),onPrimitive:()=>this.primitiveCodec.decodeTopLevel(e,t),onStruct:()=>this.structCodec.decodeTopLevel(e,t),onTuple:()=>this.tupleCodec.decodeTopLevel(e,t),onEnum:()=>this.enumCodec.decodeTopLevel(e,t),onExplicitEnum:()=>this.explicitEnumCodec.decodeTopLevel(e,t),onManagedDecimal:()=>this.managedDecimalCodec.decodeTopLevel(e,t),onManagedDecimalSigned:()=>this.managedDecimalSignedCodec.decodeTopLevel(e,t)})}decodeNested(e,t){this.constraints.checkBufferLength(e);let[n,r]=d.onTypeSelect(t,{onOption:()=>this.optionCodec.decodeNested(e,t.getFirstTypeParameter()),onList:()=>this.listCodec.decodeNested(e,t),onArray:()=>this.arrayCodec.decodeNested(e,t),onPrimitive:()=>this.primitiveCodec.decodeNested(e,t),onStruct:()=>this.structCodec.decodeNested(e,t),onTuple:()=>this.tupleCodec.decodeNested(e,t),onEnum:()=>this.enumCodec.decodeNested(e,t),onExplicitEnum:()=>this.explicitEnumCodec.decodeNested(e,t),onManagedDecimal:()=>this.managedDecimalCodec.decodeNested(e,t),onManagedDecimalSigned:()=>this.managedDecimalSignedCodec.decodeNested(e,t)});return[n,r]}encodeNested(e){return a.guardTrue(e.getType().getCardinality().isSingular(),"singular cardinality, thus encodable type"),d.onTypedValueSelect(e,{onPrimitive:()=>this.primitiveCodec.encodeNested(e),onOption:()=>this.optionCodec.encodeNested(e),onList:()=>this.listCodec.encodeNested(e),onArray:()=>this.arrayCodec.encodeNested(e),onStruct:()=>this.structCodec.encodeNested(e),onTuple:()=>this.tupleCodec.encodeNested(e),onEnum:()=>this.enumCodec.encodeNested(e),onExplicitEnum:()=>this.explicitEnumCodec.encodeNested(e),onManagedDecimal:()=>this.managedDecimalCodec.encodeNested(e),onManagedDecimalSigned:()=>this.managedDecimalSignedCodec.encodeNested(e)})}encodeTopLevel(e){return a.guardTrue(e.getType().getCardinality().isSingular(),"singular cardinality, thus encodable type"),d.onTypedValueSelect(e,{onPrimitive:()=>this.primitiveCodec.encodeTopLevel(e),onOption:()=>this.optionCodec.encodeTopLevel(e),onList:()=>this.listCodec.encodeTopLevel(e),onArray:()=>this.arrayCodec.encodeTopLevel(e),onStruct:()=>this.structCodec.encodeTopLevel(e),onTuple:()=>this.tupleCodec.encodeTopLevel(e),onEnum:()=>this.enumCodec.encodeTopLevel(e),onExplicitEnum:()=>this.explicitEnumCodec.encodeTopLevel(e),onManagedDecimal:()=>this.managedDecimalCodec.encodeTopLevel(e),onManagedDecimalSigned:()=>this.managedDecimalSignedCodec.encodeTopLevel(e)})}};class m{constructor(e){this.maxBufferLength=e?.maxBufferLength||256e3,this.maxListLength=e?.maxListLength||128e3}checkBufferLength(e){if(e.length>this.maxBufferLength)throw new s.ErrCodec(`Buffer too large: ${e.length} > ${this.maxBufferLength}`)}checkListLength(e){if(e>this.maxListLength)throw new s.ErrCodec(`List too large: ${e} > ${this.maxListLength}`)}}t.BinaryCodecConstraints=m},3232:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBigNumber=t.decodeString=t.decodeBool=t.decodeUnsignedNumber=void 0;const o=r(n(1594)),i=n(2747),s=new(n(675).BinaryCodec);t.decodeUnsignedNumber=function(e){let t=s.decodeTopLevel(e,new i.BigUIntType);return Number(t.valueOf())},t.decodeBool=function(e){let t=s.decodeTopLevel(e,new i.BooleanType);return Boolean(t.valueOf())},t.decodeString=function(e){let t=s.decodeTopLevel(e,new i.BytesType);return String(t.valueOf())},t.decodeBigNumber=function(e){let t=s.decodeTopLevel(e,new i.BigUIntType);return new o.default(t.valueOf())}},7380:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=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 n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanBinaryCodec=void 0;const s=i(n(2581)),a=n(2747);class d{decodeNested(e){let t=e.readUInt8(0);return[new a.BooleanValue(t==d.TRUE),1]}decodeTopLevel(e){if(e.length>1)throw new s.ErrInvalidArgument("buffer should be of size <= 1");let t=e[0];return new a.BooleanValue(t==d.TRUE)}encodeNested(e){return e.isTrue()?Buffer.from([d.TRUE]):Buffer.from([d.FALSE])}encodeTopLevel(e){return e.isTrue()?Buffer.from([d.TRUE]):Buffer.from([])}}t.BooleanBinaryCodec=d,d.TRUE=1,d.FALSE=0},8843:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BytesBinaryCodec=void 0;const r=n(1392),o=n(2461);t.BytesBinaryCodec=class{decodeNested(e){let t=e.readUInt32BE(0),n=e.slice(o.SizeOfU32,o.SizeOfU32+t);return[new r.BytesValue(n),o.SizeOfU32+t]}decodeTopLevel(e){return new r.BytesValue(e)}encodeNested(e){let t=Buffer.alloc(o.SizeOfU32);return t.writeUInt32BE(e.getLength()),Buffer.concat([t,e.valueOf()])}encodeTopLevel(e){return e.valueOf()}}},4434:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CodeMetadataCodec=void 0;const r=n(5225),o=n(1847);t.CodeMetadataCodec=class{decodeNested(e){const t=r.CodeMetadata.fromBuffer(e.slice(0,r.CodeMetadataLength));return[new o.CodeMetadataValue(t),r.CodeMetadataLength]}decodeTopLevel(e){const t=r.CodeMetadata.fromBuffer(e);return new o.CodeMetadataValue(t)}encodeNested(e){return e.valueOf().toBuffer()}encodeTopLevel(e){return e.valueOf().toBuffer()}}},2461:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SizeOfU32=void 0,t.SizeOfU32=4},6855:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EnumBinaryCodec=void 0;const r=n(2747),o=n(9995);t.EnumBinaryCodec=class{constructor(e){this.binaryCodec=e,this.fieldsCodec=new o.FieldsBinaryCodec(e)}decodeTopLevel(e,t){let[n]=this.decodeNested(e,t);return n}decodeNested(e,t){let[n,o]=this.readDiscriminant(e);e=e.slice(o);let i=t.getVariantByDiscriminant(n),s=i.getFieldsDefinitions(),[a,d]=this.fieldsCodec.decodeNested(e,s);return[new r.EnumValue(t,i,a),o+d]}readDiscriminant(e){let[t,n]=this.binaryCodec.decodeNested(e,new r.U8Type);return[t.valueOf(),n]}encodeNested(e){let t=new r.U8Value(e.discriminant),n=this.binaryCodec.encodeNested(t),o=e.getFields(),i=this.fieldsCodec.encodeNested(o);return Buffer.concat([n,i])}encodeTopLevel(e){let t=e.getFields(),n=t.length>0,o=this.fieldsCodec.encodeNested(t),i=new r.U8Value(e.discriminant),s=n?this.binaryCodec.encodeNested(i):this.binaryCodec.encodeTopLevel(i);return Buffer.concat([s,o])}}},1698:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExplicitEnumBinaryCodec=void 0;const r=n(2747),o=n(9229),i=n(1367);t.ExplicitEnumBinaryCodec=class{constructor(){this.stringCodec=new i.StringBinaryCodec}decodeTopLevel(e,t){const n=this.stringCodec.decodeTopLevel(e);return new o.ExplicitEnumValue(t,new o.ExplicitEnumVariantDefinition(n.valueOf()))}decodeNested(e,t){const[n,r]=this.stringCodec.decodeNested(e);return[new o.ExplicitEnumValue(t,new o.ExplicitEnumVariantDefinition(n.valueOf())),r]}encodeNested(e){return this.stringCodec.encodeNested(new r.StringValue(e.valueOf().name))}encodeTopLevel(e){return this.stringCodec.encodeTopLevel(new r.StringValue(e.valueOf().name))}}},9995:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FieldsBinaryCodec=void 0;const r=n(2747);t.FieldsBinaryCodec=class{constructor(e){this.binaryCodec=e}decodeNested(e,t){let n=[],o=0;for(const i of t){let[t,s]=this.binaryCodec.decodeNested(e,i.type);e=e.slice(s),o+=s;let a=new r.Field(t,i.name);n.push(a)}return[n,o]}encodeNested(e){let t=[];for(const n of e){let e=this.binaryCodec.encodeNested(n.value);t.push(e)}return Buffer.concat(t)}}},8831:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.H256BinaryCodec=void 0;const r=n(1038);t.H256BinaryCodec=class{decodeNested(e){let t=e.slice(0,32);return[new r.H256Value(t),32]}decodeTopLevel(e){let[t,n]=this.decodeNested(e);return t}encodeNested(e){return e.valueOf()}encodeTopLevel(e){return e.valueOf()}}},9272:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(675),t),o(n(3232),t)},82:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ListBinaryCodec=void 0;const r=n(2747),o=n(2461);t.ListBinaryCodec=class{constructor(e){this.binaryCodec=e}decodeNested(e,t){let n=t.getFirstTypeParameter(),i=[],s=e.readUInt32BE(0);this.binaryCodec.constraints.checkListLength(s);let a=e,d=o.SizeOfU32;e=a.slice(d);for(let t=0;t<s;t++){let[t,r]=this.binaryCodec.decodeNested(e,n);i.push(t),d+=r,e=a.slice(d)}return[new r.List(t,i),d]}decodeTopLevel(e,t){let n=t.getFirstTypeParameter(),o=[],i=e,s=0;for(;e.length>0;){let[t,r]=this.binaryCodec.decodeNested(e,n);o.push(t),s+=r,e=i.slice(s),this.binaryCodec.constraints.checkListLength(o.length)}return new r.List(t,o)}encodeNested(e){this.binaryCodec.constraints.checkListLength(e.getLength());let t=Buffer.alloc(o.SizeOfU32);t.writeUInt32BE(e.getLength());let n=[];for(const t of e.getItems()){let e=this.binaryCodec.encodeNested(t);n.push(e)}return Buffer.concat([t,...n])}encodeTopLevel(e){this.binaryCodec.constraints.checkListLength(e.getLength());let t=[];for(const n of e.getItems()){let e=this.binaryCodec.encodeNested(n);t.push(e)}return Buffer.concat(t)}}},4998:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ManagedDecimalCodec=void 0;const o=r(n(1594)),i=n(2747),s=n(7553),a=n(2461);t.ManagedDecimalCodec=class{constructor(e){this.binaryCodec=e}decodeNested(e,t){const n=e.readUInt32BE(0),r=e.slice(0,n);return[this.decodeTopLevel(r,t),n]}decodeTopLevel(e,t){if(0===e.length)return new i.ManagedDecimalValue(new o.default(0),0);if(t.isVariable()){const t=e.length-a.SizeOfU32,[n]=this.binaryCodec.decodeNested(e.slice(0,t),new i.BigUIntType),r=e.readUInt32BE(t);return new i.ManagedDecimalValue(n.valueOf().shiftedBy(-r),r)}const n=s.bufferToBigInt(e),r=t.getMetadata(),d="usize"!==r?parseInt(r.toString()):0;return new i.ManagedDecimalValue(n.shiftedBy(-d),d)}encodeNested(e){let t=[];const n=new i.BigUIntValue(e.valueOf().shiftedBy(e.getScale()));return e.isVariable()?(t.push(Buffer.from(this.binaryCodec.encodeNested(n))),t.push(Buffer.from(this.binaryCodec.encodeNested(new i.U32Value(e.getScale()))))):t.push(this.binaryCodec.encodeTopLevel(n)),Buffer.concat(t)}encodeTopLevel(e){return this.encodeNested(e)}}},8118:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ManagedDecimalSignedCodec=void 0;const o=r(n(1594)),i=n(2747),s=n(7553),a=n(2461);t.ManagedDecimalSignedCodec=class{constructor(e){this.binaryCodec=e}decodeNested(e,t){const n=e.readUInt32BE(0),r=e.slice(0,n);return[this.decodeTopLevel(r,t),n]}decodeTopLevel(e,t){if(0===e.length)return new i.ManagedDecimalSignedValue(new o.default(0),0);if(t.isVariable()){const t=e.length-a.SizeOfU32,[n]=this.binaryCodec.decodeNested(e.slice(0,t),new i.BigIntType),r=e.readUInt32BE(t);return new i.ManagedDecimalSignedValue(n.valueOf().shiftedBy(-r),r)}const n=s.bufferToBigInt(e),r=t.getMetadata(),d="usize"!==r?parseInt(r.toString()):0;return new i.ManagedDecimalSignedValue(n.shiftedBy(-d),d)}encodeNested(e){let t=[];const n=new i.BigIntValue(e.valueOf().shiftedBy(e.getScale()));return e.isVariable()?(t.push(Buffer.from(this.binaryCodec.encodeNested(n))),t.push(Buffer.from(this.binaryCodec.encodeNested(new i.U32Value(e.getScale()))))):t.push(Buffer.from(this.binaryCodec.encodeTopLevel(n))),Buffer.concat(t)}encodeTopLevel(e){return this.encodeNested(e)}}},3157:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NothingCodec=void 0;const r=n(2747);t.NothingCodec=class{decodeNested(){return[new r.NothingValue,0]}decodeTopLevel(){return new r.NothingValue}encodeNested(){return Buffer.from([])}encodeTopLevel(){return Buffer.from([])}}},62:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NumericalBinaryCodec=void 0;const o=r(n(1594)),i=n(2747),s=n(2461),a=n(7553);t.NumericalBinaryCodec=class{decodeNested(e,t){let n=0,r=t.sizeInBytes;r||(n=s.SizeOfU32,r=e.readUInt32BE(0));let o=e.slice(n,n+r);return[this.decodeTopLevel(o,t),r+n]}decodeTopLevel(e,t){let n=a.cloneBuffer(e);if(0==e.length)return new i.NumericalValue(t,new o.default(0));if(!t.withSign||a.isMsbZero(n)){let e=a.bufferToBigInt(n);return new i.NumericalValue(t,e)}a.flipBufferBitsInPlace(n);let r=a.bufferToBigInt(n).multipliedBy(new o.default(-1)).minus(new o.default(1));return new i.NumericalValue(t,r)}encodeNested(e){if(e.sizeInBytes)return this.encodeNestedFixedSize(e,e.sizeInBytes);let t=this.encodeTopLevel(e),n=Buffer.alloc(s.SizeOfU32);return n.writeUInt32BE(t.length),Buffer.concat([n,t])}encodeNestedFixedSize(e,t){if(e.value.isZero())return Buffer.alloc(t,0);if(!e.withSign){const n=a.bigIntToBuffer(e.value),r=Buffer.alloc(t-n.length,0);return Buffer.concat([r,n])}if(e.value.isPositive()){let n=a.bigIntToBuffer(e.value);a.isMsbOne(n)&&(n=a.prependByteToBuffer(n,0));const r=Buffer.alloc(t-n.length,0);return Buffer.concat([r,n])}let n=e.value.plus(new o.default(1)),r=a.bigIntToBuffer(n);a.flipBufferBitsInPlace(r),a.isMsbZero(r)&&(r=a.prependByteToBuffer(r,255));const i=Buffer.alloc(t-r.length,255);return Buffer.concat([i,r])}encodeTopLevel(e){let t=e.withSign;return e.value.isZero()?Buffer.alloc(0):t?this.encodePrimitive(e):a.bigIntToBuffer(e.value)}encodePrimitive(e){if(e.value.isPositive()){let t=a.bigIntToBuffer(e.value);return a.isMsbOne(t)&&(t=a.prependByteToBuffer(t,0)),t}let t=e.value.plus(new o.default(1)),n=a.bigIntToBuffer(t);return a.flipBufferBitsInPlace(n),a.isMsbZero(n)&&(n=a.prependByteToBuffer(n,255)),n}}},9603:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=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 n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.OptionValueBinaryCodec=void 0;const s=i(n(2581)),a=n(2747);t.OptionValueBinaryCodec=class{constructor(e){this.binaryCodec=e}decodeNested(e,t){if(0==e[0])return[a.OptionValue.newMissingTyped(t),1];if(1!=e[0])throw new s.ErrCodec("invalid buffer for optional value");let[n,r]=this.binaryCodec.decodeNested(e.slice(1),t);return[a.OptionValue.newProvided(n),r+1]}decodeTopLevel(e,t){if(0==e.length)return new a.OptionValue(t);if(1!=e[0])throw new s.ErrCodec("invalid buffer for optional value");let[n,r]=this.binaryCodec.decodeNested(e.slice(1),t);return new a.OptionValue(t,n)}encodeNested(e){return e.isSet()?Buffer.concat([Buffer.from([1]),this.binaryCodec.encodeNested(e.getTypedValue())]):Buffer.from([0])}encodeTopLevel(e){return e.isSet()?Buffer.concat([Buffer.from([1]),this.binaryCodec.encodeNested(e.getTypedValue())]):Buffer.from([])}}},8673:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PrimitiveBinaryCodec=void 0;const r=n(2747),o=n(7648),i=n(7380),s=n(62),a=n(8831),d=n(8843),c=n(6714),l=n(4434),u=n(3157),f=n(1367);t.PrimitiveBinaryCodec=class{constructor(e){this.binaryCodec=e,this.booleanCodec=new i.BooleanBinaryCodec,this.numericalCodec=new s.NumericalBinaryCodec,this.addressCodec=new o.AddressBinaryCodec,this.h256Codec=new a.H256BinaryCodec,this.bytesCodec=new d.BytesBinaryCodec,this.stringCodec=new f.StringBinaryCodec,this.tokenIdentifierCodec=new c.TokenIdentifierCodec,this.codeMetadataCodec=new l.CodeMetadataCodec,this.nothingCodec=new u.NothingCodec}decodeNested(e,t){return r.onPrimitiveTypeSelect(t,{onBoolean:()=>this.booleanCodec.decodeNested(e),onNumerical:()=>this.numericalCodec.decodeNested(e,t),onAddress:()=>this.addressCodec.decodeNested(e),onBytes:()=>this.bytesCodec.decodeNested(e),onString:()=>this.stringCodec.decodeNested(e),onH256:()=>this.h256Codec.decodeNested(e),onTokenIndetifier:()=>this.tokenIdentifierCodec.decodeNested(e),onCodeMetadata:()=>this.codeMetadataCodec.decodeNested(e),onNothing:()=>this.nothingCodec.decodeNested()})}decodeTopLevel(e,t){return r.onPrimitiveTypeSelect(t,{onBoolean:()=>this.booleanCodec.decodeTopLevel(e),onNumerical:()=>this.numericalCodec.decodeTopLevel(e,t),onAddress:()=>this.addressCodec.decodeTopLevel(e),onBytes:()=>this.bytesCodec.decodeTopLevel(e),onString:()=>this.stringCodec.decodeTopLevel(e),onH256:()=>this.h256Codec.decodeTopLevel(e),onTokenIndetifier:()=>this.tokenIdentifierCodec.decodeTopLevel(e),onCodeMetadata:()=>this.codeMetadataCodec.decodeTopLevel(e),onNothing:()=>this.nothingCodec.decodeTopLevel()})}encodeNested(e){return r.onPrimitiveValueSelect(e,{onBoolean:()=>this.booleanCodec.encodeNested(e),onNumerical:()=>this.numericalCodec.encodeNested(e),onAddress:()=>this.addressCodec.encodeNested(e),onBytes:()=>this.bytesCodec.encodeNested(e),onString:()=>this.stringCodec.encodeNested(e),onH256:()=>this.h256Codec.encodeNested(e),onTypeIdentifier:()=>this.tokenIdentifierCodec.encodeNested(e),onCodeMetadata:()=>this.codeMetadataCodec.encodeNested(e),onNothing:()=>this.nothingCodec.encodeNested()})}encodeTopLevel(e){return r.onPrimitiveValueSelect(e,{onBoolean:()=>this.booleanCodec.encodeTopLevel(e),onNumerical:()=>this.numericalCodec.encodeTopLevel(e),onAddress:()=>this.addressCodec.encodeTopLevel(e),onBytes:()=>this.bytesCodec.encodeTopLevel(e),onString:()=>this.stringCodec.encodeTopLevel(e),onH256:()=>this.h256Codec.encodeTopLevel(e),onTypeIdentifier:()=>this.tokenIdentifierCodec.encodeTopLevel(e),onCodeMetadata:()=>this.codeMetadataCodec.encodeTopLevel(e),onNothing:()=>this.nothingCodec.encodeTopLevel()})}}},1367:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StringBinaryCodec=void 0;const r=n(2747),o=n(1392),i=n(8843);t.StringBinaryCodec=class{constructor(){this.bytesBinaryCodec=new i.BytesBinaryCodec}decodeNested(e){let[t,n]=this.bytesBinaryCodec.decodeNested(e);return[new r.StringValue(t.valueOf().toString()),n]}decodeTopLevel(e){return new r.StringValue(e.toString())}encodeNested(e){let t=o.BytesValue.fromUTF8(e.valueOf());return this.bytesBinaryCodec.encodeNested(t)}encodeTopLevel(e){return Buffer.from(e.valueOf())}}},3551:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StructBinaryCodec=void 0;const r=n(2747),o=n(9995);t.StructBinaryCodec=class{constructor(e){this.fieldsCodec=new o.FieldsBinaryCodec(e)}decodeTopLevel(e,t){let[n]=this.decodeNested(e,t);return n}decodeNested(e,t){let n=t.getFieldsDefinitions(),[o,i]=this.fieldsCodec.decodeNested(e,n);return[new r.Struct(t,o),i]}encodeNested(e){let t=e.getFields();return this.fieldsCodec.encodeNested(t)}encodeTopLevel(e){return this.encodeNested(e)}}},6714:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TokenIdentifierCodec=void 0;const r=n(1392),o=n(3145),i=n(8843);t.TokenIdentifierCodec=class{constructor(){this.bytesCodec=new i.BytesBinaryCodec}decodeNested(e){let[t,n]=this.bytesCodec.decodeNested(e);return[new o.TokenIdentifierValue(t.toString()),n]}decodeTopLevel(e){let t=this.bytesCodec.decodeTopLevel(e);return new o.TokenIdentifierValue(t.toString())}encodeNested(e){let t=r.BytesValue.fromUTF8(e.valueOf());return this.bytesCodec.encodeNested(t)}encodeTopLevel(e){return Buffer.from(e.valueOf())}}},8954:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TupleBinaryCodec=void 0;const r=n(3551);t.TupleBinaryCodec=class{constructor(e){this.structCodec=new r.StructBinaryCodec(e)}decodeTopLevel(e,t){return this.structCodec.decodeTopLevel(e,t)}decodeNested(e,t){return this.structCodec.decodeNested(e,t)}encodeNested(e){return this.structCodec.encodeNested(e)}encodeTopLevel(e){return this.structCodec.encodeTopLevel(e)}}},2528:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResultsParser=void 0;const r=n(2866),o=n(236),i=n(2581),s=n(6458),a=n(1157),d=n(3462);var c,l;!function(e){e.OnTransactionCompleted="completedTxEvent",e.OnSignalError="signalError",e.OnWriteLog="writeLog"}(c||(c={})),function(e){e.TooMuchGas="@too much gas provided for processing"}(l||(l={}));const u={argsSerializer:new a.ArgSerializer};t.ResultsParser=class{constructor(e){e={...u,...e},this.argsSerializer=e.argsSerializer}parseQueryResponse(e,t){let n=e.getReturnDataParts(),r=this.argsSerializer.buffersToValues(n,t.output);return{returnCode:new d.ReturnCode(e.returnCode.toString()),returnMessage:e.returnMessage,values:r,firstValue:r[0],secondValue:r[1],thirdValue:r[2],lastValue:r[r.length-1]}}parseUntypedQueryResponse(e){return{returnCode:new d.ReturnCode(e.returnCode.toString()),returnMessage:e.returnMessage,values:e.getReturnDataParts()}}parseOutcome(e,t){const n=this.parseUntypedOutcome(e);return this.parseOutcomeFromUntypedBundle(n,t)}parseOutcomeFromUntypedBundle(e,t){const n=this.argsSerializer.buffersToValues(e.values,t.output);return{returnCode:e.returnCode,returnMessage:e.returnMessage,values:n,firstValue:n[0],secondValue:n[1],thirdValue:n[2],lastValue:n[n.length-1]}}parseUntypedOutcome(e){let t,n=this.parseTransactionMetadata(e);if(t=this.createBundleOnSimpleMoveBalance(e),t)return s.Logger.trace("parseUntypedOutcome(): on simple move balance"),t;if(t=this.createBundleOnInvalidTransaction(e),t)return s.Logger.trace("parseUntypedOutcome(): on invalid transaction"),t;if(t=this.createBundleOnEasilyFoundResultWithReturnData(e.contractResults),t)return s.Logger.trace("parseUntypedOutcome(): on easily found result with return data"),t;if(t=this.createBundleOnSignalError(e.logs),t)return s.Logger.trace("parseUntypedOutcome(): on signal error"),t;if(t=this.createBundleOnTooMuchGasWarning(e.logs),t)return s.Logger.trace("parseUntypedOutcome(): on 'too much gas' warning"),t;if(t=this.createBundleOnWriteLogWhereFirstTopicEqualsAddress(e.logs,e.sender),t)return s.Logger.trace("parseUntypedOutcome(): on writelog with topics[0] == tx.sender"),t;if(t=this.createBundleWithCustomHeuristics(e,n),t)return s.Logger.trace("parseUntypedOutcome(): with custom heuristics"),t;if(t=this.createBundleWithFallbackHeuristics(e,n),t)return s.Logger.trace("parseUntypedOutcome(): with fallback heuristics"),t;throw new i.ErrCannotParseContractResults(`transaction ${e.hash.toString()}`)}parseTransactionMetadata(e){return(new r.TransactionDecoder).getTransactionMetadata({sender:e.sender.bech32(),receiver:e.receiver.bech32(),data:e.data.toString("base64"),value:e.value.toString()})}createBundleOnSimpleMoveBalance(e){let t=0==e.contractResults.items.length,n=0==e.logs.events.length;return t&&n?{returnCode:d.ReturnCode.None,returnMessage:d.ReturnCode.None.toString(),values:[]}:null}createBundleOnInvalidTransaction(e){return e.status.isInvalid()&&e.receipt.data?{returnCode:d.ReturnCode.OutOfFunds,returnMessage:e.receipt.data,values:[]}:null}createBundleOnEasilyFoundResultWithReturnData(e){let t=e.items.find((e=>0!=e.nonce.valueOf()&&e.data.startsWith("@")));if(!t)return null;let{returnCode:n,returnDataParts:r}=this.sliceDataFieldInParts(t.data),o=t.returnMessage||n.toString();return{returnCode:n,returnMessage:o,values:r}}createBundleOnSignalError(e){let t=e.findSingleOrNoneEvent(c.OnSignalError);if(!t)return null;let{returnCode:n,returnDataParts:r}=this.sliceDataFieldInParts(t.data),o=t.getLastTopic(),i=o?.toString()||n.toString();return{returnCode:n,returnMessage:i,values:r}}createBundleOnTooMuchGasWarning(e){let t=e.findSingleOrNoneEvent(c.OnWriteLog,(e=>null!=e.findFirstOrNoneTopic((e=>e.toString().startsWith(l.TooMuchGas)))));if(!t)return null;let{returnCode:n,returnDataParts:r}=this.sliceDataFieldInParts(t.data);return{returnCode:n,returnMessage:n.toString(),values:r}}createBundleOnWriteLogWhereFirstTopicEqualsAddress(e,t){let n=new o.Address(t.bech32()).hex(),r=e.findSingleOrNoneEvent(c.OnWriteLog,(e=>null!=e.findFirstOrNoneTopic((e=>e.hex()==n))));if(!r)return null;let{returnCode:i,returnDataParts:s}=this.sliceDataFieldInParts(r.data),a=i.toString();return{returnCode:i,returnMessage:a,values:s}}createBundleWithCustomHeuristics(e,t){return null}createBundleWithFallbackHeuristics(e,t){let n=new o.Address(t.receiver);for(const t of e.contractResults.items){let r=t.logs.findSingleOrNoneEvent(c.OnWriteLog,(t=>{let r=t.address.bech32()==e.sender.bech32(),o=t.topics[0]?.hex()==n.hex();return r&&o}));if(r){let{returnCode:e,returnDataParts:t}=this.sliceDataFieldInParts(r.data),n=e.toString();return{returnCode:e,returnMessage:n,values:t}}}for(const t of e.contractResults.items){let e=t.logs.findSingleOrNoneEvent(c.OnWriteLog,(e=>e.address.bech32()==n.toBech32()));if(e){const{returnCode:t,returnDataParts:n}=this.sliceDataFieldInParts(e.data),r=t.toString();return{returnCode:t,returnMessage:r,values:n}}}return null}sliceDataFieldInParts(e){let t=1;e.startsWith("ESDTTransfer")&&(t=3);let n=this.argsSerializer.stringToBuffers(e),r=n[t]||Buffer.from([]),o=n.slice(t+1);if(0==r.length)throw new i.ErrCannotParseContractResults("no return code");return{returnCode:d.ReturnCode.fromBuffer(r),returnDataParts:o}}parseEvent(e,t){const n=e.topics.map((e=>Buffer.from(e.valueOf()))).slice(1),r=e.dataPayload?.valueOf()||Buffer.from([]),o=e.additionalData?.map((e=>Buffer.from(e.valueOf())))||[];return 0===o.length&&r.length&&o.push(Buffer.from(r)),this.doParseEvent({topics:n,dataItems:o,eventDefinition:t})}doParseEvent(e){const t={},n=e.eventDefinition.inputs.filter((e=>e.indexed)),r=this.argsSerializer.buffersToValues(e.topics,n);for(let e=0;e<n.length;e++)t[n[e].name]=r[e].valueOf();const o=e.eventDefinition.inputs.filter((e=>!e.indexed)),i=this.argsSerializer.buffersToValues(e.dataItems,o);for(let e=0;e<o.length;e++)t[o[e].name]=i[e].valueOf();return t}}},3462:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ReturnCode=void 0;class n{constructor(e){this.text=e}static fromBuffer(e){let t=e.toString();return new n(t)}toString(){return this.text}valueOf(){return this.text}equals(e){return!!e&&this.text==e.text}isSuccess(){return this.equals(n.Ok)||this.equals(n.None)}}t.ReturnCode=n,n.None=new n(""),n.Ok=new n("ok"),n.FunctionNotFound=new n("function not found"),n.FunctionWrongSignature=new n("wrong signature for function"),n.ContractNotFound=new n("contract not found"),n.UserError=new n("user error"),n.OutOfGas=new n("out of gas"),n.AccountCollision=new n("account collision"),n.OutOfFunds=new n("out of funds"),n.CallStackOverFlow=new n("call stack overflow"),n.ContractInvalid=new n("contract invalid"),n.ExecutionFailed=new n("execution failed"),n.Unknown=new n("unknown")},8689:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createListOfTokenIdentifiers=t.createListOfAddresses=void 0;const r=n(8551),o=n(926),i=n(3145);t.createListOfAddresses=function(e){let t=e.map((e=>new r.AddressValue(e)));return o.List.fromItems(t)},t.createListOfTokenIdentifiers=function(e){let t=e.map((e=>new i.TokenIdentifierValue(e)));return o.List.fromItems(t)}},2747:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(4966),t),o(n(8551),t),o(n(1055),t),o(n(3979),t),o(n(1392),t),o(n(1847),t),o(n(7472),t),o(n(5730),t),o(n(1414),t),o(n(9229),t),o(n(8689),t),o(n(5766),t),o(n(926),t),o(n(177),t),o(n(1038),t),o(n(4647),t),o(n(8303),t),o(n(5648),t),o(n(1782),t),o(n(4473),t),o(n(6514),t),o(n(7586),t),o(n(3145),t),o(n(1025),t),o(n(7966),t),o(n(7654),t),o(n(5626),t),o(n(6054),t)},5648:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=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 n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.onPrimitiveTypeSelect=t.onPrimitiveValueSelect=t.onTypedValueSelect=t.onTypeSelect=void 0;const s=i(n(2581)),a=n(8551),d=n(3979),c=n(1392),l=n(1847),u=n(1414),f=n(9229),h=n(926),g=n(177),p=n(1038),C=n(4647),v=n(8303),y=n(1782),m=n(4473),T=n(6514),B=n(7586),b=n(3145),N=n(1025),O=n(5626);t.onTypeSelect=function(e,t){if(e.hasExactClass(h.OptionType.ClassName))return t.onOption();if(e.hasExactClass(h.ListType.ClassName))return t.onList();if(e.hasExactClass(g.ArrayVecType.ClassName))return t.onArray();if(e.hasClassOrSuperclass(O.PrimitiveType.ClassName))return t.onPrimitive();if(e.hasExactClass(B.StructType.ClassName))return t.onStruct();if(e.hasExactClass(N.TupleType.ClassName))return t.onTuple();if(e.hasExactClass(u.EnumType.ClassName))return t.onEnum();if(e.hasExactClass(f.ExplicitEnumType.ClassName))return t.onExplicitEnum();if(e.hasExactClass(C.ManagedDecimalType.ClassName))return t.onManagedDecimal();if(e.hasExactClass(v.ManagedDecimalSignedType.ClassName))return t.onManagedDecimalSigned();if(t.onOther)return t.onOther();throw new s.ErrTypingSystem(`type isn't known: ${e}`)},t.onTypedValueSelect=function(e,t){if(e.hasClassOrSuperclass(O.PrimitiveValue.ClassName))return t.onPrimitive();if(e.hasExactClass(h.OptionValue.ClassName))return t.onOption();if(e.hasExactClass(h.List.ClassName))return t.onList();if(e.hasExactClass(g.ArrayVec.ClassName))return t.onArray();if(e.hasExactClass(B.Struct.ClassName))return t.onStruct();if(e.hasExactClass(N.Tuple.ClassName))return t.onTuple();if(e.hasExactClass(u.EnumValue.ClassName))return t.onEnum();if(e.hasExactClass(f.ExplicitEnumValue.ClassName))return t.onExplicitEnum();if(e.hasExactClass(C.ManagedDecimalValue.ClassName))return t.onManagedDecimal();if(e.hasExactClass(v.ManagedDecimalSignedValue.ClassName))return t.onManagedDecimalSigned();if(t.onOther)return t.onOther();throw new s.ErrTypingSystem(`value isn't typed: ${e}`)},t.onPrimitiveValueSelect=function(e,t){if(e.hasExactClass(d.BooleanValue.ClassName))return t.onBoolean();if(e.hasClassOrSuperclass(m.NumericalValue.ClassName))return t.onNumerical();if(e.hasExactClass(a.AddressValue.ClassName))return t.onAddress();if(e.hasExactClass(c.BytesValue.ClassName))return t.onBytes();if(e.hasExactClass(T.StringValue.ClassName))return t.onString();if(e.hasExactClass(p.H256Value.ClassName))return t.onH256();if(e.hasExactClass(b.TokenIdentifierValue.ClassName))return t.onTypeIdentifier();if(e.hasExactClass(l.CodeMetadataValue.ClassName))return t.onCodeMetadata();if(e.hasExactClass(y.NothingValue.ClassName))return t.onNothing();if(t.onOther)return t.onOther();throw new s.ErrTypingSystem(`value isn't a primitive: ${e.getType()}`)},t.onPrimitiveTypeSelect=function(e,t){if(e.hasExactClass(d.BooleanType.ClassName))return t.onBoolean();if(e.hasClassOrSuperclass(m.NumericalType.ClassName))return t.onNumerical();if(e.hasExactClass(a.AddressType.ClassName))return t.onAddress();if(e.hasExactClass(c.BytesType.ClassName))return t.onBytes();if(e.hasExactClass(T.StringType.ClassName))return t.onString();if(e.hasExactClass(p.H256Type.ClassName))return t.onH256();if(e.hasExactClass(b.TokenIdentifierType.ClassName))return t.onTokenIndetifier();if(e.hasExactClass(l.CodeMetadataType.ClassName))return t.onCodeMetadata();if(e.hasExactClass(y.NothingType.ClassName))return t.onNothing();if(t.onOther)return t.onOther();throw new s.ErrTypingSystem(`type isn't a known primitive: ${e}`)}},2866:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TokenTransferProperties=t.TransactionMetadataTransfer=t.TransactionMetadata=t.TransactionToDecode=t.TransactionDecoder=void 0;const r=n(8603);t.TransactionDecoder=class{getTransactionMetadata(e){const t=this.getNormalTransactionMetadata(e),n=this.getEsdtTransactionMetadata(t);if(n)return n;const r=this.getNftTransferMetadata(t);if(r)return r;return this.getMultiTransferMetadata(t)||t}getNormalTransactionMetadata(e){const t=new i;if(t.sender=e.sender,t.receiver=e.receiver,t.value=BigInt(e.value),e.data){const n=this.base64Decode(e.data).split("@"),r=n.slice(1);if(r.every((e=>this.isSmartContractArgument(e)))&&(t.functionName=n[0],t.functionArgs=r),"relayedTx"===t.functionName&&t.functionArgs&&1===t.functionArgs.length)try{const e=JSON.parse(this.hexToString(t.functionArgs[0]));return e.value=e.value.toString(),e.sender=this.bech32Encode(this.base64ToHex(e.sender)),e.receiver=this.bech32Encode(this.base64ToHex(e.receiver)),this.getNormalTransactionMetadata(e)}catch(e){}if("relayedTxV2"===t.functionName&&t.functionArgs&&4===t.functionArgs.length)try{const n=new o;return n.sender=e.receiver,n.receiver=this.bech32Encode(t.functionArgs[0]),n.data=this.base64Encode(this.hexToString(t.functionArgs[2])),n.value="0",this.getNormalTransactionMetadata(n)}catch(e){}}return t}getMultiTransferMetadata(e){if(e.sender!==e.receiver)return;if("MultiESDTNFTTransfer"!==e.functionName)return;const t=e.functionArgs;if(!t)return;if(t.length<3)return;if(!this.isAddressValid(t[0]))return;const n=this.bech32Encode(t[0]),r=this.hexToNumber(t[1]),o=new i;o.transfers||(o.transfers=[]);let s=2;for(let e=0;e<r;e++){const e=this.hexToString(t[s++]),n=t[s++],r=this.hexToBigInt(t[s++]);n?o.transfers.push({value:r,properties:{collection:e,identifier:`${e}-${n}`}}):o.transfers.push({value:r,properties:{token:e}})}return o.sender=e.sender,o.receiver=n,t.length>s&&(o.functionName=this.hexToString(t[s++]),o.functionArgs=t.slice(s++)),o}getNftTransferMetadata(e){if(e.sender!==e.receiver)return;if("ESDTNFTTransfer"!==e.functionName)return;const t=e.functionArgs;if(!t)return;if(t.length<4)return;if(!this.isAddressValid(t[3]))return;const n=this.hexToString(t[0]),r=t[1],o=this.hexToBigInt(t[2]),s=this.bech32Encode(t[3]),a=new i;return a.sender=e.sender,a.receiver=s,a.value=o,t.length>4&&(a.functionName=this.hexToString(t[4]),a.functionArgs=t.slice(5)),a.transfers=[{value:o,properties:{collection:n,identifier:`${n}-${r}`}}],a}base64Encode(e){return Buffer.from(e).toString("base64")}base64Decode(e){return Buffer.from(e,"base64").toString("binary")}hexToNumber(e){return parseInt(e,16)}getEsdtTransactionMetadata(e){if("ESDTTransfer"!==e.functionName)return;const t=e.functionArgs;if(!t)return;if(t.length<2)return;const n=this.hexToString(t[0]),r=this.hexToBigInt(t[1]),o=new i;return o.sender=e.sender,o.receiver=e.receiver,t.length>2&&(o.functionName=this.hexToString(t[2]),o.functionArgs=t.slice(3)),o.transfers=[{value:r,properties:{identifier:n}}],o.value=r,o}bech32Encode(e){const t=Buffer.from(e,"hex"),n=r.bech32.toWords(t);return r.bech32.encode("erd",n)}isAddressValid(e){return 32==Buffer.from(e,"hex").length}isSmartContractArgument(e){return!!this.isHex(e)&&e.length%2==0}isHex(e){return!1===new RegExp(/[^a-f0-9]/gi).test(e)}base64ToHex(e){return Buffer.from(e,"base64").toString("hex")}hexToString(e){return Buffer.from(e,"hex").toString("ascii")}hexToBigInt(e){return e?BigInt("0x"+e):BigInt(0)}};class o{constructor(){this.sender="",this.receiver="",this.data="",this.value="0"}}t.TransactionToDecode=o;class i{constructor(){this.sender="",this.receiver="",this.value=BigInt(0)}}t.TransactionMetadata=i,t.TransactionMetadataTransfer=class{constructor(){this.value=BigInt(0)}},t.TokenTransferProperties=class{}},8603:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.bech32m=t.bech32=void 0;const n="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={};for(let e=0;e<32;e++){const t=n.charAt(e);r[t]=e}function o(e){const t=e>>25;return(33554431&e)<<5^996825010&-(1&t)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function i(e){let t=1;for(let n=0;n<e.length;++n){const r=e.charCodeAt(n);if(r<33||r>126)return"Invalid prefix ("+e+")";t=o(t)^r>>5}t=o(t);for(let n=0;n<e.length;++n){const r=e.charCodeAt(n);t=o(t)^31&r}return t}function s(e,t,n,r){let o=0,i=0;const s=(1<<n)-1,a=[];for(let r=0;r<e.length;++r)for(o=o<<t|e[r],i+=t;i>=n;)i-=n,a.push(o>>i&s);if(r)i>0&&a.push(o<<n-i&s);else{if(i>=t)return"Excess padding";if(o<<n-i&s)return"Non-zero padding"}return a}function a(e){return s(e,8,5,!0)}function d(e){const t=s(e,5,8,!1);if(Array.isArray(t))return t}function c(e){const t=s(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}function l(e){let t;function s(e,n){if(n=n||90,e.length<8)return e+" too short";if(e.length>n)return"Exceeds length limit";const s=e.toLowerCase(),a=e.toUpperCase();if(e!==s&&e!==a)return"Mixed-case string "+e;const d=(e=s).lastIndexOf("1");if(-1===d)return"No separator character for "+e;if(0===d)return"Missing prefix for "+e;const c=e.slice(0,d),l=e.slice(d+1);if(l.length<6)return"Data too short";let u=i(c);if("string"==typeof u)return u;const f=[];for(let e=0;e<l.length;++e){const t=l.charAt(e),n=r[t];if(void 0===n)return"Unknown character "+t;u=o(u)^n,e+6>=l.length||f.push(n)}return u!==t?"Invalid checksum for "+e:{prefix:c,words:f}}return t="bech32"===e?1:734539939,{decodeUnsafe:function(e,t){const n=s(e,t);if("object"==typeof n)return n},decode:function(e,t){const n=s(e,t);if("object"==typeof n)return n;throw new Error(n)},encode:function(e,r,s){if(s=s||90,e.length+7+r.length>s)throw new TypeError("Exceeds length limit");let a=i(e=e.toLowerCase());if("string"==typeof a)throw new Error(a);let d=e+"1";for(let e=0;e<r.length;++e){const t=r[e];if(t>>5)throw new Error("Non 5-bit word");a=o(a)^t,d+=n.charAt(t)}for(let e=0;e<6;++e)a=o(a);a^=t;for(let e=0;e<6;++e)d+=n.charAt(a>>5*(5-e)&31);return d},toWords:a,fromWordsUnsafe:d,fromWords:c}}t.bech32=l("bech32"),t.bech32m=l("bech32m")}}]);
|
package/dist/528.esm.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const __webpack_id__=528;export const __webpack_ids__=[528];export const __webpack_modules__={6458:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.LogLevel=void 0,function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warn=3]="Warn",e[e.Error=4]="Error",e[e.None=5]="None"}(n=t.LogLevel||(t.LogLevel={}));class r{static setLevel(e){r.logLevel=e}static trace(e,...t){r.logLevel>=n.Debug||console.debug(e,t)}static debug(e,...t){r.logLevel>=n.Debug||console.debug(e,t)}static info(e,...t){r.logLevel>=n.Info||console.log(e,t)}static warn(e,...t){r.logLevel>=n.Warn||console.warn(e,t)}static error(e,...t){r.logLevel>=n.Error||console.error(e,t)}}t.Logger=r,r.logLevel=n.Debug},1157:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArgSerializer=void 0;const r=n(7353),o=n(9272),i=n(2747),s=n(1055),a=n(7472),d=n(6054),c={codec:new o.BinaryCodec};t.ArgSerializer=class{constructor(e){e={...c,...e},this.codec=e.codec}stringToValues(e,t){let n=this.stringToBuffers(e);return this.buffersToValues(n,t)}stringToBuffers(e){return e.split(r.ARGUMENTS_SEPARATOR).map((e=>Buffer.from(e,"hex")))}buffersToValues(e,t){const n=this;let r=[],o=0,c=(e=e||[]).length;for(let e=0;e<t.length;e++){let n=l(t[e].type);r.push(n)}function l(t){if(t.hasExactClass(s.OptionalType.ClassName)){const e=l(t.getFirstTypeParameter());return new s.OptionalValue(t,e)}if(t.hasExactClass(d.VariadicType.ClassName))return function(e){const t=e,n=[];if(t.isCounted){const t=l(new i.U32Type).valueOf().toNumber();for(let r=0;r<t;r++)n.push(l(e.getFirstTypeParameter()))}else for(;!u();)n.push(l(e.getFirstTypeParameter()));return new d.VariadicValue(t,n)}(t);if(t.hasExactClass(a.CompositeType.ClassName)){const e=[];for(const n of t.getTypeParameters())e.push(l(n));return new a.CompositeValue(t,e)}const r=function(t){if(u())return null;let r=e[o++];return n.codec.decodeTopLevel(r,t)}(t);return r}function u(){return o>=c}return r}valuesToString(e){let t=this.valuesToStrings(e);return{argumentsString:t.join(r.ARGUMENTS_SEPARATOR),count:t.length}}valuesToStrings(e){return this.valuesToBuffers(e).map((e=>e.toString("hex")))}valuesToBuffers(e){const t=this,n=[];for(const t of e)r(t);function r(e){if(e.hasExactClass(s.OptionalValue.ClassName)){const t=e;return void(t.isSet()&&r(t.getTypedValue()))}if(e.hasExactClass(d.VariadicValue.ClassName))return void function(e){if(e.getType().isCounted){const r=new i.U32Value(e.getItems().length);n.push(t.codec.encodeTopLevel(r))}for(const t of e.getItems())r(t)}(e);if(e.hasExactClass(a.CompositeValue.ClassName)){const t=e;for(const e of t.getItems())r(e);return}const o=t.codec.encodeTopLevel(e);n.push(o)}return n}}},5225:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CodeMetadata=t.CodeMetadataLength=void 0,t.CodeMetadataLength=2;class n{constructor(e=!0,t=!1,n=!1,r=!1){this.upgradeable=e,this.readable=t,this.payable=n,this.payableBySc=r}static fromBytes(e){return n.fromBuffer(Buffer.from(e))}static fromBuffer(e){if(e.length!=t.CodeMetadataLength)throw new Error(`code metadata buffer has length ${e.length}, expected ${t.CodeMetadataLength}`);const r=e[0],o=e[1],i=!!(r&n.ByteZero.Upgradeable),s=!!(r&n.ByteZero.Readable),a=!!(o&n.ByteOne.Payable),d=!!(o&n.ByteOne.PayableBySc);return new n(i,s,a,d)}toggleUpgradeable(e){this.upgradeable=e}toggleReadable(e){this.readable=e}togglePayable(e){this.payable=e}togglePayableBySc(e){this.payableBySc=e}toBuffer(){let e=0,t=0;return this.upgradeable&&(e|=n.ByteZero.Upgradeable),this.readable&&(e|=n.ByteZero.Readable),this.payable&&(t|=n.ByteOne.Payable),this.payableBySc&&(t|=n.ByteOne.PayableBySc),Buffer.from([e,t])}toString(){return this.toBuffer().toString("hex")}toJSON(){return{upgradeable:this.upgradeable,readable:this.readable,payable:this.payable,payableBySc:this.payableBySc}}equals(e){return this.upgradeable==e.upgradeable&&this.readable==e.readable&&this.payable==e.payable&&this.payableBySc==e.payableBySc}}t.CodeMetadata=n,n.ByteZero={Upgradeable:1,Reserved2:2,Readable:4},n.ByteOne={Reserved1:1,Payable:2,PayableBySc:4}},7648:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AddressBinaryCodec=void 0;const r=n(236),o=n(2747);t.AddressBinaryCodec=class{decodeNested(e){let t=e.slice(0,32),n=new r.Address(t);return[new o.AddressValue(n),32]}decodeTopLevel(e){let[t,n]=this.decodeNested(e);return t}encodeNested(e){return e.valueOf().pubkey()}encodeTopLevel(e){return e.valueOf().pubkey()}}},2739:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayVecBinaryCodec=void 0;const r=n(2747);t.ArrayVecBinaryCodec=class{constructor(e){this.binaryCodec=e}decodeNested(e,t){let n=t.length,o=t.getFirstTypeParameter(),i=[],s=0;for(let t=0;t<n;t++){let[t,n]=this.binaryCodec.decodeNested(e,o);i.push(t),s+=n,e=e.slice(n)}return[new r.ArrayVec(t,i),s]}decodeTopLevel(e,t){let[n,r]=this.decodeNested(e,t);return n}encodeNested(e){let t=[];for(const n of e.getItems()){let e=this.binaryCodec.encodeNested(n);t.push(e)}return Buffer.concat(t)}encodeTopLevel(e){return this.encodeNested(e)}}},675:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=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 n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BinaryCodecConstraints=t.BinaryCodec=void 0;const s=i(n(2581)),a=n(1069),d=n(2747),c=n(2739),l=n(6855),u=n(1698),f=n(82),h=n(4998),g=n(8118),p=n(9603),C=n(8673),v=n(3551),y=n(8954);t.BinaryCodec=class{constructor(e=null){this.constraints=e||new m,this.optionCodec=new p.OptionValueBinaryCodec(this),this.listCodec=new f.ListBinaryCodec(this),this.arrayCodec=new c.ArrayVecBinaryCodec(this),this.primitiveCodec=new C.PrimitiveBinaryCodec(this),this.structCodec=new v.StructBinaryCodec(this),this.tupleCodec=new y.TupleBinaryCodec(this),this.enumCodec=new l.EnumBinaryCodec(this),this.explicitEnumCodec=new u.ExplicitEnumBinaryCodec,this.managedDecimalCodec=new h.ManagedDecimalCodec(this),this.managedDecimalSignedCodec=new g.ManagedDecimalSignedCodec(this)}decodeTopLevel(e,t){return this.constraints.checkBufferLength(e),d.onTypeSelect(t,{onOption:()=>this.optionCodec.decodeTopLevel(e,t.getFirstTypeParameter()),onList:()=>this.listCodec.decodeTopLevel(e,t),onArray:()=>this.arrayCodec.decodeTopLevel(e,t),onPrimitive:()=>this.primitiveCodec.decodeTopLevel(e,t),onStruct:()=>this.structCodec.decodeTopLevel(e,t),onTuple:()=>this.tupleCodec.decodeTopLevel(e,t),onEnum:()=>this.enumCodec.decodeTopLevel(e,t),onExplicitEnum:()=>this.explicitEnumCodec.decodeTopLevel(e,t),onManagedDecimal:()=>this.managedDecimalCodec.decodeTopLevel(e,t),onManagedDecimalSigned:()=>this.managedDecimalSignedCodec.decodeTopLevel(e,t)})}decodeNested(e,t){this.constraints.checkBufferLength(e);let[n,r]=d.onTypeSelect(t,{onOption:()=>this.optionCodec.decodeNested(e,t.getFirstTypeParameter()),onList:()=>this.listCodec.decodeNested(e,t),onArray:()=>this.arrayCodec.decodeNested(e,t),onPrimitive:()=>this.primitiveCodec.decodeNested(e,t),onStruct:()=>this.structCodec.decodeNested(e,t),onTuple:()=>this.tupleCodec.decodeNested(e,t),onEnum:()=>this.enumCodec.decodeNested(e,t),onExplicitEnum:()=>this.explicitEnumCodec.decodeNested(e,t),onManagedDecimal:()=>this.managedDecimalCodec.decodeNested(e,t),onManagedDecimalSigned:()=>this.managedDecimalSignedCodec.decodeNested(e,t)});return[n,r]}encodeNested(e){return a.guardTrue(e.getType().getCardinality().isSingular(),"singular cardinality, thus encodable type"),d.onTypedValueSelect(e,{onPrimitive:()=>this.primitiveCodec.encodeNested(e),onOption:()=>this.optionCodec.encodeNested(e),onList:()=>this.listCodec.encodeNested(e),onArray:()=>this.arrayCodec.encodeNested(e),onStruct:()=>this.structCodec.encodeNested(e),onTuple:()=>this.tupleCodec.encodeNested(e),onEnum:()=>this.enumCodec.encodeNested(e),onExplicitEnum:()=>this.explicitEnumCodec.encodeNested(e),onManagedDecimal:()=>this.managedDecimalCodec.encodeNested(e),onManagedDecimalSigned:()=>this.managedDecimalSignedCodec.encodeNested(e)})}encodeTopLevel(e){return a.guardTrue(e.getType().getCardinality().isSingular(),"singular cardinality, thus encodable type"),d.onTypedValueSelect(e,{onPrimitive:()=>this.primitiveCodec.encodeTopLevel(e),onOption:()=>this.optionCodec.encodeTopLevel(e),onList:()=>this.listCodec.encodeTopLevel(e),onArray:()=>this.arrayCodec.encodeTopLevel(e),onStruct:()=>this.structCodec.encodeTopLevel(e),onTuple:()=>this.tupleCodec.encodeTopLevel(e),onEnum:()=>this.enumCodec.encodeTopLevel(e),onExplicitEnum:()=>this.explicitEnumCodec.encodeTopLevel(e),onManagedDecimal:()=>this.managedDecimalCodec.encodeTopLevel(e),onManagedDecimalSigned:()=>this.managedDecimalSignedCodec.encodeTopLevel(e)})}};class m{constructor(e){this.maxBufferLength=e?.maxBufferLength||256e3,this.maxListLength=e?.maxListLength||128e3}checkBufferLength(e){if(e.length>this.maxBufferLength)throw new s.ErrCodec(`Buffer too large: ${e.length} > ${this.maxBufferLength}`)}checkListLength(e){if(e>this.maxListLength)throw new s.ErrCodec(`List too large: ${e} > ${this.maxListLength}`)}}t.BinaryCodecConstraints=m},3232:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBigNumber=t.decodeString=t.decodeBool=t.decodeUnsignedNumber=void 0;const o=r(n(1594)),i=n(2747),s=new(n(675).BinaryCodec);t.decodeUnsignedNumber=function(e){let t=s.decodeTopLevel(e,new i.BigUIntType);return Number(t.valueOf())},t.decodeBool=function(e){let t=s.decodeTopLevel(e,new i.BooleanType);return Boolean(t.valueOf())},t.decodeString=function(e){let t=s.decodeTopLevel(e,new i.BytesType);return String(t.valueOf())},t.decodeBigNumber=function(e){let t=s.decodeTopLevel(e,new i.BigUIntType);return new o.default(t.valueOf())}},7380:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=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 n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanBinaryCodec=void 0;const s=i(n(2581)),a=n(2747);class d{decodeNested(e){let t=e.readUInt8(0);return[new a.BooleanValue(t==d.TRUE),1]}decodeTopLevel(e){if(e.length>1)throw new s.ErrInvalidArgument("buffer should be of size <= 1");let t=e[0];return new a.BooleanValue(t==d.TRUE)}encodeNested(e){return e.isTrue()?Buffer.from([d.TRUE]):Buffer.from([d.FALSE])}encodeTopLevel(e){return e.isTrue()?Buffer.from([d.TRUE]):Buffer.from([])}}t.BooleanBinaryCodec=d,d.TRUE=1,d.FALSE=0},8843:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BytesBinaryCodec=void 0;const r=n(1392),o=n(2461);t.BytesBinaryCodec=class{decodeNested(e){let t=e.readUInt32BE(0),n=e.slice(o.SizeOfU32,o.SizeOfU32+t);return[new r.BytesValue(n),o.SizeOfU32+t]}decodeTopLevel(e){return new r.BytesValue(e)}encodeNested(e){let t=Buffer.alloc(o.SizeOfU32);return t.writeUInt32BE(e.getLength()),Buffer.concat([t,e.valueOf()])}encodeTopLevel(e){return e.valueOf()}}},4434:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CodeMetadataCodec=void 0;const r=n(5225),o=n(1847);t.CodeMetadataCodec=class{decodeNested(e){const t=r.CodeMetadata.fromBuffer(e.slice(0,r.CodeMetadataLength));return[new o.CodeMetadataValue(t),r.CodeMetadataLength]}decodeTopLevel(e){const t=r.CodeMetadata.fromBuffer(e);return new o.CodeMetadataValue(t)}encodeNested(e){return e.valueOf().toBuffer()}encodeTopLevel(e){return e.valueOf().toBuffer()}}},2461:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SizeOfU32=void 0,t.SizeOfU32=4},6855:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EnumBinaryCodec=void 0;const r=n(2747),o=n(9995);t.EnumBinaryCodec=class{constructor(e){this.binaryCodec=e,this.fieldsCodec=new o.FieldsBinaryCodec(e)}decodeTopLevel(e,t){let[n]=this.decodeNested(e,t);return n}decodeNested(e,t){let[n,o]=this.readDiscriminant(e);e=e.slice(o);let i=t.getVariantByDiscriminant(n),s=i.getFieldsDefinitions(),[a,d]=this.fieldsCodec.decodeNested(e,s);return[new r.EnumValue(t,i,a),o+d]}readDiscriminant(e){let[t,n]=this.binaryCodec.decodeNested(e,new r.U8Type);return[t.valueOf(),n]}encodeNested(e){let t=new r.U8Value(e.discriminant),n=this.binaryCodec.encodeNested(t),o=e.getFields(),i=this.fieldsCodec.encodeNested(o);return Buffer.concat([n,i])}encodeTopLevel(e){let t=e.getFields(),n=t.length>0,o=this.fieldsCodec.encodeNested(t),i=new r.U8Value(e.discriminant),s=n?this.binaryCodec.encodeNested(i):this.binaryCodec.encodeTopLevel(i);return Buffer.concat([s,o])}}},1698:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExplicitEnumBinaryCodec=void 0;const r=n(2747),o=n(9229),i=n(1367);t.ExplicitEnumBinaryCodec=class{constructor(){this.stringCodec=new i.StringBinaryCodec}decodeTopLevel(e,t){const n=this.stringCodec.decodeTopLevel(e);return new o.ExplicitEnumValue(t,new o.ExplicitEnumVariantDefinition(n.valueOf()))}decodeNested(e,t){const[n,r]=this.stringCodec.decodeNested(e);return[new o.ExplicitEnumValue(t,new o.ExplicitEnumVariantDefinition(n.valueOf())),r]}encodeNested(e){return this.stringCodec.encodeNested(new r.StringValue(e.valueOf().name))}encodeTopLevel(e){return this.stringCodec.encodeTopLevel(new r.StringValue(e.valueOf().name))}}},9995:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FieldsBinaryCodec=void 0;const r=n(2747);t.FieldsBinaryCodec=class{constructor(e){this.binaryCodec=e}decodeNested(e,t){let n=[],o=0;for(const i of t){let[t,s]=this.binaryCodec.decodeNested(e,i.type);e=e.slice(s),o+=s;let a=new r.Field(t,i.name);n.push(a)}return[n,o]}encodeNested(e){let t=[];for(const n of e){let e=this.binaryCodec.encodeNested(n.value);t.push(e)}return Buffer.concat(t)}}},8831:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.H256BinaryCodec=void 0;const r=n(1038);t.H256BinaryCodec=class{decodeNested(e){let t=e.slice(0,32);return[new r.H256Value(t),32]}decodeTopLevel(e){let[t,n]=this.decodeNested(e);return t}encodeNested(e){return e.valueOf()}encodeTopLevel(e){return e.valueOf()}}},9272:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(675),t),o(n(3232),t)},82:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ListBinaryCodec=void 0;const r=n(2747),o=n(2461);t.ListBinaryCodec=class{constructor(e){this.binaryCodec=e}decodeNested(e,t){let n=t.getFirstTypeParameter(),i=[],s=e.readUInt32BE(0);this.binaryCodec.constraints.checkListLength(s);let a=e,d=o.SizeOfU32;e=a.slice(d);for(let t=0;t<s;t++){let[t,r]=this.binaryCodec.decodeNested(e,n);i.push(t),d+=r,e=a.slice(d)}return[new r.List(t,i),d]}decodeTopLevel(e,t){let n=t.getFirstTypeParameter(),o=[],i=e,s=0;for(;e.length>0;){let[t,r]=this.binaryCodec.decodeNested(e,n);o.push(t),s+=r,e=i.slice(s),this.binaryCodec.constraints.checkListLength(o.length)}return new r.List(t,o)}encodeNested(e){this.binaryCodec.constraints.checkListLength(e.getLength());let t=Buffer.alloc(o.SizeOfU32);t.writeUInt32BE(e.getLength());let n=[];for(const t of e.getItems()){let e=this.binaryCodec.encodeNested(t);n.push(e)}return Buffer.concat([t,...n])}encodeTopLevel(e){this.binaryCodec.constraints.checkListLength(e.getLength());let t=[];for(const n of e.getItems()){let e=this.binaryCodec.encodeNested(n);t.push(e)}return Buffer.concat(t)}}},4998:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ManagedDecimalCodec=void 0;const o=r(n(1594)),i=n(2747),s=n(7553),a=n(2461);t.ManagedDecimalCodec=class{constructor(e){this.binaryCodec=e}decodeNested(e,t){const n=e.readUInt32BE(0),r=e.slice(0,n);return[this.decodeTopLevel(r,t),n]}decodeTopLevel(e,t){if(0===e.length)return new i.ManagedDecimalValue(new o.default(0),0);if(t.isVariable()){const t=e.length-a.SizeOfU32,[n]=this.binaryCodec.decodeNested(e.slice(0,t),new i.BigUIntType),r=e.readUInt32BE(t);return new i.ManagedDecimalValue(n.valueOf().shiftedBy(-r),r)}const n=s.bufferToBigInt(e),r=t.getMetadata(),d="usize"!==r?parseInt(r.toString()):0;return new i.ManagedDecimalValue(n.shiftedBy(-d),d)}encodeNested(e){let t=[];const n=new i.BigUIntValue(e.valueOf().shiftedBy(e.getScale()));return e.isVariable()?(t.push(Buffer.from(this.binaryCodec.encodeNested(n))),t.push(Buffer.from(this.binaryCodec.encodeNested(new i.U32Value(e.getScale()))))):t.push(this.binaryCodec.encodeTopLevel(n)),Buffer.concat(t)}encodeTopLevel(e){return this.encodeNested(e)}}},8118:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ManagedDecimalSignedCodec=void 0;const o=r(n(1594)),i=n(2747),s=n(7553),a=n(2461);t.ManagedDecimalSignedCodec=class{constructor(e){this.binaryCodec=e}decodeNested(e,t){const n=e.readUInt32BE(0),r=e.slice(0,n);return[this.decodeTopLevel(r,t),n]}decodeTopLevel(e,t){if(0===e.length)return new i.ManagedDecimalSignedValue(new o.default(0),0);if(t.isVariable()){const t=e.length-a.SizeOfU32,[n]=this.binaryCodec.decodeNested(e.slice(0,t),new i.BigIntType),r=e.readUInt32BE(t);return new i.ManagedDecimalSignedValue(n.valueOf().shiftedBy(-r),r)}const n=s.bufferToBigInt(e),r=t.getMetadata(),d="usize"!==r?parseInt(r.toString()):0;return new i.ManagedDecimalSignedValue(n.shiftedBy(-d),d)}encodeNested(e){let t=[];const n=new i.BigIntValue(e.valueOf().shiftedBy(e.getScale()));return e.isVariable()?(t.push(Buffer.from(this.binaryCodec.encodeNested(n))),t.push(Buffer.from(this.binaryCodec.encodeNested(new i.U32Value(e.getScale()))))):t.push(Buffer.from(this.binaryCodec.encodeTopLevel(n))),Buffer.concat(t)}encodeTopLevel(e){return this.encodeNested(e)}}},3157:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NothingCodec=void 0;const r=n(2747);t.NothingCodec=class{decodeNested(){return[new r.NothingValue,0]}decodeTopLevel(){return new r.NothingValue}encodeNested(){return Buffer.from([])}encodeTopLevel(){return Buffer.from([])}}},62:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NumericalBinaryCodec=void 0;const o=r(n(1594)),i=n(2747),s=n(2461),a=n(7553);t.NumericalBinaryCodec=class{decodeNested(e,t){let n=0,r=t.sizeInBytes;r||(n=s.SizeOfU32,r=e.readUInt32BE(0));let o=e.slice(n,n+r);return[this.decodeTopLevel(o,t),r+n]}decodeTopLevel(e,t){let n=a.cloneBuffer(e);if(0==e.length)return new i.NumericalValue(t,new o.default(0));if(!t.withSign||a.isMsbZero(n)){let e=a.bufferToBigInt(n);return new i.NumericalValue(t,e)}a.flipBufferBitsInPlace(n);let r=a.bufferToBigInt(n).multipliedBy(new o.default(-1)).minus(new o.default(1));return new i.NumericalValue(t,r)}encodeNested(e){if(e.sizeInBytes)return this.encodeNestedFixedSize(e,e.sizeInBytes);let t=this.encodeTopLevel(e),n=Buffer.alloc(s.SizeOfU32);return n.writeUInt32BE(t.length),Buffer.concat([n,t])}encodeNestedFixedSize(e,t){if(e.value.isZero())return Buffer.alloc(t,0);if(!e.withSign){const n=a.bigIntToBuffer(e.value),r=Buffer.alloc(t-n.length,0);return Buffer.concat([r,n])}if(e.value.isPositive()){let n=a.bigIntToBuffer(e.value);a.isMsbOne(n)&&(n=a.prependByteToBuffer(n,0));const r=Buffer.alloc(t-n.length,0);return Buffer.concat([r,n])}let n=e.value.plus(new o.default(1)),r=a.bigIntToBuffer(n);a.flipBufferBitsInPlace(r),a.isMsbZero(r)&&(r=a.prependByteToBuffer(r,255));const i=Buffer.alloc(t-r.length,255);return Buffer.concat([i,r])}encodeTopLevel(e){let t=e.withSign;return e.value.isZero()?Buffer.alloc(0):t?this.encodePrimitive(e):a.bigIntToBuffer(e.value)}encodePrimitive(e){if(e.value.isPositive()){let t=a.bigIntToBuffer(e.value);return a.isMsbOne(t)&&(t=a.prependByteToBuffer(t,0)),t}let t=e.value.plus(new o.default(1)),n=a.bigIntToBuffer(t);return a.flipBufferBitsInPlace(n),a.isMsbZero(n)&&(n=a.prependByteToBuffer(n,255)),n}}},9603:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=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 n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.OptionValueBinaryCodec=void 0;const s=i(n(2581)),a=n(2747);t.OptionValueBinaryCodec=class{constructor(e){this.binaryCodec=e}decodeNested(e,t){if(0==e[0])return[a.OptionValue.newMissingTyped(t),1];if(1!=e[0])throw new s.ErrCodec("invalid buffer for optional value");let[n,r]=this.binaryCodec.decodeNested(e.slice(1),t);return[a.OptionValue.newProvided(n),r+1]}decodeTopLevel(e,t){if(0==e.length)return new a.OptionValue(t);if(1!=e[0])throw new s.ErrCodec("invalid buffer for optional value");let[n,r]=this.binaryCodec.decodeNested(e.slice(1),t);return new a.OptionValue(t,n)}encodeNested(e){return e.isSet()?Buffer.concat([Buffer.from([1]),this.binaryCodec.encodeNested(e.getTypedValue())]):Buffer.from([0])}encodeTopLevel(e){return e.isSet()?Buffer.concat([Buffer.from([1]),this.binaryCodec.encodeNested(e.getTypedValue())]):Buffer.from([])}}},8673:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PrimitiveBinaryCodec=void 0;const r=n(2747),o=n(7648),i=n(7380),s=n(62),a=n(8831),d=n(8843),c=n(6714),l=n(4434),u=n(3157),f=n(1367);t.PrimitiveBinaryCodec=class{constructor(e){this.binaryCodec=e,this.booleanCodec=new i.BooleanBinaryCodec,this.numericalCodec=new s.NumericalBinaryCodec,this.addressCodec=new o.AddressBinaryCodec,this.h256Codec=new a.H256BinaryCodec,this.bytesCodec=new d.BytesBinaryCodec,this.stringCodec=new f.StringBinaryCodec,this.tokenIdentifierCodec=new c.TokenIdentifierCodec,this.codeMetadataCodec=new l.CodeMetadataCodec,this.nothingCodec=new u.NothingCodec}decodeNested(e,t){return r.onPrimitiveTypeSelect(t,{onBoolean:()=>this.booleanCodec.decodeNested(e),onNumerical:()=>this.numericalCodec.decodeNested(e,t),onAddress:()=>this.addressCodec.decodeNested(e),onBytes:()=>this.bytesCodec.decodeNested(e),onString:()=>this.stringCodec.decodeNested(e),onH256:()=>this.h256Codec.decodeNested(e),onTokenIndetifier:()=>this.tokenIdentifierCodec.decodeNested(e),onCodeMetadata:()=>this.codeMetadataCodec.decodeNested(e),onNothing:()=>this.nothingCodec.decodeNested()})}decodeTopLevel(e,t){return r.onPrimitiveTypeSelect(t,{onBoolean:()=>this.booleanCodec.decodeTopLevel(e),onNumerical:()=>this.numericalCodec.decodeTopLevel(e,t),onAddress:()=>this.addressCodec.decodeTopLevel(e),onBytes:()=>this.bytesCodec.decodeTopLevel(e),onString:()=>this.stringCodec.decodeTopLevel(e),onH256:()=>this.h256Codec.decodeTopLevel(e),onTokenIndetifier:()=>this.tokenIdentifierCodec.decodeTopLevel(e),onCodeMetadata:()=>this.codeMetadataCodec.decodeTopLevel(e),onNothing:()=>this.nothingCodec.decodeTopLevel()})}encodeNested(e){return r.onPrimitiveValueSelect(e,{onBoolean:()=>this.booleanCodec.encodeNested(e),onNumerical:()=>this.numericalCodec.encodeNested(e),onAddress:()=>this.addressCodec.encodeNested(e),onBytes:()=>this.bytesCodec.encodeNested(e),onString:()=>this.stringCodec.encodeNested(e),onH256:()=>this.h256Codec.encodeNested(e),onTypeIdentifier:()=>this.tokenIdentifierCodec.encodeNested(e),onCodeMetadata:()=>this.codeMetadataCodec.encodeNested(e),onNothing:()=>this.nothingCodec.encodeNested()})}encodeTopLevel(e){return r.onPrimitiveValueSelect(e,{onBoolean:()=>this.booleanCodec.encodeTopLevel(e),onNumerical:()=>this.numericalCodec.encodeTopLevel(e),onAddress:()=>this.addressCodec.encodeTopLevel(e),onBytes:()=>this.bytesCodec.encodeTopLevel(e),onString:()=>this.stringCodec.encodeTopLevel(e),onH256:()=>this.h256Codec.encodeTopLevel(e),onTypeIdentifier:()=>this.tokenIdentifierCodec.encodeTopLevel(e),onCodeMetadata:()=>this.codeMetadataCodec.encodeTopLevel(e),onNothing:()=>this.nothingCodec.encodeTopLevel()})}}},1367:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StringBinaryCodec=void 0;const r=n(2747),o=n(1392),i=n(8843);t.StringBinaryCodec=class{constructor(){this.bytesBinaryCodec=new i.BytesBinaryCodec}decodeNested(e){let[t,n]=this.bytesBinaryCodec.decodeNested(e);return[new r.StringValue(t.valueOf().toString()),n]}decodeTopLevel(e){return new r.StringValue(e.toString())}encodeNested(e){let t=o.BytesValue.fromUTF8(e.valueOf());return this.bytesBinaryCodec.encodeNested(t)}encodeTopLevel(e){return Buffer.from(e.valueOf())}}},3551:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StructBinaryCodec=void 0;const r=n(2747),o=n(9995);t.StructBinaryCodec=class{constructor(e){this.fieldsCodec=new o.FieldsBinaryCodec(e)}decodeTopLevel(e,t){let[n]=this.decodeNested(e,t);return n}decodeNested(e,t){let n=t.getFieldsDefinitions(),[o,i]=this.fieldsCodec.decodeNested(e,n);return[new r.Struct(t,o),i]}encodeNested(e){let t=e.getFields();return this.fieldsCodec.encodeNested(t)}encodeTopLevel(e){return this.encodeNested(e)}}},6714:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TokenIdentifierCodec=void 0;const r=n(1392),o=n(3145),i=n(8843);t.TokenIdentifierCodec=class{constructor(){this.bytesCodec=new i.BytesBinaryCodec}decodeNested(e){let[t,n]=this.bytesCodec.decodeNested(e);return[new o.TokenIdentifierValue(t.toString()),n]}decodeTopLevel(e){let t=this.bytesCodec.decodeTopLevel(e);return new o.TokenIdentifierValue(t.toString())}encodeNested(e){let t=r.BytesValue.fromUTF8(e.valueOf());return this.bytesCodec.encodeNested(t)}encodeTopLevel(e){return Buffer.from(e.valueOf())}}},8954:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TupleBinaryCodec=void 0;const r=n(3551);t.TupleBinaryCodec=class{constructor(e){this.structCodec=new r.StructBinaryCodec(e)}decodeTopLevel(e,t){return this.structCodec.decodeTopLevel(e,t)}decodeNested(e,t){return this.structCodec.decodeNested(e,t)}encodeNested(e){return this.structCodec.encodeNested(e)}encodeTopLevel(e){return this.structCodec.encodeTopLevel(e)}}},2528:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResultsParser=void 0;const r=n(2866),o=n(236),i=n(2581),s=n(6458),a=n(1157),d=n(3462);var c,l;!function(e){e.OnTransactionCompleted="completedTxEvent",e.OnSignalError="signalError",e.OnWriteLog="writeLog"}(c||(c={})),function(e){e.TooMuchGas="@too much gas provided for processing"}(l||(l={}));const u={argsSerializer:new a.ArgSerializer};t.ResultsParser=class{constructor(e){e={...u,...e},this.argsSerializer=e.argsSerializer}parseQueryResponse(e,t){let n=e.getReturnDataParts(),r=this.argsSerializer.buffersToValues(n,t.output);return{returnCode:new d.ReturnCode(e.returnCode.toString()),returnMessage:e.returnMessage,values:r,firstValue:r[0],secondValue:r[1],thirdValue:r[2],lastValue:r[r.length-1]}}parseUntypedQueryResponse(e){return{returnCode:new d.ReturnCode(e.returnCode.toString()),returnMessage:e.returnMessage,values:e.getReturnDataParts()}}parseOutcome(e,t){const n=this.parseUntypedOutcome(e);return this.parseOutcomeFromUntypedBundle(n,t)}parseOutcomeFromUntypedBundle(e,t){const n=this.argsSerializer.buffersToValues(e.values,t.output);return{returnCode:e.returnCode,returnMessage:e.returnMessage,values:n,firstValue:n[0],secondValue:n[1],thirdValue:n[2],lastValue:n[n.length-1]}}parseUntypedOutcome(e){let t,n=this.parseTransactionMetadata(e);if(t=this.createBundleOnSimpleMoveBalance(e),t)return s.Logger.trace("parseUntypedOutcome(): on simple move balance"),t;if(t=this.createBundleOnInvalidTransaction(e),t)return s.Logger.trace("parseUntypedOutcome(): on invalid transaction"),t;if(t=this.createBundleOnEasilyFoundResultWithReturnData(e.contractResults),t)return s.Logger.trace("parseUntypedOutcome(): on easily found result with return data"),t;if(t=this.createBundleOnSignalError(e.logs),t)return s.Logger.trace("parseUntypedOutcome(): on signal error"),t;if(t=this.createBundleOnTooMuchGasWarning(e.logs),t)return s.Logger.trace("parseUntypedOutcome(): on 'too much gas' warning"),t;if(t=this.createBundleOnWriteLogWhereFirstTopicEqualsAddress(e.logs,e.sender),t)return s.Logger.trace("parseUntypedOutcome(): on writelog with topics[0] == tx.sender"),t;if(t=this.createBundleWithCustomHeuristics(e,n),t)return s.Logger.trace("parseUntypedOutcome(): with custom heuristics"),t;if(t=this.createBundleWithFallbackHeuristics(e,n),t)return s.Logger.trace("parseUntypedOutcome(): with fallback heuristics"),t;throw new i.ErrCannotParseContractResults(`transaction ${e.hash.toString()}`)}parseTransactionMetadata(e){return(new r.TransactionDecoder).getTransactionMetadata({sender:e.sender.bech32(),receiver:e.receiver.bech32(),data:e.data.toString("base64"),value:e.value.toString()})}createBundleOnSimpleMoveBalance(e){let t=0==e.contractResults.items.length,n=0==e.logs.events.length;return t&&n?{returnCode:d.ReturnCode.None,returnMessage:d.ReturnCode.None.toString(),values:[]}:null}createBundleOnInvalidTransaction(e){return e.status.isInvalid()&&e.receipt.data?{returnCode:d.ReturnCode.OutOfFunds,returnMessage:e.receipt.data,values:[]}:null}createBundleOnEasilyFoundResultWithReturnData(e){let t=e.items.find((e=>0!=e.nonce.valueOf()&&e.data.startsWith("@")));if(!t)return null;let{returnCode:n,returnDataParts:r}=this.sliceDataFieldInParts(t.data),o=t.returnMessage||n.toString();return{returnCode:n,returnMessage:o,values:r}}createBundleOnSignalError(e){let t=e.findSingleOrNoneEvent(c.OnSignalError);if(!t)return null;let{returnCode:n,returnDataParts:r}=this.sliceDataFieldInParts(t.data),o=t.getLastTopic(),i=o?.toString()||n.toString();return{returnCode:n,returnMessage:i,values:r}}createBundleOnTooMuchGasWarning(e){let t=e.findSingleOrNoneEvent(c.OnWriteLog,(e=>null!=e.findFirstOrNoneTopic((e=>e.toString().startsWith(l.TooMuchGas)))));if(!t)return null;let{returnCode:n,returnDataParts:r}=this.sliceDataFieldInParts(t.data);return{returnCode:n,returnMessage:n.toString(),values:r}}createBundleOnWriteLogWhereFirstTopicEqualsAddress(e,t){let n=new o.Address(t.bech32()).hex(),r=e.findSingleOrNoneEvent(c.OnWriteLog,(e=>null!=e.findFirstOrNoneTopic((e=>e.hex()==n))));if(!r)return null;let{returnCode:i,returnDataParts:s}=this.sliceDataFieldInParts(r.data),a=i.toString();return{returnCode:i,returnMessage:a,values:s}}createBundleWithCustomHeuristics(e,t){return null}createBundleWithFallbackHeuristics(e,t){let n=new o.Address(t.receiver);for(const t of e.contractResults.items){let r=t.logs.findSingleOrNoneEvent(c.OnWriteLog,(t=>{let r=t.address.bech32()==e.sender.bech32(),o=t.topics[0]?.hex()==n.hex();return r&&o}));if(r){let{returnCode:e,returnDataParts:t}=this.sliceDataFieldInParts(r.data),n=e.toString();return{returnCode:e,returnMessage:n,values:t}}}for(const t of e.contractResults.items){let e=t.logs.findSingleOrNoneEvent(c.OnWriteLog,(e=>e.address.bech32()==n.toBech32()));if(e){const{returnCode:t,returnDataParts:n}=this.sliceDataFieldInParts(e.data),r=t.toString();return{returnCode:t,returnMessage:r,values:n}}}return null}sliceDataFieldInParts(e){let t=1;e.startsWith("ESDTTransfer")&&(t=3);let n=this.argsSerializer.stringToBuffers(e),r=n[t]||Buffer.from([]),o=n.slice(t+1);if(0==r.length)throw new i.ErrCannotParseContractResults("no return code");return{returnCode:d.ReturnCode.fromBuffer(r),returnDataParts:o}}parseEvent(e,t){const n=e.topics.map((e=>Buffer.from(e.valueOf()))).slice(1),r=e.dataPayload?.valueOf()||Buffer.from([]),o=e.additionalData?.map((e=>Buffer.from(e.valueOf())))||[];return 0===o.length&&r.length&&o.push(Buffer.from(r)),this.doParseEvent({topics:n,dataItems:o,eventDefinition:t})}doParseEvent(e){const t={},n=e.eventDefinition.inputs.filter((e=>e.indexed)),r=this.argsSerializer.buffersToValues(e.topics,n);for(let e=0;e<n.length;e++)t[n[e].name]=r[e].valueOf();const o=e.eventDefinition.inputs.filter((e=>!e.indexed)),i=this.argsSerializer.buffersToValues(e.dataItems,o);for(let e=0;e<o.length;e++)t[o[e].name]=i[e].valueOf();return t}}},3462:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ReturnCode=void 0;class n{constructor(e){this.text=e}static fromBuffer(e){let t=e.toString();return new n(t)}toString(){return this.text}valueOf(){return this.text}equals(e){return!!e&&this.text==e.text}isSuccess(){return this.equals(n.Ok)||this.equals(n.None)}}t.ReturnCode=n,n.None=new n(""),n.Ok=new n("ok"),n.FunctionNotFound=new n("function not found"),n.FunctionWrongSignature=new n("wrong signature for function"),n.ContractNotFound=new n("contract not found"),n.UserError=new n("user error"),n.OutOfGas=new n("out of gas"),n.AccountCollision=new n("account collision"),n.OutOfFunds=new n("out of funds"),n.CallStackOverFlow=new n("call stack overflow"),n.ContractInvalid=new n("contract invalid"),n.ExecutionFailed=new n("execution failed"),n.Unknown=new n("unknown")},8689:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createListOfTokenIdentifiers=t.createListOfAddresses=void 0;const r=n(8551),o=n(926),i=n(3145);t.createListOfAddresses=function(e){let t=e.map((e=>new r.AddressValue(e)));return o.List.fromItems(t)},t.createListOfTokenIdentifiers=function(e){let t=e.map((e=>new i.TokenIdentifierValue(e)));return o.List.fromItems(t)}},2747:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(4966),t),o(n(8551),t),o(n(1055),t),o(n(3979),t),o(n(1392),t),o(n(1847),t),o(n(7472),t),o(n(5730),t),o(n(1414),t),o(n(9229),t),o(n(8689),t),o(n(5766),t),o(n(926),t),o(n(177),t),o(n(1038),t),o(n(4647),t),o(n(8303),t),o(n(5648),t),o(n(1782),t),o(n(4473),t),o(n(6514),t),o(n(7586),t),o(n(3145),t),o(n(1025),t),o(n(7966),t),o(n(7654),t),o(n(5626),t),o(n(6054),t)},5648:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=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 n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.onPrimitiveTypeSelect=t.onPrimitiveValueSelect=t.onTypedValueSelect=t.onTypeSelect=void 0;const s=i(n(2581)),a=n(8551),d=n(3979),c=n(1392),l=n(1847),u=n(1414),f=n(9229),h=n(926),g=n(177),p=n(1038),C=n(4647),v=n(8303),y=n(1782),m=n(4473),T=n(6514),B=n(7586),b=n(3145),N=n(1025),O=n(5626);t.onTypeSelect=function(e,t){if(e.hasExactClass(h.OptionType.ClassName))return t.onOption();if(e.hasExactClass(h.ListType.ClassName))return t.onList();if(e.hasExactClass(g.ArrayVecType.ClassName))return t.onArray();if(e.hasClassOrSuperclass(O.PrimitiveType.ClassName))return t.onPrimitive();if(e.hasExactClass(B.StructType.ClassName))return t.onStruct();if(e.hasExactClass(N.TupleType.ClassName))return t.onTuple();if(e.hasExactClass(u.EnumType.ClassName))return t.onEnum();if(e.hasExactClass(f.ExplicitEnumType.ClassName))return t.onExplicitEnum();if(e.hasExactClass(C.ManagedDecimalType.ClassName))return t.onManagedDecimal();if(e.hasExactClass(v.ManagedDecimalSignedType.ClassName))return t.onManagedDecimalSigned();if(t.onOther)return t.onOther();throw new s.ErrTypingSystem(`type isn't known: ${e}`)},t.onTypedValueSelect=function(e,t){if(e.hasClassOrSuperclass(O.PrimitiveValue.ClassName))return t.onPrimitive();if(e.hasExactClass(h.OptionValue.ClassName))return t.onOption();if(e.hasExactClass(h.List.ClassName))return t.onList();if(e.hasExactClass(g.ArrayVec.ClassName))return t.onArray();if(e.hasExactClass(B.Struct.ClassName))return t.onStruct();if(e.hasExactClass(N.Tuple.ClassName))return t.onTuple();if(e.hasExactClass(u.EnumValue.ClassName))return t.onEnum();if(e.hasExactClass(f.ExplicitEnumValue.ClassName))return t.onExplicitEnum();if(e.hasExactClass(C.ManagedDecimalValue.ClassName))return t.onManagedDecimal();if(e.hasExactClass(v.ManagedDecimalSignedValue.ClassName))return t.onManagedDecimalSigned();if(t.onOther)return t.onOther();throw new s.ErrTypingSystem(`value isn't typed: ${e}`)},t.onPrimitiveValueSelect=function(e,t){if(e.hasExactClass(d.BooleanValue.ClassName))return t.onBoolean();if(e.hasClassOrSuperclass(m.NumericalValue.ClassName))return t.onNumerical();if(e.hasExactClass(a.AddressValue.ClassName))return t.onAddress();if(e.hasExactClass(c.BytesValue.ClassName))return t.onBytes();if(e.hasExactClass(T.StringValue.ClassName))return t.onString();if(e.hasExactClass(p.H256Value.ClassName))return t.onH256();if(e.hasExactClass(b.TokenIdentifierValue.ClassName))return t.onTypeIdentifier();if(e.hasExactClass(l.CodeMetadataValue.ClassName))return t.onCodeMetadata();if(e.hasExactClass(y.NothingValue.ClassName))return t.onNothing();if(t.onOther)return t.onOther();throw new s.ErrTypingSystem(`value isn't a primitive: ${e.getType()}`)},t.onPrimitiveTypeSelect=function(e,t){if(e.hasExactClass(d.BooleanType.ClassName))return t.onBoolean();if(e.hasClassOrSuperclass(m.NumericalType.ClassName))return t.onNumerical();if(e.hasExactClass(a.AddressType.ClassName))return t.onAddress();if(e.hasExactClass(c.BytesType.ClassName))return t.onBytes();if(e.hasExactClass(T.StringType.ClassName))return t.onString();if(e.hasExactClass(p.H256Type.ClassName))return t.onH256();if(e.hasExactClass(b.TokenIdentifierType.ClassName))return t.onTokenIndetifier();if(e.hasExactClass(l.CodeMetadataType.ClassName))return t.onCodeMetadata();if(e.hasExactClass(y.NothingType.ClassName))return t.onNothing();if(t.onOther)return t.onOther();throw new s.ErrTypingSystem(`type isn't a known primitive: ${e}`)}},2866:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TokenTransferProperties=t.TransactionMetadataTransfer=t.TransactionMetadata=t.TransactionToDecode=t.TransactionDecoder=void 0;const r=n(8603);t.TransactionDecoder=class{getTransactionMetadata(e){const t=this.getNormalTransactionMetadata(e),n=this.getEsdtTransactionMetadata(t);if(n)return n;const r=this.getNftTransferMetadata(t);if(r)return r;return this.getMultiTransferMetadata(t)||t}getNormalTransactionMetadata(e){const t=new i;if(t.sender=e.sender,t.receiver=e.receiver,t.value=BigInt(e.value),e.data){const n=this.base64Decode(e.data).split("@"),r=n.slice(1);if(r.every((e=>this.isSmartContractArgument(e)))&&(t.functionName=n[0],t.functionArgs=r),"relayedTx"===t.functionName&&t.functionArgs&&1===t.functionArgs.length)try{const e=JSON.parse(this.hexToString(t.functionArgs[0]));return e.value=e.value.toString(),e.sender=this.bech32Encode(this.base64ToHex(e.sender)),e.receiver=this.bech32Encode(this.base64ToHex(e.receiver)),this.getNormalTransactionMetadata(e)}catch(e){}if("relayedTxV2"===t.functionName&&t.functionArgs&&4===t.functionArgs.length)try{const n=new o;return n.sender=e.receiver,n.receiver=this.bech32Encode(t.functionArgs[0]),n.data=this.base64Encode(this.hexToString(t.functionArgs[2])),n.value="0",this.getNormalTransactionMetadata(n)}catch(e){}}return t}getMultiTransferMetadata(e){if(e.sender!==e.receiver)return;if("MultiESDTNFTTransfer"!==e.functionName)return;const t=e.functionArgs;if(!t)return;if(t.length<3)return;if(!this.isAddressValid(t[0]))return;const n=this.bech32Encode(t[0]),r=this.hexToNumber(t[1]),o=new i;o.transfers||(o.transfers=[]);let s=2;for(let e=0;e<r;e++){const e=this.hexToString(t[s++]),n=t[s++],r=this.hexToBigInt(t[s++]);n?o.transfers.push({value:r,properties:{collection:e,identifier:`${e}-${n}`}}):o.transfers.push({value:r,properties:{token:e}})}return o.sender=e.sender,o.receiver=n,t.length>s&&(o.functionName=this.hexToString(t[s++]),o.functionArgs=t.slice(s++)),o}getNftTransferMetadata(e){if(e.sender!==e.receiver)return;if("ESDTNFTTransfer"!==e.functionName)return;const t=e.functionArgs;if(!t)return;if(t.length<4)return;if(!this.isAddressValid(t[3]))return;const n=this.hexToString(t[0]),r=t[1],o=this.hexToBigInt(t[2]),s=this.bech32Encode(t[3]),a=new i;return a.sender=e.sender,a.receiver=s,a.value=o,t.length>4&&(a.functionName=this.hexToString(t[4]),a.functionArgs=t.slice(5)),a.transfers=[{value:o,properties:{collection:n,identifier:`${n}-${r}`}}],a}base64Encode(e){return Buffer.from(e).toString("base64")}base64Decode(e){return Buffer.from(e,"base64").toString("binary")}hexToNumber(e){return parseInt(e,16)}getEsdtTransactionMetadata(e){if("ESDTTransfer"!==e.functionName)return;const t=e.functionArgs;if(!t)return;if(t.length<2)return;const n=this.hexToString(t[0]),r=this.hexToBigInt(t[1]),o=new i;return o.sender=e.sender,o.receiver=e.receiver,t.length>2&&(o.functionName=this.hexToString(t[2]),o.functionArgs=t.slice(3)),o.transfers=[{value:r,properties:{identifier:n}}],o.value=r,o}bech32Encode(e){const t=Buffer.from(e,"hex"),n=r.bech32.toWords(t);return r.bech32.encode("erd",n)}isAddressValid(e){return 32==Buffer.from(e,"hex").length}isSmartContractArgument(e){return!!this.isHex(e)&&e.length%2==0}isHex(e){return!1===new RegExp(/[^a-f0-9]/gi).test(e)}base64ToHex(e){return Buffer.from(e,"base64").toString("hex")}hexToString(e){return Buffer.from(e,"hex").toString("ascii")}hexToBigInt(e){return e?BigInt("0x"+e):BigInt(0)}};class o{constructor(){this.sender="",this.receiver="",this.data="",this.value="0"}}t.TransactionToDecode=o;class i{constructor(){this.sender="",this.receiver="",this.value=BigInt(0)}}t.TransactionMetadata=i,t.TransactionMetadataTransfer=class{constructor(){this.value=BigInt(0)}},t.TokenTransferProperties=class{}},8603:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.bech32m=t.bech32=void 0;const n="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={};for(let e=0;e<32;e++){const t=n.charAt(e);r[t]=e}function o(e){const t=e>>25;return(33554431&e)<<5^996825010&-(1&t)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function i(e){let t=1;for(let n=0;n<e.length;++n){const r=e.charCodeAt(n);if(r<33||r>126)return"Invalid prefix ("+e+")";t=o(t)^r>>5}t=o(t);for(let n=0;n<e.length;++n){const r=e.charCodeAt(n);t=o(t)^31&r}return t}function s(e,t,n,r){let o=0,i=0;const s=(1<<n)-1,a=[];for(let r=0;r<e.length;++r)for(o=o<<t|e[r],i+=t;i>=n;)i-=n,a.push(o>>i&s);if(r)i>0&&a.push(o<<n-i&s);else{if(i>=t)return"Excess padding";if(o<<n-i&s)return"Non-zero padding"}return a}function a(e){return s(e,8,5,!0)}function d(e){const t=s(e,5,8,!1);if(Array.isArray(t))return t}function c(e){const t=s(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}function l(e){let t;function s(e,n){if(n=n||90,e.length<8)return e+" too short";if(e.length>n)return"Exceeds length limit";const s=e.toLowerCase(),a=e.toUpperCase();if(e!==s&&e!==a)return"Mixed-case string "+e;const d=(e=s).lastIndexOf("1");if(-1===d)return"No separator character for "+e;if(0===d)return"Missing prefix for "+e;const c=e.slice(0,d),l=e.slice(d+1);if(l.length<6)return"Data too short";let u=i(c);if("string"==typeof u)return u;const f=[];for(let e=0;e<l.length;++e){const t=l.charAt(e),n=r[t];if(void 0===n)return"Unknown character "+t;u=o(u)^n,e+6>=l.length||f.push(n)}return u!==t?"Invalid checksum for "+e:{prefix:c,words:f}}return t="bech32"===e?1:734539939,{decodeUnsafe:function(e,t){const n=s(e,t);if("object"==typeof n)return n},decode:function(e,t){const n=s(e,t);if("object"==typeof n)return n;throw new Error(n)},encode:function(e,r,s){if(s=s||90,e.length+7+r.length>s)throw new TypeError("Exceeds length limit");let a=i(e=e.toLowerCase());if("string"==typeof a)throw new Error(a);let d=e+"1";for(let e=0;e<r.length;++e){const t=r[e];if(t>>5)throw new Error("Non 5-bit word");a=o(a)^t,d+=n.charAt(t)}for(let e=0;e<6;++e)a=o(a);a^=t;for(let e=0;e<6;++e)d+=n.charAt(a>>5*(5-e)&31);return d},toWords:a,fromWordsUnsafe:d,fromWords:c}}t.bech32=l("bech32"),t.bech32m=l("bech32m")}};
|
package/dist/54.cjs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_xoxno_sdk_js=self.webpackChunk_xoxno_sdk_js||[]).push([[54],{6054:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VariadicValue=t.CountedVariadicType=t.VariadicType=void 0;const a=s(5626);class r extends a.Type{constructor(e,t=!1){super("Variadic",[e],a.TypeCardinality.variable()),this.isCounted=t}getClassName(){return r.ClassName}}t.VariadicType=r,r.ClassName="VariadicType";class i extends a.Type{constructor(e){super("Variadic",[e],a.TypeCardinality.variable())}getClassName(){return r.ClassName}}t.CountedVariadicType=i,i.ClassName="VariadicType";class n extends a.TypedValue{constructor(e,t){super(e),this.items=t}getClassName(){return n.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 n(new r(new a.TypePlaceholder,t),[]);const s=e[0].getType();return new n(new r(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=n,n.ClassName="VariadicValue"}}]);
|
package/dist/54.esm.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const __webpack_id__=54;export const __webpack_ids__=[54];export const __webpack_modules__={6054:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VariadicValue=t.CountedVariadicType=t.VariadicType=void 0;const s=a(5626);class r extends s.Type{constructor(e,t=!1){super("Variadic",[e],s.TypeCardinality.variable()),this.isCounted=t}getClassName(){return r.ClassName}}t.VariadicType=r,r.ClassName="VariadicType";class i extends s.Type{constructor(e){super("Variadic",[e],s.TypeCardinality.variable())}getClassName(){return r.ClassName}}t.CountedVariadicType=i,i.ClassName="VariadicType";class n extends s.TypedValue{constructor(e,t){super(e),this.items=t}getClassName(){return n.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 n(new r(new s.TypePlaceholder,t),[]);const a=e[0].getType();return new n(new r(a,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 a=this.items[t],s=e.items[t];if(!a.equals(s))return!1}return!0}}t.VariadicValue=n,n.ClassName="VariadicValue"}};
|
package/dist/586.cjs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_xoxno_sdk_js=self.webpackChunk_xoxno_sdk_js||[]).push([[242,586],{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 r=s(8095);class i{parseExpression(e){e=e.trim();const t=this.tokenizeExpression(e).filter((e=>e!==i.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(i.PUNCTUATION.includes(s[0]))throw new Error("Unexpected root element.");const n=s[0];if(n instanceof r.TypeFormula)return n;if("string"==typeof n)return new r.TypeFormula(n,[]);throw new Error(`Unexpected item on stack: ${n}`)}tokenizeExpression(e){const t=[];let s="";for(const r of e)this.isPunctuation(r)?(s&&(t.push(s.trim()),s=""),t.push(r)):s+=r;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 r.TypeFormula(s,[],e)}return new r.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 r.TypeFormula)t.push(s);else{if("string"!=typeof s)throw new Error(`Unexpected type parameter object in stack: ${s}`);t.push(new r.TypeFormula(s,[]))}}return t}isPunctuation(e){return i.PUNCTUATION.includes(e)}isEndOfTypeParameters(e){return e===i.END_TYPE_PARAMETERS}isBeginningOfTypeParameters(e){return e===i.BEGIN_TYPE_PARAMETERS}}t.TypeFormulaParser=i,i.BEGIN_TYPE_PARAMETERS="<",i.END_TYPE_PARAMETERS=">",i.COMMA=",",i.PUNCTUATION=[i.COMMA,i.BEGIN_TYPE_PARAMETERS,i.END_TYPE_PARAMETERS]},5766:function(e,t,s){var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=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)&&r(t,e,s);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Fields=t.Field=t.FieldDefinition=void 0;const a=n(s(2581)),o=s(7966);class l{constructor(e,t,s){this.name=e,this.description=t,this.type=s}static fromJSON(e){let t=(new o.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 a.ErrTypingSystem(`check type of field "${e.name}; expected: ${e.type}, actual: ${t}"`);if(this.name!=e.name)throw new a.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 a.ErrTypingSystem("fields length vs. field definitions length");for(let s=0;s<e.length;s++){let r=e[s],i=t[s];r.checkTyping(i)}}static equals(e,t){if(e.length!=t.length)return!1;for(let s=0;s<e.length;s++){let r=e[s],i=t[s];if(!r.equals(i))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)]}}},7586:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Struct=t.StructType=void 0;const r=s(2581),i=s(5766),n=s(5626);class a extends n.CustomType{constructor(e,t){super(e),this.fieldsDefinitions=[],this.fieldsDefinitions=t}getClassName(){return a.ClassName}static fromJSON(e){let t=(e.fields||[]).map((e=>i.FieldDefinition.fromJSON(e)));return new a(e.name,t)}getFieldsDefinitions(){return this.fieldsDefinitions}getFieldDefinition(e){return this.fieldsDefinitions.find((t=>t.name==e))}getNamesOfDependencies(){return i.Fields.getNamesOfTypeDependencies(this.fieldsDefinitions)}}t.StructType=a,a.ClassName="StructType";class o extends n.TypedValue{constructor(e,t){super(e),this.fields=t,this.fieldsByName=new Map(t.map((e=>[e.name,e]))),this.checkTyping()}getClassName(){return o.ClassName}checkTyping(){let e=this.getType().getFieldsDefinitions();i.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 r.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 i.Fields.equals(t,s)}}t.Struct=o,o.ClassName="Struct"},7966:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeExpressionParser=void 0;const r=s(9132),i=s(2581),n=s(5626);t.TypeExpressionParser=class{constructor(){this.backingTypeFormulaParser=new r.TypeFormulaParser}parse(e){try{return this.doParse(e)}catch(t){throw new i.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 n.Type(e.name,t,void 0,e.metadata)}}}}]);
|
package/dist/586.esm.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const __webpack_id__=586;export const __webpack_ids__=[242,586];export const __webpack_modules__={8095:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeFormula=void 0,t.TypeFormula=class{constructor(e,t,r){this.name=e,this.typeParameters=t,this.metadata=r}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,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeFormulaParser=void 0;const s=r(8095);class i{parseExpression(e){e=e.trim();const t=this.tokenizeExpression(e).filter((e=>e!==i.COMMA)),r=[];for(const e of t)if(this.isPunctuation(e))if(this.isEndOfTypeParameters(e)){const e=this.acquireTypeWithParameters(r);r.push(e)}else{if(!this.isBeginningOfTypeParameters(e))throw new Error(`Unexpected token (punctuation): ${e}`);r.push(e)}else r.push(e);if(1!==r.length)throw new Error(`Unexpected stack length at end of parsing: ${r.length}`);if(i.PUNCTUATION.includes(r[0]))throw new Error("Unexpected root element.");const n=r[0];if(n instanceof s.TypeFormula)return n;if("string"==typeof n)return new s.TypeFormula(n,[]);throw new Error(`Unexpected item on stack: ${n}`)}tokenizeExpression(e){const t=[];let r="";for(const s of e)this.isPunctuation(s)?(r&&(t.push(r.trim()),r=""),t.push(s)):r+=s;return r&&t.push(r.trim()),t}acquireTypeWithParameters(e){const t=this.acquireTypeParameters(e),r=e.pop();if("ManagedDecimal"===r||"ManagedDecimalSigned"===r){const e=t[0].name;return new s.TypeFormula(r,[],e)}return new s.TypeFormula(r,t.reverse())}acquireTypeParameters(e){const t=[];for(;;){const r=e.pop();if(void 0===r)throw new Error("Badly specified type parameters");if(this.isBeginningOfTypeParameters(r))break;if(r instanceof s.TypeFormula)t.push(r);else{if("string"!=typeof r)throw new Error(`Unexpected type parameter object in stack: ${r}`);t.push(new s.TypeFormula(r,[]))}}return t}isPunctuation(e){return i.PUNCTUATION.includes(e)}isEndOfTypeParameters(e){return e===i.END_TYPE_PARAMETERS}isBeginningOfTypeParameters(e){return e===i.BEGIN_TYPE_PARAMETERS}}t.TypeFormulaParser=i,i.BEGIN_TYPE_PARAMETERS="<",i.END_TYPE_PARAMETERS=">",i.COMMA=",",i.PUNCTUATION=[i.COMMA,i.BEGIN_TYPE_PARAMETERS,i.END_TYPE_PARAMETERS]},5766:function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){void 0===s&&(s=r),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,s){void 0===s&&(s=r),e[s]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&s(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Fields=t.Field=t.FieldDefinition=void 0;const a=n(r(2581)),o=r(7966);class l{constructor(e,t,r){this.name=e,this.description=t,this.type=r}static fromJSON(e){let t=(new o.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 a.ErrTypingSystem(`check type of field "${e.name}; expected: ${e.type}, actual: ${t}"`);if(this.name!=e.name)throw new a.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 a.ErrTypingSystem("fields length vs. field definitions length");for(let r=0;r<e.length;r++){let s=e[r],i=t[r];s.checkTyping(i)}}static equals(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++){let s=e[r],i=t[r];if(!s.equals(i))return!1}return!0}static getNamesOfTypeDependencies(e){const t=[];for(const r of e)t.push(r.type.getName()),t.push(...r.type.getNamesOfDependencies());return[...new Set(t)]}}},7586:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Struct=t.StructType=void 0;const s=r(2581),i=r(5766),n=r(5626);class a extends n.CustomType{constructor(e,t){super(e),this.fieldsDefinitions=[],this.fieldsDefinitions=t}getClassName(){return a.ClassName}static fromJSON(e){let t=(e.fields||[]).map((e=>i.FieldDefinition.fromJSON(e)));return new a(e.name,t)}getFieldsDefinitions(){return this.fieldsDefinitions}getFieldDefinition(e){return this.fieldsDefinitions.find((t=>t.name==e))}getNamesOfDependencies(){return i.Fields.getNamesOfTypeDependencies(this.fieldsDefinitions)}}t.StructType=a,a.ClassName="StructType";class o extends n.TypedValue{constructor(e,t){super(e),this.fields=t,this.fieldsByName=new Map(t.map((e=>[e.name,e]))),this.checkTyping()}getClassName(){return o.ClassName}checkTyping(){let e=this.getType().getFieldsDefinitions();i.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 s.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(),r=e.getFields();return i.Fields.equals(t,r)}}t.Struct=o,o.ClassName="Struct"},7966:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeExpressionParser=void 0;const s=r(9132),i=r(2581),n=r(5626);t.TypeExpressionParser=class{constructor(){this.backingTypeFormulaParser=new s.TypeFormulaParser}parse(e){try{return this.doParse(e)}catch(t){throw new i.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 n.Type(e.name,t,void 0,e.metadata)}}}};
|
package/dist/626.cjs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_xoxno_sdk_js=self.webpackChunk_xoxno_sdk_js||[]).push([[626],{2581:(e,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ErrContractQuery=r.ErrNetworkProvider=r.ErrBadAddress=r.ErrSignerCannotSign=r.ErrBadPEM=r.ErrBadMnemonicEntropy=r.ErrWrongMnemonic=r.ErrSmartContractQuery=r.ErrParseTransactionOutcome=r.ErrInvalidInnerTransaction=r.ErrBadUsage=r.ErrInvalidTokenIdentifier=r.ErrIsCompletedFieldIsMissingOnTransaction=r.ErrGasLimitShouldBe0ForInnerTransaction=r.ErrInvalidRelayedV2BuilderArguments=r.ErrInvalidRelayedV1BuilderArguments=r.ErrNotImplemented=r.ErrContractInteraction=r.ErrCodec=r.ErrCannotParseTransactionOutcome=r.ErrCannotParseContractResults=r.ErrMissingFieldOnEnum=r.ErrMissingFieldOnStruct=r.ErrTypingSystem=r.ErrMock=r.ErrContractHasNoAddress=r.ErrContract=r.ErrExpectedTransactionEventsNotFound=r.ErrExpectedTransactionStatusNotReached=r.ErrTransactionWatcherTimeout=r.ErrAsyncTimerAborted=r.ErrAsyncTimerAlreadyRunning=r.ErrInvalidFunctionName=r.ErrSignatureCannotCreate=r.ErrTransactionOptionsInvalid=r.ErrTransactionVersionInvalid=r.ErrNonceInvalid=r.ErrNotEnoughGas=r.ErrAddressEmpty=r.ErrAddressBadHrp=r.ErrAddressCannotCreate=r.ErrUnexpectedCondition=r.ErrInvariantFailed=r.ErrBadType=r.ErrUnsupportedOperation=r.ErrInvalidArgument=r.Err=void 0;class t extends Error{constructor(e,r){super(e),this.inner=void 0,this.inner=r}summary(){const e=[];e.push({name:this.name,message:this.message});let r=this.inner;for(;r;)e.push({name:r.name,message:r.message}),r=r.inner;return e}}r.Err=t,r.ErrInvalidArgument=class extends t{constructor(e,r){super(`Invalid argument: ${e}`,r)}},r.ErrUnsupportedOperation=class extends t{constructor(e,r="not specified"){super(`Operation "${e}" not supported. Reason: ${r}`)}},r.ErrBadType=class extends t{constructor(e,r,t){super(`Bad type of "${e}": ${t}. Expected type: ${r}`)}},r.ErrInvariantFailed=class extends t{constructor(e){super(`Invariant failed: [${e}]`)}},r.ErrUnexpectedCondition=class extends t{constructor(e){super(`Unexpected condition: [${e}]`)}},r.ErrAddressCannotCreate=class extends t{constructor(e,r){super(`Cannot create address from: ${e}`,r)}},r.ErrAddressBadHrp=class extends t{constructor(e,r){super(`Wrong address HRP. Expected: ${e}, got ${r}`)}},r.ErrAddressEmpty=class extends t{constructor(){super("Address is empty")}},r.ErrNotEnoughGas=class extends t{constructor(e){super(`Not enough gas provided: ${e}`)}},r.ErrNonceInvalid=class extends t{constructor(e){super(`Invalid nonce: ${e}`)}},r.ErrTransactionVersionInvalid=class extends t{constructor(e){super(`Invalid transaction version: ${e}`)}},r.ErrTransactionOptionsInvalid=class extends t{constructor(e){super(`Invalid transaction options: ${e}`)}},r.ErrSignatureCannotCreate=class extends t{constructor(e,r){super(`Cannot create signature from: ${e}`,r)}},r.ErrInvalidFunctionName=class extends t{constructor(){super("Invalid function name")}},r.ErrAsyncTimerAlreadyRunning=class extends t{constructor(){super("Async timer already running")}},r.ErrAsyncTimerAborted=class extends t{constructor(){super("Async timer aborted")}},r.ErrTransactionWatcherTimeout=class extends t{constructor(){super("TransactionWatcher has timed out")}},r.ErrExpectedTransactionStatusNotReached=class extends t{constructor(){super("Expected transaction status not reached")}},r.ErrExpectedTransactionEventsNotFound=class extends t{constructor(){super("Expected transaction events not found")}};class s extends t{constructor(e){super(e)}}r.ErrContract=s,r.ErrContractHasNoAddress=class extends s{constructor(){super("\nThe smart contract has no address set. Make sure you provide the address in the constructor, or call setAddress() appropriately.\nIf you need to recompute the address of the contract, make use of SmartContract.computeAddress() (static method). \n")}},r.ErrMock=class extends t{constructor(e){super(e)}},r.ErrTypingSystem=class extends t{constructor(e){super(e)}},r.ErrMissingFieldOnStruct=class extends t{constructor(e,r){super(`field ${e} does not exist on struct ${r}`)}},r.ErrMissingFieldOnEnum=class extends t{constructor(e,r){super(`field ${e} does not exist on enum ${r}`)}},r.ErrCannotParseContractResults=class extends t{constructor(e){super(`cannot parse contract results: ${e}`)}},r.ErrCannotParseTransactionOutcome=class extends t{constructor(e,r){super(`cannot parse outcome of transaction ${e}: ${r}`)}},r.ErrCodec=class extends t{constructor(e){super(e)}},r.ErrContractInteraction=class extends t{constructor(e){super(e)}},r.ErrNotImplemented=class extends t{constructor(){super("Method not yet implemented")}},r.ErrInvalidRelayedV1BuilderArguments=class extends t{constructor(){super("invalid arguments for relayed v1 builder")}},r.ErrInvalidRelayedV2BuilderArguments=class extends t{constructor(){super("invalid arguments for relayed v2 builder")}},r.ErrGasLimitShouldBe0ForInnerTransaction=class extends t{constructor(){super("gas limit must be 0 for the inner transaction for relayed v2")}},r.ErrIsCompletedFieldIsMissingOnTransaction=class extends t{constructor(){super("The transaction watcher requires the `isCompleted` property to be defined on the transaction object. Perhaps you've used the sdk-network-provider's `ProxyNetworkProvider.getTransaction()` and in that case you should also pass `withProcessStatus=true`.")}},r.ErrInvalidTokenIdentifier=class extends t{constructor(e){super(e)}},r.ErrBadUsage=class extends t{constructor(e){super(e)}},r.ErrInvalidInnerTransaction=class extends t{constructor(e){super(e)}},r.ErrParseTransactionOutcome=class extends t{constructor(e){super(e)}},r.ErrSmartContractQuery=class extends t{constructor(e,r){super(r),this.returnCode=e}},r.ErrWrongMnemonic=class extends t{constructor(){super("Wrong mnemonic format")}},r.ErrBadMnemonicEntropy=class extends t{constructor(e){super("Bad mnemonic entropy",e)}},r.ErrBadPEM=class extends t{constructor(e){super(e?`Bad PEM: ${e}`:"Bad PEM")}},r.ErrSignerCannotSign=class extends t{constructor(e){super("Cannot sign",e)}},r.ErrBadAddress=class extends t{constructor(e,r){super(`Bad address: ${e}`,r)}},r.ErrNetworkProvider=class extends t{constructor(e,r,t){super(`Request error on url [${e}]: [${r}]`,t)}},r.ErrContractQuery=class extends t{constructor(e){super(e.message.replace("executeQuery:",""))}}},8444:(e,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.getJavascriptPrototypesInHierarchy=void 0,r.getJavascriptPrototypesInHierarchy=function(e,r){let t=[],s=Object.getPrototypeOf(e);for(;s&&r(s);)t.push(s),s=Object.getPrototypeOf(s);return t}},5626:(e,r,t)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.NullType=r.TypePlaceholder=r.isTyped=r.PrimitiveValue=r.TypedValue=r.CustomType=r.PrimitiveType=r.TypeCardinality=r.Type=void 0;const s=t(8444),n=t(1069);class a{constructor(e,r=[],t=o.fixed(1),s){n.guardValueIsSet("name",e),this.name=e,this.typeParameters=r,this.cardinality=t,this.metadata=s}getName(){return this.name}getClassName(){return a.ClassName}getClassHierarchy(){return s.getJavascriptPrototypesInHierarchy(this,(e=>e.belongsToTypesystem)).map((e=>e.getClassName())).reverse()}getFullyQualifiedName(){return this.isGenericType()||this.hasMetadata()?this.getFullNameForGeneric():`multiversx:types:${this.getName()}`}getFullNameForGeneric(){const e=this.getTypeParameters().length>0,r=e?`${this.getTypeParameters().map((e=>e.getFullyQualifiedName())).join(", ")}`:"";let t=`multiversx:types:${this.getName()}`;return e&&(t=`${t}<${r}>`),void 0!==this.metadata&&(t=`${t}*${this.metadata}*`),t}hasExactClass(e){return this.getClassName()==e}hasClassOrSuperclass(e){return this.getClassHierarchy().includes(e)}getTypeParameters(){return this.typeParameters}getMetadata(){return this.metadata}isGenericType(){return this.typeParameters.length>0}hasMetadata(){return!!this.metadata}getFirstTypeParameter(){return n.guardTrue(this.typeParameters.length>0,"type parameters length > 0"),this.typeParameters[0]}toString(){let e=this.getTypeParameters().map((e=>e.toString())).join(", "),r=e?`<${e}>`:"";return`${this.name}${r}`}equals(e){return a.equals(this,e)}static equals(e,r){return e.getFullyQualifiedName()==r.getFullyQualifiedName()}static equalsMany(e,r){return e.every(((e,t)=>e.equals(r[t])))}static isAssignableFromMany(e,r){return e.every(((e,t)=>e.isAssignableFrom(r[t])))}differs(e){return!this.equals(e)}valueOf(){return this.name}isAssignableFrom(e){if(!a.equalsMany(this.getTypeParameters(),e.getTypeParameters()))return!1;let r=this.getFullyQualifiedName();return!!a.getFullyQualifiedNamesInHierarchy(e).includes(r)||e.hasClassOrSuperclass(this.getClassName())}static getFullyQualifiedNamesInHierarchy(e){return s.getJavascriptPrototypesInHierarchy(e,(e=>e.belongsToTypesystem)).map((r=>r.getFullyQualifiedName.call(e)))}getNamesOfDependencies(){const e=[];for(const r of this.typeParameters)e.push(r.getName()),e.push(...r.getNamesOfDependencies());return[...new Set(e)]}toJSON(){return{name:this.name,typeParameters:this.typeParameters.map((e=>e.toJSON()))}}getCardinality(){return this.cardinality}belongsToTypesystem(){}}r.Type=a,a.ClassName="Type";class o{constructor(e,r){this.lowerBound=e,this.upperBound=r}static fixed(e){return new o(e,e)}static variable(e){return new o(0,e)}isSingular(){return 1==this.lowerBound&&1==this.upperBound}isSingularOrNone(){return 0==this.lowerBound&&1==this.upperBound}isComposite(){return 1!=this.upperBound}isFixed(){return this.lowerBound==this.upperBound}getLowerBound(){return this.lowerBound}getUpperBound(){return this.upperBound||o.MaxCardinality}}r.TypeCardinality=o,o.MaxCardinality=4096;class i extends a{constructor(e){super(e)}getClassName(){return i.ClassName}}r.PrimitiveType=i,i.ClassName="PrimitiveType";class u extends a{getClassName(){return u.ClassName}}r.CustomType=u,u.ClassName="CustomType";class c{constructor(e){this.type=e}getClassName(){return c.ClassName}getClassHierarchy(){return s.getJavascriptPrototypesInHierarchy(this,(e=>e.belongsToTypesystem)).map((e=>e.getClassName())).reverse()}getType(){return this.type}hasExactClass(e){return this.getClassName()==e}hasClassOrSuperclass(e){return this.getClassHierarchy().includes(e)}belongsToTypesystem(){}}r.TypedValue=c,c.ClassName="TypedValue";class d extends c{constructor(e){super(e)}getClassName(){return d.ClassName}}r.PrimitiveValue=d,d.ClassName="PrimitiveValue",r.isTyped=function(e){return void 0!==e.belongsToTypesystem};class l extends a{constructor(){super("...")}getClassName(){return l.ClassName}}r.TypePlaceholder=l,l.ClassName="TypePlaceholder";class p extends a{constructor(){super("?")}getClassName(){return p.ClassName}}r.NullType=p,p.ClassName="NullType"},1069:function(e,r,t){var s=this&&this.__createBinding||(Object.create?function(e,r,t,s){void 0===s&&(s=t),Object.defineProperty(e,s,{enumerable:!0,get:function(){return r[t]}})}:function(e,r,t,s){void 0===s&&(s=t),e[s]=r[t]}),n=this&&this.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)"default"!==t&&Object.prototype.hasOwnProperty.call(e,t)&&s(r,e,t);return n(r,e),r};Object.defineProperty(r,"__esModule",{value:!0}),r.getAxios=r.isEmpty=r.guardEmpty=r.guardNotEmpty=r.guardLength=r.guardSameLength=r.guardValueIsSetWithMessage=r.guardValueIsSet=r.guardTrue=void 0;const o=a(t(2581));function i(e,r){if(null==r||void 0===r)throw new o.ErrInvariantFailed(e)}function u(e){return e.isEmpty?e.isEmpty():0===e.length}r.guardTrue=function(e,r){if(!e)throw new o.ErrInvariantFailed(`[<${r}>] isn't true`)},r.guardValueIsSet=function(e,r){i(`${e} isn't set (null or undefined)`,r)},r.guardValueIsSetWithMessage=i,r.guardSameLength=function(e,r){if(r=r||[],(e=e||[]).length!=r.length)throw new o.ErrInvariantFailed("arrays do not have the same length")},r.guardLength=function(e,r){let t=e.length||0;if(t!=r)throw new o.ErrInvariantFailed(`wrong length, expected: ${r}, actual: ${t}`)},r.guardNotEmpty=function(e,r){if(u(e))throw new o.ErrInvariantFailed(`${r} is empty`)},r.guardEmpty=function(e,r){if(!u(e))throw new o.ErrInvariantFailed(`${r} is not empty`)},r.isEmpty=u,r.getAxios=function(){try{return t(6425)}catch(e){throw new Error("axios is required but not installed. Please install axios to make network requests.")}}}}]);
|
package/dist/626.esm.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const __webpack_id__=626;export const __webpack_ids__=[626];export const __webpack_modules__={2581:(e,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ErrContractQuery=r.ErrNetworkProvider=r.ErrBadAddress=r.ErrSignerCannotSign=r.ErrBadPEM=r.ErrBadMnemonicEntropy=r.ErrWrongMnemonic=r.ErrSmartContractQuery=r.ErrParseTransactionOutcome=r.ErrInvalidInnerTransaction=r.ErrBadUsage=r.ErrInvalidTokenIdentifier=r.ErrIsCompletedFieldIsMissingOnTransaction=r.ErrGasLimitShouldBe0ForInnerTransaction=r.ErrInvalidRelayedV2BuilderArguments=r.ErrInvalidRelayedV1BuilderArguments=r.ErrNotImplemented=r.ErrContractInteraction=r.ErrCodec=r.ErrCannotParseTransactionOutcome=r.ErrCannotParseContractResults=r.ErrMissingFieldOnEnum=r.ErrMissingFieldOnStruct=r.ErrTypingSystem=r.ErrMock=r.ErrContractHasNoAddress=r.ErrContract=r.ErrExpectedTransactionEventsNotFound=r.ErrExpectedTransactionStatusNotReached=r.ErrTransactionWatcherTimeout=r.ErrAsyncTimerAborted=r.ErrAsyncTimerAlreadyRunning=r.ErrInvalidFunctionName=r.ErrSignatureCannotCreate=r.ErrTransactionOptionsInvalid=r.ErrTransactionVersionInvalid=r.ErrNonceInvalid=r.ErrNotEnoughGas=r.ErrAddressEmpty=r.ErrAddressBadHrp=r.ErrAddressCannotCreate=r.ErrUnexpectedCondition=r.ErrInvariantFailed=r.ErrBadType=r.ErrUnsupportedOperation=r.ErrInvalidArgument=r.Err=void 0;class t extends Error{constructor(e,r){super(e),this.inner=void 0,this.inner=r}summary(){const e=[];e.push({name:this.name,message:this.message});let r=this.inner;for(;r;)e.push({name:r.name,message:r.message}),r=r.inner;return e}}r.Err=t,r.ErrInvalidArgument=class extends t{constructor(e,r){super(`Invalid argument: ${e}`,r)}},r.ErrUnsupportedOperation=class extends t{constructor(e,r="not specified"){super(`Operation "${e}" not supported. Reason: ${r}`)}},r.ErrBadType=class extends t{constructor(e,r,t){super(`Bad type of "${e}": ${t}. Expected type: ${r}`)}},r.ErrInvariantFailed=class extends t{constructor(e){super(`Invariant failed: [${e}]`)}},r.ErrUnexpectedCondition=class extends t{constructor(e){super(`Unexpected condition: [${e}]`)}},r.ErrAddressCannotCreate=class extends t{constructor(e,r){super(`Cannot create address from: ${e}`,r)}},r.ErrAddressBadHrp=class extends t{constructor(e,r){super(`Wrong address HRP. Expected: ${e}, got ${r}`)}},r.ErrAddressEmpty=class extends t{constructor(){super("Address is empty")}},r.ErrNotEnoughGas=class extends t{constructor(e){super(`Not enough gas provided: ${e}`)}},r.ErrNonceInvalid=class extends t{constructor(e){super(`Invalid nonce: ${e}`)}},r.ErrTransactionVersionInvalid=class extends t{constructor(e){super(`Invalid transaction version: ${e}`)}},r.ErrTransactionOptionsInvalid=class extends t{constructor(e){super(`Invalid transaction options: ${e}`)}},r.ErrSignatureCannotCreate=class extends t{constructor(e,r){super(`Cannot create signature from: ${e}`,r)}},r.ErrInvalidFunctionName=class extends t{constructor(){super("Invalid function name")}},r.ErrAsyncTimerAlreadyRunning=class extends t{constructor(){super("Async timer already running")}},r.ErrAsyncTimerAborted=class extends t{constructor(){super("Async timer aborted")}},r.ErrTransactionWatcherTimeout=class extends t{constructor(){super("TransactionWatcher has timed out")}},r.ErrExpectedTransactionStatusNotReached=class extends t{constructor(){super("Expected transaction status not reached")}},r.ErrExpectedTransactionEventsNotFound=class extends t{constructor(){super("Expected transaction events not found")}};class s extends t{constructor(e){super(e)}}r.ErrContract=s,r.ErrContractHasNoAddress=class extends s{constructor(){super("\nThe smart contract has no address set. Make sure you provide the address in the constructor, or call setAddress() appropriately.\nIf you need to recompute the address of the contract, make use of SmartContract.computeAddress() (static method). \n")}},r.ErrMock=class extends t{constructor(e){super(e)}},r.ErrTypingSystem=class extends t{constructor(e){super(e)}},r.ErrMissingFieldOnStruct=class extends t{constructor(e,r){super(`field ${e} does not exist on struct ${r}`)}},r.ErrMissingFieldOnEnum=class extends t{constructor(e,r){super(`field ${e} does not exist on enum ${r}`)}},r.ErrCannotParseContractResults=class extends t{constructor(e){super(`cannot parse contract results: ${e}`)}},r.ErrCannotParseTransactionOutcome=class extends t{constructor(e,r){super(`cannot parse outcome of transaction ${e}: ${r}`)}},r.ErrCodec=class extends t{constructor(e){super(e)}},r.ErrContractInteraction=class extends t{constructor(e){super(e)}},r.ErrNotImplemented=class extends t{constructor(){super("Method not yet implemented")}},r.ErrInvalidRelayedV1BuilderArguments=class extends t{constructor(){super("invalid arguments for relayed v1 builder")}},r.ErrInvalidRelayedV2BuilderArguments=class extends t{constructor(){super("invalid arguments for relayed v2 builder")}},r.ErrGasLimitShouldBe0ForInnerTransaction=class extends t{constructor(){super("gas limit must be 0 for the inner transaction for relayed v2")}},r.ErrIsCompletedFieldIsMissingOnTransaction=class extends t{constructor(){super("The transaction watcher requires the `isCompleted` property to be defined on the transaction object. Perhaps you've used the sdk-network-provider's `ProxyNetworkProvider.getTransaction()` and in that case you should also pass `withProcessStatus=true`.")}},r.ErrInvalidTokenIdentifier=class extends t{constructor(e){super(e)}},r.ErrBadUsage=class extends t{constructor(e){super(e)}},r.ErrInvalidInnerTransaction=class extends t{constructor(e){super(e)}},r.ErrParseTransactionOutcome=class extends t{constructor(e){super(e)}},r.ErrSmartContractQuery=class extends t{constructor(e,r){super(r),this.returnCode=e}},r.ErrWrongMnemonic=class extends t{constructor(){super("Wrong mnemonic format")}},r.ErrBadMnemonicEntropy=class extends t{constructor(e){super("Bad mnemonic entropy",e)}},r.ErrBadPEM=class extends t{constructor(e){super(e?`Bad PEM: ${e}`:"Bad PEM")}},r.ErrSignerCannotSign=class extends t{constructor(e){super("Cannot sign",e)}},r.ErrBadAddress=class extends t{constructor(e,r){super(`Bad address: ${e}`,r)}},r.ErrNetworkProvider=class extends t{constructor(e,r,t){super(`Request error on url [${e}]: [${r}]`,t)}},r.ErrContractQuery=class extends t{constructor(e){super(e.message.replace("executeQuery:",""))}}},8444:(e,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.getJavascriptPrototypesInHierarchy=void 0,r.getJavascriptPrototypesInHierarchy=function(e,r){let t=[],s=Object.getPrototypeOf(e);for(;s&&r(s);)t.push(s),s=Object.getPrototypeOf(s);return t}},5626:(e,r,t)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.NullType=r.TypePlaceholder=r.isTyped=r.PrimitiveValue=r.TypedValue=r.CustomType=r.PrimitiveType=r.TypeCardinality=r.Type=void 0;const s=t(8444),n=t(1069);class a{constructor(e,r=[],t=o.fixed(1),s){n.guardValueIsSet("name",e),this.name=e,this.typeParameters=r,this.cardinality=t,this.metadata=s}getName(){return this.name}getClassName(){return a.ClassName}getClassHierarchy(){return s.getJavascriptPrototypesInHierarchy(this,(e=>e.belongsToTypesystem)).map((e=>e.getClassName())).reverse()}getFullyQualifiedName(){return this.isGenericType()||this.hasMetadata()?this.getFullNameForGeneric():`multiversx:types:${this.getName()}`}getFullNameForGeneric(){const e=this.getTypeParameters().length>0,r=e?`${this.getTypeParameters().map((e=>e.getFullyQualifiedName())).join(", ")}`:"";let t=`multiversx:types:${this.getName()}`;return e&&(t=`${t}<${r}>`),void 0!==this.metadata&&(t=`${t}*${this.metadata}*`),t}hasExactClass(e){return this.getClassName()==e}hasClassOrSuperclass(e){return this.getClassHierarchy().includes(e)}getTypeParameters(){return this.typeParameters}getMetadata(){return this.metadata}isGenericType(){return this.typeParameters.length>0}hasMetadata(){return!!this.metadata}getFirstTypeParameter(){return n.guardTrue(this.typeParameters.length>0,"type parameters length > 0"),this.typeParameters[0]}toString(){let e=this.getTypeParameters().map((e=>e.toString())).join(", "),r=e?`<${e}>`:"";return`${this.name}${r}`}equals(e){return a.equals(this,e)}static equals(e,r){return e.getFullyQualifiedName()==r.getFullyQualifiedName()}static equalsMany(e,r){return e.every(((e,t)=>e.equals(r[t])))}static isAssignableFromMany(e,r){return e.every(((e,t)=>e.isAssignableFrom(r[t])))}differs(e){return!this.equals(e)}valueOf(){return this.name}isAssignableFrom(e){if(!a.equalsMany(this.getTypeParameters(),e.getTypeParameters()))return!1;let r=this.getFullyQualifiedName();return!!a.getFullyQualifiedNamesInHierarchy(e).includes(r)||e.hasClassOrSuperclass(this.getClassName())}static getFullyQualifiedNamesInHierarchy(e){return s.getJavascriptPrototypesInHierarchy(e,(e=>e.belongsToTypesystem)).map((r=>r.getFullyQualifiedName.call(e)))}getNamesOfDependencies(){const e=[];for(const r of this.typeParameters)e.push(r.getName()),e.push(...r.getNamesOfDependencies());return[...new Set(e)]}toJSON(){return{name:this.name,typeParameters:this.typeParameters.map((e=>e.toJSON()))}}getCardinality(){return this.cardinality}belongsToTypesystem(){}}r.Type=a,a.ClassName="Type";class o{constructor(e,r){this.lowerBound=e,this.upperBound=r}static fixed(e){return new o(e,e)}static variable(e){return new o(0,e)}isSingular(){return 1==this.lowerBound&&1==this.upperBound}isSingularOrNone(){return 0==this.lowerBound&&1==this.upperBound}isComposite(){return 1!=this.upperBound}isFixed(){return this.lowerBound==this.upperBound}getLowerBound(){return this.lowerBound}getUpperBound(){return this.upperBound||o.MaxCardinality}}r.TypeCardinality=o,o.MaxCardinality=4096;class i extends a{constructor(e){super(e)}getClassName(){return i.ClassName}}r.PrimitiveType=i,i.ClassName="PrimitiveType";class u extends a{getClassName(){return u.ClassName}}r.CustomType=u,u.ClassName="CustomType";class c{constructor(e){this.type=e}getClassName(){return c.ClassName}getClassHierarchy(){return s.getJavascriptPrototypesInHierarchy(this,(e=>e.belongsToTypesystem)).map((e=>e.getClassName())).reverse()}getType(){return this.type}hasExactClass(e){return this.getClassName()==e}hasClassOrSuperclass(e){return this.getClassHierarchy().includes(e)}belongsToTypesystem(){}}r.TypedValue=c,c.ClassName="TypedValue";class d extends c{constructor(e){super(e)}getClassName(){return d.ClassName}}r.PrimitiveValue=d,d.ClassName="PrimitiveValue",r.isTyped=function(e){return void 0!==e.belongsToTypesystem};class l extends a{constructor(){super("...")}getClassName(){return l.ClassName}}r.TypePlaceholder=l,l.ClassName="TypePlaceholder";class p extends a{constructor(){super("?")}getClassName(){return p.ClassName}}r.NullType=p,p.ClassName="NullType"},1069:function(e,r,t){var s=this&&this.__createBinding||(Object.create?function(e,r,t,s){void 0===s&&(s=t),Object.defineProperty(e,s,{enumerable:!0,get:function(){return r[t]}})}:function(e,r,t,s){void 0===s&&(s=t),e[s]=r[t]}),n=this&&this.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)"default"!==t&&Object.prototype.hasOwnProperty.call(e,t)&&s(r,e,t);return n(r,e),r};Object.defineProperty(r,"__esModule",{value:!0}),r.getAxios=r.isEmpty=r.guardEmpty=r.guardNotEmpty=r.guardLength=r.guardSameLength=r.guardValueIsSetWithMessage=r.guardValueIsSet=r.guardTrue=void 0;const o=a(t(2581));function i(e,r){if(null==r||void 0===r)throw new o.ErrInvariantFailed(e)}function u(e){return e.isEmpty?e.isEmpty():0===e.length}r.guardTrue=function(e,r){if(!e)throw new o.ErrInvariantFailed(`[<${r}>] isn't true`)},r.guardValueIsSet=function(e,r){i(`${e} isn't set (null or undefined)`,r)},r.guardValueIsSetWithMessage=i,r.guardSameLength=function(e,r){if(r=r||[],(e=e||[]).length!=r.length)throw new o.ErrInvariantFailed("arrays do not have the same length")},r.guardLength=function(e,r){let t=e.length||0;if(t!=r)throw new o.ErrInvariantFailed(`wrong length, expected: ${r}, actual: ${t}`)},r.guardNotEmpty=function(e,r){if(u(e))throw new o.ErrInvariantFailed(`${r} is empty`)},r.guardEmpty=function(e,r){if(!u(e))throw new o.ErrInvariantFailed(`${r} is not empty`)},r.isEmpty=u,r.getAxios=function(){try{return t(6425)}catch(e){throw new Error("axios is required but not installed. Please install axios to make network requests.")}}}};
|