@ottocode/openclaw-setu 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-5kkvddc1.js +4 -0
- package/dist/chunk-8pp4as02.js +2 -0
- package/dist/chunk-by6w3tsf.js +3 -0
- package/dist/chunk-e5qz2vx5.js +2 -0
- package/dist/chunk-esz88g73.js +3 -0
- package/dist/chunk-fc5rfx0b.js +3 -0
- package/dist/chunk-g3ma3sec.js +2 -0
- package/dist/chunk-gtxg1zc6.js +2 -0
- package/dist/chunk-h29x1xqe.js +108 -0
- package/dist/chunk-jrrt57tv.js +42 -0
- package/dist/chunk-kn2k3qtn.js +3 -0
- package/dist/chunk-m44tyrbv.js +2 -0
- package/dist/chunk-mbth668g.js +2 -0
- package/dist/chunk-rcdyanw7.js +2 -0
- package/dist/chunk-zy3raqnk.js +3 -0
- package/dist/cli.js +47 -0
- package/dist/index.js +4 -0
- package/package.json +10 -9
- package/src/cli.ts +0 -272
- package/src/config.ts +0 -270
- package/src/index.ts +0 -197
- package/src/proxy.ts +0 -149
- package/src/types.ts +0 -154
- package/src/wallet.ts +0 -79
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{s as IW,t as OZ,u as q7,v as h5}from"./chunk-kn2k3qtn.js";import{$ as L8,$a as ZV,$b as JG,A as _Y,Aa as Rj,Ab as KV,Ac as KK,B as UL,Ba as RM,Bb as k$,Bc as g6,C as gV,Ca as kj,Cb as LQ,Cc as y6,D as E6,Da as PM,Db as HJ,Dc as Uw,E as eK,Ea as Tj,Eb as w6,Ec as Mw,F as C7,Fa as hV,Fb as k5,Fc as vV,G as $Q,Ga as xV,Gb as WG,Gc as dj,H as LJ,Ha as uV,Hb as IV,Hc as uj,I as R0,Ia as Pw,Ib as M6,Ic as rX,J as LP,Ja as jw,Jb as w8,Jc as lV,K as LH,Ka as T7,Kb as Q6,Kc as NQ,L as xj,La as hY,Lb as I5,Lc as WM,M as X5,Ma as zj,Mb as X6,Mc as n7,N as vj,Na as W5,Nb as DJ,Nc as pw,O as bj,Oa as tX,Ob as kV,Oc as O5,P as c1,Pa as A7,Pb as P6,Q as TM,Qa as bK,Qb as VW,R as iX,Ra as MK,Rb as CL,S as M5,Sa as LK,Sb as YW,T as iw,Ta as wK,Tb as hL,Tc as wQ,U as M8,Ua as PK,Ub as GW,V as X9,Va as Y5,Vb as L6,W as T6,Wa as Z8,Wb as r0,X as W$,Xa as RK,Xb as wV,Y as p0,Ya as OK,Yb as gM,Z as Y$,Za as NK,Zb as rY,_ as V0,_a as oY,_b as oM,aa as bJ,ab as _K,ac as QL,ba as F$,bb as UV,bc as XL,ca as LX,cb as FK,cc as WL,da as l9,db as SK,dc as FQ,ea as Q5,eb as BK,ec as YL,fa as S$,fb as CK,fc as GL,ga as ZX,gb as IK,gc as mM,ha as xY,hb as pY,hc as G$,ia as QQ,ib as kK,ic as S5,ja as L$,jb as TK,jc as _V,ka as v$,kb as AK,kc as JJ,la as PJ,lb as EK,lc as R$,ma as ZM,mb as hK,mc as B5,na as qK,nb as dY,nc as XW,oa as AM,ob as xK,oc as QW,pa as EM,pb as FM,pc as t9,qa as uX,qb as qV,qc as b$,ra as I7,rb as zM,rc as N6,sa as i0,sb as V5,sc as rL,ta as I9,tb as q5,tc as sY,ua as yj,ub as MQ,uc as VL,va as x7,vb as K5,vc as Ww,wa as JK,wb as KJ,wc as sX,xa as b9,xb as uw,xc as QV,ya as Pj,yb as u7,yc as JM,za as G5,zb as dw,zc as zK}from"./chunk-jrrt57tv.js";import{Uc as n8,Vc as JY,Wc as NW,Xc as Wz,dd as AJ,ed as IX,gd as E$,jd as s8}from"./chunk-fc5rfx0b.js";import{Cd as WX,Dd as B9,Ed as d1,Fd as EJ}from"./chunk-zy3raqnk.js";var Cq=B9((NZ,Bq)=>{(function($,J){function Q(S,K){if(!S)throw Error(K||"Assertion failed")}function X(S,K){S.super_=K;var D=function(){};D.prototype=K.prototype,S.prototype=new D,S.prototype.constructor=S}function W(S,K,D){if(W.isBN(S))return S;if(this.negative=0,this.words=null,this.length=0,this.red=null,S!==null){if(K==="le"||K==="be")D=K,K=10;this._init(S||0,K||10,D||"be")}}if(typeof $==="object")$.exports=W;else J.BN=W;W.BN=W,W.wordSize=26;var Y;try{if(typeof window<"u"&&typeof window.Buffer<"u")Y=window.Buffer;else Y=EJ("buffer").Buffer}catch(S){}W.isBN=function(K){if(K instanceof W)return!0;return K!==null&&typeof K==="object"&&K.constructor.wordSize===W.wordSize&&Array.isArray(K.words)},W.max=function(K,D){if(K.cmp(D)>0)return K;return D},W.min=function(K,D){if(K.cmp(D)<0)return K;return D},W.prototype._init=function(K,D,L){if(typeof K==="number")return this._initNumber(K,D,L);if(typeof K==="object")return this._initArray(K,D,L);if(D==="hex")D=16;Q(D===(D|0)&&D>=2&&D<=36),K=K.toString().replace(/\s+/g,"");var P=0;if(K[0]==="-")P++,this.negative=1;if(P<K.length){if(D===16)this._parseHex(K,P,L);else if(this._parseBase(K,D,P),L==="le")this._initArray(this.toArray(),D,L)}},W.prototype._initNumber=function(K,D,L){if(K<0)this.negative=1,K=-K;if(K<67108864)this.words=[K&67108863],this.length=1;else if(K<4503599627370496)this.words=[K&67108863,K/67108864&67108863],this.length=2;else Q(K<9007199254740992),this.words=[K&67108863,K/67108864&67108863,1],this.length=3;if(L!=="le")return;this._initArray(this.toArray(),D,L)},W.prototype._initArray=function(K,D,L){if(Q(typeof K.length==="number"),K.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(K.length/3),this.words=Array(this.length);for(var P=0;P<this.length;P++)this.words[P]=0;var O,C,x=0;if(L==="be"){for(P=K.length-1,O=0;P>=0;P-=3)if(C=K[P]|K[P-1]<<8|K[P-2]<<16,this.words[O]|=C<<x&67108863,this.words[O+1]=C>>>26-x&67108863,x+=24,x>=26)x-=26,O++}else if(L==="le"){for(P=0,O=0;P<K.length;P+=3)if(C=K[P]|K[P+1]<<8|K[P+2]<<16,this.words[O]|=C<<x&67108863,this.words[O+1]=C>>>26-x&67108863,x+=24,x>=26)x-=26,O++}return this._strip()};function G(S,K){var D=S.charCodeAt(K);if(D>=48&&D<=57)return D-48;else if(D>=65&&D<=70)return D-55;else if(D>=97&&D<=102)return D-87;else Q(!1,"Invalid character in "+S)}function V(S,K,D){var L=G(S,D);if(D-1>=K)L|=G(S,D-1)<<4;return L}W.prototype._parseHex=function(K,D,L){this.length=Math.ceil((K.length-D)/6),this.words=Array(this.length);for(var P=0;P<this.length;P++)this.words[P]=0;var O=0,C=0,x;if(L==="be")for(P=K.length-1;P>=D;P-=2)if(x=V(K,D,P)<<O,this.words[C]|=x&67108863,O>=18)O-=18,C+=1,this.words[C]|=x>>>26;else O+=8;else{var B=K.length-D;for(P=B%2===0?D+1:D;P<K.length;P+=2)if(x=V(K,D,P)<<O,this.words[C]|=x&67108863,O>=18)O-=18,C+=1,this.words[C]|=x>>>26;else O+=8}this._strip()};function q(S,K,D,L){var P=0,O=0,C=Math.min(S.length,D);for(var x=K;x<C;x++){var B=S.charCodeAt(x)-48;if(P*=L,B>=49)O=B-49+10;else if(B>=17)O=B-17+10;else O=B;Q(B>=0&&O<L,"Invalid character"),P+=O}return P}W.prototype._parseBase=function(K,D,L){this.words=[0],this.length=1;for(var P=0,O=1;O<=67108863;O*=D)P++;P--,O=O/D|0;var C=K.length-L,x=C%P,B=Math.min(C,C-x)+L,z=0;for(var T=L;T<B;T+=P)if(z=q(K,T,T+P,D),this.imuln(O),this.words[0]+z<67108864)this.words[0]+=z;else this._iaddn(z);if(x!==0){var s=1;z=q(K,T,K.length,D);for(T=0;T<x;T++)s*=D;if(this.imuln(s),this.words[0]+z<67108864)this.words[0]+=z;else this._iaddn(z)}this._strip()},W.prototype.copy=function(K){K.words=Array(this.length);for(var D=0;D<this.length;D++)K.words[D]=this.words[D];K.length=this.length,K.negative=this.negative,K.red=this.red};function H(S,K){S.words=K.words,S.length=K.length,S.negative=K.negative,S.red=K.red}if(W.prototype._move=function(K){H(K,this)},W.prototype.clone=function(){var K=new W(null);return this.copy(K),K},W.prototype._expand=function(K){while(this.length<K)this.words[this.length++]=0;return this},W.prototype._strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},W.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},typeof Symbol<"u"&&typeof Symbol.for==="function")try{W.prototype[Symbol.for("nodejs.util.inspect.custom")]=Z}catch(S){W.prototype.inspect=Z}else W.prototype.inspect=Z;function Z(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var M=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],j=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],R=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(W.prototype.toString=function(K,D){K=K||10,D=D|0||1;var L;if(K===16||K==="hex"){L="";var P=0,O=0;for(var C=0;C<this.length;C++){var x=this.words[C],B=((x<<P|O)&16777215).toString(16);if(O=x>>>24-P&16777215,P+=2,P>=26)P-=26,C--;if(O!==0||C!==this.length-1)L=M[6-B.length]+B+L;else L=B+L}if(O!==0)L=O.toString(16)+L;while(L.length%D!==0)L="0"+L;if(this.negative!==0)L="-"+L;return L}if(K===(K|0)&&K>=2&&K<=36){var z=j[K],T=R[K];L="";var s=this.clone();s.negative=0;while(!s.isZero()){var Y0=s.modrn(T).toString(K);if(s=s.idivn(T),!s.isZero())L=M[z-Y0.length]+Y0+L;else L=Y0+L}if(this.isZero())L="0"+L;while(L.length%D!==0)L="0"+L;if(this.negative!==0)L="-"+L;return L}Q(!1,"Base should be between 2 and 36")},W.prototype.toNumber=function(){var K=this.words[0];if(this.length===2)K+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)K+=4503599627370496+this.words[1]*67108864;else if(this.length>2)Q(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-K:K},W.prototype.toJSON=function(){return this.toString(16,2)},Y)W.prototype.toBuffer=function(K,D){return this.toArrayLike(Y,K,D)};W.prototype.toArray=function(K,D){return this.toArrayLike(Array,K,D)};var N=function(K,D){if(K.allocUnsafe)return K.allocUnsafe(D);return new K(D)};if(W.prototype.toArrayLike=function(K,D,L){this._strip();var P=this.byteLength(),O=L||Math.max(1,P);Q(P<=O,"byte array longer than desired length"),Q(O>0,"Requested array length <= 0");var C=N(K,O),x=D==="le"?"LE":"BE";return this["_toArrayLike"+x](C,P),C},W.prototype._toArrayLikeLE=function(K,D){var L=0,P=0;for(var O=0,C=0;O<this.length;O++){var x=this.words[O]<<C|P;if(K[L++]=x&255,L<K.length)K[L++]=x>>8&255;if(L<K.length)K[L++]=x>>16&255;if(C===6){if(L<K.length)K[L++]=x>>24&255;P=0,C=0}else P=x>>>24,C+=2}if(L<K.length){K[L++]=P;while(L<K.length)K[L++]=0}},W.prototype._toArrayLikeBE=function(K,D){var L=K.length-1,P=0;for(var O=0,C=0;O<this.length;O++){var x=this.words[O]<<C|P;if(K[L--]=x&255,L>=0)K[L--]=x>>8&255;if(L>=0)K[L--]=x>>16&255;if(C===6){if(L>=0)K[L--]=x>>24&255;P=0,C=0}else P=x>>>24,C+=2}if(L>=0){K[L--]=P;while(L>=0)K[L--]=0}},Math.clz32)W.prototype._countBits=function(K){return 32-Math.clz32(K)};else W.prototype._countBits=function(K){var D=K,L=0;if(D>=4096)L+=13,D>>>=13;if(D>=64)L+=7,D>>>=7;if(D>=8)L+=4,D>>>=4;if(D>=2)L+=2,D>>>=2;return L+D};W.prototype._zeroBits=function(K){if(K===0)return 26;var D=K,L=0;if((D&8191)===0)L+=13,D>>>=13;if((D&127)===0)L+=7,D>>>=7;if((D&15)===0)L+=4,D>>>=4;if((D&3)===0)L+=2,D>>>=2;if((D&1)===0)L++;return L},W.prototype.bitLength=function(){var K=this.words[this.length-1],D=this._countBits(K);return(this.length-1)*26+D};function A(S){var K=Array(S.bitLength());for(var D=0;D<K.length;D++){var L=D/26|0,P=D%26;K[D]=S.words[L]>>>P&1}return K}W.prototype.zeroBits=function(){if(this.isZero())return 0;var K=0;for(var D=0;D<this.length;D++){var L=this._zeroBits(this.words[D]);if(K+=L,L!==26)break}return K},W.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},W.prototype.toTwos=function(K){if(this.negative!==0)return this.abs().inotn(K).iaddn(1);return this.clone()},W.prototype.fromTwos=function(K){if(this.testn(K-1))return this.notn(K).iaddn(1).ineg();return this.clone()},W.prototype.isNeg=function(){return this.negative!==0},W.prototype.neg=function(){return this.clone().ineg()},W.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},W.prototype.iuor=function(K){while(this.length<K.length)this.words[this.length++]=0;for(var D=0;D<K.length;D++)this.words[D]=this.words[D]|K.words[D];return this._strip()},W.prototype.ior=function(K){return Q((this.negative|K.negative)===0),this.iuor(K)},W.prototype.or=function(K){if(this.length>K.length)return this.clone().ior(K);return K.clone().ior(this)},W.prototype.uor=function(K){if(this.length>K.length)return this.clone().iuor(K);return K.clone().iuor(this)},W.prototype.iuand=function(K){var D;if(this.length>K.length)D=K;else D=this;for(var L=0;L<D.length;L++)this.words[L]=this.words[L]&K.words[L];return this.length=D.length,this._strip()},W.prototype.iand=function(K){return Q((this.negative|K.negative)===0),this.iuand(K)},W.prototype.and=function(K){if(this.length>K.length)return this.clone().iand(K);return K.clone().iand(this)},W.prototype.uand=function(K){if(this.length>K.length)return this.clone().iuand(K);return K.clone().iuand(this)},W.prototype.iuxor=function(K){var D,L;if(this.length>K.length)D=this,L=K;else D=K,L=this;for(var P=0;P<L.length;P++)this.words[P]=D.words[P]^L.words[P];if(this!==D)for(;P<D.length;P++)this.words[P]=D.words[P];return this.length=D.length,this._strip()},W.prototype.ixor=function(K){return Q((this.negative|K.negative)===0),this.iuxor(K)},W.prototype.xor=function(K){if(this.length>K.length)return this.clone().ixor(K);return K.clone().ixor(this)},W.prototype.uxor=function(K){if(this.length>K.length)return this.clone().iuxor(K);return K.clone().iuxor(this)},W.prototype.inotn=function(K){Q(typeof K==="number"&&K>=0);var D=Math.ceil(K/26)|0,L=K%26;if(this._expand(D),L>0)D--;for(var P=0;P<D;P++)this.words[P]=~this.words[P]&67108863;if(L>0)this.words[P]=~this.words[P]&67108863>>26-L;return this._strip()},W.prototype.notn=function(K){return this.clone().inotn(K)},W.prototype.setn=function(K,D){Q(typeof K==="number"&&K>=0);var L=K/26|0,P=K%26;if(this._expand(L+1),D)this.words[L]=this.words[L]|1<<P;else this.words[L]=this.words[L]&~(1<<P);return this._strip()},W.prototype.iadd=function(K){var D;if(this.negative!==0&&K.negative===0)return this.negative=0,D=this.isub(K),this.negative^=1,this._normSign();else if(this.negative===0&&K.negative!==0)return K.negative=0,D=this.isub(K),K.negative=1,D._normSign();var L,P;if(this.length>K.length)L=this,P=K;else L=K,P=this;var O=0;for(var C=0;C<P.length;C++)D=(L.words[C]|0)+(P.words[C]|0)+O,this.words[C]=D&67108863,O=D>>>26;for(;O!==0&&C<L.length;C++)D=(L.words[C]|0)+O,this.words[C]=D&67108863,O=D>>>26;if(this.length=L.length,O!==0)this.words[this.length]=O,this.length++;else if(L!==this)for(;C<L.length;C++)this.words[C]=L.words[C];return this},W.prototype.add=function(K){var D;if(K.negative!==0&&this.negative===0)return K.negative=0,D=this.sub(K),K.negative^=1,D;else if(K.negative===0&&this.negative!==0)return this.negative=0,D=K.sub(this),this.negative=1,D;if(this.length>K.length)return this.clone().iadd(K);return K.clone().iadd(this)},W.prototype.isub=function(K){if(K.negative!==0){K.negative=0;var D=this.iadd(K);return K.negative=1,D._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(K),this.negative=1,this._normSign();var L=this.cmp(K);if(L===0)return this.negative=0,this.length=1,this.words[0]=0,this;var P,O;if(L>0)P=this,O=K;else P=K,O=this;var C=0;for(var x=0;x<O.length;x++)D=(P.words[x]|0)-(O.words[x]|0)+C,C=D>>26,this.words[x]=D&67108863;for(;C!==0&&x<P.length;x++)D=(P.words[x]|0)+C,C=D>>26,this.words[x]=D&67108863;if(C===0&&x<P.length&&P!==this)for(;x<P.length;x++)this.words[x]=P.words[x];if(this.length=Math.max(this.length,x),P!==this)this.negative=1;return this._strip()},W.prototype.sub=function(K){return this.clone().isub(K)};function E(S,K,D){D.negative=K.negative^S.negative;var L=S.length+K.length|0;D.length=L,L=L-1|0;var P=S.words[0]|0,O=K.words[0]|0,C=P*O,x=C&67108863,B=C/67108864|0;D.words[0]=x;for(var z=1;z<L;z++){var T=B>>>26,s=B&67108863,Y0=Math.min(z,K.length-1);for(var Z0=Math.max(0,z-S.length+1);Z0<=Y0;Z0++){var S0=z-Z0|0;P=S.words[S0]|0,O=K.words[Z0]|0,C=P*O+s,T+=C/67108864|0,s=C&67108863}D.words[z]=s|0,B=T|0}if(B!==0)D.words[z]=B|0;else D.length--;return D._strip()}var h=function(K,D,L){var P=K.words,O=D.words,C=L.words,x=0,B,z,T,s=P[0]|0,Y0=s&8191,Z0=s>>>13,S0=P[1]|0,T0=S0&8191,A0=S0>>>13,p9=P[2]|0,e0=p9&8191,G9=p9>>>13,s$=P[3]|0,N9=s$&8191,R9=s$>>>13,a8=P[4]|0,e9=a8&8191,_9=a8>>>13,BX=P[5]|0,$$=BX&8191,d9=BX>>>13,PW=P[6]|0,y9=PW&8191,u9=PW>>>13,CX=P[7]|0,c9=CX&8191,i9=CX>>>13,e5=P[8]|0,V$=e5&8191,a9=e5>>>13,RW=P[9]|0,g9=RW&8191,A9=RW>>>13,tQ=O[0]|0,E9=tQ&8191,m9=tQ>>>13,o8=O[1]|0,h9=o8&8191,o9=o8>>>13,$Y=O[2]|0,q$=$Y&8191,K$=$Y>>>13,TJ=O[3]|0,F9=TJ&8191,T9=TJ>>>13,OW=O[4]|0,n9=OW&8191,J$=OW>>>13,vG=O[5]|0,q9=vG&8191,Q$=vG>>>13,w=O[6]|0,F=w&8191,_=w>>>13,U=O[7]|0,I=U&8191,l=U>>>13,i=O[8]|0,e=i&8191,Q0=i>>>13,C0=O[9]|0,D0=C0&8191,h0=C0>>>13;L.negative=K.negative^D.negative,L.length=19,B=Math.imul(Y0,E9),z=Math.imul(Y0,m9),z=z+Math.imul(Z0,E9)|0,T=Math.imul(Z0,m9);var P0=(x+B|0)+((z&8191)<<13)|0;x=(T+(z>>>13)|0)+(P0>>>26)|0,P0&=67108863,B=Math.imul(T0,E9),z=Math.imul(T0,m9),z=z+Math.imul(A0,E9)|0,T=Math.imul(A0,m9),B=B+Math.imul(Y0,h9)|0,z=z+Math.imul(Y0,o9)|0,z=z+Math.imul(Z0,h9)|0,T=T+Math.imul(Z0,o9)|0;var v0=(x+B|0)+((z&8191)<<13)|0;x=(T+(z>>>13)|0)+(v0>>>26)|0,v0&=67108863,B=Math.imul(e0,E9),z=Math.imul(e0,m9),z=z+Math.imul(G9,E9)|0,T=Math.imul(G9,m9),B=B+Math.imul(T0,h9)|0,z=z+Math.imul(T0,o9)|0,z=z+Math.imul(A0,h9)|0,T=T+Math.imul(A0,o9)|0,B=B+Math.imul(Y0,q$)|0,z=z+Math.imul(Y0,K$)|0,z=z+Math.imul(Z0,q$)|0,T=T+Math.imul(Z0,K$)|0;var y0=(x+B|0)+((z&8191)<<13)|0;x=(T+(z>>>13)|0)+(y0>>>26)|0,y0&=67108863,B=Math.imul(N9,E9),z=Math.imul(N9,m9),z=z+Math.imul(R9,E9)|0,T=Math.imul(R9,m9),B=B+Math.imul(e0,h9)|0,z=z+Math.imul(e0,o9)|0,z=z+Math.imul(G9,h9)|0,T=T+Math.imul(G9,o9)|0,B=B+Math.imul(T0,q$)|0,z=z+Math.imul(T0,K$)|0,z=z+Math.imul(A0,q$)|0,T=T+Math.imul(A0,K$)|0,B=B+Math.imul(Y0,F9)|0,z=z+Math.imul(Y0,T9)|0,z=z+Math.imul(Z0,F9)|0,T=T+Math.imul(Z0,T9)|0;var u0=(x+B|0)+((z&8191)<<13)|0;x=(T+(z>>>13)|0)+(u0>>>26)|0,u0&=67108863,B=Math.imul(e9,E9),z=Math.imul(e9,m9),z=z+Math.imul(_9,E9)|0,T=Math.imul(_9,m9),B=B+Math.imul(N9,h9)|0,z=z+Math.imul(N9,o9)|0,z=z+Math.imul(R9,h9)|0,T=T+Math.imul(R9,o9)|0,B=B+Math.imul(e0,q$)|0,z=z+Math.imul(e0,K$)|0,z=z+Math.imul(G9,q$)|0,T=T+Math.imul(G9,K$)|0,B=B+Math.imul(T0,F9)|0,z=z+Math.imul(T0,T9)|0,z=z+Math.imul(A0,F9)|0,T=T+Math.imul(A0,T9)|0,B=B+Math.imul(Y0,n9)|0,z=z+Math.imul(Y0,J$)|0,z=z+Math.imul(Z0,n9)|0,T=T+Math.imul(Z0,J$)|0;var d0=(x+B|0)+((z&8191)<<13)|0;x=(T+(z>>>13)|0)+(d0>>>26)|0,d0&=67108863,B=Math.imul($$,E9),z=Math.imul($$,m9),z=z+Math.imul(d9,E9)|0,T=Math.imul(d9,m9),B=B+Math.imul(e9,h9)|0,z=z+Math.imul(e9,o9)|0,z=z+Math.imul(_9,h9)|0,T=T+Math.imul(_9,o9)|0,B=B+Math.imul(N9,q$)|0,z=z+Math.imul(N9,K$)|0,z=z+Math.imul(R9,q$)|0,T=T+Math.imul(R9,K$)|0,B=B+Math.imul(e0,F9)|0,z=z+Math.imul(e0,T9)|0,z=z+Math.imul(G9,F9)|0,T=T+Math.imul(G9,T9)|0,B=B+Math.imul(T0,n9)|0,z=z+Math.imul(T0,J$)|0,z=z+Math.imul(A0,n9)|0,T=T+Math.imul(A0,J$)|0,B=B+Math.imul(Y0,q9)|0,z=z+Math.imul(Y0,Q$)|0,z=z+Math.imul(Z0,q9)|0,T=T+Math.imul(Z0,Q$)|0;var g0=(x+B|0)+((z&8191)<<13)|0;x=(T+(z>>>13)|0)+(g0>>>26)|0,g0&=67108863,B=Math.imul(y9,E9),z=Math.imul(y9,m9),z=z+Math.imul(u9,E9)|0,T=Math.imul(u9,m9),B=B+Math.imul($$,h9)|0,z=z+Math.imul($$,o9)|0,z=z+Math.imul(d9,h9)|0,T=T+Math.imul(d9,o9)|0,B=B+Math.imul(e9,q$)|0,z=z+Math.imul(e9,K$)|0,z=z+Math.imul(_9,q$)|0,T=T+Math.imul(_9,K$)|0,B=B+Math.imul(N9,F9)|0,z=z+Math.imul(N9,T9)|0,z=z+Math.imul(R9,F9)|0,T=T+Math.imul(R9,T9)|0,B=B+Math.imul(e0,n9)|0,z=z+Math.imul(e0,J$)|0,z=z+Math.imul(G9,n9)|0,T=T+Math.imul(G9,J$)|0,B=B+Math.imul(T0,q9)|0,z=z+Math.imul(T0,Q$)|0,z=z+Math.imul(A0,q9)|0,T=T+Math.imul(A0,Q$)|0,B=B+Math.imul(Y0,F)|0,z=z+Math.imul(Y0,_)|0,z=z+Math.imul(Z0,F)|0,T=T+Math.imul(Z0,_)|0;var f0=(x+B|0)+((z&8191)<<13)|0;x=(T+(z>>>13)|0)+(f0>>>26)|0,f0&=67108863,B=Math.imul(c9,E9),z=Math.imul(c9,m9),z=z+Math.imul(i9,E9)|0,T=Math.imul(i9,m9),B=B+Math.imul(y9,h9)|0,z=z+Math.imul(y9,o9)|0,z=z+Math.imul(u9,h9)|0,T=T+Math.imul(u9,o9)|0,B=B+Math.imul($$,q$)|0,z=z+Math.imul($$,K$)|0,z=z+Math.imul(d9,q$)|0,T=T+Math.imul(d9,K$)|0,B=B+Math.imul(e9,F9)|0,z=z+Math.imul(e9,T9)|0,z=z+Math.imul(_9,F9)|0,T=T+Math.imul(_9,T9)|0,B=B+Math.imul(N9,n9)|0,z=z+Math.imul(N9,J$)|0,z=z+Math.imul(R9,n9)|0,T=T+Math.imul(R9,J$)|0,B=B+Math.imul(e0,q9)|0,z=z+Math.imul(e0,Q$)|0,z=z+Math.imul(G9,q9)|0,T=T+Math.imul(G9,Q$)|0,B=B+Math.imul(T0,F)|0,z=z+Math.imul(T0,_)|0,z=z+Math.imul(A0,F)|0,T=T+Math.imul(A0,_)|0,B=B+Math.imul(Y0,I)|0,z=z+Math.imul(Y0,l)|0,z=z+Math.imul(Z0,I)|0,T=T+Math.imul(Z0,l)|0;var m0=(x+B|0)+((z&8191)<<13)|0;x=(T+(z>>>13)|0)+(m0>>>26)|0,m0&=67108863,B=Math.imul(V$,E9),z=Math.imul(V$,m9),z=z+Math.imul(a9,E9)|0,T=Math.imul(a9,m9),B=B+Math.imul(c9,h9)|0,z=z+Math.imul(c9,o9)|0,z=z+Math.imul(i9,h9)|0,T=T+Math.imul(i9,o9)|0,B=B+Math.imul(y9,q$)|0,z=z+Math.imul(y9,K$)|0,z=z+Math.imul(u9,q$)|0,T=T+Math.imul(u9,K$)|0,B=B+Math.imul($$,F9)|0,z=z+Math.imul($$,T9)|0,z=z+Math.imul(d9,F9)|0,T=T+Math.imul(d9,T9)|0,B=B+Math.imul(e9,n9)|0,z=z+Math.imul(e9,J$)|0,z=z+Math.imul(_9,n9)|0,T=T+Math.imul(_9,J$)|0,B=B+Math.imul(N9,q9)|0,z=z+Math.imul(N9,Q$)|0,z=z+Math.imul(R9,q9)|0,T=T+Math.imul(R9,Q$)|0,B=B+Math.imul(e0,F)|0,z=z+Math.imul(e0,_)|0,z=z+Math.imul(G9,F)|0,T=T+Math.imul(G9,_)|0,B=B+Math.imul(T0,I)|0,z=z+Math.imul(T0,l)|0,z=z+Math.imul(A0,I)|0,T=T+Math.imul(A0,l)|0,B=B+Math.imul(Y0,e)|0,z=z+Math.imul(Y0,Q0)|0,z=z+Math.imul(Z0,e)|0,T=T+Math.imul(Z0,Q0)|0;var O0=(x+B|0)+((z&8191)<<13)|0;x=(T+(z>>>13)|0)+(O0>>>26)|0,O0&=67108863,B=Math.imul(g9,E9),z=Math.imul(g9,m9),z=z+Math.imul(A9,E9)|0,T=Math.imul(A9,m9),B=B+Math.imul(V$,h9)|0,z=z+Math.imul(V$,o9)|0,z=z+Math.imul(a9,h9)|0,T=T+Math.imul(a9,o9)|0,B=B+Math.imul(c9,q$)|0,z=z+Math.imul(c9,K$)|0,z=z+Math.imul(i9,q$)|0,T=T+Math.imul(i9,K$)|0,B=B+Math.imul(y9,F9)|0,z=z+Math.imul(y9,T9)|0,z=z+Math.imul(u9,F9)|0,T=T+Math.imul(u9,T9)|0,B=B+Math.imul($$,n9)|0,z=z+Math.imul($$,J$)|0,z=z+Math.imul(d9,n9)|0,T=T+Math.imul(d9,J$)|0,B=B+Math.imul(e9,q9)|0,z=z+Math.imul(e9,Q$)|0,z=z+Math.imul(_9,q9)|0,T=T+Math.imul(_9,Q$)|0,B=B+Math.imul(N9,F)|0,z=z+Math.imul(N9,_)|0,z=z+Math.imul(R9,F)|0,T=T+Math.imul(R9,_)|0,B=B+Math.imul(e0,I)|0,z=z+Math.imul(e0,l)|0,z=z+Math.imul(G9,I)|0,T=T+Math.imul(G9,l)|0,B=B+Math.imul(T0,e)|0,z=z+Math.imul(T0,Q0)|0,z=z+Math.imul(A0,e)|0,T=T+Math.imul(A0,Q0)|0,B=B+Math.imul(Y0,D0)|0,z=z+Math.imul(Y0,h0)|0,z=z+Math.imul(Z0,D0)|0,T=T+Math.imul(Z0,h0)|0;var I0=(x+B|0)+((z&8191)<<13)|0;x=(T+(z>>>13)|0)+(I0>>>26)|0,I0&=67108863,B=Math.imul(g9,h9),z=Math.imul(g9,o9),z=z+Math.imul(A9,h9)|0,T=Math.imul(A9,o9),B=B+Math.imul(V$,q$)|0,z=z+Math.imul(V$,K$)|0,z=z+Math.imul(a9,q$)|0,T=T+Math.imul(a9,K$)|0,B=B+Math.imul(c9,F9)|0,z=z+Math.imul(c9,T9)|0,z=z+Math.imul(i9,F9)|0,T=T+Math.imul(i9,T9)|0,B=B+Math.imul(y9,n9)|0,z=z+Math.imul(y9,J$)|0,z=z+Math.imul(u9,n9)|0,T=T+Math.imul(u9,J$)|0,B=B+Math.imul($$,q9)|0,z=z+Math.imul($$,Q$)|0,z=z+Math.imul(d9,q9)|0,T=T+Math.imul(d9,Q$)|0,B=B+Math.imul(e9,F)|0,z=z+Math.imul(e9,_)|0,z=z+Math.imul(_9,F)|0,T=T+Math.imul(_9,_)|0,B=B+Math.imul(N9,I)|0,z=z+Math.imul(N9,l)|0,z=z+Math.imul(R9,I)|0,T=T+Math.imul(R9,l)|0,B=B+Math.imul(e0,e)|0,z=z+Math.imul(e0,Q0)|0,z=z+Math.imul(G9,e)|0,T=T+Math.imul(G9,Q0)|0,B=B+Math.imul(T0,D0)|0,z=z+Math.imul(T0,h0)|0,z=z+Math.imul(A0,D0)|0,T=T+Math.imul(A0,h0)|0;var w0=(x+B|0)+((z&8191)<<13)|0;x=(T+(z>>>13)|0)+(w0>>>26)|0,w0&=67108863,B=Math.imul(g9,q$),z=Math.imul(g9,K$),z=z+Math.imul(A9,q$)|0,T=Math.imul(A9,K$),B=B+Math.imul(V$,F9)|0,z=z+Math.imul(V$,T9)|0,z=z+Math.imul(a9,F9)|0,T=T+Math.imul(a9,T9)|0,B=B+Math.imul(c9,n9)|0,z=z+Math.imul(c9,J$)|0,z=z+Math.imul(i9,n9)|0,T=T+Math.imul(i9,J$)|0,B=B+Math.imul(y9,q9)|0,z=z+Math.imul(y9,Q$)|0,z=z+Math.imul(u9,q9)|0,T=T+Math.imul(u9,Q$)|0,B=B+Math.imul($$,F)|0,z=z+Math.imul($$,_)|0,z=z+Math.imul(d9,F)|0,T=T+Math.imul(d9,_)|0,B=B+Math.imul(e9,I)|0,z=z+Math.imul(e9,l)|0,z=z+Math.imul(_9,I)|0,T=T+Math.imul(_9,l)|0,B=B+Math.imul(N9,e)|0,z=z+Math.imul(N9,Q0)|0,z=z+Math.imul(R9,e)|0,T=T+Math.imul(R9,Q0)|0,B=B+Math.imul(e0,D0)|0,z=z+Math.imul(e0,h0)|0,z=z+Math.imul(G9,D0)|0,T=T+Math.imul(G9,h0)|0;var F0=(x+B|0)+((z&8191)<<13)|0;x=(T+(z>>>13)|0)+(F0>>>26)|0,F0&=67108863,B=Math.imul(g9,F9),z=Math.imul(g9,T9),z=z+Math.imul(A9,F9)|0,T=Math.imul(A9,T9),B=B+Math.imul(V$,n9)|0,z=z+Math.imul(V$,J$)|0,z=z+Math.imul(a9,n9)|0,T=T+Math.imul(a9,J$)|0,B=B+Math.imul(c9,q9)|0,z=z+Math.imul(c9,Q$)|0,z=z+Math.imul(i9,q9)|0,T=T+Math.imul(i9,Q$)|0,B=B+Math.imul(y9,F)|0,z=z+Math.imul(y9,_)|0,z=z+Math.imul(u9,F)|0,T=T+Math.imul(u9,_)|0,B=B+Math.imul($$,I)|0,z=z+Math.imul($$,l)|0,z=z+Math.imul(d9,I)|0,T=T+Math.imul(d9,l)|0,B=B+Math.imul(e9,e)|0,z=z+Math.imul(e9,Q0)|0,z=z+Math.imul(_9,e)|0,T=T+Math.imul(_9,Q0)|0,B=B+Math.imul(N9,D0)|0,z=z+Math.imul(N9,h0)|0,z=z+Math.imul(R9,D0)|0,T=T+Math.imul(R9,h0)|0;var B0=(x+B|0)+((z&8191)<<13)|0;x=(T+(z>>>13)|0)+(B0>>>26)|0,B0&=67108863,B=Math.imul(g9,n9),z=Math.imul(g9,J$),z=z+Math.imul(A9,n9)|0,T=Math.imul(A9,J$),B=B+Math.imul(V$,q9)|0,z=z+Math.imul(V$,Q$)|0,z=z+Math.imul(a9,q9)|0,T=T+Math.imul(a9,Q$)|0,B=B+Math.imul(c9,F)|0,z=z+Math.imul(c9,_)|0,z=z+Math.imul(i9,F)|0,T=T+Math.imul(i9,_)|0,B=B+Math.imul(y9,I)|0,z=z+Math.imul(y9,l)|0,z=z+Math.imul(u9,I)|0,T=T+Math.imul(u9,l)|0,B=B+Math.imul($$,e)|0,z=z+Math.imul($$,Q0)|0,z=z+Math.imul(d9,e)|0,T=T+Math.imul(d9,Q0)|0,B=B+Math.imul(e9,D0)|0,z=z+Math.imul(e9,h0)|0,z=z+Math.imul(_9,D0)|0,T=T+Math.imul(_9,h0)|0;var M0=(x+B|0)+((z&8191)<<13)|0;x=(T+(z>>>13)|0)+(M0>>>26)|0,M0&=67108863,B=Math.imul(g9,q9),z=Math.imul(g9,Q$),z=z+Math.imul(A9,q9)|0,T=Math.imul(A9,Q$),B=B+Math.imul(V$,F)|0,z=z+Math.imul(V$,_)|0,z=z+Math.imul(a9,F)|0,T=T+Math.imul(a9,_)|0,B=B+Math.imul(c9,I)|0,z=z+Math.imul(c9,l)|0,z=z+Math.imul(i9,I)|0,T=T+Math.imul(i9,l)|0,B=B+Math.imul(y9,e)|0,z=z+Math.imul(y9,Q0)|0,z=z+Math.imul(u9,e)|0,T=T+Math.imul(u9,Q0)|0,B=B+Math.imul($$,D0)|0,z=z+Math.imul($$,h0)|0,z=z+Math.imul(d9,D0)|0,T=T+Math.imul(d9,h0)|0;var r=(x+B|0)+((z&8191)<<13)|0;x=(T+(z>>>13)|0)+(r>>>26)|0,r&=67108863,B=Math.imul(g9,F),z=Math.imul(g9,_),z=z+Math.imul(A9,F)|0,T=Math.imul(A9,_),B=B+Math.imul(V$,I)|0,z=z+Math.imul(V$,l)|0,z=z+Math.imul(a9,I)|0,T=T+Math.imul(a9,l)|0,B=B+Math.imul(c9,e)|0,z=z+Math.imul(c9,Q0)|0,z=z+Math.imul(i9,e)|0,T=T+Math.imul(i9,Q0)|0,B=B+Math.imul(y9,D0)|0,z=z+Math.imul(y9,h0)|0,z=z+Math.imul(u9,D0)|0,T=T+Math.imul(u9,h0)|0;var t=(x+B|0)+((z&8191)<<13)|0;x=(T+(z>>>13)|0)+(t>>>26)|0,t&=67108863,B=Math.imul(g9,I),z=Math.imul(g9,l),z=z+Math.imul(A9,I)|0,T=Math.imul(A9,l),B=B+Math.imul(V$,e)|0,z=z+Math.imul(V$,Q0)|0,z=z+Math.imul(a9,e)|0,T=T+Math.imul(a9,Q0)|0,B=B+Math.imul(c9,D0)|0,z=z+Math.imul(c9,h0)|0,z=z+Math.imul(i9,D0)|0,T=T+Math.imul(i9,h0)|0;var W0=(x+B|0)+((z&8191)<<13)|0;x=(T+(z>>>13)|0)+(W0>>>26)|0,W0&=67108863,B=Math.imul(g9,e),z=Math.imul(g9,Q0),z=z+Math.imul(A9,e)|0,T=Math.imul(A9,Q0),B=B+Math.imul(V$,D0)|0,z=z+Math.imul(V$,h0)|0,z=z+Math.imul(a9,D0)|0,T=T+Math.imul(a9,h0)|0;var $0=(x+B|0)+((z&8191)<<13)|0;x=(T+(z>>>13)|0)+($0>>>26)|0,$0&=67108863,B=Math.imul(g9,D0),z=Math.imul(g9,h0),z=z+Math.imul(A9,D0)|0,T=Math.imul(A9,h0);var J0=(x+B|0)+((z&8191)<<13)|0;if(x=(T+(z>>>13)|0)+(J0>>>26)|0,J0&=67108863,C[0]=P0,C[1]=v0,C[2]=y0,C[3]=u0,C[4]=d0,C[5]=g0,C[6]=f0,C[7]=m0,C[8]=O0,C[9]=I0,C[10]=w0,C[11]=F0,C[12]=B0,C[13]=M0,C[14]=r,C[15]=t,C[16]=W0,C[17]=$0,C[18]=J0,x!==0)C[19]=x,L.length++;return L};if(!Math.imul)h=E;function y(S,K,D){D.negative=K.negative^S.negative,D.length=S.length+K.length;var L=0,P=0;for(var O=0;O<D.length-1;O++){var C=P;P=0;var x=L&67108863,B=Math.min(O,K.length-1);for(var z=Math.max(0,O-S.length+1);z<=B;z++){var T=O-z,s=S.words[T]|0,Y0=K.words[z]|0,Z0=s*Y0,S0=Z0&67108863;C=C+(Z0/67108864|0)|0,S0=S0+x|0,x=S0&67108863,C=C+(S0>>>26)|0,P+=C>>>26,C&=67108863}D.words[O]=x,L=C,C=P}if(L!==0)D.words[O]=L;else D.length--;return D._strip()}function k(S,K,D){return y(S,K,D)}W.prototype.mulTo=function(K,D){var L,P=this.length+K.length;if(this.length===10&&K.length===10)L=h(this,K,D);else if(P<63)L=E(this,K,D);else if(P<1024)L=y(this,K,D);else L=k(this,K,D);return L};function v(S,K){this.x=S,this.y=K}v.prototype.makeRBT=function(K){var D=Array(K),L=W.prototype._countBits(K)-1;for(var P=0;P<K;P++)D[P]=this.revBin(P,L,K);return D},v.prototype.revBin=function(K,D,L){if(K===0||K===L-1)return K;var P=0;for(var O=0;O<D;O++)P|=(K&1)<<D-O-1,K>>=1;return P},v.prototype.permute=function(K,D,L,P,O,C){for(var x=0;x<C;x++)P[x]=D[K[x]],O[x]=L[K[x]]},v.prototype.transform=function(K,D,L,P,O,C){this.permute(C,K,D,L,P,O);for(var x=1;x<O;x<<=1){var B=x<<1,z=Math.cos(2*Math.PI/B),T=Math.sin(2*Math.PI/B);for(var s=0;s<O;s+=B){var Y0=z,Z0=T;for(var S0=0;S0<x;S0++){var T0=L[s+S0],A0=P[s+S0],p9=L[s+S0+x],e0=P[s+S0+x],G9=Y0*p9-Z0*e0;if(e0=Y0*e0+Z0*p9,p9=G9,L[s+S0]=T0+p9,P[s+S0]=A0+e0,L[s+S0+x]=T0-p9,P[s+S0+x]=A0-e0,S0!==B)G9=z*Y0-T*Z0,Z0=z*Z0+T*Y0,Y0=G9}}}},v.prototype.guessLen13b=function(K,D){var L=Math.max(D,K)|1,P=L&1,O=0;for(L=L/2|0;L;L=L>>>1)O++;return 1<<O+1+P},v.prototype.conjugate=function(K,D,L){if(L<=1)return;for(var P=0;P<L/2;P++){var O=K[P];K[P]=K[L-P-1],K[L-P-1]=O,O=D[P],D[P]=-D[L-P-1],D[L-P-1]=-O}},v.prototype.normalize13b=function(K,D){var L=0;for(var P=0;P<D/2;P++){var O=Math.round(K[2*P+1]/D)*8192+Math.round(K[2*P]/D)+L;if(K[P]=O&67108863,O<67108864)L=0;else L=O/67108864|0}return K},v.prototype.convert13b=function(K,D,L,P){var O=0;for(var C=0;C<D;C++)O=O+(K[C]|0),L[2*C]=O&8191,O=O>>>13,L[2*C+1]=O&8191,O=O>>>13;for(C=2*D;C<P;++C)L[C]=0;Q(O===0),Q((O&-8192)===0)},v.prototype.stub=function(K){var D=Array(K);for(var L=0;L<K;L++)D[L]=0;return D},v.prototype.mulp=function(K,D,L){var P=2*this.guessLen13b(K.length,D.length),O=this.makeRBT(P),C=this.stub(P),x=Array(P),B=Array(P),z=Array(P),T=Array(P),s=Array(P),Y0=Array(P),Z0=L.words;Z0.length=P,this.convert13b(K.words,K.length,x,P),this.convert13b(D.words,D.length,T,P),this.transform(x,C,B,z,P,O),this.transform(T,C,s,Y0,P,O);for(var S0=0;S0<P;S0++){var T0=B[S0]*s[S0]-z[S0]*Y0[S0];z[S0]=B[S0]*Y0[S0]+z[S0]*s[S0],B[S0]=T0}return this.conjugate(B,z,P),this.transform(B,z,Z0,C,P,O),this.conjugate(Z0,C,P),this.normalize13b(Z0,P),L.negative=K.negative^D.negative,L.length=K.length+D.length,L._strip()},W.prototype.mul=function(K){var D=new W(null);return D.words=Array(this.length+K.length),this.mulTo(K,D)},W.prototype.mulf=function(K){var D=new W(null);return D.words=Array(this.length+K.length),k(this,K,D)},W.prototype.imul=function(K){return this.clone().mulTo(K,this)},W.prototype.imuln=function(K){var D=K<0;if(D)K=-K;Q(typeof K==="number"),Q(K<67108864);var L=0;for(var P=0;P<this.length;P++){var O=(this.words[P]|0)*K,C=(O&67108863)+(L&67108863);L>>=26,L+=O/67108864|0,L+=C>>>26,this.words[P]=C&67108863}if(L!==0)this.words[P]=L,this.length++;return this.length=K===0?1:this.length,D?this.ineg():this},W.prototype.muln=function(K){return this.clone().imuln(K)},W.prototype.sqr=function(){return this.mul(this)},W.prototype.isqr=function(){return this.imul(this.clone())},W.prototype.pow=function(K){var D=A(K);if(D.length===0)return new W(1);var L=this;for(var P=0;P<D.length;P++,L=L.sqr())if(D[P]!==0)break;if(++P<D.length)for(var O=L.sqr();P<D.length;P++,O=O.sqr()){if(D[P]===0)continue;L=L.mul(O)}return L},W.prototype.iushln=function(K){Q(typeof K==="number"&&K>=0);var D=K%26,L=(K-D)/26,P=67108863>>>26-D<<26-D,O;if(D!==0){var C=0;for(O=0;O<this.length;O++){var x=this.words[O]&P,B=(this.words[O]|0)-x<<D;this.words[O]=B|C,C=x>>>26-D}if(C)this.words[O]=C,this.length++}if(L!==0){for(O=this.length-1;O>=0;O--)this.words[O+L]=this.words[O];for(O=0;O<L;O++)this.words[O]=0;this.length+=L}return this._strip()},W.prototype.ishln=function(K){return Q(this.negative===0),this.iushln(K)},W.prototype.iushrn=function(K,D,L){Q(typeof K==="number"&&K>=0);var P;if(D)P=(D-D%26)/26;else P=0;var O=K%26,C=Math.min((K-O)/26,this.length),x=67108863^67108863>>>O<<O,B=L;if(P-=C,P=Math.max(0,P),B){for(var z=0;z<C;z++)B.words[z]=this.words[z];B.length=C}if(C===0);else if(this.length>C){this.length-=C;for(z=0;z<this.length;z++)this.words[z]=this.words[z+C]}else this.words[0]=0,this.length=1;var T=0;for(z=this.length-1;z>=0&&(T!==0||z>=P);z--){var s=this.words[z]|0;this.words[z]=T<<26-O|s>>>O,T=s&x}if(B&&T!==0)B.words[B.length++]=T;if(this.length===0)this.words[0]=0,this.length=1;return this._strip()},W.prototype.ishrn=function(K,D,L){return Q(this.negative===0),this.iushrn(K,D,L)},W.prototype.shln=function(K){return this.clone().ishln(K)},W.prototype.ushln=function(K){return this.clone().iushln(K)},W.prototype.shrn=function(K){return this.clone().ishrn(K)},W.prototype.ushrn=function(K){return this.clone().iushrn(K)},W.prototype.testn=function(K){Q(typeof K==="number"&&K>=0);var D=K%26,L=(K-D)/26,P=1<<D;if(this.length<=L)return!1;var O=this.words[L];return!!(O&P)},W.prototype.imaskn=function(K){Q(typeof K==="number"&&K>=0);var D=K%26,L=(K-D)/26;if(Q(this.negative===0,"imaskn works only with positive numbers"),this.length<=L)return this;if(D!==0)L++;if(this.length=Math.min(L,this.length),D!==0){var P=67108863^67108863>>>D<<D;this.words[this.length-1]&=P}return this._strip()},W.prototype.maskn=function(K){return this.clone().imaskn(K)},W.prototype.iaddn=function(K){if(Q(typeof K==="number"),Q(K<67108864),K<0)return this.isubn(-K);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<=K)return this.words[0]=K-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(K),this.negative=1,this}return this._iaddn(K)},W.prototype._iaddn=function(K){this.words[0]+=K;for(var D=0;D<this.length&&this.words[D]>=67108864;D++)if(this.words[D]-=67108864,D===this.length-1)this.words[D+1]=1;else this.words[D+1]++;return this.length=Math.max(this.length,D+1),this},W.prototype.isubn=function(K){if(Q(typeof K==="number"),Q(K<67108864),K<0)return this.iaddn(-K);if(this.negative!==0)return this.negative=0,this.iaddn(K),this.negative=1,this;if(this.words[0]-=K,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var D=0;D<this.length&&this.words[D]<0;D++)this.words[D]+=67108864,this.words[D+1]-=1;return this._strip()},W.prototype.addn=function(K){return this.clone().iaddn(K)},W.prototype.subn=function(K){return this.clone().isubn(K)},W.prototype.iabs=function(){return this.negative=0,this},W.prototype.abs=function(){return this.clone().iabs()},W.prototype._ishlnsubmul=function(K,D,L){var P=K.length+L,O;this._expand(P);var C,x=0;for(O=0;O<K.length;O++){C=(this.words[O+L]|0)+x;var B=(K.words[O]|0)*D;C-=B&67108863,x=(C>>26)-(B/67108864|0),this.words[O+L]=C&67108863}for(;O<this.length-L;O++)C=(this.words[O+L]|0)+x,x=C>>26,this.words[O+L]=C&67108863;if(x===0)return this._strip();Q(x===-1),x=0;for(O=0;O<this.length;O++)C=-(this.words[O]|0)+x,x=C>>26,this.words[O]=C&67108863;return this.negative=1,this._strip()},W.prototype._wordDiv=function(K,D){var L=this.length-K.length,P=this.clone(),O=K,C=O.words[O.length-1]|0,x=this._countBits(C);if(L=26-x,L!==0)O=O.ushln(L),P.iushln(L),C=O.words[O.length-1]|0;var B=P.length-O.length,z;if(D!=="mod"){z=new W(null),z.length=B+1,z.words=Array(z.length);for(var T=0;T<z.length;T++)z.words[T]=0}var s=P.clone()._ishlnsubmul(O,1,B);if(s.negative===0){if(P=s,z)z.words[B]=1}for(var Y0=B-1;Y0>=0;Y0--){var Z0=(P.words[O.length+Y0]|0)*67108864+(P.words[O.length+Y0-1]|0);Z0=Math.min(Z0/C|0,67108863),P._ishlnsubmul(O,Z0,Y0);while(P.negative!==0)if(Z0--,P.negative=0,P._ishlnsubmul(O,1,Y0),!P.isZero())P.negative^=1;if(z)z.words[Y0]=Z0}if(z)z._strip();if(P._strip(),D!=="div"&&L!==0)P.iushrn(L);return{div:z||null,mod:P}},W.prototype.divmod=function(K,D,L){if(Q(!K.isZero()),this.isZero())return{div:new W(0),mod:new W(0)};var P,O,C;if(this.negative!==0&&K.negative===0){if(C=this.neg().divmod(K,D),D!=="mod")P=C.div.neg();if(D!=="div"){if(O=C.mod.neg(),L&&O.negative!==0)O.iadd(K)}return{div:P,mod:O}}if(this.negative===0&&K.negative!==0){if(C=this.divmod(K.neg(),D),D!=="mod")P=C.div.neg();return{div:P,mod:C.mod}}if((this.negative&K.negative)!==0){if(C=this.neg().divmod(K.neg(),D),D!=="div"){if(O=C.mod.neg(),L&&O.negative!==0)O.isub(K)}return{div:C.div,mod:O}}if(K.length>this.length||this.cmp(K)<0)return{div:new W(0),mod:this};if(K.length===1){if(D==="div")return{div:this.divn(K.words[0]),mod:null};if(D==="mod")return{div:null,mod:new W(this.modrn(K.words[0]))};return{div:this.divn(K.words[0]),mod:new W(this.modrn(K.words[0]))}}return this._wordDiv(K,D)},W.prototype.div=function(K){return this.divmod(K,"div",!1).div},W.prototype.mod=function(K){return this.divmod(K,"mod",!1).mod},W.prototype.umod=function(K){return this.divmod(K,"mod",!0).mod},W.prototype.divRound=function(K){var D=this.divmod(K);if(D.mod.isZero())return D.div;var L=D.div.negative!==0?D.mod.isub(K):D.mod,P=K.ushrn(1),O=K.andln(1),C=L.cmp(P);if(C<0||O===1&&C===0)return D.div;return D.div.negative!==0?D.div.isubn(1):D.div.iaddn(1)},W.prototype.modrn=function(K){var D=K<0;if(D)K=-K;Q(K<=67108863);var L=67108864%K,P=0;for(var O=this.length-1;O>=0;O--)P=(L*P+(this.words[O]|0))%K;return D?-P:P},W.prototype.modn=function(K){return this.modrn(K)},W.prototype.idivn=function(K){var D=K<0;if(D)K=-K;Q(K<=67108863);var L=0;for(var P=this.length-1;P>=0;P--){var O=(this.words[P]|0)+L*67108864;this.words[P]=O/K|0,L=O%K}return this._strip(),D?this.ineg():this},W.prototype.divn=function(K){return this.clone().idivn(K)},W.prototype.egcd=function(K){Q(K.negative===0),Q(!K.isZero());var D=this,L=K.clone();if(D.negative!==0)D=D.umod(K);else D=D.clone();var P=new W(1),O=new W(0),C=new W(0),x=new W(1),B=0;while(D.isEven()&&L.isEven())D.iushrn(1),L.iushrn(1),++B;var z=L.clone(),T=D.clone();while(!D.isZero()){for(var s=0,Y0=1;(D.words[0]&Y0)===0&&s<26;++s,Y0<<=1);if(s>0){D.iushrn(s);while(s-- >0){if(P.isOdd()||O.isOdd())P.iadd(z),O.isub(T);P.iushrn(1),O.iushrn(1)}}for(var Z0=0,S0=1;(L.words[0]&S0)===0&&Z0<26;++Z0,S0<<=1);if(Z0>0){L.iushrn(Z0);while(Z0-- >0){if(C.isOdd()||x.isOdd())C.iadd(z),x.isub(T);C.iushrn(1),x.iushrn(1)}}if(D.cmp(L)>=0)D.isub(L),P.isub(C),O.isub(x);else L.isub(D),C.isub(P),x.isub(O)}return{a:C,b:x,gcd:L.iushln(B)}},W.prototype._invmp=function(K){Q(K.negative===0),Q(!K.isZero());var D=this,L=K.clone();if(D.negative!==0)D=D.umod(K);else D=D.clone();var P=new W(1),O=new W(0),C=L.clone();while(D.cmpn(1)>0&&L.cmpn(1)>0){for(var x=0,B=1;(D.words[0]&B)===0&&x<26;++x,B<<=1);if(x>0){D.iushrn(x);while(x-- >0){if(P.isOdd())P.iadd(C);P.iushrn(1)}}for(var z=0,T=1;(L.words[0]&T)===0&&z<26;++z,T<<=1);if(z>0){L.iushrn(z);while(z-- >0){if(O.isOdd())O.iadd(C);O.iushrn(1)}}if(D.cmp(L)>=0)D.isub(L),P.isub(O);else L.isub(D),O.isub(P)}var s;if(D.cmpn(1)===0)s=P;else s=O;if(s.cmpn(0)<0)s.iadd(K);return s},W.prototype.gcd=function(K){if(this.isZero())return K.abs();if(K.isZero())return this.abs();var D=this.clone(),L=K.clone();D.negative=0,L.negative=0;for(var P=0;D.isEven()&&L.isEven();P++)D.iushrn(1),L.iushrn(1);do{while(D.isEven())D.iushrn(1);while(L.isEven())L.iushrn(1);var O=D.cmp(L);if(O<0){var C=D;D=L,L=C}else if(O===0||L.cmpn(1)===0)break;D.isub(L)}while(!0);return L.iushln(P)},W.prototype.invm=function(K){return this.egcd(K).a.umod(K)},W.prototype.isEven=function(){return(this.words[0]&1)===0},W.prototype.isOdd=function(){return(this.words[0]&1)===1},W.prototype.andln=function(K){return this.words[0]&K},W.prototype.bincn=function(K){Q(typeof K==="number");var D=K%26,L=(K-D)/26,P=1<<D;if(this.length<=L)return this._expand(L+1),this.words[L]|=P,this;var O=P;for(var C=L;O!==0&&C<this.length;C++){var x=this.words[C]|0;x+=O,O=x>>>26,x&=67108863,this.words[C]=x}if(O!==0)this.words[C]=O,this.length++;return this},W.prototype.isZero=function(){return this.length===1&&this.words[0]===0},W.prototype.cmpn=function(K){var D=K<0;if(this.negative!==0&&!D)return-1;if(this.negative===0&&D)return 1;this._strip();var L;if(this.length>1)L=1;else{if(D)K=-K;Q(K<=67108863,"Number is too big");var P=this.words[0]|0;L=P===K?0:P<K?-1:1}if(this.negative!==0)return-L|0;return L},W.prototype.cmp=function(K){if(this.negative!==0&&K.negative===0)return-1;if(this.negative===0&&K.negative!==0)return 1;var D=this.ucmp(K);if(this.negative!==0)return-D|0;return D},W.prototype.ucmp=function(K){if(this.length>K.length)return 1;if(this.length<K.length)return-1;var D=0;for(var L=this.length-1;L>=0;L--){var P=this.words[L]|0,O=K.words[L]|0;if(P===O)continue;if(P<O)D=-1;else if(P>O)D=1;break}return D},W.prototype.gtn=function(K){return this.cmpn(K)===1},W.prototype.gt=function(K){return this.cmp(K)===1},W.prototype.gten=function(K){return this.cmpn(K)>=0},W.prototype.gte=function(K){return this.cmp(K)>=0},W.prototype.ltn=function(K){return this.cmpn(K)===-1},W.prototype.lt=function(K){return this.cmp(K)===-1},W.prototype.lten=function(K){return this.cmpn(K)<=0},W.prototype.lte=function(K){return this.cmp(K)<=0},W.prototype.eqn=function(K){return this.cmpn(K)===0},W.prototype.eq=function(K){return this.cmp(K)===0},W.red=function(K){return new n(K)},W.prototype.toRed=function(K){return Q(!this.red,"Already a number in reduction context"),Q(this.negative===0,"red works only with positives"),K.convertTo(this)._forceRed(K)},W.prototype.fromRed=function(){return Q(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},W.prototype._forceRed=function(K){return this.red=K,this},W.prototype.forceRed=function(K){return Q(!this.red,"Already a number in reduction context"),this._forceRed(K)},W.prototype.redAdd=function(K){return Q(this.red,"redAdd works only with red numbers"),this.red.add(this,K)},W.prototype.redIAdd=function(K){return Q(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,K)},W.prototype.redSub=function(K){return Q(this.red,"redSub works only with red numbers"),this.red.sub(this,K)},W.prototype.redISub=function(K){return Q(this.red,"redISub works only with red numbers"),this.red.isub(this,K)},W.prototype.redShl=function(K){return Q(this.red,"redShl works only with red numbers"),this.red.shl(this,K)},W.prototype.redMul=function(K){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,K),this.red.mul(this,K)},W.prototype.redIMul=function(K){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,K),this.red.imul(this,K)},W.prototype.redSqr=function(){return Q(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},W.prototype.redISqr=function(){return Q(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},W.prototype.redSqrt=function(){return Q(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},W.prototype.redInvm=function(){return Q(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},W.prototype.redNeg=function(){return Q(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},W.prototype.redPow=function(K){return Q(this.red&&!K.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,K)};var f={k256:null,p224:null,p192:null,p25519:null};function d(S,K){this.name=S,this.p=new W(K,16),this.n=this.p.bitLength(),this.k=new W(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}d.prototype._tmp=function(){var K=new W(null);return K.words=Array(Math.ceil(this.n/13)),K},d.prototype.ireduce=function(K){var D=K,L;do this.split(D,this.tmp),D=this.imulK(D),D=D.iadd(this.tmp),L=D.bitLength();while(L>this.n);var P=L<this.n?-1:D.ucmp(this.p);if(P===0)D.words[0]=0,D.length=1;else if(P>0)D.isub(this.p);else if(D.strip!==void 0)D.strip();else D._strip();return D},d.prototype.split=function(K,D){K.iushrn(this.n,0,D)},d.prototype.imulK=function(K){return K.imul(this.k)};function c(){d.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}X(c,d),c.prototype.split=function(K,D){var L=4194303,P=Math.min(K.length,9);for(var O=0;O<P;O++)D.words[O]=K.words[O];if(D.length=P,K.length<=9){K.words[0]=0,K.length=1;return}var C=K.words[9];D.words[D.length++]=C&L;for(O=10;O<K.length;O++){var x=K.words[O]|0;K.words[O-10]=(x&L)<<4|C>>>22,C=x}if(C>>>=22,K.words[O-10]=C,C===0&&K.length>10)K.length-=10;else K.length-=9},c.prototype.imulK=function(K){K.words[K.length]=0,K.words[K.length+1]=0,K.length+=2;var D=0;for(var L=0;L<K.length;L++){var P=K.words[L]|0;D+=P*977,K.words[L]=D&67108863,D=P*64+(D/67108864|0)}if(K.words[K.length-1]===0){if(K.length--,K.words[K.length-1]===0)K.length--}return K};function o(){d.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}X(o,d);function p(){d.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}X(p,d);function u(){d.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}X(u,d),u.prototype.imulK=function(K){var D=0;for(var L=0;L<K.length;L++){var P=(K.words[L]|0)*19+D,O=P&67108863;P>>>=26,K.words[L]=O,D=P}if(D!==0)K.words[K.length++]=D;return K},W._prime=function(K){if(f[K])return f[K];var D;if(K==="k256")D=new c;else if(K==="p224")D=new o;else if(K==="p192")D=new p;else if(K==="p25519")D=new u;else throw Error("Unknown prime "+K);return f[K]=D,D};function n(S){if(typeof S==="string"){var K=W._prime(S);this.m=K.p,this.prime=K}else Q(S.gtn(1),"modulus must be greater than 1"),this.m=S,this.prime=null}n.prototype._verify1=function(K){Q(K.negative===0,"red works only with positives"),Q(K.red,"red works only with red numbers")},n.prototype._verify2=function(K,D){Q((K.negative|D.negative)===0,"red works only with positives"),Q(K.red&&K.red===D.red,"red works only with red numbers")},n.prototype.imod=function(K){if(this.prime)return this.prime.ireduce(K)._forceRed(this);return H(K,K.umod(this.m)._forceRed(this)),K},n.prototype.neg=function(K){if(K.isZero())return K.clone();return this.m.sub(K)._forceRed(this)},n.prototype.add=function(K,D){this._verify2(K,D);var L=K.add(D);if(L.cmp(this.m)>=0)L.isub(this.m);return L._forceRed(this)},n.prototype.iadd=function(K,D){this._verify2(K,D);var L=K.iadd(D);if(L.cmp(this.m)>=0)L.isub(this.m);return L},n.prototype.sub=function(K,D){this._verify2(K,D);var L=K.sub(D);if(L.cmpn(0)<0)L.iadd(this.m);return L._forceRed(this)},n.prototype.isub=function(K,D){this._verify2(K,D);var L=K.isub(D);if(L.cmpn(0)<0)L.iadd(this.m);return L},n.prototype.shl=function(K,D){return this._verify1(K),this.imod(K.ushln(D))},n.prototype.imul=function(K,D){return this._verify2(K,D),this.imod(K.imul(D))},n.prototype.mul=function(K,D){return this._verify2(K,D),this.imod(K.mul(D))},n.prototype.isqr=function(K){return this.imul(K,K.clone())},n.prototype.sqr=function(K){return this.mul(K,K)},n.prototype.sqrt=function(K){if(K.isZero())return K.clone();var D=this.m.andln(3);if(Q(D%2===1),D===3){var L=this.m.add(new W(1)).iushrn(2);return this.pow(K,L)}var P=this.m.subn(1),O=0;while(!P.isZero()&&P.andln(1)===0)O++,P.iushrn(1);Q(!P.isZero());var C=new W(1).toRed(this),x=C.redNeg(),B=this.m.subn(1).iushrn(1),z=this.m.bitLength();z=new W(2*z*z).toRed(this);while(this.pow(z,B).cmp(x)!==0)z.redIAdd(x);var T=this.pow(z,P),s=this.pow(K,P.addn(1).iushrn(1)),Y0=this.pow(K,P),Z0=O;while(Y0.cmp(C)!==0){var S0=Y0;for(var T0=0;S0.cmp(C)!==0;T0++)S0=S0.redSqr();Q(T0<Z0);var A0=this.pow(T,new W(1).iushln(Z0-T0-1));s=s.redMul(A0),T=A0.redSqr(),Y0=Y0.redMul(T),Z0=T0}return s},n.prototype.invm=function(K){var D=K._invmp(this.m);if(D.negative!==0)return D.negative=0,this.imod(D).redNeg();else return this.imod(D)},n.prototype.pow=function(K,D){if(D.isZero())return new W(1).toRed(this);if(D.cmpn(1)===0)return K.clone();var L=4,P=Array(1<<L);P[0]=new W(1).toRed(this),P[1]=K;for(var O=2;O<P.length;O++)P[O]=this.mul(P[O-1],K);var C=P[0],x=0,B=0,z=D.bitLength()%26;if(z===0)z=26;for(O=D.length-1;O>=0;O--){var T=D.words[O];for(var s=z-1;s>=0;s--){var Y0=T>>s&1;if(C!==P[0])C=this.sqr(C);if(Y0===0&&x===0){B=0;continue}if(x<<=1,x|=Y0,B++,B!==L&&(O!==0||s!==0))continue;C=this.mul(C,P[x]),B=0,x=0}z=26}return C},n.prototype.convertTo=function(K){var D=K.umod(this.m);return D===K?D.clone():D},n.prototype.convertFrom=function(K){var D=K.clone();return D.red=null,D},W.mont=function(K){return new g(K)};function g(S){if(n.call(this,S),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new W(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}X(g,n),g.prototype.convertTo=function(K){return this.imod(K.ushln(this.shift))},g.prototype.convertFrom=function(K){var D=this.imod(K.mul(this.rinv));return D.red=null,D},g.prototype.imul=function(K,D){if(K.isZero()||D.isZero())return K.words[0]=0,K.length=1,K;var L=K.imul(D),P=L.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),O=L.isub(P).iushrn(this.shift),C=O;if(O.cmp(this.m)>=0)C=O.isub(this.m);else if(O.cmpn(0)<0)C=O.iadd(this.m);return C._forceRed(this)},g.prototype.mul=function(K,D){if(K.isZero()||D.isZero())return new W(0)._forceRed(this);var L=K.mul(D),P=L.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),O=L.isub(P).iushrn(this.shift),C=O;if(O.cmp(this.m)>=0)C=O.isub(this.m);else if(O.cmpn(0)<0)C=O.iadd(this.m);return C._forceRed(this)},g.prototype.invm=function(K){var D=this.imod(K._invmp(this.m).mul(this.r2));return D._forceRed(this)}})(typeof Bq>"u"||Bq,NZ)});var kq=B9((Iq,FZ)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var fG=EJ("buffer"),VQ=fG.Buffer;function _Z($,J){for(var Q in $)J[Q]=$[Q]}if(VQ.from&&VQ.alloc&&VQ.allocUnsafe&&VQ.allocUnsafeSlow)FZ.exports=fG;else _Z(fG,Iq),Iq.Buffer=AX;function AX($,J,Q){return VQ($,J,Q)}AX.prototype=Object.create(VQ.prototype);_Z(VQ,AX);AX.from=function($,J,Q){if(typeof $==="number")throw TypeError("Argument must not be a number");return VQ($,J,Q)};AX.alloc=function($,J,Q){if(typeof $!=="number")throw TypeError("Argument must be a number");var X=VQ($);if(J!==void 0)if(typeof Q==="string")X.fill(J,Q);else X.fill(J);else X.fill(0);return X};AX.allocUnsafe=function($){if(typeof $!=="number")throw TypeError("Argument must be a number");return VQ($)};AX.allocUnsafeSlow=function($){if(typeof $!=="number")throw TypeError("Argument must be a number");return fG.SlowBuffer($)}});var BZ=B9((kj9,SZ)=>{var lG=kq().Buffer;function yS($){if($.length>=255)throw TypeError("Alphabet too long");var J=new Uint8Array(256);for(var Q=0;Q<J.length;Q++)J[Q]=255;for(var X=0;X<$.length;X++){var W=$.charAt(X),Y=W.charCodeAt(0);if(J[Y]!==255)throw TypeError(W+" is ambiguous");J[Y]=X}var G=$.length,V=$.charAt(0),q=Math.log(G)/Math.log(256),H=Math.log(256)/Math.log(G);function Z(R){if(Array.isArray(R)||R instanceof Uint8Array)R=lG.from(R);if(!lG.isBuffer(R))throw TypeError("Expected Buffer");if(R.length===0)return"";var N=0,A=0,E=0,h=R.length;while(E!==h&&R[E]===0)E++,N++;var y=(h-E)*H+1>>>0,k=new Uint8Array(y);while(E!==h){var v=R[E],f=0;for(var d=y-1;(v!==0||f<A)&&d!==-1;d--,f++)v+=256*k[d]>>>0,k[d]=v%G>>>0,v=v/G>>>0;if(v!==0)throw Error("Non-zero carry");A=f,E++}var c=y-A;while(c!==y&&k[c]===0)c++;var o=V.repeat(N);for(;c<y;++c)o+=$.charAt(k[c]);return o}function M(R){if(typeof R!=="string")throw TypeError("Expected String");if(R.length===0)return lG.alloc(0);var N=0,A=0,E=0;while(R[N]===V)A++,N++;var h=(R.length-N)*q+1>>>0,y=new Uint8Array(h);while(N<R.length){var k=R.charCodeAt(N);if(k>255)return;var v=J[k];if(v===255)return;var f=0;for(var d=h-1;(v!==0||f<E)&&d!==-1;d--,f++)v+=G*y[d]>>>0,y[d]=v%256>>>0,v=v/256>>>0;if(v!==0)throw Error("Non-zero carry");E=f,N++}var c=h-E;while(c!==h&&y[c]===0)c++;var o=lG.allocUnsafe(A+(h-c));o.fill(0,0,A);var p=A;while(c!==h)o[p++]=y[c++];return o}function j(R){var N=M(R);if(N)return N;throw Error("Non-base"+G+" character")}return{encode:Z,decodeUnsafe:M,decode:j}}SZ.exports=yS});var IZ=B9((Tj9,CZ)=>{var gS=BZ(),mS="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";CZ.exports=gS(mS)});var TZ=B9((bj9,kZ)=>{var pG=kq().Buffer;function fS($){if($.length>=255)throw TypeError("Alphabet too long");var J=new Uint8Array(256);for(var Q=0;Q<J.length;Q++)J[Q]=255;for(var X=0;X<$.length;X++){var W=$.charAt(X),Y=W.charCodeAt(0);if(J[Y]!==255)throw TypeError(W+" is ambiguous");J[Y]=X}var G=$.length,V=$.charAt(0),q=Math.log(G)/Math.log(256),H=Math.log(256)/Math.log(G);function Z(R){if(Array.isArray(R)||R instanceof Uint8Array)R=pG.from(R);if(!pG.isBuffer(R))throw TypeError("Expected Buffer");if(R.length===0)return"";var N=0,A=0,E=0,h=R.length;while(E!==h&&R[E]===0)E++,N++;var y=(h-E)*H+1>>>0,k=new Uint8Array(y);while(E!==h){var v=R[E],f=0;for(var d=y-1;(v!==0||f<A)&&d!==-1;d--,f++)v+=256*k[d]>>>0,k[d]=v%G>>>0,v=v/G>>>0;if(v!==0)throw Error("Non-zero carry");A=f,E++}var c=y-A;while(c!==y&&k[c]===0)c++;var o=V.repeat(N);for(;c<y;++c)o+=$.charAt(k[c]);return o}function M(R){if(typeof R!=="string")throw TypeError("Expected String");if(R.length===0)return pG.alloc(0);var N=0,A=0,E=0;while(R[N]===V)A++,N++;var h=(R.length-N)*q+1>>>0,y=new Uint8Array(h);while(N<R.length){var k=R.charCodeAt(N);if(k>255)return;var v=J[k];if(v===255)return;var f=0;for(var d=h-1;(v!==0||f<E)&&d!==-1;d--,f++)v+=G*y[d]>>>0,y[d]=v%256>>>0,v=v/256>>>0;if(v!==0)throw Error("Non-zero carry");E=f,N++}var c=h-E;while(c!==h&&y[c]===0)c++;var o=pG.allocUnsafe(A+(h-c));o.fill(0,0,A);var p=A;while(c!==h)o[p++]=y[c++];return o}function j(R){var N=M(R);if(N)return N;throw Error("Non-base"+G+" character")}return{encode:Z,decodeUnsafe:M,decode:j}}kZ.exports=fS});var EZ=B9((yj9,AZ)=>{var lS=TZ(),pS="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";AZ.exports=lS(pS)});var hZ=B9((aS)=>{function W8($,J,Q){return J<=$&&$<=Q}function aG($){if($===void 0)return{};if($===Object($))return $;throw TypeError("Could not convert argument to dictionary")}function dS($){var J=String($),Q=J.length,X=0,W=[];while(X<Q){var Y=J.charCodeAt(X);if(Y<55296||Y>57343)W.push(Y);else if(56320<=Y&&Y<=57343)W.push(65533);else if(55296<=Y&&Y<=56319)if(X===Q-1)W.push(65533);else{var G=$.charCodeAt(X+1);if(56320<=G&&G<=57343){var V=Y&1023,q=G&1023;W.push(65536+(V<<10)+q),X+=1}else W.push(65533)}X+=1}return W}function uS($){var J="";for(var Q=0;Q<$.length;++Q){var X=$[Q];if(X<=65535)J+=String.fromCharCode(X);else X-=65536,J+=String.fromCharCode((X>>10)+55296,(X&1023)+56320)}return J}var dG=-1;function Aq($){this.tokens=[].slice.call($)}Aq.prototype={endOfStream:function(){return!this.tokens.length},read:function(){if(!this.tokens.length)return dG;return this.tokens.shift()},prepend:function($){if(Array.isArray($)){var J=$;while(J.length)this.tokens.unshift(J.pop())}else this.tokens.unshift($)},push:function($){if(Array.isArray($)){var J=$;while(J.length)this.tokens.push(J.shift())}else this.tokens.push($)}};var kW=-1;function Tq($,J){if($)throw TypeError("Decoder error");return J||65533}var uG="utf-8";function cG($,J){if(!(this instanceof cG))return new cG($,J);if($=$!==void 0?String($).toLowerCase():uG,$!==uG)throw Error("Encoding not supported. Only utf-8 is supported");J=aG(J),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=Boolean(J.fatal),this._ignoreBOM=Boolean(J.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}cG.prototype={decode:function(J,Q){var X;if(typeof J==="object"&&J instanceof ArrayBuffer)X=new Uint8Array(J);else if(typeof J==="object"&&"buffer"in J&&J.buffer instanceof ArrayBuffer)X=new Uint8Array(J.buffer,J.byteOffset,J.byteLength);else X=new Uint8Array(0);if(Q=aG(Q),!this._streaming)this._decoder=new cS({fatal:this._fatal}),this._BOMseen=!1;this._streaming=Boolean(Q.stream);var W=new Aq(X),Y=[],G;while(!W.endOfStream()){if(G=this._decoder.handler(W,W.read()),G===kW)break;if(G===null)continue;if(Array.isArray(G))Y.push.apply(Y,G);else Y.push(G)}if(!this._streaming){do{if(G=this._decoder.handler(W,W.read()),G===kW)break;if(G===null)continue;if(Array.isArray(G))Y.push.apply(Y,G);else Y.push(G)}while(!W.endOfStream());this._decoder=null}if(Y.length){if(["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen)if(Y[0]===65279)this._BOMseen=!0,Y.shift();else this._BOMseen=!0}return uS(Y)}};function iG($,J){if(!(this instanceof iG))return new iG($,J);if($=$!==void 0?String($).toLowerCase():uG,$!==uG)throw Error("Encoding not supported. Only utf-8 is supported");J=aG(J),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(J.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}iG.prototype={encode:function(J,Q){if(J=J?String(J):"",Q=aG(Q),!this._streaming)this._encoder=new iS(this._options);this._streaming=Boolean(Q.stream);var X=[],W=new Aq(dS(J)),Y;while(!W.endOfStream()){if(Y=this._encoder.handler(W,W.read()),Y===kW)break;if(Array.isArray(Y))X.push.apply(X,Y);else X.push(Y)}if(!this._streaming){while(!0){if(Y=this._encoder.handler(W,W.read()),Y===kW)break;if(Array.isArray(Y))X.push.apply(X,Y);else X.push(Y)}this._encoder=null}return new Uint8Array(X)}};function cS($){var J=$.fatal,Q=0,X=0,W=0,Y=128,G=191;this.handler=function(V,q){if(q===dG&&W!==0)return W=0,Tq(J);if(q===dG)return kW;if(W===0){if(W8(q,0,127))return q;if(W8(q,194,223))W=1,Q=q-192;else if(W8(q,224,239)){if(q===224)Y=160;if(q===237)G=159;W=2,Q=q-224}else if(W8(q,240,244)){if(q===240)Y=144;if(q===244)G=143;W=3,Q=q-240}else return Tq(J);return Q=Q<<6*W,null}if(!W8(q,Y,G))return Q=W=X=0,Y=128,G=191,V.prepend(q),Tq(J);if(Y=128,G=191,X+=1,Q+=q-128<<6*(W-X),X!==W)return null;var H=Q;return Q=W=X=0,H}}function iS($){var J=$.fatal;this.handler=function(Q,X){if(X===dG)return kW;if(W8(X,0,127))return X;var W,Y;if(W8(X,128,2047))W=1,Y=192;else if(W8(X,2048,65535))W=2,Y=224;else if(W8(X,65536,1114111))W=3,Y=240;var G=[(X>>6*W)+Y];while(W>0){var V=X>>6*(W-1);G.push(128|V&63),W-=1}return G}}aS.TextEncoder=iG;aS.TextDecoder=cG});var gZ=B9((C9)=>{var sS=C9&&C9.__createBinding||(Object.create?function($,J,Q,X){if(X===void 0)X=Q;Object.defineProperty($,X,{enumerable:!0,get:function(){return J[Q]}})}:function($,J,Q,X){if(X===void 0)X=Q;$[X]=J[Q]}),rS=C9&&C9.__setModuleDefault||(Object.create?function($,J){Object.defineProperty($,"default",{enumerable:!0,value:J})}:function($,J){$.default=J}),qQ=C9&&C9.__decorate||function($,J,Q,X){var W=arguments.length,Y=W<3?J:X===null?X=Object.getOwnPropertyDescriptor(J,Q):X,G;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")Y=Reflect.decorate($,J,Q,X);else for(var V=$.length-1;V>=0;V--)if(G=$[V])Y=(W<3?G(Y):W>3?G(J,Q,Y):G(J,Q))||Y;return W>3&&Y&&Object.defineProperty(J,Q,Y),Y},tS=C9&&C9.__importStar||function($){if($&&$.__esModule)return $;var J={};if($!=null){for(var Q in $)if(Q!=="default"&&Object.hasOwnProperty.call($,Q))sS(J,$,Q)}return rS(J,$),J},xZ=C9&&C9.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(C9,"__esModule",{value:!0});C9.deserializeUnchecked=C9.deserialize=C9.serialize=C9.BinaryReader=C9.BinaryWriter=C9.BorshError=C9.baseDecode=C9.baseEncode=void 0;var JX=xZ(Cq()),vZ=xZ(EZ()),eS=tS(hZ()),$B=typeof TextDecoder!=="function"?eS.TextDecoder:TextDecoder,JB=new $B("utf-8",{fatal:!0});function QB($){if(typeof $==="string")$=Buffer.from($,"utf8");return vZ.default.encode(Buffer.from($))}C9.baseEncode=QB;function XB($){return Buffer.from(vZ.default.decode($))}C9.baseDecode=XB;var Eq=1024;class l$ extends Error{constructor($){super($);this.fieldPath=[],this.originalMessage=$}addToFieldPath($){this.fieldPath.splice(0,0,$),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}C9.BorshError=l$;class hq{constructor(){this.buf=Buffer.alloc(Eq),this.length=0}maybeResize(){if(this.buf.length<16+this.length)this.buf=Buffer.concat([this.buf,Buffer.alloc(Eq)])}writeU8($){this.maybeResize(),this.buf.writeUInt8($,this.length),this.length+=1}writeU16($){this.maybeResize(),this.buf.writeUInt16LE($,this.length),this.length+=2}writeU32($){this.maybeResize(),this.buf.writeUInt32LE($,this.length),this.length+=4}writeU64($){this.maybeResize(),this.writeBuffer(Buffer.from(new JX.default($).toArray("le",8)))}writeU128($){this.maybeResize(),this.writeBuffer(Buffer.from(new JX.default($).toArray("le",16)))}writeU256($){this.maybeResize(),this.writeBuffer(Buffer.from(new JX.default($).toArray("le",32)))}writeU512($){this.maybeResize(),this.writeBuffer(Buffer.from(new JX.default($).toArray("le",64)))}writeBuffer($){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),$,Buffer.alloc(Eq)]),this.length+=$.length}writeString($){this.maybeResize();let J=Buffer.from($,"utf8");this.writeU32(J.length),this.writeBuffer(J)}writeFixedArray($){this.writeBuffer(Buffer.from($))}writeArray($,J){this.maybeResize(),this.writeU32($.length);for(let Q of $)this.maybeResize(),J(Q)}toArray(){return this.buf.subarray(0,this.length)}}C9.BinaryWriter=hq;function KQ($,J,Q){let X=Q.value;Q.value=function(...W){try{return X.apply(this,W)}catch(Y){if(Y instanceof RangeError){let G=Y.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(G)>=0)throw new l$("Reached the end of buffer when deserializing")}throw Y}}}class YJ{constructor($){this.buf=$,this.offset=0}readU8(){let $=this.buf.readUInt8(this.offset);return this.offset+=1,$}readU16(){let $=this.buf.readUInt16LE(this.offset);return this.offset+=2,$}readU32(){let $=this.buf.readUInt32LE(this.offset);return this.offset+=4,$}readU64(){let $=this.readBuffer(8);return new JX.default($,"le")}readU128(){let $=this.readBuffer(16);return new JX.default($,"le")}readU256(){let $=this.readBuffer(32);return new JX.default($,"le")}readU512(){let $=this.readBuffer(64);return new JX.default($,"le")}readBuffer($){if(this.offset+$>this.buf.length)throw new l$(`Expected buffer length ${$} isn't within bounds`);let J=this.buf.slice(this.offset,this.offset+$);return this.offset+=$,J}readString(){let $=this.readU32(),J=this.readBuffer($);try{return JB.decode(J)}catch(Q){throw new l$(`Error decoding UTF-8 string: ${Q}`)}}readFixedArray($){return new Uint8Array(this.readBuffer($))}readArray($){let J=this.readU32(),Q=Array();for(let X=0;X<J;++X)Q.push($());return Q}}qQ([KQ],YJ.prototype,"readU8",null);qQ([KQ],YJ.prototype,"readU16",null);qQ([KQ],YJ.prototype,"readU32",null);qQ([KQ],YJ.prototype,"readU64",null);qQ([KQ],YJ.prototype,"readU128",null);qQ([KQ],YJ.prototype,"readU256",null);qQ([KQ],YJ.prototype,"readU512",null);qQ([KQ],YJ.prototype,"readString",null);qQ([KQ],YJ.prototype,"readFixedArray",null);qQ([KQ],YJ.prototype,"readArray",null);C9.BinaryReader=YJ;function bZ($){return $.charAt(0).toUpperCase()+$.slice(1)}function EX($,J,Q,X,W){try{if(typeof X==="string")W[`write${bZ(X)}`](Q);else if(X instanceof Array)if(typeof X[0]==="number"){if(Q.length!==X[0])throw new l$(`Expecting byte array of length ${X[0]}, but got ${Q.length} bytes`);W.writeFixedArray(Q)}else if(X.length===2&&typeof X[1]==="number"){if(Q.length!==X[1])throw new l$(`Expecting byte array of length ${X[1]}, but got ${Q.length} bytes`);for(let Y=0;Y<X[1];Y++)EX($,null,Q[Y],X[0],W)}else W.writeArray(Q,(Y)=>{EX($,J,Y,X[0],W)});else if(X.kind!==void 0)switch(X.kind){case"option":{if(Q===null||Q===void 0)W.writeU8(0);else W.writeU8(1),EX($,J,Q,X.type,W);break}case"map":{W.writeU32(Q.size),Q.forEach((Y,G)=>{EX($,J,G,X.key,W),EX($,J,Y,X.value,W)});break}default:throw new l$(`FieldType ${X} unrecognized`)}else yZ($,Q,W)}catch(Y){if(Y instanceof l$)Y.addToFieldPath(J);throw Y}}function yZ($,J,Q){if(typeof J.borshSerialize==="function"){J.borshSerialize(Q);return}let X=$.get(J.constructor);if(!X)throw new l$(`Class ${J.constructor.name} is missing in schema`);if(X.kind==="struct")X.fields.map(([W,Y])=>{EX($,W,J[W],Y,Q)});else if(X.kind==="enum"){let W=J[X.field];for(let Y=0;Y<X.values.length;++Y){let[G,V]=X.values[Y];if(G===W){Q.writeU8(Y),EX($,G,J[G],V,Q);break}}}else throw new l$(`Unexpected schema kind: ${X.kind} for ${J.constructor.name}`)}function WB($,J,Q=hq){let X=new Q;return yZ($,J,X),X.toArray()}C9.serialize=WB;function hX($,J,Q,X){try{if(typeof Q==="string")return X[`read${bZ(Q)}`]();if(Q instanceof Array)if(typeof Q[0]==="number")return X.readFixedArray(Q[0]);else if(typeof Q[1]==="number"){let W=[];for(let Y=0;Y<Q[1];Y++)W.push(hX($,null,Q[0],X));return W}else return X.readArray(()=>hX($,J,Q[0],X));if(Q.kind==="option"){if(X.readU8())return hX($,J,Q.type,X);return}if(Q.kind==="map"){let W=new Map,Y=X.readU32();for(let G=0;G<Y;G++){let V=hX($,J,Q.key,X),q=hX($,J,Q.value,X);W.set(V,q)}return W}return xq($,Q,X)}catch(W){if(W instanceof l$)W.addToFieldPath(J);throw W}}function xq($,J,Q){if(typeof J.borshDeserialize==="function")return J.borshDeserialize(Q);let X=$.get(J);if(!X)throw new l$(`Class ${J.name} is missing in schema`);if(X.kind==="struct"){let W={};for(let[Y,G]of $.get(J).fields)W[Y]=hX($,Y,G,Q);return new J(W)}if(X.kind==="enum"){let W=Q.readU8();if(W>=X.values.length)throw new l$(`Enum index: ${W} is out of range`);let[Y,G]=X.values[W],V=hX($,Y,G,Q);return new J({[Y]:V})}throw new l$(`Unexpected schema kind: ${X.kind} for ${J.constructor.name}`)}function YB($,J,Q,X=YJ){let W=new X(Q),Y=xq($,J,W);if(W.offset<Q.length)throw new l$(`Unexpected ${Q.length-W.offset} bytes after deserialized data`);return Y}C9.deserialize=YB;function GB($,J,Q,X=YJ){let W=new X(Q);return xq($,J,W)}C9.deserializeUnchecked=GB});var J1=B9((mZ)=>{Object.defineProperty(mZ,"__esModule",{value:!0});mZ.s16=mZ.s8=mZ.nu64be=mZ.u48be=mZ.u40be=mZ.u32be=mZ.u24be=mZ.u16be=mZ.nu64=mZ.u48=mZ.u40=mZ.u32=mZ.u24=mZ.u16=mZ.u8=mZ.offset=mZ.greedy=mZ.Constant=mZ.UTF8=mZ.CString=mZ.Blob=mZ.Boolean=mZ.BitField=mZ.BitStructure=mZ.VariantLayout=mZ.Union=mZ.UnionLayoutDiscriminator=mZ.UnionDiscriminator=mZ.Structure=mZ.Sequence=mZ.DoubleBE=mZ.Double=mZ.FloatBE=mZ.Float=mZ.NearInt64BE=mZ.NearInt64=mZ.NearUInt64BE=mZ.NearUInt64=mZ.IntBE=mZ.Int=mZ.UIntBE=mZ.UInt=mZ.OffsetLayout=mZ.GreedyCount=mZ.ExternalLayout=mZ.bindConstructorLayout=mZ.nameWithProperty=mZ.Layout=mZ.uint8ArrayToBuffer=mZ.checkUint8Array=void 0;mZ.constant=mZ.utf8=mZ.cstr=mZ.blob=mZ.unionLayoutDiscriminator=mZ.union=mZ.seq=mZ.bits=mZ.struct=mZ.f64be=mZ.f64=mZ.f32be=mZ.f32=mZ.ns64be=mZ.s48be=mZ.s40be=mZ.s32be=mZ.s24be=mZ.s16be=mZ.ns64=mZ.s48=mZ.s40=mZ.s32=mZ.s24=void 0;var bq=EJ("buffer");function AW($){if(!($ instanceof Uint8Array))throw TypeError("b must be a Uint8Array")}mZ.checkUint8Array=AW;function j9($){return AW($),bq.Buffer.from($.buffer,$.byteOffset,$.length)}mZ.uint8ArrayToBuffer=j9;class P9{constructor($,J){if(!Number.isInteger($))throw TypeError("span must be an integer");this.span=$,this.property=J}makeDestinationObject(){return{}}getSpan($,J){if(0>this.span)throw RangeError("indeterminate span");return this.span}replicate($){let J=Object.create(this.constructor.prototype);return Object.assign(J,this),J.property=$,J}fromArray($){return}}mZ.Layout=P9;function yq($,J){if(J.property)return $+"["+J.property+"]";return $}mZ.nameWithProperty=yq;function VB($,J){if(typeof $!=="function")throw TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call($,"layout_"))throw Error("Class is already bound to a layout");if(!(J&&J instanceof P9))throw TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(J,"boundConstructor_"))throw Error("layout is already bound to a constructor");$.layout_=J,J.boundConstructor_=$,J.makeDestinationObject=()=>new $,Object.defineProperty($.prototype,"encode",{value(Q,X){return J.encode(this,Q,X)},writable:!0}),Object.defineProperty($,"decode",{value(Q,X){return J.decode(Q,X)},writable:!0})}mZ.bindConstructorLayout=VB;class e$ extends P9{isCount(){throw Error("ExternalLayout is abstract")}}mZ.ExternalLayout=e$;class gq extends e${constructor($=1,J){if(!Number.isInteger($)||0>=$)throw TypeError("elementSpan must be a (positive) integer");super(-1,J);this.elementSpan=$}isCount(){return!0}decode($,J=0){AW($);let Q=$.length-J;return Math.floor(Q/this.elementSpan)}encode($,J,Q){return 0}}mZ.GreedyCount=gq;class oG extends e${constructor($,J=0,Q){if(!($ instanceof P9))throw TypeError("layout must be a Layout");if(!Number.isInteger(J))throw TypeError("offset must be integer or undefined");super($.span,Q||$.property);this.layout=$,this.offset=J}isCount(){return this.layout instanceof jJ||this.layout instanceof hJ}decode($,J=0){return this.layout.decode($,J+this.offset)}encode($,J,Q=0){return this.layout.encode($,J,Q+this.offset)}}mZ.OffsetLayout=oG;class jJ extends P9{constructor($,J){super($,J);if(6<this.span)throw RangeError("span must not exceed 6 bytes")}decode($,J=0){return j9($).readUIntLE(J,this.span)}encode($,J,Q=0){return j9(J).writeUIntLE($,Q,this.span),this.span}}mZ.UInt=jJ;class hJ extends P9{constructor($,J){super($,J);if(6<this.span)throw RangeError("span must not exceed 6 bytes")}decode($,J=0){return j9($).readUIntBE(J,this.span)}encode($,J,Q=0){return j9(J).writeUIntBE($,Q,this.span),this.span}}mZ.UIntBE=hJ;class QX extends P9{constructor($,J){super($,J);if(6<this.span)throw RangeError("span must not exceed 6 bytes")}decode($,J=0){return j9($).readIntLE(J,this.span)}encode($,J,Q=0){return j9(J).writeIntLE($,Q,this.span),this.span}}mZ.Int=QX;class xX extends P9{constructor($,J){super($,J);if(6<this.span)throw RangeError("span must not exceed 6 bytes")}decode($,J=0){return j9($).readIntBE(J,this.span)}encode($,J,Q=0){return j9(J).writeIntBE($,Q,this.span),this.span}}mZ.IntBE=xX;var vq=Math.pow(2,32);function nG($){let J=Math.floor($/vq),Q=$-J*vq;return{hi32:J,lo32:Q}}function sG($,J){return $*vq+J}class mq extends P9{constructor($){super(8,$)}decode($,J=0){let Q=j9($),X=Q.readUInt32LE(J),W=Q.readUInt32LE(J+4);return sG(W,X)}encode($,J,Q=0){let X=nG($),W=j9(J);return W.writeUInt32LE(X.lo32,Q),W.writeUInt32LE(X.hi32,Q+4),8}}mZ.NearUInt64=mq;class fq extends P9{constructor($){super(8,$)}decode($,J=0){let Q=j9($),X=Q.readUInt32BE(J),W=Q.readUInt32BE(J+4);return sG(X,W)}encode($,J,Q=0){let X=nG($),W=j9(J);return W.writeUInt32BE(X.hi32,Q),W.writeUInt32BE(X.lo32,Q+4),8}}mZ.NearUInt64BE=fq;class lq extends P9{constructor($){super(8,$)}decode($,J=0){let Q=j9($),X=Q.readUInt32LE(J),W=Q.readInt32LE(J+4);return sG(W,X)}encode($,J,Q=0){let X=nG($),W=j9(J);return W.writeUInt32LE(X.lo32,Q),W.writeInt32LE(X.hi32,Q+4),8}}mZ.NearInt64=lq;class pq extends P9{constructor($){super(8,$)}decode($,J=0){let Q=j9($),X=Q.readInt32BE(J),W=Q.readUInt32BE(J+4);return sG(X,W)}encode($,J,Q=0){let X=nG($),W=j9(J);return W.writeInt32BE(X.hi32,Q),W.writeUInt32BE(X.lo32,Q+4),8}}mZ.NearInt64BE=pq;class dq extends P9{constructor($){super(4,$)}decode($,J=0){return j9($).readFloatLE(J)}encode($,J,Q=0){return j9(J).writeFloatLE($,Q),4}}mZ.Float=dq;class uq extends P9{constructor($){super(4,$)}decode($,J=0){return j9($).readFloatBE(J)}encode($,J,Q=0){return j9(J).writeFloatBE($,Q),4}}mZ.FloatBE=uq;class cq extends P9{constructor($){super(8,$)}decode($,J=0){return j9($).readDoubleLE(J)}encode($,J,Q=0){return j9(J).writeDoubleLE($,Q),8}}mZ.Double=cq;class iq extends P9{constructor($){super(8,$)}decode($,J=0){return j9($).readDoubleBE(J)}encode($,J,Q=0){return j9(J).writeDoubleBE($,Q),8}}mZ.DoubleBE=iq;class aq extends P9{constructor($,J,Q){if(!($ instanceof P9))throw TypeError("elementLayout must be a Layout");if(!(J instanceof e$&&J.isCount()||Number.isInteger(J)&&0<=J))throw TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let X=-1;if(!(J instanceof e$)&&0<$.span)X=J*$.span;super(X,Q);this.elementLayout=$,this.count=J}getSpan($,J=0){if(0<=this.span)return this.span;let Q=0,X=this.count;if(X instanceof e$)X=X.decode($,J);if(0<this.elementLayout.span)Q=X*this.elementLayout.span;else{let W=0;while(W<X)Q+=this.elementLayout.getSpan($,J+Q),++W}return Q}decode($,J=0){let Q=[],X=0,W=this.count;if(W instanceof e$)W=W.decode($,J);while(X<W)Q.push(this.elementLayout.decode($,J)),J+=this.elementLayout.getSpan($,J),X+=1;return Q}encode($,J,Q=0){let X=this.elementLayout,W=$.reduce((Y,G)=>{return Y+X.encode(G,J,Q+Y)},0);if(this.count instanceof e$)this.count.encode($.length,J,Q);return W}}mZ.Sequence=aq;class oq extends P9{constructor($,J,Q){if(!(Array.isArray($)&&$.reduce((W,Y)=>W&&Y instanceof P9,!0)))throw TypeError("fields must be array of Layout instances");if(typeof J==="boolean"&&Q===void 0)Q=J,J=void 0;for(let W of $)if(0>W.span&&W.property===void 0)throw Error("fields cannot contain unnamed variable-length layout");let X=-1;try{X=$.reduce((W,Y)=>W+Y.getSpan(),0)}catch(W){}super(X,J);this.fields=$,this.decodePrefixes=!!Q}getSpan($,J=0){if(0<=this.span)return this.span;let Q=0;try{Q=this.fields.reduce((X,W)=>{let Y=W.getSpan($,J);return J+=Y,X+Y},0)}catch(X){throw RangeError("indeterminate span")}return Q}decode($,J=0){AW($);let Q=this.makeDestinationObject();for(let X of this.fields){if(X.property!==void 0)Q[X.property]=X.decode($,J);if(J+=X.getSpan($,J),this.decodePrefixes&&$.length===J)break}return Q}encode($,J,Q=0){let X=Q,W=0,Y=0;for(let G of this.fields){let V=G.span;if(Y=0<V?V:0,G.property!==void 0){let q=$[G.property];if(q!==void 0){if(Y=G.encode(q,J,Q),0>V)V=G.getSpan(J,Q)}}W=Q,Q+=V}return W+Y-X}fromArray($){let J=this.makeDestinationObject();for(let Q of this.fields)if(Q.property!==void 0&&0<$.length)J[Q.property]=$.shift();return J}layoutFor($){if(typeof $!=="string")throw TypeError("property must be string");for(let J of this.fields)if(J.property===$)return J;return}offsetOf($){if(typeof $!=="string")throw TypeError("property must be string");let J=0;for(let Q of this.fields){if(Q.property===$)return J;if(0>Q.span)J=-1;else if(0<=J)J+=Q.span}return}}mZ.Structure=oq;class rG{constructor($){this.property=$}decode($,J){throw Error("UnionDiscriminator is abstract")}encode($,J,Q){throw Error("UnionDiscriminator is abstract")}}mZ.UnionDiscriminator=rG;class KY extends rG{constructor($,J){if(!($ instanceof e$&&$.isCount()))throw TypeError("layout must be an unsigned integer ExternalLayout");super(J||$.property||"variant");this.layout=$}decode($,J){return this.layout.decode($,J)}encode($,J,Q){return this.layout.encode($,J,Q)}}mZ.UnionLayoutDiscriminator=KY;class tG extends P9{constructor($,J,Q){let X;if($ instanceof jJ||$ instanceof hJ)X=new KY(new oG($));else if($ instanceof e$&&$.isCount())X=new KY($);else if(!($ instanceof rG))throw TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");else X=$;if(J===void 0)J=null;if(!(J===null||J instanceof P9))throw TypeError("defaultLayout must be null or a Layout");if(J!==null){if(0>J.span)throw Error("defaultLayout must have constant span");if(J.property===void 0)J=J.replicate("content")}let W=-1;if(J){if(W=J.span,0<=W&&($ instanceof jJ||$ instanceof hJ))W+=X.layout.span}super(W,Q);this.discriminator=X,this.usesPrefixDiscriminator=$ instanceof jJ||$ instanceof hJ,this.defaultLayout=J,this.registry={};let Y=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(G){return Y(G)},this.configGetSourceVariant=function(G){Y=G.bind(this)}}getSpan($,J=0){if(0<=this.span)return this.span;let Q=this.getVariant($,J);if(!Q)throw Error("unable to determine span for unrecognized variant");return Q.getSpan($,J)}defaultGetSourceVariant($){if(Object.prototype.hasOwnProperty.call($,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call($,this.defaultLayout.property))return;let J=this.registry[$[this.discriminator.property]];if(J&&(!J.layout||J.property&&Object.prototype.hasOwnProperty.call($,J.property)))return J}else for(let J in this.registry){let Q=this.registry[J];if(Q.property&&Object.prototype.hasOwnProperty.call($,Q.property))return Q}throw Error("unable to infer src variant")}decode($,J=0){let Q,X=this.discriminator,W=X.decode($,J),Y=this.registry[W];if(Y===void 0){let G=this.defaultLayout,V=0;if(this.usesPrefixDiscriminator)V=X.layout.span;Q=this.makeDestinationObject(),Q[X.property]=W,Q[G.property]=G.decode($,J+V)}else Q=Y.decode($,J);return Q}encode($,J,Q=0){let X=this.getSourceVariant($);if(X===void 0){let W=this.discriminator,Y=this.defaultLayout,G=0;if(this.usesPrefixDiscriminator)G=W.layout.span;return W.encode($[W.property],J,Q),G+Y.encode($[Y.property],J,Q+G)}return X.encode($,J,Q)}addVariant($,J,Q){let X=new nq(this,$,J,Q);return this.registry[$]=X,X}getVariant($,J=0){let Q;if($ instanceof Uint8Array)Q=this.discriminator.decode($,J);else Q=$;return this.registry[Q]}}mZ.Union=tG;class nq extends P9{constructor($,J,Q,X){if(!($ instanceof tG))throw TypeError("union must be a Union");if(!Number.isInteger(J)||0>J)throw TypeError("variant must be a (non-negative) integer");if(typeof Q==="string"&&X===void 0)X=Q,Q=null;if(Q){if(!(Q instanceof P9))throw TypeError("layout must be a Layout");if($.defaultLayout!==null&&0<=Q.span&&Q.span>$.defaultLayout.span)throw Error("variant span exceeds span of containing union");if(typeof X!=="string")throw TypeError("variant must have a String property")}let W=$.span;if(0>$.span){if(W=Q?Q.span:0,0<=W&&$.usesPrefixDiscriminator)W+=$.discriminator.layout.span}super(W,X);this.union=$,this.variant=J,this.layout=Q||null}getSpan($,J=0){if(0<=this.span)return this.span;let Q=0;if(this.union.usesPrefixDiscriminator)Q=this.union.discriminator.layout.span;let X=0;if(this.layout)X=this.layout.getSpan($,J+Q);return Q+X}decode($,J=0){let Q=this.makeDestinationObject();if(this!==this.union.getVariant($,J))throw Error("variant mismatch");let X=0;if(this.union.usesPrefixDiscriminator)X=this.union.discriminator.layout.span;if(this.layout)Q[this.property]=this.layout.decode($,J+X);else if(this.property)Q[this.property]=!0;else if(this.union.usesPrefixDiscriminator)Q[this.union.discriminator.property]=this.variant;return Q}encode($,J,Q=0){let X=0;if(this.union.usesPrefixDiscriminator)X=this.union.discriminator.layout.span;if(this.layout&&!Object.prototype.hasOwnProperty.call($,this.property))throw TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,J,Q);let W=X;if(this.layout){if(this.layout.encode($[this.property],J,Q+X),W+=this.layout.getSpan(J,Q+X),0<=this.union.span&&W>this.union.span)throw Error("encoded variant overruns containing union")}return W}fromArray($){if(this.layout)return this.layout.fromArray($);return}}mZ.VariantLayout=nq;function TW($){if(0>$)$+=4294967296;return $}class eG extends P9{constructor($,J,Q){if(!($ instanceof jJ||$ instanceof hJ))throw TypeError("word must be a UInt or UIntBE layout");if(typeof J==="string"&&Q===void 0)Q=J,J=!1;if(4<$.span)throw RangeError("word cannot exceed 32 bits");super($.span,Q);this.word=$,this.msb=!!J,this.fields=[];let X=0;this._packedSetValue=function(W){return X=TW(W),this},this._packedGetValue=function(){return X}}decode($,J=0){let Q=this.makeDestinationObject(),X=this.word.decode($,J);this._packedSetValue(X);for(let W of this.fields)if(W.property!==void 0)Q[W.property]=W.decode($);return Q}encode($,J,Q=0){let X=this.word.decode(J,Q);this._packedSetValue(X);for(let W of this.fields)if(W.property!==void 0){let Y=$[W.property];if(Y!==void 0)W.encode(Y)}return this.word.encode(this._packedGetValue(),J,Q)}addField($,J){let Q=new $7(this,$,J);return this.fields.push(Q),Q}addBoolean($){let J=new sq(this,$);return this.fields.push(J),J}fieldFor($){if(typeof $!=="string")throw TypeError("property must be string");for(let J of this.fields)if(J.property===$)return J;return}}mZ.BitStructure=eG;class $7{constructor($,J,Q){if(!($ instanceof eG))throw TypeError("container must be a BitStructure");if(!Number.isInteger(J)||0>=J)throw TypeError("bits must be positive integer");let X=8*$.span,W=$.fields.reduce((Y,G)=>Y+G.bits,0);if(J+W>X)throw Error("bits too long for span remainder ("+(X-W)+" of "+X+" remain)");if(this.container=$,this.bits=J,this.valueMask=(1<<J)-1,J===32)this.valueMask=4294967295;if(this.start=W,this.container.msb)this.start=X-W-J;this.wordMask=TW(this.valueMask<<this.start),this.property=Q}decode($,J){let Q=this.container._packedGetValue();return TW(Q&this.wordMask)>>>this.start}encode($){if(typeof $!=="number"||!Number.isInteger($)||$!==TW($&this.valueMask))throw TypeError(yq("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);let J=this.container._packedGetValue(),Q=TW($<<this.start);this.container._packedSetValue(TW(J&~this.wordMask)|Q)}}mZ.BitField=$7;class sq extends $7{constructor($,J){super($,1,J)}decode($,J){return!!super.decode($,J)}encode($){if(typeof $==="boolean")$=+$;super.encode($)}}mZ.Boolean=sq;class rq extends P9{constructor($,J){if(!($ instanceof e$&&$.isCount()||Number.isInteger($)&&0<=$))throw TypeError("length must be positive integer or an unsigned integer ExternalLayout");let Q=-1;if(!($ instanceof e$))Q=$;super(Q,J);this.length=$}getSpan($,J){let Q=this.span;if(0>Q)Q=this.length.decode($,J);return Q}decode($,J=0){let Q=this.span;if(0>Q)Q=this.length.decode($,J);return j9($).slice(J,J+Q)}encode($,J,Q){let X=this.length;if(this.length instanceof e$)X=$.length;if(!($ instanceof Uint8Array&&X===$.length))throw TypeError(yq("Blob.encode",this)+" requires (length "+X+") Uint8Array as src");if(Q+X>J.length)throw RangeError("encoding overruns Uint8Array");let W=j9($);if(j9(J).write(W.toString("hex"),Q,X,"hex"),this.length instanceof e$)this.length.encode(X,J,Q);return X}}mZ.Blob=rq;class tq extends P9{constructor($){super(-1,$)}getSpan($,J=0){AW($);let Q=J;while(Q<$.length&&$[Q]!==0)Q+=1;return 1+Q-J}decode($,J=0){let Q=this.getSpan($,J);return j9($).slice(J,J+Q-1).toString("utf-8")}encode($,J,Q=0){if(typeof $!=="string")$=String($);let X=bq.Buffer.from($,"utf8"),W=X.length;if(Q+W>J.length)throw RangeError("encoding overruns Buffer");let Y=j9(J);return X.copy(Y,Q),Y[Q+W]=0,W+1}}mZ.CString=tq;class eq extends P9{constructor($,J){if(typeof $==="string"&&J===void 0)J=$,$=void 0;if($===void 0)$=-1;else if(!Number.isInteger($))throw TypeError("maxSpan must be an integer");super(-1,J);this.maxSpan=$}getSpan($,J=0){return AW($),$.length-J}decode($,J=0){let Q=this.getSpan($,J);if(0<=this.maxSpan&&this.maxSpan<Q)throw RangeError("text length exceeds maxSpan");return j9($).slice(J,J+Q).toString("utf-8")}encode($,J,Q=0){if(typeof $!=="string")$=String($);let X=bq.Buffer.from($,"utf8"),W=X.length;if(0<=this.maxSpan&&this.maxSpan<W)throw RangeError("text length exceeds maxSpan");if(Q+W>J.length)throw RangeError("encoding overruns Buffer");return X.copy(j9(J),Q),W}}mZ.UTF8=eq;class $1 extends P9{constructor($,J){super(0,J);this.value=$}decode($,J){return this.value}encode($,J,Q){return 0}}mZ.Constant=$1;mZ.greedy=($,J)=>new gq($,J);mZ.offset=($,J,Q)=>new oG($,J,Q);mZ.u8=($)=>new jJ(1,$);mZ.u16=($)=>new jJ(2,$);mZ.u24=($)=>new jJ(3,$);mZ.u32=($)=>new jJ(4,$);mZ.u40=($)=>new jJ(5,$);mZ.u48=($)=>new jJ(6,$);mZ.nu64=($)=>new mq($);mZ.u16be=($)=>new hJ(2,$);mZ.u24be=($)=>new hJ(3,$);mZ.u32be=($)=>new hJ(4,$);mZ.u40be=($)=>new hJ(5,$);mZ.u48be=($)=>new hJ(6,$);mZ.nu64be=($)=>new fq($);mZ.s8=($)=>new QX(1,$);mZ.s16=($)=>new QX(2,$);mZ.s24=($)=>new QX(3,$);mZ.s32=($)=>new QX(4,$);mZ.s40=($)=>new QX(5,$);mZ.s48=($)=>new QX(6,$);mZ.ns64=($)=>new lq($);mZ.s16be=($)=>new xX(2,$);mZ.s24be=($)=>new xX(3,$);mZ.s32be=($)=>new xX(4,$);mZ.s40be=($)=>new xX(5,$);mZ.s48be=($)=>new xX(6,$);mZ.ns64be=($)=>new pq($);mZ.f32=($)=>new dq($);mZ.f32be=($)=>new uq($);mZ.f64=($)=>new cq($);mZ.f64be=($)=>new iq($);mZ.struct=($,J,Q)=>new oq($,J,Q);mZ.bits=($,J,Q)=>new eG($,J,Q);mZ.seq=($,J,Q)=>new aq($,J,Q);mZ.union=($,J,Q)=>new tG($,J,Q);mZ.unionLayoutDiscriminator=($,J)=>new KY($,J);mZ.blob=($,J)=>new rq($,J);mZ.cstr=($)=>new tq($);mZ.utf8=($,J)=>new eq($,J);mZ.constant=($,J)=>new $1($,J)});var D1=B9((G2)=>{Object.defineProperty(G2,"__esModule",{value:!0});G2.default=lA;var mA=fA(EJ("crypto"));function fA($){return $&&$.__esModule?$:{default:$}}var Y7=new Uint8Array(256),W7=Y7.length;function lA(){if(W7>Y7.length-16)mA.default.randomFillSync(Y7),W7=0;return Y7.slice(W7,W7+=16)}});var K2=B9((V2)=>{Object.defineProperty(V2,"__esModule",{value:!0});V2.default=void 0;var dA=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;V2.default=dA});var UY=B9((H2)=>{Object.defineProperty(H2,"__esModule",{value:!0});H2.default=void 0;var uA=cA(K2());function cA($){return $&&$.__esModule?$:{default:$}}function iA($){return typeof $==="string"&&uA.default.test($)}var aA=iA;H2.default=aA});var ZY=B9((U2)=>{Object.defineProperty(U2,"__esModule",{value:!0});U2.default=void 0;var oA=nA(UY());function nA($){return $&&$.__esModule?$:{default:$}}var h$=[];for(let $=0;$<256;++$)h$.push(($+256).toString(16).substr(1));function sA($,J=0){let Q=(h$[$[J+0]]+h$[$[J+1]]+h$[$[J+2]]+h$[$[J+3]]+"-"+h$[$[J+4]]+h$[$[J+5]]+"-"+h$[$[J+6]]+h$[$[J+7]]+"-"+h$[$[J+8]]+h$[$[J+9]]+"-"+h$[$[J+10]]+h$[$[J+11]]+h$[$[J+12]]+h$[$[J+13]]+h$[$[J+14]]+h$[$[J+15]]).toLowerCase();if(!(0,oA.default)(Q))throw TypeError("Stringified UUID is invalid");return Q}var rA=sA;U2.default=rA});var w2=B9((M2)=>{Object.defineProperty(M2,"__esModule",{value:!0});M2.default=void 0;var tA=j2(D1()),eA=j2(ZY());function j2($){return $&&$.__esModule?$:{default:$}}var z2,U1,Z1=0,z1=0;function $3($,J,Q){let X=J&&Q||0,W=J||Array(16);$=$||{};let Y=$.node||z2,G=$.clockseq!==void 0?$.clockseq:U1;if(Y==null||G==null){let j=$.random||($.rng||tA.default)();if(Y==null)Y=z2=[j[0]|1,j[1],j[2],j[3],j[4],j[5]];if(G==null)G=U1=(j[6]<<8|j[7])&16383}let V=$.msecs!==void 0?$.msecs:Date.now(),q=$.nsecs!==void 0?$.nsecs:z1+1,H=V-Z1+(q-z1)/1e4;if(H<0&&$.clockseq===void 0)G=G+1&16383;if((H<0||V>Z1)&&$.nsecs===void 0)q=0;if(q>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");Z1=V,z1=q,U1=G,V+=12219292800000;let Z=((V&268435455)*1e4+q)%4294967296;W[X++]=Z>>>24&255,W[X++]=Z>>>16&255,W[X++]=Z>>>8&255,W[X++]=Z&255;let M=V/4294967296*1e4&268435455;W[X++]=M>>>8&255,W[X++]=M&255,W[X++]=M>>>24&15|16,W[X++]=M>>>16&255,W[X++]=G>>>8|128,W[X++]=G&255;for(let j=0;j<6;++j)W[X+j]=Y[j];return J||(0,eA.default)(W)}var J3=$3;M2.default=J3});var j1=B9((P2)=>{Object.defineProperty(P2,"__esModule",{value:!0});P2.default=void 0;var Q3=X3(UY());function X3($){return $&&$.__esModule?$:{default:$}}function W3($){if(!(0,Q3.default)($))throw TypeError("Invalid UUID");let J,Q=new Uint8Array(16);return Q[0]=(J=parseInt($.slice(0,8),16))>>>24,Q[1]=J>>>16&255,Q[2]=J>>>8&255,Q[3]=J&255,Q[4]=(J=parseInt($.slice(9,13),16))>>>8,Q[5]=J&255,Q[6]=(J=parseInt($.slice(14,18),16))>>>8,Q[7]=J&255,Q[8]=(J=parseInt($.slice(19,23),16))>>>8,Q[9]=J&255,Q[10]=(J=parseInt($.slice(24,36),16))/1099511627776&255,Q[11]=J/4294967296&255,Q[12]=J>>>24&255,Q[13]=J>>>16&255,Q[14]=J>>>8&255,Q[15]=J&255,Q}var Y3=W3;P2.default=Y3});var M1=B9((F2)=>{Object.defineProperty(F2,"__esModule",{value:!0});F2.default=K3;F2.URL=F2.DNS=void 0;var G3=O2(ZY()),V3=O2(j1());function O2($){return $&&$.__esModule?$:{default:$}}function q3($){$=unescape(encodeURIComponent($));let J=[];for(let Q=0;Q<$.length;++Q)J.push($.charCodeAt(Q));return J}var N2="6ba7b810-9dad-11d1-80b4-00c04fd430c8";F2.DNS=N2;var _2="6ba7b811-9dad-11d1-80b4-00c04fd430c8";F2.URL=_2;function K3($,J,Q){function X(W,Y,G,V){if(typeof W==="string")W=q3(W);if(typeof Y==="string")Y=(0,V3.default)(Y);if(Y.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let q=new Uint8Array(16+W.length);if(q.set(Y),q.set(W,Y.length),q=Q(q),q[6]=q[6]&15|J,q[8]=q[8]&63|128,G){V=V||0;for(let H=0;H<16;++H)G[V+H]=q[H];return G}return(0,G3.default)(q)}try{X.name=$}catch(W){}return X.DNS=N2,X.URL=_2,X}});var I2=B9((B2)=>{Object.defineProperty(B2,"__esModule",{value:!0});B2.default=void 0;var U3=Z3(EJ("crypto"));function Z3($){return $&&$.__esModule?$:{default:$}}function z3($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return U3.default.createHash("md5").update($).digest()}var j3=z3;B2.default=j3});var E2=B9((T2)=>{Object.defineProperty(T2,"__esModule",{value:!0});T2.default=void 0;var M3=k2(M1()),L3=k2(I2());function k2($){return $&&$.__esModule?$:{default:$}}var w3=(0,M3.default)("v3",48,L3.default),P3=w3;T2.default=P3});var b2=B9((x2)=>{Object.defineProperty(x2,"__esModule",{value:!0});x2.default=void 0;var R3=h2(D1()),O3=h2(ZY());function h2($){return $&&$.__esModule?$:{default:$}}function N3($,J,Q){$=$||{};let X=$.random||($.rng||R3.default)();if(X[6]=X[6]&15|64,X[8]=X[8]&63|128,J){Q=Q||0;for(let W=0;W<16;++W)J[Q+W]=X[W];return J}return(0,O3.default)(X)}var _3=N3;x2.default=_3});var m2=B9((y2)=>{Object.defineProperty(y2,"__esModule",{value:!0});y2.default=void 0;var F3=S3(EJ("crypto"));function S3($){return $&&$.__esModule?$:{default:$}}function B3($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return F3.default.createHash("sha1").update($).digest()}var C3=B3;y2.default=C3});var d2=B9((l2)=>{Object.defineProperty(l2,"__esModule",{value:!0});l2.default=void 0;var I3=f2(M1()),k3=f2(m2());function f2($){return $&&$.__esModule?$:{default:$}}var T3=(0,I3.default)("v5",80,k3.default),A3=T3;l2.default=A3});var i2=B9((u2)=>{Object.defineProperty(u2,"__esModule",{value:!0});u2.default=void 0;var E3="00000000-0000-0000-0000-000000000000";u2.default=E3});var n2=B9((a2)=>{Object.defineProperty(a2,"__esModule",{value:!0});a2.default=void 0;var h3=x3(UY());function x3($){return $&&$.__esModule?$:{default:$}}function v3($){if(!(0,h3.default)($))throw TypeError("Invalid UUID");return parseInt($.substr(14,1),16)}var b3=v3;a2.default=b3});var L1=B9((aJ)=>{Object.defineProperty(aJ,"__esModule",{value:!0});Object.defineProperty(aJ,"v1",{enumerable:!0,get:function(){return y3.default}});Object.defineProperty(aJ,"v3",{enumerable:!0,get:function(){return g3.default}});Object.defineProperty(aJ,"v4",{enumerable:!0,get:function(){return m3.default}});Object.defineProperty(aJ,"v5",{enumerable:!0,get:function(){return f3.default}});Object.defineProperty(aJ,"NIL",{enumerable:!0,get:function(){return l3.default}});Object.defineProperty(aJ,"version",{enumerable:!0,get:function(){return p3.default}});Object.defineProperty(aJ,"validate",{enumerable:!0,get:function(){return d3.default}});Object.defineProperty(aJ,"stringify",{enumerable:!0,get:function(){return u3.default}});Object.defineProperty(aJ,"parse",{enumerable:!0,get:function(){return c3.default}});var y3=G8(w2()),g3=G8(E2()),m3=G8(b2()),f3=G8(d2()),l3=G8(i2()),p3=G8(n2()),d3=G8(UY()),u3=G8(ZY()),c3=G8(j1());function G8($){return $&&$.__esModule?$:{default:$}}});var r2=B9((HM9,s2)=>{var i3=L1().v4,a3=function($,J,Q,X){if(typeof $!=="string")throw TypeError($+" must be a string");X=X||{};let W=typeof X.version==="number"?X.version:2;if(W!==1&&W!==2)throw TypeError(W+" must be 1 or 2");let Y={method:$};if(W===2)Y.jsonrpc="2.0";if(J){if(typeof J!=="object"&&!Array.isArray(J))throw TypeError(J+" must be an object, array or omitted");Y.params=J}if(typeof Q>"u"){let G=typeof X.generator==="function"?X.generator:function(){return i3()};Y.id=G(Y,X)}else if(W===2&&Q===null){if(X.notificationIdNull)Y.id=null}else Y.id=Q;return Y};s2.exports=a3});var e2=B9((DM9,t2)=>{var o3=L1().v4,n3=r2(),zY=function($,J){if(!(this instanceof zY))return new zY($,J);if(!J)J={};this.options={reviver:typeof J.reviver<"u"?J.reviver:null,replacer:typeof J.replacer<"u"?J.replacer:null,generator:typeof J.generator<"u"?J.generator:function(){return o3()},version:typeof J.version<"u"?J.version:2,notificationIdNull:typeof J.notificationIdNull==="boolean"?J.notificationIdNull:!1},this.callServer=$};t2.exports=zY;zY.prototype.request=function($,J,Q,X){let W=this,Y=null,G=Array.isArray($)&&typeof J==="function";if(this.options.version===1&&G)throw TypeError("JSON-RPC 1.0 does not support batching");if(G||!G&&$&&typeof $==="object"&&typeof J==="function")X=J,Y=$;else{if(typeof Q==="function")X=Q,Q=void 0;let H=typeof X==="function";try{Y=n3($,J,Q,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(Z){if(H){X(Z);return}throw Z}if(!H)return Y}let q;try{q=JSON.stringify(Y,this.options.replacer)}catch(H){X(H);return}return this.callServer(q,function(H,Z){W._parseResponse(H,Z,X)}),Y};zY.prototype._parseResponse=function($,J,Q){if($){Q($);return}if(!J){Q();return}let X;try{X=JSON.parse(J,this.options.reviver)}catch(W){Q(W);return}if(Q.length===3)if(Array.isArray(X)){let W=function(G){return typeof G.error<"u"},Y=function(G){return!W(G)};Q(null,X.filter(W),X.filter(Y));return}else{Q(null,X.error,X.result);return}Q(null,X)}});var Jz=B9((UM9,w1)=>{var s3=Object.prototype.hasOwnProperty,$J="~";function jY(){}if(Object.create){if(jY.prototype=Object.create(null),!new jY().__proto__)$J=!1}function r3($,J,Q){this.fn=$,this.context=J,this.once=Q||!1}function $z($,J,Q,X,W){if(typeof Q!=="function")throw TypeError("The listener must be a function");var Y=new r3(Q,X||$,W),G=$J?$J+J:J;if(!$._events[G])$._events[G]=Y,$._eventsCount++;else if(!$._events[G].fn)$._events[G].push(Y);else $._events[G]=[$._events[G],Y];return $}function G7($,J){if(--$._eventsCount===0)$._events=new jY;else delete $._events[J]}function d$(){this._events=new jY,this._eventsCount=0}d$.prototype.eventNames=function(){var J=[],Q,X;if(this._eventsCount===0)return J;for(X in Q=this._events)if(s3.call(Q,X))J.push($J?X.slice(1):X);if(Object.getOwnPropertySymbols)return J.concat(Object.getOwnPropertySymbols(Q));return J};d$.prototype.listeners=function(J){var Q=$J?$J+J:J,X=this._events[Q];if(!X)return[];if(X.fn)return[X.fn];for(var W=0,Y=X.length,G=Array(Y);W<Y;W++)G[W]=X[W].fn;return G};d$.prototype.listenerCount=function(J){var Q=$J?$J+J:J,X=this._events[Q];if(!X)return 0;if(X.fn)return 1;return X.length};d$.prototype.emit=function(J,Q,X,W,Y,G){var V=$J?$J+J:J;if(!this._events[V])return!1;var q=this._events[V],H=arguments.length,Z,M;if(q.fn){if(q.once)this.removeListener(J,q.fn,void 0,!0);switch(H){case 1:return q.fn.call(q.context),!0;case 2:return q.fn.call(q.context,Q),!0;case 3:return q.fn.call(q.context,Q,X),!0;case 4:return q.fn.call(q.context,Q,X,W),!0;case 5:return q.fn.call(q.context,Q,X,W,Y),!0;case 6:return q.fn.call(q.context,Q,X,W,Y,G),!0}for(M=1,Z=Array(H-1);M<H;M++)Z[M-1]=arguments[M];q.fn.apply(q.context,Z)}else{var j=q.length,R;for(M=0;M<j;M++){if(q[M].once)this.removeListener(J,q[M].fn,void 0,!0);switch(H){case 1:q[M].fn.call(q[M].context);break;case 2:q[M].fn.call(q[M].context,Q);break;case 3:q[M].fn.call(q[M].context,Q,X);break;case 4:q[M].fn.call(q[M].context,Q,X,W);break;default:if(!Z)for(R=1,Z=Array(H-1);R<H;R++)Z[R-1]=arguments[R];q[M].fn.apply(q[M].context,Z)}}}return!0};d$.prototype.on=function(J,Q,X){return $z(this,J,Q,X,!1)};d$.prototype.once=function(J,Q,X){return $z(this,J,Q,X,!0)};d$.prototype.removeListener=function(J,Q,X,W){var Y=$J?$J+J:J;if(!this._events[Y])return this;if(!Q)return G7(this,Y),this;var G=this._events[Y];if(G.fn){if(G.fn===Q&&(!W||G.once)&&(!X||G.context===X))G7(this,Y)}else{for(var V=0,q=[],H=G.length;V<H;V++)if(G[V].fn!==Q||W&&!G[V].once||X&&G[V].context!==X)q.push(G[V]);if(q.length)this._events[Y]=q.length===1?q[0]:q;else G7(this,Y)}return this};d$.prototype.removeAllListeners=function(J){var Q;if(J){if(Q=$J?$J+J:J,this._events[Q])G7(this,Q)}else this._events=new jY,this._eventsCount=0;return this};d$.prototype.off=d$.prototype.removeListener;d$.prototype.addListener=d$.prototype.on;d$.prefixed=$J;d$.EventEmitter=d$;if(typeof w1<"u")w1.exports=d$});var sz=B9((tL9,R7)=>{(function($){var J=function(w){var F,_=new Float64Array(16);if(w)for(F=0;F<w.length;F++)_[F]=w[F];return _},Q=function(){throw Error("no PRNG")},X=new Uint8Array(16),W=new Uint8Array(32);W[0]=9;var Y=J(),G=J([1]),V=J([56129,1]),q=J([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),H=J([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),Z=J([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),M=J([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),j=J([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function R(w,F,_,U){w[F]=_>>24&255,w[F+1]=_>>16&255,w[F+2]=_>>8&255,w[F+3]=_&255,w[F+4]=U>>24&255,w[F+5]=U>>16&255,w[F+6]=U>>8&255,w[F+7]=U&255}function N(w,F,_,U,I){var l,i=0;for(l=0;l<I;l++)i|=w[F+l]^_[U+l];return(1&i-1>>>8)-1}function A(w,F,_,U){return N(w,F,_,U,16)}function E(w,F,_,U){return N(w,F,_,U,32)}function h(w,F,_,U){var I=U[0]&255|(U[1]&255)<<8|(U[2]&255)<<16|(U[3]&255)<<24,l=_[0]&255|(_[1]&255)<<8|(_[2]&255)<<16|(_[3]&255)<<24,i=_[4]&255|(_[5]&255)<<8|(_[6]&255)<<16|(_[7]&255)<<24,e=_[8]&255|(_[9]&255)<<8|(_[10]&255)<<16|(_[11]&255)<<24,Q0=_[12]&255|(_[13]&255)<<8|(_[14]&255)<<16|(_[15]&255)<<24,C0=U[4]&255|(U[5]&255)<<8|(U[6]&255)<<16|(U[7]&255)<<24,D0=F[0]&255|(F[1]&255)<<8|(F[2]&255)<<16|(F[3]&255)<<24,h0=F[4]&255|(F[5]&255)<<8|(F[6]&255)<<16|(F[7]&255)<<24,P0=F[8]&255|(F[9]&255)<<8|(F[10]&255)<<16|(F[11]&255)<<24,v0=F[12]&255|(F[13]&255)<<8|(F[14]&255)<<16|(F[15]&255)<<24,y0=U[8]&255|(U[9]&255)<<8|(U[10]&255)<<16|(U[11]&255)<<24,u0=_[16]&255|(_[17]&255)<<8|(_[18]&255)<<16|(_[19]&255)<<24,d0=_[20]&255|(_[21]&255)<<8|(_[22]&255)<<16|(_[23]&255)<<24,g0=_[24]&255|(_[25]&255)<<8|(_[26]&255)<<16|(_[27]&255)<<24,f0=_[28]&255|(_[29]&255)<<8|(_[30]&255)<<16|(_[31]&255)<<24,m0=U[12]&255|(U[13]&255)<<8|(U[14]&255)<<16|(U[15]&255)<<24,O0=I,I0=l,w0=i,F0=e,B0=Q0,M0=C0,r=D0,t=h0,W0=P0,$0=v0,J0=y0,H0=u0,x0=d0,o0=g0,t0=f0,n0=m0,b;for(var J9=0;J9<20;J9+=2)b=O0+x0|0,B0^=b<<7|b>>>25,b=B0+O0|0,W0^=b<<9|b>>>23,b=W0+B0|0,x0^=b<<13|b>>>19,b=x0+W0|0,O0^=b<<18|b>>>14,b=M0+I0|0,$0^=b<<7|b>>>25,b=$0+M0|0,o0^=b<<9|b>>>23,b=o0+$0|0,I0^=b<<13|b>>>19,b=I0+o0|0,M0^=b<<18|b>>>14,b=J0+r|0,t0^=b<<7|b>>>25,b=t0+J0|0,w0^=b<<9|b>>>23,b=w0+t0|0,r^=b<<13|b>>>19,b=r+w0|0,J0^=b<<18|b>>>14,b=n0+H0|0,F0^=b<<7|b>>>25,b=F0+n0|0,t^=b<<9|b>>>23,b=t+F0|0,H0^=b<<13|b>>>19,b=H0+t|0,n0^=b<<18|b>>>14,b=O0+F0|0,I0^=b<<7|b>>>25,b=I0+O0|0,w0^=b<<9|b>>>23,b=w0+I0|0,F0^=b<<13|b>>>19,b=F0+w0|0,O0^=b<<18|b>>>14,b=M0+B0|0,r^=b<<7|b>>>25,b=r+M0|0,t^=b<<9|b>>>23,b=t+r|0,B0^=b<<13|b>>>19,b=B0+t|0,M0^=b<<18|b>>>14,b=J0+$0|0,H0^=b<<7|b>>>25,b=H0+J0|0,W0^=b<<9|b>>>23,b=W0+H0|0,$0^=b<<13|b>>>19,b=$0+W0|0,J0^=b<<18|b>>>14,b=n0+t0|0,x0^=b<<7|b>>>25,b=x0+n0|0,o0^=b<<9|b>>>23,b=o0+x0|0,t0^=b<<13|b>>>19,b=t0+o0|0,n0^=b<<18|b>>>14;O0=O0+I|0,I0=I0+l|0,w0=w0+i|0,F0=F0+e|0,B0=B0+Q0|0,M0=M0+C0|0,r=r+D0|0,t=t+h0|0,W0=W0+P0|0,$0=$0+v0|0,J0=J0+y0|0,H0=H0+u0|0,x0=x0+d0|0,o0=o0+g0|0,t0=t0+f0|0,n0=n0+m0|0,w[0]=O0>>>0&255,w[1]=O0>>>8&255,w[2]=O0>>>16&255,w[3]=O0>>>24&255,w[4]=I0>>>0&255,w[5]=I0>>>8&255,w[6]=I0>>>16&255,w[7]=I0>>>24&255,w[8]=w0>>>0&255,w[9]=w0>>>8&255,w[10]=w0>>>16&255,w[11]=w0>>>24&255,w[12]=F0>>>0&255,w[13]=F0>>>8&255,w[14]=F0>>>16&255,w[15]=F0>>>24&255,w[16]=B0>>>0&255,w[17]=B0>>>8&255,w[18]=B0>>>16&255,w[19]=B0>>>24&255,w[20]=M0>>>0&255,w[21]=M0>>>8&255,w[22]=M0>>>16&255,w[23]=M0>>>24&255,w[24]=r>>>0&255,w[25]=r>>>8&255,w[26]=r>>>16&255,w[27]=r>>>24&255,w[28]=t>>>0&255,w[29]=t>>>8&255,w[30]=t>>>16&255,w[31]=t>>>24&255,w[32]=W0>>>0&255,w[33]=W0>>>8&255,w[34]=W0>>>16&255,w[35]=W0>>>24&255,w[36]=$0>>>0&255,w[37]=$0>>>8&255,w[38]=$0>>>16&255,w[39]=$0>>>24&255,w[40]=J0>>>0&255,w[41]=J0>>>8&255,w[42]=J0>>>16&255,w[43]=J0>>>24&255,w[44]=H0>>>0&255,w[45]=H0>>>8&255,w[46]=H0>>>16&255,w[47]=H0>>>24&255,w[48]=x0>>>0&255,w[49]=x0>>>8&255,w[50]=x0>>>16&255,w[51]=x0>>>24&255,w[52]=o0>>>0&255,w[53]=o0>>>8&255,w[54]=o0>>>16&255,w[55]=o0>>>24&255,w[56]=t0>>>0&255,w[57]=t0>>>8&255,w[58]=t0>>>16&255,w[59]=t0>>>24&255,w[60]=n0>>>0&255,w[61]=n0>>>8&255,w[62]=n0>>>16&255,w[63]=n0>>>24&255}function y(w,F,_,U){var I=U[0]&255|(U[1]&255)<<8|(U[2]&255)<<16|(U[3]&255)<<24,l=_[0]&255|(_[1]&255)<<8|(_[2]&255)<<16|(_[3]&255)<<24,i=_[4]&255|(_[5]&255)<<8|(_[6]&255)<<16|(_[7]&255)<<24,e=_[8]&255|(_[9]&255)<<8|(_[10]&255)<<16|(_[11]&255)<<24,Q0=_[12]&255|(_[13]&255)<<8|(_[14]&255)<<16|(_[15]&255)<<24,C0=U[4]&255|(U[5]&255)<<8|(U[6]&255)<<16|(U[7]&255)<<24,D0=F[0]&255|(F[1]&255)<<8|(F[2]&255)<<16|(F[3]&255)<<24,h0=F[4]&255|(F[5]&255)<<8|(F[6]&255)<<16|(F[7]&255)<<24,P0=F[8]&255|(F[9]&255)<<8|(F[10]&255)<<16|(F[11]&255)<<24,v0=F[12]&255|(F[13]&255)<<8|(F[14]&255)<<16|(F[15]&255)<<24,y0=U[8]&255|(U[9]&255)<<8|(U[10]&255)<<16|(U[11]&255)<<24,u0=_[16]&255|(_[17]&255)<<8|(_[18]&255)<<16|(_[19]&255)<<24,d0=_[20]&255|(_[21]&255)<<8|(_[22]&255)<<16|(_[23]&255)<<24,g0=_[24]&255|(_[25]&255)<<8|(_[26]&255)<<16|(_[27]&255)<<24,f0=_[28]&255|(_[29]&255)<<8|(_[30]&255)<<16|(_[31]&255)<<24,m0=U[12]&255|(U[13]&255)<<8|(U[14]&255)<<16|(U[15]&255)<<24,O0=I,I0=l,w0=i,F0=e,B0=Q0,M0=C0,r=D0,t=h0,W0=P0,$0=v0,J0=y0,H0=u0,x0=d0,o0=g0,t0=f0,n0=m0,b;for(var J9=0;J9<20;J9+=2)b=O0+x0|0,B0^=b<<7|b>>>25,b=B0+O0|0,W0^=b<<9|b>>>23,b=W0+B0|0,x0^=b<<13|b>>>19,b=x0+W0|0,O0^=b<<18|b>>>14,b=M0+I0|0,$0^=b<<7|b>>>25,b=$0+M0|0,o0^=b<<9|b>>>23,b=o0+$0|0,I0^=b<<13|b>>>19,b=I0+o0|0,M0^=b<<18|b>>>14,b=J0+r|0,t0^=b<<7|b>>>25,b=t0+J0|0,w0^=b<<9|b>>>23,b=w0+t0|0,r^=b<<13|b>>>19,b=r+w0|0,J0^=b<<18|b>>>14,b=n0+H0|0,F0^=b<<7|b>>>25,b=F0+n0|0,t^=b<<9|b>>>23,b=t+F0|0,H0^=b<<13|b>>>19,b=H0+t|0,n0^=b<<18|b>>>14,b=O0+F0|0,I0^=b<<7|b>>>25,b=I0+O0|0,w0^=b<<9|b>>>23,b=w0+I0|0,F0^=b<<13|b>>>19,b=F0+w0|0,O0^=b<<18|b>>>14,b=M0+B0|0,r^=b<<7|b>>>25,b=r+M0|0,t^=b<<9|b>>>23,b=t+r|0,B0^=b<<13|b>>>19,b=B0+t|0,M0^=b<<18|b>>>14,b=J0+$0|0,H0^=b<<7|b>>>25,b=H0+J0|0,W0^=b<<9|b>>>23,b=W0+H0|0,$0^=b<<13|b>>>19,b=$0+W0|0,J0^=b<<18|b>>>14,b=n0+t0|0,x0^=b<<7|b>>>25,b=x0+n0|0,o0^=b<<9|b>>>23,b=o0+x0|0,t0^=b<<13|b>>>19,b=t0+o0|0,n0^=b<<18|b>>>14;w[0]=O0>>>0&255,w[1]=O0>>>8&255,w[2]=O0>>>16&255,w[3]=O0>>>24&255,w[4]=M0>>>0&255,w[5]=M0>>>8&255,w[6]=M0>>>16&255,w[7]=M0>>>24&255,w[8]=J0>>>0&255,w[9]=J0>>>8&255,w[10]=J0>>>16&255,w[11]=J0>>>24&255,w[12]=n0>>>0&255,w[13]=n0>>>8&255,w[14]=n0>>>16&255,w[15]=n0>>>24&255,w[16]=r>>>0&255,w[17]=r>>>8&255,w[18]=r>>>16&255,w[19]=r>>>24&255,w[20]=t>>>0&255,w[21]=t>>>8&255,w[22]=t>>>16&255,w[23]=t>>>24&255,w[24]=W0>>>0&255,w[25]=W0>>>8&255,w[26]=W0>>>16&255,w[27]=W0>>>24&255,w[28]=$0>>>0&255,w[29]=$0>>>8&255,w[30]=$0>>>16&255,w[31]=$0>>>24&255}function k(w,F,_,U){h(w,F,_,U)}function v(w,F,_,U){y(w,F,_,U)}var f=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function d(w,F,_,U,I,l,i){var e=new Uint8Array(16),Q0=new Uint8Array(64),C0,D0;for(D0=0;D0<16;D0++)e[D0]=0;for(D0=0;D0<8;D0++)e[D0]=l[D0];while(I>=64){k(Q0,e,i,f);for(D0=0;D0<64;D0++)w[F+D0]=_[U+D0]^Q0[D0];C0=1;for(D0=8;D0<16;D0++)C0=C0+(e[D0]&255)|0,e[D0]=C0&255,C0>>>=8;I-=64,F+=64,U+=64}if(I>0){k(Q0,e,i,f);for(D0=0;D0<I;D0++)w[F+D0]=_[U+D0]^Q0[D0]}return 0}function c(w,F,_,U,I){var l=new Uint8Array(16),i=new Uint8Array(64),e,Q0;for(Q0=0;Q0<16;Q0++)l[Q0]=0;for(Q0=0;Q0<8;Q0++)l[Q0]=U[Q0];while(_>=64){k(i,l,I,f);for(Q0=0;Q0<64;Q0++)w[F+Q0]=i[Q0];e=1;for(Q0=8;Q0<16;Q0++)e=e+(l[Q0]&255)|0,l[Q0]=e&255,e>>>=8;_-=64,F+=64}if(_>0){k(i,l,I,f);for(Q0=0;Q0<_;Q0++)w[F+Q0]=i[Q0]}return 0}function o(w,F,_,U,I){var l=new Uint8Array(32);v(l,U,I,f);var i=new Uint8Array(8);for(var e=0;e<8;e++)i[e]=U[e+16];return c(w,F,_,i,l)}function p(w,F,_,U,I,l,i){var e=new Uint8Array(32);v(e,l,i,f);var Q0=new Uint8Array(8);for(var C0=0;C0<8;C0++)Q0[C0]=l[C0+16];return d(w,F,_,U,I,Q0,e)}var u=function(w){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var F,_,U,I,l,i,e,Q0;F=w[0]&255|(w[1]&255)<<8,this.r[0]=F&8191,_=w[2]&255|(w[3]&255)<<8,this.r[1]=(F>>>13|_<<3)&8191,U=w[4]&255|(w[5]&255)<<8,this.r[2]=(_>>>10|U<<6)&7939,I=w[6]&255|(w[7]&255)<<8,this.r[3]=(U>>>7|I<<9)&8191,l=w[8]&255|(w[9]&255)<<8,this.r[4]=(I>>>4|l<<12)&255,this.r[5]=l>>>1&8190,i=w[10]&255|(w[11]&255)<<8,this.r[6]=(l>>>14|i<<2)&8191,e=w[12]&255|(w[13]&255)<<8,this.r[7]=(i>>>11|e<<5)&8065,Q0=w[14]&255|(w[15]&255)<<8,this.r[8]=(e>>>8|Q0<<8)&8191,this.r[9]=Q0>>>5&127,this.pad[0]=w[16]&255|(w[17]&255)<<8,this.pad[1]=w[18]&255|(w[19]&255)<<8,this.pad[2]=w[20]&255|(w[21]&255)<<8,this.pad[3]=w[22]&255|(w[23]&255)<<8,this.pad[4]=w[24]&255|(w[25]&255)<<8,this.pad[5]=w[26]&255|(w[27]&255)<<8,this.pad[6]=w[28]&255|(w[29]&255)<<8,this.pad[7]=w[30]&255|(w[31]&255)<<8};u.prototype.blocks=function(w,F,_){var U=this.fin?0:2048,I,l,i,e,Q0,C0,D0,h0,P0,v0,y0,u0,d0,g0,f0,m0,O0,I0,w0,F0=this.h[0],B0=this.h[1],M0=this.h[2],r=this.h[3],t=this.h[4],W0=this.h[5],$0=this.h[6],J0=this.h[7],H0=this.h[8],x0=this.h[9],o0=this.r[0],t0=this.r[1],n0=this.r[2],b=this.r[3],J9=this.r[4],U9=this.r[5],Z9=this.r[6],$9=this.r[7],K9=this.r[8],H9=this.r[9];while(_>=16)I=w[F+0]&255|(w[F+1]&255)<<8,F0+=I&8191,l=w[F+2]&255|(w[F+3]&255)<<8,B0+=(I>>>13|l<<3)&8191,i=w[F+4]&255|(w[F+5]&255)<<8,M0+=(l>>>10|i<<6)&8191,e=w[F+6]&255|(w[F+7]&255)<<8,r+=(i>>>7|e<<9)&8191,Q0=w[F+8]&255|(w[F+9]&255)<<8,t+=(e>>>4|Q0<<12)&8191,W0+=Q0>>>1&8191,C0=w[F+10]&255|(w[F+11]&255)<<8,$0+=(Q0>>>14|C0<<2)&8191,D0=w[F+12]&255|(w[F+13]&255)<<8,J0+=(C0>>>11|D0<<5)&8191,h0=w[F+14]&255|(w[F+15]&255)<<8,H0+=(D0>>>8|h0<<8)&8191,x0+=h0>>>5|U,P0=0,v0=P0,v0+=F0*o0,v0+=B0*(5*H9),v0+=M0*(5*K9),v0+=r*(5*$9),v0+=t*(5*Z9),P0=v0>>>13,v0&=8191,v0+=W0*(5*U9),v0+=$0*(5*J9),v0+=J0*(5*b),v0+=H0*(5*n0),v0+=x0*(5*t0),P0+=v0>>>13,v0&=8191,y0=P0,y0+=F0*t0,y0+=B0*o0,y0+=M0*(5*H9),y0+=r*(5*K9),y0+=t*(5*$9),P0=y0>>>13,y0&=8191,y0+=W0*(5*Z9),y0+=$0*(5*U9),y0+=J0*(5*J9),y0+=H0*(5*b),y0+=x0*(5*n0),P0+=y0>>>13,y0&=8191,u0=P0,u0+=F0*n0,u0+=B0*t0,u0+=M0*o0,u0+=r*(5*H9),u0+=t*(5*K9),P0=u0>>>13,u0&=8191,u0+=W0*(5*$9),u0+=$0*(5*Z9),u0+=J0*(5*U9),u0+=H0*(5*J9),u0+=x0*(5*b),P0+=u0>>>13,u0&=8191,d0=P0,d0+=F0*b,d0+=B0*n0,d0+=M0*t0,d0+=r*o0,d0+=t*(5*H9),P0=d0>>>13,d0&=8191,d0+=W0*(5*K9),d0+=$0*(5*$9),d0+=J0*(5*Z9),d0+=H0*(5*U9),d0+=x0*(5*J9),P0+=d0>>>13,d0&=8191,g0=P0,g0+=F0*J9,g0+=B0*b,g0+=M0*n0,g0+=r*t0,g0+=t*o0,P0=g0>>>13,g0&=8191,g0+=W0*(5*H9),g0+=$0*(5*K9),g0+=J0*(5*$9),g0+=H0*(5*Z9),g0+=x0*(5*U9),P0+=g0>>>13,g0&=8191,f0=P0,f0+=F0*U9,f0+=B0*J9,f0+=M0*b,f0+=r*n0,f0+=t*t0,P0=f0>>>13,f0&=8191,f0+=W0*o0,f0+=$0*(5*H9),f0+=J0*(5*K9),f0+=H0*(5*$9),f0+=x0*(5*Z9),P0+=f0>>>13,f0&=8191,m0=P0,m0+=F0*Z9,m0+=B0*U9,m0+=M0*J9,m0+=r*b,m0+=t*n0,P0=m0>>>13,m0&=8191,m0+=W0*t0,m0+=$0*o0,m0+=J0*(5*H9),m0+=H0*(5*K9),m0+=x0*(5*$9),P0+=m0>>>13,m0&=8191,O0=P0,O0+=F0*$9,O0+=B0*Z9,O0+=M0*U9,O0+=r*J9,O0+=t*b,P0=O0>>>13,O0&=8191,O0+=W0*n0,O0+=$0*t0,O0+=J0*o0,O0+=H0*(5*H9),O0+=x0*(5*K9),P0+=O0>>>13,O0&=8191,I0=P0,I0+=F0*K9,I0+=B0*$9,I0+=M0*Z9,I0+=r*U9,I0+=t*J9,P0=I0>>>13,I0&=8191,I0+=W0*b,I0+=$0*n0,I0+=J0*t0,I0+=H0*o0,I0+=x0*(5*H9),P0+=I0>>>13,I0&=8191,w0=P0,w0+=F0*H9,w0+=B0*K9,w0+=M0*$9,w0+=r*Z9,w0+=t*U9,P0=w0>>>13,w0&=8191,w0+=W0*J9,w0+=$0*b,w0+=J0*n0,w0+=H0*t0,w0+=x0*o0,P0+=w0>>>13,w0&=8191,P0=(P0<<2)+P0|0,P0=P0+v0|0,v0=P0&8191,P0=P0>>>13,y0+=P0,F0=v0,B0=y0,M0=u0,r=d0,t=g0,W0=f0,$0=m0,J0=O0,H0=I0,x0=w0,F+=16,_-=16;this.h[0]=F0,this.h[1]=B0,this.h[2]=M0,this.h[3]=r,this.h[4]=t,this.h[5]=W0,this.h[6]=$0,this.h[7]=J0,this.h[8]=H0,this.h[9]=x0},u.prototype.finish=function(w,F){var _=new Uint16Array(10),U,I,l,i;if(this.leftover){i=this.leftover,this.buffer[i++]=1;for(;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}U=this.h[1]>>>13,this.h[1]&=8191;for(i=2;i<10;i++)this.h[i]+=U,U=this.h[i]>>>13,this.h[i]&=8191;this.h[0]+=U*5,U=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=U,U=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=U,_[0]=this.h[0]+5,U=_[0]>>>13,_[0]&=8191;for(i=1;i<10;i++)_[i]=this.h[i]+U,U=_[i]>>>13,_[i]&=8191;_[9]-=8192,I=(U^1)-1;for(i=0;i<10;i++)_[i]&=I;I=~I;for(i=0;i<10;i++)this.h[i]=this.h[i]&I|_[i];this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,l=this.h[0]+this.pad[0],this.h[0]=l&65535;for(i=1;i<8;i++)l=(this.h[i]+this.pad[i]|0)+(l>>>16)|0,this.h[i]=l&65535;w[F+0]=this.h[0]>>>0&255,w[F+1]=this.h[0]>>>8&255,w[F+2]=this.h[1]>>>0&255,w[F+3]=this.h[1]>>>8&255,w[F+4]=this.h[2]>>>0&255,w[F+5]=this.h[2]>>>8&255,w[F+6]=this.h[3]>>>0&255,w[F+7]=this.h[3]>>>8&255,w[F+8]=this.h[4]>>>0&255,w[F+9]=this.h[4]>>>8&255,w[F+10]=this.h[5]>>>0&255,w[F+11]=this.h[5]>>>8&255,w[F+12]=this.h[6]>>>0&255,w[F+13]=this.h[6]>>>8&255,w[F+14]=this.h[7]>>>0&255,w[F+15]=this.h[7]>>>8&255},u.prototype.update=function(w,F,_){var U,I;if(this.leftover){if(I=16-this.leftover,I>_)I=_;for(U=0;U<I;U++)this.buffer[this.leftover+U]=w[F+U];if(_-=I,F+=I,this.leftover+=I,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(_>=16)I=_-_%16,this.blocks(w,F,I),F+=I,_-=I;if(_){for(U=0;U<_;U++)this.buffer[this.leftover+U]=w[F+U];this.leftover+=_}};function n(w,F,_,U,I,l){var i=new u(l);return i.update(_,U,I),i.finish(w,F),0}function g(w,F,_,U,I,l){var i=new Uint8Array(16);return n(i,0,_,U,I,l),A(w,F,i,0)}function S(w,F,_,U,I){var l;if(_<32)return-1;p(w,0,F,0,_,U,I),n(w,16,w,32,_-32,w);for(l=0;l<16;l++)w[l]=0;return 0}function K(w,F,_,U,I){var l,i=new Uint8Array(32);if(_<32)return-1;if(o(i,0,32,U,I),g(F,16,F,32,_-32,i)!==0)return-1;p(w,0,F,0,_,U,I);for(l=0;l<32;l++)w[l]=0;return 0}function D(w,F){var _;for(_=0;_<16;_++)w[_]=F[_]|0}function L(w){var F,_,U=1;for(F=0;F<16;F++)_=w[F]+U+65535,U=Math.floor(_/65536),w[F]=_-U*65536;w[0]+=U-1+37*(U-1)}function P(w,F,_){var U,I=~(_-1);for(var l=0;l<16;l++)U=I&(w[l]^F[l]),w[l]^=U,F[l]^=U}function O(w,F){var _,U,I,l=J(),i=J();for(_=0;_<16;_++)i[_]=F[_];L(i),L(i),L(i);for(U=0;U<2;U++){l[0]=i[0]-65517;for(_=1;_<15;_++)l[_]=i[_]-65535-(l[_-1]>>16&1),l[_-1]&=65535;l[15]=i[15]-32767-(l[14]>>16&1),I=l[15]>>16&1,l[14]&=65535,P(i,l,1-I)}for(_=0;_<16;_++)w[2*_]=i[_]&255,w[2*_+1]=i[_]>>8}function C(w,F){var _=new Uint8Array(32),U=new Uint8Array(32);return O(_,w),O(U,F),E(_,0,U,0)}function x(w){var F=new Uint8Array(32);return O(F,w),F[0]&1}function B(w,F){var _;for(_=0;_<16;_++)w[_]=F[2*_]+(F[2*_+1]<<8);w[15]&=32767}function z(w,F,_){for(var U=0;U<16;U++)w[U]=F[U]+_[U]}function T(w,F,_){for(var U=0;U<16;U++)w[U]=F[U]-_[U]}function s(w,F,_){var U,I,l=0,i=0,e=0,Q0=0,C0=0,D0=0,h0=0,P0=0,v0=0,y0=0,u0=0,d0=0,g0=0,f0=0,m0=0,O0=0,I0=0,w0=0,F0=0,B0=0,M0=0,r=0,t=0,W0=0,$0=0,J0=0,H0=0,x0=0,o0=0,t0=0,n0=0,b=_[0],J9=_[1],U9=_[2],Z9=_[3],$9=_[4],K9=_[5],H9=_[6],j$=_[7],O9=_[8],H$=_[9],D$=_[10],U$=_[11],N$=_[12],g$=_[13],m$=_[14],f$=_[15];U=F[0],l+=U*b,i+=U*J9,e+=U*U9,Q0+=U*Z9,C0+=U*$9,D0+=U*K9,h0+=U*H9,P0+=U*j$,v0+=U*O9,y0+=U*H$,u0+=U*D$,d0+=U*U$,g0+=U*N$,f0+=U*g$,m0+=U*m$,O0+=U*f$,U=F[1],i+=U*b,e+=U*J9,Q0+=U*U9,C0+=U*Z9,D0+=U*$9,h0+=U*K9,P0+=U*H9,v0+=U*j$,y0+=U*O9,u0+=U*H$,d0+=U*D$,g0+=U*U$,f0+=U*N$,m0+=U*g$,O0+=U*m$,I0+=U*f$,U=F[2],e+=U*b,Q0+=U*J9,C0+=U*U9,D0+=U*Z9,h0+=U*$9,P0+=U*K9,v0+=U*H9,y0+=U*j$,u0+=U*O9,d0+=U*H$,g0+=U*D$,f0+=U*U$,m0+=U*N$,O0+=U*g$,I0+=U*m$,w0+=U*f$,U=F[3],Q0+=U*b,C0+=U*J9,D0+=U*U9,h0+=U*Z9,P0+=U*$9,v0+=U*K9,y0+=U*H9,u0+=U*j$,d0+=U*O9,g0+=U*H$,f0+=U*D$,m0+=U*U$,O0+=U*N$,I0+=U*g$,w0+=U*m$,F0+=U*f$,U=F[4],C0+=U*b,D0+=U*J9,h0+=U*U9,P0+=U*Z9,v0+=U*$9,y0+=U*K9,u0+=U*H9,d0+=U*j$,g0+=U*O9,f0+=U*H$,m0+=U*D$,O0+=U*U$,I0+=U*N$,w0+=U*g$,F0+=U*m$,B0+=U*f$,U=F[5],D0+=U*b,h0+=U*J9,P0+=U*U9,v0+=U*Z9,y0+=U*$9,u0+=U*K9,d0+=U*H9,g0+=U*j$,f0+=U*O9,m0+=U*H$,O0+=U*D$,I0+=U*U$,w0+=U*N$,F0+=U*g$,B0+=U*m$,M0+=U*f$,U=F[6],h0+=U*b,P0+=U*J9,v0+=U*U9,y0+=U*Z9,u0+=U*$9,d0+=U*K9,g0+=U*H9,f0+=U*j$,m0+=U*O9,O0+=U*H$,I0+=U*D$,w0+=U*U$,F0+=U*N$,B0+=U*g$,M0+=U*m$,r+=U*f$,U=F[7],P0+=U*b,v0+=U*J9,y0+=U*U9,u0+=U*Z9,d0+=U*$9,g0+=U*K9,f0+=U*H9,m0+=U*j$,O0+=U*O9,I0+=U*H$,w0+=U*D$,F0+=U*U$,B0+=U*N$,M0+=U*g$,r+=U*m$,t+=U*f$,U=F[8],v0+=U*b,y0+=U*J9,u0+=U*U9,d0+=U*Z9,g0+=U*$9,f0+=U*K9,m0+=U*H9,O0+=U*j$,I0+=U*O9,w0+=U*H$,F0+=U*D$,B0+=U*U$,M0+=U*N$,r+=U*g$,t+=U*m$,W0+=U*f$,U=F[9],y0+=U*b,u0+=U*J9,d0+=U*U9,g0+=U*Z9,f0+=U*$9,m0+=U*K9,O0+=U*H9,I0+=U*j$,w0+=U*O9,F0+=U*H$,B0+=U*D$,M0+=U*U$,r+=U*N$,t+=U*g$,W0+=U*m$,$0+=U*f$,U=F[10],u0+=U*b,d0+=U*J9,g0+=U*U9,f0+=U*Z9,m0+=U*$9,O0+=U*K9,I0+=U*H9,w0+=U*j$,F0+=U*O9,B0+=U*H$,M0+=U*D$,r+=U*U$,t+=U*N$,W0+=U*g$,$0+=U*m$,J0+=U*f$,U=F[11],d0+=U*b,g0+=U*J9,f0+=U*U9,m0+=U*Z9,O0+=U*$9,I0+=U*K9,w0+=U*H9,F0+=U*j$,B0+=U*O9,M0+=U*H$,r+=U*D$,t+=U*U$,W0+=U*N$,$0+=U*g$,J0+=U*m$,H0+=U*f$,U=F[12],g0+=U*b,f0+=U*J9,m0+=U*U9,O0+=U*Z9,I0+=U*$9,w0+=U*K9,F0+=U*H9,B0+=U*j$,M0+=U*O9,r+=U*H$,t+=U*D$,W0+=U*U$,$0+=U*N$,J0+=U*g$,H0+=U*m$,x0+=U*f$,U=F[13],f0+=U*b,m0+=U*J9,O0+=U*U9,I0+=U*Z9,w0+=U*$9,F0+=U*K9,B0+=U*H9,M0+=U*j$,r+=U*O9,t+=U*H$,W0+=U*D$,$0+=U*U$,J0+=U*N$,H0+=U*g$,x0+=U*m$,o0+=U*f$,U=F[14],m0+=U*b,O0+=U*J9,I0+=U*U9,w0+=U*Z9,F0+=U*$9,B0+=U*K9,M0+=U*H9,r+=U*j$,t+=U*O9,W0+=U*H$,$0+=U*D$,J0+=U*U$,H0+=U*N$,x0+=U*g$,o0+=U*m$,t0+=U*f$,U=F[15],O0+=U*b,I0+=U*J9,w0+=U*U9,F0+=U*Z9,B0+=U*$9,M0+=U*K9,r+=U*H9,t+=U*j$,W0+=U*O9,$0+=U*H$,J0+=U*D$,H0+=U*U$,x0+=U*N$,o0+=U*g$,t0+=U*m$,n0+=U*f$,l+=38*I0,i+=38*w0,e+=38*F0,Q0+=38*B0,C0+=38*M0,D0+=38*r,h0+=38*t,P0+=38*W0,v0+=38*$0,y0+=38*J0,u0+=38*H0,d0+=38*x0,g0+=38*o0,f0+=38*t0,m0+=38*n0,I=1,U=l+I+65535,I=Math.floor(U/65536),l=U-I*65536,U=i+I+65535,I=Math.floor(U/65536),i=U-I*65536,U=e+I+65535,I=Math.floor(U/65536),e=U-I*65536,U=Q0+I+65535,I=Math.floor(U/65536),Q0=U-I*65536,U=C0+I+65535,I=Math.floor(U/65536),C0=U-I*65536,U=D0+I+65535,I=Math.floor(U/65536),D0=U-I*65536,U=h0+I+65535,I=Math.floor(U/65536),h0=U-I*65536,U=P0+I+65535,I=Math.floor(U/65536),P0=U-I*65536,U=v0+I+65535,I=Math.floor(U/65536),v0=U-I*65536,U=y0+I+65535,I=Math.floor(U/65536),y0=U-I*65536,U=u0+I+65535,I=Math.floor(U/65536),u0=U-I*65536,U=d0+I+65535,I=Math.floor(U/65536),d0=U-I*65536,U=g0+I+65535,I=Math.floor(U/65536),g0=U-I*65536,U=f0+I+65535,I=Math.floor(U/65536),f0=U-I*65536,U=m0+I+65535,I=Math.floor(U/65536),m0=U-I*65536,U=O0+I+65535,I=Math.floor(U/65536),O0=U-I*65536,l+=I-1+37*(I-1),I=1,U=l+I+65535,I=Math.floor(U/65536),l=U-I*65536,U=i+I+65535,I=Math.floor(U/65536),i=U-I*65536,U=e+I+65535,I=Math.floor(U/65536),e=U-I*65536,U=Q0+I+65535,I=Math.floor(U/65536),Q0=U-I*65536,U=C0+I+65535,I=Math.floor(U/65536),C0=U-I*65536,U=D0+I+65535,I=Math.floor(U/65536),D0=U-I*65536,U=h0+I+65535,I=Math.floor(U/65536),h0=U-I*65536,U=P0+I+65535,I=Math.floor(U/65536),P0=U-I*65536,U=v0+I+65535,I=Math.floor(U/65536),v0=U-I*65536,U=y0+I+65535,I=Math.floor(U/65536),y0=U-I*65536,U=u0+I+65535,I=Math.floor(U/65536),u0=U-I*65536,U=d0+I+65535,I=Math.floor(U/65536),d0=U-I*65536,U=g0+I+65535,I=Math.floor(U/65536),g0=U-I*65536,U=f0+I+65535,I=Math.floor(U/65536),f0=U-I*65536,U=m0+I+65535,I=Math.floor(U/65536),m0=U-I*65536,U=O0+I+65535,I=Math.floor(U/65536),O0=U-I*65536,l+=I-1+37*(I-1),w[0]=l,w[1]=i,w[2]=e,w[3]=Q0,w[4]=C0,w[5]=D0,w[6]=h0,w[7]=P0,w[8]=v0,w[9]=y0,w[10]=u0,w[11]=d0,w[12]=g0,w[13]=f0,w[14]=m0,w[15]=O0}function Y0(w,F){s(w,F,F)}function Z0(w,F){var _=J(),U;for(U=0;U<16;U++)_[U]=F[U];for(U=253;U>=0;U--)if(Y0(_,_),U!==2&&U!==4)s(_,_,F);for(U=0;U<16;U++)w[U]=_[U]}function S0(w,F){var _=J(),U;for(U=0;U<16;U++)_[U]=F[U];for(U=250;U>=0;U--)if(Y0(_,_),U!==1)s(_,_,F);for(U=0;U<16;U++)w[U]=_[U]}function T0(w,F,_){var U=new Uint8Array(32),I=new Float64Array(80),l,i,e=J(),Q0=J(),C0=J(),D0=J(),h0=J(),P0=J();for(i=0;i<31;i++)U[i]=F[i];U[31]=F[31]&127|64,U[0]&=248,B(I,_);for(i=0;i<16;i++)Q0[i]=I[i],D0[i]=e[i]=C0[i]=0;e[0]=D0[0]=1;for(i=254;i>=0;--i)l=U[i>>>3]>>>(i&7)&1,P(e,Q0,l),P(C0,D0,l),z(h0,e,C0),T(e,e,C0),z(C0,Q0,D0),T(Q0,Q0,D0),Y0(D0,h0),Y0(P0,e),s(e,C0,e),s(C0,Q0,h0),z(h0,e,C0),T(e,e,C0),Y0(Q0,e),T(C0,D0,P0),s(e,C0,V),z(e,e,D0),s(C0,C0,e),s(e,D0,P0),s(D0,Q0,I),Y0(Q0,h0),P(e,Q0,l),P(C0,D0,l);for(i=0;i<16;i++)I[i+16]=e[i],I[i+32]=C0[i],I[i+48]=Q0[i],I[i+64]=D0[i];var v0=I.subarray(32),y0=I.subarray(16);return Z0(v0,v0),s(y0,y0,v0),O(w,y0),0}function A0(w,F){return T0(w,F,W)}function p9(w,F){return Q(F,32),A0(w,F)}function e0(w,F,_){var U=new Uint8Array(32);return T0(U,_,F),v(w,X,U,f)}var G9=S,s$=K;function N9(w,F,_,U,I,l){var i=new Uint8Array(32);return e0(i,I,l),G9(w,F,_,U,i)}function R9(w,F,_,U,I,l){var i=new Uint8Array(32);return e0(i,I,l),s$(w,F,_,U,i)}var a8=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function e9(w,F,_,U){var I=new Int32Array(16),l=new Int32Array(16),i,e,Q0,C0,D0,h0,P0,v0,y0,u0,d0,g0,f0,m0,O0,I0,w0,F0,B0,M0,r,t,W0,$0,J0,H0,x0=w[0],o0=w[1],t0=w[2],n0=w[3],b=w[4],J9=w[5],U9=w[6],Z9=w[7],$9=F[0],K9=F[1],H9=F[2],j$=F[3],O9=F[4],H$=F[5],D$=F[6],U$=F[7],N$=0;while(U>=128){for(B0=0;B0<16;B0++)M0=8*B0+N$,I[B0]=_[M0+0]<<24|_[M0+1]<<16|_[M0+2]<<8|_[M0+3],l[B0]=_[M0+4]<<24|_[M0+5]<<16|_[M0+6]<<8|_[M0+7];for(B0=0;B0<80;B0++)if(i=x0,e=o0,Q0=t0,C0=n0,D0=b,h0=J9,P0=U9,v0=Z9,y0=$9,u0=K9,d0=H9,g0=j$,f0=O9,m0=H$,O0=D$,I0=U$,r=Z9,t=U$,W0=t&65535,$0=t>>>16,J0=r&65535,H0=r>>>16,r=(b>>>14|O9<<18)^(b>>>18|O9<<14)^(O9>>>9|b<<23),t=(O9>>>14|b<<18)^(O9>>>18|b<<14)^(b>>>9|O9<<23),W0+=t&65535,$0+=t>>>16,J0+=r&65535,H0+=r>>>16,r=b&J9^~b&U9,t=O9&H$^~O9&D$,W0+=t&65535,$0+=t>>>16,J0+=r&65535,H0+=r>>>16,r=a8[B0*2],t=a8[B0*2+1],W0+=t&65535,$0+=t>>>16,J0+=r&65535,H0+=r>>>16,r=I[B0%16],t=l[B0%16],W0+=t&65535,$0+=t>>>16,J0+=r&65535,H0+=r>>>16,$0+=W0>>>16,J0+=$0>>>16,H0+=J0>>>16,w0=J0&65535|H0<<16,F0=W0&65535|$0<<16,r=w0,t=F0,W0=t&65535,$0=t>>>16,J0=r&65535,H0=r>>>16,r=(x0>>>28|$9<<4)^($9>>>2|x0<<30)^($9>>>7|x0<<25),t=($9>>>28|x0<<4)^(x0>>>2|$9<<30)^(x0>>>7|$9<<25),W0+=t&65535,$0+=t>>>16,J0+=r&65535,H0+=r>>>16,r=x0&o0^x0&t0^o0&t0,t=$9&K9^$9&H9^K9&H9,W0+=t&65535,$0+=t>>>16,J0+=r&65535,H0+=r>>>16,$0+=W0>>>16,J0+=$0>>>16,H0+=J0>>>16,v0=J0&65535|H0<<16,I0=W0&65535|$0<<16,r=C0,t=g0,W0=t&65535,$0=t>>>16,J0=r&65535,H0=r>>>16,r=w0,t=F0,W0+=t&65535,$0+=t>>>16,J0+=r&65535,H0+=r>>>16,$0+=W0>>>16,J0+=$0>>>16,H0+=J0>>>16,C0=J0&65535|H0<<16,g0=W0&65535|$0<<16,o0=i,t0=e,n0=Q0,b=C0,J9=D0,U9=h0,Z9=P0,x0=v0,K9=y0,H9=u0,j$=d0,O9=g0,H$=f0,D$=m0,U$=O0,$9=I0,B0%16===15)for(M0=0;M0<16;M0++)r=I[M0],t=l[M0],W0=t&65535,$0=t>>>16,J0=r&65535,H0=r>>>16,r=I[(M0+9)%16],t=l[(M0+9)%16],W0+=t&65535,$0+=t>>>16,J0+=r&65535,H0+=r>>>16,w0=I[(M0+1)%16],F0=l[(M0+1)%16],r=(w0>>>1|F0<<31)^(w0>>>8|F0<<24)^w0>>>7,t=(F0>>>1|w0<<31)^(F0>>>8|w0<<24)^(F0>>>7|w0<<25),W0+=t&65535,$0+=t>>>16,J0+=r&65535,H0+=r>>>16,w0=I[(M0+14)%16],F0=l[(M0+14)%16],r=(w0>>>19|F0<<13)^(F0>>>29|w0<<3)^w0>>>6,t=(F0>>>19|w0<<13)^(w0>>>29|F0<<3)^(F0>>>6|w0<<26),W0+=t&65535,$0+=t>>>16,J0+=r&65535,H0+=r>>>16,$0+=W0>>>16,J0+=$0>>>16,H0+=J0>>>16,I[M0]=J0&65535|H0<<16,l[M0]=W0&65535|$0<<16;r=x0,t=$9,W0=t&65535,$0=t>>>16,J0=r&65535,H0=r>>>16,r=w[0],t=F[0],W0+=t&65535,$0+=t>>>16,J0+=r&65535,H0+=r>>>16,$0+=W0>>>16,J0+=$0>>>16,H0+=J0>>>16,w[0]=x0=J0&65535|H0<<16,F[0]=$9=W0&65535|$0<<16,r=o0,t=K9,W0=t&65535,$0=t>>>16,J0=r&65535,H0=r>>>16,r=w[1],t=F[1],W0+=t&65535,$0+=t>>>16,J0+=r&65535,H0+=r>>>16,$0+=W0>>>16,J0+=$0>>>16,H0+=J0>>>16,w[1]=o0=J0&65535|H0<<16,F[1]=K9=W0&65535|$0<<16,r=t0,t=H9,W0=t&65535,$0=t>>>16,J0=r&65535,H0=r>>>16,r=w[2],t=F[2],W0+=t&65535,$0+=t>>>16,J0+=r&65535,H0+=r>>>16,$0+=W0>>>16,J0+=$0>>>16,H0+=J0>>>16,w[2]=t0=J0&65535|H0<<16,F[2]=H9=W0&65535|$0<<16,r=n0,t=j$,W0=t&65535,$0=t>>>16,J0=r&65535,H0=r>>>16,r=w[3],t=F[3],W0+=t&65535,$0+=t>>>16,J0+=r&65535,H0+=r>>>16,$0+=W0>>>16,J0+=$0>>>16,H0+=J0>>>16,w[3]=n0=J0&65535|H0<<16,F[3]=j$=W0&65535|$0<<16,r=b,t=O9,W0=t&65535,$0=t>>>16,J0=r&65535,H0=r>>>16,r=w[4],t=F[4],W0+=t&65535,$0+=t>>>16,J0+=r&65535,H0+=r>>>16,$0+=W0>>>16,J0+=$0>>>16,H0+=J0>>>16,w[4]=b=J0&65535|H0<<16,F[4]=O9=W0&65535|$0<<16,r=J9,t=H$,W0=t&65535,$0=t>>>16,J0=r&65535,H0=r>>>16,r=w[5],t=F[5],W0+=t&65535,$0+=t>>>16,J0+=r&65535,H0+=r>>>16,$0+=W0>>>16,J0+=$0>>>16,H0+=J0>>>16,w[5]=J9=J0&65535|H0<<16,F[5]=H$=W0&65535|$0<<16,r=U9,t=D$,W0=t&65535,$0=t>>>16,J0=r&65535,H0=r>>>16,r=w[6],t=F[6],W0+=t&65535,$0+=t>>>16,J0+=r&65535,H0+=r>>>16,$0+=W0>>>16,J0+=$0>>>16,H0+=J0>>>16,w[6]=U9=J0&65535|H0<<16,F[6]=D$=W0&65535|$0<<16,r=Z9,t=U$,W0=t&65535,$0=t>>>16,J0=r&65535,H0=r>>>16,r=w[7],t=F[7],W0+=t&65535,$0+=t>>>16,J0+=r&65535,H0+=r>>>16,$0+=W0>>>16,J0+=$0>>>16,H0+=J0>>>16,w[7]=Z9=J0&65535|H0<<16,F[7]=U$=W0&65535|$0<<16,N$+=128,U-=128}return U}function _9(w,F,_){var U=new Int32Array(8),I=new Int32Array(8),l=new Uint8Array(256),i,e=_;U[0]=1779033703,U[1]=3144134277,U[2]=1013904242,U[3]=2773480762,U[4]=1359893119,U[5]=2600822924,U[6]=528734635,U[7]=1541459225,I[0]=4089235720,I[1]=2227873595,I[2]=4271175723,I[3]=1595750129,I[4]=2917565137,I[5]=725511199,I[6]=4215389547,I[7]=327033209,e9(U,I,F,_),_%=128;for(i=0;i<_;i++)l[i]=F[e-_+i];l[_]=128,_=256-128*(_<112?1:0),l[_-9]=0,R(l,_-8,e/536870912|0,e<<3),e9(U,I,l,_);for(i=0;i<8;i++)R(w,8*i,U[i],I[i]);return 0}function BX(w,F){var _=J(),U=J(),I=J(),l=J(),i=J(),e=J(),Q0=J(),C0=J(),D0=J();T(_,w[1],w[0]),T(D0,F[1],F[0]),s(_,_,D0),z(U,w[0],w[1]),z(D0,F[0],F[1]),s(U,U,D0),s(I,w[3],F[3]),s(I,I,H),s(l,w[2],F[2]),z(l,l,l),T(i,U,_),T(e,l,I),z(Q0,l,I),z(C0,U,_),s(w[0],i,e),s(w[1],C0,Q0),s(w[2],Q0,e),s(w[3],i,C0)}function $$(w,F,_){var U;for(U=0;U<4;U++)P(w[U],F[U],_)}function d9(w,F){var _=J(),U=J(),I=J();Z0(I,F[2]),s(_,F[0],I),s(U,F[1],I),O(w,U),w[31]^=x(_)<<7}function PW(w,F,_){var U,I;D(w[0],Y),D(w[1],G),D(w[2],G),D(w[3],Y);for(I=255;I>=0;--I)U=_[I/8|0]>>(I&7)&1,$$(w,F,U),BX(F,w),BX(w,w),$$(w,F,U)}function y9(w,F){var _=[J(),J(),J(),J()];D(_[0],Z),D(_[1],M),D(_[2],G),s(_[3],Z,M),PW(w,_,F)}function u9(w,F,_){var U=new Uint8Array(64),I=[J(),J(),J(),J()],l;if(!_)Q(F,32);_9(U,F,32),U[0]&=248,U[31]&=127,U[31]|=64,y9(I,U),d9(w,I);for(l=0;l<32;l++)F[l+32]=w[l];return 0}var CX=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function c9(w,F){var _,U,I,l;for(U=63;U>=32;--U){_=0;for(I=U-32,l=U-12;I<l;++I)F[I]+=_-16*F[U]*CX[I-(U-32)],_=Math.floor((F[I]+128)/256),F[I]-=_*256;F[I]+=_,F[U]=0}_=0;for(I=0;I<32;I++)F[I]+=_-(F[31]>>4)*CX[I],_=F[I]>>8,F[I]&=255;for(I=0;I<32;I++)F[I]-=_*CX[I];for(U=0;U<32;U++)F[U+1]+=F[U]>>8,w[U]=F[U]&255}function i9(w){var F=new Float64Array(64),_;for(_=0;_<64;_++)F[_]=w[_];for(_=0;_<64;_++)w[_]=0;c9(w,F)}function e5(w,F,_,U){var I=new Uint8Array(64),l=new Uint8Array(64),i=new Uint8Array(64),e,Q0,C0=new Float64Array(64),D0=[J(),J(),J(),J()];_9(I,U,32),I[0]&=248,I[31]&=127,I[31]|=64;var h0=_+64;for(e=0;e<_;e++)w[64+e]=F[e];for(e=0;e<32;e++)w[32+e]=I[32+e];_9(i,w.subarray(32),_+32),i9(i),y9(D0,i),d9(w,D0);for(e=32;e<64;e++)w[e]=U[e];_9(l,w,_+64),i9(l);for(e=0;e<64;e++)C0[e]=0;for(e=0;e<32;e++)C0[e]=i[e];for(e=0;e<32;e++)for(Q0=0;Q0<32;Q0++)C0[e+Q0]+=l[e]*I[Q0];return c9(w.subarray(32),C0),h0}function V$(w,F){var _=J(),U=J(),I=J(),l=J(),i=J(),e=J(),Q0=J();if(D(w[2],G),B(w[1],F),Y0(I,w[1]),s(l,I,q),T(I,I,w[2]),z(l,w[2],l),Y0(i,l),Y0(e,i),s(Q0,e,i),s(_,Q0,I),s(_,_,l),S0(_,_),s(_,_,I),s(_,_,l),s(_,_,l),s(w[0],_,l),Y0(U,w[0]),s(U,U,l),C(U,I))s(w[0],w[0],j);if(Y0(U,w[0]),s(U,U,l),C(U,I))return-1;if(x(w[0])===F[31]>>7)T(w[0],Y,w[0]);return s(w[3],w[0],w[1]),0}function a9(w,F,_,U){var I,l=new Uint8Array(32),i=new Uint8Array(64),e=[J(),J(),J(),J()],Q0=[J(),J(),J(),J()];if(_<64)return-1;if(V$(Q0,U))return-1;for(I=0;I<_;I++)w[I]=F[I];for(I=0;I<32;I++)w[I+32]=U[I];if(_9(i,w,_),i9(i),PW(e,Q0,i),y9(Q0,F.subarray(32)),BX(e,Q0),d9(l,e),_-=64,E(F,0,l,0)){for(I=0;I<_;I++)w[I]=0;return-1}for(I=0;I<_;I++)w[I]=F[I+64];return _}var RW=32,g9=24,A9=32,tQ=16,E9=32,m9=32,o8=32,h9=32,o9=32,$Y=g9,q$=A9,K$=tQ,TJ=64,F9=32,T9=64,OW=32,n9=64;$.lowlevel={crypto_core_hsalsa20:v,crypto_stream_xor:p,crypto_stream:o,crypto_stream_salsa20_xor:d,crypto_stream_salsa20:c,crypto_onetimeauth:n,crypto_onetimeauth_verify:g,crypto_verify_16:A,crypto_verify_32:E,crypto_secretbox:S,crypto_secretbox_open:K,crypto_scalarmult:T0,crypto_scalarmult_base:A0,crypto_box_beforenm:e0,crypto_box_afternm:G9,crypto_box:N9,crypto_box_open:R9,crypto_box_keypair:p9,crypto_hash:_9,crypto_sign:e5,crypto_sign_keypair:u9,crypto_sign_open:a9,crypto_secretbox_KEYBYTES:RW,crypto_secretbox_NONCEBYTES:g9,crypto_secretbox_ZEROBYTES:A9,crypto_secretbox_BOXZEROBYTES:tQ,crypto_scalarmult_BYTES:E9,crypto_scalarmult_SCALARBYTES:m9,crypto_box_PUBLICKEYBYTES:o8,crypto_box_SECRETKEYBYTES:h9,crypto_box_BEFORENMBYTES:o9,crypto_box_NONCEBYTES:$Y,crypto_box_ZEROBYTES:q$,crypto_box_BOXZEROBYTES:K$,crypto_sign_BYTES:TJ,crypto_sign_PUBLICKEYBYTES:F9,crypto_sign_SECRETKEYBYTES:T9,crypto_sign_SEEDBYTES:OW,crypto_hash_BYTES:n9,gf:J,D:q,L:CX,pack25519:O,unpack25519:B,M:s,A:z,S:Y0,Z:T,pow2523:S0,add:BX,set25519:D,modL:c9,scalarmult:PW,scalarbase:y9};function J$(w,F){if(w.length!==RW)throw Error("bad key size");if(F.length!==g9)throw Error("bad nonce size")}function vG(w,F){if(w.length!==o8)throw Error("bad public key size");if(F.length!==h9)throw Error("bad secret key size")}function q9(){for(var w=0;w<arguments.length;w++)if(!(arguments[w]instanceof Uint8Array))throw TypeError("unexpected type, use Uint8Array")}function Q$(w){for(var F=0;F<w.length;F++)w[F]=0}$.randomBytes=function(w){var F=new Uint8Array(w);return Q(F,w),F},$.secretbox=function(w,F,_){q9(w,F,_),J$(_,F);var U=new Uint8Array(A9+w.length),I=new Uint8Array(U.length);for(var l=0;l<w.length;l++)U[l+A9]=w[l];return S(I,U,U.length,F,_),I.subarray(tQ)},$.secretbox.open=function(w,F,_){q9(w,F,_),J$(_,F);var U=new Uint8Array(tQ+w.length),I=new Uint8Array(U.length);for(var l=0;l<w.length;l++)U[l+tQ]=w[l];if(U.length<32)return null;if(K(I,U,U.length,F,_)!==0)return null;return I.subarray(A9)},$.secretbox.keyLength=RW,$.secretbox.nonceLength=g9,$.secretbox.overheadLength=tQ,$.scalarMult=function(w,F){if(q9(w,F),w.length!==m9)throw Error("bad n size");if(F.length!==E9)throw Error("bad p size");var _=new Uint8Array(E9);return T0(_,w,F),_},$.scalarMult.base=function(w){if(q9(w),w.length!==m9)throw Error("bad n size");var F=new Uint8Array(E9);return A0(F,w),F},$.scalarMult.scalarLength=m9,$.scalarMult.groupElementLength=E9,$.box=function(w,F,_,U){var I=$.box.before(_,U);return $.secretbox(w,F,I)},$.box.before=function(w,F){q9(w,F),vG(w,F);var _=new Uint8Array(o9);return e0(_,w,F),_},$.box.after=$.secretbox,$.box.open=function(w,F,_,U){var I=$.box.before(_,U);return $.secretbox.open(w,F,I)},$.box.open.after=$.secretbox.open,$.box.keyPair=function(){var w=new Uint8Array(o8),F=new Uint8Array(h9);return p9(w,F),{publicKey:w,secretKey:F}},$.box.keyPair.fromSecretKey=function(w){if(q9(w),w.length!==h9)throw Error("bad secret key size");var F=new Uint8Array(o8);return A0(F,w),{publicKey:F,secretKey:new Uint8Array(w)}},$.box.publicKeyLength=o8,$.box.secretKeyLength=h9,$.box.sharedKeyLength=o9,$.box.nonceLength=$Y,$.box.overheadLength=$.secretbox.overheadLength,$.sign=function(w,F){if(q9(w,F),F.length!==T9)throw Error("bad secret key size");var _=new Uint8Array(TJ+w.length);return e5(_,w,w.length,F),_},$.sign.open=function(w,F){if(q9(w,F),F.length!==F9)throw Error("bad public key size");var _=new Uint8Array(w.length),U=a9(_,w,w.length,F);if(U<0)return null;var I=new Uint8Array(U);for(var l=0;l<I.length;l++)I[l]=_[l];return I},$.sign.detached=function(w,F){var _=$.sign(w,F),U=new Uint8Array(TJ);for(var I=0;I<U.length;I++)U[I]=_[I];return U},$.sign.detached.verify=function(w,F,_){if(q9(w,F,_),F.length!==TJ)throw Error("bad signature size");if(_.length!==F9)throw Error("bad public key size");var U=new Uint8Array(TJ+w.length),I=new Uint8Array(TJ+w.length),l;for(l=0;l<TJ;l++)U[l]=F[l];for(l=0;l<w.length;l++)U[l+TJ]=w[l];return a9(I,U,U.length,_)>=0},$.sign.keyPair=function(){var w=new Uint8Array(F9),F=new Uint8Array(T9);return u9(w,F),{publicKey:w,secretKey:F}},$.sign.keyPair.fromSecretKey=function(w){if(q9(w),w.length!==T9)throw Error("bad secret key size");var F=new Uint8Array(F9);for(var _=0;_<F.length;_++)F[_]=w[32+_];return{publicKey:F,secretKey:new Uint8Array(w)}},$.sign.keyPair.fromSeed=function(w){if(q9(w),w.length!==OW)throw Error("bad seed size");var F=new Uint8Array(F9),_=new Uint8Array(T9);for(var U=0;U<32;U++)_[U]=w[U];return u9(F,_,!0),{publicKey:F,secretKey:_}},$.sign.publicKeyLength=F9,$.sign.secretKeyLength=T9,$.sign.seedLength=OW,$.sign.signatureLength=TJ,$.hash=function(w){q9(w);var F=new Uint8Array(n9);return _9(F,w,w.length),F},$.hash.hashLength=n9,$.verify=function(w,F){if(q9(w,F),w.length===0||F.length===0)return!1;if(w.length!==F.length)return!1;return N(w,0,F,0,w.length)===0?!0:!1},$.setPRNG=function(w){Q=w},function(){var w=typeof self<"u"?self.crypto||self.msCrypto:null;if(w&&w.getRandomValues){var F=65536;$.setPRNG(function(_,U){var I,l=new Uint8Array(U);for(I=0;I<U;I+=F)w.getRandomValues(l.subarray(I,I+Math.min(U-I,F)));for(I=0;I<U;I++)_[I]=l[I];Q$(l)})}else if(w=EJ("crypto"),w&&w.randomBytes)$.setPRNG(function(_,U){var I,l=w.randomBytes(U);for(I=0;I<U;I++)_[I]=l[I];Q$(l)})}()})(typeof R7<"u"&&tL9?tL9:self.nacl=self.nacl||{})});import{readFileSync as WS,writeFileSync as Jj9,mkdirSync as Qj9,existsSync as YS}from"fs";import{join as GS}from"path";import{homedir as Xj9}from"os";import{Buffer as c0}from"buffer";/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var Kq=BigInt(0),qq=BigInt(1);function eQ($,J=""){if(typeof $!=="boolean"){let Q=J&&`"${J}"`;throw Error(Q+"expected boolean, got type="+typeof $)}return $}function ZJ($,J,Q=""){let X=n8($),W=$?.length,Y=J!==void 0;if(!X||Y&&W!==J){let G=Q&&`"${Q}" `,V=Y?` of length ${J}`:"",q=X?`length=${W}`:`type=${typeof $}`;throw Error(G+"expected Uint8Array"+V+", got "+q)}return $}function QY($){let J=$.toString(16);return J.length&1?"0"+J:J}function rU($){if(typeof $!=="string")throw Error("hex string expected, got "+typeof $);return $===""?Kq:BigInt("0x"+$)}function _W($){return rU(AJ($))}function $8($){return NW($),rU(AJ(Uint8Array.from($).reverse()))}function bG($,J){return IX($.toString(16).padStart(J*2,"0"))}function Hq($,J){return bG($,J).reverse()}function S9($,J,Q){let X;if(typeof J==="string")try{X=IX(J)}catch(Y){throw Error($+" must be hex string or Uint8Array, cause: "+Y)}else if(n8(J))X=Uint8Array.from(J);else throw Error($+" must be hex string or Uint8Array");let W=X.length;if(typeof Q==="number"&&W!==Q)throw Error($+" of length "+Q+" expected, got "+W);return X}function tU($,J){if($.length!==J.length)return!1;let Q=0;for(let X=0;X<$.length;X++)Q|=$[X]^J[X];return Q===0}function Dq($){return Uint8Array.from($)}var Vq=($)=>typeof $==="bigint"&&Kq<=$;function eU($,J,Q){return Vq($)&&Vq(J)&&Vq(Q)&&J<=$&&$<Q}function XY($,J,Q,X){if(!eU(J,Q,X))throw Error("expected valid "+$+": "+Q+" <= n < "+X+", got "+J)}function yG($){let J;for(J=0;$>Kq;$>>=qq,J+=1);return J}var r8=($)=>(qq<<BigInt($))-qq;function $Z($,J,Q){if(typeof $!=="number"||$<2)throw Error("hashLen must be a number");if(typeof J!=="number"||J<2)throw Error("qByteLen must be a number");if(typeof Q!=="function")throw Error("hmacFn must be a function");let X=(R)=>new Uint8Array(R),W=(R)=>Uint8Array.of(R),Y=X($),G=X($),V=0,q=()=>{Y.fill(1),G.fill(0),V=0},H=(...R)=>Q(G,Y,...R),Z=(R=X(0))=>{if(G=H(W(0),R),Y=H(),R.length===0)return;G=H(W(1),R),Y=H()},M=()=>{if(V++>=1000)throw Error("drbg: tried 1000 values");let R=0,N=[];while(R<J){Y=H();let A=Y.slice();N.push(A),R+=Y.length}return E$(...N)};return(R,N)=>{q(),Z(R);let A=void 0;while(!(A=N(M())))Z();return q(),A}}function t8($,J,Q={}){if(!$||typeof $!=="object")throw Error("expected valid options object");function X(W,Y,G){let V=$[W];if(G&&V===void 0)return;let q=typeof V;if(q!==Y||V===null)throw Error(`param "${W}" is invalid: expected ${Y}, got ${q}`)}Object.entries(J).forEach(([W,Y])=>X(W,Y,!1)),Object.entries(Q).forEach(([W,Y])=>X(W,Y,!0))}var Uq=()=>{throw Error("not implemented")};function FW($){let J=new WeakMap;return(Q,...X)=>{let W=J.get(Q);if(W!==void 0)return W;let Y=$(Q,...X);return J.set(Q,Y),Y}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var r$=BigInt(0),B$=BigInt(1),kX=BigInt(2),XZ=BigInt(3),WZ=BigInt(4),YZ=BigInt(5),KS=BigInt(7),GZ=BigInt(8),HS=BigInt(9),VZ=BigInt(16);function Z$($,J){let Q=$%J;return Q>=r$?Q:J+Q}function s9($,J,Q){let X=$;while(J-- >r$)X*=X,X%=Q;return X}function JZ($,J){if($===r$)throw Error("invert: expected non-zero number");if(J<=r$)throw Error("invert: expected positive modulus, got "+J);let Q=Z$($,J),X=J,W=r$,Y=B$,G=B$,V=r$;while(Q!==r$){let H=X/Q,Z=X%Q,M=W-G*H,j=Y-V*H;X=Q,Q=Z,W=G,Y=V,G=M,V=j}if(X!==B$)throw Error("invert: does not exist");return Z$(W,J)}function Zq($,J,Q){if(!$.eql($.sqr(J),Q))throw Error("Cannot find square root")}function qZ($,J){let Q=($.ORDER+B$)/WZ,X=$.pow(J,Q);return Zq($,X,J),X}function DS($,J){let Q=($.ORDER-YZ)/GZ,X=$.mul(J,kX),W=$.pow(X,Q),Y=$.mul(J,W),G=$.mul($.mul(Y,kX),W),V=$.mul(Y,$.sub(G,$.ONE));return Zq($,V,J),V}function US($){let J=zJ($),Q=KZ($),X=Q(J,J.neg(J.ONE)),W=Q(J,X),Y=Q(J,J.neg(X)),G=($+KS)/VZ;return(V,q)=>{let H=V.pow(q,G),Z=V.mul(H,X),M=V.mul(H,W),j=V.mul(H,Y),R=V.eql(V.sqr(Z),q),N=V.eql(V.sqr(M),q);H=V.cmov(H,Z,R),Z=V.cmov(j,M,N);let A=V.eql(V.sqr(Z),q),E=V.cmov(H,Z,A);return Zq(V,E,q),E}}function KZ($){if($<XZ)throw Error("sqrt is not defined for small field");let J=$-B$,Q=0;while(J%kX===r$)J/=kX,Q++;let X=kX,W=zJ($);while(QZ(W,X)===1)if(X++>1000)throw Error("Cannot find square root: probably non-prime P");if(Q===1)return qZ;let Y=W.pow(X,J),G=(J+B$)/kX;return function(q,H){if(q.is0(H))return H;if(QZ(q,H)!==1)throw Error("Cannot find square root");let Z=Q,M=q.mul(q.ONE,Y),j=q.pow(H,J),R=q.pow(H,G);while(!q.eql(j,q.ONE)){if(q.is0(j))return q.ZERO;let N=1,A=q.sqr(j);while(!q.eql(A,q.ONE))if(N++,A=q.sqr(A),N===Z)throw Error("Cannot find square root");let E=B$<<BigInt(Z-N-1),h=q.pow(M,E);Z=N,M=q.sqr(h),j=q.mul(j,M),R=q.mul(R,h)}return R}}function ZS($){if($%WZ===XZ)return qZ;if($%GZ===YZ)return DS;if($%VZ===HS)return US($);return KZ($)}var J8=($,J)=>(Z$($,J)&B$)===B$,zS=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function zq($){let J={ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"},Q=zS.reduce((X,W)=>{return X[W]="function",X},J);return t8($,Q),$}function jS($,J,Q){if(Q<r$)throw Error("invalid exponent, negatives unsupported");if(Q===r$)return $.ONE;if(Q===B$)return J;let X=$.ONE,W=J;while(Q>r$){if(Q&B$)X=$.mul(X,W);W=$.sqr(W),Q>>=B$}return X}function WY($,J,Q=!1){let X=Array(J.length).fill(Q?$.ZERO:void 0),W=J.reduce((G,V,q)=>{if($.is0(V))return G;return X[q]=G,$.mul(G,V)},$.ONE),Y=$.inv(W);return J.reduceRight((G,V,q)=>{if($.is0(V))return G;return X[q]=$.mul(G,X[q]),$.mul(G,V)},Y),X}function QZ($,J){let Q=($.ORDER-B$)/kX,X=$.pow(J,Q),W=$.eql(X,$.ONE),Y=$.eql(X,$.ZERO),G=$.eql(X,$.neg($.ONE));if(!W&&!Y&&!G)throw Error("invalid Legendre symbol result");return W?1:Y?0:-1}function gG($,J){if(J!==void 0)JY(J);let Q=J!==void 0?J:$.toString(2).length,X=Math.ceil(Q/8);return{nBitLength:Q,nByteLength:X}}function zJ($,J,Q=!1,X={}){if($<=r$)throw Error("invalid field: expected ORDER > 0, got "+$);let W=void 0,Y=void 0,G=!1,V=void 0;if(typeof J==="object"&&J!=null){if(X.sqrt||Q)throw Error("cannot specify opts in two arguments");let j=J;if(j.BITS)W=j.BITS;if(j.sqrt)Y=j.sqrt;if(typeof j.isLE==="boolean")Q=j.isLE;if(typeof j.modFromBytes==="boolean")G=j.modFromBytes;V=j.allowedLengths}else{if(typeof J==="number")W=J;if(X.sqrt)Y=X.sqrt}let{nBitLength:q,nByteLength:H}=gG($,W);if(H>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let Z,M=Object.freeze({ORDER:$,isLE:Q,BITS:q,BYTES:H,MASK:r8(q),ZERO:r$,ONE:B$,allowedLengths:V,create:(j)=>Z$(j,$),isValid:(j)=>{if(typeof j!=="bigint")throw Error("invalid field element: expected bigint, got "+typeof j);return r$<=j&&j<$},is0:(j)=>j===r$,isValidNot0:(j)=>!M.is0(j)&&M.isValid(j),isOdd:(j)=>(j&B$)===B$,neg:(j)=>Z$(-j,$),eql:(j,R)=>j===R,sqr:(j)=>Z$(j*j,$),add:(j,R)=>Z$(j+R,$),sub:(j,R)=>Z$(j-R,$),mul:(j,R)=>Z$(j*R,$),pow:(j,R)=>jS(M,j,R),div:(j,R)=>Z$(j*JZ(R,$),$),sqrN:(j)=>j*j,addN:(j,R)=>j+R,subN:(j,R)=>j-R,mulN:(j,R)=>j*R,inv:(j)=>JZ(j,$),sqrt:Y||((j)=>{if(!Z)Z=ZS($);return Z(M,j)}),toBytes:(j)=>Q?Hq(j,H):bG(j,H),fromBytes:(j,R=!0)=>{if(V){if(!V.includes(j.length)||j.length>H)throw Error("Field.fromBytes: expected "+V+" bytes, got "+j.length);let A=new Uint8Array(H);A.set(j,Q?0:A.length-j.length),j=A}if(j.length!==H)throw Error("Field.fromBytes: expected "+H+" bytes, got "+j.length);let N=Q?$8(j):_W(j);if(G)N=Z$(N,$);if(!R){if(!M.isValid(N))throw Error("invalid field element: outside of range 0..ORDER")}return N},invertBatch:(j)=>WY(M,j),cmov:(j,R,N)=>N?R:j});return Object.freeze(M)}function HZ($){if(typeof $!=="bigint")throw Error("field order must be bigint");let J=$.toString(2).length;return Math.ceil(J/8)}function jq($){let J=HZ($);return J+Math.ceil(J/2)}function Mq($,J,Q=!1){let X=$.length,W=HZ(J),Y=jq(J);if(X<16||X<Y||X>1024)throw Error("expected "+Y+"-1024 bytes of input, got "+X);let G=Q?$8($):_W($),V=Z$(G,J-B$)+B$;return Q?Hq(V,W):bG(V,W)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var SW=BigInt(0),TX=BigInt(1);function YY($,J){let Q=J.negate();return $?Q:J}function Q8($,J){let Q=WY($.Fp,J.map((X)=>X.Z));return J.map((X,W)=>$.fromAffine(X.toAffine(Q[W])))}function zZ($,J){if(!Number.isSafeInteger($)||$<=0||$>J)throw Error("invalid window size, expected [1.."+J+"], got W="+$)}function Lq($,J){zZ($,J);let Q=Math.ceil(J/$)+1,X=2**($-1),W=2**$,Y=r8($),G=BigInt($);return{windows:Q,windowSize:X,mask:Y,maxNumber:W,shiftBy:G}}function DZ($,J,Q){let{windowSize:X,mask:W,maxNumber:Y,shiftBy:G}=Q,V=Number($&W),q=$>>G;if(V>X)V-=Y,q+=TX;let H=J*X,Z=H+Math.abs(V)-1,M=V===0,j=V<0,R=J%2!==0;return{nextN:q,offset:Z,isZero:M,isNeg:j,isNegF:R,offsetF:H}}function MS($,J){if(!Array.isArray($))throw Error("array expected");$.forEach((Q,X)=>{if(!(Q instanceof J))throw Error("invalid point at index "+X)})}function LS($,J){if(!Array.isArray($))throw Error("array of scalars expected");$.forEach((Q,X)=>{if(!J.isValid(Q))throw Error("invalid scalar at index "+X)})}var wq=new WeakMap,jZ=new WeakMap;function Pq($){return jZ.get($)||1}function UZ($){if($!==SW)throw Error("invalid wNAF")}class GY{constructor($,J){this.BASE=$.BASE,this.ZERO=$.ZERO,this.Fn=$.Fn,this.bits=J}_unsafeLadder($,J,Q=this.ZERO){let X=$;while(J>SW){if(J&TX)Q=Q.add(X);X=X.double(),J>>=TX}return Q}precomputeWindow($,J){let{windows:Q,windowSize:X}=Lq(J,this.bits),W=[],Y=$,G=Y;for(let V=0;V<Q;V++){G=Y,W.push(G);for(let q=1;q<X;q++)G=G.add(Y),W.push(G);Y=G.double()}return W}wNAF($,J,Q){if(!this.Fn.isValid(Q))throw Error("invalid scalar");let X=this.ZERO,W=this.BASE,Y=Lq($,this.bits);for(let G=0;G<Y.windows;G++){let{nextN:V,offset:q,isZero:H,isNeg:Z,isNegF:M,offsetF:j}=DZ(Q,G,Y);if(Q=V,H)W=W.add(YY(M,J[j]));else X=X.add(YY(Z,J[q]))}return UZ(Q),{p:X,f:W}}wNAFUnsafe($,J,Q,X=this.ZERO){let W=Lq($,this.bits);for(let Y=0;Y<W.windows;Y++){if(Q===SW)break;let{nextN:G,offset:V,isZero:q,isNeg:H}=DZ(Q,Y,W);if(Q=G,q)continue;else{let Z=J[V];X=X.add(H?Z.negate():Z)}}return UZ(Q),X}getPrecomputes($,J,Q){let X=wq.get(J);if(!X){if(X=this.precomputeWindow(J,$),$!==1){if(typeof Q==="function")X=Q(X);wq.set(J,X)}}return X}cached($,J,Q){let X=Pq($);return this.wNAF(X,this.getPrecomputes(X,$,Q),J)}unsafe($,J,Q,X){let W=Pq($);if(W===1)return this._unsafeLadder($,J,X);return this.wNAFUnsafe(W,this.getPrecomputes(W,$,Q),J,X)}createCache($,J){zZ(J,this.bits),jZ.set($,J),wq.delete($)}hasCache($){return Pq($)!==1}}function MZ($,J,Q,X){let W=J,Y=$.ZERO,G=$.ZERO;while(Q>SW||X>SW){if(Q&TX)Y=Y.add(W);if(X&TX)G=G.add(W);W=W.double(),Q>>=TX,X>>=TX}return{p1:Y,p2:G}}function BW($,J,Q,X){MS(Q,$),LS(X,J);let W=Q.length,Y=X.length;if(W!==Y)throw Error("arrays of points and scalars must have equal length");let G=$.ZERO,V=yG(BigInt(W)),q=1;if(V>12)q=V-3;else if(V>4)q=V-2;else if(V>0)q=2;let H=r8(q),Z=Array(Number(H)+1).fill(G),M=Math.floor((J.BITS-1)/q)*q,j=G;for(let R=M;R>=0;R-=q){Z.fill(G);for(let A=0;A<Y;A++){let E=X[A],h=Number(E>>BigInt(R)&H);Z[h]=Z[h].add(Q[A])}let N=G;for(let A=Z.length-1,E=G;A>0;A--)E=E.add(Z[A]),N=N.add(E);if(j=j.add(N),R!==0)for(let A=0;A<q;A++)j=j.double()}return j}function ZZ($,J,Q){if(J){if(J.ORDER!==$)throw Error("Field.ORDER must match order: Fp == p, Fn == n");return zq(J),J}else return zJ($,{isLE:Q})}function mG($,J,Q={},X){if(X===void 0)X=$==="edwards";if(!J||typeof J!=="object")throw Error(`expected valid ${$} CURVE object`);for(let q of["p","n","h"]){let H=J[q];if(!(typeof H==="bigint"&&H>SW))throw Error(`CURVE.${q} must be positive bigint`)}let W=ZZ(J.p,Q.Fp,X),Y=ZZ(J.n,Q.Fn,X),V=["Gx","Gy","a",$==="weierstrass"?"b":"d"];for(let q of V)if(!W.isValid(J[q]))throw Error(`CURVE.${q} must be valid field element of CURVE.Fp`);return J=Object.freeze(Object.assign({},J)),{CURVE:J,Fp:W,Fn:Y}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var e8=BigInt(0),C$=BigInt(1),Rq=BigInt(2),wS=BigInt(8);function PS($,J,Q,X){let W=$.sqr(Q),Y=$.sqr(X),G=$.add($.mul(J.a,W),Y),V=$.add($.ONE,$.mul(J.d,$.mul(W,Y)));return $.eql(G,V)}function RS($,J={}){let Q=mG("edwards",$,J,J.FpFnLE),{Fp:X,Fn:W}=Q,Y=Q.CURVE,{h:G}=Y;t8(J,{},{uvRatio:"function"});let V=Rq<<BigInt(W.BYTES*8)-C$,q=(E)=>X.create(E),H=J.uvRatio||((E,h)=>{try{return{isValid:!0,value:X.sqrt(X.div(E,h))}}catch(y){return{isValid:!1,value:e8}}});if(!PS(X,Y,Y.Gx,Y.Gy))throw Error("bad curve params: generator point");function Z(E,h,y=!1){let k=y?C$:e8;return XY("coordinate "+E,h,k,V),h}function M(E){if(!(E instanceof N))throw Error("ExtendedPoint expected")}let j=FW((E,h)=>{let{X:y,Y:k,Z:v}=E,f=E.is0();if(h==null)h=f?wS:X.inv(v);let d=q(y*h),c=q(k*h),o=X.mul(v,h);if(f)return{x:e8,y:C$};if(o!==C$)throw Error("invZ was invalid");return{x:d,y:c}}),R=FW((E)=>{let{a:h,d:y}=Y;if(E.is0())throw Error("bad point: ZERO");let{X:k,Y:v,Z:f,T:d}=E,c=q(k*k),o=q(v*v),p=q(f*f),u=q(p*p),n=q(c*h),g=q(p*q(n+o)),S=q(u+q(y*q(c*o)));if(g!==S)throw Error("bad point: equation left != right (1)");let K=q(k*v),D=q(f*d);if(K!==D)throw Error("bad point: equation left != right (2)");return!0});class N{constructor(E,h,y,k){this.X=Z("x",E),this.Y=Z("y",h),this.Z=Z("z",y,!0),this.T=Z("t",k),Object.freeze(this)}static CURVE(){return Y}static fromAffine(E){if(E instanceof N)throw Error("extended point not allowed");let{x:h,y}=E||{};return Z("x",h),Z("y",y),new N(h,y,C$,q(h*y))}static fromBytes(E,h=!1){let y=X.BYTES,{a:k,d:v}=Y;E=Dq(ZJ(E,y,"point")),eQ(h,"zip215");let f=Dq(E),d=E[y-1];f[y-1]=d&-129;let c=$8(f),o=h?V:X.ORDER;XY("point.y",c,e8,o);let p=q(c*c),u=q(p-C$),n=q(v*p-k),{isValid:g,value:S}=H(u,n);if(!g)throw Error("bad point: invalid y coordinate");let K=(S&C$)===C$,D=(d&128)!==0;if(!h&&S===e8&&D)throw Error("bad point: x=0 and x_0=1");if(D!==K)S=q(-S);return N.fromAffine({x:S,y:c})}static fromHex(E,h=!1){return N.fromBytes(S9("point",E),h)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(E=8,h=!0){if(A.createCache(this,E),!h)this.multiply(Rq);return this}assertValidity(){R(this)}equals(E){M(E);let{X:h,Y:y,Z:k}=this,{X:v,Y:f,Z:d}=E,c=q(h*d),o=q(v*k),p=q(y*d),u=q(f*k);return c===o&&p===u}is0(){return this.equals(N.ZERO)}negate(){return new N(q(-this.X),this.Y,this.Z,q(-this.T))}double(){let{a:E}=Y,{X:h,Y:y,Z:k}=this,v=q(h*h),f=q(y*y),d=q(Rq*q(k*k)),c=q(E*v),o=h+y,p=q(q(o*o)-v-f),u=c+f,n=u-d,g=c-f,S=q(p*n),K=q(u*g),D=q(p*g),L=q(n*u);return new N(S,K,L,D)}add(E){M(E);let{a:h,d:y}=Y,{X:k,Y:v,Z:f,T:d}=this,{X:c,Y:o,Z:p,T:u}=E,n=q(k*c),g=q(v*o),S=q(d*y*u),K=q(f*p),D=q((k+v)*(c+o)-n-g),L=K-S,P=K+S,O=q(g-h*n),C=q(D*L),x=q(P*O),B=q(D*O),z=q(L*P);return new N(C,x,z,B)}subtract(E){return this.add(E.negate())}multiply(E){if(!W.isValidNot0(E))throw Error("invalid scalar: expected 1 <= sc < curve.n");let{p:h,f:y}=A.cached(this,E,(k)=>Q8(N,k));return Q8(N,[h,y])[0]}multiplyUnsafe(E,h=N.ZERO){if(!W.isValid(E))throw Error("invalid scalar: expected 0 <= sc < curve.n");if(E===e8)return N.ZERO;if(this.is0()||E===C$)return this;return A.unsafe(this,E,(y)=>Q8(N,y),h)}isSmallOrder(){return this.multiplyUnsafe(G).is0()}isTorsionFree(){return A.unsafe(this,Y.n).is0()}toAffine(E){return j(this,E)}clearCofactor(){if(G===C$)return this;return this.multiplyUnsafe(G)}toBytes(){let{x:E,y:h}=this.toAffine(),y=X.toBytes(h);return y[y.length-1]|=E&C$?128:0,y}toHex(){return AJ(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get ex(){return this.X}get ey(){return this.Y}get ez(){return this.Z}get et(){return this.T}static normalizeZ(E){return Q8(N,E)}static msm(E,h){return BW(N,W,E,h)}_setWindowSize(E){this.precompute(E)}toRawBytes(){return this.toBytes()}}N.BASE=new N(Y.Gx,Y.Gy,C$,q(Y.Gx*Y.Gy)),N.ZERO=new N(e8,C$,C$,e8),N.Fp=X,N.Fn=W;let A=new GY(N,W.BITS);return N.BASE.precompute(8),N}class Oq{constructor($){this.ep=$}static fromBytes($){Uq()}static fromHex($){Uq()}get x(){return this.toAffine().x}get y(){return this.toAffine().y}clearCofactor(){return this}assertValidity(){this.ep.assertValidity()}toAffine($){return this.ep.toAffine($)}toHex(){return AJ(this.toBytes())}toString(){return this.toHex()}isTorsionFree(){return!0}isSmallOrder(){return!1}add($){return this.assertSame($),this.init(this.ep.add($.ep))}subtract($){return this.assertSame($),this.init(this.ep.subtract($.ep))}multiply($){return this.init(this.ep.multiply($))}multiplyUnsafe($){return this.init(this.ep.multiplyUnsafe($))}double(){return this.init(this.ep.double())}negate(){return this.init(this.ep.negate())}precompute($,J){return this.init(this.ep.precompute($,J))}toRawBytes(){return this.toBytes()}}function OS($,J,Q={}){if(typeof J!=="function")throw Error('"hash" function param is required');t8(Q,{},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",mapToCurve:"function"});let{prehash:X}=Q,{BASE:W,Fp:Y,Fn:G}=$,V=Q.randomBytes||s8,q=Q.adjustScalarBytes||((p)=>p),H=Q.domain||((p,u,n)=>{if(eQ(n,"phflag"),u.length||n)throw Error("Contexts/pre-hash are not supported");return p});function Z(p){return G.create($8(p))}function M(p){let u=k.secretKey;p=S9("private key",p,u);let n=S9("hashed private key",J(p),2*u),g=q(n.slice(0,u)),S=n.slice(u,2*u),K=Z(g);return{head:g,prefix:S,scalar:K}}function j(p){let{head:u,prefix:n,scalar:g}=M(p),S=W.multiply(g),K=S.toBytes();return{head:u,prefix:n,scalar:g,point:S,pointBytes:K}}function R(p){return j(p).pointBytes}function N(p=Uint8Array.of(),...u){let n=E$(...u);return Z(J(H(n,S9("context",p),!!X)))}function A(p,u,n={}){if(p=S9("message",p),X)p=X(p);let{prefix:g,scalar:S,pointBytes:K}=j(u),D=N(n.context,g,p),L=W.multiply(D).toBytes(),P=N(n.context,L,K,p),O=G.create(D+P*S);if(!G.isValid(O))throw Error("sign failed: invalid s");let C=E$(L,G.toBytes(O));return ZJ(C,k.signature,"result")}let E={zip215:!0};function h(p,u,n,g=E){let{context:S,zip215:K}=g,D=k.signature;if(p=S9("signature",p,D),u=S9("message",u),n=S9("publicKey",n,k.publicKey),K!==void 0)eQ(K,"zip215");if(X)u=X(u);let L=D/2,P=p.subarray(0,L),O=$8(p.subarray(L,D)),C,x,B;try{C=$.fromBytes(n,K),x=$.fromBytes(P,K),B=W.multiplyUnsafe(O)}catch(s){return!1}if(!K&&C.isSmallOrder())return!1;let z=N(S,x.toBytes(),C.toBytes(),u);return x.add(C.multiplyUnsafe(z)).subtract(B).clearCofactor().is0()}let y=Y.BYTES,k={secretKey:y,publicKey:y,signature:2*y,seed:y};function v(p=V(k.seed)){return ZJ(p,k.seed,"seed")}function f(p){let u=o.randomSecretKey(p);return{secretKey:u,publicKey:R(u)}}function d(p){return n8(p)&&p.length===G.BYTES}function c(p,u){try{return!!$.fromBytes(p,u)}catch(n){return!1}}let o={getExtendedPublicKey:j,randomSecretKey:v,isValidSecretKey:d,isValidPublicKey:c,toMontgomery(p){let{y:u}=$.fromBytes(p),n=k.publicKey,g=n===32;if(!g&&n!==57)throw Error("only defined for 25519 and 448");let S=g?Y.div(C$+u,C$-u):Y.div(u-C$,u+C$);return Y.toBytes(S)},toMontgomerySecret(p){let u=k.secretKey;ZJ(p,u);let n=J(p.subarray(0,u));return q(n).subarray(0,u)},randomPrivateKey:v,precompute(p=8,u=$.BASE){return u.precompute(p,!1)}};return Object.freeze({keygen:f,getPublicKey:R,sign:A,verify:h,utils:o,Point:$,lengths:k})}function NS($){let J={a:$.a,d:$.d,p:$.Fp.ORDER,n:$.n,h:$.h,Gx:$.Gx,Gy:$.Gy},Q=$.Fp,X=zJ(J.n,$.nBitLength,!0),W={Fp:Q,Fn:X,uvRatio:$.uvRatio},Y={randomBytes:$.randomBytes,adjustScalarBytes:$.adjustScalarBytes,domain:$.domain,prehash:$.prehash,mapToCurve:$.mapToCurve};return{CURVE:J,curveOpts:W,hash:$.hash,eddsaOpts:Y}}function _S($,J){let Q=J.Point;return Object.assign({},J,{ExtendedPoint:Q,CURVE:$,nBitLength:Q.Fn.BITS,nByteLength:Q.Fn.BYTES})}function LZ($){let{CURVE:J,curveOpts:Q,hash:X,eddsaOpts:W}=NS($),Y=RS(J,Q),G=OS(Y,X,W);return _S($,G)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var FS=BigInt(0),X8=BigInt(1),wZ=BigInt(2),Cj9=BigInt(3),SS=BigInt(5),BS=BigInt(8),CW=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),VY=(()=>({p:CW,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:BS,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")}))();function CS($){let J=BigInt(10),Q=BigInt(20),X=BigInt(40),W=BigInt(80),Y=CW,V=$*$%Y*$%Y,q=s9(V,wZ,Y)*V%Y,H=s9(q,X8,Y)*$%Y,Z=s9(H,SS,Y)*H%Y,M=s9(Z,J,Y)*Z%Y,j=s9(M,Q,Y)*M%Y,R=s9(j,X,Y)*j%Y,N=s9(R,W,Y)*R%Y,A=s9(N,W,Y)*R%Y,E=s9(A,J,Y)*Z%Y;return{pow_p_5_8:s9(E,wZ,Y)*$%Y,b2:V}}function IS($){return $[0]&=248,$[31]&=127,$[31]|=64,$}var Nq=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function Sq($,J){let Q=CW,X=Z$(J*J*J,Q),W=Z$(X*X*J,Q),Y=CS($*W).pow_p_5_8,G=Z$($*X*Y,Q),V=Z$(J*G*G,Q),q=G,H=Z$(G*Nq,Q),Z=V===$,M=V===Z$(-$,Q),j=V===Z$(-$*Nq,Q);if(Z)G=q;if(M||j)G=H;if(J8(G,Q))G=Z$(-G,Q);return{isValid:Z||M,value:G}}var $X=(()=>zJ(VY.p,{isLE:!0}))(),kS=(()=>zJ(VY.n,{isLE:!0}))(),TS=(()=>({...VY,Fp:$X,hash:OZ,adjustScalarBytes:IS,uvRatio:Sq}))(),WJ=(()=>LZ(TS))();var _q=Nq,AS=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),ES=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),hS=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),xS=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),PZ=($)=>Sq(X8,$),vS=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Fq=($)=>WJ.Point.Fp.create($8($)&vS);function RZ($){let{d:J}=VY,Q=CW,X=(h)=>$X.create(h),W=X(_q*$*$),Y=X((W+X8)*hS),G=BigInt(-1),V=X((G-J*W)*X(W+J)),{isValid:q,value:H}=Sq(Y,V),Z=X(H*$);if(!J8(Z,Q))Z=X(-Z);if(!q)H=Z;if(!q)G=W;let M=X(G*(W-X8)*xS-V),j=H*H,R=X((H+H)*V),N=X(M*AS),A=X(X8-j),E=X(X8+j);return new WJ.Point(X(R*E),X(A*N),X(N*E),X(R*A))}function bS($){NW($,64);let J=Fq($.subarray(0,32)),Q=RZ(J),X=Fq($.subarray(32,64)),W=RZ(X);return new t$(Q.add(W))}class t$ extends Oq{constructor($){super($)}static fromAffine($){return new t$(WJ.Point.fromAffine($))}assertSame($){if(!($ instanceof t$))throw Error("RistrettoPoint expected")}init($){return new t$($)}static hashToCurve($){return bS(S9("ristrettoHash",$,64))}static fromBytes($){NW($,32);let{a:J,d:Q}=VY,X=CW,W=(k)=>$X.create(k),Y=Fq($);if(!tU($X.toBytes(Y),$)||J8(Y,X))throw Error("invalid ristretto255 encoding 1");let G=W(Y*Y),V=W(X8+J*G),q=W(X8-J*G),H=W(V*V),Z=W(q*q),M=W(J*Q*H-Z),{isValid:j,value:R}=PZ(W(M*Z)),N=W(R*q),A=W(R*N*M),E=W((Y+Y)*N);if(J8(E,X))E=W(-E);let h=W(V*A),y=W(E*h);if(!j||J8(y,X)||h===FS)throw Error("invalid ristretto255 encoding 2");return new t$(new WJ.Point(E,h,X8,y))}static fromHex($){return t$.fromBytes(S9("ristrettoHex",$,32))}static msm($,J){return BW(t$,WJ.Point.Fn,$,J)}toBytes(){let{X:$,Y:J,Z:Q,T:X}=this.ep,W=CW,Y=(A)=>$X.create(A),G=Y(Y(Q+J)*Y(Q-J)),V=Y($*J),q=Y(V*V),{value:H}=PZ(Y(G*q)),Z=Y(H*G),M=Y(H*V),j=Y(Z*M*X),R;if(J8(X*j,W)){let A=Y(J*_q),E=Y($*_q);$=A,J=E,R=Y(Z*ES)}else R=M;if(J8($*j,W))J=Y(-J);let N=Y((Q-J)*R);if(J8(N,W))N=Y(-N);return $X.toBytes(N)}equals($){this.assertSame($);let{X:J,Y:Q}=this.ep,{X,Y:W}=$.ep,Y=(q)=>$X.create(q),G=Y(J*W)===Y(Q*X),V=Y(Q*W)===Y(J*X);return G||V}is0(){return this.equals(t$.ZERO)}}t$.BASE=(()=>new t$(WJ.Point.BASE))();t$.ZERO=(()=>new t$(WJ.Point.ZERO))();t$.Fp=(()=>$X)();t$.Fn=(()=>kS)();var C1=WX(Cq(),1),GJ=WX(IZ(),1);var qY=IW;var mW=WX(gZ(),1),m=WX(J1(),1),Fz=WX(J1(),1);var BC=1,CC=2,IC=3,kC=4,TC=5,AC=6,EC=7,hC=8,xC=9,vC=10,bC=-32700,yC=-32603,gC=-32602,mC=-32601,fC=-32600,lC=-32016,pC=-32015,dC=-32014,uC=-32013,cC=-32012,iC=-32011,aC=-32010,oC=-32009,nC=-32008,sC=-32007,rC=-32006,tC=-32005,eC=-32004,$I=-32003,JI=-32002,QI=-32001,XI=2800000,WI=2800001,YI=2800002,GI=2800003,VI=2800004,qI=2800005,KI=2800006,HI=2800007,DI=2800008,UI=2800009,ZI=2800010,zI=2800011,jI=3230000,MI=32300001,LI=3230002,wI=3230003,PI=3230004,RI=3610000,OI=3610001,NI=3610002,_I=3610003,FI=3610004,SI=3610005,BI=3610006,CI=3610007,II=3611000,kI=3704000,TI=3704001,AI=3704002,EI=3704003,hI=3704004,xI=4128000,vI=4128001,bI=4128002,yI=4615000,gI=4615001,mI=4615002,fI=4615003,lI=4615004,pI=4615005,dI=4615006,uI=4615007,cI=4615008,iI=4615009,aI=4615010,oI=4615011,nI=4615012,sI=4615013,rI=4615014,tI=4615015,eI=4615016,$k=4615017,Jk=4615018,Qk=4615019,Xk=4615020,Wk=4615021,Yk=4615022,Gk=4615023,Vk=4615024,qk=4615025,Kk=4615026,Hk=4615027,Dk=4615028,Uk=4615029,Zk=4615030,zk=4615031,jk=4615032,Mk=4615033,Lk=4615034,wk=4615035,Pk=4615036,Rk=4615037,Ok=4615038,Nk=4615039,_k=4615040,Fk=4615041,Sk=4615042,Bk=4615043,Ck=4615044,Ik=4615045,kk=4615046,Tk=4615047,Ak=4615048,Ek=4615049,hk=4615050,xk=4615051,vk=4615052,bk=4615053,yk=4615054,gk=5508000,mk=5508001,fk=5508002,lk=5508003,pk=5508004,dk=5508005,uk=5508006,ck=5508007,ik=5508008,ak=5508009,ok=5508010,nk=5508011,sk=5663000,rk=5663001,tk=5663002,ek=5663003,$T=5663004,JT=5663005,QT=5663006,XT=5663007,WT=5663008,YT=5663009,GT=5663010,VT=5663011,qT=5663012,KT=5663013,HT=5663014,DT=5663015,UT=5663016,ZT=5663017,zT=5663018,jT=5663019,MT=5663020,LT=7050000,wT=7050001,PT=7050002,RT=7050003,OT=7050004,NT=7050005,_T=7050006,FT=7050007,ST=7050008,BT=7050009,CT=7050010,IT=7050011,kT=7050012,TT=7050013,AT=7050014,ET=7050015,hT=7050016,xT=7050017,vT=7050018,bT=7050019,yT=7050020,gT=7050021,mT=7050022,fT=7050023,lT=7050024,pT=7050025,dT=7050026,uT=7050027,cT=7050028,iT=7050029,aT=7050030,oT=7050031,nT=7050032,sT=7050033,rT=7050034,tT=7050035,eT=7050036,Q1=8078000,X1=8078001,pZ=8078002,dZ=8078003,W1=8078004,Y1=8078005,G1=8078006,$A=8078007,JA=8078008,QA=8078009,XA=8078010,V1=8078011,WA=8078012,uZ=8078013,cZ=8078014,YA=8078015,GA=8078016,VA=8078017,qA=8078018,KA=8078019,iZ=8078020,aZ=8078021,HA=8078022,DA=8100000,UA=8100001,ZA=8100002,zA=8100003,jA=8190000,MA=8190001,LA=8190002,wA=8190003,PA=8190004,RA=9900000,OA=9900001,NA=9900002,_A=9900003,FA=9900004;var SA={[jI]:"Account not found at address: $address",[PI]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[wI]:"Expected decoded account at address: $address",[LI]:"Failed to decode account data at address: $address",[MI]:"Accounts not found at addresses: $addresses",[UI]:"Unable to find a viable program address bump seed.",[YI]:"$putativeAddress is not a base58-encoded address.",[XI]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[GI]:"The `CryptoKey` must be an `Ed25519` public key.",[zI]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[DI]:"Invalid seeds; point must fall off the Ed25519 curve.",[VI]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[KI]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[HI]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[qI]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[ZI]:"Program address cannot end with PDA marker.",[WI]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[kC]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[BC]:"The network has progressed past the last block for which this transaction could have been committed.",[Q1]:"Codec [$codecDescription] cannot decode empty byte arrays.",[HA]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[iZ]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[Y1]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[G1]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[W1]:"Encoder and decoder must either both be fixed-size or variable-size.",[JA]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[pZ]:"Expected a fixed-size codec, got a variable-size one.",[uZ]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[dZ]:"Expected a variable-size codec, got a fixed-size one.",[KA]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[X1]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[qA]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[QA]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[XA]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[YA]:"Invalid literal union variant. Expected one of [$variants], got $value.",[$A]:"Expected [$codecDescription] to have $expected items, got $actual.",[WA]:"Invalid value $value for base $base with alphabet $alphabet.",[GA]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[V1]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[cZ]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[aZ]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[VA]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[II]:"No random values implementation could be found.",[iI]:"instruction requires an uninitialized account",[Gk]:"instruction tries to borrow reference for an account which is already borrowed",[Vk]:"instruction left account with an outstanding borrowed reference",[Wk]:"program other than the account's owner changed the size of the account data",[pI]:"account data too small for instruction",[Yk]:"instruction expected an executable account",[kk]:"An account does not have enough lamports to be rent-exempt",[Ak]:"Program arithmetic overflowed",[Ik]:"Failed to serialize or deserialize account data: $encodedData",[yk]:"Builtin programs must consume compute units",[jk]:"Cross-program invocation call depth too deep",[Ok]:"Computational budget exceeded",[Kk]:"custom program error: #$code",[$k]:"instruction contains duplicate accounts",[qk]:"instruction modifications of multiply-passed account differ",[Zk]:"executable accounts must be rent exempt",[Dk]:"instruction changed executable accounts data",[Uk]:"instruction changed the balance of an executable account",[Jk]:"instruction changed executable bit of an account",[rI]:"instruction modified data of an account it does not own",[sI]:"instruction spent from the balance of an account it does not own",[gI]:"generic instruction error",[hk]:"Provided owner is not allowed",[Bk]:"Account is immutable",[Ck]:"Incorrect authority provided",[uI]:"incorrect program id for instruction",[dI]:"insufficient funds for instruction",[lI]:"invalid account data for instruction",[Tk]:"Invalid account owner",[mI]:"invalid program argument",[Hk]:"program returned invalid error code",[fI]:"invalid instruction data",[Rk]:"Failed to reallocate account data",[Pk]:"Provided seeds do not result in a valid address",[xk]:"Accounts data allocations exceeded the maximum allowed per transaction",[vk]:"Max accounts exceeded",[bk]:"Max instruction trace length exceeded",[wk]:"Length of the seed is too long for address generation",[Mk]:"An account required by the instruction is missing",[cI]:"missing required signature for instruction",[nI]:"instruction illegally modified the program id of an account",[Xk]:"insufficient account keys for instruction",[Nk]:"Cross-program invocation with unauthorized signer or writable account",[_k]:"Failed to create program execution environment",[Sk]:"Program failed to compile",[Fk]:"Program failed to complete",[eI]:"instruction modified data of a read-only account",[tI]:"instruction changed the balance of a read-only account",[Lk]:"Cross-program invocation reentrancy not allowed for this instruction",[Qk]:"instruction modified rent epoch of an account",[oI]:"sum of account balances before and after instruction do not match",[aI]:"instruction requires an initialized account",[yI]:"",[zk]:"Unsupported program id",[Ek]:"Unsupported sysvar",[xI]:"The instruction does not have any accounts.",[vI]:"The instruction does not have any data.",[bI]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[TC]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[CC]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[NA]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[FA]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[OA]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[RA]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[_A]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[yC]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[gC]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[fC]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[mC]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[bC]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[cC]:"$__serverMessage",[QI]:"$__serverMessage",[eC]:"$__serverMessage",[dC]:"$__serverMessage",[aC]:"$__serverMessage",[oC]:"$__serverMessage",[lC]:"Minimum context slot has not been reached",[tC]:"Node is unhealthy; behind by $numSlotsBehind slots",[nC]:"No snapshot",[JI]:"Transaction simulation failed",[sC]:"$__serverMessage",[iC]:"Transaction history is not available from this node",[rC]:"$__serverMessage",[uC]:"Transaction signature length mismatch",[$I]:"Transaction signature verification failure",[pC]:"$__serverMessage",[kI]:"Key pair bytes must be of length 64, got $byteLength.",[TI]:"Expected private key bytes with length 32. Actual length: $actualLength.",[AI]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[hI]:"The provided private key does not match the provided public key.",[EI]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[AC]:"Lamports value must be in the range [0, 2e64-1]",[EC]:"`$value` cannot be parsed as a `BigInt`",[vC]:"$message",[hC]:"`$value` cannot be parsed as a `Number`",[IC]:"No nonce account could be found at address `$nonceAccountAddress`",[jA]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[LA]:"WebSocket was closed before payload could be added to the send buffer",[wA]:"WebSocket connection closed",[PA]:"WebSocket failed to connect",[MA]:"Failed to obtain a subscription id from the server",[zA]:"Could not find an API plan for RPC method: `$method`",[DA]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[ZA]:"HTTP error ($statusCode): $message",[UA]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[gk]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[mk]:"The provided value does not implement the `KeyPairSigner` interface",[lk]:"The provided value does not implement the `MessageModifyingSigner` interface",[pk]:"The provided value does not implement the `MessagePartialSigner` interface",[fk]:"The provided value does not implement any of the `MessageSigner` interfaces",[uk]:"The provided value does not implement the `TransactionModifyingSigner` interface",[ck]:"The provided value does not implement the `TransactionPartialSigner` interface",[ik]:"The provided value does not implement the `TransactionSendingSigner` interface",[dk]:"The provided value does not implement any of the `TransactionSigner` interfaces",[ak]:"More than one `TransactionSendingSigner` was identified.",[ok]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[nk]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[CI]:"Cannot export a non-extractable key.",[OI]:"No digest implementation could be found.",[RI]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[NI]:`This runtime does not support the generation of Ed25519 key pairs.
|
|
3
|
+
|
|
4
|
+
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
5
|
+
|
|
6
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[_I]:"No signature verification implementation could be found.",[FI]:"No key generation implementation could be found.",[SI]:"No signing implementation could be found.",[BI]:"No key export implementation could be found.",[xC]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[hT]:"Transaction processing left an account with an outstanding borrowed reference",[wT]:"Account in use",[PT]:"Account loaded twice",[RT]:"Attempt to debit an account but found no record of a prior credit.",[fT]:"Transaction loads an address table account that doesn't exist",[FT]:"This transaction has already been processed",[ST]:"Blockhash not found",[BT]:"Loader call chain is too deep",[ET]:"Transactions are currently disabled due to cluster maintenance",[aT]:"Transaction contains a duplicate instruction ($index) that is not allowed",[NT]:"Insufficient funds for fee",[oT]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[_T]:"This account may not be used to pay transaction fees",[IT]:"Transaction contains an invalid account reference",[pT]:"Transaction loads an address table account with invalid data",[dT]:"Transaction address table lookup uses an invalid index",[lT]:"Transaction loads an address table account with an invalid owner",[sT]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[TT]:"This program may not be used for executing instructions",[uT]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[bT]:"Transaction loads a writable account that cannot be written",[nT]:"Transaction exceeded max loaded accounts data size cap",[CT]:"Transaction requires a fee but has no signature present",[OT]:"Attempt to load a program that does not exist",[tT]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[rT]:"ResanitizationNeeded",[AT]:"Transaction failed to sanitize accounts offsets correctly",[kT]:"Transaction did not pass signature verification",[mT]:"Transaction locked too many accounts",[eT]:"Sum of account balances before and after transaction do not match",[LT]:"The transaction failed with the error `$errorName`",[vT]:"Transaction version is unsupported",[gT]:"Transaction would exceed account data limit within the block",[iT]:"Transaction would exceed total account data limit",[yT]:"Transaction would exceed max account limit within the block",[xT]:"Transaction would exceed max Block Cost Limit",[cT]:"Transaction would exceed max Vote Cost Limit",[DT]:"Attempted to sign a transaction with an address that is not a signer for it",[GT]:"Transaction is missing an address at index: $index.",[UT]:"Transaction has no expected signers therefore it cannot be encoded",[MT]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[tk]:"Transaction does not have a blockhash lifetime",[ek]:"Transaction is not a durable nonce transaction",[JT]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[QT]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[WT]:"No fee payer set in CompiledTransaction",[XT]:"Could not find program address at index $index",[zT]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[jT]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[VT]:"Transaction is missing a fee payer.",[qT]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[HT]:"Transaction first instruction is not advance nonce account instruction.",[KT]:"Transaction with no instructions cannot be durable nonce transaction.",[sk]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[rk]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[ZT]:"The transaction message expected the transaction to have $signerAddressesLength signatures, got $signaturesLength.",[YT]:"Transaction is missing signatures for addresses: $addresses.",[$T]:"Transaction version must be in the range [0, 127]. `$actualVersion` given"},Y8="i",HQ="t";function BA($,J={}){let Q=SA[$];if(Q.length===0)return"";let X;function W(G){if(X[HQ]===2){let V=Q.slice(X[Y8]+1,G);Y.push(V in J?`${J[V]}`:`$${V}`)}else if(X[HQ]===1)Y.push(Q.slice(X[Y8],G))}let Y=[];return Q.split("").forEach((G,V)=>{if(V===0){X={[Y8]:0,[HQ]:Q[0]==="\\"?0:Q[0]==="$"?2:1};return}let q;switch(X[HQ]){case 0:q={[Y8]:V,[HQ]:1};break;case 1:if(G==="\\")q={[Y8]:V,[HQ]:0};else if(G==="$")q={[Y8]:V,[HQ]:2};break;case 2:if(G==="\\")q={[Y8]:V,[HQ]:0};else if(G==="$")q={[Y8]:V,[HQ]:2};else if(!G.match(/\w/))q={[Y8]:V,[HQ]:1};break}if(q){if(X!==q)W(V);X=q}}),W(),Y.join("")}function CA($,J={}){return BA($,J)}var XX=class extends Error{cause=this.cause;context;constructor(...[$,J]){let Q,X;if(J){let{cause:Y,...G}=J;if(Y)X={cause:Y};if(Object.keys(G).length>0)Q=G}let W=CA($,Q);super(W,X);this.context={__code:$,...Q},this.name="SolanaError"}};function IA($,J){return"fixedSize"in J?J.fixedSize:J.getSizeFromValue($)}function oZ($){return Object.freeze({...$,encode:(J)=>{let Q=new Uint8Array(IA(J,$));return $.write(J,Q,0),Q}})}function nZ($){return Object.freeze({...$,decode:(J,Q=0)=>$.read(J,Q)[0]})}function EW($){return"fixedSize"in $&&typeof $.fixedSize==="number"}function sZ($,J){if(EW($)!==EW(J))throw new XX(W1);if(EW($)&&EW(J)&&$.fixedSize!==J.fixedSize)throw new XX(Y1,{decoderFixedSize:J.fixedSize,encoderFixedSize:$.fixedSize});if(!EW($)&&!EW(J)&&$.maxSize!==J.maxSize)throw new XX(G1,{decoderMaxSize:J.maxSize,encoderMaxSize:$.maxSize});return{...J,...$,decode:J.decode,encode:$.encode,read:J.read,write:$.write}}function rZ($,J,Q=0){if(J.length-Q<=0)throw new XX(Q1,{codecDescription:$})}function tZ($,J,Q,X=0){let W=Q.length-X;if(W<J)throw new XX(X1,{bytesLength:W,codecDescription:$,expected:J})}function kA($,J,Q,X){if(X<J||X>Q)throw new XX(V1,{codecDescription:$,max:Q,min:J,value:X})}function eZ($){return $?.endian===1?!1:!0}function TA($){return oZ({fixedSize:$.size,write(J,Q,X){if($.range)kA($.name,$.range[0],$.range[1],J);let W=new ArrayBuffer($.size);return $.set(new DataView(W),J,eZ($.config)),Q.set(new Uint8Array(W),X),X+$.size}})}function AA($){return nZ({fixedSize:$.size,read(J,Q=0){rZ($.name,J,Q),tZ($.name,$.size,J,Q);let X=new DataView(EA(J,Q,$.size));return[$.get(X,eZ($.config)),Q+$.size]}})}function EA($,J,Q){let X=$.byteOffset+(J??0),W=Q??$.byteLength;return $.buffer.slice(X,X+W)}var q1=($={})=>TA({config:$,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(J,Q,X)=>J.setBigUint64(0,BigInt(Q),X),size:8}),hA=($={})=>AA({config:$,get:(J,Q)=>J.getBigUint64(0,Q),name:"u64",size:8}),$2=($={})=>sZ(q1($),hA($));class Q2 extends TypeError{constructor($,J){let Q,{message:X,explanation:W,...Y}=$,{path:G}=$,V=G.length===0?X:`At path: ${G.join(".")} -- ${X}`;super(W??V);if(W!=null)this.cause=V;Object.assign(this,Y),this.name=this.constructor.name,this.failures=()=>{return Q??(Q=[$,...J()])}}}function xA($){return HY($)&&typeof $[Symbol.iterator]==="function"}function HY($){return typeof $==="object"&&$!=null}function J7($){return HY($)&&!Array.isArray($)}function uJ($){if(typeof $==="symbol")return $.toString();return typeof $==="string"?JSON.stringify($):`${$}`}function vA($){let{done:J,value:Q}=$.next();return J?void 0:Q}function bA($,J,Q,X){if($===!0)return;else if($===!1)$={};else if(typeof $==="string")$={message:$};let{path:W,branch:Y}=J,{type:G}=Q,{refinement:V,message:q=`Expected a value of type \`${G}\`${V?` with refinement \`${V}\``:""}, but received: \`${uJ(X)}\``}=$;return{value:X,type:G,refinement:V,key:W[W.length-1],path:W,branch:Y,...$,message:q}}function*J2($,J,Q,X){if(!xA($))$=[$];for(let W of $){let Y=bA(W,J,Q,X);if(Y)yield Y}}function*K1($,J,Q={}){let{path:X=[],branch:W=[$],coerce:Y=!1,mask:G=!1}=Q,V={path:X,branch:W,mask:G};if(Y)$=J.coercer($,V);let q="valid";for(let H of J.validator($,V))H.explanation=Q.message,q="not_valid",yield[H,void 0];for(let[H,Z,M]of J.entries($,V)){let j=K1(Z,M,{path:H===void 0?X:[...X,H],branch:H===void 0?W:[...W,Z],coerce:Y,mask:G,message:Q.message});for(let R of j)if(R[0])q=R[0].refinement!=null?"not_refined":"not_valid",yield[R[0],void 0];else if(Y){if(Z=R[1],H===void 0)$=Z;else if($ instanceof Map)$.set(H,Z);else if($ instanceof Set)$.add(Z);else if(HY($)){if(Z!==void 0||H in $)$[H]=Z}}}if(q!=="not_valid")for(let H of J.refiner($,V))H.explanation=Q.message,q="not_refined",yield[H,void 0];if(q==="valid")yield[void 0,$]}class cJ{constructor($){let{type:J,schema:Q,validator:X,refiner:W,coercer:Y=(V)=>V,entries:G=function*(){}}=$;if(this.type=J,this.schema=Q,this.entries=G,this.coercer=Y,X)this.validator=(V,q)=>{let H=X(V,q);return J2(H,q,this,V)};else this.validator=()=>[];if(W)this.refiner=(V,q)=>{let H=W(V,q);return J2(H,q,this,V)};else this.refiner=()=>[]}assert($,J){return X2($,this,J)}create($,J){return hW($,this,J)}is($){return W2($,this)}mask($,J){return yA($,this,J)}validate($,J={}){return DY($,this,J)}}function X2($,J,Q){let X=DY($,J,{message:Q});if(X[0])throw X[0]}function hW($,J,Q){let X=DY($,J,{coerce:!0,message:Q});if(X[0])throw X[0];else return X[1]}function yA($,J,Q){let X=DY($,J,{coerce:!0,mask:!0,message:Q});if(X[0])throw X[0];else return X[1]}function W2($,J){return!DY($,J)[0]}function DY($,J,Q={}){let X=K1($,J,Q),W=vA(X);if(W[0])return[new Q2(W[0],function*(){for(let G of X)if(G[0])yield G[0]}),void 0];else return[void 0,W[1]]}function vX($,J){return new cJ({type:$,schema:null,validator:J})}function Y2(){return vX("any",()=>!0)}function N0($){return new cJ({type:"array",schema:$,*entries(J){if($&&Array.isArray(J))for(let[Q,X]of J.entries())yield[Q,X,$]},coercer(J){return Array.isArray(J)?J.slice():J},validator(J){return Array.isArray(J)||`Expected an array value, but received: ${uJ(J)}`}})}function iJ(){return vX("boolean",($)=>{return typeof $==="boolean"})}function Q7($){return vX("instance",(J)=>{return J instanceof $||`Expected a \`${$.name}\` instance, but received: ${uJ(J)}`})}function r9($){let J=uJ($),Q=typeof $;return new cJ({type:"literal",schema:Q==="string"||Q==="number"||Q==="boolean"?$:null,validator(X){return X===$||`Expected the literal \`${J}\`, but received: ${uJ(X)}`}})}function gA(){return vX("never",()=>!1)}function _0($){return new cJ({...$,validator:(J,Q)=>J===null||$.validator(J,Q),refiner:(J,Q)=>J===null||$.refiner(J,Q)})}function a(){return vX("number",($)=>{return typeof $==="number"&&!isNaN($)||`Expected a number, but received: ${uJ($)}`})}function E0($){return new cJ({...$,validator:(J,Q)=>J===void 0||$.validator(J,Q),refiner:(J,Q)=>J===void 0||$.refiner(J,Q)})}function H1($,J){return new cJ({type:"record",schema:null,*entries(Q){if(HY(Q))for(let X in Q){let W=Q[X];yield[X,X,$],yield[X,W,J]}},validator(Q){return J7(Q)||`Expected an object, but received: ${uJ(Q)}`},coercer(Q){return J7(Q)?{...Q}:Q}})}function z0(){return vX("string",($)=>{return typeof $==="string"||`Expected a string, but received: ${uJ($)}`})}function X7($){let J=gA();return new cJ({type:"tuple",schema:null,*entries(Q){if(Array.isArray(Q)){let X=Math.max($.length,Q.length);for(let W=0;W<X;W++)yield[W,Q[W],$[W]||J]}},validator(Q){return Array.isArray(Q)||`Expected an array, but received: ${uJ(Q)}`},coercer(Q){return Array.isArray(Q)?Q.slice():Q}})}function G0($){let J=Object.keys($);return new cJ({type:"type",schema:$,*entries(Q){if(HY(Q))for(let X of J)yield[X,Q[X],$[X]]},validator(Q){return J7(Q)||`Expected an object, but received: ${uJ(Q)}`},coercer(Q){return J7(Q)?{...Q}:Q}})}function p$($){let J=$.map((Q)=>Q.type).join(" | ");return new cJ({type:"union",schema:null,coercer(Q,X){for(let W of $){let[Y,G]=W.validate(Q,{coerce:!0,mask:X.mask});if(!Y)return G}return Q},validator(Q,X){let W=[];for(let Y of $){let[...G]=K1(Q,Y,X),[V]=G;if(!V[0])return[];else for(let[q]of G)if(q)W.push(q)}return[`Expected the value to satisfy a union of \`${J}\`, but received: ${uJ(Q)}`,...W]}})}function bX(){return vX("unknown",()=>!0)}function xW($,J,Q){return new cJ({...$,coercer:(X,W)=>{return W2(X,J)?$.coercer(Q(X,W),W):$.coercer(X,W)}})}var qE=WX(e2(),1);import*as Sz from"node-fetch";var Qz=WX(Jz(),1);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var Xz=($,J)=>($+($>=0?J:-J)/Gz)/J;function t3($,J,Q){let[[X,W],[Y,G]]=J,V=Xz(G*$,Q),q=Xz(-W*$,Q),H=$-V*X-q*Y,Z=-V*W-q*G,M=H<q8,j=Z<q8;if(M)H=-H;if(j)Z=-Z;let R=r8(Math.ceil(yG(Q)/2))+bW;if(H<q8||H>=R||Z<q8||Z>=R)throw Error("splitScalar (endomorphism): failed, k="+$);return{k1neg:M,k1:H,k2neg:j,k2:Z}}function R1($){if(!["compact","recovered","der"].includes($))throw Error('Signature format must be "compact", "recovered", or "der"');return $}function P1($,J){let Q={};for(let X of Object.keys(J))Q[X]=$[X]===void 0?J[X]:$[X];if(eQ(Q.lowS,"lowS"),eQ(Q.prehash,"prehash"),Q.format!==void 0)R1(Q.format);return Q}class Yz extends Error{constructor($=""){super($)}}var V8={Err:Yz,_tlv:{encode:($,J)=>{let{Err:Q}=V8;if($<0||$>256)throw new Q("tlv.encode: wrong tag");if(J.length&1)throw new Q("tlv.encode: unpadded data");let X=J.length/2,W=QY(X);if(W.length/2&128)throw new Q("tlv.encode: long form length too big");let Y=X>127?QY(W.length/2|128):"";return QY($)+Y+W+J},decode($,J){let{Err:Q}=V8,X=0;if($<0||$>256)throw new Q("tlv.encode: wrong tag");if(J.length<2||J[X++]!==$)throw new Q("tlv.decode: wrong tlv");let W=J[X++],Y=!!(W&128),G=0;if(!Y)G=W;else{let q=W&127;if(!q)throw new Q("tlv.decode(long): indefinite length not supported");if(q>4)throw new Q("tlv.decode(long): byte length is too big");let H=J.subarray(X,X+q);if(H.length!==q)throw new Q("tlv.decode: length bytes not complete");if(H[0]===0)throw new Q("tlv.decode(long): zero leftmost byte");for(let Z of H)G=G<<8|Z;if(X+=q,G<128)throw new Q("tlv.decode(long): not minimal encoding")}let V=J.subarray(X,X+G);if(V.length!==G)throw new Q("tlv.decode: wrong value length");return{v:V,l:J.subarray(X+G)}}},_int:{encode($){let{Err:J}=V8;if($<q8)throw new J("integer: negative integers are not allowed");let Q=QY($);if(Number.parseInt(Q[0],16)&8)Q="00"+Q;if(Q.length&1)throw new J("unexpected DER parsing assertion: unpadded hex");return Q},decode($){let{Err:J}=V8;if($[0]&128)throw new J("invalid signature integer: negative");if($[0]===0&&!($[1]&128))throw new J("invalid signature integer: unnecessary leading zero");return _W($)}},toSig($){let{Err:J,_int:Q,_tlv:X}=V8,W=S9("signature",$),{v:Y,l:G}=X.decode(48,W);if(G.length)throw new J("invalid signature: left bytes after parsing");let{v:V,l:q}=X.decode(2,Y),{v:H,l:Z}=X.decode(2,q);if(Z.length)throw new J("invalid signature: left bytes after parsing");return{r:Q.decode(V),s:Q.decode(H)}},hexFromSig($){let{_tlv:J,_int:Q}=V8,X=J.encode(2,Q.encode($.r)),W=J.encode(2,Q.encode($.s)),Y=X+W;return J.encode(48,Y)}},q8=BigInt(0),bW=BigInt(1),Gz=BigInt(2),V7=BigInt(3),e3=BigInt(4);function vW($,J){let{BYTES:Q}=$,X;if(typeof J==="bigint")X=J;else{let W=S9("private key",J);try{X=$.fromBytes(W)}catch(Y){throw Error(`invalid private key: expected ui8a of size ${Q}, got ${typeof J}`)}}if(!$.isValidNot0(X))throw Error("invalid private key: out of range [1..N-1]");return X}function $E($,J={}){let Q=mG("weierstrass",$,J),{Fp:X,Fn:W}=Q,Y=Q.CURVE,{h:G,n:V}=Y;t8(J,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});let{endo:q}=J;if(q){if(!X.is0(Y.a)||typeof q.beta!=="bigint"||!Array.isArray(q.basises))throw Error('invalid endo: expected "beta": bigint and "basises": array')}let H=qz(X,W);function Z(){if(!X.isOdd)throw Error("compression is not supported: Field does not have .isOdd()")}function M(g,S,K){let{x:D,y:L}=S.toAffine(),P=X.toBytes(D);if(eQ(K,"isCompressed"),K){Z();let O=!X.isOdd(L);return E$(Vz(O),P)}else return E$(Uint8Array.of(4),P,X.toBytes(L))}function j(g){ZJ(g,void 0,"Point");let{publicKey:S,publicKeyUncompressed:K}=H,D=g.length,L=g[0],P=g.subarray(1);if(D===S&&(L===2||L===3)){let O=X.fromBytes(P);if(!X.isValid(O))throw Error("bad point: is not on curve, wrong x");let C=A(O),x;try{x=X.sqrt(C)}catch(T){let s=T instanceof Error?": "+T.message:"";throw Error("bad point: is not on curve, sqrt error"+s)}Z();let B=X.isOdd(x);if((L&1)===1!==B)x=X.neg(x);return{x:O,y:x}}else if(D===K&&L===4){let O=X.BYTES,C=X.fromBytes(P.subarray(0,O)),x=X.fromBytes(P.subarray(O,O*2));if(!E(C,x))throw Error("bad point: is not on curve");return{x:C,y:x}}else throw Error(`bad point: got length ${D}, expected compressed=${S} or uncompressed=${K}`)}let R=J.toBytes||M,N=J.fromBytes||j;function A(g){let S=X.sqr(g),K=X.mul(S,g);return X.add(X.add(K,X.mul(g,Y.a)),Y.b)}function E(g,S){let K=X.sqr(S),D=A(g);return X.eql(K,D)}if(!E(Y.Gx,Y.Gy))throw Error("bad curve params: generator point");let h=X.mul(X.pow(Y.a,V7),e3),y=X.mul(X.sqr(Y.b),BigInt(27));if(X.is0(X.add(h,y)))throw Error("bad curve params: a or b");function k(g,S,K=!1){if(!X.isValid(S)||K&&X.is0(S))throw Error(`bad point coordinate ${g}`);return S}function v(g){if(!(g instanceof p))throw Error("ProjectivePoint expected")}function f(g){if(!q||!q.basises)throw Error("no endo");return t3(g,q.basises,W.ORDER)}let d=FW((g,S)=>{let{X:K,Y:D,Z:L}=g;if(X.eql(L,X.ONE))return{x:K,y:D};let P=g.is0();if(S==null)S=P?X.ONE:X.inv(L);let O=X.mul(K,S),C=X.mul(D,S),x=X.mul(L,S);if(P)return{x:X.ZERO,y:X.ZERO};if(!X.eql(x,X.ONE))throw Error("invZ was invalid");return{x:O,y:C}}),c=FW((g)=>{if(g.is0()){if(J.allowInfinityPoint&&!X.is0(g.Y))return;throw Error("bad point: ZERO")}let{x:S,y:K}=g.toAffine();if(!X.isValid(S)||!X.isValid(K))throw Error("bad point: x or y not field elements");if(!E(S,K))throw Error("bad point: equation left != right");if(!g.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});function o(g,S,K,D,L){return K=new p(X.mul(K.X,g),K.Y,K.Z),S=YY(D,S),K=YY(L,K),S.add(K)}class p{constructor(g,S,K){this.X=k("x",g),this.Y=k("y",S,!0),this.Z=k("z",K),Object.freeze(this)}static CURVE(){return Y}static fromAffine(g){let{x:S,y:K}=g||{};if(!g||!X.isValid(S)||!X.isValid(K))throw Error("invalid affine point");if(g instanceof p)throw Error("projective point not allowed");if(X.is0(S)&&X.is0(K))return p.ZERO;return new p(S,K,X.ONE)}static fromBytes(g){let S=p.fromAffine(N(ZJ(g,void 0,"point")));return S.assertValidity(),S}static fromHex(g){return p.fromBytes(S9("pointHex",g))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(g=8,S=!0){if(n.createCache(this,g),!S)this.multiply(V7);return this}assertValidity(){c(this)}hasEvenY(){let{y:g}=this.toAffine();if(!X.isOdd)throw Error("Field doesn't support isOdd");return!X.isOdd(g)}equals(g){v(g);let{X:S,Y:K,Z:D}=this,{X:L,Y:P,Z:O}=g,C=X.eql(X.mul(S,O),X.mul(L,D)),x=X.eql(X.mul(K,O),X.mul(P,D));return C&&x}negate(){return new p(this.X,X.neg(this.Y),this.Z)}double(){let{a:g,b:S}=Y,K=X.mul(S,V7),{X:D,Y:L,Z:P}=this,O=X.ZERO,C=X.ZERO,x=X.ZERO,B=X.mul(D,D),z=X.mul(L,L),T=X.mul(P,P),s=X.mul(D,L);return s=X.add(s,s),x=X.mul(D,P),x=X.add(x,x),O=X.mul(g,x),C=X.mul(K,T),C=X.add(O,C),O=X.sub(z,C),C=X.add(z,C),C=X.mul(O,C),O=X.mul(s,O),x=X.mul(K,x),T=X.mul(g,T),s=X.sub(B,T),s=X.mul(g,s),s=X.add(s,x),x=X.add(B,B),B=X.add(x,B),B=X.add(B,T),B=X.mul(B,s),C=X.add(C,B),T=X.mul(L,P),T=X.add(T,T),B=X.mul(T,s),O=X.sub(O,B),x=X.mul(T,z),x=X.add(x,x),x=X.add(x,x),new p(O,C,x)}add(g){v(g);let{X:S,Y:K,Z:D}=this,{X:L,Y:P,Z:O}=g,C=X.ZERO,x=X.ZERO,B=X.ZERO,z=Y.a,T=X.mul(Y.b,V7),s=X.mul(S,L),Y0=X.mul(K,P),Z0=X.mul(D,O),S0=X.add(S,K),T0=X.add(L,P);S0=X.mul(S0,T0),T0=X.add(s,Y0),S0=X.sub(S0,T0),T0=X.add(S,D);let A0=X.add(L,O);return T0=X.mul(T0,A0),A0=X.add(s,Z0),T0=X.sub(T0,A0),A0=X.add(K,D),C=X.add(P,O),A0=X.mul(A0,C),C=X.add(Y0,Z0),A0=X.sub(A0,C),B=X.mul(z,T0),C=X.mul(T,Z0),B=X.add(C,B),C=X.sub(Y0,B),B=X.add(Y0,B),x=X.mul(C,B),Y0=X.add(s,s),Y0=X.add(Y0,s),Z0=X.mul(z,Z0),T0=X.mul(T,T0),Y0=X.add(Y0,Z0),Z0=X.sub(s,Z0),Z0=X.mul(z,Z0),T0=X.add(T0,Z0),s=X.mul(Y0,T0),x=X.add(x,s),s=X.mul(A0,T0),C=X.mul(S0,C),C=X.sub(C,s),s=X.mul(S0,Y0),B=X.mul(A0,B),B=X.add(B,s),new p(C,x,B)}subtract(g){return this.add(g.negate())}is0(){return this.equals(p.ZERO)}multiply(g){let{endo:S}=J;if(!W.isValidNot0(g))throw Error("invalid scalar: out of range");let K,D,L=(P)=>n.cached(this,P,(O)=>Q8(p,O));if(S){let{k1neg:P,k1:O,k2neg:C,k2:x}=f(g),{p:B,f:z}=L(O),{p:T,f:s}=L(x);D=z.add(s),K=o(S.beta,B,T,P,C)}else{let{p:P,f:O}=L(g);K=P,D=O}return Q8(p,[K,D])[0]}multiplyUnsafe(g){let{endo:S}=J,K=this;if(!W.isValid(g))throw Error("invalid scalar: out of range");if(g===q8||K.is0())return p.ZERO;if(g===bW)return K;if(n.hasCache(this))return this.multiply(g);if(S){let{k1neg:D,k1:L,k2neg:P,k2:O}=f(g),{p1:C,p2:x}=MZ(p,K,L,O);return o(S.beta,C,x,D,P)}else return n.unsafe(K,g)}multiplyAndAddUnsafe(g,S,K){let D=this.multiplyUnsafe(S).add(g.multiplyUnsafe(K));return D.is0()?void 0:D}toAffine(g){return d(this,g)}isTorsionFree(){let{isTorsionFree:g}=J;if(G===bW)return!0;if(g)return g(p,this);return n.unsafe(this,V).is0()}clearCofactor(){let{clearCofactor:g}=J;if(G===bW)return this;if(g)return g(p,this);return this.multiplyUnsafe(G)}isSmallOrder(){return this.multiplyUnsafe(G).is0()}toBytes(g=!0){return eQ(g,"isCompressed"),this.assertValidity(),R(p,this,g)}toHex(g=!0){return AJ(this.toBytes(g))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(g=!0){return this.toBytes(g)}_setWindowSize(g){this.precompute(g)}static normalizeZ(g){return Q8(p,g)}static msm(g,S){return BW(p,W,g,S)}static fromPrivateKey(g){return p.BASE.multiply(vW(W,g))}}p.BASE=new p(Y.Gx,Y.Gy,X.ONE),p.ZERO=new p(X.ZERO,X.ONE,X.ZERO),p.Fp=X,p.Fn=W;let u=W.BITS,n=new GY(p,J.endo?Math.ceil(u/2):u);return p.BASE.precompute(8),p}function Vz($){return Uint8Array.of($?2:3)}function qz($,J){return{secretKey:J.BYTES,publicKey:1+$.BYTES,publicKeyUncompressed:1+2*$.BYTES,publicKeyHasPrefix:!0,signature:2*J.BYTES}}function JE($,J={}){let{Fn:Q}=$,X=J.randomBytes||s8,W=Object.assign(qz($.Fp,Q),{seed:jq(Q.ORDER)});function Y(R){try{return!!vW(Q,R)}catch(N){return!1}}function G(R,N){let{publicKey:A,publicKeyUncompressed:E}=W;try{let h=R.length;if(N===!0&&h!==A)return!1;if(N===!1&&h!==E)return!1;return!!$.fromBytes(R)}catch(h){return!1}}function V(R=X(W.seed)){return Mq(ZJ(R,W.seed,"seed"),Q.ORDER)}function q(R,N=!0){return $.BASE.multiply(vW(Q,R)).toBytes(N)}function H(R){let N=V(R);return{secretKey:N,publicKey:q(N)}}function Z(R){if(typeof R==="bigint")return!1;if(R instanceof $)return!0;let{secretKey:N,publicKey:A,publicKeyUncompressed:E}=W;if(Q.allowedLengths||N===A)return;let h=S9("key",R).length;return h===A||h===E}function M(R,N,A=!0){if(Z(R)===!0)throw Error("first arg must be private key");if(Z(N)===!1)throw Error("second arg must be public key");let E=vW(Q,R);return $.fromHex(N).multiply(E).toBytes(A)}return Object.freeze({getPublicKey:q,getSharedSecret:M,keygen:H,Point:$,utils:{isValidSecretKey:Y,isValidPublicKey:G,randomSecretKey:V,isValidPrivateKey:Y,randomPrivateKey:V,normPrivateKeyToScalar:(R)=>vW(Q,R),precompute(R=8,N=$.BASE){return N.precompute(R,!1)}},lengths:W})}function QE($,J,Q={}){Wz(J),t8(Q,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});let X=Q.randomBytes||s8,W=Q.hmac||((K,...D)=>q7(J,K,E$(...D))),{Fp:Y,Fn:G}=$,{ORDER:V,BITS:q}=G,{keygen:H,getPublicKey:Z,getSharedSecret:M,utils:j,lengths:R}=JE($,Q),N={prehash:!1,lowS:typeof Q.lowS==="boolean"?Q.lowS:!1,format:void 0,extraEntropy:!1},A="compact";function E(K){let D=V>>bW;return K>D}function h(K,D){if(!G.isValidNot0(D))throw Error(`invalid signature ${K}: out of range 1..Point.Fn.ORDER`);return D}function y(K,D){R1(D);let L=R.signature,P=D==="compact"?L:D==="recovered"?L+1:void 0;return ZJ(K,P,`${D} signature`)}class k{constructor(K,D,L){if(this.r=h("r",K),this.s=h("s",D),L!=null)this.recovery=L;Object.freeze(this)}static fromBytes(K,D=A){y(K,D);let L;if(D==="der"){let{r:x,s:B}=V8.toSig(ZJ(K));return new k(x,B)}if(D==="recovered")L=K[0],D="compact",K=K.subarray(1);let P=G.BYTES,O=K.subarray(0,P),C=K.subarray(P,P*2);return new k(G.fromBytes(O),G.fromBytes(C),L)}static fromHex(K,D){return this.fromBytes(IX(K),D)}addRecoveryBit(K){return new k(this.r,this.s,K)}recoverPublicKey(K){let D=Y.ORDER,{r:L,s:P,recovery:O}=this;if(O==null||![0,1,2,3].includes(O))throw Error("recovery id invalid");if(V*Gz<D&&O>1)throw Error("recovery id is ambiguous for h>1 curve");let x=O===2||O===3?L+V:L;if(!Y.isValid(x))throw Error("recovery id 2 or 3 invalid");let B=Y.toBytes(x),z=$.fromBytes(E$(Vz((O&1)===0),B)),T=G.inv(x),s=f(S9("msgHash",K)),Y0=G.create(-s*T),Z0=G.create(P*T),S0=$.BASE.multiplyUnsafe(Y0).add(z.multiplyUnsafe(Z0));if(S0.is0())throw Error("point at infinify");return S0.assertValidity(),S0}hasHighS(){return E(this.s)}toBytes(K=A){if(R1(K),K==="der")return IX(V8.hexFromSig(this));let D=G.toBytes(this.r),L=G.toBytes(this.s);if(K==="recovered"){if(this.recovery==null)throw Error("recovery bit must be present");return E$(Uint8Array.of(this.recovery),D,L)}return E$(D,L)}toHex(K){return AJ(this.toBytes(K))}assertValidity(){}static fromCompact(K){return k.fromBytes(S9("sig",K),"compact")}static fromDER(K){return k.fromBytes(S9("sig",K),"der")}normalizeS(){return this.hasHighS()?new k(this.r,G.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return AJ(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return AJ(this.toBytes("compact"))}}let v=Q.bits2int||function(D){if(D.length>8192)throw Error("input is too large");let L=_W(D),P=D.length*8-q;return P>0?L>>BigInt(P):L},f=Q.bits2int_modN||function(D){return G.create(v(D))},d=r8(q);function c(K){return XY("num < 2^"+q,K,q8,d),G.toBytes(K)}function o(K,D){return ZJ(K,void 0,"message"),D?ZJ(J(K),void 0,"prehashed message"):K}function p(K,D,L){if(["recovered","canonical"].some((Z0)=>(Z0 in L)))throw Error("sign() legacy options not supported");let{lowS:P,prehash:O,extraEntropy:C}=P1(L,N);K=o(K,O);let x=f(K),B=vW(G,D),z=[c(B),c(x)];if(C!=null&&C!==!1){let Z0=C===!0?X(R.secretKey):C;z.push(S9("extraEntropy",Z0))}let T=E$(...z),s=x;function Y0(Z0){let S0=v(Z0);if(!G.isValidNot0(S0))return;let T0=G.inv(S0),A0=$.BASE.multiply(S0).toAffine(),p9=G.create(A0.x);if(p9===q8)return;let e0=G.create(T0*G.create(s+p9*B));if(e0===q8)return;let G9=(A0.x===p9?0:2)|Number(A0.y&bW),s$=e0;if(P&&E(e0))s$=G.neg(e0),G9^=1;return new k(p9,s$,G9)}return{seed:T,k2sig:Y0}}function u(K,D,L={}){K=S9("message",K);let{seed:P,k2sig:O}=p(K,D,L);return $Z(J.outputLen,G.BYTES,W)(P,O)}function n(K){let D=void 0,L=typeof K==="string"||n8(K),P=!L&&K!==null&&typeof K==="object"&&typeof K.r==="bigint"&&typeof K.s==="bigint";if(!L&&!P)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(P)D=new k(K.r,K.s);else if(L){try{D=k.fromBytes(S9("sig",K),"der")}catch(O){if(!(O instanceof V8.Err))throw O}if(!D)try{D=k.fromBytes(S9("sig",K),"compact")}catch(O){return!1}}if(!D)return!1;return D}function g(K,D,L,P={}){let{lowS:O,prehash:C,format:x}=P1(P,N);if(L=S9("publicKey",L),D=o(S9("message",D),C),"strict"in P)throw Error("options.strict was renamed to lowS");let B=x===void 0?n(K):k.fromBytes(S9("sig",K),x);if(B===!1)return!1;try{let z=$.fromBytes(L);if(O&&B.hasHighS())return!1;let{r:T,s}=B,Y0=f(D),Z0=G.inv(s),S0=G.create(Y0*Z0),T0=G.create(T*Z0),A0=$.BASE.multiplyUnsafe(S0).add(z.multiplyUnsafe(T0));if(A0.is0())return!1;return G.create(A0.x)===T}catch(z){return!1}}function S(K,D,L={}){let{prehash:P}=P1(L,N);return D=o(D,P),k.fromBytes(K,"recovered").recoverPublicKey(D).toBytes()}return Object.freeze({keygen:H,getPublicKey:Z,getSharedSecret:M,utils:j,lengths:R,Point:$,sign:u,verify:g,recoverPublicKey:S,Signature:k,hash:J})}function XE($){let J={a:$.a,b:$.b,p:$.Fp.ORDER,n:$.n,h:$.h,Gx:$.Gx,Gy:$.Gy},Q=$.Fp,X=$.allowedPrivateKeyLengths?Array.from(new Set($.allowedPrivateKeyLengths.map((G)=>Math.ceil(G/2)))):void 0,W=zJ(J.n,{BITS:$.nBitLength,allowedLengths:X,modFromBytes:$.wrapPrivateKey}),Y={Fp:Q,Fn:W,allowInfinityPoint:$.allowInfinityPoint,endo:$.endo,isTorsionFree:$.isTorsionFree,clearCofactor:$.clearCofactor,fromBytes:$.fromBytes,toBytes:$.toBytes};return{CURVE:J,curveOpts:Y}}function WE($){let{CURVE:J,curveOpts:Q}=XE($),X={hmac:$.hmac,randomBytes:$.randomBytes,lowS:$.lowS,bits2int:$.bits2int,bits2int_modN:$.bits2int_modN};return{CURVE:J,curveOpts:Q,hash:$.hash,ecdsaOpts:X}}function YE($,J){let Q=J.Point;return Object.assign({},J,{ProjectivePoint:Q,CURVE:Object.assign({},$,gG(Q.Fn.ORDER,Q.Fn.BITS))})}function Kz($){let{CURVE:J,curveOpts:Q,hash:X,ecdsaOpts:W}=WE($),Y=$E(J,Q),G=QE(Y,X,W);return YE($,G)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Hz($,J){let Q=(X)=>Kz({...$,hash:X});return{...Q(J),create:Q}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var N1={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},GE={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]};var Dz=BigInt(2);function VE($){let J=N1.p,Q=BigInt(3),X=BigInt(6),W=BigInt(11),Y=BigInt(22),G=BigInt(23),V=BigInt(44),q=BigInt(88),H=$*$*$%J,Z=H*H*$%J,M=s9(Z,Q,J)*Z%J,j=s9(M,Q,J)*Z%J,R=s9(j,Dz,J)*H%J,N=s9(R,W,J)*R%J,A=s9(N,Y,J)*N%J,E=s9(A,V,J)*A%J,h=s9(E,q,J)*E%J,y=s9(h,V,J)*A%J,k=s9(y,Q,J)*Z%J,v=s9(k,G,J)*N%J,f=s9(v,X,J)*H%J,d=s9(f,Dz,J);if(!O1.eql(O1.sqr(d),$))throw Error("Cannot find square root");return d}var O1=zJ(N1.p,{sqrt:VE}),K7=Hz({...N1,Fp:O1,lowS:!0,endo:GE},IW);var gM9=WJ.utils.randomPrivateKey,Uz=()=>{let $=WJ.utils.randomPrivateKey(),J=I1($),Q=new Uint8Array(64);return Q.set($),Q.set(J,32),{publicKey:J,secretKey:Q}},I1=WJ.getPublicKey;function Zz($){try{return WJ.ExtendedPoint.fromHex($),!0}catch{return!1}}var Bz=($,J)=>WJ.sign($,J.slice(0,32)),KE=WJ.verify,M9=($)=>{if(c0.isBuffer($))return $;else if($ instanceof Uint8Array)return c0.from($.buffer,$.byteOffset,$.byteLength);else return c0.from($)};class Cz{constructor($){Object.assign(this,$)}encode(){return c0.from(mW.serialize(U7,this))}static decode($){return mW.deserialize(U7,this,$)}static decodeUnchecked($){return mW.deserializeUnchecked(U7,this,$)}}var U7=new Map,Iz,HE=32,OY=32;function DE($){return $._bn!==void 0}var zz=1;class a0 extends Cz{constructor($){super({});if(this._bn=void 0,DE($))this._bn=$._bn;else{if(typeof $==="string"){let J=GJ.default.decode($);if(J.length!=OY)throw Error("Invalid public key input");this._bn=new C1.default(J)}else this._bn=new C1.default($);if(this._bn.byteLength()>OY)throw Error("Invalid public key input")}}static unique(){let $=new a0(zz);return zz+=1,new a0($.toBuffer())}equals($){return this._bn.eq($._bn)}toBase58(){return GJ.default.encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){let $=this.toBuffer();return new Uint8Array($.buffer,$.byteOffset,$.byteLength)}toBuffer(){let $=this._bn.toArrayLike(c0);if($.length===OY)return $;let J=c0.alloc(32);return $.copy(J,32-$.length),J}get[Symbol.toStringTag](){return`PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed($,J,Q){let X=c0.concat([$.toBuffer(),c0.from(J),Q.toBuffer()]),W=qY(X);return new a0(W)}static createProgramAddressSync($,J){let Q=c0.alloc(0);$.forEach(function(W){if(W.length>HE)throw TypeError("Max seed length exceeded");Q=c0.concat([Q,M9(W)])}),Q=c0.concat([Q,J.toBuffer(),c0.from("ProgramDerivedAddress")]);let X=qY(Q);if(Zz(X))throw Error("Invalid seeds, address must fall off the curve");return new a0(X)}static async createProgramAddress($,J){return this.createProgramAddressSync($,J)}static findProgramAddressSync($,J){let Q=255,X;while(Q!=0){try{let W=$.concat(c0.from([Q]));X=this.createProgramAddressSync(W,J)}catch(W){if(W instanceof TypeError)throw W;Q--;continue}return[X,Q]}throw Error("Unable to find a viable program address nonce")}static async findProgramAddress($,J){return this.findProgramAddressSync($,J)}static isOnCurve($){let J=new a0($);return Zz(J.toBytes())}}Iz=a0;a0.default=new Iz("11111111111111111111111111111111");U7.set(a0,{kind:"struct",fields:[["_bn","u256"]]});var mM9=new a0("BPFLoader1111111111111111111111111111111111"),Z7=1232,UE=127,kz=64;class Tz extends Error{constructor($){super(`Signature ${$} has expired: block height exceeded.`);this.signature=void 0,this.signature=$}}Object.defineProperty(Tz.prototype,"name",{value:"TransactionExpiredBlockheightExceededError"});class Az extends Error{constructor($,J){super(`Transaction was not confirmed in ${J.toFixed(2)} seconds. It is unknown if it succeeded or failed. Check signature ${$} using the Solana Explorer or CLI tools.`);this.signature=void 0,this.signature=$}}Object.defineProperty(Az.prototype,"name",{value:"TransactionExpiredTimeoutError"});class Ez extends Error{constructor($){super(`Signature ${$} has expired: the nonce is no longer valid.`);this.signature=void 0,this.signature=$}}Object.defineProperty(Ez.prototype,"name",{value:"TransactionExpiredNonceInvalidError"});class k1{constructor($,J){this.staticAccountKeys=void 0,this.accountKeysFromLookups=void 0,this.staticAccountKeys=$,this.accountKeysFromLookups=J}keySegments(){let $=[this.staticAccountKeys];if(this.accountKeysFromLookups)$.push(this.accountKeysFromLookups.writable),$.push(this.accountKeysFromLookups.readonly);return $}get($){for(let J of this.keySegments())if($<J.length)return J[$];else $-=J.length;return}get length(){return this.keySegments().flat().length}compileInstructions($){if(this.length>256)throw Error("Account index overflow encountered during compilation");let Q=new Map;this.keySegments().flat().forEach((W,Y)=>{Q.set(W.toBase58(),Y)});let X=(W)=>{let Y=Q.get(W.toBase58());if(Y===void 0)throw Error("Encountered an unknown instruction account key during compilation");return Y};return $.map((W)=>{return{programIdIndex:X(W.programId),accountKeyIndexes:W.keys.map((Y)=>X(Y.pubkey)),data:W.data}})}}var z9=($="publicKey")=>{return m.blob(32,$)};var yW=($="string")=>{let J=m.struct([m.u32("length"),m.u32("lengthPadding"),m.blob(m.offset(m.u32(),-8),"chars")],$),Q=J.decode.bind(J),X=J.encode.bind(J),W=J;return W.decode=(Y,G)=>{return Q(Y,G).chars.toString()},W.encode=(Y,G,V)=>{let q={chars:c0.from(Y,"utf8")};return X(q,G,V)},W.alloc=(Y)=>{return m.u32().span+m.u32().span+c0.from(Y,"utf8").length},W},ZE=($="authorized")=>{return m.struct([z9("staker"),z9("withdrawer")],$)},zE=($="lockup")=>{return m.struct([m.ns64("unixTimestamp"),m.ns64("epoch"),z9("custodian")],$)},jE=($="voteInit")=>{return m.struct([z9("nodePubkey"),z9("authorizedVoter"),z9("authorizedWithdrawer"),m.u8("commission")],$)},ME=($="voteAuthorizeWithSeedArgs")=>{return m.struct([m.u32("voteAuthorizationType"),z9("currentAuthorityDerivedKeyOwnerPubkey"),yW("currentAuthorityDerivedKeySeed"),z9("newAuthorized")],$)};function hz($,J){let Q=(W)=>{if(W.span>=0)return W.span;else if(typeof W.alloc==="function")return W.alloc(J[W.property]);else if("count"in W&&"elementLayout"in W){let Y=J[W.property];if(Array.isArray(Y))return Y.length*Q(W.elementLayout)}else if("fields"in W)return hz({layout:W},J[W.property]);return 0},X=0;return $.layout.fields.forEach((W)=>{X+=Q(W)}),X}function wY($){let J=0,Q=0;for(;;){let X=$.shift();if(J|=(X&127)<<Q*7,Q+=1,(X&128)===0)break}return J}function PY($,J){let Q=J;for(;;){let X=Q&127;if(Q>>=7,Q==0){$.push(X);break}else X|=128,$.push(X)}}function _$($,J){if(!$)throw Error(J||"Assertion failed")}class A1{constructor($,J){this.payer=void 0,this.keyMetaMap=void 0,this.payer=$,this.keyMetaMap=J}static compile($,J){let Q=new Map,X=(Y)=>{let G=Y.toBase58(),V=Q.get(G);if(V===void 0)V={isSigner:!1,isWritable:!1,isInvoked:!1},Q.set(G,V);return V},W=X(J);W.isSigner=!0,W.isWritable=!0;for(let Y of $){X(Y.programId).isInvoked=!0;for(let G of Y.keys){let V=X(G.pubkey);V.isSigner||=G.isSigner,V.isWritable||=G.isWritable}}return new A1(J,Q)}getMessageComponents(){let $=[...this.keyMetaMap.entries()];_$($.length<=256,"Max static account keys length exceeded");let J=$.filter(([,V])=>V.isSigner&&V.isWritable),Q=$.filter(([,V])=>V.isSigner&&!V.isWritable),X=$.filter(([,V])=>!V.isSigner&&V.isWritable),W=$.filter(([,V])=>!V.isSigner&&!V.isWritable),Y={numRequiredSignatures:J.length+Q.length,numReadonlySignedAccounts:Q.length,numReadonlyUnsignedAccounts:W.length};{_$(J.length>0,"Expected at least one writable signer key");let[V]=J[0];_$(V===this.payer.toBase58(),"Expected first writable signer key to be the fee payer")}let G=[...J.map(([V])=>new a0(V)),...Q.map(([V])=>new a0(V)),...X.map(([V])=>new a0(V)),...W.map(([V])=>new a0(V))];return[Y,G]}extractTableLookup($){let[J,Q]=this.drainKeysFoundInLookupTable($.state.addresses,(Y)=>!Y.isSigner&&!Y.isInvoked&&Y.isWritable),[X,W]=this.drainKeysFoundInLookupTable($.state.addresses,(Y)=>!Y.isSigner&&!Y.isInvoked&&!Y.isWritable);if(J.length===0&&X.length===0)return;return[{accountKey:$.key,writableIndexes:J,readonlyIndexes:X},{writable:Q,readonly:W}]}drainKeysFoundInLookupTable($,J){let Q=[],X=[];for(let[W,Y]of this.keyMetaMap.entries())if(J(Y)){let G=new a0(W),V=$.findIndex((q)=>q.equals(G));if(V>=0)_$(V<256,"Max lookup table index exceeded"),Q.push(V),X.push(G),this.keyMetaMap.delete(W)}return[Q,X]}}var xz="Reached end of buffer unexpectedly";function H7($){if($.length===0)throw Error(xz);return $.shift()}function RY($,...J){let[Q]=J;if(J.length===2?Q+(J[1]??0)>$.length:Q>=$.length)throw Error(xz);return $.splice(...J)}class FY{constructor($){this.header=void 0,this.accountKeys=void 0,this.recentBlockhash=void 0,this.instructions=void 0,this.indexToProgramIds=new Map,this.header=$.header,this.accountKeys=$.accountKeys.map((J)=>new a0(J)),this.recentBlockhash=$.recentBlockhash,this.instructions=$.instructions,this.instructions.forEach((J)=>this.indexToProgramIds.set(J.programIdIndex,this.accountKeys[J.programIdIndex]))}get version(){return"legacy"}get staticAccountKeys(){return this.accountKeys}get compiledInstructions(){return this.instructions.map(($)=>({programIdIndex:$.programIdIndex,accountKeyIndexes:$.accounts,data:GJ.default.decode($.data)}))}get addressTableLookups(){return[]}getAccountKeys(){return new k1(this.staticAccountKeys)}static compile($){let J=A1.compile($.instructions,$.payerKey),[Q,X]=J.getMessageComponents(),Y=new k1(X).compileInstructions($.instructions).map((G)=>({programIdIndex:G.programIdIndex,accounts:G.accountKeyIndexes,data:GJ.default.encode(G.data)}));return new FY({header:Q,accountKeys:X,recentBlockhash:$.recentBlockhash,instructions:Y})}isAccountSigner($){return $<this.header.numRequiredSignatures}isAccountWritable($){let J=this.header.numRequiredSignatures;if($>=this.header.numRequiredSignatures){let Q=$-J,W=this.accountKeys.length-J-this.header.numReadonlyUnsignedAccounts;return Q<W}else{let Q=J-this.header.numReadonlySignedAccounts;return $<Q}}isProgramId($){return this.indexToProgramIds.has($)}programIds(){return[...this.indexToProgramIds.values()]}nonProgramIds(){return this.accountKeys.filter(($,J)=>!this.isProgramId(J))}serialize(){let $=this.accountKeys.length,J=[];PY(J,$);let Q=this.instructions.map((Z)=>{let{accounts:M,programIdIndex:j}=Z,R=Array.from(GJ.default.decode(Z.data)),N=[];PY(N,M.length);let A=[];return PY(A,R.length),{programIdIndex:j,keyIndicesCount:c0.from(N),keyIndices:M,dataLength:c0.from(A),data:R}}),X=[];PY(X,Q.length);let W=c0.alloc(Z7);c0.from(X).copy(W);let Y=X.length;Q.forEach((Z)=>{let j=m.struct([m.u8("programIdIndex"),m.blob(Z.keyIndicesCount.length,"keyIndicesCount"),m.seq(m.u8("keyIndex"),Z.keyIndices.length,"keyIndices"),m.blob(Z.dataLength.length,"dataLength"),m.seq(m.u8("userdatum"),Z.data.length,"data")]).encode(Z,W,Y);Y+=j}),W=W.slice(0,Y);let G=m.struct([m.blob(1,"numRequiredSignatures"),m.blob(1,"numReadonlySignedAccounts"),m.blob(1,"numReadonlyUnsignedAccounts"),m.blob(J.length,"keyCount"),m.seq(z9("key"),$,"keys"),z9("recentBlockhash")]),V={numRequiredSignatures:c0.from([this.header.numRequiredSignatures]),numReadonlySignedAccounts:c0.from([this.header.numReadonlySignedAccounts]),numReadonlyUnsignedAccounts:c0.from([this.header.numReadonlyUnsignedAccounts]),keyCount:c0.from(J),keys:this.accountKeys.map((Z)=>M9(Z.toBytes())),recentBlockhash:GJ.default.decode(this.recentBlockhash)},q=c0.alloc(2048),H=G.encode(V,q);return W.copy(q,H),q.slice(0,H+W.length)}static from($){let J=[...$],Q=H7(J);if(Q!==(Q&UE))throw Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");let X=H7(J),W=H7(J),Y=wY(J),G=[];for(let M=0;M<Y;M++){let j=RY(J,0,OY);G.push(new a0(c0.from(j)))}let V=RY(J,0,OY),q=wY(J),H=[];for(let M=0;M<q;M++){let j=H7(J),R=wY(J),N=RY(J,0,R),A=wY(J),E=RY(J,0,A),h=GJ.default.encode(c0.from(E));H.push({programIdIndex:j,accounts:N,data:h})}let Z={header:{numRequiredSignatures:Q,numReadonlySignedAccounts:X,numReadonlyUnsignedAccounts:W},recentBlockhash:GJ.default.encode(c0.from(V)),accountKeys:G,instructions:H};return new FY(Z)}}var LE=c0.alloc(kz).fill(0);class x9{constructor($){if(this.keys=void 0,this.programId=void 0,this.data=c0.alloc(0),this.programId=$.programId,this.keys=$.keys,$.data)this.data=$.data}toJSON(){return{keys:this.keys.map(({pubkey:$,isSigner:J,isWritable:Q})=>({pubkey:$.toJSON(),isSigner:J,isWritable:Q})),programId:this.programId.toJSON(),data:[...this.data]}}}class f9{get signature(){if(this.signatures.length>0)return this.signatures[0].signature;return null}constructor($){if(this.signatures=[],this.feePayer=void 0,this.instructions=[],this.recentBlockhash=void 0,this.lastValidBlockHeight=void 0,this.nonceInfo=void 0,this.minNonceContextSlot=void 0,this._message=void 0,this._json=void 0,!$)return;if($.feePayer)this.feePayer=$.feePayer;if($.signatures)this.signatures=$.signatures;if(Object.prototype.hasOwnProperty.call($,"nonceInfo")){let{minContextSlot:J,nonceInfo:Q}=$;this.minNonceContextSlot=J,this.nonceInfo=Q}else if(Object.prototype.hasOwnProperty.call($,"lastValidBlockHeight")){let{blockhash:J,lastValidBlockHeight:Q}=$;this.recentBlockhash=J,this.lastValidBlockHeight=Q}else{let{recentBlockhash:J,nonceInfo:Q}=$;if(Q)this.nonceInfo=Q;this.recentBlockhash=J}}toJSON(){return{recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map(($)=>$.toJSON()),signers:this.signatures.map(({publicKey:$})=>{return $.toJSON()})}}add(...$){if($.length===0)throw Error("No instructions");return $.forEach((J)=>{if("instructions"in J)this.instructions=this.instructions.concat(J.instructions);else if("data"in J&&"programId"in J&&"keys"in J)this.instructions.push(J);else this.instructions.push(new x9(J))}),this}compileMessage(){if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json))return this._message;let $,J;if(this.nonceInfo)if($=this.nonceInfo.nonce,this.instructions[0]!=this.nonceInfo.nonceInstruction)J=[this.nonceInfo.nonceInstruction,...this.instructions];else J=this.instructions;else $=this.recentBlockhash,J=this.instructions;if(!$)throw Error("Transaction recentBlockhash required");if(J.length<1)console.warn("No instructions provided");let Q;if(this.feePayer)Q=this.feePayer;else if(this.signatures.length>0&&this.signatures[0].publicKey)Q=this.signatures[0].publicKey;else throw Error("Transaction fee payer required");for(let N=0;N<J.length;N++)if(J[N].programId===void 0)throw Error(`Transaction instruction index ${N} has undefined program id`);let X=[],W=[];J.forEach((N)=>{N.keys.forEach((E)=>{W.push({...E})});let A=N.programId.toString();if(!X.includes(A))X.push(A)}),X.forEach((N)=>{W.push({pubkey:new a0(N),isSigner:!1,isWritable:!1})});let Y=[];W.forEach((N)=>{let A=N.pubkey.toString(),E=Y.findIndex((h)=>{return h.pubkey.toString()===A});if(E>-1)Y[E].isWritable=Y[E].isWritable||N.isWritable,Y[E].isSigner=Y[E].isSigner||N.isSigner;else Y.push(N)}),Y.sort(function(N,A){if(N.isSigner!==A.isSigner)return N.isSigner?-1:1;if(N.isWritable!==A.isWritable)return N.isWritable?-1:1;let E={localeMatcher:"best fit",usage:"sort",sensitivity:"variant",ignorePunctuation:!1,numeric:!1,caseFirst:"lower"};return N.pubkey.toBase58().localeCompare(A.pubkey.toBase58(),"en",E)});let G=Y.findIndex((N)=>{return N.pubkey.equals(Q)});if(G>-1){let[N]=Y.splice(G,1);N.isSigner=!0,N.isWritable=!0,Y.unshift(N)}else Y.unshift({pubkey:Q,isSigner:!0,isWritable:!0});for(let N of this.signatures){let A=Y.findIndex((E)=>{return E.pubkey.equals(N.publicKey)});if(A>-1){if(!Y[A].isSigner)Y[A].isSigner=!0,console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release.")}else throw Error(`unknown signer: ${N.publicKey.toString()}`)}let V=0,q=0,H=0,Z=[],M=[];Y.forEach(({pubkey:N,isSigner:A,isWritable:E})=>{if(A){if(Z.push(N.toString()),V+=1,!E)q+=1}else if(M.push(N.toString()),!E)H+=1});let j=Z.concat(M),R=J.map((N)=>{let{data:A,programId:E}=N;return{programIdIndex:j.indexOf(E.toString()),accounts:N.keys.map((h)=>j.indexOf(h.pubkey.toString())),data:GJ.default.encode(A)}});return R.forEach((N)=>{_$(N.programIdIndex>=0),N.accounts.forEach((A)=>_$(A>=0))}),new FY({header:{numRequiredSignatures:V,numReadonlySignedAccounts:q,numReadonlyUnsignedAccounts:H},accountKeys:j,recentBlockhash:$,instructions:R})}_compile(){let $=this.compileMessage(),J=$.accountKeys.slice(0,$.header.numRequiredSignatures);if(this.signatures.length===J.length){if(this.signatures.every((X,W)=>{return J[W].equals(X.publicKey)}))return $}return this.signatures=J.map((Q)=>({signature:null,publicKey:Q})),$}serializeMessage(){return this._compile().serialize()}async getEstimatedFee($){return(await $.getFeeForMessage(this.compileMessage())).value}setSigners(...$){if($.length===0)throw Error("No signers");let J=new Set;this.signatures=$.filter((Q)=>{let X=Q.toString();if(J.has(X))return!1;else return J.add(X),!0}).map((Q)=>({signature:null,publicKey:Q}))}sign(...$){if($.length===0)throw Error("No signers");let J=new Set,Q=[];for(let W of $){let Y=W.publicKey.toString();if(J.has(Y))continue;else J.add(Y),Q.push(W)}this.signatures=Q.map((W)=>({signature:null,publicKey:W.publicKey}));let X=this._compile();this._partialSign(X,...Q)}partialSign(...$){if($.length===0)throw Error("No signers");let J=new Set,Q=[];for(let W of $){let Y=W.publicKey.toString();if(J.has(Y))continue;else J.add(Y),Q.push(W)}let X=this._compile();this._partialSign(X,...Q)}_partialSign($,...J){let Q=$.serialize();J.forEach((X)=>{let W=Bz(Q,X.secretKey);this._addSignature(X.publicKey,M9(W))})}addSignature($,J){this._compile(),this._addSignature($,J)}_addSignature($,J){_$(J.length===64);let Q=this.signatures.findIndex((X)=>$.equals(X.publicKey));if(Q<0)throw Error(`unknown signer: ${$.toString()}`);this.signatures[Q].signature=c0.from(J)}verifySignatures($=!0){return!this._getMessageSignednessErrors(this.serializeMessage(),$)}_getMessageSignednessErrors($,J){let Q={};for(let{signature:X,publicKey:W}of this.signatures)if(X===null){if(J)(Q.missing||=[]).push(W)}else if(!KE(X,$,W.toBytes()))(Q.invalid||=[]).push(W);return Q.invalid||Q.missing?Q:void 0}serialize($){let{requireAllSignatures:J,verifySignatures:Q}=Object.assign({requireAllSignatures:!0,verifySignatures:!0},$),X=this.serializeMessage();if(Q){let W=this._getMessageSignednessErrors(X,J);if(W){let Y="Signature verification failed.";if(W.invalid)Y+=`
|
|
7
|
+
Invalid signature for public key${W.invalid.length===1?"":"(s)"} [\`${W.invalid.map((G)=>G.toBase58()).join("`, `")}\`].`;if(W.missing)Y+=`
|
|
8
|
+
Missing signature for public key${W.missing.length===1?"":"(s)"} [\`${W.missing.map((G)=>G.toBase58()).join("`, `")}\`].`;throw Error(Y)}}return this._serialize(X)}_serialize($){let{signatures:J}=this,Q=[];PY(Q,J.length);let X=Q.length+J.length*64+$.length,W=c0.alloc(X);return _$(J.length<256),c0.from(Q).copy(W,0),J.forEach(({signature:Y},G)=>{if(Y!==null)_$(Y.length===64,"signature has invalid length"),c0.from(Y).copy(W,Q.length+G*64)}),$.copy(W,Q.length+J.length*64),_$(W.length<=Z7,`Transaction too large: ${W.length} > ${Z7}`),W}get keys(){return _$(this.instructions.length===1),this.instructions[0].keys.map(($)=>$.pubkey)}get programId(){return _$(this.instructions.length===1),this.instructions[0].programId}get data(){return _$(this.instructions.length===1),this.instructions[0].data}static from($){let J=[...$],Q=wY(J),X=[];for(let W=0;W<Q;W++){let Y=RY(J,0,kz);X.push(GJ.default.encode(c0.from(Y)))}return f9.populate(FY.from(J),X)}static populate($,J=[]){let Q=new f9;if(Q.recentBlockhash=$.recentBlockhash,$.header.numRequiredSignatures>0)Q.feePayer=$.accountKeys[0];return J.forEach((X,W)=>{let Y={signature:X==GJ.default.encode(LE)?null:GJ.default.decode(X),publicKey:$.accountKeys[W]};Q.signatures.push(Y)}),$.instructions.forEach((X)=>{let W=X.accounts.map((Y)=>{let G=$.accountKeys[Y];return{pubkey:G,isSigner:Q.signatures.some((V)=>V.publicKey.toString()===G.toString())||$.isAccountSigner(Y),isWritable:$.isAccountWritable(Y)}});Q.instructions.push(new x9({keys:W,programId:$.accountKeys[X.programIdIndex],data:GJ.default.decode(X.data)}))}),Q._message=$,Q._json=Q.toJSON(),Q}}var wE=160,PE=64,RE=wE/PE,OE=1000/RE,K8=new a0("SysvarC1ock11111111111111111111111111111111"),fM9=new a0("SysvarEpochSchedu1e111111111111111111111111"),lM9=new a0("Sysvar1nstructions1111111111111111111111111"),_1=new a0("SysvarRecentB1ockHashes11111111111111111111"),SY=new a0("SysvarRent111111111111111111111111111111111"),pM9=new a0("SysvarRewards111111111111111111111111111111"),dM9=new a0("SysvarS1otHashes111111111111111111111111111"),uM9=new a0("SysvarS1otHistory11111111111111111111111111"),F1=new a0("SysvarStakeHistory1111111111111111111111111");class vz extends Error{constructor({action:$,signature:J,transactionMessage:Q,logs:X}){let W=X?`Logs:
|
|
9
|
+
${JSON.stringify(X.slice(-10),null,2)}. `:"",Y="\nCatch the `SendTransactionError` and call `getLogs()` on it for full details.",G;switch($){case"send":G=`Transaction ${J} resulted in an error.
|
|
10
|
+
${Q}. `+W+"\nCatch the `SendTransactionError` and call `getLogs()` on it for full details.";break;case"simulate":G=`Simulation failed.
|
|
11
|
+
Message: ${Q}.
|
|
12
|
+
`+W+"\nCatch the `SendTransactionError` and call `getLogs()` on it for full details.";break;default:G=`Unknown action '${((V)=>V)($)}'`}super(G);this.signature=void 0,this.transactionMessage=void 0,this.transactionLogs=void 0,this.signature=J,this.transactionMessage=Q,this.transactionLogs=X?X:void 0}get transactionError(){return{message:this.transactionMessage,logs:Array.isArray(this.transactionLogs)?this.transactionLogs:void 0}}get logs(){let $=this.transactionLogs;if($!=null&&typeof $==="object"&&"then"in $)return;return $}async getLogs($){if(!Array.isArray(this.transactionLogs))this.transactionLogs=new Promise((J,Q)=>{$.getTransaction(this.signature).then((X)=>{if(X&&X.meta&&X.meta.logMessages){let W=X.meta.logMessages;this.transactionLogs=W,J(W)}else Q(Error("Log messages not found"))}).catch(Q)});return await this.transactionLogs}}async function jz($,J,Q,X){let W=X&&{skipPreflight:X.skipPreflight,preflightCommitment:X.preflightCommitment||X.commitment,maxRetries:X.maxRetries,minContextSlot:X.minContextSlot},Y=await $.sendTransaction(J,Q,W),G;if(J.recentBlockhash!=null&&J.lastValidBlockHeight!=null)G=(await $.confirmTransaction({abortSignal:X?.abortSignal,signature:Y,blockhash:J.recentBlockhash,lastValidBlockHeight:J.lastValidBlockHeight},X&&X.commitment)).value;else if(J.minNonceContextSlot!=null&&J.nonceInfo!=null){let{nonceInstruction:V}=J.nonceInfo,q=V.keys[0].pubkey;G=(await $.confirmTransaction({abortSignal:X?.abortSignal,minContextSlot:J.minNonceContextSlot,nonceAccountPubkey:q,nonceValue:J.nonceInfo.nonce,signature:Y},X&&X.commitment)).value}else{if(X?.abortSignal!=null)console.warn("sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.");G=(await $.confirmTransaction(Y,X&&X.commitment)).value}if(G.err){if(Y!=null)throw new vz({action:"send",signature:Y,transactionMessage:`Status: (${JSON.stringify(G)})`});throw Error(`Transaction ${Y} failed (${JSON.stringify(G)})`)}return Y}function NE($){return new Promise((J)=>setTimeout(J,$))}function D9($,J){let Q=$.layout.span>=0?$.layout.span:hz($,J),X=c0.alloc(Q),W=Object.assign({instruction:$.index},J);return $.layout.encode(W,X),X}var _E=m.nu64("lamportsPerSignature"),FE=m.struct([m.u32("version"),m.u32("state"),z9("authorizedPubkey"),z9("nonce"),m.struct([_E],"feeCalculator")]),Mz=FE.span;function gW($){let J=Fz.blob(8,$),Q=J.decode.bind(J),X=J.encode.bind(J),W=J,Y=$2();return W.decode=(G,V)=>{let q=Q(G,V);return Y.decode(q)},W.encode=(G,V,q)=>{let H=Y.encode(G);return X(H,V,q)},W}var xJ=Object.freeze({Create:{index:0,layout:m.struct([m.u32("instruction"),m.ns64("lamports"),m.ns64("space"),z9("programId")])},Assign:{index:1,layout:m.struct([m.u32("instruction"),z9("programId")])},Transfer:{index:2,layout:m.struct([m.u32("instruction"),gW("lamports")])},CreateWithSeed:{index:3,layout:m.struct([m.u32("instruction"),z9("base"),yW("seed"),m.ns64("lamports"),m.ns64("space"),z9("programId")])},AdvanceNonceAccount:{index:4,layout:m.struct([m.u32("instruction")])},WithdrawNonceAccount:{index:5,layout:m.struct([m.u32("instruction"),m.ns64("lamports")])},InitializeNonceAccount:{index:6,layout:m.struct([m.u32("instruction"),z9("authorized")])},AuthorizeNonceAccount:{index:7,layout:m.struct([m.u32("instruction"),z9("authorized")])},Allocate:{index:8,layout:m.struct([m.u32("instruction"),m.ns64("space")])},AllocateWithSeed:{index:9,layout:m.struct([m.u32("instruction"),z9("base"),yW("seed"),m.ns64("space"),z9("programId")])},AssignWithSeed:{index:10,layout:m.struct([m.u32("instruction"),z9("base"),yW("seed"),z9("programId")])},TransferWithSeed:{index:11,layout:m.struct([m.u32("instruction"),gW("lamports"),yW("seed"),z9("programId")])},UpgradeNonceAccount:{index:12,layout:m.struct([m.u32("instruction")])}});class u${constructor(){}static createAccount($){let J=xJ.Create,Q=D9(J,{lamports:$.lamports,space:$.space,programId:M9($.programId.toBuffer())});return new x9({keys:[{pubkey:$.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:$.newAccountPubkey,isSigner:!0,isWritable:!0}],programId:this.programId,data:Q})}static transfer($){let J,Q;if("basePubkey"in $){let X=xJ.TransferWithSeed;J=D9(X,{lamports:BigInt($.lamports),seed:$.seed,programId:M9($.programId.toBuffer())}),Q=[{pubkey:$.fromPubkey,isSigner:!1,isWritable:!0},{pubkey:$.basePubkey,isSigner:!0,isWritable:!1},{pubkey:$.toPubkey,isSigner:!1,isWritable:!0}]}else{let X=xJ.Transfer;J=D9(X,{lamports:BigInt($.lamports)}),Q=[{pubkey:$.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:$.toPubkey,isSigner:!1,isWritable:!0}]}return new x9({keys:Q,programId:this.programId,data:J})}static assign($){let J,Q;if("basePubkey"in $){let X=xJ.AssignWithSeed;J=D9(X,{base:M9($.basePubkey.toBuffer()),seed:$.seed,programId:M9($.programId.toBuffer())}),Q=[{pubkey:$.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:$.basePubkey,isSigner:!0,isWritable:!1}]}else{let X=xJ.Assign;J=D9(X,{programId:M9($.programId.toBuffer())}),Q=[{pubkey:$.accountPubkey,isSigner:!0,isWritable:!0}]}return new x9({keys:Q,programId:this.programId,data:J})}static createAccountWithSeed($){let J=xJ.CreateWithSeed,Q=D9(J,{base:M9($.basePubkey.toBuffer()),seed:$.seed,lamports:$.lamports,space:$.space,programId:M9($.programId.toBuffer())}),X=[{pubkey:$.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:$.newAccountPubkey,isSigner:!1,isWritable:!0}];if(!$.basePubkey.equals($.fromPubkey))X.push({pubkey:$.basePubkey,isSigner:!0,isWritable:!1});return new x9({keys:X,programId:this.programId,data:Q})}static createNonceAccount($){let J=new f9;if("basePubkey"in $&&"seed"in $)J.add(u$.createAccountWithSeed({fromPubkey:$.fromPubkey,newAccountPubkey:$.noncePubkey,basePubkey:$.basePubkey,seed:$.seed,lamports:$.lamports,space:Mz,programId:this.programId}));else J.add(u$.createAccount({fromPubkey:$.fromPubkey,newAccountPubkey:$.noncePubkey,lamports:$.lamports,space:Mz,programId:this.programId}));let Q={noncePubkey:$.noncePubkey,authorizedPubkey:$.authorizedPubkey};return J.add(this.nonceInitialize(Q)),J}static nonceInitialize($){let J=xJ.InitializeNonceAccount,Q=D9(J,{authorized:M9($.authorizedPubkey.toBuffer())}),X={keys:[{pubkey:$.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:_1,isSigner:!1,isWritable:!1},{pubkey:SY,isSigner:!1,isWritable:!1}],programId:this.programId,data:Q};return new x9(X)}static nonceAdvance($){let J=xJ.AdvanceNonceAccount,Q=D9(J),X={keys:[{pubkey:$.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:_1,isSigner:!1,isWritable:!1},{pubkey:$.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:Q};return new x9(X)}static nonceWithdraw($){let J=xJ.WithdrawNonceAccount,Q=D9(J,{lamports:$.lamports});return new x9({keys:[{pubkey:$.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:$.toPubkey,isSigner:!1,isWritable:!0},{pubkey:_1,isSigner:!1,isWritable:!1},{pubkey:SY,isSigner:!1,isWritable:!1},{pubkey:$.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:Q})}static nonceAuthorize($){let J=xJ.AuthorizeNonceAccount,Q=D9(J,{authorized:M9($.newAuthorizedPubkey.toBuffer())});return new x9({keys:[{pubkey:$.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:$.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:Q})}static allocate($){let J,Q;if("basePubkey"in $){let X=xJ.AllocateWithSeed;J=D9(X,{base:M9($.basePubkey.toBuffer()),seed:$.seed,space:$.space,programId:M9($.programId.toBuffer())}),Q=[{pubkey:$.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:$.basePubkey,isSigner:!0,isWritable:!1}]}else{let X=xJ.Allocate;J=D9(X,{space:$.space}),Q=[{pubkey:$.accountPubkey,isSigner:!0,isWritable:!0}]}return new x9({keys:Q,programId:this.programId,data:J})}}u$.programId=new a0("11111111111111111111111111111111");var SE=Z7-300;class z7{constructor(){}static getMinNumSignatures($){return 2*(Math.ceil($/z7.chunkSize)+1+1)}static async load($,J,Q,X,W){{let Z=await $.getMinimumBalanceForRentExemption(W.length),M=await $.getAccountInfo(Q.publicKey,"confirmed"),j=null;if(M!==null){if(M.executable)return console.error("Program load failed, account is already executable"),!1;if(M.data.length!==W.length)j=j||new f9,j.add(u$.allocate({accountPubkey:Q.publicKey,space:W.length}));if(!M.owner.equals(X))j=j||new f9,j.add(u$.assign({accountPubkey:Q.publicKey,programId:X}));if(M.lamports<Z)j=j||new f9,j.add(u$.transfer({fromPubkey:J.publicKey,toPubkey:Q.publicKey,lamports:Z-M.lamports}))}else j=new f9().add(u$.createAccount({fromPubkey:J.publicKey,newAccountPubkey:Q.publicKey,lamports:Z>0?Z:1,space:W.length,programId:X}));if(j!==null)await jz($,j,[J,Q],{commitment:"confirmed"})}let Y=m.struct([m.u32("instruction"),m.u32("offset"),m.u32("bytesLength"),m.u32("bytesLengthPadding"),m.seq(m.u8("byte"),m.offset(m.u32(),-8),"bytes")]),G=z7.chunkSize,V=0,q=W,H=[];while(q.length>0){let Z=q.slice(0,G),M=c0.alloc(G+16);Y.encode({instruction:0,offset:V,bytes:Z,bytesLength:0,bytesLengthPadding:0},M);let j=new f9().add({keys:[{pubkey:Q.publicKey,isSigner:!0,isWritable:!0}],programId:X,data:M});if(H.push(jz($,j,[J,Q],{commitment:"confirmed"})),$._rpcEndpoint.includes("solana.com"))await NE(250);V+=G,q=q.slice(G)}await Promise.all(H);{let Z=m.struct([m.u32("instruction")]),M=c0.alloc(Z.span);Z.encode({instruction:1},M);let j=new f9().add({keys:[{pubkey:Q.publicKey,isSigner:!0,isWritable:!0},{pubkey:SY,isSigner:!1,isWritable:!1}],programId:X,data:M}),R="processed",N=await $.sendTransaction(j,[J,Q],{preflightCommitment:R}),{context:A,value:E}=await $.confirmTransaction({signature:N,lastValidBlockHeight:j.lastValidBlockHeight,blockhash:j.recentBlockhash},R);if(E.err)throw Error(`Transaction ${N} failed (${JSON.stringify(E)})`);while(!0){try{if(await $.getSlot({commitment:R})>A.slot)break}catch{}await new Promise((h)=>setTimeout(h,Math.round(OE/2)))}}return!0}}z7.chunkSize=SE;var cM9=new a0("BPFLoader2111111111111111111111111111111111");/*!
|
|
13
|
+
* humanize-ms - index.js
|
|
14
|
+
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
15
|
+
* MIT Licensed
|
|
16
|
+
*/var iM9=typeof globalThis.fetch==="function"?globalThis.fetch:async function($,J){let Q=typeof $==="string"&&$.slice(0,2)==="//"?"https:"+$:$;return await Sz.default(Q,J)};var aM9={index:1,layout:m.struct([m.u32("typeIndex"),gW("deactivationSlot"),m.nu64("lastExtendedSlot"),m.u8("lastExtendedStartIndex"),m.u8(),m.seq(z9(),m.offset(m.u8(),-1),"authority")])};var z$=xW(Q7(a0),z0(),($)=>new a0($)),bz=X7([z0(),r9("base64")]),E1=xW(Q7(c0),bz,($)=>c0.from($[0],"base64"));function yz($){return p$([G0({jsonrpc:r9("2.0"),id:z0(),result:$}),G0({jsonrpc:r9("2.0"),id:z0(),error:G0({code:bX(),message:z0(),data:E0(Y2())})})])}var BE=yz(bX());function v9($){return xW(yz($),BE,(J)=>{if("error"in J)return J;else return{...J,result:hW(J.result,$)}})}function oJ($){return v9(G0({context:G0({slot:a()}),value:$}))}function M7($){return G0({context:G0({slot:a()}),value:$})}var CE=G0({foundation:a(),foundationTerm:a(),initial:a(),taper:a(),terminal:a()}),oM9=v9(N0(_0(G0({epoch:a(),effectiveSlot:a(),amount:a(),postBalance:a(),commission:E0(_0(a()))})))),IE=N0(G0({slot:a(),prioritizationFee:a()})),kE=G0({total:a(),validator:a(),foundation:a(),epoch:a()}),TE=G0({epoch:a(),slotIndex:a(),slotsInEpoch:a(),absoluteSlot:a(),blockHeight:E0(a()),transactionCount:E0(a())}),AE=G0({slotsPerEpoch:a(),leaderScheduleSlotOffset:a(),warmup:iJ(),firstNormalEpoch:a(),firstNormalSlot:a()}),EE=H1(z0(),N0(a())),yX=_0(p$([G0({}),z0()])),hE=G0({err:yX}),xE=r9("receivedSignature"),nM9=G0({"solana-core":z0(),"feature-set":E0(a())}),vE=G0({program:z0(),programId:z$,parsed:bX()}),bE=G0({programId:z$,accounts:N0(z$),data:z0()}),sM9=oJ(G0({err:_0(p$([G0({}),z0()])),logs:_0(N0(z0())),accounts:E0(_0(N0(_0(G0({executable:iJ(),owner:z0(),lamports:a(),data:N0(z0()),rentEpoch:E0(a())}))))),unitsConsumed:E0(a()),returnData:E0(_0(G0({programId:z0(),data:X7([z0(),r9("base64")])}))),innerInstructions:E0(_0(N0(G0({index:a(),instructions:N0(p$([vE,bE]))}))))})),rM9=oJ(G0({byIdentity:H1(z0(),N0(a())),range:G0({firstSlot:a(),lastSlot:a()})}));var tM9=v9(CE),eM9=v9(kE),$L9=v9(IE),JL9=v9(TE),QL9=v9(AE),XL9=v9(EE),WL9=v9(a()),YL9=oJ(G0({total:a(),circulating:a(),nonCirculating:a(),nonCirculatingAccounts:N0(z$)})),yE=G0({amount:z0(),uiAmount:_0(a()),decimals:a(),uiAmountString:E0(z0())}),GL9=oJ(N0(G0({address:z$,amount:z0(),uiAmount:_0(a()),decimals:a(),uiAmountString:E0(z0())}))),VL9=oJ(N0(G0({pubkey:z$,account:G0({executable:iJ(),owner:z$,lamports:a(),data:E1,rentEpoch:a()})}))),T1=G0({program:z0(),parsed:bX(),space:a()}),qL9=oJ(N0(G0({pubkey:z$,account:G0({executable:iJ(),owner:z$,lamports:a(),data:T1,rentEpoch:a()})}))),KL9=oJ(N0(G0({lamports:a(),address:z$}))),h1=G0({executable:iJ(),owner:z$,lamports:a(),data:E1,rentEpoch:a()}),HL9=G0({pubkey:z$,account:h1}),gE=xW(p$([Q7(c0),T1]),p$([bz,T1]),($)=>{if(Array.isArray($))return hW($,E1);else return $}),mE=G0({executable:iJ(),owner:z$,lamports:a(),data:gE,rentEpoch:a()}),DL9=G0({pubkey:z$,account:mE}),UL9=G0({state:p$([r9("active"),r9("inactive"),r9("activating"),r9("deactivating")]),active:a(),inactive:a()}),ZL9=v9(N0(G0({signature:z0(),slot:a(),err:yX,memo:_0(z0()),blockTime:E0(_0(a()))}))),zL9=v9(N0(G0({signature:z0(),slot:a(),err:yX,memo:_0(z0()),blockTime:E0(_0(a()))}))),jL9=G0({subscription:a(),result:M7(h1)}),fE=G0({pubkey:z$,account:h1}),ML9=G0({subscription:a(),result:M7(fE)}),lE=G0({parent:a(),slot:a(),root:a()}),LL9=G0({subscription:a(),result:lE}),pE=p$([G0({type:p$([r9("firstShredReceived"),r9("completed"),r9("optimisticConfirmation"),r9("root")]),slot:a(),timestamp:a()}),G0({type:r9("createdBank"),parent:a(),slot:a(),timestamp:a()}),G0({type:r9("frozen"),slot:a(),timestamp:a(),stats:G0({numTransactionEntries:a(),numSuccessfulTransactions:a(),numFailedTransactions:a(),maxTransactionsPerEntry:a()})}),G0({type:r9("dead"),slot:a(),timestamp:a(),err:z0()})]),wL9=G0({subscription:a(),result:pE}),PL9=G0({subscription:a(),result:M7(p$([hE,xE]))}),RL9=G0({subscription:a(),result:a()}),OL9=G0({pubkey:z0(),gossip:_0(z0()),tpu:_0(z0()),rpc:_0(z0()),version:_0(z0())}),Lz=G0({votePubkey:z0(),nodePubkey:z0(),activatedStake:a(),epochVoteAccount:iJ(),epochCredits:N0(X7([a(),a(),a()])),commission:a(),lastVote:a(),rootSlot:_0(a())}),NL9=v9(G0({current:N0(Lz),delinquent:N0(Lz)})),dE=p$([r9("processed"),r9("confirmed"),r9("finalized")]),uE=G0({slot:a(),confirmations:_0(a()),err:yX,confirmationStatus:E0(dE)}),_L9=oJ(N0(_0(uE))),FL9=v9(a()),gz=G0({accountKey:z$,writableIndexes:N0(a()),readonlyIndexes:N0(a())}),x1=G0({signatures:N0(z0()),message:G0({accountKeys:N0(z0()),header:G0({numRequiredSignatures:a(),numReadonlySignedAccounts:a(),numReadonlyUnsignedAccounts:a()}),instructions:N0(G0({accounts:N0(a()),data:z0(),programIdIndex:a()})),recentBlockhash:z0(),addressTableLookups:E0(N0(gz))})}),mz=G0({pubkey:z$,signer:iJ(),writable:iJ(),source:E0(p$([r9("transaction"),r9("lookupTable")]))}),fz=G0({accountKeys:N0(mz),signatures:N0(z0())}),lz=G0({parsed:bX(),program:z0(),programId:z$}),pz=G0({accounts:N0(z$),data:z0(),programId:z$}),cE=p$([pz,lz]),iE=p$([G0({parsed:bX(),program:z0(),programId:z0()}),G0({accounts:N0(z0()),data:z0(),programId:z0()})]),dz=xW(cE,iE,($)=>{if("accounts"in $)return hW($,pz);else return hW($,lz)}),uz=G0({signatures:N0(z0()),message:G0({accountKeys:N0(mz),instructions:N0(dz),recentBlockhash:z0(),addressTableLookups:E0(_0(N0(gz)))})}),j7=G0({accountIndex:a(),mint:z0(),owner:E0(z0()),programId:E0(z0()),uiTokenAmount:yE}),cz=G0({writable:N0(z$),readonly:N0(z$)}),L7=G0({err:yX,fee:a(),innerInstructions:E0(_0(N0(G0({index:a(),instructions:N0(G0({accounts:N0(a()),data:z0(),programIdIndex:a()}))})))),preBalances:N0(a()),postBalances:N0(a()),logMessages:E0(_0(N0(z0()))),preTokenBalances:E0(_0(N0(j7))),postTokenBalances:E0(_0(N0(j7))),loadedAddresses:E0(cz),computeUnitsConsumed:E0(a()),costUnits:E0(a())}),v1=G0({err:yX,fee:a(),innerInstructions:E0(_0(N0(G0({index:a(),instructions:N0(dz)})))),preBalances:N0(a()),postBalances:N0(a()),logMessages:E0(_0(N0(z0()))),preTokenBalances:E0(_0(N0(j7))),postTokenBalances:E0(_0(N0(j7))),loadedAddresses:E0(cz),computeUnitsConsumed:E0(a()),costUnits:E0(a())}),fW=p$([r9(0),r9("legacy")]),gX=G0({pubkey:z0(),lamports:a(),postBalance:_0(a()),rewardType:_0(z0()),commission:E0(_0(a()))}),SL9=v9(_0(G0({blockhash:z0(),previousBlockhash:z0(),parentSlot:a(),transactions:N0(G0({transaction:x1,meta:_0(L7),version:E0(fW)})),rewards:E0(N0(gX)),blockTime:_0(a()),blockHeight:_0(a())}))),BL9=v9(_0(G0({blockhash:z0(),previousBlockhash:z0(),parentSlot:a(),rewards:E0(N0(gX)),blockTime:_0(a()),blockHeight:_0(a())}))),CL9=v9(_0(G0({blockhash:z0(),previousBlockhash:z0(),parentSlot:a(),transactions:N0(G0({transaction:fz,meta:_0(L7),version:E0(fW)})),rewards:E0(N0(gX)),blockTime:_0(a()),blockHeight:_0(a())}))),IL9=v9(_0(G0({blockhash:z0(),previousBlockhash:z0(),parentSlot:a(),transactions:N0(G0({transaction:uz,meta:_0(v1),version:E0(fW)})),rewards:E0(N0(gX)),blockTime:_0(a()),blockHeight:_0(a())}))),kL9=v9(_0(G0({blockhash:z0(),previousBlockhash:z0(),parentSlot:a(),transactions:N0(G0({transaction:fz,meta:_0(v1),version:E0(fW)})),rewards:E0(N0(gX)),blockTime:_0(a()),blockHeight:_0(a())}))),TL9=v9(_0(G0({blockhash:z0(),previousBlockhash:z0(),parentSlot:a(),rewards:E0(N0(gX)),blockTime:_0(a()),blockHeight:_0(a())}))),AL9=v9(_0(G0({blockhash:z0(),previousBlockhash:z0(),parentSlot:a(),transactions:N0(G0({transaction:x1,meta:_0(L7)})),rewards:E0(N0(gX)),blockTime:_0(a())}))),EL9=v9(_0(G0({blockhash:z0(),previousBlockhash:z0(),parentSlot:a(),signatures:N0(z0()),blockTime:_0(a())}))),hL9=v9(_0(G0({slot:a(),meta:_0(L7),blockTime:E0(_0(a())),transaction:x1,version:E0(fW)}))),xL9=v9(_0(G0({slot:a(),transaction:uz,meta:_0(v1),blockTime:E0(_0(a())),version:E0(fW)}))),vL9=oJ(G0({blockhash:z0(),lastValidBlockHeight:a()})),bL9=oJ(iJ()),aE=G0({slot:a(),numTransactions:a(),numSlots:a(),samplePeriodSecs:a()}),yL9=v9(N0(aE)),gL9=oJ(_0(G0({feeCalculator:G0({lamportsPerSignature:a()})}))),mL9=v9(z0()),fL9=v9(z0()),oE=G0({err:yX,logs:N0(z0()),signature:z0()}),lL9=G0({result:M7(oE),subscription:a()});class VJ{constructor($){this._keypair=void 0,this._keypair=$??Uz()}static generate(){return new VJ(Uz())}static fromSecretKey($,J){if($.byteLength!==64)throw Error("bad secret key size");let Q=$.slice(32,64);if(!J||!J.skipValidation){let X=$.slice(0,32),W=I1(X);for(let Y=0;Y<32;Y++)if(Q[Y]!==W[Y])throw Error("provided secretKey is invalid")}return new VJ({publicKey:Q,secretKey:$})}static fromSeed($){let J=I1($),Q=new Uint8Array(64);return Q.set($),Q.set(J,32),new VJ({publicKey:J,secretKey:Q})}get publicKey(){return new a0(this._keypair.publicKey)}get secretKey(){return new Uint8Array(this._keypair.secretKey)}}var MY=Object.freeze({CreateLookupTable:{index:0,layout:m.struct([m.u32("instruction"),gW("recentSlot"),m.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:m.struct([m.u32("instruction")])},ExtendLookupTable:{index:2,layout:m.struct([m.u32("instruction"),gW(),m.seq(z9(),m.offset(m.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:m.struct([m.u32("instruction")])},CloseLookupTable:{index:4,layout:m.struct([m.u32("instruction")])}});class iz{constructor(){}static createLookupTable($){let[J,Q]=a0.findProgramAddressSync([$.authority.toBuffer(),q1().encode($.recentSlot)],this.programId),X=MY.CreateLookupTable,W=D9(X,{recentSlot:BigInt($.recentSlot),bumpSeed:Q}),Y=[{pubkey:J,isSigner:!1,isWritable:!0},{pubkey:$.authority,isSigner:!0,isWritable:!1},{pubkey:$.payer,isSigner:!0,isWritable:!0},{pubkey:u$.programId,isSigner:!1,isWritable:!1}];return[new x9({programId:this.programId,keys:Y,data:W}),J]}static freezeLookupTable($){let J=MY.FreezeLookupTable,Q=D9(J),X=[{pubkey:$.lookupTable,isSigner:!1,isWritable:!0},{pubkey:$.authority,isSigner:!0,isWritable:!1}];return new x9({programId:this.programId,keys:X,data:Q})}static extendLookupTable($){let J=MY.ExtendLookupTable,Q=D9(J,{addresses:$.addresses.map((W)=>W.toBytes())}),X=[{pubkey:$.lookupTable,isSigner:!1,isWritable:!0},{pubkey:$.authority,isSigner:!0,isWritable:!1}];if($.payer)X.push({pubkey:$.payer,isSigner:!0,isWritable:!0},{pubkey:u$.programId,isSigner:!1,isWritable:!1});return new x9({programId:this.programId,keys:X,data:Q})}static deactivateLookupTable($){let J=MY.DeactivateLookupTable,Q=D9(J),X=[{pubkey:$.lookupTable,isSigner:!1,isWritable:!0},{pubkey:$.authority,isSigner:!0,isWritable:!1}];return new x9({programId:this.programId,keys:X,data:Q})}static closeLookupTable($){let J=MY.CloseLookupTable,Q=D9(J),X=[{pubkey:$.lookupTable,isSigner:!1,isWritable:!0},{pubkey:$.authority,isSigner:!0,isWritable:!1},{pubkey:$.recipient,isSigner:!1,isWritable:!0}];return new x9({programId:this.programId,keys:X,data:Q})}}iz.programId=new a0("AddressLookupTab1e1111111111111111111111111");var D7=Object.freeze({RequestUnits:{index:0,layout:m.struct([m.u8("instruction"),m.u32("units"),m.u32("additionalFee")])},RequestHeapFrame:{index:1,layout:m.struct([m.u8("instruction"),m.u32("bytes")])},SetComputeUnitLimit:{index:2,layout:m.struct([m.u8("instruction"),m.u32("units")])},SetComputeUnitPrice:{index:3,layout:m.struct([m.u8("instruction"),gW("microLamports")])}});class az{constructor(){}static requestUnits($){let J=D7.RequestUnits,Q=D9(J,$);return new x9({keys:[],programId:this.programId,data:Q})}static requestHeapFrame($){let J=D7.RequestHeapFrame,Q=D9(J,$);return new x9({keys:[],programId:this.programId,data:Q})}static setComputeUnitLimit($){let J=D7.SetComputeUnitLimit,Q=D9(J,$);return new x9({keys:[],programId:this.programId,data:Q})}static setComputeUnitPrice($){let J=D7.SetComputeUnitPrice,Q=D9(J,{microLamports:BigInt($.microLamports)});return new x9({keys:[],programId:this.programId,data:Q})}}az.programId=new a0("ComputeBudget111111111111111111111111111111");var wz=64,Pz=32,Rz=64,Oz=m.struct([m.u8("numSignatures"),m.u8("padding"),m.u16("signatureOffset"),m.u16("signatureInstructionIndex"),m.u16("publicKeyOffset"),m.u16("publicKeyInstructionIndex"),m.u16("messageDataOffset"),m.u16("messageDataSize"),m.u16("messageInstructionIndex")]);class b1{constructor(){}static createInstructionWithPublicKey($){let{publicKey:J,message:Q,signature:X,instructionIndex:W}=$;_$(J.length===Pz,`Public Key must be ${Pz} bytes but received ${J.length} bytes`),_$(X.length===Rz,`Signature must be ${Rz} bytes but received ${X.length} bytes`);let Y=Oz.span,G=Y+J.length,V=G+X.length,q=1,H=c0.alloc(V+Q.length),Z=W==null?65535:W;return Oz.encode({numSignatures:q,padding:0,signatureOffset:G,signatureInstructionIndex:Z,publicKeyOffset:Y,publicKeyInstructionIndex:Z,messageDataOffset:V,messageDataSize:Q.length,messageInstructionIndex:Z},H),H.fill(J,Y),H.fill(X,G),H.fill(Q,V),new x9({keys:[],programId:b1.programId,data:H})}static createInstructionWithPrivateKey($){let{privateKey:J,message:Q,instructionIndex:X}=$;_$(J.length===wz,`Private key must be ${wz} bytes but received ${J.length} bytes`);try{let W=VJ.fromSecretKey(J),Y=W.publicKey.toBytes(),G=Bz(Q,W.secretKey);return this.createInstructionWithPublicKey({publicKey:Y,message:Q,signature:G,instructionIndex:X})}catch(W){throw Error(`Error creating instruction; ${W}`)}}}b1.programId=new a0("Ed25519SigVerify111111111111111111111111111");var nE=($,J)=>{let Q=K7.sign($,J);return[Q.toCompactRawBytes(),Q.recovery]};K7.utils.isValidPrivateKey;var sE=K7.getPublicKey,Nz=32,S1=20,_z=64,rE=11,B1=m.struct([m.u8("numSignatures"),m.u16("signatureOffset"),m.u8("signatureInstructionIndex"),m.u16("ethAddressOffset"),m.u8("ethAddressInstructionIndex"),m.u16("messageDataOffset"),m.u16("messageDataSize"),m.u8("messageInstructionIndex"),m.blob(20,"ethAddress"),m.blob(64,"signature"),m.u8("recoveryId")]);class NY{constructor(){}static publicKeyToEthAddress($){_$($.length===_z,`Public key must be ${_z} bytes but received ${$.length} bytes`);try{return c0.from(_Y(M9($))).slice(-S1)}catch(J){throw Error(`Error constructing Ethereum address: ${J}`)}}static createInstructionWithPublicKey($){let{publicKey:J,message:Q,signature:X,recoveryId:W,instructionIndex:Y}=$;return NY.createInstructionWithEthAddress({ethAddress:NY.publicKeyToEthAddress(J),message:Q,signature:X,recoveryId:W,instructionIndex:Y})}static createInstructionWithEthAddress($){let{ethAddress:J,message:Q,signature:X,recoveryId:W,instructionIndex:Y=0}=$,G;if(typeof J==="string")if(J.startsWith("0x"))G=c0.from(J.substr(2),"hex");else G=c0.from(J,"hex");else G=J;_$(G.length===S1,`Address must be ${S1} bytes but received ${G.length} bytes`);let V=1+rE,q=V,H=V+G.length,Z=H+X.length+1,M=1,j=c0.alloc(B1.span+Q.length);return B1.encode({numSignatures:M,signatureOffset:H,signatureInstructionIndex:Y,ethAddressOffset:q,ethAddressInstructionIndex:Y,messageDataOffset:Z,messageDataSize:Q.length,messageInstructionIndex:Y,signature:M9(X),ethAddress:M9(G),recoveryId:W},j),j.fill(M9(Q),B1.span),new x9({keys:[],programId:NY.programId,data:j})}static createInstructionWithPrivateKey($){let{privateKey:J,message:Q,instructionIndex:X}=$;_$(J.length===Nz,`Private key must be ${Nz} bytes but received ${J.length} bytes`);try{let W=M9(J),Y=sE(W,!1).slice(1),G=c0.from(_Y(M9(Q))),[V,q]=nE(G,W);return this.createInstructionWithPublicKey({publicKey:Y,message:Q,signature:V,recoveryId:q,instructionIndex:X})}catch(W){throw Error(`Error creating instruction; ${W}`)}}}NY.programId=new a0("KeccakSecp256k11111111111111111111111111111");var oz,tE=new a0("StakeConfig11111111111111111111111111111111");class w7{constructor($,J,Q){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=$,this.epoch=J,this.custodian=Q}}oz=w7;w7.default=new oz(0,0,a0.default);var YX=Object.freeze({Initialize:{index:0,layout:m.struct([m.u32("instruction"),ZE(),zE()])},Authorize:{index:1,layout:m.struct([m.u32("instruction"),z9("newAuthorized"),m.u32("stakeAuthorizationType")])},Delegate:{index:2,layout:m.struct([m.u32("instruction")])},Split:{index:3,layout:m.struct([m.u32("instruction"),m.ns64("lamports")])},Withdraw:{index:4,layout:m.struct([m.u32("instruction"),m.ns64("lamports")])},Deactivate:{index:5,layout:m.struct([m.u32("instruction")])},Merge:{index:7,layout:m.struct([m.u32("instruction")])},AuthorizeWithSeed:{index:8,layout:m.struct([m.u32("instruction"),z9("newAuthorized"),m.u32("stakeAuthorizationType"),yW("authoritySeed"),z9("authorityOwner")])}}),pL9=Object.freeze({Staker:{index:0},Withdrawer:{index:1}});class y1{constructor(){}static initialize($){let{stakePubkey:J,authorized:Q,lockup:X}=$,W=X||w7.default,Y=YX.Initialize,G=D9(Y,{authorized:{staker:M9(Q.staker.toBuffer()),withdrawer:M9(Q.withdrawer.toBuffer())},lockup:{unixTimestamp:W.unixTimestamp,epoch:W.epoch,custodian:M9(W.custodian.toBuffer())}}),V={keys:[{pubkey:J,isSigner:!1,isWritable:!0},{pubkey:SY,isSigner:!1,isWritable:!1}],programId:this.programId,data:G};return new x9(V)}static createAccountWithSeed($){let J=new f9;J.add(u$.createAccountWithSeed({fromPubkey:$.fromPubkey,newAccountPubkey:$.stakePubkey,basePubkey:$.basePubkey,seed:$.seed,lamports:$.lamports,space:this.space,programId:this.programId}));let{stakePubkey:Q,authorized:X,lockup:W}=$;return J.add(this.initialize({stakePubkey:Q,authorized:X,lockup:W}))}static createAccount($){let J=new f9;J.add(u$.createAccount({fromPubkey:$.fromPubkey,newAccountPubkey:$.stakePubkey,lamports:$.lamports,space:this.space,programId:this.programId}));let{stakePubkey:Q,authorized:X,lockup:W}=$;return J.add(this.initialize({stakePubkey:Q,authorized:X,lockup:W}))}static delegate($){let{stakePubkey:J,authorizedPubkey:Q,votePubkey:X}=$,W=YX.Delegate,Y=D9(W);return new f9().add({keys:[{pubkey:J,isSigner:!1,isWritable:!0},{pubkey:X,isSigner:!1,isWritable:!1},{pubkey:K8,isSigner:!1,isWritable:!1},{pubkey:F1,isSigner:!1,isWritable:!1},{pubkey:tE,isSigner:!1,isWritable:!1},{pubkey:Q,isSigner:!0,isWritable:!1}],programId:this.programId,data:Y})}static authorize($){let{stakePubkey:J,authorizedPubkey:Q,newAuthorizedPubkey:X,stakeAuthorizationType:W,custodianPubkey:Y}=$,G=YX.Authorize,V=D9(G,{newAuthorized:M9(X.toBuffer()),stakeAuthorizationType:W.index}),q=[{pubkey:J,isSigner:!1,isWritable:!0},{pubkey:K8,isSigner:!1,isWritable:!0},{pubkey:Q,isSigner:!0,isWritable:!1}];if(Y)q.push({pubkey:Y,isSigner:!0,isWritable:!1});return new f9().add({keys:q,programId:this.programId,data:V})}static authorizeWithSeed($){let{stakePubkey:J,authorityBase:Q,authoritySeed:X,authorityOwner:W,newAuthorizedPubkey:Y,stakeAuthorizationType:G,custodianPubkey:V}=$,q=YX.AuthorizeWithSeed,H=D9(q,{newAuthorized:M9(Y.toBuffer()),stakeAuthorizationType:G.index,authoritySeed:X,authorityOwner:M9(W.toBuffer())}),Z=[{pubkey:J,isSigner:!1,isWritable:!0},{pubkey:Q,isSigner:!0,isWritable:!1},{pubkey:K8,isSigner:!1,isWritable:!1}];if(V)Z.push({pubkey:V,isSigner:!0,isWritable:!1});return new f9().add({keys:Z,programId:this.programId,data:H})}static splitInstruction($){let{stakePubkey:J,authorizedPubkey:Q,splitStakePubkey:X,lamports:W}=$,Y=YX.Split,G=D9(Y,{lamports:W});return new x9({keys:[{pubkey:J,isSigner:!1,isWritable:!0},{pubkey:X,isSigner:!1,isWritable:!0},{pubkey:Q,isSigner:!0,isWritable:!1}],programId:this.programId,data:G})}static split($,J){let Q=new f9;return Q.add(u$.createAccount({fromPubkey:$.authorizedPubkey,newAccountPubkey:$.splitStakePubkey,lamports:J,space:this.space,programId:this.programId})),Q.add(this.splitInstruction($))}static splitWithSeed($,J){let{stakePubkey:Q,authorizedPubkey:X,splitStakePubkey:W,basePubkey:Y,seed:G,lamports:V}=$,q=new f9;if(q.add(u$.allocate({accountPubkey:W,basePubkey:Y,seed:G,space:this.space,programId:this.programId})),J&&J>0)q.add(u$.transfer({fromPubkey:$.authorizedPubkey,toPubkey:W,lamports:J}));return q.add(this.splitInstruction({stakePubkey:Q,authorizedPubkey:X,splitStakePubkey:W,lamports:V}))}static merge($){let{stakePubkey:J,sourceStakePubKey:Q,authorizedPubkey:X}=$,W=YX.Merge,Y=D9(W);return new f9().add({keys:[{pubkey:J,isSigner:!1,isWritable:!0},{pubkey:Q,isSigner:!1,isWritable:!0},{pubkey:K8,isSigner:!1,isWritable:!1},{pubkey:F1,isSigner:!1,isWritable:!1},{pubkey:X,isSigner:!0,isWritable:!1}],programId:this.programId,data:Y})}static withdraw($){let{stakePubkey:J,authorizedPubkey:Q,toPubkey:X,lamports:W,custodianPubkey:Y}=$,G=YX.Withdraw,V=D9(G,{lamports:W}),q=[{pubkey:J,isSigner:!1,isWritable:!0},{pubkey:X,isSigner:!1,isWritable:!0},{pubkey:K8,isSigner:!1,isWritable:!1},{pubkey:F1,isSigner:!1,isWritable:!1},{pubkey:Q,isSigner:!0,isWritable:!1}];if(Y)q.push({pubkey:Y,isSigner:!0,isWritable:!1});return new f9().add({keys:q,programId:this.programId,data:V})}static deactivate($){let{stakePubkey:J,authorizedPubkey:Q}=$,X=YX.Deactivate,W=D9(X);return new f9().add({keys:[{pubkey:J,isSigner:!1,isWritable:!0},{pubkey:K8,isSigner:!1,isWritable:!1},{pubkey:Q,isSigner:!0,isWritable:!1}],programId:this.programId,data:W})}}y1.programId=new a0("Stake11111111111111111111111111111111111111");y1.space=200;var LY=Object.freeze({InitializeAccount:{index:0,layout:m.struct([m.u32("instruction"),jE()])},Authorize:{index:1,layout:m.struct([m.u32("instruction"),z9("newAuthorized"),m.u32("voteAuthorizationType")])},Withdraw:{index:3,layout:m.struct([m.u32("instruction"),m.ns64("lamports")])},UpdateValidatorIdentity:{index:4,layout:m.struct([m.u32("instruction")])},AuthorizeWithSeed:{index:10,layout:m.struct([m.u32("instruction"),ME()])}}),dL9=Object.freeze({Voter:{index:0},Withdrawer:{index:1}});class P7{constructor(){}static initializeAccount($){let{votePubkey:J,nodePubkey:Q,voteInit:X}=$,W=LY.InitializeAccount,Y=D9(W,{voteInit:{nodePubkey:M9(X.nodePubkey.toBuffer()),authorizedVoter:M9(X.authorizedVoter.toBuffer()),authorizedWithdrawer:M9(X.authorizedWithdrawer.toBuffer()),commission:X.commission}}),G={keys:[{pubkey:J,isSigner:!1,isWritable:!0},{pubkey:SY,isSigner:!1,isWritable:!1},{pubkey:K8,isSigner:!1,isWritable:!1},{pubkey:Q,isSigner:!0,isWritable:!1}],programId:this.programId,data:Y};return new x9(G)}static createAccount($){let J=new f9;return J.add(u$.createAccount({fromPubkey:$.fromPubkey,newAccountPubkey:$.votePubkey,lamports:$.lamports,space:this.space,programId:this.programId})),J.add(this.initializeAccount({votePubkey:$.votePubkey,nodePubkey:$.voteInit.nodePubkey,voteInit:$.voteInit}))}static authorize($){let{votePubkey:J,authorizedPubkey:Q,newAuthorizedPubkey:X,voteAuthorizationType:W}=$,Y=LY.Authorize,G=D9(Y,{newAuthorized:M9(X.toBuffer()),voteAuthorizationType:W.index}),V=[{pubkey:J,isSigner:!1,isWritable:!0},{pubkey:K8,isSigner:!1,isWritable:!1},{pubkey:Q,isSigner:!0,isWritable:!1}];return new f9().add({keys:V,programId:this.programId,data:G})}static authorizeWithSeed($){let{currentAuthorityDerivedKeyBasePubkey:J,currentAuthorityDerivedKeyOwnerPubkey:Q,currentAuthorityDerivedKeySeed:X,newAuthorizedPubkey:W,voteAuthorizationType:Y,votePubkey:G}=$,V=LY.AuthorizeWithSeed,q=D9(V,{voteAuthorizeWithSeedArgs:{currentAuthorityDerivedKeyOwnerPubkey:M9(Q.toBuffer()),currentAuthorityDerivedKeySeed:X,newAuthorized:M9(W.toBuffer()),voteAuthorizationType:Y.index}}),H=[{pubkey:G,isSigner:!1,isWritable:!0},{pubkey:K8,isSigner:!1,isWritable:!1},{pubkey:J,isSigner:!0,isWritable:!1}];return new f9().add({keys:H,programId:this.programId,data:q})}static withdraw($){let{votePubkey:J,authorizedWithdrawerPubkey:Q,lamports:X,toPubkey:W}=$,Y=LY.Withdraw,G=D9(Y,{lamports:X}),V=[{pubkey:J,isSigner:!1,isWritable:!0},{pubkey:W,isSigner:!1,isWritable:!0},{pubkey:Q,isSigner:!0,isWritable:!1}];return new f9().add({keys:V,programId:this.programId,data:G})}static safeWithdraw($,J,Q){if($.lamports>J-Q)throw Error("Withdraw will leave vote account with insufficient funds.");return P7.withdraw($)}static updateValidatorIdentity($){let{votePubkey:J,authorizedWithdrawerPubkey:Q,nodePubkey:X}=$,W=LY.UpdateValidatorIdentity,Y=D9(W),G=[{pubkey:J,isSigner:!1,isWritable:!0},{pubkey:X,isSigner:!0,isWritable:!1},{pubkey:Q,isSigner:!0,isWritable:!1}];return new f9().add({keys:G,programId:this.programId,data:Y})}}P7.programId=new a0("Vote111111111111111111111111111111111111111");P7.space=3762;var uL9=new a0("Va1idator1nfo111111111111111111111111111111"),cL9=G0({name:z0(),website:E0(z0()),details:E0(z0()),iconUrl:E0(z0()),keybaseUsername:E0(z0())});var iL9=new a0("Vote111111111111111111111111111111111111111"),aL9=m.struct([z9("nodePubkey"),z9("authorizedWithdrawer"),m.u8("commission"),m.nu64(),m.seq(m.struct([m.nu64("slot"),m.u32("confirmationCount")]),m.offset(m.u32(),-8),"votes"),m.u8("rootSlotValid"),m.nu64("rootSlot"),m.nu64(),m.seq(m.struct([m.nu64("epoch"),z9("authorizedVoter")]),m.offset(m.u32(),-8),"authorizedVoters"),m.struct([m.seq(m.struct([z9("authorizedPubkey"),m.nu64("epochOfLastAuthorizedSwitch"),m.nu64("targetEpoch")]),32,"buf"),m.nu64("idx"),m.u8("isEmpty")],"priorVoters"),m.nu64(),m.seq(m.struct([m.nu64("epoch"),m.nu64("credits"),m.nu64("prevCredits")]),m.offset(m.u32(),-8),"epochCredits"),m.struct([m.nu64("slot"),m.nu64("timestamp")],"lastTimestamp")]);function eE($){if($.length>=255)throw TypeError("Alphabet too long");let J=new Uint8Array(256);for(let H=0;H<J.length;H++)J[H]=255;for(let H=0;H<$.length;H++){let Z=$.charAt(H),M=Z.charCodeAt(0);if(J[M]!==255)throw TypeError(Z+" is ambiguous");J[M]=H}let Q=$.length,X=$.charAt(0),W=Math.log(Q)/Math.log(256),Y=Math.log(256)/Math.log(Q);function G(H){if(H instanceof Uint8Array);else if(ArrayBuffer.isView(H))H=new Uint8Array(H.buffer,H.byteOffset,H.byteLength);else if(Array.isArray(H))H=Uint8Array.from(H);if(!(H instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(H.length===0)return"";let Z=0,M=0,j=0,R=H.length;while(j!==R&&H[j]===0)j++,Z++;let N=(R-j)*Y+1>>>0,A=new Uint8Array(N);while(j!==R){let y=H[j],k=0;for(let v=N-1;(y!==0||k<M)&&v!==-1;v--,k++)y+=256*A[v]>>>0,A[v]=y%Q>>>0,y=y/Q>>>0;if(y!==0)throw Error("Non-zero carry");M=k,j++}let E=N-M;while(E!==N&&A[E]===0)E++;let h=X.repeat(Z);for(;E<N;++E)h+=$.charAt(A[E]);return h}function V(H){if(typeof H!=="string")throw TypeError("Expected String");if(H.length===0)return new Uint8Array;let Z=0,M=0,j=0;while(H[Z]===X)M++,Z++;let R=(H.length-Z)*W+1>>>0,N=new Uint8Array(R);while(Z<H.length){let y=H.charCodeAt(Z);if(y>255)return;let k=J[y];if(k===255)return;let v=0;for(let f=R-1;(k!==0||v<j)&&f!==-1;f--,v++)k+=Q*N[f]>>>0,N[f]=k%256>>>0,k=k/256>>>0;if(k!==0)throw Error("Non-zero carry");j=v,Z++}let A=R-j;while(A!==R&&N[A]===0)A++;let E=new Uint8Array(M+(R-A)),h=M;while(A!==R)E[h++]=N[A++];return E}function q(H){let Z=V(H);if(Z)return Z;throw Error("Non-base"+Q+" character")}return{encode:G,decodeUnsafe:V,decode:q}}var nz=eE;var $h="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",vJ=nz($h);var rz=WX(sz(),1);function tz($){let J=vJ.decode($.privateKey),Q=VJ.fromSecretKey(J),X=Q.publicKey.toBase58();return{keypair:Q,walletAddress:X,privateKeyBytes:J}}function g1($,J){let Q=new TextEncoder().encode($),X=rz.default.sign.detached(Q,J);return vJ.encode(X)}function O7($){let J=Date.now().toString(),Q=g1(J,$.privateKeyBytes);return{"x-wallet-address":$.walletAddress,"x-wallet-nonce":J,"x-wallet-signature":Q}}import{Buffer as vz9}from"buffer";var Jh=Object.defineProperty,ez=(($)=>EJ)(function($){return EJ.apply(this,arguments)}),N7=($,J)=>{for(var Q in J)Jh($,Q,{get:J[Q],enumerable:!0})},m1={"84532":{usdcAddress:"0x036CbD53842c5426634e7929541eC2318f3dCF7e",usdcName:"USDC"},"8453":{usdcAddress:"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",usdcName:"USD Coin"},"43113":{usdcAddress:"0x5425890298aed601595a70AB815c96711a31Bc65",usdcName:"USD Coin"},"43114":{usdcAddress:"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",usdcName:"USD Coin"},"4689":{usdcAddress:"0xcdf79194c6c285077a58da47641d4dbe51f63542",usdcName:"Bridged USDC"},"103":{usdcAddress:"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU",usdcName:"USDC"},"101":{usdcAddress:"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",usdcName:"USDC"},"1328":{usdcAddress:"0x4fcf1784b31630811181f670aea7a7bef803eaed",usdcName:"USDC"},"1329":{usdcAddress:"0xe15fc38f6d8c56af07bbcbe3baf5708a2bf42392",usdcName:"USDC"},"137":{usdcAddress:"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",usdcName:"USD Coin"},"80002":{usdcAddress:"0x41E94Eb019C0762f9Bfcf9Fb1E58725BfB0e7582",usdcName:"USDC"},"3338":{usdcAddress:"0xbbA60da06c2c5424f03f7434542280FCAd453d10",usdcName:"USDC"},"2741":{usdcAddress:"0x84a71ccd554cc1b02749b35d22f684cc8ec987e1",usdcName:"Bridged USDC"},"11124":{usdcAddress:"0xe4C7fBB0a626ed208021ccabA6Be1566905E2dFc",usdcName:"Bridged USDC"},"1514":{usdcAddress:"0xF1815bd50389c46847f0Bda824eC8da914045D14",usdcName:"Bridged USDC"},"41923":{usdcAddress:"0x12a272A581feE5577A5dFa371afEB4b2F3a8C2F8",usdcName:"Bridged USDC (Stargate)"},"324705682":{usdcAddress:"0x2e08028E3C4c2356572E096d8EF835cD5C6030bD",usdcName:"Bridged USDC (SKALE Bridge)"}};var $j=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authorizer",type:"address"},{indexed:!0,internalType:"bytes32",name:"nonce",type:"bytes32"}],name:"AuthorizationCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authorizer",type:"address"},{indexed:!0,internalType:"bytes32",name:"nonce",type:"bytes32"}],name:"AuthorizationUsed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_account",type:"address"}],name:"Blacklisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newBlacklister",type:"address"}],name:"BlacklisterChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"burner",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newMasterMinter",type:"address"}],name:"MasterMinterChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"minter",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"minter",type:"address"},{indexed:!1,internalType:"uint256",name:"minterAllowedAmount",type:"uint256"}],name:"MinterConfigured",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldMinter",type:"address"}],name:"MinterRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousOwner",type:"address"},{indexed:!1,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[],name:"Pause",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newAddress",type:"address"}],name:"PauserChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newRescuer",type:"address"}],name:"RescuerChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_account",type:"address"}],name:"UnBlacklisted",type:"event"},{anonymous:!1,inputs:[],name:"Unpause",type:"event"},{inputs:[],name:"CANCEL_AUTHORIZATION_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"RECEIVE_WITH_AUTHORIZATION_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"TRANSFER_WITH_AUTHORIZATION_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"authorizer",type:"address"},{internalType:"bytes32",name:"nonce",type:"bytes32"}],name:"authorizationState",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_account",type:"address"}],name:"blacklist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"blacklister",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"authorizer",type:"address"},{internalType:"bytes32",name:"nonce",type:"bytes32"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"cancelAuthorization",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"authorizer",type:"address"},{internalType:"bytes32",name:"nonce",type:"bytes32"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"cancelAuthorization",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"minter",type:"address"},{internalType:"uint256",name:"minterAllowedAmount",type:"uint256"}],name:"configureMinter",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"currency",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"decrement",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"increment",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"tokenName",type:"string"},{internalType:"string",name:"tokenSymbol",type:"string"},{internalType:"string",name:"tokenCurrency",type:"string"},{internalType:"uint8",name:"tokenDecimals",type:"uint8"},{internalType:"address",name:"newMasterMinter",type:"address"},{internalType:"address",name:"newPauser",type:"address"},{internalType:"address",name:"newBlacklister",type:"address"},{internalType:"address",name:"newOwner",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"newName",type:"string"}],name:"initializeV2",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"lostAndFound",type:"address"}],name:"initializeV2_1",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"accountsToBlacklist",type:"address[]"},{internalType:"string",name:"newSymbol",type:"string"}],name:"initializeV2_2",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_account",type:"address"}],name:"isBlacklisted",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"isMinter",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"masterMinter",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"minter",type:"address"}],name:"minterAllowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"pauser",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"validAfter",type:"uint256"},{internalType:"uint256",name:"validBefore",type:"uint256"},{internalType:"bytes32",name:"nonce",type:"bytes32"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"receiveWithAuthorization",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"validAfter",type:"uint256"},{internalType:"uint256",name:"validBefore",type:"uint256"},{internalType:"bytes32",name:"nonce",type:"bytes32"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"receiveWithAuthorization",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"minter",type:"address"}],name:"removeMinter",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenContract",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"rescueERC20",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"rescuer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"validAfter",type:"uint256"},{internalType:"uint256",name:"validBefore",type:"uint256"},{internalType:"bytes32",name:"nonce",type:"bytes32"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"transferWithAuthorization",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"validAfter",type:"uint256"},{internalType:"uint256",name:"validBefore",type:"uint256"},{internalType:"bytes32",name:"nonce",type:"bytes32"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"transferWithAuthorization",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_account",type:"address"}],name:"unBlacklist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_newBlacklister",type:"address"}],name:"updateBlacklister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_newMasterMinter",type:"address"}],name:"updateMasterMinter",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_newPauser",type:"address"}],name:"updatePauser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newRescuer",type:"address"}],name:"updateRescuer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"pure",type:"function"}];var K0={};d1(K0,{void:()=>mh,util:()=>W9,unknown:()=>yh,union:()=>dh,undefined:()=>xh,tuple:()=>ih,transformer:()=>Qx,symbol:()=>hh,string:()=>Kj,strictObject:()=>ph,setErrorMap:()=>Wh,set:()=>nh,record:()=>ah,quotelessJson:()=>Qh,promise:()=>Jx,preprocess:()=>Yx,pipeline:()=>Gx,ostring:()=>Vx,optional:()=>Xx,onumber:()=>qx,oboolean:()=>Kx,objectUtil:()=>f1,object:()=>lh,number:()=>Hj,nullable:()=>Wx,null:()=>vh,never:()=>gh,nativeEnum:()=>$x,nan:()=>Th,map:()=>oh,makeIssue:()=>BY,literal:()=>th,lazy:()=>rh,late:()=>Ih,isValid:()=>GX,isDirty:()=>F7,isAsync:()=>pW,isAborted:()=>_7,intersection:()=>ch,instanceof:()=>kh,getParsedType:()=>DQ,getErrorMap:()=>lW,function:()=>sh,enum:()=>eh,effect:()=>Qx,discriminatedUnion:()=>uh,defaultErrorMap:()=>H8,datetimeRegex:()=>Gj,date:()=>Eh,custom:()=>qj,coerce:()=>Hx,boolean:()=>Dj,bigint:()=>Ah,array:()=>fh,any:()=>bh,addIssueToContext:()=>L0,ZodVoid:()=>IY,ZodUnknown:()=>VX,ZodUnion:()=>oW,ZodUndefined:()=>iW,ZodType:()=>Q9,ZodTuple:()=>ZQ,ZodTransformer:()=>eJ,ZodSymbol:()=>CY,ZodString:()=>nJ,ZodSet:()=>pX,ZodSchema:()=>Q9,ZodRecord:()=>kY,ZodReadonly:()=>J5,ZodPromise:()=>dX,ZodPipeline:()=>EY,ZodParsedType:()=>j0,ZodOptional:()=>rJ,ZodObject:()=>X$,ZodNumber:()=>qX,ZodNullable:()=>U8,ZodNull:()=>aW,ZodNever:()=>UQ,ZodNativeEnum:()=>tW,ZodNaN:()=>AY,ZodMap:()=>TY,ZodLiteral:()=>rW,ZodLazy:()=>sW,ZodIssueCode:()=>q0,ZodIntersection:()=>nW,ZodFunction:()=>uW,ZodFirstPartyTypeKind:()=>l0,ZodError:()=>qJ,ZodEnum:()=>HX,ZodEffects:()=>eJ,ZodDiscriminatedUnion:()=>S7,ZodDefault:()=>eW,ZodDate:()=>fX,ZodCatch:()=>$5,ZodBranded:()=>B7,ZodBoolean:()=>cW,ZodBigInt:()=>KX,ZodArray:()=>sJ,ZodAny:()=>lX,Schema:()=>Q9,ParseStatus:()=>x$,OK:()=>c$,NEVER:()=>Dx,INVALID:()=>b0,EMPTY_PATH:()=>Yh,DIRTY:()=>mX,BRAND:()=>Ch});var W9;(function($){$.assertEqual=(W)=>{};function J(W){}$.assertIs=J;function Q(W){throw Error()}$.assertNever=Q,$.arrayToEnum=(W)=>{let Y={};for(let G of W)Y[G]=G;return Y},$.getValidEnumValues=(W)=>{let Y=$.objectKeys(W).filter((V)=>typeof W[W[V]]!=="number"),G={};for(let V of Y)G[V]=W[V];return $.objectValues(G)},$.objectValues=(W)=>{return $.objectKeys(W).map(function(Y){return W[Y]})},$.objectKeys=typeof Object.keys==="function"?(W)=>Object.keys(W):(W)=>{let Y=[];for(let G in W)if(Object.prototype.hasOwnProperty.call(W,G))Y.push(G);return Y},$.find=(W,Y)=>{for(let G of W)if(Y(G))return G;return},$.isInteger=typeof Number.isInteger==="function"?(W)=>Number.isInteger(W):(W)=>typeof W==="number"&&Number.isFinite(W)&&Math.floor(W)===W;function X(W,Y=" | "){return W.map((G)=>typeof G==="string"?`'${G}'`:G).join(Y)}$.joinValues=X,$.jsonStringifyReplacer=(W,Y)=>{if(typeof Y==="bigint")return Y.toString();return Y}})(W9||(W9={}));var f1;(function($){$.mergeShapes=(J,Q)=>{return{...J,...Q}}})(f1||(f1={}));var j0=W9.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),DQ=($)=>{switch(typeof $){case"undefined":return j0.undefined;case"string":return j0.string;case"number":return Number.isNaN($)?j0.nan:j0.number;case"boolean":return j0.boolean;case"function":return j0.function;case"bigint":return j0.bigint;case"symbol":return j0.symbol;case"object":if(Array.isArray($))return j0.array;if($===null)return j0.null;if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return j0.promise;if(typeof Map<"u"&&$ instanceof Map)return j0.map;if(typeof Set<"u"&&$ instanceof Set)return j0.set;if(typeof Date<"u"&&$ instanceof Date)return j0.date;return j0.object;default:return j0.unknown}};var q0=W9.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Qh=($)=>{return JSON.stringify($,null,2).replace(/"([^"]+)":/g,"$1:")};class qJ extends Error{get errors(){return this.issues}constructor($){super();this.issues=[],this.addIssue=(Q)=>{this.issues=[...this.issues,Q]},this.addIssues=(Q=[])=>{this.issues=[...this.issues,...Q]};let J=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,J);else this.__proto__=J;this.name="ZodError",this.issues=$}format($){let J=$||function(W){return W.message},Q={_errors:[]},X=(W)=>{for(let Y of W.issues)if(Y.code==="invalid_union")Y.unionErrors.map(X);else if(Y.code==="invalid_return_type")X(Y.returnTypeError);else if(Y.code==="invalid_arguments")X(Y.argumentsError);else if(Y.path.length===0)Q._errors.push(J(Y));else{let G=Q,V=0;while(V<Y.path.length){let q=Y.path[V];if(V!==Y.path.length-1)G[q]=G[q]||{_errors:[]};else G[q]=G[q]||{_errors:[]},G[q]._errors.push(J(Y));G=G[q],V++}}};return X(this),Q}static assert($){if(!($ instanceof qJ))throw Error(`Not a ZodError: ${$}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,W9.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten($=(J)=>J.message){let J={},Q=[];for(let X of this.issues)if(X.path.length>0){let W=X.path[0];J[W]=J[W]||[],J[W].push($(X))}else Q.push($(X));return{formErrors:Q,fieldErrors:J}}get formErrors(){return this.flatten()}}qJ.create=($)=>{return new qJ($)};var Xh=($,J)=>{let Q;switch($.code){case q0.invalid_type:if($.received===j0.undefined)Q="Required";else Q=`Expected ${$.expected}, received ${$.received}`;break;case q0.invalid_literal:Q=`Invalid literal value, expected ${JSON.stringify($.expected,W9.jsonStringifyReplacer)}`;break;case q0.unrecognized_keys:Q=`Unrecognized key(s) in object: ${W9.joinValues($.keys,", ")}`;break;case q0.invalid_union:Q="Invalid input";break;case q0.invalid_union_discriminator:Q=`Invalid discriminator value. Expected ${W9.joinValues($.options)}`;break;case q0.invalid_enum_value:Q=`Invalid enum value. Expected ${W9.joinValues($.options)}, received '${$.received}'`;break;case q0.invalid_arguments:Q="Invalid function arguments";break;case q0.invalid_return_type:Q="Invalid function return type";break;case q0.invalid_date:Q="Invalid date";break;case q0.invalid_string:if(typeof $.validation==="object")if("includes"in $.validation){if(Q=`Invalid input: must include "${$.validation.includes}"`,typeof $.validation.position==="number")Q=`${Q} at one or more positions greater than or equal to ${$.validation.position}`}else if("startsWith"in $.validation)Q=`Invalid input: must start with "${$.validation.startsWith}"`;else if("endsWith"in $.validation)Q=`Invalid input: must end with "${$.validation.endsWith}"`;else W9.assertNever($.validation);else if($.validation!=="regex")Q=`Invalid ${$.validation}`;else Q="Invalid";break;case q0.too_small:if($.type==="array")Q=`Array must contain ${$.exact?"exactly":$.inclusive?"at least":"more than"} ${$.minimum} element(s)`;else if($.type==="string")Q=`String must contain ${$.exact?"exactly":$.inclusive?"at least":"over"} ${$.minimum} character(s)`;else if($.type==="number")Q=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="bigint")Q=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="date")Q=`Date must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${new Date(Number($.minimum))}`;else Q="Invalid input";break;case q0.too_big:if($.type==="array")Q=`Array must contain ${$.exact?"exactly":$.inclusive?"at most":"less than"} ${$.maximum} element(s)`;else if($.type==="string")Q=`String must contain ${$.exact?"exactly":$.inclusive?"at most":"under"} ${$.maximum} character(s)`;else if($.type==="number")Q=`Number must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="bigint")Q=`BigInt must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="date")Q=`Date must be ${$.exact?"exactly":$.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number($.maximum))}`;else Q="Invalid input";break;case q0.custom:Q="Invalid input";break;case q0.invalid_intersection_types:Q="Intersection results could not be merged";break;case q0.not_multiple_of:Q=`Number must be a multiple of ${$.multipleOf}`;break;case q0.not_finite:Q="Number must be finite";break;default:Q=J.defaultError,W9.assertNever($)}return{message:Q}},H8=Xh;var Jj=H8;function Wh($){Jj=$}function lW(){return Jj}var BY=($)=>{let{data:J,path:Q,errorMaps:X,issueData:W}=$,Y=[...Q,...W.path||[]],G={...W,path:Y};if(W.message!==void 0)return{...W,path:Y,message:W.message};let V="",q=X.filter((H)=>!!H).slice().reverse();for(let H of q)V=H(G,{data:J,defaultError:V}).message;return{...W,path:Y,message:V}},Yh=[];function L0($,J){let Q=lW(),X=BY({issueData:J,data:$.data,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,Q,Q===H8?void 0:H8].filter((W)=>!!W)});$.common.issues.push(X)}class x${constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray($,J){let Q=[];for(let X of J){if(X.status==="aborted")return b0;if(X.status==="dirty")$.dirty();Q.push(X.value)}return{status:$.value,value:Q}}static async mergeObjectAsync($,J){let Q=[];for(let X of J){let W=await X.key,Y=await X.value;Q.push({key:W,value:Y})}return x$.mergeObjectSync($,Q)}static mergeObjectSync($,J){let Q={};for(let X of J){let{key:W,value:Y}=X;if(W.status==="aborted")return b0;if(Y.status==="aborted")return b0;if(W.status==="dirty")$.dirty();if(Y.status==="dirty")$.dirty();if(W.value!=="__proto__"&&(typeof Y.value<"u"||X.alwaysSet))Q[W.value]=Y.value}return{status:$.value,value:Q}}}var b0=Object.freeze({status:"aborted"}),mX=($)=>({status:"dirty",value:$}),c$=($)=>({status:"valid",value:$}),_7=($)=>$.status==="aborted",F7=($)=>$.status==="dirty",GX=($)=>$.status==="valid",pW=($)=>typeof Promise<"u"&&$ instanceof Promise;var k0;(function($){$.errToObj=(J)=>typeof J==="string"?{message:J}:J||{},$.toString=(J)=>typeof J==="string"?J:J?.message})(k0||(k0={}));class tJ{constructor($,J,Q,X){this._cachedPath=[],this.parent=$,this.data=J,this._path=Q,this._key=X}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}var Qj=($,J)=>{if(GX(J))return{success:!0,data:J.value};else{if(!$.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let Q=new qJ($.common.issues);return this._error=Q,this._error}}}};function s0($){if(!$)return{};let{errorMap:J,invalid_type_error:Q,required_error:X,description:W}=$;if(J&&(Q||X))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(J)return{errorMap:J,description:W};return{errorMap:(G,V)=>{let{message:q}=$;if(G.code==="invalid_enum_value")return{message:q??V.defaultError};if(typeof V.data>"u")return{message:q??X??V.defaultError};if(G.code!=="invalid_type")return{message:V.defaultError};return{message:q??Q??V.defaultError}},description:W}}class Q9{get description(){return this._def.description}_getType($){return DQ($.data)}_getOrReturnCtx($,J){return J||{common:$.parent.common,data:$.data,parsedType:DQ($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}_processInputParams($){return{status:new x$,ctx:{common:$.parent.common,data:$.data,parsedType:DQ($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}}_parseSync($){let J=this._parse($);if(pW(J))throw Error("Synchronous parse encountered promise.");return J}_parseAsync($){let J=this._parse($);return Promise.resolve(J)}parse($,J){let Q=this.safeParse($,J);if(Q.success)return Q.data;throw Q.error}safeParse($,J){let Q={common:{issues:[],async:J?.async??!1,contextualErrorMap:J?.errorMap},path:J?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:DQ($)},X=this._parseSync({data:$,path:Q.path,parent:Q});return Qj(Q,X)}"~validate"($){let J={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:DQ($)};if(!this["~standard"].async)try{let Q=this._parseSync({data:$,path:[],parent:J});return GX(Q)?{value:Q.value}:{issues:J.common.issues}}catch(Q){if(Q?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;J.common={issues:[],async:!0}}return this._parseAsync({data:$,path:[],parent:J}).then((Q)=>GX(Q)?{value:Q.value}:{issues:J.common.issues})}async parseAsync($,J){let Q=await this.safeParseAsync($,J);if(Q.success)return Q.data;throw Q.error}async safeParseAsync($,J){let Q={common:{issues:[],contextualErrorMap:J?.errorMap,async:!0},path:J?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:DQ($)},X=this._parse({data:$,path:Q.path,parent:Q}),W=await(pW(X)?X:Promise.resolve(X));return Qj(Q,W)}refine($,J){let Q=(X)=>{if(typeof J==="string"||typeof J>"u")return{message:J};else if(typeof J==="function")return J(X);else return J};return this._refinement((X,W)=>{let Y=$(X),G=()=>W.addIssue({code:q0.custom,...Q(X)});if(typeof Promise<"u"&&Y instanceof Promise)return Y.then((V)=>{if(!V)return G(),!1;else return!0});if(!Y)return G(),!1;else return!0})}refinement($,J){return this._refinement((Q,X)=>{if(!$(Q))return X.addIssue(typeof J==="function"?J(Q,X):J),!1;else return!0})}_refinement($){return new eJ({schema:this,typeName:l0.ZodEffects,effect:{type:"refinement",refinement:$}})}superRefine($){return this._refinement($)}constructor($){this.spa=this.safeParseAsync,this._def=$,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(J)=>this["~validate"](J)}}optional(){return rJ.create(this,this._def)}nullable(){return U8.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return sJ.create(this)}promise(){return dX.create(this,this._def)}or($){return oW.create([this,$],this._def)}and($){return nW.create(this,$,this._def)}transform($){return new eJ({...s0(this._def),schema:this,typeName:l0.ZodEffects,effect:{type:"transform",transform:$}})}default($){let J=typeof $==="function"?$:()=>$;return new eW({...s0(this._def),innerType:this,defaultValue:J,typeName:l0.ZodDefault})}brand(){return new B7({typeName:l0.ZodBranded,type:this,...s0(this._def)})}catch($){let J=typeof $==="function"?$:()=>$;return new $5({...s0(this._def),innerType:this,catchValue:J,typeName:l0.ZodCatch})}describe($){return new this.constructor({...this._def,description:$})}pipe($){return EY.create(this,$)}readonly(){return J5.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var Gh=/^c[^\s-]{8,}$/i,Vh=/^[0-9a-z]+$/,qh=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Kh=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Hh=/^[a-z0-9_-]{21}$/i,Dh=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Uh=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Zh=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,zh="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",l1,jh=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Mh=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Lh=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,wh=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ph=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Rh=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Wj="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Oh=new RegExp(`^${Wj}$`);function Yj($){let J="[0-5]\\d";if($.precision)J=`${J}\\.\\d{${$.precision}}`;else if($.precision==null)J=`${J}(\\.\\d+)?`;let Q=$.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${J})${Q}`}function Nh($){return new RegExp(`^${Yj($)}$`)}function Gj($){let J=`${Wj}T${Yj($)}`,Q=[];if(Q.push($.local?"Z?":"Z"),$.offset)Q.push("([+-]\\d{2}:?\\d{2})");return J=`${J}(${Q.join("|")})`,new RegExp(`^${J}$`)}function _h($,J){if((J==="v4"||!J)&&jh.test($))return!0;if((J==="v6"||!J)&&Lh.test($))return!0;return!1}function Fh($,J){if(!Dh.test($))return!1;try{let[Q]=$.split(".");if(!Q)return!1;let X=Q.replace(/-/g,"+").replace(/_/g,"/").padEnd(Q.length+(4-Q.length%4)%4,"="),W=JSON.parse(atob(X));if(typeof W!=="object"||W===null)return!1;if("typ"in W&&W?.typ!=="JWT")return!1;if(!W.alg)return!1;if(J&&W.alg!==J)return!1;return!0}catch{return!1}}function Sh($,J){if((J==="v4"||!J)&&Mh.test($))return!0;if((J==="v6"||!J)&&wh.test($))return!0;return!1}class nJ extends Q9{_parse($){if(this._def.coerce)$.data=String($.data);if(this._getType($)!==j0.string){let W=this._getOrReturnCtx($);return L0(W,{code:q0.invalid_type,expected:j0.string,received:W.parsedType}),b0}let Q=new x$,X=void 0;for(let W of this._def.checks)if(W.kind==="min"){if($.data.length<W.value)X=this._getOrReturnCtx($,X),L0(X,{code:q0.too_small,minimum:W.value,type:"string",inclusive:!0,exact:!1,message:W.message}),Q.dirty()}else if(W.kind==="max"){if($.data.length>W.value)X=this._getOrReturnCtx($,X),L0(X,{code:q0.too_big,maximum:W.value,type:"string",inclusive:!0,exact:!1,message:W.message}),Q.dirty()}else if(W.kind==="length"){let Y=$.data.length>W.value,G=$.data.length<W.value;if(Y||G){if(X=this._getOrReturnCtx($,X),Y)L0(X,{code:q0.too_big,maximum:W.value,type:"string",inclusive:!0,exact:!0,message:W.message});else if(G)L0(X,{code:q0.too_small,minimum:W.value,type:"string",inclusive:!0,exact:!0,message:W.message});Q.dirty()}}else if(W.kind==="email"){if(!Zh.test($.data))X=this._getOrReturnCtx($,X),L0(X,{validation:"email",code:q0.invalid_string,message:W.message}),Q.dirty()}else if(W.kind==="emoji"){if(!l1)l1=new RegExp(zh,"u");if(!l1.test($.data))X=this._getOrReturnCtx($,X),L0(X,{validation:"emoji",code:q0.invalid_string,message:W.message}),Q.dirty()}else if(W.kind==="uuid"){if(!Kh.test($.data))X=this._getOrReturnCtx($,X),L0(X,{validation:"uuid",code:q0.invalid_string,message:W.message}),Q.dirty()}else if(W.kind==="nanoid"){if(!Hh.test($.data))X=this._getOrReturnCtx($,X),L0(X,{validation:"nanoid",code:q0.invalid_string,message:W.message}),Q.dirty()}else if(W.kind==="cuid"){if(!Gh.test($.data))X=this._getOrReturnCtx($,X),L0(X,{validation:"cuid",code:q0.invalid_string,message:W.message}),Q.dirty()}else if(W.kind==="cuid2"){if(!Vh.test($.data))X=this._getOrReturnCtx($,X),L0(X,{validation:"cuid2",code:q0.invalid_string,message:W.message}),Q.dirty()}else if(W.kind==="ulid"){if(!qh.test($.data))X=this._getOrReturnCtx($,X),L0(X,{validation:"ulid",code:q0.invalid_string,message:W.message}),Q.dirty()}else if(W.kind==="url")try{new URL($.data)}catch{X=this._getOrReturnCtx($,X),L0(X,{validation:"url",code:q0.invalid_string,message:W.message}),Q.dirty()}else if(W.kind==="regex"){if(W.regex.lastIndex=0,!W.regex.test($.data))X=this._getOrReturnCtx($,X),L0(X,{validation:"regex",code:q0.invalid_string,message:W.message}),Q.dirty()}else if(W.kind==="trim")$.data=$.data.trim();else if(W.kind==="includes"){if(!$.data.includes(W.value,W.position))X=this._getOrReturnCtx($,X),L0(X,{code:q0.invalid_string,validation:{includes:W.value,position:W.position},message:W.message}),Q.dirty()}else if(W.kind==="toLowerCase")$.data=$.data.toLowerCase();else if(W.kind==="toUpperCase")$.data=$.data.toUpperCase();else if(W.kind==="startsWith"){if(!$.data.startsWith(W.value))X=this._getOrReturnCtx($,X),L0(X,{code:q0.invalid_string,validation:{startsWith:W.value},message:W.message}),Q.dirty()}else if(W.kind==="endsWith"){if(!$.data.endsWith(W.value))X=this._getOrReturnCtx($,X),L0(X,{code:q0.invalid_string,validation:{endsWith:W.value},message:W.message}),Q.dirty()}else if(W.kind==="datetime"){if(!Gj(W).test($.data))X=this._getOrReturnCtx($,X),L0(X,{code:q0.invalid_string,validation:"datetime",message:W.message}),Q.dirty()}else if(W.kind==="date"){if(!Oh.test($.data))X=this._getOrReturnCtx($,X),L0(X,{code:q0.invalid_string,validation:"date",message:W.message}),Q.dirty()}else if(W.kind==="time"){if(!Nh(W).test($.data))X=this._getOrReturnCtx($,X),L0(X,{code:q0.invalid_string,validation:"time",message:W.message}),Q.dirty()}else if(W.kind==="duration"){if(!Uh.test($.data))X=this._getOrReturnCtx($,X),L0(X,{validation:"duration",code:q0.invalid_string,message:W.message}),Q.dirty()}else if(W.kind==="ip"){if(!_h($.data,W.version))X=this._getOrReturnCtx($,X),L0(X,{validation:"ip",code:q0.invalid_string,message:W.message}),Q.dirty()}else if(W.kind==="jwt"){if(!Fh($.data,W.alg))X=this._getOrReturnCtx($,X),L0(X,{validation:"jwt",code:q0.invalid_string,message:W.message}),Q.dirty()}else if(W.kind==="cidr"){if(!Sh($.data,W.version))X=this._getOrReturnCtx($,X),L0(X,{validation:"cidr",code:q0.invalid_string,message:W.message}),Q.dirty()}else if(W.kind==="base64"){if(!Ph.test($.data))X=this._getOrReturnCtx($,X),L0(X,{validation:"base64",code:q0.invalid_string,message:W.message}),Q.dirty()}else if(W.kind==="base64url"){if(!Rh.test($.data))X=this._getOrReturnCtx($,X),L0(X,{validation:"base64url",code:q0.invalid_string,message:W.message}),Q.dirty()}else W9.assertNever(W);return{status:Q.value,value:$.data}}_regex($,J,Q){return this.refinement((X)=>$.test(X),{validation:J,code:q0.invalid_string,...k0.errToObj(Q)})}_addCheck($){return new nJ({...this._def,checks:[...this._def.checks,$]})}email($){return this._addCheck({kind:"email",...k0.errToObj($)})}url($){return this._addCheck({kind:"url",...k0.errToObj($)})}emoji($){return this._addCheck({kind:"emoji",...k0.errToObj($)})}uuid($){return this._addCheck({kind:"uuid",...k0.errToObj($)})}nanoid($){return this._addCheck({kind:"nanoid",...k0.errToObj($)})}cuid($){return this._addCheck({kind:"cuid",...k0.errToObj($)})}cuid2($){return this._addCheck({kind:"cuid2",...k0.errToObj($)})}ulid($){return this._addCheck({kind:"ulid",...k0.errToObj($)})}base64($){return this._addCheck({kind:"base64",...k0.errToObj($)})}base64url($){return this._addCheck({kind:"base64url",...k0.errToObj($)})}jwt($){return this._addCheck({kind:"jwt",...k0.errToObj($)})}ip($){return this._addCheck({kind:"ip",...k0.errToObj($)})}cidr($){return this._addCheck({kind:"cidr",...k0.errToObj($)})}datetime($){if(typeof $==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:$});return this._addCheck({kind:"datetime",precision:typeof $?.precision>"u"?null:$?.precision,offset:$?.offset??!1,local:$?.local??!1,...k0.errToObj($?.message)})}date($){return this._addCheck({kind:"date",message:$})}time($){if(typeof $==="string")return this._addCheck({kind:"time",precision:null,message:$});return this._addCheck({kind:"time",precision:typeof $?.precision>"u"?null:$?.precision,...k0.errToObj($?.message)})}duration($){return this._addCheck({kind:"duration",...k0.errToObj($)})}regex($,J){return this._addCheck({kind:"regex",regex:$,...k0.errToObj(J)})}includes($,J){return this._addCheck({kind:"includes",value:$,position:J?.position,...k0.errToObj(J?.message)})}startsWith($,J){return this._addCheck({kind:"startsWith",value:$,...k0.errToObj(J)})}endsWith($,J){return this._addCheck({kind:"endsWith",value:$,...k0.errToObj(J)})}min($,J){return this._addCheck({kind:"min",value:$,...k0.errToObj(J)})}max($,J){return this._addCheck({kind:"max",value:$,...k0.errToObj(J)})}length($,J){return this._addCheck({kind:"length",value:$,...k0.errToObj(J)})}nonempty($){return this.min(1,k0.errToObj($))}trim(){return new nJ({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new nJ({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new nJ({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(($)=>$.kind==="datetime")}get isDate(){return!!this._def.checks.find(($)=>$.kind==="date")}get isTime(){return!!this._def.checks.find(($)=>$.kind==="time")}get isDuration(){return!!this._def.checks.find(($)=>$.kind==="duration")}get isEmail(){return!!this._def.checks.find(($)=>$.kind==="email")}get isURL(){return!!this._def.checks.find(($)=>$.kind==="url")}get isEmoji(){return!!this._def.checks.find(($)=>$.kind==="emoji")}get isUUID(){return!!this._def.checks.find(($)=>$.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(($)=>$.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(($)=>$.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(($)=>$.kind==="cuid2")}get isULID(){return!!this._def.checks.find(($)=>$.kind==="ulid")}get isIP(){return!!this._def.checks.find(($)=>$.kind==="ip")}get isCIDR(){return!!this._def.checks.find(($)=>$.kind==="cidr")}get isBase64(){return!!this._def.checks.find(($)=>$.kind==="base64")}get isBase64url(){return!!this._def.checks.find(($)=>$.kind==="base64url")}get minLength(){let $=null;for(let J of this._def.checks)if(J.kind==="min"){if($===null||J.value>$)$=J.value}return $}get maxLength(){let $=null;for(let J of this._def.checks)if(J.kind==="max"){if($===null||J.value<$)$=J.value}return $}}nJ.create=($)=>{return new nJ({checks:[],typeName:l0.ZodString,coerce:$?.coerce??!1,...s0($)})};function Bh($,J){let Q=($.toString().split(".")[1]||"").length,X=(J.toString().split(".")[1]||"").length,W=Q>X?Q:X,Y=Number.parseInt($.toFixed(W).replace(".","")),G=Number.parseInt(J.toFixed(W).replace(".",""));return Y%G/10**W}class qX extends Q9{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse($){if(this._def.coerce)$.data=Number($.data);if(this._getType($)!==j0.number){let W=this._getOrReturnCtx($);return L0(W,{code:q0.invalid_type,expected:j0.number,received:W.parsedType}),b0}let Q=void 0,X=new x$;for(let W of this._def.checks)if(W.kind==="int"){if(!W9.isInteger($.data))Q=this._getOrReturnCtx($,Q),L0(Q,{code:q0.invalid_type,expected:"integer",received:"float",message:W.message}),X.dirty()}else if(W.kind==="min"){if(W.inclusive?$.data<W.value:$.data<=W.value)Q=this._getOrReturnCtx($,Q),L0(Q,{code:q0.too_small,minimum:W.value,type:"number",inclusive:W.inclusive,exact:!1,message:W.message}),X.dirty()}else if(W.kind==="max"){if(W.inclusive?$.data>W.value:$.data>=W.value)Q=this._getOrReturnCtx($,Q),L0(Q,{code:q0.too_big,maximum:W.value,type:"number",inclusive:W.inclusive,exact:!1,message:W.message}),X.dirty()}else if(W.kind==="multipleOf"){if(Bh($.data,W.value)!==0)Q=this._getOrReturnCtx($,Q),L0(Q,{code:q0.not_multiple_of,multipleOf:W.value,message:W.message}),X.dirty()}else if(W.kind==="finite"){if(!Number.isFinite($.data))Q=this._getOrReturnCtx($,Q),L0(Q,{code:q0.not_finite,message:W.message}),X.dirty()}else W9.assertNever(W);return{status:X.value,value:$.data}}gte($,J){return this.setLimit("min",$,!0,k0.toString(J))}gt($,J){return this.setLimit("min",$,!1,k0.toString(J))}lte($,J){return this.setLimit("max",$,!0,k0.toString(J))}lt($,J){return this.setLimit("max",$,!1,k0.toString(J))}setLimit($,J,Q,X){return new qX({...this._def,checks:[...this._def.checks,{kind:$,value:J,inclusive:Q,message:k0.toString(X)}]})}_addCheck($){return new qX({...this._def,checks:[...this._def.checks,$]})}int($){return this._addCheck({kind:"int",message:k0.toString($)})}positive($){return this._addCheck({kind:"min",value:0,inclusive:!1,message:k0.toString($)})}negative($){return this._addCheck({kind:"max",value:0,inclusive:!1,message:k0.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:0,inclusive:!0,message:k0.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:0,inclusive:!0,message:k0.toString($)})}multipleOf($,J){return this._addCheck({kind:"multipleOf",value:$,message:k0.toString(J)})}finite($){return this._addCheck({kind:"finite",message:k0.toString($)})}safe($){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:k0.toString($)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:k0.toString($)})}get minValue(){let $=null;for(let J of this._def.checks)if(J.kind==="min"){if($===null||J.value>$)$=J.value}return $}get maxValue(){let $=null;for(let J of this._def.checks)if(J.kind==="max"){if($===null||J.value<$)$=J.value}return $}get isInt(){return!!this._def.checks.find(($)=>$.kind==="int"||$.kind==="multipleOf"&&W9.isInteger($.value))}get isFinite(){let $=null,J=null;for(let Q of this._def.checks)if(Q.kind==="finite"||Q.kind==="int"||Q.kind==="multipleOf")return!0;else if(Q.kind==="min"){if(J===null||Q.value>J)J=Q.value}else if(Q.kind==="max"){if($===null||Q.value<$)$=Q.value}return Number.isFinite(J)&&Number.isFinite($)}}qX.create=($)=>{return new qX({checks:[],typeName:l0.ZodNumber,coerce:$?.coerce||!1,...s0($)})};class KX extends Q9{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse($){if(this._def.coerce)try{$.data=BigInt($.data)}catch{return this._getInvalidInput($)}if(this._getType($)!==j0.bigint)return this._getInvalidInput($);let Q=void 0,X=new x$;for(let W of this._def.checks)if(W.kind==="min"){if(W.inclusive?$.data<W.value:$.data<=W.value)Q=this._getOrReturnCtx($,Q),L0(Q,{code:q0.too_small,type:"bigint",minimum:W.value,inclusive:W.inclusive,message:W.message}),X.dirty()}else if(W.kind==="max"){if(W.inclusive?$.data>W.value:$.data>=W.value)Q=this._getOrReturnCtx($,Q),L0(Q,{code:q0.too_big,type:"bigint",maximum:W.value,inclusive:W.inclusive,message:W.message}),X.dirty()}else if(W.kind==="multipleOf"){if($.data%W.value!==BigInt(0))Q=this._getOrReturnCtx($,Q),L0(Q,{code:q0.not_multiple_of,multipleOf:W.value,message:W.message}),X.dirty()}else W9.assertNever(W);return{status:X.value,value:$.data}}_getInvalidInput($){let J=this._getOrReturnCtx($);return L0(J,{code:q0.invalid_type,expected:j0.bigint,received:J.parsedType}),b0}gte($,J){return this.setLimit("min",$,!0,k0.toString(J))}gt($,J){return this.setLimit("min",$,!1,k0.toString(J))}lte($,J){return this.setLimit("max",$,!0,k0.toString(J))}lt($,J){return this.setLimit("max",$,!1,k0.toString(J))}setLimit($,J,Q,X){return new KX({...this._def,checks:[...this._def.checks,{kind:$,value:J,inclusive:Q,message:k0.toString(X)}]})}_addCheck($){return new KX({...this._def,checks:[...this._def.checks,$]})}positive($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:k0.toString($)})}negative($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:k0.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:k0.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:k0.toString($)})}multipleOf($,J){return this._addCheck({kind:"multipleOf",value:$,message:k0.toString(J)})}get minValue(){let $=null;for(let J of this._def.checks)if(J.kind==="min"){if($===null||J.value>$)$=J.value}return $}get maxValue(){let $=null;for(let J of this._def.checks)if(J.kind==="max"){if($===null||J.value<$)$=J.value}return $}}KX.create=($)=>{return new KX({checks:[],typeName:l0.ZodBigInt,coerce:$?.coerce??!1,...s0($)})};class cW extends Q9{_parse($){if(this._def.coerce)$.data=Boolean($.data);if(this._getType($)!==j0.boolean){let Q=this._getOrReturnCtx($);return L0(Q,{code:q0.invalid_type,expected:j0.boolean,received:Q.parsedType}),b0}return c$($.data)}}cW.create=($)=>{return new cW({typeName:l0.ZodBoolean,coerce:$?.coerce||!1,...s0($)})};class fX extends Q9{_parse($){if(this._def.coerce)$.data=new Date($.data);if(this._getType($)!==j0.date){let W=this._getOrReturnCtx($);return L0(W,{code:q0.invalid_type,expected:j0.date,received:W.parsedType}),b0}if(Number.isNaN($.data.getTime())){let W=this._getOrReturnCtx($);return L0(W,{code:q0.invalid_date}),b0}let Q=new x$,X=void 0;for(let W of this._def.checks)if(W.kind==="min"){if($.data.getTime()<W.value)X=this._getOrReturnCtx($,X),L0(X,{code:q0.too_small,message:W.message,inclusive:!0,exact:!1,minimum:W.value,type:"date"}),Q.dirty()}else if(W.kind==="max"){if($.data.getTime()>W.value)X=this._getOrReturnCtx($,X),L0(X,{code:q0.too_big,message:W.message,inclusive:!0,exact:!1,maximum:W.value,type:"date"}),Q.dirty()}else W9.assertNever(W);return{status:Q.value,value:new Date($.data.getTime())}}_addCheck($){return new fX({...this._def,checks:[...this._def.checks,$]})}min($,J){return this._addCheck({kind:"min",value:$.getTime(),message:k0.toString(J)})}max($,J){return this._addCheck({kind:"max",value:$.getTime(),message:k0.toString(J)})}get minDate(){let $=null;for(let J of this._def.checks)if(J.kind==="min"){if($===null||J.value>$)$=J.value}return $!=null?new Date($):null}get maxDate(){let $=null;for(let J of this._def.checks)if(J.kind==="max"){if($===null||J.value<$)$=J.value}return $!=null?new Date($):null}}fX.create=($)=>{return new fX({checks:[],coerce:$?.coerce||!1,typeName:l0.ZodDate,...s0($)})};class CY extends Q9{_parse($){if(this._getType($)!==j0.symbol){let Q=this._getOrReturnCtx($);return L0(Q,{code:q0.invalid_type,expected:j0.symbol,received:Q.parsedType}),b0}return c$($.data)}}CY.create=($)=>{return new CY({typeName:l0.ZodSymbol,...s0($)})};class iW extends Q9{_parse($){if(this._getType($)!==j0.undefined){let Q=this._getOrReturnCtx($);return L0(Q,{code:q0.invalid_type,expected:j0.undefined,received:Q.parsedType}),b0}return c$($.data)}}iW.create=($)=>{return new iW({typeName:l0.ZodUndefined,...s0($)})};class aW extends Q9{_parse($){if(this._getType($)!==j0.null){let Q=this._getOrReturnCtx($);return L0(Q,{code:q0.invalid_type,expected:j0.null,received:Q.parsedType}),b0}return c$($.data)}}aW.create=($)=>{return new aW({typeName:l0.ZodNull,...s0($)})};class lX extends Q9{constructor(){super(...arguments);this._any=!0}_parse($){return c$($.data)}}lX.create=($)=>{return new lX({typeName:l0.ZodAny,...s0($)})};class VX extends Q9{constructor(){super(...arguments);this._unknown=!0}_parse($){return c$($.data)}}VX.create=($)=>{return new VX({typeName:l0.ZodUnknown,...s0($)})};class UQ extends Q9{_parse($){let J=this._getOrReturnCtx($);return L0(J,{code:q0.invalid_type,expected:j0.never,received:J.parsedType}),b0}}UQ.create=($)=>{return new UQ({typeName:l0.ZodNever,...s0($)})};class IY extends Q9{_parse($){if(this._getType($)!==j0.undefined){let Q=this._getOrReturnCtx($);return L0(Q,{code:q0.invalid_type,expected:j0.void,received:Q.parsedType}),b0}return c$($.data)}}IY.create=($)=>{return new IY({typeName:l0.ZodVoid,...s0($)})};class sJ extends Q9{_parse($){let{ctx:J,status:Q}=this._processInputParams($),X=this._def;if(J.parsedType!==j0.array)return L0(J,{code:q0.invalid_type,expected:j0.array,received:J.parsedType}),b0;if(X.exactLength!==null){let Y=J.data.length>X.exactLength.value,G=J.data.length<X.exactLength.value;if(Y||G)L0(J,{code:Y?q0.too_big:q0.too_small,minimum:G?X.exactLength.value:void 0,maximum:Y?X.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:X.exactLength.message}),Q.dirty()}if(X.minLength!==null){if(J.data.length<X.minLength.value)L0(J,{code:q0.too_small,minimum:X.minLength.value,type:"array",inclusive:!0,exact:!1,message:X.minLength.message}),Q.dirty()}if(X.maxLength!==null){if(J.data.length>X.maxLength.value)L0(J,{code:q0.too_big,maximum:X.maxLength.value,type:"array",inclusive:!0,exact:!1,message:X.maxLength.message}),Q.dirty()}if(J.common.async)return Promise.all([...J.data].map((Y,G)=>{return X.type._parseAsync(new tJ(J,Y,J.path,G))})).then((Y)=>{return x$.mergeArray(Q,Y)});let W=[...J.data].map((Y,G)=>{return X.type._parseSync(new tJ(J,Y,J.path,G))});return x$.mergeArray(Q,W)}get element(){return this._def.type}min($,J){return new sJ({...this._def,minLength:{value:$,message:k0.toString(J)}})}max($,J){return new sJ({...this._def,maxLength:{value:$,message:k0.toString(J)}})}length($,J){return new sJ({...this._def,exactLength:{value:$,message:k0.toString(J)}})}nonempty($){return this.min(1,$)}}sJ.create=($,J)=>{return new sJ({type:$,minLength:null,maxLength:null,exactLength:null,typeName:l0.ZodArray,...s0(J)})};function dW($){if($ instanceof X$){let J={};for(let Q in $.shape){let X=$.shape[Q];J[Q]=rJ.create(dW(X))}return new X$({...$._def,shape:()=>J})}else if($ instanceof sJ)return new sJ({...$._def,type:dW($.element)});else if($ instanceof rJ)return rJ.create(dW($.unwrap()));else if($ instanceof U8)return U8.create(dW($.unwrap()));else if($ instanceof ZQ)return ZQ.create($.items.map((J)=>dW(J)));else return $}class X$ extends Q9{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let $=this._def.shape(),J=W9.objectKeys($);return this._cached={shape:$,keys:J},this._cached}_parse($){if(this._getType($)!==j0.object){let q=this._getOrReturnCtx($);return L0(q,{code:q0.invalid_type,expected:j0.object,received:q.parsedType}),b0}let{status:Q,ctx:X}=this._processInputParams($),{shape:W,keys:Y}=this._getCached(),G=[];if(!(this._def.catchall instanceof UQ&&this._def.unknownKeys==="strip")){for(let q in X.data)if(!Y.includes(q))G.push(q)}let V=[];for(let q of Y){let H=W[q],Z=X.data[q];V.push({key:{status:"valid",value:q},value:H._parse(new tJ(X,Z,X.path,q)),alwaysSet:q in X.data})}if(this._def.catchall instanceof UQ){let q=this._def.unknownKeys;if(q==="passthrough")for(let H of G)V.push({key:{status:"valid",value:H},value:{status:"valid",value:X.data[H]}});else if(q==="strict"){if(G.length>0)L0(X,{code:q0.unrecognized_keys,keys:G}),Q.dirty()}else if(q==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let q=this._def.catchall;for(let H of G){let Z=X.data[H];V.push({key:{status:"valid",value:H},value:q._parse(new tJ(X,Z,X.path,H)),alwaysSet:H in X.data})}}if(X.common.async)return Promise.resolve().then(async()=>{let q=[];for(let H of V){let Z=await H.key,M=await H.value;q.push({key:Z,value:M,alwaysSet:H.alwaysSet})}return q}).then((q)=>{return x$.mergeObjectSync(Q,q)});else return x$.mergeObjectSync(Q,V)}get shape(){return this._def.shape()}strict($){return k0.errToObj,new X$({...this._def,unknownKeys:"strict",...$!==void 0?{errorMap:(J,Q)=>{let X=this._def.errorMap?.(J,Q).message??Q.defaultError;if(J.code==="unrecognized_keys")return{message:k0.errToObj($).message??X};return{message:X}}}:{}})}strip(){return new X$({...this._def,unknownKeys:"strip"})}passthrough(){return new X$({...this._def,unknownKeys:"passthrough"})}extend($){return new X$({...this._def,shape:()=>({...this._def.shape(),...$})})}merge($){return new X$({unknownKeys:$._def.unknownKeys,catchall:$._def.catchall,shape:()=>({...this._def.shape(),...$._def.shape()}),typeName:l0.ZodObject})}setKey($,J){return this.augment({[$]:J})}catchall($){return new X$({...this._def,catchall:$})}pick($){let J={};for(let Q of W9.objectKeys($))if($[Q]&&this.shape[Q])J[Q]=this.shape[Q];return new X$({...this._def,shape:()=>J})}omit($){let J={};for(let Q of W9.objectKeys(this.shape))if(!$[Q])J[Q]=this.shape[Q];return new X$({...this._def,shape:()=>J})}deepPartial(){return dW(this)}partial($){let J={};for(let Q of W9.objectKeys(this.shape)){let X=this.shape[Q];if($&&!$[Q])J[Q]=X;else J[Q]=X.optional()}return new X$({...this._def,shape:()=>J})}required($){let J={};for(let Q of W9.objectKeys(this.shape))if($&&!$[Q])J[Q]=this.shape[Q];else{let W=this.shape[Q];while(W instanceof rJ)W=W._def.innerType;J[Q]=W}return new X$({...this._def,shape:()=>J})}keyof(){return Vj(W9.objectKeys(this.shape))}}X$.create=($,J)=>{return new X$({shape:()=>$,unknownKeys:"strip",catchall:UQ.create(),typeName:l0.ZodObject,...s0(J)})};X$.strictCreate=($,J)=>{return new X$({shape:()=>$,unknownKeys:"strict",catchall:UQ.create(),typeName:l0.ZodObject,...s0(J)})};X$.lazycreate=($,J)=>{return new X$({shape:$,unknownKeys:"strip",catchall:UQ.create(),typeName:l0.ZodObject,...s0(J)})};class oW extends Q9{_parse($){let{ctx:J}=this._processInputParams($),Q=this._def.options;function X(W){for(let G of W)if(G.result.status==="valid")return G.result;for(let G of W)if(G.result.status==="dirty")return J.common.issues.push(...G.ctx.common.issues),G.result;let Y=W.map((G)=>new qJ(G.ctx.common.issues));return L0(J,{code:q0.invalid_union,unionErrors:Y}),b0}if(J.common.async)return Promise.all(Q.map(async(W)=>{let Y={...J,common:{...J.common,issues:[]},parent:null};return{result:await W._parseAsync({data:J.data,path:J.path,parent:Y}),ctx:Y}})).then(X);else{let W=void 0,Y=[];for(let V of Q){let q={...J,common:{...J.common,issues:[]},parent:null},H=V._parseSync({data:J.data,path:J.path,parent:q});if(H.status==="valid")return H;else if(H.status==="dirty"&&!W)W={result:H,ctx:q};if(q.common.issues.length)Y.push(q.common.issues)}if(W)return J.common.issues.push(...W.ctx.common.issues),W.result;let G=Y.map((V)=>new qJ(V));return L0(J,{code:q0.invalid_union,unionErrors:G}),b0}}get options(){return this._def.options}}oW.create=($,J)=>{return new oW({options:$,typeName:l0.ZodUnion,...s0(J)})};var D8=($)=>{if($ instanceof sW)return D8($.schema);else if($ instanceof eJ)return D8($.innerType());else if($ instanceof rW)return[$.value];else if($ instanceof HX)return $.options;else if($ instanceof tW)return W9.objectValues($.enum);else if($ instanceof eW)return D8($._def.innerType);else if($ instanceof iW)return[void 0];else if($ instanceof aW)return[null];else if($ instanceof rJ)return[void 0,...D8($.unwrap())];else if($ instanceof U8)return[null,...D8($.unwrap())];else if($ instanceof B7)return D8($.unwrap());else if($ instanceof J5)return D8($.unwrap());else if($ instanceof $5)return D8($._def.innerType);else return[]};class S7 extends Q9{_parse($){let{ctx:J}=this._processInputParams($);if(J.parsedType!==j0.object)return L0(J,{code:q0.invalid_type,expected:j0.object,received:J.parsedType}),b0;let Q=this.discriminator,X=J.data[Q],W=this.optionsMap.get(X);if(!W)return L0(J,{code:q0.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[Q]}),b0;if(J.common.async)return W._parseAsync({data:J.data,path:J.path,parent:J});else return W._parseSync({data:J.data,path:J.path,parent:J})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create($,J,Q){let X=new Map;for(let W of J){let Y=D8(W.shape[$]);if(!Y.length)throw Error(`A discriminator value for key \`${$}\` could not be extracted from all schema options`);for(let G of Y){if(X.has(G))throw Error(`Discriminator property ${String($)} has duplicate value ${String(G)}`);X.set(G,W)}}return new S7({typeName:l0.ZodDiscriminatedUnion,discriminator:$,options:J,optionsMap:X,...s0(Q)})}}function p1($,J){let Q=DQ($),X=DQ(J);if($===J)return{valid:!0,data:$};else if(Q===j0.object&&X===j0.object){let W=W9.objectKeys(J),Y=W9.objectKeys($).filter((V)=>W.indexOf(V)!==-1),G={...$,...J};for(let V of Y){let q=p1($[V],J[V]);if(!q.valid)return{valid:!1};G[V]=q.data}return{valid:!0,data:G}}else if(Q===j0.array&&X===j0.array){if($.length!==J.length)return{valid:!1};let W=[];for(let Y=0;Y<$.length;Y++){let G=$[Y],V=J[Y],q=p1(G,V);if(!q.valid)return{valid:!1};W.push(q.data)}return{valid:!0,data:W}}else if(Q===j0.date&&X===j0.date&&+$===+J)return{valid:!0,data:$};else return{valid:!1}}class nW extends Q9{_parse($){let{status:J,ctx:Q}=this._processInputParams($),X=(W,Y)=>{if(_7(W)||_7(Y))return b0;let G=p1(W.value,Y.value);if(!G.valid)return L0(Q,{code:q0.invalid_intersection_types}),b0;if(F7(W)||F7(Y))J.dirty();return{status:J.value,value:G.data}};if(Q.common.async)return Promise.all([this._def.left._parseAsync({data:Q.data,path:Q.path,parent:Q}),this._def.right._parseAsync({data:Q.data,path:Q.path,parent:Q})]).then(([W,Y])=>X(W,Y));else return X(this._def.left._parseSync({data:Q.data,path:Q.path,parent:Q}),this._def.right._parseSync({data:Q.data,path:Q.path,parent:Q}))}}nW.create=($,J,Q)=>{return new nW({left:$,right:J,typeName:l0.ZodIntersection,...s0(Q)})};class ZQ extends Q9{_parse($){let{status:J,ctx:Q}=this._processInputParams($);if(Q.parsedType!==j0.array)return L0(Q,{code:q0.invalid_type,expected:j0.array,received:Q.parsedType}),b0;if(Q.data.length<this._def.items.length)return L0(Q,{code:q0.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),b0;if(!this._def.rest&&Q.data.length>this._def.items.length)L0(Q,{code:q0.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),J.dirty();let W=[...Q.data].map((Y,G)=>{let V=this._def.items[G]||this._def.rest;if(!V)return null;return V._parse(new tJ(Q,Y,Q.path,G))}).filter((Y)=>!!Y);if(Q.common.async)return Promise.all(W).then((Y)=>{return x$.mergeArray(J,Y)});else return x$.mergeArray(J,W)}get items(){return this._def.items}rest($){return new ZQ({...this._def,rest:$})}}ZQ.create=($,J)=>{if(!Array.isArray($))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new ZQ({items:$,typeName:l0.ZodTuple,rest:null,...s0(J)})};class kY extends Q9{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:J,ctx:Q}=this._processInputParams($);if(Q.parsedType!==j0.object)return L0(Q,{code:q0.invalid_type,expected:j0.object,received:Q.parsedType}),b0;let X=[],W=this._def.keyType,Y=this._def.valueType;for(let G in Q.data)X.push({key:W._parse(new tJ(Q,G,Q.path,G)),value:Y._parse(new tJ(Q,Q.data[G],Q.path,G)),alwaysSet:G in Q.data});if(Q.common.async)return x$.mergeObjectAsync(J,X);else return x$.mergeObjectSync(J,X)}get element(){return this._def.valueType}static create($,J,Q){if(J instanceof Q9)return new kY({keyType:$,valueType:J,typeName:l0.ZodRecord,...s0(Q)});return new kY({keyType:nJ.create(),valueType:$,typeName:l0.ZodRecord,...s0(J)})}}class TY extends Q9{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:J,ctx:Q}=this._processInputParams($);if(Q.parsedType!==j0.map)return L0(Q,{code:q0.invalid_type,expected:j0.map,received:Q.parsedType}),b0;let X=this._def.keyType,W=this._def.valueType,Y=[...Q.data.entries()].map(([G,V],q)=>{return{key:X._parse(new tJ(Q,G,Q.path,[q,"key"])),value:W._parse(new tJ(Q,V,Q.path,[q,"value"]))}});if(Q.common.async){let G=new Map;return Promise.resolve().then(async()=>{for(let V of Y){let q=await V.key,H=await V.value;if(q.status==="aborted"||H.status==="aborted")return b0;if(q.status==="dirty"||H.status==="dirty")J.dirty();G.set(q.value,H.value)}return{status:J.value,value:G}})}else{let G=new Map;for(let V of Y){let{key:q,value:H}=V;if(q.status==="aborted"||H.status==="aborted")return b0;if(q.status==="dirty"||H.status==="dirty")J.dirty();G.set(q.value,H.value)}return{status:J.value,value:G}}}}TY.create=($,J,Q)=>{return new TY({valueType:J,keyType:$,typeName:l0.ZodMap,...s0(Q)})};class pX extends Q9{_parse($){let{status:J,ctx:Q}=this._processInputParams($);if(Q.parsedType!==j0.set)return L0(Q,{code:q0.invalid_type,expected:j0.set,received:Q.parsedType}),b0;let X=this._def;if(X.minSize!==null){if(Q.data.size<X.minSize.value)L0(Q,{code:q0.too_small,minimum:X.minSize.value,type:"set",inclusive:!0,exact:!1,message:X.minSize.message}),J.dirty()}if(X.maxSize!==null){if(Q.data.size>X.maxSize.value)L0(Q,{code:q0.too_big,maximum:X.maxSize.value,type:"set",inclusive:!0,exact:!1,message:X.maxSize.message}),J.dirty()}let W=this._def.valueType;function Y(V){let q=new Set;for(let H of V){if(H.status==="aborted")return b0;if(H.status==="dirty")J.dirty();q.add(H.value)}return{status:J.value,value:q}}let G=[...Q.data.values()].map((V,q)=>W._parse(new tJ(Q,V,Q.path,q)));if(Q.common.async)return Promise.all(G).then((V)=>Y(V));else return Y(G)}min($,J){return new pX({...this._def,minSize:{value:$,message:k0.toString(J)}})}max($,J){return new pX({...this._def,maxSize:{value:$,message:k0.toString(J)}})}size($,J){return this.min($,J).max($,J)}nonempty($){return this.min(1,$)}}pX.create=($,J)=>{return new pX({valueType:$,minSize:null,maxSize:null,typeName:l0.ZodSet,...s0(J)})};class uW extends Q9{constructor(){super(...arguments);this.validate=this.implement}_parse($){let{ctx:J}=this._processInputParams($);if(J.parsedType!==j0.function)return L0(J,{code:q0.invalid_type,expected:j0.function,received:J.parsedType}),b0;function Q(G,V){return BY({data:G,path:J.path,errorMaps:[J.common.contextualErrorMap,J.schemaErrorMap,lW(),H8].filter((q)=>!!q),issueData:{code:q0.invalid_arguments,argumentsError:V}})}function X(G,V){return BY({data:G,path:J.path,errorMaps:[J.common.contextualErrorMap,J.schemaErrorMap,lW(),H8].filter((q)=>!!q),issueData:{code:q0.invalid_return_type,returnTypeError:V}})}let W={errorMap:J.common.contextualErrorMap},Y=J.data;if(this._def.returns instanceof dX){let G=this;return c$(async function(...V){let q=new qJ([]),H=await G._def.args.parseAsync(V,W).catch((j)=>{throw q.addIssue(Q(V,j)),q}),Z=await Reflect.apply(Y,this,H);return await G._def.returns._def.type.parseAsync(Z,W).catch((j)=>{throw q.addIssue(X(Z,j)),q})})}else{let G=this;return c$(function(...V){let q=G._def.args.safeParse(V,W);if(!q.success)throw new qJ([Q(V,q.error)]);let H=Reflect.apply(Y,this,q.data),Z=G._def.returns.safeParse(H,W);if(!Z.success)throw new qJ([X(H,Z.error)]);return Z.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...$){return new uW({...this._def,args:ZQ.create($).rest(VX.create())})}returns($){return new uW({...this._def,returns:$})}implement($){return this.parse($)}strictImplement($){return this.parse($)}static create($,J,Q){return new uW({args:$?$:ZQ.create([]).rest(VX.create()),returns:J||VX.create(),typeName:l0.ZodFunction,...s0(Q)})}}class sW extends Q9{get schema(){return this._def.getter()}_parse($){let{ctx:J}=this._processInputParams($);return this._def.getter()._parse({data:J.data,path:J.path,parent:J})}}sW.create=($,J)=>{return new sW({getter:$,typeName:l0.ZodLazy,...s0(J)})};class rW extends Q9{_parse($){if($.data!==this._def.value){let J=this._getOrReturnCtx($);return L0(J,{received:J.data,code:q0.invalid_literal,expected:this._def.value}),b0}return{status:"valid",value:$.data}}get value(){return this._def.value}}rW.create=($,J)=>{return new rW({value:$,typeName:l0.ZodLiteral,...s0(J)})};function Vj($,J){return new HX({values:$,typeName:l0.ZodEnum,...s0(J)})}class HX extends Q9{_parse($){if(typeof $.data!=="string"){let J=this._getOrReturnCtx($),Q=this._def.values;return L0(J,{expected:W9.joinValues(Q),received:J.parsedType,code:q0.invalid_type}),b0}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has($.data)){let J=this._getOrReturnCtx($),Q=this._def.values;return L0(J,{received:J.data,code:q0.invalid_enum_value,options:Q}),b0}return c$($.data)}get options(){return this._def.values}get enum(){let $={};for(let J of this._def.values)$[J]=J;return $}get Values(){let $={};for(let J of this._def.values)$[J]=J;return $}get Enum(){let $={};for(let J of this._def.values)$[J]=J;return $}extract($,J=this._def){return HX.create($,{...this._def,...J})}exclude($,J=this._def){return HX.create(this.options.filter((Q)=>!$.includes(Q)),{...this._def,...J})}}HX.create=Vj;class tW extends Q9{_parse($){let J=W9.getValidEnumValues(this._def.values),Q=this._getOrReturnCtx($);if(Q.parsedType!==j0.string&&Q.parsedType!==j0.number){let X=W9.objectValues(J);return L0(Q,{expected:W9.joinValues(X),received:Q.parsedType,code:q0.invalid_type}),b0}if(!this._cache)this._cache=new Set(W9.getValidEnumValues(this._def.values));if(!this._cache.has($.data)){let X=W9.objectValues(J);return L0(Q,{received:Q.data,code:q0.invalid_enum_value,options:X}),b0}return c$($.data)}get enum(){return this._def.values}}tW.create=($,J)=>{return new tW({values:$,typeName:l0.ZodNativeEnum,...s0(J)})};class dX extends Q9{unwrap(){return this._def.type}_parse($){let{ctx:J}=this._processInputParams($);if(J.parsedType!==j0.promise&&J.common.async===!1)return L0(J,{code:q0.invalid_type,expected:j0.promise,received:J.parsedType}),b0;let Q=J.parsedType===j0.promise?J.data:Promise.resolve(J.data);return c$(Q.then((X)=>{return this._def.type.parseAsync(X,{path:J.path,errorMap:J.common.contextualErrorMap})}))}}dX.create=($,J)=>{return new dX({type:$,typeName:l0.ZodPromise,...s0(J)})};class eJ extends Q9{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===l0.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse($){let{status:J,ctx:Q}=this._processInputParams($),X=this._def.effect||null,W={addIssue:(Y)=>{if(L0(Q,Y),Y.fatal)J.abort();else J.dirty()},get path(){return Q.path}};if(W.addIssue=W.addIssue.bind(W),X.type==="preprocess"){let Y=X.transform(Q.data,W);if(Q.common.async)return Promise.resolve(Y).then(async(G)=>{if(J.value==="aborted")return b0;let V=await this._def.schema._parseAsync({data:G,path:Q.path,parent:Q});if(V.status==="aborted")return b0;if(V.status==="dirty")return mX(V.value);if(J.value==="dirty")return mX(V.value);return V});else{if(J.value==="aborted")return b0;let G=this._def.schema._parseSync({data:Y,path:Q.path,parent:Q});if(G.status==="aborted")return b0;if(G.status==="dirty")return mX(G.value);if(J.value==="dirty")return mX(G.value);return G}}if(X.type==="refinement"){let Y=(G)=>{let V=X.refinement(G,W);if(Q.common.async)return Promise.resolve(V);if(V instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return G};if(Q.common.async===!1){let G=this._def.schema._parseSync({data:Q.data,path:Q.path,parent:Q});if(G.status==="aborted")return b0;if(G.status==="dirty")J.dirty();return Y(G.value),{status:J.value,value:G.value}}else return this._def.schema._parseAsync({data:Q.data,path:Q.path,parent:Q}).then((G)=>{if(G.status==="aborted")return b0;if(G.status==="dirty")J.dirty();return Y(G.value).then(()=>{return{status:J.value,value:G.value}})})}if(X.type==="transform")if(Q.common.async===!1){let Y=this._def.schema._parseSync({data:Q.data,path:Q.path,parent:Q});if(!GX(Y))return b0;let G=X.transform(Y.value,W);if(G instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:J.value,value:G}}else return this._def.schema._parseAsync({data:Q.data,path:Q.path,parent:Q}).then((Y)=>{if(!GX(Y))return b0;return Promise.resolve(X.transform(Y.value,W)).then((G)=>({status:J.value,value:G}))});W9.assertNever(X)}}eJ.create=($,J,Q)=>{return new eJ({schema:$,typeName:l0.ZodEffects,effect:J,...s0(Q)})};eJ.createWithPreprocess=($,J,Q)=>{return new eJ({schema:J,effect:{type:"preprocess",transform:$},typeName:l0.ZodEffects,...s0(Q)})};class rJ extends Q9{_parse($){if(this._getType($)===j0.undefined)return c$(void 0);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}}rJ.create=($,J)=>{return new rJ({innerType:$,typeName:l0.ZodOptional,...s0(J)})};class U8 extends Q9{_parse($){if(this._getType($)===j0.null)return c$(null);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}}U8.create=($,J)=>{return new U8({innerType:$,typeName:l0.ZodNullable,...s0(J)})};class eW extends Q9{_parse($){let{ctx:J}=this._processInputParams($),Q=J.data;if(J.parsedType===j0.undefined)Q=this._def.defaultValue();return this._def.innerType._parse({data:Q,path:J.path,parent:J})}removeDefault(){return this._def.innerType}}eW.create=($,J)=>{return new eW({innerType:$,typeName:l0.ZodDefault,defaultValue:typeof J.default==="function"?J.default:()=>J.default,...s0(J)})};class $5 extends Q9{_parse($){let{ctx:J}=this._processInputParams($),Q={...J,common:{...J.common,issues:[]}},X=this._def.innerType._parse({data:Q.data,path:Q.path,parent:{...Q}});if(pW(X))return X.then((W)=>{return{status:"valid",value:W.status==="valid"?W.value:this._def.catchValue({get error(){return new qJ(Q.common.issues)},input:Q.data})}});else return{status:"valid",value:X.status==="valid"?X.value:this._def.catchValue({get error(){return new qJ(Q.common.issues)},input:Q.data})}}removeCatch(){return this._def.innerType}}$5.create=($,J)=>{return new $5({innerType:$,typeName:l0.ZodCatch,catchValue:typeof J.catch==="function"?J.catch:()=>J.catch,...s0(J)})};class AY extends Q9{_parse($){if(this._getType($)!==j0.nan){let Q=this._getOrReturnCtx($);return L0(Q,{code:q0.invalid_type,expected:j0.nan,received:Q.parsedType}),b0}return{status:"valid",value:$.data}}}AY.create=($)=>{return new AY({typeName:l0.ZodNaN,...s0($)})};var Ch=Symbol("zod_brand");class B7 extends Q9{_parse($){let{ctx:J}=this._processInputParams($),Q=J.data;return this._def.type._parse({data:Q,path:J.path,parent:J})}unwrap(){return this._def.type}}class EY extends Q9{_parse($){let{status:J,ctx:Q}=this._processInputParams($);if(Q.common.async)return(async()=>{let W=await this._def.in._parseAsync({data:Q.data,path:Q.path,parent:Q});if(W.status==="aborted")return b0;if(W.status==="dirty")return J.dirty(),mX(W.value);else return this._def.out._parseAsync({data:W.value,path:Q.path,parent:Q})})();else{let X=this._def.in._parseSync({data:Q.data,path:Q.path,parent:Q});if(X.status==="aborted")return b0;if(X.status==="dirty")return J.dirty(),{status:"dirty",value:X.value};else return this._def.out._parseSync({data:X.value,path:Q.path,parent:Q})}}static create($,J){return new EY({in:$,out:J,typeName:l0.ZodPipeline})}}class J5 extends Q9{_parse($){let J=this._def.innerType._parse($),Q=(X)=>{if(GX(X))X.value=Object.freeze(X.value);return X};return pW(J)?J.then((X)=>Q(X)):Q(J)}unwrap(){return this._def.innerType}}J5.create=($,J)=>{return new J5({innerType:$,typeName:l0.ZodReadonly,...s0(J)})};function Xj($,J){let Q=typeof $==="function"?$(J):typeof $==="string"?{message:$}:$;return typeof Q==="string"?{message:Q}:Q}function qj($,J={},Q){if($)return lX.create().superRefine((X,W)=>{let Y=$(X);if(Y instanceof Promise)return Y.then((G)=>{if(!G){let V=Xj(J,X),q=V.fatal??Q??!0;W.addIssue({code:"custom",...V,fatal:q})}});if(!Y){let G=Xj(J,X),V=G.fatal??Q??!0;W.addIssue({code:"custom",...G,fatal:V})}return});return lX.create()}var Ih={object:X$.lazycreate},l0;(function($){$.ZodString="ZodString",$.ZodNumber="ZodNumber",$.ZodNaN="ZodNaN",$.ZodBigInt="ZodBigInt",$.ZodBoolean="ZodBoolean",$.ZodDate="ZodDate",$.ZodSymbol="ZodSymbol",$.ZodUndefined="ZodUndefined",$.ZodNull="ZodNull",$.ZodAny="ZodAny",$.ZodUnknown="ZodUnknown",$.ZodNever="ZodNever",$.ZodVoid="ZodVoid",$.ZodArray="ZodArray",$.ZodObject="ZodObject",$.ZodUnion="ZodUnion",$.ZodDiscriminatedUnion="ZodDiscriminatedUnion",$.ZodIntersection="ZodIntersection",$.ZodTuple="ZodTuple",$.ZodRecord="ZodRecord",$.ZodMap="ZodMap",$.ZodSet="ZodSet",$.ZodFunction="ZodFunction",$.ZodLazy="ZodLazy",$.ZodLiteral="ZodLiteral",$.ZodEnum="ZodEnum",$.ZodEffects="ZodEffects",$.ZodNativeEnum="ZodNativeEnum",$.ZodOptional="ZodOptional",$.ZodNullable="ZodNullable",$.ZodDefault="ZodDefault",$.ZodCatch="ZodCatch",$.ZodPromise="ZodPromise",$.ZodBranded="ZodBranded",$.ZodPipeline="ZodPipeline",$.ZodReadonly="ZodReadonly"})(l0||(l0={}));var kh=($,J={message:`Input not instance of ${$.name}`})=>qj((Q)=>Q instanceof $,J),Kj=nJ.create,Hj=qX.create,Th=AY.create,Ah=KX.create,Dj=cW.create,Eh=fX.create,hh=CY.create,xh=iW.create,vh=aW.create,bh=lX.create,yh=VX.create,gh=UQ.create,mh=IY.create,fh=sJ.create,lh=X$.create,ph=X$.strictCreate,dh=oW.create,uh=S7.create,ch=nW.create,ih=ZQ.create,ah=kY.create,oh=TY.create,nh=pX.create,sh=uW.create,rh=sW.create,th=rW.create,eh=HX.create,$x=tW.create,Jx=dX.create,Qx=eJ.create,Xx=rJ.create,Wx=U8.create,Yx=eJ.createWithPreprocess,Gx=EY.create,Vx=()=>Kj().optional(),qx=()=>Hj().optional(),Kx=()=>Dj().optional(),Hx={string:($)=>nJ.create({...$,coerce:!0}),number:($)=>qX.create({...$,coerce:!0}),boolean:($)=>cW.create({...$,coerce:!0}),bigint:($)=>KX.create({...$,coerce:!0}),date:($)=>fX.create({...$,coerce:!0})};var Dx=b0;function X0($,J,Q){let X=$[J.name];if(typeof X==="function")return X;let W=$[Q];if(typeof W==="function")return W;return(Y)=>J($,Y)}class u1 extends R0{constructor($){super(`Filter type "${$}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}var Uj="/docs/contract/encodeEventTopics";function zQ($){let{abi:J,eventName:Q,args:X}=$,W=J[0];if(Q){let q=I7({abi:J,name:Q});if(!q)throw new c1(Q,{docsPath:Uj});W=q}if(W.type!=="event")throw new c1(void 0,{docsPath:Uj});let Y=C7(W),G=Q5(Y),V=[];if(X&&"inputs"in W){let q=W.inputs?.filter((Z)=>("indexed"in Z)&&Z.indexed),H=Array.isArray(X)?X:Object.values(X).length>0?q?.map((Z)=>X[Z.name])??[]:[];if(H.length>0)V=q?.map((Z,M)=>{if(Array.isArray(H[M]))return H[M].map((j,R)=>Zj({param:Z,value:H[M][R]}));return typeof H[M]<"u"&&H[M]!==null?Zj({param:Z,value:H[M]}):null})??[]}return[G,...V]}function Zj({param:$,value:J}){if($.type==="string"||$.type==="bytes")return l9(bJ(J));if($.type==="tuple"||$.type.match(/^(.*)\[(\d+)?\]$/))throw new u1($.type);return uX([$],[J])}function DX($,{method:J}){let Q={};if($.transport.type==="fallback")$.transport.onResponse?.(({method:X,response:W,status:Y,transport:G})=>{if(Y==="success"&&J===X)Q[W]=G.request});return(X)=>Q[X]||$.request}async function k7($,J){let{address:Q,abi:X,args:W,eventName:Y,fromBlock:G,strict:V,toBlock:q}=J,H=DX($,{method:"eth_newFilter"}),Z=Y?zQ({abi:X,args:W,eventName:Y}):void 0,M=await $.request({method:"eth_newFilter",params:[{address:Q,fromBlock:typeof G==="bigint"?V0(G):G,toBlock:typeof q==="bigint"?V0(q):q,topics:Z}]});return{abi:X,args:W,eventName:Y,id:M,request:H(M),strict:Boolean(V),type:"event"}}var Ux=3;function MJ($,{abi:J,address:Q,args:X,docsPath:W,functionName:Y,sender:G}){let V=$ instanceof W5?$:$ instanceof R0?$.walk((N)=>("data"in N))||$.walk():{},{code:q,data:H,details:Z,message:M,shortMessage:j}=V,R=(()=>{if($ instanceof X5)return new zj({functionName:Y});if([Ux,Y5.code].includes(q)&&(H||Z||M||j)||q===Z8.code&&Z==="execution reverted"&&H)return new hY({abi:J,data:typeof H==="object"?H.data:H,functionName:Y,message:V instanceof A7?Z:j??M});return $})();return new T7(R,{abi:J,args:X,contractAddress:Q,docsPath:W,functionName:Y,sender:G})}function E7($){let J=l9(`0x${$.substring(4)}`).substring(26);return xY(`0x${J}`)}async function Mj({hash:$,signature:J}){let Q=$Q($)?$:p0($),{secp256k1:X}=await import("./chunk-8pp4as02.js");return`0x${(()=>{if(typeof J==="object"&&"r"in J&&"s"in J){let{r:H,s:Z,v:M,yParity:j}=J,R=Number(j??M),N=jj(R);return new X.Signature(X9(H),X9(Z)).addRecoveryBit(N)}let G=$Q(J)?J:p0(J);if(LJ(G)!==65)throw Error("invalid signature length");let V=W$(`0x${G.slice(130)}`),q=jj(V);return X.Signature.fromCompact(G.substring(2,130)).addRecoveryBit(q)})().recoverPublicKey(Q.substring(2)).toHex(!1)}`}function jj($){if($===0||$===1)return $;if($===27)return 0;if($===28)return 1;throw Error("Invalid yParityOrV value")}async function h7({hash:$,signature:J}){return E7(await Mj({hash:$,signature:J}))}function wJ($,J="hex"){let Q=Lj($),X=x7(new Uint8Array(Q.length));if(Q.encode(X),J==="hex")return Y$(X.bytes);return X.bytes}function Lj($){if(Array.isArray($))return Zx($.map((J)=>Lj(J)));return zx($)}function Zx($){let J=$.reduce((W,Y)=>W+Y.length,0),Q=wj(J);return{length:(()=>{if(J<=55)return 1+J;return 1+Q+J})(),encode(W){if(J<=55)W.pushByte(192+J);else if(W.pushByte(247+Q),Q===1)W.pushUint8(J);else if(Q===2)W.pushUint16(J);else if(Q===3)W.pushUint24(J);else W.pushUint32(J);for(let{encode:Y}of $)Y(W)}}}function zx($){let J=typeof $==="string"?F$($):$,Q=wj(J.length);return{length:(()=>{if(J.length===1&&J[0]<128)return 1;if(J.length<=55)return 1+J.length;return 1+Q+J.length})(),encode(W){if(J.length===1&&J[0]<128)W.pushBytes(J);else if(J.length<=55)W.pushByte(128+J.length),W.pushBytes(J);else{if(W.pushByte(183+Q),Q===1)W.pushUint8(J.length);else if(Q===2)W.pushUint16(J.length);else if(Q===3)W.pushUint24(J.length);else W.pushUint32(J.length);W.pushBytes(J)}}}}function wj($){if($<256)return 1;if($<65536)return 2;if($<16777216)return 3;if($<4294967296)return 4;throw new R0("Length is too large.")}function v7($){let{chainId:J,nonce:Q,to:X}=$,W=$.contractAddress??$.address,Y=l9(PJ(["0x05",wJ([J?V0(J):"0x",W,Q?V0(Q):"0x"])]));if(X==="bytes")return F$(Y);return Y}async function UX($){let{authorization:J,signature:Q}=$;return h7({hash:v7(J),signature:Q??J})}class i1 extends R0{constructor($,{account:J,docsPath:Q,chain:X,data:W,gas:Y,gasPrice:G,maxFeePerGas:V,maxPriorityFeePerGas:q,nonce:H,to:Z,value:M}){let j=Rj({from:J?.address,to:Z,value:typeof M<"u"&&`${Pj(M)} ${X?.nativeCurrency?.symbol||"ETH"}`,data:W,gas:Y,gasPrice:typeof G<"u"&&`${G5(G)} gwei`,maxFeePerGas:typeof V<"u"&&`${G5(V)} gwei`,maxPriorityFeePerGas:typeof q<"u"&&`${G5(q)} gwei`,nonce:H});super($.shortMessage,{cause:$,docsPath:Q,metaMessages:[...$.metaMessages?[...$.metaMessages," "]:[],"Estimate Gas Arguments:",j].filter(Boolean),name:"EstimateGasExecutionError"});Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=$}}function Oj($,{docsPath:J,...Q}){let X=(()=>{let W=q5($,Q);if(W instanceof V5)return $;return W})();return new i1(X,{docsPath:J,...Q})}class vY extends R0{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class cX extends R0{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class a1 extends R0{constructor({maxPriorityFeePerGas:$}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${G5($)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class bY extends R0{constructor({blockHash:$,blockNumber:J}){let Q="Block";if($)Q=`Block at hash "${$}"`;if(J)Q=`Block at number "${J}"`;super(`${Q} could not be found.`,{name:"BlockNotFoundError"})}}var o1={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function z8($,J){let Q={...$,blockHash:$.blockHash?$.blockHash:null,blockNumber:$.blockNumber?BigInt($.blockNumber):null,chainId:$.chainId?W$($.chainId):void 0,gas:$.gas?BigInt($.gas):void 0,gasPrice:$.gasPrice?BigInt($.gasPrice):void 0,maxFeePerBlobGas:$.maxFeePerBlobGas?BigInt($.maxFeePerBlobGas):void 0,maxFeePerGas:$.maxFeePerGas?BigInt($.maxFeePerGas):void 0,maxPriorityFeePerGas:$.maxPriorityFeePerGas?BigInt($.maxPriorityFeePerGas):void 0,nonce:$.nonce?W$($.nonce):void 0,to:$.to?$.to:null,transactionIndex:$.transactionIndex?Number($.transactionIndex):null,type:$.type?o1[$.type]:void 0,typeHex:$.type?$.type:void 0,value:$.value?BigInt($.value):void 0,v:$.v?BigInt($.v):void 0};if($.authorizationList)Q.authorizationList=jx($.authorizationList);if(Q.yParity=(()=>{if($.yParity)return Number($.yParity);if(typeof Q.v==="bigint"){if(Q.v===0n||Q.v===27n)return 0;if(Q.v===1n||Q.v===28n)return 1;if(Q.v>=35n)return Q.v%2n===0n?1:0}return})(),Q.type==="legacy")delete Q.accessList,delete Q.maxFeePerBlobGas,delete Q.maxFeePerGas,delete Q.maxPriorityFeePerGas,delete Q.yParity;if(Q.type==="eip2930")delete Q.maxFeePerBlobGas,delete Q.maxFeePerGas,delete Q.maxPriorityFeePerGas;if(Q.type==="eip1559")delete Q.maxFeePerBlobGas;return Q}var b7=K5("transaction",z8);function jx($){return $.map((J)=>({address:J.address,chainId:Number(J.chainId),nonce:Number(J.nonce),r:J.r,s:J.s,yParity:Number(J.yParity)}))}function yY($,J){let Q=($.transactions??[]).map((X)=>{if(typeof X==="string")return X;return z8(X)});return{...$,baseFeePerGas:$.baseFeePerGas?BigInt($.baseFeePerGas):null,blobGasUsed:$.blobGasUsed?BigInt($.blobGasUsed):void 0,difficulty:$.difficulty?BigInt($.difficulty):void 0,excessBlobGas:$.excessBlobGas?BigInt($.excessBlobGas):void 0,gasLimit:$.gasLimit?BigInt($.gasLimit):void 0,gasUsed:$.gasUsed?BigInt($.gasUsed):void 0,hash:$.hash?$.hash:null,logsBloom:$.logsBloom?$.logsBloom:null,nonce:$.nonce?$.nonce:null,number:$.number?BigInt($.number):null,size:$.size?BigInt($.size):void 0,timestamp:$.timestamp?BigInt($.timestamp):void 0,transactions:Q,totalDifficulty:$.totalDifficulty?BigInt($.totalDifficulty):null}}var y7=K5("block",yY);async function I$($,{blockHash:J,blockNumber:Q,blockTag:X=$.experimental_blockTag??"latest",includeTransactions:W}={}){let Y=W??!1,G=Q!==void 0?V0(Q):void 0,V=null;if(J)V=await $.request({method:"eth_getBlockByHash",params:[J,Y]},{dedupe:!0});else V=await $.request({method:"eth_getBlockByNumber",params:[G||X,Y]},{dedupe:Boolean(G)});if(!V)throw new bY({blockHash:J,blockNumber:Q});return($.chain?.formatters?.block?.format||yY)(V,"getBlock")}async function H5($){let J=await $.request({method:"eth_gasPrice"});return BigInt(J)}async function Nj($,J){return n1($,J)}async function n1($,J){let{block:Q,chain:X=$.chain,request:W}=J||{};try{let Y=X?.fees?.maxPriorityFeePerGas??X?.fees?.defaultPriorityFee;if(typeof Y==="function"){let V=Q||await X0($,I$,"getBlock")({}),q=await Y({block:V,client:$,request:W});if(q===null)throw Error();return q}if(typeof Y<"u")return Y;let G=await $.request({method:"eth_maxPriorityFeePerGas"});return X9(G)}catch{let[Y,G]=await Promise.all([Q?Promise.resolve(Q):X0($,I$,"getBlock")({}),X0($,H5,"getGasPrice")({})]);if(typeof Y.baseFeePerGas!=="bigint")throw new cX;let V=G-Y.baseFeePerGas;if(V<0n)return 0n;return V}}async function _j($,J){return g7($,J)}async function g7($,J){let{block:Q,chain:X=$.chain,request:W,type:Y="eip1559"}=J||{},G=await(async()=>{if(typeof X?.fees?.baseFeeMultiplier==="function")return X.fees.baseFeeMultiplier({block:Q,client:$,request:W});return X?.fees?.baseFeeMultiplier??1.2})();if(G<1)throw new vY;let q=10**(G.toString().split(".")[1]?.length??0),H=(j)=>j*BigInt(Math.ceil(G*q))/BigInt(q),Z=Q?Q:await X0($,I$,"getBlock")({});if(typeof X?.fees?.estimateFeesPerGas==="function"){let j=await X.fees.estimateFeesPerGas({block:Q,client:$,multiply:H,request:W,type:Y});if(j!==null)return j}if(Y==="eip1559"){if(typeof Z.baseFeePerGas!=="bigint")throw new cX;let j=typeof W?.maxPriorityFeePerGas==="bigint"?W.maxPriorityFeePerGas:await n1($,{block:Z,chain:X,request:W}),R=H(Z.baseFeePerGas);return{maxFeePerGas:W?.maxFeePerGas??R+j,maxPriorityFeePerGas:j}}return{gasPrice:W?.gasPrice??H(await X0($,H5,"getGasPrice")({}))}}async function D5($,{address:J,blockTag:Q="latest",blockNumber:X}){let W=await $.request({method:"eth_getTransactionCount",params:[J,typeof X==="bigint"?V0(X):Q]},{dedupe:Boolean(X)});return W$(W)}function U5($){let{kzg:J}=$,Q=$.to??(typeof $.blobs[0]==="string"?"hex":"bytes"),X=typeof $.blobs[0]==="string"?$.blobs.map((Y)=>F$(Y)):$.blobs,W=[];for(let Y of X)W.push(Uint8Array.from(J.blobToKzgCommitment(Y)));return Q==="bytes"?W:W.map((Y)=>Y$(Y))}function Z5($){let{kzg:J}=$,Q=$.to??(typeof $.blobs[0]==="string"?"hex":"bytes"),X=typeof $.blobs[0]==="string"?$.blobs.map((G)=>F$(G)):$.blobs,W=typeof $.commitments[0]==="string"?$.commitments.map((G)=>F$(G)):$.commitments,Y=[];for(let G=0;G<X.length;G++){let V=X[G],q=W[G];Y.push(Uint8Array.from(J.computeBlobKzgProof(V,q)))}return Q==="bytes"?Y:Y.map((G)=>Y$(G))}function m7($,J){let Q=J||"hex",X=qY($Q($,{strict:!1})?bJ($):$);if(Q==="bytes")return X;return p0(X)}function Fj($){let{commitment:J,version:Q=1}=$,X=$.to??(typeof J==="string"?"hex":"bytes"),W=m7(J,"bytes");return W.set([Q],0),X==="bytes"?W:Y$(W)}function f7($){let{commitments:J,version:Q}=$,X=$.to??(typeof J[0]==="string"?"hex":"bytes"),W=[];for(let Y of J)W.push(Fj({commitment:Y,to:X,version:Q}));return W}var Sj=32,Bj=4096,Cj=131072,s1=761855;var l7=1;class r1 extends R0{constructor({maxSize:$,size:J}){super("Blob size is too large.",{metaMessages:[`Max: ${$} bytes`,`Given: ${J} bytes`],name:"BlobSizeTooLargeError"})}}class gY extends R0{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class t1 extends R0{constructor({hash:$,size:J}){super(`Versioned hash "${$}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${J}`],name:"InvalidVersionedHashSizeError"})}}class e1 extends R0{constructor({hash:$,version:J}){super(`Versioned hash "${$}" version is invalid.`,{metaMessages:[`Expected: ${l7}`,`Received: ${J}`],name:"InvalidVersionedHashVersionError"})}}function Ij($){let J=$.to??(typeof $.data==="string"?"hex":"bytes"),Q=typeof $.data==="string"?F$($.data):$.data,X=LJ(Q);if(!X)throw new gY;if(X>s1)throw new r1({maxSize:s1,size:X});let W=[],Y=!0,G=0;while(Y){let V=x7(new Uint8Array(Cj)),q=0;while(q<Bj){let H=Q.slice(G,G+(Sj-1));if(V.pushByte(0),V.pushBytes(H),H.length<31){V.pushByte(128),Y=!1;break}q++,G+=31}W.push(V)}return J==="bytes"?W.map((V)=>V.bytes):W.map((V)=>Y$(V.bytes))}function p7($){let{data:J,kzg:Q,to:X}=$,W=$.blobs??Ij({data:J,to:X}),Y=$.commitments??U5({blobs:W,kzg:Q,to:X}),G=$.proofs??Z5({blobs:W,commitments:Y,kzg:Q,to:X}),V=[];for(let q=0;q<W.length;q++)V.push({blob:W[q],commitment:Y[q],proof:G[q]});return V}function d7($){if($.type)return $.type;if(typeof $.authorizationList<"u")return"eip7702";if(typeof $.blobs<"u"||typeof $.blobVersionedHashes<"u"||typeof $.maxFeePerBlobGas<"u"||typeof $.sidecars<"u")return"eip4844";if(typeof $.maxFeePerGas<"u"||typeof $.maxPriorityFeePerGas<"u")return"eip1559";if(typeof $.gasPrice<"u"){if(typeof $.accessList<"u")return"eip2930";return"legacy"}throw new kj({transaction:$})}function jQ($,{docsPath:J,...Q}){let X=(()=>{let W=q5($,Q);if(W instanceof V5)return $;return W})();return new Tj(X,{docsPath:J,...Q})}async function w$($){let J=await $.request({method:"eth_chainId"},{dedupe:!0});return W$(J)}async function z5($,J){let{account:Q=$.account,accessList:X,authorizationList:W,chain:Y=$.chain,blobVersionedHashes:G,blobs:V,data:q,gas:H,gasPrice:Z,maxFeePerBlobGas:M,maxFeePerGas:j,maxPriorityFeePerGas:R,nonce:N,nonceManager:A,to:E,type:h,value:y,...k}=J,v=await(async()=>{if(!Q)return N;if(!A)return N;if(typeof N<"u")return N;let o=i0(Q),p=Y?Y.id:await X0($,w$,"getChainId")({});return await A.consume({address:o.address,chainId:p,client:$})})();k$(J);let f=Y?.formatters?.transactionRequest?.format,c=(f||KJ)({...MQ(k,{format:f}),account:Q?i0(Q):void 0,accessList:X,authorizationList:W,blobs:V,blobVersionedHashes:G,data:q,gas:H,gasPrice:Z,maxFeePerBlobGas:M,maxFeePerGas:j,maxPriorityFeePerGas:R,nonce:v,to:E,type:h,value:y},"fillTransaction");try{let o=await $.request({method:"eth_fillTransaction",params:[c]}),u=(Y?.formatters?.transaction?.format||z8)(o.tx);if(delete u.blockHash,delete u.blockNumber,delete u.r,delete u.s,delete u.transactionIndex,delete u.v,delete u.yParity,u.data=u.input,u.gas)u.gas=J.gas??u.gas;if(u.gasPrice)u.gasPrice=J.gasPrice??u.gasPrice;if(u.maxFeePerBlobGas)u.maxFeePerBlobGas=J.maxFeePerBlobGas??u.maxFeePerBlobGas;if(u.maxFeePerGas)u.maxFeePerGas=J.maxFeePerGas??u.maxFeePerGas;if(u.maxPriorityFeePerGas)u.maxPriorityFeePerGas=J.maxPriorityFeePerGas??u.maxPriorityFeePerGas;if(u.nonce)u.nonce=J.nonce??u.nonce;let n=await(async()=>{if(typeof Y?.fees?.baseFeeMultiplier==="function"){let D=await X0($,I$,"getBlock")({});return Y.fees.baseFeeMultiplier({block:D,client:$,request:J})}return Y?.fees?.baseFeeMultiplier??1.2})();if(n<1)throw new vY;let S=10**(n.toString().split(".")[1]?.length??0),K=(D)=>D*BigInt(Math.ceil(n*S))/BigInt(S);if(u.maxFeePerGas&&!J.maxFeePerGas)u.maxFeePerGas=K(u.maxFeePerGas);if(u.gasPrice&&!J.gasPrice)u.gasPrice=K(u.gasPrice);return{raw:o.raw,transaction:{from:c.from,...u}}}catch(o){throw jQ(o,{...J,chain:$.chain})}}var mY=["blobVersionedHashes","chainId","fees","gas","nonce","type"],Aj=new Map,$K=new ZX(128);async function yJ($,J){let Q=J;Q.account??=$.account,Q.parameters??=mY;let{account:X,chain:W=$.chain,nonceManager:Y,parameters:G}=Q,V=(()=>{if(typeof W?.prepareTransactionRequest==="function")return{fn:W.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(W?.prepareTransactionRequest))return{fn:W.prepareTransactionRequest[0],runAt:W.prepareTransactionRequest[1].runAt};return})(),q;async function H(){if(q)return q;if(typeof Q.chainId<"u")return Q.chainId;if(W)return W.id;return q=await X0($,w$,"getChainId")({}),q}let Z=X?i0(X):X,M=Q.nonce;if(G.includes("nonce")&&typeof M>"u"&&Z&&Y){let v=await H();M=await Y.consume({address:Z.address,chainId:v,client:$})}if(V?.fn&&V.runAt?.includes("beforeFillTransaction"))Q=await V.fn({...Q,chain:W},{phase:"beforeFillTransaction"}),M??=Q.nonce;let R=(()=>{if((G.includes("blobVersionedHashes")||G.includes("sidecars"))&&Q.kzg&&Q.blobs)return!1;if($K.get($.uid)===!1)return!1;if(!["fees","gas"].some((f)=>G.includes(f)))return!1;if(G.includes("chainId")&&typeof Q.chainId!=="number")return!0;if(G.includes("nonce")&&typeof M!=="number")return!0;if(G.includes("fees")&&typeof Q.gasPrice!=="bigint"&&(typeof Q.maxFeePerGas!=="bigint"||typeof Q.maxPriorityFeePerGas!=="bigint"))return!0;if(G.includes("gas")&&typeof Q.gas!=="bigint")return!0;return!1})()?await X0($,z5,"fillTransaction")({...Q,nonce:M}).then((v)=>{let{chainId:f,from:d,gas:c,gasPrice:o,nonce:p,maxFeePerBlobGas:u,maxFeePerGas:n,maxPriorityFeePerGas:g,type:S,...K}=v.transaction;return $K.set($.uid,!0),{...Q,...d?{from:d}:{},...S?{type:S}:{},...typeof f<"u"?{chainId:f}:{},...typeof c<"u"?{gas:c}:{},...typeof o<"u"?{gasPrice:o}:{},...typeof p<"u"?{nonce:p}:{},...typeof u<"u"?{maxFeePerBlobGas:u}:{},...typeof n<"u"?{maxFeePerGas:n}:{},...typeof g<"u"?{maxPriorityFeePerGas:g}:{},..."nonceKey"in K&&typeof K.nonceKey<"u"?{nonceKey:K.nonceKey}:{}}}).catch((v)=>{let f=v;if(f.name!=="TransactionExecutionError")return Q;if(f.walk?.((c)=>{let o=c;return o.name==="MethodNotFoundRpcError"||o.name==="MethodNotSupportedRpcError"}))$K.set($.uid,!1);return Q}):Q;M??=R.nonce,Q={...R,...Z?{from:Z?.address}:{},...M?{nonce:M}:{}};let{blobs:N,gas:A,kzg:E,type:h}=Q;if(V?.fn&&V.runAt?.includes("beforeFillParameters"))Q=await V.fn({...Q,chain:W},{phase:"beforeFillParameters"});let y;async function k(){if(y)return y;return y=await X0($,I$,"getBlock")({blockTag:"latest"}),y}if(G.includes("nonce")&&typeof M>"u"&&Z&&!Y)Q.nonce=await X0($,D5,"getTransactionCount")({address:Z.address,blockTag:"pending"});if((G.includes("blobVersionedHashes")||G.includes("sidecars"))&&N&&E){let v=U5({blobs:N,kzg:E});if(G.includes("blobVersionedHashes")){let f=f7({commitments:v,to:"hex"});Q.blobVersionedHashes=f}if(G.includes("sidecars")){let f=Z5({blobs:N,commitments:v,kzg:E}),d=p7({blobs:N,commitments:v,proofs:f,to:"hex"});Q.sidecars=d}}if(G.includes("chainId"))Q.chainId=await H();if((G.includes("fees")||G.includes("type"))&&typeof h>"u")try{Q.type=d7(Q)}catch{let v=Aj.get($.uid);if(typeof v>"u")v=typeof(await k())?.baseFeePerGas==="bigint",Aj.set($.uid,v);Q.type=v?"eip1559":"legacy"}if(G.includes("fees"))if(Q.type!=="legacy"&&Q.type!=="eip2930"){if(typeof Q.maxFeePerGas>"u"||typeof Q.maxPriorityFeePerGas>"u"){let v=await k(),{maxFeePerGas:f,maxPriorityFeePerGas:d}=await g7($,{block:v,chain:W,request:Q});if(typeof Q.maxPriorityFeePerGas>"u"&&Q.maxFeePerGas&&Q.maxFeePerGas<d)throw new a1({maxPriorityFeePerGas:d});Q.maxPriorityFeePerGas=d,Q.maxFeePerGas=f}}else{if(typeof Q.maxFeePerGas<"u"||typeof Q.maxPriorityFeePerGas<"u")throw new cX;if(typeof Q.gasPrice>"u"){let v=await k(),{gasPrice:f}=await g7($,{block:v,chain:W,request:Q,type:"legacy"});Q.gasPrice=f}}if(G.includes("gas")&&typeof A>"u")Q.gas=await X0($,j5,"estimateGas")({...Q,account:Z,prepare:Z?.type==="local"?[]:["blobVersionedHashes"]});if(V?.fn&&V.runAt?.includes("afterFillParameters"))Q=await V.fn({...Q,chain:W},{phase:"afterFillParameters"});return k$(Q),delete Q.parameters,Q}async function j5($,J){let{account:Q=$.account,prepare:X=!0}=J,W=Q?i0(Q):void 0,Y=(()=>{if(Array.isArray(X))return X;if(W?.type!=="local")return["blobVersionedHashes"];return})();try{let G=await(async()=>{if(J.to)return J.to;if(J.authorizationList&&J.authorizationList.length>0)return await UX({authorization:J.authorizationList[0]}).catch(()=>{throw new R0("`to` is required. Could not infer from `authorizationList`")});return})(),{accessList:V,authorizationList:q,blobs:H,blobVersionedHashes:Z,blockNumber:M,blockTag:j,data:R,gas:N,gasPrice:A,maxFeePerBlobGas:E,maxFeePerGas:h,maxPriorityFeePerGas:y,nonce:k,value:v,stateOverride:f,...d}=X?await yJ($,{...J,parameters:Y,to:G}):J;if(N&&J.gas!==N)return N;let o=(typeof M==="bigint"?V0(M):void 0)||j,p=u7(f);k$(J);let u=$.chain?.formatters?.transactionRequest?.format,g=(u||KJ)({...MQ(d,{format:u}),account:W,accessList:V,authorizationList:q,blobs:H,blobVersionedHashes:Z,data:R,gasPrice:A,maxFeePerBlobGas:E,maxFeePerGas:h,maxPriorityFeePerGas:y,nonce:k,to:G,value:v},"estimateGas");return BigInt(await $.request({method:"eth_estimateGas",params:p?[g,o??$.experimental_blockTag??"latest",p]:o?[g,o]:[g]}))}catch(G){throw Oj(G,{...J,account:W,chain:$.chain})}}async function Ej($,J){let{abi:Q,address:X,args:W,functionName:Y,dataSuffix:G=typeof $.dataSuffix==="string"?$.dataSuffix:$.dataSuffix?.value,...V}=J,q=I9({abi:Q,args:W,functionName:Y});try{return await X0($,j5,"estimateGas")({data:`${q}${G?G.replace("0x",""):""}`,to:X,...V})}catch(H){let Z=V.account?i0(V.account):void 0;throw MJ(H,{abi:Q,address:X,args:W,docsPath:"/docs/contract/estimateContractGas",functionName:Y,sender:Z?.address})}}var hj="/docs/contract/decodeEventLog";function aX($){let{abi:J,data:Q,strict:X,topics:W}=$,Y=X??!0,[G,...V]=W;if(!G)throw new vj({docsPath:hj});let q=J.find((h)=>h.type==="event"&&G===Q5(C7(h)));if(!(q&&("name"in q))||q.type!=="event")throw new bj(G,{docsPath:hj});let{name:H,inputs:Z}=q,M=Z?.some((h)=>!(("name"in h)&&h.name)),j=M?[]:{},R=Z.map((h,y)=>[h,y]).filter(([h])=>("indexed"in h)&&h.indexed),N=[];for(let h=0;h<R.length;h++){let[y,k]=R[h],v=V[h];if(!v){if(Y)throw new M5({abiItem:q,param:y});N.push([y,k]);continue}j[M?k:y.name||k]=Mx({param:y,value:v})}let A=Z.filter((h)=>!(("indexed"in h)&&h.indexed)),E=Y?A:[...N.map(([h])=>h),...A];if(E.length>0){if(Q&&Q!=="0x")try{let h=JK(E,Q);if(h){let y=0;if(!Y)for(let[k,v]of N)j[M?v:k.name||v]=h[y++];if(M){for(let k=0;k<Z.length;k++)if(j[k]===void 0&&y<h.length)j[k]=h[y++]}else for(let k=0;k<A.length;k++)j[A[k].name]=h[y++]}}catch(h){if(Y){if(h instanceof xj||h instanceof yj)throw new iX({abiItem:q,data:Q,params:E,size:LJ(Q)});throw h}}else if(Y)throw new iX({abiItem:q,data:"0x",params:E,size:0})}return{eventName:H,args:Object.values(j).length>0?j:void 0}}function Mx({param:$,value:J}){if($.type==="string"||$.type==="bytes"||$.type==="tuple"||$.type.match(/^(.*)\[(\d+)?\]$/))return J;return(JK([$],J)||[])[0]}function L5($){let{abi:J,args:Q,logs:X,strict:W=!0}=$,Y=(()=>{if(!$.eventName)return;if(Array.isArray($.eventName))return $.eventName;return[$.eventName]})(),G=J.filter((V)=>V.type==="event").map((V)=>({abi:V,selector:Q5(V)}));return X.map((V)=>{let q=G.filter((M)=>V.topics[0]===M.selector);if(q.length===0)return null;let H,Z;for(let M of q)try{H=aX({...V,abi:[M.abi],strict:!0}),Z=M;break}catch{}if(!H&&!W){Z=q[0];try{H=aX({data:V.data,topics:V.topics,abi:[Z.abi],strict:!1})}catch{let M=Z.abi.inputs?.some((j)=>!(("name"in j)&&j.name));return{...V,args:M?[]:{},eventName:Z.abi.name}}}if(!H||!Z)return null;if(Y&&!Y.includes(H.eventName))return null;if(!Lx({args:H.args,inputs:Z.abi.inputs,matchArgs:Q}))return null;return{...H,...V}}).filter(Boolean)}function Lx($){let{args:J,inputs:Q,matchArgs:X}=$;if(!X)return!0;if(!J)return!1;function W(Y,G,V){try{if(Y.type==="address")return LQ(G,V);if(Y.type==="string"||Y.type==="bytes")return l9(bJ(G))===V;return G===V}catch{return!1}}if(Array.isArray(J)&&Array.isArray(X))return X.every((Y,G)=>{if(Y===null||Y===void 0)return!0;let V=Q[G];if(!V)return!1;return(Array.isArray(Y)?Y:[Y]).some((H)=>W(V,H,J[G]))});if(typeof J==="object"&&!Array.isArray(J)&&typeof X==="object"&&!Array.isArray(X))return Object.entries(X).every(([Y,G])=>{if(G===null||G===void 0)return!0;let V=Q.find((H)=>H.name===Y);if(!V)return!1;return(Array.isArray(G)?G:[G]).some((H)=>W(V,H,J[Y]))});return!1}function T$($,{args:J,eventName:Q}={}){return{...$,blockHash:$.blockHash?$.blockHash:null,blockNumber:$.blockNumber?BigInt($.blockNumber):null,blockTimestamp:$.blockTimestamp?BigInt($.blockTimestamp):$.blockTimestamp===null?null:void 0,logIndex:$.logIndex?Number($.logIndex):null,transactionHash:$.transactionHash?$.transactionHash:null,transactionIndex:$.transactionIndex?Number($.transactionIndex):null,...Q?{args:J,eventName:Q}:{}}}async function w5($,{address:J,blockHash:Q,fromBlock:X,toBlock:W,event:Y,events:G,args:V,strict:q}={}){let H=q??!1,Z=G??(Y?[Y]:void 0),M=[];if(Z){if(M=[Z.flatMap((A)=>zQ({abi:[A],eventName:A.name,args:G?void 0:V}))],Y)M=M[0]}let j;if(Q)j=await $.request({method:"eth_getLogs",params:[{address:J,topics:M,blockHash:Q}]});else j=await $.request({method:"eth_getLogs",params:[{address:J,topics:M,fromBlock:typeof X==="bigint"?V0(X):X,toBlock:typeof W==="bigint"?V0(W):W}]});let R=j.map((N)=>T$(N));if(!Z)return R;return L5({abi:Z,args:V,logs:R,strict:H})}async function c7($,J){let{abi:Q,address:X,args:W,blockHash:Y,eventName:G,fromBlock:V,toBlock:q,strict:H}=J,Z=G?I7({abi:Q,name:G}):void 0,M=!Z?Q.filter((j)=>j.type==="event"):void 0;return X0($,w5,"getLogs")({address:X,args:W,blockHash:Y,event:Z,events:M,fromBlock:V,toBlock:q,strict:H})}async function P$($,J){let{abi:Q,address:X,args:W,functionName:Y,...G}=J,V=I9({abi:Q,args:W,functionName:Y});try{let{data:q}=await X0($,wQ,"call")({...G,data:V,to:X});return HJ({abi:Q,args:W,functionName:Y,data:q||"0x"})}catch(q){throw MJ(q,{abi:Q,address:X,args:W,docsPath:"/docs/contract/readContract",functionName:Y})}}async function gj($,J){let{abi:Q,address:X,args:W,functionName:Y,dataSuffix:G=typeof $.dataSuffix==="string"?$.dataSuffix:$.dataSuffix?.value,...V}=J,q=V.account?i0(V.account):$.account,H=I9({abi:Q,args:W,functionName:Y});try{let{data:Z}=await X0($,wQ,"call")({batch:!1,data:`${H}${G?G.replace("0x",""):""}`,to:X,...V,account:q}),M=HJ({abi:Q,args:W,functionName:Y,data:Z||"0x"}),j=Q.filter((R)=>("name"in R)&&R.name===J.functionName);return{result:M,request:{abi:j,address:X,args:W,dataSuffix:G,functionName:Y,...V,account:q}}}catch(Z){throw MJ(Z,{abi:Q,address:X,args:W,docsPath:"/docs/contract/simulateContract",functionName:Y,sender:q?.address})}}var QK=new Map,mj=new Map,wx=0;function i$($,J,Q){let X=++wx,W=()=>QK.get($)||[],Y=()=>{let Z=W();QK.set($,Z.filter((M)=>M.id!==X))},G=()=>{let Z=W();if(!Z.some((j)=>j.id===X))return;let M=mj.get($);if(Z.length===1&&M){let j=M();if(j instanceof Promise)j.catch(()=>{})}Y()},V=W();if(QK.set($,[...V,{id:X,fns:J}]),V&&V.length>0)return G;let q={};for(let Z in J)q[Z]=(...M)=>{let j=W();if(j.length===0)return;for(let R of j)R.fns[Z]?.(...M)};let H=Q(q);if(typeof H==="function")mj.set($,H);return G}async function fY($){return new Promise((J)=>setTimeout(J,$))}function gJ($,{emitOnBegin:J,initialWaitTime:Q,interval:X}){let W=!0,Y=()=>W=!1;return(async()=>{let V;if(J)V=await $({unpoll:Y});let q=await Q?.(V)??X;await fY(q);let H=async()=>{if(!W)return;await $({unpoll:Y}),await fY(X),H()};H()})(),Y}var Px=new Map,Rx=new Map;function fj($){let J=(W,Y)=>({clear:()=>Y.delete(W),get:()=>Y.get(W),set:(G)=>Y.set(W,G)}),Q=J($,Px),X=J($,Rx);return{clear:()=>{Q.clear(),X.clear()},promise:Q,response:X}}async function lj($,{cacheKey:J,cacheTime:Q=Number.POSITIVE_INFINITY}){let X=fj(J),W=X.response.get();if(W&&Q>0){if(Date.now()-W.created.getTime()<Q)return W.data}let Y=X.promise.get();if(!Y)Y=$(),X.promise.set(Y);try{let G=await Y;return X.response.set({created:new Date,data:G}),G}finally{X.promise.clear()}}var Ox=($)=>`blockNumber.${$}`;async function PQ($,{cacheTime:J=$.cacheTime}={}){let Q=await lj(()=>$.request({method:"eth_blockNumber"}),{cacheKey:Ox($.uid),cacheTime:J});return BigInt(Q)}async function zX($,{filter:J}){let Q="strict"in J&&J.strict,X=await J.request({method:"eth_getFilterChanges",params:[J.id]});if(typeof X[0]==="string")return X;let W=X.map((Y)=>T$(Y));if(!("abi"in J)||!J.abi)return W;return L5({abi:J.abi,logs:W,strict:Q})}async function jX($,{filter:J}){return J.request({method:"eth_uninstallFilter",params:[J.id]})}function pj($,J){let{abi:Q,address:X,args:W,batch:Y=!0,eventName:G,fromBlock:V,onError:q,onLogs:H,poll:Z,pollingInterval:M=$.pollingInterval,strict:j}=J;return(()=>{if(typeof Z<"u")return Z;if(typeof V==="bigint")return!0;if($.transport.type==="webSocket"||$.transport.type==="ipc")return!1;if($.transport.type==="fallback"&&($.transport.transports[0].config.type==="webSocket"||$.transport.transports[0].config.type==="ipc"))return!1;return!0})()?(()=>{let E=j??!1,h=b9(["watchContractEvent",X,W,Y,$.uid,G,M,E,V]);return i$(h,{onLogs:H,onError:q},(y)=>{let k;if(V!==void 0)k=V-1n;let v,f=!1,d=gJ(async()=>{if(!f){try{v=await X0($,k7,"createContractEventFilter")({abi:Q,address:X,args:W,eventName:G,strict:E,fromBlock:V})}catch{}f=!0;return}try{let c;if(v)c=await X0($,zX,"getFilterChanges")({filter:v});else{let o=await X0($,PQ,"getBlockNumber")({});if(k&&k<o)c=await X0($,c7,"getContractEvents")({abi:Q,address:X,args:W,eventName:G,fromBlock:k+1n,toBlock:o,strict:E});else c=[];k=o}if(c.length===0)return;if(Y)y.onLogs(c);else for(let o of c)y.onLogs([o])}catch(c){if(v&&c instanceof Z8)f=!1;y.onError?.(c)}},{emitOnBegin:!0,interval:M});return async()=>{if(v)await X0($,jX,"uninstallFilter")({filter:v});d()}})})():(()=>{let E=j??!1,h=b9(["watchContractEvent",X,W,Y,$.uid,G,M,E]),y=!0,k=()=>y=!1;return i$(h,{onLogs:H,onError:q},(v)=>{return(async()=>{try{let f=(()=>{if($.transport.type==="fallback"){let o=$.transport.transports.find((p)=>p.config.type==="webSocket"||p.config.type==="ipc");if(!o)return $.transport;return o.value}return $.transport})(),d=G?zQ({abi:Q,eventName:G,args:W}):[],{unsubscribe:c}=await f.subscribe({params:["logs",{address:X,topics:d}],onData(o){if(!y)return;let p=o.result;try{let{eventName:u,args:n}=aX({abi:Q,data:p.data,topics:p.topics,strict:j}),g=T$(p,{args:n,eventName:u});v.onLogs([g])}catch(u){let n,g;if(u instanceof iX||u instanceof M5){if(j)return;n=u.abiItem.name,g=u.abiItem.inputs?.some((K)=>!(("name"in K)&&K.name))}let S=T$(p,{args:g?[]:{},eventName:n});v.onLogs([S])}},onError(o){v.onError?.(o)}});if(k=c,!y)k()}catch(f){q?.(f)}})(),()=>k()})})()}class M$ extends R0{constructor({docsPath:$}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
|
|
17
|
+
`),{docsPath:$,docsSlug:"account",name:"AccountNotFoundError"})}}class JQ extends R0{constructor({docsPath:$,metaMessages:J,type:Q}){super(`Account type "${Q}" is not supported.`,{docsPath:$,metaMessages:J,name:"AccountTypeNotSupportedError"})}}function RQ({chain:$,currentChainId:J}){if(!$)throw new uj;if(J!==$.id)throw new dj({chain:$,currentChainId:J})}async function MX($,{serializedTransaction:J}){return $.request({method:"eth_sendRawTransaction",params:[J]},{retryCount:0})}var XK=new ZX(128);async function OQ($,J){let{account:Q=$.account,assertChainId:X=!0,chain:W=$.chain,accessList:Y,authorizationList:G,blobs:V,data:q,dataSuffix:H=typeof $.dataSuffix==="string"?$.dataSuffix:$.dataSuffix?.value,gas:Z,gasPrice:M,maxFeePerBlobGas:j,maxFeePerGas:R,maxPriorityFeePerGas:N,nonce:A,type:E,value:h,...y}=J;if(typeof Q>"u")throw new M$({docsPath:"/docs/actions/wallet/sendTransaction"});let k=Q?i0(Q):null;try{k$(J);let v=await(async()=>{if(J.to)return J.to;if(J.to===null)return;if(G&&G.length>0)return await UX({authorization:G[0]}).catch(()=>{throw new R0("`to` is required. Could not infer from `authorizationList`.")});return})();if(k?.type==="json-rpc"||k===null){let f;if(W!==null){if(f=await X0($,w$,"getChainId")({}),X)RQ({currentChainId:f,chain:W})}let d=$.chain?.formatters?.transactionRequest?.format,o=(d||KJ)({...MQ(y,{format:d}),accessList:Y,account:k,authorizationList:G,blobs:V,chainId:f,data:q?v$([q,H??"0x"]):q,gas:Z,gasPrice:M,maxFeePerBlobGas:j,maxFeePerGas:R,maxPriorityFeePerGas:N,nonce:A,to:v,type:E,value:h},"sendTransaction"),p=XK.get($.uid),u=p?"wallet_sendTransaction":"eth_sendTransaction";try{return await $.request({method:u,params:[o]},{retryCount:0})}catch(n){if(p===!1)throw n;let g=n;if(g.name==="InvalidInputRpcError"||g.name==="InvalidParamsRpcError"||g.name==="MethodNotFoundRpcError"||g.name==="MethodNotSupportedRpcError")return await $.request({method:"wallet_sendTransaction",params:[o]},{retryCount:0}).then((S)=>{return XK.set($.uid,!0),S}).catch((S)=>{let K=S;if(K.name==="MethodNotFoundRpcError"||K.name==="MethodNotSupportedRpcError")throw XK.set($.uid,!1),g;throw K});throw g}}if(k?.type==="local"){let f=await X0($,yJ,"prepareTransactionRequest")({account:k,accessList:Y,authorizationList:G,blobs:V,chain:W,data:q?v$([q,H??"0x"]):q,gas:Z,gasPrice:M,maxFeePerBlobGas:j,maxFeePerGas:R,maxPriorityFeePerGas:N,nonce:A,nonceManager:k.nonceManager,parameters:[...mY,"sidecars"],type:E,value:h,...y,to:v}),d=W?.serializers?.transaction,c=await k.signTransaction(f,{serializer:d});return await X0($,MX,"sendRawTransaction")({serializedTransaction:c})}if(k?.type==="smart")throw new JQ({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"});throw new JQ({docsPath:"/docs/actions/wallet/sendTransaction",type:k?.type})}catch(v){if(v instanceof JQ)throw v;throw jQ(v,{...J,account:k,chain:J.chain||void 0})}}async function j8($,J){return j8.internal($,OQ,"sendTransaction",J)}(function($){async function J(Q,X,W,Y){let{abi:G,account:V=Q.account,address:q,args:H,functionName:Z,...M}=Y;if(typeof V>"u")throw new M$({docsPath:"/docs/contract/writeContract"});let j=V?i0(V):null,R=I9({abi:G,args:H,functionName:Z});try{return await X0(Q,X,W)({data:R,to:q,account:j,...M})}catch(N){throw MJ(N,{abi:G,address:q,args:H,docsPath:"/docs/contract/writeContract",functionName:Z,sender:j?.address})}}$.internal=J})(j8||(j8={}));class WK extends R0{constructor($){super(`Call bundle failed with status: ${$.statusCode}`,{name:"BundleFailedError"});Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=$}}function oX($,{delay:J=100,retryCount:Q=2,shouldRetry:X=()=>!0}={}){return new Promise((W,Y)=>{let G=async({count:V=0}={})=>{let q=async({error:H})=>{let Z=typeof J==="function"?J({count:V,error:H}):J;if(Z)await fY(Z);G({count:V+1})};try{let H=await $();W(H)}catch(H){if(V<Q&&await X({count:V,error:H}))return q({error:H});Y(H)}};G()})}var YK={"0x0":"reverted","0x1":"success"};function lY($,J){let Q={...$,blockNumber:$.blockNumber?BigInt($.blockNumber):null,contractAddress:$.contractAddress?$.contractAddress:null,cumulativeGasUsed:$.cumulativeGasUsed?BigInt($.cumulativeGasUsed):null,effectiveGasPrice:$.effectiveGasPrice?BigInt($.effectiveGasPrice):null,gasUsed:$.gasUsed?BigInt($.gasUsed):null,logs:$.logs?$.logs.map((X)=>T$(X)):null,to:$.to?$.to:null,transactionIndex:$.transactionIndex?W$($.transactionIndex):null,status:$.status?YK[$.status]:null,type:$.type?o1[$.type]||$.type:null};if($.blobGasPrice)Q.blobGasPrice=BigInt($.blobGasPrice);if($.blobGasUsed)Q.blobGasUsed=BigInt($.blobGasUsed);return Q}var i7=K5("transactionReceipt",lY);var GK="0x5792579257925792579257925792579257925792579257925792579257925792",VK=V0(0,{size:32});async function a7($,J){let{account:Q=$.account,chain:X=$.chain,experimental_fallback:W,experimental_fallbackDelay:Y=32,forceAtomic:G=!1,id:V,version:q="2.0.0"}=J,H=Q?i0(Q):null,Z=J.capabilities;if($.dataSuffix&&!J.capabilities?.dataSuffix)if(typeof $.dataSuffix==="string")Z={...J.capabilities,dataSuffix:{value:$.dataSuffix,optional:!0}};else Z={...J.capabilities,dataSuffix:{value:$.dataSuffix.value,...$.dataSuffix.required?{}:{optional:!0}}};let M=J.calls.map((j)=>{let R=j,N=R.abi?I9({abi:R.abi,functionName:R.functionName,args:R.args}):R.data;return{data:R.dataSuffix&&N?v$([N,R.dataSuffix]):N,to:R.to,value:R.value?V0(R.value):void 0}});try{let j=await $.request({method:"wallet_sendCalls",params:[{atomicRequired:G,calls:M,capabilities:Z,chainId:V0(X.id),from:H?.address,id:V,version:q}]},{retryCount:0});if(typeof j==="string")return{id:j};return j}catch(j){let R=j;if(W&&(R.name==="MethodNotFoundRpcError"||R.name==="MethodNotSupportedRpcError"||R.name==="UnknownRpcError"||R.details.toLowerCase().includes("does not exist / is not available")||R.details.toLowerCase().includes("missing or invalid. request()")||R.details.toLowerCase().includes("did not match any variant of untagged enum")||R.details.toLowerCase().includes("account upgraded to unsupported contract")||R.details.toLowerCase().includes("eip-7702 not supported")||R.details.toLowerCase().includes("unsupported wc_ method")||R.details.toLowerCase().includes("feature toggled misconfigured")||R.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(Z){if(Object.values(Z).some((y)=>!y.optional))throw new pY(new R0("non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.",{details:"non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`."}))}if(G&&M.length>1)throw new dY(new R0("`forceAtomic` is not supported on fallback to `eth_sendTransaction`.",{details:"`forceAtomic` is not supported on fallback to `eth_sendTransaction`."}));let N=[];for(let h of M){let y=OQ($,{account:H,chain:X,data:h.data,to:h.to,value:h.value?X9(h.value):void 0});if(N.push(y),Y>0)await new Promise((k)=>setTimeout(k,Y))}let A=await Promise.allSettled(N);if(A.every((h)=>h.status==="rejected"))throw A[0].reason;let E=A.map((h)=>{if(h.status==="fulfilled")return h.value;return VK});return{id:v$([...E,V0(X.id,{size:32}),GK])}}throw jQ(j,{...J,account:H,chain:J.chain})}}async function o7($,J){async function Q(Z){if(Z.endsWith(GK.slice(2))){let j=M8(qK(Z,-64,-32)),R=qK(Z,0,-64).slice(2).match(/.{1,64}/g),N=await Promise.all(R.map((E)=>VK.slice(2)!==E?$.request({method:"eth_getTransactionReceipt",params:[`0x${E}`]},{dedupe:!0}):void 0)),A=(()=>{if(N.some((E)=>E===null))return 100;if(N.every((E)=>E?.status==="0x1"))return 200;if(N.every((E)=>E?.status==="0x0"))return 500;return 600})();return{atomic:!1,chainId:W$(j),receipts:N.filter(Boolean),status:A,version:"2.0.0"}}return $.request({method:"wallet_getCallsStatus",params:[Z]})}let{atomic:X=!1,chainId:W,receipts:Y,version:G="2.0.0",...V}=await Q(J.id),[q,H]=(()=>{let Z=V.status;if(Z>=100&&Z<200)return["pending",Z];if(Z>=200&&Z<300)return["success",Z];if(Z>=300&&Z<700)return["failure",Z];if(Z==="CONFIRMED")return["success",200];if(Z==="PENDING")return["pending",100];return[void 0,Z]})();return{...V,atomic:X,chainId:W?W$(W):void 0,receipts:Y?.map((Z)=>({...Z,blockNumber:X9(Z.blockNumber),gasUsed:X9(Z.gasUsed),status:YK[Z.status]}))??[],statusCode:H,status:q,version:G}}async function s7($,J){let{id:Q,pollingInterval:X=$.pollingInterval,status:W=({statusCode:A})=>A===200||A>=300,retryCount:Y=4,retryDelay:G=({count:A})=>~~(1<<A)*200,timeout:V=60000,throwOnFailure:q=!1}=J,H=b9(["waitForCallsStatus",$.uid,Q]),{promise:Z,resolve:M,reject:j}=n7(),R,N=i$(H,{resolve:M,reject:j},(A)=>{let E=gJ(async()=>{let h=(y)=>{clearTimeout(R),E(),y(),N()};try{let y=await oX(async()=>{let k=await X0($,o7,"getCallsStatus")({id:Q});if(q&&k.status==="failure")throw new WK(k);return k},{retryCount:Y,delay:G});if(!W(y))return;h(()=>A.resolve(y))}catch(y){h(()=>A.reject(y))}},{interval:X,emitOnBegin:!0});return E});return R=V?setTimeout(()=>{N(),clearTimeout(R),j(new cj({id:Q}))},V):void 0,await Z}class cj extends R0{constructor({id:$}){super(`Timed out while waiting for call bundle with id "${$}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}var r7=256,t7;function e7($=11){if(!t7||r7+$>512){t7="",r7=0;for(let J=0;J<256;J++)t7+=(256+Math.random()*256|0).toString(16).substring(1)}return t7.substring(r7,r7+++$)}function $V($){let{batch:J,chain:Q,ccipRead:X,dataSuffix:W,key:Y="base",name:G="Base Client",type:V="base"}=$,q=$.experimental_blockTag??(typeof Q?.experimental_preconfirmationTime==="number"?"pending":void 0),H=Q?.blockTime??12000,Z=Math.min(Math.max(Math.floor(H/2),500),4000),M=$.pollingInterval??Z,j=$.cacheTime??M,R=$.account?i0($.account):void 0,{config:N,request:A,value:E}=$.transport({account:R,chain:Q,pollingInterval:M}),h={...N,...E},y={account:R,batch:J,cacheTime:j,ccipRead:X,chain:Q,dataSuffix:W,key:Y,name:G,pollingInterval:M,request:A,transport:h,type:V,uid:e7(),...q?{experimental_blockTag:q}:{}};function k(v){return(f)=>{let d=f(v);for(let o in y)delete d[o];let c={...v,...d};return Object.assign(c,{extend:k(c)})}}return Object.assign(y,{extend:k(y)})}function P5($){if(!($ instanceof R0))return!1;let J=$.walk((Q)=>Q instanceof hY);if(!(J instanceof hY))return!1;if(J.data?.errorName==="HttpError")return!0;if(J.data?.errorName==="ResolverError")return!0;if(J.data?.errorName==="ResolverNotContract")return!0;if(J.data?.errorName==="ResolverNotFound")return!0;if(J.data?.errorName==="ReverseAddressMismatch")return!0;if(J.data?.errorName==="UnsupportedResolverProfile")return!0;return!1}function JV($){if($.length!==66)return null;if($.indexOf("[")!==0)return null;if($.indexOf("]")!==65)return null;let J=`0x${$.slice(1,65)}`;if(!$Q(J))return null;return J}function uY($){let J=new Uint8Array(32).fill(0);if(!$)return Y$(J);let Q=$.split(".");for(let X=Q.length-1;X>=0;X-=1){let W=JV(Q[X]),Y=W?bJ(W):l9(LX(Q[X]),"bytes");J=l9(v$([J,Y]),"bytes")}return Y$(J)}function ij($){return`[${$.slice(2)}]`}function aj($){let J=new Uint8Array(32).fill(0);if(!$)return Y$(J);return JV($)||l9(LX($))}function R5($){let J=$.replace(/^\.|\.$/gm,"");if(J.length===0)return new Uint8Array(1);let Q=new Uint8Array(LX(J).byteLength+2),X=0,W=J.split(".");for(let Y=0;Y<W.length;Y++){let G=LX(W[Y]);if(G.byteLength>255)G=LX(ij(aj(W[Y])));Q[X]=G.length,Q.set(G,X+1),X+=G.length+1}if(Q.byteLength!==X+1)return Q.slice(0,X+1);return Q}async function oj($,J){let{blockNumber:Q,blockTag:X,coinType:W,name:Y,gatewayUrls:G,strict:V}=J,{chain:q}=$,H=(()=>{if(J.universalResolverAddress)return J.universalResolverAddress;if(!q)throw Error("client chain not configured. universalResolverAddress is required.");return NQ({blockNumber:Q,chain:q,contract:"ensUniversalResolver"})})(),Z=q?.ensTlds;if(Z&&!Z.some((j)=>Y.endsWith(j)))return null;let M=(()=>{if(W!=null)return[uY(Y),BigInt(W)];return[uY(Y)]})();try{let j=I9({abi:KK,functionName:"addr",args:M}),R={address:H,abi:QV,functionName:"resolveWithGateways",args:[p0(R5(Y)),j,G??[O5]],blockNumber:Q,blockTag:X},A=await X0($,P$,"readContract")(R);if(A[0]==="0x")return null;let E=HJ({abi:KK,args:M,functionName:"addr",data:A[0]});if(E==="0x")return null;if(M8(E)==="0x00")return null;return E}catch(j){if(V)throw j;if(P5(j))return null;throw j}}class HK extends R0{constructor({data:$}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify($)}`],name:"EnsAvatarInvalidMetadataError"})}}class nX extends R0{constructor({reason:$}){super(`ENS NFT avatar URI is invalid. ${$}`,{name:"EnsAvatarInvalidNftUriError"})}}class cY extends R0{constructor({uri:$}){super(`Unable to resolve ENS avatar URI "${$}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class DK extends R0{constructor({namespace:$}){super(`ENS NFT avatar namespace "${$}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}var Nx=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,_x=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,Fx=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,Sx=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function Bx($){try{let J=await fetch($,{method:"HEAD"});if(J.status===200)return J.headers.get("content-type")?.startsWith("image/");return!1}catch(J){if(typeof J==="object"&&typeof J.response<"u")return!1;if(!Object.hasOwn(globalThis,"Image"))return!1;return new Promise((Q)=>{let X=new Image;X.onload=()=>{Q(!0)},X.onerror=()=>{Q(!1)},X.src=$})}}function nj($,J){if(!$)return J;if($.endsWith("/"))return $.slice(0,-1);return $}function UK({uri:$,gatewayUrls:J}){let Q=Fx.test($);if(Q)return{uri:$,isOnChain:!0,isEncoded:Q};let X=nj(J?.ipfs,"https://ipfs.io"),W=nj(J?.arweave,"https://arweave.net"),Y=$.match(Nx),{protocol:G,subpath:V,target:q,subtarget:H=""}=Y?.groups||{},Z=G==="ipns:/"||V==="ipns/",M=G==="ipfs:/"||V==="ipfs/"||_x.test($);if($.startsWith("http")&&!Z&&!M){let R=$;if(J?.arweave)R=$.replace(/https:\/\/arweave.net/g,J?.arweave);return{uri:R,isOnChain:!1,isEncoded:!1}}if((Z||M)&&q)return{uri:`${X}/${Z?"ipns":"ipfs"}/${q}${H}`,isOnChain:!1,isEncoded:!1};if(G==="ar:/"&&q)return{uri:`${W}/${q}${H||""}`,isOnChain:!1,isEncoded:!1};let j=$.replace(Sx,"");if(j.startsWith("<svg"))j=`data:image/svg+xml;base64,${btoa(j)}`;if(j.startsWith("data:")||j.startsWith("{"))return{uri:j,isOnChain:!0,isEncoded:!1};throw new cY({uri:$})}function ZK($){if(typeof $!=="object"||!("image"in $)&&!("image_url"in $)&&!("image_data"in $))throw new HK({data:$});return $.image||$.image_url||$.image_data}async function sj({gatewayUrls:$,uri:J}){try{let Q=await fetch(J).then((W)=>W.json());return await XV({gatewayUrls:$,uri:ZK(Q)})}catch{throw new cY({uri:J})}}async function XV({gatewayUrls:$,uri:J}){let{uri:Q,isOnChain:X}=UK({uri:J,gatewayUrls:$});if(X)return Q;if(await Bx(Q))return Q;throw new cY({uri:J})}function rj($){let J=$;if(J.startsWith("did:nft:"))J=J.replace("did:nft:","").replace(/_/g,"/");let[Q,X,W]=J.split("/"),[Y,G]=Q.split(":"),[V,q]=X.split(":");if(!Y||Y.toLowerCase()!=="eip155")throw new nX({reason:"Only EIP-155 supported"});if(!G)throw new nX({reason:"Chain ID not found"});if(!q)throw new nX({reason:"Contract address not found"});if(!W)throw new nX({reason:"Token ID not found"});if(!V)throw new nX({reason:"ERC namespace not found"});return{chainID:Number.parseInt(G,10),namespace:V.toLowerCase(),contractAddress:q,tokenID:W}}async function tj($,{nft:J}){if(J.namespace==="erc721")return P$($,{address:J.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(J.tokenID)]});if(J.namespace==="erc1155")return P$($,{address:J.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(J.tokenID)]});throw new DK({namespace:J.namespace})}async function ej($,{gatewayUrls:J,record:Q}){if(/eip155:/i.test(Q))return Cx($,{gatewayUrls:J,record:Q});return XV({uri:Q,gatewayUrls:J})}async function Cx($,{gatewayUrls:J,record:Q}){let X=rj(Q),W=await tj($,{nft:X}),{uri:Y,isOnChain:G,isEncoded:V}=UK({uri:W,gatewayUrls:J});if(G&&(Y.includes("data:application/json;base64,")||Y.startsWith("{"))){let H=V?atob(Y.replace("data:application/json;base64,","")):Y,Z=JSON.parse(H);return XV({uri:ZK(Z),gatewayUrls:J})}let q=X.tokenID;if(X.namespace==="erc1155")q=q.replace("0x","").padStart(64,"0");return sj({gatewayUrls:J,uri:Y.replace(/(?:0x)?{id}/,q)})}async function WV($,J){let{blockNumber:Q,blockTag:X,key:W,name:Y,gatewayUrls:G,strict:V}=J,{chain:q}=$,H=(()=>{if(J.universalResolverAddress)return J.universalResolverAddress;if(!q)throw Error("client chain not configured. universalResolverAddress is required.");return NQ({blockNumber:Q,chain:q,contract:"ensUniversalResolver"})})(),Z=q?.ensTlds;if(Z&&!Z.some((M)=>Y.endsWith(M)))return null;try{let M={address:H,abi:QV,args:[p0(R5(Y)),I9({abi:zK,functionName:"text",args:[uY(Y),W]}),G??[O5]],functionName:"resolveWithGateways",blockNumber:Q,blockTag:X},R=await X0($,P$,"readContract")(M);if(R[0]==="0x")return null;let N=HJ({abi:zK,functionName:"text",data:R[0]});return N===""?null:N}catch(M){if(V)throw M;if(P5(M))return null;throw M}}async function $M($,{blockNumber:J,blockTag:Q,assetGatewayUrls:X,name:W,gatewayUrls:Y,strict:G,universalResolverAddress:V}){let q=await X0($,WV,"getEnsText")({blockNumber:J,blockTag:Q,key:"avatar",name:W,universalResolverAddress:V,gatewayUrls:Y,strict:G});if(!q)return null;try{return await ej($,{record:q,gatewayUrls:X})}catch{return null}}async function QM($,J){let{address:Q,blockNumber:X,blockTag:W,coinType:Y=60n,gatewayUrls:G,strict:V}=J,{chain:q}=$,H=(()=>{if(J.universalResolverAddress)return J.universalResolverAddress;if(!q)throw Error("client chain not configured. universalResolverAddress is required.");return NQ({blockNumber:X,chain:q,contract:"ensUniversalResolver"})})();try{let Z={address:H,abi:JM,args:[Q,Y,G??[O5]],functionName:"reverseWithGateways",blockNumber:X,blockTag:W},M=X0($,P$,"readContract"),[j]=await M(Z);return j||null}catch(Z){if(V)throw Z;if(P5(Z))return null;throw Z}}async function XM($,J){let{blockNumber:Q,blockTag:X,name:W}=J,{chain:Y}=$,G=(()=>{if(J.universalResolverAddress)return J.universalResolverAddress;if(!Y)throw Error("client chain not configured. universalResolverAddress is required.");return NQ({blockNumber:Q,chain:Y,contract:"ensUniversalResolver"})})(),V=Y?.ensTlds;if(V&&!V.some((H)=>W.endsWith(H)))throw Error(`${W} is not a valid ENS TLD (${V?.join(", ")}) for chain "${Y.name}" (id: ${Y.id}).`);let[q]=await X0($,P$,"readContract")({address:G,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[p0(R5(W))],blockNumber:Q,blockTag:X});return q}async function YV($,J){let{account:Q=$.account,blockNumber:X,blockTag:W="latest",blobs:Y,data:G,gas:V,gasPrice:q,maxFeePerBlobGas:H,maxFeePerGas:Z,maxPriorityFeePerGas:M,to:j,value:R,...N}=J,A=Q?i0(Q):void 0;try{k$(J);let h=(typeof X==="bigint"?V0(X):void 0)||W,y=$.chain?.formatters?.transactionRequest?.format,v=(y||KJ)({...MQ(N,{format:y}),account:A,blobs:Y,data:G,gas:V,gasPrice:q,maxFeePerBlobGas:H,maxFeePerGas:Z,maxPriorityFeePerGas:M,to:j,value:R},"createAccessList"),f=await $.request({method:"eth_createAccessList",params:[v,h]});return{accessList:f.accessList,gasUsed:BigInt(f.gasUsed)}}catch(E){throw WM(E,{...J,account:A,chain:$.chain})}}async function YM($){let J=DX($,{method:"eth_newBlockFilter"}),Q=await $.request({method:"eth_newBlockFilter"});return{id:Q,request:J(Q),type:"block"}}async function GV($,{address:J,args:Q,event:X,events:W,fromBlock:Y,strict:G,toBlock:V}={}){let q=W??(X?[X]:void 0),H=DX($,{method:"eth_newFilter"}),Z=[];if(q){if(Z=[q.flatMap((R)=>zQ({abi:[R],eventName:R.name,args:Q}))],X)Z=Z[0]}let M=await $.request({method:"eth_newFilter",params:[{address:J,fromBlock:typeof Y==="bigint"?V0(Y):Y,toBlock:typeof V==="bigint"?V0(V):V,...Z.length?{topics:Z}:{}}]});return{abi:q,args:Q,eventName:X?X.name:void 0,fromBlock:Y,id:M,request:H(M),strict:Boolean(G),toBlock:V,type:"event"}}async function VV($){let J=DX($,{method:"eth_newPendingTransactionFilter"}),Q=await $.request({method:"eth_newPendingTransactionFilter"});return{id:Q,request:J(Q),type:"transaction"}}async function GM($,{address:J,blockNumber:Q,blockTag:X=$.experimental_blockTag??"latest"}){if($.batch?.multicall&&$.chain?.contracts?.multicall3){let G=$.chain.contracts.multicall3.address,V=I9({abi:sX,functionName:"getEthBalance",args:[J]}),{data:q}=await X0($,wQ,"call")({to:G,data:V,blockNumber:Q,blockTag:X});return HJ({abi:sX,functionName:"getEthBalance",args:[J],data:q||"0x"})}let W=typeof Q==="bigint"?V0(Q):void 0,Y=await $.request({method:"eth_getBalance",params:[J,W||X]});return BigInt(Y)}async function VM($){let J=await $.request({method:"eth_blobBaseFee"});return BigInt(J)}async function qM($,{blockHash:J,blockNumber:Q,blockTag:X="latest"}={}){let W=Q!==void 0?V0(Q):void 0,Y;if(J)Y=await $.request({method:"eth_getBlockTransactionCountByHash",params:[J]},{dedupe:!0});else Y=await $.request({method:"eth_getBlockTransactionCountByNumber",params:[W||X]},{dedupe:Boolean(W)});return W$(Y)}async function iY($,{address:J,blockNumber:Q,blockTag:X="latest"}){let W=Q!==void 0?V0(Q):void 0,Y=await $.request({method:"eth_getCode",params:[J,W||X]},{dedupe:Boolean(W)});if(Y==="0x")return;return Y}class jK extends R0{constructor({address:$}){super(`No EIP-712 domain found on contract "${$}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${$}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}async function KM($,J){let{address:Q,factory:X,factoryData:W}=J;try{let[Y,G,V,q,H,Z,M]=await X0($,P$,"readContract")({abi:Ix,address:Q,functionName:"eip712Domain",factory:X,factoryData:W});return{domain:{name:G,version:V,chainId:Number(q),verifyingContract:H,salt:Z},extensions:M,fields:Y}}catch(Y){let G=Y;if(G.name==="ContractFunctionExecutionError"&&G.cause.name==="ContractFunctionZeroDataError")throw new jK({address:Q});throw G}}var Ix=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];function HM($){return{baseFeePerGas:$.baseFeePerGas.map((J)=>BigInt(J)),gasUsedRatio:$.gasUsedRatio,oldestBlock:BigInt($.oldestBlock),reward:$.reward?.map((J)=>J.map((Q)=>BigInt(Q)))}}async function DM($,{blockCount:J,blockNumber:Q,blockTag:X="latest",rewardPercentiles:W}){let Y=typeof Q==="bigint"?V0(Q):void 0,G=await $.request({method:"eth_feeHistory",params:[V0(J),Y||X,W]},{dedupe:Boolean(Y)});return HM(G)}async function UM($,{filter:J}){let Q=J.strict??!1,W=(await J.request({method:"eth_getFilterLogs",params:[J.id]})).map((Y)=>T$(Y));if(!J.abi)return W;return L5({abi:J.abi,logs:W,strict:Q})}function jM($){let{authorizationList:J}=$;if(J)for(let Q of J){let{chainId:X}=Q,W=Q.address;if(!L$(W))throw new S$({address:W});if(X<0)throw new rX({chainId:X})}HV($)}function MM($){let{blobVersionedHashes:J}=$;if(J){if(J.length===0)throw new gY;for(let Q of J){let X=LJ(Q),W=W$(ZM(Q,0,1));if(X!==32)throw new t1({hash:Q,size:X});if(W!==l7)throw new e1({hash:Q,version:W})}}HV($)}function HV($){let{chainId:J,maxPriorityFeePerGas:Q,maxFeePerGas:X,to:W}=$;if(J<=0)throw new rX({chainId:J});if(W&&!L$(W))throw new S$({address:W});if(X&&X>KV)throw new qV({maxFeePerGas:X});if(Q&&X&&Q>X)throw new zM({maxFeePerGas:X,maxPriorityFeePerGas:Q})}function LM($){let{chainId:J,maxPriorityFeePerGas:Q,gasPrice:X,maxFeePerGas:W,to:Y}=$;if(J<=0)throw new rX({chainId:J});if(Y&&!L$(Y))throw new S$({address:Y});if(Q||W)throw new R0("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(X&&X>KV)throw new qV({maxFeePerGas:X})}function wM($){let{chainId:J,maxPriorityFeePerGas:Q,gasPrice:X,maxFeePerGas:W,to:Y}=$;if(Y&&!L$(Y))throw new S$({address:Y});if(typeof J<"u"&&J<=0)throw new rX({chainId:J});if(Q||W)throw new R0("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(X&&X>KV)throw new qV({maxFeePerGas:X})}function aY($){if(!$||$.length===0)return[];let J=[];for(let Q=0;Q<$.length;Q++){let{address:X,storageKeys:W}=$[Q];for(let Y=0;Y<W.length;Y++)if(W[Y].length-2!==64)throw new PM({storageKey:W[Y]});if(!L$(X,{strict:!1}))throw new S$({address:X});J.push([X,W])}return J}function N5($,J){let Q=d7($);if(Q==="eip1559")return Ax($,J);if(Q==="eip2930")return Ex($,J);if(Q==="eip4844")return Tx($,J);if(Q==="eip7702")return kx($,J);return hx($,J)}function kx($,J){let{authorizationList:Q,chainId:X,gas:W,nonce:Y,to:G,value:V,maxFeePerGas:q,maxPriorityFeePerGas:H,accessList:Z,data:M}=$;jM($);let j=aY(Z),R=OM(Q);return PJ(["0x04",wJ([V0(X),Y?V0(Y):"0x",H?V0(H):"0x",q?V0(q):"0x",W?V0(W):"0x",G??"0x",V?V0(V):"0x",M??"0x",j,R,..._5($,J)])])}function Tx($,J){let{chainId:Q,gas:X,nonce:W,to:Y,value:G,maxFeePerBlobGas:V,maxFeePerGas:q,maxPriorityFeePerGas:H,accessList:Z,data:M}=$;MM($);let{blobVersionedHashes:j,sidecars:R}=$;if($.blobs&&(typeof j>"u"||typeof R>"u")){let k=typeof $.blobs[0]==="string"?$.blobs:$.blobs.map((d)=>Y$(d)),v=$.kzg,f=U5({blobs:k,kzg:v});if(typeof j>"u")j=f7({commitments:f});if(typeof R>"u"){let d=Z5({blobs:k,commitments:f,kzg:v});R=p7({blobs:k,commitments:f,proofs:d})}}let N=aY(Z),A=[V0(Q),W?V0(W):"0x",H?V0(H):"0x",q?V0(q):"0x",X?V0(X):"0x",Y??"0x",G?V0(G):"0x",M??"0x",N,V?V0(V):"0x",j??[],..._5($,J)],E=[],h=[],y=[];if(R)for(let k=0;k<R.length;k++){let{blob:v,commitment:f,proof:d}=R[k];E.push(v),h.push(f),y.push(d)}return PJ(["0x03",R?wJ([A,E,h,y]):wJ(A)])}function Ax($,J){let{chainId:Q,gas:X,nonce:W,to:Y,value:G,maxFeePerGas:V,maxPriorityFeePerGas:q,accessList:H,data:Z}=$;HV($);let M=aY(H),j=[V0(Q),W?V0(W):"0x",q?V0(q):"0x",V?V0(V):"0x",X?V0(X):"0x",Y??"0x",G?V0(G):"0x",Z??"0x",M,..._5($,J)];return PJ(["0x02",wJ(j)])}function Ex($,J){let{chainId:Q,gas:X,data:W,nonce:Y,to:G,value:V,accessList:q,gasPrice:H}=$;LM($);let Z=aY(q),M=[V0(Q),Y?V0(Y):"0x",H?V0(H):"0x",X?V0(X):"0x",G??"0x",V?V0(V):"0x",W??"0x",Z,..._5($,J)];return PJ(["0x01",wJ(M)])}function hx($,J){let{chainId:Q=0,gas:X,data:W,nonce:Y,to:G,value:V,gasPrice:q}=$;wM($);let H=[Y?V0(Y):"0x",q?V0(q):"0x",X?V0(X):"0x",G??"0x",V?V0(V):"0x",W??"0x"];if(J){let Z=(()=>{if(J.v>=35n){if((J.v-35n)/2n>0)return J.v;return 27n+(J.v===35n?0n:1n)}if(Q>0)return BigInt(Q*2)+BigInt(35n+J.v-27n);let R=27n+(J.v===27n?0n:1n);if(J.v!==R)throw new RM({v:J.v});return R})(),M=M8(J.r),j=M8(J.s);H=[...H,V0(Z),M==="0x00"?"0x":M,j==="0x00"?"0x":j]}else if(Q>0)H=[...H,V0(Q),"0x","0x"];return wJ(H)}function _5($,J){let Q=J??$,{v:X,yParity:W}=Q;if(typeof Q.r>"u")return[];if(typeof Q.s>"u")return[];if(typeof X>"u"&&typeof W>"u")return[];let Y=M8(Q.r),G=M8(Q.s);return[(()=>{if(typeof W==="number")return W?V0(1):"0x";if(X===0n)return"0x";if(X===1n)return V0(1);return X===27n?"0x":V0(1)})(),Y==="0x00"?"0x":Y,G==="0x00"?"0x":G]}function OM($){if(!$||$.length===0)return[];let J=[];for(let Q of $){let{chainId:X,nonce:W,...Y}=Q,G=Q.address;J.push([X?p0(X):"0x",G,W?p0(W):"0x",..._5({},Y)])}return J}async function NM({address:$,authorization:J,signature:Q}){return LQ(QQ($),await UX({authorization:J,signature:Q}))}var DV=new ZX(8192);function _M($,{enabled:J=!0,id:Q}){if(!J||!Q)return $();if(DV.get(Q))return DV.get(Q);let X=$().finally(()=>DV.delete(Q));return DV.set(Q,X),X}function SM($,J={}){return async(Q,X={})=>{let{dedupe:W=!1,methods:Y,retryDelay:G=150,retryCount:V=3,uid:q}={...J,...X},{method:H}=Q;if(Y?.exclude?.includes(H))throw new oY(Error("method not supported"),{method:H});if(Y?.include&&!Y.include.includes(H))throw new oY(Error("method not supported"),{method:H});let Z=W?L8(`${q}.${b9(Q)}`):void 0;return _M(()=>oX(async()=>{try{return await $(Q)}catch(M){let j=M;switch(j.code){case MK.code:throw new MK(j);case LK.code:throw new LK(j);case wK.code:throw new wK(j,{method:Q.method});case PK.code:throw new PK(j);case Y5.code:throw new Y5(j);case Z8.code:throw new Z8(j);case RK.code:throw new RK(j);case OK.code:throw new OK(j);case NK.code:throw new NK(j);case oY.code:throw new oY(j,{method:Q.method});case ZV.code:throw new ZV(j);case _K.code:throw new _K(j);case UV.code:throw new UV(j);case FK.code:throw new FK(j);case SK.code:throw new SK(j);case BK.code:throw new BK(j);case CK.code:throw new CK(j);case IK.code:throw new IK(j);case pY.code:throw new pY(j);case kK.code:throw new kK(j);case TK.code:throw new TK(j);case AK.code:throw new AK(j);case EK.code:throw new EK(j);case hK.code:throw new hK(j);case dY.code:throw new dY(j);case 5000:throw new UV(j);case xK.code:throw new xK(j);default:if(M instanceof R0)throw M;throw new FM(j)}}},{delay:({count:M,error:j})=>{if(j&&j instanceof tX){let R=j?.headers?.get("Retry-After");if(R?.match(/\d/))return Number.parseInt(R,10)*1000}return~~(1<<M)*G},retryCount:V,shouldRetry:({error:M})=>xx(M)}),{enabled:W,id:Z})}}function xx($){if("code"in $&&typeof $.code==="number"){if($.code===-1)return!0;if($.code===ZV.code)return!0;if($.code===Y5.code)return!0;return!1}if($ instanceof tX&&$.status){if($.status===403)return!0;if($.status===408)return!0;if($.status===413)return!0;if($.status===429)return!0;if($.status===500)return!0;if($.status===502)return!0;if($.status===503)return!0;if($.status===504)return!0;return!1}return!0}function L9($){let J={formatters:void 0,fees:void 0,serializers:void 0,...$};function Q(X){return(W)=>{let Y=typeof W==="function"?W(X):W,G={...X,...Y};return Object.assign(G,{extend:Q(G)})}}return Object.assign(J,{extend:Q(J)})}function BM($,{errorInstance:J=Error("timed out"),timeout:Q,signal:X}){return new Promise((W,Y)=>{(async()=>{let G;try{let V=new AbortController;if(Q>0)G=setTimeout(()=>{if(X)V.abort();else Y(J)},Q);W(await $({signal:V?.signal||null}))}catch(V){if(V?.name==="AbortError")Y(J);Y(V)}finally{clearTimeout(G)}})()})}function vx(){return{current:0,take(){return this.current++},reset(){this.current=0}}}var vK=vx();function CM($,J={}){let{url:Q,headers:X}=bx($);return{async request(W){let{body:Y,fetchFn:G=J.fetchFn??fetch,onRequest:V=J.onRequest,onResponse:q=J.onResponse,timeout:H=J.timeout??1e4}=W,Z={...J.fetchOptions??{},...W.fetchOptions??{}},{headers:M,method:j,signal:R}=Z;try{let N=await BM(async({signal:E})=>{let h={...Z,body:Array.isArray(Y)?b9(Y.map((f)=>({jsonrpc:"2.0",id:f.id??vK.take(),...f}))):b9({jsonrpc:"2.0",id:Y.id??vK.take(),...Y}),headers:{...X,"Content-Type":"application/json",...M},method:j||"POST",signal:R||(H>0?E:null)},y=new Request(Q,h),k=await V?.(y,h)??{...h,url:Q};return await G(k.url??Q,k)},{errorInstance:new bK({body:Y,url:Q}),timeout:H,signal:!0});if(q)await q(N);let A;if(N.headers.get("Content-Type")?.startsWith("application/json"))A=await N.json();else{A=await N.text();try{A=JSON.parse(A||"{}")}catch(E){if(N.ok)throw E;A={error:A}}}if(!N.ok)throw new tX({body:Y,details:b9(A.error)||N.statusText,headers:N.headers,status:N.status,url:Q});return A}catch(N){if(N instanceof tX)throw N;if(N instanceof bK)throw N;throw new tX({body:Y,cause:N,url:Q})}}}}function bx($){try{let J=new URL($),Q=(()=>{if(J.username){let X=`${decodeURIComponent(J.username)}:${decodeURIComponent(J.password)}`;return J.username="",J.password="",{url:J.toString(),headers:{Authorization:`Basic ${btoa(X)}`}}}return})();return{url:J.toString(),...Q}}catch{return{url:$}}}var IM=`\x19Ethereum Signed Message:
|
|
18
|
+
`;function kM($){let J=(()=>{if(typeof $==="string")return L8($);if(typeof $.raw==="string")return $.raw;return Y$($.raw)})(),Q=L8(`${IM}${LJ(J)}`);return v$([Q,J])}function F5($,J){return l9(kM($),J)}class yK extends R0{constructor({domain:$}){super(`Invalid domain "${b9($)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class gK extends R0{constructor({primaryType:$,types:J}){super(`Invalid primary type \`${$}\` must be one of \`${JSON.stringify(Object.keys(J))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class mK extends R0{constructor({type:$}){super(`Struct type "${$}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function hM($){let{domain:J,message:Q,primaryType:X,types:W}=$,Y=(q,H)=>{let Z={...H};for(let M of q){let{name:j,type:R}=M;if(R==="address")Z[j]=Z[j].toLowerCase()}return Z},G=(()=>{if(!W.EIP712Domain)return{};if(!J)return{};return Y(W.EIP712Domain,J)})(),V=(()=>{if(X==="EIP712Domain")return;return Y(W[X],Q)})();return b9({domain:G,message:V,primaryType:X,types:W})}function zV($){let{domain:J,message:Q,primaryType:X,types:W}=$,Y=(G,V)=>{for(let q of G){let{name:H,type:Z}=q,M=V[H],j=Z.match(EM);if(j&&(typeof M==="number"||typeof M==="bigint")){let[A,E,h]=j;V0(M,{signed:E==="int",size:Number.parseInt(h,10)/8})}if(Z==="address"&&typeof M==="string"&&!L$(M))throw new S$({address:M});let R=Z.match(AM);if(R){let[A,E]=R;if(E&&LJ(M)!==Number.parseInt(E,10))throw new TM({expectedSize:Number.parseInt(E,10),givenSize:LJ(M)})}let N=W[Z];if(N)yx(Z),Y(N,M)}};if(W.EIP712Domain&&J){if(typeof J!=="object")throw new yK({domain:J});Y(W.EIP712Domain,J)}if(X!=="EIP712Domain")if(W[X])Y(W[X],Q);else throw new gK({primaryType:X,types:W})}function jV({domain:$}){return[typeof $?.name==="string"&&{name:"name",type:"string"},$?.version&&{name:"version",type:"string"},(typeof $?.chainId==="number"||typeof $?.chainId==="bigint")&&{name:"chainId",type:"uint256"},$?.verifyingContract&&{name:"verifyingContract",type:"address"},$?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}function yx($){if($==="address"||$==="bool"||$==="string"||$.startsWith("bytes")||$.startsWith("uint")||$.startsWith("int"))throw new mK({type:$})}function MV($){let{domain:J={},message:Q,primaryType:X}=$,W={EIP712Domain:jV({domain:J}),...$.types};zV({domain:J,message:Q,primaryType:X,types:W});let Y=["0x1901"];if(J)Y.push(gx({domain:J,types:W}));if(X!=="EIP712Domain")Y.push(xM({data:Q,primaryType:X,types:W}));return l9(v$(Y))}function gx({domain:$,types:J}){return xM({data:$,primaryType:"EIP712Domain",types:J})}function xM({data:$,primaryType:J,types:Q}){let X=vM({data:$,primaryType:J,types:Q});return l9(X)}function vM({data:$,primaryType:J,types:Q}){let X=[{type:"bytes32"}],W=[mx({primaryType:J,types:Q})];for(let Y of Q[J]){let[G,V]=yM({types:Q,name:Y.name,type:Y.type,value:$[Y.name]});X.push(G),W.push(V)}return uX(X,W)}function mx({primaryType:$,types:J}){let Q=p0(fx({primaryType:$,types:J}));return l9(Q)}function fx({primaryType:$,types:J}){let Q="",X=bM({primaryType:$,types:J});X.delete($);let W=[$,...Array.from(X).sort()];for(let Y of W)Q+=`${Y}(${J[Y].map(({name:G,type:V})=>`${V} ${G}`).join(",")})`;return Q}function bM({primaryType:$,types:J},Q=new Set){let W=$.match(/^\w*/u)?.[0];if(Q.has(W)||J[W]===void 0)return Q;Q.add(W);for(let Y of J[W])bM({primaryType:Y.type,types:J},Q);return Q}function yM({types:$,name:J,type:Q,value:X}){if($[Q]!==void 0)return[{type:"bytes32"},l9(vM({data:X,primaryType:Q,types:$}))];if(Q==="bytes")return[{type:"bytes32"},l9(X)];if(Q==="string")return[{type:"bytes32"},l9(p0(X))];if(Q.lastIndexOf("]")===Q.length-1){let W=Q.slice(0,Q.lastIndexOf("[")),Y=X.map((G)=>yM({name:J,type:W,types:$,value:G}));return[{type:"bytes32"},l9(uX(Y.map(([G])=>G),Y.map(([,G])=>G)))]}return[{type:Q},X]}var fK="0x0000000000000000000000000000000000000000000000000000000000000000";var YG={};d1(YG,{wrap:()=>fv,validate:()=>lv,unwrap:()=>tL,suffixParameters:()=>I6,magicBytes:()=>C6,from:()=>mv,assert:()=>EV,InvalidWrappedSignatureError:()=>k6});class lK extends Map{constructor($){super();Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=$}get($){let J=super.get($);if(super.has($)&&J!==void 0)this.delete($),super.set($,J);return J}set($,J){if(super.set($,J),this.maxSize&&this.size>this.maxSize){let Q=this.keys().next().value;if(Q)this.delete(Q)}return this}}var lx={checksum:new lK(8192)},LV=lx.checksum;function eX($,J={}){let{as:Q=typeof $==="string"?"Hex":"Bytes"}=J,X=_Y(gM($));if(Q==="Bytes")return X;return JJ(X)}function fM($,J={}){let{compressed:Q}=J,{prefix:X,x:W,y:Y}=$;if(Q===!1||typeof W==="bigint"&&typeof Y==="bigint"){if(X!==4)throw new dK({prefix:X,cause:new cM});return}if(Q===!0||typeof W==="bigint"&&typeof Y>"u"){if(X!==3&&X!==2)throw new dK({prefix:X,cause:new uM});return}throw new dM({publicKey:$})}function lM($){let J=(()=>{if(sY($))return pM($);if(mM($))return ux($);let{prefix:Q,x:X,y:W}=$;if(typeof X==="bigint"&&typeof W==="bigint")return{prefix:Q??4,x:X,y:W};return{prefix:Q,x:X}})();return fM(J),J}function ux($){return pM(JJ($))}function pM($){if($.length!==132&&$.length!==130&&$.length!==68)throw new iM({publicKey:$});if($.length===130){let X=BigInt(t9($,0,32)),W=BigInt(t9($,32,64));return{prefix:4,x:X,y:W}}if($.length===132){let X=Number(t9($,0,1)),W=BigInt(t9($,1,33)),Y=BigInt(t9($,33,65));return{prefix:X,x:W,y:Y}}let J=Number(t9($,0,1)),Q=BigInt(t9($,1,33));return{prefix:J,x:Q}}function uK($,J={}){fM($);let{prefix:Q,x:X,y:W}=$,{includePrefix:Y=!0}=J;return G$(Y?R$(Q,{size:1}):"0x",R$(X,{size:32}),typeof W==="bigint"?R$(W,{size:32}):"0x")}class dM extends r0{constructor({publicKey:$}){super(`Value \`${wV($)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}class dK extends r0{constructor({prefix:$,cause:J}){super(`Prefix "${$}" is invalid.`,{cause:J});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}class uM extends r0{constructor(){super("Prefix must be 2 or 3 for compressed public keys.");Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}class cM extends r0{constructor(){super("Prefix must be 4 for uncompressed public keys.");Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}class iM extends r0{constructor({publicKey:$}){super(`Value \`${$}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${b$(S5($))} bytes.`]});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}}var cx=/^0x[a-fA-F0-9]{40}$/;function $W($,J={}){let{strict:Q=!0}=J;if(!cx.test($))throw new cK({address:$,cause:new sM});if(Q){if($.toLowerCase()===$)return;if(PV($)!==$)throw new cK({address:$,cause:new rM})}}function PV($){if(LV.has($))return LV.get($);$W($,{strict:!1});let J=$.substring(2).toLowerCase(),Q=eX(oM(J),{as:"Bytes"}),X=J.split("");for(let Y=0;Y<40;Y+=2){if(Q[Y>>1]>>4>=8&&X[Y])X[Y]=X[Y].toUpperCase();if((Q[Y>>1]&15)>=8&&X[Y+1])X[Y+1]=X[Y+1].toUpperCase()}let W=`0x${X.join("")}`;return LV.set($,W),W}function ix($,J={}){let{checksum:Q=!1}=J;if($W($),Q)return PV($);return $}function nM($,J={}){let Q=eX(`0x${uK($).slice(4)}`).substring(26);return ix(`0x${Q}`,J)}function RV($,J={}){let{strict:Q=!0}=J??{};try{return $W($,{strict:Q}),!0}catch{return!1}}class cK extends r0{constructor({address:$,cause:J}){super(`Address "${$}" is invalid.`,{cause:J});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class sM extends r0{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value.");Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class rM extends r0{constructor(){super("Address does not match its checksum counterpart.");Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}var tM=/^(.*)\[([0-9]*)\]$/,eM=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,NV=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,iC9=2n**(8n-1n)-1n,aC9=2n**(16n-1n)-1n,oC9=2n**(24n-1n)-1n,nC9=2n**(32n-1n)-1n,sC9=2n**(40n-1n)-1n,rC9=2n**(48n-1n)-1n,tC9=2n**(56n-1n)-1n,eC9=2n**(64n-1n)-1n,$I9=2n**(72n-1n)-1n,JI9=2n**(80n-1n)-1n,QI9=2n**(88n-1n)-1n,XI9=2n**(96n-1n)-1n,WI9=2n**(104n-1n)-1n,YI9=2n**(112n-1n)-1n,GI9=2n**(120n-1n)-1n,VI9=2n**(128n-1n)-1n,qI9=2n**(136n-1n)-1n,KI9=2n**(144n-1n)-1n,HI9=2n**(152n-1n)-1n,DI9=2n**(160n-1n)-1n,UI9=2n**(168n-1n)-1n,ZI9=2n**(176n-1n)-1n,zI9=2n**(184n-1n)-1n,jI9=2n**(192n-1n)-1n,MI9=2n**(200n-1n)-1n,LI9=2n**(208n-1n)-1n,wI9=2n**(216n-1n)-1n,PI9=2n**(224n-1n)-1n,RI9=2n**(232n-1n)-1n,OI9=2n**(240n-1n)-1n,NI9=2n**(248n-1n)-1n,_I9=2n**(256n-1n)-1n,FI9=-(2n**(8n-1n)),SI9=-(2n**(16n-1n)),BI9=-(2n**(24n-1n)),CI9=-(2n**(32n-1n)),II9=-(2n**(40n-1n)),kI9=-(2n**(48n-1n)),TI9=-(2n**(56n-1n)),AI9=-(2n**(64n-1n)),EI9=-(2n**(72n-1n)),hI9=-(2n**(80n-1n)),xI9=-(2n**(88n-1n)),vI9=-(2n**(96n-1n)),bI9=-(2n**(104n-1n)),yI9=-(2n**(112n-1n)),gI9=-(2n**(120n-1n)),mI9=-(2n**(128n-1n)),fI9=-(2n**(136n-1n)),lI9=-(2n**(144n-1n)),pI9=-(2n**(152n-1n)),dI9=-(2n**(160n-1n)),uI9=-(2n**(168n-1n)),cI9=-(2n**(176n-1n)),iI9=-(2n**(184n-1n)),aI9=-(2n**(192n-1n)),oI9=-(2n**(200n-1n)),nI9=-(2n**(208n-1n)),sI9=-(2n**(216n-1n)),rI9=-(2n**(224n-1n)),tI9=-(2n**(232n-1n)),eI9=-(2n**(240n-1n)),$k9=-(2n**(248n-1n)),Jk9=-(2n**(256n-1n)),Qk9=2n**8n-1n,Xk9=2n**16n-1n,Wk9=2n**24n-1n,Yk9=2n**32n-1n,Gk9=2n**40n-1n,Vk9=2n**48n-1n,qk9=2n**56n-1n,Kk9=2n**64n-1n,Hk9=2n**72n-1n,Dk9=2n**80n-1n,Uk9=2n**88n-1n,Zk9=2n**96n-1n,zk9=2n**104n-1n,jk9=2n**112n-1n,Mk9=2n**120n-1n,Lk9=2n**128n-1n,wk9=2n**136n-1n,Pk9=2n**144n-1n,Rk9=2n**152n-1n,Ok9=2n**160n-1n,Nk9=2n**168n-1n,_k9=2n**176n-1n,Fk9=2n**184n-1n,Sk9=2n**192n-1n,Bk9=2n**200n-1n,Ck9=2n**208n-1n,Ik9=2n**216n-1n,kk9=2n**224n-1n,Tk9=2n**232n-1n,Ak9=2n**240n-1n,Ek9=2n**248n-1n,iK=2n**256n-1n;function JW($,J,Q){let{checksumAddress:X,staticPosition:W}=Q,Y=nK(J.type);if(Y){let[G,V]=Y;return ox($,{...J,type:V},{checksumAddress:X,length:G,staticPosition:W})}if(J.type==="tuple")return tx($,J,{checksumAddress:X,staticPosition:W});if(J.type==="address")return ax($,{checksum:X});if(J.type==="bool")return nx($);if(J.type.startsWith("bytes"))return sx($,J,{staticPosition:W});if(J.type.startsWith("uint")||J.type.startsWith("int"))return rx($,J);if(J.type==="string")return ex($,{staticPosition:W});throw new eY(J.type)}var JL=32,aK=32;function ax($,J={}){let{checksum:Q=!1}=J,X=$.readBytes(32);return[((Y)=>Q?PV(Y):Y)(JJ(QL(X,-20))),32]}function ox($,J,Q){let{checksumAddress:X,length:W,staticPosition:Y}=Q;if(!W){let q=FQ($.readBytes(aK)),H=Y+q,Z=H+JL;$.setPosition(H);let M=FQ($.readBytes(JL)),j=tY(J),R=0,N=[];for(let A=0;A<M;++A){$.setPosition(Z+(j?A*32:R));let[E,h]=JW($,J,{checksumAddress:X,staticPosition:Z});R+=h,N.push(E)}return $.setPosition(Y+32),[N,32]}if(tY(J)){let q=FQ($.readBytes(aK)),H=Y+q,Z=[];for(let M=0;M<W;++M){$.setPosition(H+M*32);let[j]=JW($,J,{checksumAddress:X,staticPosition:H});Z.push(j)}return $.setPosition(Y+32),[Z,32]}let G=0,V=[];for(let q=0;q<W;++q){let[H,Z]=JW($,J,{checksumAddress:X,staticPosition:Y+G});G+=Z,V.push(H)}return[V,G]}function nx($){return[WL($.readBytes(32),{size:32}),32]}function sx($,J,{staticPosition:Q}){let[X,W]=J.type.split("bytes");if(!W){let G=FQ($.readBytes(32));$.setPosition(Q+G);let V=FQ($.readBytes(32));if(V===0)return $.setPosition(Q+32),["0x",32];let q=$.readBytes(V);return $.setPosition(Q+32),[JJ(q),32]}return[JJ($.readBytes(Number.parseInt(W,10),32)),32]}function rx($,J){let Q=J.type.startsWith("int"),X=Number.parseInt(J.type.split("int")[1]||"256",10),W=$.readBytes(32);return[X>48?XL(W,{signed:Q}):FQ(W,{signed:Q}),32]}function tx($,J,Q){let{checksumAddress:X,staticPosition:W}=Q,Y=J.components.length===0||J.components.some(({name:q})=>!q),G=Y?[]:{},V=0;if(tY(J)){let q=FQ($.readBytes(aK)),H=W+q;for(let Z=0;Z<J.components.length;++Z){let M=J.components[Z];$.setPosition(H+V);let[j,R]=JW($,M,{checksumAddress:X,staticPosition:H});V+=R,G[Y?Z:M?.name]=j}return $.setPosition(W+32),[G,32]}for(let q=0;q<J.components.length;++q){let H=J.components[q],[Z,M]=JW($,H,{checksumAddress:X,staticPosition:W});G[Y?q:H?.name]=Z,V+=M}return[G,V]}function ex($,{staticPosition:J}){let Q=FQ($.readBytes(32)),X=J+Q;$.setPosition(X);let W=FQ($.readBytes(32));if(W===0)return $.setPosition(J+32),["",32];let Y=$.readBytes(W,32),G=YL(GL(Y));return $.setPosition(J+32),[G,32]}function qL({checksumAddress:$,parameters:J,values:Q}){let X=[];for(let W=0;W<J.length;W++)X.push(oK({checksumAddress:$,parameter:J[W],value:Q[W]}));return X}function oK({checksumAddress:$=!1,parameter:J,value:Q}){let X=J,W=nK(X.type);if(W){let[Y,G]=W;return Jv(Q,{checksumAddress:$,length:Y,parameter:{...X,type:G}})}if(X.type==="tuple")return Gv(Q,{checksumAddress:$,parameter:X});if(X.type==="address")return $v(Q,{checksum:$});if(X.type==="bool")return Xv(Q);if(X.type.startsWith("uint")||X.type.startsWith("int")){let Y=X.type.startsWith("int"),[,,G="256"]=NV.exec(X.type)??[];return Wv(Q,{signed:Y,size:Number(G)})}if(X.type.startsWith("bytes"))return Qv(Q,{type:X.type});if(X.type==="string")return Yv(Q);throw new eY(X.type)}function FV($){let J=0;for(let Y=0;Y<$.length;Y++){let{dynamic:G,encoded:V}=$[Y];if(G)J+=32;else J+=b$(V)}let Q=[],X=[],W=0;for(let Y=0;Y<$.length;Y++){let{dynamic:G,encoded:V}=$[Y];if(G)Q.push(R$(J+W,{size:32})),X.push(V),W+=b$(V);else Q.push(V)}return G$(...Q,...X)}function $v($,J){let{checksum:Q=!1}=J;return $W($,{strict:Q}),{dynamic:!1,encoded:XW($.toLowerCase())}}function Jv($,J){let{checksumAddress:Q,length:X,parameter:W}=J,Y=X===null;if(!Array.isArray($))throw new rK($);if(!Y&&$.length!==X)throw new sK({expectedLength:X,givenLength:$.length,type:`${W.type}[${X}]`});let G=!1,V=[];for(let q=0;q<$.length;q++){let H=oK({checksumAddress:Q,parameter:W,value:$[q]});if(H.dynamic)G=!0;V.push(H)}if(Y||G){let q=FV(V);if(Y){let H=R$(V.length,{size:32});return{dynamic:!0,encoded:V.length>0?G$(H,q):H}}if(G)return{dynamic:!0,encoded:q}}return{dynamic:!1,encoded:G$(...V.map(({encoded:q})=>q))}}function Qv($,{type:J}){let[,Q]=J.split("bytes"),X=b$($);if(!Q){let W=$;if(X%32!==0)W=QW(W,Math.ceil(($.length-2)/2/32)*32);return{dynamic:!0,encoded:G$(XW(R$(X,{size:32})),W)}}if(X!==Number.parseInt(Q,10))throw new SV({expectedSize:Number.parseInt(Q,10),value:$});return{dynamic:!1,encoded:QW($)}}function Xv($){if(typeof $!=="boolean")throw new r0(`Invalid boolean value: "${$}" (type: ${typeof $}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:XW(_V($))}}function Wv($,{signed:J,size:Q}){if(typeof Q==="number"){let X=2n**(BigInt(Q)-(J?1n:0n))-1n,W=J?-X-1n:0n;if($>X||$<W)throw new VL({max:X.toString(),min:W.toString(),signed:J,size:Q/8,value:$.toString()})}return{dynamic:!1,encoded:R$($,{size:32,signed:J})}}function Yv($){let J=B5($),Q=Math.ceil(b$(J)/32),X=[];for(let W=0;W<Q;W++)X.push(QW(t9(J,W*32,(W+1)*32)));return{dynamic:!0,encoded:G$(QW(R$(b$(J),{size:32})),...X)}}function Gv($,J){let{checksumAddress:Q,parameter:X}=J,W=!1,Y=[];for(let G=0;G<X.components.length;G++){let V=X.components[G],q=Array.isArray($)?G:V.name,H=oK({checksumAddress:Q,parameter:V,value:$[q]});if(Y.push(H),H.dynamic)W=!0}return{dynamic:W,encoded:W?FV(Y):G$(...Y.map(({encoded:G})=>G))}}function nK($){let J=$.match(/^(.*)\[(\d+)?\]$/);return J?[J[2]?Number(J[2]):null,J[1]]:void 0}function tY($){let{type:J}=$;if(J==="string")return!0;if(J==="bytes")return!0;if(J.endsWith("[]"))return!0;if(J==="tuple")return $.components?.some(tY);let Q=nK($.type);if(Q&&tY({...$,type:Q[1]}))return!0;return!1}var qv={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new HL({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition($){if($<0||$>this.bytes.length-1)throw new KL({length:this.bytes.length,position:$})},decrementPosition($){if($<0)throw new tK({offset:$});let J=this.position-$;this.assertPosition(J),this.position=J},getReadCount($){return this.positionReadCount.get($||this.position)||0},incrementPosition($){if($<0)throw new tK({offset:$});let J=this.position+$;this.assertPosition(J),this.position=J},inspectByte($){let J=$??this.position;return this.assertPosition(J),this.bytes[J]},inspectBytes($,J){let Q=J??this.position;return this.assertPosition(Q+$-1),this.bytes.subarray(Q,Q+$)},inspectUint8($){let J=$??this.position;return this.assertPosition(J),this.bytes[J]},inspectUint16($){let J=$??this.position;return this.assertPosition(J+1),this.dataView.getUint16(J)},inspectUint24($){let J=$??this.position;return this.assertPosition(J+2),(this.dataView.getUint16(J)<<8)+this.dataView.getUint8(J+2)},inspectUint32($){let J=$??this.position;return this.assertPosition(J+3),this.dataView.getUint32(J)},pushByte($){this.assertPosition(this.position),this.bytes[this.position]=$,this.position++},pushBytes($){this.assertPosition(this.position+$.length-1),this.bytes.set($,this.position),this.position+=$.length},pushUint8($){this.assertPosition(this.position),this.bytes[this.position]=$,this.position++},pushUint16($){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,$),this.position+=2},pushUint24($){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,$>>8),this.dataView.setUint8(this.position+2,$&255),this.position+=3},pushUint32($){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,$),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let $=this.inspectByte();return this.position++,$},readBytes($,J){this.assertReadLimit(),this._touch();let Q=this.inspectBytes($);return this.position+=J??$,Q},readUint8(){this.assertReadLimit(),this._touch();let $=this.inspectUint8();return this.position+=1,$},readUint16(){this.assertReadLimit(),this._touch();let $=this.inspectUint16();return this.position+=2,$},readUint24(){this.assertReadLimit(),this._touch();let $=this.inspectUint24();return this.position+=3,$},readUint32(){this.assertReadLimit(),this._touch();let $=this.inspectUint32();return this.position+=4,$},get remaining(){return this.bytes.length-this.position},setPosition($){let J=this.position;return this.assertPosition($),this.position=$,()=>this.position=J},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let $=this.getReadCount();if(this.positionReadCount.set(this.position,$+1),$>0)this.recursiveReadCount++}};function BV($,{recursiveReadLimit:J=8192}={}){let Q=Object.create(qv);return Q.bytes=$,Q.dataView=new DataView($.buffer,$.byteOffset,$.byteLength),Q.positionReadCount=new Map,Q.recursiveReadLimit=J,Q}class tK extends r0{constructor({offset:$}){super(`Offset \`${$}\` cannot be negative.`);Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class KL extends r0{constructor({length:$,position:J}){super(`Position \`${J}\` is out of bounds (\`0 < position < ${$}\`).`);Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}class HL extends r0{constructor({count:$,limit:J}){super(`Recursive read limit of \`${J}\` exceeded (recursive read count: \`${$}\`).`);Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}function C5($,J,Q={}){let{as:X="Array",checksumAddress:W=!1}=Q,Y=typeof J==="string"?rY(J):J,G=BV(Y);if(JG(Y)===0&&$.length>0)throw new zL;if(JG(Y)&&JG(Y)<32)throw new ZL({data:typeof J==="string"?J:JJ(J),parameters:$,size:JG(Y)});let V=0,q=X==="Array"?[]:{};for(let H=0;H<$.length;++H){let Z=$[H];G.setPosition(V);let[M,j]=JW(G,Z,{checksumAddress:W,staticPosition:0});if(V+=j,X==="Array")q.push(M);else q[Z.name??H]=M}return q}function wX($,J,Q){let{checksumAddress:X=!1}=Q??{};if($.length!==J.length)throw new J6({expectedLength:$.length,givenLength:J.length});let W=qL({checksumAddress:X,parameters:$,values:J}),Y=FV(W);if(Y.length===0)return"0x";return Y}function $6($,J){if($.length!==J.length)throw new J6({expectedLength:$.length,givenLength:J.length});let Q=[];for(let X=0;X<$.length;X++){let W=$[X],Y=J[X];Q.push($6.encode(W,Y))}return G$(...Q)}(function($){function J(Q,X,W=!1){if(Q==="address"){let q=X;return $W(q),XW(q.toLowerCase(),W?32:0)}if(Q==="string")return B5(X);if(Q==="bytes")return X;if(Q==="bool")return XW(_V(X),W?32:1);let Y=Q.match(NV);if(Y){let[q,H,Z="256"]=Y,M=Number.parseInt(Z,10)/8;return R$(X,{size:W?32:M,signed:H==="int"})}let G=Q.match(eM);if(G){let[q,H]=G;if(Number.parseInt(H,10)!==(X.length-2)/2)throw new SV({expectedSize:Number.parseInt(H,10),value:X});return QW(X,W?32:0)}let V=Q.match(tM);if(V&&Array.isArray(X)){let[q,H]=V,Z=[];for(let M=0;M<X.length;M++)Z.push(J(H,X[M],!0));if(Z.length===0)return"0x";return G$(...Z)}throw new eY(Q)}$.encode=J})($6||($6={}));function QG($){if(Array.isArray($)&&typeof $[0]==="string")return eK($);if(typeof $==="string")return eK($);return $}class ZL extends r0{constructor({data:$,parameters:J,size:Q}){super(`Data size of ${Q} bytes is too small for given parameters.`,{metaMessages:[`Params: (${UL(J)})`,`Data: ${$} (${Q} bytes)`]});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class zL extends r0{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.');Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class sK extends r0{constructor({expectedLength:$,givenLength:J,type:Q}){super(`Array length mismatch for type \`${Q}\`. Expected: \`${$}\`. Given: \`${J}\`.`);Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class SV extends r0{constructor({expectedSize:$,value:J}){super(`Size of bytes "${J}" (bytes${b$(J)}) does not match expected size (bytes${$}).`);Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class J6 extends r0{constructor({expectedLength:$,givenLength:J}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${$}`,`Given length (values): ${J}`].join(`
|
|
19
|
+
`));Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class rK extends r0{constructor($){super(`Value \`${$}\` is not a valid array.`);Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class eY extends r0{constructor($){super(`Type \`${$}\` is not a valid ABI Type.`);Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}function Hv($,J){let{as:Q}=J,X=ML($),W=BV(new Uint8Array(X.length));if(X.encode(W),Q==="Hex")return JJ(W.bytes);return W.bytes}function jL($,J={}){let{as:Q="Hex"}=J;return Hv($,{as:Q})}function ML($){if(Array.isArray($))return Dv($.map((J)=>ML(J)));return Uv($)}function Dv($){let J=$.reduce((W,Y)=>W+Y.length,0),Q=LL(J);return{length:(()=>{if(J<=55)return 1+J;return 1+Q+J})(),encode(W){if(J<=55)W.pushByte(192+J);else if(W.pushByte(247+Q),Q===1)W.pushUint8(J);else if(Q===2)W.pushUint16(J);else if(Q===3)W.pushUint24(J);else W.pushUint32(J);for(let{encode:Y}of $)Y(W)}}}function Uv($){let J=typeof $==="string"?rY($):$,Q=LL(J.length);return{length:(()=>{if(J.length===1&&J[0]<128)return 1;if(J.length<=55)return 1+J.length;return 1+Q+J.length})(),encode(W){if(J.length===1&&J[0]<128)W.pushBytes(J);else if(J.length<=55)W.pushByte(128+J.length),W.pushBytes(J);else{if(W.pushByte(183+Q),Q===1)W.pushUint8(J.length);else if(Q===2)W.pushUint16(J.length);else if(Q===3)W.pushUint24(J.length);else W.pushUint32(J.length);W.pushBytes(J)}}}}function LL($){if($<=255)return 1;if($<=65535)return 2;if($<=16777215)return 3;if($<=4294967295)return 4;throw new r0("Length is too large.")}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var QJ=BigInt(0),o$=BigInt(1),WW=BigInt(2),zv=BigInt(3),PL=BigInt(4),RL=BigInt(5),OL=BigInt(8);function a$($,J){let Q=$%J;return Q>=QJ?Q:J+Q}function RJ($,J,Q){let X=$;while(J-- >QJ)X*=X,X%=Q;return X}function CV($,J){if($===QJ)throw Error("invert: expected non-zero number");if(J<=QJ)throw Error("invert: expected positive modulus, got "+J);let Q=a$($,J),X=J,W=QJ,Y=o$,G=o$,V=QJ;while(Q!==QJ){let H=X/Q,Z=X%Q,M=W-G*H,j=Y-V*H;X=Q,Q=Z,W=G,Y=V,G=M,V=j}if(X!==o$)throw Error("invert: does not exist");return a$(W,J)}function NL($,J){let Q=($.ORDER+o$)/PL,X=$.pow(J,Q);if(!$.eql($.sqr(X),J))throw Error("Cannot find square root");return X}function jv($,J){let Q=($.ORDER-RL)/OL,X=$.mul(J,WW),W=$.pow(X,Q),Y=$.mul(J,W),G=$.mul($.mul(Y,WW),W),V=$.mul(Y,$.sub(G,$.ONE));if(!$.eql($.sqr(V),J))throw Error("Cannot find square root");return V}function Mv($){if($<BigInt(3))throw Error("sqrt is not defined for small field");let J=$-o$,Q=0;while(J%WW===QJ)J/=WW,Q++;let X=WW,W=XG($);while(wL(W,X)===1)if(X++>1000)throw Error("Cannot find square root: probably non-prime P");if(Q===1)return NL;let Y=W.pow(X,J),G=(J+o$)/WW;return function(q,H){if(q.is0(H))return H;if(wL(q,H)!==1)throw Error("Cannot find square root");let Z=Q,M=q.mul(q.ONE,Y),j=q.pow(H,J),R=q.pow(H,G);while(!q.eql(j,q.ONE)){if(q.is0(j))return q.ZERO;let N=1,A=q.sqr(j);while(!q.eql(A,q.ONE))if(N++,A=q.sqr(A),N===Z)throw Error("Cannot find square root");let E=o$<<BigInt(Z-N-1),h=q.pow(M,E);Z=N,M=q.sqr(h),j=q.mul(j,M),R=q.mul(R,h)}return R}}function Lv($){if($%PL===zv)return NL;if($%OL===RL)return jv;return Mv($)}var wv=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function W6($){let J={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},Q=wv.reduce((X,W)=>{return X[W]="function",X},J);return GW($,Q)}function Pv($,J,Q){if(Q<QJ)throw Error("invalid exponent, negatives unsupported");if(Q===QJ)return $.ONE;if(Q===o$)return J;let X=$.ONE,W=J;while(Q>QJ){if(Q&o$)X=$.mul(X,W);W=$.sqr(W),Q>>=o$}return X}function Y6($,J,Q=!1){let X=Array(J.length).fill(Q?$.ZERO:void 0),W=J.reduce((G,V,q)=>{if($.is0(V))return G;return X[q]=G,$.mul(G,V)},$.ONE),Y=$.inv(W);return J.reduceRight((G,V,q)=>{if($.is0(V))return G;return X[q]=$.mul(G,X[q]),$.mul(G,V)},Y),X}function wL($,J){let Q=($.ORDER-o$)/WW,X=$.pow(J,Q),W=$.eql(X,$.ONE),Y=$.eql(X,$.ZERO),G=$.eql(X,$.neg($.ONE));if(!W&&!Y&&!G)throw Error("invalid Legendre symbol result");return W?1:Y?0:-1}function G6($,J){if(J!==void 0)JY(J);let Q=J!==void 0?J:$.toString(2).length,X=Math.ceil(Q/8);return{nBitLength:Q,nByteLength:X}}function XG($,J,Q=!1,X={}){if($<=QJ)throw Error("invalid field: expected ORDER > 0, got "+$);let{nBitLength:W,nByteLength:Y}=G6($,J);if(Y>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let G,V=Object.freeze({ORDER:$,isLE:Q,BITS:W,BYTES:Y,MASK:YW(W),ZERO:QJ,ONE:o$,create:(q)=>a$(q,$),isValid:(q)=>{if(typeof q!=="bigint")throw Error("invalid field element: expected bigint, got "+typeof q);return QJ<=q&&q<$},is0:(q)=>q===QJ,isOdd:(q)=>(q&o$)===o$,neg:(q)=>a$(-q,$),eql:(q,H)=>q===H,sqr:(q)=>a$(q*q,$),add:(q,H)=>a$(q+H,$),sub:(q,H)=>a$(q-H,$),mul:(q,H)=>a$(q*H,$),pow:(q,H)=>Pv(V,q,H),div:(q,H)=>a$(q*CV(H,$),$),sqrN:(q)=>q*q,addN:(q,H)=>q+H,subN:(q,H)=>q-H,mulN:(q,H)=>q*H,inv:(q)=>CV(q,$),sqrt:X.sqrt||((q)=>{if(!G)G=Lv($);return G(V,q)}),toBytes:(q)=>Q?X6(q,Y):I5(q,Y),fromBytes:(q)=>{if(q.length!==Y)throw Error("Field.fromBytes: expected "+Y+" bytes, got "+q.length);return Q?Q6(q):w8(q)},invertBatch:(q)=>Y6(V,q),cmov:(q,H,Z)=>Z?H:q});return Object.freeze(V)}function _L($){if(typeof $!=="bigint")throw Error("field order must be bigint");let J=$.toString(2).length;return Math.ceil(J/8)}function V6($){let J=_L($);return J+Math.ceil(J/2)}function FL($,J,Q=!1){let X=$.length,W=_L(J),Y=V6(J);if(X<16||X<Y||X>1024)throw Error("expected "+Y+"-1024 bytes of input, got "+X);let G=Q?Q6($):w8($),V=a$(G,J-o$)+o$;return Q?X6(V,W):I5(V,W)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var SL=BigInt(0),U6=BigInt(1);function q6($,J){let Q=J.negate();return $?Q:J}function IL($,J){if(!Number.isSafeInteger($)||$<=0||$>J)throw Error("invalid window size, expected [1.."+J+"], got W="+$)}function K6($,J){IL($,J);let Q=Math.ceil(J/$)+1,X=2**($-1),W=2**$,Y=YW($),G=BigInt($);return{windows:Q,windowSize:X,mask:Y,maxNumber:W,shiftBy:G}}function BL($,J,Q){let{windowSize:X,mask:W,maxNumber:Y,shiftBy:G}=Q,V=Number($&W),q=$>>G;if(V>X)V-=Y,q+=U6;let H=J*X,Z=H+Math.abs(V)-1,M=V===0,j=V<0,R=J%2!==0;return{nextN:q,offset:Z,isZero:M,isNeg:j,isNegF:R,offsetF:H}}function Rv($,J){if(!Array.isArray($))throw Error("array expected");$.forEach((Q,X)=>{if(!(Q instanceof J))throw Error("invalid point at index "+X)})}function Ov($,J){if(!Array.isArray($))throw Error("array of scalars expected");$.forEach((Q,X)=>{if(!J.isValid(Q))throw Error("invalid scalar at index "+X)})}var H6=new WeakMap,kL=new WeakMap;function D6($){return kL.get($)||1}function TL($,J){return{constTimeNegate:q6,hasPrecomputes(Q){return D6(Q)!==1},unsafeLadder(Q,X,W=$.ZERO){let Y=Q;while(X>SL){if(X&U6)W=W.add(Y);Y=Y.double(),X>>=U6}return W},precomputeWindow(Q,X){let{windows:W,windowSize:Y}=K6(X,J),G=[],V=Q,q=V;for(let H=0;H<W;H++){q=V,G.push(q);for(let Z=1;Z<Y;Z++)q=q.add(V),G.push(q);V=q.double()}return G},wNAF(Q,X,W){let{ZERO:Y,BASE:G}=$,V=K6(Q,J);for(let q=0;q<V.windows;q++){let{nextN:H,offset:Z,isZero:M,isNeg:j,isNegF:R,offsetF:N}=BL(W,q,V);if(W=H,M)G=G.add(q6(R,X[N]));else Y=Y.add(q6(j,X[Z]))}return{p:Y,f:G}},wNAFUnsafe(Q,X,W,Y=$.ZERO){let G=K6(Q,J);for(let V=0;V<G.windows;V++){if(W===SL)break;let{nextN:q,offset:H,isZero:Z,isNeg:M}=BL(W,V,G);if(W=q,Z)continue;else{let j=X[H];Y=Y.add(M?j.negate():j)}}return Y},getPrecomputes(Q,X,W){let Y=H6.get(X);if(!Y){if(Y=this.precomputeWindow(X,Q),Q!==1)H6.set(X,W(Y))}return Y},wNAFCached(Q,X,W){let Y=D6(Q);return this.wNAF(Y,this.getPrecomputes(Y,Q,W),X)},wNAFCachedUnsafe(Q,X,W,Y){let G=D6(Q);if(G===1)return this.unsafeLadder(Q,X,Y);return this.wNAFUnsafe(G,this.getPrecomputes(G,Q,W),X,Y)},setWindowSize(Q,X){IL(X,J),kL.set(Q,X),H6.delete(Q)}}}function AL($,J,Q,X){Rv(Q,$),Ov(X,J);let W=Q.length,Y=X.length;if(W!==Y)throw Error("arrays of points and scalars must have equal length");let G=$.ZERO,V=CL(BigInt(W)),q=1;if(V>12)q=V-3;else if(V>4)q=V-2;else if(V>0)q=2;let H=YW(q),Z=Array(Number(H)+1).fill(G),M=Math.floor((J.BITS-1)/q)*q,j=G;for(let R=M;R>=0;R-=q){Z.fill(G);for(let A=0;A<Y;A++){let E=X[A],h=Number(E>>BigInt(R)&H);Z[h]=Z[h].add(Q[A])}let N=G;for(let A=Z.length-1,E=G;A>0;A--)E=E.add(Z[A]),N=N.add(E);if(j=j.add(N),R!==0)for(let A=0;A<q;A++)j=j.double()}return j}function Z6($){return W6($.Fp),GW($,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...G6($.n,$.nBitLength),...$,...{p:$.Fp.ORDER}})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function EL($){if($.lowS!==void 0)k5("lowS",$.lowS);if($.prehash!==void 0)k5("prehash",$.prehash)}function Nv($){let J=Z6($);GW(J,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});let{endo:Q,Fp:X,a:W}=J;if(Q){if(!X.eql(W,X.ZERO))throw Error("invalid endo: CURVE.a must be 0");if(typeof Q!=="object"||typeof Q.beta!=="bigint"||typeof Q.splitScalar!=="function")throw Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...J})}class xL extends Error{constructor($=""){super($)}}var P8={Err:xL,_tlv:{encode:($,J)=>{let{Err:Q}=P8;if($<0||$>256)throw new Q("tlv.encode: wrong tag");if(J.length&1)throw new Q("tlv.encode: unpadded data");let X=J.length/2,W=WG(X);if(W.length/2&128)throw new Q("tlv.encode: long form length too big");let Y=X>127?WG(W.length/2|128):"";return WG($)+Y+W+J},decode($,J){let{Err:Q}=P8,X=0;if($<0||$>256)throw new Q("tlv.encode: wrong tag");if(J.length<2||J[X++]!==$)throw new Q("tlv.decode: wrong tlv");let W=J[X++],Y=!!(W&128),G=0;if(!Y)G=W;else{let q=W&127;if(!q)throw new Q("tlv.decode(long): indefinite length not supported");if(q>4)throw new Q("tlv.decode(long): byte length is too big");let H=J.subarray(X,X+q);if(H.length!==q)throw new Q("tlv.decode: length bytes not complete");if(H[0]===0)throw new Q("tlv.decode(long): zero leftmost byte");for(let Z of H)G=G<<8|Z;if(X+=q,G<128)throw new Q("tlv.decode(long): not minimal encoding")}let V=J.subarray(X,X+G);if(V.length!==G)throw new Q("tlv.decode: wrong value length");return{v:V,l:J.subarray(X+G)}}},_int:{encode($){let{Err:J}=P8;if($<R8)throw new J("integer: negative integers are not allowed");let Q=WG($);if(Number.parseInt(Q[0],16)&8)Q="00"+Q;if(Q.length&1)throw new J("unexpected DER parsing assertion: unpadded hex");return Q},decode($){let{Err:J}=P8;if($[0]&128)throw new J("invalid signature integer: negative");if($[0]===0&&!($[1]&128))throw new J("invalid signature integer: unnecessary leading zero");return w8($)}},toSig($){let{Err:J,_int:Q,_tlv:X}=P8,W=DJ("signature",$),{v:Y,l:G}=X.decode(48,W);if(G.length)throw new J("invalid signature: left bytes after parsing");let{v:V,l:q}=X.decode(2,Y),{v:H,l:Z}=X.decode(2,q);if(Z.length)throw new J("invalid signature: left bytes after parsing");return{r:Q.decode(V),s:Q.decode(H)}},hexFromSig($){let{_tlv:J,_int:Q}=P8,X=J.encode(2,Q.encode($.r)),W=J.encode(2,Q.encode($.s)),Y=X+W;return J.encode(48,Y)}};function z6($,J){return IV(I5($,J))}var R8=BigInt(0),A$=BigInt(1),uk9=BigInt(2),j6=BigInt(3),_v=BigInt(4);function Fv($){let J=Nv($),{Fp:Q}=J,X=XG(J.n,J.nBitLength),W=J.toBytes||((k,v,f)=>{let d=v.toAffine();return kV(Uint8Array.from([4]),Q.toBytes(d.x),Q.toBytes(d.y))}),Y=J.fromBytes||((k)=>{let v=k.subarray(1),f=Q.fromBytes(v.subarray(0,Q.BYTES)),d=Q.fromBytes(v.subarray(Q.BYTES,2*Q.BYTES));return{x:f,y:d}});function G(k){let{a:v,b:f}=J,d=Q.sqr(k),c=Q.mul(d,k);return Q.add(Q.add(c,Q.mul(k,v)),f)}function V(k,v){let f=Q.sqr(v),d=G(k);return Q.eql(f,d)}if(!V(J.Gx,J.Gy))throw Error("bad curve params: generator point");let q=Q.mul(Q.pow(J.a,j6),_v),H=Q.mul(Q.sqr(J.b),BigInt(27));if(Q.is0(Q.add(q,H)))throw Error("bad curve params: a or b");function Z(k){return P6(k,A$,J.n)}function M(k){let{allowedPrivateKeyLengths:v,nByteLength:f,wrapPrivateKey:d,n:c}=J;if(v&&typeof k!=="bigint"){if(w6(k))k=IV(k);if(typeof k!=="string"||!v.includes(k.length))throw Error("invalid private key");k=k.padStart(f*2,"0")}let o;try{o=typeof k==="bigint"?k:w8(DJ("private key",k,f))}catch(p){throw Error("invalid private key, expected hex or "+f+" bytes, got "+typeof k)}if(d)o=a$(o,c);return VW("private key",o,A$,c),o}function j(k){if(!(k instanceof A))throw Error("ProjectivePoint expected")}let R=L6((k,v)=>{let{px:f,py:d,pz:c}=k;if(Q.eql(c,Q.ONE))return{x:f,y:d};let o=k.is0();if(v==null)v=o?Q.ONE:Q.inv(c);let p=Q.mul(f,v),u=Q.mul(d,v),n=Q.mul(c,v);if(o)return{x:Q.ZERO,y:Q.ZERO};if(!Q.eql(n,Q.ONE))throw Error("invZ was invalid");return{x:p,y:u}}),N=L6((k)=>{if(k.is0()){if(J.allowInfinityPoint&&!Q.is0(k.py))return;throw Error("bad point: ZERO")}let{x:v,y:f}=k.toAffine();if(!Q.isValid(v)||!Q.isValid(f))throw Error("bad point: x or y not FE");if(!V(v,f))throw Error("bad point: equation left != right");if(!k.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});class A{constructor(k,v,f){if(k==null||!Q.isValid(k))throw Error("x required");if(v==null||!Q.isValid(v)||Q.is0(v))throw Error("y required");if(f==null||!Q.isValid(f))throw Error("z required");this.px=k,this.py=v,this.pz=f,Object.freeze(this)}static fromAffine(k){let{x:v,y:f}=k||{};if(!k||!Q.isValid(v)||!Q.isValid(f))throw Error("invalid affine point");if(k instanceof A)throw Error("projective point not allowed");let d=(c)=>Q.eql(c,Q.ZERO);if(d(v)&&d(f))return A.ZERO;return new A(v,f,Q.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(k){let v=Y6(Q,k.map((f)=>f.pz));return k.map((f,d)=>f.toAffine(v[d])).map(A.fromAffine)}static fromHex(k){let v=A.fromAffine(Y(DJ("pointHex",k)));return v.assertValidity(),v}static fromPrivateKey(k){return A.BASE.multiply(M(k))}static msm(k,v){return AL(A,X,k,v)}_setWindowSize(k){y.setWindowSize(this,k)}assertValidity(){N(this)}hasEvenY(){let{y:k}=this.toAffine();if(Q.isOdd)return!Q.isOdd(k);throw Error("Field doesn't support isOdd")}equals(k){j(k);let{px:v,py:f,pz:d}=this,{px:c,py:o,pz:p}=k,u=Q.eql(Q.mul(v,p),Q.mul(c,d)),n=Q.eql(Q.mul(f,p),Q.mul(o,d));return u&&n}negate(){return new A(this.px,Q.neg(this.py),this.pz)}double(){let{a:k,b:v}=J,f=Q.mul(v,j6),{px:d,py:c,pz:o}=this,p=Q.ZERO,u=Q.ZERO,n=Q.ZERO,g=Q.mul(d,d),S=Q.mul(c,c),K=Q.mul(o,o),D=Q.mul(d,c);return D=Q.add(D,D),n=Q.mul(d,o),n=Q.add(n,n),p=Q.mul(k,n),u=Q.mul(f,K),u=Q.add(p,u),p=Q.sub(S,u),u=Q.add(S,u),u=Q.mul(p,u),p=Q.mul(D,p),n=Q.mul(f,n),K=Q.mul(k,K),D=Q.sub(g,K),D=Q.mul(k,D),D=Q.add(D,n),n=Q.add(g,g),g=Q.add(n,g),g=Q.add(g,K),g=Q.mul(g,D),u=Q.add(u,g),K=Q.mul(c,o),K=Q.add(K,K),g=Q.mul(K,D),p=Q.sub(p,g),n=Q.mul(K,S),n=Q.add(n,n),n=Q.add(n,n),new A(p,u,n)}add(k){j(k);let{px:v,py:f,pz:d}=this,{px:c,py:o,pz:p}=k,u=Q.ZERO,n=Q.ZERO,g=Q.ZERO,S=J.a,K=Q.mul(J.b,j6),D=Q.mul(v,c),L=Q.mul(f,o),P=Q.mul(d,p),O=Q.add(v,f),C=Q.add(c,o);O=Q.mul(O,C),C=Q.add(D,L),O=Q.sub(O,C),C=Q.add(v,d);let x=Q.add(c,p);return C=Q.mul(C,x),x=Q.add(D,P),C=Q.sub(C,x),x=Q.add(f,d),u=Q.add(o,p),x=Q.mul(x,u),u=Q.add(L,P),x=Q.sub(x,u),g=Q.mul(S,C),u=Q.mul(K,P),g=Q.add(u,g),u=Q.sub(L,g),g=Q.add(L,g),n=Q.mul(u,g),L=Q.add(D,D),L=Q.add(L,D),P=Q.mul(S,P),C=Q.mul(K,C),L=Q.add(L,P),P=Q.sub(D,P),P=Q.mul(S,P),C=Q.add(C,P),D=Q.mul(L,C),n=Q.add(n,D),D=Q.mul(x,C),u=Q.mul(O,u),u=Q.sub(u,D),D=Q.mul(O,L),g=Q.mul(x,g),g=Q.add(g,D),new A(u,n,g)}subtract(k){return this.add(k.negate())}is0(){return this.equals(A.ZERO)}wNAF(k){return y.wNAFCached(this,k,A.normalizeZ)}multiplyUnsafe(k){let{endo:v,n:f}=J;VW("scalar",k,R8,f);let d=A.ZERO;if(k===R8)return d;if(this.is0()||k===A$)return this;if(!v||y.hasPrecomputes(this))return y.wNAFCachedUnsafe(this,k,A.normalizeZ);let{k1neg:c,k1:o,k2neg:p,k2:u}=v.splitScalar(k),n=d,g=d,S=this;while(o>R8||u>R8){if(o&A$)n=n.add(S);if(u&A$)g=g.add(S);S=S.double(),o>>=A$,u>>=A$}if(c)n=n.negate();if(p)g=g.negate();return g=new A(Q.mul(g.px,v.beta),g.py,g.pz),n.add(g)}multiply(k){let{endo:v,n:f}=J;VW("scalar",k,A$,f);let d,c;if(v){let{k1neg:o,k1:p,k2neg:u,k2:n}=v.splitScalar(k),{p:g,f:S}=this.wNAF(p),{p:K,f:D}=this.wNAF(n);g=y.constTimeNegate(o,g),K=y.constTimeNegate(u,K),K=new A(Q.mul(K.px,v.beta),K.py,K.pz),d=g.add(K),c=S.add(D)}else{let{p:o,f:p}=this.wNAF(k);d=o,c=p}return A.normalizeZ([d,c])[0]}multiplyAndAddUnsafe(k,v,f){let d=A.BASE,c=(p,u)=>u===R8||u===A$||!p.equals(d)?p.multiplyUnsafe(u):p.multiply(u),o=c(this,v).add(c(k,f));return o.is0()?void 0:o}toAffine(k){return R(this,k)}isTorsionFree(){let{h:k,isTorsionFree:v}=J;if(k===A$)return!0;if(v)return v(A,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:k,clearCofactor:v}=J;if(k===A$)return this;if(v)return v(A,this);return this.multiplyUnsafe(J.h)}toRawBytes(k=!0){return k5("isCompressed",k),this.assertValidity(),W(A,this,k)}toHex(k=!0){return k5("isCompressed",k),IV(this.toRawBytes(k))}}A.BASE=new A(J.Gx,J.Gy,Q.ONE),A.ZERO=new A(Q.ZERO,Q.ONE,Q.ZERO);let{endo:E,nBitLength:h}=J,y=TL(A,E?Math.ceil(h/2):h);return{CURVE:J,ProjectivePoint:A,normPrivateKeyToScalar:M,weierstrassEquation:G,isWithinCurveOrder:Z}}function Sv($){let J=Z6($);return GW(J,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...J})}function vL($){let J=Sv($),{Fp:Q,n:X,nByteLength:W,nBitLength:Y}=J,G=Q.BYTES+1,V=2*Q.BYTES+1;function q(D){return a$(D,X)}function H(D){return CV(D,X)}let{ProjectivePoint:Z,normPrivateKeyToScalar:M,weierstrassEquation:j,isWithinCurveOrder:R}=Fv({...J,toBytes(D,L,P){let O=L.toAffine(),C=Q.toBytes(O.x),x=kV;if(k5("isCompressed",P),P)return x(Uint8Array.from([L.hasEvenY()?2:3]),C);else return x(Uint8Array.from([4]),C,Q.toBytes(O.y))},fromBytes(D){let L=D.length,P=D[0],O=D.subarray(1);if(L===G&&(P===2||P===3)){let C=w8(O);if(!P6(C,A$,Q.ORDER))throw Error("Point is not on curve");let x=j(C),B;try{B=Q.sqrt(x)}catch(s){let Y0=s instanceof Error?": "+s.message:"";throw Error("Point is not on curve"+Y0)}let z=(B&A$)===A$;if((P&1)===1!==z)B=Q.neg(B);return{x:C,y:B}}else if(L===V&&P===4){let C=Q.fromBytes(O.subarray(0,Q.BYTES)),x=Q.fromBytes(O.subarray(Q.BYTES,2*Q.BYTES));return{x:C,y:x}}else{let C=G,x=V;throw Error("invalid Point, expected length of "+C+", or uncompressed "+x+", got "+L)}}});function N(D){let L=X>>A$;return D>L}function A(D){return N(D)?q(-D):D}let E=(D,L,P)=>w8(D.slice(L,P));class h{constructor(D,L,P){if(VW("r",D,A$,X),VW("s",L,A$,X),this.r=D,this.s=L,P!=null)this.recovery=P;Object.freeze(this)}static fromCompact(D){let L=W;return D=DJ("compactSignature",D,L*2),new h(E(D,0,L),E(D,L,2*L))}static fromDER(D){let{r:L,s:P}=P8.toSig(DJ("DER",D));return new h(L,P)}assertValidity(){}addRecoveryBit(D){return new h(this.r,this.s,D)}recoverPublicKey(D){let{r:L,s:P,recovery:O}=this,C=c(DJ("msgHash",D));if(O==null||![0,1,2,3].includes(O))throw Error("recovery id invalid");let x=O===2||O===3?L+J.n:L;if(x>=Q.ORDER)throw Error("recovery id 2 or 3 invalid");let B=(O&1)===0?"02":"03",z=Z.fromHex(B+z6(x,Q.BYTES)),T=H(x),s=q(-C*T),Y0=q(P*T),Z0=Z.BASE.multiplyAndAddUnsafe(z,s,Y0);if(!Z0)throw Error("point at infinify");return Z0.assertValidity(),Z0}hasHighS(){return N(this.s)}normalizeS(){return this.hasHighS()?new h(this.r,q(-this.s),this.recovery):this}toDERRawBytes(){return M6(this.toDERHex())}toDERHex(){return P8.hexFromSig(this)}toCompactRawBytes(){return M6(this.toCompactHex())}toCompactHex(){let D=W;return z6(this.r,D)+z6(this.s,D)}}let y={isValidPrivateKey(D){try{return M(D),!0}catch(L){return!1}},normPrivateKeyToScalar:M,randomPrivateKey:()=>{let D=V6(J.n);return FL(J.randomBytes(D),J.n)},precompute(D=8,L=Z.BASE){return L._setWindowSize(D),L.multiply(BigInt(3)),L}};function k(D,L=!0){return Z.fromPrivateKey(D).toRawBytes(L)}function v(D){if(typeof D==="bigint")return!1;if(D instanceof Z)return!0;let P=DJ("key",D).length,O=Q.BYTES,C=O+1,x=2*O+1;if(J.allowedPrivateKeyLengths||W===C)return;else return P===C||P===x}function f(D,L,P=!0){if(v(D)===!0)throw Error("first arg must be private key");if(v(L)===!1)throw Error("second arg must be public key");return Z.fromHex(L).multiply(M(D)).toRawBytes(P)}let d=J.bits2int||function(D){if(D.length>8192)throw Error("input is too large");let L=w8(D),P=D.length*8-Y;return P>0?L>>BigInt(P):L},c=J.bits2int_modN||function(D){return q(d(D))},o=YW(Y);function p(D){return VW("num < 2^"+Y,D,R8,o),I5(D,W)}function u(D,L,P=n){if(["recovered","canonical"].some((A0)=>(A0 in P)))throw Error("sign() legacy options not supported");let{hash:O,randomBytes:C}=J,{lowS:x,prehash:B,extraEntropy:z}=P;if(x==null)x=!0;if(D=DJ("msgHash",D),EL(P),B)D=DJ("prehashed msgHash",O(D));let T=c(D),s=M(L),Y0=[p(s),p(T)];if(z!=null&&z!==!1){let A0=z===!0?C(Q.BYTES):z;Y0.push(DJ("extraEntropy",A0))}let Z0=kV(...Y0),S0=T;function T0(A0){let p9=d(A0);if(!R(p9))return;let e0=H(p9),G9=Z.BASE.multiply(p9).toAffine(),s$=q(G9.x);if(s$===R8)return;let N9=q(e0*q(S0+s$*s));if(N9===R8)return;let R9=(G9.x===s$?0:2)|Number(G9.y&A$),a8=N9;if(x&&N(N9))a8=A(N9),R9^=1;return new h(s$,a8,R9)}return{seed:Z0,k2sig:T0}}let n={lowS:J.lowS,prehash:!1},g={lowS:J.lowS,prehash:!1};function S(D,L,P=n){let{seed:O,k2sig:C}=u(D,L,P),x=J;return hL(x.hash.outputLen,x.nByteLength,x.hmac)(O,C)}Z.BASE._setWindowSize(8);function K(D,L,P,O=g){let C=D;L=DJ("msgHash",L),P=DJ("publicKey",P);let{lowS:x,prehash:B,format:z}=O;if(EL(O),"strict"in O)throw Error("options.strict was renamed to lowS");if(z!==void 0&&z!=="compact"&&z!=="der")throw Error("format must be compact or der");let T=typeof C==="string"||w6(C),s=!T&&!z&&typeof C==="object"&&C!==null&&typeof C.r==="bigint"&&typeof C.s==="bigint";if(!T&&!s)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");let Y0=void 0,Z0;try{if(s)Y0=new h(C.r,C.s);if(T){try{if(z!=="compact")Y0=h.fromDER(C)}catch(R9){if(!(R9 instanceof P8.Err))throw R9}if(!Y0&&z!=="der")Y0=h.fromCompact(C)}Z0=Z.fromHex(P)}catch(R9){return!1}if(!Y0)return!1;if(x&&Y0.hasHighS())return!1;if(B)L=J.hash(L);let{r:S0,s:T0}=Y0,A0=c(L),p9=H(T0),e0=q(A0*p9),G9=q(S0*p9),s$=Z.BASE.multiplyAndAddUnsafe(Z0,e0,G9)?.toAffine();if(!s$)return!1;return q(s$.x)===S0}return{CURVE:J,getPublicKey:k,getSharedSecret:f,sign:S,verify:K,ProjectivePoint:Z,Signature:h,utils:y}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Bv($){return{hash:$,hmac:(J,...Q)=>q7($,J,E$(...Q)),randomBytes:s8}}function bL($,J){let Q=(X)=>vL({...$,...Bv(X)});return{...Q(J),create:Q}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var mL=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),yL=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Cv=BigInt(0),Iv=BigInt(1),R6=BigInt(2),gL=($,J)=>($+J/R6)/J;function kv($){let J=mL,Q=BigInt(3),X=BigInt(6),W=BigInt(11),Y=BigInt(22),G=BigInt(23),V=BigInt(44),q=BigInt(88),H=$*$*$%J,Z=H*H*$%J,M=RJ(Z,Q,J)*Z%J,j=RJ(M,Q,J)*Z%J,R=RJ(j,R6,J)*H%J,N=RJ(R,W,J)*R%J,A=RJ(N,Y,J)*N%J,E=RJ(A,V,J)*A%J,h=RJ(E,q,J)*E%J,y=RJ(h,V,J)*A%J,k=RJ(y,Q,J)*Z%J,v=RJ(k,G,J)*N%J,f=RJ(v,X,J)*H%J,d=RJ(f,R6,J);if(!O6.eql(O6.sqr(d),$))throw Error("Cannot find square root");return d}var O6=XG(mL,void 0,void 0,{sqrt:kv}),fL=bL({a:Cv,b:BigInt(7),Fp:O6,n:yL,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:($)=>{let J=yL,Q=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),X=-Iv*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),W=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),Y=Q,G=BigInt("0x100000000000000000000000000000000"),V=gL(Y*$,J),q=gL(-X*$,J),H=a$($-V*Q-q*W,J),Z=a$(-V*X-q*Y,J),M=H>G,j=Z>G;if(M)H=J-H;if(j)Z=J-Z;if(H>G||Z>G)throw Error("splitScalar: Endomorphism failed, k="+$);return{k1neg:M,k1:H,k2neg:j,k2:Z}}}},IW);function _6($,J={}){let{recovered:Q}=J;if(typeof $.r>"u")throw new TV({signature:$});if(typeof $.s>"u")throw new TV({signature:$});if(Q&&typeof $.yParity>"u")throw new TV({signature:$});if($.r<0n||$.r>iK)throw new uL({value:$.r});if($.s<0n||$.s>iK)throw new cL({value:$.s});if(typeof $.yParity==="number"&&$.yParity!==0&&$.yParity!==1)throw new AV({value:$.yParity})}function Tv($){return lL(JJ($))}function lL($){if($.length!==130&&$.length!==132)throw new dL({signature:$});let J=BigInt(t9($,0,32)),Q=BigInt(t9($,32,64)),X=(()=>{let W=Number(`0x${$.slice(130)}`);if(Number.isNaN(W))return;try{return B6(W)}catch{throw new AV({value:W})}})();if(typeof X>"u")return{r:J,s:Q};return{r:J,s:Q,yParity:X}}function F6($){if(typeof $.r>"u")return;if(typeof $.s>"u")return;return S6($)}function S6($){let J=(()=>{if(typeof $==="string")return lL($);if($ instanceof Uint8Array)return Tv($);if(typeof $.r==="string")return Ev($);if($.v)return Av($);return{r:$.r,s:$.s,...typeof $.yParity<"u"?{yParity:$.yParity}:{}}})();return _6(J),J}function Av($){return{r:$.r,s:$.s,yParity:B6($.v)}}function Ev($){let J=(()=>{let Q=$.v?Number($.v):void 0,X=$.yParity?Number($.yParity):void 0;if(typeof Q==="number"&&typeof X!=="number")X=B6(Q);if(typeof X!=="number")throw new AV({value:$.yParity});return X})();return{r:BigInt($.r),s:BigInt($.s),yParity:J}}function pL($){let{r:J,s:Q,yParity:X}=$;return[X?"0x01":"0x",J===0n?"0x":N6(R$(J)),Q===0n?"0x":N6(R$(Q))]}function B6($){if($===0||$===27)return 0;if($===1||$===28)return 1;if($>=35)return $%2===0?1:0;throw new iL({value:$})}class dL extends r0{constructor({signature:$}){super(`Value \`${$}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${b$(S5($))} bytes.`]});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class TV extends r0{constructor({signature:$}){super(`Signature \`${wV($)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`);Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class uL extends r0{constructor({value:$}){super(`Value \`${$}\` is an invalid r value. r must be a positive integer less than 2^256.`);Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class cL extends r0{constructor({value:$}){super(`Value \`${$}\` is an invalid s value. s must be a positive integer less than 2^256.`);Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class AV extends r0{constructor({value:$}){super(`Value \`${$}\` is an invalid y-parity value. Y-parity must be 0 or 1.`);Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class iL extends r0{constructor({value:$}){super(`Value \`${$}\` is an invalid v value. v must be 27, 28 or >=35.`);Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}function oL($,J={}){if(typeof $.chainId==="string")return hv($);return{...$,...J.signature}}function hv($){let{address:J,chainId:Q,nonce:X}=$,W=F6($);return{address:J,chainId:Number(Q),nonce:BigInt(X),...W}}function nL($){return xv($,{presign:!0})}function xv($,J={}){let{presign:Q}=J;return eX(G$("0x05",jL(vv(Q?{address:$.address,chainId:$.chainId,nonce:$.nonce}:$))))}function vv($){let{address:J,chainId:Q,nonce:X}=$,W=F6($);return[Q?R$(Q):"0x",J,X?R$(X):"0x",...W?pL(W):[]]}function sL($){return nM(yv($))}function yv($){let{payload:J,signature:Q}=$,{r:X,s:W,yParity:Y}=Q,V=new fL.Signature(BigInt(X),BigInt(W)).addRecoveryBit(Y).recoverPublicKey(S5(J).substring(2));return lM(V)}var C6="0x8010801080108010801080108010801080108010801080108010801080108010",I6=QG("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function EV($){if(typeof $==="string"){if(t9($,-32)!==C6)throw new k6($)}else _6($.authorization)}function mv($){if(typeof $==="string")return tL($);return $}function tL($){EV($);let J=rL(t9($,-64,-32)),Q=t9($,-J-64,-64),X=t9($,0,-J-64),[W,Y,G]=C5(I6,Q);return{authorization:oL({address:W.delegation,chainId:Number(W.chainId),nonce:W.nonce,yParity:W.yParity,r:W.r,s:W.s}),signature:X,...G&&G!=="0x"?{data:G,to:Y}:{}}}function fv($){let{data:J,signature:Q}=$;EV($);let X=sL({payload:nL($.authorization),signature:S6($.authorization)}),W=wX(I6,[{...$.authorization,delegation:$.authorization.address,chainId:BigInt($.authorization.chainId)},$.to??X,J??"0x"]),Y=R$(b$(W),{size:32});return G$(Q,W,Y,C6)}function lv($){try{return EV($),!0}catch{return!1}}class k6 extends r0{constructor($){super(`Value \`${$}\` is an invalid ERC-8010 wrapped signature.`);Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}}function dv($){return $.map((J)=>({...J,value:BigInt(J.value)}))}function eL($){return{...$,balance:$.balance?BigInt($.balance):void 0,nonce:$.nonce?W$($.nonce):void 0,storageProof:$.storageProof?dv($.storageProof):void 0}}async function $w($,{address:J,blockNumber:Q,blockTag:X,storageKeys:W}){let Y=X??"latest",G=Q!==void 0?V0(Q):void 0,V=await $.request({method:"eth_getProof",params:[J,W,G||Y]});return eL(V)}async function Jw($,{address:J,blockNumber:Q,blockTag:X="latest",slot:W}){let Y=Q!==void 0?V0(Q):void 0;return await $.request({method:"eth_getStorageAt",params:[J,W,Y||X]})}async function T5($,{blockHash:J,blockNumber:Q,blockTag:X,hash:W,index:Y,sender:G,nonce:V}){let q=X||"latest",H=Q!==void 0?V0(Q):void 0,Z=null;if(W)Z=await $.request({method:"eth_getTransactionByHash",params:[W]},{dedupe:!0});else if(J)Z=await $.request({method:"eth_getTransactionByBlockHashAndIndex",params:[J,V0(Y)]},{dedupe:!0});else if((H||q)&&typeof Y==="number")Z=await $.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[H||q,V0(Y)]},{dedupe:Boolean(H)});else if(G&&typeof V==="number")Z=await $.request({method:"eth_getTransactionBySenderAndNonce",params:[G,V0(V)]},{dedupe:!0});if(!Z)throw new hV({blockHash:J,blockNumber:Q,blockTag:q,hash:W,index:Y});return($.chain?.formatters?.transaction?.format||z8)(Z,"getTransaction")}async function Qw($,{hash:J,transactionReceipt:Q}){let[X,W]=await Promise.all([X0($,PQ,"getBlockNumber")({}),J?X0($,T5,"getTransaction")({hash:J}):void 0]),Y=Q?.blockNumber||W?.blockNumber;if(!Y)return 0n;return X-Y+1n}async function A5($,{hash:J}){let Q=await $.request({method:"eth_getTransactionReceipt",params:[J]},{dedupe:!0});if(!Q)throw new xV({hash:J});return($.chain?.formatters?.transactionReceipt?.format||lY)(Q,"getTransactionReceipt")}async function Xw($,J){let{account:Q,authorizationList:X,allowFailure:W=!0,blockNumber:Y,blockOverrides:G,blockTag:V,stateOverride:q}=J,H=J.contracts,{batchSize:Z=J.batchSize??1024,deployless:M=J.deployless??!1}=typeof $.batch?.multicall==="object"?$.batch.multicall:{},j=(()=>{if(J.multicallAddress)return J.multicallAddress;if(M)return null;if($.chain)return NQ({blockNumber:Y,chain:$.chain,contract:"multicall3"});throw Error("client chain not configured. multicallAddress is required.")})(),R=[[]],N=0,A=0;for(let y=0;y<H.length;y++){let{abi:k,address:v,args:f,functionName:d}=H[y];try{let c=I9({abi:k,args:f,functionName:d});if(A+=(c.length-2)/2,Z>0&&A>Z&&R[N].length>0)N++,A=(c.length-2)/2,R[N]=[];R[N]=[...R[N],{allowFailure:!0,callData:c,target:v}]}catch(c){let o=MJ(c,{abi:k,address:v,args:f,docsPath:"/docs/contract/multicall",functionName:d,sender:Q});if(!W)throw o;R[N]=[...R[N],{allowFailure:!0,callData:"0x",target:v}]}}let E=await Promise.allSettled(R.map((y)=>X0($,P$,"readContract")({...j===null?{code:vV}:{address:j},abi:sX,account:Q,args:[y],authorizationList:X,blockNumber:Y,blockOverrides:G,blockTag:V,functionName:"aggregate3",stateOverride:q}))),h=[];for(let y=0;y<E.length;y++){let k=E[y];if(k.status==="rejected"){if(!W)throw k.reason;for(let f=0;f<R[y].length;f++)h.push({status:"failure",error:k.reason,result:void 0});continue}let v=k.value;for(let f=0;f<v.length;f++){let{returnData:d,success:c}=v[f],{callData:o}=R[y][f],{abi:p,address:u,functionName:n,args:g}=H[h.length];try{if(o==="0x")throw new X5;if(!c)throw new W5({data:d});let S=HJ({abi:p,args:g,data:d,functionName:n});h.push(W?{result:S,status:"success"}:S)}catch(S){let K=MJ(S,{abi:p,address:u,args:g,docsPath:"/docs/contract/multicall",functionName:n});if(!W)throw K;h.push({error:K,result:void 0,status:"failure"})}}}if(h.length!==H.length)throw new R0("multicall results mismatch");return h}async function GG($,J){let{blockNumber:Q,blockTag:X=$.experimental_blockTag??"latest",blocks:W,returnFullTransactions:Y,traceTransfers:G,validation:V}=J;try{let q=[];for(let j of W){let R=j.blockOverrides?Ww(j.blockOverrides):void 0,N=j.calls.map((E)=>{let h=E,y=h.account?i0(h.account):void 0,k=h.abi?I9(h):h.data,v={...h,account:y,data:h.dataSuffix?v$([k||"0x",h.dataSuffix]):k,from:h.from??y?.address};return k$(v),KJ(v)}),A=j.stateOverrides?u7(j.stateOverrides):void 0;q.push({blockOverrides:R,calls:N,stateOverrides:A})}let Z=(typeof Q==="bigint"?V0(Q):void 0)||X;return(await $.request({method:"eth_simulateV1",params:[{blockStateCalls:q,returnFullTransactions:Y,traceTransfers:G,validation:V},Z]})).map((j,R)=>({...yY(j),calls:j.calls.map((N,A)=>{let{abi:E,args:h,functionName:y,to:k}=W[R].calls[A],v=N.error?.data??N.returnData,f=BigInt(N.gasUsed),d=N.logs?.map((u)=>T$(u)),c=N.status==="0x1"?"success":"failure",o=E&&c==="success"&&v!=="0x"?HJ({abi:E,data:v,functionName:y}):null,p=(()=>{if(c==="success")return;let u;if(v==="0x")u=new X5;else if(v)u=new W5({data:v});if(!u)return;return MJ(u,{abi:E??[],address:k??"0x",args:h,functionName:y??"<unknown>"})})();return{data:v,gasUsed:f,logs:d,status:c,...c==="success"?{result:o}:{error:p}}})}))}catch(q){let H=q,Z=q5(H,{});if(Z instanceof V5)throw H;throw Z}}function yV($){let J=!0,Q="",X=0,W="",Y=!1;for(let G=0;G<$.length;G++){let V=$[G];if(["(",")",","].includes(V))J=!0;if(V==="(")X++;if(V===")")X--;if(!J)continue;if(X===0){if(V===" "&&["event","function","error",""].includes(W))W="";else if(W+=V,V===")"){Y=!0;break}continue}if(V===" "){if($[G-1]!==","&&Q!==","&&Q!==",(")Q="",J=!1;continue}W+=V,Q+=V}if(!Y)throw new r0("Unable to normalize signature.");return W}function bV($,J){let Q=typeof $,X=J.type;switch(X){case"address":return RV($,{strict:!1});case"bool":return Q==="boolean";case"function":return Q==="string";case"string":return Q==="string";default:{if(X==="tuple"&&"components"in J)return Object.values(J.components).every((W,Y)=>{return bV(Object.values($)[Y],W)});if(/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(X))return Q==="number"||Q==="bigint";if(/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(X))return Q==="string"||$ instanceof Uint8Array;if(/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(X))return Array.isArray($)&&$.every((W)=>bV(W,{...J,type:X.replace(/(\[[0-9]{0,}\])$/,"")}));return!1}}}function A6($,J,Q){for(let X in $){let W=$[X],Y=J[X];if(W.type==="tuple"&&Y.type==="tuple"&&"components"in W&&"components"in Y)return A6(W.components,Y.components,Q[X]);let G=[W.type,Y.type];if((()=>{if(G.includes("address")&&G.includes("bytes20"))return!0;if(G.includes("address")&&G.includes("string"))return RV(Q[X],{strict:!1});if(G.includes("address")&&G.includes("bytes"))return RV(Q[X],{strict:!1});return!1})())return G}return}function mV($,J={}){let{prepare:Q=!0}=J,X=(()=>{if(Array.isArray($))return E6($);if(typeof $==="string")return E6($);return $})();return{...X,...Q?{hash:E5(X)}:{}}}function VG($,J,Q){let{args:X=[],prepare:W=!0}=Q??{},Y=sY(J,{strict:!1}),G=$.filter((H)=>{if(Y){if(H.type==="function"||H.type==="error")return h6(H)===t9(J,0,4);if(H.type==="event")return E5(H)===J;return!1}return"name"in H&&H.name===J});if(G.length===0)throw new qW({name:J});if(G.length===1)return{...G[0],...W?{hash:E5(G[0])}:{}};let V;for(let H of G){if(!("inputs"in H))continue;if(!X||X.length===0){if(!H.inputs||H.inputs.length===0)return{...H,...W?{hash:E5(H)}:{}};continue}if(!H.inputs)continue;if(H.inputs.length===0)continue;if(H.inputs.length!==X.length)continue;if(X.every((M,j)=>{let R="inputs"in H&&H.inputs[j];if(!R)return!1;return bV(M,R)})){if(V&&"inputs"in V&&V.inputs){let M=A6(H.inputs,V.inputs,X);if(M)throw new Yw({abiItem:H,type:M[0]},{abiItem:V,type:M[1]})}V=H}}let q=(()=>{if(V)return V;let[H,...Z]=G;return{...H,overloads:Z}})();if(!q)throw new qW({name:J});return{...q,...W?{hash:E5(q)}:{}}}function h6(...$){let J=(()=>{if(Array.isArray($[0])){let[Q,X]=$;return VG(Q,X)}return $[0]})();return t9(E5(J),0,4)}function cv(...$){let J=(()=>{if(Array.isArray($[0])){let[X,W]=$;return VG(X,W)}return $[0]})(),Q=(()=>{if(typeof J==="string")return J;return gV(J)})();return yV(Q)}function E5(...$){let J=(()=>{if(Array.isArray($[0])){let[Q,X]=$;return VG(Q,X)}return $[0]})();if(typeof J!=="string"&&"hash"in J&&J.hash)return J.hash;return eX(B5(cv(J)))}class Yw extends r0{constructor($,J){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${$.type}\` in \`${yV(gV($.abiItem))}\`, and`,`\`${J.type}\` in \`${yV(gV(J.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}class qW extends r0{constructor({name:$,data:J,type:Q="item"}){let X=(()=>{if($)return` with name "${$}"`;if(J)return` with data "${J}"`;return""})();super(`ABI ${Q}${X} not found.`);Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}function Vw(...$){let[J,Q]=(()=>{if(Array.isArray($[0])){let[Y,G]=$;return[iv(Y),G]}return $})(),{bytecode:X,args:W}=Q;return G$(X,J.inputs?.length&&W?.length?wX(J.inputs,W):"0x")}function qw($){return mV($)}function iv($){let J=$.find((Q)=>Q.type==="constructor");if(!J)throw new qW({name:"constructor"});return J}function Hw(...$){let[J,Q=[]]=(()=>{if(Array.isArray($[0])){let[H,Z,M]=$;return[Kw(H,Z,{args:M}),M]}let[V,q]=$;return[V,q]})(),{overloads:X}=J,W=X?Kw([J,...X],J.name,{args:Q}):J,Y=ov(W),G=Q.length>0?wX(W.inputs,Q):void 0;return G?G$(Y,G):Y}function KW($,J={}){return mV($,J)}function Kw($,J,Q){let X=VG($,J,Q);if(X.type!=="function")throw new qW({name:J,type:"function"});return X}function ov($){return h6($)}var Dw="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",XQ="0x0000000000000000000000000000000000000000";var sv="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function Zw($,J){let{blockNumber:Q,blockTag:X,calls:W,stateOverrides:Y,traceAssetChanges:G,traceTransfers:V,validation:q}=J,H=J.account?i0(J.account):void 0;if(G&&!H)throw new R0("`account` is required when `traceAssetChanges` is true");let Z=H?Vw(qw("constructor(bytes, bytes)"),{bytecode:Uw,args:[sv,Hw(KW("function getBalance(address)"),[H.address])]}):void 0,M=G?await Promise.all(J.calls.map(async(O)=>{if(!O.data&&!O.abi)return;let{accessList:C}=await YV($,{account:H.address,...O,data:O.abi?I9(O):O.data});return C.map(({address:x,storageKeys:B})=>B.length>0?x:null)})).then((O)=>O.flat().filter(Boolean)):[],j=await GG($,{blockNumber:Q,blockTag:X,blocks:[...G?[{calls:[{data:Z}],stateOverrides:Y},{calls:M.map((O,C)=>({abi:[KW("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[H.address],to:O,from:XQ,nonce:C})),stateOverrides:[{address:XQ,nonce:0}]}]:[],{calls:[...W,{}].map((O)=>({...O,from:H?.address})),stateOverrides:Y},...G?[{calls:[{data:Z}]},{calls:M.map((O,C)=>({abi:[KW("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[H.address],to:O,from:XQ,nonce:C})),stateOverrides:[{address:XQ,nonce:0}]},{calls:M.map((O,C)=>({to:O,abi:[KW("function decimals() returns (uint256)")],functionName:"decimals",from:XQ,nonce:C})),stateOverrides:[{address:XQ,nonce:0}]},{calls:M.map((O,C)=>({to:O,abi:[KW("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:XQ,nonce:C})),stateOverrides:[{address:XQ,nonce:0}]},{calls:M.map((O,C)=>({to:O,abi:[KW("function symbol() returns (string)")],functionName:"symbol",from:XQ,nonce:C})),stateOverrides:[{address:XQ,nonce:0}]}]:[]],traceTransfers:V,validation:q}),R=G?j[2]:j[0],[N,A,,E,h,y,k,v]=G?j:[],{calls:f,...d}=R,c=f.slice(0,-1)??[],o=N?.calls??[],p=A?.calls??[],u=[...o,...p].map((O)=>O.status==="success"?X9(O.data):null),n=E?.calls??[],g=h?.calls??[],S=[...n,...g].map((O)=>O.status==="success"?X9(O.data):null),K=(y?.calls??[]).map((O)=>O.status==="success"?O.result:null),D=(v?.calls??[]).map((O)=>O.status==="success"?O.result:null),L=(k?.calls??[]).map((O)=>O.status==="success"?O.result:null),P=[];for(let[O,C]of S.entries()){let x=u[O];if(typeof C!=="bigint")continue;if(typeof x!=="bigint")continue;let B=K[O-1],z=D[O-1],T=L[O-1],s=(()=>{if(O===0)return{address:Dw,decimals:18,symbol:"ETH"};return{address:M[O-1],decimals:T||B?Number(B??1):void 0,symbol:z??void 0}})();if(P.some((Y0)=>Y0.token.address===s.address))continue;P.push({token:s,value:{pre:x,post:C,diff:C-x}})}return{assetChanges:P,block:d,results:c}}var qG={};d1(qG,{wrap:()=>$b,validate:()=>Jb,unwrap:()=>zw,universalSignatureValidatorBytecode:()=>rv,universalSignatureValidatorAbi:()=>tv,magicBytes:()=>x6,from:()=>ev,assert:()=>v6,InvalidWrappedSignatureError:()=>b6});var x6="0x6492649264926492649264926492649264926492649264926492649264926492",rv="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",tv=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}];function v6($){if(t9($,-32)!==x6)throw new b6($)}function ev($){if(typeof $==="string")return zw($);return $}function zw($){v6($);let[J,Q,X]=C5(QG("address, bytes, bytes"),$);return{data:Q,signature:X,to:J}}function $b($){let{data:J,signature:Q,to:X}=$;return G$(wX(QG("address, bytes, bytes"),[X,J,Q]),x6)}function Jb($){try{return v6($),!0}catch{return!1}}class b6 extends r0{constructor($){super(`Value \`${$}\` is an invalid ERC-6492 wrapped signature.`);Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}function fV({r:$,s:J,to:Q="hex",v:X,yParity:W}){let Y=(()=>{if(W===0||W===1)return W;if(X&&(X===27n||X===28n||X>=35n))return X%2n===0n?1:0;throw Error("Invalid `v` or `yParity` value")})(),G=`0x${new h5.Signature(X9($),X9(J)).toCompactHex()}${Y===0?"1b":"1c"}`;if(Q==="hex")return G;return F$(G)}async function RX($,J){let{address:Q,chain:X=$.chain,hash:W,erc6492VerifierAddress:Y=J.universalSignatureVerifierAddress??X?.contracts?.erc6492Verifier?.address,multicallAddress:G=J.multicallAddress??X?.contracts?.multicall3?.address}=J;if(X?.verifyHash)return await X.verifyHash($,J);let V=(()=>{let q=J.signature;if($Q(q))return q;if(typeof q==="object"&&"r"in q&&"s"in q)return fV(q);return Y$(q)})();try{if(YG.validate(V))return await Qb($,{...J,multicallAddress:G,signature:V});return await Xb($,{...J,verifierAddress:Y,signature:V})}catch(q){try{if(LQ(QQ(Q),await h7({hash:W,signature:V})))return!0}catch{}if(q instanceof PX)return!1;throw q}}async function Qb($,J){let{address:Q,blockNumber:X,blockTag:W,hash:Y,multicallAddress:G}=J,{authorization:V,data:q,signature:H,to:Z}=YG.unwrap(J.signature);if(await iY($,{address:Q,blockNumber:X,blockTag:W})===PJ(["0xef0100",V.address]))return await Wb($,{address:Q,blockNumber:X,blockTag:W,hash:Y,signature:H});let j={address:V.address,chainId:Number(V.chainId),nonce:Number(V.nonce),r:V0(V.r,{size:32}),s:V0(V.s,{size:32}),yParity:V.yParity};if(!await NM({address:Q,authorization:j}))throw new PX;let N=await X0($,P$,"readContract")({...G?{address:G}:{code:vV},authorizationList:[j],abi:sX,blockNumber:X,blockTag:"pending",functionName:"aggregate3",args:[[...q?[{allowFailure:!0,target:Z??Q,callData:q}]:[],{allowFailure:!0,target:Q,callData:I9({abi:g6,functionName:"isValidSignature",args:[Y,H]})}]]});if(N[N.length-1]?.returnData?.startsWith("0x1626ba7e"))return!0;throw new PX}async function Xb($,J){let{address:Q,factory:X,factoryData:W,hash:Y,signature:G,verifierAddress:V,...q}=J,H=await(async()=>{if(!X&&!W)return G;if(qG.validate(G))return G;return qG.wrap({data:W,signature:G,to:X})})(),Z=V?{to:V,data:I9({abi:y6,functionName:"isValidSig",args:[Q,Y,H]}),...q}:{data:lV({abi:y6,args:[Q,Y,H],bytecode:Mw}),...q},{data:M}=await X0($,wQ,"call")(Z).catch((j)=>{if(j instanceof jw)throw new PX;throw j});if(T6(M??"0x0"))return!0;throw new PX}async function Wb($,J){let{address:Q,blockNumber:X,blockTag:W,hash:Y,signature:G}=J;if((await X0($,P$,"readContract")({address:Q,abi:g6,args:[Y,G],blockNumber:X,blockTag:W,functionName:"isValidSignature"}).catch((q)=>{if(q instanceof T7)throw new PX;throw q})).startsWith("0x1626ba7e"))return!0;throw new PX}class PX extends Error{}async function Lw($,{address:J,message:Q,factory:X,factoryData:W,signature:Y,...G}){let V=F5(Q);return X0($,RX,"verifyHash")({address:J,factory:X,factoryData:W,hash:V,signature:Y,...G})}async function ww($,J){let{address:Q,factory:X,factoryData:W,signature:Y,message:G,primaryType:V,types:q,domain:H,...Z}=J,M=MV({message:G,primaryType:V,types:q,domain:H});return X0($,RX,"verifyHash")({address:Q,factory:X,factoryData:W,hash:M,signature:Y,...Z})}function pV($,{emitOnBegin:J=!1,emitMissed:Q=!1,onBlockNumber:X,onError:W,poll:Y,pollingInterval:G=$.pollingInterval}){let V=(()=>{if(typeof Y<"u")return Y;if($.transport.type==="webSocket"||$.transport.type==="ipc")return!1;if($.transport.type==="fallback"&&($.transport.transports[0].config.type==="webSocket"||$.transport.transports[0].config.type==="ipc"))return!1;return!0})(),q;return V?(()=>{let M=b9(["watchBlockNumber",$.uid,J,Q,G]);return i$(M,{onBlockNumber:X,onError:W},(j)=>gJ(async()=>{try{let R=await X0($,PQ,"getBlockNumber")({cacheTime:0});if(q!==void 0){if(R===q)return;if(R-q>1&&Q)for(let N=q+1n;N<R;N++)j.onBlockNumber(N,q),q=N}if(q===void 0||R>q)j.onBlockNumber(R,q),q=R}catch(R){j.onError?.(R)}},{emitOnBegin:J,interval:G}))})():(()=>{let M=b9(["watchBlockNumber",$.uid,J,Q]);return i$(M,{onBlockNumber:X,onError:W},(j)=>{let R=!0,N=()=>R=!1;return(async()=>{try{let A=(()=>{if($.transport.type==="fallback"){let h=$.transport.transports.find((y)=>y.config.type==="webSocket"||y.config.type==="ipc");if(!h)return $.transport;return h.value}return $.transport})(),{unsubscribe:E}=await A.subscribe({params:["newHeads"],onData(h){if(!R)return;let y=X9(h.result?.number);j.onBlockNumber(y,q),q=y},onError(h){j.onError?.(h)}});if(N=E,!R)N()}catch(A){W?.(A)}})(),()=>N()})})()}async function dV($,J){let{checkReplacement:Q=!0,confirmations:X=1,hash:W,onReplaced:Y,retryCount:G=6,retryDelay:V=({count:f})=>~~(1<<f)*200,timeout:q=180000}=J,H=b9(["waitForTransactionReceipt",$.uid,W]),Z=(()=>{if(J.pollingInterval)return J.pollingInterval;if($.chain?.experimental_preconfirmationTime)return $.chain.experimental_preconfirmationTime;return $.pollingInterval})(),M,j,R,N=!1,A,E,{promise:h,resolve:y,reject:k}=n7(),v=q?setTimeout(()=>{E?.(),A?.(),k(new Pw({hash:W}))},q):void 0;return A=i$(H,{onReplaced:Y,resolve:y,reject:k},async(f)=>{if(R=await X0($,A5,"getTransactionReceipt")({hash:W}).catch(()=>{return}),R&&X<=1){clearTimeout(v),f.resolve(R),A?.();return}E=X0($,pV,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:Z,async onBlockNumber(d){let c=(p)=>{clearTimeout(v),E?.(),p(),A?.()},o=d;if(N)return;try{if(R){if(X>1&&(!R.blockNumber||o-R.blockNumber+1n<X))return;c(()=>f.resolve(R));return}if(Q&&!M)N=!0,await oX(async()=>{if(M=await X0($,T5,"getTransaction")({hash:W}),M.blockNumber)o=M.blockNumber},{delay:V,retryCount:G}),N=!1;if(R=await X0($,A5,"getTransactionReceipt")({hash:W}),X>1&&(!R.blockNumber||o-R.blockNumber+1n<X))return;c(()=>f.resolve(R))}catch(p){if(p instanceof hV||p instanceof xV){if(!M){N=!1;return}try{j=M,N=!0;let u=await oX(()=>X0($,I$,"getBlock")({blockNumber:o,includeTransactions:!0}),{delay:V,retryCount:G,shouldRetry:({error:S})=>S instanceof bY});N=!1;let n=u.transactions.find(({from:S,nonce:K})=>S===j.from&&K===j.nonce);if(!n)return;if(R=await X0($,A5,"getTransactionReceipt")({hash:n.hash}),X>1&&(!R.blockNumber||o-R.blockNumber+1n<X))return;let g="replaced";if(n.to===j.to&&n.value===j.value&&n.input===j.input)g="repriced";else if(n.from===n.to&&n.value===0n)g="cancelled";c(()=>{f.onReplaced?.({reason:g,replacedTransaction:j,transaction:n,transactionReceipt:R}),f.resolve(R)})}catch(u){c(()=>f.reject(u))}}else c(()=>f.reject(p))}}})}),h}function Rw($,{blockTag:J=$.experimental_blockTag??"latest",emitMissed:Q=!1,emitOnBegin:X=!1,onBlock:W,onError:Y,includeTransactions:G,poll:V,pollingInterval:q=$.pollingInterval}){let H=(()=>{if(typeof V<"u")return V;if($.transport.type==="webSocket"||$.transport.type==="ipc")return!1;if($.transport.type==="fallback"&&($.transport.transports[0].config.type==="webSocket"||$.transport.transports[0].config.type==="ipc"))return!1;return!0})(),Z=G??!1,M;return H?(()=>{let N=b9(["watchBlocks",$.uid,J,Q,X,Z,q]);return i$(N,{onBlock:W,onError:Y},(A)=>gJ(async()=>{try{let E=await X0($,I$,"getBlock")({blockTag:J,includeTransactions:Z});if(E.number!==null&&M?.number!=null){if(E.number===M.number)return;if(E.number-M.number>1&&Q)for(let h=M?.number+1n;h<E.number;h++){let y=await X0($,I$,"getBlock")({blockNumber:h,includeTransactions:Z});A.onBlock(y,M),M=y}}if(M?.number==null||J==="pending"&&E?.number==null||E.number!==null&&E.number>M.number)A.onBlock(E,M),M=E}catch(E){A.onError?.(E)}},{emitOnBegin:X,interval:q}))})():(()=>{let N=!0,A=!0,E=()=>N=!1;return(async()=>{try{if(X)X0($,I$,"getBlock")({blockTag:J,includeTransactions:Z}).then((k)=>{if(!N)return;if(!A)return;W(k,void 0),A=!1}).catch(Y);let h=(()=>{if($.transport.type==="fallback"){let k=$.transport.transports.find((v)=>v.config.type==="webSocket"||v.config.type==="ipc");if(!k)return $.transport;return k.value}return $.transport})(),{unsubscribe:y}=await h.subscribe({params:["newHeads"],async onData(k){if(!N)return;let v=await X0($,I$,"getBlock")({blockNumber:k.result?.number,includeTransactions:Z}).catch(()=>{});if(!N)return;W(v,M),A=!1,M=v},onError(k){Y?.(k)}});if(E=y,!N)E()}catch(h){Y?.(h)}})(),()=>E()})()}function Ow($,{address:J,args:Q,batch:X=!0,event:W,events:Y,fromBlock:G,onError:V,onLogs:q,poll:H,pollingInterval:Z=$.pollingInterval,strict:M}){let j=(()=>{if(typeof H<"u")return H;if(typeof G==="bigint")return!0;if($.transport.type==="webSocket"||$.transport.type==="ipc")return!1;if($.transport.type==="fallback"&&($.transport.transports[0].config.type==="webSocket"||$.transport.transports[0].config.type==="ipc"))return!1;return!0})(),R=M??!1;return j?(()=>{let E=b9(["watchEvent",J,Q,X,$.uid,W,Z,G]);return i$(E,{onLogs:q,onError:V},(h)=>{let y;if(G!==void 0)y=G-1n;let k,v=!1,f=gJ(async()=>{if(!v){try{k=await X0($,GV,"createEventFilter")({address:J,args:Q,event:W,events:Y,strict:R,fromBlock:G})}catch{}v=!0;return}try{let d;if(k)d=await X0($,zX,"getFilterChanges")({filter:k});else{let c=await X0($,PQ,"getBlockNumber")({});if(y&&y!==c)d=await X0($,w5,"getLogs")({address:J,args:Q,event:W,events:Y,fromBlock:y+1n,toBlock:c});else d=[];y=c}if(d.length===0)return;if(X)h.onLogs(d);else for(let c of d)h.onLogs([c])}catch(d){if(k&&d instanceof Z8)v=!1;h.onError?.(d)}},{emitOnBegin:!0,interval:Z});return async()=>{if(k)await X0($,jX,"uninstallFilter")({filter:k});f()}})})():(()=>{let E=!0,h=()=>E=!1;return(async()=>{try{let y=(()=>{if($.transport.type==="fallback"){let d=$.transport.transports.find((c)=>c.config.type==="webSocket"||c.config.type==="ipc");if(!d)return $.transport;return d.value}return $.transport})(),k=Y??(W?[W]:void 0),v=[];if(k){if(v=[k.flatMap((c)=>zQ({abi:[c],eventName:c.name,args:Q}))],W)v=v[0]}let{unsubscribe:f}=await y.subscribe({params:["logs",{address:J,topics:v}],onData(d){if(!E)return;let c=d.result;try{let{eventName:o,args:p}=aX({abi:k??[],data:c.data,topics:c.topics,strict:R}),u=T$(c,{args:p,eventName:o});q([u])}catch(o){let p,u;if(o instanceof iX||o instanceof M5){if(M)return;p=o.abiItem.name,u=o.abiItem.inputs?.some((g)=>!(("name"in g)&&g.name))}let n=T$(c,{args:u?[]:{},eventName:p});q([n])}},onError(d){V?.(d)}});if(h=f,!E)h()}catch(y){V?.(y)}})(),()=>h()})()}function Nw($,{batch:J=!0,onError:Q,onTransactions:X,poll:W,pollingInterval:Y=$.pollingInterval}){return(typeof W<"u"?W:$.transport.type!=="webSocket"&&$.transport.type!=="ipc")?(()=>{let H=b9(["watchPendingTransactions",$.uid,J,Y]);return i$(H,{onTransactions:X,onError:Q},(Z)=>{let M,j=gJ(async()=>{try{if(!M)try{M=await X0($,VV,"createPendingTransactionFilter")({});return}catch(N){throw j(),N}let R=await X0($,zX,"getFilterChanges")({filter:M});if(R.length===0)return;if(J)Z.onTransactions(R);else for(let N of R)Z.onTransactions([N])}catch(R){Z.onError?.(R)}},{emitOnBegin:!0,interval:Y});return async()=>{if(M)await X0($,jX,"uninstallFilter")({filter:M});j()}})})():(()=>{let H=!0,Z=()=>H=!1;return(async()=>{try{let{unsubscribe:M}=await $.transport.subscribe({params:["newPendingTransactions"],onData(j){if(!H)return;let R=j.result;X([R])},onError(j){Q?.(j)}});if(Z=M,!H)Z()}catch(M){Q?.(M)}})(),()=>Z()})()}function _w($){let{scheme:J,statement:Q,...X}=$.match(Yb)?.groups??{},{chainId:W,expirationTime:Y,issuedAt:G,notBefore:V,requestId:q,...H}=$.match(Gb)?.groups??{},Z=$.split("Resources:")[1]?.split(`
|
|
20
|
+
- `).slice(1);return{...X,...H,...W?{chainId:Number(W)}:{},...Y?{expirationTime:new Date(Y)}:{},...G?{issuedAt:new Date(G)}:{},...V?{notBefore:new Date(V)}:{},...q?{requestId:q}:{},...Z?{resources:Z}:{},...J?{scheme:J}:{},...Q?{statement:Q}:{}}}var Yb=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,Gb=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;function Fw($){let{address:J,domain:Q,message:X,nonce:W,scheme:Y,time:G=new Date}=$;if(Q&&X.domain!==Q)return!1;if(W&&X.nonce!==W)return!1;if(Y&&X.scheme!==Y)return!1;if(X.expirationTime&&G>=X.expirationTime)return!1;if(X.notBefore&&G<X.notBefore)return!1;try{if(!X.address)return!1;if(!L$(X.address,{strict:!1}))return!1;if(J&&!LQ(X.address,J))return!1}catch{return!1}return!0}async function Sw($,J){let{address:Q,domain:X,message:W,nonce:Y,scheme:G,signature:V,time:q=new Date,...H}=J,Z=_w(W);if(!Z.address)return!1;if(!Fw({address:Q,domain:X,message:Z,nonce:Y,scheme:G,time:q}))return!1;let j=F5(W);return RX($,{address:Z.address,hash:j,signature:V,...H})}async function x5($,{serializedTransaction:J,throwOnReceiptRevert:Q,timeout:X}){let W=await $.request({method:"eth_sendRawTransactionSync",params:X?[J,V0(X)]:[J]},{retryCount:0}),G=($.chain?.formatters?.transactionReceipt?.format||lY)(W);if(G.status==="reverted"&&Q)throw new uV({receipt:G});return G}function HW($){return{call:(J)=>wQ($,J),createAccessList:(J)=>YV($,J),createBlockFilter:()=>YM($),createContractEventFilter:(J)=>k7($,J),createEventFilter:(J)=>GV($,J),createPendingTransactionFilter:()=>VV($),estimateContractGas:(J)=>Ej($,J),estimateGas:(J)=>j5($,J),getBalance:(J)=>GM($,J),getBlobBaseFee:()=>VM($),getBlock:(J)=>I$($,J),getBlockNumber:(J)=>PQ($,J),getBlockTransactionCount:(J)=>qM($,J),getBytecode:(J)=>iY($,J),getChainId:()=>w$($),getCode:(J)=>iY($,J),getContractEvents:(J)=>c7($,J),getEip712Domain:(J)=>KM($,J),getEnsAddress:(J)=>oj($,J),getEnsAvatar:(J)=>$M($,J),getEnsName:(J)=>QM($,J),getEnsResolver:(J)=>XM($,J),getEnsText:(J)=>WV($,J),getFeeHistory:(J)=>DM($,J),estimateFeesPerGas:(J)=>_j($,J),getFilterChanges:(J)=>zX($,J),getFilterLogs:(J)=>UM($,J),getGasPrice:()=>H5($),getLogs:(J)=>w5($,J),getProof:(J)=>$w($,J),estimateMaxPriorityFeePerGas:(J)=>Nj($,J),fillTransaction:(J)=>z5($,J),getStorageAt:(J)=>Jw($,J),getTransaction:(J)=>T5($,J),getTransactionConfirmations:(J)=>Qw($,J),getTransactionCount:(J)=>D5($,J),getTransactionReceipt:(J)=>A5($,J),multicall:(J)=>Xw($,J),prepareTransactionRequest:(J)=>yJ($,J),readContract:(J)=>P$($,J),sendRawTransaction:(J)=>MX($,J),sendRawTransactionSync:(J)=>x5($,J),simulate:(J)=>GG($,J),simulateBlocks:(J)=>GG($,J),simulateCalls:(J)=>Zw($,J),simulateContract:(J)=>gj($,J),verifyHash:(J)=>RX($,J),verifyMessage:(J)=>Lw($,J),verifySiweMessage:(J)=>Sw($,J),verifyTypedData:(J)=>ww($,J),uninstallFilter:(J)=>jX($,J),waitForTransactionReceipt:(J)=>dV($,J),watchBlocks:(J)=>Rw($,J),watchBlockNumber:(J)=>pV($,J),watchContractEvent:(J)=>pj($,J),watchEvent:(J)=>Ow($,J),watchPendingTransactions:(J)=>Nw($,J)}}function m6($){let{key:J="public",name:Q="Public Client"}=$;return $V({...$,key:J,name:Q,type:"publicClient"}).extend(HW)}async function Bw($,{chain:J}){let{id:Q,name:X,nativeCurrency:W,rpcUrls:Y,blockExplorers:G}=J;await $.request({method:"wallet_addEthereumChain",params:[{chainId:V0(Q),chainName:X,nativeCurrency:W,rpcUrls:Y.default.http,blockExplorerUrls:G?Object.values(G).map(({url:V})=>V):void 0}]},{dedupe:!0,retryCount:0})}function Cw($,J){let{abi:Q,args:X,bytecode:W,...Y}=J,G=lV({abi:Q,args:X,bytecode:W});return OQ($,{...Y,...Y.authorizationList?{to:null}:{},data:G})}async function Iw($){if($.account?.type==="local")return[$.account.address];return(await $.request({method:"eth_accounts"},{dedupe:!0})).map((Q)=>xY(Q))}async function kw($,J={}){let{account:Q=$.account,chainId:X}=J,W=Q?i0(Q):void 0,Y=X?[W?.address,[V0(X)]]:[W?.address],G=await $.request({method:"wallet_getCapabilities",params:Y}),V={};for(let[q,H]of Object.entries(G)){V[Number(q)]={};for(let[Z,M]of Object.entries(H)){if(Z==="addSubAccount")Z="unstable_addSubAccount";V[Number(q)][Z]=M}}return typeof X==="number"?V[X]:V}async function Tw($){return await $.request({method:"wallet_getPermissions"},{dedupe:!0})}async function cV($,J){let{account:Q=$.account,chainId:X,nonce:W}=J;if(!Q)throw new M$({docsPath:"/docs/eip7702/prepareAuthorization"});let Y=i0(Q),G=(()=>{if(!J.executor)return;if(J.executor==="self")return J.executor;return i0(J.executor)})(),V={address:J.contractAddress??J.address,chainId:X,nonce:W};if(typeof V.chainId>"u")V.chainId=$.chain?.id??await X0($,w$,"getChainId")({});if(typeof V.nonce>"u"){if(V.nonce=await X0($,D5,"getTransactionCount")({address:Y.address,blockTag:"pending"}),G==="self"||G?.address&&LQ(G.address,Y.address))V.nonce+=1}return V}async function Aw($){return(await $.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map((Q)=>QQ(Q))}async function Ew($,J){return $.request({method:"wallet_requestPermissions",params:[J]},{retryCount:0})}async function hw($,J){let{chain:Q=$.chain}=J,X=J.timeout??Math.max((Q?.blockTime??0)*3,5000),W=await X0($,a7,"sendCalls")(J);return await X0($,s7,"waitForCallsStatus")({...J,id:W.id,timeout:X})}var f6=new ZX(128);async function iV($,J){let{account:Q=$.account,assertChainId:X=!0,chain:W=$.chain,accessList:Y,authorizationList:G,blobs:V,data:q,dataSuffix:H=typeof $.dataSuffix==="string"?$.dataSuffix:$.dataSuffix?.value,gas:Z,gasPrice:M,maxFeePerBlobGas:j,maxFeePerGas:R,maxPriorityFeePerGas:N,nonce:A,pollingInterval:E,throwOnReceiptRevert:h,type:y,value:k,...v}=J,f=J.timeout??Math.max((W?.blockTime??0)*3,5000);if(typeof Q>"u")throw new M$({docsPath:"/docs/actions/wallet/sendTransactionSync"});let d=Q?i0(Q):null;try{k$(J);let c=await(async()=>{if(J.to)return J.to;if(J.to===null)return;if(G&&G.length>0)return await UX({authorization:G[0]}).catch(()=>{throw new R0("`to` is required. Could not infer from `authorizationList`.")});return})();if(d?.type==="json-rpc"||d===null){let o;if(W!==null){if(o=await X0($,w$,"getChainId")({}),X)RQ({currentChainId:o,chain:W})}let p=$.chain?.formatters?.transactionRequest?.format,n=(p||KJ)({...MQ(v,{format:p}),accessList:Y,account:d,authorizationList:G,blobs:V,chainId:o,data:q?v$([q,H??"0x"]):q,gas:Z,gasPrice:M,maxFeePerBlobGas:j,maxFeePerGas:R,maxPriorityFeePerGas:N,nonce:A,to:c,type:y,value:k},"sendTransaction"),g=f6.get($.uid),S=g?"wallet_sendTransaction":"eth_sendTransaction",K=await(async()=>{try{return await $.request({method:S,params:[n]},{retryCount:0})}catch(L){if(g===!1)throw L;let P=L;if(P.name==="InvalidInputRpcError"||P.name==="InvalidParamsRpcError"||P.name==="MethodNotFoundRpcError"||P.name==="MethodNotSupportedRpcError")return await $.request({method:"wallet_sendTransaction",params:[n]},{retryCount:0}).then((O)=>{return f6.set($.uid,!0),O}).catch((O)=>{let C=O;if(C.name==="MethodNotFoundRpcError"||C.name==="MethodNotSupportedRpcError")throw f6.set($.uid,!1),P;throw C});throw P}})(),D=await X0($,dV,"waitForTransactionReceipt")({checkReplacement:!1,hash:K,pollingInterval:E,timeout:f});if(h&&D.status==="reverted")throw new uV({receipt:D});return D}if(d?.type==="local"){let o=await X0($,yJ,"prepareTransactionRequest")({account:d,accessList:Y,authorizationList:G,blobs:V,chain:W,data:q?v$([q,H??"0x"]):q,gas:Z,gasPrice:M,maxFeePerBlobGas:j,maxFeePerGas:R,maxPriorityFeePerGas:N,nonce:A,nonceManager:d.nonceManager,parameters:[...mY,"sidecars"],type:y,value:k,...v,to:c}),p=W?.serializers?.transaction,u=await d.signTransaction(o,{serializer:p});return await X0($,x5,"sendRawTransactionSync")({serializedTransaction:u,throwOnReceiptRevert:h,timeout:J.timeout})}if(d?.type==="smart")throw new JQ({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"});throw new JQ({docsPath:"/docs/actions/wallet/sendTransactionSync",type:d?.type})}catch(c){if(c instanceof JQ)throw c;throw jQ(c,{...J,account:d,chain:J.chain||void 0})}}async function xw($,J){let{id:Q}=J;await $.request({method:"wallet_showCallsStatus",params:[Q]});return}async function vw($,J){let{account:Q=$.account}=J;if(!Q)throw new M$({docsPath:"/docs/eip7702/signAuthorization"});let X=i0(Q);if(!X.signAuthorization)throw new JQ({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:X.type});let W=await cV($,J);return X.signAuthorization(W)}async function bw($,{account:J=$.account,message:Q}){if(!J)throw new M$({docsPath:"/docs/actions/wallet/signMessage"});let X=i0(J);if(X.signMessage)return X.signMessage({message:Q});let W=(()=>{if(typeof Q==="string")return L8(Q);if(Q.raw instanceof Uint8Array)return p0(Q.raw);return Q.raw})();return $.request({method:"personal_sign",params:[W,X.address]},{retryCount:0})}async function aV($,J){let{account:Q=$.account,chain:X=$.chain,...W}=J;if(!Q)throw new M$({docsPath:"/docs/actions/wallet/signTransaction"});let Y=i0(Q);k$({account:Y,...J});let G=await X0($,w$,"getChainId")({});if(X!==null)RQ({currentChainId:G,chain:X});let q=(X?.formatters||$.chain?.formatters)?.transactionRequest?.format||KJ;if(Y.signTransaction)return Y.signTransaction({...W,chainId:G},{serializer:$.chain?.serializers?.transaction});return await $.request({method:"eth_signTransaction",params:[{...q({...W,account:Y},"signTransaction"),chainId:V0(G),from:Y.address}]},{retryCount:0})}async function oV($,J){let{account:Q=$.account,domain:X,message:W,primaryType:Y}=J;if(!Q)throw new M$({docsPath:"/docs/actions/wallet/signTypedData"});let G=i0(Q),V={EIP712Domain:jV({domain:X}),...J.types};if(zV({domain:X,message:W,primaryType:Y,types:V}),G.signTypedData)return G.signTypedData({domain:X,message:W,primaryType:Y,types:V});let q=hM({domain:X,message:W,primaryType:Y,types:V});return $.request({method:"eth_signTypedData_v4",params:[G.address,q]},{retryCount:0})}async function yw($,{id:J}){await $.request({method:"wallet_switchEthereumChain",params:[{chainId:V0(J)}]},{retryCount:0})}async function gw($,J){return await $.request({method:"wallet_watchAsset",params:J},{retryCount:0})}async function mw($,J){return j8.internal($,iV,"sendTransactionSync",J)}function fw($){return{addChain:(J)=>Bw($,J),deployContract:(J)=>Cw($,J),fillTransaction:(J)=>z5($,J),getAddresses:()=>Iw($),getCallsStatus:(J)=>o7($,J),getCapabilities:(J)=>kw($,J),getChainId:()=>w$($),getPermissions:()=>Tw($),prepareAuthorization:(J)=>cV($,J),prepareTransactionRequest:(J)=>yJ($,J),requestAddresses:()=>Aw($),requestPermissions:(J)=>Ew($,J),sendCalls:(J)=>a7($,J),sendCallsSync:(J)=>hw($,J),sendRawTransaction:(J)=>MX($,J),sendRawTransactionSync:(J)=>x5($,J),sendTransaction:(J)=>OQ($,J),sendTransactionSync:(J)=>iV($,J),showCallsStatus:(J)=>xw($,J),signAuthorization:(J)=>vw($,J),signMessage:(J)=>bw($,J),signTransaction:(J)=>aV($,J),signTypedData:(J)=>oV($,J),switchChain:(J)=>yw($,J),waitForCallsStatus:(J)=>s7($,J),watchAsset:(J)=>gw($,J),writeContract:(J)=>j8($,J),writeContractSync:(J)=>mw($,J)}}function l6($){let{key:J="wallet",name:Q="Wallet Client",transport:X}=$;return $V({...$,key:J,name:Q,transport:X,type:"walletClient"}).extend(fw)}function lw({key:$,methods:J,name:Q,request:X,retryCount:W=3,retryDelay:Y=150,timeout:G,type:V},q){let H=e7();return{config:{key:$,methods:J,name:Q,request:X,retryCount:W,retryDelay:Y,timeout:G,type:V},request:SM(X,{methods:J,retryCount:W,retryDelay:Y,uid:H}),value:q}}class p6 extends R0{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}function nV($,J={}){let{batch:Q,fetchFn:X,fetchOptions:W,key:Y="http",methods:G,name:V="HTTP JSON-RPC",onFetchRequest:q,onFetchResponse:H,retryDelay:Z,raw:M}=J;return({chain:j,retryCount:R,timeout:N})=>{let{batchSize:A=1000,wait:E=0}=typeof Q==="object"?Q:{},h=J.retryCount??R,y=N??J.timeout??1e4,k=$||j?.rpcUrls.default.http[0];if(!k)throw new p6;let v=CM(k,{fetchFn:X,fetchOptions:W,onRequest:q,onResponse:H,timeout:y});return lw({key:Y,methods:G,name:V,async request({method:f,params:d}){let c={method:f,params:d},{schedule:o}=pw({id:k,wait:E,shouldSplitBatch(g){return g.length>A},fn:(g)=>v.request({body:g}),sort:(g,S)=>g.id-S.id}),p=async(g)=>Q?o(g):[await v.request({body:g})],[{error:u,result:n}]=await p(c);if(M)return{error:u,result:n};if(u)throw new A7({body:c,error:u,url:k});return n},retryCount:h,retryDelay:Z,timeout:y,type:"http"},{fetchOptions:W,url:k})}}var v5=50000n,d6=dw*32n;var u6={block:y7({format($){let J=$.transactions?.map((Q)=>{if(typeof Q==="string")return Q;let X=u6.transaction?.format(Q);if(X.typeHex==="0x71")X.type="eip712";else if(X.typeHex==="0xff")X.type="priority";return X});return{l1BatchNumber:$.l1BatchNumber?X9($.l1BatchNumber):null,l1BatchTimestamp:$.l1BatchTimestamp?X9($.l1BatchTimestamp):null,transactions:J}}}),transaction:b7({format($){let J={};if($.type==="0x71")J.type="eip712";else if($.type==="0xff")J.type="priority";return{...J,l1BatchNumber:$.l1BatchNumber?X9($.l1BatchNumber):null,l1BatchTxIndex:$.l1BatchTxIndex?X9($.l1BatchTxIndex):null}}}),transactionReceipt:i7({format($){return{l1BatchNumber:$.l1BatchNumber?X9($.l1BatchNumber):null,l1BatchTxIndex:$.l1BatchTxIndex?X9($.l1BatchTxIndex):null,logs:$.logs.map((J)=>{return{...T$(J),l1BatchNumber:J.l1BatchNumber?X9(J.l1BatchNumber):null,transactionLogIndex:W$(J.transactionLogIndex),logType:J.logType}}),l2ToL1Logs:$.l2ToL1Logs.map((J)=>{return{blockNumber:X9(J.blockHash),blockHash:J.blockHash,l1BatchNumber:J.l1BatchNumber?X9(J.l1BatchNumber):null,transactionIndex:X9(J.transactionIndex),shardId:X9(J.shardId),isService:J.isService,sender:J.sender,key:J.key,value:J.value,transactionHash:J.transactionHash,logIndex:X9(J.logIndex)}})}}}),transactionRequest:uw({exclude:["customSignature","factoryDeps","gasPerPubdata","paymaster","paymasterInput"],format($){if($.gasPerPubdata||$.paymaster&&$.paymasterInput||$.factoryDeps||$.customSignature)return{eip712Meta:{...$.gasPerPubdata?{gasPerPubdata:p0($.gasPerPubdata)}:{gasPerPubdata:p0(v5)},...$.paymaster&&$.paymasterInput?{paymasterParams:{paymaster:$.paymaster,paymasterInput:Array.from(F$($.paymasterInput))}}:{},...$.factoryDeps?{factoryDeps:$.factoryDeps.map((J)=>Array.from(F$(J)))}:{},...$.customSignature?{customSignature:Array.from(F$($.customSignature))}:{}},type:"0x71"};return{}}})};class KG extends R0{constructor(){super(["Transaction is not an EIP712 transaction.","","Transaction must:",' - include `type: "eip712"`'," - include one of the following: `customSignature`, `paymaster`, `paymasterInput`, `gasPerPubdata`, `factoryDeps`"].join(`
|
|
21
|
+
`),{name:"InvalidEip712TransactionError"})}}function SQ($){if($.type==="eip712")return!0;if("customSignature"in $&&$.customSignature||"paymaster"in $&&$.paymaster||"paymasterInput"in $&&$.paymasterInput||"gasPerPubdata"in $&&typeof $.gasPerPubdata==="bigint"||"factoryDeps"in $&&$.factoryDeps)return!0;return!1}function sV($){let{chainId:J,to:Q,from:X,paymaster:W,paymasterInput:Y}=$;if(!SQ($))throw new KG;if(!J||J<=0)throw new rX({chainId:J});if(Q&&!L$(Q))throw new S$({address:Q});if(X&&!L$(X))throw new S$({address:X});if(W&&!L$(W))throw new S$({address:W});if(W&&!Y)throw new R0("`paymasterInput` must be provided when `paymaster` is defined");if(!W&&Y)throw new R0("`paymaster` must be provided when `paymasterInput` is defined")}function Vb($,J){if(SQ($))return qb($);return N5($,J)}var cw={transaction:Vb};function qb($){let{chainId:J,gas:Q,nonce:X,to:W,from:Y,value:G,maxFeePerGas:V,maxPriorityFeePerGas:q,customSignature:H,factoryDeps:Z,paymaster:M,paymasterInput:j,gasPerPubdata:R,data:N}=$;sV($);let A=[X?p0(X):"0x",q?p0(q):"0x",V?p0(V):"0x",Q?p0(Q):"0x",W??"0x",G?p0(G):"0x",N??"0x",p0(J),p0(""),p0(""),p0(J),Y??"0x",R?p0(R):p0(v5),Z??[],H??"0x",M&&j?[M,j]:[]];return PJ(["0x71",wJ(A)])}class c6 extends R0{constructor({givenLength:$,maxBytecodeSize:J}){super(`Bytecode cannot be longer than ${J} bytes. Given length: ${$}`,{name:"BytecodeLengthExceedsMaxSizeError"})}}class i6 extends R0{constructor({givenLengthInWords:$}){super(`Bytecode length in 32-byte words must be odd. Given length in words: ${$}`,{name:"BytecodeLengthInWordsMustBeOddError"})}}class a6 extends R0{constructor({givenLength:$}){super(`The bytecode length in bytes must be divisible by 32. Given length: ${$}`,{name:"BytecodeLengthMustBeDivisibleBy32Error"})}}function HG($){let J=bJ($);if(J.length%32!==0)throw new a6({givenLength:J.length});if(J.length>d6)throw new c6({givenLength:J.length,maxBytecodeSize:d6});let Q=m7(J),X=bJ(Q),W=J.length/32;if(W%2===0)throw new i6({givenLengthInWords:W});let Y=bJ(W),G=iw(Y,{size:2}),V=new Uint8Array([1,0]);return X.set(V,0),X.set(G,2),X}var aw=($)=>{sV($);let J=Kb($);return{domain:{name:"zkSync",version:"2",chainId:$.chainId},types:{Transaction:[{name:"txType",type:"uint256"},{name:"from",type:"uint256"},{name:"to",type:"uint256"},{name:"gasLimit",type:"uint256"},{name:"gasPerPubdataByteLimit",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymaster",type:"uint256"},{name:"nonce",type:"uint256"},{name:"value",type:"uint256"},{name:"data",type:"bytes"},{name:"factoryDeps",type:"bytes32[]"},{name:"paymasterInput",type:"bytes"}]},primaryType:"Transaction",message:J}};function Kb($){let{gas:J,nonce:Q,to:X,from:W,value:Y,maxFeePerGas:G,maxPriorityFeePerGas:V,factoryDeps:q,paymaster:H,paymasterInput:Z,gasPerPubdata:M,data:j}=$;return{txType:113n,from:BigInt(W),to:X?BigInt(X):0n,gasLimit:J??0n,gasPerPubdataByteLimit:M??v5,maxFeePerGas:G??0n,maxPriorityFeePerGas:V??0n,paymaster:H?BigInt(H):0n,nonce:Q?BigInt(Q):0n,value:Y??0n,data:j??"0x",factoryDeps:q?.map((R)=>p0(HG(R)))??[],paymasterInput:Z?Z:"0x"}}var rV={blockTime:1000,formatters:u6,serializers:cw,custom:{getEip712Domain:aw}};var o6=L9({...rV,blockTime:200,id:2741,name:"Abstract",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://api.mainnet.abs.xyz"],webSocket:["wss://api.mainnet.abs.xyz/ws"]}},blockExplorers:{default:{name:"Etherscan",url:"https://abscan.org"},native:{name:"Abstract Explorer",url:"https://explorer.mainnet.abs.xyz"}},contracts:{multicall3:{address:"0xAa4De41dba0Ca5dCBb288b7cC6b708F3aaC759E7",blockCreated:5288},erc6492Verifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:5263}}});var n6=L9({...rV,blockTime:200,id:11124,name:"Abstract Testnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://api.testnet.abs.xyz"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.abscan.org"},native:{name:"Abstract Explorer",url:"https://explorer.testnet.abs.xyz"}},testnet:!0,contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963",blockCreated:358349},erc6492Verifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:431682}}});var ow={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}};var nw={block:y7({format($){return{transactions:$.transactions?.map((Q)=>{if(typeof Q==="string")return Q;let X=z8(Q);if(X.typeHex==="0x7e")X.isSystemTx=Q.isSystemTx,X.mint=Q.mint?X9(Q.mint):void 0,X.sourceHash=Q.sourceHash,X.type="deposit";return X}),stateRoot:$.stateRoot}}}),transaction:b7({format($){let J={};if($.type==="0x7e")J.isSystemTx=$.isSystemTx,J.mint=$.mint?X9($.mint):void 0,J.sourceHash=$.sourceHash,J.type="deposit";return J}}),transactionReceipt:i7({format($){return{l1GasPrice:$.l1GasPrice?X9($.l1GasPrice):null,l1GasUsed:$.l1GasUsed?X9($.l1GasUsed):null,l1Fee:$.l1Fee?X9($.l1Fee):null,l1FeeScalar:$.l1FeeScalar?Number($.l1FeeScalar):null}}})};function Hb($,J){if(Ub($))return Db($);return N5($,J)}var sw={transaction:Hb};function Db($){Zb($);let{sourceHash:J,data:Q,from:X,gas:W,isSystemTx:Y,mint:G,to:V,value:q}=$,H=[J,X,V??"0x",G?p0(G):"0x",q?p0(q):"0x",W?p0(W):"0x",Y?"0x1":"0x",Q??"0x"];return PJ(["0x7e",wJ(H)])}function Ub($){if($.type==="deposit")return!0;if(typeof $.sourceHash<"u")return!0;return!1}function Zb($){let{from:J,to:Q}=$;if(J&&!L$(J))throw new S$({address:J});if(Q&&!L$(Q))throw new S$({address:Q})}var b5={blockTime:2000,contracts:ow,formatters:nw,serializers:sw};var s6=L9({id:43114,name:"Avalanche",blockTime:1700,nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://snowtrace.io",apiUrl:"https://api.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}});var r6=L9({id:43113,name:"Avalanche Fuji",nativeCurrency:{decimals:18,name:"Avalanche Fuji",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax-test.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://testnet.snowtrace.io",apiUrl:"https://api-testnet.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7096959}},testnet:!0});var DG=1,tV=L9({...b5,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...b5.contracts,disputeGameFactory:{[DG]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[DG]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[DG]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[DG]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:DG}),zb=L9({...tV,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://mainnet-preconf.base.org"]}}});var UG=11155111,eV=L9({...b5,id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://sepolia.basescan.org",apiUrl:"https://api-sepolia.basescan.org/api"}},contracts:{...b5.contracts,disputeGameFactory:{[UG]:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{[UG]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[UG]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[UG]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:!0,sourceId:UG}),jb=L9({...eV,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://sepolia-preconf.base.org"]}}});var t6=L9({id:41923,name:"EDU Chain",nativeCurrency:{decimals:18,name:"EDU",symbol:"EDU"},rpcUrls:{default:{http:["https://rpc.edu-chain.raas.gelato.cloud"]}},blockExplorers:{default:{name:"EDU Chain Explorer",url:"https://educhain.blockscout.com/"}},testnet:!1});var e6=L9({id:4689,name:"IoTeX",nativeCurrency:{decimals:18,name:"IoTeX",symbol:"IOTX"},rpcUrls:{default:{http:["https://babel-api.mainnet.iotex.io"],webSocket:["wss://babel-api.mainnet.iotex.io"]}},blockExplorers:{default:{name:"IoTeXScan",url:"https://iotexscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:22163670}}});var $H=L9({id:4690,name:"IoTeX Testnet",nativeCurrency:{decimals:18,name:"IoTeX",symbol:"IOTX"},rpcUrls:{default:{http:["https://babel-api.testnet.iotex.io"],webSocket:["wss://babel-api.testnet.iotex.io"]}},blockExplorers:{default:{name:"IoTeXScan",url:"https://testnet.iotexscan.io"}},contracts:{multicall3:{address:"0xb5cecD6894c6f473Ec726A176f1512399A2e355d",blockCreated:24347592}},testnet:!0});var JH=L9({id:3338,name:"Peaq",nativeCurrency:{decimals:18,name:"peaq",symbol:"PEAQ"},rpcUrls:{default:{http:["https://quicknode1.peaq.xyz","https://quicknode2.peaq.xyz","https://quicknode3.peaq.xyz"],webSocket:["wss://quicknode1.peaq.xyz","wss://quicknode2.peaq.xyz","wss://quicknode3.peaq.xyz"]}},blockExplorers:{default:{name:"Subscan",url:"https://peaq.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3566354}}});var QH=L9({id:137,name:"Polygon",blockTime:2000,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://polygon-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}});var XH=L9({id:80002,name:"Polygon Amoy",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://rpc-amoy.polygon.technology"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://amoy.polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3127388}},testnet:!0});var WH=L9({id:1329,name:"Sei Network",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc.sei-apis.com/"],webSocket:["wss://evm-ws.sei-apis.com/"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com",apiUrl:"https://seitrace.com/pacific-1/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}}});var YH=L9({id:1328,name:"Sei Testnet",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc-testnet.sei-apis.com"],webSocket:["wss://evm-ws-testnet.sei-apis.com"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:98697651}},testnet:!0});var GH=L9({id:1514,name:"Story",nativeCurrency:{decimals:18,name:"IP Token",symbol:"IP"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:340998},ensRegistry:{address:"0x5dc881dda4e4a8d312be3544ad13118d1a04cb17",blockCreated:648924},ensUniversalResolver:{address:"0xddfb18888a9466688235887dec2a10c4f5effee9",blockCreated:649114}},rpcUrls:{default:{http:["https://mainnet.storyrpc.io"]}},blockExplorers:{default:{name:"Story explorer",url:"https://storyscan.io",apiUrl:"https://storyscan.io/api/v2"}},ensTlds:[".ip"],testnet:!1});/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function W4($){return $ instanceof Uint8Array||ArrayBuffer.isView($)&&$.constructor.name==="Uint8Array"}function KH($,...J){if(!W4($))throw Error("Uint8Array expected");if(J.length>0&&!J.includes($.length))throw Error("Uint8Array expected of length "+J+", got length="+$.length)}function JP($,J){if(!Array.isArray(J))return!1;if(J.length===0)return!0;if($)return J.every((Q)=>typeof Q==="string");else return J.every((Q)=>Number.isSafeInteger(Q))}function QP($){if(typeof $!=="function")throw Error("function expected");return!0}function OX($,J){if(typeof J!=="string")throw Error(`${$}: string expected`);return!0}function zG($){if(!Number.isSafeInteger($))throw Error(`invalid integer: ${$}`)}function J4($){if(!Array.isArray($))throw Error("array expected")}function Q4($,J){if(!JP(!0,J))throw Error(`${$}: array of strings expected`)}function HH($,J){if(!JP(!1,J))throw Error(`${$}: array of numbers expected`)}function OJ(...$){let J=(Y)=>Y,Q=(Y,G)=>(V)=>Y(G(V)),X=$.map((Y)=>Y.encode).reduceRight(Q,J),W=$.map((Y)=>Y.decode).reduce(Q,J);return{encode:X,decode:W}}function NJ($){let J=typeof $==="string"?$.split(""):$,Q=J.length;Q4("alphabet",J);let X=new Map(J.map((W,Y)=>[W,Y]));return{encode:(W)=>{return J4(W),W.map((Y)=>{if(!Number.isSafeInteger(Y)||Y<0||Y>=Q)throw Error(`alphabet.encode: digit index outside alphabet "${Y}". Allowed: ${$}`);return J[Y]})},decode:(W)=>{return J4(W),W.map((Y)=>{OX("alphabet.decode",Y);let G=X.get(Y);if(G===void 0)throw Error(`Unknown letter: "${Y}". Allowed: ${$}`);return G})}}}function _J($=""){return OX("join",$),{encode:(J)=>{return Q4("join.decode",J),J.join($)},decode:(J)=>{return OX("join.decode",J),J.split($)}}}function Y4($,J="="){return zG($),OX("padding",J),{encode(Q){Q4("padding.encode",Q);while(Q.length*$%8)Q.push(J);return Q},decode(Q){Q4("padding.decode",Q);let X=Q.length;if(X*$%8)throw Error("padding: invalid, string should have whole number of bytes");for(;X>0&&Q[X-1]===J;X--)if((X-1)*$%8===0)throw Error("padding: invalid, string has too much padding");return Q.slice(0,X)}}}function XP($){return QP($),{encode:(J)=>J,decode:(J)=>$(J)}}function rw($,J,Q){if(J<2)throw Error(`convertRadix: invalid from=${J}, base cannot be less than 2`);if(Q<2)throw Error(`convertRadix: invalid to=${Q}, base cannot be less than 2`);if(J4($),!$.length)return[];let X=0,W=[],Y=Array.from($,(V)=>{if(zG(V),V<0||V>=J)throw Error(`invalid integer: ${V}`);return V}),G=Y.length;while(!0){let V=0,q=!0;for(let H=X;H<G;H++){let Z=Y[H],M=J*V,j=M+Z;if(!Number.isSafeInteger(j)||M/J!==V||j-Z!==M)throw Error("convertRadix: carry overflow");let R=j/Q;V=j%Q;let N=Math.floor(R);if(Y[H]=N,!Number.isSafeInteger(N)||N*Q+V!==j)throw Error("convertRadix: carry overflow");if(!q)continue;else if(!N)X=H;else q=!1}if(W.push(V),q)break}for(let V=0;V<$.length-1&&$[V]===0;V++)W.push(0);return W.reverse()}var WP=($,J)=>J===0?$:WP(J,$%J),X4=($,J)=>$+(J-WP($,J)),$4=(()=>{let $=[];for(let J=0;J<40;J++)$.push(2**J);return $})();function VH($,J,Q,X){if(J4($),J<=0||J>32)throw Error(`convertRadix2: wrong from=${J}`);if(Q<=0||Q>32)throw Error(`convertRadix2: wrong to=${Q}`);if(X4(J,Q)>32)throw Error(`convertRadix2: carry overflow from=${J} to=${Q} carryBits=${X4(J,Q)}`);let W=0,Y=0,G=$4[J],V=$4[Q]-1,q=[];for(let H of $){if(zG(H),H>=G)throw Error(`convertRadix2: invalid data word=${H} from=${J}`);if(W=W<<J|H,Y+J>32)throw Error(`convertRadix2: carry overflow pos=${Y} from=${J}`);Y+=J;for(;Y>=Q;Y-=Q)q.push((W>>Y-Q&V)>>>0);let Z=$4[Y];if(Z===void 0)throw Error("invalid carry");W&=Z-1}if(W=W<<Q-Y&V,!X&&Y>=J)throw Error("Excess padding");if(!X&&W>0)throw Error(`Non-zero padding: ${W}`);if(X&&Y>0)q.push(W>>>0);return q}function Mb($){zG($);let J=256;return{encode:(Q)=>{if(!W4(Q))throw Error("radix.encode input should be Uint8Array");return rw(Array.from(Q),J,$)},decode:(Q)=>{return HH("radix.decode",Q),Uint8Array.from(rw(Q,$,J))}}}function fJ($,J=!1){if(zG($),$<=0||$>32)throw Error("radix2: bits should be in (0..32]");if(X4(8,$)>32||X4($,8)>32)throw Error("radix2: carry overflow");return{encode:(Q)=>{if(!W4(Q))throw Error("radix2.encode input should be Uint8Array");return VH(Array.from(Q),8,$,!J)},decode:(Q)=>{return HH("radix2.decode",Q),Uint8Array.from(VH(Q,$,8,J))}}}function tw($){return QP($),function(...J){try{return $.apply(null,J)}catch(Q){}}}var By9=OJ(fJ(4),NJ("0123456789ABCDEF"),_J("")),Cy9=OJ(fJ(5),NJ("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),Y4(5),_J("")),Iy9=OJ(fJ(5),NJ("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),_J("")),ky9=OJ(fJ(5),NJ("0123456789ABCDEFGHIJKLMNOPQRSTUV"),Y4(5),_J("")),Ty9=OJ(fJ(5),NJ("0123456789ABCDEFGHIJKLMNOPQRSTUV"),_J("")),Ay9=OJ(fJ(5),NJ("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),_J(""),XP(($)=>$.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1"))),YP=(()=>typeof Uint8Array.from([]).toBase64==="function"&&typeof Uint8Array.fromBase64==="function")(),GP=($,J)=>{OX("base64",$);let Q=J?/^[A-Za-z0-9=_-]+$/:/^[A-Za-z0-9=+/]+$/,X=J?"base64url":"base64";if($.length>0&&!Q.test($))throw Error("invalid base64");return Uint8Array.fromBase64($,{alphabet:X,lastChunkHandling:"strict"})},Ey9=YP?{encode($){return KH($),$.toBase64()},decode($){return GP($,!1)}}:OJ(fJ(6),NJ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),Y4(6),_J("")),hy9=OJ(fJ(6),NJ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),_J("")),xy9=YP?{encode($){return KH($),$.toBase64({alphabet:"base64url"})},decode($){return GP($,!0)}}:OJ(fJ(6),NJ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),Y4(6),_J("")),vy9=OJ(fJ(6),NJ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),_J("")),DH=($)=>OJ(Mb(58),NJ($),_J("")),VP=DH("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),by9=DH("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),yy9=DH("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");var qH=OJ(NJ("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),_J("")),ew=[996825010,642813549,513874426,1027748829,705979059];function ZG($){let J=$>>25,Q=($&33554431)<<5;for(let X=0;X<ew.length;X++)if((J>>X&1)===1)Q^=ew[X];return Q}function $P($,J,Q=1){let X=$.length,W=1;for(let Y=0;Y<X;Y++){let G=$.charCodeAt(Y);if(G<33||G>126)throw Error(`Invalid prefix (${$})`);W=ZG(W)^G>>5}W=ZG(W);for(let Y=0;Y<X;Y++)W=ZG(W)^$.charCodeAt(Y)&31;for(let Y of J)W=ZG(W)^Y;for(let Y=0;Y<6;Y++)W=ZG(W);return W^=Q,qH.encode(VH([W%$4[30]],30,5,!1))}function qP($){let J=$==="bech32"?1:734539939,Q=fJ(5),X=Q.decode,W=Q.encode,Y=tw(X);function G(M,j,R=90){if(OX("bech32.encode prefix",M),W4(j))j=Array.from(j);HH("bech32.encode",j);let N=M.length;if(N===0)throw TypeError(`Invalid prefix length ${N}`);let A=N+7+j.length;if(R!==!1&&A>R)throw TypeError(`Length ${A} exceeds limit ${R}`);let E=M.toLowerCase(),h=$P(E,j,J);return`${E}1${qH.encode(j)}${h}`}function V(M,j=90){OX("bech32.decode input",M);let R=M.length;if(R<8||j!==!1&&R>j)throw TypeError(`invalid string length: ${R} (${M}). Expected (8..${j})`);let N=M.toLowerCase();if(M!==N&&M!==M.toUpperCase())throw Error("String must be lowercase or uppercase");let A=N.lastIndexOf("1");if(A===0||A===-1)throw Error('Letter "1" must be present between prefix and data only');let E=N.slice(0,A),h=N.slice(A+1);if(h.length<6)throw Error("Data must be at least 6 characters long");let y=qH.decode(h).slice(0,-6),k=$P(E,y,J);if(!h.endsWith(k))throw Error(`Invalid checksum in ${M}: expected "${k}"`);return{prefix:E,words:y}}let q=tw(V);function H(M){let{prefix:j,words:R}=V(M,!1);return{prefix:j,words:R,bytes:X(R)}}function Z(M,j){return G(M,W(j))}return{encode:G,decode:V,encodeFromBytes:Z,decodeToBytes:H,decodeUnsafe:q,fromWords:X,fromWordsUnsafe:Y,toWords:W}}var gy9=qP("bech32"),my9=qP("bech32m");var Lb=(()=>typeof Uint8Array.from([]).toHex==="function"&&typeof Uint8Array.fromHex==="function")(),wb={encode($){return KH($),$.toHex()},decode($){return OX("hex",$),Uint8Array.fromHex($)}},fy9=Lb?wb:OJ(fJ(4),NJ("0123456789abcdef"),_J(""),XP(($)=>{if(typeof $!=="string"||$.length%2!==0)throw TypeError(`hex.decode: expected string, got ${typeof $} with length ${$.length}`);return $.toLowerCase()}));function KP($){if(typeof $==="string"){if(!L$($,{strict:!1}))throw new S$({address:$});return{address:$,type:"json-rpc"}}if(!L$($.address,{strict:!1}))throw new S$({address:$.address});return{address:$.address,nonceManager:$.nonceManager,sign:$.sign,signAuthorization:$.signAuthorization,signMessage:$.signMessage,signTransaction:$.signTransaction,signTypedData:$.signTypedData,source:"custom",type:"local"}}var UH=!1;async function BQ({hash:$,privateKey:J,to:Q="object"}){let{r:X,s:W,recovery:Y}=h5.sign($.slice(2),J.slice(2),{lowS:!0,extraEntropy:$Q(UH,{strict:!1})?F$(UH):UH}),G={r:V0(X,{size:32}),s:V0(W,{size:32}),v:Y?28n:27n,yParity:Y};return(()=>{if(Q==="bytes"||Q==="hex")return fV({...G,to:Q});return G})()}async function HP($){let{chainId:J,nonce:Q,privateKey:X,to:W="object"}=$,Y=$.contractAddress??$.address,G=await BQ({hash:v7({address:Y,chainId:J,nonce:Q}),privateKey:X,to:W});if(W==="object")return{address:Y,chainId:J,nonce:Q,...G};return G}async function DP({message:$,privateKey:J}){return await BQ({hash:F5($),privateKey:J,to:"hex"})}async function UP($){let{privateKey:J,transaction:Q,serializer:X=N5}=$,W=(()=>{if(Q.type==="eip4844")return{...Q,sidecars:!1};return Q})(),Y=await BQ({hash:l9(await X(W)),privateKey:J});return await X(Q,Y)}async function ZP($){let{privateKey:J,...Q}=$;return await BQ({hash:MV(Q),privateKey:J,to:"hex"})}function ZH($,J={}){let{nonceManager:Q}=J,X=p0(h5.getPublicKey($.slice(2),!1)),W=E7(X);return{...KP({address:W,nonceManager:Q,async sign({hash:G}){return BQ({hash:G,privateKey:$,to:"hex"})},async signAuthorization(G){return HP({...G,privateKey:$})},async signMessage({message:G}){return DP({message:G,privateKey:$})},async signTransaction(G,{serializer:V}={}){return UP({privateKey:$,transaction:G,serializer:V})},async signTypedData(G){return ZP({...G,privateKey:$})}}),publicKey:X,source:"privateKey"}}var zP="0x0000000000000000000000000000000000008006",jP="0x0000000000000000000000000000000000010000";var Ng9=2n**160n;var zH=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"accountAddress",type:"address"},{indexed:!1,internalType:"enum IContractDeployer.AccountNonceOrdering",name:"nonceOrdering",type:"uint8"}],name:"AccountNonceOrderingUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"accountAddress",type:"address"},{indexed:!1,internalType:"enum IContractDeployer.AccountAbstractionVersion",name:"aaVersion",type:"uint8"}],name:"AccountVersionUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"deployerAddress",type:"address"},{indexed:!0,internalType:"bytes32",name:"bytecodeHash",type:"bytes32"},{indexed:!0,internalType:"address",name:"contractAddress",type:"address"}],name:"ContractDeployed",type:"event"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"bytes32",name:"_bytecodeHash",type:"bytes32"},{internalType:"bytes",name:"_input",type:"bytes"}],name:"create",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"bytes32",name:"_bytecodeHash",type:"bytes32"},{internalType:"bytes",name:"_input",type:"bytes"}],name:"create2",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"bytes32",name:"_bytecodeHash",type:"bytes32"},{internalType:"bytes",name:"_input",type:"bytes"},{internalType:"enum IContractDeployer.AccountAbstractionVersion",name:"_aaVersion",type:"uint8"}],name:"create2Account",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"bytes32",name:"_bytecodeHash",type:"bytes32"},{internalType:"bytes",name:"_input",type:"bytes"},{internalType:"enum IContractDeployer.AccountAbstractionVersion",name:"_aaVersion",type:"uint8"}],name:"createAccount",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_address",type:"address"}],name:"extendedAccountVersion",outputs:[{internalType:"enum IContractDeployer.AccountAbstractionVersion",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_keccak256BytecodeHash",type:"bytes32"}],name:"forceDeployKeccak256",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"bytecodeHash",type:"bytes32"},{internalType:"address",name:"newAddress",type:"address"},{internalType:"bool",name:"callConstructor",type:"bool"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"input",type:"bytes"}],internalType:"struct ContractDeployer.ForceDeployment",name:"_deployment",type:"tuple"},{internalType:"address",name:"_sender",type:"address"}],name:"forceDeployOnAddress",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"bytecodeHash",type:"bytes32"},{internalType:"address",name:"newAddress",type:"address"},{internalType:"bool",name:"callConstructor",type:"bool"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"input",type:"bytes"}],internalType:"struct ContractDeployer.ForceDeployment[]",name:"_deployments",type:"tuple[]"}],name:"forceDeployOnAddresses",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_address",type:"address"}],name:"getAccountInfo",outputs:[{components:[{internalType:"enum IContractDeployer.AccountAbstractionVersion",name:"supportedAAVersion",type:"uint8"},{internalType:"enum IContractDeployer.AccountNonceOrdering",name:"nonceOrdering",type:"uint8"}],internalType:"struct IContractDeployer.AccountInfo",name:"info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_sender",type:"address"},{internalType:"uint256",name:"_senderNonce",type:"uint256"}],name:"getNewAddressCreate",outputs:[{internalType:"address",name:"newAddress",type:"address"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_sender",type:"address"},{internalType:"bytes32",name:"_bytecodeHash",type:"bytes32"},{internalType:"bytes32",name:"_salt",type:"bytes32"},{internalType:"bytes",name:"_input",type:"bytes"}],name:"getNewAddressCreate2",outputs:[{internalType:"address",name:"newAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"enum IContractDeployer.AccountAbstractionVersion",name:"_version",type:"uint8"}],name:"updateAccountVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"enum IContractDeployer.AccountNonceOrdering",name:"_nonceOrdering",type:"uint8"}],name:"updateNonceOrdering",outputs:[],stateMutability:"nonpayable",type:"function"}];var jH=1;var MH="/docs/contract/encodeDeployData";function wP($){let{abi:J,args:Q,bytecode:X,deploymentType:W,salt:Y}=$;if(!Q||Q.length===0){let{functionName:Z,argsContractDeployer:M}=MP(W,Y??fK,p0(HG(X)),"0x");return I9({abi:zH,functionName:Z,args:M})}let G=J.find((Z)=>("type"in Z)&&Z.type==="constructor");if(!G)throw new LP({docsPath:MH});if(!("inputs"in G))throw new LH({docsPath:MH});if(!G.inputs||G.inputs.length===0)throw new LH({docsPath:MH});let V=uX(G.inputs,Q),{functionName:q,argsContractDeployer:H}=MP(W,Y??fK,p0(HG(X)),V);return I9({abi:zH,functionName:q,args:H})}function MP($,J,Q,X){let W=[J,Q,X];return{create:{functionName:"create",argsContractDeployer:W},create2:{functionName:"create2",argsContractDeployer:W},createAccount:{functionName:"createAccount",argsContractDeployer:[...W,jH]},create2Account:{functionName:"create2Account",argsContractDeployer:[...W,jH]}}[$||"create"]}function G4($){if(!SQ($))throw new KG;k$($)}async function PP($,J){let{account:Q=$.account,chain:X=$.chain,...W}=J,Y=Q?i0(Q):$.account;if(!Y)throw new M$({docsPath:"/docs/actions/wallet/signTransaction"});if(G4({account:Y,chain:X,...J}),!X?.custom?.getEip712Domain)throw new R0("`getEip712Domain` not found on chain.");if(!X?.serializers?.transaction)throw new R0("transaction serializer not found on chain.");let G=await X0($,w$,"getChainId")({});if(X!==null)RQ({currentChainId:G,chain:X});let V=X?.custom.getEip712Domain({...W,chainId:G,from:Y.address,type:"eip712"}),q=await oV($,{...V,account:Y});return X?.serializers?.transaction({chainId:G,...W,customSignature:q,type:"eip712"},{r:"0x0",s:"0x0",v:0n})}async function V4($,J){if(SQ(J))return PP($,J);return await aV($,J)}async function q4($,J){let{account:Q=$.account,chain:X=$.chain}=J,W=Q?i0(Q):$.account;if(!W)throw new M$({docsPath:"/docs/actions/wallet/sendTransaction"});try{G4(J);let Y=await yJ($,{...J,nonceManager:W.nonceManager,parameters:["gas","nonce","fees"]}),G;if(X!==null)G=await X0($,w$,"getChainId")({}),RQ({currentChainId:G,chain:X});let V=await V4($,{...Y,chainId:G});return await X0($,MX,"sendRawTransaction")({serializedTransaction:V})}catch(Y){throw jQ(Y,{...J,account:W,chain:X})}}function RP($,J){let{abi:Q,args:X,bytecode:W,deploymentType:Y,salt:G,...V}=J,q=wP({abi:Q,args:X,bytecode:W,deploymentType:Y,salt:G});if(V.factoryDeps=V.factoryDeps||[],!V.factoryDeps.includes(W))V.factoryDeps.push(W);return q4($,{...V,data:q,to:Y==="create2"||Y==="create2Account"?jP:zP})}async function wH($,J){if(SQ(J))return q4($,J);return OQ($,J)}function PH(){return($)=>({sendTransaction:(J)=>wH($,J),signTransaction:(J)=>V4($,J),deployContract:(J)=>RP($,J),writeContract:(J)=>j8(Object.assign($,{sendTransaction:(Q)=>wH($,Q)}),J)})}var Pb=1,Rb=2,Ob=3,Nb=4,_b=5,Fb=6,Sb=7,Bb=8,Cb=9,Ib=10,kb=-32700,Tb=-32603,Ab=-32602,Eb=-32601,hb=-32600,xb=-32019,vb=-32018,bb=-32017,yb=-32016,gb=-32015,mb=-32014,fb=-32013,lb=-32012,pb=-32011,db=-32010,ub=-32009,cb=-32008,ib=-32007,ab=-32006,ob=-32005,nb=-32004,sb=-32003,rb=-32002,tb=-32001,eb=2800000,$y=2800001,Jy=2800002,Qy=2800003,Xy=2800004,Wy=2800005,Yy=2800006,Gy=2800007,Vy=2800008,qy=2800009,Ky=2800010,Hy=2800011,RH=3230000,OP=32300001,OH=3230002,NP=3230003,_P=3230004,Dy=3610000,Uy=3610001,Zy=3610002,zy=3610003,jy=3610004,My=3610005,Ly=3610006,wy=3610007,Py=3611000,Ry=3704000,Oy=3704001,Ny=3704002,_y=3704003,Fy=3704004,Sy=4128000,By=4128001,Cy=4128002,Iy=4615000,ky=4615001,Ty=4615002,Ay=4615003,Ey=4615004,hy=4615005,xy=4615006,vy=4615007,by=4615008,yy=4615009,gy=4615010,my=4615011,fy=4615012,ly=4615013,py=4615014,dy=4615015,uy=4615016,cy=4615017,iy=4615018,ay=4615019,oy=4615020,ny=4615021,sy=4615022,ry=4615023,ty=4615024,ey=4615025,$g=4615026,Jg=4615027,Qg=4615028,Xg=4615029,Wg=4615030,Yg=4615031,Gg=4615032,Vg=4615033,qg=4615034,Kg=4615035,Hg=4615036,Dg=4615037,Ug=4615038,Zg=4615039,zg=4615040,jg=4615041,Mg=4615042,Lg=4615043,wg=4615044,Pg=4615045,Rg=4615046,Og=4615047,Ng=4615048,_g=4615049,Fg=4615050,Sg=4615051,Bg=4615052,Cg=4615053,Ig=4615054,kg=5508000,Tg=5508001,Ag=5508002,Eg=5508003,hg=5508004,xg=5508005,vg=5508006,bg=5508007,yg=5508008,gg=5508009,mg=5508010,fg=5508011,lg=5607000,pg=5607001,dg=5607002,ug=5607003,cg=5607004,ig=5607005,ag=5607006,og=5607007,ng=5607008,sg=5607009,rg=5607010,tg=5607011,eg=5607012,$m=5607013,Jm=5607014,Qm=5607015,Xm=5607016,Wm=5607017,Ym=5663000,Gm=5663001,Vm=5663002,qm=5663003,Km=5663004,Hm=5663005,Dm=5663006,Um=5663007,Zm=5663008,zm=5663009,jm=5663010,Mm=5663011,Lm=5663012,wm=5663013,Pm=5663014,Rm=5663015,Om=5663016,Nm=5663017,_m=5663018,Fm=5663019,Sm=5663020,Bm=5663021,Cm=5663022,Im=7050000,km=7050001,Tm=7050002,Am=7050003,Em=7050004,hm=7050005,xm=7050006,vm=7050007,bm=7050008,ym=7050009,gm=7050010,mm=7050011,fm=7050012,lm=7050013,pm=7050014,dm=7050015,um=7050016,cm=7050017,im=7050018,am=7050019,om=7050020,nm=7050021,sm=7050022,rm=7050023,tm=7050024,em=7050025,$f=7050026,Jf=7050027,Qf=7050028,Xf=7050029,Wf=7050030,Yf=7050031,Gf=7050032,Vf=7050033,qf=7050034,Kf=7050035,Hf=7050036,Df=7618000,Uf=7618001,Zf=7618002,zf=7618003,jf=7618004,Mf=7618005,Lf=7618006,wf=7618007,Pf=7618008,Rf=7618009,Of=8078000,Nf=8078001,_f=8078002,Ff=8078003,Sf=8078004,Bf=8078005,Cf=8078006,If=8078007,kf=8078008,Tf=8078009,Af=8078010,Ef=8078011,hf=8078012,xf=8078013,vf=8078014,bf=8078015,yf=8078016,gf=8078017,mf=8078018,ff=8078019,lf=8078020,pf=8078021,df=8078022,uf=8078023,cf=8100000,af=8100001,of=8100002,nf=8100003,sf=8190000,rf=8190001,tf=8190002,ef=8190003,$l=8190004,Jl=9900000,Ql=9900001,Xl=9900002,Wl=9900003,Yl=9900004,Gl=9900005,Vl=9900006;var ql={[RH]:"Account not found at address: $address",[_P]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[NP]:"Expected decoded account at address: $address",[OH]:"Failed to decode account data at address: $address",[OP]:"Accounts not found at addresses: $addresses",[qy]:"Unable to find a viable program address bump seed.",[Jy]:"$putativeAddress is not a base58-encoded address.",[eb]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[Qy]:"The `CryptoKey` must be an `Ed25519` public key.",[Hy]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[Vy]:"Invalid seeds; point must fall off the Ed25519 curve.",[Xy]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[Yy]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[Gy]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[Wy]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[Ky]:"Program address cannot end with PDA marker.",[$y]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[Nb]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[Pb]:"The network has progressed past the last block for which this transaction could have been committed.",[Of]:"Codec [$codecDescription] cannot decode empty byte arrays.",[df]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[lf]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[Bf]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[Cf]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[Sf]:"Encoder and decoder must either both be fixed-size or variable-size.",[kf]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[_f]:"Expected a fixed-size codec, got a variable-size one.",[xf]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[Ff]:"Expected a variable-size codec, got a fixed-size one.",[ff]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[Nf]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[mf]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[Tf]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[Af]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[bf]:"Invalid literal union variant. Expected one of [$variants], got $value.",[If]:"Expected [$codecDescription] to have $expected items, got $actual.",[hf]:"Invalid value $value for base $base with alphabet $alphabet.",[yf]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[Ef]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[vf]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[pf]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[gf]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[uf]:"This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",[Py]:"No random values implementation could be found.",[yy]:"instruction requires an uninitialized account",[ry]:"instruction tries to borrow reference for an account which is already borrowed",[ty]:"instruction left account with an outstanding borrowed reference",[ny]:"program other than the account's owner changed the size of the account data",[hy]:"account data too small for instruction",[sy]:"instruction expected an executable account",[Rg]:"An account does not have enough lamports to be rent-exempt",[Ng]:"Program arithmetic overflowed",[Pg]:"Failed to serialize or deserialize account data: $encodedData",[Ig]:"Builtin programs must consume compute units",[Gg]:"Cross-program invocation call depth too deep",[Ug]:"Computational budget exceeded",[$g]:"custom program error: #$code",[cy]:"instruction contains duplicate accounts",[ey]:"instruction modifications of multiply-passed account differ",[Wg]:"executable accounts must be rent exempt",[Qg]:"instruction changed executable accounts data",[Xg]:"instruction changed the balance of an executable account",[iy]:"instruction changed executable bit of an account",[py]:"instruction modified data of an account it does not own",[ly]:"instruction spent from the balance of an account it does not own",[ky]:"generic instruction error",[Fg]:"Provided owner is not allowed",[Lg]:"Account is immutable",[wg]:"Incorrect authority provided",[vy]:"incorrect program id for instruction",[xy]:"insufficient funds for instruction",[Ey]:"invalid account data for instruction",[Og]:"Invalid account owner",[Ty]:"invalid program argument",[Jg]:"program returned invalid error code",[Ay]:"invalid instruction data",[Dg]:"Failed to reallocate account data",[Hg]:"Provided seeds do not result in a valid address",[Sg]:"Accounts data allocations exceeded the maximum allowed per transaction",[Bg]:"Max accounts exceeded",[Cg]:"Max instruction trace length exceeded",[Kg]:"Length of the seed is too long for address generation",[Vg]:"An account required by the instruction is missing",[by]:"missing required signature for instruction",[fy]:"instruction illegally modified the program id of an account",[oy]:"insufficient account keys for instruction",[Zg]:"Cross-program invocation with unauthorized signer or writable account",[zg]:"Failed to create program execution environment",[Mg]:"Program failed to compile",[jg]:"Program failed to complete",[uy]:"instruction modified data of a read-only account",[dy]:"instruction changed the balance of a read-only account",[qg]:"Cross-program invocation reentrancy not allowed for this instruction",[ay]:"instruction modified rent epoch of an account",[my]:"sum of account balances before and after instruction do not match",[gy]:"instruction requires an initialized account",[Iy]:"",[Yg]:"Unsupported program id",[_g]:"Unsupported sysvar",[Gl]:"Invalid instruction plan kind: $kind.",[Zf]:"The provided instruction plan is empty.",[Mf]:"No failed transaction plan result was found in the provided transaction plan result.",[jf]:"This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved \u2014 e.g. by targetting RPCs that support transaction bundles.",[zf]:"The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",[Df]:"The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",[Vl]:"Invalid transaction plan kind: $kind.",[Uf]:"No more instructions to pack; the message packer has completed the instruction plan.",[Lf]:"Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",[wf]:"Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",[Pf]:"Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",[Rf]:"Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",[Sy]:"The instruction does not have any accounts.",[By]:"The instruction does not have any data.",[Cy]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[_b]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[Rb]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[Xl]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Yl]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[Ql]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Jl]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Wl]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Tb]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[Ab]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[hb]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[Eb]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[kb]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[lb]:"$__serverMessage",[tb]:"$__serverMessage",[nb]:"$__serverMessage",[mb]:"$__serverMessage",[bb]:"Epoch rewards period still active at slot $slot",[db]:"$__serverMessage",[ub]:"$__serverMessage",[xb]:"Failed to query long-term storage; please try again",[yb]:"Minimum context slot has not been reached",[ob]:"Node is unhealthy; behind by $numSlotsBehind slots",[cb]:"No snapshot",[rb]:"Transaction simulation failed",[vb]:"Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",[ib]:"$__serverMessage",[pb]:"Transaction history is not available from this node",[ab]:"$__serverMessage",[fb]:"Transaction signature length mismatch",[sb]:"Transaction signature verification failure",[gb]:"$__serverMessage",[Ry]:"Key pair bytes must be of length 64, got $byteLength.",[Oy]:"Expected private key bytes with length 32. Actual length: $actualLength.",[Ny]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[Fy]:"The provided private key does not match the provided public key.",[_y]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[Fb]:"Lamports value must be in the range [0, 2e64-1]",[Sb]:"`$value` cannot be parsed as a `BigInt`",[Ib]:"$message",[Bb]:"`$value` cannot be parsed as a `Number`",[Ob]:"No nonce account could be found at address `$nonceAccountAddress`",[ug]:"Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",[$m]:"Attempted to sign an offchain message with an address that is not a signer for it",[dg]:"Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",[eg]:"The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",[lg]:"The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",[og]:"Expected message format $expectedMessageFormat, got $actualMessageFormat",[ng]:"The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",[sg]:"Offchain message content must be non-empty",[ig]:"Offchain message must specify the address of at least one required signer",[rg]:"Offchain message envelope must reserve space for at least one signature",[cg]:"The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",[Qm]:"The signatories of this offchain message must be listed in lexicographical order",[Xm]:"An address must be listed no more than once among the signatories of an offchain message",[tg]:"Offchain message is missing signatures for addresses: $addresses.",[Wm]:"Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",[pg]:"The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",[Jm]:"Expected offchain message version $expectedVersion. Got $actualVersion.",[ag]:"This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",[sf]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[tf]:"WebSocket was closed before payload could be added to the send buffer",[ef]:"WebSocket connection closed",[$l]:"WebSocket failed to connect",[rf]:"Failed to obtain a subscription id from the server",[nf]:"Could not find an API plan for RPC method: `$method`",[cf]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[of]:"HTTP error ($statusCode): $message",[af]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[kg]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[Tg]:"The provided value does not implement the `KeyPairSigner` interface",[Eg]:"The provided value does not implement the `MessageModifyingSigner` interface",[hg]:"The provided value does not implement the `MessagePartialSigner` interface",[Ag]:"The provided value does not implement any of the `MessageSigner` interfaces",[vg]:"The provided value does not implement the `TransactionModifyingSigner` interface",[bg]:"The provided value does not implement the `TransactionPartialSigner` interface",[yg]:"The provided value does not implement the `TransactionSendingSigner` interface",[xg]:"The provided value does not implement any of the `TransactionSigner` interfaces",[gg]:"More than one `TransactionSendingSigner` was identified.",[mg]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[fg]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[wy]:"Cannot export a non-extractable key.",[Uy]:"No digest implementation could be found.",[Dy]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[Zy]:`This runtime does not support the generation of Ed25519 key pairs.
|
|
22
|
+
|
|
23
|
+
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
24
|
+
|
|
25
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[zy]:"No signature verification implementation could be found.",[jy]:"No key generation implementation could be found.",[My]:"No signing implementation could be found.",[Ly]:"No key export implementation could be found.",[Cb]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[um]:"Transaction processing left an account with an outstanding borrowed reference",[km]:"Account in use",[Tm]:"Account loaded twice",[Am]:"Attempt to debit an account but found no record of a prior credit.",[rm]:"Transaction loads an address table account that doesn't exist",[vm]:"This transaction has already been processed",[bm]:"Blockhash not found",[ym]:"Loader call chain is too deep",[dm]:"Transactions are currently disabled due to cluster maintenance",[Wf]:"Transaction contains a duplicate instruction ($index) that is not allowed",[hm]:"Insufficient funds for fee",[Yf]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[xm]:"This account may not be used to pay transaction fees",[mm]:"Transaction contains an invalid account reference",[em]:"Transaction loads an address table account with invalid data",[$f]:"Transaction address table lookup uses an invalid index",[tm]:"Transaction loads an address table account with an invalid owner",[Vf]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[lm]:"This program may not be used for executing instructions",[Jf]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[am]:"Transaction loads a writable account that cannot be written",[Gf]:"Transaction exceeded max loaded accounts data size cap",[gm]:"Transaction requires a fee but has no signature present",[Em]:"Attempt to load a program that does not exist",[Kf]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[qf]:"ResanitizationNeeded",[pm]:"Transaction failed to sanitize accounts offsets correctly",[fm]:"Transaction did not pass signature verification",[sm]:"Transaction locked too many accounts",[Hf]:"Sum of account balances before and after transaction do not match",[Im]:"The transaction failed with the error `$errorName`",[im]:"Transaction version is unsupported",[nm]:"Transaction would exceed account data limit within the block",[Xf]:"Transaction would exceed total account data limit",[om]:"Transaction would exceed max account limit within the block",[cm]:"Transaction would exceed max Block Cost Limit",[Qf]:"Transaction would exceed max Vote Cost Limit",[Rm]:"Attempted to sign a transaction with an address that is not a signer for it",[jm]:"Transaction is missing an address at index: $index.",[Om]:"Transaction has no expected signers therefore it cannot be encoded",[Sm]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[Vm]:"Transaction does not have a blockhash lifetime",[qm]:"Transaction is not a durable nonce transaction",[Hm]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[Dm]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[Zm]:"No fee payer set in CompiledTransaction",[Um]:"Could not find program address at index $index",[_m]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[Fm]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[Mm]:"Transaction is missing a fee payer.",[Lm]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[Pm]:"Transaction first instruction is not advance nonce account instruction.",[wm]:"Transaction with no instructions cannot be durable nonce transaction.",[Ym]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[Gm]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[Nm]:"The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",[zm]:"Transaction is missing signatures for addresses: $addresses.",[Km]:"Transaction version must be in the range [0, 127]. `$actualVersion` given",[Bm]:"This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 0.",[Cm]:"The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction."},O8="i",CQ="t";function Kl($,J={}){let Q=ql[$];if(Q.length===0)return"";let X;function W(G){if(X[CQ]===2){let V=Q.slice(X[O8]+1,G);Y.push(V in J?`${J[V]}`:`$${V}`)}else if(X[CQ]===1)Y.push(Q.slice(X[O8],G))}let Y=[];return Q.split("").forEach((G,V)=>{if(V===0){X={[O8]:0,[CQ]:Q[0]==="\\"?0:Q[0]==="$"?2:1};return}let q;switch(X[CQ]){case 0:q={[O8]:V,[CQ]:1};break;case 1:if(G==="\\")q={[O8]:V,[CQ]:0};else if(G==="$")q={[O8]:V,[CQ]:2};break;case 2:if(G==="\\")q={[O8]:V,[CQ]:0};else if(G==="$")q={[O8]:V,[CQ]:2};else if(!G.match(/\w/))q={[O8]:V,[CQ]:1};break}if(q){if(X!==q)W(V);X=q}}),W(),Y.join("")}function Hl($,J={}){return Kl($,J)}var NH=class extends Error{cause=this.cause;context;constructor(...[$,J]){let Q,X;if(J)Object.entries(Object.getOwnPropertyDescriptors(J)).forEach(([Y,G])=>{if(Y==="cause")X={cause:G.value};else{if(Q===void 0)Q={__code:$};Object.defineProperty(Q,Y,G)}});let W=Hl($,Q);super(W,X);this.context=Object.freeze(Q===void 0?{__code:$}:Q),this.name="SolanaError"}};var Dl=1,Ul=2,Zl=3,zl=4,jl=5,Ml=6,Ll=7,wl=8,Pl=9,Rl=10,Ol=-32700,Nl=-32603,_l=-32602,Fl=-32601,Sl=-32600,Bl=-32019,Cl=-32018,Il=-32017,kl=-32016,Tl=-32015,Al=-32014,El=-32013,hl=-32012,xl=-32011,vl=-32010,bl=-32009,yl=-32008,gl=-32007,ml=-32006,fl=-32005,ll=-32004,pl=-32003,dl=-32002,ul=-32001,cl=2800000,il=2800001,al=2800002,ol=2800003,nl=2800004,sl=2800005,rl=2800006,tl=2800007,el=2800008,$p=2800009,Jp=2800010,Qp=2800011,Xp=3230000,Wp=32300001,Yp=3230002,Gp=3230003,Vp=3230004,qp=3610000,Kp=3610001,Hp=3610002,Dp=3610003,Up=3610004,Zp=3610005,zp=3610006,jp=3610007,Mp=3611000,Lp=3704000,wp=3704001,Pp=3704002,Rp=3704003,Op=3704004,Np=4128000,_p=4128001,Fp=4128002,Sp=4615000,Bp=4615001,Cp=4615002,Ip=4615003,kp=4615004,Tp=4615005,Ap=4615006,Ep=4615007,hp=4615008,xp=4615009,vp=4615010,bp=4615011,yp=4615012,gp=4615013,mp=4615014,fp=4615015,lp=4615016,pp=4615017,dp=4615018,up=4615019,cp=4615020,ip=4615021,ap=4615022,op=4615023,np=4615024,sp=4615025,rp=4615026,tp=4615027,ep=4615028,$d=4615029,Jd=4615030,Qd=4615031,Xd=4615032,Wd=4615033,Yd=4615034,Gd=4615035,Vd=4615036,qd=4615037,Kd=4615038,Hd=4615039,Dd=4615040,Ud=4615041,Zd=4615042,zd=4615043,jd=4615044,Md=4615045,Ld=4615046,wd=4615047,Pd=4615048,Rd=4615049,Od=4615050,Nd=4615051,_d=4615052,Fd=4615053,Sd=4615054,Bd=5508000,Cd=5508001,Id=5508002,kd=5508003,Td=5508004,Ad=5508005,Ed=5508006,hd=5508007,xd=5508008,vd=5508009,bd=5508010,yd=5508011,gd=5607000,md=5607001,fd=5607002,ld=5607003,pd=5607004,dd=5607005,ud=5607006,cd=5607007,id=5607008,ad=5607009,od=5607010,nd=5607011,sd=5607012,rd=5607013,td=5607014,ed=5607015,$u=5607016,Ju=5607017,Qu=5663000,Xu=5663001,Wu=5663002,Yu=5663003,Gu=5663004,Vu=5663005,qu=5663006,Ku=5663007,Hu=5663008,Du=5663009,Uu=5663010,Zu=5663011,zu=5663012,ju=5663013,Mu=5663014,Lu=5663015,wu=5663016,Pu=5663017,Ru=5663018,Ou=5663019,Nu=5663020,_u=5663021,Fu=5663022,Su=7050000,Bu=7050001,Cu=7050002,Iu=7050003,ku=7050004,Tu=7050005,Au=7050006,Eu=7050007,hu=7050008,xu=7050009,vu=7050010,bu=7050011,yu=7050012,gu=7050013,mu=7050014,fu=7050015,lu=7050016,pu=7050017,du=7050018,uu=7050019,cu=7050020,iu=7050021,au=7050022,ou=7050023,nu=7050024,su=7050025,ru=7050026,tu=7050027,eu=7050028,$c=7050029,Jc=7050030,Qc=7050031,Xc=7050032,Wc=7050033,Yc=7050034,Gc=7050035,Vc=7050036,qc=7618000,Kc=7618001,Hc=7618002,Dc=7618003,Uc=7618004,Zc=7618005,zc=7618006,jc=7618007,Mc=7618008,Lc=7618009,wc=8078000,Pc=8078001,Rc=8078002,Oc=8078003,Nc=8078004,_c=8078005,Fc=8078006,Sc=8078007,Bc=8078008,Cc=8078009,Ic=8078010,kc=8078011,_H=8078012,Tc=8078013,Ac=8078014,Ec=8078015,hc=8078016,xc=8078017,vc=8078018,bc=8078019,yc=8078020,gc=8078021,mc=8078022,fc=8078023,lc=8100000,pc=8100001,dc=8100002,uc=8100003,cc=8190000,ic=8190001,ac=8190002,oc=8190003,nc=8190004,sc=9900000,rc=9900001,tc=9900002,ec=9900003,$i=9900004,Ji=9900005,Qi=9900006;var Xi={[Xp]:"Account not found at address: $address",[Vp]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[Gp]:"Expected decoded account at address: $address",[Yp]:"Failed to decode account data at address: $address",[Wp]:"Accounts not found at addresses: $addresses",[$p]:"Unable to find a viable program address bump seed.",[al]:"$putativeAddress is not a base58-encoded address.",[cl]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[ol]:"The `CryptoKey` must be an `Ed25519` public key.",[Qp]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[el]:"Invalid seeds; point must fall off the Ed25519 curve.",[nl]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[rl]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[tl]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[sl]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[Jp]:"Program address cannot end with PDA marker.",[il]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[zl]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[Dl]:"The network has progressed past the last block for which this transaction could have been committed.",[wc]:"Codec [$codecDescription] cannot decode empty byte arrays.",[mc]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[yc]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[_c]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[Fc]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[Nc]:"Encoder and decoder must either both be fixed-size or variable-size.",[Bc]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[Rc]:"Expected a fixed-size codec, got a variable-size one.",[Tc]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[Oc]:"Expected a variable-size codec, got a fixed-size one.",[bc]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[Pc]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[vc]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[Cc]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[Ic]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[Ec]:"Invalid literal union variant. Expected one of [$variants], got $value.",[Sc]:"Expected [$codecDescription] to have $expected items, got $actual.",[_H]:"Invalid value $value for base $base with alphabet $alphabet.",[hc]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[kc]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[Ac]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[gc]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[xc]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[fc]:"This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",[Mp]:"No random values implementation could be found.",[xp]:"instruction requires an uninitialized account",[op]:"instruction tries to borrow reference for an account which is already borrowed",[np]:"instruction left account with an outstanding borrowed reference",[ip]:"program other than the account's owner changed the size of the account data",[Tp]:"account data too small for instruction",[ap]:"instruction expected an executable account",[Ld]:"An account does not have enough lamports to be rent-exempt",[Pd]:"Program arithmetic overflowed",[Md]:"Failed to serialize or deserialize account data: $encodedData",[Sd]:"Builtin programs must consume compute units",[Xd]:"Cross-program invocation call depth too deep",[Kd]:"Computational budget exceeded",[rp]:"custom program error: #$code",[pp]:"instruction contains duplicate accounts",[sp]:"instruction modifications of multiply-passed account differ",[Jd]:"executable accounts must be rent exempt",[ep]:"instruction changed executable accounts data",[$d]:"instruction changed the balance of an executable account",[dp]:"instruction changed executable bit of an account",[mp]:"instruction modified data of an account it does not own",[gp]:"instruction spent from the balance of an account it does not own",[Bp]:"generic instruction error",[Od]:"Provided owner is not allowed",[zd]:"Account is immutable",[jd]:"Incorrect authority provided",[Ep]:"incorrect program id for instruction",[Ap]:"insufficient funds for instruction",[kp]:"invalid account data for instruction",[wd]:"Invalid account owner",[Cp]:"invalid program argument",[tp]:"program returned invalid error code",[Ip]:"invalid instruction data",[qd]:"Failed to reallocate account data",[Vd]:"Provided seeds do not result in a valid address",[Nd]:"Accounts data allocations exceeded the maximum allowed per transaction",[_d]:"Max accounts exceeded",[Fd]:"Max instruction trace length exceeded",[Gd]:"Length of the seed is too long for address generation",[Wd]:"An account required by the instruction is missing",[hp]:"missing required signature for instruction",[yp]:"instruction illegally modified the program id of an account",[cp]:"insufficient account keys for instruction",[Hd]:"Cross-program invocation with unauthorized signer or writable account",[Dd]:"Failed to create program execution environment",[Zd]:"Program failed to compile",[Ud]:"Program failed to complete",[lp]:"instruction modified data of a read-only account",[fp]:"instruction changed the balance of a read-only account",[Yd]:"Cross-program invocation reentrancy not allowed for this instruction",[up]:"instruction modified rent epoch of an account",[bp]:"sum of account balances before and after instruction do not match",[vp]:"instruction requires an initialized account",[Sp]:"",[Qd]:"Unsupported program id",[Rd]:"Unsupported sysvar",[Ji]:"Invalid instruction plan kind: $kind.",[Hc]:"The provided instruction plan is empty.",[Zc]:"No failed transaction plan result was found in the provided transaction plan result.",[Uc]:"This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved \u2014 e.g. by targetting RPCs that support transaction bundles.",[Dc]:"The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",[qc]:"The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",[Qi]:"Invalid transaction plan kind: $kind.",[Kc]:"No more instructions to pack; the message packer has completed the instruction plan.",[zc]:"Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",[jc]:"Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",[Mc]:"Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",[Lc]:"Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",[Np]:"The instruction does not have any accounts.",[_p]:"The instruction does not have any data.",[Fp]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[jl]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[Ul]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[tc]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[$i]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[rc]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[sc]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[ec]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Nl]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[_l]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[Sl]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[Fl]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[Ol]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[hl]:"$__serverMessage",[ul]:"$__serverMessage",[ll]:"$__serverMessage",[Al]:"$__serverMessage",[Il]:"Epoch rewards period still active at slot $slot",[vl]:"$__serverMessage",[bl]:"$__serverMessage",[Bl]:"Failed to query long-term storage; please try again",[kl]:"Minimum context slot has not been reached",[fl]:"Node is unhealthy; behind by $numSlotsBehind slots",[yl]:"No snapshot",[dl]:"Transaction simulation failed",[Cl]:"Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",[gl]:"$__serverMessage",[xl]:"Transaction history is not available from this node",[ml]:"$__serverMessage",[El]:"Transaction signature length mismatch",[pl]:"Transaction signature verification failure",[Tl]:"$__serverMessage",[Lp]:"Key pair bytes must be of length 64, got $byteLength.",[wp]:"Expected private key bytes with length 32. Actual length: $actualLength.",[Pp]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[Op]:"The provided private key does not match the provided public key.",[Rp]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[Ml]:"Lamports value must be in the range [0, 2e64-1]",[Ll]:"`$value` cannot be parsed as a `BigInt`",[Rl]:"$message",[wl]:"`$value` cannot be parsed as a `Number`",[Zl]:"No nonce account could be found at address `$nonceAccountAddress`",[ld]:"Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",[rd]:"Attempted to sign an offchain message with an address that is not a signer for it",[fd]:"Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",[sd]:"The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",[gd]:"The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",[cd]:"Expected message format $expectedMessageFormat, got $actualMessageFormat",[id]:"The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",[ad]:"Offchain message content must be non-empty",[dd]:"Offchain message must specify the address of at least one required signer",[od]:"Offchain message envelope must reserve space for at least one signature",[pd]:"The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",[ed]:"The signatories of this offchain message must be listed in lexicographical order",[$u]:"An address must be listed no more than once among the signatories of an offchain message",[nd]:"Offchain message is missing signatures for addresses: $addresses.",[Ju]:"Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",[md]:"The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",[td]:"Expected offchain message version $expectedVersion. Got $actualVersion.",[ud]:"This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",[cc]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[ac]:"WebSocket was closed before payload could be added to the send buffer",[oc]:"WebSocket connection closed",[nc]:"WebSocket failed to connect",[ic]:"Failed to obtain a subscription id from the server",[uc]:"Could not find an API plan for RPC method: `$method`",[lc]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[dc]:"HTTP error ($statusCode): $message",[pc]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[Bd]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[Cd]:"The provided value does not implement the `KeyPairSigner` interface",[kd]:"The provided value does not implement the `MessageModifyingSigner` interface",[Td]:"The provided value does not implement the `MessagePartialSigner` interface",[Id]:"The provided value does not implement any of the `MessageSigner` interfaces",[Ed]:"The provided value does not implement the `TransactionModifyingSigner` interface",[hd]:"The provided value does not implement the `TransactionPartialSigner` interface",[xd]:"The provided value does not implement the `TransactionSendingSigner` interface",[Ad]:"The provided value does not implement any of the `TransactionSigner` interfaces",[vd]:"More than one `TransactionSendingSigner` was identified.",[bd]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[yd]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[jp]:"Cannot export a non-extractable key.",[Kp]:"No digest implementation could be found.",[qp]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[Hp]:`This runtime does not support the generation of Ed25519 key pairs.
|
|
26
|
+
|
|
27
|
+
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
28
|
+
|
|
29
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[Dp]:"No signature verification implementation could be found.",[Up]:"No key generation implementation could be found.",[Zp]:"No signing implementation could be found.",[zp]:"No key export implementation could be found.",[Pl]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[lu]:"Transaction processing left an account with an outstanding borrowed reference",[Bu]:"Account in use",[Cu]:"Account loaded twice",[Iu]:"Attempt to debit an account but found no record of a prior credit.",[ou]:"Transaction loads an address table account that doesn't exist",[Eu]:"This transaction has already been processed",[hu]:"Blockhash not found",[xu]:"Loader call chain is too deep",[fu]:"Transactions are currently disabled due to cluster maintenance",[Jc]:"Transaction contains a duplicate instruction ($index) that is not allowed",[Tu]:"Insufficient funds for fee",[Qc]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[Au]:"This account may not be used to pay transaction fees",[bu]:"Transaction contains an invalid account reference",[su]:"Transaction loads an address table account with invalid data",[ru]:"Transaction address table lookup uses an invalid index",[nu]:"Transaction loads an address table account with an invalid owner",[Wc]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[gu]:"This program may not be used for executing instructions",[tu]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[uu]:"Transaction loads a writable account that cannot be written",[Xc]:"Transaction exceeded max loaded accounts data size cap",[vu]:"Transaction requires a fee but has no signature present",[ku]:"Attempt to load a program that does not exist",[Gc]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[Yc]:"ResanitizationNeeded",[mu]:"Transaction failed to sanitize accounts offsets correctly",[yu]:"Transaction did not pass signature verification",[au]:"Transaction locked too many accounts",[Vc]:"Sum of account balances before and after transaction do not match",[Su]:"The transaction failed with the error `$errorName`",[du]:"Transaction version is unsupported",[iu]:"Transaction would exceed account data limit within the block",[$c]:"Transaction would exceed total account data limit",[cu]:"Transaction would exceed max account limit within the block",[pu]:"Transaction would exceed max Block Cost Limit",[eu]:"Transaction would exceed max Vote Cost Limit",[Lu]:"Attempted to sign a transaction with an address that is not a signer for it",[Uu]:"Transaction is missing an address at index: $index.",[wu]:"Transaction has no expected signers therefore it cannot be encoded",[Nu]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[Wu]:"Transaction does not have a blockhash lifetime",[Yu]:"Transaction is not a durable nonce transaction",[Vu]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[qu]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[Hu]:"No fee payer set in CompiledTransaction",[Ku]:"Could not find program address at index $index",[Ru]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[Ou]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[Zu]:"Transaction is missing a fee payer.",[zu]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[Mu]:"Transaction first instruction is not advance nonce account instruction.",[ju]:"Transaction with no instructions cannot be durable nonce transaction.",[Qu]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[Xu]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[Pu]:"The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",[Du]:"Transaction is missing signatures for addresses: $addresses.",[Gu]:"Transaction version must be in the range [0, 127]. `$actualVersion` given",[_u]:"This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 0.",[Fu]:"The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction."},N8="i",IQ="t";function Wi($,J={}){let Q=Xi[$];if(Q.length===0)return"";let X;function W(G){if(X[IQ]===2){let V=Q.slice(X[N8]+1,G);Y.push(V in J?`${J[V]}`:`$${V}`)}else if(X[IQ]===1)Y.push(Q.slice(X[N8],G))}let Y=[];return Q.split("").forEach((G,V)=>{if(V===0){X={[N8]:0,[IQ]:Q[0]==="\\"?0:Q[0]==="$"?2:1};return}let q;switch(X[IQ]){case 0:q={[N8]:V,[IQ]:1};break;case 1:if(G==="\\")q={[N8]:V,[IQ]:0};else if(G==="$")q={[N8]:V,[IQ]:2};break;case 2:if(G==="\\")q={[N8]:V,[IQ]:0};else if(G==="$")q={[N8]:V,[IQ]:2};else if(!G.match(/\w/))q={[N8]:V,[IQ]:1};break}if(q){if(X!==q)W(V);X=q}}),W(),Y.join("")}function Yi($,J={}){return Wi($,J)}var FP=class extends Error{cause=this.cause;context;constructor(...[$,J]){let Q,X;if(J)Object.entries(Object.getOwnPropertyDescriptors(J)).forEach(([Y,G])=>{if(Y==="cause")X={cause:G.value};else{if(Q===void 0)Q={__code:$};Object.defineProperty(Q,Y,G)}});let W=Yi($,Q);super(W,X);this.context=Object.freeze(Q===void 0?{__code:$}:Q),this.name="SolanaError"}};function Gi($,J){return"fixedSize"in J?J.fixedSize:J.getSizeFromValue($)}function FH($){return Object.freeze({...$,encode:(J)=>{let Q=new Uint8Array(Gi(J,$));return $.write(J,Q,0),Q}})}function K4($){return Object.freeze({...$,decode:(J,Q=0)=>$.read(J,Q)[0]})}function SP($,J,Q){let X=$.byteOffset+(J??0),W=Q??$.byteLength,Y;if(typeof SharedArrayBuffer>"u")Y=$.buffer;else if($.buffer instanceof SharedArrayBuffer)Y=new ArrayBuffer($.length),new Uint8Array(Y).set(new Uint8Array($));else Y=$.buffer;return(X===0||X===-$.byteLength)&&W===$.byteLength?Y:Y.slice(X,X+W)}function IP($,J,Q=J){if(!J.match(new RegExp(`^[${$}]*$`)))throw new FP(_H,{alphabet:$,base:$.length,value:Q})}var Vi=($)=>{return FH({getSizeFromValue:(J)=>{let[Q,X]=BP(J,$[0]);if(!X)return J.length;let W=CP(X,$);return Q.length+Math.ceil(W.toString(16).length/2)},write(J,Q,X){if(IP($,J),J==="")return X;let[W,Y]=BP(J,$[0]);if(!Y)return Q.set(new Uint8Array(W.length).fill(0),X),X+W.length;let G=CP(Y,$),V=[];while(G>0n)V.unshift(Number(G%256n)),G/=256n;let q=[...Array(W.length).fill(0),...V];return Q.set(q,X),X+q.length}})},qi=($)=>{return K4({read(J,Q){let X=Q===0?J:J.slice(Q);if(X.length===0)return["",0];let W=X.findIndex((q)=>q!==0);W=W===-1?X.length:W;let Y=$[0].repeat(W);if(W===X.length)return[Y,J.length];let G=X.slice(W).reduce((q,H)=>q*256n+BigInt(H),0n),V=Ki(G,$);return[Y+V,J.length]}})};function BP($,J){let[Q,X]=$.split(new RegExp(`((?!${J}).*)`));return[Q,X]}function CP($,J){let Q=BigInt(J.length),X=0n;for(let W of $)X*=Q,X+=BigInt(J.indexOf(W));return X}function Ki($,J){let Q=BigInt(J.length),X=[];while($>0n)X.unshift(J[Number($%Q)]),$/=Q;return X.join("")}var kP="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",SH=()=>Vi(kP),BH=()=>qi(kP);var Hi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",H4=()=>{return FH({getSizeFromValue:($)=>Buffer.from($,"base64").length,write($,J,Q){IP(Hi,$.replace(/=/g,""));let X=Buffer.from($,"base64");return J.set(X,Q),X.length+Q}})},TP=()=>{return K4({read:($,J=0)=>[Buffer.from(SP($),J).toString("base64"),$.length]})};var Di=($)=>$.replace(/\u0000/g,"");var{TextDecoder:Ui,TextEncoder:Em9}=globalThis;var y5=()=>{let $;return K4({read(J,Q){let X=($||=new Ui).decode(J.slice(Q));return[Di(X),J.length]}})};function AP($,J){try{if("exists"in $&&!$.exists)return $;return Object.freeze({...$,data:J.decode($.data)})}catch{throw new NH(OH,{address:$.address})}}function Zi($,J){if(!J)return Object.freeze({address:$,exists:!1});let Q=H4().encode(J.data[0]);return Object.freeze({...zi(J),address:$,data:Q,exists:!0})}function zi($){return Object.freeze({executable:$.executable,lamports:$.lamports,programAddress:$.owner,space:$.space})}async function EP($,J,Q={}){let{abortSignal:X,...W}=Q,Y=await $.getAccountInfo(J,{...W,encoding:"base64"}).send({abortSignal:X});return Zi(J,Y.value)}function hP($){if(!$.exists)throw new NH(RH,{address:$.address})}var ji=1,Mi=2,Li=3,wi=4,Pi=5,Ri=6,Oi=7,Ni=8,_i=9,Fi=10,Si=-32700,Bi=-32603,Ci=-32602,Ii=-32601,ki=-32600,Ti=-32019,Ai=-32018,Ei=-32017,hi=-32016,xi=-32015,vi=-32014,bi=-32013,yi=-32012,gi=-32011,mi=-32010,fi=-32009,li=-32008,pi=-32007,di=-32006,ui=-32005,ci=-32004,ii=-32003,ai=-32002,oi=-32001,CH=2800000,IH=2800001,ni=2800002,kH=2800003,xP=2800004,vP=2800005,TH=2800006,AH=2800007,D4=2800008,EH=2800009,bP=2800010,yP=2800011,si=3230000,ri=32300001,ti=3230002,ei=3230003,$a=3230004,Ja=3610000,Qa=3610001,Xa=3610002,Wa=3610003,Ya=3610004,Ga=3610005,Va=3610006,qa=3610007,Ka=3611000,Ha=3704000,Da=3704001,Ua=3704002,Za=3704003,za=3704004,ja=4128000,Ma=4128001,La=4128002,wa=4615000,Pa=4615001,Ra=4615002,Oa=4615003,Na=4615004,_a=4615005,Fa=4615006,Sa=4615007,Ba=4615008,Ca=4615009,Ia=4615010,ka=4615011,Ta=4615012,Aa=4615013,Ea=4615014,ha=4615015,xa=4615016,va=4615017,ba=4615018,ya=4615019,ga=4615020,ma=4615021,fa=4615022,la=4615023,pa=4615024,da=4615025,ua=4615026,ca=4615027,ia=4615028,aa=4615029,oa=4615030,na=4615031,sa=4615032,ra=4615033,ta=4615034,ea=4615035,$o=4615036,Jo=4615037,Qo=4615038,Xo=4615039,Wo=4615040,Yo=4615041,Go=4615042,Vo=4615043,qo=4615044,Ko=4615045,Ho=4615046,Do=4615047,Uo=4615048,Zo=4615049,zo=4615050,jo=4615051,Mo=4615052,Lo=4615053,wo=4615054,Po=5508000,Ro=5508001,Oo=5508002,No=5508003,_o=5508004,Fo=5508005,So=5508006,Bo=5508007,Co=5508008,Io=5508009,ko=5508010,To=5508011,Ao=5607000,Eo=5607001,ho=5607002,xo=5607003,vo=5607004,bo=5607005,yo=5607006,go=5607007,mo=5607008,fo=5607009,lo=5607010,po=5607011,uo=5607012,co=5607013,io=5607014,ao=5607015,oo=5607016,no=5607017,so=5663000,ro=5663001,to=5663002,eo=5663003,$n=5663004,Jn=5663005,Qn=5663006,Xn=5663007,Wn=5663008,Yn=5663009,Gn=5663010,Vn=5663011,qn=5663012,Kn=5663013,Hn=5663014,Dn=5663015,Un=5663016,Zn=5663017,zn=5663018,jn=5663019,Mn=5663020,Ln=5663021,wn=5663022,Pn=7050000,Rn=7050001,On=7050002,Nn=7050003,_n=7050004,Fn=7050005,Sn=7050006,Bn=7050007,Cn=7050008,In=7050009,kn=7050010,Tn=7050011,An=7050012,En=7050013,hn=7050014,xn=7050015,vn=7050016,bn=7050017,yn=7050018,gn=7050019,mn=7050020,fn=7050021,ln=7050022,pn=7050023,dn=7050024,un=7050025,cn=7050026,an=7050027,on=7050028,nn=7050029,sn=7050030,rn=7050031,tn=7050032,en=7050033,$s=7050034,Js=7050035,Qs=7050036,Xs=7618000,Ws=7618001,Ys=7618002,Gs=7618003,Vs=7618004,qs=7618005,Ks=7618006,Hs=7618007,Ds=7618008,Us=7618009,gP=8078000,hH=8078001,mP=8078002,fP=8078003,xH=8078004,vH=8078005,bH=8078006,Zs=8078007,zs=8078008,js=8078009,Ms=8078010,Ls=8078011,ws=8078012,lP=8078013,pP=8078014,Ps=8078015,Rs=8078016,Os=8078017,Ns=8078018,_s=8078019,dP=8078020,uP=8078021,Fs=8078022,cP=8078023,Ss=8100000,Bs=8100001,Cs=8100002,Is=8100003,ks=8190000,Ts=8190001,As=8190002,Es=8190003,hs=8190004,xs=9900000,vs=9900001,bs=9900002,ys=9900003,gs=9900004,ms=9900005,fs=9900006;var ls={[si]:"Account not found at address: $address",[$a]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[ei]:"Expected decoded account at address: $address",[ti]:"Failed to decode account data at address: $address",[ri]:"Accounts not found at addresses: $addresses",[EH]:"Unable to find a viable program address bump seed.",[ni]:"$putativeAddress is not a base58-encoded address.",[CH]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[kH]:"The `CryptoKey` must be an `Ed25519` public key.",[yP]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[D4]:"Invalid seeds; point must fall off the Ed25519 curve.",[xP]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[TH]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[AH]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[vP]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[bP]:"Program address cannot end with PDA marker.",[IH]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[wi]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[ji]:"The network has progressed past the last block for which this transaction could have been committed.",[gP]:"Codec [$codecDescription] cannot decode empty byte arrays.",[Fs]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[dP]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[vH]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[bH]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[xH]:"Encoder and decoder must either both be fixed-size or variable-size.",[zs]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[mP]:"Expected a fixed-size codec, got a variable-size one.",[lP]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[fP]:"Expected a variable-size codec, got a fixed-size one.",[_s]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[hH]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[Ns]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[js]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[Ms]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[Ps]:"Invalid literal union variant. Expected one of [$variants], got $value.",[Zs]:"Expected [$codecDescription] to have $expected items, got $actual.",[ws]:"Invalid value $value for base $base with alphabet $alphabet.",[Rs]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[Ls]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[pP]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[uP]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[Os]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[cP]:"This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",[Ka]:"No random values implementation could be found.",[Ca]:"instruction requires an uninitialized account",[la]:"instruction tries to borrow reference for an account which is already borrowed",[pa]:"instruction left account with an outstanding borrowed reference",[ma]:"program other than the account's owner changed the size of the account data",[_a]:"account data too small for instruction",[fa]:"instruction expected an executable account",[Ho]:"An account does not have enough lamports to be rent-exempt",[Uo]:"Program arithmetic overflowed",[Ko]:"Failed to serialize or deserialize account data: $encodedData",[wo]:"Builtin programs must consume compute units",[sa]:"Cross-program invocation call depth too deep",[Qo]:"Computational budget exceeded",[ua]:"custom program error: #$code",[va]:"instruction contains duplicate accounts",[da]:"instruction modifications of multiply-passed account differ",[oa]:"executable accounts must be rent exempt",[ia]:"instruction changed executable accounts data",[aa]:"instruction changed the balance of an executable account",[ba]:"instruction changed executable bit of an account",[Ea]:"instruction modified data of an account it does not own",[Aa]:"instruction spent from the balance of an account it does not own",[Pa]:"generic instruction error",[zo]:"Provided owner is not allowed",[Vo]:"Account is immutable",[qo]:"Incorrect authority provided",[Sa]:"incorrect program id for instruction",[Fa]:"insufficient funds for instruction",[Na]:"invalid account data for instruction",[Do]:"Invalid account owner",[Ra]:"invalid program argument",[ca]:"program returned invalid error code",[Oa]:"invalid instruction data",[Jo]:"Failed to reallocate account data",[$o]:"Provided seeds do not result in a valid address",[jo]:"Accounts data allocations exceeded the maximum allowed per transaction",[Mo]:"Max accounts exceeded",[Lo]:"Max instruction trace length exceeded",[ea]:"Length of the seed is too long for address generation",[ra]:"An account required by the instruction is missing",[Ba]:"missing required signature for instruction",[Ta]:"instruction illegally modified the program id of an account",[ga]:"insufficient account keys for instruction",[Xo]:"Cross-program invocation with unauthorized signer or writable account",[Wo]:"Failed to create program execution environment",[Go]:"Program failed to compile",[Yo]:"Program failed to complete",[xa]:"instruction modified data of a read-only account",[ha]:"instruction changed the balance of a read-only account",[ta]:"Cross-program invocation reentrancy not allowed for this instruction",[ya]:"instruction modified rent epoch of an account",[ka]:"sum of account balances before and after instruction do not match",[Ia]:"instruction requires an initialized account",[wa]:"",[na]:"Unsupported program id",[Zo]:"Unsupported sysvar",[ms]:"Invalid instruction plan kind: $kind.",[Ys]:"The provided instruction plan is empty.",[qs]:"No failed transaction plan result was found in the provided transaction plan result.",[Vs]:"This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved \u2014 e.g. by targetting RPCs that support transaction bundles.",[Gs]:"The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",[Xs]:"The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",[fs]:"Invalid transaction plan kind: $kind.",[Ws]:"No more instructions to pack; the message packer has completed the instruction plan.",[Ks]:"Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",[Hs]:"Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",[Ds]:"Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",[Us]:"Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",[ja]:"The instruction does not have any accounts.",[Ma]:"The instruction does not have any data.",[La]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[Pi]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[Mi]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[bs]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[gs]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[vs]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[xs]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[ys]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Bi]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[Ci]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[ki]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[Ii]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[Si]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[yi]:"$__serverMessage",[oi]:"$__serverMessage",[ci]:"$__serverMessage",[vi]:"$__serverMessage",[Ei]:"Epoch rewards period still active at slot $slot",[mi]:"$__serverMessage",[fi]:"$__serverMessage",[Ti]:"Failed to query long-term storage; please try again",[hi]:"Minimum context slot has not been reached",[ui]:"Node is unhealthy; behind by $numSlotsBehind slots",[li]:"No snapshot",[ai]:"Transaction simulation failed",[Ai]:"Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",[pi]:"$__serverMessage",[gi]:"Transaction history is not available from this node",[di]:"$__serverMessage",[bi]:"Transaction signature length mismatch",[ii]:"Transaction signature verification failure",[xi]:"$__serverMessage",[Ha]:"Key pair bytes must be of length 64, got $byteLength.",[Da]:"Expected private key bytes with length 32. Actual length: $actualLength.",[Ua]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[za]:"The provided private key does not match the provided public key.",[Za]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[Ri]:"Lamports value must be in the range [0, 2e64-1]",[Oi]:"`$value` cannot be parsed as a `BigInt`",[Fi]:"$message",[Ni]:"`$value` cannot be parsed as a `Number`",[Li]:"No nonce account could be found at address `$nonceAccountAddress`",[xo]:"Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",[co]:"Attempted to sign an offchain message with an address that is not a signer for it",[ho]:"Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",[uo]:"The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",[Ao]:"The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",[go]:"Expected message format $expectedMessageFormat, got $actualMessageFormat",[mo]:"The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",[fo]:"Offchain message content must be non-empty",[bo]:"Offchain message must specify the address of at least one required signer",[lo]:"Offchain message envelope must reserve space for at least one signature",[vo]:"The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",[ao]:"The signatories of this offchain message must be listed in lexicographical order",[oo]:"An address must be listed no more than once among the signatories of an offchain message",[po]:"Offchain message is missing signatures for addresses: $addresses.",[no]:"Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",[Eo]:"The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",[io]:"Expected offchain message version $expectedVersion. Got $actualVersion.",[yo]:"This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",[ks]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[As]:"WebSocket was closed before payload could be added to the send buffer",[Es]:"WebSocket connection closed",[hs]:"WebSocket failed to connect",[Ts]:"Failed to obtain a subscription id from the server",[Is]:"Could not find an API plan for RPC method: `$method`",[Ss]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[Cs]:"HTTP error ($statusCode): $message",[Bs]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[Po]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[Ro]:"The provided value does not implement the `KeyPairSigner` interface",[No]:"The provided value does not implement the `MessageModifyingSigner` interface",[_o]:"The provided value does not implement the `MessagePartialSigner` interface",[Oo]:"The provided value does not implement any of the `MessageSigner` interfaces",[So]:"The provided value does not implement the `TransactionModifyingSigner` interface",[Bo]:"The provided value does not implement the `TransactionPartialSigner` interface",[Co]:"The provided value does not implement the `TransactionSendingSigner` interface",[Fo]:"The provided value does not implement any of the `TransactionSigner` interfaces",[Io]:"More than one `TransactionSendingSigner` was identified.",[ko]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[To]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[qa]:"Cannot export a non-extractable key.",[Qa]:"No digest implementation could be found.",[Ja]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[Xa]:`This runtime does not support the generation of Ed25519 key pairs.
|
|
30
|
+
|
|
31
|
+
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
32
|
+
|
|
33
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[Wa]:"No signature verification implementation could be found.",[Ya]:"No key generation implementation could be found.",[Ga]:"No signing implementation could be found.",[Va]:"No key export implementation could be found.",[_i]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[vn]:"Transaction processing left an account with an outstanding borrowed reference",[Rn]:"Account in use",[On]:"Account loaded twice",[Nn]:"Attempt to debit an account but found no record of a prior credit.",[pn]:"Transaction loads an address table account that doesn't exist",[Bn]:"This transaction has already been processed",[Cn]:"Blockhash not found",[In]:"Loader call chain is too deep",[xn]:"Transactions are currently disabled due to cluster maintenance",[sn]:"Transaction contains a duplicate instruction ($index) that is not allowed",[Fn]:"Insufficient funds for fee",[rn]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[Sn]:"This account may not be used to pay transaction fees",[Tn]:"Transaction contains an invalid account reference",[un]:"Transaction loads an address table account with invalid data",[cn]:"Transaction address table lookup uses an invalid index",[dn]:"Transaction loads an address table account with an invalid owner",[en]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[En]:"This program may not be used for executing instructions",[an]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[gn]:"Transaction loads a writable account that cannot be written",[tn]:"Transaction exceeded max loaded accounts data size cap",[kn]:"Transaction requires a fee but has no signature present",[_n]:"Attempt to load a program that does not exist",[Js]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[$s]:"ResanitizationNeeded",[hn]:"Transaction failed to sanitize accounts offsets correctly",[An]:"Transaction did not pass signature verification",[ln]:"Transaction locked too many accounts",[Qs]:"Sum of account balances before and after transaction do not match",[Pn]:"The transaction failed with the error `$errorName`",[yn]:"Transaction version is unsupported",[fn]:"Transaction would exceed account data limit within the block",[nn]:"Transaction would exceed total account data limit",[mn]:"Transaction would exceed max account limit within the block",[bn]:"Transaction would exceed max Block Cost Limit",[on]:"Transaction would exceed max Vote Cost Limit",[Dn]:"Attempted to sign a transaction with an address that is not a signer for it",[Gn]:"Transaction is missing an address at index: $index.",[Un]:"Transaction has no expected signers therefore it cannot be encoded",[Mn]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[to]:"Transaction does not have a blockhash lifetime",[eo]:"Transaction is not a durable nonce transaction",[Jn]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[Qn]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[Wn]:"No fee payer set in CompiledTransaction",[Xn]:"Could not find program address at index $index",[zn]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[jn]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[Vn]:"Transaction is missing a fee payer.",[qn]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[Hn]:"Transaction first instruction is not advance nonce account instruction.",[Kn]:"Transaction with no instructions cannot be durable nonce transaction.",[so]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[ro]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[Zn]:"The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",[Yn]:"Transaction is missing signatures for addresses: $addresses.",[$n]:"Transaction version must be in the range [0, 127]. `$actualVersion` given",[Ln]:"This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 0.",[wn]:"The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction."},_8="i",kQ="t";function ps($,J={}){let Q=ls[$];if(Q.length===0)return"";let X;function W(G){if(X[kQ]===2){let V=Q.slice(X[_8]+1,G);Y.push(V in J?`${J[V]}`:`$${V}`)}else if(X[kQ]===1)Y.push(Q.slice(X[_8],G))}let Y=[];return Q.split("").forEach((G,V)=>{if(V===0){X={[_8]:0,[kQ]:Q[0]==="\\"?0:Q[0]==="$"?2:1};return}let q;switch(X[kQ]){case 0:q={[_8]:V,[kQ]:1};break;case 1:if(G==="\\")q={[_8]:V,[kQ]:0};else if(G==="$")q={[_8]:V,[kQ]:2};break;case 2:if(G==="\\")q={[_8]:V,[kQ]:0};else if(G==="$")q={[_8]:V,[kQ]:2};else if(!G.match(/\w/))q={[_8]:V,[kQ]:1};break}if(q){if(X!==q)W(V);X=q}}),W(),Y.join("")}function ds($,J={}){return ps($,J)}function iP($,J){if($ instanceof Error&&$.name==="SolanaError"){if(J!==void 0)return $.context.__code===J;return!0}return!1}var FJ=class extends Error{cause=this.cause;context;constructor(...[$,J]){let Q,X;if(J)Object.entries(Object.getOwnPropertyDescriptors(J)).forEach(([Y,G])=>{if(Y==="cause")X={cause:G.value};else{if(Q===void 0)Q={__code:$};Object.defineProperty(Q,Y,G)}});let W=ds($,Q);super(W,X);this.context=Object.freeze(Q===void 0?{__code:$}:Q),this.name="SolanaError"}};function us($,J){if($.length>=J)return $;let Q=new Uint8Array(J).fill(0);return Q.set($),Q}var cs=($,J)=>us($.length<=J?$:$.slice(0,J),J);function is($,J){return"fixedSize"in J?J.fixedSize:J.getSizeFromValue($)}function aP($){return Object.freeze({...$,encode:(J)=>{let Q=new Uint8Array(is(J,$));return $.write(J,Q,0),Q}})}function as($){return Object.freeze({...$,decode:(J,Q=0)=>$.read(J,Q)[0]})}function NX($){return"fixedSize"in $&&typeof $.fixedSize==="number"}function os($){return!NX($)}function oP($,J){if(NX($)!==NX(J))throw new FJ(xH);if(NX($)&&NX(J)&&$.fixedSize!==J.fixedSize)throw new FJ(vH,{decoderFixedSize:J.fixedSize,encoderFixedSize:$.fixedSize});if(!NX($)&&!NX(J)&&$.maxSize!==J.maxSize)throw new FJ(bH,{decoderMaxSize:J.maxSize,encoderMaxSize:$.maxSize});return{...J,...$,decode:J.decode,encode:$.encode,read:J.read,write:$.write}}function ns($,J,Q,X=0){let W=Q.length-X;if(W<J)throw new FJ(hH,{bytesLength:W,codecDescription:$,expected:J})}function nP($,J){return aP({fixedSize:J,write:(Q,X,W)=>{let Y=$.encode(Q),G=Y.length>J?Y.slice(0,J):Y;return X.set(G,W),W+J}})}function sP($,J){return as({fixedSize:J,read:(Q,X)=>{if(ns("fixCodecSize",J,Q,X),X>0||Q.length>J)Q=Q.slice(X,X+J);if(NX($))Q=cs(Q,$.fixedSize);let[W]=$.read(Q,0);return[W,X+J]}})}function rP($,J){return aP({...os($)?{...$,getSizeFromValue:(Q)=>$.getSizeFromValue(J(Q))}:$,write:(Q,X,W)=>$.write(J(Q),X,W)})}var ss=1,rs=2,ts=3,es=4,$r=5,Jr=6,Qr=7,Xr=8,Wr=9,Yr=10,Gr=-32700,Vr=-32603,qr=-32602,Kr=-32601,Hr=-32600,Dr=-32019,Ur=-32018,Zr=-32017,zr=-32016,jr=-32015,Mr=-32014,Lr=-32013,wr=-32012,Pr=-32011,Rr=-32010,Or=-32009,Nr=-32008,_r=-32007,Fr=-32006,Sr=-32005,Br=-32004,Cr=-32003,Ir=-32002,kr=-32001,Tr=2800000,Ar=2800001,Er=2800002,hr=2800003,xr=2800004,vr=2800005,br=2800006,yr=2800007,gr=2800008,mr=2800009,fr=2800010,lr=2800011,pr=3230000,dr=32300001,ur=3230002,cr=3230003,ir=3230004,ar=3610000,yH=3610001,tP=3610002,gH=3610003,eP=3610004,mH=3610005,fH=3610006,or=3610007,lH=3611000,nr=3704000,sr=3704001,rr=3704002,tr=3704003,er=3704004,$t=4128000,Jt=4128001,Qt=4128002,Xt=4615000,Wt=4615001,Yt=4615002,Gt=4615003,Vt=4615004,qt=4615005,Kt=4615006,Ht=4615007,Dt=4615008,Ut=4615009,Zt=4615010,zt=4615011,jt=4615012,Mt=4615013,Lt=4615014,wt=4615015,Pt=4615016,Rt=4615017,Ot=4615018,Nt=4615019,_t=4615020,Ft=4615021,St=4615022,Bt=4615023,Ct=4615024,It=4615025,kt=4615026,Tt=4615027,At=4615028,Et=4615029,ht=4615030,xt=4615031,vt=4615032,bt=4615033,yt=4615034,gt=4615035,mt=4615036,ft=4615037,lt=4615038,pt=4615039,dt=4615040,ut=4615041,ct=4615042,it=4615043,at=4615044,ot=4615045,nt=4615046,st=4615047,rt=4615048,tt=4615049,et=4615050,$e=4615051,Je=4615052,Qe=4615053,Xe=4615054,We=5508000,Ye=5508001,Ge=5508002,Ve=5508003,qe=5508004,Ke=5508005,He=5508006,De=5508007,Ue=5508008,Ze=5508009,ze=5508010,je=5508011,Me=5607000,Le=5607001,we=5607002,Pe=5607003,Re=5607004,Oe=5607005,Ne=5607006,_e=5607007,Fe=5607008,Se=5607009,Be=5607010,Ce=5607011,Ie=5607012,ke=5607013,Te=5607014,Ae=5607015,Ee=5607016,he=5607017,xe=5663000,ve=5663001,be=5663002,ye=5663003,ge=5663004,me=5663005,fe=5663006,le=5663007,pe=5663008,de=5663009,ue=5663010,ce=5663011,ie=5663012,ae=5663013,oe=5663014,ne=5663015,se=5663016,re=5663017,te=5663018,ee=5663019,$00=5663020,J00=5663021,Q00=5663022,X00=7050000,W00=7050001,Y00=7050002,G00=7050003,V00=7050004,q00=7050005,K00=7050006,H00=7050007,D00=7050008,U00=7050009,Z00=7050010,z00=7050011,j00=7050012,M00=7050013,L00=7050014,w00=7050015,P00=7050016,R00=7050017,O00=7050018,N00=7050019,_00=7050020,F00=7050021,S00=7050022,B00=7050023,C00=7050024,I00=7050025,k00=7050026,T00=7050027,A00=7050028,E00=7050029,h00=7050030,x00=7050031,v00=7050032,b00=7050033,y00=7050034,g00=7050035,m00=7050036,f00=7618000,l00=7618001,p00=7618002,d00=7618003,u00=7618004,c00=7618005,i00=7618006,a00=7618007,o00=7618008,n00=7618009,s00=8078000,r00=8078001,t00=8078002,e00=8078003,$90=8078004,J90=8078005,Q90=8078006,X90=8078007,W90=8078008,Y90=8078009,G90=8078010,V90=8078011,q90=8078012,K90=8078013,H90=8078014,D90=8078015,U90=8078016,Z90=8078017,z90=8078018,j90=8078019,M90=8078020,L90=8078021,w90=8078022,P90=8078023,R90=8100000,O90=8100001,N90=8100002,_90=8100003,F90=8190000,S90=8190001,B90=8190002,C90=8190003,I90=8190004,k90=9900000,T90=9900001,A90=9900002,E90=9900003,h90=9900004,x90=9900005,v90=9900006;var b90={[pr]:"Account not found at address: $address",[ir]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[cr]:"Expected decoded account at address: $address",[ur]:"Failed to decode account data at address: $address",[dr]:"Accounts not found at addresses: $addresses",[mr]:"Unable to find a viable program address bump seed.",[Er]:"$putativeAddress is not a base58-encoded address.",[Tr]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[hr]:"The `CryptoKey` must be an `Ed25519` public key.",[lr]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[gr]:"Invalid seeds; point must fall off the Ed25519 curve.",[xr]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[br]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[yr]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[vr]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[fr]:"Program address cannot end with PDA marker.",[Ar]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[es]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[ss]:"The network has progressed past the last block for which this transaction could have been committed.",[s00]:"Codec [$codecDescription] cannot decode empty byte arrays.",[w90]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[M90]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[J90]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[Q90]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[$90]:"Encoder and decoder must either both be fixed-size or variable-size.",[W90]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[t00]:"Expected a fixed-size codec, got a variable-size one.",[K90]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[e00]:"Expected a variable-size codec, got a fixed-size one.",[j90]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[r00]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[z90]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[Y90]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[G90]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[D90]:"Invalid literal union variant. Expected one of [$variants], got $value.",[X90]:"Expected [$codecDescription] to have $expected items, got $actual.",[q90]:"Invalid value $value for base $base with alphabet $alphabet.",[U90]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[V90]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[H90]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[L90]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[Z90]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[P90]:"This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",[lH]:"No random values implementation could be found.",[Ut]:"instruction requires an uninitialized account",[Bt]:"instruction tries to borrow reference for an account which is already borrowed",[Ct]:"instruction left account with an outstanding borrowed reference",[Ft]:"program other than the account's owner changed the size of the account data",[qt]:"account data too small for instruction",[St]:"instruction expected an executable account",[nt]:"An account does not have enough lamports to be rent-exempt",[rt]:"Program arithmetic overflowed",[ot]:"Failed to serialize or deserialize account data: $encodedData",[Xe]:"Builtin programs must consume compute units",[vt]:"Cross-program invocation call depth too deep",[lt]:"Computational budget exceeded",[kt]:"custom program error: #$code",[Rt]:"instruction contains duplicate accounts",[It]:"instruction modifications of multiply-passed account differ",[ht]:"executable accounts must be rent exempt",[At]:"instruction changed executable accounts data",[Et]:"instruction changed the balance of an executable account",[Ot]:"instruction changed executable bit of an account",[Lt]:"instruction modified data of an account it does not own",[Mt]:"instruction spent from the balance of an account it does not own",[Wt]:"generic instruction error",[et]:"Provided owner is not allowed",[it]:"Account is immutable",[at]:"Incorrect authority provided",[Ht]:"incorrect program id for instruction",[Kt]:"insufficient funds for instruction",[Vt]:"invalid account data for instruction",[st]:"Invalid account owner",[Yt]:"invalid program argument",[Tt]:"program returned invalid error code",[Gt]:"invalid instruction data",[ft]:"Failed to reallocate account data",[mt]:"Provided seeds do not result in a valid address",[$e]:"Accounts data allocations exceeded the maximum allowed per transaction",[Je]:"Max accounts exceeded",[Qe]:"Max instruction trace length exceeded",[gt]:"Length of the seed is too long for address generation",[bt]:"An account required by the instruction is missing",[Dt]:"missing required signature for instruction",[jt]:"instruction illegally modified the program id of an account",[_t]:"insufficient account keys for instruction",[pt]:"Cross-program invocation with unauthorized signer or writable account",[dt]:"Failed to create program execution environment",[ct]:"Program failed to compile",[ut]:"Program failed to complete",[Pt]:"instruction modified data of a read-only account",[wt]:"instruction changed the balance of a read-only account",[yt]:"Cross-program invocation reentrancy not allowed for this instruction",[Nt]:"instruction modified rent epoch of an account",[zt]:"sum of account balances before and after instruction do not match",[Zt]:"instruction requires an initialized account",[Xt]:"",[xt]:"Unsupported program id",[tt]:"Unsupported sysvar",[x90]:"Invalid instruction plan kind: $kind.",[p00]:"The provided instruction plan is empty.",[c00]:"No failed transaction plan result was found in the provided transaction plan result.",[u00]:"This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved \u2014 e.g. by targetting RPCs that support transaction bundles.",[d00]:"The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",[f00]:"The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",[v90]:"Invalid transaction plan kind: $kind.",[l00]:"No more instructions to pack; the message packer has completed the instruction plan.",[i00]:"Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",[a00]:"Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",[o00]:"Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",[n00]:"Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",[$t]:"The instruction does not have any accounts.",[Jt]:"The instruction does not have any data.",[Qt]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[$r]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[rs]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[A90]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[h90]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[T90]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[k90]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[E90]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Vr]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[qr]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[Hr]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[Kr]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[Gr]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[wr]:"$__serverMessage",[kr]:"$__serverMessage",[Br]:"$__serverMessage",[Mr]:"$__serverMessage",[Zr]:"Epoch rewards period still active at slot $slot",[Rr]:"$__serverMessage",[Or]:"$__serverMessage",[Dr]:"Failed to query long-term storage; please try again",[zr]:"Minimum context slot has not been reached",[Sr]:"Node is unhealthy; behind by $numSlotsBehind slots",[Nr]:"No snapshot",[Ir]:"Transaction simulation failed",[Ur]:"Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",[_r]:"$__serverMessage",[Pr]:"Transaction history is not available from this node",[Fr]:"$__serverMessage",[Lr]:"Transaction signature length mismatch",[Cr]:"Transaction signature verification failure",[jr]:"$__serverMessage",[nr]:"Key pair bytes must be of length 64, got $byteLength.",[sr]:"Expected private key bytes with length 32. Actual length: $actualLength.",[rr]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[er]:"The provided private key does not match the provided public key.",[tr]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[Jr]:"Lamports value must be in the range [0, 2e64-1]",[Qr]:"`$value` cannot be parsed as a `BigInt`",[Yr]:"$message",[Xr]:"`$value` cannot be parsed as a `Number`",[ts]:"No nonce account could be found at address `$nonceAccountAddress`",[Pe]:"Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",[ke]:"Attempted to sign an offchain message with an address that is not a signer for it",[we]:"Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",[Ie]:"The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",[Me]:"The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",[_e]:"Expected message format $expectedMessageFormat, got $actualMessageFormat",[Fe]:"The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",[Se]:"Offchain message content must be non-empty",[Oe]:"Offchain message must specify the address of at least one required signer",[Be]:"Offchain message envelope must reserve space for at least one signature",[Re]:"The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",[Ae]:"The signatories of this offchain message must be listed in lexicographical order",[Ee]:"An address must be listed no more than once among the signatories of an offchain message",[Ce]:"Offchain message is missing signatures for addresses: $addresses.",[he]:"Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",[Le]:"The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",[Te]:"Expected offchain message version $expectedVersion. Got $actualVersion.",[Ne]:"This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",[F90]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[B90]:"WebSocket was closed before payload could be added to the send buffer",[C90]:"WebSocket connection closed",[I90]:"WebSocket failed to connect",[S90]:"Failed to obtain a subscription id from the server",[_90]:"Could not find an API plan for RPC method: `$method`",[R90]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[N90]:"HTTP error ($statusCode): $message",[O90]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[We]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[Ye]:"The provided value does not implement the `KeyPairSigner` interface",[Ve]:"The provided value does not implement the `MessageModifyingSigner` interface",[qe]:"The provided value does not implement the `MessagePartialSigner` interface",[Ge]:"The provided value does not implement any of the `MessageSigner` interfaces",[He]:"The provided value does not implement the `TransactionModifyingSigner` interface",[De]:"The provided value does not implement the `TransactionPartialSigner` interface",[Ue]:"The provided value does not implement the `TransactionSendingSigner` interface",[Ke]:"The provided value does not implement any of the `TransactionSigner` interfaces",[Ze]:"More than one `TransactionSendingSigner` was identified.",[ze]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[je]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[or]:"Cannot export a non-extractable key.",[yH]:"No digest implementation could be found.",[ar]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[tP]:`This runtime does not support the generation of Ed25519 key pairs.
|
|
34
|
+
|
|
35
|
+
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
36
|
+
|
|
37
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[gH]:"No signature verification implementation could be found.",[eP]:"No key generation implementation could be found.",[mH]:"No signing implementation could be found.",[fH]:"No key export implementation could be found.",[Wr]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[P00]:"Transaction processing left an account with an outstanding borrowed reference",[W00]:"Account in use",[Y00]:"Account loaded twice",[G00]:"Attempt to debit an account but found no record of a prior credit.",[B00]:"Transaction loads an address table account that doesn't exist",[H00]:"This transaction has already been processed",[D00]:"Blockhash not found",[U00]:"Loader call chain is too deep",[w00]:"Transactions are currently disabled due to cluster maintenance",[h00]:"Transaction contains a duplicate instruction ($index) that is not allowed",[q00]:"Insufficient funds for fee",[x00]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[K00]:"This account may not be used to pay transaction fees",[z00]:"Transaction contains an invalid account reference",[I00]:"Transaction loads an address table account with invalid data",[k00]:"Transaction address table lookup uses an invalid index",[C00]:"Transaction loads an address table account with an invalid owner",[b00]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[M00]:"This program may not be used for executing instructions",[T00]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[N00]:"Transaction loads a writable account that cannot be written",[v00]:"Transaction exceeded max loaded accounts data size cap",[Z00]:"Transaction requires a fee but has no signature present",[V00]:"Attempt to load a program that does not exist",[g00]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[y00]:"ResanitizationNeeded",[L00]:"Transaction failed to sanitize accounts offsets correctly",[j00]:"Transaction did not pass signature verification",[S00]:"Transaction locked too many accounts",[m00]:"Sum of account balances before and after transaction do not match",[X00]:"The transaction failed with the error `$errorName`",[O00]:"Transaction version is unsupported",[F00]:"Transaction would exceed account data limit within the block",[E00]:"Transaction would exceed total account data limit",[_00]:"Transaction would exceed max account limit within the block",[R00]:"Transaction would exceed max Block Cost Limit",[A00]:"Transaction would exceed max Vote Cost Limit",[ne]:"Attempted to sign a transaction with an address that is not a signer for it",[ue]:"Transaction is missing an address at index: $index.",[se]:"Transaction has no expected signers therefore it cannot be encoded",[$00]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[be]:"Transaction does not have a blockhash lifetime",[ye]:"Transaction is not a durable nonce transaction",[me]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[fe]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[pe]:"No fee payer set in CompiledTransaction",[le]:"Could not find program address at index $index",[te]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[ee]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[ce]:"Transaction is missing a fee payer.",[ie]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[oe]:"Transaction first instruction is not advance nonce account instruction.",[ae]:"Transaction with no instructions cannot be durable nonce transaction.",[xe]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[ve]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[re]:"The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",[de]:"Transaction is missing signatures for addresses: $addresses.",[ge]:"Transaction version must be in the range [0, 127]. `$actualVersion` given",[J00]:"This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 0.",[Q00]:"The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction."},F8="i",TQ="t";function y90($,J={}){let Q=b90[$];if(Q.length===0)return"";let X;function W(G){if(X[TQ]===2){let V=Q.slice(X[F8]+1,G);Y.push(V in J?`${J[V]}`:`$${V}`)}else if(X[TQ]===1)Y.push(Q.slice(X[F8],G))}let Y=[];return Q.split("").forEach((G,V)=>{if(V===0){X={[F8]:0,[TQ]:Q[0]==="\\"?0:Q[0]==="$"?2:1};return}let q;switch(X[TQ]){case 0:q={[F8]:V,[TQ]:1};break;case 1:if(G==="\\")q={[F8]:V,[TQ]:0};else if(G==="$")q={[F8]:V,[TQ]:2};break;case 2:if(G==="\\")q={[F8]:V,[TQ]:0};else if(G==="$")q={[F8]:V,[TQ]:2};else if(!G.match(/\w/))q={[F8]:V,[TQ]:1};break}if(q){if(X!==q)W(V);X=q}}),W(),Y.join("")}function g90($,J={}){return y90($,J)}var g5=class extends Error{cause=this.cause;context;constructor(...[$,J]){let Q,X;if(J)Object.entries(Object.getOwnPropertyDescriptors(J)).forEach(([Y,G])=>{if(Y==="cause")X={cause:G.value};else{if(Q===void 0)Q={__code:$};Object.defineProperty(Q,Y,G)}});let W=g90($,Q);super(W,X);this.context=Object.freeze(Q===void 0?{__code:$}:Q),this.name="SolanaError"}};function $R(){if(typeof globalThis.crypto>"u"||typeof globalThis.crypto.getRandomValues!=="function")throw new g5(lH)}function JR(){if(typeof globalThis.crypto>"u"||typeof globalThis.crypto.subtle?.digest!=="function")throw new g5(yH)}function U4(){if(typeof globalThis.crypto>"u"||typeof globalThis.crypto.subtle?.exportKey!=="function")throw new g5(gH)}function QR(){if(typeof globalThis.crypto>"u"||typeof globalThis.crypto.subtle?.sign!=="function")throw new g5(mH)}function XR(){if(typeof globalThis.crypto>"u"||typeof globalThis.crypto.subtle?.verify!=="function")throw new g5(fH)}var pH,dH;function uH(){if(!pH)pH=SH();return pH}function m90(){if(!dH)dH=BH();return dH}function Z4($){if($.length<32||$.length>44)return!1;let J=uH();try{return J.encode($).byteLength===32}catch{return!1}}function cH($){if($.length<32||$.length>44)throw new FJ(IH,{actualLength:$.length});let X=uH().encode($).byteLength;if(X!==32)throw new FJ(CH,{actualLength:X})}function f90($){return cH($),$}function S8(){return rP(nP(uH(),32),($)=>f90($))}function Y9(){return sP(m90(),32)}function l90(){return oP(S8(),Y9())}function z4(){return new Intl.Collator("en",{caseFirst:"lower",ignorePunctuation:!1,localeMatcher:"best fit",numeric:!1,sensitivity:"variant",usage:"sort"}).compare}var p90=37095705934669439343138083508754565189542113879843219016388785533085940283555n,XJ=57896044618658097711785492504343953926634992332820282019728792003956564819949n,WR=19681161376707505956807079304988542015446066515923890162744021073123829784752n;function lJ($){let J=$%XJ;return J>=0n?J:XJ+J}function AQ($,J){let Q=$;while(J-- >0n)Q*=Q,Q%=XJ;return Q}function d90($){let Q=$*$%XJ*$%XJ,X=AQ(Q,2n)*Q%XJ,W=AQ(X,1n)*$%XJ,Y=AQ(W,5n)*W%XJ,G=AQ(Y,10n)*Y%XJ,V=AQ(G,20n)*G%XJ,q=AQ(V,40n)*V%XJ,H=AQ(q,80n)*q%XJ,Z=AQ(H,80n)*q%XJ,M=AQ(Z,10n)*Y%XJ;return AQ(M,2n)*$%XJ}function u90($,J){let Q=lJ(J*J*J),X=lJ(Q*Q*J),W=d90($*X),Y=lJ($*Q*W),G=lJ(J*Y*Y),V=Y,q=lJ(Y*WR),H=G===$,Z=G===lJ(-$),M=G===lJ(-$*WR);if(H)Y=V;if(Z||M)Y=q;if((lJ(Y)&1n)===1n)Y=lJ(-Y);if(!H&&!Z)return null;return Y}function c90($,J){let Q=lJ($*$),X=lJ(Q-1n),W=lJ(p90*Q+1n),Y=u90(X,W);if(Y===null)return!1;let G=(J&128)!==0;if(Y===0n&&G)return!1;return!0}function i90($){let J=$.toString(16);if(J.length===1)return`0${J}`;else return J}function a90($){let Q=`0x${$.reduce((X,W,Y)=>`${i90(Y===31?W&-129:W)}${X}`,"")}`;return BigInt(Q)}function o90($){if($.byteLength!==32)return!1;let J=a90($);return c90(J,$[31])}var YR=32,GR=16,n90=[80,114,111,103,114,97,109,68,101,114,105,118,101,100,65,100,100,114,101,115,115];async function s90({programAddress:$,seeds:J}){if(JR(),J.length>GR)throw new FJ(TH,{actual:J.length,maxSeeds:GR});let Q,X=J.reduce((q,H,Z)=>{let M=typeof H==="string"?(Q||=new TextEncoder).encode(H):H;if(M.byteLength>YR)throw new FJ(AH,{actual:M.byteLength,index:Z,maxSeedLength:YR});return q.push(...M),q},[]),W=l90(),Y=W.encode($),G=await crypto.subtle.digest("SHA-256",new Uint8Array([...X,...Y,...n90])),V=new Uint8Array(G);if(o90(V))throw new FJ(D4);return W.decode(V)}async function VR({programAddress:$,seeds:J}){let Q=255;while(Q>0)try{return[await s90({programAddress:$,seeds:[...J,new Uint8Array([Q])]}),Q]}catch(X){if(iP(X,D4))Q--;else throw X}throw new FJ(EH)}async function j4($){if(U4(),$.type!=="public"||$.algorithm.name!=="Ed25519")throw new FJ(kH);let J=await crypto.subtle.exportKey("raw",$);return Y9().decode(new Uint8Array(J))}var r90=1,t90=2,e90=3,$$0=4,J$0=5,Q$0=6,X$0=7,W$0=8,Y$0=9,G$0=10,V$0=-32700,q$0=-32603,K$0=-32602,H$0=-32601,D$0=-32600,U$0=-32019,Z$0=-32018,z$0=-32017,j$0=-32016,M$0=-32015,L$0=-32014,w$0=-32013,P$0=-32012,R$0=-32011,O$0=-32010,N$0=-32009,_$0=-32008,F$0=-32007,S$0=-32006,B$0=-32005,C$0=-32004,I$0=-32003,k$0=-32002,T$0=-32001,A$0=2800000,E$0=2800001,h$0=2800002,x$0=2800003,v$0=2800004,b$0=2800005,y$0=2800006,g$0=2800007,m$0=2800008,f$0=2800009,l$0=2800010,p$0=2800011,d$0=3230000,u$0=32300001,c$0=3230002,i$0=3230003,a$0=3230004,o$0=3610000,n$0=3610001,s$0=3610002,r$0=3610003,t$0=3610004,e$0=3610005,$J0=3610006,JJ0=3610007,QJ0=3611000,XJ0=3704000,WJ0=3704001,YJ0=3704002,GJ0=3704003,VJ0=3704004,qJ0=4128000,KJ0=4128001,HJ0=4128002,DJ0=4615000,UJ0=4615001,ZJ0=4615002,zJ0=4615003,jJ0=4615004,MJ0=4615005,LJ0=4615006,wJ0=4615007,PJ0=4615008,RJ0=4615009,OJ0=4615010,NJ0=4615011,_J0=4615012,FJ0=4615013,SJ0=4615014,BJ0=4615015,CJ0=4615016,IJ0=4615017,kJ0=4615018,TJ0=4615019,AJ0=4615020,EJ0=4615021,hJ0=4615022,xJ0=4615023,vJ0=4615024,bJ0=4615025,yJ0=4615026,gJ0=4615027,mJ0=4615028,fJ0=4615029,lJ0=4615030,pJ0=4615031,dJ0=4615032,uJ0=4615033,cJ0=4615034,iJ0=4615035,aJ0=4615036,oJ0=4615037,nJ0=4615038,sJ0=4615039,rJ0=4615040,tJ0=4615041,eJ0=4615042,$Q0=4615043,JQ0=4615044,QQ0=4615045,XQ0=4615046,WQ0=4615047,YQ0=4615048,GQ0=4615049,VQ0=4615050,qQ0=4615051,KQ0=4615052,HQ0=4615053,DQ0=4615054,UQ0=5508000,ZQ0=5508001,zQ0=5508002,jQ0=5508003,MQ0=5508004,LQ0=5508005,wQ0=5508006,PQ0=5508007,RQ0=5508008,OQ0=5508009,NQ0=5508010,_Q0=5508011,FQ0=5607000,SQ0=5607001,BQ0=5607002,CQ0=5607003,IQ0=5607004,kQ0=5607005,TQ0=5607006,AQ0=5607007,EQ0=5607008,hQ0=5607009,xQ0=5607010,vQ0=5607011,bQ0=5607012,yQ0=5607013,gQ0=5607014,mQ0=5607015,fQ0=5607016,lQ0=5607017,pQ0=5663000,dQ0=5663001,uQ0=5663002,cQ0=5663003,iQ0=5663004,aQ0=5663005,oQ0=5663006,nQ0=5663007,sQ0=5663008,rQ0=5663009,tQ0=5663010,eQ0=5663011,$80=5663012,J80=5663013,Q80=5663014,X80=5663015,W80=5663016,Y80=5663017,G80=5663018,V80=5663019,q80=5663020,K80=5663021,H80=5663022,D80=7050000,U80=7050001,Z80=7050002,z80=7050003,j80=7050004,M80=7050005,L80=7050006,w80=7050007,P80=7050008,R80=7050009,O80=7050010,N80=7050011,_80=7050012,F80=7050013,S80=7050014,B80=7050015,C80=7050016,I80=7050017,k80=7050018,T80=7050019,A80=7050020,E80=7050021,h80=7050022,x80=7050023,v80=7050024,b80=7050025,y80=7050026,g80=7050027,m80=7050028,f80=7050029,l80=7050030,p80=7050031,d80=7050032,u80=7050033,c80=7050034,i80=7050035,a80=7050036,o80=7618000,n80=7618001,s80=7618002,r80=7618003,t80=7618004,e80=7618005,$X0=7618006,JX0=7618007,QX0=7618008,XX0=7618009,iH=8078000,aH=8078001,qR=8078002,KR=8078003,HR=8078004,DR=8078005,UR=8078006,WX0=8078007,YX0=8078008,GX0=8078009,VX0=8078010,qX0=8078011,KX0=8078012,M4=8078013,oH=8078014,HX0=8078015,DX0=8078016,UX0=8078017,ZX0=8078018,zX0=8078019,ZR=8078020,zR=8078021,jX0=8078022,jR=8078023,MX0=8100000,LX0=8100001,wX0=8100002,PX0=8100003,RX0=8190000,OX0=8190001,NX0=8190002,_X0=8190003,FX0=8190004,SX0=9900000,BX0=9900001,CX0=9900002,IX0=9900003,kX0=9900004,TX0=9900005,AX0=9900006;var EX0={[d$0]:"Account not found at address: $address",[a$0]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[i$0]:"Expected decoded account at address: $address",[c$0]:"Failed to decode account data at address: $address",[u$0]:"Accounts not found at addresses: $addresses",[f$0]:"Unable to find a viable program address bump seed.",[h$0]:"$putativeAddress is not a base58-encoded address.",[A$0]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[x$0]:"The `CryptoKey` must be an `Ed25519` public key.",[p$0]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[m$0]:"Invalid seeds; point must fall off the Ed25519 curve.",[v$0]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[y$0]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[g$0]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[b$0]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[l$0]:"Program address cannot end with PDA marker.",[E$0]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[$$0]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[r90]:"The network has progressed past the last block for which this transaction could have been committed.",[iH]:"Codec [$codecDescription] cannot decode empty byte arrays.",[jX0]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[ZR]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[DR]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[UR]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[HR]:"Encoder and decoder must either both be fixed-size or variable-size.",[YX0]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[qR]:"Expected a fixed-size codec, got a variable-size one.",[M4]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[KR]:"Expected a variable-size codec, got a fixed-size one.",[zX0]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[aH]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[ZX0]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[GX0]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[VX0]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[HX0]:"Invalid literal union variant. Expected one of [$variants], got $value.",[WX0]:"Expected [$codecDescription] to have $expected items, got $actual.",[KX0]:"Invalid value $value for base $base with alphabet $alphabet.",[DX0]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[qX0]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[oH]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[zR]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[UX0]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[jR]:"This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",[QJ0]:"No random values implementation could be found.",[RJ0]:"instruction requires an uninitialized account",[xJ0]:"instruction tries to borrow reference for an account which is already borrowed",[vJ0]:"instruction left account with an outstanding borrowed reference",[EJ0]:"program other than the account's owner changed the size of the account data",[MJ0]:"account data too small for instruction",[hJ0]:"instruction expected an executable account",[XQ0]:"An account does not have enough lamports to be rent-exempt",[YQ0]:"Program arithmetic overflowed",[QQ0]:"Failed to serialize or deserialize account data: $encodedData",[DQ0]:"Builtin programs must consume compute units",[dJ0]:"Cross-program invocation call depth too deep",[nJ0]:"Computational budget exceeded",[yJ0]:"custom program error: #$code",[IJ0]:"instruction contains duplicate accounts",[bJ0]:"instruction modifications of multiply-passed account differ",[lJ0]:"executable accounts must be rent exempt",[mJ0]:"instruction changed executable accounts data",[fJ0]:"instruction changed the balance of an executable account",[kJ0]:"instruction changed executable bit of an account",[SJ0]:"instruction modified data of an account it does not own",[FJ0]:"instruction spent from the balance of an account it does not own",[UJ0]:"generic instruction error",[VQ0]:"Provided owner is not allowed",[$Q0]:"Account is immutable",[JQ0]:"Incorrect authority provided",[wJ0]:"incorrect program id for instruction",[LJ0]:"insufficient funds for instruction",[jJ0]:"invalid account data for instruction",[WQ0]:"Invalid account owner",[ZJ0]:"invalid program argument",[gJ0]:"program returned invalid error code",[zJ0]:"invalid instruction data",[oJ0]:"Failed to reallocate account data",[aJ0]:"Provided seeds do not result in a valid address",[qQ0]:"Accounts data allocations exceeded the maximum allowed per transaction",[KQ0]:"Max accounts exceeded",[HQ0]:"Max instruction trace length exceeded",[iJ0]:"Length of the seed is too long for address generation",[uJ0]:"An account required by the instruction is missing",[PJ0]:"missing required signature for instruction",[_J0]:"instruction illegally modified the program id of an account",[AJ0]:"insufficient account keys for instruction",[sJ0]:"Cross-program invocation with unauthorized signer or writable account",[rJ0]:"Failed to create program execution environment",[eJ0]:"Program failed to compile",[tJ0]:"Program failed to complete",[CJ0]:"instruction modified data of a read-only account",[BJ0]:"instruction changed the balance of a read-only account",[cJ0]:"Cross-program invocation reentrancy not allowed for this instruction",[TJ0]:"instruction modified rent epoch of an account",[NJ0]:"sum of account balances before and after instruction do not match",[OJ0]:"instruction requires an initialized account",[DJ0]:"",[pJ0]:"Unsupported program id",[GQ0]:"Unsupported sysvar",[TX0]:"Invalid instruction plan kind: $kind.",[s80]:"The provided instruction plan is empty.",[e80]:"No failed transaction plan result was found in the provided transaction plan result.",[t80]:"This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved \u2014 e.g. by targetting RPCs that support transaction bundles.",[r80]:"The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",[o80]:"The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",[AX0]:"Invalid transaction plan kind: $kind.",[n80]:"No more instructions to pack; the message packer has completed the instruction plan.",[$X0]:"Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",[JX0]:"Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",[QX0]:"Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",[XX0]:"Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",[qJ0]:"The instruction does not have any accounts.",[KJ0]:"The instruction does not have any data.",[HJ0]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[J$0]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[t90]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[CX0]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[kX0]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[BX0]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[SX0]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[IX0]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[q$0]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[K$0]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[D$0]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[H$0]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[V$0]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[P$0]:"$__serverMessage",[T$0]:"$__serverMessage",[C$0]:"$__serverMessage",[L$0]:"$__serverMessage",[z$0]:"Epoch rewards period still active at slot $slot",[O$0]:"$__serverMessage",[N$0]:"$__serverMessage",[U$0]:"Failed to query long-term storage; please try again",[j$0]:"Minimum context slot has not been reached",[B$0]:"Node is unhealthy; behind by $numSlotsBehind slots",[_$0]:"No snapshot",[k$0]:"Transaction simulation failed",[Z$0]:"Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",[F$0]:"$__serverMessage",[R$0]:"Transaction history is not available from this node",[S$0]:"$__serverMessage",[w$0]:"Transaction signature length mismatch",[I$0]:"Transaction signature verification failure",[M$0]:"$__serverMessage",[XJ0]:"Key pair bytes must be of length 64, got $byteLength.",[WJ0]:"Expected private key bytes with length 32. Actual length: $actualLength.",[YJ0]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[VJ0]:"The provided private key does not match the provided public key.",[GJ0]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[Q$0]:"Lamports value must be in the range [0, 2e64-1]",[X$0]:"`$value` cannot be parsed as a `BigInt`",[G$0]:"$message",[W$0]:"`$value` cannot be parsed as a `Number`",[e90]:"No nonce account could be found at address `$nonceAccountAddress`",[CQ0]:"Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",[yQ0]:"Attempted to sign an offchain message with an address that is not a signer for it",[BQ0]:"Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",[bQ0]:"The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",[FQ0]:"The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",[AQ0]:"Expected message format $expectedMessageFormat, got $actualMessageFormat",[EQ0]:"The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",[hQ0]:"Offchain message content must be non-empty",[kQ0]:"Offchain message must specify the address of at least one required signer",[xQ0]:"Offchain message envelope must reserve space for at least one signature",[IQ0]:"The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",[mQ0]:"The signatories of this offchain message must be listed in lexicographical order",[fQ0]:"An address must be listed no more than once among the signatories of an offchain message",[vQ0]:"Offchain message is missing signatures for addresses: $addresses.",[lQ0]:"Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",[SQ0]:"The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",[gQ0]:"Expected offchain message version $expectedVersion. Got $actualVersion.",[TQ0]:"This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",[RX0]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[NX0]:"WebSocket was closed before payload could be added to the send buffer",[_X0]:"WebSocket connection closed",[FX0]:"WebSocket failed to connect",[OX0]:"Failed to obtain a subscription id from the server",[PX0]:"Could not find an API plan for RPC method: `$method`",[MX0]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[wX0]:"HTTP error ($statusCode): $message",[LX0]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[UQ0]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[ZQ0]:"The provided value does not implement the `KeyPairSigner` interface",[jQ0]:"The provided value does not implement the `MessageModifyingSigner` interface",[MQ0]:"The provided value does not implement the `MessagePartialSigner` interface",[zQ0]:"The provided value does not implement any of the `MessageSigner` interfaces",[wQ0]:"The provided value does not implement the `TransactionModifyingSigner` interface",[PQ0]:"The provided value does not implement the `TransactionPartialSigner` interface",[RQ0]:"The provided value does not implement the `TransactionSendingSigner` interface",[LQ0]:"The provided value does not implement any of the `TransactionSigner` interfaces",[OQ0]:"More than one `TransactionSendingSigner` was identified.",[NQ0]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[_Q0]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[JJ0]:"Cannot export a non-extractable key.",[n$0]:"No digest implementation could be found.",[o$0]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[s$0]:`This runtime does not support the generation of Ed25519 key pairs.
|
|
38
|
+
|
|
39
|
+
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
40
|
+
|
|
41
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[r$0]:"No signature verification implementation could be found.",[t$0]:"No key generation implementation could be found.",[e$0]:"No signing implementation could be found.",[$J0]:"No key export implementation could be found.",[Y$0]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[C80]:"Transaction processing left an account with an outstanding borrowed reference",[U80]:"Account in use",[Z80]:"Account loaded twice",[z80]:"Attempt to debit an account but found no record of a prior credit.",[x80]:"Transaction loads an address table account that doesn't exist",[w80]:"This transaction has already been processed",[P80]:"Blockhash not found",[R80]:"Loader call chain is too deep",[B80]:"Transactions are currently disabled due to cluster maintenance",[l80]:"Transaction contains a duplicate instruction ($index) that is not allowed",[M80]:"Insufficient funds for fee",[p80]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[L80]:"This account may not be used to pay transaction fees",[N80]:"Transaction contains an invalid account reference",[b80]:"Transaction loads an address table account with invalid data",[y80]:"Transaction address table lookup uses an invalid index",[v80]:"Transaction loads an address table account with an invalid owner",[u80]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[F80]:"This program may not be used for executing instructions",[g80]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[T80]:"Transaction loads a writable account that cannot be written",[d80]:"Transaction exceeded max loaded accounts data size cap",[O80]:"Transaction requires a fee but has no signature present",[j80]:"Attempt to load a program that does not exist",[i80]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[c80]:"ResanitizationNeeded",[S80]:"Transaction failed to sanitize accounts offsets correctly",[_80]:"Transaction did not pass signature verification",[h80]:"Transaction locked too many accounts",[a80]:"Sum of account balances before and after transaction do not match",[D80]:"The transaction failed with the error `$errorName`",[k80]:"Transaction version is unsupported",[E80]:"Transaction would exceed account data limit within the block",[f80]:"Transaction would exceed total account data limit",[A80]:"Transaction would exceed max account limit within the block",[I80]:"Transaction would exceed max Block Cost Limit",[m80]:"Transaction would exceed max Vote Cost Limit",[X80]:"Attempted to sign a transaction with an address that is not a signer for it",[tQ0]:"Transaction is missing an address at index: $index.",[W80]:"Transaction has no expected signers therefore it cannot be encoded",[q80]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[uQ0]:"Transaction does not have a blockhash lifetime",[cQ0]:"Transaction is not a durable nonce transaction",[aQ0]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[oQ0]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[sQ0]:"No fee payer set in CompiledTransaction",[nQ0]:"Could not find program address at index $index",[G80]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[V80]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[eQ0]:"Transaction is missing a fee payer.",[$80]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[Q80]:"Transaction first instruction is not advance nonce account instruction.",[J80]:"Transaction with no instructions cannot be durable nonce transaction.",[pQ0]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[dQ0]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[Y80]:"The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",[rQ0]:"Transaction is missing signatures for addresses: $addresses.",[iQ0]:"Transaction version must be in the range [0, 127]. `$actualVersion` given",[K80]:"This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 0.",[H80]:"The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction."},B8="i",EQ="t";function hX0($,J={}){let Q=EX0[$];if(Q.length===0)return"";let X;function W(G){if(X[EQ]===2){let V=Q.slice(X[B8]+1,G);Y.push(V in J?`${J[V]}`:`$${V}`)}else if(X[EQ]===1)Y.push(Q.slice(X[B8],G))}let Y=[];return Q.split("").forEach((G,V)=>{if(V===0){X={[B8]:0,[EQ]:Q[0]==="\\"?0:Q[0]==="$"?2:1};return}let q;switch(X[EQ]){case 0:q={[B8]:V,[EQ]:1};break;case 1:if(G==="\\")q={[B8]:V,[EQ]:0};else if(G==="$")q={[B8]:V,[EQ]:2};break;case 2:if(G==="\\")q={[B8]:V,[EQ]:0};else if(G==="$")q={[B8]:V,[EQ]:2};else if(!G.match(/\w/))q={[B8]:V,[EQ]:1};break}if(q){if(X!==q)W(V);X=q}}),W(),Y.join("")}function xX0($,J={}){return hX0($,J)}var m5=class extends Error{cause=this.cause;context;constructor(...[$,J]){let Q,X;if(J)Object.entries(Object.getOwnPropertyDescriptors(J)).forEach(([Y,G])=>{if(Y==="cause")X={cause:G.value};else{if(Q===void 0)Q={__code:$};Object.defineProperty(Q,Y,G)}});let W=xX0($,Q);super(W,X);this.context=Object.freeze(Q===void 0?{__code:$}:Q),this.name="SolanaError"}};function vX0($,J){if($.length>=J)return $;let Q=new Uint8Array(J).fill(0);return Q.set($),Q}var bX0=($,J)=>vX0($.length<=J?$:$.slice(0,J),J);function UW($,J,Q){let X=Q===0&&$.length===J.length?$:$.slice(Q,Q+J.length);return yX0(X,J)}function yX0($,J){return $.length===J.length&&$.every((Q,X)=>Q===J[X])}function gX0($,J){return"fixedSize"in J?J.fixedSize:J.getSizeFromValue($)}function f5($){return Object.freeze({...$,encode:(J)=>{let Q=new Uint8Array(gX0(J,$));return $.write(J,Q,0),Q}})}function jG($){return Object.freeze({...$,decode:(J,Q=0)=>$.read(J,Q)[0]})}function DW($){return"fixedSize"in $&&typeof $.fixedSize==="number"}function mX0($){return!DW($)}function LR($,J,Q=0){if(J.length-Q<=0)throw new m5(iH,{codecDescription:$})}function L4($,J,Q,X=0){let W=Q.length-X;if(W<J)throw new m5(aH,{bytesLength:W,codecDescription:$,expected:J})}function MR($,J,Q){if(J<0||J>Q)throw new m5(oH,{bytesLength:Q,codecDescription:$,offset:J})}function w9($,J){let Q=(G,V)=>{let[q,H]=J.read(G,V),Z=Number(q);if(V=H,V>0||G.length>Z)G=G.slice(V,V+Z);return L4("addDecoderSizePrefix",Z,G),[$.decode(G),V+Z]};if(DW(J)&&DW($))return jG({...$,fixedSize:J.fixedSize+$.fixedSize,read:Q});let X=DW(J)?J.fixedSize:J.maxSize??null,W=DW($)?$.fixedSize:$.maxSize??null,Y=X!==null&&W!==null?X+W:null;return jG({...$,...Y!==null?{maxSize:Y}:{},read:Q})}function wR($,J,Q){let X=$.byteOffset+(J??0),W=Q??$.byteLength,Y;if(typeof SharedArrayBuffer>"u")Y=$.buffer;else if($.buffer instanceof SharedArrayBuffer)Y=new ArrayBuffer($.length),new Uint8Array(Y).set(new Uint8Array($));else Y=$.buffer;return(X===0||X===-$.byteLength)&&W===$.byteLength?Y:Y.slice(X,X+W)}function nH($,J){return jG({fixedSize:J,read:(Q,X)=>{if(L4("fixCodecSize",J,Q,X),X>0||Q.length>J)Q=Q.slice(X,X+J);if(DW($))Q=bX0(Q,$.fixedSize);let[W]=$.read(Q,0);return[W,X+J]}})}function fX0($,J){return f5({...$,write:(Q,X,W)=>{let Y=(H)=>lX0(H,X.length),G=J.preOffset?J.preOffset({bytes:X,preOffset:W,wrapBytes:Y}):W;MR("offsetEncoder",G,X.length);let V=$.write(Q,X,G),q=J.postOffset?J.postOffset({bytes:X,newPreOffset:G,postOffset:V,preOffset:W,wrapBytes:Y}):V;return MR("offsetEncoder",q,X.length),q}})}function lX0($,J){if(J===0)return 0;return($%J+J)%J}function pX0($,J){if(DW($)){let Q=J($.fixedSize);if(Q<0)throw new m5(M4,{bytesLength:Q,codecDescription:"resizeEncoder"});return f5({...$,fixedSize:Q})}return f5({...$,getSizeFromValue:(Q)=>{let X=J($.getSizeFromValue(Q));if(X<0)throw new m5(M4,{bytesLength:X,codecDescription:"resizeEncoder"});return X}})}function PR($,J){return fX0(pX0($,(Q)=>Q+J),{preOffset:({preOffset:Q})=>Q+J})}function MG($,J){return f5({...mX0($)?{...$,getSizeFromValue:(Q)=>$.getSizeFromValue(J(Q))}:$,write:(Q,X,W)=>$.write(J(Q),X,W)})}var dX0=1,uX0=2,cX0=3,iX0=4,aX0=5,oX0=6,nX0=7,sX0=8,rX0=9,tX0=10,eX0=-32700,$W0=-32603,JW0=-32602,QW0=-32601,XW0=-32600,WW0=-32019,YW0=-32018,GW0=-32017,VW0=-32016,qW0=-32015,KW0=-32014,HW0=-32013,DW0=-32012,UW0=-32011,ZW0=-32010,zW0=-32009,jW0=-32008,MW0=-32007,LW0=-32006,wW0=-32005,PW0=-32004,RW0=-32003,OW0=-32002,NW0=-32001,_W0=2800000,FW0=2800001,SW0=2800002,BW0=2800003,CW0=2800004,IW0=2800005,kW0=2800006,TW0=2800007,AW0=2800008,EW0=2800009,hW0=2800010,xW0=2800011,vW0=3230000,bW0=32300001,yW0=3230002,gW0=3230003,mW0=3230004,fW0=3610000,lW0=3610001,pW0=3610002,dW0=3610003,uW0=3610004,cW0=3610005,iW0=3610006,aW0=3610007,oW0=3611000,nW0=3704000,sW0=3704001,rW0=3704002,tW0=3704003,eW0=3704004,$50=4128000,J50=4128001,Q50=4128002,X50=4615000,W50=4615001,Y50=4615002,G50=4615003,V50=4615004,q50=4615005,K50=4615006,H50=4615007,D50=4615008,U50=4615009,Z50=4615010,z50=4615011,j50=4615012,M50=4615013,L50=4615014,w50=4615015,P50=4615016,R50=4615017,O50=4615018,N50=4615019,_50=4615020,F50=4615021,S50=4615022,B50=4615023,C50=4615024,I50=4615025,k50=4615026,T50=4615027,A50=4615028,E50=4615029,h50=4615030,x50=4615031,v50=4615032,b50=4615033,y50=4615034,g50=4615035,m50=4615036,f50=4615037,l50=4615038,p50=4615039,d50=4615040,u50=4615041,c50=4615042,i50=4615043,a50=4615044,o50=4615045,n50=4615046,s50=4615047,r50=4615048,t50=4615049,e50=4615050,$Y0=4615051,JY0=4615052,QY0=4615053,XY0=4615054,WY0=5508000,YY0=5508001,GY0=5508002,VY0=5508003,qY0=5508004,KY0=5508005,HY0=5508006,DY0=5508007,UY0=5508008,ZY0=5508009,zY0=5508010,jY0=5508011,MY0=5607000,LY0=5607001,wY0=5607002,PY0=5607003,RY0=5607004,OY0=5607005,NY0=5607006,_Y0=5607007,FY0=5607008,SY0=5607009,BY0=5607010,CY0=5607011,IY0=5607012,kY0=5607013,TY0=5607014,AY0=5607015,EY0=5607016,hY0=5607017,xY0=5663000,vY0=5663001,bY0=5663002,yY0=5663003,gY0=5663004,mY0=5663005,fY0=5663006,lY0=5663007,pY0=5663008,dY0=5663009,uY0=5663010,cY0=5663011,iY0=5663012,aY0=5663013,oY0=5663014,nY0=5663015,sY0=5663016,rY0=5663017,tY0=5663018,eY0=5663019,$G0=5663020,JG0=5663021,QG0=5663022,XG0=7050000,WG0=7050001,YG0=7050002,GG0=7050003,VG0=7050004,qG0=7050005,KG0=7050006,HG0=7050007,DG0=7050008,UG0=7050009,ZG0=7050010,zG0=7050011,jG0=7050012,MG0=7050013,LG0=7050014,wG0=7050015,PG0=7050016,RG0=7050017,OG0=7050018,NG0=7050019,_G0=7050020,FG0=7050021,SG0=7050022,BG0=7050023,CG0=7050024,IG0=7050025,kG0=7050026,TG0=7050027,AG0=7050028,EG0=7050029,hG0=7050030,xG0=7050031,vG0=7050032,bG0=7050033,yG0=7050034,gG0=7050035,mG0=7050036,fG0=7618000,lG0=7618001,pG0=7618002,dG0=7618003,uG0=7618004,cG0=7618005,iG0=7618006,aG0=7618007,oG0=7618008,nG0=7618009,sH=8078000,rH=8078001,RR=8078002,OR=8078003,NR=8078004,_R=8078005,FR=8078006,tH=8078007,eH=8078008,SR=8078009,BR=8078010,$D=8078011,sG0=8078012,CR=8078013,IR=8078014,kR=8078015,TR=8078016,JD=8078017,QD=8078018,rG0=8078019,AR=8078020,ER=8078021,XD=8078022,hR=8078023,tG0=8100000,eG0=8100001,$70=8100002,J70=8100003,Q70=8190000,X70=8190001,W70=8190002,Y70=8190003,G70=8190004,V70=9900000,q70=9900001,K70=9900002,H70=9900003,D70=9900004,U70=9900005,Z70=9900006;var z70={[vW0]:"Account not found at address: $address",[mW0]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[gW0]:"Expected decoded account at address: $address",[yW0]:"Failed to decode account data at address: $address",[bW0]:"Accounts not found at addresses: $addresses",[EW0]:"Unable to find a viable program address bump seed.",[SW0]:"$putativeAddress is not a base58-encoded address.",[_W0]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[BW0]:"The `CryptoKey` must be an `Ed25519` public key.",[xW0]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[AW0]:"Invalid seeds; point must fall off the Ed25519 curve.",[CW0]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[kW0]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[TW0]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[IW0]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[hW0]:"Program address cannot end with PDA marker.",[FW0]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[iX0]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[dX0]:"The network has progressed past the last block for which this transaction could have been committed.",[sH]:"Codec [$codecDescription] cannot decode empty byte arrays.",[XD]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[AR]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[_R]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[FR]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[NR]:"Encoder and decoder must either both be fixed-size or variable-size.",[eH]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[RR]:"Expected a fixed-size codec, got a variable-size one.",[CR]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[OR]:"Expected a variable-size codec, got a fixed-size one.",[rG0]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[rH]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[QD]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[SR]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[BR]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[kR]:"Invalid literal union variant. Expected one of [$variants], got $value.",[tH]:"Expected [$codecDescription] to have $expected items, got $actual.",[sG0]:"Invalid value $value for base $base with alphabet $alphabet.",[TR]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[$D]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[IR]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[ER]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[JD]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[hR]:"This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",[oW0]:"No random values implementation could be found.",[U50]:"instruction requires an uninitialized account",[B50]:"instruction tries to borrow reference for an account which is already borrowed",[C50]:"instruction left account with an outstanding borrowed reference",[F50]:"program other than the account's owner changed the size of the account data",[q50]:"account data too small for instruction",[S50]:"instruction expected an executable account",[n50]:"An account does not have enough lamports to be rent-exempt",[r50]:"Program arithmetic overflowed",[o50]:"Failed to serialize or deserialize account data: $encodedData",[XY0]:"Builtin programs must consume compute units",[v50]:"Cross-program invocation call depth too deep",[l50]:"Computational budget exceeded",[k50]:"custom program error: #$code",[R50]:"instruction contains duplicate accounts",[I50]:"instruction modifications of multiply-passed account differ",[h50]:"executable accounts must be rent exempt",[A50]:"instruction changed executable accounts data",[E50]:"instruction changed the balance of an executable account",[O50]:"instruction changed executable bit of an account",[L50]:"instruction modified data of an account it does not own",[M50]:"instruction spent from the balance of an account it does not own",[W50]:"generic instruction error",[e50]:"Provided owner is not allowed",[i50]:"Account is immutable",[a50]:"Incorrect authority provided",[H50]:"incorrect program id for instruction",[K50]:"insufficient funds for instruction",[V50]:"invalid account data for instruction",[s50]:"Invalid account owner",[Y50]:"invalid program argument",[T50]:"program returned invalid error code",[G50]:"invalid instruction data",[f50]:"Failed to reallocate account data",[m50]:"Provided seeds do not result in a valid address",[$Y0]:"Accounts data allocations exceeded the maximum allowed per transaction",[JY0]:"Max accounts exceeded",[QY0]:"Max instruction trace length exceeded",[g50]:"Length of the seed is too long for address generation",[b50]:"An account required by the instruction is missing",[D50]:"missing required signature for instruction",[j50]:"instruction illegally modified the program id of an account",[_50]:"insufficient account keys for instruction",[p50]:"Cross-program invocation with unauthorized signer or writable account",[d50]:"Failed to create program execution environment",[c50]:"Program failed to compile",[u50]:"Program failed to complete",[P50]:"instruction modified data of a read-only account",[w50]:"instruction changed the balance of a read-only account",[y50]:"Cross-program invocation reentrancy not allowed for this instruction",[N50]:"instruction modified rent epoch of an account",[z50]:"sum of account balances before and after instruction do not match",[Z50]:"instruction requires an initialized account",[X50]:"",[x50]:"Unsupported program id",[t50]:"Unsupported sysvar",[U70]:"Invalid instruction plan kind: $kind.",[pG0]:"The provided instruction plan is empty.",[cG0]:"No failed transaction plan result was found in the provided transaction plan result.",[uG0]:"This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved \u2014 e.g. by targetting RPCs that support transaction bundles.",[dG0]:"The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",[fG0]:"The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",[Z70]:"Invalid transaction plan kind: $kind.",[lG0]:"No more instructions to pack; the message packer has completed the instruction plan.",[iG0]:"Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",[aG0]:"Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",[oG0]:"Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",[nG0]:"Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",[$50]:"The instruction does not have any accounts.",[J50]:"The instruction does not have any data.",[Q50]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[aX0]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[uX0]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[K70]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[D70]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[q70]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[V70]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[H70]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[$W0]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[JW0]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[XW0]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[QW0]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[eX0]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[DW0]:"$__serverMessage",[NW0]:"$__serverMessage",[PW0]:"$__serverMessage",[KW0]:"$__serverMessage",[GW0]:"Epoch rewards period still active at slot $slot",[ZW0]:"$__serverMessage",[zW0]:"$__serverMessage",[WW0]:"Failed to query long-term storage; please try again",[VW0]:"Minimum context slot has not been reached",[wW0]:"Node is unhealthy; behind by $numSlotsBehind slots",[jW0]:"No snapshot",[OW0]:"Transaction simulation failed",[YW0]:"Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",[MW0]:"$__serverMessage",[UW0]:"Transaction history is not available from this node",[LW0]:"$__serverMessage",[HW0]:"Transaction signature length mismatch",[RW0]:"Transaction signature verification failure",[qW0]:"$__serverMessage",[nW0]:"Key pair bytes must be of length 64, got $byteLength.",[sW0]:"Expected private key bytes with length 32. Actual length: $actualLength.",[rW0]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[eW0]:"The provided private key does not match the provided public key.",[tW0]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[oX0]:"Lamports value must be in the range [0, 2e64-1]",[nX0]:"`$value` cannot be parsed as a `BigInt`",[tX0]:"$message",[sX0]:"`$value` cannot be parsed as a `Number`",[cX0]:"No nonce account could be found at address `$nonceAccountAddress`",[PY0]:"Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",[kY0]:"Attempted to sign an offchain message with an address that is not a signer for it",[wY0]:"Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",[IY0]:"The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",[MY0]:"The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",[_Y0]:"Expected message format $expectedMessageFormat, got $actualMessageFormat",[FY0]:"The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",[SY0]:"Offchain message content must be non-empty",[OY0]:"Offchain message must specify the address of at least one required signer",[BY0]:"Offchain message envelope must reserve space for at least one signature",[RY0]:"The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",[AY0]:"The signatories of this offchain message must be listed in lexicographical order",[EY0]:"An address must be listed no more than once among the signatories of an offchain message",[CY0]:"Offchain message is missing signatures for addresses: $addresses.",[hY0]:"Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",[LY0]:"The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",[TY0]:"Expected offchain message version $expectedVersion. Got $actualVersion.",[NY0]:"This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",[Q70]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[W70]:"WebSocket was closed before payload could be added to the send buffer",[Y70]:"WebSocket connection closed",[G70]:"WebSocket failed to connect",[X70]:"Failed to obtain a subscription id from the server",[J70]:"Could not find an API plan for RPC method: `$method`",[tG0]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[$70]:"HTTP error ($statusCode): $message",[eG0]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[WY0]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[YY0]:"The provided value does not implement the `KeyPairSigner` interface",[VY0]:"The provided value does not implement the `MessageModifyingSigner` interface",[qY0]:"The provided value does not implement the `MessagePartialSigner` interface",[GY0]:"The provided value does not implement any of the `MessageSigner` interfaces",[HY0]:"The provided value does not implement the `TransactionModifyingSigner` interface",[DY0]:"The provided value does not implement the `TransactionPartialSigner` interface",[UY0]:"The provided value does not implement the `TransactionSendingSigner` interface",[KY0]:"The provided value does not implement any of the `TransactionSigner` interfaces",[ZY0]:"More than one `TransactionSendingSigner` was identified.",[zY0]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[jY0]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[aW0]:"Cannot export a non-extractable key.",[lW0]:"No digest implementation could be found.",[fW0]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[pW0]:`This runtime does not support the generation of Ed25519 key pairs.
|
|
42
|
+
|
|
43
|
+
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
44
|
+
|
|
45
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[dW0]:"No signature verification implementation could be found.",[uW0]:"No key generation implementation could be found.",[cW0]:"No signing implementation could be found.",[iW0]:"No key export implementation could be found.",[rX0]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[PG0]:"Transaction processing left an account with an outstanding borrowed reference",[WG0]:"Account in use",[YG0]:"Account loaded twice",[GG0]:"Attempt to debit an account but found no record of a prior credit.",[BG0]:"Transaction loads an address table account that doesn't exist",[HG0]:"This transaction has already been processed",[DG0]:"Blockhash not found",[UG0]:"Loader call chain is too deep",[wG0]:"Transactions are currently disabled due to cluster maintenance",[hG0]:"Transaction contains a duplicate instruction ($index) that is not allowed",[qG0]:"Insufficient funds for fee",[xG0]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[KG0]:"This account may not be used to pay transaction fees",[zG0]:"Transaction contains an invalid account reference",[IG0]:"Transaction loads an address table account with invalid data",[kG0]:"Transaction address table lookup uses an invalid index",[CG0]:"Transaction loads an address table account with an invalid owner",[bG0]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[MG0]:"This program may not be used for executing instructions",[TG0]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[NG0]:"Transaction loads a writable account that cannot be written",[vG0]:"Transaction exceeded max loaded accounts data size cap",[ZG0]:"Transaction requires a fee but has no signature present",[VG0]:"Attempt to load a program that does not exist",[gG0]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[yG0]:"ResanitizationNeeded",[LG0]:"Transaction failed to sanitize accounts offsets correctly",[jG0]:"Transaction did not pass signature verification",[SG0]:"Transaction locked too many accounts",[mG0]:"Sum of account balances before and after transaction do not match",[XG0]:"The transaction failed with the error `$errorName`",[OG0]:"Transaction version is unsupported",[FG0]:"Transaction would exceed account data limit within the block",[EG0]:"Transaction would exceed total account data limit",[_G0]:"Transaction would exceed max account limit within the block",[RG0]:"Transaction would exceed max Block Cost Limit",[AG0]:"Transaction would exceed max Vote Cost Limit",[nY0]:"Attempted to sign a transaction with an address that is not a signer for it",[uY0]:"Transaction is missing an address at index: $index.",[sY0]:"Transaction has no expected signers therefore it cannot be encoded",[$G0]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[bY0]:"Transaction does not have a blockhash lifetime",[yY0]:"Transaction is not a durable nonce transaction",[mY0]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[fY0]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[pY0]:"No fee payer set in CompiledTransaction",[lY0]:"Could not find program address at index $index",[tY0]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[eY0]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[cY0]:"Transaction is missing a fee payer.",[iY0]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[oY0]:"Transaction first instruction is not advance nonce account instruction.",[aY0]:"Transaction with no instructions cannot be durable nonce transaction.",[xY0]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[vY0]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[rY0]:"The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",[dY0]:"Transaction is missing signatures for addresses: $addresses.",[gY0]:"Transaction version must be in the range [0, 127]. `$actualVersion` given",[JG0]:"This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 0.",[QG0]:"The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction."},C8="i",hQ="t";function j70($,J={}){let Q=z70[$];if(Q.length===0)return"";let X;function W(G){if(X[hQ]===2){let V=Q.slice(X[C8]+1,G);Y.push(V in J?`${J[V]}`:`$${V}`)}else if(X[hQ]===1)Y.push(Q.slice(X[C8],G))}let Y=[];return Q.split("").forEach((G,V)=>{if(V===0){X={[C8]:0,[hQ]:Q[0]==="\\"?0:Q[0]==="$"?2:1};return}let q;switch(X[hQ]){case 0:q={[C8]:V,[hQ]:1};break;case 1:if(G==="\\")q={[C8]:V,[hQ]:0};else if(G==="$")q={[C8]:V,[hQ]:2};break;case 2:if(G==="\\")q={[C8]:V,[hQ]:0};else if(G==="$")q={[C8]:V,[hQ]:2};else if(!G.match(/\w/))q={[C8]:V,[hQ]:1};break}if(q){if(X!==q)W(V);X=q}}),W(),Y.join("")}function M70($,J={}){return j70($,J)}var WQ=class extends Error{cause=this.cause;context;constructor(...[$,J]){let Q,X;if(J)Object.entries(Object.getOwnPropertyDescriptors(J)).forEach(([Y,G])=>{if(Y==="cause")X={cause:G.value};else{if(Q===void 0)Q={__code:$};Object.defineProperty(Q,Y,G)}});let W=M70($,Q);super(W,X);this.context=Object.freeze(Q===void 0?{__code:$}:Q),this.name="SolanaError"}};function xR($,J,Q){let X=Q===0&&$.length===J.length?$:$.slice(Q,Q+J.length);return L70(X,J)}function L70($,J){return $.length===J.length&&$.every((Q,X)=>Q===J[X])}function l5($,J){return"fixedSize"in J?J.fixedSize:J.getSizeFromValue($)}function I8($){return Object.freeze({...$,encode:(J)=>{let Q=new Uint8Array(l5(J,$));return $.write(J,Q,0),Q}})}function SJ($){return Object.freeze({...$,decode:(J,Q=0)=>$.read(J,Q)[0]})}function LG($){return"fixedSize"in $&&typeof $.fixedSize==="number"}function vR($,J,Q=0){if(J.length-Q<=0)throw new WQ(sH,{codecDescription:$})}function WD($,J,Q,X=0){let W=Q.length-X;if(W<J)throw new WQ(rH,{bytesLength:W,codecDescription:$,expected:J})}function bR($,J,Q){let X=$.byteOffset+(J??0),W=Q??$.byteLength,Y;if(typeof SharedArrayBuffer>"u")Y=$.buffer;else if($.buffer instanceof SharedArrayBuffer)Y=new ArrayBuffer($.length),new Uint8Array(Y).set(new Uint8Array($));else Y=$.buffer;return(X===0||X===-$.byteLength)&&W===$.byteLength?Y:Y.slice(X,X+W)}function p5($,J){return SJ({...$,read:(Q,X)=>{let[W,Y]=$.read(Q,X);return[J(W,Q,X),Y]}})}function P70($,J,Q,X){if(X<J||X>Q)throw new WQ($D,{codecDescription:$,max:Q,min:J,value:X})}function yR($){return $?.endian===1?!1:!0}function R70($){return I8({fixedSize:$.size,write(J,Q,X){if($.range)P70($.name,$.range[0],$.range[1],J);let W=new ArrayBuffer($.size);return $.set(new DataView(W),J,yR($.config)),Q.set(new Uint8Array(W),X),X+$.size}})}function gR($){return SJ({fixedSize:$.size,read(J,Q=0){vR($.name,J,Q),WD($.name,$.size,J,Q);let X=new DataView(bR(J,Q,$.size));return[$.get(X,yR($.config)),Q+$.size]}})}var mR=($={})=>R70({config:$,name:"u32",range:[0,Number("0xffffffff")],set:(J,Q,X)=>J.setUint32(0,Number(Q),X),size:4}),fR=($={})=>gR({config:$,get:(J,Q)=>J.getUint32(0,Q),name:"u32",size:4});var w4=()=>gR({get:($)=>$.getUint8(0),name:"u8",size:1});function O70($,J,Q){if(J!==Q)throw new WQ(tH,{actual:Q,codecDescription:$,expected:J})}function N70($){return $.reduce((J,Q)=>J===null||Q===null?null:Math.max(J,Q),0)}function d5($){return $.reduce((J,Q)=>J===null||Q===null?null:J+Q,0)}function wG($){return LG($)?$.fixedSize:null}function u5($){return LG($)?$.fixedSize:$.maxSize??null}function k8($,J={}){let Q=J.size??mR(),X=P4(Q,wG($)),W=P4(Q,u5($))??void 0;return I8({...X!==null?{fixedSize:X}:{getSizeFromValue:(Y)=>{return(typeof Q==="object"?l5(Y.length,Q):0)+[...Y].reduce((V,q)=>V+l5(q,$),0)},maxSize:W},write:(Y,G,V)=>{if(typeof Q==="number")O70("array",Q,Y.length);if(typeof Q==="object")V=Q.write(Y.length,G,V);return Y.forEach((q)=>{V=$.write(q,G,V)}),V}})}function pJ($,J={}){let Q=J.size??fR(),X=wG($),W=P4(Q,X),Y=P4(Q,u5($))??void 0;return SJ({...W!==null?{fixedSize:W}:{maxSize:Y},read:(G,V)=>{let q=[];if(typeof Q==="object"&&G.slice(V).length===0)return[q,V];if(Q==="remainder"){while(V<G.length){let[M,j]=$.read(G,V);V=j,q.push(M)}return[q,V]}let[H,Z]=typeof Q==="number"?[Q,V]:Q.read(G,V);V=Z;for(let M=0;M<H;M+=1){let[j,R]=$.read(G,V);V=R,q.push(j)}return[q,V]}})}function P4($,J){if(typeof $!=="number")return null;if($===0)return 0;return J===null?null:J*$}function BJ($={}){return p5($.size??w4(),(J)=>Number(J)===1)}function c5(){return I8({getSizeFromValue:($)=>$.length,write:($,J,Q)=>{return J.set($,Q),Q+$.length}})}function _X(){return SJ({read:($,J)=>{let Q=$.slice(J);return[Q,J+Q.length]}})}var _70=()=>SJ({read($,J){return[$.slice(J).reduce((X,W)=>X+W.toString(16).padStart(2,"0"),""),$.length]}});function R4($){return I8({fixedSize:$.length,write:(J,Q,X)=>{return Q.set($,X),X+$.length}})}function O4($){return SJ({fixedSize:$.length,read:(J,Q)=>{let X=_70();if(!xR(J,$,Q))throw new WQ(QD,{constant:$,data:J,hexConstant:X.decode($),hexData:X.decode(J),offset:Q});return[void 0,Q+$.length]}})}function T8($){let J=d5($.map(wG)),Q=d5($.map(u5))??void 0;return SJ({...J===null?{maxSize:Q}:{fixedSize:J},read:(X,W)=>{let Y=[];return $.forEach((G)=>{let[V,q]=G.read(X,W);Y.push(V),W=q}),[Y,W]}})}function GD($,J){let Q=lR($),X=(Y,G,V)=>{let q=J(Y);return YD($,q),$[q].write(Y,G,V)};if(Q!==null)return I8({fixedSize:Q,write:X});let W=pR($);return I8({...W!==null?{maxSize:W}:{},getSizeFromValue:(Y)=>{let G=J(Y);return YD($,G),l5(Y,$[G])},write:X})}function VD($,J){let Q=lR($),X=(Y,G)=>{let V=J(Y,G);return YD($,V),$[V].read(Y,G)};if(Q!==null)return SJ({fixedSize:Q,read:X});let W=pR($);return SJ({...W!==null?{maxSize:W}:{},read:X})}function YD($,J){if(typeof $[J]>"u")throw new WQ(JD,{maxRange:$.length-1,minRange:0,variant:J})}function lR($){if($.length===0)return 0;if(!LG($[0]))return null;let J=$[0].fixedSize;return $.every((X)=>LG(X)&&X.fixedSize===J)?J:null}function pR($){return N70($.map((J)=>u5(J)))}function dR($,J={}){let Q=J.discriminator??"__kind",X=J.size??w4();return VD($.map(([W,Y])=>p5(T8([X,Y]),([,G])=>({[Q]:W,...G}))),(W,Y)=>Number(X.read(W,Y)[0]))}function F70($){let J=[...new Set(Object.values($).filter((G)=>typeof G==="number"))].sort(),Q=Object.fromEntries(Object.entries($).slice(J.length)),X=Object.keys(Q),W=Object.values(Q),Y=[...new Set([...X,...W.filter((G)=>typeof G==="string")])];return{enumKeys:X,enumRecord:Q,enumValues:W,numericalValues:J,stringValues:Y}}function S70({discriminator:$,enumKeys:J,enumValues:Q,useValuesAsDiscriminators:X}){if(!X)return $>=0&&$<J.length?$:-1;return B70(Q,(W)=>W===$)}function B70($,J){let Q=$.length;while(Q--)if(J($[Q],Q,$))return Q;return-1}function C70($){if($.length===0)return"";let J=[$[0],$[0]],Q=[];for(let X=1;X<$.length;X++){let W=$[X];if(J[1]+1===W)J[1]=W;else Q.push(J[0]===J[1]?`${J[0]}`:`${J[0]}-${J[1]}`),J=[W,W]}return Q.push(J[0]===J[1]?`${J[0]}`:`${J[0]}-${J[1]}`),Q.join(", ")}function uR($,J={}){let Q=J.size??w4(),X=J.useValuesAsDiscriminators??!1,{enumKeys:W,enumValues:Y,numericalValues:G}=F70($);if(X&&Y.some((V)=>typeof V==="string"))throw new WQ(XD,{stringValues:Y.filter((V)=>typeof V==="string")});return p5(Q,(V)=>{let q=Number(V),H=S70({discriminator:q,enumKeys:W,enumValues:Y,useValuesAsDiscriminators:X});if(H<0){let Z=X?G:[...Array(W.length).keys()];throw new WQ(eH,{discriminator:q,formattedValidDiscriminators:C70(Z),validDiscriminators:Z})}return Y[H]})}function cR($,J){return p5(T8([...J,$]),(Q)=>Q[Q.length-1])}function iR($,J,Q={}){return p5(pJ(T8([$,J]),Q),(X)=>new Map(X))}function FX(){return SJ({fixedSize:0,read:($,J)=>[void 0,J]})}function CJ($){let J=$.map(([,W])=>W),Q=d5(J.map(wG)),X=d5(J.map(u5))??void 0;return I8({...Q===null?{getSizeFromValue:(W)=>$.map(([Y,G])=>l5(W[Y],G)).reduce((Y,G)=>Y+G,0),maxSize:X}:{fixedSize:Q},write:(W,Y,G)=>{return $.forEach(([V,q])=>{G=q.write(W[V],Y,G)}),G}})}function V9($){let J=$.map(([,W])=>W),Q=d5(J.map(wG)),X=d5(J.map(u5))??void 0;return SJ({...Q===null?{maxSize:X}:{fixedSize:Q},read:(W,Y)=>{let G={};return $.forEach(([V,q])=>{let[H,Z]=q.read(W,Y);Y=Z,G[V]=H}),[G,Y]}})}var I70=1,k70=2,T70=3,A70=4,E70=5,h70=6,x70=7,v70=8,b70=9,y70=10,g70=-32700,m70=-32603,f70=-32602,l70=-32601,p70=-32600,d70=-32019,u70=-32018,c70=-32017,i70=-32016,a70=-32015,o70=-32014,n70=-32013,s70=-32012,r70=-32011,t70=-32010,e70=-32009,$V0=-32008,JV0=-32007,QV0=-32006,XV0=-32005,WV0=-32004,YV0=-32003,GV0=-32002,VV0=-32001,qV0=2800000,KV0=2800001,HV0=2800002,DV0=2800003,UV0=2800004,ZV0=2800005,zV0=2800006,jV0=2800007,MV0=2800008,LV0=2800009,wV0=2800010,PV0=2800011,RV0=3230000,OV0=32300001,NV0=3230002,_V0=3230003,FV0=3230004,SV0=3610000,BV0=3610001,CV0=3610002,IV0=3610003,kV0=3610004,TV0=3610005,AV0=3610006,EV0=3610007,hV0=3611000,xV0=3704000,vV0=3704001,bV0=3704002,yV0=3704003,gV0=3704004,mV0=4128000,fV0=4128001,lV0=4128002,pV0=4615000,dV0=4615001,uV0=4615002,cV0=4615003,iV0=4615004,aV0=4615005,oV0=4615006,nV0=4615007,sV0=4615008,rV0=4615009,tV0=4615010,eV0=4615011,$40=4615012,J40=4615013,Q40=4615014,X40=4615015,W40=4615016,Y40=4615017,G40=4615018,V40=4615019,q40=4615020,K40=4615021,H40=4615022,D40=4615023,U40=4615024,Z40=4615025,z40=4615026,j40=4615027,M40=4615028,L40=4615029,w40=4615030,P40=4615031,R40=4615032,O40=4615033,N40=4615034,_40=4615035,F40=4615036,S40=4615037,B40=4615038,C40=4615039,I40=4615040,k40=4615041,T40=4615042,A40=4615043,E40=4615044,h40=4615045,x40=4615046,v40=4615047,b40=4615048,y40=4615049,g40=4615050,m40=4615051,f40=4615052,l40=4615053,p40=4615054,d40=5508000,u40=5508001,c40=5508002,i40=5508003,a40=5508004,o40=5508005,n40=5508006,s40=5508007,r40=5508008,t40=5508009,e40=5508010,$q0=5508011,Jq0=5607000,Qq0=5607001,Xq0=5607002,Wq0=5607003,Yq0=5607004,Gq0=5607005,Vq0=5607006,qq0=5607007,Kq0=5607008,Hq0=5607009,Dq0=5607010,Uq0=5607011,Zq0=5607012,zq0=5607013,jq0=5607014,Mq0=5607015,Lq0=5607016,wq0=5607017,Pq0=5663000,Rq0=5663001,Oq0=5663002,Nq0=5663003,_q0=5663004,Fq0=5663005,Sq0=5663006,Bq0=5663007,Cq0=5663008,Iq0=5663009,kq0=5663010,Tq0=5663011,Aq0=5663012,Eq0=5663013,hq0=5663014,xq0=5663015,vq0=5663016,bq0=5663017,yq0=5663018,gq0=5663019,mq0=5663020,fq0=5663021,lq0=5663022,pq0=7050000,dq0=7050001,uq0=7050002,cq0=7050003,iq0=7050004,aq0=7050005,oq0=7050006,nq0=7050007,sq0=7050008,rq0=7050009,tq0=7050010,eq0=7050011,$10=7050012,J10=7050013,Q10=7050014,X10=7050015,W10=7050016,Y10=7050017,G10=7050018,V10=7050019,q10=7050020,K10=7050021,H10=7050022,D10=7050023,U10=7050024,Z10=7050025,z10=7050026,j10=7050027,M10=7050028,L10=7050029,w10=7050030,P10=7050031,R10=7050032,O10=7050033,N10=7050034,_10=7050035,F10=7050036,S10=7618000,B10=7618001,C10=7618002,I10=7618003,k10=7618004,T10=7618005,A10=7618006,E10=7618007,h10=7618008,x10=7618009,v10=8078000,b10=8078001,y10=8078002,g10=8078003,m10=8078004,f10=8078005,l10=8078006,p10=8078007,d10=8078008,u10=8078009,c10=8078010,qD=8078011,i10=8078012,a10=8078013,o10=8078014,n10=8078015,s10=8078016,r10=8078017,t10=8078018,e10=8078019,$K0=8078020,JK0=8078021,QK0=8078022,XK0=8078023,WK0=8100000,YK0=8100001,GK0=8100002,VK0=8100003,qK0=8190000,KK0=8190001,HK0=8190002,DK0=8190003,UK0=8190004,ZK0=9900000,zK0=9900001,jK0=9900002,MK0=9900003,LK0=9900004,wK0=9900005,PK0=9900006;var RK0={[RV0]:"Account not found at address: $address",[FV0]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[_V0]:"Expected decoded account at address: $address",[NV0]:"Failed to decode account data at address: $address",[OV0]:"Accounts not found at addresses: $addresses",[LV0]:"Unable to find a viable program address bump seed.",[HV0]:"$putativeAddress is not a base58-encoded address.",[qV0]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[DV0]:"The `CryptoKey` must be an `Ed25519` public key.",[PV0]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[MV0]:"Invalid seeds; point must fall off the Ed25519 curve.",[UV0]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[zV0]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[jV0]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[ZV0]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[wV0]:"Program address cannot end with PDA marker.",[KV0]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[A70]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[I70]:"The network has progressed past the last block for which this transaction could have been committed.",[v10]:"Codec [$codecDescription] cannot decode empty byte arrays.",[QK0]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[$K0]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[f10]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[l10]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[m10]:"Encoder and decoder must either both be fixed-size or variable-size.",[d10]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[y10]:"Expected a fixed-size codec, got a variable-size one.",[a10]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[g10]:"Expected a variable-size codec, got a fixed-size one.",[e10]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[b10]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[t10]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[u10]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[c10]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[n10]:"Invalid literal union variant. Expected one of [$variants], got $value.",[p10]:"Expected [$codecDescription] to have $expected items, got $actual.",[i10]:"Invalid value $value for base $base with alphabet $alphabet.",[s10]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[qD]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[o10]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[JK0]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[r10]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[XK0]:"This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",[hV0]:"No random values implementation could be found.",[rV0]:"instruction requires an uninitialized account",[D40]:"instruction tries to borrow reference for an account which is already borrowed",[U40]:"instruction left account with an outstanding borrowed reference",[K40]:"program other than the account's owner changed the size of the account data",[aV0]:"account data too small for instruction",[H40]:"instruction expected an executable account",[x40]:"An account does not have enough lamports to be rent-exempt",[b40]:"Program arithmetic overflowed",[h40]:"Failed to serialize or deserialize account data: $encodedData",[p40]:"Builtin programs must consume compute units",[R40]:"Cross-program invocation call depth too deep",[B40]:"Computational budget exceeded",[z40]:"custom program error: #$code",[Y40]:"instruction contains duplicate accounts",[Z40]:"instruction modifications of multiply-passed account differ",[w40]:"executable accounts must be rent exempt",[M40]:"instruction changed executable accounts data",[L40]:"instruction changed the balance of an executable account",[G40]:"instruction changed executable bit of an account",[Q40]:"instruction modified data of an account it does not own",[J40]:"instruction spent from the balance of an account it does not own",[dV0]:"generic instruction error",[g40]:"Provided owner is not allowed",[A40]:"Account is immutable",[E40]:"Incorrect authority provided",[nV0]:"incorrect program id for instruction",[oV0]:"insufficient funds for instruction",[iV0]:"invalid account data for instruction",[v40]:"Invalid account owner",[uV0]:"invalid program argument",[j40]:"program returned invalid error code",[cV0]:"invalid instruction data",[S40]:"Failed to reallocate account data",[F40]:"Provided seeds do not result in a valid address",[m40]:"Accounts data allocations exceeded the maximum allowed per transaction",[f40]:"Max accounts exceeded",[l40]:"Max instruction trace length exceeded",[_40]:"Length of the seed is too long for address generation",[O40]:"An account required by the instruction is missing",[sV0]:"missing required signature for instruction",[$40]:"instruction illegally modified the program id of an account",[q40]:"insufficient account keys for instruction",[C40]:"Cross-program invocation with unauthorized signer or writable account",[I40]:"Failed to create program execution environment",[T40]:"Program failed to compile",[k40]:"Program failed to complete",[W40]:"instruction modified data of a read-only account",[X40]:"instruction changed the balance of a read-only account",[N40]:"Cross-program invocation reentrancy not allowed for this instruction",[V40]:"instruction modified rent epoch of an account",[eV0]:"sum of account balances before and after instruction do not match",[tV0]:"instruction requires an initialized account",[pV0]:"",[P40]:"Unsupported program id",[y40]:"Unsupported sysvar",[wK0]:"Invalid instruction plan kind: $kind.",[C10]:"The provided instruction plan is empty.",[T10]:"No failed transaction plan result was found in the provided transaction plan result.",[k10]:"This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved \u2014 e.g. by targetting RPCs that support transaction bundles.",[I10]:"The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",[S10]:"The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",[PK0]:"Invalid transaction plan kind: $kind.",[B10]:"No more instructions to pack; the message packer has completed the instruction plan.",[A10]:"Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",[E10]:"Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",[h10]:"Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",[x10]:"Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",[mV0]:"The instruction does not have any accounts.",[fV0]:"The instruction does not have any data.",[lV0]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[E70]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[k70]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[jK0]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[LK0]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[zK0]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[ZK0]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[MK0]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[m70]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[f70]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[p70]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[l70]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[g70]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[s70]:"$__serverMessage",[VV0]:"$__serverMessage",[WV0]:"$__serverMessage",[o70]:"$__serverMessage",[c70]:"Epoch rewards period still active at slot $slot",[t70]:"$__serverMessage",[e70]:"$__serverMessage",[d70]:"Failed to query long-term storage; please try again",[i70]:"Minimum context slot has not been reached",[XV0]:"Node is unhealthy; behind by $numSlotsBehind slots",[$V0]:"No snapshot",[GV0]:"Transaction simulation failed",[u70]:"Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",[JV0]:"$__serverMessage",[r70]:"Transaction history is not available from this node",[QV0]:"$__serverMessage",[n70]:"Transaction signature length mismatch",[YV0]:"Transaction signature verification failure",[a70]:"$__serverMessage",[xV0]:"Key pair bytes must be of length 64, got $byteLength.",[vV0]:"Expected private key bytes with length 32. Actual length: $actualLength.",[bV0]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[gV0]:"The provided private key does not match the provided public key.",[yV0]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[h70]:"Lamports value must be in the range [0, 2e64-1]",[x70]:"`$value` cannot be parsed as a `BigInt`",[y70]:"$message",[v70]:"`$value` cannot be parsed as a `Number`",[T70]:"No nonce account could be found at address `$nonceAccountAddress`",[Wq0]:"Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",[zq0]:"Attempted to sign an offchain message with an address that is not a signer for it",[Xq0]:"Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",[Zq0]:"The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",[Jq0]:"The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",[qq0]:"Expected message format $expectedMessageFormat, got $actualMessageFormat",[Kq0]:"The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",[Hq0]:"Offchain message content must be non-empty",[Gq0]:"Offchain message must specify the address of at least one required signer",[Dq0]:"Offchain message envelope must reserve space for at least one signature",[Yq0]:"The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",[Mq0]:"The signatories of this offchain message must be listed in lexicographical order",[Lq0]:"An address must be listed no more than once among the signatories of an offchain message",[Uq0]:"Offchain message is missing signatures for addresses: $addresses.",[wq0]:"Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",[Qq0]:"The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",[jq0]:"Expected offchain message version $expectedVersion. Got $actualVersion.",[Vq0]:"This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",[qK0]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[HK0]:"WebSocket was closed before payload could be added to the send buffer",[DK0]:"WebSocket connection closed",[UK0]:"WebSocket failed to connect",[KK0]:"Failed to obtain a subscription id from the server",[VK0]:"Could not find an API plan for RPC method: `$method`",[WK0]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[GK0]:"HTTP error ($statusCode): $message",[YK0]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[d40]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[u40]:"The provided value does not implement the `KeyPairSigner` interface",[i40]:"The provided value does not implement the `MessageModifyingSigner` interface",[a40]:"The provided value does not implement the `MessagePartialSigner` interface",[c40]:"The provided value does not implement any of the `MessageSigner` interfaces",[n40]:"The provided value does not implement the `TransactionModifyingSigner` interface",[s40]:"The provided value does not implement the `TransactionPartialSigner` interface",[r40]:"The provided value does not implement the `TransactionSendingSigner` interface",[o40]:"The provided value does not implement any of the `TransactionSigner` interfaces",[t40]:"More than one `TransactionSendingSigner` was identified.",[e40]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[$q0]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[EV0]:"Cannot export a non-extractable key.",[BV0]:"No digest implementation could be found.",[SV0]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[CV0]:`This runtime does not support the generation of Ed25519 key pairs.
|
|
46
|
+
|
|
47
|
+
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
48
|
+
|
|
49
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[IV0]:"No signature verification implementation could be found.",[kV0]:"No key generation implementation could be found.",[TV0]:"No signing implementation could be found.",[AV0]:"No key export implementation could be found.",[b70]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[W10]:"Transaction processing left an account with an outstanding borrowed reference",[dq0]:"Account in use",[uq0]:"Account loaded twice",[cq0]:"Attempt to debit an account but found no record of a prior credit.",[D10]:"Transaction loads an address table account that doesn't exist",[nq0]:"This transaction has already been processed",[sq0]:"Blockhash not found",[rq0]:"Loader call chain is too deep",[X10]:"Transactions are currently disabled due to cluster maintenance",[w10]:"Transaction contains a duplicate instruction ($index) that is not allowed",[aq0]:"Insufficient funds for fee",[P10]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[oq0]:"This account may not be used to pay transaction fees",[eq0]:"Transaction contains an invalid account reference",[Z10]:"Transaction loads an address table account with invalid data",[z10]:"Transaction address table lookup uses an invalid index",[U10]:"Transaction loads an address table account with an invalid owner",[O10]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[J10]:"This program may not be used for executing instructions",[j10]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[V10]:"Transaction loads a writable account that cannot be written",[R10]:"Transaction exceeded max loaded accounts data size cap",[tq0]:"Transaction requires a fee but has no signature present",[iq0]:"Attempt to load a program that does not exist",[_10]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[N10]:"ResanitizationNeeded",[Q10]:"Transaction failed to sanitize accounts offsets correctly",[$10]:"Transaction did not pass signature verification",[H10]:"Transaction locked too many accounts",[F10]:"Sum of account balances before and after transaction do not match",[pq0]:"The transaction failed with the error `$errorName`",[G10]:"Transaction version is unsupported",[K10]:"Transaction would exceed account data limit within the block",[L10]:"Transaction would exceed total account data limit",[q10]:"Transaction would exceed max account limit within the block",[Y10]:"Transaction would exceed max Block Cost Limit",[M10]:"Transaction would exceed max Vote Cost Limit",[xq0]:"Attempted to sign a transaction with an address that is not a signer for it",[kq0]:"Transaction is missing an address at index: $index.",[vq0]:"Transaction has no expected signers therefore it cannot be encoded",[mq0]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[Oq0]:"Transaction does not have a blockhash lifetime",[Nq0]:"Transaction is not a durable nonce transaction",[Fq0]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[Sq0]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[Cq0]:"No fee payer set in CompiledTransaction",[Bq0]:"Could not find program address at index $index",[yq0]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[gq0]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[Tq0]:"Transaction is missing a fee payer.",[Aq0]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[hq0]:"Transaction first instruction is not advance nonce account instruction.",[Eq0]:"Transaction with no instructions cannot be durable nonce transaction.",[Pq0]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[Rq0]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[bq0]:"The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",[Iq0]:"Transaction is missing signatures for addresses: $addresses.",[_q0]:"Transaction version must be in the range [0, 127]. `$actualVersion` given",[fq0]:"This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 0.",[lq0]:"The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction."},A8="i",xQ="t";function OK0($,J={}){let Q=RK0[$];if(Q.length===0)return"";let X;function W(G){if(X[xQ]===2){let V=Q.slice(X[A8]+1,G);Y.push(V in J?`${J[V]}`:`$${V}`)}else if(X[xQ]===1)Y.push(Q.slice(X[A8],G))}let Y=[];return Q.split("").forEach((G,V)=>{if(V===0){X={[A8]:0,[xQ]:Q[0]==="\\"?0:Q[0]==="$"?2:1};return}let q;switch(X[xQ]){case 0:q={[A8]:V,[xQ]:1};break;case 1:if(G==="\\")q={[A8]:V,[xQ]:0};else if(G==="$")q={[A8]:V,[xQ]:2};break;case 2:if(G==="\\")q={[A8]:V,[xQ]:0};else if(G==="$")q={[A8]:V,[xQ]:2};else if(!G.match(/\w/))q={[A8]:V,[xQ]:1};break}if(q){if(X!==q)W(V);X=q}}),W(),Y.join("")}function NK0($,J={}){return OK0($,J)}var aR=class extends Error{cause=this.cause;context;constructor(...[$,J]){let Q,X;if(J)Object.entries(Object.getOwnPropertyDescriptors(J)).forEach(([Y,G])=>{if(Y==="cause")X={cause:G.value};else{if(Q===void 0)Q={__code:$};Object.defineProperty(Q,Y,G)}});let W=NK0($,Q);super(W,X);this.context=Object.freeze(Q===void 0?{__code:$}:Q),this.name="SolanaError"}};function _K0($,J,Q,X){if(X<J||X>Q)throw new aR(qD,{codecDescription:$,max:Q,min:J,value:X})}function nR($){return $?.endian===1?!1:!0}function KD($){return f5({fixedSize:$.size,write(J,Q,X){if($.range)_K0($.name,$.range[0],$.range[1],J);let W=new ArrayBuffer($.size);return $.set(new DataView(W),J,nR($.config)),Q.set(new Uint8Array(W),X),X+$.size}})}function i5($){return jG({fixedSize:$.size,read(J,Q=0){LR($.name,J,Q),L4($.name,$.size,J,Q);let X=new DataView(wR(J,Q,$.size));return[$.get(X,nR($.config)),Q+$.size]}})}var HD=($={})=>i5({config:$,get:(J,Q)=>J.getFloat64(0,Q),name:"f64",size:8});var DD=($={})=>i5({config:$,get:(J,Q)=>J.getInt16(0,Q),name:"i16",size:2});var k9=($={})=>i5({config:$,get:(J,Q)=>J.getUint16(0,Q),name:"u16",size:2});var UD=($={})=>KD({config:$,name:"u32",range:[0,Number("0xffffffff")],set:(J,Q,X)=>J.setUint32(0,Number(Q),X),size:4}),vQ=($={})=>i5({config:$,get:(J,Q)=>J.getUint32(0,Q),name:"u32",size:4});var N4=($={})=>KD({config:$,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(J,Q,X)=>J.setBigUint64(0,BigInt(Q),X),size:8}),y$=($={})=>i5({config:$,get:(J,Q)=>J.getBigUint64(0,Q),name:"u64",size:8});var dJ=()=>KD({name:"u8",range:[0,Number("0xff")],set:($,J)=>$.setUint8(0,Number(J)),size:1}),ZD=()=>i5({get:($)=>$.getUint8(0),name:"u8",size:1});var FK0=1,SK0=2,BK0=3,CK0=4,IK0=5,kK0=6,TK0=7,AK0=8,EK0=9,hK0=10,xK0=-32700,vK0=-32603,bK0=-32602,yK0=-32601,gK0=-32600,mK0=-32019,fK0=-32018,lK0=-32017,pK0=-32016,dK0=-32015,uK0=-32014,cK0=-32013,iK0=-32012,aK0=-32011,oK0=-32010,nK0=-32009,sK0=-32008,rK0=-32007,tK0=-32006,eK0=-32005,$60=-32004,J60=-32003,Q60=-32002,X60=-32001,W60=2800000,Y60=2800001,G60=2800002,V60=2800003,q60=2800004,K60=2800005,H60=2800006,D60=2800007,U60=2800008,Z60=2800009,z60=2800010,j60=2800011,M60=3230000,L60=32300001,w60=3230002,P60=3230003,R60=3230004,O60=3610000,N60=3610001,_60=3610002,F60=3610003,S60=3610004,B60=3610005,C60=3610006,I60=3610007,k60=3611000,T60=3704000,A60=3704001,E60=3704002,h60=3704003,x60=3704004,v60=4128000,b60=4128001,y60=4128002,g60=4615000,m60=4615001,f60=4615002,l60=4615003,p60=4615004,d60=4615005,u60=4615006,c60=4615007,i60=4615008,a60=4615009,o60=4615010,n60=4615011,s60=4615012,r60=4615013,t60=4615014,e60=4615015,$H0=4615016,JH0=4615017,QH0=4615018,XH0=4615019,WH0=4615020,YH0=4615021,GH0=4615022,VH0=4615023,qH0=4615024,KH0=4615025,HH0=4615026,DH0=4615027,UH0=4615028,ZH0=4615029,zH0=4615030,jH0=4615031,MH0=4615032,LH0=4615033,wH0=4615034,PH0=4615035,RH0=4615036,OH0=4615037,NH0=4615038,_H0=4615039,FH0=4615040,SH0=4615041,BH0=4615042,CH0=4615043,IH0=4615044,kH0=4615045,TH0=4615046,AH0=4615047,EH0=4615048,hH0=4615049,xH0=4615050,vH0=4615051,bH0=4615052,yH0=4615053,gH0=4615054,mH0=5508000,fH0=5508001,lH0=5508002,pH0=5508003,dH0=5508004,uH0=5508005,cH0=5508006,iH0=5508007,aH0=5508008,oH0=5508009,nH0=5508010,sH0=5508011,rH0=5607000,tH0=5607001,eH0=5607002,$D0=5607003,JD0=5607004,QD0=5607005,XD0=5607006,WD0=5607007,YD0=5607008,GD0=5607009,VD0=5607010,qD0=5607011,KD0=5607012,HD0=5607013,DD0=5607014,UD0=5607015,ZD0=5607016,zD0=5607017,jD0=5663000,MD0=5663001,LD0=5663002,wD0=5663003,PD0=5663004,RD0=5663005,OD0=5663006,ND0=5663007,_D0=5663008,FD0=5663009,SD0=5663010,BD0=5663011,CD0=5663012,ID0=5663013,kD0=5663014,TD0=5663015,AD0=5663016,ED0=5663017,hD0=5663018,xD0=5663019,vD0=5663020,bD0=5663021,yD0=5663022,gD0=7050000,mD0=7050001,fD0=7050002,lD0=7050003,pD0=7050004,dD0=7050005,uD0=7050006,cD0=7050007,iD0=7050008,aD0=7050009,oD0=7050010,nD0=7050011,sD0=7050012,rD0=7050013,tD0=7050014,eD0=7050015,$U0=7050016,JU0=7050017,QU0=7050018,XU0=7050019,WU0=7050020,YU0=7050021,GU0=7050022,VU0=7050023,qU0=7050024,KU0=7050025,HU0=7050026,DU0=7050027,UU0=7050028,ZU0=7050029,zU0=7050030,jU0=7050031,MU0=7050032,LU0=7050033,wU0=7050034,PU0=7050035,RU0=7050036,OU0=7618000,NU0=7618001,_U0=7618002,FU0=7618003,SU0=7618004,BU0=7618005,CU0=7618006,IU0=7618007,kU0=7618008,TU0=7618009,zD=8078000,jD=8078001,MD=8078002,sR=8078003,rR=8078004,tR=8078005,eR=8078006,AU0=8078007,EU0=8078008,hU0=8078009,xU0=8078010,vU0=8078011,bU0=8078012,$O=8078013,JO=8078014,yU0=8078015,gU0=8078016,mU0=8078017,fU0=8078018,lU0=8078019,QO=8078020,XO=8078021,pU0=8078022,WO=8078023,dU0=8100000,uU0=8100001,cU0=8100002,iU0=8100003,aU0=8190000,oU0=8190001,nU0=8190002,sU0=8190003,rU0=8190004,tU0=9900000,eU0=9900001,$Z0=9900002,JZ0=9900003,QZ0=9900004,XZ0=9900005,WZ0=9900006;var YZ0={[M60]:"Account not found at address: $address",[R60]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[P60]:"Expected decoded account at address: $address",[w60]:"Failed to decode account data at address: $address",[L60]:"Accounts not found at addresses: $addresses",[Z60]:"Unable to find a viable program address bump seed.",[G60]:"$putativeAddress is not a base58-encoded address.",[W60]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[V60]:"The `CryptoKey` must be an `Ed25519` public key.",[j60]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[U60]:"Invalid seeds; point must fall off the Ed25519 curve.",[q60]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[H60]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[D60]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[K60]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[z60]:"Program address cannot end with PDA marker.",[Y60]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[CK0]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[FK0]:"The network has progressed past the last block for which this transaction could have been committed.",[zD]:"Codec [$codecDescription] cannot decode empty byte arrays.",[pU0]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[QO]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[tR]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[eR]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[rR]:"Encoder and decoder must either both be fixed-size or variable-size.",[EU0]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[MD]:"Expected a fixed-size codec, got a variable-size one.",[$O]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[sR]:"Expected a variable-size codec, got a fixed-size one.",[lU0]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[jD]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[fU0]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[hU0]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[xU0]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[yU0]:"Invalid literal union variant. Expected one of [$variants], got $value.",[AU0]:"Expected [$codecDescription] to have $expected items, got $actual.",[bU0]:"Invalid value $value for base $base with alphabet $alphabet.",[gU0]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[vU0]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[JO]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[XO]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[mU0]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[WO]:"This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",[k60]:"No random values implementation could be found.",[a60]:"instruction requires an uninitialized account",[VH0]:"instruction tries to borrow reference for an account which is already borrowed",[qH0]:"instruction left account with an outstanding borrowed reference",[YH0]:"program other than the account's owner changed the size of the account data",[d60]:"account data too small for instruction",[GH0]:"instruction expected an executable account",[TH0]:"An account does not have enough lamports to be rent-exempt",[EH0]:"Program arithmetic overflowed",[kH0]:"Failed to serialize or deserialize account data: $encodedData",[gH0]:"Builtin programs must consume compute units",[MH0]:"Cross-program invocation call depth too deep",[NH0]:"Computational budget exceeded",[HH0]:"custom program error: #$code",[JH0]:"instruction contains duplicate accounts",[KH0]:"instruction modifications of multiply-passed account differ",[zH0]:"executable accounts must be rent exempt",[UH0]:"instruction changed executable accounts data",[ZH0]:"instruction changed the balance of an executable account",[QH0]:"instruction changed executable bit of an account",[t60]:"instruction modified data of an account it does not own",[r60]:"instruction spent from the balance of an account it does not own",[m60]:"generic instruction error",[xH0]:"Provided owner is not allowed",[CH0]:"Account is immutable",[IH0]:"Incorrect authority provided",[c60]:"incorrect program id for instruction",[u60]:"insufficient funds for instruction",[p60]:"invalid account data for instruction",[AH0]:"Invalid account owner",[f60]:"invalid program argument",[DH0]:"program returned invalid error code",[l60]:"invalid instruction data",[OH0]:"Failed to reallocate account data",[RH0]:"Provided seeds do not result in a valid address",[vH0]:"Accounts data allocations exceeded the maximum allowed per transaction",[bH0]:"Max accounts exceeded",[yH0]:"Max instruction trace length exceeded",[PH0]:"Length of the seed is too long for address generation",[LH0]:"An account required by the instruction is missing",[i60]:"missing required signature for instruction",[s60]:"instruction illegally modified the program id of an account",[WH0]:"insufficient account keys for instruction",[_H0]:"Cross-program invocation with unauthorized signer or writable account",[FH0]:"Failed to create program execution environment",[BH0]:"Program failed to compile",[SH0]:"Program failed to complete",[$H0]:"instruction modified data of a read-only account",[e60]:"instruction changed the balance of a read-only account",[wH0]:"Cross-program invocation reentrancy not allowed for this instruction",[XH0]:"instruction modified rent epoch of an account",[n60]:"sum of account balances before and after instruction do not match",[o60]:"instruction requires an initialized account",[g60]:"",[jH0]:"Unsupported program id",[hH0]:"Unsupported sysvar",[XZ0]:"Invalid instruction plan kind: $kind.",[_U0]:"The provided instruction plan is empty.",[BU0]:"No failed transaction plan result was found in the provided transaction plan result.",[SU0]:"This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved \u2014 e.g. by targetting RPCs that support transaction bundles.",[FU0]:"The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",[OU0]:"The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",[WZ0]:"Invalid transaction plan kind: $kind.",[NU0]:"No more instructions to pack; the message packer has completed the instruction plan.",[CU0]:"Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",[IU0]:"Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",[kU0]:"Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",[TU0]:"Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",[v60]:"The instruction does not have any accounts.",[b60]:"The instruction does not have any data.",[y60]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[IK0]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[SK0]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[$Z0]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[QZ0]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[eU0]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[tU0]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[JZ0]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[vK0]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[bK0]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[gK0]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[yK0]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[xK0]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[iK0]:"$__serverMessage",[X60]:"$__serverMessage",[$60]:"$__serverMessage",[uK0]:"$__serverMessage",[lK0]:"Epoch rewards period still active at slot $slot",[oK0]:"$__serverMessage",[nK0]:"$__serverMessage",[mK0]:"Failed to query long-term storage; please try again",[pK0]:"Minimum context slot has not been reached",[eK0]:"Node is unhealthy; behind by $numSlotsBehind slots",[sK0]:"No snapshot",[Q60]:"Transaction simulation failed",[fK0]:"Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",[rK0]:"$__serverMessage",[aK0]:"Transaction history is not available from this node",[tK0]:"$__serverMessage",[cK0]:"Transaction signature length mismatch",[J60]:"Transaction signature verification failure",[dK0]:"$__serverMessage",[T60]:"Key pair bytes must be of length 64, got $byteLength.",[A60]:"Expected private key bytes with length 32. Actual length: $actualLength.",[E60]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[x60]:"The provided private key does not match the provided public key.",[h60]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[kK0]:"Lamports value must be in the range [0, 2e64-1]",[TK0]:"`$value` cannot be parsed as a `BigInt`",[hK0]:"$message",[AK0]:"`$value` cannot be parsed as a `Number`",[BK0]:"No nonce account could be found at address `$nonceAccountAddress`",[$D0]:"Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",[HD0]:"Attempted to sign an offchain message with an address that is not a signer for it",[eH0]:"Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",[KD0]:"The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",[rH0]:"The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",[WD0]:"Expected message format $expectedMessageFormat, got $actualMessageFormat",[YD0]:"The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",[GD0]:"Offchain message content must be non-empty",[QD0]:"Offchain message must specify the address of at least one required signer",[VD0]:"Offchain message envelope must reserve space for at least one signature",[JD0]:"The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",[UD0]:"The signatories of this offchain message must be listed in lexicographical order",[ZD0]:"An address must be listed no more than once among the signatories of an offchain message",[qD0]:"Offchain message is missing signatures for addresses: $addresses.",[zD0]:"Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",[tH0]:"The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",[DD0]:"Expected offchain message version $expectedVersion. Got $actualVersion.",[XD0]:"This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",[aU0]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[nU0]:"WebSocket was closed before payload could be added to the send buffer",[sU0]:"WebSocket connection closed",[rU0]:"WebSocket failed to connect",[oU0]:"Failed to obtain a subscription id from the server",[iU0]:"Could not find an API plan for RPC method: `$method`",[dU0]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[cU0]:"HTTP error ($statusCode): $message",[uU0]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[mH0]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[fH0]:"The provided value does not implement the `KeyPairSigner` interface",[pH0]:"The provided value does not implement the `MessageModifyingSigner` interface",[dH0]:"The provided value does not implement the `MessagePartialSigner` interface",[lH0]:"The provided value does not implement any of the `MessageSigner` interfaces",[cH0]:"The provided value does not implement the `TransactionModifyingSigner` interface",[iH0]:"The provided value does not implement the `TransactionPartialSigner` interface",[aH0]:"The provided value does not implement the `TransactionSendingSigner` interface",[uH0]:"The provided value does not implement any of the `TransactionSigner` interfaces",[oH0]:"More than one `TransactionSendingSigner` was identified.",[nH0]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[sH0]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[I60]:"Cannot export a non-extractable key.",[N60]:"No digest implementation could be found.",[O60]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[_60]:`This runtime does not support the generation of Ed25519 key pairs.
|
|
50
|
+
|
|
51
|
+
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
52
|
+
|
|
53
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[F60]:"No signature verification implementation could be found.",[S60]:"No key generation implementation could be found.",[B60]:"No signing implementation could be found.",[C60]:"No key export implementation could be found.",[EK0]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[$U0]:"Transaction processing left an account with an outstanding borrowed reference",[mD0]:"Account in use",[fD0]:"Account loaded twice",[lD0]:"Attempt to debit an account but found no record of a prior credit.",[VU0]:"Transaction loads an address table account that doesn't exist",[cD0]:"This transaction has already been processed",[iD0]:"Blockhash not found",[aD0]:"Loader call chain is too deep",[eD0]:"Transactions are currently disabled due to cluster maintenance",[zU0]:"Transaction contains a duplicate instruction ($index) that is not allowed",[dD0]:"Insufficient funds for fee",[jU0]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[uD0]:"This account may not be used to pay transaction fees",[nD0]:"Transaction contains an invalid account reference",[KU0]:"Transaction loads an address table account with invalid data",[HU0]:"Transaction address table lookup uses an invalid index",[qU0]:"Transaction loads an address table account with an invalid owner",[LU0]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[rD0]:"This program may not be used for executing instructions",[DU0]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[XU0]:"Transaction loads a writable account that cannot be written",[MU0]:"Transaction exceeded max loaded accounts data size cap",[oD0]:"Transaction requires a fee but has no signature present",[pD0]:"Attempt to load a program that does not exist",[PU0]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[wU0]:"ResanitizationNeeded",[tD0]:"Transaction failed to sanitize accounts offsets correctly",[sD0]:"Transaction did not pass signature verification",[GU0]:"Transaction locked too many accounts",[RU0]:"Sum of account balances before and after transaction do not match",[gD0]:"The transaction failed with the error `$errorName`",[QU0]:"Transaction version is unsupported",[YU0]:"Transaction would exceed account data limit within the block",[ZU0]:"Transaction would exceed total account data limit",[WU0]:"Transaction would exceed max account limit within the block",[JU0]:"Transaction would exceed max Block Cost Limit",[UU0]:"Transaction would exceed max Vote Cost Limit",[TD0]:"Attempted to sign a transaction with an address that is not a signer for it",[SD0]:"Transaction is missing an address at index: $index.",[AD0]:"Transaction has no expected signers therefore it cannot be encoded",[vD0]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[LD0]:"Transaction does not have a blockhash lifetime",[wD0]:"Transaction is not a durable nonce transaction",[RD0]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[OD0]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[_D0]:"No fee payer set in CompiledTransaction",[ND0]:"Could not find program address at index $index",[hD0]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[xD0]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[BD0]:"Transaction is missing a fee payer.",[CD0]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[kD0]:"Transaction first instruction is not advance nonce account instruction.",[ID0]:"Transaction with no instructions cannot be durable nonce transaction.",[jD0]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[MD0]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[ED0]:"The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",[FD0]:"Transaction is missing signatures for addresses: $addresses.",[PD0]:"Transaction version must be in the range [0, 127]. `$actualVersion` given",[bD0]:"This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 0.",[yD0]:"The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction."},E8="i",bQ="t";function GZ0($,J={}){let Q=YZ0[$];if(Q.length===0)return"";let X;function W(G){if(X[bQ]===2){let V=Q.slice(X[E8]+1,G);Y.push(V in J?`${J[V]}`:`$${V}`)}else if(X[bQ]===1)Y.push(Q.slice(X[E8],G))}let Y=[];return Q.split("").forEach((G,V)=>{if(V===0){X={[E8]:0,[bQ]:Q[0]==="\\"?0:Q[0]==="$"?2:1};return}let q;switch(X[bQ]){case 0:q={[E8]:V,[bQ]:1};break;case 1:if(G==="\\")q={[E8]:V,[bQ]:0};else if(G==="$")q={[E8]:V,[bQ]:2};break;case 2:if(G==="\\")q={[E8]:V,[bQ]:0};else if(G==="$")q={[E8]:V,[bQ]:2};else if(!G.match(/\w/))q={[E8]:V,[bQ]:1};break}if(q){if(X!==q)W(V);X=q}}),W(),Y.join("")}function VZ0($,J={}){return GZ0($,J)}var _4=class extends Error{cause=this.cause;context;constructor(...[$,J]){let Q,X;if(J)Object.entries(Object.getOwnPropertyDescriptors(J)).forEach(([Y,G])=>{if(Y==="cause")X={cause:G.value};else{if(Q===void 0)Q={__code:$};Object.defineProperty(Q,Y,G)}});let W=VZ0($,Q);super(W,X);this.context=Object.freeze(Q===void 0?{__code:$}:Q),this.name="SolanaError"}};function qZ0($,J){if($.length>=J)return $;let Q=new Uint8Array(J).fill(0);return Q.set($),Q}var KZ0=($,J)=>qZ0($.length<=J?$:$.slice(0,J),J);function YO($,J,Q){let X=Q===0&&$.length===J.length?$:$.slice(Q,Q+J.length);return HZ0(X,J)}function HZ0($,J){return $.length===J.length&&$.every((Q,X)=>Q===J[X])}function F4($){return Object.freeze({...$,decode:(J,Q=0)=>$.read(J,Q)[0]})}function GO($){return"fixedSize"in $&&typeof $.fixedSize==="number"}function VO($){if(!GO($))throw new _4(MD)}function qO($,J,Q=0){if(J.length-Q<=0)throw new _4(zD,{codecDescription:$})}function LD($,J,Q,X=0){let W=Q.length-X;if(W<J)throw new _4(jD,{bytesLength:W,codecDescription:$,expected:J})}function KO($,J,Q){let X=$.byteOffset+(J??0),W=Q??$.byteLength,Y;if(typeof SharedArrayBuffer>"u")Y=$.buffer;else if($.buffer instanceof SharedArrayBuffer)Y=new ArrayBuffer($.length),new Uint8Array(Y).set(new Uint8Array($));else Y=$.buffer;return(X===0||X===-$.byteLength)&&W===$.byteLength?Y:Y.slice(X,X+W)}function HO($,J){return F4({fixedSize:J,read:(Q,X)=>{if(LD("fixCodecSize",J,Q,X),X>0||Q.length>J)Q=Q.slice(X,X+J);if(GO($))Q=KZ0(Q,$.fixedSize);let[W]=$.read(Q,0);return[W,X+J]}})}function S4($,J){return F4({...$,read:(Q,X)=>{let[W,Y]=$.read(Q,X);return[J(W,Q,X),Y]}})}function UZ0($){return $?.endian===1?!1:!0}function ZZ0($){return F4({fixedSize:$.size,read(J,Q=0){qO($.name,J,Q),LD($.name,$.size,J,Q);let X=new DataView(KO(J,Q,$.size));return[$.get(X,UZ0($.config)),Q+$.size]}})}var DO=()=>ZZ0({get:($)=>$.getUint8(0),name:"u8",size:1});var LZ0=($)=>({__option:"Some",value:$}),UO=()=>({__option:"None"});function n$($,J={}){let Q=(()=>{if(J.prefix===null)return S4(FX(),()=>!1);return BJ({size:J.prefix??DO()})})(),X=(()=>{if(J.noneValue==="zeroes")return VO($),HO(FX(),$.fixedSize);if(!J.noneValue)return FX();return O4(J.noneValue)})();return VD([S4(T8([Q,X]),()=>UO()),S4(T8([Q,$]),([,W])=>LZ0(W))],(W,Y)=>{if(J.prefix===null&&!J.noneValue)return Number(Y<W.length);if(J.prefix===null&&J.noneValue!=null){let G=J.noneValue==="zeroes"?new Uint8Array(X.fixedSize).fill(0):J.noneValue;return YO(W,G,Y)?0:1}return Number(Q.read(W,Y)[0])})}var wZ0=1,PZ0=2,RZ0=3,OZ0=4,NZ0=5,_Z0=6,FZ0=7,SZ0=8,BZ0=9,CZ0=10,IZ0=-32700,kZ0=-32603,TZ0=-32602,AZ0=-32601,EZ0=-32600,hZ0=-32019,xZ0=-32018,vZ0=-32017,bZ0=-32016,yZ0=-32015,gZ0=-32014,mZ0=-32013,fZ0=-32012,lZ0=-32011,pZ0=-32010,dZ0=-32009,uZ0=-32008,cZ0=-32007,iZ0=-32006,aZ0=-32005,oZ0=-32004,nZ0=-32003,sZ0=-32002,rZ0=-32001,tZ0=2800000,eZ0=2800001,$20=2800002,J20=2800003,Q20=2800004,X20=2800005,W20=2800006,Y20=2800007,G20=2800008,V20=2800009,q20=2800010,K20=2800011,H20=3230000,D20=32300001,U20=3230002,Z20=3230003,z20=3230004,j20=3610000,M20=3610001,L20=3610002,w20=3610003,P20=3610004,R20=3610005,O20=3610006,N20=3610007,_20=3611000,F20=3704000,S20=3704001,B20=3704002,C20=3704003,I20=3704004,k20=4128000,T20=4128001,A20=4128002,E20=4615000,h20=4615001,x20=4615002,v20=4615003,b20=4615004,y20=4615005,g20=4615006,m20=4615007,f20=4615008,l20=4615009,p20=4615010,d20=4615011,u20=4615012,c20=4615013,i20=4615014,a20=4615015,o20=4615016,n20=4615017,s20=4615018,r20=4615019,t20=4615020,e20=4615021,$z0=4615022,Jz0=4615023,Qz0=4615024,Xz0=4615025,Wz0=4615026,Yz0=4615027,Gz0=4615028,Vz0=4615029,qz0=4615030,Kz0=4615031,Hz0=4615032,Dz0=4615033,Uz0=4615034,Zz0=4615035,zz0=4615036,jz0=4615037,Mz0=4615038,Lz0=4615039,wz0=4615040,Pz0=4615041,Rz0=4615042,Oz0=4615043,Nz0=4615044,_z0=4615045,Fz0=4615046,Sz0=4615047,Bz0=4615048,Cz0=4615049,Iz0=4615050,kz0=4615051,Tz0=4615052,Az0=4615053,Ez0=4615054,hz0=5508000,xz0=5508001,vz0=5508002,bz0=5508003,yz0=5508004,gz0=5508005,mz0=5508006,fz0=5508007,lz0=5508008,pz0=5508009,dz0=5508010,uz0=5508011,cz0=5607000,iz0=5607001,az0=5607002,oz0=5607003,nz0=5607004,sz0=5607005,rz0=5607006,tz0=5607007,ez0=5607008,$j0=5607009,Jj0=5607010,Qj0=5607011,Xj0=5607012,Wj0=5607013,Yj0=5607014,Gj0=5607015,Vj0=5607016,qj0=5607017,Kj0=5663000,Hj0=5663001,Dj0=5663002,Uj0=5663003,Zj0=5663004,zj0=5663005,jj0=5663006,Mj0=5663007,Lj0=5663008,wj0=5663009,Pj0=5663010,Rj0=5663011,Oj0=5663012,Nj0=5663013,_j0=5663014,Fj0=5663015,Sj0=5663016,Bj0=5663017,B4=5663018,C4=5663019,Cj0=5663020,Ij0=5663021,kj0=5663022,Tj0=7050000,Aj0=7050001,Ej0=7050002,hj0=7050003,xj0=7050004,vj0=7050005,bj0=7050006,yj0=7050007,gj0=7050008,mj0=7050009,fj0=7050010,lj0=7050011,pj0=7050012,dj0=7050013,uj0=7050014,cj0=7050015,ij0=7050016,aj0=7050017,oj0=7050018,nj0=7050019,sj0=7050020,rj0=7050021,tj0=7050022,ej0=7050023,$M0=7050024,JM0=7050025,QM0=7050026,XM0=7050027,WM0=7050028,YM0=7050029,GM0=7050030,VM0=7050031,qM0=7050032,KM0=7050033,HM0=7050034,DM0=7050035,UM0=7050036,ZM0=7618000,zM0=7618001,jM0=7618002,MM0=7618003,LM0=7618004,wM0=7618005,PM0=7618006,RM0=7618007,OM0=7618008,NM0=7618009,_M0=8078000,FM0=8078001,SM0=8078002,BM0=8078003,CM0=8078004,IM0=8078005,kM0=8078006,TM0=8078007,AM0=8078008,EM0=8078009,hM0=8078010,xM0=8078011,vM0=8078012,bM0=8078013,yM0=8078014,gM0=8078015,mM0=8078016,fM0=8078017,lM0=8078018,pM0=8078019,dM0=8078020,uM0=8078021,cM0=8078022,iM0=8078023,aM0=8100000,oM0=8100001,nM0=8100002,sM0=8100003,rM0=8190000,tM0=8190001,eM0=8190002,$L0=8190003,JL0=8190004,QL0=9900000,XL0=9900001,WL0=9900002,YL0=9900003,GL0=9900004,VL0=9900005,qL0=9900006;var KL0={[H20]:"Account not found at address: $address",[z20]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[Z20]:"Expected decoded account at address: $address",[U20]:"Failed to decode account data at address: $address",[D20]:"Accounts not found at addresses: $addresses",[V20]:"Unable to find a viable program address bump seed.",[$20]:"$putativeAddress is not a base58-encoded address.",[tZ0]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[J20]:"The `CryptoKey` must be an `Ed25519` public key.",[K20]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[G20]:"Invalid seeds; point must fall off the Ed25519 curve.",[Q20]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[W20]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[Y20]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[X20]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[q20]:"Program address cannot end with PDA marker.",[eZ0]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[OZ0]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[wZ0]:"The network has progressed past the last block for which this transaction could have been committed.",[_M0]:"Codec [$codecDescription] cannot decode empty byte arrays.",[cM0]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[dM0]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[IM0]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[kM0]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[CM0]:"Encoder and decoder must either both be fixed-size or variable-size.",[AM0]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[SM0]:"Expected a fixed-size codec, got a variable-size one.",[bM0]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[BM0]:"Expected a variable-size codec, got a fixed-size one.",[pM0]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[FM0]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[lM0]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[EM0]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[hM0]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[gM0]:"Invalid literal union variant. Expected one of [$variants], got $value.",[TM0]:"Expected [$codecDescription] to have $expected items, got $actual.",[vM0]:"Invalid value $value for base $base with alphabet $alphabet.",[mM0]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[xM0]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[yM0]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[uM0]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[fM0]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[iM0]:"This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",[_20]:"No random values implementation could be found.",[l20]:"instruction requires an uninitialized account",[Jz0]:"instruction tries to borrow reference for an account which is already borrowed",[Qz0]:"instruction left account with an outstanding borrowed reference",[e20]:"program other than the account's owner changed the size of the account data",[y20]:"account data too small for instruction",[$z0]:"instruction expected an executable account",[Fz0]:"An account does not have enough lamports to be rent-exempt",[Bz0]:"Program arithmetic overflowed",[_z0]:"Failed to serialize or deserialize account data: $encodedData",[Ez0]:"Builtin programs must consume compute units",[Hz0]:"Cross-program invocation call depth too deep",[Mz0]:"Computational budget exceeded",[Wz0]:"custom program error: #$code",[n20]:"instruction contains duplicate accounts",[Xz0]:"instruction modifications of multiply-passed account differ",[qz0]:"executable accounts must be rent exempt",[Gz0]:"instruction changed executable accounts data",[Vz0]:"instruction changed the balance of an executable account",[s20]:"instruction changed executable bit of an account",[i20]:"instruction modified data of an account it does not own",[c20]:"instruction spent from the balance of an account it does not own",[h20]:"generic instruction error",[Iz0]:"Provided owner is not allowed",[Oz0]:"Account is immutable",[Nz0]:"Incorrect authority provided",[m20]:"incorrect program id for instruction",[g20]:"insufficient funds for instruction",[b20]:"invalid account data for instruction",[Sz0]:"Invalid account owner",[x20]:"invalid program argument",[Yz0]:"program returned invalid error code",[v20]:"invalid instruction data",[jz0]:"Failed to reallocate account data",[zz0]:"Provided seeds do not result in a valid address",[kz0]:"Accounts data allocations exceeded the maximum allowed per transaction",[Tz0]:"Max accounts exceeded",[Az0]:"Max instruction trace length exceeded",[Zz0]:"Length of the seed is too long for address generation",[Dz0]:"An account required by the instruction is missing",[f20]:"missing required signature for instruction",[u20]:"instruction illegally modified the program id of an account",[t20]:"insufficient account keys for instruction",[Lz0]:"Cross-program invocation with unauthorized signer or writable account",[wz0]:"Failed to create program execution environment",[Rz0]:"Program failed to compile",[Pz0]:"Program failed to complete",[o20]:"instruction modified data of a read-only account",[a20]:"instruction changed the balance of a read-only account",[Uz0]:"Cross-program invocation reentrancy not allowed for this instruction",[r20]:"instruction modified rent epoch of an account",[d20]:"sum of account balances before and after instruction do not match",[p20]:"instruction requires an initialized account",[E20]:"",[Kz0]:"Unsupported program id",[Cz0]:"Unsupported sysvar",[VL0]:"Invalid instruction plan kind: $kind.",[jM0]:"The provided instruction plan is empty.",[wM0]:"No failed transaction plan result was found in the provided transaction plan result.",[LM0]:"This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved \u2014 e.g. by targetting RPCs that support transaction bundles.",[MM0]:"The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",[ZM0]:"The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",[qL0]:"Invalid transaction plan kind: $kind.",[zM0]:"No more instructions to pack; the message packer has completed the instruction plan.",[PM0]:"Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",[RM0]:"Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",[OM0]:"Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",[NM0]:"Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",[k20]:"The instruction does not have any accounts.",[T20]:"The instruction does not have any data.",[A20]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[NZ0]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[PZ0]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[WL0]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[GL0]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[XL0]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[QL0]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[YL0]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[kZ0]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[TZ0]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[EZ0]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[AZ0]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[IZ0]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[fZ0]:"$__serverMessage",[rZ0]:"$__serverMessage",[oZ0]:"$__serverMessage",[gZ0]:"$__serverMessage",[vZ0]:"Epoch rewards period still active at slot $slot",[pZ0]:"$__serverMessage",[dZ0]:"$__serverMessage",[hZ0]:"Failed to query long-term storage; please try again",[bZ0]:"Minimum context slot has not been reached",[aZ0]:"Node is unhealthy; behind by $numSlotsBehind slots",[uZ0]:"No snapshot",[sZ0]:"Transaction simulation failed",[xZ0]:"Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",[cZ0]:"$__serverMessage",[lZ0]:"Transaction history is not available from this node",[iZ0]:"$__serverMessage",[mZ0]:"Transaction signature length mismatch",[nZ0]:"Transaction signature verification failure",[yZ0]:"$__serverMessage",[F20]:"Key pair bytes must be of length 64, got $byteLength.",[S20]:"Expected private key bytes with length 32. Actual length: $actualLength.",[B20]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[I20]:"The provided private key does not match the provided public key.",[C20]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[_Z0]:"Lamports value must be in the range [0, 2e64-1]",[FZ0]:"`$value` cannot be parsed as a `BigInt`",[CZ0]:"$message",[SZ0]:"`$value` cannot be parsed as a `Number`",[RZ0]:"No nonce account could be found at address `$nonceAccountAddress`",[oz0]:"Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",[Wj0]:"Attempted to sign an offchain message with an address that is not a signer for it",[az0]:"Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",[Xj0]:"The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",[cz0]:"The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",[tz0]:"Expected message format $expectedMessageFormat, got $actualMessageFormat",[ez0]:"The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",[$j0]:"Offchain message content must be non-empty",[sz0]:"Offchain message must specify the address of at least one required signer",[Jj0]:"Offchain message envelope must reserve space for at least one signature",[nz0]:"The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",[Gj0]:"The signatories of this offchain message must be listed in lexicographical order",[Vj0]:"An address must be listed no more than once among the signatories of an offchain message",[Qj0]:"Offchain message is missing signatures for addresses: $addresses.",[qj0]:"Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",[iz0]:"The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",[Yj0]:"Expected offchain message version $expectedVersion. Got $actualVersion.",[rz0]:"This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",[rM0]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[eM0]:"WebSocket was closed before payload could be added to the send buffer",[$L0]:"WebSocket connection closed",[JL0]:"WebSocket failed to connect",[tM0]:"Failed to obtain a subscription id from the server",[sM0]:"Could not find an API plan for RPC method: `$method`",[aM0]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[nM0]:"HTTP error ($statusCode): $message",[oM0]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[hz0]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[xz0]:"The provided value does not implement the `KeyPairSigner` interface",[bz0]:"The provided value does not implement the `MessageModifyingSigner` interface",[yz0]:"The provided value does not implement the `MessagePartialSigner` interface",[vz0]:"The provided value does not implement any of the `MessageSigner` interfaces",[mz0]:"The provided value does not implement the `TransactionModifyingSigner` interface",[fz0]:"The provided value does not implement the `TransactionPartialSigner` interface",[lz0]:"The provided value does not implement the `TransactionSendingSigner` interface",[gz0]:"The provided value does not implement any of the `TransactionSigner` interfaces",[pz0]:"More than one `TransactionSendingSigner` was identified.",[dz0]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[uz0]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[N20]:"Cannot export a non-extractable key.",[M20]:"No digest implementation could be found.",[j20]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[L20]:`This runtime does not support the generation of Ed25519 key pairs.
|
|
54
|
+
|
|
55
|
+
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
56
|
+
|
|
57
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[w20]:"No signature verification implementation could be found.",[P20]:"No key generation implementation could be found.",[R20]:"No signing implementation could be found.",[O20]:"No key export implementation could be found.",[BZ0]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[ij0]:"Transaction processing left an account with an outstanding borrowed reference",[Aj0]:"Account in use",[Ej0]:"Account loaded twice",[hj0]:"Attempt to debit an account but found no record of a prior credit.",[ej0]:"Transaction loads an address table account that doesn't exist",[yj0]:"This transaction has already been processed",[gj0]:"Blockhash not found",[mj0]:"Loader call chain is too deep",[cj0]:"Transactions are currently disabled due to cluster maintenance",[GM0]:"Transaction contains a duplicate instruction ($index) that is not allowed",[vj0]:"Insufficient funds for fee",[VM0]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[bj0]:"This account may not be used to pay transaction fees",[lj0]:"Transaction contains an invalid account reference",[JM0]:"Transaction loads an address table account with invalid data",[QM0]:"Transaction address table lookup uses an invalid index",[$M0]:"Transaction loads an address table account with an invalid owner",[KM0]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[dj0]:"This program may not be used for executing instructions",[XM0]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[nj0]:"Transaction loads a writable account that cannot be written",[qM0]:"Transaction exceeded max loaded accounts data size cap",[fj0]:"Transaction requires a fee but has no signature present",[xj0]:"Attempt to load a program that does not exist",[DM0]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[HM0]:"ResanitizationNeeded",[uj0]:"Transaction failed to sanitize accounts offsets correctly",[pj0]:"Transaction did not pass signature verification",[tj0]:"Transaction locked too many accounts",[UM0]:"Sum of account balances before and after transaction do not match",[Tj0]:"The transaction failed with the error `$errorName`",[oj0]:"Transaction version is unsupported",[rj0]:"Transaction would exceed account data limit within the block",[YM0]:"Transaction would exceed total account data limit",[sj0]:"Transaction would exceed max account limit within the block",[aj0]:"Transaction would exceed max Block Cost Limit",[WM0]:"Transaction would exceed max Vote Cost Limit",[Fj0]:"Attempted to sign a transaction with an address that is not a signer for it",[Pj0]:"Transaction is missing an address at index: $index.",[Sj0]:"Transaction has no expected signers therefore it cannot be encoded",[Cj0]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[Dj0]:"Transaction does not have a blockhash lifetime",[Uj0]:"Transaction is not a durable nonce transaction",[zj0]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[jj0]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[Lj0]:"No fee payer set in CompiledTransaction",[Mj0]:"Could not find program address at index $index",[B4]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[C4]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[Rj0]:"Transaction is missing a fee payer.",[Oj0]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[_j0]:"Transaction first instruction is not advance nonce account instruction.",[Nj0]:"Transaction with no instructions cannot be durable nonce transaction.",[Kj0]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[Hj0]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[Bj0]:"The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",[wj0]:"Transaction is missing signatures for addresses: $addresses.",[Zj0]:"Transaction version must be in the range [0, 127]. `$actualVersion` given",[Ij0]:"This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 0.",[kj0]:"The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction."},h8="i",yQ="t";function HL0($,J={}){let Q=KL0[$];if(Q.length===0)return"";let X;function W(G){if(X[yQ]===2){let V=Q.slice(X[h8]+1,G);Y.push(V in J?`${J[V]}`:`$${V}`)}else if(X[yQ]===1)Y.push(Q.slice(X[h8],G))}let Y=[];return Q.split("").forEach((G,V)=>{if(V===0){X={[h8]:0,[yQ]:Q[0]==="\\"?0:Q[0]==="$"?2:1};return}let q;switch(X[yQ]){case 0:q={[h8]:V,[yQ]:1};break;case 1:if(G==="\\")q={[h8]:V,[yQ]:0};else if(G==="$")q={[h8]:V,[yQ]:2};break;case 2:if(G==="\\")q={[h8]:V,[yQ]:0};else if(G==="$")q={[h8]:V,[yQ]:2};else if(!G.match(/\w/))q={[h8]:V,[yQ]:1};break}if(q){if(X!==q)W(V);X=q}}),W(),Y.join("")}function DL0($,J={}){return HL0($,J)}function ZO($,J){if($ instanceof Error&&$.name==="SolanaError"){if(J!==void 0)return $.context.__code===J;return!0}return!1}var I4=class extends Error{cause=this.cause;context;constructor(...[$,J]){let Q,X;if(J)Object.entries(Object.getOwnPropertyDescriptors(J)).forEach(([Y,G])=>{if(Y==="cause")X={cause:G.value};else{if(Q===void 0)Q={__code:$};Object.defineProperty(Q,Y,G)}});let W=DL0($,Q);super(W,X);this.context=Object.freeze(Q===void 0?{__code:$}:Q),this.name="SolanaError"}};function UJ($,...J){return J.reduce((Q,X)=>X(Q),$)}var IJ=(($)=>{return $[$.WRITABLE_SIGNER=3]="WRITABLE_SIGNER",$[$.READONLY_SIGNER=2]="READONLY_SIGNER",$[$.WRITABLE=1]="WRITABLE",$[$.READONLY=0]="READONLY",$})(IJ||{}),UL0=2,ZL0=1;function ZW($){return $>=2}function a5($){return($&ZL0)!==0}function wD($,J){return $|J}function zO($){return $|UL0}var zL0=1,jL0=2,ML0=3,LL0=4,wL0=5,PL0=6,RL0=7,OL0=8,NL0=9,_L0=10,FL0=-32700,SL0=-32603,BL0=-32602,CL0=-32601,IL0=-32600,kL0=-32019,TL0=-32018,AL0=-32017,EL0=-32016,hL0=-32015,xL0=-32014,vL0=-32013,bL0=-32012,yL0=-32011,gL0=-32010,mL0=-32009,fL0=-32008,lL0=-32007,pL0=-32006,dL0=-32005,uL0=-32004,cL0=-32003,iL0=-32002,aL0=-32001,oL0=2800000,nL0=2800001,sL0=2800002,rL0=2800003,tL0=2800004,eL0=2800005,$w0=2800006,Jw0=2800007,Qw0=2800008,Xw0=2800009,Ww0=2800010,Yw0=2800011,Gw0=3230000,Vw0=32300001,qw0=3230002,Kw0=3230003,Hw0=3230004,Dw0=3610000,Uw0=3610001,Zw0=3610002,zw0=3610003,jw0=3610004,Mw0=3610005,Lw0=3610006,ww0=3610007,Pw0=3611000,Rw0=3704000,Ow0=3704001,Nw0=3704002,_w0=3704003,Fw0=3704004,Sw0=4128000,Bw0=4128001,Cw0=4128002,Iw0=4615000,kw0=4615001,Tw0=4615002,Aw0=4615003,Ew0=4615004,hw0=4615005,xw0=4615006,vw0=4615007,bw0=4615008,yw0=4615009,gw0=4615010,mw0=4615011,fw0=4615012,lw0=4615013,pw0=4615014,dw0=4615015,uw0=4615016,cw0=4615017,iw0=4615018,aw0=4615019,ow0=4615020,nw0=4615021,sw0=4615022,rw0=4615023,tw0=4615024,ew0=4615025,$P0=4615026,JP0=4615027,QP0=4615028,XP0=4615029,WP0=4615030,YP0=4615031,GP0=4615032,VP0=4615033,qP0=4615034,KP0=4615035,HP0=4615036,DP0=4615037,UP0=4615038,ZP0=4615039,zP0=4615040,jP0=4615041,MP0=4615042,LP0=4615043,wP0=4615044,PP0=4615045,RP0=4615046,OP0=4615047,NP0=4615048,_P0=4615049,FP0=4615050,SP0=4615051,BP0=4615052,CP0=4615053,IP0=4615054,kP0=5508000,TP0=5508001,AP0=5508002,EP0=5508003,hP0=5508004,xP0=5508005,vP0=5508006,bP0=5508007,yP0=5508008,gP0=5508009,mP0=5508010,fP0=5508011,lP0=5607000,pP0=5607001,dP0=5607002,uP0=5607003,cP0=5607004,iP0=5607005,aP0=5607006,oP0=5607007,nP0=5607008,sP0=5607009,rP0=5607010,tP0=5607011,eP0=5607012,$R0=5607013,JR0=5607014,QR0=5607015,XR0=5607016,WR0=5607017,PD=5663000,k4=5663001,jO=5663002,MO=5663003,RD=5663004,LO=5663005,wO=5663006,PO=5663007,RO=5663008,YR0=5663009,GR0=5663010,VR0=5663011,qR0=5663012,KR0=5663013,HR0=5663014,DR0=5663015,UR0=5663016,ZR0=5663017,zR0=5663018,jR0=5663019,MR0=5663020,T4=5663021,LR0=5663022,wR0=7050000,PR0=7050001,RR0=7050002,OR0=7050003,NR0=7050004,_R0=7050005,FR0=7050006,SR0=7050007,BR0=7050008,CR0=7050009,IR0=7050010,kR0=7050011,TR0=7050012,AR0=7050013,ER0=7050014,hR0=7050015,xR0=7050016,vR0=7050017,bR0=7050018,yR0=7050019,gR0=7050020,mR0=7050021,fR0=7050022,lR0=7050023,pR0=7050024,dR0=7050025,uR0=7050026,cR0=7050027,iR0=7050028,aR0=7050029,oR0=7050030,nR0=7050031,sR0=7050032,rR0=7050033,tR0=7050034,eR0=7050035,$O0=7050036,JO0=7618000,QO0=7618001,XO0=7618002,WO0=7618003,YO0=7618004,GO0=7618005,VO0=7618006,qO0=7618007,KO0=7618008,HO0=7618009,OD=8078000,ND=8078001,OO=8078002,NO=8078003,_O=8078004,FO=8078005,SO=8078006,DO0=8078007,UO0=8078008,ZO0=8078009,zO0=8078010,_D=8078011,FD=8078012,BO=8078013,CO=8078014,jO0=8078015,MO0=8078016,LO0=8078017,wO0=8078018,PO0=8078019,IO=8078020,kO=8078021,RO0=8078022,TO=8078023,OO0=8100000,NO0=8100001,_O0=8100002,FO0=8100003,SO0=8190000,BO0=8190001,CO0=8190002,IO0=8190003,kO0=8190004,TO0=9900000,AO0=9900001,EO0=9900002,hO0=9900003,xO0=9900004,vO0=9900005,bO0=9900006;var yO0={[Gw0]:"Account not found at address: $address",[Hw0]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[Kw0]:"Expected decoded account at address: $address",[qw0]:"Failed to decode account data at address: $address",[Vw0]:"Accounts not found at addresses: $addresses",[Xw0]:"Unable to find a viable program address bump seed.",[sL0]:"$putativeAddress is not a base58-encoded address.",[oL0]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[rL0]:"The `CryptoKey` must be an `Ed25519` public key.",[Yw0]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[Qw0]:"Invalid seeds; point must fall off the Ed25519 curve.",[tL0]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[$w0]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[Jw0]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[eL0]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[Ww0]:"Program address cannot end with PDA marker.",[nL0]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[LL0]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[zL0]:"The network has progressed past the last block for which this transaction could have been committed.",[OD]:"Codec [$codecDescription] cannot decode empty byte arrays.",[RO0]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[IO]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[FO]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[SO]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[_O]:"Encoder and decoder must either both be fixed-size or variable-size.",[UO0]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[OO]:"Expected a fixed-size codec, got a variable-size one.",[BO]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[NO]:"Expected a variable-size codec, got a fixed-size one.",[PO0]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[ND]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[wO0]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[ZO0]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[zO0]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[jO0]:"Invalid literal union variant. Expected one of [$variants], got $value.",[DO0]:"Expected [$codecDescription] to have $expected items, got $actual.",[FD]:"Invalid value $value for base $base with alphabet $alphabet.",[MO0]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[_D]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[CO]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[kO]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[LO0]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[TO]:"This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",[Pw0]:"No random values implementation could be found.",[yw0]:"instruction requires an uninitialized account",[rw0]:"instruction tries to borrow reference for an account which is already borrowed",[tw0]:"instruction left account with an outstanding borrowed reference",[nw0]:"program other than the account's owner changed the size of the account data",[hw0]:"account data too small for instruction",[sw0]:"instruction expected an executable account",[RP0]:"An account does not have enough lamports to be rent-exempt",[NP0]:"Program arithmetic overflowed",[PP0]:"Failed to serialize or deserialize account data: $encodedData",[IP0]:"Builtin programs must consume compute units",[GP0]:"Cross-program invocation call depth too deep",[UP0]:"Computational budget exceeded",[$P0]:"custom program error: #$code",[cw0]:"instruction contains duplicate accounts",[ew0]:"instruction modifications of multiply-passed account differ",[WP0]:"executable accounts must be rent exempt",[QP0]:"instruction changed executable accounts data",[XP0]:"instruction changed the balance of an executable account",[iw0]:"instruction changed executable bit of an account",[pw0]:"instruction modified data of an account it does not own",[lw0]:"instruction spent from the balance of an account it does not own",[kw0]:"generic instruction error",[FP0]:"Provided owner is not allowed",[LP0]:"Account is immutable",[wP0]:"Incorrect authority provided",[vw0]:"incorrect program id for instruction",[xw0]:"insufficient funds for instruction",[Ew0]:"invalid account data for instruction",[OP0]:"Invalid account owner",[Tw0]:"invalid program argument",[JP0]:"program returned invalid error code",[Aw0]:"invalid instruction data",[DP0]:"Failed to reallocate account data",[HP0]:"Provided seeds do not result in a valid address",[SP0]:"Accounts data allocations exceeded the maximum allowed per transaction",[BP0]:"Max accounts exceeded",[CP0]:"Max instruction trace length exceeded",[KP0]:"Length of the seed is too long for address generation",[VP0]:"An account required by the instruction is missing",[bw0]:"missing required signature for instruction",[fw0]:"instruction illegally modified the program id of an account",[ow0]:"insufficient account keys for instruction",[ZP0]:"Cross-program invocation with unauthorized signer or writable account",[zP0]:"Failed to create program execution environment",[MP0]:"Program failed to compile",[jP0]:"Program failed to complete",[uw0]:"instruction modified data of a read-only account",[dw0]:"instruction changed the balance of a read-only account",[qP0]:"Cross-program invocation reentrancy not allowed for this instruction",[aw0]:"instruction modified rent epoch of an account",[mw0]:"sum of account balances before and after instruction do not match",[gw0]:"instruction requires an initialized account",[Iw0]:"",[YP0]:"Unsupported program id",[_P0]:"Unsupported sysvar",[vO0]:"Invalid instruction plan kind: $kind.",[XO0]:"The provided instruction plan is empty.",[GO0]:"No failed transaction plan result was found in the provided transaction plan result.",[YO0]:"This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved \u2014 e.g. by targetting RPCs that support transaction bundles.",[WO0]:"The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",[JO0]:"The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",[bO0]:"Invalid transaction plan kind: $kind.",[QO0]:"No more instructions to pack; the message packer has completed the instruction plan.",[VO0]:"Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",[qO0]:"Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",[KO0]:"Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",[HO0]:"Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",[Sw0]:"The instruction does not have any accounts.",[Bw0]:"The instruction does not have any data.",[Cw0]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[wL0]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[jL0]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[EO0]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[xO0]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[AO0]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[TO0]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[hO0]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[SL0]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[BL0]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[IL0]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[CL0]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[FL0]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[bL0]:"$__serverMessage",[aL0]:"$__serverMessage",[uL0]:"$__serverMessage",[xL0]:"$__serverMessage",[AL0]:"Epoch rewards period still active at slot $slot",[gL0]:"$__serverMessage",[mL0]:"$__serverMessage",[kL0]:"Failed to query long-term storage; please try again",[EL0]:"Minimum context slot has not been reached",[dL0]:"Node is unhealthy; behind by $numSlotsBehind slots",[fL0]:"No snapshot",[iL0]:"Transaction simulation failed",[TL0]:"Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",[lL0]:"$__serverMessage",[yL0]:"Transaction history is not available from this node",[pL0]:"$__serverMessage",[vL0]:"Transaction signature length mismatch",[cL0]:"Transaction signature verification failure",[hL0]:"$__serverMessage",[Rw0]:"Key pair bytes must be of length 64, got $byteLength.",[Ow0]:"Expected private key bytes with length 32. Actual length: $actualLength.",[Nw0]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[Fw0]:"The provided private key does not match the provided public key.",[_w0]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[PL0]:"Lamports value must be in the range [0, 2e64-1]",[RL0]:"`$value` cannot be parsed as a `BigInt`",[_L0]:"$message",[OL0]:"`$value` cannot be parsed as a `Number`",[ML0]:"No nonce account could be found at address `$nonceAccountAddress`",[uP0]:"Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",[$R0]:"Attempted to sign an offchain message with an address that is not a signer for it",[dP0]:"Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",[eP0]:"The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",[lP0]:"The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",[oP0]:"Expected message format $expectedMessageFormat, got $actualMessageFormat",[nP0]:"The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",[sP0]:"Offchain message content must be non-empty",[iP0]:"Offchain message must specify the address of at least one required signer",[rP0]:"Offchain message envelope must reserve space for at least one signature",[cP0]:"The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",[QR0]:"The signatories of this offchain message must be listed in lexicographical order",[XR0]:"An address must be listed no more than once among the signatories of an offchain message",[tP0]:"Offchain message is missing signatures for addresses: $addresses.",[WR0]:"Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",[pP0]:"The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",[JR0]:"Expected offchain message version $expectedVersion. Got $actualVersion.",[aP0]:"This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",[SO0]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[CO0]:"WebSocket was closed before payload could be added to the send buffer",[IO0]:"WebSocket connection closed",[kO0]:"WebSocket failed to connect",[BO0]:"Failed to obtain a subscription id from the server",[FO0]:"Could not find an API plan for RPC method: `$method`",[OO0]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[_O0]:"HTTP error ($statusCode): $message",[NO0]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[kP0]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[TP0]:"The provided value does not implement the `KeyPairSigner` interface",[EP0]:"The provided value does not implement the `MessageModifyingSigner` interface",[hP0]:"The provided value does not implement the `MessagePartialSigner` interface",[AP0]:"The provided value does not implement any of the `MessageSigner` interfaces",[vP0]:"The provided value does not implement the `TransactionModifyingSigner` interface",[bP0]:"The provided value does not implement the `TransactionPartialSigner` interface",[yP0]:"The provided value does not implement the `TransactionSendingSigner` interface",[xP0]:"The provided value does not implement any of the `TransactionSigner` interfaces",[gP0]:"More than one `TransactionSendingSigner` was identified.",[mP0]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[fP0]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[ww0]:"Cannot export a non-extractable key.",[Uw0]:"No digest implementation could be found.",[Dw0]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[Zw0]:`This runtime does not support the generation of Ed25519 key pairs.
|
|
58
|
+
|
|
59
|
+
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
60
|
+
|
|
61
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[zw0]:"No signature verification implementation could be found.",[jw0]:"No key generation implementation could be found.",[Mw0]:"No signing implementation could be found.",[Lw0]:"No key export implementation could be found.",[NL0]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[xR0]:"Transaction processing left an account with an outstanding borrowed reference",[PR0]:"Account in use",[RR0]:"Account loaded twice",[OR0]:"Attempt to debit an account but found no record of a prior credit.",[lR0]:"Transaction loads an address table account that doesn't exist",[SR0]:"This transaction has already been processed",[BR0]:"Blockhash not found",[CR0]:"Loader call chain is too deep",[hR0]:"Transactions are currently disabled due to cluster maintenance",[oR0]:"Transaction contains a duplicate instruction ($index) that is not allowed",[_R0]:"Insufficient funds for fee",[nR0]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[FR0]:"This account may not be used to pay transaction fees",[kR0]:"Transaction contains an invalid account reference",[dR0]:"Transaction loads an address table account with invalid data",[uR0]:"Transaction address table lookup uses an invalid index",[pR0]:"Transaction loads an address table account with an invalid owner",[rR0]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[AR0]:"This program may not be used for executing instructions",[cR0]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[yR0]:"Transaction loads a writable account that cannot be written",[sR0]:"Transaction exceeded max loaded accounts data size cap",[IR0]:"Transaction requires a fee but has no signature present",[NR0]:"Attempt to load a program that does not exist",[eR0]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[tR0]:"ResanitizationNeeded",[ER0]:"Transaction failed to sanitize accounts offsets correctly",[TR0]:"Transaction did not pass signature verification",[fR0]:"Transaction locked too many accounts",[$O0]:"Sum of account balances before and after transaction do not match",[wR0]:"The transaction failed with the error `$errorName`",[bR0]:"Transaction version is unsupported",[mR0]:"Transaction would exceed account data limit within the block",[aR0]:"Transaction would exceed total account data limit",[gR0]:"Transaction would exceed max account limit within the block",[vR0]:"Transaction would exceed max Block Cost Limit",[iR0]:"Transaction would exceed max Vote Cost Limit",[DR0]:"Attempted to sign a transaction with an address that is not a signer for it",[GR0]:"Transaction is missing an address at index: $index.",[UR0]:"Transaction has no expected signers therefore it cannot be encoded",[MR0]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[jO]:"Transaction does not have a blockhash lifetime",[MO]:"Transaction is not a durable nonce transaction",[LO]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[wO]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[RO]:"No fee payer set in CompiledTransaction",[PO]:"Could not find program address at index $index",[zR0]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[jR0]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[VR0]:"Transaction is missing a fee payer.",[qR0]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[HR0]:"Transaction first instruction is not advance nonce account instruction.",[KR0]:"Transaction with no instructions cannot be durable nonce transaction.",[PD]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[k4]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[ZR0]:"The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",[YR0]:"Transaction is missing signatures for addresses: $addresses.",[RD]:"Transaction version must be in the range [0, 127]. `$actualVersion` given",[T4]:"This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 0.",[LR0]:"The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction."},x8="i",gQ="t";function gO0($,J={}){let Q=yO0[$];if(Q.length===0)return"";let X;function W(G){if(X[gQ]===2){let V=Q.slice(X[x8]+1,G);Y.push(V in J?`${J[V]}`:`$${V}`)}else if(X[gQ]===1)Y.push(Q.slice(X[x8],G))}let Y=[];return Q.split("").forEach((G,V)=>{if(V===0){X={[x8]:0,[gQ]:Q[0]==="\\"?0:Q[0]==="$"?2:1};return}let q;switch(X[gQ]){case 0:q={[x8]:V,[gQ]:1};break;case 1:if(G==="\\")q={[x8]:V,[gQ]:0};else if(G==="$")q={[x8]:V,[gQ]:2};break;case 2:if(G==="\\")q={[x8]:V,[gQ]:0};else if(G==="$")q={[x8]:V,[gQ]:2};else if(!G.match(/\w/))q={[x8]:V,[gQ]:1};break}if(q){if(X!==q)W(V);X=q}}),W(),Y.join("")}function mO0($,J={}){return gO0($,J)}var kJ=class extends Error{cause=this.cause;context;constructor(...[$,J]){let Q,X;if(J)Object.entries(Object.getOwnPropertyDescriptors(J)).forEach(([Y,G])=>{if(Y==="cause")X={cause:G.value};else{if(Q===void 0)Q={__code:$};Object.defineProperty(Q,Y,G)}});let W=mO0($,Q);super(W,X);this.context=Object.freeze(Q===void 0?{__code:$}:Q),this.name="SolanaError"}};function AO($){return Z4($)}function A4($){return $}function E4($){return $}var df9=-9223372036854775808n;function fO0($,J){if($.length>=J)return $;let Q=new Uint8Array(J).fill(0);return Q.set($),Q}var lO0=($,J)=>fO0($.length<=J?$:$.slice(0,J),J);function SD($,J){return"fixedSize"in J?J.fixedSize:J.getSizeFromValue($)}function YQ($){return Object.freeze({...$,encode:(J)=>{let Q=new Uint8Array(SD(J,$));return $.write(J,Q,0),Q}})}function fQ($){return Object.freeze({...$,decode:(J,Q=0)=>$.read(J,Q)[0]})}function mQ($){return"fixedSize"in $&&typeof $.fixedSize==="number"}function pO0($){return!mQ($)}function EO($,J,Q=0){if(J.length-Q<=0)throw new kJ(OD,{codecDescription:$})}function h4($,J,Q,X=0){let W=Q.length-X;if(W<J)throw new kJ(ND,{bytesLength:W,codecDescription:$,expected:J})}function hO($,J){let Q=(G,V,q)=>{let H=$.encode(G);return q=J.write(H.length,V,q),V.set(H,q),q+H.length};if(mQ(J)&&mQ($))return YQ({...$,fixedSize:J.fixedSize+$.fixedSize,write:Q});let X=mQ(J)?J.fixedSize:J.maxSize??null,W=mQ($)?$.fixedSize:$.maxSize??null,Y=X!==null&&W!==null?X+W:null;return YQ({...$,...Y!==null?{maxSize:Y}:{},getSizeFromValue:(G)=>{let V=SD(G,$);return SD(V,J)+V},write:Q})}function xO($,J){let Q=(G,V)=>{let[q,H]=J.read(G,V),Z=Number(q);if(V=H,V>0||G.length>Z)G=G.slice(V,V+Z);return h4("addDecoderSizePrefix",Z,G),[$.decode(G),V+Z]};if(mQ(J)&&mQ($))return fQ({...$,fixedSize:J.fixedSize+$.fixedSize,read:Q});let X=mQ(J)?J.fixedSize:J.maxSize??null,W=mQ($)?$.fixedSize:$.maxSize??null,Y=X!==null&&W!==null?X+W:null;return fQ({...$,...Y!==null?{maxSize:Y}:{},read:Q})}function vO($,J,Q){let X=$.byteOffset+(J??0),W=Q??$.byteLength,Y;if(typeof SharedArrayBuffer>"u")Y=$.buffer;else if($.buffer instanceof SharedArrayBuffer)Y=new ArrayBuffer($.length),new Uint8Array(Y).set(new Uint8Array($));else Y=$.buffer;return(X===0||X===-$.byteLength)&&W===$.byteLength?Y:Y.slice(X,X+W)}function bO($,J){return YQ({fixedSize:J,write:(Q,X,W)=>{let Y=$.encode(Q),G=Y.length>J?Y.slice(0,J):Y;return X.set(G,W),W+J}})}function yO($,J){return fQ({fixedSize:J,read:(Q,X)=>{if(h4("fixCodecSize",J,Q,X),X>0||Q.length>J)Q=Q.slice(X,X+J);if(mQ($))Q=lO0(Q,$.fixedSize);let[W]=$.read(Q,0);return[W,X+J]}})}function BD($,J){return YQ({...pO0($)?{...$,getSizeFromValue:(Q)=>$.getSizeFromValue(J(Q))}:$,write:(Q,X,W)=>$.write(J(Q),X,W)})}function CD($,J){return fQ({...$,read:(Q,X)=>{let[W,Y]=$.read(Q,X);return[J(W,Q,X),Y]}})}function gO($,J,Q,X){if(X<J||X>Q)throw new kJ(_D,{codecDescription:$,max:Q,min:J,value:X})}function mO($){return $?.endian===1?!1:!0}function uO0($){return YQ({fixedSize:$.size,write(J,Q,X){if($.range)gO($.name,$.range[0],$.range[1],J);let W=new ArrayBuffer($.size);return $.set(new DataView(W),J,mO($.config)),Q.set(new Uint8Array(W),X),X+$.size}})}function cO0($){return fQ({fixedSize:$.size,read(J,Q=0){EO($.name,J,Q),h4($.name,$.size,J,Q);let X=new DataView(vO(J,Q,$.size));return[$.get(X,mO($.config)),Q+$.size]}})}var zW=()=>YQ({getSizeFromValue:($)=>{if($<=127)return 1;if($<=16383)return 2;return 3},maxSize:3,write:($,J,Q)=>{gO("shortU16",0,65535,$);let X=[0];for(let W=0;;W+=1){let Y=Number($)>>W*7;if(Y===0)break;let G=127&Y;if(X[W]=G,W>0)X[W-1]|=128}return J.set(X,Q),Q+X.length}}),jW=()=>fQ({maxSize:3,read:($,J)=>{let Q=0,X=0;while(++X){let W=X-1,Y=$[J+W],G=127&Y;if(Q|=G<<W*7,(Y&128)===0)break}return[Q,J+X]}});var PG=()=>uO0({name:"u8",range:[0,Number("0xff")],set:($,J)=>$.setUint8(0,Number(J)),size:1}),RG=()=>cO0({get:($)=>$.getUint8(0),name:"u8",size:1});function cO($){return"lifetimeConstraint"in $&&typeof $.lifetimeConstraint.blockhash==="string"&&typeof $.lifetimeConstraint.lastValidBlockHeight==="bigint"&&AO($.lifetimeConstraint.blockhash)}function iO($,J){if("lifetimeConstraint"in J&&J.lifetimeConstraint&&"blockhash"in J.lifetimeConstraint&&J.lifetimeConstraint.blockhash===$.blockhash&&J.lifetimeConstraint.lastValidBlockHeight===$.lastValidBlockHeight)return J;return Object.freeze({...J,lifetimeConstraint:Object.freeze($)})}function iO0($,J,Q=J){if(!J.match(new RegExp(`^[${$}]*$`)))throw new kJ(FD,{alphabet:$,base:$.length,value:Q})}var aO0=($)=>{return YQ({getSizeFromValue:(J)=>{let[Q,X]=fO(J,$[0]);if(!X)return J.length;let W=lO(X,$);return Q.length+Math.ceil(W.toString(16).length/2)},write(J,Q,X){if(iO0($,J),J==="")return X;let[W,Y]=fO(J,$[0]);if(!Y)return Q.set(new Uint8Array(W.length).fill(0),X),X+W.length;let G=lO(Y,$),V=[];while(G>0n)V.unshift(Number(G%256n)),G/=256n;let q=[...Array(W.length).fill(0),...V];return Q.set(q,X),X+q.length}})},oO0=($)=>{return fQ({read(J,Q){let X=Q===0?J:J.slice(Q);if(X.length===0)return["",0];let W=X.findIndex((q)=>q!==0);W=W===-1?X.length:W;let Y=$[0].repeat(W);if(W===X.length)return[Y,J.length];let G=X.slice(W).reduce((q,H)=>q*256n+BigInt(H),0n),V=nO0(G,$);return[Y+V,J.length]}})};function fO($,J){let[Q,X]=$.split(new RegExp(`((?!${J}).*)`));return[Q,X]}function lO($,J){let Q=BigInt(J.length),X=0n;for(let W of $)X*=Q,X+=BigInt(J.indexOf(W));return X}function nO0($,J){let Q=BigInt(J.length),X=[];while($>0n)X.unshift(J[Number($%Q)]),$/=Q;return X.join("")}var aO="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",sO0=()=>aO0(aO),rO0=()=>oO0(aO),ID;function tO0(){if(!ID){let $=k8(PG(),{size:zW()});ID=CJ([["lookupTableAddress",S8()],["writableIndexes",$],["readonlyIndexes",$]])}return ID}var kD;function eO0(){if(!kD){let $=pJ(RG(),{size:jW()});kD=V9([["lookupTableAddress",Y9()],["writableIndexes",$],["readonlyIndexes",$]])}return kD}var TD;function AD(){if(!TD)TD=PG();return TD}var ED;function hD(){if(!ED)ED=RG();return ED}function $N0(){return CJ([["numSignerAccounts",AD()],["numReadonlySignerAccounts",AD()],["numReadonlyNonSignerAccounts",AD()]])}function JN0(){return V9([["numSignerAccounts",hD()],["numReadonlySignerAccounts",hD()],["numReadonlyNonSignerAccounts",hD()]])}var xD;function QN0(){if(!xD)xD=BD(CJ([["programAddressIndex",PG()],["accountIndices",k8(PG(),{size:zW()})],["data",hO(c5(),zW())]]),($)=>{if($.accountIndices!==void 0&&$.data!==void 0)return $;return{...$,accountIndices:$.accountIndices??[],data:$.data??new Uint8Array(0)}});return xD}var vD;function XN0(){if(!vD)vD=CD(V9([["programAddressIndex",RG()],["accountIndices",pJ(RG(),{size:jW()})],["data",xO(_X(),jW())]]),($)=>{if($.accountIndices.length&&$.data.byteLength)return $;let{accountIndices:J,data:Q,...X}=$;return{...X,...J.length?{accountIndices:J}:null,...Q.byteLength?{data:Q}:null}});return vD}var oO=0,bD=128;function WN0(){return YQ({getSizeFromValue:($)=>$==="legacy"?0:1,maxSize:1,write:($,J,Q)=>{if($==="legacy")return Q;if($<0||$>127)throw new kJ(RD,{actualVersion:$});if($>oO)throw new kJ(T4,{unsupportedVersion:$});return J.set([$|bD],Q),Q+1}})}function yD(){return fQ({maxSize:1,read:($,J)=>{let Q=$[J];if((Q&bD)===0)return["legacy",J];else{let X=Q^bD;if(X>oO)throw new kJ(T4,{unsupportedVersion:X});return[X,J+1]}}})}function pO(){return CJ(nO())}function dO(){return BD(CJ([...nO(),["addressTableLookups",GN0()]]),($)=>{if($.version==="legacy")return $;return{...$,addressTableLookups:$.addressTableLookups??[]}})}function nO(){let $=GD([R4(new Uint8Array(32)),bO(sO0(),32)],(J)=>J===void 0?0:1);return[["version",WN0()],["header",$N0()],["staticAccounts",k8(S8(),{size:zW()})],["lifetimeToken",$],["instructions",k8(QN0(),{size:zW()})]]}function YN0(){return[["version",yD()],["header",JN0()],["staticAccounts",pJ(Y9(),{size:jW()})],["lifetimeToken",yO(rO0(),32)],["instructions",pJ(XN0(),{size:jW()})],["addressTableLookups",VN0()]]}function GN0(){return k8(tO0(),{size:zW()})}function VN0(){return pJ(eO0(),{size:jW()})}function sO(){return YQ({getSizeFromValue:($)=>{if($.version==="legacy")return pO().getSizeFromValue($);else return dO().getSizeFromValue($)},write:($,J,Q)=>{if($.version==="legacy")return pO().write($,J,Q);else return dO().write($,J,Q)}})}function rO(){return CD(V9(YN0()),({addressTableLookups:$,...J})=>{if(J.version==="legacy"||!$?.length)return J;return{...J,addressTableLookups:$}})}function uO($,J,Q){$[J]=Q($[J]??{role:IJ.READONLY})}var O$=Symbol("AddressMapTypeProperty");function qN0($,J){let Q={[$]:{[O$]:0,role:IJ.WRITABLE_SIGNER}},X=new Set;for(let W of J){uO(Q,W.programAddress,(G)=>{if(X.add(W.programAddress),O$ in G){if(a5(G.role))switch(G[O$]){case 0:throw new kJ(PD,{programAddress:W.programAddress});default:throw new kJ(k4,{programAddress:W.programAddress})}if(G[O$]===2)return G}return{[O$]:2,role:IJ.READONLY}});let Y;if(!W.accounts)continue;for(let G of W.accounts)uO(Q,G.address,(V)=>{let{address:q,...H}=G;if(O$ in V)switch(V[O$]){case 0:return V;case 1:{let Z=wD(V.role,H.role);if("lookupTableAddress"in H){if(V.lookupTableAddress!==H.lookupTableAddress&&(Y||=z4())(H.lookupTableAddress,V.lookupTableAddress)<0)return{[O$]:1,...H,role:Z}}else if(ZW(H.role))return{[O$]:2,role:Z};if(V.role!==Z)return{...V,role:Z};else return V}case 2:{let Z=wD(V.role,H.role);if(X.has(G.address)){if(a5(H.role))throw new kJ(k4,{programAddress:G.address});if(V.role!==Z)return{...V,role:Z};else return V}else if("lookupTableAddress"in H&&!ZW(V.role))return{...H,[O$]:1,role:Z};else if(V.role!==Z)return{...V,role:Z};else return V}}if("lookupTableAddress"in H)return{...H,[O$]:1};else return{...H,[O$]:2}})}return Q}function KN0($){let J;return Object.entries($).sort(([X,W],[Y,G])=>{if(W[O$]!==G[O$]){if(W[O$]===0)return-1;else if(G[O$]===0)return 1;else if(W[O$]===2)return-1;else if(G[O$]===2)return 1}let V=ZW(W.role);if(V!==ZW(G.role))return V?-1:1;let q=a5(W.role);if(q!==a5(G.role))return q?-1:1;if(J||=z4(),W[O$]===1&&G[O$]===1&&W.lookupTableAddress!==G.lookupTableAddress)return J(W.lookupTableAddress,G.lookupTableAddress);else return J(X,Y)}).map(([X,W])=>({address:X,...W}))}function HN0($){let J={};for(let Q of $){if(!("lookupTableAddress"in Q))continue;let X=J[Q.lookupTableAddress]||={readonlyIndexes:[],writableIndexes:[]};if(Q.role===IJ.WRITABLE)X.writableIndexes.push(Q.addressIndex);else X.readonlyIndexes.push(Q.addressIndex)}return Object.keys(J).sort(z4()).map((Q)=>({lookupTableAddress:Q,...J[Q]}))}function DN0($){let J=0,Q=0,X=0;for(let W of $){if("lookupTableAddress"in W)break;let Y=a5(W.role);if(ZW(W.role)){if(X++,!Y)Q++}else if(!Y)J++}return{numReadonlyNonSignerAccounts:J,numReadonlySignerAccounts:Q,numSignerAccounts:X}}function UN0($){let J={};for(let[Q,X]of $.entries())J[X.address]=Q;return J}function ZN0($,J){let Q=UN0(J);return $.map(({accounts:X,data:W,programAddress:Y})=>{return{programAddressIndex:Q[Y],...X?{accountIndices:X.map(({address:G})=>Q[G])}:null,...W?{data:W}:null}})}function zN0($){if("nonce"in $)return $.nonce;return $.blockhash}function jN0($){let J=$.findIndex((X)=>("lookupTableAddress"in X));return(J===-1?$:$.slice(0,J)).map(({address:X})=>X)}function tO($){let J=qN0($.feePayer.address,$.instructions),Q=KN0(J),X=$.lifetimeConstraint;return{...$.version!=="legacy"?{addressTableLookups:HN0(Q)}:null,...X?{lifetimeToken:zN0(X)}:null,header:DN0(Q),instructions:ZN0($.instructions,Q),staticAccounts:jN0(Q),version:$.version}}function eO($){return Object.freeze({instructions:Object.freeze([]),version:$.version})}var MN0="SysvarRecentB1ockHashes11111111111111111111",LN0="11111111111111111111111111111111";function wN0($){return $.programAddress===LN0&&$.data!=null&&PN0($.data)&&$.accounts?.length===3&&$.accounts[0].address!=null&&$.accounts[0].role===IJ.WRITABLE&&$.accounts[1].address===MN0&&$.accounts[1].role===IJ.READONLY&&$.accounts[2].address!=null&&ZW($.accounts[2].role)}function PN0($){return $.byteLength===4&&$[0]===4&&$[1]===0&&$[2]===0&&$[3]===0}function x4($){return"lifetimeConstraint"in $&&typeof $.lifetimeConstraint.nonce==="string"&&$.instructions[0]!=null&&wN0($.instructions[0])}function $N($,J){if("feePayer"in J&&$===J.feePayer?.address&&RN0(J.feePayer))return J;let Q={...J,feePayer:Object.freeze({address:$})};return Object.freeze(Q),Q}function RN0($){return!!$&&"address"in $&&typeof $.address==="string"&&Object.keys($).length===1}function gD($,J){return mD([$],J)}function mD($,J){return Object.freeze({...J,instructions:Object.freeze([...J.instructions,...$])})}function JN($,J){return ON0([$],J)}function ON0($,J){return Object.freeze({...J,instructions:Object.freeze([...$,...J.instructions])})}var NN0=1,_N0=2,FN0=3,SN0=4,BN0=5,CN0=6,IN0=7,kN0=8,TN0=9,AN0=10,EN0=-32700,hN0=-32603,xN0=-32602,vN0=-32601,bN0=-32600,yN0=-32019,gN0=-32018,mN0=-32017,fN0=-32016,lN0=-32015,pN0=-32014,dN0=-32013,uN0=-32012,cN0=-32011,iN0=-32010,aN0=-32009,oN0=-32008,nN0=-32007,sN0=-32006,rN0=-32005,tN0=-32004,eN0=-32003,$_0=-32002,J_0=-32001,Q_0=2800000,X_0=2800001,W_0=2800002,Y_0=2800003,G_0=2800004,V_0=2800005,q_0=2800006,K_0=2800007,H_0=2800008,D_0=2800009,U_0=2800010,Z_0=2800011,z_0=3230000,j_0=32300001,M_0=3230002,L_0=3230003,w_0=3230004,P_0=3610000,R_0=3610001,O_0=3610002,N_0=3610003,__0=3610004,F_0=3610005,S_0=3610006,B_0=3610007,C_0=3611000,I_0=3704000,k_0=3704001,T_0=3704002,A_0=3704003,E_0=3704004,h_0=4128000,x_0=4128001,v_0=4128002,b_0=4615000,y_0=4615001,g_0=4615002,m_0=4615003,f_0=4615004,l_0=4615005,p_0=4615006,d_0=4615007,u_0=4615008,c_0=4615009,i_0=4615010,a_0=4615011,o_0=4615012,n_0=4615013,s_0=4615014,r_0=4615015,t_0=4615016,e_0=4615017,$F0=4615018,JF0=4615019,QF0=4615020,XF0=4615021,WF0=4615022,YF0=4615023,GF0=4615024,VF0=4615025,qF0=4615026,KF0=4615027,HF0=4615028,DF0=4615029,UF0=4615030,ZF0=4615031,zF0=4615032,jF0=4615033,MF0=4615034,LF0=4615035,wF0=4615036,PF0=4615037,RF0=4615038,OF0=4615039,NF0=4615040,_F0=4615041,FF0=4615042,SF0=4615043,BF0=4615044,CF0=4615045,IF0=4615046,kF0=4615047,TF0=4615048,AF0=4615049,EF0=4615050,hF0=4615051,xF0=4615052,vF0=4615053,bF0=4615054,yF0=5508000,gF0=5508001,mF0=5508002,fF0=5508003,lF0=5508004,pF0=5508005,dF0=5508006,uF0=5508007,cF0=5508008,iF0=5508009,aF0=5508010,oF0=5508011,nF0=5607000,sF0=5607001,rF0=5607002,tF0=5607003,eF0=5607004,$S0=5607005,JS0=5607006,QS0=5607007,XS0=5607008,WS0=5607009,YS0=5607010,GS0=5607011,VS0=5607012,qS0=5607013,KS0=5607014,HS0=5607015,DS0=5607016,US0=5607017,ZS0=5663000,zS0=5663001,QN=5663002,XN=5663003,jS0=5663004,MS0=5663005,LS0=5663006,wS0=5663007,PS0=5663008,WN=5663009,RS0=5663010,OS0=5663011,YN=5663012,NS0=5663013,_S0=5663014,fD=5663015,lD=5663016,pD=5663017,FS0=5663018,SS0=5663019,GN=5663020,BS0=5663021,VN=5663022,CS0=7050000,IS0=7050001,kS0=7050002,TS0=7050003,AS0=7050004,ES0=7050005,hS0=7050006,xS0=7050007,vS0=7050008,bS0=7050009,yS0=7050010,gS0=7050011,mS0=7050012,fS0=7050013,lS0=7050014,pS0=7050015,dS0=7050016,uS0=7050017,cS0=7050018,iS0=7050019,aS0=7050020,oS0=7050021,nS0=7050022,sS0=7050023,rS0=7050024,tS0=7050025,eS0=7050026,$B0=7050027,JB0=7050028,QB0=7050029,XB0=7050030,WB0=7050031,YB0=7050032,GB0=7050033,VB0=7050034,qB0=7050035,KB0=7050036,HB0=7618000,DB0=7618001,UB0=7618002,ZB0=7618003,zB0=7618004,jB0=7618005,MB0=7618006,LB0=7618007,wB0=7618008,PB0=7618009,dD=8078000,uD=8078001,qN=8078002,KN=8078003,HN=8078004,DN=8078005,UN=8078006,RB0=8078007,OB0=8078008,NB0=8078009,_B0=8078010,cD=8078011,FB0=8078012,iD=8078013,aD=8078014,SB0=8078015,BB0=8078016,CB0=8078017,IB0=8078018,kB0=8078019,ZN=8078020,zN=8078021,TB0=8078022,jN=8078023,AB0=8100000,EB0=8100001,hB0=8100002,xB0=8100003,vB0=8190000,bB0=8190001,yB0=8190002,gB0=8190003,mB0=8190004,fB0=9900000,lB0=9900001,pB0=9900002,dB0=9900003,uB0=9900004,cB0=9900005,iB0=9900006;var aB0={[z_0]:"Account not found at address: $address",[w_0]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[L_0]:"Expected decoded account at address: $address",[M_0]:"Failed to decode account data at address: $address",[j_0]:"Accounts not found at addresses: $addresses",[D_0]:"Unable to find a viable program address bump seed.",[W_0]:"$putativeAddress is not a base58-encoded address.",[Q_0]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[Y_0]:"The `CryptoKey` must be an `Ed25519` public key.",[Z_0]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[H_0]:"Invalid seeds; point must fall off the Ed25519 curve.",[G_0]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[q_0]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[K_0]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[V_0]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[U_0]:"Program address cannot end with PDA marker.",[X_0]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[SN0]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[NN0]:"The network has progressed past the last block for which this transaction could have been committed.",[dD]:"Codec [$codecDescription] cannot decode empty byte arrays.",[TB0]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[ZN]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[DN]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[UN]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[HN]:"Encoder and decoder must either both be fixed-size or variable-size.",[OB0]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[qN]:"Expected a fixed-size codec, got a variable-size one.",[iD]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[KN]:"Expected a variable-size codec, got a fixed-size one.",[kB0]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[uD]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[IB0]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[NB0]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[_B0]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[SB0]:"Invalid literal union variant. Expected one of [$variants], got $value.",[RB0]:"Expected [$codecDescription] to have $expected items, got $actual.",[FB0]:"Invalid value $value for base $base with alphabet $alphabet.",[BB0]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[cD]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[aD]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[zN]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[CB0]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[jN]:"This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",[C_0]:"No random values implementation could be found.",[c_0]:"instruction requires an uninitialized account",[YF0]:"instruction tries to borrow reference for an account which is already borrowed",[GF0]:"instruction left account with an outstanding borrowed reference",[XF0]:"program other than the account's owner changed the size of the account data",[l_0]:"account data too small for instruction",[WF0]:"instruction expected an executable account",[IF0]:"An account does not have enough lamports to be rent-exempt",[TF0]:"Program arithmetic overflowed",[CF0]:"Failed to serialize or deserialize account data: $encodedData",[bF0]:"Builtin programs must consume compute units",[zF0]:"Cross-program invocation call depth too deep",[RF0]:"Computational budget exceeded",[qF0]:"custom program error: #$code",[e_0]:"instruction contains duplicate accounts",[VF0]:"instruction modifications of multiply-passed account differ",[UF0]:"executable accounts must be rent exempt",[HF0]:"instruction changed executable accounts data",[DF0]:"instruction changed the balance of an executable account",[$F0]:"instruction changed executable bit of an account",[s_0]:"instruction modified data of an account it does not own",[n_0]:"instruction spent from the balance of an account it does not own",[y_0]:"generic instruction error",[EF0]:"Provided owner is not allowed",[SF0]:"Account is immutable",[BF0]:"Incorrect authority provided",[d_0]:"incorrect program id for instruction",[p_0]:"insufficient funds for instruction",[f_0]:"invalid account data for instruction",[kF0]:"Invalid account owner",[g_0]:"invalid program argument",[KF0]:"program returned invalid error code",[m_0]:"invalid instruction data",[PF0]:"Failed to reallocate account data",[wF0]:"Provided seeds do not result in a valid address",[hF0]:"Accounts data allocations exceeded the maximum allowed per transaction",[xF0]:"Max accounts exceeded",[vF0]:"Max instruction trace length exceeded",[LF0]:"Length of the seed is too long for address generation",[jF0]:"An account required by the instruction is missing",[u_0]:"missing required signature for instruction",[o_0]:"instruction illegally modified the program id of an account",[QF0]:"insufficient account keys for instruction",[OF0]:"Cross-program invocation with unauthorized signer or writable account",[NF0]:"Failed to create program execution environment",[FF0]:"Program failed to compile",[_F0]:"Program failed to complete",[t_0]:"instruction modified data of a read-only account",[r_0]:"instruction changed the balance of a read-only account",[MF0]:"Cross-program invocation reentrancy not allowed for this instruction",[JF0]:"instruction modified rent epoch of an account",[a_0]:"sum of account balances before and after instruction do not match",[i_0]:"instruction requires an initialized account",[b_0]:"",[ZF0]:"Unsupported program id",[AF0]:"Unsupported sysvar",[cB0]:"Invalid instruction plan kind: $kind.",[UB0]:"The provided instruction plan is empty.",[jB0]:"No failed transaction plan result was found in the provided transaction plan result.",[zB0]:"This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved \u2014 e.g. by targetting RPCs that support transaction bundles.",[ZB0]:"The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",[HB0]:"The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",[iB0]:"Invalid transaction plan kind: $kind.",[DB0]:"No more instructions to pack; the message packer has completed the instruction plan.",[MB0]:"Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",[LB0]:"Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",[wB0]:"Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",[PB0]:"Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",[h_0]:"The instruction does not have any accounts.",[x_0]:"The instruction does not have any data.",[v_0]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[BN0]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[_N0]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[pB0]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[uB0]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[lB0]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[fB0]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[dB0]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[hN0]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[xN0]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[bN0]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[vN0]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[EN0]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[uN0]:"$__serverMessage",[J_0]:"$__serverMessage",[tN0]:"$__serverMessage",[pN0]:"$__serverMessage",[mN0]:"Epoch rewards period still active at slot $slot",[iN0]:"$__serverMessage",[aN0]:"$__serverMessage",[yN0]:"Failed to query long-term storage; please try again",[fN0]:"Minimum context slot has not been reached",[rN0]:"Node is unhealthy; behind by $numSlotsBehind slots",[oN0]:"No snapshot",[$_0]:"Transaction simulation failed",[gN0]:"Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",[nN0]:"$__serverMessage",[cN0]:"Transaction history is not available from this node",[sN0]:"$__serverMessage",[dN0]:"Transaction signature length mismatch",[eN0]:"Transaction signature verification failure",[lN0]:"$__serverMessage",[I_0]:"Key pair bytes must be of length 64, got $byteLength.",[k_0]:"Expected private key bytes with length 32. Actual length: $actualLength.",[T_0]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[E_0]:"The provided private key does not match the provided public key.",[A_0]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[CN0]:"Lamports value must be in the range [0, 2e64-1]",[IN0]:"`$value` cannot be parsed as a `BigInt`",[AN0]:"$message",[kN0]:"`$value` cannot be parsed as a `Number`",[FN0]:"No nonce account could be found at address `$nonceAccountAddress`",[tF0]:"Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",[qS0]:"Attempted to sign an offchain message with an address that is not a signer for it",[rF0]:"Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",[VS0]:"The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",[nF0]:"The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",[QS0]:"Expected message format $expectedMessageFormat, got $actualMessageFormat",[XS0]:"The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",[WS0]:"Offchain message content must be non-empty",[$S0]:"Offchain message must specify the address of at least one required signer",[YS0]:"Offchain message envelope must reserve space for at least one signature",[eF0]:"The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",[HS0]:"The signatories of this offchain message must be listed in lexicographical order",[DS0]:"An address must be listed no more than once among the signatories of an offchain message",[GS0]:"Offchain message is missing signatures for addresses: $addresses.",[US0]:"Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",[sF0]:"The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",[KS0]:"Expected offchain message version $expectedVersion. Got $actualVersion.",[JS0]:"This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",[vB0]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[yB0]:"WebSocket was closed before payload could be added to the send buffer",[gB0]:"WebSocket connection closed",[mB0]:"WebSocket failed to connect",[bB0]:"Failed to obtain a subscription id from the server",[xB0]:"Could not find an API plan for RPC method: `$method`",[AB0]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[hB0]:"HTTP error ($statusCode): $message",[EB0]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[yF0]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[gF0]:"The provided value does not implement the `KeyPairSigner` interface",[fF0]:"The provided value does not implement the `MessageModifyingSigner` interface",[lF0]:"The provided value does not implement the `MessagePartialSigner` interface",[mF0]:"The provided value does not implement any of the `MessageSigner` interfaces",[dF0]:"The provided value does not implement the `TransactionModifyingSigner` interface",[uF0]:"The provided value does not implement the `TransactionPartialSigner` interface",[cF0]:"The provided value does not implement the `TransactionSendingSigner` interface",[pF0]:"The provided value does not implement any of the `TransactionSigner` interfaces",[iF0]:"More than one `TransactionSendingSigner` was identified.",[aF0]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[oF0]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[B_0]:"Cannot export a non-extractable key.",[R_0]:"No digest implementation could be found.",[P_0]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[O_0]:`This runtime does not support the generation of Ed25519 key pairs.
|
|
62
|
+
|
|
63
|
+
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
64
|
+
|
|
65
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[N_0]:"No signature verification implementation could be found.",[__0]:"No key generation implementation could be found.",[F_0]:"No signing implementation could be found.",[S_0]:"No key export implementation could be found.",[TN0]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[dS0]:"Transaction processing left an account with an outstanding borrowed reference",[IS0]:"Account in use",[kS0]:"Account loaded twice",[TS0]:"Attempt to debit an account but found no record of a prior credit.",[sS0]:"Transaction loads an address table account that doesn't exist",[xS0]:"This transaction has already been processed",[vS0]:"Blockhash not found",[bS0]:"Loader call chain is too deep",[pS0]:"Transactions are currently disabled due to cluster maintenance",[XB0]:"Transaction contains a duplicate instruction ($index) that is not allowed",[ES0]:"Insufficient funds for fee",[WB0]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[hS0]:"This account may not be used to pay transaction fees",[gS0]:"Transaction contains an invalid account reference",[tS0]:"Transaction loads an address table account with invalid data",[eS0]:"Transaction address table lookup uses an invalid index",[rS0]:"Transaction loads an address table account with an invalid owner",[GB0]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[fS0]:"This program may not be used for executing instructions",[$B0]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[iS0]:"Transaction loads a writable account that cannot be written",[YB0]:"Transaction exceeded max loaded accounts data size cap",[yS0]:"Transaction requires a fee but has no signature present",[AS0]:"Attempt to load a program that does not exist",[qB0]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[VB0]:"ResanitizationNeeded",[lS0]:"Transaction failed to sanitize accounts offsets correctly",[mS0]:"Transaction did not pass signature verification",[nS0]:"Transaction locked too many accounts",[KB0]:"Sum of account balances before and after transaction do not match",[CS0]:"The transaction failed with the error `$errorName`",[cS0]:"Transaction version is unsupported",[oS0]:"Transaction would exceed account data limit within the block",[QB0]:"Transaction would exceed total account data limit",[aS0]:"Transaction would exceed max account limit within the block",[uS0]:"Transaction would exceed max Block Cost Limit",[JB0]:"Transaction would exceed max Vote Cost Limit",[fD]:"Attempted to sign a transaction with an address that is not a signer for it",[RS0]:"Transaction is missing an address at index: $index.",[lD]:"Transaction has no expected signers therefore it cannot be encoded",[GN]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[QN]:"Transaction does not have a blockhash lifetime",[XN]:"Transaction is not a durable nonce transaction",[MS0]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[LS0]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[PS0]:"No fee payer set in CompiledTransaction",[wS0]:"Could not find program address at index $index",[FS0]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[SS0]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[OS0]:"Transaction is missing a fee payer.",[YN]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[_S0]:"Transaction first instruction is not advance nonce account instruction.",[NS0]:"Transaction with no instructions cannot be durable nonce transaction.",[ZS0]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[zS0]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[pD]:"The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",[WN]:"Transaction is missing signatures for addresses: $addresses.",[jS0]:"Transaction version must be in the range [0, 127]. `$actualVersion` given",[BS0]:"This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 0.",[VN]:"The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction."},v8="i",lQ="t";function oB0($,J={}){let Q=aB0[$];if(Q.length===0)return"";let X;function W(G){if(X[lQ]===2){let V=Q.slice(X[v8]+1,G);Y.push(V in J?`${J[V]}`:`$${V}`)}else if(X[lQ]===1)Y.push(Q.slice(X[v8],G))}let Y=[];return Q.split("").forEach((G,V)=>{if(V===0){X={[v8]:0,[lQ]:Q[0]==="\\"?0:Q[0]==="$"?2:1};return}let q;switch(X[lQ]){case 0:q={[v8]:V,[lQ]:1};break;case 1:if(G==="\\")q={[v8]:V,[lQ]:0};else if(G==="$")q={[v8]:V,[lQ]:2};break;case 2:if(G==="\\")q={[v8]:V,[lQ]:0};else if(G==="$")q={[v8]:V,[lQ]:2};else if(!G.match(/\w/))q={[v8]:V,[lQ]:1};break}if(q){if(X!==q)W(V);X=q}}),W(),Y.join("")}function nB0($,J={}){return oB0($,J)}var GQ=class extends Error{cause=this.cause;context;constructor(...[$,J]){let Q,X;if(J)Object.entries(Object.getOwnPropertyDescriptors(J)).forEach(([Y,G])=>{if(Y==="cause")X={cause:G.value};else{if(Q===void 0)Q={__code:$};Object.defineProperty(Q,Y,G)}});let W=nB0($,Q);super(W,X);this.context=Object.freeze(Q===void 0?{__code:$}:Q),this.name="SolanaError"}};function sB0($,J){if($.length>=J)return $;let Q=new Uint8Array(J).fill(0);return Q.set($),Q}var rB0=($,J)=>sB0($.length<=J?$:$.slice(0,J),J);function LN($,J){return $.length===J.length&&$.every((Q,X)=>Q===J[X])}function tB0($,J){return"fixedSize"in J?J.fixedSize:J.getSizeFromValue($)}function v4($){return Object.freeze({...$,encode:(J)=>{let Q=new Uint8Array(tB0(J,$));return $.write(J,Q,0),Q}})}function MW($){return Object.freeze({...$,decode:(J,Q=0)=>$.read(J,Q)[0]})}function oD($){return"fixedSize"in $&&typeof $.fixedSize==="number"}function eB0($){return!oD($)}function wN($,J,Q=0){if(J.length-Q<=0)throw new GQ(dD,{codecDescription:$})}function nD($,J,Q,X=0){let W=Q.length-X;if(W<J)throw new GQ(uD,{bytesLength:W,codecDescription:$,expected:J})}function MN($,J,Q){if(J<0||J>Q)throw new GQ(aD,{bytesLength:Q,codecDescription:$,offset:J})}function PN($,J,Q){let X=$.byteOffset+(J??0),W=Q??$.byteLength,Y;if(typeof SharedArrayBuffer>"u")Y=$.buffer;else if($.buffer instanceof SharedArrayBuffer)Y=new ArrayBuffer($.length),new Uint8Array(Y).set(new Uint8Array($));else Y=$.buffer;return(X===0||X===-$.byteLength)&&W===$.byteLength?Y:Y.slice(X,X+W)}function RN($,J){return v4({fixedSize:J,write:(Q,X,W)=>{let Y=$.encode(Q),G=Y.length>J?Y.slice(0,J):Y;return X.set(G,W),W+J}})}function ON($,J){return MW({fixedSize:J,read:(Q,X)=>{if(nD("fixCodecSize",J,Q,X),X>0||Q.length>J)Q=Q.slice(X,X+J);if(oD($))Q=rB0(Q,$.fixedSize);let[W]=$.read(Q,0);return[W,X+J]}})}function $C0($,J){return MW({...$,read:(Q,X)=>{let W=(H)=>JC0(H,Q.length),Y=J.preOffset?J.preOffset({bytes:Q,preOffset:X,wrapBytes:W}):X;MN("offsetDecoder",Y,Q.length);let[G,V]=$.read(Q,Y),q=J.postOffset?J.postOffset({bytes:Q,newPreOffset:Y,postOffset:V,preOffset:X,wrapBytes:W}):V;return MN("offsetDecoder",q,Q.length),[G,q]}})}function JC0($,J){if(J===0)return 0;return($%J+J)%J}function QC0($,J){if(oD($)){let Q=J($.fixedSize);if(Q<0)throw new GQ(iD,{bytesLength:Q,codecDescription:"resizeDecoder"});return MW({...$,fixedSize:Q})}return $}function NN($,J){return $C0(QC0($,(Q)=>Q+J),{postOffset:({postOffset:Q})=>Q+J})}function _N($,J){return v4({...eB0($)?{...$,getSizeFromValue:(Q)=>$.getSizeFromValue(J(Q))}:$,write:(Q,X,W)=>$.write(J(Q),X,W)})}function FN($,J){return MW({...$,read:(Q,X)=>{let[W,Y]=$.read(Q,X);return[J(W,Q,X),Y]}})}function WC0($,J,Q,X){if(X<J||X>Q)throw new GQ(cD,{codecDescription:$,max:Q,min:J,value:X})}function YC0($){return $?.endian===1?!1:!0}function GC0($){return MW({fixedSize:$.size,read(J,Q=0){wN($.name,J,Q),nD($.name,$.size,J,Q);let X=new DataView(PN(J,Q,$.size));return[$.get(X,YC0($.config)),Q+$.size]}})}var SN=()=>v4({getSizeFromValue:($)=>{if($<=127)return 1;if($<=16383)return 2;return 3},maxSize:3,write:($,J,Q)=>{WC0("shortU16",0,65535,$);let X=[0];for(let W=0;;W+=1){let Y=Number($)>>W*7;if(Y===0)break;let G=127&Y;if(X[W]=G,W>0)X[W-1]|=128}return J.set(X,Q),Q+X.length}}),sD=()=>MW({maxSize:3,read:($,J)=>{let Q=0,X=0;while(++X){let W=X-1,Y=$[J+W],G=127&Y;if(Q|=G<<W*7,(Y&128)===0)break}return[Q,J+X]}});var BN=()=>GC0({get:($)=>$.getUint8(0),name:"u8",size:1});var VC0=1,qC0=2,KC0=3,HC0=4,DC0=5,UC0=6,ZC0=7,zC0=8,jC0=9,MC0=10,LC0=-32700,wC0=-32603,PC0=-32602,RC0=-32601,OC0=-32600,NC0=-32019,_C0=-32018,FC0=-32017,SC0=-32016,BC0=-32015,CC0=-32014,IC0=-32013,kC0=-32012,TC0=-32011,AC0=-32010,EC0=-32009,hC0=-32008,xC0=-32007,vC0=-32006,bC0=-32005,yC0=-32004,gC0=-32003,mC0=-32002,fC0=-32001,lC0=2800000,pC0=2800001,dC0=2800002,uC0=2800003,cC0=2800004,iC0=2800005,aC0=2800006,oC0=2800007,nC0=2800008,sC0=2800009,rC0=2800010,tC0=2800011,eC0=3230000,$I0=32300001,JI0=3230002,QI0=3230003,XI0=3230004,WI0=3610000,YI0=3610001,GI0=3610002,VI0=3610003,qI0=3610004,KI0=3610005,HI0=3610006,rD=3610007,DI0=3611000,tD=3704000,eD=3704001,CN=3704002,IN=3704003,$U=3704004,UI0=4128000,ZI0=4128001,zI0=4128002,jI0=4615000,MI0=4615001,LI0=4615002,wI0=4615003,PI0=4615004,RI0=4615005,OI0=4615006,NI0=4615007,_I0=4615008,FI0=4615009,SI0=4615010,BI0=4615011,CI0=4615012,II0=4615013,kI0=4615014,TI0=4615015,AI0=4615016,EI0=4615017,hI0=4615018,xI0=4615019,vI0=4615020,bI0=4615021,yI0=4615022,gI0=4615023,mI0=4615024,fI0=4615025,lI0=4615026,pI0=4615027,dI0=4615028,uI0=4615029,cI0=4615030,iI0=4615031,aI0=4615032,oI0=4615033,nI0=4615034,sI0=4615035,rI0=4615036,tI0=4615037,eI0=4615038,$k0=4615039,Jk0=4615040,Qk0=4615041,Xk0=4615042,Wk0=4615043,Yk0=4615044,Gk0=4615045,Vk0=4615046,qk0=4615047,Kk0=4615048,Hk0=4615049,Dk0=4615050,Uk0=4615051,Zk0=4615052,zk0=4615053,jk0=4615054,Mk0=5508000,Lk0=5508001,wk0=5508002,Pk0=5508003,Rk0=5508004,Ok0=5508005,Nk0=5508006,_k0=5508007,Fk0=5508008,Sk0=5508009,Bk0=5508010,Ck0=5508011,Ik0=5607000,kk0=5607001,Tk0=5607002,Ak0=5607003,Ek0=5607004,hk0=5607005,xk0=5607006,vk0=5607007,bk0=5607008,yk0=5607009,gk0=5607010,mk0=5607011,fk0=5607012,lk0=5607013,pk0=5607014,dk0=5607015,uk0=5607016,ck0=5607017,ik0=5663000,ak0=5663001,ok0=5663002,nk0=5663003,sk0=5663004,rk0=5663005,tk0=5663006,ek0=5663007,$T0=5663008,JT0=5663009,QT0=5663010,XT0=5663011,WT0=5663012,YT0=5663013,GT0=5663014,VT0=5663015,qT0=5663016,KT0=5663017,HT0=5663018,DT0=5663019,UT0=5663020,ZT0=5663021,zT0=5663022,jT0=7050000,MT0=7050001,LT0=7050002,wT0=7050003,PT0=7050004,RT0=7050005,OT0=7050006,NT0=7050007,_T0=7050008,FT0=7050009,ST0=7050010,BT0=7050011,CT0=7050012,IT0=7050013,kT0=7050014,TT0=7050015,AT0=7050016,ET0=7050017,hT0=7050018,xT0=7050019,vT0=7050020,bT0=7050021,yT0=7050022,gT0=7050023,mT0=7050024,fT0=7050025,lT0=7050026,pT0=7050027,dT0=7050028,uT0=7050029,cT0=7050030,iT0=7050031,aT0=7050032,oT0=7050033,nT0=7050034,sT0=7050035,rT0=7050036,tT0=7618000,eT0=7618001,$A0=7618002,JA0=7618003,QA0=7618004,XA0=7618005,WA0=7618006,YA0=7618007,GA0=7618008,VA0=7618009,qA0=8078000,KA0=8078001,HA0=8078002,DA0=8078003,UA0=8078004,ZA0=8078005,zA0=8078006,jA0=8078007,MA0=8078008,LA0=8078009,wA0=8078010,PA0=8078011,RA0=8078012,OA0=8078013,NA0=8078014,_A0=8078015,FA0=8078016,SA0=8078017,BA0=8078018,CA0=8078019,IA0=8078020,kA0=8078021,TA0=8078022,AA0=8078023,EA0=8100000,hA0=8100001,xA0=8100002,vA0=8100003,bA0=8190000,yA0=8190001,gA0=8190002,mA0=8190003,fA0=8190004,lA0=9900000,pA0=9900001,dA0=9900002,uA0=9900003,cA0=9900004,iA0=9900005,aA0=9900006;var oA0={[eC0]:"Account not found at address: $address",[XI0]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[QI0]:"Expected decoded account at address: $address",[JI0]:"Failed to decode account data at address: $address",[$I0]:"Accounts not found at addresses: $addresses",[sC0]:"Unable to find a viable program address bump seed.",[dC0]:"$putativeAddress is not a base58-encoded address.",[lC0]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[uC0]:"The `CryptoKey` must be an `Ed25519` public key.",[tC0]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[nC0]:"Invalid seeds; point must fall off the Ed25519 curve.",[cC0]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[aC0]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[oC0]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[iC0]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[rC0]:"Program address cannot end with PDA marker.",[pC0]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[HC0]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[VC0]:"The network has progressed past the last block for which this transaction could have been committed.",[qA0]:"Codec [$codecDescription] cannot decode empty byte arrays.",[TA0]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[IA0]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[ZA0]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[zA0]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[UA0]:"Encoder and decoder must either both be fixed-size or variable-size.",[MA0]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[HA0]:"Expected a fixed-size codec, got a variable-size one.",[OA0]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[DA0]:"Expected a variable-size codec, got a fixed-size one.",[CA0]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[KA0]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[BA0]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[LA0]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[wA0]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[_A0]:"Invalid literal union variant. Expected one of [$variants], got $value.",[jA0]:"Expected [$codecDescription] to have $expected items, got $actual.",[RA0]:"Invalid value $value for base $base with alphabet $alphabet.",[FA0]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[PA0]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[NA0]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[kA0]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[SA0]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[AA0]:"This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",[DI0]:"No random values implementation could be found.",[FI0]:"instruction requires an uninitialized account",[gI0]:"instruction tries to borrow reference for an account which is already borrowed",[mI0]:"instruction left account with an outstanding borrowed reference",[bI0]:"program other than the account's owner changed the size of the account data",[RI0]:"account data too small for instruction",[yI0]:"instruction expected an executable account",[Vk0]:"An account does not have enough lamports to be rent-exempt",[Kk0]:"Program arithmetic overflowed",[Gk0]:"Failed to serialize or deserialize account data: $encodedData",[jk0]:"Builtin programs must consume compute units",[aI0]:"Cross-program invocation call depth too deep",[eI0]:"Computational budget exceeded",[lI0]:"custom program error: #$code",[EI0]:"instruction contains duplicate accounts",[fI0]:"instruction modifications of multiply-passed account differ",[cI0]:"executable accounts must be rent exempt",[dI0]:"instruction changed executable accounts data",[uI0]:"instruction changed the balance of an executable account",[hI0]:"instruction changed executable bit of an account",[kI0]:"instruction modified data of an account it does not own",[II0]:"instruction spent from the balance of an account it does not own",[MI0]:"generic instruction error",[Dk0]:"Provided owner is not allowed",[Wk0]:"Account is immutable",[Yk0]:"Incorrect authority provided",[NI0]:"incorrect program id for instruction",[OI0]:"insufficient funds for instruction",[PI0]:"invalid account data for instruction",[qk0]:"Invalid account owner",[LI0]:"invalid program argument",[pI0]:"program returned invalid error code",[wI0]:"invalid instruction data",[tI0]:"Failed to reallocate account data",[rI0]:"Provided seeds do not result in a valid address",[Uk0]:"Accounts data allocations exceeded the maximum allowed per transaction",[Zk0]:"Max accounts exceeded",[zk0]:"Max instruction trace length exceeded",[sI0]:"Length of the seed is too long for address generation",[oI0]:"An account required by the instruction is missing",[_I0]:"missing required signature for instruction",[CI0]:"instruction illegally modified the program id of an account",[vI0]:"insufficient account keys for instruction",[$k0]:"Cross-program invocation with unauthorized signer or writable account",[Jk0]:"Failed to create program execution environment",[Xk0]:"Program failed to compile",[Qk0]:"Program failed to complete",[AI0]:"instruction modified data of a read-only account",[TI0]:"instruction changed the balance of a read-only account",[nI0]:"Cross-program invocation reentrancy not allowed for this instruction",[xI0]:"instruction modified rent epoch of an account",[BI0]:"sum of account balances before and after instruction do not match",[SI0]:"instruction requires an initialized account",[jI0]:"",[iI0]:"Unsupported program id",[Hk0]:"Unsupported sysvar",[iA0]:"Invalid instruction plan kind: $kind.",[$A0]:"The provided instruction plan is empty.",[XA0]:"No failed transaction plan result was found in the provided transaction plan result.",[QA0]:"This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved \u2014 e.g. by targetting RPCs that support transaction bundles.",[JA0]:"The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",[tT0]:"The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",[aA0]:"Invalid transaction plan kind: $kind.",[eT0]:"No more instructions to pack; the message packer has completed the instruction plan.",[WA0]:"Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",[YA0]:"Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",[GA0]:"Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",[VA0]:"Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",[UI0]:"The instruction does not have any accounts.",[ZI0]:"The instruction does not have any data.",[zI0]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[DC0]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[qC0]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[dA0]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[cA0]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[pA0]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[lA0]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[uA0]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[wC0]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[PC0]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[OC0]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[RC0]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[LC0]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[kC0]:"$__serverMessage",[fC0]:"$__serverMessage",[yC0]:"$__serverMessage",[CC0]:"$__serverMessage",[FC0]:"Epoch rewards period still active at slot $slot",[AC0]:"$__serverMessage",[EC0]:"$__serverMessage",[NC0]:"Failed to query long-term storage; please try again",[SC0]:"Minimum context slot has not been reached",[bC0]:"Node is unhealthy; behind by $numSlotsBehind slots",[hC0]:"No snapshot",[mC0]:"Transaction simulation failed",[_C0]:"Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",[xC0]:"$__serverMessage",[TC0]:"Transaction history is not available from this node",[vC0]:"$__serverMessage",[IC0]:"Transaction signature length mismatch",[gC0]:"Transaction signature verification failure",[BC0]:"$__serverMessage",[tD]:"Key pair bytes must be of length 64, got $byteLength.",[eD]:"Expected private key bytes with length 32. Actual length: $actualLength.",[CN]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[$U]:"The provided private key does not match the provided public key.",[IN]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[UC0]:"Lamports value must be in the range [0, 2e64-1]",[ZC0]:"`$value` cannot be parsed as a `BigInt`",[MC0]:"$message",[zC0]:"`$value` cannot be parsed as a `Number`",[KC0]:"No nonce account could be found at address `$nonceAccountAddress`",[Ak0]:"Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",[lk0]:"Attempted to sign an offchain message with an address that is not a signer for it",[Tk0]:"Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",[fk0]:"The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",[Ik0]:"The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",[vk0]:"Expected message format $expectedMessageFormat, got $actualMessageFormat",[bk0]:"The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",[yk0]:"Offchain message content must be non-empty",[hk0]:"Offchain message must specify the address of at least one required signer",[gk0]:"Offchain message envelope must reserve space for at least one signature",[Ek0]:"The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",[dk0]:"The signatories of this offchain message must be listed in lexicographical order",[uk0]:"An address must be listed no more than once among the signatories of an offchain message",[mk0]:"Offchain message is missing signatures for addresses: $addresses.",[ck0]:"Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",[kk0]:"The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",[pk0]:"Expected offchain message version $expectedVersion. Got $actualVersion.",[xk0]:"This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",[bA0]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[gA0]:"WebSocket was closed before payload could be added to the send buffer",[mA0]:"WebSocket connection closed",[fA0]:"WebSocket failed to connect",[yA0]:"Failed to obtain a subscription id from the server",[vA0]:"Could not find an API plan for RPC method: `$method`",[EA0]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[xA0]:"HTTP error ($statusCode): $message",[hA0]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[Mk0]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[Lk0]:"The provided value does not implement the `KeyPairSigner` interface",[Pk0]:"The provided value does not implement the `MessageModifyingSigner` interface",[Rk0]:"The provided value does not implement the `MessagePartialSigner` interface",[wk0]:"The provided value does not implement any of the `MessageSigner` interfaces",[Nk0]:"The provided value does not implement the `TransactionModifyingSigner` interface",[_k0]:"The provided value does not implement the `TransactionPartialSigner` interface",[Fk0]:"The provided value does not implement the `TransactionSendingSigner` interface",[Ok0]:"The provided value does not implement any of the `TransactionSigner` interfaces",[Sk0]:"More than one `TransactionSendingSigner` was identified.",[Bk0]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[Ck0]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[rD]:"Cannot export a non-extractable key.",[YI0]:"No digest implementation could be found.",[WI0]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[GI0]:`This runtime does not support the generation of Ed25519 key pairs.
|
|
66
|
+
|
|
67
|
+
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
68
|
+
|
|
69
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[VI0]:"No signature verification implementation could be found.",[qI0]:"No key generation implementation could be found.",[KI0]:"No signing implementation could be found.",[HI0]:"No key export implementation could be found.",[jC0]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[AT0]:"Transaction processing left an account with an outstanding borrowed reference",[MT0]:"Account in use",[LT0]:"Account loaded twice",[wT0]:"Attempt to debit an account but found no record of a prior credit.",[gT0]:"Transaction loads an address table account that doesn't exist",[NT0]:"This transaction has already been processed",[_T0]:"Blockhash not found",[FT0]:"Loader call chain is too deep",[TT0]:"Transactions are currently disabled due to cluster maintenance",[cT0]:"Transaction contains a duplicate instruction ($index) that is not allowed",[RT0]:"Insufficient funds for fee",[iT0]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[OT0]:"This account may not be used to pay transaction fees",[BT0]:"Transaction contains an invalid account reference",[fT0]:"Transaction loads an address table account with invalid data",[lT0]:"Transaction address table lookup uses an invalid index",[mT0]:"Transaction loads an address table account with an invalid owner",[oT0]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[IT0]:"This program may not be used for executing instructions",[pT0]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[xT0]:"Transaction loads a writable account that cannot be written",[aT0]:"Transaction exceeded max loaded accounts data size cap",[ST0]:"Transaction requires a fee but has no signature present",[PT0]:"Attempt to load a program that does not exist",[sT0]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[nT0]:"ResanitizationNeeded",[kT0]:"Transaction failed to sanitize accounts offsets correctly",[CT0]:"Transaction did not pass signature verification",[yT0]:"Transaction locked too many accounts",[rT0]:"Sum of account balances before and after transaction do not match",[jT0]:"The transaction failed with the error `$errorName`",[hT0]:"Transaction version is unsupported",[bT0]:"Transaction would exceed account data limit within the block",[uT0]:"Transaction would exceed total account data limit",[vT0]:"Transaction would exceed max account limit within the block",[ET0]:"Transaction would exceed max Block Cost Limit",[dT0]:"Transaction would exceed max Vote Cost Limit",[VT0]:"Attempted to sign a transaction with an address that is not a signer for it",[QT0]:"Transaction is missing an address at index: $index.",[qT0]:"Transaction has no expected signers therefore it cannot be encoded",[UT0]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[ok0]:"Transaction does not have a blockhash lifetime",[nk0]:"Transaction is not a durable nonce transaction",[rk0]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[tk0]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[$T0]:"No fee payer set in CompiledTransaction",[ek0]:"Could not find program address at index $index",[HT0]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[DT0]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[XT0]:"Transaction is missing a fee payer.",[WT0]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[GT0]:"Transaction first instruction is not advance nonce account instruction.",[YT0]:"Transaction with no instructions cannot be durable nonce transaction.",[ik0]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[ak0]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[KT0]:"The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",[JT0]:"Transaction is missing signatures for addresses: $addresses.",[sk0]:"Transaction version must be in the range [0, 127]. `$actualVersion` given",[ZT0]:"This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 0.",[zT0]:"The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction."},b8="i",pQ="t";function nA0($,J={}){let Q=oA0[$];if(Q.length===0)return"";let X;function W(G){if(X[pQ]===2){let V=Q.slice(X[b8]+1,G);Y.push(V in J?`${J[V]}`:`$${V}`)}else if(X[pQ]===1)Y.push(Q.slice(X[b8],G))}let Y=[];return Q.split("").forEach((G,V)=>{if(V===0){X={[b8]:0,[pQ]:Q[0]==="\\"?0:Q[0]==="$"?2:1};return}let q;switch(X[pQ]){case 0:q={[b8]:V,[pQ]:1};break;case 1:if(G==="\\")q={[b8]:V,[pQ]:0};else if(G==="$")q={[b8]:V,[pQ]:2};break;case 2:if(G==="\\")q={[b8]:V,[pQ]:0};else if(G==="$")q={[b8]:V,[pQ]:2};else if(!G.match(/\w/))q={[b8]:V,[pQ]:1};break}if(q){if(X!==q)W(V);X=q}}),W(),Y.join("")}function sA0($,J={}){return nA0($,J)}var OG=class extends Error{cause=this.cause;context;constructor(...[$,J]){let Q,X;if(J)Object.entries(Object.getOwnPropertyDescriptors(J)).forEach(([Y,G])=>{if(Y==="cause")X={cause:G.value};else{if(Q===void 0)Q={__code:$};Object.defineProperty(Q,Y,G)}});let W=sA0($,Q);super(W,X);this.context=Object.freeze(Q===void 0?{__code:$}:Q),this.name="SolanaError"}};function b4($,J,Q){let X=$.byteOffset+(J??0),W=Q??$.byteLength,Y;if(typeof SharedArrayBuffer>"u")Y=$.buffer;else if($.buffer instanceof SharedArrayBuffer)Y=new ArrayBuffer($.length),new Uint8Array(Y).set(new Uint8Array($));else Y=$.buffer;return(X===0||X===-$.byteLength)&&W===$.byteLength?Y:Y.slice(X,X+W)}var y4=Object.freeze({name:"Ed25519"});function rA0($){return new Uint8Array([48,46,2,1,0,48,5,6,3,43,101,112,4,34,4,32,...$])}async function JU($,J=!1){let Q=$.byteLength;if(Q!==32)throw new OG(eD,{actualLength:Q});let X=rA0($);return await crypto.subtle.importKey("pkcs8",X,y4,J,["sign"])}async function tA0($,J=!1){if(U4(),$.extractable===!1)throw new OG(rD,{key:$});let Q=await crypto.subtle.exportKey("jwk",$);return await crypto.subtle.importKey("jwk",{crv:"Ed25519",ext:J,key_ops:["verify"],kty:"OKP",x:Q.x},"Ed25519",J,["verify"])}async function NG($,J){QR();let Q=await crypto.subtle.sign(y4,$,b4(J));return new Uint8Array(Q)}async function eA0($,J,Q){return XR(),await crypto.subtle.verify(y4,$,b4(J),b4(Q))}async function kN($,J=!1){if($R(),$.byteLength!==64)throw new OG(tD,{byteLength:$.byteLength});let[Q,X]=await Promise.all([crypto.subtle.importKey("raw",$.slice(32),y4,!0,["verify"]),JU($.slice(0,32),J)]),W=new Uint8Array(32);crypto.getRandomValues(W);let Y=await NG(X,W);if(!await eA0(Q,Y,W))throw new OG($U);return{privateKey:X,publicKey:Q}}async function TN($,J=!1){let Q=JU($,J),[X,W]=await Promise.all([(J?Q:JU($,!0)).then(async(Y)=>await tA0(Y,!0)),Q]);return{privateKey:W,publicKey:X}}function $30($){let J=Object.values($);if(J.length===0)throw new GQ(lD);return J.map((Q)=>{if(!Q)return new Uint8Array(64).fill(0);return Q})}function J30(){return _N(k8(RN(c5(),64),{size:SN()}),$30)}function Q30(){return CJ([["signatures",J30()],["messageBytes",c5()]])}function AN(){return FN(V9([["signatures",pJ(ON(_X(),64),{size:sD()})],["messageBytes",_X()]]),X30)}function X30($){let{messageBytes:J,signatures:Q}=$,X=T8([yD(),NN(BN(),2),pJ(Y9(),{size:sD()})]),[W,Y,G]=X.decode(J),V=G.slice(0,Y);if(V.length!==Q.length)throw new GQ(pD,{numRequiredSignatures:Y,signaturesLength:Q.length,signerAddresses:V});let q={};return V.forEach((H,Z)=>{let M=Q[Z];if(M.every((j)=>j===0))q[H]=null;else q[H]=M}),{messageBytes:J,signatures:Object.freeze(q)}}function g4($){let J=tO($),Q=sO().encode(J),X=J.staticAccounts.slice(0,J.header.numSignerAccounts),W={};for(let G of X)W[G]=null;let Y;if(cO($))Y={blockhash:$.lifetimeConstraint.blockhash,lastValidBlockHeight:$.lifetimeConstraint.lastValidBlockHeight};else if(x4($))Y={nonce:$.lifetimeConstraint.nonce,nonceAccountAddress:$.instructions[0].accounts[0].address};return Object.freeze({...Y?{lifetimeConstraint:Y}:void 0,messageBytes:Q,signatures:Object.freeze(W)})}async function EN($,J){let Q,X;if(await Promise.all($.map(async(W)=>{let Y=await j4(W.publicKey),G=J.signatures[Y];if(G===void 0){X||=new Set,X.add(Y);return}if(X)return;let V=await NG(W.privateKey,J.messageBytes);if(G!==null&&LN(V,G))return;Q||={},Q[Y]=V})),X&&X.size>0){let W=Object.keys(J.signatures);throw new GQ(fD,{expectedAddresses:W,unexpectedAddresses:[...X]})}if(!Q)return J;return Object.freeze({...J,signatures:Object.freeze({...J.signatures,...Q})})}function o5($){let J=Q30().encode($);return TP().decode(J)}var W30=1280,Y30=48,Cl9=W30-Y30;function hN($){return $!==null&&(typeof $==="object"||typeof $==="function")}function G30($){let J=new Set,Q={deferreds:J,settled:!1};return Promise.resolve($).then((X)=>{for(let{resolve:W}of J)W(X);J.clear(),Q.settled=!0},(X)=>{for(let{reject:W}of J)W(X);J.clear(),Q.settled=!0}),Q}var QU=new WeakMap;async function xN($){let J;return await new Promise((X,W)=>{J={reject:W,resolve:X};for(let Y of $){if(!hN(Y)){Promise.resolve(Y).then(X,W);continue}let G=QU.get(Y);if(G===void 0)G=G30(Y),G.deferreds.add(J),QU.set(Y,G);else if(G.settled)Promise.resolve(Y).then(X,W);else G.deferreds.add(J)}}).finally(()=>{for(let X of $)if(hN(X))QU.get(X).deferreds.delete(J)})}var V30=1,q30=2,K30=3,H30=4,D30=5,U30=6,Z30=7,z30=8,j30=9,M30=10,L30=-32700,w30=-32603,P30=-32602,R30=-32601,O30=-32600,N30=-32019,_30=-32018,F30=-32017,S30=-32016,B30=-32015,C30=-32014,I30=-32013,k30=-32012,T30=-32011,A30=-32010,E30=-32009,h30=-32008,x30=-32007,v30=-32006,b30=-32005,y30=-32004,g30=-32003,m30=-32002,f30=-32001,l30=2800000,p30=2800001,d30=2800002,u30=2800003,c30=2800004,i30=2800005,a30=2800006,o30=2800007,n30=2800008,s30=2800009,r30=2800010,t30=2800011,e30=3230000,$E0=32300001,JE0=3230002,QE0=3230003,XE0=3230004,WE0=3610000,YE0=3610001,GE0=3610002,VE0=3610003,qE0=3610004,KE0=3610005,HE0=3610006,DE0=3610007,UE0=3611000,ZE0=3704000,zE0=3704001,jE0=3704002,ME0=3704003,LE0=3704004,wE0=4128000,PE0=4128001,RE0=4128002,OE0=4615000,NE0=4615001,_E0=4615002,FE0=4615003,SE0=4615004,BE0=4615005,CE0=4615006,IE0=4615007,kE0=4615008,TE0=4615009,AE0=4615010,EE0=4615011,hE0=4615012,xE0=4615013,vE0=4615014,bE0=4615015,yE0=4615016,gE0=4615017,mE0=4615018,fE0=4615019,lE0=4615020,pE0=4615021,dE0=4615022,uE0=4615023,cE0=4615024,iE0=4615025,aE0=4615026,oE0=4615027,nE0=4615028,sE0=4615029,rE0=4615030,tE0=4615031,eE0=4615032,$h0=4615033,Jh0=4615034,Qh0=4615035,Xh0=4615036,Wh0=4615037,Yh0=4615038,Gh0=4615039,Vh0=4615040,qh0=4615041,Kh0=4615042,Hh0=4615043,Dh0=4615044,Uh0=4615045,Zh0=4615046,zh0=4615047,jh0=4615048,Mh0=4615049,Lh0=4615050,wh0=4615051,Ph0=4615052,Rh0=4615053,Oh0=4615054,Nh0=5508000,_h0=5508001,Fh0=5508002,Sh0=5508003,Bh0=5508004,Ch0=5508005,Ih0=5508006,kh0=5508007,Th0=5508008,Ah0=5508009,Eh0=5508010,hh0=5508011,xh0=5607000,vh0=5607001,bh0=5607002,yh0=5607003,gh0=5607004,mh0=5607005,fh0=5607006,lh0=5607007,ph0=5607008,dh0=5607009,uh0=5607010,ch0=5607011,ih0=5607012,ah0=5607013,oh0=5607014,nh0=5607015,sh0=5607016,rh0=5607017,th0=5663000,eh0=5663001,$x0=5663002,Jx0=5663003,Qx0=5663004,Xx0=5663005,Wx0=5663006,Yx0=5663007,Gx0=5663008,Vx0=5663009,qx0=5663010,Kx0=5663011,Hx0=5663012,Dx0=5663013,Ux0=5663014,Zx0=5663015,zx0=5663016,jx0=5663017,Mx0=5663018,Lx0=5663019,wx0=5663020,Px0=5663021,Rx0=5663022,Ox0=7050000,Nx0=7050001,_x0=7050002,Fx0=7050003,Sx0=7050004,Bx0=7050005,Cx0=7050006,Ix0=7050007,kx0=7050008,Tx0=7050009,Ax0=7050010,Ex0=7050011,hx0=7050012,xx0=7050013,vx0=7050014,bx0=7050015,yx0=7050016,gx0=7050017,mx0=7050018,fx0=7050019,lx0=7050020,px0=7050021,dx0=7050022,ux0=7050023,cx0=7050024,ix0=7050025,ax0=7050026,ox0=7050027,nx0=7050028,sx0=7050029,rx0=7050030,tx0=7050031,ex0=7050032,$v0=7050033,Jv0=7050034,Qv0=7050035,Xv0=7050036,Wv0=7618000,Yv0=7618001,Gv0=7618002,Vv0=7618003,qv0=7618004,Kv0=7618005,Hv0=7618006,Dv0=7618007,Uv0=7618008,Zv0=7618009,zv0=8078000,jv0=8078001,Mv0=8078002,Lv0=8078003,wv0=8078004,Pv0=8078005,Rv0=8078006,Ov0=8078007,Nv0=8078008,_v0=8078009,Fv0=8078010,Sv0=8078011,Bv0=8078012,Cv0=8078013,Iv0=8078014,kv0=8078015,Tv0=8078016,Av0=8078017,Ev0=8078018,hv0=8078019,xv0=8078020,vv0=8078021,bv0=8078022,yv0=8078023,gv0=8100000,mv0=8100001,fv0=8100002,XU=8100003,lv0=8190000,pv0=8190001,dv0=8190002,uv0=8190003,cv0=8190004,iv0=9900000,av0=9900001,ov0=9900002,nv0=9900003,sv0=9900004,rv0=9900005,tv0=9900006;var ev0={[e30]:"Account not found at address: $address",[XE0]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[QE0]:"Expected decoded account at address: $address",[JE0]:"Failed to decode account data at address: $address",[$E0]:"Accounts not found at addresses: $addresses",[s30]:"Unable to find a viable program address bump seed.",[d30]:"$putativeAddress is not a base58-encoded address.",[l30]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[u30]:"The `CryptoKey` must be an `Ed25519` public key.",[t30]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[n30]:"Invalid seeds; point must fall off the Ed25519 curve.",[c30]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[a30]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[o30]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[i30]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[r30]:"Program address cannot end with PDA marker.",[p30]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[H30]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[V30]:"The network has progressed past the last block for which this transaction could have been committed.",[zv0]:"Codec [$codecDescription] cannot decode empty byte arrays.",[bv0]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[xv0]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[Pv0]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[Rv0]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[wv0]:"Encoder and decoder must either both be fixed-size or variable-size.",[Nv0]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[Mv0]:"Expected a fixed-size codec, got a variable-size one.",[Cv0]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[Lv0]:"Expected a variable-size codec, got a fixed-size one.",[hv0]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[jv0]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[Ev0]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[_v0]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[Fv0]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[kv0]:"Invalid literal union variant. Expected one of [$variants], got $value.",[Ov0]:"Expected [$codecDescription] to have $expected items, got $actual.",[Bv0]:"Invalid value $value for base $base with alphabet $alphabet.",[Tv0]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[Sv0]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[Iv0]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[vv0]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[Av0]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[yv0]:"This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",[UE0]:"No random values implementation could be found.",[TE0]:"instruction requires an uninitialized account",[uE0]:"instruction tries to borrow reference for an account which is already borrowed",[cE0]:"instruction left account with an outstanding borrowed reference",[pE0]:"program other than the account's owner changed the size of the account data",[BE0]:"account data too small for instruction",[dE0]:"instruction expected an executable account",[Zh0]:"An account does not have enough lamports to be rent-exempt",[jh0]:"Program arithmetic overflowed",[Uh0]:"Failed to serialize or deserialize account data: $encodedData",[Oh0]:"Builtin programs must consume compute units",[eE0]:"Cross-program invocation call depth too deep",[Yh0]:"Computational budget exceeded",[aE0]:"custom program error: #$code",[gE0]:"instruction contains duplicate accounts",[iE0]:"instruction modifications of multiply-passed account differ",[rE0]:"executable accounts must be rent exempt",[nE0]:"instruction changed executable accounts data",[sE0]:"instruction changed the balance of an executable account",[mE0]:"instruction changed executable bit of an account",[vE0]:"instruction modified data of an account it does not own",[xE0]:"instruction spent from the balance of an account it does not own",[NE0]:"generic instruction error",[Lh0]:"Provided owner is not allowed",[Hh0]:"Account is immutable",[Dh0]:"Incorrect authority provided",[IE0]:"incorrect program id for instruction",[CE0]:"insufficient funds for instruction",[SE0]:"invalid account data for instruction",[zh0]:"Invalid account owner",[_E0]:"invalid program argument",[oE0]:"program returned invalid error code",[FE0]:"invalid instruction data",[Wh0]:"Failed to reallocate account data",[Xh0]:"Provided seeds do not result in a valid address",[wh0]:"Accounts data allocations exceeded the maximum allowed per transaction",[Ph0]:"Max accounts exceeded",[Rh0]:"Max instruction trace length exceeded",[Qh0]:"Length of the seed is too long for address generation",[$h0]:"An account required by the instruction is missing",[kE0]:"missing required signature for instruction",[hE0]:"instruction illegally modified the program id of an account",[lE0]:"insufficient account keys for instruction",[Gh0]:"Cross-program invocation with unauthorized signer or writable account",[Vh0]:"Failed to create program execution environment",[Kh0]:"Program failed to compile",[qh0]:"Program failed to complete",[yE0]:"instruction modified data of a read-only account",[bE0]:"instruction changed the balance of a read-only account",[Jh0]:"Cross-program invocation reentrancy not allowed for this instruction",[fE0]:"instruction modified rent epoch of an account",[EE0]:"sum of account balances before and after instruction do not match",[AE0]:"instruction requires an initialized account",[OE0]:"",[tE0]:"Unsupported program id",[Mh0]:"Unsupported sysvar",[rv0]:"Invalid instruction plan kind: $kind.",[Gv0]:"The provided instruction plan is empty.",[Kv0]:"No failed transaction plan result was found in the provided transaction plan result.",[qv0]:"This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved \u2014 e.g. by targetting RPCs that support transaction bundles.",[Vv0]:"The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",[Wv0]:"The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",[tv0]:"Invalid transaction plan kind: $kind.",[Yv0]:"No more instructions to pack; the message packer has completed the instruction plan.",[Hv0]:"Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",[Dv0]:"Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",[Uv0]:"Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",[Zv0]:"Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",[wE0]:"The instruction does not have any accounts.",[PE0]:"The instruction does not have any data.",[RE0]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[D30]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[q30]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[ov0]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[sv0]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[av0]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[iv0]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[nv0]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[w30]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[P30]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[O30]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[R30]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[L30]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[k30]:"$__serverMessage",[f30]:"$__serverMessage",[y30]:"$__serverMessage",[C30]:"$__serverMessage",[F30]:"Epoch rewards period still active at slot $slot",[A30]:"$__serverMessage",[E30]:"$__serverMessage",[N30]:"Failed to query long-term storage; please try again",[S30]:"Minimum context slot has not been reached",[b30]:"Node is unhealthy; behind by $numSlotsBehind slots",[h30]:"No snapshot",[m30]:"Transaction simulation failed",[_30]:"Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",[x30]:"$__serverMessage",[T30]:"Transaction history is not available from this node",[v30]:"$__serverMessage",[I30]:"Transaction signature length mismatch",[g30]:"Transaction signature verification failure",[B30]:"$__serverMessage",[ZE0]:"Key pair bytes must be of length 64, got $byteLength.",[zE0]:"Expected private key bytes with length 32. Actual length: $actualLength.",[jE0]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[LE0]:"The provided private key does not match the provided public key.",[ME0]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[U30]:"Lamports value must be in the range [0, 2e64-1]",[Z30]:"`$value` cannot be parsed as a `BigInt`",[M30]:"$message",[z30]:"`$value` cannot be parsed as a `Number`",[K30]:"No nonce account could be found at address `$nonceAccountAddress`",[yh0]:"Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",[ah0]:"Attempted to sign an offchain message with an address that is not a signer for it",[bh0]:"Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",[ih0]:"The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",[xh0]:"The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",[lh0]:"Expected message format $expectedMessageFormat, got $actualMessageFormat",[ph0]:"The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",[dh0]:"Offchain message content must be non-empty",[mh0]:"Offchain message must specify the address of at least one required signer",[uh0]:"Offchain message envelope must reserve space for at least one signature",[gh0]:"The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",[nh0]:"The signatories of this offchain message must be listed in lexicographical order",[sh0]:"An address must be listed no more than once among the signatories of an offchain message",[ch0]:"Offchain message is missing signatures for addresses: $addresses.",[rh0]:"Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",[vh0]:"The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",[oh0]:"Expected offchain message version $expectedVersion. Got $actualVersion.",[fh0]:"This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",[lv0]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[dv0]:"WebSocket was closed before payload could be added to the send buffer",[uv0]:"WebSocket connection closed",[cv0]:"WebSocket failed to connect",[pv0]:"Failed to obtain a subscription id from the server",[XU]:"Could not find an API plan for RPC method: `$method`",[gv0]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[fv0]:"HTTP error ($statusCode): $message",[mv0]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[Nh0]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[_h0]:"The provided value does not implement the `KeyPairSigner` interface",[Sh0]:"The provided value does not implement the `MessageModifyingSigner` interface",[Bh0]:"The provided value does not implement the `MessagePartialSigner` interface",[Fh0]:"The provided value does not implement any of the `MessageSigner` interfaces",[Ih0]:"The provided value does not implement the `TransactionModifyingSigner` interface",[kh0]:"The provided value does not implement the `TransactionPartialSigner` interface",[Th0]:"The provided value does not implement the `TransactionSendingSigner` interface",[Ch0]:"The provided value does not implement any of the `TransactionSigner` interfaces",[Ah0]:"More than one `TransactionSendingSigner` was identified.",[Eh0]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[hh0]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[DE0]:"Cannot export a non-extractable key.",[YE0]:"No digest implementation could be found.",[WE0]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[GE0]:`This runtime does not support the generation of Ed25519 key pairs.
|
|
70
|
+
|
|
71
|
+
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
72
|
+
|
|
73
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[VE0]:"No signature verification implementation could be found.",[qE0]:"No key generation implementation could be found.",[KE0]:"No signing implementation could be found.",[HE0]:"No key export implementation could be found.",[j30]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[yx0]:"Transaction processing left an account with an outstanding borrowed reference",[Nx0]:"Account in use",[_x0]:"Account loaded twice",[Fx0]:"Attempt to debit an account but found no record of a prior credit.",[ux0]:"Transaction loads an address table account that doesn't exist",[Ix0]:"This transaction has already been processed",[kx0]:"Blockhash not found",[Tx0]:"Loader call chain is too deep",[bx0]:"Transactions are currently disabled due to cluster maintenance",[rx0]:"Transaction contains a duplicate instruction ($index) that is not allowed",[Bx0]:"Insufficient funds for fee",[tx0]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[Cx0]:"This account may not be used to pay transaction fees",[Ex0]:"Transaction contains an invalid account reference",[ix0]:"Transaction loads an address table account with invalid data",[ax0]:"Transaction address table lookup uses an invalid index",[cx0]:"Transaction loads an address table account with an invalid owner",[$v0]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[xx0]:"This program may not be used for executing instructions",[ox0]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[fx0]:"Transaction loads a writable account that cannot be written",[ex0]:"Transaction exceeded max loaded accounts data size cap",[Ax0]:"Transaction requires a fee but has no signature present",[Sx0]:"Attempt to load a program that does not exist",[Qv0]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[Jv0]:"ResanitizationNeeded",[vx0]:"Transaction failed to sanitize accounts offsets correctly",[hx0]:"Transaction did not pass signature verification",[dx0]:"Transaction locked too many accounts",[Xv0]:"Sum of account balances before and after transaction do not match",[Ox0]:"The transaction failed with the error `$errorName`",[mx0]:"Transaction version is unsupported",[px0]:"Transaction would exceed account data limit within the block",[sx0]:"Transaction would exceed total account data limit",[lx0]:"Transaction would exceed max account limit within the block",[gx0]:"Transaction would exceed max Block Cost Limit",[nx0]:"Transaction would exceed max Vote Cost Limit",[Zx0]:"Attempted to sign a transaction with an address that is not a signer for it",[qx0]:"Transaction is missing an address at index: $index.",[zx0]:"Transaction has no expected signers therefore it cannot be encoded",[wx0]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[$x0]:"Transaction does not have a blockhash lifetime",[Jx0]:"Transaction is not a durable nonce transaction",[Xx0]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[Wx0]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[Gx0]:"No fee payer set in CompiledTransaction",[Yx0]:"Could not find program address at index $index",[Mx0]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[Lx0]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[Kx0]:"Transaction is missing a fee payer.",[Hx0]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[Ux0]:"Transaction first instruction is not advance nonce account instruction.",[Dx0]:"Transaction with no instructions cannot be durable nonce transaction.",[th0]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[eh0]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[jx0]:"The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",[Vx0]:"Transaction is missing signatures for addresses: $addresses.",[Qx0]:"Transaction version must be in the range [0, 127]. `$actualVersion` given",[Px0]:"This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 0.",[Rx0]:"The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction."},y8="i",dQ="t";function $b0($,J={}){let Q=ev0[$];if(Q.length===0)return"";let X;function W(G){if(X[dQ]===2){let V=Q.slice(X[y8]+1,G);Y.push(V in J?`${J[V]}`:`$${V}`)}else if(X[dQ]===1)Y.push(Q.slice(X[y8],G))}let Y=[];return Q.split("").forEach((G,V)=>{if(V===0){X={[y8]:0,[dQ]:Q[0]==="\\"?0:Q[0]==="$"?2:1};return}let q;switch(X[dQ]){case 0:q={[y8]:V,[dQ]:1};break;case 1:if(G==="\\")q={[y8]:V,[dQ]:0};else if(G==="$")q={[y8]:V,[dQ]:2};break;case 2:if(G==="\\")q={[y8]:V,[dQ]:0};else if(G==="$")q={[y8]:V,[dQ]:2};else if(!G.match(/\w/))q={[y8]:V,[dQ]:1};break}if(q){if(X!==q)W(V);X=q}}),W(),Y.join("")}function Jb0($,J={}){return $b0($,J)}var vN=class extends Error{cause=this.cause;context;constructor(...[$,J]){let Q,X;if(J)Object.entries(Object.getOwnPropertyDescriptors(J)).forEach(([Y,G])=>{if(Y==="cause")X={cause:G.value};else{if(Q===void 0)Q={__code:$};Object.defineProperty(Q,Y,G)}});let W=Jb0($,Q);super(W,X);this.context=Object.freeze(Q===void 0?{__code:$}:Q),this.name="SolanaError"}};function m4($){return JSON.parse(Qb0($),(J,Q)=>{return Gb0(Q)?Yb0(Q):Q})}function Qb0($){let J=[],Q=!1;for(let X=0;X<$.length;X++){let W=!1;if($[X]==="\\")J.push($[X++]),W=!W;if($[X]==='"'){if(J.push($[X]),!W)Q=!Q;continue}if(!Q){let Y=Xb0($,X);if(Y?.length){if(X+=Y.length-1,Y.match(/\.|[eE]-/))J.push(Y);else J.push(Wb0(Y));continue}}J.push($[X])}return J.join("")}function Xb0($,J){let Q=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/;if(!$[J]?.match(/[-\d]/))return null;let X=$.slice(J).match(Q);return X?X[0]:null}function Wb0($){return`{"$n":"${$}"}`}function Yb0({$n:$}){if($.match(/[eE]/)){let[J,Q]=$.split(/[eE]/);return BigInt(J)*BigInt(10)**BigInt(Q)}return BigInt($)}function Gb0($){return!!$&&typeof $==="object"&&"$n"in $&&typeof $.$n==="string"}var bN=0n;function Vb0(){let $=bN;return bN++,$.toString()}function _G($){return{id:Vb0(),jsonrpc:"2.0",method:$.methodName,params:$.params}}function f4($,J){return Kb0(JSON.stringify($,(Q,X)=>typeof X==="bigint"?qb0(X):X,J))}function qb0($){return{$n:`${$}`}}function Kb0($){return $.replace(/\{\s*"\$n"\s*:\s*"(-?\d+)"\s*\}/g,"$1")}function yN($){return Hb0($)}function Hb0($){return new Proxy($.api,{defineProperty(){return!1},deleteProperty(){return!1},get(J,Q,X){if(Q==="then")return;return function(...W){let Y=Q.toString(),G=Reflect.get(J,Y,X);if(!G)throw new vN(XU,{method:Y,params:W});let V=G(...W);return Db0($,V)}}})}function Db0({transport:$},J){return{async send(Q){return await J.execute({signal:Q?.abortSignal,transport:$})}}}function gN($){return new Proxy({},{defineProperty(){return!1},deleteProperty(){return!1},get(...J){let[Q,X]=J,W=X.toString();return function(...Y){let G=Object.freeze({methodName:W,params:Y}),V=$?.requestTransformer?$?.requestTransformer(G):G;return Object.freeze({execute:async({signal:q,transport:H})=>{let Z=_G(V),M=await H({payload:Z,signal:q});if(!$?.responseTransformer)return M;return $.responseTransformer(M,V)}})}}})}function l4($){if($==null||typeof $!=="object"||Array.isArray($))return!1;return"jsonrpc"in $&&$.jsonrpc==="2.0"&&"method"in $&&typeof $.method==="string"&&"params"in $}var Ub0=1,Zb0=2,zb0=3,jb0=4,Mb0=5,Lb0=6,wb0=7,Pb0=8,Rb0=9,mN=10,fN=-32700,lN=-32603,pN=-32602,dN=-32601,uN=-32600,Ob0=-32019,Nb0=-32018,_b0=-32017,Fb0=-32016,cN=-32015,iN=-32014,Sb0=-32013,aN=-32012,Bb0=-32011,oN=-32010,nN=-32009,Cb0=-32008,sN=-32007,rN=-32006,Ib0=-32005,tN=-32004,kb0=-32003,WU=-32002,eN=-32001,Tb0=2800000,Ab0=2800001,Eb0=2800002,hb0=2800003,xb0=2800004,vb0=2800005,bb0=2800006,yb0=2800007,gb0=2800008,mb0=2800009,fb0=2800010,lb0=2800011,pb0=3230000,db0=32300001,ub0=3230002,cb0=3230003,ib0=3230004,ab0=3610000,ob0=3610001,nb0=3610002,sb0=3610003,rb0=3610004,tb0=3610005,eb0=3610006,$y0=3610007,Jy0=3611000,Qy0=3704000,Xy0=3704001,Wy0=3704002,Yy0=3704003,Gy0=3704004,Vy0=4128000,qy0=4128001,Ky0=4128002,$_=4615000,Hy0=4615001,Dy0=4615002,Uy0=4615003,Zy0=4615004,zy0=4615005,jy0=4615006,My0=4615007,Ly0=4615008,wy0=4615009,Py0=4615010,Ry0=4615011,Oy0=4615012,Ny0=4615013,_y0=4615014,Fy0=4615015,Sy0=4615016,By0=4615017,Cy0=4615018,Iy0=4615019,ky0=4615020,Ty0=4615021,Ay0=4615022,Ey0=4615023,hy0=4615024,xy0=4615025,J_=4615026,vy0=4615027,by0=4615028,yy0=4615029,gy0=4615030,my0=4615031,fy0=4615032,ly0=4615033,py0=4615034,dy0=4615035,uy0=4615036,cy0=4615037,iy0=4615038,ay0=4615039,oy0=4615040,ny0=4615041,sy0=4615042,ry0=4615043,ty0=4615044,ey0=4615045,$g0=4615046,Jg0=4615047,Qg0=4615048,Xg0=4615049,Wg0=4615050,Yg0=4615051,Gg0=4615052,Vg0=4615053,qg0=4615054,Kg0=5508000,Hg0=5508001,Dg0=5508002,Ug0=5508003,Zg0=5508004,zg0=5508005,jg0=5508006,Mg0=5508007,Lg0=5508008,wg0=5508009,Pg0=5508010,Rg0=5508011,Og0=5607000,Ng0=5607001,_g0=5607002,Fg0=5607003,Sg0=5607004,Bg0=5607005,Cg0=5607006,Ig0=5607007,kg0=5607008,Tg0=5607009,Ag0=5607010,Eg0=5607011,hg0=5607012,xg0=5607013,vg0=5607014,bg0=5607015,yg0=5607016,gg0=5607017,mg0=5663000,fg0=5663001,lg0=5663002,pg0=5663003,dg0=5663004,ug0=5663005,cg0=5663006,ig0=5663007,ag0=5663008,og0=5663009,ng0=5663010,sg0=5663011,rg0=5663012,tg0=5663013,eg0=5663014,$m0=5663015,Jm0=5663016,Qm0=5663017,Xm0=5663018,Wm0=5663019,Ym0=5663020,Gm0=5663021,Vm0=5663022,Q_=7050000,qm0=7050001,Km0=7050002,Hm0=7050003,Dm0=7050004,Um0=7050005,Zm0=7050006,zm0=7050007,jm0=7050008,Mm0=7050009,Lm0=7050010,wm0=7050011,Pm0=7050012,Rm0=7050013,Om0=7050014,Nm0=7050015,_m0=7050016,Fm0=7050017,Sm0=7050018,Bm0=7050019,Cm0=7050020,Im0=7050021,km0=7050022,Tm0=7050023,Am0=7050024,Em0=7050025,hm0=7050026,xm0=7050027,vm0=7050028,bm0=7050029,X_=7050030,W_=7050031,ym0=7050032,gm0=7050033,mm0=7050034,Y_=7050035,fm0=7050036,lm0=7618000,pm0=7618001,dm0=7618002,um0=7618003,cm0=7618004,im0=7618005,am0=7618006,om0=7618007,nm0=7618008,sm0=7618009,rm0=8078000,tm0=8078001,em0=8078002,$f0=8078003,Jf0=8078004,Qf0=8078005,Xf0=8078006,Wf0=8078007,Yf0=8078008,Gf0=8078009,Vf0=8078010,qf0=8078011,Kf0=8078012,Hf0=8078013,Df0=8078014,Uf0=8078015,Zf0=8078016,zf0=8078017,jf0=8078018,Mf0=8078019,Lf0=8078020,wf0=8078021,Pf0=8078022,Rf0=8078023,Of0=8100000,Nf0=8100001,_f0=8100002,Ff0=8100003,Sf0=8190000,Bf0=8190001,Cf0=8190002,If0=8190003,kf0=8190004,Tf0=9900000,Af0=9900001,Ef0=9900002,hf0=9900003,xf0=9900004,vf0=9900005,bf0=9900006;var yf0={[pb0]:"Account not found at address: $address",[ib0]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[cb0]:"Expected decoded account at address: $address",[ub0]:"Failed to decode account data at address: $address",[db0]:"Accounts not found at addresses: $addresses",[mb0]:"Unable to find a viable program address bump seed.",[Eb0]:"$putativeAddress is not a base58-encoded address.",[Tb0]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[hb0]:"The `CryptoKey` must be an `Ed25519` public key.",[lb0]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[gb0]:"Invalid seeds; point must fall off the Ed25519 curve.",[xb0]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[bb0]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[yb0]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[vb0]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[fb0]:"Program address cannot end with PDA marker.",[Ab0]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[jb0]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[Ub0]:"The network has progressed past the last block for which this transaction could have been committed.",[rm0]:"Codec [$codecDescription] cannot decode empty byte arrays.",[Pf0]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[Lf0]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[Qf0]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[Xf0]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[Jf0]:"Encoder and decoder must either both be fixed-size or variable-size.",[Yf0]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[em0]:"Expected a fixed-size codec, got a variable-size one.",[Hf0]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[$f0]:"Expected a variable-size codec, got a fixed-size one.",[Mf0]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[tm0]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[jf0]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[Gf0]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[Vf0]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[Uf0]:"Invalid literal union variant. Expected one of [$variants], got $value.",[Wf0]:"Expected [$codecDescription] to have $expected items, got $actual.",[Kf0]:"Invalid value $value for base $base with alphabet $alphabet.",[Zf0]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[qf0]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[Df0]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[wf0]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[zf0]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[Rf0]:"This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",[Jy0]:"No random values implementation could be found.",[wy0]:"instruction requires an uninitialized account",[Ey0]:"instruction tries to borrow reference for an account which is already borrowed",[hy0]:"instruction left account with an outstanding borrowed reference",[Ty0]:"program other than the account's owner changed the size of the account data",[zy0]:"account data too small for instruction",[Ay0]:"instruction expected an executable account",[$g0]:"An account does not have enough lamports to be rent-exempt",[Qg0]:"Program arithmetic overflowed",[ey0]:"Failed to serialize or deserialize account data: $encodedData",[qg0]:"Builtin programs must consume compute units",[fy0]:"Cross-program invocation call depth too deep",[iy0]:"Computational budget exceeded",[J_]:"custom program error: #$code",[By0]:"instruction contains duplicate accounts",[xy0]:"instruction modifications of multiply-passed account differ",[gy0]:"executable accounts must be rent exempt",[by0]:"instruction changed executable accounts data",[yy0]:"instruction changed the balance of an executable account",[Cy0]:"instruction changed executable bit of an account",[_y0]:"instruction modified data of an account it does not own",[Ny0]:"instruction spent from the balance of an account it does not own",[Hy0]:"generic instruction error",[Wg0]:"Provided owner is not allowed",[ry0]:"Account is immutable",[ty0]:"Incorrect authority provided",[My0]:"incorrect program id for instruction",[jy0]:"insufficient funds for instruction",[Zy0]:"invalid account data for instruction",[Jg0]:"Invalid account owner",[Dy0]:"invalid program argument",[vy0]:"program returned invalid error code",[Uy0]:"invalid instruction data",[cy0]:"Failed to reallocate account data",[uy0]:"Provided seeds do not result in a valid address",[Yg0]:"Accounts data allocations exceeded the maximum allowed per transaction",[Gg0]:"Max accounts exceeded",[Vg0]:"Max instruction trace length exceeded",[dy0]:"Length of the seed is too long for address generation",[ly0]:"An account required by the instruction is missing",[Ly0]:"missing required signature for instruction",[Oy0]:"instruction illegally modified the program id of an account",[ky0]:"insufficient account keys for instruction",[ay0]:"Cross-program invocation with unauthorized signer or writable account",[oy0]:"Failed to create program execution environment",[sy0]:"Program failed to compile",[ny0]:"Program failed to complete",[Sy0]:"instruction modified data of a read-only account",[Fy0]:"instruction changed the balance of a read-only account",[py0]:"Cross-program invocation reentrancy not allowed for this instruction",[Iy0]:"instruction modified rent epoch of an account",[Ry0]:"sum of account balances before and after instruction do not match",[Py0]:"instruction requires an initialized account",[$_]:"",[my0]:"Unsupported program id",[Xg0]:"Unsupported sysvar",[vf0]:"Invalid instruction plan kind: $kind.",[dm0]:"The provided instruction plan is empty.",[im0]:"No failed transaction plan result was found in the provided transaction plan result.",[cm0]:"This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved \u2014 e.g. by targetting RPCs that support transaction bundles.",[um0]:"The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",[lm0]:"The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",[bf0]:"Invalid transaction plan kind: $kind.",[pm0]:"No more instructions to pack; the message packer has completed the instruction plan.",[am0]:"Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",[om0]:"Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",[nm0]:"Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",[sm0]:"Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",[Vy0]:"The instruction does not have any accounts.",[qy0]:"The instruction does not have any data.",[Ky0]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[Mb0]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[Zb0]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[Ef0]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[xf0]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[Af0]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Tf0]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[hf0]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[lN]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[pN]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[uN]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[dN]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[fN]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[aN]:"$__serverMessage",[eN]:"$__serverMessage",[tN]:"$__serverMessage",[iN]:"$__serverMessage",[_b0]:"Epoch rewards period still active at slot $slot",[oN]:"$__serverMessage",[nN]:"$__serverMessage",[Ob0]:"Failed to query long-term storage; please try again",[Fb0]:"Minimum context slot has not been reached",[Ib0]:"Node is unhealthy; behind by $numSlotsBehind slots",[Cb0]:"No snapshot",[WU]:"Transaction simulation failed",[Nb0]:"Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",[sN]:"$__serverMessage",[Bb0]:"Transaction history is not available from this node",[rN]:"$__serverMessage",[Sb0]:"Transaction signature length mismatch",[kb0]:"Transaction signature verification failure",[cN]:"$__serverMessage",[Qy0]:"Key pair bytes must be of length 64, got $byteLength.",[Xy0]:"Expected private key bytes with length 32. Actual length: $actualLength.",[Wy0]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[Gy0]:"The provided private key does not match the provided public key.",[Yy0]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[Lb0]:"Lamports value must be in the range [0, 2e64-1]",[wb0]:"`$value` cannot be parsed as a `BigInt`",[mN]:"$message",[Pb0]:"`$value` cannot be parsed as a `Number`",[zb0]:"No nonce account could be found at address `$nonceAccountAddress`",[Fg0]:"Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",[xg0]:"Attempted to sign an offchain message with an address that is not a signer for it",[_g0]:"Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",[hg0]:"The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",[Og0]:"The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",[Ig0]:"Expected message format $expectedMessageFormat, got $actualMessageFormat",[kg0]:"The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",[Tg0]:"Offchain message content must be non-empty",[Bg0]:"Offchain message must specify the address of at least one required signer",[Ag0]:"Offchain message envelope must reserve space for at least one signature",[Sg0]:"The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",[bg0]:"The signatories of this offchain message must be listed in lexicographical order",[yg0]:"An address must be listed no more than once among the signatories of an offchain message",[Eg0]:"Offchain message is missing signatures for addresses: $addresses.",[gg0]:"Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",[Ng0]:"The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",[vg0]:"Expected offchain message version $expectedVersion. Got $actualVersion.",[Cg0]:"This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",[Sf0]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[Cf0]:"WebSocket was closed before payload could be added to the send buffer",[If0]:"WebSocket connection closed",[kf0]:"WebSocket failed to connect",[Bf0]:"Failed to obtain a subscription id from the server",[Ff0]:"Could not find an API plan for RPC method: `$method`",[Of0]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[_f0]:"HTTP error ($statusCode): $message",[Nf0]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[Kg0]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[Hg0]:"The provided value does not implement the `KeyPairSigner` interface",[Ug0]:"The provided value does not implement the `MessageModifyingSigner` interface",[Zg0]:"The provided value does not implement the `MessagePartialSigner` interface",[Dg0]:"The provided value does not implement any of the `MessageSigner` interfaces",[jg0]:"The provided value does not implement the `TransactionModifyingSigner` interface",[Mg0]:"The provided value does not implement the `TransactionPartialSigner` interface",[Lg0]:"The provided value does not implement the `TransactionSendingSigner` interface",[zg0]:"The provided value does not implement any of the `TransactionSigner` interfaces",[wg0]:"More than one `TransactionSendingSigner` was identified.",[Pg0]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[Rg0]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[$y0]:"Cannot export a non-extractable key.",[ob0]:"No digest implementation could be found.",[ab0]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[nb0]:`This runtime does not support the generation of Ed25519 key pairs.
|
|
74
|
+
|
|
75
|
+
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
76
|
+
|
|
77
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[sb0]:"No signature verification implementation could be found.",[rb0]:"No key generation implementation could be found.",[tb0]:"No signing implementation could be found.",[eb0]:"No key export implementation could be found.",[Rb0]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[_m0]:"Transaction processing left an account with an outstanding borrowed reference",[qm0]:"Account in use",[Km0]:"Account loaded twice",[Hm0]:"Attempt to debit an account but found no record of a prior credit.",[Tm0]:"Transaction loads an address table account that doesn't exist",[zm0]:"This transaction has already been processed",[jm0]:"Blockhash not found",[Mm0]:"Loader call chain is too deep",[Nm0]:"Transactions are currently disabled due to cluster maintenance",[X_]:"Transaction contains a duplicate instruction ($index) that is not allowed",[Um0]:"Insufficient funds for fee",[W_]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[Zm0]:"This account may not be used to pay transaction fees",[wm0]:"Transaction contains an invalid account reference",[Em0]:"Transaction loads an address table account with invalid data",[hm0]:"Transaction address table lookup uses an invalid index",[Am0]:"Transaction loads an address table account with an invalid owner",[gm0]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[Rm0]:"This program may not be used for executing instructions",[xm0]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[Bm0]:"Transaction loads a writable account that cannot be written",[ym0]:"Transaction exceeded max loaded accounts data size cap",[Lm0]:"Transaction requires a fee but has no signature present",[Dm0]:"Attempt to load a program that does not exist",[Y_]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[mm0]:"ResanitizationNeeded",[Om0]:"Transaction failed to sanitize accounts offsets correctly",[Pm0]:"Transaction did not pass signature verification",[km0]:"Transaction locked too many accounts",[fm0]:"Sum of account balances before and after transaction do not match",[Q_]:"The transaction failed with the error `$errorName`",[Sm0]:"Transaction version is unsupported",[Im0]:"Transaction would exceed account data limit within the block",[bm0]:"Transaction would exceed total account data limit",[Cm0]:"Transaction would exceed max account limit within the block",[Fm0]:"Transaction would exceed max Block Cost Limit",[vm0]:"Transaction would exceed max Vote Cost Limit",[$m0]:"Attempted to sign a transaction with an address that is not a signer for it",[ng0]:"Transaction is missing an address at index: $index.",[Jm0]:"Transaction has no expected signers therefore it cannot be encoded",[Ym0]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[lg0]:"Transaction does not have a blockhash lifetime",[pg0]:"Transaction is not a durable nonce transaction",[ug0]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[cg0]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[ag0]:"No fee payer set in CompiledTransaction",[ig0]:"Could not find program address at index $index",[Xm0]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[Wm0]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[sg0]:"Transaction is missing a fee payer.",[rg0]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[eg0]:"Transaction first instruction is not advance nonce account instruction.",[tg0]:"Transaction with no instructions cannot be durable nonce transaction.",[mg0]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[fg0]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[Qm0]:"The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",[og0]:"Transaction is missing signatures for addresses: $addresses.",[dg0]:"Transaction version must be in the range [0, 127]. `$actualVersion` given",[Gm0]:"This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 0.",[Vm0]:"The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction."},g8="i",uQ="t";function gf0($,J={}){let Q=yf0[$];if(Q.length===0)return"";let X;function W(G){if(X[uQ]===2){let V=Q.slice(X[g8]+1,G);Y.push(V in J?`${J[V]}`:`$${V}`)}else if(X[uQ]===1)Y.push(Q.slice(X[g8],G))}let Y=[];return Q.split("").forEach((G,V)=>{if(V===0){X={[g8]:0,[uQ]:Q[0]==="\\"?0:Q[0]==="$"?2:1};return}let q;switch(X[uQ]){case 0:q={[g8]:V,[uQ]:1};break;case 1:if(G==="\\")q={[g8]:V,[uQ]:0};else if(G==="$")q={[g8]:V,[uQ]:2};break;case 2:if(G==="\\")q={[g8]:V,[uQ]:0};else if(G==="$")q={[g8]:V,[uQ]:2};else if(!G.match(/\w/))q={[g8]:V,[uQ]:1};break}if(q){if(X!==q)W(V);X=q}}),W(),Y.join("")}function mf0($,J={}){return gf0($,J)}var p4=class extends Error{cause=this.cause;context;constructor(...[$,J]){let Q,X;if(J)Object.entries(Object.getOwnPropertyDescriptors(J)).forEach(([Y,G])=>{if(Y==="cause")X={cause:G.value};else{if(Q===void 0)Q={__code:$};Object.defineProperty(Q,Y,G)}});let W=mf0($,Q);super(W,X);this.context=Object.freeze(Q===void 0?{__code:$}:Q),this.name="SolanaError"}};function G_(...$){if("captureStackTrace"in Error&&typeof Error.captureStackTrace==="function")Error.captureStackTrace(...$)}function V_({errorCodeBaseOffset:$,getErrorContext:J,orderedErrorNames:Q,rpcEnumError:X},W){let Y,G;if(typeof X==="string")Y=X;else Y=Object.keys(X)[0],G=X[Y];let V=Q.indexOf(Y),q=$+V,H=J(q,Y,G),Z=new p4(q,H);return G_(Z,W),Z}var ff0=["GenericError","InvalidArgument","InvalidInstructionData","InvalidAccountData","AccountDataTooSmall","InsufficientFunds","IncorrectProgramId","MissingRequiredSignature","AccountAlreadyInitialized","UninitializedAccount","UnbalancedInstruction","ModifiedProgramId","ExternalAccountLamportSpend","ExternalAccountDataModified","ReadonlyLamportChange","ReadonlyDataModified","DuplicateAccountIndex","ExecutableModified","RentEpochModified","NotEnoughAccountKeys","AccountDataSizeChanged","AccountNotExecutable","AccountBorrowFailed","AccountBorrowOutstanding","DuplicateAccountOutOfSync","Custom","InvalidError","ExecutableDataModified","ExecutableLamportChange","ExecutableAccountNotRentExempt","UnsupportedProgramId","CallDepth","MissingAccount","ReentrancyNotAllowed","MaxSeedLengthExceeded","InvalidSeeds","InvalidRealloc","ComputationalBudgetExceeded","PrivilegeEscalation","ProgramEnvironmentSetupFailure","ProgramFailedToComplete","ProgramFailedToCompile","Immutable","IncorrectAuthority","BorshIoError","AccountNotRentExempt","InvalidAccountOwner","ArithmeticOverflow","UnsupportedSysvar","IllegalOwner","MaxAccountsDataAllocationsExceeded","MaxAccountsExceeded","MaxInstructionTraceLengthExceeded","BuiltinProgramsMustConsumeComputeUnits"];function q_($,J){let Q=Number($);return V_({errorCodeBaseOffset:4615001,getErrorContext(X,W,Y){if(X===$_)return{errorName:W,index:Q,...Y!==void 0?{instructionErrorContext:Y}:null};else if(X===J_)return{code:Number(Y),index:Q};return{index:Q}},orderedErrorNames:ff0,rpcEnumError:J},q_)}var lf0=["AccountInUse","AccountLoadedTwice","AccountNotFound","ProgramAccountNotFound","InsufficientFundsForFee","InvalidAccountForFee","AlreadyProcessed","BlockhashNotFound","CallChainTooDeep","MissingSignatureForFee","InvalidAccountIndex","SignatureFailure","InvalidProgramForExecution","SanitizeFailure","ClusterMaintenance","AccountBorrowOutstanding","WouldExceedMaxBlockCostLimit","UnsupportedVersion","InvalidWritableAccount","WouldExceedMaxAccountCostLimit","WouldExceedAccountDataBlockLimit","TooManyAccountLocks","AddressLookupTableNotFound","InvalidAddressLookupTableOwner","InvalidAddressLookupTableData","InvalidAddressLookupTableIndex","InvalidRentPayingAccount","WouldExceedMaxVoteCostLimit","WouldExceedAccountDataTotalLimit","DuplicateInstruction","InsufficientFundsForRent","MaxLoadedAccountsDataSizeExceeded","InvalidLoadedAccountsDataSizeLimit","ResanitizationNeeded","ProgramExecutionTemporarilyRestricted","UnbalancedTransaction"];function K_($){if(typeof $==="object"&&"InstructionError"in $)return q_(...$.InstructionError);return V_({errorCodeBaseOffset:7050001,getErrorContext(J,Q,X){if(J===Q_)return{errorName:Q,...X!==void 0?{transactionErrorContext:X}:null};else if(J===X_)return{index:Number(X)};else if(J===W_||J===Y_)return{accountIndex:Number(X.account_index)}},orderedErrorNames:lf0,rpcEnumError:$},K_)}function d4($){let J;if(pf0($)){let{code:Q,data:X,message:W}=$,Y=Number(Q);if(Y===WU){let{err:G,...V}=X,q=G?{cause:K_(G)}:null;J=new p4(WU,{...V,...q})}else{let G;switch(Y){case lN:case pN:case uN:case dN:case fN:case aN:case eN:case tN:case iN:case oN:case nN:case sN:case rN:case cN:G={__serverMessage:W};break;default:if(typeof X==="object"&&!Array.isArray(X))G=X}J=new p4(Y,G)}}else{let Q=typeof $==="object"&&$!==null&&"message"in $&&typeof $.message==="string"?$.message:"Malformed JSON-RPC error with no message attribute";J=new p4(mN,{error:$,message:Q})}return G_(J,d4),J}function pf0($){return typeof $==="object"&&$!==null&&"code"in $&&"message"in $&&(typeof $.code==="number"||typeof $.code==="bigint")&&typeof $.message==="string"}function df0($){return typeof $==="bigint"?Number($):$}var U0={};function H_($){return function J(Q,X){if(Array.isArray(Q))return Q.map((W,Y)=>{let G={...X,keyPath:[...X.keyPath,Y]};return J(W,G)});else if(typeof Q==="object"&&Q!==null){let W={};for(let Y in Q){if(!Object.prototype.hasOwnProperty.call(Q,Y))continue;let G={...X,keyPath:[...X.keyPath,Y]};W[Y]=J(Q[Y],G)}return W}else return $.reduce((W,Y)=>Y(W,X),Q)}}function D_($,J){return(Q)=>{let X=H_($);return Object.freeze({...Q,params:X(Q.params,J)})}}function U_($,J){return(Q)=>H_($)(Q,J)}function uf0(){return D_([df0],{keyPath:[]})}function cf0({commitmentPropertyName:$,params:J,optionsObjectPositionInParams:Q,overrideCommitment:X}){let W=J[Q];if(W===void 0||W&&typeof W==="object"&&!Array.isArray(W)){if(W&&$ in W){if(!W[$]||W[$]==="finalized"){let Y=[...J],{[$]:G,...V}=W;if(Object.keys(V).length>0)Y[Q]=V;else if(Q===Y.length-1)Y.length--;else Y[Q]=void 0;return Y}}else if(X!=="finalized"){let Y=[...J];return Y[Q]={...W,[$]:X},Y}}return J}function if0({defaultCommitment:$,optionsObjectPositionByMethod:J}){return(Q)=>{let{params:X,methodName:W}=Q;if(!Array.isArray(X))return Q;let Y=J[W];if(Y==null)return Q;return Object.freeze({methodName:W,params:cf0({commitmentPropertyName:W==="sendTransaction"?"preflightCommitment":"commitment",optionsObjectPositionInParams:Y,overrideCommitment:$,params:X})})}}function af0($){return(J,{keyPath:Q})=>{if(typeof J==="bigint"){if($&&(J>Number.MAX_SAFE_INTEGER||J<-Number.MAX_SAFE_INTEGER))$(Q,J)}return J}}function of0($){return(J)=>{return D_([af0((...X)=>$(J,...X))],{keyPath:[]})(J)}}var nf0={accountNotifications:1,blockNotifications:1,getAccountInfo:1,getBalance:1,getBlock:1,getBlockHeight:0,getBlockProduction:0,getBlocks:2,getBlocksWithLimit:2,getEpochInfo:0,getFeeForMessage:1,getInflationGovernor:0,getInflationReward:1,getLargestAccounts:0,getLatestBlockhash:0,getLeaderSchedule:1,getMinimumBalanceForRentExemption:1,getMultipleAccounts:1,getProgramAccounts:1,getSignaturesForAddress:1,getSlot:0,getSlotLeader:0,getStakeMinimumDelegation:0,getSupply:0,getTokenAccountBalance:1,getTokenAccountsByDelegate:2,getTokenAccountsByOwner:2,getTokenLargestAccounts:1,getTokenSupply:1,getTransaction:1,getTransactionCount:0,getVoteAccounts:0,isBlockhashValid:1,logsNotifications:1,programNotifications:1,requestAirdrop:2,sendTransaction:1,signatureNotifications:1,simulateTransaction:1};function u4($){let J=$?.onIntegerOverflow;return(Q)=>{return UJ(Q,J?of0(J):(X)=>X,uf0(),if0({defaultCommitment:$?.defaultCommitment,optionsObjectPositionByMethod:nf0}))}}function Z_($){return function(Q,{keyPath:X}){if(!(typeof Q==="number"&&Number.isInteger(Q)||typeof Q==="bigint"))return Q;if(sf0(X,$))return Number(Q);else return BigInt(Q)}}function sf0($,J){return J.some((Q)=>{if(Q.length!==$.length)return!1;for(let X=$.length-1;X>=0;X--){let W=$[X],Y=Q[X];if(Y!==W&&(Y!==U0||typeof W!=="number"))return!1}return!0})}function z_($){return U_([Z_($)],{keyPath:[]})}function rf0(){return($)=>$.result}var c4=[["data","parsed","info","tokenAmount","decimals"],["data","parsed","info","tokenAmount","uiAmount"],["data","parsed","info","rentExemptReserve","decimals"],["data","parsed","info","rentExemptReserve","uiAmount"],["data","parsed","info","delegatedAmount","decimals"],["data","parsed","info","delegatedAmount","uiAmount"],["data","parsed","info","extensions",U0,"state","olderTransferFee","transferFeeBasisPoints"],["data","parsed","info","extensions",U0,"state","newerTransferFee","transferFeeBasisPoints"],["data","parsed","info","extensions",U0,"state","preUpdateAverageRate"],["data","parsed","info","extensions",U0,"state","currentRate"]],m8=[...c4,["data","parsed","info","lastExtendedSlotStartIndex"],["data","parsed","info","slashPenalty"],["data","parsed","info","warmupCooldownRate"],["data","parsed","info","decimals"],["data","parsed","info","numRequiredSigners"],["data","parsed","info","numValidSigners"],["data","parsed","info","stake","delegation","warmupCooldownRate"],["data","parsed","info","exemptionThreshold"],["data","parsed","info","burnPercent"],["data","parsed","info","commission"],["data","parsed","info","votes",U0,"confirmationCount"]],FG=[["index"],["instructions",U0,"accounts",U0],["instructions",U0,"programIdIndex"],["instructions",U0,"stackHeight"]],YU=[["addressTableLookups",U0,"writableIndexes",U0],["addressTableLookups",U0,"readonlyIndexes",U0],["header","numReadonlySignedAccounts"],["header","numReadonlyUnsignedAccounts"],["header","numRequiredSignatures"],["instructions",U0,"accounts",U0],["instructions",U0,"programIdIndex"],["instructions",U0,"stackHeight"]];function tf0(){return[["loadedAccountsDataSize"],...m8.map(($)=>["accounts",U0,...$]),...FG.map(($)=>["innerInstructions",U0,...$])]}function ef0(){return($,J)=>{let Q=$;if("error"in Q){let{error:X}=Q;if(X&&typeof X==="object"&&"code"in X&&(X.code===-32002||X.code===-32002n)&&"data"in X&&X.data){let G=U_([Z_(tf0())],{keyPath:[]})(X.data,J),V={...X,data:G};throw d4(V)}throw d4(Q.error)}return Q}}function j_($){return(J,Q)=>{let X=Q.methodName,W=$?.allowedNumericKeyPaths&&X?$.allowedNumericKeyPaths[X]:void 0;return UJ(J,(Y)=>ef0()(Y,Q),(Y)=>rf0()(Y,Q),(Y)=>z_(W??[])(Y,Q))}}function M_($){return(J,Q)=>{let X=Q.methodName,W=$?.allowedNumericKeyPaths&&X?$.allowedNumericKeyPaths[X]:void 0;return UJ(J,(Y)=>z_(W??[])(Y,Q))}}function L_($){return gN({requestTransformer:u4($),responseTransformer:j_({allowedNumericKeyPaths:$l0()})})}var GU;function $l0(){if(!GU)GU={getAccountInfo:m8.map(($)=>["value",...$]),getBlock:[["transactions",U0,"meta","preTokenBalances",U0,"accountIndex"],["transactions",U0,"meta","preTokenBalances",U0,"uiTokenAmount","decimals"],["transactions",U0,"meta","postTokenBalances",U0,"accountIndex"],["transactions",U0,"meta","postTokenBalances",U0,"uiTokenAmount","decimals"],["transactions",U0,"meta","rewards",U0,"commission"],...FG.map(($)=>["transactions",U0,"meta","innerInstructions",U0,...$]),...YU.map(($)=>["transactions",U0,"transaction","message",...$]),["rewards",U0,"commission"]],getClusterNodes:[[U0,"featureSet"],[U0,"shredVersion"]],getInflationGovernor:[["initial"],["foundation"],["foundationTerm"],["taper"],["terminal"]],getInflationRate:[["foundation"],["total"],["validator"]],getInflationReward:[[U0,"commission"]],getMultipleAccounts:m8.map(($)=>["value",U0,...$]),getProgramAccounts:m8.flatMap(($)=>[["value",U0,"account",...$],[U0,"account",...$]]),getRecentPerformanceSamples:[[U0,"samplePeriodSecs"]],getTokenAccountBalance:[["value","decimals"],["value","uiAmount"]],getTokenAccountsByDelegate:c4.map(($)=>["value",U0,"account",...$]),getTokenAccountsByOwner:c4.map(($)=>["value",U0,"account",...$]),getTokenLargestAccounts:[["value",U0,"decimals"],["value",U0,"uiAmount"]],getTokenSupply:[["value","decimals"],["value","uiAmount"]],getTransaction:[["meta","preTokenBalances",U0,"accountIndex"],["meta","preTokenBalances",U0,"uiTokenAmount","decimals"],["meta","postTokenBalances",U0,"accountIndex"],["meta","postTokenBalances",U0,"uiTokenAmount","decimals"],["meta","rewards",U0,"commission"],...FG.map(($)=>["meta","innerInstructions",U0,...$]),...YU.map(($)=>["transaction","message",...$])],getVersion:[["feature-set"]],getVoteAccounts:[["current",U0,"commission"],["delinquent",U0,"commission"]],simulateTransaction:[["value","loadedAccountsDataSize"],...m8.map(($)=>["value","accounts",U0,...$]),...FG.map(($)=>["value","innerInstructions",U0,...$])]};return GU}var Jl0=1,Ql0=2,Xl0=3,Wl0=4,Yl0=5,Gl0=6,Vl0=7,ql0=8,Kl0=9,Hl0=10,Dl0=-32700,Ul0=-32603,Zl0=-32602,zl0=-32601,jl0=-32600,Ml0=-32019,Ll0=-32018,wl0=-32017,Pl0=-32016,Rl0=-32015,Ol0=-32014,Nl0=-32013,_l0=-32012,Fl0=-32011,Sl0=-32010,Bl0=-32009,Cl0=-32008,Il0=-32007,kl0=-32006,Tl0=-32005,Al0=-32004,El0=-32003,hl0=-32002,xl0=-32001,vl0=2800000,bl0=2800001,yl0=2800002,gl0=2800003,ml0=2800004,fl0=2800005,ll0=2800006,pl0=2800007,dl0=2800008,ul0=2800009,cl0=2800010,il0=2800011,al0=3230000,ol0=32300001,nl0=3230002,sl0=3230003,rl0=3230004,tl0=3610000,el0=3610001,$p0=3610002,Jp0=3610003,Qp0=3610004,Xp0=3610005,Wp0=3610006,Yp0=3610007,Gp0=3611000,Vp0=3704000,qp0=3704001,Kp0=3704002,Hp0=3704003,Dp0=3704004,Up0=4128000,Zp0=4128001,zp0=4128002,jp0=4615000,Mp0=4615001,Lp0=4615002,wp0=4615003,Pp0=4615004,Rp0=4615005,Op0=4615006,Np0=4615007,_p0=4615008,Fp0=4615009,Sp0=4615010,Bp0=4615011,Cp0=4615012,Ip0=4615013,kp0=4615014,Tp0=4615015,Ap0=4615016,Ep0=4615017,hp0=4615018,xp0=4615019,vp0=4615020,bp0=4615021,yp0=4615022,gp0=4615023,mp0=4615024,fp0=4615025,lp0=4615026,pp0=4615027,dp0=4615028,up0=4615029,cp0=4615030,ip0=4615031,ap0=4615032,op0=4615033,np0=4615034,sp0=4615035,rp0=4615036,tp0=4615037,ep0=4615038,$d0=4615039,Jd0=4615040,Qd0=4615041,Xd0=4615042,Wd0=4615043,Yd0=4615044,Gd0=4615045,Vd0=4615046,qd0=4615047,Kd0=4615048,Hd0=4615049,Dd0=4615050,Ud0=4615051,Zd0=4615052,zd0=4615053,jd0=4615054,Md0=5508000,Ld0=5508001,wd0=5508002,Pd0=5508003,Rd0=5508004,Od0=5508005,Nd0=5508006,_d0=5508007,Fd0=5508008,Sd0=5508009,Bd0=5508010,Cd0=5508011,Id0=5607000,kd0=5607001,Td0=5607002,Ad0=5607003,Ed0=5607004,hd0=5607005,xd0=5607006,vd0=5607007,bd0=5607008,yd0=5607009,gd0=5607010,md0=5607011,fd0=5607012,ld0=5607013,pd0=5607014,dd0=5607015,ud0=5607016,cd0=5607017,id0=5663000,ad0=5663001,od0=5663002,nd0=5663003,sd0=5663004,rd0=5663005,td0=5663006,ed0=5663007,$u0=5663008,Ju0=5663009,Qu0=5663010,Xu0=5663011,Wu0=5663012,Yu0=5663013,Gu0=5663014,Vu0=5663015,qu0=5663016,Ku0=5663017,Hu0=5663018,Du0=5663019,Uu0=5663020,Zu0=5663021,zu0=5663022,ju0=7050000,Mu0=7050001,Lu0=7050002,wu0=7050003,Pu0=7050004,Ru0=7050005,Ou0=7050006,Nu0=7050007,_u0=7050008,Fu0=7050009,Su0=7050010,Bu0=7050011,Cu0=7050012,Iu0=7050013,ku0=7050014,Tu0=7050015,Au0=7050016,Eu0=7050017,hu0=7050018,xu0=7050019,vu0=7050020,bu0=7050021,yu0=7050022,gu0=7050023,mu0=7050024,fu0=7050025,lu0=7050026,pu0=7050027,du0=7050028,uu0=7050029,cu0=7050030,iu0=7050031,au0=7050032,ou0=7050033,nu0=7050034,su0=7050035,ru0=7050036,tu0=7618000,eu0=7618001,$c0=7618002,Jc0=7618003,Qc0=7618004,Xc0=7618005,Wc0=7618006,Yc0=7618007,Gc0=7618008,Vc0=7618009,qc0=8078000,Kc0=8078001,Hc0=8078002,Dc0=8078003,Uc0=8078004,Zc0=8078005,zc0=8078006,jc0=8078007,Mc0=8078008,Lc0=8078009,wc0=8078010,Pc0=8078011,Rc0=8078012,Oc0=8078013,Nc0=8078014,_c0=8078015,Fc0=8078016,Sc0=8078017,Bc0=8078018,Cc0=8078019,Ic0=8078020,kc0=8078021,Tc0=8078022,Ac0=8078023,VU=8100000,Ec0=8100001,hc0=8100002,xc0=8100003,vc0=8190000,bc0=8190001,yc0=8190002,gc0=8190003,mc0=8190004,fc0=9900000,lc0=9900001,pc0=9900002,dc0=9900003,uc0=9900004,cc0=9900005,ic0=9900006;var ac0={[al0]:"Account not found at address: $address",[rl0]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[sl0]:"Expected decoded account at address: $address",[nl0]:"Failed to decode account data at address: $address",[ol0]:"Accounts not found at addresses: $addresses",[ul0]:"Unable to find a viable program address bump seed.",[yl0]:"$putativeAddress is not a base58-encoded address.",[vl0]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[gl0]:"The `CryptoKey` must be an `Ed25519` public key.",[il0]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[dl0]:"Invalid seeds; point must fall off the Ed25519 curve.",[ml0]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[ll0]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[pl0]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[fl0]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[cl0]:"Program address cannot end with PDA marker.",[bl0]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[Wl0]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[Jl0]:"The network has progressed past the last block for which this transaction could have been committed.",[qc0]:"Codec [$codecDescription] cannot decode empty byte arrays.",[Tc0]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[Ic0]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[Zc0]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[zc0]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[Uc0]:"Encoder and decoder must either both be fixed-size or variable-size.",[Mc0]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[Hc0]:"Expected a fixed-size codec, got a variable-size one.",[Oc0]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[Dc0]:"Expected a variable-size codec, got a fixed-size one.",[Cc0]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[Kc0]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[Bc0]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[Lc0]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[wc0]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[_c0]:"Invalid literal union variant. Expected one of [$variants], got $value.",[jc0]:"Expected [$codecDescription] to have $expected items, got $actual.",[Rc0]:"Invalid value $value for base $base with alphabet $alphabet.",[Fc0]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[Pc0]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[Nc0]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[kc0]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[Sc0]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[Ac0]:"This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",[Gp0]:"No random values implementation could be found.",[Fp0]:"instruction requires an uninitialized account",[gp0]:"instruction tries to borrow reference for an account which is already borrowed",[mp0]:"instruction left account with an outstanding borrowed reference",[bp0]:"program other than the account's owner changed the size of the account data",[Rp0]:"account data too small for instruction",[yp0]:"instruction expected an executable account",[Vd0]:"An account does not have enough lamports to be rent-exempt",[Kd0]:"Program arithmetic overflowed",[Gd0]:"Failed to serialize or deserialize account data: $encodedData",[jd0]:"Builtin programs must consume compute units",[ap0]:"Cross-program invocation call depth too deep",[ep0]:"Computational budget exceeded",[lp0]:"custom program error: #$code",[Ep0]:"instruction contains duplicate accounts",[fp0]:"instruction modifications of multiply-passed account differ",[cp0]:"executable accounts must be rent exempt",[dp0]:"instruction changed executable accounts data",[up0]:"instruction changed the balance of an executable account",[hp0]:"instruction changed executable bit of an account",[kp0]:"instruction modified data of an account it does not own",[Ip0]:"instruction spent from the balance of an account it does not own",[Mp0]:"generic instruction error",[Dd0]:"Provided owner is not allowed",[Wd0]:"Account is immutable",[Yd0]:"Incorrect authority provided",[Np0]:"incorrect program id for instruction",[Op0]:"insufficient funds for instruction",[Pp0]:"invalid account data for instruction",[qd0]:"Invalid account owner",[Lp0]:"invalid program argument",[pp0]:"program returned invalid error code",[wp0]:"invalid instruction data",[tp0]:"Failed to reallocate account data",[rp0]:"Provided seeds do not result in a valid address",[Ud0]:"Accounts data allocations exceeded the maximum allowed per transaction",[Zd0]:"Max accounts exceeded",[zd0]:"Max instruction trace length exceeded",[sp0]:"Length of the seed is too long for address generation",[op0]:"An account required by the instruction is missing",[_p0]:"missing required signature for instruction",[Cp0]:"instruction illegally modified the program id of an account",[vp0]:"insufficient account keys for instruction",[$d0]:"Cross-program invocation with unauthorized signer or writable account",[Jd0]:"Failed to create program execution environment",[Xd0]:"Program failed to compile",[Qd0]:"Program failed to complete",[Ap0]:"instruction modified data of a read-only account",[Tp0]:"instruction changed the balance of a read-only account",[np0]:"Cross-program invocation reentrancy not allowed for this instruction",[xp0]:"instruction modified rent epoch of an account",[Bp0]:"sum of account balances before and after instruction do not match",[Sp0]:"instruction requires an initialized account",[jp0]:"",[ip0]:"Unsupported program id",[Hd0]:"Unsupported sysvar",[cc0]:"Invalid instruction plan kind: $kind.",[$c0]:"The provided instruction plan is empty.",[Xc0]:"No failed transaction plan result was found in the provided transaction plan result.",[Qc0]:"This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved \u2014 e.g. by targetting RPCs that support transaction bundles.",[Jc0]:"The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",[tu0]:"The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",[ic0]:"Invalid transaction plan kind: $kind.",[eu0]:"No more instructions to pack; the message packer has completed the instruction plan.",[Wc0]:"Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",[Yc0]:"Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",[Gc0]:"Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",[Vc0]:"Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",[Up0]:"The instruction does not have any accounts.",[Zp0]:"The instruction does not have any data.",[zp0]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[Yl0]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[Ql0]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[pc0]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[uc0]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[lc0]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[fc0]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[dc0]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Ul0]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[Zl0]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[jl0]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[zl0]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[Dl0]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[_l0]:"$__serverMessage",[xl0]:"$__serverMessage",[Al0]:"$__serverMessage",[Ol0]:"$__serverMessage",[wl0]:"Epoch rewards period still active at slot $slot",[Sl0]:"$__serverMessage",[Bl0]:"$__serverMessage",[Ml0]:"Failed to query long-term storage; please try again",[Pl0]:"Minimum context slot has not been reached",[Tl0]:"Node is unhealthy; behind by $numSlotsBehind slots",[Cl0]:"No snapshot",[hl0]:"Transaction simulation failed",[Ll0]:"Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",[Il0]:"$__serverMessage",[Fl0]:"Transaction history is not available from this node",[kl0]:"$__serverMessage",[Nl0]:"Transaction signature length mismatch",[El0]:"Transaction signature verification failure",[Rl0]:"$__serverMessage",[Vp0]:"Key pair bytes must be of length 64, got $byteLength.",[qp0]:"Expected private key bytes with length 32. Actual length: $actualLength.",[Kp0]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[Dp0]:"The provided private key does not match the provided public key.",[Hp0]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[Gl0]:"Lamports value must be in the range [0, 2e64-1]",[Vl0]:"`$value` cannot be parsed as a `BigInt`",[Hl0]:"$message",[ql0]:"`$value` cannot be parsed as a `Number`",[Xl0]:"No nonce account could be found at address `$nonceAccountAddress`",[Ad0]:"Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",[ld0]:"Attempted to sign an offchain message with an address that is not a signer for it",[Td0]:"Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",[fd0]:"The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",[Id0]:"The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",[vd0]:"Expected message format $expectedMessageFormat, got $actualMessageFormat",[bd0]:"The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",[yd0]:"Offchain message content must be non-empty",[hd0]:"Offchain message must specify the address of at least one required signer",[gd0]:"Offchain message envelope must reserve space for at least one signature",[Ed0]:"The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",[dd0]:"The signatories of this offchain message must be listed in lexicographical order",[ud0]:"An address must be listed no more than once among the signatories of an offchain message",[md0]:"Offchain message is missing signatures for addresses: $addresses.",[cd0]:"Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",[kd0]:"The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",[pd0]:"Expected offchain message version $expectedVersion. Got $actualVersion.",[xd0]:"This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",[vc0]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[yc0]:"WebSocket was closed before payload could be added to the send buffer",[gc0]:"WebSocket connection closed",[mc0]:"WebSocket failed to connect",[bc0]:"Failed to obtain a subscription id from the server",[xc0]:"Could not find an API plan for RPC method: `$method`",[VU]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[hc0]:"HTTP error ($statusCode): $message",[Ec0]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[Md0]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[Ld0]:"The provided value does not implement the `KeyPairSigner` interface",[Pd0]:"The provided value does not implement the `MessageModifyingSigner` interface",[Rd0]:"The provided value does not implement the `MessagePartialSigner` interface",[wd0]:"The provided value does not implement any of the `MessageSigner` interfaces",[Nd0]:"The provided value does not implement the `TransactionModifyingSigner` interface",[_d0]:"The provided value does not implement the `TransactionPartialSigner` interface",[Fd0]:"The provided value does not implement the `TransactionSendingSigner` interface",[Od0]:"The provided value does not implement any of the `TransactionSigner` interfaces",[Sd0]:"More than one `TransactionSendingSigner` was identified.",[Bd0]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[Cd0]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[Yp0]:"Cannot export a non-extractable key.",[el0]:"No digest implementation could be found.",[tl0]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[$p0]:`This runtime does not support the generation of Ed25519 key pairs.
|
|
78
|
+
|
|
79
|
+
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
80
|
+
|
|
81
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[Jp0]:"No signature verification implementation could be found.",[Qp0]:"No key generation implementation could be found.",[Xp0]:"No signing implementation could be found.",[Wp0]:"No key export implementation could be found.",[Kl0]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[Au0]:"Transaction processing left an account with an outstanding borrowed reference",[Mu0]:"Account in use",[Lu0]:"Account loaded twice",[wu0]:"Attempt to debit an account but found no record of a prior credit.",[gu0]:"Transaction loads an address table account that doesn't exist",[Nu0]:"This transaction has already been processed",[_u0]:"Blockhash not found",[Fu0]:"Loader call chain is too deep",[Tu0]:"Transactions are currently disabled due to cluster maintenance",[cu0]:"Transaction contains a duplicate instruction ($index) that is not allowed",[Ru0]:"Insufficient funds for fee",[iu0]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[Ou0]:"This account may not be used to pay transaction fees",[Bu0]:"Transaction contains an invalid account reference",[fu0]:"Transaction loads an address table account with invalid data",[lu0]:"Transaction address table lookup uses an invalid index",[mu0]:"Transaction loads an address table account with an invalid owner",[ou0]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[Iu0]:"This program may not be used for executing instructions",[pu0]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[xu0]:"Transaction loads a writable account that cannot be written",[au0]:"Transaction exceeded max loaded accounts data size cap",[Su0]:"Transaction requires a fee but has no signature present",[Pu0]:"Attempt to load a program that does not exist",[su0]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[nu0]:"ResanitizationNeeded",[ku0]:"Transaction failed to sanitize accounts offsets correctly",[Cu0]:"Transaction did not pass signature verification",[yu0]:"Transaction locked too many accounts",[ru0]:"Sum of account balances before and after transaction do not match",[ju0]:"The transaction failed with the error `$errorName`",[hu0]:"Transaction version is unsupported",[bu0]:"Transaction would exceed account data limit within the block",[uu0]:"Transaction would exceed total account data limit",[vu0]:"Transaction would exceed max account limit within the block",[Eu0]:"Transaction would exceed max Block Cost Limit",[du0]:"Transaction would exceed max Vote Cost Limit",[Vu0]:"Attempted to sign a transaction with an address that is not a signer for it",[Qu0]:"Transaction is missing an address at index: $index.",[qu0]:"Transaction has no expected signers therefore it cannot be encoded",[Uu0]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[od0]:"Transaction does not have a blockhash lifetime",[nd0]:"Transaction is not a durable nonce transaction",[rd0]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[td0]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[$u0]:"No fee payer set in CompiledTransaction",[ed0]:"Could not find program address at index $index",[Hu0]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[Du0]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[Xu0]:"Transaction is missing a fee payer.",[Wu0]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[Gu0]:"Transaction first instruction is not advance nonce account instruction.",[Yu0]:"Transaction with no instructions cannot be durable nonce transaction.",[id0]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[ad0]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[Ku0]:"The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",[Ju0]:"Transaction is missing signatures for addresses: $addresses.",[sd0]:"Transaction version must be in the range [0, 127]. `$actualVersion` given",[Zu0]:"This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 0.",[zu0]:"The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction."},f8="i",cQ="t";function oc0($,J={}){let Q=ac0[$];if(Q.length===0)return"";let X;function W(G){if(X[cQ]===2){let V=Q.slice(X[f8]+1,G);Y.push(V in J?`${J[V]}`:`$${V}`)}else if(X[cQ]===1)Y.push(Q.slice(X[f8],G))}let Y=[];return Q.split("").forEach((G,V)=>{if(V===0){X={[f8]:0,[cQ]:Q[0]==="\\"?0:Q[0]==="$"?2:1};return}let q;switch(X[cQ]){case 0:q={[f8]:V,[cQ]:1};break;case 1:if(G==="\\")q={[f8]:V,[cQ]:0};else if(G==="$")q={[f8]:V,[cQ]:2};break;case 2:if(G==="\\")q={[f8]:V,[cQ]:0};else if(G==="$")q={[f8]:V,[cQ]:2};else if(!G.match(/\w/))q={[f8]:V,[cQ]:1};break}if(q){if(X!==q)W(V);X=q}}),W(),Y.join("")}function nc0($,J={}){return oc0($,J)}var w_=class extends Error{cause=this.cause;context;constructor(...[$,J]){let Q,X;if(J)Object.entries(Object.getOwnPropertyDescriptors(J)).forEach(([Y,G])=>{if(Y==="cause")X={cause:G.value};else{if(Q===void 0)Q={__code:$};Object.defineProperty(Q,Y,G)}});let W=nc0($,Q);super(W,X);this.context=Object.freeze(Q===void 0?{__code:$}:Q),this.name="SolanaError"}};function P_(...$){if("captureStackTrace"in Error&&typeof Error.captureStackTrace==="function")Error.captureStackTrace(...$)}var sc0=1,rc0=2,tc0=3,ec0=4,$i0=5,Ji0=6,Qi0=7,Xi0=8,Wi0=9,Yi0=10,Gi0=-32700,Vi0=-32603,qi0=-32602,Ki0=-32601,Hi0=-32600,Di0=-32019,Ui0=-32018,Zi0=-32017,zi0=-32016,ji0=-32015,Mi0=-32014,Li0=-32013,wi0=-32012,Pi0=-32011,Ri0=-32010,Oi0=-32009,Ni0=-32008,_i0=-32007,Fi0=-32006,Si0=-32005,Bi0=-32004,Ci0=-32003,Ii0=-32002,ki0=-32001,Ti0=2800000,Ai0=2800001,Ei0=2800002,hi0=2800003,xi0=2800004,vi0=2800005,bi0=2800006,yi0=2800007,gi0=2800008,mi0=2800009,fi0=2800010,li0=2800011,pi0=3230000,di0=32300001,ui0=3230002,ci0=3230003,ii0=3230004,ai0=3610000,oi0=3610001,ni0=3610002,si0=3610003,ri0=3610004,ti0=3610005,ei0=3610006,$a0=3610007,Ja0=3611000,Qa0=3704000,Xa0=3704001,Wa0=3704002,Ya0=3704003,Ga0=3704004,Va0=4128000,qa0=4128001,Ka0=4128002,Ha0=4615000,Da0=4615001,Ua0=4615002,Za0=4615003,za0=4615004,ja0=4615005,Ma0=4615006,La0=4615007,wa0=4615008,Pa0=4615009,Ra0=4615010,Oa0=4615011,Na0=4615012,_a0=4615013,Fa0=4615014,Sa0=4615015,Ba0=4615016,Ca0=4615017,Ia0=4615018,ka0=4615019,Ta0=4615020,Aa0=4615021,Ea0=4615022,ha0=4615023,xa0=4615024,va0=4615025,ba0=4615026,ya0=4615027,ga0=4615028,ma0=4615029,fa0=4615030,la0=4615031,pa0=4615032,da0=4615033,ua0=4615034,ca0=4615035,ia0=4615036,aa0=4615037,oa0=4615038,na0=4615039,sa0=4615040,ra0=4615041,ta0=4615042,ea0=4615043,$o0=4615044,Jo0=4615045,Qo0=4615046,Xo0=4615047,Wo0=4615048,Yo0=4615049,Go0=4615050,Vo0=4615051,qo0=4615052,Ko0=4615053,Ho0=4615054,Do0=5508000,Uo0=5508001,Zo0=5508002,zo0=5508003,jo0=5508004,Mo0=5508005,Lo0=5508006,wo0=5508007,Po0=5508008,Ro0=5508009,Oo0=5508010,No0=5508011,_o0=5607000,Fo0=5607001,So0=5607002,Bo0=5607003,Co0=5607004,Io0=5607005,ko0=5607006,To0=5607007,Ao0=5607008,Eo0=5607009,ho0=5607010,xo0=5607011,vo0=5607012,bo0=5607013,yo0=5607014,go0=5607015,mo0=5607016,fo0=5607017,lo0=5663000,po0=5663001,do0=5663002,uo0=5663003,co0=5663004,io0=5663005,ao0=5663006,oo0=5663007,no0=5663008,so0=5663009,ro0=5663010,to0=5663011,eo0=5663012,$n0=5663013,Jn0=5663014,Qn0=5663015,Xn0=5663016,Wn0=5663017,Yn0=5663018,Gn0=5663019,Vn0=5663020,qn0=5663021,Kn0=5663022,Hn0=7050000,Dn0=7050001,Un0=7050002,Zn0=7050003,zn0=7050004,jn0=7050005,Mn0=7050006,Ln0=7050007,wn0=7050008,Pn0=7050009,Rn0=7050010,On0=7050011,Nn0=7050012,_n0=7050013,Fn0=7050014,Sn0=7050015,Bn0=7050016,Cn0=7050017,In0=7050018,kn0=7050019,Tn0=7050020,An0=7050021,En0=7050022,hn0=7050023,xn0=7050024,vn0=7050025,bn0=7050026,yn0=7050027,gn0=7050028,mn0=7050029,fn0=7050030,ln0=7050031,pn0=7050032,dn0=7050033,un0=7050034,cn0=7050035,in0=7050036,an0=7618000,on0=7618001,nn0=7618002,sn0=7618003,rn0=7618004,tn0=7618005,en0=7618006,$s0=7618007,Js0=7618008,Qs0=7618009,Xs0=8078000,Ws0=8078001,Ys0=8078002,Gs0=8078003,Vs0=8078004,qs0=8078005,Ks0=8078006,Hs0=8078007,Ds0=8078008,Us0=8078009,Zs0=8078010,zs0=8078011,js0=8078012,Ms0=8078013,Ls0=8078014,ws0=8078015,Ps0=8078016,Rs0=8078017,Os0=8078018,Ns0=8078019,_s0=8078020,Fs0=8078021,Ss0=8078022,Bs0=8078023,Cs0=8100000,qU=8100001,KU=8100002,Is0=8100003,ks0=8190000,Ts0=8190001,As0=8190002,Es0=8190003,hs0=8190004,xs0=9900000,vs0=9900001,bs0=9900002,ys0=9900003,gs0=9900004,ms0=9900005,fs0=9900006;var ls0={[pi0]:"Account not found at address: $address",[ii0]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[ci0]:"Expected decoded account at address: $address",[ui0]:"Failed to decode account data at address: $address",[di0]:"Accounts not found at addresses: $addresses",[mi0]:"Unable to find a viable program address bump seed.",[Ei0]:"$putativeAddress is not a base58-encoded address.",[Ti0]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[hi0]:"The `CryptoKey` must be an `Ed25519` public key.",[li0]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[gi0]:"Invalid seeds; point must fall off the Ed25519 curve.",[xi0]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[bi0]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[yi0]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[vi0]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[fi0]:"Program address cannot end with PDA marker.",[Ai0]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[ec0]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[sc0]:"The network has progressed past the last block for which this transaction could have been committed.",[Xs0]:"Codec [$codecDescription] cannot decode empty byte arrays.",[Ss0]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[_s0]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[qs0]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[Ks0]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[Vs0]:"Encoder and decoder must either both be fixed-size or variable-size.",[Ds0]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[Ys0]:"Expected a fixed-size codec, got a variable-size one.",[Ms0]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[Gs0]:"Expected a variable-size codec, got a fixed-size one.",[Ns0]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[Ws0]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[Os0]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[Us0]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[Zs0]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[ws0]:"Invalid literal union variant. Expected one of [$variants], got $value.",[Hs0]:"Expected [$codecDescription] to have $expected items, got $actual.",[js0]:"Invalid value $value for base $base with alphabet $alphabet.",[Ps0]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[zs0]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[Ls0]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[Fs0]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[Rs0]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[Bs0]:"This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",[Ja0]:"No random values implementation could be found.",[Pa0]:"instruction requires an uninitialized account",[ha0]:"instruction tries to borrow reference for an account which is already borrowed",[xa0]:"instruction left account with an outstanding borrowed reference",[Aa0]:"program other than the account's owner changed the size of the account data",[ja0]:"account data too small for instruction",[Ea0]:"instruction expected an executable account",[Qo0]:"An account does not have enough lamports to be rent-exempt",[Wo0]:"Program arithmetic overflowed",[Jo0]:"Failed to serialize or deserialize account data: $encodedData",[Ho0]:"Builtin programs must consume compute units",[pa0]:"Cross-program invocation call depth too deep",[oa0]:"Computational budget exceeded",[ba0]:"custom program error: #$code",[Ca0]:"instruction contains duplicate accounts",[va0]:"instruction modifications of multiply-passed account differ",[fa0]:"executable accounts must be rent exempt",[ga0]:"instruction changed executable accounts data",[ma0]:"instruction changed the balance of an executable account",[Ia0]:"instruction changed executable bit of an account",[Fa0]:"instruction modified data of an account it does not own",[_a0]:"instruction spent from the balance of an account it does not own",[Da0]:"generic instruction error",[Go0]:"Provided owner is not allowed",[ea0]:"Account is immutable",[$o0]:"Incorrect authority provided",[La0]:"incorrect program id for instruction",[Ma0]:"insufficient funds for instruction",[za0]:"invalid account data for instruction",[Xo0]:"Invalid account owner",[Ua0]:"invalid program argument",[ya0]:"program returned invalid error code",[Za0]:"invalid instruction data",[aa0]:"Failed to reallocate account data",[ia0]:"Provided seeds do not result in a valid address",[Vo0]:"Accounts data allocations exceeded the maximum allowed per transaction",[qo0]:"Max accounts exceeded",[Ko0]:"Max instruction trace length exceeded",[ca0]:"Length of the seed is too long for address generation",[da0]:"An account required by the instruction is missing",[wa0]:"missing required signature for instruction",[Na0]:"instruction illegally modified the program id of an account",[Ta0]:"insufficient account keys for instruction",[na0]:"Cross-program invocation with unauthorized signer or writable account",[sa0]:"Failed to create program execution environment",[ta0]:"Program failed to compile",[ra0]:"Program failed to complete",[Ba0]:"instruction modified data of a read-only account",[Sa0]:"instruction changed the balance of a read-only account",[ua0]:"Cross-program invocation reentrancy not allowed for this instruction",[ka0]:"instruction modified rent epoch of an account",[Oa0]:"sum of account balances before and after instruction do not match",[Ra0]:"instruction requires an initialized account",[Ha0]:"",[la0]:"Unsupported program id",[Yo0]:"Unsupported sysvar",[ms0]:"Invalid instruction plan kind: $kind.",[nn0]:"The provided instruction plan is empty.",[tn0]:"No failed transaction plan result was found in the provided transaction plan result.",[rn0]:"This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved \u2014 e.g. by targetting RPCs that support transaction bundles.",[sn0]:"The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",[an0]:"The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",[fs0]:"Invalid transaction plan kind: $kind.",[on0]:"No more instructions to pack; the message packer has completed the instruction plan.",[en0]:"Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",[$s0]:"Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",[Js0]:"Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",[Qs0]:"Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",[Va0]:"The instruction does not have any accounts.",[qa0]:"The instruction does not have any data.",[Ka0]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[$i0]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[rc0]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[bs0]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[gs0]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[vs0]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[xs0]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[ys0]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Vi0]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[qi0]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[Hi0]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[Ki0]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[Gi0]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[wi0]:"$__serverMessage",[ki0]:"$__serverMessage",[Bi0]:"$__serverMessage",[Mi0]:"$__serverMessage",[Zi0]:"Epoch rewards period still active at slot $slot",[Ri0]:"$__serverMessage",[Oi0]:"$__serverMessage",[Di0]:"Failed to query long-term storage; please try again",[zi0]:"Minimum context slot has not been reached",[Si0]:"Node is unhealthy; behind by $numSlotsBehind slots",[Ni0]:"No snapshot",[Ii0]:"Transaction simulation failed",[Ui0]:"Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",[_i0]:"$__serverMessage",[Pi0]:"Transaction history is not available from this node",[Fi0]:"$__serverMessage",[Li0]:"Transaction signature length mismatch",[Ci0]:"Transaction signature verification failure",[ji0]:"$__serverMessage",[Qa0]:"Key pair bytes must be of length 64, got $byteLength.",[Xa0]:"Expected private key bytes with length 32. Actual length: $actualLength.",[Wa0]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[Ga0]:"The provided private key does not match the provided public key.",[Ya0]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[Ji0]:"Lamports value must be in the range [0, 2e64-1]",[Qi0]:"`$value` cannot be parsed as a `BigInt`",[Yi0]:"$message",[Xi0]:"`$value` cannot be parsed as a `Number`",[tc0]:"No nonce account could be found at address `$nonceAccountAddress`",[Bo0]:"Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",[bo0]:"Attempted to sign an offchain message with an address that is not a signer for it",[So0]:"Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",[vo0]:"The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",[_o0]:"The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",[To0]:"Expected message format $expectedMessageFormat, got $actualMessageFormat",[Ao0]:"The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",[Eo0]:"Offchain message content must be non-empty",[Io0]:"Offchain message must specify the address of at least one required signer",[ho0]:"Offchain message envelope must reserve space for at least one signature",[Co0]:"The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",[go0]:"The signatories of this offchain message must be listed in lexicographical order",[mo0]:"An address must be listed no more than once among the signatories of an offchain message",[xo0]:"Offchain message is missing signatures for addresses: $addresses.",[fo0]:"Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",[Fo0]:"The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",[yo0]:"Expected offchain message version $expectedVersion. Got $actualVersion.",[ko0]:"This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",[ks0]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[As0]:"WebSocket was closed before payload could be added to the send buffer",[Es0]:"WebSocket connection closed",[hs0]:"WebSocket failed to connect",[Ts0]:"Failed to obtain a subscription id from the server",[Is0]:"Could not find an API plan for RPC method: `$method`",[Cs0]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[KU]:"HTTP error ($statusCode): $message",[qU]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[Do0]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[Uo0]:"The provided value does not implement the `KeyPairSigner` interface",[zo0]:"The provided value does not implement the `MessageModifyingSigner` interface",[jo0]:"The provided value does not implement the `MessagePartialSigner` interface",[Zo0]:"The provided value does not implement any of the `MessageSigner` interfaces",[Lo0]:"The provided value does not implement the `TransactionModifyingSigner` interface",[wo0]:"The provided value does not implement the `TransactionPartialSigner` interface",[Po0]:"The provided value does not implement the `TransactionSendingSigner` interface",[Mo0]:"The provided value does not implement any of the `TransactionSigner` interfaces",[Ro0]:"More than one `TransactionSendingSigner` was identified.",[Oo0]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[No0]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[$a0]:"Cannot export a non-extractable key.",[oi0]:"No digest implementation could be found.",[ai0]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[ni0]:`This runtime does not support the generation of Ed25519 key pairs.
|
|
82
|
+
|
|
83
|
+
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
84
|
+
|
|
85
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[si0]:"No signature verification implementation could be found.",[ri0]:"No key generation implementation could be found.",[ti0]:"No signing implementation could be found.",[ei0]:"No key export implementation could be found.",[Wi0]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[Bn0]:"Transaction processing left an account with an outstanding borrowed reference",[Dn0]:"Account in use",[Un0]:"Account loaded twice",[Zn0]:"Attempt to debit an account but found no record of a prior credit.",[hn0]:"Transaction loads an address table account that doesn't exist",[Ln0]:"This transaction has already been processed",[wn0]:"Blockhash not found",[Pn0]:"Loader call chain is too deep",[Sn0]:"Transactions are currently disabled due to cluster maintenance",[fn0]:"Transaction contains a duplicate instruction ($index) that is not allowed",[jn0]:"Insufficient funds for fee",[ln0]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[Mn0]:"This account may not be used to pay transaction fees",[On0]:"Transaction contains an invalid account reference",[vn0]:"Transaction loads an address table account with invalid data",[bn0]:"Transaction address table lookup uses an invalid index",[xn0]:"Transaction loads an address table account with an invalid owner",[dn0]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[_n0]:"This program may not be used for executing instructions",[yn0]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[kn0]:"Transaction loads a writable account that cannot be written",[pn0]:"Transaction exceeded max loaded accounts data size cap",[Rn0]:"Transaction requires a fee but has no signature present",[zn0]:"Attempt to load a program that does not exist",[cn0]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[un0]:"ResanitizationNeeded",[Fn0]:"Transaction failed to sanitize accounts offsets correctly",[Nn0]:"Transaction did not pass signature verification",[En0]:"Transaction locked too many accounts",[in0]:"Sum of account balances before and after transaction do not match",[Hn0]:"The transaction failed with the error `$errorName`",[In0]:"Transaction version is unsupported",[An0]:"Transaction would exceed account data limit within the block",[mn0]:"Transaction would exceed total account data limit",[Tn0]:"Transaction would exceed max account limit within the block",[Cn0]:"Transaction would exceed max Block Cost Limit",[gn0]:"Transaction would exceed max Vote Cost Limit",[Qn0]:"Attempted to sign a transaction with an address that is not a signer for it",[ro0]:"Transaction is missing an address at index: $index.",[Xn0]:"Transaction has no expected signers therefore it cannot be encoded",[Vn0]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[do0]:"Transaction does not have a blockhash lifetime",[uo0]:"Transaction is not a durable nonce transaction",[io0]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[ao0]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[no0]:"No fee payer set in CompiledTransaction",[oo0]:"Could not find program address at index $index",[Yn0]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[Gn0]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[to0]:"Transaction is missing a fee payer.",[eo0]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[Jn0]:"Transaction first instruction is not advance nonce account instruction.",[$n0]:"Transaction with no instructions cannot be durable nonce transaction.",[lo0]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[po0]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[Wn0]:"The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",[so0]:"Transaction is missing signatures for addresses: $addresses.",[co0]:"Transaction version must be in the range [0, 127]. `$actualVersion` given",[qn0]:"This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 0.",[Kn0]:"The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction."},l8="i",iQ="t";function ps0($,J={}){let Q=ls0[$];if(Q.length===0)return"";let X;function W(G){if(X[iQ]===2){let V=Q.slice(X[l8]+1,G);Y.push(V in J?`${J[V]}`:`$${V}`)}else if(X[iQ]===1)Y.push(Q.slice(X[l8],G))}let Y=[];return Q.split("").forEach((G,V)=>{if(V===0){X={[l8]:0,[iQ]:Q[0]==="\\"?0:Q[0]==="$"?2:1};return}let q;switch(X[iQ]){case 0:q={[l8]:V,[iQ]:1};break;case 1:if(G==="\\")q={[l8]:V,[iQ]:0};else if(G==="$")q={[l8]:V,[iQ]:2};break;case 2:if(G==="\\")q={[l8]:V,[iQ]:0};else if(G==="$")q={[l8]:V,[iQ]:2};else if(!G.match(/\w/))q={[l8]:V,[iQ]:1};break}if(q){if(X!==q)W(V);X=q}}),W(),Y.join("")}function ds0($,J={}){return ps0($,J)}var HU=class extends Error{cause=this.cause;context;constructor(...[$,J]){let Q,X;if(J)Object.entries(Object.getOwnPropertyDescriptors(J)).forEach(([Y,G])=>{if(Y==="cause")X={cause:G.value};else{if(Q===void 0)Q={__code:$};Object.defineProperty(Q,Y,G)}});let W=ds0($,Q);super(W,X);this.context=Object.freeze(Q===void 0?{__code:$}:Q),this.name="SolanaError"}};var us0={accept:!0,"content-length":!0,"content-type":!0},cs0=Object.assign({"accept-charset":!0,"access-control-request-headers":!0,"access-control-request-method":!0,connection:!0,"content-length":!0,cookie:!0,date:!0,dnt:!0,expect:!0,host:!0,"keep-alive":!0,"permissions-policy":!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,via:!0},void 0,void 0);function is0($){let J=Object.keys($).filter((Q)=>{let X=Q.toLowerCase();return us0[Q.toLowerCase()]===!0||cs0[Q.toLowerCase()]===!0||X.startsWith("proxy-")||X.startsWith("sec-")});if(J.length>0)throw new HU(qU,{headers:J})}function as0($){let J={};for(let Q in $)J[Q.toLowerCase()]=$[Q];return J}function os0($){let{fromJson:J,headers:Q,toJson:X,url:W}=$;if(Q)is0(Q);let Y;if("dispatcher_NODE_ONLY"in $)Y={dispatcher:$.dispatcher_NODE_ONLY};let G=Q&&as0(Q);return async function({payload:q,signal:H}){let Z=X?X(q):JSON.stringify(q),M={...Y,body:Z,headers:{...G,accept:"application/json","content-length":Z.length.toString(),"content-type":"application/json; charset=utf-8"},method:"POST",signal:H},j=await fetch(W,M);if(!j.ok)throw new HU(KU,{headers:j.headers,message:j.statusText,statusCode:j.status});if(J)return J(await j.text(),q);return await j.json()}}var ns0=["getAccountInfo","getBalance","getBlock","getBlockCommitment","getBlockHeight","getBlockProduction","getBlocks","getBlocksWithLimit","getBlockTime","getClusterNodes","getEpochInfo","getEpochSchedule","getFeeForMessage","getFirstAvailableBlock","getGenesisHash","getHealth","getHighestSnapshotSlot","getIdentity","getInflationGovernor","getInflationRate","getInflationReward","getLargestAccounts","getLatestBlockhash","getLeaderSchedule","getMaxRetransmitSlot","getMaxShredInsertSlot","getMinimumBalanceForRentExemption","getMultipleAccounts","getProgramAccounts","getRecentPerformanceSamples","getRecentPrioritizationFees","getSignaturesForAddress","getSignatureStatuses","getSlot","getSlotLeader","getSlotLeaders","getStakeMinimumDelegation","getSupply","getTokenAccountBalance","getTokenAccountsByDelegate","getTokenAccountsByOwner","getTokenLargestAccounts","getTokenSupply","getTransaction","getTransactionCount","getVersion","getVoteAccounts","index","isBlockhashValid","minimumLedgerSlot","requestAirdrop","sendTransaction","simulateTransaction"];function R_($){return l4($)&&ns0.includes($.method)}function O_($){return os0({...$,fromJson:(J,Q)=>R_(Q)?m4(J):JSON.parse(J),toJson:(J)=>R_(J)?f4(J):JSON.stringify(J)})}import{setMaxListeners as ts0}from"events";var ss0=Object.prototype.toString,rs0=Object.keys||function($){let J=[];for(let Q in $)J.push(Q);return J};function SG($,J){let Q,X,W,Y,G,V,q;if($===!0)return"true";if($===!1)return"false";switch(typeof $){case"object":if($===null)return null;else if("toJSON"in $&&typeof $.toJSON==="function")return SG($.toJSON(),J);else if(q=ss0.call($),q==="[object Array]"){W="[",X=$.length-1;for(Q=0;Q<X;Q++)W+=SG($[Q],!0)+",";if(X>-1)W+=SG($[Q],!0);return W+"]"}else if(q==="[object Object]"){Y=rs0($).sort(),X=Y.length,W="",Q=0;while(Q<X){if(G=Y[Q],V=SG($[G],!1),V!==void 0){if(W)W+=",";W+=JSON.stringify(G)+":"+V}Q++}return"{"+W+"}"}else return JSON.stringify($);case"function":case"undefined":return J?null:void 0;case"bigint":return`${$.toString()}n`;case"string":return JSON.stringify($);default:return isFinite($)?$:null}}function i4($){let J=SG($,!1);if(J!==void 0)return""+J}function F_($,J,Q){let X="";if(typeof J[0]==="number"){let G=J[0]+1,V=G%10,q=G%100;if(V==1&&q!=11)X=G+"st";else if(V==2&&q!=12)X=G+"nd";else if(V==3&&q!=13)X=G+"rd";else X=G+"th"}else X=`\`${J[0].toString()}\``;let W=J.length>1?J.slice(1).map((G)=>typeof G==="number"?`[${G}]`:G).join("."):void 0,Y=new w_(VU,{argumentLabel:X,keyPath:J,methodName:$,optionalPathLabel:W?` at path \`${W}\``:"",value:Q,...W!==void 0?{path:W}:void 0});return P_(Y,F_),Y}var es0={defaultCommitment:"confirmed",onIntegerOverflow($,J,Q){throw F_($.methodName,J,Q)}},$r0=class extends globalThis.AbortController{constructor(...$){super(...$),ts0(Number.MAX_SAFE_INTEGER,this.signal)}},N_;function __(){return{EXPLICIT_ABORT_TOKEN:"This object is thrown from the request that underlies a series of coalesced requests when the last request in that series aborts"}}function Jr0($,J){let Q;return async function(W){let{payload:Y,signal:G}=W,V=J(Y);if(V===void 0)return await $(W);if(!Q)queueMicrotask(()=>{Q=void 0}),Q={};if(Q[V]==null){let H=new $r0,Z=(async()=>{try{return await $({...W,signal:H.signal})}catch(M){if(M===(N_||=__()))return;throw M}})();Q[V]={abortController:H,numConsumers:0,responsePromise:Z}}let q=Q[V];if(q.numConsumers++,G){let H=q.responsePromise;return await new Promise((Z,M)=>{let j=(R)=>{G.removeEventListener("abort",j),q.numConsumers-=1,queueMicrotask(()=>{if(q.numConsumers===0)q.abortController.abort(N_||=__())}),M(R.target.reason)};G.addEventListener("abort",j),H.then(Z).catch(M).finally(()=>{G.removeEventListener("abort",j)})})}else return await q.responsePromise}}function Qr0($){return l4($)?i4([$.method,$.params]):void 0}function Xr0($){let J={};for(let Q in $)J[Q.toLowerCase()]=$[Q];return J}function Wr0($){return UJ(O_({...$,headers:{...{"accept-encoding":"br,gzip,deflate"},...$.headers?Xr0($.headers):void 0,...{"solana-client":"js/5.5.1"}}}),(J)=>Jr0(J,Qr0))}function DU($,J){return Yr0(Wr0({url:$,...J}))}function Yr0($){return yN({api:L_(es0),transport:$})}var Gr0=1,Vr0=2,qr0=3,Kr0=4,Hr0=5,Dr0=6,Ur0=7,Zr0=8,zr0=9,S_=10,B_=-32700,C_=-32603,I_=-32602,k_=-32601,T_=-32600,jr0=-32019,Mr0=-32018,Lr0=-32017,wr0=-32016,A_=-32015,E_=-32014,Pr0=-32013,h_=-32012,Rr0=-32011,x_=-32010,v_=-32009,Or0=-32008,b_=-32007,y_=-32006,Nr0=-32005,g_=-32004,_r0=-32003,UU=-32002,m_=-32001,Fr0=2800000,Sr0=2800001,Br0=2800002,Cr0=2800003,Ir0=2800004,kr0=2800005,Tr0=2800006,Ar0=2800007,Er0=2800008,hr0=2800009,xr0=2800010,vr0=2800011,br0=3230000,yr0=32300001,gr0=3230002,mr0=3230003,fr0=3230004,lr0=3610000,pr0=3610001,dr0=3610002,ur0=3610003,cr0=3610004,ir0=3610005,ar0=3610006,or0=3610007,nr0=3611000,sr0=3704000,rr0=3704001,tr0=3704002,er0=3704003,$t0=3704004,Jt0=4128000,Qt0=4128001,Xt0=4128002,f_=4615000,Wt0=4615001,Yt0=4615002,Gt0=4615003,Vt0=4615004,qt0=4615005,Kt0=4615006,Ht0=4615007,Dt0=4615008,Ut0=4615009,Zt0=4615010,zt0=4615011,jt0=4615012,Mt0=4615013,Lt0=4615014,wt0=4615015,Pt0=4615016,Rt0=4615017,Ot0=4615018,Nt0=4615019,_t0=4615020,Ft0=4615021,St0=4615022,Bt0=4615023,Ct0=4615024,It0=4615025,l_=4615026,kt0=4615027,Tt0=4615028,At0=4615029,Et0=4615030,ht0=4615031,xt0=4615032,vt0=4615033,bt0=4615034,yt0=4615035,gt0=4615036,mt0=4615037,ft0=4615038,lt0=4615039,pt0=4615040,dt0=4615041,ut0=4615042,ct0=4615043,it0=4615044,at0=4615045,ot0=4615046,nt0=4615047,st0=4615048,rt0=4615049,tt0=4615050,et0=4615051,$e0=4615052,Je0=4615053,Qe0=4615054,Xe0=5508000,We0=5508001,Ye0=5508002,Ge0=5508003,Ve0=5508004,qe0=5508005,Ke0=5508006,He0=5508007,De0=5508008,Ue0=5508009,Ze0=5508010,ze0=5508011,je0=5607000,Me0=5607001,Le0=5607002,we0=5607003,Pe0=5607004,Re0=5607005,Oe0=5607006,Ne0=5607007,_e0=5607008,Fe0=5607009,Se0=5607010,Be0=5607011,Ce0=5607012,Ie0=5607013,ke0=5607014,Te0=5607015,Ae0=5607016,Ee0=5607017,he0=5663000,xe0=5663001,ve0=5663002,be0=5663003,ye0=5663004,ge0=5663005,me0=5663006,fe0=5663007,le0=5663008,pe0=5663009,de0=5663010,ue0=5663011,ce0=5663012,ie0=5663013,ae0=5663014,oe0=5663015,ne0=5663016,se0=5663017,re0=5663018,te0=5663019,ee0=5663020,$09=5663021,J09=5663022,p_=7050000,Q09=7050001,X09=7050002,W09=7050003,Y09=7050004,G09=7050005,V09=7050006,q09=7050007,K09=7050008,H09=7050009,D09=7050010,U09=7050011,Z09=7050012,z09=7050013,j09=7050014,M09=7050015,L09=7050016,w09=7050017,P09=7050018,R09=7050019,O09=7050020,N09=7050021,_09=7050022,F09=7050023,S09=7050024,B09=7050025,C09=7050026,I09=7050027,k09=7050028,T09=7050029,d_=7050030,u_=7050031,A09=7050032,E09=7050033,h09=7050034,c_=7050035,x09=7050036,v09=7618000,b09=7618001,y09=7618002,g09=7618003,m09=7618004,f09=7618005,l09=7618006,p09=7618007,d09=7618008,u09=7618009,c09=8078000,i09=8078001,a09=8078002,o09=8078003,n09=8078004,s09=8078005,r09=8078006,t09=8078007,e09=8078008,$99=8078009,J99=8078010,Q99=8078011,X99=8078012,W99=8078013,Y99=8078014,G99=8078015,V99=8078016,q99=8078017,K99=8078018,H99=8078019,D99=8078020,U99=8078021,Z99=8078022,z99=8078023,j99=8100000,M99=8100001,L99=8100002,w99=8100003,ZU=8190000,zU=8190001,P99=8190002,R99=8190003,O99=8190004,N99=9900000,_99=9900001,F99=9900002,S99=9900003,jU=9900004,B99=9900005,C99=9900006;var I99={[br0]:"Account not found at address: $address",[fr0]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[mr0]:"Expected decoded account at address: $address",[gr0]:"Failed to decode account data at address: $address",[yr0]:"Accounts not found at addresses: $addresses",[hr0]:"Unable to find a viable program address bump seed.",[Br0]:"$putativeAddress is not a base58-encoded address.",[Fr0]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[Cr0]:"The `CryptoKey` must be an `Ed25519` public key.",[vr0]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[Er0]:"Invalid seeds; point must fall off the Ed25519 curve.",[Ir0]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[Tr0]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[Ar0]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[kr0]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[xr0]:"Program address cannot end with PDA marker.",[Sr0]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[Kr0]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[Gr0]:"The network has progressed past the last block for which this transaction could have been committed.",[c09]:"Codec [$codecDescription] cannot decode empty byte arrays.",[Z99]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[D99]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[s09]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[r09]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[n09]:"Encoder and decoder must either both be fixed-size or variable-size.",[e09]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[a09]:"Expected a fixed-size codec, got a variable-size one.",[W99]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[o09]:"Expected a variable-size codec, got a fixed-size one.",[H99]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[i09]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[K99]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[$99]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[J99]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[G99]:"Invalid literal union variant. Expected one of [$variants], got $value.",[t09]:"Expected [$codecDescription] to have $expected items, got $actual.",[X99]:"Invalid value $value for base $base with alphabet $alphabet.",[V99]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[Q99]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[Y99]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[U99]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[q99]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[z99]:"This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",[nr0]:"No random values implementation could be found.",[Ut0]:"instruction requires an uninitialized account",[Bt0]:"instruction tries to borrow reference for an account which is already borrowed",[Ct0]:"instruction left account with an outstanding borrowed reference",[Ft0]:"program other than the account's owner changed the size of the account data",[qt0]:"account data too small for instruction",[St0]:"instruction expected an executable account",[ot0]:"An account does not have enough lamports to be rent-exempt",[st0]:"Program arithmetic overflowed",[at0]:"Failed to serialize or deserialize account data: $encodedData",[Qe0]:"Builtin programs must consume compute units",[xt0]:"Cross-program invocation call depth too deep",[ft0]:"Computational budget exceeded",[l_]:"custom program error: #$code",[Rt0]:"instruction contains duplicate accounts",[It0]:"instruction modifications of multiply-passed account differ",[Et0]:"executable accounts must be rent exempt",[Tt0]:"instruction changed executable accounts data",[At0]:"instruction changed the balance of an executable account",[Ot0]:"instruction changed executable bit of an account",[Lt0]:"instruction modified data of an account it does not own",[Mt0]:"instruction spent from the balance of an account it does not own",[Wt0]:"generic instruction error",[tt0]:"Provided owner is not allowed",[ct0]:"Account is immutable",[it0]:"Incorrect authority provided",[Ht0]:"incorrect program id for instruction",[Kt0]:"insufficient funds for instruction",[Vt0]:"invalid account data for instruction",[nt0]:"Invalid account owner",[Yt0]:"invalid program argument",[kt0]:"program returned invalid error code",[Gt0]:"invalid instruction data",[mt0]:"Failed to reallocate account data",[gt0]:"Provided seeds do not result in a valid address",[et0]:"Accounts data allocations exceeded the maximum allowed per transaction",[$e0]:"Max accounts exceeded",[Je0]:"Max instruction trace length exceeded",[yt0]:"Length of the seed is too long for address generation",[vt0]:"An account required by the instruction is missing",[Dt0]:"missing required signature for instruction",[jt0]:"instruction illegally modified the program id of an account",[_t0]:"insufficient account keys for instruction",[lt0]:"Cross-program invocation with unauthorized signer or writable account",[pt0]:"Failed to create program execution environment",[ut0]:"Program failed to compile",[dt0]:"Program failed to complete",[Pt0]:"instruction modified data of a read-only account",[wt0]:"instruction changed the balance of a read-only account",[bt0]:"Cross-program invocation reentrancy not allowed for this instruction",[Nt0]:"instruction modified rent epoch of an account",[zt0]:"sum of account balances before and after instruction do not match",[Zt0]:"instruction requires an initialized account",[f_]:"",[ht0]:"Unsupported program id",[rt0]:"Unsupported sysvar",[B99]:"Invalid instruction plan kind: $kind.",[y09]:"The provided instruction plan is empty.",[f09]:"No failed transaction plan result was found in the provided transaction plan result.",[m09]:"This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved \u2014 e.g. by targetting RPCs that support transaction bundles.",[g09]:"The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",[v09]:"The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",[C99]:"Invalid transaction plan kind: $kind.",[b09]:"No more instructions to pack; the message packer has completed the instruction plan.",[l09]:"Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",[p09]:"Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",[d09]:"Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",[u09]:"Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",[Jt0]:"The instruction does not have any accounts.",[Qt0]:"The instruction does not have any data.",[Xt0]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[Hr0]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[Vr0]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[F99]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[jU]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[_99]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[N99]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[S99]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[C_]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[I_]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[T_]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[k_]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[B_]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[h_]:"$__serverMessage",[m_]:"$__serverMessage",[g_]:"$__serverMessage",[E_]:"$__serverMessage",[Lr0]:"Epoch rewards period still active at slot $slot",[x_]:"$__serverMessage",[v_]:"$__serverMessage",[jr0]:"Failed to query long-term storage; please try again",[wr0]:"Minimum context slot has not been reached",[Nr0]:"Node is unhealthy; behind by $numSlotsBehind slots",[Or0]:"No snapshot",[UU]:"Transaction simulation failed",[Mr0]:"Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",[b_]:"$__serverMessage",[Rr0]:"Transaction history is not available from this node",[y_]:"$__serverMessage",[Pr0]:"Transaction signature length mismatch",[_r0]:"Transaction signature verification failure",[A_]:"$__serverMessage",[sr0]:"Key pair bytes must be of length 64, got $byteLength.",[rr0]:"Expected private key bytes with length 32. Actual length: $actualLength.",[tr0]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[$t0]:"The provided private key does not match the provided public key.",[er0]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[Dr0]:"Lamports value must be in the range [0, 2e64-1]",[Ur0]:"`$value` cannot be parsed as a `BigInt`",[S_]:"$message",[Zr0]:"`$value` cannot be parsed as a `Number`",[qr0]:"No nonce account could be found at address `$nonceAccountAddress`",[we0]:"Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",[Ie0]:"Attempted to sign an offchain message with an address that is not a signer for it",[Le0]:"Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",[Ce0]:"The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",[je0]:"The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",[Ne0]:"Expected message format $expectedMessageFormat, got $actualMessageFormat",[_e0]:"The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",[Fe0]:"Offchain message content must be non-empty",[Re0]:"Offchain message must specify the address of at least one required signer",[Se0]:"Offchain message envelope must reserve space for at least one signature",[Pe0]:"The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",[Te0]:"The signatories of this offchain message must be listed in lexicographical order",[Ae0]:"An address must be listed no more than once among the signatories of an offchain message",[Be0]:"Offchain message is missing signatures for addresses: $addresses.",[Ee0]:"Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",[Me0]:"The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",[ke0]:"Expected offchain message version $expectedVersion. Got $actualVersion.",[Oe0]:"This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",[ZU]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[P99]:"WebSocket was closed before payload could be added to the send buffer",[R99]:"WebSocket connection closed",[O99]:"WebSocket failed to connect",[zU]:"Failed to obtain a subscription id from the server",[w99]:"Could not find an API plan for RPC method: `$method`",[j99]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[L99]:"HTTP error ($statusCode): $message",[M99]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[Xe0]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[We0]:"The provided value does not implement the `KeyPairSigner` interface",[Ge0]:"The provided value does not implement the `MessageModifyingSigner` interface",[Ve0]:"The provided value does not implement the `MessagePartialSigner` interface",[Ye0]:"The provided value does not implement any of the `MessageSigner` interfaces",[Ke0]:"The provided value does not implement the `TransactionModifyingSigner` interface",[He0]:"The provided value does not implement the `TransactionPartialSigner` interface",[De0]:"The provided value does not implement the `TransactionSendingSigner` interface",[qe0]:"The provided value does not implement any of the `TransactionSigner` interfaces",[Ue0]:"More than one `TransactionSendingSigner` was identified.",[Ze0]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[ze0]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[or0]:"Cannot export a non-extractable key.",[pr0]:"No digest implementation could be found.",[lr0]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[dr0]:`This runtime does not support the generation of Ed25519 key pairs.
|
|
86
|
+
|
|
87
|
+
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
88
|
+
|
|
89
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[ur0]:"No signature verification implementation could be found.",[cr0]:"No key generation implementation could be found.",[ir0]:"No signing implementation could be found.",[ar0]:"No key export implementation could be found.",[zr0]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[L09]:"Transaction processing left an account with an outstanding borrowed reference",[Q09]:"Account in use",[X09]:"Account loaded twice",[W09]:"Attempt to debit an account but found no record of a prior credit.",[F09]:"Transaction loads an address table account that doesn't exist",[q09]:"This transaction has already been processed",[K09]:"Blockhash not found",[H09]:"Loader call chain is too deep",[M09]:"Transactions are currently disabled due to cluster maintenance",[d_]:"Transaction contains a duplicate instruction ($index) that is not allowed",[G09]:"Insufficient funds for fee",[u_]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[V09]:"This account may not be used to pay transaction fees",[U09]:"Transaction contains an invalid account reference",[B09]:"Transaction loads an address table account with invalid data",[C09]:"Transaction address table lookup uses an invalid index",[S09]:"Transaction loads an address table account with an invalid owner",[E09]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[z09]:"This program may not be used for executing instructions",[I09]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[R09]:"Transaction loads a writable account that cannot be written",[A09]:"Transaction exceeded max loaded accounts data size cap",[D09]:"Transaction requires a fee but has no signature present",[Y09]:"Attempt to load a program that does not exist",[c_]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[h09]:"ResanitizationNeeded",[j09]:"Transaction failed to sanitize accounts offsets correctly",[Z09]:"Transaction did not pass signature verification",[_09]:"Transaction locked too many accounts",[x09]:"Sum of account balances before and after transaction do not match",[p_]:"The transaction failed with the error `$errorName`",[P09]:"Transaction version is unsupported",[N09]:"Transaction would exceed account data limit within the block",[T09]:"Transaction would exceed total account data limit",[O09]:"Transaction would exceed max account limit within the block",[w09]:"Transaction would exceed max Block Cost Limit",[k09]:"Transaction would exceed max Vote Cost Limit",[oe0]:"Attempted to sign a transaction with an address that is not a signer for it",[de0]:"Transaction is missing an address at index: $index.",[ne0]:"Transaction has no expected signers therefore it cannot be encoded",[ee0]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[ve0]:"Transaction does not have a blockhash lifetime",[be0]:"Transaction is not a durable nonce transaction",[ge0]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[me0]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[le0]:"No fee payer set in CompiledTransaction",[fe0]:"Could not find program address at index $index",[re0]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[te0]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[ue0]:"Transaction is missing a fee payer.",[ce0]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[ae0]:"Transaction first instruction is not advance nonce account instruction.",[ie0]:"Transaction with no instructions cannot be durable nonce transaction.",[he0]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[xe0]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[se0]:"The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",[pe0]:"Transaction is missing signatures for addresses: $addresses.",[ye0]:"Transaction version must be in the range [0, 127]. `$actualVersion` given",[$09]:"This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 0.",[J09]:"The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction."},p8="i",aQ="t";function k99($,J={}){let Q=I99[$];if(Q.length===0)return"";let X;function W(G){if(X[aQ]===2){let V=Q.slice(X[p8]+1,G);Y.push(V in J?`${J[V]}`:`$${V}`)}else if(X[aQ]===1)Y.push(Q.slice(X[p8],G))}let Y=[];return Q.split("").forEach((G,V)=>{if(V===0){X={[p8]:0,[aQ]:Q[0]==="\\"?0:Q[0]==="$"?2:1};return}let q;switch(X[aQ]){case 0:q={[p8]:V,[aQ]:1};break;case 1:if(G==="\\")q={[p8]:V,[aQ]:0};else if(G==="$")q={[p8]:V,[aQ]:2};break;case 2:if(G==="\\")q={[p8]:V,[aQ]:0};else if(G==="$")q={[p8]:V,[aQ]:2};else if(!G.match(/\w/))q={[p8]:V,[aQ]:1};break}if(q){if(X!==q)W(V);X=q}}),W(),Y.join("")}function T99($,J={}){return k99($,J)}var SX=class extends Error{cause=this.cause;context;constructor(...[$,J]){let Q,X;if(J)Object.entries(Object.getOwnPropertyDescriptors(J)).forEach(([Y,G])=>{if(Y==="cause")X={cause:G.value};else{if(Q===void 0)Q={__code:$};Object.defineProperty(Q,Y,G)}});let W=T99($,Q);super(W,X);this.context=Object.freeze(Q===void 0?{__code:$}:Q),this.name="SolanaError"}};function i_(...$){if("captureStackTrace"in Error&&typeof Error.captureStackTrace==="function")Error.captureStackTrace(...$)}function a_({errorCodeBaseOffset:$,getErrorContext:J,orderedErrorNames:Q,rpcEnumError:X},W){let Y,G;if(typeof X==="string")Y=X;else Y=Object.keys(X)[0],G=X[Y];let V=Q.indexOf(Y),q=$+V,H=J(q,Y,G),Z=new SX(q,H);return i_(Z,W),Z}var A99=["GenericError","InvalidArgument","InvalidInstructionData","InvalidAccountData","AccountDataTooSmall","InsufficientFunds","IncorrectProgramId","MissingRequiredSignature","AccountAlreadyInitialized","UninitializedAccount","UnbalancedInstruction","ModifiedProgramId","ExternalAccountLamportSpend","ExternalAccountDataModified","ReadonlyLamportChange","ReadonlyDataModified","DuplicateAccountIndex","ExecutableModified","RentEpochModified","NotEnoughAccountKeys","AccountDataSizeChanged","AccountNotExecutable","AccountBorrowFailed","AccountBorrowOutstanding","DuplicateAccountOutOfSync","Custom","InvalidError","ExecutableDataModified","ExecutableLamportChange","ExecutableAccountNotRentExempt","UnsupportedProgramId","CallDepth","MissingAccount","ReentrancyNotAllowed","MaxSeedLengthExceeded","InvalidSeeds","InvalidRealloc","ComputationalBudgetExceeded","PrivilegeEscalation","ProgramEnvironmentSetupFailure","ProgramFailedToComplete","ProgramFailedToCompile","Immutable","IncorrectAuthority","BorshIoError","AccountNotRentExempt","InvalidAccountOwner","ArithmeticOverflow","UnsupportedSysvar","IllegalOwner","MaxAccountsDataAllocationsExceeded","MaxAccountsExceeded","MaxInstructionTraceLengthExceeded","BuiltinProgramsMustConsumeComputeUnits"];function o_($,J){let Q=Number($);return a_({errorCodeBaseOffset:4615001,getErrorContext(X,W,Y){if(X===f_)return{errorName:W,index:Q,...Y!==void 0?{instructionErrorContext:Y}:null};else if(X===l_)return{code:Number(Y),index:Q};return{index:Q}},orderedErrorNames:A99,rpcEnumError:J},o_)}var E99=["AccountInUse","AccountLoadedTwice","AccountNotFound","ProgramAccountNotFound","InsufficientFundsForFee","InvalidAccountForFee","AlreadyProcessed","BlockhashNotFound","CallChainTooDeep","MissingSignatureForFee","InvalidAccountIndex","SignatureFailure","InvalidProgramForExecution","SanitizeFailure","ClusterMaintenance","AccountBorrowOutstanding","WouldExceedMaxBlockCostLimit","UnsupportedVersion","InvalidWritableAccount","WouldExceedMaxAccountCostLimit","WouldExceedAccountDataBlockLimit","TooManyAccountLocks","AddressLookupTableNotFound","InvalidAddressLookupTableOwner","InvalidAddressLookupTableData","InvalidAddressLookupTableIndex","InvalidRentPayingAccount","WouldExceedMaxVoteCostLimit","WouldExceedAccountDataTotalLimit","DuplicateInstruction","InsufficientFundsForRent","MaxLoadedAccountsDataSizeExceeded","InvalidLoadedAccountsDataSizeLimit","ResanitizationNeeded","ProgramExecutionTemporarilyRestricted","UnbalancedTransaction"];function n_($){if(typeof $==="object"&&"InstructionError"in $)return o_(...$.InstructionError);return a_({errorCodeBaseOffset:7050001,getErrorContext(J,Q,X){if(J===p_)return{errorName:Q,...X!==void 0?{transactionErrorContext:X}:null};else if(J===d_)return{index:Number(X)};else if(J===u_||J===c_)return{accountIndex:Number(X.account_index)}},orderedErrorNames:E99,rpcEnumError:$},n_)}function MU($){let J;if(h99($)){let{code:Q,data:X,message:W}=$,Y=Number(Q);if(Y===UU){let{err:G,...V}=X,q=G?{cause:n_(G)}:null;J=new SX(UU,{...V,...q})}else{let G;switch(Y){case C_:case I_:case T_:case k_:case B_:case h_:case m_:case g_:case E_:case x_:case v_:case b_:case y_:case A_:G={__serverMessage:W};break;default:if(typeof X==="object"&&!Array.isArray(X))G=X}J=new SX(Y,G)}}else{let Q=typeof $==="object"&&$!==null&&"message"in $&&typeof $.message==="string"?$.message:"Malformed JSON-RPC error with no message attribute";J=new SX(S_,{error:$,message:Q})}return i_(J,MU),J}function h99($){return typeof $==="object"&&$!==null&&"code"in $&&"message"in $&&(typeof $.code==="number"||typeof $.code==="bigint")&&typeof $.message==="string"}var x99=1,v99=2,b99=3,y99=4,g99=5,m99=6,f99=7,l99=8,p99=9,d99=10,u99=-32700,c99=-32603,i99=-32602,a99=-32601,o99=-32600,n99=-32019,s99=-32018,r99=-32017,t99=-32016,e99=-32015,$$9=-32014,J$9=-32013,Q$9=-32012,X$9=-32011,W$9=-32010,Y$9=-32009,G$9=-32008,V$9=-32007,q$9=-32006,K$9=-32005,H$9=-32004,D$9=-32003,U$9=-32002,Z$9=-32001,z$9=2800000,j$9=2800001,M$9=2800002,L$9=2800003,w$9=2800004,P$9=2800005,R$9=2800006,O$9=2800007,N$9=2800008,_$9=2800009,F$9=2800010,S$9=2800011,B$9=3230000,C$9=32300001,I$9=3230002,k$9=3230003,T$9=3230004,A$9=3610000,E$9=3610001,h$9=3610002,x$9=3610003,v$9=3610004,b$9=3610005,y$9=3610006,g$9=3610007,m$9=3611000,f$9=3704000,l$9=3704001,p$9=3704002,d$9=3704003,u$9=3704004,c$9=4128000,i$9=4128001,a$9=4128002,o$9=4615000,n$9=4615001,s$9=4615002,r$9=4615003,t$9=4615004,e$9=4615005,$J9=4615006,JJ9=4615007,QJ9=4615008,XJ9=4615009,WJ9=4615010,YJ9=4615011,GJ9=4615012,VJ9=4615013,qJ9=4615014,KJ9=4615015,HJ9=4615016,DJ9=4615017,UJ9=4615018,ZJ9=4615019,zJ9=4615020,jJ9=4615021,MJ9=4615022,LJ9=4615023,wJ9=4615024,PJ9=4615025,RJ9=4615026,OJ9=4615027,NJ9=4615028,_J9=4615029,FJ9=4615030,SJ9=4615031,BJ9=4615032,CJ9=4615033,IJ9=4615034,kJ9=4615035,TJ9=4615036,AJ9=4615037,EJ9=4615038,hJ9=4615039,xJ9=4615040,vJ9=4615041,bJ9=4615042,yJ9=4615043,gJ9=4615044,mJ9=4615045,fJ9=4615046,lJ9=4615047,pJ9=4615048,dJ9=4615049,uJ9=4615050,cJ9=4615051,iJ9=4615052,aJ9=4615053,oJ9=4615054,nJ9=5508000,sJ9=5508001,rJ9=5508002,tJ9=5508003,eJ9=5508004,$Q9=5508005,JQ9=5508006,QQ9=5508007,XQ9=5508008,WQ9=5508009,YQ9=5508010,GQ9=5508011,VQ9=5607000,qQ9=5607001,KQ9=5607002,HQ9=5607003,DQ9=5607004,UQ9=5607005,ZQ9=5607006,zQ9=5607007,jQ9=5607008,MQ9=5607009,LQ9=5607010,wQ9=5607011,PQ9=5607012,RQ9=5607013,OQ9=5607014,NQ9=5607015,_Q9=5607016,FQ9=5607017,SQ9=5663000,BQ9=5663001,CQ9=5663002,IQ9=5663003,kQ9=5663004,TQ9=5663005,AQ9=5663006,EQ9=5663007,hQ9=5663008,xQ9=5663009,vQ9=5663010,bQ9=5663011,yQ9=5663012,gQ9=5663013,mQ9=5663014,fQ9=5663015,lQ9=5663016,pQ9=5663017,dQ9=5663018,uQ9=5663019,cQ9=5663020,iQ9=5663021,aQ9=5663022,oQ9=7050000,nQ9=7050001,sQ9=7050002,rQ9=7050003,tQ9=7050004,eQ9=7050005,$89=7050006,J89=7050007,Q89=7050008,X89=7050009,W89=7050010,Y89=7050011,G89=7050012,V89=7050013,q89=7050014,K89=7050015,H89=7050016,D89=7050017,U89=7050018,Z89=7050019,z89=7050020,j89=7050021,M89=7050022,L89=7050023,w89=7050024,P89=7050025,R89=7050026,O89=7050027,N89=7050028,_89=7050029,F89=7050030,S89=7050031,B89=7050032,C89=7050033,I89=7050034,k89=7050035,T89=7050036,A89=7618000,E89=7618001,h89=7618002,x89=7618003,v89=7618004,b89=7618005,y89=7618006,g89=7618007,m89=7618008,f89=7618009,l89=8078000,p89=8078001,d89=8078002,u89=8078003,c89=8078004,i89=8078005,a89=8078006,o89=8078007,n89=8078008,s89=8078009,r89=8078010,t89=8078011,e89=8078012,$X9=8078013,JX9=8078014,QX9=8078015,XX9=8078016,WX9=8078017,YX9=8078018,GX9=8078019,VX9=8078020,qX9=8078021,KX9=8078022,HX9=8078023,DX9=8100000,UX9=8100001,ZX9=8100002,zX9=8100003,jX9=8190000,MX9=8190001,LX9=8190002,wX9=8190003,PX9=8190004,LU=9900000,wU=9900001,RX9=9900002,OX9=9900003,NX9=9900004,_X9=9900005,FX9=9900006;var SX9={[B$9]:"Account not found at address: $address",[T$9]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[k$9]:"Expected decoded account at address: $address",[I$9]:"Failed to decode account data at address: $address",[C$9]:"Accounts not found at addresses: $addresses",[_$9]:"Unable to find a viable program address bump seed.",[M$9]:"$putativeAddress is not a base58-encoded address.",[z$9]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[L$9]:"The `CryptoKey` must be an `Ed25519` public key.",[S$9]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[N$9]:"Invalid seeds; point must fall off the Ed25519 curve.",[w$9]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[R$9]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[O$9]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[P$9]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[F$9]:"Program address cannot end with PDA marker.",[j$9]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[y99]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[x99]:"The network has progressed past the last block for which this transaction could have been committed.",[l89]:"Codec [$codecDescription] cannot decode empty byte arrays.",[KX9]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[VX9]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[i89]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[a89]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[c89]:"Encoder and decoder must either both be fixed-size or variable-size.",[n89]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[d89]:"Expected a fixed-size codec, got a variable-size one.",[$X9]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[u89]:"Expected a variable-size codec, got a fixed-size one.",[GX9]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[p89]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[YX9]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[s89]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[r89]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[QX9]:"Invalid literal union variant. Expected one of [$variants], got $value.",[o89]:"Expected [$codecDescription] to have $expected items, got $actual.",[e89]:"Invalid value $value for base $base with alphabet $alphabet.",[XX9]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[t89]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[JX9]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[qX9]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[WX9]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[HX9]:"This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",[m$9]:"No random values implementation could be found.",[XJ9]:"instruction requires an uninitialized account",[LJ9]:"instruction tries to borrow reference for an account which is already borrowed",[wJ9]:"instruction left account with an outstanding borrowed reference",[jJ9]:"program other than the account's owner changed the size of the account data",[e$9]:"account data too small for instruction",[MJ9]:"instruction expected an executable account",[fJ9]:"An account does not have enough lamports to be rent-exempt",[pJ9]:"Program arithmetic overflowed",[mJ9]:"Failed to serialize or deserialize account data: $encodedData",[oJ9]:"Builtin programs must consume compute units",[BJ9]:"Cross-program invocation call depth too deep",[EJ9]:"Computational budget exceeded",[RJ9]:"custom program error: #$code",[DJ9]:"instruction contains duplicate accounts",[PJ9]:"instruction modifications of multiply-passed account differ",[FJ9]:"executable accounts must be rent exempt",[NJ9]:"instruction changed executable accounts data",[_J9]:"instruction changed the balance of an executable account",[UJ9]:"instruction changed executable bit of an account",[qJ9]:"instruction modified data of an account it does not own",[VJ9]:"instruction spent from the balance of an account it does not own",[n$9]:"generic instruction error",[uJ9]:"Provided owner is not allowed",[yJ9]:"Account is immutable",[gJ9]:"Incorrect authority provided",[JJ9]:"incorrect program id for instruction",[$J9]:"insufficient funds for instruction",[t$9]:"invalid account data for instruction",[lJ9]:"Invalid account owner",[s$9]:"invalid program argument",[OJ9]:"program returned invalid error code",[r$9]:"invalid instruction data",[AJ9]:"Failed to reallocate account data",[TJ9]:"Provided seeds do not result in a valid address",[cJ9]:"Accounts data allocations exceeded the maximum allowed per transaction",[iJ9]:"Max accounts exceeded",[aJ9]:"Max instruction trace length exceeded",[kJ9]:"Length of the seed is too long for address generation",[CJ9]:"An account required by the instruction is missing",[QJ9]:"missing required signature for instruction",[GJ9]:"instruction illegally modified the program id of an account",[zJ9]:"insufficient account keys for instruction",[hJ9]:"Cross-program invocation with unauthorized signer or writable account",[xJ9]:"Failed to create program execution environment",[bJ9]:"Program failed to compile",[vJ9]:"Program failed to complete",[HJ9]:"instruction modified data of a read-only account",[KJ9]:"instruction changed the balance of a read-only account",[IJ9]:"Cross-program invocation reentrancy not allowed for this instruction",[ZJ9]:"instruction modified rent epoch of an account",[YJ9]:"sum of account balances before and after instruction do not match",[WJ9]:"instruction requires an initialized account",[o$9]:"",[SJ9]:"Unsupported program id",[dJ9]:"Unsupported sysvar",[_X9]:"Invalid instruction plan kind: $kind.",[h89]:"The provided instruction plan is empty.",[b89]:"No failed transaction plan result was found in the provided transaction plan result.",[v89]:"This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved \u2014 e.g. by targetting RPCs that support transaction bundles.",[x89]:"The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",[A89]:"The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",[FX9]:"Invalid transaction plan kind: $kind.",[E89]:"No more instructions to pack; the message packer has completed the instruction plan.",[y89]:"Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",[g89]:"Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",[m89]:"Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",[f89]:"Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",[c$9]:"The instruction does not have any accounts.",[i$9]:"The instruction does not have any data.",[a$9]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[g99]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[v99]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[RX9]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[NX9]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[wU]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[LU]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[OX9]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[c99]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[i99]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[o99]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[a99]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[u99]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[Q$9]:"$__serverMessage",[Z$9]:"$__serverMessage",[H$9]:"$__serverMessage",[$$9]:"$__serverMessage",[r99]:"Epoch rewards period still active at slot $slot",[W$9]:"$__serverMessage",[Y$9]:"$__serverMessage",[n99]:"Failed to query long-term storage; please try again",[t99]:"Minimum context slot has not been reached",[K$9]:"Node is unhealthy; behind by $numSlotsBehind slots",[G$9]:"No snapshot",[U$9]:"Transaction simulation failed",[s99]:"Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",[V$9]:"$__serverMessage",[X$9]:"Transaction history is not available from this node",[q$9]:"$__serverMessage",[J$9]:"Transaction signature length mismatch",[D$9]:"Transaction signature verification failure",[e99]:"$__serverMessage",[f$9]:"Key pair bytes must be of length 64, got $byteLength.",[l$9]:"Expected private key bytes with length 32. Actual length: $actualLength.",[p$9]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[u$9]:"The provided private key does not match the provided public key.",[d$9]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[m99]:"Lamports value must be in the range [0, 2e64-1]",[f99]:"`$value` cannot be parsed as a `BigInt`",[d99]:"$message",[l99]:"`$value` cannot be parsed as a `Number`",[b99]:"No nonce account could be found at address `$nonceAccountAddress`",[HQ9]:"Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",[RQ9]:"Attempted to sign an offchain message with an address that is not a signer for it",[KQ9]:"Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",[PQ9]:"The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",[VQ9]:"The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",[zQ9]:"Expected message format $expectedMessageFormat, got $actualMessageFormat",[jQ9]:"The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",[MQ9]:"Offchain message content must be non-empty",[UQ9]:"Offchain message must specify the address of at least one required signer",[LQ9]:"Offchain message envelope must reserve space for at least one signature",[DQ9]:"The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",[NQ9]:"The signatories of this offchain message must be listed in lexicographical order",[_Q9]:"An address must be listed no more than once among the signatories of an offchain message",[wQ9]:"Offchain message is missing signatures for addresses: $addresses.",[FQ9]:"Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",[qQ9]:"The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",[OQ9]:"Expected offchain message version $expectedVersion. Got $actualVersion.",[ZQ9]:"This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",[jX9]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[LX9]:"WebSocket was closed before payload could be added to the send buffer",[wX9]:"WebSocket connection closed",[PX9]:"WebSocket failed to connect",[MX9]:"Failed to obtain a subscription id from the server",[zX9]:"Could not find an API plan for RPC method: `$method`",[DX9]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[ZX9]:"HTTP error ($statusCode): $message",[UX9]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[nJ9]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[sJ9]:"The provided value does not implement the `KeyPairSigner` interface",[tJ9]:"The provided value does not implement the `MessageModifyingSigner` interface",[eJ9]:"The provided value does not implement the `MessagePartialSigner` interface",[rJ9]:"The provided value does not implement any of the `MessageSigner` interfaces",[JQ9]:"The provided value does not implement the `TransactionModifyingSigner` interface",[QQ9]:"The provided value does not implement the `TransactionPartialSigner` interface",[XQ9]:"The provided value does not implement the `TransactionSendingSigner` interface",[$Q9]:"The provided value does not implement any of the `TransactionSigner` interfaces",[WQ9]:"More than one `TransactionSendingSigner` was identified.",[YQ9]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[GQ9]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[g$9]:"Cannot export a non-extractable key.",[E$9]:"No digest implementation could be found.",[A$9]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[h$9]:`This runtime does not support the generation of Ed25519 key pairs.
|
|
90
|
+
|
|
91
|
+
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
92
|
+
|
|
93
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[x$9]:"No signature verification implementation could be found.",[v$9]:"No key generation implementation could be found.",[b$9]:"No signing implementation could be found.",[y$9]:"No key export implementation could be found.",[p99]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[H89]:"Transaction processing left an account with an outstanding borrowed reference",[nQ9]:"Account in use",[sQ9]:"Account loaded twice",[rQ9]:"Attempt to debit an account but found no record of a prior credit.",[L89]:"Transaction loads an address table account that doesn't exist",[J89]:"This transaction has already been processed",[Q89]:"Blockhash not found",[X89]:"Loader call chain is too deep",[K89]:"Transactions are currently disabled due to cluster maintenance",[F89]:"Transaction contains a duplicate instruction ($index) that is not allowed",[eQ9]:"Insufficient funds for fee",[S89]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[$89]:"This account may not be used to pay transaction fees",[Y89]:"Transaction contains an invalid account reference",[P89]:"Transaction loads an address table account with invalid data",[R89]:"Transaction address table lookup uses an invalid index",[w89]:"Transaction loads an address table account with an invalid owner",[C89]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[V89]:"This program may not be used for executing instructions",[O89]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[Z89]:"Transaction loads a writable account that cannot be written",[B89]:"Transaction exceeded max loaded accounts data size cap",[W89]:"Transaction requires a fee but has no signature present",[tQ9]:"Attempt to load a program that does not exist",[k89]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[I89]:"ResanitizationNeeded",[q89]:"Transaction failed to sanitize accounts offsets correctly",[G89]:"Transaction did not pass signature verification",[M89]:"Transaction locked too many accounts",[T89]:"Sum of account balances before and after transaction do not match",[oQ9]:"The transaction failed with the error `$errorName`",[U89]:"Transaction version is unsupported",[j89]:"Transaction would exceed account data limit within the block",[_89]:"Transaction would exceed total account data limit",[z89]:"Transaction would exceed max account limit within the block",[D89]:"Transaction would exceed max Block Cost Limit",[N89]:"Transaction would exceed max Vote Cost Limit",[fQ9]:"Attempted to sign a transaction with an address that is not a signer for it",[vQ9]:"Transaction is missing an address at index: $index.",[lQ9]:"Transaction has no expected signers therefore it cannot be encoded",[cQ9]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[CQ9]:"Transaction does not have a blockhash lifetime",[IQ9]:"Transaction is not a durable nonce transaction",[TQ9]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[AQ9]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[hQ9]:"No fee payer set in CompiledTransaction",[EQ9]:"Could not find program address at index $index",[dQ9]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[uQ9]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[bQ9]:"Transaction is missing a fee payer.",[yQ9]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[mQ9]:"Transaction first instruction is not advance nonce account instruction.",[gQ9]:"Transaction with no instructions cannot be durable nonce transaction.",[SQ9]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[BQ9]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[pQ9]:"The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",[xQ9]:"Transaction is missing signatures for addresses: $addresses.",[kQ9]:"Transaction version must be in the range [0, 127]. `$actualVersion` given",[iQ9]:"This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 0.",[aQ9]:"The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction."},d8="i",oQ="t";function BX9($,J={}){let Q=SX9[$];if(Q.length===0)return"";let X;function W(G){if(X[oQ]===2){let V=Q.slice(X[d8]+1,G);Y.push(V in J?`${J[V]}`:`$${V}`)}else if(X[oQ]===1)Y.push(Q.slice(X[d8],G))}let Y=[];return Q.split("").forEach((G,V)=>{if(V===0){X={[d8]:0,[oQ]:Q[0]==="\\"?0:Q[0]==="$"?2:1};return}let q;switch(X[oQ]){case 0:q={[d8]:V,[oQ]:1};break;case 1:if(G==="\\")q={[d8]:V,[oQ]:0};else if(G==="$")q={[d8]:V,[oQ]:2};break;case 2:if(G==="\\")q={[d8]:V,[oQ]:0};else if(G==="$")q={[d8]:V,[oQ]:2};else if(!G.match(/\w/))q={[d8]:V,[oQ]:1};break}if(q){if(X!==q)W(V);X=q}}),W(),Y.join("")}function CX9($,J={}){return BX9($,J)}var PU=class extends Error{cause=this.cause;context;constructor(...[$,J]){let Q,X;if(J)Object.entries(Object.getOwnPropertyDescriptors(J)).forEach(([Y,G])=>{if(Y==="cause")X={cause:G.value};else{if(Q===void 0)Q={__code:$};Object.defineProperty(Q,Y,G)}});let W=CX9($,Q);super(W,X);this.context=Object.freeze(Q===void 0?{__code:$}:Q),this.name="SolanaError"}};import{setMaxListeners as t_}from"events";var IX9=class extends globalThis.AbortController{constructor(...$){super(...$),t_(Number.MAX_SAFE_INTEGER,this.signal)}},kX9=class extends globalThis.EventTarget{constructor(...$){super(...$),t_(Number.MAX_SAFE_INTEGER,this)}},s_;function r_(){return Symbol("This symbol is thrown from a socket's iterator when the connection is explicitly aborted by the user")}var RU=Symbol();function e_({abortSignal:$,dataChannelName:J,dataPublisher:Q,errorChannelName:X}){let W=new Map;function Y(H){for(let[Z,M]of W.entries())if(M.__hasPolled)W.delete(Z),M.onError(H);else M.publishQueue.push({__type:1,err:H})}let G=new IX9;$.addEventListener("abort",()=>{G.abort(),Y(s_||=r_())});let V={signal:G.signal},q=RU;return Q.on(X,(H)=>{if(q===RU)q=H,G.abort(),Y(H)},V),Q.on(J,(H)=>{W.forEach((Z,M)=>{if(Z.__hasPolled){let{onData:j}=Z;W.set(M,{__hasPolled:!1,publishQueue:[]}),j(H)}else Z.publishQueue.push({__type:0,data:H})})},V),{async*[Symbol.asyncIterator](){if($.aborted)return;if(q!==RU)throw q;let H=Symbol();W.set(H,{__hasPolled:!1,publishQueue:[]});try{while(!0){let Z=W.get(H);if(!Z)throw new PU(LU);if(Z.__hasPolled)throw new PU(wU);let M=Z.publishQueue;try{if(M.length){Z.publishQueue=[];for(let j of M)if(j.__type===0)yield j.data;else throw j.err}else yield await new Promise((j,R)=>{W.set(H,{__hasPolled:!0,onData:j,onError:R})})}catch(j){if(j===(s_||=r_()))return;else throw j}}}finally{W.delete(H)}}}}function OU($){return{on(J,Q,X){function W(Y){if(Y instanceof CustomEvent){let G=Y.detail;Q(G)}else Q()}return $.addEventListener(J,W,X),()=>{$.removeEventListener(J,W)}}}}function $F($,J,Q){let X,W=new kX9,Y=OU(W);return{...Y,on(G,V,q){if(!X)X={dispose:$.on(J,(R)=>{let N=Q(R);if(!N)return;let[A,E]=N;W.dispatchEvent(new CustomEvent(A,{detail:E}))}),numSubscribers:0};X.numSubscribers++;let H=Y.on(G,V,q),Z=!0;function M(){if(!Z)return;if(Z=!1,q?.signal.removeEventListener("abort",M),X.numSubscribers--,X.numSubscribers===0)X.dispose(),X=void 0;H()}return q?.signal.addEventListener("abort",M),M}}}import{setMaxListeners as TX9}from"events";function QF($){return new Proxy($.api,{defineProperty(){return!1},deleteProperty(){return!1},get(J,Q,X){if(Q==="then")return;return function(...W){let Y=Q.toString(),G=Reflect.get(J,Y,X);if(!G)throw new SX(ZU,{notificationName:Y});let V=G(...W);return AX9($.transport,V)}}})}function AX9($,J){return{async subscribe({abortSignal:Q}){let X=await $({signal:Q,...J});return e_({abortSignal:Q,dataChannelName:"notification",dataPublisher:X,errorChannelName:"error"})}}}function XF($){return new Proxy({},{defineProperty(){return!1},deleteProperty(){return!1},get(...J){let[Q,X]=J,W=X.toString();return function(...Y){let G={methodName:W,params:Y},V=$.requestTransformer?$.requestTransformer(G):G;return{execute(q){return $.planExecutor({...q,request:V})},request:V}}}})}function WF($,J){return Object.freeze({...$,on(Q,X,W){if(Q!=="message")return $.on(Q,X,W);return $.on("message",(Y)=>X(J(Y)),W)}})}function YF($,J){return Object.freeze({...$,send:(Q)=>$.send(J(Q))})}var EX9=class extends globalThis.AbortController{constructor(...$){super(...$),TX9(Number.MAX_SAFE_INTEGER,this.signal)}},NU=new WeakMap;function hX9($,J){return GF(-1,$,J)}function xX9($,J){GF(1,$,J)}function vX9($){let J=NU.get($);if(!J)NU.set($,J={});return J}function GF($,J,Q){if(Q===void 0)return;let X=vX9(J);if(!X[Q]&&$>0)X[Q]=0;let W=$+X[Q];if(W<=0)delete X[Q];else X[Q]=W;return W}var JF=new WeakMap;function bX9($,J,Q){let X=JF.get($);if(!X)JF.set($,X=new WeakMap);let W=Q??$,Y=X.get(W);if(!Y)X.set(W,Y=$F($,"message",(G)=>{let V=G;if(!("method"in V))return;let q=Q?Q(V.params.result,J):V.params.result;return[`notification:${V.params.subscription}`,q]}));return Y}async function VF({channel:$,responseTransformer:J,signal:Q,subscribeRequest:X,unsubscribeMethodName:W}){let Y;$.on("error",()=>{Y=void 0,NU.delete($)},{signal:Q});let G=new Promise((M,j)=>{function R(){if(hX9($,Y)===0){let N=_G({methodName:W,params:[Y]});Y=void 0,$.send(N).catch(()=>{})}j(this.reason)}if(Q.aborted)R.call(Q);else Q.addEventListener("abort",R)}),V=_G(X);await $.send(V);let q=new Promise((M,j)=>{let R=new EX9;Q.addEventListener("abort",R.abort.bind(R));let N={signal:R.signal};$.on("error",(A)=>{R.abort(),j(A)},N),$.on("message",(A)=>{if(A&&typeof A==="object"&&"id"in A&&A.id===V.id)if(R.abort(),"error"in A)j(MU(A.error));else M(A.result)},N)});if(Y=await xN([G,q]),Y==null)throw new SX(zU);xX9($,Y);let H=bX9($,X,J),Z=`notification:${Y}`;return{on(M,j,R){switch(M){case"notification":return H.on(Z,j,R);case"error":return $.on("error",j,R);default:throw new SX(jU,{channelName:M,supportedChannelNames:["notification","error"]})}}}}function yX9($){let J=u4($),Q=M_({allowedNumericKeyPaths:gX9()});return XF({planExecutor({request:X,...W}){return VF({...W,responseTransformer:Q,subscribeRequest:{...X,methodName:X.methodName.replace(/Notifications$/,"Subscribe")},unsubscribeMethodName:X.methodName.replace(/Notifications$/,"Unsubscribe")})},requestTransformer:J})}function qF($){return yX9($)}var _U;function gX9(){if(!_U)_U={accountNotifications:m8.map(($)=>["value",...$]),blockNotifications:[["value","block","transactions",U0,"meta","preTokenBalances",U0,"accountIndex"],["value","block","transactions",U0,"meta","preTokenBalances",U0,"uiTokenAmount","decimals"],["value","block","transactions",U0,"meta","postTokenBalances",U0,"accountIndex"],["value","block","transactions",U0,"meta","postTokenBalances",U0,"uiTokenAmount","decimals"],["value","block","transactions",U0,"meta","rewards",U0,"commission"],["value","block","transactions",U0,"meta","innerInstructions",U0,"index"],["value","block","transactions",U0,"meta","innerInstructions",U0,"instructions",U0,"programIdIndex"],["value","block","transactions",U0,"meta","innerInstructions",U0,"instructions",U0,"accounts",U0],["value","block","transactions",U0,"transaction","message","addressTableLookups",U0,"writableIndexes",U0],["value","block","transactions",U0,"transaction","message","addressTableLookups",U0,"readonlyIndexes",U0],["value","block","transactions",U0,"transaction","message","instructions",U0,"programIdIndex"],["value","block","transactions",U0,"transaction","message","instructions",U0,"accounts",U0],["value","block","transactions",U0,"transaction","message","header","numReadonlySignedAccounts"],["value","block","transactions",U0,"transaction","message","header","numReadonlyUnsignedAccounts"],["value","block","transactions",U0,"transaction","message","header","numRequiredSignatures"],["value","block","rewards",U0,"commission"]],programNotifications:m8.flatMap(($)=>[["value",U0,"account",...$],[U0,"account",...$]])};return _U}var mX9=1,fX9=2,lX9=3,pX9=4,dX9=5,uX9=6,cX9=7,iX9=8,aX9=9,oX9=10,nX9=-32700,sX9=-32603,rX9=-32602,tX9=-32601,eX9=-32600,$W9=-32019,JW9=-32018,QW9=-32017,XW9=-32016,WW9=-32015,YW9=-32014,GW9=-32013,VW9=-32012,qW9=-32011,KW9=-32010,HW9=-32009,DW9=-32008,UW9=-32007,ZW9=-32006,zW9=-32005,jW9=-32004,MW9=-32003,LW9=-32002,wW9=-32001,PW9=2800000,RW9=2800001,OW9=2800002,NW9=2800003,_W9=2800004,FW9=2800005,SW9=2800006,BW9=2800007,CW9=2800008,IW9=2800009,kW9=2800010,TW9=2800011,AW9=3230000,EW9=32300001,hW9=3230002,xW9=3230003,vW9=3230004,bW9=3610000,yW9=3610001,gW9=3610002,mW9=3610003,fW9=3610004,lW9=3610005,pW9=3610006,dW9=3610007,uW9=3611000,cW9=3704000,iW9=3704001,aW9=3704002,oW9=3704003,nW9=3704004,sW9=4128000,rW9=4128001,tW9=4128002,eW9=4615000,$59=4615001,J59=4615002,Q59=4615003,X59=4615004,W59=4615005,Y59=4615006,G59=4615007,V59=4615008,q59=4615009,K59=4615010,H59=4615011,D59=4615012,U59=4615013,Z59=4615014,z59=4615015,j59=4615016,M59=4615017,L59=4615018,w59=4615019,P59=4615020,R59=4615021,O59=4615022,N59=4615023,_59=4615024,F59=4615025,S59=4615026,B59=4615027,C59=4615028,I59=4615029,k59=4615030,T59=4615031,A59=4615032,E59=4615033,h59=4615034,x59=4615035,v59=4615036,b59=4615037,y59=4615038,g59=4615039,m59=4615040,f59=4615041,l59=4615042,p59=4615043,d59=4615044,u59=4615045,c59=4615046,i59=4615047,a59=4615048,o59=4615049,n59=4615050,s59=4615051,r59=4615052,t59=4615053,e59=4615054,$Y9=5508000,JY9=5508001,QY9=5508002,XY9=5508003,WY9=5508004,YY9=5508005,GY9=5508006,VY9=5508007,qY9=5508008,KY9=5508009,HY9=5508010,DY9=5508011,UY9=5607000,ZY9=5607001,zY9=5607002,jY9=5607003,MY9=5607004,LY9=5607005,wY9=5607006,PY9=5607007,RY9=5607008,OY9=5607009,NY9=5607010,_Y9=5607011,FY9=5607012,SY9=5607013,BY9=5607014,CY9=5607015,IY9=5607016,kY9=5607017,TY9=5663000,AY9=5663001,EY9=5663002,hY9=5663003,xY9=5663004,vY9=5663005,bY9=5663006,yY9=5663007,gY9=5663008,mY9=5663009,fY9=5663010,lY9=5663011,pY9=5663012,dY9=5663013,uY9=5663014,cY9=5663015,iY9=5663016,aY9=5663017,oY9=5663018,nY9=5663019,sY9=5663020,rY9=5663021,tY9=5663022,eY9=7050000,$G9=7050001,JG9=7050002,QG9=7050003,XG9=7050004,WG9=7050005,YG9=7050006,GG9=7050007,VG9=7050008,qG9=7050009,KG9=7050010,HG9=7050011,DG9=7050012,UG9=7050013,ZG9=7050014,zG9=7050015,jG9=7050016,MG9=7050017,LG9=7050018,wG9=7050019,PG9=7050020,RG9=7050021,OG9=7050022,NG9=7050023,_G9=7050024,FG9=7050025,SG9=7050026,BG9=7050027,CG9=7050028,IG9=7050029,kG9=7050030,TG9=7050031,AG9=7050032,EG9=7050033,hG9=7050034,xG9=7050035,vG9=7050036,bG9=7618000,yG9=7618001,gG9=7618002,mG9=7618003,fG9=7618004,lG9=7618005,pG9=7618006,dG9=7618007,uG9=7618008,cG9=7618009,iG9=8078000,aG9=8078001,oG9=8078002,nG9=8078003,sG9=8078004,rG9=8078005,tG9=8078006,eG9=8078007,$79=8078008,J79=8078009,Q79=8078010,X79=8078011,W79=8078012,Y79=8078013,G79=8078014,V79=8078015,q79=8078016,K79=8078017,H79=8078018,D79=8078019,U79=8078020,Z79=8078021,z79=8078022,j79=8078023,FU=8100000,M79=8100001,L79=8100002,w79=8100003,P79=8190000,R79=8190001,O79=8190002,SU=8190003,N79=8190004,_79=9900000,F79=9900001,S79=9900002,B79=9900003,C79=9900004,I79=9900005,k79=9900006;var T79={[AW9]:"Account not found at address: $address",[vW9]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[xW9]:"Expected decoded account at address: $address",[hW9]:"Failed to decode account data at address: $address",[EW9]:"Accounts not found at addresses: $addresses",[IW9]:"Unable to find a viable program address bump seed.",[OW9]:"$putativeAddress is not a base58-encoded address.",[PW9]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[NW9]:"The `CryptoKey` must be an `Ed25519` public key.",[TW9]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[CW9]:"Invalid seeds; point must fall off the Ed25519 curve.",[_W9]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[SW9]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[BW9]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[FW9]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[kW9]:"Program address cannot end with PDA marker.",[RW9]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[pX9]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[mX9]:"The network has progressed past the last block for which this transaction could have been committed.",[iG9]:"Codec [$codecDescription] cannot decode empty byte arrays.",[z79]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[U79]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[rG9]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[tG9]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[sG9]:"Encoder and decoder must either both be fixed-size or variable-size.",[$79]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[oG9]:"Expected a fixed-size codec, got a variable-size one.",[Y79]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[nG9]:"Expected a variable-size codec, got a fixed-size one.",[D79]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[aG9]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[H79]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[J79]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[Q79]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[V79]:"Invalid literal union variant. Expected one of [$variants], got $value.",[eG9]:"Expected [$codecDescription] to have $expected items, got $actual.",[W79]:"Invalid value $value for base $base with alphabet $alphabet.",[q79]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[X79]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[G79]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[Z79]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[K79]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[j79]:"This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",[uW9]:"No random values implementation could be found.",[q59]:"instruction requires an uninitialized account",[N59]:"instruction tries to borrow reference for an account which is already borrowed",[_59]:"instruction left account with an outstanding borrowed reference",[R59]:"program other than the account's owner changed the size of the account data",[W59]:"account data too small for instruction",[O59]:"instruction expected an executable account",[c59]:"An account does not have enough lamports to be rent-exempt",[a59]:"Program arithmetic overflowed",[u59]:"Failed to serialize or deserialize account data: $encodedData",[e59]:"Builtin programs must consume compute units",[A59]:"Cross-program invocation call depth too deep",[y59]:"Computational budget exceeded",[S59]:"custom program error: #$code",[M59]:"instruction contains duplicate accounts",[F59]:"instruction modifications of multiply-passed account differ",[k59]:"executable accounts must be rent exempt",[C59]:"instruction changed executable accounts data",[I59]:"instruction changed the balance of an executable account",[L59]:"instruction changed executable bit of an account",[Z59]:"instruction modified data of an account it does not own",[U59]:"instruction spent from the balance of an account it does not own",[$59]:"generic instruction error",[n59]:"Provided owner is not allowed",[p59]:"Account is immutable",[d59]:"Incorrect authority provided",[G59]:"incorrect program id for instruction",[Y59]:"insufficient funds for instruction",[X59]:"invalid account data for instruction",[i59]:"Invalid account owner",[J59]:"invalid program argument",[B59]:"program returned invalid error code",[Q59]:"invalid instruction data",[b59]:"Failed to reallocate account data",[v59]:"Provided seeds do not result in a valid address",[s59]:"Accounts data allocations exceeded the maximum allowed per transaction",[r59]:"Max accounts exceeded",[t59]:"Max instruction trace length exceeded",[x59]:"Length of the seed is too long for address generation",[E59]:"An account required by the instruction is missing",[V59]:"missing required signature for instruction",[D59]:"instruction illegally modified the program id of an account",[P59]:"insufficient account keys for instruction",[g59]:"Cross-program invocation with unauthorized signer or writable account",[m59]:"Failed to create program execution environment",[l59]:"Program failed to compile",[f59]:"Program failed to complete",[j59]:"instruction modified data of a read-only account",[z59]:"instruction changed the balance of a read-only account",[h59]:"Cross-program invocation reentrancy not allowed for this instruction",[w59]:"instruction modified rent epoch of an account",[H59]:"sum of account balances before and after instruction do not match",[K59]:"instruction requires an initialized account",[eW9]:"",[T59]:"Unsupported program id",[o59]:"Unsupported sysvar",[I79]:"Invalid instruction plan kind: $kind.",[gG9]:"The provided instruction plan is empty.",[lG9]:"No failed transaction plan result was found in the provided transaction plan result.",[fG9]:"This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved \u2014 e.g. by targetting RPCs that support transaction bundles.",[mG9]:"The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",[bG9]:"The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",[k79]:"Invalid transaction plan kind: $kind.",[yG9]:"No more instructions to pack; the message packer has completed the instruction plan.",[pG9]:"Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",[dG9]:"Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",[uG9]:"Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",[cG9]:"Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",[sW9]:"The instruction does not have any accounts.",[rW9]:"The instruction does not have any data.",[tW9]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[dX9]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[fX9]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[S79]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[C79]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[F79]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[_79]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[B79]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[sX9]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[rX9]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[eX9]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[tX9]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[nX9]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[VW9]:"$__serverMessage",[wW9]:"$__serverMessage",[jW9]:"$__serverMessage",[YW9]:"$__serverMessage",[QW9]:"Epoch rewards period still active at slot $slot",[KW9]:"$__serverMessage",[HW9]:"$__serverMessage",[$W9]:"Failed to query long-term storage; please try again",[XW9]:"Minimum context slot has not been reached",[zW9]:"Node is unhealthy; behind by $numSlotsBehind slots",[DW9]:"No snapshot",[LW9]:"Transaction simulation failed",[JW9]:"Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",[UW9]:"$__serverMessage",[qW9]:"Transaction history is not available from this node",[ZW9]:"$__serverMessage",[GW9]:"Transaction signature length mismatch",[MW9]:"Transaction signature verification failure",[WW9]:"$__serverMessage",[cW9]:"Key pair bytes must be of length 64, got $byteLength.",[iW9]:"Expected private key bytes with length 32. Actual length: $actualLength.",[aW9]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[nW9]:"The provided private key does not match the provided public key.",[oW9]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[uX9]:"Lamports value must be in the range [0, 2e64-1]",[cX9]:"`$value` cannot be parsed as a `BigInt`",[oX9]:"$message",[iX9]:"`$value` cannot be parsed as a `Number`",[lX9]:"No nonce account could be found at address `$nonceAccountAddress`",[jY9]:"Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",[SY9]:"Attempted to sign an offchain message with an address that is not a signer for it",[zY9]:"Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",[FY9]:"The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",[UY9]:"The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",[PY9]:"Expected message format $expectedMessageFormat, got $actualMessageFormat",[RY9]:"The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",[OY9]:"Offchain message content must be non-empty",[LY9]:"Offchain message must specify the address of at least one required signer",[NY9]:"Offchain message envelope must reserve space for at least one signature",[MY9]:"The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",[CY9]:"The signatories of this offchain message must be listed in lexicographical order",[IY9]:"An address must be listed no more than once among the signatories of an offchain message",[_Y9]:"Offchain message is missing signatures for addresses: $addresses.",[kY9]:"Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",[ZY9]:"The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",[BY9]:"Expected offchain message version $expectedVersion. Got $actualVersion.",[wY9]:"This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",[P79]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[O79]:"WebSocket was closed before payload could be added to the send buffer",[SU]:"WebSocket connection closed",[N79]:"WebSocket failed to connect",[R79]:"Failed to obtain a subscription id from the server",[w79]:"Could not find an API plan for RPC method: `$method`",[FU]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[L79]:"HTTP error ($statusCode): $message",[M79]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[$Y9]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[JY9]:"The provided value does not implement the `KeyPairSigner` interface",[XY9]:"The provided value does not implement the `MessageModifyingSigner` interface",[WY9]:"The provided value does not implement the `MessagePartialSigner` interface",[QY9]:"The provided value does not implement any of the `MessageSigner` interfaces",[GY9]:"The provided value does not implement the `TransactionModifyingSigner` interface",[VY9]:"The provided value does not implement the `TransactionPartialSigner` interface",[qY9]:"The provided value does not implement the `TransactionSendingSigner` interface",[YY9]:"The provided value does not implement any of the `TransactionSigner` interfaces",[KY9]:"More than one `TransactionSendingSigner` was identified.",[HY9]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[DY9]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[dW9]:"Cannot export a non-extractable key.",[yW9]:"No digest implementation could be found.",[bW9]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[gW9]:`This runtime does not support the generation of Ed25519 key pairs.
|
|
94
|
+
|
|
95
|
+
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
96
|
+
|
|
97
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[mW9]:"No signature verification implementation could be found.",[fW9]:"No key generation implementation could be found.",[lW9]:"No signing implementation could be found.",[pW9]:"No key export implementation could be found.",[aX9]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[jG9]:"Transaction processing left an account with an outstanding borrowed reference",[$G9]:"Account in use",[JG9]:"Account loaded twice",[QG9]:"Attempt to debit an account but found no record of a prior credit.",[NG9]:"Transaction loads an address table account that doesn't exist",[GG9]:"This transaction has already been processed",[VG9]:"Blockhash not found",[qG9]:"Loader call chain is too deep",[zG9]:"Transactions are currently disabled due to cluster maintenance",[kG9]:"Transaction contains a duplicate instruction ($index) that is not allowed",[WG9]:"Insufficient funds for fee",[TG9]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[YG9]:"This account may not be used to pay transaction fees",[HG9]:"Transaction contains an invalid account reference",[FG9]:"Transaction loads an address table account with invalid data",[SG9]:"Transaction address table lookup uses an invalid index",[_G9]:"Transaction loads an address table account with an invalid owner",[EG9]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[UG9]:"This program may not be used for executing instructions",[BG9]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[wG9]:"Transaction loads a writable account that cannot be written",[AG9]:"Transaction exceeded max loaded accounts data size cap",[KG9]:"Transaction requires a fee but has no signature present",[XG9]:"Attempt to load a program that does not exist",[xG9]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[hG9]:"ResanitizationNeeded",[ZG9]:"Transaction failed to sanitize accounts offsets correctly",[DG9]:"Transaction did not pass signature verification",[OG9]:"Transaction locked too many accounts",[vG9]:"Sum of account balances before and after transaction do not match",[eY9]:"The transaction failed with the error `$errorName`",[LG9]:"Transaction version is unsupported",[RG9]:"Transaction would exceed account data limit within the block",[IG9]:"Transaction would exceed total account data limit",[PG9]:"Transaction would exceed max account limit within the block",[MG9]:"Transaction would exceed max Block Cost Limit",[CG9]:"Transaction would exceed max Vote Cost Limit",[cY9]:"Attempted to sign a transaction with an address that is not a signer for it",[fY9]:"Transaction is missing an address at index: $index.",[iY9]:"Transaction has no expected signers therefore it cannot be encoded",[sY9]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[EY9]:"Transaction does not have a blockhash lifetime",[hY9]:"Transaction is not a durable nonce transaction",[vY9]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[bY9]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[gY9]:"No fee payer set in CompiledTransaction",[yY9]:"Could not find program address at index $index",[oY9]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[nY9]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[lY9]:"Transaction is missing a fee payer.",[pY9]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[uY9]:"Transaction first instruction is not advance nonce account instruction.",[dY9]:"Transaction with no instructions cannot be durable nonce transaction.",[TY9]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[AY9]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[aY9]:"The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",[mY9]:"Transaction is missing signatures for addresses: $addresses.",[xY9]:"Transaction version must be in the range [0, 127]. `$actualVersion` given",[rY9]:"This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 0.",[tY9]:"The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction."},u8="i",nQ="t";function A79($,J={}){let Q=T79[$];if(Q.length===0)return"";let X;function W(G){if(X[nQ]===2){let V=Q.slice(X[u8]+1,G);Y.push(V in J?`${J[V]}`:`$${V}`)}else if(X[nQ]===1)Y.push(Q.slice(X[u8],G))}let Y=[];return Q.split("").forEach((G,V)=>{if(V===0){X={[u8]:0,[nQ]:Q[0]==="\\"?0:Q[0]==="$"?2:1};return}let q;switch(X[nQ]){case 0:q={[u8]:V,[nQ]:1};break;case 1:if(G==="\\")q={[u8]:V,[nQ]:0};else if(G==="$")q={[u8]:V,[nQ]:2};break;case 2:if(G==="\\")q={[u8]:V,[nQ]:0};else if(G==="$")q={[u8]:V,[nQ]:2};else if(!G.match(/\w/))q={[u8]:V,[nQ]:1};break}if(q){if(X!==q)W(V);X=q}}),W(),Y.join("")}function E79($,J={}){return A79($,J)}function KF($,J){if($ instanceof Error&&$.name==="SolanaError"){if(J!==void 0)return $.context.__code===J;return!0}return!1}var HF=class extends Error{cause=this.cause;context;constructor(...[$,J]){let Q,X;if(J)Object.entries(Object.getOwnPropertyDescriptors(J)).forEach(([Y,G])=>{if(Y==="cause")X={cause:G.value};else{if(Q===void 0)Q={__code:$};Object.defineProperty(Q,Y,G)}});let W=E79($,Q);super(W,X);this.context=Object.freeze(Q===void 0?{__code:$}:Q),this.name="SolanaError"}};function DF(...$){if("captureStackTrace"in Error&&typeof Error.captureStackTrace==="function")Error.captureStackTrace(...$)}import{setMaxListeners as kK9}from"events";var h79=1,x79=2,v79=3,b79=4,y79=5,g79=6,m79=7,f79=8,l79=9,p79=10,d79=-32700,u79=-32603,c79=-32602,i79=-32601,a79=-32600,o79=-32019,n79=-32018,s79=-32017,r79=-32016,t79=-32015,e79=-32014,$V9=-32013,JV9=-32012,QV9=-32011,XV9=-32010,WV9=-32009,YV9=-32008,GV9=-32007,VV9=-32006,qV9=-32005,KV9=-32004,HV9=-32003,DV9=-32002,UV9=-32001,ZV9=2800000,zV9=2800001,jV9=2800002,MV9=2800003,LV9=2800004,wV9=2800005,PV9=2800006,RV9=2800007,OV9=2800008,NV9=2800009,_V9=2800010,FV9=2800011,SV9=3230000,BV9=32300001,CV9=3230002,IV9=3230003,kV9=3230004,TV9=3610000,AV9=3610001,EV9=3610002,hV9=3610003,xV9=3610004,vV9=3610005,bV9=3610006,yV9=3610007,gV9=3611000,mV9=3704000,fV9=3704001,lV9=3704002,pV9=3704003,dV9=3704004,uV9=4128000,cV9=4128001,iV9=4128002,aV9=4615000,oV9=4615001,nV9=4615002,sV9=4615003,rV9=4615004,tV9=4615005,eV9=4615006,$49=4615007,J49=4615008,Q49=4615009,X49=4615010,W49=4615011,Y49=4615012,G49=4615013,V49=4615014,q49=4615015,K49=4615016,H49=4615017,D49=4615018,U49=4615019,Z49=4615020,z49=4615021,j49=4615022,M49=4615023,L49=4615024,w49=4615025,P49=4615026,R49=4615027,O49=4615028,N49=4615029,_49=4615030,F49=4615031,S49=4615032,B49=4615033,C49=4615034,I49=4615035,k49=4615036,T49=4615037,A49=4615038,E49=4615039,h49=4615040,x49=4615041,v49=4615042,b49=4615043,y49=4615044,g49=4615045,m49=4615046,f49=4615047,l49=4615048,p49=4615049,d49=4615050,u49=4615051,c49=4615052,i49=4615053,a49=4615054,o49=5508000,n49=5508001,s49=5508002,r49=5508003,t49=5508004,e49=5508005,$q9=5508006,Jq9=5508007,Qq9=5508008,Xq9=5508009,Wq9=5508010,Yq9=5508011,Gq9=5607000,Vq9=5607001,qq9=5607002,Kq9=5607003,Hq9=5607004,Dq9=5607005,Uq9=5607006,Zq9=5607007,zq9=5607008,jq9=5607009,Mq9=5607010,Lq9=5607011,wq9=5607012,Pq9=5607013,Rq9=5607014,Oq9=5607015,Nq9=5607016,_q9=5607017,Fq9=5663000,Sq9=5663001,Bq9=5663002,Cq9=5663003,Iq9=5663004,kq9=5663005,Tq9=5663006,Aq9=5663007,Eq9=5663008,hq9=5663009,xq9=5663010,vq9=5663011,bq9=5663012,yq9=5663013,gq9=5663014,mq9=5663015,fq9=5663016,lq9=5663017,pq9=5663018,dq9=5663019,uq9=5663020,cq9=5663021,iq9=5663022,aq9=7050000,oq9=7050001,nq9=7050002,sq9=7050003,rq9=7050004,tq9=7050005,eq9=7050006,$19=7050007,J19=7050008,Q19=7050009,X19=7050010,W19=7050011,Y19=7050012,G19=7050013,V19=7050014,q19=7050015,K19=7050016,H19=7050017,D19=7050018,U19=7050019,Z19=7050020,z19=7050021,j19=7050022,M19=7050023,L19=7050024,w19=7050025,P19=7050026,R19=7050027,O19=7050028,N19=7050029,_19=7050030,F19=7050031,S19=7050032,B19=7050033,C19=7050034,I19=7050035,k19=7050036,T19=7618000,A19=7618001,E19=7618002,h19=7618003,x19=7618004,v19=7618005,b19=7618006,y19=7618007,g19=7618008,m19=7618009,f19=8078000,l19=8078001,p19=8078002,d19=8078003,u19=8078004,c19=8078005,i19=8078006,a19=8078007,o19=8078008,n19=8078009,s19=8078010,r19=8078011,t19=8078012,e19=8078013,$K9=8078014,JK9=8078015,QK9=8078016,XK9=8078017,WK9=8078018,YK9=8078019,GK9=8078020,VK9=8078021,qK9=8078022,KK9=8078023,HK9=8100000,DK9=8100001,UK9=8100002,ZK9=8100003,zK9=8190000,jK9=8190001,BU=8190002,a4=8190003,CU=8190004,MK9=9900000,LK9=9900001,wK9=9900002,PK9=9900003,RK9=9900004,OK9=9900005,NK9=9900006;var _K9={[SV9]:"Account not found at address: $address",[kV9]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[IV9]:"Expected decoded account at address: $address",[CV9]:"Failed to decode account data at address: $address",[BV9]:"Accounts not found at addresses: $addresses",[NV9]:"Unable to find a viable program address bump seed.",[jV9]:"$putativeAddress is not a base58-encoded address.",[ZV9]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[MV9]:"The `CryptoKey` must be an `Ed25519` public key.",[FV9]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[OV9]:"Invalid seeds; point must fall off the Ed25519 curve.",[LV9]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[PV9]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[RV9]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[wV9]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[_V9]:"Program address cannot end with PDA marker.",[zV9]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[b79]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[h79]:"The network has progressed past the last block for which this transaction could have been committed.",[f19]:"Codec [$codecDescription] cannot decode empty byte arrays.",[qK9]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[GK9]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[c19]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[i19]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[u19]:"Encoder and decoder must either both be fixed-size or variable-size.",[o19]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[p19]:"Expected a fixed-size codec, got a variable-size one.",[e19]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[d19]:"Expected a variable-size codec, got a fixed-size one.",[YK9]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[l19]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[WK9]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[n19]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[s19]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[JK9]:"Invalid literal union variant. Expected one of [$variants], got $value.",[a19]:"Expected [$codecDescription] to have $expected items, got $actual.",[t19]:"Invalid value $value for base $base with alphabet $alphabet.",[QK9]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[r19]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[$K9]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[VK9]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[XK9]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[KK9]:"This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",[gV9]:"No random values implementation could be found.",[Q49]:"instruction requires an uninitialized account",[M49]:"instruction tries to borrow reference for an account which is already borrowed",[L49]:"instruction left account with an outstanding borrowed reference",[z49]:"program other than the account's owner changed the size of the account data",[tV9]:"account data too small for instruction",[j49]:"instruction expected an executable account",[m49]:"An account does not have enough lamports to be rent-exempt",[l49]:"Program arithmetic overflowed",[g49]:"Failed to serialize or deserialize account data: $encodedData",[a49]:"Builtin programs must consume compute units",[S49]:"Cross-program invocation call depth too deep",[A49]:"Computational budget exceeded",[P49]:"custom program error: #$code",[H49]:"instruction contains duplicate accounts",[w49]:"instruction modifications of multiply-passed account differ",[_49]:"executable accounts must be rent exempt",[O49]:"instruction changed executable accounts data",[N49]:"instruction changed the balance of an executable account",[D49]:"instruction changed executable bit of an account",[V49]:"instruction modified data of an account it does not own",[G49]:"instruction spent from the balance of an account it does not own",[oV9]:"generic instruction error",[d49]:"Provided owner is not allowed",[b49]:"Account is immutable",[y49]:"Incorrect authority provided",[$49]:"incorrect program id for instruction",[eV9]:"insufficient funds for instruction",[rV9]:"invalid account data for instruction",[f49]:"Invalid account owner",[nV9]:"invalid program argument",[R49]:"program returned invalid error code",[sV9]:"invalid instruction data",[T49]:"Failed to reallocate account data",[k49]:"Provided seeds do not result in a valid address",[u49]:"Accounts data allocations exceeded the maximum allowed per transaction",[c49]:"Max accounts exceeded",[i49]:"Max instruction trace length exceeded",[I49]:"Length of the seed is too long for address generation",[B49]:"An account required by the instruction is missing",[J49]:"missing required signature for instruction",[Y49]:"instruction illegally modified the program id of an account",[Z49]:"insufficient account keys for instruction",[E49]:"Cross-program invocation with unauthorized signer or writable account",[h49]:"Failed to create program execution environment",[v49]:"Program failed to compile",[x49]:"Program failed to complete",[K49]:"instruction modified data of a read-only account",[q49]:"instruction changed the balance of a read-only account",[C49]:"Cross-program invocation reentrancy not allowed for this instruction",[U49]:"instruction modified rent epoch of an account",[W49]:"sum of account balances before and after instruction do not match",[X49]:"instruction requires an initialized account",[aV9]:"",[F49]:"Unsupported program id",[p49]:"Unsupported sysvar",[OK9]:"Invalid instruction plan kind: $kind.",[E19]:"The provided instruction plan is empty.",[v19]:"No failed transaction plan result was found in the provided transaction plan result.",[x19]:"This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved \u2014 e.g. by targetting RPCs that support transaction bundles.",[h19]:"The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",[T19]:"The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",[NK9]:"Invalid transaction plan kind: $kind.",[A19]:"No more instructions to pack; the message packer has completed the instruction plan.",[b19]:"Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",[y19]:"Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",[g19]:"Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",[m19]:"Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",[uV9]:"The instruction does not have any accounts.",[cV9]:"The instruction does not have any data.",[iV9]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[y79]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[x79]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[wK9]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[RK9]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[LK9]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[MK9]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[PK9]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[u79]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[c79]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[a79]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[i79]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[d79]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[JV9]:"$__serverMessage",[UV9]:"$__serverMessage",[KV9]:"$__serverMessage",[e79]:"$__serverMessage",[s79]:"Epoch rewards period still active at slot $slot",[XV9]:"$__serverMessage",[WV9]:"$__serverMessage",[o79]:"Failed to query long-term storage; please try again",[r79]:"Minimum context slot has not been reached",[qV9]:"Node is unhealthy; behind by $numSlotsBehind slots",[YV9]:"No snapshot",[DV9]:"Transaction simulation failed",[n79]:"Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",[GV9]:"$__serverMessage",[QV9]:"Transaction history is not available from this node",[VV9]:"$__serverMessage",[$V9]:"Transaction signature length mismatch",[HV9]:"Transaction signature verification failure",[t79]:"$__serverMessage",[mV9]:"Key pair bytes must be of length 64, got $byteLength.",[fV9]:"Expected private key bytes with length 32. Actual length: $actualLength.",[lV9]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[dV9]:"The provided private key does not match the provided public key.",[pV9]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[g79]:"Lamports value must be in the range [0, 2e64-1]",[m79]:"`$value` cannot be parsed as a `BigInt`",[p79]:"$message",[f79]:"`$value` cannot be parsed as a `Number`",[v79]:"No nonce account could be found at address `$nonceAccountAddress`",[Kq9]:"Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",[Pq9]:"Attempted to sign an offchain message with an address that is not a signer for it",[qq9]:"Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",[wq9]:"The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",[Gq9]:"The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",[Zq9]:"Expected message format $expectedMessageFormat, got $actualMessageFormat",[zq9]:"The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",[jq9]:"Offchain message content must be non-empty",[Dq9]:"Offchain message must specify the address of at least one required signer",[Mq9]:"Offchain message envelope must reserve space for at least one signature",[Hq9]:"The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",[Oq9]:"The signatories of this offchain message must be listed in lexicographical order",[Nq9]:"An address must be listed no more than once among the signatories of an offchain message",[Lq9]:"Offchain message is missing signatures for addresses: $addresses.",[_q9]:"Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",[Vq9]:"The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",[Rq9]:"Expected offchain message version $expectedVersion. Got $actualVersion.",[Uq9]:"This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",[zK9]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[BU]:"WebSocket was closed before payload could be added to the send buffer",[a4]:"WebSocket connection closed",[CU]:"WebSocket failed to connect",[jK9]:"Failed to obtain a subscription id from the server",[ZK9]:"Could not find an API plan for RPC method: `$method`",[HK9]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[UK9]:"HTTP error ($statusCode): $message",[DK9]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[o49]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[n49]:"The provided value does not implement the `KeyPairSigner` interface",[r49]:"The provided value does not implement the `MessageModifyingSigner` interface",[t49]:"The provided value does not implement the `MessagePartialSigner` interface",[s49]:"The provided value does not implement any of the `MessageSigner` interfaces",[$q9]:"The provided value does not implement the `TransactionModifyingSigner` interface",[Jq9]:"The provided value does not implement the `TransactionPartialSigner` interface",[Qq9]:"The provided value does not implement the `TransactionSendingSigner` interface",[e49]:"The provided value does not implement any of the `TransactionSigner` interfaces",[Xq9]:"More than one `TransactionSendingSigner` was identified.",[Wq9]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[Yq9]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[yV9]:"Cannot export a non-extractable key.",[AV9]:"No digest implementation could be found.",[TV9]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[EV9]:`This runtime does not support the generation of Ed25519 key pairs.
|
|
98
|
+
|
|
99
|
+
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
100
|
+
|
|
101
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[hV9]:"No signature verification implementation could be found.",[xV9]:"No key generation implementation could be found.",[vV9]:"No signing implementation could be found.",[bV9]:"No key export implementation could be found.",[l79]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[K19]:"Transaction processing left an account with an outstanding borrowed reference",[oq9]:"Account in use",[nq9]:"Account loaded twice",[sq9]:"Attempt to debit an account but found no record of a prior credit.",[M19]:"Transaction loads an address table account that doesn't exist",[$19]:"This transaction has already been processed",[J19]:"Blockhash not found",[Q19]:"Loader call chain is too deep",[q19]:"Transactions are currently disabled due to cluster maintenance",[_19]:"Transaction contains a duplicate instruction ($index) that is not allowed",[tq9]:"Insufficient funds for fee",[F19]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[eq9]:"This account may not be used to pay transaction fees",[W19]:"Transaction contains an invalid account reference",[w19]:"Transaction loads an address table account with invalid data",[P19]:"Transaction address table lookup uses an invalid index",[L19]:"Transaction loads an address table account with an invalid owner",[B19]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[G19]:"This program may not be used for executing instructions",[R19]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[U19]:"Transaction loads a writable account that cannot be written",[S19]:"Transaction exceeded max loaded accounts data size cap",[X19]:"Transaction requires a fee but has no signature present",[rq9]:"Attempt to load a program that does not exist",[I19]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[C19]:"ResanitizationNeeded",[V19]:"Transaction failed to sanitize accounts offsets correctly",[Y19]:"Transaction did not pass signature verification",[j19]:"Transaction locked too many accounts",[k19]:"Sum of account balances before and after transaction do not match",[aq9]:"The transaction failed with the error `$errorName`",[D19]:"Transaction version is unsupported",[z19]:"Transaction would exceed account data limit within the block",[N19]:"Transaction would exceed total account data limit",[Z19]:"Transaction would exceed max account limit within the block",[H19]:"Transaction would exceed max Block Cost Limit",[O19]:"Transaction would exceed max Vote Cost Limit",[mq9]:"Attempted to sign a transaction with an address that is not a signer for it",[xq9]:"Transaction is missing an address at index: $index.",[fq9]:"Transaction has no expected signers therefore it cannot be encoded",[uq9]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[Bq9]:"Transaction does not have a blockhash lifetime",[Cq9]:"Transaction is not a durable nonce transaction",[kq9]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[Tq9]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[Eq9]:"No fee payer set in CompiledTransaction",[Aq9]:"Could not find program address at index $index",[pq9]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[dq9]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[vq9]:"Transaction is missing a fee payer.",[bq9]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[gq9]:"Transaction first instruction is not advance nonce account instruction.",[yq9]:"Transaction with no instructions cannot be durable nonce transaction.",[Fq9]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[Sq9]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[lq9]:"The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",[hq9]:"Transaction is missing signatures for addresses: $addresses.",[Iq9]:"Transaction version must be in the range [0, 127]. `$actualVersion` given",[cq9]:"This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 0.",[iq9]:"The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction."},c8="i",sQ="t";function FK9($,J={}){let Q=_K9[$];if(Q.length===0)return"";let X;function W(G){if(X[sQ]===2){let V=Q.slice(X[c8]+1,G);Y.push(V in J?`${J[V]}`:`$${V}`)}else if(X[sQ]===1)Y.push(Q.slice(X[c8],G))}let Y=[];return Q.split("").forEach((G,V)=>{if(V===0){X={[c8]:0,[sQ]:Q[0]==="\\"?0:Q[0]==="$"?2:1};return}let q;switch(X[sQ]){case 0:q={[c8]:V,[sQ]:1};break;case 1:if(G==="\\")q={[c8]:V,[sQ]:0};else if(G==="$")q={[c8]:V,[sQ]:2};break;case 2:if(G==="\\")q={[c8]:V,[sQ]:0};else if(G==="$")q={[c8]:V,[sQ]:2};else if(!G.match(/\w/))q={[c8]:V,[sQ]:1};break}if(q){if(X!==q)W(V);X=q}}),W(),Y.join("")}function SK9($,J={}){return FK9($,J)}var BG=class extends Error{cause=this.cause;context;constructor(...[$,J]){let Q,X;if(J)Object.entries(Object.getOwnPropertyDescriptors(J)).forEach(([Y,G])=>{if(Y==="cause")X={cause:G.value};else{if(Q===void 0)Q={__code:$};Object.defineProperty(Q,Y,G)}});let W=SK9($,Q);super(W,X);this.context=Object.freeze(Q===void 0?{__code:$}:Q),this.name="SolanaError"}};import{setMaxListeners as BK9}from"events";import CK9 from"ws";var IK9=class extends globalThis.EventTarget{constructor(...$){super(...$),BK9(Number.MAX_SAFE_INTEGER,this)}},CG=globalThis.WebSocket?globalThis.WebSocket:CK9,UF=1000;function ZF({sendBufferHighWatermark:$,signal:J,url:Q}){if(J.aborted)return Promise.reject(J.reason);let X,W=!1,Y=new Set;function G(){Y.forEach((h)=>{h()}),Y.clear()}function V(){if(G(),!W)A(J.reason);if(N.readyState!==CG.CLOSED&&N.readyState!==CG.CLOSING)N.close(UF)}function q(h){if(G(),X?.onCancel(),J.removeEventListener("abort",V),N.removeEventListener("close",q),N.removeEventListener("error",H),N.removeEventListener("message",Z),N.removeEventListener("open",R),!J.aborted&&!(h.wasClean&&h.code===UF))M.dispatchEvent(new CustomEvent("error",{detail:new BG(a4,{cause:h})}))}function H(h){if(J.aborted)return;if(!W){let y=new BG(CU,{errorEvent:h});A(y),M.dispatchEvent(new CustomEvent("error",{detail:y}))}}function Z(h){if(J.aborted)return;M.dispatchEvent(new CustomEvent("message",{detail:h.data}))}let M=new IK9,j=OU(M);function R(){W=!0,E({...j,async send(h){if(N.readyState!==CG.OPEN)throw new BG(a4);if(!X&&N.bufferedAmount>$){let y,k=new Promise((v,f)=>{let d=setInterval(()=>{if(N.readyState!==CG.OPEN||!(N.bufferedAmount>$))clearInterval(d),X=void 0,v()},16);y=()=>{X=void 0,clearInterval(d),f(new BG(BU))}});X={onCancel:y,promise:k}}if(X){if(ArrayBuffer.isView(h)&&!(h instanceof DataView))h=new h.constructor(h);await X.promise}N.send(h)}})}let N=new CG(Q);J.addEventListener("abort",V),N.addEventListener("close",q),N.addEventListener("error",H),N.addEventListener("message",Z),N.addEventListener("open",R);let A,E;return new Promise((h,y)=>{A=y,E=h})}function zF($,J,Q){let X="";if(typeof J[0]==="number"){let G=J[0]+1,V=G%10,q=G%100;if(V==1&&q!=11)X=G+"st";else if(V==2&&q!=12)X=G+"nd";else if(V==3&&q!=13)X=G+"rd";else X=G+"th"}else X=`\`${J[0].toString()}\``;let W=J.length>1?J.slice(1).map((G)=>typeof G==="number"?`[${G}]`:G).join("."):void 0,Y=new HF(FU,{argumentLabel:X,keyPath:J,methodName:$,optionalPathLabel:W?` at path \`${W}\``:"",value:Q,...W!==void 0?{path:W}:void 0});return DF(Y,zF),Y}var TK9={defaultCommitment:"confirmed",onIntegerOverflow($,J,Q){throw zF($.methodName,J,Q)}},IU=class extends globalThis.AbortController{constructor(...$){super(...$),kK9(Number.MAX_SAFE_INTEGER,this.signal)}},AK9={jsonrpc:"2.0",method:"ping"};function EK9({abortSignal:$,channel:J,intervalMs:Q}){let X;function W(){J.send(AK9).catch((V)=>{if(KF(V,SU))G.abort()})}function Y(){clearInterval(X),X=setInterval(W,Q)}let G=new IU;return G.signal.addEventListener("abort",()=>{clearInterval(X)}),$.addEventListener("abort",()=>{G.abort()}),J.on("error",()=>{G.abort()},{signal:G.signal}),J.on("message",Y,{signal:G.signal}),Y(),{...J,send(...V){if(!G.signal.aborted)Y();return J.send(...V)}}}function hK9(){return{entries:[],freeChannelIndex:-1}}function xK9($,{maxSubscriptionsPerChannel:J,minChannels:Q}){let X=hK9();function W(){if(X.entries.length<Q){X.freeChannelIndex=-1;return}let Y;for(let G=0;G<X.entries.length;G++){let V=(X.freeChannelIndex+G+2)%X.entries.length,q=X.entries[V];if(q.subscriptionCount<J&&(!Y||Y.subscriptionCount>=q.subscriptionCount))Y={poolIndex:V,subscriptionCount:q.subscriptionCount}}X.freeChannelIndex=Y?.poolIndex??-1}return function({abortSignal:G}){let V;function q(){let H=X.entries.findIndex((Z)=>Z===V);X.entries.splice(H,1),V.dispose(),W()}if(X.freeChannelIndex===-1){let H=new IU,Z=$({abortSignal:H.signal});Z.then((M)=>{M.on("error",q,{signal:H.signal})}).catch(q),V={channel:Z,dispose(){H.abort()},subscriptionCount:0},X.entries.push(V)}else V=X.entries[X.freeChannelIndex];return V.subscriptionCount++,G.addEventListener("abort",function(){if(V.subscriptionCount--,V.subscriptionCount===0)q();else if(X.freeChannelIndex!==-1)X.freeChannelIndex--,W()}),W(),V.channel}}function vK9($){return UJ($,(J)=>WF(J,m4),(J)=>YF(J,f4))}function bK9($){return yK9({...$,jsonSerializer:vK9})}function yK9($){if(/^wss?:/i.test($.url)===!1){let W=$.url.match(/^([^:]+):/);throw new DOMException(W?`Failed to construct 'WebSocket': The URL's scheme must be either 'ws' or 'wss'. '${W[1]}:' is not allowed.`:`Failed to construct 'WebSocket': The URL '${$.url}' is invalid.`)}let{intervalMs:J,...Q}=$;return xK9(({abortSignal:W})=>{return ZF({...Q,sendBufferHighWatermark:$.sendBufferHighWatermark??131072,signal:W}).then($.jsonSerializer).then((Y)=>EK9({abortSignal:W,channel:Y,intervalMs:J??5000}))},{maxSubscriptionsPerChannel:$.maxSubscriptionsPerChannel??100,minChannels:$.minChannels??1})}function gK9($){let J=new Map;return function(X){let{request:W,signal:Y}=X,G=i4([W.methodName,W.params]),V=J.get(G);if(!V){let q=new IU,H=$({...X,signal:q.signal});H.then((Z)=>{Z.on("error",()=>{J.delete(G),q.abort()},{signal:q.signal})}).catch(()=>{}),J.set(G,V={abortController:q,dataPublisherPromise:H,numSubscribers:0})}return V.numSubscribers++,Y.addEventListener("abort",()=>{if(V.numSubscribers--,V.numSubscribers===0)queueMicrotask(()=>{if(V.numSubscribers===0)J.delete(G),V.abortController.abort()})},{signal:V.abortController.signal}),V.dataPublisherPromise}}function mK9({createChannel:$}){return UJ(fK9($),(J)=>gK9(J))}function fK9($){return async({execute:J,signal:Q})=>{let X=await $({abortSignal:Q});return await J({channel:X,signal:Q})}}function lK9($,J){let Q=mK9({createChannel:bK9({...J,url:$})});return pK9(Q)}function kU($,J){return lK9($,J)}function pK9($){return QF({api:qF(TK9),transport:$})}var dK9=1,uK9=2,cK9=3,iK9=4,aK9=5,oK9=6,nK9=7,sK9=8,rK9=9,tK9=10,eK9=-32700,$69=-32603,J69=-32602,Q69=-32601,X69=-32600,W69=-32019,Y69=-32018,G69=-32017,V69=-32016,q69=-32015,K69=-32014,H69=-32013,D69=-32012,U69=-32011,Z69=-32010,z69=-32009,j69=-32008,M69=-32007,L69=-32006,w69=-32005,P69=-32004,R69=-32003,O69=-32002,N69=-32001,_69=2800000,F69=2800001,S69=2800002,B69=2800003,C69=2800004,I69=2800005,k69=2800006,T69=2800007,A69=2800008,E69=2800009,h69=2800010,x69=2800011,v69=3230000,b69=32300001,y69=3230002,g69=3230003,m69=3230004,f69=3610000,l69=3610001,p69=3610002,d69=3610003,u69=3610004,c69=3610005,i69=3610006,a69=3610007,o69=3611000,n69=3704000,s69=3704001,r69=3704002,t69=3704003,e69=3704004,$H9=4128000,JH9=4128001,QH9=4128002,XH9=4615000,WH9=4615001,YH9=4615002,GH9=4615003,VH9=4615004,qH9=4615005,KH9=4615006,HH9=4615007,DH9=4615008,UH9=4615009,ZH9=4615010,zH9=4615011,jH9=4615012,MH9=4615013,LH9=4615014,wH9=4615015,PH9=4615016,RH9=4615017,OH9=4615018,NH9=4615019,_H9=4615020,FH9=4615021,SH9=4615022,BH9=4615023,CH9=4615024,IH9=4615025,kH9=4615026,TH9=4615027,AH9=4615028,EH9=4615029,hH9=4615030,xH9=4615031,vH9=4615032,bH9=4615033,yH9=4615034,gH9=4615035,mH9=4615036,fH9=4615037,lH9=4615038,pH9=4615039,dH9=4615040,uH9=4615041,cH9=4615042,iH9=4615043,aH9=4615044,oH9=4615045,nH9=4615046,sH9=4615047,rH9=4615048,tH9=4615049,eH9=4615050,$D9=4615051,JD9=4615052,QD9=4615053,XD9=4615054,TU=5508000,jF=5508001,MF=5508002,LF=5508003,wF=5508004,PF=5508005,RF=5508006,OF=5508007,NF=5508008,_F=5508009,FF=5508010,WD9=5508011,YD9=5607000,GD9=5607001,VD9=5607002,qD9=5607003,KD9=5607004,HD9=5607005,DD9=5607006,UD9=5607007,ZD9=5607008,zD9=5607009,jD9=5607010,MD9=5607011,LD9=5607012,wD9=5607013,PD9=5607014,RD9=5607015,OD9=5607016,ND9=5607017,_D9=5663000,FD9=5663001,SD9=5663002,BD9=5663003,CD9=5663004,ID9=5663005,kD9=5663006,TD9=5663007,AD9=5663008,ED9=5663009,hD9=5663010,xD9=5663011,vD9=5663012,bD9=5663013,yD9=5663014,gD9=5663015,mD9=5663016,fD9=5663017,lD9=5663018,pD9=5663019,dD9=5663020,uD9=5663021,cD9=5663022,iD9=7050000,aD9=7050001,oD9=7050002,nD9=7050003,sD9=7050004,rD9=7050005,tD9=7050006,eD9=7050007,$U9=7050008,JU9=7050009,QU9=7050010,XU9=7050011,WU9=7050012,YU9=7050013,GU9=7050014,VU9=7050015,qU9=7050016,KU9=7050017,HU9=7050018,DU9=7050019,UU9=7050020,ZU9=7050021,zU9=7050022,jU9=7050023,MU9=7050024,LU9=7050025,wU9=7050026,PU9=7050027,RU9=7050028,OU9=7050029,NU9=7050030,_U9=7050031,FU9=7050032,SU9=7050033,BU9=7050034,CU9=7050035,IU9=7050036,kU9=7618000,TU9=7618001,AU9=7618002,EU9=7618003,hU9=7618004,xU9=7618005,vU9=7618006,bU9=7618007,yU9=7618008,gU9=7618009,mU9=8078000,fU9=8078001,lU9=8078002,pU9=8078003,dU9=8078004,uU9=8078005,cU9=8078006,iU9=8078007,aU9=8078008,oU9=8078009,nU9=8078010,sU9=8078011,rU9=8078012,tU9=8078013,eU9=8078014,$Z9=8078015,JZ9=8078016,QZ9=8078017,XZ9=8078018,WZ9=8078019,YZ9=8078020,GZ9=8078021,VZ9=8078022,qZ9=8078023,KZ9=8100000,HZ9=8100001,DZ9=8100002,UZ9=8100003,ZZ9=8190000,zZ9=8190001,jZ9=8190002,MZ9=8190003,LZ9=8190004,wZ9=9900000,PZ9=9900001,RZ9=9900002,OZ9=9900003,NZ9=9900004,_Z9=9900005,FZ9=9900006;var SZ9={[v69]:"Account not found at address: $address",[m69]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[g69]:"Expected decoded account at address: $address",[y69]:"Failed to decode account data at address: $address",[b69]:"Accounts not found at addresses: $addresses",[E69]:"Unable to find a viable program address bump seed.",[S69]:"$putativeAddress is not a base58-encoded address.",[_69]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[B69]:"The `CryptoKey` must be an `Ed25519` public key.",[x69]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[A69]:"Invalid seeds; point must fall off the Ed25519 curve.",[C69]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[k69]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[T69]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[I69]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[h69]:"Program address cannot end with PDA marker.",[F69]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[iK9]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[dK9]:"The network has progressed past the last block for which this transaction could have been committed.",[mU9]:"Codec [$codecDescription] cannot decode empty byte arrays.",[VZ9]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[YZ9]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[uU9]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[cU9]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[dU9]:"Encoder and decoder must either both be fixed-size or variable-size.",[aU9]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[lU9]:"Expected a fixed-size codec, got a variable-size one.",[tU9]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[pU9]:"Expected a variable-size codec, got a fixed-size one.",[WZ9]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[fU9]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[XZ9]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[oU9]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[nU9]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[$Z9]:"Invalid literal union variant. Expected one of [$variants], got $value.",[iU9]:"Expected [$codecDescription] to have $expected items, got $actual.",[rU9]:"Invalid value $value for base $base with alphabet $alphabet.",[JZ9]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[sU9]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[eU9]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[GZ9]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[QZ9]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[qZ9]:"This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",[o69]:"No random values implementation could be found.",[UH9]:"instruction requires an uninitialized account",[BH9]:"instruction tries to borrow reference for an account which is already borrowed",[CH9]:"instruction left account with an outstanding borrowed reference",[FH9]:"program other than the account's owner changed the size of the account data",[qH9]:"account data too small for instruction",[SH9]:"instruction expected an executable account",[nH9]:"An account does not have enough lamports to be rent-exempt",[rH9]:"Program arithmetic overflowed",[oH9]:"Failed to serialize or deserialize account data: $encodedData",[XD9]:"Builtin programs must consume compute units",[vH9]:"Cross-program invocation call depth too deep",[lH9]:"Computational budget exceeded",[kH9]:"custom program error: #$code",[RH9]:"instruction contains duplicate accounts",[IH9]:"instruction modifications of multiply-passed account differ",[hH9]:"executable accounts must be rent exempt",[AH9]:"instruction changed executable accounts data",[EH9]:"instruction changed the balance of an executable account",[OH9]:"instruction changed executable bit of an account",[LH9]:"instruction modified data of an account it does not own",[MH9]:"instruction spent from the balance of an account it does not own",[WH9]:"generic instruction error",[eH9]:"Provided owner is not allowed",[iH9]:"Account is immutable",[aH9]:"Incorrect authority provided",[HH9]:"incorrect program id for instruction",[KH9]:"insufficient funds for instruction",[VH9]:"invalid account data for instruction",[sH9]:"Invalid account owner",[YH9]:"invalid program argument",[TH9]:"program returned invalid error code",[GH9]:"invalid instruction data",[fH9]:"Failed to reallocate account data",[mH9]:"Provided seeds do not result in a valid address",[$D9]:"Accounts data allocations exceeded the maximum allowed per transaction",[JD9]:"Max accounts exceeded",[QD9]:"Max instruction trace length exceeded",[gH9]:"Length of the seed is too long for address generation",[bH9]:"An account required by the instruction is missing",[DH9]:"missing required signature for instruction",[jH9]:"instruction illegally modified the program id of an account",[_H9]:"insufficient account keys for instruction",[pH9]:"Cross-program invocation with unauthorized signer or writable account",[dH9]:"Failed to create program execution environment",[cH9]:"Program failed to compile",[uH9]:"Program failed to complete",[PH9]:"instruction modified data of a read-only account",[wH9]:"instruction changed the balance of a read-only account",[yH9]:"Cross-program invocation reentrancy not allowed for this instruction",[NH9]:"instruction modified rent epoch of an account",[zH9]:"sum of account balances before and after instruction do not match",[ZH9]:"instruction requires an initialized account",[XH9]:"",[xH9]:"Unsupported program id",[tH9]:"Unsupported sysvar",[_Z9]:"Invalid instruction plan kind: $kind.",[AU9]:"The provided instruction plan is empty.",[xU9]:"No failed transaction plan result was found in the provided transaction plan result.",[hU9]:"This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved \u2014 e.g. by targetting RPCs that support transaction bundles.",[EU9]:"The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",[kU9]:"The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",[FZ9]:"Invalid transaction plan kind: $kind.",[TU9]:"No more instructions to pack; the message packer has completed the instruction plan.",[vU9]:"Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",[bU9]:"Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",[yU9]:"Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",[gU9]:"Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",[$H9]:"The instruction does not have any accounts.",[JH9]:"The instruction does not have any data.",[QH9]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[aK9]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[uK9]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[RZ9]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[NZ9]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[PZ9]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[wZ9]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[OZ9]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[$69]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[J69]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[X69]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[Q69]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[eK9]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[D69]:"$__serverMessage",[N69]:"$__serverMessage",[P69]:"$__serverMessage",[K69]:"$__serverMessage",[G69]:"Epoch rewards period still active at slot $slot",[Z69]:"$__serverMessage",[z69]:"$__serverMessage",[W69]:"Failed to query long-term storage; please try again",[V69]:"Minimum context slot has not been reached",[w69]:"Node is unhealthy; behind by $numSlotsBehind slots",[j69]:"No snapshot",[O69]:"Transaction simulation failed",[Y69]:"Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",[M69]:"$__serverMessage",[U69]:"Transaction history is not available from this node",[L69]:"$__serverMessage",[H69]:"Transaction signature length mismatch",[R69]:"Transaction signature verification failure",[q69]:"$__serverMessage",[n69]:"Key pair bytes must be of length 64, got $byteLength.",[s69]:"Expected private key bytes with length 32. Actual length: $actualLength.",[r69]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[e69]:"The provided private key does not match the provided public key.",[t69]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[oK9]:"Lamports value must be in the range [0, 2e64-1]",[nK9]:"`$value` cannot be parsed as a `BigInt`",[tK9]:"$message",[sK9]:"`$value` cannot be parsed as a `Number`",[cK9]:"No nonce account could be found at address `$nonceAccountAddress`",[qD9]:"Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",[wD9]:"Attempted to sign an offchain message with an address that is not a signer for it",[VD9]:"Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",[LD9]:"The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",[YD9]:"The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",[UD9]:"Expected message format $expectedMessageFormat, got $actualMessageFormat",[ZD9]:"The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",[zD9]:"Offchain message content must be non-empty",[HD9]:"Offchain message must specify the address of at least one required signer",[jD9]:"Offchain message envelope must reserve space for at least one signature",[KD9]:"The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",[RD9]:"The signatories of this offchain message must be listed in lexicographical order",[OD9]:"An address must be listed no more than once among the signatories of an offchain message",[MD9]:"Offchain message is missing signatures for addresses: $addresses.",[ND9]:"Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",[GD9]:"The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",[PD9]:"Expected offchain message version $expectedVersion. Got $actualVersion.",[DD9]:"This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",[ZZ9]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[jZ9]:"WebSocket was closed before payload could be added to the send buffer",[MZ9]:"WebSocket connection closed",[LZ9]:"WebSocket failed to connect",[zZ9]:"Failed to obtain a subscription id from the server",[UZ9]:"Could not find an API plan for RPC method: `$method`",[KZ9]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[DZ9]:"HTTP error ($statusCode): $message",[HZ9]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[TU]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[jF]:"The provided value does not implement the `KeyPairSigner` interface",[LF]:"The provided value does not implement the `MessageModifyingSigner` interface",[wF]:"The provided value does not implement the `MessagePartialSigner` interface",[MF]:"The provided value does not implement any of the `MessageSigner` interfaces",[RF]:"The provided value does not implement the `TransactionModifyingSigner` interface",[OF]:"The provided value does not implement the `TransactionPartialSigner` interface",[NF]:"The provided value does not implement the `TransactionSendingSigner` interface",[PF]:"The provided value does not implement any of the `TransactionSigner` interfaces",[_F]:"More than one `TransactionSendingSigner` was identified.",[FF]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[WD9]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[a69]:"Cannot export a non-extractable key.",[l69]:"No digest implementation could be found.",[f69]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[p69]:`This runtime does not support the generation of Ed25519 key pairs.
|
|
102
|
+
|
|
103
|
+
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
104
|
+
|
|
105
|
+
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[d69]:"No signature verification implementation could be found.",[u69]:"No key generation implementation could be found.",[c69]:"No signing implementation could be found.",[i69]:"No key export implementation could be found.",[rK9]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[qU9]:"Transaction processing left an account with an outstanding borrowed reference",[aD9]:"Account in use",[oD9]:"Account loaded twice",[nD9]:"Attempt to debit an account but found no record of a prior credit.",[jU9]:"Transaction loads an address table account that doesn't exist",[eD9]:"This transaction has already been processed",[$U9]:"Blockhash not found",[JU9]:"Loader call chain is too deep",[VU9]:"Transactions are currently disabled due to cluster maintenance",[NU9]:"Transaction contains a duplicate instruction ($index) that is not allowed",[rD9]:"Insufficient funds for fee",[_U9]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[tD9]:"This account may not be used to pay transaction fees",[XU9]:"Transaction contains an invalid account reference",[LU9]:"Transaction loads an address table account with invalid data",[wU9]:"Transaction address table lookup uses an invalid index",[MU9]:"Transaction loads an address table account with an invalid owner",[SU9]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[YU9]:"This program may not be used for executing instructions",[PU9]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[DU9]:"Transaction loads a writable account that cannot be written",[FU9]:"Transaction exceeded max loaded accounts data size cap",[QU9]:"Transaction requires a fee but has no signature present",[sD9]:"Attempt to load a program that does not exist",[CU9]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[BU9]:"ResanitizationNeeded",[GU9]:"Transaction failed to sanitize accounts offsets correctly",[WU9]:"Transaction did not pass signature verification",[zU9]:"Transaction locked too many accounts",[IU9]:"Sum of account balances before and after transaction do not match",[iD9]:"The transaction failed with the error `$errorName`",[HU9]:"Transaction version is unsupported",[ZU9]:"Transaction would exceed account data limit within the block",[OU9]:"Transaction would exceed total account data limit",[UU9]:"Transaction would exceed max account limit within the block",[KU9]:"Transaction would exceed max Block Cost Limit",[RU9]:"Transaction would exceed max Vote Cost Limit",[gD9]:"Attempted to sign a transaction with an address that is not a signer for it",[hD9]:"Transaction is missing an address at index: $index.",[mD9]:"Transaction has no expected signers therefore it cannot be encoded",[dD9]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[SD9]:"Transaction does not have a blockhash lifetime",[BD9]:"Transaction is not a durable nonce transaction",[ID9]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[kD9]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[AD9]:"No fee payer set in CompiledTransaction",[TD9]:"Could not find program address at index $index",[lD9]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[pD9]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[xD9]:"Transaction is missing a fee payer.",[vD9]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[yD9]:"Transaction first instruction is not advance nonce account instruction.",[bD9]:"Transaction with no instructions cannot be durable nonce transaction.",[_D9]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[FD9]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[fD9]:"The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",[ED9]:"Transaction is missing signatures for addresses: $addresses.",[CD9]:"Transaction version must be in the range [0, 127]. `$actualVersion` given",[uD9]:"This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 0.",[cD9]:"The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction."},i8="i",rQ="t";function BZ9($,J={}){let Q=SZ9[$];if(Q.length===0)return"";let X;function W(G){if(X[rQ]===2){let V=Q.slice(X[i8]+1,G);Y.push(V in J?`${J[V]}`:`$${V}`)}else if(X[rQ]===1)Y.push(Q.slice(X[i8],G))}let Y=[];return Q.split("").forEach((G,V)=>{if(V===0){X={[i8]:0,[rQ]:Q[0]==="\\"?0:Q[0]==="$"?2:1};return}let q;switch(X[rQ]){case 0:q={[i8]:V,[rQ]:1};break;case 1:if(G==="\\")q={[i8]:V,[rQ]:0};else if(G==="$")q={[i8]:V,[rQ]:2};break;case 2:if(G==="\\")q={[i8]:V,[rQ]:0};else if(G==="$")q={[i8]:V,[rQ]:2};else if(!G.match(/\w/))q={[i8]:V,[rQ]:1};break}if(q){if(X!==q)W(V);X=q}}),W(),Y.join("")}function CZ9($,J={}){return BZ9($,J)}var SF=class extends Error{cause=this.cause;context;constructor(...[$,J]){let Q,X;if(J)Object.entries(Object.getOwnPropertyDescriptors(J)).forEach(([Y,G])=>{if(Y==="cause")X={cause:G.value};else{if(Q===void 0)Q={__code:$};Object.defineProperty(Q,Y,G)}});let W=CZ9($,Q);super(W,X);this.context=Object.freeze(Q===void 0?{__code:$}:Q),this.name="SolanaError"}};function AU($){let J={};return $.forEach((Q)=>{if(!J[Q.address])J[Q.address]=Q;else if(J[Q.address]!==Q)throw new SF(TU,{address:Q.address})}),Object.values(J)}function n5($){return"modifyAndSignTransactions"in $&&typeof $.modifyAndSignTransactions==="function"}function LW($){return"signTransactions"in $&&typeof $.signTransactions==="function"}function BF($){return"signAndSendTransactions"in $&&typeof $.signAndSendTransactions==="function"}function s5($){return LW($)||n5($)||BF($)}function IZ9($){return AU(($.accounts??[]).flatMap((J)=>("signer"in J)?J.signer:[]))}function kZ9($){return AU([...$.feePayer&&s5($.feePayer)?[$.feePayer]:[],...$.instructions.flatMap(IZ9)])}async function CF($){let J=await j4($.publicKey);return Object.freeze({address:J,keyPair:$,signMessages:(X)=>Promise.all(X.map(async(W)=>Object.freeze({[J]:await NG($.privateKey,W.content)}))),signTransactions:(X)=>Promise.all(X.map(async(W)=>{let Y=await EN([$],W);return Object.freeze({[J]:Y.signatures[J]})}))})}async function IF($,J){return await CF(await kN($,J))}async function kF($,J){return await CF(await TN($,J))}async function TF($,J){let{partialSigners:Q,modifyingSigners:X}=TZ9(AU(kZ9($).filter(s5)),{identifySendingSigner:!1});return await hZ9($,X,Q,J)}function TZ9($,J={}){let X=J.identifySendingSigner??!0?AZ9($):null,W=$.filter((V)=>V!==X&&(n5(V)||LW(V))),Y=EZ9(W),G=W.filter(LW).filter((V)=>!Y.includes(V));return Object.freeze({modifyingSigners:Y,partialSigners:G,sendingSigner:X})}function AZ9($){let J=$.filter(BF);if(J.length===0)return null;let Q=J.filter((X)=>!n5(X)&&!LW(X));if(Q.length>0)return Q[0];return J[0]}function EZ9($){let J=$.filter(n5);if(J.length===0)return[];let Q=J.filter((X)=>!LW(X));if(Q.length>0)return Q;return[J[0]]}async function hZ9($,J=[],Q=[],X){let W=g4($),Y=await J.reduce(async(V,q)=>{X?.abortSignal?.throwIfAborted();let[H]=await q.modifyAndSignTransactions([await V],X);return Object.freeze(H)},Promise.resolve(W));X?.abortSignal?.throwIfAborted();let G=await Promise.all(Q.map(async(V)=>{let[q]=await V.signTransactions([Y],X);return q}));return Object.freeze({...Y,signatures:Object.freeze(G.reduce((V,q)=>{return{...V,...q}},Y.signatures??{}))})}var Yd9=globalThis.TextEncoder;var o4="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";var xZ9=0,vZ9;vZ9={[xZ9]:"Associated token account owner does not match address derivation"};var bZ9=0,yZ9=1,gZ9=2,mZ9=3,fZ9=4,lZ9=5,pZ9=6,dZ9=7,uZ9=8,cZ9=9,iZ9=10,aZ9=11,oZ9=12,nZ9=13,sZ9=14,rZ9=15,tZ9=16,eZ9=17,$29=18,J29=19,Q29;Q29={[eZ9]:"Account is frozen",[pZ9]:"Already in use",[rZ9]:"Account does not support specified authority type",[lZ9]:"Fixed supply",[yZ9]:"Insufficient funds",[oZ9]:"Invalid instruction",[gZ9]:"Invalid Mint",[dZ9]:"Invalid number of provided signers",[uZ9]:"Invalid number of required signers",[nZ9]:"State is invalid for requested operation",[tZ9]:"This token mint cannot freeze accounts",[$29]:"The provided decimals value different from the Mint decimals",[mZ9]:"Account not associated with this Mint",[iZ9]:"Instruction does not support native tokens",[aZ9]:"Non-native account can only be closed if its balance is zero",[J29]:"Instruction does not support non-native tokens",[bZ9]:"Lamport balance below rent-exempt threshold",[sZ9]:"Operation overflowed",[fZ9]:"Owner does not match",[cZ9]:"State is unititialized"};var hF=(($)=>{return $[$.Uninitialized=0]="Uninitialized",$[$.Initialized=1]="Initialized",$[$.Frozen=2]="Frozen",$})(hF||{});function X29(){return uR(hF)}function W29(){return nH(_X(),36)}function IG(){return nH(_X(),64)}function Y29(){return dR([["Uninitialized",FX()],["TransferFeeConfig",w9(V9([["transferFeeConfigAuthority",Y9()],["withdrawWithheldAuthority",Y9()],["withheldAmount",y$()],["olderTransferFee",AF()],["newerTransferFee",AF()]]),k9())],["TransferFeeAmount",w9(V9([["withheldAmount",y$()]]),k9())],["MintCloseAuthority",w9(V9([["closeAuthority",Y9()]]),k9())],["ConfidentialTransferMint",w9(V9([["authority",n$(Y9(),{prefix:null,noneValue:"zeroes"})],["autoApproveNewAccounts",BJ()],["auditorElgamalPubkey",n$(Y9(),{prefix:null,noneValue:"zeroes"})]]),k9())],["ConfidentialTransferAccount",w9(V9([["approved",BJ()],["elgamalPubkey",Y9()],["pendingBalanceLow",IG()],["pendingBalanceHigh",IG()],["availableBalance",IG()],["decryptableAvailableBalance",W29()],["allowConfidentialCredits",BJ()],["allowNonConfidentialCredits",BJ()],["pendingBalanceCreditCounter",y$()],["maximumPendingBalanceCreditCounter",y$()],["expectedPendingBalanceCreditCounter",y$()],["actualPendingBalanceCreditCounter",y$()]]),k9())],["DefaultAccountState",w9(V9([["state",X29()]]),k9())],["ImmutableOwner",w9(V9([]),k9())],["MemoTransfer",w9(V9([["requireIncomingTransferMemos",BJ()]]),k9())],["NonTransferable",w9(V9([]),k9())],["InterestBearingConfig",w9(V9([["rateAuthority",Y9()],["initializationTimestamp",y$()],["preUpdateAverageRate",DD()],["lastUpdateTimestamp",y$()],["currentRate",DD()]]),k9())],["CpiGuard",w9(V9([["lockCpi",BJ()]]),k9())],["PermanentDelegate",w9(V9([["delegate",Y9()]]),k9())],["NonTransferableAccount",w9(V9([]),k9())],["TransferHook",w9(V9([["authority",Y9()],["programId",Y9()]]),k9())],["TransferHookAccount",w9(V9([["transferring",BJ()]]),k9())],["ConfidentialTransferFee",w9(V9([["authority",n$(Y9(),{prefix:null,noneValue:"zeroes"})],["elgamalPubkey",Y9()],["harvestToMintEnabled",BJ()],["withheldAmount",IG()]]),k9())],["ConfidentialTransferFeeAmount",w9(V9([["withheldAmount",IG()]]),k9())],["MetadataPointer",w9(V9([["authority",n$(Y9(),{prefix:null,noneValue:"zeroes"})],["metadataAddress",n$(Y9(),{prefix:null,noneValue:"zeroes"})]]),k9())],["TokenMetadata",w9(V9([["updateAuthority",n$(Y9(),{prefix:null,noneValue:"zeroes"})],["mint",Y9()],["name",w9(y5(),vQ())],["symbol",w9(y5(),vQ())],["uri",w9(y5(),vQ())],["additionalMetadata",iR(w9(y5(),vQ()),w9(y5(),vQ()))]]),k9())],["GroupPointer",w9(V9([["authority",n$(Y9(),{prefix:null,noneValue:"zeroes"})],["groupAddress",n$(Y9(),{prefix:null,noneValue:"zeroes"})]]),k9())],["TokenGroup",w9(V9([["updateAuthority",n$(Y9(),{prefix:null,noneValue:"zeroes"})],["mint",Y9()],["size",y$()],["maxSize",y$()]]),k9())],["GroupMemberPointer",w9(V9([["authority",n$(Y9(),{prefix:null,noneValue:"zeroes"})],["memberAddress",n$(Y9(),{prefix:null,noneValue:"zeroes"})]]),k9())],["TokenGroupMember",w9(V9([["mint",Y9()],["group",Y9()],["memberNumber",y$()]]),k9())],["ConfidentialMintBurn",FX()],["ScaledUiAmountConfig",w9(V9([["authority",Y9()],["multiplier",HD()],["newMultiplierEffectiveTimestamp",y$()],["newMultiplier",HD()]]),k9())],["PausableConfig",w9(V9([["authority",n$(Y9(),{prefix:null,noneValue:"zeroes"})],["paused",BJ()]]),k9())],["PausableAccount",FX()]],{size:k9()})}function AF(){return V9([["epoch",y$()],["maximumFee",y$()],["transferFeeBasisPoints",k9()]])}function G29(){return V9([["mintAuthority",n$(Y9(),{prefix:vQ(),noneValue:"zeroes"})],["supply",y$()],["decimals",ZD()],["isInitialized",BJ()],["freezeAuthority",n$(Y9(),{prefix:vQ(),noneValue:"zeroes"})],["extensions",n$(cR(pJ(Y29(),{size:"remainder"}),[O4(PR(dJ(),83).encode(1))]),{prefix:null})]])}function V29($){return AP($,G29())}async function xF($,J,Q){let X=await q29($,J,Q);return hP(X),X}async function q29($,J,Q){let X=await EP($,J,Q);return V29(X)}var kG="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";var K29=0,H29;H29={[K29]:"Associated token account owner does not match address derivation"};var D29=0,U29=1,Z29=2,z29=3,j29=4,M29=5,L29=6,w29=7,P29=8,R29=9,O29=10,N29=11,_29=12,F29=13,S29=14,B29=15,C29=16,I29=17,k29=18,T29=19,A29;A29={[I29]:"Account is frozen",[L29]:"Already in use",[B29]:"Account does not support specified authority type",[M29]:"Fixed supply",[U29]:"Insufficient funds",[_29]:"Invalid instruction",[Z29]:"Invalid Mint",[w29]:"Invalid number of provided signers",[P29]:"Invalid number of required signers",[F29]:"State is invalid for requested operation",[C29]:"This token mint cannot freeze accounts",[k29]:"The provided decimals value different from the Mint decimals",[z29]:"Account not associated with this Mint",[O29]:"Instruction does not support native tokens",[N29]:"Non-native account can only be closed if its balance is zero",[T29]:"Instruction does not support non-native tokens",[D29]:"Lamport balance below rent-exempt threshold",[S29]:"Operation overflowed",[j29]:"Owner does not match",[R29]:"State is unititialized"};function E29($){if(!$)throw Error("Expected a Address.");if(typeof $==="object"&&"address"in $)return $.address;if(Array.isArray($))return $[0];return $}function h29($,J){return(Q)=>{if(!Q.value)return Object.freeze({address:$,role:IJ.READONLY});let X=Q.isWritable?IJ.WRITABLE:IJ.READONLY;return Object.freeze({address:E29(Q.value),role:EF(Q.value)?zO(X):X,...EF(Q.value)?{signer:Q.value}:{}})}}function EF($){return!!$&&typeof $==="object"&&"address"in $&&s5($)}async function EU($,J={}){let{programAddress:Q="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}=J;return await VR({programAddress:Q,seeds:[S8().encode($.owner),S8().encode($.tokenProgram),S8().encode($.mint)]})}var Ad9=new Uint8Array([250,166,180,250,13,12,184,70]);var Ed9=new Uint8Array([121,113,108,39,54,51,0,4]);var hd9=new Uint8Array([152,32,222,176,223,237,116,134]);var xd9=new Uint8Array([210,225,30,162,88,184,77,141]);var vd9=new Uint8Array([234,18,32,56,89,141,37,181]);var x29=12;function v29(){return MG(CJ([["discriminator",dJ()],["amount",N4()],["decimals",dJ()]]),($)=>({...$,discriminator:x29}))}function vF($,J){let Q=J?.programAddress??kG,W={source:{value:$.source??null,isWritable:!0},mint:{value:$.mint??null,isWritable:!1},destination:{value:$.destination??null,isWritable:!0},authority:{value:$.authority??null,isWritable:!1}},Y={...$},G=(Y.multiSigners??[]).map((q)=>({address:q.address,role:IJ.READONLY_SIGNER,signer:q})),V=h29(Q);return Object.freeze({accounts:[V(W.source),V(W.mint),V(W.destination),V(W.authority),...G],data:v29().encode(Y),programAddress:Q})}var bd9=new Uint8Array([108,37,171,143,248,30,18,110]);var yd9=new Uint8Array([161,105,88,1,237,221,216,203]);var gd9=new Uint8Array([221,233,49,45,181,202,220,200]);var md9=new Uint8Array([215,228,166,228,84,100,86,123]);var ud9=K0.union([K0.string().transform(($)=>$.replace(/[^0-9.-]+/g,"")),K0.number()]).pipe(K0.coerce.number().min(0.0001).max(999999999)),s4=K0.enum(["abstract","abstract-testnet","base-sepolia","base","avalanche-fuji","avalanche","iotex","solana-devnet","solana","sei","sei-testnet","polygon","polygon-amoy","peaq","story","educhain","skale-base-sepolia"]),TG=["abstract","abstract-testnet","base-sepolia","base","avalanche-fuji","avalanche","iotex","sei","sei-testnet","polygon","polygon-amoy","peaq","story","educhain","skale-base-sepolia"],hU=new Map([["abstract",2741],["abstract-testnet",11124],["base-sepolia",84532],["base",8453],["avalanche-fuji",43113],["avalanche",43114],["iotex",4689],["sei",1329],["sei-testnet",1328],["polygon",137],["polygon-amoy",80002],["peaq",3338],["story",1514],["educhain",41923],["skale-base-sepolia",324705682]]),r5=["solana-devnet","solana"],bF=new Map([["solana-devnet",103],["solana",101]]),id9=Object.fromEntries([...TG,...r5].map(($)=>[hU.get($),$])),y29={id:324705682,name:"SKALE Base Sepolia",nativeCurrency:{name:"Credits",symbol:"CREDITS",decimals:18},rpcUrls:{default:{http:["https://base-sepolia-testnet.skalenodes.com/v1/jubilant-horrible-ancha"]}},blockExplorers:{default:{name:"Blockscout",url:"https://base-sepolia-testnet-explorer.skalenodes.com",apiUrl:"https://base-sepolia-testnet-explorer.skalenodes.com/api"}}};function vU($){let J=yU($);return m6({chain:J,transport:nV()}).extend(HW)}function g29(){return vU("base-sepolia")}function m29(){return vU("avalanche-fuji")}function bU($,J){let Q=yU($),X=l6({chain:Q,transport:nV(),account:ZH(J)});if(gF(Q))return X.extend(HW).extend(PH());return X.extend(HW)}function f29($){return bU("base-sepolia",$)}function l29($){return bU("avalanche-fuji",$)}function AG($){return typeof $==="object"&&$!==null&&"chain"in $&&"transport"in $}function r4($){let J=$;return typeof $==="object"&&$!==null&&typeof J.address==="string"&&typeof J.type==="string"&&typeof J.sign==="function"&&typeof J.signMessage==="function"&&typeof J.signTypedData==="function"&&typeof J.signTransaction==="function"}function yU($){if(!$)throw Error("NETWORK environment variable is not set");switch($){case"abstract":return o6;case"abstract-testnet":return n6;case"base":return tV;case"base-sepolia":return eV;case"avalanche":return s6;case"avalanche-fuji":return r6;case"sei":return WH;case"sei-testnet":return YH;case"polygon":return QH;case"polygon-amoy":return XH;case"peaq":return JH;case"story":return GH;case"educhain":return t6;case"iotex":return e6;case"iotex-testnet":return $H;case"skale-base-sepolia":return y29;default:throw Error(`Unsupported network: ${$}`)}}var p29=new Set([2741,11124]);function gF($){return p29.has($.id)}var d29="https://api.devnet.solana.com",u29="https://api.mainnet-beta.solana.com",c29="wss://api.devnet.solana.com",i29="wss://api.mainnet-beta.solana.com";function mF($){return DU($?E4($):E4(d29))}function fF($){return DU($?A4($):A4(u29))}function EG($,J){if($==="solana-devnet")return mF(J);else if($==="solana")return fF(J);else throw Error("Invalid network")}function a29($,J){if($==="solana-devnet")return kU(E4(J?yF(J):c29));else if($==="solana")return kU(A4(J?yF(J):i29));else throw Error("Invalid network")}function yF($){if($.startsWith("http"))return $.replace("http","ws");return $}function o29($){if(!r5.find((J)=>J===$))throw Error(`Unsupported SVM network: ${$}`);return EG($)}async function n29($){let J=VP.decode($);if(J.length===64)return await IF(J);if(J.length===32)return await kF(J);throw Error(`Unexpected key length: ${J.length}. Expected 32 or 64 bytes.`)}function lF($){return typeof $==="object"&&$!==null&&s5($)}function pF($){return AG($)||r4($)}function dF($){return lF($)}function gU($){return"evm"in $&&"svm"in $}var s29={};N7(s29,{authorizationPrimaryType:()=>r29,authorizationTypes:()=>mU,config:()=>m1,createClientAvalancheFuji:()=>m29,createClientSepolia:()=>g29,createConnectedClient:()=>vU,createSigner:()=>bU,createSignerAvalancheFuji:()=>l29,createSignerSepolia:()=>f29,getChainFromNetwork:()=>yU,isAccount:()=>r4,isSignerWallet:()=>AG,isZkStackChain:()=>gF,usdcABI:()=>$j});var mU={TransferWithAuthorization:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"value",type:"uint256"},{name:"validAfter",type:"uint256"},{name:"validBefore",type:"uint256"},{name:"nonce",type:"bytes32"}]},r29="TransferWithAuthorization",t29={};N7(t29,{SvmAddressRegex:()=>fU});var fU=/^[1-9A-HJ-NP-Za-km-z]{32,44}$/,uF=/^[A-Za-z0-9+/]*={0,2}$/;function t4($){if(typeof globalThis<"u"&&typeof globalThis.btoa==="function")return globalThis.btoa($);return Buffer.from($).toString("base64")}var e29=18,xU=/^0x[0-9a-fA-F]{40}$/,lU=/^0x[a-fA-F0-9]{40}|[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$/,$z9=/^0x[0-9a-fA-F]{64}$/,Jz9=/^0x[0-9a-fA-F]+$/,pU=["exact"],hG=[1],dU=["insufficient_funds","invalid_exact_evm_payload_authorization_valid_after","invalid_exact_evm_payload_authorization_valid_before","invalid_exact_evm_payload_authorization_value","invalid_exact_evm_payload_signature","invalid_exact_evm_payload_undeployed_smart_wallet","invalid_exact_evm_payload_recipient_mismatch","invalid_exact_svm_payload_transaction","invalid_exact_svm_payload_transaction_amount_mismatch","invalid_exact_svm_payload_transaction_create_ata_instruction","invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_payee","invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_asset","invalid_exact_svm_payload_transaction_instructions","invalid_exact_svm_payload_transaction_instructions_length","invalid_exact_svm_payload_transaction_instructions_compute_limit_instruction","invalid_exact_svm_payload_transaction_instructions_compute_price_instruction","invalid_exact_svm_payload_transaction_instructions_compute_price_instruction_too_high","invalid_exact_svm_payload_transaction_instruction_not_spl_token_transfer_checked","invalid_exact_svm_payload_transaction_instruction_not_token_2022_transfer_checked","invalid_exact_svm_payload_transaction_fee_payer_included_in_instruction_accounts","invalid_exact_svm_payload_transaction_fee_payer_transferring_funds","invalid_exact_svm_payload_transaction_not_a_transfer_instruction","invalid_exact_svm_payload_transaction_receiver_ata_not_found","invalid_exact_svm_payload_transaction_sender_ata_not_found","invalid_exact_svm_payload_transaction_simulation_failed","invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata","invalid_network","invalid_payload","invalid_payment_requirements","invalid_scheme","invalid_payment","payment_expired","unsupported_scheme","invalid_x402_version","invalid_transaction_state","invalid_x402_version","settle_exact_svm_block_height_exceeded","settle_exact_svm_transaction_confirmation_timed_out","unsupported_scheme","unexpected_settle_error","unexpected_verify_error"],n4=($)=>Number.isInteger(Number($))&&Number($)>=0,Qz9=($)=>(J)=>J.length<=$,uU=K0.string().regex(xU).or(K0.string().regex(fU)),Xz9=K0.string().regex(lU).or(K0.string().regex(fU)),xG=K0.object({scheme:K0.enum(pU),network:s4,maxAmountRequired:K0.string().refine(n4),resource:K0.string().url(),description:K0.string(),mimeType:K0.string(),outputSchema:K0.record(K0.any()).optional(),payTo:uU,maxTimeoutSeconds:K0.number().int(),asset:Xz9,extra:K0.record(K0.any()).optional()}),Wz9=K0.object({from:K0.string().regex(xU),to:K0.string().regex(xU),value:K0.string().refine(n4).refine(Qz9(e29)),validAfter:K0.string().refine(n4),validBefore:K0.string().refine(n4),nonce:K0.string().regex($z9)}),Yz9=K0.object({signature:K0.string().regex(Jz9),authorization:Wz9}),Gz9=K0.object({transaction:K0.string().regex(uF)}),cU=K0.object({x402Version:K0.number().refine(($)=>hG.includes($)),scheme:K0.enum(pU),network:s4,payload:K0.union([Yz9,Gz9])}),Ju9=K0.object({x402Version:K0.number().refine(($)=>hG.includes($)),error:K0.enum(dU).optional(),accepts:K0.array(xG).optional(),payer:K0.string().regex(lU).optional()}),Vz9=K0.enum(["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD"]),qz9=K0.object({type:K0.literal("http"),method:Vz9,queryParams:K0.record(K0.string(),K0.string()).optional(),bodyType:K0.enum(["json","form-data","multipart-form-data","text","binary"]).optional(),bodyFields:K0.record(K0.string(),K0.any()).optional(),headerFields:K0.record(K0.string(),K0.any()).optional()}),Qu9=K0.discriminatedUnion("type",[qz9]),Kz9=K0.object({resource:K0.string(),type:K0.enum(["http"]),x402Version:K0.number().refine(($)=>hG.includes($)),accepts:K0.array(xG),lastUpdated:K0.date(),metadata:K0.record(K0.any()).optional()}),Xu9=K0.object({paymentPayload:cU,paymentRequirements:xG}),Wu9=K0.object({paymentPayload:cU,paymentRequirements:xG}),Yu9=K0.object({isValid:K0.boolean(),invalidReason:K0.enum(dU).optional(),payer:uU.optional()}),Gu9=K0.object({success:K0.boolean(),errorReason:K0.enum(dU).optional(),payer:uU.optional(),transaction:K0.string().regex(lU),network:s4}),Vu9=K0.object({type:K0.string().optional(),limit:K0.number().optional(),offset:K0.number().optional()}),qu9=K0.object({x402Version:K0.number().refine(($)=>hG.includes($)),items:K0.array(Kz9),pagination:K0.object({limit:K0.number(),offset:K0.number(),total:K0.number()})}),Hz9=K0.object({x402Version:K0.number().refine(($)=>hG.includes($)),scheme:K0.enum(pU),network:s4,extra:K0.record(K0.any()).optional()}),Ku9=K0.object({kinds:K0.array(Hz9)});function e4($){if(hU.has($))return hU.get($);if(bF.has($))return bF.get($);throw Error(`Unsupported network: ${$}`)}var $q={};N7($q,{createDevnetRpcClient:()=>mF,createMainnetRpcClient:()=>fF,createSignerFromBase58:()=>n29,createSvmConnectedClient:()=>o29,decodeTransactionFromPayload:()=>Dz9,getRpcClient:()=>EG,getRpcSubscriptions:()=>a29,getTokenPayerFromTransaction:()=>Uz9,isSignerWallet:()=>lF,signAndSimulateTransaction:()=>Zz9,signTransactionWithSigner:()=>cF});function Dz9($){try{let Q=H4().encode($.transaction);return AN().decode(Q)}catch(J){throw console.error("error",J),Error("invalid_exact_svm_payload_transaction")}}function Uz9($){let J=rO().decode($.messageBytes),Q=J.staticAccounts??[],X=J.instructions??[];for(let W of X){let Y=W.programAddressIndex,G=Q[Y].toString();if(G===o4.toString()||G===kG.toString()){let V=W.accountIndices??[];if(V.length>=4){let q=V[3],H=Q[q].toString();if(H)return H}}}return""}async function Zz9($,J,Q){let X=await cF($,J),W=o5(X),Y={sigVerify:!0,replaceRecentBlockhash:!1,commitment:"confirmed",encoding:"base64",accounts:void 0,innerInstructions:void 0,minContextSlot:void 0};return await Q.simulateTransaction(W,Y).send()}async function cF($,J){if(n5($)){let[Q]=await $.modifyAndSignTransactions([J]);if(!Q)throw Error("transaction_signer_failed_to_return_transaction");return Q}if(LW($)){let[Q]=await $.signTransactions([J]);if(!Q)throw Error("transaction_signer_failed_to_return_signatures");return zz9(J,Q)}throw Error("transaction_signer_must_support_offline_signing")}function zz9($,J){return Object.freeze({...$,signatures:Object.freeze({...$.signatures,...J})})}var zu9=K0.object({paymentHeader:K0.string(),paymentRequirements:xG});var iU="ComputeBudget111111111111111111111111111111";function jz9($){let J="data"in $?$.data:$;if(UW(J,dJ().encode(0),0))return 0;if(UW(J,dJ().encode(1),0))return 1;if(UW(J,dJ().encode(2),0))return 2;if(UW(J,dJ().encode(3),0))return 3;if(UW(J,dJ().encode(4),0))return 4;throw Error("The provided instruction could not be identified as a computeBudget instruction.")}var Mz9=2;function Lz9(){return MG(CJ([["discriminator",dJ()],["units",UD()]]),($)=>({...$,discriminator:Mz9}))}function Jq($,J){let Q=J?.programAddress??iU,X={...$};return Object.freeze({data:Lz9().encode(X),programAddress:Q})}var wz9=3;function Pz9(){return MG(CJ([["discriminator",dJ()],["microLamports",N4()]]),($)=>({...$,discriminator:wz9}))}function Rz9($,J){let Q=J?.programAddress??iU,X={...$};return Object.freeze({data:Pz9().encode(X),programAddress:Q})}var Oz9=1400000;function Nz9($){let J=_z9($);if(J<0)return null;let Q=vQ().decode($.instructions[J].data,1);return{index:J,units:Q}}function _z9($){return $.instructions.findIndex(Fz9)}function Fz9($){return $.programAddress===iU&&jz9($.data)===2}function Sz9($,J){let Q=(H)=>typeof $==="function"?$(H):$,X=Nz9(J);if(!X)return gD(Jq({units:Q(null)}),J);let{index:W,units:Y}=X,G=Q(Y);if(G===Y)return J;let V=Jq({units:G}),q=[...J.instructions];return q.splice(W,1,V),Object.freeze({...J,instructions:q})}async function Bz9({transactionMessage:$,...J}){let Q=!x4($),X=UJ($,(W)=>Sz9(Oz9,W),g4);return await Cz9({transaction:X,replaceRecentBlockhash:Q,...J})}async function Cz9({abortSignal:$,rpc:J,transaction:Q,...X}){let W=o5(Q);try{let{value:{err:Y,unitsConsumed:G}}=await J.simulateTransaction(W,{...X,encoding:"base64",sigVerify:!1}).send({abortSignal:$});if(G==null)throw new I4(B4);let V=G>4294967295n?4294967295:Number(G);if(Y)throw new I4(C4,{cause:Y,unitsConsumed:V});return V}catch(Y){if(ZO(Y,C4))throw Y;throw new I4(B4,{cause:Y})}}function iF({rpc:$}){return async function(Q,X){return await Bz9({...X,rpc:$,transactionMessage:Q})}}function aF($,J){return gD(Rz9({microLamports:$}),J)}function aU($){let J;if(TG.includes($.network)){let Q=$.payload;return J={...$,payload:{...Q,authorization:Object.fromEntries(Object.entries(Q.authorization).map(([X,W])=>[X,typeof W==="bigint"?W.toString():W]))}},t4(JSON.stringify(J))}if(r5.includes($.network))return J={...$,payload:$.payload},t4(JSON.stringify(J));throw Error("Invalid network")}async function kz9($,{from:J,to:Q,value:X,validAfter:W,validBefore:Y,nonce:G},{asset:V,network:q,extra:H}){let Z=e4(q),M=H?.name,j=H?.version,R={types:mU,domain:{name:M,version:j,chainId:Z,verifyingContract:QQ(V)},primaryType:"TransferWithAuthorization",message:{from:QQ(J),to:QQ(Q),value:X,validAfter:W,validBefore:Y,nonce:G}};if(AG($))return{signature:await $.signTypedData(R)};else if(r4($)&&$.signTypedData)return{signature:await $.signTypedData(R)};else throw Error("Invalid wallet client provided does not support signTypedData")}function Tz9(){let $=typeof globalThis.crypto<"u"&&typeof globalThis.crypto.getRandomValues==="function"?globalThis.crypto:ez("crypto").webcrypto;return p0($.getRandomValues(new Uint8Array(32)))}function oF($,J,Q){let X=Tz9(),W=BigInt(Math.floor(Date.now()/1000)-600).toString(),Y=BigInt(Math.floor(Date.now()/1000+Q.maxTimeoutSeconds)).toString();return{x402Version:J,scheme:Q.scheme,network:Q.network,payload:{signature:void 0,authorization:{from:$,to:Q.payTo,value:Q.maxAmountRequired,validAfter:W.toString(),validBefore:Y.toString(),nonce:X}}}}async function nF($,J,Q){let{signature:X}=await kz9($,Q.payload.authorization,J);return{...Q,payload:{...Q.payload,signature:X}}}async function Az9($,J,Q){let X=AG($)?$.account.address:$.address,W=oF(X,J,Q);return nF($,Q,W)}async function sF($,J,Q){let X=await Az9($,J,Q);return aU(X)}async function rF($,J,Q,X){let W=await Ez9($,J,Q,X);return aU(W)}async function Ez9($,J,Q,X){let W=await hz9($,Q,X),Y=await TF(W),G=o5(Y);return{scheme:Q.scheme,network:Q.network,x402Version:J,payload:{transaction:G}}}async function hz9($,J,Q){let X=EG(J.network,Q?.svmConfig?.rpcUrl),W=await xz9($,J,Q),Y=J.extra?.feePayer,G=UJ(eO({version:0}),(M)=>aF(1,M),(M)=>$N(Y,M),(M)=>mD(W,M)),q=await iF({rpc:X})(G),{value:H}=await X.getLatestBlockhash().send();return UJ(G,(M)=>JN(Jq({units:q}),M),(M)=>iO(H,M))}async function xz9($,J,Q){let{asset:X,maxAmountRequired:W,payTo:Y}=J,G=EG(J.network,Q?.svmConfig?.rpcUrl),V=await xF(G,X),q=V.programAddress;if(q.toString()!==o4.toString()&&q.toString()!==kG.toString())throw Error("Asset was not created by a known token program");let[H]=await EU({mint:X,owner:$.address,tokenProgram:q}),[Z]=await EU({mint:X,owner:Y,tokenProgram:q});return[vF({source:H,mint:X,destination:Z,authority:$,amount:BigInt(W),decimals:V.data.decimals},{programAddress:q})]}async function oU($,J,Q,X){if(Q.scheme==="exact"){if(TG.includes(Q.network)){let W=gU($)?$.evm:$;if(!pF(W))throw Error("Invalid evm wallet client provided");return await sF(W,J,Q)}if(r5.includes(Q.network)){let W=gU($)?$.svm:$;if(!dF(W))throw Error("Invalid svm wallet client provided");return await rF(W,J,Q,X)}throw Error("Unsupported network")}throw Error("Unsupported scheme")}function bz9($){let J=$.toLowerCase();if(J.includes("insufficient")||J.includes("not enough")||J.includes("balance"))return"Insufficient USDC balance";if(J.includes("simulation")||J.includes("compute unit"))return"Transaction simulation failed";if(J.includes("blockhash")||J.includes("expired"))return"Transaction expired, please retry";if(J.includes("timeout")||J.includes("timed out"))return"Transaction timed out";if(J.includes("rejected")||J.includes("cancelled"))return"Transaction rejected";if(J.includes("network")||J.includes("connection"))return"Network error";let Q=($.split(".")[0]??$).slice(0,80);return Q.length<$.length?`${Q}...`:$}function tF($){let J=typeof $==="object"&&$!==null?$.accepts:void 0;return(Array.isArray(J)?J:[]).find((X)=>X&&X.scheme==="exact")??null}async function yz9($,J,Q){let X=vJ.encode(J.keypair.secretKey),W=await $q.createSignerFromBase58(X),Y=await oU(W,1,$,{svmConfig:{rpcUrl:Q}}),G=JSON.parse(vz9.from(Y,"base64").toString("utf-8"));return{x402Version:1,scheme:"exact",network:$.network,payload:{transaction:G.payload.transaction}}}async function gz9($){$.callbacks.onPaymentSigning?.();let J;try{J=await yz9($.requirement,$.wallet,$.rpcURL)}catch(G){let V=G instanceof Error?G.message:String(G),q=`Payment failed: ${bz9(V)}`;throw $.callbacks.onPaymentError?.(q),Error(`Setu: ${q}`)}let Q=O7($.wallet),X=await $.baseFetch(`${$.baseURL}/v1/topup`,{method:"POST",headers:{"Content-Type":"application/json",...Q},body:JSON.stringify({paymentPayload:J,paymentRequirement:$.requirement})}),W=await X.text().catch(()=>"");if(!X.ok){if(X.status===400&&W.toLowerCase().includes("already processed"))return{attempts:1};throw $.callbacks.onPaymentError?.(`Topup failed: ${X.status}`),Error(`Setu topup failed (${X.status}): ${W}`)}let Y;try{Y=W?JSON.parse(W):void 0}catch{Y=void 0}if(Y){let G=typeof Y.amount_usd==="string"?parseFloat(Y.amount_usd):Y.amount_usd??Y.amount??0,V=typeof Y.new_balance==="string"?parseFloat(Y.new_balance):Y.new_balance??Y.balance??0;return $.callbacks.onPaymentComplete?.({amountUsd:G,newBalance:V,transactionId:Y.transaction}),{attempts:1,balance:V}}return{attempts:1}}async function eF($){let J=0;while(J<$.maxAttempts){let Q=await gz9($);J+=Q.attempts;let X=typeof Q.balance==="number"?Q.balance:Q.balance!=null?Number(Q.balance):void 0;if(X==null||Number.isNaN(X)||X>=0)return{attemptsUsed:J}}throw Error(`Setu: payment failed after ${J} additional top-ups.`)}var wW={strategy:"auto",systemBreakpoints:1,messageBreakpoints:1,systemPlacement:"first",messagePlacement:"last",cacheType:"ephemeral"};function mz9($){if(!$)return{...wW};return{strategy:$.strategy??wW.strategy,systemBreakpoints:$.systemBreakpoints??wW.systemBreakpoints,messageBreakpoints:$.messageBreakpoints??wW.messageBreakpoints,systemPlacement:$.systemPlacement??wW.systemPlacement,messagePlacement:$.messagePlacement??wW.messagePlacement,cacheType:$.cacheType??wW.cacheType,transform:$.transform}}function $S($,J,Q,X){if(Q<=0)return!1;switch(X){case"first":return $<Q;case"last":{let W=J-Q;return $>=W&&$<J}case"all":return!0}}function fz9($,J,Q,X){let W=0,Y=$.map((V,q)=>$S(q,$.length,J,Q));return{blocks:$.map((V,q)=>{if(V.cache_control)return V;if(W<J&&Y[q])return W++,{...V,cache_control:{type:X}};return V}),used:W}}function nU($,J){let Q=mz9(J);if(Q.strategy===!1)return $;if(Q.strategy==="manual")return $;if(Q.strategy==="custom"&&Q.transform)return Q.transform($);let X=0;if($.system&&Array.isArray($.system)){let W=fz9($.system,Q.systemBreakpoints,Q.systemPlacement,Q.cacheType);$.system=W.blocks,X=W.used}if($.messages&&Array.isArray($.messages)){let W=0,Y=$.messages.length,G=[];for(let V=0;V<Y;V++)if($S(V,Y,Q.messageBreakpoints,Q.messagePlacement))G.push(V);$.messages=$.messages.map((V,q)=>{if(W>=Q.messageBreakpoints)return V;if(!G.includes(q))return V;if(Array.isArray(V.content)){let H=V.content,Z=H.length-1,M=H.map((j,R)=>{if(j.cache_control)return j;if(R===Z&&W<Q.messageBreakpoints)return W++,{...j,cache_control:{type:Q.cacheType}};return j});return{...V,content:M}}if(typeof V.content==="string"&&W<Q.messageBreakpoints)return W++,{...V,content:[{type:"text",text:V.content,cache_control:{type:Q.cacheType}}]};return V})}return $}var lz9="https://api.mainnet-beta.solana.com",pz9=3,dz9=20,Qq=new Map,JS=new Map;async function uz9($){let J=Qq.get($),Q=()=>{},W={promise:new Promise((Y)=>{Q=Y}),resolve:Q};if(Qq.set($,W),J)await J.promise;return()=>{if(Qq.get($)===W)Qq.delete($);Q()}}function QS($,J){let Q=$.replace(/\r$/,"");if(!Q.startsWith(": setu "))return;try{let X=JSON.parse(Q.slice(7));J({costUsd:parseFloat(X.cost_usd??"0"),balanceRemaining:parseFloat(X.balance_remaining??"0"),inputTokens:X.input_tokens?Number(X.input_tokens):void 0,outputTokens:X.output_tokens?Number(X.output_tokens):void 0})}catch{}}function cz9($,J){if(!J.onBalanceUpdate)return $;let Q=$.headers.get("x-balance-remaining"),X=$.headers.get("x-cost-usd");if(Q&&X)return J.onBalanceUpdate({costUsd:parseFloat(X),balanceRemaining:parseFloat(Q)}),$;if(!$.body)return $;let W=J.onBalanceUpdate,Y="",G=new TextDecoder,V=new TransformStream({transform(q,H){H.enqueue(q),Y+=G.decode(q,{stream:!0});let Z=Y.indexOf(`
|
|
106
|
+
`);while(Z!==-1){let M=Y.slice(0,Z);Y=Y.slice(Z+1),QS(M,W),Z=Y.indexOf(`
|
|
107
|
+
`)}},flush(){if(Y.trim())QS(Y,W)}});return new Response($.body.pipeThrough(V),{status:$.status,statusText:$.statusText,headers:$.headers})}async function iz9($,J){try{let W=J.includes("devnet")?"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",Y=await fetch(J,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"getTokenAccountsByOwner",params:[$,{mint:W},{encoding:"jsonParsed"}]})});if(!Y.ok)return 0;let G=await Y.json(),V=0;for(let q of G.result?.value??[])V+=q.account.data.parsed.info.tokenAmount.uiAmount??0;return V}catch{return 0}}function XS($){let{wallet:J,baseURL:Q,rpcURL:X=lz9,callbacks:W={},cache:Y,payment:G}=$,V=G?.maxRequestAttempts??pz9,q=G?.maxPaymentAttempts??dz9,H=G?.topupApprovalMode??"auto",Z=G?.autoPayThresholdUsd??0,M=globalThis.fetch.bind(globalThis);return async(j,R)=>{let N=0;while(N<V){N++;let A=R?.body;if(A&&typeof A==="string")try{let o=JSON.parse(A);if(Y?.promptCacheKey)o.prompt_cache_key=Y.promptCacheKey;if(Y?.promptCacheRetention)o.prompt_cache_retention=Y.promptCacheRetention;let p=Y?.anthropicCaching;if(p!==!1)nU(o,typeof p==="object"?p:void 0);A=JSON.stringify(o)}catch{}let E=new Headers(R?.headers),h=O7(J);E.set("x-wallet-address",h["x-wallet-address"]),E.set("x-wallet-nonce",h["x-wallet-nonce"]),E.set("x-wallet-signature",h["x-wallet-signature"]);let y=await M(j,{...R,body:A,headers:E});if(y.status!==402)return cz9(y,W);let k=await y.json().catch(()=>({})),v=tF(k);if(!v)throw W.onPaymentError?.("Unsupported payment requirement"),Error("Setu: unsupported payment requirement");if(N>=V)throw W.onPaymentError?.("Payment failed after multiple attempts"),Error("Setu: payment failed after multiple attempts");let f=JS.get(J.walletAddress)??0,d=q-f;if(d<=0)throw W.onPaymentError?.("Maximum payment attempts exceeded"),Error("Setu: payment failed after maximum payment attempts.");let c=await uz9(J.walletAddress);try{let o=parseInt(v.maxAmountRequired,10)/1e6,p=0;if(Z>0)p=await iz9(J.walletAddress,X);let u=Z>0&&p>=Z,n=async()=>{if(!W.onPaymentApproval)return;let S=await W.onPaymentApproval({amountUsd:o,currentBalance:p});if(S==="cancel")throw W.onPaymentError?.("Payment cancelled by user"),Error("Setu: payment cancelled by user");if(S==="fiat"){let K=Error("Setu: fiat payment selected");throw K.code="SETU_FIAT_SELECTED",K}};if(!u&&H==="approval")await n();W.onPaymentRequired?.(o,p);let g=async()=>{let S=await eF({requirement:v,wallet:J,rpcURL:X,baseURL:Q,baseFetch:M,maxAttempts:d,callbacks:W}),K=f+S.attemptsUsed;JS.set(J.walletAddress,K)};if(u)try{await g()}catch{await n(),await g()}else await g()}finally{c()}}throw Error("Setu: max attempts exceeded")}}var az9="https://api.setu.ottocode.io",oz9="https://api.mainnet-beta.solana.com",nz9="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",sz9="4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU";function rz9($){return $.endsWith("/")?$.slice(0,-1):$}async function Xq($,J){try{let Q=vJ.decode($.privateKey),W=VJ.fromSecretKey(Q).publicKey.toBase58(),Y=rz9(J??az9),G=Date.now().toString(),V=g1(G,Q),q=await fetch(`${Y}/v1/balance`,{headers:{"x-wallet-address":W,"x-wallet-nonce":G,"x-wallet-signature":V}});if(!q.ok)return null;let H=await q.json();return{walletAddress:H.wallet_address,balance:H.balance_usd,totalSpent:H.total_spent,totalTopups:H.total_topups,requestCount:H.request_count,createdAt:H.created_at,lastRequest:H.last_request}}catch{return null}}async function Wq($,J="mainnet"){try{let Q=vJ.decode($.privateKey),W=VJ.fromSecretKey(Q).publicKey.toBase58(),V=await fetch(J==="devnet"?"https://api.devnet.solana.com":oz9,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"getTokenAccountsByOwner",params:[W,{mint:J==="devnet"?sz9:nz9},{encoding:"jsonParsed"}]})});if(!V.ok)return null;let q=await V.json(),H=0;for(let Z of q.result?.value??[])H+=Z.account.data.parsed.info.tokenAmount.uiAmount??0;return{walletAddress:W,usdcBalance:H,network:J}}catch{return null}}function sU(){let $=VJ.generate();return{privateKey:vJ.encode($.secretKey),publicKey:$.publicKey.toBase58()}}function Yq($){let J=vJ.decode($),Q=VJ.fromSecretKey(J);return{privateKey:$,publicKey:Q.publicKey.toBase58()}}function Gq($){try{let J=vJ.decode($);return VJ.fromSecretKey(J),!0}catch{return!1}}var VS=GS(Xj9(),".openclaw","setu"),t5=GS(VS,"wallet.key");function mc9(){return t5}function Wj9(){try{if(!YS(t5))return null;let $=WS(t5,"utf-8").trim();if(!Gq($))return null;return Yq($)}catch{return null}}function Yj9($){if(!Gq($))throw Error("Invalid Solana private key");let J=Yq($);return Qj9(VS,{recursive:!0}),Jj9(t5,$,{mode:384}),J}function fc9(){let $=Wj9();if($)return $;let J=sU();return Yj9(J.privateKey),J}function lc9(){try{if(!YS(t5))return null;return WS(t5,"utf-8").trim()}catch{return null}}async function pc9($){let[J,Q]=await Promise.all([Xq({privateKey:$}),Wq({privateKey:$})]);return{setu:J?{balance:J.balance,totalSpent:J.totalSpent,requestCount:J.requestCount}:null,wallet:Q?{usdcBalance:Q.usdcBalance,network:Q.network}:null}}
|
|
108
|
+
export{tz as j,XS as k,Gq as l,mc9 as m,Wj9 as n,Yj9 as o,fc9 as p,lc9 as q,pc9 as r};
|