@dcl/governance-site 1.15.1-20105651460.commit-7620061 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/UserAvatar-78751cb5.js +1 -0
- package/assets/{basic-22d207a7.js → basic-ca749c4c.js} +1 -1
- package/assets/core-806d78ea.js +249 -0
- package/assets/{features-abf09337.js → features-b72c9430.js} +2 -2
- package/assets/fortmatic-12e0f2e5.js +13 -0
- package/assets/index-073512a1.js +22 -0
- package/assets/{index-6c5c6262.js → index-2ef9f1d1.js} +325 -301
- package/assets/{index-94684a9b.js → index-372705ba.js} +1 -1
- package/assets/index-4be588a0.js +94 -0
- package/assets/index-74e34dfb.js +39 -0
- package/assets/{index-3632219d.css → index-a8255d1c.css} +4 -4
- package/assets/{index-0ed42625.js → index-bbb36593.js} +1 -1
- package/assets/index-c1c8440f.js +47 -0
- package/assets/{tslib.es6-01357a01.js → tslib.es6-82b9ba96.js} +2 -2
- package/assets/{w3m-modal-f845d089.js → w3m-modal-26eff9d9.js} +1 -1
- package/index.html +4 -4
- package/package.json +3 -3
- package/assets/UserAvatar-9036979f.js +0 -1
- package/assets/core-85d4a2c0.js +0 -253
- package/assets/fortmatic-e88a6ce4.js +0 -13
- package/assets/index-19828012.js +0 -46
- package/assets/index-91cd95cb.js +0 -122
- package/assets/index-f10062b6.js +0 -39
- package/assets/native-847e235b.js +0 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import{h as Cf,g as u_}from"./index-2ef9f1d1.js";var Yu={},_n={},vn={},qf;function d_(){return qf||(qf=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.version=void 0,vn.version="1.2.3"),vn}var Mf;function an(){if(Mf)return _n;Mf=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.BaseError=void 0;const e=d_();class r extends Error{constructor(t,i={}){var c;const s=i.cause instanceof r?i.cause.details:(c=i.cause)!=null&&c.message?i.cause.message:i.details,o=i.cause instanceof r&&i.cause.docsPath||i.docsPath,a=[t||"An error occurred.","",...i.metaMessages?[...i.metaMessages,""]:[],...o?[`Docs: https://abitype.dev${o}`]:[],...s?[`Details: ${s}`]:[],`Version: abitype@${e.version}`].join(`
|
|
2
|
+
`);super(a),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),i.cause&&(this.cause=i.cause),this.details=s,this.docsPath=o,this.metaMessages=i.metaMessages,this.shortMessage=t}}return _n.BaseError=r,_n}var Do={},Hf;function f_(){if(Hf)return Do;Hf=1,Object.defineProperty(Do,"__esModule",{value:!0}),Do.narrow=e;function e(r){return r}return Do}var Go={},Vo={},Wo={},Ko={},Tt={},Ff;function nu(){if(Ff)return Tt;Ff=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.isTupleRegex=Tt.integerRegex=Tt.bytesRegex=void 0,Tt.execTyped=e;function e(r,n){const t=r.exec(n);return t==null?void 0:t.groups}return Tt.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Tt.integerRegex=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,Tt.isTupleRegex=/^\(.+?\).*?$/,Tt}var kf;function Wh(){if(kf)return Ko;kf=1,Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.formatAbiParameter=n;const e=nu(),r=/^tuple(?<array>(\[(\d*)\])*)$/;function n(t){let i=t.type;if(r.test(t.type)&&"components"in t){i="(";const s=t.components.length;for(let a=0;a<s;a++){const c=t.components[a];i+=n(c),a<s-1&&(i+=", ")}const o=(0,e.execTyped)(r,t.type);return i+=`)${(o==null?void 0:o.array)||""}`,n({...t,type:i})}return"indexed"in t&&t.indexed&&(i=`${i} indexed`),t.name?`${i} ${t.name}`:i}return Ko}var Nf;function Kh(){if(Nf)return Wo;Nf=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.formatAbiParameters=r;const e=Wh();function r(n){let t="";const i=n.length;for(let s=0;s<i;s++){const o=n[s];t+=(0,e.formatAbiParameter)(o),s!==i-1&&(t+=", ")}return t}return Wo}var $f;function Zh(){if($f)return Vo;$f=1,Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.formatAbiItem=r;const e=Kh();function r(n){var t;return n.type==="function"?`function ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})${n.stateMutability&&n.stateMutability!=="nonpayable"?` ${n.stateMutability}`:""}${(t=n.outputs)!=null&&t.length?` returns (${(0,e.formatAbiParameters)(n.outputs)})`:""}`:n.type==="event"?`event ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})`:n.type==="error"?`error ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})`:n.type==="constructor"?`constructor(${(0,e.formatAbiParameters)(n.inputs)})${n.stateMutability==="payable"?" payable":""}`:n.type==="fallback"?`fallback() external${n.stateMutability==="payable"?" payable":""}`:"receive() external payable"}return Vo}var zf;function l_(){if(zf)return Go;zf=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.formatAbi=r;const e=Zh();function r(n){const t=[],i=n.length;for(let s=0;s<i;s++){const o=n[s],a=(0,e.formatAbiItem)(o);t.push(a)}return t}return Go}var Zo={},Se={},Uf;function sn(){if(Uf)return Se;Uf=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.functionModifiers=Se.eventModifiers=Se.modifiers=void 0,Se.isErrorSignature=n,Se.execErrorSignature=t,Se.isEventSignature=s,Se.execEventSignature=o,Se.isFunctionSignature=c,Se.execFunctionSignature=d,Se.isStructSignature=f,Se.execStructSignature=m,Se.isConstructorSignature=h,Se.execConstructorSignature=b,Se.isFallbackSignature=j,Se.execFallbackSignature=g,Se.isReceiveSignature=u;const e=nu(),r=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function n(E){return r.test(E)}function t(E){return(0,e.execTyped)(r,E)}const i=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function s(E){return i.test(E)}function o(E){return(0,e.execTyped)(i,E)}const a=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function c(E){return a.test(E)}function d(E){return(0,e.execTyped)(a,E)}const l=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function f(E){return l.test(E)}function m(E){return(0,e.execTyped)(l,E)}const v=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function h(E){return v.test(E)}function b(E){return(0,e.execTyped)(v,E)}const _=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function j(E){return _.test(E)}function g(E){return(0,e.execTyped)(_,E)}const P=/^receive\(\) external payable$/;function u(E){return P.test(E)}return Se.modifiers=new Set(["memory","indexed","storage","calldata"]),Se.eventModifiers=new Set(["indexed"]),Se.functionModifiers=new Set(["calldata","memory","storage"]),Se}var Yo={},Rt={},Lf;function ou(){if(Lf)return Rt;Lf=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.UnknownSolidityTypeError=Rt.UnknownTypeError=Rt.InvalidAbiItemError=void 0;const e=an();class r extends e.BaseError{constructor({signature:s}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(s,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}Rt.InvalidAbiItemError=r;class n extends e.BaseError{constructor({type:s}){super("Unknown type.",{metaMessages:[`Type "${s}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}Rt.UnknownTypeError=n;class t extends e.BaseError{constructor({type:s}){super("Unknown type.",{metaMessages:[`Type "${s}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}return Rt.UnknownSolidityTypeError=t,Rt}var Fe={},Df;function lo(){if(Df)return Fe;Df=1,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.InvalidAbiTypeParameterError=Fe.InvalidFunctionModifierError=Fe.InvalidModifierError=Fe.SolidityProtectedKeywordError=Fe.InvalidParameterError=Fe.InvalidAbiParametersError=Fe.InvalidAbiParameterError=void 0;const e=an();class r extends e.BaseError{constructor({param:d}){super("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(d,null,2)})`,docsPath:"/api/human#parseabiparameter-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParameterError"})}}Fe.InvalidAbiParameterError=r;class n extends e.BaseError{constructor({params:d}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(d,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}Fe.InvalidAbiParametersError=n;class t extends e.BaseError{constructor({param:d}){super("Invalid ABI parameter.",{details:d}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}Fe.InvalidParameterError=t;class i extends e.BaseError{constructor({param:d,name:l}){super("Invalid ABI parameter.",{details:d,metaMessages:[`"${l}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}Fe.SolidityProtectedKeywordError=i;class s extends e.BaseError{constructor({param:d,type:l,modifier:f}){super("Invalid ABI parameter.",{details:d,metaMessages:[`Modifier "${f}" not allowed${l?` in "${l}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}Fe.InvalidModifierError=s;class o extends e.BaseError{constructor({param:d,type:l,modifier:f}){super("Invalid ABI parameter.",{details:d,metaMessages:[`Modifier "${f}" not allowed${l?` in "${l}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${f}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}Fe.InvalidFunctionModifierError=o;class a extends e.BaseError{constructor({abiParameter:d}){super("Invalid ABI parameter.",{details:JSON.stringify(d,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}return Fe.InvalidAbiTypeParameterError=a,Fe}var Ot={},Gf;function wd(){if(Gf)return Ot;Gf=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.InvalidStructSignatureError=Ot.UnknownSignatureError=Ot.InvalidSignatureError=void 0;const e=an();class r extends e.BaseError{constructor({signature:s,type:o}){super(`Invalid ${o} signature.`,{details:s}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}Ot.InvalidSignatureError=r;class n extends e.BaseError{constructor({signature:s}){super("Unknown signature.",{details:s}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}Ot.UnknownSignatureError=n;class t extends e.BaseError{constructor({signature:s}){super("Invalid struct signature.",{details:s,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}return Ot.InvalidStructSignatureError=t,Ot}var En={},Vf;function Yh(){if(Vf)return En;Vf=1,Object.defineProperty(En,"__esModule",{value:!0}),En.CircularReferenceError=void 0;const e=an();class r extends e.BaseError{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}return En.CircularReferenceError=r,En}var Ke={},jn={},Wf;function Jh(){if(Wf)return jn;Wf=1,Object.defineProperty(jn,"__esModule",{value:!0}),jn.InvalidParenthesisError=void 0;const e=an();class r extends e.BaseError{constructor({current:t,depth:i}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${i>0?"opening":"closing"} parentheses.`],details:`Depth "${i}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}return jn.InvalidParenthesisError=r,jn}var Nr={},Kf;function b_(){if(Kf)return Nr;Kf=1,Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.parameterCache=void 0,Nr.getParameterCacheKey=e;function e(r,n,t){let i="";if(t)for(const s of Object.entries(t)){if(!s)continue;let o="";for(const a of s[1])o+=`[${a.type}${a.name?`:${a.name}`:""}]`;i+=`(${s[0]}{${o}})`}return n?`${n}:${r}${i}`:`${r}${i}`}return Nr.parameterCache=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]),Nr}var Zf;function on(){if(Zf)return Ke;Zf=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.parseSignature=a,Ke.parseFunctionSignature=c,Ke.parseEventSignature=d,Ke.parseErrorSignature=l,Ke.parseConstructorSignature=f,Ke.parseFallbackSignature=m,Ke.parseAbiParameter=_,Ke.splitParameters=j,Ke.isSolidityType=g,Ke.isSolidityKeyword=u,Ke.isValidDataLocation=E;const e=nu(),r=ou(),n=lo(),t=wd(),i=Jh(),s=b_(),o=sn();function a(p,y={}){if((0,o.isFunctionSignature)(p))return c(p,y);if((0,o.isEventSignature)(p))return d(p,y);if((0,o.isErrorSignature)(p))return l(p,y);if((0,o.isConstructorSignature)(p))return f(p,y);if((0,o.isFallbackSignature)(p))return m(p);if((0,o.isReceiveSignature)(p))return{type:"receive",stateMutability:"payable"};throw new t.UnknownSignatureError({signature:p})}function c(p,y={}){const A=(0,o.execFunctionSignature)(p);if(!A)throw new t.InvalidSignatureError({signature:p,type:"function"});const w=j(A.parameters),T=[],O=w.length;for(let S=0;S<O;S++)T.push(_(w[S],{modifiers:o.functionModifiers,structs:y,type:"function"}));const B=[];if(A.returns){const S=j(A.returns),x=S.length;for(let k=0;k<x;k++)B.push(_(S[k],{modifiers:o.functionModifiers,structs:y,type:"function"}))}return{name:A.name,type:"function",stateMutability:A.stateMutability??"nonpayable",inputs:T,outputs:B}}function d(p,y={}){const A=(0,o.execEventSignature)(p);if(!A)throw new t.InvalidSignatureError({signature:p,type:"event"});const w=j(A.parameters),T=[],O=w.length;for(let B=0;B<O;B++)T.push(_(w[B],{modifiers:o.eventModifiers,structs:y,type:"event"}));return{name:A.name,type:"event",inputs:T}}function l(p,y={}){const A=(0,o.execErrorSignature)(p);if(!A)throw new t.InvalidSignatureError({signature:p,type:"error"});const w=j(A.parameters),T=[],O=w.length;for(let B=0;B<O;B++)T.push(_(w[B],{structs:y,type:"error"}));return{name:A.name,type:"error",inputs:T}}function f(p,y={}){const A=(0,o.execConstructorSignature)(p);if(!A)throw new t.InvalidSignatureError({signature:p,type:"constructor"});const w=j(A.parameters),T=[],O=w.length;for(let B=0;B<O;B++)T.push(_(w[B],{structs:y,type:"constructor"}));return{type:"constructor",stateMutability:A.stateMutability??"nonpayable",inputs:T}}function m(p){const y=(0,o.execFallbackSignature)(p);if(!y)throw new t.InvalidSignatureError({signature:p,type:"fallback"});return{type:"fallback",stateMutability:y.stateMutability??"nonpayable"}}const v=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,h=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,b=/^u?int$/;function _(p,y){var I,F;const A=(0,s.getParameterCacheKey)(p,y==null?void 0:y.type,y==null?void 0:y.structs);if(s.parameterCache.has(A))return s.parameterCache.get(A);const w=e.isTupleRegex.test(p),T=(0,e.execTyped)(w?h:v,p);if(!T)throw new n.InvalidParameterError({param:p});if(T.name&&u(T.name))throw new n.SolidityProtectedKeywordError({param:p,name:T.name});const O=T.name?{name:T.name}:{},B=T.modifier==="indexed"?{indexed:!0}:{},S=(y==null?void 0:y.structs)??{};let x,k={};if(w){x="tuple";const R=j(T.type),q=[],M=R.length;for(let H=0;H<M;H++)q.push(_(R[H],{structs:S}));k={components:q}}else if(T.type in S)x="tuple",k={components:S[T.type]};else if(b.test(T.type))x=`${T.type}256`;else if(T.type==="address payable")x="address";else if(x=T.type,(y==null?void 0:y.type)!=="struct"&&!g(x))throw new r.UnknownSolidityTypeError({type:x});if(T.modifier){if(!((F=(I=y==null?void 0:y.modifiers)==null?void 0:I.has)!=null&&F.call(I,T.modifier)))throw new n.InvalidModifierError({param:p,type:y==null?void 0:y.type,modifier:T.modifier});if(o.functionModifiers.has(T.modifier)&&!E(x,!!T.array))throw new n.InvalidFunctionModifierError({param:p,type:y==null?void 0:y.type,modifier:T.modifier})}const C={type:`${x}${T.array??""}`,...O,...B,...k};return s.parameterCache.set(A,C),C}function j(p,y=[],A="",w=0){const T=p.trim().length;for(let O=0;O<T;O++){const B=p[O],S=p.slice(O+1);switch(B){case",":return w===0?j(S,[...y,A.trim()]):j(S,y,`${A}${B}`,w);case"(":return j(S,y,`${A}${B}`,w+1);case")":return j(S,y,`${A}${B}`,w-1);default:return j(S,y,`${A}${B}`,w)}}if(A==="")return y;if(w!==0)throw new i.InvalidParenthesisError({current:A,depth:w});return y.push(A.trim()),y}function g(p){return p==="address"||p==="bool"||p==="function"||p==="string"||e.bytesRegex.test(p)||e.integerRegex.test(p)}const P=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function u(p){return p==="address"||p==="bool"||p==="function"||p==="string"||p==="tuple"||e.bytesRegex.test(p)||e.integerRegex.test(p)||P.test(p)}function E(p,y){return y||p==="bytes"||p==="string"||p==="tuple"}return Ke}var Yf;function iu(){if(Yf)return Yo;Yf=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.parseStructs=a;const e=nu(),r=ou(),n=lo(),t=wd(),i=Yh(),s=sn(),o=on();function a(l){const f={},m=l.length;for(let _=0;_<m;_++){const j=l[_];if(!(0,s.isStructSignature)(j))continue;const g=(0,s.execStructSignature)(j);if(!g)throw new t.InvalidSignatureError({signature:j,type:"struct"});const P=g.properties.split(";"),u=[],E=P.length;for(let p=0;p<E;p++){const A=P[p].trim();if(!A)continue;const w=(0,o.parseAbiParameter)(A,{type:"struct"});u.push(w)}if(!u.length)throw new t.InvalidStructSignatureError({signature:j});f[g.name]=u}const v={},h=Object.entries(f),b=h.length;for(let _=0;_<b;_++){const[j,g]=h[_];v[j]=d(g,f)}return v}const c=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function d(l=[],f={},m=new Set){const v=[],h=l.length;for(let b=0;b<h;b++){const _=l[b];if(e.isTupleRegex.test(_.type))v.push(_);else{const g=(0,e.execTyped)(c,_.type);if(!(g!=null&&g.type))throw new n.InvalidAbiTypeParameterError({abiParameter:_});const{array:P,type:u}=g;if(u in f){if(m.has(u))throw new i.CircularReferenceError({type:u});v.push({..._,type:`tuple${P??""}`,components:d(f[u],f,new Set([...m,u]))})}else if((0,o.isSolidityType)(u))v.push(_);else throw new r.UnknownTypeError({type:u})}}return v}return Yo}var Jf;function m_(){if(Jf)return Zo;Jf=1,Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.parseAbi=t;const e=sn(),r=iu(),n=on();function t(i){const s=(0,r.parseStructs)(i),o=[],a=i.length;for(let c=0;c<a;c++){const d=i[c];(0,e.isStructSignature)(d)||o.push((0,n.parseSignature)(d,s))}return o}return Zo}var Jo={},Xf;function y_(){if(Xf)return Jo;Xf=1,Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.parseAbiItem=i;const e=ou(),r=sn(),n=iu(),t=on();function i(s){let o;if(typeof s=="string")o=(0,t.parseSignature)(s);else{const a=(0,n.parseStructs)(s),c=s.length;for(let d=0;d<c;d++){const l=s[d];if(!(0,r.isStructSignature)(l)){o=(0,t.parseSignature)(l,a);break}}}if(!o)throw new e.InvalidAbiItemError({signature:s});return o}return Jo}var Xo={},Qf;function h_(){if(Qf)return Xo;Qf=1,Object.defineProperty(Xo,"__esModule",{value:!0}),Xo.parseAbiParameter=i;const e=lo(),r=sn(),n=iu(),t=on();function i(s){let o;if(typeof s=="string")o=(0,t.parseAbiParameter)(s,{modifiers:r.modifiers});else{const a=(0,n.parseStructs)(s),c=s.length;for(let d=0;d<c;d++){const l=s[d];if(!(0,r.isStructSignature)(l)){o=(0,t.parseAbiParameter)(l,{modifiers:r.modifiers,structs:a});break}}}if(!o)throw new e.InvalidAbiParameterError({param:s});return o}return Xo}var Qo={},e0;function p_(){if(e0)return Qo;e0=1,Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.parseAbiParameters=s;const e=lo(),r=sn(),n=iu(),t=on(),i=on();function s(o){const a=[];if(typeof o=="string"){const c=(0,t.splitParameters)(o),d=c.length;for(let l=0;l<d;l++)a.push((0,i.parseAbiParameter)(c[l],{modifiers:r.modifiers}))}else{const c=(0,n.parseStructs)(o),d=o.length;for(let l=0;l<d;l++){const f=o[l];if((0,r.isStructSignature)(f))continue;const m=(0,t.splitParameters)(f),v=m.length;for(let h=0;h<v;h++)a.push((0,i.parseAbiParameter)(m[h],{modifiers:r.modifiers,structs:c}))}}if(a.length===0)throw new e.InvalidAbiParametersError({params:o});return a}return Qo}var t0;function tr(){return t0||(t0=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CircularReferenceError=e.InvalidParenthesisError=e.UnknownSignatureError=e.InvalidSignatureError=e.InvalidStructSignatureError=e.InvalidAbiParameterError=e.InvalidAbiParametersError=e.InvalidParameterError=e.SolidityProtectedKeywordError=e.InvalidModifierError=e.InvalidFunctionModifierError=e.InvalidAbiTypeParameterError=e.UnknownSolidityTypeError=e.InvalidAbiItemError=e.UnknownTypeError=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=e.formatAbiParameters=e.formatAbiParameter=e.formatAbiItem=e.formatAbi=e.narrow=e.BaseError=void 0;var r=an();Object.defineProperty(e,"BaseError",{enumerable:!0,get:function(){return r.BaseError}});var n=f_();Object.defineProperty(e,"narrow",{enumerable:!0,get:function(){return n.narrow}});var t=l_();Object.defineProperty(e,"formatAbi",{enumerable:!0,get:function(){return t.formatAbi}});var i=Zh();Object.defineProperty(e,"formatAbiItem",{enumerable:!0,get:function(){return i.formatAbiItem}});var s=Wh();Object.defineProperty(e,"formatAbiParameter",{enumerable:!0,get:function(){return s.formatAbiParameter}});var o=Kh();Object.defineProperty(e,"formatAbiParameters",{enumerable:!0,get:function(){return o.formatAbiParameters}});var a=m_();Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return a.parseAbi}});var c=y_();Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return c.parseAbiItem}});var d=h_();Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return d.parseAbiParameter}});var l=p_();Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return l.parseAbiParameters}});var f=ou();Object.defineProperty(e,"UnknownTypeError",{enumerable:!0,get:function(){return f.UnknownTypeError}}),Object.defineProperty(e,"InvalidAbiItemError",{enumerable:!0,get:function(){return f.InvalidAbiItemError}}),Object.defineProperty(e,"UnknownSolidityTypeError",{enumerable:!0,get:function(){return f.UnknownSolidityTypeError}});var m=lo();Object.defineProperty(e,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return m.InvalidAbiTypeParameterError}}),Object.defineProperty(e,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return m.InvalidFunctionModifierError}}),Object.defineProperty(e,"InvalidModifierError",{enumerable:!0,get:function(){return m.InvalidModifierError}}),Object.defineProperty(e,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return m.SolidityProtectedKeywordError}}),Object.defineProperty(e,"InvalidParameterError",{enumerable:!0,get:function(){return m.InvalidParameterError}}),Object.defineProperty(e,"InvalidAbiParametersError",{enumerable:!0,get:function(){return m.InvalidAbiParametersError}}),Object.defineProperty(e,"InvalidAbiParameterError",{enumerable:!0,get:function(){return m.InvalidAbiParameterError}});var v=wd();Object.defineProperty(e,"InvalidStructSignatureError",{enumerable:!0,get:function(){return v.InvalidStructSignatureError}}),Object.defineProperty(e,"InvalidSignatureError",{enumerable:!0,get:function(){return v.InvalidSignatureError}}),Object.defineProperty(e,"UnknownSignatureError",{enumerable:!0,get:function(){return v.UnknownSignatureError}});var h=Jh();Object.defineProperty(e,"InvalidParenthesisError",{enumerable:!0,get:function(){return h.InvalidParenthesisError}});var b=Yh();Object.defineProperty(e,"CircularReferenceError",{enumerable:!0,get:function(){return b.CircularReferenceError}})}(Yu)),Yu}var wn={},r0;function Xh(){if(r0)return wn;r0=1,Object.defineProperty(wn,"__esModule",{value:!0}),wn.defineChain=e,wn.extendSchema=r;function e(n){const t={formatters:void 0,fees:void 0,serializers:void 0,...n};function i(s){return o=>{const a=typeof o=="function"?o(s):o,c={...s,...a};return Object.assign(c,{extend:i(c)})}}return Object.assign(t,{extend:i(t)})}function r(){return{}}return wn}var xt={},tt={},$r={},Pn={},n0;function g_(){return n0||(n0=1,Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.version=void 0,Pn.version="2.43.3"),Pn}var o0;function ue(){if(o0)return $r;o0=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.BaseError=void 0,$r.setErrorConfig=n;const e=g_();let r={getDocsUrl:({docsBaseUrl:s,docsPath:o="",docsSlug:a})=>o?`${s??"https://viem.sh"}${o}${a?`#${a}`:""}`:void 0,version:`viem@${e.version}`};function n(s){r=s}class t extends Error{constructor(o,a={}){var m;const c=(()=>{var v;return a.cause instanceof t?a.cause.details:(v=a.cause)!=null&&v.message?a.cause.message:a.details})(),d=(()=>a.cause instanceof t&&a.cause.docsPath||a.docsPath)(),l=(m=r.getDocsUrl)==null?void 0:m.call(r,{...a,docsPath:d}),f=[o||"An error occurred.","",...a.metaMessages?[...a.metaMessages,""]:[],...l?[`Docs: ${l}`]:[],...c?[`Details: ${c}`]:[],...r.version?[`Version: ${r.version}`]:[]].join(`
|
|
3
|
+
`);super(f,a.cause?{cause:a.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=c,this.docsPath=d,this.metaMessages=a.metaMessages,this.name=a.name??this.name,this.shortMessage=o,this.version=e.version}walk(o){return i(this,o)}}$r.BaseError=t;function i(s,o){return o!=null&&o(s)?s:s&&typeof s=="object"&&"cause"in s&&s.cause!==void 0?i(s.cause,o):o?null:s}return $r}var i0;function cn(){if(i0)return tt;i0=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.SizeOverflowError=tt.InvalidHexValueError=tt.InvalidHexBooleanError=tt.InvalidBytesBooleanError=tt.IntegerOutOfRangeError=void 0;const e=ue();class r extends e.BaseError{constructor({max:a,min:c,signed:d,size:l,value:f}){super(`Number "${f}" is not in safe ${l?`${l*8}-bit ${d?"signed":"unsigned"} `:""}integer range ${a?`(${c} to ${a})`:`(above ${c})`}`,{name:"IntegerOutOfRangeError"})}}tt.IntegerOutOfRangeError=r;class n extends e.BaseError{constructor(a){super(`Bytes value "${a}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}tt.InvalidBytesBooleanError=n;class t extends e.BaseError{constructor(a){super(`Hex value "${a}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}tt.InvalidHexBooleanError=t;class i extends e.BaseError{constructor(a){super(`Hex value "${a}" is an odd length (${a.length}). It must be an even length.`,{name:"InvalidHexValueError"})}}tt.InvalidHexValueError=i;class s extends e.BaseError{constructor({givenSize:a,maxSize:c}){super(`Size cannot exceed ${c} bytes. Given size: ${a} bytes.`,{name:"SizeOverflowError"})}}return tt.SizeOverflowError=s,tt}var ei={},ti={},a0;function Ge(){if(a0)return ti;a0=1,Object.defineProperty(ti,"__esModule",{value:!0}),ti.isHex=e;function e(r,{strict:n=!0}={}){return!r||typeof r!="string"?!1:n?/^0x[0-9a-fA-F]*$/.test(r):r.startsWith("0x")}return ti}var s0;function Ye(){if(s0)return ei;s0=1,Object.defineProperty(ei,"__esModule",{value:!0}),ei.size=r;const e=Ge();function r(n){return(0,e.isHex)(n,{strict:!1})?Math.ceil((n.length-2)/2):n.length}return ei}var ri={},c0;function Ut(){if(c0)return ri;c0=1,Object.defineProperty(ri,"__esModule",{value:!0}),ri.trim=e;function e(r,{dir:n="left"}={}){let t=typeof r=="string"?r.replace("0x",""):r,i=0;for(let s=0;s<t.length-1&&t[n==="left"?s:t.length-s-1].toString()==="0";s++)i++;return t=n==="left"?t.slice(i):t.slice(0,t.length-i),typeof r=="string"?(t.length===1&&n==="right"&&(t=`${t}0`),`0x${t.length%2===1?`0${t}`:t}`):t}return ri}var Kt={},zr={},Ct={},u0;function au(){if(u0)return Ct;u0=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.InvalidBytesLengthError=Ct.SizeExceedsPaddingSizeError=Ct.SliceOffsetOutOfBoundsError=void 0;const e=ue();class r extends e.BaseError{constructor({offset:s,position:o,size:a}){super(`Slice ${o==="start"?"starting":"ending"} at offset "${s}" is out-of-bounds (size: ${a}).`,{name:"SliceOffsetOutOfBoundsError"})}}Ct.SliceOffsetOutOfBoundsError=r;class n extends e.BaseError{constructor({size:s,targetSize:o,type:a}){super(`${a.charAt(0).toUpperCase()}${a.slice(1).toLowerCase()} size (${s}) exceeds padding size (${o}).`,{name:"SizeExceedsPaddingSizeError"})}}Ct.SizeExceedsPaddingSizeError=n;class t extends e.BaseError{constructor({size:s,targetSize:o,type:a}){super(`${a.charAt(0).toUpperCase()}${a.slice(1).toLowerCase()} is expected to be ${o} ${a} long, but is ${s} ${a} long.`,{name:"InvalidBytesLengthError"})}}return Ct.InvalidBytesLengthError=t,Ct}var d0;function rr(){if(d0)return zr;d0=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.pad=r,zr.padHex=n,zr.padBytes=t;const e=au();function r(i,{dir:s,size:o=32}={}){return typeof i=="string"?n(i,{dir:s,size:o}):t(i,{dir:s,size:o})}function n(i,{dir:s,size:o=32}={}){if(o===null)return i;const a=i.replace("0x","");if(a.length>o*2)throw new e.SizeExceedsPaddingSizeError({size:Math.ceil(a.length/2),targetSize:o,type:"hex"});return`0x${a[s==="right"?"padEnd":"padStart"](o*2,"0")}`}function t(i,{dir:s,size:o=32}={}){if(o===null)return i;if(i.length>o)throw new e.SizeExceedsPaddingSizeError({size:i.length,targetSize:o,type:"bytes"});const a=new Uint8Array(o);for(let c=0;c<o;c++){const d=s==="right";a[d?c:o-c-1]=i[d?c:i.length-c-1]}return a}return zr}var Zt={},f0;function te(){if(f0)return Zt;f0=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.toHex=i,Zt.boolToHex=s,Zt.bytesToHex=o,Zt.numberToHex=a,Zt.stringToHex=d;const e=cn(),r=rr(),n=Be(),t=Array.from({length:256},(l,f)=>f.toString(16).padStart(2,"0"));function i(l,f={}){return typeof l=="number"||typeof l=="bigint"?a(l,f):typeof l=="string"?d(l,f):typeof l=="boolean"?s(l,f):o(l,f)}function s(l,f={}){const m=`0x${Number(l)}`;return typeof f.size=="number"?((0,n.assertSize)(m,{size:f.size}),(0,r.pad)(m,{size:f.size})):m}function o(l,f={}){let m="";for(let h=0;h<l.length;h++)m+=t[l[h]];const v=`0x${m}`;return typeof f.size=="number"?((0,n.assertSize)(v,{size:f.size}),(0,r.pad)(v,{dir:"right",size:f.size})):v}function a(l,f={}){const{signed:m,size:v}=f,h=BigInt(l);let b;v?m?b=(1n<<BigInt(v)*8n-1n)-1n:b=2n**(BigInt(v)*8n)-1n:typeof l=="number"&&(b=BigInt(Number.MAX_SAFE_INTEGER));const _=typeof b=="bigint"&&m?-b-1n:0;if(b&&h>b||h<_){const g=typeof l=="bigint"?"n":"";throw new e.IntegerOutOfRangeError({max:b?`${b}${g}`:void 0,min:`${_}${g}`,signed:m,size:v,value:`${l}${g}`})}const j=`0x${(m&&h<0?(1n<<BigInt(v*8))+BigInt(h):h).toString(16)}`;return v?(0,r.pad)(j,{size:v}):j}const c=new TextEncoder;function d(l,f={}){const m=c.encode(l);return o(m,f)}return Zt}var l0;function _e(){if(l0)return Kt;l0=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.toBytes=o,Kt.boolToBytes=a,Kt.hexToBytes=l,Kt.numberToBytes=f,Kt.stringToBytes=m;const e=ue(),r=Ge(),n=rr(),t=Be(),i=te(),s=new TextEncoder;function o(v,h={}){return typeof v=="number"||typeof v=="bigint"?f(v,h):typeof v=="boolean"?a(v,h):(0,r.isHex)(v)?l(v,h):m(v,h)}function a(v,h={}){const b=new Uint8Array(1);return b[0]=Number(v),typeof h.size=="number"?((0,t.assertSize)(b,{size:h.size}),(0,n.pad)(b,{size:h.size})):b}const c={zero:48,nine:57,A:65,F:70,a:97,f:102};function d(v){if(v>=c.zero&&v<=c.nine)return v-c.zero;if(v>=c.A&&v<=c.F)return v-(c.A-10);if(v>=c.a&&v<=c.f)return v-(c.a-10)}function l(v,h={}){let b=v;h.size&&((0,t.assertSize)(b,{size:h.size}),b=(0,n.pad)(b,{dir:"right",size:h.size}));let _=b.slice(2);_.length%2&&(_=`0${_}`);const j=_.length/2,g=new Uint8Array(j);for(let P=0,u=0;P<j;P++){const E=d(_.charCodeAt(u++)),p=d(_.charCodeAt(u++));if(E===void 0||p===void 0)throw new e.BaseError(`Invalid byte sequence ("${_[u-2]}${_[u-1]}" in "${_}").`);g[P]=E*16+p}return g}function f(v,h){const b=(0,i.numberToHex)(v,h);return l(b)}function m(v,h={}){const b=s.encode(v);return typeof h.size=="number"?((0,t.assertSize)(b,{size:h.size}),(0,n.pad)(b,{dir:"right",size:h.size})):b}return Kt}var b0;function Be(){if(b0)return xt;b0=1,Object.defineProperty(xt,"__esModule",{value:!0}),xt.assertSize=i,xt.fromHex=s,xt.hexToBigInt=o,xt.hexToBool=a,xt.hexToNumber=c,xt.hexToString=d;const e=cn(),r=Ye(),n=Ut(),t=_e();function i(l,{size:f}){if((0,r.size)(l)>f)throw new e.SizeOverflowError({givenSize:(0,r.size)(l),maxSize:f})}function s(l,f){const m=typeof f=="string"?{to:f}:f,v=m.to;return v==="number"?c(l,m):v==="bigint"?o(l,m):v==="string"?d(l,m):v==="boolean"?a(l,m):(0,t.hexToBytes)(l,m)}function o(l,f={}){const{signed:m}=f;f.size&&i(l,{size:f.size});const v=BigInt(l);if(!m)return v;const h=(l.length-2)/2,b=(1n<<BigInt(h)*8n-1n)-1n;return v<=b?v:v-BigInt(`0x${"f".padStart(h*2,"f")}`)-1n}function a(l,f={}){let m=l;if(f.size&&(i(m,{size:f.size}),m=(0,n.trim)(m)),(0,n.trim)(m)==="0x00")return!1;if((0,n.trim)(m)==="0x01")return!0;throw new e.InvalidHexBooleanError(m)}function c(l,f={}){return Number(o(l,f))}function d(l,f={}){let m=(0,t.hexToBytes)(l);return f.size&&(i(m,{size:f.size}),m=(0,n.trim)(m,{dir:"right"})),new TextDecoder().decode(m)}return xt}var Ur={},ni={},m0;function bo(){if(m0)return ni;m0=1,Object.defineProperty(ni,"__esModule",{value:!0}),ni.defineFormatter=e;function e(r,n){return({exclude:t,format:i})=>({exclude:t,format:(s,o)=>{const a=n(s,o);if(t)for(const c of t)delete a[c];return{...a,...i(s,o)}},type:r})}return ni}var Ju={},y0;function un(){return y0||(y0=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defineTransaction=e.transactionType=void 0,e.formatTransaction=t;const r=Be(),n=bo();e.transactionType={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function t(s,o){const a={...s,blockHash:s.blockHash?s.blockHash:null,blockNumber:s.blockNumber?BigInt(s.blockNumber):null,chainId:s.chainId?(0,r.hexToNumber)(s.chainId):void 0,gas:s.gas?BigInt(s.gas):void 0,gasPrice:s.gasPrice?BigInt(s.gasPrice):void 0,maxFeePerBlobGas:s.maxFeePerBlobGas?BigInt(s.maxFeePerBlobGas):void 0,maxFeePerGas:s.maxFeePerGas?BigInt(s.maxFeePerGas):void 0,maxPriorityFeePerGas:s.maxPriorityFeePerGas?BigInt(s.maxPriorityFeePerGas):void 0,nonce:s.nonce?(0,r.hexToNumber)(s.nonce):void 0,to:s.to?s.to:null,transactionIndex:s.transactionIndex?Number(s.transactionIndex):null,type:s.type?e.transactionType[s.type]:void 0,typeHex:s.type?s.type:void 0,value:s.value?BigInt(s.value):void 0,v:s.v?BigInt(s.v):void 0};return s.authorizationList&&(a.authorizationList=i(s.authorizationList)),a.yParity=(()=>{if(s.yParity)return Number(s.yParity);if(typeof a.v=="bigint"){if(a.v===0n||a.v===27n)return 0;if(a.v===1n||a.v===28n)return 1;if(a.v>=35n)return a.v%2n===0n?1:0}})(),a.type==="legacy"&&(delete a.accessList,delete a.maxFeePerBlobGas,delete a.maxFeePerGas,delete a.maxPriorityFeePerGas,delete a.yParity),a.type==="eip2930"&&(delete a.maxFeePerBlobGas,delete a.maxFeePerGas,delete a.maxPriorityFeePerGas),a.type==="eip1559"&&delete a.maxFeePerBlobGas,a}e.defineTransaction=(0,n.defineFormatter)("transaction",t);function i(s){return s.map(o=>({address:o.address,chainId:Number(o.chainId),nonce:Number(o.nonce),r:o.r,s:o.s,yParity:Number(o.yParity)}))}}(Ju)),Ju}var h0;function su(){if(h0)return Ur;h0=1,Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.defineBlock=void 0,Ur.formatBlock=n;const e=bo(),r=un();function n(t,i){const s=(t.transactions??[]).map(o=>typeof o=="string"?o:(0,r.formatTransaction)(o));return{...t,baseFeePerGas:t.baseFeePerGas?BigInt(t.baseFeePerGas):null,blobGasUsed:t.blobGasUsed?BigInt(t.blobGasUsed):void 0,difficulty:t.difficulty?BigInt(t.difficulty):void 0,excessBlobGas:t.excessBlobGas?BigInt(t.excessBlobGas):void 0,gasLimit:t.gasLimit?BigInt(t.gasLimit):void 0,gasUsed:t.gasUsed?BigInt(t.gasUsed):void 0,hash:t.hash?t.hash:null,logsBloom:t.logsBloom?t.logsBloom:null,nonce:t.nonce?t.nonce:null,number:t.number?BigInt(t.number):null,size:t.size?BigInt(t.size):void 0,timestamp:t.timestamp?BigInt(t.timestamp):void 0,transactions:s,totalDifficulty:t.totalDifficulty?BigInt(t.totalDifficulty):null}}return Ur.defineBlock=(0,e.defineFormatter)("block",n),Ur}var oi={},p0;function Lt(){if(p0)return oi;p0=1,Object.defineProperty(oi,"__esModule",{value:!0}),oi.formatLog=e;function e(r,{args:n,eventName:t}={}){return{...r,blockHash:r.blockHash?r.blockHash:null,blockNumber:r.blockNumber?BigInt(r.blockNumber):null,blockTimestamp:r.blockTimestamp?BigInt(r.blockTimestamp):r.blockTimestamp===null?null:void 0,logIndex:r.logIndex?Number(r.logIndex):null,transactionHash:r.transactionHash?r.transactionHash:null,transactionIndex:r.transactionIndex?Number(r.transactionIndex):null,...t?{args:n,eventName:t}:{}}}return oi}var Xu={},g0;function mo(){return g0||(g0=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defineTransactionReceipt=e.receiptStatuses=void 0,e.formatTransactionReceipt=s;const r=Be(),n=bo(),t=Lt(),i=un();e.receiptStatuses={"0x0":"reverted","0x1":"success"};function s(o,a){const c={...o,blockNumber:o.blockNumber?BigInt(o.blockNumber):null,contractAddress:o.contractAddress?o.contractAddress:null,cumulativeGasUsed:o.cumulativeGasUsed?BigInt(o.cumulativeGasUsed):null,effectiveGasPrice:o.effectiveGasPrice?BigInt(o.effectiveGasPrice):null,gasUsed:o.gasUsed?BigInt(o.gasUsed):null,logs:o.logs?o.logs.map(d=>(0,t.formatLog)(d)):null,to:o.to?o.to:null,transactionIndex:o.transactionIndex?(0,r.hexToNumber)(o.transactionIndex):null,status:o.status?e.receiptStatuses[o.status]:null,type:o.type?i.transactionType[o.type]||o.type:null};return o.blobGasPrice&&(c.blobGasPrice=BigInt(o.blobGasPrice)),o.blobGasUsed&&(c.blobGasUsed=BigInt(o.blobGasUsed)),c}e.defineTransactionReceipt=(0,n.defineFormatter)("transactionReceipt",s)}(Xu)),Xu}var Qu={},_0;function _t(){return _0||(_0=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defineTransactionRequest=e.rpcTransactionType=void 0,e.formatTransactionRequest=t;const r=te(),n=bo();e.rpcTransactionType={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function t(s,o){const a={};return typeof s.authorizationList<"u"&&(a.authorizationList=i(s.authorizationList)),typeof s.accessList<"u"&&(a.accessList=s.accessList),typeof s.blobVersionedHashes<"u"&&(a.blobVersionedHashes=s.blobVersionedHashes),typeof s.blobs<"u"&&(typeof s.blobs[0]!="string"?a.blobs=s.blobs.map(c=>(0,r.bytesToHex)(c)):a.blobs=s.blobs),typeof s.data<"u"&&(a.data=s.data),s.account&&(a.from=s.account.address),typeof s.from<"u"&&(a.from=s.from),typeof s.gas<"u"&&(a.gas=(0,r.numberToHex)(s.gas)),typeof s.gasPrice<"u"&&(a.gasPrice=(0,r.numberToHex)(s.gasPrice)),typeof s.maxFeePerBlobGas<"u"&&(a.maxFeePerBlobGas=(0,r.numberToHex)(s.maxFeePerBlobGas)),typeof s.maxFeePerGas<"u"&&(a.maxFeePerGas=(0,r.numberToHex)(s.maxFeePerGas)),typeof s.maxPriorityFeePerGas<"u"&&(a.maxPriorityFeePerGas=(0,r.numberToHex)(s.maxPriorityFeePerGas)),typeof s.nonce<"u"&&(a.nonce=(0,r.numberToHex)(s.nonce)),typeof s.to<"u"&&(a.to=s.to),typeof s.type<"u"&&(a.type=e.rpcTransactionType[s.type]),typeof s.value<"u"&&(a.value=(0,r.numberToHex)(s.value)),a}e.defineTransactionRequest=(0,n.defineFormatter)("transactionRequest",t);function i(s){return s.map(o=>({address:o.address,r:o.r?(0,r.numberToHex)(BigInt(o.r)):o.r,s:o.s?(0,r.numberToHex)(BigInt(o.s)):o.s,chainId:(0,r.numberToHex)(o.chainId),nonce:(0,r.numberToHex)(o.nonce),...typeof o.yParity<"u"?{yParity:(0,r.numberToHex)(o.yParity)}:{},...typeof o.v<"u"&&typeof o.yParity>"u"?{v:(0,r.numberToHex)(o.v)}:{}}))}}(Qu)),Qu}var D={},v0;function Pd(){return v0||(v0=1,Object.defineProperty(D,"__esModule",{value:!0}),D.minInt144=D.minInt136=D.minInt128=D.minInt120=D.minInt112=D.minInt104=D.minInt96=D.minInt88=D.minInt80=D.minInt72=D.minInt64=D.minInt56=D.minInt48=D.minInt40=D.minInt32=D.minInt24=D.minInt16=D.minInt8=D.maxInt256=D.maxInt248=D.maxInt240=D.maxInt232=D.maxInt224=D.maxInt216=D.maxInt208=D.maxInt200=D.maxInt192=D.maxInt184=D.maxInt176=D.maxInt168=D.maxInt160=D.maxInt152=D.maxInt144=D.maxInt136=D.maxInt128=D.maxInt120=D.maxInt112=D.maxInt104=D.maxInt96=D.maxInt88=D.maxInt80=D.maxInt72=D.maxInt64=D.maxInt56=D.maxInt48=D.maxInt40=D.maxInt32=D.maxInt24=D.maxInt16=D.maxInt8=void 0,D.maxUint256=D.maxUint248=D.maxUint240=D.maxUint232=D.maxUint224=D.maxUint216=D.maxUint208=D.maxUint200=D.maxUint192=D.maxUint184=D.maxUint176=D.maxUint168=D.maxUint160=D.maxUint152=D.maxUint144=D.maxUint136=D.maxUint128=D.maxUint120=D.maxUint112=D.maxUint104=D.maxUint96=D.maxUint88=D.maxUint80=D.maxUint72=D.maxUint64=D.maxUint56=D.maxUint48=D.maxUint40=D.maxUint32=D.maxUint24=D.maxUint16=D.maxUint8=D.minInt256=D.minInt248=D.minInt240=D.minInt232=D.minInt224=D.minInt216=D.minInt208=D.minInt200=D.minInt192=D.minInt184=D.minInt176=D.minInt168=D.minInt160=D.minInt152=void 0,D.maxInt8=2n**(8n-1n)-1n,D.maxInt16=2n**(16n-1n)-1n,D.maxInt24=2n**(24n-1n)-1n,D.maxInt32=2n**(32n-1n)-1n,D.maxInt40=2n**(40n-1n)-1n,D.maxInt48=2n**(48n-1n)-1n,D.maxInt56=2n**(56n-1n)-1n,D.maxInt64=2n**(64n-1n)-1n,D.maxInt72=2n**(72n-1n)-1n,D.maxInt80=2n**(80n-1n)-1n,D.maxInt88=2n**(88n-1n)-1n,D.maxInt96=2n**(96n-1n)-1n,D.maxInt104=2n**(104n-1n)-1n,D.maxInt112=2n**(112n-1n)-1n,D.maxInt120=2n**(120n-1n)-1n,D.maxInt128=2n**(128n-1n)-1n,D.maxInt136=2n**(136n-1n)-1n,D.maxInt144=2n**(144n-1n)-1n,D.maxInt152=2n**(152n-1n)-1n,D.maxInt160=2n**(160n-1n)-1n,D.maxInt168=2n**(168n-1n)-1n,D.maxInt176=2n**(176n-1n)-1n,D.maxInt184=2n**(184n-1n)-1n,D.maxInt192=2n**(192n-1n)-1n,D.maxInt200=2n**(200n-1n)-1n,D.maxInt208=2n**(208n-1n)-1n,D.maxInt216=2n**(216n-1n)-1n,D.maxInt224=2n**(224n-1n)-1n,D.maxInt232=2n**(232n-1n)-1n,D.maxInt240=2n**(240n-1n)-1n,D.maxInt248=2n**(248n-1n)-1n,D.maxInt256=2n**(256n-1n)-1n,D.minInt8=-(2n**(8n-1n)),D.minInt16=-(2n**(16n-1n)),D.minInt24=-(2n**(24n-1n)),D.minInt32=-(2n**(32n-1n)),D.minInt40=-(2n**(40n-1n)),D.minInt48=-(2n**(48n-1n)),D.minInt56=-(2n**(56n-1n)),D.minInt64=-(2n**(64n-1n)),D.minInt72=-(2n**(72n-1n)),D.minInt80=-(2n**(80n-1n)),D.minInt88=-(2n**(88n-1n)),D.minInt96=-(2n**(96n-1n)),D.minInt104=-(2n**(104n-1n)),D.minInt112=-(2n**(112n-1n)),D.minInt120=-(2n**(120n-1n)),D.minInt128=-(2n**(128n-1n)),D.minInt136=-(2n**(136n-1n)),D.minInt144=-(2n**(144n-1n)),D.minInt152=-(2n**(152n-1n)),D.minInt160=-(2n**(160n-1n)),D.minInt168=-(2n**(168n-1n)),D.minInt176=-(2n**(176n-1n)),D.minInt184=-(2n**(184n-1n)),D.minInt192=-(2n**(192n-1n)),D.minInt200=-(2n**(200n-1n)),D.minInt208=-(2n**(208n-1n)),D.minInt216=-(2n**(216n-1n)),D.minInt224=-(2n**(224n-1n)),D.minInt232=-(2n**(232n-1n)),D.minInt240=-(2n**(240n-1n)),D.minInt248=-(2n**(248n-1n)),D.minInt256=-(2n**(256n-1n)),D.maxUint8=2n**8n-1n,D.maxUint16=2n**16n-1n,D.maxUint24=2n**24n-1n,D.maxUint32=2n**32n-1n,D.maxUint40=2n**40n-1n,D.maxUint48=2n**48n-1n,D.maxUint56=2n**56n-1n,D.maxUint64=2n**64n-1n,D.maxUint72=2n**72n-1n,D.maxUint80=2n**80n-1n,D.maxUint88=2n**88n-1n,D.maxUint96=2n**96n-1n,D.maxUint104=2n**104n-1n,D.maxUint112=2n**112n-1n,D.maxUint120=2n**120n-1n,D.maxUint128=2n**128n-1n,D.maxUint136=2n**136n-1n,D.maxUint144=2n**144n-1n,D.maxUint152=2n**152n-1n,D.maxUint160=2n**160n-1n,D.maxUint168=2n**168n-1n,D.maxUint176=2n**176n-1n,D.maxUint184=2n**184n-1n,D.maxUint192=2n**192n-1n,D.maxUint200=2n**200n-1n,D.maxUint208=2n**208n-1n,D.maxUint216=2n**216n-1n,D.maxUint224=2n**224n-1n,D.maxUint232=2n**232n-1n,D.maxUint240=2n**240n-1n,D.maxUint248=2n**248n-1n,D.maxUint256=2n**256n-1n),D}var Lr={},E0;function Me(){if(E0)return Lr;E0=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.concat=e,Lr.concatBytes=r,Lr.concatHex=n;function e(t){return typeof t[0]=="string"?n(t):r(t)}function r(t){let i=0;for(const a of t)i+=a.length;const s=new Uint8Array(i);let o=0;for(const a of t)s.set(a,o),o+=a.length;return s}function n(t){return`0x${t.reduce((i,s)=>i+s.replace("0x",""),"")}`}return Lr}var Dr={},ii={},qt={},j0;function Qh(){if(j0)return qt;j0=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.RecursiveReadLimitExceededError=qt.PositionOutOfBoundsError=qt.NegativeOffsetError=void 0;const e=ue();class r extends e.BaseError{constructor({offset:s}){super(`Offset \`${s}\` cannot be negative.`,{name:"NegativeOffsetError"})}}qt.NegativeOffsetError=r;class n extends e.BaseError{constructor({length:s,position:o}){super(`Position \`${o}\` is out of bounds (\`0 < position < ${s}\`).`,{name:"PositionOutOfBoundsError"})}}qt.PositionOutOfBoundsError=n;class t extends e.BaseError{constructor({count:s,limit:o}){super(`Recursive read limit of \`${o}\` exceeded (recursive read count: \`${s}\`).`,{name:"RecursiveReadLimitExceededError"})}}return qt.RecursiveReadLimitExceededError=t,qt}var w0;function yo(){if(w0)return ii;w0=1,Object.defineProperty(ii,"__esModule",{value:!0}),ii.createCursor=n;const e=Qh(),r={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new e.RecursiveReadLimitExceededError({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new e.PositionOutOfBoundsError({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new e.NegativeOffsetError({offset:t});const i=this.position-t;this.assertPosition(i),this.position=i},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new e.NegativeOffsetError({offset:t});const i=this.position+t;this.assertPosition(i),this.position=i},inspectByte(t){const i=t??this.position;return this.assertPosition(i),this.bytes[i]},inspectBytes(t,i){const s=i??this.position;return this.assertPosition(s+t-1),this.bytes.subarray(s,s+t)},inspectUint8(t){const i=t??this.position;return this.assertPosition(i),this.bytes[i]},inspectUint16(t){const i=t??this.position;return this.assertPosition(i+1),this.dataView.getUint16(i)},inspectUint24(t){const i=t??this.position;return this.assertPosition(i+2),(this.dataView.getUint16(i)<<8)+this.dataView.getUint8(i+2)},inspectUint32(t){const i=t??this.position;return this.assertPosition(i+3),this.dataView.getUint32(i)},pushByte(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushBytes(t){this.assertPosition(this.position+t.length-1),this.bytes.set(t,this.position),this.position+=t.length},pushUint8(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushUint16(t){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,t),this.position+=2},pushUint24(t){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,t>>8),this.dataView.setUint8(this.position+2,t&255),this.position+=3},pushUint32(t){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,t),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const t=this.inspectByte();return this.position++,t},readBytes(t,i){this.assertReadLimit(),this._touch();const s=this.inspectBytes(t);return this.position+=i??t,s},readUint8(){this.assertReadLimit(),this._touch();const t=this.inspectUint8();return this.position+=1,t},readUint16(){this.assertReadLimit(),this._touch();const t=this.inspectUint16();return this.position+=2,t},readUint24(){this.assertReadLimit(),this._touch();const t=this.inspectUint24();return this.position+=3,t},readUint32(){this.assertReadLimit(),this._touch();const t=this.inspectUint32();return this.position+=4,t},get remaining(){return this.bytes.length-this.position},setPosition(t){const i=this.position;return this.assertPosition(t),this.position=t,()=>this.position=i},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}};function n(t,{recursiveReadLimit:i=8192}={}){const s=Object.create(r);return s.bytes=t,s.dataView=new DataView(t.buffer??t,t.byteOffset,t.byteLength),s.positionReadCount=new Map,s.recursiveReadLimit=i,s}return ii}var P0;function ho(){if(P0)return Dr;P0=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.toRlp=i,Dr.bytesToRlp=s,Dr.hexToRlp=o;const e=ue(),r=yo(),n=_e(),t=te();function i(f,m="hex"){const v=a(f),h=(0,r.createCursor)(new Uint8Array(v.length));return v.encode(h),m==="hex"?(0,t.bytesToHex)(h.bytes):h.bytes}function s(f,m="bytes"){return i(f,m)}function o(f,m="hex"){return i(f,m)}function a(f){return Array.isArray(f)?c(f.map(m=>a(m))):d(f)}function c(f){const m=f.reduce((b,_)=>b+_.length,0),v=l(m);return{length:(()=>m<=55?1+m:1+v+m)(),encode(b){m<=55?b.pushByte(192+m):(b.pushByte(192+55+v),v===1?b.pushUint8(m):v===2?b.pushUint16(m):v===3?b.pushUint24(m):b.pushUint32(m));for(const{encode:_}of f)_(b)}}}function d(f){const m=typeof f=="string"?(0,n.hexToBytes)(f):f,v=l(m.length);return{length:(()=>m.length===1&&m[0]<128?1:m.length<=55?1+m.length:1+v+m.length)(),encode(b){m.length===1&&m[0]<128?b.pushBytes(m):m.length<=55?(b.pushByte(128+m.length),b.pushBytes(m)):(b.pushByte(128+55+v),v===1?b.pushUint8(m.length):v===2?b.pushUint16(m.length):v===3?b.pushUint24(m.length):b.pushUint32(m.length),b.pushBytes(m))}}}function l(f){if(f<2**8)return 1;if(f<2**16)return 2;if(f<2**24)return 3;if(f<2**32)return 4;throw new e.BaseError("Length is too large.")}return Dr}var An={},ve={},ai={},Mt={},A0;function po(){return A0||(A0=1,Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.weiUnits=Mt.gweiUnits=Mt.etherUnits=void 0,Mt.etherUnits={gwei:9,wei:18},Mt.gweiUnits={ether:-9,wei:9},Mt.weiUnits={ether:-18,gwei:-9}),Mt}var si={},T0;function cu(){if(T0)return si;T0=1,Object.defineProperty(si,"__esModule",{value:!0}),si.formatUnits=e;function e(r,n){let t=r.toString();const i=t.startsWith("-");i&&(t=t.slice(1)),t=t.padStart(n,"0");let[s,o]=[t.slice(0,t.length-n),t.slice(t.length-n)];return o=o.replace(/(0+)$/,""),`${i?"-":""}${s||"0"}${o?`.${o}`:""}`}return si}var I0;function go(){if(I0)return ai;I0=1,Object.defineProperty(ai,"__esModule",{value:!0}),ai.formatEther=n;const e=po(),r=cu();function n(t,i="wei"){return(0,r.formatUnits)(t,e.etherUnits[i])}return ai}var ci={},S0;function Rr(){if(S0)return ci;S0=1,Object.defineProperty(ci,"__esModule",{value:!0}),ci.formatGwei=n;const e=po(),r=cu();function n(t,i="wei"){return(0,r.formatUnits)(t,e.gweiUnits[i])}return ci}var B0;function Je(){if(B0)return ve;B0=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.WaitForTransactionReceiptTimeoutError=ve.TransactionReceiptRevertedError=ve.TransactionReceiptNotFoundError=ve.TransactionNotFoundError=ve.TransactionExecutionError=ve.InvalidStorageKeySizeError=ve.InvalidSerializedTransactionError=ve.InvalidSerializedTransactionTypeError=ve.InvalidSerializableTransactionError=ve.InvalidLegacyVError=ve.FeeConflictError=void 0,ve.prettyPrint=t;const e=go(),r=Rr(),n=ue();function t(b){const _=Object.entries(b).map(([g,P])=>P===void 0||P===!1?null:[g,P]).filter(Boolean),j=_.reduce((g,[P])=>Math.max(g,P.length),0);return _.map(([g,P])=>` ${`${g}:`.padEnd(j+1)} ${P}`).join(`
|
|
4
|
+
`)}class i extends n.BaseError{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(`
|
|
5
|
+
`),{name:"FeeConflictError"})}}ve.FeeConflictError=i;class s extends n.BaseError{constructor({v:_}){super(`Invalid \`v\` value "${_}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}ve.InvalidLegacyVError=s;class o extends n.BaseError{constructor({transaction:_}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",t(_),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}ve.InvalidSerializableTransactionError=o;class a extends n.BaseError{constructor({serializedType:_}){super(`Serialized transaction type "${_}" is invalid.`,{name:"InvalidSerializedTransactionType"}),Object.defineProperty(this,"serializedType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedType=_}}ve.InvalidSerializedTransactionTypeError=a;class c extends n.BaseError{constructor({attributes:_,serializedTransaction:j,type:g}){const P=Object.entries(_).map(([u,E])=>typeof E>"u"?u:void 0).filter(Boolean);super(`Invalid serialized transaction of type "${g}" was provided.`,{metaMessages:[`Serialized Transaction: "${j}"`,P.length>0?`Missing Attributes: ${P.join(", ")}`:""].filter(Boolean),name:"InvalidSerializedTransactionError"}),Object.defineProperty(this,"serializedTransaction",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedTransaction=j,this.type=g}}ve.InvalidSerializedTransactionError=c;class d extends n.BaseError{constructor({storageKey:_}){super(`Size for storage key "${_}" is invalid. Expected 32 bytes. Got ${Math.floor((_.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}ve.InvalidStorageKeySizeError=d;class l extends n.BaseError{constructor(_,{account:j,docsPath:g,chain:P,data:u,gas:E,gasPrice:p,maxFeePerGas:y,maxPriorityFeePerGas:A,nonce:w,to:T,value:O}){var S;const B=t({chain:P&&`${P==null?void 0:P.name} (id: ${P==null?void 0:P.id})`,from:j==null?void 0:j.address,to:T,value:typeof O<"u"&&`${(0,e.formatEther)(O)} ${((S=P==null?void 0:P.nativeCurrency)==null?void 0:S.symbol)||"ETH"}`,data:u,gas:E,gasPrice:typeof p<"u"&&`${(0,r.formatGwei)(p)} gwei`,maxFeePerGas:typeof y<"u"&&`${(0,r.formatGwei)(y)} gwei`,maxPriorityFeePerGas:typeof A<"u"&&`${(0,r.formatGwei)(A)} gwei`,nonce:w});super(_.shortMessage,{cause:_,docsPath:g,metaMessages:[..._.metaMessages?[..._.metaMessages," "]:[],"Request Arguments:",B].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=_}}ve.TransactionExecutionError=l;class f extends n.BaseError{constructor({blockHash:_,blockNumber:j,blockTag:g,hash:P,index:u}){let E="Transaction";g&&u!==void 0&&(E=`Transaction at block time "${g}" at index "${u}"`),_&&u!==void 0&&(E=`Transaction at block hash "${_}" at index "${u}"`),j&&u!==void 0&&(E=`Transaction at block number "${j}" at index "${u}"`),P&&(E=`Transaction with hash "${P}"`),super(`${E} could not be found.`,{name:"TransactionNotFoundError"})}}ve.TransactionNotFoundError=f;class m extends n.BaseError{constructor({hash:_}){super(`Transaction receipt with hash "${_}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}ve.TransactionReceiptNotFoundError=m;class v extends n.BaseError{constructor({receipt:_}){super(`Transaction with hash "${_.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=_}}ve.TransactionReceiptRevertedError=v;class h extends n.BaseError{constructor({hash:_}){super(`Timed out while waiting for transaction with hash "${_}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}return ve.WaitForTransactionReceiptTimeoutError=h,ve}var ui={},R0;function ep(){if(R0)return ui;R0=1,Object.defineProperty(ui,"__esModule",{value:!0}),ui.serializeAuthorizationList=n;const e=te(),r=mu();function n(t){if(!t||t.length===0)return[];const i=[];for(const s of t){const{chainId:o,nonce:a,...c}=s,d=s.address;i.push([o?(0,e.toHex)(o):"0x",d,a?(0,e.toHex)(a):"0x",...(0,r.toYParitySignatureArray)({},c)])}return i}return ui}var di={},O0;function uu(){if(O0)return di;O0=1,Object.defineProperty(di,"__esModule",{value:!0}),di.blobsToCommitments=n;const e=_e(),r=te();function n(t){const{kzg:i}=t,s=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),o=typeof t.blobs[0]=="string"?t.blobs.map(c=>(0,e.hexToBytes)(c)):t.blobs,a=[];for(const c of o)a.push(Uint8Array.from(i.blobToKzgCommitment(c)));return s==="bytes"?a:a.map(c=>(0,r.bytesToHex)(c))}return di}var fi={},x0;function du(){if(x0)return fi;x0=1,Object.defineProperty(fi,"__esModule",{value:!0}),fi.blobsToProofs=n;const e=_e(),r=te();function n(t){const{kzg:i}=t,s=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),o=typeof t.blobs[0]=="string"?t.blobs.map(d=>(0,e.hexToBytes)(d)):t.blobs,a=typeof t.commitments[0]=="string"?t.commitments.map(d=>(0,e.hexToBytes)(d)):t.commitments,c=[];for(let d=0;d<o.length;d++){const l=o[d],f=a[d];c.push(Uint8Array.from(i.computeBlobKzgProof(l,f)))}return s==="bytes"?c:c.map(d=>(0,r.bytesToHex)(d))}return fi}var li={},bi={},mi={},mt={},pe={},$e={},ed={},Tn={},C0;function __(){return C0||(C0=1,Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.crypto=void 0,Tn.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0),Tn}var q0;function nr(){return q0||(q0=1,function(e){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.Hash=e.nextTick=e.swap32IfBE=e.byteSwapIfBE=e.swap8IfBE=e.isLE=void 0,e.isBytes=n,e.anumber=t,e.abytes=i,e.ahash=s,e.aexists=o,e.aoutput=a,e.u8=c,e.u32=d,e.clean=l,e.createView=f,e.rotr=m,e.rotl=v,e.byteSwap=h,e.byteSwap32=b,e.bytesToHex=g,e.hexToBytes=E,e.asyncLoop=y,e.utf8ToBytes=A,e.bytesToUtf8=w,e.toBytes=T,e.kdfInputToBytes=O,e.concatBytes=B,e.checkOpts=S,e.createHasher=k,e.createOptHasher=C,e.createXOFer=I,e.randomBytes=F;const r=__();function n(R){return R instanceof Uint8Array||ArrayBuffer.isView(R)&&R.constructor.name==="Uint8Array"}function t(R){if(!Number.isSafeInteger(R)||R<0)throw new Error("positive integer expected, got "+R)}function i(R,...q){if(!n(R))throw new Error("Uint8Array expected");if(q.length>0&&!q.includes(R.length))throw new Error("Uint8Array expected of length "+q+", got length="+R.length)}function s(R){if(typeof R!="function"||typeof R.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");t(R.outputLen),t(R.blockLen)}function o(R,q=!0){if(R.destroyed)throw new Error("Hash instance has been destroyed");if(q&&R.finished)throw new Error("Hash#digest() has already been called")}function a(R,q){i(R);const M=q.outputLen;if(R.length<M)throw new Error("digestInto() expects output buffer of length at least "+M)}function c(R){return new Uint8Array(R.buffer,R.byteOffset,R.byteLength)}function d(R){return new Uint32Array(R.buffer,R.byteOffset,Math.floor(R.byteLength/4))}function l(...R){for(let q=0;q<R.length;q++)R[q].fill(0)}function f(R){return new DataView(R.buffer,R.byteOffset,R.byteLength)}function m(R,q){return R<<32-q|R>>>q}function v(R,q){return R<<q|R>>>32-q>>>0}e.isLE=(()=>new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68)();function h(R){return R<<24&4278190080|R<<8&16711680|R>>>8&65280|R>>>24&255}e.swap8IfBE=e.isLE?R=>R:R=>h(R),e.byteSwapIfBE=e.swap8IfBE;function b(R){for(let q=0;q<R.length;q++)R[q]=h(R[q]);return R}e.swap32IfBE=e.isLE?R=>R:b;const _=(()=>typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function")(),j=Array.from({length:256},(R,q)=>q.toString(16).padStart(2,"0"));function g(R){if(i(R),_)return R.toHex();let q="";for(let M=0;M<R.length;M++)q+=j[R[M]];return q}const P={_0:48,_9:57,A:65,F:70,a:97,f:102};function u(R){if(R>=P._0&&R<=P._9)return R-P._0;if(R>=P.A&&R<=P.F)return R-(P.A-10);if(R>=P.a&&R<=P.f)return R-(P.a-10)}function E(R){if(typeof R!="string")throw new Error("hex string expected, got "+typeof R);if(_)return Uint8Array.fromHex(R);const q=R.length,M=q/2;if(q%2)throw new Error("hex string expected, got unpadded hex of length "+q);const H=new Uint8Array(M);for(let N=0,z=0;N<M;N++,z+=2){const $=u(R.charCodeAt(z)),U=u(R.charCodeAt(z+1));if($===void 0||U===void 0){const G=R[z]+R[z+1];throw new Error('hex string expected, got non-hex character "'+G+'" at index '+z)}H[N]=$*16+U}return H}const p=async()=>{};e.nextTick=p;async function y(R,q,M){let H=Date.now();for(let N=0;N<R;N++){M(N);const z=Date.now()-H;z>=0&&z<q||(await(0,e.nextTick)(),H+=z)}}function A(R){if(typeof R!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(R))}function w(R){return new TextDecoder().decode(R)}function T(R){return typeof R=="string"&&(R=A(R)),i(R),R}function O(R){return typeof R=="string"&&(R=A(R)),i(R),R}function B(...R){let q=0;for(let H=0;H<R.length;H++){const N=R[H];i(N),q+=N.length}const M=new Uint8Array(q);for(let H=0,N=0;H<R.length;H++){const z=R[H];M.set(z,N),N+=z.length}return M}function S(R,q){if(q!==void 0&&{}.toString.call(q)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(R,q)}class x{}e.Hash=x;function k(R){const q=H=>R().update(T(H)).digest(),M=R();return q.outputLen=M.outputLen,q.blockLen=M.blockLen,q.create=()=>R(),q}function C(R){const q=(H,N)=>R(N).update(T(H)).digest(),M=R({});return q.outputLen=M.outputLen,q.blockLen=M.blockLen,q.create=H=>R(H),q}function I(R){const q=(H,N)=>R(N).update(T(H)).digest(),M=R({});return q.outputLen=M.outputLen,q.blockLen=M.blockLen,q.create=H=>R(H),q}e.wrapConstructor=k,e.wrapConstructorWithOpts=C,e.wrapXOFConstructorWithOpts=I;function F(R=32){if(r.crypto&&typeof r.crypto.getRandomValues=="function")return r.crypto.getRandomValues(new Uint8Array(R));if(r.crypto&&typeof r.crypto.randomBytes=="function")return Uint8Array.from(r.crypto.randomBytes(R));throw new Error("crypto.getRandomValues must be defined")}}(ed)),ed}var M0;function tp(){if(M0)return $e;M0=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.SHA512_IV=$e.SHA384_IV=$e.SHA224_IV=$e.SHA256_IV=$e.HashMD=void 0,$e.setBigUint64=r,$e.Chi=n,$e.Maj=t;const e=nr();function r(s,o,a,c){if(typeof s.setBigUint64=="function")return s.setBigUint64(o,a,c);const d=BigInt(32),l=BigInt(4294967295),f=Number(a>>d&l),m=Number(a&l),v=c?4:0,h=c?0:4;s.setUint32(o+v,f,c),s.setUint32(o+h,m,c)}function n(s,o,a){return s&o^~s&a}function t(s,o,a){return s&o^s&a^o&a}class i extends e.Hash{constructor(o,a,c,d){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=o,this.outputLen=a,this.padOffset=c,this.isLE=d,this.buffer=new Uint8Array(o),this.view=(0,e.createView)(this.buffer)}update(o){(0,e.aexists)(this),o=(0,e.toBytes)(o),(0,e.abytes)(o);const{view:a,buffer:c,blockLen:d}=this,l=o.length;for(let f=0;f<l;){const m=Math.min(d-this.pos,l-f);if(m===d){const v=(0,e.createView)(o);for(;d<=l-f;f+=d)this.process(v,f);continue}c.set(o.subarray(f,f+m),this.pos),this.pos+=m,f+=m,this.pos===d&&(this.process(a,0),this.pos=0)}return this.length+=o.length,this.roundClean(),this}digestInto(o){(0,e.aexists)(this),(0,e.aoutput)(o,this),this.finished=!0;const{buffer:a,view:c,blockLen:d,isLE:l}=this;let{pos:f}=this;a[f++]=128,(0,e.clean)(this.buffer.subarray(f)),this.padOffset>d-f&&(this.process(c,0),f=0);for(let _=f;_<d;_++)a[_]=0;r(c,d-8,BigInt(this.length*8),l),this.process(c,0);const m=(0,e.createView)(o),v=this.outputLen;if(v%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const h=v/4,b=this.get();if(h>b.length)throw new Error("_sha2: outputLen bigger than state");for(let _=0;_<h;_++)m.setUint32(4*_,b[_],l)}digest(){const{buffer:o,outputLen:a}=this;this.digestInto(o);const c=o.slice(0,a);return this.destroy(),c}_cloneInto(o){o||(o=new this.constructor),o.set(...this.get());const{blockLen:a,buffer:c,length:d,finished:l,destroyed:f,pos:m}=this;return o.destroyed=f,o.finished=l,o.length=d,o.pos=m,d%a&&o.buffer.set(c),o}clone(){return this._cloneInto()}}return $e.HashMD=i,$e.SHA256_IV=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),$e.SHA224_IV=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),$e.SHA384_IV=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),$e.SHA512_IV=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),$e}var ce={},H0;function rp(){if(H0)return ce;H0=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.toBig=ce.shrSL=ce.shrSH=ce.rotrSL=ce.rotrSH=ce.rotrBL=ce.rotrBH=ce.rotr32L=ce.rotr32H=ce.rotlSL=ce.rotlSH=ce.rotlBL=ce.rotlBH=ce.add5L=ce.add5H=ce.add4L=ce.add4H=ce.add3L=ce.add3H=void 0,ce.add=j,ce.fromBig=n,ce.split=t;const e=BigInt(2**32-1),r=BigInt(32);function n(w,T=!1){return T?{h:Number(w&e),l:Number(w>>r&e)}:{h:Number(w>>r&e)|0,l:Number(w&e)|0}}function t(w,T=!1){const O=w.length;let B=new Uint32Array(O),S=new Uint32Array(O);for(let x=0;x<O;x++){const{h:k,l:C}=n(w[x],T);[B[x],S[x]]=[k,C]}return[B,S]}const i=(w,T)=>BigInt(w>>>0)<<r|BigInt(T>>>0);ce.toBig=i;const s=(w,T,O)=>w>>>O;ce.shrSH=s;const o=(w,T,O)=>w<<32-O|T>>>O;ce.shrSL=o;const a=(w,T,O)=>w>>>O|T<<32-O;ce.rotrSH=a;const c=(w,T,O)=>w<<32-O|T>>>O;ce.rotrSL=c;const d=(w,T,O)=>w<<64-O|T>>>O-32;ce.rotrBH=d;const l=(w,T,O)=>w>>>O-32|T<<64-O;ce.rotrBL=l;const f=(w,T)=>T;ce.rotr32H=f;const m=(w,T)=>w;ce.rotr32L=m;const v=(w,T,O)=>w<<O|T>>>32-O;ce.rotlSH=v;const h=(w,T,O)=>T<<O|w>>>32-O;ce.rotlSL=h;const b=(w,T,O)=>T<<O-32|w>>>64-O;ce.rotlBH=b;const _=(w,T,O)=>w<<O-32|T>>>64-O;ce.rotlBL=_;function j(w,T,O,B){const S=(T>>>0)+(B>>>0);return{h:w+O+(S/2**32|0)|0,l:S|0}}const g=(w,T,O)=>(w>>>0)+(T>>>0)+(O>>>0);ce.add3L=g;const P=(w,T,O,B)=>T+O+B+(w/2**32|0)|0;ce.add3H=P;const u=(w,T,O,B)=>(w>>>0)+(T>>>0)+(O>>>0)+(B>>>0);ce.add4L=u;const E=(w,T,O,B,S)=>T+O+B+S+(w/2**32|0)|0;ce.add4H=E;const p=(w,T,O,B,S)=>(w>>>0)+(T>>>0)+(O>>>0)+(B>>>0)+(S>>>0);ce.add5L=p;const y=(w,T,O,B,S,x)=>T+O+B+S+x+(w/2**32|0)|0;ce.add5H=y;const A={fromBig:n,split:t,toBig:i,shrSH:s,shrSL:o,rotrSH:a,rotrSL:c,rotrBH:d,rotrBL:l,rotr32H:f,rotr32L:m,rotlSH:v,rotlSL:h,rotlBH:b,rotlBL:_,add:j,add3L:g,add3H:P,add4L:u,add4H:E,add5H:y,add5L:p};return ce.default=A,ce}var F0;function np(){if(F0)return pe;F0=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.sha512_224=pe.sha512_256=pe.sha384=pe.sha512=pe.sha224=pe.sha256=pe.SHA512_256=pe.SHA512_224=pe.SHA384=pe.SHA512=pe.SHA224=pe.SHA256=void 0;const e=tp(),r=rp(),n=nr(),t=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),i=new Uint32Array(64);class s extends e.HashMD{constructor(P=32){super(64,P,8,!1),this.A=e.SHA256_IV[0]|0,this.B=e.SHA256_IV[1]|0,this.C=e.SHA256_IV[2]|0,this.D=e.SHA256_IV[3]|0,this.E=e.SHA256_IV[4]|0,this.F=e.SHA256_IV[5]|0,this.G=e.SHA256_IV[6]|0,this.H=e.SHA256_IV[7]|0}get(){const{A:P,B:u,C:E,D:p,E:y,F:A,G:w,H:T}=this;return[P,u,E,p,y,A,w,T]}set(P,u,E,p,y,A,w,T){this.A=P|0,this.B=u|0,this.C=E|0,this.D=p|0,this.E=y|0,this.F=A|0,this.G=w|0,this.H=T|0}process(P,u){for(let S=0;S<16;S++,u+=4)i[S]=P.getUint32(u,!1);for(let S=16;S<64;S++){const x=i[S-15],k=i[S-2],C=(0,n.rotr)(x,7)^(0,n.rotr)(x,18)^x>>>3,I=(0,n.rotr)(k,17)^(0,n.rotr)(k,19)^k>>>10;i[S]=I+i[S-7]+C+i[S-16]|0}let{A:E,B:p,C:y,D:A,E:w,F:T,G:O,H:B}=this;for(let S=0;S<64;S++){const x=(0,n.rotr)(w,6)^(0,n.rotr)(w,11)^(0,n.rotr)(w,25),k=B+x+(0,e.Chi)(w,T,O)+t[S]+i[S]|0,I=((0,n.rotr)(E,2)^(0,n.rotr)(E,13)^(0,n.rotr)(E,22))+(0,e.Maj)(E,p,y)|0;B=O,O=T,T=w,w=A+k|0,A=y,y=p,p=E,E=k+I|0}E=E+this.A|0,p=p+this.B|0,y=y+this.C|0,A=A+this.D|0,w=w+this.E|0,T=T+this.F|0,O=O+this.G|0,B=B+this.H|0,this.set(E,p,y,A,w,T,O,B)}roundClean(){(0,n.clean)(i)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,n.clean)(this.buffer)}}pe.SHA256=s;class o extends s{constructor(){super(28),this.A=e.SHA224_IV[0]|0,this.B=e.SHA224_IV[1]|0,this.C=e.SHA224_IV[2]|0,this.D=e.SHA224_IV[3]|0,this.E=e.SHA224_IV[4]|0,this.F=e.SHA224_IV[5]|0,this.G=e.SHA224_IV[6]|0,this.H=e.SHA224_IV[7]|0}}pe.SHA224=o;const a=(()=>r.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(g=>BigInt(g))))(),c=(()=>a[0])(),d=(()=>a[1])(),l=new Uint32Array(80),f=new Uint32Array(80);class m extends e.HashMD{constructor(P=64){super(128,P,16,!1),this.Ah=e.SHA512_IV[0]|0,this.Al=e.SHA512_IV[1]|0,this.Bh=e.SHA512_IV[2]|0,this.Bl=e.SHA512_IV[3]|0,this.Ch=e.SHA512_IV[4]|0,this.Cl=e.SHA512_IV[5]|0,this.Dh=e.SHA512_IV[6]|0,this.Dl=e.SHA512_IV[7]|0,this.Eh=e.SHA512_IV[8]|0,this.El=e.SHA512_IV[9]|0,this.Fh=e.SHA512_IV[10]|0,this.Fl=e.SHA512_IV[11]|0,this.Gh=e.SHA512_IV[12]|0,this.Gl=e.SHA512_IV[13]|0,this.Hh=e.SHA512_IV[14]|0,this.Hl=e.SHA512_IV[15]|0}get(){const{Ah:P,Al:u,Bh:E,Bl:p,Ch:y,Cl:A,Dh:w,Dl:T,Eh:O,El:B,Fh:S,Fl:x,Gh:k,Gl:C,Hh:I,Hl:F}=this;return[P,u,E,p,y,A,w,T,O,B,S,x,k,C,I,F]}set(P,u,E,p,y,A,w,T,O,B,S,x,k,C,I,F){this.Ah=P|0,this.Al=u|0,this.Bh=E|0,this.Bl=p|0,this.Ch=y|0,this.Cl=A|0,this.Dh=w|0,this.Dl=T|0,this.Eh=O|0,this.El=B|0,this.Fh=S|0,this.Fl=x|0,this.Gh=k|0,this.Gl=C|0,this.Hh=I|0,this.Hl=F|0}process(P,u){for(let M=0;M<16;M++,u+=4)l[M]=P.getUint32(u),f[M]=P.getUint32(u+=4);for(let M=16;M<80;M++){const H=l[M-15]|0,N=f[M-15]|0,z=r.rotrSH(H,N,1)^r.rotrSH(H,N,8)^r.shrSH(H,N,7),$=r.rotrSL(H,N,1)^r.rotrSL(H,N,8)^r.shrSL(H,N,7),U=l[M-2]|0,G=f[M-2]|0,K=r.rotrSH(U,G,19)^r.rotrBH(U,G,61)^r.shrSH(U,G,6),W=r.rotrSL(U,G,19)^r.rotrBL(U,G,61)^r.shrSL(U,G,6),V=r.add4L($,W,f[M-7],f[M-16]),J=r.add4H(V,z,K,l[M-7],l[M-16]);l[M]=J|0,f[M]=V|0}let{Ah:E,Al:p,Bh:y,Bl:A,Ch:w,Cl:T,Dh:O,Dl:B,Eh:S,El:x,Fh:k,Fl:C,Gh:I,Gl:F,Hh:R,Hl:q}=this;for(let M=0;M<80;M++){const H=r.rotrSH(S,x,14)^r.rotrSH(S,x,18)^r.rotrBH(S,x,41),N=r.rotrSL(S,x,14)^r.rotrSL(S,x,18)^r.rotrBL(S,x,41),z=S&k^~S&I,$=x&C^~x&F,U=r.add5L(q,N,$,d[M],f[M]),G=r.add5H(U,R,H,z,c[M],l[M]),K=U|0,W=r.rotrSH(E,p,28)^r.rotrBH(E,p,34)^r.rotrBH(E,p,39),V=r.rotrSL(E,p,28)^r.rotrBL(E,p,34)^r.rotrBL(E,p,39),J=E&y^E&w^y&w,oe=p&A^p&T^A&T;R=I|0,q=F|0,I=k|0,F=C|0,k=S|0,C=x|0,{h:S,l:x}=r.add(O|0,B|0,G|0,K|0),O=w|0,B=T|0,w=y|0,T=A|0,y=E|0,A=p|0;const Y=r.add3L(K,V,oe);E=r.add3H(Y,G,W,J),p=Y|0}({h:E,l:p}=r.add(this.Ah|0,this.Al|0,E|0,p|0)),{h:y,l:A}=r.add(this.Bh|0,this.Bl|0,y|0,A|0),{h:w,l:T}=r.add(this.Ch|0,this.Cl|0,w|0,T|0),{h:O,l:B}=r.add(this.Dh|0,this.Dl|0,O|0,B|0),{h:S,l:x}=r.add(this.Eh|0,this.El|0,S|0,x|0),{h:k,l:C}=r.add(this.Fh|0,this.Fl|0,k|0,C|0),{h:I,l:F}=r.add(this.Gh|0,this.Gl|0,I|0,F|0),{h:R,l:q}=r.add(this.Hh|0,this.Hl|0,R|0,q|0),this.set(E,p,y,A,w,T,O,B,S,x,k,C,I,F,R,q)}roundClean(){(0,n.clean)(l,f)}destroy(){(0,n.clean)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}pe.SHA512=m;class v extends m{constructor(){super(48),this.Ah=e.SHA384_IV[0]|0,this.Al=e.SHA384_IV[1]|0,this.Bh=e.SHA384_IV[2]|0,this.Bl=e.SHA384_IV[3]|0,this.Ch=e.SHA384_IV[4]|0,this.Cl=e.SHA384_IV[5]|0,this.Dh=e.SHA384_IV[6]|0,this.Dl=e.SHA384_IV[7]|0,this.Eh=e.SHA384_IV[8]|0,this.El=e.SHA384_IV[9]|0,this.Fh=e.SHA384_IV[10]|0,this.Fl=e.SHA384_IV[11]|0,this.Gh=e.SHA384_IV[12]|0,this.Gl=e.SHA384_IV[13]|0,this.Hh=e.SHA384_IV[14]|0,this.Hl=e.SHA384_IV[15]|0}}pe.SHA384=v;const h=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),b=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class _ extends m{constructor(){super(28),this.Ah=h[0]|0,this.Al=h[1]|0,this.Bh=h[2]|0,this.Bl=h[3]|0,this.Ch=h[4]|0,this.Cl=h[5]|0,this.Dh=h[6]|0,this.Dl=h[7]|0,this.Eh=h[8]|0,this.El=h[9]|0,this.Fh=h[10]|0,this.Fl=h[11]|0,this.Gh=h[12]|0,this.Gl=h[13]|0,this.Hh=h[14]|0,this.Hl=h[15]|0}}pe.SHA512_224=_;class j extends m{constructor(){super(32),this.Ah=b[0]|0,this.Al=b[1]|0,this.Bh=b[2]|0,this.Bl=b[3]|0,this.Ch=b[4]|0,this.Cl=b[5]|0,this.Dh=b[6]|0,this.Dl=b[7]|0,this.Eh=b[8]|0,this.El=b[9]|0,this.Fh=b[10]|0,this.Fl=b[11]|0,this.Gh=b[12]|0,this.Gl=b[13]|0,this.Hh=b[14]|0,this.Hl=b[15]|0}}return pe.SHA512_256=j,pe.sha256=(0,n.createHasher)(()=>new s),pe.sha224=(0,n.createHasher)(()=>new o),pe.sha512=(0,n.createHasher)(()=>new m),pe.sha384=(0,n.createHasher)(()=>new v),pe.sha512_256=(0,n.createHasher)(()=>new j),pe.sha512_224=(0,n.createHasher)(()=>new _),pe}var k0;function op(){if(k0)return mt;k0=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.sha224=mt.SHA224=mt.sha256=mt.SHA256=void 0;const e=np();return mt.SHA256=e.SHA256,mt.sha256=e.sha256,mt.SHA224=e.SHA224,mt.sha224=e.sha224,mt}var N0;function Ad(){if(N0)return mi;N0=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.sha256=i;const e=op(),r=Ge(),n=_e(),t=te();function i(s,o){const a=o||"hex",c=(0,e.sha256)((0,r.isHex)(s,{strict:!1})?(0,n.toBytes)(s):s);return a==="bytes"?c:(0,t.toHex)(c)}return mi}var $0;function Td(){if($0)return bi;$0=1,Object.defineProperty(bi,"__esModule",{value:!0}),bi.commitmentToVersionedHash=n;const e=te(),r=Ad();function n(t){const{commitment:i,version:s=1}=t,o=t.to??(typeof i=="string"?"hex":"bytes"),a=(0,r.sha256)(i,"bytes");return a.set([s],0),o==="bytes"?a:(0,e.bytesToHex)(a)}return bi}var z0;function Id(){if(z0)return li;z0=1,Object.defineProperty(li,"__esModule",{value:!0}),li.commitmentsToVersionedHashes=r;const e=Td();function r(n){const{commitments:t,version:i}=n,s=n.to??(typeof t[0]=="string"?"hex":"bytes"),o=[];for(const a of t)o.push((0,e.commitmentToVersionedHash)({commitment:a,to:s,version:i}));return o}return li}var yi={},hi={},td={},U0;function v_(){return U0||(U0=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.maxBytesPerTransaction=e.bytesPerBlob=e.fieldElementsPerBlob=e.bytesPerFieldElement=void 0;const r=6;e.bytesPerFieldElement=32,e.fieldElementsPerBlob=4096,e.bytesPerBlob=e.bytesPerFieldElement*e.fieldElementsPerBlob,e.maxBytesPerTransaction=e.bytesPerBlob*r-1-1*e.fieldElementsPerBlob*r}(td)),td}var yt={},In={},L0;function ip(){return L0||(L0=1,Object.defineProperty(In,"__esModule",{value:!0}),In.versionedHashVersionKzg=void 0,In.versionedHashVersionKzg=1),In}var D0;function ap(){if(D0)return yt;D0=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.InvalidVersionedHashVersionError=yt.InvalidVersionedHashSizeError=yt.EmptyBlobError=yt.BlobSizeTooLargeError=void 0;const e=ip(),r=ue();class n extends r.BaseError{constructor({maxSize:a,size:c}){super("Blob size is too large.",{metaMessages:[`Max: ${a} bytes`,`Given: ${c} bytes`],name:"BlobSizeTooLargeError"})}}yt.BlobSizeTooLargeError=n;class t extends r.BaseError{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}yt.EmptyBlobError=t;class i extends r.BaseError{constructor({hash:a,size:c}){super(`Versioned hash "${a}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${c}`],name:"InvalidVersionedHashSizeError"})}}yt.InvalidVersionedHashSizeError=i;class s extends r.BaseError{constructor({hash:a,version:c}){super(`Versioned hash "${a}" version is invalid.`,{metaMessages:[`Expected: ${e.versionedHashVersionKzg}`,`Received: ${c}`],name:"InvalidVersionedHashVersionError"})}}return yt.InvalidVersionedHashVersionError=s,yt}var G0;function sp(){if(G0)return hi;G0=1,Object.defineProperty(hi,"__esModule",{value:!0}),hi.toBlobs=o;const e=v_(),r=ap(),n=yo(),t=Ye(),i=_e(),s=te();function o(a){const c=a.to??(typeof a.data=="string"?"hex":"bytes"),d=typeof a.data=="string"?(0,i.hexToBytes)(a.data):a.data,l=(0,t.size)(d);if(!l)throw new r.EmptyBlobError;if(l>e.maxBytesPerTransaction)throw new r.BlobSizeTooLargeError({maxSize:e.maxBytesPerTransaction,size:l});const f=[];let m=!0,v=0;for(;m;){const h=(0,n.createCursor)(new Uint8Array(e.bytesPerBlob));let b=0;for(;b<e.fieldElementsPerBlob;){const _=d.slice(v,v+(e.bytesPerFieldElement-1));if(h.pushByte(0),h.pushBytes(_),_.length<31){h.pushByte(128),m=!1;break}b++,v+=31}f.push(h)}return c==="bytes"?f.map(h=>h.bytes):f.map(h=>(0,s.bytesToHex)(h.bytes))}return hi}var V0;function fu(){if(V0)return yi;V0=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.toBlobSidecars=t;const e=uu(),r=du(),n=sp();function t(i){const{data:s,kzg:o,to:a}=i,c=i.blobs??(0,n.toBlobs)({data:s,to:a}),d=i.commitments??(0,e.blobsToCommitments)({blobs:c,kzg:o,to:a}),l=i.proofs??(0,r.blobsToProofs)({blobs:c,commitments:d,kzg:o,to:a}),f=[];for(let m=0;m<c.length;m++)f.push({blob:c[m],commitment:d[m],proof:l[m]});return f}return yi}var Yt={},Sn={},W0;function vt(){if(W0)return Sn;W0=1,Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.InvalidAddressError=void 0;const e=ue();class r extends e.BaseError{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}return Sn.InvalidAddressError=r,Sn}var rt={},K0;function _o(){if(K0)return rt;K0=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.InvalidChainIdError=rt.ClientChainNotConfiguredError=rt.ChainNotFoundError=rt.ChainMismatchError=rt.ChainDoesNotSupportContract=void 0;const e=ue();class r extends e.BaseError{constructor({blockNumber:a,chain:c,contract:d}){super(`Chain "${c.name}" does not support contract "${d.name}".`,{metaMessages:["This could be due to any of the following:",...a&&d.blockCreated&&d.blockCreated>a?[`- The contract "${d.name}" was not deployed until block ${d.blockCreated} (current block ${a}).`]:[`- The chain does not have the contract "${d.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}rt.ChainDoesNotSupportContract=r;class n extends e.BaseError{constructor({chain:a,currentChainId:c}){super(`The current chain of the wallet (id: ${c}) does not match the target chain for the transaction (id: ${a.id} – ${a.name}).`,{metaMessages:[`Current Chain ID: ${c}`,`Expected Chain ID: ${a.id} – ${a.name}`],name:"ChainMismatchError"})}}rt.ChainMismatchError=n;class t extends e.BaseError{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(`
|
|
6
|
+
`),{name:"ChainNotFoundError"})}}rt.ChainNotFoundError=t;class i extends e.BaseError{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}rt.ClientChainNotConfiguredError=i;class s extends e.BaseError{constructor({chainId:a}){super(typeof a=="number"?`Chain ID "${a}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}return rt.InvalidChainIdError=s,rt}var ge={},Z0;function Dt(){if(Z0)return ge;Z0=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.UnknownNodeError=ge.TipAboveFeeCapError=ge.TransactionTypeNotSupportedError=ge.IntrinsicGasTooLowError=ge.IntrinsicGasTooHighError=ge.InsufficientFundsError=ge.NonceMaxValueError=ge.NonceTooLowError=ge.NonceTooHighError=ge.FeeCapTooLowError=ge.FeeCapTooHighError=ge.ExecutionRevertedError=void 0;const e=Rr(),r=ue();class n extends r.BaseError{constructor({cause:b,message:_}={}){var g;const j=(g=_==null?void 0:_.replace("execution reverted: ",""))==null?void 0:g.replace("execution reverted","");super(`Execution reverted ${j?`with reason: ${j}`:"for an unknown reason"}.`,{cause:b,name:"ExecutionRevertedError"})}}ge.ExecutionRevertedError=n,Object.defineProperty(n,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(n,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class t extends r.BaseError{constructor({cause:b,maxFeePerGas:_}={}){super(`The fee cap (\`maxFeePerGas\`${_?` = ${(0,e.formatGwei)(_)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:b,name:"FeeCapTooHighError"})}}ge.FeeCapTooHighError=t,Object.defineProperty(t,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class i extends r.BaseError{constructor({cause:b,maxFeePerGas:_}={}){super(`The fee cap (\`maxFeePerGas\`${_?` = ${(0,e.formatGwei)(_)}`:""} gwei) cannot be lower than the block base fee.`,{cause:b,name:"FeeCapTooLowError"})}}ge.FeeCapTooLowError=i,Object.defineProperty(i,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class s extends r.BaseError{constructor({cause:b,nonce:_}={}){super(`Nonce provided for the transaction ${_?`(${_}) `:""}is higher than the next one expected.`,{cause:b,name:"NonceTooHighError"})}}ge.NonceTooHighError=s,Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class o extends r.BaseError{constructor({cause:b,nonce:_}={}){super([`Nonce provided for the transaction ${_?`(${_}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
|
|
7
|
+
`),{cause:b,name:"NonceTooLowError"})}}ge.NonceTooLowError=o,Object.defineProperty(o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class a extends r.BaseError{constructor({cause:b,nonce:_}={}){super(`Nonce provided for the transaction ${_?`(${_}) `:""}exceeds the maximum allowed nonce.`,{cause:b,name:"NonceMaxValueError"})}}ge.NonceMaxValueError=a,Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class c extends r.BaseError{constructor({cause:b}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
|
|
8
|
+
`),{cause:b,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}ge.InsufficientFundsError=c,Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class d extends r.BaseError{constructor({cause:b,gas:_}={}){super(`The amount of gas ${_?`(${_}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:b,name:"IntrinsicGasTooHighError"})}}ge.IntrinsicGasTooHighError=d,Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class l extends r.BaseError{constructor({cause:b,gas:_}={}){super(`The amount of gas ${_?`(${_}) `:""}provided for the transaction is too low.`,{cause:b,name:"IntrinsicGasTooLowError"})}}ge.IntrinsicGasTooLowError=l,Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class f extends r.BaseError{constructor({cause:b}){super("The transaction type is not supported for this chain.",{cause:b,name:"TransactionTypeNotSupportedError"})}}ge.TransactionTypeNotSupportedError=f,Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class m extends r.BaseError{constructor({cause:b,maxPriorityFeePerGas:_,maxFeePerGas:j}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${_?` = ${(0,e.formatGwei)(_)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${j?` = ${(0,e.formatGwei)(j)} gwei`:""}).`].join(`
|
|
9
|
+
`),{cause:b,name:"TipAboveFeeCapError"})}}ge.TipAboveFeeCapError=m,Object.defineProperty(m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class v extends r.BaseError{constructor({cause:b}){super(`An error occurred while executing: ${b==null?void 0:b.shortMessage}`,{cause:b,name:"UnknownNodeError"})}}return ge.UnknownNodeError=v,ge}var rd={},Bn={},Y0;function Or(){if(Y0)return Bn;Y0=1,Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.LruMap=void 0;class e extends Map{constructor(n){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=n}get(n){const t=super.get(n);return super.has(n)&&t!==void 0&&(this.delete(n),super.set(n,t)),t}set(n,t){if(super.set(n,t),this.maxSize&&this.size>this.maxSize){const i=this.keys().next().value;i&&this.delete(i)}return this}}return Bn.LruMap=e,Bn}var Rn={},pi={},Ee={},J0;function cp(){if(J0)return Ee;J0=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.shake256=Ee.shake128=Ee.keccak_512=Ee.keccak_384=Ee.keccak_256=Ee.keccak_224=Ee.sha3_512=Ee.sha3_384=Ee.sha3_256=Ee.sha3_224=Ee.Keccak=void 0,Ee.keccakP=_;const e=rp(),r=nr(),n=BigInt(0),t=BigInt(1),i=BigInt(2),s=BigInt(7),o=BigInt(256),a=BigInt(113),c=[],d=[],l=[];for(let u=0,E=t,p=1,y=0;u<24;u++){[p,y]=[y,(2*p+3*y)%5],c.push(2*(5*y+p)),d.push((u+1)*(u+2)/2%64);let A=n;for(let w=0;w<7;w++)E=(E<<t^(E>>s)*a)%o,E&i&&(A^=t<<(t<<BigInt(w))-t);l.push(A)}const f=(0,e.split)(l,!0),m=f[0],v=f[1],h=(u,E,p)=>p>32?(0,e.rotlBH)(u,E,p):(0,e.rotlSH)(u,E,p),b=(u,E,p)=>p>32?(0,e.rotlBL)(u,E,p):(0,e.rotlSL)(u,E,p);function _(u,E=24){const p=new Uint32Array(10);for(let y=24-E;y<24;y++){for(let T=0;T<10;T++)p[T]=u[T]^u[T+10]^u[T+20]^u[T+30]^u[T+40];for(let T=0;T<10;T+=2){const O=(T+8)%10,B=(T+2)%10,S=p[B],x=p[B+1],k=h(S,x,1)^p[O],C=b(S,x,1)^p[O+1];for(let I=0;I<50;I+=10)u[T+I]^=k,u[T+I+1]^=C}let A=u[2],w=u[3];for(let T=0;T<24;T++){const O=d[T],B=h(A,w,O),S=b(A,w,O),x=c[T];A=u[x],w=u[x+1],u[x]=B,u[x+1]=S}for(let T=0;T<50;T+=10){for(let O=0;O<10;O++)p[O]=u[T+O];for(let O=0;O<10;O++)u[T+O]^=~p[(O+2)%10]&p[(O+4)%10]}u[0]^=m[y],u[1]^=v[y]}(0,r.clean)(p)}class j extends r.Hash{constructor(E,p,y,A=!1,w=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=E,this.suffix=p,this.outputLen=y,this.enableXOF=A,this.rounds=w,(0,r.anumber)(y),!(0<E&&E<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,r.u32)(this.state)}clone(){return this._cloneInto()}keccak(){(0,r.swap32IfBE)(this.state32),_(this.state32,this.rounds),(0,r.swap32IfBE)(this.state32),this.posOut=0,this.pos=0}update(E){(0,r.aexists)(this),E=(0,r.toBytes)(E),(0,r.abytes)(E);const{blockLen:p,state:y}=this,A=E.length;for(let w=0;w<A;){const T=Math.min(p-this.pos,A-w);for(let O=0;O<T;O++)y[this.pos++]^=E[w++];this.pos===p&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:E,suffix:p,pos:y,blockLen:A}=this;E[y]^=p,p&128&&y===A-1&&this.keccak(),E[A-1]^=128,this.keccak()}writeInto(E){(0,r.aexists)(this,!1),(0,r.abytes)(E),this.finish();const p=this.state,{blockLen:y}=this;for(let A=0,w=E.length;A<w;){this.posOut>=y&&this.keccak();const T=Math.min(y-this.posOut,w-A);E.set(p.subarray(this.posOut,this.posOut+T),A),this.posOut+=T,A+=T}return E}xofInto(E){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(E)}xof(E){return(0,r.anumber)(E),this.xofInto(new Uint8Array(E))}digestInto(E){if((0,r.aoutput)(E,this),this.finished)throw new Error("digest() was already called");return this.writeInto(E),this.destroy(),E}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,r.clean)(this.state)}_cloneInto(E){const{blockLen:p,suffix:y,outputLen:A,rounds:w,enableXOF:T}=this;return E||(E=new j(p,y,A,T,w)),E.state32.set(this.state32),E.pos=this.pos,E.posOut=this.posOut,E.finished=this.finished,E.rounds=w,E.suffix=y,E.outputLen=A,E.enableXOF=T,E.destroyed=this.destroyed,E}}Ee.Keccak=j;const g=(u,E,p)=>(0,r.createHasher)(()=>new j(E,u,p));Ee.sha3_224=(()=>g(6,144,224/8))(),Ee.sha3_256=(()=>g(6,136,256/8))(),Ee.sha3_384=(()=>g(6,104,384/8))(),Ee.sha3_512=(()=>g(6,72,512/8))(),Ee.keccak_224=(()=>g(1,144,224/8))(),Ee.keccak_256=(()=>g(1,136,256/8))(),Ee.keccak_384=(()=>g(1,104,384/8))(),Ee.keccak_512=(()=>g(1,72,512/8))();const P=(u,E,p)=>(0,r.createXOFer)((y={})=>new j(E,u,y.dkLen===void 0?p:y.dkLen,!0));return Ee.shake128=(()=>P(31,168,128/8))(),Ee.shake256=(()=>P(31,136,256/8))(),Ee}var X0;function Xe(){if(X0)return pi;X0=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.keccak256=i;const e=cp(),r=Ge(),n=_e(),t=te();function i(s,o){const a=o||"hex",c=(0,e.keccak_256)((0,r.isHex)(s,{strict:!1})?(0,n.toBytes)(s):s);return a==="bytes"?c:(0,t.toHex)(c)}return pi}var Q0;function at(){if(Q0)return Rn;Q0=1,Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.checksumAddress=o,Rn.getAddress=a;const e=vt(),r=_e(),n=Xe(),t=Or(),i=Qe(),s=new t.LruMap(8192);function o(c,d){if(s.has(`${c}.${d}`))return s.get(`${c}.${d}`);const l=d?`${d}${c.toLowerCase()}`:c.substring(2).toLowerCase(),f=(0,n.keccak256)((0,r.stringToBytes)(l),"bytes"),m=(d?l.substring(`${d}0x`.length):l).split("");for(let h=0;h<40;h+=2)f[h>>1]>>4>=8&&m[h]&&(m[h]=m[h].toUpperCase()),(f[h>>1]&15)>=8&&m[h+1]&&(m[h+1]=m[h+1].toUpperCase());const v=`0x${m.join("")}`;return s.set(`${c}.${d}`,v),v}function a(c,d){if(!(0,i.isAddress)(c,{strict:!1}))throw new e.InvalidAddressError({address:c});return o(c,d)}return Rn}var el;function Qe(){return el||(el=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isAddressCache=void 0,e.isAddress=i;const r=Or(),n=at(),t=/^0x[a-fA-F0-9]{40}$/;e.isAddressCache=new r.LruMap(8192);function i(s,o){const{strict:a=!0}=o??{},c=`${s}.${a}`;if(e.isAddressCache.has(c))return e.isAddressCache.get(c);const d=(()=>t.test(s)?s.toLowerCase()===s?!0:a?(0,n.checksumAddress)(s)===s:!0:!1)();return e.isAddressCache.set(c,d),d}}(rd)),rd}var Gr={},tl;function ft(){if(tl)return Gr;tl=1,Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.slice=t,Gr.sliceBytes=o,Gr.sliceHex=a;const e=au(),r=Ge(),n=Ye();function t(c,d,l,{strict:f}={}){return(0,r.isHex)(c,{strict:!1})?a(c,d,l,{strict:f}):o(c,d,l,{strict:f})}function i(c,d){if(typeof d=="number"&&d>0&&d>(0,n.size)(c)-1)throw new e.SliceOffsetOutOfBoundsError({offset:d,position:"start",size:(0,n.size)(c)})}function s(c,d,l){if(typeof d=="number"&&typeof l=="number"&&(0,n.size)(c)!==l-d)throw new e.SliceOffsetOutOfBoundsError({offset:l,position:"end",size:(0,n.size)(c)})}function o(c,d,l,{strict:f}={}){i(c,d);const m=c.slice(d,l);return f&&s(m,d,l),m}function a(c,d,l,{strict:f}={}){i(c,d);const m=`0x${c.replace("0x","").slice((d??0)*2,(l??c.length)*2)}`;return f&&s(m,d,l),m}return Gr}var rl;function lu(){if(rl)return Yt;rl=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.assertTransactionEIP7702=f,Yt.assertTransactionEIP4844=m,Yt.assertTransactionEIP1559=v,Yt.assertTransactionEIP2930=h,Yt.assertTransactionLegacy=b;const e=ip(),r=Pd(),n=vt(),t=ue(),i=ap(),s=_o(),o=Dt(),a=Qe(),c=Ye(),d=ft(),l=Be();function f(_){const{authorizationList:j}=_;if(j)for(const g of j){const{chainId:P}=g,u=g.address;if(!(0,a.isAddress)(u))throw new n.InvalidAddressError({address:u});if(P<0)throw new s.InvalidChainIdError({chainId:P})}v(_)}function m(_){const{blobVersionedHashes:j}=_;if(j){if(j.length===0)throw new i.EmptyBlobError;for(const g of j){const P=(0,c.size)(g),u=(0,l.hexToNumber)((0,d.slice)(g,0,1));if(P!==32)throw new i.InvalidVersionedHashSizeError({hash:g,size:P});if(u!==e.versionedHashVersionKzg)throw new i.InvalidVersionedHashVersionError({hash:g,version:u})}}v(_)}function v(_){const{chainId:j,maxPriorityFeePerGas:g,maxFeePerGas:P,to:u}=_;if(j<=0)throw new s.InvalidChainIdError({chainId:j});if(u&&!(0,a.isAddress)(u))throw new n.InvalidAddressError({address:u});if(P&&P>r.maxUint256)throw new o.FeeCapTooHighError({maxFeePerGas:P});if(g&&P&&g>P)throw new o.TipAboveFeeCapError({maxFeePerGas:P,maxPriorityFeePerGas:g})}function h(_){const{chainId:j,maxPriorityFeePerGas:g,gasPrice:P,maxFeePerGas:u,to:E}=_;if(j<=0)throw new s.InvalidChainIdError({chainId:j});if(E&&!(0,a.isAddress)(E))throw new n.InvalidAddressError({address:E});if(g||u)throw new t.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(P&&P>r.maxUint256)throw new o.FeeCapTooHighError({maxFeePerGas:P})}function b(_){const{chainId:j,maxPriorityFeePerGas:g,gasPrice:P,maxFeePerGas:u,to:E}=_;if(E&&!(0,a.isAddress)(E))throw new n.InvalidAddressError({address:E});if(typeof j<"u"&&j<=0)throw new s.InvalidChainIdError({chainId:j});if(g||u)throw new t.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(P&&P>r.maxUint256)throw new o.FeeCapTooHighError({maxFeePerGas:P})}return Yt}var gi={},nl;function bu(){if(nl)return gi;nl=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.getTransactionType=r;const e=Je();function r(n){if(n.type)return n.type;if(typeof n.authorizationList<"u")return"eip7702";if(typeof n.blobs<"u"||typeof n.blobVersionedHashes<"u"||typeof n.maxFeePerBlobGas<"u"||typeof n.sidecars<"u")return"eip4844";if(typeof n.maxFeePerGas<"u"||typeof n.maxPriorityFeePerGas<"u")return"eip1559";if(typeof n.gasPrice<"u")return typeof n.accessList<"u"?"eip2930":"legacy";throw new e.InvalidSerializableTransactionError({transaction:n})}return gi}var _i={},ol;function Sd(){if(ol)return _i;ol=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.serializeAccessList=t;const e=vt(),r=Je(),n=Qe();function t(i){if(!i||i.length===0)return[];const s=[];for(let o=0;o<i.length;o++){const{address:a,storageKeys:c}=i[o];for(let d=0;d<c.length;d++)if(c[d].length-2!==64)throw new r.InvalidStorageKeySizeError({storageKey:c[d]});if(!(0,n.isAddress)(a,{strict:!1}))throw new e.InvalidAddressError({address:a});s.push([a,c])}return s}return _i}var il;function mu(){if(il)return An;il=1,Object.defineProperty(An,"__esModule",{value:!0}),An.serializeTransaction=v,An.toYParitySignatureArray=P;const e=Je(),r=ep(),n=uu(),t=du(),i=Id(),s=fu(),o=Me(),a=Ut(),c=te(),d=ho(),l=lu(),f=bu(),m=Sd();function v(u,E){const p=(0,f.getTransactionType)(u);return p==="eip1559"?_(u,E):p==="eip2930"?j(u,E):p==="eip4844"?b(u,E):p==="eip7702"?h(u,E):g(u,E)}function h(u,E){const{authorizationList:p,chainId:y,gas:A,nonce:w,to:T,value:O,maxFeePerGas:B,maxPriorityFeePerGas:S,accessList:x,data:k}=u;(0,l.assertTransactionEIP7702)(u);const C=(0,m.serializeAccessList)(x),I=(0,r.serializeAuthorizationList)(p);return(0,o.concatHex)(["0x04",(0,d.toRlp)([(0,c.numberToHex)(y),w?(0,c.numberToHex)(w):"0x",S?(0,c.numberToHex)(S):"0x",B?(0,c.numberToHex)(B):"0x",A?(0,c.numberToHex)(A):"0x",T??"0x",O?(0,c.numberToHex)(O):"0x",k??"0x",C,I,...P(u,E)])])}function b(u,E){const{chainId:p,gas:y,nonce:A,to:w,value:T,maxFeePerBlobGas:O,maxFeePerGas:B,maxPriorityFeePerGas:S,accessList:x,data:k}=u;(0,l.assertTransactionEIP4844)(u);let C=u.blobVersionedHashes,I=u.sidecars;if(u.blobs&&(typeof C>"u"||typeof I>"u")){const N=typeof u.blobs[0]=="string"?u.blobs:u.blobs.map(U=>(0,c.bytesToHex)(U)),z=u.kzg,$=(0,n.blobsToCommitments)({blobs:N,kzg:z});if(typeof C>"u"&&(C=(0,i.commitmentsToVersionedHashes)({commitments:$})),typeof I>"u"){const U=(0,t.blobsToProofs)({blobs:N,commitments:$,kzg:z});I=(0,s.toBlobSidecars)({blobs:N,commitments:$,proofs:U})}}const F=(0,m.serializeAccessList)(x),R=[(0,c.numberToHex)(p),A?(0,c.numberToHex)(A):"0x",S?(0,c.numberToHex)(S):"0x",B?(0,c.numberToHex)(B):"0x",y?(0,c.numberToHex)(y):"0x",w??"0x",T?(0,c.numberToHex)(T):"0x",k??"0x",F,O?(0,c.numberToHex)(O):"0x",C??[],...P(u,E)],q=[],M=[],H=[];if(I)for(let N=0;N<I.length;N++){const{blob:z,commitment:$,proof:U}=I[N];q.push(z),M.push($),H.push(U)}return(0,o.concatHex)(["0x03",I?(0,d.toRlp)([R,q,M,H]):(0,d.toRlp)(R)])}function _(u,E){const{chainId:p,gas:y,nonce:A,to:w,value:T,maxFeePerGas:O,maxPriorityFeePerGas:B,accessList:S,data:x}=u;(0,l.assertTransactionEIP1559)(u);const k=(0,m.serializeAccessList)(S),C=[(0,c.numberToHex)(p),A?(0,c.numberToHex)(A):"0x",B?(0,c.numberToHex)(B):"0x",O?(0,c.numberToHex)(O):"0x",y?(0,c.numberToHex)(y):"0x",w??"0x",T?(0,c.numberToHex)(T):"0x",x??"0x",k,...P(u,E)];return(0,o.concatHex)(["0x02",(0,d.toRlp)(C)])}function j(u,E){const{chainId:p,gas:y,data:A,nonce:w,to:T,value:O,accessList:B,gasPrice:S}=u;(0,l.assertTransactionEIP2930)(u);const x=(0,m.serializeAccessList)(B),k=[(0,c.numberToHex)(p),w?(0,c.numberToHex)(w):"0x",S?(0,c.numberToHex)(S):"0x",y?(0,c.numberToHex)(y):"0x",T??"0x",O?(0,c.numberToHex)(O):"0x",A??"0x",x,...P(u,E)];return(0,o.concatHex)(["0x01",(0,d.toRlp)(k)])}function g(u,E){const{chainId:p=0,gas:y,data:A,nonce:w,to:T,value:O,gasPrice:B}=u;(0,l.assertTransactionLegacy)(u);let S=[w?(0,c.numberToHex)(w):"0x",B?(0,c.numberToHex)(B):"0x",y?(0,c.numberToHex)(y):"0x",T??"0x",O?(0,c.numberToHex)(O):"0x",A??"0x"];if(E){const x=(()=>{if(E.v>=35n)return(E.v-35n)/2n>0?E.v:27n+(E.v===35n?0n:1n);if(p>0)return BigInt(p*2)+BigInt(35n+E.v-27n);const I=27n+(E.v===27n?0n:1n);if(E.v!==I)throw new e.InvalidLegacyVError({v:E.v});return I})(),k=(0,a.trim)(E.r),C=(0,a.trim)(E.s);S=[...S,(0,c.numberToHex)(x),k==="0x00"?"0x":k,C==="0x00"?"0x":C]}else p>0&&(S=[...S,(0,c.numberToHex)(p),"0x","0x"]);return(0,d.toRlp)(S)}function P(u,E){const p=E??u,{v:y,yParity:A}=p;if(typeof p.r>"u")return[];if(typeof p.s>"u")return[];if(typeof y>"u"&&typeof A>"u")return[];const w=(0,a.trim)(p.r),T=(0,a.trim)(p.s);return[(()=>typeof A=="number"?A?(0,c.numberToHex)(1):"0x":y===0n?"0x":y===1n?(0,c.numberToHex)(1):y===27n?"0x":(0,c.numberToHex)(1))(),w==="0x00"?"0x":w,T==="0x00"?"0x":T]}return An}var vi={},al;function vo(){if(al)return vi;al=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.assertCurrentChain=r;const e=_o();function r({chain:n,currentChainId:t}){if(!n)throw new e.ChainNotFoundError;if(t!==n.id)throw new e.ChainMismatchError({chain:n,currentChainId:t})}return vi}var Ei={},sl;function up(){if(sl)return Ei;sl=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.extractChain=e;function e({chains:r,id:n}){return r.find(t=>t.id===n)}return Ei}var ji={},cl;function or(){if(cl)return ji;cl=1,Object.defineProperty(ji,"__esModule",{value:!0}),ji.getChainContractAddress=r;const e=_o();function r({blockNumber:n,chain:t,contract:i}){var o;const s=(o=t==null?void 0:t.contracts)==null?void 0:o[i];if(!s)throw new e.ChainDoesNotSupportContract({chain:t,contract:{name:i}});if(n&&s.blockCreated&&s.blockCreated>n)throw new e.ChainDoesNotSupportContract({blockNumber:n,chain:t,contract:{name:i,blockCreated:s.blockCreated}});return s.address}return ji}var wi={},ul;function Ae(){if(ul)return wi;ul=1,Object.defineProperty(wi,"__esModule",{value:!0}),wi.parseAccount=e;function e(r){return typeof r=="string"?{address:r,type:"json-rpc"}:r}return wi}var _r={},dl;function ir(){if(dl)return _r;dl=1,Object.defineProperty(_r,"__esModule",{value:!0}),_r.AccountTypeNotSupportedError=_r.AccountNotFoundError=void 0;const e=ue();class r extends e.BaseError{constructor({docsPath:i}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
|
|
10
|
+
`),{docsPath:i,docsSlug:"account",name:"AccountNotFoundError"})}}_r.AccountNotFoundError=r;class n extends e.BaseError{constructor({docsPath:i,metaMessages:s,type:o}){super(`Account type "${o}" is not supported.`,{docsPath:i,metaMessages:s,name:"AccountTypeNotSupportedError"})}}return _r.AccountTypeNotSupportedError=n,_r}var Pi={},ze={},Ht={},fl;function Bd(){return fl||(fl=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.solidityPanic=Ht.solidityError=Ht.panicReasons=void 0,Ht.panicReasons={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},Ht.solidityError={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},Ht.solidityPanic={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}),Ht}var Ai={},ae={},On={},ll;function Gt(){if(ll)return On;ll=1,Object.defineProperty(On,"__esModule",{value:!0}),On.formatAbiItem=r,On.formatAbiParams=n;const e=Te();function r(i,{includeName:s=!1}={}){if(i.type!=="function"&&i.type!=="event"&&i.type!=="error")throw new e.InvalidDefinitionTypeError(i.type);return`${i.name}(${n(i.inputs,{includeName:s})})`}function n(i,{includeName:s=!1}={}){return i?i.map(o=>t(o,{includeName:s})).join(s?", ":","):""}function t(i,{includeName:s}){return i.type.startsWith("tuple")?`(${n(i.components,{includeName:s})})${i.type.slice(5)}`:i.type+(s&&i.name?` ${i.name}`:"")}return On}var bl;function Te(){if(bl)return ae;bl=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.UnsupportedPackedAbiType=ae.InvalidDefinitionTypeError=ae.InvalidArrayError=ae.InvalidAbiDecodingTypeError=ae.InvalidAbiEncodingTypeError=ae.DecodeLogTopicsMismatch=ae.DecodeLogDataMismatch=ae.BytesSizeMismatchError=ae.AbiItemAmbiguityError=ae.AbiFunctionSignatureNotFoundError=ae.AbiFunctionOutputsNotFoundError=ae.AbiFunctionNotFoundError=ae.AbiEventNotFoundError=ae.AbiEventSignatureNotFoundError=ae.AbiEventSignatureEmptyTopicsError=ae.AbiErrorSignatureNotFoundError=ae.AbiErrorNotFoundError=ae.AbiErrorInputsNotFoundError=ae.AbiEncodingLengthMismatchError=ae.AbiEncodingBytesSizeMismatchError=ae.AbiEncodingArrayLengthMismatchError=ae.AbiDecodingZeroDataError=ae.AbiDecodingDataSizeTooSmallError=ae.AbiDecodingDataSizeInvalidError=ae.AbiConstructorParamsNotFoundError=ae.AbiConstructorNotFoundError=void 0;const e=Gt(),r=Ye(),n=ue();class t extends n.BaseError{constructor({docsPath:x}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
|
|
11
|
+
`),{docsPath:x,name:"AbiConstructorNotFoundError"})}}ae.AbiConstructorNotFoundError=t;class i extends n.BaseError{constructor({docsPath:x}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
|
|
12
|
+
`),{docsPath:x,name:"AbiConstructorParamsNotFoundError"})}}ae.AbiConstructorParamsNotFoundError=i;class s extends n.BaseError{constructor({data:x,size:k}){super([`Data size of ${k} bytes is invalid.`,"Size must be in increments of 32 bytes (size % 32 === 0)."].join(`
|
|
13
|
+
`),{metaMessages:[`Data: ${x} (${k} bytes)`],name:"AbiDecodingDataSizeInvalidError"})}}ae.AbiDecodingDataSizeInvalidError=s;class o extends n.BaseError{constructor({data:x,params:k,size:C}){super([`Data size of ${C} bytes is too small for given parameters.`].join(`
|
|
14
|
+
`),{metaMessages:[`Params: (${(0,e.formatAbiParams)(k,{includeName:!0})})`,`Data: ${x} (${C} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=x,this.params=k,this.size=C}}ae.AbiDecodingDataSizeTooSmallError=o;class a extends n.BaseError{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}ae.AbiDecodingZeroDataError=a;class c extends n.BaseError{constructor({expectedLength:x,givenLength:k,type:C}){super([`ABI encoding array length mismatch for type ${C}.`,`Expected length: ${x}`,`Given length: ${k}`].join(`
|
|
15
|
+
`),{name:"AbiEncodingArrayLengthMismatchError"})}}ae.AbiEncodingArrayLengthMismatchError=c;class d extends n.BaseError{constructor({expectedSize:x,value:k}){super(`Size of bytes "${k}" (bytes${(0,r.size)(k)}) does not match expected size (bytes${x}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}ae.AbiEncodingBytesSizeMismatchError=d;class l extends n.BaseError{constructor({expectedLength:x,givenLength:k}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${x}`,`Given length (values): ${k}`].join(`
|
|
16
|
+
`),{name:"AbiEncodingLengthMismatchError"})}}ae.AbiEncodingLengthMismatchError=l;class f extends n.BaseError{constructor(x,{docsPath:k}){super([`Arguments (\`args\`) were provided to "${x}", but "${x}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(`
|
|
17
|
+
`),{docsPath:k,name:"AbiErrorInputsNotFoundError"})}}ae.AbiErrorInputsNotFoundError=f;class m extends n.BaseError{constructor(x,{docsPath:k}={}){super([`Error ${x?`"${x}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(`
|
|
18
|
+
`),{docsPath:k,name:"AbiErrorNotFoundError"})}}ae.AbiErrorNotFoundError=m;class v extends n.BaseError{constructor(x,{docsPath:k}){super([`Encoded error signature "${x}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${x}.`].join(`
|
|
19
|
+
`),{docsPath:k,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=x}}ae.AbiErrorSignatureNotFoundError=v;class h extends n.BaseError{constructor({docsPath:x}){super("Cannot extract event signature from empty topics.",{docsPath:x,name:"AbiEventSignatureEmptyTopicsError"})}}ae.AbiEventSignatureEmptyTopicsError=h;class b extends n.BaseError{constructor(x,{docsPath:k}){super([`Encoded event signature "${x}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${x}.`].join(`
|
|
20
|
+
`),{docsPath:k,name:"AbiEventSignatureNotFoundError"})}}ae.AbiEventSignatureNotFoundError=b;class _ extends n.BaseError{constructor(x,{docsPath:k}={}){super([`Event ${x?`"${x}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(`
|
|
21
|
+
`),{docsPath:k,name:"AbiEventNotFoundError"})}}ae.AbiEventNotFoundError=_;class j extends n.BaseError{constructor(x,{docsPath:k}={}){super([`Function ${x?`"${x}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
|
|
22
|
+
`),{docsPath:k,name:"AbiFunctionNotFoundError"})}}ae.AbiFunctionNotFoundError=j;class g extends n.BaseError{constructor(x,{docsPath:k}){super([`Function "${x}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(`
|
|
23
|
+
`),{docsPath:k,name:"AbiFunctionOutputsNotFoundError"})}}ae.AbiFunctionOutputsNotFoundError=g;class P extends n.BaseError{constructor(x,{docsPath:k}){super([`Encoded function signature "${x}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${x}.`].join(`
|
|
24
|
+
`),{docsPath:k,name:"AbiFunctionSignatureNotFoundError"})}}ae.AbiFunctionSignatureNotFoundError=P;class u extends n.BaseError{constructor(x,k){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${x.type}\` in \`${(0,e.formatAbiItem)(x.abiItem)}\`, and`,`\`${k.type}\` in \`${(0,e.formatAbiItem)(k.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}ae.AbiItemAmbiguityError=u;class E extends n.BaseError{constructor({expectedSize:x,givenSize:k}){super(`Expected bytes${x}, got bytes${k}.`,{name:"BytesSizeMismatchError"})}}ae.BytesSizeMismatchError=E;class p extends n.BaseError{constructor({abiItem:x,data:k,params:C,size:I}){super([`Data size of ${I} bytes is too small for non-indexed event parameters.`].join(`
|
|
25
|
+
`),{metaMessages:[`Params: (${(0,e.formatAbiParams)(C,{includeName:!0})})`,`Data: ${k} (${I} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=x,this.data=k,this.params=C,this.size=I}}ae.DecodeLogDataMismatch=p;class y extends n.BaseError{constructor({abiItem:x,param:k}){super([`Expected a topic for indexed event parameter${k.name?` "${k.name}"`:""} on event "${(0,e.formatAbiItem)(x,{includeName:!0})}".`].join(`
|
|
26
|
+
`),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=x}}ae.DecodeLogTopicsMismatch=y;class A extends n.BaseError{constructor(x,{docsPath:k}){super([`Type "${x}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
|
|
27
|
+
`),{docsPath:k,name:"InvalidAbiEncodingType"})}}ae.InvalidAbiEncodingTypeError=A;class w extends n.BaseError{constructor(x,{docsPath:k}){super([`Type "${x}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
|
|
28
|
+
`),{docsPath:k,name:"InvalidAbiDecodingType"})}}ae.InvalidAbiDecodingTypeError=w;class T extends n.BaseError{constructor(x){super([`Value "${x}" is not a valid array.`].join(`
|
|
29
|
+
`),{name:"InvalidArrayError"})}}ae.InvalidArrayError=T;class O extends n.BaseError{constructor(x){super([`"${x}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
|
|
30
|
+
`),{name:"InvalidDefinitionTypeError"})}}ae.InvalidDefinitionTypeError=O;class B extends n.BaseError{constructor(x){super(`Type "${x}" is not supported for packed encoding.`,{name:"UnsupportedPackedAbiType"})}}return ae.UnsupportedPackedAbiType=B,ae}var xn={},Ti={},Ii={},ml;function E_(){if(ml)return Ii;ml=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.hashSignature=t;const e=_e(),r=Xe(),n=i=>(0,r.keccak256)((0,e.toBytes)(i));function t(i){return n(i)}return Ii}var Cn={},Si={},yl;function j_(){if(yl)return Si;yl=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.normalizeSignature=r;const e=ue();function r(n){let t=!0,i="",s=0,o="",a=!1;for(let c=0;c<n.length;c++){const d=n[c];if(["(",")",","].includes(d)&&(t=!0),d==="("&&s++,d===")"&&s--,!!t){if(s===0){if(d===" "&&["event","function",""].includes(o))o="";else if(o+=d,d===")"){a=!0;break}continue}if(d===" "){n[c-1]!==","&&i!==","&&i!==",("&&(i="",t=!1);continue}o+=d,i+=d}}if(!a)throw new e.BaseError("Unable to normalize signature.");return o}return Si}var hl;function Rd(){if(hl)return Cn;hl=1,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.toSignature=void 0;const e=tr(),r=j_(),n=t=>{const i=(()=>typeof t=="string"?t:(0,e.formatAbiItem)(t))();return(0,r.normalizeSignature)(i)};return Cn.toSignature=n,Cn}var pl;function yu(){if(pl)return Ti;pl=1,Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.toSignatureHash=n;const e=E_(),r=Rd();function n(t){return(0,e.hashSignature)((0,r.toSignature)(t))}return Ti}var gl;function xr(){if(gl)return xn;gl=1,Object.defineProperty(xn,"__esModule",{value:!0}),xn.toFunctionSelector=void 0;const e=ft(),r=yu(),n=t=>(0,e.slice)((0,r.toSignatureHash)(t),0,4);return xn.toFunctionSelector=n,xn}var Bi={},Jt={},_l;function Od(){if(_l)return Jt;_l=1,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.fromBytes=i,Jt.bytesToBigInt=s,Jt.bytesToBool=o,Jt.bytesToNumber=a,Jt.bytesToString=c;const e=cn(),r=Ut(),n=Be(),t=te();function i(d,l){const f=typeof l=="string"?{to:l}:l,m=f.to;return m==="number"?a(d,f):m==="bigint"?s(d,f):m==="boolean"?o(d,f):m==="string"?c(d,f):(0,t.bytesToHex)(d,f)}function s(d,l={}){typeof l.size<"u"&&(0,n.assertSize)(d,{size:l.size});const f=(0,t.bytesToHex)(d,l);return(0,n.hexToBigInt)(f,l)}function o(d,l={}){let f=d;if(typeof l.size<"u"&&((0,n.assertSize)(f,{size:l.size}),f=(0,r.trim)(f)),f.length>1||f[0]>1)throw new e.InvalidBytesBooleanError(f);return!!f[0]}function a(d,l={}){typeof l.size<"u"&&(0,n.assertSize)(d,{size:l.size});const f=(0,t.bytesToHex)(d,l);return(0,n.hexToNumber)(f,l)}function c(d,l={}){let f=d;return typeof l.size<"u"&&((0,n.assertSize)(f,{size:l.size}),f=(0,r.trim)(f,{dir:"right"})),new TextDecoder().decode(f)}return Jt}var qn={},Ft={},vl;function hu(){return vl||(vl=1,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.integerRegex=Ft.bytesRegex=Ft.arrayRegex=void 0,Ft.arrayRegex=/^(.*)\[([0-9]*)\]$/,Ft.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Ft.integerRegex=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/),Ft}var El;function Et(){if(El)return qn;El=1,Object.defineProperty(qn,"__esModule",{value:!0}),qn.encodeAbiParameters=f,qn.getArrayComponents=p;const e=Te(),r=vt(),n=ue(),t=cn(),i=Qe(),s=Me(),o=rr(),a=Ye(),c=ft(),d=te(),l=hu();function f(y,A){if(y.length!==A.length)throw new e.AbiEncodingLengthMismatchError({expectedLength:y.length,givenLength:A.length});const w=m({params:y,values:A}),T=h(w);return T.length===0?"0x":T}function m({params:y,values:A}){const w=[];for(let T=0;T<y.length;T++)w.push(v({param:y[T],value:A[T]}));return w}function v({param:y,value:A}){const w=p(y.type);if(w){const[T,O]=w;return _(A,{length:T,param:{...y,type:O}})}if(y.type==="tuple")return E(A,{param:y});if(y.type==="address")return b(A);if(y.type==="bool")return g(A);if(y.type.startsWith("uint")||y.type.startsWith("int")){const T=y.type.startsWith("int"),[,,O="256"]=l.integerRegex.exec(y.type)??[];return P(A,{signed:T,size:Number(O)})}if(y.type.startsWith("bytes"))return j(A,{param:y});if(y.type==="string")return u(A);throw new e.InvalidAbiEncodingTypeError(y.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function h(y){let A=0;for(let B=0;B<y.length;B++){const{dynamic:S,encoded:x}=y[B];S?A+=32:A+=(0,a.size)(x)}const w=[],T=[];let O=0;for(let B=0;B<y.length;B++){const{dynamic:S,encoded:x}=y[B];S?(w.push((0,d.numberToHex)(A+O,{size:32})),T.push(x),O+=(0,a.size)(x)):w.push(x)}return(0,s.concat)([...w,...T])}function b(y){if(!(0,i.isAddress)(y))throw new r.InvalidAddressError({address:y});return{dynamic:!1,encoded:(0,o.padHex)(y.toLowerCase())}}function _(y,{length:A,param:w}){const T=A===null;if(!Array.isArray(y))throw new e.InvalidArrayError(y);if(!T&&y.length!==A)throw new e.AbiEncodingArrayLengthMismatchError({expectedLength:A,givenLength:y.length,type:`${w.type}[${A}]`});let O=!1;const B=[];for(let S=0;S<y.length;S++){const x=v({param:w,value:y[S]});x.dynamic&&(O=!0),B.push(x)}if(T||O){const S=h(B);if(T){const x=(0,d.numberToHex)(B.length,{size:32});return{dynamic:!0,encoded:B.length>0?(0,s.concat)([x,S]):x}}if(O)return{dynamic:!0,encoded:S}}return{dynamic:!1,encoded:(0,s.concat)(B.map(({encoded:S})=>S))}}function j(y,{param:A}){const[,w]=A.type.split("bytes"),T=(0,a.size)(y);if(!w){let O=y;return T%32!==0&&(O=(0,o.padHex)(O,{dir:"right",size:Math.ceil((y.length-2)/2/32)*32})),{dynamic:!0,encoded:(0,s.concat)([(0,o.padHex)((0,d.numberToHex)(T,{size:32})),O])}}if(T!==Number.parseInt(w,10))throw new e.AbiEncodingBytesSizeMismatchError({expectedSize:Number.parseInt(w,10),value:y});return{dynamic:!1,encoded:(0,o.padHex)(y,{dir:"right"})}}function g(y){if(typeof y!="boolean")throw new n.BaseError(`Invalid boolean value: "${y}" (type: ${typeof y}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:(0,o.padHex)((0,d.boolToHex)(y))}}function P(y,{signed:A,size:w=256}){if(typeof w=="number"){const T=2n**(BigInt(w)-(A?1n:0n))-1n,O=A?-T-1n:0n;if(y>T||y<O)throw new t.IntegerOutOfRangeError({max:T.toString(),min:O.toString(),signed:A,size:w/8,value:y.toString()})}return{dynamic:!1,encoded:(0,d.numberToHex)(y,{size:32,signed:A})}}function u(y){const A=(0,d.stringToHex)(y),w=Math.ceil((0,a.size)(A)/32),T=[];for(let O=0;O<w;O++)T.push((0,o.padHex)((0,c.slice)(A,O*32,(O+1)*32),{dir:"right"}));return{dynamic:!0,encoded:(0,s.concat)([(0,o.padHex)((0,d.numberToHex)((0,a.size)(A),{size:32})),...T])}}function E(y,{param:A}){let w=!1;const T=[];for(let O=0;O<A.components.length;O++){const B=A.components[O],S=Array.isArray(y)?O:B.name,x=v({param:B,value:y[S]});T.push(x),x.dynamic&&(w=!0)}return{dynamic:w,encoded:w?h(T):(0,s.concat)(T.map(({encoded:O})=>O))}}function p(y){const A=y.match(/^(.*)\[(\d+)?\]$/);return A?[A[2]?Number(A[2]):null,A[1]]:void 0}return qn}var jl;function ar(){if(jl)return Bi;jl=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.decodeAbiParameters=l;const e=Te(),r=at(),n=yo(),t=Ye(),i=ft(),s=Ut(),o=Od(),a=_e(),c=te(),d=Et();function l(p,y){const A=typeof y=="string"?(0,a.hexToBytes)(y):y,w=(0,n.createCursor)(A);if((0,t.size)(A)===0&&p.length>0)throw new e.AbiDecodingZeroDataError;if((0,t.size)(y)&&(0,t.size)(y)<32)throw new e.AbiDecodingDataSizeTooSmallError({data:typeof y=="string"?y:(0,c.bytesToHex)(y),params:p,size:(0,t.size)(y)});let T=0;const O=[];for(let B=0;B<p.length;++B){const S=p[B];w.setPosition(T);const[x,k]=f(w,S,{staticPosition:0});T+=k,O.push(x)}return O}function f(p,y,{staticPosition:A}){const w=(0,d.getArrayComponents)(y.type);if(w){const[T,O]=w;return b(p,{...y,type:O},{length:T,staticPosition:A})}if(y.type==="tuple")return P(p,y,{staticPosition:A});if(y.type==="address")return h(p);if(y.type==="bool")return _(p);if(y.type.startsWith("bytes"))return j(p,y,{staticPosition:A});if(y.type.startsWith("uint")||y.type.startsWith("int"))return g(p,y);if(y.type==="string")return u(p,{staticPosition:A});throw new e.InvalidAbiDecodingTypeError(y.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const m=32,v=32;function h(p){const y=p.readBytes(32);return[(0,r.checksumAddress)((0,c.bytesToHex)((0,i.sliceBytes)(y,-20))),32]}function b(p,y,{length:A,staticPosition:w}){if(!A){const B=(0,o.bytesToNumber)(p.readBytes(v)),S=w+B,x=S+m;p.setPosition(S);const k=(0,o.bytesToNumber)(p.readBytes(m)),C=E(y);let I=0;const F=[];for(let R=0;R<k;++R){p.setPosition(x+(C?R*32:I));const[q,M]=f(p,y,{staticPosition:x});I+=M,F.push(q)}return p.setPosition(w+32),[F,32]}if(E(y)){const B=(0,o.bytesToNumber)(p.readBytes(v)),S=w+B,x=[];for(let k=0;k<A;++k){p.setPosition(S+k*32);const[C]=f(p,y,{staticPosition:S});x.push(C)}return p.setPosition(w+32),[x,32]}let T=0;const O=[];for(let B=0;B<A;++B){const[S,x]=f(p,y,{staticPosition:w+T});T+=x,O.push(S)}return[O,T]}function _(p){return[(0,o.bytesToBool)(p.readBytes(32),{size:32}),32]}function j(p,y,{staticPosition:A}){const[w,T]=y.type.split("bytes");if(!T){const B=(0,o.bytesToNumber)(p.readBytes(32));p.setPosition(A+B);const S=(0,o.bytesToNumber)(p.readBytes(32));if(S===0)return p.setPosition(A+32),["0x",32];const x=p.readBytes(S);return p.setPosition(A+32),[(0,c.bytesToHex)(x),32]}return[(0,c.bytesToHex)(p.readBytes(Number.parseInt(T,10),32)),32]}function g(p,y){const A=y.type.startsWith("int"),w=Number.parseInt(y.type.split("int")[1]||"256",10),T=p.readBytes(32);return[w>48?(0,o.bytesToBigInt)(T,{signed:A}):(0,o.bytesToNumber)(T,{signed:A}),32]}function P(p,y,{staticPosition:A}){const w=y.components.length===0||y.components.some(({name:B})=>!B),T=w?[]:{};let O=0;if(E(y)){const B=(0,o.bytesToNumber)(p.readBytes(v)),S=A+B;for(let x=0;x<y.components.length;++x){const k=y.components[x];p.setPosition(S+O);const[C,I]=f(p,k,{staticPosition:S});O+=I,T[w?x:k==null?void 0:k.name]=C}return p.setPosition(A+32),[T,32]}for(let B=0;B<y.components.length;++B){const S=y.components[B],[x,k]=f(p,S,{staticPosition:A});T[w?B:S==null?void 0:S.name]=x,O+=k}return[T,O]}function u(p,{staticPosition:y}){const A=(0,o.bytesToNumber)(p.readBytes(32)),w=y+A;p.setPosition(w);const T=(0,o.bytesToNumber)(p.readBytes(32));if(T===0)return p.setPosition(y+32),["",32];const O=p.readBytes(T,32),B=(0,o.bytesToString)((0,s.trim)(O));return p.setPosition(y+32),[B,32]}function E(p){var w;const{type:y}=p;if(y==="string"||y==="bytes"||y.endsWith("[]"))return!0;if(y==="tuple")return(w=p.components)==null?void 0:w.some(E);const A=(0,d.getArrayComponents)(p.type);return!!(A&&E({...p,type:A[1]}))}return Bi}var wl;function pu(){if(wl)return Ai;wl=1,Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.decodeErrorResult=o;const e=Bd(),r=Te(),n=ft(),t=xr(),i=ar(),s=Gt();function o(a){const{abi:c,data:d}=a,l=(0,n.slice)(d,0,4);if(l==="0x")throw new r.AbiDecodingZeroDataError;const m=[...c||[],e.solidityError,e.solidityPanic].find(v=>v.type==="error"&&l===(0,t.toFunctionSelector)((0,s.formatAbiItem)(v)));if(!m)throw new r.AbiErrorSignatureNotFoundError(l,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:m,args:"inputs"in m&&m.inputs&&m.inputs.length>0?(0,i.decodeAbiParameters)(m.inputs,(0,n.slice)(d,4)):void 0,errorName:m.name}}return Ai}var Ri={},Mn={},Pl;function ke(){if(Pl)return Mn;Pl=1,Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.stringify=void 0;const e=(r,n,t)=>JSON.stringify(r,(i,s)=>{const o=typeof s=="bigint"?s.toString():s;return typeof n=="function"?n(i,o):o},t);return Mn.stringify=e,Mn}var Al;function dp(){if(Al)return Ri;Al=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.formatAbiItemWithArgs=r;const e=ke();function r({abiItem:n,args:t,includeFunctionName:i=!0,includeName:s=!1}){if("name"in n&&"inputs"in n&&n.inputs)return`${i?n.name:""}(${n.inputs.map((o,a)=>`${s&&o.name?`${o.name}: `:""}${typeof t[a]=="object"?(0,e.stringify)(t[a]):t[a]}`).join(", ")})`}return Ri}var Vr={},Hn={},Tl;function dn(){if(Tl)return Hn;Tl=1,Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.toEventSelector=void 0;const e=yu();return Hn.toEventSelector=e.toSignatureHash,Hn}var Il;function Vt(){if(Il)return Vr;Il=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.getAbiItem=s,Vr.isArgOfType=o,Vr.getAmbiguousTypes=a;const e=Te(),r=Ge(),n=Qe(),t=dn(),i=xr();function s(c){const{abi:d,args:l=[],name:f}=c,m=(0,r.isHex)(f,{strict:!1}),v=d.filter(b=>m?b.type==="function"?(0,i.toFunctionSelector)(b)===f:b.type==="event"?(0,t.toEventSelector)(b)===f:!1:"name"in b&&b.name===f);if(v.length===0)return;if(v.length===1)return v[0];let h;for(const b of v){if(!("inputs"in b))continue;if(!l||l.length===0){if(!b.inputs||b.inputs.length===0)return b;continue}if(!b.inputs||b.inputs.length===0||b.inputs.length!==l.length)continue;if(l.every((j,g)=>{const P="inputs"in b&&b.inputs[g];return P?o(j,P):!1})){if(h&&"inputs"in h&&h.inputs){const j=a(b.inputs,h.inputs,l);if(j)throw new e.AbiItemAmbiguityError({abiItem:b,type:j[0]},{abiItem:h,type:j[1]})}h=b}}return h||v[0]}function o(c,d){const l=typeof c,f=d.type;switch(f){case"address":return(0,n.isAddress)(c,{strict:!1});case"bool":return l==="boolean";case"function":return l==="string";case"string":return l==="string";default:return f==="tuple"&&"components"in d?Object.values(d.components).every((m,v)=>o(Object.values(c)[v],m)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(f)?l==="number"||l==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(f)?l==="string"||c instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(f)?Array.isArray(c)&&c.every(m=>o(m,{...d,type:f.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function a(c,d,l){for(const f in c){const m=c[f],v=d[f];if(m.type==="tuple"&&v.type==="tuple"&&"components"in m&&"components"in v)return a(m.components,v.components,l[f]);const h=[m.type,v.type];if((()=>h.includes("address")&&h.includes("bytes20")?!0:h.includes("address")&&h.includes("string")?(0,n.isAddress)(l[f],{strict:!1}):h.includes("address")&&h.includes("bytes")?(0,n.isAddress)(l[f],{strict:!1}):!1)())return h}}return Vr}var kt={},Sl;function xd(){if(Sl)return kt;Sl=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.StateAssignmentConflictError=kt.AccountStateConflictError=void 0,kt.prettyStateMapping=t,kt.prettyStateOverride=i;const e=ue();class r extends e.BaseError{constructor({address:o}){super(`State for account "${o}" is set multiple times.`,{name:"AccountStateConflictError"})}}kt.AccountStateConflictError=r;class n extends e.BaseError{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}kt.StateAssignmentConflictError=n;function t(s){return s.reduce((o,{slot:a,value:c})=>`${o} ${a}: ${c}
|
|
31
|
+
`,"")}function i(s){return s.reduce((o,{address:a,...c})=>{let d=`${o} ${a}:
|
|
32
|
+
`;return c.nonce&&(d+=` nonce: ${c.nonce}
|
|
33
|
+
`),c.balance&&(d+=` balance: ${c.balance}
|
|
34
|
+
`),c.code&&(d+=` code: ${c.code}
|
|
35
|
+
`),c.state&&(d+=` state:
|
|
36
|
+
`,d+=t(c.state)),c.stateDiff&&(d+=` stateDiff:
|
|
37
|
+
`,d+=t(c.stateDiff)),d},` State Override:
|
|
38
|
+
`).slice(0,-1)}return kt}var vr={},Bl;function Cd(){if(Bl)return vr;Bl=1,Object.defineProperty(vr,"__esModule",{value:!0}),vr.getUrl=vr.getContractAddress=void 0;const e=n=>n;vr.getContractAddress=e;const r=n=>n;return vr.getUrl=r,vr}var Rl;function sr(){if(Rl)return ze;Rl=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.RawContractError=ze.CounterfactualDeploymentFailedError=ze.ContractFunctionZeroDataError=ze.ContractFunctionRevertedError=ze.ContractFunctionExecutionError=ze.CallExecutionError=void 0;const e=Ae(),r=Bd(),n=pu(),t=Gt(),i=dp(),s=Vt(),o=go(),a=Rr(),c=Te(),d=ue(),l=xd(),f=Je(),m=Cd();class v extends d.BaseError{constructor(u,{account:E,docsPath:p,chain:y,data:A,gas:w,gasPrice:T,maxFeePerGas:O,maxPriorityFeePerGas:B,nonce:S,to:x,value:k,stateOverride:C}){var R;const I=E?(0,e.parseAccount)(E):void 0;let F=(0,f.prettyPrint)({from:I==null?void 0:I.address,to:x,value:typeof k<"u"&&`${(0,o.formatEther)(k)} ${((R=y==null?void 0:y.nativeCurrency)==null?void 0:R.symbol)||"ETH"}`,data:A,gas:w,gasPrice:typeof T<"u"&&`${(0,a.formatGwei)(T)} gwei`,maxFeePerGas:typeof O<"u"&&`${(0,a.formatGwei)(O)} gwei`,maxPriorityFeePerGas:typeof B<"u"&&`${(0,a.formatGwei)(B)} gwei`,nonce:S});C&&(F+=`
|
|
39
|
+
${(0,l.prettyStateOverride)(C)}`),super(u.shortMessage,{cause:u,docsPath:p,metaMessages:[...u.metaMessages?[...u.metaMessages," "]:[],"Raw Call Arguments:",F].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=u}}ze.CallExecutionError=v;class h extends d.BaseError{constructor(u,{abi:E,args:p,contractAddress:y,docsPath:A,functionName:w,sender:T}){const O=(0,s.getAbiItem)({abi:E,args:p,name:w}),B=O?(0,i.formatAbiItemWithArgs)({abiItem:O,args:p,includeFunctionName:!1,includeName:!1}):void 0,S=O?(0,t.formatAbiItem)(O,{includeName:!0}):void 0,x=(0,f.prettyPrint)({address:y&&(0,m.getContractAddress)(y),function:S,args:B&&B!=="()"&&`${[...Array((w==null?void 0:w.length)??0).keys()].map(()=>" ").join("")}${B}`,sender:T});super(u.shortMessage||`An unknown error occurred while executing the contract function "${w}".`,{cause:u,docsPath:A,metaMessages:[...u.metaMessages?[...u.metaMessages," "]:[],x&&"Contract Call:",x].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=E,this.args=p,this.cause=u,this.contractAddress=y,this.functionName=w,this.sender=T}}ze.ContractFunctionExecutionError=h;class b extends d.BaseError{constructor({abi:u,data:E,functionName:p,message:y}){let A,w,T,O;if(E&&E!=="0x")try{w=(0,n.decodeErrorResult)({abi:u,data:E});const{abiItem:S,errorName:x,args:k}=w;if(x==="Error")O=k[0];else if(x==="Panic"){const[C]=k;O=r.panicReasons[C]}else{const C=S?(0,t.formatAbiItem)(S,{includeName:!0}):void 0,I=S&&k?(0,i.formatAbiItemWithArgs)({abiItem:S,args:k,includeFunctionName:!1,includeName:!1}):void 0;T=[C?`Error: ${C}`:"",I&&I!=="()"?` ${[...Array((x==null?void 0:x.length)??0).keys()].map(()=>" ").join("")}${I}`:""]}}catch(S){A=S}else y&&(O=y);let B;A instanceof c.AbiErrorSignatureNotFoundError&&(B=A.signature,T=[`Unable to decode signature "${B}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${B}.`]),super(O&&O!=="execution reverted"||B?[`The contract function "${p}" reverted with the following ${B?"signature":"reason"}:`,O||B].join(`
|
|
40
|
+
`):`The contract function "${p}" reverted.`,{cause:A,metaMessages:T,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=w,this.raw=E,this.reason=O,this.signature=B}}ze.ContractFunctionRevertedError=b;class _ extends d.BaseError{constructor({functionName:u}){super(`The contract function "${u}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${u}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}ze.ContractFunctionZeroDataError=_;class j extends d.BaseError{constructor({factory:u}){super(`Deployment for counterfactual contract call failed${u?` for factory "${u}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}ze.CounterfactualDeploymentFailedError=j;class g extends d.BaseError{constructor({data:u,message:E}){super(E||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=u}}return ze.RawContractError=g,ze}var Fn={},nt={},Ol;function jt(){if(Ol)return nt;Ol=1,Object.defineProperty(nt,"__esModule",{value:!0}),nt.TimeoutError=nt.SocketClosedError=nt.RpcRequestError=nt.WebSocketRequestError=nt.HttpRequestError=void 0;const e=ke(),r=ue(),n=Cd();class t extends r.BaseError{constructor({body:d,cause:l,details:f,headers:m,status:v,url:h}){super("HTTP request failed.",{cause:l,details:f,metaMessages:[v&&`Status: ${v}`,`URL: ${(0,n.getUrl)(h)}`,d&&`Request body: ${(0,e.stringify)(d)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=d,this.headers=m,this.status=v,this.url=h}}nt.HttpRequestError=t;class i extends r.BaseError{constructor({body:d,cause:l,details:f,url:m}){super("WebSocket request failed.",{cause:l,details:f,metaMessages:[`URL: ${(0,n.getUrl)(m)}`,d&&`Request body: ${(0,e.stringify)(d)}`].filter(Boolean),name:"WebSocketRequestError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=m}}nt.WebSocketRequestError=i;class s extends r.BaseError{constructor({body:d,error:l,url:f}){super("RPC Request failed.",{cause:l,details:l.message,metaMessages:[`URL: ${(0,n.getUrl)(f)}`,`Request body: ${(0,e.stringify)(d)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=l.code,this.data=l.data,this.url=f}}nt.RpcRequestError=s;class o extends r.BaseError{constructor({url:d}={}){super("The socket has been closed.",{metaMessages:[d&&`URL: ${(0,n.getUrl)(d)}`].filter(Boolean),name:"SocketClosedError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=d}}nt.SocketClosedError=o;class a extends r.BaseError{constructor({body:d,url:l}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,n.getUrl)(l)}`,`Request body: ${(0,e.stringify)(d)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=l}}return nt.TimeoutError=a,nt}var ne={},xl;function cr(){if(xl)return ne;xl=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.UnknownRpcError=ne.AtomicityNotSupportedError=ne.AtomicReadyWalletRejectedUpgradeError=ne.BundleTooLargeError=ne.UnknownBundleIdError=ne.DuplicateIdError=ne.UnsupportedChainIdError=ne.UnsupportedNonOptionalCapabilityError=ne.SwitchChainError=ne.ChainDisconnectedError=ne.ProviderDisconnectedError=ne.UnsupportedProviderMethodError=ne.UnauthorizedProviderError=ne.UserRejectedRequestError=ne.JsonRpcVersionUnsupportedError=ne.LimitExceededRpcError=ne.MethodNotSupportedRpcError=ne.TransactionRejectedRpcError=ne.ResourceUnavailableRpcError=ne.ResourceNotFoundRpcError=ne.InvalidInputRpcError=ne.InternalRpcError=ne.InvalidParamsRpcError=ne.MethodNotFoundRpcError=ne.InvalidRequestRpcError=ne.ParseRpcError=ne.ProviderRpcError=ne.RpcError=void 0;const e=ue(),r=jt(),n=-1;class t extends e.BaseError{constructor(C,{code:I,docsPath:F,metaMessages:R,name:q,shortMessage:M}){super(M,{cause:C,docsPath:F,metaMessages:R||(C==null?void 0:C.metaMessages),name:q||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=q||C.name,this.code=C instanceof r.RpcRequestError?C.code:I??n}}ne.RpcError=t;class i extends t{constructor(C,I){super(C,I),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=I.data}}ne.ProviderRpcError=i;class s extends t{constructor(C){super(C,{code:s.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}ne.ParseRpcError=s,Object.defineProperty(s,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class o extends t{constructor(C){super(C,{code:o.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}ne.InvalidRequestRpcError=o,Object.defineProperty(o,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class a extends t{constructor(C,{method:I}={}){super(C,{code:a.code,name:"MethodNotFoundRpcError",shortMessage:`The method${I?` "${I}"`:""} does not exist / is not available.`})}}ne.MethodNotFoundRpcError=a,Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class c extends t{constructor(C){super(C,{code:c.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
|
|
41
|
+
`)})}}ne.InvalidParamsRpcError=c,Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class d extends t{constructor(C){super(C,{code:d.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}ne.InternalRpcError=d,Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class l extends t{constructor(C){super(C,{code:l.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
|
|
42
|
+
`)})}}ne.InvalidInputRpcError=l,Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class f extends t{constructor(C){super(C,{code:f.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}ne.ResourceNotFoundRpcError=f,Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class m extends t{constructor(C){super(C,{code:m.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}ne.ResourceUnavailableRpcError=m,Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class v extends t{constructor(C){super(C,{code:v.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}ne.TransactionRejectedRpcError=v,Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class h extends t{constructor(C,{method:I}={}){super(C,{code:h.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${I?` "${I}"`:""} is not supported.`})}}ne.MethodNotSupportedRpcError=h,Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class b extends t{constructor(C){super(C,{code:b.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}ne.LimitExceededRpcError=b,Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class _ extends t{constructor(C){super(C,{code:_.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}ne.JsonRpcVersionUnsupportedError=_,Object.defineProperty(_,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class j extends i{constructor(C){super(C,{code:j.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}ne.UserRejectedRequestError=j,Object.defineProperty(j,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class g extends i{constructor(C){super(C,{code:g.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}ne.UnauthorizedProviderError=g,Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class P extends i{constructor(C,{method:I}={}){super(C,{code:P.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${I?` " ${I}"`:""}.`})}}ne.UnsupportedProviderMethodError=P,Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class u extends i{constructor(C){super(C,{code:u.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}ne.ProviderDisconnectedError=u,Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class E extends i{constructor(C){super(C,{code:E.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}ne.ChainDisconnectedError=E,Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class p extends i{constructor(C){super(C,{code:p.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}ne.SwitchChainError=p,Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class y extends i{constructor(C){super(C,{code:y.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}ne.UnsupportedNonOptionalCapabilityError=y,Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class A extends i{constructor(C){super(C,{code:A.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}ne.UnsupportedChainIdError=A,Object.defineProperty(A,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class w extends i{constructor(C){super(C,{code:w.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}ne.DuplicateIdError=w,Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class T extends i{constructor(C){super(C,{code:T.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}ne.UnknownBundleIdError=T,Object.defineProperty(T,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class O extends i{constructor(C){super(C,{code:O.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}ne.BundleTooLargeError=O,Object.defineProperty(O,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class B extends i{constructor(C){super(C,{code:B.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}ne.AtomicReadyWalletRejectedUpgradeError=B,Object.defineProperty(B,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class S extends i{constructor(C){super(C,{code:S.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}ne.AtomicityNotSupportedError=S,Object.defineProperty(S,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class x extends t{constructor(C){super(C,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}return ne.UnknownRpcError=x,ne}var Cl;function Eo(){if(Cl)return Fn;Cl=1,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.containsNodeError=i,Fn.getNodeError=s;const e=ue(),r=Dt(),n=jt(),t=cr();function i(o){return o instanceof t.TransactionRejectedRpcError||o instanceof t.InvalidInputRpcError||o instanceof n.RpcRequestError&&o.code===r.ExecutionRevertedError.code}function s(o,a){const c=(o.details||"").toLowerCase(),d=o instanceof e.BaseError?o.walk(l=>(l==null?void 0:l.code)===r.ExecutionRevertedError.code):o;return d instanceof e.BaseError?new r.ExecutionRevertedError({cause:o,message:d.details}):r.ExecutionRevertedError.nodeMessage.test(c)?new r.ExecutionRevertedError({cause:o,message:o.details}):r.FeeCapTooHighError.nodeMessage.test(c)?new r.FeeCapTooHighError({cause:o,maxFeePerGas:a==null?void 0:a.maxFeePerGas}):r.FeeCapTooLowError.nodeMessage.test(c)?new r.FeeCapTooLowError({cause:o,maxFeePerGas:a==null?void 0:a.maxFeePerGas}):r.NonceTooHighError.nodeMessage.test(c)?new r.NonceTooHighError({cause:o,nonce:a==null?void 0:a.nonce}):r.NonceTooLowError.nodeMessage.test(c)?new r.NonceTooLowError({cause:o,nonce:a==null?void 0:a.nonce}):r.NonceMaxValueError.nodeMessage.test(c)?new r.NonceMaxValueError({cause:o,nonce:a==null?void 0:a.nonce}):r.InsufficientFundsError.nodeMessage.test(c)?new r.InsufficientFundsError({cause:o}):r.IntrinsicGasTooHighError.nodeMessage.test(c)?new r.IntrinsicGasTooHighError({cause:o,gas:a==null?void 0:a.gas}):r.IntrinsicGasTooLowError.nodeMessage.test(c)?new r.IntrinsicGasTooLowError({cause:o,gas:a==null?void 0:a.gas}):r.TransactionTypeNotSupportedError.nodeMessage.test(c)?new r.TransactionTypeNotSupportedError({cause:o}):r.TipAboveFeeCapError.nodeMessage.test(c)?new r.TipAboveFeeCapError({cause:o,maxFeePerGas:a==null?void 0:a.maxFeePerGas,maxPriorityFeePerGas:a==null?void 0:a.maxPriorityFeePerGas}):new r.UnknownNodeError({cause:o})}return Fn}var ql;function qd(){if(ql)return Pi;ql=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.getCallError=t;const e=sr(),r=Dt(),n=Eo();function t(i,{docsPath:s,...o}){const a=(()=>{const c=(0,n.getNodeError)(i,o);return c instanceof r.UnknownNodeError?i:c})();return new e.CallExecutionError(a,{docsPath:s,...o})}return Pi}var Oi={},Ml;function ur(){if(Ml)return Oi;Ml=1,Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.extract=e;function e(r,{format:n}){if(!n)return{};const t={};function i(o){const a=Object.keys(o);for(const c of a)c in r&&(t[c]=r[c]),o[c]&&typeof o[c]=="object"&&!Array.isArray(o[c])&&i(o[c])}const s=n(r||{});return i(s),t}return Oi}var xi={},Hl;function wt(){if(Hl)return xi;Hl=1,Object.defineProperty(xi,"__esModule",{value:!0}),xi.assertRequest=s;const e=Ae(),r=Pd(),n=vt(),t=Dt(),i=Qe();function s(o){const{account:a,maxFeePerGas:c,maxPriorityFeePerGas:d,to:l}=o,f=a?(0,e.parseAccount)(a):void 0;if(f&&!(0,i.isAddress)(f.address))throw new n.InvalidAddressError({address:f.address});if(l&&!(0,i.isAddress)(l))throw new n.InvalidAddressError({address:l});if(c&&c>r.maxUint256)throw new t.FeeCapTooHighError({maxFeePerGas:c});if(d&&c&&d>c)throw new t.TipAboveFeeCapError({maxFeePerGas:c,maxPriorityFeePerGas:d})}return xi}var Ue={},le={},ye={},Fl;function Cr(){if(Fl)return ye;Fl=1;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(ye,"__esModule",{value:!0}),ye.notImplemented=ye.bitMask=void 0,ye.isBytes=n,ye.abytes=t,ye.abool=i,ye.numberToHexUnpadded=s,ye.hexToNumber=o,ye.bytesToHex=d,ye.hexToBytes=m,ye.bytesToNumberBE=v,ye.bytesToNumberLE=h,ye.numberToBytesBE=b,ye.numberToBytesLE=_,ye.numberToVarBytesBE=j,ye.ensureBytes=g,ye.concatBytes=P,ye.equalBytes=u,ye.utf8ToBytes=E,ye.inRange=y,ye.aInRange=A,ye.bitLen=w,ye.bitGet=T,ye.bitSet=O,ye.createHmacDrbg=k,ye.validateObject=I,ye.memoized=R;const e=BigInt(0),r=BigInt(1);function n(q){return q instanceof Uint8Array||ArrayBuffer.isView(q)&&q.constructor.name==="Uint8Array"}function t(q){if(!n(q))throw new Error("Uint8Array expected")}function i(q,M){if(typeof M!="boolean")throw new Error(q+" boolean expected, got "+M)}function s(q){const M=q.toString(16);return M.length&1?"0"+M:M}function o(q){if(typeof q!="string")throw new Error("hex string expected, got "+typeof q);return q===""?e:BigInt("0x"+q)}const a=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",c=Array.from({length:256},(q,M)=>M.toString(16).padStart(2,"0"));function d(q){if(t(q),a)return q.toHex();let M="";for(let H=0;H<q.length;H++)M+=c[q[H]];return M}const l={_0:48,_9:57,A:65,F:70,a:97,f:102};function f(q){if(q>=l._0&&q<=l._9)return q-l._0;if(q>=l.A&&q<=l.F)return q-(l.A-10);if(q>=l.a&&q<=l.f)return q-(l.a-10)}function m(q){if(typeof q!="string")throw new Error("hex string expected, got "+typeof q);if(a)return Uint8Array.fromHex(q);const M=q.length,H=M/2;if(M%2)throw new Error("hex string expected, got unpadded hex of length "+M);const N=new Uint8Array(H);for(let z=0,$=0;z<H;z++,$+=2){const U=f(q.charCodeAt($)),G=f(q.charCodeAt($+1));if(U===void 0||G===void 0){const K=q[$]+q[$+1];throw new Error('hex string expected, got non-hex character "'+K+'" at index '+$)}N[z]=U*16+G}return N}function v(q){return o(d(q))}function h(q){return t(q),o(d(Uint8Array.from(q).reverse()))}function b(q,M){return m(q.toString(16).padStart(M*2,"0"))}function _(q,M){return b(q,M).reverse()}function j(q){return m(s(q))}function g(q,M,H){let N;if(typeof M=="string")try{N=m(M)}catch($){throw new Error(q+" must be hex string or Uint8Array, cause: "+$)}else if(n(M))N=Uint8Array.from(M);else throw new Error(q+" must be hex string or Uint8Array");const z=N.length;if(typeof H=="number"&&z!==H)throw new Error(q+" of length "+H+" expected, got "+z);return N}function P(...q){let M=0;for(let N=0;N<q.length;N++){const z=q[N];t(z),M+=z.length}const H=new Uint8Array(M);for(let N=0,z=0;N<q.length;N++){const $=q[N];H.set($,z),z+=$.length}return H}function u(q,M){if(q.length!==M.length)return!1;let H=0;for(let N=0;N<q.length;N++)H|=q[N]^M[N];return H===0}function E(q){if(typeof q!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(q))}const p=q=>typeof q=="bigint"&&e<=q;function y(q,M,H){return p(q)&&p(M)&&p(H)&&M<=q&&q<H}function A(q,M,H,N){if(!y(M,H,N))throw new Error("expected valid "+q+": "+H+" <= n < "+N+", got "+M)}function w(q){let M;for(M=0;q>e;q>>=r,M+=1);return M}function T(q,M){return q>>BigInt(M)&r}function O(q,M,H){return q|(H?r:e)<<BigInt(M)}const B=q=>(r<<BigInt(q))-r;ye.bitMask=B;const S=q=>new Uint8Array(q),x=q=>Uint8Array.from(q);function k(q,M,H){if(typeof q!="number"||q<2)throw new Error("hashLen must be a number");if(typeof M!="number"||M<2)throw new Error("qByteLen must be a number");if(typeof H!="function")throw new Error("hmacFn must be a function");let N=S(q),z=S(q),$=0;const U=()=>{N.fill(1),z.fill(0),$=0},G=(...J)=>H(z,N,...J),K=(J=S(0))=>{z=G(x([0]),J),N=G(),J.length!==0&&(z=G(x([1]),J),N=G())},W=()=>{if($++>=1e3)throw new Error("drbg: tried 1000 values");let J=0;const oe=[];for(;J<M;){N=G();const Y=N.slice();oe.push(Y),J+=N.length}return P(...oe)};return(J,oe)=>{U(),K(J);let Y;for(;!(Y=oe(W()));)K();return U(),Y}}const C={bigint:q=>typeof q=="bigint",function:q=>typeof q=="function",boolean:q=>typeof q=="boolean",string:q=>typeof q=="string",stringOrUint8Array:q=>typeof q=="string"||n(q),isSafeInteger:q=>Number.isSafeInteger(q),array:q=>Array.isArray(q),field:(q,M)=>M.Fp.isValid(q),hash:q=>typeof q=="function"&&Number.isSafeInteger(q.outputLen)};function I(q,M,H={}){const N=(z,$,U)=>{const G=C[$];if(typeof G!="function")throw new Error("invalid validator function");const K=q[z];if(!(U&&K===void 0)&&!G(K,q))throw new Error("param "+String(z)+" is invalid. Expected "+$+", got "+K)};for(const[z,$]of Object.entries(M))N(z,$,!1);for(const[z,$]of Object.entries(H))N(z,$,!0);return q}const F=()=>{throw new Error("not implemented")};ye.notImplemented=F;function R(q){const M=new WeakMap;return(H,...N)=>{const z=M.get(H);if(z!==void 0)return z;const $=q(H,...N);return M.set(H,$),$}}return ye}var kn={},Wr={},Nn={},kl;function w_(){return kl||(kl=1,Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.version=void 0,Nn.version="0.1.1"),Nn}var Nl;function P_(){if(Nl)return Wr;Nl=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.getUrl=r,Wr.getVersion=n,Wr.prettyPrint=t;const e=w_();function r(i){return i}function n(){return e.version}function t(i){if(!i)return"";const s=Object.entries(i).map(([a,c])=>c===void 0||c===!1?null:[a,c]).filter(Boolean),o=s.reduce((a,[c])=>Math.max(a,c.length),0);return s.map(([a,c])=>` ${`${a}:`.padEnd(o+1)} ${c}`).join(`
|
|
43
|
+
`)}return Wr}var $l;function st(){if($l)return kn;$l=1,Object.defineProperty(kn,"__esModule",{value:!0}),kn.BaseError=void 0;const e=P_();class r extends Error{static setStaticOptions(i){r.prototype.docsOrigin=i.docsOrigin,r.prototype.showVersion=i.showVersion,r.prototype.version=i.version}constructor(i,s={}){const o=(()=>{var v;if(s.cause instanceof r){if(s.cause.details)return s.cause.details;if(s.cause.shortMessage)return s.cause.shortMessage}return s.cause&&"details"in s.cause&&typeof s.cause.details=="string"?s.cause.details:(v=s.cause)!=null&&v.message?s.cause.message:s.details})(),a=(()=>s.cause instanceof r&&s.cause.docsPath||s.docsPath)(),c=s.docsOrigin??r.prototype.docsOrigin,d=`${c}${a??""}`,l=!!(s.version??r.prototype.showVersion),f=s.version??r.prototype.version,m=[i||"An error occurred.",...s.metaMessages?["",...s.metaMessages]:[],...o||a||l?["",o?`Details: ${o}`:void 0,a?`See: ${d}`:void 0,l?`Version: ${f}`:void 0]:[]].filter(v=>typeof v=="string").join(`
|
|
44
|
+
`);super(m,s.cause?{cause:s.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsOrigin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.cause=s.cause,this.details=o,this.docs=d,this.docsOrigin=c,this.docsPath=a,this.shortMessage=i,this.showVersion=l,this.version=f}walk(i){return n(this,i)}}kn.BaseError=r,Object.defineProperty(r,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${(0,e.getVersion)()}`}}),r.setStaticOptions(r.defaultStaticOptions);function n(t,i){return i!=null&&i(t)?t:t&&typeof t=="object"&&"cause"in t&&t.cause?n(t.cause,i):i?null:t}return kn}var fe={},nd={},zl;function fp(){return zl||(zl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.charCodeMap=void 0,e.assertSize=n,e.assertStartOffset=t,e.assertEndOffset=i,e.charCodeToBase16=s,e.pad=o,e.trim=a;const r=St();function n(c,d){if(r.size(c)>d)throw new r.SizeOverflowError({givenSize:r.size(c),maxSize:d})}function t(c,d){if(typeof d=="number"&&d>0&&d>r.size(c)-1)throw new r.SliceOffsetOutOfBoundsError({offset:d,position:"start",size:r.size(c)})}function i(c,d,l){if(typeof d=="number"&&typeof l=="number"&&r.size(c)!==l-d)throw new r.SliceOffsetOutOfBoundsError({offset:l,position:"end",size:r.size(c)})}e.charCodeMap={zero:48,nine:57,A:65,F:70,a:97,f:102};function s(c){if(c>=e.charCodeMap.zero&&c<=e.charCodeMap.nine)return c-e.charCodeMap.zero;if(c>=e.charCodeMap.A&&c<=e.charCodeMap.F)return c-(e.charCodeMap.A-10);if(c>=e.charCodeMap.a&&c<=e.charCodeMap.f)return c-(e.charCodeMap.a-10)}function o(c,d={}){const{dir:l,size:f=32}=d;if(f===0)return c;if(c.length>f)throw new r.SizeExceedsPaddingSizeError({size:c.length,targetSize:f,type:"Bytes"});const m=new Uint8Array(f);for(let v=0;v<f;v++){const h=l==="right";m[h?v:f-v-1]=c[h?v:c.length-v-1]}return m}function a(c,d={}){const{dir:l="left"}=d;let f=c,m=0;for(let v=0;v<f.length-1&&f[l==="left"?v:f.length-v-1].toString()==="0";v++)m++;return f=l==="left"?f.slice(m):f.slice(0,f.length-m),f}}(nd)),nd}var Xt={},Ul;function lp(){if(Ul)return Xt;Ul=1,Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.assertSize=r,Xt.assertStartOffset=n,Xt.assertEndOffset=t,Xt.pad=i,Xt.trim=s;const e=Ne();function r(o,a){if(e.size(o)>a)throw new e.SizeOverflowError({givenSize:e.size(o),maxSize:a})}function n(o,a){if(typeof a=="number"&&a>0&&a>e.size(o)-1)throw new e.SliceOffsetOutOfBoundsError({offset:a,position:"start",size:e.size(o)})}function t(o,a,c){if(typeof a=="number"&&typeof c=="number"&&e.size(o)!==c-a)throw new e.SliceOffsetOutOfBoundsError({offset:c,position:"end",size:e.size(o)})}function i(o,a={}){const{dir:c,size:d=32}=a;if(d===0)return o;const l=o.replace("0x","");if(l.length>d*2)throw new e.SizeExceedsPaddingSizeError({size:Math.ceil(l.length/2),targetSize:d,type:"Hex"});return`0x${l[c==="right"?"padEnd":"padStart"](d*2,"0")}`}function s(o,a={}){const{dir:c="left"}=a;let d=o.replace("0x",""),l=0;for(let f=0;f<d.length-1&&d[c==="left"?f:d.length-f-1].toString()==="0";f++)l++;return d=c==="left"?d.slice(l):d.slice(0,d.length-l),d==="0"?"0x":c==="right"&&d.length%2===1?`0x${d}0`:`0x${d}`}return Xt}var $n={},Ll;function gu(){if(Ll)return $n;Ll=1,Object.defineProperty($n,"__esModule",{value:!0}),$n.parse=r,$n.stringify=n;const e="#__bigint";function r(t,i){return JSON.parse(t,(s,o)=>{const a=o;return typeof a=="string"&&a.endsWith(e)?BigInt(a.slice(0,-e.length)):typeof i=="function"?i(s,a):a})}function n(t,i,s){return JSON.stringify(t,(o,a)=>typeof i=="function"?i(o,a):typeof a=="bigint"?a.toString()+e:a,s)}return $n}var Dl;function Ne(){if(Dl)return fe;Dl=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.SizeExceedsPaddingSizeError=fe.SliceOffsetOutOfBoundsError=fe.SizeOverflowError=fe.InvalidLengthError=fe.InvalidHexValueError=fe.InvalidHexTypeError=fe.InvalidHexBooleanError=fe.IntegerOutOfRangeError=void 0,fe.assert=c,fe.concat=d,fe.from=l,fe.fromBoolean=f,fe.fromBytes=m,fe.fromNumber=v,fe.fromString=h,fe.isEqual=b,fe.padLeft=_,fe.padRight=j,fe.random=g,fe.slice=P,fe.size=u,fe.trimLeft=E,fe.trimRight=p,fe.toBigInt=y,fe.toBoolean=A,fe.toBytes=w,fe.toNumber=T,fe.toString=O,fe.validate=B;const e=Cr(),r=St(),n=st(),t=fp(),i=lp(),s=gu(),o=new TextEncoder,a=Array.from({length:256},(M,H)=>H.toString(16).padStart(2,"0"));function c(M,H={}){const{strict:N=!1}=H;if(!M)throw new k(M);if(typeof M!="string")throw new k(M);if(N&&!/^0x[0-9a-fA-F]*$/.test(M))throw new C(M);if(!M.startsWith("0x"))throw new C(M)}function d(...M){return`0x${M.reduce((H,N)=>H+N.replace("0x",""),"")}`}function l(M){return M instanceof Uint8Array?m(M):Array.isArray(M)?m(new Uint8Array(M)):M}function f(M,H={}){const N=`0x${Number(M)}`;return typeof H.size=="number"?(i.assertSize(N,H.size),_(N,H.size)):N}function m(M,H={}){let N="";for(let $=0;$<M.length;$++)N+=a[M[$]];const z=`0x${N}`;return typeof H.size=="number"?(i.assertSize(z,H.size),j(z,H.size)):z}function v(M,H={}){const{signed:N,size:z}=H,$=BigInt(M);let U;z?N?U=(1n<<BigInt(z)*8n-1n)-1n:U=2n**(BigInt(z)*8n)-1n:typeof M=="number"&&(U=BigInt(Number.MAX_SAFE_INTEGER));const G=typeof U=="bigint"&&N?-U-1n:0;if(U&&$>U||$<G){const V=typeof M=="bigint"?"n":"";throw new S({max:U?`${U}${V}`:void 0,min:`${G}${V}`,signed:N,size:z,value:`${M}${V}`})}const W=`0x${(N&&$<0?BigInt.asUintN(z*8,BigInt($)):$).toString(16)}`;return z?_(W,z):W}function h(M,H={}){return m(o.encode(M),H)}function b(M,H){return(0,e.equalBytes)(r.fromHex(M),r.fromHex(H))}function _(M,H){return i.pad(M,{dir:"left",size:H})}function j(M,H){return i.pad(M,{dir:"right",size:H})}function g(M){return m(r.random(M))}function P(M,H,N,z={}){const{strict:$}=z;i.assertStartOffset(M,H);const U=`0x${M.replace("0x","").slice((H??0)*2,(N??M.length)*2)}`;return $&&i.assertEndOffset(U,H,N),U}function u(M){return Math.ceil((M.length-2)/2)}function E(M){return i.trim(M,{dir:"left"})}function p(M){return i.trim(M,{dir:"right"})}function y(M,H={}){const{signed:N}=H;H.size&&i.assertSize(M,H.size);const z=BigInt(M);if(!N)return z;const $=(M.length-2)/2,U=(1n<<BigInt($)*8n)-1n,G=U>>1n;return z<=G?z:z-U-1n}function A(M,H={}){H.size&&i.assertSize(M,H.size);const N=E(M);if(N==="0x")return!1;if(N==="0x1")return!0;throw new x(M)}function w(M,H={}){return r.fromHex(M,H)}function T(M,H={}){const{signed:N,size:z}=H;return Number(!N&&!z?M:y(M,H))}function O(M,H={}){const{size:N}=H;let z=r.fromHex(M);return N&&(t.assertSize(z,N),z=r.trimRight(z)),new TextDecoder().decode(z)}function B(M,H={}){const{strict:N=!1}=H;try{return c(M,{strict:N}),!0}catch{return!1}}class S extends n.BaseError{constructor({max:H,min:N,signed:z,size:$,value:U}){super(`Number \`${U}\` is not in safe${$?` ${$*8}-bit`:""}${z?" signed":" unsigned"} integer range ${H?`(\`${N}\` to \`${H}\`)`:`(above \`${N}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}fe.IntegerOutOfRangeError=S;class x extends n.BaseError{constructor(H){super(`Hex value \`"${H}"\` is not a valid boolean.`,{metaMessages:['The hex value must be `"0x0"` (false) or `"0x1"` (true).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexBooleanError"})}}fe.InvalidHexBooleanError=x;class k extends n.BaseError{constructor(H){super(`Value \`${typeof H=="object"?s.stringify(H):H}\` of type \`${typeof H}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}fe.InvalidHexTypeError=k;class C extends n.BaseError{constructor(H){super(`Value \`${H}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}fe.InvalidHexValueError=C;class I extends n.BaseError{constructor(H){super(`Hex value \`"${H}"\` is an odd length (${H.length-2} nibbles).`,{metaMessages:["It must be an even length."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidLengthError"})}}fe.InvalidLengthError=I;class F extends n.BaseError{constructor({givenSize:H,maxSize:N}){super(`Size cannot exceed \`${N}\` bytes. Given size: \`${H}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}fe.SizeOverflowError=F;class R extends n.BaseError{constructor({offset:H,position:N,size:z}){super(`Slice ${N==="start"?"starting":"ending"} at offset \`${H}\` is out-of-bounds (size: \`${z}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}fe.SliceOffsetOutOfBoundsError=R;class q extends n.BaseError{constructor({size:H,targetSize:N,type:z}){super(`${z.charAt(0).toUpperCase()}${z.slice(1).toLowerCase()} size (\`${H}\`) exceeds padding size (\`${N}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}return fe.SizeExceedsPaddingSizeError=q,fe}var Gl;function St(){if(Gl)return le;Gl=1,Object.defineProperty(le,"__esModule",{value:!0}),le.SizeExceedsPaddingSizeError=le.SliceOffsetOutOfBoundsError=le.SizeOverflowError=le.InvalidBytesTypeError=le.InvalidBytesBooleanError=void 0,le.assert=c,le.concat=d,le.from=l,le.fromArray=f,le.fromBoolean=m,le.fromHex=v,le.fromNumber=h,le.fromString=b,le.isEqual=_,le.padLeft=j,le.padRight=g,le.random=P,le.size=u,le.slice=E,le.toBigInt=p,le.toBoolean=y,le.toHex=A,le.toNumber=w,le.toString=T,le.trimLeft=O,le.trimRight=B,le.validate=S;const e=Cr(),r=st(),n=Ne(),t=fp(),i=lp(),s=gu(),o=new TextDecoder,a=new TextEncoder;function c(R){if(!(R instanceof Uint8Array)){if(!R)throw new k(R);if(typeof R!="object")throw new k(R);if(!("BYTES_PER_ELEMENT"in R))throw new k(R);if(R.BYTES_PER_ELEMENT!==1||R.constructor.name!=="Uint8Array")throw new k(R)}}function d(...R){let q=0;for(const H of R)q+=H.length;const M=new Uint8Array(q);for(let H=0,N=0;H<R.length;H++){const z=R[H];M.set(z,N),N+=z.length}return M}function l(R){return R instanceof Uint8Array?R:typeof R=="string"?v(R):f(R)}function f(R){return R instanceof Uint8Array?R:new Uint8Array(R)}function m(R,q={}){const{size:M}=q,H=new Uint8Array(1);return H[0]=Number(R),typeof M=="number"?(t.assertSize(H,M),j(H,M)):H}function v(R,q={}){const{size:M}=q;let H=R;M&&(i.assertSize(R,M),H=n.padRight(R,M));let N=H.slice(2);N.length%2&&(N=`0${N}`);const z=N.length/2,$=new Uint8Array(z);for(let U=0,G=0;U<z;U++){const K=t.charCodeToBase16(N.charCodeAt(G++)),W=t.charCodeToBase16(N.charCodeAt(G++));if(K===void 0||W===void 0)throw new r.BaseError(`Invalid byte sequence ("${N[G-2]}${N[G-1]}" in "${N}").`);$[U]=K<<4|W}return $}function h(R,q){const M=n.fromNumber(R,q);return v(M)}function b(R,q={}){const{size:M}=q,H=a.encode(R);return typeof M=="number"?(t.assertSize(H,M),g(H,M)):H}function _(R,q){return(0,e.equalBytes)(R,q)}function j(R,q){return t.pad(R,{dir:"left",size:q})}function g(R,q){return t.pad(R,{dir:"right",size:q})}function P(R){return crypto.getRandomValues(new Uint8Array(R))}function u(R){return R.length}function E(R,q,M,H={}){const{strict:N}=H;t.assertStartOffset(R,q);const z=R.slice(q,M);return N&&t.assertEndOffset(z,q,M),z}function p(R,q={}){const{size:M}=q;typeof M<"u"&&t.assertSize(R,M);const H=n.fromBytes(R,q);return n.toBigInt(H,q)}function y(R,q={}){const{size:M}=q;let H=R;if(typeof M<"u"&&(t.assertSize(H,M),H=O(H)),H.length>1||H[0]>1)throw new x(H);return!!H[0]}function A(R,q={}){return n.fromBytes(R,q)}function w(R,q={}){const{size:M}=q;typeof M<"u"&&t.assertSize(R,M);const H=n.fromBytes(R,q);return n.toNumber(H,q)}function T(R,q={}){const{size:M}=q;let H=R;return typeof M<"u"&&(t.assertSize(H,M),H=B(H)),o.decode(H)}function O(R){return t.trim(R,{dir:"left"})}function B(R){return t.trim(R,{dir:"right"})}function S(R){try{return c(R),!0}catch{return!1}}class x extends r.BaseError{constructor(q){super(`Bytes value \`${q}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesBooleanError"})}}le.InvalidBytesBooleanError=x;class k extends r.BaseError{constructor(q){super(`Value \`${typeof q=="object"?s.stringify(q):q}\` of type \`${typeof q}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesTypeError"})}}le.InvalidBytesTypeError=k;class C extends r.BaseError{constructor({givenSize:q,maxSize:M}){super(`Size cannot exceed \`${M}\` bytes. Given size: \`${q}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}}le.SizeOverflowError=C;class I extends r.BaseError{constructor({offset:q,position:M,size:H}){super(`Slice ${M==="start"?"starting":"ending"} at offset \`${q}\` is out-of-bounds (size: \`${H}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SliceOffsetOutOfBoundsError"})}}le.SliceOffsetOutOfBoundsError=I;class F extends r.BaseError{constructor({size:q,targetSize:M,type:H}){super(`${H.charAt(0).toUpperCase()}${H.slice(1).toLowerCase()} size (\`${q}\`) exceeds padding size (\`${M}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}}return le.SizeExceedsPaddingSizeError=F,le}var Kr={},zn={},Vl;function A_(){if(Vl)return zn;Vl=1,Object.defineProperty(zn,"__esModule",{value:!0}),zn.LruMap=void 0;class e extends Map{constructor(n){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=n}get(n){const t=super.get(n);return super.has(n)&&t!==void 0&&(this.delete(n),super.set(n,t)),t}set(n,t){if(super.set(n,t),this.maxSize&&this.size>this.maxSize){const i=this.keys().next().value;i&&this.delete(i)}return this}}return zn.LruMap=e,zn}var Wl;function T_(){if(Wl)return Kr;Wl=1,Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.checksum=void 0,Kr.clear=n;const e=A_(),r={checksum:new e.LruMap(8192)};Kr.checksum=r.checksum;function n(){for(const t of Object.values(r))t.clear()}return Kr}var Er={},jr={},Le={},Kl;function I_(){if(Kl)return Le;Kl=1,Object.defineProperty(Le,"__esModule",{value:!0}),Le.ripemd160=Le.RIPEMD160=Le.md5=Le.MD5=Le.sha1=Le.SHA1=void 0;const e=tp(),r=nr(),n=Uint32Array.from([1732584193,4023233417,2562383102,271733878,3285377520]),t=new Uint32Array(80);class i extends e.HashMD{constructor(){super(64,20,8,!1),this.A=n[0]|0,this.B=n[1]|0,this.C=n[2]|0,this.D=n[3]|0,this.E=n[4]|0}get(){const{A:w,B:T,C:O,D:B,E:S}=this;return[w,T,O,B,S]}set(w,T,O,B,S){this.A=w|0,this.B=T|0,this.C=O|0,this.D=B|0,this.E=S|0}process(w,T){for(let C=0;C<16;C++,T+=4)t[C]=w.getUint32(T,!1);for(let C=16;C<80;C++)t[C]=(0,r.rotl)(t[C-3]^t[C-8]^t[C-14]^t[C-16],1);let{A:O,B,C:S,D:x,E:k}=this;for(let C=0;C<80;C++){let I,F;C<20?(I=(0,e.Chi)(B,S,x),F=1518500249):C<40?(I=B^S^x,F=1859775393):C<60?(I=(0,e.Maj)(B,S,x),F=2400959708):(I=B^S^x,F=3395469782);const R=(0,r.rotl)(O,5)+I+k+F+t[C]|0;k=x,x=S,S=(0,r.rotl)(B,30),B=O,O=R}O=O+this.A|0,B=B+this.B|0,S=S+this.C|0,x=x+this.D|0,k=k+this.E|0,this.set(O,B,S,x,k)}roundClean(){(0,r.clean)(t)}destroy(){this.set(0,0,0,0,0),(0,r.clean)(this.buffer)}}Le.SHA1=i,Le.sha1=(0,r.createHasher)(()=>new i);const s=Math.pow(2,32),o=Array.from({length:64},(A,w)=>Math.floor(s*Math.abs(Math.sin(w+1)))),a=n.slice(0,4),c=new Uint32Array(16);class d extends e.HashMD{constructor(){super(64,16,8,!0),this.A=a[0]|0,this.B=a[1]|0,this.C=a[2]|0,this.D=a[3]|0}get(){const{A:w,B:T,C:O,D:B}=this;return[w,T,O,B]}set(w,T,O,B){this.A=w|0,this.B=T|0,this.C=O|0,this.D=B|0}process(w,T){for(let k=0;k<16;k++,T+=4)c[k]=w.getUint32(T,!0);let{A:O,B,C:S,D:x}=this;for(let k=0;k<64;k++){let C,I,F;k<16?(C=(0,e.Chi)(B,S,x),I=k,F=[7,12,17,22]):k<32?(C=(0,e.Chi)(x,B,S),I=(5*k+1)%16,F=[5,9,14,20]):k<48?(C=B^S^x,I=(3*k+5)%16,F=[4,11,16,23]):(C=S^(B|~x),I=7*k%16,F=[6,10,15,21]),C=C+O+o[k]+c[I],O=x,x=S,S=B,B=B+(0,r.rotl)(C,F[k%4])}O=O+this.A|0,B=B+this.B|0,S=S+this.C|0,x=x+this.D|0,this.set(O,B,S,x)}roundClean(){(0,r.clean)(c)}destroy(){this.set(0,0,0,0),(0,r.clean)(this.buffer)}}Le.MD5=d,Le.md5=(0,r.createHasher)(()=>new d);const l=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),f=(()=>Uint8Array.from(new Array(16).fill(0).map((A,w)=>w)))(),m=(()=>f.map(A=>(9*A+5)%16))(),v=(()=>{const T=[[f],[m]];for(let O=0;O<4;O++)for(let B of T)B.push(B[O].map(S=>l[S]));return T})(),h=(()=>v[0])(),b=(()=>v[1])(),_=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(A=>Uint8Array.from(A)),j=h.map((A,w)=>A.map(T=>_[w][T])),g=b.map((A,w)=>A.map(T=>_[w][T])),P=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),u=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function E(A,w,T,O){return A===0?w^T^O:A===1?w&T|~w&O:A===2?(w|~T)^O:A===3?w&O|T&~O:w^(T|~O)}const p=new Uint32Array(16);class y extends e.HashMD{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:w,h1:T,h2:O,h3:B,h4:S}=this;return[w,T,O,B,S]}set(w,T,O,B,S){this.h0=w|0,this.h1=T|0,this.h2=O|0,this.h3=B|0,this.h4=S|0}process(w,T){for(let M=0;M<16;M++,T+=4)p[M]=w.getUint32(T,!0);let O=this.h0|0,B=O,S=this.h1|0,x=S,k=this.h2|0,C=k,I=this.h3|0,F=I,R=this.h4|0,q=R;for(let M=0;M<5;M++){const H=4-M,N=P[M],z=u[M],$=h[M],U=b[M],G=j[M],K=g[M];for(let W=0;W<16;W++){const V=(0,r.rotl)(O+E(M,S,k,I)+p[$[W]]+N,G[W])+R|0;O=R,R=I,I=(0,r.rotl)(k,10)|0,k=S,S=V}for(let W=0;W<16;W++){const V=(0,r.rotl)(B+E(H,x,C,F)+p[U[W]]+z,K[W])+q|0;B=q,q=F,F=(0,r.rotl)(C,10)|0,C=x,x=V}}this.set(this.h1+k+F|0,this.h2+I+q|0,this.h3+R+B|0,this.h4+O+x|0,this.h0+S+C|0)}roundClean(){(0,r.clean)(p)}destroy(){this.destroyed=!0,(0,r.clean)(this.buffer),this.set(0,0,0,0,0)}}return Le.RIPEMD160=y,Le.ripemd160=(0,r.createHasher)(()=>new y),Le}var Zl;function bp(){if(Zl)return jr;Zl=1,Object.defineProperty(jr,"__esModule",{value:!0}),jr.ripemd160=jr.RIPEMD160=void 0;const e=I_();return jr.RIPEMD160=e.RIPEMD160,jr.ripemd160=e.ripemd160,jr}var Yl;function Md(){if(Yl)return Er;Yl=1,Object.defineProperty(Er,"__esModule",{value:!0}),Er.keccak256=s,Er.ripemd160=o,Er.sha256=a,Er.validate=c;const e=bp(),r=cp(),n=op(),t=St(),i=Ne();function s(d,l={}){const{as:f=typeof d=="string"?"Hex":"Bytes"}=l,m=(0,r.keccak_256)(t.from(d));return f==="Bytes"?m:i.fromBytes(m)}function o(d,l={}){const{as:f=typeof d=="string"?"Hex":"Bytes"}=l,m=(0,e.ripemd160)(t.from(d));return f==="Bytes"?m:i.fromBytes(m)}function a(d,l={}){const{as:f=typeof d=="string"?"Hex":"Bytes"}=l,m=(0,n.sha256)(t.from(d));return f==="Bytes"?m:i.fromBytes(m)}function c(d){return i.validate(d)&&i.size(d)===32}return Er}var Oe={},Jl;function mp(){if(Jl)return Oe;Jl=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.InvalidSerializedSizeError=Oe.InvalidUncompressedPrefixError=Oe.InvalidCompressedPrefixError=Oe.InvalidPrefixError=Oe.InvalidError=void 0,Oe.assert=i,Oe.compress=s,Oe.from=o,Oe.fromBytes=a,Oe.fromHex=c,Oe.toBytes=d,Oe.toHex=l,Oe.validate=f;const e=St(),r=st(),n=Ne(),t=gu();function i(j,g={}){const{compressed:P}=g,{prefix:u,x:E,y:p}=j;if(P===!1||typeof E=="bigint"&&typeof p=="bigint"){if(u!==4)throw new v({prefix:u,cause:new b});return}if(P===!0||typeof E=="bigint"&&typeof p>"u"){if(u!==3&&u!==2)throw new v({prefix:u,cause:new h});return}throw new m({publicKey:j})}function s(j){const{x:g,y:P}=j;return{prefix:P%2n===0n?2:3,x:g}}function o(j){const g=(()=>{if(n.validate(j))return c(j);if(e.validate(j))return a(j);const{prefix:P,x:u,y:E}=j;return typeof u=="bigint"&&typeof E=="bigint"?{prefix:P??4,x:u,y:E}:{prefix:P,x:u}})();return i(g),g}function a(j){return c(n.fromBytes(j))}function c(j){if(j.length!==132&&j.length!==130&&j.length!==68)throw new _({publicKey:j});if(j.length===130){const u=BigInt(n.slice(j,0,32)),E=BigInt(n.slice(j,32,64));return{prefix:4,x:u,y:E}}if(j.length===132){const u=Number(n.slice(j,0,1)),E=BigInt(n.slice(j,1,33)),p=BigInt(n.slice(j,33,65));return{prefix:u,x:E,y:p}}const g=Number(n.slice(j,0,1)),P=BigInt(n.slice(j,1,33));return{prefix:g,x:P}}function d(j,g={}){return e.fromHex(l(j,g))}function l(j,g={}){i(j);const{prefix:P,x:u,y:E}=j,{includePrefix:p=!0}=g;return n.concat(p?n.fromNumber(P,{size:1}):"0x",n.fromNumber(u,{size:32}),typeof E=="bigint"?n.fromNumber(E,{size:32}):"0x")}function f(j,g={}){try{return i(j,g),!0}catch{return!1}}class m extends r.BaseError{constructor({publicKey:g}){super(`Value \`${t.stringify(g)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}Oe.InvalidError=m;class v extends r.BaseError{constructor({prefix:g,cause:P}){super(`Prefix "${g}" is invalid.`,{cause:P}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}Oe.InvalidPrefixError=v;class h extends r.BaseError{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}Oe.InvalidCompressedPrefixError=h;class b extends r.BaseError{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}Oe.InvalidUncompressedPrefixError=b;class _ extends r.BaseError{constructor({publicKey:g}){super(`Value \`${g}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${n.size(n.from(g))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}}return Oe.InvalidSerializedSizeError=_,Oe}var Xl;function _u(){if(Xl)return Ue;Xl=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.InvalidChecksumError=Ue.InvalidInputError=Ue.InvalidAddressError=void 0,Ue.assert=o,Ue.checksum=a,Ue.from=c,Ue.fromPublicKey=d,Ue.isEqual=l,Ue.validate=f;const e=St(),r=T_(),n=st(),t=Md(),i=mp(),s=/^0x[a-fA-F0-9]{40}$/;function o(b,_={}){const{strict:j=!0}=_;if(!s.test(b))throw new m({address:b,cause:new v});if(j){if(b.toLowerCase()===b)return;if(a(b)!==b)throw new m({address:b,cause:new h})}}function a(b){if(r.checksum.has(b))return r.checksum.get(b);o(b,{strict:!1});const _=b.substring(2).toLowerCase(),j=t.keccak256(e.fromString(_),{as:"Bytes"}),g=_.split("");for(let u=0;u<40;u+=2)j[u>>1]>>4>=8&&g[u]&&(g[u]=g[u].toUpperCase()),(j[u>>1]&15)>=8&&g[u+1]&&(g[u+1]=g[u+1].toUpperCase());const P=`0x${g.join("")}`;return r.checksum.set(b,P),P}function c(b,_={}){const{checksum:j=!1}=_;return o(b),j?a(b):b}function d(b,_={}){const j=t.keccak256(`0x${i.toHex(b).slice(4)}`).substring(26);return c(`0x${j}`,_)}function l(b,_){return o(b,{strict:!1}),o(_,{strict:!1}),b.toLowerCase()===_.toLowerCase()}function f(b,_={}){const{strict:j=!0}=_??{};try{return o(b,{strict:j}),!0}catch{return!1}}class m extends n.BaseError{constructor({address:_,cause:j}){super(`Address "${_}" is invalid.`,{cause:j}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}Ue.InvalidAddressError=m;class v extends n.BaseError{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}Ue.InvalidInputError=v;class h extends n.BaseError{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}return Ue.InvalidChecksumError=h,Ue}var Un={},od={},Ql;function S_(){return Ql||(Ql=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=e.HMAC=void 0;const r=nr();class n extends r.Hash{constructor(s,o){super(),this.finished=!1,this.destroyed=!1,(0,r.ahash)(s);const a=(0,r.toBytes)(o);if(this.iHash=s.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const c=this.blockLen,d=new Uint8Array(c);d.set(a.length>c?s.create().update(a).digest():a);for(let l=0;l<d.length;l++)d[l]^=54;this.iHash.update(d),this.oHash=s.create();for(let l=0;l<d.length;l++)d[l]^=106;this.oHash.update(d),(0,r.clean)(d)}update(s){return(0,r.aexists)(this),this.iHash.update(s),this}digestInto(s){(0,r.aexists)(this),(0,r.abytes)(s,this.outputLen),this.finished=!0,this.iHash.digestInto(s),this.oHash.update(s),this.oHash.digestInto(s),this.destroy()}digest(){const s=new Uint8Array(this.oHash.outputLen);return this.digestInto(s),s}_cloneInto(s){s||(s=Object.create(Object.getPrototypeOf(this),{}));const{oHash:o,iHash:a,finished:c,destroyed:d,blockLen:l,outputLen:f}=this;return s=s,s.finished=c,s.destroyed=d,s.blockLen=l,s.outputLen=f,s.oHash=o._cloneInto(s.oHash),s.iHash=a._cloneInto(s.iHash),s}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}e.HMAC=n;const t=(i,s,o)=>new n(i,s).update(o).digest();e.hmac=t,e.hmac.create=(i,s)=>new n(i,s)}(od)),od}var id={},wr={},je={},e1;function vu(){if(e1)return je;e1=1,Object.defineProperty(je,"__esModule",{value:!0}),je.isNegativeLE=void 0,je.mod=d,je.pow=l,je.pow2=f,je.invert=m,je.tonelliShanks=b,je.FpSqrt=_,je.validateField=P,je.FpPow=u,je.FpInvertBatch=E,je.FpDiv=p,je.FpLegendre=y,je.FpIsSquare=A,je.nLength=w,je.Field=T,je.FpSqrtOdd=O,je.FpSqrtEven=B,je.hashToPrivateScalar=S,je.getFieldBytesLength=x,je.getMinHashLength=k,je.mapHashToField=C;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=nr(),r=Cr(),n=BigInt(0),t=BigInt(1),i=BigInt(2),s=BigInt(3),o=BigInt(4),a=BigInt(5),c=BigInt(8);function d(I,F){const R=I%F;return R>=n?R:F+R}function l(I,F,R){return u(T(R),I,F)}function f(I,F,R){let q=I;for(;F-- >n;)q*=q,q%=R;return q}function m(I,F){if(I===n)throw new Error("invert: expected non-zero number");if(F<=n)throw new Error("invert: expected positive modulus, got "+F);let R=d(I,F),q=F,M=n,H=t;for(;R!==n;){const z=q/R,$=q%R,U=M-H*z;q=R,R=$,M=H,H=U}if(q!==t)throw new Error("invert: does not exist");return d(M,F)}function v(I,F){const R=(I.ORDER+t)/o,q=I.pow(F,R);if(!I.eql(I.sqr(q),F))throw new Error("Cannot find square root");return q}function h(I,F){const R=(I.ORDER-a)/c,q=I.mul(F,i),M=I.pow(q,R),H=I.mul(F,M),N=I.mul(I.mul(H,i),M),z=I.mul(H,I.sub(N,I.ONE));if(!I.eql(I.sqr(z),F))throw new Error("Cannot find square root");return z}function b(I){if(I<BigInt(3))throw new Error("sqrt is not defined for small field");let F=I-t,R=0;for(;F%i===n;)F/=i,R++;let q=i;const M=T(I);for(;y(M,q)===1;)if(q++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(R===1)return v;let H=M.pow(q,F);const N=(F+t)/i;return function($,U){if($.is0(U))return U;if(y($,U)!==1)throw new Error("Cannot find square root");let G=R,K=$.mul($.ONE,H),W=$.pow(U,F),V=$.pow(U,N);for(;!$.eql(W,$.ONE);){if($.is0(W))return $.ZERO;let J=1,oe=$.sqr(W);for(;!$.eql(oe,$.ONE);)if(J++,oe=$.sqr(oe),J===G)throw new Error("Cannot find square root");const Y=t<<BigInt(G-J-1),X=$.pow(K,Y);G=J,K=$.sqr(X),W=$.mul(W,K),V=$.mul(V,X)}return V}}function _(I){return I%o===s?v:I%c===a?h:b(I)}const j=(I,F)=>(d(I,F)&t)===t;je.isNegativeLE=j;const g=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function P(I){const F={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},R=g.reduce((q,M)=>(q[M]="function",q),F);return(0,r.validateObject)(I,R)}function u(I,F,R){if(R<n)throw new Error("invalid exponent, negatives unsupported");if(R===n)return I.ONE;if(R===t)return F;let q=I.ONE,M=F;for(;R>n;)R&t&&(q=I.mul(q,M)),M=I.sqr(M),R>>=t;return q}function E(I,F,R=!1){const q=new Array(F.length).fill(R?I.ZERO:void 0),M=F.reduce((N,z,$)=>I.is0(z)?N:(q[$]=N,I.mul(N,z)),I.ONE),H=I.inv(M);return F.reduceRight((N,z,$)=>I.is0(z)?N:(q[$]=I.mul(N,q[$]),I.mul(N,z)),H),q}function p(I,F,R){return I.mul(F,typeof R=="bigint"?m(R,I.ORDER):I.inv(R))}function y(I,F){const R=(I.ORDER-t)/i,q=I.pow(F,R),M=I.eql(q,I.ONE),H=I.eql(q,I.ZERO),N=I.eql(q,I.neg(I.ONE));if(!M&&!H&&!N)throw new Error("invalid Legendre symbol result");return M?1:H?0:-1}function A(I,F){return y(I,F)===1}function w(I,F){F!==void 0&&(0,e.anumber)(F);const R=F!==void 0?F:I.toString(2).length,q=Math.ceil(R/8);return{nBitLength:R,nByteLength:q}}function T(I,F,R=!1,q={}){if(I<=n)throw new Error("invalid field: expected ORDER > 0, got "+I);const{nBitLength:M,nByteLength:H}=w(I,F);if(H>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let N;const z=Object.freeze({ORDER:I,isLE:R,BITS:M,BYTES:H,MASK:(0,r.bitMask)(M),ZERO:n,ONE:t,create:$=>d($,I),isValid:$=>{if(typeof $!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof $);return n<=$&&$<I},is0:$=>$===n,isOdd:$=>($&t)===t,neg:$=>d(-$,I),eql:($,U)=>$===U,sqr:$=>d($*$,I),add:($,U)=>d($+U,I),sub:($,U)=>d($-U,I),mul:($,U)=>d($*U,I),pow:($,U)=>u(z,$,U),div:($,U)=>d($*m(U,I),I),sqrN:$=>$*$,addN:($,U)=>$+U,subN:($,U)=>$-U,mulN:($,U)=>$*U,inv:$=>m($,I),sqrt:q.sqrt||($=>(N||(N=_(I)),N(z,$))),toBytes:$=>R?(0,r.numberToBytesLE)($,H):(0,r.numberToBytesBE)($,H),fromBytes:$=>{if($.length!==H)throw new Error("Field.fromBytes: expected "+H+" bytes, got "+$.length);return R?(0,r.bytesToNumberLE)($):(0,r.bytesToNumberBE)($)},invertBatch:$=>E(z,$),cmov:($,U,G)=>G?U:$});return Object.freeze(z)}function O(I,F){if(!I.isOdd)throw new Error("Field doesn't have isOdd");const R=I.sqrt(F);return I.isOdd(R)?R:I.neg(R)}function B(I,F){if(!I.isOdd)throw new Error("Field doesn't have isOdd");const R=I.sqrt(F);return I.isOdd(R)?I.neg(R):R}function S(I,F,R=!1){I=(0,r.ensureBytes)("privateHash",I);const q=I.length,M=w(F).nByteLength+8;if(M<24||q<M||q>1024)throw new Error("hashToPrivateScalar: expected "+M+"-1024 bytes of input, got "+q);const H=R?(0,r.bytesToNumberLE)(I):(0,r.bytesToNumberBE)(I);return d(H,F-t)+t}function x(I){if(typeof I!="bigint")throw new Error("field order must be bigint");const F=I.toString(2).length;return Math.ceil(F/8)}function k(I){const F=x(I);return F+Math.ceil(F/2)}function C(I,F,R=!1){const q=I.length,M=x(F),H=k(F);if(q<16||q<H||q>1024)throw new Error("expected "+H+"-1024 bytes of input, got "+q);const N=R?(0,r.bytesToNumberLE)(I):(0,r.bytesToNumberBE)(I),z=d(N,F-t)+t;return R?(0,r.numberToBytesLE)(z,M):(0,r.numberToBytesBE)(z,M)}return je}var t1;function B_(){if(t1)return wr;t1=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.wNAF=v,wr.pippenger=h,wr.precomputeMSMUnsafe=b,wr.validateBasic=_;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=vu(),r=Cr(),n=BigInt(0),t=BigInt(1);function i(j,g){const P=g.negate();return j?P:g}function s(j,g){if(!Number.isSafeInteger(j)||j<=0||j>g)throw new Error("invalid window size, expected [1.."+g+"], got W="+j)}function o(j,g){s(j,g);const P=Math.ceil(g/j)+1,u=2**(j-1),E=2**j,p=(0,r.bitMask)(j),y=BigInt(j);return{windows:P,windowSize:u,mask:p,maxNumber:E,shiftBy:y}}function a(j,g,P){const{windowSize:u,mask:E,maxNumber:p,shiftBy:y}=P;let A=Number(j&E),w=j>>y;A>u&&(A-=p,w+=t);const T=g*u,O=T+Math.abs(A)-1,B=A===0,S=A<0,x=g%2!==0;return{nextN:w,offset:O,isZero:B,isNeg:S,isNegF:x,offsetF:T}}function c(j,g){if(!Array.isArray(j))throw new Error("array expected");j.forEach((P,u)=>{if(!(P instanceof g))throw new Error("invalid point at index "+u)})}function d(j,g){if(!Array.isArray(j))throw new Error("array of scalars expected");j.forEach((P,u)=>{if(!g.isValid(P))throw new Error("invalid scalar at index "+u)})}const l=new WeakMap,f=new WeakMap;function m(j){return f.get(j)||1}function v(j,g){return{constTimeNegate:i,hasPrecomputes(P){return m(P)!==1},unsafeLadder(P,u,E=j.ZERO){let p=P;for(;u>n;)u&t&&(E=E.add(p)),p=p.double(),u>>=t;return E},precomputeWindow(P,u){const{windows:E,windowSize:p}=o(u,g),y=[];let A=P,w=A;for(let T=0;T<E;T++){w=A,y.push(w);for(let O=1;O<p;O++)w=w.add(A),y.push(w);A=w.double()}return y},wNAF(P,u,E){let p=j.ZERO,y=j.BASE;const A=o(P,g);for(let w=0;w<A.windows;w++){const{nextN:T,offset:O,isZero:B,isNeg:S,isNegF:x,offsetF:k}=a(E,w,A);E=T,B?y=y.add(i(x,u[k])):p=p.add(i(S,u[O]))}return{p,f:y}},wNAFUnsafe(P,u,E,p=j.ZERO){const y=o(P,g);for(let A=0;A<y.windows&&E!==n;A++){const{nextN:w,offset:T,isZero:O,isNeg:B}=a(E,A,y);if(E=w,!O){const S=u[T];p=p.add(B?S.negate():S)}}return p},getPrecomputes(P,u,E){let p=l.get(u);return p||(p=this.precomputeWindow(u,P),P!==1&&l.set(u,E(p))),p},wNAFCached(P,u,E){const p=m(P);return this.wNAF(p,this.getPrecomputes(p,P,E),u)},wNAFCachedUnsafe(P,u,E,p){const y=m(P);return y===1?this.unsafeLadder(P,u,p):this.wNAFUnsafe(y,this.getPrecomputes(y,P,E),u,p)},setWindowSize(P,u){s(u,g),f.set(P,u),l.delete(P)}}}function h(j,g,P,u){c(P,j),d(u,g);const E=P.length,p=u.length;if(E!==p)throw new Error("arrays of points and scalars must have equal length");const y=j.ZERO,A=(0,r.bitLen)(BigInt(E));let w=1;A>12?w=A-3:A>4?w=A-2:A>0&&(w=2);const T=(0,r.bitMask)(w),O=new Array(Number(T)+1).fill(y),B=Math.floor((g.BITS-1)/w)*w;let S=y;for(let x=B;x>=0;x-=w){O.fill(y);for(let C=0;C<p;C++){const I=u[C],F=Number(I>>BigInt(x)&T);O[F]=O[F].add(P[C])}let k=y;for(let C=O.length-1,I=y;C>0;C--)I=I.add(O[C]),k=k.add(I);if(S=S.add(k),x!==0)for(let C=0;C<w;C++)S=S.double()}return S}function b(j,g,P,u){s(u,g.BITS),c(P,j);const E=j.ZERO,p=2**u-1,y=Math.ceil(g.BITS/u),A=(0,r.bitMask)(u),w=P.map(T=>{const O=[];for(let B=0,S=T;B<p;B++)O.push(S),S=S.add(T);return O});return T=>{if(d(T,g),T.length>P.length)throw new Error("array of scalars must be smaller than array of points");let O=E;for(let B=0;B<y;B++){if(O!==E)for(let x=0;x<u;x++)O=O.double();const S=BigInt(y*u-(B+1)*u);for(let x=0;x<T.length;x++){const k=T[x],C=Number(k>>S&A);C&&(O=O.add(w[x][C-1]))}}return O}}function _(j){return(0,e.validateField)(j.Fp),(0,r.validateObject)(j,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,e.nLength)(j.n,j.nBitLength),...j,p:j.Fp.ORDER})}return wr}var r1;function yp(){return r1||(r1=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DER=e.DERErr=void 0,e.weierstrassPoints=v,e.weierstrass=b,e.SWUFpSqrtRatio=_,e.mapToCurveSimpleSWU=j;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const r=B_(),n=vu(),t=Cr();function i(g){g.lowS!==void 0&&(0,t.abool)("lowS",g.lowS),g.prehash!==void 0&&(0,t.abool)("prehash",g.prehash)}function s(g){const P=(0,r.validateBasic)(g);(0,t.validateObject)(P,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:u,Fp:E,a:p}=P;if(u){if(!E.eql(p,E.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof u!="object"||typeof u.beta!="bigint"||typeof u.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...P})}class o extends Error{constructor(P=""){super(P)}}e.DERErr=o,e.DER={Err:o,_tlv:{encode:(g,P)=>{const{Err:u}=e.DER;if(g<0||g>256)throw new u("tlv.encode: wrong tag");if(P.length&1)throw new u("tlv.encode: unpadded data");const E=P.length/2,p=(0,t.numberToHexUnpadded)(E);if(p.length/2&128)throw new u("tlv.encode: long form length too big");const y=E>127?(0,t.numberToHexUnpadded)(p.length/2|128):"";return(0,t.numberToHexUnpadded)(g)+y+p+P},decode(g,P){const{Err:u}=e.DER;let E=0;if(g<0||g>256)throw new u("tlv.encode: wrong tag");if(P.length<2||P[E++]!==g)throw new u("tlv.decode: wrong tlv");const p=P[E++],y=!!(p&128);let A=0;if(!y)A=p;else{const T=p&127;if(!T)throw new u("tlv.decode(long): indefinite length not supported");if(T>4)throw new u("tlv.decode(long): byte length is too big");const O=P.subarray(E,E+T);if(O.length!==T)throw new u("tlv.decode: length bytes not complete");if(O[0]===0)throw new u("tlv.decode(long): zero leftmost byte");for(const B of O)A=A<<8|B;if(E+=T,A<128)throw new u("tlv.decode(long): not minimal encoding")}const w=P.subarray(E,E+A);if(w.length!==A)throw new u("tlv.decode: wrong value length");return{v:w,l:P.subarray(E+A)}}},_int:{encode(g){const{Err:P}=e.DER;if(g<c)throw new P("integer: negative integers are not allowed");let u=(0,t.numberToHexUnpadded)(g);if(Number.parseInt(u[0],16)&8&&(u="00"+u),u.length&1)throw new P("unexpected DER parsing assertion: unpadded hex");return u},decode(g){const{Err:P}=e.DER;if(g[0]&128)throw new P("invalid signature integer: negative");if(g[0]===0&&!(g[1]&128))throw new P("invalid signature integer: unnecessary leading zero");return(0,t.bytesToNumberBE)(g)}},toSig(g){const{Err:P,_int:u,_tlv:E}=e.DER,p=(0,t.ensureBytes)("signature",g),{v:y,l:A}=E.decode(48,p);if(A.length)throw new P("invalid signature: left bytes after parsing");const{v:w,l:T}=E.decode(2,y),{v:O,l:B}=E.decode(2,T);if(B.length)throw new P("invalid signature: left bytes after parsing");return{r:u.decode(w),s:u.decode(O)}},hexFromSig(g){const{_tlv:P,_int:u}=e.DER,E=P.encode(2,u.encode(g.r)),p=P.encode(2,u.encode(g.s)),y=E+p;return P.encode(48,y)}};function a(g,P){return(0,t.bytesToHex)((0,t.numberToBytesBE)(g,P))}const c=BigInt(0),d=BigInt(1),l=BigInt(2),f=BigInt(3),m=BigInt(4);function v(g){const P=s(g),{Fp:u}=P,E=(0,n.Field)(P.n,P.nBitLength),p=P.toBytes||((M,H,N)=>{const z=H.toAffine();return(0,t.concatBytes)(Uint8Array.from([4]),u.toBytes(z.x),u.toBytes(z.y))}),y=P.fromBytes||(M=>{const H=M.subarray(1),N=u.fromBytes(H.subarray(0,u.BYTES)),z=u.fromBytes(H.subarray(u.BYTES,2*u.BYTES));return{x:N,y:z}});function A(M){const{a:H,b:N}=P,z=u.sqr(M),$=u.mul(z,M);return u.add(u.add($,u.mul(M,H)),N)}function w(M,H){const N=u.sqr(H),z=A(M);return u.eql(N,z)}if(!w(P.Gx,P.Gy))throw new Error("bad curve params: generator point");const T=u.mul(u.pow(P.a,f),m),O=u.mul(u.sqr(P.b),BigInt(27));if(u.is0(u.add(T,O)))throw new Error("bad curve params: a or b");function B(M){return(0,t.inRange)(M,d,P.n)}function S(M){const{allowedPrivateKeyLengths:H,nByteLength:N,wrapPrivateKey:z,n:$}=P;if(H&&typeof M!="bigint"){if((0,t.isBytes)(M)&&(M=(0,t.bytesToHex)(M)),typeof M!="string"||!H.includes(M.length))throw new Error("invalid private key");M=M.padStart(N*2,"0")}let U;try{U=typeof M=="bigint"?M:(0,t.bytesToNumberBE)((0,t.ensureBytes)("private key",M,N))}catch{throw new Error("invalid private key, expected hex or "+N+" bytes, got "+typeof M)}return z&&(U=(0,n.mod)(U,$)),(0,t.aInRange)("private key",U,d,$),U}function x(M){if(!(M instanceof I))throw new Error("ProjectivePoint expected")}const k=(0,t.memoized)((M,H)=>{const{px:N,py:z,pz:$}=M;if(u.eql($,u.ONE))return{x:N,y:z};const U=M.is0();H==null&&(H=U?u.ONE:u.inv($));const G=u.mul(N,H),K=u.mul(z,H),W=u.mul($,H);if(U)return{x:u.ZERO,y:u.ZERO};if(!u.eql(W,u.ONE))throw new Error("invZ was invalid");return{x:G,y:K}}),C=(0,t.memoized)(M=>{if(M.is0()){if(P.allowInfinityPoint&&!u.is0(M.py))return;throw new Error("bad point: ZERO")}const{x:H,y:N}=M.toAffine();if(!u.isValid(H)||!u.isValid(N))throw new Error("bad point: x or y not FE");if(!w(H,N))throw new Error("bad point: equation left != right");if(!M.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class I{constructor(H,N,z){if(H==null||!u.isValid(H))throw new Error("x required");if(N==null||!u.isValid(N)||u.is0(N))throw new Error("y required");if(z==null||!u.isValid(z))throw new Error("z required");this.px=H,this.py=N,this.pz=z,Object.freeze(this)}static fromAffine(H){const{x:N,y:z}=H||{};if(!H||!u.isValid(N)||!u.isValid(z))throw new Error("invalid affine point");if(H instanceof I)throw new Error("projective point not allowed");const $=U=>u.eql(U,u.ZERO);return $(N)&&$(z)?I.ZERO:new I(N,z,u.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(H){const N=(0,n.FpInvertBatch)(u,H.map(z=>z.pz));return H.map((z,$)=>z.toAffine(N[$])).map(I.fromAffine)}static fromHex(H){const N=I.fromAffine(y((0,t.ensureBytes)("pointHex",H)));return N.assertValidity(),N}static fromPrivateKey(H){return I.BASE.multiply(S(H))}static msm(H,N){return(0,r.pippenger)(I,E,H,N)}_setWindowSize(H){q.setWindowSize(this,H)}assertValidity(){C(this)}hasEvenY(){const{y:H}=this.toAffine();if(u.isOdd)return!u.isOdd(H);throw new Error("Field doesn't support isOdd")}equals(H){x(H);const{px:N,py:z,pz:$}=this,{px:U,py:G,pz:K}=H,W=u.eql(u.mul(N,K),u.mul(U,$)),V=u.eql(u.mul(z,K),u.mul(G,$));return W&&V}negate(){return new I(this.px,u.neg(this.py),this.pz)}double(){const{a:H,b:N}=P,z=u.mul(N,f),{px:$,py:U,pz:G}=this;let K=u.ZERO,W=u.ZERO,V=u.ZERO,J=u.mul($,$),oe=u.mul(U,U),Y=u.mul(G,G),X=u.mul($,U);return X=u.add(X,X),V=u.mul($,G),V=u.add(V,V),K=u.mul(H,V),W=u.mul(z,Y),W=u.add(K,W),K=u.sub(oe,W),W=u.add(oe,W),W=u.mul(K,W),K=u.mul(X,K),V=u.mul(z,V),Y=u.mul(H,Y),X=u.sub(J,Y),X=u.mul(H,X),X=u.add(X,V),V=u.add(J,J),J=u.add(V,J),J=u.add(J,Y),J=u.mul(J,X),W=u.add(W,J),Y=u.mul(U,G),Y=u.add(Y,Y),J=u.mul(Y,X),K=u.sub(K,J),V=u.mul(Y,oe),V=u.add(V,V),V=u.add(V,V),new I(K,W,V)}add(H){x(H);const{px:N,py:z,pz:$}=this,{px:U,py:G,pz:K}=H;let W=u.ZERO,V=u.ZERO,J=u.ZERO;const oe=P.a,Y=u.mul(P.b,f);let X=u.mul(N,U),ee=u.mul(z,G),ie=u.mul($,K),re=u.add(N,z),se=u.add(U,G);re=u.mul(re,se),se=u.add(X,ee),re=u.sub(re,se),se=u.add(N,$);let de=u.add(U,K);return se=u.mul(se,de),de=u.add(X,ie),se=u.sub(se,de),de=u.add(z,$),W=u.add(G,K),de=u.mul(de,W),W=u.add(ee,ie),de=u.sub(de,W),J=u.mul(oe,se),W=u.mul(Y,ie),J=u.add(W,J),W=u.sub(ee,J),J=u.add(ee,J),V=u.mul(W,J),ee=u.add(X,X),ee=u.add(ee,X),ie=u.mul(oe,ie),se=u.mul(Y,se),ee=u.add(ee,ie),ie=u.sub(X,ie),ie=u.mul(oe,ie),se=u.add(se,ie),X=u.mul(ee,se),V=u.add(V,X),X=u.mul(de,se),W=u.mul(re,W),W=u.sub(W,X),X=u.mul(re,ee),J=u.mul(de,J),J=u.add(J,X),new I(W,V,J)}subtract(H){return this.add(H.negate())}is0(){return this.equals(I.ZERO)}wNAF(H){return q.wNAFCached(this,H,I.normalizeZ)}multiplyUnsafe(H){const{endo:N,n:z}=P;(0,t.aInRange)("scalar",H,c,z);const $=I.ZERO;if(H===c)return $;if(this.is0()||H===d)return this;if(!N||q.hasPrecomputes(this))return q.wNAFCachedUnsafe(this,H,I.normalizeZ);let{k1neg:U,k1:G,k2neg:K,k2:W}=N.splitScalar(H),V=$,J=$,oe=this;for(;G>c||W>c;)G&d&&(V=V.add(oe)),W&d&&(J=J.add(oe)),oe=oe.double(),G>>=d,W>>=d;return U&&(V=V.negate()),K&&(J=J.negate()),J=new I(u.mul(J.px,N.beta),J.py,J.pz),V.add(J)}multiply(H){const{endo:N,n:z}=P;(0,t.aInRange)("scalar",H,d,z);let $,U;if(N){const{k1neg:G,k1:K,k2neg:W,k2:V}=N.splitScalar(H);let{p:J,f:oe}=this.wNAF(K),{p:Y,f:X}=this.wNAF(V);J=q.constTimeNegate(G,J),Y=q.constTimeNegate(W,Y),Y=new I(u.mul(Y.px,N.beta),Y.py,Y.pz),$=J.add(Y),U=oe.add(X)}else{const{p:G,f:K}=this.wNAF(H);$=G,U=K}return I.normalizeZ([$,U])[0]}multiplyAndAddUnsafe(H,N,z){const $=I.BASE,U=(K,W)=>W===c||W===d||!K.equals($)?K.multiplyUnsafe(W):K.multiply(W),G=U(this,N).add(U(H,z));return G.is0()?void 0:G}toAffine(H){return k(this,H)}isTorsionFree(){const{h:H,isTorsionFree:N}=P;if(H===d)return!0;if(N)return N(I,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:H,clearCofactor:N}=P;return H===d?this:N?N(I,this):this.multiplyUnsafe(P.h)}toRawBytes(H=!0){return(0,t.abool)("isCompressed",H),this.assertValidity(),p(I,this,H)}toHex(H=!0){return(0,t.abool)("isCompressed",H),(0,t.bytesToHex)(this.toRawBytes(H))}}I.BASE=new I(P.Gx,P.Gy,u.ONE),I.ZERO=new I(u.ZERO,u.ONE,u.ZERO);const{endo:F,nBitLength:R}=P,q=(0,r.wNAF)(I,F?Math.ceil(R/2):R);return{CURVE:P,ProjectivePoint:I,normPrivateKeyToScalar:S,weierstrassEquation:A,isWithinCurveOrder:B}}function h(g){const P=(0,r.validateBasic)(g);return(0,t.validateObject)(P,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...P})}function b(g){const P=h(g),{Fp:u,n:E,nByteLength:p,nBitLength:y}=P,A=u.BYTES+1,w=2*u.BYTES+1;function T(Y){return(0,n.mod)(Y,E)}function O(Y){return(0,n.invert)(Y,E)}const{ProjectivePoint:B,normPrivateKeyToScalar:S,weierstrassEquation:x,isWithinCurveOrder:k}=v({...P,toBytes(Y,X,ee){const ie=X.toAffine(),re=u.toBytes(ie.x),se=t.concatBytes;return(0,t.abool)("isCompressed",ee),ee?se(Uint8Array.from([X.hasEvenY()?2:3]),re):se(Uint8Array.from([4]),re,u.toBytes(ie.y))},fromBytes(Y){const X=Y.length,ee=Y[0],ie=Y.subarray(1);if(X===A&&(ee===2||ee===3)){const re=(0,t.bytesToNumberBE)(ie);if(!(0,t.inRange)(re,d,u.ORDER))throw new Error("Point is not on curve");const se=x(re);let de;try{de=u.sqrt(se)}catch(Ce){const Ie=Ce instanceof Error?": "+Ce.message:"";throw new Error("Point is not on curve"+Ie)}const Q=(de&d)===d;return(ee&1)===1!==Q&&(de=u.neg(de)),{x:re,y:de}}else if(X===w&&ee===4){const re=u.fromBytes(ie.subarray(0,u.BYTES)),se=u.fromBytes(ie.subarray(u.BYTES,2*u.BYTES));return{x:re,y:se}}else{const re=A,se=w;throw new Error("invalid Point, expected length of "+re+", or uncompressed "+se+", got "+X)}}});function C(Y){const X=E>>d;return Y>X}function I(Y){return C(Y)?T(-Y):Y}const F=(Y,X,ee)=>(0,t.bytesToNumberBE)(Y.slice(X,ee));class R{constructor(X,ee,ie){(0,t.aInRange)("r",X,d,E),(0,t.aInRange)("s",ee,d,E),this.r=X,this.s=ee,ie!=null&&(this.recovery=ie),Object.freeze(this)}static fromCompact(X){const ee=p;return X=(0,t.ensureBytes)("compactSignature",X,ee*2),new R(F(X,0,ee),F(X,ee,2*ee))}static fromDER(X){const{r:ee,s:ie}=e.DER.toSig((0,t.ensureBytes)("DER",X));return new R(ee,ie)}assertValidity(){}addRecoveryBit(X){return new R(this.r,this.s,X)}recoverPublicKey(X){const{r:ee,s:ie,recovery:re}=this,se=$((0,t.ensureBytes)("msgHash",X));if(re==null||![0,1,2,3].includes(re))throw new Error("recovery id invalid");const de=re===2||re===3?ee+P.n:ee;if(de>=u.ORDER)throw new Error("recovery id 2 or 3 invalid");const Q=re&1?"03":"02",Z=B.fromHex(Q+a(de,u.BYTES)),Ce=O(de),Ie=T(-se*Ce),xe=T(ie*Ce),Re=B.BASE.multiplyAndAddUnsafe(Z,Ie,xe);if(!Re)throw new Error("point at infinify");return Re.assertValidity(),Re}hasHighS(){return C(this.s)}normalizeS(){return this.hasHighS()?new R(this.r,T(-this.s),this.recovery):this}toDERRawBytes(){return(0,t.hexToBytes)(this.toDERHex())}toDERHex(){return e.DER.hexFromSig(this)}toCompactRawBytes(){return(0,t.hexToBytes)(this.toCompactHex())}toCompactHex(){const X=p;return a(this.r,X)+a(this.s,X)}}const q={isValidPrivateKey(Y){try{return S(Y),!0}catch{return!1}},normPrivateKeyToScalar:S,randomPrivateKey:()=>{const Y=(0,n.getMinHashLength)(P.n);return(0,n.mapHashToField)(P.randomBytes(Y),P.n)},precompute(Y=8,X=B.BASE){return X._setWindowSize(Y),X.multiply(BigInt(3)),X}};function M(Y,X=!0){return B.fromPrivateKey(Y).toRawBytes(X)}function H(Y){if(typeof Y=="bigint")return!1;if(Y instanceof B)return!0;const ee=(0,t.ensureBytes)("key",Y).length,ie=u.BYTES,re=ie+1,se=2*ie+1;if(!(P.allowedPrivateKeyLengths||p===re))return ee===re||ee===se}function N(Y,X,ee=!0){if(H(Y)===!0)throw new Error("first arg must be private key");if(H(X)===!1)throw new Error("second arg must be public key");return B.fromHex(X).multiply(S(Y)).toRawBytes(ee)}const z=P.bits2int||function(Y){if(Y.length>8192)throw new Error("input is too large");const X=(0,t.bytesToNumberBE)(Y),ee=Y.length*8-y;return ee>0?X>>BigInt(ee):X},$=P.bits2int_modN||function(Y){return T(z(Y))},U=(0,t.bitMask)(y);function G(Y){return(0,t.aInRange)("num < 2^"+y,Y,c,U),(0,t.numberToBytesBE)(Y,p)}function K(Y,X,ee=W){if(["recovered","canonical"].some(Ve=>Ve in ee))throw new Error("sign() legacy options not supported");const{hash:ie,randomBytes:re}=P;let{lowS:se,prehash:de,extraEntropy:Q}=ee;se==null&&(se=!0),Y=(0,t.ensureBytes)("msgHash",Y),i(ee),de&&(Y=(0,t.ensureBytes)("prehashed msgHash",ie(Y)));const Z=$(Y),Ce=S(X),Ie=[G(Ce),G(Z)];if(Q!=null&&Q!==!1){const Ve=Q===!0?re(u.BYTES):Q;Ie.push((0,t.ensureBytes)("extraEntropy",Ve))}const xe=(0,t.concatBytes)(...Ie),Re=Z;function He(Ve){const lt=z(Ve);if(!k(lt))return;const ct=O(lt),ut=B.BASE.multiply(lt).toAffine(),We=T(ut.x);if(We===c)return;const qe=T(ct*T(Re+We*Ce));if(qe===c)return;let At=(ut.x===We?0:2)|Number(ut.y&d),bt=qe;return se&&C(qe)&&(bt=I(qe),At^=1),new R(We,bt,At)}return{seed:xe,k2sig:He}}const W={lowS:P.lowS,prehash:!1},V={lowS:P.lowS,prehash:!1};function J(Y,X,ee=W){const{seed:ie,k2sig:re}=K(Y,X,ee),se=P;return(0,t.createHmacDrbg)(se.hash.outputLen,se.nByteLength,se.hmac)(ie,re)}B.BASE._setWindowSize(8);function oe(Y,X,ee,ie=V){var At;const re=Y;X=(0,t.ensureBytes)("msgHash",X),ee=(0,t.ensureBytes)("publicKey",ee);const{lowS:se,prehash:de,format:Q}=ie;if(i(ie),"strict"in ie)throw new Error("options.strict was renamed to lowS");if(Q!==void 0&&Q!=="compact"&&Q!=="der")throw new Error("format must be compact or der");const Z=typeof re=="string"||(0,t.isBytes)(re),Ce=!Z&&!Q&&typeof re=="object"&&re!==null&&typeof re.r=="bigint"&&typeof re.s=="bigint";if(!Z&&!Ce)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let Ie,xe;try{if(Ce&&(Ie=new R(re.r,re.s)),Z){try{Q!=="compact"&&(Ie=R.fromDER(re))}catch(bt){if(!(bt instanceof e.DER.Err))throw bt}!Ie&&Q!=="der"&&(Ie=R.fromCompact(re))}xe=B.fromHex(ee)}catch{return!1}if(!Ie||se&&Ie.hasHighS())return!1;de&&(X=P.hash(X));const{r:Re,s:He}=Ie,Ve=$(X),lt=O(He),ct=T(Ve*lt),ut=T(Re*lt),We=(At=B.BASE.multiplyAndAddUnsafe(xe,ct,ut))==null?void 0:At.toAffine();return We?T(We.x)===Re:!1}return{CURVE:P,getPublicKey:M,getSharedSecret:N,sign:J,verify:oe,ProjectivePoint:B,Signature:R,utils:q}}function _(g,P){const u=g.ORDER;let E=c;for(let C=u-d;C%l===c;C/=l)E+=d;const p=E,y=l<<p-d-d,A=y*l,w=(u-d)/A,T=(w-d)/l,O=A-d,B=y,S=g.pow(P,w),x=g.pow(P,(w+d)/l);let k=(C,I)=>{let F=S,R=g.pow(I,O),q=g.sqr(R);q=g.mul(q,I);let M=g.mul(C,q);M=g.pow(M,T),M=g.mul(M,R),R=g.mul(M,I),q=g.mul(M,C);let H=g.mul(q,R);M=g.pow(H,B);let N=g.eql(M,g.ONE);R=g.mul(q,x),M=g.mul(H,F),q=g.cmov(R,q,N),H=g.cmov(M,H,N);for(let z=p;z>d;z--){let $=z-l;$=l<<$-d;let U=g.pow(H,$);const G=g.eql(U,g.ONE);R=g.mul(q,F),F=g.mul(F,F),U=g.mul(H,F),q=g.cmov(R,q,G),H=g.cmov(U,H,G)}return{isValid:N,value:q}};if(g.ORDER%m===f){const C=(g.ORDER-f)/m,I=g.sqrt(g.neg(P));k=(F,R)=>{let q=g.sqr(R);const M=g.mul(F,R);q=g.mul(q,M);let H=g.pow(q,C);H=g.mul(H,M);const N=g.mul(H,I),z=g.mul(g.sqr(H),R),$=g.eql(z,F);let U=g.cmov(N,H,$);return{isValid:$,value:U}}}return k}function j(g,P){if((0,n.validateField)(g),!g.isValid(P.A)||!g.isValid(P.B)||!g.isValid(P.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const u=_(g,P.Z);if(!g.isOdd)throw new Error("Fp.isOdd is not implemented!");return E=>{let p,y,A,w,T,O,B,S;p=g.sqr(E),p=g.mul(p,P.Z),y=g.sqr(p),y=g.add(y,p),A=g.add(y,g.ONE),A=g.mul(A,P.B),w=g.cmov(P.Z,g.neg(y),!g.eql(y,g.ZERO)),w=g.mul(w,P.A),y=g.sqr(A),O=g.sqr(w),T=g.mul(O,P.A),y=g.add(y,T),y=g.mul(y,A),O=g.mul(O,w),T=g.mul(O,P.B),y=g.add(y,T),B=g.mul(p,A);const{isValid:x,value:k}=u(y,O);S=g.mul(p,E),S=g.mul(S,k),B=g.cmov(B,A,x),S=g.cmov(S,k,x);const C=g.isOdd(E)===g.isOdd(S);S=g.cmov(g.neg(S),S,C);const I=(0,n.FpInvertBatch)(g,[w],!0)[0];return B=g.mul(B,I),{x:B,y:S}}}}(id)),id}var n1;function R_(){if(n1)return Un;n1=1,Object.defineProperty(Un,"__esModule",{value:!0}),Un.getHash=t,Un.createCurve=i;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=S_(),r=nr(),n=yp();function t(s){return{hash:s,hmac:(o,...a)=>(0,e.hmac)(s,o,(0,r.concatBytes)(...a)),randomBytes:r.randomBytes}}function i(s,o){const a=c=>(0,n.weierstrass)({...s,...t(c)});return{...a(o),create:a}}return Un}var Qt={},o1;function O_(){if(o1)return Qt;o1=1,Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.expand_message_xmd=o,Qt.expand_message_xof=a,Qt.hash_to_field=c,Qt.isogenyMap=d,Qt.createHasher=l;const e=vu(),r=Cr(),n=r.bytesToNumberBE;function t(f,m){if(s(f),s(m),f<0||f>=1<<8*m)throw new Error("invalid I2OSP input: "+f);const v=Array.from({length:m}).fill(0);for(let h=m-1;h>=0;h--)v[h]=f&255,f>>>=8;return new Uint8Array(v)}function i(f,m){const v=new Uint8Array(f.length);for(let h=0;h<f.length;h++)v[h]=f[h]^m[h];return v}function s(f){if(!Number.isSafeInteger(f))throw new Error("number expected")}function o(f,m,v,h){(0,r.abytes)(f),(0,r.abytes)(m),s(v),m.length>255&&(m=h((0,r.concatBytes)((0,r.utf8ToBytes)("H2C-OVERSIZE-DST-"),m)));const{outputLen:b,blockLen:_}=h,j=Math.ceil(v/b);if(v>65535||j>255)throw new Error("expand_message_xmd: invalid lenInBytes");const g=(0,r.concatBytes)(m,t(m.length,1)),P=t(0,_),u=t(v,2),E=new Array(j),p=h((0,r.concatBytes)(P,f,u,t(0,1),g));E[0]=h((0,r.concatBytes)(p,t(1,1),g));for(let A=1;A<=j;A++){const w=[i(p,E[A-1]),t(A+1,1),g];E[A]=h((0,r.concatBytes)(...w))}return(0,r.concatBytes)(...E).slice(0,v)}function a(f,m,v,h,b){if((0,r.abytes)(f),(0,r.abytes)(m),s(v),m.length>255){const _=Math.ceil(2*h/8);m=b.create({dkLen:_}).update((0,r.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(m).digest()}if(v>65535||m.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return b.create({dkLen:v}).update(f).update(t(v,2)).update(m).update(t(m.length,1)).digest()}function c(f,m,v){(0,r.validateObject)(v,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:h,k:b,m:_,hash:j,expand:g,DST:P}=v;(0,r.abytes)(f),s(m);const u=typeof P=="string"?(0,r.utf8ToBytes)(P):P,E=h.toString(2).length,p=Math.ceil((E+b)/8),y=m*_*p;let A;if(g==="xmd")A=o(f,u,y,j);else if(g==="xof")A=a(f,u,y,b,j);else if(g==="_internal_pass")A=f;else throw new Error('expand must be "xmd" or "xof"');const w=new Array(m);for(let T=0;T<m;T++){const O=new Array(_);for(let B=0;B<_;B++){const S=p*(B+T*_),x=A.subarray(S,S+p);O[B]=(0,e.mod)(n(x),h)}w[T]=O}return w}function d(f,m){const v=m.map(h=>Array.from(h).reverse());return(h,b)=>{const[_,j,g,P]=v.map(p=>p.reduce((y,A)=>f.add(f.mul(y,h),A))),[u,E]=(0,e.FpInvertBatch)(f,[j,P],!0);return h=f.mul(_,u),b=f.mul(b,f.mul(g,E)),{x:h,y:b}}}function l(f,m,v){if(typeof m!="function")throw new Error("mapToCurve() must be defined");function h(_){return f.fromAffine(m(_))}function b(_){const j=_.clearCofactor();return j.equals(f.ZERO)?f.ZERO:(j.assertValidity(),j)}return{defaults:v,hashToCurve(_,j){const g=c(_,2,{...v,DST:v.DST,...j}),P=h(g[0]),u=h(g[1]);return b(P.add(u))},encodeToCurve(_,j){const g=c(_,1,{...v,DST:v.encodeDST,...j});return b(h(g[0]))},mapToCurve(_){if(!Array.isArray(_))throw new Error("expected array of bigints");for(const j of _)if(typeof j!="bigint")throw new Error("expected array of bigints");return b(h(_))}}}return Qt}var Pr={},i1;function x_(){if(i1)return Pr;i1=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.extraEntropy=void 0,Pr.setExtraEntropy=e,Pr.extraEntropy=!1;function e(r){Pr.extraEntropy=r}return Pr}var ot={},ad={},a1;function qr(){return a1||(a1=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.encodeToCurve=e.hashToCurve=e.secp256k1_hasher=e.schnorr=e.secp256k1=void 0;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const r=np(),n=nr(),t=R_(),i=O_(),s=vu(),o=Cr(),a=yp(),c=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),d=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),l=BigInt(0),f=BigInt(1),m=BigInt(2),v=(I,F)=>(I+F/m)/F;function h(I){const F=c,R=BigInt(3),q=BigInt(6),M=BigInt(11),H=BigInt(22),N=BigInt(23),z=BigInt(44),$=BigInt(88),U=I*I*I%F,G=U*U*I%F,K=(0,s.pow2)(G,R,F)*G%F,W=(0,s.pow2)(K,R,F)*G%F,V=(0,s.pow2)(W,m,F)*U%F,J=(0,s.pow2)(V,M,F)*V%F,oe=(0,s.pow2)(J,H,F)*J%F,Y=(0,s.pow2)(oe,z,F)*oe%F,X=(0,s.pow2)(Y,$,F)*Y%F,ee=(0,s.pow2)(X,z,F)*oe%F,ie=(0,s.pow2)(ee,R,F)*G%F,re=(0,s.pow2)(ie,N,F)*J%F,se=(0,s.pow2)(re,q,F)*U%F,de=(0,s.pow2)(se,m,F);if(!b.eql(b.sqr(de),I))throw new Error("Cannot find square root");return de}const b=(0,s.Field)(c,void 0,void 0,{sqrt:h});e.secp256k1=(0,t.createCurve)({a:l,b:BigInt(7),Fp:b,n:d,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:I=>{const F=d,R=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),q=-f*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),M=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),H=R,N=BigInt("0x100000000000000000000000000000000"),z=v(H*I,F),$=v(-q*I,F);let U=(0,s.mod)(I-z*R-$*M,F),G=(0,s.mod)(-z*q-$*H,F);const K=U>N,W=G>N;if(K&&(U=F-U),W&&(G=F-G),U>N||G>N)throw new Error("splitScalar: Endomorphism failed, k="+I);return{k1neg:K,k1:U,k2neg:W,k2:G}}}},r.sha256);const _={};function j(I,...F){let R=_[I];if(R===void 0){const q=(0,r.sha256)(Uint8Array.from(I,M=>M.charCodeAt(0)));R=(0,o.concatBytes)(q,q),_[I]=R}return(0,r.sha256)((0,o.concatBytes)(R,...F))}const g=I=>I.toRawBytes(!0).slice(1),P=I=>(0,o.numberToBytesBE)(I,32),u=I=>(0,s.mod)(I,c),E=I=>(0,s.mod)(I,d),p=(()=>e.secp256k1.ProjectivePoint)(),y=(I,F,R)=>p.BASE.multiplyAndAddUnsafe(I,F,R);function A(I){let F=e.secp256k1.utils.normPrivateKeyToScalar(I),R=p.fromPrivateKey(F);return{scalar:R.hasEvenY()?F:E(-F),bytes:g(R)}}function w(I){(0,o.aInRange)("x",I,f,c);const F=u(I*I),R=u(F*I+BigInt(7));let q=h(R);q%m!==l&&(q=u(-q));const M=new p(I,q,f);return M.assertValidity(),M}const T=o.bytesToNumberBE;function O(...I){return E(T(j("BIP0340/challenge",...I)))}function B(I){return A(I).bytes}function S(I,F,R=(0,n.randomBytes)(32)){const q=(0,o.ensureBytes)("message",I),{bytes:M,scalar:H}=A(F),N=(0,o.ensureBytes)("auxRand",R,32),z=P(H^T(j("BIP0340/aux",N))),$=j("BIP0340/nonce",z,M,q),U=E(T($));if(U===l)throw new Error("sign failed: k is zero");const{bytes:G,scalar:K}=A(U),W=O(G,M,q),V=new Uint8Array(64);if(V.set(G,0),V.set(P(E(K+W*H)),32),!x(V,q,M))throw new Error("sign: Invalid signature produced");return V}function x(I,F,R){const q=(0,o.ensureBytes)("signature",I,64),M=(0,o.ensureBytes)("message",F),H=(0,o.ensureBytes)("publicKey",R,32);try{const N=w(T(H)),z=T(q.subarray(0,32));if(!(0,o.inRange)(z,f,c))return!1;const $=T(q.subarray(32,64));if(!(0,o.inRange)($,f,d))return!1;const U=O(P(z),g(N),M),G=y(N,$,E(-U));return!(!G||!G.hasEvenY()||G.toAffine().x!==z)}catch{return!1}}e.schnorr=(()=>({getPublicKey:B,sign:S,verify:x,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:w,pointToBytes:g,numberToBytesBE:o.numberToBytesBE,bytesToNumberBE:o.bytesToNumberBE,taggedHash:j,mod:s.mod}}))();const k=(()=>(0,i.isogenyMap)(b,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(I=>I.map(F=>BigInt(F)))))(),C=(()=>(0,a.mapToCurveSimpleSWU)(b,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:b.create(BigInt("-11"))}))();e.secp256k1_hasher=(()=>(0,i.createHasher)(e.secp256k1.ProjectivePoint,I=>{const{x:F,y:R}=C(b.create(I[0]));return k(F,R)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:b.ORDER,m:1,k:128,expand:"xmd",hash:r.sha256}))(),e.hashToCurve=(()=>e.secp256k1_hasher.hashToCurve)(),e.encodeToCurve=(()=>e.secp256k1_hasher.encodeToCurve)()}(ad)),ad}var s1;function C_(){if(s1)return ot;s1=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.noble=void 0,ot.createKeyPair=o,ot.getPublicKey=a,ot.getSharedSecret=c,ot.randomPrivateKey=d,ot.recoverAddress=l,ot.recoverPublicKey=f,ot.sign=m,ot.verify=v;const e=qr(),r=_u(),n=St(),t=Ne(),i=x_(),s=mp();ot.noble=e.secp256k1;function o(h={}){const{as:b="Hex"}=h,_=d({as:b}),j=a({privateKey:_});return{privateKey:_,publicKey:j}}function a(h){const{privateKey:b}=h,_=e.secp256k1.ProjectivePoint.fromPrivateKey(t.from(b).slice(2));return s.from(_)}function c(h){const{as:b="Hex",privateKey:_,publicKey:j}=h,u=e.secp256k1.ProjectivePoint.fromHex(s.toHex(j).slice(2)).multiply(e.secp256k1.utils.normPrivateKeyToScalar(t.from(_).slice(2))).toRawBytes(!0);return b==="Hex"?t.fromBytes(u):u}function d(h={}){const{as:b="Hex"}=h,_=e.secp256k1.utils.randomPrivateKey();return b==="Hex"?t.fromBytes(_):_}function l(h){return r.fromPublicKey(f(h))}function f(h){const{payload:b,signature:_}=h,{r:j,s:g,yParity:P}=_,E=new e.secp256k1.Signature(BigInt(j),BigInt(g)).addRecoveryBit(P).recoverPublicKey(t.from(b).substring(2));return s.from(E)}function m(h){const{extraEntropy:b=i.extraEntropy,hash:_,payload:j,privateKey:g}=h,{r:P,s:u,recovery:E}=e.secp256k1.sign(n.from(j),n.from(g),{extraEntropy:typeof b=="boolean"?b:t.from(b).slice(2),lowS:!0,..._?{prehash:!0}:{}});return{r:P,s:u,yParity:E}}function v(h){const{address:b,hash:_,payload:j,publicKey:g,signature:P}=h;return b?r.isEqual(b,l({payload:j,signature:P})):e.secp256k1.verify(P,n.from(j),s.toBytes(g),..._?[{prehash:!0,lowS:!0}]:[])}return ot}var be={},L={},c1;function Hd(){return c1||(c1=1,Object.defineProperty(L,"__esModule",{value:!0}),L.minInt120=L.minInt112=L.minInt104=L.minInt96=L.minInt88=L.minInt80=L.minInt72=L.minInt64=L.minInt56=L.minInt48=L.minInt40=L.minInt32=L.minInt24=L.minInt16=L.minInt8=L.maxInt256=L.maxInt248=L.maxInt240=L.maxInt232=L.maxInt224=L.maxInt216=L.maxInt208=L.maxInt200=L.maxInt192=L.maxInt184=L.maxInt176=L.maxInt168=L.maxInt160=L.maxInt152=L.maxInt144=L.maxInt136=L.maxInt128=L.maxInt120=L.maxInt112=L.maxInt104=L.maxInt96=L.maxInt88=L.maxInt80=L.maxInt72=L.maxInt64=L.maxInt56=L.maxInt48=L.maxInt40=L.maxInt32=L.maxInt24=L.maxInt16=L.maxInt8=L.integerRegex=L.bytesRegex=L.arrayRegex=void 0,L.maxUint256=L.maxUint248=L.maxUint240=L.maxUint232=L.maxUint224=L.maxUint216=L.maxUint208=L.maxUint200=L.maxUint192=L.maxUint184=L.maxUint176=L.maxUint168=L.maxUint160=L.maxUint152=L.maxUint144=L.maxUint136=L.maxUint128=L.maxUint120=L.maxUint112=L.maxUint104=L.maxUint96=L.maxUint88=L.maxUint80=L.maxUint72=L.maxUint64=L.maxUint56=L.maxUint48=L.maxUint40=L.maxUint32=L.maxUint24=L.maxUint16=L.maxUint8=L.minInt256=L.minInt248=L.minInt240=L.minInt232=L.minInt224=L.minInt216=L.minInt208=L.minInt200=L.minInt192=L.minInt184=L.minInt176=L.minInt168=L.minInt160=L.minInt152=L.minInt144=L.minInt136=L.minInt128=void 0,L.arrayRegex=/^(.*)\[([0-9]*)\]$/,L.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,L.integerRegex=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,L.maxInt8=2n**(8n-1n)-1n,L.maxInt16=2n**(16n-1n)-1n,L.maxInt24=2n**(24n-1n)-1n,L.maxInt32=2n**(32n-1n)-1n,L.maxInt40=2n**(40n-1n)-1n,L.maxInt48=2n**(48n-1n)-1n,L.maxInt56=2n**(56n-1n)-1n,L.maxInt64=2n**(64n-1n)-1n,L.maxInt72=2n**(72n-1n)-1n,L.maxInt80=2n**(80n-1n)-1n,L.maxInt88=2n**(88n-1n)-1n,L.maxInt96=2n**(96n-1n)-1n,L.maxInt104=2n**(104n-1n)-1n,L.maxInt112=2n**(112n-1n)-1n,L.maxInt120=2n**(120n-1n)-1n,L.maxInt128=2n**(128n-1n)-1n,L.maxInt136=2n**(136n-1n)-1n,L.maxInt144=2n**(144n-1n)-1n,L.maxInt152=2n**(152n-1n)-1n,L.maxInt160=2n**(160n-1n)-1n,L.maxInt168=2n**(168n-1n)-1n,L.maxInt176=2n**(176n-1n)-1n,L.maxInt184=2n**(184n-1n)-1n,L.maxInt192=2n**(192n-1n)-1n,L.maxInt200=2n**(200n-1n)-1n,L.maxInt208=2n**(208n-1n)-1n,L.maxInt216=2n**(216n-1n)-1n,L.maxInt224=2n**(224n-1n)-1n,L.maxInt232=2n**(232n-1n)-1n,L.maxInt240=2n**(240n-1n)-1n,L.maxInt248=2n**(248n-1n)-1n,L.maxInt256=2n**(256n-1n)-1n,L.minInt8=-(2n**(8n-1n)),L.minInt16=-(2n**(16n-1n)),L.minInt24=-(2n**(24n-1n)),L.minInt32=-(2n**(32n-1n)),L.minInt40=-(2n**(40n-1n)),L.minInt48=-(2n**(48n-1n)),L.minInt56=-(2n**(56n-1n)),L.minInt64=-(2n**(64n-1n)),L.minInt72=-(2n**(72n-1n)),L.minInt80=-(2n**(80n-1n)),L.minInt88=-(2n**(88n-1n)),L.minInt96=-(2n**(96n-1n)),L.minInt104=-(2n**(104n-1n)),L.minInt112=-(2n**(112n-1n)),L.minInt120=-(2n**(120n-1n)),L.minInt128=-(2n**(128n-1n)),L.minInt136=-(2n**(136n-1n)),L.minInt144=-(2n**(144n-1n)),L.minInt152=-(2n**(152n-1n)),L.minInt160=-(2n**(160n-1n)),L.minInt168=-(2n**(168n-1n)),L.minInt176=-(2n**(176n-1n)),L.minInt184=-(2n**(184n-1n)),L.minInt192=-(2n**(192n-1n)),L.minInt200=-(2n**(200n-1n)),L.minInt208=-(2n**(208n-1n)),L.minInt216=-(2n**(216n-1n)),L.minInt224=-(2n**(224n-1n)),L.minInt232=-(2n**(232n-1n)),L.minInt240=-(2n**(240n-1n)),L.minInt248=-(2n**(248n-1n)),L.minInt256=-(2n**(256n-1n)),L.maxUint8=2n**8n-1n,L.maxUint16=2n**16n-1n,L.maxUint24=2n**24n-1n,L.maxUint32=2n**32n-1n,L.maxUint40=2n**40n-1n,L.maxUint48=2n**48n-1n,L.maxUint56=2n**56n-1n,L.maxUint64=2n**64n-1n,L.maxUint72=2n**72n-1n,L.maxUint80=2n**80n-1n,L.maxUint88=2n**88n-1n,L.maxUint96=2n**96n-1n,L.maxUint104=2n**104n-1n,L.maxUint112=2n**112n-1n,L.maxUint120=2n**120n-1n,L.maxUint128=2n**128n-1n,L.maxUint136=2n**136n-1n,L.maxUint144=2n**144n-1n,L.maxUint152=2n**152n-1n,L.maxUint160=2n**160n-1n,L.maxUint168=2n**168n-1n,L.maxUint176=2n**176n-1n,L.maxUint184=2n**184n-1n,L.maxUint192=2n**192n-1n,L.maxUint200=2n**200n-1n,L.maxUint208=2n**208n-1n,L.maxUint216=2n**216n-1n,L.maxUint224=2n**224n-1n,L.maxUint232=2n**232n-1n,L.maxUint240=2n**240n-1n,L.maxUint248=2n**248n-1n,L.maxUint256=2n**256n-1n),L}var u1;function hp(){if(u1)return be;u1=1,Object.defineProperty(be,"__esModule",{value:!0}),be.InvalidVError=be.InvalidYParityError=be.InvalidSError=be.InvalidRError=be.MissingPropertiesError=be.InvalidSerializedSizeError=void 0,be.assert=o,be.fromBytes=a,be.fromHex=c,be.extract=d,be.from=l,be.fromDerBytes=f,be.fromDerHex=m,be.fromLegacy=v,be.fromRpc=h,be.fromTuple=b,be.toBytes=_,be.toHex=j,be.toDerBytes=g,be.toDerHex=P,be.toLegacy=u,be.toRpc=E,be.toTuple=p,be.validate=y,be.vToYParity=A,be.yParityToV=w;const e=qr(),r=St(),n=st(),t=Ne(),i=gu(),s=Hd();function o(C,I={}){const{recovered:F}=I;if(typeof C.r>"u")throw new O({signature:C});if(typeof C.s>"u")throw new O({signature:C});if(F&&typeof C.yParity>"u")throw new O({signature:C});if(C.r<0n||C.r>s.maxUint256)throw new B({value:C.r});if(C.s<0n||C.s>s.maxUint256)throw new S({value:C.s});if(typeof C.yParity=="number"&&C.yParity!==0&&C.yParity!==1)throw new x({value:C.yParity})}function a(C){return c(t.fromBytes(C))}function c(C){if(C.length!==130&&C.length!==132)throw new T({signature:C});const I=BigInt(t.slice(C,0,32)),F=BigInt(t.slice(C,32,64)),R=(()=>{const q=+`0x${C.slice(130)}`;if(!Number.isNaN(q))try{return A(q)}catch{throw new x({value:q})}})();return typeof R>"u"?{r:I,s:F}:{r:I,s:F,yParity:R}}function d(C){if(!(typeof C.r>"u")&&!(typeof C.s>"u"))return l(C)}function l(C){const I=(()=>typeof C=="string"?c(C):C instanceof Uint8Array?a(C):typeof C.r=="string"?h(C):C.v?v(C):{r:C.r,s:C.s,...typeof C.yParity<"u"?{yParity:C.yParity}:{}})();return o(I),I}function f(C){return m(t.fromBytes(C))}function m(C){const{r:I,s:F}=e.secp256k1.Signature.fromDER(t.from(C).slice(2));return{r:I,s:F}}function v(C){return{r:C.r,s:C.s,yParity:A(C.v)}}function h(C){const I=(()=>{const F=C.v?Number(C.v):void 0;let R=C.yParity?Number(C.yParity):void 0;if(typeof F=="number"&&typeof R!="number"&&(R=A(F)),typeof R!="number")throw new x({value:C.yParity});return R})();return{r:BigInt(C.r),s:BigInt(C.s),yParity:I}}function b(C){const[I,F,R]=C;return l({r:F==="0x"?0n:BigInt(F),s:R==="0x"?0n:BigInt(R),yParity:I==="0x"?0:Number(I)})}function _(C){return r.fromHex(j(C))}function j(C){o(C);const I=C.r,F=C.s;return t.concat(t.fromNumber(I,{size:32}),t.fromNumber(F,{size:32}),typeof C.yParity=="number"?t.fromNumber(w(C.yParity),{size:1}):"0x")}function g(C){return new e.secp256k1.Signature(C.r,C.s).toDERRawBytes()}function P(C){return`0x${new e.secp256k1.Signature(C.r,C.s).toDERHex()}`}function u(C){return{r:C.r,s:C.s,v:w(C.yParity)}}function E(C){const{r:I,s:F,yParity:R}=C;return{r:t.fromNumber(I,{size:32}),s:t.fromNumber(F,{size:32}),yParity:R===0?"0x0":"0x1"}}function p(C){const{r:I,s:F,yParity:R}=C;return[R?"0x01":"0x",I===0n?"0x":t.trimLeft(t.fromNumber(I)),F===0n?"0x":t.trimLeft(t.fromNumber(F))]}function y(C,I={}){try{return o(C,I),!0}catch{return!1}}function A(C){if(C===0||C===27)return 0;if(C===1||C===28)return 1;if(C>=35)return C%2===0?1:0;throw new k({value:C})}function w(C){if(C===0)return 27;if(C===1)return 28;throw new x({value:C})}class T extends n.BaseError{constructor({signature:I}){super(`Value \`${I}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${t.size(t.from(I))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}be.InvalidSerializedSizeError=T;class O extends n.BaseError{constructor({signature:I}){super(`Signature \`${i.stringify(I)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}be.MissingPropertiesError=O;class B extends n.BaseError{constructor({value:I}){super(`Value \`${I}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}be.InvalidRError=B;class S extends n.BaseError{constructor({value:I}){super(`Value \`${I}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}be.InvalidSError=S;class x extends n.BaseError{constructor({value:I}){super(`Value \`${I}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}be.InvalidYParityError=x;class k extends n.BaseError{constructor({value:I}){super(`Value \`${I}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}return be.InvalidVError=k,be}var Ci={},d1;function pp(){if(d1)return Ci;d1=1,Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.getCode=r;const e=te();async function r(n,{address:t,blockNumber:i,blockTag:s="latest"}){const o=i!==void 0?(0,e.numberToHex)(i):void 0,a=await n.request({method:"eth_getCode",params:[t,o||s]},{dedupe:!!o});if(a!=="0x")return a}return Ci}var Zr={},Ln={},sd={},we={},Pe={},f1;function q_(){if(f1)return Pe;f1=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.decodeParameter=o,Pe.decodeAddress=d,Pe.decodeArray=l,Pe.decodeBool=f,Pe.decodeBytes=m,Pe.decodeNumber=v,Pe.decodeTuple=h,Pe.decodeString=b,Pe.prepareParameters=_,Pe.prepareParameter=j,Pe.encode=g,Pe.encodeAddress=P,Pe.encodeArray=u,Pe.encodeBytes=E,Pe.encodeBoolean=p,Pe.encodeNumber=y,Pe.encodeString=A,Pe.encodeTuple=w,Pe.getArrayComponents=T,Pe.hasDynamicChild=O;const e=jo(),r=_u(),n=St(),t=st(),i=Ne(),s=Hd();function o(B,S,x){const{checksumAddress:k,staticPosition:C}=x,I=T(S.type);if(I){const[F,R]=I;return l(B,{...S,type:R},{checksumAddress:k,length:F,staticPosition:C})}if(S.type==="tuple")return h(B,S,{checksumAddress:k,staticPosition:C});if(S.type==="address")return d(B,{checksum:k});if(S.type==="bool")return f(B);if(S.type.startsWith("bytes"))return m(B,S,{staticPosition:C});if(S.type.startsWith("uint")||S.type.startsWith("int"))return v(B,S);if(S.type==="string")return b(B,{staticPosition:C});throw new e.InvalidTypeError(S.type)}const a=32,c=32;function d(B,S={}){const{checksum:x=!1}=S,k=B.readBytes(32);return[(I=>x?r.checksum(I):I)(i.fromBytes(n.slice(k,-20))),32]}function l(B,S,x){const{checksumAddress:k,length:C,staticPosition:I}=x;if(!C){const q=n.toNumber(B.readBytes(c)),M=I+q,H=M+a;B.setPosition(M);const N=n.toNumber(B.readBytes(a)),z=O(S);let $=0;const U=[];for(let G=0;G<N;++G){B.setPosition(H+(z?G*32:$));const[K,W]=o(B,S,{checksumAddress:k,staticPosition:H});$+=W,U.push(K)}return B.setPosition(I+32),[U,32]}if(O(S)){const q=n.toNumber(B.readBytes(c)),M=I+q,H=[];for(let N=0;N<C;++N){B.setPosition(M+N*32);const[z]=o(B,S,{checksumAddress:k,staticPosition:M});H.push(z)}return B.setPosition(I+32),[H,32]}let F=0;const R=[];for(let q=0;q<C;++q){const[M,H]=o(B,S,{checksumAddress:k,staticPosition:I+F});F+=H,R.push(M)}return[R,F]}function f(B){return[n.toBoolean(B.readBytes(32),{size:32}),32]}function m(B,S,{staticPosition:x}){const[k,C]=S.type.split("bytes");if(!C){const F=n.toNumber(B.readBytes(32));B.setPosition(x+F);const R=n.toNumber(B.readBytes(32));if(R===0)return B.setPosition(x+32),["0x",32];const q=B.readBytes(R);return B.setPosition(x+32),[i.fromBytes(q),32]}return[i.fromBytes(B.readBytes(Number.parseInt(C,10),32)),32]}function v(B,S){const x=S.type.startsWith("int"),k=Number.parseInt(S.type.split("int")[1]||"256",10),C=B.readBytes(32);return[k>48?n.toBigInt(C,{signed:x}):n.toNumber(C,{signed:x}),32]}function h(B,S,x){const{checksumAddress:k,staticPosition:C}=x,I=S.components.length===0||S.components.some(({name:q})=>!q),F=I?[]:{};let R=0;if(O(S)){const q=n.toNumber(B.readBytes(c)),M=C+q;for(let H=0;H<S.components.length;++H){const N=S.components[H];B.setPosition(M+R);const[z,$]=o(B,N,{checksumAddress:k,staticPosition:M});R+=$,F[I?H:N==null?void 0:N.name]=z}return B.setPosition(C+32),[F,32]}for(let q=0;q<S.components.length;++q){const M=S.components[q],[H,N]=o(B,M,{checksumAddress:k,staticPosition:C});F[I?q:M==null?void 0:M.name]=H,R+=N}return[F,R]}function b(B,{staticPosition:S}){const x=n.toNumber(B.readBytes(32)),k=S+x;B.setPosition(k);const C=n.toNumber(B.readBytes(32));if(C===0)return B.setPosition(S+32),["",32];const I=B.readBytes(C,32),F=n.toString(n.trimLeft(I));return B.setPosition(S+32),[F,32]}function _({checksumAddress:B,parameters:S,values:x}){const k=[];for(let C=0;C<S.length;C++)k.push(j({checksumAddress:B,parameter:S[C],value:x[C]}));return k}function j({checksumAddress:B=!1,parameter:S,value:x}){const k=S,C=T(k.type);if(C){const[I,F]=C;return u(x,{checksumAddress:B,length:I,parameter:{...k,type:F}})}if(k.type==="tuple")return w(x,{checksumAddress:B,parameter:k});if(k.type==="address")return P(x,{checksum:B});if(k.type==="bool")return p(x);if(k.type.startsWith("uint")||k.type.startsWith("int")){const I=k.type.startsWith("int"),[,,F="256"]=s.integerRegex.exec(k.type)??[];return y(x,{signed:I,size:Number(F)})}if(k.type.startsWith("bytes"))return E(x,{type:k.type});if(k.type==="string")return A(x);throw new e.InvalidTypeError(k.type)}function g(B){let S=0;for(let I=0;I<B.length;I++){const{dynamic:F,encoded:R}=B[I];F?S+=32:S+=i.size(R)}const x=[],k=[];let C=0;for(let I=0;I<B.length;I++){const{dynamic:F,encoded:R}=B[I];F?(x.push(i.fromNumber(S+C,{size:32})),k.push(R),C+=i.size(R)):x.push(R)}return i.concat(...x,...k)}function P(B,S){const{checksum:x=!1}=S;return r.assert(B,{strict:x}),{dynamic:!1,encoded:i.padLeft(B.toLowerCase())}}function u(B,S){const{checksumAddress:x,length:k,parameter:C}=S,I=k===null;if(!Array.isArray(B))throw new e.InvalidArrayError(B);if(!I&&B.length!==k)throw new e.ArrayLengthMismatchError({expectedLength:k,givenLength:B.length,type:`${C.type}[${k}]`});let F=!1;const R=[];for(let q=0;q<B.length;q++){const M=j({checksumAddress:x,parameter:C,value:B[q]});M.dynamic&&(F=!0),R.push(M)}if(I||F){const q=g(R);if(I){const M=i.fromNumber(R.length,{size:32});return{dynamic:!0,encoded:R.length>0?i.concat(M,q):M}}if(F)return{dynamic:!0,encoded:q}}return{dynamic:!1,encoded:i.concat(...R.map(({encoded:q})=>q))}}function E(B,{type:S}){const[,x]=S.split("bytes"),k=i.size(B);if(!x){let C=B;return k%32!==0&&(C=i.padRight(C,Math.ceil((B.length-2)/2/32)*32)),{dynamic:!0,encoded:i.concat(i.padLeft(i.fromNumber(k,{size:32})),C)}}if(k!==Number.parseInt(x,10))throw new e.BytesSizeMismatchError({expectedSize:Number.parseInt(x,10),value:B});return{dynamic:!1,encoded:i.padRight(B)}}function p(B){if(typeof B!="boolean")throw new t.BaseError(`Invalid boolean value: "${B}" (type: ${typeof B}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:i.padLeft(i.fromBoolean(B))}}function y(B,{signed:S,size:x}){if(typeof x=="number"){const k=2n**(BigInt(x)-(S?1n:0n))-1n,C=S?-k-1n:0n;if(B>k||B<C)throw new i.IntegerOutOfRangeError({max:k.toString(),min:C.toString(),signed:S,size:x/8,value:B.toString()})}return{dynamic:!1,encoded:i.fromNumber(B,{size:32,signed:S})}}function A(B){const S=i.fromString(B),x=Math.ceil(i.size(S)/32),k=[];for(let C=0;C<x;C++)k.push(i.padRight(i.slice(S,C*32,(C+1)*32)));return{dynamic:!0,encoded:i.concat(i.padRight(i.fromNumber(i.size(S),{size:32})),...k)}}function w(B,S){const{checksumAddress:x,parameter:k}=S;let C=!1;const I=[];for(let F=0;F<k.components.length;F++){const R=k.components[F],q=Array.isArray(B)?F:R.name,M=j({checksumAddress:x,parameter:R,value:B[q]});I.push(M),M.dynamic&&(C=!0)}return{dynamic:C,encoded:C?g(I):i.concat(...I.map(({encoded:F})=>F))}}function T(B){const S=B.match(/^(.*)\[(\d+)?\]$/);return S?[S[2]?Number(S[2]):null,S[1]]:void 0}function O(B){var k;const{type:S}=B;if(S==="string"||S==="bytes"||S.endsWith("[]"))return!0;if(S==="tuple")return(k=B.components)==null?void 0:k.some(O);const x=T(B.type);return!!(x&&O({...B,type:x[1]}))}return Pe}var It={},l1;function gp(){if(l1)return It;l1=1,Object.defineProperty(It,"__esModule",{value:!0}),It.RecursiveReadLimitExceededError=It.PositionOutOfBoundsError=It.NegativeOffsetError=void 0,It.create=n;const e=st(),r={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new s({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(o){if(o<0||o>this.bytes.length-1)throw new i({length:this.bytes.length,position:o})},decrementPosition(o){if(o<0)throw new t({offset:o});const a=this.position-o;this.assertPosition(a),this.position=a},getReadCount(o){return this.positionReadCount.get(o||this.position)||0},incrementPosition(o){if(o<0)throw new t({offset:o});const a=this.position+o;this.assertPosition(a),this.position=a},inspectByte(o){const a=o??this.position;return this.assertPosition(a),this.bytes[a]},inspectBytes(o,a){const c=a??this.position;return this.assertPosition(c+o-1),this.bytes.subarray(c,c+o)},inspectUint8(o){const a=o??this.position;return this.assertPosition(a),this.bytes[a]},inspectUint16(o){const a=o??this.position;return this.assertPosition(a+1),this.dataView.getUint16(a)},inspectUint24(o){const a=o??this.position;return this.assertPosition(a+2),(this.dataView.getUint16(a)<<8)+this.dataView.getUint8(a+2)},inspectUint32(o){const a=o??this.position;return this.assertPosition(a+3),this.dataView.getUint32(a)},pushByte(o){this.assertPosition(this.position),this.bytes[this.position]=o,this.position++},pushBytes(o){this.assertPosition(this.position+o.length-1),this.bytes.set(o,this.position),this.position+=o.length},pushUint8(o){this.assertPosition(this.position),this.bytes[this.position]=o,this.position++},pushUint16(o){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,o),this.position+=2},pushUint24(o){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,o>>8),this.dataView.setUint8(this.position+2,o&255),this.position+=3},pushUint32(o){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,o),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const o=this.inspectByte();return this.position++,o},readBytes(o,a){this.assertReadLimit(),this._touch();const c=this.inspectBytes(o);return this.position+=a??o,c},readUint8(){this.assertReadLimit(),this._touch();const o=this.inspectUint8();return this.position+=1,o},readUint16(){this.assertReadLimit(),this._touch();const o=this.inspectUint16();return this.position+=2,o},readUint24(){this.assertReadLimit(),this._touch();const o=this.inspectUint24();return this.position+=3,o},readUint32(){this.assertReadLimit(),this._touch();const o=this.inspectUint32();return this.position+=4,o},get remaining(){return this.bytes.length-this.position},setPosition(o){const a=this.position;return this.assertPosition(o),this.position=o,()=>this.position=a},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const o=this.getReadCount();this.positionReadCount.set(this.position,o+1),o>0&&this.recursiveReadCount++}};function n(o,{recursiveReadLimit:a=8192}={}){const c=Object.create(r);return c.bytes=o,c.dataView=new DataView(o.buffer,o.byteOffset,o.byteLength),c.positionReadCount=new Map,c.recursiveReadLimit=a,c}class t extends e.BaseError{constructor({offset:a}){super(`Offset \`${a}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}It.NegativeOffsetError=t;class i extends e.BaseError{constructor({length:a,position:c}){super(`Position \`${c}\` is out of bounds (\`0 < position < ${a}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}It.PositionOutOfBoundsError=i;class s extends e.BaseError{constructor({count:a,limit:c}){super(`Recursive read limit of \`${c}\` exceeded (recursive read count: \`${a}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}return It.RecursiveReadLimitExceededError=s,It}var b1;function jo(){if(b1)return we;b1=1,Object.defineProperty(we,"__esModule",{value:!0}),we.InvalidTypeError=we.InvalidArrayError=we.LengthMismatchError=we.BytesSizeMismatchError=we.ArrayLengthMismatchError=we.ZeroDataError=we.DataSizeTooSmallError=void 0,we.decode=c,we.encode=d,we.encodePacked=l,we.format=f,we.from=m;const e=tr(),r=_u(),n=St(),t=st(),i=Ne(),s=q_(),o=gp(),a=Hd();function c(u,E,p={}){const{as:y="Array",checksumAddress:A=!1}=p,w=typeof E=="string"?n.fromHex(E):E,T=o.create(w);if(n.size(w)===0&&u.length>0)throw new h;if(n.size(w)&&n.size(w)<32)throw new v({data:typeof E=="string"?E:i.fromBytes(E),parameters:u,size:n.size(w)});let O=0;const B=y==="Array"?[]:{};for(let S=0;S<u.length;++S){const x=u[S];T.setPosition(O);const[k,C]=s.decodeParameter(T,x,{checksumAddress:A,staticPosition:0});O+=C,y==="Array"?B.push(k):B[x.name??S]=k}return B}function d(u,E,p){const{checksumAddress:y=!1}=p??{};if(u.length!==E.length)throw new j({expectedLength:u.length,givenLength:E.length});const A=s.prepareParameters({checksumAddress:y,parameters:u,values:E}),w=s.encode(A);return w.length===0?"0x":w}function l(u,E){if(u.length!==E.length)throw new j({expectedLength:u.length,givenLength:E.length});const p=[];for(let y=0;y<u.length;y++){const A=u[y],w=E[y];p.push(l.encode(A,w))}return i.concat(...p)}(function(u){function E(p,y,A=!1){if(p==="address"){const B=y;return r.assert(B),i.padLeft(B.toLowerCase(),A?32:0)}if(p==="string")return i.fromString(y);if(p==="bytes")return y;if(p==="bool")return i.padLeft(i.fromBoolean(y),A?32:1);const w=p.match(a.integerRegex);if(w){const[B,S,x="256"]=w,k=Number.parseInt(x,10)/8;return i.fromNumber(y,{size:A?32:k,signed:S==="int"})}const T=p.match(a.bytesRegex);if(T){const[B,S]=T;if(Number.parseInt(S,10)!==(y.length-2)/2)throw new _({expectedSize:Number.parseInt(S,10),value:y});return i.padRight(y,A?32:0)}const O=p.match(a.arrayRegex);if(O&&Array.isArray(y)){const[B,S]=O,x=[];for(let k=0;k<y.length;k++)x.push(E(S,y[k],!0));return x.length===0?"0x":i.concat(...x)}throw new P(p)}u.encode=E})(l||(we.encodePacked=l={}));function f(u){return e.formatAbiParameters(u)}function m(u){return Array.isArray(u)&&typeof u[0]=="string"||typeof u=="string"?e.parseAbiParameters(u):u}class v extends t.BaseError{constructor({data:E,parameters:p,size:y}){super(`Data size of ${y} bytes is too small for given parameters.`,{metaMessages:[`Params: (${e.formatAbiParameters(p)})`,`Data: ${E} (${y} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}we.DataSizeTooSmallError=v;class h extends t.BaseError{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}we.ZeroDataError=h;class b extends t.BaseError{constructor({expectedLength:E,givenLength:p,type:y}){super(`Array length mismatch for type \`${y}\`. Expected: \`${E}\`. Given: \`${p}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}we.ArrayLengthMismatchError=b;class _ extends t.BaseError{constructor({expectedSize:E,value:p}){super(`Size of bytes "${p}" (bytes${i.size(p)}) does not match expected size (bytes${E}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}we.BytesSizeMismatchError=_;class j extends t.BaseError{constructor({expectedLength:E,givenLength:p}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${E}`,`Given length (values): ${p}`].join(`
|
|
45
|
+
`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}we.LengthMismatchError=j;class g extends t.BaseError{constructor(E){super(`Value \`${E}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}we.InvalidArrayError=g;class P extends t.BaseError{constructor(E){super(`Type \`${E}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}return we.InvalidTypeError=P,we}var m1;function M_(){return m1||(m1=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidWrappedSignatureError=e.universalSignatureValidatorAbi=e.universalSignatureValidatorBytecode=e.magicBytes=void 0,e.assert=i,e.from=s,e.unwrap=o,e.wrap=a,e.validate=c;const r=jo(),n=st(),t=Ne();e.magicBytes="0x6492649264926492649264926492649264926492649264926492649264926492",e.universalSignatureValidatorBytecode="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",e.universalSignatureValidatorAbi=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}];function i(l){if(t.slice(l,-32)!==e.magicBytes)throw new d(l)}function s(l){return typeof l=="string"?o(l):l}function o(l){i(l);const[f,m,v]=r.decode(r.from("address, bytes, bytes"),l);return{data:m,signature:v,to:f}}function a(l){const{data:f,signature:m,to:v}=l;return t.concat(r.encode(r.from("address, bytes, bytes"),[v,f,m]),e.magicBytes)}function c(l){try{return i(l),!0}catch{return!1}}class d extends n.BaseError{constructor(f){super(`Value \`${f}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}e.InvalidWrappedSignatureError=d}(sd)),sd}var y1;function H_(){return y1||(y1=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.SignatureErc6492=void 0,Ln.SignatureErc6492=M_()),Ln}var Dn={},cd={},Ze={},dt={},h1;function F_(){if(h1)return dt;h1=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.toBytes=i,dt.toHex=s,dt.to=o,dt.decodeRlpCursor=a,dt.readLength=c,dt.readList=d,dt.from=l,dt.fromBytes=f,dt.fromHex=m;const e=St(),r=st(),n=Ne(),t=gp();function i(j){return o(j,"Bytes")}function s(j){return o(j,"Hex")}function o(j,g){const P=g??(typeof j=="string"?"Hex":"Bytes"),u=(()=>{if(typeof j=="string"){if(j.length>3&&j.length%2!==0)throw new n.InvalidLengthError(j);return e.fromHex(j)}return j})(),E=t.create(u,{recursiveReadLimit:Number.POSITIVE_INFINITY});return a(E,P)}function a(j,g="Hex"){if(j.bytes.length===0)return g==="Hex"?n.fromBytes(j.bytes):j.bytes;const P=j.readByte();if(P<128&&j.decrementPosition(1),P<192){const E=c(j,P,128),p=j.readBytes(E);return g==="Hex"?n.fromBytes(p):p}const u=c(j,P,192);return d(j,u,g)}function c(j,g,P){if(P===128&&g<128)return 1;if(g<=P+55)return g-P;if(g===P+55+1)return j.readUint8();if(g===P+55+2)return j.readUint16();if(g===P+55+3)return j.readUint24();if(g===P+55+4)return j.readUint32();throw new r.BaseError("Invalid RLP prefix")}function d(j,g,P){const u=j.position,E=[];for(;j.position-u<g;)E.push(a(j,P));return E}function l(j,g){const{as:P}=g,u=v(j),E=t.create(new Uint8Array(u.length));return u.encode(E),P==="Hex"?n.fromBytes(E.bytes):E.bytes}function f(j,g={}){const{as:P="Bytes"}=g;return l(j,{as:P})}function m(j,g={}){const{as:P="Hex"}=g;return l(j,{as:P})}function v(j){return Array.isArray(j)?h(j.map(g=>v(g))):b(j)}function h(j){const g=j.reduce((E,p)=>E+p.length,0),P=_(g);return{length:(()=>g<=55?1+g:1+P+g)(),encode(E){g<=55?E.pushByte(192+g):(E.pushByte(192+55+P),P===1?E.pushUint8(g):P===2?E.pushUint16(g):P===3?E.pushUint24(g):E.pushUint32(g));for(const{encode:p}of j)p(E)}}}function b(j){const g=typeof j=="string"?e.fromHex(j):j,P=_(g.length);return{length:(()=>g.length===1&&g[0]<128?1:g.length<=55?1+g.length:1+P+g.length)(),encode(E){g.length===1&&g[0]<128?E.pushBytes(g):g.length<=55?(E.pushByte(128+g.length),E.pushBytes(g)):(E.pushByte(128+55+P),P===1?E.pushUint8(g.length):P===2?E.pushUint16(g.length):P===3?E.pushUint24(g.length):E.pushUint32(g.length),E.pushBytes(g))}}}function _(j){if(j<=255)return 1;if(j<=65535)return 2;if(j<=16777215)return 3;if(j<=4294967295)return 4;throw new r.BaseError("Length is too large.")}return dt}var p1;function k_(){if(p1)return Ze;p1=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.from=i,Ze.fromRpc=s,Ze.fromRpcList=o,Ze.fromTuple=a,Ze.fromTupleList=c,Ze.getSignPayload=d,Ze.hash=l,Ze.toRpc=f,Ze.toRpcList=m,Ze.toTuple=v,Ze.toTupleList=h;const e=Md(),r=Ne(),n=F_(),t=hp();function i(b,_={}){return typeof b.chainId=="string"?s(b):{...b,..._.signature}}function s(b){const{address:_,chainId:j,nonce:g}=b,P=t.extract(b);return{address:_,chainId:Number(j),nonce:BigInt(g),...P}}function o(b){return b.map(s)}function a(b){const[_,j,g,P,u,E]=b;let p={address:j,chainId:_==="0x"?0:Number(_),nonce:g==="0x"?0n:BigInt(g)};return P&&u&&E&&(p={...p,...t.fromTuple([P,u,E])}),i(p)}function c(b){const _=[];for(const j of b)_.push(a(j));return _}function d(b){return l(b,{presign:!0})}function l(b,_={}){const{presign:j}=_;return e.keccak256(r.concat("0x05",n.fromHex(v(j?{address:b.address,chainId:b.chainId,nonce:b.nonce}:b))))}function f(b){const{address:_,chainId:j,nonce:g,...P}=b;return{address:_,chainId:r.fromNumber(j),nonce:r.fromNumber(g),...t.toRpc(P)}}function m(b){return b.map(f)}function v(b){const{address:_,chainId:j,nonce:g}=b,P=t.extract(b);return[j?r.fromNumber(j):"0x",_,g?r.fromNumber(g):"0x",...P?t.toTuple(P):[]]}function h(b){if(!b||b.length===0)return[];const _=[];for(const j of b)_.push(v(j));return _}return Ze}var g1;function N_(){return g1||(g1=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidWrappedSignatureError=e.suffixParameters=e.magicBytes=void 0,e.assert=a,e.from=c,e.unwrap=d,e.wrap=l,e.validate=f;const r=jo(),n=k_(),t=st(),i=Ne(),s=C_(),o=hp();e.magicBytes="0x8010801080108010801080108010801080108010801080108010801080108010",e.suffixParameters=r.from("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function a(v){if(typeof v=="string"){if(i.slice(v,-32)!==e.magicBytes)throw new m(v)}else o.assert(v.authorization)}function c(v){return typeof v=="string"?d(v):v}function d(v){a(v);const h=i.toNumber(i.slice(v,-64,-32)),b=i.slice(v,-h-64,-64),_=i.slice(v,0,-h-64),[j,g,P]=r.decode(e.suffixParameters,b);return{authorization:n.from({address:j.delegation,chainId:Number(j.chainId),nonce:j.nonce,yParity:j.yParity,r:j.r,s:j.s}),signature:_,...P&&P!=="0x"?{data:P,to:g}:{}}}function l(v){const{data:h,signature:b}=v;a(v);const _=s.recoverAddress({payload:n.getSignPayload(v.authorization),signature:o.from(v.authorization)}),j=r.encode(e.suffixParameters,[{...v.authorization,delegation:v.authorization.address,chainId:BigInt(v.authorization.chainId)},v.to??_,h??"0x"]),g=i.fromNumber(i.size(j),{size:32});return i.concat(b,j,g,e.magicBytes)}function f(v){try{return a(v),!0}catch{return!1}}class m extends t.BaseError{constructor(h){super(`Value \`${h}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}}e.InvalidWrappedSignatureError=m}(cd)),cd}var _1;function Eu(){return _1||(_1=1,Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.SignatureErc8010=void 0,Dn.SignatureErc8010=N_()),Dn}var he={},v1;function dr(){if(v1)return he;v1=1,Object.defineProperty(he,"__esModule",{value:!0}),he.erc4626Abi=he.erc721Abi=he.erc1155Abi=he.erc20Abi_bytes32=he.erc20Abi=he.erc6492SignatureValidatorAbi=he.erc1271Abi=he.addressResolverAbi=he.textResolverAbi=he.universalResolverReverseAbi=he.universalResolverResolveAbi=he.batchGatewayAbi=he.multicall3Abi=void 0,he.multicall3Abi=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],he.batchGatewayAbi=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}];const e=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}];return he.universalResolverResolveAbi=[...e,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],he.universalResolverReverseAbi=[...e,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],he.textResolverAbi=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],he.addressResolverAbi=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],he.erc1271Abi=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],he.erc6492SignatureValidatorAbi=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],he.erc20Abi=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],he.erc20Abi_bytes32=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],he.erc1155Abi=[{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC1155InsufficientBalance",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC1155InvalidApprover",type:"error"},{inputs:[{internalType:"uint256",name:"idsLength",type:"uint256"},{internalType:"uint256",name:"valuesLength",type:"uint256"}],name:"ERC1155InvalidArrayLength",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC1155InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC1155InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC1155InvalidSender",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"address",name:"owner",type:"address"}],name:"ERC1155MissingApprovalForAll",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}],he.erc721Abi=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"event",name:"ApprovalForAll",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"operator",type:"address"},{indexed:!1,name:"approved",type:"bool"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"payable",inputs:[{name:"spender",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"getApproved",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"address"}]},{type:"function",name:"isApprovedForAll",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"operator",type:"address"}],outputs:[{type:"bool"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"ownerOf",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"owner",type:"address"}]},{type:"function",name:"safeTransferFrom",stateMutability:"payable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"safeTransferFrom",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"id",type:"uint256"},{name:"data",type:"bytes"}],outputs:[]},{type:"function",name:"setApprovalForAll",stateMutability:"nonpayable",inputs:[{name:"operator",type:"address"},{name:"approved",type:"bool"}],outputs:[]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"index",type:"uint256"}],outputs:[{type:"uint256"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"index",type:"uint256"}],outputs:[{name:"tokenId",type:"uint256"}]},{type:"function",name:"tokenURI",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transferFrom",stateMutability:"payable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]}],he.erc4626Abi=[{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"receiver",type:"address"},{indexed:!1,name:"assets",type:"uint256"},{indexed:!1,name:"shares",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"receiver",type:"address"},{indexed:!0,name:"owner",type:"address"},{indexed:!1,name:"assets",type:"uint256"},{indexed:!1,name:"shares",type:"uint256"}],name:"Withdraw",type:"event"},{inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],name:"allowance",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],name:"approve",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"asset",outputs:[{name:"assetTokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"balanceOf",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"convertToAssets",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"convertToShares",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"}],name:"deposit",outputs:[{name:"shares",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"caller",type:"address"}],name:"maxDeposit",outputs:[{name:"maxAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"caller",type:"address"}],name:"maxMint",outputs:[{name:"maxShares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"maxRedeem",outputs:[{name:"maxShares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"maxWithdraw",outputs:[{name:"maxAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"},{name:"receiver",type:"address"}],name:"mint",outputs:[{name:"assets",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"previewDeposit",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"previewMint",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"previewRedeem",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"previewWithdraw",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"},{name:"receiver",type:"address"},{name:"owner",type:"address"}],name:"redeem",outputs:[{name:"assets",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"totalAssets",outputs:[{name:"totalManagedAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],name:"transfer",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"},{name:"owner",type:"address"}],name:"withdraw",outputs:[{name:"shares",type:"uint256"}],stateMutability:"nonpayable",type:"function"}],he}var ht={},E1;function wo(){return E1||(E1=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.multicall3Bytecode=ht.erc6492SignatureValidatorByteCode=ht.deploylessCallViaFactoryBytecode=ht.deploylessCallViaBytecodeBytecode=void 0,ht.deploylessCallViaBytecodeBytecode="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",ht.deploylessCallViaFactoryBytecode="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",ht.erc6492SignatureValidatorByteCode="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",ht.multicall3Bytecode="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033"),ht}var qi={},j1;function Po(){if(j1)return qi;j1=1,Object.defineProperty(qi,"__esModule",{value:!0}),qi.encodeDeployData=i;const e=Te(),r=Me(),n=Et(),t="/docs/contract/encodeDeployData";function i(s){const{abi:o,args:a,bytecode:c}=s;if(!a||a.length===0)return c;const d=o.find(f=>"type"in f&&f.type==="constructor");if(!d)throw new e.AbiConstructorNotFoundError({docsPath:t});if(!("inputs"in d))throw new e.AbiConstructorParamsNotFoundError({docsPath:t});if(!d.inputs||d.inputs.length===0)throw new e.AbiConstructorParamsNotFoundError({docsPath:t});const l=(0,n.encodeAbiParameters)(d.inputs,a);return(0,r.concatHex)([c,l])}return qi}var Mi={},Hi={},w1;function _p(){if(w1)return Hi;w1=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.prepareEncodeFunctionData=s;const e=Te(),r=xr(),n=Gt(),t=Vt(),i="/docs/contract/encodeFunctionData";function s(o){const{abi:a,args:c,functionName:d}=o;let l=a[0];if(d){const f=(0,t.getAbiItem)({abi:a,args:c,name:d});if(!f)throw new e.AbiFunctionNotFoundError(d,{docsPath:i});l=f}if(l.type!=="function")throw new e.AbiFunctionNotFoundError(void 0,{docsPath:i});return{abi:[l],functionName:(0,r.toFunctionSelector)((0,n.formatAbiItem)(l))}}return Hi}var P1;function et(){if(P1)return Mi;P1=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.encodeFunctionData=t;const e=Me(),r=Et(),n=_p();function t(i){const{args:s}=i,{abi:o,functionName:a}=(()=>{var f;return i.abi.length===1&&((f=i.functionName)!=null&&f.startsWith("0x"))?i:(0,n.prepareEncodeFunctionData)(i)})(),c=o[0],d=a,l="inputs"in c&&c.inputs?(0,r.encodeAbiParameters)(c.inputs,s??[]):void 0;return(0,e.concatHex)([d,l??"0x"])}return Mi}var Fi={},A1;function Pt(){if(A1)return Fi;A1=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.isAddressEqual=n;const e=vt(),r=Qe();function n(t,i){if(!(0,r.isAddress)(t,{strict:!1}))throw new e.InvalidAddressError({address:t});if(!(0,r.isAddress)(i,{strict:!1}))throw new e.InvalidAddressError({address:i});return t.toLowerCase()===i.toLowerCase()}return Fi}var ki={},Ni={},$i={},zi={},T1;function vp(){if(T1)return zi;T1=1,Object.defineProperty(zi,"__esModule",{value:!0}),zi.publicKeyToAddress=n;const e=at(),r=Xe();function n(t){const i=(0,r.keccak256)(`0x${t.substring(4)}`).substring(26);return(0,e.checksumAddress)(`0x${i}`)}return zi}var Ui={},I1;function Fd(){if(I1)return Ui;I1=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.recoverPublicKey=i;const e=Ge(),r=Ye(),n=Be(),t=te();async function i({hash:o,signature:a}){const c=(0,e.isHex)(o)?o:(0,t.toHex)(o),{secp256k1:d}=await Promise.resolve().then(()=>qr());return`0x${(()=>{if(typeof a=="object"&&"r"in a&&"s"in a){const{r:b,s:_,v:j,yParity:g}=a,P=Number(g??j),u=s(P);return new d.Signature((0,n.hexToBigInt)(b),(0,n.hexToBigInt)(_)).addRecoveryBit(u)}const m=(0,e.isHex)(a)?a:(0,t.toHex)(a);if((0,r.size)(m)!==65)throw new Error("invalid signature length");const v=(0,n.hexToNumber)(`0x${m.slice(130)}`),h=s(v);return d.Signature.fromCompact(m.substring(2,130)).addRecoveryBit(h)})().recoverPublicKey(c.substring(2)).toHex(!1)}`}function s(o){if(o===0||o===1)return o;if(o===27)return 0;if(o===28)return 1;throw new Error("Invalid yParityOrV value")}return Ui}var S1;function fr(){if(S1)return $i;S1=1,Object.defineProperty($i,"__esModule",{value:!0}),$i.recoverAddress=n;const e=vp(),r=Fd();async function n({hash:t,signature:i}){return(0,e.publicKeyToAddress)(await(0,r.recoverPublicKey)({hash:t,signature:i}))}return $i}var Li={},B1;function Ep(){if(B1)return Li;B1=1,Object.defineProperty(Li,"__esModule",{value:!0}),Li.hashAuthorization=s;const e=Me(),r=_e(),n=te(),t=ho(),i=Xe();function s(o){const{chainId:a,nonce:c,to:d}=o,l=o.contractAddress??o.address,f=(0,i.keccak256)((0,e.concatHex)(["0x05",(0,t.toRlp)([a?(0,n.numberToHex)(a):"0x",l,c?(0,n.numberToHex)(c):"0x"])]));return d==="bytes"?(0,r.hexToBytes)(f):f}return Li}var R1;function Ao(){if(R1)return Ni;R1=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.recoverAuthorizationAddress=n;const e=fr(),r=Ep();async function n(t){const{authorization:i,signature:s}=t;return(0,e.recoverAddress)({hash:(0,r.hashAuthorization)(i),signature:s??i})}return Ni}var O1;function jp(){if(O1)return ki;O1=1,Object.defineProperty(ki,"__esModule",{value:!0}),ki.verifyAuthorization=t;const e=at(),r=Pt(),n=Ao();async function t({address:i,authorization:s,signature:o}){return(0,r.isAddressEqual)((0,e.getAddress)(i),await(0,n.recoverAuthorizationAddress)({authorization:s,signature:o}))}return ki}var Di={},x1;function me(){if(x1)return Di;x1=1,Object.defineProperty(Di,"__esModule",{value:!0}),Di.getAction=e;function e(r,n,t){const i=r[n.name];if(typeof i=="function")return i;const s=r[t];return typeof s=="function"?s:o=>n(r,o)}return Di}var Gi={},C1;function wp(){if(C1)return Gi;C1=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.serializeSignature=t;const e=qr(),r=Be(),n=_e();function t({r:i,s,to:o="hex",v:a,yParity:c}){const d=(()=>{if(c===0||c===1)return c;if(a&&(a===27n||a===28n||a>=35n))return a%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),l=`0x${new e.secp256k1.Signature((0,r.hexToBigInt)(i),(0,r.hexToBigInt)(s)).toCompactHex()}${d===0?"1b":"1c"}`;return o==="hex"?l:(0,n.hexToBytes)(l)}return Gi}var Gn={},Vn={},Wn={},q1;function $_(){if(q1)return Wn;q1=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.fromRpc=r,Wn.toRpc=n;const e=Ne();function r(t){return{...t,amount:BigInt(t.amount),index:Number(t.index),validatorIndex:Number(t.validatorIndex)}}function n(t){return{address:t.address,amount:e.fromNumber(t.amount),index:e.fromNumber(t.index),validatorIndex:e.fromNumber(t.validatorIndex)}}return Wn}var M1;function Pp(){if(M1)return Vn;M1=1,Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.fromRpc=n,Vn.toRpc=t;const e=Ne(),r=$_();function n(i){return{...i.baseFeePerGas&&{baseFeePerGas:BigInt(i.baseFeePerGas)},...i.blobBaseFee&&{blobBaseFee:BigInt(i.blobBaseFee)},...i.feeRecipient&&{feeRecipient:i.feeRecipient},...i.gasLimit&&{gasLimit:BigInt(i.gasLimit)},...i.number&&{number:BigInt(i.number)},...i.prevRandao&&{prevRandao:BigInt(i.prevRandao)},...i.time&&{time:BigInt(i.time)},...i.withdrawals&&{withdrawals:i.withdrawals.map(r.fromRpc)}}}function t(i){return{...typeof i.baseFeePerGas=="bigint"&&{baseFeePerGas:e.fromNumber(i.baseFeePerGas)},...typeof i.blobBaseFee=="bigint"&&{blobBaseFee:e.fromNumber(i.blobBaseFee)},...typeof i.feeRecipient=="string"&&{feeRecipient:i.feeRecipient},...typeof i.gasLimit=="bigint"&&{gasLimit:e.fromNumber(i.gasLimit)},...typeof i.number=="bigint"&&{number:e.fromNumber(i.number)},...typeof i.prevRandao=="bigint"&&{prevRandao:e.fromNumber(i.prevRandao)},...typeof i.time=="bigint"&&{time:e.fromNumber(i.time)},...i.withdrawals&&{withdrawals:i.withdrawals.map(r.toRpc)}}}return Vn}var Kn={},H1;function z_(){return H1||(H1=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.aggregate3Signature=void 0,Kn.aggregate3Signature="0x82ad56cb"),Kn}var Vi={},F1;function Wt(){if(F1)return Vi;F1=1,Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.decodeFunctionResult=i;const e=Te(),r=ar(),n=Vt(),t="/docs/contract/decodeFunctionResult";function i(s){const{abi:o,args:a,functionName:c,data:d}=s;let l=o[0];if(c){const m=(0,n.getAbiItem)({abi:o,args:a,name:c});if(!m)throw new e.AbiFunctionNotFoundError(c,{docsPath:t});l=m}if(l.type!=="function")throw new e.AbiFunctionNotFoundError(void 0,{docsPath:t});if(!l.outputs)throw new e.AbiFunctionOutputsNotFoundError(l.name,{docsPath:t});const f=(0,r.decodeAbiParameters)(l.outputs,d);if(f&&f.length>1)return f;if(f&&f.length===1)return f[0]}return Vi}var Wi={},Ki={},k1;function kd(){if(k1)return Ki;k1=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.withResolvers=e;function e(){let r=()=>{},n=()=>{};return{promise:new Promise((i,s)=>{r=i,n=s}),resolve:r,reject:n}}return Ki}var N1;function Nd(){if(N1)return Wi;N1=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.createBatchScheduler=n;const e=kd(),r=new Map;function n({fn:t,id:i,shouldSplitBatch:s,wait:o=0,sort:a}){const c=async()=>{const v=f();d();const h=v.map(({args:b})=>b);h.length!==0&&t(h).then(b=>{a&&Array.isArray(b)&&b.sort(a);for(let _=0;_<v.length;_++){const{resolve:j}=v[_];j==null||j([b[_],b])}}).catch(b=>{for(let _=0;_<v.length;_++){const{reject:j}=v[_];j==null||j(b)}})},d=()=>r.delete(i),l=()=>f().map(({args:v})=>v),f=()=>r.get(i)||[],m=v=>r.set(i,[...f(),v]);return{flush:d,async schedule(v){const{promise:h,resolve:b,reject:_}=(0,e.withResolvers)();return(s==null?void 0:s([...l(),v]))&&c(),f().length>0?(m({args:v,resolve:b,reject:_}),h):(m({args:v,resolve:b,reject:_}),setTimeout(c,o),h)}}}return Wi}var Yr={},$1;function $d(){if($1)return Yr;$1=1,Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.serializeStateMapping=s,Yr.serializeAccountStateOverride=o,Yr.serializeStateOverride=a;const e=vt(),r=au(),n=xd(),t=Qe(),i=te();function s(c){if(!(!c||c.length===0))return c.reduce((d,{slot:l,value:f})=>{if(l.length!==66)throw new r.InvalidBytesLengthError({size:l.length,targetSize:66,type:"hex"});if(f.length!==66)throw new r.InvalidBytesLengthError({size:f.length,targetSize:66,type:"hex"});return d[l]=f,d},{})}function o(c){const{balance:d,nonce:l,state:f,stateDiff:m,code:v}=c,h={};if(v!==void 0&&(h.code=v),d!==void 0&&(h.balance=(0,i.numberToHex)(d)),l!==void 0&&(h.nonce=(0,i.numberToHex)(l)),f!==void 0&&(h.state=s(f)),m!==void 0){if(h.state)throw new n.StateAssignmentConflictError;h.stateDiff=s(m)}return h}function a(c){if(!c)return;const d={};for(const{address:l,...f}of c){if(!(0,t.isAddress)(l,{strict:!1}))throw new e.InvalidAddressError({address:l});if(d[l])throw new n.AccountStateConflictError({address:l});d[l]=o(f)}return d}return Yr}var ud={},Nt={},z1;function U_(){if(z1)return Nt;z1=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.OffchainLookupSenderMismatchError=Nt.OffchainLookupResponseMalformedError=Nt.OffchainLookupError=void 0;const e=ke(),r=ue(),n=Cd();class t extends r.BaseError{constructor({callbackSelector:a,cause:c,data:d,extraData:l,sender:f,urls:m}){var v;super(c.shortMessage||"An error occurred while fetching for an offchain result.",{cause:c,metaMessages:[...c.metaMessages||[],(v=c.metaMessages)!=null&&v.length?"":[],"Offchain Gateway Call:",m&&[" Gateway URL(s):",...m.map(h=>` ${(0,n.getUrl)(h)}`)],` Sender: ${f}`,` Data: ${d}`,` Callback selector: ${a}`,` Extra data: ${l}`].flat(),name:"OffchainLookupError"})}}Nt.OffchainLookupError=t;class i extends r.BaseError{constructor({result:a,url:c}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${(0,n.getUrl)(c)}`,`Response: ${(0,e.stringify)(a)}`],name:"OffchainLookupResponseMalformedError"})}}Nt.OffchainLookupResponseMalformedError=i;class s extends r.BaseError{constructor({sender:a,to:c}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${c}`,`OffchainLookup sender address: ${a}`],name:"OffchainLookupSenderMismatchError"})}}return Nt.OffchainLookupSenderMismatchError=s,Nt}var dd={},Zi={},U1;function zd(){if(U1)return Zi;U1=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.decodeFunctionData=s;const e=Te(),r=ft(),n=xr(),t=ar(),i=Gt();function s(o){const{abi:a,data:c}=o,d=(0,r.slice)(c,0,4),l=a.find(f=>f.type==="function"&&d===(0,n.toFunctionSelector)((0,i.formatAbiItem)(f)));if(!l)throw new e.AbiFunctionSignatureNotFoundError(d,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:l.name,args:"inputs"in l&&l.inputs&&l.inputs.length>0?(0,t.decodeAbiParameters)(l.inputs,(0,r.slice)(c,4)):void 0}}return Zi}var Yi={},L1;function Ud(){if(L1)return Yi;L1=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.encodeErrorResult=a;const e=Te(),r=Me(),n=xr(),t=Et(),i=Gt(),s=Vt(),o="/docs/contract/encodeErrorResult";function a(c){const{abi:d,errorName:l,args:f}=c;let m=d[0];if(l){const _=(0,s.getAbiItem)({abi:d,args:f,name:l});if(!_)throw new e.AbiErrorNotFoundError(l,{docsPath:o});m=_}if(m.type!=="error")throw new e.AbiErrorNotFoundError(void 0,{docsPath:o});const v=(0,i.formatAbiItem)(m),h=(0,n.toFunctionSelector)(v);let b="0x";if(f&&f.length>0){if(!m.inputs)throw new e.AbiErrorInputsNotFoundError(m.name,{docsPath:o});b=(0,t.encodeAbiParameters)(m.inputs,f)}return(0,r.concatHex)([h,b])}return Yi}var Ji={},D1;function Ld(){if(D1)return Ji;D1=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.encodeFunctionResult=i;const e=Te(),r=Et(),n=Vt(),t="/docs/contract/encodeFunctionResult";function i(s){const{abi:o,functionName:a,result:c}=s;let d=o[0];if(a){const f=(0,n.getAbiItem)({abi:o,name:a});if(!f)throw new e.AbiFunctionNotFoundError(a,{docsPath:t});d=f}if(d.type!=="function")throw new e.AbiFunctionNotFoundError(void 0,{docsPath:t});if(!d.outputs)throw new e.AbiFunctionOutputsNotFoundError(d.name,{docsPath:t});const l=(()=>{if(d.outputs.length===0)return[];if(d.outputs.length===1)return[c];if(Array.isArray(c))return c;throw new e.InvalidArrayError(c)})();return(0,r.encodeAbiParameters)(d.outputs,l)}return Ji}var G1;function ju(){return G1||(G1=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.localBatchGatewayUrl=void 0,e.localBatchGatewayRequest=o;const r=dr(),n=Bd(),t=zd(),i=Ud(),s=Ld();e.localBatchGatewayUrl="x-batch-gateway:true";async function o(c){const{data:d,ccipRequest:l}=c,{args:[f]}=(0,t.decodeFunctionData)({abi:r.batchGatewayAbi,data:d}),m=[],v=[];return await Promise.all(f.map(async(h,b)=>{try{v[b]=h.urls.includes(e.localBatchGatewayUrl)?await o({data:h.data,ccipRequest:l}):await l(h),m[b]=!1}catch(_){m[b]=!0,v[b]=a(_)}})),(0,s.encodeFunctionResult)({abi:r.batchGatewayAbi,functionName:"query",result:[m,v]})}function a(c){return c.name==="HttpRequestError"&&c.status?(0,i.encodeErrorResult)({abi:r.batchGatewayAbi,errorName:"HttpError",args:[c.status,c.shortMessage]}):(0,i.encodeErrorResult)({abi:[n.solidityError],errorName:"Error",args:["shortMessage"in c?c.shortMessage:c.message]})}}(dd)),dd}var V1;function Dd(){return V1||(V1=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.offchainLookupAbiItem=e.offchainLookupSignature=void 0,e.offchainLookup=f,e.ccipRequest=m;const r=To(),n=U_(),t=jt(),i=pu(),s=Et(),o=Pt(),a=Me(),c=Ge(),d=ju(),l=ke();e.offchainLookupSignature="0x556f1830",e.offchainLookupAbiItem={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function f(v,{blockNumber:h,blockTag:b,data:_,to:j}){const{args:g}=(0,i.decodeErrorResult)({data:_,abi:[e.offchainLookupAbiItem]}),[P,u,E,p,y]=g,{ccipRead:A}=v,w=A&&typeof(A==null?void 0:A.request)=="function"?A.request:m;try{if(!(0,o.isAddressEqual)(j,P))throw new n.OffchainLookupSenderMismatchError({sender:P,to:j});const T=u.includes(d.localBatchGatewayUrl)?await(0,d.localBatchGatewayRequest)({data:E,ccipRequest:w}):await w({data:E,sender:P,urls:u}),{data:O}=await(0,r.call)(v,{blockNumber:h,blockTag:b,data:(0,a.concat)([p,(0,s.encodeAbiParameters)([{type:"bytes"},{type:"bytes"}],[T,y])]),to:j});return O}catch(T){throw new n.OffchainLookupError({callbackSelector:p,cause:T,data:_,extraData:y,sender:P,urls:u})}}async function m({data:v,sender:h,urls:b}){var j;let _=new Error("An unknown error occurred.");for(let g=0;g<b.length;g++){const P=b[g],u=P.includes("{data}")?"GET":"POST",E=u==="POST"?{data:v,sender:h}:void 0,p=u==="POST"?{"Content-Type":"application/json"}:{};try{const y=await fetch(P.replace("{sender}",h.toLowerCase()).replace("{data}",v),{body:JSON.stringify(E),headers:p,method:u});let A;if((j=y.headers.get("Content-Type"))!=null&&j.startsWith("application/json")?A=(await y.json()).data:A=await y.text(),!y.ok){_=new t.HttpRequestError({body:E,details:A!=null&&A.error?(0,l.stringify)(A.error):y.statusText,headers:y.headers,status:y.status,url:P});continue}if(!(0,c.isHex)(A)){_=new n.OffchainLookupResponseMalformedError({result:A,url:P});continue}return A}catch(y){_=new t.HttpRequestError({body:E,details:y.message,url:P})}}throw _}}(ud)),ud}var W1;function To(){if(W1)return Gn;W1=1,Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.call=u,Gn.getRevertErrorData=w;const e=tr(),r=Pp(),n=Ae(),t=dr(),i=z_(),s=wo(),o=ue(),a=_o(),c=sr(),d=Wt(),l=Po(),f=et(),m=or(),v=te(),h=qd(),b=ur(),_=_t(),j=Nd(),g=$d(),P=wt();async function u(T,O){var de,Q,Z,Ce;const{account:B=T.account,authorizationList:S,batch:x=!!((de=T.batch)!=null&&de.multicall),blockNumber:k,blockTag:C=T.experimental_blockTag??"latest",accessList:I,blobs:F,blockOverrides:R,code:q,data:M,factory:H,factoryData:N,gas:z,gasPrice:$,maxFeePerBlobGas:U,maxFeePerGas:G,maxPriorityFeePerGas:K,nonce:W,to:V,value:J,stateOverride:oe,...Y}=O,X=B?(0,n.parseAccount)(B):void 0;if(q&&(H||N))throw new o.BaseError("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(q&&V)throw new o.BaseError("Cannot provide both `code` & `to` as parameters.");const ee=q&&M,ie=H&&N&&V&&M,re=ee||ie,se=(()=>ee?y({code:q,data:M}):ie?A({data:M,factory:H,factoryData:N,to:V}):M)();try{(0,P.assertRequest)(O);const xe=(typeof k=="bigint"?(0,v.numberToHex)(k):void 0)||C,Re=R?r.toRpc(R):void 0,He=(0,g.serializeStateOverride)(oe),Ve=(Ce=(Z=(Q=T.chain)==null?void 0:Q.formatters)==null?void 0:Z.transactionRequest)==null?void 0:Ce.format,ct=(Ve||_.formatTransactionRequest)({...(0,b.extract)(Y,{format:Ve}),accessList:I,account:X,authorizationList:S,blobs:F,data:se,gas:z,gasPrice:$,maxFeePerBlobGas:U,maxFeePerGas:G,maxPriorityFeePerGas:K,nonce:W,to:re?void 0:V,value:J},"call");if(x&&E({request:ct})&&!He&&!Re)try{return await p(T,{...ct,blockNumber:k,blockTag:C})}catch(qe){if(!(qe instanceof a.ClientChainNotConfiguredError)&&!(qe instanceof a.ChainDoesNotSupportContract))throw qe}const ut=(()=>{const qe=[ct,xe];return He&&Re?[...qe,He,Re]:He?[...qe,He]:Re?[...qe,{},Re]:qe})(),We=await T.request({method:"eth_call",params:ut});return We==="0x"?{data:void 0}:{data:We}}catch(Ie){const xe=w(Ie),{offchainLookup:Re,offchainLookupSignature:He}=await Promise.resolve().then(()=>Dd());if(T.ccipRead!==!1&&(xe==null?void 0:xe.slice(0,10))===He&&V)return{data:await Re(T,{data:xe,to:V})};throw re&&(xe==null?void 0:xe.slice(0,10))==="0x101bb98d"?new c.CounterfactualDeploymentFailedError({factory:H}):(0,h.getCallError)(Ie,{...O,account:X,chain:T.chain})}}function E({request:T}){const{data:O,to:B,...S}=T;return!(!O||O.startsWith(i.aggregate3Signature)||!B||Object.values(S).filter(x=>typeof x<"u").length>0)}async function p(T,O){var $;const{batchSize:B=1024,deployless:S=!1,wait:x=0}=typeof(($=T.batch)==null?void 0:$.multicall)=="object"?T.batch.multicall:{},{blockNumber:k,blockTag:C=T.experimental_blockTag??"latest",data:I,to:F}=O,R=(()=>{if(S)return null;if(O.multicallAddress)return O.multicallAddress;if(T.chain)return(0,m.getChainContractAddress)({blockNumber:k,chain:T.chain,contract:"multicall3"});throw new a.ClientChainNotConfiguredError})(),M=(typeof k=="bigint"?(0,v.numberToHex)(k):void 0)||C,{schedule:H}=(0,j.createBatchScheduler)({id:`${T.uid}.${M}`,wait:x,shouldSplitBatch(U){return U.reduce((K,{data:W})=>K+(W.length-2),0)>B*2},fn:async U=>{const G=U.map(V=>({allowFailure:!0,callData:V.data,target:V.to})),K=(0,f.encodeFunctionData)({abi:t.multicall3Abi,args:[G],functionName:"aggregate3"}),W=await T.request({method:"eth_call",params:[{...R===null?{data:y({code:s.multicall3Bytecode,data:K})}:{to:R,data:K}},M]});return(0,d.decodeFunctionResult)({abi:t.multicall3Abi,args:[G],functionName:"aggregate3",data:W||"0x"})}}),[{returnData:N,success:z}]=await H({data:I,to:F});if(!z)throw new c.RawContractError({data:N});return N==="0x"?{data:void 0}:{data:N}}function y(T){const{code:O,data:B}=T;return(0,l.encodeDeployData)({abi:(0,e.parseAbi)(["constructor(bytes, bytes)"]),bytecode:s.deploylessCallViaBytecodeBytecode,args:[O,B]})}function A(T){const{data:O,factory:B,factoryData:S,to:x}=T;return(0,l.encodeDeployData)({abi:(0,e.parseAbi)(["constructor(address, bytes, address, bytes)"]),bytecode:s.deploylessCallViaFactoryBytecode,args:[x,O,B,S]})}function w(T){var B;if(!(T instanceof o.BaseError))return;const O=T.walk();return typeof(O==null?void 0:O.data)=="object"?(B=O.data)==null?void 0:B.data:O.data}return Gn}var Xi={},Qi={},K1;function lr(){if(K1)return Qi;K1=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.getContractError=o;const e=Te(),r=ue(),n=sr(),t=jt(),i=cr(),s=3;function o(a,{abi:c,address:d,args:l,docsPath:f,functionName:m,sender:v}){const h=a instanceof n.RawContractError?a:a instanceof r.BaseError?a.walk(E=>"data"in E)||a.walk():{},{code:b,data:_,details:j,message:g,shortMessage:P}=h,u=(()=>a instanceof e.AbiDecodingZeroDataError?new n.ContractFunctionZeroDataError({functionName:m}):[s,i.InternalRpcError.code].includes(b)&&(_||j||g||P)||b===i.InvalidInputRpcError.code&&j==="execution reverted"&&_?new n.ContractFunctionRevertedError({abi:c,data:typeof _=="object"?_.data:_,functionName:m,message:h instanceof t.RpcRequestError?j:P??g}):a)();return new n.ContractFunctionExecutionError(u,{abi:c,args:l,contractAddress:d,docsPath:f,functionName:m,sender:v})}return Qi}var Z1;function Bt(){if(Z1)return Xi;Z1=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.readContract=s;const e=Wt(),r=et(),n=lr(),t=me(),i=To();async function s(o,a){const{abi:c,address:d,args:l,functionName:f,...m}=a,v=(0,r.encodeFunctionData)({abi:c,args:l,functionName:f});try{const{data:h}=await(0,t.getAction)(o,i.call,"call")({...m,data:v,to:d});return(0,e.decodeFunctionResult)({abi:c,args:l,functionName:f,data:h||"0x"})}catch(h){throw(0,n.getContractError)(h,{abi:c,address:d,args:l,docsPath:"/docs/contract/readContract",functionName:f})}}return Xi}var Y1;function wu(){if(Y1)return Zr;Y1=1,Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.verifyHash=u,Zr.verifyErc8010=E,Zr.verifyErc1271=y;const e=H_(),r=Eu(),n=dr(),t=wo(),i=sr(),s=Po(),o=et(),a=at(),c=Pt(),d=jp(),l=Me(),f=Ge(),m=Be(),v=te(),h=me(),b=fr(),_=wp(),j=To(),g=pp(),P=Bt();async function u(w,T){var I,F,R,q;const{address:O,chain:B=w.chain,hash:S,erc6492VerifierAddress:x=T.universalSignatureVerifierAddress??((F=(I=B==null?void 0:B.contracts)==null?void 0:I.erc6492Verifier)==null?void 0:F.address),multicallAddress:k=T.multicallAddress??((q=(R=B==null?void 0:B.contracts)==null?void 0:R.multicall3)==null?void 0:q.address)}=T;if(B!=null&&B.verifyHash)return await B.verifyHash(w,T);const C=(()=>{const M=T.signature;return(0,f.isHex)(M)?M:typeof M=="object"&&"r"in M&&"s"in M?(0,_.serializeSignature)(M):(0,v.bytesToHex)(M)})();try{return r.SignatureErc8010.validate(C)?await E(w,{...T,multicallAddress:k,signature:C}):await p(w,{...T,verifierAddress:x,signature:C})}catch(M){try{if((0,c.isAddressEqual)((0,a.getAddress)(O),await(0,b.recoverAddress)({hash:S,signature:C})))return!0}catch{}if(M instanceof A)return!1;throw M}}async function E(w,T){var $;const{address:O,blockNumber:B,blockTag:S,hash:x,multicallAddress:k}=T,{authorization:C,data:I,signature:F,to:R}=r.SignatureErc8010.unwrap(T.signature);if(await(0,g.getCode)(w,{address:O,blockNumber:B,blockTag:S})===(0,l.concatHex)(["0xef0100",C.address]))return await y(w,{address:O,blockNumber:B,blockTag:S,hash:x,signature:F});const M={address:C.address,chainId:Number(C.chainId),nonce:Number(C.nonce),r:(0,v.numberToHex)(C.r,{size:32}),s:(0,v.numberToHex)(C.s,{size:32}),yParity:C.yParity};if(!await(0,d.verifyAuthorization)({address:O,authorization:M}))throw new A;const N=await(0,h.getAction)(w,P.readContract,"readContract")({...k?{address:k}:{code:t.multicall3Bytecode},authorizationList:[M],abi:n.multicall3Abi,blockNumber:B,blockTag:"pending",functionName:"aggregate3",args:[[...I?[{allowFailure:!0,target:R??O,callData:I}]:[],{allowFailure:!0,target:O,callData:(0,o.encodeFunctionData)({abi:n.erc1271Abi,functionName:"isValidSignature",args:[x,F]})}]]}),z=($=N[N.length-1])==null?void 0:$.returnData;if(z!=null&&z.startsWith("0x1626ba7e"))return!0;throw new A}async function p(w,T){const{address:O,factory:B,factoryData:S,hash:x,signature:k,verifierAddress:C,...I}=T,F=await(async()=>!B&&!S||e.SignatureErc6492.validate(k)?k:e.SignatureErc6492.wrap({data:S,signature:k,to:B}))(),R=C?{to:C,data:(0,o.encodeFunctionData)({abi:n.erc6492SignatureValidatorAbi,functionName:"isValidSig",args:[O,x,F]}),...I}:{data:(0,s.encodeDeployData)({abi:n.erc6492SignatureValidatorAbi,args:[O,x,F],bytecode:t.erc6492SignatureValidatorByteCode}),...I},{data:q}=await(0,h.getAction)(w,j.call,"call")(R).catch(M=>{throw M instanceof i.CallExecutionError?new A:M});if((0,m.hexToBool)(q??"0x0"))return!0;throw new A}async function y(w,T){const{address:O,blockNumber:B,blockTag:S,hash:x,signature:k}=T;if((await(0,h.getAction)(w,P.readContract,"readContract")({address:O,abi:n.erc1271Abi,args:[x,k],blockNumber:B,blockTag:S,functionName:"isValidSignature"}).catch(I=>{throw I instanceof i.ContractFunctionExecutionError?new A:I})).startsWith("0x1626ba7e"))return!0;throw new A}class A extends Error{}return Zr}var Jr={},ea={},J1;function Gd(){if(J1)return ea;J1=1,Object.defineProperty(ea,"__esModule",{value:!0}),ea.fromRlp=s;const e=ue(),r=cn(),n=yo(),t=_e(),i=te();function s(d,l="hex"){const f=(()=>{if(typeof d=="string"){if(d.length>3&&d.length%2!==0)throw new r.InvalidHexValueError(d);return(0,t.hexToBytes)(d)}return d})(),m=(0,n.createCursor)(f,{recursiveReadLimit:Number.POSITIVE_INFINITY});return o(m,l)}function o(d,l="hex"){if(d.bytes.length===0)return l==="hex"?(0,i.bytesToHex)(d.bytes):d.bytes;const f=d.readByte();if(f<128&&d.decrementPosition(1),f<192){const v=a(d,f,128),h=d.readBytes(v);return l==="hex"?(0,i.bytesToHex)(h):h}const m=a(d,f,192);return c(d,m,l)}function a(d,l,f){if(f===128&&l<128)return 1;if(l<=f+55)return l-f;if(l===f+55+1)return d.readUint8();if(l===f+55+2)return d.readUint16();if(l===f+55+3)return d.readUint24();if(l===f+55+4)return d.readUint32();throw new e.BaseError("Invalid RLP prefix")}function c(d,l,f){const m=d.position,v=[];for(;d.position-m<l;)v.push(o(d,f));return v}return ea}var ta={},X1;function Vd(){if(X1)return ta;X1=1,Object.defineProperty(ta,"__esModule",{value:!0}),ta.isHash=n;const e=Ge(),r=Ye();function n(t){return(0,e.isHex)(t)&&(0,r.size)(t)===32}return ta}var ra={},Q1;function Wd(){if(Q1)return ra;Q1=1,Object.defineProperty(ra,"__esModule",{value:!0}),ra.getSerializedTransactionType=t;const e=Je(),r=ft(),n=Be();function t(i){const s=(0,r.sliceHex)(i,0,1);if(s==="0x04")return"eip7702";if(s==="0x03")return"eip4844";if(s==="0x02")return"eip1559";if(s==="0x01")return"eip2930";if(s!=="0x"&&(0,n.hexToNumber)(s)>=192)return"legacy";throw new e.InvalidSerializedTransactionTypeError({serializedType:s})}return ra}var eb;function Kd(){if(eb)return Jr;eb=1,Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.parseTransaction=m,Jr.toTransactionArray=g,Jr.parseAccessList=P;const e=vt(),r=Je(),n=Qe(),t=fu(),i=Ge(),s=rr(),o=Ut(),a=Be(),c=Gd(),d=Vd(),l=lu(),f=Wd();function m(p){const y=(0,f.getSerializedTransactionType)(p);return y==="eip1559"?b(p):y==="eip2930"?_(p):y==="eip4844"?h(p):y==="eip7702"?v(p):j(p)}function v(p){const y=g(p),[A,w,T,O,B,S,x,k,C,I,F,R,q]=y;if(y.length!==10&&y.length!==13)throw new r.InvalidSerializedTransactionError({attributes:{chainId:A,nonce:w,maxPriorityFeePerGas:T,maxFeePerGas:O,gas:B,to:S,value:x,data:k,accessList:C,authorizationList:I,...y.length>9?{v:F,r:R,s:q}:{}},serializedTransaction:p,type:"eip7702"});const M={chainId:(0,a.hexToNumber)(A),type:"eip7702"};return(0,i.isHex)(S)&&S!=="0x"&&(M.to=S),(0,i.isHex)(B)&&B!=="0x"&&(M.gas=(0,a.hexToBigInt)(B)),(0,i.isHex)(k)&&k!=="0x"&&(M.data=k),(0,i.isHex)(w)&&(M.nonce=w==="0x"?0:(0,a.hexToNumber)(w)),(0,i.isHex)(x)&&x!=="0x"&&(M.value=(0,a.hexToBigInt)(x)),(0,i.isHex)(O)&&O!=="0x"&&(M.maxFeePerGas=(0,a.hexToBigInt)(O)),(0,i.isHex)(T)&&T!=="0x"&&(M.maxPriorityFeePerGas=(0,a.hexToBigInt)(T)),C.length!==0&&C!=="0x"&&(M.accessList=P(C)),I.length!==0&&I!=="0x"&&(M.authorizationList=u(I)),(0,l.assertTransactionEIP7702)(M),{...y.length===13?E(y):void 0,...M}}function h(p){const y=g(p),A=y.length===4,w=A?y[0]:y,T=A?y.slice(1):[],[O,B,S,x,k,C,I,F,R,q,M,H,N,z]=w,[$,U,G]=T;if(!(w.length===11||w.length===14))throw new r.InvalidSerializedTransactionError({attributes:{chainId:O,nonce:B,maxPriorityFeePerGas:S,maxFeePerGas:x,gas:k,to:C,value:I,data:F,accessList:R,...w.length>9?{v:H,r:N,s:z}:{}},serializedTransaction:p,type:"eip4844"});const K={blobVersionedHashes:M,chainId:(0,a.hexToNumber)(O),to:C,type:"eip4844"};return(0,i.isHex)(k)&&k!=="0x"&&(K.gas=(0,a.hexToBigInt)(k)),(0,i.isHex)(F)&&F!=="0x"&&(K.data=F),(0,i.isHex)(B)&&(K.nonce=B==="0x"?0:(0,a.hexToNumber)(B)),(0,i.isHex)(I)&&I!=="0x"&&(K.value=(0,a.hexToBigInt)(I)),(0,i.isHex)(q)&&q!=="0x"&&(K.maxFeePerBlobGas=(0,a.hexToBigInt)(q)),(0,i.isHex)(x)&&x!=="0x"&&(K.maxFeePerGas=(0,a.hexToBigInt)(x)),(0,i.isHex)(S)&&S!=="0x"&&(K.maxPriorityFeePerGas=(0,a.hexToBigInt)(S)),R.length!==0&&R!=="0x"&&(K.accessList=P(R)),$&&U&&G&&(K.sidecars=(0,t.toBlobSidecars)({blobs:$,commitments:U,proofs:G})),(0,l.assertTransactionEIP4844)(K),{...w.length===14?E(w):void 0,...K}}function b(p){const y=g(p),[A,w,T,O,B,S,x,k,C,I,F,R]=y;if(!(y.length===9||y.length===12))throw new r.InvalidSerializedTransactionError({attributes:{chainId:A,nonce:w,maxPriorityFeePerGas:T,maxFeePerGas:O,gas:B,to:S,value:x,data:k,accessList:C,...y.length>9?{v:I,r:F,s:R}:{}},serializedTransaction:p,type:"eip1559"});const q={chainId:(0,a.hexToNumber)(A),type:"eip1559"};return(0,i.isHex)(S)&&S!=="0x"&&(q.to=S),(0,i.isHex)(B)&&B!=="0x"&&(q.gas=(0,a.hexToBigInt)(B)),(0,i.isHex)(k)&&k!=="0x"&&(q.data=k),(0,i.isHex)(w)&&(q.nonce=w==="0x"?0:(0,a.hexToNumber)(w)),(0,i.isHex)(x)&&x!=="0x"&&(q.value=(0,a.hexToBigInt)(x)),(0,i.isHex)(O)&&O!=="0x"&&(q.maxFeePerGas=(0,a.hexToBigInt)(O)),(0,i.isHex)(T)&&T!=="0x"&&(q.maxPriorityFeePerGas=(0,a.hexToBigInt)(T)),C.length!==0&&C!=="0x"&&(q.accessList=P(C)),(0,l.assertTransactionEIP1559)(q),{...y.length===12?E(y):void 0,...q}}function _(p){const y=g(p),[A,w,T,O,B,S,x,k,C,I,F]=y;if(!(y.length===8||y.length===11))throw new r.InvalidSerializedTransactionError({attributes:{chainId:A,nonce:w,gasPrice:T,gas:O,to:B,value:S,data:x,accessList:k,...y.length>8?{v:C,r:I,s:F}:{}},serializedTransaction:p,type:"eip2930"});const R={chainId:(0,a.hexToNumber)(A),type:"eip2930"};return(0,i.isHex)(B)&&B!=="0x"&&(R.to=B),(0,i.isHex)(O)&&O!=="0x"&&(R.gas=(0,a.hexToBigInt)(O)),(0,i.isHex)(x)&&x!=="0x"&&(R.data=x),(0,i.isHex)(w)&&(R.nonce=w==="0x"?0:(0,a.hexToNumber)(w)),(0,i.isHex)(S)&&S!=="0x"&&(R.value=(0,a.hexToBigInt)(S)),(0,i.isHex)(T)&&T!=="0x"&&(R.gasPrice=(0,a.hexToBigInt)(T)),k.length!==0&&k!=="0x"&&(R.accessList=P(k)),(0,l.assertTransactionEIP2930)(R),{...y.length===11?E(y):void 0,...R}}function j(p){const y=(0,c.fromRlp)(p,"hex"),[A,w,T,O,B,S,x,k,C]=y;if(!(y.length===6||y.length===9))throw new r.InvalidSerializedTransactionError({attributes:{nonce:A,gasPrice:w,gas:T,to:O,value:B,data:S,...y.length>6?{v:x,r:k,s:C}:{}},serializedTransaction:p,type:"legacy"});const I={type:"legacy"};if((0,i.isHex)(O)&&O!=="0x"&&(I.to=O),(0,i.isHex)(T)&&T!=="0x"&&(I.gas=(0,a.hexToBigInt)(T)),(0,i.isHex)(S)&&S!=="0x"&&(I.data=S),(0,i.isHex)(A)&&(I.nonce=A==="0x"?0:(0,a.hexToNumber)(A)),(0,i.isHex)(B)&&B!=="0x"&&(I.value=(0,a.hexToBigInt)(B)),(0,i.isHex)(w)&&w!=="0x"&&(I.gasPrice=(0,a.hexToBigInt)(w)),(0,l.assertTransactionLegacy)(I),y.length===6)return I;const F=(0,i.isHex)(x)&&x!=="0x"?(0,a.hexToBigInt)(x):0n;if(C==="0x"&&k==="0x")return F>0&&(I.chainId=Number(F)),I;const R=F,q=Number((R-35n)/2n);if(q>0)I.chainId=q;else if(R!==27n&&R!==28n)throw new r.InvalidLegacyVError({v:R});return I.v=R,I.s=C,I.r=k,I.yParity=R%2n===0n?1:0,I}function g(p){return(0,c.fromRlp)(`0x${p.slice(4)}`,"hex")}function P(p){const y=[];for(let A=0;A<p.length;A++){const[w,T]=p[A];if(!(0,n.isAddress)(w,{strict:!1}))throw new e.InvalidAddressError({address:w});y.push({address:w,storageKeys:T.map(O=>(0,d.isHash)(O)?O:(0,o.trim)(O))})}return y}function u(p){const y=[];for(let A=0;A<p.length;A++){const[w,T,O,B,S,x]=p[A];y.push({address:T,chainId:w==="0x"?0:(0,a.hexToNumber)(w),nonce:O==="0x"?0:(0,a.hexToNumber)(O),...E([B,S,x])})}return y}function E(p){const y=p.slice(-3),A=y[0]==="0x"||(0,a.hexToBigInt)(y[0])===0n?27n:28n;return{r:(0,s.padHex)(y[1],{size:32}),s:(0,s.padHex)(y[2],{size:32}),v:A,yParity:A===27n?0:1}}return Jr}var fd={},Xr={},na={},oa={},Zn={},tb;function Ap(){if(tb)return Zn;tb=1,Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.FilterTypeNotSupportedError=void 0;const e=ue();class r extends e.BaseError{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}return Zn.FilterTypeNotSupportedError=r,Zn}var rb;function Mr(){if(rb)return oa;rb=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.encodeEventTopics=d;const e=Te(),r=Ap(),n=_e(),t=Xe(),i=dn(),s=Et(),o=Gt(),a=Vt(),c="/docs/contract/encodeEventTopics";function d(f){var P;const{abi:m,eventName:v,args:h}=f;let b=m[0];if(v){const u=(0,a.getAbiItem)({abi:m,name:v});if(!u)throw new e.AbiEventNotFoundError(v,{docsPath:c});b=u}if(b.type!=="event")throw new e.AbiEventNotFoundError(void 0,{docsPath:c});const _=(0,o.formatAbiItem)(b),j=(0,i.toEventSelector)(_);let g=[];if(h&&"inputs"in b){const u=(P=b.inputs)==null?void 0:P.filter(p=>"indexed"in p&&p.indexed),E=Array.isArray(h)?h:Object.values(h).length>0?(u==null?void 0:u.map(p=>h[p.name]))??[]:[];E.length>0&&(g=(u==null?void 0:u.map((p,y)=>Array.isArray(E[y])?E[y].map((A,w)=>l({param:p,value:E[y][w]})):typeof E[y]<"u"&&E[y]!==null?l({param:p,value:E[y]}):null))??[])}return[j,...g]}function l({param:f,value:m}){if(f.type==="string"||f.type==="bytes")return(0,t.keccak256)((0,n.toBytes)(m));if(f.type==="tuple"||f.type.match(/^(.*)\[(\d+)?\]$/))throw new r.FilterTypeNotSupportedError(f.type);return(0,s.encodeAbiParameters)([f],[m])}return oa}var ia={},nb;function Pu(){if(nb)return ia;nb=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.createFilterRequestScope=e;function e(r,{method:n}){var i,s;const t={};return r.transport.type==="fallback"&&((s=(i=r.transport).onResponse)==null||s.call(i,({method:o,response:a,status:c,transport:d})=>{c==="success"&&n===o&&(t[a]=d.request)})),o=>t[o]||r.request}return ia}var ob;function Zd(){if(ob)return na;ob=1,Object.defineProperty(na,"__esModule",{value:!0}),na.createContractEventFilter=t;const e=Mr(),r=te(),n=Pu();async function t(i,s){const{address:o,abi:a,args:c,eventName:d,fromBlock:l,strict:f,toBlock:m}=s,v=(0,n.createFilterRequestScope)(i,{method:"eth_newFilter"}),h=d?(0,e.encodeEventTopics)({abi:a,args:c,eventName:d}):void 0,b=await i.request({method:"eth_newFilter",params:[{address:o,fromBlock:typeof l=="bigint"?(0,r.numberToHex)(l):l,toBlock:typeof m=="bigint"?(0,r.numberToHex)(m):m,topics:h}]});return{abi:a,args:c,eventName:d,id:b,request:v(b),strict:!!f,type:"event"}}return na}var aa={},sa={},ca={},Yn={},ib;function Tp(){if(ib)return Yn;ib=1,Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.EstimateGasExecutionError=void 0;const e=go(),r=Rr(),n=ue(),t=Je();class i extends n.BaseError{constructor(o,{account:a,docsPath:c,chain:d,data:l,gas:f,gasPrice:m,maxFeePerGas:v,maxPriorityFeePerGas:h,nonce:b,to:_,value:j}){var P;const g=(0,t.prettyPrint)({from:a==null?void 0:a.address,to:_,value:typeof j<"u"&&`${(0,e.formatEther)(j)} ${((P=d==null?void 0:d.nativeCurrency)==null?void 0:P.symbol)||"ETH"}`,data:l,gas:f,gasPrice:typeof m<"u"&&`${(0,r.formatGwei)(m)} gwei`,maxFeePerGas:typeof v<"u"&&`${(0,r.formatGwei)(v)} gwei`,maxPriorityFeePerGas:typeof h<"u"&&`${(0,r.formatGwei)(h)} gwei`,nonce:b});super(o.shortMessage,{cause:o,docsPath:c,metaMessages:[...o.metaMessages?[...o.metaMessages," "]:[],"Estimate Gas Arguments:",g].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=o}}return Yn.EstimateGasExecutionError=i,Yn}var ab;function Ip(){if(ab)return ca;ab=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.getEstimateGasError=t;const e=Tp(),r=Dt(),n=Eo();function t(i,{docsPath:s,...o}){const a=(()=>{const c=(0,n.getNodeError)(i,o);return c instanceof r.UnknownNodeError?i:c})();return new e.EstimateGasExecutionError(a,{docsPath:s,...o})}return ca}var ld={},Jn={},$t={},sb;function Io(){if(sb)return $t;sb=1,Object.defineProperty($t,"__esModule",{value:!0}),$t.MaxFeePerGasTooLowError=$t.Eip1559FeesNotSupportedError=$t.BaseFeeScalarError=void 0;const e=Rr(),r=ue();class n extends r.BaseError{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}$t.BaseFeeScalarError=n;class t extends r.BaseError{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}$t.Eip1559FeesNotSupportedError=t;class i extends r.BaseError{constructor({maxPriorityFeePerGas:o}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${(0,e.formatGwei)(o)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}return $t.MaxFeePerGasTooLowError=i,$t}var Xn={},ua={},Qn={},cb;function Yd(){if(cb)return Qn;cb=1,Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.BlockNotFoundError=void 0;const e=ue();class r extends e.BaseError{constructor({blockHash:t,blockNumber:i}){let s="Block";t&&(s=`Block at hash "${t}"`),i&&(s=`Block at number "${i}"`),super(`${s} could not be found.`,{name:"BlockNotFoundError"})}}return Qn.BlockNotFoundError=r,Qn}var ub;function Hr(){if(ub)return ua;ub=1,Object.defineProperty(ua,"__esModule",{value:!0}),ua.getBlock=t;const e=Yd(),r=te(),n=su();async function t(i,{blockHash:s,blockNumber:o,blockTag:a=i.experimental_blockTag??"latest",includeTransactions:c}={}){var v,h,b;const d=c??!1,l=o!==void 0?(0,r.numberToHex)(o):void 0;let f=null;if(s?f=await i.request({method:"eth_getBlockByHash",params:[s,d]},{dedupe:!0}):f=await i.request({method:"eth_getBlockByNumber",params:[l||a,d]},{dedupe:!!l}),!f)throw new e.BlockNotFoundError({blockHash:s,blockNumber:o});return(((b=(h=(v=i.chain)==null?void 0:v.formatters)==null?void 0:h.block)==null?void 0:b.format)||n.formatBlock)(f,"getBlock")}return ua}var da={},db;function Jd(){if(db)return da;db=1,Object.defineProperty(da,"__esModule",{value:!0}),da.getGasPrice=e;async function e(r){const n=await r.request({method:"eth_gasPrice"});return BigInt(n)}return da}var fb;function Sp(){if(fb)return Xn;fb=1,Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.estimateMaxPriorityFeePerGas=s,Xn.internal_estimateMaxPriorityFeePerGas=o;const e=Io(),r=Be(),n=me(),t=Hr(),i=Jd();async function s(a,c){return o(a,c)}async function o(a,c){var m,v;const{block:d,chain:l=a.chain,request:f}=c||{};try{const h=((m=l==null?void 0:l.fees)==null?void 0:m.maxPriorityFeePerGas)??((v=l==null?void 0:l.fees)==null?void 0:v.defaultPriorityFee);if(typeof h=="function"){const _=d||await(0,n.getAction)(a,t.getBlock,"getBlock")({}),j=await h({block:_,client:a,request:f});if(j===null)throw new Error;return j}if(typeof h<"u")return h;const b=await a.request({method:"eth_maxPriorityFeePerGas"});return(0,r.hexToBigInt)(b)}catch{const[h,b]=await Promise.all([d?Promise.resolve(d):(0,n.getAction)(a,t.getBlock,"getBlock")({}),(0,n.getAction)(a,i.getGasPrice,"getGasPrice")({})]);if(typeof h.baseFeePerGas!="bigint")throw new e.Eip1559FeesNotSupportedError;const _=b-h.baseFeePerGas;return _<0n?0n:_}}return Xn}var lb;function Bp(){if(lb)return Jn;lb=1,Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.estimateFeesPerGas=s,Jn.internal_estimateFeesPerGas=o;const e=Io(),r=me(),n=Sp(),t=Hr(),i=Jd();async function s(a,c){return o(a,c)}async function o(a,c){var P,u;const{block:d,chain:l=a.chain,request:f,type:m="eip1559"}=c||{},v=await(async()=>{var E,p;return typeof((E=l==null?void 0:l.fees)==null?void 0:E.baseFeeMultiplier)=="function"?l.fees.baseFeeMultiplier({block:d,client:a,request:f}):((p=l==null?void 0:l.fees)==null?void 0:p.baseFeeMultiplier)??1.2})();if(v<1)throw new e.BaseFeeScalarError;const b=10**(((P=v.toString().split(".")[1])==null?void 0:P.length)??0),_=E=>E*BigInt(Math.ceil(v*b))/BigInt(b),j=d||await(0,r.getAction)(a,t.getBlock,"getBlock")({});if(typeof((u=l==null?void 0:l.fees)==null?void 0:u.estimateFeesPerGas)=="function"){const E=await l.fees.estimateFeesPerGas({block:d,client:a,multiply:_,request:f,type:m});if(E!==null)return E}if(m==="eip1559"){if(typeof j.baseFeePerGas!="bigint")throw new e.Eip1559FeesNotSupportedError;const E=typeof(f==null?void 0:f.maxPriorityFeePerGas)=="bigint"?f.maxPriorityFeePerGas:await(0,n.internal_estimateMaxPriorityFeePerGas)(a,{block:j,chain:l,request:f}),p=_(j.baseFeePerGas);return{maxFeePerGas:(f==null?void 0:f.maxFeePerGas)??p+E,maxPriorityFeePerGas:E}}return{gasPrice:(f==null?void 0:f.gasPrice)??_(await(0,r.getAction)(a,i.getGasPrice,"getGasPrice")({}))}}return Jn}var fa={},bb;function Au(){if(bb)return fa;bb=1,Object.defineProperty(fa,"__esModule",{value:!0}),fa.getTransactionCount=n;const e=Be(),r=te();async function n(t,{address:i,blockTag:s="latest",blockNumber:o}){const a=await t.request({method:"eth_getTransactionCount",params:[i,typeof o=="bigint"?(0,r.numberToHex)(o):s]},{dedupe:!!o});return(0,e.hexToNumber)(a)}return fa}var la={},ba={},mb;function So(){if(mb)return ba;mb=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.getTransactionError=t;const e=Dt(),r=Je(),n=Eo();function t(i,{docsPath:s,...o}){const a=(()=>{const c=(0,n.getNodeError)(i,o);return c instanceof e.UnknownNodeError?i:c})();return new r.TransactionExecutionError(a,{docsPath:s,...o})}return ba}var ma={},yb;function br(){if(yb)return ma;yb=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.getChainId=r;const e=Be();async function r(n){const t=await n.request({method:"eth_chainId"},{dedupe:!0});return(0,e.hexToNumber)(t)}return ma}var hb;function Xd(){if(hb)return la;hb=1,Object.defineProperty(la,"__esModule",{value:!0}),la.fillTransaction=l;const e=Ae(),r=Io(),n=So(),t=ur(),i=un(),s=_t(),o=me(),a=wt(),c=Hr(),d=br();async function l(f,m){var R,q,M,H,N;const{account:v=f.account,accessList:h,authorizationList:b,chain:_=f.chain,blobVersionedHashes:j,blobs:g,data:P,gas:u,gasPrice:E,maxFeePerBlobGas:p,maxFeePerGas:y,maxPriorityFeePerGas:A,nonce:w,nonceManager:T,to:O,type:B,value:S,...x}=m,k=await(async()=>{if(!v||!T||typeof w<"u")return w;const z=(0,e.parseAccount)(v),$=_?_.id:await(0,o.getAction)(f,d.getChainId,"getChainId")({});return await T.consume({address:z.address,chainId:$,client:f})})();(0,a.assertRequest)(m);const C=(q=(R=_==null?void 0:_.formatters)==null?void 0:R.transactionRequest)==null?void 0:q.format,F=(C||s.formatTransactionRequest)({...(0,t.extract)(x,{format:C}),account:v?(0,e.parseAccount)(v):void 0,accessList:h,authorizationList:b,blobs:g,blobVersionedHashes:j,data:P,gas:u,gasPrice:E,maxFeePerBlobGas:p,maxFeePerGas:y,maxPriorityFeePerGas:A,nonce:k,to:O,type:B,value:S},"fillTransaction");try{const z=await f.request({method:"eth_fillTransaction",params:[F]}),U=(((H=(M=_==null?void 0:_.formatters)==null?void 0:M.transaction)==null?void 0:H.format)||i.formatTransaction)(z.tx);delete U.blockHash,delete U.blockNumber,delete U.r,delete U.s,delete U.transactionIndex,delete U.v,delete U.yParity,U.data=U.input,U.gas&&(U.gas=m.gas??U.gas),U.gasPrice&&(U.gasPrice=m.gasPrice??U.gasPrice),U.maxFeePerBlobGas&&(U.maxFeePerBlobGas=m.maxFeePerBlobGas??U.maxFeePerBlobGas),U.maxFeePerGas&&(U.maxFeePerGas=m.maxFeePerGas??U.maxFeePerGas),U.maxPriorityFeePerGas&&(U.maxPriorityFeePerGas=m.maxPriorityFeePerGas??U.maxPriorityFeePerGas),U.nonce&&(U.nonce=m.nonce??U.nonce);const G=await(async()=>{var J,oe;if(typeof((J=_==null?void 0:_.fees)==null?void 0:J.baseFeeMultiplier)=="function"){const Y=await(0,o.getAction)(f,c.getBlock,"getBlock")({});return _.fees.baseFeeMultiplier({block:Y,client:f,request:m})}return((oe=_==null?void 0:_.fees)==null?void 0:oe.baseFeeMultiplier)??1.2})();if(G<1)throw new r.BaseFeeScalarError;const W=10**(((N=G.toString().split(".")[1])==null?void 0:N.length)??0),V=J=>J*BigInt(Math.ceil(G*W))/BigInt(W);return U.maxFeePerGas&&!m.maxFeePerGas&&(U.maxFeePerGas=V(U.maxFeePerGas)),U.gasPrice&&!m.gasPrice&&(U.gasPrice=V(U.gasPrice)),{raw:z.raw,transaction:{from:F.from,...U}}}catch(z){throw(0,n.getTransactionError)(z,{...m,chain:f.chain})}}return la}var pb;function Bo(){return pb||(pb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.supportsFillTransaction=e.eip1559NetworkCache=e.defaultParameters=void 0,e.prepareTransactionRequest=j;const r=Ae(),n=Bp(),t=Qd(),i=Hr(),s=Au(),o=Io(),a=uu(),c=du(),d=Id(),l=fu(),f=me(),m=Or(),v=wt(),h=bu(),b=Xd(),_=br();e.defaultParameters=["blobVersionedHashes","chainId","fees","gas","nonce","type"],e.eip1559NetworkCache=new Map,e.supportsFillTransaction=new m.LruMap(128);async function j(g,P){var H,N,z;let u=P;u.account??(u.account=g.account),u.parameters??(u.parameters=e.defaultParameters);const{account:E,chain:p=g.chain,nonceManager:y,parameters:A}=u,w=(()=>{if(typeof(p==null?void 0:p.prepareTransactionRequest)=="function")return{fn:p.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(p==null?void 0:p.prepareTransactionRequest))return{fn:p.prepareTransactionRequest[0],runAt:p.prepareTransactionRequest[1].runAt}})();let T;async function O(){return T||(typeof u.chainId<"u"?u.chainId:p?p.id:(T=await(0,f.getAction)(g,_.getChainId,"getChainId")({}),T))}const B=E&&(0,r.parseAccount)(E);let S=u.nonce;if(A.includes("nonce")&&typeof S>"u"&&B&&y){const $=await O();S=await y.consume({address:B.address,chainId:$,client:g})}w!=null&&w.fn&&((H=w.runAt)!=null&&H.includes("beforeFillTransaction"))&&(u=await w.fn({...u,chain:p},{phase:"beforeFillTransaction"}),S??(S=u.nonce));const k=(()=>(A.includes("blobVersionedHashes")||A.includes("sidecars"))&&u.kzg&&u.blobs||e.supportsFillTransaction.get(g.uid)===!1||!["fees","gas"].some(U=>A.includes(U))?!1:!!(A.includes("chainId")&&typeof u.chainId!="number"||A.includes("nonce")&&typeof S!="number"||A.includes("fees")&&typeof u.gasPrice!="bigint"&&(typeof u.maxFeePerGas!="bigint"||typeof u.maxPriorityFeePerGas!="bigint")||A.includes("gas")&&typeof u.gas!="bigint"))()?await(0,f.getAction)(g,b.fillTransaction,"fillTransaction")({...u,nonce:S}).then($=>{const{chainId:U,from:G,gas:K,gasPrice:W,nonce:V,maxFeePerBlobGas:J,maxFeePerGas:oe,maxPriorityFeePerGas:Y,type:X,...ee}=$.transaction;return e.supportsFillTransaction.set(g.uid,!0),{...u,...G?{from:G}:{},...X?{type:X}:{},...typeof U<"u"?{chainId:U}:{},...typeof K<"u"?{gas:K}:{},...typeof W<"u"?{gasPrice:W}:{},...typeof V<"u"?{nonce:V}:{},...typeof J<"u"?{maxFeePerBlobGas:J}:{},...typeof oe<"u"?{maxFeePerGas:oe}:{},...typeof Y<"u"?{maxPriorityFeePerGas:Y}:{},..."nonceKey"in ee&&typeof ee.nonceKey<"u"?{nonceKey:ee.nonceKey}:{}}}).catch($=>{var K;const U=$;return U.name!=="TransactionExecutionError"||((K=U.walk)==null?void 0:K.call(U,W=>{const V=W;return V.name==="MethodNotFoundRpcError"||V.name==="MethodNotSupportedRpcError"}))&&e.supportsFillTransaction.set(g.uid,!1),u}):u;S??(S=k.nonce),u={...k,...B?{from:B==null?void 0:B.address}:{},...S?{nonce:S}:{}};const{blobs:C,gas:I,kzg:F,type:R}=u;w!=null&&w.fn&&((N=w.runAt)!=null&&N.includes("beforeFillParameters"))&&(u=await w.fn({...u,chain:p},{phase:"beforeFillParameters"}));let q;async function M(){return q||(q=await(0,f.getAction)(g,i.getBlock,"getBlock")({blockTag:"latest"}),q)}if(A.includes("nonce")&&typeof S>"u"&&B&&!y&&(u.nonce=await(0,f.getAction)(g,s.getTransactionCount,"getTransactionCount")({address:B.address,blockTag:"pending"})),(A.includes("blobVersionedHashes")||A.includes("sidecars"))&&C&&F){const $=(0,a.blobsToCommitments)({blobs:C,kzg:F});if(A.includes("blobVersionedHashes")){const U=(0,d.commitmentsToVersionedHashes)({commitments:$,to:"hex"});u.blobVersionedHashes=U}if(A.includes("sidecars")){const U=(0,c.blobsToProofs)({blobs:C,commitments:$,kzg:F}),G=(0,l.toBlobSidecars)({blobs:C,commitments:$,proofs:U,to:"hex"});u.sidecars=G}}if(A.includes("chainId")&&(u.chainId=await O()),(A.includes("fees")||A.includes("type"))&&typeof R>"u")try{u.type=(0,h.getTransactionType)(u)}catch{let $=e.eip1559NetworkCache.get(g.uid);if(typeof $>"u"){const U=await M();$=typeof(U==null?void 0:U.baseFeePerGas)=="bigint",e.eip1559NetworkCache.set(g.uid,$)}u.type=$?"eip1559":"legacy"}if(A.includes("fees"))if(u.type!=="legacy"&&u.type!=="eip2930"){if(typeof u.maxFeePerGas>"u"||typeof u.maxPriorityFeePerGas>"u"){const $=await M(),{maxFeePerGas:U,maxPriorityFeePerGas:G}=await(0,n.internal_estimateFeesPerGas)(g,{block:$,chain:p,request:u});if(typeof u.maxPriorityFeePerGas>"u"&&u.maxFeePerGas&&u.maxFeePerGas<G)throw new o.MaxFeePerGasTooLowError({maxPriorityFeePerGas:G});u.maxPriorityFeePerGas=G,u.maxFeePerGas=U}}else{if(typeof u.maxFeePerGas<"u"||typeof u.maxPriorityFeePerGas<"u")throw new o.Eip1559FeesNotSupportedError;if(typeof u.gasPrice>"u"){const $=await M(),{gasPrice:U}=await(0,n.internal_estimateFeesPerGas)(g,{block:$,chain:p,request:u,type:"legacy"});u.gasPrice=U}}return A.includes("gas")&&typeof I>"u"&&(u.gas=await(0,f.getAction)(g,t.estimateGas,"estimateGas")({...u,account:B,prepare:(B==null?void 0:B.type)==="local"?[]:["blobVersionedHashes"]})),w!=null&&w.fn&&((z=w.runAt)!=null&&z.includes("afterFillParameters"))&&(u=await w.fn({...u,chain:p},{phase:"afterFillParameters"})),(0,v.assertRequest)(u),delete u.parameters,u}}(ld)),ld}var gb;function Qd(){if(gb)return sa;gb=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.estimateGas=l;const e=Ae(),r=ue(),n=Ao(),t=te(),i=Ip(),s=ur(),o=_t(),a=$d(),c=wt(),d=Bo();async function l(f,m){var j,g,P;const{account:v=f.account,prepare:h=!0}=m,b=v?(0,e.parseAccount)(v):void 0,_=(()=>{if(Array.isArray(h))return h;if((b==null?void 0:b.type)!=="local")return["blobVersionedHashes"]})();try{const u=await(async()=>{if(m.to)return m.to;if(m.authorizationList&&m.authorizationList.length>0)return await(0,n.recoverAuthorizationAddress)({authorization:m.authorizationList[0]}).catch(()=>{throw new r.BaseError("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:E,authorizationList:p,blobs:y,blobVersionedHashes:A,blockNumber:w,blockTag:T,data:O,gas:B,gasPrice:S,maxFeePerBlobGas:x,maxFeePerGas:k,maxPriorityFeePerGas:C,nonce:I,value:F,stateOverride:R,...q}=h?await(0,d.prepareTransactionRequest)(f,{...m,parameters:_,to:u}):m;if(B&&m.gas!==B)return B;const H=(typeof w=="bigint"?(0,t.numberToHex)(w):void 0)||T,N=(0,a.serializeStateOverride)(R);(0,c.assertRequest)(m);const z=(P=(g=(j=f.chain)==null?void 0:j.formatters)==null?void 0:g.transactionRequest)==null?void 0:P.format,U=(z||o.formatTransactionRequest)({...(0,s.extract)(q,{format:z}),account:b,accessList:E,authorizationList:p,blobs:y,blobVersionedHashes:A,data:O,gasPrice:S,maxFeePerBlobGas:x,maxFeePerGas:k,maxPriorityFeePerGas:C,nonce:I,to:u,value:F},"estimateGas");return BigInt(await f.request({method:"eth_estimateGas",params:N?[U,H??f.experimental_blockTag??"latest",N]:H?[U,H]:[U]}))}catch(u){throw(0,i.getEstimateGasError)(u,{...m,account:b,chain:f.chain})}}return sa}var _b;function Rp(){if(_b)return aa;_b=1,Object.defineProperty(aa,"__esModule",{value:!0}),aa.estimateContractGas=s;const e=Ae(),r=et(),n=lr(),t=me(),i=Qd();async function s(o,a){const{abi:c,address:d,args:l,functionName:f,dataSuffix:m,...v}=a,h=(0,r.encodeFunctionData)({abi:c,args:l,functionName:f});try{return await(0,t.getAction)(o,i.estimateGas,"estimateGas")({data:`${h}${m?m.replace("0x",""):""}`,to:d,...v})}catch(b){const _=v.account?(0,e.parseAccount)(v.account):void 0;throw(0,n.getContractError)(b,{abi:c,address:d,args:l,docsPath:"/docs/contract/estimateContractGas",functionName:f,sender:_==null?void 0:_.address})}}return aa}var ya={},ha={},pa={},ga={},vb;function Ro(){if(vb)return ga;vb=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.decodeEventLog=a;const e=Te(),r=Qh(),n=Ye(),t=dn(),i=ar(),s=Gt(),o="/docs/contract/decodeEventLog";function a(d){const{abi:l,data:f,strict:m,topics:v}=d,h=m??!0,[b,..._]=v;if(!b)throw new e.AbiEventSignatureEmptyTopicsError({docsPath:o});const j=l.find(A=>A.type==="event"&&b===(0,t.toEventSelector)((0,s.formatAbiItem)(A)));if(!(j&&"name"in j)||j.type!=="event")throw new e.AbiEventSignatureNotFoundError(b,{docsPath:o});const{name:g,inputs:P}=j,u=P==null?void 0:P.some(A=>!("name"in A&&A.name)),E=u?[]:{},p=P.map((A,w)=>[A,w]).filter(([A])=>"indexed"in A&&A.indexed);for(let A=0;A<p.length;A++){const[w,T]=p[A],O=_[A];if(!O)throw new e.DecodeLogTopicsMismatch({abiItem:j,param:w});E[u?T:w.name||T]=c({param:w,value:O})}const y=P.filter(A=>!("indexed"in A&&A.indexed));if(y.length>0){if(f&&f!=="0x")try{const A=(0,i.decodeAbiParameters)(y,f);if(A)if(u)for(let w=0;w<P.length;w++)E[w]=E[w]??A.shift();else for(let w=0;w<y.length;w++)E[y[w].name]=A[w]}catch(A){if(h)throw A instanceof e.AbiDecodingDataSizeTooSmallError||A instanceof r.PositionOutOfBoundsError?new e.DecodeLogDataMismatch({abiItem:j,data:f,params:y,size:(0,n.size)(f)}):A}else if(h)throw new e.DecodeLogDataMismatch({abiItem:j,data:"0x",params:y,size:0})}return{eventName:g,args:Object.values(E).length>0?E:void 0}}function c({param:d,value:l}){return d.type==="string"||d.type==="bytes"||d.type==="tuple"||d.type.match(/^(.*)\[(\d+)?\]$/)?l:((0,i.decodeAbiParameters)([d],l)||[])[0]}return ga}var Eb;function Oo(){if(Eb)return pa;Eb=1,Object.defineProperty(pa,"__esModule",{value:!0}),pa.parseEventLogs=s;const e=Pt(),r=_e(),n=Xe(),t=dn(),i=Ro();function s(a){const{abi:c,args:d,logs:l,strict:f=!0}=a,m=(()=>{if(a.eventName)return Array.isArray(a.eventName)?a.eventName:[a.eventName]})();return l.map(v=>{var j;const h=c.filter(g=>g.type==="event"&&v.topics[0]===(0,t.toEventSelector)(g));if(h.length===0)return null;let b,_;for(const g of h)try{b=(0,i.decodeEventLog)({...v,abi:[g],strict:!0}),_=g;break}catch{}if(!b&&!f){_=h[0];try{b=(0,i.decodeEventLog)({...v,abi:[_],strict:!1})}catch{const g=(j=_.inputs)==null?void 0:j.some(P=>!("name"in P&&P.name));return{...v,args:g?[]:{},eventName:_.name}}}return!b||!_||m&&!m.includes(b.eventName)||!o({args:b.args,inputs:_.inputs,matchArgs:d})?null:{...b,...v}}).filter(Boolean)}function o(a){const{args:c,inputs:d,matchArgs:l}=a;if(!l)return!0;if(!c)return!1;function f(m,v,h){try{return m.type==="address"?(0,e.isAddressEqual)(v,h):m.type==="string"||m.type==="bytes"?(0,n.keccak256)((0,r.toBytes)(v))===h:v===h}catch{return!1}}return Array.isArray(c)&&Array.isArray(l)?l.every((m,v)=>{if(m==null)return!0;const h=d[v];return h?(Array.isArray(m)?m:[m]).some(_=>f(h,_,c[v])):!1}):typeof c=="object"&&!Array.isArray(c)&&typeof l=="object"&&!Array.isArray(l)?Object.entries(l).every(([m,v])=>{if(v==null)return!0;const h=d.find(_=>_.name===m);return h?(Array.isArray(v)?v:[v]).some(_=>f(h,_,c[m])):!1}):!1}return pa}var jb;function ef(){if(jb)return ha;jb=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.getLogs=i;const e=Mr(),r=Oo(),n=te(),t=Lt();async function i(s,{address:o,blockHash:a,fromBlock:c,toBlock:d,event:l,events:f,args:m,strict:v}={}){const h=v??!1,b=f??(l?[l]:void 0);let _=[];b&&(_=[b.flatMap(u=>(0,e.encodeEventTopics)({abi:[u],eventName:u.name,args:f?void 0:m}))],l&&(_=_[0]));let j;a?j=await s.request({method:"eth_getLogs",params:[{address:o,topics:_,blockHash:a}]}):j=await s.request({method:"eth_getLogs",params:[{address:o,topics:_,fromBlock:typeof c=="bigint"?(0,n.numberToHex)(c):c,toBlock:typeof d=="bigint"?(0,n.numberToHex)(d):d}]});const g=j.map(P=>(0,t.formatLog)(P));return b?(0,r.parseEventLogs)({abi:b,args:m,logs:g,strict:h}):g}return ha}var wb;function tf(){if(wb)return ya;wb=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.getContractEvents=t;const e=Vt(),r=me(),n=ef();async function t(i,s){const{abi:o,address:a,args:c,blockHash:d,eventName:l,fromBlock:f,toBlock:m,strict:v}=s,h=l?(0,e.getAbiItem)({abi:o,name:l}):void 0,b=h?void 0:o.filter(_=>_.type==="event");return(0,r.getAction)(i,n.getLogs,"getLogs")({address:a,args:c,blockHash:d,event:h,events:b,fromBlock:f,toBlock:m,strict:v})}return ya}var _a={},Pb;function Op(){if(Pb)return _a;Pb=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.simulateContract=o;const e=Ae(),r=Wt(),n=et(),t=lr(),i=me(),s=To();async function o(a,c){const{abi:d,address:l,args:f,dataSuffix:m,functionName:v,...h}=c,b=h.account?(0,e.parseAccount)(h.account):a.account,_=(0,n.encodeFunctionData)({abi:d,args:f,functionName:v});try{const{data:j}=await(0,i.getAction)(a,s.call,"call")({batch:!1,data:`${_}${m?m.replace("0x",""):""}`,to:l,...h,account:b}),g=(0,r.decodeFunctionResult)({abi:d,args:f,functionName:v,data:j||"0x"}),P=d.filter(u=>"name"in u&&u.name===c.functionName);return{result:g,request:{abi:P,address:l,args:f,dataSuffix:m,functionName:v,...h,account:b}}}catch(j){throw(0,t.getContractError)(j,{abi:d,address:l,args:f,docsPath:"/docs/contract/simulateContract",functionName:v,sender:b==null?void 0:b.address})}}return _a}var va={},bd={},Ab;function Fr(){return Ab||(Ab=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.cleanupCache=e.listenersCache=void 0,e.observe=n,e.listenersCache=new Map,e.cleanupCache=new Map;let r=0;function n(t,i,s){const o=++r,a=()=>e.listenersCache.get(t)||[],c=()=>{const v=a();e.listenersCache.set(t,v.filter(h=>h.id!==o))},d=()=>{const v=a();if(!v.some(b=>b.id===o))return;const h=e.cleanupCache.get(t);if(v.length===1&&h){const b=h();b instanceof Promise&&b.catch(()=>{})}c()},l=a();if(e.listenersCache.set(t,[...l,{id:o,fns:i}]),l&&l.length>0)return d;const f={};for(const v in i)f[v]=(...h)=>{var _,j;const b=a();if(b.length!==0)for(const g of b)(j=(_=g.fns)[v])==null||j.call(_,...h)};const m=s(f);return typeof m=="function"&&e.cleanupCache.set(t,m),d}}(bd)),bd}var Ea={},ja={},Tb;function rf(){if(Tb)return ja;Tb=1,Object.defineProperty(ja,"__esModule",{value:!0}),ja.wait=e;async function e(r){return new Promise(n=>setTimeout(n,r))}return ja}var Ib;function fn(){if(Ib)return Ea;Ib=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.poll=r;const e=rf();function r(n,{emitOnBegin:t,initialWaitTime:i,interval:s}){let o=!0;const a=()=>o=!1;return(async()=>{let d;t&&(d=await n({unpoll:a}));const l=await(i==null?void 0:i(d))??s;await(0,e.wait)(l);const f=async()=>{o&&(await n({unpoll:a}),await(0,e.wait)(s),f())};f()})(),a}return Ea}var eo={},md={},Sb;function xp(){return Sb||(Sb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.responseCache=e.promiseCache=void 0,e.getCache=r,e.withCache=n,e.promiseCache=new Map,e.responseCache=new Map;function r(t){const i=(a,c)=>({clear:()=>c.delete(a),get:()=>c.get(a),set:d=>c.set(a,d)}),s=i(t,e.promiseCache),o=i(t,e.responseCache);return{clear:()=>{s.clear(),o.clear()},promise:s,response:o}}async function n(t,{cacheKey:i,cacheTime:s=Number.POSITIVE_INFINITY}){const o=r(i),a=o.response.get();if(a&&s>0&&Date.now()-a.created.getTime()<s)return a.data;let c=o.promise.get();c||(c=t(),o.promise.set(c));try{const d=await c;return o.response.set({created:new Date,data:d}),d}finally{o.promise.clear()}}}(md)),md}var Bb;function xo(){if(Bb)return eo;Bb=1,Object.defineProperty(eo,"__esModule",{value:!0}),eo.getBlockNumberCache=n,eo.getBlockNumber=t;const e=xp(),r=i=>`blockNumber.${i}`;function n(i){return(0,e.getCache)(r(i))}async function t(i,{cacheTime:s=i.cacheTime}={}){const o=await(0,e.withCache)(()=>i.request({method:"eth_blockNumber"}),{cacheKey:r(i.uid),cacheTime:s});return BigInt(o)}return eo}var wa={},Rb;function Tu(){if(Rb)return wa;Rb=1,Object.defineProperty(wa,"__esModule",{value:!0}),wa.getFilterChanges=n;const e=Oo(),r=Lt();async function n(t,{filter:i}){const s="strict"in i&&i.strict,o=await i.request({method:"eth_getFilterChanges",params:[i.id]});if(typeof o[0]=="string")return o;const a=o.map(c=>(0,r.formatLog)(c));return!("abi"in i)||!i.abi?a:(0,e.parseEventLogs)({abi:i.abi,logs:a,strict:s})}return wa}var Pa={},Ob;function Iu(){if(Ob)return Pa;Ob=1,Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.uninstallFilter=e;async function e(r,{filter:n}){return n.request({method:"eth_uninstallFilter",params:[n.id]})}return Pa}var xb;function Cp(){if(xb)return va;xb=1,Object.defineProperty(va,"__esModule",{value:!0}),va.watchContractEvent=h;const e=Te(),r=cr(),n=Ro(),t=Mr(),i=Lt(),s=me(),o=Fr(),a=fn(),c=ke(),d=Zd(),l=xo(),f=tf(),m=Tu(),v=Iu();function h(b,_){const{abi:j,address:g,args:P,batch:u=!0,eventName:E,fromBlock:p,onError:y,onLogs:A,poll:w,pollingInterval:T=b.pollingInterval,strict:O}=_;return(()=>typeof w<"u"?w:typeof p=="bigint"?!0:!(b.transport.type==="webSocket"||b.transport.type==="ipc"||b.transport.type==="fallback"&&(b.transport.transports[0].config.type==="webSocket"||b.transport.transports[0].config.type==="ipc")))()?(()=>{const k=O??!1,C=(0,c.stringify)(["watchContractEvent",g,P,u,b.uid,E,T,k,p]);return(0,o.observe)(C,{onLogs:A,onError:y},I=>{let F;p!==void 0&&(F=p-1n);let R,q=!1;const M=(0,a.poll)(async()=>{var H;if(!q){try{R=await(0,s.getAction)(b,d.createContractEventFilter,"createContractEventFilter")({abi:j,address:g,args:P,eventName:E,strict:k,fromBlock:p})}catch{}q=!0;return}try{let N;if(R)N=await(0,s.getAction)(b,m.getFilterChanges,"getFilterChanges")({filter:R});else{const z=await(0,s.getAction)(b,l.getBlockNumber,"getBlockNumber")({});F&&F<z?N=await(0,s.getAction)(b,f.getContractEvents,"getContractEvents")({abi:j,address:g,args:P,eventName:E,fromBlock:F+1n,toBlock:z,strict:k}):N=[],F=z}if(N.length===0)return;if(u)I.onLogs(N);else for(const z of N)I.onLogs([z])}catch(N){R&&N instanceof r.InvalidInputRpcError&&(q=!1),(H=I.onError)==null||H.call(I,N)}},{emitOnBegin:!0,interval:T});return async()=>{R&&await(0,s.getAction)(b,v.uninstallFilter,"uninstallFilter")({filter:R}),M()}})})():(()=>{const k=O??!1,C=(0,c.stringify)(["watchContractEvent",g,P,u,b.uid,E,T,k]);let I=!0,F=()=>I=!1;return(0,o.observe)(C,{onLogs:A,onError:y},R=>((async()=>{try{const q=(()=>{if(b.transport.type==="fallback"){const N=b.transport.transports.find(z=>z.config.type==="webSocket"||z.config.type==="ipc");return N?N.value:b.transport}return b.transport})(),M=E?(0,t.encodeEventTopics)({abi:j,eventName:E,args:P}):[],{unsubscribe:H}=await q.subscribe({params:["logs",{address:g,topics:M}],onData(N){var $;if(!I)return;const z=N.result;try{const{eventName:U,args:G}=(0,n.decodeEventLog)({abi:j,data:z.data,topics:z.topics,strict:O}),K=(0,i.formatLog)(z,{args:G,eventName:U});R.onLogs([K])}catch(U){let G,K;if(U instanceof e.DecodeLogDataMismatch||U instanceof e.DecodeLogTopicsMismatch){if(O)return;G=U.abiItem.name,K=($=U.abiItem.inputs)==null?void 0:$.some(V=>!("name"in V&&V.name))}const W=(0,i.formatLog)(z,{args:K?[]:{},eventName:G});R.onLogs([W])}},onError(N){var z;(z=R.onError)==null||z.call(R,N)}});F=H,I||F()}catch(q){y==null||y(q)}})(),()=>F()))})()}return va}var to={},Aa={},Ta={},Cb;function nf(){if(Cb)return Ta;Cb=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.sendRawTransaction=e;async function e(r,{serializedTransaction:n}){return r.request({method:"eth_sendRawTransaction",params:[n]},{retryCount:0})}return Ta}var qb;function Su(){if(qb)return Aa;qb=1,Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.sendTransaction=b;const e=Ae(),r=ir(),n=ue(),t=Ao(),i=vo(),s=So(),o=ur(),a=_t(),c=me(),d=Or(),l=wt(),f=br(),m=Bo(),v=nf(),h=new d.LruMap(128);async function b(_,j){var F,R,q,M;const{account:g=_.account,chain:P=_.chain,accessList:u,authorizationList:E,blobs:p,data:y,gas:A,gasPrice:w,maxFeePerBlobGas:T,maxFeePerGas:O,maxPriorityFeePerGas:B,nonce:S,type:x,value:k,...C}=j;if(typeof g>"u")throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransaction"});const I=g?(0,e.parseAccount)(g):null;try{(0,l.assertRequest)(j);const H=await(async()=>{if(j.to)return j.to;if(j.to!==null&&E&&E.length>0)return await(0,t.recoverAuthorizationAddress)({authorization:E[0]}).catch(()=>{throw new n.BaseError("`to` is required. Could not infer from `authorizationList`.")})})();if((I==null?void 0:I.type)==="json-rpc"||I===null){let N;P!==null&&(N=await(0,c.getAction)(_,f.getChainId,"getChainId")({}),(0,i.assertCurrentChain)({currentChainId:N,chain:P}));const z=(q=(R=(F=_.chain)==null?void 0:F.formatters)==null?void 0:R.transactionRequest)==null?void 0:q.format,U=(z||a.formatTransactionRequest)({...(0,o.extract)(C,{format:z}),accessList:u,account:I,authorizationList:E,blobs:p,chainId:N,data:y,gas:A,gasPrice:w,maxFeePerBlobGas:T,maxFeePerGas:O,maxPriorityFeePerGas:B,nonce:S,to:H,type:x,value:k},"sendTransaction"),G=h.get(_.uid),K=G?"wallet_sendTransaction":"eth_sendTransaction";try{return await _.request({method:K,params:[U]},{retryCount:0})}catch(W){if(G===!1)throw W;const V=W;if(V.name==="InvalidInputRpcError"||V.name==="InvalidParamsRpcError"||V.name==="MethodNotFoundRpcError"||V.name==="MethodNotSupportedRpcError")return await _.request({method:"wallet_sendTransaction",params:[U]},{retryCount:0}).then(J=>(h.set(_.uid,!0),J)).catch(J=>{const oe=J;throw oe.name==="MethodNotFoundRpcError"||oe.name==="MethodNotSupportedRpcError"?(h.set(_.uid,!1),V):oe});throw V}}if((I==null?void 0:I.type)==="local"){const N=await(0,c.getAction)(_,m.prepareTransactionRequest,"prepareTransactionRequest")({account:I,accessList:u,authorizationList:E,blobs:p,chain:P,data:y,gas:A,gasPrice:w,maxFeePerBlobGas:T,maxFeePerGas:O,maxPriorityFeePerGas:B,nonce:S,nonceManager:I.nonceManager,parameters:[...m.defaultParameters,"sidecars"],type:x,value:k,...C,to:H}),z=(M=P==null?void 0:P.serializers)==null?void 0:M.transaction,$=await I.signTransaction(N,{serializer:z});return await(0,c.getAction)(_,v.sendRawTransaction,"sendRawTransaction")({serializedTransaction:$})}throw(I==null?void 0:I.type)==="smart"?new r.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new r.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransaction",type:I==null?void 0:I.type})}catch(H){throw H instanceof r.AccountTypeNotSupportedError?H:(0,s.getTransactionError)(H,{...j,account:I,chain:j.chain||void 0})}}return Aa}var Mb;function of(){if(Mb)return to;Mb=1,Object.defineProperty(to,"__esModule",{value:!0}),to.writeContract=o;const e=Ae(),r=ir(),n=et(),t=lr(),i=me(),s=Su();async function o(a,c){return o.internal(a,s.sendTransaction,"sendTransaction",c)}return function(a){async function c(d,l,f,m){const{abi:v,account:h=d.account,address:b,args:_,dataSuffix:j,functionName:g,...P}=m;if(typeof h>"u")throw new r.AccountNotFoundError({docsPath:"/docs/contract/writeContract"});const u=h?(0,e.parseAccount)(h):null,E=(0,n.encodeFunctionData)({abi:v,args:_,functionName:g});try{return await(0,i.getAction)(d,l,f)({data:`${E}${j?j.replace("0x",""):""}`,to:b,account:u,...P})}catch(p){throw(0,t.getContractError)(p,{abi:v,address:b,args:_,docsPath:"/docs/contract/writeContract",functionName:g,sender:u==null?void 0:u.address})}}a.internal=c}(o||(to.writeContract=o={})),to}var Hb;function L_(){if(Hb)return Xr;Hb=1,Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.getContract=c,Xr.getFunctionParameters=d,Xr.getEventParameters=l;const e=me(),r=Zd(),n=Rp(),t=tf(),i=Bt(),s=Op(),o=Cp(),a=of();function c({abi:f,address:m,client:v}){const h=v,[b,_]=(()=>h?"public"in h&&"wallet"in h?[h.public,h.wallet]:"public"in h?[h.public,void 0]:"wallet"in h?[void 0,h.wallet]:[h,h]:[void 0,void 0])(),j=b!=null,g=_!=null,P={};let u=!1,E=!1,p=!1;for(const y of f)if(y.type==="function"?y.stateMutability==="view"||y.stateMutability==="pure"?u=!0:E=!0:y.type==="event"&&(p=!0),u&&E&&p)break;return j&&(u&&(P.read=new Proxy({},{get(y,A){return(...w)=>{const{args:T,options:O}=d(w);return(0,e.getAction)(b,i.readContract,"readContract")({abi:f,address:m,functionName:A,args:T,...O})}}})),E&&(P.simulate=new Proxy({},{get(y,A){return(...w)=>{const{args:T,options:O}=d(w);return(0,e.getAction)(b,s.simulateContract,"simulateContract")({abi:f,address:m,functionName:A,args:T,...O})}}})),p&&(P.createEventFilter=new Proxy({},{get(y,A){return(...w)=>{const T=f.find(S=>S.type==="event"&&S.name===A),{args:O,options:B}=l(w,T);return(0,e.getAction)(b,r.createContractEventFilter,"createContractEventFilter")({abi:f,address:m,eventName:A,args:O,...B})}}}),P.getEvents=new Proxy({},{get(y,A){return(...w)=>{const T=f.find(S=>S.type==="event"&&S.name===A),{args:O,options:B}=l(w,T);return(0,e.getAction)(b,t.getContractEvents,"getContractEvents")({abi:f,address:m,eventName:A,args:O,...B})}}}),P.watchEvent=new Proxy({},{get(y,A){return(...w)=>{const T=f.find(S=>S.type==="event"&&S.name===A),{args:O,options:B}=l(w,T);return(0,e.getAction)(b,o.watchContractEvent,"watchContractEvent")({abi:f,address:m,eventName:A,args:O,...B})}}}))),g&&E&&(P.write=new Proxy({},{get(y,A){return(...w)=>{const{args:T,options:O}=d(w);return(0,e.getAction)(_,a.writeContract,"writeContract")({abi:f,address:m,functionName:A,args:T,...O})}}})),(j||g)&&E&&(P.estimateGas=new Proxy({},{get(y,A){return(...w)=>{const{args:T,options:O}=d(w),B=b??_;return(0,e.getAction)(B,n.estimateContractGas,"estimateContractGas")({abi:f,address:m,functionName:A,args:T,...O,account:O.account??_.account})}}})),P.address=m,P.abi=f,P}function d(f){const m=f.length&&Array.isArray(f[0]),v=m?f[0]:[],h=(m?f[1]:f[0])??{};return{args:v,options:h}}function l(f,m){let v=!1;Array.isArray(f[0])?v=!0:f.length===1?v=m.inputs.some(_=>_.indexed):f.length===2&&(v=!0);const h=v?f[0]:void 0,b=(v?f[1]:f[0])??{};return{args:h,options:b}}return Xr}var Qr={},ro={},Fb;function qp(){if(Fb)return ro;Fb=1,Object.defineProperty(ro,"__esModule",{value:!0}),ro.BundleFailedError=void 0;const e=ue();class r extends e.BaseError{constructor(t){super(`Call bundle failed with status: ${t.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=t}}return ro.BundleFailedError=r,ro}var Ia={},kb;function Bu(){if(kb)return Ia;kb=1,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.withRetry=r;const e=rf();function r(n,{delay:t=100,retryCount:i=2,shouldRetry:s=()=>!0}={}){return new Promise((o,a)=>{const c=async({count:d=0}={})=>{const l=async({error:f})=>{const m=typeof t=="function"?t({count:d,error:f}):t;m&&await(0,e.wait)(m),c({count:d+1})};try{const f=await n();o(f)}catch(f){if(d<i&&await s({count:d,error:f}))return l({error:f});a(f)}};c()})}return Ia}var Sa={},yd={},Nb;function af(){return Nb||(Nb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fallbackTransactionErrorMagicIdentifier=e.fallbackMagicIdentifier=void 0,e.sendCalls=l;const r=Ae(),n=ue(),t=cr(),i=et(),s=Me(),o=Be(),a=te(),c=So(),d=Su();e.fallbackMagicIdentifier="0x5792579257925792579257925792579257925792579257925792579257925792",e.fallbackTransactionErrorMagicIdentifier=(0,a.numberToHex)(0,{size:32});async function l(f,m){const{account:v=f.account,capabilities:h,chain:b=f.chain,experimental_fallback:_,experimental_fallbackDelay:j=32,forceAtomic:g=!1,id:P,version:u="2.0.0"}=m,E=v?(0,r.parseAccount)(v):null,p=m.calls.map(y=>{const A=y,w=A.abi?(0,i.encodeFunctionData)({abi:A.abi,functionName:A.functionName,args:A.args}):A.data;return{data:A.dataSuffix&&w?(0,s.concat)([w,A.dataSuffix]):w,to:A.to,value:A.value?(0,a.numberToHex)(A.value):void 0}});try{const y=await f.request({method:"wallet_sendCalls",params:[{atomicRequired:g,calls:p,capabilities:h,chainId:(0,a.numberToHex)(b.id),from:E==null?void 0:E.address,id:P,version:u}]},{retryCount:0});return typeof y=="string"?{id:y}:y}catch(y){const A=y;if(_&&(A.name==="MethodNotFoundRpcError"||A.name==="MethodNotSupportedRpcError"||A.name==="UnknownRpcError"||A.details.toLowerCase().includes("does not exist / is not available")||A.details.toLowerCase().includes("missing or invalid. request()")||A.details.toLowerCase().includes("did not match any variant of untagged enum")||A.details.toLowerCase().includes("account upgraded to unsupported contract")||A.details.toLowerCase().includes("eip-7702 not supported")||A.details.toLowerCase().includes("unsupported wc_ method")||A.details.toLowerCase().includes("feature toggled misconfigured")||A.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(h&&Object.values(h).some(S=>!S.optional)){const S="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new t.UnsupportedNonOptionalCapabilityError(new n.BaseError(S,{details:S}))}if(g&&p.length>1){const B="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new t.AtomicityNotSupportedError(new n.BaseError(B,{details:B}))}const w=[];for(const B of p){const S=(0,d.sendTransaction)(f,{account:E,chain:b,data:B.data,to:B.to,value:B.value?(0,o.hexToBigInt)(B.value):void 0});w.push(S),j>0&&await new Promise(x=>setTimeout(x,j))}const T=await Promise.allSettled(w);if(T.every(B=>B.status==="rejected"))throw T[0].reason;const O=T.map(B=>B.status==="fulfilled"?B.value:e.fallbackTransactionErrorMagicIdentifier);return{id:(0,s.concat)([...O,(0,a.numberToHex)(b.id,{size:32}),e.fallbackMagicIdentifier])}}throw(0,c.getTransactionError)(y,{...m,account:E,chain:m.chain})}}}(yd)),yd}var $b;function Mp(){if($b)return Sa;$b=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.getCallsStatus=s;const e=ft(),r=Ut(),n=Be(),t=mo(),i=af();async function s(o,a){async function c(_){if(_.endsWith(i.fallbackMagicIdentifier.slice(2))){const g=(0,r.trim)((0,e.sliceHex)(_,-64,-32)),P=(0,e.sliceHex)(_,0,-64).slice(2).match(/.{1,64}/g),u=await Promise.all(P.map(p=>i.fallbackTransactionErrorMagicIdentifier.slice(2)!==p?o.request({method:"eth_getTransactionReceipt",params:[`0x${p}`]},{dedupe:!0}):void 0)),E=(()=>u.some(p=>p===null)?100:u.every(p=>(p==null?void 0:p.status)==="0x1")?200:u.every(p=>(p==null?void 0:p.status)==="0x0")?500:600)();return{atomic:!1,chainId:(0,n.hexToNumber)(g),receipts:u.filter(Boolean),status:E,version:"2.0.0"}}return o.request({method:"wallet_getCallsStatus",params:[_]})}const{atomic:d=!1,chainId:l,receipts:f,version:m="2.0.0",...v}=await c(a.id),[h,b]=(()=>{const _=v.status;return _>=100&&_<200?["pending",_]:_>=200&&_<300?["success",_]:_>=300&&_<700?["failure",_]:_==="CONFIRMED"?["success",200]:_==="PENDING"?["pending",100]:[void 0,_]})();return{...v,atomic:d,chainId:l?(0,n.hexToNumber)(l):void 0,receipts:(f==null?void 0:f.map(_=>({..._,blockNumber:(0,n.hexToBigInt)(_.blockNumber),gasUsed:(0,n.hexToBigInt)(_.gasUsed),status:t.receiptStatuses[_.status]})))??[],statusCode:b,status:h,version:m}}return Sa}var zb;function sf(){if(zb)return Qr;zb=1,Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.WaitForCallsStatusTimeoutError=void 0,Qr.waitForCallsStatus=d;const e=ue(),r=qp(),n=me(),t=Fr(),i=fn(),s=kd(),o=Bu(),a=ke(),c=Mp();async function d(f,m){const{id:v,pollingInterval:h=f.pollingInterval,status:b=({statusCode:T})=>T===200||T>=300,retryCount:_=4,retryDelay:j=({count:T})=>~~(1<<T)*200,timeout:g=6e4,throwOnFailure:P=!1}=m,u=(0,a.stringify)(["waitForCallsStatus",f.uid,v]),{promise:E,resolve:p,reject:y}=(0,s.withResolvers)();let A;const w=(0,t.observe)(u,{resolve:p,reject:y},T=>{const O=(0,i.poll)(async()=>{const B=S=>{clearTimeout(A),O(),S(),w()};try{const S=await(0,o.withRetry)(async()=>{const x=await(0,n.getAction)(f,c.getCallsStatus,"getCallsStatus")({id:v});if(P&&x.status==="failure")throw new r.BundleFailedError(x);return x},{retryCount:_,delay:j});if(!b(S))return;B(()=>T.resolve(S))}catch(S){B(()=>T.reject(S))}},{interval:h,emitOnBegin:!0});return O});return A=g?setTimeout(()=>{w(),clearTimeout(A),y(new l({id:v}))},g):void 0,await E}class l extends e.BaseError{constructor({id:m}){super(`Timed out while waiting for call bundle with id "${m}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}return Qr.WaitForCallsStatusTimeoutError=l,Qr}var no={},Ba={},Ub;function Hp(){if(Ub)return Ba;Ub=1,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.uid=t;const e=256;let r=e,n;function t(i=11){if(!n||r+i>e*2){n="",r=0;for(let s=0;s<e;s++)n+=(256+Math.random()*256|0).toString(16).substring(1)}return n.substring(r,r+++i)}return Ba}var Lb;function Ru(){if(Lb)return no;Lb=1,Object.defineProperty(no,"__esModule",{value:!0}),no.createClient=n,no.rpcSchema=t;const e=Ae(),r=Hp();function n(i){const{batch:s,chain:o,ccipRead:a,key:c="base",name:d="Base Client",type:l="base"}=i,f=i.experimental_blockTag??(typeof(o==null?void 0:o.experimental_preconfirmationTime)=="number"?"pending":void 0),m=(o==null?void 0:o.blockTime)??12e3,v=Math.min(Math.max(Math.floor(m/2),500),4e3),h=i.pollingInterval??v,b=i.cacheTime??h,_=i.account?(0,e.parseAccount)(i.account):void 0,{config:j,request:g,value:P}=i.transport({account:_,chain:o,pollingInterval:h}),u={...j,...P},E={account:_,batch:s,cacheTime:b,ccipRead:a,chain:o,key:c,name:d,pollingInterval:h,request:g,transport:u,type:l,uid:(0,r.uid)(),...f?{experimental_blockTag:f}:{}};function p(y){return A=>{const w=A(y);for(const O in E)delete w[O];const T={...y,...w};return Object.assign(T,{extend:p(T)})}}return Object.assign(E,{extend:p(E)})}function t(){return null}return no}var Ra={},Oa={},xa={},Ca={},Db;function cf(){if(Db)return Ca;Db=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.isNullUniversalResolverError=n;const e=ue(),r=sr();function n(t){var s,o,a,c,d,l;if(!(t instanceof e.BaseError))return!1;const i=t.walk(f=>f instanceof r.ContractFunctionRevertedError);return i instanceof r.ContractFunctionRevertedError?((s=i.data)==null?void 0:s.errorName)==="HttpError"||((o=i.data)==null?void 0:o.errorName)==="ResolverError"||((a=i.data)==null?void 0:a.errorName)==="ResolverNotContract"||((c=i.data)==null?void 0:c.errorName)==="ResolverNotFound"||((d=i.data)==null?void 0:d.errorName)==="ReverseAddressMismatch"||((l=i.data)==null?void 0:l.errorName)==="UnsupportedResolverProfile":!1}return Ca}var qa={},Ma={},Gb;function Fp(){if(Gb)return Ma;Gb=1,Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.encodedLabelToLabelhash=r;const e=Ge();function r(n){if(n.length!==66||n.indexOf("[")!==0||n.indexOf("]")!==65)return null;const t=`0x${n.slice(1,65)}`;return(0,e.isHex)(t)?t:null}return Ma}var Vb;function uf(){if(Vb)return qa;Vb=1,Object.defineProperty(qa,"__esModule",{value:!0}),qa.namehash=s;const e=Me(),r=_e(),n=te(),t=Xe(),i=Fp();function s(o){let a=new Uint8Array(32).fill(0);if(!o)return(0,n.bytesToHex)(a);const c=o.split(".");for(let d=c.length-1;d>=0;d-=1){const l=(0,i.encodedLabelToLabelhash)(c[d]),f=l?(0,r.toBytes)(l):(0,t.keccak256)((0,r.stringToBytes)(c[d]),"bytes");a=(0,t.keccak256)((0,e.concat)([a,f]),"bytes")}return(0,n.bytesToHex)(a)}return qa}var Ha={},Fa={},Wb;function D_(){if(Wb)return Fa;Wb=1,Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.encodeLabelhash=e;function e(r){return`[${r.slice(2)}]`}return Fa}var ka={},Kb;function kp(){if(Kb)return ka;Kb=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.labelhash=i;const e=_e(),r=te(),n=Xe(),t=Fp();function i(s){const o=new Uint8Array(32).fill(0);return s?(0,t.encodedLabelToLabelhash)(s)||(0,n.keccak256)((0,e.stringToBytes)(s)):(0,r.bytesToHex)(o)}return ka}var Zb;function df(){if(Zb)return Ha;Zb=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.packetToBytes=t;const e=_e(),r=D_(),n=kp();function t(i){const s=i.replace(/^\.|\.$/gm,"");if(s.length===0)return new Uint8Array(1);const o=new Uint8Array((0,e.stringToBytes)(s).byteLength+2);let a=0;const c=s.split(".");for(let d=0;d<c.length;d++){let l=(0,e.stringToBytes)(c[d]);l.byteLength>255&&(l=(0,e.stringToBytes)((0,r.encodeLabelhash)((0,n.labelhash)(c[d])))),o[a]=l.length,o.set(l,a+1),a+=l.length+1}return o.byteLength!==a+1?o.slice(0,a+1):o}return Ha}var Yb;function G_(){if(Yb)return xa;Yb=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.getEnsAddress=m;const e=dr(),r=Wt(),n=et(),t=or(),i=Ut(),s=te(),o=cf(),a=ju(),c=uf(),d=df(),l=me(),f=Bt();async function m(v,h){const{blockNumber:b,blockTag:_,coinType:j,name:g,gatewayUrls:P,strict:u}=h,{chain:E}=v,p=(()=>{if(h.universalResolverAddress)return h.universalResolverAddress;if(!E)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,t.getChainContractAddress)({blockNumber:b,chain:E,contract:"ensUniversalResolver"})})(),y=E==null?void 0:E.ensTlds;if(y&&!y.some(w=>g.endsWith(w)))return null;const A=(()=>j!=null?[(0,c.namehash)(g),BigInt(j)]:[(0,c.namehash)(g)])();try{const w=(0,n.encodeFunctionData)({abi:e.addressResolverAbi,functionName:"addr",args:A}),T={address:p,abi:e.universalResolverResolveAbi,functionName:"resolveWithGateways",args:[(0,s.toHex)((0,d.packetToBytes)(g)),w,P??[a.localBatchGatewayUrl]],blockNumber:b,blockTag:_},B=await(0,l.getAction)(v,f.readContract,"readContract")(T);if(B[0]==="0x")return null;const S=(0,r.decodeFunctionResult)({abi:e.addressResolverAbi,args:A,functionName:"addr",data:B[0]});return S==="0x"||(0,i.trim)(S)==="0x00"?null:S}catch(w){if(u)throw w;if((0,o.isNullUniversalResolverError)(w))return null;throw w}}return xa}var Na={},$a={},pt={},it={},Jb;function ff(){if(Jb)return it;Jb=1,Object.defineProperty(it,"__esModule",{value:!0}),it.EnsInvalidChainIdError=it.EnsAvatarUnsupportedNamespaceError=it.EnsAvatarUriResolutionError=it.EnsAvatarInvalidNftUriError=it.EnsAvatarInvalidMetadataError=void 0;const e=ue();class r extends e.BaseError{constructor({data:a}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(a)}`],name:"EnsAvatarInvalidMetadataError"})}}it.EnsAvatarInvalidMetadataError=r;class n extends e.BaseError{constructor({reason:a}){super(`ENS NFT avatar URI is invalid. ${a}`,{name:"EnsAvatarInvalidNftUriError"})}}it.EnsAvatarInvalidNftUriError=n;class t extends e.BaseError{constructor({uri:a}){super(`Unable to resolve ENS avatar URI "${a}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}it.EnsAvatarUriResolutionError=t;class i extends e.BaseError{constructor({namespace:a}){super(`ENS NFT avatar namespace "${a}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}it.EnsAvatarUnsupportedNamespaceError=i;class s extends e.BaseError{constructor({chainId:a}){super(`Invalid ENSIP-11 chainId: ${a}. Must be between 0 and 0x7fffffff, or 1.`,{name:"EnsInvalidChainIdError"})}}return it.EnsInvalidChainIdError=s,it}var Xb;function V_(){if(Xb)return pt;Xb=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.isImageUri=o,pt.getGateway=a,pt.resolveAvatarUri=c,pt.getJsonImage=d,pt.getMetadataAvatarUri=l,pt.parseAvatarUri=f,pt.parseNftUri=m,pt.getNftTokenUri=v;const e=Bt(),r=ff(),n=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,t=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,i=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,s=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function o(h){try{const b=await fetch(h,{method:"HEAD"});if(b.status===200){const _=b.headers.get("content-type");return _==null?void 0:_.startsWith("image/")}return!1}catch(b){return typeof b=="object"&&typeof b.response<"u"||!Object.hasOwn(globalThis,"Image")?!1:new Promise(_=>{const j=new Image;j.onload=()=>{_(!0)},j.onerror=()=>{_(!1)},j.src=h})}}function a(h,b){return h?h.endsWith("/")?h.slice(0,-1):h:b}function c({uri:h,gatewayUrls:b}){const _=i.test(h);if(_)return{uri:h,isOnChain:!0,isEncoded:_};const j=a(b==null?void 0:b.ipfs,"https://ipfs.io"),g=a(b==null?void 0:b.arweave,"https://arweave.net"),P=h.match(n),{protocol:u,subpath:E,target:p,subtarget:y=""}=(P==null?void 0:P.groups)||{},A=u==="ipns:/"||E==="ipns/",w=u==="ipfs:/"||E==="ipfs/"||t.test(h);if(h.startsWith("http")&&!A&&!w){let O=h;return b!=null&&b.arweave&&(O=h.replace(/https:\/\/arweave.net/g,b==null?void 0:b.arweave)),{uri:O,isOnChain:!1,isEncoded:!1}}if((A||w)&&p)return{uri:`${j}/${A?"ipns":"ipfs"}/${p}${y}`,isOnChain:!1,isEncoded:!1};if(u==="ar:/"&&p)return{uri:`${g}/${p}${y||""}`,isOnChain:!1,isEncoded:!1};let T=h.replace(s,"");if(T.startsWith("<svg")&&(T=`data:image/svg+xml;base64,${btoa(T)}`),T.startsWith("data:")||T.startsWith("{"))return{uri:T,isOnChain:!0,isEncoded:!1};throw new r.EnsAvatarUriResolutionError({uri:h})}function d(h){if(typeof h!="object"||!("image"in h)&&!("image_url"in h)&&!("image_data"in h))throw new r.EnsAvatarInvalidMetadataError({data:h});return h.image||h.image_url||h.image_data}async function l({gatewayUrls:h,uri:b}){try{const _=await fetch(b).then(g=>g.json());return await f({gatewayUrls:h,uri:d(_)})}catch{throw new r.EnsAvatarUriResolutionError({uri:b})}}async function f({gatewayUrls:h,uri:b}){const{uri:_,isOnChain:j}=c({uri:b,gatewayUrls:h});if(j||await o(_))return _;throw new r.EnsAvatarUriResolutionError({uri:b})}function m(h){let b=h;b.startsWith("did:nft:")&&(b=b.replace("did:nft:","").replace(/_/g,"/"));const[_,j,g]=b.split("/"),[P,u]=_.split(":"),[E,p]=j.split(":");if(!P||P.toLowerCase()!=="eip155")throw new r.EnsAvatarInvalidNftUriError({reason:"Only EIP-155 supported"});if(!u)throw new r.EnsAvatarInvalidNftUriError({reason:"Chain ID not found"});if(!p)throw new r.EnsAvatarInvalidNftUriError({reason:"Contract address not found"});if(!g)throw new r.EnsAvatarInvalidNftUriError({reason:"Token ID not found"});if(!E)throw new r.EnsAvatarInvalidNftUriError({reason:"ERC namespace not found"});return{chainID:Number.parseInt(u,10),namespace:E.toLowerCase(),contractAddress:p,tokenID:g}}async function v(h,{nft:b}){if(b.namespace==="erc721")return(0,e.readContract)(h,{address:b.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(b.tokenID)]});if(b.namespace==="erc1155")return(0,e.readContract)(h,{address:b.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(b.tokenID)]});throw new r.EnsAvatarUnsupportedNamespaceError({namespace:b.namespace})}return pt}var Qb;function W_(){if(Qb)return $a;Qb=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.parseAvatarRecord=r;const e=V_();async function r(t,{gatewayUrls:i,record:s}){return/eip155:/i.test(s)?n(t,{gatewayUrls:i,record:s}):(0,e.parseAvatarUri)({uri:s,gatewayUrls:i})}async function n(t,{gatewayUrls:i,record:s}){const o=(0,e.parseNftUri)(s),a=await(0,e.getNftTokenUri)(t,{nft:o}),{uri:c,isOnChain:d,isEncoded:l}=(0,e.resolveAvatarUri)({uri:a,gatewayUrls:i});if(d&&(c.includes("data:application/json;base64,")||c.startsWith("{"))){const m=l?atob(c.replace("data:application/json;base64,","")):c,v=JSON.parse(m);return(0,e.parseAvatarUri)({uri:(0,e.getJsonImage)(v),gatewayUrls:i})}let f=o.tokenID;return o.namespace==="erc1155"&&(f=f.replace("0x","").padStart(64,"0")),(0,e.getMetadataAvatarUri)({gatewayUrls:i,uri:c.replace(/(?:0x)?{id}/,f)})}return $a}var za={},em;function Np(){if(em)return za;em=1,Object.defineProperty(za,"__esModule",{value:!0}),za.getEnsText=f;const e=dr(),r=Wt(),n=et(),t=or(),i=te(),s=cf(),o=ju(),a=uf(),c=df(),d=me(),l=Bt();async function f(m,v){const{blockNumber:h,blockTag:b,key:_,name:j,gatewayUrls:g,strict:P}=v,{chain:u}=m,E=(()=>{if(v.universalResolverAddress)return v.universalResolverAddress;if(!u)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,t.getChainContractAddress)({blockNumber:h,chain:u,contract:"ensUniversalResolver"})})(),p=u==null?void 0:u.ensTlds;if(p&&!p.some(y=>j.endsWith(y)))return null;try{const y={address:E,abi:e.universalResolverResolveAbi,args:[(0,i.toHex)((0,c.packetToBytes)(j)),(0,n.encodeFunctionData)({abi:e.textResolverAbi,functionName:"text",args:[(0,a.namehash)(j),_]}),g??[o.localBatchGatewayUrl]],functionName:"resolveWithGateways",blockNumber:h,blockTag:b},w=await(0,d.getAction)(m,l.readContract,"readContract")(y);if(w[0]==="0x")return null;const T=(0,r.decodeFunctionResult)({abi:e.textResolverAbi,functionName:"text",data:w[0]});return T===""?null:T}catch(y){if(P)throw y;if((0,s.isNullUniversalResolverError)(y))return null;throw y}}return za}var tm;function K_(){if(tm)return Na;tm=1,Object.defineProperty(Na,"__esModule",{value:!0}),Na.getEnsAvatar=t;const e=W_(),r=me(),n=Np();async function t(i,{blockNumber:s,blockTag:o,assetGatewayUrls:a,name:c,gatewayUrls:d,strict:l,universalResolverAddress:f}){const m=await(0,r.getAction)(i,n.getEnsText,"getEnsText")({blockNumber:s,blockTag:o,key:"avatar",name:c,universalResolverAddress:f,gatewayUrls:d,strict:l});if(!m)return null;try{return await(0,e.parseAvatarRecord)(i,{record:m,gatewayUrls:a})}catch{return null}}return Na}var Ua={},rm;function Z_(){if(rm)return Ua;rm=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.getEnsName=o;const e=dr(),r=or(),n=cf(),t=ju(),i=me(),s=Bt();async function o(a,c){const{address:d,blockNumber:l,blockTag:f,coinType:m=60n,gatewayUrls:v,strict:h}=c,{chain:b}=a,_=(()=>{if(c.universalResolverAddress)return c.universalResolverAddress;if(!b)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,r.getChainContractAddress)({blockNumber:l,chain:b,contract:"ensUniversalResolver"})})();try{const j={address:_,abi:e.universalResolverReverseAbi,args:[d,m,v??[t.localBatchGatewayUrl]],functionName:"reverseWithGateways",blockNumber:l,blockTag:f},g=(0,i.getAction)(a,s.readContract,"readContract"),[P]=await g(j);return P||null}catch(j){if(h)throw j;if((0,n.isNullUniversalResolverError)(j))return null;throw j}}return Ua}var La={},nm;function Y_(){if(nm)return La;nm=1,Object.defineProperty(La,"__esModule",{value:!0}),La.getEnsResolver=s;const e=or(),r=te(),n=df(),t=me(),i=Bt();async function s(o,a){const{blockNumber:c,blockTag:d,name:l}=a,{chain:f}=o,m=(()=>{if(a.universalResolverAddress)return a.universalResolverAddress;if(!f)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,e.getChainContractAddress)({blockNumber:c,chain:f,contract:"ensUniversalResolver"})})(),v=f==null?void 0:f.ensTlds;if(v&&!v.some(b=>l.endsWith(b)))throw new Error(`${l} is not a valid ENS TLD (${v==null?void 0:v.join(", ")}) for chain "${f.name}" (id: ${f.id}).`);const[h]=await(0,t.getAction)(o,i.readContract,"readContract")({address:m,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,r.toHex)((0,n.packetToBytes)(l))],blockNumber:c,blockTag:d});return h}return La}var Da={},om;function $p(){if(om)return Da;om=1,Object.defineProperty(Da,"__esModule",{value:!0}),Da.createAccessList=o;const e=Ae(),r=te(),n=qd(),t=ur(),i=_t(),s=wt();async function o(a,c){var y,A,w;const{account:d=a.account,blockNumber:l,blockTag:f="latest",blobs:m,data:v,gas:h,gasPrice:b,maxFeePerBlobGas:_,maxFeePerGas:j,maxPriorityFeePerGas:g,to:P,value:u,...E}=c,p=d?(0,e.parseAccount)(d):void 0;try{(0,s.assertRequest)(c);const O=(typeof l=="bigint"?(0,r.numberToHex)(l):void 0)||f,B=(w=(A=(y=a.chain)==null?void 0:y.formatters)==null?void 0:A.transactionRequest)==null?void 0:w.format,x=(B||i.formatTransactionRequest)({...(0,t.extract)(E,{format:B}),account:p,blobs:m,data:v,gas:h,gasPrice:b,maxFeePerBlobGas:_,maxFeePerGas:j,maxPriorityFeePerGas:g,to:P,value:u},"createAccessList"),k=await a.request({method:"eth_createAccessList",params:[x,O]});return{accessList:k.accessList,gasUsed:BigInt(k.gasUsed)}}catch(T){throw(0,n.getCallError)(T,{...c,account:p,chain:a.chain})}}return Da}var Ga={},im;function J_(){if(im)return Ga;im=1,Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.createBlockFilter=r;const e=Pu();async function r(n){const t=(0,e.createFilterRequestScope)(n,{method:"eth_newBlockFilter"}),i=await n.request({method:"eth_newBlockFilter"});return{id:i,request:t(i),type:"block"}}return Ga}var Va={},am;function zp(){if(am)return Va;am=1,Object.defineProperty(Va,"__esModule",{value:!0}),Va.createEventFilter=t;const e=Mr(),r=te(),n=Pu();async function t(i,{address:s,args:o,event:a,events:c,fromBlock:d,strict:l,toBlock:f}={}){const m=c??(a?[a]:void 0),v=(0,n.createFilterRequestScope)(i,{method:"eth_newFilter"});let h=[];m&&(h=[m.flatMap(j=>(0,e.encodeEventTopics)({abi:[j],eventName:j.name,args:o}))],a&&(h=h[0]));const b=await i.request({method:"eth_newFilter",params:[{address:s,fromBlock:typeof d=="bigint"?(0,r.numberToHex)(d):d,toBlock:typeof f=="bigint"?(0,r.numberToHex)(f):f,...h.length?{topics:h}:{}}]});return{abi:m,args:o,eventName:a?a.name:void 0,fromBlock:d,id:b,request:v(b),strict:!!l,toBlock:f,type:"event"}}return Va}var Wa={},sm;function Up(){if(sm)return Wa;sm=1,Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.createPendingTransactionFilter=r;const e=Pu();async function r(n){const t=(0,e.createFilterRequestScope)(n,{method:"eth_newPendingTransactionFilter"}),i=await n.request({method:"eth_newPendingTransactionFilter"});return{id:i,request:t(i),type:"transaction"}}return Wa}var Ka={},cm;function X_(){if(cm)return Ka;cm=1,Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.getBalance=r;const e=te();async function r(n,{address:t,blockNumber:i,blockTag:s=n.experimental_blockTag??"latest"}){const o=typeof i=="bigint"?(0,e.numberToHex)(i):void 0,a=await n.request({method:"eth_getBalance",params:[t,o||s]});return BigInt(a)}return Ka}var Za={},um;function Q_(){if(um)return Za;um=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.getBlobBaseFee=e;async function e(r){const n=await r.request({method:"eth_blobBaseFee"});return BigInt(n)}return Za}var Ya={},dm;function ev(){if(dm)return Ya;dm=1,Object.defineProperty(Ya,"__esModule",{value:!0}),Ya.getBlockTransactionCount=n;const e=Be(),r=te();async function n(t,{blockHash:i,blockNumber:s,blockTag:o="latest"}={}){const a=s!==void 0?(0,r.numberToHex)(s):void 0;let c;return i?c=await t.request({method:"eth_getBlockTransactionCountByHash",params:[i]},{dedupe:!0}):c=await t.request({method:"eth_getBlockTransactionCountByNumber",params:[a||o]},{dedupe:!!a}),(0,e.hexToNumber)(c)}return Ya}var Ja={},oo={},fm;function tv(){if(fm)return oo;fm=1,Object.defineProperty(oo,"__esModule",{value:!0}),oo.Eip712DomainNotFoundError=void 0;const e=ue();class r extends e.BaseError{constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}return oo.Eip712DomainNotFoundError=r,oo}var lm;function rv(){if(lm)return Ja;lm=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.getEip712Domain=t;const e=tv(),r=me(),n=Bt();async function t(s,o){const{address:a,factory:c,factoryData:d}=o;try{const[l,f,m,v,h,b,_]=await(0,r.getAction)(s,n.readContract,"readContract")({abi:i,address:a,functionName:"eip712Domain",factory:c,factoryData:d});return{domain:{name:f,version:m,chainId:Number(v),verifyingContract:h,salt:b},extensions:_,fields:l}}catch(l){const f=l;throw f.name==="ContractFunctionExecutionError"&&f.cause.name==="ContractFunctionZeroDataError"?new e.Eip712DomainNotFoundError({address:a}):f}}const i=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];return Ja}var Xa={},Qa={},bm;function nv(){if(bm)return Qa;bm=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.formatFeeHistory=e;function e(r){var n;return{baseFeePerGas:r.baseFeePerGas.map(t=>BigInt(t)),gasUsedRatio:r.gasUsedRatio,oldestBlock:BigInt(r.oldestBlock),reward:(n=r.reward)==null?void 0:n.map(t=>t.map(i=>BigInt(i)))}}return Qa}var mm;function ov(){if(mm)return Xa;mm=1,Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.getFeeHistory=n;const e=te(),r=nv();async function n(t,{blockCount:i,blockNumber:s,blockTag:o="latest",rewardPercentiles:a}){const c=typeof s=="bigint"?(0,e.numberToHex)(s):void 0,d=await t.request({method:"eth_feeHistory",params:[(0,e.numberToHex)(i),c||o,a]},{dedupe:!!c});return(0,r.formatFeeHistory)(d)}return Xa}var es={},ym;function iv(){if(ym)return es;ym=1,Object.defineProperty(es,"__esModule",{value:!0}),es.getFilterLogs=n;const e=Oo(),r=Lt();async function n(t,{filter:i}){const s=i.strict??!1,a=(await i.request({method:"eth_getFilterLogs",params:[i.id]})).map(c=>(0,r.formatLog)(c));return i.abi?(0,e.parseEventLogs)({abi:i.abi,logs:a,strict:s}):a}return es}var ts={},rs={},hd={},ns={},hm;function Lp(){if(hm)return ns;hm=1,Object.defineProperty(ns,"__esModule",{value:!0}),ns.encodePacked=a;const e=Te(),r=vt(),n=Qe(),t=Me(),i=rr(),s=te(),o=hu();function a(d,l){if(d.length!==l.length)throw new e.AbiEncodingLengthMismatchError({expectedLength:d.length,givenLength:l.length});const f=[];for(let m=0;m<d.length;m++){const v=d[m],h=l[m];f.push(c(v,h))}return(0,t.concatHex)(f)}function c(d,l,f=!1){if(d==="address"){const b=l;if(!(0,n.isAddress)(b))throw new r.InvalidAddressError({address:b});return(0,i.pad)(b.toLowerCase(),{size:f?32:null})}if(d==="string")return(0,s.stringToHex)(l);if(d==="bytes")return l;if(d==="bool")return(0,i.pad)((0,s.boolToHex)(l),{size:f?32:1});const m=d.match(o.integerRegex);if(m){const[b,_,j="256"]=m,g=Number.parseInt(j,10)/8;return(0,s.numberToHex)(l,{size:f?32:g,signed:_==="int"})}const v=d.match(o.bytesRegex);if(v){const[b,_]=v;if(Number.parseInt(_,10)!==(l.length-2)/2)throw new e.BytesSizeMismatchError({expectedSize:Number.parseInt(_,10),givenSize:(l.length-2)/2});return(0,i.pad)(l,{dir:"right",size:f?32:null})}const h=d.match(o.arrayRegex);if(h&&Array.isArray(l)){const[b,_]=h,j=[];for(let g=0;g<l.length;g++)j.push(c(_,l[g],!0));return j.length===0?"0x":(0,t.concatHex)(j)}throw new e.UnsupportedPackedAbiType(d)}return ns}var en={},os={},pm;function lf(){if(pm)return os;pm=1,Object.defineProperty(os,"__esModule",{value:!0}),os.isBytes=e;function e(r){return!r||typeof r!="object"||!("BYTES_PER_ELEMENT"in r)?!1:r.BYTES_PER_ELEMENT===1&&r.constructor.name==="Uint8Array"}return os}var gm;function Dp(){if(gm)return en;gm=1,Object.defineProperty(en,"__esModule",{value:!0}),en.getContractAddress=c,en.getCreateAddress=d,en.getCreate2Address=l;const e=Me(),r=lf(),n=rr(),t=ft(),i=_e(),s=ho(),o=Xe(),a=at();function c(f){return f.opcode==="CREATE2"?l(f):d(f)}function d(f){const m=(0,i.toBytes)((0,a.getAddress)(f.from));let v=(0,i.toBytes)(f.nonce);return v[0]===0&&(v=new Uint8Array([])),(0,a.getAddress)(`0x${(0,o.keccak256)((0,s.toRlp)([m,v],"bytes")).slice(26)}`)}function l(f){const m=(0,i.toBytes)((0,a.getAddress)(f.from)),v=(0,n.pad)((0,r.isBytes)(f.salt)?f.salt:(0,i.toBytes)(f.salt),{size:32}),h=(()=>"bytecodeHash"in f?(0,r.isBytes)(f.bytecodeHash)?f.bytecodeHash:(0,i.toBytes)(f.bytecodeHash):(0,o.keccak256)(f.bytecode,"bytes"))();return(0,a.getAddress)((0,t.slice)((0,o.keccak256)((0,e.concat)([(0,i.toBytes)("0xff"),m,v,h])),12))}return en}var io={},pd={},_m;function av(){return _m||(_m=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.promiseCache=void 0,e.withDedupe=n;const r=Or();e.promiseCache=new r.LruMap(8192);function n(t,{enabled:i=!0,id:s}){if(!i||!s)return t();if(e.promiseCache.get(s))return e.promiseCache.get(s);const o=t().finally(()=>e.promiseCache.delete(s));return e.promiseCache.set(s,o),o}}(pd)),pd}var vm;function Gp(){if(vm)return io;vm=1,Object.defineProperty(io,"__esModule",{value:!0}),io.buildRequest=a,io.shouldRetry=c;const e=ue(),r=jt(),n=cr(),t=te(),i=av(),s=Bu(),o=ke();function a(d,l={}){return async(f,m={})=>{var u;const{dedupe:v=!1,methods:h,retryDelay:b=150,retryCount:_=3,uid:j}={...l,...m},{method:g}=f;if((u=h==null?void 0:h.exclude)!=null&&u.includes(g))throw new n.MethodNotSupportedRpcError(new Error("method not supported"),{method:g});if(h!=null&&h.include&&!h.include.includes(g))throw new n.MethodNotSupportedRpcError(new Error("method not supported"),{method:g});const P=v?(0,t.stringToHex)(`${j}.${(0,o.stringify)(f)}`):void 0;return(0,i.withDedupe)(()=>(0,s.withRetry)(async()=>{try{return await d(f)}catch(E){const p=E;switch(p.code){case n.ParseRpcError.code:throw new n.ParseRpcError(p);case n.InvalidRequestRpcError.code:throw new n.InvalidRequestRpcError(p);case n.MethodNotFoundRpcError.code:throw new n.MethodNotFoundRpcError(p,{method:f.method});case n.InvalidParamsRpcError.code:throw new n.InvalidParamsRpcError(p);case n.InternalRpcError.code:throw new n.InternalRpcError(p);case n.InvalidInputRpcError.code:throw new n.InvalidInputRpcError(p);case n.ResourceNotFoundRpcError.code:throw new n.ResourceNotFoundRpcError(p);case n.ResourceUnavailableRpcError.code:throw new n.ResourceUnavailableRpcError(p);case n.TransactionRejectedRpcError.code:throw new n.TransactionRejectedRpcError(p);case n.MethodNotSupportedRpcError.code:throw new n.MethodNotSupportedRpcError(p,{method:f.method});case n.LimitExceededRpcError.code:throw new n.LimitExceededRpcError(p);case n.JsonRpcVersionUnsupportedError.code:throw new n.JsonRpcVersionUnsupportedError(p);case n.UserRejectedRequestError.code:throw new n.UserRejectedRequestError(p);case n.UnauthorizedProviderError.code:throw new n.UnauthorizedProviderError(p);case n.UnsupportedProviderMethodError.code:throw new n.UnsupportedProviderMethodError(p);case n.ProviderDisconnectedError.code:throw new n.ProviderDisconnectedError(p);case n.ChainDisconnectedError.code:throw new n.ChainDisconnectedError(p);case n.SwitchChainError.code:throw new n.SwitchChainError(p);case n.UnsupportedNonOptionalCapabilityError.code:throw new n.UnsupportedNonOptionalCapabilityError(p);case n.UnsupportedChainIdError.code:throw new n.UnsupportedChainIdError(p);case n.DuplicateIdError.code:throw new n.DuplicateIdError(p);case n.UnknownBundleIdError.code:throw new n.UnknownBundleIdError(p);case n.BundleTooLargeError.code:throw new n.BundleTooLargeError(p);case n.AtomicReadyWalletRejectedUpgradeError.code:throw new n.AtomicReadyWalletRejectedUpgradeError(p);case n.AtomicityNotSupportedError.code:throw new n.AtomicityNotSupportedError(p);case 5e3:throw new n.UserRejectedRequestError(p);default:throw E instanceof e.BaseError?E:new n.UnknownRpcError(p)}}},{delay:({count:E,error:p})=>{var y;if(p&&p instanceof r.HttpRequestError){const A=(y=p==null?void 0:p.headers)==null?void 0:y.get("Retry-After");if(A!=null&&A.match(/\d/))return Number.parseInt(A,10)*1e3}return~~(1<<E)*b},retryCount:_,shouldRetry:({error:E})=>c(E)}),{enabled:v,id:P})}}function c(d){return"code"in d&&typeof d.code=="number"?d.code===-1||d.code===n.LimitExceededRpcError.code||d.code===n.InternalRpcError.code:d instanceof r.HttpRequestError&&d.status?d.status===403||d.status===408||d.status===413||d.status===429||d.status===500||d.status===502||d.status===503||d.status===504:!0}return io}var is={},Em;function Vp(){if(Em)return is;Em=1,Object.defineProperty(is,"__esModule",{value:!0}),is.ripemd160=i;const e=bp(),r=Ge(),n=_e(),t=te();function i(s,o){const a=o||"hex",c=(0,e.ripemd160)((0,r.isHex)(s,{strict:!1})?(0,n.toBytes)(s):s);return a==="bytes"?c:(0,t.toHex)(c)}return is}var gd={},jm;function Wp(){return jm||(jm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toEventHash=void 0;var r=yu();Object.defineProperty(e,"toEventHash",{enumerable:!0,get:function(){return r.toSignatureHash}})}(gd)),gd}var _d={},wm;function Kp(){return wm||(wm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toEventSignature=void 0;var r=Rd();Object.defineProperty(e,"toEventSignature",{enumerable:!0,get:function(){return r.toSignature}})}(_d)),_d}var vd={},Pm;function Zp(){return Pm||(Pm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toFunctionHash=void 0;var r=yu();Object.defineProperty(e,"toFunctionHash",{enumerable:!0,get:function(){return r.toSignatureHash}})}(vd)),vd}var Ed={},Am;function Yp(){return Am||(Am=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toFunctionSignature=void 0;var r=Rd();Object.defineProperty(e,"toFunctionSignature",{enumerable:!0,get:function(){return r.toSignature}})}(Ed)),Ed}var Ar={},Tm;function Jp(){if(Tm)return Ar;Tm=1,Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.nonceManager=void 0,Ar.createNonceManager=n,Ar.jsonRpc=t;const e=Au(),r=Or();function n(i){const{source:s}=i,o=new Map,a=new r.LruMap(8192),c=new Map,d=({address:l,chainId:f})=>`${l}.${f}`;return{async consume({address:l,chainId:f,client:m}){const v=d({address:l,chainId:f}),h=this.get({address:l,chainId:f,client:m});this.increment({address:l,chainId:f});const b=await h;return await s.set({address:l,chainId:f},b),a.set(v,b),b},async increment({address:l,chainId:f}){const m=d({address:l,chainId:f}),v=o.get(m)??0;o.set(m,v+1)},async get({address:l,chainId:f,client:m}){const v=d({address:l,chainId:f});let h=c.get(v);return h||(h=(async()=>{try{const _=await s.get({address:l,chainId:f,client:m}),j=a.get(v)??0;return j>0&&_<=j?j+1:(a.delete(v),_)}finally{this.reset({address:l,chainId:f})}})(),c.set(v,h)),(o.get(v)??0)+await h},reset({address:l,chainId:f}){const m=d({address:l,chainId:f});o.delete(m),c.delete(m)}}}function t(){return{async get(i){const{address:s,client:o}=i;return(0,e.getTransactionCount)(o,{address:s,blockTag:"pending"})},set(){}}}return Ar.nonceManager=n({source:t()}),Ar}var tn={},as={},ss={},Im;function bf(){if(Im)return ss;Im=1,Object.defineProperty(ss,"__esModule",{value:!0}),ss.withTimeout=e;function e(r,{errorInstance:n=new Error("timed out"),timeout:t,signal:i}){return new Promise((s,o)=>{(async()=>{let a;try{const c=new AbortController;t>0&&(a=setTimeout(()=>{i?c.abort():o(n)},t)),s(await r({signal:(c==null?void 0:c.signal)||null}))}catch(c){(c==null?void 0:c.name)==="AbortError"&&o(n),o(c)}finally{clearTimeout(a)}})()})}return ss}var ao={},Sm;function Xp(){if(Sm)return ao;Sm=1,Object.defineProperty(ao,"__esModule",{value:!0}),ao.idCache=void 0;function e(){return{current:0,take(){return this.current++},reset(){this.current=0}}}return ao.idCache=e(),ao}var Bm;function mf(){if(Bm)return as;Bm=1,Object.defineProperty(as,"__esModule",{value:!0}),as.getHttpRpcClient=i;const e=jt(),r=bf(),n=ke(),t=Xp();function i(s,o={}){return{async request(a){var j;const{body:c,fetchFn:d=o.fetchFn??fetch,onRequest:l=o.onRequest,onResponse:f=o.onResponse,timeout:m=o.timeout??1e4}=a,v={...o.fetchOptions??{},...a.fetchOptions??{}},{headers:h,method:b,signal:_}=v;try{const g=await(0,r.withTimeout)(async({signal:u})=>{const E={...v,body:Array.isArray(c)?(0,n.stringify)(c.map(w=>({jsonrpc:"2.0",id:w.id??t.idCache.take(),...w}))):(0,n.stringify)({jsonrpc:"2.0",id:c.id??t.idCache.take(),...c}),headers:{"Content-Type":"application/json",...h},method:b||"POST",signal:_||(m>0?u:null)},p=new Request(s,E),y=await(l==null?void 0:l(p,E))??{...E,url:s};return await d(y.url??s,y)},{errorInstance:new e.TimeoutError({body:c,url:s}),timeout:m,signal:!0});f&&await f(g);let P;if((j=g.headers.get("Content-Type"))!=null&&j.startsWith("application/json"))P=await g.json();else{P=await g.text();try{P=JSON.parse(P||"{}")}catch(u){if(g.ok)throw u;P={error:P}}}if(!g.ok)throw new e.HttpRequestError({body:c,details:(0,n.stringify)(P.error)||g.statusText,headers:g.headers,status:g.status,url:s});return P}catch(g){throw g instanceof e.HttpRequestError||g instanceof e.TimeoutError?g:new e.HttpRequestError({body:c,cause:g,url:s})}}}}return as}var cs={},jd={},Rm;function Qp(){return Rm||(Rm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.socketClientCache=void 0,e.getSocketRpcClient=s;const r=jt(),n=Nd(),t=bf(),i=Xp();e.socketClientCache=new Map;async function s(o){const{getSocket:a,keepAlive:c=!0,key:d="socket",reconnect:l=!0,url:f}=o,{interval:m=3e4}=typeof c=="object"?c:{},{attempts:v=5,delay:h=2e3}=typeof l=="object"?l:{},b=JSON.stringify({keepAlive:c,key:d,url:f,reconnect:l});let _=e.socketClientCache.get(b);if(_)return _;let j=0;const{schedule:g}=(0,n.createBatchScheduler)({id:b,fn:async()=>{const E=new Map,p=new Map;let y,A,w,T=!1;function O(){if(l&&j<v){if(T)return;T=!0,j++,A==null||A.close(),setTimeout(async()=>{await B().catch(console.error),T=!1},h)}else E.clear(),p.clear()}async function B(){const S=await a({onClose(){var x,k;for(const C of E.values())(x=C.onError)==null||x.call(C,new r.SocketClosedError({url:f}));for(const C of p.values())(k=C.onError)==null||k.call(C,new r.SocketClosedError({url:f}));O()},onError(x){var k,C;y=x;for(const I of E.values())(k=I.onError)==null||k.call(I,y);for(const I of p.values())(C=I.onError)==null||C.call(I,y);O()},onOpen(){y=void 0,j=0},onResponse(x){const k=x.method==="eth_subscription",C=k?x.params.subscription:x.id,I=k?p:E,F=I.get(C);F&&F.onResponse(x),k||I.delete(C)}});if(A=S,c&&(w&&clearInterval(w),w=setInterval(()=>{var x;return(x=A.ping)==null?void 0:x.call(A)},m)),l&&p.size>0){const x=p.entries();for(const[k,{onResponse:C,body:I,onError:F}]of x)I&&(p.delete(k),_==null||_.request({body:I,onResponse:C,onError:F}))}return S}return await B(),y=void 0,_={close(){w&&clearInterval(w),A.close(),e.socketClientCache.delete(b)},get socket(){return A},request({body:S,onError:x,onResponse:k}){var F;y&&x&&x(y);const C=S.id??i.idCache.take(),I=R=>{typeof R.id=="number"&&C!==R.id||(S.method==="eth_subscribe"&&typeof R.result=="string"&&p.set(R.result,{onResponse:I,onError:x,body:S}),k(R))};S.method==="eth_unsubscribe"&&p.delete((F=S.params)==null?void 0:F[0]),E.set(C,{onResponse:I,onError:x});try{A.request({body:{jsonrpc:"2.0",id:C,...S}})}catch(R){x==null||x(R)}},requestAsync({body:S,timeout:x=1e4}){return(0,t.withTimeout)(()=>new Promise((k,C)=>this.request({body:S,onError:C,onResponse:k})),{errorInstance:new r.TimeoutError({body:S,url:f}),timeout:x})},requests:E,subscriptions:p,url:f},e.socketClientCache.set(b,_),[_]}}),[P,[u]]=await g();return u}}(jd)),jd}function sv(){if(typeof WebSocket<"u")return WebSocket;if(typeof Cf.WebSocket<"u")return Cf.WebSocket;if(typeof window.WebSocket<"u")return window.WebSocket;if(typeof self.WebSocket<"u")return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}const cv=sv(),uv=Object.freeze(Object.defineProperty({__proto__:null,WebSocket:cv},Symbol.toStringTag,{value:"Module"})),dv=u_(uv);var Om;function yf(){if(Om)return cs;Om=1,Object.defineProperty(cs,"__esModule",{value:!0}),cs.getWebSocketRpcClient=n;const e=jt(),r=Qp();async function n(t,i={}){const{keepAlive:s,reconnect:o}=i;return(0,r.getSocketRpcClient)({async getSocket({onClose:a,onError:c,onOpen:d,onResponse:l}){const f=await Promise.resolve().then(()=>dv).then(_=>_.WebSocket),m=new f(t);function v(){m.removeEventListener("close",v),m.removeEventListener("message",h),m.removeEventListener("error",c),m.removeEventListener("open",d),a()}function h({data:_}){if(!(typeof _=="string"&&_.trim().length===0))try{const j=JSON.parse(_);l(j)}catch(j){c(j)}}m.addEventListener("close",v),m.addEventListener("message",h),m.addEventListener("error",c),m.addEventListener("open",d),m.readyState===f.CONNECTING&&await new Promise((_,j)=>{m&&(m.onopen=_,m.onerror=j)});const{close:b}=m;return Object.assign(m,{close(){b.bind(m)(),v()},ping(){try{if(m.readyState===m.CLOSED||m.readyState===m.CLOSING)throw new e.WebSocketRequestError({url:m.url,cause:new e.SocketClosedError({url:m.url})});const _={jsonrpc:"2.0",id:null,method:"net_version",params:[]};m.send(JSON.stringify(_))}catch(_){c(_)}},request({body:_}){if(m.readyState===m.CLOSED||m.readyState===m.CLOSING)throw new e.WebSocketRequestError({body:_,url:m.url,cause:new e.SocketClosedError({url:m.url})});return m.send(JSON.stringify(_))}})},keepAlive:s,reconnect:o,url:t})}return cs}var xm;function eg(){if(xm)return tn;xm=1,Object.defineProperty(tn,"__esModule",{value:!0}),tn.rpc=void 0,tn.getSocket=i;const e=mf(),r=yf();function n(s,{body:o,onError:a,onResponse:c}){return s.request({body:o,onError:a,onResponse:c}),s}async function t(s,{body:o,timeout:a=1e4}){return s.requestAsync({body:o,timeout:a})}async function i(s){const o=await(0,r.getWebSocketRpcClient)(s);return Object.assign(o.socket,{requests:o.requests,subscriptions:o.subscriptions})}return tn.rpc={http(s,o){return(0,e.getHttpRpcClient)(s).request(o)},webSocket:n,webSocketAsync:t},tn}var us={},ds={},so={},Cm;function tg(){return Cm||(Cm=1,Object.defineProperty(so,"__esModule",{value:!0}),so.presignMessagePrefix=void 0,so.presignMessagePrefix=`Ethereum Signed Message:
|
|
46
|
+
`),so}var qm;function rg(){if(qm)return ds;qm=1,Object.defineProperty(ds,"__esModule",{value:!0}),ds.toPrefixedMessage=i;const e=tg(),r=Me(),n=Ye(),t=te();function i(s){const o=(()=>typeof s=="string"?(0,t.stringToHex)(s):typeof s.raw=="string"?s.raw:(0,t.bytesToHex)(s.raw))(),a=(0,t.stringToHex)(`${e.presignMessagePrefix}${(0,n.size)(o)}`);return(0,r.concat)([a,o])}return ds}var Mm;function Co(){if(Mm)return us;Mm=1,Object.defineProperty(us,"__esModule",{value:!0}),us.hashMessage=n;const e=Xe(),r=rg();function n(t,i){return(0,e.keccak256)((0,r.toPrefixedMessage)(t),i)}return us}var Tr={},Ir={},zt={},Hm;function ng(){if(Hm)return zt;Hm=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.InvalidStructTypeError=zt.InvalidPrimaryTypeError=zt.InvalidDomainError=void 0;const e=ke(),r=ue();class n extends r.BaseError{constructor({domain:o}){super(`Invalid domain "${(0,e.stringify)(o)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}zt.InvalidDomainError=n;class t extends r.BaseError{constructor({primaryType:o,types:a}){super(`Invalid primary type \`${o}\` must be one of \`${JSON.stringify(Object.keys(a))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}zt.InvalidPrimaryTypeError=t;class i extends r.BaseError{constructor({type:o}){super(`Struct type "${o}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}return zt.InvalidStructTypeError=i,zt}var Fm;function Ou(){if(Fm)return Ir;Fm=1,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.serializeTypedData=d,Ir.validateTypedData=l,Ir.getTypesForEIP712Domain=f,Ir.domainSeparator=m;const e=Te(),r=vt(),n=ng(),t=Qe(),i=Ye(),s=te(),o=hu(),a=qo(),c=ke();function d(h){const{domain:b,message:_,primaryType:j,types:g}=h,P=(p,y)=>{const A={...y};for(const w of p){const{name:T,type:O}=w;O==="address"&&(A[T]=A[T].toLowerCase())}return A},u=(()=>g.EIP712Domain?b?P(g.EIP712Domain,b):{}:{})(),E=(()=>{if(j!=="EIP712Domain")return P(g[j],_)})();return(0,c.stringify)({domain:u,message:E,primaryType:j,types:g})}function l(h){const{domain:b,message:_,primaryType:j,types:g}=h,P=(u,E)=>{for(const p of u){const{name:y,type:A}=p,w=E[y],T=A.match(o.integerRegex);if(T&&(typeof w=="number"||typeof w=="bigint")){const[S,x,k]=T;(0,s.numberToHex)(w,{signed:x==="int",size:Number.parseInt(k,10)/8})}if(A==="address"&&typeof w=="string"&&!(0,t.isAddress)(w))throw new r.InvalidAddressError({address:w});const O=A.match(o.bytesRegex);if(O){const[S,x]=O;if(x&&(0,i.size)(w)!==Number.parseInt(x,10))throw new e.BytesSizeMismatchError({expectedSize:Number.parseInt(x,10),givenSize:(0,i.size)(w)})}const B=g[A];B&&(v(A),P(B,w))}};if(g.EIP712Domain&&b){if(typeof b!="object")throw new n.InvalidDomainError({domain:b});P(g.EIP712Domain,b)}if(j!=="EIP712Domain")if(g[j])P(g[j],_);else throw new n.InvalidPrimaryTypeError({primaryType:j,types:g})}function f({domain:h}){return[typeof(h==null?void 0:h.name)=="string"&&{name:"name",type:"string"},(h==null?void 0:h.version)&&{name:"version",type:"string"},(typeof(h==null?void 0:h.chainId)=="number"||typeof(h==null?void 0:h.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(h==null?void 0:h.verifyingContract)&&{name:"verifyingContract",type:"address"},(h==null?void 0:h.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function m({domain:h}){return(0,a.hashDomain)({domain:h,types:{EIP712Domain:f({domain:h})}})}function v(h){if(h==="address"||h==="bool"||h==="string"||h.startsWith("bytes")||h.startsWith("uint")||h.startsWith("int"))throw new n.InvalidStructTypeError({type:h})}return Ir}var km;function qo(){if(km)return Tr;km=1,Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.hashTypedData=s,Tr.hashDomain=o,Tr.hashStruct=a,Tr.encodeType=l;const e=Et(),r=Me(),n=te(),t=Xe(),i=Ou();function s(v){const{domain:h={},message:b,primaryType:_}=v,j={EIP712Domain:(0,i.getTypesForEIP712Domain)({domain:h}),...v.types};(0,i.validateTypedData)({domain:h,message:b,primaryType:_,types:j});const g=["0x1901"];return h&&g.push(o({domain:h,types:j})),_!=="EIP712Domain"&&g.push(a({data:b,primaryType:_,types:j})),(0,t.keccak256)((0,r.concat)(g))}function o({domain:v,types:h}){return a({data:v,primaryType:"EIP712Domain",types:h})}function a({data:v,primaryType:h,types:b}){const _=c({data:v,primaryType:h,types:b});return(0,t.keccak256)(_)}function c({data:v,primaryType:h,types:b}){const _=[{type:"bytes32"}],j=[d({primaryType:h,types:b})];for(const g of b[h]){const[P,u]=m({types:b,name:g.name,type:g.type,value:v[g.name]});_.push(P),j.push(u)}return(0,e.encodeAbiParameters)(_,j)}function d({primaryType:v,types:h}){const b=(0,n.toHex)(l({primaryType:v,types:h}));return(0,t.keccak256)(b)}function l({primaryType:v,types:h}){let b="";const _=f({primaryType:v,types:h});_.delete(v);const j=[v,...Array.from(_).sort()];for(const g of j)b+=`${g}(${h[g].map(({name:P,type:u})=>`${u} ${P}`).join(",")})`;return b}function f({primaryType:v,types:h},b=new Set){const _=v.match(/^\w*/u),j=_==null?void 0:_[0];if(b.has(j)||h[j]===void 0)return b;b.add(j);for(const g of h[j])f({primaryType:g.type,types:h},b);return b}function m({types:v,name:h,type:b,value:_}){if(v[b]!==void 0)return[{type:"bytes32"},(0,t.keccak256)(c({data:_,primaryType:b,types:v}))];if(b==="bytes")return[{type:"bytes32"},(0,t.keccak256)(_)];if(b==="string")return[{type:"bytes32"},(0,t.keccak256)((0,n.toHex)(_))];if(b.lastIndexOf("]")===b.length-1){const j=b.slice(0,b.lastIndexOf("[")),g=_.map(P=>m({name:h,type:j,types:v,value:P}));return[{type:"bytes32"},(0,t.keccak256)((0,e.encodeAbiParameters)(g.map(([P])=>P),g.map(([,P])=>P)))]}return[{type:b},_]}return Tr}var fs={},Sr={},Nm;function hf(){return Nm||(Nm=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.zeroHash=Sr.erc6492MagicBytes=void 0,Sr.erc6492MagicBytes="0x6492649264926492649264926492649264926492649264926492649264926492",Sr.zeroHash="0x0000000000000000000000000000000000000000000000000000000000000000"),Sr}var $m;function pf(){if($m)return fs;$m=1,Object.defineProperty(fs,"__esModule",{value:!0}),fs.isErc6492Signature=n;const e=hf(),r=ft();function n(t){return(0,r.sliceHex)(t,-32)===e.erc6492MagicBytes}return fs}var ls={},zm;function gf(){if(zm)return ls;zm=1,Object.defineProperty(ls,"__esModule",{value:!0}),ls.isErc8010Signature=r;const e=Eu();function r(n){return e.SignatureErc8010.validate(n)}return ls}var bs={},Um;function og(){if(Um)return bs;Um=1,Object.defineProperty(bs,"__esModule",{value:!0}),bs.parseErc6492Signature=n;const e=ar(),r=pf();function n(t){if(!(0,r.isErc6492Signature)(t))return{signature:t};const[i,s,o]=(0,e.decodeAbiParameters)([{type:"address"},{type:"bytes"},{type:"bytes"}],t);return{address:i,data:s,signature:o}}return bs}var ms={},Lm;function ig(){if(Lm)return ms;Lm=1,Object.defineProperty(ms,"__esModule",{value:!0}),ms.parseErc8010Signature=t;const e=Eu(),r=te(),n=gf();function t(i){if(!(0,n.isErc8010Signature)(i))return{signature:i};const{authorization:s,to:o,...a}=e.SignatureErc8010.unwrap(i);return{authorization:{address:s.address,chainId:s.chainId,nonce:Number(s.nonce),r:(0,r.numberToHex)(s.r,{size:32}),s:(0,r.numberToHex)(s.s,{size:32}),yParity:s.yParity},...o?{address:o}:{},...a}}return ms}var ys={},Dm;function _f(){if(Dm)return ys;Dm=1,Object.defineProperty(ys,"__esModule",{value:!0}),ys.recoverMessageAddress=n;const e=Co(),r=fr();async function n({message:t,signature:i}){return(0,r.recoverAddress)({hash:(0,e.hashMessage)(t),signature:i})}return ys}var hs={},Gm;function vf(){if(Gm)return hs;Gm=1,Object.defineProperty(hs,"__esModule",{value:!0}),hs.recoverTypedDataAddress=n;const e=qo(),r=fr();async function n(t){const{domain:i,message:s,primaryType:o,signature:a,types:c}=t;return(0,r.recoverAddress)({hash:(0,e.hashTypedData)({domain:i,message:s,primaryType:o,types:c}),signature:a})}return hs}var ps={},Vm;function ag(){if(Vm)return ps;Vm=1,Object.defineProperty(ps,"__esModule",{value:!0}),ps.serializeErc6492Signature=i;const e=hf(),r=Et(),n=Me(),t=_e();function i(s){const{address:o,data:a,signature:c,to:d="hex"}=s,l=(0,n.concatHex)([(0,r.encodeAbiParameters)([{type:"address"},{type:"bytes"},{type:"bytes"}],[o,a,c]),e.erc6492MagicBytes]);return d==="hex"?l:(0,t.hexToBytes)(l)}return ps}var gs={},Wm;function sg(){if(Wm)return gs;Wm=1,Object.defineProperty(gs,"__esModule",{value:!0}),gs.serializeErc8010Signature=n;const e=Eu(),r=_e();function n(t){const{address:i,data:s,signature:o,to:a="hex"}=t,c=e.SignatureErc8010.wrap({authorization:{address:t.authorization.address,chainId:t.authorization.chainId,nonce:BigInt(t.authorization.nonce),r:BigInt(t.authorization.r),s:BigInt(t.authorization.s),yParity:t.authorization.yParity},data:s,signature:o,to:i});return a==="hex"?c:(0,r.hexToBytes)(c)}return gs}var _s={},Km;function cg(){if(Km)return _s;Km=1,Object.defineProperty(_s,"__esModule",{value:!0}),_s.verifyHash=t;const e=at(),r=Pt(),n=fr();async function t({address:i,hash:s,signature:o}){return(0,r.isAddressEqual)((0,e.getAddress)(i),await(0,n.recoverAddress)({hash:s,signature:o}))}return _s}var vs={},Zm;function ug(){if(Zm)return vs;Zm=1,Object.defineProperty(vs,"__esModule",{value:!0}),vs.verifyMessage=t;const e=at(),r=Pt(),n=_f();async function t({address:i,message:s,signature:o}){return(0,r.isAddressEqual)((0,e.getAddress)(i),await(0,n.recoverMessageAddress)({message:s,signature:o}))}return vs}var Es={},Ym;function dg(){if(Ym)return Es;Ym=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.verifyTypedData=t;const e=at(),r=Pt(),n=vf();async function t(i){const{address:s,domain:o,message:a,primaryType:c,signature:d,types:l}=i;return(0,r.isAddressEqual)((0,e.getAddress)(s),await(0,n.recoverTypedDataAddress)({domain:o,message:a,primaryType:c,signature:d,types:l}))}return Es}var js={},ws={},co={},Jm;function fg(){if(Jm)return co;Jm=1,Object.defineProperty(co,"__esModule",{value:!0}),co.InvalidDecimalNumberError=void 0;const e=ue();class r extends e.BaseError{constructor({value:t}){super(`Number \`${t}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}return co.InvalidDecimalNumberError=r,co}var Xm;function xu(){if(Xm)return ws;Xm=1,Object.defineProperty(ws,"__esModule",{value:!0}),ws.parseUnits=r;const e=fg();function r(n,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(n))throw new e.InvalidDecimalNumberError({value:n});let[i,s="0"]=n.split(".");const o=i.startsWith("-");if(o&&(i=i.slice(1)),s=s.replace(/(0+)$/,""),t===0)Math.round(+`.${s}`)===1&&(i=`${BigInt(i)+1n}`),s="";else if(s.length>t){const[a,c,d]=[s.slice(0,t-1),s.slice(t-1,t),s.slice(t)],l=Math.round(+`${c}.${d}`);l>9?s=`${BigInt(a)+BigInt(1)}0`.padStart(a.length+1,"0"):s=`${a}${l}`,s.length>t&&(s=s.slice(1),i=`${BigInt(i)+1n}`),s=s.slice(0,t)}else s=s.padEnd(t,"0");return BigInt(`${o?"-":""}${i}${s}`)}return ws}var Qm;function lg(){if(Qm)return js;Qm=1,Object.defineProperty(js,"__esModule",{value:!0}),js.parseEther=n;const e=po(),r=xu();function n(t,i="wei"){return(0,r.parseUnits)(t,e.etherUnits[i])}return js}var Ps={},ey;function bg(){if(ey)return Ps;ey=1,Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.parseGwei=n;const e=po(),r=xu();function n(t,i="wei"){return(0,r.parseUnits)(t,e.gweiUnits[i])}return Ps}var ty;function Ef(){return ty||(ty=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.padBytes=e.pad=e.isHex=e.isBytes=e.concatHex=e.concatBytes=e.concat=e.getChainContractAddress=e.extractChain=e.defineChain=e.assertCurrentChain=e.offchainLookupSignature=e.offchainLookupAbiItem=e.offchainLookup=e.ccipFetch=e.ccipRequest=e.buildRequest=e.verifyAuthorization=e.serializeAuthorizationList=e.recoverAuthorizationAddress=e.hashAuthorization=e.isAddressEqual=e.isAddress=e.getCreateAddress=e.getCreate2Address=e.getContractAddress=e.getAddress=e.parseEventLogs=e.getAbiItem=e.formatAbiItemWithArgs=e.formatAbiParams=e.formatAbiItem=e.encodePacked=e.encodeFunctionResult=e.encodeFunctionData=e.encodeEventTopics=e.encodeErrorResult=e.encodeDeployData=e.encodeAbiParameters=e.decodeFunctionResult=e.decodeFunctionData=e.decodeEventLog=e.decodeErrorResult=e.decodeAbiParameters=e.publicKeyToAddress=e.parseAccount=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=void 0,e.ripemd160=e.keccak256=e.isHash=e.getAction=e.formatTransactionRequest=e.defineTransactionRequest=e.defineTransactionReceipt=e.transactionType=e.formatTransaction=e.defineTransaction=e.formatLog=e.defineFormatter=e.extract=e.formatBlock=e.defineBlock=e.getTransactionError=e.getNodeError=e.containsNodeError=e.getEstimateGasError=e.getContractError=e.getCallError=e.toRlp=e.toHex=e.stringToHex=e.numberToHex=e.bytesToHex=e.boolToHex=e.toBytes=e.stringToBytes=e.numberToBytes=e.hexToBytes=e.boolToBytes=e.fromRlp=e.hexToString=e.hexToNumber=e.hexToBool=e.hexToBigInt=e.fromHex=e.fromBytes=e.bytesToString=e.bytesToNumber=e.bytesToBool=e.bytesToBigint=e.bytesToBigInt=e.trim=e.sliceHex=e.sliceBytes=e.slice=e.size=e.padHex=void 0,e.validateTypedData=e.serializeTypedData=e.serializeTransaction=e.serializeAccessList=e.parseTransaction=e.getTransactionType=e.getSerializedTransactionType=e.assertTransactionLegacy=e.assertTransactionEIP2930=e.assertTransactionEIP1559=e.assertRequest=e.stringify=e.verifyTypedData=e.verifyMessage=e.verifyHash=e.serializeErc8010Signature=e.serializeErc6492Signature=e.recoverTypedDataAddress=e.recoverPublicKey=e.recoverMessageAddress=e.recoverAddress=e.parseErc8010Signature=e.parseErc6492Signature=e.isErc8010Signature=e.isErc6492Signature=e.hashTypedData=e.hashStruct=e.hashMessage=e.getWebSocketRpcClient=e.socketClientCache=e.getSocketRpcClient=e.getHttpRpcClient=e.rpc=e.getSocket=e.integerRegex=e.bytesRegex=e.arrayRegex=e.nonceManager=e.createNonceManager=e.getFunctionSignature=e.toFunctionSignature=e.getFunctionSelector=e.toFunctionSelector=e.toFunctionHash=e.getEventSignature=e.toEventSignature=e.getEventSelector=e.toEventSelector=e.toEventHash=e.sha256=void 0,e.parseUnits=e.parseGwei=e.parseEther=e.formatUnits=e.formatGwei=e.formatEther=void 0;var r=tr();Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return r.parseAbi}}),Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return r.parseAbiItem}}),Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return r.parseAbiParameter}}),Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return r.parseAbiParameters}});var n=Ae();Object.defineProperty(e,"parseAccount",{enumerable:!0,get:function(){return n.parseAccount}});var t=vp();Object.defineProperty(e,"publicKeyToAddress",{enumerable:!0,get:function(){return t.publicKeyToAddress}});var i=ar();Object.defineProperty(e,"decodeAbiParameters",{enumerable:!0,get:function(){return i.decodeAbiParameters}});var s=pu();Object.defineProperty(e,"decodeErrorResult",{enumerable:!0,get:function(){return s.decodeErrorResult}});var o=Ro();Object.defineProperty(e,"decodeEventLog",{enumerable:!0,get:function(){return o.decodeEventLog}});var a=zd();Object.defineProperty(e,"decodeFunctionData",{enumerable:!0,get:function(){return a.decodeFunctionData}});var c=Wt();Object.defineProperty(e,"decodeFunctionResult",{enumerable:!0,get:function(){return c.decodeFunctionResult}});var d=Et();Object.defineProperty(e,"encodeAbiParameters",{enumerable:!0,get:function(){return d.encodeAbiParameters}});var l=Po();Object.defineProperty(e,"encodeDeployData",{enumerable:!0,get:function(){return l.encodeDeployData}});var f=Ud();Object.defineProperty(e,"encodeErrorResult",{enumerable:!0,get:function(){return f.encodeErrorResult}});var m=Mr();Object.defineProperty(e,"encodeEventTopics",{enumerable:!0,get:function(){return m.encodeEventTopics}});var v=et();Object.defineProperty(e,"encodeFunctionData",{enumerable:!0,get:function(){return v.encodeFunctionData}});var h=Ld();Object.defineProperty(e,"encodeFunctionResult",{enumerable:!0,get:function(){return h.encodeFunctionResult}});var b=Lp();Object.defineProperty(e,"encodePacked",{enumerable:!0,get:function(){return b.encodePacked}});var _=Gt();Object.defineProperty(e,"formatAbiItem",{enumerable:!0,get:function(){return _.formatAbiItem}}),Object.defineProperty(e,"formatAbiParams",{enumerable:!0,get:function(){return _.formatAbiParams}});var j=dp();Object.defineProperty(e,"formatAbiItemWithArgs",{enumerable:!0,get:function(){return j.formatAbiItemWithArgs}});var g=Vt();Object.defineProperty(e,"getAbiItem",{enumerable:!0,get:function(){return g.getAbiItem}});var P=Oo();Object.defineProperty(e,"parseEventLogs",{enumerable:!0,get:function(){return P.parseEventLogs}});var u=at();Object.defineProperty(e,"getAddress",{enumerable:!0,get:function(){return u.getAddress}});var E=Dp();Object.defineProperty(e,"getContractAddress",{enumerable:!0,get:function(){return E.getContractAddress}}),Object.defineProperty(e,"getCreate2Address",{enumerable:!0,get:function(){return E.getCreate2Address}}),Object.defineProperty(e,"getCreateAddress",{enumerable:!0,get:function(){return E.getCreateAddress}});var p=Qe();Object.defineProperty(e,"isAddress",{enumerable:!0,get:function(){return p.isAddress}});var y=Pt();Object.defineProperty(e,"isAddressEqual",{enumerable:!0,get:function(){return y.isAddressEqual}});var A=Ep();Object.defineProperty(e,"hashAuthorization",{enumerable:!0,get:function(){return A.hashAuthorization}});var w=Ao();Object.defineProperty(e,"recoverAuthorizationAddress",{enumerable:!0,get:function(){return w.recoverAuthorizationAddress}});var T=ep();Object.defineProperty(e,"serializeAuthorizationList",{enumerable:!0,get:function(){return T.serializeAuthorizationList}});var O=jp();Object.defineProperty(e,"verifyAuthorization",{enumerable:!0,get:function(){return O.verifyAuthorization}});var B=Gp();Object.defineProperty(e,"buildRequest",{enumerable:!0,get:function(){return B.buildRequest}});var S=Dd();Object.defineProperty(e,"ccipRequest",{enumerable:!0,get:function(){return S.ccipRequest}}),Object.defineProperty(e,"ccipFetch",{enumerable:!0,get:function(){return S.ccipRequest}}),Object.defineProperty(e,"offchainLookup",{enumerable:!0,get:function(){return S.offchainLookup}}),Object.defineProperty(e,"offchainLookupAbiItem",{enumerable:!0,get:function(){return S.offchainLookupAbiItem}}),Object.defineProperty(e,"offchainLookupSignature",{enumerable:!0,get:function(){return S.offchainLookupSignature}});var x=vo();Object.defineProperty(e,"assertCurrentChain",{enumerable:!0,get:function(){return x.assertCurrentChain}});var k=Xh();Object.defineProperty(e,"defineChain",{enumerable:!0,get:function(){return k.defineChain}});var C=up();Object.defineProperty(e,"extractChain",{enumerable:!0,get:function(){return C.extractChain}});var I=or();Object.defineProperty(e,"getChainContractAddress",{enumerable:!0,get:function(){return I.getChainContractAddress}});var F=Me();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return F.concat}}),Object.defineProperty(e,"concatBytes",{enumerable:!0,get:function(){return F.concatBytes}}),Object.defineProperty(e,"concatHex",{enumerable:!0,get:function(){return F.concatHex}});var R=lf();Object.defineProperty(e,"isBytes",{enumerable:!0,get:function(){return R.isBytes}});var q=Ge();Object.defineProperty(e,"isHex",{enumerable:!0,get:function(){return q.isHex}});var M=rr();Object.defineProperty(e,"pad",{enumerable:!0,get:function(){return M.pad}}),Object.defineProperty(e,"padBytes",{enumerable:!0,get:function(){return M.padBytes}}),Object.defineProperty(e,"padHex",{enumerable:!0,get:function(){return M.padHex}});var H=Ye();Object.defineProperty(e,"size",{enumerable:!0,get:function(){return H.size}});var N=ft();Object.defineProperty(e,"slice",{enumerable:!0,get:function(){return N.slice}}),Object.defineProperty(e,"sliceBytes",{enumerable:!0,get:function(){return N.sliceBytes}}),Object.defineProperty(e,"sliceHex",{enumerable:!0,get:function(){return N.sliceHex}});var z=Ut();Object.defineProperty(e,"trim",{enumerable:!0,get:function(){return z.trim}});var $=Od();Object.defineProperty(e,"bytesToBigInt",{enumerable:!0,get:function(){return $.bytesToBigInt}}),Object.defineProperty(e,"bytesToBigint",{enumerable:!0,get:function(){return $.bytesToBigInt}}),Object.defineProperty(e,"bytesToBool",{enumerable:!0,get:function(){return $.bytesToBool}}),Object.defineProperty(e,"bytesToNumber",{enumerable:!0,get:function(){return $.bytesToNumber}}),Object.defineProperty(e,"bytesToString",{enumerable:!0,get:function(){return $.bytesToString}}),Object.defineProperty(e,"fromBytes",{enumerable:!0,get:function(){return $.fromBytes}});var U=Be();Object.defineProperty(e,"fromHex",{enumerable:!0,get:function(){return U.fromHex}}),Object.defineProperty(e,"hexToBigInt",{enumerable:!0,get:function(){return U.hexToBigInt}}),Object.defineProperty(e,"hexToBool",{enumerable:!0,get:function(){return U.hexToBool}}),Object.defineProperty(e,"hexToNumber",{enumerable:!0,get:function(){return U.hexToNumber}}),Object.defineProperty(e,"hexToString",{enumerable:!0,get:function(){return U.hexToString}});var G=Gd();Object.defineProperty(e,"fromRlp",{enumerable:!0,get:function(){return G.fromRlp}});var K=_e();Object.defineProperty(e,"boolToBytes",{enumerable:!0,get:function(){return K.boolToBytes}}),Object.defineProperty(e,"hexToBytes",{enumerable:!0,get:function(){return K.hexToBytes}}),Object.defineProperty(e,"numberToBytes",{enumerable:!0,get:function(){return K.numberToBytes}}),Object.defineProperty(e,"stringToBytes",{enumerable:!0,get:function(){return K.stringToBytes}}),Object.defineProperty(e,"toBytes",{enumerable:!0,get:function(){return K.toBytes}});var W=te();Object.defineProperty(e,"boolToHex",{enumerable:!0,get:function(){return W.boolToHex}}),Object.defineProperty(e,"bytesToHex",{enumerable:!0,get:function(){return W.bytesToHex}}),Object.defineProperty(e,"numberToHex",{enumerable:!0,get:function(){return W.numberToHex}}),Object.defineProperty(e,"stringToHex",{enumerable:!0,get:function(){return W.stringToHex}}),Object.defineProperty(e,"toHex",{enumerable:!0,get:function(){return W.toHex}});var V=ho();Object.defineProperty(e,"toRlp",{enumerable:!0,get:function(){return V.toRlp}});var J=qd();Object.defineProperty(e,"getCallError",{enumerable:!0,get:function(){return J.getCallError}});var oe=lr();Object.defineProperty(e,"getContractError",{enumerable:!0,get:function(){return oe.getContractError}});var Y=Ip();Object.defineProperty(e,"getEstimateGasError",{enumerable:!0,get:function(){return Y.getEstimateGasError}});var X=Eo();Object.defineProperty(e,"containsNodeError",{enumerable:!0,get:function(){return X.containsNodeError}}),Object.defineProperty(e,"getNodeError",{enumerable:!0,get:function(){return X.getNodeError}});var ee=So();Object.defineProperty(e,"getTransactionError",{enumerable:!0,get:function(){return ee.getTransactionError}});var ie=su();Object.defineProperty(e,"defineBlock",{enumerable:!0,get:function(){return ie.defineBlock}}),Object.defineProperty(e,"formatBlock",{enumerable:!0,get:function(){return ie.formatBlock}});var re=ur();Object.defineProperty(e,"extract",{enumerable:!0,get:function(){return re.extract}});var se=bo();Object.defineProperty(e,"defineFormatter",{enumerable:!0,get:function(){return se.defineFormatter}});var de=Lt();Object.defineProperty(e,"formatLog",{enumerable:!0,get:function(){return de.formatLog}});var Q=un();Object.defineProperty(e,"defineTransaction",{enumerable:!0,get:function(){return Q.defineTransaction}}),Object.defineProperty(e,"formatTransaction",{enumerable:!0,get:function(){return Q.formatTransaction}}),Object.defineProperty(e,"transactionType",{enumerable:!0,get:function(){return Q.transactionType}});var Z=mo();Object.defineProperty(e,"defineTransactionReceipt",{enumerable:!0,get:function(){return Z.defineTransactionReceipt}});var Ce=_t();Object.defineProperty(e,"defineTransactionRequest",{enumerable:!0,get:function(){return Ce.defineTransactionRequest}}),Object.defineProperty(e,"formatTransactionRequest",{enumerable:!0,get:function(){return Ce.formatTransactionRequest}});var Ie=me();Object.defineProperty(e,"getAction",{enumerable:!0,get:function(){return Ie.getAction}});var xe=Vd();Object.defineProperty(e,"isHash",{enumerable:!0,get:function(){return xe.isHash}});var Re=Xe();Object.defineProperty(e,"keccak256",{enumerable:!0,get:function(){return Re.keccak256}});var He=Vp();Object.defineProperty(e,"ripemd160",{enumerable:!0,get:function(){return He.ripemd160}});var Ve=Ad();Object.defineProperty(e,"sha256",{enumerable:!0,get:function(){return Ve.sha256}});var lt=Wp();Object.defineProperty(e,"toEventHash",{enumerable:!0,get:function(){return lt.toEventHash}});var ct=dn();Object.defineProperty(e,"toEventSelector",{enumerable:!0,get:function(){return ct.toEventSelector}}),Object.defineProperty(e,"getEventSelector",{enumerable:!0,get:function(){return ct.toEventSelector}});var ut=Kp();Object.defineProperty(e,"toEventSignature",{enumerable:!0,get:function(){return ut.toEventSignature}}),Object.defineProperty(e,"getEventSignature",{enumerable:!0,get:function(){return ut.toEventSignature}});var We=Zp();Object.defineProperty(e,"toFunctionHash",{enumerable:!0,get:function(){return We.toFunctionHash}});var qe=xr();Object.defineProperty(e,"toFunctionSelector",{enumerable:!0,get:function(){return qe.toFunctionSelector}}),Object.defineProperty(e,"getFunctionSelector",{enumerable:!0,get:function(){return qe.toFunctionSelector}});var At=Yp();Object.defineProperty(e,"toFunctionSignature",{enumerable:!0,get:function(){return At.toFunctionSignature}}),Object.defineProperty(e,"getFunctionSignature",{enumerable:!0,get:function(){return At.toFunctionSignature}});var bt=Jp();Object.defineProperty(e,"createNonceManager",{enumerable:!0,get:function(){return bt.createNonceManager}}),Object.defineProperty(e,"nonceManager",{enumerable:!0,get:function(){return bt.nonceManager}});var ln=hu();Object.defineProperty(e,"arrayRegex",{enumerable:!0,get:function(){return ln.arrayRegex}}),Object.defineProperty(e,"bytesRegex",{enumerable:!0,get:function(){return ln.bytesRegex}}),Object.defineProperty(e,"integerRegex",{enumerable:!0,get:function(){return ln.integerRegex}});var Ho=eg();Object.defineProperty(e,"getSocket",{enumerable:!0,get:function(){return Ho.getSocket}}),Object.defineProperty(e,"rpc",{enumerable:!0,get:function(){return Ho.rpc}});var mr=mf();Object.defineProperty(e,"getHttpRpcClient",{enumerable:!0,get:function(){return mr.getHttpRpcClient}});var Fo=Qp();Object.defineProperty(e,"getSocketRpcClient",{enumerable:!0,get:function(){return Fo.getSocketRpcClient}}),Object.defineProperty(e,"socketClientCache",{enumerable:!0,get:function(){return Fo.socketClientCache}});var ko=yf();Object.defineProperty(e,"getWebSocketRpcClient",{enumerable:!0,get:function(){return ko.getWebSocketRpcClient}});var Cu=Co();Object.defineProperty(e,"hashMessage",{enumerable:!0,get:function(){return Cu.hashMessage}});var No=qo();Object.defineProperty(e,"hashStruct",{enumerable:!0,get:function(){return No.hashStruct}}),Object.defineProperty(e,"hashTypedData",{enumerable:!0,get:function(){return No.hashTypedData}});var bn=pf();Object.defineProperty(e,"isErc6492Signature",{enumerable:!0,get:function(){return bn.isErc6492Signature}});var qu=gf();Object.defineProperty(e,"isErc8010Signature",{enumerable:!0,get:function(){return qu.isErc8010Signature}});var Mu=og();Object.defineProperty(e,"parseErc6492Signature",{enumerable:!0,get:function(){return Mu.parseErc6492Signature}});var mn=ig();Object.defineProperty(e,"parseErc8010Signature",{enumerable:!0,get:function(){return mn.parseErc8010Signature}});var Hu=fr();Object.defineProperty(e,"recoverAddress",{enumerable:!0,get:function(){return Hu.recoverAddress}});var yn=_f();Object.defineProperty(e,"recoverMessageAddress",{enumerable:!0,get:function(){return yn.recoverMessageAddress}});var Fu=Fd();Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return Fu.recoverPublicKey}});var yr=vf();Object.defineProperty(e,"recoverTypedDataAddress",{enumerable:!0,get:function(){return yr.recoverTypedDataAddress}});var hr=ag();Object.defineProperty(e,"serializeErc6492Signature",{enumerable:!0,get:function(){return hr.serializeErc6492Signature}});var ku=sg();Object.defineProperty(e,"serializeErc8010Signature",{enumerable:!0,get:function(){return ku.serializeErc8010Signature}});var pr=cg();Object.defineProperty(e,"verifyHash",{enumerable:!0,get:function(){return pr.verifyHash}});var gr=ug();Object.defineProperty(e,"verifyMessage",{enumerable:!0,get:function(){return gr.verifyMessage}});var hn=dg();Object.defineProperty(e,"verifyTypedData",{enumerable:!0,get:function(){return hn.verifyTypedData}});var Nu=ke();Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return Nu.stringify}});var $u=wt();Object.defineProperty(e,"assertRequest",{enumerable:!0,get:function(){return $u.assertRequest}});var pn=lu();Object.defineProperty(e,"assertTransactionEIP1559",{enumerable:!0,get:function(){return pn.assertTransactionEIP1559}}),Object.defineProperty(e,"assertTransactionEIP2930",{enumerable:!0,get:function(){return pn.assertTransactionEIP2930}}),Object.defineProperty(e,"assertTransactionLegacy",{enumerable:!0,get:function(){return pn.assertTransactionLegacy}});var zu=Wd();Object.defineProperty(e,"getSerializedTransactionType",{enumerable:!0,get:function(){return zu.getSerializedTransactionType}});var $o=bu();Object.defineProperty(e,"getTransactionType",{enumerable:!0,get:function(){return $o.getTransactionType}});var Uu=Kd();Object.defineProperty(e,"parseTransaction",{enumerable:!0,get:function(){return Uu.parseTransaction}});var gn=Sd();Object.defineProperty(e,"serializeAccessList",{enumerable:!0,get:function(){return gn.serializeAccessList}});var zo=mu();Object.defineProperty(e,"serializeTransaction",{enumerable:!0,get:function(){return zo.serializeTransaction}});var kr=Ou();Object.defineProperty(e,"serializeTypedData",{enumerable:!0,get:function(){return kr.serializeTypedData}}),Object.defineProperty(e,"validateTypedData",{enumerable:!0,get:function(){return kr.validateTypedData}});var Lu=go();Object.defineProperty(e,"formatEther",{enumerable:!0,get:function(){return Lu.formatEther}});var Du=Rr();Object.defineProperty(e,"formatGwei",{enumerable:!0,get:function(){return Du.formatGwei}});var Gu=cu();Object.defineProperty(e,"formatUnits",{enumerable:!0,get:function(){return Gu.formatUnits}});var Vu=lg();Object.defineProperty(e,"parseEther",{enumerable:!0,get:function(){return Vu.parseEther}});var Wu=bg();Object.defineProperty(e,"parseGwei",{enumerable:!0,get:function(){return Wu.parseGwei}});var Uo=xu();Object.defineProperty(e,"parseUnits",{enumerable:!0,get:function(){return Uo.parseUnits}})}(hd)),hd}var ry;function fv(){if(ry)return rs;ry=1,Object.defineProperty(rs,"__esModule",{value:!0}),rs.formatProof=n;const e=Ef();function r(t){return t.map(i=>({...i,value:BigInt(i.value)}))}function n(t){return{...t,balance:t.balance?BigInt(t.balance):void 0,nonce:t.nonce?(0,e.hexToNumber)(t.nonce):void 0,storageProof:t.storageProof?r(t.storageProof):void 0}}return rs}var ny;function lv(){if(ny)return ts;ny=1,Object.defineProperty(ts,"__esModule",{value:!0}),ts.getProof=n;const e=te(),r=fv();async function n(t,{address:i,blockNumber:s,blockTag:o,storageKeys:a}){const c=o??"latest",d=s!==void 0?(0,e.numberToHex)(s):void 0,l=await t.request({method:"eth_getProof",params:[i,a,d||c]});return(0,r.formatProof)(l)}return ts}var As={},oy;function bv(){if(oy)return As;oy=1,Object.defineProperty(As,"__esModule",{value:!0}),As.getStorageAt=r;const e=te();async function r(n,{address:t,blockNumber:i,blockTag:s="latest",slot:o}){const a=i!==void 0?(0,e.numberToHex)(i):void 0;return await n.request({method:"eth_getStorageAt",params:[t,o,a||s]})}return As}var Ts={},iy;function jf(){if(iy)return Ts;iy=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.getTransaction=t;const e=Je(),r=te(),n=un();async function t(i,{blockHash:s,blockNumber:o,blockTag:a,hash:c,index:d,sender:l,nonce:f}){var _,j,g;const m=a||"latest",v=o!==void 0?(0,r.numberToHex)(o):void 0;let h=null;if(c?h=await i.request({method:"eth_getTransactionByHash",params:[c]},{dedupe:!0}):s?h=await i.request({method:"eth_getTransactionByBlockHashAndIndex",params:[s,(0,r.numberToHex)(d)]},{dedupe:!0}):(v||m)&&typeof d=="number"?h=await i.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[v||m,(0,r.numberToHex)(d)]},{dedupe:!!v}):l&&typeof f=="number"&&(h=await i.request({method:"eth_getTransactionBySenderAndNonce",params:[l,(0,r.numberToHex)(f)]},{dedupe:!0})),!h)throw new e.TransactionNotFoundError({blockHash:s,blockNumber:o,blockTag:m,hash:c,index:d});return(((g=(j=(_=i.chain)==null?void 0:_.formatters)==null?void 0:j.transaction)==null?void 0:g.format)||n.formatTransaction)(h,"getTransaction")}return Ts}var Is={},ay;function mv(){if(ay)return Is;ay=1,Object.defineProperty(Is,"__esModule",{value:!0}),Is.getTransactionConfirmations=t;const e=me(),r=xo(),n=jf();async function t(i,{hash:s,transactionReceipt:o}){const[a,c]=await Promise.all([(0,e.getAction)(i,r.getBlockNumber,"getBlockNumber")({}),s?(0,e.getAction)(i,n.getTransaction,"getTransaction")({hash:s}):void 0]),d=(o==null?void 0:o.blockNumber)||(c==null?void 0:c.blockNumber);return d?a-d+1n:0n}return Is}var Ss={},sy;function mg(){if(sy)return Ss;sy=1,Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.getTransactionReceipt=n;const e=Je(),r=mo();async function n(t,{hash:i}){var a,c,d;const s=await t.request({method:"eth_getTransactionReceipt",params:[i]},{dedupe:!0});if(!s)throw new e.TransactionReceiptNotFoundError({hash:i});return(((d=(c=(a=t.chain)==null?void 0:a.formatters)==null?void 0:c.transactionReceipt)==null?void 0:d.format)||r.formatTransactionReceipt)(s,"getTransactionReceipt")}return Ss}var Bs={},cy;function yv(){if(cy)return Bs;cy=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.multicall=f;const e=dr(),r=wo(),n=Te(),t=ue(),i=sr(),s=Wt(),o=et(),a=or(),c=lr(),d=me(),l=Bt();async function f(m,v){var x;const{account:h,authorizationList:b,allowFailure:_=!0,blockNumber:j,blockOverrides:g,blockTag:P,stateOverride:u}=v,E=v.contracts,{batchSize:p=v.batchSize??1024,deployless:y=v.deployless??!1}=typeof((x=m.batch)==null?void 0:x.multicall)=="object"?m.batch.multicall:{},A=(()=>{if(v.multicallAddress)return v.multicallAddress;if(y)return null;if(m.chain)return(0,a.getChainContractAddress)({blockNumber:j,chain:m.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),w=[[]];let T=0,O=0;for(let k=0;k<E.length;k++){const{abi:C,address:I,args:F,functionName:R}=E[k];try{const q=(0,o.encodeFunctionData)({abi:C,args:F,functionName:R});O+=(q.length-2)/2,p>0&&O>p&&w[T].length>0&&(T++,O=(q.length-2)/2,w[T]=[]),w[T]=[...w[T],{allowFailure:!0,callData:q,target:I}]}catch(q){const M=(0,c.getContractError)(q,{abi:C,address:I,args:F,docsPath:"/docs/contract/multicall",functionName:R,sender:h});if(!_)throw M;w[T]=[...w[T],{allowFailure:!0,callData:"0x",target:I}]}}const B=await Promise.allSettled(w.map(k=>(0,d.getAction)(m,l.readContract,"readContract")({...A===null?{code:r.multicall3Bytecode}:{address:A},abi:e.multicall3Abi,account:h,args:[k],authorizationList:b,blockNumber:j,blockOverrides:g,blockTag:P,functionName:"aggregate3",stateOverride:u}))),S=[];for(let k=0;k<B.length;k++){const C=B[k];if(C.status==="rejected"){if(!_)throw C.reason;for(let F=0;F<w[k].length;F++)S.push({status:"failure",error:C.reason,result:void 0});continue}const I=C.value;for(let F=0;F<I.length;F++){const{returnData:R,success:q}=I[F],{callData:M}=w[k][F],{abi:H,address:N,functionName:z,args:$}=E[S.length];try{if(M==="0x")throw new n.AbiDecodingZeroDataError;if(!q)throw new i.RawContractError({data:R});const U=(0,s.decodeFunctionResult)({abi:H,args:$,data:R,functionName:z});S.push(_?{result:U,status:"success"}:U)}catch(U){const G=(0,c.getContractError)(U,{abi:H,address:N,args:$,docsPath:"/docs/contract/multicall",functionName:z});if(!_)throw G;S.push({error:G,result:void 0,status:"failure"})}}}if(S.length!==E.length)throw new t.BaseError("multicall results mismatch");return S}return Bs}var Rs={},uy;function yg(){if(uy)return Rs;uy=1,Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.simulateBlocks=_;const e=Pp(),r=Ae(),n=Te(),t=sr(),i=Dt(),s=Wt(),o=et(),a=Me(),c=te(),d=lr(),l=Eo(),f=su(),m=Lt(),v=_t(),h=$d(),b=wt();async function _(j,g){const{blockNumber:P,blockTag:u=j.experimental_blockTag??"latest",blocks:E,returnFullTransactions:p,traceTransfers:y,validation:A}=g;try{const w=[];for(const S of E){const x=S.blockOverrides?e.toRpc(S.blockOverrides):void 0,k=S.calls.map(I=>{const F=I,R=F.account?(0,r.parseAccount)(F.account):void 0,q=F.abi?(0,o.encodeFunctionData)(F):F.data,M={...F,account:R,data:F.dataSuffix?(0,a.concat)([q||"0x",F.dataSuffix]):q,from:F.from??(R==null?void 0:R.address)};return(0,b.assertRequest)(M),(0,v.formatTransactionRequest)(M)}),C=S.stateOverrides?(0,h.serializeStateOverride)(S.stateOverrides):void 0;w.push({blockOverrides:x,calls:k,stateOverrides:C})}const O=(typeof P=="bigint"?(0,c.numberToHex)(P):void 0)||u;return(await j.request({method:"eth_simulateV1",params:[{blockStateCalls:w,returnFullTransactions:p,traceTransfers:y,validation:A},O]})).map((S,x)=>({...(0,f.formatBlock)(S),calls:S.calls.map((k,C)=>{var G,K;const{abi:I,args:F,functionName:R,to:q}=E[x].calls[C],M=((G=k.error)==null?void 0:G.data)??k.returnData,H=BigInt(k.gasUsed),N=(K=k.logs)==null?void 0:K.map(W=>(0,m.formatLog)(W)),z=k.status==="0x1"?"success":"failure",$=I&&z==="success"&&M!=="0x"?(0,s.decodeFunctionResult)({abi:I,data:M,functionName:R}):null,U=(()=>{var V;if(z==="success")return;let W;if(((V=k.error)==null?void 0:V.data)==="0x"?W=new n.AbiDecodingZeroDataError:k.error&&(W=new t.RawContractError(k.error)),!!W)return(0,d.getContractError)(W,{abi:I??[],address:q??"0x",args:F,functionName:R??"<unknown>"})})();return{data:M,gasUsed:H,logs:N,status:z,...z==="success"?{result:$}:{error:U}}})}))}catch(w){const T=w,O=(0,l.getNodeError)(T,{});throw O instanceof i.UnknownNodeError?T:O}}return Rs}var Os={},er={},De={},rn={},dy;function hv(){if(dy)return rn;dy=1,Object.defineProperty(rn,"__esModule",{value:!0}),rn.normalizeSignature=n,rn.isArgOfType=t,rn.getAmbiguousTypes=i;const e=_u(),r=st();function n(s){let o=!0,a="",c=0,d="",l=!1;for(let f=0;f<s.length;f++){const m=s[f];if(["(",")",","].includes(m)&&(o=!0),m==="("&&c++,m===")"&&c--,!!o){if(c===0){if(m===" "&&["event","function","error",""].includes(d))d="";else if(d+=m,m===")"){l=!0;break}continue}if(m===" "){s[f-1]!==","&&a!==","&&a!==",("&&(a="",o=!1);continue}d+=m,a+=m}}if(!l)throw new r.BaseError("Unable to normalize signature.");return d}function t(s,o){const a=typeof s,c=o.type;switch(c){case"address":return e.validate(s,{strict:!1});case"bool":return a==="boolean";case"function":return a==="string";case"string":return a==="string";default:return c==="tuple"&&"components"in o?Object.values(o.components).every((d,l)=>t(Object.values(s)[l],d)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(c)?a==="number"||a==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(c)?a==="string"||s instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(c)?Array.isArray(s)&&s.every(d=>t(d,{...o,type:c.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function i(s,o,a){for(const c in s){const d=s[c],l=o[c];if(d.type==="tuple"&&l.type==="tuple"&&"components"in d&&"components"in l)return i(d.components,l.components,a[c]);const f=[d.type,l.type];if((()=>f.includes("address")&&f.includes("bytes20")?!0:f.includes("address")&&f.includes("string")?e.validate(a[c],{strict:!1}):f.includes("address")&&f.includes("bytes")?e.validate(a[c],{strict:!1}):!1)())return f}}return rn}var fy;function hg(){if(fy)return De;fy=1,Object.defineProperty(De,"__esModule",{value:!0}),De.InvalidSelectorSizeError=De.NotFoundError=De.AmbiguityError=void 0,De.format=s,De.from=o,De.fromAbi=a,De.getSelector=c,De.getSignature=d,De.getSignatureHash=l;const e=tr(),r=st(),n=Md(),t=Ne(),i=hv();function s(h){return e.formatAbiItem(h)}function o(h,b={}){const{prepare:_=!0}=b,j=(()=>Array.isArray(h)||typeof h=="string"?e.parseAbiItem(h):h)();return{...j,..._?{hash:l(j)}:{}}}function a(h,b,_){const{args:j=[],prepare:g=!0}=_??{},P=t.validate(b,{strict:!1}),u=h.filter(y=>P?y.type==="function"||y.type==="error"?c(y)===t.slice(b,0,4):y.type==="event"?l(y)===b:!1:"name"in y&&y.name===b);if(u.length===0)throw new m({name:b});if(u.length===1)return{...u[0],...g?{hash:l(u[0])}:{}};let E;for(const y of u){if(!("inputs"in y))continue;if(!j||j.length===0){if(!y.inputs||y.inputs.length===0)return{...y,...g?{hash:l(y)}:{}};continue}if(!y.inputs||y.inputs.length===0||y.inputs.length!==j.length)continue;if(j.every((w,T)=>{const O="inputs"in y&&y.inputs[T];return O?i.isArgOfType(w,O):!1})){if(E&&"inputs"in E&&E.inputs){const w=i.getAmbiguousTypes(y.inputs,E.inputs,j);if(w)throw new f({abiItem:y,type:w[0]},{abiItem:E,type:w[1]})}E=y}}const p=(()=>{if(E)return E;const[y,...A]=u;return{...y,overloads:A}})();if(!p)throw new m({name:b});return{...p,...g?{hash:l(p)}:{}}}function c(...h){const b=(()=>{if(Array.isArray(h[0])){const[_,j]=h;return a(_,j)}return h[0]})();return t.slice(l(b),0,4)}function d(...h){const b=(()=>{if(Array.isArray(h[0])){const[j,g]=h;return a(j,g)}return h[0]})(),_=(()=>typeof b=="string"?b:e.formatAbiItem(b))();return i.normalizeSignature(_)}function l(...h){const b=(()=>{if(Array.isArray(h[0])){const[_,j]=h;return a(_,j)}return h[0]})();return typeof b!="string"&&"hash"in b&&b.hash?b.hash:n.keccak256(t.fromString(d(b)))}class f extends r.BaseError{constructor(b,_){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${b.type}\` in \`${i.normalizeSignature(e.formatAbiItem(b.abiItem))}\`, and`,`\`${_.type}\` in \`${i.normalizeSignature(e.formatAbiItem(_.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}De.AmbiguityError=f;class m extends r.BaseError{constructor({name:b,data:_,type:j="item"}){const g=(()=>b?` with name "${b}"`:_?` with data "${_}"`:"")();super(`ABI ${j}${g} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}De.NotFoundError=m;class v extends r.BaseError{constructor({data:b}){super(`Selector size is invalid. Expected 4 bytes. Received ${t.size(b)} bytes ("${b}").`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.InvalidSelectorSizeError"})}}return De.InvalidSelectorSizeError=v,De}var ly;function pv(){if(ly)return er;ly=1,Object.defineProperty(er,"__esModule",{value:!0}),er.decode=i,er.encode=s,er.format=o,er.from=a,er.fromAbi=c;const e=tr(),r=hg(),n=jo(),t=Ne();function i(...d){var h;const[l,f]=(()=>{if(Array.isArray(d[0])){const[b,_]=d;return[c(b),_]}return d})(),{bytecode:m}=f;if(((h=l.inputs)==null?void 0:h.length)===0)return;const v=f.data.replace(m,"0x");return n.decode(l.inputs,v)}function s(...d){var h;const[l,f]=(()=>{if(Array.isArray(d[0])){const[b,_]=d;return[c(b),_]}return d})(),{bytecode:m,args:v}=f;return t.concat(m,(h=l.inputs)!=null&&h.length&&(v!=null&&v.length)?n.encode(l.inputs,v):"0x")}function o(d){return e.formatAbiItem(d)}function a(d){return r.from(d)}function c(d){const l=d.find(f=>f.type==="constructor");if(!l)throw new r.NotFoundError({name:"constructor"});return l}return er}var gt={},by;function gv(){if(by)return gt;by=1,Object.defineProperty(gt,"__esModule",{value:!0}),gt.decodeData=i,gt.decodeResult=s,gt.encodeData=o,gt.encodeResult=a,gt.format=c,gt.from=d,gt.fromAbi=l,gt.getSelector=f;const e=tr(),r=hg(),n=jo(),t=Ne();function i(...m){var j;const[v,h]=(()=>{if(Array.isArray(m[0])){const[g,P,u]=m;return[l(g,P),u]}return m})(),{overloads:b}=v;if(t.size(h)<4)throw new r.InvalidSelectorSizeError({data:h});if(((j=v.inputs)==null?void 0:j.length)===0)return;const _=b?l([v,...b],h):v;if(!(t.size(h)<=4))return n.decode(_.inputs,t.slice(h,4))}function s(...m){const[v,h,b={}]=(()=>{if(Array.isArray(m[0])){const[j,g,P,u]=m;return[l(j,g),P,u]}return m})(),_=n.decode(v.outputs,h,b);if(!(_&&Object.keys(_).length===0))return _&&Object.keys(_).length===1?Array.isArray(_)?_[0]:Object.values(_)[0]:_}function o(...m){const[v,h=[]]=(()=>{if(Array.isArray(m[0])){const[E,p,y]=m;return[l(E,p,{args:y}),y]}const[P,u]=m;return[P,u]})(),{overloads:b}=v,_=b?l([v,...b],v.name,{args:h}):v,j=f(_),g=h.length>0?n.encode(_.inputs,h):void 0;return g?t.concat(j,g):j}function a(...m){const[v,h,b={}]=(()=>{if(Array.isArray(m[0])){const[g,P,u,E]=m;return[l(g,P),u,E]}return m})(),{as:_="Array"}=b,j=(()=>v.outputs.length===1?[h]:Array.isArray(h)?h:_==="Object"?Object.values(h):[h])();return n.encode(v.outputs,j)}function c(m){return e.formatAbiItem(m)}function d(m,v={}){return r.from(m,v)}function l(m,v,h){const b=r.fromAbi(m,v,h);if(b.type!=="function")throw new r.NotFoundError({name:v,type:"function"});return b}function f(m){return r.getSelector(m)}return gt}var Br={},my;function pg(){return my||(my=1,Object.defineProperty(Br,"__esModule",{value:!0}),Br.zeroAddress=Br.ethAddress=void 0,Br.ethAddress="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",Br.zeroAddress="0x0000000000000000000000000000000000000000"),Br}var yy;function _v(){if(yy)return Os;yy=1,Object.defineProperty(Os,"__esModule",{value:!0}),Os.simulateCalls=f;const e=pv(),r=gv(),n=Ae(),t=pg(),i=wo(),s=ue(),o=et(),a=Ef(),c=$p(),d=yg(),l="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function f(m,v){const{blockNumber:h,blockTag:b,calls:_,stateOverrides:j,traceAssetChanges:g,traceTransfers:P,validation:u}=v,E=v.account?(0,n.parseAccount)(v.account):void 0;if(g&&!E)throw new s.BaseError("`account` is required when `traceAssetChanges` is true");const p=E?e.encode(e.from("constructor(bytes, bytes)"),{bytecode:i.deploylessCallViaBytecodeBytecode,args:[l,r.encodeData(r.from("function getBalance(address)"),[E.address])]}):void 0,y=g?await Promise.all(v.calls.map(async V=>{if(!V.data&&!V.abi)return;const{accessList:J}=await(0,c.createAccessList)(m,{account:E.address,...V,data:V.abi?(0,o.encodeFunctionData)(V):V.data});return J.map(({address:oe,storageKeys:Y})=>Y.length>0?oe:null)})).then(V=>V.flat().filter(Boolean)):[],A=await(0,d.simulateBlocks)(m,{blockNumber:h,blockTag:b,blocks:[...g?[{calls:[{data:p}],stateOverrides:j},{calls:y.map((V,J)=>({abi:[r.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[E.address],to:V,from:t.zeroAddress,nonce:J})),stateOverrides:[{address:t.zeroAddress,nonce:0}]}]:[],{calls:[..._,{}].map(V=>({...V,from:E==null?void 0:E.address})),stateOverrides:j},...g?[{calls:[{data:p}]},{calls:y.map((V,J)=>({abi:[r.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[E.address],to:V,from:t.zeroAddress,nonce:J})),stateOverrides:[{address:t.zeroAddress,nonce:0}]},{calls:y.map((V,J)=>({to:V,abi:[r.from("function decimals() returns (uint256)")],functionName:"decimals",from:t.zeroAddress,nonce:J})),stateOverrides:[{address:t.zeroAddress,nonce:0}]},{calls:y.map((V,J)=>({to:V,abi:[r.from("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:t.zeroAddress,nonce:J})),stateOverrides:[{address:t.zeroAddress,nonce:0}]},{calls:y.map((V,J)=>({to:V,abi:[r.from("function symbol() returns (string)")],functionName:"symbol",from:t.zeroAddress,nonce:J})),stateOverrides:[{address:t.zeroAddress,nonce:0}]}]:[]],traceTransfers:P,validation:u}),w=g?A[2]:A[0],[T,O,,B,S,x,k,C]=g?A:[],{calls:I,...F}=w,R=I.slice(0,-1)??[],q=(T==null?void 0:T.calls)??[],M=(O==null?void 0:O.calls)??[],H=[...q,...M].map(V=>V.status==="success"?(0,a.hexToBigInt)(V.data):null),N=(B==null?void 0:B.calls)??[],z=(S==null?void 0:S.calls)??[],$=[...N,...z].map(V=>V.status==="success"?(0,a.hexToBigInt)(V.data):null),U=((x==null?void 0:x.calls)??[]).map(V=>V.status==="success"?V.result:null),G=((C==null?void 0:C.calls)??[]).map(V=>V.status==="success"?V.result:null),K=((k==null?void 0:k.calls)??[]).map(V=>V.status==="success"?V.result:null),W=[];for(const[V,J]of $.entries()){const oe=H[V];if(typeof J!="bigint"||typeof oe!="bigint")continue;const Y=U[V-1],X=G[V-1],ee=K[V-1],ie=(()=>V===0?{address:t.ethAddress,decimals:18,symbol:"ETH"}:{address:y[V-1],decimals:ee||Y?Number(Y??1):void 0,symbol:X??void 0})();W.some(re=>re.token.address===ie.address)||W.push({token:ie,value:{pre:oe,post:J,diff:J-oe}})}return{assetChanges:W,block:F,results:R}}return Os}var xs={},hy;function vv(){if(hy)return xs;hy=1,Object.defineProperty(xs,"__esModule",{value:!0}),xs.verifyMessage=t;const e=me(),r=Co(),n=wu();async function t(i,{address:s,message:o,factory:a,factoryData:c,signature:d,...l}){const f=(0,r.hashMessage)(o);return(0,e.getAction)(i,n.verifyHash,"verifyHash")({address:s,factory:a,factoryData:c,hash:f,signature:d,...l})}return xs}var Cs={},py;function Ev(){if(py)return Cs;py=1,Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.verifyTypedData=t;const e=me(),r=qo(),n=wu();async function t(i,s){const{address:o,factory:a,factoryData:c,signature:d,message:l,primaryType:f,types:m,domain:v,...h}=s,b=(0,r.hashTypedData)({message:l,primaryType:f,types:m,domain:v});return(0,e.getAction)(i,n.verifyHash,"verifyHash")({address:o,factory:a,factoryData:c,hash:b,signature:d,...h})}return Cs}var qs={},Ms={},gy;function gg(){if(gy)return Ms;gy=1,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.watchBlockNumber=o;const e=Be(),r=me(),n=Fr(),t=fn(),i=ke(),s=xo();function o(a,{emitOnBegin:c=!1,emitMissed:d=!1,onBlockNumber:l,onError:f,poll:m,pollingInterval:v=a.pollingInterval}){const h=(()=>typeof m<"u"?m:!(a.transport.type==="webSocket"||a.transport.type==="ipc"||a.transport.type==="fallback"&&(a.transport.transports[0].config.type==="webSocket"||a.transport.transports[0].config.type==="ipc")))();let b;return h?(()=>{const g=(0,i.stringify)(["watchBlockNumber",a.uid,c,d,v]);return(0,n.observe)(g,{onBlockNumber:l,onError:f},P=>(0,t.poll)(async()=>{var u;try{const E=await(0,r.getAction)(a,s.getBlockNumber,"getBlockNumber")({cacheTime:0});if(b!==void 0){if(E===b)return;if(E-b>1&&d)for(let p=b+1n;p<E;p++)P.onBlockNumber(p,b),b=p}(b===void 0||E>b)&&(P.onBlockNumber(E,b),b=E)}catch(E){(u=P.onError)==null||u.call(P,E)}},{emitOnBegin:c,interval:v}))})():(()=>{const g=(0,i.stringify)(["watchBlockNumber",a.uid,c,d]);return(0,n.observe)(g,{onBlockNumber:l,onError:f},P=>{let u=!0,E=()=>u=!1;return(async()=>{try{const p=(()=>{if(a.transport.type==="fallback"){const A=a.transport.transports.find(w=>w.config.type==="webSocket"||w.config.type==="ipc");return A?A.value:a.transport}return a.transport})(),{unsubscribe:y}=await p.subscribe({params:["newHeads"],onData(A){var T;if(!u)return;const w=(0,e.hexToBigInt)((T=A.result)==null?void 0:T.number);P.onBlockNumber(w,b),b=w},onError(A){var w;(w=P.onError)==null||w.call(P,A)}});E=y,u||E()}catch(p){f==null||f(p)}})(),()=>E()})})()}return Ms}var _y;function _g(){if(_y)return qs;_y=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.waitForTransactionReceipt=f;const e=Yd(),r=Je(),n=me(),t=Fr(),i=kd(),s=Bu(),o=ke(),a=Hr(),c=jf(),d=mg(),l=gg();async function f(m,v){const{checkReplacement:h=!0,confirmations:b=1,hash:_,onReplaced:j,retryCount:g=6,retryDelay:P=({count:I})=>~~(1<<I)*200,timeout:u=18e4}=v,E=(0,o.stringify)(["waitForTransactionReceipt",m.uid,_]),p=(()=>{var I;return v.pollingInterval?v.pollingInterval:(I=m.chain)!=null&&I.experimental_preconfirmationTime?m.chain.experimental_preconfirmationTime:m.pollingInterval})();let y,A,w,T=!1,O,B;const{promise:S,resolve:x,reject:k}=(0,i.withResolvers)(),C=u?setTimeout(()=>{B==null||B(),O==null||O(),k(new r.WaitForTransactionReceiptTimeoutError({hash:_}))},u):void 0;return O=(0,t.observe)(E,{onReplaced:j,resolve:x,reject:k},async I=>{if(w=await(0,n.getAction)(m,d.getTransactionReceipt,"getTransactionReceipt")({hash:_}).catch(()=>{}),w&&b<=1){clearTimeout(C),I.resolve(w),O==null||O();return}B=(0,n.getAction)(m,l.watchBlockNumber,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:p,async onBlockNumber(F){const R=M=>{clearTimeout(C),B==null||B(),M(),O==null||O()};let q=F;if(!T)try{if(w){if(b>1&&(!w.blockNumber||q-w.blockNumber+1n<b))return;R(()=>I.resolve(w));return}if(h&&!y&&(T=!0,await(0,s.withRetry)(async()=>{y=await(0,n.getAction)(m,c.getTransaction,"getTransaction")({hash:_}),y.blockNumber&&(q=y.blockNumber)},{delay:P,retryCount:g}),T=!1),w=await(0,n.getAction)(m,d.getTransactionReceipt,"getTransactionReceipt")({hash:_}),b>1&&(!w.blockNumber||q-w.blockNumber+1n<b))return;R(()=>I.resolve(w))}catch(M){if(M instanceof r.TransactionNotFoundError||M instanceof r.TransactionReceiptNotFoundError){if(!y){T=!1;return}try{A=y,T=!0;const H=await(0,s.withRetry)(()=>(0,n.getAction)(m,a.getBlock,"getBlock")({blockNumber:q,includeTransactions:!0}),{delay:P,retryCount:g,shouldRetry:({error:$})=>$ instanceof e.BlockNotFoundError});T=!1;const N=H.transactions.find(({from:$,nonce:U})=>$===A.from&&U===A.nonce);if(!N||(w=await(0,n.getAction)(m,d.getTransactionReceipt,"getTransactionReceipt")({hash:N.hash}),b>1&&(!w.blockNumber||q-w.blockNumber+1n<b)))return;let z="replaced";N.to===A.to&&N.value===A.value&&N.input===A.input?z="repriced":N.from===N.to&&N.value===0n&&(z="cancelled"),R(()=>{var $;($=I.onReplaced)==null||$.call(I,{reason:z,replacedTransaction:A,transaction:N,transactionReceipt:w}),I.resolve(w)})}catch(H){R(()=>I.reject(H))}}else R(()=>I.reject(M))}}})}),S}return qs}var Hs={},vy;function jv(){if(vy)return Hs;vy=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.watchBlocks=s;const e=me(),r=Fr(),n=fn(),t=ke(),i=Hr();function s(o,{blockTag:a=o.experimental_blockTag??"latest",emitMissed:c=!1,emitOnBegin:d=!1,onBlock:l,onError:f,includeTransactions:m,poll:v,pollingInterval:h=o.pollingInterval}){const b=(()=>typeof v<"u"?v:!(o.transport.type==="webSocket"||o.transport.type==="ipc"||o.transport.type==="fallback"&&(o.transport.transports[0].config.type==="webSocket"||o.transport.transports[0].config.type==="ipc")))(),_=m??!1;let j;return b?(()=>{const u=(0,t.stringify)(["watchBlocks",o.uid,a,c,d,_,h]);return(0,r.observe)(u,{onBlock:l,onError:f},E=>(0,n.poll)(async()=>{var p;try{const y=await(0,e.getAction)(o,i.getBlock,"getBlock")({blockTag:a,includeTransactions:_});if(y.number!==null&&(j==null?void 0:j.number)!=null){if(y.number===j.number)return;if(y.number-j.number>1&&c)for(let A=(j==null?void 0:j.number)+1n;A<y.number;A++){const w=await(0,e.getAction)(o,i.getBlock,"getBlock")({blockNumber:A,includeTransactions:_});E.onBlock(w,j),j=w}}((j==null?void 0:j.number)==null||a==="pending"&&(y==null?void 0:y.number)==null||y.number!==null&&y.number>j.number)&&(E.onBlock(y,j),j=y)}catch(y){(p=E.onError)==null||p.call(E,y)}},{emitOnBegin:d,interval:h}))})():(()=>{let u=!0,E=!0,p=()=>u=!1;return(async()=>{try{d&&(0,e.getAction)(o,i.getBlock,"getBlock")({blockTag:a,includeTransactions:_}).then(w=>{u&&E&&(l(w,void 0),E=!1)}).catch(f);const y=(()=>{if(o.transport.type==="fallback"){const w=o.transport.transports.find(T=>T.config.type==="webSocket"||T.config.type==="ipc");return w?w.value:o.transport}return o.transport})(),{unsubscribe:A}=await y.subscribe({params:["newHeads"],async onData(w){var O;if(!u)return;const T=await(0,e.getAction)(o,i.getBlock,"getBlock")({blockNumber:(O=w.result)==null?void 0:O.number,includeTransactions:_}).catch(()=>{});u&&(l(T,j),E=!1,j=T)},onError(w){f==null||f(w)}});p=A,u||p()}catch(y){f==null||f(y)}})(),()=>p()})()}return Hs}var Fs={},Ey;function wv(){if(Ey)return Fs;Ey=1,Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.watchEvent=h;const e=Te(),r=cr(),n=Ro(),t=Mr(),i=Lt(),s=me(),o=Fr(),a=fn(),c=ke(),d=zp(),l=xo(),f=Tu(),m=ef(),v=Iu();function h(b,{address:_,args:j,batch:g=!0,event:P,events:u,fromBlock:E,onError:p,onLogs:y,poll:A,pollingInterval:w=b.pollingInterval,strict:T}){const O=(()=>typeof A<"u"?A:typeof E=="bigint"?!0:!(b.transport.type==="webSocket"||b.transport.type==="ipc"||b.transport.type==="fallback"&&(b.transport.transports[0].config.type==="webSocket"||b.transport.transports[0].config.type==="ipc")))(),B=T??!1;return O?(()=>{const k=(0,c.stringify)(["watchEvent",_,j,g,b.uid,P,w,E]);return(0,o.observe)(k,{onLogs:y,onError:p},C=>{let I;E!==void 0&&(I=E-1n);let F,R=!1;const q=(0,a.poll)(async()=>{var M;if(!R){try{F=await(0,s.getAction)(b,d.createEventFilter,"createEventFilter")({address:_,args:j,event:P,events:u,strict:B,fromBlock:E})}catch{}R=!0;return}try{let H;if(F)H=await(0,s.getAction)(b,f.getFilterChanges,"getFilterChanges")({filter:F});else{const N=await(0,s.getAction)(b,l.getBlockNumber,"getBlockNumber")({});I&&I!==N?H=await(0,s.getAction)(b,m.getLogs,"getLogs")({address:_,args:j,event:P,events:u,fromBlock:I+1n,toBlock:N}):H=[],I=N}if(H.length===0)return;if(g)C.onLogs(H);else for(const N of H)C.onLogs([N])}catch(H){F&&H instanceof r.InvalidInputRpcError&&(R=!1),(M=C.onError)==null||M.call(C,H)}},{emitOnBegin:!0,interval:w});return async()=>{F&&await(0,s.getAction)(b,v.uninstallFilter,"uninstallFilter")({filter:F}),q()}})})():(()=>{let k=!0,C=()=>k=!1;return(async()=>{try{const I=(()=>{if(b.transport.type==="fallback"){const M=b.transport.transports.find(H=>H.config.type==="webSocket"||H.config.type==="ipc");return M?M.value:b.transport}return b.transport})(),F=u??(P?[P]:void 0);let R=[];F&&(R=[F.flatMap(H=>(0,t.encodeEventTopics)({abi:[H],eventName:H.name,args:j}))],P&&(R=R[0]));const{unsubscribe:q}=await I.subscribe({params:["logs",{address:_,topics:R}],onData(M){var N;if(!k)return;const H=M.result;try{const{eventName:z,args:$}=(0,n.decodeEventLog)({abi:F??[],data:H.data,topics:H.topics,strict:B}),U=(0,i.formatLog)(H,{args:$,eventName:z});y([U])}catch(z){let $,U;if(z instanceof e.DecodeLogDataMismatch||z instanceof e.DecodeLogTopicsMismatch){if(T)return;$=z.abiItem.name,U=(N=z.abiItem.inputs)==null?void 0:N.some(K=>!("name"in K&&K.name))}const G=(0,i.formatLog)(H,{args:U?[]:{},eventName:$});y([G])}},onError(M){p==null||p(M)}});C=q,k||C()}catch(I){p==null||p(I)}})(),()=>C()})()}return Fs}var ks={},jy;function Pv(){if(jy)return ks;jy=1,Object.defineProperty(ks,"__esModule",{value:!0}),ks.watchPendingTransactions=a;const e=me(),r=Fr(),n=fn(),t=ke(),i=Up(),s=Tu(),o=Iu();function a(c,{batch:d=!0,onError:l,onTransactions:f,poll:m,pollingInterval:v=c.pollingInterval}){return(typeof m<"u"?m:c.transport.type!=="webSocket"&&c.transport.type!=="ipc")?(()=>{const j=(0,t.stringify)(["watchPendingTransactions",c.uid,d,v]);return(0,r.observe)(j,{onTransactions:f,onError:l},g=>{let P;const u=(0,n.poll)(async()=>{var E;try{if(!P)try{P=await(0,e.getAction)(c,i.createPendingTransactionFilter,"createPendingTransactionFilter")({});return}catch(y){throw u(),y}const p=await(0,e.getAction)(c,s.getFilterChanges,"getFilterChanges")({filter:P});if(p.length===0)return;if(d)g.onTransactions(p);else for(const y of p)g.onTransactions([y])}catch(p){(E=g.onError)==null||E.call(g,p)}},{emitOnBegin:!0,interval:v});return async()=>{P&&await(0,e.getAction)(c,o.uninstallFilter,"uninstallFilter")({filter:P}),u()}})})():(()=>{let j=!0,g=()=>j=!1;return(async()=>{try{const{unsubscribe:P}=await c.transport.subscribe({params:["newPendingTransactions"],onData(u){if(!j)return;const E=u.result;f([E])},onError(u){l==null||l(u)}});g=P,j||g()}catch(P){l==null||l(P)}})(),()=>g()})()}return ks}var Ns={},$s={},wy;function Av(){if(wy)return $s;wy=1,Object.defineProperty($s,"__esModule",{value:!0}),$s.parseSiweMessage=e;function e(t){var h,b,_;const{scheme:i,statement:s,...o}=((h=t.match(r))==null?void 0:h.groups)??{},{chainId:a,expirationTime:c,issuedAt:d,notBefore:l,requestId:f,...m}=((b=t.match(n))==null?void 0:b.groups)??{},v=(_=t.split("Resources:")[1])==null?void 0:_.split(`
|
|
47
|
+
- `).slice(1);return{...o,...m,...a?{chainId:Number(a)}:{},...c?{expirationTime:new Date(c)}:{},...d?{issuedAt:new Date(d)}:{},...l?{notBefore:new Date(l)}:{},...f?{requestId:f}:{},...v?{resources:v}:{},...i?{scheme:i}:{},...s?{statement:s}:{}}}const r=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,n=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;return $s}var zs={},Py;function Tv(){if(Py)return zs;Py=1,Object.defineProperty(zs,"__esModule",{value:!0}),zs.validateSiweMessage=n;const e=Qe(),r=Pt();function n(t){const{address:i,domain:s,message:o,nonce:a,scheme:c,time:d=new Date}=t;if(s&&o.domain!==s||a&&o.nonce!==a||c&&o.scheme!==c||o.expirationTime&&d>=o.expirationTime||o.notBefore&&d<o.notBefore)return!1;try{if(!o.address||!(0,e.isAddress)(o.address,{strict:!1})||i&&!(0,r.isAddressEqual)(o.address,i))return!1}catch{return!1}return!0}return zs}var Ay;function Iv(){if(Ay)return Ns;Ay=1,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.verifySiweMessage=i;const e=Co(),r=Av(),n=Tv(),t=wu();async function i(s,o){const{address:a,domain:c,message:d,nonce:l,scheme:f,signature:m,time:v=new Date,...h}=o,b=(0,r.parseSiweMessage)(d);if(!b.address||!(0,n.validateSiweMessage)({address:a,domain:c,message:b,nonce:l,scheme:f,time:v}))return!1;const j=(0,e.hashMessage)(d);return(0,t.verifyHash)(s,{address:b.address,hash:j,signature:m,...h})}return Ns}var Us={},Ty;function wf(){if(Ty)return Us;Ty=1,Object.defineProperty(Us,"__esModule",{value:!0}),Us.sendRawTransactionSync=t;const e=Je(),r=mo(),n=Ef();async function t(i,{serializedTransaction:s,throwOnReceiptRevert:o,timeout:a}){var f,m,v;const c=await i.request({method:"eth_sendRawTransactionSync",params:a?[s,(0,n.numberToHex)(a)]:[s]},{retryCount:0}),l=(((v=(m=(f=i.chain)==null?void 0:f.formatters)==null?void 0:m.transactionReceipt)==null?void 0:v.format)||r.formatTransactionReceipt)(c);if(l.status==="reverted"&&o)throw new e.TransactionReceiptRevertedError({receipt:l});return l}return Us}var Iy;function vg(){if(Iy)return Oa;Iy=1,Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.publicActions=de;const e=G_(),r=K_(),n=Z_(),t=Y_(),i=Np(),s=To(),o=$p(),a=J_(),c=Zd(),d=zp(),l=Up(),f=Rp(),m=Bp(),v=Qd(),h=Sp(),b=Xd(),_=X_(),j=Q_(),g=Hr(),P=xo(),u=ev(),E=br(),p=pp(),y=tf(),A=rv(),w=ov(),T=Tu(),O=iv(),B=Jd(),S=ef(),x=lv(),k=bv(),C=jf(),I=mv(),F=Au(),R=mg(),q=yv(),M=Bt(),H=yg(),N=_v(),z=Op(),$=Iu(),U=wu(),G=vv(),K=Ev(),W=_g(),V=gg(),J=jv(),oe=Cp(),Y=wv(),X=Pv(),ee=Iv(),ie=Bo(),re=nf(),se=wf();function de(Q){return{call:Z=>(0,s.call)(Q,Z),createAccessList:Z=>(0,o.createAccessList)(Q,Z),createBlockFilter:()=>(0,a.createBlockFilter)(Q),createContractEventFilter:Z=>(0,c.createContractEventFilter)(Q,Z),createEventFilter:Z=>(0,d.createEventFilter)(Q,Z),createPendingTransactionFilter:()=>(0,l.createPendingTransactionFilter)(Q),estimateContractGas:Z=>(0,f.estimateContractGas)(Q,Z),estimateGas:Z=>(0,v.estimateGas)(Q,Z),getBalance:Z=>(0,_.getBalance)(Q,Z),getBlobBaseFee:()=>(0,j.getBlobBaseFee)(Q),getBlock:Z=>(0,g.getBlock)(Q,Z),getBlockNumber:Z=>(0,P.getBlockNumber)(Q,Z),getBlockTransactionCount:Z=>(0,u.getBlockTransactionCount)(Q,Z),getBytecode:Z=>(0,p.getCode)(Q,Z),getChainId:()=>(0,E.getChainId)(Q),getCode:Z=>(0,p.getCode)(Q,Z),getContractEvents:Z=>(0,y.getContractEvents)(Q,Z),getEip712Domain:Z=>(0,A.getEip712Domain)(Q,Z),getEnsAddress:Z=>(0,e.getEnsAddress)(Q,Z),getEnsAvatar:Z=>(0,r.getEnsAvatar)(Q,Z),getEnsName:Z=>(0,n.getEnsName)(Q,Z),getEnsResolver:Z=>(0,t.getEnsResolver)(Q,Z),getEnsText:Z=>(0,i.getEnsText)(Q,Z),getFeeHistory:Z=>(0,w.getFeeHistory)(Q,Z),estimateFeesPerGas:Z=>(0,m.estimateFeesPerGas)(Q,Z),getFilterChanges:Z=>(0,T.getFilterChanges)(Q,Z),getFilterLogs:Z=>(0,O.getFilterLogs)(Q,Z),getGasPrice:()=>(0,B.getGasPrice)(Q),getLogs:Z=>(0,S.getLogs)(Q,Z),getProof:Z=>(0,x.getProof)(Q,Z),estimateMaxPriorityFeePerGas:Z=>(0,h.estimateMaxPriorityFeePerGas)(Q,Z),fillTransaction:Z=>(0,b.fillTransaction)(Q,Z),getStorageAt:Z=>(0,k.getStorageAt)(Q,Z),getTransaction:Z=>(0,C.getTransaction)(Q,Z),getTransactionConfirmations:Z=>(0,I.getTransactionConfirmations)(Q,Z),getTransactionCount:Z=>(0,F.getTransactionCount)(Q,Z),getTransactionReceipt:Z=>(0,R.getTransactionReceipt)(Q,Z),multicall:Z=>(0,q.multicall)(Q,Z),prepareTransactionRequest:Z=>(0,ie.prepareTransactionRequest)(Q,Z),readContract:Z=>(0,M.readContract)(Q,Z),sendRawTransaction:Z=>(0,re.sendRawTransaction)(Q,Z),sendRawTransactionSync:Z=>(0,se.sendRawTransactionSync)(Q,Z),simulate:Z=>(0,H.simulateBlocks)(Q,Z),simulateBlocks:Z=>(0,H.simulateBlocks)(Q,Z),simulateCalls:Z=>(0,N.simulateCalls)(Q,Z),simulateContract:Z=>(0,z.simulateContract)(Q,Z),verifyHash:Z=>(0,U.verifyHash)(Q,Z),verifyMessage:Z=>(0,G.verifyMessage)(Q,Z),verifySiweMessage:Z=>(0,ee.verifySiweMessage)(Q,Z),verifyTypedData:Z=>(0,K.verifyTypedData)(Q,Z),uninstallFilter:Z=>(0,$.uninstallFilter)(Q,Z),waitForTransactionReceipt:Z=>(0,W.waitForTransactionReceipt)(Q,Z),watchBlocks:Z=>(0,J.watchBlocks)(Q,Z),watchBlockNumber:Z=>(0,V.watchBlockNumber)(Q,Z),watchContractEvent:Z=>(0,oe.watchContractEvent)(Q,Z),watchEvent:Z=>(0,Y.watchEvent)(Q,Z),watchPendingTransactions:Z=>(0,X.watchPendingTransactions)(Q,Z)}}return Oa}var Sy;function Sv(){if(Sy)return Ra;Sy=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.createPublicClient=n;const e=Ru(),r=vg();function n(t){const{key:i="public",name:s="Public Client"}=t;return(0,e.createClient)({...t,key:i,name:s,type:"publicClient"}).extend(r.publicActions)}return Ra}var Ls={},Ds={},Gs={},By;function Bv(){if(By)return Gs;By=1,Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.dropTransaction=e;async function e(r,{hash:n}){await r.request({method:`${r.mode}_dropTransaction`,params:[n]})}return Gs}var Vs={},Ry;function Rv(){if(Ry)return Vs;Ry=1,Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.dumpState=e;async function e(r){return r.request({method:`${r.mode}_dumpState`})}return Vs}var Ws={},Oy;function Ov(){if(Oy)return Ws;Oy=1,Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.getAutomine=e;async function e(r){return r.mode==="ganache"?await r.request({method:"eth_mining"}):await r.request({method:`${r.mode}_getAutomine`})}return Ws}var Ks={},xy;function xv(){if(xy)return Ks;xy=1,Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.getTxpoolContent=e;async function e(r){return await r.request({method:"txpool_content"})}return Ks}var Zs={},Cy;function Cv(){if(Cy)return Zs;Cy=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.getTxpoolStatus=r;const e=Be();async function r(n){const{pending:t,queued:i}=await n.request({method:"txpool_status"});return{pending:(0,e.hexToNumber)(t),queued:(0,e.hexToNumber)(i)}}return Zs}var Ys={},qy;function qv(){if(qy)return Ys;qy=1,Object.defineProperty(Ys,"__esModule",{value:!0}),Ys.impersonateAccount=e;async function e(r,{address:n}){await r.request({method:`${r.mode}_impersonateAccount`,params:[n]})}return Ys}var Js={},My;function Mv(){if(My)return Js;My=1,Object.defineProperty(Js,"__esModule",{value:!0}),Js.increaseTime=r;const e=te();async function r(n,{seconds:t}){return await n.request({method:"evm_increaseTime",params:[(0,e.numberToHex)(t)]})}return Js}var Xs={},Hy;function Hv(){if(Hy)return Xs;Hy=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.inspectTxpool=e;async function e(r){return await r.request({method:"txpool_inspect"})}return Xs}var Qs={},Fy;function Fv(){if(Fy)return Qs;Fy=1,Object.defineProperty(Qs,"__esModule",{value:!0}),Qs.loadState=e;async function e(r,{state:n}){await r.request({method:`${r.mode}_loadState`,params:[n]})}return Qs}var ec={},ky;function kv(){if(ky)return ec;ky=1,Object.defineProperty(ec,"__esModule",{value:!0}),ec.mine=r;const e=te();async function r(n,{blocks:t,interval:i}){n.mode==="ganache"?await n.request({method:"evm_mine",params:[{blocks:(0,e.numberToHex)(t)}]}):await n.request({method:`${n.mode}_mine`,params:[(0,e.numberToHex)(t),(0,e.numberToHex)(i||0)]})}return ec}var tc={},Ny;function Nv(){if(Ny)return tc;Ny=1,Object.defineProperty(tc,"__esModule",{value:!0}),tc.removeBlockTimestampInterval=e;async function e(r){await r.request({method:`${r.mode}_removeBlockTimestampInterval`})}return tc}var rc={},$y;function $v(){if($y)return rc;$y=1,Object.defineProperty(rc,"__esModule",{value:!0}),rc.reset=e;async function e(r,{blockNumber:n,jsonRpcUrl:t}={}){await r.request({method:`${r.mode}_reset`,params:[{forking:{blockNumber:Number(n),jsonRpcUrl:t}}]})}return rc}var nc={},zy;function zv(){if(zy)return nc;zy=1,Object.defineProperty(nc,"__esModule",{value:!0}),nc.revert=e;async function e(r,{id:n}){await r.request({method:"evm_revert",params:[n]})}return nc}var oc={},Uy;function Uv(){if(Uy)return oc;Uy=1,Object.defineProperty(oc,"__esModule",{value:!0}),oc.sendUnsignedTransaction=n;const e=ur(),r=_t();async function n(t,i){var u,E,p;const{accessList:s,data:o,from:a,gas:c,gasPrice:d,maxFeePerGas:l,maxPriorityFeePerGas:f,nonce:m,to:v,value:h,...b}=i,_=(p=(E=(u=t.chain)==null?void 0:u.formatters)==null?void 0:E.transactionRequest)==null?void 0:p.format,g=(_||r.formatTransactionRequest)({...(0,e.extract)(b,{format:_}),accessList:s,data:o,from:a,gas:c,gasPrice:d,maxFeePerGas:l,maxPriorityFeePerGas:f,nonce:m,to:v,value:h},"sendUnsignedTransaction");return await t.request({method:"eth_sendUnsignedTransaction",params:[g]})}return oc}var ic={},Ly;function Lv(){if(Ly)return ic;Ly=1,Object.defineProperty(ic,"__esModule",{value:!0}),ic.setAutomine=e;async function e(r,n){r.mode==="ganache"?n?await r.request({method:"miner_start"}):await r.request({method:"miner_stop"}):await r.request({method:"evm_setAutomine",params:[n]})}return ic}var ac={},Dy;function Dv(){if(Dy)return ac;Dy=1,Object.defineProperty(ac,"__esModule",{value:!0}),ac.setBalance=r;const e=te();async function r(n,{address:t,value:i}){n.mode==="ganache"?await n.request({method:"evm_setAccountBalance",params:[t,(0,e.numberToHex)(i)]}):await n.request({method:`${n.mode}_setBalance`,params:[t,(0,e.numberToHex)(i)]})}return ac}var sc={},Gy;function Gv(){if(Gy)return sc;Gy=1,Object.defineProperty(sc,"__esModule",{value:!0}),sc.setBlockGasLimit=r;const e=te();async function r(n,{gasLimit:t}){await n.request({method:"evm_setBlockGasLimit",params:[(0,e.numberToHex)(t)]})}return sc}var cc={},Vy;function Vv(){if(Vy)return cc;Vy=1,Object.defineProperty(cc,"__esModule",{value:!0}),cc.setBlockTimestampInterval=e;async function e(r,{interval:n}){const t=(()=>r.mode==="hardhat"?n*1e3:n)();await r.request({method:`${r.mode}_setBlockTimestampInterval`,params:[t]})}return cc}var uc={},Wy;function Wv(){if(Wy)return uc;Wy=1,Object.defineProperty(uc,"__esModule",{value:!0}),uc.setCode=e;async function e(r,{address:n,bytecode:t}){r.mode==="ganache"?await r.request({method:"evm_setAccountCode",params:[n,t]}):await r.request({method:`${r.mode}_setCode`,params:[n,t]})}return uc}var dc={},Ky;function Kv(){if(Ky)return dc;Ky=1,Object.defineProperty(dc,"__esModule",{value:!0}),dc.setCoinbase=e;async function e(r,{address:n}){await r.request({method:`${r.mode}_setCoinbase`,params:[n]})}return dc}var fc={},Zy;function Zv(){if(Zy)return fc;Zy=1,Object.defineProperty(fc,"__esModule",{value:!0}),fc.setIntervalMining=e;async function e(r,{interval:n}){const t=(()=>r.mode==="hardhat"?n*1e3:n)();await r.request({method:"evm_setIntervalMining",params:[t]})}return fc}var lc={},Yy;function Yv(){if(Yy)return lc;Yy=1,Object.defineProperty(lc,"__esModule",{value:!0}),lc.setLoggingEnabled=e;async function e(r,n){await r.request({method:`${r.mode}_setLoggingEnabled`,params:[n]})}return lc}var bc={},Jy;function Jv(){if(Jy)return bc;Jy=1,Object.defineProperty(bc,"__esModule",{value:!0}),bc.setMinGasPrice=r;const e=te();async function r(n,{gasPrice:t}){await n.request({method:`${n.mode}_setMinGasPrice`,params:[(0,e.numberToHex)(t)]})}return bc}var mc={},Xy;function Xv(){if(Xy)return mc;Xy=1,Object.defineProperty(mc,"__esModule",{value:!0}),mc.setNextBlockBaseFeePerGas=r;const e=te();async function r(n,{baseFeePerGas:t}){await n.request({method:`${n.mode}_setNextBlockBaseFeePerGas`,params:[(0,e.numberToHex)(t)]})}return mc}var yc={},Qy;function Qv(){if(Qy)return yc;Qy=1,Object.defineProperty(yc,"__esModule",{value:!0}),yc.setNextBlockTimestamp=r;const e=te();async function r(n,{timestamp:t}){await n.request({method:"evm_setNextBlockTimestamp",params:[(0,e.numberToHex)(t)]})}return yc}var hc={},eh;function e6(){if(eh)return hc;eh=1,Object.defineProperty(hc,"__esModule",{value:!0}),hc.setNonce=r;const e=te();async function r(n,{address:t,nonce:i}){await n.request({method:`${n.mode}_setNonce`,params:[t,(0,e.numberToHex)(i)]})}return hc}var pc={},th;function t6(){if(th)return pc;th=1,Object.defineProperty(pc,"__esModule",{value:!0}),pc.setRpcUrl=e;async function e(r,n){await r.request({method:`${r.mode}_setRpcUrl`,params:[n]})}return pc}var gc={},rh;function r6(){if(rh)return gc;rh=1,Object.defineProperty(gc,"__esModule",{value:!0}),gc.setStorageAt=r;const e=te();async function r(n,{address:t,index:i,value:s}){await n.request({method:`${n.mode}_setStorageAt`,params:[t,typeof i=="number"?(0,e.numberToHex)(i):i,s]})}return gc}var _c={},nh;function n6(){if(nh)return _c;nh=1,Object.defineProperty(_c,"__esModule",{value:!0}),_c.snapshot=e;async function e(r){return await r.request({method:"evm_snapshot"})}return _c}var vc={},oh;function o6(){if(oh)return vc;oh=1,Object.defineProperty(vc,"__esModule",{value:!0}),vc.stopImpersonatingAccount=e;async function e(r,{address:n}){await r.request({method:`${r.mode}_stopImpersonatingAccount`,params:[n]})}return vc}var ih;function Eg(){if(ih)return Ds;ih=1,Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.testActions=x;const e=Bv(),r=Rv(),n=Ov(),t=xv(),i=Cv(),s=qv(),o=Mv(),a=Hv(),c=Fv(),d=kv(),l=Nv(),f=$v(),m=zv(),v=Uv(),h=Lv(),b=Dv(),_=Gv(),j=Vv(),g=Wv(),P=Kv(),u=Zv(),E=Yv(),p=Jv(),y=Xv(),A=Qv(),w=e6(),T=t6(),O=r6(),B=n6(),S=o6();function x({mode:k}){return C=>{const I=C.extend(()=>({mode:k}));return{dropTransaction:F=>(0,e.dropTransaction)(I,F),dumpState:()=>(0,r.dumpState)(I),getAutomine:()=>(0,n.getAutomine)(I),getTxpoolContent:()=>(0,t.getTxpoolContent)(I),getTxpoolStatus:()=>(0,i.getTxpoolStatus)(I),impersonateAccount:F=>(0,s.impersonateAccount)(I,F),increaseTime:F=>(0,o.increaseTime)(I,F),inspectTxpool:()=>(0,a.inspectTxpool)(I),loadState:F=>(0,c.loadState)(I,F),mine:F=>(0,d.mine)(I,F),removeBlockTimestampInterval:()=>(0,l.removeBlockTimestampInterval)(I),reset:F=>(0,f.reset)(I,F),revert:F=>(0,m.revert)(I,F),sendUnsignedTransaction:F=>(0,v.sendUnsignedTransaction)(I,F),setAutomine:F=>(0,h.setAutomine)(I,F),setBalance:F=>(0,b.setBalance)(I,F),setBlockGasLimit:F=>(0,_.setBlockGasLimit)(I,F),setBlockTimestampInterval:F=>(0,j.setBlockTimestampInterval)(I,F),setCode:F=>(0,g.setCode)(I,F),setCoinbase:F=>(0,P.setCoinbase)(I,F),setIntervalMining:F=>(0,u.setIntervalMining)(I,F),setLoggingEnabled:F=>(0,E.setLoggingEnabled)(I,F),setMinGasPrice:F=>(0,p.setMinGasPrice)(I,F),setNextBlockBaseFeePerGas:F=>(0,y.setNextBlockBaseFeePerGas)(I,F),setNextBlockTimestamp:F=>(0,A.setNextBlockTimestamp)(I,F),setNonce:F=>(0,w.setNonce)(I,F),setRpcUrl:F=>(0,T.setRpcUrl)(I,F),setStorageAt:F=>(0,O.setStorageAt)(I,F),snapshot:()=>(0,B.snapshot)(I),stopImpersonatingAccount:F=>(0,S.stopImpersonatingAccount)(I,F)}}}return Ds}var ah;function i6(){if(ah)return Ls;ah=1,Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.createTestClient=n;const e=Ru(),r=Eg();function n(t){const{key:i="test",name:s="Test Client",mode:o}=t;return(0,e.createClient)({...t,key:i,name:s,type:"testClient"}).extend(c=>({mode:o,...(0,r.testActions)({mode:o})(c)}))}return Ls}var Ec={},jc={},wc={},sh;function a6(){if(sh)return wc;sh=1,Object.defineProperty(wc,"__esModule",{value:!0}),wc.addChain=r;const e=te();async function r(n,{chain:t}){const{id:i,name:s,nativeCurrency:o,rpcUrls:a,blockExplorers:c}=t;await n.request({method:"wallet_addEthereumChain",params:[{chainId:(0,e.numberToHex)(i),chainName:s,nativeCurrency:o,rpcUrls:a.default.http,blockExplorerUrls:c?Object.values(c).map(({url:d})=>d):void 0}]},{dedupe:!0,retryCount:0})}return wc}var Pc={},ch;function s6(){if(ch)return Pc;ch=1,Object.defineProperty(Pc,"__esModule",{value:!0}),Pc.deployContract=n;const e=Po(),r=Su();function n(t,i){const{abi:s,args:o,bytecode:a,...c}=i,d=(0,e.encodeDeployData)({abi:s,args:o,bytecode:a});return(0,r.sendTransaction)(t,{...c,...c.authorizationList?{to:null}:{},data:d})}return Pc}var Ac={},uh;function c6(){if(uh)return Ac;uh=1,Object.defineProperty(Ac,"__esModule",{value:!0}),Ac.getAddresses=r;const e=at();async function r(n){var i;return((i=n.account)==null?void 0:i.type)==="local"?[n.account.address]:(await n.request({method:"eth_accounts"},{dedupe:!0})).map(s=>(0,e.checksumAddress)(s))}return Ac}var Tc={},dh;function u6(){if(dh)return Tc;dh=1,Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.getCapabilities=n;const e=Ae(),r=te();async function n(t,i={}){const{account:s=t.account,chainId:o}=i,a=s?(0,e.parseAccount)(s):void 0,c=o?[a==null?void 0:a.address,[(0,r.numberToHex)(o)]]:[a==null?void 0:a.address],d=await t.request({method:"wallet_getCapabilities",params:c}),l={};for(const[f,m]of Object.entries(d)){l[Number(f)]={};for(let[v,h]of Object.entries(m))v==="addSubAccount"&&(v="unstable_addSubAccount"),l[Number(f)][v]=h}return typeof o=="number"?l[o]:l}return Tc}var Ic={},fh;function d6(){if(fh)return Ic;fh=1,Object.defineProperty(Ic,"__esModule",{value:!0}),Ic.getPermissions=e;async function e(r){return await r.request({method:"wallet_getPermissions"},{dedupe:!0})}return Ic}var Sc={},lh;function jg(){if(lh)return Sc;lh=1,Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.prepareAuthorization=o;const e=Ae(),r=ir(),n=Pt(),t=me(),i=br(),s=Au();async function o(a,c){var b;const{account:d=a.account,chainId:l,nonce:f}=c;if(!d)throw new r.AccountNotFoundError({docsPath:"/docs/eip7702/prepareAuthorization"});const m=(0,e.parseAccount)(d),v=(()=>{if(c.executor)return c.executor==="self"?c.executor:(0,e.parseAccount)(c.executor)})(),h={address:c.contractAddress??c.address,chainId:l,nonce:f};return typeof h.chainId>"u"&&(h.chainId=((b=a.chain)==null?void 0:b.id)??await(0,t.getAction)(a,i.getChainId,"getChainId")({})),typeof h.nonce>"u"&&(h.nonce=await(0,t.getAction)(a,s.getTransactionCount,"getTransactionCount")({address:m.address,blockTag:"pending"}),(v==="self"||v!=null&&v.address&&(0,n.isAddressEqual)(v.address,m.address))&&(h.nonce+=1)),h}return Sc}var Bc={},bh;function f6(){if(bh)return Bc;bh=1,Object.defineProperty(Bc,"__esModule",{value:!0}),Bc.requestAddresses=r;const e=at();async function r(n){return(await n.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(i=>(0,e.getAddress)(i))}return Bc}var Rc={},mh;function l6(){if(mh)return Rc;mh=1,Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.requestPermissions=e;async function e(r,n){return r.request({method:"wallet_requestPermissions",params:[n]},{retryCount:0})}return Rc}var Oc={},yh;function b6(){if(yh)return Oc;yh=1,Object.defineProperty(Oc,"__esModule",{value:!0}),Oc.sendCallsSync=n;const e=af(),r=sf();async function n(t,i){const{chain:s=t.chain}=i,o=i.timeout??Math.max(((s==null?void 0:s.blockTime)??0)*3,5e3),a=await(0,e.sendCalls)(t,i);return await(0,r.waitForCallsStatus)(t,{...i,id:a.id,timeout:o})}return Oc}var xc={},hh;function wg(){if(hh)return xc;hh=1,Object.defineProperty(xc,"__esModule",{value:!0}),xc.sendTransactionSync=j;const e=Ae(),r=ir(),n=ue(),t=Je(),i=Ao(),s=vo(),o=So(),a=ur(),c=_t(),d=me(),l=Or(),f=wt(),m=br(),v=_g(),h=Bo(),b=wf(),_=new l.LruMap(128);async function j(g,P){var N,z,$,U;const{account:u=g.account,chain:E=g.chain,accessList:p,authorizationList:y,blobs:A,data:w,gas:T,gasPrice:O,maxFeePerBlobGas:B,maxFeePerGas:S,maxPriorityFeePerGas:x,nonce:k,pollingInterval:C,throwOnReceiptRevert:I,type:F,value:R,...q}=P,M=P.timeout??Math.max(((E==null?void 0:E.blockTime)??0)*3,5e3);if(typeof u>"u")throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransactionSync"});const H=u?(0,e.parseAccount)(u):null;try{(0,f.assertRequest)(P);const G=await(async()=>{if(P.to)return P.to;if(P.to!==null&&y&&y.length>0)return await(0,i.recoverAuthorizationAddress)({authorization:y[0]}).catch(()=>{throw new n.BaseError("`to` is required. Could not infer from `authorizationList`.")})})();if((H==null?void 0:H.type)==="json-rpc"||H===null){let K;E!==null&&(K=await(0,d.getAction)(g,m.getChainId,"getChainId")({}),(0,s.assertCurrentChain)({currentChainId:K,chain:E}));const W=($=(z=(N=g.chain)==null?void 0:N.formatters)==null?void 0:z.transactionRequest)==null?void 0:$.format,J=(W||c.formatTransactionRequest)({...(0,a.extract)(q,{format:W}),accessList:p,account:H,authorizationList:y,blobs:A,chainId:K,data:w,gas:T,gasPrice:O,maxFeePerBlobGas:B,maxFeePerGas:S,maxPriorityFeePerGas:x,nonce:k,to:G,type:F,value:R},"sendTransaction"),oe=_.get(g.uid),Y=oe?"wallet_sendTransaction":"eth_sendTransaction",X=await(async()=>{try{return await g.request({method:Y,params:[J]},{retryCount:0})}catch(ie){if(oe===!1)throw ie;const re=ie;if(re.name==="InvalidInputRpcError"||re.name==="InvalidParamsRpcError"||re.name==="MethodNotFoundRpcError"||re.name==="MethodNotSupportedRpcError")return await g.request({method:"wallet_sendTransaction",params:[J]},{retryCount:0}).then(se=>(_.set(g.uid,!0),se)).catch(se=>{const de=se;throw de.name==="MethodNotFoundRpcError"||de.name==="MethodNotSupportedRpcError"?(_.set(g.uid,!1),re):de});throw re}})(),ee=await(0,d.getAction)(g,v.waitForTransactionReceipt,"waitForTransactionReceipt")({checkReplacement:!1,hash:X,pollingInterval:C,timeout:M});if(I&&ee.status==="reverted")throw new t.TransactionReceiptRevertedError({receipt:ee});return ee}if((H==null?void 0:H.type)==="local"){const K=await(0,d.getAction)(g,h.prepareTransactionRequest,"prepareTransactionRequest")({account:H,accessList:p,authorizationList:y,blobs:A,chain:E,data:w,gas:T,gasPrice:O,maxFeePerBlobGas:B,maxFeePerGas:S,maxPriorityFeePerGas:x,nonce:k,nonceManager:H.nonceManager,parameters:[...h.defaultParameters,"sidecars"],type:F,value:R,...q,to:G}),W=(U=E==null?void 0:E.serializers)==null?void 0:U.transaction,V=await H.signTransaction(K,{serializer:W});return await(0,d.getAction)(g,b.sendRawTransactionSync,"sendRawTransactionSync")({serializedTransaction:V,throwOnReceiptRevert:I})}throw(H==null?void 0:H.type)==="smart"?new r.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new r.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransactionSync",type:H==null?void 0:H.type})}catch(G){throw G instanceof r.AccountTypeNotSupportedError?G:(0,o.getTransactionError)(G,{...P,account:H,chain:P.chain||void 0})}}return xc}var Cc={},ph;function m6(){if(ph)return Cc;ph=1,Object.defineProperty(Cc,"__esModule",{value:!0}),Cc.showCallsStatus=e;async function e(r,n){const{id:t}=n;await r.request({method:"wallet_showCallsStatus",params:[t]})}return Cc}var qc={},gh;function y6(){if(gh)return qc;gh=1,Object.defineProperty(qc,"__esModule",{value:!0}),qc.signAuthorization=t;const e=Ae(),r=ir(),n=jg();async function t(i,s){const{account:o=i.account}=s;if(!o)throw new r.AccountNotFoundError({docsPath:"/docs/eip7702/signAuthorization"});const a=(0,e.parseAccount)(o);if(!a.signAuthorization)throw new r.AccountTypeNotSupportedError({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:a.type});const c=await(0,n.prepareAuthorization)(i,s);return a.signAuthorization(c)}return qc}var Mc={},_h;function h6(){if(_h)return Mc;_h=1,Object.defineProperty(Mc,"__esModule",{value:!0}),Mc.signMessage=t;const e=Ae(),r=ir(),n=te();async function t(i,{account:s=i.account,message:o}){if(!s)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/signMessage"});const a=(0,e.parseAccount)(s);if(a.signMessage)return a.signMessage({message:o});const c=(()=>typeof o=="string"?(0,n.stringToHex)(o):o.raw instanceof Uint8Array?(0,n.toHex)(o.raw):o.raw)();return i.request({method:"personal_sign",params:[c,a.address]},{retryCount:0})}return Mc}var Hc={},vh;function p6(){if(vh)return Hc;vh=1,Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.signTransaction=c;const e=Ae(),r=ir(),n=vo(),t=te(),i=_t(),s=me(),o=wt(),a=br();async function c(d,l){var g,P,u,E;const{account:f=d.account,chain:m=d.chain,...v}=l;if(!f)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTransaction"});const h=(0,e.parseAccount)(f);(0,o.assertRequest)({account:h,...l});const b=await(0,s.getAction)(d,a.getChainId,"getChainId")({});m!==null&&(0,n.assertCurrentChain)({currentChainId:b,chain:m});const _=(m==null?void 0:m.formatters)||((g=d.chain)==null?void 0:g.formatters),j=((P=_==null?void 0:_.transactionRequest)==null?void 0:P.format)||i.formatTransactionRequest;return h.signTransaction?h.signTransaction({...v,chainId:b},{serializer:(E=(u=d.chain)==null?void 0:u.serializers)==null?void 0:E.transaction}):await d.request({method:"eth_signTransaction",params:[{...j({...v,account:h},"signTransaction"),chainId:(0,t.numberToHex)(b),from:h.address}]},{retryCount:0})}return Hc}var Fc={},Eh;function g6(){if(Eh)return Fc;Eh=1,Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.signTypedData=t;const e=Ae(),r=ir(),n=Ou();async function t(i,s){const{account:o=i.account,domain:a,message:c,primaryType:d}=s;if(!o)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTypedData"});const l=(0,e.parseAccount)(o),f={EIP712Domain:(0,n.getTypesForEIP712Domain)({domain:a}),...s.types};if((0,n.validateTypedData)({domain:a,message:c,primaryType:d,types:f}),l.signTypedData)return l.signTypedData({domain:a,message:c,primaryType:d,types:f});const m=(0,n.serializeTypedData)({domain:a,message:c,primaryType:d,types:f});return i.request({method:"eth_signTypedData_v4",params:[l.address,m]},{retryCount:0})}return Fc}var kc={},jh;function _6(){if(jh)return kc;jh=1,Object.defineProperty(kc,"__esModule",{value:!0}),kc.switchChain=r;const e=te();async function r(n,{id:t}){await n.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,e.numberToHex)(t)}]},{retryCount:0})}return kc}var Nc={},wh;function v6(){if(wh)return Nc;wh=1,Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.watchAsset=e;async function e(r,n){return await r.request({method:"wallet_watchAsset",params:n},{retryCount:0})}return Nc}var $c={},Ph;function E6(){if(Ph)return $c;Ph=1,Object.defineProperty($c,"__esModule",{value:!0}),$c.writeContractSync=n;const e=wg(),r=of();async function n(t,i){return r.writeContract.internal(t,e.sendTransactionSync,"sendTransactionSync",i)}return $c}var Ah;function Pg(){if(Ah)return jc;Ah=1,Object.defineProperty(jc,"__esModule",{value:!0}),jc.walletActions=B;const e=Xd(),r=br(),n=a6(),t=s6(),i=c6(),s=Mp(),o=u6(),a=d6(),c=jg(),d=Bo(),l=f6(),f=l6(),m=af(),v=b6(),h=nf(),b=wf(),_=Su(),j=wg(),g=m6(),P=y6(),u=h6(),E=p6(),p=g6(),y=_6(),A=sf(),w=v6(),T=of(),O=E6();function B(S){return{addChain:x=>(0,n.addChain)(S,x),deployContract:x=>(0,t.deployContract)(S,x),fillTransaction:x=>(0,e.fillTransaction)(S,x),getAddresses:()=>(0,i.getAddresses)(S),getCallsStatus:x=>(0,s.getCallsStatus)(S,x),getCapabilities:x=>(0,o.getCapabilities)(S,x),getChainId:()=>(0,r.getChainId)(S),getPermissions:()=>(0,a.getPermissions)(S),prepareAuthorization:x=>(0,c.prepareAuthorization)(S,x),prepareTransactionRequest:x=>(0,d.prepareTransactionRequest)(S,x),requestAddresses:()=>(0,l.requestAddresses)(S),requestPermissions:x=>(0,f.requestPermissions)(S,x),sendCalls:x=>(0,m.sendCalls)(S,x),sendCallsSync:x=>(0,v.sendCallsSync)(S,x),sendRawTransaction:x=>(0,h.sendRawTransaction)(S,x),sendRawTransactionSync:x=>(0,b.sendRawTransactionSync)(S,x),sendTransaction:x=>(0,_.sendTransaction)(S,x),sendTransactionSync:x=>(0,j.sendTransactionSync)(S,x),showCallsStatus:x=>(0,g.showCallsStatus)(S,x),signAuthorization:x=>(0,P.signAuthorization)(S,x),signMessage:x=>(0,u.signMessage)(S,x),signTransaction:x=>(0,E.signTransaction)(S,x),signTypedData:x=>(0,p.signTypedData)(S,x),switchChain:x=>(0,y.switchChain)(S,x),waitForCallsStatus:x=>(0,A.waitForCallsStatus)(S,x),watchAsset:x=>(0,w.watchAsset)(S,x),writeContract:x=>(0,T.writeContract)(S,x),writeContractSync:x=>(0,O.writeContractSync)(S,x)}}return jc}var Th;function j6(){if(Th)return Ec;Th=1,Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.createWalletClient=n;const e=Ru(),r=Pg();function n(t){const{key:i="wallet",name:s="Wallet Client",transport:o}=t;return(0,e.createClient)({...t,key:i,name:s,transport:o,type:"walletClient"}).extend(r.walletActions)}return Ec}var zc={},Ih;function Mo(){if(Ih)return zc;Ih=1,Object.defineProperty(zc,"__esModule",{value:!0}),zc.createTransport=n;const e=Gp(),r=Hp();function n({key:t,methods:i,name:s,request:o,retryCount:a=3,retryDelay:c=150,timeout:d,type:l},f){const m=(0,r.uid)();return{config:{key:t,methods:i,name:s,request:o,retryCount:a,retryDelay:c,timeout:d,type:l},request:(0,e.buildRequest)(o,{methods:i,retryCount:a,retryDelay:c,uid:m}),value:f}}return zc}var Uc={},Sh;function w6(){if(Sh)return Uc;Sh=1,Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.custom=r;const e=Mo();function r(n,t={}){const{key:i="custom",methods:s,name:o="Custom Provider",retryDelay:a}=t;return({retryCount:c})=>(0,e.createTransport)({key:i,methods:s,name:o,request:n.request.bind(n),retryCount:t.retryCount??c,retryDelay:a,type:"custom"})}return Uc}var nn={},Bh;function P6(){if(Bh)return nn;Bh=1,Object.defineProperty(nn,"__esModule",{value:!0}),nn.fallback=i,nn.shouldThrow=s,nn.rankTransports=o;const e=Dt(),r=cr(),n=rf(),t=Mo();function i(a,c={}){const{key:d="fallback",name:l="Fallback",rank:f=!1,shouldThrow:m=s,retryCount:v,retryDelay:h}=c;return({chain:b,pollingInterval:_=4e3,timeout:j,...g})=>{let P=a,u=()=>{};const E=(0,t.createTransport)({key:d,name:l,async request({method:p,params:y}){let A;const w=async(T=0)=>{const O=P[T]({...g,chain:b,retryCount:0,timeout:j});try{const B=await O.request({method:p,params:y});return u({method:p,params:y,response:B,transport:O,status:"success"}),B}catch(B){if(u({error:B,method:p,params:y,transport:O,status:"error"}),m(B)||T===P.length-1||(A??(A=P.slice(T+1).some(S=>{const{include:x,exclude:k}=S({chain:b}).config.methods||{};return x?x.includes(p):k?!k.includes(p):!0})),!A))throw B;return w(T+1)}};return w()},retryCount:v,retryDelay:h,type:"fallback"},{onResponse:p=>u=p,transports:P.map(p=>p({chain:b,retryCount:0}))});if(f){const p=typeof f=="object"?f:{};o({chain:b,interval:p.interval??_,onTransports:y=>P=y,ping:p.ping,sampleCount:p.sampleCount,timeout:p.timeout,transports:P,weights:p.weights})}return E}}function s(a){return!!("code"in a&&typeof a.code=="number"&&(a.code===r.TransactionRejectedRpcError.code||a.code===r.UserRejectedRequestError.code||e.ExecutionRevertedError.nodeMessage.test(a.message)||a.code===5e3))}function o({chain:a,interval:c=4e3,onTransports:d,ping:l,sampleCount:f=10,timeout:m=1e3,transports:v,weights:h={}}){const{stability:b=.7,latency:_=.3}=h,j=[],g=async()=>{const P=await Promise.all(v.map(async p=>{const y=p({chain:a,retryCount:0,timeout:m}),A=Date.now();let w,T;try{await(l?l({transport:y}):y.request({method:"net_listening"})),T=1}catch{T=0}finally{w=Date.now()}return{latency:w-A,success:T}}));j.push(P),j.length>f&&j.shift();const u=Math.max(...j.map(p=>Math.max(...p.map(({latency:y})=>y)))),E=v.map((p,y)=>{const A=j.map(S=>S[y].latency),T=1-A.reduce((S,x)=>S+x,0)/A.length/u,O=j.map(S=>S[y].success),B=O.reduce((S,x)=>S+x,0)/O.length;return B===0?[0,y]:[_*T+b*B,y]}).sort((p,y)=>y[0]-p[0]);d(E.map(([,p])=>v[p])),await(0,n.wait)(c),g()};g()}return nn}var Lc={},uo={},Rh;function Pf(){if(Rh)return uo;Rh=1,Object.defineProperty(uo,"__esModule",{value:!0}),uo.UrlRequiredError=void 0;const e=ue();class r extends e.BaseError{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}return uo.UrlRequiredError=r,uo}var Oh;function A6(){if(Oh)return Lc;Oh=1,Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.http=s;const e=jt(),r=Pf(),n=Nd(),t=mf(),i=Mo();function s(o,a={}){const{batch:c,fetchFn:d,fetchOptions:l,key:f="http",methods:m,name:v="HTTP JSON-RPC",onFetchRequest:h,onFetchResponse:b,retryDelay:_,raw:j}=a;return({chain:g,retryCount:P,timeout:u})=>{const{batchSize:E=1e3,wait:p=0}=typeof c=="object"?c:{},y=a.retryCount??P,A=u??a.timeout??1e4,w=o||(g==null?void 0:g.rpcUrls.default.http[0]);if(!w)throw new r.UrlRequiredError;const T=(0,t.getHttpRpcClient)(w,{fetchFn:d,fetchOptions:l,onRequest:h,onResponse:b,timeout:A});return(0,i.createTransport)({key:f,methods:m,name:v,async request({method:O,params:B}){const S={method:O,params:B},{schedule:x}=(0,n.createBatchScheduler)({id:w,wait:p,shouldSplitBatch(F){return F.length>E},fn:F=>T.request({body:F}),sort:(F,R)=>F.id-R.id}),k=async F=>c?x(F):[await T.request({body:F})],[{error:C,result:I}]=await k(S);if(j)return{error:C,result:I};if(C)throw new e.RpcRequestError({body:S,error:C,url:w});return I},retryCount:y,retryDelay:_,timeout:A,type:"http"},{fetchOptions:l,url:w})}}return Lc}var Dc={},xh;function T6(){if(xh)return Dc;xh=1,Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.webSocket=s;const e=jt(),r=Pf(),n=eg(),t=yf(),i=Mo();function s(o,a={}){const{keepAlive:c,key:d="webSocket",methods:l,name:f="WebSocket JSON-RPC",reconnect:m,retryDelay:v}=a;return({chain:h,retryCount:b,timeout:_})=>{var E;const j=a.retryCount??b,g=_??a.timeout??1e4,P=o||((E=h==null?void 0:h.rpcUrls.default.webSocket)==null?void 0:E[0]),u={keepAlive:c,reconnect:m};if(!P)throw new r.UrlRequiredError;return(0,i.createTransport)({key:d,methods:l,name:f,async request({method:p,params:y}){const A={method:p,params:y},w=await(0,t.getWebSocketRpcClient)(P,u),{error:T,result:O}=await w.requestAsync({body:A,timeout:g});if(T)throw new e.RpcRequestError({body:A,error:T,url:P});return O},retryCount:j,retryDelay:v,timeout:g,type:"webSocket"},{getSocket(){return(0,n.getSocket)(P)},getRpcClient(){return(0,t.getWebSocketRpcClient)(P,u)},async subscribe({params:p,onData:y,onError:A}){const w=await(0,t.getWebSocketRpcClient)(P,u),{result:T}=await new Promise((O,B)=>w.request({body:{method:"eth_subscribe",params:p},onError(S){B(S),A==null||A(S)},onResponse(S){if(S.error){B(S.error),A==null||A(S.error);return}if(typeof S.id=="number"){O(S);return}S.method==="eth_subscription"&&y(S.params)}}));return{subscriptionId:T,async unsubscribe(){return new Promise(O=>w.request({body:{method:"eth_unsubscribe",params:[T]},onResponse:O}))}}}})}}return Dc}var fo={},Ch;function I6(){if(Ch)return fo;Ch=1,Object.defineProperty(fo,"__esModule",{value:!0}),fo.ProviderRpcError=void 0;class e extends Error{constructor(n,t){super(t),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n,this.details=t}}return fo.ProviderRpcError=e,fo}var Gc={},qh;function S6(){if(qh)return Gc;qh=1,Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.decodeDeployData=t;const e=Te(),r=ar(),n="/docs/contract/decodeDeployData";function t(i){const{abi:s,bytecode:o,data:a}=i;if(a===o)return{bytecode:o};const c=s.find(l=>"type"in l&&l.type==="constructor");if(!c)throw new e.AbiConstructorNotFoundError({docsPath:n});if(!("inputs"in c))throw new e.AbiConstructorParamsNotFoundError({docsPath:n});if(!c.inputs||c.inputs.length===0)throw new e.AbiConstructorParamsNotFoundError({docsPath:n});return{args:(0,r.decodeAbiParameters)(c.inputs,`0x${a.replace(o,"")}`),bytecode:o}}return Gc}var Vc={},Mh;function B6(){if(Mh)return Vc;Mh=1,Object.defineProperty(Vc,"__esModule",{value:!0}),Vc.fromBlobs=t;const e=yo(),r=_e(),n=te();function t(i){const s=i.to??(typeof i.blobs[0]=="string"?"hex":"bytes"),o=typeof i.blobs[0]=="string"?i.blobs.map(f=>(0,r.hexToBytes)(f)):i.blobs,a=o.reduce((f,m)=>f+m.length,0),c=(0,e.createCursor)(new Uint8Array(a));let d=!0;for(const f of o){const m=(0,e.createCursor)(f);for(;d&&m.position<f.length;){m.incrementPosition(1);let v=31;f.length-m.position<31&&(v=f.length-m.position);for(const h in Array.from({length:v})){const b=m.readByte();if(b===128&&!m.inspectBytes(m.remaining).includes(128)){d=!1;break}c.pushByte(b)}}}const l=c.bytes.slice(0,c.position);return s==="hex"?(0,n.bytesToHex)(l):l}return Vc}var Wc={},Hh;function R6(){if(Hh)return Wc;Hh=1,Object.defineProperty(Wc,"__esModule",{value:!0}),Wc.sidecarsToVersionedHashes=r;const e=Td();function r(n){const{sidecars:t,version:i}=n,s=n.to??(typeof t[0].blob=="string"?"hex":"bytes"),o=[];for(const{commitment:a}of t)o.push((0,e.commitmentToVersionedHash)({commitment:a,to:s,version:i}));return o}return Wc}var Kc={},Fh;function O6(){if(Fh)return Kc;Fh=1,Object.defineProperty(Kc,"__esModule",{value:!0}),Kc.toCoinType=n;const e=ff(),r=2147483648;function n(t){if(t===1)return 60n;if(t>=r||t<0)throw new e.EnsInvalidChainIdError({chainId:t});return BigInt((2147483648|t)>>>0)}return Kc}var Zc={},kh;function Ag(){if(kh)return Zc;kh=1,Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.defineKzg=e;function e({blobToKzgCommitment:r,computeBlobKzgProof:n}){return{blobToKzgCommitment:r,computeBlobKzgProof:n}}return Zc}var Yc={},Nh;function x6(){if(Nh)return Yc;Nh=1,Object.defineProperty(Yc,"__esModule",{value:!0}),Yc.setupKzg=r;const e=Ag();function r(n,t){try{n.loadTrustedSetup(t)}catch(i){const s=i;if(!s.message.includes("trusted setup is already loaded"))throw s}return(0,e.defineKzg)(n)}return Yc}var Jc={},$h;function C6(){if($h)return Jc;$h=1,Object.defineProperty(Jc,"__esModule",{value:!0}),Jc.compactSignatureToSignature=n;const e=_e(),r=te();function n({r:t,yParityAndS:i}){const s=(0,e.hexToBytes)(i),o=s[0]&128?1:0,a=s;return o===1&&(a[0]&=127),{r:t,s:(0,r.bytesToHex)(a),yParity:o}}return Jc}var Xc={},zh;function q6(){if(zh)return Xc;zh=1,Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.parseCompactSignature=n;const e=qr(),r=te();function n(t){const{r:i,s}=e.secp256k1.Signature.fromCompact(t.slice(2,130));return{r:(0,r.numberToHex)(i,{size:32}),yParityAndS:(0,r.numberToHex)(s,{size:32})}}return Xc}var Qc={},Uh;function M6(){if(Uh)return Qc;Uh=1,Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.parseSignature=n;const e=qr(),r=te();function n(t){const{r:i,s}=e.secp256k1.Signature.fromCompact(t.slice(2,130)),o=+`0x${t.slice(130)}`,[a,c]=(()=>{if(o===0||o===1)return[void 0,o];if(o===27)return[BigInt(o),0];if(o===28)return[BigInt(o),1];throw new Error("Invalid yParityOrV value")})();return typeof a<"u"?{r:(0,r.numberToHex)(i,{size:32}),s:(0,r.numberToHex)(s,{size:32}),v:a,yParity:c}:{r:(0,r.numberToHex)(i,{size:32}),s:(0,r.numberToHex)(s,{size:32}),yParity:c}}return Qc}var eu={},Lh;function H6(){if(Lh)return eu;Lh=1,Object.defineProperty(eu,"__esModule",{value:!0}),eu.recoverTransactionAddress=i;const e=Xe(),r=Kd(),n=mu(),t=fr();async function i(s){const{serializedTransaction:o,signature:a}=s,c=(0,r.parseTransaction)(o),d=a??{r:c.r,s:c.s,v:c.v,yParity:c.yParity},l=(0,n.serializeTransaction)({...c,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await(0,t.recoverAddress)({hash:(0,e.keccak256)(l),signature:d})}return eu}var tu={},Dh;function F6(){if(Dh)return tu;Dh=1,Object.defineProperty(tu,"__esModule",{value:!0}),tu.serializeCompactSignature=n;const e=qr(),r=Be();function n({r:t,yParityAndS:i}){return`0x${new e.secp256k1.Signature((0,r.hexToBigInt)(t),(0,r.hexToBigInt)(i)).toCompactHex()}`}return tu}var ru={},Gh;function k6(){if(Gh)return ru;Gh=1,Object.defineProperty(ru,"__esModule",{value:!0}),ru.signatureToCompactSignature=n;const e=_e(),r=te();function n(t){const{r:i,s,v:o,yParity:a}=t,c=Number(a??o-27n);let d=s;if(c===1){const l=(0,e.hexToBytes)(s);l[0]|=128,d=(0,r.bytesToHex)(l)}return{r:i,yParityAndS:d}}return ru}var Vh;function $6(){return Vh||(Vh=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.maxInt8=e.universalSignatureValidatorByteCode=e.erc6492SignatureValidatorByteCode=e.deploylessCallViaFactoryBytecode=e.deploylessCallViaBytecodeBytecode=e.zeroHash=e.zeroAddress=e.ethAddress=e.multicall3Abi=e.universalSignatureValidatorAbi=e.erc6492SignatureValidatorAbi=e.erc4626Abi=e.erc1155Abi=e.erc721Abi=e.erc20Abi_bytes32=e.erc20Abi=e.webSocket=e.http=e.shouldThrow=e.fallback=e.custom=e.createTransport=e.walletActions=e.testActions=e.publicActions=e.createWalletClient=e.createTestClient=e.createPublicClient=e.rpcSchema=e.createClient=e.WaitForCallsStatusTimeoutError=e.getContract=e.UnknownTypeError=e.UnknownSignatureError=e.SolidityProtectedKeywordError=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=e.InvalidStructSignatureError=e.InvalidSignatureError=e.InvalidParenthesisError=e.InvalidParameterError=e.InvalidModifierError=e.InvalidFunctionModifierError=e.InvalidAbiTypeParameterError=e.InvalidAbiParametersError=e.InvalidAbiParameterError=e.InvalidAbiItemError=e.CircularReferenceError=void 0,e.maxUint152=e.maxUint144=e.maxUint136=e.maxUint128=e.maxUint120=e.maxUint112=e.maxUint104=e.maxUint96=e.maxUint88=e.maxUint80=e.maxUint72=e.maxUint64=e.maxUint56=e.maxUint48=e.maxUint40=e.maxUint32=e.maxUint24=e.maxUint16=e.maxUint8=e.maxInt256=e.maxInt248=e.maxInt240=e.maxInt232=e.maxInt224=e.maxInt216=e.maxInt208=e.maxInt200=e.maxInt192=e.maxInt184=e.maxInt176=e.maxInt168=e.maxInt160=e.maxInt152=e.maxInt144=e.maxInt136=e.maxInt128=e.maxInt120=e.maxInt112=e.maxInt104=e.maxInt96=e.maxInt88=e.maxInt80=e.maxInt72=e.maxInt64=e.maxInt56=e.maxInt48=e.maxInt40=e.maxInt32=e.maxInt24=e.maxInt16=void 0,e.AbiConstructorNotFoundError=e.weiUnits=e.gweiUnits=e.etherUnits=e.presignMessagePrefix=e.minInt256=e.minInt248=e.minInt240=e.minInt232=e.minInt224=e.minInt216=e.minInt208=e.minInt200=e.minInt192=e.minInt184=e.minInt176=e.minInt168=e.minInt160=e.minInt152=e.minInt144=e.minInt136=e.minInt128=e.minInt120=e.minInt112=e.minInt104=e.minInt96=e.minInt88=e.minInt80=e.minInt72=e.minInt64=e.minInt56=e.minInt48=e.minInt40=e.minInt32=e.minInt24=e.minInt16=e.minInt8=e.maxUint256=e.maxUint248=e.maxUint240=e.maxUint232=e.maxUint224=e.maxUint216=e.maxUint208=e.maxUint200=e.maxUint192=e.maxUint184=e.maxUint176=e.maxUint168=e.maxUint160=void 0,e.EnsAvatarUriResolutionError=e.EnsAvatarUnsupportedNamespaceError=e.EnsAvatarInvalidNftUriError=e.SizeOverflowError=e.InvalidHexValueError=e.InvalidHexBooleanError=e.InvalidBytesBooleanError=e.IntegerOutOfRangeError=e.SliceOffsetOutOfBoundsError=e.SizeExceedsPaddingSizeError=e.RawContractError=e.CounterfactualDeploymentFailedError=e.ContractFunctionZeroDataError=e.ContractFunctionRevertedError=e.ContractFunctionExecutionError=e.CallExecutionError=e.InvalidChainIdError=e.ClientChainNotConfiguredError=e.ChainNotFoundError=e.ChainMismatchError=e.ChainDoesNotSupportContract=e.BundleFailedError=e.BlockNotFoundError=e.setErrorConfig=e.BaseError=e.InvalidAddressError=e.UnsupportedPackedAbiType=e.InvalidDefinitionTypeError=e.InvalidArrayError=e.InvalidAbiEncodingTypeError=e.InvalidAbiDecodingTypeError=e.DecodeLogTopicsMismatch=e.DecodeLogDataMismatch=e.BytesSizeMismatchError=e.AbiFunctionSignatureNotFoundError=e.AbiFunctionOutputsNotFoundError=e.AbiFunctionNotFoundError=e.AbiEventSignatureNotFoundError=e.AbiEventSignatureEmptyTopicsError=e.AbiEventNotFoundError=e.AbiErrorSignatureNotFoundError=e.AbiErrorNotFoundError=e.AbiErrorInputsNotFoundError=e.AbiEncodingLengthMismatchError=e.AbiEncodingBytesSizeMismatchError=e.AbiEncodingArrayLengthMismatchError=e.AbiDecodingZeroDataError=e.AbiDecodingDataSizeTooSmallError=e.AbiDecodingDataSizeInvalidError=e.AbiConstructorParamsNotFoundError=void 0,e.UnsupportedProviderMethodError=e.UnsupportedNonOptionalCapabilityError=e.UnsupportedChainIdError=e.UnknownRpcError=e.UnknownBundleIdError=e.UnauthorizedProviderError=e.TransactionRejectedRpcError=e.SwitchChainError=e.RpcError=e.ResourceUnavailableRpcError=e.ResourceNotFoundRpcError=e.ProviderRpcError=e.ProviderDisconnectedError=e.ParseRpcError=e.MethodNotSupportedRpcError=e.MethodNotFoundRpcError=e.LimitExceededRpcError=e.JsonRpcVersionUnsupportedError=e.InvalidRequestRpcError=e.InvalidParamsRpcError=e.InvalidInputRpcError=e.InternalRpcError=e.DuplicateIdError=e.ChainDisconnectedError=e.BundleTooLargeError=e.AtomicReadyWalletRejectedUpgradeError=e.AtomicityNotSupportedError=e.WebSocketRequestError=e.TimeoutError=e.SocketClosedError=e.RpcRequestError=e.HttpRequestError=e.UnknownNodeError=e.TransactionTypeNotSupportedError=e.TipAboveFeeCapError=e.NonceTooLowError=e.NonceTooHighError=e.NonceMaxValueError=e.IntrinsicGasTooLowError=e.IntrinsicGasTooHighError=e.InsufficientFundsError=e.FeeCapTooLowError=e.FeeCapTooHighError=e.ExecutionRevertedError=e.FilterTypeNotSupportedError=e.MaxFeePerGasTooLowError=e.Eip1559FeesNotSupportedError=e.BaseFeeScalarError=e.EstimateGasExecutionError=e.EnsInvalidChainIdError=void 0,e.toBlobs=e.toBlobSidecars=e.sidecarsToVersionedHashes=e.fromBlobs=e.commitmentToVersionedHash=e.commitmentsToVersionedHashes=e.blobsToProofs=e.blobsToCommitments=e.isAddressEqual=e.isAddress=e.getCreateAddress=e.getCreate2Address=e.getContractAddress=e.getAddress=e.checksumAddress=e.prepareEncodeFunctionData=e.parseEventLogs=e.getAbiItem=e.encodePacked=e.encodeFunctionResult=e.encodeFunctionData=e.encodeEventTopics=e.encodeErrorResult=e.encodeDeployData=e.encodeAbiParameters=e.decodeFunctionResult=e.decodeFunctionData=e.decodeEventLog=e.decodeErrorResult=e.decodeDeployData=e.decodeAbiParameters=e.EIP1193ProviderRpcError=e.InvalidDecimalNumberError=e.InvalidStructTypeError=e.InvalidPrimaryTypeError=e.InvalidDomainError=e.UrlRequiredError=e.WaitForTransactionReceiptTimeoutError=e.TransactionReceiptNotFoundError=e.TransactionNotFoundError=e.TransactionExecutionError=e.InvalidStorageKeySizeError=e.InvalidSerializedTransactionTypeError=e.InvalidSerializedTransactionError=e.InvalidSerializableTransactionError=e.InvalidLegacyVError=e.FeeConflictError=e.StateAssignmentConflictError=e.AccountStateConflictError=e.UserRejectedRequestError=void 0,e.toCoinType=e.namehash=e.labelhash=e.toRlp=e.hexToRlp=e.bytesToRlp=e.toHex=e.stringToHex=e.numberToHex=e.bytesToHex=e.boolToHex=e.toBytes=e.stringToBytes=e.numberToBytes=e.hexToBytes=e.boolToBytes=e.fromRlp=e.hexToString=e.hexToNumber=e.hexToBool=e.hexToBigInt=e.fromHex=e.fromBytes=e.bytesToString=e.bytesToNumber=e.bytesToBool=e.bytesToBigInt=e.trim=e.sliceHex=e.sliceBytes=e.slice=e.size=e.padHex=e.padBytes=e.pad=e.isHex=e.isBytes=e.concatHex=e.concatBytes=e.concat=e.getChainContractAddress=e.extractChain=e.extendSchema=e.defineChain=e.assertCurrentChain=e.offchainLookupSignature=e.offchainLookupAbiItem=e.offchainLookup=e.ccipFetch=e.ccipRequest=void 0,e.recoverTransactionAddress=e.recoverPublicKey=e.recoverMessageAddress=e.recoverAddress=e.parseSignature=e.hexToSignature=e.parseErc8010Signature=e.parseErc6492Signature=e.parseCompactSignature=e.hexToCompactSignature=e.isErc8010Signature=e.isErc6492Signature=e.hashTypedData=e.hashStruct=e.hashDomain=e.hashMessage=e.compactSignatureToSignature=e.withTimeout=e.withRetry=e.withCache=e.nonceManager=e.createNonceManager=e.setupKzg=e.defineKzg=e.getFunctionSignature=e.toFunctionSignature=e.getFunctionSelector=e.toFunctionSelector=e.toFunctionHash=e.getEventSignature=e.toEventSignature=e.getEventSelector=e.toEventSelector=e.toEventHash=e.sha256=e.ripemd160=e.keccak256=e.isHash=e.rpcTransactionType=e.formatTransactionRequest=e.defineTransactionRequest=e.formatTransactionReceipt=e.defineTransactionReceipt=e.transactionType=e.formatTransaction=e.defineTransaction=e.formatLog=e.formatBlock=e.defineBlock=e.getContractError=void 0,e.parseUnits=e.parseGwei=e.parseEther=e.formatUnits=e.formatGwei=e.formatEther=e.validateTypedData=e.serializeTypedData=e.getTypesForEIP712Domain=e.domainSeparator=e.serializeTransaction=e.serializeAccessList=e.parseTransaction=e.getTransactionType=e.getSerializedTransactionType=e.assertTransactionLegacy=e.assertTransactionEIP2930=e.assertTransactionEIP1559=e.assertRequest=e.stringify=e.verifyTypedData=e.verifyMessage=e.verifyHash=e.toPrefixedMessage=e.signatureToCompactSignature=e.serializeSignature=e.signatureToHex=e.serializeErc8010Signature=e.serializeErc6492Signature=e.serializeCompactSignature=e.compactSignatureToHex=e.recoverTypedDataAddress=void 0;var r=tr();Object.defineProperty(e,"CircularReferenceError",{enumerable:!0,get:function(){return r.CircularReferenceError}}),Object.defineProperty(e,"InvalidAbiItemError",{enumerable:!0,get:function(){return r.InvalidAbiItemError}}),Object.defineProperty(e,"InvalidAbiParameterError",{enumerable:!0,get:function(){return r.InvalidAbiParameterError}}),Object.defineProperty(e,"InvalidAbiParametersError",{enumerable:!0,get:function(){return r.InvalidAbiParametersError}}),Object.defineProperty(e,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return r.InvalidAbiTypeParameterError}}),Object.defineProperty(e,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return r.InvalidFunctionModifierError}}),Object.defineProperty(e,"InvalidModifierError",{enumerable:!0,get:function(){return r.InvalidModifierError}}),Object.defineProperty(e,"InvalidParameterError",{enumerable:!0,get:function(){return r.InvalidParameterError}}),Object.defineProperty(e,"InvalidParenthesisError",{enumerable:!0,get:function(){return r.InvalidParenthesisError}}),Object.defineProperty(e,"InvalidSignatureError",{enumerable:!0,get:function(){return r.InvalidSignatureError}}),Object.defineProperty(e,"InvalidStructSignatureError",{enumerable:!0,get:function(){return r.InvalidStructSignatureError}}),Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return r.parseAbi}}),Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return r.parseAbiItem}}),Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return r.parseAbiParameter}}),Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return r.parseAbiParameters}}),Object.defineProperty(e,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return r.SolidityProtectedKeywordError}}),Object.defineProperty(e,"UnknownSignatureError",{enumerable:!0,get:function(){return r.UnknownSignatureError}}),Object.defineProperty(e,"UnknownTypeError",{enumerable:!0,get:function(){return r.UnknownTypeError}});var n=L_();Object.defineProperty(e,"getContract",{enumerable:!0,get:function(){return n.getContract}});var t=sf();Object.defineProperty(e,"WaitForCallsStatusTimeoutError",{enumerable:!0,get:function(){return t.WaitForCallsStatusTimeoutError}});var i=Ru();Object.defineProperty(e,"createClient",{enumerable:!0,get:function(){return i.createClient}}),Object.defineProperty(e,"rpcSchema",{enumerable:!0,get:function(){return i.rpcSchema}});var s=Sv();Object.defineProperty(e,"createPublicClient",{enumerable:!0,get:function(){return s.createPublicClient}});var o=i6();Object.defineProperty(e,"createTestClient",{enumerable:!0,get:function(){return o.createTestClient}});var a=j6();Object.defineProperty(e,"createWalletClient",{enumerable:!0,get:function(){return a.createWalletClient}});var c=vg();Object.defineProperty(e,"publicActions",{enumerable:!0,get:function(){return c.publicActions}});var d=Eg();Object.defineProperty(e,"testActions",{enumerable:!0,get:function(){return d.testActions}});var l=Pg();Object.defineProperty(e,"walletActions",{enumerable:!0,get:function(){return l.walletActions}});var f=Mo();Object.defineProperty(e,"createTransport",{enumerable:!0,get:function(){return f.createTransport}});var m=w6();Object.defineProperty(e,"custom",{enumerable:!0,get:function(){return m.custom}});var v=P6();Object.defineProperty(e,"fallback",{enumerable:!0,get:function(){return v.fallback}}),Object.defineProperty(e,"shouldThrow",{enumerable:!0,get:function(){return v.shouldThrow}});var h=A6();Object.defineProperty(e,"http",{enumerable:!0,get:function(){return h.http}});var b=T6();Object.defineProperty(e,"webSocket",{enumerable:!0,get:function(){return b.webSocket}});var _=dr();Object.defineProperty(e,"erc20Abi",{enumerable:!0,get:function(){return _.erc20Abi}}),Object.defineProperty(e,"erc20Abi_bytes32",{enumerable:!0,get:function(){return _.erc20Abi_bytes32}}),Object.defineProperty(e,"erc721Abi",{enumerable:!0,get:function(){return _.erc721Abi}}),Object.defineProperty(e,"erc1155Abi",{enumerable:!0,get:function(){return _.erc1155Abi}}),Object.defineProperty(e,"erc4626Abi",{enumerable:!0,get:function(){return _.erc4626Abi}}),Object.defineProperty(e,"erc6492SignatureValidatorAbi",{enumerable:!0,get:function(){return _.erc6492SignatureValidatorAbi}}),Object.defineProperty(e,"universalSignatureValidatorAbi",{enumerable:!0,get:function(){return _.erc6492SignatureValidatorAbi}}),Object.defineProperty(e,"multicall3Abi",{enumerable:!0,get:function(){return _.multicall3Abi}});var j=pg();Object.defineProperty(e,"ethAddress",{enumerable:!0,get:function(){return j.ethAddress}}),Object.defineProperty(e,"zeroAddress",{enumerable:!0,get:function(){return j.zeroAddress}});var g=hf();Object.defineProperty(e,"zeroHash",{enumerable:!0,get:function(){return g.zeroHash}});var P=wo();Object.defineProperty(e,"deploylessCallViaBytecodeBytecode",{enumerable:!0,get:function(){return P.deploylessCallViaBytecodeBytecode}}),Object.defineProperty(e,"deploylessCallViaFactoryBytecode",{enumerable:!0,get:function(){return P.deploylessCallViaFactoryBytecode}}),Object.defineProperty(e,"erc6492SignatureValidatorByteCode",{enumerable:!0,get:function(){return P.erc6492SignatureValidatorByteCode}}),Object.defineProperty(e,"universalSignatureValidatorByteCode",{enumerable:!0,get:function(){return P.erc6492SignatureValidatorByteCode}});var u=Pd();Object.defineProperty(e,"maxInt8",{enumerable:!0,get:function(){return u.maxInt8}}),Object.defineProperty(e,"maxInt16",{enumerable:!0,get:function(){return u.maxInt16}}),Object.defineProperty(e,"maxInt24",{enumerable:!0,get:function(){return u.maxInt24}}),Object.defineProperty(e,"maxInt32",{enumerable:!0,get:function(){return u.maxInt32}}),Object.defineProperty(e,"maxInt40",{enumerable:!0,get:function(){return u.maxInt40}}),Object.defineProperty(e,"maxInt48",{enumerable:!0,get:function(){return u.maxInt48}}),Object.defineProperty(e,"maxInt56",{enumerable:!0,get:function(){return u.maxInt56}}),Object.defineProperty(e,"maxInt64",{enumerable:!0,get:function(){return u.maxInt64}}),Object.defineProperty(e,"maxInt72",{enumerable:!0,get:function(){return u.maxInt72}}),Object.defineProperty(e,"maxInt80",{enumerable:!0,get:function(){return u.maxInt80}}),Object.defineProperty(e,"maxInt88",{enumerable:!0,get:function(){return u.maxInt88}}),Object.defineProperty(e,"maxInt96",{enumerable:!0,get:function(){return u.maxInt96}}),Object.defineProperty(e,"maxInt104",{enumerable:!0,get:function(){return u.maxInt104}}),Object.defineProperty(e,"maxInt112",{enumerable:!0,get:function(){return u.maxInt112}}),Object.defineProperty(e,"maxInt120",{enumerable:!0,get:function(){return u.maxInt120}}),Object.defineProperty(e,"maxInt128",{enumerable:!0,get:function(){return u.maxInt128}}),Object.defineProperty(e,"maxInt136",{enumerable:!0,get:function(){return u.maxInt136}}),Object.defineProperty(e,"maxInt144",{enumerable:!0,get:function(){return u.maxInt144}}),Object.defineProperty(e,"maxInt152",{enumerable:!0,get:function(){return u.maxInt152}}),Object.defineProperty(e,"maxInt160",{enumerable:!0,get:function(){return u.maxInt160}}),Object.defineProperty(e,"maxInt168",{enumerable:!0,get:function(){return u.maxInt168}}),Object.defineProperty(e,"maxInt176",{enumerable:!0,get:function(){return u.maxInt176}}),Object.defineProperty(e,"maxInt184",{enumerable:!0,get:function(){return u.maxInt184}}),Object.defineProperty(e,"maxInt192",{enumerable:!0,get:function(){return u.maxInt192}}),Object.defineProperty(e,"maxInt200",{enumerable:!0,get:function(){return u.maxInt200}}),Object.defineProperty(e,"maxInt208",{enumerable:!0,get:function(){return u.maxInt208}}),Object.defineProperty(e,"maxInt216",{enumerable:!0,get:function(){return u.maxInt216}}),Object.defineProperty(e,"maxInt224",{enumerable:!0,get:function(){return u.maxInt224}}),Object.defineProperty(e,"maxInt232",{enumerable:!0,get:function(){return u.maxInt232}}),Object.defineProperty(e,"maxInt240",{enumerable:!0,get:function(){return u.maxInt240}}),Object.defineProperty(e,"maxInt248",{enumerable:!0,get:function(){return u.maxInt248}}),Object.defineProperty(e,"maxInt256",{enumerable:!0,get:function(){return u.maxInt256}}),Object.defineProperty(e,"maxUint8",{enumerable:!0,get:function(){return u.maxUint8}}),Object.defineProperty(e,"maxUint16",{enumerable:!0,get:function(){return u.maxUint16}}),Object.defineProperty(e,"maxUint24",{enumerable:!0,get:function(){return u.maxUint24}}),Object.defineProperty(e,"maxUint32",{enumerable:!0,get:function(){return u.maxUint32}}),Object.defineProperty(e,"maxUint40",{enumerable:!0,get:function(){return u.maxUint40}}),Object.defineProperty(e,"maxUint48",{enumerable:!0,get:function(){return u.maxUint48}}),Object.defineProperty(e,"maxUint56",{enumerable:!0,get:function(){return u.maxUint56}}),Object.defineProperty(e,"maxUint64",{enumerable:!0,get:function(){return u.maxUint64}}),Object.defineProperty(e,"maxUint72",{enumerable:!0,get:function(){return u.maxUint72}}),Object.defineProperty(e,"maxUint80",{enumerable:!0,get:function(){return u.maxUint80}}),Object.defineProperty(e,"maxUint88",{enumerable:!0,get:function(){return u.maxUint88}}),Object.defineProperty(e,"maxUint96",{enumerable:!0,get:function(){return u.maxUint96}}),Object.defineProperty(e,"maxUint104",{enumerable:!0,get:function(){return u.maxUint104}}),Object.defineProperty(e,"maxUint112",{enumerable:!0,get:function(){return u.maxUint112}}),Object.defineProperty(e,"maxUint120",{enumerable:!0,get:function(){return u.maxUint120}}),Object.defineProperty(e,"maxUint128",{enumerable:!0,get:function(){return u.maxUint128}}),Object.defineProperty(e,"maxUint136",{enumerable:!0,get:function(){return u.maxUint136}}),Object.defineProperty(e,"maxUint144",{enumerable:!0,get:function(){return u.maxUint144}}),Object.defineProperty(e,"maxUint152",{enumerable:!0,get:function(){return u.maxUint152}}),Object.defineProperty(e,"maxUint160",{enumerable:!0,get:function(){return u.maxUint160}}),Object.defineProperty(e,"maxUint168",{enumerable:!0,get:function(){return u.maxUint168}}),Object.defineProperty(e,"maxUint176",{enumerable:!0,get:function(){return u.maxUint176}}),Object.defineProperty(e,"maxUint184",{enumerable:!0,get:function(){return u.maxUint184}}),Object.defineProperty(e,"maxUint192",{enumerable:!0,get:function(){return u.maxUint192}}),Object.defineProperty(e,"maxUint200",{enumerable:!0,get:function(){return u.maxUint200}}),Object.defineProperty(e,"maxUint208",{enumerable:!0,get:function(){return u.maxUint208}}),Object.defineProperty(e,"maxUint216",{enumerable:!0,get:function(){return u.maxUint216}}),Object.defineProperty(e,"maxUint224",{enumerable:!0,get:function(){return u.maxUint224}}),Object.defineProperty(e,"maxUint232",{enumerable:!0,get:function(){return u.maxUint232}}),Object.defineProperty(e,"maxUint240",{enumerable:!0,get:function(){return u.maxUint240}}),Object.defineProperty(e,"maxUint248",{enumerable:!0,get:function(){return u.maxUint248}}),Object.defineProperty(e,"maxUint256",{enumerable:!0,get:function(){return u.maxUint256}}),Object.defineProperty(e,"minInt8",{enumerable:!0,get:function(){return u.minInt8}}),Object.defineProperty(e,"minInt16",{enumerable:!0,get:function(){return u.minInt16}}),Object.defineProperty(e,"minInt24",{enumerable:!0,get:function(){return u.minInt24}}),Object.defineProperty(e,"minInt32",{enumerable:!0,get:function(){return u.minInt32}}),Object.defineProperty(e,"minInt40",{enumerable:!0,get:function(){return u.minInt40}}),Object.defineProperty(e,"minInt48",{enumerable:!0,get:function(){return u.minInt48}}),Object.defineProperty(e,"minInt56",{enumerable:!0,get:function(){return u.minInt56}}),Object.defineProperty(e,"minInt64",{enumerable:!0,get:function(){return u.minInt64}}),Object.defineProperty(e,"minInt72",{enumerable:!0,get:function(){return u.minInt72}}),Object.defineProperty(e,"minInt80",{enumerable:!0,get:function(){return u.minInt80}}),Object.defineProperty(e,"minInt88",{enumerable:!0,get:function(){return u.minInt88}}),Object.defineProperty(e,"minInt96",{enumerable:!0,get:function(){return u.minInt96}}),Object.defineProperty(e,"minInt104",{enumerable:!0,get:function(){return u.minInt104}}),Object.defineProperty(e,"minInt112",{enumerable:!0,get:function(){return u.minInt112}}),Object.defineProperty(e,"minInt120",{enumerable:!0,get:function(){return u.minInt120}}),Object.defineProperty(e,"minInt128",{enumerable:!0,get:function(){return u.minInt128}}),Object.defineProperty(e,"minInt136",{enumerable:!0,get:function(){return u.minInt136}}),Object.defineProperty(e,"minInt144",{enumerable:!0,get:function(){return u.minInt144}}),Object.defineProperty(e,"minInt152",{enumerable:!0,get:function(){return u.minInt152}}),Object.defineProperty(e,"minInt160",{enumerable:!0,get:function(){return u.minInt160}}),Object.defineProperty(e,"minInt168",{enumerable:!0,get:function(){return u.minInt168}}),Object.defineProperty(e,"minInt176",{enumerable:!0,get:function(){return u.minInt176}}),Object.defineProperty(e,"minInt184",{enumerable:!0,get:function(){return u.minInt184}}),Object.defineProperty(e,"minInt192",{enumerable:!0,get:function(){return u.minInt192}}),Object.defineProperty(e,"minInt200",{enumerable:!0,get:function(){return u.minInt200}}),Object.defineProperty(e,"minInt208",{enumerable:!0,get:function(){return u.minInt208}}),Object.defineProperty(e,"minInt216",{enumerable:!0,get:function(){return u.minInt216}}),Object.defineProperty(e,"minInt224",{enumerable:!0,get:function(){return u.minInt224}}),Object.defineProperty(e,"minInt232",{enumerable:!0,get:function(){return u.minInt232}}),Object.defineProperty(e,"minInt240",{enumerable:!0,get:function(){return u.minInt240}}),Object.defineProperty(e,"minInt248",{enumerable:!0,get:function(){return u.minInt248}}),Object.defineProperty(e,"minInt256",{enumerable:!0,get:function(){return u.minInt256}});var E=tg();Object.defineProperty(e,"presignMessagePrefix",{enumerable:!0,get:function(){return E.presignMessagePrefix}});var p=po();Object.defineProperty(e,"etherUnits",{enumerable:!0,get:function(){return p.etherUnits}}),Object.defineProperty(e,"gweiUnits",{enumerable:!0,get:function(){return p.gweiUnits}}),Object.defineProperty(e,"weiUnits",{enumerable:!0,get:function(){return p.weiUnits}});var y=Te();Object.defineProperty(e,"AbiConstructorNotFoundError",{enumerable:!0,get:function(){return y.AbiConstructorNotFoundError}}),Object.defineProperty(e,"AbiConstructorParamsNotFoundError",{enumerable:!0,get:function(){return y.AbiConstructorParamsNotFoundError}}),Object.defineProperty(e,"AbiDecodingDataSizeInvalidError",{enumerable:!0,get:function(){return y.AbiDecodingDataSizeInvalidError}}),Object.defineProperty(e,"AbiDecodingDataSizeTooSmallError",{enumerable:!0,get:function(){return y.AbiDecodingDataSizeTooSmallError}}),Object.defineProperty(e,"AbiDecodingZeroDataError",{enumerable:!0,get:function(){return y.AbiDecodingZeroDataError}}),Object.defineProperty(e,"AbiEncodingArrayLengthMismatchError",{enumerable:!0,get:function(){return y.AbiEncodingArrayLengthMismatchError}}),Object.defineProperty(e,"AbiEncodingBytesSizeMismatchError",{enumerable:!0,get:function(){return y.AbiEncodingBytesSizeMismatchError}}),Object.defineProperty(e,"AbiEncodingLengthMismatchError",{enumerable:!0,get:function(){return y.AbiEncodingLengthMismatchError}}),Object.defineProperty(e,"AbiErrorInputsNotFoundError",{enumerable:!0,get:function(){return y.AbiErrorInputsNotFoundError}}),Object.defineProperty(e,"AbiErrorNotFoundError",{enumerable:!0,get:function(){return y.AbiErrorNotFoundError}}),Object.defineProperty(e,"AbiErrorSignatureNotFoundError",{enumerable:!0,get:function(){return y.AbiErrorSignatureNotFoundError}}),Object.defineProperty(e,"AbiEventNotFoundError",{enumerable:!0,get:function(){return y.AbiEventNotFoundError}}),Object.defineProperty(e,"AbiEventSignatureEmptyTopicsError",{enumerable:!0,get:function(){return y.AbiEventSignatureEmptyTopicsError}}),Object.defineProperty(e,"AbiEventSignatureNotFoundError",{enumerable:!0,get:function(){return y.AbiEventSignatureNotFoundError}}),Object.defineProperty(e,"AbiFunctionNotFoundError",{enumerable:!0,get:function(){return y.AbiFunctionNotFoundError}}),Object.defineProperty(e,"AbiFunctionOutputsNotFoundError",{enumerable:!0,get:function(){return y.AbiFunctionOutputsNotFoundError}}),Object.defineProperty(e,"AbiFunctionSignatureNotFoundError",{enumerable:!0,get:function(){return y.AbiFunctionSignatureNotFoundError}}),Object.defineProperty(e,"BytesSizeMismatchError",{enumerable:!0,get:function(){return y.BytesSizeMismatchError}}),Object.defineProperty(e,"DecodeLogDataMismatch",{enumerable:!0,get:function(){return y.DecodeLogDataMismatch}}),Object.defineProperty(e,"DecodeLogTopicsMismatch",{enumerable:!0,get:function(){return y.DecodeLogTopicsMismatch}}),Object.defineProperty(e,"InvalidAbiDecodingTypeError",{enumerable:!0,get:function(){return y.InvalidAbiDecodingTypeError}}),Object.defineProperty(e,"InvalidAbiEncodingTypeError",{enumerable:!0,get:function(){return y.InvalidAbiEncodingTypeError}}),Object.defineProperty(e,"InvalidArrayError",{enumerable:!0,get:function(){return y.InvalidArrayError}}),Object.defineProperty(e,"InvalidDefinitionTypeError",{enumerable:!0,get:function(){return y.InvalidDefinitionTypeError}}),Object.defineProperty(e,"UnsupportedPackedAbiType",{enumerable:!0,get:function(){return y.UnsupportedPackedAbiType}});var A=vt();Object.defineProperty(e,"InvalidAddressError",{enumerable:!0,get:function(){return A.InvalidAddressError}});var w=ue();Object.defineProperty(e,"BaseError",{enumerable:!0,get:function(){return w.BaseError}}),Object.defineProperty(e,"setErrorConfig",{enumerable:!0,get:function(){return w.setErrorConfig}});var T=Yd();Object.defineProperty(e,"BlockNotFoundError",{enumerable:!0,get:function(){return T.BlockNotFoundError}});var O=qp();Object.defineProperty(e,"BundleFailedError",{enumerable:!0,get:function(){return O.BundleFailedError}});var B=_o();Object.defineProperty(e,"ChainDoesNotSupportContract",{enumerable:!0,get:function(){return B.ChainDoesNotSupportContract}}),Object.defineProperty(e,"ChainMismatchError",{enumerable:!0,get:function(){return B.ChainMismatchError}}),Object.defineProperty(e,"ChainNotFoundError",{enumerable:!0,get:function(){return B.ChainNotFoundError}}),Object.defineProperty(e,"ClientChainNotConfiguredError",{enumerable:!0,get:function(){return B.ClientChainNotConfiguredError}}),Object.defineProperty(e,"InvalidChainIdError",{enumerable:!0,get:function(){return B.InvalidChainIdError}});var S=sr();Object.defineProperty(e,"CallExecutionError",{enumerable:!0,get:function(){return S.CallExecutionError}}),Object.defineProperty(e,"ContractFunctionExecutionError",{enumerable:!0,get:function(){return S.ContractFunctionExecutionError}}),Object.defineProperty(e,"ContractFunctionRevertedError",{enumerable:!0,get:function(){return S.ContractFunctionRevertedError}}),Object.defineProperty(e,"ContractFunctionZeroDataError",{enumerable:!0,get:function(){return S.ContractFunctionZeroDataError}}),Object.defineProperty(e,"CounterfactualDeploymentFailedError",{enumerable:!0,get:function(){return S.CounterfactualDeploymentFailedError}}),Object.defineProperty(e,"RawContractError",{enumerable:!0,get:function(){return S.RawContractError}});var x=au();Object.defineProperty(e,"SizeExceedsPaddingSizeError",{enumerable:!0,get:function(){return x.SizeExceedsPaddingSizeError}}),Object.defineProperty(e,"SliceOffsetOutOfBoundsError",{enumerable:!0,get:function(){return x.SliceOffsetOutOfBoundsError}});var k=cn();Object.defineProperty(e,"IntegerOutOfRangeError",{enumerable:!0,get:function(){return k.IntegerOutOfRangeError}}),Object.defineProperty(e,"InvalidBytesBooleanError",{enumerable:!0,get:function(){return k.InvalidBytesBooleanError}}),Object.defineProperty(e,"InvalidHexBooleanError",{enumerable:!0,get:function(){return k.InvalidHexBooleanError}}),Object.defineProperty(e,"InvalidHexValueError",{enumerable:!0,get:function(){return k.InvalidHexValueError}}),Object.defineProperty(e,"SizeOverflowError",{enumerable:!0,get:function(){return k.SizeOverflowError}});var C=ff();Object.defineProperty(e,"EnsAvatarInvalidNftUriError",{enumerable:!0,get:function(){return C.EnsAvatarInvalidNftUriError}}),Object.defineProperty(e,"EnsAvatarUnsupportedNamespaceError",{enumerable:!0,get:function(){return C.EnsAvatarUnsupportedNamespaceError}}),Object.defineProperty(e,"EnsAvatarUriResolutionError",{enumerable:!0,get:function(){return C.EnsAvatarUriResolutionError}}),Object.defineProperty(e,"EnsInvalidChainIdError",{enumerable:!0,get:function(){return C.EnsInvalidChainIdError}});var I=Tp();Object.defineProperty(e,"EstimateGasExecutionError",{enumerable:!0,get:function(){return I.EstimateGasExecutionError}});var F=Io();Object.defineProperty(e,"BaseFeeScalarError",{enumerable:!0,get:function(){return F.BaseFeeScalarError}}),Object.defineProperty(e,"Eip1559FeesNotSupportedError",{enumerable:!0,get:function(){return F.Eip1559FeesNotSupportedError}}),Object.defineProperty(e,"MaxFeePerGasTooLowError",{enumerable:!0,get:function(){return F.MaxFeePerGasTooLowError}});var R=Ap();Object.defineProperty(e,"FilterTypeNotSupportedError",{enumerable:!0,get:function(){return R.FilterTypeNotSupportedError}});var q=Dt();Object.defineProperty(e,"ExecutionRevertedError",{enumerable:!0,get:function(){return q.ExecutionRevertedError}}),Object.defineProperty(e,"FeeCapTooHighError",{enumerable:!0,get:function(){return q.FeeCapTooHighError}}),Object.defineProperty(e,"FeeCapTooLowError",{enumerable:!0,get:function(){return q.FeeCapTooLowError}}),Object.defineProperty(e,"InsufficientFundsError",{enumerable:!0,get:function(){return q.InsufficientFundsError}}),Object.defineProperty(e,"IntrinsicGasTooHighError",{enumerable:!0,get:function(){return q.IntrinsicGasTooHighError}}),Object.defineProperty(e,"IntrinsicGasTooLowError",{enumerable:!0,get:function(){return q.IntrinsicGasTooLowError}}),Object.defineProperty(e,"NonceMaxValueError",{enumerable:!0,get:function(){return q.NonceMaxValueError}}),Object.defineProperty(e,"NonceTooHighError",{enumerable:!0,get:function(){return q.NonceTooHighError}}),Object.defineProperty(e,"NonceTooLowError",{enumerable:!0,get:function(){return q.NonceTooLowError}}),Object.defineProperty(e,"TipAboveFeeCapError",{enumerable:!0,get:function(){return q.TipAboveFeeCapError}}),Object.defineProperty(e,"TransactionTypeNotSupportedError",{enumerable:!0,get:function(){return q.TransactionTypeNotSupportedError}}),Object.defineProperty(e,"UnknownNodeError",{enumerable:!0,get:function(){return q.UnknownNodeError}});var M=jt();Object.defineProperty(e,"HttpRequestError",{enumerable:!0,get:function(){return M.HttpRequestError}}),Object.defineProperty(e,"RpcRequestError",{enumerable:!0,get:function(){return M.RpcRequestError}}),Object.defineProperty(e,"SocketClosedError",{enumerable:!0,get:function(){return M.SocketClosedError}}),Object.defineProperty(e,"TimeoutError",{enumerable:!0,get:function(){return M.TimeoutError}}),Object.defineProperty(e,"WebSocketRequestError",{enumerable:!0,get:function(){return M.WebSocketRequestError}});var H=cr();Object.defineProperty(e,"AtomicityNotSupportedError",{enumerable:!0,get:function(){return H.AtomicityNotSupportedError}}),Object.defineProperty(e,"AtomicReadyWalletRejectedUpgradeError",{enumerable:!0,get:function(){return H.AtomicReadyWalletRejectedUpgradeError}}),Object.defineProperty(e,"BundleTooLargeError",{enumerable:!0,get:function(){return H.BundleTooLargeError}}),Object.defineProperty(e,"ChainDisconnectedError",{enumerable:!0,get:function(){return H.ChainDisconnectedError}}),Object.defineProperty(e,"DuplicateIdError",{enumerable:!0,get:function(){return H.DuplicateIdError}}),Object.defineProperty(e,"InternalRpcError",{enumerable:!0,get:function(){return H.InternalRpcError}}),Object.defineProperty(e,"InvalidInputRpcError",{enumerable:!0,get:function(){return H.InvalidInputRpcError}}),Object.defineProperty(e,"InvalidParamsRpcError",{enumerable:!0,get:function(){return H.InvalidParamsRpcError}}),Object.defineProperty(e,"InvalidRequestRpcError",{enumerable:!0,get:function(){return H.InvalidRequestRpcError}}),Object.defineProperty(e,"JsonRpcVersionUnsupportedError",{enumerable:!0,get:function(){return H.JsonRpcVersionUnsupportedError}}),Object.defineProperty(e,"LimitExceededRpcError",{enumerable:!0,get:function(){return H.LimitExceededRpcError}}),Object.defineProperty(e,"MethodNotFoundRpcError",{enumerable:!0,get:function(){return H.MethodNotFoundRpcError}}),Object.defineProperty(e,"MethodNotSupportedRpcError",{enumerable:!0,get:function(){return H.MethodNotSupportedRpcError}}),Object.defineProperty(e,"ParseRpcError",{enumerable:!0,get:function(){return H.ParseRpcError}}),Object.defineProperty(e,"ProviderDisconnectedError",{enumerable:!0,get:function(){return H.ProviderDisconnectedError}}),Object.defineProperty(e,"ProviderRpcError",{enumerable:!0,get:function(){return H.ProviderRpcError}}),Object.defineProperty(e,"ResourceNotFoundRpcError",{enumerable:!0,get:function(){return H.ResourceNotFoundRpcError}}),Object.defineProperty(e,"ResourceUnavailableRpcError",{enumerable:!0,get:function(){return H.ResourceUnavailableRpcError}}),Object.defineProperty(e,"RpcError",{enumerable:!0,get:function(){return H.RpcError}}),Object.defineProperty(e,"SwitchChainError",{enumerable:!0,get:function(){return H.SwitchChainError}}),Object.defineProperty(e,"TransactionRejectedRpcError",{enumerable:!0,get:function(){return H.TransactionRejectedRpcError}}),Object.defineProperty(e,"UnauthorizedProviderError",{enumerable:!0,get:function(){return H.UnauthorizedProviderError}}),Object.defineProperty(e,"UnknownBundleIdError",{enumerable:!0,get:function(){return H.UnknownBundleIdError}}),Object.defineProperty(e,"UnknownRpcError",{enumerable:!0,get:function(){return H.UnknownRpcError}}),Object.defineProperty(e,"UnsupportedChainIdError",{enumerable:!0,get:function(){return H.UnsupportedChainIdError}}),Object.defineProperty(e,"UnsupportedNonOptionalCapabilityError",{enumerable:!0,get:function(){return H.UnsupportedNonOptionalCapabilityError}}),Object.defineProperty(e,"UnsupportedProviderMethodError",{enumerable:!0,get:function(){return H.UnsupportedProviderMethodError}}),Object.defineProperty(e,"UserRejectedRequestError",{enumerable:!0,get:function(){return H.UserRejectedRequestError}});var N=xd();Object.defineProperty(e,"AccountStateConflictError",{enumerable:!0,get:function(){return N.AccountStateConflictError}}),Object.defineProperty(e,"StateAssignmentConflictError",{enumerable:!0,get:function(){return N.StateAssignmentConflictError}});var z=Je();Object.defineProperty(e,"FeeConflictError",{enumerable:!0,get:function(){return z.FeeConflictError}}),Object.defineProperty(e,"InvalidLegacyVError",{enumerable:!0,get:function(){return z.InvalidLegacyVError}}),Object.defineProperty(e,"InvalidSerializableTransactionError",{enumerable:!0,get:function(){return z.InvalidSerializableTransactionError}}),Object.defineProperty(e,"InvalidSerializedTransactionError",{enumerable:!0,get:function(){return z.InvalidSerializedTransactionError}}),Object.defineProperty(e,"InvalidSerializedTransactionTypeError",{enumerable:!0,get:function(){return z.InvalidSerializedTransactionTypeError}}),Object.defineProperty(e,"InvalidStorageKeySizeError",{enumerable:!0,get:function(){return z.InvalidStorageKeySizeError}}),Object.defineProperty(e,"TransactionExecutionError",{enumerable:!0,get:function(){return z.TransactionExecutionError}}),Object.defineProperty(e,"TransactionNotFoundError",{enumerable:!0,get:function(){return z.TransactionNotFoundError}}),Object.defineProperty(e,"TransactionReceiptNotFoundError",{enumerable:!0,get:function(){return z.TransactionReceiptNotFoundError}}),Object.defineProperty(e,"WaitForTransactionReceiptTimeoutError",{enumerable:!0,get:function(){return z.WaitForTransactionReceiptTimeoutError}});var $=Pf();Object.defineProperty(e,"UrlRequiredError",{enumerable:!0,get:function(){return $.UrlRequiredError}});var U=ng();Object.defineProperty(e,"InvalidDomainError",{enumerable:!0,get:function(){return U.InvalidDomainError}}),Object.defineProperty(e,"InvalidPrimaryTypeError",{enumerable:!0,get:function(){return U.InvalidPrimaryTypeError}}),Object.defineProperty(e,"InvalidStructTypeError",{enumerable:!0,get:function(){return U.InvalidStructTypeError}});var G=fg();Object.defineProperty(e,"InvalidDecimalNumberError",{enumerable:!0,get:function(){return G.InvalidDecimalNumberError}});var K=I6();Object.defineProperty(e,"EIP1193ProviderRpcError",{enumerable:!0,get:function(){return K.ProviderRpcError}});var W=ar();Object.defineProperty(e,"decodeAbiParameters",{enumerable:!0,get:function(){return W.decodeAbiParameters}});var V=S6();Object.defineProperty(e,"decodeDeployData",{enumerable:!0,get:function(){return V.decodeDeployData}});var J=pu();Object.defineProperty(e,"decodeErrorResult",{enumerable:!0,get:function(){return J.decodeErrorResult}});var oe=Ro();Object.defineProperty(e,"decodeEventLog",{enumerable:!0,get:function(){return oe.decodeEventLog}});var Y=zd();Object.defineProperty(e,"decodeFunctionData",{enumerable:!0,get:function(){return Y.decodeFunctionData}});var X=Wt();Object.defineProperty(e,"decodeFunctionResult",{enumerable:!0,get:function(){return X.decodeFunctionResult}});var ee=Et();Object.defineProperty(e,"encodeAbiParameters",{enumerable:!0,get:function(){return ee.encodeAbiParameters}});var ie=Po();Object.defineProperty(e,"encodeDeployData",{enumerable:!0,get:function(){return ie.encodeDeployData}});var re=Ud();Object.defineProperty(e,"encodeErrorResult",{enumerable:!0,get:function(){return re.encodeErrorResult}});var se=Mr();Object.defineProperty(e,"encodeEventTopics",{enumerable:!0,get:function(){return se.encodeEventTopics}});var de=et();Object.defineProperty(e,"encodeFunctionData",{enumerable:!0,get:function(){return de.encodeFunctionData}});var Q=Ld();Object.defineProperty(e,"encodeFunctionResult",{enumerable:!0,get:function(){return Q.encodeFunctionResult}});var Z=Lp();Object.defineProperty(e,"encodePacked",{enumerable:!0,get:function(){return Z.encodePacked}});var Ce=Vt();Object.defineProperty(e,"getAbiItem",{enumerable:!0,get:function(){return Ce.getAbiItem}});var Ie=Oo();Object.defineProperty(e,"parseEventLogs",{enumerable:!0,get:function(){return Ie.parseEventLogs}});var xe=_p();Object.defineProperty(e,"prepareEncodeFunctionData",{enumerable:!0,get:function(){return xe.prepareEncodeFunctionData}});var Re=at();Object.defineProperty(e,"checksumAddress",{enumerable:!0,get:function(){return Re.checksumAddress}}),Object.defineProperty(e,"getAddress",{enumerable:!0,get:function(){return Re.getAddress}});var He=Dp();Object.defineProperty(e,"getContractAddress",{enumerable:!0,get:function(){return He.getContractAddress}}),Object.defineProperty(e,"getCreate2Address",{enumerable:!0,get:function(){return He.getCreate2Address}}),Object.defineProperty(e,"getCreateAddress",{enumerable:!0,get:function(){return He.getCreateAddress}});var Ve=Qe();Object.defineProperty(e,"isAddress",{enumerable:!0,get:function(){return Ve.isAddress}});var lt=Pt();Object.defineProperty(e,"isAddressEqual",{enumerable:!0,get:function(){return lt.isAddressEqual}});var ct=uu();Object.defineProperty(e,"blobsToCommitments",{enumerable:!0,get:function(){return ct.blobsToCommitments}});var ut=du();Object.defineProperty(e,"blobsToProofs",{enumerable:!0,get:function(){return ut.blobsToProofs}});var We=Id();Object.defineProperty(e,"commitmentsToVersionedHashes",{enumerable:!0,get:function(){return We.commitmentsToVersionedHashes}});var qe=Td();Object.defineProperty(e,"commitmentToVersionedHash",{enumerable:!0,get:function(){return qe.commitmentToVersionedHash}});var At=B6();Object.defineProperty(e,"fromBlobs",{enumerable:!0,get:function(){return At.fromBlobs}});var bt=R6();Object.defineProperty(e,"sidecarsToVersionedHashes",{enumerable:!0,get:function(){return bt.sidecarsToVersionedHashes}});var ln=fu();Object.defineProperty(e,"toBlobSidecars",{enumerable:!0,get:function(){return ln.toBlobSidecars}});var Ho=sp();Object.defineProperty(e,"toBlobs",{enumerable:!0,get:function(){return Ho.toBlobs}});var mr=Dd();Object.defineProperty(e,"ccipRequest",{enumerable:!0,get:function(){return mr.ccipRequest}}),Object.defineProperty(e,"ccipFetch",{enumerable:!0,get:function(){return mr.ccipRequest}}),Object.defineProperty(e,"offchainLookup",{enumerable:!0,get:function(){return mr.offchainLookup}}),Object.defineProperty(e,"offchainLookupAbiItem",{enumerable:!0,get:function(){return mr.offchainLookupAbiItem}}),Object.defineProperty(e,"offchainLookupSignature",{enumerable:!0,get:function(){return mr.offchainLookupSignature}});var Fo=vo();Object.defineProperty(e,"assertCurrentChain",{enumerable:!0,get:function(){return Fo.assertCurrentChain}});var ko=Xh();Object.defineProperty(e,"defineChain",{enumerable:!0,get:function(){return ko.defineChain}}),Object.defineProperty(e,"extendSchema",{enumerable:!0,get:function(){return ko.extendSchema}});var Cu=up();Object.defineProperty(e,"extractChain",{enumerable:!0,get:function(){return Cu.extractChain}});var No=or();Object.defineProperty(e,"getChainContractAddress",{enumerable:!0,get:function(){return No.getChainContractAddress}});var bn=Me();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return bn.concat}}),Object.defineProperty(e,"concatBytes",{enumerable:!0,get:function(){return bn.concatBytes}}),Object.defineProperty(e,"concatHex",{enumerable:!0,get:function(){return bn.concatHex}});var qu=lf();Object.defineProperty(e,"isBytes",{enumerable:!0,get:function(){return qu.isBytes}});var Mu=Ge();Object.defineProperty(e,"isHex",{enumerable:!0,get:function(){return Mu.isHex}});var mn=rr();Object.defineProperty(e,"pad",{enumerable:!0,get:function(){return mn.pad}}),Object.defineProperty(e,"padBytes",{enumerable:!0,get:function(){return mn.padBytes}}),Object.defineProperty(e,"padHex",{enumerable:!0,get:function(){return mn.padHex}});var Hu=Ye();Object.defineProperty(e,"size",{enumerable:!0,get:function(){return Hu.size}});var yn=ft();Object.defineProperty(e,"slice",{enumerable:!0,get:function(){return yn.slice}}),Object.defineProperty(e,"sliceBytes",{enumerable:!0,get:function(){return yn.sliceBytes}}),Object.defineProperty(e,"sliceHex",{enumerable:!0,get:function(){return yn.sliceHex}});var Fu=Ut();Object.defineProperty(e,"trim",{enumerable:!0,get:function(){return Fu.trim}});var yr=Od();Object.defineProperty(e,"bytesToBigInt",{enumerable:!0,get:function(){return yr.bytesToBigInt}}),Object.defineProperty(e,"bytesToBool",{enumerable:!0,get:function(){return yr.bytesToBool}}),Object.defineProperty(e,"bytesToNumber",{enumerable:!0,get:function(){return yr.bytesToNumber}}),Object.defineProperty(e,"bytesToString",{enumerable:!0,get:function(){return yr.bytesToString}}),Object.defineProperty(e,"fromBytes",{enumerable:!0,get:function(){return yr.fromBytes}});var hr=Be();Object.defineProperty(e,"fromHex",{enumerable:!0,get:function(){return hr.fromHex}}),Object.defineProperty(e,"hexToBigInt",{enumerable:!0,get:function(){return hr.hexToBigInt}}),Object.defineProperty(e,"hexToBool",{enumerable:!0,get:function(){return hr.hexToBool}}),Object.defineProperty(e,"hexToNumber",{enumerable:!0,get:function(){return hr.hexToNumber}}),Object.defineProperty(e,"hexToString",{enumerable:!0,get:function(){return hr.hexToString}});var ku=Gd();Object.defineProperty(e,"fromRlp",{enumerable:!0,get:function(){return ku.fromRlp}});var pr=_e();Object.defineProperty(e,"boolToBytes",{enumerable:!0,get:function(){return pr.boolToBytes}}),Object.defineProperty(e,"hexToBytes",{enumerable:!0,get:function(){return pr.hexToBytes}}),Object.defineProperty(e,"numberToBytes",{enumerable:!0,get:function(){return pr.numberToBytes}}),Object.defineProperty(e,"stringToBytes",{enumerable:!0,get:function(){return pr.stringToBytes}}),Object.defineProperty(e,"toBytes",{enumerable:!0,get:function(){return pr.toBytes}});var gr=te();Object.defineProperty(e,"boolToHex",{enumerable:!0,get:function(){return gr.boolToHex}}),Object.defineProperty(e,"bytesToHex",{enumerable:!0,get:function(){return gr.bytesToHex}}),Object.defineProperty(e,"numberToHex",{enumerable:!0,get:function(){return gr.numberToHex}}),Object.defineProperty(e,"stringToHex",{enumerable:!0,get:function(){return gr.stringToHex}}),Object.defineProperty(e,"toHex",{enumerable:!0,get:function(){return gr.toHex}});var hn=ho();Object.defineProperty(e,"bytesToRlp",{enumerable:!0,get:function(){return hn.bytesToRlp}}),Object.defineProperty(e,"hexToRlp",{enumerable:!0,get:function(){return hn.hexToRlp}}),Object.defineProperty(e,"toRlp",{enumerable:!0,get:function(){return hn.toRlp}});var Nu=kp();Object.defineProperty(e,"labelhash",{enumerable:!0,get:function(){return Nu.labelhash}});var $u=uf();Object.defineProperty(e,"namehash",{enumerable:!0,get:function(){return $u.namehash}});var pn=O6();Object.defineProperty(e,"toCoinType",{enumerable:!0,get:function(){return pn.toCoinType}});var zu=lr();Object.defineProperty(e,"getContractError",{enumerable:!0,get:function(){return zu.getContractError}});var $o=su();Object.defineProperty(e,"defineBlock",{enumerable:!0,get:function(){return $o.defineBlock}}),Object.defineProperty(e,"formatBlock",{enumerable:!0,get:function(){return $o.formatBlock}});var Uu=Lt();Object.defineProperty(e,"formatLog",{enumerable:!0,get:function(){return Uu.formatLog}});var gn=un();Object.defineProperty(e,"defineTransaction",{enumerable:!0,get:function(){return gn.defineTransaction}}),Object.defineProperty(e,"formatTransaction",{enumerable:!0,get:function(){return gn.formatTransaction}}),Object.defineProperty(e,"transactionType",{enumerable:!0,get:function(){return gn.transactionType}});var zo=mo();Object.defineProperty(e,"defineTransactionReceipt",{enumerable:!0,get:function(){return zo.defineTransactionReceipt}}),Object.defineProperty(e,"formatTransactionReceipt",{enumerable:!0,get:function(){return zo.formatTransactionReceipt}});var kr=_t();Object.defineProperty(e,"defineTransactionRequest",{enumerable:!0,get:function(){return kr.defineTransactionRequest}}),Object.defineProperty(e,"formatTransactionRequest",{enumerable:!0,get:function(){return kr.formatTransactionRequest}}),Object.defineProperty(e,"rpcTransactionType",{enumerable:!0,get:function(){return kr.rpcTransactionType}});var Lu=Vd();Object.defineProperty(e,"isHash",{enumerable:!0,get:function(){return Lu.isHash}});var Du=Xe();Object.defineProperty(e,"keccak256",{enumerable:!0,get:function(){return Du.keccak256}});var Gu=Vp();Object.defineProperty(e,"ripemd160",{enumerable:!0,get:function(){return Gu.ripemd160}});var Vu=Ad();Object.defineProperty(e,"sha256",{enumerable:!0,get:function(){return Vu.sha256}});var Wu=Wp();Object.defineProperty(e,"toEventHash",{enumerable:!0,get:function(){return Wu.toEventHash}});var Uo=dn();Object.defineProperty(e,"toEventSelector",{enumerable:!0,get:function(){return Uo.toEventSelector}}),Object.defineProperty(e,"getEventSelector",{enumerable:!0,get:function(){return Uo.toEventSelector}});var Af=Kp();Object.defineProperty(e,"toEventSignature",{enumerable:!0,get:function(){return Af.toEventSignature}}),Object.defineProperty(e,"getEventSignature",{enumerable:!0,get:function(){return Af.toEventSignature}});var Tg=Zp();Object.defineProperty(e,"toFunctionHash",{enumerable:!0,get:function(){return Tg.toFunctionHash}});var Tf=xr();Object.defineProperty(e,"toFunctionSelector",{enumerable:!0,get:function(){return Tf.toFunctionSelector}}),Object.defineProperty(e,"getFunctionSelector",{enumerable:!0,get:function(){return Tf.toFunctionSelector}});var If=Yp();Object.defineProperty(e,"toFunctionSignature",{enumerable:!0,get:function(){return If.toFunctionSignature}}),Object.defineProperty(e,"getFunctionSignature",{enumerable:!0,get:function(){return If.toFunctionSignature}});var Ig=Ag();Object.defineProperty(e,"defineKzg",{enumerable:!0,get:function(){return Ig.defineKzg}});var Sg=x6();Object.defineProperty(e,"setupKzg",{enumerable:!0,get:function(){return Sg.setupKzg}});var Sf=Jp();Object.defineProperty(e,"createNonceManager",{enumerable:!0,get:function(){return Sf.createNonceManager}}),Object.defineProperty(e,"nonceManager",{enumerable:!0,get:function(){return Sf.nonceManager}});var Bg=xp();Object.defineProperty(e,"withCache",{enumerable:!0,get:function(){return Bg.withCache}});var Rg=Bu();Object.defineProperty(e,"withRetry",{enumerable:!0,get:function(){return Rg.withRetry}});var Og=bf();Object.defineProperty(e,"withTimeout",{enumerable:!0,get:function(){return Og.withTimeout}});var xg=C6();Object.defineProperty(e,"compactSignatureToSignature",{enumerable:!0,get:function(){return xg.compactSignatureToSignature}});var Cg=Co();Object.defineProperty(e,"hashMessage",{enumerable:!0,get:function(){return Cg.hashMessage}});var Ku=qo();Object.defineProperty(e,"hashDomain",{enumerable:!0,get:function(){return Ku.hashDomain}}),Object.defineProperty(e,"hashStruct",{enumerable:!0,get:function(){return Ku.hashStruct}}),Object.defineProperty(e,"hashTypedData",{enumerable:!0,get:function(){return Ku.hashTypedData}});var qg=pf();Object.defineProperty(e,"isErc6492Signature",{enumerable:!0,get:function(){return qg.isErc6492Signature}});var Mg=gf();Object.defineProperty(e,"isErc8010Signature",{enumerable:!0,get:function(){return Mg.isErc8010Signature}});var Bf=q6();Object.defineProperty(e,"hexToCompactSignature",{enumerable:!0,get:function(){return Bf.parseCompactSignature}}),Object.defineProperty(e,"parseCompactSignature",{enumerable:!0,get:function(){return Bf.parseCompactSignature}});var Hg=og();Object.defineProperty(e,"parseErc6492Signature",{enumerable:!0,get:function(){return Hg.parseErc6492Signature}});var Fg=ig();Object.defineProperty(e,"parseErc8010Signature",{enumerable:!0,get:function(){return Fg.parseErc8010Signature}});var Rf=M6();Object.defineProperty(e,"hexToSignature",{enumerable:!0,get:function(){return Rf.parseSignature}}),Object.defineProperty(e,"parseSignature",{enumerable:!0,get:function(){return Rf.parseSignature}});var kg=fr();Object.defineProperty(e,"recoverAddress",{enumerable:!0,get:function(){return kg.recoverAddress}});var Ng=_f();Object.defineProperty(e,"recoverMessageAddress",{enumerable:!0,get:function(){return Ng.recoverMessageAddress}});var $g=Fd();Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return $g.recoverPublicKey}});var zg=H6();Object.defineProperty(e,"recoverTransactionAddress",{enumerable:!0,get:function(){return zg.recoverTransactionAddress}});var Ug=vf();Object.defineProperty(e,"recoverTypedDataAddress",{enumerable:!0,get:function(){return Ug.recoverTypedDataAddress}});var Of=F6();Object.defineProperty(e,"compactSignatureToHex",{enumerable:!0,get:function(){return Of.serializeCompactSignature}}),Object.defineProperty(e,"serializeCompactSignature",{enumerable:!0,get:function(){return Of.serializeCompactSignature}});var Lg=ag();Object.defineProperty(e,"serializeErc6492Signature",{enumerable:!0,get:function(){return Lg.serializeErc6492Signature}});var Dg=sg();Object.defineProperty(e,"serializeErc8010Signature",{enumerable:!0,get:function(){return Dg.serializeErc8010Signature}});var xf=wp();Object.defineProperty(e,"signatureToHex",{enumerable:!0,get:function(){return xf.serializeSignature}}),Object.defineProperty(e,"serializeSignature",{enumerable:!0,get:function(){return xf.serializeSignature}});var Gg=k6();Object.defineProperty(e,"signatureToCompactSignature",{enumerable:!0,get:function(){return Gg.signatureToCompactSignature}});var Vg=rg();Object.defineProperty(e,"toPrefixedMessage",{enumerable:!0,get:function(){return Vg.toPrefixedMessage}});var Wg=cg();Object.defineProperty(e,"verifyHash",{enumerable:!0,get:function(){return Wg.verifyHash}});var Kg=ug();Object.defineProperty(e,"verifyMessage",{enumerable:!0,get:function(){return Kg.verifyMessage}});var Zg=dg();Object.defineProperty(e,"verifyTypedData",{enumerable:!0,get:function(){return Zg.verifyTypedData}});var Yg=ke();Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return Yg.stringify}});var Jg=wt();Object.defineProperty(e,"assertRequest",{enumerable:!0,get:function(){return Jg.assertRequest}});var Zu=lu();Object.defineProperty(e,"assertTransactionEIP1559",{enumerable:!0,get:function(){return Zu.assertTransactionEIP1559}}),Object.defineProperty(e,"assertTransactionEIP2930",{enumerable:!0,get:function(){return Zu.assertTransactionEIP2930}}),Object.defineProperty(e,"assertTransactionLegacy",{enumerable:!0,get:function(){return Zu.assertTransactionLegacy}});var Xg=Wd();Object.defineProperty(e,"getSerializedTransactionType",{enumerable:!0,get:function(){return Xg.getSerializedTransactionType}});var Qg=bu();Object.defineProperty(e,"getTransactionType",{enumerable:!0,get:function(){return Qg.getTransactionType}});var e_=Kd();Object.defineProperty(e,"parseTransaction",{enumerable:!0,get:function(){return e_.parseTransaction}});var t_=Sd();Object.defineProperty(e,"serializeAccessList",{enumerable:!0,get:function(){return t_.serializeAccessList}});var r_=mu();Object.defineProperty(e,"serializeTransaction",{enumerable:!0,get:function(){return r_.serializeTransaction}});var Lo=Ou();Object.defineProperty(e,"domainSeparator",{enumerable:!0,get:function(){return Lo.domainSeparator}}),Object.defineProperty(e,"getTypesForEIP712Domain",{enumerable:!0,get:function(){return Lo.getTypesForEIP712Domain}}),Object.defineProperty(e,"serializeTypedData",{enumerable:!0,get:function(){return Lo.serializeTypedData}}),Object.defineProperty(e,"validateTypedData",{enumerable:!0,get:function(){return Lo.validateTypedData}});var n_=go();Object.defineProperty(e,"formatEther",{enumerable:!0,get:function(){return n_.formatEther}});var o_=Rr();Object.defineProperty(e,"formatGwei",{enumerable:!0,get:function(){return o_.formatGwei}});var i_=cu();Object.defineProperty(e,"formatUnits",{enumerable:!0,get:function(){return i_.formatUnits}});var a_=lg();Object.defineProperty(e,"parseEther",{enumerable:!0,get:function(){return a_.parseEther}});var s_=bg();Object.defineProperty(e,"parseGwei",{enumerable:!0,get:function(){return s_.parseGwei}});var c_=xu();Object.defineProperty(e,"parseUnits",{enumerable:!0,get:function(){return c_.parseUnits}})}(fd)),fd}export{ir as A,qd as B,ur as C,wt as D,np as E,R_ as F,O_ as G,vu as H,yp as I,St as J,Ne as K,x_ as L,mp as M,st as N,Md as O,_u as P,gu as Q,C_ as R,hp as S,F_ as T,k_ as U,bu as V,Kd as W,pp as X,wu as Y,me as Z,$6 as _,Pd as a,Be as b,_e as c,te as d,su as e,Lt as f,un as g,mo as h,_t as i,ue as j,vt as k,_o as l,Qe as m,Me as n,ho as o,mu as p,rr as q,Xh as r,Ad as s,Ut as t,Dt as u,Sd as v,vo as w,up as x,or as y,Ae as z};
|