@dcl/shop 1.4.2-31312432830.commit-294f554 → 1.4.2-31318792168.commit-63acc2c
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/{Activity-NHOQ_W_-.js → Activity-CUtzGuZi.js} +5 -5
- package/_assets/{AnimatedBackground-BuJlRsTt.js → AnimatedBackground-CKYd1b1O.js} +2 -2
- package/_assets/{Assets-DsnrEwvE.js → Assets-BhlW9Wx3.js} +2 -2
- package/_assets/{Assets.styles-CuWT78zl.js → Assets.styles-DG1h47nn.js} +1 -1
- package/_assets/{Authorizations-B4PIyNsB.js → Authorizations-BASwkC0l.js} +1 -1
- package/_assets/Cart-DxmkSugV.js +696 -0
- package/_assets/{CircularProgress-DUq9NPI6.js → CircularProgress-DYQ08DWl.js} +1 -1
- package/_assets/{Collection-BGucqUBi.js → Collection-UgRDwUmd.js} +1 -1
- package/_assets/{CollectionCarousel-Cps0wYBU.js → CollectionCarousel-BvghNLQG.js} +169 -177
- package/_assets/{Confetti-CBj-mVZI.js → Confetti-8gjQ6tb0.js} +1 -1
- package/_assets/{ConstantsUtil-Ck3fDr3h.js → ConstantsUtil-_wDeZ6ui.js} +1 -1
- package/_assets/{ContentClient-Cx6YR2x_.js → ContentClient-S2yImRPT.js} +1 -1
- package/_assets/{Creator-CXw3Kadz.js → Creator-DjPkuErt.js} +1 -1
- package/_assets/{DeploymentBuilder-8vMsUZ5r.js → DeploymentBuilder-BuYQQso0.js} +1 -1
- package/_assets/{ErrorNotice-C_RVGUzO.js → ErrorNotice-Dh0G_UH0.js} +1 -1
- package/_assets/{ExchangeController-BlbdUNWF.js → ExchangeController-BqD5t9Zu.js} +1 -1
- package/_assets/{Faq-D0xuEVP5.js → Faq-CrJ-GH4k.js} +1 -1
- package/_assets/{GetCredits-DrHn8Lnz.js → GetCredits-DzDBOEft.js} +2 -2
- package/_assets/{Grow-CU75s2bu.js → Grow-BcWJyxmA.js} +1 -1
- package/_assets/{HelpersUtil-D6HuwesN.js → HelpersUtil-YGElNPtF.js} +1 -1
- package/_assets/ItemDetail-BVO9W3Ag.js +3570 -0
- package/_assets/LazyEmoteControls-BATwcsS-.js +2 -0
- package/_assets/{LoadMore-P_MKAf1K.js → LoadMore-DZz0apc4.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-CWoDMKMl.js → ManaPricingBanner.styles-Bir49U3g.js} +1 -1
- package/_assets/{MyAssets-CUEMlx_o.js → MyAssets-D1VBULvk.js} +2 -2
- package/_assets/{MyFavorites-BPb8OEVx.js → MyFavorites-MQoA41I-.js} +1 -1
- package/_assets/{NetworkUtil-tcDS1IIB.js → NetworkUtil-ooNEpt2E.js} +1 -1
- package/_assets/{NotFound-tne0tBOa.js → NotFound-C0I1Fl9w.js} +1 -1
- package/_assets/{NotificationsBell-CmFSFwZP.js → NotificationsBell-CsjRTFAw.js} +1 -1
- package/_assets/{OutfitDetail-BT9obLRM.js → OutfitDetail-Cj-7nYPN.js} +1 -1
- package/_assets/{OutfitPreview-CYXMUVw2.js → OutfitPreview-B5sSYG7H.js} +1 -1
- package/_assets/{OutfitStudio-YBvL5VGl.js → OutfitStudio-VIQWadz3.js} +1 -1
- package/_assets/{StoreSettings-CZz1NxHF.js → StoreSettings-C2GziXJc.js} +21 -21
- package/_assets/{Success-CQKYcWpX.js → Success-D1R3OpeD.js} +1 -1
- package/_assets/{SwapController-BEVqtoCD.js → SwapController-BPzqNjIO.js} +1 -1
- package/_assets/{Tooltip-sT07OWHO.js → Tooltip-NVEtu7WR.js} +1 -1
- package/_assets/{TradeService-CI3giiHH.js → TradeService-P6cAagrj.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-CF6uvH5s.js → W3MFrameProviderSingleton-CZkhqHTC.js} +3 -3
- package/_assets/{WebCryptoP256-BORYCvjs.js → WebCryptoP256-Btl0G7MC.js} +1 -1
- package/_assets/authorizations-rKqoPfba.js +1 -0
- package/_assets/{basic-C4mQYhuA.js → basic-DUMQQiuv.js} +1 -1
- package/_assets/{biconomy-CuJVLNp7.js → biconomy-DaDoOKwT.js} +1 -1
- package/_assets/{builder-CkniOHea.js → builder-BjxL6GAx.js} +1 -1
- package/_assets/{buy-P1ELLgiE.js → buy-BVwGfu-u.js} +1 -1
- package/_assets/{buy-gasless-BHi46MwF.js → buy-gasless-QheWl_4u.js} +1 -1
- package/_assets/{categories-C3d1csvn.js → categories-BwYVv5LN.js} +1 -1
- package/_assets/{ccip-BuuvnkRx.js → ccip-D9RgwF6z.js} +1 -1
- package/_assets/{ccip-C2VEvCbm.js → ccip-Wq6QNi-S.js} +1 -1
- package/_assets/{chains-BIWEr0ij.js → chains-6gSx70Hh.js} +1 -1
- package/_assets/{collectionPage.styles-CeGOp9uA.js → collectionPage.styles-DpjxCqdp.js} +4 -4
- package/_assets/{common-DC11HrTT.js → common-feYFL93O.js} +1 -1
- package/_assets/{controller-BFSczMkH.js → controller-C66aulNK.js} +2 -2
- package/_assets/{core-BW1P_HvM.js → core-Btwy40Yo.js} +4 -4
- package/_assets/{createSvgIcon-Cv96eCpQ.js → createSvgIcon-CdJg0Jup.js} +1 -1
- package/_assets/{custom-DTSkEq9y.js → custom-DoWLNbWe.js} +1 -1
- package/_assets/{data-capture-CqPKue4D.js → data-capture-BGI0-xMQ.js} +1 -1
- package/_assets/{decimals-Cq50aW31.js → decimals-Cs0fUBZW.js} +1 -1
- package/_assets/decimals-ajtlKW5P.js +1 -0
- package/_assets/{detectExtension-DECAB97m.js → detectExtension-C37KQAih.js} +1 -1
- package/_assets/{email-Y6VS8X-I.js → email-AZF8we76.js} +1 -1
- package/_assets/{embedded-wallet-DhCY0HS9.js → embedded-wallet-CoNOZa9l.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-DS9PERKq.js → emotion-styled.browser.esm-D5G81H0Z.js} +1 -1
- package/_assets/{engine-C0KKoxYU.js → engine-DK35k3Wx.js} +1 -1
- package/_assets/{errors-CJ2pCYot.js → errors-By1GnMe7.js} +1 -1
- package/_assets/{estimate-l1-fee-CdSpN9-3.js → estimate-l1-fee-CXKE1On5.js} +1 -1
- package/_assets/{eth_estimateGas-cxuHKZ6E.js → eth_estimateGas-BrLzlWeD.js} +1 -1
- package/_assets/{eth_getStorageAt-CtArmjiC.js → eth_getStorageAt-BpgMYXhH.js} +1 -1
- package/_assets/{eth_getTransactionCount-BfjxI2ac.js → eth_getTransactionCount-CnBRomEq.js} +1 -1
- package/_assets/{ethereum-DDjO_s3T.js → ethereum-DVNzjDRr.js} +1 -1
- package/_assets/{ethers-DfPQ1iPJ.js → ethers-Zj6qlwhg.js} +1 -1
- package/_assets/{execute-D_9LMioQ.js → execute-CMXov2Ym.js} +2 -2
- package/_assets/{extractIPFS-BzqQpbV3.js → extractIPFS-CBKK6zoo.js} +1 -1
- package/_assets/{features-D0XU01_q.js → features-ChMtmYU9.js} +1 -1
- package/_assets/{fetchTokenMetadata-3bs5L4Ed.js → fetchTokenMetadata-lypRtD7l.js} +2 -2
- package/_assets/{field.styles-DJeExo1o.js → field.styles-DBKEhZ68.js} +1 -1
- package/_assets/{get-bytecode-CBzbILdG.js → get-bytecode-BM7naPwd.js} +1 -1
- package/_assets/get-ecosystem-wallet-info-Br746vUu.js +1 -0
- package/_assets/{getBalance-CfTr0idF.js → getBalance-D7kh5vBa.js} +2 -2
- package/_assets/{getInstalledModules-CMaA3R_c.js → getInstalledModules-b10bOXJE.js} +1 -1
- package/_assets/{getNFT-CpdvnGlo.js → getNFT-D-tJRp8I.js} +2 -2
- package/_assets/getNFT-VGd_dY0w.js +1 -0
- package/_assets/{grid.styles-pd8Kimjr.js → grid.styles-DJWMt6vO.js} +1 -1
- package/_assets/{hashTypedData-DyjRVyiF.js → hashTypedData-CjD9Onxg.js} +1 -1
- package/_assets/{hashTypedData-BznBKEJ4.js → hashTypedData-DHhLMbA9.js} +1 -1
- package/_assets/{in-app-CYmfrim9.js → in-app-cMkoA_0X.js} +1 -1
- package/_assets/{in-app-wallet-calls-CqmNnUJE.js → in-app-wallet-calls-B1N_tJhq.js} +1 -1
- package/_assets/{index-CWAxO3pP.js → index--EeJI3gz.js} +1 -1
- package/_assets/{index-B9uk5-Wa.js → index--LxIcqOG.js} +1 -1
- package/_assets/{index-BspLYzJo.js → index-06iPgNel.js} +1 -1
- package/_assets/{index--7bmhnCr.js → index-AJgeFEbz.js} +1 -1
- package/_assets/{index-CiPrjG5a.js → index-B4j7Y-xb.js} +1 -1
- package/_assets/{index-B6lhjXm3.js → index-B51FIhv5.js} +1 -1
- package/_assets/{index-D-X0uab8.js → index-B6kTxvDn.js} +1 -1
- package/_assets/{index-DNCRJDU6.js → index-BAwpYw08.js} +1 -1
- package/_assets/{index-D4Dobs6V.js → index-BFm7_2vm.js} +1 -1
- package/_assets/{index-1ioVeg7x.js → index-BHF7j7iL.js} +1 -1
- package/_assets/{index-B40CqL6J.js → index-BHIzwyES.js} +1 -1
- package/_assets/{index-h9B4YXUq.js → index-BHY_vmT3.js} +1 -1
- package/_assets/{index-YTZYM_mv.js → index-BJpwf_jJ.js} +1 -1
- package/_assets/{index-CoNQ2sAc.js → index-BKjJvyPt.js} +1 -1
- package/_assets/{index-BoVFCbnW.js → index-BLGkMtvD.js} +1 -1
- package/_assets/{index-BOFr5q8K.js → index-BUl8ifmb.js} +1 -1
- package/_assets/{index-D_Xy7OI9.js → index-BXupZ0pl.js} +1 -1
- package/_assets/{index-sMZT0osM.js → index-BYEO4mFR.js} +1 -1
- package/_assets/{index-koAbgvGY.js → index-BccN6K5r.js} +1 -1
- package/_assets/{index-CB7o8WQW.js → index-BeGq8iy0.js} +1 -1
- package/_assets/{index-BdcjNzsb.js → index-BecyzLoT.js} +1 -1
- package/_assets/{index-zsZ0nIv4.js → index-BfJ-QKCm.js} +1 -1
- package/_assets/{index-CGQb2ZQU.js → index-BgbpD9U4.js} +1 -1
- package/_assets/{index-BkA4dzPp.js → index-Bh5UTaeB.js} +1 -1
- package/_assets/{index-BZuG0Sc3.js → index-Bj9Iyp6h.js} +1 -1
- package/_assets/{index-Bt3T1cvz.js → index-Bnn0ZkbX.js} +1 -1
- package/_assets/{index-Cn9uLg18.js → index-BsJlFErD.js} +1 -1
- package/_assets/{index-CXgpMw_a.js → index-By0vIQQY.js} +1 -1
- package/_assets/{index-C9qn3MDW.js → index-C12063Q0.js} +1 -1
- package/_assets/{index-Bpjughes.js → index-C3n5CX-T.js} +3 -3
- package/_assets/{index-Cd27zE1I.js → index-C7qUllZE.js} +1 -1
- package/_assets/{index-CiRq1n15.js → index-C92g1mMH.js} +2 -2
- package/_assets/{index-Cq8I2bCh.js → index-C9Tyc_4P.js} +12 -12
- package/_assets/{index-DIZ6Fpja.js → index-CH0fY4DE.js} +1 -1
- package/_assets/{index-DwnMvkbN.js → index-CIvXnRxR.js} +1 -1
- package/_assets/{index-Domysh9-.js → index-COUpKEi3.js} +1 -1
- package/_assets/{index-BFG6-uk-.js → index-CStVd5hO.js} +1 -1
- package/_assets/{index-2pZiTD3a.js → index-CVJMJ5ib.js} +1 -1
- package/_assets/{index-CcCLyIxX.js → index-CVvddNb-.js} +3 -3
- package/_assets/{index-CX_8l6aH.js → index-Cd60w9wC.js} +1 -1
- package/_assets/{index-DG04DWBB.js → index-CeoZ_quC.js} +1 -1
- package/_assets/{index-SkahHxGM.js → index-ChH-BEH6.js} +1 -1
- package/_assets/{index-CVVzw90M.js → index-CrCEqqSc.js} +1 -1
- package/_assets/{index-ChdPVYi_.js → index-Cu7FOomH.js} +2 -2
- package/_assets/{index-Dbs-O_xu.js → index-D8HAo-hq.js} +2 -2
- package/_assets/{index-HMAhnswt.js → index-D93lVP2Z.js} +1 -1
- package/_assets/{index-D4I_r7iA.js → index-DCzMWgYB.js} +1 -1
- package/_assets/{index-HlCcqGG0.js → index-DFAQC55P.js} +1 -1
- package/_assets/{index-B2jn-mld.js → index-DV-D1rm_.js} +1 -1
- package/_assets/{index-DO1MDP-3.js → index-DWopoPMG.js} +1 -1
- package/_assets/{index-C_bUhgEP.js → index-DY2HLZR7.js} +1 -1
- package/_assets/{index-CU34Q9VB.js → index-DZbbUxqz.js} +1 -1
- package/_assets/{index-BeYcw5Co.js → index-DhJfQlI3.js} +1 -1
- package/_assets/{index-5g575ePx.js → index-Dlysgquh.js} +1 -1
- package/_assets/{index-DqbRg5LC.js → index-FnYl0-IH.js} +2 -2
- package/_assets/{index-BNzvL79U.js → index-NFLi3_OK.js} +1 -1
- package/_assets/{index-oyav6SwC.js → index-XZ_rZBqC.js} +1 -1
- package/_assets/{index-1UqZYo-x.js → index-ZmzAm-04.js} +1 -1
- package/_assets/{index-dFumStoV.js → index-hznwjI3b.js} +1 -1
- package/_assets/{index-DMsfjzv3.js → index-x1otqjN5.js} +1 -1
- package/_assets/{index-BAEUZZ6m.js → index-xIzbBpoa.js} +1 -1
- package/_assets/{index-C0FhBugy.js → index-xQRwfYpo.js} +3 -3
- package/_assets/{index.es-C5ucclti.js → index.es-CV3ZzR0v.js} +1 -1
- package/_assets/{index.es-BgY67W9o.js → index.es-CvYI4kyo.js} +4 -4
- package/_assets/{index.es-B088SWVm.js → index.es-DoNqTTY8.js} +1 -1
- package/_assets/{linkAccount-B2LX6Ayb.js → linkAccount-D0R_anql.js} +1 -1
- package/_assets/{localBatchGatewayRequest-CrEvGINX.js → localBatchGatewayRequest-D3ayDqLT.js} +1 -1
- package/_assets/{native-BYuJILVU.js → native-Dvf6Py4t.js} +1 -1
- package/_assets/{networks-BgzjLjJ2.js → networks-C_FZdidw.js} +1 -1
- package/_assets/{onramp-Svn_UmTw.js → onramp-73QiKjy2.js} +1 -1
- package/_assets/{openzeppelin-BPRRVTr1.js → openzeppelin-B-lW-LCn.js} +1 -1
- package/_assets/{ownerOf-BswBoTM4.js → ownerOf-CFg0Vnog.js} +1 -1
- package/_assets/{parseNft-CfYOiCXQ.js → parseNft-CQJX5i7g.js} +2 -2
- package/_assets/{parseSignature-gNg7kA4M.js → parseSignature-B8ORNT06.js} +3 -3
- package/_assets/{parseSignature-NfMUgfN4.js → parseSignature-C7Bg4ICM.js} +1 -1
- package/_assets/{passkeys-Bf7HGrQE.js → passkeys-CnT7FFCm.js} +1 -1
- package/_assets/{pay-with-exchange-NpC_jsVL.js → pay-with-exchange-D1snaauI.js} +1 -1
- package/_assets/{prepare-contract-call-DrM5fnvt.js → prepare-contract-call-gUfFspet.js} +1 -1
- package/_assets/{qr-overlay-CX-B0YKk.js → qr-overlay-DpC39UbJ.js} +1 -1
- package/_assets/{receive-DU_jmquO.js → receive-DoLTg1vH.js} +1 -1
- package/_assets/{resolveImplementation-0bOm_A8l.js → resolveImplementation-C9QiCx9e.js} +1 -1
- package/_assets/{rpc-DwUMO0mH.js → rpc-CMSbn2iN.js} +1 -1
- package/_assets/{secp256k1-CRg-T_AS.js → secp256k1-BJ7bCcmT.js} +1 -1
- package/_assets/{secp256k1-NtZ6kHJZ.js → secp256k1-Bsn7vpBQ.js} +1 -1
- package/_assets/{secp256k1-BJWN557q.js → secp256k1-DjE4Bhh_.js} +1 -1
- package/_assets/{send-B6q0W9lI.js → send-C299MJc-.js} +1 -1
- package/_assets/{send-batch-transaction-Cg-JwW7k.js → send-batch-transaction-BPpXN4Fh.js} +1 -1
- package/_assets/{send-eip712-transaction-GrhIPA6L.js → send-eip712-transaction-D6kwLa1u.js} +2 -2
- package/_assets/send-gasless-transaction-BVCq6iro.js +2 -0
- package/_assets/{send-transaction-Aq0ndQmo.js → send-transaction-DOroXsTv.js} +2 -2
- package/_assets/{sendMetaTransaction-BuEwIAyh.js → sendMetaTransaction-BgzHuwAc.js} +1 -1
- package/_assets/{sendRawTransaction-JGobH71Z.js → sendRawTransaction-DezSAkxN.js} +3 -3
- package/_assets/{sentry-2i8Tr7WR.js → sentry-BwKB4Jgk.js} +1 -1
- package/_assets/{serializeTransaction-B-NbRyZz.js → serializeTransaction-psWDn-qZ.js} +1 -1
- package/_assets/{session-proposal-b3xSScTf.js → session-proposal-CbjngApN.js} +1 -1
- package/_assets/{session-request-BhfPcY4l.js → session-request-B-6p9Iy6.js} +2 -2
- package/_assets/{sha256-BKfXR492.js → sha256-CW4Z69Qa.js} +1 -1
- package/_assets/{signing-CzYSJwB8.js → signing-WVQFEK4R.js} +3 -3
- package/_assets/{skeleton.styles-BwXvfynq.js → skeleton.styles-BpJWZ8pG.js} +1 -1
- package/_assets/{socials-ClkHxAE_.js → socials-DUXs1Y48.js} +1 -1
- package/_assets/{styled-jiv5F83t.js → styled-CVhCfwHn.js} +1 -1
- package/_assets/{swaps-BwEAGSoG.js → swaps-Q8DvVlLL.js} +1 -1
- package/_assets/{thirdweb-BCcw3IiV.js → thirdweb-DhSCkElu.js} +3 -3
- package/_assets/{to-serializable-transaction-CI-QnODl.js → to-serializable-transaction-B_fpIxbR.js} +2 -2
- package/_assets/{totalSupply-gVMBAoD-.js → totalSupply-DbHIgwL_.js} +1 -1
- package/_assets/{transaction-7HLCNEOz.js → transaction-DRQKYXRS.js} +1 -1
- package/_assets/{transactionReceipt-a17hpBtt.js → transactionReceipt-BPSwGpr5.js} +1 -1
- package/_assets/{transactions-up6hcXnh.js → transactions-DgPefDR1.js} +1 -1
- package/_assets/useCreditPacks-BMtorUrc.js +1 -0
- package/_assets/{useImportable-BpgbDKEn.js → useImportable-B8ire4qL.js} +1 -1
- package/_assets/{useInfiniteGrid-CyR838AE.js → useInfiniteGrid-CVaXxfUk.js} +1 -1
- package/_assets/{useStore-kijFHyHV.js → useStore-CX-1oAbc.js} +2 -2
- package/_assets/{useTheme-DIejI6C_.js → useTheme-QS2IpnyN.js} +1 -1
- package/_assets/{utils-BPBPOxKw.js → utils-DMz9kkrI.js} +1 -1
- package/_assets/{verifyHash-BqY8uOSx.js → verifyHash-B0_1_m-X.js} +1 -1
- package/_assets/{w3m-modal-D0vRJJdP.js → w3m-modal-BAX9M2UR.js} +1 -1
- package/_assets/{w3m-modal-DWLBXt0Y.js → w3m-modal-CX_GlEzf.js} +1 -1
- package/_assets/{wait-for-tx-receipt-1xUKRb2m.js → wait-for-tx-receipt-BzR663uT.js} +1 -1
- package/_assets/{wallets-B25NNhvI.js → wallets-DQjyJT7O.js} +5 -5
- package/_assets/{web-connector-N42CiDrd.js → web-connector-ClAZTCUe.js} +3 -3
- package/_assets/{writeContract-CuegwesU.js → writeContract-CAcPIacd.js} +1 -1
- package/_assets/{zora-sepolia-ChK9Wob7.js → zora-sepolia-CFzDpcm0.js} +1 -1
- package/_assets/{zoraTestnet-k3Q5cVnd.js → zoraTestnet-DO-LfJcd.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Cart-CWjD9l0B.js +0 -696
- package/_assets/ItemDetail-7FWHJW_E.js +0 -3577
- package/_assets/LazyEmoteControls-D_Cuiw7-.js +0 -2
- package/_assets/authorizations-CAFiSVFA.js +0 -1
- package/_assets/decimals-DUdu01dG.js +0 -1
- package/_assets/get-ecosystem-wallet-info-ASLw891I.js +0 -1
- package/_assets/getNFT-BLfp3o9w.js +0 -1
- package/_assets/send-gasless-transaction-Dnd0BR62.js +0 -2
- package/_assets/useCreditPacks-CDD4tXAF.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var y=Object.defineProperty;var h=(e,a,r)=>a in e?y(e,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[a]=r;var p=(e,a,r)=>h(e,typeof a!="symbol"?a+"":a,r);import{r as m}from"./react-BYHuwl8r.js";import{m as I,n as A,o as T,p as E,c as u,r as S,q as M,v as b,w as R,l as v}from"./index-
|
|
1
|
+
var y=Object.defineProperty;var h=(e,a,r)=>a in e?y(e,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[a]=r;var p=(e,a,r)=>h(e,typeof a!="symbol"?a+"":a,r);import{r as m}from"./react-BYHuwl8r.js";import{m as I,n as A,o as T,p as E,c as u,r as S,q as M,v as b,w as R,l as v}from"./index-C9Tyc_4P.js";import{i as L,c as k,e as C,a as _,d as x,f as $}from"./buy-BVwGfu-u.js";import{a as O,b as F}from"./authorizations-rKqoPfba.js";const f=1e3*60*60*24*182;async function U(e){const a=await fetch(`${u.marketplaceServerUrl}/v3/catalog/importable?seller=${e.toLowerCase()}`);if(!a.ok)throw new Error(`fetchImportable ${a.status}`);const{data:r}=await a.json(),n=r??[];if(n.length===0)return{creations:[],owned:[]};const t=n[0].chainId||u.chainId,o=await S(t),s=n.map(i=>({...i,suggestedCredits:M(i.manaWei,o)??1}));return{creations:s.filter(i=>i.listingType==="primary"),owned:s.filter(i=>i.listingType==="secondary")}}const l=[3e3,3e3,4e3,5e3,6e3,8e3,8e3];async function w(e,a,r){for(let n=0;;n++)try{r==null||r(n===0?{step:"publishing"}:{step:"indexing",attempt:n,of:l.length}),await E(e,a);return}catch(t){if(!/already an open order/i.test((t==null?void 0:t.message)??"")||n>=l.length)throw t;await new Promise(s=>setTimeout(s,l[n]))}}class W extends Error{constructor(r){super("Your old listing was removed, but re-listing in the Shop failed — re-list it from My Assets.");p(this,"original");this.name="RelistFailedError",this.original=r}}async function j(e,a){try{const n=new Map;for(const s of e){const i=`${s.contractAddress.toLowerCase()}:${s.listingType}:${s.chainId}`;n.has(i)||n.set(i,s)}const o=(await Promise.all([...n.values()].map(s=>s.listingType==="primary"?L({contractAddress:s.contractAddress,chainId:s.chainId}):O(F(s.contractAddress,s.chainId),a)))).filter(s=>!s).length;return{perItem:2,approvals:o,total:e.length*2+o}}catch{return null}}async function H(e,a,r,n={}){const t=n.onPhase,o=a/10,s=e.chainId,i=e.network;if(e.listingType==="secondary"&&!await I())throw new Error("The Shop does not offer secondary sales; this listing cannot be migrated.");let g=!1;if(n.cancelOld!==!1){const c=await A(e.oldTradeId).catch(d=>{if(d instanceof T)return null;throw d});if(c){t==null||t({step:"cancelling"});const d=k({trade:c,signer:r.signer});t==null||t({step:"confirming-cancel"}),await d,g=!0}}try{if(e.listingType==="primary"){t==null||t({step:"authorising"}),await C({signer:r.signer,contractAddress:e.contractAddress,chainId:s}),t==null||t({step:"signing"});const c=await _({signer:r.signer,item:{contractAddress:e.contractAddress,itemId:e.itemId??"",network:i,chainId:s},usdPrice:o,uses:e.available,expiresAtMs:Date.now()+f});await w(c,r.identity,t)}else{t==null||t({step:"authorising"}),await x({signer:r.signer,contractAddress:e.contractAddress,chainId:s}),t==null||t({step:"signing"});const c=await $({signer:r.signer,nft:{contractAddress:e.contractAddress,tokenId:e.tokenId??"",network:i,chainId:s},usdPrice:o,expiresAtMs:Date.now()+f});await w(c,r.identity,t)}}catch(c){throw g?new W(c):c}}function K(){const e=b(o=>{var s;return(s=o.session)==null?void 0:s.address}),a=R(),{data:r,isLoading:n}=v({queryKey:["importable",e],queryFn:()=>U(e),enabled:!!e,staleTime:5*6e4}),t=m.useMemo(()=>[...(r==null?void 0:r.creations)??[],...a?(r==null?void 0:r.owned)??[]:[]],[r,a]);return{items:t,count:r?t.length:void 0,isLoading:n}}export{W as R,j as c,H as i,K as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{as as x,at as N,au as v,av as p,aw as m}from"./index-
|
|
1
|
+
import{as as x,at as N,au as v,av as p,aw as m}from"./index-C9Tyc_4P.js";var b=class extends x{constructor(e,a){super(e,a)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,a){var d,l;const{state:i}=e,t=super.createResult(e,a),{isFetching:o,isRefetching:P,isError:c,isRefetchError:h}=t,s=(l=(d=i.fetchMeta)==null?void 0:d.fetchMore)==null?void 0:l.direction,r=c&&s==="forward",u=o&&s==="forward",n=c&&s==="backward",g=o&&s==="backward";return{...t,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:v(a,i.data),hasPreviousPage:N(a,i.data),isFetchNextPageError:r,isFetchingNextPage:u,isFetchPreviousPageError:n,isFetchingPreviousPage:g,isRefetchError:h&&!r&&!n,isRefetching:P&&!u&&!g}}};function F(e,a){return p(e,b)}function R(e,a,i={}){var c,h,s;const t=F({queryKey:e,enabled:i.enabled,queryFn:({pageParam:r})=>a(r),initialPageParam:0,getNextPageParam:(r,u)=>{if(r.items.length===0)return;const n=u.reduce((g,f)=>g+f.items.length,0);return n<r.total?n:void 0},placeholderData:m}),o=(((c=t.data)==null?void 0:c.pages)??[]).flatMap(r=>r.items),P=((s=(h=t.data)==null?void 0:h.pages[0])==null?void 0:s.total)??0;return{items:o,total:P,isLoading:t.isLoading,isPlaceholderData:t.isPlaceholderData,isError:t.isError,error:t.error,hasNextPage:t.hasNextPage,isFetchingNextPage:t.isFetchingNextPage,isFetchNextPageError:t.isFetchNextPageError,fetchNextPage:t.fetchNextPage}}export{R as u};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-
|
|
2
|
-
import{_ as m,j as _,c as v,k as b,l as k}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-hznwjI3b.js","_assets/index-CH0fY4DE.js","_assets/react-BYHuwl8r.js","_assets/sentry-BwKB4Jgk.js","_assets/index-DFAQC55P.js","_assets/index-COUpKEi3.js","_assets/index-BX3lLNL7.js","_assets/ethers-Zj6qlwhg.js","_assets/events-DQ172AOg.js","_assets/dcl-schemas-CmtP3U6y.js","_assets/DeploymentBuilder-BuYQQso0.js","_assets/ContentClient-S2yImRPT.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as m,j as _,c as v,k as b,l as k}from"./index-C9Tyc_4P.js";import{d as E}from"./dcl-schemas-CmtP3U6y.js";const w=()=>({cover:"",coverHash:"",description:"",links:{website:"",twitter:"",discord:"",facebook:""}}),d=t=>`urn:decentraland:off-chain:marketplace-stores:${t.toLowerCase()}`;function f(t,e){var r;const o=((r=t==null?void 0:t.find(n=>n.name===e))==null?void 0:r.url)??"";return o.startsWith("https://")?o:""}async function S(t){var e,o,r;try{const n=await fetch(`${v.peerUrl}/content/entities/active`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pointers:[d(t)]})});if(!n.ok)return w();const i=await n.json(),s=i==null?void 0:i[0];if(!(s!=null&&s.metadata))return w();const{metadata:c,content:l}=s,u=(o=(e=c.images)==null?void 0:e.find(p=>p.name==="cover"))==null?void 0:o.file,h=u?(r=l==null?void 0:l.find(p=>p.file===u))==null?void 0:r.hash:void 0;return{cover:h?`${v.peerUrl}/content/contents/${h}`:"",coverHash:h??"",description:(c.description??"").trim(),links:{website:f(c.links,"website"),twitter:f(c.links,"twitter"),discord:f(c.links,"discord"),facebook:f(c.links,"facebook")}}}catch{return w()}}const g=["website","twitter","discord","facebook"],C={website:"https://",twitter:"https://www.twitter.com/",discord:"https://discord.gg/",facebook:"https://www.facebook.com/"};function I(t){return{cover:t.cover,coverName:t.cover?L(t.cover):"",coverHash:t.coverHash,description:t.description,links:{...t.links}}}const y=new Map;function H(t){let e=y.get(t);return e||(e=(async()=>{const{hashV1:o}=await m(async()=>{const{hashV1:n}=await import("./index-hznwjI3b.js").then(i=>i.i);return{hashV1:n}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])),r=new Uint8Array(await(await fetch(t)).arrayBuffer());return o(r)})(),y.set(t,e)),e}function L(t){return`cover/${decodeURIComponent(t.split("?")[0].split("/").pop()||"")||"cover.jpeg"}`}function $(t,e){return e===""||e.startsWith(C[t])}function T(t,e){const o=t.toLowerCase(),r=g.filter(i=>e.links[i]).map(i=>({name:i,url:e.links[i]})),n=e.cover&&e.coverName?[{name:"cover",file:e.coverName}]:[];return{id:d(o),owner:o,description:e.description,images:n,links:r,version:1}}async function N(t){const e=new Map;if(t.cover&&t.coverName){const o=await fetch(t.cover);e.set(t.coverName,new Uint8Array(await o.arrayBuffer()))}return e}async function A(t,e,o){try{const[{buildEntity:r},{createContentClient:n}]=await Promise.all([m(()=>import("./DeploymentBuilder-BuYQQso0.js").then(a=>a.D),__vite__mapDeps([10,2,1,3,4,5,6,7,8,9])),m(()=>import("./ContentClient-S2yImRPT.js").then(a=>a.C),__vite__mapDeps([11,2,1,3,4,5,6,7,8,9]))]),i=T(t,e),s=await N(e),c=await r({type:E.EntityType.STORE,pointers:[d(t)],files:s,metadata:i,timestamp:Date.now()}),l=_.Authenticator.signPayload(o,c.entityId),u={fetch:(a,p)=>globalThis.fetch(a,p)};await n({url:`${v.peerUrl}/content`,fetcher:u}).deploy({...c,authChain:l})}catch(r){b(r,{flow:"saveStore"});const n=new Error("save-failed");throw n.cause=r,n}}function F(t){return k({queryKey:["store",t==null?void 0:t.toLowerCase()],enabled:!!t,staleTime:5*6e4,queryFn:()=>S(t)})}export{g as L,C as a,I as d,$ as i,A as s,H as t,F as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./react-BYHuwl8r.js";import{u as t,T as m,h as s}from"./index-
|
|
1
|
+
import"./react-BYHuwl8r.js";import{u as t,T as m,h as s}from"./index-C9Tyc_4P.js";function r(){const e=t(s);return e[m]||e}export{r as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as z}from"./sentry-
|
|
1
|
+
import{p as z}from"./sentry-BwKB4Jgk.js";const w="rpc.thirdweb.com",L="social.thirdweb.com",A="embedded-wallet.thirdweb.com",R="pay.thirdweb.com",v="storage.thirdweb.com",x="bundler.thirdweb.com",$="c.thirdweb.com",C="insight.thirdweb.com",N="engine.thirdweb.com",O="bridge.thirdweb.com";let T={analytics:$,bridge:O,bundler:x,engineCloud:N,inAppWallet:A,insight:C,pay:R,rpc:w,social:L,storage:v};const H=e=>{T={analytics:e.analytics??$,bridge:e.bridge??O,bundler:e.bundler??x,engineCloud:e.engineCloud??N,inAppWallet:e.inAppWallet??A,insight:e.insight??C,pay:e.pay??R,rpc:e.rpc??w,social:e.social??L,storage:e.storage??v}},l=()=>T,V=e=>{const t=T[e];return t.startsWith("localhost")?`http://${t}`:`https://${t}`};let M=null;const X=e=>{M=e},P=()=>M,Se=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_RPC_URL:w,getServiceKey:P,getThirdwebBaseUrl:V,getThirdwebDomains:l,setServiceKey:X,setThirdwebDomains:H},Symbol.toStringTag,{value:"Module"})),G="5.120.1";class Q extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}}const S=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function Y(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?"mobile":typeof navigator<"u"?"browser":"node"}function q(e){for(let t=0,n=S.length;t<n;t++){const[r,s]=S[t];if(s.exec(e))return r}return null}function E(e){return e.split(".").length===3}var J={};const Z=typeof z<"u"&&J&&!1,ee=6e4;function te(e,t){async function n(r,s){const{requestTimeoutMs:c=ee,useAuthToken:o,...y}=s||{};let i=y.headers?new Headers(y.headers):typeof r=="object"?r.headers:void 0;const f=typeof r=="string"?r:r.url;if(_(f)){i||(i=new Headers);const p=o&&e.secretKey&&E(e.secretKey)?e.secretKey:void 0,W=e.secretKey&&!E(e.secretKey)?e.secretKey:void 0,m=e.clientId;p&&ie(f)?(i.set("authorization",`Bearer ${p}`),e.teamId&&i.set("x-team-id",e.teamId),m&&i.set("x-client-id",m)):p&&!re(f)&&!se(f)?(i.set("authorization",`Bearer ${p}`),e.teamId&&i.set("x-team-id",e.teamId)):(W&&i.set("x-secret-key",W),m&&i.set("x-client-id",m)),t&&(i.set("x-ecosystem-id",t.id),t.partnerId&&i.set("x-ecosystem-partner-id",t.partnerId));for(const[j,K]of k())i.set(j,K);const U=P();U&&i.set("x-service-api-key",U)}let u,g;return c&&(u=new AbortController,g=setTimeout(()=>{u==null||u.abort("timeout")},c)),fetch(r,{...y,headers:i,signal:u==null?void 0:u.signal}).finally(()=>{g&&clearTimeout(g)})}return n}const ne=[".thirdweb.com",".ipfscdn.io",".thirdweb.dev",".thirdweb-dev.com",".thirdwebstorage-dev.com"],d=new Q(4096);function _(e){if(d.has(e))return d.get(e);try{const{hostname:t}=new URL(e),n=ne.some(r=>t.endsWith(r));return d.set(e,n),n}catch{return d.set(e,!1),!1}}function re(e){try{const{hostname:t}=new URL(e);return t.startsWith("pay.")}catch{return!1}}function se(e){try{const{hostname:t}=new URL(e);return t.startsWith("in-app-wallet.")||t.startsWith("embedded-wallet.")}catch{return!1}}function ie(e){try{const{hostname:t}=new URL(e);return t.endsWith(".bundler.thirdweb.com")||t.endsWith(".bundler.thirdweb-dev.com")}catch{return!1}}const ce="unified-sdk";let h;function k(){if(h)return h;let e=null;typeof navigator<"u"&&(e=q(navigator.userAgent));let t;return typeof globalThis<"u"&&"Application"in globalThis&&(t=globalThis.Application.applicationId),h=Object.entries({"x-sdk-name":ce,"x-sdk-os":e?oe(e):"unknown","x-sdk-platform":Y(),"x-sdk-version":G,...t?{"x-bundle-id":t}:{}}),h}function oe(e){const t=e.toLowerCase();if(t.startsWith("win"))return"win";switch(e){case"Mac OS":return"mac";case"iOS":return"ios";case"Android OS":return"android";default:return t.replace(/\s/gi,"_")}}const Ee=Object.freeze(Object.defineProperty({__proto__:null,IS_THIRDWEB_URL_CACHE:d,getClientFetch:te,getPlatformHeaders:k,isThirdwebUrl:_},Symbol.toStringTag,{value:"Module"})),ue=new Map,ae=new Map;function le(e){const t=(s,c)=>({clear:()=>c.delete(s),get:()=>c.get(s),set:o=>c.set(s,o)}),n=t(e,ue),r=t(e,ae);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}async function B(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){const r=le(t),s=r.response.get();if(s&&n>0&&Date.now()-s.created.getTime()<n)return s.data;let c=r.promise.get();c||(c=e(),r.promise.set(c));try{const o=await c;return r.response.set({created:new Date,data:o}),o}finally{r.promise.clear()}}const a=new Map;function de(e){const t=l().rpc;if(typeof e=="number")return{id:e,rpc:`https://${e}.${t}`};if(we(e))return D(e);if(he(e))return F(e);let n=e.rpc;n||(n=`https://${e.id}.${t}`);const r={...e,rpc:n};return a.set(e.id,r),r}function fe(e){for(const t of e)a.set(t.id,t)}function pe(e){if(a.has(e))return a.get(e);const t=l().rpc;return{id:e,rpc:`https://${e}.${t}`}}function me(e){return a.get(e)}function he(e){return"rpc"in e&&Array.isArray(e.rpc)&&"slug"in e}function F(e){var n;const t=l().rpc;return{blockExplorers:(n=e==null?void 0:e.explorers)==null?void 0:n.map(r=>({apiUrl:r.url,name:r.name,url:r.url})),faucets:e.faucets?[...e.faucets]:void 0,icon:e.icon,id:e.chainId,name:e.name,nativeCurrency:{decimals:e.nativeCurrency.decimals,name:e.nativeCurrency.name,symbol:e.nativeCurrency.symbol},rpc:e.rpc[0]??`https://${e.chainId}.${t}`,testnet:e.testnet?!0:void 0}}function we(e){return"rpcUrls"in e&&!("rpc"in e)}function D(e){const t=l().rpc;return{blockExplorers:e!=null&&e.blockExplorers?Object.values(e==null?void 0:e.blockExplorers).map(n=>({apiUrl:n.apiUrl,name:n.name,url:n.url})):[],id:e.id,name:e.name,nativeCurrency:{decimals:e.nativeCurrency.decimals,name:e.nativeCurrency.name,symbol:e.nativeCurrency.symbol},rpc:e.rpcUrls.default.http[0]??`https://${e.id}.${t}`,testnet:e.testnet?!0:void 0}}function be(e){const t=l().rpc;if(typeof e.chain=="number")return`https://${e.chain}.${t}/${e.client.clientId}`;const{rpc:n}=e.chain;if(_(n)){const r=new URL(e.chain.rpc.replace(w,t));return(r.pathname==="/"||r.pathname.startsWith("/$"))&&(r.pathname=`/${e.client.clientId}`),r.toString()}return n}async function ye(e){var t;return(t=e.nativeCurrency)!=null&&t.symbol?e.nativeCurrency.symbol:b(e).then(n=>n.nativeCurrency.symbol).catch(()=>"ETH")}async function ge(e){var t;return(t=e.nativeCurrency)!=null&&t.decimals?e.nativeCurrency.decimals:b(e).then(n=>n.nativeCurrency.decimals).catch(()=>18)}async function Te(e){var t;return(t=e.nativeCurrency)!=null&&t.name?e.nativeCurrency.name:b(e).then(n=>n.nativeCurrency.name).catch(()=>"ETH")}function b(e){const t=e.id;return B(async()=>{try{const n=await fetch(`https://api.thirdweb.com/v1/chains/${t}`);if(!n.ok)throw new Error(`Failed to fetch chain data for chainId ${t}. ${n.status} ${n.statusText}`);const r=await n.json();if(r.error)throw new Error(`Failed to fetch chain data for chainId ${t}`);if(!r.data)throw new Error(`Failed to fetch chain data for chainId ${t}`);const s=r.data;return I(e,s)}catch{return I(e)}},{cacheKey:`chain:${t}`,cacheTime:300*1e3})}async function _e(){return B(async()=>{const e=await fetch("https://api.thirdweb.com/v1/chains/services?service=insight");if(!e.ok)throw new Error(`Failed to fetch services. ${e.status} ${e.statusText}`);const t=await e.json();return Object.keys(t.data).map(n=>Number(n))},{cacheKey:"chain:insight-enabled",cacheTime:1440*60*1e3})}function We(e){var t;return{blockExplorers:(t=e.explorers)==null?void 0:t.map(n=>({apiUrl:n.url,name:n.name,url:n.url})),faucets:e.faucets?[...e.faucets]:void 0,icon:e.icon,id:e.chainId,name:e.name,nativeCurrency:e.nativeCurrency,rpc:e.rpc[0]||"",testnet:e.testnet===!0?!0:void 0}}function I(e,t){var r;const n=e.nativeCurrency?{...t==null?void 0:t.nativeCurrency,...e.nativeCurrency}:t==null?void 0:t.nativeCurrency;return{...t,chain:(t==null?void 0:t.chain)||e.name||"",chainId:e.id||(t==null?void 0:t.chainId)||-1,explorers:((r=e.blockExplorers)==null?void 0:r.map(s=>({name:s.name,standard:"EIP3091",url:s.url})))||(t==null?void 0:t.explorers),icon:e.icon||(t==null?void 0:t.icon),name:e.name||(t==null?void 0:t.name)||"",nativeCurrency:{decimals:(n==null?void 0:n.decimals)||18,name:(n==null?void 0:n.name)||"",symbol:(n==null?void 0:n.symbol)||""},rpc:e.rpc?[e.rpc]:(t==null?void 0:t.rpc)||[""],shortName:(t==null?void 0:t.shortName)||e.name||"",slug:(t==null?void 0:t.slug)||e.name||"",stackType:(t==null?void 0:t.stackType)||"",testnet:e.testnet||(t==null?void 0:t.testnet)||!1}}const Ie=Object.freeze(Object.defineProperty({__proto__:null,CUSTOM_CHAIN_MAP:a,cacheChains:fe,convertApiChainToChain:We,convertLegacyChain:F,convertViemChain:D,defineChain:de,getCachedChain:pe,getCachedChainIfExists:me,getChainDecimals:ge,getChainMetadata:b,getChainNativeCurrencyName:Te,getChainSymbol:ye,getInsightEnabledChainIds:_e,getRpcUrlForChain:be},Symbol.toStringTag,{value:"Module"}));export{Q as L,pe as a,be as b,V as c,de as d,te as e,l as f,_e as g,me as h,_ as i,E as j,b as k,q as l,ye as m,ge as n,Te as o,fe as p,Se as q,Ee as r,Ie as u,B as w};
|
|
@@ -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-JGobH71Z.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-tcDS1IIB.js";import{s as ge}from"./secp256k1-NtZ6kHJZ.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-DezSAkxN.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-ooNEpt2E.js";import{s as ge}from"./secp256k1-Bsn7vpBQ.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{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-xQRwfYpo.js";import{c as f,U as le}from"./index-NFLi3_OK.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-CZkhqHTC.js";import{P as D}from"./index-BUl8ifmb.js";import"./index-Bh5UTaeB.js";import{H as oe}from"./HelpersUtil-YGElNPtF.js";import{C as F}from"./ConstantsUtil-_wDeZ6ui.js";import"./index-C12063Q0.js";import"./index-B51FIhv5.js";import"./index-CVJMJ5ib.js";import"./index-B6kTxvDn.js";import{S as ve}from"./SwapController-BPzqNjIO.js";import"./index-06iPgNel.js";import"./index-C9Tyc_4P.js";import"./react-BYHuwl8r.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-BwKB4Jgk.js";import"./ethers-Zj6qlwhg.js";import"./intl-CBcMB1D2.js";import"./index-C92g1mMH.js";import"./events-DQ172AOg.js";import"./index-xIzbBpoa.js";import"./index--LxIcqOG.js";import"./index-nibyPLVP.js";import"./index-ZmzAm-04.js";import"./index.es-DoNqTTY8.js";import"./browser-ponyfill-Dj0kiq3a.js";import"./NetworkUtil-ooNEpt2E.js";import"./index-Cd60w9wC.js";import"./index-CeoZ_quC.js";import"./index-Bnn0ZkbX.js";import"./index-BKjJvyPt.js";import"./index-BLGkMtvD.js";import"./MathUtil-BGCe3rZ3.js";import"./index-CIvXnRxR.js";import"./index-BgbpD9U4.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,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-Btwy40Yo.js";import{c as u,U as We}from"./index-BccN6K5r.js";import"./index-C9Tyc_4P.js";import"./react-BYHuwl8r.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-BwKB4Jgk.js";import"./ethers-Zj6qlwhg.js";import"./intl-CBcMB1D2.js";import"./index-C92g1mMH.js";import"./events-DQ172AOg.js";import"./index-xIzbBpoa.js";import"./index--LxIcqOG.js";import"./index.es-CvYI4kyo.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index.es-DoNqTTY8.js";import"./browser-ponyfill-Dj0kiq3a.js";import"./NetworkUtil-ooNEpt2E.js";import"./W3MFrameProviderSingleton-CZkhqHTC.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 +1 @@
|
|
|
1
|
-
import{f as B}from"./transactionReceipt-
|
|
1
|
+
import{f as B}from"./transactionReceipt-BPSwGpr5.js";import{h as g,c as N}from"./prepare-contract-call-gUfFspet.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};
|