@wormhole-foundation/wormhole-connect 3.0.0-beta.12-development → 3.0.0-beta.13-development
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{tokens-BjeNFBPV.js → tokens-CrPLX1jh.js} +13 -13
- package/dist/main.js +75 -75
- package/dist/src/components/SampleApp/index.d.ts.map +1 -1
- package/dist/src/config/mainnet/rpcs.d.ts.map +1 -1
- package/dist/src/config/mainnet/tokens.d.ts.map +1 -1
- package/dist/src/config/testnet/rpcs.d.ts.map +1 -1
- package/dist/src/config/testnet/tokens.d.ts.map +1 -1
- package/dist/src/config/types.d.ts +2 -1
- package/dist/src/config/types.d.ts.map +1 -1
- package/dist/src/contexts/TokensContext.d.ts.map +1 -1
- package/dist/src/exports/executor.d.ts +1 -1
- package/dist/src/exports/executor.d.ts.map +1 -1
- package/dist/src/icons/ChainIcons.d.ts.map +1 -1
- package/dist/src/icons/Chains/LINEA.d.ts +4 -0
- package/dist/src/icons/Chains/LINEA.d.ts.map +1 -0
- package/dist/src/icons/Chains/POLY.d.ts +2 -2
- package/dist/src/icons/Chains/POLY.d.ts.map +1 -1
- package/dist/src/icons/Chains/SONIC.d.ts +4 -0
- package/dist/src/icons/Chains/SONIC.d.ts.map +1 -0
- package/dist/src/icons/SvgDefs.d.ts.map +1 -1
- package/dist/src/icons/TokenIcons.d.ts.map +1 -1
- package/dist/src/icons/Tokens/POLY.d.ts.map +1 -1
- package/dist/src/sdklegacy/config/MAINNET.d.ts.map +1 -1
- package/dist/src/sdklegacy/config/TESTNET.d.ts.map +1 -1
- package/dist/src/utils/coingecko.d.ts.map +1 -1
- package/dist/src/utils/sdkv2.d.ts +1 -1
- package/dist/src/utils/sdkv2.d.ts.map +1 -1
- package/dist/src/utils/wallet/index.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/GasSlider/index.d.ts +1 -0
- package/dist/src/views/v2/Bridge/GasSlider/index.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
- package/dist/src/views/v2/Redeem/index.d.ts.map +1 -1
- package/lib/{account-k-CXVcvA.mjs → account-DRrQuG9b.mjs} +1 -1
- package/lib/{account-gVjkECaX.js → account-nmHnnwf-.js} +1 -1
- package/lib/{add-Bgr8Uh8B.mjs → add-B3TOzisV.mjs} +1 -1
- package/lib/{add-CgyvYm-l.js → add-PboF8xOA.js} +1 -1
- package/lib/{address-CrYNZ_Nj.mjs → address-BkeBsCZD.mjs} +1837 -1809
- package/lib/{address-ByLIzxVb.mjs → address-CHEvC20V.mjs} +1 -1
- package/lib/{address-DfgK_jn7.js → address-CslafWGT.js} +1 -1
- package/lib/address-DKM11kf_.js +15 -0
- package/lib/{address-DGYJWkFz.js → address-vHTAfgt6.js} +1 -1
- package/lib/{address-BJNAPSnr.mjs → address-xvE59bSC.mjs} +1 -1
- package/lib/{all-wallets-BeYsJiCM.js → all-wallets-C3KaOAtR.js} +1 -1
- package/lib/{all-wallets-DdRIEq-V.mjs → all-wallets-i8sBvyse.mjs} +1 -1
- package/lib/{app-store-C9yZzH2t.js → app-store-DMPxp7LI.js} +1 -1
- package/lib/{app-store-eKRqPW4N.mjs → app-store-D_gEJYR-.mjs} +1 -1
- package/lib/{apple-DQcCTOa_.mjs → apple-C7dx7WbA.mjs} +1 -1
- package/lib/{apple-B3Aps_l8.js → apple-CBv-wD_N.js} +1 -1
- package/lib/{aptos-DySrgy5u.mjs → aptos-5WdoBDe7.mjs} +3 -3
- package/lib/{aptos-IciOSw-S.js → aptos-7NDR_C5e.js} +2 -2
- package/lib/{aptos-CxfKcGPe.js → aptos-BHb4m4xc.js} +1 -1
- package/lib/{aptos-M18090BQ.mjs → aptos-DjCb_S8U.mjs} +7 -7
- package/lib/{arrow-bottom-CUgsoqql.js → arrow-bottom-JVAM2flH.js} +1 -1
- package/lib/{arrow-bottom-circle-CvfJ5p_y.mjs → arrow-bottom-circle-CNlCzI_j.mjs} +1 -1
- package/lib/{arrow-bottom-circle-u8tFbHrW.js → arrow-bottom-circle-Cwm4Epf6.js} +1 -1
- package/lib/{arrow-bottom-Duiu5Tg_.mjs → arrow-bottom-dGyduTnX.mjs} +1 -1
- package/lib/{arrow-left-IZiFrwcP.js → arrow-left-BCNUIhF5.js} +1 -1
- package/lib/{arrow-left-avYXBHF4.mjs → arrow-left-PKOB36Bh.mjs} +1 -1
- package/lib/{arrow-right-Cbunep5L.mjs → arrow-right-CS5PKMHz.mjs} +1 -1
- package/lib/{arrow-right-CF-NNN4L.js → arrow-right-DmYVvh1l.js} +1 -1
- package/lib/{arrow-top-DBWWW9Oy.mjs → arrow-top-BkM6S1a6.mjs} +1 -1
- package/lib/{arrow-top-DCGkz6k-.js → arrow-top-Bo7YKrfd.js} +1 -1
- package/lib/{bank-C2jhIapN.mjs → bank-CCF3DOdG.mjs} +1 -1
- package/lib/{bank-C-CLDGG9.js → bank-DLZl3tlW.js} +1 -1
- package/lib/{basic-CIBqPAeW.mjs → basic-B3TQQ8Sq.mjs} +2 -2
- package/lib/{basic-DVsxPr6-.js → basic-DVoqEslQ.js} +1 -1
- package/lib/{blake2b-GH2Zzt65.mjs → blake2b-CAi92fbu.mjs} +17 -17
- package/lib/{blake2b-CCJ4LnEi.js → blake2b-DQdnnomV.js} +1 -1
- package/lib/{browser-DFX8bJKi.mjs → browser-8x7RJ5du.mjs} +1 -1
- package/lib/{browser-BQ2hKa4j.js → browser-CRt_zD3Q.js} +1 -1
- package/lib/{browser-ponyfill-JlME40Yz.mjs → browser-ponyfill-B32wgiqZ.mjs} +1 -1
- package/lib/{browser-ponyfill-DqqaJGv_.js → browser-ponyfill-UnUv8h3i.js} +1 -1
- package/lib/{card-CUMXwdG1.js → card-B4Tu3QQo.js} +1 -1
- package/lib/{card-4-u9SA69.mjs → card-CXjBQX3v.mjs} +1 -1
- package/lib/{ccip-FetjJVFw.mjs → ccip-CIIU_fEJ.mjs} +2 -2
- package/lib/{ccip-BTGJ_kF8.js → ccip-DaWU7YTU.js} +1 -1
- package/lib/{chain-DTh9H2Cq.js → chain-CJuQGMF5.js} +1 -1
- package/lib/{chain-Dq8acwHq.mjs → chain-uXEmLNMk.mjs} +1 -1
- package/lib/{checkmark-DDLHlQQ9.mjs → checkmark-BAUqIoTm.mjs} +1 -1
- package/lib/{checkmark-BaLFRM45.js → checkmark-C7_13-xW.js} +1 -1
- package/lib/{checkmark-bold-COMu2UxE.js → checkmark-bold-BAPMY9Va.js} +1 -1
- package/lib/{checkmark-bold-CuRoxeU8.mjs → checkmark-bold-DdxcN-xa.mjs} +1 -1
- package/lib/{chevron-bottom-C4e9WRar.js → chevron-bottom-BhliKUSk.js} +1 -1
- package/lib/{chevron-bottom-BWzCLrD5.mjs → chevron-bottom-DPs0vktV.mjs} +1 -1
- package/lib/{chevron-left-CGVLc133.js → chevron-left-CmxD6cz4.js} +1 -1
- package/lib/{chevron-left--LyUtyQT.mjs → chevron-left-Dk6PhtGR.mjs} +1 -1
- package/lib/{chevron-right-kMciDMkJ.mjs → chevron-right-CkGXlHcz.mjs} +1 -1
- package/lib/{chevron-right-BwKWUL52.js → chevron-right-CsZm-r4d.js} +1 -1
- package/lib/{chevron-top-CAHxogoB.js → chevron-top-COxXTPhY.js} +1 -1
- package/lib/{chevron-top-DwIXDDfD.mjs → chevron-top-Cckcz4Qs.mjs} +1 -1
- package/lib/{chrome-store-KsYwGQZ1.js → chrome-store-BQDKjVx4.js} +1 -1
- package/lib/{chrome-store-BtgUtu2e.mjs → chrome-store-BWCBtyqY.mjs} +1 -1
- package/lib/{chunk-KJH4KKG6-DOESg_ru.js → chunk-KJH4KKG6-CAnNL4lj.js} +1 -1
- package/lib/{chunk-KJH4KKG6-cfe1Zo7n.mjs → chunk-KJH4KKG6-CCerRpgp.mjs} +2 -2
- package/lib/{clock-CeP_x_KK.mjs → clock-BVouBwH-.mjs} +1 -1
- package/lib/{clock-DZ0ehwc-.js → clock-DyD0fxqO.js} +1 -1
- package/lib/{close-fTN6nBRu.mjs → close-BWXb69Wl.mjs} +1 -1
- package/lib/{close-DQfNwzpp.js → close-Cw0rUieJ.js} +1 -1
- package/lib/{coinPlaceholder-DetWjpMK.mjs → coinPlaceholder-BMScJe5r.mjs} +1 -1
- package/lib/{coinPlaceholder-Dg3gZsJM.js → coinPlaceholder-cDwG015N.js} +1 -1
- package/lib/{compass-BNDqAmOT.js → compass-BEkdaonl.js} +1 -1
- package/lib/{compass-Bi1bPHDM.mjs → compass-Ck1hdMBP.mjs} +1 -1
- package/lib/{constants-CoxhiYrX.js → constants-84--TxnQ.js} +1 -1
- package/lib/{constants-CPx3n7t3.mjs → constants-DL79O3Cw.mjs} +4 -4
- package/lib/{contract-D8VzaUQJ.mjs → contract-C26uilM9.mjs} +171 -171
- package/lib/{contract-DYtnmT6F.js → contract-C2wJ6LwN.js} +1 -1
- package/lib/{copy-CYLp0MkE.js → copy-BLHxb-RP.js} +1 -1
- package/lib/{copy-C0ChGAOX.mjs → copy-Db7Dj1yY.mjs} +1 -1
- package/lib/{create-BRB2U1qV.js → create-D2vX2bRe.js} +1 -1
- package/lib/create-OmEBpMgv.mjs +18 -0
- package/lib/{cursor-DsUEeeMn.js → cursor-C1Sin6tb.js} +1 -1
- package/lib/{cursor-C0wqoNp_.mjs → cursor-CNsWvtzA.mjs} +1 -1
- package/lib/{cursor-transparent-DOFMlNyt.mjs → cursor-transparent-BunBBBx5.mjs} +1 -1
- package/lib/{cursor-transparent-Dgi2QAXz.js → cursor-transparent-SER8uk9I.js} +1 -1
- package/lib/{desktop-DvAIpuqU.mjs → desktop-B6mJxAHq.mjs} +1 -1
- package/lib/{desktop-7XDZ1UeO.js → desktop-BxtmfVtX.js} +1 -1
- package/lib/{disconnect-BPZFeB_X.js → disconnect-C41yMwSb.js} +1 -1
- package/lib/{disconnect-CVe77kqf.mjs → disconnect-D7XSHnMT.mjs} +1 -1
- package/lib/{discord-BQnoDtpm.js → discord-B03i6OzP.js} +1 -1
- package/lib/{discord-C8tW30M4.mjs → discord-BYp6ZBO5.mjs} +1 -1
- package/lib/{etherscan-XnmA1DYM.js → etherscan-DLF8GRx-.js} +1 -1
- package/lib/{etherscan-BbTgK2kR.mjs → etherscan-Db4s0bfM.mjs} +1 -1
- package/lib/{evm-BcBUJ9Y7.js → evm-BmUWgBnJ.js} +2 -2
- package/lib/{evm-B1mLJPQm.mjs → evm-Cfbj-u_x.mjs} +9 -9
- package/lib/{evm-B92-10xg.js → evm-DT7UH6jw.js} +3 -3
- package/lib/{evm-DDTF3fsK.mjs → evm-JX0NqvCN.mjs} +9 -9
- package/lib/{exclamation-triangle-BSU-BEmm.js → exclamation-triangle-Bnq3BTWj.js} +1 -1
- package/lib/{exclamation-triangle-CDPTA2Zq.mjs → exclamation-triangle-QwUrQkZz.mjs} +1 -1
- package/lib/executor.js +1 -1
- package/lib/executor.mjs +1130 -487
- package/lib/{extension-BoRmu23R.mjs → extension-BJ8ReR_0.mjs} +1 -1
- package/lib/{extension-JoJqEx2q.js → extension-CgcYwI-C.js} +1 -1
- package/lib/{external-link-BmVFZxUx.mjs → external-link-C-xXuK-w.mjs} +1 -1
- package/lib/{external-link-CDpvnIKV.js → external-link-DyvDlcrJ.js} +1 -1
- package/lib/{facebook-BU0IgAsn.mjs → facebook-0DLWcqgY.mjs} +1 -1
- package/lib/{facebook-DVG-Of9i.js → facebook-BpyxMifX.js} +1 -1
- package/lib/{farcaster-EqU1YhWT.mjs → farcaster-7pF76-yJ.mjs} +1 -1
- package/lib/{farcaster-HjCoTneu.js → farcaster-CWG8svoe.js} +1 -1
- package/lib/{filters-9uiEFQFc.mjs → filters-B13ud8_A.mjs} +1 -1
- package/lib/{filters-Dj4vA-oO.js → filters-QScvFA3B.js} +1 -1
- package/lib/{github-CHTQ7Hhb.js → github-B1QukX4i.js} +1 -1
- package/lib/{github-Bv36prmZ.mjs → github-D82vkMzo.mjs} +1 -1
- package/lib/{google-D4be9Rni.js → google-C6E4oHHf.js} +1 -1
- package/lib/{google-CIdoM_ZL.mjs → google-D4wJMU48.mjs} +1 -1
- package/lib/{help-circle-Cp-RWM01.js → help-circle-C4PprAiX.js} +1 -1
- package/lib/{help-circle-Di6XLLqm.mjs → help-circle-DoiMsREG.mjs} +1 -1
- package/lib/hosted.js +1 -1
- package/lib/hosted.mjs +1 -1
- package/lib/{id-zzAVAbpV.js → id-D6HBBibn.js} +1 -1
- package/lib/{id-BKRrmUYA.mjs → id-DOZCSctU.mjs} +1 -1
- package/lib/{image-CHXv-pfQ.mjs → image-Bz-sq4zu.mjs} +1 -1
- package/lib/{image-D0lV7yfg.js → image-DwgrdoFE.js} +1 -1
- package/lib/{index-CbF5x2NI.js → index-AZ65joOD.js} +1 -1
- package/lib/{index-BsqWniHZ.mjs → index-B0H8aSyJ.mjs} +2 -2
- package/lib/{index-CreVTM0z.mjs → index-B1YHtJKf.mjs} +32 -32
- package/lib/{index-6NFOdkn_.mjs → index-B2v8cGyE.mjs} +5 -5
- package/lib/{index-Bn829hfx.js → index-B586QVP1.js} +1 -1
- package/lib/{index-CjojdPoR.js → index-BOiHIPRm.js} +1 -1
- package/lib/{index-CSf9Xnts.mjs → index-BgvV5NF2.mjs} +5 -5
- package/lib/{index-BxR9BQdY.mjs → index-BjeolB9D.mjs} +5 -5
- package/lib/{index-WR7oDg9u.mjs → index-Bv-BZXf_.mjs} +6 -6
- package/lib/{index-T00Tc9JN.js → index-C2EKjwxb.js} +1 -1
- package/lib/{index-D4dCJIWy.js → index-C2oYdtY8.js} +1 -1
- package/lib/{index-Cj6R9JbK.js → index-CFfjoJR9.js} +1 -1
- package/lib/{index-B6QoC8kC.mjs → index-CIGkn9tA.mjs} +1 -1
- package/lib/{index-D0eLvswO.mjs → index-CNWcuxPc.mjs} +1 -1
- package/lib/{index-Dy8-WjNf.mjs → index-CNhD4Iu8.mjs} +14 -14
- package/lib/{index-Cv26ujGL.js → index-CP6-WHfp.js} +1 -1
- package/lib/{index-BuMERF6V.mjs → index-CRYNS9pm.mjs} +3 -3
- package/lib/{index-CMRsE6Rx.js → index-CZhOgoed.js} +2 -2
- package/lib/{index-C9CCEaud.js → index-Cet7Wvc5.js} +1 -1
- package/lib/{index-CpYW6xKB.mjs → index-Cg5Ko9uq.mjs} +12 -12
- package/lib/{index-iIndJffV.js → index-CjI7Vey3.js} +1 -1
- package/lib/{index-C_DPPfkk.js → index-Cjz6EL9G.js} +1 -1
- package/lib/{index-CJXywlFV.mjs → index-CrKGOs08.mjs} +5 -5
- package/lib/{index-Dg_iItNp.js → index-Cy_GmZ1K.js} +1 -1
- package/lib/{index-B8CSnOaL.mjs → index-D1vSocUD.mjs} +4 -4
- package/lib/{index-Co1W4Raf.mjs → index-D4WbU33f.mjs} +10 -10
- package/lib/{index-B4yQb6w1.mjs → index-DInWB5Ku.mjs} +78 -78
- package/lib/{index-BJjgo7T5.js → index-DQXzR255.js} +1 -1
- package/lib/{index-FyK0K3it.mjs → index-DSGGuRHs.mjs} +7 -7
- package/lib/{index-BOmzGtQH.mjs → index-DVj58Xn9.mjs} +13 -13
- package/lib/{index-CAZoTTeF.js → index-DXD0qvNV.js} +1 -1
- package/lib/{index-DLyteqgH.js → index-Dd0zXo9p.js} +1 -1
- package/lib/{index-BDN9fAFf.js → index-DflOc1lz.js} +1 -1
- package/lib/{index-DZ0LaYyC.js → index-DoubjpWw.js} +1 -1
- package/lib/{index-BBXzsMzy.mjs → index-Dpefdrdb.mjs} +3296 -3074
- package/lib/{index-0V2bg9Sg.mjs → index-DuXi1xNY.mjs} +2 -2
- package/lib/{index-Csb-_vqa.js → index-Dw8nyQGf.js} +1 -1
- package/lib/{index-DUoona4h.mjs → index-Naa9NLXw.mjs} +4 -4
- package/lib/{index-BBwY_mLw.mjs → index-UZaBhUoD.mjs} +4 -4
- package/lib/{index-D5Wl9ZPE.mjs → index-XkPtmd0r.mjs} +7 -7
- package/lib/{index-CFikcYS0.js → index-XrGXGqnM.js} +1 -1
- package/lib/{index--rEdlHs9.js → index-sIkHg4mO.js} +1 -1
- package/lib/{index-w1W7oltR.js → index-tVbvQzum.js} +60 -60
- package/lib/{index-Cvt-EnSZ.mjs → index-wFZO7Yy8.mjs} +19 -19
- package/lib/{index-uqZQu-qU.js → index-yI1a3BCl.js} +1 -1
- package/lib/{index-aoDDl5Bh.js → index-zrsGesGr.js} +1 -1
- package/lib/{index.es-Buu5D0rZ.mjs → index.es-CTerQ-xd.mjs} +6 -6
- package/lib/{index.es-SeoKSGri.js → index.es-DW-Rbcpg.js} +1 -1
- package/lib/{index.es-BjmsZFfK.mjs → index.es-FblCdfpc.mjs} +4 -4
- package/lib/{index.es-B-gAV41L.js → index.es-tq-RvjG8.js} +2 -2
- package/lib/index.js +1 -1
- package/lib/index.mjs +1 -1
- package/lib/{info-Bro13JOm.js → info-BifZFc7t.js} +1 -1
- package/lib/{info-circle-B1XYC5VH.js → info-circle-2P1Yxg4Q.js} +1 -1
- package/lib/{info-circle-Ysma0RJy.mjs → info-circle-BAC0QRkt.mjs} +1 -1
- package/lib/{info-DI_ShZXM.mjs → info-sSeB9YE8.mjs} +1 -1
- package/lib/{lightbulb-llAiUdyo.mjs → lightbulb-EmWyHxHf.mjs} +1 -1
- package/lib/{lightbulb-BWSob509.js → lightbulb-MtN8FDGi.js} +1 -1
- package/lib/{mail-rZToesAW.js → mail-CqXkLFqA.js} +1 -1
- package/lib/{mail-DoQE8IHx.mjs → mail-Kn0E2IkG.mjs} +1 -1
- package/lib/mayan.js +1 -1
- package/lib/mayan.mjs +9 -9
- package/lib/{mint-CyFSbOaj.js → mint-DzKeNBRo.js} +1 -1
- package/lib/{mint-CDUlLJB4.mjs → mint-WjTAjh-p.mjs} +2 -2
- package/lib/{mobile-BbcVkbmr.js → mobile-BE2FxzUq.js} +1 -1
- package/lib/{mobile-EtRDQH27.mjs → mobile-Dj3WE71d.mjs} +1 -1
- package/lib/{more-BK6O3COI.js → more-BGlDHap-.js} +1 -1
- package/lib/{more-DVrhZdB3.mjs → more-D4DDIvdG.mjs} +1 -1
- package/lib/{native-Bdd5l9MQ.js → native-CGkMKXpm.js} +1 -1
- package/lib/{native-D6oc9ERK.mjs → native-DCc4sjxb.mjs} +1 -1
- package/lib/{network-placeholder-BbB6hX07.mjs → network-placeholder-BBNnq4LJ.mjs} +1 -1
- package/lib/{network-placeholder-K8zio41s.js → network-placeholder-DZ6qNrD8.js} +1 -1
- package/lib/{nftPlaceholder-BMuE_429.mjs → nftPlaceholder-BGK-mcGP.mjs} +1 -1
- package/lib/{nftPlaceholder-L3ThVWUO.js → nftPlaceholder-t3eyvw1E.js} +1 -1
- package/lib/ntt.js +1 -1
- package/lib/ntt.mjs +10 -10
- package/lib/{off-CHM9QBcy.js → off-BBGwptS5.js} +1 -1
- package/lib/{off-CUzDZ7SQ.mjs → off-f4sOrEaa.mjs} +1 -1
- package/lib/{platform-CyoDzIPB.mjs → platform-BVScq6Cn.mjs} +6 -6
- package/lib/{platform-Ck9W87gm.mjs → platform-ByoVE-An.mjs} +4 -4
- package/lib/{platform-DbvllBcy.js → platform-DHBUZeaO.js} +1 -1
- package/lib/{platform-C7YwgvxU.js → platform-Yk6Fw43J.js} +1 -1
- package/lib/{platform-CgqczEeE.js → platform-_YLyrJdi.js} +1 -1
- package/lib/{platform-DkmFvjoG.mjs → platform-tSU41623.mjs} +16 -16
- package/lib/{play-store-DodlKRO8.js → play-store-BbN0jXQh.js} +1 -1
- package/lib/{play-store-B_TfUWJP.mjs → play-store-D8C6HS_a.mjs} +1 -1
- package/lib/{plus-BY6E-gA7.mjs → plus-CbTzHTic.mjs} +1 -1
- package/lib/{plus-DVGYUzNZ.js → plus-DmTKVIYx.js} +1 -1
- package/lib/{provider-jsonrpc-D033z3Mz.js → provider-jsonrpc-B0U6Ij-n.js} +1 -1
- package/lib/{provider-jsonrpc-BVvalXMV.mjs → provider-jsonrpc-pHUX5SqN.mjs} +155 -155
- package/lib/{qr-code-MKK1K7_f.js → qr-code-B6qlbkUI.js} +1 -1
- package/lib/{qr-code-DkdB4YWU.mjs → qr-code-BWVtySSk.mjs} +1 -1
- package/lib/{recycle-horizontal-Bg37UVPn.mjs → recycle-horizontal-Bs5gf79m.mjs} +1 -1
- package/lib/{recycle-horizontal-Bjn-ZLNs.js → recycle-horizontal-DzBA56-s.js} +1 -1
- package/lib/{refresh-dRlw97C1.js → refresh-62hm4k6x.js} +1 -1
- package/lib/{refresh-D6TcjIU1.mjs → refresh-ivbjdSCV.mjs} +1 -1
- package/lib/{reown-logo-Kc70GqDZ.js → reown-logo-CVyCROZP.js} +1 -1
- package/lib/{reown-logo-Dk82Zy5_.mjs → reown-logo-DkbDD804.mjs} +1 -1
- package/lib/{search-Dv-LI1Vx.js → search-BAemvNq7.js} +1 -1
- package/lib/{search-D83RKxoH.mjs → search-By1CMDmb.mjs} +1 -1
- package/lib/{secp256k1-BrfK8uV1.mjs → secp256k1-Cgk0g7W_.mjs} +1 -1
- package/lib/{secp256k1-DV6Qne0v.mjs → secp256k1-ClYndPcJ.mjs} +1 -1
- package/lib/{secp256k1-DXHZqO4S.js → secp256k1-DboBd6yN.js} +1 -1
- package/lib/{secp256k1-sf_P35Lc.js → secp256k1-uAsXZq5d.js} +1 -1
- package/lib/{send-Cyopk79y.mjs → send-BIKE35sd.mjs} +1 -1
- package/lib/{send-BSMIYys9.js → send-BQNTa-AX.js} +1 -1
- package/lib/{signer-DIpGs_9B.mjs → signer-CinqaaXD.mjs} +10 -10
- package/lib/{signer-BZ3rTVnM.js → signer-D-HjSIgq.js} +1 -1
- package/lib/{solana-DS2ZcUpG.js → solana-BUWSwHur.js} +4 -4
- package/lib/{solana-CrMvdvfl.mjs → solana-C2S4i5Ij.mjs} +11 -11
- package/lib/solana-CEz8hIFa.mjs +18 -0
- package/lib/solana-Dohpdke6.js +1 -0
- package/lib/{solanaEmbed.esm-Dj8UZAI5.mjs → solanaEmbed.esm-Dk8f6vW0.mjs} +2 -2
- package/lib/{solanaEmbed.esm-1oBtzdki.js → solanaEmbed.esm-lyjsfmH_.js} +1 -1
- package/lib/src/components/SampleApp/index.d.ts.map +1 -1
- package/lib/src/config/mainnet/rpcs.d.ts.map +1 -1
- package/lib/src/config/mainnet/tokens.d.ts.map +1 -1
- package/lib/src/config/testnet/rpcs.d.ts.map +1 -1
- package/lib/src/config/testnet/tokens.d.ts.map +1 -1
- package/lib/src/config/types.d.ts +2 -1
- package/lib/src/config/types.d.ts.map +1 -1
- package/lib/src/contexts/TokensContext.d.ts.map +1 -1
- package/lib/src/exports/executor.d.ts +1 -1
- package/lib/src/exports/executor.d.ts.map +1 -1
- package/lib/src/icons/ChainIcons.d.ts.map +1 -1
- package/lib/src/icons/Chains/LINEA.d.ts +4 -0
- package/lib/src/icons/Chains/LINEA.d.ts.map +1 -0
- package/lib/src/icons/Chains/POLY.d.ts +2 -2
- package/lib/src/icons/Chains/POLY.d.ts.map +1 -1
- package/lib/src/icons/Chains/SONIC.d.ts +4 -0
- package/lib/src/icons/Chains/SONIC.d.ts.map +1 -0
- package/lib/src/icons/SvgDefs.d.ts.map +1 -1
- package/lib/src/icons/TokenIcons.d.ts.map +1 -1
- package/lib/src/icons/Tokens/POLY.d.ts.map +1 -1
- package/lib/src/sdklegacy/config/MAINNET.d.ts.map +1 -1
- package/lib/src/sdklegacy/config/TESTNET.d.ts.map +1 -1
- package/lib/src/utils/coingecko.d.ts.map +1 -1
- package/lib/src/utils/sdkv2.d.ts +1 -1
- package/lib/src/utils/sdkv2.d.ts.map +1 -1
- package/lib/src/utils/wallet/index.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/GasSlider/index.d.ts +1 -0
- package/lib/src/views/v2/Bridge/GasSlider/index.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
- package/lib/src/views/v2/Redeem/index.d.ts.map +1 -1
- package/lib/{sui-wX1yJDdB.js → sui-BCJA_cYx.js} +1 -1
- package/lib/{sui-C6UUvjyd.mjs → sui-BJC_JOkP.mjs} +3 -3
- package/lib/{sui-jsmS--zo.mjs → sui-B_AxArCa.mjs} +31 -31
- package/lib/{sui-mpRuHBm9.js → sui-Bdmfxpd2.js} +1 -1
- package/lib/{swapHorizontal-BiNrGmxY.mjs → swapHorizontal-CGVqXEEp.mjs} +1 -1
- package/lib/{swapHorizontal-Bg8dDuE0.js → swapHorizontal-Wp81JSgX.js} +1 -1
- package/lib/{swapHorizontalBold-DeCMOo5R.js → swapHorizontalBold-D70amlcg.js} +1 -1
- package/lib/{swapHorizontalBold-CNvg6Zjx.mjs → swapHorizontalBold-DfykA661.mjs} +1 -1
- package/lib/{swapHorizontalMedium-DClbbhUH.js → swapHorizontalMedium-B92n1mhC.js} +1 -1
- package/lib/{swapHorizontalMedium-TUPMHawi.mjs → swapHorizontalMedium-C39AY5jR.mjs} +1 -1
- package/lib/{swapHorizontalRoundedBold-Cwu5ydTm.js → swapHorizontalRoundedBold-CWEgSWL3.js} +1 -1
- package/lib/{swapHorizontalRoundedBold-BAlHBaC3.mjs → swapHorizontalRoundedBold-DHWf4C2R.mjs} +1 -1
- package/lib/{swapVertical-DDYEDCbu.mjs → swapVertical-BpTJ-r5m.mjs} +1 -1
- package/lib/{swapVertical-cn4noOLO.js → swapVertical-DbS3f5xB.js} +1 -1
- package/lib/{telegram-BGnemuS8.mjs → telegram-CNeTqCXy.mjs} +1 -1
- package/lib/{telegram-sBtcJjCa.js → telegram-DK-OaZof.js} +1 -1
- package/lib/{three-dots-BS-tA53X.mjs → three-dots-BK0Ca5f9.mjs} +1 -1
- package/lib/{three-dots-Ci3M242Y.js → three-dots-CLOJZeqn.js} +1 -1
- package/lib/{tokens-DprimVrG.js → tokens-BVFCrwUI.js} +1 -1
- package/lib/{tokens-ZJvnv3ye.mjs → tokens-BtPkpuCj.mjs} +3 -3
- package/lib/{twitch-kde2nyWc.js → twitch-6sCGBDD_.js} +1 -1
- package/lib/{twitch-DwEOOcQc.mjs → twitch-RQqv2Pha.mjs} +1 -1
- package/lib/{twitterIcon-EX3YrhMm.js → twitterIcon-A2SY7Ljz.js} +1 -1
- package/lib/{twitterIcon-D-aL497o.mjs → twitterIcon-C8wIxAQv.mjs} +1 -1
- package/lib/{units-BVg9f9bp.js → units-BrJ4CYDZ.js} +1 -1
- package/lib/{units-De4Es9C-.mjs → units-CLOrp1Nk.mjs} +24 -24
- package/lib/{unsignedTransaction-3gDumn1W.js → unsignedTransaction-BwT180qj.js} +1 -1
- package/lib/{unsignedTransaction-DmrfJNQf.mjs → unsignedTransaction-DkC9OIgh.mjs} +17 -17
- package/lib/{verify-DPJd26j0.mjs → verify-CXS0qPBz.mjs} +1 -1
- package/lib/{verify-BuD5oE0Y.js → verify-DnxzVYqj.js} +1 -1
- package/lib/{verify-filled-DgfMnLnW.js → verify-filled-BOz9hX3w.js} +1 -1
- package/lib/{verify-filled-BSJMiVyN.mjs → verify-filled-DOsmzDzC.mjs} +1 -1
- package/lib/{w3m-modal-vqqsLuJC.mjs → w3m-modal-Cdafmb0Z.mjs} +2 -2
- package/lib/{w3m-modal-jDCMhVYM.js → w3m-modal-CpYUxfVT.js} +1 -1
- package/lib/{wallet-DlsCAJmu.js → wallet-Bc87h19O.js} +1 -1
- package/lib/{wallet-CiaeeygI.mjs → wallet-D3sDbpnL.mjs} +1 -1
- package/lib/{wallet-placeholder-DhQ6l48d.mjs → wallet-placeholder-CsEk6mnJ.mjs} +1 -1
- package/lib/{wallet-placeholder-CWeGWgUL.js → wallet-placeholder-D60KEgcO.js} +1 -1
- package/lib/{walletconnect-CHFqRNg_.mjs → walletconnect-D44C2RUp.mjs} +1 -1
- package/lib/{walletconnect-YkYiOGcA.js → walletconnect-isfAM6mU.js} +1 -1
- package/lib/{warning-circle-z__jbYAZ.mjs → warning-circle-D6V7bjdk.mjs} +1 -1
- package/lib/{warning-circle-BKWEaDK7.js → warning-circle-DKsp8DlH.js} +1 -1
- package/lib/{web3-IDpqtkwB.js → web3-DgUW0FuE.js} +1 -1
- package/lib/{web3-CevzYKNd.mjs → web3-L0yKkQfC.mjs} +1 -1
- package/lib/{x-DXPEHEVV.mjs → x-CfYfR6N2.mjs} +1 -1
- package/lib/{x-De5ksSKs.js → x-D1ju5P9d.js} +1 -1
- package/package.json +30 -28
- package/lib/address-CSWlEusF.js +0 -15
- package/lib/create-CRa9FZnZ.mjs +0 -18
- package/lib/solana-BHr-TCKL.js +0 -1
- package/lib/solana-Dhrl0nvx.mjs +0 -18
package/lib/address-CSWlEusF.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";var gm=Object.defineProperty;var ym=(n,e,t)=>e in n?gm(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var se=(n,e,t)=>ym(n,typeof e!="symbol"?e+"":e,t);var an=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ys(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function kc(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var s=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return n[r]}})}),t}var je={},ae={},no={};no.byteLength=Em;no.toByteArray=xm;no.fromByteArray=Dm;var En=[],en=[],Am=typeof Uint8Array<"u"?Uint8Array:Array,oa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Nr=0,wm=oa.length;Nr<wm;++Nr)En[Nr]=oa[Nr],en[oa.charCodeAt(Nr)]=Nr;en[45]=62;en[95]=63;function Tu(n){var e=n.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=n.indexOf("=");t===-1&&(t=e);var r=t===e?0:4-t%4;return[t,r]}function Em(n){var e=Tu(n),t=e[0],r=e[1];return(t+r)*3/4-r}function Bm(n,e,t){return(e+t)*3/4-t}function xm(n){var e,t=Tu(n),r=t[0],s=t[1],i=new Am(Bm(n,r,s)),o=0,a=s>0?r-4:r,c;for(c=0;c<a;c+=4)e=en[n.charCodeAt(c)]<<18|en[n.charCodeAt(c+1)]<<12|en[n.charCodeAt(c+2)]<<6|en[n.charCodeAt(c+3)],i[o++]=e>>16&255,i[o++]=e>>8&255,i[o++]=e&255;return s===2&&(e=en[n.charCodeAt(c)]<<2|en[n.charCodeAt(c+1)]>>4,i[o++]=e&255),s===1&&(e=en[n.charCodeAt(c)]<<10|en[n.charCodeAt(c+1)]<<4|en[n.charCodeAt(c+2)]>>2,i[o++]=e>>8&255,i[o++]=e&255),i}function Cm(n){return En[n>>18&63]+En[n>>12&63]+En[n>>6&63]+En[n&63]}function Sm(n,e,t){for(var r,s=[],i=e;i<t;i+=3)r=(n[i]<<16&16711680)+(n[i+1]<<8&65280)+(n[i+2]&255),s.push(Cm(r));return s.join("")}function Dm(n){for(var e,t=n.length,r=t%3,s=[],i=16383,o=0,a=t-r;o<a;o+=i)s.push(Sm(n,o,o+i>a?a:o+i));return r===1?(e=n[t-1],s.push(En[e>>2]+En[e<<4&63]+"==")):r===2&&(e=(n[t-2]<<8)+n[t-1],s.push(En[e>>10]+En[e>>4&63]+En[e<<2&63]+"=")),s.join("")}var Fc={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Fc.read=function(n,e,t,r,s){var i,o,a=s*8-r-1,c=(1<<a)-1,h=c>>1,b=-7,w=t?s-1:0,D=t?-1:1,E=n[e+w];for(w+=D,i=E&(1<<-b)-1,E>>=-b,b+=a;b>0;i=i*256+n[e+w],w+=D,b-=8);for(o=i&(1<<-b)-1,i>>=-b,b+=r;b>0;o=o*256+n[e+w],w+=D,b-=8);if(i===0)i=1-h;else{if(i===c)return o?NaN:(E?-1:1)*(1/0);o=o+Math.pow(2,r),i=i-h}return(E?-1:1)*o*Math.pow(2,i-r)};Fc.write=function(n,e,t,r,s,i){var o,a,c,h=i*8-s-1,b=(1<<h)-1,w=b>>1,D=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=r?0:i-1,g=r?1:-1,S=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=b):(o=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+w>=1?e+=D/c:e+=D*Math.pow(2,1-w),e*c>=2&&(o++,c/=2),o+w>=b?(a=0,o=b):o+w>=1?(a=(e*c-1)*Math.pow(2,s),o=o+w):(a=e*Math.pow(2,w-1)*Math.pow(2,s),o=0));s>=8;n[t+E]=a&255,E+=g,a/=256,s-=8);for(o=o<<s|a,h+=s;h>0;n[t+E]=o&255,E+=g,o/=256,h-=8);n[t+E-g]|=S*128};/*!
|
|
2
|
-
* The buffer module from node.js, for the browser.
|
|
3
|
-
*
|
|
4
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
5
|
-
* @license MIT
|
|
6
|
-
*/(function(n){const e=no,t=Fc,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=a,n.SlowBuffer=N,n.INSPECT_MAX_BYTES=50;const s=2147483647;n.kMaxLength=s,a.TYPED_ARRAY_SUPPORT=i(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const A=new Uint8Array(1),d={foo:function(){return 42}};return Object.setPrototypeOf(d,Uint8Array.prototype),Object.setPrototypeOf(A,d),A.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(A){if(A>s)throw new RangeError('The value "'+A+'" is invalid for option "size"');const d=new Uint8Array(A);return Object.setPrototypeOf(d,a.prototype),d}function a(A,d,f){if(typeof A=="number"){if(typeof d=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(A)}return c(A,d,f)}a.poolSize=8192;function c(A,d,f){if(typeof A=="string")return D(A,d);if(ArrayBuffer.isView(A))return g(A);if(A==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A);if(Xt(A,ArrayBuffer)||A&&Xt(A.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Xt(A,SharedArrayBuffer)||A&&Xt(A.buffer,SharedArrayBuffer)))return S(A,d,f);if(typeof A=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const v=A.valueOf&&A.valueOf();if(v!=null&&v!==A)return a.from(v,d,f);const R=T(A);if(R)return R;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof A[Symbol.toPrimitive]=="function")return a.from(A[Symbol.toPrimitive]("string"),d,f);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A)}a.from=function(A,d,f){return c(A,d,f)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function h(A){if(typeof A!="number")throw new TypeError('"size" argument must be of type number');if(A<0)throw new RangeError('The value "'+A+'" is invalid for option "size"')}function b(A,d,f){return h(A),A<=0?o(A):d!==void 0?typeof f=="string"?o(A).fill(d,f):o(A).fill(d):o(A)}a.alloc=function(A,d,f){return b(A,d,f)};function w(A){return h(A),o(A<0?0:M(A)|0)}a.allocUnsafe=function(A){return w(A)},a.allocUnsafeSlow=function(A){return w(A)};function D(A,d){if((typeof d!="string"||d==="")&&(d="utf8"),!a.isEncoding(d))throw new TypeError("Unknown encoding: "+d);const f=_(A,d)|0;let v=o(f);const R=v.write(A,d);return R!==f&&(v=v.slice(0,R)),v}function E(A){const d=A.length<0?0:M(A.length)|0,f=o(d);for(let v=0;v<d;v+=1)f[v]=A[v]&255;return f}function g(A){if(Xt(A,Uint8Array)){const d=new Uint8Array(A);return S(d.buffer,d.byteOffset,d.byteLength)}return E(A)}function S(A,d,f){if(d<0||A.byteLength<d)throw new RangeError('"offset" is outside of buffer bounds');if(A.byteLength<d+(f||0))throw new RangeError('"length" is outside of buffer bounds');let v;return d===void 0&&f===void 0?v=new Uint8Array(A):f===void 0?v=new Uint8Array(A,d):v=new Uint8Array(A,d,f),Object.setPrototypeOf(v,a.prototype),v}function T(A){if(a.isBuffer(A)){const d=M(A.length)|0,f=o(d);return f.length===0||A.copy(f,0,0,d),f}if(A.length!==void 0)return typeof A.length!="number"||Ke(A.length)?o(0):E(A);if(A.type==="Buffer"&&Array.isArray(A.data))return E(A.data)}function M(A){if(A>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return A|0}function N(A){return+A!=A&&(A=0),a.alloc(+A)}a.isBuffer=function(d){return d!=null&&d._isBuffer===!0&&d!==a.prototype},a.compare=function(d,f){if(Xt(d,Uint8Array)&&(d=a.from(d,d.offset,d.byteLength)),Xt(f,Uint8Array)&&(f=a.from(f,f.offset,f.byteLength)),!a.isBuffer(d)||!a.isBuffer(f))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(d===f)return 0;let v=d.length,R=f.length;for(let W=0,z=Math.min(v,R);W<z;++W)if(d[W]!==f[W]){v=d[W],R=f[W];break}return v<R?-1:R<v?1:0},a.isEncoding=function(d){switch(String(d).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(d,f){if(!Array.isArray(d))throw new TypeError('"list" argument must be an Array of Buffers');if(d.length===0)return a.alloc(0);let v;if(f===void 0)for(f=0,v=0;v<d.length;++v)f+=d[v].length;const R=a.allocUnsafe(f);let W=0;for(v=0;v<d.length;++v){let z=d[v];if(Xt(z,Uint8Array))W+z.length>R.length?(a.isBuffer(z)||(z=a.from(z)),z.copy(R,W)):Uint8Array.prototype.set.call(R,z,W);else if(a.isBuffer(z))z.copy(R,W);else throw new TypeError('"list" argument must be an Array of Buffers');W+=z.length}return R};function _(A,d){if(a.isBuffer(A))return A.length;if(ArrayBuffer.isView(A)||Xt(A,ArrayBuffer))return A.byteLength;if(typeof A!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof A);const f=A.length,v=arguments.length>2&&arguments[2]===!0;if(!v&&f===0)return 0;let R=!1;for(;;)switch(d){case"ascii":case"latin1":case"binary":return f;case"utf8":case"utf-8":return Re(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f*2;case"hex":return f>>>1;case"base64":return Ne(A).length;default:if(R)return v?-1:Re(A).length;d=(""+d).toLowerCase(),R=!0}}a.byteLength=_;function U(A,d,f){let v=!1;if((d===void 0||d<0)&&(d=0),d>this.length||((f===void 0||f>this.length)&&(f=this.length),f<=0)||(f>>>=0,d>>>=0,f<=d))return"";for(A||(A="utf8");;)switch(A){case"hex":return x(this,d,f);case"utf8":case"utf-8":return l(this,d,f);case"ascii":return C(this,d,f);case"latin1":case"binary":return B(this,d,f);case"base64":return F(this,d,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,d,f);default:if(v)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),v=!0}}a.prototype._isBuffer=!0;function L(A,d,f){const v=A[d];A[d]=A[f],A[f]=v}a.prototype.swap16=function(){const d=this.length;if(d%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let f=0;f<d;f+=2)L(this,f,f+1);return this},a.prototype.swap32=function(){const d=this.length;if(d%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let f=0;f<d;f+=4)L(this,f,f+3),L(this,f+1,f+2);return this},a.prototype.swap64=function(){const d=this.length;if(d%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let f=0;f<d;f+=8)L(this,f,f+7),L(this,f+1,f+6),L(this,f+2,f+5),L(this,f+3,f+4);return this},a.prototype.toString=function(){const d=this.length;return d===0?"":arguments.length===0?l(this,0,d):U.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(d){if(!a.isBuffer(d))throw new TypeError("Argument must be a Buffer");return this===d?!0:a.compare(this,d)===0},a.prototype.inspect=function(){let d="";const f=n.INSPECT_MAX_BYTES;return d=this.toString("hex",0,f).replace(/(.{2})/g,"$1 ").trim(),this.length>f&&(d+=" ... "),"<Buffer "+d+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(d,f,v,R,W){if(Xt(d,Uint8Array)&&(d=a.from(d,d.offset,d.byteLength)),!a.isBuffer(d))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof d);if(f===void 0&&(f=0),v===void 0&&(v=d?d.length:0),R===void 0&&(R=0),W===void 0&&(W=this.length),f<0||v>d.length||R<0||W>this.length)throw new RangeError("out of range index");if(R>=W&&f>=v)return 0;if(R>=W)return-1;if(f>=v)return 1;if(f>>>=0,v>>>=0,R>>>=0,W>>>=0,this===d)return 0;let z=W-R,ge=v-f;const me=Math.min(z,ge),he=this.slice(R,W),ze=d.slice(f,v);for(let fe=0;fe<me;++fe)if(he[fe]!==ze[fe]){z=he[fe],ge=ze[fe];break}return z<ge?-1:ge<z?1:0};function H(A,d,f,v,R){if(A.length===0)return-1;if(typeof f=="string"?(v=f,f=0):f>2147483647?f=2147483647:f<-2147483648&&(f=-2147483648),f=+f,Ke(f)&&(f=R?0:A.length-1),f<0&&(f=A.length+f),f>=A.length){if(R)return-1;f=A.length-1}else if(f<0)if(R)f=0;else return-1;if(typeof d=="string"&&(d=a.from(d,v)),a.isBuffer(d))return d.length===0?-1:K(A,d,f,v,R);if(typeof d=="number")return d=d&255,typeof Uint8Array.prototype.indexOf=="function"?R?Uint8Array.prototype.indexOf.call(A,d,f):Uint8Array.prototype.lastIndexOf.call(A,d,f):K(A,[d],f,v,R);throw new TypeError("val must be string, number or Buffer")}function K(A,d,f,v,R){let W=1,z=A.length,ge=d.length;if(v!==void 0&&(v=String(v).toLowerCase(),v==="ucs2"||v==="ucs-2"||v==="utf16le"||v==="utf-16le")){if(A.length<2||d.length<2)return-1;W=2,z/=2,ge/=2,f/=2}function me(ze,fe){return W===1?ze[fe]:ze.readUInt16BE(fe*W)}let he;if(R){let ze=-1;for(he=f;he<z;he++)if(me(A,he)===me(d,ze===-1?0:he-ze)){if(ze===-1&&(ze=he),he-ze+1===ge)return ze*W}else ze!==-1&&(he-=he-ze),ze=-1}else for(f+ge>z&&(f=z-ge),he=f;he>=0;he--){let ze=!0;for(let fe=0;fe<ge;fe++)if(me(A,he+fe)!==me(d,fe)){ze=!1;break}if(ze)return he}return-1}a.prototype.includes=function(d,f,v){return this.indexOf(d,f,v)!==-1},a.prototype.indexOf=function(d,f,v){return H(this,d,f,v,!0)},a.prototype.lastIndexOf=function(d,f,v){return H(this,d,f,v,!1)};function V(A,d,f,v){f=Number(f)||0;const R=A.length-f;v?(v=Number(v),v>R&&(v=R)):v=R;const W=d.length;v>W/2&&(v=W/2);let z;for(z=0;z<v;++z){const ge=parseInt(d.substr(z*2,2),16);if(Ke(ge))return z;A[f+z]=ge}return z}function ee(A,d,f,v){return We(Re(d,A.length-f),A,f,v)}function re(A,d,f,v){return We(qe(d),A,f,v)}function $(A,d,f,v){return We(Ne(d),A,f,v)}function ie(A,d,f,v){return We(Or(d,A.length-f),A,f,v)}a.prototype.write=function(d,f,v,R){if(f===void 0)R="utf8",v=this.length,f=0;else if(v===void 0&&typeof f=="string")R=f,v=this.length,f=0;else if(isFinite(f))f=f>>>0,isFinite(v)?(v=v>>>0,R===void 0&&(R="utf8")):(R=v,v=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const W=this.length-f;if((v===void 0||v>W)&&(v=W),d.length>0&&(v<0||f<0)||f>this.length)throw new RangeError("Attempt to write outside buffer bounds");R||(R="utf8");let z=!1;for(;;)switch(R){case"hex":return V(this,d,f,v);case"utf8":case"utf-8":return ee(this,d,f,v);case"ascii":case"latin1":case"binary":return re(this,d,f,v);case"base64":return $(this,d,f,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ie(this,d,f,v);default:if(z)throw new TypeError("Unknown encoding: "+R);R=(""+R).toLowerCase(),z=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function F(A,d,f){return d===0&&f===A.length?e.fromByteArray(A):e.fromByteArray(A.slice(d,f))}function l(A,d,f){f=Math.min(A.length,f);const v=[];let R=d;for(;R<f;){const W=A[R];let z=null,ge=W>239?4:W>223?3:W>191?2:1;if(R+ge<=f){let me,he,ze,fe;switch(ge){case 1:W<128&&(z=W);break;case 2:me=A[R+1],(me&192)===128&&(fe=(W&31)<<6|me&63,fe>127&&(z=fe));break;case 3:me=A[R+1],he=A[R+2],(me&192)===128&&(he&192)===128&&(fe=(W&15)<<12|(me&63)<<6|he&63,fe>2047&&(fe<55296||fe>57343)&&(z=fe));break;case 4:me=A[R+1],he=A[R+2],ze=A[R+3],(me&192)===128&&(he&192)===128&&(ze&192)===128&&(fe=(W&15)<<18|(me&63)<<12|(he&63)<<6|ze&63,fe>65535&&fe<1114112&&(z=fe))}}z===null?(z=65533,ge=1):z>65535&&(z-=65536,v.push(z>>>10&1023|55296),z=56320|z&1023),v.push(z),R+=ge}return p(v)}const m=4096;function p(A){const d=A.length;if(d<=m)return String.fromCharCode.apply(String,A);let f="",v=0;for(;v<d;)f+=String.fromCharCode.apply(String,A.slice(v,v+=m));return f}function C(A,d,f){let v="";f=Math.min(A.length,f);for(let R=d;R<f;++R)v+=String.fromCharCode(A[R]&127);return v}function B(A,d,f){let v="";f=Math.min(A.length,f);for(let R=d;R<f;++R)v+=String.fromCharCode(A[R]);return v}function x(A,d,f){const v=A.length;(!d||d<0)&&(d=0),(!f||f<0||f>v)&&(f=v);let R="";for(let W=d;W<f;++W)R+=Ye[A[W]];return R}function I(A,d,f){const v=A.slice(d,f);let R="";for(let W=0;W<v.length-1;W+=2)R+=String.fromCharCode(v[W]+v[W+1]*256);return R}a.prototype.slice=function(d,f){const v=this.length;d=~~d,f=f===void 0?v:~~f,d<0?(d+=v,d<0&&(d=0)):d>v&&(d=v),f<0?(f+=v,f<0&&(f=0)):f>v&&(f=v),f<d&&(f=d);const R=this.subarray(d,f);return Object.setPrototypeOf(R,a.prototype),R};function y(A,d,f){if(A%1!==0||A<0)throw new RangeError("offset is not uint");if(A+d>f)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(d,f,v){d=d>>>0,f=f>>>0,v||y(d,f,this.length);let R=this[d],W=1,z=0;for(;++z<f&&(W*=256);)R+=this[d+z]*W;return R},a.prototype.readUintBE=a.prototype.readUIntBE=function(d,f,v){d=d>>>0,f=f>>>0,v||y(d,f,this.length);let R=this[d+--f],W=1;for(;f>0&&(W*=256);)R+=this[d+--f]*W;return R},a.prototype.readUint8=a.prototype.readUInt8=function(d,f){return d=d>>>0,f||y(d,1,this.length),this[d]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(d,f){return d=d>>>0,f||y(d,2,this.length),this[d]|this[d+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(d,f){return d=d>>>0,f||y(d,2,this.length),this[d]<<8|this[d+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(d,f){return d=d>>>0,f||y(d,4,this.length),(this[d]|this[d+1]<<8|this[d+2]<<16)+this[d+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(d,f){return d=d>>>0,f||y(d,4,this.length),this[d]*16777216+(this[d+1]<<16|this[d+2]<<8|this[d+3])},a.prototype.readBigUInt64LE=ln(function(d){d=d>>>0,Pe(d,"offset");const f=this[d],v=this[d+7];(f===void 0||v===void 0)&&pe(d,this.length-8);const R=f+this[++d]*2**8+this[++d]*2**16+this[++d]*2**24,W=this[++d]+this[++d]*2**8+this[++d]*2**16+v*2**24;return BigInt(R)+(BigInt(W)<<BigInt(32))}),a.prototype.readBigUInt64BE=ln(function(d){d=d>>>0,Pe(d,"offset");const f=this[d],v=this[d+7];(f===void 0||v===void 0)&&pe(d,this.length-8);const R=f*2**24+this[++d]*2**16+this[++d]*2**8+this[++d],W=this[++d]*2**24+this[++d]*2**16+this[++d]*2**8+v;return(BigInt(R)<<BigInt(32))+BigInt(W)}),a.prototype.readIntLE=function(d,f,v){d=d>>>0,f=f>>>0,v||y(d,f,this.length);let R=this[d],W=1,z=0;for(;++z<f&&(W*=256);)R+=this[d+z]*W;return W*=128,R>=W&&(R-=Math.pow(2,8*f)),R},a.prototype.readIntBE=function(d,f,v){d=d>>>0,f=f>>>0,v||y(d,f,this.length);let R=f,W=1,z=this[d+--R];for(;R>0&&(W*=256);)z+=this[d+--R]*W;return W*=128,z>=W&&(z-=Math.pow(2,8*f)),z},a.prototype.readInt8=function(d,f){return d=d>>>0,f||y(d,1,this.length),this[d]&128?(255-this[d]+1)*-1:this[d]},a.prototype.readInt16LE=function(d,f){d=d>>>0,f||y(d,2,this.length);const v=this[d]|this[d+1]<<8;return v&32768?v|4294901760:v},a.prototype.readInt16BE=function(d,f){d=d>>>0,f||y(d,2,this.length);const v=this[d+1]|this[d]<<8;return v&32768?v|4294901760:v},a.prototype.readInt32LE=function(d,f){return d=d>>>0,f||y(d,4,this.length),this[d]|this[d+1]<<8|this[d+2]<<16|this[d+3]<<24},a.prototype.readInt32BE=function(d,f){return d=d>>>0,f||y(d,4,this.length),this[d]<<24|this[d+1]<<16|this[d+2]<<8|this[d+3]},a.prototype.readBigInt64LE=ln(function(d){d=d>>>0,Pe(d,"offset");const f=this[d],v=this[d+7];(f===void 0||v===void 0)&&pe(d,this.length-8);const R=this[d+4]+this[d+5]*2**8+this[d+6]*2**16+(v<<24);return(BigInt(R)<<BigInt(32))+BigInt(f+this[++d]*2**8+this[++d]*2**16+this[++d]*2**24)}),a.prototype.readBigInt64BE=ln(function(d){d=d>>>0,Pe(d,"offset");const f=this[d],v=this[d+7];(f===void 0||v===void 0)&&pe(d,this.length-8);const R=(f<<24)+this[++d]*2**16+this[++d]*2**8+this[++d];return(BigInt(R)<<BigInt(32))+BigInt(this[++d]*2**24+this[++d]*2**16+this[++d]*2**8+v)}),a.prototype.readFloatLE=function(d,f){return d=d>>>0,f||y(d,4,this.length),t.read(this,d,!0,23,4)},a.prototype.readFloatBE=function(d,f){return d=d>>>0,f||y(d,4,this.length),t.read(this,d,!1,23,4)},a.prototype.readDoubleLE=function(d,f){return d=d>>>0,f||y(d,8,this.length),t.read(this,d,!0,52,8)},a.prototype.readDoubleBE=function(d,f){return d=d>>>0,f||y(d,8,this.length),t.read(this,d,!1,52,8)};function u(A,d,f,v,R,W){if(!a.isBuffer(A))throw new TypeError('"buffer" argument must be a Buffer instance');if(d>R||d<W)throw new RangeError('"value" argument is out of bounds');if(f+v>A.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(d,f,v,R){if(d=+d,f=f>>>0,v=v>>>0,!R){const ge=Math.pow(2,8*v)-1;u(this,d,f,v,ge,0)}let W=1,z=0;for(this[f]=d&255;++z<v&&(W*=256);)this[f+z]=d/W&255;return f+v},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(d,f,v,R){if(d=+d,f=f>>>0,v=v>>>0,!R){const ge=Math.pow(2,8*v)-1;u(this,d,f,v,ge,0)}let W=v-1,z=1;for(this[f+W]=d&255;--W>=0&&(z*=256);)this[f+W]=d/z&255;return f+v},a.prototype.writeUint8=a.prototype.writeUInt8=function(d,f,v){return d=+d,f=f>>>0,v||u(this,d,f,1,255,0),this[f]=d&255,f+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(d,f,v){return d=+d,f=f>>>0,v||u(this,d,f,2,65535,0),this[f]=d&255,this[f+1]=d>>>8,f+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(d,f,v){return d=+d,f=f>>>0,v||u(this,d,f,2,65535,0),this[f]=d>>>8,this[f+1]=d&255,f+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(d,f,v){return d=+d,f=f>>>0,v||u(this,d,f,4,4294967295,0),this[f+3]=d>>>24,this[f+2]=d>>>16,this[f+1]=d>>>8,this[f]=d&255,f+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(d,f,v){return d=+d,f=f>>>0,v||u(this,d,f,4,4294967295,0),this[f]=d>>>24,this[f+1]=d>>>16,this[f+2]=d>>>8,this[f+3]=d&255,f+4};function k(A,d,f,v,R){be(d,v,R,A,f,7);let W=Number(d&BigInt(4294967295));A[f++]=W,W=W>>8,A[f++]=W,W=W>>8,A[f++]=W,W=W>>8,A[f++]=W;let z=Number(d>>BigInt(32)&BigInt(4294967295));return A[f++]=z,z=z>>8,A[f++]=z,z=z>>8,A[f++]=z,z=z>>8,A[f++]=z,f}function G(A,d,f,v,R){be(d,v,R,A,f,7);let W=Number(d&BigInt(4294967295));A[f+7]=W,W=W>>8,A[f+6]=W,W=W>>8,A[f+5]=W,W=W>>8,A[f+4]=W;let z=Number(d>>BigInt(32)&BigInt(4294967295));return A[f+3]=z,z=z>>8,A[f+2]=z,z=z>>8,A[f+1]=z,z=z>>8,A[f]=z,f+8}a.prototype.writeBigUInt64LE=ln(function(d,f=0){return k(this,d,f,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=ln(function(d,f=0){return G(this,d,f,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(d,f,v,R){if(d=+d,f=f>>>0,!R){const me=Math.pow(2,8*v-1);u(this,d,f,v,me-1,-me)}let W=0,z=1,ge=0;for(this[f]=d&255;++W<v&&(z*=256);)d<0&&ge===0&&this[f+W-1]!==0&&(ge=1),this[f+W]=(d/z>>0)-ge&255;return f+v},a.prototype.writeIntBE=function(d,f,v,R){if(d=+d,f=f>>>0,!R){const me=Math.pow(2,8*v-1);u(this,d,f,v,me-1,-me)}let W=v-1,z=1,ge=0;for(this[f+W]=d&255;--W>=0&&(z*=256);)d<0&&ge===0&&this[f+W+1]!==0&&(ge=1),this[f+W]=(d/z>>0)-ge&255;return f+v},a.prototype.writeInt8=function(d,f,v){return d=+d,f=f>>>0,v||u(this,d,f,1,127,-128),d<0&&(d=255+d+1),this[f]=d&255,f+1},a.prototype.writeInt16LE=function(d,f,v){return d=+d,f=f>>>0,v||u(this,d,f,2,32767,-32768),this[f]=d&255,this[f+1]=d>>>8,f+2},a.prototype.writeInt16BE=function(d,f,v){return d=+d,f=f>>>0,v||u(this,d,f,2,32767,-32768),this[f]=d>>>8,this[f+1]=d&255,f+2},a.prototype.writeInt32LE=function(d,f,v){return d=+d,f=f>>>0,v||u(this,d,f,4,2147483647,-2147483648),this[f]=d&255,this[f+1]=d>>>8,this[f+2]=d>>>16,this[f+3]=d>>>24,f+4},a.prototype.writeInt32BE=function(d,f,v){return d=+d,f=f>>>0,v||u(this,d,f,4,2147483647,-2147483648),d<0&&(d=4294967295+d+1),this[f]=d>>>24,this[f+1]=d>>>16,this[f+2]=d>>>8,this[f+3]=d&255,f+4},a.prototype.writeBigInt64LE=ln(function(d,f=0){return k(this,d,f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=ln(function(d,f=0){return G(this,d,f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Y(A,d,f,v,R,W){if(f+v>A.length)throw new RangeError("Index out of range");if(f<0)throw new RangeError("Index out of range")}function J(A,d,f,v,R){return d=+d,f=f>>>0,R||Y(A,d,f,4),t.write(A,d,f,v,23,4),f+4}a.prototype.writeFloatLE=function(d,f,v){return J(this,d,f,!0,v)},a.prototype.writeFloatBE=function(d,f,v){return J(this,d,f,!1,v)};function de(A,d,f,v,R){return d=+d,f=f>>>0,R||Y(A,d,f,8),t.write(A,d,f,v,52,8),f+8}a.prototype.writeDoubleLE=function(d,f,v){return de(this,d,f,!0,v)},a.prototype.writeDoubleBE=function(d,f,v){return de(this,d,f,!1,v)},a.prototype.copy=function(d,f,v,R){if(!a.isBuffer(d))throw new TypeError("argument should be a Buffer");if(v||(v=0),!R&&R!==0&&(R=this.length),f>=d.length&&(f=d.length),f||(f=0),R>0&&R<v&&(R=v),R===v||d.length===0||this.length===0)return 0;if(f<0)throw new RangeError("targetStart out of bounds");if(v<0||v>=this.length)throw new RangeError("Index out of range");if(R<0)throw new RangeError("sourceEnd out of bounds");R>this.length&&(R=this.length),d.length-f<R-v&&(R=d.length-f+v);const W=R-v;return this===d&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(f,v,R):Uint8Array.prototype.set.call(d,this.subarray(v,R),f),W},a.prototype.fill=function(d,f,v,R){if(typeof d=="string"){if(typeof f=="string"?(R=f,f=0,v=this.length):typeof v=="string"&&(R=v,v=this.length),R!==void 0&&typeof R!="string")throw new TypeError("encoding must be a string");if(typeof R=="string"&&!a.isEncoding(R))throw new TypeError("Unknown encoding: "+R);if(d.length===1){const z=d.charCodeAt(0);(R==="utf8"&&z<128||R==="latin1")&&(d=z)}}else typeof d=="number"?d=d&255:typeof d=="boolean"&&(d=Number(d));if(f<0||this.length<f||this.length<v)throw new RangeError("Out of range index");if(v<=f)return this;f=f>>>0,v=v===void 0?this.length:v>>>0,d||(d=0);let W;if(typeof d=="number")for(W=f;W<v;++W)this[W]=d;else{const z=a.isBuffer(d)?d:a.from(d,R),ge=z.length;if(ge===0)throw new TypeError('The value "'+d+'" is invalid for argument "value"');for(W=0;W<v-f;++W)this[W+f]=z[W%ge]}return this};const ce={};function ue(A,d,f){ce[A]=class extends f{constructor(){super(),Object.defineProperty(this,"message",{value:d.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${A}]`,this.stack,delete this.name}get code(){return A}set code(R){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:R,writable:!0})}toString(){return`${this.name} [${A}]: ${this.message}`}}}ue("ERR_BUFFER_OUT_OF_BOUNDS",function(A){return A?`${A} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ue("ERR_INVALID_ARG_TYPE",function(A,d){return`The "${A}" argument must be of type number. Received type ${typeof d}`},TypeError),ue("ERR_OUT_OF_RANGE",function(A,d,f){let v=`The value of "${A}" is out of range.`,R=f;return Number.isInteger(f)&&Math.abs(f)>2**32?R=$e(String(f)):typeof f=="bigint"&&(R=String(f),(f>BigInt(2)**BigInt(32)||f<-(BigInt(2)**BigInt(32)))&&(R=$e(R)),R+="n"),v+=` It must be ${d}. Received ${R}`,v},RangeError);function $e(A){let d="",f=A.length;const v=A[0]==="-"?1:0;for(;f>=v+4;f-=3)d=`_${A.slice(f-3,f)}${d}`;return`${A.slice(0,f)}${d}`}function Ee(A,d,f){Pe(d,"offset"),(A[d]===void 0||A[d+f]===void 0)&&pe(d,A.length-(f+1))}function be(A,d,f,v,R,W){if(A>f||A<d){const z=typeof d=="bigint"?"n":"";let ge;throw d===0||d===BigInt(0)?ge=`>= 0${z} and < 2${z} ** ${(W+1)*8}${z}`:ge=`>= -(2${z} ** ${(W+1)*8-1}${z}) and < 2 ** ${(W+1)*8-1}${z}`,new ce.ERR_OUT_OF_RANGE("value",ge,A)}Ee(v,R,W)}function Pe(A,d){if(typeof A!="number")throw new ce.ERR_INVALID_ARG_TYPE(d,"number",A)}function pe(A,d,f){throw Math.floor(A)!==A?(Pe(A,f),new ce.ERR_OUT_OF_RANGE("offset","an integer",A)):d<0?new ce.ERR_BUFFER_OUT_OF_BOUNDS:new ce.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${d}`,A)}const Se=/[^+/0-9A-Za-z-_]/g;function jt(A){if(A=A.split("=")[0],A=A.trim().replace(Se,""),A.length<2)return"";for(;A.length%4!==0;)A=A+"=";return A}function Re(A,d){d=d||1/0;let f;const v=A.length;let R=null;const W=[];for(let z=0;z<v;++z){if(f=A.charCodeAt(z),f>55295&&f<57344){if(!R){if(f>56319){(d-=3)>-1&&W.push(239,191,189);continue}else if(z+1===v){(d-=3)>-1&&W.push(239,191,189);continue}R=f;continue}if(f<56320){(d-=3)>-1&&W.push(239,191,189),R=f;continue}f=(R-55296<<10|f-56320)+65536}else R&&(d-=3)>-1&&W.push(239,191,189);if(R=null,f<128){if((d-=1)<0)break;W.push(f)}else if(f<2048){if((d-=2)<0)break;W.push(f>>6|192,f&63|128)}else if(f<65536){if((d-=3)<0)break;W.push(f>>12|224,f>>6&63|128,f&63|128)}else if(f<1114112){if((d-=4)<0)break;W.push(f>>18|240,f>>12&63|128,f>>6&63|128,f&63|128)}else throw new Error("Invalid code point")}return W}function qe(A){const d=[];for(let f=0;f<A.length;++f)d.push(A.charCodeAt(f)&255);return d}function Or(A,d){let f,v,R;const W=[];for(let z=0;z<A.length&&!((d-=2)<0);++z)f=A.charCodeAt(z),v=f>>8,R=f%256,W.push(R),W.push(v);return W}function Ne(A){return e.toByteArray(jt(A))}function We(A,d,f,v){let R;for(R=0;R<v&&!(R+f>=d.length||R>=A.length);++R)d[R+f]=A[R];return R}function Xt(A,d){return A instanceof d||A!=null&&A.constructor!=null&&A.constructor.name!=null&&A.constructor.name===d.name}function Ke(A){return A!==A}const Ye=function(){const A="0123456789abcdef",d=new Array(256);for(let f=0;f<16;++f){const v=f*16;for(let R=0;R<16;++R)d[v+R]=A[f]+A[R]}return d}();function ln(A){return typeof BigInt>"u"?Xe:A}function Xe(){throw new Error("BigInt not supported")}})(ae);var Iu={exports:{}},et=Iu.exports={},yn,An;function Pa(){throw new Error("setTimeout has not been defined")}function La(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?yn=setTimeout:yn=Pa}catch{yn=Pa}try{typeof clearTimeout=="function"?An=clearTimeout:An=La}catch{An=La}})();function Uu(n){if(yn===setTimeout)return setTimeout(n,0);if((yn===Pa||!yn)&&setTimeout)return yn=setTimeout,setTimeout(n,0);try{return yn(n,0)}catch{try{return yn.call(null,n,0)}catch{return yn.call(this,n,0)}}}function vm(n){if(An===clearTimeout)return clearTimeout(n);if((An===La||!An)&&clearTimeout)return An=clearTimeout,clearTimeout(n);try{return An(n)}catch{try{return An.call(null,n)}catch{return An.call(this,n)}}}var jn=[],jr=!1,gr,yi=-1;function km(){!jr||!gr||(jr=!1,gr.length?jn=gr.concat(jn):yi=-1,jn.length&&_u())}function _u(){if(!jr){var n=Uu(km);jr=!0;for(var e=jn.length;e;){for(gr=jn,jn=[];++yi<e;)gr&&gr[yi].run();yi=-1,e=jn.length}gr=null,jr=!1,vm(n)}}et.nextTick=function(n){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];jn.push(new Mu(n,e)),jn.length===1&&!jr&&Uu(_u)};function Mu(n,e){this.fun=n,this.array=e}Mu.prototype.run=function(){this.fun.apply(null,this.array)};et.title="browser";et.browser=!0;et.env={};et.argv=[];et.version="";et.versions={};function Vn(){}et.on=Vn;et.addListener=Vn;et.once=Vn;et.off=Vn;et.removeListener=Vn;et.removeAllListeners=Vn;et.emit=Vn;et.prependListener=Vn;et.prependOnceListener=Vn;et.listeners=function(n){return[]};et.binding=function(n){throw new Error("process.binding is not supported")};et.cwd=function(){return"/"};et.chdir=function(n){throw new Error("process.chdir is not supported")};et.umask=function(){return 0};var Ru=Iu.exports;(function(n){Object.defineProperty(n,Symbol.toStringTag,{value:"Module"});const e=ae,t=Ru,r=o=>o&&o.__esModule?o:{default:o},s=r(t),i=globalThis||window||void 0||self;Object.defineProperty(n,"Buffer",{enumerable:!0,get:()=>e.Buffer}),Object.defineProperty(n,"process",{enumerable:!0,get:()=>s.default}),n.global=i})(je);const Mi=n=>[...Array(n).keys()],Wu=(n,e)=>n.map(t=>t[e]),yr=n=>Mi(n[0].length).map(e=>Mi(n.length).map(t=>n[t][e])),Fm=(n,e,t)=>{const r=new Set(Array.isArray(e)?e:[e]);return n.filter((s,i)=>r.has(i)!==t)};function Tm(n,e=!1){if(n.length===0)throw new Error("Can't calculate median of empty array");const t=e?n:[...n].sort((o,a)=>o>a?1:o<a?-1:0),r=Math.floor(t.length/2);if(t.length%2===1)return t[r];const s=t[r-1],i=t[r];if(typeof s=="bigint"&&typeof i=="bigint")return(s+i)/2n;if(typeof s=="number"&&typeof i=="number")return(s+i)/2;throw new Error("Can't calculate median of array with mixed number and bigint")}function Im(n){return["string","number","symbol","bigint","boolean"].includes(typeof n)}const Zl=n=>n.length===2&&!Array.isArray(n[0])&&Array.isArray(n[1]),Ri=n=>n.length===0?[]:Array.isArray(n[0])?n.map(([e,t])=>Array.isArray(t)?(Zl(t)?Ri(t):t).map(r=>[e,r].flat()):[[e,t]]).flat():Zl(n)?Ri(n[1]).map(e=>[n[0],e]):n,Um=(n,e)=>{const t=Ri(n);if(t.length===0)throw new Error("Invalid mapping: empty");const r=e===void 0?[Mi(t[0].length-1),[t[0].length-1]]:e.map(D=>typeof D=="number"?[D]:D);let s=[],i=!0;const o=(D,E)=>{const g=Array.from(new Set(D[0]).values()),S=new Map(g.map(M=>[M,[]]));for(const[M,N]of D[0].entries())S.get(N).push(M);if(D.length===1){const M=Object.fromEntries(g.map(N=>[N,S.get(N).map(_=>E[_].length===1?E[_][0]:E[_])]));if(i){for(const N of S.values())if(N.length>1)return i=!1,M;s.push(M)}return M}const T=yr(D.slice(1));return Object.fromEntries(g.map(M=>{const N=S.get(M),_=yr(N.map(L=>T[L])),U=N.map(L=>E[L]);return[M,o(_,U)]}))},a=yr(t),c=D=>{const E=a[D];if(E===void 0)throw new Error(`Invalid shape: column ${D} does not exist`);return E},[h,b]=r.map(D=>D.map(E=>c(E)));if(h.length===0)throw new Error("Invalid shape: empty key set");if(b.length===0)throw new Error("Invalid shape: empty value set");for(const D of h)for(const E of D)if(!Im(E))throw new Error(`Invalid key: ${E} in ${D}`);const w=o(h,yr(b));if(i)for(const D of s)for(const E of Object.keys(D))D[E]=D[E][0];return w};function we(n,e){const t=r=>{const s=(...i)=>i.reduce((o,a)=>o?o[a.toString()]??void 0:void 0,r);return Object.assign(s,{has:(...i)=>s(...i)!==void 0,get:(...i)=>s(...i),subMap:i=>t(r[i.toString()])})};return t(Um(n,e))}function Tc(n){let e=null;return()=>(e||(e=n()),e)}function _m(n){try{return n(),!1}catch{return!0}}function Mm(n,e,t){return n<e?e:n>t?t:n}var Rm=["int","uint","bytes","array","switch"],Pu="big",ro=6,vr=n=>typeof n=="number"||typeof n=="bigint",ts=n=>n instanceof Uint8Array,Wm=n=>vr(n)||ts(n),_s=n=>Rm.includes(n==null?void 0:n.binary),Pm=n=>_s(n)||Array.isArray(n)&&n.every(_s),Lm=n=>typeof(n==null?void 0:n.from)=="number",Om=n=>typeof(n==null?void 0:n.from)=="bigint",Nm=n=>Lm(n)||Om(n),ns=n=>ts(n==null?void 0:n.from),zm=n=>Nm(n)||ns(n),Lu=(n,e)=>{if(n!==e)throw new Error(`size mismatch: layout size: ${n}, data size: ${e}`);return e},Vr=n=>"layout"in n&&n.layout!==void 0,Oa=(n,e)=>"size"in n&&n.size!==void 0?Lu(n.size,e):e,Na=(n,e)=>{if(n!=e)throw new Error(`value mismatch: (constant) layout value: ${n}, data value: ${e}`)},za=(n,e,t)=>{const r=(h,b)=>b===void 0?[0,h.length]:Array.isArray(b)?b:[b,h.length],[s,i]=r(n,t==null?void 0:t.customSlice),[o,a]=r(e,t==null?void 0:t.dataSlice),c=i-s;Lu(c,a-o);for(let h=0;h<n.length;++h)if(n[h+s]!==e[h+o])throw new Error(`binary data mismatch: layout value: ${n}, offset: ${s}, data value: ${e}, offset: ${o}`)};function Ou(n,e){const t=e[n.idTag??"id"];return n.layouts.find(([r])=>(Array.isArray(r)?r[1]:r)==t)}function Nu(n){return fr(n,tn)}var tn=Symbol("staticCalc");function Hm(n,e){const t=[],r=fr(n,e,t);if(r===null)throw new Error(`coding error: couldn't calculate layout size for layout ${n} with data ${e}`);return[r,t]}function Jl(n,e,t){const r=s=>(t!==void 0&&t.push(s),s);switch(n.binary){case"int":case"uint":return n.size;case"bytes":{if("size"in n&&e===tn)return n.size;const s="lengthSize"in n?n.lengthSize|0:0;if(Vr(n)){const{custom:o}=n,a=fr(n.layout,o===void 0?e:typeof o.from=="function"?e!==tn?r(o.from(e)):tn:o.from,t);return a===null?"size"in n?n.size??null:null:s+Oa(n,a)}const{custom:i}=n;return ts(i)?s+i.length:ns(i)?s+i.from.length:e===tn?null:s+Oa(n,i!==void 0?r(i.from(e)).length:e.length)}case"array":{const s="length"in n?n.length:void 0;if(e===tn){if(s!==void 0){const o=fr(n.layout,tn,t);return o!==null?s*o:null}return null}let i=0;if(s!==void 0&&s!==e.length)throw new Error(`array length mismatch: layout length: ${s}, data length: ${e.length}`);"lengthSize"in n&&n.lengthSize!==void 0&&(i+=n.lengthSize);for(let o=0;o<e.length;++o){const a=fr(n.layout,e[o],t);if(a===null)return null;i+=a}return i}case"switch":{if(e!==tn){const[i,o]=Ou(n,e),a=fr(o,e,t);return a!==null?n.idSize+a:null}let s=null;for(const[i,o]of n.layouts){const a=fr(o,tn,t);if(s===null)s=a;else if(a!==s)return null}return n.idSize+s}}}function fr(n,e,t){if(_s(n))return Jl(n,e,t);let r=0;for(const s of n){let i;if(e===tn)i=tn;else if(!("omit"in s)||!s.omit){if(!(s.name in e))throw new Error(`missing data for layout item: ${s.name}`);i=e[s.name]}const o=Jl(s,i,t);if(o===null){if(e!==tn)throw new Error(`coding error: couldn't calculate size for layout item: ${s.name}`);return null}r+=o}return r}var aa=(n,e)=>{n.bytes.set(e,n.offset),n.offset+=e.length},Ql=n=>n.bytesConversions[n.position++];function vn(n,e,t){const[r,s]=Hm(n,e),i={bytes:t??new Uint8Array(r),offset:0};if(Ai(n,e,i,{bytesConversions:s,position:0}),i.offset!==i.bytes.length)throw new Error(`encoded data is shorter than expected: ${i.bytes.length} > ${i.offset}`);return t?i.offset:i.bytes}var qm=2**(ro*8);function Ar(n,e,t,r=Pu,s=!1){if(!s&&n<0)throw new Error(`Value ${n} is negative but unsigned`);if(typeof n=="number"){if(!Number.isInteger(n))throw new Error(`Value ${n} is not an integer`);if(e>ro){if(n>=qm)throw new Error(`Value ${n} is too large to be safely converted into an integer`);if(s&&n<-281474976710656)throw new Error(`Value ${n} is too small to be safely converted into an integer`)}}const i=2n**BigInt(e*8-(s?1:0));if(n>=i)throw new Error(`Value ${n} is too large for ${e} bytes`);if(s&&n<-i)throw new Error(`Value ${n} is too small for ${e} bytes`);for(let o=0;o<e;++o)t.bytes[t.offset+o]=Number(BigInt(n)>>BigInt(8*(r==="big"?e-o-1:o))&0xffn);t.offset+=e}function Ai(n,e,t,r){if(_s(n))ed(n,e,t,r);else for(const s of n)try{ed(s,e[s.name],t,r)}catch(i){throw i.message=`when serializing item '${s.name}': ${i.message}`,i}}function ed(n,e,t,r){switch(n.binary){case"int":case"uint":{const s=(()=>{var i;return vr(n.custom)?("omit"in n&&n.omit||Na(n.custom,e),n.custom):vr((i=n==null?void 0:n.custom)==null?void 0:i.from)?n.custom.from:n.custom!==void 0?n.custom.from(e):e})();Ar(s,n.size,t,n.endianness,n.binary==="int");break}case"bytes":{const s=t.offset;if("lengthSize"in n&&n.lengthSize!==void 0&&(t.offset+=n.lengthSize),Vr(n)){const{custom:i}=n;let o;i===void 0?o=e:typeof i.from!="function"?o=i.from:o=Ql(r),Ai(n.layout,o,t,r)}else{const{custom:i}=n;ts(i)?("omit"in n&&n.omit||za(i,e),aa(t,i)):ns(i)?aa(t,i.from):aa(t,i!==void 0?Ql(r):e)}if("lengthSize"in n&&n.lengthSize!==void 0){const i=t.offset-s-n.lengthSize,o=t.offset;t.offset=s,Ar(i,n.lengthSize,t,n.lengthEndianness),t.offset=o}else Oa(n,t.offset-s);break}case"array":{if("length"in n&&n.length!==e.length)throw new Error(`array length mismatch: layout length: ${n.length}, data length: ${e.length}`);"lengthSize"in n&&n.lengthSize!==void 0&&Ar(e.length,n.lengthSize,t,n.lengthEndianness);for(let s=0;s<e.length;++s)Ai(n.layout,e[s],t,r);break}case"switch":{const[s,i]=Ou(n,e),o=Array.isArray(s)?s[0]:s;Ar(o,n.idSize,t,n.idEndianness),Ai(i,e,t,r);break}}}function zu(n){const e=n.custom;if(!("cachedSerializedFrom"in e)&&(e.cachedSerializedFrom=vn(n.layout,e.from),"size"in n&&n.size!==void 0&&n.size!==e.cachedSerializedFrom.length))throw new Error("Layout specification error: custom.from does not serialize to specified size");return e.cachedSerializedFrom}function kn(n,e,t){const r=t??!0,s={bytes:e,offset:0,end:e.length},i=Cs(n,s);if(r&&s.offset!==s.end)throw new Error(`encoded data is longer than expected: ${s.end} > ${s.offset}`);return r?i:[i,s.offset]}function wi(n,e){const t=n.offset+e;if(t>n.end)throw new Error(`chunk is shorter than expected: ${n.end} < ${t}`);n.offset=t}function Cs(n,e){if(!Array.isArray(n))return td(n,e);let t={};for(const r of n)try{(r.omit?{}:t)[r.name]=td(r,e)}catch(s){throw s.message=`when deserializing item '${r.name}': ${s.message}`,s}return t}function di(n,e,t=Pu,r=!1){let s=0n;for(let i=0;i<e;++i)s|=BigInt(n.bytes[n.offset+i])<<BigInt(8*(t==="big"?e-i-1:i));return r&&n.bytes[n.offset+(t==="big"?0:e-1)]&128&&(s-=1n<<BigInt(8*e)),wi(n,e),e>ro?s:Number(s)}function td(n,e){switch(n.binary){case"int":case"uint":{const t=di(e,n.size,n.endianness,n.binary==="int"),{custom:r}=n;return vr(r)?(Na(r,t),r):vr(r==null?void 0:r.from)?(Na(r.from,t),r.to):r!==void 0?r.to(t):t}case"bytes":{const t="lengthSize"in n&&n.lengthSize!==void 0?di(e,n.lengthSize,n.lengthEndianness):n==null?void 0:n.size;if(Vr(n)){const{custom:a}=n,c=e.offset;let h;if(t===void 0)h=Cs(n.layout,e);else{const b={...e,end:e.offset+t};if(wi(e,t),h=Cs(n.layout,b),b.offset!==b.end)throw new Error(`read less data than expected: ${b.offset-e.offset} < ${t}`)}return a!==void 0?typeof a.from!="function"?(za(zu(n),e.bytes,{dataSlice:[c,e.offset]}),a.to):a.to(h):h}const{custom:r}=n;{let a,c;if(ts(r)?a=r:ns(r)&&(a=r.from,c=r.to),a!==void 0){const h=t??a.length,b=e.bytes.subarray(e.offset,e.offset+h);return za(a,b),wi(e,h),c??a}}const s=e.offset,i=t!==void 0?e.offset+t:e.end;wi(e,i-s);const o=e.bytes.subarray(s,i);return r!==void 0?r.to(o):o}case"array":{let t=[];const{layout:r}=n,s=()=>{const o=Cs(r,e);t.push(o)};let i=null;if("length"in n&&n.length!==void 0?i=n.length:"lengthSize"in n&&n.lengthSize!==void 0&&(i=di(e,n.lengthSize,n.lengthEndianness)),i!==null)for(let o=0;o<i;++o)s();else for(;e.offset<e.end;)s();return t}case"switch":{const t=di(e,n.idSize,n.idEndianness),{layouts:r}=n;if(r.length===0)throw new Error("switch item has no layouts");const s=typeof r[0][0]=="number",i=r.find(([h])=>s?h===t:h[0]===t);if(i===void 0)throw new Error(`unknown id value: ${t}`);const[o,a]=i,c=Cs(a,e);return{[n.idTag??"id"]:s?t:o[1],...c}}}}function Km(n,e){return Ei(n,e)}function nd(n,e){switch(n.binary){case"bytes":if(Vr(n)){const{custom:t}=n;return t===void 0||typeof t.from!="function"?Ei(n.layout,t?t.from:e):e}case"int":case"uint":{const{custom:t}=n;return n!=null&&n.omit?void 0:Wm(t)?t:zm(t)?t.to:e}case"array":return Array.isArray(e)?e.map(t=>Ei(n.layout,t)):void 0;case"switch":{const t=e[n.idTag??"id"],[r,s]=n.layouts.find(([i])=>(Array.isArray(i)?i[1]:i)==t);return{[n.idTag??"id"]:t,...Ei(s,e)}}}}function Ei(n,e){if(e=e??{},_s(n))return nd(n,e);const t={};for(const r of n){const s=nd(r,e[r.name]??{});s!==void 0&&(t[r.name]=s)}return t}function jm(n,e){const[t,r]=Vm(n);if(!t)throw new Error("Cannot uniquely distinguished the given layouts");return s=>{const i=r(s);return i.length===0?null:i[0]}}function Ha(n){return n.reduce((e,t)=>e|BigInt(1)<<BigInt(t),BigInt(0))}function ui(n){const e=[];for(let t=0n;n>0n;n>>=1n,++t)n&1n&&e.push(Number(t));return e}function At(n){let e=0;for(;n>0n;n>>=1n)e+=Number(n&1n);return e}var rd=n=>n>0?2**(8*n)-1:1/0;function sd(n,e,t){var r;switch(n.binary){case"int":case"uint":{const s=vr(n.custom)?n.custom:vr((r=n==null?void 0:n.custom)==null?void 0:r.from)?n.custom.from:null;if(s!==null&&e!==null){const i={bytes:new Uint8Array(n.size),offset:0};Ar(s,n.size,i,n.endianness,n.binary==="int"),t.push([e,i.bytes])}return[n.size,n.size]}case"bytes":{const s="lengthSize"in n?n.lengthSize|0:0;let i,o;if(Vr(n)){const{custom:c}=n;if(c!==void 0&&typeof c.from!="function")i=zu(n),o=i.length;else{const h=Nu(n.layout);h!==null&&(o=h)}}else{const{custom:c}=n;ts(c)?(i=c,o=c.length):ns(c)&&(i=c.from,o=c.from.length)}if(s>0&&e!==null){if(o!==void 0){const c={bytes:new Uint8Array(s),offset:0},h=n.lengthEndianness;Ar(o,s,c,h,!1),t.push([e,c.bytes])}e+=s}if(i!==void 0)return e!==null&&t.push([e,i]),[s+i.length,s+i.length];const a="size"in n&&n.size!==void 0?[n.size,n.size]:void 0;if(Vr(n)){const c=Bi(n.layout,e,t);return a??[s+c[0],s+c[1]]}return a??[s,rd(s)]}case"array":{if("length"in n){let i=[];const o=Bi(n.layout,0,i);if(e!==null)if(o[0]!==o[1]){if(n.length>0)for(const[a,c]of i)t.push([e+a,c])}else for(let a=0;a<n.length;++a)for(const[c,h]of i)t.push([e+c+a*o[0],h]);return[n.length*o[0],n.length*o[1]]}const s=n.lengthSize|0;return[s,rd(s)]}case"switch":{const s=n.layouts.map(c=>[]),{idSize:i,idEndianness:o}=n,a=n.layouts.map(([c,h],b)=>{const w=Array.isArray(c)?c[0]:c;if(e!==null){const E={bytes:new Uint8Array(i),offset:0};Ar(w,i,E,o),s[b].push([0,E.bytes])}const D=Bi(h,e!==null?i:null,s[b]);return[D[0]+i,D[1]+i]});return e!==null&&s.every(c=>c.length>0)&&(()=>{const c=Math.min(...s.map(b=>b.at(-1)[0]+b.at(-1)[1].length)),h=s.map(b=>0);for(let b=0;b<c;){let w=null,D=0;for(;D<s.length;){let E=h[D];const g=s[D],[S,T]=g[E];if(S+T.length<=b){if(++E,E===g.length)return;h[D]=E,b=g[E][0];break}const M=T[b-S];if(w===null&&(w=M),M!==w){++b;break}++D}D===s.length&&(t.push([e+b,new Uint8Array([w])]),++b)}})(),[Math.min(...a.map(([c])=>c)),Math.max(...a.map(([c,h])=>h))]}}}function Bi(n,e,t){if(!Array.isArray(n))return sd(n,e,t);let r=[0,0];for(const s of n){const i=sd(s,e,t);r[0]+=i[0],r[1]+=i[1],e!==null&&(e=i[0]===i[1]?e+i[0]:null)}return r}function $m(n){const e=new Map;let t=[];const r=s=>{for(;t.length>0&&t[0][0]<s;){const i=t[0][0]+1,o=t.findIndex(([a])=>i<=a);o===-1?t=[]:t.splice(0,o),e.set(i,Ha(t.map(([,a])=>a)))}};for(const[[s,i],o]of n){r(s);const a=t.findIndex(([c])=>c>i);a===-1?t.push([i,o]):t.splice(a,0,[i,o]),e.set(s,Ha(t.map(([,c])=>c)))}return r(1/0),e}function Vm(n){if(n.length===0)throw new Error("Cannot discriminate empty set of layouts");const e=0n,t=(1n<<BigInt(n.length))-1n,r=n.map(()=>[]),s=n.map((_,U)=>Bi(_,0,r[U])),i=s.map((_,U)=>[_,U]).sort(([[_]],[[U]])=>_-U),o=(()=>{let _=t;const U=new Map;for(const[[L],H]of i)_^=1n<<BigInt(H),U.set(L,_);return U})(),a=$m(i),c=n.length-Math.max(...[...a.values()].map(_=>At(_))),h=_=>{let U=t;for(const[L,H]of o){if(_<L)break;U=H}return U},b=_=>{let U=e;for(const[L,H]of a){if(_<L)break;U=H}return U},w=Array.from({length:Math.max(...r.map(_=>_.length>0?_.at(-1)[0]+_.at(-1)[1].length:0))}).map(()=>[]);for(let _=0;_<r.length;++_)for(const[U,L]of r[_])for(let H=0;H<L.length;++H)w[U+H].push([L[H],_]);let D=[];for(const[_,U]of w.entries()){const L=h(_),H=L^Ha(U.map(([,re])=>re)),K=t^L,V=new Map;for(const[re,$]of U)V.has(re)||V.set(re,e),V.set(re,V.get(re)|1n<<BigInt($));let ee=n.length-Math.max(At(H),At(K));for(const re of V.values()){const $=U.length-At(re)+At(K);ee=Math.min(ee,$)}if(ee!==0){if(ee===n.length-1)return[!0,re=>ui(re.length<=_?K:V.get(re[_])??e)];D.push([ee,_,K,V,H])}}if(c===n.length-1)return[!0,_=>ui(b(_.length))];D.sort(([_],[U])=>U-_);let E=!0;const g=new Map,S=new Map,T=(_,U)=>{g.set(_,U),S.has(At(_))||S.set(At(_),[]),S.get(At(_)).push(_)},M=(_,U)=>{if(At(_)<=1||g.has(_))return;let L=0;const H=new Map;for(const V of ui(_)){const ee=s[V][0],re=a.get(ee)&_;H.set(ee,re),L=Math.max(L,At(re))}L=At(_)-L;const K=[];for(const[V,ee,re,$,ie]of U){const F=new Map;let l=0;for(const[C,B]of $){const x=B&_;At(x)>0&&(F.set(C,x),l+=At(x))}const m=re&_;let p=F.size>0?V:0;for(const C of F.values()){const B=l-At(C)+At(m);p=Math.min(p,B)}if(p!==0){if(p===At(_)-1){T(_,[ee,m,F]);return}K.push([p,ee,m,F,ie&_])}}if(L===At(_)-1){T(_,"size");return}if(K.sort(([V],[ee])=>ee-V),K.length>0&&K[0][0]>=L){const[,V,ee,re,$]=K[0];T(_,[V,ee,re]),M(ee,K);for(const ie of re.values())M(ie|$,K.slice(1));return}if(L>0){T(_,"size");for(const V of H.values())M(V,K);return}T(_,"indistinguishable"),E=!1};M(t,D);const N=_=>{for(let U=At(_)+1;U<n.length-2;++U)for(const L of S.get(U)??[])if((_&L)==_)return g.get(L);throw new Error("Implementation error in layout discrimination algorithm")};return[E,_=>{let U=t,L=g.get(U);for(;L!=="indistinguishable";){if(L==="size")U&=b(_.length);else{const[H,K,V]=L;if(_.length<=H)U&=K;else{const ee=_[H];for(const[re,$]of V)re!==ee&&(U^=U&$);U^=U&K}}if(At(U)<=1)break;L=g.get(U)??N(U)}return ui(U)}]}var so=(n,e)=>({...n,binary:"bytes",...e===void 0?{}:Pm(e)?{layout:e}:e instanceof Uint8Array||ns(e)||!Array.isArray(e)?{custom:e}:{layout:e[0],custom:e[1]}});function Gm(n,e){const t=Object.fromEntries(n.map(([s,i])=>[i,s])),r=Object.fromEntries(n);return{binary:"uint",size:(e==null?void 0:e.size)??1,endianness:(e==null?void 0:e.endianness)??"big",custom:{to:s=>{const i=t[s];if(i===void 0)throw new Error(`Invalid enum value: ${s}`);return i},from:s=>r[s]}}}function Ym(n,e){return{binary:"uint",size:Math.ceil(n.length/8),custom:{to:t=>{const r={};for(let s=0;s<n.length;++s)n[s]&&(r[n[s]]=(BigInt(t)&1n<<BigInt(s))!==0n);return r},from:t=>{let r=0n;for(let s=0;s<n.length;++s)n[s]&&t[n[s]]&&(r|=1n<<BigInt(s));return n.length>ro?r:Number(r)}}}}function Xm(n,e){return Number(Number(n).toFixed(e))}function xi(n,e){if(Zm(n,e),n=n.toString(),n.includes("e"))throw new Error("Scientific notation is not supported yet by Amount");const t=n.split(".");if(t.length>2)throw"Too many decimals";let[r,s]=t.length===0?["0",""]:t.length===1?[t[0],""]:t;if(s=s.padEnd(e,"0"),s.length>e){if(BigInt(s.substring(e))!==0n)throw new Error("Amount: invalid input. Decimals too low.");s=s.substring(0,e)}return{amount:BigInt(r+s).toString(),decimals:e}}function Ci(n,e){if(n.decimals<=e)return n;const t=BigInt(n.decimals-e);return{amount:(wn(n)/10n**t*10n**t).toString(),decimals:n.decimals}}function vs(n,e){if(n.decimals===e)return n;if(n.amount==="0")return{amount:n.amount,decimals:e};const t=e-n.decimals;if(t>0)return{amount:n.amount+"0".repeat(t),decimals:e};if(BigInt(n.amount.substring(n.amount.length+t))===0n)return{amount:n.amount.substring(0,n.amount.length+t),decimals:e};throw new Error(`scaleAmount(${JSON.stringify(n)}, ${e}) would result in altered amount. Use truncateAmount first if you intended to truncate it.`)}function $r(n,e){return{amount:n.toString(),decimals:e}}function wn(n){return Hu(n),BigInt(n.amount)}function Ic(n,e){Hu(n);let t=n.amount.substring(0,n.amount.length-n.decimals).padStart(1,"0"),r=n.amount.substring(n.amount.length-n.decimals).padStart(n.decimals,"0");if(e!==void 0){for(;r.length>e&&r[r.length-1]==="0";)r=r.substring(0,r.length-1);r=r.padEnd(e,"0")}else r=r.replace(/0+$/,"");return r.length>0?`${t}.${r}`:t}function ks(n){return Number(Ic(n))}function id(n,e){return Ic($r(n,e))}function Zm(n,e){if(typeof n=="number"){if(!isFinite(n))throw new Error("Amount: invalid input. Amount must be finite");if(n<0)throw new Error("Amount: invalid input. Amount cannot be negative")}else if(!/^[0-9\.]*$/.test(n))throw new Error("Amount: invalid input. Must only contain digits.");if(!isFinite(e))throw new Error("Amount: invalid input. Decimals must be finite")}function Hu(n){if(!/^[0-9]*$/.test(n.amount))throw new Error("Amount: invalid input. Must only contain digits.");if(n.decimals<0)throw new Error("Amount: invalid input. Decimals must be >= 0");if(!isFinite(n.decimals))throw new Error("Amount: invalid input. Decimals must be a finite number.")}const Ms=(n=0,e=0,t=0)=>new Date(Date.now()+(n*60*60+e*60+t)*1e3);/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Gr(n){return n instanceof Uint8Array||ArrayBuffer.isView(n)&&n.constructor.name==="Uint8Array"}function Jm(n,...e){if(!Gr(n))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(n.length))throw new Error("Uint8Array expected of length "+e+", got length="+n.length)}function qu(n,e){return Array.isArray(e)?e.length===0?!0:n?e.every(t=>typeof t=="string"):e.every(t=>Number.isSafeInteger(t)):!1}function Ku(n){if(typeof n!="function")throw new Error("function expected");return!0}function kr(n,e){if(typeof e!="string")throw new Error(`${n}: string expected`);return!0}function rs(n){if(!Number.isSafeInteger(n))throw new Error(`invalid integer: ${n}`)}function Wi(n){if(!Array.isArray(n))throw new Error("array expected")}function Pi(n,e){if(!qu(!0,e))throw new Error(`${n}: array of strings expected`)}function Uc(n,e){if(!qu(!1,e))throw new Error(`${n}: array of numbers expected`)}function Xs(...n){const e=i=>i,t=(i,o)=>a=>i(o(a)),r=n.map(i=>i.encode).reduceRight(t,e),s=n.map(i=>i.decode).reduce(t,e);return{encode:r,decode:s}}function io(n){const e=typeof n=="string"?n.split(""):n,t=e.length;Pi("alphabet",e);const r=new Map(e.map((s,i)=>[s,i]));return{encode:s=>(Wi(s),s.map(i=>{if(!Number.isSafeInteger(i)||i<0||i>=t)throw new Error(`alphabet.encode: digit index outside alphabet "${i}". Allowed: ${n}`);return e[i]})),decode:s=>(Wi(s),s.map(i=>{kr("alphabet.decode",i);const o=r.get(i);if(o===void 0)throw new Error(`Unknown letter: "${i}". Allowed: ${n}`);return o}))}}function oo(n=""){return kr("join",n),{encode:e=>(Pi("join.decode",e),e.join(n)),decode:e=>(kr("join.decode",e),e.split(n))}}function Qm(n,e="="){return rs(n),kr("padding",e),{encode(t){for(Pi("padding.encode",t);t.length*n%8;)t.push(e);return t},decode(t){Pi("padding.decode",t);let r=t.length;if(r*n%8)throw new Error("padding: invalid, string should have whole number of bytes");for(;r>0&&t[r-1]===e;r--)if((r-1)*n%8===0)throw new Error("padding: invalid, string has too much padding");return t.slice(0,r)}}}function od(n,e,t){if(e<2)throw new Error(`convertRadix: invalid from=${e}, base cannot be less than 2`);if(t<2)throw new Error(`convertRadix: invalid to=${t}, base cannot be less than 2`);if(Wi(n),!n.length)return[];let r=0;const s=[],i=Array.from(n,a=>{if(rs(a),a<0||a>=e)throw new Error(`invalid integer: ${a}`);return a}),o=i.length;for(;;){let a=0,c=!0;for(let h=r;h<o;h++){const b=i[h],w=e*a,D=w+b;if(!Number.isSafeInteger(D)||w/e!==a||D-b!==w)throw new Error("convertRadix: carry overflow");const E=D/t;a=D%t;const g=Math.floor(E);if(i[h]=g,!Number.isSafeInteger(g)||g*t+a!==D)throw new Error("convertRadix: carry overflow");if(c)g?c=!1:r=h;else continue}if(s.push(a),c)break}for(let a=0;a<n.length-1&&n[a]===0;a++)s.push(0);return s.reverse()}const ju=(n,e)=>e===0?n:ju(e,n%e),Li=(n,e)=>n+(e-ju(n,e)),Si=(()=>{let n=[];for(let e=0;e<40;e++)n.push(2**e);return n})();function qa(n,e,t,r){if(Wi(n),e<=0||e>32)throw new Error(`convertRadix2: wrong from=${e}`);if(t<=0||t>32)throw new Error(`convertRadix2: wrong to=${t}`);if(Li(e,t)>32)throw new Error(`convertRadix2: carry overflow from=${e} to=${t} carryBits=${Li(e,t)}`);let s=0,i=0;const o=Si[e],a=Si[t]-1,c=[];for(const h of n){if(rs(h),h>=o)throw new Error(`convertRadix2: invalid data word=${h} from=${e}`);if(s=s<<e|h,i+e>32)throw new Error(`convertRadix2: carry overflow pos=${i} from=${e}`);for(i+=e;i>=t;i-=t)c.push((s>>i-t&a)>>>0);const b=Si[i];if(b===void 0)throw new Error("invalid carry");s&=b-1}if(s=s<<t-i&a,!r&&i>=e)throw new Error("Excess padding");if(!r&&s>0)throw new Error(`Non-zero padding: ${s}`);return r&&i>0&&c.push(s>>>0),c}function e1(n){rs(n);const e=2**8;return{encode:t=>{if(!Gr(t))throw new Error("radix.encode input should be Uint8Array");return od(Array.from(t),e,n)},decode:t=>(Uc("radix.decode",t),Uint8Array.from(od(t,n,e)))}}function _c(n,e=!1){if(rs(n),n<=0||n>32)throw new Error("radix2: bits should be in (0..32]");if(Li(8,n)>32||Li(n,8)>32)throw new Error("radix2: carry overflow");return{encode:t=>{if(!Gr(t))throw new Error("radix2.encode input should be Uint8Array");return qa(Array.from(t),8,n,!e)},decode:t=>(Uc("radix2.decode",t),Uint8Array.from(qa(t,n,8,e)))}}function ad(n){return Ku(n),function(...e){try{return n.apply(null,e)}catch{}}}function t1(n,e){return rs(n),Ku(e),{encode(t){if(!Gr(t))throw new Error("checksum.encode: input should be Uint8Array");const r=e(t).slice(0,n),s=new Uint8Array(t.length+n);return s.set(t),s.set(r,t.length),s},decode(t){if(!Gr(t))throw new Error("checksum.decode: input should be Uint8Array");const r=t.slice(0,-n),s=t.slice(-n),i=e(r).slice(0,n);for(let o=0;o<n;o++)if(i[o]!==s[o])throw new Error("Invalid checksum");return r}}}const cd=Xs(_c(4),io("0123456789ABCDEF"),oo("")),n1=typeof Uint8Array.from([]).toBase64=="function"&&typeof Uint8Array.fromBase64=="function",ld=n1?{encode(n){return Jm(n),n.toBase64()},decode(n){return kr("base64",n),Uint8Array.fromBase64(n,{lastChunkHandling:"strict"})}}:Xs(_c(6),io("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),Qm(6),oo("")),r1=n=>Xs(e1(58),io(n),oo("")),Ka=r1("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),s1=n=>Xs(t1(4,e=>n(n(e))),Ka),ja=Xs(io("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),oo("")),dd=[996825010,642813549,513874426,1027748829,705979059];function As(n){const e=n>>25;let t=(n&33554431)<<5;for(let r=0;r<dd.length;r++)(e>>r&1)===1&&(t^=dd[r]);return t}function ud(n,e,t=1){const r=n.length;let s=1;for(let i=0;i<r;i++){const o=n.charCodeAt(i);if(o<33||o>126)throw new Error(`Invalid prefix (${n})`);s=As(s)^o>>5}s=As(s);for(let i=0;i<r;i++)s=As(s)^n.charCodeAt(i)&31;for(let i of e)s=As(s)^i;for(let i=0;i<6;i++)s=As(s);return s^=t,ja.encode(qa([s%Si[30]],30,5,!1))}function i1(n){const e=n==="bech32"?1:734539939,t=_c(5),r=t.decode,s=t.encode,i=ad(r);function o(w,D,E=90){kr("bech32.encode prefix",w),Gr(D)&&(D=Array.from(D)),Uc("bech32.encode",D);const g=w.length;if(g===0)throw new TypeError(`Invalid prefix length ${g}`);const S=g+7+D.length;if(E!==!1&&S>E)throw new TypeError(`Length ${S} exceeds limit ${E}`);const T=w.toLowerCase(),M=ud(T,D,e);return`${T}1${ja.encode(D)}${M}`}function a(w,D=90){kr("bech32.decode input",w);const E=w.length;if(E<8||D!==!1&&E>D)throw new TypeError(`invalid string length: ${E} (${w}). Expected (8..${D})`);const g=w.toLowerCase();if(w!==g&&w!==w.toUpperCase())throw new Error("String must be lowercase or uppercase");const S=g.lastIndexOf("1");if(S===0||S===-1)throw new Error('Letter "1" must be present between prefix and data only');const T=g.slice(0,S),M=g.slice(S+1);if(M.length<6)throw new Error("Data must be at least 6 characters long");const N=ja.decode(M).slice(0,-6),_=ud(T,N,e);if(!M.endsWith(_))throw new Error(`Invalid checksum in ${w}: expected "${_}"`);return{prefix:T,words:N}}const c=ad(a);function h(w){const{prefix:D,words:E}=a(w,!1);return{prefix:D,words:E,bytes:r(E)}}function b(w,D){return o(w,s(D))}return{encode:o,decode:a,encodeFromBytes:b,decodeToBytes:h,decodeUnsafe:c,fromWords:r,fromWordsUnsafe:i,toWords:s}}const $u=i1("bech32"),Vu=(n,e)=>e.startsWith(n)?e.slice(n.length):e,o1=/^(?:0x)?[0-9a-fA-F]+$/,Ft={valid:n=>o1.test(n),decode:n=>cd.decode(Vu("0x",n).toUpperCase()),encode:(n,e=!1)=>(n=typeof n=="string"?Nt.encode(n):n,(e?"0x":"")+cd.encode(n).toLowerCase())},a1=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,ao={valid:n=>a1.test(n),decode:ld.decode,encode:n=>ld.encode(typeof n=="string"?Nt.encode(n):n)},Gu={decode:Ka.decode,encode:n=>Ka.encode(typeof n=="string"?Nt.encode(n):n)},Fs={decode:n=>(typeof n!="string"&&(n=Ft.encode(n,!0)),n===""||n==="0x"?0n:BigInt(n)),encode:(n,e=!1)=>Fs.toString(n,e),toString:(n,e=!1)=>{let t=n.toString(16);return t=t.length%2===1?t="0"+t:t,e?"0x"+t:t},toBytes:(n,e)=>{typeof n=="number"&&(n=Fs.toBigInt(n));const t=Ft.decode(Fs.toString(n));if(!e)return t;if(e<t.length)throw new Error(`Can't fit ${n} into ${e} bytes.`);return Nt.zpad(t,e)},toNumber:n=>{if(n>BigInt(Number.MAX_SAFE_INTEGER))throw new Error(`Invalid cast: ${n} exceeds MAX_SAFE_INTEGER`);return Number(n)},toBigInt:n=>{if(n>Number.MAX_SAFE_INTEGER)throw new Error(`Invalid cast: ${n} exceeds MAX_SAFE_INTEGER`);return BigInt(n)}},Nt={encode:n=>new TextEncoder().encode(n),decode:n=>new TextDecoder().decode(n),equals:(n,e)=>n.length===e.length&&n.every((t,r)=>t===e[r]),zpad:(n,e,t=!0)=>t?Nt.concat(new Uint8Array(e-n.length),n):Nt.concat(n,new Uint8Array(e-n.length)),concat:(...n)=>{const e=n.reduce((s,i)=>s+i.length,0),t=new Uint8Array(e);let r=0;return n.forEach(s=>{t.set(s,r),r+=s.length}),t}},Mc=[[1,"Solana"],[2,"Ethereum"],[3,"Terra"],[4,"Bsc"],[5,"Polygon"],[6,"Avalanche"],[7,"Oasis"],[8,"Algorand"],[9,"Aurora"],[10,"Fantom"],[11,"Karura"],[12,"Acala"],[13,"Klaytn"],[14,"Celo"],[15,"Near"],[16,"Moonbeam"],[17,"Neon"],[18,"Terra2"],[19,"Injective"],[20,"Osmosis"],[21,"Sui"],[22,"Aptos"],[23,"Arbitrum"],[24,"Optimism"],[25,"Gnosis"],[26,"Pythnet"],[28,"Xpla"],[29,"Btc"],[30,"Base"],[32,"Sei"],[34,"Scroll"],[35,"Mantle"],[36,"Blast"],[37,"Xlayer"],[38,"Linea"],[39,"Berachain"],[40,"Seievm"],[43,"Snaxchain"],[44,"Unichain"],[45,"Worldchain"],[46,"Ink"],[47,"HyperEVM"],[48,"Monad"],[50,"Mezo"],[52,"Sonic"],[3104,"Wormchain"],[4e3,"Cosmoshub"],[4001,"Evmos"],[4002,"Kujira"],[4003,"Neutron"],[4004,"Celestia"],[4005,"Stargaze"],[4006,"Seda"],[4007,"Dymension"],[4008,"Provenance"],[4009,"Noble"],[10002,"Sepolia"],[10003,"ArbitrumSepolia"],[10004,"BaseSepolia"],[10005,"OptimismSepolia"],[10006,"Holesky"],[10007,"PolygonSepolia"]],[O6,Yu]=yr(Mc),co=we(Mc,[1,0]),Oi=we(Mc),lo=n=>co.has(n),$a=n=>Oi.has(n),Zs=n=>{switch(typeof n){case"string":if(lo(n))return co(n);break;case"number":if($a(n))return n;break}throw Error(`Cannot convert to ChainId: ${n}`)},ss=n=>{switch(typeof n){case"string":if(lo(n))return n;break;case"number":if($a(n))return Oi(n);break;case"bigint":if($a(Number(n)))return Oi.get(Number(n));break}throw Error(`Cannot convert to Chain: ${n}`)},Rc=[["Evm",["Acala","Arbitrum","Aurora","Avalanche","Base","Bsc","Celo","Ethereum","Fantom","Gnosis","Karura","Klaytn","Moonbeam","Neon","Oasis","Optimism","Polygon","Sepolia","ArbitrumSepolia","BaseSepolia","OptimismSepolia","Holesky","PolygonSepolia","Mantle","Scroll","Blast","Xlayer","Linea","Berachain","Seievm","Snaxchain","Unichain","Worldchain","Ink","HyperEVM","Monad","Mezo","Sonic"]],["Solana",["Solana","Pythnet"]],["Cosmwasm",["Cosmoshub","Evmos","Injective","Kujira","Osmosis","Sei","Terra","Terra2","Wormchain","Xpla","Dymension","Neutron","Stargaze","Celestia","Seda","Provenance","Noble"]],["Btc",["Btc"]],["Algorand",["Algorand"]],["Sui",["Sui"]],["Aptos",["Aptos"]],["Near",["Near"]]];Wu(Rc,0);const Xu=we(Rc),is=we(Rc,[1,0]),c1=[["Evm","hex"],["Solana","base58"],["Cosmwasm","bech32"],["Btc","bech32"],["Algorand","algorandAppId"],["Sui","hex"],["Aptos","hex"],["Near","sha256"]],l1=we(c1),os={byAddress:(n,e)=>Object.values(n).find(t=>Zu(t.address,e)),native:n=>os.byAddress(n,"native"),bySymbol:(n,e)=>{const t=Object.values(n).filter(r=>r.symbol===e);return t&&t.length>0?t:void 0},byKey:(n,e)=>{const t=Object.entries(n).find(([r])=>e===r);return t?t[1]:void 0}},Zu=(n,e)=>n.toLowerCase()===e.toLowerCase();var fd;(function(n){n[n.Finalized=1]="Finalized",n[n.Immediate=200]="Immediate",n[n.Safe=201]="Safe"})(fd||(fd={}));const d1=[["Ethereum",32]];we(d1);const u1=[["Solana",32],["Ethereum",72],["Bsc",15],["Optimism",512],["Base",512],["Arbitrum",4096],["Blast",512],["Xlayer",300],["Scroll",300],["Mantle",512],["Worldchain",512],["Polygon",32],["Fantom",1],["Celo",1],["Moonbeam",1],["Karura",1],["Acala",1],["Oasis",1],["Avalanche",0],["Sui",0],["Algorand",0],["Aptos",0],["Klaytn",0],["Sei",0],["Near",0],["Osmosis",0],["Terra",0],["Terra2",0],["Xpla",0],["Injective",0],["Berachain",1],["Seievm",1],["Snaxchain",512],["Unichain",1024],["Ink",512],["HyperEVM",1],["Monad",1],["Mezo",1],["Sonic",1],["Cosmoshub",0],["Evmos",0],["Kujira",0],["Neutron",0],["Celestia",0],["Stargaze",0],["Dymension",0],["Provenance",0],["Noble",0],["Sepolia",72],["ArbitrumSepolia",4096],["BaseSepolia",512],["OptimismSepolia",512],["PolygonSepolia",32]],Ju=we(u1),f1=[["Acala",12e3],["Algorand",3300],["Aptos",4e3],["Arbitrum",260],["ArbitrumSepolia",260],["Aurora",3e3],["Avalanche",2e3],["Base",2e3],["BaseSepolia",2e3],["Blast",2e3],["Bsc",3e3],["Celo",5e3],["Cosmoshub",5e3],["Ethereum",15e3],["Evmos",2e3],["Fantom",2500],["Gnosis",5e3],["Holesky",15e3],["Injective",2500],["Karura",12e3],["Klaytn",1e3],["Kujira",3e3],["Mantle",2e3],["Moonbeam",12e3],["Monad",1e3],["Near",1500],["Neon",3e4],["Oasis",6e3],["Optimism",2e3],["OptimismSepolia",2e3],["Osmosis",6e3],["Polygon",2e3],["PolygonSepolia",2e3],["Scroll",3e3],["Sei",400],["Sepolia",15e3],["Solana",400],["Sui",3e3],["Terra",6e3],["Terra2",6e3],["Unichain",1e3],["Xpla",5e3],["Xlayer",3e3],["Worldchain",2e3],["Ink",1e3],["Wormchain",5e3],["Btc",6e5],["Pythnet",400],["Dymension",5e3],["Celestia",5e3],["Neutron",5e3],["Stargaze",5e3],["Seda",7500],["Berachain",2e3],["Mezo",4e3],["Sonic",330]],Qu=we(f1);function Wc(n){const e=Ju.get(n);if(e===void 0)throw new Error("Cannot find finality for "+n);const t=Qu.get(n);if(t===void 0)throw new Error("Cannot find block time for "+n);return e*t}const h1=[["Evm",18],["Solana",9],["Sui",9],["Aptos",8],["Cosmwasm",6],["Algorand",6],["Btc",8],["Near",12]],ef=we(h1),m1=[["Mainnet",[["Ethereum",{name:"Etherscan",baseUrl:"https://etherscan.io/",endpoints:{tx:"tx/",account:"address/"}}],["Solana",{name:"Solana Explorer",baseUrl:"https://explorer.solana.com/",endpoints:{tx:"tx/",account:"address/"}}],["Polygon",{name:"PolygonScan",baseUrl:"https://polygonscan.com/",endpoints:{tx:"tx/",account:"address/"}}],["Bsc",{name:"BscScan",baseUrl:"https://bscscan.com/",endpoints:{tx:"tx/",account:"address/"}}],["Avalanche",{name:"Snowtrace",baseUrl:"https://snowtrace.io/",endpoints:{tx:"tx/",account:"address/"}}],["Fantom",{name:"FTMscan",baseUrl:"https://ftmscan.com/",endpoints:{tx:"tx/",account:"address/"}}],["Celo",{name:"Celo Explorer",baseUrl:"https://explorer.celo.org/mainnet/",endpoints:{tx:"tx/",account:"address/"}}],["Moonbeam",{name:"Moonscan",baseUrl:"https://moonscan.io/",endpoints:{tx:"tx/",account:"address/"}}],["Sui",{name:"Sui Explorer",baseUrl:"https://explorer.sui.io/",endpoints:{tx:"txblock/",account:"address/"}}],["Aptos",{name:"Aptos Explorer",baseUrl:"https://explorer.aptoslabs.com/",endpoints:{tx:"txn/",account:"account/"}}],["Sei",{name:"Sei Explorer",baseUrl:"https://sei.explorers.guru/",endpoints:{tx:"transaction/",account:"address/"}}],["Karura",{name:"Karura Explorer",baseUrl:"https://blockscout.karura.network/",endpoints:{tx:"tx/",account:"address/"}}],["Acala",{name:"Acala Explorer",baseUrl:"https://blockscout.acala.network/",endpoints:{tx:"tx/",account:"address/"}}]]],["Testnet",[["Ethereum",{name:"Etherscan",baseUrl:"https://goerli.etherscan.io/",endpoints:{tx:"tx/",account:"address/"}}],["Polygon",{name:"PolygonScan",baseUrl:"https://mumbai.polygonscan.com/",endpoints:{tx:"tx/",account:"address/"}}],["Bsc",{name:"BscScan",baseUrl:"https://testnet.bscscan.com/",endpoints:{tx:"tx/",account:"address/"}}],["Avalanche",{name:"Snowtrace",baseUrl:"https://testnet.snowtrace.io/",endpoints:{tx:"tx/",account:"address/"}}],["Fantom",{name:"FTMscan",baseUrl:"https://testnet.ftmscan.com/",endpoints:{tx:"tx/",account:"address/"}}],["Celo",{name:"Celo Explorer",baseUrl:"https://explorer.celo.org/alfajores/",endpoints:{tx:"tx/",account:"address/"}}],["Moonbeam",{name:"Moonscan",baseUrl:"https://moonbase.moonscan.io/",endpoints:{tx:"tx/",account:"address/"}}],["Solana",{name:"Solana Explorer",baseUrl:"https://explorer.solana.com/",endpoints:{tx:"tx/",account:"address/"},networkQuery:{default:"Devnet",Testnet:"?cluster=testnet",Devnet:"?cluster=devnet"}}],["Sui",{name:"Sui Explorer",baseUrl:"https://explorer.sui.io/",endpoints:{tx:"txblock/",account:"address/"},networkQuery:{default:"Testnet",Testnet:"?network=testnet",Devnet:"?network=devnet"}}],["Aptos",{name:"Aptos Explorer",baseUrl:"https://explorer.aptoslabs.com/",endpoints:{tx:"txn/",account:"account/"},networkQuery:{default:"Testnet",Testnet:"?network=testnet",Devnet:"?network=devnet"}}],["Sei",{name:"Sei Explorer",baseUrl:"https://sei.explorers.guru/",endpoints:{tx:"transaction/",account:"address/"}}],["Karura",{name:"Karura Explorer",baseUrl:"https://blockscout.karura-testnet.aca-staging.network/",endpoints:{tx:"tx/",account:"address/"}}],["Acala",{name:"Acala Explorer",baseUrl:"https://blockscout.acala-dev.aca-dev.network/",endpoints:{tx:"tx/",account:"address/"}}]]]],b1=we(m1),p1=(n,e)=>n==="Devnet"?void 0:b1.get(n,e),g1=[["Mainnet",[["Ethereum","https://ethereum-rpc.publicnode.com"],["Solana","https://api.mainnet-beta.solana.com"],["Polygon","https://polygon-bor-rpc.publicnode.com"],["Bsc","https://bsc-rpc.publicnode.com"],["Avalanche","https://avalanche-c-chain-rpc.publicnode.com"],["Fantom","https://rpcapi.fantom.network"],["Celo","https://celo-rpc.publicnode.com"],["Moonbeam","https://moonbeam-rpc.publicnode.com"],["Sui","https://rpc.mainnet.sui.io"],["Aptos","https://fullnode.mainnet.aptoslabs.com/v1"],["Arbitrum","https://arb1.arbitrum.io/rpc"],["Optimism","https://mainnet.optimism.io"],["Base","https://mainnet.base.org"],["Osmosis","https://osmosis-rpc.polkachu.com"],["Cosmoshub","https://cosmos-rpc.publicnode.com:443"],["Evmos","https://evmos-rpc.polkachu.com"],["Injective","https://sentry.tm.injective.network"],["Wormchain","https://wormchain-rpc.quickapi.com"],["Xpla","https://dimension-rpc.xpla.dev"],["Sei","https://sei-rpc.polkachu.com/"],["Algorand","https://mainnet-api.algonode.cloud"],["Terra","https://terra-classic-rpc.publicnode.com"],["Terra2","https://terra-rpc.polkachu.com"],["Karura","https://eth-rpc-karura.aca-api.network"],["Acala","https://eth-rpc-acala.aca-api.network"],["Oasis","https://emerald.oasis.dev"],["Dymension","https://dymension-rpc.polkachu.com/"],["Stargaze","https://stargaze-rpc.polkachu.com/"],["Celestia","https://celestia-rpc.polkachu.com/"],["Neutron","https://neutron-rpc.polkachu.com/"],["Blast","https://rpc.blast.io"],["Provenance","https://rpc.provenance.io/"],["Noble","https://noble-rpc.polkachu.com/"],["Linea","https://rpc.linea.build"],["Scroll","https://scroll-rpc.publicnode.com"],["Xlayer","https://xlayerrpc.okx.com/"],["Gnosis","https://gnosis-rpc.publicnode.com"],["Mantle","https://rpc.mantle.xyz"],["Klaytn","https://public-en.node.kaia.io"],["Snaxchain","https://mainnet.snaxchain.io"],["Berachain","https://rpc.berachain.com"],["Unichain","https://mainnet.unichain.org"],["Worldchain","https://worldchain-mainnet.g.alchemy.com/public"],["Ink","https://rpc-qnd.inkonchain.com"],["Sonic","https://rpc.soniclabs.com"]]],["Testnet",[["Bsc","https://data-seed-prebsc-1-s3.binance.org:8545"],["Avalanche","https://api.avax-test.network/ext/bc/C/rpc"],["Fantom","https://rpc.testnet.fantom.network"],["Celo","https://alfajores-forno.celo-testnet.org"],["Solana","https://api.devnet.solana.com"],["Oasis","https://testnet.emerald.oasis.io"],["Moonbeam","https://rpc.api.moonbase.moonbeam.network"],["Sui","https://fullnode.testnet.sui.io"],["Aptos","https://fullnode.testnet.aptoslabs.com/v1"],["Sei","https://sei-testnet-rpc.polkachu.com"],["Injective","https://testnet.sentry.tm.injective.network"],["Osmosis","https://rpc.testnet.osmosis.zone"],["Cosmoshub","https://rpc.sentry-02.theta-testnet.polypore.xyz"],["Evmos","https://evmos-testnet-rpc.polkachu.com"],["Wormchain","https://gateway.testnet.xlabs.xyz/"],["Xpla","https://cube-rpc.xpla.dev"],["Sepolia","https://ethereum-sepolia.publicnode.com"],["Algorand","https://testnet-api.algonode.cloud"],["Terra","https://bombay.stakesystems.io"],["Terra2","https://terra-testnet-rpc.polkachu.com"],["ArbitrumSepolia","https://sepolia-rollup.arbitrum.io/rpc"],["OptimismSepolia","https://sepolia.optimism.io"],["BaseSepolia","https://sepolia.base.org"],["PolygonSepolia","https://rpc-amoy.polygon.technology/"],["Mantle","https://rpc.testnet.mantle.xyz"],["Karura","https://eth-rpc-karura-testnet.aca-staging.network"],["Acala","https://eth-rpc-acala-testnet.aca-staging.network"],["Blast","https://sepolia.blast.io"],["Berachain","https://bepolia.rpc.berachain.com/"],["Seievm","https://evm-rpc-testnet.sei-apis.com/"],["Linea","https://rpc.sepolia.linea.build"],["Xlayer","https://testrpc.xlayer.tech/"],["Scroll","https://scroll-sepolia-rpc.publicnode.com"],["Gnosis","https://rpc.chiadochain.net"],["Klaytn","https://public-en-kairos.node.kaia.io"],["Snaxchain","https://testnet.snaxchain.io"],["Unichain","https://sepolia.unichain.org"],["Worldchain","https://worldchain-sepolia.g.alchemy.com/public"],["Ink","https://rpc-qnd-sepolia.inkonchain.com"],["HyperEVM","https://api.hyperliquid-testnet.xyz/evm"],["Monad","https://testnet-rpc.monad.xyz"],["Noble","https://noble-testnet-rpc.polkachu.com/"],["Mezo","https://rpc.test.mezo.org"],["Sonic","https://rpc.blaze.soniclabs.com"]]],["Devnet",[["Ethereum","http://eth-devnet:8545"],["Bsc","http://eth-devnet2:8545"],["Solana","http://solana-devnet:8899"]]]],y1=we(g1),tf=(n,e)=>y1.get(n,e)??"",nf=[["Mainnet",[["Aptos",1n],["Algorand","mainnet-v1.0"],["Near","mainnet"],["Cosmoshub","cosmoshub-4"],["Evmos","evmos_9001-2"],["Injective","injective-1"],["Osmosis","osmosis-1"],["Sei","pacific-1"],["Terra","columbus-5"],["Terra2","phoenix-1"],["Wormchain","wormchain"],["Xpla","dimension_37-1"],["Kujira","kaiyo-1"],["Solana","5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d"],["Sui","35834a8a"],["Acala",787n],["Arbitrum",42161n],["Aurora",1313161554n],["Avalanche",43114n],["Base",8453n],["Bsc",56n],["Celo",42220n],["Ethereum",1n],["Fantom",250n],["Gnosis",100n],["Karura",686n],["Klaytn",8217n],["Moonbeam",1284n],["Neon",245022934n],["Oasis",42262n],["Optimism",10n],["Polygon",137n],["Neutron","neutron-1"],["Stargaze","stargaze-1"],["Celestia","celestia"],["Dymension","dymension_1100-1"],["Provenance","pio-mainnet-1"],["Noble","noble-1"],["Xlayer",196n],["Mantle",5000n],["Scroll",534352n],["Blast",81457n],["Linea",59144n],["Snaxchain",2192n],["Berachain",80094n],["Unichain",130n],["Worldchain",480n],["Ink",57073n],["Sonic",146n]]],["Testnet",[["Aptos",2n],["Algorand","testnet-v1.0"],["Near","testnet"],["Cosmoshub","theta-testnet-001"],["Evmos","evmos_9000-4"],["Injective","injective-888"],["Osmosis","osmo-test-5"],["Sei","atlantic-2"],["Terra","bombay-12"],["Terra2","pisco-1"],["Wormchain","wormchain-testnet-0"],["Xpla","cube_47-5"],["Kujira","harpoon-4"],["Solana","EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG"],["Sui","4c78adac"],["Acala",597n],["Arbitrum",421613n],["Aurora",1313161555n],["Avalanche",43113n],["Base",84531n],["Bsc",97n],["Celo",44787n],["Ethereum",5n],["Fantom",4002n],["Gnosis",10200n],["Karura",596n],["Klaytn",1001n],["Moonbeam",1287n],["Neon",245022940n],["Oasis",42261n],["Optimism",420n],["Polygon",80001n],["Sepolia",11155111n],["ArbitrumSepolia",421614n],["BaseSepolia",84532n],["OptimismSepolia",11155420n],["PolygonSepolia",80002n],["Holesky",17000n],["Neutron","pion-1"],["Celestia","mocha-4"],["Seda","seda-1-testnet"],["Noble","grand-1"],["Blast",168587773n],["Mantle",5003n],["Scroll",534351n],["Berachain",80069n],["Seievm",1328n],["Snaxchain",13001n],["Unichain",1301n],["Worldchain",4801n],["Ink",763373n],["HyperEVM",998n],["Xlayer",195n],["Linea",59141n],["Monad",10143n],["Mezo",31611n],["Sonic",57054n]]],["Devnet",[["Aptos",0n],["Algorand","sandnet-v1.0"],["Bsc",1397n],["Ethereum",1337n],["Injective","injective_devnet_fake"],["Solana","8wF6jKV3cKwyaVkWcoV9KpDqmkjvEYno9hKZrKx8TbZn"]]]],rf=we(nf),A1=we(nf,[2,[0,1]]);function w1(n,e){const r=A1(e).filter(([s,i])=>is(i)===n);if(r.length!==1)throw new Error(`Platform ${n} has multiple chains with native chain id ${e}`);return r[0]}const E1=[["Mainnet","https://iris-api.circle.com/v1/attestations"],["Testnet","https://iris-api-sandbox.circle.com/v1/attestations"]],hd=we(E1),B1=[["Mainnet",[["Ethereum","0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"],["Avalanche","0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"],["Optimism","0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85"],["Arbitrum","0xaf88d065e77c8cC2239327C5EDb3A432268e5831"],["Solana","EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"],["Base","0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"],["Polygon","0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359"],["Sui","0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC"],["Aptos","0xbae207659db88bea0cbead6da0ed00aac12edcdda169e591cd41c94180b46f3b"],["Unichain","0x078D782b760474a361dDA0AF3839290b0EF57AD6"]]],["Testnet",[["Sepolia","0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238"],["Avalanche","0x5425890298aed601595a70AB815c96711a31Bc65"],["OptimismSepolia","0x5fd84259d66Cd46123540766Be93DFE6D43130D7"],["ArbitrumSepolia","0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"],["Solana","4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU"],["BaseSepolia","0x036CbD53842c5426634e7929541eC2318f3dCF7e"],["Polygon","0x9999f7Fea5938fD3b1E26A12c3f2fb024e194f97"],["Sui","0xa1ec7fc00a6f40db9693ad1415d0c193ad3906494428cf252621037bd7117e29::usdc::USDC"],["Aptos","0x69091fbab5f7d635ee7ac5098cf0c1efbe31d68fec0f2cd565e8d168daf52832"],["Unichain","0x31d0220469e10c4E71834a79b1f276d740d3768F"]]]],Ts=we(B1),Pc=[["Mainnet",[["Ethereum",0],["Avalanche",1],["Optimism",2],["Arbitrum",3],["Solana",5],["Base",6],["Polygon",7],["Sui",8],["Aptos",9],["Unichain",10]]],["Testnet",[["Sepolia",0],["Avalanche",1],["OptimismSepolia",2],["ArbitrumSepolia",3],["Solana",5],["BaseSepolia",6],["Polygon",7],["Sui",8],["Aptos",9],["Unichain",10]]]],sf=we(Pc,[[0,1],2]),Va=we(Pc,[[0,2],1]),[N6,z6]=yr(Pc),Ga=(n,e)=>sf.has(n,e),md=(n,e)=>Va.has(n,e),bd=(n,e)=>Ts.has(n,e),Di=(n,e)=>{switch(typeof e){case"string":if(Ga(n,e))return e;break;case"number":if(md(n,e))return Va(n,e);break;case"bigint":const t=Number(e);if(md(n,t))return Va(n,t);break}throw Error(`Cannot convert to Chain: ${e}`)},x1=[["Mainnet",[["Solana","worm2ZoG2kUd4vFXhvjh93UUH596ayRfgQ2MgjNMTth"],["Ethereum","0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B"],["Terra","terra1dq03ugtd40zu9hcgdzrsq6z2z4hwhc9tqk2uy5"],["Bsc","0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B"],["Polygon","0x7A4B5a56256163F07b2C80A7cA55aBE66c4ec4d7"],["Avalanche","0x54a8e5f9c4CbA08F9943965859F6c34eAF03E26c"],["Oasis","0xfE8cD454b4A1CA468B57D79c0cc77Ef5B6f64585"],["Algorand","842125965"],["Aurora","0xa321448d90d4e5b0A732867c18eA198e75CAC48E"],["Fantom","0x126783A6Cb203a3E35344528B26ca3a0489a1485"],["Karura","0xa321448d90d4e5b0A732867c18eA198e75CAC48E"],["Acala","0xa321448d90d4e5b0A732867c18eA198e75CAC48E"],["Klaytn","0x0C21603c4f3a6387e241c0091A7EA39E43E90bb7"],["Celo","0xa321448d90d4e5b0A732867c18eA198e75CAC48E"],["Near","contract.wormhole_crypto.near"],["Injective","inj17p9rzwnnfxcjp32un9ug7yhhzgtkhvl9l2q74d"],["Aptos","0x5bc11445584a763c1fa7ed39081f1b920954da14e04b32440cba863d03e19625"],["Sui","0xaeab97f96cf9877fee2883315d459552b2b921edc16d7ceac6eab944dd88919c"],["Moonbeam","0xC8e2b0cD52Cf01b0Ce87d389Daa3d414d4cE29f3"],["Terra2","terra12mrnzvhx3rpej6843uge2yyfppfyd3u9c3uq223q8sl48huz9juqffcnhp"],["Arbitrum","0xa5f208e072434bC67592E4C49C1B991BA79BCA46"],["Optimism","0xEe91C335eab126dF5fDB3797EA9d6aD93aeC9722"],["Gnosis","0xa321448d90d4e5b0A732867c18eA198e75CAC48E"],["Pythnet","H3fxXJ86ADW2PNuDDmZJg6mzTtPxkYCpNuQUTgmJ7AjU"],["Base","0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"],["Xlayer","0x194B123c5E96B9b2E49763619985790Dc241CAC0"],["Xpla","xpla1jn8qmdda5m6f6fqu9qv46rt7ajhklg40ukpqchkejcvy8x7w26cqxamv3w"],["Sei","sei1gjrrme22cyha4ht2xapn3f08zzw6z3d4uxx6fyy9zd5dyr3yxgzqqncdqn"],["Wormchain","wormhole1ufs3tlq4umljk0qfe8k5ya0x6hpavn897u2cnf9k0en9jr7qarqqaqfk2j"],["Neutron","neutron16rerygcpahqcxx5t8vjla46ym8ccn7xz7rtc6ju5ujcd36cmc7zs9zrunh"],["Blast","0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"],["Scroll","0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"],["Mantle","0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"],["Snaxchain","0xc1BA3CC4bFE724A08FbbFbF64F8db196738665f4"],["Berachain","0xCa1D5a146B03f6303baF59e5AD5615ae0b9d146D"],["Unichain","0xCa1D5a146B03f6303baF59e5AD5615ae0b9d146D"],["Worldchain","0xcbcEe4e081464A15d8Ad5f58BB493954421eB506"],["Ink","0xCa1D5a146B03f6303baF59e5AD5615ae0b9d146D"]]],["Testnet",[["Solana","3u8hJUVTA4jH1wYAyUur7FFZVQ8H635K3tSHHF4ssjQ5"],["Ethereum","0x706abc4E45D419950511e474C7B9Ed348A4a716c"],["Terra","terra1pd65m0q9tl3v8znnz5f5ltsfegyzah7g42cx5v"],["Bsc","0x68605AD7b15c732a30b1BbC62BE8F2A509D74b4D"],["Polygon","0x0CBE91CF822c73C2315FB05100C2F714765d5c20"],["Avalanche","0x7bbcE28e64B3F8b84d876Ab298393c38ad7aac4C"],["Oasis","0xc1C338397ffA53a2Eb12A7038b4eeb34791F8aCb"],["Algorand","86525623"],["Aurora","0xBd07292de7b505a4E803CEe286184f7Acf908F5e"],["Fantom","0x1BB3B4119b7BA9dfad76B0545fb3F531383c3bB7"],["Karura","0x64fb09E405D2043ed7785a29E296C766D56F2056"],["Acala","0x64fb09E405D2043ed7785a29E296C766D56F2056"],["Klaytn","0x1830CC6eE66c84D2F177B94D544967c774E624cA"],["Celo","0x88505117CA88e7dd2eC6EA1E13f0948db2D50D56"],["Near","wormhole.wormhole.testnet"],["Injective","inj1xx3aupmgv3ce537c0yce8zzd3sz567syuyedpg"],["Osmosis","osmo1hggkxr0hpw83f8vuft7ruvmmamsxmwk2hzz6nytdkzyup9krt0dq27sgyx"],["Aptos","0x5bc11445584a763c1fa7ed39081f1b920954da14e04b32440cba863d03e19625"],["Sui","0x31358d198147da50db32eda2562951d53973a0c0ad5ed738e9b17d88b213d790"],["Moonbeam","0xa5B7D85a8f27dd7907dc8FdC21FA5657D5E2F901"],["Neon","0x268557122Ffd64c85750d630b716471118F323c8"],["Terra2","terra19nv3xr5lrmmr7egvrk2kqgw4kcn43xrtd5g0mpgwwvhetusk4k7s66jyv0"],["Arbitrum","0xC7A204bDBFe983FCD8d8E61D02b475D4073fF97e"],["Optimism","0x6b9C8671cdDC8dEab9c719bB87cBd3e782bA6a35"],["Gnosis","0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd"],["Pythnet","EUrRARh92Cdc54xrDn6qzaqjA77NRrCcfbr8kPwoTL4z"],["Xpla","xpla1upkjn4mthr0047kahvn0llqx4qpqfn75lnph4jpxfn8walmm8mqsanyy35"],["Base","0x23908A62110e21C04F3A4e011d24F901F911744A"],["Sei","sei1nna9mzp274djrgzhzkac2gvm3j27l402s4xzr08chq57pjsupqnqaj0d5s"],["Sepolia","0x4a8bc80Ed5a4067f1CCf107057b8270E0cC11A78"],["Wormchain","wormhole16jzpxp0e8550c9aht6q9svcux30vtyyyyxv5w2l2djjra46580wsazcjwp"],["ArbitrumSepolia","0x6b9C8671cdDC8dEab9c719bB87cBd3e782bA6a35"],["BaseSepolia","0x79A1027a6A159502049F10906D333EC57E95F083"],["OptimismSepolia","0x31377888146f3253211EFEf5c676D41ECe7D58Fe"],["Holesky","0xa10f2eF61dE1f19f586ab8B6F2EbA89bACE63F7a"],["Neutron","neutron1enf63k37nnv9cugggpm06mg70emcnxgj9p64v2s8yx7a2yhhzk2q6xesk4"],["Mantle","0x376428e7f26D5867e69201b275553C45B09EE090"],["PolygonSepolia","0x6b9C8671cdDC8dEab9c719bB87cBd3e782bA6a35"],["Scroll","0x055F47F1250012C6B20c436570a76e52c17Af2D5"],["Blast","0x473e002D7add6fB67a4964F13bFd61280Ca46886"],["Berachain","0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd"],["Seievm","0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd"],["Snaxchain","0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd"],["Unichain","0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd"],["Worldchain","0xe5E02cD12B6FcA153b0d7fF4bF55730AE7B3C93A"],["Ink","0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd"],["HyperEVM","0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd"],["Xlayer","0xA31aa3FDb7aF7Db93d18DDA4e19F811342EDF780"],["Linea","0x79A1027a6A159502049F10906D333EC57E95F083"],["Monad","0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd"],["Mezo","0x268557122Ffd64c85750d630b716471118F323c8"]]],["Devnet",[["Solana","Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o"],["Ethereum","0xC89Ce4735882C9F0f0FE26686c53074E09B0D550"],["Terra","terra14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9ssrc8au"],["Bsc","0xC89Ce4735882C9F0f0FE26686c53074E09B0D550"],["Algorand","1004"],["Near","wormhole.test.near"],["Aptos","0xde0036a9600559e295d5f6802ef6f3f802f510366e0c23912b0655d972166017"],["Sui","0x5a5160ca3c2037f4b4051344096ef7a48ebf4400b3f385e57ea90e1628a8bde0"],["Terra2","terra14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9ssrc8au"],["Wormchain","wormhole17p9rzwnnfxcjp32un9ug7yhhzgtkhvl9jfksztgw5uh69wac2pgshdnj3k"]]]],of=[["Mainnet",[["Solana","wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb"],["Ethereum","0x3ee18B2214AFF97000D974cf647E7C347E8fa585"],["Terra","terra10nmmwe8r3g99a9newtqa7a75xfgs2e8z87r2sf"],["Bsc","0xB6F6D86a8f9879A9c87f643768d9efc38c1Da6E7"],["Polygon","0x5a58505a96D1dbf8dF91cB21B54419FC36e93fdE"],["Avalanche","0x0e082F06FF657D94310cB8cE8B0D9a04541d8052"],["Oasis","0x5848C791e09901b40A9Ef749f2a6735b418d7564"],["Algorand","842126029"],["Aurora","0x51b5123a7b0F9b2bA265f9c4C8de7D78D52f510F"],["Fantom","0x7C9Fc5741288cDFdD83CeB07f3ea7e22618D79D2"],["Karura","0xae9d7fe007b3327AA64A32824Aaac52C42a6E624"],["Acala","0xae9d7fe007b3327AA64A32824Aaac52C42a6E624"],["Klaytn","0x5b08ac39EAED75c0439FC750d9FE7E1F9dD0193F"],["Celo","0x796Dff6D74F3E27060B71255Fe517BFb23C93eed"],["Near","contract.portalbridge.near"],["Injective","inj1ghd753shjuwexxywmgs4xz7x2q732vcnxxynfn"],["Aptos","0x576410486a2da45eee6c949c995670112ddf2fbeedab20350d506328eefc9d4f"],["Sui","0xc57508ee0d4595e5a8728974a4a93a787d38f339757230d441e895422c07aba9"],["Moonbeam","0xb1731c586ca89a23809861c6103f0b96b3f57d92"],["Terra2","terra153366q50k7t8nn7gec00hg66crnhkdggpgdtaxltaq6xrutkkz3s992fw9"],["Arbitrum","0x0b2402144Bb366A632D14B83F244D2e0e21bD39c"],["Optimism","0x1D68124e65faFC907325e3EDbF8c4d84499DAa8b"],["Base","0x8d2de8d2f73F1F4cAB472AC9A881C9b123C79627"],["Xlayer","0x5537857664B0f9eFe38C9f320F75fEf23234D904"],["Xpla","xpla137w0wfch2dfmz7jl2ap8pcmswasj8kg06ay4dtjzw7tzkn77ufxqfw7acv"],["Sei","sei1smzlm9t79kur392nu9egl8p8je9j92q4gzguewj56a05kyxxra0qy0nuf3"],["Wormchain","wormhole1466nf3zuxpya8q9emxukd7vftaf6h4psr0a07srl5zw74zh84yjq4lyjmh"],["Blast","0x24850c6f61C438823F01B7A3BF2B89B72174Fa9d"],["Scroll","0x24850c6f61C438823F01B7A3BF2B89B72174Fa9d"],["Mantle","0x24850c6f61C438823F01B7A3BF2B89B72174Fa9d"],["Snaxchain","0x8B94bfE456B48a6025b92E11Be393BAa86e68410"],["Berachain","0x3Ff72741fd67D6AD0668d93B41a09248F4700560"],["Unichain","0x3Ff72741fd67D6AD0668d93B41a09248F4700560"],["Worldchain","0xc309275443519adca74c9136b02A38eF96E3a1f6"],["Ink","0x3Ff72741fd67D6AD0668d93B41a09248F4700560"]]],["Testnet",[["Solana","DZnkkTmCiFWfYTfT41X3Rd1kDgozqzxWaHqsw6W4x2oe"],["Ethereum","0xF890982f9310df57d00f659cf4fd87e65adEd8d7"],["Terra","terra1pseddrv0yfsn76u4zxrjmtf45kdlmalswdv39a"],["Bsc","0x9dcF9D205C9De35334D646BeE44b2D2859712A09"],["Polygon","0x377D55a7928c046E18eEbb61977e714d2a76472a"],["Avalanche","0x61E44E506Ca5659E6c0bba9b678586fA2d729756"],["Oasis","0x88d8004A9BdbfD9D28090A02010C19897a29605c"],["Algorand","86525641"],["Aurora","0xD05eD3ad637b890D68a854d607eEAF11aF456fba"],["Fantom","0x599CEa2204B4FaECd584Ab1F2b6aCA137a0afbE8"],["Karura","0xe157115ef34c93145Fec2FE53706846853B07F42"],["Acala","0xe157115ef34c93145Fec2FE53706846853B07F42"],["Klaytn","0xC7A13BE098720840dEa132D860fDfa030884b09A"],["Celo","0x05ca6037eC51F8b712eD2E6Fa72219FEaE74E153"],["Near","token.wormhole.testnet"],["Injective","inj1q0e70vhrv063eah90mu97sazhywmeegp7myvnh"],["Aptos","0x576410486a2da45eee6c949c995670112ddf2fbeedab20350d506328eefc9d4f"],["Sui","0x6fb10cdb7aa299e9a4308752dadecb049ff55a892de92992a1edbd7912b3d6da"],["Moonbeam","0xbc976D4b9D57E57c3cA52e1Fd136C45FF7955A96"],["Neon","0xEe3dB83916Ccdc3593b734F7F2d16D630F39F1D0"],["Terra2","terra1c02vds4uhgtrmcw7ldlg75zumdqxr8hwf7npseuf2h58jzhpgjxsgmwkvk"],["Arbitrum","0x23908A62110e21C04F3A4e011d24F901F911744A"],["ArbitrumSepolia","0xC7A204bDBFe983FCD8d8E61D02b475D4073fF97e"],["Optimism","0xC7A204bDBFe983FCD8d8E61D02b475D4073fF97e"],["OptimismSepolia","0x99737Ec4B815d816c49A385943baf0380e75c0Ac"],["Xpla","xpla1kek6zgdaxcsu35nqfsyvs2t9vs87dqkkq6hjdgczacysjn67vt8sern93x"],["Base","0xA31aa3FDb7aF7Db93d18DDA4e19F811342EDF780"],["BaseSepolia","0x86F55A04690fd7815A3D802bD587e83eA888B239"],["Sei","sei1jv5xw094mclanxt5emammy875qelf3v62u4tl4lp5nhte3w3s9ts9w9az2"],["Sepolia","0xDB5492265f6038831E89f495670FF909aDe94bd9"],["Wormchain","wormhole1aaf9r6s7nxhysuegqrxv0wpm27ypyv4886medd3mrkrw6t4yfcnst3qpex"],["Holesky","0x76d093BbaE4529a342080546cAFEec4AcbA59EC6"],["Mantle","0x75Bfa155a9D7A3714b0861c8a8aF0C4633c45b5D"],["PolygonSepolia","0xC7A204bDBFe983FCD8d8E61D02b475D4073fF97e"],["Scroll","0x22427d90B7dA3fA4642F7025A854c7254E4e45BF"],["Blast","0x430855B4D43b8AEB9D2B9869B74d58dda79C0dB2"],["Xlayer","0xdA91a06299BBF302091B053c6B9EF86Eff0f930D"],["Berachain","0xa10f2eF61dE1f19f586ab8B6F2EbA89bACE63F7a"],["Seievm","0x23908A62110e21C04F3A4e011d24F901F911744A"],["Snaxchain","0xa10f2eF61dE1f19f586ab8B6F2EbA89bACE63F7a"],["Unichain","0xa10f2eF61dE1f19f586ab8B6F2EbA89bACE63F7a"],["Worldchain","0x430855B4D43b8AEB9D2B9869B74d58dda79C0dB2"],["Ink","0x376428e7f26D5867e69201b275553C45B09EE090"],["HyperEVM","0x4a8bc80Ed5a4067f1CCf107057b8270E0cC11A78"],["Linea","0xC7A204bDBFe983FCD8d8E61D02b475D4073fF97e"],["Monad","0xF323dcDe4d33efe83cf455F78F9F6cc656e6B659"],["Mezo","0xA31aa3FDb7aF7Db93d18DDA4e19F811342EDF780"]]],["Devnet",[["Solana","B6RHG3mfcckmrYN1UhmJzyS1XX3fZKbkeUcpJe9Sy3FE"],["Ethereum","0x0290FB167208Af455bB137780163b7B7a9a10C16"],["Terra","terra1nc5tatafv6eyq7llkr2gv50ff9e22mnf70qgjlv737ktmt4eswrquka9l6"],["Bsc","0x0290FB167208Af455bB137780163b7B7a9a10C16"],["Algorand","1006"],["Near","token.test.near"],["Aptos","0x84a5f374d29fc77e370014dce4fd6a55b58ad608de8074b0be5571701724da31"],["Sui","0xa6a3da85bbe05da5bfd953708d56f1a3a023e7fb58e5a824a3d4de3791e8f690"],["Terra2","terra1nc5tatafv6eyq7llkr2gv50ff9e22mnf70qgjlv737ktmt4eswrquka9l6"],["Wormchain","wormhole1ghd753shjuwexxywmgs4xz7x2q732vcnkm6h2pyv9s6ah3hylvrqtm7t3h"]]]],af=[["Mainnet",[["Ethereum","0xcafd2f0a35a4459fa40c0517e17e6fa2939441ca"],["Bsc","0xcafd2f0a35a4459fa40c0517e17e6fa2939441ca"],["Polygon","0xcafd2f0a35a4459fa40c0517e17e6fa2939441ca"],["Avalanche","0xcafd2f0a35a4459fa40c0517e17e6fa2939441ca"],["Fantom","0xcafd2f0a35a4459fa40c0517e17e6fa2939441ca"],["Celo","0xcafd2f0a35a4459fa40c0517e17e6fa2939441ca"],["Sui","0x57f4e0ba41a7045e29d435bc66cc4175f381eb700e6ec16d4fdfe92e5a4dff9f"],["Solana","3vxKRPwUTiEkeUVyoZ9MXFe1V71sRLbLqu1gRYaWmehQ"],["Base","0xaE8dc4a7438801Ec4edC0B035EcCCcF3807F4CC1"],["Moonbeam","0xcafd2f0a35a4459fa40c0517e17e6fa2939441ca"],["Arbitrum","0xaE8dc4a7438801Ec4edC0B035EcCCcF3807F4CC1"],["Optimism","0xaE8dc4a7438801Ec4edC0B035EcCCcF3807F4CC1"]]],["Testnet",[["Ethereum","0x9563a59c15842a6f322b10f69d1dd88b41f2e97b"],["Bsc","0x9563a59c15842a6f322b10f69d1dd88b41f2e97b"],["Polygon","0x9563a59c15842a6f322b10f69d1dd88b41f2e97b"],["Avalanche","0x9563a59c15842a6f322b10f69d1dd88b41f2e97b"],["Fantom","0x9563a59c15842a6f322b10f69d1dd88b41f2e97b"],["Celo","0x9563a59c15842a6f322b10f69d1dd88b41f2e97b"],["Sui","0xb30040e5120f8cb853b691cb6d45981ae884b1d68521a9dc7c3ae881c0031923"],["Base","0xae8dc4a7438801ec4edc0b035eccccf3807f4cc1"],["Moonbeam","0x9563a59c15842a6f322b10f69d1dd88b41f2e97b"],["Solana","3bPRWXqtSfUaCw3S4wdgvypQtsSzcmvDeaqSqPDkncrg"],["Sepolia",""],["ArbitrumSepolia","0xaE8dc4a7438801Ec4edC0B035EcCCcF3807F4CC1"],["OptimismSepolia","0xaE8dc4a7438801Ec4edC0B035EcCCcF3807F4CC1"],["BaseSepolia",""]]]],C1=[["Mainnet",[["Solana","WnFt12ZrnzZrFZkt2xsNsaNWoQribnuQ5B5FrDbwDhD"],["Ethereum","0x6FFd7EdE62328b3Af38FCD61461Bbfc52F5651fE"],["Bsc","0x5a58505a96D1dbf8dF91cB21B54419FC36e93fdE"],["Polygon","0x90BBd86a6Fe93D3bc3ed6335935447E75fAb7fCf"],["Avalanche","0xf7B6737Ca9c4e08aE573F75A97B73D7a813f5De5"],["Oasis","0x04952D522Ff217f40B5Ef3cbF659EcA7b952a6c1"],["Aurora","0x6dcC0484472523ed9Cdc017F711Bcbf909789284"],["Fantom","0xA9c7119aBDa80d4a4E0C06C8F4d8cF5893234535"],["Karura","0xb91e3638F82A1fACb28690b37e3aAE45d2c33808"],["Acala","0xb91e3638F82A1fACb28690b37e3aAE45d2c33808"],["Klaytn","0x3c3c561757BAa0b78c5C025CdEAa4ee24C1dFfEf"],["Celo","0xA6A377d75ca5c9052c9a77ED1e865Cc25Bd97bf3"],["Aptos","0x1bdffae984043833ed7fe223f7af7a3f8902d04129b14f801823e64827da7130"],["Moonbeam","0x453cfbe096c0f8d763e8c5f24b441097d577bde2"],["Arbitrum","0x3dD14D553cFD986EAC8e3bddF629d82073e188c8"],["Base","0xDA3adC6621B2677BEf9aD26598e6939CF0D92f88"],["Optimism","0xfE8cD454b4A1CA468B57D79c0cc77Ef5B6f64585"]]],["Testnet",[["Solana","2rHhojZ7hpu1zA91nvZmT8TqWWvMcKmmNBCr2mKTtMq4"],["Ethereum","0xD8E4C2DbDd2e2bd8F1336EA691dBFF6952B1a6eB"],["Bsc","0xcD16E5613EF35599dc82B24Cb45B5A93D779f1EE"],["Polygon","0x51a02d0dcb5e52F5b92bdAA38FA013C91c7309A9"],["Avalanche","0xD601BAf2EEE3C028344471684F6b27E789D9075D"],["Oasis","0xC5c25B41AB0b797571620F5204Afa116A44c0ebA"],["Aurora","0x8F399607E9BA2405D87F5f3e1B78D950b44b2e24"],["Fantom","0x63eD9318628D26BdCB15df58B53BB27231D1B227"],["Klaytn","0x94c994fC51c13101062958b567e743f1a04432dE"],["Celo","0xaCD8190F647a31E56A656748bC30F69259f245Db"],["Moonbeam","0x98A0F4B96972b32Fcb3BD03cAeB66A44a6aB9Edb"],["Neon","0x66E5BcFD45D2F3f166c567ADa663f9d2ffb292B4"],["Arbitrum","0xEe3dB83916Ccdc3593b734F7F2d16D630F39F1D0"],["Optimism","0x23908A62110e21C04F3A4e011d24F901F911744A"],["Base","0xF681d1cc5F25a3694E348e7975d7564Aa581db59"],["Sepolia","0x6a0B52ac198e4870e5F3797d5B403838a5bbFD99"],["Aptos","0x1bdffae984043833ed7fe223f7af7a3f8902d04129b14f801823e64827da7130"],["ArbitrumSepolia","0x23908A62110e21C04F3A4e011d24F901F911744A"],["BaseSepolia","0x268557122Ffd64c85750d630b716471118F323c8"],["OptimismSepolia","0x27812285fbe85BA1DF242929B906B31EE3dd1b9f"],["Holesky","0xc8941d483c45eF8FB72E4d1F9dDE089C95fF8171"],["PolygonSepolia","0x23908A62110e21C04F3A4e011d24F901F911744A"],["Mantle","0xD7D732C8Bf5eBF620EA55b5828eae20418eEF083"],["Scroll","0x47B9a1406BEe29a3001BFEB7e45aE45fFFB40c18"]]],["Devnet",[["Solana","NFTWqJR8YnRVqPDvTJrYuLrQDitTG5AScqbeghi4zSA"],["Ethereum","0x26b4afb60d6c903165150c6f0aa14f8016be4aec"],["Terra","terra1plju286nnfj3z54wgcggd4enwaa9fgf5kgrgzl"],["Bsc","0x26b4afb60d6c903165150c6f0aa14f8016be4aec"],["Aptos","0x46da3d4c569388af61f951bdd1153f4c875f90c2991f6b2d0a38e2161a40852c"]]]],S1=[["Mainnet",[["Ethereum","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Bsc","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Polygon","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Avalanche","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Fantom","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Klaytn","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Celo","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Moonbeam","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Base","0x706f82e9bb5b0813501714ab5974216704980e31"],["Arbitrum","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Optimism","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Blast","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Scroll","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Mantle","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Xlayer","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Berachain","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Ink","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Worldchain","0x1520cc9e779c56dab5866bebfb885c86840c33d3"],["Snaxchain","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Unichain","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"]]],["Testnet",[["Ethereum","0x28D8F1Be96f97C1387e94A53e00eCcFb4E75175a"],["Bsc","0x80aC94316391752A193C1c47E27D382b507c93F3"],["Polygon","0x0591C25ebd0580E0d4F27A82Fc2e24E7489CB5e0"],["Avalanche","0xA3cF45939bD6260bcFe3D66bc73d60f19e49a8BB"],["Fantom","0x7B1bD7a6b4E61c2a123AC6BC2cbfC614437D0470"],["Celo","0x306B68267Deb7c5DfCDa3619E22E9Ca39C374f84"],["Seievm","0x362fca37E45fe1096b42021b543f462D49a5C8df"],["Moonbeam","0x0591C25ebd0580E0d4F27A82Fc2e24E7489CB5e0"],["Arbitrum","0xAd753479354283eEE1b86c9470c84D42f229FF43"],["Optimism","0x01A957A525a5b7A72808bA9D10c389674E459891"],["Base","0xea8029CD7FCAEFFcD1F53686430Db0Fc8ed384E1"],["Sepolia","0x7B1bD7a6b4E61c2a123AC6BC2cbfC614437D0470"],["ArbitrumSepolia","0x7B1bD7a6b4E61c2a123AC6BC2cbfC614437D0470"],["BaseSepolia","0x93BAD53DDfB6132b0aC8E37f6029163E63372cEE"],["OptimismSepolia","0x93BAD53DDfB6132b0aC8E37f6029163E63372cEE"],["Berachain","0x362fca37E45fe1096b42021b543f462D49a5C8df"],["Unichain","0x362fca37E45fe1096b42021b543f462D49a5C8df"],["Ink","0x362fca37E45fe1096b42021b543f462D49a5C8df"],["Monad","0x362fca37E45fe1096b42021b543f462D49a5C8df"]]],["Devnet",[["Ethereum","0xcC680D088586c09c3E0E099a676FA4b6e42467b4"],["Bsc","0xcC680D088586c09c3E0E099a676FA4b6e42467b4"]]]],cf=[["Mainnet",[["Ethereum",{tokenMessenger:"0xbd3fa81b58ba92a82136038b25adec7066af3155",messageTransmitter:"0x0a992d191deec32afe36203ad87d7d289a738f81",wormholeRelayer:"0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2",wormhole:"0xAaDA05BD399372f0b0463744C09113c137636f6a"}],["Avalanche",{tokenMessenger:"0x6b25532e1060ce10cc3b0a99e5683b91bfde6982",messageTransmitter:"0x8186359af5f57fbb40c6b14a588d2a59c0c29880",wormholeRelayer:"0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2",wormhole:"0x09Fb06A271faFf70A651047395AaEb6265265F13"}],["Optimism",{tokenMessenger:"0x2B4069517957735bE00ceE0fadAE88a26365528f",messageTransmitter:"0x4d41f22c5a0e5c74090899e5a8fb597a8842b3e8",wormholeRelayer:"0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2",wormhole:"0x2703483B1a5a7c577e8680de9Df8Be03c6f30e3c"}],["Arbitrum",{tokenMessenger:"0x19330d10D9Cc8751218eaf51E8885D058642E08A",messageTransmitter:"0xC30362313FBBA5cf9163F0bb16a0e01f01A896ca",wormholeRelayer:"0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2",wormhole:"0x2703483B1a5a7c577e8680de9Df8Be03c6f30e3c"}],["Base",{tokenMessenger:"0x1682Ae6375C4E4A97e4B583BC394c861A46D8962",messageTransmitter:"0xAD09780d193884d503182aD4588450C416D6F9D4",wormholeRelayer:"0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2",wormhole:"0x03faBB06Fa052557143dC28eFCFc63FC12843f1D"}],["Solana",{tokenMessenger:"CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3",messageTransmitter:"CCTPmbSD7gX1bxKPAmg77w8oFzNFpaQiQUWD43TKaecd",wormholeRelayer:"",wormhole:""}],["Polygon",{tokenMessenger:"0x9daF8c91AEFAE50b9c0E69629D3F6Ca40cA3B3FE",messageTransmitter:"0xF3be9355363857F3e001be68856A2f96b4C39Ba9",wormholeRelayer:"0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2",wormhole:"0x0FF28217dCc90372345954563486528aa865cDd6"}],["Sui",{tokenMessenger:"0x2aa6c5d56376c371f88a6cc42e852824994993cb9bab8d3e6450cbe3cb32b94e",messageTransmitter:"0x08d87d37ba49e785dde270a83f8e979605b03dc552b5548f26fdf2f49bf7ed1b",wormholeRelayer:"",wormhole:""}],["Aptos",{tokenMessenger:"0x9e6702a472080ea3caaf6ba9dfaa6effad2290a9ba9adaacd5af5c618e42782d",messageTransmitter:"0x177e17751820e4b4371873ca8c30279be63bdea63b88ed0f2239c2eea10f1772",wormholeRelayer:"",wormhole:""}],["Unichain",{tokenMessenger:"0x4e744b28E787c3aD0e810eD65A24461D4ac5a762",messageTransmitter:"0x353bE9E2E38AB1D19104534e4edC21c643Df86f4",wormholeRelayer:"",wormhole:""}]]],["Testnet",[["Sepolia",{tokenMessenger:"0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5",messageTransmitter:"0x7865fAfC2db2093669d92c0F33AeEF291086BEFD",wormholeRelayer:"0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2",wormhole:"0x2703483B1a5a7c577e8680de9Df8Be03c6f30e3c"}],["Avalanche",{tokenMessenger:"0xeb08f243e5d3fcff26a9e38ae5520a669f4019d0",messageTransmitter:"0xa9fb1b3009dcb79e2fe346c16a604b8fa8ae0a79",wormholeRelayer:"0x774a70bbd03327c21460b60f25b677d9e46ab458",wormhole:"0x58f4c17449c90665891c42e14d34aae7a26a472e"}],["OptimismSepolia",{tokenMessenger:"0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5",messageTransmitter:"0x7865fAfC2db2093669d92c0F33AeEF291086BEFD",wormholeRelayer:"0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2",wormhole:"0x2703483B1a5a7c577e8680de9Df8Be03c6f30e3c"}],["ArbitrumSepolia",{tokenMessenger:"0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5",messageTransmitter:"0xaCF1ceeF35caAc005e15888dDb8A3515C41B4872",wormholeRelayer:"0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2",wormhole:"0x2703483B1a5a7c577e8680de9Df8Be03c6f30e3c"}],["Solana",{tokenMessenger:"CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3",messageTransmitter:"CCTPmbSD7gX1bxKPAmg77w8oFzNFpaQiQUWD43TKaecd",wormholeRelayer:"",wormhole:""}],["BaseSepolia",{tokenMessenger:"0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5",messageTransmitter:"0x7865fAfC2db2093669d92c0F33AeEF291086BEFD",wormholeRelayer:"0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2",wormhole:"0x2703483B1a5a7c577e8680de9Df8Be03c6f30e3c"}],["Polygon",{tokenMessenger:"0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5",messageTransmitter:"0xe09A679F56207EF33F5b9d8fb4499Ec00792eA73",wormholeRelayer:"0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2",wormhole:"0x2703483B1a5a7c577e8680de9Df8Be03c6f30e3c"}],["Sui",{tokenMessenger:"0x31cc14d80c175ae39777c0238f20594c6d4869cfab199f40b69f3319956b8beb",messageTransmitter:"0x4931e06dce648b3931f890035bd196920770e913e43e45990b383f6486fdd0a5",wormholeRelayer:"",wormhole:""}],["Aptos",{tokenMessenger:"0x5f9b937419dda90aa06c1836b7847f65bbbe3f1217567758dc2488be31a477b9",messageTransmitter:"0x081e86cebf457a0c6004f35bd648a2794698f52e0dde09a48619dcd3d4cc23d9",wormholeRelayer:"",wormhole:""}],["Unichain",{tokenMessenger:"0x8ed94B8dAd2Dc5453862ea5e316A8e71AAed9782",messageTransmitter:"0xbc498c326533d675cf571B90A2Ced265ACb7d086",wormholeRelayer:"",wormhole:""}]]]],D1=[["Mainnet",[["Wormchain","wormhole14ejqjyq8um4p3xfqj74yld5waqljf88fz25yxnma0cngspxe3les00fpjx"]]],["Testnet",[["Wormchain","wormhole1ctnjk7an90lz5wjfvr3cf6x984a8cjnv8dpmztmlpcq4xteaa2xs9pwmzk"]]]],v1=[["Mainnet",[["Sei","sei189adguawugk3e55zn63z8r9ll29xrjwca636ra7v7gxuzn98sxyqwzt47l"]]],["Testnet",[["Sei","sei1dkdwdvknx0qav5cp5kw68mkn3r99m3svkyjfvkztwh97dv2lm0ksj6xrak"]]]],k1=[["Mainnet",[["Polygon",["Ethereum","0x86E4Dc95c7FBdBf52e33D563BbDB00823894C287"]],["Optimism",["Ethereum","0xdfe97868233d1aa22e815a266982f2cf17685a27"]],["Arbitrum",["Ethereum","0x1c479675ad559dc151f6ec7ed3fbf8cee79582b6"]]]],["Testnet",[["Polygon",["Ethereum","0x2890ba17efe978480615e330ecb65333b880928e"]],["Optimism",["Ethereum","0xe6dfba0953616bacab0c9a8ecb3a9bba77fc15c0"]],["Arbitrum",["Ethereum","0x45af9ed1d03703e480ce7d328fb684bb67da5049"]]]]],lf=[["Mainnet",[["Ethereum",{porticoUniswap:"0x48b6101128C0ed1E208b7C910e60542A2ee6f476",uniswapQuoterV2:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",porticoPancakeSwap:"0x4db1683d60e0a933A9A477a19FA32F472bB9d06e",pancakeSwapQuoterV2:"0xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997"}],["Polygon",{porticoUniswap:"0x227bABe533fa9a1085f5261210E0B7137E44437B",uniswapQuoterV2:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",porticoPancakeSwap:void 0,pancakeSwapQuoterV2:void 0}],["Bsc",{porticoUniswap:"0x05498574BD0Fa99eeCB01e1241661E7eE58F8a85",uniswapQuoterV2:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",porticoPancakeSwap:"0xF352DC165783538A26e38A536e76DceF227d90F2",pancakeSwapQuoterV2:"0xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997"}],["Avalanche",{porticoUniswap:"0xE565E118e75304dD3cF83dff409c90034b7EA18a",uniswapQuoterV2:"0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",porticoPancakeSwap:void 0,pancakeSwapQuoterV2:void 0}],["Arbitrum",{porticoUniswap:"0x48fa7528bFD6164DdF09dF0Ed22451cF59c84130",uniswapQuoterV2:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",porticoPancakeSwap:"0xE70946692E2e56ae47BfAe2d93d31bd60952B090",pancakeSwapQuoterV2:"0xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997"}],["Optimism",{porticoUniswap:"0x9ae506cDDd27DEe1275fd1fe6627E5dc65257061",uniswapQuoterV2:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",porticoPancakeSwap:void 0,pancakeSwapQuoterV2:void 0}],["Base",{porticoUniswap:"0x610d4DFAC3EC32e0be98D18DDb280DACD76A1889",uniswapQuoterV2:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",porticoPancakeSwap:"0x4568aa1eA0ED54db666c58B4526B3FC9BD9be9bf",pancakeSwapQuoterV2:"0xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997"}],["Celo",{porticoUniswap:"0xE565E118e75304dD3cF83dff409c90034b7EA18a",uniswapQuoterV2:"0x82825d0554fA07f7FC52Ab63c961F330fdEFa8E8",porticoPancakeSwap:void 0,pancakeSwapQuoterV2:void 0}]]]],F1=[["Mainnet",[["Solana","87MEvHZCXE3ML5rrmh5uX1FbShHmRXXS32xJDGbQ7h5t"],["Polygon","0x09959798B95d00a3183d20FaC298E4594E599eab"],["Arbitrum","0x1293a54e160D1cd7075487898d65266081A15458"],["Optimism","0x1293a54e160D1cd7075487898d65266081A15458"],["Base","0x09959798B95d00a3183d20FaC298E4594E599eab"]]]],T1=we(x1),I1=we(of),U1=we(af),_1=we(C1),M1=we(S1),pd=we(D1),gd=we(v1),yd=we(lf),vi=we(F1),Ya=we(cf);we(k1);const R1=we(of,[0,1]),W1=we(af,[0,1]),P1=we(cf,[0,1]),L1=we(lf,[0,1]),Lc=[["Mainnet",[["0x58CC3AE5C097b213cE3c81979e1B9f9570746AA5","JumpCrypto"],["0xfF6CB952589BDE862c25Ef4392132fb9D4A42157","Staked"],["0x114De8460193bdf3A2fCf81f86a09765F4762fD1","Figment"],["0x107A0086b32d7A0977926A205131d8731D39cbEB","ChainodeTech"],["0x8C82B2fd82FaeD2711d59AF0F2499D16e726f6b2","Inotel"],["0x11b39756C042441BE6D8650b69b54EbE715E2343","HashQuark"],["0x54Ce5B4D348fb74B958e8966e2ec3dBd4958a7cd","Chainlayer"],["0x15e7cAF07C4e3DC8e7C469f92C8Cd88FB8005a20","xLabs"],["0x74a3bf913953D695260D88BC1aA25A4eeE363ef0","Forbole"],["0x000aC0076727b35FBea2dAc28fEE5cCB0fEA768e","StakingFund"],["0xAF45Ced136b9D9e24903464AE889F5C8a723FC14","MoonletWallet"],["0xf93124b7c738843CBB89E864c862c38cddCccF95","P2PValidator"],["0xD2CC37A4dc036a8D232b48f62cDD4731412f4890","01Node"],["0xDA798F6896A3331F64b48c12D1D57Fd9cbe70811","MCF"],["0x71AA1BE1D36CaFE3867910F99C09e347899C19C3","Everstake"],["0x8192b6E7387CCd768277c17DAb1b7a5027c0b3Cf","ChorusOne"],["0x178e21ad2E77AE06711549CFBB1f9c7a9d8096e8","Syncnode"],["0x5E1487F35515d02A92753504a8D75471b9f49EdB","Triton"],["0x6FbEBc898F403E4773E95feB15E80C9A99c8348d","StakingFacilities"]]],["Testnet",[["0x13947Bd48b18E53fdAeEe77F3473391aC727C638","Testnet guardian"]]]],[H6,q6]=Fm(yr(Ri(Lc)),[1,2]);we(Lc,[[0,2],1]);we(Lc,[1,[0,2]]);const Oc=5,O1=[["Mainnet",[["Ethereum","0x18084fbA666a33d37592fA2633fD49a74DD93a88"],["Solana","6DNSN2BJsaPFdFFc1zP37kkeNe4Usc1Sqkzr9C9vPWcU"],["Polygon","0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b"],["Arbitrum","0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40"],["Optimism","0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40"],["Base","0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b"]]]],N1=we(O1),zr=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function z1(n){return n instanceof Uint8Array||ArrayBuffer.isView(n)&&n.constructor.name==="Uint8Array"}function Yr(n){if(!Number.isSafeInteger(n)||n<0)throw new Error("positive integer expected, got "+n)}function Fn(n,...e){if(!z1(n))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(n.length))throw new Error("Uint8Array expected of length "+e+", got length="+n.length)}function df(n){if(typeof n!="function"||typeof n.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");Yr(n.outputLen),Yr(n.blockLen)}function Fr(n,e=!0){if(n.destroyed)throw new Error("Hash instance has been destroyed");if(e&&n.finished)throw new Error("Hash#digest() has already been called")}function Nc(n,e){Fn(n);const t=e.outputLen;if(n.length<t)throw new Error("digestInto() expects output buffer of length at least "+t)}function uf(n){return new Uint32Array(n.buffer,n.byteOffset,Math.floor(n.byteLength/4))}function $n(...n){for(let e=0;e<n.length;e++)n[e].fill(0)}function ki(n){return new DataView(n.buffer,n.byteOffset,n.byteLength)}function mn(n,e){return n<<32-e|n>>>e}function H1(n,e){return n<<e|n>>>32-e>>>0}const ff=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function hf(n){return n<<24&4278190080|n<<8&16711680|n>>>8&65280|n>>>24&255}const q1=ff?n=>n:n=>hf(n);function K1(n){for(let e=0;e<n.length;e++)n[e]=hf(n[e]);return n}const Xa=ff?n=>n:K1,mf=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",j1=Array.from({length:256},(n,e)=>e.toString(16).padStart(2,"0"));function $1(n){if(Fn(n),mf)return n.toHex();let e="";for(let t=0;t<n.length;t++)e+=j1[n[t]];return e}const Pn={_0:48,_9:57,A:65,F:70,a:97,f:102};function Ad(n){if(n>=Pn._0&&n<=Pn._9)return n-Pn._0;if(n>=Pn.A&&n<=Pn.F)return n-(Pn.A-10);if(n>=Pn.a&&n<=Pn.f)return n-(Pn.a-10)}function V1(n){if(typeof n!="string")throw new Error("hex string expected, got "+typeof n);if(mf)return Uint8Array.fromHex(n);const e=n.length,t=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const r=new Uint8Array(t);for(let s=0,i=0;s<t;s++,i+=2){const o=Ad(n.charCodeAt(i)),a=Ad(n.charCodeAt(i+1));if(o===void 0||a===void 0){const c=n[i]+n[i+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+i)}r[s]=o*16+a}return r}function zc(n){if(typeof n!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(n))}function as(n){return typeof n=="string"&&(n=zc(n)),Fn(n),n}function G1(n){return typeof n=="string"&&(n=zc(n)),Fn(n),n}function bf(...n){let e=0;for(let r=0;r<n.length;r++){const s=n[r];Fn(s),e+=s.length}const t=new Uint8Array(e);for(let r=0,s=0;r<n.length;r++){const i=n[r];t.set(i,s),s+=i.length}return t}function Y1(n,e){if(e!==void 0&&{}.toString.call(e)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(n,e)}let uo=class{};function Js(n){const e=r=>n().update(as(r)).digest(),t=n();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>n(),e}function X1(n){const e=(r,s)=>n(s).update(as(r)).digest(),t=n({});return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=r=>n(r),e}function Hc(n=32){if(zr&&typeof zr.getRandomValues=="function")return zr.getRandomValues(new Uint8Array(n));if(zr&&typeof zr.randomBytes=="function")return Uint8Array.from(zr.randomBytes(n));throw new Error("crypto.getRandomValues must be defined")}function Z1(n,e,t,r){if(typeof n.setBigUint64=="function")return n.setBigUint64(e,t,r);const s=BigInt(32),i=BigInt(4294967295),o=Number(t>>s&i),a=Number(t&i),c=r?4:0,h=r?0:4;n.setUint32(e+c,o,r),n.setUint32(e+h,a,r)}function J1(n,e,t){return n&e^~n&t}function Q1(n,e,t){return n&e^n&t^e&t}class qc extends uo{constructor(e,t,r,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=s,this.buffer=new Uint8Array(e),this.view=ki(this.buffer)}update(e){Fr(this),e=as(e),Fn(e);const{view:t,buffer:r,blockLen:s}=this,i=e.length;for(let o=0;o<i;){const a=Math.min(s-this.pos,i-o);if(a===s){const c=ki(e);for(;s<=i-o;o+=s)this.process(c,o);continue}r.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===s&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Fr(this),Nc(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:s,isLE:i}=this;let{pos:o}=this;t[o++]=128,$n(this.buffer.subarray(o)),this.padOffset>s-o&&(this.process(r,0),o=0);for(let w=o;w<s;w++)t[w]=0;Z1(r,s-8,BigInt(this.length*8),i),this.process(r,0);const a=ki(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const h=c/4,b=this.get();if(h>b.length)throw new Error("_sha2: outputLen bigger than state");for(let w=0;w<h;w++)a.setUint32(4*w,b[w],i)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:s,finished:i,destroyed:o,pos:a}=this;return e.destroyed=o,e.finished=i,e.length=s,e.pos=a,s%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}}const Gn=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ut=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),fi=BigInt(2**32-1),wd=BigInt(32);function pf(n,e=!1){return e?{h:Number(n&fi),l:Number(n>>wd&fi)}:{h:Number(n>>wd&fi)|0,l:Number(n&fi)|0}}function gf(n,e=!1){const t=n.length;let r=new Uint32Array(t),s=new Uint32Array(t);for(let i=0;i<t;i++){const{h:o,l:a}=pf(n[i],e);[r[i],s[i]]=[o,a]}return[r,s]}const Ed=(n,e,t)=>n>>>t,Bd=(n,e,t)=>n<<32-t|e>>>t,dr=(n,e,t)=>n>>>t|e<<32-t,ur=(n,e,t)=>n<<32-t|e>>>t,Ss=(n,e,t)=>n<<64-t|e>>>t-32,Ds=(n,e,t)=>n>>>t-32|e<<64-t,eb=(n,e)=>e,tb=(n,e)=>n,nb=(n,e,t)=>n<<t|e>>>32-t,rb=(n,e,t)=>e<<t|n>>>32-t,sb=(n,e,t)=>e<<t-32|n>>>64-t,ib=(n,e,t)=>n<<t-32|e>>>64-t;function pn(n,e,t,r){const s=(e>>>0)+(r>>>0);return{h:n+t+(s/2**32|0)|0,l:s|0}}const yf=(n,e,t)=>(n>>>0)+(e>>>0)+(t>>>0),Af=(n,e,t,r)=>e+t+r+(n/2**32|0)|0,ob=(n,e,t,r)=>(n>>>0)+(e>>>0)+(t>>>0)+(r>>>0),ab=(n,e,t,r,s)=>e+t+r+s+(n/2**32|0)|0,cb=(n,e,t,r,s)=>(n>>>0)+(e>>>0)+(t>>>0)+(r>>>0)+(s>>>0),lb=(n,e,t,r,s,i)=>e+t+r+s+i+(n/2**32|0)|0,db=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Yn=new Uint32Array(64);class ub extends qc{constructor(e=32){super(64,e,8,!1),this.A=Gn[0]|0,this.B=Gn[1]|0,this.C=Gn[2]|0,this.D=Gn[3]|0,this.E=Gn[4]|0,this.F=Gn[5]|0,this.G=Gn[6]|0,this.H=Gn[7]|0}get(){const{A:e,B:t,C:r,D:s,E:i,F:o,G:a,H:c}=this;return[e,t,r,s,i,o,a,c]}set(e,t,r,s,i,o,a,c){this.A=e|0,this.B=t|0,this.C=r|0,this.D=s|0,this.E=i|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,t){for(let w=0;w<16;w++,t+=4)Yn[w]=e.getUint32(t,!1);for(let w=16;w<64;w++){const D=Yn[w-15],E=Yn[w-2],g=mn(D,7)^mn(D,18)^D>>>3,S=mn(E,17)^mn(E,19)^E>>>10;Yn[w]=S+Yn[w-7]+g+Yn[w-16]|0}let{A:r,B:s,C:i,D:o,E:a,F:c,G:h,H:b}=this;for(let w=0;w<64;w++){const D=mn(a,6)^mn(a,11)^mn(a,25),E=b+D+J1(a,c,h)+db[w]+Yn[w]|0,S=(mn(r,2)^mn(r,13)^mn(r,22))+Q1(r,s,i)|0;b=h,h=c,c=a,a=o+E|0,o=i,i=s,s=r,r=E+S|0}r=r+this.A|0,s=s+this.B|0,i=i+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,h=h+this.G|0,b=b+this.H|0,this.set(r,s,i,o,a,c,h,b)}roundClean(){$n(Yn)}destroy(){this.set(0,0,0,0,0,0,0,0),$n(this.buffer)}}const wf=gf(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(n=>BigInt(n))),fb=wf[0],hb=wf[1],Xn=new Uint32Array(80),Zn=new Uint32Array(80);class Ef extends qc{constructor(e=64){super(128,e,16,!1),this.Ah=Ut[0]|0,this.Al=Ut[1]|0,this.Bh=Ut[2]|0,this.Bl=Ut[3]|0,this.Ch=Ut[4]|0,this.Cl=Ut[5]|0,this.Dh=Ut[6]|0,this.Dl=Ut[7]|0,this.Eh=Ut[8]|0,this.El=Ut[9]|0,this.Fh=Ut[10]|0,this.Fl=Ut[11]|0,this.Gh=Ut[12]|0,this.Gl=Ut[13]|0,this.Hh=Ut[14]|0,this.Hl=Ut[15]|0}get(){const{Ah:e,Al:t,Bh:r,Bl:s,Ch:i,Cl:o,Dh:a,Dl:c,Eh:h,El:b,Fh:w,Fl:D,Gh:E,Gl:g,Hh:S,Hl:T}=this;return[e,t,r,s,i,o,a,c,h,b,w,D,E,g,S,T]}set(e,t,r,s,i,o,a,c,h,b,w,D,E,g,S,T){this.Ah=e|0,this.Al=t|0,this.Bh=r|0,this.Bl=s|0,this.Ch=i|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=h|0,this.El=b|0,this.Fh=w|0,this.Fl=D|0,this.Gh=E|0,this.Gl=g|0,this.Hh=S|0,this.Hl=T|0}process(e,t){for(let _=0;_<16;_++,t+=4)Xn[_]=e.getUint32(t),Zn[_]=e.getUint32(t+=4);for(let _=16;_<80;_++){const U=Xn[_-15]|0,L=Zn[_-15]|0,H=dr(U,L,1)^dr(U,L,8)^Ed(U,L,7),K=ur(U,L,1)^ur(U,L,8)^Bd(U,L,7),V=Xn[_-2]|0,ee=Zn[_-2]|0,re=dr(V,ee,19)^Ss(V,ee,61)^Ed(V,ee,6),$=ur(V,ee,19)^Ds(V,ee,61)^Bd(V,ee,6),ie=ob(K,$,Zn[_-7],Zn[_-16]),F=ab(ie,H,re,Xn[_-7],Xn[_-16]);Xn[_]=F|0,Zn[_]=ie|0}let{Ah:r,Al:s,Bh:i,Bl:o,Ch:a,Cl:c,Dh:h,Dl:b,Eh:w,El:D,Fh:E,Fl:g,Gh:S,Gl:T,Hh:M,Hl:N}=this;for(let _=0;_<80;_++){const U=dr(w,D,14)^dr(w,D,18)^Ss(w,D,41),L=ur(w,D,14)^ur(w,D,18)^Ds(w,D,41),H=w&E^~w&S,K=D&g^~D&T,V=cb(N,L,K,hb[_],Zn[_]),ee=lb(V,M,U,H,fb[_],Xn[_]),re=V|0,$=dr(r,s,28)^Ss(r,s,34)^Ss(r,s,39),ie=ur(r,s,28)^Ds(r,s,34)^Ds(r,s,39),F=r&i^r&a^i&a,l=s&o^s&c^o&c;M=S|0,N=T|0,S=E|0,T=g|0,E=w|0,g=D|0,{h:w,l:D}=pn(h|0,b|0,ee|0,re|0),h=a|0,b=c|0,a=i|0,c=o|0,i=r|0,o=s|0;const m=yf(re,ie,l);r=Af(m,ee,$,F),s=m|0}({h:r,l:s}=pn(this.Ah|0,this.Al|0,r|0,s|0)),{h:i,l:o}=pn(this.Bh|0,this.Bl|0,i|0,o|0),{h:a,l:c}=pn(this.Ch|0,this.Cl|0,a|0,c|0),{h,l:b}=pn(this.Dh|0,this.Dl|0,h|0,b|0),{h:w,l:D}=pn(this.Eh|0,this.El|0,w|0,D|0),{h:E,l:g}=pn(this.Fh|0,this.Fl|0,E|0,g|0),{h:S,l:T}=pn(this.Gh|0,this.Gl|0,S|0,T|0),{h:M,l:N}=pn(this.Hh|0,this.Hl|0,M|0,N|0),this.set(r,s,i,o,a,c,h,b,w,D,E,g,S,T,M,N)}roundClean(){$n(Xn,Zn)}destroy(){$n(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const _t=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class mb extends Ef{constructor(){super(32),this.Ah=_t[0]|0,this.Al=_t[1]|0,this.Bh=_t[2]|0,this.Bl=_t[3]|0,this.Ch=_t[4]|0,this.Cl=_t[5]|0,this.Dh=_t[6]|0,this.Dl=_t[7]|0,this.Eh=_t[8]|0,this.El=_t[9]|0,this.Fh=_t[10]|0,this.Fl=_t[11]|0,this.Gh=_t[12]|0,this.Gl=_t[13]|0,this.Hh=_t[14]|0,this.Hl=_t[15]|0}}const Kc=Js(()=>new ub),jc=Js(()=>new Ef),bb=Js(()=>new mb),Ni=Kc,pb=BigInt(0),ws=BigInt(1),gb=BigInt(2),yb=BigInt(7),Ab=BigInt(256),wb=BigInt(113),Bf=[],xf=[],Cf=[];for(let n=0,e=ws,t=1,r=0;n<24;n++){[t,r]=[r,(2*t+3*r)%5],Bf.push(2*(5*r+t)),xf.push((n+1)*(n+2)/2%64);let s=pb;for(let i=0;i<7;i++)e=(e<<ws^(e>>yb)*wb)%Ab,e&gb&&(s^=ws<<(ws<<BigInt(i))-ws);Cf.push(s)}const Sf=gf(Cf,!0),Eb=Sf[0],Bb=Sf[1],xd=(n,e,t)=>t>32?sb(n,e,t):nb(n,e,t),Cd=(n,e,t)=>t>32?ib(n,e,t):rb(n,e,t);function xb(n,e=24){const t=new Uint32Array(10);for(let r=24-e;r<24;r++){for(let o=0;o<10;o++)t[o]=n[o]^n[o+10]^n[o+20]^n[o+30]^n[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,h=t[c],b=t[c+1],w=xd(h,b,1)^t[a],D=Cd(h,b,1)^t[a+1];for(let E=0;E<50;E+=10)n[o+E]^=w,n[o+E+1]^=D}let s=n[2],i=n[3];for(let o=0;o<24;o++){const a=xf[o],c=xd(s,i,a),h=Cd(s,i,a),b=Bf[o];s=n[b],i=n[b+1],n[b]=c,n[b+1]=h}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)t[a]=n[o+a];for(let a=0;a<10;a++)n[o+a]^=~t[(a+2)%10]&t[(a+4)%10]}n[0]^=Eb[r],n[1]^=Bb[r]}$n(t)}let Cb=class Df extends uo{constructor(e,t,r,s=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=s,this.rounds=i,Yr(r),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=uf(this.state)}clone(){return this._cloneInto()}keccak(){Xa(this.state32),xb(this.state32,this.rounds),Xa(this.state32),this.posOut=0,this.pos=0}update(e){Fr(this),e=as(e),Fn(e);const{blockLen:t,state:r}=this,s=e.length;for(let i=0;i<s;){const o=Math.min(t-this.pos,s-i);for(let a=0;a<o;a++)r[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:s}=this;e[r]^=t,t&128&&r===s-1&&this.keccak(),e[s-1]^=128,this.keccak()}writeInto(e){Fr(this,!1),Fn(e),this.finish();const t=this.state,{blockLen:r}=this;for(let s=0,i=e.length;s<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-s);e.set(t.subarray(this.posOut,this.posOut+o),s),this.posOut+=o,s+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Yr(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Nc(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,$n(this.state)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:s,rounds:i,enableXOF:o}=this;return e||(e=new Df(t,r,s,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=s,e.enableXOF=o,e.destroyed=this.destroyed,e}};const vf=(n,e,t)=>Js(()=>new Cb(e,n,t)),Sb=vf(6,136,256/8),Rs=vf(1,136,256/8),Db=jc,vb=bb;class kf extends uo{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,df(e);const r=as(t);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,i=new Uint8Array(s);i.set(r.length>s?e.create().update(r).digest():r);for(let o=0;o<i.length;o++)i[o]^=54;this.iHash.update(i),this.oHash=e.create();for(let o=0;o<i.length;o++)i[o]^=106;this.oHash.update(i),$n(i)}update(e){return Fr(this),this.iHash.update(e),this}digestInto(e){Fr(this),Fn(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:s,destroyed:i,blockLen:o,outputLen:a}=this;return e=e,e.finished=s,e.destroyed=i,e.blockLen=o,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const $c=(n,e,t)=>new kf(n,e).update(t).digest();$c.create=(n,e)=>new kf(n,e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Vc=BigInt(0),zi=BigInt(1);function Qs(n){return n instanceof Uint8Array||ArrayBuffer.isView(n)&&n.constructor.name==="Uint8Array"}function fo(n){if(!Qs(n))throw new Error("Uint8Array expected")}function rr(n,e){if(typeof e!="boolean")throw new Error(n+" boolean expected, got "+e)}function hi(n){const e=n.toString(16);return e.length&1?"0"+e:e}function Ff(n){if(typeof n!="string")throw new Error("hex string expected, got "+typeof n);return n===""?Vc:BigInt("0x"+n)}const Tf=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",kb=Array.from({length:256},(n,e)=>e.toString(16).padStart(2,"0"));function Xr(n){if(fo(n),Tf)return n.toHex();let e="";for(let t=0;t<n.length;t++)e+=kb[n[t]];return e}const Ln={_0:48,_9:57,A:65,F:70,a:97,f:102};function Sd(n){if(n>=Ln._0&&n<=Ln._9)return n-Ln._0;if(n>=Ln.A&&n<=Ln.F)return n-(Ln.A-10);if(n>=Ln.a&&n<=Ln.f)return n-(Ln.a-10)}function Hi(n){if(typeof n!="string")throw new Error("hex string expected, got "+typeof n);if(Tf)return Uint8Array.fromHex(n);const e=n.length,t=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const r=new Uint8Array(t);for(let s=0,i=0;s<t;s++,i+=2){const o=Sd(n.charCodeAt(i)),a=Sd(n.charCodeAt(i+1));if(o===void 0||a===void 0){const c=n[i]+n[i+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+i)}r[s]=o*16+a}return r}function sr(n){return Ff(Xr(n))}function Is(n){return fo(n),Ff(Xr(Uint8Array.from(n).reverse()))}function ei(n,e){return Hi(n.toString(16).padStart(e*2,"0"))}function qi(n,e){return ei(n,e).reverse()}function Je(n,e,t){let r;if(typeof e=="string")try{r=Hi(e)}catch(i){throw new Error(n+" must be hex string or Uint8Array, cause: "+i)}else if(Qs(e))r=Uint8Array.from(e);else throw new Error(n+" must be hex string or Uint8Array");const s=r.length;if(typeof t=="number"&&s!==t)throw new Error(n+" of length "+t+" expected, got "+s);return r}function Tr(...n){let e=0;for(let r=0;r<n.length;r++){const s=n[r];fo(s),e+=s.length}const t=new Uint8Array(e);for(let r=0,s=0;r<n.length;r++){const i=n[r];t.set(i,s),s+=i.length}return t}function Fb(n){if(typeof n!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(n))}const ca=n=>typeof n=="bigint"&&Vc<=n;function Gc(n,e,t){return ca(n)&&ca(e)&&ca(t)&&e<=n&&n<t}function un(n,e,t,r){if(!Gc(e,t,r))throw new Error("expected valid "+n+": "+t+" <= n < "+r+", got "+e)}function If(n){let e;for(e=0;n>Vc;n>>=zi,e+=1);return e}function Tb(n,e){return n>>BigInt(e)&zi}const ti=n=>(zi<<BigInt(n))-zi,la=n=>new Uint8Array(n),Dd=n=>Uint8Array.from(n);function Ib(n,e,t){if(typeof n!="number"||n<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof t!="function")throw new Error("hmacFn must be a function");let r=la(n),s=la(n),i=0;const o=()=>{r.fill(1),s.fill(0),i=0},a=(...w)=>t(s,r,...w),c=(w=la(0))=>{s=a(Dd([0]),w),r=a(),w.length!==0&&(s=a(Dd([1]),w),r=a())},h=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let w=0;const D=[];for(;w<e;){r=a();const E=r.slice();D.push(E),w+=r.length}return Tr(...D)};return(w,D)=>{o(),c(w);let E;for(;!(E=D(h()));)c();return o(),E}}const Ub={bigint:n=>typeof n=="bigint",function:n=>typeof n=="function",boolean:n=>typeof n=="boolean",string:n=>typeof n=="string",stringOrUint8Array:n=>typeof n=="string"||Qs(n),isSafeInteger:n=>Number.isSafeInteger(n),array:n=>Array.isArray(n),field:(n,e)=>e.Fp.isValid(n),hash:n=>typeof n=="function"&&Number.isSafeInteger(n.outputLen)};function cs(n,e,t={}){const r=(s,i,o)=>{const a=Ub[i];if(typeof a!="function")throw new Error("invalid validator function");const c=n[s];if(!(o&&c===void 0)&&!a(c,n))throw new Error("param "+String(s)+" is invalid. Expected "+i+", got "+c)};for(const[s,i]of Object.entries(e))r(s,i,!1);for(const[s,i]of Object.entries(t))r(s,i,!0);return n}const _b=()=>{throw new Error("not implemented")};function Ws(n){const e=new WeakMap;return(t,...r)=>{const s=e.get(t);if(s!==void 0)return s;const i=n(t,...r);return e.set(t,i),i}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Yt=BigInt(0),Tt=BigInt(1),wr=BigInt(2),Mb=BigInt(3),Uf=BigInt(4),_f=BigInt(5),Mf=BigInt(8);function He(n,e){const t=n%e;return t>=Yt?t:e+t}function Ze(n,e,t){let r=n;for(;e-- >Yt;)r*=r,r%=t;return r}function Za(n,e){if(n===Yt)throw new Error("invert: expected non-zero number");if(e<=Yt)throw new Error("invert: expected positive modulus, got "+e);let t=He(n,e),r=e,s=Yt,i=Tt;for(;t!==Yt;){const a=r/t,c=r%t,h=s-i*a;r=t,t=c,s=i,i=h}if(r!==Tt)throw new Error("invert: does not exist");return He(s,e)}function Rf(n,e){const t=(n.ORDER+Tt)/Uf,r=n.pow(e,t);if(!n.eql(n.sqr(r),e))throw new Error("Cannot find square root");return r}function Rb(n,e){const t=(n.ORDER-_f)/Mf,r=n.mul(e,wr),s=n.pow(r,t),i=n.mul(e,s),o=n.mul(n.mul(i,wr),s),a=n.mul(i,n.sub(o,n.ONE));if(!n.eql(n.sqr(a),e))throw new Error("Cannot find square root");return a}function Wb(n){if(n<BigInt(3))throw new Error("sqrt is not defined for small field");let e=n-Tt,t=0;for(;e%wr===Yt;)e/=wr,t++;let r=wr;const s=ls(n);for(;Ja(s,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(t===1)return Rf;let i=s.pow(r,e);const o=(e+Tt)/wr;return function(c,h){if(c.is0(h))return h;if(Ja(c,h)!==1)throw new Error("Cannot find square root");let b=t,w=c.mul(c.ONE,i),D=c.pow(h,e),E=c.pow(h,o);for(;!c.eql(D,c.ONE);){if(c.is0(D))return c.ZERO;let g=1,S=c.sqr(D);for(;!c.eql(S,c.ONE);)if(g++,S=c.sqr(S),g===b)throw new Error("Cannot find square root");const T=Tt<<BigInt(b-g-1),M=c.pow(w,T);b=g,w=c.sqr(M),D=c.mul(D,w),E=c.mul(E,M)}return E}}function Pb(n){return n%Uf===Mb?Rf:n%Mf===_f?Rb:Wb(n)}const Lb=(n,e)=>(He(n,e)&Tt)===Tt,Ob=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Nb(n){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},t=Ob.reduce((r,s)=>(r[s]="function",r),e);return cs(n,t)}function Wf(n,e,t){if(t<Yt)throw new Error("invalid exponent, negatives unsupported");if(t===Yt)return n.ONE;if(t===Tt)return e;let r=n.ONE,s=e;for(;t>Yt;)t&Tt&&(r=n.mul(r,s)),s=n.sqr(s),t>>=Tt;return r}function ho(n,e,t=!1){const r=new Array(e.length).fill(t?n.ZERO:void 0),s=e.reduce((o,a,c)=>n.is0(a)?o:(r[c]=o,n.mul(o,a)),n.ONE),i=n.inv(s);return e.reduceRight((o,a,c)=>n.is0(a)?o:(r[c]=n.mul(o,r[c]),n.mul(o,a)),i),r}function Ja(n,e){const t=(n.ORDER-Tt)/wr,r=n.pow(e,t),s=n.eql(r,n.ONE),i=n.eql(r,n.ZERO),o=n.eql(r,n.neg(n.ONE));if(!s&&!i&&!o)throw new Error("invalid Legendre symbol result");return s?1:i?0:-1}function Pf(n,e){e!==void 0&&Yr(e);const t=e!==void 0?e:n.toString(2).length,r=Math.ceil(t/8);return{nBitLength:t,nByteLength:r}}function ls(n,e,t=!1,r={}){if(n<=Yt)throw new Error("invalid field: expected ORDER > 0, got "+n);const{nBitLength:s,nByteLength:i}=Pf(n,e);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let o;const a=Object.freeze({ORDER:n,isLE:t,BITS:s,BYTES:i,MASK:ti(s),ZERO:Yt,ONE:Tt,create:c=>He(c,n),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return Yt<=c&&c<n},is0:c=>c===Yt,isOdd:c=>(c&Tt)===Tt,neg:c=>He(-c,n),eql:(c,h)=>c===h,sqr:c=>He(c*c,n),add:(c,h)=>He(c+h,n),sub:(c,h)=>He(c-h,n),mul:(c,h)=>He(c*h,n),pow:(c,h)=>Wf(a,c,h),div:(c,h)=>He(c*Za(h,n),n),sqrN:c=>c*c,addN:(c,h)=>c+h,subN:(c,h)=>c-h,mulN:(c,h)=>c*h,inv:c=>Za(c,n),sqrt:r.sqrt||(c=>(o||(o=Pb(n)),o(a,c))),toBytes:c=>t?qi(c,i):ei(c,i),fromBytes:c=>{if(c.length!==i)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+c.length);return t?Is(c):sr(c)},invertBatch:c=>ho(a,c),cmov:(c,h,b)=>b?h:c});return Object.freeze(a)}function Lf(n){if(typeof n!="bigint")throw new Error("field order must be bigint");const e=n.toString(2).length;return Math.ceil(e/8)}function Yc(n){const e=Lf(n);return e+Math.ceil(e/2)}function Of(n,e,t=!1){const r=n.length,s=Lf(e),i=Yc(e);if(r<16||r<i||r>1024)throw new Error("expected "+i+"-1024 bytes of input, got "+r);const o=t?Is(n):sr(n),a=He(o,e-Tt)+Tt;return t?qi(a,s):ei(a,s)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const vd=BigInt(0),Qa=BigInt(1);function da(n,e){const t=e.negate();return n?t:e}function Nf(n,e){if(!Number.isSafeInteger(n)||n<=0||n>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+n)}function ua(n,e){Nf(n,e);const t=Math.ceil(e/n)+1,r=2**(n-1),s=2**n,i=ti(n),o=BigInt(n);return{windows:t,windowSize:r,mask:i,maxNumber:s,shiftBy:o}}function kd(n,e,t){const{windowSize:r,mask:s,maxNumber:i,shiftBy:o}=t;let a=Number(n&s),c=n>>o;a>r&&(a-=i,c+=Qa);const h=e*r,b=h+Math.abs(a)-1,w=a===0,D=a<0,E=e%2!==0;return{nextN:c,offset:b,isZero:w,isNeg:D,isNegF:E,offsetF:h}}function zb(n,e){if(!Array.isArray(n))throw new Error("array expected");n.forEach((t,r)=>{if(!(t instanceof e))throw new Error("invalid point at index "+r)})}function Hb(n,e){if(!Array.isArray(n))throw new Error("array of scalars expected");n.forEach((t,r)=>{if(!e.isValid(t))throw new Error("invalid scalar at index "+r)})}const fa=new WeakMap,zf=new WeakMap;function ha(n){return zf.get(n)||1}function Hf(n,e){return{constTimeNegate:da,hasPrecomputes(t){return ha(t)!==1},unsafeLadder(t,r,s=n.ZERO){let i=t;for(;r>vd;)r&Qa&&(s=s.add(i)),i=i.double(),r>>=Qa;return s},precomputeWindow(t,r){const{windows:s,windowSize:i}=ua(r,e),o=[];let a=t,c=a;for(let h=0;h<s;h++){c=a,o.push(c);for(let b=1;b<i;b++)c=c.add(a),o.push(c);a=c.double()}return o},wNAF(t,r,s){let i=n.ZERO,o=n.BASE;const a=ua(t,e);for(let c=0;c<a.windows;c++){const{nextN:h,offset:b,isZero:w,isNeg:D,isNegF:E,offsetF:g}=kd(s,c,a);s=h,w?o=o.add(da(E,r[g])):i=i.add(da(D,r[b]))}return{p:i,f:o}},wNAFUnsafe(t,r,s,i=n.ZERO){const o=ua(t,e);for(let a=0;a<o.windows&&s!==vd;a++){const{nextN:c,offset:h,isZero:b,isNeg:w}=kd(s,a,o);if(s=c,!b){const D=r[h];i=i.add(w?D.negate():D)}}return i},getPrecomputes(t,r,s){let i=fa.get(r);return i||(i=this.precomputeWindow(r,t),t!==1&&fa.set(r,s(i))),i},wNAFCached(t,r,s){const i=ha(t);return this.wNAF(i,this.getPrecomputes(i,t,s),r)},wNAFCachedUnsafe(t,r,s,i){const o=ha(t);return o===1?this.unsafeLadder(t,r,i):this.wNAFUnsafe(o,this.getPrecomputes(o,t,s),r,i)},setWindowSize(t,r){Nf(r,e),zf.set(t,r),fa.delete(t)}}}function qf(n,e,t,r){zb(t,n),Hb(r,e);const s=t.length,i=r.length;if(s!==i)throw new Error("arrays of points and scalars must have equal length");const o=n.ZERO,a=If(BigInt(s));let c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);const h=ti(c),b=new Array(Number(h)+1).fill(o),w=Math.floor((e.BITS-1)/c)*c;let D=o;for(let E=w;E>=0;E-=c){b.fill(o);for(let S=0;S<i;S++){const T=r[S],M=Number(T>>BigInt(E)&h);b[M]=b[M].add(t[S])}let g=o;for(let S=b.length-1,T=o;S>0;S--)T=T.add(b[S]),g=g.add(T);if(D=D.add(g),E!==0)for(let S=0;S<c;S++)D=D.double()}return D}function Xc(n){return Nb(n.Fp),cs(n,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Pf(n.n,n.nBitLength),...n,p:n.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Fd(n){n.lowS!==void 0&&rr("lowS",n.lowS),n.prehash!==void 0&&rr("prehash",n.prehash)}function qb(n){const e=Xc(n);cs(e,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:t,Fp:r,a:s}=e;if(t){if(!r.eql(s,r.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof t!="object"||typeof t.beta!="bigint"||typeof t.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...e})}class Kb extends Error{constructor(e=""){super(e)}}const Nn={Err:Kb,_tlv:{encode:(n,e)=>{const{Err:t}=Nn;if(n<0||n>256)throw new t("tlv.encode: wrong tag");if(e.length&1)throw new t("tlv.encode: unpadded data");const r=e.length/2,s=hi(r);if(s.length/2&128)throw new t("tlv.encode: long form length too big");const i=r>127?hi(s.length/2|128):"";return hi(n)+i+s+e},decode(n,e){const{Err:t}=Nn;let r=0;if(n<0||n>256)throw new t("tlv.encode: wrong tag");if(e.length<2||e[r++]!==n)throw new t("tlv.decode: wrong tlv");const s=e[r++],i=!!(s&128);let o=0;if(!i)o=s;else{const c=s&127;if(!c)throw new t("tlv.decode(long): indefinite length not supported");if(c>4)throw new t("tlv.decode(long): byte length is too big");const h=e.subarray(r,r+c);if(h.length!==c)throw new t("tlv.decode: length bytes not complete");if(h[0]===0)throw new t("tlv.decode(long): zero leftmost byte");for(const b of h)o=o<<8|b;if(r+=c,o<128)throw new t("tlv.decode(long): not minimal encoding")}const a=e.subarray(r,r+o);if(a.length!==o)throw new t("tlv.decode: wrong value length");return{v:a,l:e.subarray(r+o)}}},_int:{encode(n){const{Err:e}=Nn;if(n<zn)throw new e("integer: negative integers are not allowed");let t=hi(n);if(Number.parseInt(t[0],16)&8&&(t="00"+t),t.length&1)throw new e("unexpected DER parsing assertion: unpadded hex");return t},decode(n){const{Err:e}=Nn;if(n[0]&128)throw new e("invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new e("invalid signature integer: unnecessary leading zero");return sr(n)}},toSig(n){const{Err:e,_int:t,_tlv:r}=Nn,s=Je("signature",n),{v:i,l:o}=r.decode(48,s);if(o.length)throw new e("invalid signature: left bytes after parsing");const{v:a,l:c}=r.decode(2,i),{v:h,l:b}=r.decode(2,c);if(b.length)throw new e("invalid signature: left bytes after parsing");return{r:t.decode(a),s:t.decode(h)}},hexFromSig(n){const{_tlv:e,_int:t}=Nn,r=e.encode(2,t.encode(n.r)),s=e.encode(2,t.encode(n.s)),i=r+s;return e.encode(48,i)}};function ma(n,e){return Xr(ei(n,e))}const zn=BigInt(0),xt=BigInt(1);BigInt(2);const ba=BigInt(3),jb=BigInt(4);function Kf(n){const e=qb(n),{Fp:t}=e,r=ls(e.n,e.nBitLength),s=e.toBytes||((_,U,L)=>{const H=U.toAffine();return Tr(Uint8Array.from([4]),t.toBytes(H.x),t.toBytes(H.y))}),i=e.fromBytes||(_=>{const U=_.subarray(1),L=t.fromBytes(U.subarray(0,t.BYTES)),H=t.fromBytes(U.subarray(t.BYTES,2*t.BYTES));return{x:L,y:H}});function o(_){const{a:U,b:L}=e,H=t.sqr(_),K=t.mul(H,_);return t.add(t.add(K,t.mul(_,U)),L)}function a(_,U){const L=t.sqr(U),H=o(_);return t.eql(L,H)}if(!a(e.Gx,e.Gy))throw new Error("bad curve params: generator point");const c=t.mul(t.pow(e.a,ba),jb),h=t.mul(t.sqr(e.b),BigInt(27));if(t.is0(t.add(c,h)))throw new Error("bad curve params: a or b");function b(_){return Gc(_,xt,e.n)}function w(_){const{allowedPrivateKeyLengths:U,nByteLength:L,wrapPrivateKey:H,n:K}=e;if(U&&typeof _!="bigint"){if(Qs(_)&&(_=Xr(_)),typeof _!="string"||!U.includes(_.length))throw new Error("invalid private key");_=_.padStart(L*2,"0")}let V;try{V=typeof _=="bigint"?_:sr(Je("private key",_,L))}catch{throw new Error("invalid private key, expected hex or "+L+" bytes, got "+typeof _)}return H&&(V=He(V,K)),un("private key",V,xt,K),V}function D(_){if(!(_ instanceof S))throw new Error("ProjectivePoint expected")}const E=Ws((_,U)=>{const{px:L,py:H,pz:K}=_;if(t.eql(K,t.ONE))return{x:L,y:H};const V=_.is0();U==null&&(U=V?t.ONE:t.inv(K));const ee=t.mul(L,U),re=t.mul(H,U),$=t.mul(K,U);if(V)return{x:t.ZERO,y:t.ZERO};if(!t.eql($,t.ONE))throw new Error("invZ was invalid");return{x:ee,y:re}}),g=Ws(_=>{if(_.is0()){if(e.allowInfinityPoint&&!t.is0(_.py))return;throw new Error("bad point: ZERO")}const{x:U,y:L}=_.toAffine();if(!t.isValid(U)||!t.isValid(L))throw new Error("bad point: x or y not FE");if(!a(U,L))throw new Error("bad point: equation left != right");if(!_.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class S{constructor(U,L,H){if(U==null||!t.isValid(U))throw new Error("x required");if(L==null||!t.isValid(L)||t.is0(L))throw new Error("y required");if(H==null||!t.isValid(H))throw new Error("z required");this.px=U,this.py=L,this.pz=H,Object.freeze(this)}static fromAffine(U){const{x:L,y:H}=U||{};if(!U||!t.isValid(L)||!t.isValid(H))throw new Error("invalid affine point");if(U instanceof S)throw new Error("projective point not allowed");const K=V=>t.eql(V,t.ZERO);return K(L)&&K(H)?S.ZERO:new S(L,H,t.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(U){const L=ho(t,U.map(H=>H.pz));return U.map((H,K)=>H.toAffine(L[K])).map(S.fromAffine)}static fromHex(U){const L=S.fromAffine(i(Je("pointHex",U)));return L.assertValidity(),L}static fromPrivateKey(U){return S.BASE.multiply(w(U))}static msm(U,L){return qf(S,r,U,L)}_setWindowSize(U){N.setWindowSize(this,U)}assertValidity(){g(this)}hasEvenY(){const{y:U}=this.toAffine();if(t.isOdd)return!t.isOdd(U);throw new Error("Field doesn't support isOdd")}equals(U){D(U);const{px:L,py:H,pz:K}=this,{px:V,py:ee,pz:re}=U,$=t.eql(t.mul(L,re),t.mul(V,K)),ie=t.eql(t.mul(H,re),t.mul(ee,K));return $&&ie}negate(){return new S(this.px,t.neg(this.py),this.pz)}double(){const{a:U,b:L}=e,H=t.mul(L,ba),{px:K,py:V,pz:ee}=this;let re=t.ZERO,$=t.ZERO,ie=t.ZERO,F=t.mul(K,K),l=t.mul(V,V),m=t.mul(ee,ee),p=t.mul(K,V);return p=t.add(p,p),ie=t.mul(K,ee),ie=t.add(ie,ie),re=t.mul(U,ie),$=t.mul(H,m),$=t.add(re,$),re=t.sub(l,$),$=t.add(l,$),$=t.mul(re,$),re=t.mul(p,re),ie=t.mul(H,ie),m=t.mul(U,m),p=t.sub(F,m),p=t.mul(U,p),p=t.add(p,ie),ie=t.add(F,F),F=t.add(ie,F),F=t.add(F,m),F=t.mul(F,p),$=t.add($,F),m=t.mul(V,ee),m=t.add(m,m),F=t.mul(m,p),re=t.sub(re,F),ie=t.mul(m,l),ie=t.add(ie,ie),ie=t.add(ie,ie),new S(re,$,ie)}add(U){D(U);const{px:L,py:H,pz:K}=this,{px:V,py:ee,pz:re}=U;let $=t.ZERO,ie=t.ZERO,F=t.ZERO;const l=e.a,m=t.mul(e.b,ba);let p=t.mul(L,V),C=t.mul(H,ee),B=t.mul(K,re),x=t.add(L,H),I=t.add(V,ee);x=t.mul(x,I),I=t.add(p,C),x=t.sub(x,I),I=t.add(L,K);let y=t.add(V,re);return I=t.mul(I,y),y=t.add(p,B),I=t.sub(I,y),y=t.add(H,K),$=t.add(ee,re),y=t.mul(y,$),$=t.add(C,B),y=t.sub(y,$),F=t.mul(l,I),$=t.mul(m,B),F=t.add($,F),$=t.sub(C,F),F=t.add(C,F),ie=t.mul($,F),C=t.add(p,p),C=t.add(C,p),B=t.mul(l,B),I=t.mul(m,I),C=t.add(C,B),B=t.sub(p,B),B=t.mul(l,B),I=t.add(I,B),p=t.mul(C,I),ie=t.add(ie,p),p=t.mul(y,I),$=t.mul(x,$),$=t.sub($,p),p=t.mul(x,C),F=t.mul(y,F),F=t.add(F,p),new S($,ie,F)}subtract(U){return this.add(U.negate())}is0(){return this.equals(S.ZERO)}wNAF(U){return N.wNAFCached(this,U,S.normalizeZ)}multiplyUnsafe(U){const{endo:L,n:H}=e;un("scalar",U,zn,H);const K=S.ZERO;if(U===zn)return K;if(this.is0()||U===xt)return this;if(!L||N.hasPrecomputes(this))return N.wNAFCachedUnsafe(this,U,S.normalizeZ);let{k1neg:V,k1:ee,k2neg:re,k2:$}=L.splitScalar(U),ie=K,F=K,l=this;for(;ee>zn||$>zn;)ee&xt&&(ie=ie.add(l)),$&xt&&(F=F.add(l)),l=l.double(),ee>>=xt,$>>=xt;return V&&(ie=ie.negate()),re&&(F=F.negate()),F=new S(t.mul(F.px,L.beta),F.py,F.pz),ie.add(F)}multiply(U){const{endo:L,n:H}=e;un("scalar",U,xt,H);let K,V;if(L){const{k1neg:ee,k1:re,k2neg:$,k2:ie}=L.splitScalar(U);let{p:F,f:l}=this.wNAF(re),{p:m,f:p}=this.wNAF(ie);F=N.constTimeNegate(ee,F),m=N.constTimeNegate($,m),m=new S(t.mul(m.px,L.beta),m.py,m.pz),K=F.add(m),V=l.add(p)}else{const{p:ee,f:re}=this.wNAF(U);K=ee,V=re}return S.normalizeZ([K,V])[0]}multiplyAndAddUnsafe(U,L,H){const K=S.BASE,V=(re,$)=>$===zn||$===xt||!re.equals(K)?re.multiplyUnsafe($):re.multiply($),ee=V(this,L).add(V(U,H));return ee.is0()?void 0:ee}toAffine(U){return E(this,U)}isTorsionFree(){const{h:U,isTorsionFree:L}=e;if(U===xt)return!0;if(L)return L(S,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:U,clearCofactor:L}=e;return U===xt?this:L?L(S,this):this.multiplyUnsafe(e.h)}toRawBytes(U=!0){return rr("isCompressed",U),this.assertValidity(),s(S,this,U)}toHex(U=!0){return rr("isCompressed",U),Xr(this.toRawBytes(U))}}S.BASE=new S(e.Gx,e.Gy,t.ONE),S.ZERO=new S(t.ZERO,t.ONE,t.ZERO);const{endo:T,nBitLength:M}=e,N=Hf(S,T?Math.ceil(M/2):M);return{CURVE:e,ProjectivePoint:S,normPrivateKeyToScalar:w,weierstrassEquation:o,isWithinCurveOrder:b}}function $b(n){const e=Xc(n);return cs(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function jf(n){const e=$b(n),{Fp:t,n:r,nByteLength:s,nBitLength:i}=e,o=t.BYTES+1,a=2*t.BYTES+1;function c(m){return He(m,r)}function h(m){return Za(m,r)}const{ProjectivePoint:b,normPrivateKeyToScalar:w,weierstrassEquation:D,isWithinCurveOrder:E}=Kf({...e,toBytes(m,p,C){const B=p.toAffine(),x=t.toBytes(B.x),I=Tr;return rr("isCompressed",C),C?I(Uint8Array.from([p.hasEvenY()?2:3]),x):I(Uint8Array.from([4]),x,t.toBytes(B.y))},fromBytes(m){const p=m.length,C=m[0],B=m.subarray(1);if(p===o&&(C===2||C===3)){const x=sr(B);if(!Gc(x,xt,t.ORDER))throw new Error("Point is not on curve");const I=D(x);let y;try{y=t.sqrt(I)}catch(G){const Y=G instanceof Error?": "+G.message:"";throw new Error("Point is not on curve"+Y)}const u=(y&xt)===xt;return(C&1)===1!==u&&(y=t.neg(y)),{x,y}}else if(p===a&&C===4){const x=t.fromBytes(B.subarray(0,t.BYTES)),I=t.fromBytes(B.subarray(t.BYTES,2*t.BYTES));return{x,y:I}}else{const x=o,I=a;throw new Error("invalid Point, expected length of "+x+", or uncompressed "+I+", got "+p)}}});function g(m){const p=r>>xt;return m>p}function S(m){return g(m)?c(-m):m}const T=(m,p,C)=>sr(m.slice(p,C));class M{constructor(p,C,B){un("r",p,xt,r),un("s",C,xt,r),this.r=p,this.s=C,B!=null&&(this.recovery=B),Object.freeze(this)}static fromCompact(p){const C=s;return p=Je("compactSignature",p,C*2),new M(T(p,0,C),T(p,C,2*C))}static fromDER(p){const{r:C,s:B}=Nn.toSig(Je("DER",p));return new M(C,B)}assertValidity(){}addRecoveryBit(p){return new M(this.r,this.s,p)}recoverPublicKey(p){const{r:C,s:B,recovery:x}=this,I=K(Je("msgHash",p));if(x==null||![0,1,2,3].includes(x))throw new Error("recovery id invalid");const y=x===2||x===3?C+e.n:C;if(y>=t.ORDER)throw new Error("recovery id 2 or 3 invalid");const u=x&1?"03":"02",k=b.fromHex(u+ma(y,t.BYTES)),G=h(y),Y=c(-I*G),J=c(B*G),de=b.BASE.multiplyAndAddUnsafe(k,Y,J);if(!de)throw new Error("point at infinify");return de.assertValidity(),de}hasHighS(){return g(this.s)}normalizeS(){return this.hasHighS()?new M(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return Hi(this.toDERHex())}toDERHex(){return Nn.hexFromSig(this)}toCompactRawBytes(){return Hi(this.toCompactHex())}toCompactHex(){const p=s;return ma(this.r,p)+ma(this.s,p)}}const N={isValidPrivateKey(m){try{return w(m),!0}catch{return!1}},normPrivateKeyToScalar:w,randomPrivateKey:()=>{const m=Yc(e.n);return Of(e.randomBytes(m),e.n)},precompute(m=8,p=b.BASE){return p._setWindowSize(m),p.multiply(BigInt(3)),p}};function _(m,p=!0){return b.fromPrivateKey(m).toRawBytes(p)}function U(m){if(typeof m=="bigint")return!1;if(m instanceof b)return!0;const C=Je("key",m).length,B=t.BYTES,x=B+1,I=2*B+1;if(!(e.allowedPrivateKeyLengths||s===x))return C===x||C===I}function L(m,p,C=!0){if(U(m)===!0)throw new Error("first arg must be private key");if(U(p)===!1)throw new Error("second arg must be public key");return b.fromHex(p).multiply(w(m)).toRawBytes(C)}const H=e.bits2int||function(m){if(m.length>8192)throw new Error("input is too large");const p=sr(m),C=m.length*8-i;return C>0?p>>BigInt(C):p},K=e.bits2int_modN||function(m){return c(H(m))},V=ti(i);function ee(m){return un("num < 2^"+i,m,zn,V),ei(m,s)}function re(m,p,C=$){if(["recovered","canonical"].some(ue=>ue in C))throw new Error("sign() legacy options not supported");const{hash:B,randomBytes:x}=e;let{lowS:I,prehash:y,extraEntropy:u}=C;I==null&&(I=!0),m=Je("msgHash",m),Fd(C),y&&(m=Je("prehashed msgHash",B(m)));const k=K(m),G=w(p),Y=[ee(G),ee(k)];if(u!=null&&u!==!1){const ue=u===!0?x(t.BYTES):u;Y.push(Je("extraEntropy",ue))}const J=Tr(...Y),de=k;function ce(ue){const $e=H(ue);if(!E($e))return;const Ee=h($e),be=b.BASE.multiply($e).toAffine(),Pe=c(be.x);if(Pe===zn)return;const pe=c(Ee*c(de+Pe*G));if(pe===zn)return;let Se=(be.x===Pe?0:2)|Number(be.y&xt),jt=pe;return I&&g(pe)&&(jt=S(pe),Se^=1),new M(Pe,jt,Se)}return{seed:J,k2sig:ce}}const $={lowS:e.lowS,prehash:!1},ie={lowS:e.lowS,prehash:!1};function F(m,p,C=$){const{seed:B,k2sig:x}=re(m,p,C),I=e;return Ib(I.hash.outputLen,I.nByteLength,I.hmac)(B,x)}b.BASE._setWindowSize(8);function l(m,p,C,B=ie){var Se;const x=m;p=Je("msgHash",p),C=Je("publicKey",C);const{lowS:I,prehash:y,format:u}=B;if(Fd(B),"strict"in B)throw new Error("options.strict was renamed to lowS");if(u!==void 0&&u!=="compact"&&u!=="der")throw new Error("format must be compact or der");const k=typeof x=="string"||Qs(x),G=!k&&!u&&typeof x=="object"&&x!==null&&typeof x.r=="bigint"&&typeof x.s=="bigint";if(!k&&!G)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let Y,J;try{if(G&&(Y=new M(x.r,x.s)),k){try{u!=="compact"&&(Y=M.fromDER(x))}catch(jt){if(!(jt instanceof Nn.Err))throw jt}!Y&&u!=="der"&&(Y=M.fromCompact(x))}J=b.fromHex(C)}catch{return!1}if(!Y||I&&Y.hasHighS())return!1;y&&(p=e.hash(p));const{r:de,s:ce}=Y,ue=K(p),$e=h(ce),Ee=c(ue*$e),be=c(de*$e),Pe=(Se=b.BASE.multiplyAndAddUnsafe(J,Ee,be))==null?void 0:Se.toAffine();return Pe?c(Pe.x)===de:!1}return{CURVE:e,getPublicKey:_,getSharedSecret:L,sign:F,verify:l,ProjectivePoint:b,Signature:M,utils:N}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function $f(n){return{hash:n,hmac:(e,...t)=>$c(n,e,bf(...t)),randomBytes:Hc}}function Vb(n,e){const t=r=>jf({...n,...$f(r)});return{...t(e),create:t}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Vf=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Td=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Gb=BigInt(0),Yb=BigInt(1),ec=BigInt(2),Id=(n,e)=>(n+e/ec)/e;function Xb(n){const e=Vf,t=BigInt(3),r=BigInt(6),s=BigInt(11),i=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),h=n*n*n%e,b=h*h*n%e,w=Ze(b,t,e)*b%e,D=Ze(w,t,e)*b%e,E=Ze(D,ec,e)*h%e,g=Ze(E,s,e)*E%e,S=Ze(g,i,e)*g%e,T=Ze(S,a,e)*S%e,M=Ze(T,c,e)*T%e,N=Ze(M,a,e)*S%e,_=Ze(N,t,e)*b%e,U=Ze(_,o,e)*g%e,L=Ze(U,r,e)*h%e,H=Ze(L,ec,e);if(!tc.eql(tc.sqr(H),n))throw new Error("Cannot find square root");return H}const tc=ls(Vf,void 0,void 0,{sqrt:Xb}),Qn=Vb({a:Gb,b:BigInt(7),Fp:tc,n:Td,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:n=>{const e=Td,t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-Yb*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=t,o=BigInt("0x100000000000000000000000000000000"),a=Id(i*n,e),c=Id(-r*n,e);let h=He(n-a*t-c*s,e),b=He(-a*r-c*i,e);const w=h>o,D=b>o;if(w&&(h=e-h),D&&(b=e-b),h>o||b>o)throw new Error("splitScalar: Endomorphism failed, k="+n);return{k1neg:w,k1:h,k2neg:D,k2:b}}}},Kc);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const bn=BigInt(0),zt=BigInt(1),Ud=BigInt(2),Zb=BigInt(8),Jb={zip215:!0};function Qb(n){const e=Xc(n);return cs(n,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...e})}function ep(n){const e=Qb(n),{Fp:t,n:r,prehash:s,hash:i,randomBytes:o,nByteLength:a,h:c}=e,h=Ud<<BigInt(a*8)-zt,b=t.create,w=ls(e.n,e.nBitLength);function D(B,x){const I=t.sqr(B),y=t.sqr(x),u=t.add(t.mul(e.a,I),y),k=t.add(t.ONE,t.mul(e.d,t.mul(I,y)));return t.eql(u,k)}if(!D(e.Gx,e.Gy))throw new Error("bad curve params: generator point");const E=e.uvRatio||((B,x)=>{try{return{isValid:!0,value:t.sqrt(B*t.inv(x))}}catch{return{isValid:!1,value:bn}}}),g=e.adjustScalarBytes||(B=>B),S=e.domain||((B,x,I)=>{if(rr("phflag",I),x.length||I)throw new Error("Contexts/pre-hash are not supported");return B});function T(B,x,I=!1){const y=I?zt:bn;un("coordinate "+B,x,y,h)}function M(B){if(!(B instanceof U))throw new Error("ExtendedPoint expected")}const N=Ws((B,x)=>{const{ex:I,ey:y,ez:u}=B,k=B.is0();x==null&&(x=k?Zb:t.inv(u));const G=b(I*x),Y=b(y*x),J=b(u*x);if(k)return{x:bn,y:zt};if(J!==zt)throw new Error("invZ was invalid");return{x:G,y:Y}}),_=Ws(B=>{const{a:x,d:I}=e;if(B.is0())throw new Error("bad point: ZERO");const{ex:y,ey:u,ez:k,et:G}=B,Y=b(y*y),J=b(u*u),de=b(k*k),ce=b(de*de),ue=b(Y*x),$e=b(de*b(ue+J)),Ee=b(ce+b(I*b(Y*J)));if($e!==Ee)throw new Error("bad point: equation left != right (1)");const be=b(y*u),Pe=b(k*G);if(be!==Pe)throw new Error("bad point: equation left != right (2)");return!0});class U{constructor(x,I,y,u){T("x",x),T("y",I),T("z",y,!0),T("t",u),this.ex=x,this.ey=I,this.ez=y,this.et=u,Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(x){if(x instanceof U)throw new Error("extended point not allowed");const{x:I,y}=x||{};return T("x",I),T("y",y),new U(I,y,zt,b(I*y))}static normalizeZ(x){const I=ho(t,x.map(y=>y.ez));return x.map((y,u)=>y.toAffine(I[u])).map(U.fromAffine)}static msm(x,I){return qf(U,w,x,I)}_setWindowSize(x){K.setWindowSize(this,x)}assertValidity(){_(this)}equals(x){M(x);const{ex:I,ey:y,ez:u}=this,{ex:k,ey:G,ez:Y}=x,J=b(I*Y),de=b(k*u),ce=b(y*Y),ue=b(G*u);return J===de&&ce===ue}is0(){return this.equals(U.ZERO)}negate(){return new U(b(-this.ex),this.ey,this.ez,b(-this.et))}double(){const{a:x}=e,{ex:I,ey:y,ez:u}=this,k=b(I*I),G=b(y*y),Y=b(Ud*b(u*u)),J=b(x*k),de=I+y,ce=b(b(de*de)-k-G),ue=J+G,$e=ue-Y,Ee=J-G,be=b(ce*$e),Pe=b(ue*Ee),pe=b(ce*Ee),Se=b($e*ue);return new U(be,Pe,Se,pe)}add(x){M(x);const{a:I,d:y}=e,{ex:u,ey:k,ez:G,et:Y}=this,{ex:J,ey:de,ez:ce,et:ue}=x,$e=b(u*J),Ee=b(k*de),be=b(Y*y*ue),Pe=b(G*ce),pe=b((u+k)*(J+de)-$e-Ee),Se=Pe-be,jt=Pe+be,Re=b(Ee-I*$e),qe=b(pe*Se),Or=b(jt*Re),Ne=b(pe*Re),We=b(Se*jt);return new U(qe,Or,We,Ne)}subtract(x){return this.add(x.negate())}wNAF(x){return K.wNAFCached(this,x,U.normalizeZ)}multiply(x){const I=x;un("scalar",I,zt,r);const{p:y,f:u}=this.wNAF(I);return U.normalizeZ([y,u])[0]}multiplyUnsafe(x,I=U.ZERO){const y=x;return un("scalar",y,bn,r),y===bn?H:this.is0()||y===zt?this:K.wNAFCachedUnsafe(this,y,U.normalizeZ,I)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}isTorsionFree(){return K.unsafeLadder(this,r).is0()}toAffine(x){return N(this,x)}clearCofactor(){const{h:x}=e;return x===zt?this:this.multiplyUnsafe(x)}static fromHex(x,I=!1){const{d:y,a:u}=e,k=t.BYTES;x=Je("pointHex",x,k),rr("zip215",I);const G=x.slice(),Y=x[k-1];G[k-1]=Y&-129;const J=Is(G),de=I?h:t.ORDER;un("pointHex.y",J,bn,de);const ce=b(J*J),ue=b(ce-zt),$e=b(y*ce-u);let{isValid:Ee,value:be}=E(ue,$e);if(!Ee)throw new Error("Point.fromHex: invalid y coordinate");const Pe=(be&zt)===zt,pe=(Y&128)!==0;if(!I&&be===bn&&pe)throw new Error("Point.fromHex: x=0 and x_0=1");return pe!==Pe&&(be=b(-be)),U.fromAffine({x:be,y:J})}static fromPrivateKey(x){const{scalar:I}=re(x);return L.multiply(I)}toRawBytes(){const{x,y:I}=this.toAffine(),y=qi(I,t.BYTES);return y[y.length-1]|=x&zt?128:0,y}toHex(){return Xr(this.toRawBytes())}}U.BASE=new U(e.Gx,e.Gy,zt,b(e.Gx*e.Gy)),U.ZERO=new U(bn,zt,zt,bn);const{BASE:L,ZERO:H}=U,K=Hf(U,a*8);function V(B){return He(B,r)}function ee(B){return V(Is(B))}function re(B){const x=t.BYTES;B=Je("private key",B,x);const I=Je("hashed private key",i(B),2*x),y=g(I.slice(0,x)),u=I.slice(x,2*x),k=ee(y);return{head:y,prefix:u,scalar:k}}function $(B){const{head:x,prefix:I,scalar:y}=re(B),u=L.multiply(y),k=u.toRawBytes();return{head:x,prefix:I,scalar:y,point:u,pointBytes:k}}function ie(B){return $(B).pointBytes}function F(B=Uint8Array.of(),...x){const I=Tr(...x);return ee(i(S(I,Je("context",B),!!s)))}function l(B,x,I={}){B=Je("message",B),s&&(B=s(B));const{prefix:y,scalar:u,pointBytes:k}=$(x),G=F(I.context,y,B),Y=L.multiply(G).toRawBytes(),J=F(I.context,Y,k,B),de=V(G+J*u);un("signature.s",de,bn,r);const ce=Tr(Y,qi(de,t.BYTES));return Je("result",ce,t.BYTES*2)}const m=Jb;function p(B,x,I,y=m){const{context:u,zip215:k}=y,G=t.BYTES;B=Je("signature",B,2*G),x=Je("message",x),I=Je("publicKey",I,G),k!==void 0&&rr("zip215",k),s&&(x=s(x));const Y=Is(B.slice(G,2*G));let J,de,ce;try{J=U.fromHex(I,k),de=U.fromHex(B.slice(0,G),k),ce=L.multiplyUnsafe(Y)}catch{return!1}if(!k&&J.isSmallOrder())return!1;const ue=F(u,de.toRawBytes(),J.toRawBytes(),x);return de.add(J.multiplyUnsafe(ue)).subtract(ce).clearCofactor().equals(U.ZERO)}return L._setWindowSize(8),{CURVE:e,getPublicKey:ie,sign:l,verify:p,ExtendedPoint:U,utils:{getExtendedPublicKey:$,randomPrivateKey:()=>o(t.BYTES),precompute(B=8,x=U.BASE){return x._setWindowSize(B),x.multiply(BigInt(3)),x}}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Zc=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),_d=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt(0);const tp=BigInt(1),Md=BigInt(2);BigInt(3);const np=BigInt(5),rp=BigInt(8);function sp(n){const e=BigInt(10),t=BigInt(20),r=BigInt(40),s=BigInt(80),i=Zc,a=n*n%i*n%i,c=Ze(a,Md,i)*a%i,h=Ze(c,tp,i)*n%i,b=Ze(h,np,i)*h%i,w=Ze(b,e,i)*b%i,D=Ze(w,t,i)*w%i,E=Ze(D,r,i)*D%i,g=Ze(E,s,i)*E%i,S=Ze(g,s,i)*E%i,T=Ze(S,e,i)*b%i;return{pow_p_5_8:Ze(T,Md,i)*n%i,b2:a}}function ip(n){return n[0]&=248,n[31]&=127,n[31]|=64,n}function op(n,e){const t=Zc,r=He(e*e*e,t),s=He(r*r*e,t),i=sp(n*s).pow_p_5_8;let o=He(n*r*i,t);const a=He(e*o*o,t),c=o,h=He(o*_d,t),b=a===n,w=a===He(-n,t),D=a===He(-n*_d,t);return b&&(o=c),(w||D)&&(o=h),Lb(o,t)&&(o=He(-o,t)),{isValid:b||w,value:o}}const Rd=ls(Zc,void 0,!0),ap={a:Rd.create(BigInt(-1)),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:Rd,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:rp,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:jc,randomBytes:Hc,adjustScalarBytes:ip,uvRatio:op},_r=ep(ap),cp=[{name:"appIdPrefix",binary:"bytes",custom:Nt.encode("appID"),omit:!0},{name:"appId",binary:"uint",size:8}],gn=class gn{constructor(e,t="hex"){se(this,"address");this.address=typeof e=="string"?gn.stringToUint8Array(e,t):e}toNative(e){return ar(e,this)}unwrap(){return this.address}toString(){return Ft.encode(this.address,!0)}toUint8Array(){return this.address}toUniversalAddress(){return this}equals(e){return Nt.equals(this.address,e.address)}static isValidAddress(e,t="hex"){return!_m(()=>gn.stringToUint8Array(e,t))}static instanceof(e){return typeof e=="object"&&"constructor"in e&&e.constructor.type===gn.type}static stringToUint8Array(e,t){const r=(()=>{switch(t){case"hex":if(![40,2*this.byteSize].includes(e.length-(e.startsWith("0x")?2:0)))throw new Error(`string ${e} has invalid length for format ${t}`);return Ft.decode(e);case"base58":return Gu.decode(e);case"bech32":return $u.decodeToBytes(e).bytes;case"algorandAppId":return vb(vn(cp,{appId:BigInt(e)}));case"sha256":return Ni(e)}})();if(r.length>gn.byteSize)throw new Error(`string ${e} has invalid length for format ${t}`);return r.length<gn.byteSize?Nt.zpad(r,gn.byteSize):r}};se(gn,"byteSize",32),se(gn,"type","Universal");let Ot=gn;function lp(n){return typeof n=="object"&&"setChain"in n}const nc=new Map;function Jc(n,e){nc.has(n)||nc.set(n,e)}function ar(n,e){const t=is.get(n),r=nc.get(t);if(!r)throw new Error(`No native address type registered for platform ${t}, import the platform directly or, if using sdk package, import the addresses conditional export`);try{const s=new r(e);return lp(s)&&s.setChain(n),s}catch(s){const i=`Error parsing address as a native ${n} address: ${s.message}`;if(Ot.instanceof(e))throw i;return new Ot(e).toNative(n)}}function Gf(n,e){const t=is.get(n);return new Ot(e,l1.get(t))}const rc=(n,e)=>n?`${n}:${e}`:e,sc=new Map;function dp(n,e,t){const r=rc(n,e);if(sc.has(r))throw new Error(`Payload type ${r} already registered`);sc.set(r,t)}function Et(n,e){for(const[t,r]of e)dp(n,t,r)}const It={binary:"uint",size:32},up={binary:"uint",size:2},qt=n=>({...up,custom:{to:e=>{if(e===0){if(!(n!=null&&n.allowNull))throw new Error("ChainId 0 is not valid for this protocol and action");return null}const t=ss(e),r=(n==null?void 0:n.allowedChains)??Yu;if(!r.includes(t))throw new Error(`Chain ${t} not in allowed chains ${r}`);return t},from:e=>e==null?0:co(e)}}),Ps={binary:"uint",size:4},Qc={binary:"uint",size:8},Yf={binary:"uint",size:4},lr=n=>({name:"payloadId",binary:"uint",size:1,custom:n,omit:!0}),el={binary:"uint",size:8};class fp{constructor(e,t,r){se(this,"r");se(this,"s");se(this,"v");this.r=e,this.s=t,this.v=r}encode(){return vn(ic,this)}static decode(e){return kn(ic,e)}}var Wd;(function(n){function e(i){return Qn.getPublicKey(i)}n.toPubkey=e;function t(i,o){if(o.length!=32)throw new Error("hash.length != 32");return Qn.sign(o,i)}n.sign=t;function r(i,o,a){const{r:c,s:h}=i;return Qn.verify({r:c,s:h},a,o)}n.validate=r;function s(i,o){const{r:a,s:c,v:h}=i,b=new Qn.Signature(a,c);return b.recovery=h,b.recoverPublicKey(o).toRawBytes()}n.recover=s})(Wd||(Wd={}));const hp=[{name:"r",binary:"uint",size:32},{name:"s",binary:"uint",size:32},{name:"v",binary:"uint",size:1}],ic={binary:"bytes",layout:hp,custom:{to:n=>new fp(n.r,n.s,n.v),from:n=>({r:n.r,s:n.s,v:n.v})}},xe={binary:"bytes",size:32,custom:{to:n=>new Ot(n),from:n=>n.toUint8Array()}},mp=n=>{const e=n.findIndex(t=>t!==0);return-1<e?n.slice(e):new Uint8Array([])},bp={to:Nt.decode,from:Nt.encode},Xf=n=>({binary:"bytes",size:n,custom:{to:e=>Nt.decode(mp(e)),from:e=>Nt.zpad(Nt.encode(e),n)}});function Zf(n){const e=n.indexOf(":");return e!==-1?[n.slice(0,e),n.slice(e+1)]:[null,n]}const pp=[{name:"guardianIndex",binary:"uint",size:1},{name:"signature",...ic}],tl=[{name:"version",binary:"uint",size:1,custom:1,omit:!0},{name:"guardianSet",...Yf},{name:"signatures",binary:"array",lengthSize:1,layout:pp}],nl=[{name:"timestamp",binary:"uint",size:4},{name:"nonce",binary:"uint",size:4},{name:"emitterChain",...qt()},{name:"emitterAddress",...xe},{name:"sequence",...el},{name:"consistencyLevel",binary:"uint",size:1}],gp=[...tl,...nl];function Ls(n){const e=sc.get(n);if(!e)throw new Error(`No layout registered for payload type ${n}`);return e}function Jf(n){return{name:"payload",binary:"bytes",...n==="Uint8Array"?{}:{layout:Ls(n)}}}function oc(n){const e=[...gp,Jf(n.payloadLiteral)];return vn(e,n)}function yp(n,e){if(n==="Uint8Array")return e;const t=Ls(n);return vn(t,e)}function rl(n,e){const t=(()=>{if(Array.isArray(n[0]))return n.flatMap(([o,a])=>a.map(c=>rc(o,c)));if(typeof n[1]=="string")return n;const[s,i]=n;return i.map(o=>rc(s,o))})(),r=jm(t.map(s=>Ls(s)));return s=>{typeof s=="string"&&(s=Ft.decode(s));const i=r(s);return Array.isArray(i)?i.map(o=>t[o]):i!==null?t[i]:null}}function Os(n,e){typeof e=="string"&&(e=Ft.decode(e));const[t,r]=kn(tl,e,!1);for(let E=1;E<t.signatures.length;++E)if(t.signatures[E].guardianIndex<=t.signatures[E-1].guardianIndex)throw new Error("Guardian signatures must be in ascending order of guardian set index");const s=r,[i,o]=kn(nl,e.subarray(s),!1),a=s+o,[c,h]=typeof n=="string"?[n,Pd(n,e.subarray(a))]:Pd(n,e.subarray(a)),[b,w]=Zf(c),D=Rs(e.slice(s));return{protocolName:b,payloadName:w,payloadLiteral:c,...t,...i,payload:h,hash:D}}function Pd(n,e,t=0){return(()=>{if(typeof e=="string"&&(e=Ft.decode(e)),n==="Uint8Array")return e.slice(t);if(typeof n=="string")return kn(Ls(n),e.subarray(t));const r=n(e.slice(t));if(r===null)throw new Error(`Encoded data does not match any of the given payload types - ${e}`);return[r,kn(Ls(r),e.subarray(t))]})()}const Ap=[["Ethereum",[["ETH",{symbol:"ETH",decimals:18,address:"native",wrappedKey:"WETH"}],["WETH",{symbol:"WETH",decimals:18,address:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}],["USDCeth",{symbol:"USDC",decimals:6,address:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"}],["WBTC",{symbol:"WBTC",decimals:8,address:"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599"}],["USDT",{symbol:"USDT",decimals:6,address:"0xdac17f958d2ee523a2206206994597c13d831ec7"}],["DAI",{symbol:"DAI",decimals:18,address:"0x6b175474e89094c44da98b954eedeac495271d0f"}],["BUSD",{symbol:"BUSD",decimals:18,address:"0x4fabb145d64652a948d72533023f6e7a623c7c53"}],["WMATIC",{symbol:"WMATIC",decimals:18,address:"0x7c9f4C87d911613Fe9ca58b579f737911AAD2D43",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:18,address:"0x418D75f65a02b3D53B2418FB8E1fe493759c7605",original:"Bsc"}],["USDCbnb",{symbol:"USDC",decimals:18,address:"0x7cd167B101D2808Cfd2C45d17b2E7EA9F46b74B6",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:18,address:"0x85f138bfEE4ef8e540890CFb48F620571d67Eda3",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"0x39EbF69137D98FB7659Ef8D4ea21ec26394389d7",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:18,address:"0x4cD2690d86284e044cb63E60F1EB218a825a7e92",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:18,address:"0x3294395e62F4eB6aF3f1Fcf89f5602D90Fb3Ef69",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:18,address:"0x93d3696A9F879b331f40CB5059e37015423A3Bd0",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:9,address:"0xD31a59c85aE9D8edEFeC411D448f90841571b89c",original:"Solana"}],["USDCsol",{symbol:"USDC",decimals:6,address:"0x41f7B8b9b897276b7AAE926a9016935280b44E97",original:"Solana"}],["SUI",{symbol:"SUI",decimals:9,address:"0x84074EA631dEc7a4edcD5303d164D5dEa4c653D6",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"0x8CDf7AF57E4c8B930e1B23c477c22f076530585e",original:"Aptos"}],["WETHarbitrum",{symbol:"WETH",decimals:18,address:"0xb945E3F853B5f8033C8513Cf3cE9F8AD9beBB1c9",original:"Arbitrum"}],["USDCarbitrum",{symbol:"USDC",decimals:6,address:"0xCFc006a32a98031C2338BF9d5ff8ED2c0Cae4a9e",original:"Arbitrum"}],["WETHoptimism",{symbol:"WETH",decimals:18,address:"0x8B5653Ae095529155462eDa8CF664eD96773F557",original:"Optimism"}],["WETHbase",{symbol:"WETH",decimals:18,address:"0x1D4241F7370253C0f12EFC536B7e16E462Fb3526",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:18,address:"0x18084fbA666a33d37592fA2633fD49a74DD93a88"}],["tBTCpolygon",{symbol:"tBTC",decimals:18,address:"0xb4c624dBC50804dA086cf2380cD55dEBC0d22E96",original:"Polygon"}],["tBTCoptimism",{symbol:"tBTC",decimals:18,address:"0xB8d1E0642bFD3744CaBd2ca8830cFabE19b2Ca54",original:"Optimism"}],["tBTCarbitrum",{symbol:"tBTC",decimals:18,address:"0x4F3819A6cfF717BFfE801a75c73A984141c76589",original:"Arbitrum"}],["tBTCbase",{symbol:"tBTC",decimals:18,address:"0x733F28B3e315046Db01dAbC292D6F0F7F26C4551",original:"Base"}],["wstETH",{symbol:"wstETH",decimals:18,address:"0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0"}],["WKLAY",{symbol:"WKLAY",decimals:18,address:"0x9AEA32B459e96C8eF5010f69130bf95fd129ac05",original:"Klaytn"}],["PYTH",{symbol:"PYTH",decimals:6,address:"0xeFc0CED4B3D536103e76a1c4c74F0385C8F4Bdd3",original:"Solana"}]]],["Bsc",[["WETH",{symbol:"WETH",decimals:18,address:"0x4DB5a66E937A9F4473fA95b1cAF1d1E1D62E29EA",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"0xB04906e95AB5D797aDA81508115611fee694c2b3",original:"Ethereum"}],["WBTC",{symbol:"WBTC",decimals:8,address:"0x43359676E1A3F9FbB5de095333f8e9c1B46dFA44",original:"Ethereum"}],["USDT",{symbol:"USDT",decimals:6,address:"0x524bC91Dc82d6b90EF29F76A3ECAaBAffFD490Bc",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:18,address:"0x3413a030EF81a3dD5a302F4B4D11d911e12ed337",original:"Ethereum"}],["BUSD",{symbol:"BUSD",decimals:18,address:"0x035de3679E692C471072d1A09bEb9298fBB2BD31",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:18,address:"0xc836d8dC361E44DbE64c4862D55BA041F88Ddd39",original:"Polygon"}],["USDCpolygon",{symbol:"USDC",decimals:6,address:"0xe6d82Bbe75041E42E51d755e922cE1BA91af9c4d",original:"Polygon"}],["BNB",{symbol:"BNB",decimals:18,address:"native",wrappedKey:"WBNB"}],["WBNB",{symbol:"WBNB",decimals:18,address:"0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}],["USDCbnb",{symbol:"USDC",decimals:18,address:"0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d"}],["WAVAX",{symbol:"WAVAX",decimals:18,address:"0x96412902aa9aFf61E13f085e70D3152C6ef2a817",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"0xc88Dc63bf0c8c8198C97Db0945E3eF25Ca89A8e4",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:18,address:"0xbF8413EE8612E0E4f66Aa63B5ebE27f3C5883d47",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:18,address:"0x2A335e327a55b177f5B40132fEC5D7298aa0D7e6",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:18,address:"0x1C063db3c621BF901FC6C1D03328b08b2F9bbfba",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:9,address:"0xfA54fF1a158B5189Ebba6ae130CEd6bbd3aEA76e",original:"Solana"}],["USDCsol",{symbol:"USDC",decimals:6,address:"0x91Ca579B0D47E5cfD5D0862c21D5659d39C8eCf0",original:"Solana"}],["SUI",{symbol:"SUI",decimals:9,address:"0x8314f6Bf1B4dd8604A0fC33C84F9AF2fc07AABC8",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"0x2Ba98cf7Edd2c5C794e21bc3Dc6973D3C2585eE3",original:"Aptos"}],["WETHarbitrum",{symbol:"WETH",decimals:18,address:"0xaA1eEdABC48D078350ccBdD620bD088848e299E5",original:"Arbitrum"}],["USDCarbitrum",{symbol:"USDC",decimals:6,address:"0x5caa170b465122D15a6D20FD9A804a9613CE7882",original:"Arbitrum"}],["WETHoptimism",{symbol:"WETH",decimals:18,address:"0x94AEc09B5e2CE591e39DC6aa58A3A6E85Ed45265",original:"Optimism"}],["USDCoptimism",{symbol:"USDC",decimals:6,address:"0xa41ae127D04F7ee73B5058E2C60Fb7c7A2D21F79",original:"Optimism"}],["WETHbsc",{symbol:"WETH",decimals:18,address:"0x2170Ed0880ac9A755fd29B2688956BD959F933F8"}],["WETHbase",{symbol:"WETH",decimals:18,address:"0x9dc152F4941cE1A138326e70c3600385bf0C22dD",original:"Base"}],["USDCbase",{symbol:"USDC",decimals:6,address:"0x55CaD531c8E303Cab8B3BE4bB4744Db4f896ac81",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:18,address:"0x94c97dd3Bde5bC1406BCe82E7941A6365968521D",original:"Ethereum"}],["wstETH",{symbol:"wstETH",decimals:18,address:"0xad80E1A9B5824234afA9dE1F3bbDb8a994796169",original:"Ethereum"}],["WKLAY",{symbol:"WKLAY",decimals:18,address:"0xEA970e7b7D131Ea36c3051C9Ca11e785462fE00c",original:"Klaytn"}],["PYTH",{symbol:"PYTH",decimals:6,address:"0xb0188B0bb2cD4a6D2744637fC83C94a284B247Da",original:"Solana"}],["USDTbsc",{symbol:"USDT",decimals:18,address:"0x55d398326f99059fF775485246999027B3197955"}]]],["Polygon",[["WETH",{symbol:"WETH",decimals:18,address:"0x11CD37bb86F65419713f30673A480EA33c826872",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"0x4318CB63A2b8edf2De971E2F17F77097e499459D",original:"Ethereum"}],["WBTC",{symbol:"WBTC",decimals:8,address:"0x5D49c278340655B56609FdF8976eb0612aF3a0C3",original:"Ethereum"}],["USDT",{symbol:"USDT",decimals:6,address:"0x9417669fBF23357D2774e9D421307bd5eA1006d2",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:18,address:"0x732EB1747ecCFC431fF19bc359ffc83755B1918c",original:"Ethereum"}],["BUSD",{symbol:"BUSD",decimals:18,address:"0x95ea750420da26bE1Ab0891e209e921bCd84763f",original:"Ethereum"}],["MATIC",{symbol:"MATIC",decimals:18,address:"native",wrappedKey:"WMATIC"}],["WMATIC",{symbol:"WMATIC",decimals:18,address:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270"}],["WETHpolygon",{symbol:"WETH",decimals:18,address:"0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619"}],["USDCpolygon",{symbol:"USDC",decimals:6,address:"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359"}],["WBNB",{symbol:"WBNB",decimals:18,address:"0xeCDCB5B88F8e3C15f95c720C51c71c9E2080525d",original:"Bsc"}],["USDCbnb",{symbol:"USDC",decimals:18,address:"0x4B3a922c773BDCF3BA8f1A4FDAc2029E1D0E9868",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:18,address:"0x7Bb11E7f8b10E9e571E5d8Eace04735fDFB2358a",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"0xAEA5CC14DefbC1b845FDE729E563B717Ee6825ae",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:18,address:"0x3726831304D77f585f1Aca9d9841cc3Ef80dAa62",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:18,address:"0x922F49a9911effc034eE756196E59BE7b90D43b3",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:18,address:"0xcC48d6CF842083fEc0E01d913fB964b585975F05",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:9,address:"0xd93f7E271cB87c23AaA73edC008A79646d1F9912",original:"Solana"}],["USDCsol",{symbol:"USDC",decimals:6,address:"0x576Cf361711cd940CD9C397BB98C4C896cBd38De",original:"Solana"}],["SUI",{symbol:"SUI",decimals:9,address:"0x34bE049fEbfc6C64Ffd82Da08a8931A9a45f2cc8",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"0xa4ef199d3ad524E9C3C51Ac46B303B103A307Cef",original:"Aptos"}],["WETHarbitrum",{symbol:"WETH",decimals:18,address:"0x6a5c59AB16268d2c872916054C50440B999e417C",original:"Arbitrum"}],["USDCarbitrum",{symbol:"USDC",decimals:6,address:"0x7800FE8951cdc1cDea748d878fAce63018D97960",original:"Arbitrum"}],["WETHoptimism",{symbol:"WETH",decimals:18,address:"0x8182De59485Bb646542Db8C7E5958148Dc699319",original:"Optimism"}],["USDCoptimism",{symbol:"USDC",decimals:6,address:"0x31F12aCb60C3c32EE884F3894a873347C097D925",original:"Optimism"}],["WETHbase",{symbol:"WETH",decimals:18,address:"0x5BCf8d8c097FbB35C371F921E3FF3e6F6Eb54B41",original:"Base"}],["USDCbase",{symbol:"USDC",decimals:6,address:"0x1eeCaB0F75fE93abbFa0cDFfb4fB13d1dC8706c8",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:18,address:"0x3362b2B92b331925F09F9E5bCA3E8C43921a435C",original:"Ethereum"}],["tBTCpolygon",{symbol:"tBTC",decimals:18,address:"0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b"}],["tBTCoptimism",{symbol:"tBTC",decimals:18,address:"0x68A8797da1c8ED592600d70A5151886A92D2183C",original:"Optimism"}],["tBTCarbitrum",{symbol:"tBTC",decimals:18,address:"0x045D8c62D5326aa51a31518ECF3aF80C17421Aba",original:"Arbitrum"}],["wstETH",{symbol:"wstETH",decimals:18,address:"0xe082a7Fc696De18172Ad08D956569Ee80BC37f06",original:"Ethereum"}],["wstETHpolygon",{symbol:"wstETH",decimals:18,address:"0x03b54A6e9a984069379fae1a4fC4dBAE93B3bCCD"}],["WKLAY",{symbol:"WKLAY",decimals:18,address:"0x415ce980fde17F1FF102e1c6e4ce860Acc615D74",original:"Klaytn"}],["PYTH",{symbol:"PYTH",decimals:6,address:"0xFa4B761A1e07909Ba31331a5dfa12390E3ff5583",original:"Solana"}],["USDTpolygon",{symbol:"USDT",decimals:6,address:"0xc2132D05D31c914a87C6611C10748AEb04B58e8F"}]]],["Avalanche",[["WETH",{symbol:"WETH",decimals:18,address:"0x8b82A291F83ca07Af22120ABa21632088fC92931",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"0xB24CA28D4e2742907115fECda335b40dbda07a4C",original:"Ethereum"}],["WBTC",{symbol:"WBTC",decimals:8,address:"0x1C0e79C5292c59bbC13C9F9f209D204cf4d65aD6",original:"Ethereum"}],["USDT",{symbol:"USDT",decimals:6,address:"0x9d228444FC4B7E15A2C481b48E10247A03351FD8",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:18,address:"0xca319f81D147559e19A522A0a0310Dd43A96cA0F",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:18,address:"0xf2f13f0B7008ab2FA4A2418F4ccC3684E49D20Eb",original:"Polygon"}],["USDCpolygon",{symbol:"USDC",decimals:6,address:"0xDb2d08f5A9C9ADBBA0DE5a69bbB1E9Ca03411692",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:18,address:"0x442F7f22b1EE2c842bEAFf52880d4573E9201158",original:"Bsc"}],["USDCbnb",{symbol:"USDC",decimals:18,address:"0x6145E8a910aE937913426BF32De2b26039728ACF",original:"Bsc"}],["AVAX",{symbol:"AVAX",decimals:18,address:"native",wrappedKey:"WAVAX"}],["WAVAX",{symbol:"WAVAX",decimals:18,address:"0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7"}],["USDCavax",{symbol:"USDC",decimals:6,address:"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"}],["WETHavax",{symbol:"WETH",decimals:18,address:"0x49d5c2bdffac6ce2bfdb6640f4f80f226bc10bab"}],["WFTM",{symbol:"WFTM",decimals:18,address:"0xd19abc09B7b36F7558929b97a866f499a26c2f83",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:18,address:"0x494317B8521c5a5287a06DEE467dd6fe285dA4a8",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:18,address:"0x375aA6C67BF499fBf01804A9f92C03c0776F372d",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:9,address:"0xFE6B19286885a4F7F55AdAD09C3Cd1f906D2478F",original:"Solana"}],["USDCsol",{symbol:"USDC",decimals:6,address:"0x0950Fc1AD509358dAeaD5eB8020a3c7d8b43b9DA",original:"Solana"}],["SUI",{symbol:"SUI",decimals:9,address:"0x1703CB0F762D2a435199B64Ea47E5349B7C17480",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"0x43c588459b3243fA541B98CC4B2E995b3de553A2",original:"Aptos"}],["WETHarbitrum",{symbol:"WETH",decimals:18,address:"0xDfDA518A1612030536bD77Fd67eAcbe90dDC52Ab",original:"Arbitrum"}],["USDCarbitrum",{symbol:"USDC",decimals:6,address:"0x4b5fE357Eb11c735078e47526D6e853DBff18541",original:"Arbitrum"}],["WETHoptimism",{symbol:"WETH",decimals:18,address:"0xDf11535274c0FD2Fe41A88bd1bBF802D72296037",original:"Optimism"}],["USDCoptimism",{symbol:"USDC",decimals:6,address:"0xBe04f76A0ba2100c3F2d6Aa1FD8484F415469573",original:"Optimism"}],["WETHbase",{symbol:"WETH",decimals:18,address:"0xFA83178c66fE51ee99109b5cC912f8098Ff812eF",original:"Base"}],["USDCbase",{symbol:"USDC",decimals:6,address:"0xab933e939a9236BD439F7d29b87CE712f42bAC06",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:18,address:"0x3F531c038A0D2d9c7D19FC3554cd0439791526c4",original:"Ethereum"}],["WKLAY",{symbol:"WKLAY",decimals:18,address:"0x126C03982Ad6D7ef7E6aF020bF219e87185a6BC3",original:"Klaytn"}],["PYTH",{symbol:"PYTH",decimals:6,address:"0x8A0691e602B7a5FCc51a27E4a08376dE50889B42",original:"Solana"}],["USDTavax",{symbol:"USDT",decimals:6,address:"0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7"}]]],["Fantom",[["WETH",{symbol:"WETH",decimals:18,address:"0x2A126f043BDEBe5A0A9841c51915E562D9B07289",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"0x2Ec752329c3EB419136ca5e4432Aa2CDb1eA23e6",original:"Ethereum"}],["WBTC",{symbol:"WBTC",decimals:8,address:"0x87e9E225aD8a0755B9958fd95BE43DD6A91FF3A7",original:"Ethereum"}],["USDT",{symbol:"USDT",decimals:6,address:"0x14BCb86aEed6a74D3452550a25D37f1c30AA0A66",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:18,address:"0xEE786D3D73Ea645365c7248E4e40eDba08B1169F",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:18,address:"0xb88A6064B1F3FF5B9AE4A82fFD52560b0dF9FBD3",original:"Polygon"}],["USDCpolygon",{symbol:"USDC",decimals:6,address:"0xB4DcfD221048a1Dad989D39456BBd87762c26F06",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:18,address:"0xc033551e05907Ddd643AE14b6D4a9CA72BfF509B",original:"Bsc"}],["USDCbnb",{symbol:"USDC",decimals:18,address:"0x0FcbDAC44c67A43607D3E95886dB19871ADc985F",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:18,address:"0x358CE030DC6116Cc296E8B9F002728e65459C146",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"0xEfE7701cb2B80664385Be226d0300912CA92f66A",original:"Avalanche"}],["FTM",{symbol:"FTM",decimals:18,address:"native",wrappedKey:"WFTM"}],["WFTM",{symbol:"WFTM",decimals:18,address:"0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83"}],["CELO",{symbol:"CELO",decimals:18,address:"0xF432490C6c96C9d3bF523a499a1CEaFd8208A373",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:18,address:"0xBF227E92D6754EB4BFE26C40cb299ff2809Da45f",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:9,address:"0xd99021C2A33e4Cf243010539c9e9b7c52E0236c1",original:"Solana"}],["USDCsol",{symbol:"USDC",decimals:6,address:"0xb8398DA4FB3BC4306B9D9d9d13d9573e7d0E299f",original:"Solana"}],["SUI",{symbol:"SUI",decimals:9,address:"0xC277423a21F6e32D886BF85Ef6cCB945d5D28347",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"0x3Cd9162Ca5256b8E26A0e3Ad14CCfF7C0Da0F174",original:"Aptos"}],["WETHarbitrum",{symbol:"WETH",decimals:18,address:"0xE8367853A0823515D37b1538331B4704089becb4",original:"Arbitrum"}],["USDCarbitrum",{symbol:"USDC",decimals:6,address:"0x2228703672906fEe5eD681Ec28e42B4506b8c336",original:"Arbitrum"}],["WETHoptimism",{symbol:"WETH",decimals:18,address:"0xe8E8f941377A955bFA72880ec0dc2319dbC827a8",original:"Optimism"}],["USDCoptimism",{symbol:"USDC",decimals:6,address:"0x385b219f0C4fa2e84EfE5aaf9692a821C57B8248",original:"Optimism"}],["WETHbase",{symbol:"WETH",decimals:18,address:"0xd3365E7355230c78098b44B172eE27DAB95B041A",original:"Base"}],["USDCbase",{symbol:"USDC",decimals:6,address:"0xd9E4C283d8A49Dc3767A6F5a4dFdc1d0cEf21604",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:18,address:"0xeE27799cF29D7F64647B92f47d543B382B49f83E",original:"Ethereum"}],["WKLAY",{symbol:"WKLAY",decimals:18,address:"0x787e2F3509583C0F03A339Be0826463C839CBE5E",original:"Klaytn"}],["PYTH",{symbol:"PYTH",decimals:6,address:"0x77ad3B2dA29FBd208F12c3C701E969F4422aAD79",original:"Solana"}]]],["Celo",[["WETH",{symbol:"WETH",decimals:18,address:"0x66803FB87aBd4aaC3cbB3fAd7C3aa01f6F3FB207",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"0x37f750B7cC259A2f741AF45294f6a16572CF5cAd",original:"Ethereum"}],["WBTC",{symbol:"WBTC",decimals:8,address:"0xd71Ffd0940c920786eC4DbB5A12306669b5b81EF",original:"Ethereum"}],["USDT",{symbol:"USDT",decimals:6,address:"0x617f3112bf5397D0467D315cC709EF968D9ba546",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:18,address:"0x97926a82930bb7B33178E3c2f4ED1BFDc91A9FBF",original:"Ethereum"}],["BUSD",{symbol:"BUSD",decimals:18,address:"0x1dd42c0785ca90B677adc2ABad01dfc5ECcD0b4d",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:18,address:"0x9C234706292b1144133ED509ccc5B3CD193BF712",original:"Polygon"}],["USDCpolygon",{symbol:"USDC",decimals:6,address:"0x42c76808f3179A091Ee007A2955aF2522978ADE7",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:18,address:"0xBf2554ce8A4D1351AFeB1aC3E5545AaF7591042d",original:"Bsc"}],["USDCbnb",{symbol:"USDC",decimals:18,address:"0x9d9abAE97a9344e3854527b4efbB366a1564bfEb",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:18,address:"0xFFdb274b4909fC2efE26C8e4Ddc9fe91963cAA4d",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"0x62FFf2D2D1692D52eAf043AeeC727F7918d269D3",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:18,address:"0xd1A342eE2210238233a347FEd61EE7Faf9f251ce",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:18,address:"0x471ece3750da237f93b8e339c536989b8978a438"}],["USDT",{symbol:"USDT",decimals:6,address:"0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e"}],["WGLMR",{symbol:"WGLMR",decimals:18,address:"0x383A5513AbE4Fe36e0E00d484F710148E348Aa9D",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:9,address:"0x4581E64115d46CcdeE65Be2336bEc86c9BA54C01",original:"Solana"}],["USDCsol",{symbol:"USDC",decimals:6,address:"0x8B6eef6C449D3Ac723a9C06a9eaE2dCd7d308BA9",original:"Solana"}],["SUI",{symbol:"SUI",decimals:9,address:"0x1Cb9859B1A16A67ef83A0c7b9A21eeC17d9a97Dc",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"0x89F2b718Ca518db39d377F0ABBa6B42582b549F7",original:"Aptos"}],["WETHarbitrum",{symbol:"WETH",decimals:18,address:"0xc6F962fCcb140ece554AfD0E589f971532A57f14",original:"Arbitrum"}],["USDCarbitrum",{symbol:"USDC",decimals:6,address:"0xA41a62567d9eb960D84b72663FdaeBE0BCdE2683",original:"Arbitrum"}],["WETHoptimism",{symbol:"WETH",decimals:18,address:"0x8d53771b1Ec7461f8e45Bca2609c45bC0bbd0677",original:"Optimism"}],["USDCoptimism",{symbol:"USDC",decimals:6,address:"0xEe48963C003e21EaCEdFA8a0A19BB3cbF7E776Fe",original:"Optimism"}],["WETHbase",{symbol:"WETH",decimals:18,address:"0x905CADB645684140E285e2D09D39dF5a2082BC87",original:"Base"}],["USDCbase",{symbol:"USDC",decimals:6,address:"0x2e2acb1782Aad0490f8446b6fD4626C467987bD6",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:18,address:"0xFaED7314060FCEc652ED91D9eac6c980DCA9D3B8",original:"Ethereum"}],["tBTCarbitrum",{symbol:"tBTC",decimals:18,address:"0x72878E7d3A8746e0c91b9F16F0b8ee4fDE9DDc06",original:"Arbitrum"}],["WKLAY",{symbol:"WKLAY",decimals:18,address:"0xe304254de5c2048F9bFb042dDFB54f84d1d77730",original:"Klaytn"}],["PYTH",{symbol:"PYTH",decimals:6,address:"0x985aa4814419ba338379A634785216301e51113D",original:"Solana"}]]],["Moonbeam",[["WETH",{symbol:"WETH",decimals:18,address:"0xab3f0245B83feB11d15AAffeFD7AD465a59817eD",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"0x931715FEE2d06333043d11F658C8CE934aC61D0c",original:"Ethereum"}],["WBTC",{symbol:"WBTC",decimals:8,address:"0xE57eBd2d67B462E9926e04a8e33f01cD0D64346D",original:"Ethereum"}],["USDT",{symbol:"USDT",decimals:6,address:"0xc30E9cA94CF52f3Bf5692aaCF81353a27052c46f",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:18,address:"0x06e605775296e851FF43b4dAa541Bb0984E9D6fD",original:"Ethereum"}],["BUSD",{symbol:"BUSD",decimals:18,address:"0xa2284e1F98E4d0B7Eb6a6b4f3C57f1b209C755F3",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:18,address:"0x82DbDa803bb52434B1f4F41A6F0Acb1242A7dFa3",original:"Polygon"}],["USDCpolygon",{symbol:"USDC",decimals:6,address:"0x4415BfBDee669446550d55c749007EF60B520FC8",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:18,address:"0xE3b841C3f96e647E6dc01b468d6D0AD3562a9eeb",original:"Bsc"}],["USDCbnb",{symbol:"USDC",decimals:18,address:"0x7f433E22366E03a3758CE22cCf82887d828078f8",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:18,address:"0xd4937A95BeC789CC1AE1640714C61c160279B22F",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"0xd4918c40cA9f02d42Cb53d06587aF42017Bc345D",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:18,address:"0x609AedD990bf45926bca9E4eE988b4Fb98587D3A",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:18,address:"0xc1a792041985F65c17Eb65E66E254DC879CF380b",original:"Celo"}],["GLMR",{symbol:"GLMR",decimals:18,address:"native",wrappedKey:"WGLMR"}],["WGLMR",{symbol:"WGLMR",decimals:18,address:"0xAcc15dC74880C9944775448304B263D191c6077F"}],["WSOL",{symbol:"WSOL",decimals:9,address:"0x99Fec54a5Ad36D50A4Bba3a41CAB983a5BB86A7d",original:"Solana"}],["USDCsol",{symbol:"USDC",decimals:6,address:"0x098d6eE48341D6a0a0A72dE5baaF80A10E0F6082",original:"Solana"}],["SUI",{symbol:"SUI",decimals:9,address:"0x484eCCE6775143D3335Ed2C7bCB22151C53B9F49",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"0x25331575641d35D9765e1934acC8F0991c58e904",original:"Aptos"}],["WETHarbitrum",{symbol:"WETH",decimals:18,address:"0x18872b45c603eD2EbC508b9C5514a85c2e2791FB",original:"Arbitrum"}],["WETHoptimism",{symbol:"WETH",decimals:18,address:"0xd4870F7F5AD8Ae5139E1a5D8AD4ac55204aE4490",original:"Optimism"}],["USDCoptimism",{symbol:"USDC",decimals:6,address:"0x7143e8EA96e158381057a58AfdDF44601c7e532C",original:"Optimism"}],["WETHbase",{symbol:"WETH",decimals:18,address:"0x6C6f83366A42fcA4D30a2D3f1914284de995Ac3a",original:"Base"}],["USDCbase",{symbol:"USDC",decimals:6,address:"0xE6d02a875CcC153c076fe418f33De3A5C420f505",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:18,address:"0xeCd65E4B89495Ae63b4f11cA872a23680A7c419c",original:"Ethereum"}],["WKLAY",{symbol:"WKLAY",decimals:18,address:"0xf0a9476E4712123A807859f9Fd25fe98213379BD",original:"Klaytn"}]]],["Solana",[["WETH",{symbol:"WETH",decimals:8,address:"7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"A9mUU4qviSctJVPJdBJWkb28deg915LYJKrzQ19ji3FM",original:"Ethereum"}],["WBTC",{symbol:"WBTC",decimals:8,address:"3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh",original:"Ethereum"}],["USDT",{symbol:"USDT",decimals:6,address:"Dn4noZ5jgGfkntzcQSUZ8czkreiZ1ForXYoV2H8Dm7S1",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:8,address:"EjmyN6qEC1Tf1JxiG1ae7UTJhUxSwk1TCWNWqxWV4J6o",original:"Ethereum"}],["BUSD",{symbol:"BUSD",decimals:8,address:"33fsBLA8djQm82RpHmE3SuVrPGtZBWNYExsEUeKX1HXX",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:8,address:"Gz7VkD4MacbEB6yC5XD3HcumEiYx2EtDYYrfikGsvopG",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:8,address:"9gP2kCy3wA1ctvYWQk75guqXuHfrEomqydHLtcTCqiLa",original:"Bsc"}],["USDCbnb",{symbol:"USDC",decimals:8,address:"FCqfQSujuPxy6V42UvafBhsysWtEq1vhjfMN1PUbgaxA",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:8,address:"KgV1GvrHQmRBY8sHQQeUKwTm2r2h8t4C8qt12Cw1HVE",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"FHfba3ov5P3RjaiLVgh8FTv4oirxQDoVXuoUUDvHuXax",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:8,address:"DRQBDBEWmwWGK13fRTLhSPzjbvMSUavhV6nW4RUH8W6T",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:8,address:"9kvAcwQbqejuJMd59mKuw2bfSsLRaQ7zuvaTVHEeBBec",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:8,address:"7ixSaXGsHAFy34wogPk2YXiUX3BMmQMFdercdaHLnBby",original:"Moonbeam"}],["SOL",{symbol:"SOL",decimals:9,address:"native",wrappedKey:"WSOL"}],["WSOL",{symbol:"WSOL",decimals:9,address:"So11111111111111111111111111111111111111112"}],["USDCsol",{symbol:"USDC",decimals:6,address:"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}],["SUI",{symbol:"SUI",decimals:8,address:"G1vJEgzepqhnVu35BN4jrkv3wVwkujYWFFCxhbEZ1CZr",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"6LNeTYMqtNm1pBFN8PfhQaoLyegAH8GD32WmHU9erXKN",original:"Aptos"}],["WETHarbitrum",{symbol:"WETH",decimals:8,address:"CSD6JQMvLi46psjHdpfFdr826mF336pEVMJgjwcoS1m4",original:"Arbitrum"}],["USDCarbitrum",{symbol:"USDC",decimals:6,address:"CR4xnGrhsu1fWNPoX4KbTUUtqGMF3mzRLfj4S6YEs1Yo",original:"Arbitrum"}],["WETHoptimism",{symbol:"WETH",decimals:8,address:"8M6d63oL7dvMZ1gNbgGe3h8afMSWJEKEhtPTFM2u8h3c",original:"Optimism"}],["WETHbase",{symbol:"WETH",decimals:8,address:"DWXe1hxpnb8LAH21iyXcjvMbiAGzoYyuCVQtRLvZdLYd",original:"Base"}],["USDCbase",{symbol:"USDC",decimals:6,address:"EfqRM8ZGWhDTKJ7BHmFvNagKVu3AxQRDQs8WMMaoBCu6",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:8,address:"25rXTx9zDZcHyTav5sRqM6YBvTGu9pPH9yv83uAEqbgG",original:"Ethereum"}],["tBTCsol",{symbol:"tBTC",decimals:8,address:"6DNSN2BJsaPFdFFc1zP37kkeNe4Usc1Sqkzr9C9vPWcU"}],["wstETH",{symbol:"wstETH",decimals:8,address:"ZScHuTtqZukUrtZS43teTKGs2VqkKL8k4QCouR2n6Uo",original:"Ethereum"}],["PYTH",{symbol:"PYTH",decimals:6,address:"HZ1JovNiVvGrGNiiYvEozEVgZ58xaU3RKwX8eACQBCt3"}]]],["Sui",[["WETH",{symbol:"WETH",decimals:8,address:"0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5::coin::COIN",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN",original:"Ethereum"}],["WBTC",{symbol:"WBTC",decimals:8,address:"0x27792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881::coin::COIN",original:"Ethereum"}],["USDT",{symbol:"USDT",decimals:6,address:"0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c::coin::COIN",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:8,address:"0xdbe380b13a6d0f5cdedd58de8f04625263f113b3f9db32b3e1983f49e2841676::coin::COIN",original:"Polygon"}],["USDCpolygon",{symbol:"USDC",decimals:6,address:"0x5c8c9082401982e8c2519a5c12883a5475295bf5cec4a0a13c26d35dd9a20d73::coin::COIN",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:8,address:"0xb848cce11ef3a8f62eccea6eb5b35a12c4c2b1ee1af7755d02d7bd6218e8226f::coin::COIN",original:"Bsc"}],["USDCbnb",{symbol:"USDC",decimals:8,address:"0x909cba62ce96d54de25bec9502de5ca7b4f28901747bbf96b76c2e63ec5f1cba::coin::COIN",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:8,address:"0x1e8b532cca6569cab9f9b9ebc73f8c13885012ade714729aa3b450e0339ac766::coin::COIN",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"0xe596782fbaebef51ae99ffac8731aed98a80642b9dc193ed659c97fbc2cc0f84::coin::COIN",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:8,address:"0x6081300950a4f1e2081580e919c210436a1bed49080502834950d31ee55a2396::coin::COIN",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:8,address:"0xa198f3be41cda8c07b3bf3fee02263526e535d682499806979a111e88a5a8d0f::coin::COIN",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:8,address:"0x66f87084e49c38f76502d17f87d17f943f183bb94117561eb573e075fdc5ff75::coin::COIN",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:8,address:"0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8::coin::COIN",original:"Solana"}],["USDCsol",{symbol:"USDC",decimals:6,address:"0xb231fcda8bbddb31f2ef02e6161444aec64a514e2c89279584ac9806ce9cf037::coin::COIN",original:"Solana"}],["SUI",{symbol:"SUI",decimals:9,address:"0x2::sui::SUI"}],["APT",{symbol:"APT",decimals:8,address:"0x3a5143bb1196e3bcdfab6203d1683ae29edd26294fc8bfeafe4aaa9d2704df37::coin::COIN",original:"Aptos"}],["WETHarbitrum",{symbol:"WETH",decimals:8,address:"0x33744e7df340a4d01c23f6b18c13563f767545ea95f976f8045f056358419da3::coin::COIN",original:"Arbitrum"}],["USDCarbitrum",{symbol:"USDC",decimals:6,address:"0xc3f8927de33d3deb52c282a836082a413bc73c6ee0bd4d7ec7e3b6b4c28e9abf::coin::COIN",original:"Arbitrum"}],["WETHoptimism",{symbol:"WETH",decimals:8,address:"0xaab14ec22908de73d1b0619f5e03842398f8e68262981bd35ef44b42d22b23a::coin::COIN",original:"Optimism"}],["USDCoptimism",{symbol:"USDC",decimals:6,address:"0x6037801f060f0f54b3817bca05e3c8b9b9ffaa2da8e93fd5b80fa662aa3c9e55::coin::COIN",original:"Optimism"}],["WETHbase",{symbol:"WETH",decimals:8,address:"0xaecbc804fa7ca7cffc74c9a05eb6ae86fda0c68375b5c1724204a1065bcb239a::coin::COIN",original:"Base"}],["USDCbase",{symbol:"USDC",decimals:6,address:"0x7e3e74afcc1913aa9491c8cee89b02131a6e5519b090f16b54321835c1241cfb::coin::COIN",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:8,address:"0xbc3a676894871284b3ccfb2eec66f428612000e2a6e6d23f592ce8833c27c973::coin::COIN",original:"Ethereum"}],["WKLAY",{symbol:"WKLAY",decimals:8,address:"0xa5ec915864d7f37b25ca9144b2db6ebcf29e73603c2ccf9d0e765adcd9049a98::coin::COIN",original:"Klaytn"}],["PYTH",{symbol:"PYTH",decimals:6,address:"0x9c6d76eb273e6b5ba2ec8d708b7fa336a5531f6be59f326b5be8d4d8b12348a4::coin::COIN",original:"Solana"}]]],["Aptos",[["WETH",{symbol:"WETH",decimals:8,address:"0xcc8a89c8dce9693d354449f1f73e60e14e347417854f029db5bc8e7454008abb::coin::T",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"0x5e156f1207d0ebfa19a9eeff00d62a282278fb8719f4fab3a586a0a2c0fffbea::coin::T",original:"Ethereum"}],["WBTC",{symbol:"WBTC",decimals:8,address:"0xae478ff7d83ed072dbc5e264250e67ef58f57c99d89b447efd8a0a2e8b2be76e::coin::T",original:"Ethereum"}],["USDT",{symbol:"USDT",decimals:6,address:"0xa2eda21a58856fda86451436513b867c97eecb4ba099da5775520e0f7492e852::coin::T",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:8,address:"0x407a220699982ebb514568d007938d2447d33667e4418372ffec1ddb24491b6c::coin::T",original:"Ethereum"}],["BUSD",{symbol:"BUSD",decimals:8,address:"0x77400d2f56a01bad2d7c8c6fa282f62647ce3c03f43f2a8742e47ea01a91e24a::coin::T",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:8,address:"0x6781088e2a1629d38eda521467af4a8ca7bfa7e5516338017940389595c85c0f::coin::T",original:"Polygon"}],["USDCpolygon",{symbol:"USDC",decimals:6,address:"0xc5fd7820e9f053e6dd8e7dd8ca3ce8e9b10d200ba1692bdeb7a035217180ad4a::coin::T",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:8,address:"0x6312bc0a484bc4e37013befc9949df2d7c8a78e01c6fe14a34018449d136ba86::coin::T",original:"Bsc"}],["USDCbnb",{symbol:"USDC",decimals:8,address:"0x79a6ed7a0607fdad2d18d67d1a0e552d4b09ebce5951f1e5c851732c02437595::coin::T",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:8,address:"0x5b1bbc25524d41b17a95dac402cf2f584f56400bf5cc06b53c36b331b1ec6e8f::coin::T",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"0x39d84c2af3b0c9895b45d4da098049e382c451ba63bec0ce0396ff7af4bb5dff::coin::T",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:8,address:"0xd1aa2ff36a0e93e1b4e4fecdecf8bb95bc5de399061c5e84b515281f48718842::coin::T",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:8,address:"0xac0c3c35d50f6ef00e3b4db6998732fe9ed6331384925fe8ec95fcd7745a9112::coin::T",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:8,address:"0x7ab1283a7b13c4254d4e1f803d7ce6578442c1d7a40d0faee41cd48ba4884c8a::coin::T",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:8,address:"0xdd89c0e695df0692205912fb69fc290418bed0dbe6e4573d744a6d5e6bab6c13::coin::T",original:"Solana"}],["USDCsol",{symbol:"USDC",decimals:6,address:"0xc91d826e29a3183eb3b6f6aa3a722089fdffb8e9642b94c5fcd4c48d035c0080::coin::T",original:"Solana"}],["SUI",{symbol:"SUI",decimals:8,address:"0xa72a97e872be9ee3d2f14d56fd511eb7e4a53f4055be3a267d8602e7685b41c0::coin::T",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"0x1::aptos_coin::AptosCoin"}],["WETHarbitrum",{symbol:"WETH",decimals:8,address:"0x0e977796d7bfb3263609b90dffd264c7bd078ce35dac42b55302858d9fa3452b::coin::T",original:"Arbitrum"}],["USDCarbitrum",{symbol:"USDC",decimals:6,address:"0xca3a2c28bc8c6c762f752dd2a4ebbfd00356ca99977ce6636e3af5897124a87a::coin::T",original:"Arbitrum"}],["WETHoptimism",{symbol:"WETH",decimals:8,address:"0x6a7a7f36ef5e2d0e65fcf72669c20d514d68298b0f76c7554517208f73260aaf::coin::T",original:"Optimism"}],["USDCoptimism",{symbol:"USDC",decimals:6,address:"0x4f6ecb05a797902d472abc2f5804bde93a53d8b75f14f767824cdb1623a4ee83::coin::T",original:"Optimism"}],["WETHbase",{symbol:"WETH",decimals:8,address:"0x5b5f14781164cf77185a7b6acd8e4f3cbb7e7cfb1cd5760d2b8af81075fc153d::coin::T",original:"Base"}],["USDCbase",{symbol:"USDC",decimals:6,address:"0xfcc4fcd734d5b8578fb629d238d15264a49eca6165c7444c21feec3b4962eb88::coin::T",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:8,address:"0x9d5a0f8215301fa8096df332b1533f6328f18c32fbac2a7089cfbea73b3068a7::coin::T",original:"Ethereum"}],["WKLAY",{symbol:"WKLAY",decimals:8,address:"0x539b652f8230a0e42adaeda4706b5639893d22362eda6ea897493c210cb48219::coin::T",original:"Klaytn"}],["PYTH",{symbol:"PYTH",decimals:6,address:"0x770211b47954e15bec1a4271bf33bacebc2d2adb43b7dc1ca45efa787615dd4c::coin::T",original:"Solana"}]]],["Base",[["WETH",{symbol:"WETH",decimals:18,address:"0x71b35ECb35104773537f849FBC353F81303A5860",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"0xec267C53f53807c2337C257f8AC3Fc3cC07cc0ed",original:"Ethereum"}],["WBTC",{symbol:"WBTC",decimals:8,address:"0xE6396f780b543dF16ee3b784D789c75B68319db0",original:"Ethereum"}],["USDT",{symbol:"USDT",decimals:6,address:"0xFf0C62A4979400841eFaA6faADb07Ac7d5C98b27",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:18,address:"0x617Edadb51BfB43A44Bb91C7402129C23bA52381",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:18,address:"0xc863399E5c5C4011B1DC3fB602902C77BA72B709",original:"Polygon"}],["USDCpolygon",{symbol:"USDC",decimals:6,address:"0xFe1579BAc60363c8572CB30Bf4DD1Fd85811BBF8",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:18,address:"0x7fdAa50d7399ac436943028edA6ed9a1BD89509f",original:"Bsc"}],["USDCbnb",{symbol:"USDC",decimals:18,address:"0x68E2b07F92ed506f92935d7359ECA84D5342dbb4",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:18,address:"0xc449A60A31E1eebFE83c42E9465fd4Dc318aE9a7",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"0xD83385fE100E20c269a5975D4Bf92525BcE09F87",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:18,address:"0x936Fa2DE8380Dc5BF34C80F1BaD53a9f3630263B",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:18,address:"0x74df3823aA29D278cAD0A3632fCB56C896a38eD4",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:18,address:"0xfdB7311BeC3b2CcCF8407d0585f81B97b3b5eff1",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:9,address:"0x1C61629598e4a901136a81BC138E5828dc150d67",original:"Solana"}],["USDCsol",{symbol:"USDC",decimals:6,address:"0xe8CE40EBBB844142400D21558a2F1c9683d69139",original:"Solana"}],["SUI",{symbol:"SUI",decimals:9,address:"0x36c6FBF7B49bF65f5F82b674af219C05b2a4aDD1",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"0x1d36126289Be1658297A35CC3EB2BB80A7D7A04b",original:"Aptos"}],["WETHarbitrum",{symbol:"WETH",decimals:18,address:"0x9D36e0edb8BBaBeec5edE8a218dc2B9a6Fce494F",original:"Arbitrum"}],["USDCarbitrum",{symbol:"USDC",decimals:6,address:"0xb96B82Cd6D45d98Fb6897D16A5E4EE888329C513",original:"Arbitrum"}],["WETHoptimism",{symbol:"WETH",decimals:18,address:"0xCb725aC8d9985D3bE306Dd9e1517d3702929176c",original:"Optimism"}],["USDCoptimism",{symbol:"USDC",decimals:6,address:"0xc6bfBeb3002aD563D2d1f72614C61C83Bf147Acd",original:"Optimism"}],["ETHbase",{symbol:"ETH",decimals:18,address:"native",wrappedKey:"WETHbase"}],["WETHbase",{symbol:"WETH",decimals:18,address:"0x4200000000000000000000000000000000000006"}],["USDCbase",{symbol:"USDC",decimals:6,address:"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}],["wstETHbase",{symbol:"wstETH",decimals:18,address:"0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452"}],["tBTC",{symbol:"tBTC",decimals:18,address:"0x9EE95E6Bd1B3C5740F105d6fb06b8BDeF64Eec70",original:"Ethereum"}],["tBTCarbitrum",{symbol:"tBTC",decimals:18,address:"0x56D0873e0eCA4a56063e1BF945788365666CFBFC",original:"Arbitrum"}],["tBTCbase",{symbol:"tBTC",decimals:18,address:"0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b"}],["wstETH",{symbol:"wstETH",decimals:18,address:"0xEd4e2FD35161c3c0e33cA187fce64C70d44Ce32b",original:"Ethereum"}],["WKLAY",{symbol:"WKLAY",decimals:18,address:"0x41c433c146c47Dc53FC48cDc69e406e365e298E1",original:"Klaytn"}],["PYTH",{symbol:"PYTH",decimals:6,address:"0x4c5d8A75F3762c1561D96f177694f67378705E98",original:"Solana"}],["USDTbase",{symbol:"USDT",decimals:6,address:"0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2"}]]],["Arbitrum",[["WETH",{symbol:"WETH",decimals:18,address:"0xD8369C2EDA18dD6518eABb1F85BD60606dEb39Ec",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"0xC96F2715E2a242d50D1b0bC923dbe1740b8eCf18",original:"Ethereum"}],["WBTC",{symbol:"WBTC",decimals:8,address:"0x397846a8078d4845c7f5c6Ca76aeBbcFDc044fAe",original:"Ethereum"}],["USDT",{symbol:"USDT",decimals:6,address:"0xE4728F3E48E94C6DA2B53610E677cc241DAFB134",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:18,address:"0x5c4f2FEFB97F7DF09E762d95C83f0Ccf8bCe8234",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:18,address:"0x3ab0E28C3F56616aD7061b4db38aE337E3809AEA",original:"Polygon"}],["USDCpolygon",{symbol:"USDC",decimals:6,address:"0x599ADB10E6A012dF34935D47407450f6D7170e3C",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:18,address:"0x7AF00405916D823eDb1121546EfA6F4972B51b84",original:"Bsc"}],["USDCbnb",{symbol:"USDC",decimals:18,address:"0x1a0590F951bc9C3818Ce75ba5Bbe92831b2cf57e",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:18,address:"0x565609fAF65B92F7be02468acF86f8979423e514",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"0x93e0FcbEd43CD6fC30DF00CcBD4669718dc74e77",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:18,address:"0x7f7dcDb91930033a4Eb269196EBb6fd5f0644E4B",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:18,address:"0x4E51aC49bC5e2d87e0EF713E9e5AB2D71EF4F336",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:18,address:"0x944C5b67a03e6Cb93Ae1E4B70081f13b04CDB6Bd",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:9,address:"0x2bcC6D6CdBbDC0a4071e48bb3B969b06B3330c07",original:"Solana"}],["USDCsol",{symbol:"USDC",decimals:6,address:"0x3870546cfd600ba87e4180686d29dC993A45d3B7",original:"Solana"}],["SUI",{symbol:"SUI",decimals:9,address:"0xCF79d86B8a830030aF6D835737d6eac3bE823fD7",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"0x4EdeF400eDe5309240814b5FC403F224504604e9",original:"Aptos"}],["ETHarbitrum",{symbol:"ETH",decimals:18,address:"native",wrappedKey:"WETHarbitrum"}],["WETHarbitrum",{symbol:"WETH",decimals:18,address:"0x82af49447d8a07e3bd95bd0d56f35241523fbab1"}],["USDCarbitrum",{symbol:"USDC",decimals:6,address:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831"}],["WETHoptimism",{symbol:"WETH",decimals:18,address:"0xB1fC645a86fB5085e12D8BDDb77702F728D2A26F",original:"Optimism"}],["USDCoptimism",{symbol:"USDC",decimals:6,address:"0x3A5C2Da9E30741cb59a5e9446A23A86886fC9DC2",original:"Optimism"}],["WETHbase",{symbol:"WETH",decimals:18,address:"0xBAfbCB010D920e0Dab9DFdcF634De1B777028a85",original:"Base"}],["USDCbase",{symbol:"USDC",decimals:6,address:"0x8619F97D4d08382548F536E5CE1D3e0D9bA40326",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:18,address:"0x57723abc582DBfE11Ea01f1A1f48aEE20bD65D73",original:"Ethereum"}],["tBTCpolygon",{symbol:"tBTC",decimals:18,address:"0x3bab04bDFd2Dc3640c2B9390A2Da05bC1192D482",original:"Polygon"}],["tBTCoptimism",{symbol:"tBTC",decimals:18,address:"0x2519010b6585247BcDC8BcDa5C8730Be754b8c76",original:"Optimism"}],["tBTCarbitrum",{symbol:"tBTC",decimals:18,address:"0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40"}],["wstETH",{symbol:"wstETH",decimals:18,address:"0xf2717122Dfdbe988ae811E7eFB157aAa07Ff9D0F",original:"Ethereum"}],["wstETHarbitrum",{symbol:"wstETH",decimals:18,address:"0x5979D7b546E38E414F7E9822514be443A4800529"}],["WKLAY",{symbol:"WKLAY",decimals:18,address:"0xFA95f6c796E54F9C4a99392CAE84410a25794BB3",original:"Klaytn"}],["PYTH",{symbol:"PYTH",decimals:6,address:"0xE4D5c6aE46ADFAF04313081e8C0052A30b6Dd724",original:"Solana"}],["USDTarbitrum",{symbol:"USDT",decimals:6,address:"0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"}]]],["Optimism",[["WETH",{symbol:"WETH",decimals:18,address:"0xb47bC3ed6D70F04fe759b2529c9bc7377889678f",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"0x711e53D031ea9B0bb0C24dD506df11b41AEA419e",original:"Ethereum"}],["WBTC",{symbol:"WBTC",decimals:8,address:"0xB214C19d81c99E75e84706a3aa0A757319023e26",original:"Ethereum"}],["USDT",{symbol:"USDT",decimals:6,address:"0xf6B4185FCf8aF291c0E3927fbEab7046b4f6A8CA",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:18,address:"0x098EA47D630b46df1E08e389e5e4466119c7dd30",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:18,address:"0x8f02B6a32cebcAe44D2Fd17d87966f5B5dD14c6d",original:"Polygon"}],["USDCpolygon",{symbol:"USDC",decimals:6,address:"0xbB1EaB9Eb8fDf65F0E291D013DA07B4b65a27a01",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:18,address:"0x6A09fE65ACa27C12573F04aAFa290bD75497E1BC",original:"Bsc"}],["USDCbnb",{symbol:"USDC",decimals:18,address:"0x1C15057d1F3794C934a6cBC1f7EceE934050F219",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:18,address:"0x8418C1d909842f458c9394886b83F19d62bF1A0D",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"0x355f0a8a7ecAeD971b8Fbd50994558291ff2413a",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:18,address:"0x0b0ecbe5C3995541876d27633B63296570FB34Af",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:18,address:"0x9b88D293b7a791E40d36A39765FFd5A1B9b5c349",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:18,address:"0xbffD46DFDb8d3a02b8D2E0F864a2cD712090a4D3",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:9,address:"0xba1Cf949c382A32a09A17B2AdF3587fc7fA664f1",original:"Solana"}],["USDCsol",{symbol:"USDC",decimals:6,address:"0x6F974A6dfD5B166731704Be226795901c45Bb815",original:"Solana"}],["SUI",{symbol:"SUI",decimals:9,address:"0x27A533e438892DA192725b4C9AcA51447F457212",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"0xC5B3AC2DF8D8D7AC851F763a5b3Ff23B4A696d59",original:"Aptos"}],["WETHarbitrum",{symbol:"WETH",decimals:18,address:"0x825206E1D29456337769e6f1384101E997C6A732",original:"Arbitrum"}],["USDCarbitrum",{symbol:"USDC",decimals:6,address:"0xa6252F56cc6eEA21165d56744C795F91c8a3Cf68",original:"Arbitrum"}],["ETHoptimism",{symbol:"ETH",decimals:18,address:"native",wrappedKey:"WETHoptimism"}],["WETHoptimism",{symbol:"WETH",decimals:18,address:"0x4200000000000000000000000000000000000006"}],["USDCoptimism",{symbol:"USDC",decimals:6,address:"0x0b2c639c533813f4aa9d7837caf62653d097ff85"}],["WETHbase",{symbol:"WETH",decimals:18,address:"0x3F369a664fa665e01e8EB9f20bFcE03A0CAb8971",original:"Base"}],["USDCbase",{symbol:"USDC",decimals:6,address:"0xb931c7BbD87A6e249EaA7355B13927F9c99Bce87",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:18,address:"0xeC0a755664271b87002dDa33CA2484B24aF68912",original:"Ethereum"}],["tBTCpolygon",{symbol:"tBTC",decimals:18,address:"0xE4C32B9eA749fa0342B1C42C01E80028B97c3917",original:"Polygon"}],["tBTCoptimism",{symbol:"tBTC",decimals:18,address:"0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40"}],["tBTCarbitrum",{symbol:"tBTC",decimals:18,address:"0x2390a5131fcba6e47f702172cF4876589E4161c6",original:"Arbitrum"}],["wstETH",{symbol:"wstETH",decimals:18,address:"0x855CFcEEe998c8ca34F9c914F584AbF72dC88B87",original:"Ethereum"}],["wstETHoptimism",{symbol:"wstETH",decimals:18,address:"0x1F32b1c2345538c0c6f582fCB022739c4A194Ebb"}],["WKLAY",{symbol:"WKLAY",decimals:18,address:"0xbbeF8233a0d10EEAb84E913FaDB337ab9b62F683",original:"Klaytn"}],["PYTH",{symbol:"PYTH",decimals:6,address:"0x99C59ACeBFEF3BBFB7129DC90D1a11DB0E91187f",original:"Solana"}],["USDToptimism",{symbol:"USDT",decimals:6,address:"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58"}]]],["Wormchain",[["WETH",{symbol:"WETH",decimals:8,address:"wormhole18csycs4vm6varkp00apuqlsm7v4twg8jsljk8wfdd7cghr7g4rtslwqndm",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"wormhole1utjx3594tlvfw4375esgu72wa4sdgf0q7x4ye27husf5kvuzp5rsr72gdq",original:"Ethereum"}],["WBTC",{symbol:"WBTC",decimals:8,address:"wormhole1nz0r0au8aj6dc00wmm3ufy4g4k86rjzlr8wkf92cktdlps5lgfcqxnx9yk",original:"Ethereum"}],["USDT",{symbol:"USDT",decimals:6,address:"wormhole1w27ekqvvtzfanfxnkw4jx2f8gdfeqwd3drkee3e64xat6phwjg0savgmhw",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:8,address:"wormhole1chejx4qqtvwxy6684yrsmf6pylancxqhk3vsmtleg5ta3zrffljqfscg87",original:"Ethereum"}],["BUSD",{symbol:"BUSD",decimals:8,address:"wormhole1msyushf6d76u9wupuvm6jdvc0x4trmv5w5kxr0hyt7n9npp233usg7pkhm",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:8,address:"wormhole1xmpenz0ykxfy8rxr3yc3d4dtqq4dpas4zz3xl6sh873us3vajlpszn4ph7",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:8,address:"wormhole169nr66h9gcsfljvsnxnqfjakskcjt6ac8f58wqjuagu79m540teqfvaal4",original:"Bsc"}],["USDCbnb",{symbol:"USDC",decimals:8,address:"wormhole1g3acw7aumaj3r348cqn4kazrehlmn822w9p46sqwztnke27h3lysxj4ddr",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:8,address:"wormhole1ml922hnp59jtq9a87arekvx60ezehwlg2v3j5pduplwkenfa68ksgmzxwr",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"wormhole1gwm6mrnse9atzf4mer4dnrz64mp6pa75wpsxywu8gymt9fwsk46sfr372u",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:8,address:"wormhole1e0cwfmla7exa578xddl87paxexw9ymwrzysfjms8c2mstxjkldlqn45jqa",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:8,address:"wormhole1kqey3a6k26kyensq7elcpx229tlj4d3qlshwhjq5xjm8dcdvu60qtef8k9",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:8,address:"wormhole1gzuv84xrwwhxhf0f62av279vfyrfrm7x58fcnadlr5m90gnx223ses2st0",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:8,address:"wormhole1wn625s4jcmvk0szpl85rj5azkfc6suyvf75q6vrddscjdphtve8sca0pvl",original:"Solana"}],["USDCsol",{symbol:"USDC",decimals:6,address:"wormhole17fr8awnysyv3nt5je4strczdupssl8u9jqam890jfv72sh32yyqqhtg3ry",original:"Solana"}],["SUI",{symbol:"SUI",decimals:8,address:"wormhole19hlynxzedrlqv99v6qscww7d3crhl86qtd0vprpltg5g9xx6jk9q6ya33y",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"wormhole1f9sxjn0qu8xylcpzlvnhrefnatndqxnrajfrnr5h97hegnmsdqhsh6juc0",original:"Aptos"}],["WETHarbitrum",{symbol:"WETH",decimals:8,address:"wormhole18nlwscr7290j463vcptqlgqudycry2rdnw2ysltpc2nqefk3353s808rl9",original:"Arbitrum"}],["WETHoptimism",{symbol:"WETH",decimals:8,address:"wormhole1ev8rhdflmlq6de5g7ttj585fhuv3jfhnuhfzyh7qrswhzaq2tkqswxz6y3",original:"Optimism"}],["USDCoptimism",{symbol:"USDC",decimals:6,address:"wormhole1snw0qugpjcxwtxzzkqt5guwavq85eumxzeagql2u2m662xrtnjuqyj3pkj",original:"Optimism"}],["USDCbase",{symbol:"USDC",decimals:6,address:"wormhole1edkult6zudk6ld23fesjfrehux35q86engsq5jlycl0e4upkz8mqkgcprf",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:8,address:"wormhole1nu9wf9dw384attnpu0pwfet5fajn05w2ex4r07mghvk3xcwrt2yq5uutp5",original:"Ethereum"}],["tBTCpolygon",{symbol:"tBTC",decimals:8,address:"wormhole1uj24zecnaxz7ftz0sh6dsayfene4w3yptwg0422kves9duel67vsr7hlyz",original:"Polygon"}],["tBTCarbitrum",{symbol:"tBTC",decimals:8,address:"wormhole1q8ynvqvtw49ln73mn70v4me4q03fvvmhkf2lh4ueam5w4362s2asjmvxtd",original:"Arbitrum"}],["wstETH",{symbol:"wstETH",decimals:8,address:"wormhole1gg6f95cymcfrfzhpek7cf5wl53t5kng52cd2m0krgdlu8k58vd8qezy8pt",original:"Ethereum"}],["WKLAY",{symbol:"WKLAY",decimals:8,address:"wormhole1kyy876kye7k79fuzat532yyqkrzhlr6l7hc7lfa2rk5tygzhy00qrhjgkc",original:"Klaytn"}]]],["Osmosis",[["WETH",{symbol:"WETH",decimals:8,address:"ibc/62F82550D0B96522361C89B0DA1119DE262FBDFB25E5502BC5101B5C0D0DBAAC",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"ibc/6B99DB46AA9FF47162148C1726866919E44A6A5E0274B90912FD17E19A337695",original:"Ethereum"}],["WBTC",{symbol:"WBTC",decimals:8,address:"ibc/E4CD61E1FA3EB04EF1BF924D676AB9FD55E84A0DCF4E78C11CCA0E14E5B42672",original:"Ethereum"}],["USDT",{symbol:"USDT",decimals:6,address:"ibc/2108F2D81CBE328F371AD0CEF56691B18A86E08C3651504E42487D9EE92DDE9C",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:8,address:"ibc/898ACF6F5DEBF535103BBD52E3E5B70A311AD097B198A152483F69290B4210C0",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:8,address:"ibc/03B6D1925A09B3033AA6FA8772202719ABDC51F8CC2A5C26D0A9B19832F2C023",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:8,address:"ibc/5394BB30B3C9BD1EE84C9531E5094DDE2490964F518CBE8A4C91F748CE559AF5",original:"Bsc"}],["USDCbnb",{symbol:"USDC",decimals:8,address:"ibc/B28ACEF11D063FA8B1DA73C2F7DA3A1CFCCBC13E96B671698D4860E9367B55BB",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:8,address:"ibc/22B44C7369EED16089B9840ADE399B80D9483B4E459E67643C96C681D7C463D0",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"ibc/0B3C3D06228578334B66B57FBFBA4033216CEB8119B27ACDEE18D92DA5B28D43",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:8,address:"ibc/397DFE63D87F6940ECA583DFF5461E48BF0BA6554CBBE70278E307DDFDC8E9D5",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:8,address:"ibc/83300733052AB5F6E0F0C221E24189B6DF26CC94C73D2F44627627F9DEF4A9C8",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:8,address:"ibc/0F2941B0168D8DB77DA1B6A2D3A95EC04026D3C97FA3BFE8FD1D5D3F983AA518",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:8,address:"ibc/1E43D59E565D41FB4E54CA639B838FFD5BCFC20003D330A56CB1396231AA1CBA",original:"Solana"}],["USDCsol",{symbol:"USDC",decimals:6,address:"ibc/F08DE332018E8070CC4C68FE06E04E254F527556A614F5F8F9A68AF38D367E45",original:"Solana"}],["SUI",{symbol:"SUI",decimals:8,address:"ibc/B1C287C2701774522570010EEBCD864BCB7AB714711B3AA218699FDD75E832F5",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"ibc/A4D176906C1646949574B48C1928D475F2DF56DE0AC04E1C99B08F90BC21ABDE",original:"Aptos"}],["USDCbase",{symbol:"USDC",decimals:6,address:"ibc/8AC0F990290BBEF3AEBFCBF70F902AD954781BB40D07EB76341272800D48D05F",original:"Base"}],["OSMO",{symbol:"OSMO",decimals:6,address:"uosmo"}],["tBTC",{symbol:"tBTC",decimals:8,address:"ibc/6207D35D2C08F2162575C3C4BFD524226E50639121A273045F1B393AF67DCEB3",original:"Ethereum"}],["wstETH",{symbol:"wstETH",decimals:8,address:"ibc/BF75AE1500CB7EC458E91A11731F1B6AC1F1FE1FA937A88564955ED6A83CA2FB",original:"Ethereum"}]]],["Evmos",[["WETH",{symbol:"WETH",decimals:8,address:"ibc/4442A8E0D487A49E76EA6606F5DADCF8D0DBDD8499112340C964970DB745EDA2",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"ibc/0C19171CDC59451F91D2749CDEA63355532DCD5D8904CCBAC4953290E16AB8FD",original:"Ethereum"}],["WBTC",{symbol:"WBTC",decimals:8,address:"ibc/46C5DA1CB61C5BAA8730ABA467ADD58DE0333B075CACE28BC87E64AE8C9CA051",original:"Ethereum"}],["USDT",{symbol:"USDT",decimals:6,address:"ibc/C9072A294F5649D64E87A6998DD750576881E454CACCDAF7376EFC0FA243808D",original:"Ethereum"}],["USDCbnb",{symbol:"USDC",decimals:8,address:"ibc/8E08C01546EF346F7E9A3600DDBC88943ADF3B20A67F1F2DD7B83D85613BCCAB",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:8,address:"ibc/2EA2FE172078576E62DA20F14EEED12B26611D93150FE1D68E1AAE00479AC335",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"ibc/39913E647C3549D663B1ED7F0745E1779515170C5215B98B2C8410B4C073AD30",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:8,address:"ibc/9EFE5F5D75A87197DD257BA7A96A3BCCEC9DB59D257C742FB5AA9D3DF612D476",original:"Fantom"}],["WSOL",{symbol:"WSOL",decimals:8,address:"ibc/4443218F584A7AB2DFBCF93872D6E5B6967A11C53515DDF45A2CF387C54BD73A",original:"Solana"}],["WETHarbitrum",{symbol:"WETH",decimals:8,address:"ibc/9E2E7B4A53409267CD686F4EB67969C2602A0F5FF9BDB1082B00E71CC4815DDE",original:"Arbitrum"}],["EVMOS",{symbol:"EVMOS",decimals:18,address:"aevmos"}]]],["Kujira",[["WETH",{symbol:"WETH",decimals:8,address:"ibc/7D9D28CABB49A4BB1A50C3B7E4544BFDBC5DDFAEB84A7787755A34CE7196CE15",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"ibc/C5EADE2C526B9629D230AC02A97644984ACB7C2F9A6C85126D1025CB0DA42588",original:"Ethereum"}],["WBTC",{symbol:"WBTC",decimals:8,address:"ibc/B2C7F21B604E3974A7DA5DAA9395905F2F3C85392F8A221CFDF62E4A9F4E48E4",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:8,address:"ibc/3CE8A3DE4AE5AE2B4B8C03B2B227CC284732EDC849E506615FF2AA3D8EB1BAFC",original:"Ethereum"}],["WAVAX",{symbol:"WAVAX",decimals:8,address:"ibc/28E7241F6508EB4692C721E91201377323796EF2758CCD83D220A40EAD32601E",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"ibc/F9F41DB8DA49EA6AB9EB4B2C9E0ECDC2502ABDA2FE728B85994BF31240CBC163",original:"Avalanche"}],["CELO",{symbol:"CELO",decimals:8,address:"ibc/4ACD155D71182398277CBD2C630A7C8C5F0F16FFF77965FDE4C845A4CDE2D60C",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:8,address:"ibc/3D337ECC89A8421DD6F33C4B7DDE9D4A18D728A4A688BA30E41F466EC8DD3869",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:8,address:"ibc/E5CA126979E2FFB4C70C072F8094D07ECF27773B37623AD2BF7582AD0726F0F3",original:"Solana"}],["SUI",{symbol:"SUI",decimals:8,address:"ibc/EBA52E7239CC1BC7F8ECF4F41523B6DD477FF067FD953315704A9A4FD2131B48",original:"Sui"}],["KUJI",{symbol:"KUJI",decimals:6,address:"ukuji"}]]],["Klaytn",[["KLAY",{symbol:"KLAY",decimals:18,address:"native",wrappedKey:"WKLAY"}],["WKLAY",{symbol:"WKLAY",decimals:18,address:"0xe4f05A66Ec68B54A58B17c22107b02e0232cC817"}]]]],Ld=we(Ap,[0,[1,2]]),wp=[["Ethereum",[["ETH",{symbol:"ETH",decimals:18,address:"native",wrappedKey:"WETH"}],["WETH",{symbol:"WETH",decimals:18,address:"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6"}],["USDCeth",{symbol:"USDC",decimals:6,address:"0x07865c6e87b9f70255377e024ace6630c1eaa37f"}],["WBTC",{symbol:"WBTC",decimals:8,address:"0xC04B0d3107736C32e19F1c62b2aF67BE61d63a05"}],["USDT",{symbol:"USDT",decimals:6,address:"0xC2C527C0CACF457746Bd31B2a698Fe89de2b6d49"}],["DAI",{symbol:"DAI",decimals:18,address:"0x11fE4B6AE13d2a6055C8D9cF65c55bac32B5d844"}],["WMATIC",{symbol:"WMATIC",decimals:18,address:"0x7cd0e8ff09cEB653813bD3d63d0554c1CB4BFdf6",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:18,address:"0xB19693FEB013Bab65866dE0a845a9511064230cE",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:18,address:"0x4C1b727f6df3B075E682C41a25687A69846aaC04",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"0xF6699D3f725C4b64Cc6010F2DF77B4B05C76Cd5C",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:18,address:"0x0d7A9Cdbb7C21E64825cF81750A5081a32aFb5d4",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:18,address:"0xe092525a787CD56B901279b5864a224c22B95B72",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:18,address:"0x0dc83BB61008A5E1194fe50fA9E474713C1AEcD7",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:9,address:"0x494701CE895389d917a938f0ea202D4eB9684Eab",original:"Solana"}],["SUI",{symbol:"SUI",decimals:9,address:"0x70F7360C49D227ccBbb98fB7B69B7CDB651195bb",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"0xd7A89a8DD20Cb4F252c7FB96B6421b37d82cE506",original:"Aptos"}],["USDCarbitrum",{symbol:"USDC",decimals:6,address:"0xd962F26D93c4eF609Ba00Ed6101326A1490B9489",original:"Arbitrum"}],["WETHbase",{symbol:"WETH",decimals:18,address:"0x76e39239e40857030D6f4D8545EFbd71F904d344",original:"Base"}],["USDCbase",{symbol:"USDC",decimals:6,address:"0x5aA392243437dDC8b4d86bfC90DF296908740A41",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:18,address:"0x679874fBE6D4E7Cc54A59e315FF1eB266686a937"}],["tBTCarbitrum",{symbol:"tBTC",decimals:18,address:"0x575D93A2278FbF4E8Bd3d51B539a6E237C3F17c5",original:"Arbitrum"}],["tBTCsol",{symbol:"tBTC",decimals:8,address:"0x57A52B6F0b393AF7d36116183cA83E584e636eA4",original:"Solana"}],["wstETH",{symbol:"wstETH",decimals:18,address:"0x6320cD32aA674d2898A68ec82e869385Fc5f7E2f"}],["SEI",{symbol:"SEI",decimals:6,address:"0xd68df72136207E9471C915cf1B6Cf43D587D4E0A",original:"Sei"}],["WKLAY",{symbol:"WKLAY",decimals:18,address:"0x327e0c7D5cFa65d4f9E358dC9fA4446C49dBcB6C",original:"Klaytn"}]]],["Polygon",[["WETH",{symbol:"WETH",decimals:18,address:"0xc6735cc74553Cc2caeB9F5e1Ea0A4dAe12ef4632",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"0x543237045a106D7fd2eE3e2B44b5728e70BDe9c3",original:"Ethereum"}],["USDT",{symbol:"USDT",decimals:6,address:"0x02E30E84161BE1aBfcBB2b154B11De4C2b5E0a32",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:18,address:"0x87374d35C5F1bD78c2b1da383F460e154e7D3E5e",original:"Ethereum"}],["MATIC",{symbol:"MATIC",decimals:18,address:"native",wrappedKey:"WMATIC"}],["WMATIC",{symbol:"WMATIC",decimals:18,address:"0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889"}],["USDCpolygon",{symbol:"USDC",decimals:6,address:"0x9999f7fea5938fd3b1e26a12c3f2fb024e194f97"}],["WBNB",{symbol:"WBNB",decimals:18,address:"0x0C63D8ADB69204b2946DcB945a6f16d97C255eE2",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:18,address:"0x51f3D34651523dD8CC4872ee261A1B0B3f73AceF",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"0xcc048C353Fdc2f5c378B7BCab9B240Ca2b619f1c",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:18,address:"0x84aa9100a36D6c3514605F62342abF3cE77D5b97",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:18,address:"0xAd027790A64331A11bd1b651739450cC9Dc0098F",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:18,address:"0x693b9AC2199d989bDA8C9C5b5d7A3680B4f40dAa",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:9,address:"0x0284B4994456Fae4cb56E4d33228d51B674EAD1b",original:"Solana"}],["SUI",{symbol:"SUI",decimals:9,address:"0x3dadA6f29f80A0427C4989E17a5a2ada17441841",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"0x226B436043B537BD158e84fA199E2Aa36bf364f8",original:"Aptos"}],["WETHoptimism",{symbol:"WETH",decimals:18,address:"0xC77d781f38Cf52F8Ea0b4c0F22312bB9A34911b5",original:"Optimism"}],["WETHbase",{symbol:"WETH",decimals:18,address:"0x68C4365d5229A44D9A59058B65500365492b5307",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:18,address:"0xf6CC0Cc8D54a4b1A63a0E9745663e0c844Ee4D48",original:"Ethereum"}],["tBTCpolygon",{symbol:"tBTC",decimals:18,address:"0xBcD7917282E529BAA6f232DdDc75F3901245A492"}],["SEI",{symbol:"SEI",decimals:6,address:"0xc5C0229B38564E1E8083031405Be8d6E6e3Bc462",original:"Sei"}],["WKLAY",{symbol:"WKLAY",decimals:18,address:"0x7b34f3711705eB2963fB856cda063C979de4749e",original:"Klaytn"}]]],["Bsc",[["WETH",{symbol:"WETH",decimals:18,address:"0x064a85eac6b4Bd7190BCAd3458dBD9459989c37B",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"0x861B5C16A2EcED022241072A7beA9D530b99EB6f",original:"Ethereum"}],["USDT",{symbol:"USDT",decimals:6,address:"0xe94AaBAdB6F833f65B8A9AdDD030985B775188c9",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:18,address:"0x45082C9Fc6BBCa72288F47Fad21dE0BECC75759E",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:18,address:"0x7FCDA925f0994121752ca14C334297BeC3d0eA9E",original:"Polygon"}],["BNB",{symbol:"BNB",decimals:18,address:"native",wrappedKey:"WBNB"}],["WBNB",{symbol:"WBNB",decimals:18,address:"0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd"}],["WAVAX",{symbol:"WAVAX",decimals:18,address:"0x6cE9E2c8b59bbcf65dA375D3d8AB503c8524caf7",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"0x1cfeCf72bcBE1E429A21A5B11E708C7c397AaC54",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:18,address:"0x9aB305B792DBdb8253bEE909E7006611Cb45175b",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:18,address:"0x1471698cBD9cAB0228F2EEA9303A2b3aA0ABDC2B",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:18,address:"0x5C31B36599ED7f06b09c0ffC7A2F928cE496F046",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:9,address:"0x30f19eBba919954FDc020B8A20aEF13ab5e02Af0",original:"Solana"}],["USDCsol",{symbol:"USDC",decimals:6,address:"0x51a3cc54eA30Da607974C5D07B8502599801AC08",original:"Solana"}],["SUI",{symbol:"SUI",decimals:9,address:"0x5A73D76e09Af2E428EC64aE10F91B78AC990B298",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"0x4A7Bd5E135f421057F97BbA8BCeeE5c18334f454",original:"Aptos"}],["WETHarbitrum",{symbol:"WETH",decimals:18,address:"0x60845E2503Fcd945b3A6f0bC077a31CC913E654D",original:"Arbitrum"}],["USDCarbitrum",{symbol:"USDC",decimals:6,address:"0xe3aA397cb6d93Cce4fAd9Cc9E796CCa5E50FB5ED",original:"Arbitrum"}],["WETHbase",{symbol:"WETH",decimals:18,address:"0x63108fC941F3cCE0B484De19746B5Af949EAF6eE",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:18,address:"0xE7176110261ef2FfC885dd568C1093f58F0aEee9",original:"Ethereum"}],["SEI",{symbol:"SEI",decimals:6,address:"0x79A8FFFCED130314eCC8782C846c4d8d4867A900",original:"Sei"}],["WKLAY",{symbol:"WKLAY",decimals:18,address:"0x79D34FDb686B5D139949E4F92D83EEe376489176",original:"Klaytn"}]]],["Avalanche",[["WETH",{symbol:"WETH",decimals:18,address:"0xbB5A2dC896Ec4E2fa77F40FA630582ed9c6D0172",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"0x63A30f239DC8d1c17Bf6653a68Fc6C2F83641E6d",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:18,address:"0x3989C9c4bdd30400E6Aa90990683EAd6a1638A16",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:18,address:"0x78554394273957d7e55afC841aeA27Cce469AEd4",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:18,address:"0x10F1053bF2884b28ee0Bd7a2dDBa237Af3511d29",original:"Bsc"}],["AVAX",{symbol:"AVAX",decimals:18,address:"native",wrappedKey:"WAVAX"}],["WAVAX",{symbol:"WAVAX",decimals:18,address:"0xd00ae08403B9bbb9124bB305C09058E32C39A48c"}],["USDCavax",{symbol:"USDC",decimals:6,address:"0x5425890298aed601595a70AB815c96711a31Bc65"}],["WFTM",{symbol:"WFTM",decimals:18,address:"0x094cB577C21Ab1360178beE74B9591fa12216dAD",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:18,address:"0xC66d9c2b33c347d4A4441975f4688fcD5DD4c441",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:18,address:"0xf080782DF38eD5228D2FC2882d13D56c8f1D6f21",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:9,address:"0xb10563644a6AB8948ee6d7f5b0a1fb15AaEa1E03",original:"Solana"}],["SUI",{symbol:"SUI",decimals:9,address:"0xfc5128F8556a6F059466E67740e6cC31EE5C2C47",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"0x996a3f12C1FcD7339Ea8801f629201e4d42EAD04",original:"Aptos"}],["WETHarbitrum",{symbol:"WETH",decimals:18,address:"0x36Bd1562F874941eE62Ebb2b3A45B4A88A9df90e",original:"Arbitrum"}],["WETHoptimism",{symbol:"WETH",decimals:18,address:"0x301587BF484756441de43E522027e3751871237B",original:"Optimism"}],["WETHbase",{symbol:"WETH",decimals:18,address:"0xc07c754ef7473d315D973F7D9F7858C2eCe0a0a6",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:18,address:"0x7E1779F65B644E5f98DdC4D2cB0A0106a7E6d9e1",original:"Ethereum"}],["tBTCarbitrum",{symbol:"tBTC",decimals:18,address:"0x4beDc7471374d7479120E44ea9593eBB85f48AD9",original:"Arbitrum"}],["SEI",{symbol:"SEI",decimals:6,address:"0xfe2eCDD1708aaebf1cF802C6124fAFb18B22dfEE",original:"Sei"}]]],["Fantom",[["WETH",{symbol:"WETH",decimals:18,address:"0x758FEebDDeC06f4bCcEc8F756C8efBD35d5b7124",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"0xDF7928AF5B33F7de592594958D8d6Ff8472Eb407",original:"Ethereum"}],["USDT",{symbol:"USDT",decimals:6,address:"0x32eF19C4b3DF65a24972A489e70AdDef5E54262C",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:18,address:"0xE4FE5DF2084f9D81595e4fcba2399020FBE7b233",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:18,address:"0x47a4C4c0f96D6CBe5b5C0A46CB0E22d6A17F1430",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:18,address:"0xfB174b43228950C2055CFc25AE93f2DCe8E2beF0",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:18,address:"0x0f545Be981C37fB15ab7c65404648761e99016e4",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"0x6BC4E8D8c1d54656D1DeBCa96efc53aFd1408aD2",original:"Avalanche"}],["FTM",{symbol:"FTM",decimals:18,address:"native",wrappedKey:"WFTM"}],["WFTM",{symbol:"WFTM",decimals:18,address:"0xf1277d1Ed8AD466beddF92ef448A132661956621"}],["CELO",{symbol:"CELO",decimals:18,address:"0xB18E73a69c3Aaea39a610372537Cf8482622d199",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:18,address:"0x41E3CFDFC255A4bF3C8D3560Bc8D3D9b5080338e",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:9,address:"0xED1a08Fc69A7008d225890A96aaE258c465CC7ad",original:"Solana"}],["SUI",{symbol:"SUI",decimals:9,address:"0xd882AB49372eC093E8697B5153f54ab5e7738e3b",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"0xAb2297E8994149BA91737944E40891881aF762a4",original:"Aptos"}],["WETHarbitrum",{symbol:"WETH",decimals:18,address:"0x456e08952f9091B6c268dC0cECad53d141152C59",original:"Arbitrum"}],["USDCoptimism",{symbol:"USDC",decimals:6,address:"0x685B29e17440c42758Ab3F80FD3603EF01bebe9A",original:"Optimism"}],["WETHbase",{symbol:"WETH",decimals:18,address:"0x01950A33DfFa63E6Bc23b5dB440505581A4cc0e7",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:18,address:"0x66E080407407620844fE2083c33108BE55E087bc",original:"Ethereum"}],["SEI",{symbol:"SEI",decimals:6,address:"0x832e8050D6c64724500DE9B0ffe1CAc6c570a26d",original:"Sei"}]]],["Celo",[["WETH",{symbol:"WETH",decimals:18,address:"0x898471a82737dFFfB61915F9e8381e279076D72b",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"0xB0524bEF6c61c6150B340b2828a890fD8dEa60C0",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:18,address:"0xeBB3fF6E5d61d3793Fdb60f7942BA78E636019f6",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:18,address:"0x7a56409988BBF8758b3ba412b9c7E3FE504C8544",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:18,address:"0xa8050be9389466c3c524F10F131f244ACbf21A0D",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:18,address:"0x502c8C83008D9Dd812a7C5fB886C063060C73Dbf",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"0xDDB349c976cA2C873644F21f594767Eb5390C831",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:18,address:"0xE6F8710cA14CFe7F5aAAD3A799C3d1D92dCba938",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:18,address:"0xF194afDf50B03e69Bd7D057c1Aa9e10c9954E4C9"}],["WGLMR",{symbol:"WGLMR",decimals:18,address:"0x132D2172D89cd9CfD480A8887c6bF92360fB460e",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:9,address:"0x05EEF2AE1A7A938D78598F7d9e8b97A9bED0c9eC",original:"Solana"}],["SUI",{symbol:"SUI",decimals:9,address:"0xa40d9E69ca9867C4bFbeC11Ce79C939991e9bf26",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"0xAC0a2fF7DD597de863878a3372142b07B614C125",original:"Aptos"}],["USDCarbitrum",{symbol:"USDC",decimals:6,address:"0x0C4AbF95Ff3d82d1F02f55e65050eA5bA062606E",original:"Arbitrum"}],["WETHoptimism",{symbol:"WETH",decimals:18,address:"0x28E768a51D19dcB753a24B79D1e89c92fee094Ba",original:"Optimism"}],["tBTC",{symbol:"tBTC",decimals:18,address:"0x01a050Fc725F4E99aAD43Eb6f8481f38ee6231aD",original:"Ethereum"}],["SEI",{symbol:"SEI",decimals:6,address:"0x05Efb4aC79ef48a4830f517834c6f5f039F16832",original:"Sei"}]]],["Moonbeam",[["WETH",{symbol:"WETH",decimals:18,address:"0xd27d8883E31FAA11B2613b14BE83ad8951C8783C",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"0xE5dE10C4b744bac6b783fAF8d9B9fDFF14Acc3c9",original:"Ethereum"}],["USDT",{symbol:"USDT",decimals:6,address:"0x7f5Ca1bcFb38fDF4c0E0646FCbf3FA87740ff65D",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:18,address:"0xc31EC0108D8e886be58808B4C2C53f8365f1885D",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:18,address:"0xD2888f015BcB76CE3d27b6024cdEFA16836d0dbb",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:18,address:"0x6097E80331B0c6aF4F74D7F2363E70Cb2Fd078A5",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:18,address:"0x2E8afeCC19842229358f3650cc3F091908dcbaB4",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"0x6533CE14804D113b1F494dC56c5D60A43cb5C3b5",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:18,address:"0x566c1cebc6A4AFa1C122E039C4BEBe77043148Ee",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:18,address:"0x3406a9b09adf0cb36DC04c1523C4b294C6b79513",original:"Celo"}],["GLMR",{symbol:"GLMR",decimals:18,address:"native",wrappedKey:"WGLMR"}],["WGLMR",{symbol:"WGLMR",decimals:18,address:"0xD909178CC99d318e4D46e7E66a972955859670E1"}],["SUI",{symbol:"SUI",decimals:9,address:"0x2ed4B5B1071A3C676664E9085C0e3826542C1b27",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"0xCaa2A1d3BbbA0D1466571e83b4E2CbE04252593D",original:"Aptos"}],["WETHarbitrum",{symbol:"WETH",decimals:18,address:"0x15025b956969DD8F1d0CD69959Ad97128F8f6D69",original:"Arbitrum"}],["USDCoptimism",{symbol:"USDC",decimals:6,address:"0xf98E630a3DD4F21Cab7a37Bb01209cb62959169D",original:"Optimism"}],["USDCbase",{symbol:"USDC",decimals:6,address:"0x7480641F5B00b4Fc39d6AaeC4Cd851EdEA7f31CF",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:18,address:"0xf82E21cE03471983Afb9c2E3789Aa13a2d7242E8",original:"Ethereum"}],["SEI",{symbol:"SEI",decimals:6,address:"0x1EdDe35B7e058194B457B8621285EaFA710f01ea",original:"Sei"}]]],["Solana",[["WETH",{symbol:"WETH",decimals:8,address:"7VPWjBhCXrpYYBiRKZh1ubh9tLZZNkZGp2ReRphEV4Mc",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"2BAqec7Qof3Y7VJatwFsRHUNSQBSkzaEsT1V5bW6dbZY",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:8,address:"3WK3mEDNPrNuQReBvM28NcsqrExMnPxD9pPJmgrUeKKH",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:8,address:"ACbmcQxbbhiXWM1GmapUSMmBYKMvnFLfAAXKqdo8xKwo",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:8,address:"BaGfF51MQ3a61papTRDYaNefBgTQ9ywnVne5fCff4bxT",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:8,address:"3Ftc5hTz9sG4huk79onufGiebJNDMZNL8HYgdMJ9E7JR",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"GQtMXZxnuacCFTXVeTvyHi6P9F6chbtzhVc8JgD8hv7c",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:8,address:"DMw2tLaq1bVoAEKtkoUtieSk9bfCPUvubYLatTMsSVop",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:8,address:"84F2QX9278ToDmA98u4A86xSV9hz1ovazr8zwGaX6qjS",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:8,address:"8987WGkYa5viiZ9DD8sS3PB5XghKmWjkEgmzvwDuoAEc",original:"Moonbeam"}],["SOL",{symbol:"SOL",decimals:9,address:"native",wrappedKey:"WSOL"}],["WSOL",{symbol:"WSOL",decimals:9,address:"So11111111111111111111111111111111111111112"}],["USDCsol",{symbol:"USDC",decimals:6,address:"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU"}],["SUI",{symbol:"SUI",decimals:8,address:"BJZ72CjPQojVoH68mzrd4VQ4nr6KuhbAGnhZEZCujKxY",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"7EvFD3JKCJVdtkAYdaSVKJsrPEJCzy2neJha7TREGrCa",original:"Aptos"}],["WETHbase",{symbol:"WETH",decimals:8,address:"EKZqcBZ3Y7YTDinpecA7SxRp9B4s1m99VHJ9jpvyTwzW",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:8,address:"FMYvcyMJJ22whB9m3T5g1oPKwM6jpLnFBXnrY6eXmCrp",original:"Ethereum"}],["tBTCoptimism",{symbol:"tBTC",decimals:8,address:"HsPvRT3J7kuitNvNHogyZeSEagcqAqwwq2FPgrGfgApy",original:"Optimism"}],["tBTCsol",{symbol:"tBTC",decimals:8,address:"6DNSN2BJsaPFdFFc1zP37kkeNe4Usc1Sqkzr9C9vPWcU"}],["SEI",{symbol:"SEI",decimals:6,address:"8LFdfuhbfdH8oBzSKDgfPAxvLW24dCM9ttjBrBobURuk",original:"Sei"}]]],["Sui",[["WETH",{symbol:"WETH",decimals:8,address:"0x72831f626b1f0e11be201893d5cb641917730b1ccac778e4a77f8ab2052f0784::coin::COIN",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"0x9e4396c19ec1c5f2214c79d3af3f31e59869640305560f8f2499c36fa9c8e0f2::coin::COIN",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:8,address:"0xe6fc78aa2b52b785bdcb67901cd85793a0b593248f315cb755974d23d0fcb837::coin::COIN",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:8,address:"0xa516bcbf83b29a2944bb53ec9f934ea7d78c3626d3ae411d2fb9dcb977522e67::coin::COIN",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:8,address:"0xddcf8680a8a4b8a527d8c85ec203274991590c2ea898d1c4635b70164d9c584b::coin::COIN",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:8,address:"0xa600741c469fb57ed01497ddf101e798fa79a9c529bd176675c5c4d970811f80::coin::COIN",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"0x2aa8c885d04e676c4e87b7d0f94d4f3b243b1b5d93239d1cc41d5528ce1714c1::coin::COIN",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:8,address:"0x14e756ff65e0ac810a5f69ca5276ef5b899a6df3c4717de1f85559d8b5ae6ea6::coin::COIN",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:8,address:"0x81868174a6b11e1acc337b3414f9912455435d486609fb8d50b34312865085f2::coin::COIN",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:8,address:"0xeffae382de96981f7ddd2d294429924827e8f325d612487a12d6a0b249171002::coin::COIN",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:8,address:"0xbc03aaab4c11eb84df8bf39fdc714fa5d5b65b16eb7d155e22c74a68c8d4e17f::coin::COIN",original:"Solana"}],["SUI",{symbol:"SUI",decimals:9,address:"0x2::sui::SUI"}],["APT",{symbol:"APT",decimals:8,address:"0x812d6feb8b84e55d47a0bfcae9fb6a4e7e09be5ec86ce0a729e0f67d5f59f477::coin::COIN",original:"Aptos"}],["USDCoptimism",{symbol:"USDC",decimals:6,address:"0xbbc39df58a11072ceeac1f685393ca912d1a1bfd6e772053ec5a544f36124da::coin::COIN",original:"Optimism"}],["WETHbase",{symbol:"WETH",decimals:8,address:"0x7b442b988864149dedfb9b6a75a88c7c33b9ddd3d15a87bf25104e1fcdd680ab::coin::COIN",original:"Base"}],["USDCbase",{symbol:"USDC",decimals:6,address:"0x4125940814a0ca87465a1a59092a7344633ad03b48ad7cda36d799d8558012c1::coin::COIN",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:8,address:"0xacf6784120b221a077ab0b84acc0b76930779eb55f157ea2492be4a60b808f6::coin::COIN",original:"Ethereum"}],["SEI",{symbol:"SEI",decimals:6,address:"0x22c5cdaabaae4b6d3351f9bba9511b0aebb0662a6c209a360f0776e1e77a8438::coin::COIN",original:"Sei"}]]],["Aptos",[["WETH",{symbol:"WETH",decimals:8,address:"0x381775005cb32cdd3dbf935ae1b978ed40d309c72b009cd4a812aab6d991418a::coin::T",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:8,address:"0x5f229253e2b2d03fb909f565feca49452582bd633a5816e5ce30aa593cb49d8a::coin::T",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:8,address:"0xa5894f5ddb8647e6143102aa336ff07374f7b32e88c1c703aef5b7c9a370bf80::coin::T",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:8,address:"0xbe8f4301c0b54e870902b9a23eeb95ce74ac190531782aa3262337ceb145401a::coin::T",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"0x02ef7697bdb33361ca39d228671203afc0dea3202e792d79d2072b761d87c834::coin::T",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:8,address:"0x533c6ade00d15d1e014c41e29e34853e87df92c4e01a6a3f41318dbd098048d6::coin::T",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:8,address:"0xecbb0f7e7d049499ca83ca1358344f56557886f6f7adc740d6734cce7bfc9a14::coin::T",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:8,address:"0x338373b6694f71dbeac5ca4a30503bf5f083888d71678aed31255de416be37c0::coin::T",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:8,address:"0xdd89c0e695df0692205912fb69fc290418bed0dbe6e4573d744a6d5e6bab6c13::coin::T",original:"Solana"}],["SUI",{symbol:"SUI",decimals:8,address:"0x7b22d0e02f653d4fd1caddcfa4719a2b329da56eb81d8f27db703f02466c26a5::coin::T",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"0x1::aptos_coin::AptosCoin"}],["USDCarbitrum",{symbol:"USDC",decimals:6,address:"0x3f0fdd44d96dae888d6c576218cf655458316a27c7bdc46537f61e531b10d3df::coin::T",original:"Arbitrum"}],["USDCoptimism",{symbol:"USDC",decimals:6,address:"0xcff1d9820851201436ad225dcc4374a2d15f52a74109283eb9881be799677e92::coin::T",original:"Optimism"}],["WETHbase",{symbol:"WETH",decimals:8,address:"0x5b5f14781164cf77185a7b6acd8e4f3cbb7e7cfb1cd5760d2b8af81075fc153d::coin::T",original:"Base"}],["USDCbase",{symbol:"USDC",decimals:6,address:"0xcfaabb3cb08ad612905dd6b2593d044ce857dfe5360148333b4635fb57d4d13f::coin::T",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:8,address:"0x6e2d5d1a6d6d0e0c5db506ce64ead0530847a48b96516abbb08cdebe43fe3036::coin::T",original:"Ethereum"}],["SEI",{symbol:"SEI",decimals:6,address:"0xcae0ba0b7a435730ab65f1c8357d213e5cf9d4b377b96761745a8edaf9c9df6d::coin::T",original:"Sei"}]]],["Base",[["WETH",{symbol:"WETH",decimals:18,address:"0x44D627f900da8AdaC7561bD73aA745F132450798",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"0x5010B0988a035915C91a2a432085824FcB3D8d3f",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:18,address:"0x31B2BAEE47Dc5Fc06baEC1BF73C124031b44fB97",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:18,address:"0xFFB5d863d5132523d013338845A1Bb01EDd440f4",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:18,address:"0x9DeF11E63C23c71dE3716b81dD2Fdad2B24b8b7F",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:18,address:"0x410B0EE532EFfB18fa4d90cc095B1CD58aC43d5a",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"0x4C5208246676486064c501E1DAF2dD21596Bc5f5",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:18,address:"0xB4808E58713112AbAbB8167C7187F8988df38bbD",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:18,address:"0x72C56041ea5fe8bDE99b2A123fb5964cDE8C7FE9",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:18,address:"0xCEc03b5710a464F4354AF35ebD0310238F656DFf",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:9,address:"0x6Fb1dE2372e48fe66c84cf37cc2fb54EaEe62988",original:"Solana"}],["SUI",{symbol:"SUI",decimals:9,address:"0xEe0fC8BECD593B41AACBd93936fDAbc2A444370A",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"0xd934A15FfA3945DD0Ba2cb7b4174024261A14874",original:"Aptos"}],["WETHarbitrum",{symbol:"WETH",decimals:18,address:"0x8eD43aBdc4f836aa60933177B31AC358ea09f27E",original:"Arbitrum"}],["WETHoptimism",{symbol:"WETH",decimals:18,address:"0x5c443C05C72F0660502d88642c807020cc9b71A2",original:"Optimism"}],["ETHbase",{symbol:"ETH",decimals:18,address:"native",wrappedKey:"WETHbase"}],["WETHbase",{symbol:"WETH",decimals:18,address:"0x4200000000000000000000000000000000000006"}],["USDCbase",{symbol:"USDC",decimals:6,address:"0xf175520c52418dfe19c8098071a252da48cd1c19"}],["tBTC",{symbol:"tBTC",decimals:18,address:"0x0219441240d89fAc3fD708d06d8fD3A072C02FB6",original:"Ethereum"}],["tBTCbase",{symbol:"tBTC",decimals:18,address:"0x783349cd20f26CE12e747b1a17bC38D252c9e119"}],["tBTCsol",{symbol:"tBTC",decimals:8,address:"0x9dA16Ae62De05bcb4606c4BFbB54046872501Bd0",original:"Solana"}],["SEI",{symbol:"SEI",decimals:6,address:"0x7B5edB2B3d2BeA8057a736B82AC6EF35c70bdadD",original:"Sei"}]]],["Sei",[["WETH",{symbol:"WETH",decimals:8,address:"sei13pzlt9etk44hj22lckncvampq2qu2gxv6r6774f3hma4vc07wqgsmftjx7",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"sei1nj32y0h0vzam33ay42h2majlfk7tdkqcuk84srn0v2a52kmujgfsyfe78f",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:8,address:"sei1dc94as3vgxn3qkr5h0lnnrep69mtfku6jg4t94gfkunuyzr5g5eqyqvj9p",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:8,address:"sei10a7see3f9t2j9l8fdweur3aqy4zgvz583a268hhhln3yzps6l5mqnl4ua6",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:8,address:"sei1mgpq67pj7p2acy5x7r5lz7fulxmuxr3uh5f0szyvqgvru3glufzsxk8tnx",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"sei1uyce5s6cc8hveg0maq2lg7wm6v6fvwqmznypj559nzf9wr9tmw3qnd3ce7",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:8,address:"sei1cr3j7rxq0dhq04ksftmj8n2w096w9g7ck8fngkvk2lrmy3qwz56q9thu9u",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:8,address:"sei1yw4wv2zqg9xkn67zvq3azye0t8h0x9kgyg3d53jym24gxt49vdyswk5upj",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:8,address:"sei140m6xagmw0zesejzhsvk46zprgscr7tu94h36rwsutcsxcs4fmds9sevym",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:8,address:"sei1at3xuugacwgu3ppx7fxzmtr3q6m3ztjuean9r2mwcnqupw28yezs7unxgz",original:"Solana"}],["SUI",{symbol:"SUI",decimals:8,address:"sei1rhpcprr2pffe6ydf078a0qeslhnlywxh2t3wjax4489z0m29cj9swj5khc",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"sei1em74y5sts4h8y5zuhfdn4w5g8zs285qld3kczpk6rh32jpvjyqqsvv0pdt",original:"Aptos"}],["WETHarbitrum",{symbol:"WETH",decimals:8,address:"sei1pf5j3dgngm8yj2xkwmvmvt87g4vyc0szpjz92q8ly9erh23ytn4s983htv",original:"Arbitrum"}],["WETHbase",{symbol:"WETH",decimals:8,address:"sei1kdqylzcv86t7slg8m30mlfgna9xsrusghdgnavvurkv0rku7jvqqta7lka",original:"Base"}],["USDCbase",{symbol:"USDC",decimals:6,address:"sei1lf6ghmrkd7gn5jlj6xw64suycpjy7g4s5q92fc2gef4f8q3znanq95mmgv",original:"Base"}],["tBTCsol",{symbol:"tBTC",decimals:8,address:"sei1aj3uu9ejt8fk6rpjfhzluqnzqmv3enlndjmt8llkr7dn2dtz55xst4s3mn",original:"Solana"}],["SEI",{symbol:"SEI",decimals:6,address:"usei"}]]],["Arbitrum",[["WETH",{symbol:"WETH",decimals:18,address:"0x285d75E04D78F53f4Ed29A506a7e8479EEf3035f",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"0x42A212A2E7eA8feF4ED28F439F16A6ABDd34DA35",original:"Ethereum"}],["USDT",{symbol:"USDT",decimals:6,address:"0x2B732F5ad6117818Ad3b7aC73C16033F6ECD78E5",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:18,address:"0x50FD4064cC536a964E2E0Dc7B3fE2313Ab386bEA",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:18,address:"0xB039aC4Fa8Ed99d30C2f7D791294A9d5FAd698eF",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:18,address:"0x92b0C4D27a05921Ded4BB117755990F567aEe049",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"0xb39697B8BA5df91A169690DfEf88B911436619F2",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:18,address:"0xa507f7566B8aDE000E886166B95964677ef3b3Ef",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:18,address:"0x9592eE6eD1D9E611b7aa6F20CCbD7Ba571Be8bdd",original:"Celo"}],["WSOL",{symbol:"WSOL",decimals:9,address:"0xF8cbdc4E54281b801f182039c250Ad6d13818250",original:"Solana"}],["SUI",{symbol:"SUI",decimals:9,address:"0xe64e2139fdf6Ee7e3795FE51955e21bA3d9eB9F7",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"0xa81C3BEf2d6f10213b860458DC119666C0ba13bf",original:"Aptos"}],["ETHarbitrum",{symbol:"ETH",decimals:18,address:"native",wrappedKey:"WETHarbitrum"}],["WETHarbitrum",{symbol:"WETH",decimals:18,address:"0xee01c0cd76354c383b8c7b4e65ea88d00b06f36f"}],["USDCarbitrum",{symbol:"USDC",decimals:6,address:"0xfd064A18f3BF249cf1f87FC203E90D8f650f2d63"}],["WETHoptimism",{symbol:"WETH",decimals:18,address:"0xFd903eA23Bf65f26FdAf2eeb589cf007b108882E",original:"Optimism"}],["WETHbase",{symbol:"WETH",decimals:18,address:"0xbC4CB3CD7186fD457C072298C48d0eDf7213CAEa",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:18,address:"0x97B5fE27a82b2B187D9a19C5782d9eB93B82DaC3",original:"Ethereum"}],["tBTCarbitrum",{symbol:"tBTC",decimals:18,address:"0x85727F4725A4B2834e00Db1AA8e1b843a188162F"}],["tBTCsol",{symbol:"tBTC",decimals:8,address:"0x227115F659f7c2939D23FedE68583F5291c395A6",original:"Solana"}],["SEI",{symbol:"SEI",decimals:6,address:"0x90eC817A1f7C1Eb18dD2985C534A78dD88747F47",original:"Sei"}]]],["Optimism",[["WETH",{symbol:"WETH",decimals:18,address:"0x33Db338718aC89Cd8DB13B56af05be3a3029BBE5",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"0x0382F518AcE1a86224c78B7CDfa67B9774055A1b",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:18,address:"0x427B5a0b0384D7FD3AF81805A166a2d9C1116D7d",original:"Polygon"}],["WFTM",{symbol:"WFTM",decimals:18,address:"0x81BA80f5820273AA965086e710042d737993f12c",original:"Fantom"}],["WGLMR",{symbol:"WGLMR",decimals:18,address:"0x99436d62259532E0407A7aE78A3b48D119B13903",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:9,address:"0x06EcAF6638070Ccf3b3dEA421b3becAA57f3e559",original:"Solana"}],["ETHoptimism",{symbol:"ETH",decimals:18,address:"native",wrappedKey:"WETHoptimism"}],["WETHoptimism",{symbol:"WETH",decimals:18,address:"0x4200000000000000000000000000000000000006"}],["USDCoptimism",{symbol:"USDC",decimals:6,address:"0xe05606174bac4A6364B31bd0eCA4bf4dD368f8C6"}],["WETHbase",{symbol:"WETH",decimals:18,address:"0x04b559971c90Dfb12D9795E95883e55f2fcf34Ed",original:"Base"}],["tBTC",{symbol:"tBTC",decimals:18,address:"0x5D89a5BcB86F15a2CCAb05e7E3bEE23fDF246a64",original:"Ethereum"}],["tBTCpolygon",{symbol:"tBTC",decimals:18,address:"0xE04e0F5f2C6ce45A40482C3AB92CA91D6741D717",original:"Polygon"}],["tBTCoptimism",{symbol:"tBTC",decimals:18,address:"0x1a53759DE2eADf73bd0b05c07a4F1F5B7912dA3d"}],["SEI",{symbol:"SEI",decimals:6,address:"0xE12be3D96fE101246bF2d290184B0eC6D35d02CA",original:"Sei"}]]],["Wormchain",[["WETH",{symbol:"WETH",decimals:8,address:"wormhole1vguuxez2h5ekltfj9gjd62fs5k4rl2zy5hfrncasykzw08rezpfs63pmq2",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"wormhole1rl8su3hadqqq2v86lscpuklsh2mh84cxqvjdew4jt9yd07dzekyqkmcy3p",original:"Ethereum"}],["USDT",{symbol:"USDT",decimals:6,address:"wormhole1v2efcqkp2qtev06t0ksjnx6trxdd0f7fxg2zdrtzr8cr9wdpjkyqkv9ch6",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:8,address:"wormhole1uuwad4khwek2h05gmkktzmh8l4t0ep54yydlsqg0l4y2uh3tqfyq3an9k6",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:8,address:"wormhole1vhjnzk9ly03dugffvzfcwgry4dgc8x0sv0nqqtfxj3ajn7rn5ghq6whn2p",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:8,address:"wormhole1335rlmhujm0gj5e9gh7at9jpqvqckz0mpe4v284ar4lw5mlkryzsnetfsj",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:8,address:"wormhole1tqwwyth34550lg2437m05mjnjp8w7h5ka7m70jtzpxn4uh2ktsmq8dv649",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"wormhole1qum2tr7hh4y7ruzew68c64myjec0dq2s2njf6waja5t0w879lutqv2exs9",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:8,address:"wormhole1808lz8dp2c39vhm9gnemt7zzj95nvrmjepxp7v3w4skzrlyzcmnsxkduxf",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:8,address:"wormhole1e8z2wjelypwxw5sey62jvwjyup88w55q3h6m0x8jtwjf6sx5c7ys4mzydk",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:8,address:"wormhole10sfpr8ykh9xn93u8xec4ed3990nmvh86e0vaegkauqhlkxspysyqwavrxx",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:8,address:"wormhole1gryz69gzl6mz2m66a4twg922jtlc47nlx73sxv88lvq86du5zvyqz3mt23",original:"Solana"}],["USDCsol",{symbol:"USDC",decimals:6,address:"wormhole1ced9v4plkf25q8c6k9gz0guq6l4xyjujpjlvxfg8lpaqywkmamashswq7p",original:"Solana"}],["SUI",{symbol:"SUI",decimals:8,address:"wormhole1yf4p93xu68j5fseupm4laj4k6f60gy7ynx6r5vvyr9c0hl3uy8vqpqd6h0",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"wormhole1u8rft0gee23fa6a0t4t88ualrza5lj8ses4aur0l66c7efpvjezqchv34j",original:"Aptos"}],["WETHarbitrum",{symbol:"WETH",decimals:8,address:"wormhole186k0cp83c3wyvapgh8fxf66ededemzrfujvjfsx0xw3vr0u9g8sq2y30vx",original:"Arbitrum"}],["USDCarbitrum",{symbol:"USDC",decimals:6,address:"wormhole1s3pk90ccfl6ueehnj8s9pdgyjjlspmr3m5rv46arjh5v4g08dd0qrchjrk",original:"Arbitrum"}],["WETHoptimism",{symbol:"WETH",decimals:8,address:"wormhole12eu6c7f67l8gdl2lt0hz0dgdh24dhune6wjgy5t0es3tpfzhc3yspwnpfy",original:"Optimism"}],["USDCoptimism",{symbol:"USDC",decimals:6,address:"wormhole1u5z7097gm57zvun9wqsx6jxej2gpdjhg9l9xfe58rhpm29rtjmfqfnl4yv",original:"Optimism"}],["WETHbase",{symbol:"WETH",decimals:8,address:"wormhole10p89p4zh00dwdg8h52sysrqm0l2j47jj3kmg93pnz2a039ucw7esgl5vl9",original:"Base"}],["USDCbase",{symbol:"USDC",decimals:6,address:"wormhole1ja4txt6m0jjq0gmjtmv442f8wk0r5f5apaya0z55wwlrpg3p5xaq3qxw7h",original:"Base"}],["tBTCarbitrum",{symbol:"tBTC",decimals:8,address:"wormhole1rm8ztmk20lrd6ex8uqq3yu7a6eyfjwvg53pcuuj22ffe2y8r3yzqr8j4v9",original:"Arbitrum"}],["wstETH",{symbol:"wstETH",decimals:8,address:"wormhole1u2zdjcczjrenwmf57fmrpensk4the84azdm05m3unm387rm8asdsxqwfeu",original:"Ethereum"}]]],["Osmosis",[["WETH",{symbol:"WETH",decimals:8,address:"ibc/A4A8B6AE885DACD75B228031C0D18AD7EE1B914CED30C9F6F4230DDBD4A1CF2B",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"ibc/3BB8C4BD1C90599B2FA5B5839DD0813EF7B94B0BD0904C4C5A61498AE81E0EE9",original:"Ethereum"}],["USDT",{symbol:"USDT",decimals:6,address:"ibc/1941ED1147121BA7DF35559597B6EB3251844DBBBE4557337D957CB95E0978C2",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:8,address:"ibc/2864B3418775DDB90EE1410EFF822FDA94E9F0FF77FC8771644761C79EDFE7A3",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:8,address:"ibc/43F15553F8598186394E81E18604B8B4532B2D7E855D9FFE68A2EF6802C18BE4",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:8,address:"ibc/65A67BA10DE2378B32AC5A822321E370966D3D4E180DEFB4C3C5245B21088DDF",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:8,address:"ibc/99EAD53D49EC7CC4E2E2EB26C22CF81C16727DF0C4BF7F7ACBF0D22D910DB5DE",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"ibc/EC9FA5074F34F0644A025BB0263FDAE8F364C5E08523F6464465EF1010FF5A3A",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:8,address:"ibc/145C6B688F70B0C2F6D87546A5974A75CE75B3A2940275B750E65797B2996157",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:8,address:"ibc/3A4EA3F8096856C0802F86B218DD74213B4C10224AA44BBD54AEAAA2ABF078BA",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:8,address:"ibc/7DB06BB67428510AFC3967DC90F5632C679D55D8C487A951A0EEC3160AF492A6",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:8,address:"ibc/B5D53105A7AA2BEC4DA4B3304228F3856219AE7CF84A9023043C481629E3E319",original:"Solana"}],["USDCsol",{symbol:"USDC",decimals:6,address:"ibc/35A0467DE5744662078DE8B36CBBE0CF0EAA022565A3E6630CB375DDEBB96E05",original:"Solana"}],["SUI",{symbol:"SUI",decimals:8,address:"ibc/30778BA41ADF2D8A70B90DB53C2E0251731A40276EF6737215BB1A6ED9E90078",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"ibc/7C495BD95757ED662A897C139F1C9F18275A86EE7203A0B073E2DB12B1E19D63",original:"Aptos"}],["WETHarbitrum",{symbol:"WETH",decimals:8,address:"ibc/221A4AADF7972F3BB8F48A6CA984FF0AE65B5D973FF1A695B9642AD702F51789",original:"Arbitrum"}],["USDCarbitrum",{symbol:"USDC",decimals:6,address:"ibc/06ED2700071B5A9C582F51A556537DA94E69EF547E7E6CCD8BFA3D95C818A525",original:"Arbitrum"}],["WETHoptimism",{symbol:"WETH",decimals:8,address:"ibc/80B3FECB24A4CE94537444E5BF937AC4C08A39BF90D59620D278FA185BD2B148",original:"Optimism"}],["USDCoptimism",{symbol:"USDC",decimals:6,address:"ibc/0A98A3947189D7C368170C76C3EF49486DDBE095F34B72A3C7F92AEBE1013A1D",original:"Optimism"}],["WETHbase",{symbol:"WETH",decimals:8,address:"ibc/A45069EA82C933945973E66E4222EEE4624498D4483508FE9BEBF9D519F2132F",original:"Base"}],["USDCbase",{symbol:"USDC",decimals:6,address:"ibc/2E4F8BC7F7AF33752CF7E290CAD4417EE67CD18FFC0D099E6519A440E588E0CE",original:"Base"}],["OSMO",{symbol:"OSMO",decimals:6,address:"uosmo"}],["wstETH",{symbol:"wstETH",decimals:8,address:"ibc/C66B7DB3ED665D2F5FE8ED15E88B5913A37D80601E161C5E53A743DE12C0FB85",original:"Ethereum"}]]],["Cosmoshub",[["WETH",{symbol:"WETH",decimals:8,address:"ibc/77FE9153FA76C3107CB9F6633AC33509A58529E9622327F216BA8107C79C2DE3",original:"Ethereum"}],["USDCeth",{symbol:"USDC",decimals:6,address:"ibc/D0EC31D1176BB69EA1A7CF7172CA0380B7AF488AFC6D55B101B8363C2141CD4F",original:"Ethereum"}],["USDT",{symbol:"USDT",decimals:6,address:"ibc/755FBC53FFB46FB505B5269F9BEDF47041F2A0EF2FF8D0520315403E5925C80A",original:"Ethereum"}],["DAI",{symbol:"DAI",decimals:8,address:"ibc/5F21E975410DA22AF565B1772DC45AD0BD5F6DA004981EBE291763F3D2C72A96",original:"Ethereum"}],["WMATIC",{symbol:"WMATIC",decimals:8,address:"ibc/37FB599287C6963C413E915FDE83EFA69A3CE8147675DD5A7F974B45F39C8A31",original:"Polygon"}],["WBNB",{symbol:"WBNB",decimals:8,address:"ibc/5B0D5974A56332468DD4B2D07C96A7386FCF8FE7303FF41234F90E410EF51937",original:"Bsc"}],["WAVAX",{symbol:"WAVAX",decimals:8,address:"ibc/BAEAC83736444C09656FBE666FB625974FCCDEE566EB700EBFD2642C5F6CF13A",original:"Avalanche"}],["USDCavax",{symbol:"USDC",decimals:6,address:"ibc/F09E98FA8682FF39130F171E9D89A948B0C3A452F2A31F22B6CC54A3AAE1CD4A",original:"Avalanche"}],["WFTM",{symbol:"WFTM",decimals:8,address:"ibc/919D8F138B7E71BB067C7301AB5C2D48415E8C3A2D9187861245CEC668F88E3C",original:"Fantom"}],["CELO",{symbol:"CELO",decimals:8,address:"ibc/009206915358A002C852A2A2CBEDB8446D2D02E519C815087A01F8BDB4DF77BA",original:"Celo"}],["WGLMR",{symbol:"WGLMR",decimals:8,address:"ibc/1EEDF447A6B046B20C00B1497BED5947219AEEBE0D9A85235C85133A554DF7A4",original:"Moonbeam"}],["WSOL",{symbol:"WSOL",decimals:8,address:"ibc/D3EA463A51E31B2B30BED1978575CAC145DBAB354B8A0EA5D4CFB12D737AF790",original:"Solana"}],["USDCsol",{symbol:"USDC",decimals:6,address:"ibc/26D8D6C63C8D37A5127591DDA905E04CC69CBD3A64F9DA3B1DA3FB0B6A7D9FA5",original:"Solana"}],["SUI",{symbol:"SUI",decimals:8,address:"ibc/129EC6B8A41BE07F94DD267F552F4AE1D5EAEBB51634A1468556AF06C10C2692",original:"Sui"}],["APT",{symbol:"APT",decimals:8,address:"ibc/0CCA5EB15BC2FE474E71DBC9698302CDE260B6F6548F91C30002F7CBF228197B",original:"Aptos"}],["WETHarbitrum",{symbol:"WETH",decimals:8,address:"ibc/AB4046AF5B6F146C006DE4DECAD929D24F762A701E09EC8B29000EC63A6E649B",original:"Arbitrum"}],["USDCarbitrum",{symbol:"USDC",decimals:6,address:"ibc/6D1B6A7A9EF692A279A6B5994C98C0D598D003D9203BE8309F14B6E57A58506E",original:"Arbitrum"}],["WETHoptimism",{symbol:"WETH",decimals:8,address:"ibc/A0298483510D803A045AA7F49CCBD0F9D01010FE0B1A346EBDFFF4BA820C3D21",original:"Optimism"}],["USDCoptimism",{symbol:"USDC",decimals:6,address:"ibc/CE3F2FE630DA6A1187F085CDC8D59BA8B20DA48F4866F2D71C5AB7A1D5859933",original:"Optimism"}],["WETHbase",{symbol:"WETH",decimals:8,address:"ibc/97035986A4BD0AF555713355A02EA31A4526616B6543E019E0D750007FABE06C",original:"Base"}],["USDCbase",{symbol:"USDC",decimals:6,address:"ibc/8560BA5F45C95AE716C05978E364F50C98347ACBEC745840C30F91611FA36698",original:"Base"}],["wstETH",{symbol:"wstETH",decimals:8,address:"ibc/5BB02667F9F0C8284FCF7716065C2779039817FBCB91E937F5149FE89FD8F202",original:"Ethereum"}],["ATOM",{symbol:"ATOM",decimals:6,address:"uatom"}]]],["Evmos",[["EVMOS",{symbol:"EVMOS",decimals:18,address:"atevmos"}]]],["Kujira",[["KUJI",{symbol:"KUJI",decimals:6,address:"ukuji"}]]],["Klaytn",[["KLAY",{symbol:"KLAY",decimals:18,address:"native",wrappedKey:"WKLAY"}],["WKLAY",{symbol:"WKLAY",decimals:18,address:"0x0339d5Eb6D195Ba90B13ed1BCeAa97EbD198b106"}]]],["Sepolia",[["ETHsepolia",{symbol:"ETH",decimals:18,address:"native",wrappedKey:"WETHsepolia"}],["WETHsepolia",{symbol:"WETH",decimals:18,address:"0xeef12A83EE5b7161D3873317c8E0E7B76e0B5D9c"}]]],["ArbitrumSepolia",[["ETHarbitrum_sepolia",{symbol:"ETH",decimals:18,address:"native",wrappedKey:"WETHarbitrum_sepolia"}],["WETHarbitrum_sepolia",{symbol:"WETH",decimals:18,address:"0x980B62Da83eFf3D4576C647993b0c1D7faf17c73"}]]],["BaseSepolia",[["ETHbase_sepolia",{symbol:"ETH",decimals:18,address:"native",wrappedKey:"WETHbase_sepolia"}],["WETHbase_sepolia",{symbol:"WETH",decimals:18,address:"0x4200000000000000000000000000000000000006"}]]],["OptimismSepolia",[["ETHoptimism_sepolia",{symbol:"ETH",decimals:18,address:"native",wrappedKey:"WETHoptimism_sepolia"}],["WETHoptimism_sepolia",{symbol:"WETH",decimals:18,address:"0x4200000000000000000000000000000000000006"}]]]],Od=we(wp,[0,[1,2]]);function mo(n,e){if(n!=="Devnet"){if(n==="Mainnet"){if(!Ld.has(e))return;const t=Ld.get(e);return Object.fromEntries(t.map(([r,s])=>[r,{...s,chain:e,key:r}]))}if(n==="Testnet"){if(!Od.has(e))return;const t=Od.get(e);return Object.fromEntries(t.map(([r,s])=>[r,{...s,chain:e,key:r}]))}throw new Error("Unsupported network: "+n)}}function Ep(n,e){const t=mo(n,e);return t?os.native(t):void 0}function Bp(n,e,t){const r=mo(n,e);return r?os.byAddress(r,t):void 0}function xp(n,e,t){const r=mo(n,e);return r?os.byKey(r,t):void 0}function Cp(n,e){const t={coreBridge:T1.get(n,e),tokenBridge:I1.get(n,e),nftBridge:_1.get(n,e),relayer:M1.get(n,e),tokenBridgeRelayer:U1.get(n,e),tbtc:vi.get(n,e)};return Ya.has(n,e)&&(t.cctp=Ya.get(n,e)),pd.has(n,e)&&(t.gateway=pd.get(n,e)),gd.has(n,e)&&(t.translator=gd.get(n,e)),yd.has(n,e)&&(t.portico=yd.get(n,e)),vi.has(n,e)&&(t.tbtc=vi.get(n,e)),t}function Lt(n){return typeof n=="string"&&n==="native"}function Qf(n){return{chain:n,address:"native"}}function bo(n){return typeof n=="object"&&n.address!==void 0&&n.chain!==void 0&&lo(n.chain)}function e0(n,e){return n.chain!==e.chain?!1:Lt(n.address)&&Lt(e.address)?!0:Tn(n)===Tn(e)}function Tn(n){return bo(n)&&Lt(n.address)?n.address:n.address.toNative(n.chain).toString()}function Sp(n){if(Lt(n.address))throw new Error("Invalid address, cannot convert the string literal `native` to a Universal Address");return n.address.toUniversalAddress().toString()}function t0(n,e,t){let r;if(bo(t)){if(!Lt(t.address))return[!1,t];r=t.address}else r=t;if(Lt(r)){const i=Ep(n,e);if(!i)throw new Error("Invalid destination token");const o=i.wrappedKey,a=xp(n,e,o);if(!a)throw new Error("Invalid wrapped token key: "+o);return[!0,{chain:e,address:ar(e,a.address)}]}return[!1,{chain:e,address:r}]}function n0(n){return n.chain!==void 0&&n.txid!==void 0}function pa(n){return Yu.map(t=>{const r=is(t);let s="";try{s=rf.get(n,t)}catch{}const i=mo(n,t),o=i?Object.values(i).find(c=>Lt(c.address)&&c.wrappedKey):void 0,a=o?i[o.wrappedKey]:void 0;return{key:t,platform:r,network:n,chainId:Zs(t),finalityThreshold:Ju.get(t)??0,blockTime:Qu.get(t)??0,contracts:Cp(n,t),nativeTokenDecimals:ef(r),nativeChainId:s,tokenMap:i,wrappedNative:a,explorer:p1(n,t),rpc:tf(n,t)}}).reduce((t,r)=>({...t,[r.key]:r}),{})}function Dp(n){return r0(n)||sl(n)}function r0(n){return typeof n=="object"&&"chain"in n&&typeof n.chain=="function"&&"address"in n&&typeof n.address=="function"&&"sign"in n&&typeof n.sign=="function"}function sl(n){return typeof n=="object"&&"chain"in n&&typeof n.chain=="function"&&"address"in n&&typeof n.address=="function"&&"signAndSend"in n&&typeof n.signAndSend=="function"}class vp{constructor(e,t,r){se(this,"_chain");se(this,"_address");se(this,"_signer");this._chain=e,this._address=t,this._signer=r}unwrap(){return this._signer}}function Br(n){return n.sequence!==void 0&&n.emitter!==void 0&&n.chain!==void 0}function Ki(n){return n.hash!==void 0}const Nd=n=>[lr(1),{name:"token",binary:"bytes",layout:[{name:"address",...xe},{name:"amount",...It}]},{name:"sourceDomain",...Ps},{name:"targetDomain",...Ps},{name:"nonce",...Qc},{name:"caller",...xe},{name:"mintRecipient",...xe},so({name:"payload",lengthSize:2},n)],kp=[lr(1),{name:"targetRelayerFee",...It},{name:"toNativeTokenAmount",...It},{name:"targetRecipient",...xe}],Fp=[["DepositWithPayload",Nd()],["TransferWithRelay",Nd(kp)]];Et("AutomaticCircleBridge",Fp);const s0={binary:"uint",size:4,custom:0,omit:!0},Tp=[{name:"messageBodyVersion",...s0},{name:"burnToken",...xe},{name:"mintRecipient",...xe},{name:"amount",...It},{name:"messageSender",...xe}],ac=[{name:"version",...s0},{name:"sourceDomain",...Ps},{name:"destinationDomain",...Ps},{name:"nonce",...Qc},{name:"sender",...xe},{name:"recipient",...xe},{name:"destinationCaller",...xe},{name:"payload",binary:"bytes",layout:Tp}],Ip=[["Message",ac]];Et("CircleBridge",Ip);exports.CircleBridge=void 0;(function(n){n.isCircleAttestation=e=>e.message!==void 0,n.deserialize=e=>{const t=kn(ac,e),r=Ft.encode(Rs(e),!0);return[t,r]},n.serialize=e=>vn(ac,e)})(exports.CircleBridge||(exports.CircleBridge={}));var zd;(function(n){const e="AutomaticCircleBridge",t=["DepositWithPayload","TransferWithRelay"];n.getTransferDiscriminator=Tc(()=>rl([e,t]))})(zd||(zd={}));function Up(n){return n.amount!==void 0&&n.from!==void 0&&n.to!==void 0}const Hd={binary:"bytes",size:32,custom:{to:n=>Mi(n.byteLength).map(e=>String.fromCharCode(n[e])).join(""),from:n=>new Uint8Array(n.split("").map(e=>e.charCodeAt(0)))}},i0=[{name:"token",binary:"bytes",layout:[{name:"amount",...It},{name:"address",...xe},{name:"chain",...qt()}]},{name:"to",binary:"bytes",layout:[{name:"address",...xe},{name:"chain",...qt()}]}],o0=[lr(1),...i0,{name:"fee",...It}],po=n=>[lr(3),...i0,{name:"from",...xe},so({name:"payload"},n)],_p=[["AttestMeta",[lr(2),{name:"token",binary:"bytes",layout:[{name:"address",...xe},{name:"chain",...qt()}]},{name:"decimals",binary:"uint",size:1},{name:"symbol",...Hd},{name:"name",...Hd}]],["Transfer",o0],["TransferWithPayload",po()]];Et("TokenBridge",_p);const Mp=Ym(["shouldWrapNative","shouldUnwrapNative"]),cc=[{name:"recipientChain",binary:"uint",endianness:"little",size:2},{name:"bridgeNonce",binary:"uint",endianness:"little",size:4},{name:"feeTierStart",binary:"uint",endianness:"little",size:3},{name:"feeTierFinish",binary:"uint",endianness:"little",size:3},{name:"padding",binary:"bytes",size:19},{name:"flags",...Mp}],lc=[{name:"flagSet",binary:"bytes",layout:cc},{name:"finalTokenAddress",...xe},{name:"recipientAddress",...xe},{name:"cannonAssetAmount",...It},{name:"minAmountFinish",...It},{name:"relayerFee",...It}],Rp=[["Transfer",po(lc)]];Et("PorticoBridge",Rp);exports.PorticoBridge=void 0;(function(n){n.deserializePayload=e=>kn(lc,e),n.serializePayload=e=>vn(lc,e),n.deserializeFlagSet=e=>kn(cc,e),n.serializeFlagSet=e=>vn(cc,e)})(exports.PorticoBridge||(exports.PorticoBridge={}));const a0={binary:"bytes",layout:[{name:"size",binary:"uint",size:4,custom:3*32,omit:!0},{name:"waste",binary:"uint",size:31,custom:0n,omit:!0},{name:"version",binary:"uint",size:1,custom:0,omit:!0},{name:"gasLimit",...It},{name:"targetChainRefundPerGasUnused",...It}]},qd={binary:"bytes",layout:[{name:"chain",...qt()},{name:"address",...xe}]},Wp=[{name:"chain",...qt()},{name:"emitterAddress",...xe},{name:"sequence",...el}],Pp=[{name:"size",binary:"uint",size:4,custom:12,omit:!0},{name:"domain",...Ps},{name:"nonce",...Qc}],c0={binary:"switch",idSize:1,idTag:"keyType",layouts:[[[1,"VAA"],Wp],[[2,"CCTP"],Pp]]},l0=n=>[lr(1),{name:"target",...qd},so({name:"payload",lengthSize:4},n),{name:"requestedReceiverValue",...It},{name:"extraReceiverValue",...It},{name:"executionInfo",...a0},{name:"refund",...qd},{name:"refundDeliveryProvider",...xe},{name:"sourceDeliveryProvider",...xe},{name:"senderAddress",...xe},{name:"messageKeys",binary:"array",lengthSize:1,layout:c0}],Lp=[["DeliveryInstruction",l0()],["RedeliveryInstruction",[lr(2),{name:"deliveryVaaKey",binary:"bytes",layout:c0},{name:"targetChain",...qt()},{name:"newRequestedReceiverValue",...It},{name:"newEncodedExecutionInfo",...a0},{name:"newSourceDeliveryProvider",...xe},{name:"newSenderAddress",...xe}]]];Et("Relayer",Lp);const Op=[lr(1),{name:"targetRelayerFee",...It},{name:"toNativeTokenAmount",...It},{name:"targetRecipient",...xe}],Np=[["TransferWithRelay",po(Op)]];Et("AutomaticTokenBridge",Np);const zp=n=>new Error(`Token ${n} is not a wrapped asset`);var dc;(function(n){const e="TokenBridge",t=["Transfer","TransferWithPayload"],r=["AttestMeta"];[...t,...r],n.getTransferDiscriminator=Tc(()=>rl([e,t]))})(dc||(dc={}));function Hp(n){return n.token!==void 0&&n.amount!==void 0&&n.from!==void 0&&n.to!==void 0}const qp=[["Add",1],["Subtract",2],["Unknown",3]],uc={binary:"bytes",size:20,custom:{to:n=>Ft.encode(n,!0),from:n=>Ft.decode(n)}},Kp=[["UpgradeContract",[!1,[{name:"newContract",...xe}]]],["RegisterChain",[!0,[{name:"foreignChain",...qt()},{name:"foreignAddress",...xe}]]],["RecoverChainId",[!1,[{name:"evmChainId",binary:"uint",size:32},{name:"newChainId",...qt({allowedChains:Xu("Evm")})}]]],["GuardianSetUpgrade",[!0,[{name:"guardianSet",...Yf},{name:"guardians",binary:"array",lengthSize:1,layout:uc}]]],["SetMessageFee",[!1,[{name:"messageFee",binary:"uint",size:32}]]],["TransferFees",[!0,[{name:"amount",binary:"uint",size:32},{name:"recipient",...xe}]]],["UpdateDefaultProvider",[!1,[{name:"defaultProvider",...xe}]]],["RegisterEmitterAndDomain",[!0,[{name:"emitterChain",...qt()},{name:"emitterAddress",...xe},{name:"domain",binary:"uint",size:4}]]],["UpdateFinality",[!1,[{name:"finality",binary:"uint",size:1}]]]],ga={binary:"bytes",size:32},Kd=[{name:"contractAddr",...xe},{name:"codeId",binary:"uint",size:8}],jp=[["StoreCode",[!1,[{name:"wasmHash",...ga}]]],["InstantiateContract",[!1,[{name:"instantiationParamsHash",...ga}]]],["MigrateContract",[!1,[{name:"migrationParamsHash",...ga}]]],["AddWasmInstantiateAllowlist",[!1,Kd]],["DeleteWasmInstantiateAllowlist",[!1,Kd]]],$p=(()=>{const n=s=>({binary:"bytes",size:s,custom:bp}),e=[{name:"height",binary:"uint",size:8}],t=Nu(e),r=s=>[{name:"name",...n(s)},...e];return{binary:"bytes",custom:{to:s=>kn(r(s.length-t),s),from:s=>vn(r(s.name.length),s)}}})(),Vp=[["ScheduleUpgrade",[!1,$p]],["CancelUpgrade",[!0,[]]],["SetIbcComposabilityMwContract",[!1,[{name:"contractAddress",...xe}]]]],Gp=[["ModifyBalance",[!1,[{name:"sequence",...el},{name:"modifiedChain",...qt()},{name:"tokenChain",...qt()},{name:"tokenAddress",...xe},{name:"kind",...Gm(qp)},{name:"amount",...It},{name:"reason",...Xf(32)}]]]],Yp=[["ActionUpdateChannelChain",[!1,[{name:"channelId",...Xf(64)},{name:"channelChain",...qt({allowedChains:Xu("Cosmwasm")})}]]]],Xp=[["GeneralPurposeEvm",[!1,[{name:"governanceContract",...uc},{name:"targetContract",...uc},{name:"payload",binary:"bytes",lengthSize:2}]]],["GeneralPurposeSolana",[!1,[{name:"governanceContract",...xe},{name:"payload",binary:"bytes"}]]]],d0=[...Kp,...jp,...Vp,...Gp,...Yp,...Xp];Wu(d0,0);const jd=Object.fromEntries(d0),Zp=[["WormholeCore","Core"],["TokenBridge","TokenBridge"],["NftBridge","NftBridge"],["Relayer","WormholeRelayer"],["CircleBridge","CircleIntegration"],["IbcBridge","IbcTranslator"],["IbcReceiver","IbcReceiver"],["GlobalAccountant","GlobalAccountant"],["GeneralPurposeGovernance","GeneralPurposeGovernance"],["WormchainGovernance","WasmdModule"],["GatewayGovernance","GatewayModule"]],Jp=we(Zp),Qp=n=>({to:n,from:(()=>{const t=new Uint8Array(32),r=Jp(n);for(let s=1;s<=r.length;++s)t[32-s]=r.charCodeAt(r.length-s);return t})()}),eg=(n,e)=>({to:n,from:e}),tg=(n,e,t)=>[{name:"protocol",binary:"bytes",custom:Qp(n)},{name:"action",binary:"uint",size:1,custom:eg(e,t)},{name:"chain",...qt({allowNull:jd[e][0]})},{name:"actionArgs",binary:"bytes",layout:jd[e][1]}],Ue=(n,e,t)=>[e,tg(n,e,t)],ng=[Ue("WormholeCore","UpgradeContract",1),Ue("WormholeCore","GuardianSetUpgrade",2),Ue("WormholeCore","SetMessageFee",3),Ue("WormholeCore","TransferFees",4),Ue("WormholeCore","RecoverChainId",5)],rg=[Ue("TokenBridge","RegisterChain",1),Ue("TokenBridge","UpgradeContract",2),Ue("TokenBridge","RecoverChainId",3)],sg=[Ue("NftBridge","RegisterChain",1),Ue("NftBridge","UpgradeContract",2),Ue("NftBridge","RecoverChainId",3)],ig=[Ue("Relayer","RegisterChain",1),Ue("Relayer","UpgradeContract",2),Ue("Relayer","UpdateDefaultProvider",3)],og=[Ue("CircleBridge","UpdateFinality",1),Ue("CircleBridge","RegisterEmitterAndDomain",2),Ue("CircleBridge","UpgradeContract",3)],ag=[Ue("IbcBridge","ActionUpdateChannelChain",1)],cg=[Ue("IbcReceiver","ActionUpdateChannelChain",1)],lg=[Ue("GlobalAccountant","ModifyBalance",1)],dg=[Ue("GeneralPurposeGovernance","GeneralPurposeEvm",1),Ue("GeneralPurposeGovernance","GeneralPurposeSolana",2)],ug=[Ue("WormchainGovernance","StoreCode",1),Ue("WormchainGovernance","InstantiateContract",2),Ue("WormchainGovernance","MigrateContract",3),Ue("WormchainGovernance","AddWasmInstantiateAllowlist",4),Ue("WormchainGovernance","DeleteWasmInstantiateAllowlist",5)],fg=[Ue("GatewayGovernance","ScheduleUpgrade",1),Ue("GatewayGovernance","CancelUpgrade",2),Ue("GatewayGovernance","SetIbcComposabilityMwContract",3)];Et("WormholeCore",ng);Et("TokenBridge",rg);Et("NftBridge",sg);Et("Relayer",ig);Et("CircleBridge",og);Et("IbcBridge",ag);Et("IbcReceiver",cg);Et("GlobalAccountant",lg);Et("GeneralPurposeGovernance",dg);Et("WormchainGovernance",ug);Et("GatewayGovernance",fg);exports.TBTCBridge=void 0;(function(n){const e="TBTCBridge",t=["GatewayTransfer","Transfer"];[...t],n.getTransferDiscriminator=Tc(()=>rl([e,t])),n.getNativeTbtcToken=r=>{const s=N1.get("Mainnet",r);if(s)return{chain:r,address:ar(r,s)}}})(exports.TBTCBridge||(exports.TBTCBridge={}));const hg=[{name:"recipient",...xe}],mg=[["GatewayTransfer",po(hg)],["Transfer",o0]];Et("TBTCBridge",mg);function u0(n,e){return function(){return n.apply(e,arguments)}}const{toString:bg}=Object.prototype,{getPrototypeOf:il}=Object,go=(n=>e=>{const t=bg.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),_n=n=>(n=n.toLowerCase(),e=>go(e)===n),yo=n=>e=>typeof e===n,{isArray:ds}=Array,Ns=yo("undefined");function pg(n){return n!==null&&!Ns(n)&&n.constructor!==null&&!Ns(n.constructor)&&nn(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const f0=_n("ArrayBuffer");function gg(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&f0(n.buffer),e}const yg=yo("string"),nn=yo("function"),h0=yo("number"),Ao=n=>n!==null&&typeof n=="object",Ag=n=>n===!0||n===!1,Fi=n=>{if(go(n)!=="object")return!1;const e=il(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},wg=_n("Date"),Eg=_n("File"),Bg=_n("Blob"),xg=_n("FileList"),Cg=n=>Ao(n)&&nn(n.pipe),Sg=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||nn(n.append)&&((e=go(n))==="formdata"||e==="object"&&nn(n.toString)&&n.toString()==="[object FormData]"))},Dg=_n("URLSearchParams"),vg=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ni(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,s;if(typeof n!="object"&&(n=[n]),ds(n))for(r=0,s=n.length;r<s;r++)e.call(null,n[r],r,n);else{const i=t?Object.getOwnPropertyNames(n):Object.keys(n),o=i.length;let a;for(r=0;r<o;r++)a=i[r],e.call(null,n[a],a,n)}}function m0(n,e){e=e.toLowerCase();const t=Object.keys(n);let r=t.length,s;for(;r-- >0;)if(s=t[r],e===s.toLowerCase())return s;return null}const b0=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:je.global,p0=n=>!Ns(n)&&n!==b0;function fc(){const{caseless:n}=p0(this)&&this||{},e={},t=(r,s)=>{const i=n&&m0(e,s)||s;Fi(e[i])&&Fi(r)?e[i]=fc(e[i],r):Fi(r)?e[i]=fc({},r):ds(r)?e[i]=r.slice():e[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&ni(arguments[r],t);return e}const kg=(n,e,t,{allOwnKeys:r}={})=>(ni(e,(s,i)=>{t&&nn(s)?n[i]=u0(s,t):n[i]=s},{allOwnKeys:r}),n),Fg=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Tg=(n,e,t,r)=>{n.prototype=Object.create(e.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},Ig=(n,e,t,r)=>{let s,i,o;const a={};if(e=e||{},n==null)return e;do{for(s=Object.getOwnPropertyNames(n),i=s.length;i-- >0;)o=s[i],(!r||r(o,n,e))&&!a[o]&&(e[o]=n[o],a[o]=!0);n=t!==!1&&il(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},Ug=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const r=n.indexOf(e,t);return r!==-1&&r===t},_g=n=>{if(!n)return null;if(ds(n))return n;let e=n.length;if(!h0(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},Mg=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&il(Uint8Array)),Rg=(n,e)=>{const r=(n&&n[Symbol.iterator]).call(n);let s;for(;(s=r.next())&&!s.done;){const i=s.value;e.call(n,i[0],i[1])}},Wg=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},Pg=_n("HTMLFormElement"),Lg=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,s){return r.toUpperCase()+s}),$d=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),Og=_n("RegExp"),g0=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};ni(t,(s,i)=>{e(s,i,n)!==!1&&(r[i]=s)}),Object.defineProperties(n,r)},Ng=n=>{g0(n,(e,t)=>{if(nn(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];if(nn(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},zg=(n,e)=>{const t={},r=s=>{s.forEach(i=>{t[i]=!0})};return ds(n)?r(n):r(String(n).split(e)),t},Hg=()=>{},qg=(n,e)=>(n=+n,Number.isFinite(n)?n:e),ya="abcdefghijklmnopqrstuvwxyz",Vd="0123456789",y0={DIGIT:Vd,ALPHA:ya,ALPHA_DIGIT:ya+ya.toUpperCase()+Vd},Kg=(n=16,e=y0.ALPHA_DIGIT)=>{let t="";const{length:r}=e;for(;n--;)t+=e[Math.random()*r|0];return t};function jg(n){return!!(n&&nn(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const $g=n=>{const e=new Array(10),t=(r,s)=>{if(Ao(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[s]=r;const i=ds(r)?[]:{};return ni(r,(o,a)=>{const c=t(o,s+1);!Ns(c)&&(i[a]=c)}),e[s]=void 0,i}}return r};return t(n,0)},Vg=_n("AsyncFunction"),Gg=n=>n&&(Ao(n)||nn(n))&&nn(n.then)&&nn(n.catch),q={isArray:ds,isArrayBuffer:f0,isBuffer:pg,isFormData:Sg,isArrayBufferView:gg,isString:yg,isNumber:h0,isBoolean:Ag,isObject:Ao,isPlainObject:Fi,isUndefined:Ns,isDate:wg,isFile:Eg,isBlob:Bg,isRegExp:Og,isFunction:nn,isStream:Cg,isURLSearchParams:Dg,isTypedArray:Mg,isFileList:xg,forEach:ni,merge:fc,extend:kg,trim:vg,stripBOM:Fg,inherits:Tg,toFlatObject:Ig,kindOf:go,kindOfTest:_n,endsWith:Ug,toArray:_g,forEachEntry:Rg,matchAll:Wg,isHTMLForm:Pg,hasOwnProperty:$d,hasOwnProp:$d,reduceDescriptors:g0,freezeMethods:Ng,toObjectSet:zg,toCamelCase:Lg,noop:Hg,toFiniteNumber:qg,findKey:m0,global:b0,isContextDefined:p0,ALPHABET:y0,generateString:Kg,isSpecCompliantForm:jg,toJSONObject:$g,isAsyncFn:Vg,isThenable:Gg};function De(n,e,t,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),s&&(this.response=s)}q.inherits(De,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const A0=De.prototype,w0={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{w0[n]={value:n}});Object.defineProperties(De,w0);Object.defineProperty(A0,"isAxiosError",{value:!0});De.from=(n,e,t,r,s,i)=>{const o=Object.create(A0);return q.toFlatObject(n,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),De.call(o,n.message,e,t,r,s),o.cause=n,o.name=n.name,i&&Object.assign(o,i),o};const Yg=null;function hc(n){return q.isPlainObject(n)||q.isArray(n)}function E0(n){return q.endsWith(n,"[]")?n.slice(0,-2):n}function Gd(n,e,t){return n?n.concat(e).map(function(s,i){return s=E0(s),!t&&i?"["+s+"]":s}).join(t?".":""):e}function Xg(n){return q.isArray(n)&&!n.some(hc)}const Zg=q.toFlatObject(q,{},null,function(e){return/^is[A-Z]/.test(e)});function wo(n,e,t){if(!q.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=q.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,T){return!q.isUndefined(T[S])});const r=t.metaTokens,s=t.visitor||b,i=t.dots,o=t.indexes,c=(t.Blob||typeof Blob<"u"&&Blob)&&q.isSpecCompliantForm(e);if(!q.isFunction(s))throw new TypeError("visitor must be a function");function h(g){if(g===null)return"";if(q.isDate(g))return g.toISOString();if(!c&&q.isBlob(g))throw new De("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(g)||q.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):je.Buffer.from(g):g}function b(g,S,T){let M=g;if(g&&!T&&typeof g=="object"){if(q.endsWith(S,"{}"))S=r?S:S.slice(0,-2),g=JSON.stringify(g);else if(q.isArray(g)&&Xg(g)||(q.isFileList(g)||q.endsWith(S,"[]"))&&(M=q.toArray(g)))return S=E0(S),M.forEach(function(_,U){!(q.isUndefined(_)||_===null)&&e.append(o===!0?Gd([S],U,i):o===null?S:S+"[]",h(_))}),!1}return hc(g)?!0:(e.append(Gd(T,S,i),h(g)),!1)}const w=[],D=Object.assign(Zg,{defaultVisitor:b,convertValue:h,isVisitable:hc});function E(g,S){if(!q.isUndefined(g)){if(w.indexOf(g)!==-1)throw Error("Circular reference detected in "+S.join("."));w.push(g),q.forEach(g,function(M,N){(!(q.isUndefined(M)||M===null)&&s.call(e,M,q.isString(N)?N.trim():N,S,D))===!0&&E(M,S?S.concat(N):[N])}),w.pop()}}if(!q.isObject(n))throw new TypeError("data must be an object");return E(n),e}function Yd(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function ol(n,e){this._pairs=[],n&&wo(n,this,e)}const B0=ol.prototype;B0.append=function(e,t){this._pairs.push([e,t])};B0.toString=function(e){const t=e?function(r){return e.call(this,r,Yd)}:Yd;return this._pairs.map(function(s){return t(s[0])+"="+t(s[1])},"").join("&")};function Jg(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function x0(n,e,t){if(!e)return n;const r=t&&t.encode||Jg,s=t&&t.serialize;let i;if(s?i=s(e,t):i=q.isURLSearchParams(e)?e.toString():new ol(e,t).toString(r),i){const o=n.indexOf("#");o!==-1&&(n=n.slice(0,o)),n+=(n.indexOf("?")===-1?"?":"&")+i}return n}class Xd{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){q.forEach(this.handlers,function(r){r!==null&&e(r)})}}const C0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Qg=typeof URLSearchParams<"u"?URLSearchParams:ol,ey=typeof FormData<"u"?FormData:null,ty=typeof Blob<"u"?Blob:null,ny=(()=>{let n;return typeof navigator<"u"&&((n=navigator.product)==="ReactNative"||n==="NativeScript"||n==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),ry=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Sn={classes:{URLSearchParams:Qg,FormData:ey,Blob:ty},isStandardBrowserEnv:ny,isStandardBrowserWebWorkerEnv:ry,protocols:["http","https","file","blob","url","data"]};function sy(n,e){return wo(n,new Sn.classes.URLSearchParams,Object.assign({visitor:function(t,r,s,i){return Sn.isNode&&q.isBuffer(t)?(this.append(r,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function iy(n){return q.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function oy(n){const e={},t=Object.keys(n);let r;const s=t.length;let i;for(r=0;r<s;r++)i=t[r],e[i]=n[i];return e}function S0(n){function e(t,r,s,i){let o=t[i++];const a=Number.isFinite(+o),c=i>=t.length;return o=!o&&q.isArray(s)?s.length:o,c?(q.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!q.isObject(s[o]))&&(s[o]=[]),e(t,r,s[o],i)&&q.isArray(s[o])&&(s[o]=oy(s[o])),!a)}if(q.isFormData(n)&&q.isFunction(n.entries)){const t={};return q.forEachEntry(n,(r,s)=>{e(iy(r),s,t,0)}),t}return null}const ay={"Content-Type":void 0};function cy(n,e,t){if(q.isString(n))try{return(e||JSON.parse)(n),q.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(n)}const us={transitional:C0,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",s=r.indexOf("application/json")>-1,i=q.isObject(e);if(i&&q.isHTMLForm(e)&&(e=new FormData(e)),q.isFormData(e))return s&&s?JSON.stringify(S0(e)):e;if(q.isArrayBuffer(e)||q.isBuffer(e)||q.isStream(e)||q.isFile(e)||q.isBlob(e))return e;if(q.isArrayBufferView(e))return e.buffer;if(q.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return sy(e,this.formSerializer).toString();if((a=q.isFileList(e))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return wo(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||s?(t.setContentType("application/json",!1),cy(e)):e}],transformResponse:[function(e){const t=this.transitional||us.transitional,r=t&&t.forcedJSONParsing,s=this.responseType==="json";if(e&&q.isString(e)&&(r&&!this.responseType||s)){const o=!(t&&t.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?De.from(a,De.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Sn.classes.FormData,Blob:Sn.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};q.forEach(["delete","get","head"],function(e){us.headers[e]={}});q.forEach(["post","put","patch"],function(e){us.headers[e]=q.merge(ay)});const ly=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),dy=n=>{const e={};let t,r,s;return n&&n.split(`
|
|
7
|
-
`).forEach(function(o){s=o.indexOf(":"),t=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!t||e[t]&&ly[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e},Zd=Symbol("internals");function Es(n){return n&&String(n).trim().toLowerCase()}function Ti(n){return n===!1||n==null?n:q.isArray(n)?n.map(Ti):String(n)}function uy(n){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(n);)e[r[1]]=r[2];return e}const fy=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Aa(n,e,t,r,s){if(q.isFunction(r))return r.call(this,e,t);if(s&&(e=t),!!q.isString(e)){if(q.isString(r))return e.indexOf(r)!==-1;if(q.isRegExp(r))return r.test(e)}}function hy(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function my(n,e){const t=q.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+t,{value:function(s,i,o){return this[r].call(this,e,s,i,o)},configurable:!0})})}let rn=class{constructor(e){e&&this.set(e)}set(e,t,r){const s=this;function i(a,c,h){const b=Es(c);if(!b)throw new Error("header name must be a non-empty string");const w=q.findKey(s,b);(!w||s[w]===void 0||h===!0||h===void 0&&s[w]!==!1)&&(s[w||c]=Ti(a))}const o=(a,c)=>q.forEach(a,(h,b)=>i(h,b,c));return q.isPlainObject(e)||e instanceof this.constructor?o(e,t):q.isString(e)&&(e=e.trim())&&!fy(e)?o(dy(e),t):e!=null&&i(t,e,r),this}get(e,t){if(e=Es(e),e){const r=q.findKey(this,e);if(r){const s=this[r];if(!t)return s;if(t===!0)return uy(s);if(q.isFunction(t))return t.call(this,s,r);if(q.isRegExp(t))return t.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Es(e),e){const r=q.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||Aa(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let s=!1;function i(o){if(o=Es(o),o){const a=q.findKey(r,o);a&&(!t||Aa(r,r[a],a,t))&&(delete r[a],s=!0)}}return q.isArray(e)?e.forEach(i):i(e),s}clear(e){const t=Object.keys(this);let r=t.length,s=!1;for(;r--;){const i=t[r];(!e||Aa(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){const t=this,r={};return q.forEach(this,(s,i)=>{const o=q.findKey(r,i);if(o){t[o]=Ti(s),delete t[i];return}const a=e?hy(i):String(i).trim();a!==i&&delete t[i],t[a]=Ti(s),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return q.forEach(this,(r,s)=>{r!=null&&r!==!1&&(t[s]=e&&q.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
|
|
8
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[Zd]=this[Zd]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=Es(o);r[a]||(my(s,o),r[a]=!0)}return q.isArray(e)?e.forEach(i):i(e),this}};rn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);q.freezeMethods(rn.prototype);q.freezeMethods(rn);function wa(n,e){const t=this||us,r=e||t,s=rn.from(r.headers);let i=r.data;return q.forEach(n,function(a){i=a.call(t,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function D0(n){return!!(n&&n.__CANCEL__)}function ri(n,e,t){De.call(this,n??"canceled",De.ERR_CANCELED,e,t),this.name="CanceledError"}q.inherits(ri,De,{__CANCEL__:!0});function by(n,e,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?n(t):e(new De("Request failed with status code "+t.status,[De.ERR_BAD_REQUEST,De.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}const py=Sn.isStandardBrowserEnv?function(){return{write:function(t,r,s,i,o,a){const c=[];c.push(t+"="+encodeURIComponent(r)),q.isNumber(s)&&c.push("expires="+new Date(s).toGMTString()),q.isString(i)&&c.push("path="+i),q.isString(o)&&c.push("domain="+o),a===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(t){const r=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function gy(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function yy(n,e){return e?n.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):n}function v0(n,e){return n&&!gy(e)?yy(n,e):e}const Ay=Sn.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function s(i){let o=i;return e&&(t.setAttribute("href",o),o=t.href),t.setAttribute("href",o),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return r=s(window.location.href),function(o){const a=q.isString(o)?s(o):o;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function wy(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function Ey(n,e){n=n||10;const t=new Array(n),r=new Array(n);let s=0,i=0,o;return e=e!==void 0?e:1e3,function(c){const h=Date.now(),b=r[i];o||(o=h),t[s]=c,r[s]=h;let w=i,D=0;for(;w!==s;)D+=t[w++],w=w%n;if(s=(s+1)%n,s===i&&(i=(i+1)%n),h-o<e)return;const E=b&&h-b;return E?Math.round(D*1e3/E):void 0}}function Jd(n,e){let t=0;const r=Ey(50,250);return s=>{const i=s.loaded,o=s.lengthComputable?s.total:void 0,a=i-t,c=r(a),h=i<=o;t=i;const b={loaded:i,total:o,progress:o?i/o:void 0,bytes:a,rate:c||void 0,estimated:c&&o&&h?(o-i)/c:void 0,event:s};b[e?"download":"upload"]=!0,n(b)}}const By=typeof XMLHttpRequest<"u",xy=By&&function(n){return new Promise(function(t,r){let s=n.data;const i=rn.from(n.headers).normalize(),o=n.responseType;let a;function c(){n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}q.isFormData(s)&&(Sn.isStandardBrowserEnv||Sn.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.setContentType("multipart/form-data;",!1));let h=new XMLHttpRequest;if(n.auth){const E=n.auth.username||"",g=n.auth.password?unescape(encodeURIComponent(n.auth.password)):"";i.set("Authorization","Basic "+btoa(E+":"+g))}const b=v0(n.baseURL,n.url);h.open(n.method.toUpperCase(),x0(b,n.params,n.paramsSerializer),!0),h.timeout=n.timeout;function w(){if(!h)return;const E=rn.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),S={data:!o||o==="text"||o==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:E,config:n,request:h};by(function(M){t(M),c()},function(M){r(M),c()},S),h=null}if("onloadend"in h?h.onloadend=w:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(w)},h.onabort=function(){h&&(r(new De("Request aborted",De.ECONNABORTED,n,h)),h=null)},h.onerror=function(){r(new De("Network Error",De.ERR_NETWORK,n,h)),h=null},h.ontimeout=function(){let g=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const S=n.transitional||C0;n.timeoutErrorMessage&&(g=n.timeoutErrorMessage),r(new De(g,S.clarifyTimeoutError?De.ETIMEDOUT:De.ECONNABORTED,n,h)),h=null},Sn.isStandardBrowserEnv){const E=(n.withCredentials||Ay(b))&&n.xsrfCookieName&&py.read(n.xsrfCookieName);E&&i.set(n.xsrfHeaderName,E)}s===void 0&&i.setContentType(null),"setRequestHeader"in h&&q.forEach(i.toJSON(),function(g,S){h.setRequestHeader(S,g)}),q.isUndefined(n.withCredentials)||(h.withCredentials=!!n.withCredentials),o&&o!=="json"&&(h.responseType=n.responseType),typeof n.onDownloadProgress=="function"&&h.addEventListener("progress",Jd(n.onDownloadProgress,!0)),typeof n.onUploadProgress=="function"&&h.upload&&h.upload.addEventListener("progress",Jd(n.onUploadProgress)),(n.cancelToken||n.signal)&&(a=E=>{h&&(r(!E||E.type?new ri(null,n,h):E),h.abort(),h=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const D=wy(b);if(D&&Sn.protocols.indexOf(D)===-1){r(new De("Unsupported protocol "+D+":",De.ERR_BAD_REQUEST,n));return}h.send(s||null)})},Ii={http:Yg,xhr:xy};q.forEach(Ii,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const Cy={getAdapter:n=>{n=q.isArray(n)?n:[n];const{length:e}=n;let t,r;for(let s=0;s<e&&(t=n[s],!(r=q.isString(t)?Ii[t.toLowerCase()]:t));s++);if(!r)throw r===!1?new De(`Adapter ${t} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(q.hasOwnProp(Ii,t)?`Adapter '${t}' is not available in the build`:`Unknown adapter '${t}'`);if(!q.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Ii};function Ea(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new ri(null,n)}function Qd(n){return Ea(n),n.headers=rn.from(n.headers),n.data=wa.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Cy.getAdapter(n.adapter||us.adapter)(n).then(function(r){return Ea(n),r.data=wa.call(n,n.transformResponse,r),r.headers=rn.from(r.headers),r},function(r){return D0(r)||(Ea(n),r&&r.response&&(r.response.data=wa.call(n,n.transformResponse,r.response),r.response.headers=rn.from(r.response.headers))),Promise.reject(r)})}const eu=n=>n instanceof rn?n.toJSON():n;function Zr(n,e){e=e||{};const t={};function r(h,b,w){return q.isPlainObject(h)&&q.isPlainObject(b)?q.merge.call({caseless:w},h,b):q.isPlainObject(b)?q.merge({},b):q.isArray(b)?b.slice():b}function s(h,b,w){if(q.isUndefined(b)){if(!q.isUndefined(h))return r(void 0,h,w)}else return r(h,b,w)}function i(h,b){if(!q.isUndefined(b))return r(void 0,b)}function o(h,b){if(q.isUndefined(b)){if(!q.isUndefined(h))return r(void 0,h)}else return r(void 0,b)}function a(h,b,w){if(w in e)return r(h,b);if(w in n)return r(void 0,h)}const c={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(h,b)=>s(eu(h),eu(b),!0)};return q.forEach(Object.keys(Object.assign({},n,e)),function(b){const w=c[b]||s,D=w(n[b],e[b],b);q.isUndefined(D)&&w!==a||(t[b]=D)}),t}const k0="1.4.0",al={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{al[n]=function(r){return typeof r===n||"a"+(e<1?"n ":" ")+n}});const tu={};al.transitional=function(e,t,r){function s(i,o){return"[Axios v"+k0+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(e===!1)throw new De(s(o," has been removed"+(t?" in "+t:"")),De.ERR_DEPRECATED);return t&&!tu[o]&&(tu[o]=!0,console.warn(s(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(i,o,a):!0}};function Sy(n,e,t){if(typeof n!="object")throw new De("options must be an object",De.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let s=r.length;for(;s-- >0;){const i=r[s],o=e[i];if(o){const a=n[i],c=a===void 0||o(a,i,n);if(c!==!0)throw new De("option "+i+" must be "+c,De.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new De("Unknown option "+i,De.ERR_BAD_OPTION)}}const mc={assertOptions:Sy,validators:al},Jn=mc.validators;let xr=class{constructor(e){this.defaults=e,this.interceptors={request:new Xd,response:new Xd}}request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Zr(this.defaults,t);const{transitional:r,paramsSerializer:s,headers:i}=t;r!==void 0&&mc.assertOptions(r,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean)},!1),s!=null&&(q.isFunction(s)?t.paramsSerializer={serialize:s}:mc.assertOptions(s,{encode:Jn.function,serialize:Jn.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o;o=i&&q.merge(i.common,i[t.method]),o&&q.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),t.headers=rn.concat(o,i);const a=[];let c=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(t)===!1||(c=c&&S.synchronous,a.unshift(S.fulfilled,S.rejected))});const h=[];this.interceptors.response.forEach(function(S){h.push(S.fulfilled,S.rejected)});let b,w=0,D;if(!c){const g=[Qd.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,h),D=g.length,b=Promise.resolve(t);w<D;)b=b.then(g[w++],g[w++]);return b}D=a.length;let E=t;for(w=0;w<D;){const g=a[w++],S=a[w++];try{E=g(E)}catch(T){S.call(this,T);break}}try{b=Qd.call(this,E)}catch(g){return Promise.reject(g)}for(w=0,D=h.length;w<D;)b=b.then(h[w++],h[w++]);return b}getUri(e){e=Zr(this.defaults,e);const t=v0(e.baseURL,e.url);return x0(t,e.params,e.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(e){xr.prototype[e]=function(t,r){return this.request(Zr(r||{},{method:e,url:t,data:(r||{}).data}))}});q.forEach(["post","put","patch"],function(e){function t(r){return function(i,o,a){return this.request(Zr(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}xr.prototype[e]=t(),xr.prototype[e+"Form"]=t(!0)});let Dy=class F0{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(i){t=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},e(function(i,o,a){r.reason||(r.reason=new ri(i,o,a),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}static source(){let e;return{token:new F0(function(s){e=s}),cancel:e}}};function vy(n){return function(t){return n.apply(null,t)}}function ky(n){return q.isObject(n)&&n.isAxiosError===!0}const bc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(bc).forEach(([n,e])=>{bc[e]=n});function T0(n){const e=new xr(n),t=u0(xr.prototype.request,e);return q.extend(t,xr.prototype,e,{allOwnKeys:!0}),q.extend(t,e,null,{allOwnKeys:!0}),t.create=function(s){return T0(Zr(n,s))},t}const ve=T0(us);ve.Axios=xr;ve.CanceledError=ri;ve.CancelToken=Dy;ve.isCancel=D0;ve.VERSION=k0;ve.toFormData=wo;ve.AxiosError=De;ve.Cancel=ve.CanceledError;ve.all=function(e){return Promise.all(e)};ve.spread=vy;ve.isAxiosError=ky;ve.mergeConfig=Zr;ve.AxiosHeaders=rn;ve.formToJSON=n=>S0(q.isHTMLForm(n)?new FormData(n):n);ve.HttpStatusCode=bc;ve.default=ve;const{Axios:V6,AxiosError:G6,CanceledError:Y6,isCancel:X6,CancelToken:Z6,VERSION:J6,all:Q6,Cancel:eA,isAxiosError:tA,spread:nA,toFormData:rA,AxiosHeaders:sA,HttpStatusCode:iA,formToJSON:oA,mergeConfig:aA}=ve,Hn=60*1e3,I0={Mainnet:{api:"https://api.wormholescan.io",circleAPI:hd("Mainnet"),chains:pa("Mainnet")},Testnet:{api:"https://api.testnet.wormholescan.io",circleAPI:hd("Testnet"),chains:pa("Testnet")},Devnet:{api:"http://guardian:7071",circleAPI:"",chains:pa("Devnet")}};function U0(n,e){return Object.fromEntries(Object.entries(I0[n].chains).filter(([t,r])=>r.platform==e))}function Fy(n,e){let t=I0[n];return e?cl(t,e):t}function Ty(n,e,t){const r=U0(n,e);return t?cl(r,t):r}function cl(n,e){n||(n={});for(const[t,r]of Object.entries(e))typeof r=="object"&&!Array.isArray(r)?n[t]=cl(n[t],r):n[t]=r;return n}const Iy=typeof je.process<"u";Iy&&je.process.env.NETWORK;async function fs(n,e,t=Hn,r){const s=Math.floor(t/e);let i=0;return new Promise((o,a)=>{n().then(c=>{if(c!==null){o(c);return}let h=setInterval(async()=>{if(i>=s){clearInterval(h),o(null);return}const b=await n();b!==null?(clearInterval(h),o(b)):r&&console.log(`Retrying ${r}, attempt ${i}/${s} `),i++},e)})})}const Uy=2e3;var nu;(function(n){n.complete="complete",n.pending_confirmations="pending_confirmations"})(nu||(nu={}));const _y=n=>({message:n.attestation,status:n.status});async function My(n,e){var r;const t=`${n}/${e}`;try{const s=await ve.get(t),i=_y(s==null?void 0:s.data);return i.message==="PENDING"?null:i.message}catch(s){if(!s||typeof s=="object"&&(ve.isAxiosError(s)&&((r=s.response)==null?void 0:r.status)===404||"status"in s&&s.status===404))return null;throw s}}async function Ry(n,e,t){return fs(()=>My(n,e),Uy,t,"Circle:GetAttestation")}async function zs(n,e,t){if(!Dp(t))throw new Error("Invalid signer, not SignAndSendSigner or SignOnlySigner");return(await Wy(e,async i=>sl(t)?t.signAndSend(i):n.sendWait(await t.sign(i)))).map(i=>({chain:n.chain,txid:i}))}async function Wy(n,e){const t=[];let r=[];for await(const s of n)s.parallelizable?r.push(s):(r.length>0&&(t.push(...await e(r)),r=[]),t.push(...await e([s])));return r.length>0&&t.push(...await e(r)),t}exports.TransferState=void 0;(function(n){n[n.Failed=-1]="Failed",n[n.Created=0]="Created",n[n.SourceInitiated=1]="SourceInitiated",n[n.SourceFinalized=2]="SourceFinalized",n[n.InReview=3]="InReview",n[n.Attested=4]="Attested",n[n.Refunded=5]="Refunded",n[n.DestinationInitiated=6]="DestinationInitiated",n[n.DestinationQueued=7]="DestinationQueued",n[n.DestinationFinalized=8]="DestinationFinalized"})(exports.TransferState||(exports.TransferState={}));function ll(n){return n.state===exports.TransferState.SourceInitiated}function Hs(n){return n.state===exports.TransferState.SourceFinalized}function ru(n){return n.state===exports.TransferState.InReview}function qs(n){return n.state===exports.TransferState.Attested}function Py(n){return n.state===exports.TransferState.Refunded}function dl(n){return n.state===exports.TransferState.DestinationInitiated}function Ly(n){return n.state===exports.TransferState.DestinationQueued}function Oy(n){return n.state===exports.TransferState.DestinationFinalized}function Ny(n){return n.state<0}class Bt{constructor(e,t,r,s){se(this,"wh");se(this,"fromChain");se(this,"toChain");se(this,"_state");se(this,"transfer");se(this,"txids",[]);se(this,"attestations");this._state=exports.TransferState.Created,this.wh=e,this.transfer=t,this.fromChain=r??e.getChain(t.from.chain),this.toChain=s??e.getChain(t.to.chain)}getTransferState(){return this._state}static async from(e,t,r=Hn,s,i){if(Up(t))return t={...t,...await Bt.destinationOverrides(e.getChain(t.from.chain),e.getChain(t.to.chain),t)},new Bt(e,t,s,i);let o;if(Br(t))o=await Bt.fromWormholeMessageId(e,t,r);else if(n0(t))o=await Bt.fromTransaction(e,t,r,s);else if(Ki(t))o=await Bt.fromCircleMessage(e,t);else throw new Error("Invalid `from` parameter for CircleTransfer");return o.fromChain=s??e.getChain(o.transfer.from.chain),o.toChain=i??e.getChain(o.transfer.to.chain),await o.fetchAttestation(r),o}static async fromWormholeMessageId(e,t,r){const{chain:s,emitter:i}=t,o=await Bt.getTransferVaa(e,t),a=o.payload.mintRecipient,c=Di(e.network,o.payload.targetDomain),{wormholeRelayer:h}=e.config.chains[c].contracts.cctp;let b=!1;if(h){const E=sn.chainAddress(s,h).address.toUniversalAddress();b=o.payloadName==="TransferWithRelay"&&a.equals(E)}const w={from:{chain:t.chain,address:o.payload.caller},to:{chain:c,address:a},amount:o.payload.token.amount,automatic:b},D=new Bt(e,w);return D.attestations=[{id:{emitter:i,sequence:o.sequence,chain:s},attestation:o}],D._state=exports.TransferState.Attested,D}static async fromCircleMessage(e,t){const[r,s]=exports.CircleBridge.deserialize(Ft.decode(t)),{payload:i}=r,o=i.messageSender,a=i.mintRecipient,c=Di(e.network,r.sourceDomain),h=Di(e.network,r.destinationDomain),b={from:{chain:c,address:o},to:{chain:h,address:a},amount:i.amount,automatic:!1},w=new Bt(e,b);return w.attestations=[{id:{hash:s},attestation:{message:r}}],w._state=exports.TransferState.SourceInitiated,w}static async fromTransaction(e,t,r,s){const{chain:i,txid:o}=t;s=s??e.getChain(i);let a=[];try{a=await s.parseTransaction(o)}catch(h){if(!(h.message.includes("no bridge messages found")||h.message.includes("not found")))throw h}let c;if(a.length>0)c=await Bt.fromWormholeMessageId(e,a[0],r);else{const b=await(await s.getCircleBridge()).parseTransactionDetails(o),w={...b,automatic:!1};c=new Bt(e,w),c.attestations=[{id:b.id,attestation:{message:b.message}}]}return c._state=exports.TransferState.SourceInitiated,c.txids=[t],c}async initiateTransfer(e){if(this._state!==exports.TransferState.Created)throw new Error("Invalid state transition in `start`");return this.txids=await Bt.transfer(this.fromChain,this.transfer,e),this._state=exports.TransferState.SourceInitiated,this.txids.map(({txid:t})=>t)}async _fetchWormholeAttestation(e){let t=this.attestations??[];if(!t||t.length==0)throw new Error("No VAA details available");for(const r in t)t[r].attestation||(t[r].attestation=await Bt.getTransferVaa(this.wh,t[r].id,e));return this.attestations=t,t.map(r=>r.id)}async _fetchCircleAttestation(e){var r,s;let t=this.attestations??[];if(!t||t.length==0){if(this.txids.length===0)throw new Error("No circle attestations or transactions to fetch");const i=this.txids[((r=this.txids)==null?void 0:r.length)-1],c=await(await this.wh.getChain(this.transfer.from.chain).getCircleBridge()).parseTransactionDetails(i.txid);t=[{id:c.id,attestation:{message:c.message}}]}for(const i in t){const o=t[i];if((s=o.attestation)!=null&&s.attestation)continue;const a=await this.wh.getCircleAttestation(o.id.hash,e);if(a===null)throw new Error("No attestation available after timeout exhausted");t[i].attestation.attestation=a}return this.attestations=t,t.map(i=>i.id)}async fetchAttestation(e){if(this._state<exports.TransferState.SourceInitiated)throw new Error("Invalid state transition in `fetchAttestation`");const t=this.transfer.automatic?(await Promise.all([this._fetchWormholeAttestation(e),this._fetchCircleAttestation(e)])).flat():await this._fetchCircleAttestation(e);if(this._state=exports.TransferState.Attested,this.attestations&&this.attestations.length>0)for(const r of this.attestations){const{attestation:s}=r;if(!exports.CircleBridge.isCircleAttestation(s))continue;await Bt.isTransferComplete(this.toChain,s)&&(this._state=exports.TransferState.DestinationFinalized)}return t}async completeTransfer(e){var w;if(this._state<exports.TransferState.Attested)throw new Error("Invalid state transition in `finish`");if(this.transfer.automatic)throw this.attestations?this.attestations.find(E=>Br(E.id))?new Error("No method to redeem auto circle bridge tx (yet)"):new Error("No VAA found"):new Error("No VAA details available");if(!this.attestations)throw new Error("No Circle Attestations found");const t=this.attestations.filter(D=>Ki(D.id));if(t.length>1)throw new Error(`Expected a single circle attestation, found ${t.length}`);const{id:r,attestation:s}=t[0];if(!s)throw new Error(`No Circle Attestation for ${r.hash}`);const{message:i,attestation:o}=s;if(!o)throw new Error(`No Circle Attestation for ${r.hash}`);const a=await this.toChain.getCircleBridge(),c=sn.parseAddress(e.chain(),e.address()),h=a.redeem(c,i,o),b=await zs(this.toChain,h,e);return(w=this.txids)==null||w.push(...b),b.map(({txid:D})=>D)}}(function(n){async function e(h,b,w){let D;return b.automatic?D=(await h.getAutomaticCircleBridge()).transfer(b.from.address,{chain:b.to.chain,address:b.to.address},b.amount,b.nativeGas):D=(await h.getCircleBridge()).transfer(b.from.address,{chain:b.to.chain,address:b.to.address},b.amount),await zs(h,D,w)}n.transfer=e;async function*t(h,b,w=Hn,D,E){var T,M;const g=Date.now(),S=(N,_)=>Math.max(_-(Date.now()-N),0);if(D=D??h.getChain(b.from),E=E??h.getChain(b.to),ll(b)){if(b.originTxs.length===0)throw"Invalid state transition: no originating transactions";const N=b.originTxs[b.originTxs.length-1],_=await n.getTransferMessage(D,N.txid);b={...b,attestation:{id:_.id,attestation:{message:_.message}},state:exports.TransferState.SourceFinalized},yield b}if(Hs(b)){if(!b.attestation)throw"Invalid state transition: no attestation id";if(Br(b.attestation.id)){let N=b.attestation.attestation?b.attestation.attestation:void 0;N||(N=await n.getTransferVaa(h,b.attestation.id,S(g,w)),b={...b,attestation:{id:b.attestation.id,attestation:N},state:exports.TransferState.Attested},yield b)}else if(Ki(b.attestation.id)){const N=await h.getCircleAttestation(b.attestation.id.hash,w),_=b.originTxs[b.originTxs.length-1],L=await(await D.getCircleBridge()).parseTransactionDetails(_.txid);N&&(b={...b,attestation:{id:b.attestation.id,attestation:{attestation:N,message:L.message}},state:exports.TransferState.Attested},yield b)}}if(qs(b)||Hs(b)){if(!b.attestation)throw"Invalid state transition";if(Br(b.attestation.id)){const N=await h.getTransactionStatus(b.attestation.id,S(g,w));if(N&&((M=(T=N.globalTx)==null?void 0:T.destinationTx)!=null&&M.txHash)){const{chainId:_,txHash:U}=N.globalTx.destinationTx;b={...b,destinationTxs:[{chain:ss(_),txid:U}],state:exports.TransferState.DestinationInitiated},yield b}}}(qs(b)||dl(b))&&(await n.isTransferComplete(E,b.attestation.attestation)&&(b={...b,state:exports.TransferState.DestinationFinalized,destinationTxs:[]}),yield b)}n.track=t;async function r(h,b,w){const D={...w};if(w.to.chain==="Solana"&&!D.automatic){const E=sn.parseAddress("Solana",Ts.get(b.network,b.chain));D.to=await b.getTokenAccount(D.to.address,E)}return D}n.destinationOverrides=r;async function s(h,b,w){const D=Ts.get(b.network,b.chain);if(!D)throw"Invalid transfer, no USDC contract on destination";const E=Ts.get(h.network,h.chain);if(!E)throw"Invalid transfer, no USDC contract on source";const g=sn.chainAddress(b.chain,D),S=sn.chainAddress(h.chain,E),T=(h.chain==="Polygon"?2e3*200:Wc(h.chain))+Oc,M=w.automatic?Ms(0,5,0):Ms(24,0,0);if(!w.automatic)return{sourceToken:{token:S,amount:w.amount},destinationToken:{token:g,amount:w.amount},eta:T,expires:M};let N=w.amount;const _=w.nativeGas?w.nativeGas:0n;N-=_;const L=await(await h.getAutomaticCircleBridge()).getRelayerFee(b.chain);N-=L;let H=0n;return w.nativeGas&&(H=await(await b.getAutomaticCircleBridge()).nativeTokenAmount(_)),{sourceToken:{token:S,amount:w.amount},destinationToken:{token:g,amount:N},relayFee:{token:S,amount:L},destinationNativeGas:H,eta:T,expires:M}}n.quoteTransfer=s;async function i(h,b){if(!exports.CircleBridge.isCircleAttestation(b))throw new Error("Must check for completion with circle message");return await(await h.getCircleBridge()).isTransferCompleted(b.message)}n.isTransferComplete=i;async function o(h,b,w){const D=await h.getVaa(b,"AutomaticCircleBridge:TransferWithRelay",w);if(!D)throw new Error("No VAA available after timeout exhausted");return D}n.getTransferVaa=o;async function a(h,b){return await(await h.getCircleBridge()).parseTransactionDetails(b)}n.getTransferMessage=a;function c(h){var N,_;const{from:b,to:w}=h.transfer;let D={from:b.chain,to:w.chain,state:exports.TransferState.Created};const E=h.txids.filter(U=>U.chain===h.transfer.from.chain);E.length>0&&(D={...D,state:exports.TransferState.SourceInitiated,originTxs:E});const g=((N=h.attestations)==null?void 0:N.filter(U=>Br(U.id)))??[],S=((_=h.attestations)==null?void 0:_.filter(U=>Ki(U.id)))??[],T=S.length>0?S[0]:g.length>0?g[0]:void 0;T&&T.id&&(D={...D,state:exports.TransferState.SourceFinalized,attestation:T},T.attestation&&(D={...D,state:exports.TransferState.Attested,attestation:{id:T.id,attestation:T.attestation}}));const M=h.txids.filter(U=>U.chain===h.transfer.to.chain);return M.length>0&&(D={...D,state:exports.TransferState.DestinationInitiated,destinationTxs:M}),D}n.getReceipt=c})(Bt||(Bt={}));const Eo=2e3;async function _0(n,e){var c;const{chain:t,emitter:r,sequence:s}=e,i=Zs(t),o=Vu("0x",r.toString()),a=`${n}/v1/signed_vaa/${i}/${o}/${s}`;try{const{data:{vaaBytes:h}}=await ve.get(a);return ao.decode(h)}catch(h){if(!h||typeof h=="object"&&(ve.isAxiosError(h)&&((c=h.response)==null?void 0:c.status)===404||"status"in h&&h.status===404))return null;throw h}}async function zy(n,e,t){return await fs(()=>_0(n,e),Eo,t,"Wormholescan:GetVaaBytes")}async function Hy(n,e,t){const r=await _0(n,e);return r?Os(t,r):null}async function qy(n,e,t,r){return await fs(()=>Hy(n,e,t),Eo,r,"Wormholescan:GetVaaBytes")}async function Ky(n,e){var c;const{chain:t,emitter:r,sequence:s}=e,i=Zs(t),o=r.toUniversalAddress().toString(),a=`${n}/api/v1/transactions/${i}/${o}/${s}`;try{return(await ve.get(a)).data}catch(h){if(!h||typeof h=="object"&&(ve.isAxiosError(h)&&((c=h.response)==null?void 0:c.status)===404||"status"in h&&h.status===404))return null;throw h}}async function jy(n,e,t){return await fs(()=>Ky(n,e),Eo,t,"Wormholescan:GetTransactionStatus")}async function $y(n,e){var r;const t=`${n}/api/v1/vaas?txHash=${e}`;try{const s=await ve.get(t);if(s.data.data.length>0)return s.data.data[0]}catch(s){if(!s||typeof s=="object"&&(ve.isAxiosError(s)&&((r=s.response)==null?void 0:r.status)===404||"status"in s&&s.status===404))return null;throw s}return null}async function su(n,e,t,r){const i=await fs(()=>$y(n,e),Eo,r,"Wormholescan:GetVaaByTxHash");return i?Os(t,ao.decode(i.vaa)):null}async function Vy(n,e,t=50,r=0){var i;const s=`${n}/api/v1/transactions?address=${e}&pageSize=${t}&page=${r}`;try{const o=await ve.get(s);if(o.data.transactions.length>0)return o.data.transactions}catch(o){if(!o||typeof o=="object"&&(ve.isAxiosError(o)&&((i=o.response)==null?void 0:i.status)===404||"status"in o&&o.status===404))return null;throw o}return null}async function Gy(n){const e=`${n}/v1/governor/token_list`;try{const t=await ve.get(e);if(t.data&&t.data.entries.length>0)return t.data.entries.reduce((r,s)=>{const i=ss(s.originChainId);return r[i]=r[i]||{},r[i][s.originAddress]=s.price,r},{})}catch{}return null}async function Yy(n){const e=`${n}/v1/governor/available_notional_by_chain`;try{const t=await ve.get(e);if(t.data&&t.data.entries.length>0)return t.data.entries.reduce((r,s)=>{const i=s.bigTransactionSize==="0"?void 0:ks(xi(s.bigTransactionSize,2));return r[ss(s.chainId)]={available:ks(xi(s.remainingAvailableNotional,2)),limit:ks(xi(s.notionalLimit,2)),maxSize:i},r},{})}catch{}return null}async function Xy(n,e){const{chain:t,emitter:r,sequence:s}=e,i=Zs(t),o=r.toUniversalAddress().toString(),a=`${n}/v1/governor/is_vaa_enqueued/${i}/${o}/${s}`;return(await ve.get(a)).data.isEnqueued}class yt{constructor(e,t,r,s){se(this,"wh");se(this,"fromChain");se(this,"toChain");se(this,"_state");se(this,"transfer");se(this,"txids",[]);se(this,"attestations");this._state=exports.TransferState.Created,this.wh=e,this.transfer=t,this.fromChain=r??e.getChain(t.from.chain),this.toChain=s??e.getChain(t.to.chain)}getTransferState(){return this._state}static async from(e,t,r=6e3,s,i){if(Hp(t))return s=s??e.getChain(t.from.chain),i=i??e.getChain(t.to.chain),yt.validateTransferDetails(e,t,s,i),t={...t,...await yt.destinationOverrides(s,i,t)},new yt(e,t,s,i);let o;if(Br(t))o=await yt.fromIdentifier(e,t,r);else if(n0(t))o=await yt.fromTransaction(e,t,r,s);else throw new Error("Invalid `from` parameter for TokenTransfer");return o.fromChain=s??e.getChain(o.transfer.from.chain),o.toChain=i??e.getChain(o.transfer.to.chain),await o.fetchAttestation(r),o}static async fromIdentifier(e,t,r){const s=await yt.getTransferVaa(e,t,r);if(!s)throw new Error("VAA not found");const i=s.protocolName==="AutomaticTokenBridge";let o={chain:s.emitterChain,address:s.emitterAddress},{token:a,to:c}=s.payload,h;if(a.chain===o.chain)h=await e.getTokenNativeAddress(o.chain,a.chain,a.address);else{const M=await(await(await e.getChain(o.chain)).getTokenBridge()).getWrappedAsset(a);h=ar(o.chain,M.toString())}const b=await e.getDecimals(o.chain,h),w=vs($r(a.amount,Math.min(b,yt.MAX_DECIMALS)),b);let D=0n;i&&(D=s.payload.payload.toNativeTokenAmount,o={chain:s.emitterChain,address:s.payload.from},c={chain:s.payload.to.chain,address:s.payload.payload.targetRecipient});const E={token:a,amount:wn(w),from:o,to:c,automatic:i,nativeGas:D},g=new yt(e,E);return g.attestations=[{id:t,attestation:s}],g._state=exports.TransferState.Attested,g}static async fromTransaction(e,t,r,s){s=s??e.getChain(t.chain);const i=await yt.getTransferMessage(s,t.txid,r),o=await yt.fromIdentifier(e,i,r);return o.txids=[t],o}async initiateTransfer(e){if(this._state!==exports.TransferState.Created)throw new Error("Invalid state transition in `initiateTransfer`");return this.txids=await yt.transfer(this.fromChain,this.transfer,e),this._state=exports.TransferState.SourceInitiated,this.txids.map(({txid:t})=>t)}async fetchAttestation(e){if(this._state<exports.TransferState.SourceInitiated||this._state>exports.TransferState.Attested)throw new Error("Invalid state transition in `fetchAttestation`, expected at least `SourceInitiated`");if(!this.attestations||this.attestations.length===0){if(this.txids.length===0)throw new Error("No VAAs set and txids available to look them up");const t=this.txids[this.txids.length-1],r=await yt.getTransferMessage(this.fromChain,t.txid,e);this.attestations=[{id:r}]}for(const t in this.attestations){if(this.attestations[t].attestation)continue;const r=await yt.getTransferVaa(this.wh,this.attestations[t].id,e);if(!r)throw new Error("VAA not found");this.attestations[t].attestation=r}if(this._state=exports.TransferState.Attested,this.attestations.length>0){const{attestation:t}=this.attestations[0];await yt.isTransferComplete(this.toChain,t)&&(this._state=exports.TransferState.DestinationFinalized)}return this.attestations.map(t=>t.id)}async completeTransfer(e){if(this._state<exports.TransferState.Attested)throw new Error("Invalid state transition, must be attested prior to calling `completeTransfer`.");if(!this.attestations)throw new Error("No VAA details available");const{attestation:t}=this.attestations[0];if(!t)throw new Error(`No VAA found for ${this.attestations[0].id.sequence}`);const r=await yt.redeem(this.toChain,t,e);return this.txids.push(...r),this._state=exports.TransferState.DestinationInitiated,r.map(({txid:s})=>s)}}(function(n){n.MAX_DECIMALS=8;async function e(E,g,S){const T=ar(S.chain(),S.address()),M=bo(g.token)?g.token.address:g.token;let N;return g.automatic?N=(await E.getAutomaticTokenBridge()).transfer(T,g.to,M,g.amount,g.nativeGas):N=(await E.getTokenBridge()).transfer(T,g.to,M,g.amount,g.payload),zs(E,N,S)}n.transfer=e;async function t(E,g,S){const T=ar(S.chain(),S.address()),M=g.protocolName==="AutomaticTokenBridge"?(await E.getAutomaticTokenBridge()).redeem(T,g):(await E.getTokenBridge()).redeem(T,g);return zs(E,M,S)}n.redeem=t;async function*r(E,g,S=Hn,T,M){var U,L;const N=Date.now(),_=(H,K)=>Math.max(K-(Date.now()-H),0);if(T=T??E.getChain(g.from),ll(g)){if(g.originTxs.length===0)throw"Origin transactions required to fetch message id";const{txid:H}=g.originTxs[g.originTxs.length-1],K=await n.getTransferMessage(T,H,_(N,S));g={...g,state:exports.TransferState.SourceFinalized,attestation:{id:K}},yield g}if(Hs(g)||ru(g)){if(!g.attestation.id)throw"Attestation id required to fetch attestation";const{id:H}=g.attestation,K=await n.getTransferVaa(E,H,_(N,S));throw K?(g={...g,attestation:{id:H,attestation:K},state:exports.TransferState.Attested},yield g):await n.isTransferEnqueued(E,H)&&(g={...g,state:exports.TransferState.InReview},yield g),new Error("Attestation not found")}if(qs(g)||Hs(g)||ru(g)){if(!g.attestation.id)throw"Attestation id required to fetch redeem tx";const{id:H}=g.attestation,K=await E.getTransactionStatus(H,_(N,S));if(K&&((L=(U=K.globalTx)==null?void 0:U.destinationTx)!=null&&L.txHash)){const{chainId:V,txHash:ee}=K.globalTx.destinationTx;g={...g,destinationTxs:[{chain:ss(V),txid:ee}],state:exports.TransferState.DestinationInitiated}}yield g}if(qs(g)||dl(g)){if(!g.attestation.attestation)throw"Signed Attestation required to check for redeem";if(g.attestation.attestation.payloadName==="AttestMeta")throw new Error("Unable to track an AttestMeta receipt");await n.isTransferComplete(M??E.getChain(g.attestation.attestation.payload.to.chain),g.attestation.attestation)&&(g={...g,state:exports.TransferState.DestinationFinalized}),yield g}yield g}n.track=r;function s(E){const{transfer:g}=E,S=g.from.chain,T=g.to.chain;let M={from:S,to:T,state:exports.TransferState.Created};const N=E.txids.filter(H=>H.chain===g.from.chain);N.length>0&&(M={...M,state:exports.TransferState.SourceInitiated,originTxs:N});const _=E.attestations&&E.attestations.length>0?E.attestations[0]:void 0,U=_&&_.id?{id:_.id,attestation:_.attestation}:void 0;U&&U.id&&(M={...M,state:exports.TransferState.SourceFinalized,attestation:{id:U.id}},U.attestation&&(M={...M,state:exports.TransferState.Attested,attestation:{id:U.id,attestation:U.attestation}}));const L=E.txids.filter(H=>H.chain===g.to.chain);return L.length>0&&(M={...M,state:exports.TransferState.DestinationFinalized,destinationTxs:L}),M}n.getReceipt=s;async function i(E,g,S){let T;const M=await E.getTokenBridge();if(Lt(S.address)){const U=await M.getWrappedNative();T={chain:S.chain,address:await M.getTokenUniversalAddress(U)}}else try{let U;Ot.instanceof(S.address)?U=await M.getWrappedAsset(S):U=S.address,T=await M.getOriginalAsset(U)}catch(U){if(!U.message.includes("not a wrapped asset"))throw U;let L;Ot.instanceof(S.address)?L=await M.getTokenNativeAddress(E.chain,S.address):L=S.address,T={chain:S.chain,address:await M.getTokenUniversalAddress(L)}}const N=await g.getTokenBridge();if(T.chain===g.chain){const U=await N.getTokenNativeAddress(T.chain,T.address),L=await N.getWrappedNative();return Tn({chain:g.chain,address:L})===Tn({chain:g.chain,address:U})?{chain:g.chain,address:"native"}:{chain:g.chain,address:U}}const _=await N.getWrappedAsset(T);return{chain:g.chain,address:_}}n.lookupDestinationToken=i;async function o(E,g){return g.protocolName==="AutomaticTokenBridge"&&(g=Os("TokenBridge:TransferWithPayload",oc(g))),(await E.getTokenBridge()).isTransferCompleted(g)}n.isTransferComplete=o;async function a(E,g,S){const T=await sn.parseMessageFromTx(E,g,S);if(T.length!==1)throw new Error("Expected a single Wormhole Message, got: "+T.length);return T[0]}n.getTransferMessage=a;async function c(E,g,S){const T=await E.getVaa(g,dc.getTransferDiscriminator(),S);if(!T)return null;if(T.payloadName==="TransferWithPayload"){const{chain:M,address:N}=T.payload.to,{tokenBridgeRelayer:_}=E.config.chains[M].contracts,U=_?Gf(M,_):null;if(U&&N.equals(U))return Os("AutomaticTokenBridge:TransferWithRelay",oc(T))}return T}n.getTransferVaa=c;async function h(E,g){return await E.getIsVaaEnqueued(g)}n.isTransferEnqueued=h;function b(E,g,S,T){if(g.amount===0n)throw new Error("Amount cannot be 0");if(g.from.chain===g.to.chain)throw new Error("Cannot transfer to the same chain");if(S=S??E.getChain(g.from.chain),T=T??E.getChain(g.to.chain),g.automatic){if(g.payload)throw new Error("Payload with automatic delivery is not supported");if(!S.supportsAutomaticTokenBridge())throw new Error(`Automatic Token Bridge not supported on ${g.from.chain}`);if(!T.supportsAutomaticTokenBridge())throw new Error(`Automatic Token Bridge not supported on ${g.to.chain}`);const M=g.nativeGas??0n;if(M>g.amount)throw new Error(`Native gas amount > amount (${M} > ${g.amount})`)}else{if(g.nativeGas)throw new Error("Gas Dropoff is only supported for automatic transfers");if(!S.supportsTokenBridge())throw new Error(`Token Bridge not supported on ${g.from.chain}`);if(!T.supportsTokenBridge())throw new Error(`Token Bridge not supported on ${g.to.chain}`)}}n.validateTransferDetails=b;async function w(E,g,S,T){const M=await g.getTokenBridge();let N;if(Lt(T.token.address))N=await M.getWrappedNative();else if(Ot.instanceof(T.token.address))try{N=await M.getWrappedAsset(T.token)}catch(y){if(!y.message.includes("not a wrapped asset"))throw y;N=await M.getTokenNativeAddress(g.chain,T.token.address)}else N=T.token.address;sn.tokenId(g.chain,N.toString());const _=await g.getDecimals(N),U=$r(T.amount,_),L=Ci(U,n.MAX_DECIMALS),[H,K]=await Promise.all([Gy(E.config.api),Yy(E.config.api)]),V=[];if(K!==null&&g.chain in K&&H!==null){let y;if(Lt(T.token.address))y={chain:g.chain,address:await M.getTokenUniversalAddress(N)};else try{y=await M.getOriginalAsset(T.token.address)}catch(u){if(!u.message.includes("not a wrapped asset"))throw u;y={chain:g.chain,address:await M.getTokenUniversalAddress(N)}}if(y.chain in H&&y.address.toString()in H[y.chain]){const u=K[g.chain],G=H[y.chain][y.address.toString()]*ks(L);u.maxSize&&G>u.maxSize&&V.push({type:"GovernorLimitWarning",reason:"ExceedsLargeTransferLimit"}),G>u.available&&V.push({type:"GovernorLimitWarning",reason:"ExceedsRemainingNotional"})}}const ee=await n.lookupDestinationToken(g,S,T.token),re=await S.getDecimals(ee.address),$=vs(L,re),ie=Wc(g.chain)+Oc;if(!T.automatic)return{sourceToken:{token:T.token,amount:wn(L)},destinationToken:{token:ee,amount:wn($)},warnings:V.length>0?V:void 0,eta:ie,expires:Ms(24,0,0)};const l=await(await g.getAutomaticTokenBridge()).getRelayerFee(S.chain,N),m=vs(Ci($r(l,_),n.MAX_DECIMALS),re),p=T.nativeGas??0n,C=wn(vs(Ci($r(p,_),n.MAX_DECIMALS),re)),B=890880n;let x=0n;if(T.nativeGas){const y=await S.getAutomaticTokenBridge(),[u,k]=await Promise.all([y.maxSwapAmount(ee.address),y.nativeTokenAmount(ee.address,C)]);if(C>u)throw new Error(`Native gas amount exceeds maximum swap amount: ${id(C,re)}>${id(u,re)}`);if(S.chain==="Solana"&&k<B)throw new Error(`Native gas amount must be at least ${B} lamports`);x=k}const I=wn($)-C-wn(m);if(ee.chain==="Solana"){const y=await S.getNativeWrappedTokenId();if((Lt(ee.address)||e0(ee,y))&&I<B)throw new Error(`Destination amount must be at least ${B} lamports`)}return{sourceToken:{token:T.token,amount:wn(L)},destinationToken:{token:ee,amount:I},relayFee:{token:ee,amount:wn(m)},destinationNativeGas:x,warnings:V.length>0?V:void 0,eta:ie,expires:Ms(0,5,0)}}n.quoteTransfer=w;async function D(E,g,S){const T={...S};if(S.to.chain==="Solana"&&!T.automatic){const M=await n.lookupDestinationToken(E,g,T.token);if(Lt(M.address)){const N=await g.getNativeWrappedTokenId();T.to=await g.getTokenAccount(T.to.address,N.address)}else T.to=await g.getTokenAccount(T.to.address,M.address)}if(T.to.chain==="Sei"){if(T.to.chain==="Sei"&&T.payload)throw new Error("Arbitrary payloads unsupported for Sei");T.payload=Nt.encode(JSON.stringify({basic_recipient:{recipient:ao.encode(T.to.address.toString())}}));const M=g.config.contracts.translator;if(M===void 0||M==="")throw new Error("Unexpected empty translator address");T.to=sn.chainAddress(T.to.chain,M)}return T}n.destinationOverrides=D})(yt||(yt={}));function Zy(n){if(n.length===0)return[];const{chain:e}=n[0];if(!n.every(t=>t.chain===e))throw new Error("Not every chain is equal");return Array.from(new Set(n.map(t=>Tn(t)))).map(t=>sn.tokenId(e,t))}async function Jy(n,e,t){const r=Tn(e),s=n.config.tokenMap?os.byAddress(n.config.tokenMap,r):void 0,i=s?s.symbol:void 0,o=Lt(e.address)?await n.getNativeWrappedTokenId():void 0;return t=t??await n.getDecimals(e.address),{id:e,decimals:t,wrapped:o,symbol:i}}class M0{constructor(e,t){se(this,"wh");se(this,"routeConstructors");se(this,"inputTokenList");this.wh=e,this.routeConstructors=t}async supportedDestinationTokens(e,t,r){const[,s]=t0(t.network,t.chain,e),i=await Promise.all(this.routeConstructors.map(async o=>{if(!o.supportedNetworks().includes(t.network))return[];const c=o.supportedChains(t.network);if(!c.includes(t.chain)||!c.includes(r.chain))return[];try{return await o.supportedDestinationTokens(s,t,r)}catch{return[]}}));return Zy(i.flat())}async findRoutes(e){return(await Promise.all(this.routeConstructors.map(async r=>{try{const s=r.supportedNetworks().includes(this.wh.network)&&r.supportedChains(this.wh.network).includes(e.toChain.chain)&&r.supportedChains(this.wh.network).includes(e.fromChain.chain),i=Tn(Lt(e.destination.id.address)?e.destination.wrapped:e.destination.id),o=(await r.supportedDestinationTokens(e.source.id,e.fromChain,e.toChain)).filter(a=>Tn(a)===i).length>0;return s&&o}catch{return!1}})).then(r=>this.routeConstructors.filter((s,i)=>r[i]))).map(r=>new r(this.wh))}}class sn{constructor(e,t,r){se(this,"_network");se(this,"_platforms");se(this,"_chains");se(this,"config");this._network=e,this.config=Fy(e,r),this._chains=new Map,this._platforms=new Map;for(const s of t)this._platforms.set(s._platform,new s(e,this.config.chains))}get network(){return this._network}async circleTransfer(e,t,r,s,i,o){if(s&&i)throw new Error("Payload with automatic delivery is not supported");if(!Ga(this.network,t.chain)||!Ga(this.network,r.chain)||!bd(this.network,t.chain)||!bd(this.network,r.chain))throw new Error(`Network and chain not supported: ${this.network} ${t.chain} `);if(s){const h=await(await this.getChain(t.chain).getAutomaticCircleBridge()).getRelayerFee(r.chain)+(o||0n);if(e<h)throw new Error(`Amount must be > ${h} (relayerFee + nativeGas)`)}return await Bt.from(this,{amount:e,from:t,to:r,automatic:s,payload:i,nativeGas:o})}async tokenTransfer(e,t,r,s,i,o,a){return await yt.from(this,{token:e,amount:t,from:r,to:s,automatic:i,payload:o,nativeGas:a})}resolver(e){return new M0(this,e)}getContracts(e){var t;return(t=this.config.chains[e])==null?void 0:t.contracts}getPlatform(e){const t=this._platforms.get(e);if(!t)throw new Error(`Not able to retrieve platform ${e}. Did it get registered in the constructor?`);return t}getChain(e){const t=is(e);return this._chains.has(e)||this._chains.set(e,this.getPlatform(t).getChain(e)),this._chains.get(e)}async getWrappedAsset(e,t){const s=await this.getChain(e).getTokenBridge();return{chain:e,address:await s.getWrappedAsset(t)}}async getOriginalAsset(e){return await(await this.getChain(e.chain).getTokenBridge()).getOriginalAsset(e.address)}async getTokenUniversalAddress(e,t){return await(await this.getChain(e).getTokenBridge()).getTokenUniversalAddress(t)}async getTokenNativeAddress(e,t,r){return await(await this.getChain(e).getTokenBridge()).getTokenNativeAddress(t,r)}async getDecimals(e,t){return await this.getChain(e).getDecimals(t)}async getBalance(e,t,r){return this.getChain(e).getBalance(r,t)}async getTokenAccount(e,t){return this.getChain(e.chain).getTokenAccount(e.address,t.address)}async getVaaBytes(e,t=Hn){return await zy(this.config.api,e,t)}async getVaa(e,t,r=Hn){return typeof e=="string"?await su(this.config.api,e,t,r):await qy(this.config.api,e,t,r)}async getIsVaaEnqueued(e){return await Xy(this.config.api,e)}async getCircleAttestation(e,t=Hn){return Ry(this.config.circleAPI,e,t)}async getTransactionStatus(e,t=Hn){let r;if(typeof e=="string"){const s=await su(this.config.api,e,"Uint8Array",t);if(!s)return null;r={emitter:s.emitterAddress,chain:s.emitterChain,sequence:s.sequence}}else r=e;return await jy(this.config.api,r,t)}async getTransactionsForAddress(e,t=50,r=0){return Vy(this.config.api,e,t,r)}static parseAddress(e,t){return ar(e,t)}static canonicalAddress(e){return Tn(e)}static chainAddress(e,t){return{chain:e,address:sn.parseAddress(e,t)}}static tokenId(e,t){return Lt(t)?Qf(e):this.chainAddress(e,t)}static async parseMessageFromTx(e,t,r=Hn){const i=await fs(async()=>{try{const o=await e.parseTransaction(t);return o.length===0?null:o}catch(o){return console.error(o),null}},e.config.blockTime,r,"WormholeCore:ParseMessageFromTransaction");if(!i)throw new Error(`No WormholeMessageId found for ${t}`);return i}}class Bo{constructor(e){se(this,"wh");this.wh=e}transferUrl(e){return`https://wormholescan.io/#/tx/${e}?network=${this.wh.network}`}}class R0 extends Bo{}se(R0,"IS_AUTOMATIC",!0);function Qy(n){return!!n.constructor.IS_AUTOMATIC}class pc extends Bo{}se(pc,"NATIVE_GAS_DROPOFF_SUPPORTED",!1),se(pc,"IS_AUTOMATIC",!1);function e2(n){return n.complete!==void 0}class t2 extends Bo{}function n2(n){return n.finalize!==void 0}var gc={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(n,e){var t=ae,r=t.Buffer;function s(o,a){for(var c in o)a[c]=o[c]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?n.exports=t:(s(t,e),e.Buffer=i);function i(o,a,c){return r(o,a,c)}i.prototype=Object.create(r.prototype),s(r,i),i.from=function(o,a,c){if(typeof o=="number")throw new TypeError("Argument must not be a number");return r(o,a,c)},i.alloc=function(o,a,c){if(typeof o!="number")throw new TypeError("Argument must be a number");var h=r(o);return a!==void 0?typeof c=="string"?h.fill(a,c):h.fill(a):h.fill(0),h},i.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r(o)},i.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(o)}})(gc,gc.exports);var W0=gc.exports,ul={exports:{}};ul.exports;(function(n){(function(e,t){function r(F,l){if(!F)throw new Error(l||"Assertion failed")}function s(F,l){F.super_=l;var m=function(){};m.prototype=l.prototype,F.prototype=new m,F.prototype.constructor=F}function i(F,l,m){if(i.isBN(F))return F;this.negative=0,this.words=null,this.length=0,this.red=null,F!==null&&((l==="le"||l==="be")&&(m=l,l=10),this._init(F||0,l||10,m||"be"))}typeof e=="object"?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=ae.Buffer}catch{}i.isBN=function(l){return l instanceof i?!0:l!==null&&typeof l=="object"&&l.constructor.wordSize===i.wordSize&&Array.isArray(l.words)},i.max=function(l,m){return l.cmp(m)>0?l:m},i.min=function(l,m){return l.cmp(m)<0?l:m},i.prototype._init=function(l,m,p){if(typeof l=="number")return this._initNumber(l,m,p);if(typeof l=="object")return this._initArray(l,m,p);m==="hex"&&(m=16),r(m===(m|0)&&m>=2&&m<=36),l=l.toString().replace(/\s+/g,"");var C=0;l[0]==="-"&&(C++,this.negative=1),C<l.length&&(m===16?this._parseHex(l,C,p):(this._parseBase(l,m,C),p==="le"&&this._initArray(this.toArray(),m,p)))},i.prototype._initNumber=function(l,m,p){l<0&&(this.negative=1,l=-l),l<67108864?(this.words=[l&67108863],this.length=1):l<4503599627370496?(this.words=[l&67108863,l/67108864&67108863],this.length=2):(r(l<9007199254740992),this.words=[l&67108863,l/67108864&67108863,1],this.length=3),p==="le"&&this._initArray(this.toArray(),m,p)},i.prototype._initArray=function(l,m,p){if(r(typeof l.length=="number"),l.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(l.length/3),this.words=new Array(this.length);for(var C=0;C<this.length;C++)this.words[C]=0;var B,x,I=0;if(p==="be")for(C=l.length-1,B=0;C>=0;C-=3)x=l[C]|l[C-1]<<8|l[C-2]<<16,this.words[B]|=x<<I&67108863,this.words[B+1]=x>>>26-I&67108863,I+=24,I>=26&&(I-=26,B++);else if(p==="le")for(C=0,B=0;C<l.length;C+=3)x=l[C]|l[C+1]<<8|l[C+2]<<16,this.words[B]|=x<<I&67108863,this.words[B+1]=x>>>26-I&67108863,I+=24,I>=26&&(I-=26,B++);return this._strip()};function a(F,l){var m=F.charCodeAt(l);if(m>=48&&m<=57)return m-48;if(m>=65&&m<=70)return m-55;if(m>=97&&m<=102)return m-87;r(!1,"Invalid character in "+F)}function c(F,l,m){var p=a(F,m);return m-1>=l&&(p|=a(F,m-1)<<4),p}i.prototype._parseHex=function(l,m,p){this.length=Math.ceil((l.length-m)/6),this.words=new Array(this.length);for(var C=0;C<this.length;C++)this.words[C]=0;var B=0,x=0,I;if(p==="be")for(C=l.length-1;C>=m;C-=2)I=c(l,m,C)<<B,this.words[x]|=I&67108863,B>=18?(B-=18,x+=1,this.words[x]|=I>>>26):B+=8;else{var y=l.length-m;for(C=y%2===0?m+1:m;C<l.length;C+=2)I=c(l,m,C)<<B,this.words[x]|=I&67108863,B>=18?(B-=18,x+=1,this.words[x]|=I>>>26):B+=8}this._strip()};function h(F,l,m,p){for(var C=0,B=0,x=Math.min(F.length,m),I=l;I<x;I++){var y=F.charCodeAt(I)-48;C*=p,y>=49?B=y-49+10:y>=17?B=y-17+10:B=y,r(y>=0&&B<p,"Invalid character"),C+=B}return C}i.prototype._parseBase=function(l,m,p){this.words=[0],this.length=1;for(var C=0,B=1;B<=67108863;B*=m)C++;C--,B=B/m|0;for(var x=l.length-p,I=x%C,y=Math.min(x,x-I)+p,u=0,k=p;k<y;k+=C)u=h(l,k,k+C,m),this.imuln(B),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(I!==0){var G=1;for(u=h(l,k,l.length,m),k=0;k<I;k++)G*=m;this.imuln(G),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},i.prototype.copy=function(l){l.words=new Array(this.length);for(var m=0;m<this.length;m++)l.words[m]=this.words[m];l.length=this.length,l.negative=this.negative,l.red=this.red};function b(F,l){F.words=l.words,F.length=l.length,F.negative=l.negative,F.red=l.red}if(i.prototype._move=function(l){b(l,this)},i.prototype.clone=function(){var l=new i(null);return this.copy(l),l},i.prototype._expand=function(l){for(;this.length<l;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=w}catch{i.prototype.inspect=w}else i.prototype.inspect=w;function w(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var D=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],E=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],g=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(l,m){l=l||10,m=m|0||1;var p;if(l===16||l==="hex"){p="";for(var C=0,B=0,x=0;x<this.length;x++){var I=this.words[x],y=((I<<C|B)&16777215).toString(16);B=I>>>24-C&16777215,C+=2,C>=26&&(C-=26,x--),B!==0||x!==this.length-1?p=D[6-y.length]+y+p:p=y+p}for(B!==0&&(p=B.toString(16)+p);p.length%m!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}if(l===(l|0)&&l>=2&&l<=36){var u=E[l],k=g[l];p="";var G=this.clone();for(G.negative=0;!G.isZero();){var Y=G.modrn(k).toString(l);G=G.idivn(k),G.isZero()?p=Y+p:p=D[u-Y.length]+Y+p}for(this.isZero()&&(p="0"+p);p.length%m!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var l=this.words[0];return this.length===2?l+=this.words[1]*67108864:this.length===3&&this.words[2]===1?l+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-l:l},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(l,m){return this.toArrayLike(o,l,m)}),i.prototype.toArray=function(l,m){return this.toArrayLike(Array,l,m)};var S=function(l,m){return l.allocUnsafe?l.allocUnsafe(m):new l(m)};i.prototype.toArrayLike=function(l,m,p){this._strip();var C=this.byteLength(),B=p||Math.max(1,C);r(C<=B,"byte array longer than desired length"),r(B>0,"Requested array length <= 0");var x=S(l,B),I=m==="le"?"LE":"BE";return this["_toArrayLike"+I](x,C),x},i.prototype._toArrayLikeLE=function(l,m){for(var p=0,C=0,B=0,x=0;B<this.length;B++){var I=this.words[B]<<x|C;l[p++]=I&255,p<l.length&&(l[p++]=I>>8&255),p<l.length&&(l[p++]=I>>16&255),x===6?(p<l.length&&(l[p++]=I>>24&255),C=0,x=0):(C=I>>>24,x+=2)}if(p<l.length)for(l[p++]=C;p<l.length;)l[p++]=0},i.prototype._toArrayLikeBE=function(l,m){for(var p=l.length-1,C=0,B=0,x=0;B<this.length;B++){var I=this.words[B]<<x|C;l[p--]=I&255,p>=0&&(l[p--]=I>>8&255),p>=0&&(l[p--]=I>>16&255),x===6?(p>=0&&(l[p--]=I>>24&255),C=0,x=0):(C=I>>>24,x+=2)}if(p>=0)for(l[p--]=C;p>=0;)l[p--]=0},Math.clz32?i.prototype._countBits=function(l){return 32-Math.clz32(l)}:i.prototype._countBits=function(l){var m=l,p=0;return m>=4096&&(p+=13,m>>>=13),m>=64&&(p+=7,m>>>=7),m>=8&&(p+=4,m>>>=4),m>=2&&(p+=2,m>>>=2),p+m},i.prototype._zeroBits=function(l){if(l===0)return 26;var m=l,p=0;return m&8191||(p+=13,m>>>=13),m&127||(p+=7,m>>>=7),m&15||(p+=4,m>>>=4),m&3||(p+=2,m>>>=2),m&1||p++,p},i.prototype.bitLength=function(){var l=this.words[this.length-1],m=this._countBits(l);return(this.length-1)*26+m};function T(F){for(var l=new Array(F.bitLength()),m=0;m<l.length;m++){var p=m/26|0,C=m%26;l[m]=F.words[p]>>>C&1}return l}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var l=0,m=0;m<this.length;m++){var p=this._zeroBits(this.words[m]);if(l+=p,p!==26)break}return l},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(l){return this.negative!==0?this.abs().inotn(l).iaddn(1):this.clone()},i.prototype.fromTwos=function(l){return this.testn(l-1)?this.notn(l).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(l){for(;this.length<l.length;)this.words[this.length++]=0;for(var m=0;m<l.length;m++)this.words[m]=this.words[m]|l.words[m];return this._strip()},i.prototype.ior=function(l){return r((this.negative|l.negative)===0),this.iuor(l)},i.prototype.or=function(l){return this.length>l.length?this.clone().ior(l):l.clone().ior(this)},i.prototype.uor=function(l){return this.length>l.length?this.clone().iuor(l):l.clone().iuor(this)},i.prototype.iuand=function(l){var m;this.length>l.length?m=l:m=this;for(var p=0;p<m.length;p++)this.words[p]=this.words[p]&l.words[p];return this.length=m.length,this._strip()},i.prototype.iand=function(l){return r((this.negative|l.negative)===0),this.iuand(l)},i.prototype.and=function(l){return this.length>l.length?this.clone().iand(l):l.clone().iand(this)},i.prototype.uand=function(l){return this.length>l.length?this.clone().iuand(l):l.clone().iuand(this)},i.prototype.iuxor=function(l){var m,p;this.length>l.length?(m=this,p=l):(m=l,p=this);for(var C=0;C<p.length;C++)this.words[C]=m.words[C]^p.words[C];if(this!==m)for(;C<m.length;C++)this.words[C]=m.words[C];return this.length=m.length,this._strip()},i.prototype.ixor=function(l){return r((this.negative|l.negative)===0),this.iuxor(l)},i.prototype.xor=function(l){return this.length>l.length?this.clone().ixor(l):l.clone().ixor(this)},i.prototype.uxor=function(l){return this.length>l.length?this.clone().iuxor(l):l.clone().iuxor(this)},i.prototype.inotn=function(l){r(typeof l=="number"&&l>=0);var m=Math.ceil(l/26)|0,p=l%26;this._expand(m),p>0&&m--;for(var C=0;C<m;C++)this.words[C]=~this.words[C]&67108863;return p>0&&(this.words[C]=~this.words[C]&67108863>>26-p),this._strip()},i.prototype.notn=function(l){return this.clone().inotn(l)},i.prototype.setn=function(l,m){r(typeof l=="number"&&l>=0);var p=l/26|0,C=l%26;return this._expand(p+1),m?this.words[p]=this.words[p]|1<<C:this.words[p]=this.words[p]&~(1<<C),this._strip()},i.prototype.iadd=function(l){var m;if(this.negative!==0&&l.negative===0)return this.negative=0,m=this.isub(l),this.negative^=1,this._normSign();if(this.negative===0&&l.negative!==0)return l.negative=0,m=this.isub(l),l.negative=1,m._normSign();var p,C;this.length>l.length?(p=this,C=l):(p=l,C=this);for(var B=0,x=0;x<C.length;x++)m=(p.words[x]|0)+(C.words[x]|0)+B,this.words[x]=m&67108863,B=m>>>26;for(;B!==0&&x<p.length;x++)m=(p.words[x]|0)+B,this.words[x]=m&67108863,B=m>>>26;if(this.length=p.length,B!==0)this.words[this.length]=B,this.length++;else if(p!==this)for(;x<p.length;x++)this.words[x]=p.words[x];return this},i.prototype.add=function(l){var m;return l.negative!==0&&this.negative===0?(l.negative=0,m=this.sub(l),l.negative^=1,m):l.negative===0&&this.negative!==0?(this.negative=0,m=l.sub(this),this.negative=1,m):this.length>l.length?this.clone().iadd(l):l.clone().iadd(this)},i.prototype.isub=function(l){if(l.negative!==0){l.negative=0;var m=this.iadd(l);return l.negative=1,m._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(l),this.negative=1,this._normSign();var p=this.cmp(l);if(p===0)return this.negative=0,this.length=1,this.words[0]=0,this;var C,B;p>0?(C=this,B=l):(C=l,B=this);for(var x=0,I=0;I<B.length;I++)m=(C.words[I]|0)-(B.words[I]|0)+x,x=m>>26,this.words[I]=m&67108863;for(;x!==0&&I<C.length;I++)m=(C.words[I]|0)+x,x=m>>26,this.words[I]=m&67108863;if(x===0&&I<C.length&&C!==this)for(;I<C.length;I++)this.words[I]=C.words[I];return this.length=Math.max(this.length,I),C!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(l){return this.clone().isub(l)};function M(F,l,m){m.negative=l.negative^F.negative;var p=F.length+l.length|0;m.length=p,p=p-1|0;var C=F.words[0]|0,B=l.words[0]|0,x=C*B,I=x&67108863,y=x/67108864|0;m.words[0]=I;for(var u=1;u<p;u++){for(var k=y>>>26,G=y&67108863,Y=Math.min(u,l.length-1),J=Math.max(0,u-F.length+1);J<=Y;J++){var de=u-J|0;C=F.words[de]|0,B=l.words[J]|0,x=C*B+G,k+=x/67108864|0,G=x&67108863}m.words[u]=G|0,y=k|0}return y!==0?m.words[u]=y|0:m.length--,m._strip()}var N=function(l,m,p){var C=l.words,B=m.words,x=p.words,I=0,y,u,k,G=C[0]|0,Y=G&8191,J=G>>>13,de=C[1]|0,ce=de&8191,ue=de>>>13,$e=C[2]|0,Ee=$e&8191,be=$e>>>13,Pe=C[3]|0,pe=Pe&8191,Se=Pe>>>13,jt=C[4]|0,Re=jt&8191,qe=jt>>>13,Or=C[5]|0,Ne=Or&8191,We=Or>>>13,Xt=C[6]|0,Ke=Xt&8191,Ye=Xt>>>13,ln=C[7]|0,Xe=ln&8191,A=ln>>>13,d=C[8]|0,f=d&8191,v=d>>>13,R=C[9]|0,W=R&8191,z=R>>>13,ge=B[0]|0,me=ge&8191,he=ge>>>13,ze=B[1]|0,fe=ze&8191,tt=ze>>>13,ql=B[2]|0,nt=ql&8191,rt=ql>>>13,Kl=B[3]|0,st=Kl&8191,it=Kl>>>13,jl=B[4]|0,ot=jl&8191,at=jl>>>13,$l=B[5]|0,ct=$l&8191,lt=$l>>>13,Vl=B[6]|0,dt=Vl&8191,ut=Vl>>>13,Gl=B[7]|0,ft=Gl&8191,ht=Gl>>>13,Yl=B[8]|0,mt=Yl&8191,bt=Yl>>>13,Xl=B[9]|0,pt=Xl&8191,gt=Xl>>>13;p.negative=l.negative^m.negative,p.length=19,y=Math.imul(Y,me),u=Math.imul(Y,he),u=u+Math.imul(J,me)|0,k=Math.imul(J,he);var zo=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(zo>>>26)|0,zo&=67108863,y=Math.imul(ce,me),u=Math.imul(ce,he),u=u+Math.imul(ue,me)|0,k=Math.imul(ue,he),y=y+Math.imul(Y,fe)|0,u=u+Math.imul(Y,tt)|0,u=u+Math.imul(J,fe)|0,k=k+Math.imul(J,tt)|0;var Ho=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(Ho>>>26)|0,Ho&=67108863,y=Math.imul(Ee,me),u=Math.imul(Ee,he),u=u+Math.imul(be,me)|0,k=Math.imul(be,he),y=y+Math.imul(ce,fe)|0,u=u+Math.imul(ce,tt)|0,u=u+Math.imul(ue,fe)|0,k=k+Math.imul(ue,tt)|0,y=y+Math.imul(Y,nt)|0,u=u+Math.imul(Y,rt)|0,u=u+Math.imul(J,nt)|0,k=k+Math.imul(J,rt)|0;var qo=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(qo>>>26)|0,qo&=67108863,y=Math.imul(pe,me),u=Math.imul(pe,he),u=u+Math.imul(Se,me)|0,k=Math.imul(Se,he),y=y+Math.imul(Ee,fe)|0,u=u+Math.imul(Ee,tt)|0,u=u+Math.imul(be,fe)|0,k=k+Math.imul(be,tt)|0,y=y+Math.imul(ce,nt)|0,u=u+Math.imul(ce,rt)|0,u=u+Math.imul(ue,nt)|0,k=k+Math.imul(ue,rt)|0,y=y+Math.imul(Y,st)|0,u=u+Math.imul(Y,it)|0,u=u+Math.imul(J,st)|0,k=k+Math.imul(J,it)|0;var Ko=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(Ko>>>26)|0,Ko&=67108863,y=Math.imul(Re,me),u=Math.imul(Re,he),u=u+Math.imul(qe,me)|0,k=Math.imul(qe,he),y=y+Math.imul(pe,fe)|0,u=u+Math.imul(pe,tt)|0,u=u+Math.imul(Se,fe)|0,k=k+Math.imul(Se,tt)|0,y=y+Math.imul(Ee,nt)|0,u=u+Math.imul(Ee,rt)|0,u=u+Math.imul(be,nt)|0,k=k+Math.imul(be,rt)|0,y=y+Math.imul(ce,st)|0,u=u+Math.imul(ce,it)|0,u=u+Math.imul(ue,st)|0,k=k+Math.imul(ue,it)|0,y=y+Math.imul(Y,ot)|0,u=u+Math.imul(Y,at)|0,u=u+Math.imul(J,ot)|0,k=k+Math.imul(J,at)|0;var jo=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(jo>>>26)|0,jo&=67108863,y=Math.imul(Ne,me),u=Math.imul(Ne,he),u=u+Math.imul(We,me)|0,k=Math.imul(We,he),y=y+Math.imul(Re,fe)|0,u=u+Math.imul(Re,tt)|0,u=u+Math.imul(qe,fe)|0,k=k+Math.imul(qe,tt)|0,y=y+Math.imul(pe,nt)|0,u=u+Math.imul(pe,rt)|0,u=u+Math.imul(Se,nt)|0,k=k+Math.imul(Se,rt)|0,y=y+Math.imul(Ee,st)|0,u=u+Math.imul(Ee,it)|0,u=u+Math.imul(be,st)|0,k=k+Math.imul(be,it)|0,y=y+Math.imul(ce,ot)|0,u=u+Math.imul(ce,at)|0,u=u+Math.imul(ue,ot)|0,k=k+Math.imul(ue,at)|0,y=y+Math.imul(Y,ct)|0,u=u+Math.imul(Y,lt)|0,u=u+Math.imul(J,ct)|0,k=k+Math.imul(J,lt)|0;var $o=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+($o>>>26)|0,$o&=67108863,y=Math.imul(Ke,me),u=Math.imul(Ke,he),u=u+Math.imul(Ye,me)|0,k=Math.imul(Ye,he),y=y+Math.imul(Ne,fe)|0,u=u+Math.imul(Ne,tt)|0,u=u+Math.imul(We,fe)|0,k=k+Math.imul(We,tt)|0,y=y+Math.imul(Re,nt)|0,u=u+Math.imul(Re,rt)|0,u=u+Math.imul(qe,nt)|0,k=k+Math.imul(qe,rt)|0,y=y+Math.imul(pe,st)|0,u=u+Math.imul(pe,it)|0,u=u+Math.imul(Se,st)|0,k=k+Math.imul(Se,it)|0,y=y+Math.imul(Ee,ot)|0,u=u+Math.imul(Ee,at)|0,u=u+Math.imul(be,ot)|0,k=k+Math.imul(be,at)|0,y=y+Math.imul(ce,ct)|0,u=u+Math.imul(ce,lt)|0,u=u+Math.imul(ue,ct)|0,k=k+Math.imul(ue,lt)|0,y=y+Math.imul(Y,dt)|0,u=u+Math.imul(Y,ut)|0,u=u+Math.imul(J,dt)|0,k=k+Math.imul(J,ut)|0;var Vo=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(Vo>>>26)|0,Vo&=67108863,y=Math.imul(Xe,me),u=Math.imul(Xe,he),u=u+Math.imul(A,me)|0,k=Math.imul(A,he),y=y+Math.imul(Ke,fe)|0,u=u+Math.imul(Ke,tt)|0,u=u+Math.imul(Ye,fe)|0,k=k+Math.imul(Ye,tt)|0,y=y+Math.imul(Ne,nt)|0,u=u+Math.imul(Ne,rt)|0,u=u+Math.imul(We,nt)|0,k=k+Math.imul(We,rt)|0,y=y+Math.imul(Re,st)|0,u=u+Math.imul(Re,it)|0,u=u+Math.imul(qe,st)|0,k=k+Math.imul(qe,it)|0,y=y+Math.imul(pe,ot)|0,u=u+Math.imul(pe,at)|0,u=u+Math.imul(Se,ot)|0,k=k+Math.imul(Se,at)|0,y=y+Math.imul(Ee,ct)|0,u=u+Math.imul(Ee,lt)|0,u=u+Math.imul(be,ct)|0,k=k+Math.imul(be,lt)|0,y=y+Math.imul(ce,dt)|0,u=u+Math.imul(ce,ut)|0,u=u+Math.imul(ue,dt)|0,k=k+Math.imul(ue,ut)|0,y=y+Math.imul(Y,ft)|0,u=u+Math.imul(Y,ht)|0,u=u+Math.imul(J,ft)|0,k=k+Math.imul(J,ht)|0;var Go=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(Go>>>26)|0,Go&=67108863,y=Math.imul(f,me),u=Math.imul(f,he),u=u+Math.imul(v,me)|0,k=Math.imul(v,he),y=y+Math.imul(Xe,fe)|0,u=u+Math.imul(Xe,tt)|0,u=u+Math.imul(A,fe)|0,k=k+Math.imul(A,tt)|0,y=y+Math.imul(Ke,nt)|0,u=u+Math.imul(Ke,rt)|0,u=u+Math.imul(Ye,nt)|0,k=k+Math.imul(Ye,rt)|0,y=y+Math.imul(Ne,st)|0,u=u+Math.imul(Ne,it)|0,u=u+Math.imul(We,st)|0,k=k+Math.imul(We,it)|0,y=y+Math.imul(Re,ot)|0,u=u+Math.imul(Re,at)|0,u=u+Math.imul(qe,ot)|0,k=k+Math.imul(qe,at)|0,y=y+Math.imul(pe,ct)|0,u=u+Math.imul(pe,lt)|0,u=u+Math.imul(Se,ct)|0,k=k+Math.imul(Se,lt)|0,y=y+Math.imul(Ee,dt)|0,u=u+Math.imul(Ee,ut)|0,u=u+Math.imul(be,dt)|0,k=k+Math.imul(be,ut)|0,y=y+Math.imul(ce,ft)|0,u=u+Math.imul(ce,ht)|0,u=u+Math.imul(ue,ft)|0,k=k+Math.imul(ue,ht)|0,y=y+Math.imul(Y,mt)|0,u=u+Math.imul(Y,bt)|0,u=u+Math.imul(J,mt)|0,k=k+Math.imul(J,bt)|0;var Yo=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(Yo>>>26)|0,Yo&=67108863,y=Math.imul(W,me),u=Math.imul(W,he),u=u+Math.imul(z,me)|0,k=Math.imul(z,he),y=y+Math.imul(f,fe)|0,u=u+Math.imul(f,tt)|0,u=u+Math.imul(v,fe)|0,k=k+Math.imul(v,tt)|0,y=y+Math.imul(Xe,nt)|0,u=u+Math.imul(Xe,rt)|0,u=u+Math.imul(A,nt)|0,k=k+Math.imul(A,rt)|0,y=y+Math.imul(Ke,st)|0,u=u+Math.imul(Ke,it)|0,u=u+Math.imul(Ye,st)|0,k=k+Math.imul(Ye,it)|0,y=y+Math.imul(Ne,ot)|0,u=u+Math.imul(Ne,at)|0,u=u+Math.imul(We,ot)|0,k=k+Math.imul(We,at)|0,y=y+Math.imul(Re,ct)|0,u=u+Math.imul(Re,lt)|0,u=u+Math.imul(qe,ct)|0,k=k+Math.imul(qe,lt)|0,y=y+Math.imul(pe,dt)|0,u=u+Math.imul(pe,ut)|0,u=u+Math.imul(Se,dt)|0,k=k+Math.imul(Se,ut)|0,y=y+Math.imul(Ee,ft)|0,u=u+Math.imul(Ee,ht)|0,u=u+Math.imul(be,ft)|0,k=k+Math.imul(be,ht)|0,y=y+Math.imul(ce,mt)|0,u=u+Math.imul(ce,bt)|0,u=u+Math.imul(ue,mt)|0,k=k+Math.imul(ue,bt)|0,y=y+Math.imul(Y,pt)|0,u=u+Math.imul(Y,gt)|0,u=u+Math.imul(J,pt)|0,k=k+Math.imul(J,gt)|0;var Xo=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(Xo>>>26)|0,Xo&=67108863,y=Math.imul(W,fe),u=Math.imul(W,tt),u=u+Math.imul(z,fe)|0,k=Math.imul(z,tt),y=y+Math.imul(f,nt)|0,u=u+Math.imul(f,rt)|0,u=u+Math.imul(v,nt)|0,k=k+Math.imul(v,rt)|0,y=y+Math.imul(Xe,st)|0,u=u+Math.imul(Xe,it)|0,u=u+Math.imul(A,st)|0,k=k+Math.imul(A,it)|0,y=y+Math.imul(Ke,ot)|0,u=u+Math.imul(Ke,at)|0,u=u+Math.imul(Ye,ot)|0,k=k+Math.imul(Ye,at)|0,y=y+Math.imul(Ne,ct)|0,u=u+Math.imul(Ne,lt)|0,u=u+Math.imul(We,ct)|0,k=k+Math.imul(We,lt)|0,y=y+Math.imul(Re,dt)|0,u=u+Math.imul(Re,ut)|0,u=u+Math.imul(qe,dt)|0,k=k+Math.imul(qe,ut)|0,y=y+Math.imul(pe,ft)|0,u=u+Math.imul(pe,ht)|0,u=u+Math.imul(Se,ft)|0,k=k+Math.imul(Se,ht)|0,y=y+Math.imul(Ee,mt)|0,u=u+Math.imul(Ee,bt)|0,u=u+Math.imul(be,mt)|0,k=k+Math.imul(be,bt)|0,y=y+Math.imul(ce,pt)|0,u=u+Math.imul(ce,gt)|0,u=u+Math.imul(ue,pt)|0,k=k+Math.imul(ue,gt)|0;var Zo=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(Zo>>>26)|0,Zo&=67108863,y=Math.imul(W,nt),u=Math.imul(W,rt),u=u+Math.imul(z,nt)|0,k=Math.imul(z,rt),y=y+Math.imul(f,st)|0,u=u+Math.imul(f,it)|0,u=u+Math.imul(v,st)|0,k=k+Math.imul(v,it)|0,y=y+Math.imul(Xe,ot)|0,u=u+Math.imul(Xe,at)|0,u=u+Math.imul(A,ot)|0,k=k+Math.imul(A,at)|0,y=y+Math.imul(Ke,ct)|0,u=u+Math.imul(Ke,lt)|0,u=u+Math.imul(Ye,ct)|0,k=k+Math.imul(Ye,lt)|0,y=y+Math.imul(Ne,dt)|0,u=u+Math.imul(Ne,ut)|0,u=u+Math.imul(We,dt)|0,k=k+Math.imul(We,ut)|0,y=y+Math.imul(Re,ft)|0,u=u+Math.imul(Re,ht)|0,u=u+Math.imul(qe,ft)|0,k=k+Math.imul(qe,ht)|0,y=y+Math.imul(pe,mt)|0,u=u+Math.imul(pe,bt)|0,u=u+Math.imul(Se,mt)|0,k=k+Math.imul(Se,bt)|0,y=y+Math.imul(Ee,pt)|0,u=u+Math.imul(Ee,gt)|0,u=u+Math.imul(be,pt)|0,k=k+Math.imul(be,gt)|0;var Jo=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(Jo>>>26)|0,Jo&=67108863,y=Math.imul(W,st),u=Math.imul(W,it),u=u+Math.imul(z,st)|0,k=Math.imul(z,it),y=y+Math.imul(f,ot)|0,u=u+Math.imul(f,at)|0,u=u+Math.imul(v,ot)|0,k=k+Math.imul(v,at)|0,y=y+Math.imul(Xe,ct)|0,u=u+Math.imul(Xe,lt)|0,u=u+Math.imul(A,ct)|0,k=k+Math.imul(A,lt)|0,y=y+Math.imul(Ke,dt)|0,u=u+Math.imul(Ke,ut)|0,u=u+Math.imul(Ye,dt)|0,k=k+Math.imul(Ye,ut)|0,y=y+Math.imul(Ne,ft)|0,u=u+Math.imul(Ne,ht)|0,u=u+Math.imul(We,ft)|0,k=k+Math.imul(We,ht)|0,y=y+Math.imul(Re,mt)|0,u=u+Math.imul(Re,bt)|0,u=u+Math.imul(qe,mt)|0,k=k+Math.imul(qe,bt)|0,y=y+Math.imul(pe,pt)|0,u=u+Math.imul(pe,gt)|0,u=u+Math.imul(Se,pt)|0,k=k+Math.imul(Se,gt)|0;var Qo=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(Qo>>>26)|0,Qo&=67108863,y=Math.imul(W,ot),u=Math.imul(W,at),u=u+Math.imul(z,ot)|0,k=Math.imul(z,at),y=y+Math.imul(f,ct)|0,u=u+Math.imul(f,lt)|0,u=u+Math.imul(v,ct)|0,k=k+Math.imul(v,lt)|0,y=y+Math.imul(Xe,dt)|0,u=u+Math.imul(Xe,ut)|0,u=u+Math.imul(A,dt)|0,k=k+Math.imul(A,ut)|0,y=y+Math.imul(Ke,ft)|0,u=u+Math.imul(Ke,ht)|0,u=u+Math.imul(Ye,ft)|0,k=k+Math.imul(Ye,ht)|0,y=y+Math.imul(Ne,mt)|0,u=u+Math.imul(Ne,bt)|0,u=u+Math.imul(We,mt)|0,k=k+Math.imul(We,bt)|0,y=y+Math.imul(Re,pt)|0,u=u+Math.imul(Re,gt)|0,u=u+Math.imul(qe,pt)|0,k=k+Math.imul(qe,gt)|0;var ea=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(ea>>>26)|0,ea&=67108863,y=Math.imul(W,ct),u=Math.imul(W,lt),u=u+Math.imul(z,ct)|0,k=Math.imul(z,lt),y=y+Math.imul(f,dt)|0,u=u+Math.imul(f,ut)|0,u=u+Math.imul(v,dt)|0,k=k+Math.imul(v,ut)|0,y=y+Math.imul(Xe,ft)|0,u=u+Math.imul(Xe,ht)|0,u=u+Math.imul(A,ft)|0,k=k+Math.imul(A,ht)|0,y=y+Math.imul(Ke,mt)|0,u=u+Math.imul(Ke,bt)|0,u=u+Math.imul(Ye,mt)|0,k=k+Math.imul(Ye,bt)|0,y=y+Math.imul(Ne,pt)|0,u=u+Math.imul(Ne,gt)|0,u=u+Math.imul(We,pt)|0,k=k+Math.imul(We,gt)|0;var ta=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(ta>>>26)|0,ta&=67108863,y=Math.imul(W,dt),u=Math.imul(W,ut),u=u+Math.imul(z,dt)|0,k=Math.imul(z,ut),y=y+Math.imul(f,ft)|0,u=u+Math.imul(f,ht)|0,u=u+Math.imul(v,ft)|0,k=k+Math.imul(v,ht)|0,y=y+Math.imul(Xe,mt)|0,u=u+Math.imul(Xe,bt)|0,u=u+Math.imul(A,mt)|0,k=k+Math.imul(A,bt)|0,y=y+Math.imul(Ke,pt)|0,u=u+Math.imul(Ke,gt)|0,u=u+Math.imul(Ye,pt)|0,k=k+Math.imul(Ye,gt)|0;var na=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(na>>>26)|0,na&=67108863,y=Math.imul(W,ft),u=Math.imul(W,ht),u=u+Math.imul(z,ft)|0,k=Math.imul(z,ht),y=y+Math.imul(f,mt)|0,u=u+Math.imul(f,bt)|0,u=u+Math.imul(v,mt)|0,k=k+Math.imul(v,bt)|0,y=y+Math.imul(Xe,pt)|0,u=u+Math.imul(Xe,gt)|0,u=u+Math.imul(A,pt)|0,k=k+Math.imul(A,gt)|0;var ra=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(ra>>>26)|0,ra&=67108863,y=Math.imul(W,mt),u=Math.imul(W,bt),u=u+Math.imul(z,mt)|0,k=Math.imul(z,bt),y=y+Math.imul(f,pt)|0,u=u+Math.imul(f,gt)|0,u=u+Math.imul(v,pt)|0,k=k+Math.imul(v,gt)|0;var sa=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(sa>>>26)|0,sa&=67108863,y=Math.imul(W,pt),u=Math.imul(W,gt),u=u+Math.imul(z,pt)|0,k=Math.imul(z,gt);var ia=(I+y|0)+((u&8191)<<13)|0;return I=(k+(u>>>13)|0)+(ia>>>26)|0,ia&=67108863,x[0]=zo,x[1]=Ho,x[2]=qo,x[3]=Ko,x[4]=jo,x[5]=$o,x[6]=Vo,x[7]=Go,x[8]=Yo,x[9]=Xo,x[10]=Zo,x[11]=Jo,x[12]=Qo,x[13]=ea,x[14]=ta,x[15]=na,x[16]=ra,x[17]=sa,x[18]=ia,I!==0&&(x[19]=I,p.length++),p};Math.imul||(N=M);function _(F,l,m){m.negative=l.negative^F.negative,m.length=F.length+l.length;for(var p=0,C=0,B=0;B<m.length-1;B++){var x=C;C=0;for(var I=p&67108863,y=Math.min(B,l.length-1),u=Math.max(0,B-F.length+1);u<=y;u++){var k=B-u,G=F.words[k]|0,Y=l.words[u]|0,J=G*Y,de=J&67108863;x=x+(J/67108864|0)|0,de=de+I|0,I=de&67108863,x=x+(de>>>26)|0,C+=x>>>26,x&=67108863}m.words[B]=I,p=x,x=C}return p!==0?m.words[B]=p:m.length--,m._strip()}function U(F,l,m){return _(F,l,m)}i.prototype.mulTo=function(l,m){var p,C=this.length+l.length;return this.length===10&&l.length===10?p=N(this,l,m):C<63?p=M(this,l,m):C<1024?p=_(this,l,m):p=U(this,l,m),p},i.prototype.mul=function(l){var m=new i(null);return m.words=new Array(this.length+l.length),this.mulTo(l,m)},i.prototype.mulf=function(l){var m=new i(null);return m.words=new Array(this.length+l.length),U(this,l,m)},i.prototype.imul=function(l){return this.clone().mulTo(l,this)},i.prototype.imuln=function(l){var m=l<0;m&&(l=-l),r(typeof l=="number"),r(l<67108864);for(var p=0,C=0;C<this.length;C++){var B=(this.words[C]|0)*l,x=(B&67108863)+(p&67108863);p>>=26,p+=B/67108864|0,p+=x>>>26,this.words[C]=x&67108863}return p!==0&&(this.words[C]=p,this.length++),this.length=l===0?1:this.length,m?this.ineg():this},i.prototype.muln=function(l){return this.clone().imuln(l)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(l){var m=T(l);if(m.length===0)return new i(1);for(var p=this,C=0;C<m.length&&m[C]===0;C++,p=p.sqr());if(++C<m.length)for(var B=p.sqr();C<m.length;C++,B=B.sqr())m[C]!==0&&(p=p.mul(B));return p},i.prototype.iushln=function(l){r(typeof l=="number"&&l>=0);var m=l%26,p=(l-m)/26,C=67108863>>>26-m<<26-m,B;if(m!==0){var x=0;for(B=0;B<this.length;B++){var I=this.words[B]&C,y=(this.words[B]|0)-I<<m;this.words[B]=y|x,x=I>>>26-m}x&&(this.words[B]=x,this.length++)}if(p!==0){for(B=this.length-1;B>=0;B--)this.words[B+p]=this.words[B];for(B=0;B<p;B++)this.words[B]=0;this.length+=p}return this._strip()},i.prototype.ishln=function(l){return r(this.negative===0),this.iushln(l)},i.prototype.iushrn=function(l,m,p){r(typeof l=="number"&&l>=0);var C;m?C=(m-m%26)/26:C=0;var B=l%26,x=Math.min((l-B)/26,this.length),I=67108863^67108863>>>B<<B,y=p;if(C-=x,C=Math.max(0,C),y){for(var u=0;u<x;u++)y.words[u]=this.words[u];y.length=x}if(x!==0)if(this.length>x)for(this.length-=x,u=0;u<this.length;u++)this.words[u]=this.words[u+x];else this.words[0]=0,this.length=1;var k=0;for(u=this.length-1;u>=0&&(k!==0||u>=C);u--){var G=this.words[u]|0;this.words[u]=k<<26-B|G>>>B,k=G&I}return y&&k!==0&&(y.words[y.length++]=k),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(l,m,p){return r(this.negative===0),this.iushrn(l,m,p)},i.prototype.shln=function(l){return this.clone().ishln(l)},i.prototype.ushln=function(l){return this.clone().iushln(l)},i.prototype.shrn=function(l){return this.clone().ishrn(l)},i.prototype.ushrn=function(l){return this.clone().iushrn(l)},i.prototype.testn=function(l){r(typeof l=="number"&&l>=0);var m=l%26,p=(l-m)/26,C=1<<m;if(this.length<=p)return!1;var B=this.words[p];return!!(B&C)},i.prototype.imaskn=function(l){r(typeof l=="number"&&l>=0);var m=l%26,p=(l-m)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=p)return this;if(m!==0&&p++,this.length=Math.min(p,this.length),m!==0){var C=67108863^67108863>>>m<<m;this.words[this.length-1]&=C}return this._strip()},i.prototype.maskn=function(l){return this.clone().imaskn(l)},i.prototype.iaddn=function(l){return r(typeof l=="number"),r(l<67108864),l<0?this.isubn(-l):this.negative!==0?this.length===1&&(this.words[0]|0)<=l?(this.words[0]=l-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(l),this.negative=1,this):this._iaddn(l)},i.prototype._iaddn=function(l){this.words[0]+=l;for(var m=0;m<this.length&&this.words[m]>=67108864;m++)this.words[m]-=67108864,m===this.length-1?this.words[m+1]=1:this.words[m+1]++;return this.length=Math.max(this.length,m+1),this},i.prototype.isubn=function(l){if(r(typeof l=="number"),r(l<67108864),l<0)return this.iaddn(-l);if(this.negative!==0)return this.negative=0,this.iaddn(l),this.negative=1,this;if(this.words[0]-=l,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var m=0;m<this.length&&this.words[m]<0;m++)this.words[m]+=67108864,this.words[m+1]-=1;return this._strip()},i.prototype.addn=function(l){return this.clone().iaddn(l)},i.prototype.subn=function(l){return this.clone().isubn(l)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(l,m,p){var C=l.length+p,B;this._expand(C);var x,I=0;for(B=0;B<l.length;B++){x=(this.words[B+p]|0)+I;var y=(l.words[B]|0)*m;x-=y&67108863,I=(x>>26)-(y/67108864|0),this.words[B+p]=x&67108863}for(;B<this.length-p;B++)x=(this.words[B+p]|0)+I,I=x>>26,this.words[B+p]=x&67108863;if(I===0)return this._strip();for(r(I===-1),I=0,B=0;B<this.length;B++)x=-(this.words[B]|0)+I,I=x>>26,this.words[B]=x&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(l,m){var p=this.length-l.length,C=this.clone(),B=l,x=B.words[B.length-1]|0,I=this._countBits(x);p=26-I,p!==0&&(B=B.ushln(p),C.iushln(p),x=B.words[B.length-1]|0);var y=C.length-B.length,u;if(m!=="mod"){u=new i(null),u.length=y+1,u.words=new Array(u.length);for(var k=0;k<u.length;k++)u.words[k]=0}var G=C.clone()._ishlnsubmul(B,1,y);G.negative===0&&(C=G,u&&(u.words[y]=1));for(var Y=y-1;Y>=0;Y--){var J=(C.words[B.length+Y]|0)*67108864+(C.words[B.length+Y-1]|0);for(J=Math.min(J/x|0,67108863),C._ishlnsubmul(B,J,Y);C.negative!==0;)J--,C.negative=0,C._ishlnsubmul(B,1,Y),C.isZero()||(C.negative^=1);u&&(u.words[Y]=J)}return u&&u._strip(),C._strip(),m!=="div"&&p!==0&&C.iushrn(p),{div:u||null,mod:C}},i.prototype.divmod=function(l,m,p){if(r(!l.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var C,B,x;return this.negative!==0&&l.negative===0?(x=this.neg().divmod(l,m),m!=="mod"&&(C=x.div.neg()),m!=="div"&&(B=x.mod.neg(),p&&B.negative!==0&&B.iadd(l)),{div:C,mod:B}):this.negative===0&&l.negative!==0?(x=this.divmod(l.neg(),m),m!=="mod"&&(C=x.div.neg()),{div:C,mod:x.mod}):this.negative&l.negative?(x=this.neg().divmod(l.neg(),m),m!=="div"&&(B=x.mod.neg(),p&&B.negative!==0&&B.isub(l)),{div:x.div,mod:B}):l.length>this.length||this.cmp(l)<0?{div:new i(0),mod:this}:l.length===1?m==="div"?{div:this.divn(l.words[0]),mod:null}:m==="mod"?{div:null,mod:new i(this.modrn(l.words[0]))}:{div:this.divn(l.words[0]),mod:new i(this.modrn(l.words[0]))}:this._wordDiv(l,m)},i.prototype.div=function(l){return this.divmod(l,"div",!1).div},i.prototype.mod=function(l){return this.divmod(l,"mod",!1).mod},i.prototype.umod=function(l){return this.divmod(l,"mod",!0).mod},i.prototype.divRound=function(l){var m=this.divmod(l);if(m.mod.isZero())return m.div;var p=m.div.negative!==0?m.mod.isub(l):m.mod,C=l.ushrn(1),B=l.andln(1),x=p.cmp(C);return x<0||B===1&&x===0?m.div:m.div.negative!==0?m.div.isubn(1):m.div.iaddn(1)},i.prototype.modrn=function(l){var m=l<0;m&&(l=-l),r(l<=67108863);for(var p=(1<<26)%l,C=0,B=this.length-1;B>=0;B--)C=(p*C+(this.words[B]|0))%l;return m?-C:C},i.prototype.modn=function(l){return this.modrn(l)},i.prototype.idivn=function(l){var m=l<0;m&&(l=-l),r(l<=67108863);for(var p=0,C=this.length-1;C>=0;C--){var B=(this.words[C]|0)+p*67108864;this.words[C]=B/l|0,p=B%l}return this._strip(),m?this.ineg():this},i.prototype.divn=function(l){return this.clone().idivn(l)},i.prototype.egcd=function(l){r(l.negative===0),r(!l.isZero());var m=this,p=l.clone();m.negative!==0?m=m.umod(l):m=m.clone();for(var C=new i(1),B=new i(0),x=new i(0),I=new i(1),y=0;m.isEven()&&p.isEven();)m.iushrn(1),p.iushrn(1),++y;for(var u=p.clone(),k=m.clone();!m.isZero();){for(var G=0,Y=1;!(m.words[0]&Y)&&G<26;++G,Y<<=1);if(G>0)for(m.iushrn(G);G-- >0;)(C.isOdd()||B.isOdd())&&(C.iadd(u),B.isub(k)),C.iushrn(1),B.iushrn(1);for(var J=0,de=1;!(p.words[0]&de)&&J<26;++J,de<<=1);if(J>0)for(p.iushrn(J);J-- >0;)(x.isOdd()||I.isOdd())&&(x.iadd(u),I.isub(k)),x.iushrn(1),I.iushrn(1);m.cmp(p)>=0?(m.isub(p),C.isub(x),B.isub(I)):(p.isub(m),x.isub(C),I.isub(B))}return{a:x,b:I,gcd:p.iushln(y)}},i.prototype._invmp=function(l){r(l.negative===0),r(!l.isZero());var m=this,p=l.clone();m.negative!==0?m=m.umod(l):m=m.clone();for(var C=new i(1),B=new i(0),x=p.clone();m.cmpn(1)>0&&p.cmpn(1)>0;){for(var I=0,y=1;!(m.words[0]&y)&&I<26;++I,y<<=1);if(I>0)for(m.iushrn(I);I-- >0;)C.isOdd()&&C.iadd(x),C.iushrn(1);for(var u=0,k=1;!(p.words[0]&k)&&u<26;++u,k<<=1);if(u>0)for(p.iushrn(u);u-- >0;)B.isOdd()&&B.iadd(x),B.iushrn(1);m.cmp(p)>=0?(m.isub(p),C.isub(B)):(p.isub(m),B.isub(C))}var G;return m.cmpn(1)===0?G=C:G=B,G.cmpn(0)<0&&G.iadd(l),G},i.prototype.gcd=function(l){if(this.isZero())return l.abs();if(l.isZero())return this.abs();var m=this.clone(),p=l.clone();m.negative=0,p.negative=0;for(var C=0;m.isEven()&&p.isEven();C++)m.iushrn(1),p.iushrn(1);do{for(;m.isEven();)m.iushrn(1);for(;p.isEven();)p.iushrn(1);var B=m.cmp(p);if(B<0){var x=m;m=p,p=x}else if(B===0||p.cmpn(1)===0)break;m.isub(p)}while(!0);return p.iushln(C)},i.prototype.invm=function(l){return this.egcd(l).a.umod(l)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(l){return this.words[0]&l},i.prototype.bincn=function(l){r(typeof l=="number");var m=l%26,p=(l-m)/26,C=1<<m;if(this.length<=p)return this._expand(p+1),this.words[p]|=C,this;for(var B=C,x=p;B!==0&&x<this.length;x++){var I=this.words[x]|0;I+=B,B=I>>>26,I&=67108863,this.words[x]=I}return B!==0&&(this.words[x]=B,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(l){var m=l<0;if(this.negative!==0&&!m)return-1;if(this.negative===0&&m)return 1;this._strip();var p;if(this.length>1)p=1;else{m&&(l=-l),r(l<=67108863,"Number is too big");var C=this.words[0]|0;p=C===l?0:C<l?-1:1}return this.negative!==0?-p|0:p},i.prototype.cmp=function(l){if(this.negative!==0&&l.negative===0)return-1;if(this.negative===0&&l.negative!==0)return 1;var m=this.ucmp(l);return this.negative!==0?-m|0:m},i.prototype.ucmp=function(l){if(this.length>l.length)return 1;if(this.length<l.length)return-1;for(var m=0,p=this.length-1;p>=0;p--){var C=this.words[p]|0,B=l.words[p]|0;if(C!==B){C<B?m=-1:C>B&&(m=1);break}}return m},i.prototype.gtn=function(l){return this.cmpn(l)===1},i.prototype.gt=function(l){return this.cmp(l)===1},i.prototype.gten=function(l){return this.cmpn(l)>=0},i.prototype.gte=function(l){return this.cmp(l)>=0},i.prototype.ltn=function(l){return this.cmpn(l)===-1},i.prototype.lt=function(l){return this.cmp(l)===-1},i.prototype.lten=function(l){return this.cmpn(l)<=0},i.prototype.lte=function(l){return this.cmp(l)<=0},i.prototype.eqn=function(l){return this.cmpn(l)===0},i.prototype.eq=function(l){return this.cmp(l)===0},i.red=function(l){return new $(l)},i.prototype.toRed=function(l){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),l.convertTo(this)._forceRed(l)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(l){return this.red=l,this},i.prototype.forceRed=function(l){return r(!this.red,"Already a number in reduction context"),this._forceRed(l)},i.prototype.redAdd=function(l){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,l)},i.prototype.redIAdd=function(l){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l)},i.prototype.redSub=function(l){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,l)},i.prototype.redISub=function(l){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,l)},i.prototype.redShl=function(l){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,l)},i.prototype.redMul=function(l){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.mul(this,l)},i.prototype.redIMul=function(l){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.imul(this,l)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(l){return r(this.red&&!l.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l)};var L={k256:null,p224:null,p192:null,p25519:null};function H(F,l){this.name=F,this.p=new i(l,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}H.prototype._tmp=function(){var l=new i(null);return l.words=new Array(Math.ceil(this.n/13)),l},H.prototype.ireduce=function(l){var m=l,p;do this.split(m,this.tmp),m=this.imulK(m),m=m.iadd(this.tmp),p=m.bitLength();while(p>this.n);var C=p<this.n?-1:m.ucmp(this.p);return C===0?(m.words[0]=0,m.length=1):C>0?m.isub(this.p):m.strip!==void 0?m.strip():m._strip(),m},H.prototype.split=function(l,m){l.iushrn(this.n,0,m)},H.prototype.imulK=function(l){return l.imul(this.k)};function K(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(K,H),K.prototype.split=function(l,m){for(var p=4194303,C=Math.min(l.length,9),B=0;B<C;B++)m.words[B]=l.words[B];if(m.length=C,l.length<=9){l.words[0]=0,l.length=1;return}var x=l.words[9];for(m.words[m.length++]=x&p,B=10;B<l.length;B++){var I=l.words[B]|0;l.words[B-10]=(I&p)<<4|x>>>22,x=I}x>>>=22,l.words[B-10]=x,x===0&&l.length>10?l.length-=10:l.length-=9},K.prototype.imulK=function(l){l.words[l.length]=0,l.words[l.length+1]=0,l.length+=2;for(var m=0,p=0;p<l.length;p++){var C=l.words[p]|0;m+=C*977,l.words[p]=m&67108863,m=C*64+(m/67108864|0)}return l.words[l.length-1]===0&&(l.length--,l.words[l.length-1]===0&&l.length--),l};function V(){H.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}s(V,H);function ee(){H.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}s(ee,H);function re(){H.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}s(re,H),re.prototype.imulK=function(l){for(var m=0,p=0;p<l.length;p++){var C=(l.words[p]|0)*19+m,B=C&67108863;C>>>=26,l.words[p]=B,m=C}return m!==0&&(l.words[l.length++]=m),l},i._prime=function(l){if(L[l])return L[l];var m;if(l==="k256")m=new K;else if(l==="p224")m=new V;else if(l==="p192")m=new ee;else if(l==="p25519")m=new re;else throw new Error("Unknown prime "+l);return L[l]=m,m};function $(F){if(typeof F=="string"){var l=i._prime(F);this.m=l.p,this.prime=l}else r(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}$.prototype._verify1=function(l){r(l.negative===0,"red works only with positives"),r(l.red,"red works only with red numbers")},$.prototype._verify2=function(l,m){r((l.negative|m.negative)===0,"red works only with positives"),r(l.red&&l.red===m.red,"red works only with red numbers")},$.prototype.imod=function(l){return this.prime?this.prime.ireduce(l)._forceRed(this):(b(l,l.umod(this.m)._forceRed(this)),l)},$.prototype.neg=function(l){return l.isZero()?l.clone():this.m.sub(l)._forceRed(this)},$.prototype.add=function(l,m){this._verify2(l,m);var p=l.add(m);return p.cmp(this.m)>=0&&p.isub(this.m),p._forceRed(this)},$.prototype.iadd=function(l,m){this._verify2(l,m);var p=l.iadd(m);return p.cmp(this.m)>=0&&p.isub(this.m),p},$.prototype.sub=function(l,m){this._verify2(l,m);var p=l.sub(m);return p.cmpn(0)<0&&p.iadd(this.m),p._forceRed(this)},$.prototype.isub=function(l,m){this._verify2(l,m);var p=l.isub(m);return p.cmpn(0)<0&&p.iadd(this.m),p},$.prototype.shl=function(l,m){return this._verify1(l),this.imod(l.ushln(m))},$.prototype.imul=function(l,m){return this._verify2(l,m),this.imod(l.imul(m))},$.prototype.mul=function(l,m){return this._verify2(l,m),this.imod(l.mul(m))},$.prototype.isqr=function(l){return this.imul(l,l.clone())},$.prototype.sqr=function(l){return this.mul(l,l)},$.prototype.sqrt=function(l){if(l.isZero())return l.clone();var m=this.m.andln(3);if(r(m%2===1),m===3){var p=this.m.add(new i(1)).iushrn(2);return this.pow(l,p)}for(var C=this.m.subn(1),B=0;!C.isZero()&&C.andln(1)===0;)B++,C.iushrn(1);r(!C.isZero());var x=new i(1).toRed(this),I=x.redNeg(),y=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);this.pow(u,y).cmp(I)!==0;)u.redIAdd(I);for(var k=this.pow(u,C),G=this.pow(l,C.addn(1).iushrn(1)),Y=this.pow(l,C),J=B;Y.cmp(x)!==0;){for(var de=Y,ce=0;de.cmp(x)!==0;ce++)de=de.redSqr();r(ce<J);var ue=this.pow(k,new i(1).iushln(J-ce-1));G=G.redMul(ue),k=ue.redSqr(),Y=Y.redMul(k),J=ce}return G},$.prototype.invm=function(l){var m=l._invmp(this.m);return m.negative!==0?(m.negative=0,this.imod(m).redNeg()):this.imod(m)},$.prototype.pow=function(l,m){if(m.isZero())return new i(1).toRed(this);if(m.cmpn(1)===0)return l.clone();var p=4,C=new Array(1<<p);C[0]=new i(1).toRed(this),C[1]=l;for(var B=2;B<C.length;B++)C[B]=this.mul(C[B-1],l);var x=C[0],I=0,y=0,u=m.bitLength()%26;for(u===0&&(u=26),B=m.length-1;B>=0;B--){for(var k=m.words[B],G=u-1;G>=0;G--){var Y=k>>G&1;if(x!==C[0]&&(x=this.sqr(x)),Y===0&&I===0){y=0;continue}I<<=1,I|=Y,y++,!(y!==p&&(B!==0||G!==0))&&(x=this.mul(x,C[I]),y=0,I=0)}u=26}return x},$.prototype.convertTo=function(l){var m=l.umod(this.m);return m===l?m.clone():m},$.prototype.convertFrom=function(l){var m=l.clone();return m.red=null,m},i.mont=function(l){return new ie(l)};function ie(F){$.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(ie,$),ie.prototype.convertTo=function(l){return this.imod(l.ushln(this.shift))},ie.prototype.convertFrom=function(l){var m=this.imod(l.mul(this.rinv));return m.red=null,m},ie.prototype.imul=function(l,m){if(l.isZero()||m.isZero())return l.words[0]=0,l.length=1,l;var p=l.imul(m),C=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),B=p.isub(C).iushrn(this.shift),x=B;return B.cmp(this.m)>=0?x=B.isub(this.m):B.cmpn(0)<0&&(x=B.iadd(this.m)),x._forceRed(this)},ie.prototype.mul=function(l,m){if(l.isZero()||m.isZero())return new i(0)._forceRed(this);var p=l.mul(m),C=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),B=p.isub(C).iushrn(this.shift),x=B;return B.cmp(this.m)>=0?x=B.isub(this.m):B.cmpn(0)<0&&(x=B.iadd(this.m)),x._forceRed(this)},ie.prototype.invm=function(l){var m=this.imod(l._invmp(this.m).mul(this.r2));return m._forceRed(this)}})(n,an)})(ul);var fl=ul.exports;const yc=Ys(fl),P0="6.13.5";function r2(n,e,t){const r=e.split("|").map(i=>i.trim());for(let i=0;i<r.length;i++)switch(e){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof n===e)return}const s=new Error(`invalid value for type ${e}`);throw s.code="INVALID_ARGUMENT",s.argument=`value.${t}`,s.value=n,s}async function s2(n){const e=Object.keys(n);return(await Promise.all(e.map(r=>Promise.resolve(n[r])))).reduce((r,s,i)=>(r[e[i]]=s,r),{})}function Ac(n,e,t){for(let r in e){let s=e[r];const i=t?t[r]:null;i&&r2(s,i,r),Object.defineProperty(n,r,{enumerable:!0,value:s,writable:!1})}}function qr(n){if(n==null)return"null";if(Array.isArray(n))return"[ "+n.map(qr).join(", ")+" ]";if(n instanceof Uint8Array){const e="0123456789abcdef";let t="0x";for(let r=0;r<n.length;r++)t+=e[n[r]>>4],t+=e[n[r]&15];return t}if(typeof n=="object"&&typeof n.toJSON=="function")return qr(n.toJSON());switch(typeof n){case"boolean":case"symbol":return n.toString();case"bigint":return BigInt(n).toString();case"number":return n.toString();case"string":return JSON.stringify(n);case"object":{const e=Object.keys(n);return e.sort(),"{ "+e.map(t=>`${qr(t)}: ${qr(n[t])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function L0(n,e){return n&&n.code===e}function i2(n){return L0(n,"CALL_EXCEPTION")}function O0(n,e,t){let r=n;{const i=[];if(t){if("message"in t||"code"in t||"name"in t)throw new Error(`value will overwrite populated values: ${qr(t)}`);for(const o in t){if(o==="shortMessage")continue;const a=t[o];i.push(o+"="+qr(a))}}i.push(`code=${e}`),i.push(`version=${P0}`),i.length&&(n+=" ("+i.join(", ")+")")}let s;switch(e){case"INVALID_ARGUMENT":s=new TypeError(n);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":s=new RangeError(n);break;default:s=new Error(n)}return Ac(s,{code:e}),t&&Object.assign(s,t),s.shortMessage==null&&Ac(s,{shortMessage:r}),s}function In(n,e,t,r){if(!n)throw O0(e,t,r)}function er(n,e,t,r){In(n,e,"INVALID_ARGUMENT",{argument:t,value:r})}function o2(n,e,t){t==null&&(t=""),t&&(t=": "+t),In(n>=e,"missing argument"+t,"MISSING_ARGUMENT",{count:n,expectedCount:e}),In(n<=e,"too many arguments"+t,"UNEXPECTED_ARGUMENT",{count:n,expectedCount:e})}const a2=["NFD","NFC","NFKD","NFKC"].reduce((n,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"&&"é".normalize("NFD")!=="é")throw new Error("broken");n.push(e)}catch{}return n},[]);function c2(n){In(a2.indexOf(n)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:n}})}function l2(n,e,t){if(t==null&&(t=""),n!==e){let r=t,s="new";t&&(r+=".",s+=" "+t),In(!1,`private constructor; use ${r}from* methods`,"UNSUPPORTED_OPERATION",{operation:s})}}function N0(n,e,t){if(n instanceof Uint8Array)return t?new Uint8Array(n):n;if(typeof n=="string"&&n.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const r=new Uint8Array((n.length-2)/2);let s=2;for(let i=0;i<r.length;i++)r[i]=parseInt(n.substring(s,s+2),16),s+=2;return r}er(!1,"invalid BytesLike value",e||"value",n)}function Mr(n,e){return N0(n,e,!1)}function d2(n,e){return N0(n,e,!0)}function hl(n,e){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||typeof e=="number"&&n.length!==2+2*e||e===!0&&n.length%2!==0)}function u2(n){return hl(n,!0)||n instanceof Uint8Array}const iu="0123456789abcdef";function si(n){const e=Mr(n);let t="0x";for(let r=0;r<e.length;r++){const s=e[r];t+=iu[(s&240)>>4]+iu[s&15]}return t}function f2(n){return"0x"+n.map(e=>si(e).substring(2)).join("")}function h2(n){return hl(n,!0)?(n.length-2)/2:Mr(n).length}function m2(n,e,t){const r=Mr(n);return t!=null&&t>r.length&&In(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:t}),si(r.slice(e??0,t??r.length))}function z0(n,e,t){const r=Mr(n);In(e>=r.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(r),length:e,offset:e+1});const s=new Uint8Array(e);return s.fill(0),t?s.set(r,e-r.length):s.set(r,0),si(s)}function b2(n,e){return z0(n,e,!0)}function p2(n,e){return z0(n,e,!1)}function Ks(n){if(!Number.isSafeInteger(n)||n<0)throw new Error(`Wrong positive integer: ${n}`)}function ml(n,...e){if(!(n instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(n.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${n.length}`)}function g2(n){if(typeof n!="function"||typeof n.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Ks(n.outputLen),Ks(n.blockLen)}function wc(n,e=!0){if(n.destroyed)throw new Error("Hash instance has been destroyed");if(e&&n.finished)throw new Error("Hash#digest() has already been called")}function H0(n,e){ml(n);const t=e.outputLen;if(n.length<t)throw new Error(`digestInto() expects output buffer of length at least ${t}`)}const Ba=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const q0=n=>n instanceof Uint8Array,K0=n=>new Uint32Array(n.buffer,n.byteOffset,Math.floor(n.byteLength/4)),y2=n=>new DataView(n.buffer,n.byteOffset,n.byteLength),A2=(n,e)=>n<<32-e|n>>>e,w2=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!w2)throw new Error("Non little-endian hardware is not supported");const E2=async()=>{};async function B2(n,e,t){let r=Date.now();for(let s=0;s<n;s++){t(s);const i=Date.now()-r;i>=0&&i<e||(await E2(),r+=i)}}function x2(n){if(typeof n!="string")throw new Error(`utf8ToBytes expected string, got ${typeof n}`);return new Uint8Array(new TextEncoder().encode(n))}function bl(n){if(typeof n=="string"&&(n=x2(n)),!q0(n))throw new Error(`expected Uint8Array, got ${typeof n}`);return n}function C2(...n){const e=new Uint8Array(n.reduce((r,s)=>r+s.length,0));let t=0;return n.forEach(r=>{if(!q0(r))throw new Error("Uint8Array expected");e.set(r,t),t+=r.length}),e}class j0{clone(){return this._cloneInto()}}const S2={}.toString;function D2(n,e){if(e!==void 0&&S2.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(n,e)}function $0(n){const e=r=>n().update(bl(r)).digest(),t=n();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>n(),e}function v2(n=32){if(Ba&&typeof Ba.getRandomValues=="function")return Ba.getRandomValues(new Uint8Array(n));throw new Error("crypto.getRandomValues must be defined")}const mi=BigInt(2**32-1),Ec=BigInt(32);function V0(n,e=!1){return e?{h:Number(n&mi),l:Number(n>>Ec&mi)}:{h:Number(n>>Ec&mi)|0,l:Number(n&mi)|0}}function G0(n,e=!1){let t=new Uint32Array(n.length),r=new Uint32Array(n.length);for(let s=0;s<n.length;s++){const{h:i,l:o}=V0(n[s],e);[t[s],r[s]]=[i,o]}return[t,r]}const k2=(n,e)=>BigInt(n>>>0)<<Ec|BigInt(e>>>0),F2=(n,e,t)=>n>>>t,T2=(n,e,t)=>n<<32-t|e>>>t,I2=(n,e,t)=>n>>>t|e<<32-t,U2=(n,e,t)=>n<<32-t|e>>>t,_2=(n,e,t)=>n<<64-t|e>>>t-32,M2=(n,e,t)=>n>>>t-32|e<<64-t,R2=(n,e)=>e,W2=(n,e)=>n,Y0=(n,e,t)=>n<<t|e>>>32-t,X0=(n,e,t)=>e<<t|n>>>32-t,Z0=(n,e,t)=>e<<t-32|n>>>64-t,J0=(n,e,t)=>n<<t-32|e>>>64-t;function P2(n,e,t,r){const s=(e>>>0)+(r>>>0);return{h:n+t+(s/2**32|0)|0,l:s|0}}const L2=(n,e,t)=>(n>>>0)+(e>>>0)+(t>>>0),O2=(n,e,t,r)=>e+t+r+(n/2**32|0)|0,N2=(n,e,t,r)=>(n>>>0)+(e>>>0)+(t>>>0)+(r>>>0),z2=(n,e,t,r,s)=>e+t+r+s+(n/2**32|0)|0,H2=(n,e,t,r,s)=>(n>>>0)+(e>>>0)+(t>>>0)+(r>>>0)+(s>>>0),q2=(n,e,t,r,s,i)=>e+t+r+s+i+(n/2**32|0)|0,K2={fromBig:V0,split:G0,toBig:k2,shrSH:F2,shrSL:T2,rotrSH:I2,rotrSL:U2,rotrBH:_2,rotrBL:M2,rotr32H:R2,rotr32L:W2,rotlSH:Y0,rotlSL:X0,rotlBH:Z0,rotlBL:J0,add:P2,add3L:L2,add3H:O2,add4L:N2,add4H:z2,add5H:q2,add5L:H2},[Q0,eh,th]=[[],[],[]],j2=BigInt(0),Bs=BigInt(1),$2=BigInt(2),V2=BigInt(7),G2=BigInt(256),Y2=BigInt(113);for(let n=0,e=Bs,t=1,r=0;n<24;n++){[t,r]=[r,(2*t+3*r)%5],Q0.push(2*(5*r+t)),eh.push((n+1)*(n+2)/2%64);let s=j2;for(let i=0;i<7;i++)e=(e<<Bs^(e>>V2)*Y2)%G2,e&$2&&(s^=Bs<<(Bs<<BigInt(i))-Bs);th.push(s)}const[X2,Z2]=G0(th,!0),ou=(n,e,t)=>t>32?Z0(n,e,t):Y0(n,e,t),au=(n,e,t)=>t>32?J0(n,e,t):X0(n,e,t);function J2(n,e=24){const t=new Uint32Array(10);for(let r=24-e;r<24;r++){for(let o=0;o<10;o++)t[o]=n[o]^n[o+10]^n[o+20]^n[o+30]^n[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,h=t[c],b=t[c+1],w=ou(h,b,1)^t[a],D=au(h,b,1)^t[a+1];for(let E=0;E<50;E+=10)n[o+E]^=w,n[o+E+1]^=D}let s=n[2],i=n[3];for(let o=0;o<24;o++){const a=eh[o],c=ou(s,i,a),h=au(s,i,a),b=Q0[o];s=n[b],i=n[b+1],n[b]=c,n[b+1]=h}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)t[a]=n[o+a];for(let a=0;a<10;a++)n[o+a]^=~t[(a+2)%10]&t[(a+4)%10]}n[0]^=X2[r],n[1]^=Z2[r]}t.fill(0)}class pl extends j0{constructor(e,t,r,s=!1,i=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=s,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Ks(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=K0(this.state)}keccak(){J2(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){wc(this);const{blockLen:t,state:r}=this;e=bl(e);const s=e.length;for(let i=0;i<s;){const o=Math.min(t-this.pos,s-i);for(let a=0;a<o;a++)r[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:s}=this;e[r]^=t,t&128&&r===s-1&&this.keccak(),e[s-1]^=128,this.keccak()}writeInto(e){wc(this,!1),ml(e),this.finish();const t=this.state,{blockLen:r}=this;for(let s=0,i=e.length;s<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-s);e.set(t.subarray(this.posOut,this.posOut+o),s),this.posOut+=o,s+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Ks(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(H0(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:s,rounds:i,enableXOF:o}=this;return e||(e=new pl(t,r,s,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=s,e.enableXOF=o,e.destroyed=this.destroyed,e}}const Q2=(n,e,t)=>$0(()=>new pl(e,n,t)),e8=Q2(1,136,256/8);let nh=!1;const rh=function(n){return e8(n)};let sh=rh;function hs(n){const e=Mr(n,"data");return si(sh(e))}hs._=rh;hs.lock=function(){nh=!0};hs.register=function(n){if(nh)throw new TypeError("keccak256 is locked");sh=n};Object.freeze(hs);const t8=BigInt(0),n8=BigInt(36);function cu(n){n=n.toLowerCase();const e=n.substring(2).split(""),t=new Uint8Array(40);for(let s=0;s<40;s++)t[s]=e[s].charCodeAt(0);const r=Mr(hs(t));for(let s=0;s<40;s+=2)r[s>>1]>>4>=8&&(e[s]=e[s].toUpperCase()),(r[s>>1]&15)>=8&&(e[s+1]=e[s+1].toUpperCase());return"0x"+e.join("")}const gl={};for(let n=0;n<10;n++)gl[String(n)]=String(n);for(let n=0;n<26;n++)gl[String.fromCharCode(65+n)]=String(10+n);const lu=15;function r8(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let e=n.split("").map(r=>gl[r]).join("");for(;e.length>=lu;){let r=e.substring(0,lu);e=parseInt(r,10)%97+e.substring(r.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}const s8=function(){const n={};for(let e=0;e<36;e++){const t="0123456789abcdefghijklmnopqrstuvwxyz"[e];n[t]=BigInt(e)}return n}();function i8(n){n=n.toLowerCase();let e=t8;for(let t=0;t<n.length;t++)e=e*n8+s8[n[t]];return e}function Cr(n){if(er(typeof n=="string","invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/)){n.startsWith("0x")||(n="0x"+n);const e=cu(n);return er(!n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||e===n,"bad address checksum","address",n),e}if(n.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){er(n.substring(2,4)===r8(n),"bad icap checksum","address",n);let e=i8(n.substring(4)).toString(16);for(;e.length<40;)e="0"+e;return cu("0x"+e)}er(!1,"invalid address","address",n)}function ih(n){return n&&typeof n.getAddress=="function"}function o8(n){try{return Cr(n),!0}catch{}return!1}async function xa(n,e){const t=await e;return(t==null||t==="0x0000000000000000000000000000000000000000")&&(In(typeof n!="string","unconfigured name","UNCONFIGURED_NAME",{value:n}),er(!1,"invalid AddressLike value; did not resolve to a value address","target",n)),Cr(t)}function a8(n,e){if(typeof n=="string")return n.match(/^0x[0-9a-f]{40}$/i)?Cr(n):(In(e!=null,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),xa(n,e.resolveName(n)));if(ih(n))return xa(n,n.getAddress());if(n&&typeof n.then=="function")return xa(n,n);er(!1,"unsupported addressable value","target",n)}const c8=0,l8=0n,yl="Evm",d8=(n,e)=>({...n,from:e}),u8=(n,e)=>({...n,chainId:e}),f8="0x0000000000000000000000000000000000000000",Qt=class Qt{constructor(e){se(this,"type","Native");se(this,"address");if(Qt.instanceof(e)){const t=e;this.address=t.address;return}if(typeof e=="string"){if(!Qt.isValidAddress(e))throw new Error(`Invalid EVM address, expected ${Qt.byteSize}-byte hex string but got ${e}`);this.address=Cr(e)}else if(e instanceof Uint8Array)e=this.trimUniversalAddress(e),this.address=Cr(Ft.encode(e));else if(Ot.instanceof(e)){const t=this.trimUniversalAddress(e.toUint8Array());this.address=Cr(Ft.encode(t))}else throw new Error(`Invalid EVM address ${e}`)}unwrap(){return this.address}toString(){return this.address}toNative(){return this}toUint8Array(){return Ft.decode(this.address)}toUniversalAddress(){return new Ot(this.address,"hex")}trimUniversalAddress(e){if(e.length===Qt.byteSize)return e;if(e.length<Qt.byteSize)throw new Error(`Invalid evm address, expected ${Qt.byteSize} bytes`);if(e.length!==Ot.byteSize)throw new Error(`Invalid universal address, expected ${Ot.byteSize} bytes`);if(Fs.decode(e.slice(0,12))!==0n)throw new Error(`Invalid EVM address ${e} expected first 12 bytes to be 0s`);return e.slice(12)}static isValidAddress(e){return o8(e)}static instanceof(e){return e.constructor.platform===Qt.platform}equals(e){return Qt.instanceof(e)?e.address===this.address:e.equals(this.toUniversalAddress())}};se(Qt,"byteSize",20),se(Qt,"platform",yl);let ji=Qt;Jc(yl,ji);var bi=W0.Buffer;function h8(n){if(n.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),t=0;t<e.length;t++)e[t]=255;for(var r=0;r<n.length;r++){var s=n.charAt(r),i=s.charCodeAt(0);if(e[i]!==255)throw new TypeError(s+" is ambiguous");e[i]=r}var o=n.length,a=n.charAt(0),c=Math.log(o)/Math.log(256),h=Math.log(256)/Math.log(o);function b(E){if((Array.isArray(E)||E instanceof Uint8Array)&&(E=bi.from(E)),!bi.isBuffer(E))throw new TypeError("Expected Buffer");if(E.length===0)return"";for(var g=0,S=0,T=0,M=E.length;T!==M&&E[T]===0;)T++,g++;for(var N=(M-T)*h+1>>>0,_=new Uint8Array(N);T!==M;){for(var U=E[T],L=0,H=N-1;(U!==0||L<S)&&H!==-1;H--,L++)U+=256*_[H]>>>0,_[H]=U%o>>>0,U=U/o>>>0;if(U!==0)throw new Error("Non-zero carry");S=L,T++}for(var K=N-S;K!==N&&_[K]===0;)K++;for(var V=a.repeat(g);K<N;++K)V+=n.charAt(_[K]);return V}function w(E){if(typeof E!="string")throw new TypeError("Expected String");if(E.length===0)return bi.alloc(0);for(var g=0,S=0,T=0;E[g]===a;)S++,g++;for(var M=(E.length-g)*c+1>>>0,N=new Uint8Array(M);g<E.length;){var _=E.charCodeAt(g);if(_>255)return;var U=e[_];if(U===255)return;for(var L=0,H=M-1;(U!==0||L<T)&&H!==-1;H--,L++)U+=o*N[H]>>>0,N[H]=U%256>>>0,U=U/256>>>0;if(U!==0)throw new Error("Non-zero carry");T=L,g++}for(var K=M-T;K!==M&&N[K]===0;)K++;var V=bi.allocUnsafe(S+(M-K));V.fill(0,0,S);for(var ee=S;K!==M;)V[ee++]=N[K++];return V}function D(E){var g=w(E);if(g)return g;throw new Error("Non-base"+o+" character")}return{encode:b,decodeUnsafe:w,decode:D}}var m8=h8,b8=m8,p8="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",oh=b8(p8);const St=Ys(oh);var kt={};function qn(n,e,t){return e<=n&&n<=t}function xo(n){if(n===void 0)return{};if(n===Object(n))return n;throw TypeError("Could not convert argument to dictionary")}function g8(n){for(var e=String(n),t=e.length,r=0,s=[];r<t;){var i=e.charCodeAt(r);if(i<55296||i>57343)s.push(i);else if(56320<=i&&i<=57343)s.push(65533);else if(55296<=i&&i<=56319)if(r===t-1)s.push(65533);else{var o=n.charCodeAt(r+1);if(56320<=o&&o<=57343){var a=i&1023,c=o&1023;s.push(65536+(a<<10)+c),r+=1}else s.push(65533)}r+=1}return s}function y8(n){for(var e="",t=0;t<n.length;++t){var r=n[t];r<=65535?e+=String.fromCharCode(r):(r-=65536,e+=String.fromCharCode((r>>10)+55296,(r&1023)+56320))}return e}var $i=-1;function Al(n){this.tokens=[].slice.call(n)}Al.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():$i},prepend:function(n){if(Array.isArray(n))for(var e=n;e.length;)this.tokens.unshift(e.pop());else this.tokens.unshift(n)},push:function(n){if(Array.isArray(n))for(var e=n;e.length;)this.tokens.push(e.shift());else this.tokens.push(n)}};var Jr=-1;function Ca(n,e){if(n)throw TypeError("Decoder error");return e||65533}var Vi="utf-8";function Gi(n,e){if(!(this instanceof Gi))return new Gi(n,e);if(n=n!==void 0?String(n).toLowerCase():Vi,n!==Vi)throw new Error("Encoding not supported. Only utf-8 is supported");e=xo(e),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=!!e.fatal,this._ignoreBOM=!!e.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}Gi.prototype={decode:function(e,t){var r;typeof e=="object"&&e instanceof ArrayBuffer?r=new Uint8Array(e):typeof e=="object"&&"buffer"in e&&e.buffer instanceof ArrayBuffer?r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):r=new Uint8Array(0),t=xo(t),this._streaming||(this._decoder=new A8({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!t.stream;for(var s=new Al(r),i=[],o;!s.endOfStream()&&(o=this._decoder.handler(s,s.read()),o!==Jr);)o!==null&&(Array.isArray(o)?i.push.apply(i,o):i.push(o));if(!this._streaming){do{if(o=this._decoder.handler(s,s.read()),o===Jr)break;o!==null&&(Array.isArray(o)?i.push.apply(i,o):i.push(o))}while(!s.endOfStream());this._decoder=null}return i.length&&["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen&&(i[0]===65279?(this._BOMseen=!0,i.shift()):this._BOMseen=!0),y8(i)}};function Yi(n,e){if(!(this instanceof Yi))return new Yi(n,e);if(n=n!==void 0?String(n).toLowerCase():Vi,n!==Vi)throw new Error("Encoding not supported. Only utf-8 is supported");e=xo(e),this._streaming=!1,this._encoder=null,this._options={fatal:!!e.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}Yi.prototype={encode:function(e,t){e=e?String(e):"",t=xo(t),this._streaming||(this._encoder=new w8(this._options)),this._streaming=!!t.stream;for(var r=[],s=new Al(g8(e)),i;!s.endOfStream()&&(i=this._encoder.handler(s,s.read()),i!==Jr);)Array.isArray(i)?r.push.apply(r,i):r.push(i);if(!this._streaming){for(;i=this._encoder.handler(s,s.read()),i!==Jr;)Array.isArray(i)?r.push.apply(r,i):r.push(i);this._encoder=null}return new Uint8Array(r)}};function A8(n){var e=n.fatal,t=0,r=0,s=0,i=128,o=191;this.handler=function(a,c){if(c===$i&&s!==0)return s=0,Ca(e);if(c===$i)return Jr;if(s===0){if(qn(c,0,127))return c;if(qn(c,194,223))s=1,t=c-192;else if(qn(c,224,239))c===224&&(i=160),c===237&&(o=159),s=2,t=c-224;else if(qn(c,240,244))c===240&&(i=144),c===244&&(o=143),s=3,t=c-240;else return Ca(e);return t=t<<6*s,null}if(!qn(c,i,o))return t=s=r=0,i=128,o=191,a.prepend(c),Ca(e);if(i=128,o=191,r+=1,t+=c-128<<6*(s-r),r!==s)return null;var h=t;return t=s=r=0,h}}function w8(n){n.fatal,this.handler=function(e,t){if(t===$i)return Jr;if(qn(t,0,127))return t;var r,s;qn(t,128,2047)?(r=1,s=192):qn(t,2048,65535)?(r=2,s=224):qn(t,65536,1114111)&&(r=3,s=240);for(var i=[(t>>6*r)+s];r>0;){var o=t>>6*(r-1);i.push(128|o&63),r-=1}return i}}const E8=Object.freeze(Object.defineProperty({__proto__:null,TextDecoder:Gi,TextEncoder:Yi},Symbol.toStringTag,{value:"Module"})),B8=kc(E8);var x8=an&&an.__createBinding||(Object.create?function(n,e,t,r){r===void 0&&(r=t),Object.defineProperty(n,r,{enumerable:!0,get:function(){return e[t]}})}:function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]}),C8=an&&an.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),Mn=an&&an.__decorate||function(n,e,t,r){var s=arguments.length,i=s<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(s<3?o(i):s>3?o(e,t,i):o(e,t))||i);return s>3&&i&&Object.defineProperty(e,t,i),i},S8=an&&an.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)t!=="default"&&Object.hasOwnProperty.call(n,t)&&x8(e,n,t);return C8(e,n),e},ah=an&&an.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(kt,"__esModule",{value:!0});var ch=kt.deserializeUnchecked=mh=kt.deserialize=hh=kt.serialize=kt.BinaryReader=kt.BinaryWriter=kt.BorshError=kt.baseDecode=kt.baseEncode=void 0;const tr=ah(fl),lh=ah(oh),D8=S8(B8),v8=typeof TextDecoder!="function"?D8.TextDecoder:TextDecoder,k8=new v8("utf-8",{fatal:!0});function F8(n){return typeof n=="string"&&(n=je.Buffer.from(n,"utf8")),lh.default.encode(je.Buffer.from(n))}kt.baseEncode=F8;function T8(n){return je.Buffer.from(lh.default.decode(n))}kt.baseDecode=T8;const Sa=1024;class Ht extends Error{constructor(e){super(e),this.fieldPath=[],this.originalMessage=e}addToFieldPath(e){this.fieldPath.splice(0,0,e),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}kt.BorshError=Ht;class dh{constructor(){this.buf=je.Buffer.alloc(Sa),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=je.Buffer.concat([this.buf,je.Buffer.alloc(Sa)]))}writeU8(e){this.maybeResize(),this.buf.writeUInt8(e,this.length),this.length+=1}writeU16(e){this.maybeResize(),this.buf.writeUInt16LE(e,this.length),this.length+=2}writeU32(e){this.maybeResize(),this.buf.writeUInt32LE(e,this.length),this.length+=4}writeU64(e){this.maybeResize(),this.writeBuffer(je.Buffer.from(new tr.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(je.Buffer.from(new tr.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(je.Buffer.from(new tr.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(je.Buffer.from(new tr.default(e).toArray("le",64)))}writeBuffer(e){this.buf=je.Buffer.concat([je.Buffer.from(this.buf.subarray(0,this.length)),e,je.Buffer.alloc(Sa)]),this.length+=e.length}writeString(e){this.maybeResize();const t=je.Buffer.from(e,"utf8");this.writeU32(t.length),this.writeBuffer(t)}writeFixedArray(e){this.writeBuffer(je.Buffer.from(e))}writeArray(e,t){this.maybeResize(),this.writeU32(e.length);for(const r of e)this.maybeResize(),t(r)}toArray(){return this.buf.subarray(0,this.length)}}kt.BinaryWriter=dh;function Rn(n,e,t){const r=t.value;t.value=function(...s){try{return r.apply(this,s)}catch(i){if(i instanceof RangeError){const o=i.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(o)>=0)throw new Ht("Reached the end of buffer when deserializing")}throw i}}}class Jt{constructor(e){this.buf=e,this.offset=0}readU8(){const e=this.buf.readUInt8(this.offset);return this.offset+=1,e}readU16(){const e=this.buf.readUInt16LE(this.offset);return this.offset+=2,e}readU32(){const e=this.buf.readUInt32LE(this.offset);return this.offset+=4,e}readU64(){const e=this.readBuffer(8);return new tr.default(e,"le")}readU128(){const e=this.readBuffer(16);return new tr.default(e,"le")}readU256(){const e=this.readBuffer(32);return new tr.default(e,"le")}readU512(){const e=this.readBuffer(64);return new tr.default(e,"le")}readBuffer(e){if(this.offset+e>this.buf.length)throw new Ht(`Expected buffer length ${e} isn't within bounds`);const t=this.buf.slice(this.offset,this.offset+e);return this.offset+=e,t}readString(){const e=this.readU32(),t=this.readBuffer(e);try{return k8.decode(t)}catch(r){throw new Ht(`Error decoding UTF-8 string: ${r}`)}}readFixedArray(e){return new Uint8Array(this.readBuffer(e))}readArray(e){const t=this.readU32(),r=Array();for(let s=0;s<t;++s)r.push(e());return r}}Mn([Rn],Jt.prototype,"readU8",null);Mn([Rn],Jt.prototype,"readU16",null);Mn([Rn],Jt.prototype,"readU32",null);Mn([Rn],Jt.prototype,"readU64",null);Mn([Rn],Jt.prototype,"readU128",null);Mn([Rn],Jt.prototype,"readU256",null);Mn([Rn],Jt.prototype,"readU512",null);Mn([Rn],Jt.prototype,"readString",null);Mn([Rn],Jt.prototype,"readFixedArray",null);Mn([Rn],Jt.prototype,"readArray",null);kt.BinaryReader=Jt;function uh(n){return n.charAt(0).toUpperCase()+n.slice(1)}function hr(n,e,t,r,s){try{if(typeof r=="string")s[`write${uh(r)}`](t);else if(r instanceof Array)if(typeof r[0]=="number"){if(t.length!==r[0])throw new Ht(`Expecting byte array of length ${r[0]}, but got ${t.length} bytes`);s.writeFixedArray(t)}else if(r.length===2&&typeof r[1]=="number"){if(t.length!==r[1])throw new Ht(`Expecting byte array of length ${r[1]}, but got ${t.length} bytes`);for(let i=0;i<r[1];i++)hr(n,null,t[i],r[0],s)}else s.writeArray(t,i=>{hr(n,e,i,r[0],s)});else if(r.kind!==void 0)switch(r.kind){case"option":{t==null?s.writeU8(0):(s.writeU8(1),hr(n,e,t,r.type,s));break}case"map":{s.writeU32(t.size),t.forEach((i,o)=>{hr(n,e,o,r.key,s),hr(n,e,i,r.value,s)});break}default:throw new Ht(`FieldType ${r} unrecognized`)}else fh(n,t,s)}catch(i){throw i instanceof Ht&&i.addToFieldPath(e),i}}function fh(n,e,t){if(typeof e.borshSerialize=="function"){e.borshSerialize(t);return}const r=n.get(e.constructor);if(!r)throw new Ht(`Class ${e.constructor.name} is missing in schema`);if(r.kind==="struct")r.fields.map(([s,i])=>{hr(n,s,e[s],i,t)});else if(r.kind==="enum"){const s=e[r.field];for(let i=0;i<r.values.length;++i){const[o,a]=r.values[i];if(o===s){t.writeU8(i),hr(n,o,e[o],a,t);break}}}else throw new Ht(`Unexpected schema kind: ${r.kind} for ${e.constructor.name}`)}function I8(n,e,t=dh){const r=new t;return fh(n,e,r),r.toArray()}var hh=kt.serialize=I8;function mr(n,e,t,r){try{if(typeof t=="string")return r[`read${uh(t)}`]();if(t instanceof Array){if(typeof t[0]=="number")return r.readFixedArray(t[0]);if(typeof t[1]=="number"){const s=[];for(let i=0;i<t[1];i++)s.push(mr(n,null,t[0],r));return s}else return r.readArray(()=>mr(n,e,t[0],r))}if(t.kind==="option")return r.readU8()?mr(n,e,t.type,r):void 0;if(t.kind==="map"){let s=new Map;const i=r.readU32();for(let o=0;o<i;o++){const a=mr(n,e,t.key,r),c=mr(n,e,t.value,r);s.set(a,c)}return s}return wl(n,t,r)}catch(s){throw s instanceof Ht&&s.addToFieldPath(e),s}}function wl(n,e,t){if(typeof e.borshDeserialize=="function")return e.borshDeserialize(t);const r=n.get(e);if(!r)throw new Ht(`Class ${e.name} is missing in schema`);if(r.kind==="struct"){const s={};for(const[i,o]of n.get(e).fields)s[i]=mr(n,i,o,t);return new e(s)}if(r.kind==="enum"){const s=t.readU8();if(s>=r.values.length)throw new Ht(`Enum index: ${s} is out of range`);const[i,o]=r.values[s],a=mr(n,i,o,t);return new e({[i]:a})}throw new Ht(`Unexpected schema kind: ${r.kind} for ${e.constructor.name}`)}function U8(n,e,t,r=Jt){const s=new r(t),i=wl(n,e,s);if(s.offset<t.length)throw new Ht(`Unexpected ${t.length-s.offset} bytes after deserialized data`);return i}var mh=kt.deserialize=U8;function _8(n,e,t,r=Jt){const s=new r(t);return wl(n,e,s)}ch=kt.deserializeUnchecked=_8;var O={};Object.defineProperty(O,"__esModule",{value:!0});exports.s16=O.s16=O.s8=O.nu64be=O.u48be=O.u40be=O.u32be=O.u24be=O.u16be=vt=O.nu64=O.u48=O.u40=exports.u32=O.u32=O.u24=exports.u16=O.u16=exports.u8=O.u8=ir=O.offset=exports.greedy=O.greedy=O.Constant=O.UTF8=O.CString=O.Blob=O.Boolean=O.BitField=O.BitStructure=O.VariantLayout=O.Union=O.UnionLayoutDiscriminator=O.UnionDiscriminator=O.Structure=O.Sequence=O.DoubleBE=O.Double=O.FloatBE=O.Float=O.NearInt64BE=O.NearInt64=O.NearUInt64BE=O.NearUInt64=O.IntBE=O.Int=O.UIntBE=O.UInt=O.OffsetLayout=O.GreedyCount=O.ExternalLayout=O.bindConstructorLayout=O.nameWithProperty=O.Layout=O.uint8ArrayToBuffer=O.checkUint8Array=void 0;O.constant=O.utf8=O.cstr=exports.blob=O.blob=O.unionLayoutDiscriminator=O.union=exports.seq=O.seq=O.bits=exports.struct=O.struct=O.f64be=O.f64=O.f32be=O.f32=O.ns64be=O.s48be=O.s40be=O.s32be=O.s24be=O.s16be=exports.ns64=O.ns64=O.s48=O.s40=O.s32=O.s24=void 0;const El=ae;function ms(n){if(!(n instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}O.checkUint8Array=ms;function Te(n){return ms(n),El.Buffer.from(n.buffer,n.byteOffset,n.length)}O.uint8ArrayToBuffer=Te;class _e{constructor(e,t){if(!Number.isInteger(e))throw new TypeError("span must be an integer");this.span=e,this.property=t}makeDestinationObject(){return{}}getSpan(e,t){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(e){const t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}fromArray(e){}}O.Layout=_e;function Bl(n,e){return e.property?n+"["+e.property+"]":n}O.nameWithProperty=Bl;function M8(n,e){if(typeof n!="function")throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(n,"layout_"))throw new Error("Class is already bound to a layout");if(!(e&&e instanceof _e))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(e,"boundConstructor_"))throw new Error("layout is already bound to a constructor");n.layout_=e,e.boundConstructor_=n,e.makeDestinationObject=()=>new n,Object.defineProperty(n.prototype,"encode",{value(t,r){return e.encode(this,t,r)},writable:!0}),Object.defineProperty(n,"decode",{value(t,r){return e.decode(t,r)},writable:!0})}O.bindConstructorLayout=M8;class Gt extends _e{isCount(){throw new Error("ExternalLayout is abstract")}}O.ExternalLayout=Gt;class bh extends Gt{constructor(e=1,t){if(!Number.isInteger(e)||0>=e)throw new TypeError("elementSpan must be a (positive) integer");super(-1,t),this.elementSpan=e}isCount(){return!0}decode(e,t=0){ms(e);const r=e.length-t;return Math.floor(r/this.elementSpan)}encode(e,t,r){return 0}}O.GreedyCount=bh;class xl extends Gt{constructor(e,t=0,r){if(!(e instanceof _e))throw new TypeError("layout must be a Layout");if(!Number.isInteger(t))throw new TypeError("offset must be integer or undefined");super(e.span,r||e.property),this.layout=e,this.offset=t}isCount(){return this.layout instanceof on||this.layout instanceof fn}decode(e,t=0){return this.layout.decode(e,t+this.offset)}encode(e,t,r=0){return this.layout.encode(e,t,r+this.offset)}}O.OffsetLayout=xl;class on extends _e{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return Te(e).readUIntLE(t,this.span)}encode(e,t,r=0){return Te(t).writeUIntLE(e,r,this.span),this.span}}O.UInt=on;class fn extends _e{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return Te(e).readUIntBE(t,this.span)}encode(e,t,r=0){return Te(t).writeUIntBE(e,r,this.span),this.span}}O.UIntBE=fn;class Rr extends _e{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return Te(e).readIntLE(t,this.span)}encode(e,t,r=0){return Te(t).writeIntLE(e,r,this.span),this.span}}O.Int=Rr;class bs extends _e{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return Te(e).readIntBE(t,this.span)}encode(e,t,r=0){return Te(t).writeIntBE(e,r,this.span),this.span}}O.IntBE=bs;const Bc=Math.pow(2,32);function Co(n){const e=Math.floor(n/Bc),t=n-e*Bc;return{hi32:e,lo32:t}}function So(n,e){return n*Bc+e}class ph extends _e{constructor(e){super(8,e)}decode(e,t=0){const r=Te(e),s=r.readUInt32LE(t),i=r.readUInt32LE(t+4);return So(i,s)}encode(e,t,r=0){const s=Co(e),i=Te(t);return i.writeUInt32LE(s.lo32,r),i.writeUInt32LE(s.hi32,r+4),8}}O.NearUInt64=ph;class gh extends _e{constructor(e){super(8,e)}decode(e,t=0){const r=Te(e),s=r.readUInt32BE(t),i=r.readUInt32BE(t+4);return So(s,i)}encode(e,t,r=0){const s=Co(e),i=Te(t);return i.writeUInt32BE(s.hi32,r),i.writeUInt32BE(s.lo32,r+4),8}}O.NearUInt64BE=gh;class yh extends _e{constructor(e){super(8,e)}decode(e,t=0){const r=Te(e),s=r.readUInt32LE(t),i=r.readInt32LE(t+4);return So(i,s)}encode(e,t,r=0){const s=Co(e),i=Te(t);return i.writeUInt32LE(s.lo32,r),i.writeInt32LE(s.hi32,r+4),8}}O.NearInt64=yh;class Ah extends _e{constructor(e){super(8,e)}decode(e,t=0){const r=Te(e),s=r.readInt32BE(t),i=r.readUInt32BE(t+4);return So(s,i)}encode(e,t,r=0){const s=Co(e),i=Te(t);return i.writeInt32BE(s.hi32,r),i.writeUInt32BE(s.lo32,r+4),8}}O.NearInt64BE=Ah;class wh extends _e{constructor(e){super(4,e)}decode(e,t=0){return Te(e).readFloatLE(t)}encode(e,t,r=0){return Te(t).writeFloatLE(e,r),4}}O.Float=wh;class Eh extends _e{constructor(e){super(4,e)}decode(e,t=0){return Te(e).readFloatBE(t)}encode(e,t,r=0){return Te(t).writeFloatBE(e,r),4}}O.FloatBE=Eh;class Bh extends _e{constructor(e){super(8,e)}decode(e,t=0){return Te(e).readDoubleLE(t)}encode(e,t,r=0){return Te(t).writeDoubleLE(e,r),8}}O.Double=Bh;class xh extends _e{constructor(e){super(8,e)}decode(e,t=0){return Te(e).readDoubleBE(t)}encode(e,t,r=0){return Te(t).writeDoubleBE(e,r),8}}O.DoubleBE=xh;class Ch extends _e{constructor(e,t,r){if(!(e instanceof _e))throw new TypeError("elementLayout must be a Layout");if(!(t instanceof Gt&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let s=-1;!(t instanceof Gt)&&0<e.span&&(s=t*e.span),super(s,r),this.elementLayout=e,this.count=t}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0,s=this.count;if(s instanceof Gt&&(s=s.decode(e,t)),0<this.elementLayout.span)r=s*this.elementLayout.span;else{let i=0;for(;i<s;)r+=this.elementLayout.getSpan(e,t+r),++i}return r}decode(e,t=0){const r=[];let s=0,i=this.count;for(i instanceof Gt&&(i=i.decode(e,t));s<i;)r.push(this.elementLayout.decode(e,t)),t+=this.elementLayout.getSpan(e,t),s+=1;return r}encode(e,t,r=0){const s=this.elementLayout,i=e.reduce((o,a)=>o+s.encode(a,t,r+o),0);return this.count instanceof Gt&&this.count.encode(e.length,t,r),i}}O.Sequence=Ch;class Sh extends _e{constructor(e,t,r){if(!(Array.isArray(e)&&e.reduce((i,o)=>i&&o instanceof _e,!0)))throw new TypeError("fields must be array of Layout instances");typeof t=="boolean"&&r===void 0&&(r=t,t=void 0);for(const i of e)if(0>i.span&&i.property===void 0)throw new Error("fields cannot contain unnamed variable-length layout");let s=-1;try{s=e.reduce((i,o)=>i+o.getSpan(),0)}catch{}super(s,t),this.fields=e,this.decodePrefixes=!!r}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0;try{r=this.fields.reduce((s,i)=>{const o=i.getSpan(e,t);return t+=o,s+o},0)}catch{throw new RangeError("indeterminate span")}return r}decode(e,t=0){ms(e);const r=this.makeDestinationObject();for(const s of this.fields)if(s.property!==void 0&&(r[s.property]=s.decode(e,t)),t+=s.getSpan(e,t),this.decodePrefixes&&e.length===t)break;return r}encode(e,t,r=0){const s=r;let i=0,o=0;for(const a of this.fields){let c=a.span;if(o=0<c?c:0,a.property!==void 0){const h=e[a.property];h!==void 0&&(o=a.encode(h,t,r),0>c&&(c=a.getSpan(t,r)))}i=r,r+=c}return i+o-s}fromArray(e){const t=this.makeDestinationObject();for(const r of this.fields)r.property!==void 0&&0<e.length&&(t[r.property]=e.shift());return t}layoutFor(e){if(typeof e!="string")throw new TypeError("property must be string");for(const t of this.fields)if(t.property===e)return t}offsetOf(e){if(typeof e!="string")throw new TypeError("property must be string");let t=0;for(const r of this.fields){if(r.property===e)return t;0>r.span?t=-1:0<=t&&(t+=r.span)}}}O.Structure=Sh;class Cl{constructor(e){this.property=e}decode(e,t){throw new Error("UnionDiscriminator is abstract")}encode(e,t,r){throw new Error("UnionDiscriminator is abstract")}}O.UnionDiscriminator=Cl;class Xi extends Cl{constructor(e,t){if(!(e instanceof Gt&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(t||e.property||"variant"),this.layout=e}decode(e,t){return this.layout.decode(e,t)}encode(e,t,r){return this.layout.encode(e,t,r)}}O.UnionLayoutDiscriminator=Xi;class Sl extends _e{constructor(e,t,r){let s;if(e instanceof on||e instanceof fn)s=new Xi(new xl(e));else if(e instanceof Gt&&e.isCount())s=new Xi(e);else if(e instanceof Cl)s=e;else throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(t===void 0&&(t=null),!(t===null||t instanceof _e))throw new TypeError("defaultLayout must be null or a Layout");if(t!==null){if(0>t.span)throw new Error("defaultLayout must have constant span");t.property===void 0&&(t=t.replicate("content"))}let i=-1;t&&(i=t.span,0<=i&&(e instanceof on||e instanceof fn)&&(i+=s.layout.span)),super(i,r),this.discriminator=s,this.usesPrefixDiscriminator=e instanceof on||e instanceof fn,this.defaultLayout=t,this.registry={};let o=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(a){return o(a)},this.configGetSourceVariant=function(a){o=a.bind(this)}}getSpan(e,t=0){if(0<=this.span)return this.span;const r=this.getVariant(e,t);if(!r)throw new Error("unable to determine span for unrecognized variant");return r.getSpan(e,t)}defaultGetSourceVariant(e){if(Object.prototype.hasOwnProperty.call(e,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(e,this.defaultLayout.property))return;const t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||t.property&&Object.prototype.hasOwnProperty.call(e,t.property)))return t}else for(const t in this.registry){const r=this.registry[t];if(r.property&&Object.prototype.hasOwnProperty.call(e,r.property))return r}throw new Error("unable to infer src variant")}decode(e,t=0){let r;const s=this.discriminator,i=s.decode(e,t),o=this.registry[i];if(o===void 0){const a=this.defaultLayout;let c=0;this.usesPrefixDiscriminator&&(c=s.layout.span),r=this.makeDestinationObject(),r[s.property]=i,r[a.property]=a.decode(e,t+c)}else r=o.decode(e,t);return r}encode(e,t,r=0){const s=this.getSourceVariant(e);if(s===void 0){const i=this.discriminator,o=this.defaultLayout;let a=0;return this.usesPrefixDiscriminator&&(a=i.layout.span),i.encode(e[i.property],t,r),a+o.encode(e[o.property],t,r+a)}return s.encode(e,t,r)}addVariant(e,t,r){const s=new Dh(this,e,t,r);return this.registry[e]=s,s}getVariant(e,t=0){let r;return e instanceof Uint8Array?r=this.discriminator.decode(e,t):r=e,this.registry[r]}}O.Union=Sl;class Dh extends _e{constructor(e,t,r,s){if(!(e instanceof Sl))throw new TypeError("union must be a Union");if(!Number.isInteger(t)||0>t)throw new TypeError("variant must be a (non-negative) integer");if(typeof r=="string"&&s===void 0&&(s=r,r=null),r){if(!(r instanceof _e))throw new TypeError("layout must be a Layout");if(e.defaultLayout!==null&&0<=r.span&&r.span>e.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if(typeof s!="string")throw new TypeError("variant must have a String property")}let i=e.span;0>e.span&&(i=r?r.span:0,0<=i&&e.usesPrefixDiscriminator&&(i+=e.discriminator.layout.span)),super(i,s),this.union=e,this.variant=t,this.layout=r||null}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0;this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span);let s=0;return this.layout&&(s=this.layout.getSpan(e,t+r)),r+s}decode(e,t=0){const r=this.makeDestinationObject();if(this!==this.union.getVariant(e,t))throw new Error("variant mismatch");let s=0;return this.union.usesPrefixDiscriminator&&(s=this.union.discriminator.layout.span),this.layout?r[this.property]=this.layout.decode(e,t+s):this.property?r[this.property]=!0:this.union.usesPrefixDiscriminator&&(r[this.union.discriminator.property]=this.variant),r}encode(e,t,r=0){let s=0;if(this.union.usesPrefixDiscriminator&&(s=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(e,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,r);let i=s;if(this.layout&&(this.layout.encode(e[this.property],t,r+s),i+=this.layout.getSpan(t,r+s),0<=this.union.span&&i>this.union.span))throw new Error("encoded variant overruns containing union");return i}fromArray(e){if(this.layout)return this.layout.fromArray(e)}}O.VariantLayout=Dh;function Hr(n){return 0>n&&(n+=4294967296),n}class Dl extends _e{constructor(e,t,r){if(!(e instanceof on||e instanceof fn))throw new TypeError("word must be a UInt or UIntBE layout");if(typeof t=="string"&&r===void 0&&(r=t,t=!1),4<e.span)throw new RangeError("word cannot exceed 32 bits");super(e.span,r),this.word=e,this.msb=!!t,this.fields=[];let s=0;this._packedSetValue=function(i){return s=Hr(i),this},this._packedGetValue=function(){return s}}decode(e,t=0){const r=this.makeDestinationObject(),s=this.word.decode(e,t);this._packedSetValue(s);for(const i of this.fields)i.property!==void 0&&(r[i.property]=i.decode(e));return r}encode(e,t,r=0){const s=this.word.decode(t,r);this._packedSetValue(s);for(const i of this.fields)if(i.property!==void 0){const o=e[i.property];o!==void 0&&i.encode(o)}return this.word.encode(this._packedGetValue(),t,r)}addField(e,t){const r=new vl(this,e,t);return this.fields.push(r),r}addBoolean(e){const t=new vh(this,e);return this.fields.push(t),t}fieldFor(e){if(typeof e!="string")throw new TypeError("property must be string");for(const t of this.fields)if(t.property===e)return t}}O.BitStructure=Dl;class vl{constructor(e,t,r){if(!(e instanceof Dl))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(t)||0>=t)throw new TypeError("bits must be positive integer");const s=8*e.span,i=e.fields.reduce((o,a)=>o+a.bits,0);if(t+i>s)throw new Error("bits too long for span remainder ("+(s-i)+" of "+s+" remain)");this.container=e,this.bits=t,this.valueMask=(1<<t)-1,t===32&&(this.valueMask=4294967295),this.start=i,this.container.msb&&(this.start=s-i-t),this.wordMask=Hr(this.valueMask<<this.start),this.property=r}decode(e,t){const r=this.container._packedGetValue();return Hr(r&this.wordMask)>>>this.start}encode(e){if(typeof e!="number"||!Number.isInteger(e)||e!==Hr(e&this.valueMask))throw new TypeError(Bl("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);const t=this.container._packedGetValue(),r=Hr(e<<this.start);this.container._packedSetValue(Hr(t&~this.wordMask)|r)}}O.BitField=vl;let vh=class extends vl{constructor(e,t){super(e,1,t)}decode(e,t){return!!super.decode(e,t)}encode(e){typeof e=="boolean"&&(e=+e),super.encode(e)}};O.Boolean=vh;let kh=class extends _e{constructor(e,t){if(!(e instanceof Gt&&e.isCount()||Number.isInteger(e)&&0<=e))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let r=-1;e instanceof Gt||(r=e),super(r,t),this.length=e}getSpan(e,t){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),r}decode(e,t=0){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),Te(e).slice(t,t+r)}encode(e,t,r){let s=this.length;if(this.length instanceof Gt&&(s=e.length),!(e instanceof Uint8Array&&s===e.length))throw new TypeError(Bl("Blob.encode",this)+" requires (length "+s+") Uint8Array as src");if(r+s>t.length)throw new RangeError("encoding overruns Uint8Array");const i=Te(e);return Te(t).write(i.toString("hex"),r,s,"hex"),this.length instanceof Gt&&this.length.encode(s,t,r),s}};O.Blob=kh;class Fh extends _e{constructor(e){super(-1,e)}getSpan(e,t=0){ms(e);let r=t;for(;r<e.length&&e[r]!==0;)r+=1;return 1+r-t}decode(e,t=0){const r=this.getSpan(e,t);return Te(e).slice(t,t+r-1).toString("utf-8")}encode(e,t,r=0){typeof e!="string"&&(e=String(e));const s=El.Buffer.from(e,"utf8"),i=s.length;if(r+i>t.length)throw new RangeError("encoding overruns Buffer");const o=Te(t);return s.copy(o,r),o[r+i]=0,i+1}}O.CString=Fh;class Th extends _e{constructor(e,t){if(typeof e=="string"&&t===void 0&&(t=e,e=void 0),e===void 0)e=-1;else if(!Number.isInteger(e))throw new TypeError("maxSpan must be an integer");super(-1,t),this.maxSpan=e}getSpan(e,t=0){return ms(e),e.length-t}decode(e,t=0){const r=this.getSpan(e,t);if(0<=this.maxSpan&&this.maxSpan<r)throw new RangeError("text length exceeds maxSpan");return Te(e).slice(t,t+r).toString("utf-8")}encode(e,t,r=0){typeof e!="string"&&(e=String(e));const s=El.Buffer.from(e,"utf8"),i=s.length;if(0<=this.maxSpan&&this.maxSpan<i)throw new RangeError("text length exceeds maxSpan");if(r+i>t.length)throw new RangeError("encoding overruns Buffer");return s.copy(Te(t),r),i}}O.UTF8=Th;class Ih extends _e{constructor(e,t){super(0,t),this.value=e}decode(e,t){return this.value}encode(e,t,r){return 0}}O.Constant=Ih;exports.greedy=O.greedy=(n,e)=>new bh(n,e);var ir=O.offset=(n,e,t)=>new xl(n,e,t);exports.u8=O.u8=n=>new on(1,n);exports.u16=O.u16=n=>new on(2,n);O.u24=n=>new on(3,n);exports.u32=O.u32=n=>new on(4,n);O.u40=n=>new on(5,n);O.u48=n=>new on(6,n);var vt=O.nu64=n=>new ph(n);O.u16be=n=>new fn(2,n);O.u24be=n=>new fn(3,n);O.u32be=n=>new fn(4,n);O.u40be=n=>new fn(5,n);O.u48be=n=>new fn(6,n);O.nu64be=n=>new gh(n);O.s8=n=>new Rr(1,n);exports.s16=O.s16=n=>new Rr(2,n);O.s24=n=>new Rr(3,n);O.s32=n=>new Rr(4,n);O.s40=n=>new Rr(5,n);O.s48=n=>new Rr(6,n);exports.ns64=O.ns64=n=>new yh(n);O.s16be=n=>new bs(2,n);O.s24be=n=>new bs(3,n);O.s32be=n=>new bs(4,n);O.s40be=n=>new bs(5,n);O.s48be=n=>new bs(6,n);O.ns64be=n=>new Ah(n);O.f32=n=>new wh(n);O.f32be=n=>new Eh(n);O.f64=n=>new Bh(n);O.f64be=n=>new xh(n);exports.struct=O.struct=(n,e,t)=>new Sh(n,e,t);O.bits=(n,e,t)=>new Dl(n,e,t);exports.seq=O.seq=(n,e,t)=>new Ch(n,e,t);O.union=(n,e,t)=>new Sl(n,e,t);O.unionLayoutDiscriminator=(n,e)=>new Xi(n,e);exports.blob=O.blob=(n,e)=>new kh(n,e);O.cstr=n=>new Fh(n);O.utf8=(n,e)=>new Th(n,e);O.constant=(n,e)=>new Ih(n,e);var ii={};Object.defineProperty(ii,"__esModule",{value:!0});function R8(n){{const e=je.Buffer.from(n);e.reverse();const t=e.toString("hex");return t.length===0?BigInt(0):BigInt(`0x${t}`)}}var Uh=ii.toBigIntLE=R8;function W8(n){{const e=n.toString("hex");return e.length===0?BigInt(0):BigInt(`0x${e}`)}}ii.toBigIntBE=W8;function P8(n,e){{const t=n.toString(16),r=je.Buffer.from(t.padStart(e*2,"0").slice(0,e*2),"hex");return r.reverse(),r}}var kl=ii.toBufferLE=P8;function L8(n,e){{const t=n.toString(16);return je.Buffer.from(t.padStart(e*2,"0").slice(0,e*2),"hex")}}ii.toBufferBE=L8;class O8 extends TypeError{constructor(e,t){let r;const{message:s,explanation:i,...o}=e,{path:a}=e,c=a.length===0?s:`At path: ${a.join(".")} -- ${s}`;super(i??c),i!=null&&(this.cause=c),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function N8(n){return oi(n)&&typeof n[Symbol.iterator]=="function"}function oi(n){return typeof n=="object"&&n!=null}function Zi(n){return oi(n)&&!Array.isArray(n)}function hn(n){return typeof n=="symbol"?n.toString():typeof n=="string"?JSON.stringify(n):`${n}`}function z8(n){const{done:e,value:t}=n.next();return e?void 0:t}function H8(n,e,t,r){if(n===!0)return;n===!1?n={}:typeof n=="string"&&(n={message:n});const{path:s,branch:i}=e,{type:o}=t,{refinement:a,message:c=`Expected a value of type \`${o}\`${a?` with refinement \`${a}\``:""}, but received: \`${hn(r)}\``}=n;return{value:r,type:o,refinement:a,key:s[s.length-1],path:s,branch:i,...n,message:c}}function*du(n,e,t,r){N8(n)||(n=[n]);for(const s of n){const i=H8(s,e,t,r);i&&(yield i)}}function*Fl(n,e,t={}){const{path:r=[],branch:s=[n],coerce:i=!1,mask:o=!1}=t,a={path:r,branch:s,mask:o};i&&(n=e.coercer(n,a));let c="valid";for(const h of e.validator(n,a))h.explanation=t.message,c="not_valid",yield[h,void 0];for(let[h,b,w]of e.entries(n,a)){const D=Fl(b,w,{path:h===void 0?r:[...r,h],branch:h===void 0?s:[...s,b],coerce:i,mask:o,message:t.message});for(const E of D)E[0]?(c=E[0].refinement!=null?"not_refined":"not_valid",yield[E[0],void 0]):i&&(b=E[1],h===void 0?n=b:n instanceof Map?n.set(h,b):n instanceof Set?n.add(b):oi(n)&&(b!==void 0||h in n)&&(n[h]=b))}if(c!=="not_valid")for(const h of e.refiner(n,a))h.explanation=t.message,c="not_refined",yield[h,void 0];c==="valid"&&(yield[void 0,n])}let Wn=class{constructor(e){const{type:t,schema:r,validator:s,refiner:i,coercer:o=c=>c,entries:a=function*(){}}=e;this.type=t,this.schema=r,this.entries=a,this.coercer=o,s?this.validator=(c,h)=>{const b=s(c,h);return du(b,h,this,c)}:this.validator=()=>[],i?this.refiner=(c,h)=>{const b=i(c,h);return du(b,h,this,c)}:this.refiner=()=>[]}assert(e,t){return _h(e,this,t)}create(e,t){return Q(e,this,t)}is(e){return Mh(e,this)}mask(e,t){return q8(e,this,t)}validate(e,t={}){return ai(e,this,t)}};function _h(n,e,t){const r=ai(n,e,{message:t});if(r[0])throw r[0]}function Q(n,e,t){const r=ai(n,e,{coerce:!0,message:t});if(r[0])throw r[0];return r[1]}function q8(n,e,t){const r=ai(n,e,{coerce:!0,mask:!0,message:t});if(r[0])throw r[0];return r[1]}function Mh(n,e){return!ai(n,e)[0]}function ai(n,e,t={}){const r=Fl(n,e,t),s=z8(r);return s[0]?[new O8(s[0],function*(){for(const o of r)o[0]&&(yield o[0])}),void 0]:[void 0,s[1]]}function Wr(n,e){return new Wn({type:n,schema:null,validator:e})}function K8(){return Wr("any",()=>!0)}function te(n){return new Wn({type:"array",schema:n,*entries(e){if(n&&Array.isArray(e))for(const[t,r]of e.entries())yield[t,r,n]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${hn(e)}`}})}function Un(){return Wr("boolean",n=>typeof n=="boolean")}function Tl(n){return Wr("instance",e=>e instanceof n||`Expected a \`${n.name}\` instance, but received: ${hn(e)}`)}function Ve(n){const e=hn(n),t=typeof n;return new Wn({type:"literal",schema:t==="string"||t==="number"||t==="boolean"?n:null,validator(r){return r===n||`Expected the literal \`${e}\`, but received: ${hn(r)}`}})}function j8(){return Wr("never",()=>!1)}function ne(n){return new Wn({...n,validator:(e,t)=>e===null||n.validator(e,t),refiner:(e,t)=>e===null||n.refiner(e,t)})}function P(){return Wr("number",n=>typeof n=="number"&&!isNaN(n)||`Expected a number, but received: ${hn(n)}`)}function le(n){return new Wn({...n,validator:(e,t)=>e===void 0||n.validator(e,t),refiner:(e,t)=>e===void 0||n.refiner(e,t)})}function Rh(n,e){return new Wn({type:"record",schema:null,*entries(t){if(oi(t))for(const r in t){const s=t[r];yield[r,r,n],yield[r,s,e]}},validator(t){return Zi(t)||`Expected an object, but received: ${hn(t)}`},coercer(t){return Zi(t)?{...t}:t}})}function Z(){return Wr("string",n=>typeof n=="string"||`Expected a string, but received: ${hn(n)}`)}function Il(n){const e=j8();return new Wn({type:"tuple",schema:null,*entries(t){if(Array.isArray(t)){const r=Math.max(n.length,t.length);for(let s=0;s<r;s++)yield[s,t[s],n[s]||e]}},validator(t){return Array.isArray(t)||`Expected an array, but received: ${hn(t)}`},coercer(t){return Array.isArray(t)?t.slice():t}})}function j(n){const e=Object.keys(n);return new Wn({type:"type",schema:n,*entries(t){if(oi(t))for(const r of e)yield[r,t[r],n[r]]},validator(t){return Zi(t)||`Expected an object, but received: ${hn(t)}`},coercer(t){return Zi(t)?{...t}:t}})}function Kt(n){const e=n.map(t=>t.type).join(" | ");return new Wn({type:"union",schema:null,coercer(t,r){for(const s of n){const[i,o]=s.validate(t,{coerce:!0,mask:r.mask});if(!i)return o}return t},validator(t,r){const s=[];for(const i of n){const[...o]=Fl(t,i,r),[a]=o;if(a[0])for(const[c]of o)c&&s.push(c);else return[]}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${hn(t)}`,...s]}})}function ps(){return Wr("unknown",()=>!0)}function ci(n,e,t){return new Wn({...n,coercer:(r,s)=>Mh(r,e)?n.coercer(t(r,s),s):n.coercer(r,s)})}var pi,$8=new Uint8Array(16);function Wh(){if(!pi&&(pi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!pi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pi($8)}const V8=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Do(n){return typeof n=="string"&&V8.test(n)}var Dt=[];for(var Da=0;Da<256;++Da)Dt.push((Da+256).toString(16).substr(1));function vo(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=(Dt[n[e+0]]+Dt[n[e+1]]+Dt[n[e+2]]+Dt[n[e+3]]+"-"+Dt[n[e+4]]+Dt[n[e+5]]+"-"+Dt[n[e+6]]+Dt[n[e+7]]+"-"+Dt[n[e+8]]+Dt[n[e+9]]+"-"+Dt[n[e+10]]+Dt[n[e+11]]+Dt[n[e+12]]+Dt[n[e+13]]+Dt[n[e+14]]+Dt[n[e+15]]).toLowerCase();if(!Do(t))throw TypeError("Stringified UUID is invalid");return t}var uu,va,ka=0,Fa=0;function G8(n,e,t){var r=e&&t||0,s=e||new Array(16);n=n||{};var i=n.node||uu,o=n.clockseq!==void 0?n.clockseq:va;if(i==null||o==null){var a=n.random||(n.rng||Wh)();i==null&&(i=uu=[a[0]|1,a[1],a[2],a[3],a[4],a[5]]),o==null&&(o=va=(a[6]<<8|a[7])&16383)}var c=n.msecs!==void 0?n.msecs:Date.now(),h=n.nsecs!==void 0?n.nsecs:Fa+1,b=c-ka+(h-Fa)/1e4;if(b<0&&n.clockseq===void 0&&(o=o+1&16383),(b<0||c>ka)&&n.nsecs===void 0&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");ka=c,Fa=h,va=o,c+=122192928e5;var w=((c&268435455)*1e4+h)%4294967296;s[r++]=w>>>24&255,s[r++]=w>>>16&255,s[r++]=w>>>8&255,s[r++]=w&255;var D=c/4294967296*1e4&268435455;s[r++]=D>>>8&255,s[r++]=D&255,s[r++]=D>>>24&15|16,s[r++]=D>>>16&255,s[r++]=o>>>8|128,s[r++]=o&255;for(var E=0;E<6;++E)s[r+E]=i[E];return e||vo(s)}function Ph(n){if(!Do(n))throw TypeError("Invalid UUID");var e,t=new Uint8Array(16);return t[0]=(e=parseInt(n.slice(0,8),16))>>>24,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=e&255,t[4]=(e=parseInt(n.slice(9,13),16))>>>8,t[5]=e&255,t[6]=(e=parseInt(n.slice(14,18),16))>>>8,t[7]=e&255,t[8]=(e=parseInt(n.slice(19,23),16))>>>8,t[9]=e&255,t[10]=(e=parseInt(n.slice(24,36),16))/1099511627776&255,t[11]=e/4294967296&255,t[12]=e>>>24&255,t[13]=e>>>16&255,t[14]=e>>>8&255,t[15]=e&255,t}function Y8(n){n=unescape(encodeURIComponent(n));for(var e=[],t=0;t<n.length;++t)e.push(n.charCodeAt(t));return e}var X8="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Z8="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Lh(n,e,t){function r(s,i,o,a){if(typeof s=="string"&&(s=Y8(s)),typeof i=="string"&&(i=Ph(i)),i.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var c=new Uint8Array(16+s.length);if(c.set(i),c.set(s,i.length),c=t(c),c[6]=c[6]&15|e,c[8]=c[8]&63|128,o){a=a||0;for(var h=0;h<16;++h)o[a+h]=c[h];return o}return vo(c)}try{r.name=n}catch{}return r.DNS=X8,r.URL=Z8,r}function J8(n){if(typeof n=="string"){var e=unescape(encodeURIComponent(n));n=new Uint8Array(e.length);for(var t=0;t<e.length;++t)n[t]=e.charCodeAt(t)}return Q8(e3(t3(n),n.length*8))}function Q8(n){for(var e=[],t=n.length*32,r="0123456789abcdef",s=0;s<t;s+=8){var i=n[s>>5]>>>s%32&255,o=parseInt(r.charAt(i>>>4&15)+r.charAt(i&15),16);e.push(o)}return e}function Oh(n){return(n+64>>>9<<4)+14+1}function e3(n,e){n[e>>5]|=128<<e%32,n[Oh(e)-1]=e;for(var t=1732584193,r=-271733879,s=-1732584194,i=271733878,o=0;o<n.length;o+=16){var a=t,c=r,h=s,b=i;t=Mt(t,r,s,i,n[o],7,-680876936),i=Mt(i,t,r,s,n[o+1],12,-389564586),s=Mt(s,i,t,r,n[o+2],17,606105819),r=Mt(r,s,i,t,n[o+3],22,-1044525330),t=Mt(t,r,s,i,n[o+4],7,-176418897),i=Mt(i,t,r,s,n[o+5],12,1200080426),s=Mt(s,i,t,r,n[o+6],17,-1473231341),r=Mt(r,s,i,t,n[o+7],22,-45705983),t=Mt(t,r,s,i,n[o+8],7,1770035416),i=Mt(i,t,r,s,n[o+9],12,-1958414417),s=Mt(s,i,t,r,n[o+10],17,-42063),r=Mt(r,s,i,t,n[o+11],22,-1990404162),t=Mt(t,r,s,i,n[o+12],7,1804603682),i=Mt(i,t,r,s,n[o+13],12,-40341101),s=Mt(s,i,t,r,n[o+14],17,-1502002290),r=Mt(r,s,i,t,n[o+15],22,1236535329),t=Rt(t,r,s,i,n[o+1],5,-165796510),i=Rt(i,t,r,s,n[o+6],9,-1069501632),s=Rt(s,i,t,r,n[o+11],14,643717713),r=Rt(r,s,i,t,n[o],20,-373897302),t=Rt(t,r,s,i,n[o+5],5,-701558691),i=Rt(i,t,r,s,n[o+10],9,38016083),s=Rt(s,i,t,r,n[o+15],14,-660478335),r=Rt(r,s,i,t,n[o+4],20,-405537848),t=Rt(t,r,s,i,n[o+9],5,568446438),i=Rt(i,t,r,s,n[o+14],9,-1019803690),s=Rt(s,i,t,r,n[o+3],14,-187363961),r=Rt(r,s,i,t,n[o+8],20,1163531501),t=Rt(t,r,s,i,n[o+13],5,-1444681467),i=Rt(i,t,r,s,n[o+2],9,-51403784),s=Rt(s,i,t,r,n[o+7],14,1735328473),r=Rt(r,s,i,t,n[o+12],20,-1926607734),t=Wt(t,r,s,i,n[o+5],4,-378558),i=Wt(i,t,r,s,n[o+8],11,-2022574463),s=Wt(s,i,t,r,n[o+11],16,1839030562),r=Wt(r,s,i,t,n[o+14],23,-35309556),t=Wt(t,r,s,i,n[o+1],4,-1530992060),i=Wt(i,t,r,s,n[o+4],11,1272893353),s=Wt(s,i,t,r,n[o+7],16,-155497632),r=Wt(r,s,i,t,n[o+10],23,-1094730640),t=Wt(t,r,s,i,n[o+13],4,681279174),i=Wt(i,t,r,s,n[o],11,-358537222),s=Wt(s,i,t,r,n[o+3],16,-722521979),r=Wt(r,s,i,t,n[o+6],23,76029189),t=Wt(t,r,s,i,n[o+9],4,-640364487),i=Wt(i,t,r,s,n[o+12],11,-421815835),s=Wt(s,i,t,r,n[o+15],16,530742520),r=Wt(r,s,i,t,n[o+2],23,-995338651),t=Pt(t,r,s,i,n[o],6,-198630844),i=Pt(i,t,r,s,n[o+7],10,1126891415),s=Pt(s,i,t,r,n[o+14],15,-1416354905),r=Pt(r,s,i,t,n[o+5],21,-57434055),t=Pt(t,r,s,i,n[o+12],6,1700485571),i=Pt(i,t,r,s,n[o+3],10,-1894986606),s=Pt(s,i,t,r,n[o+10],15,-1051523),r=Pt(r,s,i,t,n[o+1],21,-2054922799),t=Pt(t,r,s,i,n[o+8],6,1873313359),i=Pt(i,t,r,s,n[o+15],10,-30611744),s=Pt(s,i,t,r,n[o+6],15,-1560198380),r=Pt(r,s,i,t,n[o+13],21,1309151649),t=Pt(t,r,s,i,n[o+4],6,-145523070),i=Pt(i,t,r,s,n[o+11],10,-1120210379),s=Pt(s,i,t,r,n[o+2],15,718787259),r=Pt(r,s,i,t,n[o+9],21,-343485551),t=nr(t,a),r=nr(r,c),s=nr(s,h),i=nr(i,b)}return[t,r,s,i]}function t3(n){if(n.length===0)return[];for(var e=n.length*8,t=new Uint32Array(Oh(e)),r=0;r<e;r+=8)t[r>>5]|=(n[r/8]&255)<<r%32;return t}function nr(n,e){var t=(n&65535)+(e&65535),r=(n>>16)+(e>>16)+(t>>16);return r<<16|t&65535}function n3(n,e){return n<<e|n>>>32-e}function ko(n,e,t,r,s,i){return nr(n3(nr(nr(e,n),nr(r,i)),s),t)}function Mt(n,e,t,r,s,i,o){return ko(e&t|~e&r,n,e,s,i,o)}function Rt(n,e,t,r,s,i,o){return ko(e&r|t&~r,n,e,s,i,o)}function Wt(n,e,t,r,s,i,o){return ko(e^t^r,n,e,s,i,o)}function Pt(n,e,t,r,s,i,o){return ko(t^(e|~r),n,e,s,i,o)}var r3=Lh("v3",48,J8);function s3(n,e,t){n=n||{};var r=n.random||(n.rng||Wh)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){t=t||0;for(var s=0;s<16;++s)e[t+s]=r[s];return e}return vo(r)}function i3(n,e,t,r){switch(n){case 0:return e&t^~e&r;case 1:return e^t^r;case 2:return e&t^e&r^t&r;case 3:return e^t^r}}function Ta(n,e){return n<<e|n>>>32-e}function o3(n){var e=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof n=="string"){var r=unescape(encodeURIComponent(n));n=[];for(var s=0;s<r.length;++s)n.push(r.charCodeAt(s))}else Array.isArray(n)||(n=Array.prototype.slice.call(n));n.push(128);for(var i=n.length/4+2,o=Math.ceil(i/16),a=new Array(o),c=0;c<o;++c){for(var h=new Uint32Array(16),b=0;b<16;++b)h[b]=n[c*64+b*4]<<24|n[c*64+b*4+1]<<16|n[c*64+b*4+2]<<8|n[c*64+b*4+3];a[c]=h}a[o-1][14]=(n.length-1)*8/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=(n.length-1)*8&4294967295;for(var w=0;w<o;++w){for(var D=new Uint32Array(80),E=0;E<16;++E)D[E]=a[w][E];for(var g=16;g<80;++g)D[g]=Ta(D[g-3]^D[g-8]^D[g-14]^D[g-16],1);for(var S=t[0],T=t[1],M=t[2],N=t[3],_=t[4],U=0;U<80;++U){var L=Math.floor(U/20),H=Ta(S,5)+i3(L,T,M,N)+_+e[L]+D[U]>>>0;_=N,N=M,M=Ta(T,30)>>>0,T=S,S=H}t[0]=t[0]+S>>>0,t[1]=t[1]+T>>>0,t[2]=t[2]+M>>>0,t[3]=t[3]+N>>>0,t[4]=t[4]+_>>>0}return[t[0]>>24&255,t[0]>>16&255,t[0]>>8&255,t[0]&255,t[1]>>24&255,t[1]>>16&255,t[1]>>8&255,t[1]&255,t[2]>>24&255,t[2]>>16&255,t[2]>>8&255,t[2]&255,t[3]>>24&255,t[3]>>16&255,t[3]>>8&255,t[3]&255,t[4]>>24&255,t[4]>>16&255,t[4]>>8&255,t[4]&255]}var a3=Lh("v5",80,o3);const c3="00000000-0000-0000-0000-000000000000";function l3(n){if(!Do(n))throw TypeError("Invalid UUID");return parseInt(n.substr(14,1),16)}const d3=Object.freeze(Object.defineProperty({__proto__:null,NIL:c3,parse:Ph,stringify:vo,v1:G8,v3:r3,v4:s3,v5:a3,validate:Do,version:l3},Symbol.toStringTag,{value:"Module"})),Nh=kc(d3),u3=Nh.v4,f3=function(n,e,t,r){if(typeof n!="string")throw new TypeError(n+" must be a string");r=r||{};const s=typeof r.version=="number"?r.version:2;if(s!==1&&s!==2)throw new TypeError(s+" must be 1 or 2");const i={method:n};if(s===2&&(i.jsonrpc="2.0"),e){if(typeof e!="object"&&!Array.isArray(e))throw new TypeError(e+" must be an object, array or omitted");i.params=e}if(typeof t>"u"){const o=typeof r.generator=="function"?r.generator:function(){return u3()};i.id=o(i,r)}else s===2&&t===null?r.notificationIdNull&&(i.id=null):i.id=t;return i};var h3=f3;const m3=Nh.v4,b3=h3,js=function(n,e){if(!(this instanceof js))return new js(n,e);e||(e={}),this.options={reviver:typeof e.reviver<"u"?e.reviver:null,replacer:typeof e.replacer<"u"?e.replacer:null,generator:typeof e.generator<"u"?e.generator:function(){return m3()},version:typeof e.version<"u"?e.version:2,notificationIdNull:typeof e.notificationIdNull=="boolean"?e.notificationIdNull:!1},this.callServer=n};var p3=js;js.prototype.request=function(n,e,t,r){const s=this;let i=null;const o=Array.isArray(n)&&typeof e=="function";if(this.options.version===1&&o)throw new TypeError("JSON-RPC 1.0 does not support batching");if(o||!o&&n&&typeof n=="object"&&typeof e=="function")r=e,i=n;else{typeof t=="function"&&(r=t,t=void 0);const h=typeof r=="function";try{i=b3(n,e,t,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(b){if(h)return r(b);throw b}if(!h)return i}let c;try{c=JSON.stringify(i,this.options.replacer)}catch(h){return r(h)}return this.callServer(c,function(h,b){s._parseResponse(h,b,r)}),i};js.prototype._parseResponse=function(n,e,t){if(n){t(n);return}if(!e)return t();let r;try{r=JSON.parse(e,this.options.reviver)}catch(s){return t(s)}if(t.length===3)if(Array.isArray(r)){const s=function(o){return typeof o.error<"u"},i=function(o){return!s(o)};return t(null,r.filter(s),r.filter(i))}else return t(null,r.error,r.result);t(null,r)};const zh=Ys(p3);var Hh={exports:{}};(function(n){var e=Object.prototype.hasOwnProperty,t="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(t=!1));function s(c,h,b){this.fn=c,this.context=h,this.once=b||!1}function i(c,h,b,w,D){if(typeof b!="function")throw new TypeError("The listener must be a function");var E=new s(b,w||c,D),g=t?t+h:h;return c._events[g]?c._events[g].fn?c._events[g]=[c._events[g],E]:c._events[g].push(E):(c._events[g]=E,c._eventsCount++),c}function o(c,h){--c._eventsCount===0?c._events=new r:delete c._events[h]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var h=[],b,w;if(this._eventsCount===0)return h;for(w in b=this._events)e.call(b,w)&&h.push(t?w.slice(1):w);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(b)):h},a.prototype.listeners=function(h){var b=t?t+h:h,w=this._events[b];if(!w)return[];if(w.fn)return[w.fn];for(var D=0,E=w.length,g=new Array(E);D<E;D++)g[D]=w[D].fn;return g},a.prototype.listenerCount=function(h){var b=t?t+h:h,w=this._events[b];return w?w.fn?1:w.length:0},a.prototype.emit=function(h,b,w,D,E,g){var S=t?t+h:h;if(!this._events[S])return!1;var T=this._events[S],M=arguments.length,N,_;if(T.fn){switch(T.once&&this.removeListener(h,T.fn,void 0,!0),M){case 1:return T.fn.call(T.context),!0;case 2:return T.fn.call(T.context,b),!0;case 3:return T.fn.call(T.context,b,w),!0;case 4:return T.fn.call(T.context,b,w,D),!0;case 5:return T.fn.call(T.context,b,w,D,E),!0;case 6:return T.fn.call(T.context,b,w,D,E,g),!0}for(_=1,N=new Array(M-1);_<M;_++)N[_-1]=arguments[_];T.fn.apply(T.context,N)}else{var U=T.length,L;for(_=0;_<U;_++)switch(T[_].once&&this.removeListener(h,T[_].fn,void 0,!0),M){case 1:T[_].fn.call(T[_].context);break;case 2:T[_].fn.call(T[_].context,b);break;case 3:T[_].fn.call(T[_].context,b,w);break;case 4:T[_].fn.call(T[_].context,b,w,D);break;default:if(!N)for(L=1,N=new Array(M-1);L<M;L++)N[L-1]=arguments[L];T[_].fn.apply(T[_].context,N)}}return!0},a.prototype.on=function(h,b,w){return i(this,h,b,w,!1)},a.prototype.once=function(h,b,w){return i(this,h,b,w,!0)},a.prototype.removeListener=function(h,b,w,D){var E=t?t+h:h;if(!this._events[E])return this;if(!b)return o(this,E),this;var g=this._events[E];if(g.fn)g.fn===b&&(!D||g.once)&&(!w||g.context===w)&&o(this,E);else{for(var S=0,T=[],M=g.length;S<M;S++)(g[S].fn!==b||D&&!g[S].once||w&&g[S].context!==w)&&T.push(g[S]);T.length?this._events[E]=T.length===1?T[0]:T:o(this,E)}return this},a.prototype.removeAllListeners=function(h){var b;return h?(b=t?t+h:h,this._events[b]&&o(this,b)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=t,a.EventEmitter=a,n.exports=a})(Hh);var g3=Hh.exports;const Ul=Ys(g3);var y3=class extends Ul{constructor(e,t,r){super();se(this,"socket");this.socket=new window.WebSocket(e,r),this.socket.onopen=()=>this.emit("open"),this.socket.onmessage=s=>this.emit("message",s.data),this.socket.onerror=s=>this.emit("error",s),this.socket.onclose=s=>{this.emit("close",s.code,s.reason)}}send(e,t,r){const s=r||t;try{this.socket.send(e),s()}catch(i){s(i)}}close(e,t){this.socket.close(e,t)}addEventListener(e,t,r){this.socket.addEventListener(e,t,r)}};function A3(n,e){return new y3(n,e)}var w3=class{encode(n){return JSON.stringify(n)}decode(n){return JSON.parse(n)}},E3=class extends Ul{constructor(e,t="ws://localhost:8080",{autoconnect:r=!0,reconnect:s=!0,reconnect_interval:i=1e3,max_reconnects:o=5,...a}={},c,h){super();se(this,"address");se(this,"rpc_id");se(this,"queue");se(this,"options");se(this,"autoconnect");se(this,"ready");se(this,"reconnect");se(this,"reconnect_timer_id");se(this,"reconnect_interval");se(this,"max_reconnects");se(this,"rest_options");se(this,"current_reconnects");se(this,"generate_request_id");se(this,"socket");se(this,"webSocketFactory");se(this,"dataPack");this.webSocketFactory=e,this.queue={},this.rpc_id=0,this.address=t,this.autoconnect=r,this.ready=!1,this.reconnect=s,this.reconnect_timer_id=void 0,this.reconnect_interval=i,this.max_reconnects=o,this.rest_options=a,this.current_reconnects=0,this.generate_request_id=c||(()=>typeof this.rpc_id=="number"?++this.rpc_id:Number(this.rpc_id)+1),h?this.dataPack=h:this.dataPack=new w3,this.autoconnect&&this._connect(this.address,{autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects,...this.rest_options})}connect(){this.socket||this._connect(this.address,{autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects,...this.rest_options})}call(e,t,r,s){return!s&&typeof r=="object"&&(s=r,r=null),new Promise((i,o)=>{if(!this.ready)return o(new Error("socket not ready"));const a=this.generate_request_id(e,t),c={jsonrpc:"2.0",method:e,params:t||void 0,id:a};this.socket.send(this.dataPack.encode(c),s,h=>{if(h)return o(h);this.queue[a]={promise:[i,o]},r&&(this.queue[a].timeout=setTimeout(()=>{delete this.queue[a],o(new Error("reply timeout"))},r))})})}async login(e){const t=await this.call("rpc.login",e);if(!t)throw new Error("authentication failed");return t}async listMethods(){return await this.call("__listMethods")}notify(e,t){return new Promise((r,s)=>{if(!this.ready)return s(new Error("socket not ready"));const i={jsonrpc:"2.0",method:e,params:t};this.socket.send(this.dataPack.encode(i),o=>{if(o)return s(o);r()})})}async subscribe(e){typeof e=="string"&&(e=[e]);const t=await this.call("rpc.on",e);if(typeof e=="string"&&t[e]!=="ok")throw new Error("Failed subscribing to an event '"+e+"' with: "+t[e]);return t}async unsubscribe(e){typeof e=="string"&&(e=[e]);const t=await this.call("rpc.off",e);if(typeof e=="string"&&t[e]!=="ok")throw new Error("Failed unsubscribing from an event with: "+t);return t}close(e,t){this.socket.close(e||1e3,t)}setAutoReconnect(e){this.reconnect=e}setReconnectInterval(e){this.reconnect_interval=e}setMaxReconnects(e){this.max_reconnects=e}_connect(e,t){clearTimeout(this.reconnect_timer_id),this.socket=this.webSocketFactory(e,t),this.socket.addEventListener("open",()=>{this.ready=!0,this.emit("open"),this.current_reconnects=0}),this.socket.addEventListener("message",({data:r})=>{r instanceof ArrayBuffer&&(r=ae.Buffer.from(r).toString());try{r=this.dataPack.decode(r)}catch{return}if(r.notification&&this.listeners(r.notification).length){if(!Object.keys(r.params).length)return this.emit(r.notification);const s=[r.notification];if(r.params.constructor===Object)s.push(r.params);else for(let i=0;i<r.params.length;i++)s.push(r.params[i]);return Promise.resolve().then(()=>{this.emit.apply(this,s)})}if(!this.queue[r.id])return r.method?Promise.resolve().then(()=>{this.emit(r.method,r==null?void 0:r.params)}):void 0;"error"in r=="result"in r&&this.queue[r.id].promise[1](new Error('Server response malformed. Response must include either "result" or "error", but not both.')),this.queue[r.id].timeout&&clearTimeout(this.queue[r.id].timeout),r.error?this.queue[r.id].promise[1](r.error):this.queue[r.id].promise[0](r.result),delete this.queue[r.id]}),this.socket.addEventListener("error",r=>this.emit("error",r)),this.socket.addEventListener("close",({code:r,reason:s})=>{this.ready&&setTimeout(()=>this.emit("close",r,s),0),this.ready=!1,this.socket=void 0,r!==1e3&&(this.current_reconnects++,this.reconnect&&(this.max_reconnects>this.current_reconnects||this.max_reconnects===0)&&(this.reconnect_timer_id=setTimeout(()=>this._connect(e,t),this.reconnect_interval)))})}};const B3=_r.utils.randomPrivateKey,fu=()=>{const n=_r.utils.randomPrivateKey(),e=Ji(n),t=new Uint8Array(64);return t.set(n),t.set(e,32),{publicKey:e,secretKey:t}},Ji=_r.getPublicKey;function hu(n){try{return _r.ExtendedPoint.fromHex(n),!0}catch{return!1}}const _l=(n,e)=>_r.sign(n,e.slice(0,32)),x3=_r.verify,Ae=n=>ae.Buffer.isBuffer(n)?n:n instanceof Uint8Array?ae.Buffer.from(n.buffer,n.byteOffset,n.byteLength):ae.Buffer.from(n);class Ml{constructor(e){Object.assign(this,e)}encode(){return ae.Buffer.from(hh(Us,this))}static decode(e){return mh(Us,this,e)}static decodeUnchecked(e){return ch(Us,this,e)}}class C3 extends Ml{constructor(e){if(super(e),this.enum="",Object.keys(e).length!==1)throw new Error("Enum can only take single value");Object.keys(e).map(t=>{this.enum=t})}}const Us=new Map;var qh;const Kh=32,Dn=32;function S3(n){return n._bn!==void 0}let mu=1;class X extends Ml{constructor(e){if(super({}),this._bn=void 0,S3(e))this._bn=e._bn;else{if(typeof e=="string"){const t=St.decode(e);if(t.length!=Dn)throw new Error("Invalid public key input");this._bn=new yc(t)}else this._bn=new yc(e);if(this._bn.byteLength()>Dn)throw new Error("Invalid public key input")}}static unique(){const e=new X(mu);return mu+=1,new X(e.toBuffer())}equals(e){return this._bn.eq(e._bn)}toBase58(){return St.encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){const e=this.toBuffer();return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}toBuffer(){const e=this._bn.toArrayLike(ae.Buffer);if(e.length===Dn)return e;const t=ae.Buffer.alloc(32);return e.copy(t,32-e.length),t}get[Symbol.toStringTag](){return`PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed(e,t,r){const s=ae.Buffer.concat([e.toBuffer(),ae.Buffer.from(t),r.toBuffer()]),i=Ni(s);return new X(i)}static createProgramAddressSync(e,t){let r=ae.Buffer.alloc(0);e.forEach(function(i){if(i.length>Kh)throw new TypeError("Max seed length exceeded");r=ae.Buffer.concat([r,Ae(i)])}),r=ae.Buffer.concat([r,t.toBuffer(),ae.Buffer.from("ProgramDerivedAddress")]);const s=Ni(r);if(hu(s))throw new Error("Invalid seeds, address must fall off the curve");return new X(s)}static async createProgramAddress(e,t){return this.createProgramAddressSync(e,t)}static findProgramAddressSync(e,t){let r=255,s;for(;r!=0;){try{const i=e.concat(ae.Buffer.from([r]));s=this.createProgramAddressSync(i,t)}catch(i){if(i instanceof TypeError)throw i;r--;continue}return[s,r]}throw new Error("Unable to find a viable program address nonce")}static async findProgramAddress(e,t){return this.findProgramAddressSync(e,t)}static isOnCurve(e){const t=new X(e);return hu(t.toBytes())}}qh=X;X.default=new qh("11111111111111111111111111111111");Us.set(X,{kind:"struct",fields:[["_bn","u256"]]});class D3{constructor(e){if(this._publicKey=void 0,this._secretKey=void 0,e){const t=Ae(e);if(e.length!==64)throw new Error("bad secret key size");this._publicKey=t.slice(32,64),this._secretKey=t.slice(0,32)}else this._secretKey=Ae(B3()),this._publicKey=Ae(Ji(this._secretKey))}get publicKey(){return new X(this._publicKey)}get secretKey(){return ae.Buffer.concat([this._secretKey,this._publicKey],64)}}const v3=new X("BPFLoader1111111111111111111111111111111111"),or=1232,Fo=127,$s=64;class To extends Error{constructor(e){super(`Signature ${e} has expired: block height exceeded.`),this.signature=void 0,this.signature=e}}Object.defineProperty(To.prototype,"name",{value:"TransactionExpiredBlockheightExceededError"});class Rl extends Error{constructor(e,t){super(`Transaction was not confirmed in ${t.toFixed(2)} seconds. It is unknown if it succeeded or failed. Check signature ${e} using the Solana Explorer or CLI tools.`),this.signature=void 0,this.signature=e}}Object.defineProperty(Rl.prototype,"name",{value:"TransactionExpiredTimeoutError"});class Kr extends Error{constructor(e){super(`Signature ${e} has expired: the nonce is no longer valid.`),this.signature=void 0,this.signature=e}}Object.defineProperty(Kr.prototype,"name",{value:"TransactionExpiredNonceInvalidError"});class Vs{constructor(e,t){this.staticAccountKeys=void 0,this.accountKeysFromLookups=void 0,this.staticAccountKeys=e,this.accountKeysFromLookups=t}keySegments(){const e=[this.staticAccountKeys];return this.accountKeysFromLookups&&(e.push(this.accountKeysFromLookups.writable),e.push(this.accountKeysFromLookups.readonly)),e}get(e){for(const t of this.keySegments()){if(e<t.length)return t[e];e-=t.length}}get length(){return this.keySegments().flat().length}compileInstructions(e){if(this.length>256)throw new Error("Account index overflow encountered during compilation");const r=new Map;this.keySegments().flat().forEach((i,o)=>{r.set(i.toBase58(),o)});const s=i=>{const o=r.get(i.toBase58());if(o===void 0)throw new Error("Encountered an unknown instruction account key during compilation");return o};return e.map(i=>({programIdIndex:s(i.programId),accountKeyIndexes:i.keys.map(o=>s(o.pubkey)),data:i.data}))}}const Be=(n="publicKey")=>exports.blob(32,n),k3=(n="signature")=>exports.blob(64,n),Er=(n="string")=>{const e=exports.struct([exports.u32("length"),exports.u32("lengthPadding"),exports.blob(ir(exports.u32(),-8),"chars")],n),t=e.decode.bind(e),r=e.encode.bind(e),s=e;return s.decode=(i,o)=>t(i,o).chars.toString(),s.encode=(i,o,a)=>{const c={chars:ae.Buffer.from(i,"utf8")};return r(c,o,a)},s.alloc=i=>exports.u32().span+exports.u32().span+ae.Buffer.from(i,"utf8").length,s},F3=(n="authorized")=>exports.struct([Be("staker"),Be("withdrawer")],n),T3=(n="lockup")=>exports.struct([exports.ns64("unixTimestamp"),exports.ns64("epoch"),Be("custodian")],n),I3=(n="voteInit")=>exports.struct([Be("nodePubkey"),Be("authorizedVoter"),Be("authorizedWithdrawer"),exports.u8("commission")],n),U3=(n="voteAuthorizeWithSeedArgs")=>exports.struct([exports.u32("voteAuthorizationType"),Be("currentAuthorityDerivedKeyOwnerPubkey"),Er("currentAuthorityDerivedKeySeed"),Be("newAuthorized")],n);function jh(n,e){const t=s=>{if(s.span>=0)return s.span;if(typeof s.alloc=="function")return s.alloc(e[s.property]);if("count"in s&&"elementLayout"in s){const i=e[s.property];if(Array.isArray(i))return i.length*t(s.elementLayout)}else if("fields"in s)return jh({layout:s},e[s.property]);return 0};let r=0;return n.layout.fields.forEach(s=>{r+=t(s)}),r}function $t(n){let e=0,t=0;for(;;){let r=n.shift();if(e|=(r&127)<<t*7,t+=1,!(r&128))break}return e}function Zt(n,e){let t=e;for(;;){let r=t&127;if(t>>=7,t==0){n.push(r);break}else r|=128,n.push(r)}}function Fe(n,e){if(!n)throw new Error(e||"Assertion failed")}class Io{constructor(e,t){this.payer=void 0,this.keyMetaMap=void 0,this.payer=e,this.keyMetaMap=t}static compile(e,t){const r=new Map,s=o=>{const a=o.toBase58();let c=r.get(a);return c===void 0&&(c={isSigner:!1,isWritable:!1,isInvoked:!1},r.set(a,c)),c},i=s(t);i.isSigner=!0,i.isWritable=!0;for(const o of e){s(o.programId).isInvoked=!0;for(const a of o.keys){const c=s(a.pubkey);c.isSigner||(c.isSigner=a.isSigner),c.isWritable||(c.isWritable=a.isWritable)}}return new Io(t,r)}getMessageComponents(){const e=[...this.keyMetaMap.entries()];Fe(e.length<=256,"Max static account keys length exceeded");const t=e.filter(([,c])=>c.isSigner&&c.isWritable),r=e.filter(([,c])=>c.isSigner&&!c.isWritable),s=e.filter(([,c])=>!c.isSigner&&c.isWritable),i=e.filter(([,c])=>!c.isSigner&&!c.isWritable),o={numRequiredSignatures:t.length+r.length,numReadonlySignedAccounts:r.length,numReadonlyUnsignedAccounts:i.length};{Fe(t.length>0,"Expected at least one writable signer key");const[c]=t[0];Fe(c===this.payer.toBase58(),"Expected first writable signer key to be the fee payer")}const a=[...t.map(([c])=>new X(c)),...r.map(([c])=>new X(c)),...s.map(([c])=>new X(c)),...i.map(([c])=>new X(c))];return[o,a]}extractTableLookup(e){const[t,r]=this.drainKeysFoundInLookupTable(e.state.addresses,o=>!o.isSigner&&!o.isInvoked&&o.isWritable),[s,i]=this.drainKeysFoundInLookupTable(e.state.addresses,o=>!o.isSigner&&!o.isInvoked&&!o.isWritable);if(!(t.length===0&&s.length===0))return[{accountKey:e.key,writableIndexes:t,readonlyIndexes:s},{writable:r,readonly:i}]}drainKeysFoundInLookupTable(e,t){const r=new Array,s=new Array;for(const[i,o]of this.keyMetaMap.entries())if(t(o)){const a=new X(i),c=e.findIndex(h=>h.equals(a));c>=0&&(Fe(c<256,"Max lookup table index exceeded"),r.push(c),s.push(a),this.keyMetaMap.delete(i))}return[r,s]}}const $h="Reached end of buffer unexpectedly";function Bn(n){if(n.length===0)throw new Error($h);return n.shift()}function Vt(n,...e){const[t]=e;if(e.length===2?t+(e[1]??0)>n.length:t>=n.length)throw new Error($h);return n.splice(...e)}class cn{constructor(e){this.header=void 0,this.accountKeys=void 0,this.recentBlockhash=void 0,this.instructions=void 0,this.indexToProgramIds=new Map,this.header=e.header,this.accountKeys=e.accountKeys.map(t=>new X(t)),this.recentBlockhash=e.recentBlockhash,this.instructions=e.instructions,this.instructions.forEach(t=>this.indexToProgramIds.set(t.programIdIndex,this.accountKeys[t.programIdIndex]))}get version(){return"legacy"}get staticAccountKeys(){return this.accountKeys}get compiledInstructions(){return this.instructions.map(e=>({programIdIndex:e.programIdIndex,accountKeyIndexes:e.accounts,data:St.decode(e.data)}))}get addressTableLookups(){return[]}getAccountKeys(){return new Vs(this.staticAccountKeys)}static compile(e){const t=Io.compile(e.instructions,e.payerKey),[r,s]=t.getMessageComponents(),o=new Vs(s).compileInstructions(e.instructions).map(a=>({programIdIndex:a.programIdIndex,accounts:a.accountKeyIndexes,data:St.encode(a.data)}));return new cn({header:r,accountKeys:s,recentBlockhash:e.recentBlockhash,instructions:o})}isAccountSigner(e){return e<this.header.numRequiredSignatures}isAccountWritable(e){const t=this.header.numRequiredSignatures;if(e>=this.header.numRequiredSignatures){const r=e-t,i=this.accountKeys.length-t-this.header.numReadonlyUnsignedAccounts;return r<i}else{const r=t-this.header.numReadonlySignedAccounts;return e<r}}isProgramId(e){return this.indexToProgramIds.has(e)}programIds(){return[...this.indexToProgramIds.values()]}nonProgramIds(){return this.accountKeys.filter((e,t)=>!this.isProgramId(t))}serialize(){const e=this.accountKeys.length;let t=[];Zt(t,e);const r=this.instructions.map(w=>{const{accounts:D,programIdIndex:E}=w,g=Array.from(St.decode(w.data));let S=[];Zt(S,D.length);let T=[];return Zt(T,g.length),{programIdIndex:E,keyIndicesCount:ae.Buffer.from(S),keyIndices:D,dataLength:ae.Buffer.from(T),data:g}});let s=[];Zt(s,r.length);let i=ae.Buffer.alloc(or);ae.Buffer.from(s).copy(i);let o=s.length;r.forEach(w=>{const E=exports.struct([exports.u8("programIdIndex"),exports.blob(w.keyIndicesCount.length,"keyIndicesCount"),exports.seq(exports.u8("keyIndex"),w.keyIndices.length,"keyIndices"),exports.blob(w.dataLength.length,"dataLength"),exports.seq(exports.u8("userdatum"),w.data.length,"data")]).encode(w,i,o);o+=E}),i=i.slice(0,o);const a=exports.struct([exports.blob(1,"numRequiredSignatures"),exports.blob(1,"numReadonlySignedAccounts"),exports.blob(1,"numReadonlyUnsignedAccounts"),exports.blob(t.length,"keyCount"),exports.seq(Be("key"),e,"keys"),Be("recentBlockhash")]),c={numRequiredSignatures:ae.Buffer.from([this.header.numRequiredSignatures]),numReadonlySignedAccounts:ae.Buffer.from([this.header.numReadonlySignedAccounts]),numReadonlyUnsignedAccounts:ae.Buffer.from([this.header.numReadonlyUnsignedAccounts]),keyCount:ae.Buffer.from(t),keys:this.accountKeys.map(w=>Ae(w.toBytes())),recentBlockhash:St.decode(this.recentBlockhash)};let h=ae.Buffer.alloc(2048);const b=a.encode(c,h);return i.copy(h,b),h.slice(0,b+i.length)}static from(e){let t=[...e];const r=Bn(t);if(r!==(r&Fo))throw new Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");const s=Bn(t),i=Bn(t),o=$t(t);let a=[];for(let D=0;D<o;D++){const E=Vt(t,0,Dn);a.push(new X(ae.Buffer.from(E)))}const c=Vt(t,0,Dn),h=$t(t);let b=[];for(let D=0;D<h;D++){const E=Bn(t),g=$t(t),S=Vt(t,0,g),T=$t(t),M=Vt(t,0,T),N=St.encode(ae.Buffer.from(M));b.push({programIdIndex:E,accounts:S,data:N})}const w={header:{numRequiredSignatures:r,numReadonlySignedAccounts:s,numReadonlyUnsignedAccounts:i},recentBlockhash:St.encode(ae.Buffer.from(c)),accountKeys:a,instructions:b};return new cn(w)}}class cr{constructor(e){this.header=void 0,this.staticAccountKeys=void 0,this.recentBlockhash=void 0,this.compiledInstructions=void 0,this.addressTableLookups=void 0,this.header=e.header,this.staticAccountKeys=e.staticAccountKeys,this.recentBlockhash=e.recentBlockhash,this.compiledInstructions=e.compiledInstructions,this.addressTableLookups=e.addressTableLookups}get version(){return 0}get numAccountKeysFromLookups(){let e=0;for(const t of this.addressTableLookups)e+=t.readonlyIndexes.length+t.writableIndexes.length;return e}getAccountKeys(e){let t;if(e&&"accountKeysFromLookups"in e&&e.accountKeysFromLookups){if(this.numAccountKeysFromLookups!=e.accountKeysFromLookups.writable.length+e.accountKeysFromLookups.readonly.length)throw new Error("Failed to get account keys because of a mismatch in the number of account keys from lookups");t=e.accountKeysFromLookups}else if(e&&"addressLookupTableAccounts"in e&&e.addressLookupTableAccounts)t=this.resolveAddressTableLookups(e.addressLookupTableAccounts);else if(this.addressTableLookups.length>0)throw new Error("Failed to get account keys because address table lookups were not resolved");return new Vs(this.staticAccountKeys,t)}isAccountSigner(e){return e<this.header.numRequiredSignatures}isAccountWritable(e){const t=this.header.numRequiredSignatures,r=this.staticAccountKeys.length;if(e>=r){const s=e-r,i=this.addressTableLookups.reduce((o,a)=>o+a.writableIndexes.length,0);return s<i}else if(e>=this.header.numRequiredSignatures){const s=e-t,o=r-t-this.header.numReadonlyUnsignedAccounts;return s<o}else{const s=t-this.header.numReadonlySignedAccounts;return e<s}}resolveAddressTableLookups(e){const t={writable:[],readonly:[]};for(const r of this.addressTableLookups){const s=e.find(i=>i.key.equals(r.accountKey));if(!s)throw new Error(`Failed to find address lookup table account for table key ${r.accountKey.toBase58()}`);for(const i of r.writableIndexes)if(i<s.state.addresses.length)t.writable.push(s.state.addresses[i]);else throw new Error(`Failed to find address for index ${i} in address lookup table ${r.accountKey.toBase58()}`);for(const i of r.readonlyIndexes)if(i<s.state.addresses.length)t.readonly.push(s.state.addresses[i]);else throw new Error(`Failed to find address for index ${i} in address lookup table ${r.accountKey.toBase58()}`)}return t}static compile(e){const t=Io.compile(e.instructions,e.payerKey),r=new Array,s={writable:new Array,readonly:new Array},i=e.addressLookupTableAccounts||[];for(const b of i){const w=t.extractTableLookup(b);if(w!==void 0){const[D,{writable:E,readonly:g}]=w;r.push(D),s.writable.push(...E),s.readonly.push(...g)}}const[o,a]=t.getMessageComponents(),h=new Vs(a,s).compileInstructions(e.instructions);return new cr({header:o,staticAccountKeys:a,recentBlockhash:e.recentBlockhash,compiledInstructions:h,addressTableLookups:r})}serialize(){const e=Array();Zt(e,this.staticAccountKeys.length);const t=this.serializeInstructions(),r=Array();Zt(r,this.compiledInstructions.length);const s=this.serializeAddressTableLookups(),i=Array();Zt(i,this.addressTableLookups.length);const o=exports.struct([exports.u8("prefix"),exports.struct([exports.u8("numRequiredSignatures"),exports.u8("numReadonlySignedAccounts"),exports.u8("numReadonlyUnsignedAccounts")],"header"),exports.blob(e.length,"staticAccountKeysLength"),exports.seq(Be(),this.staticAccountKeys.length,"staticAccountKeys"),Be("recentBlockhash"),exports.blob(r.length,"instructionsLength"),exports.blob(t.length,"serializedInstructions"),exports.blob(i.length,"addressTableLookupsLength"),exports.blob(s.length,"serializedAddressTableLookups")]),a=new Uint8Array(or),h=o.encode({prefix:128,header:this.header,staticAccountKeysLength:new Uint8Array(e),staticAccountKeys:this.staticAccountKeys.map(b=>b.toBytes()),recentBlockhash:St.decode(this.recentBlockhash),instructionsLength:new Uint8Array(r),serializedInstructions:t,addressTableLookupsLength:new Uint8Array(i),serializedAddressTableLookups:s},a);return a.slice(0,h)}serializeInstructions(){let e=0;const t=new Uint8Array(or);for(const r of this.compiledInstructions){const s=Array();Zt(s,r.accountKeyIndexes.length);const i=Array();Zt(i,r.data.length);const o=exports.struct([exports.u8("programIdIndex"),exports.blob(s.length,"encodedAccountKeyIndexesLength"),exports.seq(exports.u8(),r.accountKeyIndexes.length,"accountKeyIndexes"),exports.blob(i.length,"encodedDataLength"),exports.blob(r.data.length,"data")]);e+=o.encode({programIdIndex:r.programIdIndex,encodedAccountKeyIndexesLength:new Uint8Array(s),accountKeyIndexes:r.accountKeyIndexes,encodedDataLength:new Uint8Array(i),data:r.data},t,e)}return t.slice(0,e)}serializeAddressTableLookups(){let e=0;const t=new Uint8Array(or);for(const r of this.addressTableLookups){const s=Array();Zt(s,r.writableIndexes.length);const i=Array();Zt(i,r.readonlyIndexes.length);const o=exports.struct([Be("accountKey"),exports.blob(s.length,"encodedWritableIndexesLength"),exports.seq(exports.u8(),r.writableIndexes.length,"writableIndexes"),exports.blob(i.length,"encodedReadonlyIndexesLength"),exports.seq(exports.u8(),r.readonlyIndexes.length,"readonlyIndexes")]);e+=o.encode({accountKey:r.accountKey.toBytes(),encodedWritableIndexesLength:new Uint8Array(s),writableIndexes:r.writableIndexes,encodedReadonlyIndexesLength:new Uint8Array(i),readonlyIndexes:r.readonlyIndexes},t,e)}return t.slice(0,e)}static deserialize(e){let t=[...e];const r=Bn(t),s=r&Fo;Fe(r!==s,"Expected versioned message but received legacy message");const i=s;Fe(i===0,`Expected versioned message with version 0 but found version ${i}`);const o={numRequiredSignatures:Bn(t),numReadonlySignedAccounts:Bn(t),numReadonlyUnsignedAccounts:Bn(t)},a=[],c=$t(t);for(let g=0;g<c;g++)a.push(new X(Vt(t,0,Dn)));const h=St.encode(Vt(t,0,Dn)),b=$t(t),w=[];for(let g=0;g<b;g++){const S=Bn(t),T=$t(t),M=Vt(t,0,T),N=$t(t),_=new Uint8Array(Vt(t,0,N));w.push({programIdIndex:S,accountKeyIndexes:M,data:_})}const D=$t(t),E=[];for(let g=0;g<D;g++){const S=new X(Vt(t,0,Dn)),T=$t(t),M=Vt(t,0,T),N=$t(t),_=Vt(t,0,N);E.push({accountKey:S,writableIndexes:M,readonlyIndexes:_})}return new cr({header:o,staticAccountKeys:a,recentBlockhash:h,compiledInstructions:w,addressTableLookups:E})}}const Wl={deserializeMessageVersion(n){const e=n[0],t=e&Fo;return t===e?"legacy":t},deserialize:n=>{const e=Wl.deserializeMessageVersion(n);if(e==="legacy")return cn.from(n);if(e===0)return cr.deserialize(n);throw new Error(`Transaction message version ${e} deserialization is not supported`)}};let On=function(n){return n[n.BLOCKHEIGHT_EXCEEDED=0]="BLOCKHEIGHT_EXCEEDED",n[n.PROCESSED=1]="PROCESSED",n[n.TIMED_OUT=2]="TIMED_OUT",n[n.NONCE_INVALID=3]="NONCE_INVALID",n}({});const _3=ae.Buffer.alloc($s).fill(0);class Me{constructor(e){this.keys=void 0,this.programId=void 0,this.data=ae.Buffer.alloc(0),this.programId=e.programId,this.keys=e.keys,e.data&&(this.data=e.data)}toJSON(){return{keys:this.keys.map(({pubkey:e,isSigner:t,isWritable:r})=>({pubkey:e.toJSON(),isSigner:t,isWritable:r})),programId:this.programId.toJSON(),data:[...this.data]}}}class ke{get signature(){return this.signatures.length>0?this.signatures[0].signature:null}constructor(e){if(this.signatures=[],this.feePayer=void 0,this.instructions=[],this.recentBlockhash=void 0,this.lastValidBlockHeight=void 0,this.nonceInfo=void 0,this.minNonceContextSlot=void 0,this._message=void 0,this._json=void 0,!!e)if(e.feePayer&&(this.feePayer=e.feePayer),e.signatures&&(this.signatures=e.signatures),Object.prototype.hasOwnProperty.call(e,"nonceInfo")){const{minContextSlot:t,nonceInfo:r}=e;this.minNonceContextSlot=t,this.nonceInfo=r}else if(Object.prototype.hasOwnProperty.call(e,"lastValidBlockHeight")){const{blockhash:t,lastValidBlockHeight:r}=e;this.recentBlockhash=t,this.lastValidBlockHeight=r}else{const{recentBlockhash:t,nonceInfo:r}=e;r&&(this.nonceInfo=r),this.recentBlockhash=t}}toJSON(){return{recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map(e=>e.toJSON()),signers:this.signatures.map(({publicKey:e})=>e.toJSON())}}add(...e){if(e.length===0)throw new Error("No instructions");return e.forEach(t=>{"instructions"in t?this.instructions=this.instructions.concat(t.instructions):"data"in t&&"programId"in t&&"keys"in t?this.instructions.push(t):this.instructions.push(new Me(t))}),this}compileMessage(){if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json))return this._message;let e,t;if(this.nonceInfo?(e=this.nonceInfo.nonce,this.instructions[0]!=this.nonceInfo.nonceInstruction?t=[this.nonceInfo.nonceInstruction,...this.instructions]:t=this.instructions):(e=this.recentBlockhash,t=this.instructions),!e)throw new Error("Transaction recentBlockhash required");t.length<1&&console.warn("No instructions provided");let r;if(this.feePayer)r=this.feePayer;else if(this.signatures.length>0&&this.signatures[0].publicKey)r=this.signatures[0].publicKey;else throw new Error("Transaction fee payer required");for(let S=0;S<t.length;S++)if(t[S].programId===void 0)throw new Error(`Transaction instruction index ${S} has undefined program id`);const s=[],i=[];t.forEach(S=>{S.keys.forEach(M=>{i.push({...M})});const T=S.programId.toString();s.includes(T)||s.push(T)}),s.forEach(S=>{i.push({pubkey:new X(S),isSigner:!1,isWritable:!1})});const o=[];i.forEach(S=>{const T=S.pubkey.toString(),M=o.findIndex(N=>N.pubkey.toString()===T);M>-1?(o[M].isWritable=o[M].isWritable||S.isWritable,o[M].isSigner=o[M].isSigner||S.isSigner):o.push(S)}),o.sort(function(S,T){if(S.isSigner!==T.isSigner)return S.isSigner?-1:1;if(S.isWritable!==T.isWritable)return S.isWritable?-1:1;const M={localeMatcher:"best fit",usage:"sort",sensitivity:"variant",ignorePunctuation:!1,numeric:!1,caseFirst:"lower"};return S.pubkey.toBase58().localeCompare(T.pubkey.toBase58(),"en",M)});const a=o.findIndex(S=>S.pubkey.equals(r));if(a>-1){const[S]=o.splice(a,1);S.isSigner=!0,S.isWritable=!0,o.unshift(S)}else o.unshift({pubkey:r,isSigner:!0,isWritable:!0});for(const S of this.signatures){const T=o.findIndex(M=>M.pubkey.equals(S.publicKey));if(T>-1)o[T].isSigner||(o[T].isSigner=!0,console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release."));else throw new Error(`unknown signer: ${S.publicKey.toString()}`)}let c=0,h=0,b=0;const w=[],D=[];o.forEach(({pubkey:S,isSigner:T,isWritable:M})=>{T?(w.push(S.toString()),c+=1,M||(h+=1)):(D.push(S.toString()),M||(b+=1))});const E=w.concat(D),g=t.map(S=>{const{data:T,programId:M}=S;return{programIdIndex:E.indexOf(M.toString()),accounts:S.keys.map(N=>E.indexOf(N.pubkey.toString())),data:St.encode(T)}});return g.forEach(S=>{Fe(S.programIdIndex>=0),S.accounts.forEach(T=>Fe(T>=0))}),new cn({header:{numRequiredSignatures:c,numReadonlySignedAccounts:h,numReadonlyUnsignedAccounts:b},accountKeys:E,recentBlockhash:e,instructions:g})}_compile(){const e=this.compileMessage(),t=e.accountKeys.slice(0,e.header.numRequiredSignatures);return this.signatures.length===t.length&&this.signatures.every((s,i)=>t[i].equals(s.publicKey))||(this.signatures=t.map(r=>({signature:null,publicKey:r}))),e}serializeMessage(){return this._compile().serialize()}async getEstimatedFee(e){return(await e.getFeeForMessage(this.compileMessage())).value}setSigners(...e){if(e.length===0)throw new Error("No signers");const t=new Set;this.signatures=e.filter(r=>{const s=r.toString();return t.has(s)?!1:(t.add(s),!0)}).map(r=>({signature:null,publicKey:r}))}sign(...e){if(e.length===0)throw new Error("No signers");const t=new Set,r=[];for(const i of e){const o=i.publicKey.toString();t.has(o)||(t.add(o),r.push(i))}this.signatures=r.map(i=>({signature:null,publicKey:i.publicKey}));const s=this._compile();this._partialSign(s,...r)}partialSign(...e){if(e.length===0)throw new Error("No signers");const t=new Set,r=[];for(const i of e){const o=i.publicKey.toString();t.has(o)||(t.add(o),r.push(i))}const s=this._compile();this._partialSign(s,...r)}_partialSign(e,...t){const r=e.serialize();t.forEach(s=>{const i=_l(r,s.secretKey);this._addSignature(s.publicKey,Ae(i))})}addSignature(e,t){this._compile(),this._addSignature(e,t)}_addSignature(e,t){Fe(t.length===64);const r=this.signatures.findIndex(s=>e.equals(s.publicKey));if(r<0)throw new Error(`unknown signer: ${e.toString()}`);this.signatures[r].signature=ae.Buffer.from(t)}verifySignatures(e=!0){return!this._getMessageSignednessErrors(this.serializeMessage(),e)}_getMessageSignednessErrors(e,t){const r={};for(const{signature:s,publicKey:i}of this.signatures)s===null?t&&(r.missing||(r.missing=[])).push(i):x3(s,e,i.toBytes())||(r.invalid||(r.invalid=[])).push(i);return r.invalid||r.missing?r:void 0}serialize(e){const{requireAllSignatures:t,verifySignatures:r}=Object.assign({requireAllSignatures:!0,verifySignatures:!0},e),s=this.serializeMessage();if(r){const i=this._getMessageSignednessErrors(s,t);if(i){let o="Signature verification failed.";throw i.invalid&&(o+=`
|
|
9
|
-
Invalid signature for public key${i.invalid.length===1?"":"(s)"} [\`${i.invalid.map(a=>a.toBase58()).join("`, `")}\`].`),i.missing&&(o+=`
|
|
10
|
-
Missing signature for public key${i.missing.length===1?"":"(s)"} [\`${i.missing.map(a=>a.toBase58()).join("`, `")}\`].`),new Error(o)}}return this._serialize(s)}_serialize(e){const{signatures:t}=this,r=[];Zt(r,t.length);const s=r.length+t.length*64+e.length,i=ae.Buffer.alloc(s);return Fe(t.length<256),ae.Buffer.from(r).copy(i,0),t.forEach(({signature:o},a)=>{o!==null&&(Fe(o.length===64,"signature has invalid length"),ae.Buffer.from(o).copy(i,r.length+a*64))}),e.copy(i,r.length+t.length*64),Fe(i.length<=or,`Transaction too large: ${i.length} > ${or}`),i}get keys(){return Fe(this.instructions.length===1),this.instructions[0].keys.map(e=>e.pubkey)}get programId(){return Fe(this.instructions.length===1),this.instructions[0].programId}get data(){return Fe(this.instructions.length===1),this.instructions[0].data}static from(e){let t=[...e];const r=$t(t);let s=[];for(let i=0;i<r;i++){const o=Vt(t,0,$s);s.push(St.encode(ae.Buffer.from(o)))}return ke.populate(cn.from(t),s)}static populate(e,t=[]){const r=new ke;return r.recentBlockhash=e.recentBlockhash,e.header.numRequiredSignatures>0&&(r.feePayer=e.accountKeys[0]),t.forEach((s,i)=>{const o={signature:s==St.encode(_3)?null:St.decode(s),publicKey:e.accountKeys[i]};r.signatures.push(o)}),e.instructions.forEach(s=>{const i=s.accounts.map(o=>{const a=e.accountKeys[o];return{pubkey:a,isSigner:r.signatures.some(c=>c.publicKey.toString()===a.toString())||e.isAccountSigner(o),isWritable:e.isAccountWritable(o)}});r.instructions.push(new Me({keys:i,programId:e.accountKeys[s.programIdIndex],data:St.decode(s.data)}))}),r._message=e,r._json=r.toJSON(),r}}class Uo{constructor(e){this.payerKey=void 0,this.instructions=void 0,this.recentBlockhash=void 0,this.payerKey=e.payerKey,this.instructions=e.instructions,this.recentBlockhash=e.recentBlockhash}static decompile(e,t){const{header:r,compiledInstructions:s,recentBlockhash:i}=e,{numRequiredSignatures:o,numReadonlySignedAccounts:a,numReadonlyUnsignedAccounts:c}=r,h=o-a;Fe(h>0,"Message header is invalid");const b=e.staticAccountKeys.length-o-c;Fe(b>=0,"Message header is invalid");const w=e.getAccountKeys(t),D=w.get(0);if(D===void 0)throw new Error("Failed to decompile message because no account keys were found");const E=[];for(const g of s){const S=[];for(const M of g.accountKeyIndexes){const N=w.get(M);if(N===void 0)throw new Error(`Failed to find key for account key index ${M}`);const _=M<o;let U;_?U=M<h:M<w.staticAccountKeys.length?U=M-o<b:U=M-w.staticAccountKeys.length<w.accountKeysFromLookups.writable.length,S.push({pubkey:N,isSigner:M<r.numRequiredSignatures,isWritable:U})}const T=w.get(g.programIdIndex);if(T===void 0)throw new Error(`Failed to find program id for program id index ${g.programIdIndex}`);E.push(new Me({programId:T,data:Ae(g.data),keys:S}))}return new Uo({payerKey:D,instructions:E,recentBlockhash:i})}compileToLegacyMessage(){return cn.compile({payerKey:this.payerKey,recentBlockhash:this.recentBlockhash,instructions:this.instructions})}compileToV0Message(e){return cr.compile({payerKey:this.payerKey,recentBlockhash:this.recentBlockhash,instructions:this.instructions,addressLookupTableAccounts:e})}}class _o{get version(){return this.message.version}constructor(e,t){if(this.signatures=void 0,this.message=void 0,t!==void 0)Fe(t.length===e.header.numRequiredSignatures,"Expected signatures length to be equal to the number of required signatures"),this.signatures=t;else{const r=[];for(let s=0;s<e.header.numRequiredSignatures;s++)r.push(new Uint8Array($s));this.signatures=r}this.message=e}serialize(){const e=this.message.serialize(),t=Array();Zt(t,this.signatures.length);const r=exports.struct([exports.blob(t.length,"encodedSignaturesLength"),exports.seq(k3(),this.signatures.length,"signatures"),exports.blob(e.length,"serializedMessage")]),s=new Uint8Array(2048),i=r.encode({encodedSignaturesLength:new Uint8Array(t),signatures:this.signatures,serializedMessage:e},s);return s.slice(0,i)}static deserialize(e){let t=[...e];const r=[],s=$t(t);for(let o=0;o<s;o++)r.push(new Uint8Array(Vt(t,0,$s)));const i=Wl.deserialize(new Uint8Array(t));return new _o(i,r)}sign(e){const t=this.message.serialize(),r=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures);for(const s of e){const i=r.findIndex(o=>o.equals(s.publicKey));Fe(i>=0,`Cannot sign with non signer key ${s.publicKey.toBase58()}`),this.signatures[i]=_l(t,s.secretKey)}}addSignature(e,t){Fe(t.byteLength===64,"Signature must be 64 bytes long");const s=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures).findIndex(i=>i.equals(e));Fe(s>=0,`Can not add signature; \`${e.toBase58()}\` is not required to sign this transaction`),this.signatures[s]=t}}const M3=160,R3=64,W3=M3/R3,Vh=1e3/W3,dn=new X("SysvarC1ock11111111111111111111111111111111"),P3=new X("SysvarEpochSchedu1e111111111111111111111111"),Gh=new X("Sysvar1nstructions1111111111111111111111111"),Ui=new X("SysvarRecentB1ockHashes11111111111111111111"),Ir=new X("SysvarRent111111111111111111111111111111111"),L3=new X("SysvarRewards111111111111111111111111111111"),O3=new X("SysvarS1otHashes111111111111111111111111111"),N3=new X("SysvarS1otHistory11111111111111111111111111"),_i=new X("SysvarStakeHistory1111111111111111111111111");class Qr extends Error{constructor({action:e,signature:t,transactionMessage:r,logs:s}){const i=s?`Logs:
|
|
11
|
-
${JSON.stringify(s.slice(-10),null,2)}. `:"",o="\nCatch the `SendTransactionError` and call `getLogs()` on it for full details.";let a;switch(e){case"send":a=`Transaction ${t} resulted in an error.
|
|
12
|
-
${r}. `+i+o;break;case"simulate":a=`Simulation failed.
|
|
13
|
-
Message: ${r}.
|
|
14
|
-
`+i+o;break;default:a=`Unknown action '${(c=>c)(e)}'`}super(a),this.signature=void 0,this.transactionMessage=void 0,this.transactionLogs=void 0,this.signature=t,this.transactionMessage=r,this.transactionLogs=s||void 0}get transactionError(){return{message:this.transactionMessage,logs:Array.isArray(this.transactionLogs)?this.transactionLogs:void 0}}get logs(){const e=this.transactionLogs;if(!(e!=null&&typeof e=="object"&&"then"in e))return e}async getLogs(e){return Array.isArray(this.transactionLogs)||(this.transactionLogs=new Promise((t,r)=>{e.getTransaction(this.signature).then(s=>{if(s&&s.meta&&s.meta.logMessages){const i=s.meta.logMessages;this.transactionLogs=i,t(i)}else r(new Error("Log messages not found"))}).catch(r)})),await this.transactionLogs}}const z3={JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP:-32001,JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE:-32002,JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE:-32003,JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE:-32004,JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY:-32005,JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE:-32006,JSON_RPC_SERVER_ERROR_SLOT_SKIPPED:-32007,JSON_RPC_SERVER_ERROR_NO_SNAPSHOT:-32008,JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED:-32009,JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX:-32010,JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE:-32011,JSON_RPC_SCAN_ERROR:-32012,JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH:-32013,JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET:-32014,JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION:-32015,JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED:-32016};class oe extends Error{constructor({code:e,message:t,data:r},s){super(s!=null?`${s}: ${t}`:t),this.code=void 0,this.data=void 0,this.code=e,this.data=r,this.name="SolanaJSONRPCError"}}async function xc(n,e,t,r){const s=r&&{skipPreflight:r.skipPreflight,preflightCommitment:r.preflightCommitment||r.commitment,maxRetries:r.maxRetries,minContextSlot:r.minContextSlot},i=await n.sendTransaction(e,t,s);let o;if(e.recentBlockhash!=null&&e.lastValidBlockHeight!=null)o=(await n.confirmTransaction({abortSignal:r==null?void 0:r.abortSignal,signature:i,blockhash:e.recentBlockhash,lastValidBlockHeight:e.lastValidBlockHeight},r&&r.commitment)).value;else if(e.minNonceContextSlot!=null&&e.nonceInfo!=null){const{nonceInstruction:a}=e.nonceInfo,c=a.keys[0].pubkey;o=(await n.confirmTransaction({abortSignal:r==null?void 0:r.abortSignal,minContextSlot:e.minNonceContextSlot,nonceAccountPubkey:c,nonceValue:e.nonceInfo.nonce,signature:i},r&&r.commitment)).value}else(r==null?void 0:r.abortSignal)!=null&&console.warn("sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` or a combination of `nonceInfo` and `minNonceContextSlot` are abortable."),o=(await n.confirmTransaction(i,r&&r.commitment)).value;if(o.err)throw i!=null?new Qr({action:"send",signature:i,transactionMessage:`Status: (${JSON.stringify(o)})`}):new Error(`Transaction ${i} failed (${JSON.stringify(o)})`);return i}function br(n){return new Promise(e=>setTimeout(e,n))}function Ce(n,e){const t=n.layout.span>=0?n.layout.span:jh(n,e),r=ae.Buffer.alloc(t),s=Object.assign({instruction:n.index},e);return n.layout.encode(s,r),r}function Ie(n,e){let t;try{t=n.layout.decode(e)}catch(r){throw new Error("invalid instruction; "+r)}if(t.instruction!==n.index)throw new Error(`invalid instruction; instruction index mismatch ${t.instruction} != ${n.index}`);return t}const Yh=vt("lamportsPerSignature"),Xh=exports.struct([exports.u32("version"),exports.u32("state"),Be("authorizedPubkey"),Be("nonce"),exports.struct([Yh],"feeCalculator")]),Cc=Xh.span;class Mo{constructor(e){this.authorizedPubkey=void 0,this.nonce=void 0,this.feeCalculator=void 0,this.authorizedPubkey=e.authorizedPubkey,this.nonce=e.nonce,this.feeCalculator=e.feeCalculator}static fromAccountData(e){const t=Xh.decode(Ae(e),0);return new Mo({authorizedPubkey:new X(t.authorizedPubkey),nonce:new X(t.nonce).toString(),feeCalculator:t.feeCalculator})}}const H3=n=>{const e=n.decode.bind(n),t=n.encode.bind(n);return{decode:e,encode:t}},q3=n=>e=>{const t=exports.blob(n,e),{encode:r,decode:s}=H3(t),i=t;return i.decode=(o,a)=>{const c=s(o,a);return Uh(ae.Buffer.from(c))},i.encode=(o,a,c)=>{const h=kl(o,n);return r(h,a,c)},i},es=q3(8);class K3{constructor(){}static decodeInstructionType(e){this.checkProgramId(e.programId);const r=exports.u32("instruction").decode(e.data);let s;for(const[i,o]of Object.entries(Oe))if(o.index==r){s=i;break}if(!s)throw new Error("Instruction type incorrect; not a SystemInstruction");return s}static decodeCreateAccount(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{lamports:t,space:r,programId:s}=Ie(Oe.Create,e.data);return{fromPubkey:e.keys[0].pubkey,newAccountPubkey:e.keys[1].pubkey,lamports:t,space:r,programId:new X(s)}}static decodeTransfer(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{lamports:t}=Ie(Oe.Transfer,e.data);return{fromPubkey:e.keys[0].pubkey,toPubkey:e.keys[1].pubkey,lamports:t}}static decodeTransferWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{lamports:t,seed:r,programId:s}=Ie(Oe.TransferWithSeed,e.data);return{fromPubkey:e.keys[0].pubkey,basePubkey:e.keys[1].pubkey,toPubkey:e.keys[2].pubkey,lamports:t,seed:r,programId:new X(s)}}static decodeAllocate(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{space:t}=Ie(Oe.Allocate,e.data);return{accountPubkey:e.keys[0].pubkey,space:t}}static decodeAllocateWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{base:t,seed:r,space:s,programId:i}=Ie(Oe.AllocateWithSeed,e.data);return{accountPubkey:e.keys[0].pubkey,basePubkey:new X(t),seed:r,space:s,programId:new X(i)}}static decodeAssign(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{programId:t}=Ie(Oe.Assign,e.data);return{accountPubkey:e.keys[0].pubkey,programId:new X(t)}}static decodeAssignWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{base:t,seed:r,programId:s}=Ie(Oe.AssignWithSeed,e.data);return{accountPubkey:e.keys[0].pubkey,basePubkey:new X(t),seed:r,programId:new X(s)}}static decodeCreateWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{base:t,seed:r,lamports:s,space:i,programId:o}=Ie(Oe.CreateWithSeed,e.data);return{fromPubkey:e.keys[0].pubkey,newAccountPubkey:e.keys[1].pubkey,basePubkey:new X(t),seed:r,lamports:s,space:i,programId:new X(o)}}static decodeNonceInitialize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{authorized:t}=Ie(Oe.InitializeNonceAccount,e.data);return{noncePubkey:e.keys[0].pubkey,authorizedPubkey:new X(t)}}static decodeNonceAdvance(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),Ie(Oe.AdvanceNonceAccount,e.data),{noncePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey}}static decodeNonceWithdraw(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,5);const{lamports:t}=Ie(Oe.WithdrawNonceAccount,e.data);return{noncePubkey:e.keys[0].pubkey,toPubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey,lamports:t}}static decodeNonceAuthorize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{authorized:t}=Ie(Oe.AuthorizeNonceAccount,e.data);return{noncePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[1].pubkey,newAuthorizedPubkey:new X(t)}}static checkProgramId(e){if(!e.equals(wt.programId))throw new Error("invalid instruction; programId is not SystemProgram")}static checkKeyLength(e,t){if(e.length<t)throw new Error(`invalid instruction; found ${e.length} keys, expected at least ${t}`)}}const Oe=Object.freeze({Create:{index:0,layout:exports.struct([exports.u32("instruction"),exports.ns64("lamports"),exports.ns64("space"),Be("programId")])},Assign:{index:1,layout:exports.struct([exports.u32("instruction"),Be("programId")])},Transfer:{index:2,layout:exports.struct([exports.u32("instruction"),es("lamports")])},CreateWithSeed:{index:3,layout:exports.struct([exports.u32("instruction"),Be("base"),Er("seed"),exports.ns64("lamports"),exports.ns64("space"),Be("programId")])},AdvanceNonceAccount:{index:4,layout:exports.struct([exports.u32("instruction")])},WithdrawNonceAccount:{index:5,layout:exports.struct([exports.u32("instruction"),exports.ns64("lamports")])},InitializeNonceAccount:{index:6,layout:exports.struct([exports.u32("instruction"),Be("authorized")])},AuthorizeNonceAccount:{index:7,layout:exports.struct([exports.u32("instruction"),Be("authorized")])},Allocate:{index:8,layout:exports.struct([exports.u32("instruction"),exports.ns64("space")])},AllocateWithSeed:{index:9,layout:exports.struct([exports.u32("instruction"),Be("base"),Er("seed"),exports.ns64("space"),Be("programId")])},AssignWithSeed:{index:10,layout:exports.struct([exports.u32("instruction"),Be("base"),Er("seed"),Be("programId")])},TransferWithSeed:{index:11,layout:exports.struct([exports.u32("instruction"),es("lamports"),Er("seed"),Be("programId")])},UpgradeNonceAccount:{index:12,layout:exports.struct([exports.u32("instruction")])}});class wt{constructor(){}static createAccount(e){const t=Oe.Create,r=Ce(t,{lamports:e.lamports,space:e.space,programId:Ae(e.programId.toBuffer())});return new Me({keys:[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.newAccountPubkey,isSigner:!0,isWritable:!0}],programId:this.programId,data:r})}static transfer(e){let t,r;if("basePubkey"in e){const s=Oe.TransferWithSeed;t=Ce(s,{lamports:BigInt(e.lamports),seed:e.seed,programId:Ae(e.programId.toBuffer())}),r=[{pubkey:e.fromPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0}]}else{const s=Oe.Transfer;t=Ce(s,{lamports:BigInt(e.lamports)}),r=[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0}]}return new Me({keys:r,programId:this.programId,data:t})}static assign(e){let t,r;if("basePubkey"in e){const s=Oe.AssignWithSeed;t=Ce(s,{base:Ae(e.basePubkey.toBuffer()),seed:e.seed,programId:Ae(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]}else{const s=Oe.Assign;t=Ce(s,{programId:Ae(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]}return new Me({keys:r,programId:this.programId,data:t})}static createAccountWithSeed(e){const t=Oe.CreateWithSeed,r=Ce(t,{base:Ae(e.basePubkey.toBuffer()),seed:e.seed,lamports:e.lamports,space:e.space,programId:Ae(e.programId.toBuffer())});let s=[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.newAccountPubkey,isSigner:!1,isWritable:!0}];return e.basePubkey.equals(e.fromPubkey)||s.push({pubkey:e.basePubkey,isSigner:!0,isWritable:!1}),new Me({keys:s,programId:this.programId,data:r})}static createNonceAccount(e){const t=new ke;"basePubkey"in e&&"seed"in e?t.add(wt.createAccountWithSeed({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,basePubkey:e.basePubkey,seed:e.seed,lamports:e.lamports,space:Cc,programId:this.programId})):t.add(wt.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,lamports:e.lamports,space:Cc,programId:this.programId}));const r={noncePubkey:e.noncePubkey,authorizedPubkey:e.authorizedPubkey};return t.add(this.nonceInitialize(r)),t}static nonceInitialize(e){const t=Oe.InitializeNonceAccount,r=Ce(t,{authorized:Ae(e.authorizedPubkey.toBuffer())}),s={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:Ui,isSigner:!1,isWritable:!1},{pubkey:Ir,isSigner:!1,isWritable:!1}],programId:this.programId,data:r};return new Me(s)}static nonceAdvance(e){const t=Oe.AdvanceNonceAccount,r=Ce(t),s={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:Ui,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:r};return new Me(s)}static nonceWithdraw(e){const t=Oe.WithdrawNonceAccount,r=Ce(t,{lamports:e.lamports});return new Me({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0},{pubkey:Ui,isSigner:!1,isWritable:!1},{pubkey:Ir,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:r})}static nonceAuthorize(e){const t=Oe.AuthorizeNonceAccount,r=Ce(t,{authorized:Ae(e.newAuthorizedPubkey.toBuffer())});return new Me({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:r})}static allocate(e){let t,r;if("basePubkey"in e){const s=Oe.AllocateWithSeed;t=Ce(s,{base:Ae(e.basePubkey.toBuffer()),seed:e.seed,space:e.space,programId:Ae(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]}else{const s=Oe.Allocate;t=Ce(s,{space:e.space}),r=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]}return new Me({keys:r,programId:this.programId,data:t})}}wt.programId=new X("11111111111111111111111111111111");const j3=or-300;class Ur{constructor(){}static getMinNumSignatures(e){return 2*(Math.ceil(e/Ur.chunkSize)+1+1)}static async load(e,t,r,s,i){{const w=await e.getMinimumBalanceForRentExemption(i.length),D=await e.getAccountInfo(r.publicKey,"confirmed");let E=null;if(D!==null){if(D.executable)return console.error("Program load failed, account is already executable"),!1;D.data.length!==i.length&&(E=E||new ke,E.add(wt.allocate({accountPubkey:r.publicKey,space:i.length}))),D.owner.equals(s)||(E=E||new ke,E.add(wt.assign({accountPubkey:r.publicKey,programId:s}))),D.lamports<w&&(E=E||new ke,E.add(wt.transfer({fromPubkey:t.publicKey,toPubkey:r.publicKey,lamports:w-D.lamports})))}else E=new ke().add(wt.createAccount({fromPubkey:t.publicKey,newAccountPubkey:r.publicKey,lamports:w>0?w:1,space:i.length,programId:s}));E!==null&&await xc(e,E,[t,r],{commitment:"confirmed"})}const o=exports.struct([exports.u32("instruction"),exports.u32("offset"),exports.u32("bytesLength"),exports.u32("bytesLengthPadding"),exports.seq(exports.u8("byte"),ir(exports.u32(),-8),"bytes")]),a=Ur.chunkSize;let c=0,h=i,b=[];for(;h.length>0;){const w=h.slice(0,a),D=ae.Buffer.alloc(a+16);o.encode({instruction:0,offset:c,bytes:w,bytesLength:0,bytesLengthPadding:0},D);const E=new ke().add({keys:[{pubkey:r.publicKey,isSigner:!0,isWritable:!0}],programId:s,data:D});b.push(xc(e,E,[t,r],{commitment:"confirmed"})),e._rpcEndpoint.includes("solana.com")&&await br(1e3/4),c+=a,h=h.slice(a)}await Promise.all(b);{const w=exports.struct([exports.u32("instruction")]),D=ae.Buffer.alloc(w.span);w.encode({instruction:1},D);const E=new ke().add({keys:[{pubkey:r.publicKey,isSigner:!0,isWritable:!0},{pubkey:Ir,isSigner:!1,isWritable:!1}],programId:s,data:D}),g="processed",S=await e.sendTransaction(E,[t,r],{preflightCommitment:g}),{context:T,value:M}=await e.confirmTransaction({signature:S,lastValidBlockHeight:E.lastValidBlockHeight,blockhash:E.recentBlockhash},g);if(M.err)throw new Error(`Transaction ${S} failed (${JSON.stringify(M)})`);for(;;){try{if(await e.getSlot({commitment:g})>T.slot)break}catch{}await new Promise(N=>setTimeout(N,Math.round(Vh/2)))}}return!0}}Ur.chunkSize=j3;const $3=new X("BPFLoader2111111111111111111111111111111111");class V3{static getMinNumSignatures(e){return Ur.getMinNumSignatures(e)}static load(e,t,r,s,i){return Ur.load(e,t,r,i,s)}}function G3(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ia,bu;function Y3(){if(bu)return Ia;bu=1;var n=Object.prototype.toString,e=Object.keys||function(r){var s=[];for(var i in r)s.push(i);return s};function t(r,s){var i,o,a,c,h,b,w;if(r===!0)return"true";if(r===!1)return"false";switch(typeof r){case"object":if(r===null)return null;if(r.toJSON&&typeof r.toJSON=="function")return t(r.toJSON(),s);if(w=n.call(r),w==="[object Array]"){for(a="[",o=r.length-1,i=0;i<o;i++)a+=t(r[i],!0)+",";return o>-1&&(a+=t(r[i],!0)),a+"]"}else if(w==="[object Object]"){for(c=e(r).sort(),o=c.length,a="",i=0;i<o;)h=c[i],b=t(r[h],!1),b!==void 0&&(a&&(a+=","),a+=JSON.stringify(h)+":"+b),i++;return"{"+a+"}"}else return JSON.stringify(r);case"function":case"undefined":return s?null:void 0;case"string":return JSON.stringify(r);default:return isFinite(r)?r:null}}return Ia=function(r){var s=t(r,!1);if(s!==void 0)return""+s},Ia}var X3=Y3(),pu=G3(X3);const xs=32;function Ua(n){let e=0;for(;n>1;)n/=2,e++;return e}function Z3(n){return n===0?1:(n--,n|=n>>1,n|=n>>2,n|=n>>4,n|=n>>8,n|=n>>16,n|=n>>32,n+1)}class Zh{constructor(e,t,r,s,i){this.slotsPerEpoch=void 0,this.leaderScheduleSlotOffset=void 0,this.warmup=void 0,this.firstNormalEpoch=void 0,this.firstNormalSlot=void 0,this.slotsPerEpoch=e,this.leaderScheduleSlotOffset=t,this.warmup=r,this.firstNormalEpoch=s,this.firstNormalSlot=i}getEpoch(e){return this.getEpochAndSlotIndex(e)[0]}getEpochAndSlotIndex(e){if(e<this.firstNormalSlot){const t=Ua(Z3(e+xs+1))-Ua(xs)-1,r=this.getSlotsInEpoch(t),s=e-(r-xs);return[t,s]}else{const t=e-this.firstNormalSlot,r=Math.floor(t/this.slotsPerEpoch),s=this.firstNormalEpoch+r,i=t%this.slotsPerEpoch;return[s,i]}}getFirstSlotInEpoch(e){return e<=this.firstNormalEpoch?(Math.pow(2,e)-1)*xs:(e-this.firstNormalEpoch)*this.slotsPerEpoch+this.firstNormalSlot}getLastSlotInEpoch(e){return this.getFirstSlotInEpoch(e)+this.getSlotsInEpoch(e)-1}getSlotsInEpoch(e){return e<this.firstNormalEpoch?Math.pow(2,e+Ua(xs)):this.slotsPerEpoch}}var J3=globalThis.fetch;class Q3 extends E3{constructor(e,t,r){const s=i=>{const o=A3(i,{autoconnect:!0,max_reconnects:5,reconnect:!0,reconnect_interval:1e3,...t});return"socket"in o?this.underlyingSocket=o.socket:this.underlyingSocket=o,o};super(s,e,t,r),this.underlyingSocket=void 0}call(...e){var r;const t=(r=this.underlyingSocket)==null?void 0:r.readyState;return t===1?super.call(...e):Promise.reject(new Error("Tried to call a JSON-RPC method `"+e[0]+"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was "+t+")"))}notify(...e){var r;const t=(r=this.underlyingSocket)==null?void 0:r.readyState;return t===1?super.notify(...e):Promise.reject(new Error("Tried to send a JSON-RPC notification `"+e[0]+"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was "+t+")"))}}function e4(n,e){let t;try{t=n.layout.decode(e)}catch(r){throw new Error("invalid instruction; "+r)}if(t.typeIndex!==n.index)throw new Error(`invalid account data; account type mismatch ${t.typeIndex} != ${n.index}`);return t}const gu=56;class Qi{constructor(e){this.key=void 0,this.state=void 0,this.key=e.key,this.state=e.state}isActive(){const e=BigInt("0xffffffffffffffff");return this.state.deactivationSlot===e}static deserialize(e){const t=e4(t4,e),r=e.length-gu;Fe(r>=0,"lookup table is invalid"),Fe(r%32===0,"lookup table is invalid");const s=r/32,{addresses:i}=exports.struct([exports.seq(Be(),s,"addresses")]).decode(e.slice(gu));return{deactivationSlot:t.deactivationSlot,lastExtendedSlot:t.lastExtendedSlot,lastExtendedSlotStartIndex:t.lastExtendedStartIndex,authority:t.authority.length!==0?new X(t.authority[0]):void 0,addresses:i.map(o=>new X(o))}}}const t4={index:1,layout:exports.struct([exports.u32("typeIndex"),es("deactivationSlot"),vt("lastExtendedSlot"),exports.u8("lastExtendedStartIndex"),exports.u8(),exports.seq(Be(),ir(exports.u8(),-1),"authority")])},n4=/^[^:]+:\/\/([^:[]+|\[[^\]]+\])(:\d+)?(.*)/i;function r4(n){const e=n.match(n4);if(e==null)throw TypeError(`Failed to validate endpoint URL \`${n}\``);const[t,r,s,i]=e,o=n.startsWith("https:")?"wss:":"ws:",a=s==null?null:parseInt(s.slice(1),10),c=a==null?"":`:${a+1}`;return`${o}//${r}${c}${i}`}const Ge=ci(Tl(X),Z(),n=>new X(n)),Jh=Il([Z(),Ve("base64")]),Pl=ci(Tl(ae.Buffer),Jh,n=>ae.Buffer.from(n[0],"base64")),Qh=30*1e3;function s4(n){if(/^https?:/.test(n)===!1)throw new TypeError("Endpoint URL must start with `http:` or `https:`.");return n}function Le(n){let e,t;if(typeof n=="string")e=n;else if(n){const{commitment:r,...s}=n;e=r,t=s}return{commitment:e,config:t}}function yu(n){return n.map(e=>"memcmp"in e?{...e,memcmp:{...e.memcmp,encoding:e.memcmp.encoding??"base58"}}:e)}function em(n){return Kt([j({jsonrpc:Ve("2.0"),id:Z(),result:n}),j({jsonrpc:Ve("2.0"),id:Z(),error:j({code:ps(),message:Z(),data:le(K8())})})])}const i4=em(ps());function ye(n){return ci(em(n),i4,e=>"error"in e?e:{...e,result:Q(e.result,n)})}function Qe(n){return ye(j({context:j({slot:P()}),value:n}))}function Ro(n){return j({context:j({slot:P()}),value:n})}function _a(n,e){return n===0?new cr({header:e.header,staticAccountKeys:e.accountKeys.map(t=>new X(t)),recentBlockhash:e.recentBlockhash,compiledInstructions:e.instructions.map(t=>({programIdIndex:t.programIdIndex,accountKeyIndexes:t.accounts,data:St.decode(t.data)})),addressTableLookups:e.addressTableLookups}):new cn(e)}const o4=j({foundation:P(),foundationTerm:P(),initial:P(),taper:P(),terminal:P()}),a4=ye(te(ne(j({epoch:P(),effectiveSlot:P(),amount:P(),postBalance:P(),commission:le(ne(P()))})))),c4=te(j({slot:P(),prioritizationFee:P()})),l4=j({total:P(),validator:P(),foundation:P(),epoch:P()}),d4=j({epoch:P(),slotIndex:P(),slotsInEpoch:P(),absoluteSlot:P(),blockHeight:le(P()),transactionCount:le(P())}),u4=j({slotsPerEpoch:P(),leaderScheduleSlotOffset:P(),warmup:Un(),firstNormalEpoch:P(),firstNormalSlot:P()}),f4=Rh(Z(),te(P())),Pr=ne(Kt([j({}),Z()])),h4=j({err:Pr}),m4=Ve("receivedSignature"),b4=j({"solana-core":Z(),"feature-set":le(P())}),p4=j({program:Z(),programId:Ge,parsed:ps()}),g4=j({programId:Ge,accounts:te(Ge),data:Z()}),Au=Qe(j({err:ne(Kt([j({}),Z()])),logs:ne(te(Z())),accounts:le(ne(te(ne(j({executable:Un(),owner:Z(),lamports:P(),data:te(Z()),rentEpoch:le(P())}))))),unitsConsumed:le(P()),returnData:le(ne(j({programId:Z(),data:Il([Z(),Ve("base64")])}))),innerInstructions:le(ne(te(j({index:P(),instructions:te(Kt([p4,g4]))}))))})),y4=Qe(j({byIdentity:Rh(Z(),te(P())),range:j({firstSlot:P(),lastSlot:P()})}));function A4(n,e,t,r,s,i){const o=t||J3;let a;i!=null&&console.warn("You have supplied an `httpAgent` when creating a `Connection` in a browser environment.It has been ignored; `httpAgent` is only used in Node environments.");let c;return r&&(c=async(b,w)=>{const D=await new Promise((E,g)=>{try{r(b,w,(S,T)=>E([S,T]))}catch(S){g(S)}});return await o(...D)}),new zh(async(b,w)=>{const D={method:"POST",body:b,agent:a,headers:Object.assign({"Content-Type":"application/json"},e||{},A6)};try{let E=5,g,S=500;for(;c?g=await c(n,D):g=await o(n,D),!(g.status!==429||s===!0||(E-=1,E===0));)console.error(`Server responded with ${g.status} ${g.statusText}. Retrying after ${S}ms delay...`),await br(S),S*=2;const T=await g.text();g.ok?w(null,T):w(new Error(`${g.status} ${g.statusText}: ${T}`))}catch(E){E instanceof Error&&w(E)}},{})}function w4(n){return(e,t)=>new Promise((r,s)=>{n.request(e,t,(i,o)=>{if(i){s(i);return}r(o)})})}function E4(n){return e=>new Promise((t,r)=>{e.length===0&&t([]);const s=e.map(i=>n.request(i.methodName,i.args));n.request(s,(i,o)=>{if(i){r(i);return}t(o)})})}const B4=ye(o4),x4=ye(l4),C4=ye(c4),S4=ye(d4),D4=ye(u4),v4=ye(f4),k4=ye(P()),F4=Qe(j({total:P(),circulating:P(),nonCirculating:P(),nonCirculatingAccounts:te(Ge)})),Sc=j({amount:Z(),uiAmount:ne(P()),decimals:P(),uiAmountString:le(Z())}),T4=Qe(te(j({address:Ge,amount:Z(),uiAmount:ne(P()),decimals:P(),uiAmountString:le(Z())}))),I4=Qe(te(j({pubkey:Ge,account:j({executable:Un(),owner:Ge,lamports:P(),data:Pl,rentEpoch:P()})}))),Dc=j({program:Z(),parsed:ps(),space:P()}),U4=Qe(te(j({pubkey:Ge,account:j({executable:Un(),owner:Ge,lamports:P(),data:Dc,rentEpoch:P()})}))),_4=Qe(te(j({lamports:P(),address:Ge}))),Gs=j({executable:Un(),owner:Ge,lamports:P(),data:Pl,rentEpoch:P()}),M4=j({pubkey:Ge,account:Gs}),R4=ci(Kt([Tl(ae.Buffer),Dc]),Kt([Jh,Dc]),n=>Array.isArray(n)?Q(n,Pl):n),vc=j({executable:Un(),owner:Ge,lamports:P(),data:R4,rentEpoch:P()}),W4=j({pubkey:Ge,account:vc}),P4=j({state:Kt([Ve("active"),Ve("inactive"),Ve("activating"),Ve("deactivating")]),active:P(),inactive:P()}),L4=ye(te(j({signature:Z(),slot:P(),err:Pr,memo:ne(Z()),blockTime:le(ne(P()))}))),O4=ye(te(j({signature:Z(),slot:P(),err:Pr,memo:ne(Z()),blockTime:le(ne(P()))}))),N4=j({subscription:P(),result:Ro(Gs)}),z4=j({pubkey:Ge,account:Gs}),H4=j({subscription:P(),result:Ro(z4)}),q4=j({parent:P(),slot:P(),root:P()}),K4=j({subscription:P(),result:q4}),j4=Kt([j({type:Kt([Ve("firstShredReceived"),Ve("completed"),Ve("optimisticConfirmation"),Ve("root")]),slot:P(),timestamp:P()}),j({type:Ve("createdBank"),parent:P(),slot:P(),timestamp:P()}),j({type:Ve("frozen"),slot:P(),timestamp:P(),stats:j({numTransactionEntries:P(),numSuccessfulTransactions:P(),numFailedTransactions:P(),maxTransactionsPerEntry:P()})}),j({type:Ve("dead"),slot:P(),timestamp:P(),err:Z()})]),$4=j({subscription:P(),result:j4}),V4=j({subscription:P(),result:Ro(Kt([h4,m4]))}),G4=j({subscription:P(),result:P()}),Y4=j({pubkey:Z(),gossip:ne(Z()),tpu:ne(Z()),rpc:ne(Z()),version:ne(Z())}),wu=j({votePubkey:Z(),nodePubkey:Z(),activatedStake:P(),epochVoteAccount:Un(),epochCredits:te(Il([P(),P(),P()])),commission:P(),lastVote:P(),rootSlot:ne(P())}),X4=ye(j({current:te(wu),delinquent:te(wu)})),Z4=Kt([Ve("processed"),Ve("confirmed"),Ve("finalized")]),J4=j({slot:P(),confirmations:ne(P()),err:Pr,confirmationStatus:le(Z4)}),Q4=Qe(te(ne(J4))),e6=ye(P()),tm=j({accountKey:Ge,writableIndexes:te(P()),readonlyIndexes:te(P())}),Ll=j({signatures:te(Z()),message:j({accountKeys:te(Z()),header:j({numRequiredSignatures:P(),numReadonlySignedAccounts:P(),numReadonlyUnsignedAccounts:P()}),instructions:te(j({accounts:te(P()),data:Z(),programIdIndex:P()})),recentBlockhash:Z(),addressTableLookups:le(te(tm))})}),nm=j({pubkey:Ge,signer:Un(),writable:Un(),source:le(Kt([Ve("transaction"),Ve("lookupTable")]))}),rm=j({accountKeys:te(nm),signatures:te(Z())}),sm=j({parsed:ps(),program:Z(),programId:Ge}),im=j({accounts:te(Ge),data:Z(),programId:Ge}),t6=Kt([im,sm]),n6=Kt([j({parsed:ps(),program:Z(),programId:Z()}),j({accounts:te(Z()),data:Z(),programId:Z()})]),om=ci(t6,n6,n=>"accounts"in n?Q(n,im):Q(n,sm)),am=j({signatures:te(Z()),message:j({accountKeys:te(nm),instructions:te(om),recentBlockhash:Z(),addressTableLookups:le(ne(te(tm)))})}),eo=j({accountIndex:P(),mint:Z(),owner:le(Z()),programId:le(Z()),uiTokenAmount:Sc}),cm=j({writable:te(Ge),readonly:te(Ge)}),Wo=j({err:Pr,fee:P(),innerInstructions:le(ne(te(j({index:P(),instructions:te(j({accounts:te(P()),data:Z(),programIdIndex:P()}))})))),preBalances:te(P()),postBalances:te(P()),logMessages:le(ne(te(Z()))),preTokenBalances:le(ne(te(eo))),postTokenBalances:le(ne(te(eo))),loadedAddresses:le(cm),computeUnitsConsumed:le(P())}),Ol=j({err:Pr,fee:P(),innerInstructions:le(ne(te(j({index:P(),instructions:te(om)})))),preBalances:te(P()),postBalances:te(P()),logMessages:le(ne(te(Z()))),preTokenBalances:le(ne(te(eo))),postTokenBalances:le(ne(te(eo))),loadedAddresses:le(cm),computeUnitsConsumed:le(P())}),gs=Kt([Ve(0),Ve("legacy")]),Lr=j({pubkey:Z(),lamports:P(),postBalance:ne(P()),rewardType:ne(Z()),commission:le(ne(P()))}),r6=ye(ne(j({blockhash:Z(),previousBlockhash:Z(),parentSlot:P(),transactions:te(j({transaction:Ll,meta:ne(Wo),version:le(gs)})),rewards:le(te(Lr)),blockTime:ne(P()),blockHeight:ne(P())}))),s6=ye(ne(j({blockhash:Z(),previousBlockhash:Z(),parentSlot:P(),rewards:le(te(Lr)),blockTime:ne(P()),blockHeight:ne(P())}))),i6=ye(ne(j({blockhash:Z(),previousBlockhash:Z(),parentSlot:P(),transactions:te(j({transaction:rm,meta:ne(Wo),version:le(gs)})),rewards:le(te(Lr)),blockTime:ne(P()),blockHeight:ne(P())}))),o6=ye(ne(j({blockhash:Z(),previousBlockhash:Z(),parentSlot:P(),transactions:te(j({transaction:am,meta:ne(Ol),version:le(gs)})),rewards:le(te(Lr)),blockTime:ne(P()),blockHeight:ne(P())}))),a6=ye(ne(j({blockhash:Z(),previousBlockhash:Z(),parentSlot:P(),transactions:te(j({transaction:rm,meta:ne(Ol),version:le(gs)})),rewards:le(te(Lr)),blockTime:ne(P()),blockHeight:ne(P())}))),c6=ye(ne(j({blockhash:Z(),previousBlockhash:Z(),parentSlot:P(),rewards:le(te(Lr)),blockTime:ne(P()),blockHeight:ne(P())}))),l6=ye(ne(j({blockhash:Z(),previousBlockhash:Z(),parentSlot:P(),transactions:te(j({transaction:Ll,meta:ne(Wo)})),rewards:le(te(Lr)),blockTime:ne(P())}))),Eu=ye(ne(j({blockhash:Z(),previousBlockhash:Z(),parentSlot:P(),signatures:te(Z()),blockTime:ne(P())}))),Ma=ye(ne(j({slot:P(),meta:ne(Wo),blockTime:le(ne(P())),transaction:Ll,version:le(gs)}))),gi=ye(ne(j({slot:P(),transaction:am,meta:ne(Ol),blockTime:le(ne(P())),version:le(gs)}))),d6=Qe(j({blockhash:Z(),lastValidBlockHeight:P()})),u6=Qe(Un()),f6=j({slot:P(),numTransactions:P(),numSlots:P(),samplePeriodSecs:P()}),h6=ye(te(f6)),m6=Qe(ne(j({feeCalculator:j({lamportsPerSignature:P()})}))),b6=ye(Z()),p6=ye(Z()),g6=j({err:Pr,logs:te(Z()),signature:Z()}),y6=j({result:Ro(g6),subscription:P()}),A6={"solana-client":"js/1.0.0-maintenance"};class lm{constructor(e,t){this._commitment=void 0,this._confirmTransactionInitialTimeout=void 0,this._rpcEndpoint=void 0,this._rpcWsEndpoint=void 0,this._rpcClient=void 0,this._rpcRequest=void 0,this._rpcBatchRequest=void 0,this._rpcWebSocket=void 0,this._rpcWebSocketConnected=!1,this._rpcWebSocketHeartbeat=null,this._rpcWebSocketIdleTimeout=null,this._rpcWebSocketGeneration=0,this._disableBlockhashCaching=!1,this._pollingBlockhash=!1,this._blockhashInfo={latestBlockhash:null,lastFetch:0,transactionSignatures:[],simulatedSignatures:[]},this._nextClientSubscriptionId=0,this._subscriptionDisposeFunctionsByClientSubscriptionId={},this._subscriptionHashByClientSubscriptionId={},this._subscriptionStateChangeCallbacksByHash={},this._subscriptionCallbacksByServerSubscriptionId={},this._subscriptionsByHash={},this._subscriptionsAutoDisposedByRpc=new Set,this.getBlockHeight=(()=>{const h={};return async b=>{const{commitment:w,config:D}=Le(b),E=this._buildArgs([],w,void 0,D),g=pu(E);return h[g]=h[g]??(async()=>{try{const S=await this._rpcRequest("getBlockHeight",E),T=Q(S,ye(P()));if("error"in T)throw new oe(T.error,"failed to get block height information");return T.result}finally{delete h[g]}})(),await h[g]}})();let r,s,i,o,a,c;t&&typeof t=="string"?this._commitment=t:t&&(this._commitment=t.commitment,this._confirmTransactionInitialTimeout=t.confirmTransactionInitialTimeout,r=t.wsEndpoint,s=t.httpHeaders,i=t.fetch,o=t.fetchMiddleware,a=t.disableRetryOnRateLimit,c=t.httpAgent),this._rpcEndpoint=s4(e),this._rpcWsEndpoint=r||r4(e),this._rpcClient=A4(e,s,i,o,a,c),this._rpcRequest=w4(this._rpcClient),this._rpcBatchRequest=E4(this._rpcClient),this._rpcWebSocket=new Q3(this._rpcWsEndpoint,{autoconnect:!1,max_reconnects:1/0}),this._rpcWebSocket.on("open",this._wsOnOpen.bind(this)),this._rpcWebSocket.on("error",this._wsOnError.bind(this)),this._rpcWebSocket.on("close",this._wsOnClose.bind(this)),this._rpcWebSocket.on("accountNotification",this._wsOnAccountNotification.bind(this)),this._rpcWebSocket.on("programNotification",this._wsOnProgramAccountNotification.bind(this)),this._rpcWebSocket.on("slotNotification",this._wsOnSlotNotification.bind(this)),this._rpcWebSocket.on("slotsUpdatesNotification",this._wsOnSlotUpdatesNotification.bind(this)),this._rpcWebSocket.on("signatureNotification",this._wsOnSignatureNotification.bind(this)),this._rpcWebSocket.on("rootNotification",this._wsOnRootNotification.bind(this)),this._rpcWebSocket.on("logsNotification",this._wsOnLogsNotification.bind(this))}get commitment(){return this._commitment}get rpcEndpoint(){return this._rpcEndpoint}async getBalanceAndContext(e,t){const{commitment:r,config:s}=Le(t),i=this._buildArgs([e.toBase58()],r,void 0,s),o=await this._rpcRequest("getBalance",i),a=Q(o,Qe(P()));if("error"in a)throw new oe(a.error,`failed to get balance for ${e.toBase58()}`);return a.result}async getBalance(e,t){return await this.getBalanceAndContext(e,t).then(r=>r.value).catch(r=>{throw new Error("failed to get balance of account "+e.toBase58()+": "+r)})}async getBlockTime(e){const t=await this._rpcRequest("getBlockTime",[e]),r=Q(t,ye(ne(P())));if("error"in r)throw new oe(r.error,`failed to get block time for slot ${e}`);return r.result}async getMinimumLedgerSlot(){const e=await this._rpcRequest("minimumLedgerSlot",[]),t=Q(e,ye(P()));if("error"in t)throw new oe(t.error,"failed to get minimum ledger slot");return t.result}async getFirstAvailableBlock(){const e=await this._rpcRequest("getFirstAvailableBlock",[]),t=Q(e,k4);if("error"in t)throw new oe(t.error,"failed to get first available block");return t.result}async getSupply(e){let t={};typeof e=="string"?t={commitment:e}:e?t={...e,commitment:e&&e.commitment||this.commitment}:t={commitment:this.commitment};const r=await this._rpcRequest("getSupply",[t]),s=Q(r,F4);if("error"in s)throw new oe(s.error,"failed to get supply");return s.result}async getTokenSupply(e,t){const r=this._buildArgs([e.toBase58()],t),s=await this._rpcRequest("getTokenSupply",r),i=Q(s,Qe(Sc));if("error"in i)throw new oe(i.error,"failed to get token supply");return i.result}async getTokenAccountBalance(e,t){const r=this._buildArgs([e.toBase58()],t),s=await this._rpcRequest("getTokenAccountBalance",r),i=Q(s,Qe(Sc));if("error"in i)throw new oe(i.error,"failed to get token account balance");return i.result}async getTokenAccountsByOwner(e,t,r){const{commitment:s,config:i}=Le(r);let o=[e.toBase58()];"mint"in t?o.push({mint:t.mint.toBase58()}):o.push({programId:t.programId.toBase58()});const a=this._buildArgs(o,s,"base64",i),c=await this._rpcRequest("getTokenAccountsByOwner",a),h=Q(c,I4);if("error"in h)throw new oe(h.error,`failed to get token accounts owned by account ${e.toBase58()}`);return h.result}async getParsedTokenAccountsByOwner(e,t,r){let s=[e.toBase58()];"mint"in t?s.push({mint:t.mint.toBase58()}):s.push({programId:t.programId.toBase58()});const i=this._buildArgs(s,r,"jsonParsed"),o=await this._rpcRequest("getTokenAccountsByOwner",i),a=Q(o,U4);if("error"in a)throw new oe(a.error,`failed to get token accounts owned by account ${e.toBase58()}`);return a.result}async getLargestAccounts(e){const t={...e,commitment:e&&e.commitment||this.commitment},r=t.filter||t.commitment?[t]:[],s=await this._rpcRequest("getLargestAccounts",r),i=Q(s,_4);if("error"in i)throw new oe(i.error,"failed to get largest accounts");return i.result}async getTokenLargestAccounts(e,t){const r=this._buildArgs([e.toBase58()],t),s=await this._rpcRequest("getTokenLargestAccounts",r),i=Q(s,T4);if("error"in i)throw new oe(i.error,"failed to get token largest accounts");return i.result}async getAccountInfoAndContext(e,t){const{commitment:r,config:s}=Le(t),i=this._buildArgs([e.toBase58()],r,"base64",s),o=await this._rpcRequest("getAccountInfo",i),a=Q(o,Qe(ne(Gs)));if("error"in a)throw new oe(a.error,`failed to get info about account ${e.toBase58()}`);return a.result}async getParsedAccountInfo(e,t){const{commitment:r,config:s}=Le(t),i=this._buildArgs([e.toBase58()],r,"jsonParsed",s),o=await this._rpcRequest("getAccountInfo",i),a=Q(o,Qe(ne(vc)));if("error"in a)throw new oe(a.error,`failed to get info about account ${e.toBase58()}`);return a.result}async getAccountInfo(e,t){try{return(await this.getAccountInfoAndContext(e,t)).value}catch(r){throw new Error("failed to get info about account "+e.toBase58()+": "+r)}}async getMultipleParsedAccounts(e,t){const{commitment:r,config:s}=Le(t),i=e.map(h=>h.toBase58()),o=this._buildArgs([i],r,"jsonParsed",s),a=await this._rpcRequest("getMultipleAccounts",o),c=Q(a,Qe(te(ne(vc))));if("error"in c)throw new oe(c.error,`failed to get info for accounts ${i}`);return c.result}async getMultipleAccountsInfoAndContext(e,t){const{commitment:r,config:s}=Le(t),i=e.map(h=>h.toBase58()),o=this._buildArgs([i],r,"base64",s),a=await this._rpcRequest("getMultipleAccounts",o),c=Q(a,Qe(te(ne(Gs))));if("error"in c)throw new oe(c.error,`failed to get info for accounts ${i}`);return c.result}async getMultipleAccountsInfo(e,t){return(await this.getMultipleAccountsInfoAndContext(e,t)).value}async getStakeActivation(e,t,r){const{commitment:s,config:i}=Le(t),o=this._buildArgs([e.toBase58()],s,void 0,{...i,epoch:r??(i==null?void 0:i.epoch)}),a=await this._rpcRequest("getStakeActivation",o),c=Q(a,ye(P4));if("error"in c)throw new oe(c.error,`failed to get Stake Activation ${e.toBase58()}`);return c.result}async getProgramAccounts(e,t){const{commitment:r,config:s}=Le(t),{encoding:i,...o}=s||{},a=this._buildArgs([e.toBase58()],r,i||"base64",{...o,...o.filters?{filters:yu(o.filters)}:null}),c=await this._rpcRequest("getProgramAccounts",a),h=te(M4),b=o.withContext===!0?Q(c,Qe(h)):Q(c,ye(h));if("error"in b)throw new oe(b.error,`failed to get accounts owned by program ${e.toBase58()}`);return b.result}async getParsedProgramAccounts(e,t){const{commitment:r,config:s}=Le(t),i=this._buildArgs([e.toBase58()],r,"jsonParsed",s),o=await this._rpcRequest("getProgramAccounts",i),a=Q(o,ye(te(W4)));if("error"in a)throw new oe(a.error,`failed to get accounts owned by program ${e.toBase58()}`);return a.result}async confirmTransaction(e,t){var i;let r;if(typeof e=="string")r=e;else{const o=e;if((i=o.abortSignal)!=null&&i.aborted)return Promise.reject(o.abortSignal.reason);r=o.signature}let s;try{s=St.decode(r)}catch{throw new Error("signature must be base58 encoded: "+r)}return Fe(s.length===64,"signature has invalid length"),typeof e=="string"?await this.confirmTransactionUsingLegacyTimeoutStrategy({commitment:t||this.commitment,signature:r}):"lastValidBlockHeight"in e?await this.confirmTransactionUsingBlockHeightExceedanceStrategy({commitment:t||this.commitment,strategy:e}):await this.confirmTransactionUsingDurableNonceStrategy({commitment:t||this.commitment,strategy:e})}getCancellationPromise(e){return new Promise((t,r)=>{e!=null&&(e.aborted?r(e.reason):e.addEventListener("abort",()=>{r(e.reason)}))})}getTransactionConfirmationPromise({commitment:e,signature:t}){let r,s,i=!1;const o=new Promise((c,h)=>{try{r=this.onSignature(t,(w,D)=>{r=void 0;const E={context:D,value:w};c({__type:On.PROCESSED,response:E})},e);const b=new Promise(w=>{r==null?w():s=this._onSubscriptionStateChange(r,D=>{D==="subscribed"&&w()})});(async()=>{if(await b,i)return;const w=await this.getSignatureStatus(t);if(i||w==null)return;const{context:D,value:E}=w;if(E!=null)if(E!=null&&E.err)h(E.err);else{switch(e){case"confirmed":case"single":case"singleGossip":{if(E.confirmationStatus==="processed")return;break}case"finalized":case"max":case"root":{if(E.confirmationStatus==="processed"||E.confirmationStatus==="confirmed")return;break}case"processed":case"recent":}i=!0,c({__type:On.PROCESSED,response:{context:D,value:E}})}})()}catch(b){h(b)}});return{abortConfirmation:()=>{s&&(s(),s=void 0),r!=null&&(this.removeSignatureListener(r),r=void 0)},confirmationPromise:o}}async confirmTransactionUsingBlockHeightExceedanceStrategy({commitment:e,strategy:{abortSignal:t,lastValidBlockHeight:r,signature:s}}){let i=!1;const o=new Promise(w=>{const D=async()=>{try{return await this.getBlockHeight(e)}catch{return-1}};(async()=>{let E=await D();if(!i){for(;E<=r;)if(await br(1e3),i||(E=await D(),i))return;w({__type:On.BLOCKHEIGHT_EXCEEDED})}})()}),{abortConfirmation:a,confirmationPromise:c}=this.getTransactionConfirmationPromise({commitment:e,signature:s}),h=this.getCancellationPromise(t);let b;try{const w=await Promise.race([h,c,o]);if(w.__type===On.PROCESSED)b=w.response;else throw new To(s)}finally{i=!0,a()}return b}async confirmTransactionUsingDurableNonceStrategy({commitment:e,strategy:{abortSignal:t,minContextSlot:r,nonceAccountPubkey:s,nonceValue:i,signature:o}}){let a=!1;const c=new Promise(E=>{let g=i,S=null;const T=async()=>{try{const{context:M,value:N}=await this.getNonceAndContext(s,{commitment:e,minContextSlot:r});return S=M.slot,N==null?void 0:N.nonce}catch{return g}};(async()=>{if(g=await T(),!a)for(;;){if(i!==g){E({__type:On.NONCE_INVALID,slotInWhichNonceDidAdvance:S});return}if(await br(2e3),a||(g=await T(),a))return}})()}),{abortConfirmation:h,confirmationPromise:b}=this.getTransactionConfirmationPromise({commitment:e,signature:o}),w=this.getCancellationPromise(t);let D;try{const E=await Promise.race([w,b,c]);if(E.__type===On.PROCESSED)D=E.response;else{let g;for(;;){const S=await this.getSignatureStatus(o);if(S==null)break;if(S.context.slot<(E.slotInWhichNonceDidAdvance??r)){await br(400);continue}g=S;break}if(g!=null&&g.value){const S=e||"finalized",{confirmationStatus:T}=g.value;switch(S){case"processed":case"recent":if(T!=="processed"&&T!=="confirmed"&&T!=="finalized")throw new Kr(o);break;case"confirmed":case"single":case"singleGossip":if(T!=="confirmed"&&T!=="finalized")throw new Kr(o);break;case"finalized":case"max":case"root":if(T!=="finalized")throw new Kr(o);break;default:}D={context:g.context,value:{err:g.value.err}}}else throw new Kr(o)}}finally{a=!0,h()}return D}async confirmTransactionUsingLegacyTimeoutStrategy({commitment:e,signature:t}){let r;const s=new Promise(c=>{let h=this._confirmTransactionInitialTimeout||6e4;switch(e){case"processed":case"recent":case"single":case"confirmed":case"singleGossip":{h=this._confirmTransactionInitialTimeout||3e4;break}}r=setTimeout(()=>c({__type:On.TIMED_OUT,timeoutMs:h}),h)}),{abortConfirmation:i,confirmationPromise:o}=this.getTransactionConfirmationPromise({commitment:e,signature:t});let a;try{const c=await Promise.race([o,s]);if(c.__type===On.PROCESSED)a=c.response;else throw new Rl(t,c.timeoutMs/1e3)}finally{clearTimeout(r),i()}return a}async getClusterNodes(){const e=await this._rpcRequest("getClusterNodes",[]),t=Q(e,ye(te(Y4)));if("error"in t)throw new oe(t.error,"failed to get cluster nodes");return t.result}async getVoteAccounts(e){const t=this._buildArgs([],e),r=await this._rpcRequest("getVoteAccounts",t),s=Q(r,X4);if("error"in s)throw new oe(s.error,"failed to get vote accounts");return s.result}async getSlot(e){const{commitment:t,config:r}=Le(e),s=this._buildArgs([],t,void 0,r),i=await this._rpcRequest("getSlot",s),o=Q(i,ye(P()));if("error"in o)throw new oe(o.error,"failed to get slot");return o.result}async getSlotLeader(e){const{commitment:t,config:r}=Le(e),s=this._buildArgs([],t,void 0,r),i=await this._rpcRequest("getSlotLeader",s),o=Q(i,ye(Z()));if("error"in o)throw new oe(o.error,"failed to get slot leader");return o.result}async getSlotLeaders(e,t){const r=[e,t],s=await this._rpcRequest("getSlotLeaders",r),i=Q(s,ye(te(Ge)));if("error"in i)throw new oe(i.error,"failed to get slot leaders");return i.result}async getSignatureStatus(e,t){const{context:r,value:s}=await this.getSignatureStatuses([e],t);Fe(s.length===1);const i=s[0];return{context:r,value:i}}async getSignatureStatuses(e,t){const r=[e];t&&r.push(t);const s=await this._rpcRequest("getSignatureStatuses",r),i=Q(s,Q4);if("error"in i)throw new oe(i.error,"failed to get signature status");return i.result}async getTransactionCount(e){const{commitment:t,config:r}=Le(e),s=this._buildArgs([],t,void 0,r),i=await this._rpcRequest("getTransactionCount",s),o=Q(i,ye(P()));if("error"in o)throw new oe(o.error,"failed to get transaction count");return o.result}async getTotalSupply(e){return(await this.getSupply({commitment:e,excludeNonCirculatingAccountsList:!0})).value.total}async getInflationGovernor(e){const t=this._buildArgs([],e),r=await this._rpcRequest("getInflationGovernor",t),s=Q(r,B4);if("error"in s)throw new oe(s.error,"failed to get inflation");return s.result}async getInflationReward(e,t,r){const{commitment:s,config:i}=Le(r),o=this._buildArgs([e.map(h=>h.toBase58())],s,void 0,{...i,epoch:t??(i==null?void 0:i.epoch)}),a=await this._rpcRequest("getInflationReward",o),c=Q(a,a4);if("error"in c)throw new oe(c.error,"failed to get inflation reward");return c.result}async getInflationRate(){const e=await this._rpcRequest("getInflationRate",[]),t=Q(e,x4);if("error"in t)throw new oe(t.error,"failed to get inflation rate");return t.result}async getEpochInfo(e){const{commitment:t,config:r}=Le(e),s=this._buildArgs([],t,void 0,r),i=await this._rpcRequest("getEpochInfo",s),o=Q(i,S4);if("error"in o)throw new oe(o.error,"failed to get epoch info");return o.result}async getEpochSchedule(){const e=await this._rpcRequest("getEpochSchedule",[]),t=Q(e,D4);if("error"in t)throw new oe(t.error,"failed to get epoch schedule");const r=t.result;return new Zh(r.slotsPerEpoch,r.leaderScheduleSlotOffset,r.warmup,r.firstNormalEpoch,r.firstNormalSlot)}async getLeaderSchedule(){const e=await this._rpcRequest("getLeaderSchedule",[]),t=Q(e,v4);if("error"in t)throw new oe(t.error,"failed to get leader schedule");return t.result}async getMinimumBalanceForRentExemption(e,t){const r=this._buildArgs([e],t),s=await this._rpcRequest("getMinimumBalanceForRentExemption",r),i=Q(s,e6);return"error"in i?(console.warn("Unable to fetch minimum balance for rent exemption"),0):i.result}async getRecentBlockhashAndContext(e){const{context:t,value:{blockhash:r}}=await this.getLatestBlockhashAndContext(e);return{context:t,value:{blockhash:r,feeCalculator:{get lamportsPerSignature(){throw new Error("The capability to fetch `lamportsPerSignature` using the `getRecentBlockhash` API is no longer offered by the network. Use the `getFeeForMessage` API to obtain the fee for a given message.")},toJSON(){return{}}}}}}async getRecentPerformanceSamples(e){const t=await this._rpcRequest("getRecentPerformanceSamples",e?[e]:[]),r=Q(t,h6);if("error"in r)throw new oe(r.error,"failed to get recent performance samples");return r.result}async getFeeCalculatorForBlockhash(e,t){const r=this._buildArgs([e],t),s=await this._rpcRequest("getFeeCalculatorForBlockhash",r),i=Q(s,m6);if("error"in i)throw new oe(i.error,"failed to get fee calculator");const{context:o,value:a}=i.result;return{context:o,value:a!==null?a.feeCalculator:null}}async getFeeForMessage(e,t){const r=Ae(e.serialize()).toString("base64"),s=this._buildArgs([r],t),i=await this._rpcRequest("getFeeForMessage",s),o=Q(i,Qe(ne(P())));if("error"in o)throw new oe(o.error,"failed to get fee for message");if(o.result===null)throw new Error("invalid blockhash");return o.result}async getRecentPrioritizationFees(e){var o;const t=(o=e==null?void 0:e.lockedWritableAccounts)==null?void 0:o.map(a=>a.toBase58()),r=t!=null&&t.length?[t]:[],s=await this._rpcRequest("getRecentPrioritizationFees",r),i=Q(s,C4);if("error"in i)throw new oe(i.error,"failed to get recent prioritization fees");return i.result}async getRecentBlockhash(e){try{return(await this.getRecentBlockhashAndContext(e)).value}catch(t){throw new Error("failed to get recent blockhash: "+t)}}async getLatestBlockhash(e){try{return(await this.getLatestBlockhashAndContext(e)).value}catch(t){throw new Error("failed to get recent blockhash: "+t)}}async getLatestBlockhashAndContext(e){const{commitment:t,config:r}=Le(e),s=this._buildArgs([],t,void 0,r),i=await this._rpcRequest("getLatestBlockhash",s),o=Q(i,d6);if("error"in o)throw new oe(o.error,"failed to get latest blockhash");return o.result}async isBlockhashValid(e,t){const{commitment:r,config:s}=Le(t),i=this._buildArgs([e],r,void 0,s),o=await this._rpcRequest("isBlockhashValid",i),a=Q(o,u6);if("error"in a)throw new oe(a.error,"failed to determine if the blockhash `"+e+"`is valid");return a.result}async getVersion(){const e=await this._rpcRequest("getVersion",[]),t=Q(e,ye(b4));if("error"in t)throw new oe(t.error,"failed to get version");return t.result}async getGenesisHash(){const e=await this._rpcRequest("getGenesisHash",[]),t=Q(e,ye(Z()));if("error"in t)throw new oe(t.error,"failed to get genesis hash");return t.result}async getBlock(e,t){const{commitment:r,config:s}=Le(t),i=this._buildArgsAtLeastConfirmed([e],r,void 0,s),o=await this._rpcRequest("getBlock",i);try{switch(s==null?void 0:s.transactionDetails){case"accounts":{const a=Q(o,i6);if("error"in a)throw a.error;return a.result}case"none":{const a=Q(o,s6);if("error"in a)throw a.error;return a.result}default:{const a=Q(o,r6);if("error"in a)throw a.error;const{result:c}=a;return c?{...c,transactions:c.transactions.map(({transaction:h,meta:b,version:w})=>({meta:b,transaction:{...h,message:_a(w,h.message)},version:w}))}:null}}}catch(a){throw new oe(a,"failed to get confirmed block")}}async getParsedBlock(e,t){const{commitment:r,config:s}=Le(t),i=this._buildArgsAtLeastConfirmed([e],r,"jsonParsed",s),o=await this._rpcRequest("getBlock",i);try{switch(s==null?void 0:s.transactionDetails){case"accounts":{const a=Q(o,a6);if("error"in a)throw a.error;return a.result}case"none":{const a=Q(o,c6);if("error"in a)throw a.error;return a.result}default:{const a=Q(o,o6);if("error"in a)throw a.error;return a.result}}}catch(a){throw new oe(a,"failed to get block")}}async getBlockProduction(e){let t,r;if(typeof e=="string")r=e;else if(e){const{commitment:a,...c}=e;r=a,t=c}const s=this._buildArgs([],r,"base64",t),i=await this._rpcRequest("getBlockProduction",s),o=Q(i,y4);if("error"in o)throw new oe(o.error,"failed to get block production information");return o.result}async getTransaction(e,t){const{commitment:r,config:s}=Le(t),i=this._buildArgsAtLeastConfirmed([e],r,void 0,s),o=await this._rpcRequest("getTransaction",i),a=Q(o,Ma);if("error"in a)throw new oe(a.error,"failed to get transaction");const c=a.result;return c&&{...c,transaction:{...c.transaction,message:_a(c.version,c.transaction.message)}}}async getParsedTransaction(e,t){const{commitment:r,config:s}=Le(t),i=this._buildArgsAtLeastConfirmed([e],r,"jsonParsed",s),o=await this._rpcRequest("getTransaction",i),a=Q(o,gi);if("error"in a)throw new oe(a.error,"failed to get transaction");return a.result}async getParsedTransactions(e,t){const{commitment:r,config:s}=Le(t),i=e.map(c=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([c],r,"jsonParsed",s)}));return(await this._rpcBatchRequest(i)).map(c=>{const h=Q(c,gi);if("error"in h)throw new oe(h.error,"failed to get transactions");return h.result})}async getTransactions(e,t){const{commitment:r,config:s}=Le(t),i=e.map(c=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([c],r,void 0,s)}));return(await this._rpcBatchRequest(i)).map(c=>{const h=Q(c,Ma);if("error"in h)throw new oe(h.error,"failed to get transactions");const b=h.result;return b&&{...b,transaction:{...b.transaction,message:_a(b.version,b.transaction.message)}}})}async getConfirmedBlock(e,t){const r=this._buildArgsAtLeastConfirmed([e],t),s=await this._rpcRequest("getBlock",r),i=Q(s,l6);if("error"in i)throw new oe(i.error,"failed to get confirmed block");const o=i.result;if(!o)throw new Error("Confirmed block "+e+" not found");const a={...o,transactions:o.transactions.map(({transaction:c,meta:h})=>{const b=new cn(c.message);return{meta:h,transaction:{...c,message:b}}})};return{...a,transactions:a.transactions.map(({transaction:c,meta:h})=>({meta:h,transaction:ke.populate(c.message,c.signatures)}))}}async getBlocks(e,t,r){const s=this._buildArgsAtLeastConfirmed(t!==void 0?[e,t]:[e],r),i=await this._rpcRequest("getBlocks",s),o=Q(i,ye(te(P())));if("error"in o)throw new oe(o.error,"failed to get blocks");return o.result}async getBlockSignatures(e,t){const r=this._buildArgsAtLeastConfirmed([e],t,void 0,{transactionDetails:"signatures",rewards:!1}),s=await this._rpcRequest("getBlock",r),i=Q(s,Eu);if("error"in i)throw new oe(i.error,"failed to get block");const o=i.result;if(!o)throw new Error("Block "+e+" not found");return o}async getConfirmedBlockSignatures(e,t){const r=this._buildArgsAtLeastConfirmed([e],t,void 0,{transactionDetails:"signatures",rewards:!1}),s=await this._rpcRequest("getBlock",r),i=Q(s,Eu);if("error"in i)throw new oe(i.error,"failed to get confirmed block");const o=i.result;if(!o)throw new Error("Confirmed block "+e+" not found");return o}async getConfirmedTransaction(e,t){const r=this._buildArgsAtLeastConfirmed([e],t),s=await this._rpcRequest("getTransaction",r),i=Q(s,Ma);if("error"in i)throw new oe(i.error,"failed to get transaction");const o=i.result;if(!o)return o;const a=new cn(o.transaction.message),c=o.transaction.signatures;return{...o,transaction:ke.populate(a,c)}}async getParsedConfirmedTransaction(e,t){const r=this._buildArgsAtLeastConfirmed([e],t,"jsonParsed"),s=await this._rpcRequest("getTransaction",r),i=Q(s,gi);if("error"in i)throw new oe(i.error,"failed to get confirmed transaction");return i.result}async getParsedConfirmedTransactions(e,t){const r=e.map(o=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([o],t,"jsonParsed")}));return(await this._rpcBatchRequest(r)).map(o=>{const a=Q(o,gi);if("error"in a)throw new oe(a.error,"failed to get confirmed transactions");return a.result})}async getConfirmedSignaturesForAddress(e,t,r){let s={},i=await this.getFirstAvailableBlock();for(;!("until"in s)&&(t--,!(t<=0||t<i));)try{const c=await this.getConfirmedBlockSignatures(t,"finalized");c.signatures.length>0&&(s.until=c.signatures[c.signatures.length-1].toString())}catch(c){if(c instanceof Error&&c.message.includes("skipped"))continue;throw c}let o=await this.getSlot("finalized");for(;!("before"in s)&&(r++,!(r>o));)try{const c=await this.getConfirmedBlockSignatures(r);c.signatures.length>0&&(s.before=c.signatures[c.signatures.length-1].toString())}catch(c){if(c instanceof Error&&c.message.includes("skipped"))continue;throw c}return(await this.getConfirmedSignaturesForAddress2(e,s)).map(c=>c.signature)}async getConfirmedSignaturesForAddress2(e,t,r){const s=this._buildArgsAtLeastConfirmed([e.toBase58()],r,void 0,t),i=await this._rpcRequest("getConfirmedSignaturesForAddress2",s),o=Q(i,L4);if("error"in o)throw new oe(o.error,"failed to get confirmed signatures for address");return o.result}async getSignaturesForAddress(e,t,r){const s=this._buildArgsAtLeastConfirmed([e.toBase58()],r,void 0,t),i=await this._rpcRequest("getSignaturesForAddress",s),o=Q(i,O4);if("error"in o)throw new oe(o.error,"failed to get signatures for address");return o.result}async getAddressLookupTable(e,t){const{context:r,value:s}=await this.getAccountInfoAndContext(e,t);let i=null;return s!==null&&(i=new Qi({key:e,state:Qi.deserialize(s.data)})),{context:r,value:i}}async getNonceAndContext(e,t){const{context:r,value:s}=await this.getAccountInfoAndContext(e,t);let i=null;return s!==null&&(i=Mo.fromAccountData(s.data)),{context:r,value:i}}async getNonce(e,t){return await this.getNonceAndContext(e,t).then(r=>r.value).catch(r=>{throw new Error("failed to get nonce for account "+e.toBase58()+": "+r)})}async requestAirdrop(e,t){const r=await this._rpcRequest("requestAirdrop",[e.toBase58(),t]),s=Q(r,b6);if("error"in s)throw new oe(s.error,`airdrop to ${e.toBase58()} failed`);return s.result}async _blockhashWithExpiryBlockHeight(e){if(!e){for(;this._pollingBlockhash;)await br(100);const r=Date.now()-this._blockhashInfo.lastFetch>=Qh;if(this._blockhashInfo.latestBlockhash!==null&&!r)return this._blockhashInfo.latestBlockhash}return await this._pollNewBlockhash()}async _pollNewBlockhash(){this._pollingBlockhash=!0;try{const e=Date.now(),t=this._blockhashInfo.latestBlockhash,r=t?t.blockhash:null;for(let s=0;s<50;s++){const i=await this.getLatestBlockhash("finalized");if(r!==i.blockhash)return this._blockhashInfo={latestBlockhash:i,lastFetch:Date.now(),transactionSignatures:[],simulatedSignatures:[]},i;await br(Vh/2)}throw new Error(`Unable to obtain a new blockhash after ${Date.now()-e}ms`)}finally{this._pollingBlockhash=!1}}async getStakeMinimumDelegation(e){const{commitment:t,config:r}=Le(e),s=this._buildArgs([],t,"base64",r),i=await this._rpcRequest("getStakeMinimumDelegation",s),o=Q(i,Qe(P()));if("error"in o)throw new oe(o.error,"failed to get stake minimum delegation");return o.result}async simulateTransaction(e,t,r){if("message"in e){const S=e.serialize(),T=ae.Buffer.from(S).toString("base64");if(Array.isArray(t)||r!==void 0)throw new Error("Invalid arguments");const M=t||{};M.encoding="base64","commitment"in M||(M.commitment=this.commitment),t&&typeof t=="object"&&"innerInstructions"in t&&(M.innerInstructions=t.innerInstructions);const N=[T,M],_=await this._rpcRequest("simulateTransaction",N),U=Q(_,Au);if("error"in U)throw new Error("failed to simulate transaction: "+U.error.message);return U.result}let s;if(e instanceof ke){let g=e;s=new ke,s.feePayer=g.feePayer,s.instructions=e.instructions,s.nonceInfo=g.nonceInfo,s.signatures=g.signatures}else s=ke.populate(e),s._message=s._json=void 0;if(t!==void 0&&!Array.isArray(t))throw new Error("Invalid arguments");const i=t;if(s.nonceInfo&&i)s.sign(...i);else{let g=this._disableBlockhashCaching;for(;;){const S=await this._blockhashWithExpiryBlockHeight(g);if(s.lastValidBlockHeight=S.lastValidBlockHeight,s.recentBlockhash=S.blockhash,!i)break;if(s.sign(...i),!s.signature)throw new Error("!signature");const T=s.signature.toString("base64");if(!this._blockhashInfo.simulatedSignatures.includes(T)&&!this._blockhashInfo.transactionSignatures.includes(T)){this._blockhashInfo.simulatedSignatures.push(T);break}else g=!0}}const o=s._compile(),a=o.serialize(),h=s._serialize(a).toString("base64"),b={encoding:"base64",commitment:this.commitment};if(r){const g=(Array.isArray(r)?r:o.nonProgramIds()).map(S=>S.toBase58());b.accounts={encoding:"base64",addresses:g}}i&&(b.sigVerify=!0),t&&typeof t=="object"&&"innerInstructions"in t&&(b.innerInstructions=t.innerInstructions);const w=[h,b],D=await this._rpcRequest("simulateTransaction",w),E=Q(D,Au);if("error"in E){let g;if("data"in E.error&&(g=E.error.data.logs,g&&Array.isArray(g))){const S=`
|
|
15
|
-
`,T=S+g.join(S);console.error(E.error.message,T)}throw new Qr({action:"simulate",signature:"",transactionMessage:E.error.message,logs:g})}return E.result}async sendTransaction(e,t,r){if("version"in e){if(t&&Array.isArray(t))throw new Error("Invalid arguments");const o=e.serialize();return await this.sendRawTransaction(o,t)}if(t===void 0||!Array.isArray(t))throw new Error("Invalid arguments");const s=t;if(e.nonceInfo)e.sign(...s);else{let o=this._disableBlockhashCaching;for(;;){const a=await this._blockhashWithExpiryBlockHeight(o);if(e.lastValidBlockHeight=a.lastValidBlockHeight,e.recentBlockhash=a.blockhash,e.sign(...s),!e.signature)throw new Error("!signature");const c=e.signature.toString("base64");if(this._blockhashInfo.transactionSignatures.includes(c))o=!0;else{this._blockhashInfo.transactionSignatures.push(c);break}}}const i=e.serialize();return await this.sendRawTransaction(i,r)}async sendRawTransaction(e,t){const r=Ae(e).toString("base64");return await this.sendEncodedTransaction(r,t)}async sendEncodedTransaction(e,t){const r={encoding:"base64"},s=t&&t.skipPreflight,i=s===!0?"processed":t&&t.preflightCommitment||this.commitment;t&&t.maxRetries!=null&&(r.maxRetries=t.maxRetries),t&&t.minContextSlot!=null&&(r.minContextSlot=t.minContextSlot),s&&(r.skipPreflight=s),i&&(r.preflightCommitment=i);const o=[e,r],a=await this._rpcRequest("sendTransaction",o),c=Q(a,p6);if("error"in c){let h;throw"data"in c.error&&(h=c.error.data.logs),new Qr({action:s?"send":"simulate",signature:"",transactionMessage:c.error.message,logs:h})}return c.result}_wsOnOpen(){this._rpcWebSocketConnected=!0,this._rpcWebSocketHeartbeat=setInterval(()=>{(async()=>{try{await this._rpcWebSocket.notify("ping")}catch{}})()},5e3),this._updateSubscriptions()}_wsOnError(e){this._rpcWebSocketConnected=!1,console.error("ws error:",e.message)}_wsOnClose(e){if(this._rpcWebSocketConnected=!1,this._rpcWebSocketGeneration=(this._rpcWebSocketGeneration+1)%Number.MAX_SAFE_INTEGER,this._rpcWebSocketIdleTimeout&&(clearTimeout(this._rpcWebSocketIdleTimeout),this._rpcWebSocketIdleTimeout=null),this._rpcWebSocketHeartbeat&&(clearInterval(this._rpcWebSocketHeartbeat),this._rpcWebSocketHeartbeat=null),e===1e3){this._updateSubscriptions();return}this._subscriptionCallbacksByServerSubscriptionId={},Object.entries(this._subscriptionsByHash).forEach(([t,r])=>{this._setSubscription(t,{...r,state:"pending"})})}_setSubscription(e,t){var s;const r=(s=this._subscriptionsByHash[e])==null?void 0:s.state;if(this._subscriptionsByHash[e]=t,r!==t.state){const i=this._subscriptionStateChangeCallbacksByHash[e];i&&i.forEach(o=>{try{o(t.state)}catch{}})}}_onSubscriptionStateChange(e,t){var i;const r=this._subscriptionHashByClientSubscriptionId[e];if(r==null)return()=>{};const s=(i=this._subscriptionStateChangeCallbacksByHash)[r]||(i[r]=new Set);return s.add(t),()=>{s.delete(t),s.size===0&&delete this._subscriptionStateChangeCallbacksByHash[r]}}async _updateSubscriptions(){if(Object.keys(this._subscriptionsByHash).length===0){this._rpcWebSocketConnected&&(this._rpcWebSocketConnected=!1,this._rpcWebSocketIdleTimeout=setTimeout(()=>{this._rpcWebSocketIdleTimeout=null;try{this._rpcWebSocket.close()}catch(r){r instanceof Error&&console.log(`Error when closing socket connection: ${r.message}`)}},500));return}if(this._rpcWebSocketIdleTimeout!==null&&(clearTimeout(this._rpcWebSocketIdleTimeout),this._rpcWebSocketIdleTimeout=null,this._rpcWebSocketConnected=!0),!this._rpcWebSocketConnected){this._rpcWebSocket.connect();return}const e=this._rpcWebSocketGeneration,t=()=>e===this._rpcWebSocketGeneration;await Promise.all(Object.keys(this._subscriptionsByHash).map(async r=>{const s=this._subscriptionsByHash[r];if(s!==void 0)switch(s.state){case"pending":case"unsubscribed":if(s.callbacks.size===0){delete this._subscriptionsByHash[r],s.state==="unsubscribed"&&delete this._subscriptionCallbacksByServerSubscriptionId[s.serverSubscriptionId],await this._updateSubscriptions();return}await(async()=>{const{args:i,method:o}=s;try{this._setSubscription(r,{...s,state:"subscribing"});const a=await this._rpcWebSocket.call(o,i);this._setSubscription(r,{...s,serverSubscriptionId:a,state:"subscribed"}),this._subscriptionCallbacksByServerSubscriptionId[a]=s.callbacks,await this._updateSubscriptions()}catch(a){if(console.error(`Received ${a instanceof Error?"":"JSON-RPC "}error calling \`${o}\``,{args:i,error:a}),!t())return;this._setSubscription(r,{...s,state:"pending"}),await this._updateSubscriptions()}})();break;case"subscribed":s.callbacks.size===0&&await(async()=>{const{serverSubscriptionId:i,unsubscribeMethod:o}=s;if(this._subscriptionsAutoDisposedByRpc.has(i))this._subscriptionsAutoDisposedByRpc.delete(i);else{this._setSubscription(r,{...s,state:"unsubscribing"}),this._setSubscription(r,{...s,state:"unsubscribing"});try{await this._rpcWebSocket.call(o,[i])}catch(a){if(a instanceof Error&&console.error(`${o} error:`,a.message),!t())return;this._setSubscription(r,{...s,state:"subscribed"}),await this._updateSubscriptions();return}}this._setSubscription(r,{...s,state:"unsubscribed"}),await this._updateSubscriptions()})();break}}))}_handleServerNotification(e,t){const r=this._subscriptionCallbacksByServerSubscriptionId[e];r!==void 0&&r.forEach(s=>{try{s(...t)}catch(i){console.error(i)}})}_wsOnAccountNotification(e){const{result:t,subscription:r}=Q(e,N4);this._handleServerNotification(r,[t.value,t.context])}_makeSubscription(e,t){const r=this._nextClientSubscriptionId++,s=pu([e.method,t]),i=this._subscriptionsByHash[s];return i===void 0?this._subscriptionsByHash[s]={...e,args:t,callbacks:new Set([e.callback]),state:"pending"}:i.callbacks.add(e.callback),this._subscriptionHashByClientSubscriptionId[r]=s,this._subscriptionDisposeFunctionsByClientSubscriptionId[r]=async()=>{delete this._subscriptionDisposeFunctionsByClientSubscriptionId[r],delete this._subscriptionHashByClientSubscriptionId[r];const o=this._subscriptionsByHash[s];Fe(o!==void 0,`Could not find a \`Subscription\` when tearing down client subscription #${r}`),o.callbacks.delete(e.callback),await this._updateSubscriptions()},this._updateSubscriptions(),r}onAccountChange(e,t,r){const{commitment:s,config:i}=Le(r),o=this._buildArgs([e.toBase58()],s||this._commitment||"finalized","base64",i);return this._makeSubscription({callback:t,method:"accountSubscribe",unsubscribeMethod:"accountUnsubscribe"},o)}async removeAccountChangeListener(e){await this._unsubscribeClientSubscription(e,"account change")}_wsOnProgramAccountNotification(e){const{result:t,subscription:r}=Q(e,H4);this._handleServerNotification(r,[{accountId:t.value.pubkey,accountInfo:t.value.account},t.context])}onProgramAccountChange(e,t,r,s){const{commitment:i,config:o}=Le(r),a=this._buildArgs([e.toBase58()],i||this._commitment||"finalized","base64",o||(s?{filters:yu(s)}:void 0));return this._makeSubscription({callback:t,method:"programSubscribe",unsubscribeMethod:"programUnsubscribe"},a)}async removeProgramAccountChangeListener(e){await this._unsubscribeClientSubscription(e,"program account change")}onLogs(e,t,r){const s=this._buildArgs([typeof e=="object"?{mentions:[e.toString()]}:e],r||this._commitment||"finalized");return this._makeSubscription({callback:t,method:"logsSubscribe",unsubscribeMethod:"logsUnsubscribe"},s)}async removeOnLogsListener(e){await this._unsubscribeClientSubscription(e,"logs")}_wsOnLogsNotification(e){const{result:t,subscription:r}=Q(e,y6);this._handleServerNotification(r,[t.value,t.context])}_wsOnSlotNotification(e){const{result:t,subscription:r}=Q(e,K4);this._handleServerNotification(r,[t])}onSlotChange(e){return this._makeSubscription({callback:e,method:"slotSubscribe",unsubscribeMethod:"slotUnsubscribe"},[])}async removeSlotChangeListener(e){await this._unsubscribeClientSubscription(e,"slot change")}_wsOnSlotUpdatesNotification(e){const{result:t,subscription:r}=Q(e,$4);this._handleServerNotification(r,[t])}onSlotUpdate(e){return this._makeSubscription({callback:e,method:"slotsUpdatesSubscribe",unsubscribeMethod:"slotsUpdatesUnsubscribe"},[])}async removeSlotUpdateListener(e){await this._unsubscribeClientSubscription(e,"slot update")}async _unsubscribeClientSubscription(e,t){const r=this._subscriptionDisposeFunctionsByClientSubscriptionId[e];r?await r():console.warn(`Ignored unsubscribe request because an active subscription with id \`${e}\` for '${t}' events could not be found.`)}_buildArgs(e,t,r,s){const i=t||this._commitment;if(i||r||s){let o={};r&&(o.encoding=r),i&&(o.commitment=i),s&&(o=Object.assign(o,s)),e.push(o)}return e}_buildArgsAtLeastConfirmed(e,t,r,s){const i=t||this._commitment;if(i&&!["confirmed","finalized"].includes(i))throw new Error("Using Connection with default commitment: `"+this._commitment+"`, but method requires at least `confirmed`");return this._buildArgs(e,t,r,s)}_wsOnSignatureNotification(e){const{result:t,subscription:r}=Q(e,V4);t.value!=="receivedSignature"&&this._subscriptionsAutoDisposedByRpc.add(r),this._handleServerNotification(r,t.value==="receivedSignature"?[{type:"received"},t.context]:[{type:"status",result:t.value},t.context])}onSignature(e,t,r){const s=this._buildArgs([e],r||this._commitment||"finalized"),i=this._makeSubscription({callback:(o,a)=>{if(o.type==="status"){t(o.result,a);try{this.removeSignatureListener(i)}catch{}}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},s);return i}onSignatureWithOptions(e,t,r){const{commitment:s,...i}={...r,commitment:r&&r.commitment||this._commitment||"finalized"},o=this._buildArgs([e],s,void 0,i),a=this._makeSubscription({callback:(c,h)=>{t(c,h);try{this.removeSignatureListener(a)}catch{}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},o);return a}async removeSignatureListener(e){await this._unsubscribeClientSubscription(e,"signature result")}_wsOnRootNotification(e){const{result:t,subscription:r}=Q(e,G4);this._handleServerNotification(r,[t])}onRootChange(e){return this._makeSubscription({callback:e,method:"rootSubscribe",unsubscribeMethod:"rootUnsubscribe"},[])}async removeRootChangeListener(e){await this._unsubscribeClientSubscription(e,"root change")}}class Sr{constructor(e){this._keypair=void 0,this._keypair=e??fu()}static generate(){return new Sr(fu())}static fromSecretKey(e,t){if(e.byteLength!==64)throw new Error("bad secret key size");const r=e.slice(32,64);if(!t||!t.skipValidation){const s=e.slice(0,32),i=Ji(s);for(let o=0;o<32;o++)if(r[o]!==i[o])throw new Error("provided secretKey is invalid")}return new Sr({publicKey:r,secretKey:e})}static fromSeed(e){const t=Ji(e),r=new Uint8Array(64);return r.set(e),r.set(t,32),new Sr({publicKey:t,secretKey:r})}get publicKey(){return new X(this._keypair.publicKey)}get secretKey(){return new Uint8Array(this._keypair.secretKey)}}const Kn=Object.freeze({CreateLookupTable:{index:0,layout:exports.struct([exports.u32("instruction"),es("recentSlot"),exports.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:exports.struct([exports.u32("instruction")])},ExtendLookupTable:{index:2,layout:exports.struct([exports.u32("instruction"),es(),exports.seq(Be(),ir(exports.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:exports.struct([exports.u32("instruction")])},CloseLookupTable:{index:4,layout:exports.struct([exports.u32("instruction")])}});class w6{constructor(){}static decodeInstructionType(e){this.checkProgramId(e.programId);const r=exports.u32("instruction").decode(e.data);let s;for(const[i,o]of Object.entries(Kn))if(o.index==r){s=i;break}if(!s)throw new Error("Invalid Instruction. Should be a LookupTable Instruction");return s}static decodeCreateLookupTable(e){this.checkProgramId(e.programId),this.checkKeysLength(e.keys,4);const{recentSlot:t}=Ie(Kn.CreateLookupTable,e.data);return{authority:e.keys[1].pubkey,payer:e.keys[2].pubkey,recentSlot:Number(t)}}static decodeExtendLookupTable(e){if(this.checkProgramId(e.programId),e.keys.length<2)throw new Error(`invalid instruction; found ${e.keys.length} keys, expected at least 2`);const{addresses:t}=Ie(Kn.ExtendLookupTable,e.data);return{lookupTable:e.keys[0].pubkey,authority:e.keys[1].pubkey,payer:e.keys.length>2?e.keys[2].pubkey:void 0,addresses:t.map(r=>new X(r))}}static decodeCloseLookupTable(e){return this.checkProgramId(e.programId),this.checkKeysLength(e.keys,3),{lookupTable:e.keys[0].pubkey,authority:e.keys[1].pubkey,recipient:e.keys[2].pubkey}}static decodeFreezeLookupTable(e){return this.checkProgramId(e.programId),this.checkKeysLength(e.keys,2),{lookupTable:e.keys[0].pubkey,authority:e.keys[1].pubkey}}static decodeDeactivateLookupTable(e){return this.checkProgramId(e.programId),this.checkKeysLength(e.keys,2),{lookupTable:e.keys[0].pubkey,authority:e.keys[1].pubkey}}static checkProgramId(e){if(!e.equals(Po.programId))throw new Error("invalid instruction; programId is not AddressLookupTable Program")}static checkKeysLength(e,t){if(e.length<t)throw new Error(`invalid instruction; found ${e.length} keys, expected at least ${t}`)}}class Po{constructor(){}static createLookupTable(e){const[t,r]=X.findProgramAddressSync([e.authority.toBuffer(),kl(BigInt(e.recentSlot),8)],this.programId),s=Kn.CreateLookupTable,i=Ce(s,{recentSlot:BigInt(e.recentSlot),bumpSeed:r}),o=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1},{pubkey:e.payer,isSigner:!0,isWritable:!0},{pubkey:wt.programId,isSigner:!1,isWritable:!1}];return[new Me({programId:this.programId,keys:o,data:i}),t]}static freezeLookupTable(e){const t=Kn.FreezeLookupTable,r=Ce(t),s=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return new Me({programId:this.programId,keys:s,data:r})}static extendLookupTable(e){const t=Kn.ExtendLookupTable,r=Ce(t,{addresses:e.addresses.map(i=>i.toBytes())}),s=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return e.payer&&s.push({pubkey:e.payer,isSigner:!0,isWritable:!0},{pubkey:wt.programId,isSigner:!1,isWritable:!1}),new Me({programId:this.programId,keys:s,data:r})}static deactivateLookupTable(e){const t=Kn.DeactivateLookupTable,r=Ce(t),s=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return new Me({programId:this.programId,keys:s,data:r})}static closeLookupTable(e){const t=Kn.CloseLookupTable,r=Ce(t),s=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1},{pubkey:e.recipient,isSigner:!1,isWritable:!0}];return new Me({programId:this.programId,keys:s,data:r})}}Po.programId=new X("AddressLookupTab1e1111111111111111111111111");class E6{constructor(){}static decodeInstructionType(e){this.checkProgramId(e.programId);const r=exports.u8("instruction").decode(e.data);let s;for(const[i,o]of Object.entries(xn))if(o.index==r){s=i;break}if(!s)throw new Error("Instruction type incorrect; not a ComputeBudgetInstruction");return s}static decodeRequestUnits(e){this.checkProgramId(e.programId);const{units:t,additionalFee:r}=Ie(xn.RequestUnits,e.data);return{units:t,additionalFee:r}}static decodeRequestHeapFrame(e){this.checkProgramId(e.programId);const{bytes:t}=Ie(xn.RequestHeapFrame,e.data);return{bytes:t}}static decodeSetComputeUnitLimit(e){this.checkProgramId(e.programId);const{units:t}=Ie(xn.SetComputeUnitLimit,e.data);return{units:t}}static decodeSetComputeUnitPrice(e){this.checkProgramId(e.programId);const{microLamports:t}=Ie(xn.SetComputeUnitPrice,e.data);return{microLamports:t}}static checkProgramId(e){if(!e.equals(Lo.programId))throw new Error("invalid instruction; programId is not ComputeBudgetProgram")}}const xn=Object.freeze({RequestUnits:{index:0,layout:exports.struct([exports.u8("instruction"),exports.u32("units"),exports.u32("additionalFee")])},RequestHeapFrame:{index:1,layout:exports.struct([exports.u8("instruction"),exports.u32("bytes")])},SetComputeUnitLimit:{index:2,layout:exports.struct([exports.u8("instruction"),exports.u32("units")])},SetComputeUnitPrice:{index:3,layout:exports.struct([exports.u8("instruction"),es("microLamports")])}});class Lo{constructor(){}static requestUnits(e){const t=xn.RequestUnits,r=Ce(t,e);return new Me({keys:[],programId:this.programId,data:r})}static requestHeapFrame(e){const t=xn.RequestHeapFrame,r=Ce(t,e);return new Me({keys:[],programId:this.programId,data:r})}static setComputeUnitLimit(e){const t=xn.SetComputeUnitLimit,r=Ce(t,e);return new Me({keys:[],programId:this.programId,data:r})}static setComputeUnitPrice(e){const t=xn.SetComputeUnitPrice,r=Ce(t,{microLamports:BigInt(e.microLamports)});return new Me({keys:[],programId:this.programId,data:r})}}Lo.programId=new X("ComputeBudget111111111111111111111111111111");const Bu=64,xu=32,Cu=64,Su=exports.struct([exports.u8("numSignatures"),exports.u8("padding"),exports.u16("signatureOffset"),exports.u16("signatureInstructionIndex"),exports.u16("publicKeyOffset"),exports.u16("publicKeyInstructionIndex"),exports.u16("messageDataOffset"),exports.u16("messageDataSize"),exports.u16("messageInstructionIndex")]);class Oo{constructor(){}static createInstructionWithPublicKey(e){const{publicKey:t,message:r,signature:s,instructionIndex:i}=e;Fe(t.length===xu,`Public Key must be ${xu} bytes but received ${t.length} bytes`),Fe(s.length===Cu,`Signature must be ${Cu} bytes but received ${s.length} bytes`);const o=Su.span,a=o+t.length,c=a+s.length,h=1,b=ae.Buffer.alloc(c+r.length),w=i??65535;return Su.encode({numSignatures:h,padding:0,signatureOffset:a,signatureInstructionIndex:w,publicKeyOffset:o,publicKeyInstructionIndex:w,messageDataOffset:c,messageDataSize:r.length,messageInstructionIndex:w},b),b.fill(t,o),b.fill(s,a),b.fill(r,c),new Me({keys:[],programId:Oo.programId,data:b})}static createInstructionWithPrivateKey(e){const{privateKey:t,message:r,instructionIndex:s}=e;Fe(t.length===Bu,`Private key must be ${Bu} bytes but received ${t.length} bytes`);try{const i=Sr.fromSecretKey(t),o=i.publicKey.toBytes(),a=_l(r,i.secretKey);return this.createInstructionWithPublicKey({publicKey:o,message:r,signature:a,instructionIndex:s})}catch(i){throw new Error(`Error creating instruction; ${i}`)}}}Oo.programId=new X("Ed25519SigVerify111111111111111111111111111");const B6=(n,e)=>{const t=Qn.sign(n,e);return[t.toCompactRawBytes(),t.recovery]};Qn.utils.isValidPrivateKey;const x6=Qn.getPublicKey,Du=32,Ra=20,vu=64,C6=11,Wa=exports.struct([exports.u8("numSignatures"),exports.u16("signatureOffset"),exports.u8("signatureInstructionIndex"),exports.u16("ethAddressOffset"),exports.u8("ethAddressInstructionIndex"),exports.u16("messageDataOffset"),exports.u16("messageDataSize"),exports.u8("messageInstructionIndex"),exports.blob(20,"ethAddress"),exports.blob(64,"signature"),exports.u8("recoveryId")]);class Dr{constructor(){}static publicKeyToEthAddress(e){Fe(e.length===vu,`Public key must be ${vu} bytes but received ${e.length} bytes`);try{return ae.Buffer.from(Rs(Ae(e))).slice(-Ra)}catch(t){throw new Error(`Error constructing Ethereum address: ${t}`)}}static createInstructionWithPublicKey(e){const{publicKey:t,message:r,signature:s,recoveryId:i,instructionIndex:o}=e;return Dr.createInstructionWithEthAddress({ethAddress:Dr.publicKeyToEthAddress(t),message:r,signature:s,recoveryId:i,instructionIndex:o})}static createInstructionWithEthAddress(e){const{ethAddress:t,message:r,signature:s,recoveryId:i,instructionIndex:o=0}=e;let a;typeof t=="string"?t.startsWith("0x")?a=ae.Buffer.from(t.substr(2),"hex"):a=ae.Buffer.from(t,"hex"):a=t,Fe(a.length===Ra,`Address must be ${Ra} bytes but received ${a.length} bytes`);const c=1+C6,h=c,b=c+a.length,w=b+s.length+1,D=1,E=ae.Buffer.alloc(Wa.span+r.length);return Wa.encode({numSignatures:D,signatureOffset:b,signatureInstructionIndex:o,ethAddressOffset:h,ethAddressInstructionIndex:o,messageDataOffset:w,messageDataSize:r.length,messageInstructionIndex:o,signature:Ae(s),ethAddress:Ae(a),recoveryId:i},E),E.fill(Ae(r),Wa.span),new Me({keys:[],programId:Dr.programId,data:E})}static createInstructionWithPrivateKey(e){const{privateKey:t,message:r,instructionIndex:s}=e;Fe(t.length===Du,`Private key must be ${Du} bytes but received ${t.length} bytes`);try{const i=Ae(t),o=x6(i,!1).slice(1),a=ae.Buffer.from(Rs(Ae(r))),[c,h]=B6(a,i);return this.createInstructionWithPublicKey({publicKey:o,message:r,signature:c,recoveryId:h,instructionIndex:s})}catch(i){throw new Error(`Error creating instruction; ${i}`)}}}Dr.programId=new X("KeccakSecp256k11111111111111111111111111111");var dm;const um=new X("StakeConfig11111111111111111111111111111111");class fm{constructor(e,t){this.staker=void 0,this.withdrawer=void 0,this.staker=e,this.withdrawer=t}}class li{constructor(e,t,r){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=e,this.epoch=t,this.custodian=r}}dm=li;li.default=new dm(0,0,X.default);class S6{constructor(){}static decodeInstructionType(e){this.checkProgramId(e.programId);const r=exports.u32("instruction").decode(e.data);let s;for(const[i,o]of Object.entries(Ct))if(o.index==r){s=i;break}if(!s)throw new Error("Instruction type incorrect; not a StakeInstruction");return s}static decodeInitialize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{authorized:t,lockup:r}=Ie(Ct.Initialize,e.data);return{stakePubkey:e.keys[0].pubkey,authorized:new fm(new X(t.staker),new X(t.withdrawer)),lockup:new li(r.unixTimestamp,r.epoch,new X(r.custodian))}}static decodeDelegate(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,6),Ie(Ct.Delegate,e.data),{stakePubkey:e.keys[0].pubkey,votePubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[5].pubkey}}static decodeAuthorize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{newAuthorized:t,stakeAuthorizationType:r}=Ie(Ct.Authorize,e.data),s={stakePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey,newAuthorizedPubkey:new X(t),stakeAuthorizationType:{index:r}};return e.keys.length>3&&(s.custodianPubkey=e.keys[3].pubkey),s}static decodeAuthorizeWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{newAuthorized:t,stakeAuthorizationType:r,authoritySeed:s,authorityOwner:i}=Ie(Ct.AuthorizeWithSeed,e.data),o={stakePubkey:e.keys[0].pubkey,authorityBase:e.keys[1].pubkey,authoritySeed:s,authorityOwner:new X(i),newAuthorizedPubkey:new X(t),stakeAuthorizationType:{index:r}};return e.keys.length>3&&(o.custodianPubkey=e.keys[3].pubkey),o}static decodeSplit(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{lamports:t}=Ie(Ct.Split,e.data);return{stakePubkey:e.keys[0].pubkey,splitStakePubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[2].pubkey,lamports:t}}static decodeMerge(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),Ie(Ct.Merge,e.data),{stakePubkey:e.keys[0].pubkey,sourceStakePubKey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey}}static decodeWithdraw(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,5);const{lamports:t}=Ie(Ct.Withdraw,e.data),r={stakePubkey:e.keys[0].pubkey,toPubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey,lamports:t};return e.keys.length>5&&(r.custodianPubkey=e.keys[5].pubkey),r}static decodeDeactivate(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),Ie(Ct.Deactivate,e.data),{stakePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey}}static checkProgramId(e){if(!e.equals(No.programId))throw new Error("invalid instruction; programId is not StakeProgram")}static checkKeyLength(e,t){if(e.length<t)throw new Error(`invalid instruction; found ${e.length} keys, expected at least ${t}`)}}const Ct=Object.freeze({Initialize:{index:0,layout:exports.struct([exports.u32("instruction"),F3(),T3()])},Authorize:{index:1,layout:exports.struct([exports.u32("instruction"),Be("newAuthorized"),exports.u32("stakeAuthorizationType")])},Delegate:{index:2,layout:exports.struct([exports.u32("instruction")])},Split:{index:3,layout:exports.struct([exports.u32("instruction"),exports.ns64("lamports")])},Withdraw:{index:4,layout:exports.struct([exports.u32("instruction"),exports.ns64("lamports")])},Deactivate:{index:5,layout:exports.struct([exports.u32("instruction")])},Merge:{index:7,layout:exports.struct([exports.u32("instruction")])},AuthorizeWithSeed:{index:8,layout:exports.struct([exports.u32("instruction"),Be("newAuthorized"),exports.u32("stakeAuthorizationType"),Er("authoritySeed"),Be("authorityOwner")])}}),D6=Object.freeze({Staker:{index:0},Withdrawer:{index:1}});class No{constructor(){}static initialize(e){const{stakePubkey:t,authorized:r,lockup:s}=e,i=s||li.default,o=Ct.Initialize,a=Ce(o,{authorized:{staker:Ae(r.staker.toBuffer()),withdrawer:Ae(r.withdrawer.toBuffer())},lockup:{unixTimestamp:i.unixTimestamp,epoch:i.epoch,custodian:Ae(i.custodian.toBuffer())}}),c={keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:Ir,isSigner:!1,isWritable:!1}],programId:this.programId,data:a};return new Me(c)}static createAccountWithSeed(e){const t=new ke;t.add(wt.createAccountWithSeed({fromPubkey:e.fromPubkey,newAccountPubkey:e.stakePubkey,basePubkey:e.basePubkey,seed:e.seed,lamports:e.lamports,space:this.space,programId:this.programId}));const{stakePubkey:r,authorized:s,lockup:i}=e;return t.add(this.initialize({stakePubkey:r,authorized:s,lockup:i}))}static createAccount(e){const t=new ke;t.add(wt.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.stakePubkey,lamports:e.lamports,space:this.space,programId:this.programId}));const{stakePubkey:r,authorized:s,lockup:i}=e;return t.add(this.initialize({stakePubkey:r,authorized:s,lockup:i}))}static delegate(e){const{stakePubkey:t,authorizedPubkey:r,votePubkey:s}=e,i=Ct.Delegate,o=Ce(i);return new ke().add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!1},{pubkey:dn,isSigner:!1,isWritable:!1},{pubkey:_i,isSigner:!1,isWritable:!1},{pubkey:um,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:o})}static authorize(e){const{stakePubkey:t,authorizedPubkey:r,newAuthorizedPubkey:s,stakeAuthorizationType:i,custodianPubkey:o}=e,a=Ct.Authorize,c=Ce(a,{newAuthorized:Ae(s.toBuffer()),stakeAuthorizationType:i.index}),h=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:dn,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}];return o&&h.push({pubkey:o,isSigner:!0,isWritable:!1}),new ke().add({keys:h,programId:this.programId,data:c})}static authorizeWithSeed(e){const{stakePubkey:t,authorityBase:r,authoritySeed:s,authorityOwner:i,newAuthorizedPubkey:o,stakeAuthorizationType:a,custodianPubkey:c}=e,h=Ct.AuthorizeWithSeed,b=Ce(h,{newAuthorized:Ae(o.toBuffer()),stakeAuthorizationType:a.index,authoritySeed:s,authorityOwner:Ae(i.toBuffer())}),w=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1},{pubkey:dn,isSigner:!1,isWritable:!1}];return c&&w.push({pubkey:c,isSigner:!0,isWritable:!1}),new ke().add({keys:w,programId:this.programId,data:b})}static splitInstruction(e){const{stakePubkey:t,authorizedPubkey:r,splitStakePubkey:s,lamports:i}=e,o=Ct.Split,a=Ce(o,{lamports:i});return new Me({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:a})}static split(e,t){const r=new ke;return r.add(wt.createAccount({fromPubkey:e.authorizedPubkey,newAccountPubkey:e.splitStakePubkey,lamports:t,space:this.space,programId:this.programId})),r.add(this.splitInstruction(e))}static splitWithSeed(e,t){const{stakePubkey:r,authorizedPubkey:s,splitStakePubkey:i,basePubkey:o,seed:a,lamports:c}=e,h=new ke;return h.add(wt.allocate({accountPubkey:i,basePubkey:o,seed:a,space:this.space,programId:this.programId})),t&&t>0&&h.add(wt.transfer({fromPubkey:e.authorizedPubkey,toPubkey:i,lamports:t})),h.add(this.splitInstruction({stakePubkey:r,authorizedPubkey:s,splitStakePubkey:i,lamports:c}))}static merge(e){const{stakePubkey:t,sourceStakePubKey:r,authorizedPubkey:s}=e,i=Ct.Merge,o=Ce(i);return new ke().add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:dn,isSigner:!1,isWritable:!1},{pubkey:_i,isSigner:!1,isWritable:!1},{pubkey:s,isSigner:!0,isWritable:!1}],programId:this.programId,data:o})}static withdraw(e){const{stakePubkey:t,authorizedPubkey:r,toPubkey:s,lamports:i,custodianPubkey:o}=e,a=Ct.Withdraw,c=Ce(a,{lamports:i}),h=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:dn,isSigner:!1,isWritable:!1},{pubkey:_i,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return o&&h.push({pubkey:o,isSigner:!0,isWritable:!1}),new ke().add({keys:h,programId:this.programId,data:c})}static deactivate(e){const{stakePubkey:t,authorizedPubkey:r}=e,s=Ct.Deactivate,i=Ce(s);return new ke().add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:dn,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:i})}}No.programId=new X("Stake11111111111111111111111111111111111111");No.space=200;class hm{constructor(e,t,r,s){this.nodePubkey=void 0,this.authorizedVoter=void 0,this.authorizedWithdrawer=void 0,this.commission=void 0,this.nodePubkey=e,this.authorizedVoter=t,this.authorizedWithdrawer=r,this.commission=s}}class v6{constructor(){}static decodeInstructionType(e){this.checkProgramId(e.programId);const r=exports.u32("instruction").decode(e.data);let s;for(const[i,o]of Object.entries(Cn))if(o.index==r){s=i;break}if(!s)throw new Error("Instruction type incorrect; not a VoteInstruction");return s}static decodeInitializeAccount(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,4);const{voteInit:t}=Ie(Cn.InitializeAccount,e.data);return{votePubkey:e.keys[0].pubkey,nodePubkey:e.keys[3].pubkey,voteInit:new hm(new X(t.nodePubkey),new X(t.authorizedVoter),new X(t.authorizedWithdrawer),t.commission)}}static decodeAuthorize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{newAuthorized:t,voteAuthorizationType:r}=Ie(Cn.Authorize,e.data);return{votePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey,newAuthorizedPubkey:new X(t),voteAuthorizationType:{index:r}}}static decodeAuthorizeWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{voteAuthorizeWithSeedArgs:{currentAuthorityDerivedKeyOwnerPubkey:t,currentAuthorityDerivedKeySeed:r,newAuthorized:s,voteAuthorizationType:i}}=Ie(Cn.AuthorizeWithSeed,e.data);return{currentAuthorityDerivedKeyBasePubkey:e.keys[2].pubkey,currentAuthorityDerivedKeyOwnerPubkey:new X(t),currentAuthorityDerivedKeySeed:r,newAuthorizedPubkey:new X(s),voteAuthorizationType:{index:i},votePubkey:e.keys[0].pubkey}}static decodeWithdraw(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{lamports:t}=Ie(Cn.Withdraw,e.data);return{votePubkey:e.keys[0].pubkey,authorizedWithdrawerPubkey:e.keys[2].pubkey,lamports:t,toPubkey:e.keys[1].pubkey}}static checkProgramId(e){if(!e.equals(ys.programId))throw new Error("invalid instruction; programId is not VoteProgram")}static checkKeyLength(e,t){if(e.length<t)throw new Error(`invalid instruction; found ${e.length} keys, expected at least ${t}`)}}const Cn=Object.freeze({InitializeAccount:{index:0,layout:exports.struct([exports.u32("instruction"),I3()])},Authorize:{index:1,layout:exports.struct([exports.u32("instruction"),Be("newAuthorized"),exports.u32("voteAuthorizationType")])},Withdraw:{index:3,layout:exports.struct([exports.u32("instruction"),exports.ns64("lamports")])},UpdateValidatorIdentity:{index:4,layout:exports.struct([exports.u32("instruction")])},AuthorizeWithSeed:{index:10,layout:exports.struct([exports.u32("instruction"),U3()])}}),k6=Object.freeze({Voter:{index:0},Withdrawer:{index:1}});class ys{constructor(){}static initializeAccount(e){const{votePubkey:t,nodePubkey:r,voteInit:s}=e,i=Cn.InitializeAccount,o=Ce(i,{voteInit:{nodePubkey:Ae(s.nodePubkey.toBuffer()),authorizedVoter:Ae(s.authorizedVoter.toBuffer()),authorizedWithdrawer:Ae(s.authorizedWithdrawer.toBuffer()),commission:s.commission}}),a={keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:Ir,isSigner:!1,isWritable:!1},{pubkey:dn,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:o};return new Me(a)}static createAccount(e){const t=new ke;return t.add(wt.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.votePubkey,lamports:e.lamports,space:this.space,programId:this.programId})),t.add(this.initializeAccount({votePubkey:e.votePubkey,nodePubkey:e.voteInit.nodePubkey,voteInit:e.voteInit}))}static authorize(e){const{votePubkey:t,authorizedPubkey:r,newAuthorizedPubkey:s,voteAuthorizationType:i}=e,o=Cn.Authorize,a=Ce(o,{newAuthorized:Ae(s.toBuffer()),voteAuthorizationType:i.index}),c=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:dn,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return new ke().add({keys:c,programId:this.programId,data:a})}static authorizeWithSeed(e){const{currentAuthorityDerivedKeyBasePubkey:t,currentAuthorityDerivedKeyOwnerPubkey:r,currentAuthorityDerivedKeySeed:s,newAuthorizedPubkey:i,voteAuthorizationType:o,votePubkey:a}=e,c=Cn.AuthorizeWithSeed,h=Ce(c,{voteAuthorizeWithSeedArgs:{currentAuthorityDerivedKeyOwnerPubkey:Ae(r.toBuffer()),currentAuthorityDerivedKeySeed:s,newAuthorized:Ae(i.toBuffer()),voteAuthorizationType:o.index}}),b=[{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:dn,isSigner:!1,isWritable:!1},{pubkey:t,isSigner:!0,isWritable:!1}];return new ke().add({keys:b,programId:this.programId,data:h})}static withdraw(e){const{votePubkey:t,authorizedWithdrawerPubkey:r,lamports:s,toPubkey:i}=e,o=Cn.Withdraw,a=Ce(o,{lamports:s}),c=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}];return new ke().add({keys:c,programId:this.programId,data:a})}static safeWithdraw(e,t,r){if(e.lamports>t-r)throw new Error("Withdraw will leave vote account with insufficient funds.");return ys.withdraw(e)}static updateValidatorIdentity(e){const{votePubkey:t,authorizedWithdrawerPubkey:r,nodePubkey:s}=e,i=Cn.UpdateValidatorIdentity,o=Ce(i),a=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!0,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return new ke().add({keys:a,programId:this.programId,data:o})}}ys.programId=new X("Vote111111111111111111111111111111111111111");ys.space=3762;const mm=new X("Va1idator1nfo111111111111111111111111111111"),F6=j({name:Z(),website:le(Z()),details:le(Z()),iconUrl:le(Z()),keybaseUsername:le(Z())});class Nl{constructor(e,t){this.key=void 0,this.info=void 0,this.key=e,this.info=t}static fromConfigData(e){let t=[...e];if($t(t)!==2)return null;const s=[];for(let i=0;i<2;i++){const o=new X(Vt(t,0,Dn)),a=Bn(t)===1;s.push({publicKey:o,isSigner:a})}if(s[0].publicKey.equals(mm)&&s[1].isSigner){const i=Er().decode(ae.Buffer.from(t)),o=JSON.parse(i);return _h(o,F6),new Nl(s[1].publicKey,o)}return null}}const T6=new X("Vote111111111111111111111111111111111111111"),I6=exports.struct([Be("nodePubkey"),Be("authorizedWithdrawer"),exports.u8("commission"),vt(),exports.seq(exports.struct([vt("slot"),exports.u32("confirmationCount")]),ir(exports.u32(),-8),"votes"),exports.u8("rootSlotValid"),vt("rootSlot"),vt(),exports.seq(exports.struct([vt("epoch"),Be("authorizedVoter")]),ir(exports.u32(),-8),"authorizedVoters"),exports.struct([exports.seq(exports.struct([Be("authorizedPubkey"),vt("epochOfLastAuthorizedSwitch"),vt("targetEpoch")]),32,"buf"),vt("idx"),exports.u8("isEmpty")],"priorVoters"),vt(),exports.seq(exports.struct([vt("epoch"),vt("credits"),vt("prevCredits")]),ir(exports.u32(),-8),"epochCredits"),exports.struct([vt("slot"),vt("timestamp")],"lastTimestamp")]);class zl{constructor(e){this.nodePubkey=void 0,this.authorizedWithdrawer=void 0,this.commission=void 0,this.rootSlot=void 0,this.votes=void 0,this.authorizedVoters=void 0,this.priorVoters=void 0,this.epochCredits=void 0,this.lastTimestamp=void 0,this.nodePubkey=e.nodePubkey,this.authorizedWithdrawer=e.authorizedWithdrawer,this.commission=e.commission,this.rootSlot=e.rootSlot,this.votes=e.votes,this.authorizedVoters=e.authorizedVoters,this.priorVoters=e.priorVoters,this.epochCredits=e.epochCredits,this.lastTimestamp=e.lastTimestamp}static fromAccountData(e){const r=I6.decode(Ae(e),4);let s=r.rootSlot;return r.rootSlotValid||(s=null),new zl({nodePubkey:new X(r.nodePubkey),authorizedWithdrawer:new X(r.authorizedWithdrawer),commission:r.commission,votes:r.votes,rootSlot:s,authorizedVoters:r.authorizedVoters.map(U6),priorVoters:_6(r.priorVoters),epochCredits:r.epochCredits,lastTimestamp:r.lastTimestamp})}}function U6({authorizedVoter:n,epoch:e}){return{epoch:e,authorizedVoter:new X(n)}}function ku({authorizedPubkey:n,epochOfLastAuthorizedSwitch:e,targetEpoch:t}){return{authorizedPubkey:new X(n),epochOfLastAuthorizedSwitch:e,targetEpoch:t}}function _6({buf:n,idx:e,isEmpty:t}){return t?[]:[...n.slice(e+1).map(ku),...n.slice(0,e).map(ku)]}const Fu={http:{devnet:"http://api.devnet.solana.com",testnet:"http://api.testnet.solana.com","mainnet-beta":"http://api.mainnet-beta.solana.com/"},https:{devnet:"https://api.devnet.solana.com",testnet:"https://api.testnet.solana.com","mainnet-beta":"https://api.mainnet-beta.solana.com/"}};function bm(n,e){const t=e===!1?"http":"https";if(!n)return Fu[t].devnet;const r=Fu[t][n];if(!r)throw new Error(`Unknown ${t} cluster: ${n}`);return r}async function M6(n,e,t,r){let s,i;t&&Object.prototype.hasOwnProperty.call(t,"lastValidBlockHeight")||t&&Object.prototype.hasOwnProperty.call(t,"nonceValue")?(s=t,i=r):i=t;const o=i&&{skipPreflight:i.skipPreflight,preflightCommitment:i.preflightCommitment||i.commitment,minContextSlot:i.minContextSlot},a=await n.sendRawTransaction(e,o),c=i&&i.commitment,b=(await(s?n.confirmTransaction(s,c):n.confirmTransaction(a,c))).value;if(b.err)throw a!=null?new Qr({action:o!=null&&o.skipPreflight?"send":"simulate",signature:a,transactionMessage:`Status: (${JSON.stringify(b)})`}):new Error(`Raw transaction ${a} failed (${JSON.stringify(b)})`);return a}const pm=1e9,R6=Object.freeze(Object.defineProperty({__proto__:null,Account:D3,AddressLookupTableAccount:Qi,AddressLookupTableInstruction:w6,AddressLookupTableProgram:Po,Authorized:fm,BLOCKHASH_CACHE_TIMEOUT_MS:Qh,BPF_LOADER_DEPRECATED_PROGRAM_ID:v3,BPF_LOADER_PROGRAM_ID:$3,BpfLoader:V3,COMPUTE_BUDGET_INSTRUCTION_LAYOUTS:xn,ComputeBudgetInstruction:E6,ComputeBudgetProgram:Lo,Connection:lm,Ed25519Program:Oo,Enum:C3,EpochSchedule:Zh,FeeCalculatorLayout:Yh,Keypair:Sr,LAMPORTS_PER_SOL:pm,LOOKUP_TABLE_INSTRUCTION_LAYOUTS:Kn,Loader:Ur,Lockup:li,MAX_SEED_LENGTH:Kh,Message:cn,MessageAccountKeys:Vs,MessageV0:cr,NONCE_ACCOUNT_LENGTH:Cc,NonceAccount:Mo,PACKET_DATA_SIZE:or,PUBLIC_KEY_LENGTH:Dn,PublicKey:X,SIGNATURE_LENGTH_IN_BYTES:$s,SOLANA_SCHEMA:Us,STAKE_CONFIG_ID:um,STAKE_INSTRUCTION_LAYOUTS:Ct,SYSTEM_INSTRUCTION_LAYOUTS:Oe,SYSVAR_CLOCK_PUBKEY:dn,SYSVAR_EPOCH_SCHEDULE_PUBKEY:P3,SYSVAR_INSTRUCTIONS_PUBKEY:Gh,SYSVAR_RECENT_BLOCKHASHES_PUBKEY:Ui,SYSVAR_RENT_PUBKEY:Ir,SYSVAR_REWARDS_PUBKEY:L3,SYSVAR_SLOT_HASHES_PUBKEY:O3,SYSVAR_SLOT_HISTORY_PUBKEY:N3,SYSVAR_STAKE_HISTORY_PUBKEY:_i,Secp256k1Program:Dr,SendTransactionError:Qr,SolanaJSONRPCError:oe,SolanaJSONRPCErrorCode:z3,StakeAuthorizationLayout:D6,StakeInstruction:S6,StakeProgram:No,Struct:Ml,SystemInstruction:K3,SystemProgram:wt,Transaction:ke,TransactionExpiredBlockheightExceededError:To,TransactionExpiredNonceInvalidError:Kr,TransactionExpiredTimeoutError:Rl,TransactionInstruction:Me,TransactionMessage:Uo,TransactionStatus:On,VALIDATOR_INFO_KEY:mm,VERSION_PREFIX_MASK:Fo,VOTE_PROGRAM_ID:T6,ValidatorInfo:Nl,VersionedMessage:Wl,VersionedTransaction:_o,VoteAccount:zl,VoteAuthorizationLayout:k6,VoteInit:hm,VoteInstruction:v6,VoteProgram:ys,clusterApiUrl:bm,sendAndConfirmRawTransaction:M6,sendAndConfirmTransaction:xc},Symbol.toStringTag,{value:"Module"})),Hl="Solana",W6="11111111111111111111111111111111",pr=class pr{constructor(e){se(this,"type","Native");se(this,"address");pr.instanceof(e)?this.address=e.address:Ot.instanceof(e)?this.address=new X(e.toUint8Array()):typeof e=="string"&&Ft.valid(e)?this.address=new X(Ft.decode(e)):this.address=new X(e)}unwrap(){return this.address}toString(){return this.address.toBase58()}toUint8Array(){return new Uint8Array(this.address.toBytes())}toNative(){return this}toUniversalAddress(){return new Ot(this.toUint8Array())}static instanceof(e){return e.constructor.platform===pr.platform}equals(e){return pr.instanceof(e)?e.unwrap().equals(this.unwrap()):this.toUniversalAddress().equals(e)}};se(pr,"byteSize",32),se(pr,"platform",Hl);let to=pr;Jc(Hl,to);exports.AddressLookupTableAccount=Qi;exports.AddressLookupTableProgram=Po;exports.AutomaticRoute=R0;exports.BN=yc;exports.CircleTransfer=Bt;exports.ComputeBudgetProgram=Lo;exports.Connection=lm;exports.ErrNotWrapped=zp;exports.EventEmitter=Ul;exports.EvmAddress=ji;exports.EvmZeroAddress=f8;exports.Field=ls;exports.FinalizableRoute=t2;exports.FpInvertBatch=ho;exports.FpLegendre=Ja;exports.FpPow=Wf;exports.Hash=j0;exports.Hash$1=uo;exports.HashMD=qc;exports.Keypair=Sr;exports.LAMPORTS_PER_SOL=pm;exports.ManualRoute=pc;exports.Message=cn;exports.MessageV0=cr;exports.PlatformNativeSigner=vp;exports.PublicKey=X;exports.Route=Bo;exports.RouteResolver=M0;exports.RpcClient=zh;exports.SYSVAR_CLOCK_PUBKEY=dn;exports.SYSVAR_INSTRUCTIONS_PUBKEY=Gh;exports.SYSVAR_RENT_PUBKEY=Ir;exports.Secp256k1Program=Dr;exports.SendTransactionError=Qr;exports.SolanaAddress=to;exports.SolanaZeroAddress=W6;exports.SystemProgram=wt;exports.TokenTransfer=yt;exports.Transaction=ke;exports.TransactionExpiredBlockheightExceededError=To;exports.TransactionInstruction=Me;exports.TransactionMessage=Uo;exports.UniversalAddress=Ot;exports.VersionedTransaction=_o;exports.Wormhole=sn;exports._platform=yl;exports._platform$1=Hl;exports.abytes=Fn;exports.abytes$1=fo;exports.add=pn;exports.add3H=Af;exports.add3L=yf;exports.addChainId=u8;exports.addFixedValues=Km;exports.addFrom=d8;exports.aexists=Fr;exports.ahash=df;exports.anumber=Yr;exports.aoutput=Nc;exports.applyChainsConfigConfigOverrides=Ty;exports.assert=In;exports.assertArgument=er;exports.assertArgumentCount=o2;exports.assertNormalize=c2;exports.assertPrivate=l2;exports.asyncLoop=B2;exports.axios=ve;exports.b58=Gu;exports.b64=ao;exports.bech32=$u;exports.bignum=Fs;exports.bitGet=Tb;exports.bitLen=If;exports.bitMask=ti;exports.bnExports=fl;exports.bound=Mm;exports.browserExports=Ru;exports.bs58=St;exports.bufferPolyfill=ae;exports.bytes=Nt;exports.bytes$1=ml;exports.bytesToHex=$1;exports.bytesToNumberBE=sr;exports.canonicalAddress=Tn;exports.chainIdToChain=Oi;exports.chainItem=qt;exports.chainToChainId=co;exports.chainToPlatform=is;exports.checkOpts=D2;exports.checkOpts$1=Y1;exports.circleChainId=sf;exports.circleContractChains=P1;exports.circleContracts=Ya;exports.clean=$n;exports.clusterApiUrl=bm;exports.commonjsGlobal=an;exports.concat=f2;exports.concatBytes=C2;exports.concatBytes$1=Tr;exports.concatBytes$2=bf;exports.constMap=we;exports.createBase58check=s1;exports.createHasher=Js;exports.createOptHasher=X1;exports.createView=y2;exports.createView$1=ki;exports.customizableBytes=so;exports.dataLength=h2;exports.dataSlice=m2;exports.decomposeLiteral=Zf;exports.defineProperties=Ac;exports.deliveryInstructionLayout=l0;exports.denoise=Xm;exports.deserialize=Os;exports.deserialize$1=kn;exports.display=Ic;exports.dist=je;exports.ed25519=_r;exports.ensureBytes=Je;exports.envelopeLayout=nl;exports.estimateFinalityTime=Wc;exports.exists=wc;exports.expiration=Ms;exports.filters=os;exports.fromBaseUnits=$r;exports.fromBig=pf;exports.getAddress=Cr;exports.getAugmentedNamespace=kc;exports.getBytes=Mr;exports.getBytesCopy=d2;exports.getDefaultExportFromCjs=Ys;exports.getHash=$f;exports.getMinHashLength=Yc;exports.getTokenByAddress=Bp;exports.getTokenDetails=Jy;exports.guardianAttestationEta=Oc;exports.hash=g2;exports.headerLayout=tl;exports.hex=Ft;exports.hexToBytes=V1;exports.hexlify=si;exports.hmac=$c;exports.index_browser_esm=R6;exports.isAddressable=ih;exports.isAttested=qs;exports.isAutomatic=Qy;exports.isBytesLike=u2;exports.isCallException=i2;exports.isChain=lo;exports.isCompleted=Oy;exports.isDestinationQueued=Ly;exports.isEqualCaseInsensitive=Zu;exports.isError=L0;exports.isFailed=Ny;exports.isFinalizable=n2;exports.isHexString=hl;exports.isManual=e2;exports.isNative=Lt;exports.isRedeemed=dl;exports.isRefunded=Py;exports.isSameToken=e0;exports.isSignAndSendSigner=sl;exports.isSignOnlySigner=r0;exports.isSourceFinalized=Hs;exports.isSourceInitiated=ll;exports.isTokenId=bo;exports.isWormholeMessageId=Br;exports.kdfInputToBytes=G1;exports.keccak256=hs;exports.keccak_256=Rs;exports.makeError=O0;exports.mapHashToField=Of;exports.median=Tm;exports.memoized=Ws;exports.mod=He;exports.nativeDecimals=ef;exports.nativeTokenId=Qf;exports.networkChainToNativeChainId=rf;exports.networkPlatformConfigs=U0;exports.notImplemented=_b;exports.number=Ks;exports.output=H0;exports.parse=xi;exports.payloadLiteralToPayloadItemLayout=Jf;exports.platformNativeChainIdToNetworkChain=w1;exports.porticoContractChains=L1;exports.randomBytes=v2;exports.randomBytes$1=Hc;exports.registerNative=Jc;exports.registerPayloadTypes=Et;exports.resolveAddress=a8;exports.resolveProperties=s2;exports.resolveWrappedToken=t0;exports.rotl=H1;exports.rotr=A2;exports.rotr32H=eb;exports.rotr32L=tb;exports.rotrBH=Ss;exports.rotrBL=Ds;exports.rotrSH=dr;exports.rotrSL=ur;exports.rpcAddress=tf;exports.safeBufferExports=W0;exports.scale=vs;exports.secp256k1=Qn;exports.serialize=oc;exports.serialize$1=vn;exports.serializePayload=yp;exports.sha256=Kc;exports.sha256$1=Ni;exports.sha3_256=Sb;exports.sha512=Db;exports.sha512$1=jc;exports.signSendWait=zs;exports.swap32IfBE=Xa;exports.swap8IfBE=q1;exports.tbtc=vi;exports.toBigIntLE_1=Uh;exports.toBufferLE_1=kl;exports.toBytes=bl;exports.toBytes$1=as;exports.toChain=ss;exports.toChainId=Zs;exports.toCircleChain=Di;exports.toNative=ar;exports.toUniversal=Gf;exports.tokenBridgeChains=R1;exports.tokenBridgeRelayerChains=W1;exports.truncate=Ci;exports.u32$1=K0;exports.u32$2=uf;exports.u64=K2;exports.units=wn;exports.universalAddress=Sp;exports.universalAddressItem=xe;exports.unusedArbiterFee=l8;exports.unusedNonce=c8;exports.usdcContract=Ts;exports.utf8ToBytes=Fb;exports.utf8ToBytes$1=zc;exports.validateObject=cs;exports.version=P0;exports.weierstrass=jf;exports.weierstrassPoints=Kf;exports.whole=ks;exports.wrapConstructor=$0;exports.zeroPadBytes=p2;exports.zeroPadValue=b2;
|