@waves/node-api-js 1.2.10 → 1.3.0
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/cjs/api-node/utils/index.d.ts +11 -0
- package/cjs/api-node/utils/index.js +19 -1
- package/cjs/api-node/utils/index.js.map +1 -1
- package/dist/node-api.js +20 -2
- package/dist/node-api.min.js +1 -1
- package/es/api-node/utils/index.d.ts +11 -0
- package/es/api-node/utils/index.js +17 -0
- package/es/api-node/utils/index.js.map +1 -1
- package/package.json +1 -1
package/dist/node-api.min.js
CHANGED
|
@@ -23,4 +23,4 @@ t.read=function(e,t,r,n,i){var a,o,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?i-1:0,h=
|
|
|
23
23
|
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
24
24
|
* @copyright Chen, Yi-Cyuan 2015-2018
|
|
25
25
|
* @license MIT
|
|
26
|
-
*/!function(){"use strict";var o="input is invalid type",s="object"==typeof window,u=s?window:{};u.JS_SHA3_NO_WINDOW&&(s=!1);var c=!s&&"object"==typeof self;!u.JS_SHA3_NO_NODE_JS&&"object"==typeof n&&n.versions&&n.versions.node?u=i:c&&(u=self);var l=!u.JS_SHA3_NO_COMMON_JS&&"object"==typeof e&&e.exports,f=r(81),h=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,p="0123456789abcdef".split(""),d=[4,1024,262144,67108864],y=[0,8,16,24],g=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],m=[224,256,384,512],v=[128,256],b=["hex","buffer","arrayBuffer","array","digest"],E={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!h||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var S=function(e,t,r){return function(n){return new D(e,t,e).update(n)[r]()}},C=function(e,t,r){return function(n,i){return new D(e,t,i).update(n)[r]()}},T=function(e,t,r){return function(t,n,i,a){return _["cshake"+e].update(t,n,i,a)[r]()}},A=function(e,t,r){return function(t,n,i,a){return _["kmac"+e].update(t,n,i,a)[r]()}},I=function(e,t,r,n){for(var i=0;i<b.length;++i){var a=b[i];e[a]=t(r,n,a)}return e},w=function(e,t){var r=S(e,t,"hex");return r.create=function(){return new D(e,t,e)},r.update=function(e){return r.create().update(e)},I(r,S,e,t)},B=[{name:"keccak",padding:[1,256,65536,16777216],bits:m,createMethod:w},{name:"sha3",padding:[6,1536,393216,100663296],bits:m,createMethod:w},{name:"shake",padding:[31,7936,2031616,520093696],bits:v,createMethod:function(e,t){var r=C(e,t,"hex");return r.create=function(r){return new D(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},I(r,C,e,t)}},{name:"cshake",padding:d,bits:v,createMethod:function(e,t){var r=E[e],n=T(e,0,"hex");return n.create=function(n,i,a){return i||a?new D(e,t,n).bytepad([i,a],r):_["shake"+e].create(n)},n.update=function(e,t,r,i){return n.create(t,r,i).update(e)},I(n,T,e,t)}},{name:"kmac",padding:d,bits:v,createMethod:function(e,t){var r=E[e],n=A(e,0,"hex");return n.create=function(n,i,a){return new M(e,t,i).bytepad(["KMAC",a],r).bytepad([n],r)},n.update=function(e,t,r,i){return n.create(e,r,i).update(t)},I(n,A,e,t)}}],_={},N=[],R=0;R<B.length;++R)for(var k=B[R],U=k.bits,P=0;P<U.length;++P){var O=k.name+"_"+U[P];if(N.push(O),_[O]=k.createMethod(U[P],k.padding),"sha3"!==k.name){var L=k.name+U[P];N.push(L),_[L]=_[O]}}function D(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function M(e,t,r){D.call(this,e,t,r)}D.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}for(var n,i,a=this.blocks,s=this.byteCount,u=e.length,c=this.blockCount,l=0,f=this.s;l<u;){if(this.reset)for(this.reset=!1,a[0]=this.block,n=1;n<c+1;++n)a[n]=0;if(t)for(n=this.start;l<u&&n<s;++l)a[n>>2]|=e[l]<<y[3&n++];else for(n=this.start;l<u&&n<s;++l)(i=e.charCodeAt(l))<128?a[n>>2]|=i<<y[3&n++]:i<2048?(a[n>>2]|=(192|i>>6)<<y[3&n++],a[n>>2]|=(128|63&i)<<y[3&n++]):i<55296||i>=57344?(a[n>>2]|=(224|i>>12)<<y[3&n++],a[n>>2]|=(128|i>>6&63)<<y[3&n++],a[n>>2]|=(128|63&i)<<y[3&n++]):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++l)),a[n>>2]|=(240|i>>18)<<y[3&n++],a[n>>2]|=(128|i>>12&63)<<y[3&n++],a[n>>2]|=(128|i>>6&63)<<y[3&n++],a[n>>2]|=(128|63&i)<<y[3&n++]);if(this.lastByteIndex=n,n>=s){for(this.start=n-s,this.block=a[c],n=0;n<c;++n)f[n]^=a[n];x(f),this.reset=!0}else this.start=n}return this},D.prototype.encode=function(e,t){var r=255&e,n=1,i=[r];for(r=255&(e>>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},D.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}var n=0,i=e.length;if(t)n=i;else for(var a=0;a<e.length;++a){var s=e.charCodeAt(a);s<128?n+=1:s<2048?n+=2:s<55296||s>=57344?n+=3:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++a)),n+=4)}return n+=this.encode(8*n),this.update(e),n},D.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n<e.length;++n)r+=this.encodeString(e[n]);var i=t-r%t,a=[];return a.length=i,this.update(a),this},D.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];x(n)}},D.prototype.toString=D.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,a=0,o=0,s="";o<n;){for(a=0;a<t&&o<n;++a,++o)e=r[a],s+=p[e>>4&15]+p[15&e]+p[e>>12&15]+p[e>>8&15]+p[e>>20&15]+p[e>>16&15]+p[e>>28&15]+p[e>>24&15];o%t==0&&(x(r),a=0)}return i&&(e=r[a],s+=p[e>>4&15]+p[15&e],i>1&&(s+=p[e>>12&15]+p[e>>8&15]),i>2&&(s+=p[e>>20&15]+p[e>>16&15])),s},D.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,a=0,o=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);o<n;){for(a=0;a<t&&o<n;++a,++o)u[o]=r[a];o%t==0&&x(r)}return i&&(u[a]=r[a],e=e.slice(0,s)),e},D.prototype.buffer=D.prototype.arrayBuffer,D.prototype.digest=D.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,n=this.s,i=this.outputBlocks,a=this.extraBytes,o=0,s=0,u=[];s<i;){for(o=0;o<r&&s<i;++o,++s)e=s<<2,t=n[o],u[e]=255&t,u[e+1]=t>>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%r==0&&x(n)}return a&&(e=s<<2,t=n[o],u[e]=255&t,a>1&&(u[e+1]=t>>8&255),a>2&&(u[e+2]=t>>16&255)),u},M.prototype=new D,M.prototype.finalize=function(){return this.encode(this.outputBits,!0),D.prototype.finalize.call(this)};var x=function(e){var t,r,n,i,a,o,s,u,c,l,f,h,p,d,y,m,v,b,E,S,C,T,A,I,w,B,_,N,R,k,U,P,O,L,D,M,x,V,K,j,F,q,G,z,H,Y,Q,W,X,J,Z,$,ee,te,re,ne,ie,ae,oe,se,ue,ce,le;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],a=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(o<<1|s>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|o>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|c>>>31),r=a^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=o^(l<<1|f>>>31),r=s^(f<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|p>>>31),r=c^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(i<<1|a>>>31),r=f^(a<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,d=e[0],y=e[1],Y=e[11]<<4|e[10]>>>28,Q=e[10]<<4|e[11]>>>28,N=e[20]<<3|e[21]>>>29,R=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,L=e[2]<<1|e[3]>>>31,D=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,W=e[22]<<10|e[23]>>>22,X=e[23]<<10|e[22]>>>22,k=e[33]<<13|e[32]>>>19,U=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,M=e[14]<<6|e[15]>>>26,x=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,E=e[24]<<11|e[25]>>>21,J=e[34]<<15|e[35]>>>17,Z=e[35]<<15|e[34]>>>17,P=e[45]<<29|e[44]>>>3,O=e[44]<<29|e[45]>>>3,I=e[6]<<28|e[7]>>>4,w=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,V=e[26]<<25|e[27]>>>7,K=e[27]<<25|e[26]>>>7,S=e[36]<<21|e[37]>>>11,C=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,z=e[8]<<27|e[9]>>>5,H=e[9]<<27|e[8]>>>5,B=e[18]<<20|e[19]>>>12,_=e[19]<<20|e[18]>>>12,ae=e[29]<<7|e[28]>>>25,oe=e[28]<<7|e[29]>>>25,j=e[38]<<8|e[39]>>>24,F=e[39]<<8|e[38]>>>24,T=e[48]<<14|e[49]>>>18,A=e[49]<<14|e[48]>>>18,e[0]=d^~m&b,e[1]=y^~v&E,e[10]=I^~B&N,e[11]=w^~_&R,e[20]=L^~M&V,e[21]=D^~x&K,e[30]=z^~Y&W,e[31]=H^~Q&X,e[40]=te^~ne&ae,e[41]=re^~ie&oe,e[2]=m^~b&S,e[3]=v^~E&C,e[12]=B^~N&k,e[13]=_^~R&U,e[22]=M^~V&j,e[23]=x^~K&F,e[32]=Y^~W&J,e[33]=Q^~X&Z,e[42]=ne^~ae&se,e[43]=ie^~oe&ue,e[4]=b^~S&T,e[5]=E^~C&A,e[14]=N^~k&P,e[15]=R^~U&O,e[24]=V^~j&q,e[25]=K^~F&G,e[34]=W^~J&$,e[35]=X^~Z&ee,e[44]=ae^~se&ce,e[45]=oe^~ue&le,e[6]=S^~T&d,e[7]=C^~A&y,e[16]=k^~P&I,e[17]=U^~O&w,e[26]=j^~q&L,e[27]=F^~G&D,e[36]=J^~$&z,e[37]=Z^~ee&H,e[46]=se^~ce&te,e[47]=ue^~le&re,e[8]=T^~d&m,e[9]=A^~y&v,e[18]=P^~I&B,e[19]=O^~w&_,e[28]=q^~L&M,e[29]=G^~D&x,e[38]=$^~z&Y,e[39]=ee^~H&Q,e[48]=ce^~te&ne,e[49]=le^~re&ie,e[0]^=g[n],e[1]^=g[n+1]};if(l)e.exports=_;else{for(R=0;R<N.length;++R)u[N[R]]=_[N[R]];f&&(void 0===(a=function(){return _}.call(t,r,t,e))||(e.exports=a))}}()}).call(this,r(19),r(13))},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=r(5),a=n(r(47)),o=r(14),s=r(37),u=r(20),c=r(8),l=r(18);function f(e,t){for(void 0===t&&(t=5e3);t--;){var r=i.stringToBytes(e);e=u.base16Encode(c.sha256(r))}return e}function h(e,t,r){void 0===r&&(r=48);for(var n=i.bytesToString(o.concat(e,t),"raw"),s="",u=s;u.length<r;)u+=s=a.create().update(s+n).digest().getBytes();return u}t.encryptSeed=function(e,t,r){var n=f(t,r),a=l.randomBytes(8),c=h(i.stringToBytes(n,"raw"),a),p=i.stringToBytes(c.slice(0,32),"raw"),d=i.stringToBytes(c.slice(32),"raw"),y=s.aesEncrypt(i.stringToBytes(e),p,"CBC",d);return u.base64Encode(o.concat(i.stringToBytes("Salted__"),a,y))},t.decryptSeed=function(e,t,r){var n=f(t,r),a=u.base64Decode(e),o=a.slice(8,16),c=h(i.stringToBytes(n,"raw"),o),l=i.stringToBytes(c.slice(0,32),"raw"),p=i.stringToBytes(c.slice(32),"raw");return i.bytesToString(s.aesDecrypt(a.slice(16),l,"CBC",p))}},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o};Object.defineProperty(t,"__esModule",{value:!0});var i=r(8),a=r(14);t.merkleVerify=function(e,t,r){var o=Uint8Array.from([0]),s=Uint8Array.from([1]);if(32!==e.length)throw new Error("Failed to parse merkleProof: Invalid rootHash length");for(var u=i.blake2b(a.concat(o,r)),c=[],l=t.map((function(e){return e}));l.length>0;){var f=0===l[0]?"L":"R",h=l[1];if(h<1)throw new Error("Failed to parse merkleProof: Wrong hash size");var p=l.slice(2,2+h);c.push([f,p]),l=l.slice(2+h)}return c.reduce((function(e,t){var r=n(t,2),o=r[0],u=r[1];return i.blake2b(a.concat(s,"R"===o?a.concat(u,e):a.concat(e,u)))}),u).every((function(t,r){return t===e[r]}))}},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e};t.__esModule=!0;var a=r(17);t.default=function(e,t){if(null==(r=e)||42!=r.length)throw"Invalid ethereum address: "+e+" ";var r;e=e.substr(2);var n=new Uint8Array([1,t]),o=a.base16Decode(e),s=new Uint8Array(i(n,o)),u=a.keccak(a.blake2b(s)),c=new Uint8Array(i(n,o.slice(0,20),u.slice(0,4)));return a.base58Encode(c)}},function(e,t,r){"use strict";t.__esModule=!0;var n=r(17);t.default=function(e){var t=n.base58Decode(e).slice(0,20);return"0x"+n.base16Encode(t)}},function(e,t,r){"use strict";t.__esModule=!0;var n=r(17);t.default=function(e){var t=e;return e.startsWith("0x")&&(t=e.slice(2)),n.base58Encode(n.base16Decode(t))}},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=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}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.create=void 0;var s=a(r(88)),u=a(r(30)),c=a(r(16)),l=a(r(90)),f=a(r(91)),h=a(r(92)),p=a(r(93)),d=a(r(94)),y=a(r(95)),g=a(r(96)),m=a(r(97)),v=a(r(98)),b=a(r(32)),E=a(r(101)),S=o(r(11)),C=o(r(48)),T=o(r(2)),A=o(r(102)),I=o(r(53)),w=o(r(54)),B=o(r(103)),_=o(r(104)),N=o(r(52)),R=o(r(49)),k=o(r(55)),U=o(r(106)),P=o(r(107)),O=a(r(3));function L(e,t){return Object.keys(t).reduce((function(r,n){return r[n]=D(e,t[n]),r}),{})}function D(e,t){return t.bind(null,e)}t.create=function(e){var t=L(e,s),r=L(e,u),n=L(e,c),i=L(e,l),a=L(e,f),o=L(e,h),M=L(e,p),x=L(e,d),V=L(e,y),K=L(e,g),j=L(e,m),F=L(e,v),q=L(e,b),G=L(e,E);return{addresses:t,blocks:r,transactions:n,leasing:i,tools:{transactions:{broadcast:D(e,A.default),wait:D(e,N.default)},blocks:{getNetworkByte:D(e,k.default),getNetworkCode:D(e,U.default)},addresses:{createWatch:D(e,P.default),getAssetsByTransaction:D(e,I.default),getAssetIdListByTx:w.default,getTransactionsWithAssets:D(e,B.default),availableSponsoredBalances:D(e,_.default)},utils:O,query:S.default,resolve:C.default,request:T.default,parse:R.default},peers:a,rewards:o,utils:M,debug:x,alias:V,consensus:K,activation:j,node:F,assets:q,eth:G}}},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&i(t,e,r);return a(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchAddresses=t.fetchPublicKey=t.fetchSeed=t.fetchSeq=t.fetchEffectiveBalance=t.fetchEffectiveBalanceConfirmations=t.deleteAddressFromWallet=t.fetchMultipleBalance=t.fetchBalance=t.fetchValidate=t.data=t.fetchScriptInfo=t.fetchBalanceConfirmations=t.fetchBalanceDetails=t.fetchScriptInfoMeta=t.fetchDataKey=void 0;var u=o(r(2)),c=s(r(11));t.fetchDataKey=function(e,t,r,n){return void 0===n&&(n=Object.create(null)),u.default({base:e,url:"/addresses/data/"+t+"/"+encodeURIComponent(r),options:n})},t.fetchScriptInfoMeta=function(e,t){return u.default({base:e,url:"/addresses/scriptInfo/"+t+"/meta"})},t.fetchBalanceDetails=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/addresses/balance/details/"+t,options:r})},t.fetchBalanceConfirmations=function(e,t,r,n){return void 0===n&&(n=Object.create(null)),u.default({base:e,url:"/addresses/balance/"+t+"/"+r,options:n})},t.fetchScriptInfo=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/addresses/scriptInfo/"+t,options:r})},t.data=function(e,t,r,n){return void 0===r&&(r=Object.create(null)),void 0===n&&(n=Object.create(null)),u.default({base:e,url:"/addresses/data/"+t+c.default(r),options:n})},t.fetchValidate=function(e,t){return u.default({base:e,url:"/addresses/validate/"+t})},t.fetchBalance=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/addresses/balance/"+t,options:r})},t.fetchMultipleBalance=function(e,t,r){return void 0===r&&(r=Object.create(null)),fetch(e+"/addresses/balance",{method:"POST",body:JSON.stringify({addresses:t}),headers:{"Content-Type":"application/json"}}).then(u.parseResponse)},t.deleteAddressFromWallet=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/addresses/"+t,options:n(n({},r),{method:"DELETE"})})},t.fetchEffectiveBalanceConfirmations=function(e,t,r,n){return void 0===n&&(n=Object.create(null)),u.default({base:e,url:"/addresses/effectiveBalance/"+t+"/"+r,options:n})},t.fetchEffectiveBalance=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/addresses/effectiveBalance/"+t,options:r})},t.fetchSeq=function(e,t,r){return u.default({base:e,url:"/addresses/seq/"+t+"/"+r})},t.fetchSeed=function(e,t){return u.default({base:e,url:"/addresses/seed/"+t})},t.fetchPublicKey=function(e,t){return u.default({base:e,url:"/addresses/publicKey/"+t})},t.fetchAddresses=function(e){return u.default({base:e,url:"/addresses"})}},function(e,t,r){"use strict";var n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n)return n;throw new Error("unable to locate global object")}();e.exports=t=n.fetch,n.fetch&&(t.default=n.fetch.bind(n)),t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchLeasingInfo=t.fetchActive=void 0;var a=i(r(2));t.fetchActive=function(e,t,r){return void 0===r&&(r=Object.create(null)),a.default({base:e,url:"/leasing/active/"+t,options:r})},t.fetchLeasingInfo=function(e,t,r){void 0===r&&(r=Object.create(null));var i='{"ids":['+t.map((function(e){return'"'+e+'"'})).join(",")+"]}";return a.default({base:e,url:"/leasing/info/",options:n(n({},r),{body:i,method:"POST",headers:{"Content-Type":"application/json"}})})}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchSuspended=t.fetchBlackListed=t.fetchConnected=t.fetchAll=void 0;var i=n(r(2));t.fetchAll=function(e,t){return void 0===t&&(t=Object.create(null)),i.default({base:e,url:"/peers/all",options:t})},t.fetchConnected=function(e,t){return void 0===t&&(t=Object.create(null)),i.default({base:e,url:"/peers/connected",options:t})},t.fetchBlackListed=function(e,t){return void 0===t&&(t=Object.create(null)),i.default({base:e,url:"/peers/blacklisted",options:t})},t.fetchSuspended=function(e,t){return void 0===t&&(t=Object.create(null)),i.default({base:e,url:"/peers/suspended",options:t})}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchRewards=void 0;var i=n(r(2));t.fetchRewards=function(e,t,r){return void 0===r&&(r=Object.create(null)),i.default({base:e,url:t?"/blockchain/rewards/"+t:"/blockchain/rewards",options:r})}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchNodeTime=t.fetchSignPrivateKey=t.fetchScriptDecompile=t.fetchScriptMeta=t.fetchHashFast=t.fetchHashSecure=t.fetchTransactionSerialize=t.fetchEstimate=t.fetchCompileWithImports=t.fetchCompileCode=t.fetchSeed=void 0;var i=n(r(2)),a=n(r(50));t.fetchSeed=function(e,t){return i.default({base:e,url:"/utils/seed"+(t?"/"+t:"")})},t.fetchCompileCode=function(e,t){return i.default({base:e,url:"/utils/script/compileCode",options:{method:"POST",body:t,headers:{"Content-Type":"application/json"}}})},t.fetchCompileWithImports=function(e,t){return i.default({base:e,url:"/utils/script/compileWithImports",options:{method:"POST",body:a.default(t),headers:{"Content-Type":"application/json"}}})},t.fetchEstimate=function(e,t){return i.default({base:e,url:"/utils/script/estimate",options:{method:"POST",body:t,headers:{"Content-Type":"application/json"}}})},t.fetchTransactionSerialize=function(e,t){return i.default({base:e,url:"/utils/transactionSerialize",options:{method:"POST",body:a.default(t),headers:{"Content-Type":"application/json"}}})},t.fetchHashSecure=function(e,t){return i.default({base:e,url:"/utils/hash/secure",options:{method:"POST",body:t,headers:{"Content-Type":"application/json"}}})},t.fetchHashFast=function(e,t){return i.default({base:e,url:"/utils/hash/fast",options:{method:"POST",body:t,headers:{"Content-Type":"application/json"}}})},t.fetchScriptMeta=function(e,t){return i.default({base:e,url:"/utils/script/meta",options:{method:"POST",body:t,headers:{"Content-Type":"application/json"}}})},t.fetchScriptDecompile=function(e,t){return i.default({base:e,url:"/utils/script/decompile",options:{method:"POST",body:t,headers:{"Content-Type":"application/json"}}})},t.fetchSignPrivateKey=function(e,t,r){return i.default({base:e,url:"/utils/sign/"+t,options:{method:"POST",body:r,headers:{"Content-Type":"application/json"}}})},t.fetchNodeTime=function(e){return i.default({base:e,url:"/utils/time"})}},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=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}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.debugValidate=t.debugStateWaves=t.debugStateHash=t.debugState=t.debugRollbackTo=t.debugRollback=t.debugPrint=t.fetchPortfolios=t.fetchMinerInfo=t.fetchDebugInfo=t.fetchConfigInfo=t.postPeerToTheBanList=t.fetchStateChangesByTxId=t.fetchStateChangesByAddress=t.fetchBalanceHistory=void 0;var s=a(r(2)),u=o(r(11));t.fetchBalanceHistory=function(e,t,r){return void 0===r&&(r=Object.create(null)),s.default({base:e,url:"/debug/balances/history/"+t,options:r})},t.fetchStateChangesByAddress=function(e,t,r,n,i){return void 0===i&&(i=Object.create(null)),s.default({base:e,url:"/debug/stateChanges/address/"+t+"/limit/"+r+u.default({after:n}),options:i})},t.fetchStateChangesByTxId=function(e,t,r){return void 0===r&&(r=Object.create(null)),s.default({base:e,url:"/transactions/info/"+t,options:r})},t.postPeerToTheBanList=function(e,t){return fetch(e+"/debug/blacklist",{method:"POST",body:t,headers:{"Content-Type":"application/json"}}).then(s.parseResponse)},t.fetchConfigInfo=function(e,t){return fetch(e+"/debug/configInfo",{method:"GET",headers:{"X-API-Key":t,"Content-Type":"application/json"}}).then(s.parseResponse)},t.fetchDebugInfo=function(e,t){return fetch(e+"/debug/info",{method:"GET",headers:{"X-API-Key":t,"Content-Type":"application/json"}}).then(s.parseResponse)},t.fetchMinerInfo=function(e,t){return fetch(e+"/debug/minerInfo",{method:"GET",headers:{"X-API-Key":t,"Content-Type":"application/json"}}).then(s.parseResponse)},t.fetchPortfolios=function(e,t,r){return fetch(e+"/debug/portfolios/"+t,{method:"GET",headers:{"X-API-Key":r,"Content-Type":"application/json"}}).then(s.parseResponse)},t.debugPrint=function(e,t,r){return fetch(e+"/debug/print",{method:"POST",headers:{"X-API-Key":r,"Content-Type":"application/json"},body:JSON.stringify({message:t})}).then(s.parseResponse)},t.debugRollback=function(e,t,r,n){return fetch(e+"/debug/rollback",{method:"POST",headers:{"X-API-Key":n,"Content-Type":"application/json"},body:JSON.stringify({rollbackTo:t,returnTransactionsToUtx:r})}).then(s.parseResponse)},t.debugRollbackTo=function(e,t,r){return fetch(e+"/debug/rollback-to/"+t,{method:"DELETE",headers:{"X-API-Key":r,"Content-Type":"application/json"}}).then(s.parseResponse)},t.debugState=function(e,t){return fetch(e+"/debug/state",{method:"GET",headers:{"X-API-Key":t,"Content-Type":"application/json"}}).then(s.parseResponse)},t.debugStateHash=function(e,t,r){return void 0===r&&(r=Object.create(null)),s.default({base:e,url:"/debug/stateHash/"+t,options:r})},t.debugStateWaves=function(e,t,r){return fetch(e+"/debug/stateWaves/"+t,{method:"GET",headers:{"X-API-Key":r,"Content-Type":"application/json"}}).then(s.parseResponse)},t.debugValidate=function(e,t){return fetch(e+"/debug/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:t}).then(s.parseResponse)}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchByAddress=t.fetchByAlias=void 0;var i=n(r(2));t.fetchByAlias=function(e,t){return i.default({base:e,url:"/alias/by-alias/"+t})},t.fetchByAddress=function(e,t){return i.default({base:e,url:"/alias/by-address/"+t})}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchConsensusAlgo=t.fetchBasetarget=t.fetchGeneratingBalance=void 0;var i=n(r(2));t.fetchGeneratingBalance=function(e,t,r){return void 0===r&&(r=Object.create(null)),i.default({base:e,url:"/consensus/generatingbalance/"+t})},t.fetchBasetarget=function(e){return i.default({base:e,url:"/consensus/basetarget"})},t.fetchConsensusAlgo=function(e){return i.default({base:e,url:"/consensus/algo"})}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchActivationStatus=void 0;var i=n(r(2));t.fetchActivationStatus=function(e){return i.default({base:e,url:"activation/status"})}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchNodeVersion=t.fetchNodeStatus=void 0;var i=n(r(2));t.fetchNodeStatus=function(e,t){return void 0===t&&(t=Object.create(null)),i.default({base:e,url:"/node/status",options:t})},t.fetchNodeVersion=function(e,t){return void 0===t&&(t=Object.create(null)),i.default({base:e,url:"/node/version",options:t})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});r(51)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchEthAssetDetails=void 0;var i=n(r(2)),a=r(3),o=n(r(11));t.fetchEthAssetDetails=function(e,t){var r=a.toArray(t);return i.default({base:e,url:"/eth/assets?"+o.default({id:r})}).then((function(e){return Array.isArray(t)?e:e[0]}))}},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var a=r(16),o=r(3),s=i(r(52)),u={chain:!1,confirmations:-1,maxWaitTime:0,requestInterval:0};t.default=function(e,t,r){var i=n(n({},u),r||{}),c=!Array.isArray(t),l=i.confirmations>0?1:0;return(i.chain?function(e,t,r){return new Promise((function(n,i){var o=t.slice().reverse(),u=[],c=function(){if(!o.length)return n(u),null;var t=o.pop();a.broadcast(e,t).then((function(t){return s.default(e,t,r)})).then((function(e){u.push(e),c()}),i)};c()}))}(e,o.toArray(t),n(n({},i),{confirmations:l})):function(e,t){return Promise.all(t.map((function(t){return a.broadcast(e,t)})))}(e,o.toArray(t))).then((function(t){return i.confirmations<=0?t:s.default(e,t,i)})).then((function(e){return c?o.head(e):e}))}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var i=r(16),a=n(r(53));t.default=function(e,t,r,n){return i.fetchTransactions(e,t,r,n).then((function(t){return a.default(e,t).then((function(e){return{transactions:t,assets:e}}))}))}},function(e,t,r){"use strict";t.__esModule=!0;var n=r(105),i=r(32),a=r(3);t.default=function(e,t,r){return i.fetchAssetsBalance(e,t).then(a.pipe(a.prop("balances"),a.filter(function(e){return function(t){return t.minSponsoredAssetFee&&n.BigNumber.toBigNumber(t.sponsorBalance||0).gte(e)&&n.BigNumber.toBigNumber(e).div(.001*Math.pow(10,8)).mul(t.minSponsoredAssetFee).lte(t.balance)||!1}}(r)),a.map(function(e){var t=n.BigNumber.toBigNumber(e).div(.001*Math.pow(10,8));return function(r){return{assetId:r.assetId,wavesFee:e,assetFee:n.BigNumber.toBigNumber(r.minSponsoredAssetFee).mul(t).toFixed()}}}(r))))}},function(e,t,r){!function(e){"use strict";var t=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,r=Math.ceil,n=Math.floor,i="[BigNumber Error] ",a=i+"Number primitive has more than 15 significant digits: ",o=1e14,s=14,u=9007199254740991,c=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],l=1e7,f=1e9;function h(e){var t=0|e;return e>0||e===t?t:t-1}function p(e){for(var t,r,n=1,i=e.length,a=e[0]+"";n<i;){for(t=e[n++]+"",r=s-t.length;r--;t="0"+t);a+=t}for(i=a.length;48===a.charCodeAt(--i););return a.slice(0,i+1||1)}function d(e,t){var r,n,i=e.c,a=t.c,o=e.s,s=t.s,u=e.e,c=t.e;if(!o||!s)return null;if(r=i&&!i[0],n=a&&!a[0],r||n)return r?n?0:-s:o;if(o!=s)return o;if(r=o<0,n=u==c,!i||!a)return n?0:!i^r?1:-1;if(!n)return u>c^r?1:-1;for(s=(u=i.length)<(c=a.length)?u:c,o=0;o<s;o++)if(i[o]!=a[o])return i[o]>a[o]^r?1:-1;return u==c?0:u>c^r?1:-1}function y(e,t,r,a){if(e<t||e>r||e!==n(e))throw Error(i+(a||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function g(e){var t=e.c.length-1;return h(e.e/s)==t&&e.c[t]%2!=0}function m(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function v(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var b=function e(b){var E,S,C,T,A,I,w,B,_,N=F.prototype={constructor:F,toString:null,valueOf:null},R=new F(1),k=20,U=4,P=-7,O=21,L=-1e7,D=1e7,M=!1,x=1,V=0,K={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},j="0123456789abcdefghijklmnopqrstuvwxyz";function F(e,r){var i,o,c,l,f,h,p,d,g=this;if(!(g instanceof F))return new F(e,r);if(null==r){if(e&&!0===e._isBigNumber)return g.s=e.s,void(!e.c||e.e>D?g.c=g.e=null:e.e<L?g.c=[g.e=0]:(g.e=e.e,g.c=e.c.slice()));if((h="number"==typeof e)&&0*e==0){if(g.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,f=e;f>=10;f/=10,l++);return void(l>D?g.c=g.e=null:(g.e=l,g.c=[e]))}d=String(e)}else{if(!t.test(d=String(e)))return C(g,d,h);g.s=45==d.charCodeAt(0)?(d=d.slice(1),-1):1}(l=d.indexOf("."))>-1&&(d=d.replace(".","")),(f=d.search(/e/i))>0?(l<0&&(l=f),l+=+d.slice(f+1),d=d.substring(0,f)):l<0&&(l=d.length)}else{if(y(r,2,j.length,"Base"),10==r)return H(g=new F(e),k+g.e+1,U);if(d=String(e),h="number"==typeof e){if(0*e!=0)return C(g,d,h,r);if(g.s=1/e<0?(d=d.slice(1),-1):1,F.DEBUG&&d.replace(/^0\.0*|\./,"").length>15)throw Error(a+e)}else g.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(i=j.slice(0,r),l=f=0,p=d.length;f<p;f++)if(i.indexOf(o=d.charAt(f))<0){if("."==o){if(f>l){l=p;continue}}else if(!c&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){c=!0,f=-1,l=0;continue}return C(g,String(e),h,r)}h=!1,(l=(d=S(d,r,10,g.s)).indexOf("."))>-1?d=d.replace(".",""):l=d.length}for(f=0;48===d.charCodeAt(f);f++);for(p=d.length;48===d.charCodeAt(--p););if(d=d.slice(f,++p)){if(p-=f,h&&F.DEBUG&&p>15&&(e>u||e!==n(e)))throw Error(a+g.s*e);if((l=l-f-1)>D)g.c=g.e=null;else if(l<L)g.c=[g.e=0];else{if(g.e=l,g.c=[],f=(l+1)%s,l<0&&(f+=s),f<p){for(f&&g.c.push(+d.slice(0,f)),p-=s;f<p;)g.c.push(+d.slice(f,f+=s));f=s-(d=d.slice(f)).length}else f-=p;for(;f--;d+="0");g.c.push(+d)}}else g.c=[g.e=0]}function q(e,t,r,n){var i,a,o,s,u;if(null==r?r=U:y(r,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,null==t)u=p(e.c),u=1==n||2==n&&(o<=P||o>=O)?m(u,o):v(u,o,"0");else if(a=(e=H(new F(e),t,r)).e,s=(u=p(e.c)).length,1==n||2==n&&(t<=a||a<=P)){for(;s<t;u+="0",s++);u=m(u,a)}else if(t-=o,u=v(u,a,"0"),a+1>s){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=a-s)>0)for(a+1==s&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function G(e,t){for(var r,n=1,i=new F(e[0]);n<e.length;n++){if(!(r=new F(e[n])).s){i=r;break}t.call(i,r)&&(i=r)}return i}function z(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*s-1)>D?e.c=e.e=null:r<L?e.c=[e.e=0]:(e.e=r,e.c=t),e}function H(e,t,i,a){var u,l,f,h,p,d,y,g=e.c,m=c;if(g){e:{for(u=1,h=g[0];h>=10;h/=10,u++);if((l=t-u)<0)l+=s,f=t,y=(p=g[d=0])/m[u-f-1]%10|0;else if((d=r((l+1)/s))>=g.length){if(!a)break e;for(;g.length<=d;g.push(0));p=y=0,u=1,f=(l%=s)-s+1}else{for(p=h=g[d],u=1;h>=10;h/=10,u++);y=(f=(l%=s)-s+u)<0?0:p/m[u-f-1]%10|0}if(a=a||t<0||null!=g[d+1]||(f<0?p:p%m[u-f-1]),a=i<4?(y||a)&&(0==i||i==(e.s<0?3:2)):y>5||5==y&&(4==i||a||6==i&&(l>0?f>0?p/m[u-f]:0:g[d-1])%10&1||i==(e.s<0?8:7)),t<1||!g[0])return g.length=0,a?(t-=e.e+1,g[0]=m[(s-t%s)%s],e.e=-t||0):g[0]=e.e=0,e;if(0==l?(g.length=d,h=1,d--):(g.length=d+1,h=m[s-l],g[d]=f>0?n(p/m[u-f]%m[f])*h:0),a)for(;;){if(0==d){for(l=1,f=g[0];f>=10;f/=10,l++);for(f=g[0]+=h,h=1;f>=10;f/=10,h++);l!=h&&(e.e++,g[0]==o&&(g[0]=1));break}if(g[d]+=h,g[d]!=o)break;g[d--]=0,h=1}for(l=g.length;0===g[--l];g.pop());}e.e>D?e.c=e.e=null:e.e<L&&(e.c=[e.e=0])}return e}function Y(e){var t,r=e.e;return null===r?e.toString():(t=p(e.c),t=r<=P||r>=O?m(t,r):v(t,r,"0"),e.s<0?"-"+t:t)}return F.clone=e,F.ROUND_UP=0,F.ROUND_DOWN=1,F.ROUND_CEIL=2,F.ROUND_FLOOR=3,F.ROUND_HALF_UP=4,F.ROUND_HALF_DOWN=5,F.ROUND_HALF_EVEN=6,F.ROUND_HALF_CEIL=7,F.ROUND_HALF_FLOOR=8,F.EUCLID=9,F.config=F.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(i+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(y(r=e[t],0,f,t),k=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(y(r=e[t],0,8,t),U=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(y(r[0],-f,0,t),y(r[1],0,f,t),P=r[0],O=r[1]):(y(r,-f,f,t),P=-(O=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)y(r[0],-f,-1,t),y(r[1],1,f,t),L=r[0],D=r[1];else{if(y(r,-f,f,t),!r)throw Error(i+t+" cannot be zero: "+r);L=-(D=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(i+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw M=!r,Error(i+"crypto unavailable");M=r}else M=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(y(r=e[t],0,9,t),x=r),e.hasOwnProperty(t="POW_PRECISION")&&(y(r=e[t],0,f,t),V=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(i+t+" not an object: "+r);K=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(i+t+" invalid: "+r);j=r}}return{DECIMAL_PLACES:k,ROUNDING_MODE:U,EXPONENTIAL_AT:[P,O],RANGE:[L,D],CRYPTO:M,MODULO_MODE:x,POW_PRECISION:V,FORMAT:K,ALPHABET:j}},F.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!F.DEBUG)return!0;var t,r,a=e.c,u=e.e,c=e.s;e:if("[object Array]"=={}.toString.call(a)){if((1===c||-1===c)&&u>=-f&&u<=f&&u===n(u)){if(0===a[0]){if(0===u&&1===a.length)return!0;break e}if((t=(u+1)%s)<1&&(t+=s),String(a[0]).length==t){for(t=0;t<a.length;t++)if((r=a[t])<0||r>=o||r!==n(r))break e;if(0!==r)return!0}}}else if(null===a&&null===u&&(null===c||1===c||-1===c))return!0;throw Error(i+"Invalid BigNumber: "+e)},F.maximum=F.max=function(){return G(arguments,N.lt)},F.minimum=F.min=function(){return G(arguments,N.gt)},F.random=(T=9007199254740992*Math.random()&2097151?function(){return n(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,a,o,u,l,h=0,p=[],d=new F(R);if(null==e?e=k:y(e,0,f),u=r(e/s),M)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(u*=2));h<u;)(l=131072*t[h]+(t[h+1]>>>11))>=9e15?(a=crypto.getRandomValues(new Uint32Array(2)),t[h]=a[0],t[h+1]=a[1]):(p.push(l%1e14),h+=2);h=u/2}else{if(!crypto.randomBytes)throw M=!1,Error(i+"crypto unavailable");for(t=crypto.randomBytes(u*=7);h<u;)(l=281474976710656*(31&t[h])+1099511627776*t[h+1]+4294967296*t[h+2]+16777216*t[h+3]+(t[h+4]<<16)+(t[h+5]<<8)+t[h+6])>=9e15?crypto.randomBytes(7).copy(t,h):(p.push(l%1e14),h+=7);h=u/7}if(!M)for(;h<u;)(l=T())<9e15&&(p[h++]=l%1e14);for(u=p[--h],e%=s,u&&e&&(l=c[s-e],p[h]=n(u/l)*l);0===p[h];p.pop(),h--);if(h<0)p=[o=0];else{for(o=-1;0===p[0];p.splice(0,1),o-=s);for(h=1,l=p[0];l>=10;l/=10,h++);h<s&&(o-=s-h)}return d.e=o,d.c=p,d}),F.sum=function(){for(var e=1,t=arguments,r=new F(t[0]);e<t.length;)r=r.plus(t[e++]);return r},S=function(){function e(e,t,r,n){for(var i,a,o=[0],s=0,u=e.length;s<u;){for(a=o.length;a--;o[a]*=t);for(o[0]+=n.indexOf(e.charAt(s++)),i=0;i<o.length;i++)o[i]>r-1&&(null==o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/r|0,o[i]%=r)}return o.reverse()}return function(t,r,n,i,a){var o,s,u,c,l,f,h,d,y=t.indexOf("."),g=k,m=U;for(y>=0&&(c=V,V=0,t=t.replace(".",""),f=(d=new F(r)).pow(t.length-y),V=c,d.c=e(v(p(f.c),f.e,"0"),10,n,"0123456789"),d.e=d.c.length),u=c=(h=e(t,r,n,a?(o=j,"0123456789"):(o="0123456789",j))).length;0==h[--c];h.pop());if(!h[0])return o.charAt(0);if(y<0?--u:(f.c=h,f.e=u,f.s=i,h=(f=E(f,d,g,m,n)).c,l=f.r,u=f.e),y=h[s=u+g+1],c=n/2,l=l||s<0||null!=h[s+1],l=m<4?(null!=y||l)&&(0==m||m==(f.s<0?3:2)):y>c||y==c&&(4==m||l||6==m&&1&h[s-1]||m==(f.s<0?8:7)),s<1||!h[0])t=l?v(o.charAt(1),-g,o.charAt(0)):o.charAt(0);else{if(h.length=s,l)for(--n;++h[--s]>n;)h[s]=0,s||(++u,h=[1].concat(h));for(c=h.length;!h[--c];);for(y=0,t="";y<=c;t+=o.charAt(h[y++]));t=v(t,u,o.charAt(0))}return t}}(),E=function(){function e(e,t,r){var n,i,a,o,s=0,u=e.length,c=t%l,f=t/l|0;for(e=e.slice();u--;)s=((i=c*(a=e[u]%l)+(n=f*a+(o=e[u]/l|0)*c)%l*l+s)/r|0)+(n/l|0)+f*o,e[u]=i%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var i,a;if(r!=n)a=r>n?1:-1;else for(i=a=0;i<r;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(i,a,u,c,l){var f,p,d,y,g,m,v,b,E,S,C,T,A,I,w,B,_,N=i.s==a.s?1:-1,R=i.c,k=a.c;if(!(R&&R[0]&&k&&k[0]))return new F(i.s&&a.s&&(R?!k||R[0]!=k[0]:k)?R&&0==R[0]||!k?0*N:N/0:NaN);for(E=(b=new F(N)).c=[],N=u+(p=i.e-a.e)+1,l||(l=o,p=h(i.e/s)-h(a.e/s),N=N/s|0),d=0;k[d]==(R[d]||0);d++);if(k[d]>(R[d]||0)&&p--,N<0)E.push(1),y=!0;else{for(I=R.length,B=k.length,d=0,N+=2,(g=n(l/(k[0]+1)))>1&&(k=e(k,g,l),R=e(R,g,l),B=k.length,I=R.length),A=B,C=(S=R.slice(0,B)).length;C<B;S[C++]=0);_=k.slice(),_=[0].concat(_),w=k[0],k[1]>=l/2&&w++;do{if(g=0,(f=t(k,S,B,C))<0){if(T=S[0],B!=C&&(T=T*l+(S[1]||0)),(g=n(T/w))>1)for(g>=l&&(g=l-1),v=(m=e(k,g,l)).length,C=S.length;1==t(m,S,v,C);)g--,r(m,B<v?_:k,v,l),v=m.length,f=1;else 0==g&&(f=g=1),v=(m=k.slice()).length;if(v<C&&(m=[0].concat(m)),r(S,m,C,l),C=S.length,-1==f)for(;t(k,S,B,C)<1;)g++,r(S,B<C?_:k,C,l),C=S.length}else 0===f&&(g++,S=[0]);E[d++]=g,S[0]?S[C++]=R[A]||0:(S=[R[A]],C=1)}while((A++<I||null!=S[0])&&N--);y=null!=S[0],E[0]||E.splice(0,1)}if(l==o){for(d=1,N=E[0];N>=10;N/=10,d++);H(b,u+(b.e=d+p*s-1)+1,c,y)}else b.e=p,b.r=+y;return b}}(),A=/^(-?)0([xbo])(?=\w[\w.]*$)/i,I=/^([^.]+)\.$/,w=/^\.([^.]+)$/,B=/^-?(Infinity|NaN)$/,_=/^\s*\+(?=[\w.])|^\s+|\s+$/g,C=function(e,t,r,n){var a,o=r?t:t.replace(_,"");if(B.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(A,(function(e,t,r){return a="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=a?e:t})),n&&(a=n,o=o.replace(I,"$1").replace(w,"0.$1")),t!=o))return new F(o,a);if(F.DEBUG)throw Error(i+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},N.absoluteValue=N.abs=function(){var e=new F(this);return e.s<0&&(e.s=1),e},N.comparedTo=function(e,t){return d(this,new F(e,t))},N.decimalPlaces=N.dp=function(e,t){var r,n,i,a=this;if(null!=e)return y(e,0,f),null==t?t=U:y(t,0,8),H(new F(a),e+a.e+1,t);if(!(r=a.c))return null;if(n=((i=r.length-1)-h(this.e/s))*s,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},N.dividedBy=N.div=function(e,t){return E(this,new F(e,t),k,U)},N.dividedToIntegerBy=N.idiv=function(e,t){return E(this,new F(e,t),0,1)},N.exponentiatedBy=N.pow=function(e,t){var a,o,u,c,l,f,h,p,d=this;if((e=new F(e)).c&&!e.isInteger())throw Error(i+"Exponent not an integer: "+Y(e));if(null!=t&&(t=new F(t)),l=e.e>14,!d.c||!d.c[0]||1==d.c[0]&&!d.e&&1==d.c.length||!e.c||!e.c[0])return p=new F(Math.pow(+Y(d),l?2-g(e):+Y(e))),t?p.mod(t):p;if(f=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new F(NaN);(o=!f&&d.isInteger()&&t.isInteger())&&(d=d.mod(t))}else{if(e.e>9&&(d.e>0||d.e<-1||(0==d.e?d.c[0]>1||l&&d.c[1]>=24e7:d.c[0]<8e13||l&&d.c[0]<=9999975e7)))return c=d.s<0&&g(e)?-0:0,d.e>-1&&(c=1/c),new F(f?1/c:c);V&&(c=r(V/s+2))}for(l?(a=new F(.5),f&&(e.s=1),h=g(e)):h=(u=Math.abs(+Y(e)))%2,p=new F(R);;){if(h){if(!(p=p.times(d)).c)break;c?p.c.length>c&&(p.c.length=c):o&&(p=p.mod(t))}if(u){if(0===(u=n(u/2)))break;h=u%2}else if(H(e=e.times(a),e.e+1,1),e.e>14)h=g(e);else{if(0==(u=+Y(e)))break;h=u%2}d=d.times(d),c?d.c&&d.c.length>c&&(d.c.length=c):o&&(d=d.mod(t))}return o?p:(f&&(p=R.div(p)),t?p.mod(t):c?H(p,V,U,void 0):p)},N.integerValue=function(e){var t=new F(this);return null==e?e=U:y(e,0,8),H(t,t.e+1,e)},N.isEqualTo=N.eq=function(e,t){return 0===d(this,new F(e,t))},N.isFinite=function(){return!!this.c},N.isGreaterThan=N.gt=function(e,t){return d(this,new F(e,t))>0},N.isGreaterThanOrEqualTo=N.gte=function(e,t){return 1===(t=d(this,new F(e,t)))||0===t},N.isInteger=function(){return!!this.c&&h(this.e/s)>this.c.length-2},N.isLessThan=N.lt=function(e,t){return d(this,new F(e,t))<0},N.isLessThanOrEqualTo=N.lte=function(e,t){return-1===(t=d(this,new F(e,t)))||0===t},N.isNaN=function(){return!this.s},N.isNegative=function(){return this.s<0},N.isPositive=function(){return this.s>0},N.isZero=function(){return!!this.c&&0==this.c[0]},N.minus=function(e,t){var r,n,i,a,u=this,c=u.s;if(t=(e=new F(e,t)).s,!c||!t)return new F(NaN);if(c!=t)return e.s=-t,u.plus(e);var l=u.e/s,f=e.e/s,p=u.c,d=e.c;if(!l||!f){if(!p||!d)return p?(e.s=-t,e):new F(d?u:NaN);if(!p[0]||!d[0])return d[0]?(e.s=-t,e):new F(p[0]?u:3==U?-0:0)}if(l=h(l),f=h(f),p=p.slice(),c=l-f){for((a=c<0)?(c=-c,i=p):(f=l,i=d),i.reverse(),t=c;t--;i.push(0));i.reverse()}else for(n=(a=(c=p.length)<(t=d.length))?c:t,c=t=0;t<n;t++)if(p[t]!=d[t]){a=p[t]<d[t];break}if(a&&(i=p,p=d,d=i,e.s=-e.s),(t=(n=d.length)-(r=p.length))>0)for(;t--;p[r++]=0);for(t=o-1;n>c;){if(p[--n]<d[n]){for(r=n;r&&!p[--r];p[r]=t);--p[r],p[n]+=o}p[n]-=d[n]}for(;0==p[0];p.splice(0,1),--f);return p[0]?z(e,p,f):(e.s=3==U?-1:1,e.c=[e.e=0],e)},N.modulo=N.mod=function(e,t){var r,n,i=this;return e=new F(e,t),!i.c||!e.s||e.c&&!e.c[0]?new F(NaN):!e.c||i.c&&!i.c[0]?new F(i):(9==x?(n=e.s,e.s=1,r=E(i,e,0,3),e.s=n,r.s*=n):r=E(i,e,0,x),(e=i.minus(r.times(e))).c[0]||1!=x||(e.s=i.s),e)},N.multipliedBy=N.times=function(e,t){var r,n,i,a,u,c,f,p,d,y,g,m,v,b,E,S=this,C=S.c,T=(e=new F(e,t)).c;if(!(C&&T&&C[0]&&T[0]))return!S.s||!e.s||C&&!C[0]&&!T||T&&!T[0]&&!C?e.c=e.e=e.s=null:(e.s*=S.s,C&&T?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=h(S.e/s)+h(e.e/s),e.s*=S.s,(f=C.length)<(y=T.length)&&(v=C,C=T,T=v,i=f,f=y,y=i),i=f+y,v=[];i--;v.push(0));for(b=o,E=l,i=y;--i>=0;){for(r=0,g=T[i]%E,m=T[i]/E|0,a=i+(u=f);a>i;)r=((p=g*(p=C[--u]%E)+(c=m*p+(d=C[u]/E|0)*g)%E*E+v[a]+r)/b|0)+(c/E|0)+m*d,v[a--]=p%b;v[a]=r}return r?++n:v.splice(0,1),z(e,v,n)},N.negated=function(){var e=new F(this);return e.s=-e.s||null,e},N.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new F(e,t)).s,!i||!t)return new F(NaN);if(i!=t)return e.s=-t,n.minus(e);var a=n.e/s,u=e.e/s,c=n.c,l=e.c;if(!a||!u){if(!c||!l)return new F(i/0);if(!c[0]||!l[0])return l[0]?e:new F(c[0]?n:0*i)}if(a=h(a),u=h(u),c=c.slice(),i=a-u){for(i>0?(u=a,r=l):(i=-i,r=c),r.reverse();i--;r.push(0));r.reverse()}for((i=c.length)-(t=l.length)<0&&(r=l,l=c,c=r,t=i),i=0;t;)i=(c[--t]=c[t]+l[t]+i)/o|0,c[t]=o===c[t]?0:c[t]%o;return i&&(c=[i].concat(c),++u),z(e,c,u)},N.precision=N.sd=function(e,t){var r,n,i,a=this;if(null!=e&&e!==!!e)return y(e,1,f),null==t?t=U:y(t,0,8),H(new F(a),e,t);if(!(r=a.c))return null;if(n=(i=r.length-1)*s+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&a.e+1>n&&(n=a.e+1),n},N.shiftedBy=function(e){return y(e,-u,u),this.times("1e"+e)},N.squareRoot=N.sqrt=function(){var e,t,r,n,i,a=this,o=a.c,s=a.s,u=a.e,c=k+4,l=new F("0.5");if(1!==s||!o||!o[0])return new F(!s||s<0&&(!o||o[0])?NaN:o?a:1/0);if(0==(s=Math.sqrt(+Y(a)))||s==1/0?(((t=p(o)).length+u)%2==0&&(t+="0"),s=Math.sqrt(+t),u=h((u+1)/2)-(u<0||u%2),r=new F(t=s==1/0?"5e"+u:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new F(s+""),r.c[0])for((s=(u=r.e)+c)<3&&(s=0);;)if(i=r,r=l.times(i.plus(E(a,i,c,1))),p(i.c).slice(0,s)===(t=p(r.c)).slice(0,s)){if(r.e<u&&--s,"9999"!=(t=t.slice(s-3,s+1))&&(n||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(H(r,r.e+k+2,1),e=!r.times(r).eq(a));break}if(!n&&(H(i,i.e+k+2,0),i.times(i).eq(a))){r=i;break}c+=4,s+=4,n=1}return H(r,r.e+k+1,U,e)},N.toExponential=function(e,t){return null!=e&&(y(e,0,f),e++),q(this,e,t,1)},N.toFixed=function(e,t){return null!=e&&(y(e,0,f),e=e+this.e+1),q(this,e,t)},N.toFormat=function(e,t,r){var n,a=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=K;else if("object"!=typeof r)throw Error(i+"Argument not an object: "+r);if(n=a.toFixed(e,t),a.c){var o,s=n.split("."),u=+r.groupSize,c=+r.secondaryGroupSize,l=r.groupSeparator||"",f=s[0],h=s[1],p=a.s<0,d=p?f.slice(1):f,y=d.length;if(c&&(o=u,u=c,c=o,y-=o),u>0&&y>0){for(o=y%u||u,f=d.substr(0,o);o<y;o+=u)f+=l+d.substr(o,u);c>0&&(f+=l+d.slice(o)),p&&(f="-"+f)}n=h?f+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?h.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):f}return(r.prefix||"")+n+(r.suffix||"")},N.toFraction=function(e){var t,r,n,a,o,u,l,f,h,d,y,g,m=this,v=m.c;if(null!=e&&(!(l=new F(e)).isInteger()&&(l.c||1!==l.s)||l.lt(R)))throw Error(i+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+Y(l));if(!v)return new F(m);for(t=new F(R),h=r=new F(R),n=f=new F(R),g=p(v),o=t.e=g.length-m.e-1,t.c[0]=c[(u=o%s)<0?s+u:u],e=!e||l.comparedTo(t)>0?o>0?t:h:l,u=D,D=1/0,l=new F(g),f.c[0]=0;d=E(l,t,0,1),1!=(a=r.plus(d.times(n))).comparedTo(e);)r=n,n=a,h=f.plus(d.times(a=h)),f=a,t=l.minus(d.times(a=t)),l=a;return a=E(e.minus(r),n,0,1),f=f.plus(a.times(h)),r=r.plus(a.times(n)),f.s=h.s=m.s,y=E(h,n,o*=2,U).minus(m).abs().comparedTo(E(f,r,o,U).minus(m).abs())<1?[h,n]:[f,r],D=u,y},N.toNumber=function(){return+Y(this)},N.toPrecision=function(e,t){return null!=e&&y(e,1,f),q(this,e,t,2)},N.toString=function(e){var t,r=this,n=r.s,i=r.e;return null===i?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(null==e?t=i<=P||i>=O?m(p(r.c),i):v(p(r.c),i,"0"):10===e?t=v(p((r=H(new F(r),k+i+1,U)).c),r.e,"0"):(y(e,2,j.length,"Base"),t=S(v(p(r.c),i,"0"),10,e,n,!0)),n<0&&r.c[0]&&(t="-"+t)),t},N.valueOf=N.toJSON=function(){return Y(this)},N._isBigNumber=!0,N[Symbol.toStringTag]="BigNumber",N[Symbol.for("nodejs.util.inspect.custom")]=N.valueOf,null!=b&&F.set(b),F}(),E=function(){return(E=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},S=function(){function e(){this.format=e.DEFAULT_FORMAT,b.config({FORMAT:this.format})}return e.prototype.set=function(e){"FORMAT"in e&&(this.format=E({},this.format,e.FORMAT),e.FORMAT=this.format),b.config(e)},e.DEFAULT_FORMAT={prefix:"",decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:" ",fractionGroupSize:0,suffix:""},e}();e.BigNumber=function(){function e(t){"object"==typeof t&&e.isBigNumber(t)?this.bn=t.bn.plus(0):this.bn=e.toBigNumberJs(t)}return e.prototype.clone=function(){return new e(this)},e.prototype.add=function(t){return new e(this.bn.plus(e.toBigNumberJs(t)))},e.prototype.sub=function(t){return new e(this.bn.minus(e.toBigNumberJs(t)))},e.prototype.mul=function(t){return new e(this.bn.times(e.toBigNumberJs(t)))},e.prototype.div=function(t){return new e(this.bn.div(e.toBigNumberJs(t)))},e.prototype.pow=function(t){return new e(this.bn.pow(e.toBigNumberJs(t)))},e.prototype.sqrt=function(){return new e(this.bn.sqrt())},e.prototype.abs=function(){return new e(this.bn.abs())},e.prototype.mod=function(t){return new e(this.bn.mod(e.toBigNumberJs(t)))},e.prototype.roundTo=function(t,r){return void 0===t&&(t=0),void 0===r&&(r=4),new e(this.bn.dp(t||0,r))},e.prototype.eq=function(t){return this.bn.eq(e.toBigNumberJs(t))},e.prototype.lt=function(t){return this.bn.lt(e.toBigNumberJs(t))},e.prototype.gt=function(t){return this.bn.gt(e.toBigNumberJs(t))},e.prototype.lte=function(t){return this.bn.lte(e.toBigNumberJs(t))},e.prototype.gte=function(t){return this.bn.gte(e.toBigNumberJs(t))},e.prototype.isNaN=function(){return this.bn.isNaN()},e.prototype.isFinite=function(){return this.bn.isFinite()},e.prototype.isZero=function(){return this.eq(0)},e.prototype.isPositive=function(){return this.gt(0)},e.prototype.isNegative=function(){return this.lt(0)},e.prototype.isInt=function(){return this.bn.isInteger()},e.prototype.getDecimalsCount=function(){return this.bn.dp()},e.prototype.isEven=function(){return this.mod(2).eq(0)},e.prototype.isOdd=function(){return!this.isEven()},e.prototype.isInSignedRange=function(){return this.gte(e.MIN_VALUE)&&this.lte(e.MAX_VALUE)},e.prototype.isInUnsignedRange=function(){return this.gte(e.MIN_UNSIGNED_VALUE)&&this.lte(e.MAX_UNSIGNED_VALUE)},e.prototype.toFormat=function(e,t,r){return this.bn.toFormat(e,t,r)},e.prototype.toFixed=function(e,t){return null==e?this.bn.toFixed():this.bn.toFixed(e,t)},e.prototype.toString=function(){return this.toFixed()},e.prototype.toNumber=function(){return this.bn.toNumber()},e.prototype.toJSON=function(){return this.bn.toFixed()},e.prototype.valueOf=function(){return this.bn.valueOf()},e.prototype.toBytes=function(t){var r=void 0===t?{}:t,n=r.isSigned,i=void 0===n||n,a=r.isLong,o=void 0===a||a;if(!this.isInt())throw new Error("Cant create bytes from number with decimals!");if(!i&&this.isNegative())throw new Error("Cant create bytes from negative number in signed mode!");if(o&&i&&!this.isInSignedRange())throw new Error("Number is not from signed numbers range");if(o&&!i&&!this.isInUnsignedRange())throw new Error("Number is not from unsigned numbers range");var s=i&&this.isNegative(),u=s?"1":"0",c=this.bn.plus(u).toString(2).replace("-",""),l=o?64:8*Math.ceil(c.length/8),f=e._toLength(l,c).split(""),h=[];do{h.push(parseInt(f.splice(0,8).join(""),2))}while(f.length);return s?Uint8Array.from(h.map((function(e){return 255-e}))):Uint8Array.from(h)},e.fromBytes=function(t,r){var n=void 0===r?{}:r,i=n.isSigned,a=void 0===i||i,o=n.isLong,s=void 0===o||o;if(s&&8!==t.length)throw new Error("Wrong bytes length! Minimal length is 8 byte!");t=!s&&t.length>0||s?t:[0];var u=!!a&&t[0]>127,c=Array.from(t).map((function(e){return u?255-e:e})).map((function(t){return e._toLength(8,t.toString(2))})).join(""),l=new e(new b(c,2));return u?l.mul(-1).sub(1):l},e.max=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.toBigNumber(t).reduce((function(e,t){return e.gte(t)?e:t}))},e.min=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.toBigNumber(t).reduce((function(e,t){return e.lte(t)?e:t}))},e.sum=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.toBigNumber(t).reduce((function(e,t){return e.add(t)}))},e.isBigNumber=function(t){return t&&"object"==typeof t&&(t instanceof e||Object.entries(e.prototype).filter((function(e){return"_"!==e[0].charAt(0)})).every((function(e){var r=e[0],n=e[1];return r in t&&typeof n==typeof t[r]})))},e.toBigNumber=function(t){return Array.isArray(t)?t.map((function(t){return new e(t)})):new e(t)},e.toBigNumberJs=function(t){return b.isBigNumber(t)?t:t instanceof e?t.bn:new b(t)},e._toLength=function(e,t){return new Array(e).fill("0",0,e).concat(t.split("")).slice(-e).join("")},e.MIN_VALUE=new e("-9223372036854775808"),e.MAX_VALUE=new e("9223372036854775807"),e.MIN_UNSIGNED_VALUE=new e("0"),e.MAX_UNSIGNED_VALUE=new e("18446744073709551615"),e.config=new S,e}(),function(e){!function(e){e[e.ROUND_UP=0]="ROUND_UP",e[e.ROUND_DOWN=1]="ROUND_DOWN",e[e.ROUND_CEIL=2]="ROUND_CEIL",e[e.ROUND_FLOOR=3]="ROUND_FLOOR",e[e.ROUND_HALF_UP=4]="ROUND_HALF_UP",e[e.ROUND_HALF_DOWN=5]="ROUND_HALF_DOWN",e[e.ROUND_HALF_EVEN=6]="ROUND_HALF_EVEN",e[e.ROUND_HALF_CEIL=7]="ROUND_HALF_CEIL",e[e.ROUND_HALF_FLOOR=8]="ROUND_HALF_FLOOR"}(e.ROUND_MODE||(e.ROUND_MODE={}))}(e.BigNumber||(e.BigNumber={}));var C=e.BigNumber;e.default=C,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var i=n(r(55));t.default=function(e){return i.default(e).then((function(e){return String.fromCharCode(e)}))}},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e};t.__esModule=!0,t.Watch=void 0;var a=r(16),o=r(3),s=r(108),u=function(){function e(e,t,r,n){this._emitter=new s.EventEmitter,this._timer=null,this.address=t,this._interval=n||1e3,this._base=e,this._lastBlock={lastId:(null==r?void 0:r.id)||"",height:(null==r?void 0:r.height)||0,transactions:r?[r]:[]},this._addTimeout()}return e.prototype.on=function(e,t){this._emitter.on(e,t)},e.prototype.once=function(e,t){this._emitter.once(e,t)},e.prototype.off=function(e,t){this._emitter.off(e,t)},e.prototype._run=function(){var t=this;this._timer&&clearTimeout(this._timer);var r=function(){return t._addTimeout()};a.fetchTransactions(this._base,this.address,1).then((function(a){var s=n(a,1)[0];if(!s)return t._addTimeout(),null;t.getTransactionsInHeight(s,310).then((function(r){var a,s=e._groupByHeight(r),u=o.keys(s).map(Number).sort((function(e,t){return t-e})),c=n(u,2),l=c[0],f=c[1];if(t._lastBlock.height){var h=o.indexBy(o.prop("id"),t._lastBlock.transactions),p=e._getTransactionsToDispatch(i(s[l],s[f]||[]),h,t._lastBlock.lastId);t._lastBlock.height!==l?t._lastBlock={height:l,lastId:s[f]&&s[f].length?s[f][0].id:"",transactions:s[l]}:(a=t._lastBlock.transactions).push.apply(a,i(p)),p.length&&t._emitter.trigger("change-state",p)}else t._lastBlock={height:l,lastId:s[f]&&s[f].length?s[f][0].id:"",transactions:s[l]},t._emitter.trigger("change-state",r);t._addTimeout()}),r)})).catch(r)},e.prototype.getTransactionsInHeight=function(t,r){var s=this,u=t.height,c=function(t){return t.length>=r?Promise.resolve(t):a.fetchTransactions(s._base,s.address,t.length+100).then((function(r){if(t.length===r.length)return t;var a=e._groupByHeight(r),s=o.keys(a).map(Number).sort((function(e,t){return t-e})),l=n(s,2),f=l[0],h=l[1];return f===u&&h?i(a[f],[a[h][0]]):c(r)}))};return c([t])},e.prototype._addTimeout=function(){var e=this;this._timer=setTimeout((function(){e._run()}),this._interval)},e._groupByHeight=function(e){return e.reduce((function(e,t){return e[t.height]?e[t.height].push(t):e[t.height]=[t],e}),Object.create(null))},e._getTransactionsToDispatch=function(e,t,r){for(var n=[],i=0;i<e.length;i++){var a=e[i];if(a.id===r)break;t[a.id]||n.push(a)}return n},e}();t.Watch=u,t.default=function(e,t,r){return a.fetchTransactions(e,t,1).then((function(i){var a=n(i,1)[0];return new u(e,t,a,r)}))}},function(e,t,r){"use strict";t.__esModule=!0,function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r(109))},function(e,t,r){"use strict";t.__esModule=!0;var n=function(){function e(){this._events=Object.create(null)}return e.prototype.hasListeners=function(e){return!(!this._events[e]||!this._events[e].length)},e.prototype.getActiveEvents=function(){var e=this;return Object.keys(this._events).filter((function(t){return e.hasListeners(t)}))},e.prototype.trigger=function(e,t){this._events[e]&&(this._events[e]=this._events[e].filter((function(e){try{e.handler.call(e.context,t)}catch(e){}return!e.once})),this._events[e].length||delete this._events[e])},e.prototype.on=function(e,t,r){this._on(e,t,r,!1)},e.prototype.once=function(e,t,r){this._on(e,t,r,!0)},e.prototype.off=function(e,t){var r=this,n="string"==typeof e?e:null,i="function"==typeof t?t:"function"==typeof e?e:null;n?i?n in this._events&&(this._events[n]=this._events[n].filter((function(e){return e.handler!==i}))):delete this._events[n]:Object.keys(this._events).forEach((function(e){r.off(e,i)}))},e.prototype._on=function(e,t,r,n){this._events[e]||(this._events[e]=[]),this._events[e].push({handler:t,context:r,once:n})},e}();t.EventEmitter=n}])}));
|
|
26
|
+
*/!function(){"use strict";var o="input is invalid type",s="object"==typeof window,u=s?window:{};u.JS_SHA3_NO_WINDOW&&(s=!1);var c=!s&&"object"==typeof self;!u.JS_SHA3_NO_NODE_JS&&"object"==typeof n&&n.versions&&n.versions.node?u=i:c&&(u=self);var l=!u.JS_SHA3_NO_COMMON_JS&&"object"==typeof e&&e.exports,f=r(81),h=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,p="0123456789abcdef".split(""),d=[4,1024,262144,67108864],y=[0,8,16,24],g=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],m=[224,256,384,512],v=[128,256],b=["hex","buffer","arrayBuffer","array","digest"],E={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!h||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var S=function(e,t,r){return function(n){return new D(e,t,e).update(n)[r]()}},C=function(e,t,r){return function(n,i){return new D(e,t,i).update(n)[r]()}},T=function(e,t,r){return function(t,n,i,a){return _["cshake"+e].update(t,n,i,a)[r]()}},A=function(e,t,r){return function(t,n,i,a){return _["kmac"+e].update(t,n,i,a)[r]()}},I=function(e,t,r,n){for(var i=0;i<b.length;++i){var a=b[i];e[a]=t(r,n,a)}return e},w=function(e,t){var r=S(e,t,"hex");return r.create=function(){return new D(e,t,e)},r.update=function(e){return r.create().update(e)},I(r,S,e,t)},B=[{name:"keccak",padding:[1,256,65536,16777216],bits:m,createMethod:w},{name:"sha3",padding:[6,1536,393216,100663296],bits:m,createMethod:w},{name:"shake",padding:[31,7936,2031616,520093696],bits:v,createMethod:function(e,t){var r=C(e,t,"hex");return r.create=function(r){return new D(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},I(r,C,e,t)}},{name:"cshake",padding:d,bits:v,createMethod:function(e,t){var r=E[e],n=T(e,0,"hex");return n.create=function(n,i,a){return i||a?new D(e,t,n).bytepad([i,a],r):_["shake"+e].create(n)},n.update=function(e,t,r,i){return n.create(t,r,i).update(e)},I(n,T,e,t)}},{name:"kmac",padding:d,bits:v,createMethod:function(e,t){var r=E[e],n=A(e,0,"hex");return n.create=function(n,i,a){return new M(e,t,i).bytepad(["KMAC",a],r).bytepad([n],r)},n.update=function(e,t,r,i){return n.create(e,r,i).update(t)},I(n,A,e,t)}}],_={},N=[],R=0;R<B.length;++R)for(var k=B[R],U=k.bits,P=0;P<U.length;++P){var O=k.name+"_"+U[P];if(N.push(O),_[O]=k.createMethod(U[P],k.padding),"sha3"!==k.name){var L=k.name+U[P];N.push(L),_[L]=_[O]}}function D(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function M(e,t,r){D.call(this,e,t,r)}D.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}for(var n,i,a=this.blocks,s=this.byteCount,u=e.length,c=this.blockCount,l=0,f=this.s;l<u;){if(this.reset)for(this.reset=!1,a[0]=this.block,n=1;n<c+1;++n)a[n]=0;if(t)for(n=this.start;l<u&&n<s;++l)a[n>>2]|=e[l]<<y[3&n++];else for(n=this.start;l<u&&n<s;++l)(i=e.charCodeAt(l))<128?a[n>>2]|=i<<y[3&n++]:i<2048?(a[n>>2]|=(192|i>>6)<<y[3&n++],a[n>>2]|=(128|63&i)<<y[3&n++]):i<55296||i>=57344?(a[n>>2]|=(224|i>>12)<<y[3&n++],a[n>>2]|=(128|i>>6&63)<<y[3&n++],a[n>>2]|=(128|63&i)<<y[3&n++]):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++l)),a[n>>2]|=(240|i>>18)<<y[3&n++],a[n>>2]|=(128|i>>12&63)<<y[3&n++],a[n>>2]|=(128|i>>6&63)<<y[3&n++],a[n>>2]|=(128|63&i)<<y[3&n++]);if(this.lastByteIndex=n,n>=s){for(this.start=n-s,this.block=a[c],n=0;n<c;++n)f[n]^=a[n];x(f),this.reset=!0}else this.start=n}return this},D.prototype.encode=function(e,t){var r=255&e,n=1,i=[r];for(r=255&(e>>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},D.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}var n=0,i=e.length;if(t)n=i;else for(var a=0;a<e.length;++a){var s=e.charCodeAt(a);s<128?n+=1:s<2048?n+=2:s<55296||s>=57344?n+=3:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++a)),n+=4)}return n+=this.encode(8*n),this.update(e),n},D.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n<e.length;++n)r+=this.encodeString(e[n]);var i=t-r%t,a=[];return a.length=i,this.update(a),this},D.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];x(n)}},D.prototype.toString=D.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,a=0,o=0,s="";o<n;){for(a=0;a<t&&o<n;++a,++o)e=r[a],s+=p[e>>4&15]+p[15&e]+p[e>>12&15]+p[e>>8&15]+p[e>>20&15]+p[e>>16&15]+p[e>>28&15]+p[e>>24&15];o%t==0&&(x(r),a=0)}return i&&(e=r[a],s+=p[e>>4&15]+p[15&e],i>1&&(s+=p[e>>12&15]+p[e>>8&15]),i>2&&(s+=p[e>>20&15]+p[e>>16&15])),s},D.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,a=0,o=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);o<n;){for(a=0;a<t&&o<n;++a,++o)u[o]=r[a];o%t==0&&x(r)}return i&&(u[a]=r[a],e=e.slice(0,s)),e},D.prototype.buffer=D.prototype.arrayBuffer,D.prototype.digest=D.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,n=this.s,i=this.outputBlocks,a=this.extraBytes,o=0,s=0,u=[];s<i;){for(o=0;o<r&&s<i;++o,++s)e=s<<2,t=n[o],u[e]=255&t,u[e+1]=t>>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%r==0&&x(n)}return a&&(e=s<<2,t=n[o],u[e]=255&t,a>1&&(u[e+1]=t>>8&255),a>2&&(u[e+2]=t>>16&255)),u},M.prototype=new D,M.prototype.finalize=function(){return this.encode(this.outputBits,!0),D.prototype.finalize.call(this)};var x=function(e){var t,r,n,i,a,o,s,u,c,l,f,h,p,d,y,m,v,b,E,S,C,T,A,I,w,B,_,N,R,k,U,P,O,L,D,M,x,V,K,j,F,q,G,z,H,Y,Q,W,X,J,Z,$,ee,te,re,ne,ie,ae,oe,se,ue,ce,le;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],a=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(o<<1|s>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|o>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|c>>>31),r=a^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=o^(l<<1|f>>>31),r=s^(f<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|p>>>31),r=c^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(i<<1|a>>>31),r=f^(a<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,d=e[0],y=e[1],Y=e[11]<<4|e[10]>>>28,Q=e[10]<<4|e[11]>>>28,N=e[20]<<3|e[21]>>>29,R=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,L=e[2]<<1|e[3]>>>31,D=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,W=e[22]<<10|e[23]>>>22,X=e[23]<<10|e[22]>>>22,k=e[33]<<13|e[32]>>>19,U=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,M=e[14]<<6|e[15]>>>26,x=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,E=e[24]<<11|e[25]>>>21,J=e[34]<<15|e[35]>>>17,Z=e[35]<<15|e[34]>>>17,P=e[45]<<29|e[44]>>>3,O=e[44]<<29|e[45]>>>3,I=e[6]<<28|e[7]>>>4,w=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,V=e[26]<<25|e[27]>>>7,K=e[27]<<25|e[26]>>>7,S=e[36]<<21|e[37]>>>11,C=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,z=e[8]<<27|e[9]>>>5,H=e[9]<<27|e[8]>>>5,B=e[18]<<20|e[19]>>>12,_=e[19]<<20|e[18]>>>12,ae=e[29]<<7|e[28]>>>25,oe=e[28]<<7|e[29]>>>25,j=e[38]<<8|e[39]>>>24,F=e[39]<<8|e[38]>>>24,T=e[48]<<14|e[49]>>>18,A=e[49]<<14|e[48]>>>18,e[0]=d^~m&b,e[1]=y^~v&E,e[10]=I^~B&N,e[11]=w^~_&R,e[20]=L^~M&V,e[21]=D^~x&K,e[30]=z^~Y&W,e[31]=H^~Q&X,e[40]=te^~ne&ae,e[41]=re^~ie&oe,e[2]=m^~b&S,e[3]=v^~E&C,e[12]=B^~N&k,e[13]=_^~R&U,e[22]=M^~V&j,e[23]=x^~K&F,e[32]=Y^~W&J,e[33]=Q^~X&Z,e[42]=ne^~ae&se,e[43]=ie^~oe&ue,e[4]=b^~S&T,e[5]=E^~C&A,e[14]=N^~k&P,e[15]=R^~U&O,e[24]=V^~j&q,e[25]=K^~F&G,e[34]=W^~J&$,e[35]=X^~Z&ee,e[44]=ae^~se&ce,e[45]=oe^~ue&le,e[6]=S^~T&d,e[7]=C^~A&y,e[16]=k^~P&I,e[17]=U^~O&w,e[26]=j^~q&L,e[27]=F^~G&D,e[36]=J^~$&z,e[37]=Z^~ee&H,e[46]=se^~ce&te,e[47]=ue^~le&re,e[8]=T^~d&m,e[9]=A^~y&v,e[18]=P^~I&B,e[19]=O^~w&_,e[28]=q^~L&M,e[29]=G^~D&x,e[38]=$^~z&Y,e[39]=ee^~H&Q,e[48]=ce^~te&ne,e[49]=le^~re&ie,e[0]^=g[n],e[1]^=g[n+1]};if(l)e.exports=_;else{for(R=0;R<N.length;++R)u[N[R]]=_[N[R]];f&&(void 0===(a=function(){return _}.call(t,r,t,e))||(e.exports=a))}}()}).call(this,r(19),r(13))},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=r(5),a=n(r(47)),o=r(14),s=r(37),u=r(20),c=r(8),l=r(18);function f(e,t){for(void 0===t&&(t=5e3);t--;){var r=i.stringToBytes(e);e=u.base16Encode(c.sha256(r))}return e}function h(e,t,r){void 0===r&&(r=48);for(var n=i.bytesToString(o.concat(e,t),"raw"),s="",u=s;u.length<r;)u+=s=a.create().update(s+n).digest().getBytes();return u}t.encryptSeed=function(e,t,r){var n=f(t,r),a=l.randomBytes(8),c=h(i.stringToBytes(n,"raw"),a),p=i.stringToBytes(c.slice(0,32),"raw"),d=i.stringToBytes(c.slice(32),"raw"),y=s.aesEncrypt(i.stringToBytes(e),p,"CBC",d);return u.base64Encode(o.concat(i.stringToBytes("Salted__"),a,y))},t.decryptSeed=function(e,t,r){var n=f(t,r),a=u.base64Decode(e),o=a.slice(8,16),c=h(i.stringToBytes(n,"raw"),o),l=i.stringToBytes(c.slice(0,32),"raw"),p=i.stringToBytes(c.slice(32),"raw");return i.bytesToString(s.aesDecrypt(a.slice(16),l,"CBC",p))}},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o};Object.defineProperty(t,"__esModule",{value:!0});var i=r(8),a=r(14);t.merkleVerify=function(e,t,r){var o=Uint8Array.from([0]),s=Uint8Array.from([1]);if(32!==e.length)throw new Error("Failed to parse merkleProof: Invalid rootHash length");for(var u=i.blake2b(a.concat(o,r)),c=[],l=t.map((function(e){return e}));l.length>0;){var f=0===l[0]?"L":"R",h=l[1];if(h<1)throw new Error("Failed to parse merkleProof: Wrong hash size");var p=l.slice(2,2+h);c.push([f,p]),l=l.slice(2+h)}return c.reduce((function(e,t){var r=n(t,2),o=r[0],u=r[1];return i.blake2b(a.concat(s,"R"===o?a.concat(u,e):a.concat(e,u)))}),u).every((function(t,r){return t===e[r]}))}},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e};t.__esModule=!0;var a=r(17);t.default=function(e,t){if(null==(r=e)||42!=r.length)throw"Invalid ethereum address: "+e+" ";var r;e=e.substr(2);var n=new Uint8Array([1,t]),o=a.base16Decode(e),s=new Uint8Array(i(n,o)),u=a.keccak(a.blake2b(s)),c=new Uint8Array(i(n,o.slice(0,20),u.slice(0,4)));return a.base58Encode(c)}},function(e,t,r){"use strict";t.__esModule=!0;var n=r(17);t.default=function(e){var t=n.base58Decode(e).slice(0,20);return"0x"+n.base16Encode(t)}},function(e,t,r){"use strict";t.__esModule=!0;var n=r(17);t.default=function(e){var t=e;return e.startsWith("0x")&&(t=e.slice(2)),n.base58Encode(n.base16Decode(t))}},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=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}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.create=void 0;var s=a(r(88)),u=a(r(30)),c=a(r(16)),l=a(r(90)),f=a(r(91)),h=a(r(92)),p=a(r(93)),d=a(r(94)),y=a(r(95)),g=a(r(96)),m=a(r(97)),v=a(r(98)),b=a(r(32)),E=a(r(101)),S=o(r(11)),C=o(r(48)),T=o(r(2)),A=o(r(102)),I=o(r(53)),w=o(r(54)),B=o(r(103)),_=o(r(104)),N=o(r(52)),R=o(r(49)),k=o(r(55)),U=o(r(106)),P=o(r(107)),O=a(r(3));function L(e,t){return Object.keys(t).reduce((function(r,n){return r[n]=D(e,t[n]),r}),{})}function D(e,t){return t.bind(null,e)}t.create=function(e){var t=L(e,s),r=L(e,u),n=L(e,c),i=L(e,l),a=L(e,f),o=L(e,h),M=L(e,p),x=L(e,d),V=L(e,y),K=L(e,g),j=L(e,m),F=L(e,v),q=L(e,b),G=L(e,E);return{addresses:t,blocks:r,transactions:n,leasing:i,tools:{transactions:{broadcast:D(e,A.default),wait:D(e,N.default)},blocks:{getNetworkByte:D(e,k.default),getNetworkCode:D(e,U.default)},addresses:{createWatch:D(e,P.default),getAssetsByTransaction:D(e,I.default),getAssetIdListByTx:w.default,getTransactionsWithAssets:D(e,B.default),availableSponsoredBalances:D(e,_.default)},utils:O,query:S.default,resolve:C.default,request:T.default,parse:R.default},peers:a,rewards:o,utils:M,debug:x,alias:V,consensus:K,activation:j,node:F,assets:q,eth:G}}},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&i(t,e,r);return a(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchAddresses=t.fetchPublicKey=t.fetchSeed=t.fetchSeq=t.fetchEffectiveBalance=t.fetchEffectiveBalanceConfirmations=t.deleteAddressFromWallet=t.fetchMultipleBalance=t.fetchBalance=t.fetchValidate=t.data=t.fetchScriptInfo=t.fetchBalanceConfirmations=t.fetchBalanceDetails=t.fetchScriptInfoMeta=t.fetchDataKey=void 0;var u=o(r(2)),c=s(r(11));t.fetchDataKey=function(e,t,r,n){return void 0===n&&(n=Object.create(null)),u.default({base:e,url:"/addresses/data/"+t+"/"+encodeURIComponent(r),options:n})},t.fetchScriptInfoMeta=function(e,t){return u.default({base:e,url:"/addresses/scriptInfo/"+t+"/meta"})},t.fetchBalanceDetails=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/addresses/balance/details/"+t,options:r})},t.fetchBalanceConfirmations=function(e,t,r,n){return void 0===n&&(n=Object.create(null)),u.default({base:e,url:"/addresses/balance/"+t+"/"+r,options:n})},t.fetchScriptInfo=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/addresses/scriptInfo/"+t,options:r})},t.data=function(e,t,r,n){return void 0===r&&(r=Object.create(null)),void 0===n&&(n=Object.create(null)),u.default({base:e,url:"/addresses/data/"+t+c.default(r),options:n})},t.fetchValidate=function(e,t){return u.default({base:e,url:"/addresses/validate/"+t})},t.fetchBalance=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/addresses/balance/"+t,options:r})},t.fetchMultipleBalance=function(e,t,r){return void 0===r&&(r=Object.create(null)),fetch(e+"/addresses/balance",{method:"POST",body:JSON.stringify({addresses:t}),headers:{"Content-Type":"application/json"}}).then(u.parseResponse)},t.deleteAddressFromWallet=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/addresses/"+t,options:n(n({},r),{method:"DELETE"})})},t.fetchEffectiveBalanceConfirmations=function(e,t,r,n){return void 0===n&&(n=Object.create(null)),u.default({base:e,url:"/addresses/effectiveBalance/"+t+"/"+r,options:n})},t.fetchEffectiveBalance=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/addresses/effectiveBalance/"+t,options:r})},t.fetchSeq=function(e,t,r){return u.default({base:e,url:"/addresses/seq/"+t+"/"+r})},t.fetchSeed=function(e,t){return u.default({base:e,url:"/addresses/seed/"+t})},t.fetchPublicKey=function(e,t){return u.default({base:e,url:"/addresses/publicKey/"+t})},t.fetchAddresses=function(e){return u.default({base:e,url:"/addresses"})}},function(e,t,r){"use strict";var n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n)return n;throw new Error("unable to locate global object")}();e.exports=t=n.fetch,n.fetch&&(t.default=n.fetch.bind(n)),t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchLeasingInfo=t.fetchActive=void 0;var a=i(r(2));t.fetchActive=function(e,t,r){return void 0===r&&(r=Object.create(null)),a.default({base:e,url:"/leasing/active/"+t,options:r})},t.fetchLeasingInfo=function(e,t,r){void 0===r&&(r=Object.create(null));var i='{"ids":['+t.map((function(e){return'"'+e+'"'})).join(",")+"]}";return a.default({base:e,url:"/leasing/info/",options:n(n({},r),{body:i,method:"POST",headers:{"Content-Type":"application/json"}})})}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchSuspended=t.fetchBlackListed=t.fetchConnected=t.fetchAll=void 0;var i=n(r(2));t.fetchAll=function(e,t){return void 0===t&&(t=Object.create(null)),i.default({base:e,url:"/peers/all",options:t})},t.fetchConnected=function(e,t){return void 0===t&&(t=Object.create(null)),i.default({base:e,url:"/peers/connected",options:t})},t.fetchBlackListed=function(e,t){return void 0===t&&(t=Object.create(null)),i.default({base:e,url:"/peers/blacklisted",options:t})},t.fetchSuspended=function(e,t){return void 0===t&&(t=Object.create(null)),i.default({base:e,url:"/peers/suspended",options:t})}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchRewards=void 0;var i=n(r(2));t.fetchRewards=function(e,t,r){return void 0===r&&(r=Object.create(null)),i.default({base:e,url:t?"/blockchain/rewards/"+t:"/blockchain/rewards",options:r})}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchNodeTime=t.fetchSignPrivateKey=t.fetchScriptDecompile=t.fetchScriptMeta=t.fetchHashFast=t.fetchHashSecure=t.fetchTransactionSerialize=t.fetchEvaluate=t.fetchEstimate=t.fetchCompileWithImports=t.fetchCompileCode=t.fetchSeed=void 0;var i=n(r(2)),a=n(r(50));t.fetchSeed=function(e,t){return i.default({base:e,url:"/utils/seed"+(t?"/"+t:"")})},t.fetchCompileCode=function(e,t){return i.default({base:e,url:"/utils/script/compileCode",options:{method:"POST",body:t,headers:{"Content-Type":"application/json"}}})},t.fetchCompileWithImports=function(e,t){return i.default({base:e,url:"/utils/script/compileWithImports",options:{method:"POST",body:a.default(t),headers:{"Content-Type":"application/json"}}})},t.fetchEstimate=function(e,t){return i.default({base:e,url:"/utils/script/estimate",options:{method:"POST",body:t,headers:{"Content-Type":"application/json"}}})},t.fetchEvaluate=function(e,t,r){return i.default({base:e,url:"/utils/script/evaluate/"+t,options:{method:"POST",body:JSON.stringify({expr:r}),headers:{"Content-Type":"application/json"}}})},t.fetchTransactionSerialize=function(e,t){return i.default({base:e,url:"/utils/transactionSerialize",options:{method:"POST",body:a.default(t),headers:{"Content-Type":"application/json"}}})},t.fetchHashSecure=function(e,t){return i.default({base:e,url:"/utils/hash/secure",options:{method:"POST",body:t,headers:{"Content-Type":"application/json"}}})},t.fetchHashFast=function(e,t){return i.default({base:e,url:"/utils/hash/fast",options:{method:"POST",body:t,headers:{"Content-Type":"application/json"}}})},t.fetchScriptMeta=function(e,t){return i.default({base:e,url:"/utils/script/meta",options:{method:"POST",body:t,headers:{"Content-Type":"application/json"}}})},t.fetchScriptDecompile=function(e,t){return i.default({base:e,url:"/utils/script/decompile",options:{method:"POST",body:t,headers:{"Content-Type":"application/json"}}})},t.fetchSignPrivateKey=function(e,t,r){return i.default({base:e,url:"/utils/sign/"+t,options:{method:"POST",body:r,headers:{"Content-Type":"application/json"}}})},t.fetchNodeTime=function(e){return i.default({base:e,url:"/utils/time"})}},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=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}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.debugValidate=t.debugStateWaves=t.debugStateHash=t.debugState=t.debugRollbackTo=t.debugRollback=t.debugPrint=t.fetchPortfolios=t.fetchMinerInfo=t.fetchDebugInfo=t.fetchConfigInfo=t.postPeerToTheBanList=t.fetchStateChangesByTxId=t.fetchStateChangesByAddress=t.fetchBalanceHistory=void 0;var s=a(r(2)),u=o(r(11));t.fetchBalanceHistory=function(e,t,r){return void 0===r&&(r=Object.create(null)),s.default({base:e,url:"/debug/balances/history/"+t,options:r})},t.fetchStateChangesByAddress=function(e,t,r,n,i){return void 0===i&&(i=Object.create(null)),s.default({base:e,url:"/debug/stateChanges/address/"+t+"/limit/"+r+u.default({after:n}),options:i})},t.fetchStateChangesByTxId=function(e,t,r){return void 0===r&&(r=Object.create(null)),s.default({base:e,url:"/transactions/info/"+t,options:r})},t.postPeerToTheBanList=function(e,t){return fetch(e+"/debug/blacklist",{method:"POST",body:t,headers:{"Content-Type":"application/json"}}).then(s.parseResponse)},t.fetchConfigInfo=function(e,t){return fetch(e+"/debug/configInfo",{method:"GET",headers:{"X-API-Key":t,"Content-Type":"application/json"}}).then(s.parseResponse)},t.fetchDebugInfo=function(e,t){return fetch(e+"/debug/info",{method:"GET",headers:{"X-API-Key":t,"Content-Type":"application/json"}}).then(s.parseResponse)},t.fetchMinerInfo=function(e,t){return fetch(e+"/debug/minerInfo",{method:"GET",headers:{"X-API-Key":t,"Content-Type":"application/json"}}).then(s.parseResponse)},t.fetchPortfolios=function(e,t,r){return fetch(e+"/debug/portfolios/"+t,{method:"GET",headers:{"X-API-Key":r,"Content-Type":"application/json"}}).then(s.parseResponse)},t.debugPrint=function(e,t,r){return fetch(e+"/debug/print",{method:"POST",headers:{"X-API-Key":r,"Content-Type":"application/json"},body:JSON.stringify({message:t})}).then(s.parseResponse)},t.debugRollback=function(e,t,r,n){return fetch(e+"/debug/rollback",{method:"POST",headers:{"X-API-Key":n,"Content-Type":"application/json"},body:JSON.stringify({rollbackTo:t,returnTransactionsToUtx:r})}).then(s.parseResponse)},t.debugRollbackTo=function(e,t,r){return fetch(e+"/debug/rollback-to/"+t,{method:"DELETE",headers:{"X-API-Key":r,"Content-Type":"application/json"}}).then(s.parseResponse)},t.debugState=function(e,t){return fetch(e+"/debug/state",{method:"GET",headers:{"X-API-Key":t,"Content-Type":"application/json"}}).then(s.parseResponse)},t.debugStateHash=function(e,t,r){return void 0===r&&(r=Object.create(null)),s.default({base:e,url:"/debug/stateHash/"+t,options:r})},t.debugStateWaves=function(e,t,r){return fetch(e+"/debug/stateWaves/"+t,{method:"GET",headers:{"X-API-Key":r,"Content-Type":"application/json"}}).then(s.parseResponse)},t.debugValidate=function(e,t){return fetch(e+"/debug/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:t}).then(s.parseResponse)}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchByAddress=t.fetchByAlias=void 0;var i=n(r(2));t.fetchByAlias=function(e,t){return i.default({base:e,url:"/alias/by-alias/"+t})},t.fetchByAddress=function(e,t){return i.default({base:e,url:"/alias/by-address/"+t})}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchConsensusAlgo=t.fetchBasetarget=t.fetchGeneratingBalance=void 0;var i=n(r(2));t.fetchGeneratingBalance=function(e,t,r){return void 0===r&&(r=Object.create(null)),i.default({base:e,url:"/consensus/generatingbalance/"+t})},t.fetchBasetarget=function(e){return i.default({base:e,url:"/consensus/basetarget"})},t.fetchConsensusAlgo=function(e){return i.default({base:e,url:"/consensus/algo"})}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchActivationStatus=void 0;var i=n(r(2));t.fetchActivationStatus=function(e){return i.default({base:e,url:"activation/status"})}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchNodeVersion=t.fetchNodeStatus=void 0;var i=n(r(2));t.fetchNodeStatus=function(e,t){return void 0===t&&(t=Object.create(null)),i.default({base:e,url:"/node/status",options:t})},t.fetchNodeVersion=function(e,t){return void 0===t&&(t=Object.create(null)),i.default({base:e,url:"/node/version",options:t})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});r(51)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchEthAssetDetails=void 0;var i=n(r(2)),a=r(3),o=n(r(11));t.fetchEthAssetDetails=function(e,t){var r=a.toArray(t);return i.default({base:e,url:"/eth/assets?"+o.default({id:r})}).then((function(e){return Array.isArray(t)?e:e[0]}))}},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var a=r(16),o=r(3),s=i(r(52)),u={chain:!1,confirmations:-1,maxWaitTime:0,requestInterval:0};t.default=function(e,t,r){var i=n(n({},u),r||{}),c=!Array.isArray(t),l=i.confirmations>0?1:0;return(i.chain?function(e,t,r){return new Promise((function(n,i){var o=t.slice().reverse(),u=[],c=function(){if(!o.length)return n(u),null;var t=o.pop();a.broadcast(e,t).then((function(t){return s.default(e,t,r)})).then((function(e){u.push(e),c()}),i)};c()}))}(e,o.toArray(t),n(n({},i),{confirmations:l})):function(e,t){return Promise.all(t.map((function(t){return a.broadcast(e,t)})))}(e,o.toArray(t))).then((function(t){return i.confirmations<=0?t:s.default(e,t,i)})).then((function(e){return c?o.head(e):e}))}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var i=r(16),a=n(r(53));t.default=function(e,t,r,n){return i.fetchTransactions(e,t,r,n).then((function(t){return a.default(e,t).then((function(e){return{transactions:t,assets:e}}))}))}},function(e,t,r){"use strict";t.__esModule=!0;var n=r(105),i=r(32),a=r(3);t.default=function(e,t,r){return i.fetchAssetsBalance(e,t).then(a.pipe(a.prop("balances"),a.filter(function(e){return function(t){return t.minSponsoredAssetFee&&n.BigNumber.toBigNumber(t.sponsorBalance||0).gte(e)&&n.BigNumber.toBigNumber(e).div(.001*Math.pow(10,8)).mul(t.minSponsoredAssetFee).lte(t.balance)||!1}}(r)),a.map(function(e){var t=n.BigNumber.toBigNumber(e).div(.001*Math.pow(10,8));return function(r){return{assetId:r.assetId,wavesFee:e,assetFee:n.BigNumber.toBigNumber(r.minSponsoredAssetFee).mul(t).toFixed()}}}(r))))}},function(e,t,r){!function(e){"use strict";var t=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,r=Math.ceil,n=Math.floor,i="[BigNumber Error] ",a=i+"Number primitive has more than 15 significant digits: ",o=1e14,s=14,u=9007199254740991,c=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],l=1e7,f=1e9;function h(e){var t=0|e;return e>0||e===t?t:t-1}function p(e){for(var t,r,n=1,i=e.length,a=e[0]+"";n<i;){for(t=e[n++]+"",r=s-t.length;r--;t="0"+t);a+=t}for(i=a.length;48===a.charCodeAt(--i););return a.slice(0,i+1||1)}function d(e,t){var r,n,i=e.c,a=t.c,o=e.s,s=t.s,u=e.e,c=t.e;if(!o||!s)return null;if(r=i&&!i[0],n=a&&!a[0],r||n)return r?n?0:-s:o;if(o!=s)return o;if(r=o<0,n=u==c,!i||!a)return n?0:!i^r?1:-1;if(!n)return u>c^r?1:-1;for(s=(u=i.length)<(c=a.length)?u:c,o=0;o<s;o++)if(i[o]!=a[o])return i[o]>a[o]^r?1:-1;return u==c?0:u>c^r?1:-1}function y(e,t,r,a){if(e<t||e>r||e!==n(e))throw Error(i+(a||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function g(e){var t=e.c.length-1;return h(e.e/s)==t&&e.c[t]%2!=0}function m(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function v(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var b=function e(b){var E,S,C,T,A,I,w,B,_,N=F.prototype={constructor:F,toString:null,valueOf:null},R=new F(1),k=20,U=4,P=-7,O=21,L=-1e7,D=1e7,M=!1,x=1,V=0,K={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},j="0123456789abcdefghijklmnopqrstuvwxyz";function F(e,r){var i,o,c,l,f,h,p,d,g=this;if(!(g instanceof F))return new F(e,r);if(null==r){if(e&&!0===e._isBigNumber)return g.s=e.s,void(!e.c||e.e>D?g.c=g.e=null:e.e<L?g.c=[g.e=0]:(g.e=e.e,g.c=e.c.slice()));if((h="number"==typeof e)&&0*e==0){if(g.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,f=e;f>=10;f/=10,l++);return void(l>D?g.c=g.e=null:(g.e=l,g.c=[e]))}d=String(e)}else{if(!t.test(d=String(e)))return C(g,d,h);g.s=45==d.charCodeAt(0)?(d=d.slice(1),-1):1}(l=d.indexOf("."))>-1&&(d=d.replace(".","")),(f=d.search(/e/i))>0?(l<0&&(l=f),l+=+d.slice(f+1),d=d.substring(0,f)):l<0&&(l=d.length)}else{if(y(r,2,j.length,"Base"),10==r)return H(g=new F(e),k+g.e+1,U);if(d=String(e),h="number"==typeof e){if(0*e!=0)return C(g,d,h,r);if(g.s=1/e<0?(d=d.slice(1),-1):1,F.DEBUG&&d.replace(/^0\.0*|\./,"").length>15)throw Error(a+e)}else g.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(i=j.slice(0,r),l=f=0,p=d.length;f<p;f++)if(i.indexOf(o=d.charAt(f))<0){if("."==o){if(f>l){l=p;continue}}else if(!c&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){c=!0,f=-1,l=0;continue}return C(g,String(e),h,r)}h=!1,(l=(d=S(d,r,10,g.s)).indexOf("."))>-1?d=d.replace(".",""):l=d.length}for(f=0;48===d.charCodeAt(f);f++);for(p=d.length;48===d.charCodeAt(--p););if(d=d.slice(f,++p)){if(p-=f,h&&F.DEBUG&&p>15&&(e>u||e!==n(e)))throw Error(a+g.s*e);if((l=l-f-1)>D)g.c=g.e=null;else if(l<L)g.c=[g.e=0];else{if(g.e=l,g.c=[],f=(l+1)%s,l<0&&(f+=s),f<p){for(f&&g.c.push(+d.slice(0,f)),p-=s;f<p;)g.c.push(+d.slice(f,f+=s));f=s-(d=d.slice(f)).length}else f-=p;for(;f--;d+="0");g.c.push(+d)}}else g.c=[g.e=0]}function q(e,t,r,n){var i,a,o,s,u;if(null==r?r=U:y(r,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,null==t)u=p(e.c),u=1==n||2==n&&(o<=P||o>=O)?m(u,o):v(u,o,"0");else if(a=(e=H(new F(e),t,r)).e,s=(u=p(e.c)).length,1==n||2==n&&(t<=a||a<=P)){for(;s<t;u+="0",s++);u=m(u,a)}else if(t-=o,u=v(u,a,"0"),a+1>s){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=a-s)>0)for(a+1==s&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function G(e,t){for(var r,n=1,i=new F(e[0]);n<e.length;n++){if(!(r=new F(e[n])).s){i=r;break}t.call(i,r)&&(i=r)}return i}function z(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*s-1)>D?e.c=e.e=null:r<L?e.c=[e.e=0]:(e.e=r,e.c=t),e}function H(e,t,i,a){var u,l,f,h,p,d,y,g=e.c,m=c;if(g){e:{for(u=1,h=g[0];h>=10;h/=10,u++);if((l=t-u)<0)l+=s,f=t,y=(p=g[d=0])/m[u-f-1]%10|0;else if((d=r((l+1)/s))>=g.length){if(!a)break e;for(;g.length<=d;g.push(0));p=y=0,u=1,f=(l%=s)-s+1}else{for(p=h=g[d],u=1;h>=10;h/=10,u++);y=(f=(l%=s)-s+u)<0?0:p/m[u-f-1]%10|0}if(a=a||t<0||null!=g[d+1]||(f<0?p:p%m[u-f-1]),a=i<4?(y||a)&&(0==i||i==(e.s<0?3:2)):y>5||5==y&&(4==i||a||6==i&&(l>0?f>0?p/m[u-f]:0:g[d-1])%10&1||i==(e.s<0?8:7)),t<1||!g[0])return g.length=0,a?(t-=e.e+1,g[0]=m[(s-t%s)%s],e.e=-t||0):g[0]=e.e=0,e;if(0==l?(g.length=d,h=1,d--):(g.length=d+1,h=m[s-l],g[d]=f>0?n(p/m[u-f]%m[f])*h:0),a)for(;;){if(0==d){for(l=1,f=g[0];f>=10;f/=10,l++);for(f=g[0]+=h,h=1;f>=10;f/=10,h++);l!=h&&(e.e++,g[0]==o&&(g[0]=1));break}if(g[d]+=h,g[d]!=o)break;g[d--]=0,h=1}for(l=g.length;0===g[--l];g.pop());}e.e>D?e.c=e.e=null:e.e<L&&(e.c=[e.e=0])}return e}function Y(e){var t,r=e.e;return null===r?e.toString():(t=p(e.c),t=r<=P||r>=O?m(t,r):v(t,r,"0"),e.s<0?"-"+t:t)}return F.clone=e,F.ROUND_UP=0,F.ROUND_DOWN=1,F.ROUND_CEIL=2,F.ROUND_FLOOR=3,F.ROUND_HALF_UP=4,F.ROUND_HALF_DOWN=5,F.ROUND_HALF_EVEN=6,F.ROUND_HALF_CEIL=7,F.ROUND_HALF_FLOOR=8,F.EUCLID=9,F.config=F.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(i+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(y(r=e[t],0,f,t),k=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(y(r=e[t],0,8,t),U=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(y(r[0],-f,0,t),y(r[1],0,f,t),P=r[0],O=r[1]):(y(r,-f,f,t),P=-(O=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)y(r[0],-f,-1,t),y(r[1],1,f,t),L=r[0],D=r[1];else{if(y(r,-f,f,t),!r)throw Error(i+t+" cannot be zero: "+r);L=-(D=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(i+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw M=!r,Error(i+"crypto unavailable");M=r}else M=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(y(r=e[t],0,9,t),x=r),e.hasOwnProperty(t="POW_PRECISION")&&(y(r=e[t],0,f,t),V=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(i+t+" not an object: "+r);K=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(i+t+" invalid: "+r);j=r}}return{DECIMAL_PLACES:k,ROUNDING_MODE:U,EXPONENTIAL_AT:[P,O],RANGE:[L,D],CRYPTO:M,MODULO_MODE:x,POW_PRECISION:V,FORMAT:K,ALPHABET:j}},F.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!F.DEBUG)return!0;var t,r,a=e.c,u=e.e,c=e.s;e:if("[object Array]"=={}.toString.call(a)){if((1===c||-1===c)&&u>=-f&&u<=f&&u===n(u)){if(0===a[0]){if(0===u&&1===a.length)return!0;break e}if((t=(u+1)%s)<1&&(t+=s),String(a[0]).length==t){for(t=0;t<a.length;t++)if((r=a[t])<0||r>=o||r!==n(r))break e;if(0!==r)return!0}}}else if(null===a&&null===u&&(null===c||1===c||-1===c))return!0;throw Error(i+"Invalid BigNumber: "+e)},F.maximum=F.max=function(){return G(arguments,N.lt)},F.minimum=F.min=function(){return G(arguments,N.gt)},F.random=(T=9007199254740992*Math.random()&2097151?function(){return n(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,a,o,u,l,h=0,p=[],d=new F(R);if(null==e?e=k:y(e,0,f),u=r(e/s),M)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(u*=2));h<u;)(l=131072*t[h]+(t[h+1]>>>11))>=9e15?(a=crypto.getRandomValues(new Uint32Array(2)),t[h]=a[0],t[h+1]=a[1]):(p.push(l%1e14),h+=2);h=u/2}else{if(!crypto.randomBytes)throw M=!1,Error(i+"crypto unavailable");for(t=crypto.randomBytes(u*=7);h<u;)(l=281474976710656*(31&t[h])+1099511627776*t[h+1]+4294967296*t[h+2]+16777216*t[h+3]+(t[h+4]<<16)+(t[h+5]<<8)+t[h+6])>=9e15?crypto.randomBytes(7).copy(t,h):(p.push(l%1e14),h+=7);h=u/7}if(!M)for(;h<u;)(l=T())<9e15&&(p[h++]=l%1e14);for(u=p[--h],e%=s,u&&e&&(l=c[s-e],p[h]=n(u/l)*l);0===p[h];p.pop(),h--);if(h<0)p=[o=0];else{for(o=-1;0===p[0];p.splice(0,1),o-=s);for(h=1,l=p[0];l>=10;l/=10,h++);h<s&&(o-=s-h)}return d.e=o,d.c=p,d}),F.sum=function(){for(var e=1,t=arguments,r=new F(t[0]);e<t.length;)r=r.plus(t[e++]);return r},S=function(){function e(e,t,r,n){for(var i,a,o=[0],s=0,u=e.length;s<u;){for(a=o.length;a--;o[a]*=t);for(o[0]+=n.indexOf(e.charAt(s++)),i=0;i<o.length;i++)o[i]>r-1&&(null==o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/r|0,o[i]%=r)}return o.reverse()}return function(t,r,n,i,a){var o,s,u,c,l,f,h,d,y=t.indexOf("."),g=k,m=U;for(y>=0&&(c=V,V=0,t=t.replace(".",""),f=(d=new F(r)).pow(t.length-y),V=c,d.c=e(v(p(f.c),f.e,"0"),10,n,"0123456789"),d.e=d.c.length),u=c=(h=e(t,r,n,a?(o=j,"0123456789"):(o="0123456789",j))).length;0==h[--c];h.pop());if(!h[0])return o.charAt(0);if(y<0?--u:(f.c=h,f.e=u,f.s=i,h=(f=E(f,d,g,m,n)).c,l=f.r,u=f.e),y=h[s=u+g+1],c=n/2,l=l||s<0||null!=h[s+1],l=m<4?(null!=y||l)&&(0==m||m==(f.s<0?3:2)):y>c||y==c&&(4==m||l||6==m&&1&h[s-1]||m==(f.s<0?8:7)),s<1||!h[0])t=l?v(o.charAt(1),-g,o.charAt(0)):o.charAt(0);else{if(h.length=s,l)for(--n;++h[--s]>n;)h[s]=0,s||(++u,h=[1].concat(h));for(c=h.length;!h[--c];);for(y=0,t="";y<=c;t+=o.charAt(h[y++]));t=v(t,u,o.charAt(0))}return t}}(),E=function(){function e(e,t,r){var n,i,a,o,s=0,u=e.length,c=t%l,f=t/l|0;for(e=e.slice();u--;)s=((i=c*(a=e[u]%l)+(n=f*a+(o=e[u]/l|0)*c)%l*l+s)/r|0)+(n/l|0)+f*o,e[u]=i%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var i,a;if(r!=n)a=r>n?1:-1;else for(i=a=0;i<r;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(i,a,u,c,l){var f,p,d,y,g,m,v,b,E,S,C,T,A,I,w,B,_,N=i.s==a.s?1:-1,R=i.c,k=a.c;if(!(R&&R[0]&&k&&k[0]))return new F(i.s&&a.s&&(R?!k||R[0]!=k[0]:k)?R&&0==R[0]||!k?0*N:N/0:NaN);for(E=(b=new F(N)).c=[],N=u+(p=i.e-a.e)+1,l||(l=o,p=h(i.e/s)-h(a.e/s),N=N/s|0),d=0;k[d]==(R[d]||0);d++);if(k[d]>(R[d]||0)&&p--,N<0)E.push(1),y=!0;else{for(I=R.length,B=k.length,d=0,N+=2,(g=n(l/(k[0]+1)))>1&&(k=e(k,g,l),R=e(R,g,l),B=k.length,I=R.length),A=B,C=(S=R.slice(0,B)).length;C<B;S[C++]=0);_=k.slice(),_=[0].concat(_),w=k[0],k[1]>=l/2&&w++;do{if(g=0,(f=t(k,S,B,C))<0){if(T=S[0],B!=C&&(T=T*l+(S[1]||0)),(g=n(T/w))>1)for(g>=l&&(g=l-1),v=(m=e(k,g,l)).length,C=S.length;1==t(m,S,v,C);)g--,r(m,B<v?_:k,v,l),v=m.length,f=1;else 0==g&&(f=g=1),v=(m=k.slice()).length;if(v<C&&(m=[0].concat(m)),r(S,m,C,l),C=S.length,-1==f)for(;t(k,S,B,C)<1;)g++,r(S,B<C?_:k,C,l),C=S.length}else 0===f&&(g++,S=[0]);E[d++]=g,S[0]?S[C++]=R[A]||0:(S=[R[A]],C=1)}while((A++<I||null!=S[0])&&N--);y=null!=S[0],E[0]||E.splice(0,1)}if(l==o){for(d=1,N=E[0];N>=10;N/=10,d++);H(b,u+(b.e=d+p*s-1)+1,c,y)}else b.e=p,b.r=+y;return b}}(),A=/^(-?)0([xbo])(?=\w[\w.]*$)/i,I=/^([^.]+)\.$/,w=/^\.([^.]+)$/,B=/^-?(Infinity|NaN)$/,_=/^\s*\+(?=[\w.])|^\s+|\s+$/g,C=function(e,t,r,n){var a,o=r?t:t.replace(_,"");if(B.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(A,(function(e,t,r){return a="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=a?e:t})),n&&(a=n,o=o.replace(I,"$1").replace(w,"0.$1")),t!=o))return new F(o,a);if(F.DEBUG)throw Error(i+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},N.absoluteValue=N.abs=function(){var e=new F(this);return e.s<0&&(e.s=1),e},N.comparedTo=function(e,t){return d(this,new F(e,t))},N.decimalPlaces=N.dp=function(e,t){var r,n,i,a=this;if(null!=e)return y(e,0,f),null==t?t=U:y(t,0,8),H(new F(a),e+a.e+1,t);if(!(r=a.c))return null;if(n=((i=r.length-1)-h(this.e/s))*s,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},N.dividedBy=N.div=function(e,t){return E(this,new F(e,t),k,U)},N.dividedToIntegerBy=N.idiv=function(e,t){return E(this,new F(e,t),0,1)},N.exponentiatedBy=N.pow=function(e,t){var a,o,u,c,l,f,h,p,d=this;if((e=new F(e)).c&&!e.isInteger())throw Error(i+"Exponent not an integer: "+Y(e));if(null!=t&&(t=new F(t)),l=e.e>14,!d.c||!d.c[0]||1==d.c[0]&&!d.e&&1==d.c.length||!e.c||!e.c[0])return p=new F(Math.pow(+Y(d),l?2-g(e):+Y(e))),t?p.mod(t):p;if(f=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new F(NaN);(o=!f&&d.isInteger()&&t.isInteger())&&(d=d.mod(t))}else{if(e.e>9&&(d.e>0||d.e<-1||(0==d.e?d.c[0]>1||l&&d.c[1]>=24e7:d.c[0]<8e13||l&&d.c[0]<=9999975e7)))return c=d.s<0&&g(e)?-0:0,d.e>-1&&(c=1/c),new F(f?1/c:c);V&&(c=r(V/s+2))}for(l?(a=new F(.5),f&&(e.s=1),h=g(e)):h=(u=Math.abs(+Y(e)))%2,p=new F(R);;){if(h){if(!(p=p.times(d)).c)break;c?p.c.length>c&&(p.c.length=c):o&&(p=p.mod(t))}if(u){if(0===(u=n(u/2)))break;h=u%2}else if(H(e=e.times(a),e.e+1,1),e.e>14)h=g(e);else{if(0==(u=+Y(e)))break;h=u%2}d=d.times(d),c?d.c&&d.c.length>c&&(d.c.length=c):o&&(d=d.mod(t))}return o?p:(f&&(p=R.div(p)),t?p.mod(t):c?H(p,V,U,void 0):p)},N.integerValue=function(e){var t=new F(this);return null==e?e=U:y(e,0,8),H(t,t.e+1,e)},N.isEqualTo=N.eq=function(e,t){return 0===d(this,new F(e,t))},N.isFinite=function(){return!!this.c},N.isGreaterThan=N.gt=function(e,t){return d(this,new F(e,t))>0},N.isGreaterThanOrEqualTo=N.gte=function(e,t){return 1===(t=d(this,new F(e,t)))||0===t},N.isInteger=function(){return!!this.c&&h(this.e/s)>this.c.length-2},N.isLessThan=N.lt=function(e,t){return d(this,new F(e,t))<0},N.isLessThanOrEqualTo=N.lte=function(e,t){return-1===(t=d(this,new F(e,t)))||0===t},N.isNaN=function(){return!this.s},N.isNegative=function(){return this.s<0},N.isPositive=function(){return this.s>0},N.isZero=function(){return!!this.c&&0==this.c[0]},N.minus=function(e,t){var r,n,i,a,u=this,c=u.s;if(t=(e=new F(e,t)).s,!c||!t)return new F(NaN);if(c!=t)return e.s=-t,u.plus(e);var l=u.e/s,f=e.e/s,p=u.c,d=e.c;if(!l||!f){if(!p||!d)return p?(e.s=-t,e):new F(d?u:NaN);if(!p[0]||!d[0])return d[0]?(e.s=-t,e):new F(p[0]?u:3==U?-0:0)}if(l=h(l),f=h(f),p=p.slice(),c=l-f){for((a=c<0)?(c=-c,i=p):(f=l,i=d),i.reverse(),t=c;t--;i.push(0));i.reverse()}else for(n=(a=(c=p.length)<(t=d.length))?c:t,c=t=0;t<n;t++)if(p[t]!=d[t]){a=p[t]<d[t];break}if(a&&(i=p,p=d,d=i,e.s=-e.s),(t=(n=d.length)-(r=p.length))>0)for(;t--;p[r++]=0);for(t=o-1;n>c;){if(p[--n]<d[n]){for(r=n;r&&!p[--r];p[r]=t);--p[r],p[n]+=o}p[n]-=d[n]}for(;0==p[0];p.splice(0,1),--f);return p[0]?z(e,p,f):(e.s=3==U?-1:1,e.c=[e.e=0],e)},N.modulo=N.mod=function(e,t){var r,n,i=this;return e=new F(e,t),!i.c||!e.s||e.c&&!e.c[0]?new F(NaN):!e.c||i.c&&!i.c[0]?new F(i):(9==x?(n=e.s,e.s=1,r=E(i,e,0,3),e.s=n,r.s*=n):r=E(i,e,0,x),(e=i.minus(r.times(e))).c[0]||1!=x||(e.s=i.s),e)},N.multipliedBy=N.times=function(e,t){var r,n,i,a,u,c,f,p,d,y,g,m,v,b,E,S=this,C=S.c,T=(e=new F(e,t)).c;if(!(C&&T&&C[0]&&T[0]))return!S.s||!e.s||C&&!C[0]&&!T||T&&!T[0]&&!C?e.c=e.e=e.s=null:(e.s*=S.s,C&&T?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=h(S.e/s)+h(e.e/s),e.s*=S.s,(f=C.length)<(y=T.length)&&(v=C,C=T,T=v,i=f,f=y,y=i),i=f+y,v=[];i--;v.push(0));for(b=o,E=l,i=y;--i>=0;){for(r=0,g=T[i]%E,m=T[i]/E|0,a=i+(u=f);a>i;)r=((p=g*(p=C[--u]%E)+(c=m*p+(d=C[u]/E|0)*g)%E*E+v[a]+r)/b|0)+(c/E|0)+m*d,v[a--]=p%b;v[a]=r}return r?++n:v.splice(0,1),z(e,v,n)},N.negated=function(){var e=new F(this);return e.s=-e.s||null,e},N.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new F(e,t)).s,!i||!t)return new F(NaN);if(i!=t)return e.s=-t,n.minus(e);var a=n.e/s,u=e.e/s,c=n.c,l=e.c;if(!a||!u){if(!c||!l)return new F(i/0);if(!c[0]||!l[0])return l[0]?e:new F(c[0]?n:0*i)}if(a=h(a),u=h(u),c=c.slice(),i=a-u){for(i>0?(u=a,r=l):(i=-i,r=c),r.reverse();i--;r.push(0));r.reverse()}for((i=c.length)-(t=l.length)<0&&(r=l,l=c,c=r,t=i),i=0;t;)i=(c[--t]=c[t]+l[t]+i)/o|0,c[t]=o===c[t]?0:c[t]%o;return i&&(c=[i].concat(c),++u),z(e,c,u)},N.precision=N.sd=function(e,t){var r,n,i,a=this;if(null!=e&&e!==!!e)return y(e,1,f),null==t?t=U:y(t,0,8),H(new F(a),e,t);if(!(r=a.c))return null;if(n=(i=r.length-1)*s+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&a.e+1>n&&(n=a.e+1),n},N.shiftedBy=function(e){return y(e,-u,u),this.times("1e"+e)},N.squareRoot=N.sqrt=function(){var e,t,r,n,i,a=this,o=a.c,s=a.s,u=a.e,c=k+4,l=new F("0.5");if(1!==s||!o||!o[0])return new F(!s||s<0&&(!o||o[0])?NaN:o?a:1/0);if(0==(s=Math.sqrt(+Y(a)))||s==1/0?(((t=p(o)).length+u)%2==0&&(t+="0"),s=Math.sqrt(+t),u=h((u+1)/2)-(u<0||u%2),r=new F(t=s==1/0?"5e"+u:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new F(s+""),r.c[0])for((s=(u=r.e)+c)<3&&(s=0);;)if(i=r,r=l.times(i.plus(E(a,i,c,1))),p(i.c).slice(0,s)===(t=p(r.c)).slice(0,s)){if(r.e<u&&--s,"9999"!=(t=t.slice(s-3,s+1))&&(n||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(H(r,r.e+k+2,1),e=!r.times(r).eq(a));break}if(!n&&(H(i,i.e+k+2,0),i.times(i).eq(a))){r=i;break}c+=4,s+=4,n=1}return H(r,r.e+k+1,U,e)},N.toExponential=function(e,t){return null!=e&&(y(e,0,f),e++),q(this,e,t,1)},N.toFixed=function(e,t){return null!=e&&(y(e,0,f),e=e+this.e+1),q(this,e,t)},N.toFormat=function(e,t,r){var n,a=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=K;else if("object"!=typeof r)throw Error(i+"Argument not an object: "+r);if(n=a.toFixed(e,t),a.c){var o,s=n.split("."),u=+r.groupSize,c=+r.secondaryGroupSize,l=r.groupSeparator||"",f=s[0],h=s[1],p=a.s<0,d=p?f.slice(1):f,y=d.length;if(c&&(o=u,u=c,c=o,y-=o),u>0&&y>0){for(o=y%u||u,f=d.substr(0,o);o<y;o+=u)f+=l+d.substr(o,u);c>0&&(f+=l+d.slice(o)),p&&(f="-"+f)}n=h?f+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?h.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):f}return(r.prefix||"")+n+(r.suffix||"")},N.toFraction=function(e){var t,r,n,a,o,u,l,f,h,d,y,g,m=this,v=m.c;if(null!=e&&(!(l=new F(e)).isInteger()&&(l.c||1!==l.s)||l.lt(R)))throw Error(i+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+Y(l));if(!v)return new F(m);for(t=new F(R),h=r=new F(R),n=f=new F(R),g=p(v),o=t.e=g.length-m.e-1,t.c[0]=c[(u=o%s)<0?s+u:u],e=!e||l.comparedTo(t)>0?o>0?t:h:l,u=D,D=1/0,l=new F(g),f.c[0]=0;d=E(l,t,0,1),1!=(a=r.plus(d.times(n))).comparedTo(e);)r=n,n=a,h=f.plus(d.times(a=h)),f=a,t=l.minus(d.times(a=t)),l=a;return a=E(e.minus(r),n,0,1),f=f.plus(a.times(h)),r=r.plus(a.times(n)),f.s=h.s=m.s,y=E(h,n,o*=2,U).minus(m).abs().comparedTo(E(f,r,o,U).minus(m).abs())<1?[h,n]:[f,r],D=u,y},N.toNumber=function(){return+Y(this)},N.toPrecision=function(e,t){return null!=e&&y(e,1,f),q(this,e,t,2)},N.toString=function(e){var t,r=this,n=r.s,i=r.e;return null===i?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(null==e?t=i<=P||i>=O?m(p(r.c),i):v(p(r.c),i,"0"):10===e?t=v(p((r=H(new F(r),k+i+1,U)).c),r.e,"0"):(y(e,2,j.length,"Base"),t=S(v(p(r.c),i,"0"),10,e,n,!0)),n<0&&r.c[0]&&(t="-"+t)),t},N.valueOf=N.toJSON=function(){return Y(this)},N._isBigNumber=!0,N[Symbol.toStringTag]="BigNumber",N[Symbol.for("nodejs.util.inspect.custom")]=N.valueOf,null!=b&&F.set(b),F}(),E=function(){return(E=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},S=function(){function e(){this.format=e.DEFAULT_FORMAT,b.config({FORMAT:this.format})}return e.prototype.set=function(e){"FORMAT"in e&&(this.format=E({},this.format,e.FORMAT),e.FORMAT=this.format),b.config(e)},e.DEFAULT_FORMAT={prefix:"",decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:" ",fractionGroupSize:0,suffix:""},e}();e.BigNumber=function(){function e(t){"object"==typeof t&&e.isBigNumber(t)?this.bn=t.bn.plus(0):this.bn=e.toBigNumberJs(t)}return e.prototype.clone=function(){return new e(this)},e.prototype.add=function(t){return new e(this.bn.plus(e.toBigNumberJs(t)))},e.prototype.sub=function(t){return new e(this.bn.minus(e.toBigNumberJs(t)))},e.prototype.mul=function(t){return new e(this.bn.times(e.toBigNumberJs(t)))},e.prototype.div=function(t){return new e(this.bn.div(e.toBigNumberJs(t)))},e.prototype.pow=function(t){return new e(this.bn.pow(e.toBigNumberJs(t)))},e.prototype.sqrt=function(){return new e(this.bn.sqrt())},e.prototype.abs=function(){return new e(this.bn.abs())},e.prototype.mod=function(t){return new e(this.bn.mod(e.toBigNumberJs(t)))},e.prototype.roundTo=function(t,r){return void 0===t&&(t=0),void 0===r&&(r=4),new e(this.bn.dp(t||0,r))},e.prototype.eq=function(t){return this.bn.eq(e.toBigNumberJs(t))},e.prototype.lt=function(t){return this.bn.lt(e.toBigNumberJs(t))},e.prototype.gt=function(t){return this.bn.gt(e.toBigNumberJs(t))},e.prototype.lte=function(t){return this.bn.lte(e.toBigNumberJs(t))},e.prototype.gte=function(t){return this.bn.gte(e.toBigNumberJs(t))},e.prototype.isNaN=function(){return this.bn.isNaN()},e.prototype.isFinite=function(){return this.bn.isFinite()},e.prototype.isZero=function(){return this.eq(0)},e.prototype.isPositive=function(){return this.gt(0)},e.prototype.isNegative=function(){return this.lt(0)},e.prototype.isInt=function(){return this.bn.isInteger()},e.prototype.getDecimalsCount=function(){return this.bn.dp()},e.prototype.isEven=function(){return this.mod(2).eq(0)},e.prototype.isOdd=function(){return!this.isEven()},e.prototype.isInSignedRange=function(){return this.gte(e.MIN_VALUE)&&this.lte(e.MAX_VALUE)},e.prototype.isInUnsignedRange=function(){return this.gte(e.MIN_UNSIGNED_VALUE)&&this.lte(e.MAX_UNSIGNED_VALUE)},e.prototype.toFormat=function(e,t,r){return this.bn.toFormat(e,t,r)},e.prototype.toFixed=function(e,t){return null==e?this.bn.toFixed():this.bn.toFixed(e,t)},e.prototype.toString=function(){return this.toFixed()},e.prototype.toNumber=function(){return this.bn.toNumber()},e.prototype.toJSON=function(){return this.bn.toFixed()},e.prototype.valueOf=function(){return this.bn.valueOf()},e.prototype.toBytes=function(t){var r=void 0===t?{}:t,n=r.isSigned,i=void 0===n||n,a=r.isLong,o=void 0===a||a;if(!this.isInt())throw new Error("Cant create bytes from number with decimals!");if(!i&&this.isNegative())throw new Error("Cant create bytes from negative number in signed mode!");if(o&&i&&!this.isInSignedRange())throw new Error("Number is not from signed numbers range");if(o&&!i&&!this.isInUnsignedRange())throw new Error("Number is not from unsigned numbers range");var s=i&&this.isNegative(),u=s?"1":"0",c=this.bn.plus(u).toString(2).replace("-",""),l=o?64:8*Math.ceil(c.length/8),f=e._toLength(l,c).split(""),h=[];do{h.push(parseInt(f.splice(0,8).join(""),2))}while(f.length);return s?Uint8Array.from(h.map((function(e){return 255-e}))):Uint8Array.from(h)},e.fromBytes=function(t,r){var n=void 0===r?{}:r,i=n.isSigned,a=void 0===i||i,o=n.isLong,s=void 0===o||o;if(s&&8!==t.length)throw new Error("Wrong bytes length! Minimal length is 8 byte!");t=!s&&t.length>0||s?t:[0];var u=!!a&&t[0]>127,c=Array.from(t).map((function(e){return u?255-e:e})).map((function(t){return e._toLength(8,t.toString(2))})).join(""),l=new e(new b(c,2));return u?l.mul(-1).sub(1):l},e.max=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.toBigNumber(t).reduce((function(e,t){return e.gte(t)?e:t}))},e.min=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.toBigNumber(t).reduce((function(e,t){return e.lte(t)?e:t}))},e.sum=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.toBigNumber(t).reduce((function(e,t){return e.add(t)}))},e.isBigNumber=function(t){return t&&"object"==typeof t&&(t instanceof e||Object.entries(e.prototype).filter((function(e){return"_"!==e[0].charAt(0)})).every((function(e){var r=e[0],n=e[1];return r in t&&typeof n==typeof t[r]})))},e.toBigNumber=function(t){return Array.isArray(t)?t.map((function(t){return new e(t)})):new e(t)},e.toBigNumberJs=function(t){return b.isBigNumber(t)?t:t instanceof e?t.bn:new b(t)},e._toLength=function(e,t){return new Array(e).fill("0",0,e).concat(t.split("")).slice(-e).join("")},e.MIN_VALUE=new e("-9223372036854775808"),e.MAX_VALUE=new e("9223372036854775807"),e.MIN_UNSIGNED_VALUE=new e("0"),e.MAX_UNSIGNED_VALUE=new e("18446744073709551615"),e.config=new S,e}(),function(e){!function(e){e[e.ROUND_UP=0]="ROUND_UP",e[e.ROUND_DOWN=1]="ROUND_DOWN",e[e.ROUND_CEIL=2]="ROUND_CEIL",e[e.ROUND_FLOOR=3]="ROUND_FLOOR",e[e.ROUND_HALF_UP=4]="ROUND_HALF_UP",e[e.ROUND_HALF_DOWN=5]="ROUND_HALF_DOWN",e[e.ROUND_HALF_EVEN=6]="ROUND_HALF_EVEN",e[e.ROUND_HALF_CEIL=7]="ROUND_HALF_CEIL",e[e.ROUND_HALF_FLOOR=8]="ROUND_HALF_FLOOR"}(e.ROUND_MODE||(e.ROUND_MODE={}))}(e.BigNumber||(e.BigNumber={}));var C=e.BigNumber;e.default=C,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var i=n(r(55));t.default=function(e){return i.default(e).then((function(e){return String.fromCharCode(e)}))}},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e};t.__esModule=!0,t.Watch=void 0;var a=r(16),o=r(3),s=r(108),u=function(){function e(e,t,r,n){this._emitter=new s.EventEmitter,this._timer=null,this.address=t,this._interval=n||1e3,this._base=e,this._lastBlock={lastId:(null==r?void 0:r.id)||"",height:(null==r?void 0:r.height)||0,transactions:r?[r]:[]},this._addTimeout()}return e.prototype.on=function(e,t){this._emitter.on(e,t)},e.prototype.once=function(e,t){this._emitter.once(e,t)},e.prototype.off=function(e,t){this._emitter.off(e,t)},e.prototype._run=function(){var t=this;this._timer&&clearTimeout(this._timer);var r=function(){return t._addTimeout()};a.fetchTransactions(this._base,this.address,1).then((function(a){var s=n(a,1)[0];if(!s)return t._addTimeout(),null;t.getTransactionsInHeight(s,310).then((function(r){var a,s=e._groupByHeight(r),u=o.keys(s).map(Number).sort((function(e,t){return t-e})),c=n(u,2),l=c[0],f=c[1];if(t._lastBlock.height){var h=o.indexBy(o.prop("id"),t._lastBlock.transactions),p=e._getTransactionsToDispatch(i(s[l],s[f]||[]),h,t._lastBlock.lastId);t._lastBlock.height!==l?t._lastBlock={height:l,lastId:s[f]&&s[f].length?s[f][0].id:"",transactions:s[l]}:(a=t._lastBlock.transactions).push.apply(a,i(p)),p.length&&t._emitter.trigger("change-state",p)}else t._lastBlock={height:l,lastId:s[f]&&s[f].length?s[f][0].id:"",transactions:s[l]},t._emitter.trigger("change-state",r);t._addTimeout()}),r)})).catch(r)},e.prototype.getTransactionsInHeight=function(t,r){var s=this,u=t.height,c=function(t){return t.length>=r?Promise.resolve(t):a.fetchTransactions(s._base,s.address,t.length+100).then((function(r){if(t.length===r.length)return t;var a=e._groupByHeight(r),s=o.keys(a).map(Number).sort((function(e,t){return t-e})),l=n(s,2),f=l[0],h=l[1];return f===u&&h?i(a[f],[a[h][0]]):c(r)}))};return c([t])},e.prototype._addTimeout=function(){var e=this;this._timer=setTimeout((function(){e._run()}),this._interval)},e._groupByHeight=function(e){return e.reduce((function(e,t){return e[t.height]?e[t.height].push(t):e[t.height]=[t],e}),Object.create(null))},e._getTransactionsToDispatch=function(e,t,r){for(var n=[],i=0;i<e.length;i++){var a=e[i];if(a.id===r)break;t[a.id]||n.push(a)}return n},e}();t.Watch=u,t.default=function(e,t,r){return a.fetchTransactions(e,t,1).then((function(i){var a=n(i,1)[0];return new u(e,t,a,r)}))}},function(e,t,r){"use strict";t.__esModule=!0,function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r(109))},function(e,t,r){"use strict";t.__esModule=!0;var n=function(){function e(){this._events=Object.create(null)}return e.prototype.hasListeners=function(e){return!(!this._events[e]||!this._events[e].length)},e.prototype.getActiveEvents=function(){var e=this;return Object.keys(this._events).filter((function(t){return e.hasListeners(t)}))},e.prototype.trigger=function(e,t){this._events[e]&&(this._events[e]=this._events[e].filter((function(e){try{e.handler.call(e.context,t)}catch(e){}return!e.once})),this._events[e].length||delete this._events[e])},e.prototype.on=function(e,t,r){this._on(e,t,r,!1)},e.prototype.once=function(e,t,r){this._on(e,t,r,!0)},e.prototype.off=function(e,t){var r=this,n="string"==typeof e?e:null,i="function"==typeof t?t:"function"==typeof e?e:null;n?i?n in this._events&&(this._events[n]=this._events[n].filter((function(e){return e.handler!==i}))):delete this._events[n]:Object.keys(this._events).forEach((function(e){r.off(e,i)}))},e.prototype._on=function(e,t,r,n){this._events[e]||(this._events[e]=[]),this._events[e].push({handler:t,context:r,once:n})},e}();t.EventEmitter=n}])}));
|
|
@@ -22,6 +22,11 @@ export declare function fetchCompileWithImports(base: string, body: ICompileWith
|
|
|
22
22
|
* Estimates compiled code in Base64 representation
|
|
23
23
|
*/
|
|
24
24
|
export declare function fetchEstimate(base: string, body: string): Promise<IEstimate>;
|
|
25
|
+
/**
|
|
26
|
+
* POST /utils/script/evaluate
|
|
27
|
+
* Evaluates the provided expression, taking into account the deployed dApp contract
|
|
28
|
+
*/
|
|
29
|
+
export declare function fetchEvaluate(base: string, address: string, expr: string): Promise<IEvaluate>;
|
|
25
30
|
/**
|
|
26
31
|
* POST /utils/transactionSerialize
|
|
27
32
|
* Serialize transaction
|
|
@@ -77,6 +82,12 @@ export interface ICompileCode {
|
|
|
77
82
|
export interface IEstimate extends ICompileCode {
|
|
78
83
|
scriptText: string;
|
|
79
84
|
}
|
|
85
|
+
export interface IEvaluate {
|
|
86
|
+
address: string;
|
|
87
|
+
expr: string;
|
|
88
|
+
result: object;
|
|
89
|
+
complexity: number;
|
|
90
|
+
}
|
|
80
91
|
interface ICompileWithImportsBody {
|
|
81
92
|
script: string;
|
|
82
93
|
imports: object;
|
|
@@ -61,6 +61,23 @@ export function fetchEstimate(base, body) {
|
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* POST /utils/script/evaluate
|
|
66
|
+
* Evaluates the provided expression, taking into account the deployed dApp contract
|
|
67
|
+
*/
|
|
68
|
+
export function fetchEvaluate(base, address, expr) {
|
|
69
|
+
return request({
|
|
70
|
+
base,
|
|
71
|
+
url: `/utils/script/evaluate/${address}`,
|
|
72
|
+
options: {
|
|
73
|
+
method: 'POST',
|
|
74
|
+
body: JSON.stringify({ expr }),
|
|
75
|
+
headers: {
|
|
76
|
+
'Content-Type': 'application/json'
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
64
81
|
/**
|
|
65
82
|
* POST /utils/transactionSerialize
|
|
66
83
|
* Serialize transaction
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/utils/index.ts"],"names":[],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/utils/index.ts"],"names":[],"mappings":"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"}
|