@solana/kit 2.3.0 → 2.4.0-canary-20250709085504
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/index.browser.cjs.map +1 -1
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.development.js +10 -4
- package/dist/index.development.js.map +1 -1
- package/dist/index.native.mjs.map +1 -1
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.production.min.js +196 -196
- package/dist/types/decompile-transaction-message-fetching-lookup-tables.d.ts +2 -2
- package/dist/types/decompile-transaction-message-fetching-lookup-tables.d.ts.map +1 -1
- package/package.json +19 -19
|
@@ -2,10 +2,10 @@ this.globalThis = this.globalThis || {};
|
|
|
2
2
|
this.globalThis.solanaWeb3 = (function (exports) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
var rs=Object.defineProperty;var os=(e,t,n)=>t in e?rs(e,t,{enumerable:true,configurable:true,writable:true,value:n}):e[t]=n;var Dt=(e,t,n)=>os(e,typeof t!="symbol"?t+"":t,n);var wt=1,$e=2,vt=3,Pt=4,xt=5,Ut=6,Bt=7,Mt=8,Ft=9,To=10,go=-32700,po=-32603,Io=-32602,Co=-32601,ho=-32600,is=-32016,Lo=-32015,bo=-32014,as=-32013,Do=-32012,ss=-32011,yo=-32010,wo=-32009,cs=-32008,vo=-32007,Po=-32006,us=-32005,xo=-32004,_s=-32003,yt=-32002,Uo=-32001,Ie=28e5,Ce=2800001,ds=2800002,zt=2800003,kt=2800004,Vt=2800005,Gt=2800006,We=2800007,je=2800008,Ht=2800009,$t=2800010,Wt=2800011,jt=323e4,Kt=32300001,Xt=3230002,Yt=3230003,Jt=3230004,qt=361e4,Zt=3610001,Qt=3610002,en=3610003,tn=3610004,nn=3610005,rn=3610006,on=3610007,an=3611e3,sn=3704e3,cn=3704001,un=3704002,_n=3704003,dn=3704004,ln=4128e3,Rn=4128001,fn=4128002,Bo=4615e3,ls=4615001,Rs=4615002,fs=4615003,As=4615004,Es=4615005,Ss=4615006,Os=4615007,Ns=4615008,ms=4615009,Ts=4615010,gs=4615011,ps=4615012,Is=4615013,Cs=4615014,hs=4615015,Ls=4615016,bs=4615017,Ds=4615018,ys=4615019,ws=4615020,vs=4615021,Ps=4615022,xs=4615023,Us=4615024,Bs=4615025,Ke=4615026,Ms=4615027,Fs=4615028,zs=4615029,ks=4615030,Vs=4615031,Gs=4615032,Hs=4615033,$s=4615034,Ws=4615035,js=4615036,Ks=4615037,Xs=4615038,Ys=4615039,Js=4615040,qs=4615041,Zs=4615042,Qs=4615043,ec=4615044,Mo=4615045,tc=4615046,nc=4615047,rc=4615048,oc=4615049,ic=4615050,ac=4615051,sc=4615052,cc=4615053,uc=4615054,An=5508e3,En=5508001,Sn=5508002,On=5508003,Nn=5508004,mn=5508005,Tn=5508006,gn=5508007,pn=5508008,In=5508009,Xe=5508010,_c=5508011,Cn=5663e3,Ye=5663001,hn=5663002,Ln=5663003,bn=5663004,Dn=5663005,yn=5663006,wn=5663007,vn=5663008,Pn=5663009,dc=5663010,lc=5663011,xn=5663012,Rc=5663013,fc=5663014,Un=5663015,Bn=5663016,Mn=5663017,Je=5663018,qe=5663019,Ze=5663020,Fo=705e4,Ac=7050001,Ec=7050002,Sc=7050003,Oc=7050004,Nc=7050005,mc=7050006,Tc=7050007,gc=7050008,pc=7050009,Ic=7050010,Cc=7050011,hc=7050012,Lc=7050013,bc=7050014,Dc=7050015,yc=7050016,wc=7050017,vc=7050018,Pc=7050019,xc=7050020,Uc=7050021,Bc=7050022,Mc=7050023,Fc=7050024,zc=7050025,kc=7050026,Vc=7050027,Gc=7050028,Hc=7050029,zo=7050030,ko=7050031,$c=7050032,Wc=7050033,jc=7050034,Vo=7050035,Kc=7050036,Fn=8078e3,zn=8078001,kn=8078002,Vn=8078003,Gn=8078004,Hn=8078005,$n=8078006,Wn=8078007,jn=8078008,Kn=8078009,Xn=8078010,Yn=8078011,X=8078012,he=8078013,Jn=8078014,qn=8078015,Zn=8078016,Qn=8078017,er=8078018,Xc=8078019,tr=8078020,nr=8078021,Qe=8078022,Le=81e5,Go=8100001,rr=8100002,or=8100003,ir=819e4,ar=8190001,sr=8190002,ue=8190003,cr=8190004,ur=99e5,_r=9900001,Yc=9900002,dr=9900003,lr=9900004;function Ho(e){return Array.isArray(e)?"%5B"+e.map(Ho).join("%2C%20")+"%5D":typeof e=="bigint"?`${e}n`:encodeURIComponent(String(e!=null&&Object.getPrototypeOf(e)===null?{...e}:e))}function Jc([e,t]){return `${e}=${Ho(t)}`}function qc(e){let t=Object.entries(e).map(Jc).join("&");return btoa(t)}function Zc(e,t={}){{let n=`Solana error #${e}; Decode this error by running \`npx @solana/errors decode -- ${e}`;return Object.keys(t).length&&(n+=` '${qc(t)}'`),`${n}\``}}function M(e,t){return e instanceof Error&&e.name==="SolanaError"?t!==void 0?e.context.__code===t:true:false}var _=class extends Error{constructor(...[t,n]){let r,o;if(n){let{cause:a,...s}=n;a&&(o={cause:a}),Object.keys(s).length>0&&(r=s);}let i=Zc(t,r);super(i,o);Dt(this,"cause",this.cause);Dt(this,"context");this.context={__code:t,...r},this.name="SolanaError";}};function _e(...e){"captureStackTrace"in Error&&typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(...e);}function $o({errorCodeBaseOffset:e,getErrorContext:t,orderedErrorNames:n,rpcEnumError:r},o){let i,a;typeof r=="string"?i=r:(i=Object.keys(r)[0],a=r[i]);let s=n.indexOf(i),c=e+s,u=t(c,i,a),d=new _(c,u);return _e(d,o),d}var Qc=["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 Wo(e,t){let n=Number(e);return $o({errorCodeBaseOffset:4615001,getErrorContext(r,o,i){return r===Bo?{errorName:o,index:n,...i!==void 0?{instructionErrorContext:i}:null}:r===Ke?{code:Number(i),index:n}:r===Mo?{encodedData:i,index:n}:{index:n}},orderedErrorNames:Qc,rpcEnumError:t},Wo)}var eu=["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 et(e){return typeof e=="object"&&"InstructionError"in e?Wo(...e.InstructionError):$o({errorCodeBaseOffset:7050001,getErrorContext(t,n,r){if(t===Fo)return {errorName:n,...r!==void 0?{transactionErrorContext:r}:null};if(t===zo)return {index:Number(r)};if(t===ko||t===Vo)return {accountIndex:Number(r.account_index)}},orderedErrorNames:eu,rpcEnumError:e},et)}function be(e){let t;if(tu(e)){let{code:n,data:r,message:o}=e,i=Number(n);if(i===yt){let{err:a,...s}=r,c=a?{cause:et(a)}:null;t=new _(yt,{...s,...c});}else {let a;switch(i){case po:case Io:case ho:case Co:case go:case Do:case Uo:case xo:case bo:case yo:case wo:case vo:case Po:case Lo:a={__serverMessage:o};break;default:typeof r=="object"&&!Array.isArray(r)&&(a=r);}t=new _(i,a);}}else {let n=typeof e=="object"&&e!==null&&"message"in e&&typeof e.message=="string"?e.message:"Malformed JSON-RPC error with no message attribute";t=new _(To,{error:e,message:n});}return _e(t,be),t}function tu(e){return typeof e=="object"&&e!==null&&"code"in e&&"message"in e&&(typeof e.code=="number"||typeof e.code=="bigint")&&typeof e.message=="string"}var Ql=e=>{let t=e.filter(i=>i.length);if(t.length===0)return e.length?e[0]:new Uint8Array;if(t.length===1)return t[0];let n=t.reduce((i,a)=>i+a.length,0),r=new Uint8Array(n),o=0;return t.forEach(i=>{r.set(i,o),o+=i.length;}),r},nu=(e,t)=>{if(e.length>=t)return e;let n=new Uint8Array(t).fill(0);return n.set(e),n},ru=(e,t)=>nu(e.length<=t?e:e.slice(0,t),t);function de(e,t,n){let r=n===0&&e.length===t.length?e:e.slice(n,n+t.length);return r.length!==t.length?false:t.every((o,i)=>o===r[i])}function G(e,t){return "fixedSize"in t?t.fixedSize:t.getSizeFromValue(e)}function S(e){return Object.freeze({...e,encode:t=>{let n=new Uint8Array(G(t,e));return e.write(t,n,0),n}})}function m(e){return Object.freeze({...e,decode:(t,n=0)=>e.read(t,n)[0]})}function ou(e){return Object.freeze({...e,decode:(t,n=0)=>e.read(t,n)[0],encode:t=>{let n=new Uint8Array(G(t,e));return e.write(t,n,0),n}})}function T(e){return "fixedSize"in e&&typeof e.fixedSize=="number"}function q(e){if(!T(e))throw new _(kn)}function jo(e){return !T(e)}function eR(e){if(!jo(e))throw new _(Vn)}function A(e,t){if(T(e)!==T(t))throw new _(Gn);if(T(e)&&T(t)&&e.fixedSize!==t.fixedSize)throw new _(Hn,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!T(e)&&!T(t)&&e.maxSize!==t.maxSize)throw new _($n,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return {...t,...e,decode:t.decode,encode:e.encode,read:t.read,write:e.write}}function iu(e,t){let n=(r,o,i)=>{let a=e.encode(r);if(Ko(a,t)>=0)throw new _(tr,{encodedBytes:a,hexEncodedBytes:tt(a),hexSentinel:tt(t),sentinel:t});return o.set(a,i),i+=a.length,o.set(t,i),i+=t.length,i};return T(e)?S({...e,fixedSize:e.fixedSize+t.length,write:n}):S({...e,...e.maxSize!=null?{maxSize:e.maxSize+t.length}:{},getSizeFromValue:r=>e.getSizeFromValue(r)+t.length,write:n})}function au(e,t){let n=(r,o)=>{let i=o===0?r:r.slice(o),a=Ko(i,t);if(a===-1)throw new _(nr,{decodedBytes:i,hexDecodedBytes:tt(i),hexSentinel:tt(t),sentinel:t});let s=i.slice(0,a);return [e.decode(s),o+s.length+t.length]};return T(e)?m({...e,fixedSize:e.fixedSize+t.length,read:n}):m({...e,...e.maxSize!=null?{maxSize:e.maxSize+t.length}:{},read:n})}function tR(e,t){return A(iu(e,t),au(e,t))}function Ko(e,t){return e.findIndex((n,r,o)=>t.length===1?n===t[0]:de(o,t,r))}function tt(e){return e.reduce((t,n)=>t+n.toString(16).padStart(2,"0"),"")}function Xo(e,t,n=0){if(t.length-n<=0)throw new _(Fn,{codecDescription:e})}function le(e,t,n,r=0){let o=n.length-r;if(o<t)throw new _(zn,{bytesLength:o,codecDescription:e,expected:t})}function nt(e,t,n){if(t<0||t>n)throw new _(Jn,{bytesLength:n,codecDescription:e,offset:t})}function Rr(e,t){var a,s;let n=(c,u,d)=>{let l=e.encode(c);return d=t.write(l.length,u,d),u.set(l,d),d+l.length};if(T(t)&&T(e))return S({...e,fixedSize:t.fixedSize+e.fixedSize,write:n});let r=T(t)?t.fixedSize:(a=t.maxSize)!=null?a:null,o=T(e)?e.fixedSize:(s=e.maxSize)!=null?s:null,i=r!==null&&o!==null?r+o:null;return S({...e,...i!==null?{maxSize:i}:{},getSizeFromValue:c=>{let u=G(c,e);return G(u,t)+u},write:n})}function fr(e,t){var a,s;let n=(c,u)=>{let[d,l]=t.read(c,u),f=Number(d);return u=l,(u>0||c.length>f)&&(c=c.slice(u,u+f)),le("addDecoderSizePrefix",f,c),[e.decode(c),u+f]};if(T(t)&&T(e))return m({...e,fixedSize:t.fixedSize+e.fixedSize,read:n});let r=T(t)?t.fixedSize:(a=t.maxSize)!=null?a:null,o=T(e)?e.fixedSize:(s=e.maxSize)!=null?s:null,i=r!==null&&o!==null?r+o:null;return m({...e,...i!==null?{maxSize:i}:{},read:n})}function nR(e,t){return A(Rr(e,t),fr(e,t))}function F(e,t){return S({fixedSize:t,write:(n,r,o)=>{let i=e.encode(n),a=i.length>t?i.slice(0,t):i;return r.set(a,o),o+t}})}function z(e,t){return m({fixedSize:t,read:(n,r)=>{le("fixCodecSize",t,n,r),(r>0||n.length>t)&&(n=n.slice(r,r+t)),T(e)&&(n=ru(n,e.fixedSize));let[o]=e.read(n,0);return [o,r+t]}})}function rR(e,t){return A(F(e,t),z(e,t))}function Ar(e,t){return S({...e,write:(n,r,o)=>{let i=u=>Yo(u,r.length),a=t.preOffset?t.preOffset({bytes:r,preOffset:o,wrapBytes:i}):o;nt("offsetEncoder",a,r.length);let s=e.write(n,r,a),c=t.postOffset?t.postOffset({bytes:r,newPreOffset:a,postOffset:s,preOffset:o,wrapBytes:i}):s;return nt("offsetEncoder",c,r.length),c}})}function Er(e,t){return m({...e,read:(n,r)=>{let o=u=>Yo(u,n.length),i=t.preOffset?t.preOffset({bytes:n,preOffset:r,wrapBytes:o}):r;nt("offsetDecoder",i,n.length);let[a,s]=e.read(n,i),c=t.postOffset?t.postOffset({bytes:n,newPreOffset:i,postOffset:s,preOffset:r,wrapBytes:o}):s;return nt("offsetDecoder",c,n.length),[a,c]}})}function oR(e,t){return A(Ar(e,t),Er(e,t))}function Yo(e,t){return t===0?0:(e%t+t)%t}function Sr(e,t){if(T(e)){let n=t(e.fixedSize);if(n<0)throw new _(he,{bytesLength:n,codecDescription:"resizeEncoder"});return S({...e,fixedSize:n})}return S({...e,getSizeFromValue:n=>{let r=t(e.getSizeFromValue(n));if(r<0)throw new _(he,{bytesLength:r,codecDescription:"resizeEncoder"});return r}})}function Or(e,t){if(T(e)){let n=t(e.fixedSize);if(n<0)throw new _(he,{bytesLength:n,codecDescription:"resizeDecoder"});return m({...e,fixedSize:n})}return e}function iR(e,t){return A(Sr(e,t),Or(e,t))}function su(e,t){return Ar(Sr(e,n=>n+t),{preOffset:({preOffset:n})=>n+t})}function cu(e,t){return Ar(Sr(e,n=>n+t),{postOffset:({postOffset:n})=>n+t})}function uu(e,t){return Er(Or(e,n=>n+t),{preOffset:({preOffset:n})=>n+t})}function Nr(e,t){return Er(Or(e,n=>n+t),{postOffset:({postOffset:n})=>n+t})}function aR(e,t){return A(su(e,t),uu(e,t))}function sR(e,t){return A(cu(e,t),Nr(e,t))}function Jo(e,t,n,r,o=0){for(;n<--r;){let i=e[n];t[n+o]=e[r],t[r+o]=i,n++;}n===r&&(t[n+o]=e[n]);}function _u(e){return q(e),S({...e,write:(t,n,r)=>{let o=e.write(t,n,r);return Jo(n,n,r,r+e.fixedSize),o}})}function du(e){return q(e),m({...e,read:(t,n)=>{let r=t.slice();return Jo(t,r,n,n+e.fixedSize),e.read(r,n)}})}function cR(e){return A(_u(e),du(e))}function p(e,t){return S({...jo(e)?{...e,getSizeFromValue:n=>e.getSizeFromValue(t(n))}:e,write:(n,r,o)=>e.write(t(n),r,o)})}function g(e,t){return m({...e,read:(n,r)=>{let[o,i]=e.read(n,r);return [t(o,n,r),i]}})}function uR(e,t,n){return ou({...p(e,t),read:n?g(e,n).read:e.read})}function ni(e,t,n=t){if(!t.match(new RegExp(`^[${e}]*$`)))throw new _(X,{alphabet:e,base:e.length,value:n})}var Tr=e=>S({getSizeFromValue:t=>{let[n,r]=qo(t,e[0]);if(!r)return t.length;let o=Zo(r,e);return n.length+Math.ceil(o.toString(16).length/2)},write(t,n,r){if(ni(e,t),t==="")return r;let[o,i]=qo(t,e[0]);if(!i)return n.set(new Uint8Array(o.length).fill(0),r),r+o.length;let a=Zo(i,e),s=[];for(;a>0n;)s.unshift(Number(a%256n)),a/=256n;let c=[...Array(o.length).fill(0),...s];return n.set(c,r),r+c.length}}),gr=e=>m({read(t,n){let r=n===0?t:t.slice(n);if(r.length===0)return ["",0];let o=r.findIndex(c=>c!==0);o=o===-1?r.length:o;let i=e[0].repeat(o);if(o===r.length)return [i,t.length];let a=r.slice(o).reduce((c,u)=>c*256n+BigInt(u),0n),s=lu(a,e);return [i+s,t.length]}}),ri=e=>A(Tr(e),gr(e));function qo(e,t){let[n,r]=e.split(new RegExp(`((?!${t}).*)`));return [n,r]}function Zo(e,t){let n=BigInt(t.length),r=0n;for(let o of e)r*=n,r+=BigInt(t.indexOf(o));return r}function lu(e,t){let n=BigInt(t.length),r=[];for(;e>0n;)r.unshift(t[Number(e%n)]),e/=n;return r.join("")}var pr="0123456789",RR=()=>Tr(pr),fR=()=>gr(pr),AR=()=>ri(pr),Qo={alphabet:"0123456789abcdef",base:16};function mr(e){if(e>=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-55;if(e>=97&&e<=102)return e-87}var Ru=()=>S({getSizeFromValue:e=>Math.ceil(e.length/2),write(e,t,n){let r=e.length,o=r/2;if(r===1){let a=e.charCodeAt(0),s=mr(a);if(s===void 0)throw new _(X,{...Qo,value:e});return t.set([s],n),1+n}let i=new Uint8Array(o);for(let a=0,s=0;a<o;a++){let c=e.charCodeAt(s++),u=e.charCodeAt(s++),d=mr(c),l=mr(u);if(d===void 0||l===void 0&&!Number.isNaN(u))throw new _(X,{...Qo,value:e});i[a]=Number.isNaN(u)?d:d<<4|(l!=null?l:0);}return t.set(i,n),i.length+n}}),fu=()=>m({read(e,t){return [e.slice(t).reduce((r,o)=>r+o.toString(16).padStart(2,"0"),""),e.length]}}),ER=()=>A(Ru(),fu()),Ir="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",oe=()=>Tr(Ir),Re=()=>gr(Ir),SR=()=>ri(Ir),Au=(e,t)=>S({getSizeFromValue:n=>Math.floor(n.length*t/8),write(n,r,o){if(ni(e,n),n==="")return o;let i=[...n].map(s=>e.indexOf(s)),a=oi(i,t,8,false);return r.set(a,o),a.length+o}}),Eu=(e,t)=>m({read(n,r=0){let o=r===0?n:n.slice(r);return o.length===0?["",n.length]:[oi([...o],8,t,true).map(a=>e[a]).join(""),n.length]}}),OR=(e,t)=>A(Au(e,t),Eu(e,t));function oi(e,t,n,r){let o=[],i=0,a=0,s=(1<<n)-1;for(let c of e)for(i=i<<t|c,a+=t;a>=n;)a-=n,o.push(i>>a&s);return r&&a>0&&o.push(i<<n-a&s),o}var ei="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",De=()=>S({getSizeFromValue:e=>{try{return atob(e).length}catch{throw new _(X,{alphabet:ei,base:64,value:e})}},write(e,t,n){try{let r=atob(e).split("").map(o=>o.charCodeAt(0));return t.set(r,n),r.length+n}catch{throw new _(X,{alphabet:ei,base:64,value:e})}}}),Cr=()=>m({read(e,t=0){let n=e.slice(t);return [btoa(String.fromCharCode(...n)),e.length]}}),NR=()=>A(De(),Cr()),Su=e=>e.replace(/\u0000/g,""),mR=(e,t)=>e.padEnd(t,"\0"),Ou=globalThis.TextDecoder,ti=globalThis.TextEncoder,Nu=()=>{let e;return S({getSizeFromValue:t=>(e||(e=new ti)).encode(t).length,write:(t,n,r)=>{let o=(e||(e=new ti)).encode(t);return n.set(o,r),r+o.length}})},mu=()=>{let e;return m({read(t,n){let r=(e||(e=new Ou)).decode(t.slice(n));return [Su(r),t.length]}})},TR=()=>A(Nu(),mu());var CR=128;function hR(e,t){try{return "exists"in e&&!e.exists?e:Object.freeze({...e,data:t.decode(e.data)})}catch{throw new _(Xt,{address:e.address})}}function ii(e){return !("exists"in e)||"exists"in e&&e.exists}function LR(e){if(ii(e)&&e.data instanceof Uint8Array)throw new _(Yt,{address:e.address})}function ai(e){let t=e.filter(n=>ii(n)&&n.data instanceof Uint8Array);if(t.length>0){let n=t.map(r=>r.address);throw new _(Jt,{addresses:n})}}function rt(e,t){if(!t)return Object.freeze({address:e,exists:false});let n=De().encode(t.data[0]);return Object.freeze({...hr(t),address:e,data:n,exists:true})}function bR(e,t){if(!t)return Object.freeze({address:e,exists:false});let n=oe().encode(typeof t.data=="string"?t.data:t.data[0]);return Object.freeze({...hr(t),address:e,data:n,exists:true})}function si(e,t){if(!t)return Object.freeze({address:e,exists:false});let n=t.data.parsed.info;return Object.freeze({...hr(t),address:e,data:n,exists:true})}function hr(e){return Object.freeze({executable:e.executable,lamports:e.lamports,programAddress:e.owner,space:e.space})}async function DR(e,t,n={}){let{abortSignal:r,...o}=n,i=await e.getAccountInfo(t,{...o,encoding:"base64"}).send({abortSignal:r});return rt(t,i.value)}async function yR(e,t,n={}){let{abortSignal:r,...o}=n,{value:i}=await e.getAccountInfo(t,{...o,encoding:"jsonParsed"}).send({abortSignal:r});return i&&typeof i=="object"&&"parsed"in i.data?si(t,i):rt(t,i)}async function wR(e,t,n={}){let{abortSignal:r,...o}=n;return (await e.getMultipleAccounts(t,{...o,encoding:"base64"}).send({abortSignal:r})).value.map((a,s)=>rt(t[s],a))}async function ci(e,t,n={}){let{abortSignal:r,...o}=n;return (await e.getMultipleAccounts(t,{...o,encoding:"jsonParsed"}).send({abortSignal:r})).value.map((a,s)=>a&&typeof a=="object"&&"parsed"in a.data?si(t[s],a):rt(t[s],a))}function vR(e){if(!e.exists)throw new _(jt,{address:e.address})}function ui(e){let t=e.filter(n=>!n.exists);if(t.length>0){let n=t.map(r=>r.address);throw new _(Kt,{addresses:n})}}function _i(){if(typeof globalThis.crypto>"u"||typeof globalThis.crypto.getRandomValues!="function")throw new _(an)}function ye(){if(!globalThis.isSecureContext)throw new _(qt)}var ie;async function Tu(e){return ie===void 0&&(ie=new Promise(t=>{e.generateKey("Ed25519",false,["sign","verify"]).then(()=>{t(ie=true);}).catch(()=>{t(ie=false);});})),typeof ie=="boolean"?ie:await ie}function di(){var e;if(ye(),typeof globalThis.crypto>"u"||typeof((e=globalThis.crypto.subtle)==null?void 0:e.digest)!="function")throw new _(Zt)}async function li(){var e;if(ye(),typeof globalThis.crypto>"u"||typeof((e=globalThis.crypto.subtle)==null?void 0:e.generateKey)!="function")throw new _(tn);if(!await Tu(globalThis.crypto.subtle))throw new _(Qt)}function ot(){var e;if(ye(),typeof globalThis.crypto>"u"||typeof((e=globalThis.crypto.subtle)==null?void 0:e.exportKey)!="function")throw new _(en)}function Ri(){var e;if(ye(),typeof globalThis.crypto>"u"||typeof((e=globalThis.crypto.subtle)==null?void 0:e.sign)!="function")throw new _(nn)}function fi(){var e;if(ye(),typeof globalThis.crypto>"u"||typeof((e=globalThis.crypto.subtle)==null?void 0:e.verify)!="function")throw new _(rn)}var Lr,br;function Dr(){return Lr||(Lr=oe()),Lr}function gu(){return br||(br=Re()),br}function we(e){if(e.length<32||e.length>44)return false;let t=Dr();try{return t.encode(e).byteLength===32}catch{return false}}function ae(e){if(e.length<32||e.length>44)throw new _(Ce,{actualLength:e.length});let r=Dr().encode(e).byteLength;if(r!==32)throw new _(Ie,{actualLength:r})}function pu(e){return ae(e),e}function se(){return p(F(Dr(),32),e=>pu(e))}function Y(){return z(gu(),32)}function yr(){return A(se(),Y())}function st(){return new Intl.Collator("en",{caseFirst:"lower",ignorePunctuation:false,localeMatcher:"best fit",numeric:false,sensitivity:"variant",usage:"sort"}).compare}var Iu=37095705934669439343138083508754565189542113879843219016388785533085940283555n,b=57896044618658097711785492504343953926634992332820282019728792003956564819949n,Ai=19681161376707505956807079304988542015446066515923890162744021073123829784752n;function w(e){let t=e%b;return t>=0n?t:b+t}function H(e,t){let n=e;for(;t-- >0n;)n*=n,n%=b;return n}function Cu(e){let n=e*e%b*e%b,r=H(n,2n)*n%b,o=H(r,1n)*e%b,i=H(o,5n)*o%b,a=H(i,10n)*i%b,s=H(a,20n)*a%b,c=H(s,40n)*s%b,u=H(c,80n)*c%b,d=H(u,80n)*c%b,l=H(d,10n)*i%b;return H(l,2n)*e%b}function hu(e,t){let n=w(t*t*t),r=w(n*n*t),o=Cu(e*r),i=w(e*n*o),a=w(t*i*i),s=i,c=w(i*Ai),u=a===e,d=a===w(-e),l=a===w(-e*Ai);return u&&(i=s),(d||l)&&(i=c),(w(i)&1n)===1n&&(i=w(-i)),!u&&!d?null:i}function Lu(e,t){let n=w(e*e),r=w(n-1n),o=w(Iu*n+1n),i=hu(r,o);if(i===null)return false;let a=(t&128)!==0;return !(i===0n&&a)}function bu(e){let t=e.toString(16);return t.length===1?`0${t}`:t}function Du(e){let n=`0x${e.reduce((r,o,i)=>`${bu(i===31?o&-129:o)}${r}`,"")}`;return BigInt(n)}function Si(e){if(e.byteLength!==32)return false;let t=Du(e);return Lu(t,e[31])}function yu(e){let t=yr().encode(e);return Si(t)===false}function wu(e){if(!yu(e))throw new _(Wt)}function kR(e){return wu(e),e}function VR(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="string"&&typeof e[1]=="number"&&e[1]>=0&&e[1]<=255&&we(e[0])}function GR(e){if(!(Array.isArray(e)&&e.length===2&&typeof e[0]=="string"&&typeof e[1]=="number"))throw new _(kt);if(e[1]<0||e[1]>255)throw new _(Vt,{bump:e[1]});ae(e[0]);}var at=32,Ei=16,it=[80,114,111,103,114,97,109,68,101,114,105,118,101,100,65,100,100,114,101,115,115];async function vu({programAddress:e,seeds:t}){if(di(),t.length>Ei)throw new _(Gt,{actual:t.length,maxSeeds:Ei});let n,r=t.reduce((c,u,d)=>{let l=typeof u=="string"?(n||(n=new TextEncoder)).encode(u):u;if(l.byteLength>at)throw new _(We,{actual:l.byteLength,index:d,maxSeedLength:at});return c.push(...l),c},[]),o=yr(),i=o.encode(e),a=await crypto.subtle.digest("SHA-256",new Uint8Array([...r,...i,...it])),s=new Uint8Array(a);if(Si(s))throw new _(je);return o.decode(s)}async function HR({programAddress:e,seeds:t}){let n=255;for(;n>0;)try{return [await vu({programAddress:e,seeds:[...t,new Uint8Array([n])]}),n]}catch(r){if(M(r,je))n--;else throw r}throw new _(Ht)}async function $R({baseAddress:e,programAddress:t,seed:n}){let{encode:r,decode:o}=yr(),i=typeof n=="string"?new TextEncoder().encode(n):n;if(i.byteLength>at)throw new _(We,{actual:i.byteLength,index:0,maxSeedLength:at});let a=r(t);if(a.length>=it.length&&a.slice(-it.length).every((u,d)=>u===it[d]))throw new _($t);let s=await crypto.subtle.digest("SHA-256",new Uint8Array([...r(e),...i,...a])),c=new Uint8Array(s);return o(c)}async function ct(e){if(ot(),e.type!=="public"||e.algorithm.name!=="Ed25519")throw new _(zt);let t=await crypto.subtle.exportKey("raw",e);return Y().decode(new Uint8Array(t))}async function WR(e){let t=se().encode(e);return await crypto.subtle.importKey("raw",t,{name:"Ed25519"},true,["verify"])}function Oi(e,t,n,r){if(r<t||r>n)throw new _(Yn,{codecDescription:e,max:n,min:t,value:r})}var Pu=(e=>(e[e.Little=0]="Little",e[e.Big=1]="Big",e))(Pu||{});function Ni(e){return (e==null?void 0:e.endian)!==1}function v(e){return S({fixedSize:e.size,write(t,n,r){e.range&&Oi(e.name,e.range[0],e.range[1],t);let o=new ArrayBuffer(e.size);return e.set(new DataView(o),t,Ni(e.config)),n.set(new Uint8Array(o),r),r+e.size}})}function P(e){return m({fixedSize:e.size,read(t,n=0){Xo(e.name,t,n),le(e.name,e.size,t,n);let r=new DataView(xu(t,n,e.size));return [e.get(r,Ni(e.config)),n+e.size]}})}function xu(e,t,n){let r=e.byteOffset+(t!=null?t:0),o=n!=null?n:e.byteLength;return e.buffer.slice(r,r+o)}var Uu=(e={})=>v({config:e,name:"f32",set:(t,n,r)=>t.setFloat32(0,Number(n),r),size:4}),Bu=(e={})=>P({config:e,get:(t,n)=>t.getFloat32(0,n),name:"f32",size:4}),YR=(e={})=>A(Uu(e),Bu(e)),Mu=(e={})=>v({config:e,name:"f64",set:(t,n,r)=>t.setFloat64(0,Number(n),r),size:8}),Fu=(e={})=>P({config:e,get:(t,n)=>t.getFloat64(0,n),name:"f64",size:8}),JR=(e={})=>A(Mu(e),Fu(e)),zu=(e={})=>v({config:e,name:"i128",range:[-BigInt("0x7fffffffffffffffffffffffffffffff")-1n,BigInt("0x7fffffffffffffffffffffffffffffff")],set:(t,n,r)=>{let o=r?8:0,i=r?0:8,a=0xffffffffffffffffn;t.setBigInt64(o,BigInt(n)>>64n,r),t.setBigUint64(i,BigInt(n)&a,r);},size:16}),ku=(e={})=>P({config:e,get:(t,n)=>{let r=n?8:0,o=n?0:8,i=t.getBigInt64(r,n),a=t.getBigUint64(o,n);return (i<<64n)+a},name:"i128",size:16}),qR=(e={})=>A(zu(e),ku(e)),Vu=(e={})=>v({config:e,name:"i16",range:[-32767-1,32767],set:(t,n,r)=>t.setInt16(0,Number(n),r),size:2}),Gu=(e={})=>P({config:e,get:(t,n)=>t.getInt16(0,n),name:"i16",size:2}),ZR=(e={})=>A(Vu(e),Gu(e)),Hu=(e={})=>v({config:e,name:"i32",range:[-2147483647-1,2147483647],set:(t,n,r)=>t.setInt32(0,Number(n),r),size:4}),$u=(e={})=>P({config:e,get:(t,n)=>t.getInt32(0,n),name:"i32",size:4}),QR=(e={})=>A(Hu(e),$u(e)),Wu=(e={})=>v({config:e,name:"i64",range:[-BigInt("0x7fffffffffffffff")-1n,BigInt("0x7fffffffffffffff")],set:(t,n,r)=>t.setBigInt64(0,BigInt(n),r),size:8}),ju=(e={})=>P({config:e,get:(t,n)=>t.getBigInt64(0,n),name:"i64",size:8}),ef=(e={})=>A(Wu(e),ju(e)),Ku=()=>v({name:"i8",range:[-127-1,127],set:(e,t)=>e.setInt8(0,Number(t)),size:1}),Xu=()=>P({get:e=>e.getInt8(0),name:"i8",size:1}),tf=()=>A(Ku(),Xu()),$=()=>S({getSizeFromValue:e=>e<=127?1:e<=16383?2:3,maxSize:3,write:(e,t,n)=>{Oi("shortU16",0,65535,e);let r=[0];for(let o=0;;o+=1){let i=Number(e)>>o*7;if(i===0)break;let a=127&i;r[o]=a,o>0&&(r[o-1]|=128);}return t.set(r,n),n+r.length}}),k=()=>m({maxSize:3,read:(e,t)=>{let n=0,r=0;for(;++r;){let o=r-1,i=e[t+o],a=127&i;if(n|=a<<o*7,(i&128)===0)break}return [n,t+r]}}),nf=()=>A($(),k()),Yu=(e={})=>v({config:e,name:"u128",range:[0n,BigInt("0xffffffffffffffffffffffffffffffff")],set:(t,n,r)=>{let o=r?8:0,i=r?0:8,a=0xffffffffffffffffn;t.setBigUint64(o,BigInt(n)>>64n,r),t.setBigUint64(i,BigInt(n)&a,r);},size:16}),Ju=(e={})=>P({config:e,get:(t,n)=>{let r=n?8:0,o=n?0:8,i=t.getBigUint64(r,n),a=t.getBigUint64(o,n);return (i<<64n)+a},name:"u128",size:16}),rf=(e={})=>A(Yu(e),Ju(e)),qu=(e={})=>v({config:e,name:"u16",range:[0,65535],set:(t,n,r)=>t.setUint16(0,Number(n),r),size:2}),Zu=(e={})=>P({config:e,get:(t,n)=>t.getUint16(0,n),name:"u16",size:2}),of=(e={})=>A(qu(e),Zu(e)),ve=(e={})=>v({config:e,name:"u32",range:[0,4294967295],set:(t,n,r)=>t.setUint32(0,Number(n),r),size:4}),wr=(e={})=>P({config:e,get:(t,n)=>t.getUint32(0,n),name:"u32",size:4}),af=(e={})=>A(ve(e),wr(e)),vr=(e={})=>v({config:e,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(t,n,r)=>t.setBigUint64(0,BigInt(n),r),size:8}),Pr=(e={})=>P({config:e,get:(t,n)=>t.getBigUint64(0,n),name:"u64",size:8}),sf=(e={})=>A(vr(e),Pr(e)),D=()=>v({name:"u8",range:[0,255],set:(e,t)=>e.setUint8(0,Number(t)),size:1}),L=()=>P({get:e=>e.getUint8(0),name:"u8",size:1}),cf=()=>A(D(),L());function mi(e,t,n){if(t!==n)throw new _(Wn,{actual:n,codecDescription:e,expected:t})}function Qu(e){return e.reduce((t,n)=>t===null||n===null?null:Math.max(t,n),0)}function ee(e){return e.reduce((t,n)=>t===null||n===null?null:t+n,0)}function fe(e){return T(e)?e.fixedSize:null}function ce(e){var t;return T(e)?e.fixedSize:(t=e.maxSize)!=null?t:null}function V(e,t={}){var i,a;let n=(i=t.size)!=null?i:ve(),r=ut(n,fe(e)),o=(a=ut(n,ce(e)))!=null?a:void 0;return S({...r!==null?{fixedSize:r}:{getSizeFromValue:s=>(typeof n=="object"?G(s.length,n):0)+[...s].reduce((u,d)=>u+G(d,e),0),maxSize:o},write:(s,c,u)=>(typeof n=="number"&&mi("array",n,s.length),typeof n=="object"&&(u=n.write(s.length,c,u)),s.forEach(d=>{u=e.write(d,c,u);}),u)})}function U(e,t={}){var a,s;let n=(a=t.size)!=null?a:wr(),r=fe(e),o=ut(n,r),i=(s=ut(n,ce(e)))!=null?s:void 0;return m({...o!==null?{fixedSize:o}:{maxSize:i},read:(c,u)=>{let d=[];if(typeof n=="object"&&c.slice(u).length===0)return [d,u];if(n==="remainder"){for(;u<c.length;){let[O,E]=e.read(c,u);u=E,d.push(O);}return [d,u]}let[l,f]=typeof n=="number"?[n,u]:n.read(c,u);u=f;for(let O=0;O<l;O+=1){let[E,N]=e.read(c,u);u=N,d.push(E);}return [d,u]}})}function Rf(e,t={}){return A(V(e,t),U(e,t))}function ut(e,t){return typeof e!="number"?null:e===0?0:t===null?null:t*e}function e_(e,t={}){var o;let r=(o=(typeof t=="boolean"?{backward:t}:t).backward)!=null?o:false;return S({fixedSize:e,write(i,a,s){var u;let c=[];for(let d=0;d<e;d+=1){let l=0;for(let f=0;f<8;f+=1){let O=Number((u=i[d*8+f])!=null?u:0);l|=O<<(r?f:7-f);}r?c.unshift(l):c.push(l);}return a.set(c,s),e}})}function t_(e,t={}){var o;let r=(o=(typeof t=="boolean"?{backward:t}:t).backward)!=null?o:false;return m({fixedSize:e,read(i,a){le("bitArray",e,i,a);let s=[],c=i.slice(a,a+e);return c=r?c.reverse():c,c.forEach(u=>{for(let d=0;d<8;d+=1)r?(s.push(!!(u&1)),u>>=1):(s.push(!!(u&128)),u<<=1);}),[s,a+e]}})}function ff(e,t={}){return A(e_(e,t),t_(e,t))}function _t(e={}){var t;return p((t=e.size)!=null?t:D(),n=>n?1:0)}function dt(e={}){var t;return g((t=e.size)!=null?t:L(),n=>Number(n)===1)}function Af(e={}){return A(_t(e),dt(e))}function Ae(){return S({getSizeFromValue:e=>e.length,write:(e,t,n)=>(t.set(e,n),n+e.length)})}function Ee(){return m({read:(e,t)=>{let n=e.slice(t);return [n,t+n.length]}})}function Ef(){return A(Ae(),Ee())}var n_=()=>m({read(e,t){return [e.slice(t).reduce((r,o)=>r+o.toString(16).padStart(2,"0"),""),e.length]}});function lt(e){return S({fixedSize:e.length,write:(t,n,r)=>(n.set(e,r),r+e.length)})}function Rt(e){return m({fixedSize:e.length,read:(t,n)=>{let r=n_();if(!de(t,e,n))throw new _(er,{constant:e,data:t,hexConstant:r.decode(e),hexData:r.decode(t),offset:n});return [void 0,n+e.length]}})}function Sf(e){return A(lt(e),Rt(e))}function W(e){var r;let t=ee(e.map(fe)),n=(r=ee(e.map(ce)))!=null?r:void 0;return S({...t===null?{getSizeFromValue:o=>e.map((i,a)=>G(o[a],i)).reduce((i,a)=>i+a,0),maxSize:n}:{fixedSize:t},write:(o,i,a)=>(mi("tuple",e.length,o.length),e.forEach((s,c)=>{a=s.write(o[c],i,a);}),a)})}function x(e){var r;let t=ee(e.map(fe)),n=(r=ee(e.map(ce)))!=null?r:void 0;return m({...t===null?{maxSize:n}:{fixedSize:t},read:(o,i)=>{let a=[];return e.forEach(s=>{let[c,u]=s.read(o,i);a.push(c),i=u;}),[a,i]}})}function Of(e){return A(W(e),x(e))}function Pe(e,t){let n=Ti(e),r=(i,a,s)=>{let c=t(i);return xr(e,c),e[c].write(i,a,s)};if(n!==null)return S({fixedSize:n,write:r});let o=gi(e);return S({...o!==null?{maxSize:o}:{},getSizeFromValue:i=>{let a=t(i);return xr(e,a),G(i,e[a])},write:r})}function xe(e,t){let n=Ti(e),r=(i,a)=>{let s=t(i,a);return xr(e,s),e[s].read(i,a)};if(n!==null)return m({fixedSize:n,read:r});let o=gi(e);return m({...o!==null?{maxSize:o}:{},read:r})}function Nf(e,t,n){return A(Pe(e,t),xe(e,n))}function xr(e,t){if(typeof e[t]>"u")throw new _(Qn,{maxRange:e.length-1,minRange:0,variant:t})}function Ti(e){if(e.length===0)return 0;if(!T(e[0]))return null;let t=e[0].fixedSize;return e.every(r=>T(r)&&r.fixedSize===t)?t:null}function gi(e){return Qu(e.map(t=>ce(t)))}function pi(e,t={}){var o,i;let n=(o=t.discriminator)!=null?o:"__kind",r=(i=t.size)!=null?i:D();return Pe(e.map(([,a],s)=>p(W([r,a]),c=>[s,c])),a=>o_(e,a[n]))}function Ii(e,t={}){var o,i;let n=(o=t.discriminator)!=null?o:"__kind",r=(i=t.size)!=null?i:L();return xe(e.map(([a,s])=>g(x([r,s]),([,c])=>({[n]:a,...c}))),(a,s)=>Number(r.read(a,s)[0]))}function r_(e,t={}){return A(pi(e,t),Ii(e,t))}function o_(e,t){let n=e.findIndex(([r])=>t===r);if(n<0)throw new _(Kn,{value:t,variants:e.map(([r])=>r)});return n}var mf=pi,Tf=Ii,gf=r_;function Ci(e){let t=[...new Set(Object.values(e).filter(a=>typeof a=="number"))].sort(),n=Object.fromEntries(Object.entries(e).slice(t.length)),r=Object.keys(n),o=Object.values(n),i=[...new Set([...r,...o.filter(a=>typeof a=="string")])];return {enumKeys:r,enumRecord:n,enumValues:o,numericalValues:t,stringValues:i}}function i_({enumKeys:e,enumValues:t,variant:n}){let r=hi(t,o=>o===n);return r>=0?r:e.findIndex(o=>o===n)}function a_({discriminator:e,enumKeys:t,enumValues:n,useValuesAsDiscriminators:r}){return r?hi(n,o=>o===e):e>=0&&e<t.length?e:-1}function hi(e,t){let n=e.length;for(;n--;)if(t(e[n],n,e))return n;return -1}function Li(e){if(e.length===0)return "";let t=[e[0],e[0]],n=[];for(let r=1;r<e.length;r++){let o=e[r];t[1]+1===o?t[1]=o:(n.push(t[0]===t[1]?`${t[0]}`:`${t[0]}-${t[1]}`),t=[o,o]);}return n.push(t[0]===t[1]?`${t[0]}`:`${t[0]}-${t[1]}`),n.join(", ")}function bi(e,t={}){var c,u;let n=(c=t.size)!=null?c:D(),r=(u=t.useValuesAsDiscriminators)!=null?u:false,{enumKeys:o,enumValues:i,numericalValues:a,stringValues:s}=Ci(e);if(r&&i.some(d=>typeof d=="string"))throw new _(Qe,{stringValues:i.filter(d=>typeof d=="string")});return p(n,d=>{let l=i_({enumKeys:o,enumValues:i,variant:d});if(l<0)throw new _(Xn,{formattedNumericalValues:Li(a),numericalValues:a,stringValues:s,variant:d});return r?i[l]:l})}function Di(e,t={}){var s,c;let n=(s=t.size)!=null?s:L(),r=(c=t.useValuesAsDiscriminators)!=null?c:false,{enumKeys:o,enumValues:i,numericalValues:a}=Ci(e);if(r&&i.some(u=>typeof u=="string"))throw new _(Qe,{stringValues:i.filter(u=>typeof u=="string")});return g(n,u=>{let d=Number(u),l=a_({discriminator:d,enumKeys:o,enumValues:i,useValuesAsDiscriminators:r});if(l<0){let f=r?a:[...Array(o.length).keys()];throw new _(jn,{discriminator:d,formattedValidDiscriminators:Li(f),validDiscriminators:f})}return i[l]})}function s_(e,t={}){return A(bi(e,t),Di(e,t))}var pf=bi,If=Di,Cf=s_;function c_(e,t){return p(W([...t,e]),n=>[...t.map(()=>{}),n])}function u_(e,t){return g(x([...t,e]),n=>n[n.length-1])}function hf(e,t){return A(c_(e,t),u_(e,t))}function __(e,t){return p(W([e,...t]),n=>[n,...t.map(()=>{})])}function d_(e,t){return g(x([e,...t]),n=>n[0])}function Lf(e,t){return A(__(e,t),d_(e,t))}function l_(e,t={}){var r;let n=(r=t.size)!=null?r:D();return p(n,o=>{let i=e.indexOf(o);if(i<0)throw new _(qn,{value:o,variants:e});return i})}function R_(e,t={}){var r;let n=(r=t.size)!=null?r:L();return g(n,o=>{if(o<0||o>=e.length)throw new _(Zn,{discriminator:o,maxRange:e.length-1,minRange:0});return e[Number(o)]})}function bf(e,t={}){return A(l_(e,t),R_(e,t))}function f_(e,t,n={}){return p(V(W([e,t]),n),r=>[...r.entries()])}function A_(e,t,n={}){return g(U(x([e,t]),n),r=>new Map(r))}function Df(e,t,n={}){return A(f_(e,t,n),A_(e,t,n))}function Z(){return S({fixedSize:0,write:(e,t,n)=>n})}function Q(){return m({fixedSize:0,read:(e,t)=>[void 0,t]})}function yf(){return A(Z(),Q())}function E_(e,t={}){let n=(()=>{var o;return t.prefix===null?p(Z(),i=>{}):_t({size:(o=t.prefix)!=null?o:D()})})(),r=t.noneValue==="zeroes"?(q(e),F(Z(),e.fixedSize)):t.noneValue?lt(t.noneValue):Z();return Pe([p(W([n,r]),o=>[false,void 0]),p(W([n,e]),o=>[true,o])],o=>+(o!==null))}function S_(e,t={}){let n=(()=>{var o;return t.prefix===null?g(Q(),()=>false):dt({size:(o=t.prefix)!=null?o:L()})})(),r=t.noneValue==="zeroes"?(q(e),z(Q(),e.fixedSize)):t.noneValue?Rt(t.noneValue):Q();return xe([g(x([n,r]),()=>null),g(x([n,e]),([,o])=>o)],(o,i)=>{if(t.prefix===null&&!t.noneValue)return +(i<o.length);if(t.prefix===null&&t.noneValue!=null){let a=t.noneValue==="zeroes"?new Uint8Array(r.fixedSize).fill(0):t.noneValue;return de(o,a,i)?0:1}return Number(n.read(o,i)[0])})}function wf(e,t={}){return A(E_(e,t),S_(e,t))}function O_(e,t={}){return p(V(e,t),n=>[...n])}function N_(e,t={}){return g(U(e,t),n=>new Set(n))}function vf(e,t={}){return A(O_(e,t),N_(e,t))}function J(e){var o;let t=e.map(([,i])=>i),n=ee(t.map(fe)),r=(o=ee(t.map(ce)))!=null?o:void 0;return S({...n===null?{getSizeFromValue:i=>e.map(([a,s])=>G(i[a],s)).reduce((a,s)=>a+s,0),maxSize:r}:{fixedSize:n},write:(i,a,s)=>(e.forEach(([c,u])=>{s=u.write(i[c],a,s);}),s)})}function te(e){var o;let t=e.map(([,i])=>i),n=ee(t.map(fe)),r=(o=ee(t.map(ce)))!=null?o:void 0;return m({...n===null?{maxSize:r}:{fixedSize:n},read:(i,a)=>{let s={};return e.forEach(([c,u])=>{let[d,l]=u.read(i,a);a=l,s[c]=d;}),[s,a]}})}function Pf(e){return A(J(e),te(e))}var wi=e=>({__option:"Some",value:e}),vi=()=>({__option:"None"}),Ur=e=>!!(e&&typeof e=="object"&&"__option"in e&&(e.__option==="Some"&&"value"in e||e.__option==="None")),ft=e=>e.__option==="Some",Ff=e=>e.__option==="None";function zf(e,t){return ft(e)?e.value:t?t():null}var m_=e=>e!==null?wi(e):vi();function T_(e,t={}){let n=(()=>{var o;return t.prefix===null?p(Z(),i=>{}):_t({size:(o=t.prefix)!=null?o:D()})})(),r=t.noneValue==="zeroes"?(q(e),F(Z(),e.fixedSize)):t.noneValue?lt(t.noneValue):Z();return Pe([p(W([n,r]),o=>[false,void 0]),p(W([n,e]),o=>[true,Ur(o)&&ft(o)?o.value:o])],o=>{let i=Ur(o)?o:m_(o);return Number(ft(i))})}function g_(e,t={}){let n=(()=>{var o;return t.prefix===null?g(Q(),()=>false):dt({size:(o=t.prefix)!=null?o:L()})})(),r=t.noneValue==="zeroes"?(q(e),z(Q(),e.fixedSize)):t.noneValue?Rt(t.noneValue):Q();return xe([g(x([n,r]),()=>vi()),g(x([n,e]),([,o])=>wi(o))],(o,i)=>{if(t.prefix===null&&!t.noneValue)return +(i<o.length);if(t.prefix===null&&t.noneValue!=null){let a=t.noneValue==="zeroes"?new Uint8Array(r.fixedSize).fill(0):t.noneValue;return de(o,a,i)?0:1}return Number(n.read(o,i)[0])})}function kf(e,t={}){return A(T_(e,t),g_(e,t))}function yi(e,t){if(!e||ArrayBuffer.isView(e))return e;let n=r=>t?yi(r,t):yi(r);return Ur(e)?ft(e)?n(e.value):t?t():null:Array.isArray(e)?e.map(n):typeof e=="object"?Object.fromEntries(Object.entries(e).map(([r,o])=>[r,n(o)])):e}function B(e,...t){return t.reduce((n,r)=>r(n),e)}function Pi(e,t){return e.programAddress===t}function $f(e,t){if(e.programAddress!==t)throw new _(fn,{actualProgramAddress:e.programAddress,expectedProgramAddress:t})}function Wf(e){return e.accounts!==void 0}function jf(e){if(e.accounts===void 0)throw new _(ln,{data:e.data,programAddress:e.programAddress})}function xi(e){return e.data!==void 0}function Kf(e){var t;if(e.data===void 0)throw new _(Rn,{accountAddresses:(t=e.accounts)==null?void 0:t.map(n=>n.address),programAddress:e.programAddress})}var h=(e=>(e[e.WRITABLE_SIGNER=3]="WRITABLE_SIGNER",e[e.READONLY_SIGNER=2]="READONLY_SIGNER",e[e.WRITABLE=1]="WRITABLE",e[e.READONLY=0]="READONLY",e))(h||{}),p_=2,Ui=1;function Xf(e){return e&-3}function Yf(e){return e&-2}function j(e){return e>=2}function Se(e){return (e&Ui)!==0}function Br(e,t){return e|t}function Jf(e){return e|p_}function qf(e){return e|Ui}var Ue=Object.freeze({name:"Ed25519"});function I_(e){return new Uint8Array([48,46,2,1,0,48,5,6,3,43,101,112,4,34,4,32,...e])}async function Mr(e,t=false){let n=e.byteLength;if(n!==32)throw new _(cn,{actualLength:n});let r=I_(e);return await crypto.subtle.importKey("pkcs8",r,Ue,t,["sign"])}async function C_(e,t=false){if(ot(),e.extractable===false)throw new _(on,{key:e});let n=await crypto.subtle.exportKey("jwk",e);return await crypto.subtle.importKey("jwk",{crv:"Ed25519",ext:t,key_ops:["verify"],kty:"OKP",x:n.x},"Ed25519",t,["verify"])}var Oe;function h_(e){if(Oe||(Oe=oe()),e.length<64||e.length>88)throw new _(_n,{actualLength:e.length});let n=Oe.encode(e).byteLength;if(n!==64)throw new _(un,{actualLength:n})}function nA(e){return Oe||(Oe=oe()),!(e.length<64||e.length>88||Oe.encode(e).byteLength!==64)}async function Be(e,t){Ri();let n=await crypto.subtle.sign(Ue,e,t);return new Uint8Array(n)}function rA(e){return h_(e),e}async function L_(e,t,n){return fi(),await crypto.subtle.verify(Ue,e,t,n)}async function Bi(){return await li(),await crypto.subtle.generateKey(Ue,false,["sign","verify"])}async function Mi(e,t=false){if(_i(),e.byteLength!==64)throw new _(sn,{byteLength:e.byteLength});let[n,r]=await Promise.all([crypto.subtle.importKey("raw",e.slice(32),Ue,true,["verify"]),Mr(e.slice(0,32),t)]),o=new Uint8Array(32);crypto.getRandomValues(o);let i=await Be(r,o);if(!await L_(n,i,o))throw new _(dn);return {privateKey:r,publicKey:n}}async function Fi(e,t=false){let n=Mr(e,t),[r,o]=await Promise.all([(t?n:Mr(e,true)).then(async i=>await C_(i,true)),n]);return {privateKey:o,publicKey:r}}function aA(e,t,n,r){var i;if(!M(e,Ke))return false;let o=(i=t.instructions[e.context.index])==null?void 0:i.programAddress;return !o||o!==n?false:typeof r>"u"||e.context.code===r}function At(e){return JSON.parse(b_(e),(t,n)=>v_(n)?w_(n):n)}function b_(e){let t=[],n=false;for(let r=0;r<e.length;r++){let o=false;if(e[r]==="\\"&&(t.push(e[r++]),o=!o),e[r]==='"'){t.push(e[r]),o||(n=!n);continue}if(!n){let i=D_(e,r);if(i!=null&&i.length){r+=i.length-1,i.match(/\.|[eE]-/)?t.push(i):t.push(y_(i));continue}}t.push(e[r]);}return t.join("")}function D_(e,t){var o;let n=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/;if(!((o=e[t])!=null&&o.match(/[-\d]/)))return null;let r=e.slice(t).match(n);return r?r[0]:null}function y_(e){return `{"$n":"${e}"}`}function w_({$n:e}){if(e.match(/[eE]/)){let[t,n]=e.split(/[eE]/);return BigInt(t)*BigInt(10)**BigInt(n)}return BigInt(e)}function v_(e){return !!e&&typeof e=="object"&&"$n"in e&&typeof e.$n=="string"}var zi=0n;function P_(){let e=zi;return zi++,e.toString()}function Ne(e){return {id:P_(),jsonrpc:"2.0",method:e.methodName,params:e.params}}function Et(e,t){return U_(JSON.stringify(e,(n,r)=>typeof r=="bigint"?x_(r):r,t))}function x_(e){return {$n:`${e}`}}function U_(e){return e.replace(/\{\s*"\$n"\s*:\s*"(-?\d+)"\s*\}/g,"$1")}function ki(e){return B_(e)}function B_(e){return new Proxy(e.api,{defineProperty(){return false},deleteProperty(){return false},get(t,n,r){if(n!=="then")return function(...o){let i=n.toString(),a=Reflect.get(t,i,r);if(!a)throw new _(or,{method:i,params:o});let s=a(...o);return M_(e,s)}}})}function M_({transport:e},t){return {async send(n){return await t.execute({signal:n==null?void 0:n.abortSignal,transport:e})}}}function Vi(e){return new Proxy({},{defineProperty(){return false},deleteProperty(){return false},get(...t){let[n,r]=t,o=r.toString();return function(...i){let a=Object.freeze({methodName:o,params:i}),s=e!=null&&e.requestTransformer?e==null?void 0:e.requestTransformer(a):a;return Object.freeze({execute:async({signal:c,transport:u})=>{let d=Ne(s),l=await u({payload:d,signal:c});return e!=null&&e.responseTransformer?e.responseTransformer(l,s):l}})}}})}function St(e){return e==null||typeof e!="object"||Array.isArray(e)?false:"jsonrpc"in e&&e.jsonrpc==="2.0"&&"method"in e&&typeof e.method=="string"&&"params"in e}function F_(e){return typeof e=="bigint"?Number(e):e}var R={};function Gi(e){return function t(n,r){if(Array.isArray(n))return n.map((o,i)=>{let a={...r,keyPath:[...r.keyPath,i]};return t(o,a)});if(typeof n=="object"&&n!==null){let o={};for(let i in n){if(!Object.prototype.hasOwnProperty.call(n,i))continue;let a={...r,keyPath:[...r.keyPath,i]};o[i]=t(n[i],a);}return o}else return e.reduce((o,i)=>i(o,r),n)}}function Hi(e,t){return n=>{let r=Gi(e);return Object.freeze({...n,params:r(n.params,t)})}}function z_(e,t){return n=>Gi(e)(n,t)}function k_(){return Hi([F_],{keyPath:[]})}function V_({commitmentPropertyName:e,params:t,optionsObjectPositionInParams:n,overrideCommitment:r}){let o=t[n];if(o===void 0||o&&typeof o=="object"&&!Array.isArray(o)){if(o&&e in o){if(!o[e]||o[e]==="finalized"){let i=[...t],{[e]:a,...s}=o;return Object.keys(s).length>0?i[n]=s:n===i.length-1?i.length--:i[n]=void 0,i}}else if(r!=="finalized"){let i=[...t];return i[n]={...o,[e]:r},i}}return t}function G_({defaultCommitment:e,optionsObjectPositionByMethod:t}){return n=>{let{params:r,methodName:o}=n;if(!Array.isArray(r))return n;let i=t[o];return i==null?n:Object.freeze({methodName:o,params:V_({commitmentPropertyName:o==="sendTransaction"?"preflightCommitment":"commitment",optionsObjectPositionInParams:i,overrideCommitment:e,params:r})})}}function H_(e){return (t,{keyPath:n})=>(typeof t=="bigint"&&e&&(t>Number.MAX_SAFE_INTEGER||t<-Number.MAX_SAFE_INTEGER)&&e(n,t),t)}function $_(e){return t=>Hi([H_((...r)=>e(t,...r))],{keyPath:[]})(t)}var W_={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 Ot(e){let t=e==null?void 0:e.onIntegerOverflow;return n=>B(n,t?$_(t):r=>r,k_(),G_({defaultCommitment:e==null?void 0:e.defaultCommitment,optionsObjectPositionByMethod:W_}))}function j_(e){return function(n,{keyPath:r}){return typeof n=="number"&&Number.isInteger(n)||typeof n=="bigint"?K_(r,e)?Number(n):BigInt(n):n}}function K_(e,t){return t.some(n=>{if(n.length!==e.length)return false;for(let r=e.length-1;r>=0;r--){let o=e[r],i=n[r];if(i!==o&&(i!==R||typeof o!="number"))return false}return true})}function $i(e){return z_([j_(e)],{keyPath:[]})}function X_(){return e=>e.result}function Y_(){return e=>{let t=e;if("error"in t)throw be(t.error);return t}}function Wi(e){return (t,n)=>{let r=n.methodName,o=e!=null&&e.allowedNumericKeyPaths&&r?e.allowedNumericKeyPaths[r]:void 0;return B(t,i=>Y_()(i,n),i=>X_()(i,n),i=>$i(o!=null?o:[])(i,n))}}function ji(e){return (t,n)=>{let r=n.methodName,o=e!=null&&e.allowedNumericKeyPaths&&r?e.allowedNumericKeyPaths[r]:void 0;return B(t,i=>$i(o!=null?o:[])(i,n))}}var Nt=[["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",R,"state","olderTransferFee","transferFeeBasisPoints"],["data","parsed","info","extensions",R,"state","newerTransferFee","transferFeeBasisPoints"],["data","parsed","info","extensions",R,"state","preUpdateAverageRate"],["data","parsed","info","extensions",R,"state","currentRate"]],ne=[...Nt,["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",R,"confirmationCount"]],mt=[["index"],["instructions",R,"accounts",R],["instructions",R,"programIdIndex"],["instructions",R,"stackHeight"]],Fr=[["addressTableLookups",R,"writableIndexes",R],["addressTableLookups",R,"readonlyIndexes",R],["header","numReadonlySignedAccounts"],["header","numReadonlyUnsignedAccounts"],["header","numRequiredSignatures"],["instructions",R,"accounts",R],["instructions",R,"programIdIndex"],["instructions",R,"stackHeight"]];function Ki(e){return Vi({requestTransformer:Ot(e),responseTransformer:Wi({allowedNumericKeyPaths:J_()})})}var zr;function J_(){return zr||(zr={getAccountInfo:ne.map(e=>["value",...e]),getBlock:[["transactions",R,"meta","preTokenBalances",R,"accountIndex"],["transactions",R,"meta","preTokenBalances",R,"uiTokenAmount","decimals"],["transactions",R,"meta","postTokenBalances",R,"accountIndex"],["transactions",R,"meta","postTokenBalances",R,"uiTokenAmount","decimals"],["transactions",R,"meta","rewards",R,"commission"],...mt.map(e=>["transactions",R,"meta","innerInstructions",R,...e]),...Fr.map(e=>["transactions",R,"transaction","message",...e]),["rewards",R,"commission"]],getClusterNodes:[[R,"featureSet"],[R,"shredVersion"]],getInflationGovernor:[["initial"],["foundation"],["foundationTerm"],["taper"],["terminal"]],getInflationRate:[["foundation"],["total"],["validator"]],getInflationReward:[[R,"commission"]],getMultipleAccounts:ne.map(e=>["value",R,...e]),getProgramAccounts:ne.flatMap(e=>[["value",R,"account",...e],[R,"account",...e]]),getRecentPerformanceSamples:[[R,"samplePeriodSecs"]],getTokenAccountBalance:[["value","decimals"],["value","uiAmount"]],getTokenAccountsByDelegate:Nt.map(e=>["value",R,"account",...e]),getTokenAccountsByOwner:Nt.map(e=>["value",R,"account",...e]),getTokenLargestAccounts:[["value",R,"decimals"],["value",R,"uiAmount"]],getTokenSupply:[["value","decimals"],["value","uiAmount"]],getTransaction:[["meta","preTokenBalances",R,"accountIndex"],["meta","preTokenBalances",R,"uiTokenAmount","decimals"],["meta","postTokenBalances",R,"accountIndex"],["meta","postTokenBalances",R,"uiTokenAmount","decimals"],["meta","rewards",R,"commission"],...mt.map(e=>["meta","innerInstructions",R,...e]),...Fr.map(e=>["transaction","message",...e])],getVersion:[["feature-set"]],getVoteAccounts:[["current",R,"commission"],["delinquent",R,"commission"]],simulateTransaction:[...ne.map(e=>["value","accounts",R,...e]),...mt.map(e=>["value","innerInstructions",R,...e])]}),zr}function q_(e){let t={};for(let n in e)t[n.toLowerCase()]=e[n];return t}function Z_(e){let{fromJson:t,headers:n,toJson:r,url:o}=e,i,a=n&&q_(n);return async function({payload:c,signal:u}){let d=r?r(c):JSON.stringify(c),l={...i,body:d,headers:{...a,accept:"application/json","content-length":d.length.toString(),"content-type":"application/json; charset=utf-8"},method:"POST",signal:u},f=await fetch(o,l);if(!f.ok)throw new _(rr,{headers:f.headers,message:f.statusText,statusCode:f.status});return t?t(await f.text(),c):await f.json()}}var Q_=["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 Xi(e){return St(e)&&Q_.includes(e.method)}function Yi(e){return Z_({...e,fromJson:(t,n)=>Xi(n)?At(t):JSON.parse(t),toJson:t=>Xi(t)?Et(t):JSON.stringify(t)})}var ed=Object.prototype.toString,td=Object.keys||function(e){let t=[];for(let n in e)t.push(n);return t};function Me(e,t){let n,r,o,i,a,s,c;if(e===true)return "true";if(e===false)return "false";switch(typeof e){case "object":if(e===null)return null;if("toJSON"in e&&typeof e.toJSON=="function")return Me(e.toJSON(),t);if(c=ed.call(e),c==="[object Array]"){for(o="[",r=e.length-1,n=0;n<r;n++)o+=Me(e[n],true)+",";return r>-1&&(o+=Me(e[n],true)),o+"]"}else if(c==="[object Object]"){for(i=td(e).sort(),r=i.length,o="",n=0;n<r;)a=i[n],s=Me(e[a],false),s!==void 0&&(o&&(o+=","),o+=JSON.stringify(a)+":"+s),n++;return "{"+o+"}"}else return JSON.stringify(e);case "function":case "undefined":return t?null:void 0;case "bigint":return `${e.toString()}n`;case "string":return JSON.stringify(e);default:return isFinite(e)?e:null}}function Tt(e){let t=Me(e,false);if(t!==void 0)return ""+t}function Zi(e,t,n){let r="";if(typeof t[0]=="number"){let a=t[0]+1,s=a%10,c=a%100;s==1&&c!=11?r=a+"st":s==2&&c!=12?r=a+"nd":s==3&&c!=13?r=a+"rd":r=a+"th";}else r=`\`${t[0].toString()}\``;let o=t.length>1?t.slice(1).map(a=>typeof a=="number"?`[${a}]`:a).join("."):void 0,i=new _(Le,{argumentLabel:r,keyPath:t,methodName:e,optionalPathLabel:o?` at path \`${o}\``:"",value:n,...o!==void 0?{path:o}:void 0});return _e(i,Zi),i}var nd={defaultCommitment:"confirmed",onIntegerOverflow(e,t,n){throw Zi(e.methodName,t,n)}},rd=globalThis.AbortController,Ji;function qi(){return {}}function od(e,t){let n;return async function(o){let{payload:i,signal:a}=o,s=t(i);if(s===void 0)return await e(o);if(n||(queueMicrotask(()=>{n=void 0;}),n={}),n[s]==null){let u=new rd,d=(async()=>{try{return await e({...o,signal:u.signal})}catch(l){if(l===(Ji||(Ji=qi())))return;throw l}})();n[s]={abortController:u,numConsumers:0,responsePromise:d};}let c=n[s];if(c.numConsumers++,a){let u=c.responsePromise;return await new Promise((d,l)=>{let f=O=>{a.removeEventListener("abort",f),c.numConsumers-=1,queueMicrotask(()=>{c.numConsumers===0&&c.abortController.abort(Ji||(Ji=qi()));}),l(O.target.reason);};a.addEventListener("abort",f),u.then(d).catch(l).finally(()=>{a.removeEventListener("abort",f);});})}else return await c.responsePromise}}function id(e){return St(e)?Tt([e.method,e.params]):void 0}function ad(e){let t={};for(let n in e)t[n.toLowerCase()]=e[n];return t}function sd(e){return B(Yi({...e,headers:{...e.headers?ad(e.headers):void 0,"solana-client":"js/2.3.0"}}),t=>od(t,id))}function DA(e,t){return cd(sd({url:e,...t}))}function cd(e){return ki({api:Ki(nd),transport:e})}var ud=globalThis.AbortController,_d=globalThis.EventTarget,Qi;function ea(){return Symbol(void 0)}var kr=Symbol();function ta({abortSignal:e,dataChannelName:t,dataPublisher:n,errorChannelName:r}){let o=new Map;function i(u){for(let[d,l]of o.entries())l.__hasPolled?(o.delete(d),l.onError(u)):l.publishQueue.push({__type:1,err:u});}let a=new ud;e.addEventListener("abort",()=>{a.abort(),i(Qi||(Qi=ea()));});let s={signal:a.signal},c=kr;return n.on(r,u=>{c===kr&&(c=u,a.abort(),i(u));},s),n.on(t,u=>{o.forEach((d,l)=>{if(d.__hasPolled){let{onData:f}=d;o.set(l,{__hasPolled:false,publishQueue:[]}),f(u);}else d.publishQueue.push({__type:0,data:u});});},s),{async*[Symbol.asyncIterator](){if(e.aborted)return;if(c!==kr)throw c;let u=Symbol();o.set(u,{__hasPolled:false,publishQueue:[]});try{for(;;){let d=o.get(u);if(!d)throw new _(ur);if(d.__hasPolled)throw new _(_r);let l=d.publishQueue;try{if(l.length){d.publishQueue=[];for(let f of l)if(f.__type===0)yield f.data;else throw f.err}else yield await new Promise((f,O)=>{o.set(u,{__hasPolled:!0,onData:f,onError:O});});}catch(f){if(f===(Qi||(Qi=ea())))return;throw f}}}finally{o.delete(u);}}}}function Vr(e){return {on(t,n,r){function o(i){if(i instanceof CustomEvent){let a=i.detail;n(a);}else n();}return e.addEventListener(t,o,r),()=>{e.removeEventListener(t,o);}}}}function na(e,t,n){let r,o=new _d,i=Vr(o);return {...i,on(a,s,c){r||(r={dispose:e.on(t,O=>{let E=n(O);if(!E)return;let[N,y]=E;o.dispatchEvent(new CustomEvent(N,{detail:y}));}),numSubscribers:0}),r.numSubscribers++;let u=i.on(a,s,c),d=true;function l(){d&&(d=false,c==null||c.signal.removeEventListener("abort",l),r.numSubscribers--,r.numSubscribers===0&&(r.dispose(),r=void 0),u());}return c==null||c.signal.addEventListener("abort",l),l}}}function ra(e){return e!==null&&(typeof e=="object"||typeof e=="function")}function dd(e){let t=new Set,n={deferreds:t,settled:false};return Promise.resolve(e).then(r=>{for(let{resolve:o}of t)o(r);t.clear(),n.settled=true;},r=>{for(let{reject:o}of t)o(r);t.clear(),n.settled=true;}),n}var Gr=new WeakMap;async function me(e){let t;return await new Promise((r,o)=>{t={reject:o,resolve:r};for(let i of e){if(!ra(i)){Promise.resolve(i).then(r,o);continue}let a=Gr.get(i);a===void 0?(a=dd(i),a.deferreds.add(t),Gr.set(i,a)):a.settled?Promise.resolve(i).then(r,o):a.deferreds.add(t);}}).finally(()=>{for(let r of e)ra(r)&&Gr.get(r).deferreds.delete(t);})}function ia(e){return new Proxy(e.api,{defineProperty(){return false},deleteProperty(){return false},get(t,n,r){if(n!=="then")return function(...o){let i=n.toString(),a=Reflect.get(t,i,r);if(!a)throw new _(ir,{notificationName:i});let s=a(...o);return ld(e.transport,s)}}})}function ld(e,t){return {async subscribe({abortSignal:n}){let r=await e({signal:n,...t});return ta({abortSignal:n,dataChannelName:"notification",dataPublisher:r,errorChannelName:"error"})}}}function aa(e){return new Proxy({},{defineProperty(){return false},deleteProperty(){return false},get(...t){let[n,r]=t,o=r.toString();return function(...i){let a={methodName:o,params:i},s=e.requestTransformer?e.requestTransformer(a):a;return {execute(c){return e.planExecutor({...c,request:s})},request:s}}}})}function $r(e,t){return Object.freeze({...e,on(n,r,o){return n!=="message"?e.on(n,r,o):e.on("message",i=>r(t(i)),o)}})}function Wr(e,t){return Object.freeze({...e,send:n=>e.send(t(n))})}var Rd=globalThis.AbortController,Hr=new WeakMap;function fd(e,t){return sa(-1,e,t)}function Ad(e,t){sa(1,e,t);}function Ed(e){let t=Hr.get(e);return t||Hr.set(e,t={}),t}function sa(e,t,n){if(n===void 0)return;let r=Ed(t);!r[n]&&e>0&&(r[n]=0);let o=e+r[n];return o<=0?delete r[n]:r[n]=o,o}var oa=new WeakMap;function Sd(e,t,n){let r=oa.get(e);r||oa.set(e,r=new WeakMap);let o=n!=null?n:e,i=r.get(o);return i||r.set(o,i=na(e,"message",a=>{let s=a;if(!("method"in s))return;let c=n?n(s.params.result,t):s.params.result;return [`notification:${s.params.subscription}`,c]})),i}async function ca({channel:e,responseTransformer:t,signal:n,subscribeRequest:r,unsubscribeMethodName:o}){let i;e.on("error",()=>{i=void 0,Hr.delete(e);},{signal:n});let a=new Promise((l,f)=>{function O(){if(fd(e,i)===0){let E=Ne({methodName:o,params:[i]});i=void 0,e.send(E).catch(()=>{});}f(this.reason);}n.aborted?O.call(n):n.addEventListener("abort",O);}),s=Ne(r);await e.send(s);let c=new Promise((l,f)=>{let O=new Rd;n.addEventListener("abort",O.abort.bind(O));let E={signal:O.signal};e.on("error",N=>{O.abort(),f(N);},E),e.on("message",N=>{N&&typeof N=="object"&&"id"in N&&N.id===s.id&&(O.abort(),"error"in N?f(be(N.error)):l(N.result));},E);});if(i=await me([a,c]),i==null)throw new _(ar);Ad(e,i);let u=Sd(e,r,t),d=`notification:${i}`;return {on(l,f,O){switch(l){case "notification":return u.on(d,f,O);case "error":return e.on("error",f,O);default:throw new _(lr,{channelName:l,supportedChannelNames:["notification","error"]})}}}}function ua(e){let t=Ot(e),n=ji({allowedNumericKeyPaths:Od()});return aa({planExecutor({request:r,...o}){return ca({...o,responseTransformer:n,subscribeRequest:{...r,methodName:r.methodName.replace(/Notifications$/,"Subscribe")},unsubscribeMethodName:r.methodName.replace(/Notifications$/,"Unsubscribe")})},requestTransformer:t})}function _a(e){return ua(e)}function HA(e){return ua(e)}var jr;function Od(){return jr||(jr={accountNotifications:ne.map(e=>["value",...e]),blockNotifications:[["value","block","transactions",R,"meta","preTokenBalances",R,"accountIndex"],["value","block","transactions",R,"meta","preTokenBalances",R,"uiTokenAmount","decimals"],["value","block","transactions",R,"meta","postTokenBalances",R,"accountIndex"],["value","block","transactions",R,"meta","postTokenBalances",R,"uiTokenAmount","decimals"],["value","block","transactions",R,"meta","rewards",R,"commission"],["value","block","transactions",R,"meta","innerInstructions",R,"index"],["value","block","transactions",R,"meta","innerInstructions",R,"instructions",R,"programIdIndex"],["value","block","transactions",R,"meta","innerInstructions",R,"instructions",R,"accounts",R],["value","block","transactions",R,"transaction","message","addressTableLookups",R,"writableIndexes",R],["value","block","transactions",R,"transaction","message","addressTableLookups",R,"readonlyIndexes",R],["value","block","transactions",R,"transaction","message","instructions",R,"programIdIndex"],["value","block","transactions",R,"transaction","message","instructions",R,"accounts",R],["value","block","transactions",R,"transaction","message","header","numReadonlySignedAccounts"],["value","block","transactions",R,"transaction","message","header","numReadonlyUnsignedAccounts"],["value","block","transactions",R,"transaction","message","header","numRequiredSignatures"],["value","block","rewards",R,"commission"]],programNotifications:ne.flatMap(e=>[["value",R,"account",...e],[R,"account",...e]])}),jr}var Nd=globalThis.EventTarget,Fe=globalThis.WebSocket,da=1e3;function la({sendBufferHighWatermark:e,signal:t,url:n}){if(t.aborted)return Promise.reject(t.reason);let r,o=false,i=new Set;function a(){i.forEach(I=>{I();}),i.clear();}function s(){a(),o||N(t.reason),E.readyState!==Fe.CLOSED&&E.readyState!==Fe.CLOSING&&E.close(da);}function c(I){a(),r==null||r.onCancel(),t.removeEventListener("abort",s),E.removeEventListener("close",c),E.removeEventListener("error",u),E.removeEventListener("message",d),E.removeEventListener("open",O),!t.aborted&&!(I.wasClean&&I.code===da)&&l.dispatchEvent(new CustomEvent("error",{detail:new _(ue,{cause:I})}));}function u(I){if(!t.aborted&&!o){let K=new _(cr,{errorEvent:I});N(K),l.dispatchEvent(new CustomEvent("error",{detail:K}));}}function d(I){t.aborted||l.dispatchEvent(new CustomEvent("message",{detail:I.data}));}let l=new Nd,f=Vr(l);function O(){o=true,y({...f,async send(I){if(E.readyState!==Fe.OPEN)throw new _(ue);if(!r&&E.bufferedAmount>e){let K,es=new Promise((ts,ns)=>{let mo=setInterval(()=>{(E.readyState!==Fe.OPEN||!(E.bufferedAmount>e))&&(clearInterval(mo),r=void 0,ts());},16);K=()=>{r=void 0,clearInterval(mo),ns(new _(sr));};});r={onCancel:K,promise:es};}if(r){if(ArrayBuffer.isView(I)&&!(I instanceof DataView)){let K=I.constructor;I=new K(I);}await r.promise;}E.send(I);}});}let E=new Fe(n);t.addEventListener("abort",s),E.addEventListener("close",c),E.addEventListener("error",u),E.addEventListener("message",d),E.addEventListener("open",O);let N,y;return new Promise((I,K)=>{N=K,y=I;})}function Ra(e,t,n){let r="";if(typeof t[0]=="number"){let a=t[0]+1,s=a%10,c=a%100;s==1&&c!=11?r=a+"st":s==2&&c!=12?r=a+"nd":s==3&&c!=13?r=a+"rd":r=a+"th";}else r=`\`${t[0].toString()}\``;let o=t.length>1?t.slice(1).map(a=>typeof a=="number"?`[${a}]`:a).join("."):void 0,i=new _(Le,{argumentLabel:r,keyPath:t,methodName:e,optionalPathLabel:o?` at path \`${o}\``:"",value:n,...o!==void 0?{path:o}:void 0});return _e(i,Ra),i}var md={defaultCommitment:"confirmed",onIntegerOverflow(e,t,n){throw Ra(e.methodName,t,n)}},Kr=globalThis.AbortController,Td={jsonrpc:"2.0",method:"ping"};function gd({abortSignal:e,channel:t,intervalMs:n}){let r;function o(){t.send(Td).catch(s=>{M(s,ue)&&a.abort();});}function i(){clearInterval(r),r=setInterval(o,n);}let a=new Kr;return a.signal.addEventListener("abort",()=>{clearInterval(r);}),e.addEventListener("abort",()=>{a.abort();}),t.on("error",()=>{a.abort();},{signal:a.signal}),t.on("message",i,{signal:a.signal}),globalThis.navigator.onLine&&i(),globalThis.addEventListener("offline",function(){clearInterval(r);},{signal:a.signal}),globalThis.addEventListener("online",function(){o(),i();},{signal:a.signal}),{...t,send(...s){return a.signal.aborted||i(),t.send(...s)}}}function pd(){return {entries:[],freeChannelIndex:-1}}function Id(e,{maxSubscriptionsPerChannel:t,minChannels:n}){let r=pd();function o(){var a;if(r.entries.length<n){r.freeChannelIndex=-1;return}let i;for(let s=0;s<r.entries.length;s++){let c=(r.freeChannelIndex+s+2)%r.entries.length,u=r.entries[c];u.subscriptionCount<t&&(!i||i.subscriptionCount>=u.subscriptionCount)&&(i={poolIndex:c,subscriptionCount:u.subscriptionCount});}r.freeChannelIndex=(a=i==null?void 0:i.poolIndex)!=null?a:-1;}return function({abortSignal:a}){let s;function c(){let u=r.entries.findIndex(d=>d===s);r.entries.splice(u,1),s.dispose(),o();}if(r.freeChannelIndex===-1){let u=new Kr,d=e({abortSignal:u.signal});d.then(l=>{l.on("error",c,{signal:u.signal});}).catch(c),s={channel:d,dispose(){u.abort();},subscriptionCount:0},r.entries.push(s);}else s=r.entries[r.freeChannelIndex];return s.subscriptionCount++,a.addEventListener("abort",function(){s.subscriptionCount--,s.subscriptionCount===0?c():r.freeChannelIndex!==-1&&(r.freeChannelIndex--,o());}),o(),s.channel}}function Cd(e){return B(e,t=>$r(t,JSON.parse),t=>Wr(t,JSON.stringify))}function hd(e){return B(e,t=>$r(t,At),t=>Wr(t,Et))}function Ld(e){return fa({...e,jsonSerializer:hd})}function tE(e){return fa({...e,jsonSerializer:Cd})}function fa(e){var o,i;if(/^wss?:/i.test(e.url)===false){let a=e.url.match(/^([^:]+):/);throw new DOMException(a?`Failed to construct 'WebSocket': The URL's scheme must be either 'ws' or 'wss'. '${a[1]}:' is not allowed.`:`Failed to construct 'WebSocket': The URL '${e.url}' is invalid.`)}let{intervalMs:t,...n}=e;return Id(({abortSignal:a})=>{var s;return la({...n,sendBufferHighWatermark:(s=e.sendBufferHighWatermark)!=null?s:131072,signal:a}).then(e.jsonSerializer).then(c=>gd({abortSignal:a,channel:c,intervalMs:t!=null?t:5e3}))},{maxSubscriptionsPerChannel:(o=e.maxSubscriptionsPerChannel)!=null?o:100,minChannels:(i=e.minChannels)!=null?i:1})}function bd(e){let t=new Map;return function(r){let{request:o,signal:i}=r,a=Tt([o.methodName,o.params]),s=t.get(a);if(!s){let c=new Kr,u=e({...r,signal:c.signal});u.then(d=>{d.on("error",()=>{t.delete(a),c.abort();},{signal:c.signal});}).catch(()=>{}),t.set(a,s={abortController:c,dataPublisherPromise:u,numSubscribers:0});}return s.numSubscribers++,i.addEventListener("abort",()=>{s.numSubscribers--,s.numSubscribers===0&&queueMicrotask(()=>{s.numSubscribers===0&&(t.delete(a),s.abortController.abort());});},{signal:s.abortController.signal}),s.dataPublisherPromise}}function Dd({createChannel:e}){return B(yd(e),t=>bd(t))}function yd(e){return async({execute:t,signal:n})=>{let r=await e({abortSignal:n});return await t({channel:r,signal:n})}}function Aa(e,t){let n=Dd({createChannel:Ld({...t,url:e})});return wd(n)}function nE(e,t){return Aa(e,t)}function rE(e,t){return Aa(e,t)}function wd(e){return ia({api:_a(md),transport:e})}function Sa(e){return we(e)}function Oa(e){try{ae(e);}catch(t){throw M(t,Ce)?new _(Pt,t.context):M(t,Ie)?new _(xt,t.context):t}}function dE(e){return Oa(e),e}function vd(){let e=se();return S({fixedSize:32,write:(t,n,r)=>(Oa(t),e.write(t,n,r))})}function Pd(){return Y()}function lE(){return A(vd(),Pd())}function RE(){return new Intl.Collator("en",{caseFirst:"lower",ignorePunctuation:false,localeMatcher:"best fit",numeric:false,sensitivity:"variant",usage:"sort"}).compare}function fE(e){return e}function AE(e){return e}function EE(e){return e}function Ea(e){switch(e){case "finalized":return 2;case "confirmed":return 1;case "processed":return 0;default:throw new _(dr,{unexpectedValue:e})}}function gt(e,t){return e===t?0:Ea(e)<Ea(t)?-1:1}var Na=18446744073709551615n,Xr,Yr;function xd(){return Xr||(Xr=vr()),Xr}function Ud(){return Yr||(Yr=Pr()),Yr}function SE(e){return e>=0&&e<=Na}function Bd(e){if(e<0||e>Na)throw new _(Ut)}function Md(e){return Bd(e),e}function Fd(){return xd()}function OE(e){return e}function zd(){return ma(Ud())}function ma(e){return g(e,t=>Md(typeof t=="bigint"?t:BigInt(t)))}function NE(){return A(Fd(),zd())}function mE(e){return A(e,ma(e))}function TE(e){try{return BigInt(e),!0}catch{return false}}function kd(e){try{BigInt(e);}catch{throw new _(Bt,{value:e})}}function gE(e){return kd(e),e}function pE(e){return !Number.isNaN(Number(e))}function Vd(e){if(Number.isNaN(Number(e)))throw new _(Mt,{value:e})}function IE(e){return Vd(e),e}var Ta=9223372036854775807n,ga=-9223372036854775808n;function CE(e){return e>=ga&&e<=Ta}function Gd(e){if(e<ga||e>Ta)throw new _(Ft,{value:e})}function hE(e){return Gd(e),e}function ze(e){return "lifetimeConstraint"in e&&typeof e.lifetimeConstraint.blockhash=="string"&&typeof e.lifetimeConstraint.lastValidBlockHeight=="bigint"&&Sa(e.lifetimeConstraint.blockhash)}function BE(e){if(!ze(e))throw new _(hn)}function io(e,t){return "lifetimeConstraint"in t&&t.lifetimeConstraint&&"blockhash"in t.lifetimeConstraint&&t.lifetimeConstraint.blockhash===e.blockhash&&t.lifetimeConstraint.lastValidBlockHeight===e.lastValidBlockHeight?t:Object.freeze({...t,lifetimeConstraint:Object.freeze(e)})}function Hd(e,t,n=t){if(!t.match(new RegExp(`^[${e}]*$`)))throw new _(X,{alphabet:e,base:e.length,value:n})}var $d=e=>S({getSizeFromValue:t=>{let[n,r]=pa(t,e[0]);if(!r)return t.length;let o=Ia(r,e);return n.length+Math.ceil(o.toString(16).length/2)},write(t,n,r){if(Hd(e,t),t==="")return r;let[o,i]=pa(t,e[0]);if(!i)return n.set(new Uint8Array(o.length).fill(0),r),r+o.length;let a=Ia(i,e),s=[];for(;a>0n;)s.unshift(Number(a%256n)),a/=256n;let c=[...Array(o.length).fill(0),...s];return n.set(c,r),r+c.length}}),Wd=e=>m({read(t,n){let r=n===0?t:t.slice(n);if(r.length===0)return ["",0];let o=r.findIndex(c=>c!==0);o=o===-1?r.length:o;let i=e[0].repeat(o);if(o===r.length)return [i,t.length];let a=r.slice(o).reduce((c,u)=>c*256n+BigInt(u),0n),s=jd(a,e);return [i+s,t.length]}});function pa(e,t){let[n,r]=e.split(new RegExp(`((?!${t}).*)`));return [n,r]}function Ia(e,t){let n=BigInt(t.length),r=0n;for(let o of e)r*=n,r+=BigInt(t.indexOf(o));return r}function jd(e,t){let n=BigInt(t.length),r=[];for(;e>0n;)r.unshift(t[Number(e%n)]),e/=n;return r.join("")}var Da="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",Kd=()=>$d(Da),Xd=()=>Wd(Da),Jr;function Yd(){if(!Jr){let e=V(D(),{size:$()});Jr=J([["lookupTableAddress",se()],["writableIndexes",e],["readonlyIndexes",e]]);}return Jr}var qr;function Jd(){if(!qr){let e=U(L(),{size:k()});qr=g(te([["lookupTableAddress",Y()],["writableIndexes",e],["readonlyIndexes",e]]),t=>"readableIndices"in t?{...t,readonlyIndexes:t.readableIndices,writableIndexes:t.writableIndices}:t);}return qr}var Zr;function Qr(){return Zr||(Zr=D()),Zr}var eo;function to(){return eo||(eo=L()),eo}function qd(){return J([["numSignerAccounts",Qr()],["numReadonlySignerAccounts",Qr()],["numReadonlyNonSignerAccounts",Qr()]])}function Zd(){return te([["numSignerAccounts",to()],["numReadonlySignerAccounts",to()],["numReadonlyNonSignerAccounts",to()]])}var no;function Qd(){return no||(no=p(J([["programAddressIndex",D()],["accountIndices",V(D(),{size:$()})],["data",Rr(Ae(),$())]]),e=>{var t,n;return e.accountIndices!==void 0&&e.data!==void 0?e:{...e,accountIndices:(t=e.accountIndices)!=null?t:[],data:(n=e.data)!=null?n:new Uint8Array(0)}})),no}var ro;function el(){return ro||(ro=g(te([["programAddressIndex",L()],["accountIndices",U(L(),{size:k()})],["data",fr(Ee(),k())]]),e=>{if(e.accountIndices.length&&e.data.byteLength)return e;let{accountIndices:t,data:n,...r}=e;return {...r,...t.length?{accountIndices:t}:null,...n.byteLength?{data:n}:null}})),ro}var oo=128;function ya(){return S({getSizeFromValue:e=>e==="legacy"?0:1,maxSize:1,write:(e,t,n)=>{if(e==="legacy")return n;if(e<0||e>127)throw new _(bn,{actualVersion:e});return t.set([e|oo],n),n+1}})}function pt(){return m({maxSize:1,read:(e,t)=>{let n=e[t];return (n&oo)===0?["legacy",t]:[n^oo,t+1]}})}function ME(){return A(ya(),pt())}function Ca(){return J(wa())}function ha(){return p(J([...wa(),["addressTableLookups",nl()]]),e=>{var t;return e.version==="legacy"?e:{...e,addressTableLookups:(t=e.addressTableLookups)!=null?t:[]}})}function wa(){return [["version",ya()],["header",qd()],["staticAccounts",V(se(),{size:$()})],["lifetimeToken",F(Kd(),32)],["instructions",V(Qd(),{size:$()})]]}function tl(){return [["version",pt()],["header",Zd()],["staticAccounts",U(Y(),{size:k()})],["lifetimeToken",z(Xd(),32)],["instructions",U(el(),{size:k()})],["addressTableLookups",rl()]]}function nl(){return V(Yd(),{size:$()})}function rl(){return U(Jd(),{size:k()})}function ao(){return S({getSizeFromValue:e=>e.version==="legacy"?Ca().getSizeFromValue(e):ha().getSizeFromValue(e),write:(e,t,n)=>e.version==="legacy"?Ca().write(e,t,n):ha().write(e,t,n)})}function ol(){return g(te(tl()),({addressTableLookups:e,...t})=>t.version==="legacy"||!(e!=null&&e.length)?t:{...t,addressTableLookups:e})}function FE(){return A(ao(),ol())}function La(e,t,n){var r;e[t]=n((r=e[t])!=null?r:{role:h.READONLY});}var C=Symbol("AddressMapTypeProperty");function il(e,t){let n={[e]:{[C]:0,role:h.WRITABLE_SIGNER}},r=new Set;for(let o of t){La(n,o.programAddress,a=>{if(r.add(o.programAddress),C in a){if(Se(a.role))switch(a[C]){case 0:throw new _(Cn,{programAddress:o.programAddress});default:throw new _(Ye,{programAddress:o.programAddress})}if(a[C]===2)return a}return {[C]:2,role:h.READONLY}});let i;if(o.accounts)for(let a of o.accounts)La(n,a.address,s=>{let{address:c,...u}=a;if(C in s)switch(s[C]){case 0:return s;case 1:{let d=Br(s.role,u.role);if("lookupTableAddress"in u){if(s.lookupTableAddress!==u.lookupTableAddress&&(i||(i=st()))(u.lookupTableAddress,s.lookupTableAddress)<0)return {[C]:1,...u,role:d}}else if(j(u.role))return {[C]:2,role:d};return s.role!==d?{...s,role:d}:s}case 2:{let d=Br(s.role,u.role);if(r.has(a.address)){if(Se(u.role))throw new _(Ye,{programAddress:a.address});return s.role!==d?{...s,role:d}:s}else return "lookupTableAddress"in u&&!j(s.role)?{...u,[C]:1,role:d}:s.role!==d?{...s,role:d}:s}}return "lookupTableAddress"in u?{...u,[C]:1}:{...u,[C]:2}});}return n}function al(e){let t;return Object.entries(e).sort(([r,o],[i,a])=>{if(o[C]!==a[C]){if(o[C]===0)return -1;if(a[C]===0)return 1;if(o[C]===2)return -1;if(a[C]===2)return 1}let s=j(o.role);if(s!==j(a.role))return s?-1:1;let c=Se(o.role);return c!==Se(a.role)?c?-1:1:(t||(t=st()),o[C]===1&&a[C]===1&&o.lookupTableAddress!==a.lookupTableAddress?t(o.lookupTableAddress,a.lookupTableAddress):t(r,i))}).map(([r,o])=>({address:r,...o}))}function sl(e){var n;let t={};for(let r of e){if(!("lookupTableAddress"in r))continue;let o=t[n=r.lookupTableAddress]||(t[n]={readableIndices:[],readonlyIndexes:[],writableIndexes:[],writableIndices:[]});r.role===h.WRITABLE?(o.writableIndexes.push(r.addressIndex),o.writableIndices.push(r.addressIndex)):(o.readableIndices.push(r.addressIndex),o.readonlyIndexes.push(r.addressIndex));}return Object.keys(t).sort(st()).map(r=>({lookupTableAddress:r,...t[r]}))}function cl(e){let t=0,n=0,r=0;for(let o of e){if("lookupTableAddress"in o)break;let i=Se(o.role);j(o.role)?(r++,i||n++):i||t++;}return {numReadonlyNonSignerAccounts:t,numReadonlySignerAccounts:n,numSignerAccounts:r}}function ul(e){let t={};for(let[n,r]of e.entries())t[r.address]=n;return t}function _l(e,t){let n=ul(t);return e.map(({accounts:r,data:o,programAddress:i})=>({programAddressIndex:n[i],...r?{accountIndices:r.map(({address:a})=>n[a])}:null,...o?{data:o}:null}))}function dl(e){return "nonce"in e?e.nonce:e.blockhash}function ll(e){let t=e.findIndex(r=>"lookupTableAddress"in r);return (t===-1?e:e.slice(0,t)).map(({address:r})=>r)}function va(e){let t=il(e.feePayer.address,e.instructions),n=al(t);return {...e.version!=="legacy"?{addressTableLookups:sl(n)}:null,header:cl(n),instructions:_l(e.instructions,n),lifetimeToken:dl(e.lifetimeConstraint),staticAccounts:ll(n),version:e.version}}function Rl(e,t,n){for(let[r,o]of Object.entries(n))for(let i=0;i<o.length;i++)if(e===o[i])return {address:e,addressIndex:i,lookupTableAddress:r,role:t}}function zE(e,t){let n=new Set(Object.values(t).flatMap(i=>i)),r=[],o=false;for(let i of e.instructions){if(!i.accounts){r.push(i);continue}let a=[],s=false;for(let c of i.accounts){if("lookupTableAddress"in c||!n.has(c.address)||j(c.role)){a.push(c);continue}let u=Rl(c.address,c.role,t);a.push(Object.freeze(u)),s=true,o=true;}r.push(Object.freeze(s?{...i,accounts:a}:i));}return Object.freeze(o?{...e,instructions:r}:e)}function fl(e){return Object.freeze({instructions:Object.freeze([]),version:e.version})}var Pa="SysvarRecentB1ockHashes11111111111111111111",xa="11111111111111111111111111111111";function ba(e,t){return {accounts:[{address:e,role:h.WRITABLE},{address:Pa,role:h.READONLY},{address:t,role:h.READONLY_SIGNER}],data:new Uint8Array([4,0,0,0]),programAddress:xa}}function so(e){var t;return e.programAddress===xa&&e.data!=null&&Al(e.data)&&((t=e.accounts)==null?void 0:t.length)===3&&e.accounts[0].address!=null&&e.accounts[0].role===h.WRITABLE&&e.accounts[1].address===Pa&&e.accounts[1].role===h.READONLY&&e.accounts[2].address!=null&&j(e.accounts[2].role)}function Al(e){return e.byteLength===4&&e[0]===4&&e[1]===0&&e[2]===0&&e[3]===0}function ke(e){return "lifetimeConstraint"in e&&typeof e.lifetimeConstraint.nonce=="string"&&e.instructions[0]!=null&&so(e.instructions[0])}function El(e){if(!ke(e))throw new _(Ln)}function Sl(e,t,n){return e.accounts[0].address===t&&e.accounts[2].address===n}function Ol({nonce:e,nonceAccountAddress:t,nonceAuthorityAddress:n},r){let o,i=r.instructions[0];if(i&&so(i))if(Sl(i,t,n)){if(ke(r)&&r.lifetimeConstraint.nonce===e)return r;o=[i,...r.instructions.slice(1)];}else o=[Object.freeze(ba(t,n)),...r.instructions.slice(1)];else o=[Object.freeze(ba(t,n)),...r.instructions];return Object.freeze({...r,instructions:Object.freeze(o),lifetimeConstraint:Object.freeze({nonce:e})})}function Nl(e,t){var r;if("feePayer"in t&&e===((r=t.feePayer)==null?void 0:r.address)&&ml(t.feePayer))return t;let n={...t,feePayer:Object.freeze({address:e})};return Object.freeze(n),n}function ml(e){return !!e&&"address"in e&&typeof e.address=="string"&&Object.keys(e).length===1}function co(e,t){return Tl([e],t)}function Tl(e,t){return Object.freeze({...t,instructions:Object.freeze([...t.instructions,...e])})}function kE(e,t){return gl([e],t)}function gl(e,t){return Object.freeze({...t,instructions:Object.freeze([...e,...t.instructions])})}function pl(e){let{header:t}=e,n=t.numSignerAccounts-t.numReadonlySignerAccounts,r=e.staticAccounts.length-t.numSignerAccounts-t.numReadonlyNonSignerAccounts,o=[],i=0;for(let a=0;a<n;a++)o.push({address:e.staticAccounts[i],role:h.WRITABLE_SIGNER}),i++;for(let a=0;a<t.numReadonlySignerAccounts;a++)o.push({address:e.staticAccounts[i],role:h.READONLY_SIGNER}),i++;for(let a=0;a<r;a++)o.push({address:e.staticAccounts[i],role:h.WRITABLE}),i++;for(let a=0;a<t.numReadonlyNonSignerAccounts;a++)o.push({address:e.staticAccounts[i],role:h.READONLY}),i++;return o}function Il(e,t){var a,s;let r=e.map(c=>c.lookupTableAddress).filter(c=>t[c]===void 0);if(r.length>0)throw new _(Dn,{lookupTableAddresses:r});let o=[],i=[];for(let c of e){let u=t[c.lookupTableAddress],d=(a=c.readonlyIndexes)!=null?a:c.readableIndices,l=(s=c.writableIndexes)!=null?s:c.writableIndices,f=Math.max(...d,...l);if(f>=u.length)throw new _(yn,{highestKnownIndex:u.length-1,highestRequestedIndex:f,lookupTableAddress:c.lookupTableAddress});let O=d.map(N=>({address:u[N],addressIndex:N,lookupTableAddress:c.lookupTableAddress,role:h.READONLY}));o.push(...O);let E=l.map(N=>({address:u[N],addressIndex:N,lookupTableAddress:c.lookupTableAddress,role:h.WRITABLE}));i.push(...E);}return [...i,...o]}function Cl(e,t){var i,a;let n=(i=t[e.programAddressIndex])==null?void 0:i.address;if(!n)throw new _(wn,{index:e.programAddressIndex});let r=(a=e.accountIndices)==null?void 0:a.map(s=>t[s]),{data:o}=e;return Object.freeze({programAddress:n,...r&&r.length?{accounts:Object.freeze(r)}:{},...o&&o.length?{data:o}:{}})}function hl(e,t,n){if(!t||!so(t))return {blockhash:e,lastValidBlockHeight:n!=null?n:2n**64n-1n};{let r=t.accounts[0].address;ae(r);let o=t.accounts[2].address;return ae(o),{nonce:e,nonceAccountAddress:r,nonceAuthorityAddress:o}}}function Ua(e,t){var u;let n=e.staticAccounts[0];if(!n)throw new _(vn);let r=pl(e),o="addressTableLookups"in e&&e.addressTableLookups!==void 0&&e.addressTableLookups.length>0?Il(e.addressTableLookups,(u=t==null?void 0:t.addressesByLookupTableAddress)!=null?u:{}):[],i=[...r,...o],a=e.instructions.map(d=>Cl(d,i)),s=a[0],c=hl(e.lifetimeToken,s,t==null?void 0:t.lastValidBlockHeight);return B(fl({version:e.version}),d=>Nl(n,d),d=>a.reduce((l,f)=>co(f,l),d),d=>"blockhash"in c?io(c,d):Ol(c,d))}var VE=El,GE=ke;function Ll(e){let t=Object.values(e);if(t.length===0)throw new _(Bn);return t.map(n=>n||new Uint8Array(64).fill(0))}function bl(){return p(V(F(Ae(),64),{size:$()}),Ll)}function _o(){return J([["signatures",bl()],["messageBytes",Ae()]])}function Dl(){return g(te([["signatures",U(z(Ee(),64),{size:k()})],["messageBytes",Ee()]]),yl)}function ZE(){return A(_o(),Dl())}function yl(e){let{messageBytes:t,signatures:n}=e,r=x([pt(),Nr(L(),2),U(Y(),{size:k()})]),[o,i,a]=r.decode(t),s=a.slice(0,i);if(s.length!==n.length)throw new _(Mn,{numRequiredSignatures:i,signaturesLength:n.length,signerAddresses:s});let c={};return s.forEach((u,d)=>{let l=n[d];l.every(f=>f===0)?c[u]=null:c[u]=l;}),{messageBytes:t,signatures:Object.freeze(c)}}function Ve(e){let t=va(e),n=ao().encode(t),r=t.staticAccounts.slice(0,t.header.numSignerAccounts),o={};for(let a of r)o[a]=null;let i;return ze(e)?i={blockhash:e.lifetimeConstraint.blockhash,lastValidBlockHeight:e.lifetimeConstraint.lastValidBlockHeight}:i={nonce:e.lifetimeConstraint.nonce,nonceAccountAddress:e.instructions[0].accounts[0].address},Object.freeze({lifetimeConstraint:i,messageBytes:n,signatures:Object.freeze(o)})}var uo;function lo(e){uo||(uo=Re());let t=Object.values(e.signatures)[0];if(!t)throw new _(xn);return uo.decode(t)}function wl(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])}async function Ro(e,t){let n,r;if(await Promise.all(e.map(async o=>{let i=await ct(o.publicKey),a=t.signatures[i];if(a===void 0){r||(r=new Set),r.add(i);return}if(r)return;let s=await Be(o.privateKey,t.messageBytes);a!==null&&wl(s,a)||(n||(n={}),n[i]=s);})),r&&r.size>0){let o=Object.keys(t.signatures);throw new _(Un,{expectedAddresses:o,unexpectedAddresses:[...r]})}return n?Object.freeze({...t,signatures:Object.freeze({...t.signatures,...n})}):t}async function QE(e,t){let n=await Ro(e,t);return It(n),Object.freeze(n),n}function eS(e){return Object.entries(e.signatures).every(([t,n])=>!!n)}function It(e){let t=[];if(Object.entries(e.signatures).forEach(([n,r])=>{r||t.push(n);}),t.length>0)throw new _(Pn,{addresses:t})}function Ct(e){let t=_o().encode(e);return Cr().decode(t)}var vl=1280,Pl=48,Te=vl-Pl;function fo(e){return _o().getSizeFromValue(e)}function tS(e){return fo(e)<=Te}function nS(e){let t=fo(e);if(t>Te)throw new _(Ze,{transactionSize:t,transactionSizeLimit:Te})}function Ba(e){return fo(Ve(e))}function rS(e){return Ba(e)<=Te}function oS(e){let t=Ba(e);if(t>Te)throw new _(Ze,{transactionSize:t,transactionSizeLimit:Te})}var iS=It;function Ge(e){let t={};return e.forEach(n=>{if(!t[n.address])t[n.address]=n;else if(t[n.address]!==n)throw new _(An,{address:n.address})}),Object.values(t)}function ge(e){return "modifyAndSignTransactions"in e&&typeof e.modifyAndSignTransactions=="function"}function lS(e){if(!ge(e))throw new _(Tn,{address:e.address})}function re(e){return "signTransactions"in e&&typeof e.signTransactions=="function"}function RS(e){if(!re(e))throw new _(gn,{address:e.address})}function ht(e){return "signAndSendTransactions"in e&&typeof e.signAndSendTransactions=="function"}function fS(e){if(!ht(e))throw new _(pn,{address:e.address})}function He(e){return re(e)||ge(e)||ht(e)}function AS(e){if(!He(e))throw new _(mn,{address:e.address})}function xl(e){var t;return Ge(((t=e.accounts)!=null?t:[]).flatMap(n=>"signer"in n?n.signer:[]))}function Ao(e){return Ge([...e.feePayer&&He(e.feePayer)?[e.feePayer]:[],...e.instructions.flatMap(xl)])}function Ul(e,t){if(!t.accounts||t.accounts.length===0)return t;let n=new Map(Ge(e).map(r=>[r.address,r]));return Object.freeze({...t,accounts:t.accounts.map(r=>{let o=n.get(r.address);return !j(r.role)||"signer"in r||!o?r:Object.freeze({...r,signer:o})})})}function ES(e,t){let n=Bl(t)?e.find(r=>r.address===t.feePayer.address):void 0;return !n&&t.instructions.length===0?t:Object.freeze({...t,...n?{feePayer:n}:null,instructions:t.instructions.map(r=>Ul(e,r))})}function Bl(e){return !!e&&"feePayer"in e&&!!e.feePayer&&typeof e.feePayer.address=="string"&&!He(e.feePayer)}function SS(e,t){Object.freeze(e);let n={...t,feePayer:e};return Object.freeze(n),n}function Eo(e){return "signMessages"in e&&typeof e.signMessages=="function"}function OS(e){if(!Eo(e))throw new _(Nn,{address:e.address})}function Ml(e){return "keyPair"in e&&typeof e.keyPair=="object"&&Eo(e)&&re(e)}function NS(e){if(!Ml(e))throw new _(En,{address:e.address})}async function So(e){let t=await ct(e.publicKey);return Object.freeze({address:t,keyPair:e,signMessages:r=>Promise.all(r.map(async o=>Object.freeze({[t]:await Be(e.privateKey,o.content)}))),signTransactions:r=>Promise.all(r.map(async o=>{let i=await Ro([e],o);return Object.freeze({[t]:i.signatures[t]})}))})}async function mS(){return await So(await Bi())}async function TS(e,t){return await So(await Mi(e,t))}async function gS(e,t){return await So(await Fi(e,t))}function Ma(e){return we(e.address)&&"modifyAndSignMessages"in e&&typeof e.modifyAndSignMessages=="function"}function pS(e){if(!Ma(e))throw new _(On,{address:e.address})}function Fl(e){return Eo(e)||Ma(e)}function IS(e){if(!Fl(e))throw new _(Sn,{address:e.address})}function CS(e){return Object.freeze({address:e,signMessages:n=>Promise.resolve(n.map(()=>Object.freeze({}))),signTransactions:n=>Promise.resolve(n.map(()=>Object.freeze({})))})}function hS(e){try{return Fa(e),!0}catch{return false}}function Fa(e){let n=Ao(e).filter(ht);if(n.length===0)throw new _(Xe);if(n.filter(o=>!re(o)&&!ge(o)).length>1)throw new _(In)}async function zl(e,t){let{partialSigners:n,modifyingSigners:r}=za(Ge(Ao(e).filter(He)),{identifySendingSigner:false});return await ka(e,r,n,t)}async function LS(e,t){let n=await zl(e,t);return It(n),n}async function bS(e,t){Fa(e);let n=t==null?void 0:t.abortSignal,{partialSigners:r,modifyingSigners:o,sendingSigner:i}=za(Ge(Ao(e).filter(He)));n==null||n.throwIfAborted();let a=await ka(e,o,r,t);if(!i)throw new _(Xe);n==null||n.throwIfAborted();let[s]=await i.signAndSendTransactions([a],t);return n==null||n.throwIfAborted(),s}function za(e,t={}){var s;let r=((s=t.identifySendingSigner)!=null?s:true)?kl(e):null,o=e.filter(c=>c!==r&&(ge(c)||re(c))),i=Vl(o),a=o.filter(re).filter(c=>!i.includes(c));return Object.freeze({modifyingSigners:i,partialSigners:a,sendingSigner:r})}function kl(e){let t=e.filter(ht);if(t.length===0)return null;let n=t.filter(r=>!ge(r)&&!re(r));return n.length>0?n[0]:t[0]}function Vl(e){let t=e.filter(ge);if(t.length===0)return [];let n=t.filter(r=>!re(r));return n.length>0?n:[t[0]]}async function ka(e,t=[],n=[],r){var s,c;let o=Ve(e),i=await t.reduce(async(u,d)=>{var f;(f=r==null?void 0:r.abortSignal)==null||f.throwIfAborted();let[l]=await d.modifyAndSignTransactions([await u],r);return Object.freeze(l)},Promise.resolve(o));(s=r==null?void 0:r.abortSignal)==null||s.throwIfAborted();let a=await Promise.all(n.map(async u=>{let[d]=await u.signTransactions([i],r);return d}));return Object.freeze({...i,signatures:Object.freeze(a.reduce((u,d)=>({...u,...d}),(c=i.signatures)!=null?c:{}))})}var Gl=globalThis.TextEncoder;function DS(e,t={}){return Object.freeze({content:typeof e=="string"?new Gl().encode(e):e,signatures:Object.freeze({...t})})}var Lt=globalThis.AbortController;function Va({rpc:e,rpcSubscriptions:t}){return async function({abortSignal:r,commitment:o,lastValidBlockHeight:i}){r.throwIfAborted();let a=new Lt,s=()=>{a.abort();};r.addEventListener("abort",s,{signal:a.signal});async function c(){let{absoluteSlot:u,blockHeight:d}=await e.getEpochInfo({commitment:o}).send({abortSignal:a.signal});return {blockHeight:d,differenceBetweenSlotHeightAndBlockHeight:u-d}}try{let[u,{blockHeight:d,differenceBetweenSlotHeightAndBlockHeight:l}]=await Promise.all([t.slotNotifications().subscribe({abortSignal:a.signal}),c()]);r.throwIfAborted();let f=d;if(f<=i){let O=l;for await(let E of u){let{slot:N}=E;if(N-O>i){let{blockHeight:y,differenceBetweenSlotHeightAndBlockHeight:I}=await c();if(f=y,f>i)break;O=I;}}}throw r.throwIfAborted(),new _(wt,{currentBlockHeight:f,lastValidBlockHeight:i})}finally{a.abort();}}}var Oo=40;function Ga({rpc:e,rpcSubscriptions:t}){return async function({abortSignal:r,commitment:o,currentNonceValue:i,nonceAccountAddress:a}){let s=new Lt;function c(){s.abort();}r.addEventListener("abort",c,{signal:s.signal});let u=await t.accountNotifications(a,{commitment:o,encoding:"base64"}).subscribe({abortSignal:s.signal}),d=Re(),l=De();function f([N]){let I=l.encode(N).slice(Oo,Oo+32);return d.decode(I)}let O=(async()=>{for await(let N of u){let y=f(N.value.data);if(y!==i)throw new _($e,{actualNonceValue:y,expectedNonceValue:i})}})(),E=(async()=>{let{value:N}=await e.getAccountInfo(a,{commitment:o,dataSlice:{length:32,offset:Oo},encoding:"base58"}).send({abortSignal:s.signal});if(!N)throw new _(vt,{nonceAccountAddress:a});let y=N.data[0];if(y!==i)throw new _($e,{actualNonceValue:y,expectedNonceValue:i});await new Promise(()=>{});})();try{return await me([O,E])}finally{s.abort();}}}function pe({rpc:e,rpcSubscriptions:t}){return async function({abortSignal:r,commitment:o,signature:i}){let a=new Lt;function s(){a.abort();}r.addEventListener("abort",s,{signal:a.signal});let c=await t.signatureNotifications(i,{commitment:o}).subscribe({abortSignal:a.signal}),u=(async()=>{for await(let l of c){if(l.value.err)throw et(l.value.err);return}})(),d=(async()=>{let{value:l}=await e.getSignatureStatuses([i]).send({abortSignal:a.signal}),f=l[0];f&&f.confirmationStatus&>(f.confirmationStatus,o)>=0||await new Promise(()=>{});})();try{return await me([u,d])}finally{a.abort();}}}async function Ha({abortSignal:e,commitment:t}){return await new Promise((n,r)=>{let o=c=>{clearTimeout(s);let u=new DOMException(c.target.reason,"AbortError");r(u);};e.addEventListener("abort",o);let i=t==="processed"?3e4:6e4,a=performance.now(),s=setTimeout(()=>{let c=performance.now()-a;r(new DOMException(`Timeout elapsed after ${c} ms`,"TimeoutError"));},i);})}async function No(e,t,n){let{abortSignal:r,commitment:o,getRecentSignatureConfirmationPromise:i}=t;r==null||r.throwIfAborted();let a=new Lt;if(r){let s=()=>{a.abort();};r.addEventListener("abort",s,{signal:a.signal});}try{let s=n({...t,abortSignal:a.signal});return await me([i({abortSignal:a.signal,commitment:o,signature:e}),...s])}finally{a.abort();}}async function $a(e){await No(lo(e.transaction),e,function({abortSignal:n,commitment:r,getNonceInvalidationPromise:o,transaction:i}){return [o({abortSignal:n,commitment:r,currentNonceValue:i.lifetimeConstraint.nonce,nonceAccountAddress:i.lifetimeConstraint.nonceAccountAddress})]});}async function Wa(e){await No(lo(e.transaction),e,function({abortSignal:n,commitment:r,getBlockHeightExceedencePromise:o,transaction:i}){return [o({abortSignal:n,commitment:r,lastValidBlockHeight:i.lifetimeConstraint.lastValidBlockHeight})]});}async function ja(e){await No(e.signature,e,function({abortSignal:n,commitment:r,getTimeoutPromise:o}){return [o({abortSignal:n,commitment:r})]});}async function Ka({abortSignal:e,commitment:t,confirmSignatureOnlyTransaction:n,lamports:r,recipientAddress:o,rpc:i}){let a=await i.requestAirdrop(o,r,{commitment:t}).send({abortSignal:e});return await n({abortSignal:e,commitment:t,signature:a}),a}function kS({rpc:e,rpcSubscriptions:t}){let n=pe({rpc:e,rpcSubscriptions:t});async function r(o){await ja({...o,getRecentSignatureConfirmationPromise:n,getTimeoutPromise:Ha});}return async function(i){return await Ka({...i,confirmSignatureOnlyTransaction:r,rpc:e})}}var Xa="ComputeBudget111111111111111111111111111111",Hl={blockhash:"11111111111111111111111111111111",lastValidBlockHeight:0n},Ya=2;function $l(e){let t=new Uint8Array(5);return t[0]=Ya,ve().write(e,t,1),Object.freeze({data:t,programAddress:Xa})}function Wl(e){return Pi(e,Xa)&&xi(e)&&e.data[0]===Ya}async function Ja({abortSignal:e,rpc:t,transactionMessage:n,...r}){let o=ke(n),i;o||ze(n)?i=n:i=io(Hl,n);let a=n.instructions.findIndex(Wl),s=$l(14e5);if(a===-1)i=co(s,i);else {let d=[...i.instructions];d.splice(a,1,s),i=Object.freeze({...i,instructions:d});}let c=Ve(i),u=Ct(c);try{let{value:{err:d,unitsConsumed:l}}=await t.simulateTransaction(u,{...r,encoding:"base64",replaceRecentBlockhash:!o,sigVerify:!1}).send({abortSignal:e});if(l==null)throw new _(Je);let f=l>4294967295n?4294967295:Number(l);if(d)throw new _(qe,{cause:d,unitsConsumed:f});return f}catch(d){throw M(d,qe)?d:new _(Je,{cause:d})}}function eO({rpc:e}){return async function(n,r){return await Ja({...r,rpc:e,transactionMessage:n})}}async function qa(e,t,n){if(e.length===0)return {};let r=await ci(t,e,n);return ai(r),ui(r),r.reduce((o,i)=>({...o,[i.address]:i.data.addresses}),{})}async function cO(e,t,n){let o=("addressTableLookups"in e&&e.addressTableLookups!==void 0&&e.addressTableLookups.length>0?e.addressTableLookups:[]).map(c=>c.lookupTableAddress),{lastValidBlockHeight:i,...a}=n!=null?n:{},s=o.length>0?await qa(o,t,a):{};return Ua(e,{addressesByLookupTableAddress:s,lastValidBlockHeight:i})}function jl(e,t){return !(t!=null&&t.preflightCommitment)&>(e,"finalized")<0?{...t,preflightCommitment:e}:t}async function bt({abortSignal:e,commitment:t,rpc:n,transaction:r,...o}){let i=Ct(r);return await n.sendTransaction(i,{...jl(t,o),encoding:"base64"}).send({abortSignal:e})}async function Za({abortSignal:e,commitment:t,confirmDurableNonceTransaction:n,rpc:r,transaction:o,...i}){let a=await bt({...i,abortSignal:e,commitment:t,rpc:r,transaction:o});return await n({abortSignal:e,commitment:t,transaction:o}),a}async function Qa({abortSignal:e,commitment:t,confirmRecentTransaction:n,rpc:r,transaction:o,...i}){let a=await bt({...i,abortSignal:e,commitment:t,rpc:r,transaction:o});return await n({abortSignal:e,commitment:t,transaction:o}),a}function OO({rpc:e,rpcSubscriptions:t}){let n=Ga({rpc:e,rpcSubscriptions:t}),r=pe({rpc:e,rpcSubscriptions:t});async function o(i){await $a({...i,getNonceInvalidationPromise:n,getRecentSignatureConfirmationPromise:r});}return async function(a,s){await Za({...s,confirmDurableNonceTransaction:o,rpc:e,transaction:a});}}function pO({rpc:e,rpcSubscriptions:t}){let n=Va({rpc:e,rpcSubscriptions:t}),r=pe({rpc:e,rpcSubscriptions:t});async function o(i){await Wa({...i,getBlockHeightExceedencePromise:n,getRecentSignatureConfirmationPromise:r});}return async function(a,s){await Qa({...s,confirmRecentTransaction:o,rpc:e,transaction:a});}}function hO({rpc:e}){return async function(n,r){await bt({...r,rpc:e,transaction:n});}}
|
|
5
|
+
var rs=Object.defineProperty;var os=(e,t,n)=>t in e?rs(e,t,{enumerable:true,configurable:true,writable:true,value:n}):e[t]=n;var Dt=(e,t,n)=>os(e,typeof t!="symbol"?t+"":t,n);var wt=1,We=2,vt=3,Pt=4,xt=5,Ut=6,Bt=7,Mt=8,Ft=9,To=10,go=-32700,po=-32603,Io=-32602,Co=-32601,ho=-32600,is=-32016,Lo=-32015,bo=-32014,as=-32013,Do=-32012,ss=-32011,yo=-32010,wo=-32009,cs=-32008,vo=-32007,Po=-32006,us=-32005,xo=-32004,_s=-32003,yt=-32002,Uo=-32001,Ce=28e5,he=2800001,ds=2800002,zt=2800003,kt=2800004,Vt=2800005,Gt=2800006,$e=2800007,je=2800008,Ht=2800009,Wt=2800010,$t=2800011,jt=323e4,Kt=32300001,Xt=3230002,Yt=3230003,Jt=3230004,qt=361e4,Zt=3610001,Qt=3610002,en=3610003,tn=3610004,nn=3610005,rn=3610006,on=3610007,an=3611e3,sn=3704e3,cn=3704001,un=3704002,_n=3704003,dn=3704004,ln=4128e3,Rn=4128001,fn=4128002,Bo=4615e3,ls=4615001,Rs=4615002,fs=4615003,As=4615004,Es=4615005,Ss=4615006,Os=4615007,Ns=4615008,ms=4615009,Ts=4615010,gs=4615011,ps=4615012,Is=4615013,Cs=4615014,hs=4615015,Ls=4615016,bs=4615017,Ds=4615018,ys=4615019,ws=4615020,vs=4615021,Ps=4615022,xs=4615023,Us=4615024,Bs=4615025,Ke=4615026,Ms=4615027,Fs=4615028,zs=4615029,ks=4615030,Vs=4615031,Gs=4615032,Hs=4615033,Ws=4615034,$s=4615035,js=4615036,Ks=4615037,Xs=4615038,Ys=4615039,Js=4615040,qs=4615041,Zs=4615042,Qs=4615043,ec=4615044,Mo=4615045,tc=4615046,nc=4615047,rc=4615048,oc=4615049,ic=4615050,ac=4615051,sc=4615052,cc=4615053,uc=4615054,An=5508e3,En=5508001,Sn=5508002,On=5508003,Nn=5508004,mn=5508005,Tn=5508006,gn=5508007,pn=5508008,In=5508009,Xe=5508010,_c=5508011,Cn=5663e3,Ye=5663001,hn=5663002,Ln=5663003,bn=5663004,Dn=5663005,yn=5663006,wn=5663007,vn=5663008,Pn=5663009,dc=5663010,lc=5663011,xn=5663012,Rc=5663013,fc=5663014,Un=5663015,Bn=5663016,Mn=5663017,Je=5663018,qe=5663019,Ze=5663020,Fo=705e4,Ac=7050001,Ec=7050002,Sc=7050003,Oc=7050004,Nc=7050005,mc=7050006,Tc=7050007,gc=7050008,pc=7050009,Ic=7050010,Cc=7050011,hc=7050012,Lc=7050013,bc=7050014,Dc=7050015,yc=7050016,wc=7050017,vc=7050018,Pc=7050019,xc=7050020,Uc=7050021,Bc=7050022,Mc=7050023,Fc=7050024,zc=7050025,kc=7050026,Vc=7050027,Gc=7050028,Hc=7050029,zo=7050030,ko=7050031,Wc=7050032,$c=7050033,jc=7050034,Vo=7050035,Kc=7050036,Fn=8078e3,zn=8078001,kn=8078002,Vn=8078003,Gn=8078004,Hn=8078005,Wn=8078006,$n=8078007,jn=8078008,Kn=8078009,Xn=8078010,Yn=8078011,X=8078012,Le=8078013,Jn=8078014,qn=8078015,Zn=8078016,Qn=8078017,er=8078018,Xc=8078019,tr=8078020,nr=8078021,Qe=8078022,be=81e5,Go=8100001,rr=8100002,or=8100003,ir=819e4,ar=8190001,sr=8190002,_e=8190003,cr=8190004,ur=99e5,_r=9900001,Yc=9900002,dr=9900003,lr=9900004;function Ho(e){return Array.isArray(e)?"%5B"+e.map(Ho).join("%2C%20")+"%5D":typeof e=="bigint"?`${e}n`:encodeURIComponent(String(e!=null&&Object.getPrototypeOf(e)===null?{...e}:e))}function Jc([e,t]){return `${e}=${Ho(t)}`}function qc(e){let t=Object.entries(e).map(Jc).join("&");return btoa(t)}function Zc(e,t={}){{let n=`Solana error #${e}; Decode this error by running \`npx @solana/errors decode -- ${e}`;return Object.keys(t).length&&(n+=` '${qc(t)}'`),`${n}\``}}function M(e,t){return e instanceof Error&&e.name==="SolanaError"?t!==void 0?e.context.__code===t:true:false}var _=class extends Error{constructor(...[t,n]){let r,o;if(n){let{cause:a,...s}=n;a&&(o={cause:a}),Object.keys(s).length>0&&(r=s);}let i=Zc(t,r);super(i,o);Dt(this,"cause",this.cause);Dt(this,"context");this.context={__code:t,...r},this.name="SolanaError";}};function de(...e){"captureStackTrace"in Error&&typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(...e);}function Wo({errorCodeBaseOffset:e,getErrorContext:t,orderedErrorNames:n,rpcEnumError:r},o){let i,a;typeof r=="string"?i=r:(i=Object.keys(r)[0],a=r[i]);let s=n.indexOf(i),c=e+s,u=t(c,i,a),d=new _(c,u);return de(d,o),d}var Qc=["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(e,t){let n=Number(e);return Wo({errorCodeBaseOffset:4615001,getErrorContext(r,o,i){return r===Bo?{errorName:o,index:n,...i!==void 0?{instructionErrorContext:i}:null}:r===Ke?{code:Number(i),index:n}:r===Mo?{encodedData:i,index:n}:{index:n}},orderedErrorNames:Qc,rpcEnumError:t},$o)}var eu=["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 et(e){return typeof e=="object"&&"InstructionError"in e?$o(...e.InstructionError):Wo({errorCodeBaseOffset:7050001,getErrorContext(t,n,r){if(t===Fo)return {errorName:n,...r!==void 0?{transactionErrorContext:r}:null};if(t===zo)return {index:Number(r)};if(t===ko||t===Vo)return {accountIndex:Number(r.account_index)}},orderedErrorNames:eu,rpcEnumError:e},et)}function De(e){let t;if(tu(e)){let{code:n,data:r,message:o}=e,i=Number(n);if(i===yt){let{err:a,...s}=r,c=a?{cause:et(a)}:null;t=new _(yt,{...s,...c});}else {let a;switch(i){case po:case Io:case ho:case Co:case go:case Do:case Uo:case xo:case bo:case yo:case wo:case vo:case Po:case Lo:a={__serverMessage:o};break;default:typeof r=="object"&&!Array.isArray(r)&&(a=r);}t=new _(i,a);}}else {let n=typeof e=="object"&&e!==null&&"message"in e&&typeof e.message=="string"?e.message:"Malformed JSON-RPC error with no message attribute";t=new _(To,{error:e,message:n});}return de(t,De),t}function tu(e){return typeof e=="object"&&e!==null&&"code"in e&&"message"in e&&(typeof e.code=="number"||typeof e.code=="bigint")&&typeof e.message=="string"}var eR=e=>{let t=e.filter(i=>i.length);if(t.length===0)return e.length?e[0]:new Uint8Array;if(t.length===1)return t[0];let n=t.reduce((i,a)=>i+a.length,0),r=new Uint8Array(n),o=0;return t.forEach(i=>{r.set(i,o),o+=i.length;}),r},nu=(e,t)=>{if(e.length>=t)return e;let n=new Uint8Array(t).fill(0);return n.set(e),n},ru=(e,t)=>nu(e.length<=t?e:e.slice(0,t),t);function le(e,t,n){let r=n===0&&e.length===t.length?e:e.slice(n,n+t.length);return r.length!==t.length?false:t.every((o,i)=>o===r[i])}function G(e,t){return "fixedSize"in t?t.fixedSize:t.getSizeFromValue(e)}function S(e){return Object.freeze({...e,encode:t=>{let n=new Uint8Array(G(t,e));return e.write(t,n,0),n}})}function m(e){return Object.freeze({...e,decode:(t,n=0)=>e.read(t,n)[0]})}function ou(e){return Object.freeze({...e,decode:(t,n=0)=>e.read(t,n)[0],encode:t=>{let n=new Uint8Array(G(t,e));return e.write(t,n,0),n}})}function T(e){return "fixedSize"in e&&typeof e.fixedSize=="number"}function q(e){if(!T(e))throw new _(kn)}function jo(e){return !T(e)}function tR(e){if(!jo(e))throw new _(Vn)}function A(e,t){if(T(e)!==T(t))throw new _(Gn);if(T(e)&&T(t)&&e.fixedSize!==t.fixedSize)throw new _(Hn,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!T(e)&&!T(t)&&e.maxSize!==t.maxSize)throw new _(Wn,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return {...t,...e,decode:t.decode,encode:e.encode,read:t.read,write:e.write}}function iu(e,t){let n=(r,o,i)=>{let a=e.encode(r);if(Ko(a,t)>=0)throw new _(tr,{encodedBytes:a,hexEncodedBytes:tt(a),hexSentinel:tt(t),sentinel:t});return o.set(a,i),i+=a.length,o.set(t,i),i+=t.length,i};return T(e)?S({...e,fixedSize:e.fixedSize+t.length,write:n}):S({...e,...e.maxSize!=null?{maxSize:e.maxSize+t.length}:{},getSizeFromValue:r=>e.getSizeFromValue(r)+t.length,write:n})}function au(e,t){let n=(r,o)=>{let i=o===0?r:r.slice(o),a=Ko(i,t);if(a===-1)throw new _(nr,{decodedBytes:i,hexDecodedBytes:tt(i),hexSentinel:tt(t),sentinel:t});let s=i.slice(0,a);return [e.decode(s),o+s.length+t.length]};return T(e)?m({...e,fixedSize:e.fixedSize+t.length,read:n}):m({...e,...e.maxSize!=null?{maxSize:e.maxSize+t.length}:{},read:n})}function nR(e,t){return A(iu(e,t),au(e,t))}function Ko(e,t){return e.findIndex((n,r,o)=>t.length===1?n===t[0]:le(o,t,r))}function tt(e){return e.reduce((t,n)=>t+n.toString(16).padStart(2,"0"),"")}function Xo(e,t,n=0){if(t.length-n<=0)throw new _(Fn,{codecDescription:e})}function Re(e,t,n,r=0){let o=n.length-r;if(o<t)throw new _(zn,{bytesLength:o,codecDescription:e,expected:t})}function nt(e,t,n){if(t<0||t>n)throw new _(Jn,{bytesLength:n,codecDescription:e,offset:t})}function Rr(e,t){var a,s;let n=(c,u,d)=>{let l=e.encode(c);return d=t.write(l.length,u,d),u.set(l,d),d+l.length};if(T(t)&&T(e))return S({...e,fixedSize:t.fixedSize+e.fixedSize,write:n});let r=T(t)?t.fixedSize:(a=t.maxSize)!=null?a:null,o=T(e)?e.fixedSize:(s=e.maxSize)!=null?s:null,i=r!==null&&o!==null?r+o:null;return S({...e,...i!==null?{maxSize:i}:{},getSizeFromValue:c=>{let u=G(c,e);return G(u,t)+u},write:n})}function fr(e,t){var a,s;let n=(c,u)=>{let[d,l]=t.read(c,u),f=Number(d);return u=l,(u>0||c.length>f)&&(c=c.slice(u,u+f)),Re("addDecoderSizePrefix",f,c),[e.decode(c),u+f]};if(T(t)&&T(e))return m({...e,fixedSize:t.fixedSize+e.fixedSize,read:n});let r=T(t)?t.fixedSize:(a=t.maxSize)!=null?a:null,o=T(e)?e.fixedSize:(s=e.maxSize)!=null?s:null,i=r!==null&&o!==null?r+o:null;return m({...e,...i!==null?{maxSize:i}:{},read:n})}function rR(e,t){return A(Rr(e,t),fr(e,t))}function F(e,t){return S({fixedSize:t,write:(n,r,o)=>{let i=e.encode(n),a=i.length>t?i.slice(0,t):i;return r.set(a,o),o+t}})}function z(e,t){return m({fixedSize:t,read:(n,r)=>{Re("fixCodecSize",t,n,r),(r>0||n.length>t)&&(n=n.slice(r,r+t)),T(e)&&(n=ru(n,e.fixedSize));let[o]=e.read(n,0);return [o,r+t]}})}function oR(e,t){return A(F(e,t),z(e,t))}function Ar(e,t){return S({...e,write:(n,r,o)=>{let i=u=>Yo(u,r.length),a=t.preOffset?t.preOffset({bytes:r,preOffset:o,wrapBytes:i}):o;nt("offsetEncoder",a,r.length);let s=e.write(n,r,a),c=t.postOffset?t.postOffset({bytes:r,newPreOffset:a,postOffset:s,preOffset:o,wrapBytes:i}):s;return nt("offsetEncoder",c,r.length),c}})}function Er(e,t){return m({...e,read:(n,r)=>{let o=u=>Yo(u,n.length),i=t.preOffset?t.preOffset({bytes:n,preOffset:r,wrapBytes:o}):r;nt("offsetDecoder",i,n.length);let[a,s]=e.read(n,i),c=t.postOffset?t.postOffset({bytes:n,newPreOffset:i,postOffset:s,preOffset:r,wrapBytes:o}):s;return nt("offsetDecoder",c,n.length),[a,c]}})}function iR(e,t){return A(Ar(e,t),Er(e,t))}function Yo(e,t){return t===0?0:(e%t+t)%t}function Sr(e,t){if(T(e)){let n=t(e.fixedSize);if(n<0)throw new _(Le,{bytesLength:n,codecDescription:"resizeEncoder"});return S({...e,fixedSize:n})}return S({...e,getSizeFromValue:n=>{let r=t(e.getSizeFromValue(n));if(r<0)throw new _(Le,{bytesLength:r,codecDescription:"resizeEncoder"});return r}})}function Or(e,t){if(T(e)){let n=t(e.fixedSize);if(n<0)throw new _(Le,{bytesLength:n,codecDescription:"resizeDecoder"});return m({...e,fixedSize:n})}return e}function aR(e,t){return A(Sr(e,t),Or(e,t))}function su(e,t){return Ar(Sr(e,n=>n+t),{preOffset:({preOffset:n})=>n+t})}function cu(e,t){return Ar(Sr(e,n=>n+t),{postOffset:({postOffset:n})=>n+t})}function uu(e,t){return Er(Or(e,n=>n+t),{preOffset:({preOffset:n})=>n+t})}function Nr(e,t){return Er(Or(e,n=>n+t),{postOffset:({postOffset:n})=>n+t})}function sR(e,t){return A(su(e,t),uu(e,t))}function cR(e,t){return A(cu(e,t),Nr(e,t))}function Jo(e,t,n,r,o=0){for(;n<--r;){let i=e[n];t[n+o]=e[r],t[r+o]=i,n++;}n===r&&(t[n+o]=e[n]);}function _u(e){return q(e),S({...e,write:(t,n,r)=>{let o=e.write(t,n,r);return Jo(n,n,r,r+e.fixedSize),o}})}function du(e){return q(e),m({...e,read:(t,n)=>{let r=t.slice();return Jo(t,r,n,n+e.fixedSize),e.read(r,n)}})}function uR(e){return A(_u(e),du(e))}function p(e,t){return S({...jo(e)?{...e,getSizeFromValue:n=>e.getSizeFromValue(t(n))}:e,write:(n,r,o)=>e.write(t(n),r,o)})}function g(e,t){return m({...e,read:(n,r)=>{let[o,i]=e.read(n,r);return [t(o,n,r),i]}})}function _R(e,t,n){return ou({...p(e,t),read:n?g(e,n).read:e.read})}function ni(e,t,n=t){if(!t.match(new RegExp(`^[${e}]*$`)))throw new _(X,{alphabet:e,base:e.length,value:n})}var Tr=e=>S({getSizeFromValue:t=>{let[n,r]=qo(t,e[0]);if(!r)return t.length;let o=Zo(r,e);return n.length+Math.ceil(o.toString(16).length/2)},write(t,n,r){if(ni(e,t),t==="")return r;let[o,i]=qo(t,e[0]);if(!i)return n.set(new Uint8Array(o.length).fill(0),r),r+o.length;let a=Zo(i,e),s=[];for(;a>0n;)s.unshift(Number(a%256n)),a/=256n;let c=[...Array(o.length).fill(0),...s];return n.set(c,r),r+c.length}}),gr=e=>m({read(t,n){let r=n===0?t:t.slice(n);if(r.length===0)return ["",0];let o=r.findIndex(c=>c!==0);o=o===-1?r.length:o;let i=e[0].repeat(o);if(o===r.length)return [i,t.length];let a=r.slice(o).reduce((c,u)=>c*256n+BigInt(u),0n),s=lu(a,e);return [i+s,t.length]}}),ri=e=>A(Tr(e),gr(e));function qo(e,t){let[n,r]=e.split(new RegExp(`((?!${t}).*)`));return [n,r]}function Zo(e,t){let n=BigInt(t.length),r=0n;for(let o of e)r*=n,r+=BigInt(t.indexOf(o));return r}function lu(e,t){let n=BigInt(t.length),r=[];for(;e>0n;)r.unshift(t[Number(e%n)]),e/=n;return r.join("")}var pr="0123456789",fR=()=>Tr(pr),AR=()=>gr(pr),ER=()=>ri(pr),Qo={alphabet:"0123456789abcdef",base:16};function mr(e){if(e>=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-55;if(e>=97&&e<=102)return e-87}var Ru=()=>S({getSizeFromValue:e=>Math.ceil(e.length/2),write(e,t,n){let r=e.length,o=r/2;if(r===1){let a=e.charCodeAt(0),s=mr(a);if(s===void 0)throw new _(X,{...Qo,value:e});return t.set([s],n),1+n}let i=new Uint8Array(o);for(let a=0,s=0;a<o;a++){let c=e.charCodeAt(s++),u=e.charCodeAt(s++),d=mr(c),l=mr(u);if(d===void 0||l===void 0&&!Number.isNaN(u))throw new _(X,{...Qo,value:e});i[a]=Number.isNaN(u)?d:d<<4|(l!=null?l:0);}return t.set(i,n),i.length+n}}),fu=()=>m({read(e,t){return [e.slice(t).reduce((r,o)=>r+o.toString(16).padStart(2,"0"),""),e.length]}}),SR=()=>A(Ru(),fu()),Ir="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",oe=()=>Tr(Ir),fe=()=>gr(Ir),OR=()=>ri(Ir),Au=(e,t)=>S({getSizeFromValue:n=>Math.floor(n.length*t/8),write(n,r,o){if(ni(e,n),n==="")return o;let i=[...n].map(s=>e.indexOf(s)),a=oi(i,t,8,false);return r.set(a,o),a.length+o}}),Eu=(e,t)=>m({read(n,r=0){let o=r===0?n:n.slice(r);return o.length===0?["",n.length]:[oi([...o],8,t,true).map(a=>e[a]).join(""),n.length]}}),NR=(e,t)=>A(Au(e,t),Eu(e,t));function oi(e,t,n,r){let o=[],i=0,a=0,s=(1<<n)-1;for(let c of e)for(i=i<<t|c,a+=t;a>=n;)a-=n,o.push(i>>a&s);return r&&a>0&&o.push(i<<n-a&s),o}var ei="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ye=()=>S({getSizeFromValue:e=>{try{return atob(e).length}catch{throw new _(X,{alphabet:ei,base:64,value:e})}},write(e,t,n){try{let r=atob(e).split("").map(o=>o.charCodeAt(0));return t.set(r,n),r.length+n}catch{throw new _(X,{alphabet:ei,base:64,value:e})}}}),Cr=()=>m({read(e,t=0){let n=e.slice(t);return [btoa(String.fromCharCode(...n)),e.length]}}),mR=()=>A(ye(),Cr()),Su=e=>e.replace(/\u0000/g,""),TR=(e,t)=>e.padEnd(t,"\0"),Ou=globalThis.TextDecoder,ti=globalThis.TextEncoder,Nu=()=>{let e;return S({getSizeFromValue:t=>(e||(e=new ti)).encode(t).length,write:(t,n,r)=>{let o=(e||(e=new ti)).encode(t);return n.set(o,r),r+o.length}})},mu=()=>{let e;return m({read(t,n){let r=(e||(e=new Ou)).decode(t.slice(n));return [Su(r),t.length]}})},gR=()=>A(Nu(),mu());var hR=128;function LR(e,t){try{return "exists"in e&&!e.exists?e:Object.freeze({...e,data:t.decode(e.data)})}catch{throw new _(Xt,{address:e.address})}}function ii(e){return !("exists"in e)||"exists"in e&&e.exists}function bR(e){if(ii(e)&&e.data instanceof Uint8Array)throw new _(Yt,{address:e.address})}function ai(e){let t=e.filter(n=>ii(n)&&n.data instanceof Uint8Array);if(t.length>0){let n=t.map(r=>r.address);throw new _(Jt,{addresses:n})}}function rt(e,t){if(!t)return Object.freeze({address:e,exists:false});let n=ye().encode(t.data[0]);return Object.freeze({...hr(t),address:e,data:n,exists:true})}function DR(e,t){if(!t)return Object.freeze({address:e,exists:false});let n=oe().encode(typeof t.data=="string"?t.data:t.data[0]);return Object.freeze({...hr(t),address:e,data:n,exists:true})}function si(e,t){if(!t)return Object.freeze({address:e,exists:false});let n=t.data.parsed.info;return Object.freeze({...hr(t),address:e,data:n,exists:true})}function hr(e){return Object.freeze({executable:e.executable,lamports:e.lamports,programAddress:e.owner,space:e.space})}async function yR(e,t,n={}){let{abortSignal:r,...o}=n,i=await e.getAccountInfo(t,{...o,encoding:"base64"}).send({abortSignal:r});return rt(t,i.value)}async function wR(e,t,n={}){let{abortSignal:r,...o}=n,{value:i}=await e.getAccountInfo(t,{...o,encoding:"jsonParsed"}).send({abortSignal:r});return i&&typeof i=="object"&&"parsed"in i.data?si(t,i):rt(t,i)}async function vR(e,t,n={}){let{abortSignal:r,...o}=n;return (await e.getMultipleAccounts(t,{...o,encoding:"base64"}).send({abortSignal:r})).value.map((a,s)=>rt(t[s],a))}async function ci(e,t,n={}){let{abortSignal:r,...o}=n;return (await e.getMultipleAccounts(t,{...o,encoding:"jsonParsed"}).send({abortSignal:r})).value.map((a,s)=>a&&typeof a=="object"&&"parsed"in a.data?si(t[s],a):rt(t[s],a))}function PR(e){if(!e.exists)throw new _(jt,{address:e.address})}function ui(e){let t=e.filter(n=>!n.exists);if(t.length>0){let n=t.map(r=>r.address);throw new _(Kt,{addresses:n})}}function _i(){if(typeof globalThis.crypto>"u"||typeof globalThis.crypto.getRandomValues!="function")throw new _(an)}function we(){if(!globalThis.isSecureContext)throw new _(qt)}var ie;async function Tu(e){return ie===void 0&&(ie=new Promise(t=>{e.generateKey("Ed25519",false,["sign","verify"]).then(()=>{t(ie=true);}).catch(()=>{t(ie=false);});})),typeof ie=="boolean"?ie:await ie}function di(){var e;if(we(),typeof globalThis.crypto>"u"||typeof((e=globalThis.crypto.subtle)==null?void 0:e.digest)!="function")throw new _(Zt)}async function li(){var e;if(we(),typeof globalThis.crypto>"u"||typeof((e=globalThis.crypto.subtle)==null?void 0:e.generateKey)!="function")throw new _(tn);if(!await Tu(globalThis.crypto.subtle))throw new _(Qt)}function ot(){var e;if(we(),typeof globalThis.crypto>"u"||typeof((e=globalThis.crypto.subtle)==null?void 0:e.exportKey)!="function")throw new _(en)}function Ri(){var e;if(we(),typeof globalThis.crypto>"u"||typeof((e=globalThis.crypto.subtle)==null?void 0:e.sign)!="function")throw new _(nn)}function fi(){var e;if(we(),typeof globalThis.crypto>"u"||typeof((e=globalThis.crypto.subtle)==null?void 0:e.verify)!="function")throw new _(rn)}var Lr,br;function Dr(){return Lr||(Lr=oe()),Lr}function gu(){return br||(br=fe()),br}function ve(e){if(e.length<32||e.length>44)return false;let t=Dr();try{return t.encode(e).byteLength===32}catch{return false}}function ae(e){if(e.length<32||e.length>44)throw new _(he,{actualLength:e.length});let r=Dr().encode(e).byteLength;if(r!==32)throw new _(Ce,{actualLength:r})}function pu(e){return ae(e),e}function se(){return p(F(Dr(),32),e=>pu(e))}function Y(){return z(gu(),32)}function yr(){return A(se(),Y())}function st(){return new Intl.Collator("en",{caseFirst:"lower",ignorePunctuation:false,localeMatcher:"best fit",numeric:false,sensitivity:"variant",usage:"sort"}).compare}var Iu=37095705934669439343138083508754565189542113879843219016388785533085940283555n,b=57896044618658097711785492504343953926634992332820282019728792003956564819949n,Ai=19681161376707505956807079304988542015446066515923890162744021073123829784752n;function w(e){let t=e%b;return t>=0n?t:b+t}function H(e,t){let n=e;for(;t-- >0n;)n*=n,n%=b;return n}function Cu(e){let n=e*e%b*e%b,r=H(n,2n)*n%b,o=H(r,1n)*e%b,i=H(o,5n)*o%b,a=H(i,10n)*i%b,s=H(a,20n)*a%b,c=H(s,40n)*s%b,u=H(c,80n)*c%b,d=H(u,80n)*c%b,l=H(d,10n)*i%b;return H(l,2n)*e%b}function hu(e,t){let n=w(t*t*t),r=w(n*n*t),o=Cu(e*r),i=w(e*n*o),a=w(t*i*i),s=i,c=w(i*Ai),u=a===e,d=a===w(-e),l=a===w(-e*Ai);return u&&(i=s),(d||l)&&(i=c),(w(i)&1n)===1n&&(i=w(-i)),!u&&!d?null:i}function Lu(e,t){let n=w(e*e),r=w(n-1n),o=w(Iu*n+1n),i=hu(r,o);if(i===null)return false;let a=(t&128)!==0;return !(i===0n&&a)}function bu(e){let t=e.toString(16);return t.length===1?`0${t}`:t}function Du(e){let n=`0x${e.reduce((r,o,i)=>`${bu(i===31?o&-129:o)}${r}`,"")}`;return BigInt(n)}function Si(e){if(e.byteLength!==32)return false;let t=Du(e);return Lu(t,e[31])}function yu(e){let t=yr().encode(e);return Si(t)===false}function wu(e){if(!yu(e))throw new _($t)}function VR(e){return wu(e),e}function GR(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="string"&&typeof e[1]=="number"&&e[1]>=0&&e[1]<=255&&ve(e[0])}function HR(e){if(!(Array.isArray(e)&&e.length===2&&typeof e[0]=="string"&&typeof e[1]=="number"))throw new _(kt);if(e[1]<0||e[1]>255)throw new _(Vt,{bump:e[1]});ae(e[0]);}var at=32,Ei=16,it=[80,114,111,103,114,97,109,68,101,114,105,118,101,100,65,100,100,114,101,115,115];async function vu({programAddress:e,seeds:t}){if(di(),t.length>Ei)throw new _(Gt,{actual:t.length,maxSeeds:Ei});let n,r=t.reduce((c,u,d)=>{let l=typeof u=="string"?(n||(n=new TextEncoder)).encode(u):u;if(l.byteLength>at)throw new _($e,{actual:l.byteLength,index:d,maxSeedLength:at});return c.push(...l),c},[]),o=yr(),i=o.encode(e),a=await crypto.subtle.digest("SHA-256",new Uint8Array([...r,...i,...it])),s=new Uint8Array(a);if(Si(s))throw new _(je);return o.decode(s)}async function WR({programAddress:e,seeds:t}){let n=255;for(;n>0;)try{return [await vu({programAddress:e,seeds:[...t,new Uint8Array([n])]}),n]}catch(r){if(M(r,je))n--;else throw r}throw new _(Ht)}async function $R({baseAddress:e,programAddress:t,seed:n}){let{encode:r,decode:o}=yr(),i=typeof n=="string"?new TextEncoder().encode(n):n;if(i.byteLength>at)throw new _($e,{actual:i.byteLength,index:0,maxSeedLength:at});let a=r(t);if(a.length>=it.length&&a.slice(-it.length).every((u,d)=>u===it[d]))throw new _(Wt);let s=await crypto.subtle.digest("SHA-256",new Uint8Array([...r(e),...i,...a])),c=new Uint8Array(s);return o(c)}async function ct(e){if(ot(),e.type!=="public"||e.algorithm.name!=="Ed25519")throw new _(zt);let t=await crypto.subtle.exportKey("raw",e);return Y().decode(new Uint8Array(t))}async function jR(e){let t=se().encode(e);return await crypto.subtle.importKey("raw",t,{name:"Ed25519"},true,["verify"])}function Oi(e,t,n,r){if(r<t||r>n)throw new _(Yn,{codecDescription:e,max:n,min:t,value:r})}var Pu=(e=>(e[e.Little=0]="Little",e[e.Big=1]="Big",e))(Pu||{});function Ni(e){return (e==null?void 0:e.endian)!==1}function v(e){return S({fixedSize:e.size,write(t,n,r){e.range&&Oi(e.name,e.range[0],e.range[1],t);let o=new ArrayBuffer(e.size);return e.set(new DataView(o),t,Ni(e.config)),n.set(new Uint8Array(o),r),r+e.size}})}function P(e){return m({fixedSize:e.size,read(t,n=0){Xo(e.name,t,n),Re(e.name,e.size,t,n);let r=new DataView(xu(t,n,e.size));return [e.get(r,Ni(e.config)),n+e.size]}})}function xu(e,t,n){let r=e.byteOffset+(t!=null?t:0),o=n!=null?n:e.byteLength;return e.buffer.slice(r,r+o)}var Uu=(e={})=>v({config:e,name:"f32",set:(t,n,r)=>t.setFloat32(0,Number(n),r),size:4}),Bu=(e={})=>P({config:e,get:(t,n)=>t.getFloat32(0,n),name:"f32",size:4}),JR=(e={})=>A(Uu(e),Bu(e)),Mu=(e={})=>v({config:e,name:"f64",set:(t,n,r)=>t.setFloat64(0,Number(n),r),size:8}),Fu=(e={})=>P({config:e,get:(t,n)=>t.getFloat64(0,n),name:"f64",size:8}),qR=(e={})=>A(Mu(e),Fu(e)),zu=(e={})=>v({config:e,name:"i128",range:[-BigInt("0x7fffffffffffffffffffffffffffffff")-1n,BigInt("0x7fffffffffffffffffffffffffffffff")],set:(t,n,r)=>{let o=r?8:0,i=r?0:8,a=0xffffffffffffffffn;t.setBigInt64(o,BigInt(n)>>64n,r),t.setBigUint64(i,BigInt(n)&a,r);},size:16}),ku=(e={})=>P({config:e,get:(t,n)=>{let r=n?8:0,o=n?0:8,i=t.getBigInt64(r,n),a=t.getBigUint64(o,n);return (i<<64n)+a},name:"i128",size:16}),ZR=(e={})=>A(zu(e),ku(e)),Vu=(e={})=>v({config:e,name:"i16",range:[-32767-1,32767],set:(t,n,r)=>t.setInt16(0,Number(n),r),size:2}),Gu=(e={})=>P({config:e,get:(t,n)=>t.getInt16(0,n),name:"i16",size:2}),QR=(e={})=>A(Vu(e),Gu(e)),Hu=(e={})=>v({config:e,name:"i32",range:[-2147483647-1,2147483647],set:(t,n,r)=>t.setInt32(0,Number(n),r),size:4}),Wu=(e={})=>P({config:e,get:(t,n)=>t.getInt32(0,n),name:"i32",size:4}),ef=(e={})=>A(Hu(e),Wu(e)),$u=(e={})=>v({config:e,name:"i64",range:[-BigInt("0x7fffffffffffffff")-1n,BigInt("0x7fffffffffffffff")],set:(t,n,r)=>t.setBigInt64(0,BigInt(n),r),size:8}),ju=(e={})=>P({config:e,get:(t,n)=>t.getBigInt64(0,n),name:"i64",size:8}),tf=(e={})=>A($u(e),ju(e)),Ku=()=>v({name:"i8",range:[-127-1,127],set:(e,t)=>e.setInt8(0,Number(t)),size:1}),Xu=()=>P({get:e=>e.getInt8(0),name:"i8",size:1}),nf=()=>A(Ku(),Xu()),W=()=>S({getSizeFromValue:e=>e<=127?1:e<=16383?2:3,maxSize:3,write:(e,t,n)=>{Oi("shortU16",0,65535,e);let r=[0];for(let o=0;;o+=1){let i=Number(e)>>o*7;if(i===0)break;let a=127&i;r[o]=a,o>0&&(r[o-1]|=128);}return t.set(r,n),n+r.length}}),k=()=>m({maxSize:3,read:(e,t)=>{let n=0,r=0;for(;++r;){let o=r-1,i=e[t+o],a=127&i;if(n|=a<<o*7,(i&128)===0)break}return [n,t+r]}}),rf=()=>A(W(),k()),Yu=(e={})=>v({config:e,name:"u128",range:[0n,BigInt("0xffffffffffffffffffffffffffffffff")],set:(t,n,r)=>{let o=r?8:0,i=r?0:8,a=0xffffffffffffffffn;t.setBigUint64(o,BigInt(n)>>64n,r),t.setBigUint64(i,BigInt(n)&a,r);},size:16}),Ju=(e={})=>P({config:e,get:(t,n)=>{let r=n?8:0,o=n?0:8,i=t.getBigUint64(r,n),a=t.getBigUint64(o,n);return (i<<64n)+a},name:"u128",size:16}),of=(e={})=>A(Yu(e),Ju(e)),qu=(e={})=>v({config:e,name:"u16",range:[0,65535],set:(t,n,r)=>t.setUint16(0,Number(n),r),size:2}),Zu=(e={})=>P({config:e,get:(t,n)=>t.getUint16(0,n),name:"u16",size:2}),af=(e={})=>A(qu(e),Zu(e)),Pe=(e={})=>v({config:e,name:"u32",range:[0,4294967295],set:(t,n,r)=>t.setUint32(0,Number(n),r),size:4}),wr=(e={})=>P({config:e,get:(t,n)=>t.getUint32(0,n),name:"u32",size:4}),sf=(e={})=>A(Pe(e),wr(e)),vr=(e={})=>v({config:e,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(t,n,r)=>t.setBigUint64(0,BigInt(n),r),size:8}),Pr=(e={})=>P({config:e,get:(t,n)=>t.getBigUint64(0,n),name:"u64",size:8}),cf=(e={})=>A(vr(e),Pr(e)),D=()=>v({name:"u8",range:[0,255],set:(e,t)=>e.setUint8(0,Number(t)),size:1}),L=()=>P({get:e=>e.getUint8(0),name:"u8",size:1}),uf=()=>A(D(),L());function mi(e,t,n){if(t!==n)throw new _($n,{actual:n,codecDescription:e,expected:t})}function Qu(e){return e.reduce((t,n)=>t===null||n===null?null:Math.max(t,n),0)}function ee(e){return e.reduce((t,n)=>t===null||n===null?null:t+n,0)}function Ae(e){return T(e)?e.fixedSize:null}function ce(e){var t;return T(e)?e.fixedSize:(t=e.maxSize)!=null?t:null}function V(e,t={}){var i,a;let n=(i=t.size)!=null?i:Pe(),r=ut(n,Ae(e)),o=(a=ut(n,ce(e)))!=null?a:void 0;return S({...r!==null?{fixedSize:r}:{getSizeFromValue:s=>(typeof n=="object"?G(s.length,n):0)+[...s].reduce((u,d)=>u+G(d,e),0),maxSize:o},write:(s,c,u)=>(typeof n=="number"&&mi("array",n,s.length),typeof n=="object"&&(u=n.write(s.length,c,u)),s.forEach(d=>{u=e.write(d,c,u);}),u)})}function U(e,t={}){var a,s;let n=(a=t.size)!=null?a:wr(),r=Ae(e),o=ut(n,r),i=(s=ut(n,ce(e)))!=null?s:void 0;return m({...o!==null?{fixedSize:o}:{maxSize:i},read:(c,u)=>{let d=[];if(typeof n=="object"&&c.slice(u).length===0)return [d,u];if(n==="remainder"){for(;u<c.length;){let[O,E]=e.read(c,u);u=E,d.push(O);}return [d,u]}let[l,f]=typeof n=="number"?[n,u]:n.read(c,u);u=f;for(let O=0;O<l;O+=1){let[E,N]=e.read(c,u);u=N,d.push(E);}return [d,u]}})}function ff(e,t={}){return A(V(e,t),U(e,t))}function ut(e,t){return typeof e!="number"?null:e===0?0:t===null?null:t*e}function e_(e,t={}){var o;let r=(o=(typeof t=="boolean"?{backward:t}:t).backward)!=null?o:false;return S({fixedSize:e,write(i,a,s){var u;let c=[];for(let d=0;d<e;d+=1){let l=0;for(let f=0;f<8;f+=1){let O=Number((u=i[d*8+f])!=null?u:0);l|=O<<(r?f:7-f);}r?c.unshift(l):c.push(l);}return a.set(c,s),e}})}function t_(e,t={}){var o;let r=(o=(typeof t=="boolean"?{backward:t}:t).backward)!=null?o:false;return m({fixedSize:e,read(i,a){Re("bitArray",e,i,a);let s=[],c=i.slice(a,a+e);return c=r?c.reverse():c,c.forEach(u=>{for(let d=0;d<8;d+=1)r?(s.push(!!(u&1)),u>>=1):(s.push(!!(u&128)),u<<=1);}),[s,a+e]}})}function Af(e,t={}){return A(e_(e,t),t_(e,t))}function _t(e={}){var t;return p((t=e.size)!=null?t:D(),n=>n?1:0)}function dt(e={}){var t;return g((t=e.size)!=null?t:L(),n=>Number(n)===1)}function Ef(e={}){return A(_t(e),dt(e))}function Ee(){return S({getSizeFromValue:e=>e.length,write:(e,t,n)=>(t.set(e,n),n+e.length)})}function Se(){return m({read:(e,t)=>{let n=e.slice(t);return [n,t+n.length]}})}function Sf(){return A(Ee(),Se())}var n_=()=>m({read(e,t){return [e.slice(t).reduce((r,o)=>r+o.toString(16).padStart(2,"0"),""),e.length]}});function lt(e){return S({fixedSize:e.length,write:(t,n,r)=>(n.set(e,r),r+e.length)})}function Rt(e){return m({fixedSize:e.length,read:(t,n)=>{let r=n_();if(!le(t,e,n))throw new _(er,{constant:e,data:t,hexConstant:r.decode(e),hexData:r.decode(t),offset:n});return [void 0,n+e.length]}})}function Of(e){return A(lt(e),Rt(e))}function $(e){var r;let t=ee(e.map(Ae)),n=(r=ee(e.map(ce)))!=null?r:void 0;return S({...t===null?{getSizeFromValue:o=>e.map((i,a)=>G(o[a],i)).reduce((i,a)=>i+a,0),maxSize:n}:{fixedSize:t},write:(o,i,a)=>(mi("tuple",e.length,o.length),e.forEach((s,c)=>{a=s.write(o[c],i,a);}),a)})}function x(e){var r;let t=ee(e.map(Ae)),n=(r=ee(e.map(ce)))!=null?r:void 0;return m({...t===null?{maxSize:n}:{fixedSize:t},read:(o,i)=>{let a=[];return e.forEach(s=>{let[c,u]=s.read(o,i);a.push(c),i=u;}),[a,i]}})}function Nf(e){return A($(e),x(e))}function xe(e,t){let n=Ti(e),r=(i,a,s)=>{let c=t(i);return xr(e,c),e[c].write(i,a,s)};if(n!==null)return S({fixedSize:n,write:r});let o=gi(e);return S({...o!==null?{maxSize:o}:{},getSizeFromValue:i=>{let a=t(i);return xr(e,a),G(i,e[a])},write:r})}function Ue(e,t){let n=Ti(e),r=(i,a)=>{let s=t(i,a);return xr(e,s),e[s].read(i,a)};if(n!==null)return m({fixedSize:n,read:r});let o=gi(e);return m({...o!==null?{maxSize:o}:{},read:r})}function mf(e,t,n){return A(xe(e,t),Ue(e,n))}function xr(e,t){if(typeof e[t]>"u")throw new _(Qn,{maxRange:e.length-1,minRange:0,variant:t})}function Ti(e){if(e.length===0)return 0;if(!T(e[0]))return null;let t=e[0].fixedSize;return e.every(r=>T(r)&&r.fixedSize===t)?t:null}function gi(e){return Qu(e.map(t=>ce(t)))}function pi(e,t={}){var o,i;let n=(o=t.discriminator)!=null?o:"__kind",r=(i=t.size)!=null?i:D();return xe(e.map(([,a],s)=>p($([r,a]),c=>[s,c])),a=>o_(e,a[n]))}function Ii(e,t={}){var o,i;let n=(o=t.discriminator)!=null?o:"__kind",r=(i=t.size)!=null?i:L();return Ue(e.map(([a,s])=>g(x([r,s]),([,c])=>({[n]:a,...c}))),(a,s)=>Number(r.read(a,s)[0]))}function r_(e,t={}){return A(pi(e,t),Ii(e,t))}function o_(e,t){let n=e.findIndex(([r])=>t===r);if(n<0)throw new _(Kn,{value:t,variants:e.map(([r])=>r)});return n}var Tf=pi,gf=Ii,pf=r_;function Ci(e){let t=[...new Set(Object.values(e).filter(a=>typeof a=="number"))].sort(),n=Object.fromEntries(Object.entries(e).slice(t.length)),r=Object.keys(n),o=Object.values(n),i=[...new Set([...r,...o.filter(a=>typeof a=="string")])];return {enumKeys:r,enumRecord:n,enumValues:o,numericalValues:t,stringValues:i}}function i_({enumKeys:e,enumValues:t,variant:n}){let r=hi(t,o=>o===n);return r>=0?r:e.findIndex(o=>o===n)}function a_({discriminator:e,enumKeys:t,enumValues:n,useValuesAsDiscriminators:r}){return r?hi(n,o=>o===e):e>=0&&e<t.length?e:-1}function hi(e,t){let n=e.length;for(;n--;)if(t(e[n],n,e))return n;return -1}function Li(e){if(e.length===0)return "";let t=[e[0],e[0]],n=[];for(let r=1;r<e.length;r++){let o=e[r];t[1]+1===o?t[1]=o:(n.push(t[0]===t[1]?`${t[0]}`:`${t[0]}-${t[1]}`),t=[o,o]);}return n.push(t[0]===t[1]?`${t[0]}`:`${t[0]}-${t[1]}`),n.join(", ")}function bi(e,t={}){var c,u;let n=(c=t.size)!=null?c:D(),r=(u=t.useValuesAsDiscriminators)!=null?u:false,{enumKeys:o,enumValues:i,numericalValues:a,stringValues:s}=Ci(e);if(r&&i.some(d=>typeof d=="string"))throw new _(Qe,{stringValues:i.filter(d=>typeof d=="string")});return p(n,d=>{let l=i_({enumKeys:o,enumValues:i,variant:d});if(l<0)throw new _(Xn,{formattedNumericalValues:Li(a),numericalValues:a,stringValues:s,variant:d});return r?i[l]:l})}function Di(e,t={}){var s,c;let n=(s=t.size)!=null?s:L(),r=(c=t.useValuesAsDiscriminators)!=null?c:false,{enumKeys:o,enumValues:i,numericalValues:a}=Ci(e);if(r&&i.some(u=>typeof u=="string"))throw new _(Qe,{stringValues:i.filter(u=>typeof u=="string")});return g(n,u=>{let d=Number(u),l=a_({discriminator:d,enumKeys:o,enumValues:i,useValuesAsDiscriminators:r});if(l<0){let f=r?a:[...Array(o.length).keys()];throw new _(jn,{discriminator:d,formattedValidDiscriminators:Li(f),validDiscriminators:f})}return i[l]})}function s_(e,t={}){return A(bi(e,t),Di(e,t))}var If=bi,Cf=Di,hf=s_;function c_(e,t){return p($([...t,e]),n=>[...t.map(()=>{}),n])}function u_(e,t){return g(x([...t,e]),n=>n[n.length-1])}function Lf(e,t){return A(c_(e,t),u_(e,t))}function __(e,t){return p($([e,...t]),n=>[n,...t.map(()=>{})])}function d_(e,t){return g(x([e,...t]),n=>n[0])}function bf(e,t){return A(__(e,t),d_(e,t))}function l_(e,t={}){var r;let n=(r=t.size)!=null?r:D();return p(n,o=>{let i=e.indexOf(o);if(i<0)throw new _(qn,{value:o,variants:e});return i})}function R_(e,t={}){var r;let n=(r=t.size)!=null?r:L();return g(n,o=>{if(o<0||o>=e.length)throw new _(Zn,{discriminator:o,maxRange:e.length-1,minRange:0});return e[Number(o)]})}function Df(e,t={}){return A(l_(e,t),R_(e,t))}function f_(e,t,n={}){return p(V($([e,t]),n),r=>[...r.entries()])}function A_(e,t,n={}){return g(U(x([e,t]),n),r=>new Map(r))}function yf(e,t,n={}){return A(f_(e,t,n),A_(e,t,n))}function Z(){return S({fixedSize:0,write:(e,t,n)=>n})}function Q(){return m({fixedSize:0,read:(e,t)=>[void 0,t]})}function wf(){return A(Z(),Q())}function E_(e,t={}){let n=(()=>{var o;return t.prefix===null?p(Z(),i=>{}):_t({size:(o=t.prefix)!=null?o:D()})})(),r=t.noneValue==="zeroes"?(q(e),F(Z(),e.fixedSize)):t.noneValue?lt(t.noneValue):Z();return xe([p($([n,r]),o=>[false,void 0]),p($([n,e]),o=>[true,o])],o=>+(o!==null))}function S_(e,t={}){let n=(()=>{var o;return t.prefix===null?g(Q(),()=>false):dt({size:(o=t.prefix)!=null?o:L()})})(),r=t.noneValue==="zeroes"?(q(e),z(Q(),e.fixedSize)):t.noneValue?Rt(t.noneValue):Q();return Ue([g(x([n,r]),()=>null),g(x([n,e]),([,o])=>o)],(o,i)=>{if(t.prefix===null&&!t.noneValue)return +(i<o.length);if(t.prefix===null&&t.noneValue!=null){let a=t.noneValue==="zeroes"?new Uint8Array(r.fixedSize).fill(0):t.noneValue;return le(o,a,i)?0:1}return Number(n.read(o,i)[0])})}function vf(e,t={}){return A(E_(e,t),S_(e,t))}function O_(e,t={}){return p(V(e,t),n=>[...n])}function N_(e,t={}){return g(U(e,t),n=>new Set(n))}function Pf(e,t={}){return A(O_(e,t),N_(e,t))}function J(e){var o;let t=e.map(([,i])=>i),n=ee(t.map(Ae)),r=(o=ee(t.map(ce)))!=null?o:void 0;return S({...n===null?{getSizeFromValue:i=>e.map(([a,s])=>G(i[a],s)).reduce((a,s)=>a+s,0),maxSize:r}:{fixedSize:n},write:(i,a,s)=>(e.forEach(([c,u])=>{s=u.write(i[c],a,s);}),s)})}function te(e){var o;let t=e.map(([,i])=>i),n=ee(t.map(Ae)),r=(o=ee(t.map(ce)))!=null?o:void 0;return m({...n===null?{maxSize:r}:{fixedSize:n},read:(i,a)=>{let s={};return e.forEach(([c,u])=>{let[d,l]=u.read(i,a);a=l,s[c]=d;}),[s,a]}})}function xf(e){return A(J(e),te(e))}var wi=e=>({__option:"Some",value:e}),vi=()=>({__option:"None"}),Ur=e=>!!(e&&typeof e=="object"&&"__option"in e&&(e.__option==="Some"&&"value"in e||e.__option==="None")),ft=e=>e.__option==="Some",zf=e=>e.__option==="None";function kf(e,t){return ft(e)?e.value:t?t():null}var m_=e=>e!==null?wi(e):vi();function T_(e,t={}){let n=(()=>{var o;return t.prefix===null?p(Z(),i=>{}):_t({size:(o=t.prefix)!=null?o:D()})})(),r=t.noneValue==="zeroes"?(q(e),F(Z(),e.fixedSize)):t.noneValue?lt(t.noneValue):Z();return xe([p($([n,r]),o=>[false,void 0]),p($([n,e]),o=>[true,Ur(o)&&ft(o)?o.value:o])],o=>{let i=Ur(o)?o:m_(o);return Number(ft(i))})}function g_(e,t={}){let n=(()=>{var o;return t.prefix===null?g(Q(),()=>false):dt({size:(o=t.prefix)!=null?o:L()})})(),r=t.noneValue==="zeroes"?(q(e),z(Q(),e.fixedSize)):t.noneValue?Rt(t.noneValue):Q();return Ue([g(x([n,r]),()=>vi()),g(x([n,e]),([,o])=>wi(o))],(o,i)=>{if(t.prefix===null&&!t.noneValue)return +(i<o.length);if(t.prefix===null&&t.noneValue!=null){let a=t.noneValue==="zeroes"?new Uint8Array(r.fixedSize).fill(0):t.noneValue;return le(o,a,i)?0:1}return Number(n.read(o,i)[0])})}function Vf(e,t={}){return A(T_(e,t),g_(e,t))}function yi(e,t){if(!e||ArrayBuffer.isView(e))return e;let n=r=>t?yi(r,t):yi(r);return Ur(e)?ft(e)?n(e.value):t?t():null:Array.isArray(e)?e.map(n):typeof e=="object"?Object.fromEntries(Object.entries(e).map(([r,o])=>[r,n(o)])):e}function B(e,...t){return t.reduce((n,r)=>r(n),e)}function Pi(e,t){return e.programAddress===t}function $f(e,t){if(e.programAddress!==t)throw new _(fn,{actualProgramAddress:e.programAddress,expectedProgramAddress:t})}function jf(e){return e.accounts!==void 0}function Kf(e){if(e.accounts===void 0)throw new _(ln,{data:e.data,programAddress:e.programAddress})}function xi(e){return e.data!==void 0}function Xf(e){var t;if(e.data===void 0)throw new _(Rn,{accountAddresses:(t=e.accounts)==null?void 0:t.map(n=>n.address),programAddress:e.programAddress})}var h=(e=>(e[e.WRITABLE_SIGNER=3]="WRITABLE_SIGNER",e[e.READONLY_SIGNER=2]="READONLY_SIGNER",e[e.WRITABLE=1]="WRITABLE",e[e.READONLY=0]="READONLY",e))(h||{}),p_=2,Ui=1;function Yf(e){return e&-3}function Jf(e){return e&-2}function j(e){return e>=2}function Oe(e){return (e&Ui)!==0}function Br(e,t){return e|t}function qf(e){return e|p_}function Zf(e){return e|Ui}var Be=Object.freeze({name:"Ed25519"});function I_(e){return new Uint8Array([48,46,2,1,0,48,5,6,3,43,101,112,4,34,4,32,...e])}async function Mr(e,t=false){let n=e.byteLength;if(n!==32)throw new _(cn,{actualLength:n});let r=I_(e);return await crypto.subtle.importKey("pkcs8",r,Be,t,["sign"])}async function C_(e,t=false){if(ot(),e.extractable===false)throw new _(on,{key:e});let n=await crypto.subtle.exportKey("jwk",e);return await crypto.subtle.importKey("jwk",{crv:"Ed25519",ext:t,key_ops:["verify"],kty:"OKP",x:n.x},"Ed25519",t,["verify"])}var Ne;function h_(e){if(Ne||(Ne=oe()),e.length<64||e.length>88)throw new _(_n,{actualLength:e.length});let n=Ne.encode(e).byteLength;if(n!==64)throw new _(un,{actualLength:n})}function rA(e){return Ne||(Ne=oe()),!(e.length<64||e.length>88||Ne.encode(e).byteLength!==64)}async function Me(e,t){Ri();let n=await crypto.subtle.sign(Be,e,t);return new Uint8Array(n)}function oA(e){return h_(e),e}async function L_(e,t,n){return fi(),await crypto.subtle.verify(Be,e,t,n)}async function Bi(){return await li(),await crypto.subtle.generateKey(Be,false,["sign","verify"])}async function Mi(e,t=false){if(_i(),e.byteLength!==64)throw new _(sn,{byteLength:e.byteLength});let[n,r]=await Promise.all([crypto.subtle.importKey("raw",e.slice(32),Be,true,["verify"]),Mr(e.slice(0,32),t)]),o=new Uint8Array(32);crypto.getRandomValues(o);let i=await Me(r,o);if(!await L_(n,i,o))throw new _(dn);return {privateKey:r,publicKey:n}}async function Fi(e,t=false){let n=Mr(e,t),[r,o]=await Promise.all([(t?n:Mr(e,true)).then(async i=>await C_(i,true)),n]);return {privateKey:o,publicKey:r}}function sA(e,t,n,r){var i;if(!M(e,Ke))return false;let o=(i=t.instructions[e.context.index])==null?void 0:i.programAddress;return !o||o!==n?false:typeof r>"u"||e.context.code===r}function At(e){return JSON.parse(b_(e),(t,n)=>v_(n)?w_(n):n)}function b_(e){let t=[],n=false;for(let r=0;r<e.length;r++){let o=false;if(e[r]==="\\"&&(t.push(e[r++]),o=!o),e[r]==='"'){t.push(e[r]),o||(n=!n);continue}if(!n){let i=D_(e,r);if(i!=null&&i.length){r+=i.length-1,i.match(/\.|[eE]-/)?t.push(i):t.push(y_(i));continue}}t.push(e[r]);}return t.join("")}function D_(e,t){var o;let n=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/;if(!((o=e[t])!=null&&o.match(/[-\d]/)))return null;let r=e.slice(t).match(n);return r?r[0]:null}function y_(e){return `{"$n":"${e}"}`}function w_({$n:e}){if(e.match(/[eE]/)){let[t,n]=e.split(/[eE]/);return BigInt(t)*BigInt(10)**BigInt(n)}return BigInt(e)}function v_(e){return !!e&&typeof e=="object"&&"$n"in e&&typeof e.$n=="string"}var zi=0n;function P_(){let e=zi;return zi++,e.toString()}function me(e){return {id:P_(),jsonrpc:"2.0",method:e.methodName,params:e.params}}function Et(e,t){return U_(JSON.stringify(e,(n,r)=>typeof r=="bigint"?x_(r):r,t))}function x_(e){return {$n:`${e}`}}function U_(e){return e.replace(/\{\s*"\$n"\s*:\s*"(-?\d+)"\s*\}/g,"$1")}function ki(e){return B_(e)}function B_(e){return new Proxy(e.api,{defineProperty(){return false},deleteProperty(){return false},get(t,n,r){if(n!=="then")return function(...o){let i=n.toString(),a=Reflect.get(t,i,r);if(!a)throw new _(or,{method:i,params:o});let s=a(...o);return M_(e,s)}}})}function M_({transport:e},t){return {async send(n){return await t.execute({signal:n==null?void 0:n.abortSignal,transport:e})}}}function Vi(e){return new Proxy({},{defineProperty(){return false},deleteProperty(){return false},get(...t){let[n,r]=t,o=r.toString();return function(...i){let a=Object.freeze({methodName:o,params:i}),s=e!=null&&e.requestTransformer?e==null?void 0:e.requestTransformer(a):a;return Object.freeze({execute:async({signal:c,transport:u})=>{let d=me(s),l=await u({payload:d,signal:c});return e!=null&&e.responseTransformer?e.responseTransformer(l,s):l}})}}})}function St(e){return e==null||typeof e!="object"||Array.isArray(e)?false:"jsonrpc"in e&&e.jsonrpc==="2.0"&&"method"in e&&typeof e.method=="string"&&"params"in e}function F_(e){return typeof e=="bigint"?Number(e):e}var R={};function Gi(e){return function t(n,r){if(Array.isArray(n))return n.map((o,i)=>{let a={...r,keyPath:[...r.keyPath,i]};return t(o,a)});if(typeof n=="object"&&n!==null){let o={};for(let i in n){if(!Object.prototype.hasOwnProperty.call(n,i))continue;let a={...r,keyPath:[...r.keyPath,i]};o[i]=t(n[i],a);}return o}else return e.reduce((o,i)=>i(o,r),n)}}function Hi(e,t){return n=>{let r=Gi(e);return Object.freeze({...n,params:r(n.params,t)})}}function z_(e,t){return n=>Gi(e)(n,t)}function k_(){return Hi([F_],{keyPath:[]})}function V_({commitmentPropertyName:e,params:t,optionsObjectPositionInParams:n,overrideCommitment:r}){let o=t[n];if(o===void 0||o&&typeof o=="object"&&!Array.isArray(o)){if(o&&e in o){if(!o[e]||o[e]==="finalized"){let i=[...t],{[e]:a,...s}=o;return Object.keys(s).length>0?i[n]=s:n===i.length-1?i.length--:i[n]=void 0,i}}else if(r!=="finalized"){let i=[...t];return i[n]={...o,[e]:r},i}}return t}function G_({defaultCommitment:e,optionsObjectPositionByMethod:t}){return n=>{let{params:r,methodName:o}=n;if(!Array.isArray(r))return n;let i=t[o];return i==null?n:Object.freeze({methodName:o,params:V_({commitmentPropertyName:o==="sendTransaction"?"preflightCommitment":"commitment",optionsObjectPositionInParams:i,overrideCommitment:e,params:r})})}}function H_(e){return (t,{keyPath:n})=>(typeof t=="bigint"&&e&&(t>Number.MAX_SAFE_INTEGER||t<-Number.MAX_SAFE_INTEGER)&&e(n,t),t)}function W_(e){return t=>Hi([H_((...r)=>e(t,...r))],{keyPath:[]})(t)}var $_={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 Ot(e){let t=e==null?void 0:e.onIntegerOverflow;return n=>B(n,t?W_(t):r=>r,k_(),G_({defaultCommitment:e==null?void 0:e.defaultCommitment,optionsObjectPositionByMethod:$_}))}function j_(e){return function(n,{keyPath:r}){return typeof n=="number"&&Number.isInteger(n)||typeof n=="bigint"?K_(r,e)?Number(n):BigInt(n):n}}function K_(e,t){return t.some(n=>{if(n.length!==e.length)return false;for(let r=e.length-1;r>=0;r--){let o=e[r],i=n[r];if(i!==o&&(i!==R||typeof o!="number"))return false}return true})}function Wi(e){return z_([j_(e)],{keyPath:[]})}function X_(){return e=>e.result}function Y_(){return e=>{let t=e;if("error"in t)throw De(t.error);return t}}function $i(e){return (t,n)=>{let r=n.methodName,o=e!=null&&e.allowedNumericKeyPaths&&r?e.allowedNumericKeyPaths[r]:void 0;return B(t,i=>Y_()(i,n),i=>X_()(i,n),i=>Wi(o!=null?o:[])(i,n))}}function ji(e){return (t,n)=>{let r=n.methodName,o=e!=null&&e.allowedNumericKeyPaths&&r?e.allowedNumericKeyPaths[r]:void 0;return B(t,i=>Wi(o!=null?o:[])(i,n))}}var Nt=[["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",R,"state","olderTransferFee","transferFeeBasisPoints"],["data","parsed","info","extensions",R,"state","newerTransferFee","transferFeeBasisPoints"],["data","parsed","info","extensions",R,"state","preUpdateAverageRate"],["data","parsed","info","extensions",R,"state","currentRate"]],ne=[...Nt,["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",R,"confirmationCount"]],mt=[["index"],["instructions",R,"accounts",R],["instructions",R,"programIdIndex"],["instructions",R,"stackHeight"]],Fr=[["addressTableLookups",R,"writableIndexes",R],["addressTableLookups",R,"readonlyIndexes",R],["header","numReadonlySignedAccounts"],["header","numReadonlyUnsignedAccounts"],["header","numRequiredSignatures"],["instructions",R,"accounts",R],["instructions",R,"programIdIndex"],["instructions",R,"stackHeight"]];function Ki(e){return Vi({requestTransformer:Ot(e),responseTransformer:$i({allowedNumericKeyPaths:J_()})})}var zr;function J_(){return zr||(zr={getAccountInfo:ne.map(e=>["value",...e]),getBlock:[["transactions",R,"meta","preTokenBalances",R,"accountIndex"],["transactions",R,"meta","preTokenBalances",R,"uiTokenAmount","decimals"],["transactions",R,"meta","postTokenBalances",R,"accountIndex"],["transactions",R,"meta","postTokenBalances",R,"uiTokenAmount","decimals"],["transactions",R,"meta","rewards",R,"commission"],...mt.map(e=>["transactions",R,"meta","innerInstructions",R,...e]),...Fr.map(e=>["transactions",R,"transaction","message",...e]),["rewards",R,"commission"]],getClusterNodes:[[R,"featureSet"],[R,"shredVersion"]],getInflationGovernor:[["initial"],["foundation"],["foundationTerm"],["taper"],["terminal"]],getInflationRate:[["foundation"],["total"],["validator"]],getInflationReward:[[R,"commission"]],getMultipleAccounts:ne.map(e=>["value",R,...e]),getProgramAccounts:ne.flatMap(e=>[["value",R,"account",...e],[R,"account",...e]]),getRecentPerformanceSamples:[[R,"samplePeriodSecs"]],getTokenAccountBalance:[["value","decimals"],["value","uiAmount"]],getTokenAccountsByDelegate:Nt.map(e=>["value",R,"account",...e]),getTokenAccountsByOwner:Nt.map(e=>["value",R,"account",...e]),getTokenLargestAccounts:[["value",R,"decimals"],["value",R,"uiAmount"]],getTokenSupply:[["value","decimals"],["value","uiAmount"]],getTransaction:[["meta","preTokenBalances",R,"accountIndex"],["meta","preTokenBalances",R,"uiTokenAmount","decimals"],["meta","postTokenBalances",R,"accountIndex"],["meta","postTokenBalances",R,"uiTokenAmount","decimals"],["meta","rewards",R,"commission"],...mt.map(e=>["meta","innerInstructions",R,...e]),...Fr.map(e=>["transaction","message",...e])],getVersion:[["feature-set"]],getVoteAccounts:[["current",R,"commission"],["delinquent",R,"commission"]],simulateTransaction:[...ne.map(e=>["value","accounts",R,...e]),...mt.map(e=>["value","innerInstructions",R,...e])]}),zr}function q_(e){let t={};for(let n in e)t[n.toLowerCase()]=e[n];return t}function Z_(e){let{fromJson:t,headers:n,toJson:r,url:o}=e,i,a=n&&q_(n);return async function({payload:c,signal:u}){let d=r?r(c):JSON.stringify(c),l={...i,body:d,headers:{...a,accept:"application/json","content-length":d.length.toString(),"content-type":"application/json; charset=utf-8"},method:"POST",signal:u},f=await fetch(o,l);if(!f.ok)throw new _(rr,{headers:f.headers,message:f.statusText,statusCode:f.status});return t?t(await f.text(),c):await f.json()}}var Q_=["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 Xi(e){return St(e)&&Q_.includes(e.method)}function Yi(e){return Z_({...e,fromJson:(t,n)=>Xi(n)?At(t):JSON.parse(t),toJson:t=>Xi(t)?Et(t):JSON.stringify(t)})}var ed=Object.prototype.toString,td=Object.keys||function(e){let t=[];for(let n in e)t.push(n);return t};function Fe(e,t){let n,r,o,i,a,s,c;if(e===true)return "true";if(e===false)return "false";switch(typeof e){case "object":if(e===null)return null;if("toJSON"in e&&typeof e.toJSON=="function")return Fe(e.toJSON(),t);if(c=ed.call(e),c==="[object Array]"){for(o="[",r=e.length-1,n=0;n<r;n++)o+=Fe(e[n],true)+",";return r>-1&&(o+=Fe(e[n],true)),o+"]"}else if(c==="[object Object]"){for(i=td(e).sort(),r=i.length,o="",n=0;n<r;)a=i[n],s=Fe(e[a],false),s!==void 0&&(o&&(o+=","),o+=JSON.stringify(a)+":"+s),n++;return "{"+o+"}"}else return JSON.stringify(e);case "function":case "undefined":return t?null:void 0;case "bigint":return `${e.toString()}n`;case "string":return JSON.stringify(e);default:return isFinite(e)?e:null}}function Tt(e){let t=Fe(e,false);if(t!==void 0)return ""+t}function Zi(e,t,n){let r="";if(typeof t[0]=="number"){let a=t[0]+1,s=a%10,c=a%100;s==1&&c!=11?r=a+"st":s==2&&c!=12?r=a+"nd":s==3&&c!=13?r=a+"rd":r=a+"th";}else r=`\`${t[0].toString()}\``;let o=t.length>1?t.slice(1).map(a=>typeof a=="number"?`[${a}]`:a).join("."):void 0,i=new _(be,{argumentLabel:r,keyPath:t,methodName:e,optionalPathLabel:o?` at path \`${o}\``:"",value:n,...o!==void 0?{path:o}:void 0});return de(i,Zi),i}var nd={defaultCommitment:"confirmed",onIntegerOverflow(e,t,n){throw Zi(e.methodName,t,n)}},rd=globalThis.AbortController,Ji;function qi(){return {}}function od(e,t){let n;return async function(o){let{payload:i,signal:a}=o,s=t(i);if(s===void 0)return await e(o);if(n||(queueMicrotask(()=>{n=void 0;}),n={}),n[s]==null){let u=new rd,d=(async()=>{try{return await e({...o,signal:u.signal})}catch(l){if(l===(Ji||(Ji=qi())))return;throw l}})();n[s]={abortController:u,numConsumers:0,responsePromise:d};}let c=n[s];if(c.numConsumers++,a){let u=c.responsePromise;return await new Promise((d,l)=>{let f=O=>{a.removeEventListener("abort",f),c.numConsumers-=1,queueMicrotask(()=>{c.numConsumers===0&&c.abortController.abort(Ji||(Ji=qi()));}),l(O.target.reason);};a.addEventListener("abort",f),u.then(d).catch(l).finally(()=>{a.removeEventListener("abort",f);});})}else return await c.responsePromise}}function id(e){return St(e)?Tt([e.method,e.params]):void 0}function ad(e){let t={};for(let n in e)t[n.toLowerCase()]=e[n];return t}function sd(e){return B(Yi({...e,headers:{...e.headers?ad(e.headers):void 0,"solana-client":"js/2.4.0-canary-20250709085504"}}),t=>od(t,id))}function yA(e,t){return cd(sd({url:e,...t}))}function cd(e){return ki({api:Ki(nd),transport:e})}var ud=globalThis.AbortController,_d=globalThis.EventTarget,Qi;function ea(){return Symbol(void 0)}var kr=Symbol();function ta({abortSignal:e,dataChannelName:t,dataPublisher:n,errorChannelName:r}){let o=new Map;function i(u){for(let[d,l]of o.entries())l.__hasPolled?(o.delete(d),l.onError(u)):l.publishQueue.push({__type:1,err:u});}let a=new ud;e.addEventListener("abort",()=>{a.abort(),i(Qi||(Qi=ea()));});let s={signal:a.signal},c=kr;return n.on(r,u=>{c===kr&&(c=u,a.abort(),i(u));},s),n.on(t,u=>{o.forEach((d,l)=>{if(d.__hasPolled){let{onData:f}=d;o.set(l,{__hasPolled:false,publishQueue:[]}),f(u);}else d.publishQueue.push({__type:0,data:u});});},s),{async*[Symbol.asyncIterator](){if(e.aborted)return;if(c!==kr)throw c;let u=Symbol();o.set(u,{__hasPolled:false,publishQueue:[]});try{for(;;){let d=o.get(u);if(!d)throw new _(ur);if(d.__hasPolled)throw new _(_r);let l=d.publishQueue;try{if(l.length){d.publishQueue=[];for(let f of l)if(f.__type===0)yield f.data;else throw f.err}else yield await new Promise((f,O)=>{o.set(u,{__hasPolled:!0,onData:f,onError:O});});}catch(f){if(f===(Qi||(Qi=ea())))return;throw f}}}finally{o.delete(u);}}}}function Vr(e){return {on(t,n,r){function o(i){if(i instanceof CustomEvent){let a=i.detail;n(a);}else n();}return e.addEventListener(t,o,r),()=>{e.removeEventListener(t,o);}}}}function na(e,t,n){let r,o=new _d,i=Vr(o);return {...i,on(a,s,c){r||(r={dispose:e.on(t,O=>{let E=n(O);if(!E)return;let[N,y]=E;o.dispatchEvent(new CustomEvent(N,{detail:y}));}),numSubscribers:0}),r.numSubscribers++;let u=i.on(a,s,c),d=true;function l(){d&&(d=false,c==null||c.signal.removeEventListener("abort",l),r.numSubscribers--,r.numSubscribers===0&&(r.dispose(),r=void 0),u());}return c==null||c.signal.addEventListener("abort",l),l}}}function ra(e){return e!==null&&(typeof e=="object"||typeof e=="function")}function dd(e){let t=new Set,n={deferreds:t,settled:false};return Promise.resolve(e).then(r=>{for(let{resolve:o}of t)o(r);t.clear(),n.settled=true;},r=>{for(let{reject:o}of t)o(r);t.clear(),n.settled=true;}),n}var Gr=new WeakMap;async function Te(e){let t;return await new Promise((r,o)=>{t={reject:o,resolve:r};for(let i of e){if(!ra(i)){Promise.resolve(i).then(r,o);continue}let a=Gr.get(i);a===void 0?(a=dd(i),a.deferreds.add(t),Gr.set(i,a)):a.settled?Promise.resolve(i).then(r,o):a.deferreds.add(t);}}).finally(()=>{for(let r of e)ra(r)&&Gr.get(r).deferreds.delete(t);})}function ia(e){return new Proxy(e.api,{defineProperty(){return false},deleteProperty(){return false},get(t,n,r){if(n!=="then")return function(...o){let i=n.toString(),a=Reflect.get(t,i,r);if(!a)throw new _(ir,{notificationName:i});let s=a(...o);return ld(e.transport,s)}}})}function ld(e,t){return {async subscribe({abortSignal:n}){let r=await e({signal:n,...t});return ta({abortSignal:n,dataChannelName:"notification",dataPublisher:r,errorChannelName:"error"})}}}function aa(e){return new Proxy({},{defineProperty(){return false},deleteProperty(){return false},get(...t){let[n,r]=t,o=r.toString();return function(...i){let a={methodName:o,params:i},s=e.requestTransformer?e.requestTransformer(a):a;return {execute(c){return e.planExecutor({...c,request:s})},request:s}}}})}function Wr(e,t){return Object.freeze({...e,on(n,r,o){return n!=="message"?e.on(n,r,o):e.on("message",i=>r(t(i)),o)}})}function $r(e,t){return Object.freeze({...e,send:n=>e.send(t(n))})}var Rd=globalThis.AbortController,Hr=new WeakMap;function fd(e,t){return sa(-1,e,t)}function Ad(e,t){sa(1,e,t);}function Ed(e){let t=Hr.get(e);return t||Hr.set(e,t={}),t}function sa(e,t,n){if(n===void 0)return;let r=Ed(t);!r[n]&&e>0&&(r[n]=0);let o=e+r[n];return o<=0?delete r[n]:r[n]=o,o}var oa=new WeakMap;function Sd(e,t,n){let r=oa.get(e);r||oa.set(e,r=new WeakMap);let o=n!=null?n:e,i=r.get(o);return i||r.set(o,i=na(e,"message",a=>{let s=a;if(!("method"in s))return;let c=n?n(s.params.result,t):s.params.result;return [`notification:${s.params.subscription}`,c]})),i}async function ca({channel:e,responseTransformer:t,signal:n,subscribeRequest:r,unsubscribeMethodName:o}){let i;e.on("error",()=>{i=void 0,Hr.delete(e);},{signal:n});let a=new Promise((l,f)=>{function O(){if(fd(e,i)===0){let E=me({methodName:o,params:[i]});i=void 0,e.send(E).catch(()=>{});}f(this.reason);}n.aborted?O.call(n):n.addEventListener("abort",O);}),s=me(r);await e.send(s);let c=new Promise((l,f)=>{let O=new Rd;n.addEventListener("abort",O.abort.bind(O));let E={signal:O.signal};e.on("error",N=>{O.abort(),f(N);},E),e.on("message",N=>{N&&typeof N=="object"&&"id"in N&&N.id===s.id&&(O.abort(),"error"in N?f(De(N.error)):l(N.result));},E);});if(i=await Te([a,c]),i==null)throw new _(ar);Ad(e,i);let u=Sd(e,r,t),d=`notification:${i}`;return {on(l,f,O){switch(l){case "notification":return u.on(d,f,O);case "error":return e.on("error",f,O);default:throw new _(lr,{channelName:l,supportedChannelNames:["notification","error"]})}}}}function ua(e){let t=Ot(e),n=ji({allowedNumericKeyPaths:Od()});return aa({planExecutor({request:r,...o}){return ca({...o,responseTransformer:n,subscribeRequest:{...r,methodName:r.methodName.replace(/Notifications$/,"Subscribe")},unsubscribeMethodName:r.methodName.replace(/Notifications$/,"Unsubscribe")})},requestTransformer:t})}function _a(e){return ua(e)}function WA(e){return ua(e)}var jr;function Od(){return jr||(jr={accountNotifications:ne.map(e=>["value",...e]),blockNotifications:[["value","block","transactions",R,"meta","preTokenBalances",R,"accountIndex"],["value","block","transactions",R,"meta","preTokenBalances",R,"uiTokenAmount","decimals"],["value","block","transactions",R,"meta","postTokenBalances",R,"accountIndex"],["value","block","transactions",R,"meta","postTokenBalances",R,"uiTokenAmount","decimals"],["value","block","transactions",R,"meta","rewards",R,"commission"],["value","block","transactions",R,"meta","innerInstructions",R,"index"],["value","block","transactions",R,"meta","innerInstructions",R,"instructions",R,"programIdIndex"],["value","block","transactions",R,"meta","innerInstructions",R,"instructions",R,"accounts",R],["value","block","transactions",R,"transaction","message","addressTableLookups",R,"writableIndexes",R],["value","block","transactions",R,"transaction","message","addressTableLookups",R,"readonlyIndexes",R],["value","block","transactions",R,"transaction","message","instructions",R,"programIdIndex"],["value","block","transactions",R,"transaction","message","instructions",R,"accounts",R],["value","block","transactions",R,"transaction","message","header","numReadonlySignedAccounts"],["value","block","transactions",R,"transaction","message","header","numReadonlyUnsignedAccounts"],["value","block","transactions",R,"transaction","message","header","numRequiredSignatures"],["value","block","rewards",R,"commission"]],programNotifications:ne.flatMap(e=>[["value",R,"account",...e],[R,"account",...e]])}),jr}var Nd=globalThis.EventTarget,ze=globalThis.WebSocket,da=1e3;function la({sendBufferHighWatermark:e,signal:t,url:n}){if(t.aborted)return Promise.reject(t.reason);let r,o=false,i=new Set;function a(){i.forEach(I=>{I();}),i.clear();}function s(){a(),o||N(t.reason),E.readyState!==ze.CLOSED&&E.readyState!==ze.CLOSING&&E.close(da);}function c(I){a(),r==null||r.onCancel(),t.removeEventListener("abort",s),E.removeEventListener("close",c),E.removeEventListener("error",u),E.removeEventListener("message",d),E.removeEventListener("open",O),!t.aborted&&!(I.wasClean&&I.code===da)&&l.dispatchEvent(new CustomEvent("error",{detail:new _(_e,{cause:I})}));}function u(I){if(!t.aborted&&!o){let K=new _(cr,{errorEvent:I});N(K),l.dispatchEvent(new CustomEvent("error",{detail:K}));}}function d(I){t.aborted||l.dispatchEvent(new CustomEvent("message",{detail:I.data}));}let l=new Nd,f=Vr(l);function O(){o=true,y({...f,async send(I){if(E.readyState!==ze.OPEN)throw new _(_e);if(!r&&E.bufferedAmount>e){let K,es=new Promise((ts,ns)=>{let mo=setInterval(()=>{(E.readyState!==ze.OPEN||!(E.bufferedAmount>e))&&(clearInterval(mo),r=void 0,ts());},16);K=()=>{r=void 0,clearInterval(mo),ns(new _(sr));};});r={onCancel:K,promise:es};}if(r){if(ArrayBuffer.isView(I)&&!(I instanceof DataView)){let K=I.constructor;I=new K(I);}await r.promise;}E.send(I);}});}let E=new ze(n);t.addEventListener("abort",s),E.addEventListener("close",c),E.addEventListener("error",u),E.addEventListener("message",d),E.addEventListener("open",O);let N,y;return new Promise((I,K)=>{N=K,y=I;})}function Ra(e,t,n){let r="";if(typeof t[0]=="number"){let a=t[0]+1,s=a%10,c=a%100;s==1&&c!=11?r=a+"st":s==2&&c!=12?r=a+"nd":s==3&&c!=13?r=a+"rd":r=a+"th";}else r=`\`${t[0].toString()}\``;let o=t.length>1?t.slice(1).map(a=>typeof a=="number"?`[${a}]`:a).join("."):void 0,i=new _(be,{argumentLabel:r,keyPath:t,methodName:e,optionalPathLabel:o?` at path \`${o}\``:"",value:n,...o!==void 0?{path:o}:void 0});return de(i,Ra),i}var md={defaultCommitment:"confirmed",onIntegerOverflow(e,t,n){throw Ra(e.methodName,t,n)}},Kr=globalThis.AbortController,Td={jsonrpc:"2.0",method:"ping"};function gd({abortSignal:e,channel:t,intervalMs:n}){let r;function o(){t.send(Td).catch(s=>{M(s,_e)&&a.abort();});}function i(){clearInterval(r),r=setInterval(o,n);}let a=new Kr;return a.signal.addEventListener("abort",()=>{clearInterval(r);}),e.addEventListener("abort",()=>{a.abort();}),t.on("error",()=>{a.abort();},{signal:a.signal}),t.on("message",i,{signal:a.signal}),globalThis.navigator.onLine&&i(),globalThis.addEventListener("offline",function(){clearInterval(r);},{signal:a.signal}),globalThis.addEventListener("online",function(){o(),i();},{signal:a.signal}),{...t,send(...s){return a.signal.aborted||i(),t.send(...s)}}}function pd(){return {entries:[],freeChannelIndex:-1}}function Id(e,{maxSubscriptionsPerChannel:t,minChannels:n}){let r=pd();function o(){var a;if(r.entries.length<n){r.freeChannelIndex=-1;return}let i;for(let s=0;s<r.entries.length;s++){let c=(r.freeChannelIndex+s+2)%r.entries.length,u=r.entries[c];u.subscriptionCount<t&&(!i||i.subscriptionCount>=u.subscriptionCount)&&(i={poolIndex:c,subscriptionCount:u.subscriptionCount});}r.freeChannelIndex=(a=i==null?void 0:i.poolIndex)!=null?a:-1;}return function({abortSignal:a}){let s;function c(){let u=r.entries.findIndex(d=>d===s);r.entries.splice(u,1),s.dispose(),o();}if(r.freeChannelIndex===-1){let u=new Kr,d=e({abortSignal:u.signal});d.then(l=>{l.on("error",c,{signal:u.signal});}).catch(c),s={channel:d,dispose(){u.abort();},subscriptionCount:0},r.entries.push(s);}else s=r.entries[r.freeChannelIndex];return s.subscriptionCount++,a.addEventListener("abort",function(){s.subscriptionCount--,s.subscriptionCount===0?c():r.freeChannelIndex!==-1&&(r.freeChannelIndex--,o());}),o(),s.channel}}function Cd(e){return B(e,t=>Wr(t,JSON.parse),t=>$r(t,JSON.stringify))}function hd(e){return B(e,t=>Wr(t,At),t=>$r(t,Et))}function Ld(e){return fa({...e,jsonSerializer:hd})}function nE(e){return fa({...e,jsonSerializer:Cd})}function fa(e){var o,i;if(/^wss?:/i.test(e.url)===false){let a=e.url.match(/^([^:]+):/);throw new DOMException(a?`Failed to construct 'WebSocket': The URL's scheme must be either 'ws' or 'wss'. '${a[1]}:' is not allowed.`:`Failed to construct 'WebSocket': The URL '${e.url}' is invalid.`)}let{intervalMs:t,...n}=e;return Id(({abortSignal:a})=>{var s;return la({...n,sendBufferHighWatermark:(s=e.sendBufferHighWatermark)!=null?s:131072,signal:a}).then(e.jsonSerializer).then(c=>gd({abortSignal:a,channel:c,intervalMs:t!=null?t:5e3}))},{maxSubscriptionsPerChannel:(o=e.maxSubscriptionsPerChannel)!=null?o:100,minChannels:(i=e.minChannels)!=null?i:1})}function bd(e){let t=new Map;return function(r){let{request:o,signal:i}=r,a=Tt([o.methodName,o.params]),s=t.get(a);if(!s){let c=new Kr,u=e({...r,signal:c.signal});u.then(d=>{d.on("error",()=>{t.delete(a),c.abort();},{signal:c.signal});}).catch(()=>{}),t.set(a,s={abortController:c,dataPublisherPromise:u,numSubscribers:0});}return s.numSubscribers++,i.addEventListener("abort",()=>{s.numSubscribers--,s.numSubscribers===0&&queueMicrotask(()=>{s.numSubscribers===0&&(t.delete(a),s.abortController.abort());});},{signal:s.abortController.signal}),s.dataPublisherPromise}}function Dd({createChannel:e}){return B(yd(e),t=>bd(t))}function yd(e){return async({execute:t,signal:n})=>{let r=await e({abortSignal:n});return await t({channel:r,signal:n})}}function Aa(e,t){let n=Dd({createChannel:Ld({...t,url:e})});return wd(n)}function rE(e,t){return Aa(e,t)}function oE(e,t){return Aa(e,t)}function wd(e){return ia({api:_a(md),transport:e})}function Sa(e){return ve(e)}function Oa(e){try{ae(e);}catch(t){throw M(t,he)?new _(Pt,t.context):M(t,Ce)?new _(xt,t.context):t}}function lE(e){return Oa(e),e}function vd(){let e=se();return S({fixedSize:32,write:(t,n,r)=>(Oa(t),e.write(t,n,r))})}function Pd(){return Y()}function RE(){return A(vd(),Pd())}function fE(){return new Intl.Collator("en",{caseFirst:"lower",ignorePunctuation:false,localeMatcher:"best fit",numeric:false,sensitivity:"variant",usage:"sort"}).compare}function AE(e){return e}function EE(e){return e}function SE(e){return e}function Ea(e){switch(e){case "finalized":return 2;case "confirmed":return 1;case "processed":return 0;default:throw new _(dr,{unexpectedValue:e})}}function gt(e,t){return e===t?0:Ea(e)<Ea(t)?-1:1}var Na=18446744073709551615n,Xr,Yr;function xd(){return Xr||(Xr=vr()),Xr}function Ud(){return Yr||(Yr=Pr()),Yr}function OE(e){return e>=0&&e<=Na}function Bd(e){if(e<0||e>Na)throw new _(Ut)}function Md(e){return Bd(e),e}function Fd(){return xd()}function NE(e){return e}function zd(){return ma(Ud())}function ma(e){return g(e,t=>Md(typeof t=="bigint"?t:BigInt(t)))}function mE(){return A(Fd(),zd())}function TE(e){return A(e,ma(e))}function gE(e){try{return BigInt(e),!0}catch{return false}}function kd(e){try{BigInt(e);}catch{throw new _(Bt,{value:e})}}function pE(e){return kd(e),e}function IE(e){return !Number.isNaN(Number(e))}function Vd(e){if(Number.isNaN(Number(e)))throw new _(Mt,{value:e})}function CE(e){return Vd(e),e}var Ta=9223372036854775807n,ga=-9223372036854775808n;function hE(e){return e>=ga&&e<=Ta}function Gd(e){if(e<ga||e>Ta)throw new _(Ft,{value:e})}function LE(e){return Gd(e),e}function ke(e){return "lifetimeConstraint"in e&&typeof e.lifetimeConstraint.blockhash=="string"&&typeof e.lifetimeConstraint.lastValidBlockHeight=="bigint"&&Sa(e.lifetimeConstraint.blockhash)}function ME(e){if(!ke(e))throw new _(hn)}function io(e,t){return "lifetimeConstraint"in t&&t.lifetimeConstraint&&"blockhash"in t.lifetimeConstraint&&t.lifetimeConstraint.blockhash===e.blockhash&&t.lifetimeConstraint.lastValidBlockHeight===e.lastValidBlockHeight?t:Object.freeze({...t,lifetimeConstraint:Object.freeze(e)})}function Hd(e,t,n=t){if(!t.match(new RegExp(`^[${e}]*$`)))throw new _(X,{alphabet:e,base:e.length,value:n})}var Wd=e=>S({getSizeFromValue:t=>{let[n,r]=pa(t,e[0]);if(!r)return t.length;let o=Ia(r,e);return n.length+Math.ceil(o.toString(16).length/2)},write(t,n,r){if(Hd(e,t),t==="")return r;let[o,i]=pa(t,e[0]);if(!i)return n.set(new Uint8Array(o.length).fill(0),r),r+o.length;let a=Ia(i,e),s=[];for(;a>0n;)s.unshift(Number(a%256n)),a/=256n;let c=[...Array(o.length).fill(0),...s];return n.set(c,r),r+c.length}}),$d=e=>m({read(t,n){let r=n===0?t:t.slice(n);if(r.length===0)return ["",0];let o=r.findIndex(c=>c!==0);o=o===-1?r.length:o;let i=e[0].repeat(o);if(o===r.length)return [i,t.length];let a=r.slice(o).reduce((c,u)=>c*256n+BigInt(u),0n),s=jd(a,e);return [i+s,t.length]}});function pa(e,t){let[n,r]=e.split(new RegExp(`((?!${t}).*)`));return [n,r]}function Ia(e,t){let n=BigInt(t.length),r=0n;for(let o of e)r*=n,r+=BigInt(t.indexOf(o));return r}function jd(e,t){let n=BigInt(t.length),r=[];for(;e>0n;)r.unshift(t[Number(e%n)]),e/=n;return r.join("")}var Da="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",Kd=()=>Wd(Da),Xd=()=>$d(Da),Jr;function Yd(){if(!Jr){let e=V(D(),{size:W()});Jr=J([["lookupTableAddress",se()],["writableIndexes",e],["readonlyIndexes",e]]);}return Jr}var qr;function Jd(){if(!qr){let e=U(L(),{size:k()});qr=g(te([["lookupTableAddress",Y()],["writableIndexes",e],["readonlyIndexes",e]]),t=>"readableIndices"in t?{...t,readonlyIndexes:t.readableIndices,writableIndexes:t.writableIndices}:t);}return qr}var Zr;function Qr(){return Zr||(Zr=D()),Zr}var eo;function to(){return eo||(eo=L()),eo}function qd(){return J([["numSignerAccounts",Qr()],["numReadonlySignerAccounts",Qr()],["numReadonlyNonSignerAccounts",Qr()]])}function Zd(){return te([["numSignerAccounts",to()],["numReadonlySignerAccounts",to()],["numReadonlyNonSignerAccounts",to()]])}var no;function Qd(){return no||(no=p(J([["programAddressIndex",D()],["accountIndices",V(D(),{size:W()})],["data",Rr(Ee(),W())]]),e=>{var t,n;return e.accountIndices!==void 0&&e.data!==void 0?e:{...e,accountIndices:(t=e.accountIndices)!=null?t:[],data:(n=e.data)!=null?n:new Uint8Array(0)}})),no}var ro;function el(){return ro||(ro=g(te([["programAddressIndex",L()],["accountIndices",U(L(),{size:k()})],["data",fr(Se(),k())]]),e=>{if(e.accountIndices.length&&e.data.byteLength)return e;let{accountIndices:t,data:n,...r}=e;return {...r,...t.length?{accountIndices:t}:null,...n.byteLength?{data:n}:null}})),ro}var oo=128;function ya(){return S({getSizeFromValue:e=>e==="legacy"?0:1,maxSize:1,write:(e,t,n)=>{if(e==="legacy")return n;if(e<0||e>127)throw new _(bn,{actualVersion:e});return t.set([e|oo],n),n+1}})}function pt(){return m({maxSize:1,read:(e,t)=>{let n=e[t];return (n&oo)===0?["legacy",t]:[n^oo,t+1]}})}function FE(){return A(ya(),pt())}function Ca(){return J(wa())}function ha(){return p(J([...wa(),["addressTableLookups",nl()]]),e=>{var t;return e.version==="legacy"?e:{...e,addressTableLookups:(t=e.addressTableLookups)!=null?t:[]}})}function wa(){return [["version",ya()],["header",qd()],["staticAccounts",V(se(),{size:W()})],["lifetimeToken",F(Kd(),32)],["instructions",V(Qd(),{size:W()})]]}function tl(){return [["version",pt()],["header",Zd()],["staticAccounts",U(Y(),{size:k()})],["lifetimeToken",z(Xd(),32)],["instructions",U(el(),{size:k()})],["addressTableLookups",rl()]]}function nl(){return V(Yd(),{size:W()})}function rl(){return U(Jd(),{size:k()})}function ao(){return S({getSizeFromValue:e=>e.version==="legacy"?Ca().getSizeFromValue(e):ha().getSizeFromValue(e),write:(e,t,n)=>e.version==="legacy"?Ca().write(e,t,n):ha().write(e,t,n)})}function ol(){return g(te(tl()),({addressTableLookups:e,...t})=>t.version==="legacy"||!(e!=null&&e.length)?t:{...t,addressTableLookups:e})}function zE(){return A(ao(),ol())}function La(e,t,n){var r;e[t]=n((r=e[t])!=null?r:{role:h.READONLY});}var C=Symbol("AddressMapTypeProperty");function il(e,t){let n={[e]:{[C]:0,role:h.WRITABLE_SIGNER}},r=new Set;for(let o of t){La(n,o.programAddress,a=>{if(r.add(o.programAddress),C in a){if(Oe(a.role))switch(a[C]){case 0:throw new _(Cn,{programAddress:o.programAddress});default:throw new _(Ye,{programAddress:o.programAddress})}if(a[C]===2)return a}return {[C]:2,role:h.READONLY}});let i;if(o.accounts)for(let a of o.accounts)La(n,a.address,s=>{let{address:c,...u}=a;if(C in s)switch(s[C]){case 0:return s;case 1:{let d=Br(s.role,u.role);if("lookupTableAddress"in u){if(s.lookupTableAddress!==u.lookupTableAddress&&(i||(i=st()))(u.lookupTableAddress,s.lookupTableAddress)<0)return {[C]:1,...u,role:d}}else if(j(u.role))return {[C]:2,role:d};return s.role!==d?{...s,role:d}:s}case 2:{let d=Br(s.role,u.role);if(r.has(a.address)){if(Oe(u.role))throw new _(Ye,{programAddress:a.address});return s.role!==d?{...s,role:d}:s}else return "lookupTableAddress"in u&&!j(s.role)?{...u,[C]:1,role:d}:s.role!==d?{...s,role:d}:s}}return "lookupTableAddress"in u?{...u,[C]:1}:{...u,[C]:2}});}return n}function al(e){let t;return Object.entries(e).sort(([r,o],[i,a])=>{if(o[C]!==a[C]){if(o[C]===0)return -1;if(a[C]===0)return 1;if(o[C]===2)return -1;if(a[C]===2)return 1}let s=j(o.role);if(s!==j(a.role))return s?-1:1;let c=Oe(o.role);return c!==Oe(a.role)?c?-1:1:(t||(t=st()),o[C]===1&&a[C]===1&&o.lookupTableAddress!==a.lookupTableAddress?t(o.lookupTableAddress,a.lookupTableAddress):t(r,i))}).map(([r,o])=>({address:r,...o}))}function sl(e){var n;let t={};for(let r of e){if(!("lookupTableAddress"in r))continue;let o=t[n=r.lookupTableAddress]||(t[n]={readableIndices:[],readonlyIndexes:[],writableIndexes:[],writableIndices:[]});r.role===h.WRITABLE?(o.writableIndexes.push(r.addressIndex),o.writableIndices.push(r.addressIndex)):(o.readableIndices.push(r.addressIndex),o.readonlyIndexes.push(r.addressIndex));}return Object.keys(t).sort(st()).map(r=>({lookupTableAddress:r,...t[r]}))}function cl(e){let t=0,n=0,r=0;for(let o of e){if("lookupTableAddress"in o)break;let i=Oe(o.role);j(o.role)?(r++,i||n++):i||t++;}return {numReadonlyNonSignerAccounts:t,numReadonlySignerAccounts:n,numSignerAccounts:r}}function ul(e){let t={};for(let[n,r]of e.entries())t[r.address]=n;return t}function _l(e,t){let n=ul(t);return e.map(({accounts:r,data:o,programAddress:i})=>({programAddressIndex:n[i],...r?{accountIndices:r.map(({address:a})=>n[a])}:null,...o?{data:o}:null}))}function dl(e){return "nonce"in e?e.nonce:e.blockhash}function ll(e){let t=e.findIndex(r=>"lookupTableAddress"in r);return (t===-1?e:e.slice(0,t)).map(({address:r})=>r)}var Rl={blockhash:"11111111111111111111111111111111",lastValidBlockHeight:0n};function va(e){var o;let t=il(e.feePayer.address,e.instructions),n=al(t),r=(o=e.lifetimeConstraint)!=null?o:Rl;return {...e.version!=="legacy"?{addressTableLookups:sl(n)}:null,header:cl(n),instructions:_l(e.instructions,n),lifetimeToken:dl(r),staticAccounts:ll(n),version:e.version}}function fl(e,t,n){for(let[r,o]of Object.entries(n))for(let i=0;i<o.length;i++)if(e===o[i])return {address:e,addressIndex:i,lookupTableAddress:r,role:t}}function kE(e,t){let n=new Set(Object.values(t).flatMap(i=>i)),r=[],o=false;for(let i of e.instructions){if(!i.accounts){r.push(i);continue}let a=[],s=false;for(let c of i.accounts){if("lookupTableAddress"in c||!n.has(c.address)||j(c.role)){a.push(c);continue}let u=fl(c.address,c.role,t);a.push(Object.freeze(u)),s=true,o=true;}r.push(Object.freeze(s?{...i,accounts:a}:i));}return Object.freeze(o?{...e,instructions:r}:e)}function Al(e){return Object.freeze({instructions:Object.freeze([]),version:e.version})}var Pa="SysvarRecentB1ockHashes11111111111111111111",xa="11111111111111111111111111111111";function ba(e,t){return {accounts:[{address:e,role:h.WRITABLE},{address:Pa,role:h.READONLY},{address:t,role:h.READONLY_SIGNER}],data:new Uint8Array([4,0,0,0]),programAddress:xa}}function so(e){var t;return e.programAddress===xa&&e.data!=null&&El(e.data)&&((t=e.accounts)==null?void 0:t.length)===3&&e.accounts[0].address!=null&&e.accounts[0].role===h.WRITABLE&&e.accounts[1].address===Pa&&e.accounts[1].role===h.READONLY&&e.accounts[2].address!=null&&j(e.accounts[2].role)}function El(e){return e.byteLength===4&&e[0]===4&&e[1]===0&&e[2]===0&&e[3]===0}function ue(e){return "lifetimeConstraint"in e&&typeof e.lifetimeConstraint.nonce=="string"&&e.instructions[0]!=null&&so(e.instructions[0])}function Sl(e){if(!ue(e))throw new _(Ln)}function Ol(e,t,n){return e.accounts[0].address===t&&e.accounts[2].address===n}function Nl({nonce:e,nonceAccountAddress:t,nonceAuthorityAddress:n},r){let o,i=r.instructions[0];if(i&&so(i))if(Ol(i,t,n)){if(ue(r)&&r.lifetimeConstraint.nonce===e)return r;o=[i,...r.instructions.slice(1)];}else o=[Object.freeze(ba(t,n)),...r.instructions.slice(1)];else o=[Object.freeze(ba(t,n)),...r.instructions];return Object.freeze({...r,instructions:Object.freeze(o),lifetimeConstraint:Object.freeze({nonce:e})})}function ml(e,t){var r;if("feePayer"in t&&e===((r=t.feePayer)==null?void 0:r.address)&&Tl(t.feePayer))return t;let n={...t,feePayer:Object.freeze({address:e})};return Object.freeze(n),n}function Tl(e){return !!e&&"address"in e&&typeof e.address=="string"&&Object.keys(e).length===1}function co(e,t){return gl([e],t)}function gl(e,t){return Object.freeze({...t,instructions:Object.freeze([...t.instructions,...e])})}function VE(e,t){return pl([e],t)}function pl(e,t){return Object.freeze({...t,instructions:Object.freeze([...e,...t.instructions])})}function Il(e){let{header:t}=e,n=t.numSignerAccounts-t.numReadonlySignerAccounts,r=e.staticAccounts.length-t.numSignerAccounts-t.numReadonlyNonSignerAccounts,o=[],i=0;for(let a=0;a<n;a++)o.push({address:e.staticAccounts[i],role:h.WRITABLE_SIGNER}),i++;for(let a=0;a<t.numReadonlySignerAccounts;a++)o.push({address:e.staticAccounts[i],role:h.READONLY_SIGNER}),i++;for(let a=0;a<r;a++)o.push({address:e.staticAccounts[i],role:h.WRITABLE}),i++;for(let a=0;a<t.numReadonlyNonSignerAccounts;a++)o.push({address:e.staticAccounts[i],role:h.READONLY}),i++;return o}function Cl(e,t){var a,s;let r=e.map(c=>c.lookupTableAddress).filter(c=>t[c]===void 0);if(r.length>0)throw new _(Dn,{lookupTableAddresses:r});let o=[],i=[];for(let c of e){let u=t[c.lookupTableAddress],d=(a=c.readonlyIndexes)!=null?a:c.readableIndices,l=(s=c.writableIndexes)!=null?s:c.writableIndices,f=Math.max(...d,...l);if(f>=u.length)throw new _(yn,{highestKnownIndex:u.length-1,highestRequestedIndex:f,lookupTableAddress:c.lookupTableAddress});let O=d.map(N=>({address:u[N],addressIndex:N,lookupTableAddress:c.lookupTableAddress,role:h.READONLY}));o.push(...O);let E=l.map(N=>({address:u[N],addressIndex:N,lookupTableAddress:c.lookupTableAddress,role:h.WRITABLE}));i.push(...E);}return [...i,...o]}function hl(e,t){var i,a;let n=(i=t[e.programAddressIndex])==null?void 0:i.address;if(!n)throw new _(wn,{index:e.programAddressIndex});let r=(a=e.accountIndices)==null?void 0:a.map(s=>t[s]),{data:o}=e;return Object.freeze({programAddress:n,...r&&r.length?{accounts:Object.freeze(r)}:{},...o&&o.length?{data:o}:{}})}function Ll(e,t,n){if(!t||!so(t))return {blockhash:e,lastValidBlockHeight:n!=null?n:2n**64n-1n};{let r=t.accounts[0].address;ae(r);let o=t.accounts[2].address;return ae(o),{nonce:e,nonceAccountAddress:r,nonceAuthorityAddress:o}}}function Ua(e,t){var u;let n=e.staticAccounts[0];if(!n)throw new _(vn);let r=Il(e),o="addressTableLookups"in e&&e.addressTableLookups!==void 0&&e.addressTableLookups.length>0?Cl(e.addressTableLookups,(u=t==null?void 0:t.addressesByLookupTableAddress)!=null?u:{}):[],i=[...r,...o],a=e.instructions.map(d=>hl(d,i)),s=a[0],c=Ll(e.lifetimeToken,s,t==null?void 0:t.lastValidBlockHeight);return B(Al({version:e.version}),d=>ml(n,d),d=>a.reduce((l,f)=>co(f,l),d),d=>"blockhash"in c?io(c,d):Nl(c,d))}var GE=Sl,HE=ue;function bl(e){let t=Object.values(e);if(t.length===0)throw new _(Bn);return t.map(n=>n||new Uint8Array(64).fill(0))}function Dl(){return p(V(F(Ee(),64),{size:W()}),bl)}function _o(){return J([["signatures",Dl()],["messageBytes",Ee()]])}function yl(){return g(te([["signatures",U(z(Se(),64),{size:k()})],["messageBytes",Se()]]),wl)}function QE(){return A(_o(),yl())}function wl(e){let{messageBytes:t,signatures:n}=e,r=x([pt(),Nr(L(),2),U(Y(),{size:k()})]),[o,i,a]=r.decode(t),s=a.slice(0,i);if(s.length!==n.length)throw new _(Mn,{numRequiredSignatures:i,signaturesLength:n.length,signerAddresses:s});let c={};return s.forEach((u,d)=>{let l=n[d];l.every(f=>f===0)?c[u]=null:c[u]=l;}),{messageBytes:t,signatures:Object.freeze(c)}}function Ve(e){let t=va(e),n=ao().encode(t),r=t.staticAccounts.slice(0,t.header.numSignerAccounts),o={};for(let a of r)o[a]=null;let i;return ke(e)?i={blockhash:e.lifetimeConstraint.blockhash,lastValidBlockHeight:e.lifetimeConstraint.lastValidBlockHeight}:ue(e)&&(i={nonce:e.lifetimeConstraint.nonce,nonceAccountAddress:e.instructions[0].accounts[0].address}),Object.freeze({...i?{lifetimeConstraint:i}:void 0,messageBytes:n,signatures:Object.freeze(o)})}var uo;function lo(e){uo||(uo=fe());let t=Object.values(e.signatures)[0];if(!t)throw new _(xn);return uo.decode(t)}function vl(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])}async function Ro(e,t){let n,r;if(await Promise.all(e.map(async o=>{let i=await ct(o.publicKey),a=t.signatures[i];if(a===void 0){r||(r=new Set),r.add(i);return}if(r)return;let s=await Me(o.privateKey,t.messageBytes);a!==null&&vl(s,a)||(n||(n={}),n[i]=s);})),r&&r.size>0){let o=Object.keys(t.signatures);throw new _(Un,{expectedAddresses:o,unexpectedAddresses:[...r]})}return n?Object.freeze({...t,signatures:Object.freeze({...t.signatures,...n})}):t}async function eS(e,t){let n=await Ro(e,t);return It(n),Object.freeze(n),n}function tS(e){return Object.entries(e.signatures).every(([t,n])=>!!n)}function It(e){let t=[];if(Object.entries(e.signatures).forEach(([n,r])=>{r||t.push(n);}),t.length>0)throw new _(Pn,{addresses:t})}function Ct(e){let t=_o().encode(e);return Cr().decode(t)}var Pl=1280,xl=48,ge=Pl-xl;function fo(e){return _o().getSizeFromValue(e)}function nS(e){return fo(e)<=ge}function rS(e){let t=fo(e);if(t>ge)throw new _(Ze,{transactionSize:t,transactionSizeLimit:ge})}function Ba(e){return fo(Ve(e))}function oS(e){return Ba(e)<=ge}function iS(e){let t=Ba(e);if(t>ge)throw new _(Ze,{transactionSize:t,transactionSizeLimit:ge})}var aS=It;function Ge(e){let t={};return e.forEach(n=>{if(!t[n.address])t[n.address]=n;else if(t[n.address]!==n)throw new _(An,{address:n.address})}),Object.values(t)}function pe(e){return "modifyAndSignTransactions"in e&&typeof e.modifyAndSignTransactions=="function"}function RS(e){if(!pe(e))throw new _(Tn,{address:e.address})}function re(e){return "signTransactions"in e&&typeof e.signTransactions=="function"}function fS(e){if(!re(e))throw new _(gn,{address:e.address})}function ht(e){return "signAndSendTransactions"in e&&typeof e.signAndSendTransactions=="function"}function AS(e){if(!ht(e))throw new _(pn,{address:e.address})}function He(e){return re(e)||pe(e)||ht(e)}function ES(e){if(!He(e))throw new _(mn,{address:e.address})}function Ul(e){var t;return Ge(((t=e.accounts)!=null?t:[]).flatMap(n=>"signer"in n?n.signer:[]))}function Ao(e){return Ge([...e.feePayer&&He(e.feePayer)?[e.feePayer]:[],...e.instructions.flatMap(Ul)])}function Bl(e,t){if(!t.accounts||t.accounts.length===0)return t;let n=new Map(Ge(e).map(r=>[r.address,r]));return Object.freeze({...t,accounts:t.accounts.map(r=>{let o=n.get(r.address);return !j(r.role)||"signer"in r||!o?r:Object.freeze({...r,signer:o})})})}function SS(e,t){let n=Ml(t)?e.find(r=>r.address===t.feePayer.address):void 0;return !n&&t.instructions.length===0?t:Object.freeze({...t,...n?{feePayer:n}:null,instructions:t.instructions.map(r=>Bl(e,r))})}function Ml(e){return !!e&&"feePayer"in e&&!!e.feePayer&&typeof e.feePayer.address=="string"&&!He(e.feePayer)}function OS(e,t){Object.freeze(e);let n={...t,feePayer:e};return Object.freeze(n),n}function Eo(e){return "signMessages"in e&&typeof e.signMessages=="function"}function NS(e){if(!Eo(e))throw new _(Nn,{address:e.address})}function Fl(e){return "keyPair"in e&&typeof e.keyPair=="object"&&Eo(e)&&re(e)}function mS(e){if(!Fl(e))throw new _(En,{address:e.address})}async function So(e){let t=await ct(e.publicKey);return Object.freeze({address:t,keyPair:e,signMessages:r=>Promise.all(r.map(async o=>Object.freeze({[t]:await Me(e.privateKey,o.content)}))),signTransactions:r=>Promise.all(r.map(async o=>{let i=await Ro([e],o);return Object.freeze({[t]:i.signatures[t]})}))})}async function TS(){return await So(await Bi())}async function gS(e,t){return await So(await Mi(e,t))}async function pS(e,t){return await So(await Fi(e,t))}function Ma(e){return ve(e.address)&&"modifyAndSignMessages"in e&&typeof e.modifyAndSignMessages=="function"}function IS(e){if(!Ma(e))throw new _(On,{address:e.address})}function zl(e){return Eo(e)||Ma(e)}function CS(e){if(!zl(e))throw new _(Sn,{address:e.address})}function hS(e){return Object.freeze({address:e,signMessages:n=>Promise.resolve(n.map(()=>Object.freeze({}))),signTransactions:n=>Promise.resolve(n.map(()=>Object.freeze({})))})}function LS(e){try{return Fa(e),!0}catch{return false}}function Fa(e){let n=Ao(e).filter(ht);if(n.length===0)throw new _(Xe);if(n.filter(o=>!re(o)&&!pe(o)).length>1)throw new _(In)}async function kl(e,t){let{partialSigners:n,modifyingSigners:r}=za(Ge(Ao(e).filter(He)),{identifySendingSigner:false});return await ka(e,r,n,t)}async function bS(e,t){let n=await kl(e,t);return It(n),n}async function DS(e,t){Fa(e);let n=t==null?void 0:t.abortSignal,{partialSigners:r,modifyingSigners:o,sendingSigner:i}=za(Ge(Ao(e).filter(He)));n==null||n.throwIfAborted();let a=await ka(e,o,r,t);if(!i)throw new _(Xe);n==null||n.throwIfAborted();let[s]=await i.signAndSendTransactions([a],t);return n==null||n.throwIfAborted(),s}function za(e,t={}){var s;let r=((s=t.identifySendingSigner)!=null?s:true)?Vl(e):null,o=e.filter(c=>c!==r&&(pe(c)||re(c))),i=Gl(o),a=o.filter(re).filter(c=>!i.includes(c));return Object.freeze({modifyingSigners:i,partialSigners:a,sendingSigner:r})}function Vl(e){let t=e.filter(ht);if(t.length===0)return null;let n=t.filter(r=>!pe(r)&&!re(r));return n.length>0?n[0]:t[0]}function Gl(e){let t=e.filter(pe);if(t.length===0)return [];let n=t.filter(r=>!re(r));return n.length>0?n:[t[0]]}async function ka(e,t=[],n=[],r){var s,c;let o=Ve(e),i=await t.reduce(async(u,d)=>{var f;(f=r==null?void 0:r.abortSignal)==null||f.throwIfAborted();let[l]=await d.modifyAndSignTransactions([await u],r);return Object.freeze(l)},Promise.resolve(o));(s=r==null?void 0:r.abortSignal)==null||s.throwIfAborted();let a=await Promise.all(n.map(async u=>{let[d]=await u.signTransactions([i],r);return d}));return Object.freeze({...i,signatures:Object.freeze(a.reduce((u,d)=>({...u,...d}),(c=i.signatures)!=null?c:{}))})}var Hl=globalThis.TextEncoder;function yS(e,t={}){return Object.freeze({content:typeof e=="string"?new Hl().encode(e):e,signatures:Object.freeze({...t})})}var Lt=globalThis.AbortController;function Va({rpc:e,rpcSubscriptions:t}){return async function({abortSignal:r,commitment:o,lastValidBlockHeight:i}){r.throwIfAborted();let a=new Lt,s=()=>{a.abort();};r.addEventListener("abort",s,{signal:a.signal});async function c(){let{absoluteSlot:u,blockHeight:d}=await e.getEpochInfo({commitment:o}).send({abortSignal:a.signal});return {blockHeight:d,differenceBetweenSlotHeightAndBlockHeight:u-d}}try{let[u,{blockHeight:d,differenceBetweenSlotHeightAndBlockHeight:l}]=await Promise.all([t.slotNotifications().subscribe({abortSignal:a.signal}),c()]);r.throwIfAborted();let f=d;if(f<=i){let O=l;for await(let E of u){let{slot:N}=E;if(N-O>i){let{blockHeight:y,differenceBetweenSlotHeightAndBlockHeight:I}=await c();if(f=y,f>i)break;O=I;}}}throw r.throwIfAborted(),new _(wt,{currentBlockHeight:f,lastValidBlockHeight:i})}finally{a.abort();}}}var Oo=40;function Ga({rpc:e,rpcSubscriptions:t}){return async function({abortSignal:r,commitment:o,currentNonceValue:i,nonceAccountAddress:a}){let s=new Lt;function c(){s.abort();}r.addEventListener("abort",c,{signal:s.signal});let u=await t.accountNotifications(a,{commitment:o,encoding:"base64"}).subscribe({abortSignal:s.signal}),d=fe(),l=ye();function f([N]){let I=l.encode(N).slice(Oo,Oo+32);return d.decode(I)}let O=(async()=>{for await(let N of u){let y=f(N.value.data);if(y!==i)throw new _(We,{actualNonceValue:y,expectedNonceValue:i})}})(),E=(async()=>{let{value:N}=await e.getAccountInfo(a,{commitment:o,dataSlice:{length:32,offset:Oo},encoding:"base58"}).send({abortSignal:s.signal});if(!N)throw new _(vt,{nonceAccountAddress:a});let y=N.data[0];if(y!==i)throw new _(We,{actualNonceValue:y,expectedNonceValue:i});await new Promise(()=>{});})();try{return await Te([O,E])}finally{s.abort();}}}function Ie({rpc:e,rpcSubscriptions:t}){return async function({abortSignal:r,commitment:o,signature:i}){let a=new Lt;function s(){a.abort();}r.addEventListener("abort",s,{signal:a.signal});let c=await t.signatureNotifications(i,{commitment:o}).subscribe({abortSignal:a.signal}),u=(async()=>{for await(let l of c){if(l.value.err)throw et(l.value.err);return}})(),d=(async()=>{let{value:l}=await e.getSignatureStatuses([i]).send({abortSignal:a.signal}),f=l[0];f&&f.confirmationStatus&>(f.confirmationStatus,o)>=0||await new Promise(()=>{});})();try{return await Te([u,d])}finally{a.abort();}}}async function Ha({abortSignal:e,commitment:t}){return await new Promise((n,r)=>{let o=c=>{clearTimeout(s);let u=new DOMException(c.target.reason,"AbortError");r(u);};e.addEventListener("abort",o);let i=t==="processed"?3e4:6e4,a=performance.now(),s=setTimeout(()=>{let c=performance.now()-a;r(new DOMException(`Timeout elapsed after ${c} ms`,"TimeoutError"));},i);})}async function No(e,t,n){let{abortSignal:r,commitment:o,getRecentSignatureConfirmationPromise:i}=t;r==null||r.throwIfAborted();let a=new Lt;if(r){let s=()=>{a.abort();};r.addEventListener("abort",s,{signal:a.signal});}try{let s=n({...t,abortSignal:a.signal});return await Te([i({abortSignal:a.signal,commitment:o,signature:e}),...s])}finally{a.abort();}}async function Wa(e){await No(lo(e.transaction),e,function({abortSignal:n,commitment:r,getNonceInvalidationPromise:o,transaction:i}){return [o({abortSignal:n,commitment:r,currentNonceValue:i.lifetimeConstraint.nonce,nonceAccountAddress:i.lifetimeConstraint.nonceAccountAddress})]});}async function $a(e){await No(lo(e.transaction),e,function({abortSignal:n,commitment:r,getBlockHeightExceedencePromise:o,transaction:i}){return [o({abortSignal:n,commitment:r,lastValidBlockHeight:i.lifetimeConstraint.lastValidBlockHeight})]});}async function ja(e){await No(e.signature,e,function({abortSignal:n,commitment:r,getTimeoutPromise:o}){return [o({abortSignal:n,commitment:r})]});}async function Ka({abortSignal:e,commitment:t,confirmSignatureOnlyTransaction:n,lamports:r,recipientAddress:o,rpc:i}){let a=await i.requestAirdrop(o,r,{commitment:t}).send({abortSignal:e});return await n({abortSignal:e,commitment:t,signature:a}),a}function VS({rpc:e,rpcSubscriptions:t}){let n=Ie({rpc:e,rpcSubscriptions:t});async function r(o){await ja({...o,getRecentSignatureConfirmationPromise:n,getTimeoutPromise:Ha});}return async function(i){return await Ka({...i,confirmSignatureOnlyTransaction:r,rpc:e})}}var Xa="ComputeBudget111111111111111111111111111111",Wl={blockhash:"11111111111111111111111111111111",lastValidBlockHeight:0n},Ya=2;function $l(e){let t=new Uint8Array(5);return t[0]=Ya,Pe().write(e,t,1),Object.freeze({data:t,programAddress:Xa})}function jl(e){return Pi(e,Xa)&&xi(e)&&e.data[0]===Ya}async function Ja({abortSignal:e,rpc:t,transactionMessage:n,...r}){let o=ue(n),i;o||ke(n)?i=n:i=io(Wl,n);let a=n.instructions.findIndex(jl),s=$l(14e5);if(a===-1)i=co(s,i);else {let d=[...i.instructions];d.splice(a,1,s),i=Object.freeze({...i,instructions:d});}let c=Ve(i),u=Ct(c);try{let{value:{err:d,unitsConsumed:l}}=await t.simulateTransaction(u,{...r,encoding:"base64",replaceRecentBlockhash:!o,sigVerify:!1}).send({abortSignal:e});if(l==null)throw new _(Je);let f=l>4294967295n?4294967295:Number(l);if(d)throw new _(qe,{cause:d,unitsConsumed:f});return f}catch(d){throw M(d,qe)?d:new _(Je,{cause:d})}}function tO({rpc:e}){return async function(n,r){return await Ja({...r,rpc:e,transactionMessage:n})}}async function qa(e,t,n){if(e.length===0)return {};let r=await ci(t,e,n);return ai(r),ui(r),r.reduce((o,i)=>({...o,[i.address]:i.data.addresses}),{})}async function dO(e,t,n){let o=("addressTableLookups"in e&&e.addressTableLookups!==void 0&&e.addressTableLookups.length>0?e.addressTableLookups:[]).map(c=>c.lookupTableAddress),{lastValidBlockHeight:i,...a}=n!=null?n:{},s=o.length>0?await qa(o,t,a):{};return Ua(e,{addressesByLookupTableAddress:s,lastValidBlockHeight:i})}function Kl(e,t){return !(t!=null&&t.preflightCommitment)&>(e,"finalized")<0?{...t,preflightCommitment:e}:t}async function bt({abortSignal:e,commitment:t,rpc:n,transaction:r,...o}){let i=Ct(r);return await n.sendTransaction(i,{...Kl(t,o),encoding:"base64"}).send({abortSignal:e})}async function Za({abortSignal:e,commitment:t,confirmDurableNonceTransaction:n,rpc:r,transaction:o,...i}){let a=await bt({...i,abortSignal:e,commitment:t,rpc:r,transaction:o});return await n({abortSignal:e,commitment:t,transaction:o}),a}async function Qa({abortSignal:e,commitment:t,confirmRecentTransaction:n,rpc:r,transaction:o,...i}){let a=await bt({...i,abortSignal:e,commitment:t,rpc:r,transaction:o});return await n({abortSignal:e,commitment:t,transaction:o}),a}function TO({rpc:e,rpcSubscriptions:t}){let n=Ga({rpc:e,rpcSubscriptions:t}),r=Ie({rpc:e,rpcSubscriptions:t});async function o(i){await Wa({...i,getNonceInvalidationPromise:n,getRecentSignatureConfirmationPromise:r});}return async function(a,s){await Za({...s,confirmDurableNonceTransaction:o,rpc:e,transaction:a});}}function hO({rpc:e,rpcSubscriptions:t}){let n=Va({rpc:e,rpcSubscriptions:t}),r=Ie({rpc:e,rpcSubscriptions:t});async function o(i){await $a({...i,getBlockHeightExceedencePromise:n,getRecentSignatureConfirmationPromise:r});}return async function(a,s){await Qa({...s,confirmRecentTransaction:o,rpc:e,transaction:a});}}function DO({rpc:e}){return async function(n,r){await bt({...r,rpc:e,transaction:n});}}
|
|
6
6
|
|
|
7
7
|
exports.AccountRole = h;
|
|
8
|
-
exports.BASE_ACCOUNT_SIZE =
|
|
8
|
+
exports.BASE_ACCOUNT_SIZE = hR;
|
|
9
9
|
exports.DEFAULT_RPC_CONFIG = nd;
|
|
10
10
|
exports.DEFAULT_RPC_SUBSCRIPTIONS_CONFIG = md;
|
|
11
11
|
exports.Endian = Pu;
|
|
@@ -16,27 +16,27 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
16
16
|
exports.SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND = Kt;
|
|
17
17
|
exports.SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED = Ht;
|
|
18
18
|
exports.SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS = ds;
|
|
19
|
-
exports.SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH =
|
|
19
|
+
exports.SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH = Ce;
|
|
20
20
|
exports.SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY = zt;
|
|
21
|
-
exports.SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS =
|
|
21
|
+
exports.SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS = $t;
|
|
22
22
|
exports.SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE = je;
|
|
23
23
|
exports.SOLANA_ERROR__ADDRESSES__MALFORMED_PDA = kt;
|
|
24
24
|
exports.SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED = Gt;
|
|
25
|
-
exports.SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED =
|
|
25
|
+
exports.SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED = $e;
|
|
26
26
|
exports.SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE = Vt;
|
|
27
|
-
exports.SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER =
|
|
28
|
-
exports.SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE =
|
|
27
|
+
exports.SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER = Wt;
|
|
28
|
+
exports.SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE = he;
|
|
29
29
|
exports.SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE = Pt;
|
|
30
30
|
exports.SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED = wt;
|
|
31
31
|
exports.SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY = Fn;
|
|
32
32
|
exports.SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS = Qe;
|
|
33
33
|
exports.SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL = tr;
|
|
34
34
|
exports.SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH = Hn;
|
|
35
|
-
exports.SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH =
|
|
35
|
+
exports.SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH = Wn;
|
|
36
36
|
exports.SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH = Gn;
|
|
37
37
|
exports.SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE = jn;
|
|
38
38
|
exports.SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH = kn;
|
|
39
|
-
exports.SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH =
|
|
39
|
+
exports.SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH = Le;
|
|
40
40
|
exports.SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH = Vn;
|
|
41
41
|
exports.SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE = Xc;
|
|
42
42
|
exports.SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH = zn;
|
|
@@ -44,7 +44,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
44
44
|
exports.SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT = Kn;
|
|
45
45
|
exports.SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT = Xn;
|
|
46
46
|
exports.SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT = qn;
|
|
47
|
-
exports.SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS =
|
|
47
|
+
exports.SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS = $n;
|
|
48
48
|
exports.SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE = X;
|
|
49
49
|
exports.SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE = Zn;
|
|
50
50
|
exports.SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE = Yn;
|
|
@@ -89,7 +89,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
89
89
|
exports.SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED = ac;
|
|
90
90
|
exports.SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED = sc;
|
|
91
91
|
exports.SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED = cc;
|
|
92
|
-
exports.SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED =
|
|
92
|
+
exports.SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED = $s;
|
|
93
93
|
exports.SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT = Hs;
|
|
94
94
|
exports.SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE = Ns;
|
|
95
95
|
exports.SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID = ps;
|
|
@@ -100,7 +100,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
100
100
|
exports.SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE = qs;
|
|
101
101
|
exports.SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED = Ls;
|
|
102
102
|
exports.SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE = hs;
|
|
103
|
-
exports.SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED =
|
|
103
|
+
exports.SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED = Ws;
|
|
104
104
|
exports.SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED = ys;
|
|
105
105
|
exports.SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION = gs;
|
|
106
106
|
exports.SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT = Ts;
|
|
@@ -111,7 +111,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
111
111
|
exports.SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA = Rn;
|
|
112
112
|
exports.SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH = fn;
|
|
113
113
|
exports.SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH = xt;
|
|
114
|
-
exports.SOLANA_ERROR__INVALID_NONCE =
|
|
114
|
+
exports.SOLANA_ERROR__INVALID_NONCE = We;
|
|
115
115
|
exports.SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING = Yc;
|
|
116
116
|
exports.SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED = lr;
|
|
117
117
|
exports.SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE = _r;
|
|
@@ -150,11 +150,11 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
150
150
|
exports.SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND = vt;
|
|
151
151
|
exports.SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN = ir;
|
|
152
152
|
exports.SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED = sr;
|
|
153
|
-
exports.SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED =
|
|
153
|
+
exports.SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED = _e;
|
|
154
154
|
exports.SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT = cr;
|
|
155
155
|
exports.SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID = ar;
|
|
156
156
|
exports.SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD = or;
|
|
157
|
-
exports.SOLANA_ERROR__RPC__INTEGER_OVERFLOW =
|
|
157
|
+
exports.SOLANA_ERROR__RPC__INTEGER_OVERFLOW = be;
|
|
158
158
|
exports.SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR = rr;
|
|
159
159
|
exports.SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN = Go;
|
|
160
160
|
exports.SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS = An;
|
|
@@ -195,11 +195,11 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
195
195
|
exports.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA = zc;
|
|
196
196
|
exports.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX = kc;
|
|
197
197
|
exports.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER = Fc;
|
|
198
|
-
exports.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT =
|
|
198
|
+
exports.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT = $c;
|
|
199
199
|
exports.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION = Lc;
|
|
200
200
|
exports.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT = Vc;
|
|
201
201
|
exports.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT = Pc;
|
|
202
|
-
exports.SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED =
|
|
202
|
+
exports.SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED = Wc;
|
|
203
203
|
exports.SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE = Ic;
|
|
204
204
|
exports.SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND = Oc;
|
|
205
205
|
exports.SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED = Vo;
|
|
@@ -237,72 +237,72 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
237
237
|
exports.SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING = Pn;
|
|
238
238
|
exports.SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE = bn;
|
|
239
239
|
exports.SolanaError = _;
|
|
240
|
-
exports.TRANSACTION_PACKET_HEADER =
|
|
241
|
-
exports.TRANSACTION_PACKET_SIZE =
|
|
242
|
-
exports.TRANSACTION_SIZE_LIMIT =
|
|
243
|
-
exports.addCodecSentinel =
|
|
244
|
-
exports.addCodecSizePrefix =
|
|
240
|
+
exports.TRANSACTION_PACKET_HEADER = xl;
|
|
241
|
+
exports.TRANSACTION_PACKET_SIZE = Pl;
|
|
242
|
+
exports.TRANSACTION_SIZE_LIMIT = ge;
|
|
243
|
+
exports.addCodecSentinel = nR;
|
|
244
|
+
exports.addCodecSizePrefix = rR;
|
|
245
245
|
exports.addDecoderSentinel = au;
|
|
246
246
|
exports.addDecoderSizePrefix = fr;
|
|
247
247
|
exports.addEncoderSentinel = iu;
|
|
248
248
|
exports.addEncoderSizePrefix = Rr;
|
|
249
|
-
exports.addSignersToInstruction =
|
|
250
|
-
exports.addSignersToTransactionMessage =
|
|
249
|
+
exports.addSignersToInstruction = Bl;
|
|
250
|
+
exports.addSignersToTransactionMessage = SS;
|
|
251
251
|
exports.address = pu;
|
|
252
|
-
exports.airdropFactory =
|
|
252
|
+
exports.airdropFactory = VS;
|
|
253
253
|
exports.appendTransactionMessageInstruction = co;
|
|
254
|
-
exports.appendTransactionMessageInstructions =
|
|
255
|
-
exports.assertAccountDecoded =
|
|
256
|
-
exports.assertAccountExists =
|
|
254
|
+
exports.appendTransactionMessageInstructions = gl;
|
|
255
|
+
exports.assertAccountDecoded = bR;
|
|
256
|
+
exports.assertAccountExists = PR;
|
|
257
257
|
exports.assertAccountsDecoded = ai;
|
|
258
258
|
exports.assertAccountsExist = ui;
|
|
259
|
-
exports.assertByteArrayHasEnoughBytesForCodec =
|
|
259
|
+
exports.assertByteArrayHasEnoughBytesForCodec = Re;
|
|
260
260
|
exports.assertByteArrayIsNotEmptyForCodec = Xo;
|
|
261
261
|
exports.assertByteArrayOffsetIsNotOutOfRange = nt;
|
|
262
262
|
exports.assertIsAddress = ae;
|
|
263
263
|
exports.assertIsBlockhash = Oa;
|
|
264
|
-
exports.assertIsDurableNonceTransactionMessage =
|
|
264
|
+
exports.assertIsDurableNonceTransactionMessage = GE;
|
|
265
265
|
exports.assertIsFixedSize = q;
|
|
266
266
|
exports.assertIsFullySignedTransaction = It;
|
|
267
267
|
exports.assertIsInstructionForProgram = $f;
|
|
268
|
-
exports.assertIsInstructionWithAccounts =
|
|
269
|
-
exports.assertIsInstructionWithData =
|
|
270
|
-
exports.assertIsKeyPairSigner =
|
|
268
|
+
exports.assertIsInstructionWithAccounts = Kf;
|
|
269
|
+
exports.assertIsInstructionWithData = Xf;
|
|
270
|
+
exports.assertIsKeyPairSigner = mS;
|
|
271
271
|
exports.assertIsLamports = Bd;
|
|
272
|
-
exports.assertIsMessageModifyingSigner =
|
|
273
|
-
exports.assertIsMessagePartialSigner =
|
|
274
|
-
exports.assertIsMessageSigner =
|
|
272
|
+
exports.assertIsMessageModifyingSigner = IS;
|
|
273
|
+
exports.assertIsMessagePartialSigner = NS;
|
|
274
|
+
exports.assertIsMessageSigner = CS;
|
|
275
275
|
exports.assertIsOffCurveAddress = wu;
|
|
276
|
-
exports.assertIsProgramDerivedAddress =
|
|
276
|
+
exports.assertIsProgramDerivedAddress = HR;
|
|
277
277
|
exports.assertIsSignature = h_;
|
|
278
278
|
exports.assertIsStringifiedBigInt = kd;
|
|
279
279
|
exports.assertIsStringifiedNumber = Vd;
|
|
280
|
-
exports.assertIsTransactionMessageWithBlockhashLifetime =
|
|
281
|
-
exports.assertIsTransactionMessageWithDurableNonceLifetime =
|
|
280
|
+
exports.assertIsTransactionMessageWithBlockhashLifetime = ME;
|
|
281
|
+
exports.assertIsTransactionMessageWithDurableNonceLifetime = Sl;
|
|
282
282
|
exports.assertIsTransactionMessageWithSingleSendingSigner = Fa;
|
|
283
|
-
exports.assertIsTransactionMessageWithinSizeLimit =
|
|
284
|
-
exports.assertIsTransactionModifyingSigner =
|
|
285
|
-
exports.assertIsTransactionPartialSigner =
|
|
286
|
-
exports.assertIsTransactionSendingSigner =
|
|
287
|
-
exports.assertIsTransactionSigner =
|
|
288
|
-
exports.assertIsTransactionWithinSizeLimit =
|
|
283
|
+
exports.assertIsTransactionMessageWithinSizeLimit = iS;
|
|
284
|
+
exports.assertIsTransactionModifyingSigner = RS;
|
|
285
|
+
exports.assertIsTransactionPartialSigner = fS;
|
|
286
|
+
exports.assertIsTransactionSendingSigner = AS;
|
|
287
|
+
exports.assertIsTransactionSigner = ES;
|
|
288
|
+
exports.assertIsTransactionWithinSizeLimit = rS;
|
|
289
289
|
exports.assertIsUnixTimestamp = Gd;
|
|
290
|
-
exports.assertIsVariableSize =
|
|
290
|
+
exports.assertIsVariableSize = tR;
|
|
291
291
|
exports.assertNumberIsBetweenForCodec = Oi;
|
|
292
|
-
exports.assertTransactionIsFullySigned =
|
|
292
|
+
exports.assertTransactionIsFullySigned = aS;
|
|
293
293
|
exports.assertValidBaseString = ni;
|
|
294
294
|
exports.assertValidNumberOfItemsForCodec = mi;
|
|
295
|
-
exports.blockhash =
|
|
295
|
+
exports.blockhash = lE;
|
|
296
296
|
exports.combineCodec = A;
|
|
297
297
|
exports.commitmentComparator = gt;
|
|
298
298
|
exports.compileTransaction = Ve;
|
|
299
299
|
exports.compileTransactionMessage = va;
|
|
300
|
-
exports.compressTransactionMessageUsingAddressLookupTables =
|
|
301
|
-
exports.containsBytes =
|
|
300
|
+
exports.compressTransactionMessageUsingAddressLookupTables = kE;
|
|
301
|
+
exports.containsBytes = le;
|
|
302
302
|
exports.createAddressWithSeed = $R;
|
|
303
303
|
exports.createCodec = ou;
|
|
304
304
|
exports.createDecoder = m;
|
|
305
|
-
exports.createDefaultRpcSubscriptionsChannelCreator =
|
|
305
|
+
exports.createDefaultRpcSubscriptionsChannelCreator = nE;
|
|
306
306
|
exports.createDefaultRpcSubscriptionsTransport = Dd;
|
|
307
307
|
exports.createDefaultRpcTransport = sd;
|
|
308
308
|
exports.createDefaultSolanaRpcSubscriptionsChannelCreator = Ld;
|
|
@@ -310,95 +310,95 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
310
310
|
exports.createJsonRpcApi = Vi;
|
|
311
311
|
exports.createKeyPairFromBytes = Mi;
|
|
312
312
|
exports.createKeyPairFromPrivateKeyBytes = Fi;
|
|
313
|
-
exports.createKeyPairSignerFromBytes =
|
|
314
|
-
exports.createKeyPairSignerFromPrivateKeyBytes =
|
|
315
|
-
exports.createNoopSigner =
|
|
313
|
+
exports.createKeyPairSignerFromBytes = gS;
|
|
314
|
+
exports.createKeyPairSignerFromPrivateKeyBytes = pS;
|
|
315
|
+
exports.createNoopSigner = hS;
|
|
316
316
|
exports.createPrivateKeyFromBytes = Mr;
|
|
317
317
|
exports.createRpc = ki;
|
|
318
|
-
exports.createRpcMessage =
|
|
318
|
+
exports.createRpcMessage = me;
|
|
319
319
|
exports.createRpcSubscriptionsApi = aa;
|
|
320
320
|
exports.createRpcSubscriptionsTransportFromChannelCreator = yd;
|
|
321
|
-
exports.createSignableMessage =
|
|
321
|
+
exports.createSignableMessage = yS;
|
|
322
322
|
exports.createSignerFromKeyPair = So;
|
|
323
|
-
exports.createSolanaRpc =
|
|
323
|
+
exports.createSolanaRpc = yA;
|
|
324
324
|
exports.createSolanaRpcApi = Ki;
|
|
325
325
|
exports.createSolanaRpcFromTransport = cd;
|
|
326
|
-
exports.createSolanaRpcSubscriptions =
|
|
326
|
+
exports.createSolanaRpcSubscriptions = rE;
|
|
327
327
|
exports.createSolanaRpcSubscriptionsApi = _a;
|
|
328
|
-
exports.createSolanaRpcSubscriptionsApi_UNSTABLE =
|
|
328
|
+
exports.createSolanaRpcSubscriptionsApi_UNSTABLE = WA;
|
|
329
329
|
exports.createSolanaRpcSubscriptionsFromTransport = wd;
|
|
330
|
-
exports.createSolanaRpcSubscriptions_UNSTABLE =
|
|
330
|
+
exports.createSolanaRpcSubscriptions_UNSTABLE = oE;
|
|
331
331
|
exports.createSubscriptionRpc = ia;
|
|
332
|
-
exports.createTransactionMessage =
|
|
333
|
-
exports.decodeAccount =
|
|
332
|
+
exports.createTransactionMessage = Al;
|
|
333
|
+
exports.decodeAccount = LR;
|
|
334
334
|
exports.decompileTransactionMessage = Ua;
|
|
335
|
-
exports.decompileTransactionMessageFetchingLookupTables =
|
|
336
|
-
exports.devnet =
|
|
337
|
-
exports.downgradeRoleToNonSigner =
|
|
338
|
-
exports.downgradeRoleToReadonly =
|
|
335
|
+
exports.decompileTransactionMessageFetchingLookupTables = dO;
|
|
336
|
+
exports.devnet = EE;
|
|
337
|
+
exports.downgradeRoleToNonSigner = Yf;
|
|
338
|
+
exports.downgradeRoleToReadonly = Jf;
|
|
339
339
|
exports.executeRpcPubSubSubscriptionPlan = ca;
|
|
340
340
|
exports.fetchAddressesForLookupTables = qa;
|
|
341
|
-
exports.fetchEncodedAccount =
|
|
342
|
-
exports.fetchEncodedAccounts =
|
|
343
|
-
exports.fetchJsonParsedAccount =
|
|
341
|
+
exports.fetchEncodedAccount = yR;
|
|
342
|
+
exports.fetchEncodedAccounts = vR;
|
|
343
|
+
exports.fetchJsonParsedAccount = wR;
|
|
344
344
|
exports.fetchJsonParsedAccounts = ci;
|
|
345
345
|
exports.fixBytes = ru;
|
|
346
|
-
exports.fixCodecSize =
|
|
346
|
+
exports.fixCodecSize = oR;
|
|
347
347
|
exports.fixDecoderSize = z;
|
|
348
348
|
exports.fixEncoderSize = F;
|
|
349
349
|
exports.generateKeyPair = Bi;
|
|
350
|
-
exports.generateKeyPairSigner =
|
|
350
|
+
exports.generateKeyPairSigner = TS;
|
|
351
351
|
exports.getAddressCodec = yr;
|
|
352
352
|
exports.getAddressComparator = st;
|
|
353
353
|
exports.getAddressDecoder = Y;
|
|
354
354
|
exports.getAddressEncoder = se;
|
|
355
355
|
exports.getAddressFromPublicKey = ct;
|
|
356
|
-
exports.getArrayCodec =
|
|
356
|
+
exports.getArrayCodec = ff;
|
|
357
357
|
exports.getArrayDecoder = U;
|
|
358
358
|
exports.getArrayEncoder = V;
|
|
359
|
-
exports.getBase10Codec =
|
|
360
|
-
exports.getBase10Decoder =
|
|
361
|
-
exports.getBase10Encoder =
|
|
362
|
-
exports.getBase16Codec =
|
|
359
|
+
exports.getBase10Codec = ER;
|
|
360
|
+
exports.getBase10Decoder = AR;
|
|
361
|
+
exports.getBase10Encoder = fR;
|
|
362
|
+
exports.getBase16Codec = SR;
|
|
363
363
|
exports.getBase16Decoder = fu;
|
|
364
364
|
exports.getBase16Encoder = Ru;
|
|
365
|
-
exports.getBase58Codec =
|
|
366
|
-
exports.getBase58Decoder =
|
|
365
|
+
exports.getBase58Codec = OR;
|
|
366
|
+
exports.getBase58Decoder = fe;
|
|
367
367
|
exports.getBase58Encoder = oe;
|
|
368
|
-
exports.getBase64Codec =
|
|
368
|
+
exports.getBase64Codec = mR;
|
|
369
369
|
exports.getBase64Decoder = Cr;
|
|
370
370
|
exports.getBase64EncodedWireTransaction = Ct;
|
|
371
|
-
exports.getBase64Encoder =
|
|
371
|
+
exports.getBase64Encoder = ye;
|
|
372
372
|
exports.getBaseXCodec = ri;
|
|
373
373
|
exports.getBaseXDecoder = gr;
|
|
374
374
|
exports.getBaseXEncoder = Tr;
|
|
375
|
-
exports.getBaseXResliceCodec =
|
|
375
|
+
exports.getBaseXResliceCodec = NR;
|
|
376
376
|
exports.getBaseXResliceDecoder = Eu;
|
|
377
377
|
exports.getBaseXResliceEncoder = Au;
|
|
378
|
-
exports.getBitArrayCodec =
|
|
378
|
+
exports.getBitArrayCodec = Af;
|
|
379
379
|
exports.getBitArrayDecoder = t_;
|
|
380
380
|
exports.getBitArrayEncoder = e_;
|
|
381
|
-
exports.getBlockhashCodec =
|
|
382
|
-
exports.getBlockhashComparator =
|
|
381
|
+
exports.getBlockhashCodec = RE;
|
|
382
|
+
exports.getBlockhashComparator = fE;
|
|
383
383
|
exports.getBlockhashDecoder = Pd;
|
|
384
384
|
exports.getBlockhashEncoder = vd;
|
|
385
|
-
exports.getBooleanCodec =
|
|
385
|
+
exports.getBooleanCodec = Ef;
|
|
386
386
|
exports.getBooleanDecoder = dt;
|
|
387
387
|
exports.getBooleanEncoder = _t;
|
|
388
|
-
exports.getBytesCodec =
|
|
389
|
-
exports.getBytesDecoder =
|
|
390
|
-
exports.getBytesEncoder =
|
|
391
|
-
exports.getCompiledTransactionMessageCodec =
|
|
388
|
+
exports.getBytesCodec = Sf;
|
|
389
|
+
exports.getBytesDecoder = Se;
|
|
390
|
+
exports.getBytesEncoder = Ee;
|
|
391
|
+
exports.getCompiledTransactionMessageCodec = zE;
|
|
392
392
|
exports.getCompiledTransactionMessageDecoder = ol;
|
|
393
393
|
exports.getCompiledTransactionMessageEncoder = ao;
|
|
394
|
-
exports.getComputeUnitEstimateForTransactionMessageFactory =
|
|
395
|
-
exports.getConstantCodec =
|
|
394
|
+
exports.getComputeUnitEstimateForTransactionMessageFactory = tO;
|
|
395
|
+
exports.getConstantCodec = Of;
|
|
396
396
|
exports.getConstantDecoder = Rt;
|
|
397
397
|
exports.getConstantEncoder = lt;
|
|
398
|
-
exports.getDataEnumCodec =
|
|
399
|
-
exports.getDataEnumDecoder =
|
|
400
|
-
exports.getDataEnumEncoder =
|
|
401
|
-
exports.getDefaultLamportsCodec =
|
|
398
|
+
exports.getDataEnumCodec = pf;
|
|
399
|
+
exports.getDataEnumDecoder = gf;
|
|
400
|
+
exports.getDataEnumEncoder = Tf;
|
|
401
|
+
exports.getDefaultLamportsCodec = mE;
|
|
402
402
|
exports.getDefaultLamportsDecoder = zd;
|
|
403
403
|
exports.getDefaultLamportsEncoder = Fd;
|
|
404
404
|
exports.getDiscriminatedUnionCodec = r_;
|
|
@@ -408,202 +408,202 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
408
408
|
exports.getEnumCodec = s_;
|
|
409
409
|
exports.getEnumDecoder = Di;
|
|
410
410
|
exports.getEnumEncoder = bi;
|
|
411
|
-
exports.getF32Codec =
|
|
411
|
+
exports.getF32Codec = JR;
|
|
412
412
|
exports.getF32Decoder = Bu;
|
|
413
413
|
exports.getF32Encoder = Uu;
|
|
414
|
-
exports.getF64Codec =
|
|
414
|
+
exports.getF64Codec = qR;
|
|
415
415
|
exports.getF64Decoder = Fu;
|
|
416
416
|
exports.getF64Encoder = Mu;
|
|
417
|
-
exports.getHiddenPrefixCodec =
|
|
417
|
+
exports.getHiddenPrefixCodec = Lf;
|
|
418
418
|
exports.getHiddenPrefixDecoder = u_;
|
|
419
419
|
exports.getHiddenPrefixEncoder = c_;
|
|
420
|
-
exports.getHiddenSuffixCodec =
|
|
420
|
+
exports.getHiddenSuffixCodec = bf;
|
|
421
421
|
exports.getHiddenSuffixDecoder = d_;
|
|
422
422
|
exports.getHiddenSuffixEncoder = __;
|
|
423
|
-
exports.getI128Codec =
|
|
423
|
+
exports.getI128Codec = ZR;
|
|
424
424
|
exports.getI128Decoder = ku;
|
|
425
425
|
exports.getI128Encoder = zu;
|
|
426
|
-
exports.getI16Codec =
|
|
426
|
+
exports.getI16Codec = QR;
|
|
427
427
|
exports.getI16Decoder = Gu;
|
|
428
428
|
exports.getI16Encoder = Vu;
|
|
429
|
-
exports.getI32Codec =
|
|
430
|
-
exports.getI32Decoder =
|
|
429
|
+
exports.getI32Codec = ef;
|
|
430
|
+
exports.getI32Decoder = Wu;
|
|
431
431
|
exports.getI32Encoder = Hu;
|
|
432
|
-
exports.getI64Codec =
|
|
432
|
+
exports.getI64Codec = tf;
|
|
433
433
|
exports.getI64Decoder = ju;
|
|
434
|
-
exports.getI64Encoder =
|
|
435
|
-
exports.getI8Codec =
|
|
434
|
+
exports.getI64Encoder = $u;
|
|
435
|
+
exports.getI8Codec = nf;
|
|
436
436
|
exports.getI8Decoder = Xu;
|
|
437
437
|
exports.getI8Encoder = Ku;
|
|
438
|
-
exports.getLamportsCodec =
|
|
438
|
+
exports.getLamportsCodec = TE;
|
|
439
439
|
exports.getLamportsDecoder = ma;
|
|
440
|
-
exports.getLamportsEncoder =
|
|
441
|
-
exports.getLiteralUnionCodec =
|
|
440
|
+
exports.getLamportsEncoder = NE;
|
|
441
|
+
exports.getLiteralUnionCodec = Df;
|
|
442
442
|
exports.getLiteralUnionDecoder = R_;
|
|
443
443
|
exports.getLiteralUnionEncoder = l_;
|
|
444
|
-
exports.getMapCodec =
|
|
444
|
+
exports.getMapCodec = yf;
|
|
445
445
|
exports.getMapDecoder = A_;
|
|
446
446
|
exports.getMapEncoder = f_;
|
|
447
|
-
exports.getNullableCodec =
|
|
447
|
+
exports.getNullableCodec = vf;
|
|
448
448
|
exports.getNullableDecoder = S_;
|
|
449
449
|
exports.getNullableEncoder = E_;
|
|
450
|
-
exports.getOptionCodec =
|
|
450
|
+
exports.getOptionCodec = Vf;
|
|
451
451
|
exports.getOptionDecoder = g_;
|
|
452
452
|
exports.getOptionEncoder = T_;
|
|
453
|
-
exports.getProgramDerivedAddress =
|
|
454
|
-
exports.getPublicKeyFromAddress =
|
|
453
|
+
exports.getProgramDerivedAddress = WR;
|
|
454
|
+
exports.getPublicKeyFromAddress = jR;
|
|
455
455
|
exports.getPublicKeyFromPrivateKey = C_;
|
|
456
456
|
exports.getRpcSubscriptionsChannelWithJSONSerialization = Cd;
|
|
457
|
-
exports.getScalarEnumCodec =
|
|
458
|
-
exports.getScalarEnumDecoder =
|
|
459
|
-
exports.getScalarEnumEncoder =
|
|
460
|
-
exports.getSetCodec =
|
|
457
|
+
exports.getScalarEnumCodec = hf;
|
|
458
|
+
exports.getScalarEnumDecoder = Cf;
|
|
459
|
+
exports.getScalarEnumEncoder = If;
|
|
460
|
+
exports.getSetCodec = Pf;
|
|
461
461
|
exports.getSetDecoder = N_;
|
|
462
462
|
exports.getSetEncoder = O_;
|
|
463
|
-
exports.getShortU16Codec =
|
|
463
|
+
exports.getShortU16Codec = rf;
|
|
464
464
|
exports.getShortU16Decoder = k;
|
|
465
|
-
exports.getShortU16Encoder =
|
|
465
|
+
exports.getShortU16Encoder = W;
|
|
466
466
|
exports.getSignatureFromTransaction = lo;
|
|
467
|
-
exports.getSignersFromInstruction =
|
|
467
|
+
exports.getSignersFromInstruction = Ul;
|
|
468
468
|
exports.getSignersFromTransactionMessage = Ao;
|
|
469
|
-
exports.getSolanaErrorFromInstructionError =
|
|
470
|
-
exports.getSolanaErrorFromJsonRpcError =
|
|
469
|
+
exports.getSolanaErrorFromInstructionError = $o;
|
|
470
|
+
exports.getSolanaErrorFromJsonRpcError = De;
|
|
471
471
|
exports.getSolanaErrorFromTransactionError = et;
|
|
472
|
-
exports.getStructCodec =
|
|
472
|
+
exports.getStructCodec = xf;
|
|
473
473
|
exports.getStructDecoder = te;
|
|
474
474
|
exports.getStructEncoder = J;
|
|
475
|
-
exports.getTransactionCodec =
|
|
476
|
-
exports.getTransactionDecoder =
|
|
475
|
+
exports.getTransactionCodec = QE;
|
|
476
|
+
exports.getTransactionDecoder = yl;
|
|
477
477
|
exports.getTransactionEncoder = _o;
|
|
478
478
|
exports.getTransactionMessageSize = Ba;
|
|
479
479
|
exports.getTransactionSize = fo;
|
|
480
|
-
exports.getTransactionVersionCodec =
|
|
480
|
+
exports.getTransactionVersionCodec = FE;
|
|
481
481
|
exports.getTransactionVersionDecoder = pt;
|
|
482
482
|
exports.getTransactionVersionEncoder = ya;
|
|
483
|
-
exports.getTupleCodec =
|
|
483
|
+
exports.getTupleCodec = Nf;
|
|
484
484
|
exports.getTupleDecoder = x;
|
|
485
|
-
exports.getTupleEncoder =
|
|
486
|
-
exports.getU128Codec =
|
|
485
|
+
exports.getTupleEncoder = $;
|
|
486
|
+
exports.getU128Codec = of;
|
|
487
487
|
exports.getU128Decoder = Ju;
|
|
488
488
|
exports.getU128Encoder = Yu;
|
|
489
|
-
exports.getU16Codec =
|
|
489
|
+
exports.getU16Codec = af;
|
|
490
490
|
exports.getU16Decoder = Zu;
|
|
491
491
|
exports.getU16Encoder = qu;
|
|
492
|
-
exports.getU32Codec =
|
|
492
|
+
exports.getU32Codec = sf;
|
|
493
493
|
exports.getU32Decoder = wr;
|
|
494
|
-
exports.getU32Encoder =
|
|
495
|
-
exports.getU64Codec =
|
|
494
|
+
exports.getU32Encoder = Pe;
|
|
495
|
+
exports.getU64Codec = cf;
|
|
496
496
|
exports.getU64Decoder = Pr;
|
|
497
497
|
exports.getU64Encoder = vr;
|
|
498
|
-
exports.getU8Codec =
|
|
498
|
+
exports.getU8Codec = uf;
|
|
499
499
|
exports.getU8Decoder = L;
|
|
500
500
|
exports.getU8Encoder = D;
|
|
501
|
-
exports.getUnionCodec =
|
|
502
|
-
exports.getUnionDecoder =
|
|
503
|
-
exports.getUnionEncoder =
|
|
504
|
-
exports.getUnitCodec =
|
|
501
|
+
exports.getUnionCodec = mf;
|
|
502
|
+
exports.getUnionDecoder = Ue;
|
|
503
|
+
exports.getUnionEncoder = xe;
|
|
504
|
+
exports.getUnitCodec = wf;
|
|
505
505
|
exports.getUnitDecoder = Q;
|
|
506
506
|
exports.getUnitEncoder = Z;
|
|
507
|
-
exports.getUtf8Codec =
|
|
507
|
+
exports.getUtf8Codec = gR;
|
|
508
508
|
exports.getUtf8Decoder = mu;
|
|
509
509
|
exports.getUtf8Encoder = Nu;
|
|
510
|
-
exports.isAddress =
|
|
510
|
+
exports.isAddress = ve;
|
|
511
511
|
exports.isAdvanceNonceAccountInstruction = so;
|
|
512
512
|
exports.isBlockhash = Sa;
|
|
513
|
-
exports.isDurableNonceTransaction =
|
|
513
|
+
exports.isDurableNonceTransaction = HE;
|
|
514
514
|
exports.isFixedSize = T;
|
|
515
|
-
exports.isFullySignedTransaction =
|
|
515
|
+
exports.isFullySignedTransaction = tS;
|
|
516
516
|
exports.isInstructionForProgram = Pi;
|
|
517
|
-
exports.isInstructionWithAccounts =
|
|
517
|
+
exports.isInstructionWithAccounts = jf;
|
|
518
518
|
exports.isInstructionWithData = xi;
|
|
519
519
|
exports.isJsonRpcPayload = St;
|
|
520
|
-
exports.isKeyPairSigner =
|
|
521
|
-
exports.isLamports =
|
|
520
|
+
exports.isKeyPairSigner = Fl;
|
|
521
|
+
exports.isLamports = OE;
|
|
522
522
|
exports.isMessageModifyingSigner = Ma;
|
|
523
523
|
exports.isMessagePartialSigner = Eo;
|
|
524
|
-
exports.isMessageSigner =
|
|
525
|
-
exports.isNone =
|
|
524
|
+
exports.isMessageSigner = zl;
|
|
525
|
+
exports.isNone = zf;
|
|
526
526
|
exports.isOffCurveAddress = yu;
|
|
527
527
|
exports.isOption = Ur;
|
|
528
|
-
exports.isProgramDerivedAddress =
|
|
529
|
-
exports.isProgramError =
|
|
530
|
-
exports.isSignature =
|
|
528
|
+
exports.isProgramDerivedAddress = GR;
|
|
529
|
+
exports.isProgramError = sA;
|
|
530
|
+
exports.isSignature = rA;
|
|
531
531
|
exports.isSignerRole = j;
|
|
532
532
|
exports.isSolanaError = M;
|
|
533
533
|
exports.isSome = ft;
|
|
534
|
-
exports.isStringifiedBigInt =
|
|
535
|
-
exports.isStringifiedNumber =
|
|
536
|
-
exports.isTransactionMessageWithBlockhashLifetime =
|
|
537
|
-
exports.isTransactionMessageWithDurableNonceLifetime =
|
|
538
|
-
exports.isTransactionMessageWithSingleSendingSigner =
|
|
539
|
-
exports.isTransactionMessageWithinSizeLimit =
|
|
540
|
-
exports.isTransactionModifyingSigner =
|
|
534
|
+
exports.isStringifiedBigInt = gE;
|
|
535
|
+
exports.isStringifiedNumber = IE;
|
|
536
|
+
exports.isTransactionMessageWithBlockhashLifetime = ke;
|
|
537
|
+
exports.isTransactionMessageWithDurableNonceLifetime = ue;
|
|
538
|
+
exports.isTransactionMessageWithSingleSendingSigner = LS;
|
|
539
|
+
exports.isTransactionMessageWithinSizeLimit = oS;
|
|
540
|
+
exports.isTransactionModifyingSigner = pe;
|
|
541
541
|
exports.isTransactionPartialSigner = re;
|
|
542
542
|
exports.isTransactionSendingSigner = ht;
|
|
543
543
|
exports.isTransactionSigner = He;
|
|
544
|
-
exports.isTransactionWithinSizeLimit =
|
|
545
|
-
exports.isUnixTimestamp =
|
|
544
|
+
exports.isTransactionWithinSizeLimit = nS;
|
|
545
|
+
exports.isUnixTimestamp = hE;
|
|
546
546
|
exports.isVariableSize = jo;
|
|
547
|
-
exports.isWritableRole =
|
|
547
|
+
exports.isWritableRole = Oe;
|
|
548
548
|
exports.lamports = Md;
|
|
549
|
-
exports.mainnet =
|
|
550
|
-
exports.mergeBytes =
|
|
549
|
+
exports.mainnet = AE;
|
|
550
|
+
exports.mergeBytes = eR;
|
|
551
551
|
exports.mergeRoles = Br;
|
|
552
552
|
exports.none = vi;
|
|
553
|
-
exports.offCurveAddress =
|
|
554
|
-
exports.offsetCodec =
|
|
553
|
+
exports.offCurveAddress = VR;
|
|
554
|
+
exports.offsetCodec = iR;
|
|
555
555
|
exports.offsetDecoder = Er;
|
|
556
556
|
exports.offsetEncoder = Ar;
|
|
557
557
|
exports.padBytes = nu;
|
|
558
|
-
exports.padLeftCodec =
|
|
558
|
+
exports.padLeftCodec = sR;
|
|
559
559
|
exports.padLeftDecoder = uu;
|
|
560
560
|
exports.padLeftEncoder = su;
|
|
561
|
-
exports.padNullCharacters =
|
|
562
|
-
exports.padRightCodec =
|
|
561
|
+
exports.padNullCharacters = TR;
|
|
562
|
+
exports.padRightCodec = cR;
|
|
563
563
|
exports.padRightDecoder = Nr;
|
|
564
564
|
exports.padRightEncoder = cu;
|
|
565
|
-
exports.parseBase58RpcAccount =
|
|
565
|
+
exports.parseBase58RpcAccount = DR;
|
|
566
566
|
exports.parseBase64RpcAccount = rt;
|
|
567
567
|
exports.parseJsonRpcAccount = si;
|
|
568
568
|
exports.partiallySignTransaction = Ro;
|
|
569
|
-
exports.partiallySignTransactionMessageWithSigners =
|
|
569
|
+
exports.partiallySignTransactionMessageWithSigners = kl;
|
|
570
570
|
exports.pipe = B;
|
|
571
|
-
exports.prependTransactionMessageInstruction =
|
|
572
|
-
exports.prependTransactionMessageInstructions =
|
|
571
|
+
exports.prependTransactionMessageInstruction = VE;
|
|
572
|
+
exports.prependTransactionMessageInstructions = pl;
|
|
573
573
|
exports.removeNullCharacters = Su;
|
|
574
|
-
exports.resizeCodec =
|
|
574
|
+
exports.resizeCodec = aR;
|
|
575
575
|
exports.resizeDecoder = Or;
|
|
576
576
|
exports.resizeEncoder = Sr;
|
|
577
|
-
exports.reverseCodec =
|
|
577
|
+
exports.reverseCodec = uR;
|
|
578
578
|
exports.reverseDecoder = du;
|
|
579
579
|
exports.reverseEncoder = _u;
|
|
580
|
-
exports.safeCaptureStackTrace =
|
|
581
|
-
exports.sendAndConfirmDurableNonceTransactionFactory =
|
|
582
|
-
exports.sendAndConfirmTransactionFactory =
|
|
583
|
-
exports.sendTransactionWithoutConfirmingFactory =
|
|
584
|
-
exports.setTransactionMessageFeePayer =
|
|
585
|
-
exports.setTransactionMessageFeePayerSigner =
|
|
580
|
+
exports.safeCaptureStackTrace = de;
|
|
581
|
+
exports.sendAndConfirmDurableNonceTransactionFactory = TO;
|
|
582
|
+
exports.sendAndConfirmTransactionFactory = hO;
|
|
583
|
+
exports.sendTransactionWithoutConfirmingFactory = DO;
|
|
584
|
+
exports.setTransactionMessageFeePayer = ml;
|
|
585
|
+
exports.setTransactionMessageFeePayerSigner = OS;
|
|
586
586
|
exports.setTransactionMessageLifetimeUsingBlockhash = io;
|
|
587
|
-
exports.setTransactionMessageLifetimeUsingDurableNonce =
|
|
588
|
-
exports.signAndSendTransactionMessageWithSigners =
|
|
589
|
-
exports.signBytes =
|
|
590
|
-
exports.signTransaction =
|
|
591
|
-
exports.signTransactionMessageWithSigners =
|
|
592
|
-
exports.signature =
|
|
587
|
+
exports.setTransactionMessageLifetimeUsingDurableNonce = Nl;
|
|
588
|
+
exports.signAndSendTransactionMessageWithSigners = DS;
|
|
589
|
+
exports.signBytes = Me;
|
|
590
|
+
exports.signTransaction = eS;
|
|
591
|
+
exports.signTransactionMessageWithSigners = bS;
|
|
592
|
+
exports.signature = oA;
|
|
593
593
|
exports.some = wi;
|
|
594
|
-
exports.stringifiedBigInt =
|
|
595
|
-
exports.stringifiedNumber =
|
|
596
|
-
exports.testnet =
|
|
597
|
-
exports.transformChannelInboundMessages =
|
|
598
|
-
exports.transformChannelOutboundMessages =
|
|
599
|
-
exports.transformCodec =
|
|
594
|
+
exports.stringifiedBigInt = pE;
|
|
595
|
+
exports.stringifiedNumber = CE;
|
|
596
|
+
exports.testnet = SE;
|
|
597
|
+
exports.transformChannelInboundMessages = Wr;
|
|
598
|
+
exports.transformChannelOutboundMessages = $r;
|
|
599
|
+
exports.transformCodec = _R;
|
|
600
600
|
exports.transformDecoder = g;
|
|
601
601
|
exports.transformEncoder = p;
|
|
602
|
-
exports.unixTimestamp =
|
|
603
|
-
exports.unwrapOption =
|
|
602
|
+
exports.unixTimestamp = LE;
|
|
603
|
+
exports.unwrapOption = kf;
|
|
604
604
|
exports.unwrapOptionRecursively = yi;
|
|
605
|
-
exports.upgradeRoleToSigner =
|
|
606
|
-
exports.upgradeRoleToWritable =
|
|
605
|
+
exports.upgradeRoleToSigner = qf;
|
|
606
|
+
exports.upgradeRoleToWritable = Zf;
|
|
607
607
|
exports.verifySignature = L_;
|
|
608
608
|
exports.wrapNullable = m_;
|
|
609
609
|
|