@dcl/shop 0.1.0-29111888971.commit-e1b927a → 0.1.0-29111917255.commit-e6715c3
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/{AnimatedBackground-XZF9g9Bk.js → AnimatedBackground-BYKnsBtz.js} +3 -3
- package/assets/{Assets-CZPTo1jO.js → Assets-ClVmauZ2.js} +1 -1
- package/assets/{Button-B2TDtyup.js → Button-CgZSqnGW.js} +1 -1
- package/assets/{Cart-DhU4_S6H.js → Cart-Up06p7ew.js} +1 -1
- package/assets/{CircularProgress-Cf__730y.js → CircularProgress-BbGH0RSH.js} +1 -1
- package/assets/{Collection-CRBxkkqX.js → Collection-DvK8DQsK.js} +1 -1
- package/assets/{ConstantsUtil-DrWe0yob.js → ConstantsUtil-CiDezLbv.js} +1 -1
- package/assets/{Creator-DO__19RD.js → Creator-ClUMhdS6.js} +1 -1
- package/assets/{ExchangeController-txwSQL2Z.js → ExchangeController-DdSsjFTm.js} +1 -1
- package/assets/{GetCredits-DS1z5pyp.js → GetCredits-7W0xZLwI.js} +2 -2
- package/assets/{HelpersUtil-CMysbO5y.js → HelpersUtil-CbFvbY-T.js} +1 -1
- package/assets/{ImportListings-ChNZ2UwM.js → ImportListings-tpyUcfqZ.js} +1 -1
- package/assets/ItemDetail-CZQ3QPE1.js +2 -0
- package/assets/{Market-Z4jp-uLb.js → Market-CRtp3AGM.js} +1 -1
- package/assets/{MenuItem-B4U0TYKf.js → MenuItem-BLQsL8Vh.js} +1 -1
- package/assets/{MyAssets-C7QdtDYF.js → MyAssets-Cp2z98Lz.js} +1 -1
- package/assets/{MyFavorites-Bu2IDcdJ.js → MyFavorites-_R79W8pO.js} +1 -1
- package/assets/{MyPurchases-CDUC3XzQ.js → MyPurchases-DJYHRbWz.js} +1 -1
- package/assets/{NetworkUtil-Ddexw9-U.js → NetworkUtil-DDES604E.js} +1 -1
- package/assets/{NotFound-D5sXjRPf.js → NotFound-6FTGg4R1.js} +1 -1
- package/assets/{RealCheckout-DBL3uxEj.js → RealCheckout-BemiXyZF.js} +1 -1
- package/assets/{ShopFooterInner-BHh4OUAv.js → ShopFooterInner-KJ2oezRg.js} +2 -2
- package/assets/{Success-BrvAPmP4.js → Success-CXjLiyYm.js} +1 -1
- package/assets/{SvgIcon-Cg5l4LDh.js → SvgIcon-DtxoFXOd.js} +1 -1
- package/assets/{SwapController-BDZMxnNb.js → SwapController-C07T-0ls.js} +1 -1
- package/assets/{TradeService-CkLYTYcJ.js → TradeService-D4PrM9vt.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-D4DCXtQm.js → W3MFrameProviderSingleton-DXEpVsCm.js} +3 -3
- package/assets/{WebCryptoP256-OE37a6hF.js → WebCryptoP256-B1xyhPdr.js} +1 -1
- package/assets/{basic-SUHSB6nZ.js → basic-Dq4Wpic2.js} +1 -1
- package/assets/{biconomy-C6flCXA4.js → biconomy-BQtB5Ab0.js} +1 -1
- package/assets/{buy-YkuLG1h7.js → buy-6ORWjZW_.js} +1 -1
- package/assets/{buy-gasless-gRmZHjsE.js → buy-gasless-DL6o_Lwi.js} +1 -1
- package/assets/{ccip-7fqLW_t2.js → ccip-DgHj7djR.js} +1 -1
- package/assets/{ccip-ByQiZ_aq.js → ccip-Zo_y8Ko9.js} +1 -1
- package/assets/{chains-CMJ6lVMG.js → chains-Bk629xE3.js} +1 -1
- package/assets/{collection-2CKCNH2O.js → collection-B8w_ujSk.js} +1 -1
- package/assets/{common-GsSQn_vD.js → common-CEkVtB9E.js} +1 -1
- package/assets/{controller-BO0zre2A.js → controller-CNZZBumM.js} +2 -2
- package/assets/{core-D-mQUZ3X.js → core-C_RCjMc6.js} +4 -4
- package/assets/{custom-C6VO1Je_.js → custom-BM-_NC1p.js} +1 -1
- package/assets/{data-capture-DdxbO7dd.js → data-capture-Clu_u_4e.js} +1 -1
- package/assets/decimals-C7k-JLnD.js +1 -0
- package/assets/{decimals-Di7mGY-D.js → decimals-DYUDFeSV.js} +1 -1
- package/assets/{detectExtension-DsE82Ej6.js → detectExtension-b3FK4NnW.js} +1 -1
- package/assets/{email-BTEyDEk6.js → email-C0z3A7sK.js} +1 -1
- package/assets/{embedded-wallet-QGoIGdCB.js → embedded-wallet-COvvX2Qp.js} +1 -1
- package/assets/{engine-Bjifrd8K.js → engine-Cs_nlYqC.js} +1 -1
- package/assets/{estimate-l1-fee-Bqou6JLl.js → estimate-l1-fee-oTYMvZsv.js} +1 -1
- package/assets/eth_estimateGas-D2h2NKDU.js +1 -0
- package/assets/{eth_getStorageAt-B-cqm2CG.js → eth_getStorageAt-nxicedso.js} +1 -1
- package/assets/eth_getTransactionCount-CYYgSGiU.js +1 -0
- package/assets/{ethereum-CjiWK1L5.js → ethereum-CdeRZR9J.js} +1 -1
- package/assets/{ethers-DHDSyreX.js → ethers-JeCAM1sd.js} +1 -1
- package/assets/{extractIPFS-C5EI4cZz.js → extractIPFS-DzIizex4.js} +1 -1
- package/assets/{features-U-ULFF0v.js → features-Ck7HAsYI.js} +1 -1
- package/assets/{fetchTokenMetadata-DHc2WWGs.js → fetchTokenMetadata-CvdEl9__.js} +2 -2
- package/assets/{generateUtilityClasses-BAjjhm6X.js → generateUtilityClasses-C3jgMIyn.js} +1 -1
- package/assets/get-ecosystem-wallet-info-B4ca6uUn.js +1 -0
- package/assets/{getBalance-C8i1-K0c.js → getBalance-BS9M_tBF.js} +2 -2
- package/assets/{getInstalledModules-BXhbS0To.js → getInstalledModules-TJvbccgJ.js} +1 -1
- package/assets/{getNFT-CzHwZ4FU.js → getNFT-BlQFGY94.js} +2 -2
- package/assets/{getNFT-D3XSi6wm.js → getNFT-Xlc7XB2G.js} +1 -1
- package/assets/{hashTypedData-DX5YrpbP.js → hashTypedData-B7sBgfoL.js} +1 -1
- package/assets/{hashTypedData-BOc0w62Q.js → hashTypedData-CEYoWftx.js} +1 -1
- package/assets/{import-BulayqYM.js → import-J8FWHnju.js} +1 -1
- package/assets/{in-app-wallet-calls-BI0pU06-.js → in-app-wallet-calls-GDlqBGpw.js} +1 -1
- package/assets/{index-GAmNssSM.js → index-2dkhZZEZ.js} +1 -1
- package/assets/{index-BZ5hUBd_.js → index-6YdbHDXd.js} +1 -1
- package/assets/{index-CzfG6alx.js → index-B0PvzweT.js} +1 -1
- package/assets/{index-DQx-sY_c.js → index-B11b--Yh.js} +1 -1
- package/assets/{index-BKSTjS_b.js → index-B5Oqojt4.js} +1 -1
- package/assets/{index-D4VlTBkw.js → index-B5nwKjyJ.js} +1 -1
- package/assets/{index-n-cFV5ht.js → index-B6-wCRdo.js} +1 -1
- package/assets/{index-DIMSfymy.js → index-BA1ToKo5.js} +3 -3
- package/assets/{index-D3hzhbb8.js → index-BBTg_Taa.js} +1 -1
- package/assets/{index-CkHNiFzW.js → index-BLF3lLRE.js} +1 -1
- package/assets/{index--_rHc9Od.js → index-BNjQhTuO.js} +1 -1
- package/assets/{index-Qzch3HJ1.js → index-BNsmSCur.js} +1 -1
- package/assets/{index-BOQwd6ZB.js → index-BRAKTMPG.js} +1 -1
- package/assets/{index-BOwZsNrV.js → index-B_xrDWUL.js} +1 -1
- package/assets/{index-DhBdPYnK.js → index-BcvgfIV4.js} +1 -1
- package/assets/{index-CdfeQ7YK.js → index-BcyJUD4U.js} +1 -1
- package/assets/{index-ULMMROQ0.js → index-BeymNI6W.js} +1 -1
- package/assets/{index-DjPU0-Js.js → index-BgtBi25O.js} +1 -1
- package/assets/{index-CIPKmOlZ.js → index-Bj-x5N2U.js} +1 -1
- package/assets/{index-Pp2oEhTr.js → index-Blc7OGRU.js} +1 -1
- package/assets/{index-LSZxonl2.js → index-BnrCQ-kr.js} +1 -1
- package/assets/{index-jYazATJj.js → index-Bu2DcNS5.js} +1 -1
- package/assets/{index-C6FQ8I_Q.js → index-C9P6N44e.js} +2 -2
- package/assets/{index-C7-iTfFV.js → index-CI_HQD35.js} +25 -25
- package/assets/{index-C2U9pe20.js → index-CMib98th.js} +1 -1
- package/assets/{index-DacKA042.js → index-CPc95Sx-.js} +1 -1
- package/assets/{index-DShBCYos.js → index-CS7PjWbj.js} +3 -3
- package/assets/{index-BuKyqX4w.js → index-CSh-BHOv.js} +1 -1
- package/assets/{index-DV4p99KA.js → index-CZ8lEqAg.js} +2 -2
- package/assets/{index-CxyR8sie.js → index-ChHYiWiR.js} +1 -1
- package/assets/{index-CDMAFM2h.js → index-CkCZBr-g.js} +1 -1
- package/assets/{index-CMavzzI_.js → index-Cl4u62mB.js} +1 -1
- package/assets/{index-CbJmVQBN.js → index-CoACJ04N.js} +1 -1
- package/assets/{index-C2OMQVG4.js → index-CptRe6qL.js} +2 -2
- package/assets/{index-YfJF6hV4.js → index-CxQiq4b6.js} +1 -1
- package/assets/{index-CcQfGUgB.js → index-Cye62OPB.js} +1 -1
- package/assets/{index-BLQJ40Mi.js → index-D-lax9BR.js} +1 -1
- package/assets/{index-BlEd83Li.js → index-DA60UT_n.js} +1 -1
- package/assets/{index-CzFnbzvY.js → index-DFJdN6PH.js} +1 -1
- package/assets/{index-D5qOQwpy.js → index-DGSeBOvG.js} +1 -1
- package/assets/{index-DtrBN21c.js → index-DSUWwVug.js} +1 -1
- package/assets/{index-Eb-Zd0F2.js → index-DUnXGO0a.js} +1 -1
- package/assets/{index-CiIXwK1P.js → index-DWEAO5Zp.js} +1 -1
- package/assets/{index-BF6unOoT.js → index-DWk4e-hQ.js} +1 -1
- package/assets/{index-DJyoXp5I.js → index-DZ8SABwK.js} +1 -1
- package/assets/{index-2NUAW7ds.js → index-D_vsPbWD.js} +1 -1
- package/assets/{index-DlllSUoB.js → index-DjbM69kL.js} +1 -1
- package/assets/{index-CkVoCPEe.js → index-DnPCa8RK.js} +1 -1
- package/assets/{index-BNH6Xzon.js → index-DoS7CfZ4.js} +2 -2
- package/assets/{index-DOTYPGXa.js → index-Dv6YT5k2.js} +1 -1
- package/assets/{index-DIw62AgP.js → index-S-U9uSud.js} +1 -1
- package/assets/{index-IfYZnKCO.js → index-_AHcKVpB.js} +1 -1
- package/assets/{index-Bo6hVxzu.js → index-dE2OwwEn.js} +1 -1
- package/assets/{index-BaSqmd6J.js → index-pJLySSiV.js} +1 -1
- package/assets/{index-CENZ1Xjd.js → index-t3MAsdpb.js} +1 -1
- package/assets/{index-kxu93Of2.js → index-ulcskxUh.js} +1 -1
- package/assets/{index-DS8DYtub.js → index-yq7Vx7EH.js} +1 -1
- package/assets/{index.es-DnMpNe4m.js → index.es-BQrA1NgE.js} +4 -4
- package/assets/{index.es-IGCEipYb.js → index.es-CbOKB2xh.js} +1 -1
- package/assets/{index.es-Dk6KC5kj.js → index.es-Cz73nZm3.js} +1 -1
- package/assets/{localBatchGatewayRequest-BLJAP4fw.js → localBatchGatewayRequest-DVz1EzYT.js} +1 -1
- package/assets/{mana-rate-DkxpKYLQ.js → mana-rate-PT3JDtK4.js} +1 -1
- package/assets/{native-7uSYstXA.js → native-C_y7cRlS.js} +1 -1
- package/assets/network-Bdkbzo_l.js +1 -0
- package/assets/{networks-Bc_Uf_7y.js → networks-DVx7-Y5v.js} +1 -1
- package/assets/{onramp-DnhEoZl6.js → onramp-DWqw8mwD.js} +1 -1
- package/assets/{openzeppelin-DwFpqgXP.js → openzeppelin-B2NGugOR.js} +1 -1
- package/assets/{ownerOf-Qq7Or7yc.js → ownerOf-BoMFaGBI.js} +1 -1
- package/assets/{parseNft-B-POJxiL.js → parseNft-DdgcBV60.js} +2 -2
- package/assets/{parseSignature-ClLI6O4f.js → parseSignature-BMBhmj1o.js} +3 -3
- package/assets/{parseSignature-kOoafZEo.js → parseSignature-Cu4M83H5.js} +1 -1
- package/assets/{pay-with-exchange-BZR4RMBZ.js → pay-with-exchange-B3xXFySH.js} +1 -1
- package/assets/{qr-overlay-9WMDd_PO.js → qr-overlay-DXC6ldlf.js} +1 -1
- package/assets/{receive-CtJWuhGM.js → receive-C-M9SmxL.js} +1 -1
- package/assets/{resolveImplementation-BJatMhHh.js → resolveImplementation-D1Bqtnhr.js} +1 -1
- package/assets/{rpc-BA0W82l4.js → rpc-DE1f6rs1.js} +1 -1
- package/assets/{secp256k1-B82Rx-TY.js → secp256k1-B39Q-Q6x.js} +1 -1
- package/assets/{secp256k1-DFslM7tB.js → secp256k1-CrKymG_Q.js} +1 -1
- package/assets/{secp256k1-DHqlJ8nk.js → secp256k1-D1Tuv2c6.js} +1 -1
- package/assets/{send-DXVwWcB5.js → send-C1EU45CZ.js} +1 -1
- package/assets/{send-batch-transaction-D1j9aZww.js → send-batch-transaction-BTFORkZH.js} +1 -1
- package/assets/{send-eip712-transaction-CrryJAyV.js → send-eip712-transaction-CJ_pjExq.js} +2 -2
- package/assets/{send-gasless-transaction-B7YcLCGg.js → send-gasless-transaction-CHYN-ATV.js} +2 -2
- package/assets/{sendRawTransaction-DT-ObNx8.js → sendRawTransaction-YUhe5FDd.js} +3 -3
- package/assets/{serializeTransaction-DawhfTu0.js → serializeTransaction-xu35AVgP.js} +1 -1
- package/assets/{session-proposal-lgMupzDT.js → session-proposal-BZLBnV_x.js} +1 -1
- package/assets/{session-request-DacijEHD.js → session-request-mA9oQfs4.js} +2 -2
- package/assets/{sha256-BxR-wXll.js → sha256-De0VIEFf.js} +1 -1
- package/assets/{signing-CoPa7cSW.js → signing-DqVkCMNZ.js} +5 -5
- package/assets/{socials-CMh8u0Ej.js → socials-BImUXGbF.js} +1 -1
- package/assets/{swaps-B0Q00kKq.js → swaps-B8Tuo6Pt.js} +1 -1
- package/assets/{thirdweb-9c12J_EF.js → thirdweb-BPuxSwTj.js} +3 -3
- package/assets/{totalSupply-BCZn9Djj.js → totalSupply-Bbiy7170.js} +1 -1
- package/assets/{transactionReceipt-C2iQ3ozz.js → transactionReceipt-BcAWHNof.js} +1 -1
- package/assets/{transactions-Dqx74UWQ.js → transactions-N8K1pD5P.js} +1 -1
- package/assets/{useInfiniteGrid-DgSsqvQS.js → useInfiniteGrid-CVs5pP6I.js} +1 -1
- package/assets/{utils-nbkSUjEy.js → utils-BmX8TqzP.js} +1 -1
- package/assets/{verifyHash-BVbpPoSf.js → verifyHash-CnnSGyZz.js} +1 -1
- package/assets/{w3m-modal-DvCL5Oh_.js → w3m-modal-DJII43ig.js} +1 -1
- package/assets/{w3m-modal-CGHylzdj.js → w3m-modal-DWJdJGvu.js} +1 -1
- package/assets/{wait-for-tx-receipt-Dm2aAIs1.js → wait-for-tx-receipt-D0UsY_wi.js} +1 -1
- package/assets/{wallet-kind-vciDs8sO.js → wallet-kind-C-lIAMBM.js} +1 -1
- package/assets/{wallets-D8labJv_.js → wallets-KGduOTOw.js} +6 -6
- package/assets/{web-connector-C9MeCxtf.js → web-connector-Ca9PblTL.js} +3 -3
- package/assets/{writeContract-C3IzBPhR.js → writeContract-dj4TlIky.js} +1 -1
- package/assets/{zora-sepolia-BQEmh41Y.js → zora-sepolia-kNKNf7Kl.js} +1 -1
- package/assets/{zoraTestnet-CduWQC79.js → zoraTestnet-BhynxBH0.js} +1 -1
- package/index.html +8 -8
- package/package.json +2 -2
- package/assets/ItemDetail-Do5cjFW8.js +0 -2
- package/assets/decimals-ByIlBo-2.js +0 -1
- package/assets/eth_estimateGas-CarYiSgL.js +0 -1
- package/assets/eth_getTransactionCount-Dfx3JW2Q.js +0 -1
- package/assets/get-ecosystem-wallet-info-CWcGnKL4.js +0 -1
- package/assets/network-DsCGVBhE.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{bV as rt,bW as wt,bX as xt,K as Wt,bY as nt,bZ as st,b_ as it,L as Ht,b$ as Ft,c0 as Pt,c1 as x,c2 as Yt,c3 as H,c4 as w,c5 as l,c6 as b,c7 as p,c8 as vt,c9 as qt,ca as It,cb as m,cc as $t,cd as Gt,ce as ot,cf as g,cg as Zt,ch as Xt,ci as Jt,cj as Qt,ck as Kt,cl as B,cm as At,cn as te,co as S,cp as F,cq as O,cr as ee,cs as V,bU as re,ct as ne,aQ as k,b8 as se,aI as U,az as Y,b9 as R,bi as Et,aq as ie,aK as oe,aX as at,am as ae,cu as ce,ay as ue,aA as fe,C as de,x as le}from"./sendRawTransaction-DT-ObNx8.js";import{a7 as ct,a9 as he,ac as ye,$ as pe,af as ut,ad as me,ay as Bt,a1 as ft,a8 as be}from"./NetworkUtil-Ddexw9-U.js";import{s as ge}from"./secp256k1-DFslM7tB.js";function Vr(t){const e={formatters:void 0,fees:void 0,serializers:void 0,...t};function n(r){return s=>{const i=typeof s=="function"?s(r):s,o={...r,...i};return Object.assign(o,{extend:n(o)})}}return Object.assign(e,{extend:n(e)})}function kr(){return{}}function dt(t){let e;if(typeof t=="string")e=rt(t);else{const n=wt(t),r=t.length;for(let s=0;s<r;s++){const i=t[s];if(!xt(i)){e=rt(i,n);break}}}if(!e)throw new Wt({signature:t});return e}function lt(t){const e=[];if(typeof t=="string"){const n=nt(t),r=n.length;for(let s=0;s<r;s++)e.push(st(n[s],{modifiers:it}))}else{const n=wt(t),r=t.length;for(let s=0;s<r;s++){const i=t[s];if(xt(i))continue;const o=nt(i),a=o.length;for(let u=0;u<a;u++)e.push(st(o[u],{modifiers:it,structs:n}))}}if(e.length===0)throw new Ht({params:t});return e}function q(t,e={}){const{as:n=typeof t=="string"?"Hex":"Bytes"}=e,r=Ft(Pt(t));return n==="Bytes"?r:x(r)}function Ur(t,e={}){const{as:n=typeof t=="string"?"Hex":"Bytes"}=e,r=Yt(Pt(t));return n==="Bytes"?r:x(r)}function Tr(t){return H(t)&&w(t)===32}const we={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 ve({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new Pe({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new ht({offset:t});const e=this.position-t;this.assertPosition(e),this.position=e},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new ht({offset:t});const e=this.position+t;this.assertPosition(e),this.position=e},inspectByte(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectBytes(t,e){const n=e??this.position;return this.assertPosition(n+t-1),this.bytes.subarray(n,n+t)},inspectUint8(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectUint16(t){const e=t??this.position;return this.assertPosition(e+1),this.dataView.getUint16(e)},inspectUint24(t){const e=t??this.position;return this.assertPosition(e+2),(this.dataView.getUint16(e)<<8)+this.dataView.getUint8(e+2)},inspectUint32(t){const e=t??this.position;return this.assertPosition(e+3),this.dataView.getUint32(e)},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,e){this.assertReadLimit(),this._touch();const n=this.inspectBytes(t);return this.position+=e??t,n},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 e=this.position;return this.assertPosition(t),this.position=t,()=>this.position=e},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}};function xe(t,{recursiveReadLimit:e=8192}={}){const n=Object.create(we);return n.bytes=t,n.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=e,n}class ht extends l{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class Pe extends l{constructor({length:e,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}class ve extends l{constructor({count:e,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}class Ie extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const n=super.get(e);return super.has(e)&&n!==void 0&&(this.delete(e),super.set(e,n)),n}set(e,n){if(super.set(e,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}}const $e={checksum:new Ie(8192)},N=$e.checksum;function St(t,e={}){const{compressed:n}=e,{prefix:r,x:s,y:i}=t;if(n===!1||typeof s=="bigint"&&typeof i=="bigint"){if(r!==4)throw new yt({prefix:r,cause:new Se});return}if(n===!0||typeof s=="bigint"&&typeof i>"u"){if(r!==3&&r!==2)throw new yt({prefix:r,cause:new Be});return}throw new Ee({publicKey:t})}function _r(t){const e=(()=>{if(H(t))return zt(t);if(qt(t))return Ae(t);const{prefix:n,x:r,y:s}=t;return typeof r=="bigint"&&typeof s=="bigint"?{prefix:n??4,x:r,y:s}:{prefix:n,x:r}})();return St(e),e}function Ae(t){return zt(x(t))}function zt(t){if(t.length!==132&&t.length!==130&&t.length!==68)throw new ze({publicKey:t});if(t.length===130){const r=BigInt(m(t,0,32)),s=BigInt(m(t,32,64));return{prefix:4,x:r,y:s}}if(t.length===132){const r=Number(m(t,0,1)),s=BigInt(m(t,1,33)),i=BigInt(m(t,33,65));return{prefix:r,x:s,y:i}}const e=Number(m(t,0,1)),n=BigInt(m(t,1,33));return{prefix:e,x:n}}function Mr(t,e={}){return vt(Ct(t,e))}function Ct(t,e={}){St(t);const{prefix:n,x:r,y:s}=t,{includePrefix:i=!0}=e;return b(i?p(n,{size:1}):"0x",p(r,{size:32}),typeof s=="bigint"?p(s,{size:32}):"0x")}class Ee extends l{constructor({publicKey:e}){super(`Value \`${It(e)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}class yt extends l{constructor({prefix:e,cause:n}){super(`Prefix "${e}" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}class Be extends l{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}class Se extends l{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}let ze=class extends l{constructor({publicKey:e}){super(`Value \`${e}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${w($t(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}};const Ce=/^0x[a-fA-F0-9]{40}$/;function v(t,e={}){const{strict:n=!0}=e;if(!Ce.test(t))throw new pt({address:t,cause:new Re});if(n){if(t.toLowerCase()===t)return;if(G(t)!==t)throw new pt({address:t,cause:new Le})}}function G(t){if(N.has(t))return N.get(t);v(t,{strict:!1});const e=t.substring(2).toLowerCase(),n=q(Gt(e),{as:"Bytes"}),r=e.split("");for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&r[i]&&(r[i]=r[i].toUpperCase()),(n[i>>1]&15)>=8&&r[i+1]&&(r[i+1]=r[i+1].toUpperCase());const s=`0x${r.join("")}`;return N.set(t,s),s}function Oe(t,e={}){const{checksum:n=!1}=e;return v(t),n?G(t):t}function Wr(t,e={}){const n=q(`0x${Ct(t).slice(4)}`).substring(26);return Oe(`0x${n}`,e)}function Hr(t,e){return v(t,{strict:!1}),v(e,{strict:!1}),t.toLowerCase()===e.toLowerCase()}function T(t,e={}){const{strict:n=!0}=e??{};try{return v(t,{strict:n}),!0}catch{return!1}}class pt extends l{constructor({address:e,cause:n}){super(`Address "${e}" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class Re extends l{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class Le extends l{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}const Ne=/^(.*)\[([0-9]*)\]$/,je=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Ot=/^(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)?$/,mt=2n**256n-1n;function Z(t,e={}){const{recovered:n}=e;if(typeof t.r>"u")throw new j({signature:t});if(typeof t.s>"u")throw new j({signature:t});if(n&&typeof t.yParity>"u")throw new j({signature:t});if(t.r<0n||t.r>mt)throw new We({value:t.r});if(t.s<0n||t.s>mt)throw new He({value:t.s});if(typeof t.yParity=="number"&&t.yParity!==0&&t.yParity!==1)throw new L({value:t.yParity})}function Ve(t){return Rt(x(t))}function Rt(t){if(t.length!==130&&t.length!==132)throw new De({signature:t});const e=BigInt(m(t,0,32)),n=BigInt(m(t,32,64)),r=(()=>{const s=+`0x${t.slice(130)}`;if(!Number.isNaN(s))try{return X(s)}catch{throw new L({value:s})}})();return typeof r>"u"?{r:e,s:n}:{r:e,s:n,yParity:r}}function ke(t){if(!(typeof t.r>"u")&&!(typeof t.s>"u"))return Lt(t)}function Lt(t){const e=typeof t=="string"?Rt(t):t instanceof Uint8Array?Ve(t):typeof t.r=="string"?Te(t):t.v?Ue(t):{r:t.r,s:t.s,...typeof t.yParity<"u"?{yParity:t.yParity}:{}};return Z(e),e}function Ue(t){return{r:t.r,s:t.s,yParity:X(t.v)}}function Te(t){const e=(()=>{const n=t.v?Number(t.v):void 0;let r=t.yParity?Number(t.yParity):void 0;if(typeof n=="number"&&typeof r!="number"&&(r=X(n)),typeof r!="number")throw new L({value:t.yParity});return r})();return{r:BigInt(t.r),s:BigInt(t.s),yParity:e}}function Fr(t){const[e,n,r]=t;return Lt({r:n==="0x"?0n:BigInt(n),s:r==="0x"?0n:BigInt(r),yParity:e==="0x"?0:Number(e)})}function Yr(t){Z(t);const e=t.r,n=t.s;return b(p(e,{size:32}),p(n,{size:32}),typeof t.yParity=="number"?p(Me(t.yParity),{size:1}):"0x")}function _e(t){const{r:e,s:n,yParity:r}=t;return{r:p(e,{size:32}),s:p(n,{size:32}),yParity:r===0?"0x0":"0x1"}}function qr(t){const{r:e,s:n,yParity:r}=t;return[r?"0x01":"0x",e===0n?"0x":ot(p(e)),n===0n?"0x":ot(p(n))]}function X(t){if(t===0||t===27)return 0;if(t===1||t===28)return 1;if(t>=35)return t%2===0?1:0;throw new Fe({value:t})}function Me(t){if(t===0)return 27;if(t===1)return 28;throw new L({value:t})}class De extends l{constructor({signature:e}){super(`Value \`${e}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${w($t(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class j extends l{constructor({signature:e}){super(`Signature \`${It(e)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class We extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class He extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class L extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class Fe extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}function E(t,e,n){const{checksumAddress:r,staticPosition:s}=n,i=K(e.type);if(i){const[o,a]=i;return qe(t,{...e,type:a},{checksumAddress:r,length:o,staticPosition:s})}if(e.type==="tuple")return Je(t,e,{checksumAddress:r,staticPosition:s});if(e.type==="address")return Ye(t,{checksum:r});if(e.type==="bool")return Ge(t);if(e.type.startsWith("bytes"))return Ze(t,e,{staticPosition:s});if(e.type.startsWith("uint")||e.type.startsWith("int"))return Xe(t,e);if(e.type==="string")return Qe(t,{staticPosition:s});throw new tt(e.type)}const bt=32,_=32;function Ye(t,e={}){const{checksum:n=!1}=e,r=t.readBytes(32);return[(i=>n?G(i):i)(x(Zt(r,-20))),32]}function qe(t,e,n){const{checksumAddress:r,length:s,staticPosition:i}=n;if(!s){const u=g(t.readBytes(_)),c=i+u,f=c+bt;t.setPosition(c);const d=g(t.readBytes(bt)),y=z(e);let h=0;const $=[];for(let P=0;P<d;++P){t.setPosition(f+(y?P*32:h));const[C,Dt]=E(t,e,{checksumAddress:r,staticPosition:f});h+=Dt,$.push(C)}return t.setPosition(i+32),[$,32]}if(z(e)){const u=g(t.readBytes(_)),c=i+u,f=[];for(let d=0;d<s;++d){t.setPosition(c+d*32);const[y]=E(t,e,{checksumAddress:r,staticPosition:c});f.push(y)}return t.setPosition(i+32),[f,32]}let o=0;const a=[];for(let u=0;u<s;++u){const[c,f]=E(t,e,{checksumAddress:r,staticPosition:i+o});o+=f,a.push(c)}return[a,o]}function Ge(t){return[Xt(t.readBytes(32),{size:32}),32]}function Ze(t,e,{staticPosition:n}){const[r,s]=e.type.split("bytes");if(!s){const o=g(t.readBytes(32));t.setPosition(n+o);const a=g(t.readBytes(32));if(a===0)return t.setPosition(n+32),["0x",32];const u=t.readBytes(a);return t.setPosition(n+32),[x(u),32]}return[x(t.readBytes(Number.parseInt(s,10),32)),32]}function Xe(t,e){const n=e.type.startsWith("int"),r=Number.parseInt(e.type.split("int")[1]||"256",10),s=t.readBytes(32);return[r>48?Jt(s,{signed:n}):g(s,{signed:n}),32]}function Je(t,e,n){const{checksumAddress:r,staticPosition:s}=n,i=e.components.length===0||e.components.some(({name:u})=>!u),o=i?[]:{};let a=0;if(z(e)){const u=g(t.readBytes(_)),c=s+u;for(let f=0;f<e.components.length;++f){const d=e.components[f];t.setPosition(c+a);const[y,h]=E(t,d,{checksumAddress:r,staticPosition:c});a+=h,o[i?f:d==null?void 0:d.name]=y}return t.setPosition(s+32),[o,32]}for(let u=0;u<e.components.length;++u){const c=e.components[u],[f,d]=E(t,c,{checksumAddress:r,staticPosition:s});o[i?u:c==null?void 0:c.name]=f,a+=d}return[o,a]}function Qe(t,{staticPosition:e}){const n=g(t.readBytes(32)),r=e+n;t.setPosition(r);const s=g(t.readBytes(32));if(s===0)return t.setPosition(e+32),["",32];const i=t.readBytes(s,32),o=Qt(Kt(i));return t.setPosition(e+32),[o,32]}function Ke({checksumAddress:t,parameters:e,values:n}){const r=[];for(let s=0;s<e.length;s++)r.push(J({checksumAddress:t,parameter:e[s],value:n[s]}));return r}function J({checksumAddress:t=!1,parameter:e,value:n}){const r=e,s=K(r.type);if(s){const[i,o]=s;return er(n,{checksumAddress:t,length:i,parameter:{...r,type:o}})}if(r.type==="tuple")return or(n,{checksumAddress:t,parameter:r});if(r.type==="address")return tr(n,{checksum:t});if(r.type==="bool")return nr(n);if(r.type.startsWith("uint")||r.type.startsWith("int")){const i=r.type.startsWith("int"),[,,o="256"]=Ot.exec(r.type)??[];return sr(n,{signed:i,size:Number(o)})}if(r.type.startsWith("bytes"))return rr(n,{type:r.type});if(r.type==="string")return ir(n);throw new tt(r.type)}function Q(t){let e=0;for(let i=0;i<t.length;i++){const{dynamic:o,encoded:a}=t[i];o?e+=32:e+=w(a)}const n=[],r=[];let s=0;for(let i=0;i<t.length;i++){const{dynamic:o,encoded:a}=t[i];o?(n.push(p(e+s,{size:32})),r.push(a),s+=w(a)):n.push(a)}return b(...n,...r)}function tr(t,e){const{checksum:n=!1}=e;return v(t,{strict:n}),{dynamic:!1,encoded:B(t.toLowerCase())}}function er(t,e){const{checksumAddress:n,length:r,parameter:s}=e,i=r===null;if(!Array.isArray(t))throw new lr(t);if(!i&&t.length!==r)throw new dr({expectedLength:r,givenLength:t.length,type:`${s.type}[${r}]`});let o=!1;const a=[];for(let u=0;u<t.length;u++){const c=J({checksumAddress:n,parameter:s,value:t[u]});c.dynamic&&(o=!0),a.push(c)}if(i||o){const u=Q(a);if(i){const c=p(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?b(c,u):c}}if(o)return{dynamic:!0,encoded:u}}return{dynamic:!1,encoded:b(...a.map(({encoded:u})=>u))}}function rr(t,{type:e}){const[,n]=e.split("bytes"),r=w(t);if(!n){let s=t;return r%32!==0&&(s=S(s,Math.ceil((t.length-2)/2/32)*32)),{dynamic:!0,encoded:b(B(p(r,{size:32})),s)}}if(r!==Number.parseInt(n,10))throw new jt({expectedSize:Number.parseInt(n,10),value:t});return{dynamic:!1,encoded:S(t)}}function nr(t){if(typeof t!="boolean")throw new l(`Invalid boolean value: "${t}" (type: ${typeof t}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:B(At(t))}}function sr(t,{signed:e,size:n}){if(typeof n=="number"){const r=2n**(BigInt(n)-(e?1n:0n))-1n,s=e?-r-1n:0n;if(t>r||t<s)throw new te({max:r.toString(),min:s.toString(),signed:e,size:n/8,value:t.toString()})}return{dynamic:!1,encoded:p(t,{size:32,signed:e})}}function ir(t){const e=F(t),n=Math.ceil(w(e)/32),r=[];for(let s=0;s<n;s++)r.push(S(m(e,s*32,(s+1)*32)));return{dynamic:!0,encoded:b(S(p(w(e),{size:32})),...r)}}function or(t,e){const{checksumAddress:n,parameter:r}=e;let s=!1;const i=[];for(let o=0;o<r.components.length;o++){const a=r.components[o],u=Array.isArray(t)?o:a.name,c=J({checksumAddress:n,parameter:a,value:t[u]});i.push(c),c.dynamic&&(s=!0)}return{dynamic:s,encoded:s?Q(i):b(...i.map(({encoded:o})=>o))}}function K(t){const e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}function z(t){var r;const{type:e}=t;if(e==="string"||e==="bytes"||e.endsWith("[]"))return!0;if(e==="tuple")return(r=t.components)==null?void 0:r.some(z);const n=K(t.type);return!!(n&&z({...t,type:n[1]}))}function ar(t,e,n={}){const{as:r="Array",checksumAddress:s=!1}=n,i=typeof e=="string"?vt(e):e,o=xe(i);if(O(i)===0&&t.length>0)throw new fr;if(O(i)&&O(i)<32)throw new ur({data:typeof e=="string"?e:x(e),parameters:t,size:O(i)});let a=0;const u=r==="Array"?[]:{};for(let c=0;c<t.length;++c){const f=t[c];o.setPosition(a);const[d,y]=E(o,f,{checksumAddress:s,staticPosition:0});a+=y,r==="Array"?u.push(d):u[f.name??c]=d}return u}function cr(t,e,n){const{checksumAddress:r=!1}={};if(t.length!==e.length)throw new Vt({expectedLength:t.length,givenLength:e.length});const s=Ke({checksumAddress:r,parameters:t,values:e}),i=Q(s);return i.length===0?"0x":i}function M(t,e){if(t.length!==e.length)throw new Vt({expectedLength:t.length,givenLength:e.length});const n=[];for(let r=0;r<t.length;r++){const s=t[r],i=e[r];n.push(M.encode(s,i))}return b(...n)}(function(t){function e(n,r,s=!1){if(n==="address"){const u=r;return v(u),B(u.toLowerCase(),s?32:0)}if(n==="string")return F(r);if(n==="bytes")return r;if(n==="bool")return B(At(r),s?32:1);const i=n.match(Ot);if(i){const[u,c,f="256"]=i,d=Number.parseInt(f,10)/8;return p(r,{size:s?32:d,signed:c==="int"})}const o=n.match(je);if(o){const[u,c]=o;if(Number.parseInt(c,10)!==(r.length-2)/2)throw new jt({expectedSize:Number.parseInt(c,10),value:r});return S(r,s?32:0)}const a=n.match(Ne);if(a&&Array.isArray(r)){const[u,c]=a,f=[];for(let d=0;d<r.length;d++)f.push(e(c,r[d],!0));return f.length===0?"0x":b(...f)}throw new tt(n)}t.encode=e})(M||(M={}));function Nt(t){return Array.isArray(t)&&typeof t[0]=="string"||typeof t=="string"?lt(t):t}class ur extends l{constructor({data:e,parameters:n,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${ee(n)})`,`Data: ${e} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class fr extends l{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class dr extends l{constructor({expectedLength:e,givenLength:n,type:r}){super(`Array length mismatch for type \`${r}\`. Expected: \`${e}\`. Given: \`${n}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class jt extends l{constructor({expectedSize:e,value:n}){super(`Size of bytes "${n}" (bytes${w(n)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class Vt extends l{constructor({expectedLength:e,givenLength:n}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${e}`,`Given length (values): ${n}`].join(`
|
|
1
|
+
import{bV as rt,bW as wt,bX as xt,K as Wt,bY as nt,bZ as st,b_ as it,L as Ht,b$ as Ft,c0 as Pt,c1 as x,c2 as Yt,c3 as H,c4 as w,c5 as l,c6 as b,c7 as p,c8 as vt,c9 as qt,ca as It,cb as m,cc as $t,cd as Gt,ce as ot,cf as g,cg as Zt,ch as Xt,ci as Jt,cj as Qt,ck as Kt,cl as B,cm as At,cn as te,co as S,cp as F,cq as O,cr as ee,cs as V,bU as re,ct as ne,aQ as k,b8 as se,aI as U,az as Y,b9 as R,bi as Et,aq as ie,aK as oe,aX as at,am as ae,cu as ce,ay as ue,aA as fe,C as de,x as le}from"./sendRawTransaction-YUhe5FDd.js";import{a7 as ct,a9 as he,ac as ye,$ as pe,af as ut,ad as me,ay as Bt,a1 as ft,a8 as be}from"./NetworkUtil-DDES604E.js";import{s as ge}from"./secp256k1-CrKymG_Q.js";function Vr(t){const e={formatters:void 0,fees:void 0,serializers:void 0,...t};function n(r){return s=>{const i=typeof s=="function"?s(r):s,o={...r,...i};return Object.assign(o,{extend:n(o)})}}return Object.assign(e,{extend:n(e)})}function kr(){return{}}function dt(t){let e;if(typeof t=="string")e=rt(t);else{const n=wt(t),r=t.length;for(let s=0;s<r;s++){const i=t[s];if(!xt(i)){e=rt(i,n);break}}}if(!e)throw new Wt({signature:t});return e}function lt(t){const e=[];if(typeof t=="string"){const n=nt(t),r=n.length;for(let s=0;s<r;s++)e.push(st(n[s],{modifiers:it}))}else{const n=wt(t),r=t.length;for(let s=0;s<r;s++){const i=t[s];if(xt(i))continue;const o=nt(i),a=o.length;for(let u=0;u<a;u++)e.push(st(o[u],{modifiers:it,structs:n}))}}if(e.length===0)throw new Ht({params:t});return e}function q(t,e={}){const{as:n=typeof t=="string"?"Hex":"Bytes"}=e,r=Ft(Pt(t));return n==="Bytes"?r:x(r)}function Ur(t,e={}){const{as:n=typeof t=="string"?"Hex":"Bytes"}=e,r=Yt(Pt(t));return n==="Bytes"?r:x(r)}function Tr(t){return H(t)&&w(t)===32}const we={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 ve({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new Pe({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new ht({offset:t});const e=this.position-t;this.assertPosition(e),this.position=e},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new ht({offset:t});const e=this.position+t;this.assertPosition(e),this.position=e},inspectByte(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectBytes(t,e){const n=e??this.position;return this.assertPosition(n+t-1),this.bytes.subarray(n,n+t)},inspectUint8(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectUint16(t){const e=t??this.position;return this.assertPosition(e+1),this.dataView.getUint16(e)},inspectUint24(t){const e=t??this.position;return this.assertPosition(e+2),(this.dataView.getUint16(e)<<8)+this.dataView.getUint8(e+2)},inspectUint32(t){const e=t??this.position;return this.assertPosition(e+3),this.dataView.getUint32(e)},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,e){this.assertReadLimit(),this._touch();const n=this.inspectBytes(t);return this.position+=e??t,n},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 e=this.position;return this.assertPosition(t),this.position=t,()=>this.position=e},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}};function xe(t,{recursiveReadLimit:e=8192}={}){const n=Object.create(we);return n.bytes=t,n.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=e,n}class ht extends l{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class Pe extends l{constructor({length:e,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}class ve extends l{constructor({count:e,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}class Ie extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const n=super.get(e);return super.has(e)&&n!==void 0&&(this.delete(e),super.set(e,n)),n}set(e,n){if(super.set(e,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}}const $e={checksum:new Ie(8192)},N=$e.checksum;function St(t,e={}){const{compressed:n}=e,{prefix:r,x:s,y:i}=t;if(n===!1||typeof s=="bigint"&&typeof i=="bigint"){if(r!==4)throw new yt({prefix:r,cause:new Se});return}if(n===!0||typeof s=="bigint"&&typeof i>"u"){if(r!==3&&r!==2)throw new yt({prefix:r,cause:new Be});return}throw new Ee({publicKey:t})}function _r(t){const e=(()=>{if(H(t))return zt(t);if(qt(t))return Ae(t);const{prefix:n,x:r,y:s}=t;return typeof r=="bigint"&&typeof s=="bigint"?{prefix:n??4,x:r,y:s}:{prefix:n,x:r}})();return St(e),e}function Ae(t){return zt(x(t))}function zt(t){if(t.length!==132&&t.length!==130&&t.length!==68)throw new ze({publicKey:t});if(t.length===130){const r=BigInt(m(t,0,32)),s=BigInt(m(t,32,64));return{prefix:4,x:r,y:s}}if(t.length===132){const r=Number(m(t,0,1)),s=BigInt(m(t,1,33)),i=BigInt(m(t,33,65));return{prefix:r,x:s,y:i}}const e=Number(m(t,0,1)),n=BigInt(m(t,1,33));return{prefix:e,x:n}}function Mr(t,e={}){return vt(Ct(t,e))}function Ct(t,e={}){St(t);const{prefix:n,x:r,y:s}=t,{includePrefix:i=!0}=e;return b(i?p(n,{size:1}):"0x",p(r,{size:32}),typeof s=="bigint"?p(s,{size:32}):"0x")}class Ee extends l{constructor({publicKey:e}){super(`Value \`${It(e)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}class yt extends l{constructor({prefix:e,cause:n}){super(`Prefix "${e}" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}class Be extends l{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}class Se extends l{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}let ze=class extends l{constructor({publicKey:e}){super(`Value \`${e}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${w($t(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}};const Ce=/^0x[a-fA-F0-9]{40}$/;function v(t,e={}){const{strict:n=!0}=e;if(!Ce.test(t))throw new pt({address:t,cause:new Re});if(n){if(t.toLowerCase()===t)return;if(G(t)!==t)throw new pt({address:t,cause:new Le})}}function G(t){if(N.has(t))return N.get(t);v(t,{strict:!1});const e=t.substring(2).toLowerCase(),n=q(Gt(e),{as:"Bytes"}),r=e.split("");for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&r[i]&&(r[i]=r[i].toUpperCase()),(n[i>>1]&15)>=8&&r[i+1]&&(r[i+1]=r[i+1].toUpperCase());const s=`0x${r.join("")}`;return N.set(t,s),s}function Oe(t,e={}){const{checksum:n=!1}=e;return v(t),n?G(t):t}function Wr(t,e={}){const n=q(`0x${Ct(t).slice(4)}`).substring(26);return Oe(`0x${n}`,e)}function Hr(t,e){return v(t,{strict:!1}),v(e,{strict:!1}),t.toLowerCase()===e.toLowerCase()}function T(t,e={}){const{strict:n=!0}=e??{};try{return v(t,{strict:n}),!0}catch{return!1}}class pt extends l{constructor({address:e,cause:n}){super(`Address "${e}" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class Re extends l{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class Le extends l{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}const Ne=/^(.*)\[([0-9]*)\]$/,je=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Ot=/^(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)?$/,mt=2n**256n-1n;function Z(t,e={}){const{recovered:n}=e;if(typeof t.r>"u")throw new j({signature:t});if(typeof t.s>"u")throw new j({signature:t});if(n&&typeof t.yParity>"u")throw new j({signature:t});if(t.r<0n||t.r>mt)throw new We({value:t.r});if(t.s<0n||t.s>mt)throw new He({value:t.s});if(typeof t.yParity=="number"&&t.yParity!==0&&t.yParity!==1)throw new L({value:t.yParity})}function Ve(t){return Rt(x(t))}function Rt(t){if(t.length!==130&&t.length!==132)throw new De({signature:t});const e=BigInt(m(t,0,32)),n=BigInt(m(t,32,64)),r=(()=>{const s=+`0x${t.slice(130)}`;if(!Number.isNaN(s))try{return X(s)}catch{throw new L({value:s})}})();return typeof r>"u"?{r:e,s:n}:{r:e,s:n,yParity:r}}function ke(t){if(!(typeof t.r>"u")&&!(typeof t.s>"u"))return Lt(t)}function Lt(t){const e=typeof t=="string"?Rt(t):t instanceof Uint8Array?Ve(t):typeof t.r=="string"?Te(t):t.v?Ue(t):{r:t.r,s:t.s,...typeof t.yParity<"u"?{yParity:t.yParity}:{}};return Z(e),e}function Ue(t){return{r:t.r,s:t.s,yParity:X(t.v)}}function Te(t){const e=(()=>{const n=t.v?Number(t.v):void 0;let r=t.yParity?Number(t.yParity):void 0;if(typeof n=="number"&&typeof r!="number"&&(r=X(n)),typeof r!="number")throw new L({value:t.yParity});return r})();return{r:BigInt(t.r),s:BigInt(t.s),yParity:e}}function Fr(t){const[e,n,r]=t;return Lt({r:n==="0x"?0n:BigInt(n),s:r==="0x"?0n:BigInt(r),yParity:e==="0x"?0:Number(e)})}function Yr(t){Z(t);const e=t.r,n=t.s;return b(p(e,{size:32}),p(n,{size:32}),typeof t.yParity=="number"?p(Me(t.yParity),{size:1}):"0x")}function _e(t){const{r:e,s:n,yParity:r}=t;return{r:p(e,{size:32}),s:p(n,{size:32}),yParity:r===0?"0x0":"0x1"}}function qr(t){const{r:e,s:n,yParity:r}=t;return[r?"0x01":"0x",e===0n?"0x":ot(p(e)),n===0n?"0x":ot(p(n))]}function X(t){if(t===0||t===27)return 0;if(t===1||t===28)return 1;if(t>=35)return t%2===0?1:0;throw new Fe({value:t})}function Me(t){if(t===0)return 27;if(t===1)return 28;throw new L({value:t})}class De extends l{constructor({signature:e}){super(`Value \`${e}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${w($t(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class j extends l{constructor({signature:e}){super(`Signature \`${It(e)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class We extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class He extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class L extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class Fe extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}function E(t,e,n){const{checksumAddress:r,staticPosition:s}=n,i=K(e.type);if(i){const[o,a]=i;return qe(t,{...e,type:a},{checksumAddress:r,length:o,staticPosition:s})}if(e.type==="tuple")return Je(t,e,{checksumAddress:r,staticPosition:s});if(e.type==="address")return Ye(t,{checksum:r});if(e.type==="bool")return Ge(t);if(e.type.startsWith("bytes"))return Ze(t,e,{staticPosition:s});if(e.type.startsWith("uint")||e.type.startsWith("int"))return Xe(t,e);if(e.type==="string")return Qe(t,{staticPosition:s});throw new tt(e.type)}const bt=32,_=32;function Ye(t,e={}){const{checksum:n=!1}=e,r=t.readBytes(32);return[(i=>n?G(i):i)(x(Zt(r,-20))),32]}function qe(t,e,n){const{checksumAddress:r,length:s,staticPosition:i}=n;if(!s){const u=g(t.readBytes(_)),c=i+u,f=c+bt;t.setPosition(c);const d=g(t.readBytes(bt)),y=z(e);let h=0;const $=[];for(let P=0;P<d;++P){t.setPosition(f+(y?P*32:h));const[C,Dt]=E(t,e,{checksumAddress:r,staticPosition:f});h+=Dt,$.push(C)}return t.setPosition(i+32),[$,32]}if(z(e)){const u=g(t.readBytes(_)),c=i+u,f=[];for(let d=0;d<s;++d){t.setPosition(c+d*32);const[y]=E(t,e,{checksumAddress:r,staticPosition:c});f.push(y)}return t.setPosition(i+32),[f,32]}let o=0;const a=[];for(let u=0;u<s;++u){const[c,f]=E(t,e,{checksumAddress:r,staticPosition:i+o});o+=f,a.push(c)}return[a,o]}function Ge(t){return[Xt(t.readBytes(32),{size:32}),32]}function Ze(t,e,{staticPosition:n}){const[r,s]=e.type.split("bytes");if(!s){const o=g(t.readBytes(32));t.setPosition(n+o);const a=g(t.readBytes(32));if(a===0)return t.setPosition(n+32),["0x",32];const u=t.readBytes(a);return t.setPosition(n+32),[x(u),32]}return[x(t.readBytes(Number.parseInt(s,10),32)),32]}function Xe(t,e){const n=e.type.startsWith("int"),r=Number.parseInt(e.type.split("int")[1]||"256",10),s=t.readBytes(32);return[r>48?Jt(s,{signed:n}):g(s,{signed:n}),32]}function Je(t,e,n){const{checksumAddress:r,staticPosition:s}=n,i=e.components.length===0||e.components.some(({name:u})=>!u),o=i?[]:{};let a=0;if(z(e)){const u=g(t.readBytes(_)),c=s+u;for(let f=0;f<e.components.length;++f){const d=e.components[f];t.setPosition(c+a);const[y,h]=E(t,d,{checksumAddress:r,staticPosition:c});a+=h,o[i?f:d==null?void 0:d.name]=y}return t.setPosition(s+32),[o,32]}for(let u=0;u<e.components.length;++u){const c=e.components[u],[f,d]=E(t,c,{checksumAddress:r,staticPosition:s});o[i?u:c==null?void 0:c.name]=f,a+=d}return[o,a]}function Qe(t,{staticPosition:e}){const n=g(t.readBytes(32)),r=e+n;t.setPosition(r);const s=g(t.readBytes(32));if(s===0)return t.setPosition(e+32),["",32];const i=t.readBytes(s,32),o=Qt(Kt(i));return t.setPosition(e+32),[o,32]}function Ke({checksumAddress:t,parameters:e,values:n}){const r=[];for(let s=0;s<e.length;s++)r.push(J({checksumAddress:t,parameter:e[s],value:n[s]}));return r}function J({checksumAddress:t=!1,parameter:e,value:n}){const r=e,s=K(r.type);if(s){const[i,o]=s;return er(n,{checksumAddress:t,length:i,parameter:{...r,type:o}})}if(r.type==="tuple")return or(n,{checksumAddress:t,parameter:r});if(r.type==="address")return tr(n,{checksum:t});if(r.type==="bool")return nr(n);if(r.type.startsWith("uint")||r.type.startsWith("int")){const i=r.type.startsWith("int"),[,,o="256"]=Ot.exec(r.type)??[];return sr(n,{signed:i,size:Number(o)})}if(r.type.startsWith("bytes"))return rr(n,{type:r.type});if(r.type==="string")return ir(n);throw new tt(r.type)}function Q(t){let e=0;for(let i=0;i<t.length;i++){const{dynamic:o,encoded:a}=t[i];o?e+=32:e+=w(a)}const n=[],r=[];let s=0;for(let i=0;i<t.length;i++){const{dynamic:o,encoded:a}=t[i];o?(n.push(p(e+s,{size:32})),r.push(a),s+=w(a)):n.push(a)}return b(...n,...r)}function tr(t,e){const{checksum:n=!1}=e;return v(t,{strict:n}),{dynamic:!1,encoded:B(t.toLowerCase())}}function er(t,e){const{checksumAddress:n,length:r,parameter:s}=e,i=r===null;if(!Array.isArray(t))throw new lr(t);if(!i&&t.length!==r)throw new dr({expectedLength:r,givenLength:t.length,type:`${s.type}[${r}]`});let o=!1;const a=[];for(let u=0;u<t.length;u++){const c=J({checksumAddress:n,parameter:s,value:t[u]});c.dynamic&&(o=!0),a.push(c)}if(i||o){const u=Q(a);if(i){const c=p(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?b(c,u):c}}if(o)return{dynamic:!0,encoded:u}}return{dynamic:!1,encoded:b(...a.map(({encoded:u})=>u))}}function rr(t,{type:e}){const[,n]=e.split("bytes"),r=w(t);if(!n){let s=t;return r%32!==0&&(s=S(s,Math.ceil((t.length-2)/2/32)*32)),{dynamic:!0,encoded:b(B(p(r,{size:32})),s)}}if(r!==Number.parseInt(n,10))throw new jt({expectedSize:Number.parseInt(n,10),value:t});return{dynamic:!1,encoded:S(t)}}function nr(t){if(typeof t!="boolean")throw new l(`Invalid boolean value: "${t}" (type: ${typeof t}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:B(At(t))}}function sr(t,{signed:e,size:n}){if(typeof n=="number"){const r=2n**(BigInt(n)-(e?1n:0n))-1n,s=e?-r-1n:0n;if(t>r||t<s)throw new te({max:r.toString(),min:s.toString(),signed:e,size:n/8,value:t.toString()})}return{dynamic:!1,encoded:p(t,{size:32,signed:e})}}function ir(t){const e=F(t),n=Math.ceil(w(e)/32),r=[];for(let s=0;s<n;s++)r.push(S(m(e,s*32,(s+1)*32)));return{dynamic:!0,encoded:b(S(p(w(e),{size:32})),...r)}}function or(t,e){const{checksumAddress:n,parameter:r}=e;let s=!1;const i=[];for(let o=0;o<r.components.length;o++){const a=r.components[o],u=Array.isArray(t)?o:a.name,c=J({checksumAddress:n,parameter:a,value:t[u]});i.push(c),c.dynamic&&(s=!0)}return{dynamic:s,encoded:s?Q(i):b(...i.map(({encoded:o})=>o))}}function K(t){const e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}function z(t){var r;const{type:e}=t;if(e==="string"||e==="bytes"||e.endsWith("[]"))return!0;if(e==="tuple")return(r=t.components)==null?void 0:r.some(z);const n=K(t.type);return!!(n&&z({...t,type:n[1]}))}function ar(t,e,n={}){const{as:r="Array",checksumAddress:s=!1}=n,i=typeof e=="string"?vt(e):e,o=xe(i);if(O(i)===0&&t.length>0)throw new fr;if(O(i)&&O(i)<32)throw new ur({data:typeof e=="string"?e:x(e),parameters:t,size:O(i)});let a=0;const u=r==="Array"?[]:{};for(let c=0;c<t.length;++c){const f=t[c];o.setPosition(a);const[d,y]=E(o,f,{checksumAddress:s,staticPosition:0});a+=y,r==="Array"?u.push(d):u[f.name??c]=d}return u}function cr(t,e,n){const{checksumAddress:r=!1}={};if(t.length!==e.length)throw new Vt({expectedLength:t.length,givenLength:e.length});const s=Ke({checksumAddress:r,parameters:t,values:e}),i=Q(s);return i.length===0?"0x":i}function M(t,e){if(t.length!==e.length)throw new Vt({expectedLength:t.length,givenLength:e.length});const n=[];for(let r=0;r<t.length;r++){const s=t[r],i=e[r];n.push(M.encode(s,i))}return b(...n)}(function(t){function e(n,r,s=!1){if(n==="address"){const u=r;return v(u),B(u.toLowerCase(),s?32:0)}if(n==="string")return F(r);if(n==="bytes")return r;if(n==="bool")return B(At(r),s?32:1);const i=n.match(Ot);if(i){const[u,c,f="256"]=i,d=Number.parseInt(f,10)/8;return p(r,{size:s?32:d,signed:c==="int"})}const o=n.match(je);if(o){const[u,c]=o;if(Number.parseInt(c,10)!==(r.length-2)/2)throw new jt({expectedSize:Number.parseInt(c,10),value:r});return S(r,s?32:0)}const a=n.match(Ne);if(a&&Array.isArray(r)){const[u,c]=a,f=[];for(let d=0;d<r.length;d++)f.push(e(c,r[d],!0));return f.length===0?"0x":b(...f)}throw new tt(n)}t.encode=e})(M||(M={}));function Nt(t){return Array.isArray(t)&&typeof t[0]=="string"||typeof t=="string"?lt(t):t}class ur extends l{constructor({data:e,parameters:n,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${ee(n)})`,`Data: ${e} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class fr extends l{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class dr extends l{constructor({expectedLength:e,givenLength:n,type:r}){super(`Array length mismatch for type \`${r}\`. Expected: \`${e}\`. Given: \`${n}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class jt extends l{constructor({expectedSize:e,value:n}){super(`Size of bytes "${n}" (bytes${w(n)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class Vt extends l{constructor({expectedLength:e,givenLength:n}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${e}`,`Given length (values): ${n}`].join(`
|
|
2
2
|
`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class lr extends l{constructor(e){super(`Value \`${e}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class tt extends l{constructor(e){super(`Type \`${e}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}function D(t){let e=!0,n="",r=0,s="",i=!1;for(let o=0;o<t.length;o++){const a=t[o];if(["(",")",","].includes(a)&&(e=!0),a==="("&&r++,a===")"&&r--,!!e){if(r===0){if(a===" "&&["event","function","error",""].includes(s))s="";else if(s+=a,a===")"){i=!0;break}continue}if(a===" "){t[o-1]!==","&&n!==","&&n!==",("&&(n="",e=!1);continue}s+=a,n+=a}}if(!i)throw new l("Unable to normalize signature.");return s}function W(t,e){const n=typeof t,r=e.type;switch(r){case"address":return T(t,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in e?Object.values(e.components).every((s,i)=>W(Object.values(t)[i],s)):/^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(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||t instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(t)&&t.every(s=>W(s,{...e,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function kt(t,e,n){for(const r in t){const s=t[r],i=e[r];if(s.type==="tuple"&&i.type==="tuple"&&"components"in s&&"components"in i)return kt(s.components,i.components,n[r]);const o=[s.type,i.type];if(o.includes("address")&&o.includes("bytes20")?!0:o.includes("address")&&o.includes("string")?T(n[r],{strict:!1}):o.includes("address")&&o.includes("bytes")?T(n[r],{strict:!1}):!1)return o}}function Gr(t,e={}){const{prepare:n=!0}=e,r=Array.isArray(t)||typeof t=="string"?dt(t):t;return{...r,...n?{hash:A(r)}:{}}}function et(t,e,n){const{args:r=[],prepare:s=!0}=n??{},i=H(e,{strict:!1}),o=t.filter(c=>i?c.type==="function"||c.type==="error"?hr(c)===m(e,0,4):c.type==="event"?A(c)===e:!1:"name"in c&&c.name===e);if(o.length===0)throw new gt({name:e});if(o.length===1)return{...o[0],...s?{hash:A(o[0])}:{}};let a;for(const c of o){if(!("inputs"in c))continue;if(!r||r.length===0){if(!c.inputs||c.inputs.length===0)return{...c,...s?{hash:A(c)}:{}};continue}if(!c.inputs||c.inputs.length===0||c.inputs.length!==r.length)continue;if(r.every((d,y)=>{const h="inputs"in c&&c.inputs[y];return h?W(d,h):!1})){if(a&&"inputs"in a&&a.inputs){const d=kt(c.inputs,a.inputs,r);if(d)throw new pr({abiItem:c,type:d[0]},{abiItem:a,type:d[1]})}a=c}}const u=(()=>{if(a)return a;const[c,...f]=o;return{...c,overloads:f}})();if(!u)throw new gt({name:e});return{...u,...s?{hash:A(u)}:{}}}function hr(...t){const e=(()=>{if(Array.isArray(t[0])){const[n,r]=t;return et(n,r)}return t[0]})();return m(A(e),0,4)}function yr(...t){const e=(()=>{if(Array.isArray(t[0])){const[r,s]=t;return et(r,s)}return t[0]})(),n=typeof e=="string"?e:V(e);return D(n)}function A(...t){const e=(()=>{if(Array.isArray(t[0])){const[n,r]=t;return et(n,r)}return t[0]})();return typeof e!="string"&&"hash"in e&&e.hash?e.hash:q(F(yr(e)))}class pr extends l{constructor(e,n){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${e.type}\` in \`${D(V(e.abiItem))}\`, and`,`\`${n.type}\` in \`${D(V(n.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}class gt extends l{constructor({name:e,data:n,type:r="item"}){const s=e?` with name "${e}"`:n?` with data "${n}"`:"";super(`ABI ${r}${s} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}function mr(t,e={}){return typeof t.chainId=="string"?Ut(t):{...t,...e.signature}}function Ut(t){const{address:e,chainId:n,nonce:r}=t,s=ke(t);return{address:e,chainId:Number(n),nonce:BigInt(r),...s}}function Zr(t){return t.map(Ut)}function br(t){const{address:e,chainId:n,nonce:r,...s}=t;return{address:e,chainId:p(n),nonce:p(r),..._e(s)}}function Xr(t){return t.map(br)}async function gr(t,{address:e,blockHash:n,blockNumber:r,blockTag:s="latest",requireCanonical:i}){const o=re({blockHash:n,blockNumber:r,blockTag:s,requireCanonical:i}),a=await t.request({method:"eth_getCode",params:[e,o]},{dedupe:typeof r=="bigint"||n!==void 0});if(a!=="0x")return a}const Tt="0x6492649264926492649264926492649264926492649264926492649264926492";function wr(t){if(m(t,-32)!==Tt)throw new vr(t)}function xr(t){const{data:e,signature:n,to:r}=t;return b(cr(Nt("address, bytes, bytes"),[r,e,n]),Tt)}function Pr(t){try{return wr(t),!0}catch{return!1}}let vr=class extends l{constructor(e){super(`Value \`${e}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}};const Ir="0x8010801080108010801080108010801080108010801080108010801080108010",$r=Nt("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function _t(t){if(typeof t=="string"){if(m(t,-32)!==Ir)throw new Br(t)}else Z(t.authorization)}function Ar(t){_t(t);const e=ne(m(t,-64,-32)),n=m(t,-e-64,-64),r=m(t,0,-e-64),[s,i,o]=ar($r,n);return{authorization:mr({address:s.delegation,chainId:Number(s.chainId),nonce:s.nonce,yParity:s.yParity,r:s.r,s:s.s}),signature:r,...o&&o!=="0x"?{data:o,to:i}:{}}}function Er(t){try{return _t(t),!0}catch{return!1}}class Br extends l{constructor(e){super(`Value \`${e}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}}async function Sr({address:t,authorization:e,signature:n}){return k(U(t),await se({authorization:e,signature:n}))}function zr({r:t,s:e,to:n="hex",v:r,yParity:s}){const i=(()=>{if(s===0||s===1)return s;if(r&&(r===27n||r===28n||r>=35n))return r%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),o=`0x${new ge.Signature(ct(t),ct(e)).toCompactHex()}${i===0?"1b":"1c"}`;return n==="hex"?o:he(o)}async function Mt(t,e){const{abi:n,address:r,args:s,functionName:i,...o}=e,a=Y({abi:n,args:s,functionName:i});try{const{data:u}=await R(t,Et,"call")({...o,data:a,to:r});return ie({abi:n,args:s,functionName:i,data:u||"0x"})}catch(u){throw oe(u,{abi:n,address:r,args:s,docsPath:"/docs/contract/readContract",functionName:i})}}async function Qr(t,e){var c,f,d,y;const{address:n,chain:r=t.chain,hash:s,erc6492VerifierAddress:i=e.universalSignatureVerifierAddress??((f=(c=r==null?void 0:r.contracts)==null?void 0:c.erc6492Verifier)==null?void 0:f.address),multicallAddress:o=e.multicallAddress??((y=(d=r==null?void 0:r.contracts)==null?void 0:d.multicall3)==null?void 0:y.address),mode:a="auto"}=e;if(r!=null&&r.verifyHash)return await r.verifyHash(t,e);const u=(()=>{const h=e.signature;return ye(h)?h:typeof h=="object"&&"r"in h&&"s"in h?zr(h):pe(h)})();try{if(a==="eoa")try{if(k(U(n),await at({hash:s,signature:u})))return!0}catch{}return Er(u)?await Cr(t,{...e,multicallAddress:o,signature:u}):await Or(t,{...e,verifierAddress:i,signature:u})}catch(h){if(a!=="eoa")try{if(k(U(n),await at({hash:s,signature:u})))return!0}catch{}if(h instanceof I)return!1;throw h}}async function Cr(t,e){var C;const{address:n,blockNumber:r,blockTag:s,hash:i,multicallAddress:o}=e,{authorization:a,data:u,signature:c,to:f}=Ar(e.signature);if(await gr(t,{address:n,blockNumber:r,blockTag:s})===ae(["0xef0100",a.address]))return await Rr(t,{address:n,blockNumber:r,blockTag:s,hash:i,signature:c});const y={address:a.address,chainId:Number(a.chainId),nonce:Number(a.nonce),r:ut(a.r,{size:32}),s:ut(a.s,{size:32}),yParity:a.yParity};if(!await Sr({address:n,authorization:y}))throw new I;const $=await R(t,Mt,"readContract")({...o?{address:o}:{code:ce},authorizationList:[y],abi:me,blockNumber:r,blockTag:"pending",functionName:"aggregate3",args:[[...u?[{allowFailure:!0,target:f??n,callData:u}]:[],{allowFailure:!0,target:n,callData:Y({abi:Bt,functionName:"isValidSignature",args:[i,c]})}]]}),P=(C=$[$.length-1])==null?void 0:C.returnData;if(P!=null&&P.startsWith("0x1626ba7e"))return!0;throw new I}async function Or(t,e){const{address:n,factory:r,factoryData:s,hash:i,signature:o,verifierAddress:a,...u}=e,c=await(async()=>!r&&!s||Pr(o)?o:xr({data:s,signature:o,to:r}))(),f=a?{to:a,data:Y({abi:ft,functionName:"isValidSig",args:[n,i,c]}),...u}:{data:ue({abi:ft,args:[n,i,c],bytecode:fe}),...u},{data:d}=await R(t,Et,"call")(f).catch(y=>{throw y instanceof de?new I:y});if(be(d??"0x0"))return!0;throw new I}async function Rr(t,e){const{address:n,blockNumber:r,blockTag:s,hash:i,signature:o}=e;if((await R(t,Mt,"readContract")({address:n,abi:Bt,args:[i,o],blockNumber:r,blockTag:s,functionName:"isValidSignature"}).catch(u=>{throw u instanceof le?new I:u})).startsWith("0x1626ba7e"))return!0;throw new I}class I extends Error{}export{_e as A,G as B,v as C,ke as D,Zr as E,Me as F,Xr as G,Tr as H,Lt as I,qr as J,Fr as K,zt as L,gt as N,lt as a,cr as b,et as c,Vr as d,kr as e,Gr as f,gr as g,hr as h,xe as i,Hr as j,Mr as k,_r as l,Wr as m,Ur as n,q as o,dt as p,Oe as q,Mt as r,zr as s,Ct as t,T as u,Qr as v,Rt as w,Z as x,Te as y,Yr as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as v,i as f,b as a}from"./lit-element-B3y9oplH.js";import{n as w,r as d,o as q}from"./class-map-CxwNmq0D.js";import{w as ve,s as fe,a as ge,p as be,M as g,S as se,R as l,r as P,A as K,e as ce,c as le,C as m,b as Y,d as ye,f as S,E as ie,O as E,g as F,h as oe,i as T,j as H,T as xe,k as Ce,l as ke,m as Se}from"./core-
|
|
1
|
+
import{a as v,i as f,b as a}from"./lit-element-B3y9oplH.js";import{n as w,r as d,o as q}from"./class-map-CxwNmq0D.js";import{w as ve,s as fe,a as ge,p as be,M as g,S as se,R as l,r as P,A as K,e as ce,c as le,C as m,b as Y,d as ye,f as S,E as ie,O as E,g as F,h as oe,i as T,j as H,T as xe,k as Ce,l as ke,m as Se}from"./core-C_RCjMc6.js";import{c as u,U as We}from"./index-Bj-x5N2U.js";import"./index-CI_HQD35.js";import"./react-Vu6nbGi5.js";import"./ethers-JeCAM1sd.js";import"./index-C9P6N44e.js";import"./index-Blc7OGRU.js";import"./index-BcyJUD4U.js";import"./index.es-BQrA1NgE.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index.es-CbOKB2xh.js";import"./browser-ponyfill-rND5WOqr.js";import"./NetworkUtil-DDES604E.js";import"./W3MFrameProviderSingleton-DXEpVsCm.js";import"./async-directive-BRxn_Py3.js";const p=be({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),Re={state:p,subscribe(r){return ge(p,()=>r(p))},subscribeKey(r,e){return fe(p,r,e)},showTooltip({message:r,triggerRect:e,variant:t}){p.open=!0,p.message=r,p.triggerRect=e,p.variant=t},hide(){p.open=!1,p.message="",p.triggerRect={width:0,height:0,top:0,left:0}}},O=ve(Re),de={isUnsupportedChainView(){return l.state.view==="UnsupportedChain"||l.state.view==="SwitchNetwork"&&l.state.history.includes("UnsupportedChain")},async safeClose(){if(this.isUnsupportedChainView()){g.shake();return}if(await se.isSIWXCloseDisabled()){g.shake();return}g.close()}},$e=v`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
border-radius: clamp(0px, var(--wui-border-radius-l), 44px);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as g,b as d,a as he}from"./lit-element-B3y9oplH.js";import{n as l,o as $,r as u}from"./class-map-CxwNmq0D.js";import{d as v,r as V,e as me,v as B,i as fe}from"./index-
|
|
1
|
+
import{i as g,b as d,a as he}from"./lit-element-B3y9oplH.js";import{n as l,o as $,r as u}from"./class-map-CxwNmq0D.js";import{d as v,r as V,e as me,v as B,i as fe}from"./index-BA1ToKo5.js";import{c as f,U as le}from"./index-BRAKTMPG.js";import{M as k,Z as ce,R as c,k as we,A as H,C as w,q as U,L as be,E as K,O as A,o as M,S as E,z,T as ge,_ as ye}from"./W3MFrameProviderSingleton-DXEpVsCm.js";import{P as D}from"./index-DjbM69kL.js";import"./index-BNjQhTuO.js";import{H as oe}from"./HelpersUtil-CbFvbY-T.js";import{C as F}from"./ConstantsUtil-CiDezLbv.js";import"./index-CoACJ04N.js";import"./index-BBTg_Taa.js";import"./index-DGSeBOvG.js";import"./index-dE2OwwEn.js";import{S as ve}from"./SwapController-C07T-0ls.js";import"./index-6YdbHDXd.js";import"./index-CI_HQD35.js";import"./react-Vu6nbGi5.js";import"./ethers-JeCAM1sd.js";import"./index-C9P6N44e.js";import"./index-Blc7OGRU.js";import"./index-BcyJUD4U.js";import"./index-nibyPLVP.js";import"./index-Bu2DcNS5.js";import"./index.es-CbOKB2xh.js";import"./browser-ponyfill-rND5WOqr.js";import"./NetworkUtil-DDES604E.js";import"./index-CxQiq4b6.js";import"./index-D-lax9BR.js";import"./index-BLF3lLRE.js";import"./index-B0PvzweT.js";import"./index-Cl4u62mB.js";import"./MathUtil-BGCe3rZ3.js";import"./index-DSUWwVug.js";import"./index-CkCZBr-g.js";const de={isUnsupportedChainView(){return c.state.view==="UnsupportedChain"||c.state.view==="SwitchNetwork"&&c.state.history.includes("UnsupportedChain")},async safeClose(){if(this.isUnsupportedChainView()){k.shake();return}if(await ce.isSIWXCloseDisabled()){k.shake();return}(c.state.view==="DataCapture"||c.state.view==="DataCaptureOtpConfirm")&&we.disconnect(),k.close()}},xe=v`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
border-radius: clamp(0px, ${({borderRadius:e})=>e[8]}, 44px);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as B}from"./transactionReceipt-
|
|
1
|
+
import{f as B}from"./transactionReceipt-BcAWHNof.js";import{h as g,m as N}from"./signing-DqVkCMNZ.js";import{s as A}from"./sleep-mAKpSMLY.js";async function I(t){const e=await t({method:"eth_blockNumber"});return g(e)}async function E(t,e){const n=await t({method:"eth_getTransactionReceipt",params:[e.hash]});if(!n)throw new Error("Transaction receipt not found.");return B(n)}const x=5e3,y=1e3,k=500,D=2,T=10;function M(t){for(;t.length<T;)t.unshift(y);return t.reduce((n,i)=>n+i,0)/t.length}function R(t,e,n,i){let l=[],c=[],a=!1,o,r;const b=N({chain:e,client:t});async function p(){if(!a)return;try{const s=await I(b);if(!o||s>o){let m=[];if(o)for(let f=o+1n;f<=s;f++)m.push(BigInt(f));else m=[s];o=s;const w=Date.now();if(r){const f=(w-r)/m.length;c.push(f),c=c.slice(-T)}r=w;for(const f of m)for(const L of l)L(f)}}catch(s){i?i(s):console.error(`[watchBlockNumber]: Failed to poll for latest block number: ${s}`)}const h=M(c),u=Math.max(k,Math.min(x,Math.max(k,h)));await A(u/(n??D)),p()}return function(u,s){return l.push(u),a||(o=s,a=!0,p()),function(){l=l.filter(w=>w!==u),l.length===0&&(o=void 0,r=void 0,a=!1)}}}const _=new Map;function O(t){const{client:e,chain:n,onNewBlockNumber:i,overPollRatio:l,latestBlockNumber:c,onError:a}=t,o=n.id;let r=_.get(o);return r||(r=R(e,n,l,a),_.set(o,r)),r(i,c)}const P=100,d=new Map;function S(t){const{transactionHash:e,chain:n,client:i}=t,c=`${n.id}:tx_${e}`,a=t.maxBlocksWaitTime??P;if(d.has(c))return d.get(c);const o=new Promise((r,b)=>{e||b(new Error("Transaction has no transactionHash to wait for, did you execute it?"));const p=N({chain:n,client:i});let h=-1;const u=O({chain:n,client:i,onNewBlockNumber:async()=>{if(h++,h>=a){u(),b(new Error(`Transaction receipt for ${e} not found after ${a} blocks`));return}try{const s=await E(p,{hash:e});u(),r(s)}catch{}}})}).finally(()=>{d.delete(c)});return d.set(c,o),o}export{I as a,O as b,E as e,S as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as r}from"./index-
|
|
1
|
+
import{D as r}from"./index-CI_HQD35.js";const T=new Set([r.ProviderType.INJECTED,r.ProviderType.METAMASK_MOBILE,r.ProviderType.FORTMATIC,r.ProviderType.WALLET_CONNECT,r.ProviderType.WALLET_CONNECT_V2,r.ProviderType.WALLET_LINK]);function E(e){return!!e&&T.has(e)}export{E as s};
|