diff --git a/dist/index.js b/dist/index.js
index 96e32d0..7d0aa0c 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -24,7 +24,7 @@ Arguments: `+Array.prototype.slice.call(v).join("")+`
`),Eu=K(""),Pu=K(""),bA=Eu.length+Pu.length;function Mu(t,e){return t.length>=bA&&Lr(t.subarray(0,Eu.length),Eu)&&Lr(t.slice(-Pu.length),Pu)||e&&t.length>=Xp.length&&Lr(t.subarray(0,Xp.length),Xp)}function Xb(t){let e=K(t);return Mu(e,!1)?e.subarray(Eu.length,e.length-Pu.length):e}function Gb(t){let e=K(t);return Mu(e,!0)?e:Qt([Eu,e,Pu])}var w9=Ie(256),yA=Ie(255);function gA(t,e,r){let n=[],o=r&&tt.gt(e)),Yb=Hb((t,e)=>t.lt(e));var Lt=new be.default(0),oa=new be.default(1),sl=new be.default(2);var _9=new be.default(100);var S9=new be.default(1e6),Ou=new be.default(1e9),T9=Ou.mul(Ou),k9=new be.default(Number.MAX_SAFE_INTEGER),E9=new be.default(94906265);function un(t){return typeof t=="bigint"}function Dt(t){return t?be.default.isBN(t)?t:Ae(t)?Au(t.toString()):un(t)?new be.default(t.toString()):qp(t)?t.toBn():Fp(t)?new be.default(t.toBigInt().toString()):new be.default(t):new be.default(0)}function cl(t){let e=Dt(t);if(e.isNeg())throw new Error("square root of negative numbers is not supported");if(e.lte(k9))return new be.default(~~Math.sqrt(e.toNumber()));let r=E9.clone();for(;;){let n=e.div(r).iadd(r).ishrn(1);if(r.eq(n)||r.eq(n.sub(oa)))return r;r=n}}var wA={bitLength:-1,isLe:!0,isNegative:!1};function $t(t,{bitLength:e=-1,isLe:r=!0,isNegative:n=!1}=wA){let o=Dt(t),a=Math.ceil(e===-1?o.bitLength()/8:(e||0)/8);if(!t)return e===-1?new Uint8Array(1):new Uint8Array(a);let s=new Uint8Array(a),u=n?o.toTwos(a*8):o;return s.set(u.toArray(r?"le":"be",a),0),s}function Kb(t,{bitLength:e=-1,isLe:r=!1,isNegative:n=!1}={}){return Te($t(t,{bitLength:e,isLe:r,isNegative:n}))}var vA=sl.pow(new be.default(6)).isub(oa),_A=sl.pow(new be.default(14)).isub(oa),SA=sl.pow(new be.default(30)).isub(oa),TA={bitLength:16},kA={bitLength:32};function Ot(t){let e=Dt(t);if(e.lte(vA))return new Uint8Array([e.toNumber()<<2]);if(e.lte(_A))return $t(e.shln(2).iadd(oa),TA);if(e.lte(SA))return $t(e.shln(2).iadd(sl),kA);let r=$t(e),n=r.length;for(;r[n-1]===0;)n--;if(n<4)throw new Error("Invalid length, previous checks match anything less than 2^30");return Qt([new Uint8Array([(n-4<<2)+3]),r.subarray(0,n)])}function $r(t){return Qt([Ot(t.length),t])}function $s(t){let e=K(t);switch(e[0]&3){case 0:return[1,new be.default(e[0]>>>2)];case 1:return[2,new be.default(e[0]+(e[1]<<8)>>>2)];case 2:return[4,new be.default(e[0]+(e[1]<<8)+(e[2]<<16)+e[3]*16777216>>>2)];default:{let r=(e[0]>>>2)+5;switch(r){case 5:return[5,new be.default(e[1]+(e[2]<<8)+(e[3]<<16)+e[4]*16777216)];case 6:return[6,new be.default(e[1]+(e[2]<<8)+(e[3]<<16)+(e[4]+(e[5]<<8))*16777216)];case 7:return[7,new be.default(e[1]+(e[2]<<8)+(e[3]<<16)+(e[4]+(e[5]<<8)+(e[6]<<16))*16777216)];default:return[r,Fr(e.subarray(1,r))]}}}}function kn(t){switch(t[0]&3){case 0:return[1,t[0]>>>2];case 1:return[2,t[0]+(t[1]<<8)>>>2];case 2:return[4,t[0]+(t[1]<<8)+(t[2]<<16)+t[3]*16777216>>>2];default:switch((t[0]>>>2)+5){case 5:return[5,t[1]+(t[2]<<8)+(t[3]<<16)+t[4]*16777216];case 6:return[6,t[1]+(t[2]<<8)+(t[3]<<16)+(t[4]+(t[5]<<8))*16777216];case 7:return[7,t[1]+(t[2]<<8)+(t[3]<<16)+(t[4]+(t[5]<<8)+(t[6]<<16))*16777216];default:throw new Error("Compact input is > Number.MAX_SAFE_INTEGER")}}}function Ya(t){let[e,r]=$s(t),n=e+r.toNumber();return[n,t.subarray(e,n)]}function Jb(t=0,{bitLength:e=32,isLe:r=!0}={}){if(e!==32&&e!==64)throw new Error("Invalid bitLength provided, expected 32 or 64");let n=new Uint8Array(e/8),o=new DataView(n.buffer,n.byteOffset);return e===32?o.setFloat32(0,Number(t),r):o.setFloat64(0,Number(t),r),n}function Si(t){return typeof t=="boolean"}var P9=new RegExp("(\\d+?)(?=(\\d{3})+(?!\\d)|$)","g");function Zp(t,e=","){let r=t[0].startsWith("-"),n=r?t.substring(1).match(P9):t.match(P9);return n?`${r?"-":""}${n.join(e)}`:t}function Yp(t){return{decimal:.1.toLocaleString(t).substring(1,2),thousand:1e3.toLocaleString(t).substring(1,2)}}var Io=[{power:-24,text:"yocto",value:"y"},{power:-21,text:"zepto",value:"z"},{power:-18,text:"atto",value:"a"},{power:-15,text:"femto",value:"f"},{power:-12,text:"pico",value:"p"},{power:-9,text:"nano",value:"n"},{power:-6,text:"micro",value:"\xB5"},{power:-3,text:"milli",value:"m"},{power:0,text:"Unit",value:"-"},{power:3,text:"Kilo",value:"k"},{power:6,text:"Mill",value:"M"},{power:9,text:"Bill",value:"B"},{power:12,text:"Tril",value:"T"},{power:15,text:"Peta",value:"P"},{power:18,text:"Exa",value:"E"},{power:21,text:"Zeta",value:"Z"},{power:24,text:"Yotta",value:"Y"}];function Qb(t){for(let e=0,r=Io.length;e$b(t,e);Ti.findSi=Qb;Ti.getDefaults=()=>({decimals:Iu,unit:Kp});Ti.getOptions=(t=Iu)=>Io.filter(({power:e})=>e<0?t+e>=0:!0);Ti.setDefaults=({decimals:t,unit:e})=>{Iu=(Array.isArray(t)?t[0]:t)??Iu,Kp=(Array.isArray(e)?e[0]:e)??Kp,Io[8].text=Kp};function ul(t){return t.toString().padStart(2,"0")}function M9(t){let e=t.getFullYear().toString(),r=ul(t.getMonth()+1),n=ul(t.getDate()),o=ul(t.getHours()),a=ul(t.getMinutes()),s=ul(t.getSeconds());return`${e}-${r}-${n} ${o}:${a}:${s}`}function Vu(t,{locale:e="en"}={}){let{thousand:r}=Yp(e);return Zp(Dt(t).toString(),r)}function ty(t){return Qr(jt(t))}function qe(t){return typeof t=="string"||t instanceof String}function AA(t){for(let e=0,r=t.length;e126)return!1}return!0}function A9(t){for(let e=0,r=t.length;e126)return!1}return!0}function Jp(t){return qe(t)?Ae(t)?A9(K(t)):AA(t):t?A9(t):!1}var ry=x9("isPrototypeOf","hasOwnProperty");function ny(t,e){return ry(e)&&ry(t)?t===e||t.isPrototypeOf(e):!1}var OA=il("toHex","toHuman","toU8a"),IA=il("get");function fn(t){return OA(t)&&IA(t.registry)}var fl=il("toBigInt","toBn","toNumber","unwrap");function VA(t,e){return un(e)?e.toString():e}function Le(t,e){return JSON.stringify(t,VA,e)}function io(t){return t===null}function De(t){return typeof t=="number"}function Qe(t){return t===void 0}function oy(t){if(!t)return qe(t);let e=K(t),r=e.length,n=0;for(;n=194&&e[n]<=223){if(n+1191)return!1}else return!1;n+=2}else if(e[n]===224){if(n+2191||e[n+2]<128||e[n+2]>191)return!1}else return!1;n+=3}else if(e[n]>=225&&e[n]<=236){if(n+2191||e[n+2]<128||e[n+2]>191)return!1}else return!1;n+=3}else if(e[n]===237){if(n+2159||e[n+2]<128||e[n+2]>191)return!1}else return!1;n+=3}else if(e[n]>=238&&e[n]<=239){if(n+2191||e[n+2]<128||e[n+2]>191)return!1}else return!1;n+=3}else if(e[n]===240){if(n+3191||e[n+2]<128||e[n+2]>191||e[n+3]<128||e[n+3]>191)return!1}else return!1;n+=4}else if(e[n]>=241&&e[n]<=243){if(n+3191||e[n+2]<128||e[n+2]>191||e[n+3]<128||e[n+3]>191)return!1}else return!1;n+=4}else if(e[n]===244){if(n+3143||e[n+2]<128||e[n+2]>191||e[n+3]<128||e[n+3]>191)return!1}else return!1;n+=4}else return!1;return!0}function mr(t,e,r,n,o=0){let a=n?n(e,o):e.toString(),s;Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){if(s===void 0){s=r(e,o,this);try{Object.defineProperty(this,a,{value:s})}catch{}}return s}})}function Vo(t,e,r,n){for(let o=0,a=e.length;o{if(t<=0)return e;let r=`${e}`;return r.lengthll("debug",e,o,n):Fn,error:(...o)=>ll("error",e,o),log:(...o)=>ll("log",e,o),noop:Fn,warn:(...o)=>ll("warn",e,o)}}function DA(){return"none"}function ec(t,{getInstanceId:e=DA}={}){let r={},n=(...o)=>{let a=Le(o),s=e();return r[s]||(r[s]={}),r[s][a]===void 0&&(r[s][a]=t(...o)),r[s][a]};return n.unmemoize=(...o)=>{let a=Le(o),s=e();r[s]?.[a]!==void 0&&delete r[s][a]},n}function No(t,e){setTimeout(()=>{Promise.resolve().then(()=>{t()}).catch(r=>{e?e(r):console.error(r)})},0)}function ay(t){let e=Object.keys(t);for(let r=0,n=e.length;r{let r=e.replace(/[-_., ]+/g," ").trim().split(" "),n="";for(let o=0,a=r.length;o(e?tc[t.charCodeAt(0)]:sy[t.charCodeAt(0)])+t.slice(1)),rc=O9(t=>tc[t.charCodeAt(0)]+t.slice(1));function FA(t){return e=>e?t[e.charCodeAt(0)]+e.slice(1):""}var cy=FA(tc);function nc(t){return Te(yt(t))}var uy={name:"@polkadot/api",path:import.meta&&import.meta.url?new URL(import.meta.url).pathname.substring(0,new URL(import.meta.url).pathname.lastIndexOf("/")+1):"auto",type:"esm",version:"10.12.1"};var qA=Jr.crypto;function Qp(t){return qA.getRandomValues(t)}var $p={getRandomValues:Qp},WA={crypto:$p},eh=class{__internal__bridge;constructor(e){this.__internal__bridge=e}abort=()=>{throw new Error("abort")};__wbindgen_is_undefined=e=>this.__internal__bridge.getObject(e)===void 0;__wbindgen_throw=(e,r)=>{throw new Error(this.__internal__bridge.getString(e,r))};__wbg_self_1b7a39e3a92c949c=()=>this.__internal__bridge.addObject(WA);__wbg_require_604837428532a733=(e,r)=>{throw new Error(`Unable to require ${this.__internal__bridge.getString(e,r)}`)};__wbg_crypto_968f1772287e2df0=e=>this.__internal__bridge.addObject($p);__wbg_getRandomValues_a3d34b4fee3c2869=e=>this.__internal__bridge.addObject($p.getRandomValues);__wbg_getRandomValues_f5e14ab7ac8e995d=(e,r,n)=>{$p.getRandomValues(this.__internal__bridge.getU8a(r,n))};__wbg_randomFillSync_d5bd2d655fdf256a=(e,r,n)=>{throw new Error("randomFillsync is not available")};__wbindgen_object_drop_ref=e=>{this.__internal__bridge.takeObject(e)}};var th=class{__internal__createWasm;__internal__heap;__internal__wbg;__internal__cachegetInt32;__internal__cachegetUint8;__internal__heapNext;__internal__wasm;__internal__wasmError;__internal__wasmPromise;__internal__type;constructor(e){this.__internal__createWasm=e,this.__internal__cachegetInt32=null,this.__internal__cachegetUint8=null,this.__internal__heap=new Array(32).fill(void 0).concat(void 0,null,!0,!1),this.__internal__heapNext=this.__internal__heap.length,this.__internal__type="none",this.__internal__wasm=null,this.__internal__wasmError=null,this.__internal__wasmPromise=null,this.__internal__wbg={...new eh(this)}}get error(){return this.__internal__wasmError}get type(){return this.__internal__type}get wasm(){return this.__internal__wasm}async init(e){(!this.__internal__wasmPromise||e)&&(this.__internal__wasmPromise=(e||this.__internal__createWasm)(this.__internal__wbg));let{error:r,type:n,wasm:o}=await this.__internal__wasmPromise;return this.__internal__type=n,this.__internal__wasm=o,this.__internal__wasmError=r,this.__internal__wasm}getObject(e){return this.__internal__heap[e]}dropObject(e){e<36||(this.__internal__heap[e]=this.__internal__heapNext,this.__internal__heapNext=e)}takeObject(e){let r=this.getObject(e);return this.dropObject(e),r}addObject(e){this.__internal__heapNext===this.__internal__heap.length&&this.__internal__heap.push(this.__internal__heap.length+1);let r=this.__internal__heapNext;return this.__internal__heapNext=this.__internal__heap[r],this.__internal__heap[r]=e,r}getInt32(){return(this.__internal__cachegetInt32===null||this.__internal__cachegetInt32.buffer!==this.__internal__wasm.memory.buffer)&&(this.__internal__cachegetInt32=new Int32Array(this.__internal__wasm.memory.buffer)),this.__internal__cachegetInt32}getUint8(){return(this.__internal__cachegetUint8===null||this.__internal__cachegetUint8.buffer!==this.__internal__wasm.memory.buffer)&&(this.__internal__cachegetUint8=new Uint8Array(this.__internal__wasm.memory.buffer)),this.__internal__cachegetUint8}getU8a(e,r){return this.getUint8().subarray(e/1,e/1+r)}getString(e,r){return Qr(this.getU8a(e,r))}allocU8a(e){let r=this.__internal__wasm.__wbindgen_malloc(e.length*1);return this.getUint8().set(e,r/1),[r,e.length]}allocString(e){return this.allocU8a(yt(e))}resultU8a(){let e=this.getInt32()[2],r=this.getInt32()[8/4+1],n=this.getU8a(e,r).slice();return this.__internal__wasm.__wbindgen_free(e,r*1),n}resultString(){return Qr(this.resultU8a())}};function I9(t,e,r){return async n=>{let o={error:null,type:"none",wasm:null};try{if(e?.length){if(typeof WebAssembly!="object"||typeof WebAssembly.instantiate!="function")throw new Error("WebAssembly is not available in your environment")}else throw new Error("No WebAssembly provided for initialization");let a=await WebAssembly.instantiate(e,{wbg:n});o.wasm=a.instance.exports,o.type="wasm"}catch(a){typeof r=="function"?(o.wasm=r(n),o.type="asm"):(o.error=`FATAL: Unable to initialize @polkadot/wasm-${t}:: ${a.message}`,console.error(o.error))}return o}}var V9="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",N9=new Array(256);for(let t=0,e=V9.length;t=8&&(e[++o]=r>>>(n-=8)&255);return e}var ki=Uint8Array,Ka=Uint16Array,py=Uint32Array,jA=new ki([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),C9=new ki([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),B9=new ki([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),R9=(t,e)=>{let r=new Ka(31);for(let o=0;o<31;++o)r[o]=e+=1<>>1|(t&21845)<<1;e=(e&52428)>>>2|(e&13107)<<2,e=(e&61680)>>>4|(e&3855)<<4,hy[t]=((e&65280)>>>8|(e&255)<<8)>>>1}var dl=(t,e,r)=>{let n=t.length,o=0,a=new Ka(e);for(;o>l]=h}}else for(u=new Ka(n),o=0;o>15-t[o]);return u},pl=new ki(288);for(let t=0;t<144;++t)pl[t]=8;for(let t=144;t<256;++t)pl[t]=9;for(let t=256;t<280;++t)pl[t]=7;for(let t=280;t<288;++t)pl[t]=8;var H9=new ki(32);for(let t=0;t<32;++t)H9[t]=5;var ZA=dl(pl,9,1),YA=dl(H9,5,1),Jo=(t,e,r)=>{let n=e>>>3;return(t[n]|t[n+1]<<8)>>>(e&7)&r},ly=(t,e)=>{let r=e>>>3;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>>(e&7)},KA=t=>(t>>>3)+(t&7&&1),JA=(t,e,r)=>{(e==null||e<0)&&(e=0),(r==null||r>t.length)&&(r=t.length);let n=new(t instanceof Ka?Ka:t instanceof py?py:ki)(r-e);return n.set(t.subarray(e,r)),n},dy=t=>{let e=t[0];for(let r=1,n=t.length;re&&(e=t[r]);return e},QA=(t,e,r)=>{let n=!r||r.i;r||(r={});let o=t.length,a=!e||!n;e||(e=new ki(o*3));let s=L=>{let Z=e.length;if(L>Z){let G=new ki(Math.max(Z<<1,L));G.set(e),e=G}},u=r.f||0,l=r.p||0,h=r.b||0,y=r.l,_=r.d,V=r.m,R=r.n;if(u&&!y)return e;let B=o<<3;do{if(!y){r.f=u=Jo(t,l,1);let J=Jo(t,l+1,3);if(l+=3,J)if(J==1)y=ZA,_=YA,V=9,R=5;else if(J==2){let Y=Jo(t,l,31)+257,fe=Jo(t,l+10,15)+4,ie=Y+Jo(t,l+5,31)+1;l+=14;let re=new ki(ie),he=new ki(19);for(let C=0;CB)break;let Oe=dl(he,me,1);for(let C=0;C>>4;if(w<16)re[C++]=w;else{let S=0,E=0;for(w==16?(E=3+Jo(t,l,3),l+=2,S=re[C-1]):w==17?(E=3+Jo(t,l,7),l+=3):w==18&&(E=11+Jo(t,l,127),l+=7);E--;)re[C++]=S}}let ge=re.subarray(0,Y),Ze=re.subarray(Y);V=dy(ge),R=dy(Ze),y=dl(ge,V,1),_=dl(Ze,R,1)}else throw"invalid block type";else{let Y=KA(l)+4,fe=t[Y-4]|t[Y-3]<<8,ie=Y+fe;if(ie>o){if(n)throw"unexpected EOF";break}a&&s(h+fe),e.set(t.subarray(Y,ie),h),r.b=h+=fe,r.p=l=ie<<3;continue}if(l>B)throw"unexpected EOF"}a&&s(h+131072);let L=(1<>>4;if(l+=J&15,l>B)throw"unexpected EOF";if(!J)throw"invalid length/literal";if(Y<256)e[h++]=Y;else if(Y==256){y=void 0;break}else{let fe=Y-254;if(Y>264){let Re=Y-257,Oe=C9[Re];fe=Jo(t,l,(1<>>4;if(!ie)throw"invalid distance";l+=ie&15;let he=GA[re];if(re>3){let Re=B9[re];he+=ly(t,l)&(1<B)throw"unexpected EOF";a&&s(h+131072);let me=h+fe;for(;h{if((t[0]&15)!=8||t[0]>>>4>7||(t[0]<<8|t[1])%31)throw"invalid zlib data";if(t[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function my(t,e){return QA(($A(t),t.subarray(2,-4)),e)}var Cu=Qs(L9(),1);var D9=my(fy(Cu.bytes,new Uint8Array(Cu.lenIn)),new Uint8Array(Cu.lenOut));var z9=I9("crypto",D9,null);var ve=new th(z9);async function F9(t){return ve.init(t)}function er(t){return(...e)=>{if(!ve.wasm)throw new Error("The WASM interface has not been initialized. Ensure that you wait for the initialization Promise with waitReady() from @polkadot/wasm-crypto (or cryptoWaitReady() from @polkadot/util-crypto) before attempting to use WASM-only interfaces.");return t(ve.wasm,...e)}}var q9=er((t,e)=>(t.ext_bip39_to_entropy(8,...ve.allocString(e)),ve.resultU8a())),W9=er((t,e,r)=>(t.ext_bip39_to_mini_secret(8,...ve.allocString(e),...ve.allocString(r)),ve.resultU8a())),j9=er((t,e,r)=>(t.ext_bip39_to_seed(8,...ve.allocString(e),...ve.allocString(r)),ve.resultU8a())),X9=er((t,e)=>t.ext_bip39_validate(...ve.allocString(e))!==0),G9=er((t,e)=>(t.ext_ed_from_seed(8,...ve.allocU8a(e)),ve.resultU8a())),Z9=er((t,e,r,n)=>(t.ext_ed_sign(8,...ve.allocU8a(e),...ve.allocU8a(r),...ve.allocU8a(n)),ve.resultU8a())),Y9=er((t,e,r,n)=>t.ext_ed_verify(...ve.allocU8a(e),...ve.allocU8a(r),...ve.allocU8a(n))!==0),K9=er((t,e)=>(t.ext_secp_from_seed(8,...ve.allocU8a(e)),ve.resultU8a())),J9=er((t,e)=>(t.ext_secp_pub_compress(8,...ve.allocU8a(e)),ve.resultU8a())),Q9=er((t,e)=>(t.ext_secp_pub_expand(8,...ve.allocU8a(e)),ve.resultU8a())),$9=er((t,e,r,n)=>(t.ext_secp_recover(8,...ve.allocU8a(e),...ve.allocU8a(r),n),ve.resultU8a())),e8=er((t,e,r)=>(t.ext_secp_sign(8,...ve.allocU8a(e),...ve.allocU8a(r)),ve.resultU8a())),t8=er((t,e,r)=>(t.ext_sr_derive_keypair_hard(8,...ve.allocU8a(e),...ve.allocU8a(r)),ve.resultU8a())),r8=er((t,e,r)=>(t.ext_sr_derive_keypair_soft(8,...ve.allocU8a(e),...ve.allocU8a(r)),ve.resultU8a()));var n8=er((t,e)=>(t.ext_sr_from_seed(8,...ve.allocU8a(e)),ve.resultU8a())),o8=er((t,e,r,n)=>(t.ext_sr_sign(8,...ve.allocU8a(e),...ve.allocU8a(r),...ve.allocU8a(n)),ve.resultU8a())),i8=er((t,e,r,n)=>t.ext_sr_verify(...ve.allocU8a(e),...ve.allocU8a(r),...ve.allocU8a(n))!==0);var a8=er((t,e,r,n,o)=>(t.ext_vrf_sign(8,...ve.allocU8a(e),...ve.allocU8a(r),...ve.allocU8a(n),...ve.allocU8a(o)),ve.resultU8a())),s8=er((t,e,r,n,o,a)=>t.ext_vrf_verify(...ve.allocU8a(e),...ve.allocU8a(r),...ve.allocU8a(n),...ve.allocU8a(o),...ve.allocU8a(a))!==0),c8=er((t,e,r,n)=>(t.ext_blake2b(8,...ve.allocU8a(e),...ve.allocU8a(r),n),ve.resultU8a())),u8=er((t,e,r)=>(t.ext_hmac_sha256(8,...ve.allocU8a(e),...ve.allocU8a(r)),ve.resultU8a())),f8=er((t,e,r)=>(t.ext_hmac_sha512(8,...ve.allocU8a(e),...ve.allocU8a(r)),ve.resultU8a())),l8=er((t,e)=>(t.ext_keccak256(8,...ve.allocU8a(e)),ve.resultU8a())),d8=er((t,e)=>(t.ext_keccak512(8,...ve.allocU8a(e)),ve.resultU8a())),p8=er((t,e,r,n)=>(t.ext_pbkdf2(8,...ve.allocU8a(e),...ve.allocU8a(r),n),ve.resultU8a())),h8=er((t,e,r,n,o,a)=>(t.ext_scrypt(8,...ve.allocU8a(e),...ve.allocU8a(r),n,o,a),ve.resultU8a())),m8=er((t,e)=>(t.ext_sha256(8,...ve.allocU8a(e)),ve.resultU8a())),x8=er((t,e)=>(t.ext_sha512(8,...ve.allocU8a(e)),ve.resultU8a())),b8=er((t,e,r)=>(t.ext_twox(8,...ve.allocU8a(e),r),ve.resultU8a()));function lt(){return!!ve.wasm}async function y8(){try{return!!await F9()}catch{return!1}}function g8(){return y8().then(()=>{if(!lt())throw new Error("Unable to initialize @polkadot/util-crypto");return!0}).catch(()=>!1)}function Bu(t){if(!Number.isSafeInteger(t))throw new Error(`Wrong integer: ${t}`)}function _8(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function S8(...t){let e=a=>a,r=(a,s)=>u=>a(s(u)),n=t.map(a=>a.encode).reduceRight(r,e),o=t.map(a=>a.decode).reduce(r,e);return{encode:n,decode:o}}function T8(t){return{encode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return e.map(r=>{if(r<0||r>=t.length)throw new Error(`Digit index outside alphabet: ${r} (alphabet: ${t.length})`);return t[r]})},decode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="string")throw new Error("alphabet.decode input should be array of strings");return e.map(r=>{if(typeof r!="string")throw new Error(`alphabet.decode: not string element=${r}`);let n=t.indexOf(r);if(n===-1)throw new Error(`Unknown letter: "${r}". Allowed: ${t}`);return n})}}}function k8(t=""){if(typeof t!="string")throw new Error("join separator should be string");return{encode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="string")throw new Error("join.encode input should be array of strings");for(let r of e)if(typeof r!="string")throw new Error(`join.encode: non-string input=${r}`);return e.join(t)},decode:e=>{if(typeof e!="string")throw new Error("join.decode input should be string");return e.split(t)}}}function eO(t,e="="){if(typeof e!="string")throw new Error("padding chr should be string");return{encode(r){if(!Array.isArray(r)||r.length&&typeof r[0]!="string")throw new Error("padding.encode input should be array of strings");for(let n of r)if(typeof n!="string")throw new Error(`padding.encode: non-string input=${n}`);for(;r.length*t%8;)r.push(e);return r},decode(r){if(!Array.isArray(r)||r.length&&typeof r[0]!="string")throw new Error("padding.encode input should be array of strings");for(let o of r)if(typeof o!="string")throw new Error(`padding.decode: non-string input=${o}`);let n=r.length;if(n*t%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;n>0&&r[n-1]===e;n--)if(!((n-1)*t%8))throw new Error("Invalid padding: string has too much padding");return r.slice(0,n)}}}function w8(t,e,r){if(e<2)throw new Error(`convertRadix: wrong from=${e}, base cannot be less than 2`);if(r<2)throw new Error(`convertRadix: wrong to=${r}, base cannot be less than 2`);if(!Array.isArray(t))throw new Error("convertRadix: data should be array");if(!t.length)return[];let n=0,o=[],a=Array.from(t);for(a.forEach(s=>{if(s<0||s>=e)throw new Error(`Wrong integer: ${s}`)});;){let s=0,u=!0;for(let l=n;le?E8(e,t%e):t,nh=(t,e)=>t+(e-E8(t,e));function v8(t,e,r,n){if(!Array.isArray(t))throw new Error("convertRadix2: data should be array");if(e<=0||e>32)throw new Error(`convertRadix2: wrong from=${e}`);if(r<=0||r>32)throw new Error(`convertRadix2: wrong to=${r}`);if(nh(e,r)>32)throw new Error(`convertRadix2: carry overflow from=${e} to=${r} carryBits=${nh(e,r)}`);let o=0,a=0,s=2**r-1,u=[];for(let l of t){if(l>=2**e)throw new Error(`convertRadix2: invalid data word=${l} from=${e}`);if(o=o<32)throw new Error(`convertRadix2: carry overflow pos=${a} from=${e}`);for(a+=e;a>=r;a-=r)u.push((o>>a-r&s)>>>0);o&=2**a-1}if(o=o<=e)throw new Error("Excess padding");if(!n&&o)throw new Error(`Non-zero padding: ${o}`);return n&&a>0&&u.push(o>>>0),u}function tO(t){return{encode:e=>{if(!_8(e))throw new Error("radix.encode input should be Uint8Array");return w8(Array.from(e),2**8,t)},decode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="number")throw new Error("radix.decode input should be array of numbers");return Uint8Array.from(w8(e,t,2**8))}}}function rO(t,e=!1){if(t<=0||t>32)throw new Error("radix2: bits should be in (0..32]");if(nh(8,t)>32||nh(t,8)>32)throw new Error("radix2: carry overflow");return{encode:r=>{if(!_8(r))throw new Error("radix2.encode input should be Uint8Array");return v8(Array.from(r),8,t,!e)},decode:r=>{if(!Array.isArray(r)||r.length&&typeof r[0]!="number")throw new Error("radix2.decode input should be array of numbers");return Uint8Array.from(v8(r,t,8,e))}}}var P8=S8(rO(6),T8("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),eO(6),k8(""));var nO=t=>S8(tO(58),T8(t),k8("")),M8=nO("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");function oh({coder:t,ipfs:e},r){return(n,o)=>(r(n,o),t.decode(e&&o?n.substring(1):n))}function ih({coder:t,ipfs:e}){return(r,n)=>{let o=t.encode(K(r));return e&&n?`${e}${o}`:o}}function ah({chars:t,ipfs:e,type:r,withPadding:n}){return(o,a)=>{if(typeof o!="string")throw new Error(`Expected ${r} string input`);if(e&&a&&!o.startsWith(e))throw new Error(`Expected ipfs-compatible ${r} to start with '${e}'`);for(let s=a?1:0,u=o.length;s0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function sh(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");qr(t.outputLen),qr(t.blockLen)}function Co(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function Ru(t,e){hl(t);let r=e.outputLen;if(t.lengthnew Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4));function O8(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}var Uu=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),Qo=(t,e)=>t<<32-e|t>>>e,aO=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!aO)throw new Error("Non little-endian hardware is not supported");function gy(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function en(t){if(typeof t=="string"&&(t=gy(t)),!O8(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}function uh(...t){let e=0;for(let n=0;nt().update(en(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function I8(t){let e=(n,o)=>t(o).update(en(n)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}function V8(t){let e=(n,o)=>t(o).update(en(n)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}function lh(t=32){if(ch&&typeof ch.getRandomValues=="function")return ch.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}var N8=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3]),dh=class extends Ei{constructor(e,r,n={},o,a,s){if(super(),this.blockLen=e,this.outputLen=r,this.length=0,this.pos=0,this.finished=!1,this.destroyed=!1,qr(e),qr(r),qr(o),r<0||r>o)throw new Error("outputLen bigger than keyLen");if(n.key!==void 0&&(n.key.length<1||n.key.length>o))throw new Error(`key must be up 1..${o} byte long or undefined`);if(n.salt!==void 0&&n.salt.length!==a)throw new Error(`salt must be ${a} byte long or undefined`);if(n.personalization!==void 0&&n.personalization.length!==s)throw new Error(`personalization must be ${s} byte long or undefined`);this.buffer32=Bo(this.buffer=new Uint8Array(e))}update(e){Co(this);let{blockLen:r,buffer:n,buffer32:o}=this;e=en(e);let a=e.length,s=e.byteOffset,u=e.buffer;for(let l=0;lo[s]=a)}digest(){let{buffer:e,outputLen:r}=this;this.digestInto(e);let n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){let{buffer:r,length:n,finished:o,destroyed:a,outputLen:s,pos:u}=this;return e||(e=new this.constructor({dkLen:s})),e.set(...this.get()),e.length=n,e.finished=o,e.destroyed=a,e.outputLen=s,e.buffer.set(r),e.pos=u,e}};var ph=BigInt(4294967295),wy=BigInt(32);function C8(t,e=!1){return e?{h:Number(t&ph),l:Number(t>>wy&ph)}:{h:Number(t>>wy&ph)|0,l:Number(t&ph)|0}}function vy(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let o=0;oBigInt(t>>>0)<>>0),uO=(t,e,r)=>t>>>r,fO=(t,e,r)=>t<<32-r|e>>>r,lO=(t,e,r)=>t>>>r|e<<32-r,dO=(t,e,r)=>t<<32-r|e>>>r,pO=(t,e,r)=>t<<64-r|e>>>r-32,hO=(t,e,r)=>t>>>r-32|e<<64-r,mO=(t,e)=>e,xO=(t,e)=>t,_y=(t,e,r)=>t<>>32-r,Sy=(t,e,r)=>e<>>32-r,Ty=(t,e,r)=>e<>>64-r,ky=(t,e,r)=>t<>>64-r;function bO(t,e,r,n){let o=(e>>>0)+(n>>>0);return{h:t+r+(o/2**32|0)|0,l:o|0}}var yO=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),gO=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,wO=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),vO=(t,e,r,n,o)=>e+r+n+o+(t/2**32|0)|0,_O=(t,e,r,n,o)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(o>>>0),SO=(t,e,r,n,o,a)=>e+r+n+o+a+(t/2**32|0)|0;var TO={fromBig:C8,split:vy,toBig:cO,shrSH:uO,shrSL:fO,rotrSH:lO,rotrSL:dO,rotrBH:pO,rotrBL:hO,rotr32H:mO,rotr32L:xO,rotlSH:_y,rotlSL:Sy,rotlBH:Ty,rotlBL:ky,add:bO,add3L:yO,add3H:gO,add4L:wO,add4H:vO,add5H:SO,add5L:_O},Be=TO;var Gr=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),ke=new Uint32Array(32);function Ja(t,e,r,n,o,a){let s=o[a],u=o[a+1],l=ke[2*t],h=ke[2*t+1],y=ke[2*e],_=ke[2*e+1],V=ke[2*r],R=ke[2*r+1],B=ke[2*n],L=ke[2*n+1],Z=Be.add3L(l,y,s);h=Be.add3H(Z,h,_,u),l=Z|0,{Dh:L,Dl:B}={Dh:L^h,Dl:B^l},{Dh:L,Dl:B}={Dh:Be.rotr32H(L,B),Dl:Be.rotr32L(L,B)},{h:R,l:V}=Be.add(R,V,L,B),{Bh:_,Bl:y}={Bh:_^R,Bl:y^V},{Bh:_,Bl:y}={Bh:Be.rotrSH(_,y,24),Bl:Be.rotrSL(_,y,24)},ke[2*t]=l,ke[2*t+1]=h,ke[2*e]=y,ke[2*e+1]=_,ke[2*r]=V,ke[2*r+1]=R,ke[2*n]=B,ke[2*n+1]=L}function Qa(t,e,r,n,o,a){let s=o[a],u=o[a+1],l=ke[2*t],h=ke[2*t+1],y=ke[2*e],_=ke[2*e+1],V=ke[2*r],R=ke[2*r+1],B=ke[2*n],L=ke[2*n+1],Z=Be.add3L(l,y,s);h=Be.add3H(Z,h,_,u),l=Z|0,{Dh:L,Dl:B}={Dh:L^h,Dl:B^l},{Dh:L,Dl:B}={Dh:Be.rotrSH(L,B,16),Dl:Be.rotrSL(L,B,16)},{h:R,l:V}=Be.add(R,V,L,B),{Bh:_,Bl:y}={Bh:_^R,Bl:y^V},{Bh:_,Bl:y}={Bh:Be.rotrBH(_,y,63),Bl:Be.rotrBL(_,y,63)},ke[2*t]=l,ke[2*t+1]=h,ke[2*e]=y,ke[2*e+1]=_,ke[2*r]=V,ke[2*r+1]=R,ke[2*n]=B,ke[2*n+1]=L}var Ey=class extends dh{constructor(e={}){super(128,e.dkLen===void 0?64:e.dkLen,e,64,16,16),this.v0l=Gr[0]|0,this.v0h=Gr[1]|0,this.v1l=Gr[2]|0,this.v1h=Gr[3]|0,this.v2l=Gr[4]|0,this.v2h=Gr[5]|0,this.v3l=Gr[6]|0,this.v3h=Gr[7]|0,this.v4l=Gr[8]|0,this.v4h=Gr[9]|0,this.v5l=Gr[10]|0,this.v5h=Gr[11]|0,this.v6l=Gr[12]|0,this.v6h=Gr[13]|0,this.v7l=Gr[14]|0,this.v7h=Gr[15]|0;let r=e.key?e.key.length:0;if(this.v0l^=this.outputLen|r<<8|65536|1<<24,e.salt){let n=Bo(en(e.salt));this.v4l^=n[0],this.v4h^=n[1],this.v5l^=n[2],this.v5h^=n[3]}if(e.personalization){let n=Bo(en(e.personalization));this.v6l^=n[0],this.v6h^=n[1],this.v7l^=n[2],this.v7h^=n[3]}if(e.key){let n=new Uint8Array(this.blockLen);n.set(en(e.key)),this.update(n)}}get(){let{v0l:e,v0h:r,v1l:n,v1h:o,v2l:a,v2h:s,v3l:u,v3h:l,v4l:h,v4h:y,v5l:_,v5h:V,v6l:R,v6h:B,v7l:L,v7h:Z}=this;return[e,r,n,o,a,s,u,l,h,y,_,V,R,B,L,Z]}set(e,r,n,o,a,s,u,l,h,y,_,V,R,B,L,Z){this.v0l=e|0,this.v0h=r|0,this.v1l=n|0,this.v1h=o|0,this.v2l=a|0,this.v2h=s|0,this.v3l=u|0,this.v3h=l|0,this.v4l=h|0,this.v4h=y|0,this.v5l=_|0,this.v5h=V|0,this.v6l=R|0,this.v6h=B|0,this.v7l=L|0,this.v7h=Z|0}compress(e,r,n){this.get().forEach((l,h)=>ke[h]=l),ke.set(Gr,16);let{h:o,l:a}=Be.fromBig(BigInt(this.length));ke[24]=Gr[8]^a,ke[25]=Gr[9]^o,n&&(ke[28]=~ke[28],ke[29]=~ke[29]);let s=0,u=N8;for(let l=0;l<12;l++)Ja(0,4,8,12,e,r+2*u[s++]),Qa(0,4,8,12,e,r+2*u[s++]),Ja(1,5,9,13,e,r+2*u[s++]),Qa(1,5,9,13,e,r+2*u[s++]),Ja(2,6,10,14,e,r+2*u[s++]),Qa(2,6,10,14,e,r+2*u[s++]),Ja(3,7,11,15,e,r+2*u[s++]),Qa(3,7,11,15,e,r+2*u[s++]),Ja(0,5,10,15,e,r+2*u[s++]),Qa(0,5,10,15,e,r+2*u[s++]),Ja(1,6,11,12,e,r+2*u[s++]),Qa(1,6,11,12,e,r+2*u[s++]),Ja(2,7,8,13,e,r+2*u[s++]),Qa(2,7,8,13,e,r+2*u[s++]),Ja(3,4,9,14,e,r+2*u[s++]),Qa(3,4,9,14,e,r+2*u[s++]);this.v0l^=ke[0]^ke[16],this.v0h^=ke[1]^ke[17],this.v1l^=ke[2]^ke[18],this.v1h^=ke[3]^ke[19],this.v2l^=ke[4]^ke[20],this.v2h^=ke[5]^ke[21],this.v3l^=ke[6]^ke[22],this.v3h^=ke[7]^ke[23],this.v4l^=ke[8]^ke[24],this.v4h^=ke[9]^ke[25],this.v5l^=ke[10]^ke[26],this.v5h^=ke[11]^ke[27],this.v6l^=ke[12]^ke[28],this.v6h^=ke[13]^ke[29],this.v7l^=ke[14]^ke[30],this.v7h^=ke[15]^ke[31],ke.fill(0)}destroy(){this.destroyed=!0,this.buffer32.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},Py=I8(t=>new Ey(t));function My(t){return(...e)=>Te(t(...e))}function Ay(t,e){return(r,n)=>e(r,t,n)}function hh(t,e){return(r,n=256,o)=>{let a=K(r);return!ht||!o&<()?t[n](a):e[n](a)}}function kr(t,e=256,r,n){let o=Math.ceil(e/8),a=K(t);return!ht||!n&<()?c8(a,K(r),o):r?Py(a,{dkLen:o,key:r}):Py(a,{dkLen:o})}var ml=My(kr);var kO=yt("SS58PRE");function mh(t){return kr(Ke(kO,t),512)}function B8(t){let e=t[0]&64?2:1,r=e===1?t[0]:(t[0]&63)<<2|t[1]>>6|(t[1]&63)<<8,n=[34+e,35+e].includes(t.length),o=t.length-(n?2:1),a=mh(t.subarray(0,o));return[(t[0]&128)===0&&![46,47].includes(t[0])&&(n?t[t.length-2]===a[0]&&t[t.length-1]===a[1]:t[t.length-1]===a[0]),o,e,r]}var R8=[{prefix:0,network:"polkadot",displayName:"Polkadot Relay Chain",symbols:["DOT"],decimals:[10],standardAccount:"*25519",website:"https://polkadot.network"},{prefix:1,network:"BareSr25519",displayName:"Bare 32-bit Schnorr/Ristretto (S/R 25519) public key.",symbols:[],decimals:[],standardAccount:"Sr25519",website:null},{prefix:2,network:"kusama",displayName:"Kusama Relay Chain",symbols:["KSM"],decimals:[12],standardAccount:"*25519",website:"https://kusama.network"},{prefix:3,network:"BareEd25519",displayName:"Bare 32-bit Ed25519 public key.",symbols:[],decimals:[],standardAccount:"Ed25519",website:null},{prefix:4,network:"katalchain",displayName:"Katal Chain",symbols:[],decimals:[],standardAccount:"*25519",website:null},{prefix:5,network:"astar",displayName:"Astar Network",symbols:["ASTR"],decimals:[18],standardAccount:"*25519",website:"https://astar.network"},{prefix:6,network:"bifrost",displayName:"Bifrost",symbols:["BNC"],decimals:[12],standardAccount:"*25519",website:"https://bifrost.finance/"},{prefix:7,network:"edgeware",displayName:"Edgeware",symbols:["EDG"],decimals:[18],standardAccount:"*25519",website:"https://edgewa.re"},{prefix:8,network:"karura",displayName:"Karura",symbols:["KAR"],decimals:[12],standardAccount:"*25519",website:"https://karura.network/"},{prefix:9,network:"reynolds",displayName:"Laminar Reynolds Canary",symbols:["REY"],decimals:[18],standardAccount:"*25519",website:"http://laminar.network/"},{prefix:10,network:"acala",displayName:"Acala",symbols:["ACA"],decimals:[12],standardAccount:"*25519",website:"https://acala.network/"},{prefix:11,network:"laminar",displayName:"Laminar",symbols:["LAMI"],decimals:[18],standardAccount:"*25519",website:"http://laminar.network/"},{prefix:12,network:"polymesh",displayName:"Polymesh",symbols:["POLYX"],decimals:[6],standardAccount:"*25519",website:"https://polymath.network/"},{prefix:13,network:"integritee",displayName:"Integritee",symbols:["TEER"],decimals:[12],standardAccount:"*25519",website:"https://integritee.network"},{prefix:14,network:"totem",displayName:"Totem",symbols:["TOTEM"],decimals:[0],standardAccount:"*25519",website:"https://totemaccounting.com"},{prefix:15,network:"synesthesia",displayName:"Synesthesia",symbols:["SYN"],decimals:[12],standardAccount:"*25519",website:"https://synesthesia.network/"},{prefix:16,network:"kulupu",displayName:"Kulupu",symbols:["KLP"],decimals:[12],standardAccount:"*25519",website:"https://kulupu.network/"},{prefix:17,network:"dark",displayName:"Dark Mainnet",symbols:[],decimals:[],standardAccount:"*25519",website:null},{prefix:18,network:"darwinia",displayName:"Darwinia Network",symbols:["RING"],decimals:[18],standardAccount:"secp256k1",website:"https://darwinia.network"},{prefix:19,network:"watr",displayName:"Watr Protocol",symbols:["WATR"],decimals:[18],standardAccount:"*25519",website:"https://www.watr.org"},{prefix:20,network:"stafi",displayName:"Stafi",symbols:["FIS"],decimals:[12],standardAccount:"*25519",website:"https://stafi.io"},{prefix:21,network:"karmachain",displayName:"Karmacoin",symbols:["KCOIN"],decimals:[6],standardAccount:"*25519",website:"https://karmaco.in"},{prefix:22,network:"dock-pos-mainnet",displayName:"Dock Mainnet",symbols:["DCK"],decimals:[6],standardAccount:"*25519",website:"https://dock.io"},{prefix:23,network:"shift",displayName:"ShiftNrg",symbols:[],decimals:[],standardAccount:"*25519",website:null},{prefix:24,network:"zero",displayName:"ZERO",symbols:["ZERO"],decimals:[18],standardAccount:"*25519",website:"https://zero.io"},{prefix:25,network:"zero-alphaville",displayName:"ZERO Alphaville",symbols:["ZERO"],decimals:[18],standardAccount:"*25519",website:"https://zero.io"},{prefix:26,network:"jupiter",displayName:"Jupiter",symbols:["jDOT"],decimals:[10],standardAccount:"*25519",website:"https://jupiter.patract.io"},{prefix:27,network:"kabocha",displayName:"Kabocha",symbols:["KAB"],decimals:[12],standardAccount:"*25519",website:"https://kabocha.network"},{prefix:28,network:"subsocial",displayName:"Subsocial",symbols:[],decimals:[],standardAccount:"*25519",website:null},{prefix:29,network:"cord",displayName:"CORD Network",symbols:["DHI","WAY"],decimals:[12,12],standardAccount:"*25519",website:"https://cord.network/"},{prefix:30,network:"phala",displayName:"Phala Network",symbols:["PHA"],decimals:[12],standardAccount:"*25519",website:"https://phala.network"},{prefix:31,network:"litentry",displayName:"Litentry Network",symbols:["LIT"],decimals:[12],standardAccount:"*25519",website:"https://litentry.com/"},{prefix:32,network:"robonomics",displayName:"Robonomics",symbols:["XRT"],decimals:[9],standardAccount:"*25519",website:"https://robonomics.network"},{prefix:33,network:"datahighway",displayName:"DataHighway",symbols:[],decimals:[],standardAccount:"*25519",website:null},{prefix:34,network:"ares",displayName:"Ares Protocol",symbols:["ARES"],decimals:[12],standardAccount:"*25519",website:"https://www.aresprotocol.com/"},{prefix:35,network:"vln",displayName:"Valiu Liquidity Network",symbols:["USDv"],decimals:[15],standardAccount:"*25519",website:"https://valiu.com/"},{prefix:36,network:"centrifuge",displayName:"Centrifuge Chain",symbols:["CFG"],decimals:[18],standardAccount:"*25519",website:"https://centrifuge.io/"},{prefix:37,network:"nodle",displayName:"Nodle Chain",symbols:["NODL"],decimals:[11],standardAccount:"*25519",website:"https://nodle.io/"},{prefix:38,network:"kilt",displayName:"KILT Spiritnet",symbols:["KILT"],decimals:[15],standardAccount:"*25519",website:"https://kilt.io/"},{prefix:39,network:"mathchain",displayName:"MathChain mainnet",symbols:["MATH"],decimals:[18],standardAccount:"*25519",website:"https://mathwallet.org"},{prefix:40,network:"mathchain-testnet",displayName:"MathChain testnet",symbols:["MATH"],decimals:[18],standardAccount:"*25519",website:"https://mathwallet.org"},{prefix:41,network:"polimec",displayName:"Polimec Protocol",symbols:["PLMC"],decimals:[10],standardAccount:"*25519",website:"https://www.polimec.org/"},{prefix:42,network:"substrate",displayName:"Substrate",symbols:[],decimals:[],standardAccount:"*25519",website:"https://substrate.io/"},{prefix:43,network:"BareSecp256k1",displayName:"Bare 32-bit ECDSA SECP-256k1 public key.",symbols:[],decimals:[],standardAccount:"secp256k1",website:null},{prefix:44,network:"chainx",displayName:"ChainX",symbols:["PCX"],decimals:[8],standardAccount:"*25519",website:"https://chainx.org/"},{prefix:45,network:"uniarts",displayName:"UniArts Network",symbols:["UART","UINK"],decimals:[12,12],standardAccount:"*25519",website:"https://uniarts.me"},{prefix:46,network:"reserved46",displayName:"This prefix is reserved.",symbols:[],decimals:[],standardAccount:null,website:null},{prefix:47,network:"reserved47",displayName:"This prefix is reserved.",symbols:[],decimals:[],standardAccount:null,website:null},{prefix:48,network:"neatcoin",displayName:"Neatcoin Mainnet",symbols:["NEAT"],decimals:[12],standardAccount:"*25519",website:"https://neatcoin.org"},{prefix:49,network:"picasso",displayName:"Picasso",symbols:["PICA"],decimals:[12],standardAccount:"*25519",website:"https://picasso.composable.finance"},{prefix:50,network:"composable",displayName:"Composable Finance",symbols:["LAYR"],decimals:[12],standardAccount:"*25519",website:"https://composable.finance"},{prefix:51,network:"oak",displayName:"OAK Network",symbols:["OAK","TUR"],decimals:[10,10],standardAccount:"*25519",website:"https://oak.tech"},{prefix:52,network:"KICO",displayName:"KICO",symbols:["KICO"],decimals:[14],standardAccount:"*25519",website:"https://dico.io"},{prefix:53,network:"DICO",displayName:"DICO",symbols:["DICO"],decimals:[14],standardAccount:"*25519",website:"https://dico.io"},{prefix:54,network:"cere",displayName:"Cere Network",symbols:["CERE"],decimals:[10],standardAccount:"*25519",website:"https://cere.network"},{prefix:55,network:"xxnetwork",displayName:"xx network",symbols:["XX"],decimals:[9],standardAccount:"*25519",website:"https://xx.network"},{prefix:56,network:"pendulum",displayName:"Pendulum chain",symbols:["PEN"],decimals:[12],standardAccount:"*25519",website:"https://pendulumchain.org/"},{prefix:57,network:"amplitude",displayName:"Amplitude chain",symbols:["AMPE"],decimals:[12],standardAccount:"*25519",website:"https://pendulumchain.org/"},{prefix:58,network:"eternal-civilization",displayName:"Eternal Civilization",symbols:["ECC"],decimals:[12],standardAccount:"*25519",website:"http://www.ysknfr.cn/"},{prefix:63,network:"hydradx",displayName:"HydraDX",symbols:["HDX"],decimals:[12],standardAccount:"*25519",website:"https://hydradx.io"},{prefix:65,network:"aventus",displayName:"Aventus Mainnet",symbols:["AVT"],decimals:[18],standardAccount:"*25519",website:"https://aventus.io"},{prefix:66,network:"crust",displayName:"Crust Network",symbols:["CRU"],decimals:[12],standardAccount:"*25519",website:"https://crust.network"},{prefix:67,network:"genshiro",displayName:"Genshiro Network",symbols:["GENS","EQD","LPT0"],decimals:[9,9,9],standardAccount:"*25519",website:"https://genshiro.equilibrium.io"},{prefix:68,network:"equilibrium",displayName:"Equilibrium Network",symbols:["EQ"],decimals:[9],standardAccount:"*25519",website:"https://equilibrium.io"},{prefix:69,network:"sora",displayName:"SORA Network",symbols:["XOR"],decimals:[18],standardAccount:"*25519",website:"https://sora.org"},{prefix:71,network:"p3d",displayName:"3DP network",symbols:["P3D"],decimals:[12],standardAccount:"*25519",website:"https://3dpass.org"},{prefix:72,network:"p3dt",displayName:"3DP test network",symbols:["P3Dt"],decimals:[12],standardAccount:"*25519",website:"https://3dpass.org"},{prefix:73,network:"zeitgeist",displayName:"Zeitgeist",symbols:["ZTG"],decimals:[10],standardAccount:"*25519",website:"https://zeitgeist.pm"},{prefix:77,network:"manta",displayName:"Manta network",symbols:["MANTA"],decimals:[18],standardAccount:"*25519",website:"https://manta.network"},{prefix:78,network:"calamari",displayName:"Calamari: Manta Canary Network",symbols:["KMA"],decimals:[12],standardAccount:"*25519",website:"https://manta.network"},{prefix:81,network:"sora_dot_para",displayName:"SORA Polkadot Parachain",symbols:["XOR"],decimals:[18],standardAccount:"*25519",website:"https://sora.org"},{prefix:88,network:"polkadex",displayName:"Polkadex Mainnet",symbols:["PDEX"],decimals:[12],standardAccount:"*25519",website:"https://polkadex.trade"},{prefix:89,network:"polkadexparachain",displayName:"Polkadex Parachain",symbols:["PDEX"],decimals:[12],standardAccount:"*25519",website:"https://polkadex.trade"},{prefix:90,network:"frequency",displayName:"Frequency",symbols:["FRQCY"],decimals:[8],standardAccount:"*25519",website:"https://www.frequency.xyz"},{prefix:92,network:"anmol",displayName:"Anmol Network",symbols:["ANML"],decimals:[18],standardAccount:"*25519",website:"https://anmol.network/"},{prefix:93,network:"fragnova",displayName:"Fragnova Network",symbols:["NOVA"],decimals:[12],standardAccount:"*25519",website:"https://fragnova.com"},{prefix:98,network:"polkasmith",displayName:"PolkaSmith Canary Network",symbols:["PKS"],decimals:[18],standardAccount:"*25519",website:"https://polkafoundry.com"},{prefix:99,network:"polkafoundry",displayName:"PolkaFoundry Network",symbols:["PKF"],decimals:[18],standardAccount:"*25519",website:"https://polkafoundry.com"},{prefix:100,network:"ibtida",displayName:"Anmol Network Ibtida Canary network",symbols:["IANML"],decimals:[18],standardAccount:"*25519",website:"https://anmol.network/"},{prefix:101,network:"origintrail-parachain",displayName:"OriginTrail Parachain",symbols:["OTP"],decimals:[12],standardAccount:"*25519",website:"https://parachain.origintrail.io/"},{prefix:105,network:"pontem-network",displayName:"Pontem Network",symbols:["PONT"],decimals:[10],standardAccount:"*25519",website:"https://pontem.network"},{prefix:110,network:"heiko",displayName:"Heiko",symbols:["HKO"],decimals:[12],standardAccount:"*25519",website:"https://parallel.fi/"},{prefix:113,network:"integritee-incognito",displayName:"Integritee Incognito",symbols:[],decimals:[],standardAccount:"*25519",website:"https://integritee.network"},{prefix:117,network:"tinker",displayName:"Tinker",symbols:["TNKR"],decimals:[12],standardAccount:"*25519",website:"https://invarch.network"},{prefix:126,network:"joystream",displayName:"Joystream",symbols:["JOY"],decimals:[10],standardAccount:"*25519",website:"https://www.joystream.org"},{prefix:128,network:"clover",displayName:"Clover Finance",symbols:["CLV"],decimals:[18],standardAccount:"*25519",website:"https://clover.finance"},{prefix:129,network:"dorafactory-polkadot",displayName:"Dorafactory Polkadot Network",symbols:["DORA"],decimals:[12],standardAccount:"*25519",website:"https://dorafactory.org"},{prefix:131,network:"litmus",displayName:"Litmus Network",symbols:["LIT"],decimals:[12],standardAccount:"*25519",website:"https://litentry.com/"},{prefix:136,network:"altair",displayName:"Altair",symbols:["AIR"],decimals:[18],standardAccount:"*25519",website:"https://centrifuge.io/"},{prefix:137,network:"vara",displayName:"Vara Network",symbols:["VARA"],decimals:[12],standardAccount:"*25519",website:"https://vara.network/"},{prefix:172,network:"parallel",displayName:"Parallel",symbols:["PARA"],decimals:[12],standardAccount:"*25519",website:"https://parallel.fi/"},{prefix:252,network:"social-network",displayName:"Social Network",symbols:["NET"],decimals:[18],standardAccount:"*25519",website:"https://social.network"},{prefix:255,network:"quartz_mainnet",displayName:"QUARTZ by UNIQUE",symbols:["QTZ"],decimals:[18],standardAccount:"*25519",website:"https://unique.network"},{prefix:268,network:"pioneer_network",displayName:"Pioneer Network by Bit.Country",symbols:["NEER"],decimals:[18],standardAccount:"*25519",website:"https://bit.country"},{prefix:420,network:"sora_kusama_para",displayName:"SORA Kusama Parachain",symbols:["XOR"],decimals:[18],standardAccount:"*25519",website:"https://sora.org"},{prefix:440,network:"allfeat_network",displayName:"Allfeat Network",symbols:["AFT"],decimals:[12],standardAccount:"*25519",website:"https://allfeat.network"},{prefix:666,network:"metaquity_network",displayName:"Metaquity Network",symbols:["MQTY"],decimals:[18],standardAccount:"*25519",website:"https://metaquity.xyz/"},{prefix:777,network:"curio",displayName:"Curio",symbols:["CGT"],decimals:[18],standardAccount:"*25519",website:"https://parachain.capitaldex.exchange/"},{prefix:789,network:"geek",displayName:"GEEK Network",symbols:["GEEK"],decimals:[18],standardAccount:"*25519",website:"https://geek.gl"},{prefix:995,network:"ternoa",displayName:"Ternoa",symbols:["CAPS"],decimals:[18],standardAccount:"*25519",website:"https://www.ternoa.network"},{prefix:1110,network:"efinity",displayName:"Efinity",symbols:["EFI"],decimals:[18],standardAccount:"*25519",website:"https://efinity.io/"},{prefix:1221,network:"peaq",displayName:"Peaq Network",symbols:["PEAQ"],decimals:[18],standardAccount:"Sr25519",website:"https://www.peaq.network/"},{prefix:1222,network:"krest",displayName:"Krest Network",symbols:["KREST"],decimals:[18],standardAccount:"Sr25519",website:"https://www.peaq.network/"},{prefix:1284,network:"moonbeam",displayName:"Moonbeam",symbols:["GLMR"],decimals:[18],standardAccount:"secp256k1",website:"https://moonbeam.network"},{prefix:1285,network:"moonriver",displayName:"Moonriver",symbols:["MOVR"],decimals:[18],standardAccount:"secp256k1",website:"https://moonbeam.network"},{prefix:1328,network:"ajuna",displayName:"Ajuna Network",symbols:["AJUN"],decimals:[12],standardAccount:"*25519",website:"https://ajuna.io"},{prefix:1337,network:"bajun",displayName:"Bajun Network",symbols:["BAJU"],decimals:[12],standardAccount:"*25519",website:"https://ajuna.io"},{prefix:1516,network:"societal",displayName:"Societal",symbols:["SCTL"],decimals:[12],standardAccount:"*25519",website:"https://www.sctl.xyz"},{prefix:1985,network:"seals",displayName:"Seals Network",symbols:["SEAL"],decimals:[9],standardAccount:"*25519",website:"https://seals.app"},{prefix:2007,network:"kapex",displayName:"Kapex",symbols:["KAPEX"],decimals:[12],standardAccount:"*25519",website:"https://totemaccounting.com"},{prefix:2009,network:"cloudwalk_mainnet",displayName:"CloudWalk Network Mainnet",symbols:["CWN"],decimals:[18],standardAccount:"*25519",website:"https://explorer.mainnet.cloudwalk.io"},{prefix:2021,network:"logion",displayName:"logion network",symbols:["LGNT"],decimals:[18],standardAccount:"*25519",website:"https://logion.network"},{prefix:2032,network:"interlay",displayName:"Interlay",symbols:["INTR"],decimals:[10],standardAccount:"*25519",website:"https://interlay.io/"},{prefix:2092,network:"kintsugi",displayName:"Kintsugi",symbols:["KINT"],decimals:[12],standardAccount:"*25519",website:"https://interlay.io/"},{prefix:2106,network:"bitgreen",displayName:"Bitgreen",symbols:["BBB"],decimals:[18],standardAccount:"*25519",website:"https://bitgreen.org/"},{prefix:2112,network:"chainflip",displayName:"Chainflip",symbols:["FLIP"],decimals:[18],standardAccount:"*25519",website:"https://chainflip.io/"},{prefix:2199,network:"moonsama",displayName:"Moonsama",symbols:["SAMA"],decimals:[18],standardAccount:"secp256k1",website:"https://moonsama.com"},{prefix:2206,network:"ICE",displayName:"ICE Network",symbols:["ICY"],decimals:[18],standardAccount:"*25519",website:"https://icenetwork.io"},{prefix:2207,network:"SNOW",displayName:"SNOW: ICE Canary Network",symbols:["ICZ"],decimals:[18],standardAccount:"*25519",website:"https://icenetwork.io"},{prefix:2254,network:"subspace_testnet",displayName:"Subspace testnet",symbols:["tSSC"],decimals:[18],standardAccount:"*25519",website:"https://subspace.network"},{prefix:3333,network:"peerplays",displayName:"Peerplays",symbols:["PPY"],decimals:[18],standardAccount:"secp256k1",website:"https://www.peerplays.com/"},{prefix:4450,network:"g1",displayName:"\u011E1",symbols:["G1"],decimals:[2],standardAccount:"*25519",website:"https://duniter.org"},{prefix:5234,network:"humanode",displayName:"Humanode Network",symbols:["HMND"],decimals:[18],standardAccount:"*25519",website:"https://humanode.io"},{prefix:5845,network:"tangle",displayName:"Tangle Network",symbols:["TNT"],decimals:[18],standardAccount:"*25519",website:"https://www.tangle.tools/"},{prefix:6094,network:"subspace",displayName:"Subspace",symbols:["SSC"],decimals:[18],standardAccount:"*25519",website:"https://subspace.network"},{prefix:7007,network:"tidefi",displayName:"Tidefi",symbols:["TDFY"],decimals:[12],standardAccount:"*25519",website:"https://tidefi.com"},{prefix:7013,network:"gm",displayName:"GM",symbols:["FREN","GM","GN"],decimals:[12,0,0],standardAccount:"*25519",website:"https://gmordie.com"},{prefix:7306,network:"krigan",displayName:"Krigan Network",symbols:["KRGN"],decimals:[9],standardAccount:"*25519",website:"https://krigan.network"},{prefix:7391,network:"unique_mainnet",displayName:"Unique Network",symbols:["UNQ"],decimals:[18],standardAccount:"*25519",website:"https://unique.network"},{prefix:8866,network:"golden_gate",displayName:"Golden Gate",symbols:["GGX"],decimals:[18],standardAccount:"*25519",website:"https://ggxchain.io/"},{prefix:8883,network:"sapphire_mainnet",displayName:"Sapphire by Unique",symbols:["QTZ"],decimals:[18],standardAccount:"*25519",website:"https://unique.network"},{prefix:8886,network:"golden_gate_sydney",displayName:"Golden Gate Sydney",symbols:["GGXT"],decimals:[18],standardAccount:"*25519",website:"https://ggxchain.io/"},{prefix:9072,network:"hashed",displayName:"Hashed Network",symbols:["HASH"],decimals:[18],standardAccount:"*25519",website:"https://hashed.network"},{prefix:9807,network:"dentnet",displayName:"DENTNet",symbols:["DENTX"],decimals:[18],standardAccount:"*25519",website:"https://www.dentnet.io"},{prefix:9935,network:"t3rn",displayName:"t3rn",symbols:["TRN"],decimals:[12],standardAccount:"*25519",website:"https://t3rn.io/"},{prefix:10041,network:"basilisk",displayName:"Basilisk",symbols:["BSX"],decimals:[12],standardAccount:"*25519",website:"https://bsx.fi"},{prefix:11330,network:"cess-testnet",displayName:"CESS Testnet",symbols:["TCESS"],decimals:[12],standardAccount:"*25519",website:"https://cess.cloud"},{prefix:11331,network:"cess",displayName:"CESS",symbols:["CESS"],decimals:[12],standardAccount:"*25519",website:"https://cess.cloud"},{prefix:11486,network:"luhn",displayName:"Luhn Network",symbols:["LUHN"],decimals:[18],standardAccount:"*25519",website:"https://luhn.network"},{prefix:11820,network:"contextfree",displayName:"Automata ContextFree",symbols:["CTX"],decimals:[18],standardAccount:"*25519",website:"https://ata.network"},{prefix:12155,network:"impact",displayName:"Impact Protocol Network",symbols:["BSTY"],decimals:[18],standardAccount:"*25519",website:"https://impactprotocol.network/"},{prefix:12191,network:"nftmart",displayName:"NFTMart",symbols:["NMT"],decimals:[12],standardAccount:"*25519",website:"https://nftmart.io"},{prefix:13116,network:"bittensor",displayName:"Bittensor",symbols:["TAO"],decimals:[9],standardAccount:"*25519",website:"https://bittensor.com"},{prefix:14697,network:"goro",displayName:"GORO Network",symbols:["GORO"],decimals:[9],standardAccount:"*25519",website:"https://goro.network"}];var Oy={acala:["0xfc41b9bd8ef8fe53d58c7ea67c794c7ec9a73daf05e6d54b14ff6342c99ba64c"],ajuna:["0xe358eb1d11b31255a286c12e44fe6780b7edb171d657905a97e39f71d9c6c3ee"],"aleph-node":["0x70255b4d28de0fc4e1a193d7e175ad1ccef431598211c55538f1018651a0344e"],astar:["0x9eb76c5184c4ab8679d2d5d819fdf90b9c001403e9e17da2e14b6d8aec4029c6"],basilisk:["0xa85cfb9b9fd4d622a5b28289a02347af987d8f73fa3108450e2b4a11c1ce5755"],bifrost:["0x262e1b2ad728475fd6fe88e62d34c200abe6fd693931ddad144059b1eb884e5b"],"bifrost-kusama":["0x9f28c6a68e0fc9646eff64935684f6eeeece527e37bbe1f213d22caa1d9d6bed"],bittensor:["0x2f0555cc76fc2840a25a6ea3b9637146806f1f44b090c175ffde2a7e5ab36c03"],centrifuge:["0xb3db41421702df9a7fcac62b53ffeac85f7853cc4e689e0b93aeb3db18c09d82","0x67dddf2673b69e5f875f6f25277495834398eafd67f492e09f3f3345e003d1b5"],cere:["0x81443836a9a24caaa23f1241897d1235717535711d1d3fe24eae4fdc942c092c"],composable:["0xdaab8df776eb52ec604a5df5d388bb62a050a0aaec4556a64265b9d42755552d"],darwinia:["0xe71578b37a7c799b0ab4ee87ffa6f059a6b98f71f06fb8c84a8d88013a548ad6"],"dock-mainnet":["0x6bfe24dca2a3be10f22212678ac13a6446ec764103c0f3471c71609eac384aae","0xf73467c6544aa68df2ee546b135f955c46b90fa627e9b5d7935f41061bb8a5a9"],edgeware:["0x742a2ca70c2fda6cee4f8df98d64c4c670a052d9568058982dad9d5a7a135c5b"],enjin:["0xd8761d3c88f26dc12875c00d3165f7d67243d56fc85b4cf19937601a7916e5a9"],equilibrium:["0x6f1a800de3daff7f5e037ddf66ab22ce03ab91874debeddb1086f5f7dbd48925"],genshiro:["0x9b8cefc0eb5c568b527998bdd76c184e2b76ae561be76e4667072230217ea243"],hydradx:["0xafdc188f45c71dacbaa0b62e16a91f726c7b8699a9748cdf715459de6b7f366d","0xd2a620c27ec5cbc5621ff9a522689895074f7cca0d08e7134a7804e1a3ba86fc","0x10af6e84234477d84dc572bac0789813b254aa490767ed06fb9591191d1073f9","0x3d75507dd46301767e601265791da1d9cb47b6ebc94e87347b635e5bf58bd047","0x0ed32bfcab4a83517fac88f2aa7cbc2f88d3ab93be9a12b6188a036bf8a943c2"],"interlay-parachain":["0xbf88efe70e9e0e916416e8bed61f2b45717f517d7f3523e33c7b001e5ffcbc72"],karura:["0xbaf5aabe40646d11f0ee8abbdc64f4a4b7674925cba08e4a05ff9ebed6e2126b"],khala:["0xd43540ba6d3eb4897c28a77d48cb5b729fea37603cbbfc7a86a73b72adb3be8d"],kulupu:["0xf7a99d3cb92853d00d5275c971c132c074636256583fee53b3bbe60d7b8769ba"],kusama:["0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe","0xe3777fa922cafbff200cadeaea1a76bd7898ad5b89f7848999058b50e715f636","0x3fd7b9eb6a00376e5be61f01abb429ffb0b104be05eaff4d458da48fcd425baf"],matrixchain:["0x3af4ff48ec76d2efc8476730f423ac07e25ad48f5f4c9dc39c778b164d808615"],nodle:["0x97da7ede98d7bad4e36b4d734b6055425a3be036da2a332ea5a7037656427a21"],origintrail:["0xe7e0962324a3b86c83404dbea483f25fb5dab4c224791c81b756cfc948006174"],p3d:["0x6c5894837ad89b6d92b114a2fb3eafa8fe3d26a54848e3447015442cd6ef4e66"],parallel:["0xe61a41c53f5dcd0beb09df93b34402aada44cb05117b71059cce40a2723a4e97"],pendulum:["0x5d3c298622d5634ed019bf61ea4b71655030015bde9beb0d6a24743714462c86"],phala:["0x1bb969d85965e4bb5a651abbedf21a54b6b31a21f66b5401cc3f1e286268d736"],picasso:["0x6811a339673c9daa897944dcdac99c6e2939cc88245ed21951a0a3c9a2be75bc","0xe8e7f0f4c4f5a00720b4821dbfddefea7490bcf0b19009961cc46957984e2c1c"],polkadex:["0x3920bcb4960a1eef5580cd5367ff3f430eef052774f78468852f7b9cb39f8a3c"],polkadot:["0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3"],polymesh:["0x6fbd74e5e1d0a61d52ccfe9d4adaed16dd3a7caa37c6bc4d0c2fa12e8b2f4063"],quartz:["0xcd4d732201ebe5d6b014edda071c4203e16867305332301dc8d092044b28e554"],rococo:["0x6408de7737c59c238890533af25896a2c20608d8b380bb01029acb392781063e","0xaaf2cd1b74b5f726895921259421b534124726263982522174147046b8827897","0x037f5f3c8e67b314062025fc886fcd6238ea25a4a9b45dce8d246815c9ebe770","0xc196f81260cf1686172b47a79cf002120735d7cb0eb1474e8adce56618456fff","0xf6e9983c37baf68846fedafe21e56718790e39fb1c582abc408b81bc7b208f9a","0x5fce687da39305dfe682b117f0820b319348e8bb37eb16cf34acbf6a202de9d9","0xe7c3d5edde7db964317cd9b51a3a059d7cd99f81bdbce14990047354334c9779","0x1611e1dbf0405379b861e2e27daa90f480b2e6d3682414a80835a52e8cb8a215","0x343442f12fa715489a8714e79a7b264ea88c0d5b8c66b684a7788a516032f6b9","0x78bcd530c6b3a068bc17473cf5d2aff9c287102bed9af3ae3c41c33b9d6c6147","0x47381ee0697153d64404fc578392c8fd5cba9073391908f46c888498415647bd","0x19c0e4fa8ab75f5ac7865e0b8f74ff91eb9a100d336f423cd013a8befba40299"],sora:["0x7e4e32d0feafd4f9c9414b0be86373f9a1efa904809b683453a9af6856d38ad5"],stafi:["0x290a4149f09ea0e402c74c1c7e96ae4239588577fe78932f94f5404c68243d80"],statemine:["0x48239ef607d7928874027a43a67689209727dfb3d3dc5e5b03a39bdc2eda771a"],statemint:["0x68d56f15f85d3136970ec16946040bc1752654e906147f7e43e9d539d7c3de2f"],subsocial:["0x0bd72c1c305172e1275278aaeb3f161e02eccb7a819e63f62d47bd53a28189f8"],ternoa:["0x6859c81ca95ef624c9dfe4dc6e3381c33e5d6509e35e147092bfbc780f777c4e"],unique:["0x84322d9cddbf35088f1e54e9a85c967a41a56a4f43445768125e61af166c7d31"],vtb:["0x286bc8414c7000ce1d6ee6a834e29a54c1784814b76243eb77ed0b2c5573c60f","0x7483b89572fb2bd687c7b9a93b242d0b237f9aba463aba07ec24503931038aaa"],westend:["0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e"],xxnetwork:["0x50dd5d206917bf10502c68fb4d18a59fc8aa31586f4e8856b493e43544aa82aa"],zeitgeist:["0x1bf2a2ecb4a868de66ea8610f2ce7c8c43706561b6476031315f6640fe38e060"]};var Iy={centrifuge:"polkadot",kusama:"polkadot",polkadot:"polkadot",sora:"polkadot",statemine:"polkadot",statemint:"polkadot",westmint:"polkadot"};var Vy={acala:787,ajuna:354,"aleph-node":643,astar:810,bifrost:788,"bifrost-kusama":788,centrifuge:747,composable:354,darwinia:354,"dock-mainnet":594,edgeware:523,enjin:1155,equilibrium:99999997,genshiro:99999996,hydradx:354,"interlay-parachain":354,karura:686,khala:434,kusama:434,matrixchain:1155,nodle:1003,origintrail:354,parallel:354,pendulum:354,phala:354,picasso:434,polkadex:799,polkadot:354,polymesh:595,quartz:631,sora:617,stafi:907,statemine:434,statemint:354,ternoa:995,unique:661,vtb:694,xxnetwork:1955,zeitgeist:354};var Ny={"":!0,"cess-testnet":!0,"dock-testnet":!0,jupiter:!0,"mathchain-testnet":!0,p3dt:!0,subspace_testnet:!0,"zero-alphaville":!0};var U8=[0,2,42],EO=["testnet"];function PO(t){let e=t.network||"",r=e.replace(/_/g,"-").split("-"),n=t;return n.slip44=Vy[e],n.hasLedgerSupport=!!n.slip44,n.genesisHash=Oy[e]||[],n.icon=Iy[e]||"substrate",n.isTestnet=!!Ny[e]||EO.includes(r[r.length-1]),n.isIgnored=n.isTestnet||!(t.standardAccount&&t.decimals?.length&&t.symbols?.length)&&t.prefix!==42,n}function MO({genesisHash:t,prefix:e}){return!!t.length||e===42}function AO(t){return!t.isIgnored&&!!t.network}function OO(t,e){let r=U8.includes(t.prefix),n=U8.includes(e.prefix);return r===n?r?0:t.displayName.localeCompare(e.displayName):r?-1:1}var H8=R8.map(PO),xh=H8.filter(AO).sort(OO),Cy=xh.filter(MO);var Lu={allowedDecodedLengths:[1,2,4,8,32,33],allowedEncodedLengths:[3,4,6,10,35,36,37,38],allowedPrefix:xh.map(({prefix:t})=>t),prefix:42};function tr(t,e,r=-1){if(!t)throw new Error("Invalid empty address passed");if(ue(t)||Ae(t))return K(t);try{let n=by(t);if(!Lu.allowedEncodedLengths.includes(n.length))throw new Error("Invalid decoded address length");let[o,a,s,u]=B8(n);if(!o&&!e)throw new Error("Invalid decoded address checksum");if(r!==-1&&r!==u)throw new Error(`Expected ss58Format ${r}, received ${u}`);return n.slice(s,a)}catch(n){throw new Error(`Decoding ${t}: ${n.message}`)}}var By={isLe:!1},bh={isLe:!0};var L8={bitLength:32,isLe:!1},yh={bitLength:32,isLe:!0},ia={bitLength:256,isLe:!1},D8={bitLength:256,isLe:!0};var IO=/^\d+$/,VO=32,gh=class t{__internal__chainCode=new Uint8Array(32);__internal__isHard=!1;static from(e){let r=new t,[n,o]=e.startsWith("/")?[e.substring(1),!0]:[e,!1];return r.soft(IO.test(n)?new be.default(n,10):n),o?r.harden():r}get chainCode(){return this.__internal__chainCode}get isHard(){return this.__internal__isHard}get isSoft(){return!this.__internal__isHard}hard(e){return this.soft(e).harden()}harden(){return this.__internal__isHard=!0,this}soft(e){return De(e)||hr(e)||un(e)?this.soft($t(e,D8)):Ae(e)?this.soft(jt(e)):qe(e)?this.soft($r(yt(e))):e.length>VO?this.soft(kr(e)):(this.__internal__chainCode.fill(0),this.__internal__chainCode.set(e,0),this)}soften(){return this.__internal__isHard=!1,this}};var NO=/\/(\/?)([^/]+)/g;function xl(t){let e=t.match(NO),r=[],n="";if(e){n=e.join("");for(let o of e)r.push(gh.from(o.substring(1)))}if(n!==t)throw new Error(`Re-constructed path "${n}" does not match input`);return{parts:e,path:r}}var CO=/^(\w+( \w+)*)((\/\/?[^/]+)*)(\/\/\/(.*))?$/;function Ry(t){let e=t.match(CO);if(e===null)throw new Error("Unable to match provided value to a secret URI");let[,r,,n,,,o]=e,{path:a}=xl(n);return{derivePath:n,password:o,path:a,phrase:r}}var BO=$r(yt("Secp256k1HDKD"));function z8(t,e){if(!ue(e)||e.length!==32)throw new Error("Invalid chainCode passed to derive");return kr(Ke(BO,t,e),256)}function RO(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);let o=BigInt(32),a=BigInt(4294967295),s=Number(r>>o&a),u=Number(r&a),l=n?4:0,h=n?0:4;t.setUint32(e+l,s,n),t.setUint32(e+h,u,n)}var Du=class extends Ei{constructor(e,r,n,o){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Uu(this.buffer)}update(e){Co(this);let{view:r,buffer:n,blockLen:o}=this;e=en(e);let a=e.length;for(let s=0;so-s&&(this.process(n,0),s=0);for(let _=s;_y.length)throw new Error("_sha2: outputLen bigger than state");for(let _=0;_t&e^~t&r,HO=(t,e,r)=>t&e^t&r^e&r,LO=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),$a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),es=new Uint32Array(64),Uy=class extends Du{constructor(){super(64,32,8,!1),this.A=$a[0]|0,this.B=$a[1]|0,this.C=$a[2]|0,this.D=$a[3]|0,this.E=$a[4]|0,this.F=$a[5]|0,this.G=$a[6]|0,this.H=$a[7]|0}get(){let{A:e,B:r,C:n,D:o,E:a,F:s,G:u,H:l}=this;return[e,r,n,o,a,s,u,l]}set(e,r,n,o,a,s,u,l){this.A=e|0,this.B=r|0,this.C=n|0,this.D=o|0,this.E=a|0,this.F=s|0,this.G=u|0,this.H=l|0}process(e,r){for(let _=0;_<16;_++,r+=4)es[_]=e.getUint32(r,!1);for(let _=16;_<64;_++){let V=es[_-15],R=es[_-2],B=Qo(V,7)^Qo(V,18)^V>>>3,L=Qo(R,17)^Qo(R,19)^R>>>10;es[_]=L+es[_-7]+B+es[_-16]|0}let{A:n,B:o,C:a,D:s,E:u,F:l,G:h,H:y}=this;for(let _=0;_<64;_++){let V=Qo(u,6)^Qo(u,11)^Qo(u,25),R=y+V+UO(u,l,h)+LO[_]+es[_]|0,L=(Qo(n,2)^Qo(n,13)^Qo(n,22))+HO(n,o,a)|0;y=h,h=l,l=u,u=s+R|0,s=a,a=o,o=n,n=R+L|0}n=n+this.A|0,o=o+this.B|0,a=a+this.C|0,s=s+this.D|0,u=u+this.E|0,l=l+this.F|0,h=h+this.G|0,y=y+this.H|0,this.set(n,o,a,s,u,l,h,y)}roundClean(){es.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};var aa=Hu(()=>new Uy);var vh={};br(vh,{bitGet:()=>XO,bitLen:()=>jO,bitMask:()=>bl,bitSet:()=>GO,bytesToHex:()=>ca,bytesToNumberBE:()=>ua,bytesToNumberLE:()=>ts,concatBytes:()=>fa,createHmacDrbg:()=>Dy,ensureBytes:()=>Br,equalBytes:()=>qO,hexToBytes:()=>oc,hexToNumber:()=>Ly,isBytes:()=>$o,numberToBytesBE:()=>rs,numberToBytesLE:()=>ic,numberToHexUnpadded:()=>j8,numberToVarBytesBE:()=>FO,utf8ToBytes:()=>WO,validateObject:()=>Pi});var W8=BigInt(0),wh=BigInt(1),DO=BigInt(2);function $o(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}var zO=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function ca(t){if(!$o(t))throw new Error("Uint8Array expected");let e="";for(let r=0;r=sa._0&&t<=sa._9)return t-sa._0;if(t>=sa._A&&t<=sa._F)return t-(sa._A-10);if(t>=sa._a&&t<=sa._f)return t-(sa._a-10)}function oc(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);let e=t.length,r=e/2;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);let n=new Uint8Array(r);for(let o=0,a=0;oW8;t>>=wh,e+=1);return e}function XO(t,e){return t>>BigInt(e)&wh}var GO=(t,e,r)=>t|(r?wh:W8)<(DO<new Uint8Array(t),q8=t=>Uint8Array.from(t);function Dy(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=Hy(t),o=Hy(t),a=0,s=()=>{n.fill(1),o.fill(0),a=0},u=(..._)=>r(o,n,..._),l=(_=Hy())=>{o=u(q8([0]),_),n=u(),_.length!==0&&(o=u(q8([1]),_),n=u())},h=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let _=0,V=[];for(;_{s(),l(_);let R;for(;!(R=V(h()));)l();return s(),R}}var ZO={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||$o(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function Pi(t,e,r={}){let n=(o,a,s)=>{let u=ZO[a];if(typeof u!="function")throw new Error(`Invalid validator "${a}", expected function`);let l=t[o];if(!(s&&l===void 0)&&!u(l,t))throw new Error(`Invalid param ${String(o)}=${l} (${typeof l}), expected ${a}`)};for(let[o,a]of Object.entries(e))n(o,a,!1);for(let[o,a]of Object.entries(r))n(o,a,!0);return t}var Zr=BigInt(0),Er=BigInt(1),ac=BigInt(2),YO=BigInt(3),zy=BigInt(4),X8=BigInt(5),G8=BigInt(8),KO=BigInt(9),JO=BigInt(16);function ir(t,e){let r=t%e;return r>=Zr?r:e+r}function QO(t,e,r){if(r<=Zr||e 0");if(r===Er)return Zr;let n=Er;for(;e>Zr;)e&Er&&(n=n*t%r),t=t*t%r,e>>=Er;return n}function Pr(t,e,r){let n=t;for(;e-- >Zr;)n*=n,n%=r;return n}function _h(t,e){if(t===Zr||e<=Zr)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=ir(t,e),n=e,o=Zr,a=Er,s=Er,u=Zr;for(;r!==Zr;){let h=n/r,y=n%r,_=o-s*h,V=a-u*h;n=r,r=y,o=s,a=u,s=_,u=V}if(n!==Er)throw new Error("invert: does not exist");return ir(o,e)}function $O(t){let e=(t-Er)/ac,r,n,o;for(r=t-Er,n=0;r%ac===Zr;r/=ac,n++);for(o=ac;o(ir(t,e)&Er)===Er,tI=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Fy(t){let e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=tI.reduce((n,o)=>(n[o]="function",n),e);return Pi(t,r)}function rI(t,e,r){if(r 0");if(r===Zr)return t.ONE;if(r===Er)return e;let n=t.ONE,o=e;for(;r>Zr;)r&Er&&(n=t.mul(n,o)),o=t.sqr(o),r>>=Er;return n}function nI(t,e){let r=new Array(e.length),n=e.reduce((a,s,u)=>t.is0(s)?a:(r[u]=a,t.mul(a,s)),t.ONE),o=t.inv(n);return e.reduceRight((a,s,u)=>t.is0(s)?a:(r[u]=t.mul(a,r[u]),t.mul(a,s)),o),r}function qy(t,e){let r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Sh(t,e,r=!1,n={}){if(t<=Zr)throw new Error(`Expected Field ORDER > 0, got ${t}`);let{nBitLength:o,nByteLength:a}=qy(t,e);if(a>2048)throw new Error("Field lengths over 2048 bytes are not supported");let s=eI(t),u=Object.freeze({ORDER:t,BITS:o,BYTES:a,MASK:bl(o),ZERO:Zr,ONE:Er,create:l=>ir(l,t),isValid:l=>{if(typeof l!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof l}`);return Zr<=l&&ll===Zr,isOdd:l=>(l&Er)===Er,neg:l=>ir(-l,t),eql:(l,h)=>l===h,sqr:l=>ir(l*l,t),add:(l,h)=>ir(l+h,t),sub:(l,h)=>ir(l-h,t),mul:(l,h)=>ir(l*h,t),pow:(l,h)=>rI(u,l,h),div:(l,h)=>ir(l*_h(h,t),t),sqrN:l=>l*l,addN:(l,h)=>l+h,subN:(l,h)=>l-h,mulN:(l,h)=>l*h,inv:l=>_h(l,t),sqrt:n.sqrt||(l=>s(u,l)),invertBatch:l=>nI(u,l),cmov:(l,h,y)=>y?h:l,toBytes:l=>r?ic(l,a):rs(l,a),fromBytes:l=>{if(l.length!==a)throw new Error(`Fp.fromBytes: expected ${a}, got ${l.length}`);return r?ts(l):ua(l)}});return Object.freeze(u)}function Y8(t,e){if(!t.isOdd)throw new Error("Field doesn't have isOdd");let r=t.sqrt(e);return t.isOdd(r)?t.neg(r):r}function K8(t){if(typeof t!="bigint")throw new Error("field order must be bigint");let e=t.toString(2).length;return Math.ceil(e/8)}function Wy(t){let e=K8(t);return e+Math.ceil(e/2)}function J8(t,e,r=!1){let n=t.length,o=K8(e),a=Wy(e);if(n<16||n1024)throw new Error(`expected ${a}-1024 bytes of input, got ${n}`);let s=r?ua(t):ts(t),u=ir(s,e-Er)+Er;return r?ic(u,o):rs(u,o)}var iI=BigInt(0),jy=BigInt(1);function Th(t,e){let r=(o,a)=>{let s=a.negate();return o?s:a},n=o=>{let a=Math.ceil(e/o)+1,s=2**(o-1);return{windows:a,windowSize:s}};return{constTimeNegate:r,unsafeLadder(o,a){let s=t.ZERO,u=o;for(;a>iI;)a&jy&&(s=s.add(u)),u=u.double(),a>>=jy;return s},precomputeWindow(o,a){let{windows:s,windowSize:u}=n(a),l=[],h=o,y=h;for(let _=0;_>=R,Z>l&&(Z-=V,s+=jy);let G=L,J=L+Math.abs(Z)-1,Y=B%2!==0,fe=Z<0;Z===0?y=y.add(r(Y,a[G])):h=h.add(r(fe,a[J]))}return{p:h,f:y}},wNAFCached(o,a,s,u){let l=o._WINDOW_SIZE||1,h=a.get(o);return h||(h=this.precomputeWindow(o,l),l!==1&&a.set(o,u(h))),this.wNAF(l,h,s)}}}function yl(t){return Fy(t.Fp),Pi(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...qy(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}function aI(t){let e=yl(t);Pi(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:r,Fp:n,a:o}=e;if(r){if(!n.eql(o,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}var{bytesToNumberBE:sI,hexToBytes:cI}=vh,sc={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){let{Err:e}=sc;if(t.length<2||t[0]!==2)throw new e("Invalid signature integer tag");let r=t[1],n=t.subarray(2,r+2);if(!r||n.length!==r)throw new e("Invalid signature integer: wrong length");if(n[0]&128)throw new e("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:sI(n),l:t.subarray(r+2)}},toSig(t){let{Err:e}=sc,r=typeof t=="string"?cI(t):t;if(!$o(r))throw new Error("ui8a expected");let n=r.length;if(n<2||r[0]!=48)throw new e("Invalid signature tag");if(r[1]!==n-2)throw new e("Invalid signature: incorrect length");let{d:o,l:a}=sc._parseInt(r.subarray(2)),{d:s,l:u}=sc._parseInt(a);if(u.length)throw new e("Invalid signature: left bytes after parsing");return{r:o,s}},hexFromSig(t){let e=h=>Number.parseInt(h[0],16)&8?"00"+h:h,r=h=>{let y=h.toString(16);return y.length&1?`0${y}`:y},n=e(r(t.s)),o=e(r(t.r)),a=n.length/2,s=o.length/2,u=r(a),l=r(s);return`30${r(s+a+4)}02${l}${o}02${u}${n}`}},la=BigInt(0),Ro=BigInt(1),NY=BigInt(2),Q8=BigInt(3),CY=BigInt(4);function uI(t){let e=aI(t),{Fp:r}=e,n=e.toBytes||((B,L,Z)=>{let G=L.toAffine();return fa(Uint8Array.from([4]),r.toBytes(G.x),r.toBytes(G.y))}),o=e.fromBytes||(B=>{let L=B.subarray(1),Z=r.fromBytes(L.subarray(0,r.BYTES)),G=r.fromBytes(L.subarray(r.BYTES,2*r.BYTES));return{x:Z,y:G}});function a(B){let{a:L,b:Z}=e,G=r.sqr(B),J=r.mul(G,B);return r.add(r.add(J,r.mul(B,L)),Z)}if(!r.eql(r.sqr(e.Gy),a(e.Gx)))throw new Error("bad generator point: equation left != right");function s(B){return typeof B=="bigint"&&lar.eql(Y,r.ZERO);return J(Z)&&J(G)?_.ZERO:new _(Z,G,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(L){let Z=r.invertBatch(L.map(G=>G.pz));return L.map((G,J)=>G.toAffine(Z[J])).map(_.fromAffine)}static fromHex(L){let Z=_.fromAffine(o(Br("pointHex",L)));return Z.assertValidity(),Z}static fromPrivateKey(L){return _.BASE.multiply(l(L))}_setWindowSize(L){this._WINDOW_SIZE=L,h.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}let{x:L,y:Z}=this.toAffine();if(!r.isValid(L)||!r.isValid(Z))throw new Error("bad point: x or y not FE");let G=r.sqr(Z),J=a(L);if(!r.eql(G,J))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y:L}=this.toAffine();if(r.isOdd)return!r.isOdd(L);throw new Error("Field doesn't support isOdd")}equals(L){y(L);let{px:Z,py:G,pz:J}=this,{px:Y,py:fe,pz:ie}=L,re=r.eql(r.mul(Z,ie),r.mul(Y,J)),he=r.eql(r.mul(G,ie),r.mul(fe,J));return re&&he}negate(){return new _(this.px,r.neg(this.py),this.pz)}double(){let{a:L,b:Z}=e,G=r.mul(Z,Q8),{px:J,py:Y,pz:fe}=this,ie=r.ZERO,re=r.ZERO,he=r.ZERO,me=r.mul(J,J),Re=r.mul(Y,Y),Oe=r.mul(fe,fe),ge=r.mul(J,Y);return ge=r.add(ge,ge),he=r.mul(J,fe),he=r.add(he,he),ie=r.mul(L,he),re=r.mul(G,Oe),re=r.add(ie,re),ie=r.sub(Re,re),re=r.add(Re,re),re=r.mul(ie,re),ie=r.mul(ge,ie),he=r.mul(G,he),Oe=r.mul(L,Oe),ge=r.sub(me,Oe),ge=r.mul(L,ge),ge=r.add(ge,he),he=r.add(me,me),me=r.add(he,me),me=r.add(me,Oe),me=r.mul(me,ge),re=r.add(re,me),Oe=r.mul(Y,fe),Oe=r.add(Oe,Oe),me=r.mul(Oe,ge),ie=r.sub(ie,me),he=r.mul(Oe,Re),he=r.add(he,he),he=r.add(he,he),new _(ie,re,he)}add(L){y(L);let{px:Z,py:G,pz:J}=this,{px:Y,py:fe,pz:ie}=L,re=r.ZERO,he=r.ZERO,me=r.ZERO,Re=e.a,Oe=r.mul(e.b,Q8),ge=r.mul(Z,Y),Ze=r.mul(G,fe),C=r.mul(J,ie),m=r.add(Z,G),w=r.add(Y,fe);m=r.mul(m,w),w=r.add(ge,Ze),m=r.sub(m,w),w=r.add(Z,J);let S=r.add(Y,ie);return w=r.mul(w,S),S=r.add(ge,C),w=r.sub(w,S),S=r.add(G,J),re=r.add(fe,ie),S=r.mul(S,re),re=r.add(Ze,C),S=r.sub(S,re),me=r.mul(Re,w),re=r.mul(Oe,C),me=r.add(re,me),re=r.sub(Ze,me),me=r.add(Ze,me),he=r.mul(re,me),Ze=r.add(ge,ge),Ze=r.add(Ze,ge),C=r.mul(Re,C),w=r.mul(Oe,w),Ze=r.add(Ze,C),C=r.sub(ge,C),C=r.mul(Re,C),w=r.add(w,C),ge=r.mul(Ze,w),he=r.add(he,ge),ge=r.mul(S,w),re=r.mul(m,re),re=r.sub(re,ge),ge=r.mul(m,Ze),me=r.mul(S,me),me=r.add(me,ge),new _(re,he,me)}subtract(L){return this.add(L.negate())}is0(){return this.equals(_.ZERO)}wNAF(L){return R.wNAFCached(this,h,L,Z=>{let G=r.invertBatch(Z.map(J=>J.pz));return Z.map((J,Y)=>J.toAffine(G[Y])).map(_.fromAffine)})}multiplyUnsafe(L){let Z=_.ZERO;if(L===la)return Z;if(u(L),L===Ro)return this;let{endo:G}=e;if(!G)return R.unsafeLadder(this,L);let{k1neg:J,k1:Y,k2neg:fe,k2:ie}=G.splitScalar(L),re=Z,he=Z,me=this;for(;Y>la||ie>la;)Y&Ro&&(re=re.add(me)),ie&Ro&&(he=he.add(me)),me=me.double(),Y>>=Ro,ie>>=Ro;return J&&(re=re.negate()),fe&&(he=he.negate()),he=new _(r.mul(he.px,G.beta),he.py,he.pz),re.add(he)}multiply(L){u(L);let Z=L,G,J,{endo:Y}=e;if(Y){let{k1neg:fe,k1:ie,k2neg:re,k2:he}=Y.splitScalar(Z),{p:me,f:Re}=this.wNAF(ie),{p:Oe,f:ge}=this.wNAF(he);me=R.constTimeNegate(fe,me),Oe=R.constTimeNegate(re,Oe),Oe=new _(r.mul(Oe.px,Y.beta),Oe.py,Oe.pz),G=me.add(Oe),J=Re.add(ge)}else{let{p:fe,f:ie}=this.wNAF(Z);G=fe,J=ie}return _.normalizeZ([G,J])[0]}multiplyAndAddUnsafe(L,Z,G){let J=_.BASE,Y=(ie,re)=>re===la||re===Ro||!ie.equals(J)?ie.multiplyUnsafe(re):ie.multiply(re),fe=Y(this,Z).add(Y(L,G));return fe.is0()?void 0:fe}toAffine(L){let{px:Z,py:G,pz:J}=this,Y=this.is0();L==null&&(L=Y?r.ONE:r.inv(J));let fe=r.mul(Z,L),ie=r.mul(G,L),re=r.mul(J,L);if(Y)return{x:r.ZERO,y:r.ZERO};if(!r.eql(re,r.ONE))throw new Error("invZ was invalid");return{x:fe,y:ie}}isTorsionFree(){let{h:L,isTorsionFree:Z}=e;if(L===Ro)return!0;if(Z)return Z(_,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:L,clearCofactor:Z}=e;return L===Ro?this:Z?Z(_,this):this.multiplyUnsafe(e.h)}toRawBytes(L=!0){return this.assertValidity(),n(_,this,L)}toHex(L=!0){return ca(this.toRawBytes(L))}}_.BASE=new _(e.Gx,e.Gy,r.ONE),_.ZERO=new _(r.ZERO,r.ONE,r.ZERO);let V=e.nBitLength,R=Th(_,e.endo?Math.ceil(V/2):V);return{CURVE:e,ProjectivePoint:_,normPrivateKeyToScalar:l,weierstrassEquation:a,isWithinCurveOrder:s}}function fI(t){let e=yl(t);return Pi(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function $8(t){let e=fI(t),{Fp:r,n}=e,o=r.BYTES+1,a=2*r.BYTES+1;function s(w){return laca(rs(w,e.nByteLength));function B(w){let S=n>>Ro;return w>S}function L(w){return B(w)?u(-w):w}let Z=(w,S,E)=>ua(w.slice(S,E));class G{constructor(S,E,k){this.r=S,this.s=E,this.recovery=k,this.assertValidity()}static fromCompact(S){let E=e.nByteLength;return S=Br("compactSignature",S,E*2),new G(Z(S,0,E),Z(S,E,2*E))}static fromDER(S){let{r:E,s:k}=sc.toSig(Br("DER",S));return new G(E,k)}assertValidity(){if(!V(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!V(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(S){return new G(this.r,this.s,S)}recoverPublicKey(S){let{r:E,s:k,recovery:I}=this,U=he(Br("msgHash",S));if(I==null||![0,1,2,3].includes(I))throw new Error("recovery id invalid");let O=I===2||I===3?E+e.n:E;if(O>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");let g=I&1?"03":"02",M=h.fromHex(g+R(O)),le=l(O),ye=u(-U*le),pe=u(k*le),_e=h.BASE.multiplyAndAddUnsafe(M,ye,pe);if(!_e)throw new Error("point at infinify");return _e.assertValidity(),_e}hasHighS(){return B(this.s)}normalizeS(){return this.hasHighS()?new G(this.r,u(-this.s),this.recovery):this}toDERRawBytes(){return oc(this.toDERHex())}toDERHex(){return sc.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return oc(this.toCompactHex())}toCompactHex(){return R(this.r)+R(this.s)}}let J={isValidPrivateKey(w){try{return y(w),!0}catch{return!1}},normPrivateKeyToScalar:y,randomPrivateKey:()=>{let w=Wy(e.n);return J8(e.randomBytes(w),e.n)},precompute(w=8,S=h.BASE){return S._setWindowSize(w),S.multiply(BigInt(3)),S}};function Y(w,S=!0){return h.fromPrivateKey(w).toRawBytes(S)}function fe(w){let S=$o(w),E=typeof w=="string",k=(S||E)&&w.length;return S?k===o||k===a:E?k===2*o||k===2*a:w instanceof h}function ie(w,S,E=!0){if(fe(w))throw new Error("first arg must be private key");if(!fe(S))throw new Error("second arg must be public key");return h.fromHex(S).multiply(y(w)).toRawBytes(E)}let re=e.bits2int||function(w){let S=ua(w),E=w.length*8-e.nBitLength;return E>0?S>>BigInt(E):S},he=e.bits2int_modN||function(w){return u(re(w))},me=bl(e.nBitLength);function Re(w){if(typeof w!="bigint")throw new Error("bigint expected");if(!(la<=w&&wUe in E))throw new Error("sign() legacy options not supported");let{hash:k,randomBytes:I}=e,{lowS:U,prehash:O,extraEntropy:g}=E;U==null&&(U=!0),w=Br("msgHash",w),O&&(w=Br("prehashed msgHash",k(w)));let M=he(w),le=y(S),ye=[Re(le),Re(M)];if(g!=null){let Ue=g===!0?I(r.BYTES):g;ye.push(Br("extraEntropy",Ue))}let pe=fa(...ye),_e=M;function He(Ue){let St=re(Ue);if(!V(St))return;let Xe=l(St),Ce=h.BASE.multiply(St).toAffine(),ar=u(Ce.x);if(ar===la)return;let gt=u(Xe*u(_e+ar*le));if(gt===la)return;let nt=(Ce.x===ar?0:2)|Number(Ce.y&Ro),Yn=gt;return U&&B(gt)&&(Yn=L(gt),nt^=1),new G(ar,Yn,nt)}return{seed:pe,k2sig:He}}let ge={lowS:e.lowS,prehash:!1},Ze={lowS:e.lowS,prehash:!1};function C(w,S,E=ge){let{seed:k,k2sig:I}=Oe(w,S,E),U=e;return Dy(U.hash.outputLen,U.nByteLength,U.hmac)(k,I)}h.BASE._setWindowSize(8);function m(w,S,E,k=Ze){let I=w;if(S=Br("msgHash",S),E=Br("publicKey",E),"strict"in k)throw new Error("options.strict was renamed to lowS");let{lowS:U,prehash:O}=k,g,M;try{if(typeof I=="string"||$o(I))try{g=G.fromDER(I)}catch(Ce){if(!(Ce instanceof sc.Err))throw Ce;g=G.fromCompact(I)}else if(typeof I=="object"&&typeof I.r=="bigint"&&typeof I.s=="bigint"){let{r:Ce,s:ar}=I;g=new G(Ce,ar)}else throw new Error("PARSE");M=h.fromHex(E)}catch(Ce){if(Ce.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(U&&g.hasHighS())return!1;O&&(S=e.hash(S));let{r:le,s:ye}=g,pe=he(S),_e=l(ye),He=u(pe*_e),Ue=u(le*_e),St=h.BASE.multiplyAndAddUnsafe(M,He,Ue)?.toAffine();return St?u(St.x)===le:!1}return{CURVE:e,getPublicKey:Y,getSharedSecret:ie,sign:C,verify:m,ProjectivePoint:h,Signature:G,utils:J}}var kh=class extends Ei{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,sh(e);let n=en(r);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let o=this.blockLen,a=new Uint8Array(o);a.set(n.length>o?e.create().update(n).digest():n);for(let s=0;snew kh(t,e).update(r).digest();cc.create=(t,e)=>new kh(t,e);function lI(t){return{hash:t,hmac:(e,...r)=>cc(t,e,uh(...r)),randomBytes:lh}}function e5(t,e){let r=n=>$8({...t,...lI(n)});return Object.freeze({...r(e),create:r})}var n5=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),t5=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),dI=BigInt(1),Xy=BigInt(2),r5=(t,e)=>(t+e/Xy)/e;function pI(t){let e=n5,r=BigInt(3),n=BigInt(6),o=BigInt(11),a=BigInt(22),s=BigInt(23),u=BigInt(44),l=BigInt(88),h=t*t*t%e,y=h*h*t%e,_=Pr(y,r,e)*y%e,V=Pr(_,r,e)*y%e,R=Pr(V,Xy,e)*h%e,B=Pr(R,o,e)*R%e,L=Pr(B,a,e)*B%e,Z=Pr(L,u,e)*L%e,G=Pr(Z,l,e)*Z%e,J=Pr(G,u,e)*L%e,Y=Pr(J,r,e)*y%e,fe=Pr(Y,s,e)*B%e,ie=Pr(fe,n,e)*h%e,re=Pr(ie,Xy,e);if(!Gy.eql(Gy.sqr(re),t))throw new Error("Cannot find square root");return re}var Gy=Sh(n5,void 0,void 0,{sqrt:pI}),ei=e5({a:BigInt(0),b:BigInt(7),Fp:Gy,n:t5,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{let e=t5,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-dI*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=r,s=BigInt("0x100000000000000000000000000000000"),u=r5(a*t,e),l=r5(-n*t,e),h=ir(t-u*r-l*o,e),y=ir(-u*n-l*a,e),_=h>s,V=y>s;if(_&&(h=e-h),V&&(y=e-y),h>s||y>s)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:_,k1:h,k2neg:V,k2:y}}}},aa),XY=BigInt(0);var GY=ei.ProjectivePoint;function ti(t,e){if(t.length!==32)throw new Error("Expected valid 32-byte private key as a seed");if(!ht||!e&<()){let r=K9(t),n=r.slice(32);if(al(n))throw new Error("Invalid publicKey generated from WASM interface");return{publicKey:n,secretKey:r.slice(0,32)}}return{publicKey:ei.getPublicKey(t,!0),secretKey:t}}function Eh(t,e){return(r,{chainCode:n,isHard:o})=>{if(!o)throw new Error("A soft key was found in the path and is not supported");return t(e(r.secretKey.subarray(0,32),n))}}var Zy=Eh(ti,z8);var hI=$r(yt("Ed25519HDKD"));function Yy(t,e){if(!ue(e)||e.length!==32)throw new Error("Invalid chainCode passed to derive");return kr(Ke(hI,t,e))}function zu(t=32){return Qp(new Uint8Array(t))}var[mI,xI]=Be.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),ns=new Uint32Array(80),os=new Uint32Array(80),Ky=class extends Du{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){let{Ah:e,Al:r,Bh:n,Bl:o,Ch:a,Cl:s,Dh:u,Dl:l,Eh:h,El:y,Fh:_,Fl:V,Gh:R,Gl:B,Hh:L,Hl:Z}=this;return[e,r,n,o,a,s,u,l,h,y,_,V,R,B,L,Z]}set(e,r,n,o,a,s,u,l,h,y,_,V,R,B,L,Z){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=o|0,this.Ch=a|0,this.Cl=s|0,this.Dh=u|0,this.Dl=l|0,this.Eh=h|0,this.El=y|0,this.Fh=_|0,this.Fl=V|0,this.Gh=R|0,this.Gl=B|0,this.Hh=L|0,this.Hl=Z|0}process(e,r){for(let Y=0;Y<16;Y++,r+=4)ns[Y]=e.getUint32(r),os[Y]=e.getUint32(r+=4);for(let Y=16;Y<80;Y++){let fe=ns[Y-15]|0,ie=os[Y-15]|0,re=Be.rotrSH(fe,ie,1)^Be.rotrSH(fe,ie,8)^Be.shrSH(fe,ie,7),he=Be.rotrSL(fe,ie,1)^Be.rotrSL(fe,ie,8)^Be.shrSL(fe,ie,7),me=ns[Y-2]|0,Re=os[Y-2]|0,Oe=Be.rotrSH(me,Re,19)^Be.rotrBH(me,Re,61)^Be.shrSH(me,Re,6),ge=Be.rotrSL(me,Re,19)^Be.rotrBL(me,Re,61)^Be.shrSL(me,Re,6),Ze=Be.add4L(he,ge,os[Y-7],os[Y-16]),C=Be.add4H(Ze,re,Oe,ns[Y-7],ns[Y-16]);ns[Y]=C|0,os[Y]=Ze|0}let{Ah:n,Al:o,Bh:a,Bl:s,Ch:u,Cl:l,Dh:h,Dl:y,Eh:_,El:V,Fh:R,Fl:B,Gh:L,Gl:Z,Hh:G,Hl:J}=this;for(let Y=0;Y<80;Y++){let fe=Be.rotrSH(_,V,14)^Be.rotrSH(_,V,18)^Be.rotrBH(_,V,41),ie=Be.rotrSL(_,V,14)^Be.rotrSL(_,V,18)^Be.rotrBL(_,V,41),re=_&R^~_&L,he=V&B^~V&Z,me=Be.add5L(J,ie,he,xI[Y],os[Y]),Re=Be.add5H(me,G,fe,re,mI[Y],ns[Y]),Oe=me|0,ge=Be.rotrSH(n,o,28)^Be.rotrBH(n,o,34)^Be.rotrBH(n,o,39),Ze=Be.rotrSL(n,o,28)^Be.rotrBL(n,o,34)^Be.rotrBL(n,o,39),C=n&a^n&u^a&u,m=o&s^o&l^s&l;G=L|0,J=Z|0,L=R|0,Z=B|0,R=_|0,B=V|0,{h:_,l:V}=Be.add(h|0,y|0,Re|0,Oe|0),h=u|0,y=l|0,u=a|0,l=s|0,a=n|0,s=o|0;let w=Be.add3L(Oe,Ze,m);n=Be.add3H(w,Re,ge,C),o=w|0}({h:n,l:o}=Be.add(this.Ah|0,this.Al|0,n|0,o|0)),{h:a,l:s}=Be.add(this.Bh|0,this.Bl|0,a|0,s|0),{h:u,l}=Be.add(this.Ch|0,this.Cl|0,u|0,l|0),{h,l:y}=Be.add(this.Dh|0,this.Dl|0,h|0,y|0),{h:_,l:V}=Be.add(this.Eh|0,this.El|0,_|0,V|0),{h:R,l:B}=Be.add(this.Fh|0,this.Fl|0,R|0,B|0),{h:L,l:Z}=Be.add(this.Gh|0,this.Gl|0,L|0,Z|0),{h:G,l:J}=Be.add(this.Hh|0,this.Hl|0,G|0,J|0),this.set(n,o,a,s,u,l,h,y,_,V,R,B,L,Z,G,J)}roundClean(){ns.fill(0),os.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};var da=Hu(()=>new Ky);var ri=BigInt(0),ao=BigInt(1),Ph=BigInt(2),bI=BigInt(8),yI={zip215:!0};function gI(t){let e=yl(t);return Pi(t,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...e})}function Mh(t){let e=gI(t),{Fp:r,n,prehash:o,hash:a,randomBytes:s,nByteLength:u,h:l}=e,h=Ph<{try{return{isValid:!0,value:r.sqrt(k*r.inv(I))}}catch{return{isValid:!1,value:ri}}}),V=e.adjustScalarBytes||(k=>k),R=e.domain||((k,I,U)=>{if(I.length||U)throw new Error("Contexts/pre-hash are not supported");return k}),B=k=>typeof k=="bigint"&&riB(k)&&B(I)&&kk===ri||L(k,h);function G(k,I){if(L(k,I))return k;throw new Error(`Expected valid scalar < ${I}, got ${typeof k} ${k}`)}function J(k){return k===ri?k:G(k,n)}let Y=new Map;function fe(k){if(!(k instanceof ie))throw new Error("ExtendedPoint expected")}class ie{constructor(I,U,O,g){if(this.ex=I,this.ey=U,this.ez=O,this.et=g,!Z(I))throw new Error("x required");if(!Z(U))throw new Error("y required");if(!Z(O))throw new Error("z required");if(!Z(g))throw new Error("t required")}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(I){if(I instanceof ie)throw new Error("extended point not allowed");let{x:U,y:O}=I||{};if(!Z(U)||!Z(O))throw new Error("invalid affine point");return new ie(U,O,ao,y(U*O))}static normalizeZ(I){let U=r.invertBatch(I.map(O=>O.ez));return I.map((O,g)=>O.toAffine(U[g])).map(ie.fromAffine)}_setWindowSize(I){this._WINDOW_SIZE=I,Y.delete(this)}assertValidity(){let{a:I,d:U}=e;if(this.is0())throw new Error("bad point: ZERO");let{ex:O,ey:g,ez:M,et:le}=this,ye=y(O*O),pe=y(g*g),_e=y(M*M),He=y(_e*_e),Ue=y(ye*I),St=y(_e*y(Ue+pe)),Xe=y(He+y(U*y(ye*pe)));if(St!==Xe)throw new Error("bad point: equation left != right (1)");let Ce=y(O*g),ar=y(M*le);if(Ce!==ar)throw new Error("bad point: equation left != right (2)")}equals(I){fe(I);let{ex:U,ey:O,ez:g}=this,{ex:M,ey:le,ez:ye}=I,pe=y(U*ye),_e=y(M*g),He=y(O*ye),Ue=y(le*g);return pe===_e&&He===Ue}is0(){return this.equals(ie.ZERO)}negate(){return new ie(y(-this.ex),this.ey,this.ez,y(-this.et))}double(){let{a:I}=e,{ex:U,ey:O,ez:g}=this,M=y(U*U),le=y(O*O),ye=y(Ph*y(g*g)),pe=y(I*M),_e=U+O,He=y(y(_e*_e)-M-le),Ue=pe+le,St=Ue-ye,Xe=pe-le,Ce=y(He*St),ar=y(Ue*Xe),gt=y(He*Xe),nt=y(St*Ue);return new ie(Ce,ar,nt,gt)}add(I){fe(I);let{a:U,d:O}=e,{ex:g,ey:M,ez:le,et:ye}=this,{ex:pe,ey:_e,ez:He,et:Ue}=I;if(U===BigInt(-1)){let Fi=y((M-g)*(_e+pe)),Pt=y((M+g)*(_e-pe)),ot=y(Pt-Fi);if(ot===ri)return this.double();let On=y(le*Ph*Ue),wt=y(ye*Ph*He),Mt=wt+On,mt=Pt+Fi,zt=wt-On,Zt=y(Mt*ot),Kn=y(mt*zt),Ft=y(Mt*zt),Rt=y(ot*mt);return new ie(Zt,Kn,Rt,Ft)}let St=y(g*pe),Xe=y(M*_e),Ce=y(ye*O*Ue),ar=y(le*He),gt=y((g+M)*(pe+_e)-St-Xe),nt=ar-Ce,Yn=ar+Ce,sr=y(Xe-U*St),Bt=y(gt*nt),Xt=y(Yn*sr),Et=y(gt*sr),Gt=y(nt*Yn);return new ie(Bt,Xt,Gt,Et)}subtract(I){return this.add(I.negate())}wNAF(I){return me.wNAFCached(this,Y,I,ie.normalizeZ)}multiply(I){let{p:U,f:O}=this.wNAF(G(I,n));return ie.normalizeZ([U,O])[0]}multiplyUnsafe(I){let U=J(I);return U===ri?he:this.equals(he)||U===ao?this:this.equals(re)?this.wNAF(U).p:me.unsafeLadder(this,U)}isSmallOrder(){return this.multiplyUnsafe(l).is0()}isTorsionFree(){return me.unsafeLadder(this,n).is0()}toAffine(I){let{ex:U,ey:O,ez:g}=this,M=this.is0();I==null&&(I=M?bI:r.inv(g));let le=y(U*I),ye=y(O*I),pe=y(g*I);if(M)return{x:ri,y:ao};if(pe!==ao)throw new Error("invZ was invalid");return{x:le,y:ye}}clearCofactor(){let{h:I}=e;return I===ao?this:this.multiplyUnsafe(I)}static fromHex(I,U=!1){let{d:O,a:g}=e,M=r.BYTES;I=Br("pointHex",I,M);let le=I.slice(),ye=I[M-1];le[M-1]=ye&-129;let pe=ts(le);pe===ri||(U?G(pe,h):G(pe,r.ORDER));let _e=y(pe*pe),He=y(_e-ao),Ue=y(O*_e-g),{isValid:St,value:Xe}=_(He,Ue);if(!St)throw new Error("Point.fromHex: invalid y coordinate");let Ce=(Xe&ao)===ao,ar=(ye&128)!==0;if(!U&&Xe===ri&&ar)throw new Error("Point.fromHex: x=0 and x_0=1");return ar!==Ce&&(Xe=y(-Xe)),ie.fromAffine({x:Xe,y:pe})}static fromPrivateKey(I){return ge(I).point}toRawBytes(){let{x:I,y:U}=this.toAffine(),O=ic(U,r.BYTES);return O[O.length-1]|=I&ao?128:0,O}toHex(){return ca(this.toRawBytes())}}ie.BASE=new ie(e.Gx,e.Gy,ao,y(e.Gx*e.Gy)),ie.ZERO=new ie(ri,ao,ao,ri);let{BASE:re,ZERO:he}=ie,me=Th(ie,u*8);function Re(k){return ir(k,n)}function Oe(k){return Re(ts(k))}function ge(k){let I=u;k=Br("private key",k,I);let U=Br("hashed private key",a(k),2*I),O=V(U.slice(0,I)),g=U.slice(I,2*I),M=Oe(O),le=re.multiply(M),ye=le.toRawBytes();return{head:O,prefix:g,scalar:M,point:le,pointBytes:ye}}function Ze(k){return ge(k).pointBytes}function C(k=new Uint8Array,...I){let U=fa(...I);return Oe(a(R(U,Br("context",k),!!o)))}function m(k,I,U={}){k=Br("message",k),o&&(k=o(k));let{prefix:O,scalar:g,pointBytes:M}=ge(I),le=C(U.context,O,k),ye=re.multiply(le).toRawBytes(),pe=C(U.context,ye,M,k),_e=Re(le+pe*g);J(_e);let He=fa(ye,ic(_e,r.BYTES));return Br("result",He,u*2)}let w=yI;function S(k,I,U,O=w){let{context:g,zip215:M}=O,le=r.BYTES;k=Br("signature",k,2*le),I=Br("message",I),o&&(I=o(I));let ye=ts(k.slice(le,2*le)),pe,_e,He;try{pe=ie.fromHex(U,M),_e=ie.fromHex(k.slice(0,le),M),He=re.multiplyUnsafe(ye)}catch{return!1}if(!M&&pe.isSmallOrder())return!1;let Ue=C(g,_e.toRawBytes(),pe.toRawBytes(),I);return _e.add(pe.multiplyUnsafe(Ue)).subtract(He).clearCofactor().equals(ie.ZERO)}return re._setWindowSize(8),{CURVE:e,getPublicKey:Ze,sign:m,verify:S,ExtendedPoint:ie,utils:{getExtendedPublicKey:ge,randomPrivateKey:()=>s(r.BYTES),precompute(k=8,I=ie.BASE){return I._setWindowSize(k),I.multiply(BigInt(3)),I}}}}var Qy=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),o5=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),vK=BigInt(0),wI=BigInt(1),Jy=BigInt(2),vI=BigInt(5),i5=BigInt(10),_I=BigInt(20),SI=BigInt(40),a5=BigInt(80);function TI(t){let e=Qy,n=t*t%e*t%e,o=Pr(n,Jy,e)*n%e,a=Pr(o,wI,e)*t%e,s=Pr(a,vI,e)*a%e,u=Pr(s,i5,e)*s%e,l=Pr(u,_I,e)*u%e,h=Pr(l,SI,e)*l%e,y=Pr(h,a5,e)*h%e,_=Pr(y,a5,e)*h%e,V=Pr(_,i5,e)*s%e;return{pow_p_5_8:Pr(V,Jy,e)*t%e,b2:n}}function kI(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}function EI(t,e){let r=Qy,n=ir(e*e*e,r),o=ir(n*n*e,r),a=TI(t*o).pow_p_5_8,s=ir(t*n*a,r),u=ir(e*s*s,r),l=s,h=ir(s*o5,r),y=u===t,_=u===ir(-t,r),V=u===ir(-t*o5,r);return y&&(s=l),(_||V)&&(s=h),Z8(s,r)&&(s=ir(-s,r)),{isValid:y||_,value:s}}var pa=Sh(Qy,void 0,!0),$y={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:pa,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:da,randomBytes:lh,adjustScalarBytes:kI,uvRatio:EI},Fu=Mh($y);function s5(t,e,r){if(e.length>255)throw new Error("Context is too big");return uh(gy("SigEd25519 no Ed25519 collisions"),new Uint8Array([r?1:0,e.length]),e,t)}var _K=Mh({...$y,domain:s5}),SK=Mh({...$y,domain:s5,prehash:da});var PI=(pa.ORDER+BigInt(3))/BigInt(8),TK=pa.pow(Jy,PI),kK=pa.sqrt(pa.neg(pa.ONE)),EK=(pa.ORDER-BigInt(5))/BigInt(8),PK=BigInt(486662);var MK=Y8(pa,pa.neg(BigInt(486664)));var AK=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),OK=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),IK=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),VK=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952");var NK=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function uc(t,e){if(!ht||!e&<()){let n=G9(t);return{publicKey:n.slice(32),secretKey:n.slice(0,64)}}let r=Fu.getPublicKey(t);return{publicKey:r,secretKey:Qt([t,r])}}function e1(t,{publicKey:e,secretKey:r},n){if(r){if(!e)throw new Error("Expected a valid publicKey")}else throw new Error("Expected a valid secretKey");let o=K(t),a=r.subarray(0,32);return!ht||!n&<()?Z9(e,a,o):Fu.sign(o,a)}function t1(t,e,r,n){let o=K(t),a=K(r),s=K(e);if(a.length!==32)throw new Error(`Invalid publicKey, received ${a.length}, expected 32`);if(s.length!==64)throw new Error(`Invalid signature, received ${s.length} bytes, expected 64`);try{return!ht||!n&<()?Y9(s,o,a):Fu.verify(s,o,a)}catch{return!1}}var c5=Eh(uc,Yy);var n1=64,MI=32,r1=n1+MI;function Ah(t){let e=K(t);if(e.length!==r1)throw new Error(`Expected keypair with ${r1} bytes, found ${e.length}`);return{publicKey:e.slice(n1,r1),secretKey:e.slice(0,n1)}}function u5({publicKey:t,secretKey:e}){return Ke(e,t).slice()}function Oh(t){return(e,r)=>{if(!ue(r)||r.length!==32)throw new Error("Invalid chainCode passed to derive");return Ah(t(u5(e),r))}}var f5=Oh(t8);var l5=Oh(r8);function d5(t,{chainCode:e,isSoft:r}){return r?l5(t,e):f5(t,e)}var AI={ecdsa:Zy,ed25519:c5,ethereum:Zy,sr25519:d5};function gl(t,e,r){let n=AI[r],o=t;for(let a of e)o=n(o,a);return o}function wl(t){let e=K(t);if(e.length!==32)throw new Error(`Expected a seed matching 32 bytes, found ${e.length}`);return Ah(n8(e))}function o1(t,{publicKey:e,secretKey:r}){if(e?.length!==32)throw new Error("Expected a valid publicKey, 32-bytes");if(r?.length!==64)throw new Error("Expected a valid secretKey, 64-bytes");return o8(e,r,K(t))}function i1(t,e,r){let n=K(r),o=K(e);if(n.length!==32)throw new Error(`Invalid publicKey, received ${n.length} bytes, expected 32`);if(o.length!==64)throw new Error(`Invalid signature, received ${o.length} bytes, expected 64`);return i8(o,K(t),n)}var p5=new Uint8Array;function a1(t,{secretKey:e},r=p5,n=p5){if(e?.length!==64)throw new Error("Invalid secretKey, expected 64-bytes");return a8(e,K(r),K(t),K(n))}var h5=new Uint8Array;function s1(t,e,r,n=h5,o=h5){let a=K(r),s=K(e);if(a.length!==32)throw new Error("Invalid publicKey, expected 32-bytes");if(s.length!==96)throw new Error("Invalid vrfSign output, expected 96 bytes");return s8(a,K(n),K(t),K(o),s)}function ni(t,e=Lu.prefix){let r=tr(t);if(e<0||e>16383||[46,47].includes(e))throw new Error("Out of range ss58Format specified");if(!Lu.allowedDecodedLengths.includes(r.length))throw new Error(`Expected a valid key to convert, with length ${Lu.allowedDecodedLengths.join(", ")}`);let n=Ke(e<64?[e]:[(e&252)>>2|64,e>>8|(e&3)<<6],r);return yy(Ke(n,mh(n).subarray(0,[32,33].includes(r.length)?2:1)))}var[b5,y5,g5]=[[],[],[]],OI=BigInt(0),vl=BigInt(1),II=BigInt(2),VI=BigInt(7),NI=BigInt(256),CI=BigInt(113);for(let t=0,e=vl,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],b5.push(2*(5*n+r)),y5.push((t+1)*(t+2)/2%64);let o=OI;for(let a=0;a<7;a++)e=(e<>VI)*CI)%NI,e&II&&(o^=vl<<(vl<r>32?Ty(t,e,r):_y(t,e,r),x5=(t,e,r)=>r>32?ky(t,e,r):Sy(t,e,r);function UI(t,e=24){let r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let s=0;s<10;s++)r[s]=t[s]^t[s+10]^t[s+20]^t[s+30]^t[s+40];for(let s=0;s<10;s+=2){let u=(s+8)%10,l=(s+2)%10,h=r[l],y=r[l+1],_=m5(h,y,1)^r[u],V=x5(h,y,1)^r[u+1];for(let R=0;R<50;R+=10)t[s+R]^=_,t[s+R+1]^=V}let o=t[2],a=t[3];for(let s=0;s<24;s++){let u=y5[s],l=m5(o,a,u),h=x5(o,a,u),y=b5[s];o=t[y],a=t[y+1],t[y]=l,t[y+1]=h}for(let s=0;s<50;s+=10){for(let u=0;u<10;u++)r[u]=t[s+u];for(let u=0;u<10;u++)t[s+u]^=~r[(u+2)%10]&r[(u+4)%10]}t[0]^=BI[n],t[1]^=RI[n]}r.fill(0)}var Ih=class t extends Ei{constructor(e,r,n,o=!1,a=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=o,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,qr(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Bo(this.state)}keccak(){UI(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){Co(this);let{blockLen:r,state:n}=this;e=en(e);let o=e.length;for(let a=0;a=n&&this.keccak();let s=Math.min(n-this.posOut,a-o);e.set(r.subarray(this.posOut,this.posOut+s),o),this.posOut+=s,o+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return qr(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Ru(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:r,suffix:n,outputLen:o,rounds:a,enableXOF:s}=this;return e||(e=new t(r,n,o,s,a)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=a,e.suffix=n,e.outputLen=o,e.enableXOF=s,e.destroyed=this.destroyed,e}},is=(t,e,r)=>Hu(()=>new Ih(e,t,r)),nQ=is(6,144,224/8),oQ=is(6,136,256/8),iQ=is(6,104,384/8),aQ=is(6,72,512/8),sQ=is(1,144,224/8),w5=is(1,136,256/8),cQ=is(1,104,384/8),v5=is(1,72,512/8),_5=(t,e,r)=>V8((n={})=>new Ih(e,t,n.dkLen===void 0?r:n.dkLen,!0)),uQ=_5(31,168,128/8),fQ=_5(31,136,256/8);var Mi=hh({256:l8,512:d8},{256:w5,512:v5});function _l(t,e,r){return t==="keccak"?Mi(e,void 0,r):kr(e,void 0,void 0,r)}var c1={chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",coder:P8,type:"base64",withPadding:!0},S5=ah(c1);var u1=oh(c1,S5),f1=ih(c1);function Sl(t,e){if(![33,65].includes(t.length))throw new Error(`Invalid publicKey provided, received ${t.length} bytes input`);return t.length===33?t:!ht||!e&<()?J9(t):ei.ProjectivePoint.fromHex(t).toRawBytes(!0)}function fc(t,e){if(![33,65].includes(t.length))throw new Error(`Invalid publicKey provided, received ${t.length} bytes input`);if(t.length===65)return t.subarray(1);if(!ht||!e&<())return Q9(t).subarray(1);let{px:r,py:n}=ei.ProjectivePoint.fromHex(t);return Ke($t(r,ia),$t(n,ia))}function T5(t,e,r,n="blake2",o){let a=K(e).subarray(0,64),s=K(t),u=!ht||!o&<()?$9(s,a,r):ei.Signature.fromCompact(a).addRecoveryBit(r).recoverPublicKey(s).toRawBytes();if(!u)throw new Error("Unable to recover publicKey from signature");return n==="keccak"?fc(u,o):Sl(u,o)}function Vh(t,{secretKey:e},r="blake2",n){if(e?.length!==32)throw new Error("Expected valid secp256k1 secretKey, 32-bytes");let o=_l(r,t,n);if(!ht||!n&<())return e8(o,e);let a=ei.sign(o,e,{lowS:!0});return Ke($t(a.r,ia),$t(a.s,ia),new Uint8Array([a.recovery||0]))}var k5="ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141".replace(/ /g,""),l1=Ie(`0x${k5}`),d1=new be.default(k5,"hex");function HI(t,e){let r=ku(e,By);if(r>=l1)throw new Error("Tweak parameter is out of range");if(r+=ku(t,By),r>=l1&&(r-=l1),r===Ga)throw new Error("Invalid resulting private key");return Zb(r,ia)}function LI(t,e){let r=new be.default(e);if(r.cmp(d1)>=0)throw new Error("Tweak parameter is out of range");if(r.iadd(new be.default(t)),r.cmp(d1)>=0&&r.isub(d1),r.isZero())throw new Error("Invalid resulting private key");return $t(r,ia)}function p1(t,e,r){if(!ue(t)||t.length!==32)throw new Error("Expected seckey to be an Uint8Array with length 32");if(!ue(e)||e.length!==32)throw new Error("Expected tweak to be an Uint8Array with length 32");return!ht||r?LI(t,e):HI(t,e)}function E5(t,e,r,n="blake2",o){let a=K(e);if(a.length!==65)throw new Error(`Expected signature with 65 bytes, ${a.length} found instead`);let s=T5(_l(n,t),a,a[64],n,o),u=_l(n,s,o),l=K(r);return Lr(s,l)||(n==="keccak"?Lr(u.slice(-20),l.slice(-20)):Lr(u,l))}function DI(t){return[33,65].includes(t.length)&&(t=Mi(fc(t))),t.slice(-20)}function lc(t){if(!t)return"0x";let e=K(t);if(![20,32,33,65].includes(e.length))throw new Error(`Invalid address or publicKey provided, received ${e.length} bytes input`);let r=Te(DI(e),-1,!1),n=Te(Mi(r),-1,!1),o="";for(let a=0;a<40;a++)o=`${o}${parseInt(n[a],16)>7?r[a].toUpperCase():r[a]}`;return`0x${o}`}function zI(t,e){return t!==(e>7?t.toUpperCase():t.toLowerCase())}function P5(t){let e=t.replace("0x",""),r=Te(Mi(e.toLowerCase()),-1,!1);for(let n=0;n<40;n++)if(zI(e[n],parseInt(r[n],16)))return!1;return!0}function h1(t){return!t||t.length!==42||!Ae(t)?!1:/^(0x)?[0-9a-f]{40}$/.test(t)||/^(0x)?[0-9A-F]{40}$/.test(t)?!0:P5(t)}var FI={256:aa,512:da},qI={256:u8,512:f8};function Nh(t,e,r=256,n){let o=K(t);return!ht||!n&<()?qI[r](o,e):cc(FI[r],o,e)}function M5(t){if(!t.startsWith("m/"))return!1;let e=t.split("/").slice(1);for(let r of e){let n=/^\d+'?$/.test(r)?parseInt(r.replace(/'$/,""),10):Number.NaN;if(isNaN(n)||n>=2147483648||n<0)return!1}return!0}var WI=yt("Bitcoin seed");function O5(t,e){return{chainCode:e,publicKey:ti(t).publicKey,secretKey:t}}function I5(t,e){let r=$t(e,L8),n=e>=2147483648?Ke(new Uint8Array(1),t.secretKey,r):Ke(t.publicKey,r);try{let o=Nh(t.chainCode,n,512);return O5(p1(t.secretKey,o.slice(0,32)),o.slice(32))}catch{return I5(t,e+1)}}function m1(t,e=""){let r=Nh(WI,t,512),n=O5(r.slice(0,32),r.slice(32));if(!e||e==="m"||e==="M"||e==="m'"||e==="M'")return n;if(!M5(e))throw new Error("Invalid derivation path");let o=e.split("/").slice(1);for(let a of o)n=I5(n,parseInt(a,10)+(a.length>1&&a.endsWith("'")?2147483648:0));return n}function XI(t,e,r,n){sh(t);let o=fh({dkLen:32,asyncTick:10},n),{c:a,dkLen:s,asyncTick:u}=o;if(qr(a),qr(s),qr(u),a<1)throw new Error("PBKDF2: iterations (c) should be >= 1");let l=en(e),h=en(r),y=new Uint8Array(s),_=cc.create(t,l),V=_._cloneInto().update(h);return{c:a,dkLen:s,asyncTick:u,DK:y,PRF:_,PRFSalt:V}}function GI(t,e,r,n,o){return t.destroy(),e.destroy(),n&&n.destroy(),o.fill(0),r}function Tl(t,e,r,n){let{c:o,dkLen:a,DK:s,PRF:u,PRFSalt:l}=XI(t,e,r,n),h,y=new Uint8Array(4),_=Uu(y),V=new Uint8Array(u.outputLen);for(let R=1,B=0;Be.toString(2).padStart(8,"0")).join("")}function QI(t){return JI(Array.from(x1(t))).slice(0,t.length*8/32)}function y1(t,e){return kl(yt(b1(t)),yt(`mnemonic${b1(e)}`)).password}function g1(t,e=N5){let r=b1(t).split(" ");if(r.length%3!==0)throw new Error(C5);let n=r.map(y=>{let _=e.indexOf(y);if(_===-1)throw new Error(C5);return _.toString(2).padStart(11,"0")}).join(""),o=Math.floor(n.length/33)*32,a=n.slice(0,o),s=n.slice(o),l=a.match(/(.{1,8})/g)?.map(KI);if(!l||l.length%4!==0||l.length<16||l.length>32)throw new Error(ZI);let h=K(l);if(QI(h)!==s)throw new Error(YI);return h}function B5(t,e){try{g1(t,e)}catch{return!1}return!0}function R5(t,e,r){return!ht||!e&&!r&<()?q9(t):g1(t,e)}function Ch(t,e,r){return!ht||!e&&!r&<()?X9(t):B5(t,e)}function w1(t,e="",r,n=32){if(Ch(t)){if(![32,64].includes(n))throw new Error(`Invalid seed length ${n}, expected 32 or 64`)}else throw new Error("Invalid bip39 mnemonic specified");return n===32?!ht||!r&<()?j9(t,e):y1(t,e).subarray(0,32):y1(t,e)}function v1(t,e="",r,n){if(Ch(t,r,n)){if(!r&&!n&<())return W9(t,e)}else throw new Error("Invalid bip39 mnemonic specified");let o=R5(t,r),a=yt(`mnemonic${e}`);return kl(o,a).password.slice(0,32)}function Bh(t,e){return t<>>32-e}function qu(t,e){let r=t[e+3]&255;return r=r<<8|t[e+2]&255,r=r<<8|t[e+1]&255,r<<8|t[e+0]&255}function _1(t,e,r){for(let n=0;n<4;n++)t[e+n]=r&255,r>>>=8}function $I(t,e,r,n,o){let a=0;for(let s=0;s>>8)-1}function T1(t,e,r,n,o){let a=new Uint32Array(16),s=new Uint32Array(16),u=new Uint32Array(16),l=new Uint32Array(4),h,y,_;for(h=0;h<4;h++)s[5*h]=qu(n,4*h),s[1+h]=qu(r,4*h),s[6+h]=qu(e,4*h),s[11+h]=qu(r,16+4*h);for(h=0;h<16;h++)u[h]=s[h];for(h=0;h<20;h++){for(y=0;y<4;y++){for(_=0;_<4;_++)l[_]=s[(5*y+4*_)%16];for(l[1]^=Bh(l[0]+l[3]|0,7),l[2]^=Bh(l[1]+l[0]|0,9),l[3]^=Bh(l[2]+l[1]|0,13),l[0]^=Bh(l[3]+l[2]|0,18),_=0;_<4;_++)a[4*y+(y+_)%4]=l[_]}for(_=0;_<16;_++)s[_]=a[_]}if(o){for(h=0;h<16;h++)s[h]=s[h]+u[h]|0;for(h=0;h<4;h++)s[5*h]=s[5*h]-qu(n,4*h)|0,s[6+h]=s[6+h]-qu(e,4*h)|0;for(h=0;h<4;h++)_1(t,4*h,s[5*h]),_1(t,16+4*h,s[6+h])}else for(h=0;h<16;h++)_1(t,4*h,s[h]+u[h]|0)}var k1=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function eV(t,e,r,n,o,a,s){let u=new Uint8Array(16),l=new Uint8Array(64),h,y;if(!o)return 0;for(y=0;y<16;y++)u[y]=0;for(y=0;y<8;y++)u[y]=a[y];for(;o>=64;){for(T1(l,u,s,k1,!1),y=0;y<64;y++)t[e+y]=(r?r[n+y]:0)^l[y];for(h=1,y=8;y<16;y++)h=h+(u[y]&255)|0,u[y]=h&255,h>>>=8;o-=64,e+=64,r&&(n+=64)}if(o>0)for(T1(l,u,s,k1,!1),y=0;y>>=8}var tV=new Uint32Array([5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252]);function U5(t,e,r,n,o,a){let s,u,l,h=new Uint32Array(17),y=new Uint32Array(17),_=new Uint32Array(17),V=new Uint32Array(17),R=new Uint32Array(17);for(u=0;u<17;u++)y[u]=_[u]=0;for(u=0;u<16;u++)y[u]=a[u];for(y[3]&=15,y[4]&=252,y[7]&=15,y[8]&=252,y[11]&=15,y[12]&=252,y[15]&=15;o>0;){for(u=0;u<17;u++)V[u]=0;for(u=0;u<16&&u>>=8;for(l=l+_[16]|0,_[16]=l&3,l=5*(l>>>2)|0,u=0;u<16;u++)l=l+_[u]|0,_[u]=l&255,l>>>=8;l=l+_[16]|0,_[16]=l}for(u=0;u<17;u++)R[u]=_[u];S1(_,tV);let B=-(_[16]>>>7)|0;for(u=0;u<17;u++)_[u]^=B&(R[u]^_[u]);for(u=0;u<16;u++)V[u]=a[u+16];for(V[16]=0,S1(_,V),u=0;u<16;u++)t[e+u]=_[u];return 0}function rV(t,e,r,n,o,a){let s=new Uint8Array(16);return U5(s,0,r,n,o,a),$I(t,e,s,0,16)}function nV(t,e,r,n,o){if(r<32)return-1;E1(t,0,e,0,r,n,o),U5(t,16,t,32,r-32,t);for(let a=0;a<16;a++)t[a]=0;return 0}function oV(t,e,r,n,o){let a=new Uint8Array(32);if(r<32||(E1(a,0,null,0,32,n,o),rV(e,16,e,32,r-32,a)!==0))return-1;E1(t,0,e,0,r,n,o);for(let s=0;s<32;s++)t[s]=0;return 0}var iV=32,aV=24,P1=32,M1=16;function H5(t,e){if(t.length!==iV)throw new Error("bad key size");if(e.length!==aV)throw new Error("bad nonce size")}function L5(...t){for(let e=0,r=t.length;et<>>32-e;function F5(t,e,r,n,o,a){let s=t[e++]^r[n++],u=t[e++]^r[n++],l=t[e++]^r[n++],h=t[e++]^r[n++],y=t[e++]^r[n++],_=t[e++]^r[n++],V=t[e++]^r[n++],R=t[e++]^r[n++],B=t[e++]^r[n++],L=t[e++]^r[n++],Z=t[e++]^r[n++],G=t[e++]^r[n++],J=t[e++]^r[n++],Y=t[e++]^r[n++],fe=t[e++]^r[n++],ie=t[e++]^r[n++],re=s,he=u,me=l,Re=h,Oe=y,ge=_,Ze=V,C=R,m=B,w=L,S=Z,E=G,k=J,I=Y,U=fe,O=ie;for(let g=0;g<8;g+=2)Oe^=It(re+k|0,7),m^=It(Oe+re|0,9),k^=It(m+Oe|0,13),re^=It(k+m|0,18),w^=It(ge+he|0,7),I^=It(w+ge|0,9),he^=It(I+w|0,13),ge^=It(he+I|0,18),U^=It(S+Ze|0,7),me^=It(U+S|0,9),Ze^=It(me+U|0,13),S^=It(Ze+me|0,18),Re^=It(O+E|0,7),C^=It(Re+O|0,9),E^=It(C+Re|0,13),O^=It(E+C|0,18),he^=It(re+Re|0,7),me^=It(he+re|0,9),Re^=It(me+he|0,13),re^=It(Re+me|0,18),Ze^=It(ge+Oe|0,7),C^=It(Ze+ge|0,9),Oe^=It(C+Ze|0,13),ge^=It(Oe+C|0,18),E^=It(S+w|0,7),m^=It(E+S|0,9),w^=It(m+E|0,13),S^=It(w+m|0,18),k^=It(O+U|0,7),I^=It(k+O|0,9),U^=It(I+k|0,13),O^=It(U+I|0,18);o[a++]=s+re|0,o[a++]=u+he|0,o[a++]=l+me|0,o[a++]=h+Re|0,o[a++]=y+Oe|0,o[a++]=_+ge|0,o[a++]=V+Ze|0,o[a++]=R+C|0,o[a++]=B+m|0,o[a++]=L+w|0,o[a++]=Z+S|0,o[a++]=G+E|0,o[a++]=J+k|0,o[a++]=Y+I|0,o[a++]=fe+U|0,o[a++]=ie+O|0}function I1(t,e,r,n,o){let a=n+0,s=n+16*o;for(let u=0;u<16;u++)r[s+u]=t[e+(2*o-1)*16+u];for(let u=0;u0&&(s+=16),F5(r,a,t,e+=16,r,s)}function sV(t,e,r){let n=fh({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:o,r:a,p:s,dkLen:u,asyncTick:l,maxmem:h,onProgress:y}=n;if(qr(o),qr(a),qr(s),qr(u),qr(l),qr(h),y!==void 0&&typeof y!="function")throw new Error("progressCb should be function");let _=128*a,V=_/4;if(o<=1||o&o-1||o>=2**(_/8)||o>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(s<0||s>(2**32-1)*32/_)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(u<0||u>(2**32-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");let R=_*(o+s);if(R>h)throw new Error(`Scrypt: parameters too large, ${R} (128 * r * (N + p)) > ${h} (maxmem)`);let B=Tl(aa,t,e,{c:1,dkLen:_*s}),L=Bo(B),Z=Bo(new Uint8Array(_*o)),G=Bo(new Uint8Array(_)),J=()=>{};if(y){let Y=2*o*s,fe=Math.max(Math.floor(Y/1e4),1),ie=0;J=()=>{ie++,y&&(!(ie%fe)||ie===Y)&&y(ie/Y)}}return{N:o,r:a,p:s,dkLen:u,blockSize32:V,V:Z,B32:L,B,tmp:G,blockMixCb:J,asyncTick:l}}function cV(t,e,r,n,o){let a=Tl(aa,t,r,{c:1,dkLen:e});return r.fill(0),n.fill(0),o.fill(0),a}function q5(t,e,r){let{N:n,r:o,p:a,dkLen:s,blockSize32:u,V:l,B32:h,B:y,tmp:_,blockMixCb:V}=sV(t,e,r);for(let R=0;R(e,r,n)=>E5(e,r,n,t),Z5=[["ecdsa",G5("blake2")],["ethereum",G5("keccak")]],fV=[["ed25519",t1],["sr25519",i1],...Z5],lV=["ed25519","sr25519","ecdsa"];function Y5(t,{message:e,publicKey:r,signature:n},o=fV){return t.isValid=o.some(([a,s])=>{try{if(s(e,n,r))return t.crypto=a,!0}catch{}return!1}),t}function dV(t,{message:e,publicKey:r,signature:n}){if(![0,1,2].includes(n[0]))throw new Error(`Unknown crypto type, expected signature prefix [0..2], found ${n[0]}`);let o=lV[n[0]]||"none";t.crypto=o;try{t.isValid={ecdsa:()=>Y5(t,{message:e,publicKey:r,signature:n.subarray(1)},Z5).isValid,ed25519:()=>t1(e,n.subarray(1),r),none:()=>{throw Error("no verify for `none` crypto type")},sr25519:()=>i1(e,n.subarray(1),r)}[o]()}catch{}return t}function pV(t){return[0,1,2].includes(t[0])&&[65,66].includes(t.length)?dV:Y5}function Uh(t,e,r){let n=K(e);if(![64,65,66].includes(n.length))throw new Error(`Invalid signature length, expected [64..66] bytes, found ${n.length}`);let o=tr(r),a={message:K(t),publicKey:o,signature:n},s={crypto:"none",isValid:!1,isWrapped:Mu(a.message,!0),publicKey:o},u=Mu(a.message,!1),l=pV(n);return l(s,a),s.crypto!=="none"||s.isWrapped&&!u?s:(a.message=u?Xb(a.message):Gb(a.message),l(s,a))}var En=Ie("11400714785074694791"),Ai=Ie("14029467366897019727"),K5=Ie("1609587929392839161"),Pl=Ie("9650029242287828579"),J5=Ie("2870177450012600261"),ha=Ie("0xffffffffffffffff"),hV=Ie(7),mV=Ie(11),xV=Ie(12),bV=Ie(16),yV=Ie(18),gV=Ie(23),wV=Ie(27),vV=Ie(29),ju=Ie(31),_V=Ie(32),SV=Ie(33),TV=Ie(64),Q5=Ie(256);function so(t,e){let r=t&ha;return(r<>TV-e)&ha}function R1(t,e,r){let n=new Array(r),o=0;for(let s=0;s=0;s--)a=(a<=0){let a=s=>En*so(s+Ai*R1(e,o,4),ju);do r.v1=a(r.v1),o+=8,r.v2=a(r.v2),o+=8,r.v3=a(r.v3),o+=8,r.v4=a(r.v4),o+=8;while(o<=n)}return o=32?((((so(a,Za)+so(s,hV)+so(u,xV)+so(l,yV)^En*so(a*Ai,ju))*En+Pl^En*so(s*Ai,ju))*En+Pl^En*so(u*Ai,ju))*En+Pl^En*so(l*Ai,ju))*En+Pl:r+J5);for(;h<=o-8;)y=ha&Pl+En*so(y^En*so(Ai*R1(n,h,4),ju),wV),h+=8;for(h+4<=o&&(y=ha&K5+Ai*so(y^En*R1(n,h,2),gV),h+=4);h>SV),y=ha&K5*(y^y>>vV),y=ha&(y^y>>_V);let _=new Uint8Array(8);for(let V=7;V>=0;V--)_[V]=Number(y%Q5),y=y/Q5;return _}function ma(t,e=64,r){let n=Math.ceil(e/64),o=K(t);if(!ht||!r&<())return b8(o,n);let a=new Uint8Array(n*8);for(let s=0;sVh(t,e,"blake2"),ed25519:e1,ethereum:(t,e)=>Vh(t,e,"keccak"),sr25519:o1},Hh={ecdsa:t=>t.length>32?kr(t):t,ed25519:t=>t,ethereum:t=>t.length===20?t:Mi(fc(t)),sr25519:t=>t};function Al(t){return!t||al(t)}function sw(t,e,r){return kr(Ke(e||"",r||"",t))}function dc({toSS58:t,type:e},{publicKey:r,secretKey:n},o={},a=null,s){let u=(y,_)=>{let V=rw(y,_||a,s);if(V.secretKey.length===64)r=V.publicKey,n=V.secretKey;else{let R=PV[e](V.secretKey);r=R.publicKey,n=R.secretKey}},l=y=>(Al(n)&&a&&u(y,a),a=nw({publicKey:r,secretKey:n},y),s=void 0,a),h=()=>{let y=Hh[e](r);return e==="ethereum"?lc(y):t(y)};return{get address(){return h()},get addressRaw(){let y=Hh[e](r);return e==="ethereum"?y.slice(-20):y},get isLocked(){return Al(n)},get meta(){return o},get publicKey(){return r},get type(){return e},decodePkcs8:u,derive:(y,_)=>{if(e==="ethereum")throw new Error("Unable to derive on this keypair");if(Al(n))throw new Error("Cannot derive on a locked keypair");let{path:V}=xl(y),R=gl({publicKey:r,secretKey:n},V,e);return dc({toSS58:t,type:e},R,_,null)},encodePkcs8:y=>l(y),lock:()=>{n=new Uint8Array},setMeta:y=>{o=ne({},o,y)},sign:(y,_={})=>{if(Al(n))throw new Error("Cannot sign with a locked key pair");return Ke(_.withType?iw[e]:EV,aw[e](K(y),{publicKey:r,secretKey:n}))},toJson:y=>{let _=["ecdsa","ethereum"].includes(e)?r.length===20?Te(r):Te(Sl(r)):h();return ow(e,{address:_,meta:o},l(y),!!y)},unlock:y=>u(y),verify:(y,_,V)=>Uh(y,_,Hh[e](K(V))).isValid,vrfSign:(y,_,V)=>{if(Al(n))throw new Error("Cannot sign with a locked key pair");if(e==="sr25519")return a1(y,{secretKey:n},_,V);let R=aw[e](K(y),{publicKey:r,secretKey:n});return Ke(sw(R,_,V),R)},vrfVerify:(y,_,V,R,B)=>e==="sr25519"?s1(y,_,r,R,B):Uh(y,Ke(iw[e],_.subarray(32)),Hh[e](K(V))).isValid&&Lr(_.subarray(0,32),sw(_.subarray(32),R,B))}}var cw="bottom drive obey lake curtain smoke basket hold race lonely fit walk";var Lh=class{__internal__map={};add(e){return this.__internal__map[tr(e.address).toString()]=e,e}all(){return Object.values(this.__internal__map)}get(e){let r=this.__internal__map[tr(e).toString()];if(!r)throw new Error(`Unable to retrieve keypair '${ue(e)||Ae(e)?Te(K(e)):e}'`);return r}remove(e){delete this.__internal__map[tr(e).toString()]}};var H1={ecdsa:t=>ti(t),ed25519:t=>uc(t),ethereum:t=>ti(t),sr25519:t=>wl(t)};function MV({publicKey:t}){return t}var Gu=class{__internal__pairs;__internal__type;__internal__ss58;decodeAddress=tr;constructor(e={}){if(e.type=e.type||"ed25519",!["ecdsa","ethereum","ed25519","sr25519"].includes(e.type||"undefined"))throw new Error(`Expected a keyring type of either 'ed25519', 'sr25519', 'ethereum' or 'ecdsa', found '${e.type||"unknown"}`);this.__internal__pairs=new Lh,this.__internal__ss58=e.ss58Format,this.__internal__type=e.type}get pairs(){return this.getPairs()}get publicKeys(){return this.getPublicKeys()}get type(){return this.__internal__type}addPair(e){return this.__internal__pairs.add(e)}addFromAddress(e,r={},n=null,o=this.type,a,s){let u=this.decodeAddress(e,a);return this.addPair(dc({toSS58:this.encodeAddress,type:o},{publicKey:u,secretKey:new Uint8Array},r,n,s))}addFromJson(e,r){return this.addPair(this.createFromJson(e,r))}addFromMnemonic(e,r={},n=this.type){return this.addFromUri(e,r,n)}addFromPair(e,r={},n=this.type){return this.addPair(this.createFromPair(e,r,n))}addFromSeed(e,r={},n=this.type){return this.addPair(dc({toSS58:this.encodeAddress,type:n},H1[n](e),r,null))}addFromUri(e,r={},n=this.type){return this.addPair(this.createFromUri(e,r,n))}createFromJson({address:e,encoded:r,encoding:{content:n,type:o,version:a},meta:s},u){if(a==="3"&&n[0]!=="pkcs8")throw new Error(`Unable to decode non-pkcs8 type, [${n.join(",")}] found}`);let l=a==="0"||!Array.isArray(n)?this.type:n[1],h=Array.isArray(o)?o:[o];if(!["ed25519","sr25519","ecdsa","ethereum"].includes(l))throw new Error(`Unknown crypto type ${l}`);let y=Ae(e)?jt(e):this.decodeAddress(e,u),_=Ae(r)?jt(r):u1(r);return dc({toSS58:this.encodeAddress,type:l},{publicKey:y,secretKey:new Uint8Array},s,_,h)}createFromPair(e,r={},n=this.type){return dc({toSS58:this.encodeAddress,type:n},e,r,null)}createFromUri(e,r={},n=this.type){let o=e.startsWith("//")?`${cw}${e}`:e,{derivePath:a,password:s,path:u,phrase:l}=Ry(o),h,y=Ae(l,256);if(y)h=jt(l);else{let V=l.split(" ");if([12,15,18,21,24].includes(V.length))h=n==="ethereum"?w1(l,"",!1,64):v1(l,s);else{if(l.length>32)throw new Error("specified phrase is not a valid mnemonic and is invalid as a raw seed at > 32 bytes");h=yt(l.padEnd(32))}}let _=n==="ethereum"?y?H1[n](h):m1(h,a.substring(1)):gl(H1[n](h),u,n);return dc({toSS58:this.encodeAddress,type:n},_,r,null)}encodeAddress=(e,r)=>this.type==="ethereum"?lc(e):ni(e,r??this.__internal__ss58);getPair(e){return this.__internal__pairs.get(e)}getPairs(){return this.__internal__pairs.all()}getPublicKeys(){return this.__internal__pairs.all().map(MV)}removePair(e){this.__internal__pairs.remove(e)}setSS58Format(e){this.__internal__ss58=e}toJson(e,r){return this.__internal__pairs.get(e).toJson(r)}};var uw=-99999;function Ol(t,e,r){Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:r})}var Il=class extends Error{code;data;message;name;stack;constructor(e="",r=uw,n){if(super(),Ol(this,"message",String(e)),Ol(this,"name",this.constructor.name),Ol(this,"data",n),Ol(this,"code",r),we(Error.captureStackTrace))Error.captureStackTrace(this,this.constructor);else{let{stack:o}=new Error(e);o&&Ol(this,"stack",o)}}static CODES={ASSERT:-90009,INVALID_JSONRPC:-99998,METHOD_NOT_FOUND:-32601,UNKNOWN:uw}};function AV(t){if(Qe(t))return"";let e=`: ${qe(t)?t.replace(/Error\("/g,"").replace(/\("/g,"(").replace(/"\)/g,")").replace(/\(/g,", ").replace(/\)/g,""):Le(t)}`;return e.length<=256?e:`${e.substring(0,255)}\u2026`}function fw(t){if(t){let{code:e,data:r,message:n}=t;throw new Il(`${e}: ${n}${AV(r)}`,e,r)}}var Dh=class{__internal__id=0;decodeResponse(e){if(!e||e.jsonrpc!=="2.0")throw new Error("Invalid jsonrpc field in decoded object");let r=!Qe(e.params)&&!Qe(e.method);if(!De(e.id)&&(!r||!De(e.params.subscription)&&!qe(e.params.subscription)))throw new Error("Invalid id field in decoded object");if(fw(e.error),e.result===void 0&&!r)throw new Error("No result found in jsonrpc response");return r?(fw(e.params.error),e.params.result):e.result}encodeJson(e,r){let[n,o]=this.encodeObject(e,r);return[n,Le(o)]}encodeObject(e,r){let n=++this.__internal__id;return[n,{id:n,jsonrpc:"2.0",method:e,params:r}]}};var OV="http://127.0.0.1:9933",IV="ws://127.0.0.1:9944",lw={HTTP_URL:OV,WS_URL:IV};var zh=class{key;next;prev;constructor(e){this.key=e,this.next=this.prev=this}},Fh=class{capacity;__internal__data=new Map;__internal__refs=new Map;__internal__length=0;__internal__head;__internal__tail;constructor(e=128){this.capacity=e,this.__internal__head=this.__internal__tail=new zh("")}get length(){return this.__internal__length}get lengthData(){return this.__internal__data.size}get lengthRefs(){return this.__internal__refs.size}entries(){let e=this.keys(),r=e.length,n=new Array(r);for(let o=0;o=0&&t<=999)return"(Unused)";if(t>=1016){if(t<=1999)return"(For WebSocket standard)";if(t<=2999)return"(For WebSocket extensions)";if(t<=3999)return"(For libraries and frameworks)";if(t<=4999)return"(For applications)"}return CV[t]||"(Unknown)"}var RV={chain_finalisedHead:"chain_finalizedHead",chain_subscribeFinalisedHeads:"chain_subscribeFinalizedHeads",chain_unsubscribeFinalisedHeads:"chain_unsubscribeFinalizedHeads"},UV=2500,HV=60*1e3,LV=5e3,co=Tr("api-ws");function mw(t,e){Object.keys(t).forEach(r=>{e&&e(t[r]),delete t[r]})}function D1(){return{bytesRecv:0,bytesSent:0,cached:0,errors:0,requests:0,subscriptions:0,timeout:0}}var ss=class t{__internal__callCache;__internal__coder;__internal__endpoints;__internal__headers;__internal__eventemitter;__internal__handlers={};__internal__isReadyPromise;__internal__stats;__internal__waitingForId={};__internal__autoConnectMs;__internal__endpointIndex;__internal__endpointStats;__internal__isConnected=!1;__internal__subscriptions={};__internal__timeoutId=null;__internal__websocket;__internal__timeout;constructor(e=lw.WS_URL,r=UV,n={},o,a){let s=Array.isArray(e)?e:[e];if(s.length===0)throw new Error("WsProvider requires at least one Endpoint");s.forEach(u=>{if(!/^(wss|ws):\/\//.test(u))throw new Error(`Endpoint should start with 'ws://', received '${u}'`)}),this.__internal__callCache=new Fh(a||128),this.__internal__eventemitter=new Nl.default,this.__internal__autoConnectMs=r||0,this.__internal__coder=new Dh,this.__internal__endpointIndex=-1,this.__internal__endpoints=s,this.__internal__headers=n,this.__internal__websocket=null,this.__internal__stats={active:{requests:0,subscriptions:0},total:D1()},this.__internal__endpointStats=D1(),this.__internal__timeout=o||HV,r&&r>0&&this.connectWithRetry().catch(Fn),this.__internal__isReadyPromise=new Promise(u=>{this.__internal__eventemitter.once("connected",()=>{u(this)})})}get hasSubscriptions(){return!0}get isClonable(){return!0}get isConnected(){return this.__internal__isConnected}get isReady(){return this.__internal__isReadyPromise}get endpoint(){return this.__internal__endpoints[this.__internal__endpointIndex]}clone(){return new t(this.__internal__endpoints)}selectEndpointIndex(e){return(this.__internal__endpointIndex+1)%e.length}async connect(){if(this.__internal__websocket)throw new Error("WebSocket is already connected");try{this.__internal__endpointIndex=this.selectEndpointIndex(this.__internal__endpoints),this.__internal__websocket=typeof Jr.WebSocket<"u"&&ny(Jr.WebSocket,Wh)?new Wh(this.endpoint):new Wh(this.endpoint,void 0,{headers:this.__internal__headers}),this.__internal__websocket&&(this.__internal__websocket.onclose=this.__internal__onSocketClose,this.__internal__websocket.onerror=this.__internal__onSocketError,this.__internal__websocket.onmessage=this.__internal__onSocketMessage,this.__internal__websocket.onopen=this.__internal__onSocketOpen),this.__internal__timeoutId=setInterval(()=>this.__internal__timeoutHandlers(),LV)}catch(e){throw co.error(e),this.__internal__emit("error",e),e}}async connectWithRetry(){if(this.__internal__autoConnectMs>0)try{await this.connect()}catch{setTimeout(()=>{this.connectWithRetry().catch(Fn)},this.__internal__autoConnectMs)}}async disconnect(){this.__internal__autoConnectMs=0;try{this.__internal__websocket&&this.__internal__websocket.close(1e3)}catch(e){throw co.error(e),this.__internal__emit("error",e),e}}get stats(){return{active:{requests:Object.keys(this.__internal__handlers).length,subscriptions:Object.keys(this.__internal__subscriptions).length},total:this.__internal__stats.total}}get endpointStats(){return this.__internal__endpointStats}on(e,r){return this.__internal__eventemitter.on(e,r),()=>{this.__internal__eventemitter.removeListener(e,r)}}send(e,r,n,o){this.__internal__endpointStats.requests++,this.__internal__stats.total.requests++;let[a,s]=this.__internal__coder.encodeJson(e,r),u=n?this.__internal__callCache.get(s):null;return u?(this.__internal__endpointStats.cached++,this.__internal__stats.total.cached++):(u=this.__internal__send(a,s,e,r,o),n&&this.__internal__callCache.set(s,u)),u}async __internal__send(e,r,n,o,a){return new Promise((s,u)=>{try{if(!this.isConnected||this.__internal__websocket===null)throw new Error("WebSocket is not connected");let l=(y,_)=>{y?u(y):s(_)};co.debug(()=>["calling",n,r]),this.__internal__handlers[e]={callback:l,method:n,params:o,start:Date.now(),subscription:a};let h=r.length;this.__internal__endpointStats.bytesSent+=h,this.__internal__stats.total.bytesSent+=h,this.__internal__websocket.send(r)}catch(l){this.__internal__endpointStats.errors++,this.__internal__stats.total.errors++,u(l)}})}subscribe(e,r,n,o){return this.__internal__endpointStats.subscriptions++,this.__internal__stats.total.subscriptions++,this.send(r,n,!1,{callback:o,type:e})}async unsubscribe(e,r,n){let o=`${e}::${n}`;if(Qe(this.__internal__subscriptions[o]))return co.debug(()=>`Unable to find active subscription=${o}`),!1;delete this.__internal__subscriptions[o];try{return this.isConnected&&!io(this.__internal__websocket)?this.send(r,[n]):!0}catch{return!1}}__internal__emit=(e,...r)=>{this.__internal__eventemitter.emit(e,...r)};__internal__onSocketClose=e=>{let r=new Error(`disconnected from ${this.endpoint}: ${e.code}:: ${e.reason||hw(e.code)}`);this.__internal__autoConnectMs>0&&co.error(r.message),this.__internal__isConnected=!1,this.__internal__websocket&&(this.__internal__websocket.onclose=null,this.__internal__websocket.onerror=null,this.__internal__websocket.onmessage=null,this.__internal__websocket.onopen=null,this.__internal__websocket=null),this.__internal__timeoutId&&(clearInterval(this.__internal__timeoutId),this.__internal__timeoutId=null),mw(this.__internal__handlers,n=>{try{n.callback(r,void 0)}catch(o){co.error(o)}}),mw(this.__internal__waitingForId),this.__internal__endpointStats=D1(),this.__internal__emit("disconnected"),this.__internal__autoConnectMs>0&&setTimeout(()=>{this.connectWithRetry().catch(Fn)},this.__internal__autoConnectMs)};__internal__onSocketError=e=>{co.debug(()=>["socket error",e]),this.__internal__emit("error",e)};__internal__onSocketMessage=e=>{co.debug(()=>["received",e.data]);let r=e.data.length;this.__internal__endpointStats.bytesRecv+=r,this.__internal__stats.total.bytesRecv+=r;let n=JSON.parse(e.data);return Qe(n.method)?this.__internal__onSocketMessageResult(n):this.__internal__onSocketMessageSubscribe(n)};__internal__onSocketMessageResult=e=>{let r=this.__internal__handlers[e.id];if(!r){co.debug(()=>`Unable to find handler for id=${e.id}`);return}try{let{method:n,params:o,subscription:a}=r,s=this.__internal__coder.decodeResponse(e);if(r.callback(null,s),a){let u=`${a.type}::${s}`;this.__internal__subscriptions[u]=ne({},a,{method:n,params:o}),this.__internal__waitingForId[u]&&this.__internal__onSocketMessageSubscribe(this.__internal__waitingForId[u])}}catch(n){this.__internal__endpointStats.errors++,this.__internal__stats.total.errors++,r.callback(n,void 0)}delete this.__internal__handlers[e.id]};__internal__onSocketMessageSubscribe=e=>{if(!e.method)throw new Error("No method found in JSONRPC response");let n=`${RV[e.method]||e.method}::${e.params.subscription}`,o=this.__internal__subscriptions[n];if(!o){this.__internal__waitingForId[n]=e,co.debug(()=>`Unable to find handler for subscription=${n}`);return}delete this.__internal__waitingForId[n];try{let a=this.__internal__coder.decodeResponse(e);o.callback(null,a)}catch(a){this.__internal__endpointStats.errors++,this.__internal__stats.total.errors++,o.callback(a,void 0)}};__internal__onSocketOpen=()=>{if(this.__internal__websocket===null)throw new Error("WebSocket cannot be null in onOpen");return co.debug(()=>["connected to",this.endpoint]),this.__internal__isConnected=!0,this.__internal__resubscribe(),this.__internal__emit("connected"),!0};__internal__resubscribe=()=>{let e=this.__internal__subscriptions;this.__internal__subscriptions={},Promise.all(Object.keys(e).map(async r=>{let{callback:n,method:o,params:a,type:s}=e[r];if(!s.startsWith("author_"))try{await this.subscribe(s,o,a,n)}catch(u){co.error(u)}})).catch(co.error)};__internal__timeoutHandlers=()=>{let e=Date.now(),r=Object.keys(this.__internal__handlers);for(let n=0,o=r.length;nthis.__internal__timeout){try{a.callback(new Error(`No response received from RPC endpoint in ${this.__internal__timeout/1e3}s`),void 0)}catch{}this.__internal__endpointStats.timeout++,this.__internal__stats.total.timeout++,delete this.__internal__handlers[r[n]]}}}};var z1=function(t,e){return z1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},z1(t,e)};function Mr(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");z1(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function xw(t,e,r,n){function o(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function u(y){try{h(n.next(y))}catch(_){s(_)}}function l(y){try{h(n.throw(y))}catch(_){s(_)}}function h(y){y.done?a(y.value):o(y.value).then(u,l)}h((n=n.apply(t,e||[])).next())})}function jh(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(h){return function(y){return l([h,y])}}function l(h){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,h[0]&&(r=0)),r;)try{if(n=1,o&&(a=h[0]&2?o.return:h[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,h[1])).done)return a;switch(o=0,a&&(h=[h[0]&2,a.value]),h[0]){case 0:case 1:a=h;break;case 4:return r.label++,{value:h[1],done:!1};case 5:r.label++,o=h[1],h=[0];continue;case 7:h=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(h[0]===6||h[0]===2)){r=0;continue}if(h[0]===3&&(!a||h[1]>a[0]&&h[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function uo(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,a=[],s;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return a}function fo(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,a;n1||u(V,R)})})}function u(V,R){try{l(n[V](R))}catch(B){_(a[0][3],B)}}function l(V){V.value instanceof pc?Promise.resolve(V.value.v).then(h,y):_(a[0][2],V)}function h(V){u("next",V)}function y(V){u("throw",V)}function _(V,R){V(R),a.shift(),a.length&&u(a[0][0],a[0][1])}}function yw(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof xa=="function"?xa(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=t[a]&&function(s){return new Promise(function(u,l){s=t[a](s),o(u,l,s.done,s.value)})}}function o(a,s,u,l){Promise.resolve(l).then(function(h){a({value:h,done:u})},s)}}function tt(t){return typeof t=="function"}function Zu(t){var e=function(n){Error.call(n),n.stack=new Error().stack},r=t(e);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Xh=Zu(function(t){return function(r){t(this),this.message=r?r.length+` errors occurred during unsubscription:
`+r.map(function(n,o){return o+1+") "+n.toString()}).join(`
`):"",this.name="UnsubscriptionError",this.errors=r}});function hc(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var Mn=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,r,n,o,a;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var u=xa(s),l=u.next();!l.done;l=u.next()){var h=l.value;h.remove(this)}}catch(L){e={error:L}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}else s.remove(this);var y=this.initialTeardown;if(tt(y))try{y()}catch(L){a=L instanceof Xh?L.errors:[L]}var _=this._finalizers;if(_){this._finalizers=null;try{for(var V=xa(_),R=V.next();!R.done;R=V.next()){var B=R.value;try{gw(B)}catch(L){a=a??[],L instanceof Xh?a=fo(fo([],uo(a)),uo(L.errors)):a.push(L)}}}catch(L){n={error:L}}finally{try{R&&!R.done&&(o=V.return)&&o.call(V)}finally{if(n)throw n.error}}}if(a)throw new Xh(a)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)gw(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(e)}},t.prototype._hasParent=function(e){var r=this._parentage;return r===e||Array.isArray(r)&&r.includes(e)},t.prototype._addParent=function(e){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e},t.prototype._removeParent=function(e){var r=this._parentage;r===e?this._parentage=null:Array.isArray(r)&&hc(r,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&hc(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}();var F1=Mn.EMPTY;function Gh(t){return t instanceof Mn||t&&"closed"in t&&tt(t.remove)&&tt(t.add)&&tt(t.unsubscribe)}function gw(t){tt(t)?t():t.unsubscribe()}var oi={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Yu={setTimeout:function(t,e){for(var r=[],n=2;n0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(r){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,r)},e.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},e.prototype._innerSubscribe=function(r){var n=this,o=this,a=o.hasError,s=o.isStopped,u=o.observers;return a||s?F1:(this.currentObservers=null,u.push(r),new Mn(function(){n.currentObservers=null,hc(u,r)}))},e.prototype._checkFinalizedStatuses=function(r){var n=this,o=n.hasError,a=n.thrownError,s=n.isStopped;o?r.error(a):s&&r.complete()},e.prototype.asObservable=function(){var r=new Vt;return r.source=this,r},e.create=function(r,n){return new Mw(r,n)},e}(Vt);var Mw=function(t){Mr(e,t);function e(r,n){var o=t.call(this)||this;return o.destination=r,o.source=n,o}return e.prototype.next=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.next)===null||o===void 0||o.call(n,r)},e.prototype.error=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.error)===null||o===void 0||o.call(n,r)},e.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},e.prototype._subscribe=function(r){var n,o;return(o=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&o!==void 0?o:F1},e}(bc);var Oi=function(t){Mr(e,t);function e(r){var n=t.call(this)||this;return n._value=r,n}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(r){var n=t.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},e.prototype.getValue=function(){var r=this,n=r.hasError,o=r.thrownError,a=r._value;if(n)throw o;return this._throwIfClosed(),a},e.prototype.next=function(r){t.prototype.next.call(this,this._value=r)},e}(bc);var Bl={now:function(){return(Bl.delegate||Date).now()},delegate:void 0};var Aw=function(t){Mr(e,t);function e(r,n,o){r===void 0&&(r=1/0),n===void 0&&(n=1/0),o===void 0&&(o=Bl);var a=t.call(this)||this;return a._bufferSize=r,a._windowTime=n,a._timestampProvider=o,a._buffer=[],a._infiniteTimeWindow=!0,a._infiniteTimeWindow=n===1/0,a._bufferSize=Math.max(1,r),a._windowTime=Math.max(1,n),a}return e.prototype.next=function(r){var n=this,o=n.isStopped,a=n._buffer,s=n._infiniteTimeWindow,u=n._timestampProvider,l=n._windowTime;o||(a.push(r),!s&&a.push(u.now()+l)),this._trimBuffer(),t.prototype.next.call(this,r)},e.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(r),o=this,a=o._infiniteTimeWindow,s=o._buffer,u=s.slice(),l=0;l0?t.prototype.requestAsyncId.call(this,r,n,o):(r.actions.push(this),r._scheduled||(r._scheduled=Ul.setImmediate(r.flush.bind(r,void 0))))},e.prototype.recycleAsyncId=function(r,n,o){var a;if(o===void 0&&(o=0),o!=null?o>0:this.delay>0)return t.prototype.recycleAsyncId.call(this,r,n,o);var s=r.actions;n!=null&&((a=s[s.length-1])===null||a===void 0?void 0:a.id)!==n&&(Ul.clearImmediate(n),r._scheduled===n&&(r._scheduled=void 0))},e}(Iw);var J1=function(){function t(e,r){r===void 0&&(r=t.now),this.schedulerActionCtor=e,this.now=r}return t.prototype.schedule=function(e,r,n){return r===void 0&&(r=0),new this.schedulerActionCtor(this,e).schedule(n,r)},t.now=Bl.now,t}();var Cw=function(t){Mr(e,t);function e(r,n){n===void 0&&(n=J1.now);var o=t.call(this,r,n)||this;return o.actions=[],o._active=!1,o}return e.prototype.flush=function(r){var n=this.actions;if(this._active){n.push(r);return}var o;this._active=!0;do if(o=r.execute(r.state,r.delay))break;while(r=n.shift());if(this._active=!1,o){for(;r=n.shift();)r.unsubscribe();throw o}},e}(J1);var Bw=function(t){Mr(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.flush=function(r){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var o=this.actions,a;r=r||o.shift();do if(a=r.execute(r.state,r.delay))break;while((r=o[0])&&r.id===n&&o.shift());if(this._active=!1,a){for(;(r=o[0])&&r.id===n&&o.shift();)r.unsubscribe();throw a}},e}(Cw);var Q1=new Bw(Nw);var Ii=new Vt(function(t){return t.complete()});function Rw(t){return t&&tt(t.schedule)}function Uw(t){return t[t.length-1]}function Hw(t){return tt(Uw(t))?t.pop():void 0}function cs(t){return Rw(Uw(t))?t.pop():void 0}var Kh=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Jh(t){return tt(t?.then)}function Qh(t){return tt(t[Qu])}function $h(t){return Symbol.asyncIterator&&tt(t?.[Symbol.asyncIterator])}function em(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function KV(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var tm=KV();function rm(t){return tt(t?.[tm])}function nm(t){return bw(this,arguments,function(){var r,n,o,a;return jh(this,function(s){switch(s.label){case 0:r=t.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,pc(r.read())];case 3:return n=s.sent(),o=n.value,a=n.done,a?[4,pc(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,pc(o)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function om(t){return tt(t?.getReader)}function mn(t){if(t instanceof Vt)return t;if(t!=null){if(Qh(t))return JV(t);if(Kh(t))return QV(t);if(Jh(t))return $V(t);if($h(t))return Lw(t);if(rm(t))return eN(t);if(om(t))return tN(t)}throw em(t)}function JV(t){return new Vt(function(e){var r=t[Qu]();if(tt(r.subscribe))return r.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function QV(t){return new Vt(function(e){for(var r=0;r=2,!1,!0))}var lN=function(t,e){return t.push(e),t};function ba(){return _t(function(t,e){tv(lN,[])(t).subscribe(e)})}function rv(t){return new Vt(function(e){return t.subscribe(e)})}var dN={connector:function(){return new bc}};function nv(t,e){e===void 0&&(e=dN);var r=e.connector;return _t(function(n,o){var a=r();mn(t(rv(a))).subscribe(o),o.add(n.subscribe(a))})}function ov(t){return _t(function(e,r){var n=!1;e.subscribe(Nt(r,function(o){n=!0,r.next(o)},function(){n||r.next(t),r.complete()}))})}function iv(t){return t<=0?function(){return Ii}:_t(function(e,r){var n=0;e.subscribe(Nt(r,function(o){++n<=t&&(r.next(o),t<=n&&r.complete())}))})}function e2(t,e){return e===void 0&&(e=lo),t=t??pN,_t(function(r,n){var o,a=!0;r.subscribe(Nt(n,function(s){var u=e(s);(a||!t(o,u))&&(a=!1,o=u,n.next(s))}))})}function pN(t,e){return t===e}function av(t){return t===void 0&&(t=hN),_t(function(e,r){var n=!1;e.subscribe(Nt(r,function(o){n=!0,r.next(o)},function(){return n?r.complete():r.error(t())}))})}function hN(){return new $u}function cm(t,e){var r=arguments.length>=2;return function(n){return n.pipe(t?$w(function(o,a){return t(o,a,n)}):lo,iv(1),r?ov(e):av(function(){return new $u}))}}function sv(t,e){var r=tt(t)?t:function(){return t};return tt(e)?nv(e,{connector:r}):function(n){return new Ew(n,r)}}function Hl(t,e,r,n){r&&!tt(r)&&(n=r);var o=tt(r)?r:void 0;return function(a){return sv(new Aw(t,e,n),o)(a)}}function Vi(){for(var t=[],e=0;eu.isApplyExtrinsic&&u.asApplyExtrinsic.eqn(a)),txIndex:a};if(o.isInBlock){let a=e.map(s=>s.hash.toHex());cv.warn(`block ${r.hash.toHex()}: Unable to find extrinsic ${t.toHex()} inside ${a.join(", ")}`)}return{}}function Ll(t){return we(t.sign)}var ga={};br(ga,{assetConversion:()=>Mv,assets:()=>Ov,attestations:()=>J4,aura:()=>Vv,author:()=>p6,authorship:()=>Nv,babe:()=>Uv,balances:()=>Hv,beefy:()=>zv,benchmark:()=>qv,blockbuilder:()=>Xv,bridges:()=>Q4,chain:()=>m6,childstate:()=>b6,claims:()=>$4,collective:()=>Gv,consensus:()=>Zv,contracts:()=>Qv,contractsAbi:()=>$7,crowdloan:()=>e7,cumulus:()=>r7,democracy:()=>$v,dev:()=>t4,discovery:()=>n4,elections:()=>o4,engine:()=>a4,eth:()=>n6,evm:()=>s4,extrinsics:()=>c4,finality:()=>o7,fungibles:()=>f4,genericAsset:()=>l4,gilt:()=>d4,grandpa:()=>x4,identity:()=>b4,imOnline:()=>y4,lottery:()=>g4,metadata:()=>wv,mmr:()=>_4,nfts:()=>T4,nimbus:()=>i6,nompools:()=>E4,offchain:()=>w6,offences:()=>P4,ormlOracle:()=>s6,ormlTokens:()=>u6,parachains:()=>l7,payment:()=>T6,poll:()=>d7,pow:()=>A4,proxy:()=>O4,purchase:()=>p7,recovery:()=>I4,rpc:()=>l6,runtime:()=>Tv,scaleInfo:()=>Ev,scheduler:()=>V4,session:()=>C4,society:()=>B4,staking:()=>U4,state:()=>E6,support:()=>H4,syncstate:()=>D4,system:()=>q4,treasury:()=>W4,txpayment:()=>j4,txqueue:()=>G4,uniques:()=>Z4,utility:()=>Y4,vesting:()=>K4,xcm:()=>Q7});var uv={Blake2_128:null,Blake2_256:null,Blake2_128Concat:null,Twox128:null,Twox256:null,Twox64Concat:null,Identity:null};var fv={metadata:{description:"Returns the metadata of a runtime",params:[],type:"OpaqueMetadata"}},lv={Metadata:[{methods:{metadata_at_version:{description:"Returns the metadata at a given version.",params:[{name:"version",type:"u32"}],type:"Option"},metadata_versions:{description:"Returns the supported metadata versions.",params:[],type:"Vec"},...fv},version:2},{methods:{...fv},version:1}]};var dv={ErrorMetadataV9:{name:"Text",docs:"Vec"},EventMetadataV9:{name:"Text",args:"Vec",docs:"Vec"},FunctionArgumentMetadataV9:{name:"Text",type:"Type"},FunctionMetadataV9:{name:"Text",args:"Vec",docs:"Vec"},MetadataV9:{modules:"Vec"},ModuleConstantMetadataV9:{name:"Text",type:"Type",value:"Bytes",docs:"Vec"},ModuleMetadataV9:{name:"Text",storage:"Option",calls:"Option>",events:"Option>",constants:"Vec",errors:"Vec"},StorageEntryMetadataV9:{name:"Text",modifier:"StorageEntryModifierV9",type:"StorageEntryTypeV9",fallback:"Bytes",docs:"Vec"},StorageEntryModifierV9:{_enum:["Optional","Default","Required"]},StorageEntryTypeV9:{_enum:{Plain:"Type",Map:{hasher:"StorageHasherV9",key:"Type",value:"Type",linked:"bool"},DoubleMap:{hasher:"StorageHasherV9",key1:"Type",key2:"Type",value:"Type",key2Hasher:"StorageHasherV9"}}},StorageHasherV9:{_enum:{Blake2_128:null,Blake2_256:null,Twox128:null,Twox256:null,Twox64Concat:null}},StorageMetadataV9:{prefix:"Text",items:"Vec"}};var pv={ErrorMetadataV10:"ErrorMetadataV9",EventMetadataV10:"EventMetadataV9",FunctionArgumentMetadataV10:"FunctionArgumentMetadataV9",FunctionMetadataV10:"FunctionMetadataV9",MetadataV10:{modules:"Vec"},ModuleConstantMetadataV10:"ModuleConstantMetadataV9",ModuleMetadataV10:{name:"Text",storage:"Option",calls:"Option>",events:"Option>",constants:"Vec",errors:"Vec"},StorageEntryModifierV10:"StorageEntryModifierV9",StorageEntryMetadataV10:{name:"Text",modifier:"StorageEntryModifierV10",type:"StorageEntryTypeV10",fallback:"Bytes",docs:"Vec"},StorageEntryTypeV10:{_enum:{Plain:"Type",Map:{hasher:"StorageHasherV10",key:"Type",value:"Type",linked:"bool"},DoubleMap:{hasher:"StorageHasherV10",key1:"Type",key2:"Type",value:"Type",key2Hasher:"StorageHasherV10"}}},StorageMetadataV10:{prefix:"Text",items:"Vec"},StorageHasherV10:{_enum:{Blake2_128:null,Blake2_256:null,Blake2_128Concat:null,Twox128:null,Twox256:null,Twox64Concat:null}}};var hv={ErrorMetadataV11:"ErrorMetadataV10",EventMetadataV11:"EventMetadataV10",ExtrinsicMetadataV11:{version:"u8",signedExtensions:"Vec"},FunctionArgumentMetadataV11:"FunctionArgumentMetadataV10",FunctionMetadataV11:"FunctionMetadataV10",MetadataV11:{modules:"Vec",extrinsic:"ExtrinsicMetadataV11"},ModuleConstantMetadataV11:"ModuleConstantMetadataV10",ModuleMetadataV11:{name:"Text",storage:"Option",calls:"Option>",events:"Option>",constants:"Vec",errors:"Vec"},StorageEntryModifierV11:"StorageEntryModifierV10",StorageEntryMetadataV11:{name:"Text",modifier:"StorageEntryModifierV11",type:"StorageEntryTypeV11",fallback:"Bytes",docs:"Vec"},StorageEntryTypeV11:{_enum:{Plain:"Type",Map:{hasher:"StorageHasherV11",key:"Type",value:"Type",linked:"bool"},DoubleMap:{hasher:"StorageHasherV11",key1:"Type",key2:"Type",value:"Type",key2Hasher:"StorageHasherV11"}}},StorageMetadataV11:{prefix:"Text",items:"Vec"},StorageHasherV11:{_enum:uv}};var mv={ErrorMetadataV12:"ErrorMetadataV11",EventMetadataV12:"EventMetadataV11",ExtrinsicMetadataV12:"ExtrinsicMetadataV11",FunctionArgumentMetadataV12:"FunctionArgumentMetadataV11",FunctionMetadataV12:"FunctionMetadataV11",MetadataV12:{modules:"Vec",extrinsic:"ExtrinsicMetadataV12"},ModuleConstantMetadataV12:"ModuleConstantMetadataV11",ModuleMetadataV12:{name:"Text",storage:"Option",calls:"Option>",events:"Option>",constants:"Vec",errors:"Vec",index:"u8"},StorageEntryModifierV12:"StorageEntryModifierV11",StorageEntryMetadataV12:"StorageEntryMetadataV11",StorageEntryTypeV12:"StorageEntryTypeV11",StorageMetadataV12:"StorageMetadataV11",StorageHasherV12:"StorageHasherV11"};var xv={ErrorMetadataV13:"ErrorMetadataV12",EventMetadataV13:"EventMetadataV12",ExtrinsicMetadataV13:"ExtrinsicMetadataV12",FunctionArgumentMetadataV13:"FunctionArgumentMetadataV12",FunctionMetadataV13:"FunctionMetadataV12",MetadataV13:{modules:"Vec",extrinsic:"ExtrinsicMetadataV13"},ModuleConstantMetadataV13:"ModuleConstantMetadataV12",ModuleMetadataV13:{name:"Text",storage:"Option",calls:"Option>",events:"Option>",constants:"Vec",errors:"Vec",index:"u8"},StorageEntryModifierV13:"StorageEntryModifierV12",StorageEntryMetadataV13:{name:"Text",modifier:"StorageEntryModifierV13",type:"StorageEntryTypeV13",fallback:"Bytes",docs:"Vec"},StorageEntryTypeV13:{_enum:{Plain:"Type",Map:{hasher:"StorageHasherV13",key:"Type",value:"Type",linked:"bool"},DoubleMap:{hasher:"StorageHasherV13",key1:"Type",key2:"Type",value:"Type",key2Hasher:"StorageHasherV13"},NMap:{keyVec:"Vec",hashers:"Vec",value:"Type"}}},StorageMetadataV13:{prefix:"Text",items:"Vec"},StorageHasherV13:"StorageHasherV12"};var Dl={name:"Text",fields:"Vec",index:"u8",docs:"Vec"},bv={Si1Field:{name:"Option",type:"Si1LookupTypeId",typeName:"Option",docs:"Vec"},Si1LookupTypeId:"Compact",Si1Path:"Si0Path",Si1Type:{path:"Si1Path",params:"Vec",def:"Si1TypeDef",docs:"Vec"},Si1TypeDef:{_enum:{Composite:"Si1TypeDefComposite",Variant:"Si1TypeDefVariant",Sequence:"Si1TypeDefSequence",Array:"Si1TypeDefArray",Tuple:"Si1TypeDefTuple",Primitive:"Si1TypeDefPrimitive",Compact:"Si1TypeDefCompact",BitSequence:"Si1TypeDefBitSequence",HistoricMetaCompat:"Type"}},Si1TypeDefArray:{len:"u32",type:"Si1LookupTypeId"},Si1TypeDefBitSequence:{bitStoreType:"Si1LookupTypeId",bitOrderType:"Si1LookupTypeId"},Si1TypeDefCompact:{type:"Si1LookupTypeId"},Si1TypeDefComposite:{fields:"Vec"},Si1TypeDefPrimitive:"Si0TypeDefPrimitive",Si1TypeDefSequence:{type:"Si1LookupTypeId"},Si1TypeDefTuple:"Vec",Si1TypeParameter:{name:"Text",type:"Option"},Si1TypeDefVariant:{variants:"Vec"},Si1Variant:Dl};var yv={PortableTypeV14:{id:"Si1LookupTypeId",type:"Si1Type"},ErrorMetadataV14:{...Dl,args:"Vec"},EventMetadataV14:{...Dl,args:"Vec"},FunctionArgumentMetadataV14:{name:"Text",type:"Type",typeName:"Option"},FunctionMetadataV14:{...Dl,args:"Vec"},ExtrinsicMetadataV14:{type:"SiLookupTypeId",version:"u8",signedExtensions:"Vec"},MetadataV14:{lookup:"PortableRegistry",pallets:"Vec",extrinsic:"ExtrinsicMetadataV14",type:"SiLookupTypeId"},PalletCallMetadataV14:{type:"SiLookupTypeId"},PalletConstantMetadataV14:{name:"Text",type:"SiLookupTypeId",value:"Bytes",docs:"Vec"},PalletErrorMetadataV14:{type:"SiLookupTypeId"},PalletEventMetadataV14:{type:"SiLookupTypeId"},PalletMetadataV14:{name:"Text",storage:"Option",calls:"Option",events:"Option",constants:"Vec",errors:"Option",index:"u8"},PalletStorageMetadataV14:{prefix:"Text",items:"Vec"},SignedExtensionMetadataV14:{identifier:"Text",type:"SiLookupTypeId",additionalSigned:"SiLookupTypeId"},StorageEntryMetadataV14:{name:"Text",modifier:"StorageEntryModifierV14",type:"StorageEntryTypeV14",fallback:"Bytes",docs:"Vec"},StorageEntryModifierV14:"StorageEntryModifierV13",StorageEntryTypeV14:{_enum:{Plain:"SiLookupTypeId",Map:{hashers:"Vec",key:"SiLookupTypeId",value:"SiLookupTypeId"}}},StorageHasherV14:"StorageHasherV13"};var gv={CustomMetadata15:{map:"BTreeMap"},CustomValueMetadata15:{type:"SiLookupTypeId",value:"Bytes"},ExtrinsicMetadataV15:{version:"u8",addressType:"SiLookupTypeId",callType:"SiLookupTypeId",signatureType:"SiLookupTypeId",extraType:"SiLookupTypeId",signedExtensions:"Vec"},OuterEnums15:{callType:"SiLookupTypeId",eventType:"SiLookupTypeId",errorType:"SiLookupTypeId"},PalletMetadataV15:{name:"Text",storage:"Option",calls:"Option",events:"Option",constants:"Vec",errors:"Option",index:"u8",docs:"Vec"},RuntimeApiMetadataV15:{name:"Text",methods:"Vec",docs:"Vec"},RuntimeApiMethodMetadataV15:{name:"Text",inputs:"Vec",output:"SiLookupTypeId",docs:"Vec"},RuntimeApiMethodParamMetadataV15:{name:"Text",type:"SiLookupTypeId"},MetadataV15:{lookup:"PortableRegistry",pallets:"Vec",extrinsic:"ExtrinsicMetadataV15",type:"SiLookupTypeId",apis:"Vec",outerEnums:"OuterEnums15",custom:"CustomMetadata15"}};var wv={rpc:{},runtime:lv,types:{...dv,...pv,...hv,...mv,...xv,...yv,...gv,ErrorMetadataLatest:"ErrorMetadataV14",EventMetadataLatest:"EventMetadataV14",ExtrinsicMetadataLatest:"ExtrinsicMetadataV15",FunctionArgumentMetadataLatest:"FunctionArgumentMetadataV14",FunctionMetadataLatest:"FunctionMetadataV14",MetadataLatest:"MetadataV15",PalletCallMetadataLatest:"PalletCallMetadataV14",PalletConstantMetadataLatest:"PalletConstantMetadataV14",PalletErrorMetadataLatest:"PalletErrorMetadataV14",PalletEventMetadataLatest:"PalletEventMetadataV14",PalletMetadataLatest:"PalletMetadataV15",PalletStorageMetadataLatest:"PalletStorageMetadataV14",PortableType:"PortableTypeV14",RuntimeApiMetadataLatest:"RuntimeApiMetadataV15",SignedExtensionMetadataLatest:"SignedExtensionMetadataV14",StorageEntryMetadataLatest:"StorageEntryMetadataV14",StorageEntryModifierLatest:"StorageEntryModifierV14",StorageEntryTypeLatest:"StorageEntryTypeV14",StorageHasher:"StorageHasherV14",OpaqueMetadata:"Opaque",MetadataAll:{_enum:{V0:"DoNotConstruct",V1:"DoNotConstruct",V2:"DoNotConstruct",V3:"DoNotConstruct",V4:"DoNotConstruct",V5:"DoNotConstruct",V6:"DoNotConstruct",V7:"DoNotConstruct",V8:"DoNotConstruct",V9:"MetadataV9",V10:"MetadataV10",V11:"MetadataV11",V12:"MetadataV12",V13:"MetadataV13",V14:"MetadataV14",V15:"MetadataV15"}}}};var um={execute_block:{description:"Execute the given block.",params:[{name:"block",type:"Block"}],type:"Null"}},vv={version:{description:"Returns the version of the runtime.",params:[],type:"RuntimeVersionPre3"}},r2={initialize_block:{description:"Initialize a block with the given header.",params:[{name:"header",type:"Header"}],type:"Null"}},_v={Core:[{methods:{version:{description:"Returns the version of the runtime.",params:[],type:"RuntimeVersion"},...um,...r2},version:4},{methods:{version:{description:"Returns the version of the runtime.",params:[],type:"RuntimeVersionPre4"},...um,...r2},version:3},{methods:{...vv,...um,...r2},version:2},{methods:{initialise_block:{description:"Initialize a block with the given header.",params:[{name:"header",type:"Header"}],type:"Null"},...vv,...um},version:1}]};var mN={Fixed64:"Int<64, Fixed64>",FixedI64:"Int<64, FixedI64>",FixedU64:"UInt<64, FixedU64>",Fixed128:"Int<128, Fixed128>",FixedI128:"Int<128, FixedI128>",FixedU128:"UInt<128, FixedU128>",I32F32:"Int<64, I32F32>",U32F32:"UInt<64, U32F32>",PerU16:"UInt<16, PerU16>",Perbill:"UInt<32, Perbill>",Percent:"UInt<8, Percent>",Permill:"UInt<32, Permill>",Perquintill:"UInt<64, Perquintill>"},Sv={Council:"CollectiveOrigin",System:"SystemOrigin",TechnicalCommittee:"CollectiveOrigin",Xcm:"XcmOrigin",XcmPallet:"XcmOrigin",Authority:"AuthorityOrigin",GeneralCouncil:"CollectiveOrigin"},Tv={rpc:{},runtime:_v,types:{...mN,AccountId:"AccountId32",AccountId20:"GenericEthereumAccountId",AccountId32:"GenericAccountId32",AccountId33:"GenericAccountId33",AccountIdOf:"AccountId",AccountIndex:"GenericAccountIndex",Address:"MultiAddress",AssetId:"u32",Balance:"UInt<128, Balance>",BalanceOf:"Balance",Block:"GenericBlock",BlockNumber:"u32",BlockNumberFor:"BlockNumber",BlockNumberOf:"BlockNumber",Call:"GenericCall",CallHash:"Hash",CallHashOf:"CallHash",ChangesTrieConfiguration:{digestInterval:"u32",digestLevels:"u32"},ChangesTrieSignal:{_enum:{NewConfiguration:"Option"}},ConsensusEngineId:"GenericConsensusEngineId",CodecHash:"Hash",CrateVersion:{major:"u16",minor:"u8",patch:"u8"},Digest:{logs:"Vec"},DigestItem:{_enum:{Other:"Bytes",AuthoritiesChange:"Vec",ChangesTrieRoot:"Hash",SealV0:"SealV0",Consensus:"Consensus",Seal:"Seal",PreRuntime:"PreRuntime",ChangesTrieSignal:"ChangesTrieSignal",RuntimeEnvironmentUpdated:"Null"}},ExtrinsicsWeight:{normal:"Weight",operational:"Weight"},H32:"[u8; 4; H32]",H64:"[u8; 8; H64]",H128:"[u8; 16; H128]",H160:"[u8; 20; H160]",H256:"[u8; 32; H256]",H512:"[u8; 64; H512]",H1024:"[u8; 128; H1024]",H2048:"[u8; 256; H2048]",Hash:"H256",Header:{parentHash:"Hash",number:"Compact",stateRoot:"Hash",extrinsicsRoot:"Hash",digest:"Digest"},HeaderPartial:{parentHash:"Hash",number:"BlockNumber"},IndicesLookupSource:"GenericLookupSource",Index:"u32",Justification:"(ConsensusEngineId, EncodedJustification)",EncodedJustification:"Bytes",Justifications:"Vec",KeyValue:"(StorageKey, StorageData)",KeyTypeId:"u32",LockIdentifier:"[u8; 8]",LookupSource:"MultiAddress",LookupTarget:"AccountId",ModuleId:"LockIdentifier",MultiAddress:"GenericMultiAddress",MultiSigner:{_enum:{Ed25519:"[u8; 32]",Sr25519:"[u8; 32]",Ecdsa:"[u8; 33]"}},Moment:"UInt<64, Moment>",OpaqueCall:"Bytes",Origin:"DoNotConstruct",OriginCaller:{_enum:{System:"SystemOrigin"}},PalletId:"LockIdentifier",PalletsOrigin:"OriginCaller",PalletVersion:{major:"u16",minor:"u8",patch:"u8"},Pays:{_enum:["Yes","No"]},Phantom:"Null",PhantomData:"Null",Releases:{_enum:["V1","V2","V3","V4","V5","V6","V7","V8","V9","V10"]},RuntimeCall:"Call",RuntimeEvent:"Event",RuntimeDbWeight:{read:"Weight",write:"Weight"},SignedBlock:"SignedBlockWithJustifications",SignedBlockWithJustification:{block:"Block",justification:"Option"},SignedBlockWithJustifications:{block:"Block",justifications:"Option"},Slot:"u64",SlotDuration:"u64",StorageData:"Bytes",StorageInfo:{palletName:"Bytes",storage_name:"Bytes",prefix:"Bytes",maxValues:"Option",maxSize:"Option"},StorageProof:{trieNodes:"Vec"},TransactionPriority:"u64",TransactionLongevity:"u64",TransactionTag:"Bytes",TransactionInfo:{_alias:{dataSize:"size"},chunkRoot:"H256",contentHash:"H256",dataSize:"u32",blockChunks:"u32"},TransactionStorageProof:{chunk:"Vec",proof:"Vec>"},ValidatorId:"AccountId",ValidatorIdOf:"ValidatorId",WeightV0:"u32",WeightV1:"u64",WeightV2:{refTime:"Compact",proofSize:"Compact"},Weight:"WeightV2",WeightMultiplier:"Fixed64",PreRuntime:"(ConsensusEngineId, Bytes)",SealV0:"(u64, Signature)",Seal:"(ConsensusEngineId, Bytes)",Consensus:"(ConsensusEngineId, Bytes)"}};var kv={Si0Field:{name:"Option",type:"Si0LookupTypeId",typeName:"Option",docs:"Vec"},Si0LookupTypeId:"u32",Si0Path:"Vec",Si0Type:{path:"Si0Path",params:"Vec",def:"Si0TypeDef"},Si0TypeDef:{_enum:{Composite:"Si0TypeDefComposite",Variant:"Si0TypeDefVariant",Sequence:"Si0TypeDefSequence",Array:"Si0TypeDefArray",Tuple:"Si0TypeDefTuple",Primitive:"Si0TypeDefPrimitive",Compact:"Si0TypeDefCompact",Phantom:"Si0TypeDefPhantom",BitSequence:"Si0TypeDefBitSequence"}},Si0TypeDefArray:{len:"u32",type:"Si0LookupTypeId"},Si0TypeDefBitSequence:{bitStoreType:"Si0LookupTypeId",bitOrderType:"Si0LookupTypeId"},Si0TypeDefCompact:{type:"Si0LookupTypeId"},Si0TypeDefComposite:{fields:"Vec"},Si0TypeDefPhantom:"Null",Si0TypeDefVariant:{variants:"Vec"},Si0TypeDefPrimitive:{_enum:["Bool","Char","Str","U8","U16","U32","U64","U128","U256","I8","I16","I32","I64","I128","I256"]},Si0TypeDefSequence:{type:"Si0LookupTypeId"},Si0TypeDefTuple:"Vec",Si0TypeParameter:{name:"Text",type:"Option"},Si0Variant:{name:"Text",fields:"Vec",index:"Option",discriminant:"Option",docs:"Vec"}};var Ev={rpc:{},types:{...kv,...bv,SiField:"Si1Field",SiLookupTypeId:"Si1LookupTypeId",SiPath:"Si1Path",SiType:"Si1Type",SiTypeDef:"Si1TypeDef",SiTypeDefArray:"Si1TypeDefArray",SiTypeDefBitSequence:"Si1TypeDefBitSequence",SiTypeDefCompact:"Si1TypeDefCompact",SiTypeDefComposite:"Si1TypeDefComposite",SiTypeDefPrimitive:"Si1TypeDefPrimitive",SiTypeDefSequence:"Si1TypeDefSequence",SiTypeDefTuple:"Si1TypeDefTuple",SiTypeParameter:"Si1TypeParameter",SiTypeDefVariant:"Si1TypeDefVariant",SiVariant:"Si1Variant"}};var Pv={AssetConversionApi:[{methods:{get_reserves:{description:"Get pool reserves",params:[{name:"asset1",type:"XcmV3MultiLocation"},{name:"asset2",type:"XcmV3MultiLocation"}],type:"Option<(Balance,Balance)>"},quote_price_exact_tokens_for_tokens:{description:"Quote price: exact tokens for tokens",params:[{name:"asset1",type:"XcmV3MultiLocation"},{name:"asset2",type:"XcmV3MultiLocation"},{name:"amount",type:"u128"},{name:"include_fee",type:"bool"}],type:"Option<(Balance)>"},quote_price_tokens_for_exact_tokens:{description:"Quote price: tokens for exact tokens",params:[{name:"asset1",type:"XcmV3MultiLocation"},{name:"asset2",type:"XcmV3MultiLocation"},{name:"amount",type:"u128"},{name:"include_fee",type:"bool"}],type:"Option<(Balance)>"}},version:1}]};var Mv={rpc:{},runtime:Pv,types:{TAssetConversion:"Option"}};var Av={AssetsApi:[{methods:{account_balances:{description:"Return the current set of authorities.",params:[{name:"account",type:"AccountId"}],type:"Vec<(u32, TAssetBalance)>"}},version:1}]};var Ov={rpc:{},runtime:Av,types:{AssetApprovalKey:{owner:"AccountId",delegate:"AccountId"},AssetApproval:{amount:"TAssetBalance",deposit:"TAssetDepositBalance"},AssetBalance:{balance:"TAssetBalance",isFrozen:"bool",isSufficient:"bool"},AssetDestroyWitness:{accounts:"Compact",sufficients:"Compact",approvals:"Compact"},AssetDetails:{owner:"AccountId",issuer:"AccountId",admin:"AccountId",freezer:"AccountId",supply:"TAssetBalance",deposit:"TAssetDepositBalance",minBalance:"TAssetBalance",isSufficient:"bool",accounts:"u32",sufficients:"u32",approvals:"u32",isFrozen:"bool"},AssetMetadata:{deposit:"TAssetDepositBalance",name:"Vec",symbol:"Vec",decimals:"u8",isFrozen:"bool"},TAssetBalance:"u64",TAssetDepositBalance:"BalanceOf"}};var Iv={AuraApi:[{methods:{authorities:{description:"Return the current set of authorities.",params:[],type:"Vec"},slot_duration:{description:"Returns the slot duration for Aura.",params:[],type:"SlotDuration"}},version:1}]};var Vv={rpc:{},runtime:Iv,types:{RawAuraPreDigest:{slotNumber:"u64"}}};var Nv={rpc:{},types:{UncleEntryItem:{_enum:{InclusionHeight:"BlockNumber",Uncle:"(Hash, Option)"}}}};var Cv={epochAuthorship:{description:"Returns data about which slots (primary or secondary) can be claimed in the current epoch with the keys in the keystore",isUnsafe:!0,params:[],type:"HashMap"}};var Bv={current_epoch:{description:"Returns information regarding the current epoch.",params:[],type:"Epoch"},current_epoch_start:{description:"Returns the slot that started the current epoch.",params:[],type:"Slot"},generate_key_ownership_proof:{description:"Generates a proof of key ownership for the given authority in the current epoch.",params:[{name:"slot",type:"Slot"},{name:"authorityId",type:"AuthorityId"}],type:"Option"},next_epoch:{description:"Returns information regarding the next epoch (which was already previously announced).",params:[],type:"Epoch"},submit_report_equivocation_unsigned_extrinsic:{description:"Submits an unsigned extrinsic to report an equivocation.",params:[{name:"equivocationProof",type:"BabeEquivocationProof"},{name:"keyOwnerProof",type:"OpaqueKeyOwnershipProof"}],type:"Option"}},Rv={BabeApi:[{methods:{configuration:{description:"Return the genesis configuration for BABE. The configuration is only read on genesis.",params:[],type:"BabeGenesisConfiguration"},...Bv},version:2},{methods:{configuration:{description:"Return the configuration for BABE. Version 1.",params:[],type:"BabeGenesisConfigurationV1"},...Bv},version:1}]};var Uv={rpc:Cv,runtime:Rv,types:{AllowedSlots:{_enum:["PrimarySlots","PrimaryAndSecondaryPlainSlots","PrimaryAndSecondaryVRFSlots"]},BabeAuthorityWeight:"u64",BabeEpochConfiguration:{c:"(u64, u64)",allowedSlots:"AllowedSlots"},BabeBlockWeight:"u32",BabeEquivocationProof:{offender:"AuthorityId",slotNumber:"SlotNumber",firstHeader:"Header",secondHeader:"Header"},BabeGenesisConfiguration:{slotDuration:"u64",epochLength:"u64",c:"(u64, u64)",genesisAuthorities:"Vec<(AuthorityId, BabeAuthorityWeight)>",randomness:"Randomness",allowedSlots:"AllowedSlots"},BabeGenesisConfigurationV1:{slotDuration:"u64",epochLength:"u64",c:"(u64, u64)",genesisAuthorities:"Vec<(AuthorityId, BabeAuthorityWeight)>",randomness:"Randomness",secondarySlots:"bool"},BabeWeight:"u64",MaybeRandomness:"Option",MaybeVrf:"Option",Epoch:{epochIndex:"u64",startSlot:"Slot",duration:"u64",authorities:"Vec<(AuthorityId, BabeAuthorityWeight)>",randomness:"Hash",config:"BabeEpochConfiguration"},EpochAuthorship:{primary:"Vec",secondary:"Vec",secondary_vrf:"Vec"},NextConfigDescriptor:{_enum:{V0:"Null",V1:"NextConfigDescriptorV1"}},NextConfigDescriptorV1:{c:"(u64, u64)",allowedSlots:"AllowedSlots"},OpaqueKeyOwnershipProof:"Bytes",Randomness:"Hash",RawBabePreDigest:{_enum:{Phantom:"Null",Primary:"RawBabePreDigestPrimary",SecondaryPlain:"RawBabePreDigestSecondaryPlain",SecondaryVRF:"RawBabePreDigestSecondaryVRF"}},RawBabePreDigestPrimary:{authorityIndex:"u32",slotNumber:"SlotNumber",vrfOutput:"VrfOutput",vrfProof:"VrfProof"},RawBabePreDigestSecondaryPlain:{authorityIndex:"u32",slotNumber:"SlotNumber"},RawBabePreDigestSecondaryVRF:{authorityIndex:"u32",slotNumber:"SlotNumber",vrfOutput:"VrfOutput",vrfProof:"VrfProof"},RawBabePreDigestTo159:{_enum:{Primary:"RawBabePreDigestPrimaryTo159",Secondary:"RawBabePreDigestSecondaryTo159"}},RawBabePreDigestPrimaryTo159:{authorityIndex:"u32",slotNumber:"SlotNumber",weight:"BabeBlockWeight",vrfOutput:"VrfOutput",vrfProof:"VrfProof"},RawBabePreDigestSecondaryTo159:{authorityIndex:"u32",slotNumber:"SlotNumber",weight:"BabeBlockWeight"},RawBabePreDigestCompat:{_enum:{Zero:"u32",One:"u32",Two:"u32",Three:"u32"}},SlotNumber:"u64",VrfData:"[u8; 32]",VrfOutput:"[u8; 32]",VrfProof:"[u8; 64]"}};var Hv={rpc:{},types:{AccountData:{free:"Balance",reserved:"Balance",miscFrozen:"Balance",feeFrozen:"Balance"},BalanceLockTo212:{id:"LockIdentifier",amount:"Balance",until:"BlockNumber",reasons:"WithdrawReasons"},BalanceLock:{id:"LockIdentifier",amount:"Balance",reasons:"Reasons"},BalanceStatus:{_enum:["Free","Reserved"]},Reasons:{_enum:["Fee","Misc","All"]},ReserveData:{id:"ReserveIdentifier",amount:"Balance"},ReserveIdentifier:"[u8; 8]",VestingSchedule:{offset:"Balance",perBlock:"Balance",startingBlock:"BlockNumber"},WithdrawReasons:{_set:{TransactionPayment:1,Transfer:2,Reserve:4,Fee:8,Tip:16}}}};var Lv={getFinalizedHead:{description:"Returns hash of the latest BEEFY finalized block as seen by this client.",params:[],type:"H256"},subscribeJustifications:{description:"Returns the block most recently finalized by BEEFY, alongside its justification.",params:[],pubsub:["justifications","subscribeJustifications","unsubscribeJustifications"],type:"BeefyVersionedFinalityProof"}};var n2={beefy_genesis:{description:"Return the block number where BEEFY consensus is enabled/started",params:[],type:"Option"},generate_key_ownership_proof:{description:"Generates a proof of key ownership for the given authority in the given set.",params:[{name:"setId",type:"ValidatorSetId"},{name:"authorityId",type:"AuthorityId"}],type:"Option"},submit_report_equivocation_unsigned_extrinsic:{description:"Submits an unsigned extrinsic to report an equivocation.",params:[{name:"equivocationProof",type:"BeefyEquivocationProof"},{name:"keyOwnerProof",type:"OpaqueKeyOwnershipProof"}],type:"Option"},validator_set:{description:"Return the current active BEEFY validator set",params:[],type:"Option"}},xN={authority_set_proof:{description:"Return the currently active BEEFY authority set proof.",params:[],type:"BeefyAuthoritySet"},next_authority_set_proof:{description:"Return the next/queued BEEFY authority set proof.",params:[],type:"BeefyNextAuthoritySet"}},Dv={BeefyApi:[{methods:n2,version:3},{methods:n2,version:2},{methods:n2,version:1}],BeefyMmrApi:[{methods:xN,version:1}]};var zv={rpc:Lv,runtime:Dv,types:{BeefyAuthoritySet:{id:"u64",len:"u32",root:"H256"},BeefyCommitment:{payload:"BeefyPayload",blockNumber:"BlockNumber",validatorSetId:"ValidatorSetId"},BeefyId:"[u8; 33]",BeefyEquivocationProof:{first:"BeefyVoteMessage",second:"BeefyVoteMessage"},BeefyCompactSignedCommitment:{commitment:"BeefyCommitment",signaturesFrom:"Vec",validatorSetLen:"u32",signaturesCompact:"Vec"},BeefySignedCommitment:{commitment:"BeefyCommitment",signatures:"Vec