@wormhole-foundation/wormhole-connect 3.0.1-beta.6-development → 3.0.1-beta.7-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.
Files changed (298) hide show
  1. package/dist/assets/{evm-CP2QogPh.js → evm-Daw1hnd1.js} +1 -1
  2. package/dist/assets/{tokens-p0GcG7JT.js → tokens-CD1l6Xjr.js} +13 -13
  3. package/dist/main.js +81 -81
  4. package/dist/src/AppRouter.d.ts.map +1 -1
  5. package/dist/src/components/AssetBadge.d.ts.map +1 -1
  6. package/dist/src/components/ConfigurablePageHeader.d.ts +4 -0
  7. package/dist/src/components/ConfigurablePageHeader.d.ts.map +1 -0
  8. package/dist/src/components/SampleApp/index.d.ts.map +1 -1
  9. package/dist/src/components/v3/AlertBanner.d.ts +14 -0
  10. package/dist/src/components/v3/AlertBanner.d.ts.map +1 -0
  11. package/dist/src/components/v3/Button.d.ts +22 -0
  12. package/dist/src/components/v3/Button.d.ts.map +1 -0
  13. package/dist/src/config/ui.d.ts +1 -1
  14. package/dist/src/config/ui.d.ts.map +1 -1
  15. package/dist/src/hooks/useAmountValidation.d.ts +2 -2
  16. package/dist/src/hooks/useAmountValidation.d.ts.map +1 -1
  17. package/dist/src/icons/Clock.d.ts +5 -0
  18. package/dist/src/icons/Clock.d.ts.map +1 -0
  19. package/dist/src/icons/SwapVertical.d.ts +5 -0
  20. package/dist/src/icons/SwapVertical.d.ts.map +1 -0
  21. package/dist/src/icons/TokenIcons.d.ts +1 -1
  22. package/dist/src/icons/TokenIcons.d.ts.map +1 -1
  23. package/dist/src/theme.d.ts +10 -3
  24. package/dist/src/theme.d.ts.map +1 -1
  25. package/dist/src/views/v3/Bridge/AmountInput/index.d.ts +21 -0
  26. package/dist/src/views/v3/Bridge/AmountInput/index.d.ts.map +1 -0
  27. package/dist/src/views/v3/Bridge/AmountValidationError.d.ts +11 -0
  28. package/dist/src/views/v3/Bridge/AmountValidationError.d.ts.map +1 -0
  29. package/dist/src/views/v3/Bridge/AssetPicker/ChainList.d.ts +16 -0
  30. package/dist/src/views/v3/Bridge/AssetPicker/ChainList.d.ts.map +1 -0
  31. package/dist/src/views/v3/Bridge/AssetPicker/PickerBottomSheet.d.ts +31 -0
  32. package/dist/src/views/v3/Bridge/AssetPicker/PickerBottomSheet.d.ts.map +1 -0
  33. package/dist/src/views/v3/Bridge/AssetPicker/PickerModal.d.ts +32 -0
  34. package/dist/src/views/v3/Bridge/AssetPicker/PickerModal.d.ts.map +1 -0
  35. package/dist/src/views/v3/Bridge/AssetPicker/SearchableList/SearchInput.d.ts +11 -0
  36. package/dist/src/views/v3/Bridge/AssetPicker/SearchableList/SearchInput.d.ts.map +1 -0
  37. package/dist/src/views/v3/Bridge/AssetPicker/SearchableList/index.d.ts +20 -0
  38. package/dist/src/views/v3/Bridge/AssetPicker/SearchableList/index.d.ts.map +1 -0
  39. package/dist/src/views/v3/Bridge/AssetPicker/TokenItem.d.ts +16 -0
  40. package/dist/src/views/v3/Bridge/AssetPicker/TokenItem.d.ts.map +1 -0
  41. package/dist/src/views/v3/Bridge/AssetPicker/TokenList.d.ts +24 -0
  42. package/dist/src/views/v3/Bridge/AssetPicker/TokenList.d.ts.map +1 -0
  43. package/dist/src/views/v3/Bridge/AssetPicker/index.d.ts +32 -0
  44. package/dist/src/views/v3/Bridge/AssetPicker/index.d.ts.map +1 -0
  45. package/dist/src/views/v3/Bridge/GasSlider/index.d.ts +11 -0
  46. package/dist/src/views/v3/Bridge/GasSlider/index.d.ts.map +1 -0
  47. package/dist/src/views/v3/Bridge/Routes/RouteBadge.d.ts +9 -0
  48. package/dist/src/views/v3/Bridge/Routes/RouteBadge.d.ts.map +1 -0
  49. package/dist/src/views/v3/Bridge/Routes/RoutesBottomSheet.d.ts +26 -0
  50. package/dist/src/views/v3/Bridge/Routes/RoutesBottomSheet.d.ts.map +1 -0
  51. package/dist/src/views/v3/Bridge/Routes/RoutesList.d.ts +20 -0
  52. package/dist/src/views/v3/Bridge/Routes/RoutesList.d.ts.map +1 -0
  53. package/dist/src/views/v3/Bridge/Routes/RoutesModal.d.ts +25 -0
  54. package/dist/src/views/v3/Bridge/Routes/RoutesModal.d.ts.map +1 -0
  55. package/dist/src/views/v3/Bridge/Routes/SingleRoute.d.ts +17 -0
  56. package/dist/src/views/v3/Bridge/Routes/SingleRoute.d.ts.map +1 -0
  57. package/dist/src/views/v3/Bridge/Routes/index.d.ts +13 -0
  58. package/dist/src/views/v3/Bridge/Routes/index.d.ts.map +1 -0
  59. package/dist/src/views/v3/Bridge/SwapInputs/index.d.ts +5 -0
  60. package/dist/src/views/v3/Bridge/SwapInputs/index.d.ts.map +1 -0
  61. package/dist/src/views/v3/Bridge/WalletConnector/Controller.d.ts +8 -0
  62. package/dist/src/views/v3/Bridge/WalletConnector/Controller.d.ts.map +1 -0
  63. package/dist/src/views/v3/Bridge/WalletConnector/ExplorerLink.d.ts +10 -0
  64. package/dist/src/views/v3/Bridge/WalletConnector/ExplorerLink.d.ts.map +1 -0
  65. package/dist/src/views/v3/Bridge/WalletConnector/Sidebar.d.ts +11 -0
  66. package/dist/src/views/v3/Bridge/WalletConnector/Sidebar.d.ts.map +1 -0
  67. package/dist/src/views/v3/Bridge/WalletConnector/index.d.ts +11 -0
  68. package/dist/src/views/v3/Bridge/WalletConnector/index.d.ts.map +1 -0
  69. package/dist/src/views/v3/Bridge/index.d.ts +5 -0
  70. package/dist/src/views/v3/Bridge/index.d.ts.map +1 -0
  71. package/dist/src/views/v3/Redeem/TransactionDetails/index.d.ts +4 -0
  72. package/dist/src/views/v3/Redeem/TransactionDetails/index.d.ts.map +1 -0
  73. package/dist/src/views/v3/Redeem/index.d.ts +5 -0
  74. package/dist/src/views/v3/Redeem/index.d.ts.map +1 -0
  75. package/dist/src/views/v3/TxHistory/Item/index.d.ts +8 -0
  76. package/dist/src/views/v3/TxHistory/Item/index.d.ts.map +1 -0
  77. package/dist/src/views/v3/TxHistory/Widget/Item.d.ts +9 -0
  78. package/dist/src/views/v3/TxHistory/Widget/Item.d.ts.map +1 -0
  79. package/dist/src/views/v3/TxHistory/Widget/index.d.ts +6 -0
  80. package/dist/src/views/v3/TxHistory/Widget/index.d.ts.map +1 -0
  81. package/dist/src/views/v3/TxHistory/index.d.ts +4 -0
  82. package/dist/src/views/v3/TxHistory/index.d.ts.map +1 -0
  83. package/lib/{account-DtI49BC9.mjs → account-BXlWsVcD.mjs} +1 -1
  84. package/lib/{account-BNVdeY3i.js → account-D3Whnyky.js} +1 -1
  85. package/lib/address-B2sdpJNe.js +1 -0
  86. package/lib/{address-DHjpQ41W.js → address-CFAt6HNS.js} +1 -1
  87. package/lib/{address-C4qO2bMD.mjs → address-CZArADcj.mjs} +1 -1
  88. package/lib/{address-BJhcbdG9.mjs → address-DPWm1fbw.mjs} +212 -205
  89. package/lib/{address-XxuWo72f.js → address-DpQlJQKV.js} +7 -7
  90. package/lib/{address-QpeLv2yn.mjs → address-YYxpimx3.mjs} +277 -276
  91. package/lib/{aptos-BPPwy9CZ.js → aptos-BQFrxLpU.js} +1 -1
  92. package/lib/{aptos-b3ytowip.js → aptos-C6eC7BKq.js} +2 -2
  93. package/lib/{aptos-C8FBg3S2.mjs → aptos-DNhNK-_f.mjs} +7 -7
  94. package/lib/{aptos-ButqYPXo.mjs → aptos-YbewU4Io.mjs} +3 -3
  95. package/lib/{basic-YNjcoRfK.js → basic-BH3rU0o2.js} +1 -1
  96. package/lib/{basic-BDC-Dz2c.mjs → basic-CVEIWCYi.mjs} +2 -2
  97. package/lib/{basic-B5VNsnap.mjs → basic-D3Mgm4Qb.mjs} +2 -2
  98. package/lib/{basic-BR_WJgiZ.js → basic-kfvhCLeC.js} +1 -1
  99. package/lib/{blake2b-5ZGBTE8v.mjs → blake2b-BFJ9US29.mjs} +7 -7
  100. package/lib/{blake2b-BJ4wVK7V.js → blake2b-aUiblHhG.js} +1 -1
  101. package/lib/{browser-ponyfill-C53najnL.js → browser-ponyfill-BeX4lPJd.js} +1 -1
  102. package/lib/{browser-ponyfill-CuZzL5JS.mjs → browser-ponyfill-Cn2t1qf7.mjs} +1 -1
  103. package/lib/{chain-B7MIR9_r.mjs → chain-D5okRkwk.mjs} +1 -1
  104. package/lib/{chain-CSpjwyBt.js → chain-Dme8n2tA.js} +1 -1
  105. package/lib/{chunk-KJH4KKG6-qC3BvugF.mjs → chunk-KJH4KKG6-DTOJZuhY.mjs} +144 -144
  106. package/lib/{chunk-KJH4KKG6-B9iq51o1.js → chunk-KJH4KKG6-HfCF1Kt-.js} +1 -1
  107. package/lib/{constants-DWhraRof.mjs → constants-BHQAYN6w.mjs} +3 -3
  108. package/lib/{constants-BA7a60_u.js → constants-BsKTcZQ3.js} +1 -1
  109. package/lib/{contract-D4Vzf62E.mjs → contract-CjL0DzEO.mjs} +39 -39
  110. package/lib/{contract-CQnkFb54.js → contract-DPL0fm8A.js} +1 -1
  111. package/lib/{core-DY8-r2Jo.mjs → core-C67jLszg.mjs} +7 -7
  112. package/lib/{core-DzA-Itto.js → core-DmZlgGHj.js} +3 -3
  113. package/lib/{create-CtvZoy0X.mjs → create-BlfwwO0_.mjs} +3 -3
  114. package/lib/{create-DCJBhyHG.js → create-CovWyutZ.js} +1 -1
  115. package/lib/{evm-BvQ1H4_y.js → evm-BWTWGvAv.js} +2 -2
  116. package/lib/{evm-Dn0xYGMV.mjs → evm-BohuNM6V.mjs} +9 -9
  117. package/lib/{evm-CrfP3Qfk.js → evm-CqywsvEZ.js} +2 -2
  118. package/lib/{evm-BfefVZFh.mjs → evm-M0ImOGaN.mjs} +7 -7
  119. package/lib/executor.js +1 -1
  120. package/lib/executor.mjs +46 -46
  121. package/lib/hosted.js +1 -1
  122. package/lib/hosted.mjs +1 -1
  123. package/lib/{index-CnCmR4Uj.js → index-2CmAUr-U.js} +1 -1
  124. package/lib/{index-DF2WGKez.js → index-85b_tiAE.js} +1 -1
  125. package/lib/{index-Ct88Toxl.mjs → index-95FB4Qgc.mjs} +3 -3
  126. package/lib/{index-lN-puZih.js → index-B7ho7Pb6.js} +1 -1
  127. package/lib/{index-DbPhljz1.mjs → index-BAUIp5vX.mjs} +15 -15
  128. package/lib/{index-DQp_O8iB.mjs → index-BCZtiDee.mjs} +4 -4
  129. package/lib/{index-BiS8vv7E.mjs → index-BGq4wC4S.mjs} +1 -1
  130. package/lib/{index-CBHIr2qc.mjs → index-BQuPDPUZ.mjs} +14 -14
  131. package/lib/{index-C1NzL1cw.mjs → index-BSj3tfTR.mjs} +3 -3
  132. package/lib/{index-CbVRI3aO.mjs → index-BV1jWLbR.mjs} +40 -40
  133. package/lib/{index-CXwf1C77.mjs → index-BXk8QNCQ.mjs} +6 -6
  134. package/lib/{index-DwX86vgy.mjs → index-BcAk5RDV.mjs} +31 -31
  135. package/lib/{index-BarjntIo.mjs → index-BgOkhLJ5.mjs} +4 -4
  136. package/lib/{index-BjbPJ-9w.js → index-BkPAiliF.js} +1 -1
  137. package/lib/{index-DLilRB-O.js → index-Bn-q9qez.js} +1 -1
  138. package/lib/{index-3pNz5RJC.js → index-Bt7K1A1Q.js} +1 -1
  139. package/lib/{index-BrjiGZLN.mjs → index-C-NwpT7M.mjs} +4 -4
  140. package/lib/{index-B2oGf_0Z.js → index-C7dcnZ_Y.js} +1 -1
  141. package/lib/{index-BuxGl_Bi.js → index-C9Mdci2_.js} +1 -1
  142. package/lib/index-CBBfcDND.js +335 -0
  143. package/lib/{index-BGsoGuxr.js → index-CGjibiRn.js} +1 -1
  144. package/lib/{index-Yra08X_i.js → index-CJ_ewe88.js} +1 -1
  145. package/lib/{index-CS1x3lLl.mjs → index-CMyIX4q3.mjs} +1 -1
  146. package/lib/{index-C6plXYir.mjs → index-CPq5TByt.mjs} +31052 -27169
  147. package/lib/{index-Czoo2lwG.mjs → index-Cd2G9Q0O.mjs} +2 -2
  148. package/lib/{index-iXUxUBar.js → index-D8YqkJyN.js} +1 -1
  149. package/lib/{index-BG9uNreI.js → index-DMtTF3lo.js} +1 -1
  150. package/lib/{index-DrcGXX5n.mjs → index-DRZtHRGC.mjs} +5 -5
  151. package/lib/{index-BZsgCHbh.js → index-DSFtUxH1.js} +1 -1
  152. package/lib/{index-B9Jj-myq.mjs → index-DYspQsyV.mjs} +4 -4
  153. package/lib/{index-BPdR4VSR.mjs → index-Difh_8Uq.mjs} +35 -35
  154. package/lib/{index-D2-kSqKC.mjs → index-Dl11esS0.mjs} +12 -12
  155. package/lib/{index-Dg1FDsF7.js → index-DlZQ535U.js} +1 -1
  156. package/lib/{index-DPZNqrkJ.mjs → index-DnaDROoD.mjs} +3 -3
  157. package/lib/{index-C6deIq6M.js → index-DocFg1hF.js} +1 -1
  158. package/lib/{index-BHv9flJb.js → index-DpEQBLtA.js} +1 -1
  159. package/lib/{index-OjOZm9KZ.mjs → index-DpSdWR-Q.mjs} +19 -19
  160. package/lib/{index-DCIXsPdt.js → index-DzxRHhWq.js} +1 -1
  161. package/lib/{index-BYNs7o4U.js → index-LMdITOCB.js} +1 -1
  162. package/lib/{index-C3JpIduu.js → index-cT-KFIxA.js} +1 -1
  163. package/lib/{index-TWJ3iDnH.js → index-k6e49slq.js} +1 -1
  164. package/lib/{index-t4mLpVUg.mjs → index-uuu1viWa.mjs} +1 -1
  165. package/lib/{index.es-CGmlPDhv.js → index.es-BYFwv7lT.js} +1 -1
  166. package/lib/{index.es-Cv23C4D_.mjs → index.es-BhhigIOQ.mjs} +3 -3
  167. package/lib/{index.es-C-nP3Wu4.mjs → index.es-DGqzeimm.mjs} +5 -5
  168. package/lib/{index.es-DOcp1QIZ.js → index.es-Fc3_m80E.js} +3 -3
  169. package/lib/index.js +1 -1
  170. package/lib/index.mjs +2 -2
  171. package/lib/mayan.js +9 -2
  172. package/lib/mayan.mjs +21900 -18117
  173. package/lib/{mint-DDRe5tvc.js → mint-C2AsTCD2.js} +1 -1
  174. package/lib/{mint-CwWYApOB.mjs → mint-CLB7p3ZL.mjs} +2 -2
  175. package/lib/ntt.js +1 -1
  176. package/lib/ntt.mjs +2370 -2323
  177. package/lib/{platform-Cdz3d-G9.js → platform-Cl1b31bn.js} +1 -1
  178. package/lib/{platform-C2My6P6V.js → platform-DV62YjSS.js} +1 -1
  179. package/lib/{platform-CkZe-n0U.js → platform-Dw5tN12f.js} +1 -1
  180. package/lib/{platform-B0QvkHbE.mjs → platform-bCY3DvqI.mjs} +14 -14
  181. package/lib/{platform-lg76WojY.mjs → platform-mkzPOtcO.mjs} +42 -21
  182. package/lib/{platform-IW8iV_CA.mjs → platform-pX0KL6zm.mjs} +6 -6
  183. package/lib/{provider-jsonrpc-Bd_Ha8XL.js → provider-jsonrpc-B0bAKP-a.js} +1 -1
  184. package/lib/{provider-jsonrpc-BXNY8lbA.mjs → provider-jsonrpc-DwKu1fjn.mjs} +120 -120
  185. package/lib/{secp256k1-BaYwfoJI.js → secp256k1-1EcPGQYM.js} +1 -1
  186. package/lib/{secp256k1-etdIygIN.mjs → secp256k1-6Zr6y_zm.mjs} +1 -1
  187. package/lib/{secp256k1-D3q9LbdQ.js → secp256k1-7IiVcfA7.js} +1 -1
  188. package/lib/{secp256k1-luy_3ZLQ.mjs → secp256k1-BeZAjIBs.mjs} +1 -1
  189. package/lib/{secp256k1-Cplgnjin.mjs → secp256k1-DXI-6Erh.mjs} +1 -1
  190. package/lib/{secp256k1-CuaGNRQC.js → secp256k1-Y38qxq0y.js} +1 -1
  191. package/lib/{signer-DKbAIeFy.mjs → signer-CzGPDOMI.mjs} +20 -20
  192. package/lib/{signer-BrSuBAB7.js → signer-D6-3r3Sp.js} +1 -1
  193. package/lib/{solana-BnirZbTQ.js → solana-Da7iWCux.js} +4 -4
  194. package/lib/solana-mjJtTggS.js +1 -0
  195. package/lib/{solana-DR8_Oms-.mjs → solana-os3Osxo6.mjs} +10 -10
  196. package/lib/solana-vo_l-zLm.mjs +18 -0
  197. package/lib/{solanaEmbed.esm-fUPiKqY3.mjs → solanaEmbed.esm-BBnVqCsz.mjs} +2 -2
  198. package/lib/{solanaEmbed.esm-BKWwcEou.js → solanaEmbed.esm-RhVD6vLR.js} +1 -1
  199. package/lib/src/AppRouter.d.ts.map +1 -1
  200. package/lib/src/components/AssetBadge.d.ts.map +1 -1
  201. package/lib/src/components/ConfigurablePageHeader.d.ts +4 -0
  202. package/lib/src/components/ConfigurablePageHeader.d.ts.map +1 -0
  203. package/lib/src/components/SampleApp/index.d.ts.map +1 -1
  204. package/lib/src/components/v3/AlertBanner.d.ts +14 -0
  205. package/lib/src/components/v3/AlertBanner.d.ts.map +1 -0
  206. package/lib/src/components/v3/Button.d.ts +22 -0
  207. package/lib/src/components/v3/Button.d.ts.map +1 -0
  208. package/lib/src/config/ui.d.ts +1 -1
  209. package/lib/src/config/ui.d.ts.map +1 -1
  210. package/lib/src/hooks/useAmountValidation.d.ts +2 -2
  211. package/lib/src/hooks/useAmountValidation.d.ts.map +1 -1
  212. package/lib/src/icons/Clock.d.ts +5 -0
  213. package/lib/src/icons/Clock.d.ts.map +1 -0
  214. package/lib/src/icons/SwapVertical.d.ts +5 -0
  215. package/lib/src/icons/SwapVertical.d.ts.map +1 -0
  216. package/lib/src/icons/TokenIcons.d.ts +1 -1
  217. package/lib/src/icons/TokenIcons.d.ts.map +1 -1
  218. package/lib/src/theme.d.ts +10 -3
  219. package/lib/src/theme.d.ts.map +1 -1
  220. package/lib/src/views/v3/Bridge/AmountInput/index.d.ts +21 -0
  221. package/lib/src/views/v3/Bridge/AmountInput/index.d.ts.map +1 -0
  222. package/lib/src/views/v3/Bridge/AmountValidationError.d.ts +11 -0
  223. package/lib/src/views/v3/Bridge/AmountValidationError.d.ts.map +1 -0
  224. package/lib/src/views/v3/Bridge/AssetPicker/ChainList.d.ts +16 -0
  225. package/lib/src/views/v3/Bridge/AssetPicker/ChainList.d.ts.map +1 -0
  226. package/lib/src/views/v3/Bridge/AssetPicker/PickerBottomSheet.d.ts +31 -0
  227. package/lib/src/views/v3/Bridge/AssetPicker/PickerBottomSheet.d.ts.map +1 -0
  228. package/lib/src/views/v3/Bridge/AssetPicker/PickerModal.d.ts +32 -0
  229. package/lib/src/views/v3/Bridge/AssetPicker/PickerModal.d.ts.map +1 -0
  230. package/lib/src/views/v3/Bridge/AssetPicker/SearchableList/SearchInput.d.ts +11 -0
  231. package/lib/src/views/v3/Bridge/AssetPicker/SearchableList/SearchInput.d.ts.map +1 -0
  232. package/lib/src/views/v3/Bridge/AssetPicker/SearchableList/index.d.ts +20 -0
  233. package/lib/src/views/v3/Bridge/AssetPicker/SearchableList/index.d.ts.map +1 -0
  234. package/lib/src/views/v3/Bridge/AssetPicker/TokenItem.d.ts +16 -0
  235. package/lib/src/views/v3/Bridge/AssetPicker/TokenItem.d.ts.map +1 -0
  236. package/lib/src/views/v3/Bridge/AssetPicker/TokenList.d.ts +24 -0
  237. package/lib/src/views/v3/Bridge/AssetPicker/TokenList.d.ts.map +1 -0
  238. package/lib/src/views/v3/Bridge/AssetPicker/index.d.ts +32 -0
  239. package/lib/src/views/v3/Bridge/AssetPicker/index.d.ts.map +1 -0
  240. package/lib/src/views/v3/Bridge/GasSlider/index.d.ts +11 -0
  241. package/lib/src/views/v3/Bridge/GasSlider/index.d.ts.map +1 -0
  242. package/lib/src/views/v3/Bridge/Routes/RouteBadge.d.ts +9 -0
  243. package/lib/src/views/v3/Bridge/Routes/RouteBadge.d.ts.map +1 -0
  244. package/lib/src/views/v3/Bridge/Routes/RoutesBottomSheet.d.ts +26 -0
  245. package/lib/src/views/v3/Bridge/Routes/RoutesBottomSheet.d.ts.map +1 -0
  246. package/lib/src/views/v3/Bridge/Routes/RoutesList.d.ts +20 -0
  247. package/lib/src/views/v3/Bridge/Routes/RoutesList.d.ts.map +1 -0
  248. package/lib/src/views/v3/Bridge/Routes/RoutesModal.d.ts +25 -0
  249. package/lib/src/views/v3/Bridge/Routes/RoutesModal.d.ts.map +1 -0
  250. package/lib/src/views/v3/Bridge/Routes/SingleRoute.d.ts +17 -0
  251. package/lib/src/views/v3/Bridge/Routes/SingleRoute.d.ts.map +1 -0
  252. package/lib/src/views/v3/Bridge/Routes/index.d.ts +13 -0
  253. package/lib/src/views/v3/Bridge/Routes/index.d.ts.map +1 -0
  254. package/lib/src/views/v3/Bridge/SwapInputs/index.d.ts +5 -0
  255. package/lib/src/views/v3/Bridge/SwapInputs/index.d.ts.map +1 -0
  256. package/lib/src/views/v3/Bridge/WalletConnector/Controller.d.ts +8 -0
  257. package/lib/src/views/v3/Bridge/WalletConnector/Controller.d.ts.map +1 -0
  258. package/lib/src/views/v3/Bridge/WalletConnector/ExplorerLink.d.ts +10 -0
  259. package/lib/src/views/v3/Bridge/WalletConnector/ExplorerLink.d.ts.map +1 -0
  260. package/lib/src/views/v3/Bridge/WalletConnector/Sidebar.d.ts +11 -0
  261. package/lib/src/views/v3/Bridge/WalletConnector/Sidebar.d.ts.map +1 -0
  262. package/lib/src/views/v3/Bridge/WalletConnector/index.d.ts +11 -0
  263. package/lib/src/views/v3/Bridge/WalletConnector/index.d.ts.map +1 -0
  264. package/lib/src/views/v3/Bridge/index.d.ts +5 -0
  265. package/lib/src/views/v3/Bridge/index.d.ts.map +1 -0
  266. package/lib/src/views/v3/Redeem/TransactionDetails/index.d.ts +4 -0
  267. package/lib/src/views/v3/Redeem/TransactionDetails/index.d.ts.map +1 -0
  268. package/lib/src/views/v3/Redeem/index.d.ts +5 -0
  269. package/lib/src/views/v3/Redeem/index.d.ts.map +1 -0
  270. package/lib/src/views/v3/TxHistory/Item/index.d.ts +8 -0
  271. package/lib/src/views/v3/TxHistory/Item/index.d.ts.map +1 -0
  272. package/lib/src/views/v3/TxHistory/Widget/Item.d.ts +9 -0
  273. package/lib/src/views/v3/TxHistory/Widget/Item.d.ts.map +1 -0
  274. package/lib/src/views/v3/TxHistory/Widget/index.d.ts +6 -0
  275. package/lib/src/views/v3/TxHistory/Widget/index.d.ts.map +1 -0
  276. package/lib/src/views/v3/TxHistory/index.d.ts +4 -0
  277. package/lib/src/views/v3/TxHistory/index.d.ts.map +1 -0
  278. package/lib/{sui-BTGAAvA9.js → sui-BCWT_MP3.js} +1 -1
  279. package/lib/{sui-BBqJwRM0.mjs → sui-CFKprzku.mjs} +3 -3
  280. package/lib/{sui-DTftSE5y.js → sui-CO5gTC2j.js} +1 -1
  281. package/lib/{sui-DAYuRjfB.mjs → sui-rzSF8U-3.mjs} +33 -33
  282. package/lib/{tokens-tq3iPasz.js → tokens-D2BbVV4x.js} +1 -1
  283. package/lib/{tokens-Bdu7ORRI.mjs → tokens-D74pLzp3.mjs} +3 -3
  284. package/lib/{units-Brhe0Yro.mjs → units-BGcsq4mJ.mjs} +24 -24
  285. package/lib/{units-CMwYFpwc.js → units-CFxZtEkH.js} +1 -1
  286. package/lib/{unsignedTransaction-Brbbx5Uc.mjs → unsignedTransaction-BHbKxuLa.mjs} +14 -14
  287. package/lib/{unsignedTransaction-q5Fk1S0o.js → unsignedTransaction-D14ic9We.js} +1 -1
  288. package/lib/{w3m-modal-BfRfCY9F.js → w3m-modal-253PNp3t.js} +1 -1
  289. package/lib/{w3m-modal-CtPzALaO.mjs → w3m-modal-BXoUHiVS.mjs} +2 -2
  290. package/lib/{w3m-modal-BhCXAHBR.js → w3m-modal-Dr98fjep.js} +1 -1
  291. package/lib/{w3m-modal-Dbhbe_NS.mjs → w3m-modal-vJ0TMybJ.mjs} +2 -2
  292. package/lib/{web3-Atnj-SZ3.mjs → web3-C7dEQmtr.mjs} +6 -6
  293. package/lib/{web3-DinKgkT9.js → web3-Co7tl8ed.js} +1 -1
  294. package/package.json +32 -33
  295. package/lib/address-BWzhA9di.js +0 -1
  296. package/lib/index-BjP-grbs.js +0 -299
  297. package/lib/solana-D_QkC8QG.mjs +0 -18
  298. package/lib/solana-pu7cIYt0.js +0 -1
@@ -1,15 +1,15 @@
1
- "use strict";var Fm=Object.defineProperty;var Tm=(t,e,n)=>e in t?Fm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var ie=(t,e,n)=>Tm(t,typeof e!="symbol"?e+"":e,n);var an=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Js(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ic(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return t[r]}})}),n}var Ne={},ae={},fo={};fo.byteLength=_m;fo.toByteArray=Rm;fo.fromByteArray=Lm;var xn=[],en=[],Im=typeof Uint8Array<"u"?Uint8Array:Array,ya="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var zr=0,Um=ya.length;zr<Um;++zr)xn[zr]=ya[zr],en[ya.charCodeAt(zr)]=zr;en[45]=62;en[95]=63;function Wu(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function _m(t){var e=Wu(t),n=e[0],r=e[1];return(n+r)*3/4-r}function Mm(t,e,n){return(e+n)*3/4-n}function Rm(t){var e,n=Wu(t),r=n[0],s=n[1],i=new Im(Mm(t,r,s)),o=0,a=s>0?r-4:r,l;for(l=0;l<a;l+=4)e=en[t.charCodeAt(l)]<<18|en[t.charCodeAt(l+1)]<<12|en[t.charCodeAt(l+2)]<<6|en[t.charCodeAt(l+3)],i[o++]=e>>16&255,i[o++]=e>>8&255,i[o++]=e&255;return s===2&&(e=en[t.charCodeAt(l)]<<2|en[t.charCodeAt(l+1)]>>4,i[o++]=e&255),s===1&&(e=en[t.charCodeAt(l)]<<10|en[t.charCodeAt(l+1)]<<4|en[t.charCodeAt(l+2)]>>2,i[o++]=e>>8&255,i[o++]=e&255),i}function Wm(t){return xn[t>>18&63]+xn[t>>12&63]+xn[t>>6&63]+xn[t&63]}function Pm(t,e,n){for(var r,s=[],i=e;i<n;i+=3)r=(t[i]<<16&16711680)+(t[i+1]<<8&65280)+(t[i+2]&255),s.push(Wm(r));return s.join("")}function Lm(t){for(var e,n=t.length,r=n%3,s=[],i=16383,o=0,a=n-r;o<a;o+=i)s.push(Pm(t,o,o+i>a?a:o+i));return r===1?(e=t[n-1],s.push(xn[e>>2]+xn[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],s.push(xn[e>>10]+xn[e>>4&63]+xn[e<<2&63]+"=")),s.join("")}var Uc={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Uc.read=function(t,e,n,r,s){var i,o,a=s*8-r-1,l=(1<<a)-1,f=l>>1,m=-7,p=n?s-1:0,C=n?-1:1,w=t[e+p];for(p+=C,i=w&(1<<-m)-1,w>>=-m,m+=a;m>0;i=i*256+t[e+p],p+=C,m-=8);for(o=i&(1<<-m)-1,i>>=-m,m+=r;m>0;o=o*256+t[e+p],p+=C,m-=8);if(i===0)i=1-f;else{if(i===l)return o?NaN:(w?-1:1)*(1/0);o=o+Math.pow(2,r),i=i-f}return(w?-1:1)*o*Math.pow(2,i-r)};Uc.write=function(t,e,n,r,s,i){var o,a,l,f=i*8-s-1,m=(1<<f)-1,p=m>>1,C=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=r?0:i-1,F=r?1:-1,I=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=m):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+p>=1?e+=C/l:e+=C*Math.pow(2,1-p),e*l>=2&&(o++,l/=2),o+p>=m?(a=0,o=m):o+p>=1?(a=(e*l-1)*Math.pow(2,s),o=o+p):(a=e*Math.pow(2,p-1)*Math.pow(2,s),o=0));s>=8;t[n+w]=a&255,w+=F,a/=256,s-=8);for(o=o<<s|a,f+=s;f>0;t[n+w]=o&255,w+=F,o/=256,f-=8);t[n+w-F]|=I*128};/*!
1
+ "use strict";var Fm=Object.defineProperty;var Tm=(t,e,n)=>e in t?Fm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var ie=(t,e,n)=>Tm(t,typeof e!="symbol"?e+"":e,n);var an=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Js(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ic(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return t[r]}})}),n}var Ne={},ae={},ho={};ho.byteLength=_m;ho.toByteArray=Rm;ho.fromByteArray=Lm;var xn=[],en=[],Im=typeof Uint8Array<"u"?Uint8Array:Array,ga="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var zr=0,Um=ga.length;zr<Um;++zr)xn[zr]=ga[zr],en[ga.charCodeAt(zr)]=zr;en[45]=62;en[95]=63;function Wu(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function _m(t){var e=Wu(t),n=e[0],r=e[1];return(n+r)*3/4-r}function Mm(t,e,n){return(e+n)*3/4-n}function Rm(t){var e,n=Wu(t),r=n[0],s=n[1],i=new Im(Mm(t,r,s)),o=0,a=s>0?r-4:r,l;for(l=0;l<a;l+=4)e=en[t.charCodeAt(l)]<<18|en[t.charCodeAt(l+1)]<<12|en[t.charCodeAt(l+2)]<<6|en[t.charCodeAt(l+3)],i[o++]=e>>16&255,i[o++]=e>>8&255,i[o++]=e&255;return s===2&&(e=en[t.charCodeAt(l)]<<2|en[t.charCodeAt(l+1)]>>4,i[o++]=e&255),s===1&&(e=en[t.charCodeAt(l)]<<10|en[t.charCodeAt(l+1)]<<4|en[t.charCodeAt(l+2)]>>2,i[o++]=e>>8&255,i[o++]=e&255),i}function Wm(t){return xn[t>>18&63]+xn[t>>12&63]+xn[t>>6&63]+xn[t&63]}function Pm(t,e,n){for(var r,s=[],i=e;i<n;i+=3)r=(t[i]<<16&16711680)+(t[i+1]<<8&65280)+(t[i+2]&255),s.push(Wm(r));return s.join("")}function Lm(t){for(var e,n=t.length,r=n%3,s=[],i=16383,o=0,a=n-r;o<a;o+=i)s.push(Pm(t,o,o+i>a?a:o+i));return r===1?(e=t[n-1],s.push(xn[e>>2]+xn[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],s.push(xn[e>>10]+xn[e>>4&63]+xn[e<<2&63]+"=")),s.join("")}var Uc={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Uc.read=function(t,e,n,r,s){var i,o,a=s*8-r-1,l=(1<<a)-1,f=l>>1,m=-7,p=n?s-1:0,C=n?-1:1,w=t[e+p];for(p+=C,i=w&(1<<-m)-1,w>>=-m,m+=a;m>0;i=i*256+t[e+p],p+=C,m-=8);for(o=i&(1<<-m)-1,i>>=-m,m+=r;m>0;o=o*256+t[e+p],p+=C,m-=8);if(i===0)i=1-f;else{if(i===l)return o?NaN:(w?-1:1)*(1/0);o=o+Math.pow(2,r),i=i-f}return(w?-1:1)*o*Math.pow(2,i-r)};Uc.write=function(t,e,n,r,s,i){var o,a,l,f=i*8-s-1,m=(1<<f)-1,p=m>>1,C=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=r?0:i-1,F=r?1:-1,I=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=m):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+p>=1?e+=C/l:e+=C*Math.pow(2,1-p),e*l>=2&&(o++,l/=2),o+p>=m?(a=0,o=m):o+p>=1?(a=(e*l-1)*Math.pow(2,s),o=o+p):(a=e*Math.pow(2,p-1)*Math.pow(2,s),o=0));s>=8;t[n+w]=a&255,w+=F,a/=256,s-=8);for(o=o<<s|a,f+=s;f>0;t[n+w]=o&255,w+=F,o/=256,f-=8);t[n+w-F]|=I*128};/*!
2
2
  * The buffer module from node.js, for the browser.
3
3
  *
4
4
  * @author Feross Aboukhadijeh <https://feross.org>
5
5
  * @license MIT
6
- */(function(t){const e=fo,n=Uc,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=_,t.INSPECT_MAX_BYTES=50;const s=2147483647;t.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 g=new Uint8Array(1),d={foo:function(){return 42}};return Object.setPrototypeOf(d,Uint8Array.prototype),Object.setPrototypeOf(g,d),g.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(g){if(g>s)throw new RangeError('The value "'+g+'" is invalid for option "size"');const d=new Uint8Array(g);return Object.setPrototypeOf(d,a.prototype),d}function a(g,d,u){if(typeof g=="number"){if(typeof d=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(g)}return l(g,d,u)}a.poolSize=8192;function l(g,d,u){if(typeof g=="string")return C(g,d);if(ArrayBuffer.isView(g))return F(g);if(g==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof g);if(Gt(g,ArrayBuffer)||g&&Gt(g.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Gt(g,SharedArrayBuffer)||g&&Gt(g.buffer,SharedArrayBuffer)))return I(g,d,u);if(typeof g=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const D=g.valueOf&&g.valueOf();if(D!=null&&D!==g)return a.from(D,d,u);const R=x(g);if(R)return R;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof g[Symbol.toPrimitive]=="function")return a.from(g[Symbol.toPrimitive]("string"),d,u);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof g)}a.from=function(g,d,u){return l(g,d,u)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function f(g){if(typeof g!="number")throw new TypeError('"size" argument must be of type number');if(g<0)throw new RangeError('The value "'+g+'" is invalid for option "size"')}function m(g,d,u){return f(g),g<=0?o(g):d!==void 0?typeof u=="string"?o(g).fill(d,u):o(g).fill(d):o(g)}a.alloc=function(g,d,u){return m(g,d,u)};function p(g){return f(g),o(g<0?0:E(g)|0)}a.allocUnsafe=function(g){return p(g)},a.allocUnsafeSlow=function(g){return p(g)};function C(g,d){if((typeof d!="string"||d==="")&&(d="utf8"),!a.isEncoding(d))throw new TypeError("Unknown encoding: "+d);const u=k(g,d)|0;let D=o(u);const R=D.write(g,d);return R!==u&&(D=D.slice(0,R)),D}function w(g){const d=g.length<0?0:E(g.length)|0,u=o(d);for(let D=0;D<d;D+=1)u[D]=g[D]&255;return u}function F(g){if(Gt(g,Uint8Array)){const d=new Uint8Array(g);return I(d.buffer,d.byteOffset,d.byteLength)}return w(g)}function I(g,d,u){if(d<0||g.byteLength<d)throw new RangeError('"offset" is outside of buffer bounds');if(g.byteLength<d+(u||0))throw new RangeError('"length" is outside of buffer bounds');let D;return d===void 0&&u===void 0?D=new Uint8Array(g):u===void 0?D=new Uint8Array(g,d):D=new Uint8Array(g,d,u),Object.setPrototypeOf(D,a.prototype),D}function x(g){if(a.isBuffer(g)){const d=E(g.length)|0,u=o(d);return u.length===0||g.copy(u,0,0,d),u}if(g.length!==void 0)return typeof g.length!="number"||Oe(g.length)?o(0):w(g);if(g.type==="Buffer"&&Array.isArray(g.data))return w(g.data)}function E(g){if(g>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return g|0}function _(g){return+g!=g&&(g=0),a.alloc(+g)}a.isBuffer=function(d){return d!=null&&d._isBuffer===!0&&d!==a.prototype},a.compare=function(d,u){if(Gt(d,Uint8Array)&&(d=a.from(d,d.offset,d.byteLength)),Gt(u,Uint8Array)&&(u=a.from(u,u.offset,u.byteLength)),!a.isBuffer(d)||!a.isBuffer(u))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(d===u)return 0;let D=d.length,R=u.length;for(let N=0,K=Math.min(D,R);N<K;++N)if(d[N]!==u[N]){D=d[N],R=u[N];break}return D<R?-1:R<D?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,u){if(!Array.isArray(d))throw new TypeError('"list" argument must be an Array of Buffers');if(d.length===0)return a.alloc(0);let D;if(u===void 0)for(u=0,D=0;D<d.length;++D)u+=d[D].length;const R=a.allocUnsafe(u);let N=0;for(D=0;D<d.length;++D){let K=d[D];if(Gt(K,Uint8Array))N+K.length>R.length?(a.isBuffer(K)||(K=a.from(K)),K.copy(R,N)):Uint8Array.prototype.set.call(R,K,N);else if(a.isBuffer(K))K.copy(R,N);else throw new TypeError('"list" argument must be an Array of Buffers');N+=K.length}return R};function k(g,d){if(a.isBuffer(g))return g.length;if(ArrayBuffer.isView(g)||Gt(g,ArrayBuffer))return g.byteLength;if(typeof g!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof g);const u=g.length,D=arguments.length>2&&arguments[2]===!0;if(!D&&u===0)return 0;let R=!1;for(;;)switch(d){case"ascii":case"latin1":case"binary":return u;case"utf8":case"utf-8":return Le(g).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u*2;case"hex":return u>>>1;case"base64":return ze(g).length;default:if(R)return D?-1:Le(g).length;d=(""+d).toLowerCase(),R=!0}}a.byteLength=k;function P(g,d,u){let D=!1;if((d===void 0||d<0)&&(d=0),d>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,d>>>=0,u<=d))return"";for(g||(g="utf8");;)switch(g){case"hex":return U(this,d,u);case"utf8":case"utf-8":return c(this,d,u);case"ascii":return S(this,d,u);case"latin1":case"binary":return v(this,d,u);case"base64":return B(this,d,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W(this,d,u);default:if(D)throw new TypeError("Unknown encoding: "+g);g=(g+"").toLowerCase(),D=!0}}a.prototype._isBuffer=!0;function M(g,d,u){const D=g[d];g[d]=g[u],g[u]=D}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 u=0;u<d;u+=2)M(this,u,u+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 u=0;u<d;u+=4)M(this,u,u+3),M(this,u+1,u+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 u=0;u<d;u+=8)M(this,u,u+7),M(this,u+1,u+6),M(this,u+2,u+5),M(this,u+3,u+4);return this},a.prototype.toString=function(){const d=this.length;return d===0?"":arguments.length===0?c(this,0,d):P.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 u=t.INSPECT_MAX_BYTES;return d=this.toString("hex",0,u).replace(/(.{2})/g,"$1 ").trim(),this.length>u&&(d+=" ... "),"<Buffer "+d+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(d,u,D,R,N){if(Gt(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(u===void 0&&(u=0),D===void 0&&(D=d?d.length:0),R===void 0&&(R=0),N===void 0&&(N=this.length),u<0||D>d.length||R<0||N>this.length)throw new RangeError("out of range index");if(R>=N&&u>=D)return 0;if(R>=N)return-1;if(u>=D)return 1;if(u>>>=0,D>>>=0,R>>>=0,N>>>=0,this===d)return 0;let K=N-R,pe=D-u;const he=Math.min(K,pe),ue=this.slice(R,N),Pe=d.slice(u,D);for(let de=0;de<he;++de)if(ue[de]!==Pe[de]){K=ue[de],pe=Pe[de];break}return K<pe?-1:pe<K?1:0};function $(g,d,u,D,R){if(g.length===0)return-1;if(typeof u=="string"?(D=u,u=0):u>2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),u=+u,Oe(u)&&(u=R?0:g.length-1),u<0&&(u=g.length+u),u>=g.length){if(R)return-1;u=g.length-1}else if(u<0)if(R)u=0;else return-1;if(typeof d=="string"&&(d=a.from(d,D)),a.isBuffer(d))return d.length===0?-1:G(g,d,u,D,R);if(typeof d=="number")return d=d&255,typeof Uint8Array.prototype.indexOf=="function"?R?Uint8Array.prototype.indexOf.call(g,d,u):Uint8Array.prototype.lastIndexOf.call(g,d,u):G(g,[d],u,D,R);throw new TypeError("val must be string, number or Buffer")}function G(g,d,u,D,R){let N=1,K=g.length,pe=d.length;if(D!==void 0&&(D=String(D).toLowerCase(),D==="ucs2"||D==="ucs-2"||D==="utf16le"||D==="utf-16le")){if(g.length<2||d.length<2)return-1;N=2,K/=2,pe/=2,u/=2}function he(Pe,de){return N===1?Pe[de]:Pe.readUInt16BE(de*N)}let ue;if(R){let Pe=-1;for(ue=u;ue<K;ue++)if(he(g,ue)===he(d,Pe===-1?0:ue-Pe)){if(Pe===-1&&(Pe=ue),ue-Pe+1===pe)return Pe*N}else Pe!==-1&&(ue-=ue-Pe),Pe=-1}else for(u+pe>K&&(u=K-pe),ue=u;ue>=0;ue--){let Pe=!0;for(let de=0;de<pe;de++)if(he(g,ue+de)!==he(d,de)){Pe=!1;break}if(Pe)return ue}return-1}a.prototype.includes=function(d,u,D){return this.indexOf(d,u,D)!==-1},a.prototype.indexOf=function(d,u,D){return $(this,d,u,D,!0)},a.prototype.lastIndexOf=function(d,u,D){return $(this,d,u,D,!1)};function Y(g,d,u,D){u=Number(u)||0;const R=g.length-u;D?(D=Number(D),D>R&&(D=R)):D=R;const N=d.length;D>N/2&&(D=N/2);let K;for(K=0;K<D;++K){const pe=parseInt(d.substr(K*2,2),16);if(Oe(pe))return K;g[u+K]=pe}return K}function L(g,d,u,D){return We(Le(d,g.length-u),g,u,D)}function j(g,d,u,D){return We(je(d),g,u,D)}function O(g,d,u,D){return We(ze(d),g,u,D)}function q(g,d,u,D){return We(bi(d,g.length-u),g,u,D)}a.prototype.write=function(d,u,D,R){if(u===void 0)R="utf8",D=this.length,u=0;else if(D===void 0&&typeof u=="string")R=u,D=this.length,u=0;else if(isFinite(u))u=u>>>0,isFinite(D)?(D=D>>>0,R===void 0&&(R="utf8")):(R=D,D=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const N=this.length-u;if((D===void 0||D>N)&&(D=N),d.length>0&&(D<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");R||(R="utf8");let K=!1;for(;;)switch(R){case"hex":return Y(this,d,u,D);case"utf8":case"utf-8":return L(this,d,u,D);case"ascii":case"latin1":case"binary":return j(this,d,u,D);case"base64":return O(this,d,u,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,d,u,D);default:if(K)throw new TypeError("Unknown encoding: "+R);R=(""+R).toLowerCase(),K=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function B(g,d,u){return d===0&&u===g.length?e.fromByteArray(g):e.fromByteArray(g.slice(d,u))}function c(g,d,u){u=Math.min(g.length,u);const D=[];let R=d;for(;R<u;){const N=g[R];let K=null,pe=N>239?4:N>223?3:N>191?2:1;if(R+pe<=u){let he,ue,Pe,de;switch(pe){case 1:N<128&&(K=N);break;case 2:he=g[R+1],(he&192)===128&&(de=(N&31)<<6|he&63,de>127&&(K=de));break;case 3:he=g[R+1],ue=g[R+2],(he&192)===128&&(ue&192)===128&&(de=(N&15)<<12|(he&63)<<6|ue&63,de>2047&&(de<55296||de>57343)&&(K=de));break;case 4:he=g[R+1],ue=g[R+2],Pe=g[R+3],(he&192)===128&&(ue&192)===128&&(Pe&192)===128&&(de=(N&15)<<18|(he&63)<<12|(ue&63)<<6|Pe&63,de>65535&&de<1114112&&(K=de))}}K===null?(K=65533,pe=1):K>65535&&(K-=65536,D.push(K>>>10&1023|55296),K=56320|K&1023),D.push(K),R+=pe}return y(D)}const b=4096;function y(g){const d=g.length;if(d<=b)return String.fromCharCode.apply(String,g);let u="",D=0;for(;D<d;)u+=String.fromCharCode.apply(String,g.slice(D,D+=b));return u}function S(g,d,u){let D="";u=Math.min(g.length,u);for(let R=d;R<u;++R)D+=String.fromCharCode(g[R]&127);return D}function v(g,d,u){let D="";u=Math.min(g.length,u);for(let R=d;R<u;++R)D+=String.fromCharCode(g[R]);return D}function U(g,d,u){const D=g.length;(!d||d<0)&&(d=0),(!u||u<0||u>D)&&(u=D);let R="";for(let N=d;N<u;++N)R+=Ve[g[N]];return R}function W(g,d,u){const D=g.slice(d,u);let R="";for(let N=0;N<D.length-1;N+=2)R+=String.fromCharCode(D[N]+D[N+1]*256);return R}a.prototype.slice=function(d,u){const D=this.length;d=~~d,u=u===void 0?D:~~u,d<0?(d+=D,d<0&&(d=0)):d>D&&(d=D),u<0?(u+=D,u<0&&(u=0)):u>D&&(u=D),u<d&&(u=d);const R=this.subarray(d,u);return Object.setPrototypeOf(R,a.prototype),R};function A(g,d,u){if(g%1!==0||g<0)throw new RangeError("offset is not uint");if(g+d>u)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(d,u,D){d=d>>>0,u=u>>>0,D||A(d,u,this.length);let R=this[d],N=1,K=0;for(;++K<u&&(N*=256);)R+=this[d+K]*N;return R},a.prototype.readUintBE=a.prototype.readUIntBE=function(d,u,D){d=d>>>0,u=u>>>0,D||A(d,u,this.length);let R=this[d+--u],N=1;for(;u>0&&(N*=256);)R+=this[d+--u]*N;return R},a.prototype.readUint8=a.prototype.readUInt8=function(d,u){return d=d>>>0,u||A(d,1,this.length),this[d]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(d,u){return d=d>>>0,u||A(d,2,this.length),this[d]|this[d+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(d,u){return d=d>>>0,u||A(d,2,this.length),this[d]<<8|this[d+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(d,u){return d=d>>>0,u||A(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,u){return d=d>>>0,u||A(d,4,this.length),this[d]*16777216+(this[d+1]<<16|this[d+2]<<8|this[d+3])},a.prototype.readBigUInt64LE=dn(function(d){d=d>>>0,Jt(d,"offset");const u=this[d],D=this[d+7];(u===void 0||D===void 0)&&Ue(d,this.length-8);const R=u+this[++d]*2**8+this[++d]*2**16+this[++d]*2**24,N=this[++d]+this[++d]*2**8+this[++d]*2**16+D*2**24;return BigInt(R)+(BigInt(N)<<BigInt(32))}),a.prototype.readBigUInt64BE=dn(function(d){d=d>>>0,Jt(d,"offset");const u=this[d],D=this[d+7];(u===void 0||D===void 0)&&Ue(d,this.length-8);const R=u*2**24+this[++d]*2**16+this[++d]*2**8+this[++d],N=this[++d]*2**24+this[++d]*2**16+this[++d]*2**8+D;return(BigInt(R)<<BigInt(32))+BigInt(N)}),a.prototype.readIntLE=function(d,u,D){d=d>>>0,u=u>>>0,D||A(d,u,this.length);let R=this[d],N=1,K=0;for(;++K<u&&(N*=256);)R+=this[d+K]*N;return N*=128,R>=N&&(R-=Math.pow(2,8*u)),R},a.prototype.readIntBE=function(d,u,D){d=d>>>0,u=u>>>0,D||A(d,u,this.length);let R=u,N=1,K=this[d+--R];for(;R>0&&(N*=256);)K+=this[d+--R]*N;return N*=128,K>=N&&(K-=Math.pow(2,8*u)),K},a.prototype.readInt8=function(d,u){return d=d>>>0,u||A(d,1,this.length),this[d]&128?(255-this[d]+1)*-1:this[d]},a.prototype.readInt16LE=function(d,u){d=d>>>0,u||A(d,2,this.length);const D=this[d]|this[d+1]<<8;return D&32768?D|4294901760:D},a.prototype.readInt16BE=function(d,u){d=d>>>0,u||A(d,2,this.length);const D=this[d+1]|this[d]<<8;return D&32768?D|4294901760:D},a.prototype.readInt32LE=function(d,u){return d=d>>>0,u||A(d,4,this.length),this[d]|this[d+1]<<8|this[d+2]<<16|this[d+3]<<24},a.prototype.readInt32BE=function(d,u){return d=d>>>0,u||A(d,4,this.length),this[d]<<24|this[d+1]<<16|this[d+2]<<8|this[d+3]},a.prototype.readBigInt64LE=dn(function(d){d=d>>>0,Jt(d,"offset");const u=this[d],D=this[d+7];(u===void 0||D===void 0)&&Ue(d,this.length-8);const R=this[d+4]+this[d+5]*2**8+this[d+6]*2**16+(D<<24);return(BigInt(R)<<BigInt(32))+BigInt(u+this[++d]*2**8+this[++d]*2**16+this[++d]*2**24)}),a.prototype.readBigInt64BE=dn(function(d){d=d>>>0,Jt(d,"offset");const u=this[d],D=this[d+7];(u===void 0||D===void 0)&&Ue(d,this.length-8);const R=(u<<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+D)}),a.prototype.readFloatLE=function(d,u){return d=d>>>0,u||A(d,4,this.length),n.read(this,d,!0,23,4)},a.prototype.readFloatBE=function(d,u){return d=d>>>0,u||A(d,4,this.length),n.read(this,d,!1,23,4)},a.prototype.readDoubleLE=function(d,u){return d=d>>>0,u||A(d,8,this.length),n.read(this,d,!0,52,8)},a.prototype.readDoubleBE=function(d,u){return d=d>>>0,u||A(d,8,this.length),n.read(this,d,!1,52,8)};function h(g,d,u,D,R,N){if(!a.isBuffer(g))throw new TypeError('"buffer" argument must be a Buffer instance');if(d>R||d<N)throw new RangeError('"value" argument is out of bounds');if(u+D>g.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(d,u,D,R){if(d=+d,u=u>>>0,D=D>>>0,!R){const pe=Math.pow(2,8*D)-1;h(this,d,u,D,pe,0)}let N=1,K=0;for(this[u]=d&255;++K<D&&(N*=256);)this[u+K]=d/N&255;return u+D},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(d,u,D,R){if(d=+d,u=u>>>0,D=D>>>0,!R){const pe=Math.pow(2,8*D)-1;h(this,d,u,D,pe,0)}let N=D-1,K=1;for(this[u+N]=d&255;--N>=0&&(K*=256);)this[u+N]=d/K&255;return u+D},a.prototype.writeUint8=a.prototype.writeUInt8=function(d,u,D){return d=+d,u=u>>>0,D||h(this,d,u,1,255,0),this[u]=d&255,u+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(d,u,D){return d=+d,u=u>>>0,D||h(this,d,u,2,65535,0),this[u]=d&255,this[u+1]=d>>>8,u+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(d,u,D){return d=+d,u=u>>>0,D||h(this,d,u,2,65535,0),this[u]=d>>>8,this[u+1]=d&255,u+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(d,u,D){return d=+d,u=u>>>0,D||h(this,d,u,4,4294967295,0),this[u+3]=d>>>24,this[u+2]=d>>>16,this[u+1]=d>>>8,this[u]=d&255,u+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(d,u,D){return d=+d,u=u>>>0,D||h(this,d,u,4,4294967295,0),this[u]=d>>>24,this[u+1]=d>>>16,this[u+2]=d>>>8,this[u+3]=d&255,u+4};function T(g,d,u,D,R){Re(d,D,R,g,u,7);let N=Number(d&BigInt(4294967295));g[u++]=N,N=N>>8,g[u++]=N,N=N>>8,g[u++]=N,N=N>>8,g[u++]=N;let K=Number(d>>BigInt(32)&BigInt(4294967295));return g[u++]=K,K=K>>8,g[u++]=K,K=K>>8,g[u++]=K,K=K>>8,g[u++]=K,u}function se(g,d,u,D,R){Re(d,D,R,g,u,7);let N=Number(d&BigInt(4294967295));g[u+7]=N,N=N>>8,g[u+6]=N,N=N>>8,g[u+5]=N,N=N>>8,g[u+4]=N;let K=Number(d>>BigInt(32)&BigInt(4294967295));return g[u+3]=K,K=K>>8,g[u+2]=K,K=K>>8,g[u+1]=K,K=K>>8,g[u]=K,u+8}a.prototype.writeBigUInt64LE=dn(function(d,u=0){return T(this,d,u,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=dn(function(d,u=0){return se(this,d,u,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(d,u,D,R){if(d=+d,u=u>>>0,!R){const he=Math.pow(2,8*D-1);h(this,d,u,D,he-1,-he)}let N=0,K=1,pe=0;for(this[u]=d&255;++N<D&&(K*=256);)d<0&&pe===0&&this[u+N-1]!==0&&(pe=1),this[u+N]=(d/K>>0)-pe&255;return u+D},a.prototype.writeIntBE=function(d,u,D,R){if(d=+d,u=u>>>0,!R){const he=Math.pow(2,8*D-1);h(this,d,u,D,he-1,-he)}let N=D-1,K=1,pe=0;for(this[u+N]=d&255;--N>=0&&(K*=256);)d<0&&pe===0&&this[u+N+1]!==0&&(pe=1),this[u+N]=(d/K>>0)-pe&255;return u+D},a.prototype.writeInt8=function(d,u,D){return d=+d,u=u>>>0,D||h(this,d,u,1,127,-128),d<0&&(d=255+d+1),this[u]=d&255,u+1},a.prototype.writeInt16LE=function(d,u,D){return d=+d,u=u>>>0,D||h(this,d,u,2,32767,-32768),this[u]=d&255,this[u+1]=d>>>8,u+2},a.prototype.writeInt16BE=function(d,u,D){return d=+d,u=u>>>0,D||h(this,d,u,2,32767,-32768),this[u]=d>>>8,this[u+1]=d&255,u+2},a.prototype.writeInt32LE=function(d,u,D){return d=+d,u=u>>>0,D||h(this,d,u,4,2147483647,-2147483648),this[u]=d&255,this[u+1]=d>>>8,this[u+2]=d>>>16,this[u+3]=d>>>24,u+4},a.prototype.writeInt32BE=function(d,u,D){return d=+d,u=u>>>0,D||h(this,d,u,4,2147483647,-2147483648),d<0&&(d=4294967295+d+1),this[u]=d>>>24,this[u+1]=d>>>16,this[u+2]=d>>>8,this[u+3]=d&255,u+4},a.prototype.writeBigInt64LE=dn(function(d,u=0){return T(this,d,u,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=dn(function(d,u=0){return se(this,d,u,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Z(g,d,u,D,R,N){if(u+D>g.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function ee(g,d,u,D,R){return d=+d,u=u>>>0,R||Z(g,d,u,4),n.write(g,d,u,D,23,4),u+4}a.prototype.writeFloatLE=function(d,u,D){return ee(this,d,u,!0,D)},a.prototype.writeFloatBE=function(d,u,D){return ee(this,d,u,!1,D)};function ve(g,d,u,D,R){return d=+d,u=u>>>0,R||Z(g,d,u,8),n.write(g,d,u,D,52,8),u+8}a.prototype.writeDoubleLE=function(d,u,D){return ve(this,d,u,!0,D)},a.prototype.writeDoubleBE=function(d,u,D){return ve(this,d,u,!1,D)},a.prototype.copy=function(d,u,D,R){if(!a.isBuffer(d))throw new TypeError("argument should be a Buffer");if(D||(D=0),!R&&R!==0&&(R=this.length),u>=d.length&&(u=d.length),u||(u=0),R>0&&R<D&&(R=D),R===D||d.length===0||this.length===0)return 0;if(u<0)throw new RangeError("targetStart out of bounds");if(D<0||D>=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-u<R-D&&(R=d.length-u+D);const N=R-D;return this===d&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(u,D,R):Uint8Array.prototype.set.call(d,this.subarray(D,R),u),N},a.prototype.fill=function(d,u,D,R){if(typeof d=="string"){if(typeof u=="string"?(R=u,u=0,D=this.length):typeof D=="string"&&(R=D,D=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 K=d.charCodeAt(0);(R==="utf8"&&K<128||R==="latin1")&&(d=K)}}else typeof d=="number"?d=d&255:typeof d=="boolean"&&(d=Number(d));if(u<0||this.length<u||this.length<D)throw new RangeError("Out of range index");if(D<=u)return this;u=u>>>0,D=D===void 0?this.length:D>>>0,d||(d=0);let N;if(typeof d=="number")for(N=u;N<D;++N)this[N]=d;else{const K=a.isBuffer(d)?d:a.from(d,R),pe=K.length;if(pe===0)throw new TypeError('The value "'+d+'" is invalid for argument "value"');for(N=0;N<D-u;++N)this[N+u]=K[N%pe]}return this};const le={};function be(g,d,u){le[g]=class extends u{constructor(){super(),Object.defineProperty(this,"message",{value:d.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${g}]`,this.stack,delete this.name}get code(){return g}set code(R){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:R,writable:!0})}toString(){return`${this.name} [${g}]: ${this.message}`}}}be("ERR_BUFFER_OUT_OF_BOUNDS",function(g){return g?`${g} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),be("ERR_INVALID_ARG_TYPE",function(g,d){return`The "${g}" argument must be of type number. Received type ${typeof d}`},TypeError),be("ERR_OUT_OF_RANGE",function(g,d,u){let D=`The value of "${g}" is out of range.`,R=u;return Number.isInteger(u)&&Math.abs(u)>2**32?R=ln(String(u)):typeof u=="bigint"&&(R=String(u),(u>BigInt(2)**BigInt(32)||u<-(BigInt(2)**BigInt(32)))&&(R=ln(R)),R+="n"),D+=` It must be ${d}. Received ${R}`,D},RangeError);function ln(g){let d="",u=g.length;const D=g[0]==="-"?1:0;for(;u>=D+4;u-=3)d=`_${g.slice(u-3,u)}${d}`;return`${g.slice(0,u)}${d}`}function xe(g,d,u){Jt(d,"offset"),(g[d]===void 0||g[d+u]===void 0)&&Ue(d,g.length-(u+1))}function Re(g,d,u,D,R,N){if(g>u||g<d){const K=typeof d=="bigint"?"n":"";let pe;throw d===0||d===BigInt(0)?pe=`>= 0${K} and < 2${K} ** ${(N+1)*8}${K}`:pe=`>= -(2${K} ** ${(N+1)*8-1}${K}) and < 2 ** ${(N+1)*8-1}${K}`,new le.ERR_OUT_OF_RANGE("value",pe,g)}xe(D,R,N)}function Jt(g,d){if(typeof g!="number")throw new le.ERR_INVALID_ARG_TYPE(d,"number",g)}function Ue(g,d,u){throw Math.floor(g)!==g?(Jt(g,u),new le.ERR_OUT_OF_RANGE("offset","an integer",g)):d<0?new le.ERR_BUFFER_OUT_OF_BOUNDS:new le.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${d}`,g)}const $e=/[^+/0-9A-Za-z-_]/g;function mi(g){if(g=g.split("=")[0],g=g.trim().replace($e,""),g.length<2)return"";for(;g.length%4!==0;)g=g+"=";return g}function Le(g,d){d=d||1/0;let u;const D=g.length;let R=null;const N=[];for(let K=0;K<D;++K){if(u=g.charCodeAt(K),u>55295&&u<57344){if(!R){if(u>56319){(d-=3)>-1&&N.push(239,191,189);continue}else if(K+1===D){(d-=3)>-1&&N.push(239,191,189);continue}R=u;continue}if(u<56320){(d-=3)>-1&&N.push(239,191,189),R=u;continue}u=(R-55296<<10|u-56320)+65536}else R&&(d-=3)>-1&&N.push(239,191,189);if(R=null,u<128){if((d-=1)<0)break;N.push(u)}else if(u<2048){if((d-=2)<0)break;N.push(u>>6|192,u&63|128)}else if(u<65536){if((d-=3)<0)break;N.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((d-=4)<0)break;N.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw new Error("Invalid code point")}return N}function je(g){const d=[];for(let u=0;u<g.length;++u)d.push(g.charCodeAt(u)&255);return d}function bi(g,d){let u,D,R;const N=[];for(let K=0;K<g.length&&!((d-=2)<0);++K)u=g.charCodeAt(K),D=u>>8,R=u%256,N.push(R),N.push(D);return N}function ze(g){return e.toByteArray(mi(g))}function We(g,d,u,D){let R;for(R=0;R<D&&!(R+u>=d.length||R>=g.length);++R)d[R+u]=g[R];return R}function Gt(g,d){return g instanceof d||g!=null&&g.constructor!=null&&g.constructor.name!=null&&g.constructor.name===d.name}function Oe(g){return g!==g}const Ve=function(){const g="0123456789abcdef",d=new Array(256);for(let u=0;u<16;++u){const D=u*16;for(let R=0;R<16;++R)d[D+R]=g[u]+g[R]}return d}();function dn(g){return typeof BigInt>"u"?Ge:g}function Ge(){throw new Error("BigInt not supported")}})(ae);var Pu={exports:{}},et=Pu.exports={},An,Bn;function $a(){throw new Error("setTimeout has not been defined")}function ja(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?An=setTimeout:An=$a}catch{An=$a}try{typeof clearTimeout=="function"?Bn=clearTimeout:Bn=ja}catch{Bn=ja}})();function Lu(t){if(An===setTimeout)return setTimeout(t,0);if((An===$a||!An)&&setTimeout)return An=setTimeout,setTimeout(t,0);try{return An(t,0)}catch{try{return An.call(null,t,0)}catch{return An.call(this,t,0)}}}function Om(t){if(Bn===clearTimeout)return clearTimeout(t);if((Bn===ja||!Bn)&&clearTimeout)return Bn=clearTimeout,clearTimeout(t);try{return Bn(t)}catch{try{return Bn.call(null,t)}catch{return Bn.call(this,t)}}}var Kn=[],Yr=!1,br,Si=-1;function Nm(){!Yr||!br||(Yr=!1,br.length?Kn=br.concat(Kn):Si=-1,Kn.length&&Ou())}function Ou(){if(!Yr){var t=Lu(Nm);Yr=!0;for(var e=Kn.length;e;){for(br=Kn,Kn=[];++Si<e;)br&&br[Si].run();Si=-1,e=Kn.length}br=null,Yr=!1,Om(t)}}et.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];Kn.push(new Nu(t,e)),Kn.length===1&&!Yr&&Lu(Ou)};function Nu(t,e){this.fun=t,this.array=e}Nu.prototype.run=function(){this.fun.apply(null,this.array)};et.title="browser";et.browser=!0;et.env={};et.argv=[];et.version="";et.versions={};function jn(){}et.on=jn;et.addListener=jn;et.once=jn;et.off=jn;et.removeListener=jn;et.removeAllListeners=jn;et.emit=jn;et.prependListener=jn;et.prependOnceListener=jn;et.listeners=function(t){return[]};et.binding=function(t){throw new Error("process.binding is not supported")};et.cwd=function(){return"/"};et.chdir=function(t){throw new Error("process.chdir is not supported")};et.umask=function(){return 0};var zu=Pu.exports;(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=ae,n=zu,r=o=>o&&o.__esModule?o:{default:o},s=r(n),i=globalThis||window||void 0||self;Object.defineProperty(t,"Buffer",{enumerable:!0,get:()=>e.Buffer}),Object.defineProperty(t,"process",{enumerable:!0,get:()=>s.default}),t.global=i})(Ne);const Hi=t=>[...Array(t).keys()],Hu=(t,e)=>t.map(n=>n[e]),pr=t=>Hi(t[0].length).map(e=>Hi(t.length).map(n=>t[n][e])),zm=(t,e,n)=>{const r=new Set(Array.isArray(e)?e:[e]);return t.filter((s,i)=>r.has(i)!==n)};function Hm(t,e=!1){if(t.length===0)throw new Error("Can't calculate median of empty array");const n=e?t:[...t].sort((o,a)=>o>a?1:o<a?-1:0),r=Math.floor(n.length/2);if(n.length%2===1)return n[r];const s=n[r-1],i=n[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 qm(t){return["string","number","symbol","bigint","boolean"].includes(typeof t)}const nd=t=>t.length===2&&!Array.isArray(t[0])&&Array.isArray(t[1]),qi=t=>t.length===0?[]:Array.isArray(t[0])?t.map(([e,n])=>Array.isArray(n)?(nd(n)?qi(n):n).map(r=>[e,r].flat()):[[e,n]]).flat():nd(t)?qi(t[1]).map(e=>[t[0],e]):t,Km=(t,e)=>{const n=qi(t);if(n.length===0)throw new Error("Invalid mapping: empty");const r=e===void 0?[Hi(n[0].length-1),[n[0].length-1]]:e.map(C=>typeof C=="number"?[C]:C);let s=[],i=!0;const o=(C,w)=>{const F=Array.from(new Set(C[0]).values()),I=new Map(F.map(E=>[E,[]]));for(const[E,_]of C[0].entries())I.get(_).push(E);if(C.length===1){const E=Object.fromEntries(F.map(_=>[_,I.get(_).map(k=>w[k].length===1?w[k][0]:w[k])]));if(i){for(const _ of I.values())if(_.length>1)return i=!1,E;s.push(E)}return E}const x=pr(C.slice(1));return Object.fromEntries(F.map(E=>{const _=I.get(E),k=pr(_.map(M=>x[M])),P=_.map(M=>w[M]);return[E,o(k,P)]}))},a=pr(n),l=C=>{const w=a[C];if(w===void 0)throw new Error(`Invalid shape: column ${C} does not exist`);return w},[f,m]=r.map(C=>C.map(w=>l(w)));if(f.length===0)throw new Error("Invalid shape: empty key set");if(m.length===0)throw new Error("Invalid shape: empty value set");for(const C of f)for(const w of C)if(!qm(w))throw new Error(`Invalid key: ${w} in ${C}`);const p=o(f,pr(m));if(i)for(const C of s)for(const w of Object.keys(C))C[w]=C[w][0];return p};function fe(t,e){const n=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=>n(r[i.toString()])})};return n(Km(t,e))}function _c(t){let e=null;return()=>(e||(e=t()),e)}function $m(t){try{return t(),!1}catch{return!0}}function jm(t,e,n){return t<e?e:t>n?n:t}var Vm=["int","uint","bytes","array","switch"],qu="big",ho=6,Dr=t=>typeof t=="number"||typeof t=="bigint",cs=t=>t instanceof Uint8Array,Gm=t=>Dr(t)||cs(t),Ps=t=>Vm.includes(t==null?void 0:t.binary),Ym=t=>Ps(t)||Array.isArray(t)&&t.every(Ps),Xm=t=>typeof(t==null?void 0:t.from)=="number",Zm=t=>typeof(t==null?void 0:t.from)=="bigint",Jm=t=>Xm(t)||Zm(t),ls=t=>cs(t==null?void 0:t.from),Qm=t=>Jm(t)||ls(t),Ku=(t,e)=>{if(t!==e)throw new Error(`size mismatch: layout size: ${t}, data size: ${e}`);return e},Qr=t=>"layout"in t&&t.layout!==void 0,Va=(t,e)=>"size"in t&&t.size!==void 0?Ku(t.size,e):e,Ga=(t,e)=>{if(t!=e)throw new Error(`value mismatch: (constant) layout value: ${t}, data value: ${e}`)},Ya=(t,e,n)=>{const r=(f,m)=>m===void 0?[0,f.length]:Array.isArray(m)?m:[m,f.length],[s,i]=r(t,n==null?void 0:n.customSlice),[o,a]=r(e,n==null?void 0:n.dataSlice),l=i-s;Ku(l,a-o);for(let f=0;f<t.length;++f)if(t[f+s]!==e[f+o])throw new Error(`binary data mismatch: layout value: ${t}, offset: ${s}, data value: ${e}, offset: ${o}`)};function $u(t,e){const n=e[t.idTag??"id"];return t.layouts.find(([r])=>(Array.isArray(r)?r[1]:r)==n)}function ju(t){return dr(t,tn)}var tn=Symbol("staticCalc");function e1(t,e){const n=[],r=dr(t,e,n);if(r===null)throw new Error(`coding error: couldn't calculate layout size for layout ${t} with data ${e}`);return[r,n]}function rd(t,e,n){const r=s=>(n!==void 0&&n.push(s),s);switch(t.binary){case"int":case"uint":return t.size;case"bytes":{if("size"in t&&e===tn)return t.size;const s="lengthSize"in t?t.lengthSize|0:0;if(Qr(t)){const{custom:o}=t,a=dr(t.layout,o===void 0?e:typeof o.from=="function"?e!==tn?r(o.from(e)):tn:o.from,n);return a===null?"size"in t?t.size??null:null:s+Va(t,a)}const{custom:i}=t;return cs(i)?s+i.length:ls(i)?s+i.from.length:e===tn?null:s+Va(t,i!==void 0?r(i.from(e)).length:e.length)}case"array":{const s="length"in t?t.length:void 0;if(e===tn){if(s!==void 0){const o=dr(t.layout,tn,n);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 t&&t.lengthSize!==void 0&&(i+=t.lengthSize);for(let o=0;o<e.length;++o){const a=dr(t.layout,e[o],n);if(a===null)return null;i+=a}return i}case"switch":{if(e!==tn){const[i,o]=$u(t,e),a=dr(o,e,n);return a!==null?t.idSize+a:null}let s=null;for(const[i,o]of t.layouts){const a=dr(o,tn,n);if(s===null)s=a;else if(a!==s)return null}return t.idSize+s}}}function dr(t,e,n){if(Ps(t))return rd(t,e,n);let r=0;for(const s of t){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=rd(s,i,n);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 ga=(t,e)=>{t.bytes.set(e,t.offset),t.offset+=e.length},sd=t=>t.bytesConversions[t.position++];function bn(t,e,n){const[r,s]=e1(t,e),i={bytes:new Uint8Array(r),offset:0};if(Di(t,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 i.bytes}var id=2**(ho*8);function yr(t,e,n,r=qu,s=!1){if(!s&&t<0)throw new Error(`Value ${t} is negative but unsigned`);if(typeof t=="number"){if(!Number.isInteger(t))throw new Error(`Value ${t} is not an integer`);if(e>ho){if(t>=id)throw new Error(`Value ${t} is too large to be safely converted into an integer`);if(s&&t<-id)throw new Error(`Value ${t} is too small to be safely converted into an integer`)}}const i=2n**BigInt(e*8-(s?1:0));if(t>=i)throw new Error(`Value ${t} is too large for ${e} bytes`);if(s&&t<-i)throw new Error(`Value ${t} is too small for ${e} bytes`);for(let o=0;o<e;++o)n.bytes[n.offset+o]=Number(BigInt(t)>>BigInt(8*(r==="big"?e-o-1:o))&0xffn);n.offset+=e}function Di(t,e,n,r){if(Ps(t))od(t,e,n,r);else for(const s of t)try{od(s,e[s.name],n,r)}catch(i){throw i.message=`when serializing item '${s.name}': ${i.message}`,i}}function od(t,e,n,r){switch(t.binary){case"int":case"uint":{const s=(()=>{var i;return Dr(t.custom)?("omit"in t&&t.omit||Ga(t.custom,e),t.custom):Dr((i=t==null?void 0:t.custom)==null?void 0:i.from)?t.custom.from:t.custom!==void 0?t.custom.from(e):e})();yr(s,t.size,n,t.endianness,t.binary==="int");break}case"bytes":{const s=n.offset;if("lengthSize"in t&&t.lengthSize!==void 0&&(n.offset+=t.lengthSize),Qr(t)){const{custom:i}=t;let o;i===void 0?o=e:typeof i.from!="function"?o=i.from:o=sd(r),Di(t.layout,o,n,r)}else{const{custom:i}=t;cs(i)?("omit"in t&&t.omit||Ya(i,e),ga(n,i)):ls(i)?ga(n,i.from):ga(n,i!==void 0?sd(r):e)}if("lengthSize"in t&&t.lengthSize!==void 0){const i=n.offset-s-t.lengthSize,o=n.offset;n.offset=s,yr(i,t.lengthSize,n,t.lengthEndianness),n.offset=o}else Va(t,n.offset-s);break}case"array":{if("length"in t&&t.length!==e.length)throw new Error(`array length mismatch: layout length: ${t.length}, data length: ${e.length}`);"lengthSize"in t&&t.lengthSize!==void 0&&yr(e.length,t.lengthSize,n,t.lengthEndianness);for(let s=0;s<e.length;++s)Di(t.layout,e[s],n,r);break}case"switch":{const[s,i]=$u(t,e),o=Array.isArray(s)?s[0]:s;yr(o,t.idSize,n,t.idEndianness),Di(i,e,n,r);break}}}function Vu(t){const e=t.custom;if(!("cachedSerializedFrom"in e)&&(e.cachedSerializedFrom=bn(t.layout,e.from),"size"in t&&t.size!==void 0&&t.size!==e.cachedSerializedFrom.length))throw new Error("Layout specification error: custom.from does not serialize to specified size");return e.cachedSerializedFrom}function pn(t,e,n){const r=n??!0,s={bytes:e,offset:0,end:e.length},i=ks(t,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 vi(t,e){const n=t.offset+e;if(n>t.end)throw new Error(`chunk is shorter than expected: ${t.end} < ${n}`);t.offset=n}function ks(t,e){if(!Array.isArray(t))return ad(t,e);let n={};for(const r of t)try{(r.omit?{}:n)[r.name]=ad(r,e)}catch(s){throw s.message=`when deserializing item '${r.name}': ${s.message}`,s}return n}function pi(t,e,n=qu,r=!1){let s=0n;for(let i=0;i<e;++i)s|=BigInt(t.bytes[t.offset+i])<<BigInt(8*(n==="big"?e-i-1:i));return r&&t.bytes[t.offset+(n==="big"?0:e-1)]&128&&(s-=1n<<BigInt(8*e)),vi(t,e),e>ho?s:Number(s)}function ad(t,e){switch(t.binary){case"int":case"uint":{const n=pi(e,t.size,t.endianness,t.binary==="int"),{custom:r}=t;return Dr(r)?(Ga(r,n),r):Dr(r==null?void 0:r.from)?(Ga(r.from,n),r.to):r!==void 0?r.to(n):n}case"bytes":{const n="lengthSize"in t&&t.lengthSize!==void 0?pi(e,t.lengthSize,t.lengthEndianness):t==null?void 0:t.size;if(Qr(t)){const{custom:a}=t,l=e.offset;let f;if(n===void 0)f=ks(t.layout,e);else{const m={...e,end:e.offset+n};if(vi(e,n),f=ks(t.layout,m),m.offset!==m.end)throw new Error(`read less data than expected: ${m.offset-e.offset} < ${n}`)}return a!==void 0?typeof a.from!="function"?(Ya(Vu(t),e.bytes,{dataSlice:[l,e.offset]}),a.to):a.to(f):f}const{custom:r}=t;{let a,l;if(cs(r)?a=r:ls(r)&&(a=r.from,l=r.to),a!==void 0){const f=n??a.length,m=e.bytes.subarray(e.offset,e.offset+f);return Ya(a,m),vi(e,f),l??a}}const s=e.offset,i=n!==void 0?e.offset+n:e.end;vi(e,i-s);const o=e.bytes.subarray(s,i);return r!==void 0?r.to(o):o}case"array":{let n=[];const{layout:r}=t,s=()=>{const o=ks(r,e);n.push(o)};let i=null;if("length"in t&&t.length!==void 0?i=t.length:"lengthSize"in t&&t.lengthSize!==void 0&&(i=pi(e,t.lengthSize,t.lengthEndianness)),i!==null)for(let o=0;o<i;++o)s();else for(;e.offset<e.end;)s();return n}case"switch":{const n=pi(e,t.idSize,t.idEndianness),{layouts:r}=t;if(r.length===0)throw new Error("switch item has no layouts");const s=typeof r[0][0]=="number",i=r.find(([f])=>s?f===n:f[0]===n);if(i===void 0)throw new Error(`unknown id value: ${n}`);const[o,a]=i,l=ks(a,e);return{[t.idTag??"id"]:s?n:o[1],...l}}}}function t1(t,e){return ki(t,e)}function cd(t,e){switch(t.binary){case"bytes":if(Qr(t)){const{custom:n}=t;return n===void 0||typeof n.from!="function"?ki(t.layout,n?n.from:e):e}case"int":case"uint":{const{custom:n}=t;return t!=null&&t.omit?void 0:Gm(n)?n:Qm(n)?n.to:e}case"array":return Array.isArray(e)?e.map(n=>ki(t.layout,n)):void 0;case"switch":{const n=e[t.idTag??"id"],[r,s]=t.layouts.find(([i])=>(Array.isArray(i)?i[1]:i)==n);return{[t.idTag??"id"]:n,...ki(s,e)}}}}function ki(t,e){if(e=e??{},Ps(t))return cd(t,e);const n={};for(const r of t){const s=cd(r,e[r.name]??{});s!==void 0&&(n[r.name]=s)}return n}function n1(t,e){const[n,r]=s1(t);if(!n)throw new Error("Cannot uniquely distinguished the given layouts");return s=>{const i=r(s);return i.length===0?null:i[0]}}function Xa(t){return t.reduce((e,n)=>e|BigInt(1)<<BigInt(n),BigInt(0))}function yi(t){const e=[];for(let n=0n;t>0n;t>>=1n,++n)t&1n&&e.push(Number(n));return e}function wt(t){let e=0;for(;t>0n;t>>=1n)e+=Number(t&1n);return e}var ld=t=>t>0?2**(8*t)-1:1/0;function dd(t,e,n){var r;switch(t.binary){case"int":case"uint":{const s=Dr(t.custom)?t.custom:Dr((r=t==null?void 0:t.custom)==null?void 0:r.from)?t.custom.from:null;if(s!==null&&e!==null){const i={bytes:new Uint8Array(t.size),offset:0};yr(s,t.size,i,t.endianness,t.binary==="int"),n.push([e,i.bytes])}return[t.size,t.size]}case"bytes":{const s="lengthSize"in t?t.lengthSize|0:0;let i,o;if(Qr(t)){const{custom:l}=t;if(l!==void 0&&typeof l.from!="function")i=Vu(t),o=i.length;else{const f=ju(t.layout);f!==null&&(o=f)}}else{const{custom:l}=t;cs(l)?(i=l,o=l.length):ls(l)&&(i=l.from,o=l.from.length)}if(s>0&&e!==null){if(o!==void 0){const l={bytes:new Uint8Array(s),offset:0},f=t.lengthEndianness;yr(o,s,l,f,!1),n.push([e,l.bytes])}e+=s}if(i!==void 0)return e!==null&&n.push([e,i]),[s+i.length,s+i.length];const a="size"in t&&t.size!==void 0?[t.size,t.size]:void 0;if(Qr(t)){const l=Fi(t.layout,e,n);return a??[s+l[0],s+l[1]]}return a??[s,ld(s)]}case"array":{if("length"in t){let i=[];const o=Fi(t.layout,0,i);if(e!==null)if(o[0]!==o[1]){if(t.length>0)for(const[a,l]of i)n.push([e+a,l])}else for(let a=0;a<t.length;++a)for(const[l,f]of i)n.push([e+l+a*o[0],f]);return[t.length*o[0],t.length*o[1]]}const s=t.lengthSize|0;return[s,ld(s)]}case"switch":{const s=t.layouts.map(l=>[]),{idSize:i,idEndianness:o}=t,a=t.layouts.map(([l,f],m)=>{const p=Array.isArray(l)?l[0]:l;if(e!==null){const w={bytes:new Uint8Array(i),offset:0};yr(p,i,w,o),s[m].push([0,w.bytes])}const C=Fi(f,e!==null?i:null,s[m]);return[C[0]+i,C[1]+i]});return e!==null&&s.every(l=>l.length>0)&&(()=>{const l=Math.min(...s.map(m=>m.at(-1)[0]+m.at(-1)[1].length)),f=s.map(m=>0);for(let m=0;m<l;){let p=null,C=0;for(;C<s.length;){let w=f[C];const F=s[C],[I,x]=F[w];if(I+x.length<=m){if(++w,w===F.length)return;f[C]=w,m=F[w][0];break}const E=x[m-I];if(p===null&&(p=E),E!==p){++m;break}++C}C===s.length&&(n.push([e+m,new Uint8Array([p])]),++m)}})(),[Math.min(...a.map(([l])=>l)),Math.max(...a.map(([l,f])=>f))]}}}function Fi(t,e,n){if(!Array.isArray(t))return dd(t,e,n);let r=[0,0];for(const s of t){const i=dd(s,e,n);r[0]+=i[0],r[1]+=i[1],e!==null&&(e=i[0]===i[1]?e+i[0]:null)}return r}function r1(t){const e=new Map;let n=[];const r=s=>{for(;n.length>0&&n[0][0]<s;){const i=n[0][0]+1,o=n.findIndex(([a])=>i<=a);o===-1?n=[]:n.splice(0,o),e.set(i,Xa(n.map(([,a])=>a)))}};for(const[[s,i],o]of t){r(s);const a=n.findIndex(([l])=>l>i);a===-1?n.push([i,o]):n.splice(a,0,[i,o]),e.set(s,Xa(n.map(([,l])=>l)))}return r(1/0),e}function s1(t){if(t.length===0)throw new Error("Cannot discriminate empty set of layouts");const e=0n,n=(1n<<BigInt(t.length))-1n,r=t.map(()=>[]),s=t.map((k,P)=>Fi(k,0,r[P])),i=s.map((k,P)=>[k,P]).sort(([[k]],[[P]])=>k-P),o=(()=>{let k=n;const P=new Map;for(const[[M],$]of i)k^=1n<<BigInt($),P.set(M,k);return P})(),a=r1(i),l=t.length-Math.max(...[...a.values()].map(k=>wt(k))),f=k=>{let P=n;for(const[M,$]of o){if(k<M)break;P=$}return P},m=k=>{let P=e;for(const[M,$]of a){if(k<M)break;P=$}return P},p=Array.from({length:Math.max(...r.map(k=>k.length>0?k.at(-1)[0]+k.at(-1)[1].length:0))}).map(()=>[]);for(let k=0;k<r.length;++k)for(const[P,M]of r[k])for(let $=0;$<M.length;++$)p[P+$].push([M[$],k]);let C=[];for(const[k,P]of p.entries()){const M=f(k),$=M^Xa(P.map(([,j])=>j)),G=n^M,Y=new Map;for(const[j,O]of P)Y.has(j)||Y.set(j,e),Y.set(j,Y.get(j)|1n<<BigInt(O));let L=t.length-Math.max(wt($),wt(G));for(const j of Y.values()){const O=P.length-wt(j)+wt(G);L=Math.min(L,O)}if(L!==0){if(L===t.length-1)return[!0,j=>yi(j.length<=k?G:Y.get(j[k])??e)];C.push([L,k,G,Y,$])}}if(l===t.length-1)return[!0,k=>yi(m(k.length))];C.sort(([k],[P])=>P-k);let w=!0;const F=new Map,I=new Map,x=(k,P)=>{F.set(k,P),I.has(wt(k))||I.set(wt(k),[]),I.get(wt(k)).push(k)},E=(k,P)=>{if(wt(k)<=1||F.has(k))return;let M=0;const $=new Map;for(const Y of yi(k)){const L=s[Y][0],j=a.get(L)&k;$.set(L,j),M=Math.max(M,wt(j))}M=wt(k)-M;const G=[];for(const[Y,L,j,O,q]of P){const B=new Map;let c=0;for(const[S,v]of O){const U=v&k;wt(U)>0&&(B.set(S,U),c+=wt(U))}const b=j&k;let y=B.size>0?Y:0;for(const S of B.values()){const v=c-wt(S)+wt(b);y=Math.min(y,v)}if(y!==0){if(y===wt(k)-1){x(k,[L,b,B]);return}G.push([y,L,b,B,q&k])}}if(M===wt(k)-1){x(k,"size");return}if(G.sort(([Y],[L])=>L-Y),G.length>0&&G[0][0]>=M){const[,Y,L,j,O]=G[0];x(k,[Y,L,j]),E(L,G);for(const q of j.values())E(q|O,G.slice(1));return}if(M>0){x(k,"size");for(const Y of $.values())E(Y,G);return}x(k,"indistinguishable"),w=!1};E(n,C);const _=k=>{for(let P=wt(k)+1;P<t.length-2;++P)for(const M of I.get(P)??[])if((k&M)==k)return F.get(M);throw new Error("Implementation error in layout discrimination algorithm")};return[w,k=>{let P=n,M=F.get(P);for(;M!=="indistinguishable";){if(M==="size")P&=m(k.length);else{const[$,G,Y]=M;if(k.length<=$)P&=G;else{const L=k[$];for(const[j,O]of Y)j!==L&&(P^=P&O);P^=P&G}}if(wt(P)<=1)break;M=F.get(P)??_(P)}return yi(P)}]}var mo=(t,e)=>({...t,binary:"bytes",...e===void 0?{}:Ym(e)?{layout:e}:e instanceof Uint8Array||ls(e)||!Array.isArray(e)?{custom:e}:{layout:e[0],custom:e[1]}});function i1(t,e){const n=Object.fromEntries(t.map(([s,i])=>[i,s])),r=Object.fromEntries(t);return{binary:"uint",size:(e==null?void 0:e.size)??1,endianness:(e==null?void 0:e.endianness)??"big",custom:{to:s=>{const i=n[s];if(i===void 0)throw new Error(`Invalid enum value: ${s}`);return i},from:s=>r[s]}}}function o1(t,e){return{binary:"uint",size:Math.ceil(t.length/8),custom:{to:n=>{const r={};for(let s=0;s<t.length;++s)t[s]&&(r[t[s]]=(BigInt(n)&1n<<BigInt(s))!==0n);return r},from:n=>{let r=0n;for(let s=0;s<t.length;++s)t[s]&&n[t[s]]&&(r|=1n<<BigInt(s));return t.length>ho?r:Number(r)}}}}function a1(t,e){return Number(Number(t).toFixed(e))}function Ti(t,e){if(c1(t,e),t=t.toString(),t.includes("e"))throw new Error("Scientific notation is not supported yet by Amount");const n=t.split(".");if(n.length>2)throw"Too many decimals";let[r,s]=n.length===0?["0",""]:n.length===1?[n[0],""]:n;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 Ii(t,e){if(t.decimals<=e)return t;const n=BigInt(t.decimals-e);return{amount:(kt(t)/10n**n*10n**n).toString(),decimals:t.decimals}}function Kr(t,e){if(t.decimals===e)return t;if(t.amount==="0")return{amount:t.amount,decimals:e};const n=e-t.decimals;if(n>0)return{amount:t.amount+"0".repeat(n),decimals:e};if(BigInt(t.amount.substring(t.amount.length+n))===0n)return{amount:t.amount.substring(0,t.amount.length+n),decimals:e};throw new Error(`scaleAmount(${JSON.stringify(t)}, ${e}) would result in altered amount. Use truncateAmount first if you intended to truncate it.`)}function zn(t,e){return{amount:t.toString(),decimals:e}}function kt(t){return Gu(t),BigInt(t.amount)}function bo(t,e){Gu(t);let n=t.amount.substring(0,t.amount.length-t.decimals).padStart(1,"0"),r=t.amount.substring(t.amount.length-t.decimals).padStart(t.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?`${n}.${r}`:n}function Is(t){return Number(bo(t))}function ud(t,e){return bo(zn(t,e))}function c1(t,e){if(typeof t=="number"){if(!isFinite(t))throw new Error("Amount: invalid input. Amount must be finite");if(t<0)throw new Error("Amount: invalid input. Amount cannot be negative")}else if(!/^[0-9\.]*$/.test(t))throw new Error("Amount: invalid input. Must only contain digits.");if(!isFinite(e))throw new Error("Amount: invalid input. Decimals must be finite")}function Gu(t){if(!/^[0-9]*$/.test(t.amount))throw new Error("Amount: invalid input. Must only contain digits.");if(t.decimals<0)throw new Error("Amount: invalid input. Decimals must be >= 0");if(!isFinite(t.decimals))throw new Error("Amount: invalid input. Decimals must be a finite number.")}function l1(t,e){const r=kt(t)*e/100000n;return zn(r,t.decimals)}const Ls=(t=0,e=0,n=0)=>new Date(Date.now()+(t*60*60+e*60+n)*1e3);/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function es(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function d1(t,...e){if(!es(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function Yu(t,e){return Array.isArray(e)?e.length===0?!0:t?e.every(n=>typeof n=="string"):e.every(n=>Number.isSafeInteger(n)):!1}function Xu(t){if(typeof t!="function")throw new Error("function expected");return!0}function vr(t,e){if(typeof e!="string")throw new Error(`${t}: string expected`);return!0}function ds(t){if(!Number.isSafeInteger(t))throw new Error(`invalid integer: ${t}`)}function Ki(t){if(!Array.isArray(t))throw new Error("array expected")}function $i(t,e){if(!Yu(!0,e))throw new Error(`${t}: array of strings expected`)}function Mc(t,e){if(!Yu(!1,e))throw new Error(`${t}: array of numbers expected`)}function Qs(...t){const e=i=>i,n=(i,o)=>a=>i(o(a)),r=t.map(i=>i.encode).reduceRight(n,e),s=t.map(i=>i.decode).reduce(n,e);return{encode:r,decode:s}}function po(t){const e=typeof t=="string"?t.split(""):t,n=e.length;$i("alphabet",e);const r=new Map(e.map((s,i)=>[s,i]));return{encode:s=>(Ki(s),s.map(i=>{if(!Number.isSafeInteger(i)||i<0||i>=n)throw new Error(`alphabet.encode: digit index outside alphabet "${i}". Allowed: ${t}`);return e[i]})),decode:s=>(Ki(s),s.map(i=>{vr("alphabet.decode",i);const o=r.get(i);if(o===void 0)throw new Error(`Unknown letter: "${i}". Allowed: ${t}`);return o}))}}function yo(t=""){return vr("join",t),{encode:e=>($i("join.decode",e),e.join(t)),decode:e=>(vr("join.decode",e),e.split(t))}}function u1(t,e="="){return ds(t),vr("padding",e),{encode(n){for($i("padding.encode",n);n.length*t%8;)n.push(e);return n},decode(n){$i("padding.decode",n);let r=n.length;if(r*t%8)throw new Error("padding: invalid, string should have whole number of bytes");for(;r>0&&n[r-1]===e;r--)if((r-1)*t%8===0)throw new Error("padding: invalid, string has too much padding");return n.slice(0,r)}}}function fd(t,e,n){if(e<2)throw new Error(`convertRadix: invalid from=${e}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: invalid to=${n}, base cannot be less than 2`);if(Ki(t),!t.length)return[];let r=0;const s=[],i=Array.from(t,a=>{if(ds(a),a<0||a>=e)throw new Error(`invalid integer: ${a}`);return a}),o=i.length;for(;;){let a=0,l=!0;for(let f=r;f<o;f++){const m=i[f],p=e*a,C=p+m;if(!Number.isSafeInteger(C)||p/e!==a||C-m!==p)throw new Error("convertRadix: carry overflow");const w=C/n;a=C%n;const F=Math.floor(w);if(i[f]=F,!Number.isSafeInteger(F)||F*n+a!==C)throw new Error("convertRadix: carry overflow");if(l)F?l=!1:r=f;else continue}if(s.push(a),l)break}for(let a=0;a<t.length-1&&t[a]===0;a++)s.push(0);return s.reverse()}const Zu=(t,e)=>e===0?t:Zu(e,t%e),ji=(t,e)=>t+(e-Zu(t,e)),Ui=(()=>{let t=[];for(let e=0;e<40;e++)t.push(2**e);return t})();function Za(t,e,n,r){if(Ki(t),e<=0||e>32)throw new Error(`convertRadix2: wrong from=${e}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(ji(e,n)>32)throw new Error(`convertRadix2: carry overflow from=${e} to=${n} carryBits=${ji(e,n)}`);let s=0,i=0;const o=Ui[e],a=Ui[n]-1,l=[];for(const f of t){if(ds(f),f>=o)throw new Error(`convertRadix2: invalid data word=${f} from=${e}`);if(s=s<<e|f,i+e>32)throw new Error(`convertRadix2: carry overflow pos=${i} from=${e}`);for(i+=e;i>=n;i-=n)l.push((s>>i-n&a)>>>0);const m=Ui[i];if(m===void 0)throw new Error("invalid carry");s&=m-1}if(s=s<<n-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&&l.push(s>>>0),l}function f1(t){ds(t);const e=2**8;return{encode:n=>{if(!es(n))throw new Error("radix.encode input should be Uint8Array");return fd(Array.from(n),e,t)},decode:n=>(Mc("radix.decode",n),Uint8Array.from(fd(n,t,e)))}}function Rc(t,e=!1){if(ds(t),t<=0||t>32)throw new Error("radix2: bits should be in (0..32]");if(ji(8,t)>32||ji(t,8)>32)throw new Error("radix2: carry overflow");return{encode:n=>{if(!es(n))throw new Error("radix2.encode input should be Uint8Array");return Za(Array.from(n),8,t,!e)},decode:n=>(Mc("radix2.decode",n),Uint8Array.from(Za(n,t,8,e)))}}function hd(t){return Xu(t),function(...e){try{return t.apply(null,e)}catch{}}}function h1(t,e){return ds(t),Xu(e),{encode(n){if(!es(n))throw new Error("checksum.encode: input should be Uint8Array");const r=e(n).slice(0,t),s=new Uint8Array(n.length+t);return s.set(n),s.set(r,n.length),s},decode(n){if(!es(n))throw new Error("checksum.decode: input should be Uint8Array");const r=n.slice(0,-t),s=n.slice(-t),i=e(r).slice(0,t);for(let o=0;o<t;o++)if(i[o]!==s[o])throw new Error("Invalid checksum");return r}}}const md=Qs(Rc(4),po("0123456789ABCDEF"),yo("")),m1=typeof Uint8Array.from([]).toBase64=="function"&&typeof Uint8Array.fromBase64=="function",b1=(t,e)=>{vr("base64",t);const n=/^[A-Za-z0-9=+/]+$/,r="base64";if(t.length>0&&!n.test(t))throw new Error("invalid base64");return Uint8Array.fromBase64(t,{alphabet:r,lastChunkHandling:"strict"})},bd=m1?{encode(t){return d1(t),t.toBase64()},decode(t){return b1(t)}}:Qs(Rc(6),po("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),u1(6),yo("")),p1=t=>Qs(f1(58),po(t),yo("")),Ja=p1("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),y1=t=>Qs(h1(4,e=>t(t(e))),Ja),Qa=Qs(po("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),yo("")),pd=[996825010,642813549,513874426,1027748829,705979059];function xs(t){const e=t>>25;let n=(t&33554431)<<5;for(let r=0;r<pd.length;r++)(e>>r&1)===1&&(n^=pd[r]);return n}function yd(t,e,n=1){const r=t.length;let s=1;for(let i=0;i<r;i++){const o=t.charCodeAt(i);if(o<33||o>126)throw new Error(`Invalid prefix (${t})`);s=xs(s)^o>>5}s=xs(s);for(let i=0;i<r;i++)s=xs(s)^t.charCodeAt(i)&31;for(let i of e)s=xs(s)^i;for(let i=0;i<6;i++)s=xs(s);return s^=n,Qa.encode(Za([s%Ui[30]],30,5,!1))}function g1(t){const e=t==="bech32"?1:734539939,n=Rc(5),r=n.decode,s=n.encode,i=hd(r);function o(p,C,w=90){vr("bech32.encode prefix",p),es(C)&&(C=Array.from(C)),Mc("bech32.encode",C);const F=p.length;if(F===0)throw new TypeError(`Invalid prefix length ${F}`);const I=F+7+C.length;if(w!==!1&&I>w)throw new TypeError(`Length ${I} exceeds limit ${w}`);const x=p.toLowerCase(),E=yd(x,C,e);return`${x}1${Qa.encode(C)}${E}`}function a(p,C=90){vr("bech32.decode input",p);const w=p.length;if(w<8||C!==!1&&w>C)throw new TypeError(`invalid string length: ${w} (${p}). Expected (8..${C})`);const F=p.toLowerCase();if(p!==F&&p!==p.toUpperCase())throw new Error("String must be lowercase or uppercase");const I=F.lastIndexOf("1");if(I===0||I===-1)throw new Error('Letter "1" must be present between prefix and data only');const x=F.slice(0,I),E=F.slice(I+1);if(E.length<6)throw new Error("Data must be at least 6 characters long");const _=Qa.decode(E).slice(0,-6),k=yd(x,_,e);if(!E.endsWith(k))throw new Error(`Invalid checksum in ${p}: expected "${k}"`);return{prefix:x,words:_}}const l=hd(a);function f(p){const{prefix:C,words:w}=a(p,!1);return{prefix:C,words:w,bytes:r(w)}}function m(p,C){return o(p,s(C))}return{encode:o,decode:a,encodeFromBytes:m,decodeToBytes:f,decodeUnsafe:l,fromWords:r,fromWordsUnsafe:i,toWords:s}}const Ju=g1("bech32"),Qu=(t,e)=>e.startsWith(t)?e.slice(t.length):e,w1=/^(?:0x)?[0-9a-fA-F]+$/,At={valid:t=>w1.test(t),decode:t=>md.decode(Qu("0x",t).toUpperCase()),encode:(t,e=!1)=>(t=typeof t=="string"?Lt.encode(t):t,(e?"0x":"")+md.encode(t).toLowerCase())},E1=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,go={valid:t=>E1.test(t),decode:bd.decode,encode:t=>bd.encode(typeof t=="string"?Lt.encode(t):t)},ef={decode:Ja.decode,encode:t=>Ja.encode(typeof t=="string"?Lt.encode(t):t)},Us={decode:t=>(typeof t!="string"&&(t=At.encode(t,!0)),t===""||t==="0x"?0n:BigInt(t)),encode:(t,e=!1)=>Us.toString(t,e),toString:(t,e=!1)=>{let n=t.toString(16);return n=n.length%2===1?n="0"+n:n,e?"0x"+n:n},toBytes:(t,e)=>{typeof t=="number"&&(t=Us.toBigInt(t));const n=At.decode(Us.toString(t));if(!e)return n;if(e<n.length)throw new Error(`Can't fit ${t} into ${e} bytes.`);return Lt.zpad(n,e)},toNumber:t=>{if(t>BigInt(Number.MAX_SAFE_INTEGER))throw new Error(`Invalid cast: ${t} exceeds MAX_SAFE_INTEGER`);return Number(t)},toBigInt:t=>{if(t>Number.MAX_SAFE_INTEGER)throw new Error(`Invalid cast: ${t} exceeds MAX_SAFE_INTEGER`);return BigInt(t)}},Lt={encode:t=>new TextEncoder().encode(t),decode:t=>new TextDecoder().decode(t),equals:(t,e)=>t.length===e.length&&t.every((n,r)=>n===e[r]),zpad:(t,e,n=!0)=>n?Lt.concat(new Uint8Array(e-t.length),t):Lt.concat(t,new Uint8Array(e-t.length)),concat:(...t)=>{const e=t.reduce((s,i)=>s+i.length,0),n=new Uint8Array(e);let r=0;return t.forEach(s=>{n.set(s,r),r+=s.length}),n}},Wc=[[1,"Solana"],[2,"Ethereum"],[4,"Bsc"],[5,"Polygon"],[6,"Avalanche"],[8,"Algorand"],[10,"Fantom"],[13,"Klaytn"],[14,"Celo"],[15,"Near"],[16,"Moonbeam"],[17,"Neon"],[18,"Terra2"],[19,"Injective"],[20,"Osmosis"],[21,"Sui"],[22,"Aptos"],[23,"Arbitrum"],[24,"Optimism"],[26,"Pythnet"],[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"],[51,"Fogo"],[52,"Sonic"],[53,"Converge"],[55,"Plume"],[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"]],[Ew,tf]=pr(Wc),ei=fe(Wc,[1,0]),Vi=fe(Wc),ti=t=>ei.has(t),ec=t=>Vi.has(t),fn=t=>{switch(typeof t){case"string":if(ti(t))return ei(t);break;case"number":if(ec(t))return t;break}throw Error(`Cannot convert to ChainId: ${t}`)},us=t=>{switch(typeof t){case"string":if(ti(t))return t;break;case"number":if(ec(t))return Vi(t);break;case"bigint":if(ec(Number(t)))return Vi.get(Number(t));break}throw Error(`Cannot convert to Chain: ${t}`)},Pc=[["Evm",["Arbitrum","Avalanche","Base","Bsc","Celo","Ethereum","Fantom","Klaytn","Moonbeam","Neon","Optimism","Polygon","Sepolia","ArbitrumSepolia","BaseSepolia","OptimismSepolia","Holesky","PolygonSepolia","Mantle","Scroll","Blast","Xlayer","Linea","Berachain","Seievm","Snaxchain","Unichain","Worldchain","Ink","HyperEVM","Monad","Mezo","Sonic","Converge","Plume"]],["Solana",["Solana","Pythnet","Fogo"]],["Cosmwasm",["Cosmoshub","Evmos","Injective","Kujira","Osmosis","Sei","Terra2","Wormchain","Dymension","Neutron","Stargaze","Celestia","Seda","Provenance","Noble"]],["Btc",["Btc"]],["Algorand",["Algorand"]],["Sui",["Sui"]],["Aptos",["Aptos"]],["Near",["Near"]]];Hu(Pc,0);const nf=fe(Pc),hn=fe(Pc,[1,0]),A1=[["Evm","hex"],["Solana","base58"],["Cosmwasm","bech32"],["Btc","bech32"],["Algorand","algorandAppId"],["Sui","hex"],["Aptos","hex"],["Near","sha256"]],B1=fe(A1),fs={byAddress:(t,e)=>Object.values(t).find(n=>rf(n.address,e)),native:t=>fs.byAddress(t,"native"),bySymbol:(t,e)=>{const n=Object.values(t).filter(r=>r.symbol===e);return n&&n.length>0?n:void 0},byKey:(t,e)=>{const n=Object.entries(t).find(([r])=>e===r);return n?n[1]:void 0}},rf=(t,e)=>t.toLowerCase()===e.toLowerCase();var gd;(function(t){t[t.Finalized=1]="Finalized",t[t.Immediate=200]="Immediate",t[t.Safe=201]="Safe"})(gd||(gd={}));const x1=[["Ethereum",32]];fe(x1);const C1=[["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],["Avalanche",0],["Sui",0],["Algorand",0],["Aptos",0],["Klaytn",0],["Sei",0],["Near",0],["Osmosis",0],["Terra2",0],["Injective",0],["Berachain",1],["Seievm",1],["Snaxchain",512],["Unichain",1024],["Ink",512],["HyperEVM",1],["Monad",1],["Mezo",1],["Sonic",1],["Converge",4096],["Fogo",32],["Plume",64],["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]],sf=fe(C1),S1=[["Algorand",3300],["Aptos",4e3],["Arbitrum",260],["ArbitrumSepolia",260],["Avalanche",2e3],["Base",2e3],["BaseSepolia",2e3],["Blast",2e3],["Bsc",3e3],["Celo",5e3],["Cosmoshub",5e3],["Ethereum",15e3],["Evmos",2e3],["Fantom",2500],["Holesky",15e3],["Injective",2500],["Klaytn",1e3],["Kujira",3e3],["Mantle",2e3],["Moonbeam",12e3],["Monad",1e3],["Near",1500],["Neon",3e4],["Optimism",2e3],["OptimismSepolia",2e3],["Osmosis",6e3],["Polygon",2e3],["PolygonSepolia",2e3],["Scroll",3e3],["Sei",400],["Sepolia",15e3],["Solana",400],["Sui",3e3],["Terra2",6e3],["Unichain",1e3],["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],["Converge",100],["Fogo",400],["Plume",250]],of=fe(S1);function Lc(t){const e=sf.get(t);if(e===void 0)throw new Error("Cannot find finality for "+t);const n=of.get(t);if(n===void 0)throw new Error("Cannot find block time for "+t);return e*n}const D1=[["Evm",18],["Solana",9],["Sui",9],["Aptos",8],["Cosmwasm",6],["Algorand",6],["Btc",8],["Near",12]],af=fe(D1),v1=[["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/"}}],["Mezo",{name:"Mezo Explorer",baseUrl:"https://explorer.mezo.org/",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/"}}],["Mezo",{name:"Mezo Explorer",baseUrl:"https://explorer.test.mezo.org/",endpoints:{tx:"tx/",account:"address/"}}]]]],k1=fe(v1),F1=(t,e)=>t==="Devnet"?void 0:k1.get(t,e),T1=[["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"],["Sei","https://sei-rpc.polkachu.com/"],["Algorand","https://mainnet-api.algonode.cloud"],["Terra2","https://terra-rpc.polkachu.com"],["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/"],["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"],["HyperEVM","https://rpc.hyperliquid.xyz/evm"],["Mezo","https://jsonrpc-mezo.boar.network/"],["Plume","https://rpc.plume.org/"]]],["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"],["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/"],["Sepolia","https://ethereum-sepolia.publicnode.com"],["Algorand","https://testnet-api.algonode.cloud"],["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"],["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"],["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"],["Converge","https://rpc-converge-testnet-1.t.conduit.xyz"],["Fogo","https://testnet.fogo.io"],["Plume","https://testnet-rpc.plume.org"]]],["Devnet",[["Ethereum","http://eth-devnet:8545"],["Bsc","http://eth-devnet2:8545"],["Solana","http://solana-devnet:8899"]]]],I1=fe(T1),cf=(t,e)=>I1.get(t,e)??"",lf=[["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"],["Terra2","phoenix-1"],["Wormchain","wormchain"],["Kujira","kaiyo-1"],["Solana","5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d"],["Sui","35834a8a"],["Arbitrum",42161n],["Avalanche",43114n],["Base",8453n],["Bsc",56n],["Celo",42220n],["Ethereum",1n],["Fantom",250n],["Klaytn",8217n],["Moonbeam",1284n],["Neon",245022934n],["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],["Seievm",1329n],["Unichain",130n],["Worldchain",480n],["Ink",57073n],["Sonic",146n],["HyperEVM",999n],["Mezo",31612n],["Plume",98866n]]],["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"],["Terra2","pisco-1"],["Wormchain","wormchain-testnet-0"],["Kujira","harpoon-4"],["Solana","EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG"],["Sui","4c78adac"],["Arbitrum",421613n],["Avalanche",43113n],["Base",84531n],["Bsc",97n],["Celo",44787n],["Ethereum",5n],["Fantom",4002n],["Klaytn",1001n],["Moonbeam",1287n],["Neon",245022940n],["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],["Converge",52085145n],["Fogo","9GGSFo95raqzZxWqKM5tGYvJp5iv4Dm565S4r8h5PEu9"],["Plume",98867n]]],["Devnet",[["Aptos",0n],["Algorand","sandnet-v1.0"],["Bsc",1397n],["Ethereum",1337n],["Injective","injective_devnet_fake"],["Solana","8wF6jKV3cKwyaVkWcoV9KpDqmkjvEYno9hKZrKx8TbZn"]]]],df=fe(lf),U1=fe(lf,[2,[0,1]]);function _1(t,e){const r=U1(e).filter(([s,i])=>hn(i)===t);if(r.length!==1)throw new Error(`Platform ${t} has multiple chains with native chain id ${e}`);return r[0]}const M1=[["Mainnet","https://iris-api.circle.com/v1/attestations"],["Testnet","https://iris-api-sandbox.circle.com/v1/attestations"]],wd=fe(M1),R1=[["Mainnet",[["Ethereum","0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"],["Avalanche","0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"],["Optimism","0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85"],["Arbitrum","0xaf88d065e77c8cC2239327C5EDb3A432268e5831"],["Solana","EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"],["Base","0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"],["Polygon","0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359"],["Sui","0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC"],["Aptos","0xbae207659db88bea0cbead6da0ed00aac12edcdda169e591cd41c94180b46f3b"],["Unichain","0x078D782b760474a361dDA0AF3839290b0EF57AD6"],["Sonic","0x29219dd400f2Bf60E5a23d13Be72B486D4038894"],["Linea","0x176211869cA2b568f2A7D4EE941E073a821EE1ff"],["Worldchain","0x79A02482A880bCE3F13e09Da970dC34db4CD24d1"]]],["Testnet",[["Sepolia","0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238"],["Avalanche","0x5425890298aed601595a70AB815c96711a31Bc65"],["OptimismSepolia","0x5fd84259d66Cd46123540766Be93DFE6D43130D7"],["ArbitrumSepolia","0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"],["Solana","4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU"],["BaseSepolia","0x036CbD53842c5426634e7929541eC2318f3dCF7e"],["Polygon","0x9999f7Fea5938fD3b1E26A12c3f2fb024e194f97"],["Sui","0xa1ec7fc00a6f40db9693ad1415d0c193ad3906494428cf252621037bd7117e29::usdc::USDC"],["Aptos","0x69091fbab5f7d635ee7ac5098cf0c1efbe31d68fec0f2cd565e8d168daf52832"],["Unichain","0x31d0220469e10c4E71834a79b1f276d740d3768F"],["Sonic","0xA4879Fed32Ecbef99399e5cbC247E533421C4eC6"],["Linea","0xFEce4462D57bD51A6A552365A011b95f0E16d9B7"]]]],_s=fe(R1),Oc=[["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]]]],uf=fe(Oc,[[0,1],2]),tc=fe(Oc,[[0,2],1]),[Aw,Bw]=pr(Oc),Os=(t,e)=>uf.has(t,e),Ed=(t,e)=>tc.has(t,e),Ad=(t,e)=>_s.has(t,e),_i=(t,e)=>{switch(typeof e){case"string":if(Os(t,e))return e;break;case"number":if(Ed(t,e))return tc(t,e);break;case"bigint":const n=Number(e);if(Ed(t,n))return tc(t,n);break}throw Error(`Cannot convert to Chain: ${e}`)},W1=[["Mainnet",[["Solana","worm2ZoG2kUd4vFXhvjh93UUH596ayRfgQ2MgjNMTth"],["Ethereum","0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B"],["Bsc","0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B"],["Polygon","0x7A4B5a56256163F07b2C80A7cA55aBE66c4ec4d7"],["Avalanche","0x54a8e5f9c4CbA08F9943965859F6c34eAF03E26c"],["Algorand","842125965"],["Fantom","0x126783A6Cb203a3E35344528B26ca3a0489a1485"],["Klaytn","0x0C21603c4f3a6387e241c0091A7EA39E43E90bb7"],["Celo","0xa321448d90d4e5b0A732867c18eA198e75CAC48E"],["Near","contract.wormhole_crypto.near"],["Injective","inj17p9rzwnnfxcjp32un9ug7yhhzgtkhvl9l2q74d"],["Aptos","0x5bc11445584a763c1fa7ed39081f1b920954da14e04b32440cba863d03e19625"],["Sui","0xaeab97f96cf9877fee2883315d459552b2b921edc16d7ceac6eab944dd88919c"],["Moonbeam","0xC8e2b0cD52Cf01b0Ce87d389Daa3d414d4cE29f3"],["Terra2","terra12mrnzvhx3rpej6843uge2yyfppfyd3u9c3uq223q8sl48huz9juqffcnhp"],["Arbitrum","0xa5f208e072434bC67592E4C49C1B991BA79BCA46"],["Optimism","0xEe91C335eab126dF5fDB3797EA9d6aD93aeC9722"],["Pythnet","H3fxXJ86ADW2PNuDDmZJg6mzTtPxkYCpNuQUTgmJ7AjU"],["Base","0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"],["Xlayer","0x194B123c5E96B9b2E49763619985790Dc241CAC0"],["Sei","sei1gjrrme22cyha4ht2xapn3f08zzw6z3d4uxx6fyy9zd5dyr3yxgzqqncdqn"],["Wormchain","wormhole1ufs3tlq4umljk0qfe8k5ya0x6hpavn897u2cnf9k0en9jr7qarqqaqfk2j"],["Neutron","neutron16rerygcpahqcxx5t8vjla46ym8ccn7xz7rtc6ju5ujcd36cmc7zs9zrunh"],["Blast","0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"],["Scroll","0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"],["Mantle","0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"],["Snaxchain","0xc1BA3CC4bFE724A08FbbFbF64F8db196738665f4"],["Berachain","0xCa1D5a146B03f6303baF59e5AD5615ae0b9d146D"],["Seievm","0xCa1D5a146B03f6303baF59e5AD5615ae0b9d146D"],["Unichain","0xCa1D5a146B03f6303baF59e5AD5615ae0b9d146D"],["Worldchain","0xcbcEe4e081464A15d8Ad5f58BB493954421eB506"],["Ink","0xCa1D5a146B03f6303baF59e5AD5615ae0b9d146D"],["HyperEVM","0x7C0faFc4384551f063e05aee704ab943b8B53aB3"],["Mezo","0xaBf89de706B583424328B54dD05a8fC986750Da8"],["Plume","0xaBf89de706B583424328B54dD05a8fC986750Da8"]]],["Testnet",[["Solana","3u8hJUVTA4jH1wYAyUur7FFZVQ8H635K3tSHHF4ssjQ5"],["Ethereum","0x706abc4E45D419950511e474C7B9Ed348A4a716c"],["Bsc","0x68605AD7b15c732a30b1BbC62BE8F2A509D74b4D"],["Polygon","0x0CBE91CF822c73C2315FB05100C2F714765d5c20"],["Avalanche","0x7bbcE28e64B3F8b84d876Ab298393c38ad7aac4C"],["Algorand","86525623"],["Fantom","0x1BB3B4119b7BA9dfad76B0545fb3F531383c3bB7"],["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"],["Pythnet","EUrRARh92Cdc54xrDn6qzaqjA77NRrCcfbr8kPwoTL4z"],["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"],["Converge","0x556B259cFaCd9896B2773310080c7c3bcE90Ff01"],["Fogo","BhnQyKoQQgpuRTRo6D8Emz93PvXCYfVgHhnrR4T3qhw4"],["Plume","0x81705b969cDcc6FbFde91a0C6777bE0EF3A75855"]]],["Devnet",[["Solana","Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o"],["Ethereum","0xC89Ce4735882C9F0f0FE26686c53074E09B0D550"],["Bsc","0xC89Ce4735882C9F0f0FE26686c53074E09B0D550"],["Algorand","1004"],["Near","wormhole.test.near"],["Aptos","0xde0036a9600559e295d5f6802ef6f3f802f510366e0c23912b0655d972166017"],["Sui","0x5a5160ca3c2037f4b4051344096ef7a48ebf4400b3f385e57ea90e1628a8bde0"],["Terra2","terra14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9ssrc8au"],["Wormchain","wormhole17p9rzwnnfxcjp32un9ug7yhhzgtkhvl9jfksztgw5uh69wac2pgshdnj3k"]]]],ff=[["Mainnet",[["Solana","wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb"],["Ethereum","0x3ee18B2214AFF97000D974cf647E7C347E8fa585"],["Bsc","0xB6F6D86a8f9879A9c87f643768d9efc38c1Da6E7"],["Polygon","0x5a58505a96D1dbf8dF91cB21B54419FC36e93fdE"],["Avalanche","0x0e082F06FF657D94310cB8cE8B0D9a04541d8052"],["Algorand","842126029"],["Fantom","0x7C9Fc5741288cDFdD83CeB07f3ea7e22618D79D2"],["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"],["Sei","sei1smzlm9t79kur392nu9egl8p8je9j92q4gzguewj56a05kyxxra0qy0nuf3"],["Wormchain","wormhole1466nf3zuxpya8q9emxukd7vftaf6h4psr0a07srl5zw74zh84yjq4lyjmh"],["Blast","0x24850c6f61C438823F01B7A3BF2B89B72174Fa9d"],["Scroll","0x24850c6f61C438823F01B7A3BF2B89B72174Fa9d"],["Mantle","0x24850c6f61C438823F01B7A3BF2B89B72174Fa9d"],["Snaxchain","0x8B94bfE456B48a6025b92E11Be393BAa86e68410"],["Berachain","0x3Ff72741fd67D6AD0668d93B41a09248F4700560"],["Seievm","0x3Ff72741fd67D6AD0668d93B41a09248F4700560"],["Unichain","0x3Ff72741fd67D6AD0668d93B41a09248F4700560"],["Worldchain","0xc309275443519adca74c9136b02A38eF96E3a1f6"],["Ink","0x3Ff72741fd67D6AD0668d93B41a09248F4700560"]]],["Testnet",[["Solana","DZnkkTmCiFWfYTfT41X3Rd1kDgozqzxWaHqsw6W4x2oe"],["Ethereum","0xF890982f9310df57d00f659cf4fd87e65adEd8d7"],["Bsc","0x9dcF9D205C9De35334D646BeE44b2D2859712A09"],["Polygon","0x377D55a7928c046E18eEbb61977e714d2a76472a"],["Avalanche","0x61E44E506Ca5659E6c0bba9b678586fA2d729756"],["Algorand","86525641"],["Fantom","0x599CEa2204B4FaECd584Ab1F2b6aCA137a0afbE8"],["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"],["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"],["Fogo","78HdStBqCMioGii9D8mF3zQaWDqDZBQWTUwjjpdmbJKX"]]],["Devnet",[["Solana","B6RHG3mfcckmrYN1UhmJzyS1XX3fZKbkeUcpJe9Sy3FE"],["Ethereum","0x0290FB167208Af455bB137780163b7B7a9a10C16"],["Bsc","0x0290FB167208Af455bB137780163b7B7a9a10C16"],["Algorand","1006"],["Near","token.test.near"],["Aptos","0x84a5f374d29fc77e370014dce4fd6a55b58ad608de8074b0be5571701724da31"],["Sui","0xa6a3da85bbe05da5bfd953708d56f1a3a023e7fb58e5a824a3d4de3791e8f690"],["Terra2","terra1nc5tatafv6eyq7llkr2gv50ff9e22mnf70qgjlv737ktmt4eswrquka9l6"],["Wormchain","wormhole1ghd753shjuwexxywmgs4xz7x2q732vcnkm6h2pyv9s6ah3hylvrqtm7t3h"]]]],hf=[["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",""]]]],mf=[["Mainnet",[["Arbitrum",{relayer:"0x04C98824a64d75CD1E9Bc418088b4c9A99048153",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Avalanche",{relayer:"0x8849F05675E034b54506caB84450c8C82694a786",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Base",{relayer:"0xD8B736EF27Fc997b1d00F22FE37A58145D3BDA07",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Berachain",{relayer:"0xFAeFa20CB3759AEd2310E25015F05d62D8567A3F",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Bsc",{relayer:"0x2513515340fF71DD5AF02fC1BdB9615704d91524",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Celo",{relayer:"0xe478DEe705BEae591395B08934FA19F54df316BE",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Ethereum",{relayer:"0xa8969F3f8D97b3Ed89D4e2EC19B6B0CfD504b212",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Moonbeam",{relayer:"0xF6b9616C63Fa48D07D82c93CE02B5d9111c51a3d",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Optimism",{relayer:"0x37aC29617AE74c750a1e4d55990296BAF9b8De73",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Polygon",{relayer:"0x1d98CA4221516B9ac4869F5CeA7E6bb9C41609D6",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Scroll",{relayer:"0x05129e142e7d5A518D81f19Db342fBF5f7E26A18",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Seievm",{relayer:"0x7C129bc8F6188d12c0d1BBDE247F134148B97618",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Solana",{relayer:"tbr7Qje6qBzPwfM52csL5KFi8ps5c5vDyiVVBLYVdRf"}],["Unichain",{relayer:"0x9Bca817F67f01557aeD615130825A28F4C5f3b87",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Worldchain",{relayer:"0xc0565Bd29b34603C0383598E16843d95Ae9c4f65",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}]]],["Testnet",[["Avalanche",{relayer:"0x10Ce9a35883C44640e8B12fea4Cc1e77F77D8c52",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["BaseSepolia",{relayer:"0x523d25D33B975ad72283f73B1103354352dBCBb8",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Fogo",{relayer:"tbr7Qje6qBzPwfM52csL5KFi8ps5c5vDyiVVBLYVdRf"}],["Sepolia",{relayer:"0xb0b2119067cF04fa959f654250BD49fE1BD6F53c",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Solana",{relayer:"tbr7Qje6qBzPwfM52csL5KFi8ps5c5vDyiVVBLYVdRf"}]]]],bf=[["Mainnet",[["Aptos","0x11aa75c059e1a7855be66b931bf340a2e0973274ac16b5f519c02ceafaf08a18"],["Arbitrum","0x3980f8318fc03d79033Bbb421A622CDF8d2Eeab4"],["Avalanche","0x4661F0E629E4ba8D04Ee90080Aee079740B00381"],["Base","0x9E1936E91A4a5AE5A5F75fFc472D6cb8e93597ea"],["Berachain","0x0Dd7a5a32311b8D87A615Cc7f079B632D3d5e2D3"],["Bsc","0xeC8cCCD058DbF28e5D002869Aa9aFa3992bf4ee0"],["Celo","0xe6Ea5087c6860B94Cf098a403506262D8F28cF05"],["Ethereum","0x84EEe8dBa37C36947397E1E11251cA9A06Fc6F8a"],["HyperEVM","0xd7717899cc4381033Bc200431286D0AC14265F78"],["Linea","0x23aF2B5296122544A9A7861da43405D5B15a9bD3"],["Mezo","0x0f9b8E144Cc5C5e7C0073829Afd30F26A50c5606"],["Moonbeam","0x85D06449C78064c2E02d787e9DC71716786F8D19"],["Optimism","0x85B704501f6AE718205C0636260768C4e72ac3e7"],["Polygon","0x0B23efA164aB3eD08e9a39AC7aD930Ff4F5A5e81"],["Scroll","0xcFAdDE24640e395F5A71456A825D0D7C3741F075"],["Seievm","0x25f1c923fb7a5aefa5f0a2b419fc70f2368e66e5"],["Solana","execXUrAsMnqMmTHj5m7N1YQgsDz3cwGLYCYyuDRciV"],["Sonic","0x3Fdc36b4260Da38fBDba1125cCBD33DD0AC74812"],["Sui","0xdb0fe8bb1e2b5be628adbea0636063325073e1070ee11e4281457dfd7f158235"],["Unichain","0x764dD868eAdD27ce57BCB801E4ca4a193d231Aed"],["Worldchain","0x8689b4E6226AdC8fa8FF80aCc3a60AcE31e8804B"]]],["Testnet",[["Aptos","0x139717c339f08af674be77143507a905aa28cbc67a0e53e7095c07b630d73815"],["Avalanche","0x4661F0E629E4ba8D04Ee90080Aee079740B00381"],["BaseSepolia","0x51B47D493CBA7aB97e3F8F163D6Ce07592CE4482"],["Converge","0xAab9935349B9c08e0e970720F6D640d5B91C293E"],["Fogo","execXUrAsMnqMmTHj5m7N1YQgsDz3cwGLYCYyuDRciV"],["Monad","0xC04dE634982cAdF2A677310b73630B7Ac56A3f65"],["Plume","0x8fc2FbA8F962fbE89a9B02f03557a011c335A455"],["Seievm","0x25f1c923Fb7A5aEFA5F0A2b419fC70f2368e66e5"],["Sepolia","0xD0fb39f5a3361F21457653cB70F9D0C9bD86B66B"],["Solana","execXUrAsMnqMmTHj5m7N1YQgsDz3cwGLYCYyuDRciV"],["Sui","0x4000cfe2955d8355b3d3cf186f854fea9f787a457257056926fde1ec977670eb"]]]],P1=[["Mainnet",[["Solana","WnFt12ZrnzZrFZkt2xsNsaNWoQribnuQ5B5FrDbwDhD"],["Ethereum","0x6FFd7EdE62328b3Af38FCD61461Bbfc52F5651fE"],["Bsc","0x5a58505a96D1dbf8dF91cB21B54419FC36e93fdE"],["Polygon","0x90BBd86a6Fe93D3bc3ed6335935447E75fAb7fCf"],["Avalanche","0xf7B6737Ca9c4e08aE573F75A97B73D7a813f5De5"],["Fantom","0xA9c7119aBDa80d4a4E0C06C8F4d8cF5893234535"],["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"],["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"],["Bsc","0x26b4afb60d6c903165150c6f0aa14f8016be4aec"],["Aptos","0x46da3d4c569388af61f951bdd1153f4c875f90c2991f6b2d0a38e2161a40852c"]]]],L1=[["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"],["Seievm","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"],["Mezo","0x362fca37E45fe1096b42021b543f462D49a5C8df"],["Monad","0x362fca37E45fe1096b42021b543f462D49a5C8df"],["PolygonSepolia","0x362fca37E45fe1096b42021b543f462D49a5C8df"]]],["Devnet",[["Ethereum","0xcC680D088586c09c3E0E099a676FA4b6e42467b4"],["Bsc","0xcC680D088586c09c3E0E099a676FA4b6e42467b4"]]]],pf=[["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:""}]]]],O1=[["Mainnet",[["Wormchain","wormhole14ejqjyq8um4p3xfqj74yld5waqljf88fz25yxnma0cngspxe3les00fpjx"]]],["Testnet",[["Wormchain","wormhole1ctnjk7an90lz5wjfvr3cf6x984a8cjnv8dpmztmlpcq4xteaa2xs9pwmzk"]]]],N1=[["Mainnet",[["Sei","sei189adguawugk3e55zn63z8r9ll29xrjwca636ra7v7gxuzn98sxyqwzt47l"]]],["Testnet",[["Sei","sei1dkdwdvknx0qav5cp5kw68mkn3r99m3svkyjfvkztwh97dv2lm0ksj6xrak"]]]],z1=[["Mainnet",[["Polygon",["Ethereum","0x86E4Dc95c7FBdBf52e33D563BbDB00823894C287"]],["Optimism",["Ethereum","0xdfe97868233d1aa22e815a266982f2cf17685a27"]],["Arbitrum",["Ethereum","0x1c479675ad559dc151f6ec7ed3fbf8cee79582b6"]]]],["Testnet",[["Polygon",["Ethereum","0x2890ba17efe978480615e330ecb65333b880928e"]],["Optimism",["Ethereum","0xe6dfba0953616bacab0c9a8ecb3a9bba77fc15c0"]],["Arbitrum",["Ethereum","0x45af9ed1d03703e480ce7d328fb684bb67da5049"]]]]],yf=[["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}]]]],H1=[["Mainnet",[["Solana","87MEvHZCXE3ML5rrmh5uX1FbShHmRXXS32xJDGbQ7h5t"],["Polygon","0x09959798B95d00a3183d20FaC298E4594E599eab"],["Arbitrum","0x1293a54e160D1cd7075487898d65266081A15458"],["Optimism","0x1293a54e160D1cd7075487898d65266081A15458"],["Base","0x09959798B95d00a3183d20FaC298E4594E599eab"]]]],q1=fe(W1),K1=fe(ff),$1=fe(hf),nc=fe(mf),j1=fe(bf),V1=fe(P1),G1=fe(L1),Bd=fe(O1),xd=fe(N1),Cd=fe(yf),Mi=fe(H1),rc=fe(pf);fe(z1);const Y1=fe(ff,[0,1]),X1=fe(hf,[0,1]);fe(mf,[0,1]);fe(bf,[0,1]);const Z1=fe(pf,[0,1]),J1=fe(yf,[0,1]),Nc=[["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"]]]],[xw,Cw]=zm(pr(qi(Nc)),[1,2]);fe(Nc,[[0,2],1]);fe(Nc,[1,[0,2]]);const zc=5,Q1=[["Mainnet",[["Ethereum","0x18084fbA666a33d37592fA2633fD49a74DD93a88"],["Solana","6DNSN2BJsaPFdFFc1zP37kkeNe4Usc1Sqkzr9C9vPWcU"],["Polygon","0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b"],["Arbitrum","0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40"],["Optimism","0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40"],["Base","0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b"]]]],eb=fe(Q1),tb=[["Mainnet","https://executor.labsapis.com/v0"],["Testnet","https://executor-testnet.labsapis.com/v0"]],Sd=fe(tb),Hr=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function wo(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function ts(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function Vt(t,...e){if(!wo(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function gf(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");ts(t.outputLen),ts(t.blockLen)}function kr(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function Hc(t,e){Vt(t);const n=e.outputLen;if(t.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function wf(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function $n(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function Ri(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function gn(t,e){return t<<32-e|t>>>e}function nb(t,e){return t<<e|t>>>32-e>>>0}const Ef=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Af(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}const rb=Ef?t=>t:t=>Af(t);function sb(t){for(let e=0;e<t.length;e++)t[e]=Af(t[e]);return t}const sc=Ef?t=>t:sb,Bf=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",ib=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Fr(t){if(Vt(t),Bf)return t.toHex();let e="";for(let n=0;n<t.length;n++)e+=ib[t[n]];return e}const Ln={_0:48,_9:57,A:65,F:70,a:97,f:102};function Dd(t){if(t>=Ln._0&&t<=Ln._9)return t-Ln._0;if(t>=Ln.A&&t<=Ln.F)return t-(Ln.A-10);if(t>=Ln.a&&t<=Ln.f)return t-(Ln.a-10)}function Eo(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);if(Bf)return Uint8Array.fromHex(t);const e=t.length,n=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const r=new Uint8Array(n);for(let s=0,i=0;s<n;s++,i+=2){const o=Dd(t.charCodeAt(i)),a=Dd(t.charCodeAt(i+1));if(o===void 0||a===void 0){const l=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character "'+l+'" at index '+i)}r[s]=o*16+a}return r}function qc(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function hs(t){return typeof t=="string"&&(t=qc(t)),Vt(t),t}function ob(t){return typeof t=="string"&&(t=qc(t)),Vt(t),t}function kn(...t){let e=0;for(let r=0;r<t.length;r++){const s=t[r];Vt(s),e+=s.length}const n=new Uint8Array(e);for(let r=0,s=0;r<t.length;r++){const i=t[r];n.set(i,s),s+=i.length}return n}function ab(t,e){if(e!==void 0&&{}.toString.call(e)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(t,e)}let Ao=class{};function ni(t){const e=r=>t().update(hs(r)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function cb(t){const e=(r,s)=>t(s).update(hs(r)).digest(),n=t({});return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=r=>t(r),e}function Kc(t=32){if(Hr&&typeof Hr.getRandomValues=="function")return Hr.getRandomValues(new Uint8Array(t));if(Hr&&typeof Hr.randomBytes=="function")return Uint8Array.from(Hr.randomBytes(t));throw new Error("crypto.getRandomValues must be defined")}function lb(t,e,n,r){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,n,r);const s=BigInt(32),i=BigInt(4294967295),o=Number(n>>s&i),a=Number(n&i),l=r?4:0,f=r?0:4;t.setUint32(e+l,o,r),t.setUint32(e+f,a,r)}function db(t,e,n){return t&e^~t&n}function ub(t,e,n){return t&e^t&n^e&n}class $c extends Ao{constructor(e,n,r,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=n,this.padOffset=r,this.isLE=s,this.buffer=new Uint8Array(e),this.view=Ri(this.buffer)}update(e){kr(this),e=hs(e),Vt(e);const{view:n,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 l=Ri(e);for(;s<=i-o;o+=s)this.process(l,o);continue}r.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===s&&(this.process(n,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){kr(this),Hc(e,this),this.finished=!0;const{buffer:n,view:r,blockLen:s,isLE:i}=this;let{pos:o}=this;n[o++]=128,$n(this.buffer.subarray(o)),this.padOffset>s-o&&(this.process(r,0),o=0);for(let p=o;p<s;p++)n[p]=0;lb(r,s-8,BigInt(this.length*8),i),this.process(r,0);const a=Ri(e),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const f=l/4,m=this.get();if(f>m.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p<f;p++)a.setUint32(4*p,m[p],i)}digest(){const{buffer:e,outputLen:n}=this;this.digestInto(e);const r=e.slice(0,n);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:n,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%n&&e.buffer.set(r),e}clone(){return this._cloneInto()}}const Gn=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),It=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),gi=BigInt(2**32-1),vd=BigInt(32);function xf(t,e=!1){return e?{h:Number(t&gi),l:Number(t>>vd&gi)}:{h:Number(t>>vd&gi)|0,l:Number(t&gi)|0}}function Cf(t,e=!1){const n=t.length;let r=new Uint32Array(n),s=new Uint32Array(n);for(let i=0;i<n;i++){const{h:o,l:a}=xf(t[i],e);[r[i],s[i]]=[o,a]}return[r,s]}const kd=(t,e,n)=>t>>>n,Fd=(t,e,n)=>t<<32-n|e>>>n,cr=(t,e,n)=>t>>>n|e<<32-n,lr=(t,e,n)=>t<<32-n|e>>>n,Fs=(t,e,n)=>t<<64-n|e>>>n-32,Ts=(t,e,n)=>t>>>n-32|e<<64-n,fb=(t,e)=>e,hb=(t,e)=>t,mb=(t,e,n)=>t<<n|e>>>32-n,bb=(t,e,n)=>e<<n|t>>>32-n,pb=(t,e,n)=>e<<n-32|t>>>64-n,yb=(t,e,n)=>t<<n-32|e>>>64-n;function wn(t,e,n,r){const s=(e>>>0)+(r>>>0);return{h:t+n+(s/2**32|0)|0,l:s|0}}const Sf=(t,e,n)=>(t>>>0)+(e>>>0)+(n>>>0),Df=(t,e,n,r)=>e+n+r+(t/2**32|0)|0,gb=(t,e,n,r)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0),wb=(t,e,n,r,s)=>e+n+r+s+(t/2**32|0)|0,Eb=(t,e,n,r,s)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0)+(s>>>0),Ab=(t,e,n,r,s,i)=>e+n+r+s+i+(t/2**32|0)|0,Bb=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 xb extends $c{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:n,C:r,D:s,E:i,F:o,G:a,H:l}=this;return[e,n,r,s,i,o,a,l]}set(e,n,r,s,i,o,a,l){this.A=e|0,this.B=n|0,this.C=r|0,this.D=s|0,this.E=i|0,this.F=o|0,this.G=a|0,this.H=l|0}process(e,n){for(let p=0;p<16;p++,n+=4)Yn[p]=e.getUint32(n,!1);for(let p=16;p<64;p++){const C=Yn[p-15],w=Yn[p-2],F=gn(C,7)^gn(C,18)^C>>>3,I=gn(w,17)^gn(w,19)^w>>>10;Yn[p]=I+Yn[p-7]+F+Yn[p-16]|0}let{A:r,B:s,C:i,D:o,E:a,F:l,G:f,H:m}=this;for(let p=0;p<64;p++){const C=gn(a,6)^gn(a,11)^gn(a,25),w=m+C+db(a,l,f)+Bb[p]+Yn[p]|0,I=(gn(r,2)^gn(r,13)^gn(r,22))+ub(r,s,i)|0;m=f,f=l,l=a,a=o+w|0,o=i,i=s,s=r,r=w+I|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,l=l+this.F|0,f=f+this.G|0,m=m+this.H|0,this.set(r,s,i,o,a,l,f,m)}roundClean(){$n(Yn)}destroy(){this.set(0,0,0,0,0,0,0,0),$n(this.buffer)}}const vf=Cf(["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(t=>BigInt(t))),Cb=vf[0],Sb=vf[1],Xn=new Uint32Array(80),Zn=new Uint32Array(80);class kf extends $c{constructor(e=64){super(128,e,16,!1),this.Ah=It[0]|0,this.Al=It[1]|0,this.Bh=It[2]|0,this.Bl=It[3]|0,this.Ch=It[4]|0,this.Cl=It[5]|0,this.Dh=It[6]|0,this.Dl=It[7]|0,this.Eh=It[8]|0,this.El=It[9]|0,this.Fh=It[10]|0,this.Fl=It[11]|0,this.Gh=It[12]|0,this.Gl=It[13]|0,this.Hh=It[14]|0,this.Hl=It[15]|0}get(){const{Ah:e,Al:n,Bh:r,Bl:s,Ch:i,Cl:o,Dh:a,Dl:l,Eh:f,El:m,Fh:p,Fl:C,Gh:w,Gl:F,Hh:I,Hl:x}=this;return[e,n,r,s,i,o,a,l,f,m,p,C,w,F,I,x]}set(e,n,r,s,i,o,a,l,f,m,p,C,w,F,I,x){this.Ah=e|0,this.Al=n|0,this.Bh=r|0,this.Bl=s|0,this.Ch=i|0,this.Cl=o|0,this.Dh=a|0,this.Dl=l|0,this.Eh=f|0,this.El=m|0,this.Fh=p|0,this.Fl=C|0,this.Gh=w|0,this.Gl=F|0,this.Hh=I|0,this.Hl=x|0}process(e,n){for(let k=0;k<16;k++,n+=4)Xn[k]=e.getUint32(n),Zn[k]=e.getUint32(n+=4);for(let k=16;k<80;k++){const P=Xn[k-15]|0,M=Zn[k-15]|0,$=cr(P,M,1)^cr(P,M,8)^kd(P,M,7),G=lr(P,M,1)^lr(P,M,8)^Fd(P,M,7),Y=Xn[k-2]|0,L=Zn[k-2]|0,j=cr(Y,L,19)^Fs(Y,L,61)^kd(Y,L,6),O=lr(Y,L,19)^Ts(Y,L,61)^Fd(Y,L,6),q=gb(G,O,Zn[k-7],Zn[k-16]),B=wb(q,$,j,Xn[k-7],Xn[k-16]);Xn[k]=B|0,Zn[k]=q|0}let{Ah:r,Al:s,Bh:i,Bl:o,Ch:a,Cl:l,Dh:f,Dl:m,Eh:p,El:C,Fh:w,Fl:F,Gh:I,Gl:x,Hh:E,Hl:_}=this;for(let k=0;k<80;k++){const P=cr(p,C,14)^cr(p,C,18)^Fs(p,C,41),M=lr(p,C,14)^lr(p,C,18)^Ts(p,C,41),$=p&w^~p&I,G=C&F^~C&x,Y=Eb(_,M,G,Sb[k],Zn[k]),L=Ab(Y,E,P,$,Cb[k],Xn[k]),j=Y|0,O=cr(r,s,28)^Fs(r,s,34)^Fs(r,s,39),q=lr(r,s,28)^Ts(r,s,34)^Ts(r,s,39),B=r&i^r&a^i&a,c=s&o^s&l^o&l;E=I|0,_=x|0,I=w|0,x=F|0,w=p|0,F=C|0,{h:p,l:C}=wn(f|0,m|0,L|0,j|0),f=a|0,m=l|0,a=i|0,l=o|0,i=r|0,o=s|0;const b=Sf(j,q,c);r=Df(b,L,O,B),s=b|0}({h:r,l:s}=wn(this.Ah|0,this.Al|0,r|0,s|0)),{h:i,l:o}=wn(this.Bh|0,this.Bl|0,i|0,o|0),{h:a,l}=wn(this.Ch|0,this.Cl|0,a|0,l|0),{h:f,l:m}=wn(this.Dh|0,this.Dl|0,f|0,m|0),{h:p,l:C}=wn(this.Eh|0,this.El|0,p|0,C|0),{h:w,l:F}=wn(this.Fh|0,this.Fl|0,w|0,F|0),{h:I,l:x}=wn(this.Gh|0,this.Gl|0,I|0,x|0),{h:E,l:_}=wn(this.Hh|0,this.Hl|0,E|0,_|0),this.set(r,s,i,o,a,l,f,m,p,C,w,F,I,x,E,_)}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 Ut=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class Db extends kf{constructor(){super(32),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}}const jc=ni(()=>new xb),Vc=ni(()=>new kf),vb=ni(()=>new Db),Gi=jc,kb=BigInt(0),Cs=BigInt(1),Fb=BigInt(2),Tb=BigInt(7),Ib=BigInt(256),Ub=BigInt(113),Ff=[],Tf=[],If=[];for(let t=0,e=Cs,n=1,r=0;t<24;t++){[n,r]=[r,(2*n+3*r)%5],Ff.push(2*(5*r+n)),Tf.push((t+1)*(t+2)/2%64);let s=kb;for(let i=0;i<7;i++)e=(e<<Cs^(e>>Tb)*Ub)%Ib,e&Fb&&(s^=Cs<<(Cs<<BigInt(i))-Cs);If.push(s)}const Uf=Cf(If,!0),_b=Uf[0],Mb=Uf[1],Td=(t,e,n)=>n>32?pb(t,e,n):mb(t,e,n),Id=(t,e,n)=>n>32?yb(t,e,n):bb(t,e,n);function Rb(t,e=24){const n=new Uint32Array(10);for(let r=24-e;r<24;r++){for(let o=0;o<10;o++)n[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,l=(o+2)%10,f=n[l],m=n[l+1],p=Td(f,m,1)^n[a],C=Id(f,m,1)^n[a+1];for(let w=0;w<50;w+=10)t[o+w]^=p,t[o+w+1]^=C}let s=t[2],i=t[3];for(let o=0;o<24;o++){const a=Tf[o],l=Td(s,i,a),f=Id(s,i,a),m=Ff[o];s=t[m],i=t[m+1],t[m]=l,t[m+1]=f}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)n[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~n[(a+2)%10]&n[(a+4)%10]}t[0]^=_b[r],t[1]^=Mb[r]}$n(n)}let Wb=class _f extends Ao{constructor(e,n,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=n,this.outputLen=r,this.enableXOF=s,this.rounds=i,ts(r),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=wf(this.state)}clone(){return this._cloneInto()}keccak(){sc(this.state32),Rb(this.state32,this.rounds),sc(this.state32),this.posOut=0,this.pos=0}update(e){kr(this),e=hs(e),Vt(e);const{blockLen:n,state:r}=this,s=e.length;for(let i=0;i<s;){const o=Math.min(n-this.pos,s-i);for(let a=0;a<o;a++)r[this.pos++]^=e[i++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:n,pos:r,blockLen:s}=this;e[r]^=n,n&128&&r===s-1&&this.keccak(),e[s-1]^=128,this.keccak()}writeInto(e){kr(this,!1),Vt(e),this.finish();const n=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(n.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 ts(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Hc(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:n,suffix:r,outputLen:s,rounds:i,enableXOF:o}=this;return e||(e=new _f(n,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 Mf=(t,e,n)=>ni(()=>new Wb(e,t,n)),Pb=Mf(6,136,256/8),Ns=Mf(1,136,256/8),Lb=Vc,Ob=vb;class Rf extends Ao{constructor(e,n){super(),this.finished=!1,this.destroyed=!1,gf(e);const r=hs(n);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 kr(this),this.iHash.update(e),this}digestInto(e){kr(this),Vt(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:n,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=n._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 Gc=(t,e,n)=>new Rf(t,e).update(n).digest();Gc.create=(t,e)=>new Rf(t,e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Yc=BigInt(0),Yi=BigInt(1);function Tr(t,e){if(typeof e!="boolean")throw new Error(t+" boolean expected, got "+e)}function wi(t){const e=t.toString(16);return e.length&1?"0"+e:e}function Wf(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?Yc:BigInt("0x"+t)}function ri(t){return Wf(Fr(t))}function zs(t){return Vt(t),Wf(Fr(Uint8Array.from(t).reverse()))}function Xc(t,e){return Eo(t.toString(16).padStart(e*2,"0"))}function Bo(t,e){return Xc(t,e).reverse()}function Ze(t,e,n){let r;if(typeof e=="string")try{r=Eo(e)}catch(i){throw new Error(t+" must be hex string or Uint8Array, cause: "+i)}else if(wo(e))r=Uint8Array.from(e);else throw new Error(t+" must be hex string or Uint8Array");const s=r.length;if(typeof n=="number"&&s!==n)throw new Error(t+" of length "+n+" expected, got "+s);return r}const wa=t=>typeof t=="bigint"&&Yc<=t;function Pf(t,e,n){return wa(t)&&wa(e)&&wa(n)&&e<=t&&t<n}function $r(t,e,n,r){if(!Pf(e,n,r))throw new Error("expected valid "+t+": "+n+" <= n < "+r+", got "+e)}function Lf(t){let e;for(e=0;t>Yc;t>>=Yi,e+=1);return e}function Nb(t,e){return t>>BigInt(e)&Yi}const si=t=>(Yi<<BigInt(t))-Yi;function zb(t,e,n){if(typeof t!="number"||t<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 n!="function")throw new Error("hmacFn must be a function");const r=w=>new Uint8Array(w),s=w=>Uint8Array.of(w);let i=r(t),o=r(t),a=0;const l=()=>{i.fill(1),o.fill(0),a=0},f=(...w)=>n(o,i,...w),m=(w=r(0))=>{o=f(s(0),w),i=f(),w.length!==0&&(o=f(s(1),w),i=f())},p=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let w=0;const F=[];for(;w<e;){i=f();const I=i.slice();F.push(I),w+=i.length}return kn(...F)};return(w,F)=>{l(),m(w);let I;for(;!(I=F(p()));)m();return l(),I}}function Hb(t){return typeof t=="function"&&Number.isSafeInteger(t.outputLen)}function ms(t,e,n={}){if(!t||typeof t!="object")throw new Error("expected valid options object");function r(s,i,o){const a=t[s];if(o&&a===void 0)return;const l=typeof a;if(l!==i||a===null)throw new Error(`param "${s}" is invalid: expected ${i}, got ${l}`)}Object.entries(e).forEach(([s,i])=>r(s,i,!1)),Object.entries(n).forEach(([s,i])=>r(s,i,!0))}const qb=()=>{throw new Error("not implemented")};function Hs(t){const e=new WeakMap;return(n,...r)=>{const s=e.get(n);if(s!==void 0)return s;const i=t(n,...r);return e.set(n,i),i}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const jt=BigInt(0),Tt=BigInt(1),gr=BigInt(2),Kb=BigInt(3),Of=BigInt(4),Nf=BigInt(5),zf=BigInt(8);function Je(t,e){const n=t%e;return n>=jt?n:e+n}function Xe(t,e,n){let r=t;for(;e-- >jt;)r*=r,r%=n;return r}function Ud(t,e){if(t===jt)throw new Error("invert: expected non-zero number");if(e<=jt)throw new Error("invert: expected positive modulus, got "+e);let n=Je(t,e),r=e,s=jt,i=Tt;for(;n!==jt;){const a=r/n,l=r%n,f=s-i*a;r=n,n=l,s=i,i=f}if(r!==Tt)throw new Error("invert: does not exist");return Je(s,e)}function Hf(t,e){const n=(t.ORDER+Tt)/Of,r=t.pow(e,n);if(!t.eql(t.sqr(r),e))throw new Error("Cannot find square root");return r}function $b(t,e){const n=(t.ORDER-Nf)/zf,r=t.mul(e,gr),s=t.pow(r,n),i=t.mul(e,s),o=t.mul(t.mul(i,gr),s),a=t.mul(i,t.sub(o,t.ONE));if(!t.eql(t.sqr(a),e))throw new Error("Cannot find square root");return a}function jb(t){if(t<BigInt(3))throw new Error("sqrt is not defined for small field");let e=t-Tt,n=0;for(;e%gr===jt;)e/=gr,n++;let r=gr;const s=_r(t);for(;ic(s,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return Hf;let i=s.pow(r,e);const o=(e+Tt)/gr;return function(l,f){if(l.is0(f))return f;if(ic(l,f)!==1)throw new Error("Cannot find square root");let m=n,p=l.mul(l.ONE,i),C=l.pow(f,e),w=l.pow(f,o);for(;!l.eql(C,l.ONE);){if(l.is0(C))return l.ZERO;let F=1,I=l.sqr(C);for(;!l.eql(I,l.ONE);)if(F++,I=l.sqr(I),F===m)throw new Error("Cannot find square root");const x=Tt<<BigInt(m-F-1),E=l.pow(p,x);m=F,p=l.sqr(E),C=l.mul(C,p),w=l.mul(w,E)}return w}}function Vb(t){return t%Of===Kb?Hf:t%zf===Nf?$b:jb(t)}const Gb=(t,e)=>(Je(t,e)&Tt)===Tt,Yb=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Xb(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"},n=Yb.reduce((r,s)=>(r[s]="function",r),e);return ms(t,n),t}function qf(t,e,n){if(n<jt)throw new Error("invalid exponent, negatives unsupported");if(n===jt)return t.ONE;if(n===Tt)return e;let r=t.ONE,s=e;for(;n>jt;)n&Tt&&(r=t.mul(r,s)),s=t.sqr(s),n>>=Tt;return r}function Zc(t,e,n=!1){const r=new Array(e.length).fill(n?t.ZERO:void 0),s=e.reduce((o,a,l)=>t.is0(a)?o:(r[l]=o,t.mul(o,a)),t.ONE),i=t.inv(s);return e.reduceRight((o,a,l)=>t.is0(a)?o:(r[l]=t.mul(o,r[l]),t.mul(o,a)),i),r}function ic(t,e){const n=(t.ORDER-Tt)/gr,r=t.pow(e,n),s=t.eql(r,t.ONE),i=t.eql(r,t.ZERO),o=t.eql(r,t.neg(t.ONE));if(!s&&!i&&!o)throw new Error("invalid Legendre symbol result");return s?1:i?0:-1}function Zb(t,e){e!==void 0&&ts(e);const n=e!==void 0?e:t.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function _r(t,e,n=!1,r={}){if(t<=jt)throw new Error("invalid field: expected ORDER > 0, got "+t);let s,i;if(typeof e=="object"&&e!=null){if(r.sqrt||n)throw new Error("cannot specify opts in two arguments");const m=e;m.BITS&&(s=m.BITS),m.sqrt&&(i=m.sqrt),typeof m.isLE=="boolean"&&(n=m.isLE)}else typeof e=="number"&&(s=e),r.sqrt&&(i=r.sqrt);const{nBitLength:o,nByteLength:a}=Zb(t,s);if(a>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let l;const f=Object.freeze({ORDER:t,isLE:n,BITS:o,BYTES:a,MASK:si(o),ZERO:jt,ONE:Tt,create:m=>Je(m,t),isValid:m=>{if(typeof m!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof m);return jt<=m&&m<t},is0:m=>m===jt,isValidNot0:m=>!f.is0(m)&&f.isValid(m),isOdd:m=>(m&Tt)===Tt,neg:m=>Je(-m,t),eql:(m,p)=>m===p,sqr:m=>Je(m*m,t),add:(m,p)=>Je(m+p,t),sub:(m,p)=>Je(m-p,t),mul:(m,p)=>Je(m*p,t),pow:(m,p)=>qf(f,m,p),div:(m,p)=>Je(m*Ud(p,t),t),sqrN:m=>m*m,addN:(m,p)=>m+p,subN:(m,p)=>m-p,mulN:(m,p)=>m*p,inv:m=>Ud(m,t),sqrt:i||(m=>(l||(l=Vb(t)),l(f,m))),toBytes:m=>n?Bo(m,a):Xc(m,a),fromBytes:m=>{if(m.length!==a)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+m.length);return n?zs(m):ri(m)},invertBatch:m=>Zc(f,m),cmov:(m,p,C)=>C?p:m});return Object.freeze(f)}function Kf(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function Jc(t){const e=Kf(t);return e+Math.ceil(e/2)}function $f(t,e,n=!1){const r=t.length,s=Kf(e),i=Jc(e);if(r<16||r<i||r>1024)throw new Error("expected "+i+"-1024 bytes of input, got "+r);const o=n?zs(t):ri(t),a=Je(o,e-Tt)+Tt;return n?Bo(a,s):Xc(a,s)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ns=BigInt(0),wr=BigInt(1);function Ms(t,e){const n=e.negate();return t?n:e}function Qc(t,e,n){const r=e==="pz"?o=>o.pz:o=>o.ez,s=Zc(t.Fp,n.map(r));return n.map((o,a)=>o.toAffine(s[a])).map(t.fromAffine)}function jf(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function Ea(t,e){jf(t,e);const n=Math.ceil(e/t)+1,r=2**(t-1),s=2**t,i=si(t),o=BigInt(t);return{windows:n,windowSize:r,mask:i,maxNumber:s,shiftBy:o}}function _d(t,e,n){const{windowSize:r,mask:s,maxNumber:i,shiftBy:o}=n;let a=Number(t&s),l=t>>o;a>r&&(a-=i,l+=wr);const f=e*r,m=f+Math.abs(a)-1,p=a===0,C=a<0,w=e%2!==0;return{nextN:l,offset:m,isZero:p,isNeg:C,isNegF:w,offsetF:f}}function Jb(t,e){if(!Array.isArray(t))throw new Error("array expected");t.forEach((n,r)=>{if(!(n instanceof e))throw new Error("invalid point at index "+r)})}function Qb(t,e){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((n,r)=>{if(!e.isValid(n))throw new Error("invalid scalar at index "+r)})}const Aa=new WeakMap,Vf=new WeakMap;function Ba(t){return Vf.get(t)||1}function Md(t){if(t!==ns)throw new Error("invalid wNAF")}function Gf(t,e){return{constTimeNegate:Ms,hasPrecomputes(n){return Ba(n)!==1},unsafeLadder(n,r,s=t.ZERO){let i=n;for(;r>ns;)r&wr&&(s=s.add(i)),i=i.double(),r>>=wr;return s},precomputeWindow(n,r){const{windows:s,windowSize:i}=Ea(r,e),o=[];let a=n,l=a;for(let f=0;f<s;f++){l=a,o.push(l);for(let m=1;m<i;m++)l=l.add(a),o.push(l);a=l.double()}return o},wNAF(n,r,s){let i=t.ZERO,o=t.BASE;const a=Ea(n,e);for(let l=0;l<a.windows;l++){const{nextN:f,offset:m,isZero:p,isNeg:C,isNegF:w,offsetF:F}=_d(s,l,a);s=f,p?o=o.add(Ms(w,r[F])):i=i.add(Ms(C,r[m]))}return Md(s),{p:i,f:o}},wNAFUnsafe(n,r,s,i=t.ZERO){const o=Ea(n,e);for(let a=0;a<o.windows&&s!==ns;a++){const{nextN:l,offset:f,isZero:m,isNeg:p}=_d(s,a,o);if(s=l,!m){const C=r[f];i=i.add(p?C.negate():C)}}return Md(s),i},getPrecomputes(n,r,s){let i=Aa.get(r);return i||(i=this.precomputeWindow(r,n),n!==1&&(typeof s=="function"&&(i=s(i)),Aa.set(r,i))),i},wNAFCached(n,r,s){const i=Ba(n);return this.wNAF(i,this.getPrecomputes(i,n,s),r)},wNAFCachedUnsafe(n,r,s,i){const o=Ba(n);return o===1?this.unsafeLadder(n,r,i):this.wNAFUnsafe(o,this.getPrecomputes(o,n,s),r,i)},setWindowSize(n,r){jf(r,e),Vf.set(n,r),Aa.delete(n)}}}function ep(t,e,n,r){let s=e,i=t.ZERO,o=t.ZERO;for(;n>ns||r>ns;)n&wr&&(i=i.add(s)),r&wr&&(o=o.add(s)),s=s.double(),n>>=wr,r>>=wr;return{p1:i,p2:o}}function Yf(t,e,n,r){Jb(n,t),Qb(r,e);const s=n.length,i=r.length;if(s!==i)throw new Error("arrays of points and scalars must have equal length");const o=t.ZERO,a=Lf(BigInt(s));let l=1;a>12?l=a-3:a>4?l=a-2:a>0&&(l=2);const f=si(l),m=new Array(Number(f)+1).fill(o),p=Math.floor((e.BITS-1)/l)*l;let C=o;for(let w=p;w>=0;w-=l){m.fill(o);for(let I=0;I<i;I++){const x=r[I],E=Number(x>>BigInt(w)&f);m[E]=m[E].add(n[I])}let F=o;for(let I=m.length-1,x=o;I>0;I--)x=x.add(m[I]),F=F.add(x);if(C=C.add(F),w!==0)for(let I=0;I<l;I++)C=C.double()}return C}function Rd(t,e){if(e){if(e.ORDER!==t)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return Xb(e),e}else return _r(t)}function Xf(t,e,n={}){if(!e||typeof e!="object")throw new Error(`expected valid ${t} CURVE object`);for(const a of["p","n","h"]){const l=e[a];if(!(typeof l=="bigint"&&l>ns))throw new Error(`CURVE.${a} must be positive bigint`)}const r=Rd(e.p,n.Fp),s=Rd(e.n,n.Fn),o=["Gx","Gy","a",t==="weierstrass"?"b":"d"];for(const a of o)if(!r.isValid(e[a]))throw new Error(`CURVE.${a} must be valid field element of CURVE.Fp`);return{Fp:r,Fn:s}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Wd(t){t.lowS!==void 0&&Tr("lowS",t.lowS),t.prehash!==void 0&&Tr("prehash",t.prehash)}class tp extends Error{constructor(e=""){super(e)}}const Nn={Err:tp,_tlv:{encode:(t,e)=>{const{Err:n}=Nn;if(t<0||t>256)throw new n("tlv.encode: wrong tag");if(e.length&1)throw new n("tlv.encode: unpadded data");const r=e.length/2,s=wi(r);if(s.length/2&128)throw new n("tlv.encode: long form length too big");const i=r>127?wi(s.length/2|128):"";return wi(t)+i+s+e},decode(t,e){const{Err:n}=Nn;let r=0;if(t<0||t>256)throw new n("tlv.encode: wrong tag");if(e.length<2||e[r++]!==t)throw new n("tlv.decode: wrong tlv");const s=e[r++],i=!!(s&128);let o=0;if(!i)o=s;else{const l=s&127;if(!l)throw new n("tlv.decode(long): indefinite length not supported");if(l>4)throw new n("tlv.decode(long): byte length is too big");const f=e.subarray(r,r+l);if(f.length!==l)throw new n("tlv.decode: length bytes not complete");if(f[0]===0)throw new n("tlv.decode(long): zero leftmost byte");for(const m of f)o=o<<8|m;if(r+=l,o<128)throw new n("tlv.decode(long): not minimal encoding")}const a=e.subarray(r,r+o);if(a.length!==o)throw new n("tlv.decode: wrong value length");return{v:a,l:e.subarray(r+o)}}},_int:{encode(t){const{Err:e}=Nn;if(t<Rs)throw new e("integer: negative integers are not allowed");let n=wi(t);if(Number.parseInt(n[0],16)&8&&(n="00"+n),n.length&1)throw new e("unexpected DER parsing assertion: unpadded hex");return n},decode(t){const{Err:e}=Nn;if(t[0]&128)throw new e("invalid signature integer: negative");if(t[0]===0&&!(t[1]&128))throw new e("invalid signature integer: unnecessary leading zero");return ri(t)}},toSig(t){const{Err:e,_int:n,_tlv:r}=Nn,s=Ze("signature",t),{v:i,l:o}=r.decode(48,s);if(o.length)throw new e("invalid signature: left bytes after parsing");const{v:a,l}=r.decode(2,i),{v:f,l:m}=r.decode(2,l);if(m.length)throw new e("invalid signature: left bytes after parsing");return{r:n.decode(a),s:n.decode(f)}},hexFromSig(t){const{_tlv:e,_int:n}=Nn,r=e.encode(2,n.encode(t.r)),s=e.encode(2,n.encode(t.s)),i=r+s;return e.encode(48,i)}},Rs=BigInt(0),Xr=BigInt(1),np=BigInt(2),Ei=BigInt(3),rp=BigInt(4);function Zf(t,e,n){function r(s){const i=t.sqr(s),o=t.mul(i,s);return t.add(t.add(o,t.mul(s,e)),n)}return r}function el(t,e,n){const{BYTES:r}=t;function s(i){let o;if(typeof i=="bigint")o=i;else{let a=Ze("private key",i);if(e){if(!e.includes(a.length*2))throw new Error("invalid private key");const l=new Uint8Array(r);l.set(a,l.length-a.length),a=l}try{o=t.fromBytes(a)}catch{throw new Error(`invalid private key: expected ui8a of size ${r}, got ${typeof i}`)}}if(n&&(o=t.create(o)),!t.isValidNot0(o))throw new Error("invalid private key: out of range [1..N-1]");return o}return s}function Jf(t,e={}){const{Fp:n,Fn:r}=Xf("weierstrass",t,e),{h:s,n:i}=t;ms(e,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:o}=e;if(o&&(!n.is0(t.a)||typeof o.beta!="bigint"||typeof o.splitScalar!="function"))throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function');function a(){if(!n.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function l(Y,L,j){const{x:O,y:q}=L.toAffine(),B=n.toBytes(O);if(Tr("isCompressed",j),j){a();const c=!n.isOdd(q);return kn(Qf(c),B)}else return kn(Uint8Array.of(4),B,n.toBytes(q))}function f(Y){Vt(Y);const L=n.BYTES,j=L+1,O=2*L+1,q=Y.length,B=Y[0],c=Y.subarray(1);if(q===j&&(B===2||B===3)){const b=n.fromBytes(c);if(!n.isValid(b))throw new Error("bad point: is not on curve, wrong x");const y=C(b);let S;try{S=n.sqrt(y)}catch(W){const A=W instanceof Error?": "+W.message:"";throw new Error("bad point: is not on curve, sqrt error"+A)}a();const v=n.isOdd(S);return(B&1)===1!==v&&(S=n.neg(S)),{x:b,y:S}}else if(q===O&&B===4){const b=n.fromBytes(c.subarray(L*0,L*1)),y=n.fromBytes(c.subarray(L*1,L*2));if(!w(b,y))throw new Error("bad point: is not on curve");return{x:b,y}}else throw new Error(`bad point: got length ${q}, expected compressed=${j} or uncompressed=${O}`)}const m=e.toBytes||l,p=e.fromBytes||f,C=Zf(n,t.a,t.b);function w(Y,L){const j=n.sqr(L),O=C(Y);return n.eql(j,O)}if(!w(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const F=n.mul(n.pow(t.a,Ei),rp),I=n.mul(n.sqr(t.b),BigInt(27));if(n.is0(n.add(F,I)))throw new Error("bad curve params: a or b");function x(Y,L,j=!1){if(!n.isValid(L)||j&&n.is0(L))throw new Error(`bad point coordinate ${Y}`);return L}function E(Y){if(!(Y instanceof M))throw new Error("ProjectivePoint expected")}const _=Hs((Y,L)=>{const{px:j,py:O,pz:q}=Y;if(n.eql(q,n.ONE))return{x:j,y:O};const B=Y.is0();L==null&&(L=B?n.ONE:n.inv(q));const c=n.mul(j,L),b=n.mul(O,L),y=n.mul(q,L);if(B)return{x:n.ZERO,y:n.ZERO};if(!n.eql(y,n.ONE))throw new Error("invZ was invalid");return{x:c,y:b}}),k=Hs(Y=>{if(Y.is0()){if(e.allowInfinityPoint&&!n.is0(Y.py))return;throw new Error("bad point: ZERO")}const{x:L,y:j}=Y.toAffine();if(!n.isValid(L)||!n.isValid(j))throw new Error("bad point: x or y not field elements");if(!w(L,j))throw new Error("bad point: equation left != right");if(!Y.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function P(Y,L,j,O,q){return j=new M(n.mul(j.px,Y),j.py,j.pz),L=Ms(O,L),j=Ms(q,j),L.add(j)}class M{constructor(L,j,O){this.px=x("x",L),this.py=x("y",j,!0),this.pz=x("z",O),Object.freeze(this)}static fromAffine(L){const{x:j,y:O}=L||{};if(!L||!n.isValid(j)||!n.isValid(O))throw new Error("invalid affine point");if(L instanceof M)throw new Error("projective point not allowed");return n.is0(j)&&n.is0(O)?M.ZERO:new M(j,O,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(L){return Qc(M,"pz",L)}static fromBytes(L){return Vt(L),M.fromHex(L)}static fromHex(L){const j=M.fromAffine(p(Ze("pointHex",L)));return j.assertValidity(),j}static fromPrivateKey(L){const j=el(r,e.allowedPrivateKeyLengths,e.wrapPrivateKey);return M.BASE.multiply(j(L))}static msm(L,j){return Yf(M,r,L,j)}precompute(L=8,j=!0){return G.setWindowSize(this,L),j||this.multiply(Ei),this}_setWindowSize(L){this.precompute(L)}assertValidity(){k(this)}hasEvenY(){const{y:L}=this.toAffine();if(!n.isOdd)throw new Error("Field doesn't support isOdd");return!n.isOdd(L)}equals(L){E(L);const{px:j,py:O,pz:q}=this,{px:B,py:c,pz:b}=L,y=n.eql(n.mul(j,b),n.mul(B,q)),S=n.eql(n.mul(O,b),n.mul(c,q));return y&&S}negate(){return new M(this.px,n.neg(this.py),this.pz)}double(){const{a:L,b:j}=t,O=n.mul(j,Ei),{px:q,py:B,pz:c}=this;let b=n.ZERO,y=n.ZERO,S=n.ZERO,v=n.mul(q,q),U=n.mul(B,B),W=n.mul(c,c),A=n.mul(q,B);return A=n.add(A,A),S=n.mul(q,c),S=n.add(S,S),b=n.mul(L,S),y=n.mul(O,W),y=n.add(b,y),b=n.sub(U,y),y=n.add(U,y),y=n.mul(b,y),b=n.mul(A,b),S=n.mul(O,S),W=n.mul(L,W),A=n.sub(v,W),A=n.mul(L,A),A=n.add(A,S),S=n.add(v,v),v=n.add(S,v),v=n.add(v,W),v=n.mul(v,A),y=n.add(y,v),W=n.mul(B,c),W=n.add(W,W),v=n.mul(W,A),b=n.sub(b,v),S=n.mul(W,U),S=n.add(S,S),S=n.add(S,S),new M(b,y,S)}add(L){E(L);const{px:j,py:O,pz:q}=this,{px:B,py:c,pz:b}=L;let y=n.ZERO,S=n.ZERO,v=n.ZERO;const U=t.a,W=n.mul(t.b,Ei);let A=n.mul(j,B),h=n.mul(O,c),T=n.mul(q,b),se=n.add(j,O),Z=n.add(B,c);se=n.mul(se,Z),Z=n.add(A,h),se=n.sub(se,Z),Z=n.add(j,q);let ee=n.add(B,b);return Z=n.mul(Z,ee),ee=n.add(A,T),Z=n.sub(Z,ee),ee=n.add(O,q),y=n.add(c,b),ee=n.mul(ee,y),y=n.add(h,T),ee=n.sub(ee,y),v=n.mul(U,Z),y=n.mul(W,T),v=n.add(y,v),y=n.sub(h,v),v=n.add(h,v),S=n.mul(y,v),h=n.add(A,A),h=n.add(h,A),T=n.mul(U,T),Z=n.mul(W,Z),h=n.add(h,T),T=n.sub(A,T),T=n.mul(U,T),Z=n.add(Z,T),A=n.mul(h,Z),S=n.add(S,A),A=n.mul(ee,Z),y=n.mul(se,y),y=n.sub(y,A),A=n.mul(se,h),v=n.mul(ee,v),v=n.add(v,A),new M(y,S,v)}subtract(L){return this.add(L.negate())}is0(){return this.equals(M.ZERO)}multiply(L){const{endo:j}=e;if(!r.isValidNot0(L))throw new Error("invalid scalar: out of range");let O,q;const B=c=>G.wNAFCached(this,c,M.normalizeZ);if(j){const{k1neg:c,k1:b,k2neg:y,k2:S}=j.splitScalar(L),{p:v,f:U}=B(b),{p:W,f:A}=B(S);q=U.add(A),O=P(j.beta,v,W,c,y)}else{const{p:c,f:b}=B(L);O=c,q=b}return M.normalizeZ([O,q])[0]}multiplyUnsafe(L){const{endo:j}=e,O=this;if(!r.isValid(L))throw new Error("invalid scalar: out of range");if(L===Rs||O.is0())return M.ZERO;if(L===Xr)return O;if(G.hasPrecomputes(this))return this.multiply(L);if(j){const{k1neg:q,k1:B,k2neg:c,k2:b}=j.splitScalar(L),{p1:y,p2:S}=ep(M,O,B,b);return P(j.beta,y,S,q,c)}else return G.wNAFCachedUnsafe(O,L)}multiplyAndAddUnsafe(L,j,O){const q=this.multiplyUnsafe(j).add(L.multiplyUnsafe(O));return q.is0()?void 0:q}toAffine(L){return _(this,L)}isTorsionFree(){const{isTorsionFree:L}=e;return s===Xr?!0:L?L(M,this):G.wNAFCachedUnsafe(this,i).is0()}clearCofactor(){const{clearCofactor:L}=e;return s===Xr?this:L?L(M,this):this.multiplyUnsafe(s)}toBytes(L=!0){return Tr("isCompressed",L),this.assertValidity(),m(M,this,L)}toRawBytes(L=!0){return this.toBytes(L)}toHex(L=!0){return Fr(this.toBytes(L))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}M.BASE=new M(t.Gx,t.Gy,n.ONE),M.ZERO=new M(n.ZERO,n.ONE,n.ZERO),M.Fp=n,M.Fn=r;const $=r.BITS,G=Gf(M,e.endo?Math.ceil($/2):$);return M}function sp(t){const{CURVE:e,curveOpts:n}=e0(t),r=Jf(e,n);return ap(t,r)}function Qf(t){return Uint8Array.of(t?2:3)}function ip(t,e,n={}){ms(e,{hash:"function"},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const r=e.randomBytes||Kc,s=e.hmac||((O,...q)=>Gc(e.hash,O,kn(...q))),{Fp:i,Fn:o}=t,{ORDER:a,BITS:l}=o;function f(O){const q=a>>Xr;return O>q}function m(O){return f(O)?o.neg(O):O}function p(O,q){if(!o.isValidNot0(q))throw new Error(`invalid signature ${O}: out of range 1..CURVE.n`)}class C{constructor(q,B,c){p("r",q),p("s",B),this.r=q,this.s=B,c!=null&&(this.recovery=c),Object.freeze(this)}static fromCompact(q){const B=o.BYTES,c=Ze("compactSignature",q,B*2);return new C(o.fromBytes(c.subarray(0,B)),o.fromBytes(c.subarray(B,B*2)))}static fromDER(q){const{r:B,s:c}=Nn.toSig(Ze("DER",q));return new C(B,c)}assertValidity(){}addRecoveryBit(q){return new C(this.r,this.s,q)}recoverPublicKey(q){const B=i.ORDER,{r:c,s:b,recovery:y}=this;if(y==null||![0,1,2,3].includes(y))throw new Error("recovery id invalid");if(a*np<B&&y>1)throw new Error("recovery id is ambiguous for h>1 curve");const v=y===2||y===3?c+a:c;if(!i.isValid(v))throw new Error("recovery id 2 or 3 invalid");const U=i.toBytes(v),W=t.fromHex(kn(Qf((y&1)===0),U)),A=o.inv(v),h=k(Ze("msgHash",q)),T=o.create(-h*A),se=o.create(b*A),Z=t.BASE.multiplyUnsafe(T).add(W.multiplyUnsafe(se));if(Z.is0())throw new Error("point at infinify");return Z.assertValidity(),Z}hasHighS(){return f(this.s)}normalizeS(){return this.hasHighS()?new C(this.r,o.neg(this.s),this.recovery):this}toBytes(q){if(q==="compact")return kn(o.toBytes(this.r),o.toBytes(this.s));if(q==="der")return Eo(Nn.hexFromSig(this));throw new Error("invalid format")}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return Fr(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return Fr(this.toBytes("compact"))}}const w=el(o,n.allowedPrivateKeyLengths,n.wrapPrivateKey),F={isValidPrivateKey(O){try{return w(O),!0}catch{return!1}},normPrivateKeyToScalar:w,randomPrivateKey:()=>{const O=a;return $f(r(Jc(O)),O)},precompute(O=8,q=t.BASE){return q.precompute(O,!1)}};function I(O,q=!0){return t.fromPrivateKey(O).toBytes(q)}function x(O){if(typeof O=="bigint")return!1;if(O instanceof t)return!0;const B=Ze("key",O).length,c=i.BYTES,b=c+1,y=2*c+1;if(!(n.allowedPrivateKeyLengths||o.BYTES===b))return B===b||B===y}function E(O,q,B=!0){if(x(O)===!0)throw new Error("first arg must be private key");if(x(q)===!1)throw new Error("second arg must be public key");return t.fromHex(q).multiply(w(O)).toBytes(B)}const _=e.bits2int||function(O){if(O.length>8192)throw new Error("input is too large");const q=ri(O),B=O.length*8-l;return B>0?q>>BigInt(B):q},k=e.bits2int_modN||function(O){return o.create(_(O))},P=si(l);function M(O){return $r("num < 2^"+l,O,Rs,P),o.toBytes(O)}function $(O,q,B=G){if(["recovered","canonical"].some(se=>se in B))throw new Error("sign() legacy options not supported");const{hash:c}=e;let{lowS:b,prehash:y,extraEntropy:S}=B;b==null&&(b=!0),O=Ze("msgHash",O),Wd(B),y&&(O=Ze("prehashed msgHash",c(O)));const v=k(O),U=w(q),W=[M(U),M(v)];if(S!=null&&S!==!1){const se=S===!0?r(i.BYTES):S;W.push(Ze("extraEntropy",se))}const A=kn(...W),h=v;function T(se){const Z=_(se);if(!o.isValidNot0(Z))return;const ee=o.inv(Z),ve=t.BASE.multiply(Z).toAffine(),le=o.create(ve.x);if(le===Rs)return;const be=o.create(ee*o.create(h+le*U));if(be===Rs)return;let ln=(ve.x===le?0:2)|Number(ve.y&Xr),xe=be;return b&&f(be)&&(xe=m(be),ln^=1),new C(le,xe,ln)}return{seed:A,k2sig:T}}const G={lowS:e.lowS,prehash:!1},Y={lowS:e.lowS,prehash:!1};function L(O,q,B=G){const{seed:c,k2sig:b}=$(O,q,B);return zb(e.hash.outputLen,o.BYTES,s)(c,b)}t.BASE.precompute(8);function j(O,q,B,c=Y){const b=O;q=Ze("msgHash",q),B=Ze("publicKey",B),Wd(c);const{lowS:y,prehash:S,format:v}=c;if("strict"in c)throw new Error("options.strict was renamed to lowS");if(v!==void 0&&!["compact","der","js"].includes(v))throw new Error('format must be "compact", "der" or "js"');const U=typeof b=="string"||wo(b),W=!U&&!v&&typeof b=="object"&&b!==null&&typeof b.r=="bigint"&&typeof b.s=="bigint";if(!U&&!W)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let A,h;try{if(W)if(v===void 0||v==="js")A=new C(b.r,b.s);else throw new Error("invalid format");if(U){try{v!=="compact"&&(A=C.fromDER(b))}catch(xe){if(!(xe instanceof Nn.Err))throw xe}!A&&v!=="der"&&(A=C.fromCompact(b))}h=t.fromHex(B)}catch{return!1}if(!A||y&&A.hasHighS())return!1;S&&(q=e.hash(q));const{r:T,s:se}=A,Z=k(q),ee=o.inv(se),ve=o.create(Z*ee),le=o.create(T*ee),be=t.BASE.multiplyUnsafe(ve).add(h.multiplyUnsafe(le));return be.is0()?!1:o.create(be.x)===T}return Object.freeze({getPublicKey:I,getSharedSecret:E,sign:L,verify:j,utils:F,Point:t,Signature:C})}function e0(t){const e={a:t.a,b:t.b,p:t.Fp.ORDER,n:t.n,h:t.h,Gx:t.Gx,Gy:t.Gy},n=t.Fp,r=_r(e.n,t.nBitLength),s={Fp:n,Fn:r,allowedPrivateKeyLengths:t.allowedPrivateKeyLengths,allowInfinityPoint:t.allowInfinityPoint,endo:t.endo,wrapPrivateKey:t.wrapPrivateKey,isTorsionFree:t.isTorsionFree,clearCofactor:t.clearCofactor,fromBytes:t.fromBytes,toBytes:t.toBytes};return{CURVE:e,curveOpts:s}}function op(t){const{CURVE:e,curveOpts:n}=e0(t),r={hash:t.hash,hmac:t.hmac,randomBytes:t.randomBytes,lowS:t.lowS,bits2int:t.bits2int,bits2int_modN:t.bits2int_modN};return{CURVE:e,curveOpts:n,ecdsaOpts:r}}function ap(t,e){const{Fp:n,Fn:r}=e;function s(a){return Pf(a,Xr,r.ORDER)}const i=Zf(n,t.a,t.b),o=el(r,t.allowedPrivateKeyLengths,t.wrapPrivateKey);return Object.assign({},{CURVE:t,Point:e,ProjectivePoint:e,normPrivateKeyToScalar:o,weierstrassEquation:i,isWithinCurveOrder:s})}function cp(t,e){return Object.assign({},e,{ProjectivePoint:e.Point,CURVE:t})}function t0(t){const{CURVE:e,curveOpts:n,ecdsaOpts:r}=op(t),s=Jf(e,n),i=ip(s,r,n);return cp(t,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function lp(t,e){const n=r=>t0({...t,hash:r});return{...n(e),create:n}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Xi={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")};BigInt(0);const dp=BigInt(1),oc=BigInt(2),Pd=(t,e)=>(t+e/oc)/e;function up(t){const e=Xi.p,n=BigInt(3),r=BigInt(6),s=BigInt(11),i=BigInt(22),o=BigInt(23),a=BigInt(44),l=BigInt(88),f=t*t*t%e,m=f*f*t%e,p=Xe(m,n,e)*m%e,C=Xe(p,n,e)*m%e,w=Xe(C,oc,e)*f%e,F=Xe(w,s,e)*w%e,I=Xe(F,i,e)*F%e,x=Xe(I,a,e)*I%e,E=Xe(x,l,e)*x%e,_=Xe(E,a,e)*I%e,k=Xe(_,n,e)*m%e,P=Xe(k,o,e)*F%e,M=Xe(P,r,e)*f%e,$=Xe(M,oc,e);if(!ac.eql(ac.sqr($),t))throw new Error("Cannot find square root");return $}const ac=_r(Xi.p,void 0,void 0,{sqrt:up}),Qn=lp({...Xi,Fp:ac,lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=Xi.n,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-dp*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=n,o=BigInt("0x100000000000000000000000000000000"),a=Pd(i*t,e),l=Pd(-r*t,e);let f=Je(t-a*n-l*s,e),m=Je(-a*r-l*i,e);const p=f>o,C=m>o;if(p&&(f=e-f),C&&(m=e-m),f>o||m>o)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:p,k1:f,k2neg:C,k2:m}}}},jc);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const En=BigInt(0),Ot=BigInt(1),xa=BigInt(2),fp=BigInt(8),hp={zip215:!0};function mp(t,e,n,r){const s=t.sqr(n),i=t.sqr(r),o=t.add(t.mul(e.a,s),i),a=t.add(t.ONE,t.mul(e.d,t.mul(s,i)));return t.eql(o,a)}function bp(t,e={}){const{Fp:n,Fn:r}=Xf("edwards",t,e),{h:s,n:i}=t;ms(e,{},{uvRatio:"function"});const o=xa<<BigInt(r.BYTES*8)-Ot,a=I=>n.create(I),l=e.uvRatio||((I,x)=>{try{return{isValid:!0,value:n.sqrt(n.div(I,x))}}catch{return{isValid:!1,value:En}}});if(!mp(n,t,t.Gx,t.Gy))throw new Error("bad curve params: generator point");function f(I,x,E=!1){const _=E?Ot:En;return $r("coordinate "+I,x,_,o),x}function m(I){if(!(I instanceof w))throw new Error("ExtendedPoint expected")}const p=Hs((I,x)=>{const{ex:E,ey:_,ez:k}=I,P=I.is0();x==null&&(x=P?fp:n.inv(k));const M=a(E*x),$=a(_*x),G=a(k*x);if(P)return{x:En,y:Ot};if(G!==Ot)throw new Error("invZ was invalid");return{x:M,y:$}}),C=Hs(I=>{const{a:x,d:E}=t;if(I.is0())throw new Error("bad point: ZERO");const{ex:_,ey:k,ez:P,et:M}=I,$=a(_*_),G=a(k*k),Y=a(P*P),L=a(Y*Y),j=a($*x),O=a(Y*a(j+G)),q=a(L+a(E*a($*G)));if(O!==q)throw new Error("bad point: equation left != right (1)");const B=a(_*k),c=a(P*M);if(B!==c)throw new Error("bad point: equation left != right (2)");return!0});class w{constructor(x,E,_,k){this.ex=f("x",x),this.ey=f("y",E),this.ez=f("z",_,!0),this.et=f("t",k),Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(x){if(x instanceof w)throw new Error("extended point not allowed");const{x:E,y:_}=x||{};return f("x",E),f("y",_),new w(E,_,Ot,a(E*_))}static normalizeZ(x){return Qc(w,"ez",x)}static msm(x,E){return Yf(w,r,x,E)}_setWindowSize(x){this.precompute(x)}precompute(x=8,E=!0){return F.setWindowSize(this,x),E||this.multiply(xa),this}assertValidity(){C(this)}equals(x){m(x);const{ex:E,ey:_,ez:k}=this,{ex:P,ey:M,ez:$}=x,G=a(E*$),Y=a(P*k),L=a(_*$),j=a(M*k);return G===Y&&L===j}is0(){return this.equals(w.ZERO)}negate(){return new w(a(-this.ex),this.ey,this.ez,a(-this.et))}double(){const{a:x}=t,{ex:E,ey:_,ez:k}=this,P=a(E*E),M=a(_*_),$=a(xa*a(k*k)),G=a(x*P),Y=E+_,L=a(a(Y*Y)-P-M),j=G+M,O=j-$,q=G-M,B=a(L*O),c=a(j*q),b=a(L*q),y=a(O*j);return new w(B,c,y,b)}add(x){m(x);const{a:E,d:_}=t,{ex:k,ey:P,ez:M,et:$}=this,{ex:G,ey:Y,ez:L,et:j}=x,O=a(k*G),q=a(P*Y),B=a($*_*j),c=a(M*L),b=a((k+P)*(G+Y)-O-q),y=c-B,S=c+B,v=a(q-E*O),U=a(b*y),W=a(S*v),A=a(b*v),h=a(y*S);return new w(U,W,h,A)}subtract(x){return this.add(x.negate())}multiply(x){const E=x;$r("scalar",E,Ot,i);const{p:_,f:k}=F.wNAFCached(this,E,w.normalizeZ);return w.normalizeZ([_,k])[0]}multiplyUnsafe(x,E=w.ZERO){const _=x;return $r("scalar",_,En,i),_===En?w.ZERO:this.is0()||_===Ot?this:F.wNAFCachedUnsafe(this,_,w.normalizeZ,E)}isSmallOrder(){return this.multiplyUnsafe(s).is0()}isTorsionFree(){return F.wNAFCachedUnsafe(this,i).is0()}toAffine(x){return p(this,x)}clearCofactor(){return s===Ot?this:this.multiplyUnsafe(s)}static fromBytes(x,E=!1){return Vt(x),this.fromHex(x,E)}static fromHex(x,E=!1){const{d:_,a:k}=t,P=n.BYTES;x=Ze("pointHex",x,P),Tr("zip215",E);const M=x.slice(),$=x[P-1];M[P-1]=$&-129;const G=zs(M),Y=E?o:n.ORDER;$r("pointHex.y",G,En,Y);const L=a(G*G),j=a(L-Ot),O=a(_*L-k);let{isValid:q,value:B}=l(j,O);if(!q)throw new Error("Point.fromHex: invalid y coordinate");const c=(B&Ot)===Ot,b=($&128)!==0;if(!E&&B===En&&b)throw new Error("Point.fromHex: x=0 and x_0=1");return b!==c&&(B=a(-B)),w.fromAffine({x:B,y:G})}static fromPrivateScalar(x){return w.BASE.multiply(x)}toBytes(){const{x,y:E}=this.toAffine(),_=Bo(E,n.BYTES);return _[_.length-1]|=x&Ot?128:0,_}toRawBytes(){return this.toBytes()}toHex(){return Fr(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}w.BASE=new w(t.Gx,t.Gy,Ot,a(t.Gx*t.Gy)),w.ZERO=new w(En,Ot,Ot,En),w.Fp=n,w.Fn=r;const F=Gf(w,r.BYTES*8);return w}function pp(t,e){ms(e,{hash:"function"},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",mapToCurve:"function"});const{prehash:n,hash:r}=e,{BASE:s,Fp:i,Fn:o}=t,a=o.ORDER,l=e.randomBytes||Kc,f=e.adjustScalarBytes||(M=>M),m=e.domain||((M,$,G)=>{if(Tr("phflag",G),$.length||G)throw new Error("Contexts/pre-hash are not supported");return M});function p(M){return o.create(M)}function C(M){return p(zs(M))}function w(M){const $=i.BYTES;M=Ze("private key",M,$);const G=Ze("hashed private key",r(M),2*$),Y=f(G.slice(0,$)),L=G.slice($,2*$),j=C(Y);return{head:Y,prefix:L,scalar:j}}function F(M){const{head:$,prefix:G,scalar:Y}=w(M),L=s.multiply(Y),j=L.toBytes();return{head:$,prefix:G,scalar:Y,point:L,pointBytes:j}}function I(M){return F(M).pointBytes}function x(M=Uint8Array.of(),...$){const G=kn(...$);return C(r(m(G,Ze("context",M),!!n)))}function E(M,$,G={}){M=Ze("message",M),n&&(M=n(M));const{prefix:Y,scalar:L,pointBytes:j}=F($),O=x(G.context,Y,M),q=s.multiply(O).toBytes(),B=x(G.context,q,j,M),c=p(O+B*L);$r("signature.s",c,En,a);const b=i.BYTES,y=kn(q,Bo(c,b));return Ze("result",y,b*2)}const _=hp;function k(M,$,G,Y=_){const{context:L,zip215:j}=Y,O=i.BYTES;M=Ze("signature",M,2*O),$=Ze("message",$),G=Ze("publicKey",G,O),j!==void 0&&Tr("zip215",j),n&&($=n($));const q=zs(M.slice(O,2*O));let B,c,b;try{B=t.fromHex(G,j),c=t.fromHex(M.slice(0,O),j),b=s.multiplyUnsafe(q)}catch{return!1}if(!j&&B.isSmallOrder())return!1;const y=x(L,c.toBytes(),B.toBytes(),$);return c.add(B.multiplyUnsafe(y)).subtract(b).clearCofactor().is0()}return s.precompute(8),{getPublicKey:I,sign:E,verify:k,utils:{getExtendedPublicKey:F,randomPrivateKey:()=>l(i.BYTES),precompute(M=8,$=t.BASE){return $.precompute(M,!1)}},Point:t}}function yp(t){const e={a:t.a,d:t.d,p:t.Fp.ORDER,n:t.n,h:t.h,Gx:t.Gx,Gy:t.Gy},n=t.Fp,r=_r(e.n,t.nBitLength,!0),s={Fp:n,Fn:r,uvRatio:t.uvRatio},i={hash:t.hash,randomBytes:t.randomBytes,adjustScalarBytes:t.adjustScalarBytes,domain:t.domain,prehash:t.prehash,mapToCurve:t.mapToCurve};return{CURVE:e,curveOpts:s,eddsaOpts:i}}function gp(t,e){return Object.assign({},e,{ExtendedPoint:e.Point,CURVE:t})}function wp(t){const{CURVE:e,curveOpts:n,eddsaOpts:r}=yp(t),s=bp(e,n),i=pp(s,r);return gp(t,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */BigInt(0);const Ep=BigInt(1),Ld=BigInt(2);BigInt(3);const Ap=BigInt(5),Bp=BigInt(8),xo={p:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:Bp,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function xp(t){const e=BigInt(10),n=BigInt(20),r=BigInt(40),s=BigInt(80),i=xo.p,a=t*t%i*t%i,l=Xe(a,Ld,i)*a%i,f=Xe(l,Ep,i)*t%i,m=Xe(f,Ap,i)*f%i,p=Xe(m,e,i)*m%i,C=Xe(p,n,i)*p%i,w=Xe(C,r,i)*C%i,F=Xe(w,s,i)*w%i,I=Xe(F,s,i)*w%i,x=Xe(I,e,i)*m%i;return{pow_p_5_8:Xe(x,Ld,i)*t%i,b2:a}}function Cp(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}const Od=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function Sp(t,e){const n=xo.p,r=Je(e*e*e,n),s=Je(r*r*e,n),i=xp(t*s).pow_p_5_8;let o=Je(t*r*i,n);const a=Je(e*o*o,n),l=o,f=Je(o*Od,n),m=a===t,p=a===Je(-t,n),C=a===Je(-t*Od,n);return m&&(o=l),(p||C)&&(o=f),Gb(o,n)&&(o=Je(-o,n)),{isValid:m||p,value:o}}const Dp=_r(xo.p,void 0,!0),vp={...xo,Fp:Dp,hash:Vc,adjustScalarBytes:Cp,uvRatio:Sp},Mr=wp(vp),kp=[{name:"appIdPrefix",binary:"bytes",custom:Lt.encode("appID"),omit:!0},{name:"appId",binary:"uint",size:8}],Yt=class Yt{constructor(e,n="hex"){ie(this,"address");this.address=typeof e=="string"?Yt.stringToUint8Array(e,n):e}toNative(e){return or(e,this)}unwrap(){return this.address}toString(){return At.encode(this.address,!0)}toUint8Array(){return this.address}toUniversalAddress(){return this}equals(e){return Lt.equals(this.address,e.address)}static isValidAddress(e,n="hex"){return!$m(()=>Yt.stringToUint8Array(e,n))}static instanceof(e){return typeof e=="object"&&"constructor"in e&&e.constructor.type===Yt.type}static stringToUint8Array(e,n){const r=(()=>{switch(n){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 ${n}`);return At.decode(e);case"base58":return ef.decode(e);case"bech32":return Ju.decodeToBytes(e).bytes;case"algorandAppId":return Ob(bn(kp,{appId:BigInt(e)}));case"sha256":return Gi(e)}})();if(r.length>Yt.byteSize)throw new Error(`string ${e} has invalid length for format ${n}`);return r.length<Yt.byteSize?Lt.zpad(r,Yt.byteSize):r}};ie(Yt,"byteSize",32),ie(Yt,"type","Universal"),ie(Yt,"ZERO",new Yt(new Uint8Array(Yt.byteSize)));let St=Yt;function Fp(t){return typeof t=="object"&&"setChain"in t}const cc=new Map;function tl(t,e){cc.has(t)||cc.set(t,e)}function or(t,e){const n=hn.get(t),r=cc.get(n);if(!r)throw new Error(`No native address type registered for platform ${n}, import the platform directly or, if using sdk package, import the addresses conditional export`);try{const s=new r(e);return Fp(s)&&s.setChain(t),s}catch(s){const i=`Error parsing address as a native ${t} address: ${s.message}`;if(St.instanceof(e))throw i;return new St(e).toNative(t)}}function n0(t,e){const n=hn.get(t);return new St(e,B1.get(n))}function Tp(t){return"getVersion"in t}const er={};function Ip(t,e,n){e in er||(er[e]={});const r=er[e];if(t in r)throw new Error(`Protocol ${t} for protocol ${e} has already registered`);er[e][t]=n}function Up(t,e){const n=ti(t)?hn.get(t):t;return e in er?n in er[e]:!1}function r0(t,e){if(e in er){const n=er[e];if(n&&t in n){const r=n[t];if(r)return r}}throw new Error(`No protocols registered for ${t}:${e}. This may be because the platform specific protocol implementation is not registered (by installing and importing it) or no implementation exists for this platform`)}const _p=(t,e,n,r)=>r0(t,e).fromRpc(n,r),lc=(t,e)=>t?`${t}:${e}`:e,dc=new Map;function Mp(t,e,n){const r=lc(t,e);if(dc.has(r))throw new Error(`Payload type ${r} already registered`);dc.set(r,n)}function gt(t,e){for(const[n,r]of e)Mp(t,n,r)}const qe={binary:"uint",size:32},s0={binary:"uint",size:2},zt=t=>({...s0,custom:{to:e=>{if(e===0){if(!(t!=null&&t.allowNull))throw new Error("ChainId 0 is not valid for this protocol and action");return null}const n=us(e),r=(t==null?void 0:t.allowedChains)??tf;if(!r.includes(n))throw new Error(`Chain ${n} not in allowed chains ${r}`);return n},from:e=>e==null?0:ei(e)}}),Rp=t=>({...s0,custom:{to:t,from:ei(t)}}),rs={binary:"uint",size:4},Co={binary:"uint",size:8},i0={to:t=>new Date(Number(t*1000n)),from:t=>BigInt(t.getTime())/1000n},nl={binary:"uint",size:4},Vn=t=>({name:"payloadId",binary:"uint",size:1,custom:t,omit:!0}),So={binary:"uint",size:8};class Wp{constructor(e,n,r){ie(this,"r");ie(this,"s");ie(this,"v");this.r=e,this.s=n,this.v=r}encode(){return bn(Zi,this)}static decode(e){return pn(Zi,e)}}var Nd;(function(t){function e(i){return Qn.getPublicKey(i)}t.toPubkey=e;function n(i,o){if(o.length!=32)throw new Error("hash.length != 32");return Qn.sign(o,i)}t.sign=n;function r(i,o,a){const{r:l,s:f}=i;return Qn.verify({r:l,s:f},a,o)}t.validate=r;function s(i,o){const{r:a,s:l,v:f}=i,m=new Qn.Signature(a,l);return m.recovery=f,m.recoverPublicKey(o).toRawBytes()}t.recover=s})(Nd||(Nd={}));const Pp=[{name:"r",binary:"uint",size:32},{name:"s",binary:"uint",size:32},{name:"v",binary:"uint",size:1}],Zi={binary:"bytes",layout:Pp,custom:{to:t=>new Wp(t.r,t.s,t.v),from:t=>({r:t.r,s:t.s,v:t.v})}},me={binary:"bytes",size:32,custom:{to:t=>new St(t),from:t=>t.toUint8Array()}},Lp=t=>{const e=t.findIndex(n=>n!==0);return-1<e?t.slice(e):new Uint8Array([])},o0={to:Lt.decode,from:Lt.encode},rl=t=>({binary:"bytes",size:t,custom:{to:e=>Lt.decode(Lp(e)),from:e=>Lt.zpad(Lt.encode(e),t)}});function a0(t){const e=t.indexOf(":");return e!==-1?[t.slice(0,e),t.slice(e+1)]:[null,t]}const Op=[{name:"guardianIndex",binary:"uint",size:1},{name:"signature",...Zi}],sl=[{name:"version",binary:"uint",size:1,custom:1,omit:!0},{name:"guardianSet",...nl},{name:"signatures",binary:"array",lengthSize:1,layout:Op}],il=[{name:"timestamp",binary:"uint",size:4},{name:"nonce",binary:"uint",size:4},{name:"emitterChain",...zt()},{name:"emitterAddress",...me},{name:"sequence",...So},{name:"consistencyLevel",binary:"uint",size:1}],Np=[...sl,...il];function qs(t){const e=dc.get(t);if(!e)throw new Error(`No layout registered for payload type ${t}`);return e}function c0(t){return{name:"payload",binary:"bytes",...t==="Uint8Array"?{}:{layout:qs(t)}}}function Wi(t){const e=[...Np,c0(t.payloadLiteral)];return bn(e,t)}function zp(t,e){if(t==="Uint8Array")return e;const n=qs(t);return bn(n,e)}function ol(t,e){const n=(()=>{if(Array.isArray(t[0]))return t.flatMap(([o,a])=>a.map(l=>lc(o,l)));if(typeof t[1]=="string")return t;const[s,i]=t;return i.map(o=>lc(s,o))})(),r=n1(n.map(s=>qs(s)));return s=>{typeof s=="string"&&(s=At.decode(s));const i=r(s);return Array.isArray(i)?i.map(o=>n[o]):i!==null?n[i]:null}}function Zr(t,e){typeof e=="string"&&(e=At.decode(e));const[n,r]=pn(sl,e,!1);for(let w=1;w<n.signatures.length;++w)if(n.signatures[w].guardianIndex<=n.signatures[w-1].guardianIndex)throw new Error("Guardian signatures must be in ascending order of guardian set index");const s=r,[i,o]=pn(il,e.subarray(s),!1),a=s+o,[l,f]=typeof t=="string"?[t,zd(t,e.subarray(a))]:zd(t,e.subarray(a)),[m,p]=a0(l),C=Ns(e.slice(s));return{protocolName:m,payloadName:p,payloadLiteral:l,...n,...i,payload:f,hash:C}}function zd(t,e,n=0){return(()=>{if(typeof e=="string"&&(e=At.decode(e)),t==="Uint8Array")return e.slice(n);if(typeof t=="string")return pn(qs(t),e.subarray(n));const r=t(e.slice(n));if(r===null)throw new Error(`Encoded data does not match any of the given payload types - ${e}`);return[r,pn(qs(r),e.subarray(n))]})()}function Hp(t){return t.getBalances!==void 0}class qp{constructor(e,n){ie(this,"network");ie(this,"config");this.network=e,this.config=n}utils(){return this.constructor}getProtocol(e,n){return _p(this.utils()._platform,e,n,this.config)}getProtocolInitializer(e){return r0(this.utils()._platform,e)}async parseWormholeMessages(e,n,r){return(await this.getProtocol("WormholeCore",n)).parseTransaction(r)}}const Kp=[["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"}]]]],Hd=fe(Kp,[0,[1,2]]),$p=[["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"}]]]],qd=fe($p,[0,[1,2]]);function Do(t,e){if(t!=="Devnet"){if(t==="Mainnet"){if(!Hd.has(e))return;const n=Hd.get(e);return Object.fromEntries(n.map(([r,s])=>[r,{...s,chain:e,key:r}]))}if(t==="Testnet"){if(!qd.has(e))return;const n=qd.get(e);return Object.fromEntries(n.map(([r,s])=>[r,{...s,chain:e,key:r}]))}throw new Error("Unsupported network: "+t)}}function jp(t,e){const n=Do(t,e);return n?fs.native(n):void 0}function Vp(t,e,n){const r=Do(t,e);return r?fs.byAddress(r,n):void 0}function Gp(t,e,n){const r=Do(t,e);return r?fs.byKey(r,n):void 0}function Yp(t,e){const n={coreBridge:q1.get(t,e),tokenBridge:K1.get(t,e),nftBridge:V1.get(t,e),relayer:G1.get(t,e),tokenBridgeRelayer:$1.get(t,e),tbtc:Mi.get(t,e),executor:j1.get(t,e)};return nc.has(t,e)&&(n.executorTokenBridge=nc.get(t,e)),rc.has(t,e)&&(n.cctp=rc.get(t,e)),Bd.has(t,e)&&(n.gateway=Bd.get(t,e)),xd.has(t,e)&&(n.translator=xd.get(t,e)),Cd.has(t,e)&&(n.portico=Cd.get(t,e)),Mi.has(t,e)&&(n.tbtc=Mi.get(t,e)),n}function Pt(t){return typeof t=="string"&&t==="native"}function al(t){return{chain:t,address:"native"}}function vo(t){return typeof t=="object"&&t.address!==void 0&&t.chain!==void 0&&ti(t.chain)}function l0(t,e){return t.chain!==e.chain?!1:Pt(t.address)&&Pt(e.address)?!0:In(t)===In(e)}function In(t){return vo(t)&&Pt(t.address)?t.address:t.address.toNative(t.chain).toString()}function Xp(t){if(Pt(t.address))throw new Error("Invalid address, cannot convert the string literal `native` to a Universal Address");return t.address.toUniversalAddress().toString()}function d0(t,e,n){let r;if(vo(n)){if(!Pt(n.address))return[!1,n];r=n.address}else r=n;if(Pt(r)){const i=jp(t,e);if(!i)throw new Error("Invalid destination token");const o=i.wrappedKey,a=Gp(t,e,o);if(!a)throw new Error("Invalid wrapped token key: "+o);return[!0,{chain:e,address:or(e,a.address)}]}return[!1,{chain:e,address:r}]}function u0(t){return t.chain!==void 0&&t.txid!==void 0}function Ca(t){return tf.map(n=>{const r=hn(n);let s="";try{s=df.get(t,n)}catch{}const i=Do(t,n),o=i?Object.values(i).find(l=>Pt(l.address)&&l.wrappedKey):void 0,a=o?i[o.wrappedKey]:void 0;return{key:n,platform:r,network:t,chainId:fn(n),finalityThreshold:sf.get(n)??0,blockTime:of.get(n)??0,contracts:Yp(t,n),nativeTokenDecimals:af(r),nativeChainId:s,tokenMap:i,wrappedNative:a,explorer:F1(t,n),rpc:cf(t,n)}}).reduce((n,r)=>({...n,[r.key]:r}),{})}function Zp(t){return f0(t)||cl(t)}function f0(t){return typeof t=="object"&&"chain"in t&&typeof t.chain=="function"&&"address"in t&&typeof t.address=="function"&&"sign"in t&&typeof t.sign=="function"}function cl(t){return typeof t=="object"&&"chain"in t&&typeof t.chain=="function"&&"address"in t&&typeof t.address=="function"&&"signAndSend"in t&&typeof t.signAndSend=="function"}class Jp{constructor(e,n,r){ie(this,"_chain");ie(this,"_address");ie(this,"_signer");this._chain=e,this._address=n,this._signer=r}unwrap(){return this._signer}}function Ar(t){return t.sequence!==void 0&&t.emitter!==void 0&&t.chain!==void 0}function Ji(t){return t.hash!==void 0}const Kd=t=>[Vn(1),{name:"token",binary:"bytes",layout:[{name:"address",...me},{name:"amount",...qe}]},{name:"sourceDomain",...rs},{name:"targetDomain",...rs},{name:"nonce",...Co},{name:"caller",...me},{name:"mintRecipient",...me},mo({name:"payload",lengthSize:2},t)],Qp=[Vn(1),{name:"targetRelayerFee",...qe},{name:"toNativeTokenAmount",...qe},{name:"targetRecipient",...me}],ey=[["DepositWithPayload",Kd()],["TransferWithRelay",Kd(Qp)]];gt("AutomaticCircleBridge",ey);const h0={binary:"uint",size:4,custom:0,omit:!0},ty=[{name:"messageBodyVersion",...h0},{name:"burnToken",...me},{name:"mintRecipient",...me},{name:"amount",...qe},{name:"messageSender",...me}],uc=[{name:"version",...h0},{name:"sourceDomain",...rs},{name:"destinationDomain",...rs},{name:"nonce",...Co},{name:"sender",...me},{name:"recipient",...me},{name:"destinationCaller",...me},{name:"payload",binary:"bytes",layout:ty}],ny=[["Message",uc]];gt("CircleBridge",ny);exports.CircleBridge=void 0;(function(t){t.isCircleAttestation=e=>e.message!==void 0,t.deserialize=e=>{const n=pn(uc,e),r=At.encode(Ns(e),!0);return[n,r]},t.serialize=e=>bn(uc,e)})(exports.CircleBridge||(exports.CircleBridge={}));var $d;(function(t){const e="AutomaticCircleBridge",n=["DepositWithPayload","TransferWithRelay"];t.getTransferDiscriminator=_c(()=>ol([e,n]))})($d||($d={}));function ry(t){return t.amount!==void 0&&t.from!==void 0&&t.to!==void 0}const jd={binary:"bytes",size:32,custom:{to:t=>Hi(t.byteLength).map(e=>String.fromCharCode(t[e])).join(""),from:t=>new Uint8Array(t.split("").map(e=>e.charCodeAt(0)))}},m0=[{name:"token",binary:"bytes",layout:[{name:"amount",...qe},{name:"address",...me},{name:"chain",...zt()}]},{name:"to",binary:"bytes",layout:[{name:"address",...me},{name:"chain",...zt()}]}],b0=[Vn(1),...m0,{name:"fee",...qe}],ii=t=>[Vn(3),...m0,{name:"from",...me},mo({name:"payload"},t)],sy=[["AttestMeta",[Vn(2),{name:"token",binary:"bytes",layout:[{name:"address",...me},{name:"chain",...zt()}]},{name:"decimals",binary:"uint",size:1},{name:"symbol",...jd},{name:"name",...jd}]],["Transfer",b0],["TransferWithPayload",ii()]];gt("TokenBridge",sy);const iy=o1(["shouldWrapNative","shouldUnwrapNative"]),Qi=[{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",...iy}];({...me},{...qe}),{...me},{...me},{...me},{...qe},{...qe},{...qe},{...qe};const fc=[{name:"flagSet",binary:"bytes",layout:Qi},{name:"finalTokenAddress",...me},{name:"recipientAddress",...me},{name:"cannonAssetAmount",...qe},{name:"minAmountFinish",...qe},{name:"relayerFee",...qe}],oy=[["Transfer",ii(fc)]];gt("PorticoBridge",oy);exports.PorticoBridge=void 0;(function(t){t.deserializePayload=e=>pn(fc,e),t.serializePayload=e=>bn(fc,e),t.deserializeFlagSet=e=>pn(Qi,e),t.serializeFlagSet=e=>bn(Qi,e)})(exports.PorticoBridge||(exports.PorticoBridge={}));const p0={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",...qe},{name:"targetChainRefundPerGasUnused",...qe}]},Vd={binary:"bytes",layout:[{name:"chain",...zt()},{name:"address",...me}]},ay=[{name:"chain",...zt()},{name:"emitterAddress",...me},{name:"sequence",...So}],cy=[{name:"size",binary:"uint",size:4,custom:12,omit:!0},{name:"domain",...rs},{name:"nonce",...Co}],y0={binary:"switch",idSize:1,idTag:"keyType",layouts:[[[1,"VAA"],ay],[[2,"CCTP"],cy]]},g0=t=>[Vn(1),{name:"target",...Vd},mo({name:"payload",lengthSize:4},t),{name:"requestedReceiverValue",...qe},{name:"extraReceiverValue",...qe},{name:"executionInfo",...p0},{name:"refund",...Vd},{name:"refundDeliveryProvider",...me},{name:"sourceDeliveryProvider",...me},{name:"senderAddress",...me},{name:"messageKeys",binary:"array",lengthSize:1,layout:y0}],ly=[["DeliveryInstruction",g0()],["RedeliveryInstruction",[Vn(2),{name:"deliveryVaaKey",binary:"bytes",layout:y0},{name:"targetChain",...zt()},{name:"newRequestedReceiverValue",...qe},{name:"newEncodedExecutionInfo",...p0},{name:"newSourceDeliveryProvider",...me},{name:"newSenderAddress",...me}]]];gt("Relayer",ly);const dy=[Vn(1),{name:"targetRelayerFee",...qe},{name:"toNativeTokenAmount",...qe},{name:"targetRecipient",...me}],uy=[["TransferWithRelay",ii(dy)]];gt("AutomaticTokenBridge",uy);const fy=t=>new Error(`Token ${t} is not a wrapped asset`);var hc;(function(t){const e="TokenBridge",n=["Transfer","TransferWithPayload"],r=["AttestMeta"];[...n,...r],t.getTransferDiscriminator=_c(()=>ol([e,n]))})(hc||(hc={}));function hy(t){return t.token!==void 0&&t.amount!==void 0&&t.from!==void 0&&t.to!==void 0}const my=[{name:"targetRecipient",...me}],by=[["TransferWithExecutorRelay",ii(my)]];gt("ExecutorTokenBridge",by);const py=[["Add",1],["Subtract",2],["Unknown",3]],mc={binary:"bytes",size:20,custom:{to:t=>At.encode(t,!0),from:t=>At.decode(t)}},yy=[["UpgradeContract",[!1,[{name:"newContract",...me}]]],["RegisterChain",[!0,[{name:"foreignChain",...zt()},{name:"foreignAddress",...me}]]],["RecoverChainId",[!1,[{name:"evmChainId",binary:"uint",size:32},{name:"newChainId",...zt({allowedChains:nf("Evm")})}]]],["GuardianSetUpgrade",[!0,[{name:"guardianSet",...nl},{name:"guardians",binary:"array",lengthSize:1,layout:mc}]]],["SetMessageFee",[!1,[{name:"messageFee",binary:"uint",size:32}]]],["TransferFees",[!0,[{name:"amount",binary:"uint",size:32},{name:"recipient",...me}]]],["UpdateDefaultProvider",[!1,[{name:"defaultProvider",...me}]]],["RegisterEmitterAndDomain",[!0,[{name:"emitterChain",...zt()},{name:"emitterAddress",...me},{name:"domain",binary:"uint",size:4}]]],["UpdateFinality",[!1,[{name:"finality",binary:"uint",size:1}]]]],Sa={binary:"bytes",size:32},Gd=[{name:"contractAddr",...me},{name:"codeId",binary:"uint",size:8}],gy=[["StoreCode",[!1,[{name:"wasmHash",...Sa}]]],["InstantiateContract",[!1,[{name:"instantiationParamsHash",...Sa}]]],["MigrateContract",[!1,[{name:"migrationParamsHash",...Sa}]]],["AddWasmInstantiateAllowlist",[!1,Gd]],["DeleteWasmInstantiateAllowlist",[!1,Gd]]],wy=(()=>{const t=s=>({binary:"bytes",size:s,custom:o0}),e=[{name:"height",binary:"uint",size:8}],n=ju(e),r=s=>[{name:"name",...t(s)},...e];return{binary:"bytes",custom:{to:s=>pn(r(s.length-n),s),from:s=>bn(r(s.name.length),s)}}})(),Ey=[["ScheduleUpgrade",[!1,wy]],["CancelUpgrade",[!0,[]]],["SetIbcComposabilityMwContract",[!1,[{name:"contractAddress",...me}]]]],Ay=[["ModifyBalance",[!1,[{name:"sequence",...So},{name:"modifiedChain",...zt()},{name:"tokenChain",...zt()},{name:"tokenAddress",...me},{name:"kind",...i1(py)},{name:"amount",...qe},{name:"reason",...rl(32)}]]]],By=[["ActionUpdateChannelChain",[!1,[{name:"channelId",...rl(64)},{name:"channelChain",...zt({allowedChains:nf("Cosmwasm")})}]]]],xy=[["GeneralPurposeEvm",[!1,[{name:"governanceContract",...mc},{name:"targetContract",...mc},{name:"payload",binary:"bytes",lengthSize:2}]]],["GeneralPurposeSolana",[!1,[{name:"governanceContract",...me},{name:"payload",binary:"bytes"}]]]],w0=[...yy,...gy,...Ey,...Ay,...By,...xy];Hu(w0,0);const Yd=Object.fromEntries(w0),Cy=[["WormholeCore","Core"],["TokenBridge","TokenBridge"],["NftBridge","NftBridge"],["Relayer","WormholeRelayer"],["CircleBridge","CircleIntegration"],["IbcBridge","IbcTranslator"],["IbcReceiver","IbcReceiver"],["GlobalAccountant","GlobalAccountant"],["GeneralPurposeGovernance","GeneralPurposeGovernance"],["WormchainGovernance","WasmdModule"],["GatewayGovernance","GatewayModule"]],Sy=fe(Cy),Dy=t=>({to:t,from:(()=>{const n=new Uint8Array(32),r=Sy(t);for(let s=1;s<=r.length;++s)n[32-s]=r.charCodeAt(r.length-s);return n})()}),vy=(t,e)=>({to:t,from:e}),ky=(t,e,n)=>[{name:"protocol",binary:"bytes",custom:Dy(t)},{name:"action",binary:"uint",size:1,custom:vy(e,n)},{name:"chain",...zt({allowNull:Yd[e][0]})},{name:"actionArgs",binary:"bytes",layout:Yd[e][1]}],Fe=(t,e,n)=>[e,ky(t,e,n)],Fy=[Fe("WormholeCore","UpgradeContract",1),Fe("WormholeCore","GuardianSetUpgrade",2),Fe("WormholeCore","SetMessageFee",3),Fe("WormholeCore","TransferFees",4),Fe("WormholeCore","RecoverChainId",5)],Ty=[Fe("TokenBridge","RegisterChain",1),Fe("TokenBridge","UpgradeContract",2),Fe("TokenBridge","RecoverChainId",3)],Iy=[Fe("NftBridge","RegisterChain",1),Fe("NftBridge","UpgradeContract",2),Fe("NftBridge","RecoverChainId",3)],Uy=[Fe("Relayer","RegisterChain",1),Fe("Relayer","UpgradeContract",2),Fe("Relayer","UpdateDefaultProvider",3)],_y=[Fe("CircleBridge","UpdateFinality",1),Fe("CircleBridge","RegisterEmitterAndDomain",2),Fe("CircleBridge","UpgradeContract",3)],My=[Fe("IbcBridge","ActionUpdateChannelChain",1)],Ry=[Fe("IbcReceiver","ActionUpdateChannelChain",1)],Wy=[Fe("GlobalAccountant","ModifyBalance",1)],Py=[Fe("GeneralPurposeGovernance","GeneralPurposeEvm",1),Fe("GeneralPurposeGovernance","GeneralPurposeSolana",2)],Ly=[Fe("WormchainGovernance","StoreCode",1),Fe("WormchainGovernance","InstantiateContract",2),Fe("WormchainGovernance","MigrateContract",3),Fe("WormchainGovernance","AddWasmInstantiateAllowlist",4),Fe("WormchainGovernance","DeleteWasmInstantiateAllowlist",5)],Oy=[Fe("GatewayGovernance","ScheduleUpgrade",1),Fe("GatewayGovernance","CancelUpgrade",2),Fe("GatewayGovernance","SetIbcComposabilityMwContract",3)];gt("WormholeCore",Fy);gt("TokenBridge",Ty);gt("NftBridge",Iy);gt("Relayer",Uy);gt("CircleBridge",_y);gt("IbcBridge",My);gt("IbcReceiver",Ry);gt("GlobalAccountant",Wy);gt("GeneralPurposeGovernance",Py);gt("WormchainGovernance",Ly);gt("GatewayGovernance",Oy);exports.TBTCBridge=void 0;(function(t){const e="TBTCBridge",n=["GatewayTransfer","Transfer"];[...n],t.getTransferDiscriminator=_c(()=>ol([e,n])),t.getNativeTbtcToken=r=>{const s=eb.get("Mainnet",r);if(s)return{chain:r,address:or(r,s)}}})(exports.TBTCBridge||(exports.TBTCBridge={}));const Ny=[{name:"recipient",...me}],zy=[["GatewayTransfer",ii(Ny)],["Transfer",b0]];gt("TBTCBridge",zy);const Hy=[{name:"gasLimit",binary:"uint",size:16},{name:"msgValue",binary:"uint",size:16}],qy=[{name:"dropOff",binary:"uint",size:16},{name:"recipient",...me}],Ky=[{name:"request",binary:"switch",idSize:1,idTag:"type",layouts:[[[1,"GasInstruction"],Hy],[[2,"GasDropOffInstruction"],qy]]}],E0=[{name:"requests",binary:"array",layout:Ky}],$y=[{name:"quote",binary:"switch",idSize:4,idTag:"prefix",layouts:[[[1162948657,"EQ01"],[{name:"quoterAddress",binary:"bytes",size:20},{name:"payeeAddress",binary:"bytes",size:32},{name:"srcChain",binary:"uint",size:2},{name:"dstChain",binary:"uint",size:2},{name:"expiryTime",binary:"uint",size:8,custom:i0},{name:"baseFee",binary:"uint",size:8},{name:"dstGasPrice",binary:"uint",size:8},{name:"srcPrice",binary:"uint",size:8},{name:"dstPrice",binary:"uint",size:8}]]]}],A0=[...$y,{name:"signature",binary:"bytes",size:65}];var jr;(function(t){t.Pending="pending",t.Failed="failed",t.Unsupported="unsupported",t.Submitted="submitted",t.Underpaid="underpaid",t.Aborted="aborted"})(jr||(jr={}));var Xd;(function(t){t.ERM1="ERM1",t.ERV1="ERV1",t.ERN1="ERN1",t.ERC1="ERC1",t.ERC2="ERC2"})(Xd||(Xd={}));async function jy(t){const e=`${t}/capabilities`;try{const n=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return await n.json()}catch{throw new Error("Failed to fetch capabilities.")}}async function Vy(t,e,n,r){const s=`${t}/quote`;try{const i=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({srcChain:fn(e),dstChain:fn(n),relayInstructions:r})});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return await i.json()}catch{throw new Error("Failed to fetch signed quote.")}}async function Gy(t,e,n){const r=`${t}/status/tx`;try{const s=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({txHash:e,chainId:fn(n)})});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return await s.json()}catch{throw new Error(`Failed to fetch status for txHash: ${e}.`)}}function B0(t,e){return function(){return t.apply(e,arguments)}}const{toString:Yy}=Object.prototype,{getPrototypeOf:ll}=Object,ko=(t=>e=>{const n=Yy.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Mn=t=>(t=t.toLowerCase(),e=>ko(e)===t),Fo=t=>e=>typeof e===t,{isArray:bs}=Array,Ks=Fo("undefined");function Xy(t){return t!==null&&!Ks(t)&&t.constructor!==null&&!Ks(t.constructor)&&nn(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const x0=Mn("ArrayBuffer");function Zy(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&x0(t.buffer),e}const Jy=Fo("string"),nn=Fo("function"),C0=Fo("number"),To=t=>t!==null&&typeof t=="object",Qy=t=>t===!0||t===!1,Pi=t=>{if(ko(t)!=="object")return!1;const e=ll(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},eg=Mn("Date"),tg=Mn("File"),ng=Mn("Blob"),rg=Mn("FileList"),sg=t=>To(t)&&nn(t.pipe),ig=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||nn(t.append)&&((e=ko(t))==="formdata"||e==="object"&&nn(t.toString)&&t.toString()==="[object FormData]"))},og=Mn("URLSearchParams"),ag=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function oi(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),bs(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let a;for(r=0;r<o;r++)a=i[r],e.call(null,t[a],a,t)}}function S0(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}const D0=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Ne.global,v0=t=>!Ks(t)&&t!==D0;function bc(){const{caseless:t}=v0(this)&&this||{},e={},n=(r,s)=>{const i=t&&S0(e,s)||s;Pi(e[i])&&Pi(r)?e[i]=bc(e[i],r):Pi(r)?e[i]=bc({},r):bs(r)?e[i]=r.slice():e[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&oi(arguments[r],n);return e}const cg=(t,e,n,{allOwnKeys:r}={})=>(oi(e,(s,i)=>{n&&nn(s)?t[i]=B0(s,n):t[i]=s},{allOwnKeys:r}),t),lg=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),dg=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},ug=(t,e,n,r)=>{let s,i,o;const a={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),i=s.length;i-- >0;)o=s[i],(!r||r(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&ll(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},fg=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},hg=t=>{if(!t)return null;if(bs(t))return t;let e=t.length;if(!C0(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},mg=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&ll(Uint8Array)),bg=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let s;for(;(s=r.next())&&!s.done;){const i=s.value;e.call(t,i[0],i[1])}},pg=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},yg=Mn("HTMLFormElement"),gg=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Zd=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),wg=Mn("RegExp"),k0=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};oi(n,(s,i)=>{e(s,i,t)!==!1&&(r[i]=s)}),Object.defineProperties(t,r)},Eg=t=>{k0(t,(e,n)=>{if(nn(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];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 '"+n+"'")})}})},Ag=(t,e)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return bs(t)?r(t):r(String(t).split(e)),n},Bg=()=>{},xg=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Da="abcdefghijklmnopqrstuvwxyz",Jd="0123456789",F0={DIGIT:Jd,ALPHA:Da,ALPHA_DIGIT:Da+Da.toUpperCase()+Jd},Cg=(t=16,e=F0.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function Sg(t){return!!(t&&nn(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Dg=t=>{const e=new Array(10),n=(r,s)=>{if(To(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[s]=r;const i=bs(r)?[]:{};return oi(r,(o,a)=>{const l=n(o,s+1);!Ks(l)&&(i[a]=l)}),e[s]=void 0,i}}return r};return n(t,0)},vg=Mn("AsyncFunction"),kg=t=>t&&(To(t)||nn(t))&&nn(t.then)&&nn(t.catch),V={isArray:bs,isArrayBuffer:x0,isBuffer:Xy,isFormData:ig,isArrayBufferView:Zy,isString:Jy,isNumber:C0,isBoolean:Qy,isObject:To,isPlainObject:Pi,isUndefined:Ks,isDate:eg,isFile:tg,isBlob:ng,isRegExp:wg,isFunction:nn,isStream:sg,isURLSearchParams:og,isTypedArray:mg,isFileList:rg,forEach:oi,merge:bc,extend:cg,trim:ag,stripBOM:lg,inherits:dg,toFlatObject:ug,kindOf:ko,kindOfTest:Mn,endsWith:fg,toArray:hg,forEachEntry:bg,matchAll:pg,isHTMLForm:yg,hasOwnProperty:Zd,hasOwnProp:Zd,reduceDescriptors:k0,freezeMethods:Eg,toObjectSet:Ag,toCamelCase:gg,noop:Bg,toFiniteNumber:xg,findKey:S0,global:D0,isContextDefined:v0,ALPHABET:F0,generateString:Cg,isSpecCompliantForm:Sg,toJSONObject:Dg,isAsyncFn:vg,isThenable:kg};function Ae(t,e,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}V.inherits(Ae,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:V.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const T0=Ae.prototype,I0={};["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(t=>{I0[t]={value:t}});Object.defineProperties(Ae,I0);Object.defineProperty(T0,"isAxiosError",{value:!0});Ae.from=(t,e,n,r,s,i)=>{const o=Object.create(T0);return V.toFlatObject(t,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Ae.call(o,t.message,e,n,r,s),o.cause=t,o.name=t.name,i&&Object.assign(o,i),o};const Fg=null;function pc(t){return V.isPlainObject(t)||V.isArray(t)}function U0(t){return V.endsWith(t,"[]")?t.slice(0,-2):t}function Qd(t,e,n){return t?t.concat(e).map(function(s,i){return s=U0(s),!n&&i?"["+s+"]":s}).join(n?".":""):e}function Tg(t){return V.isArray(t)&&!t.some(pc)}const Ig=V.toFlatObject(V,{},null,function(e){return/^is[A-Z]/.test(e)});function Io(t,e,n){if(!V.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=V.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(I,x){return!V.isUndefined(x[I])});const r=n.metaTokens,s=n.visitor||m,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&V.isSpecCompliantForm(e);if(!V.isFunction(s))throw new TypeError("visitor must be a function");function f(F){if(F===null)return"";if(V.isDate(F))return F.toISOString();if(!l&&V.isBlob(F))throw new Ae("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(F)||V.isTypedArray(F)?l&&typeof Blob=="function"?new Blob([F]):Ne.Buffer.from(F):F}function m(F,I,x){let E=F;if(F&&!x&&typeof F=="object"){if(V.endsWith(I,"{}"))I=r?I:I.slice(0,-2),F=JSON.stringify(F);else if(V.isArray(F)&&Tg(F)||(V.isFileList(F)||V.endsWith(I,"[]"))&&(E=V.toArray(F)))return I=U0(I),E.forEach(function(k,P){!(V.isUndefined(k)||k===null)&&e.append(o===!0?Qd([I],P,i):o===null?I:I+"[]",f(k))}),!1}return pc(F)?!0:(e.append(Qd(x,I,i),f(F)),!1)}const p=[],C=Object.assign(Ig,{defaultVisitor:m,convertValue:f,isVisitable:pc});function w(F,I){if(!V.isUndefined(F)){if(p.indexOf(F)!==-1)throw Error("Circular reference detected in "+I.join("."));p.push(F),V.forEach(F,function(E,_){(!(V.isUndefined(E)||E===null)&&s.call(e,E,V.isString(_)?_.trim():_,I,C))===!0&&w(E,I?I.concat(_):[_])}),p.pop()}}if(!V.isObject(t))throw new TypeError("data must be an object");return w(t),e}function eu(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function dl(t,e){this._pairs=[],t&&Io(t,this,e)}const _0=dl.prototype;_0.append=function(e,n){this._pairs.push([e,n])};_0.toString=function(e){const n=e?function(r){return e.call(this,r,eu)}:eu;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Ug(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function M0(t,e,n){if(!e)return t;const r=n&&n.encode||Ug,s=n&&n.serialize;let i;if(s?i=s(e,n):i=V.isURLSearchParams(e)?e.toString():new dl(e,n).toString(r),i){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class tu{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,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){V.forEach(this.handlers,function(r){r!==null&&e(r)})}}const R0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},_g=typeof URLSearchParams<"u"?URLSearchParams:dl,Mg=typeof FormData<"u"?FormData:null,Rg=typeof Blob<"u"?Blob:null,Wg=(()=>{let t;return typeof navigator<"u"&&((t=navigator.product)==="ReactNative"||t==="NativeScript"||t==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Pg=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Fn={classes:{URLSearchParams:_g,FormData:Mg,Blob:Rg},isStandardBrowserEnv:Wg,isStandardBrowserWebWorkerEnv:Pg,protocols:["http","https","file","blob","url","data"]};function Lg(t,e){return Io(t,new Fn.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return Fn.isNode&&V.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function Og(t){return V.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Ng(t){const e={},n=Object.keys(t);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],e[i]=t[i];return e}function W0(t){function e(n,r,s,i){let o=n[i++];const a=Number.isFinite(+o),l=i>=n.length;return o=!o&&V.isArray(s)?s.length:o,l?(V.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!V.isObject(s[o]))&&(s[o]=[]),e(n,r,s[o],i)&&V.isArray(s[o])&&(s[o]=Ng(s[o])),!a)}if(V.isFormData(t)&&V.isFunction(t.entries)){const n={};return V.forEachEntry(t,(r,s)=>{e(Og(r),s,n,0)}),n}return null}const zg={"Content-Type":void 0};function Hg(t,e,n){if(V.isString(t))try{return(e||JSON.parse)(t),V.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const ps={transitional:R0,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=V.isObject(e);if(i&&V.isHTMLForm(e)&&(e=new FormData(e)),V.isFormData(e))return s&&s?JSON.stringify(W0(e)):e;if(V.isArrayBuffer(e)||V.isBuffer(e)||V.isStream(e)||V.isFile(e)||V.isBlob(e))return e;if(V.isArrayBufferView(e))return e.buffer;if(V.isURLSearchParams(e))return n.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 Lg(e,this.formSerializer).toString();if((a=V.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Io(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),Hg(e)):e}],transformResponse:[function(e){const n=this.transitional||ps.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(e&&V.isString(e)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?Ae.from(a,Ae.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:Fn.classes.FormData,Blob:Fn.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};V.forEach(["delete","get","head"],function(e){ps.headers[e]={}});V.forEach(["post","put","patch"],function(e){ps.headers[e]=V.merge(zg)});const qg=V.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"]),Kg=t=>{const e={};let n,r,s;return t&&t.split(`
7
- `).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||e[n]&&qg[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},nu=Symbol("internals");function Ss(t){return t&&String(t).trim().toLowerCase()}function Li(t){return t===!1||t==null?t:V.isArray(t)?t.map(Li):String(t)}function $g(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const jg=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function va(t,e,n,r,s){if(V.isFunction(r))return r.call(this,e,n);if(s&&(e=n),!!V.isString(e)){if(V.isString(r))return e.indexOf(r)!==-1;if(V.isRegExp(r))return r.test(e)}}function Vg(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Gg(t,e){const n=V.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{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,n,r){const s=this;function i(a,l,f){const m=Ss(l);if(!m)throw new Error("header name must be a non-empty string");const p=V.findKey(s,m);(!p||s[p]===void 0||f===!0||f===void 0&&s[p]!==!1)&&(s[p||l]=Li(a))}const o=(a,l)=>V.forEach(a,(f,m)=>i(f,m,l));return V.isPlainObject(e)||e instanceof this.constructor?o(e,n):V.isString(e)&&(e=e.trim())&&!jg(e)?o(Kg(e),n):e!=null&&i(n,e,r),this}get(e,n){if(e=Ss(e),e){const r=V.findKey(this,e);if(r){const s=this[r];if(!n)return s;if(n===!0)return $g(s);if(V.isFunction(n))return n.call(this,s,r);if(V.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Ss(e),e){const r=V.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||va(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let s=!1;function i(o){if(o=Ss(o),o){const a=V.findKey(r,o);a&&(!n||va(r,r[a],a,n))&&(delete r[a],s=!0)}}return V.isArray(e)?e.forEach(i):i(e),s}clear(e){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!e||va(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){const n=this,r={};return V.forEach(this,(s,i)=>{const o=V.findKey(r,i);if(o){n[o]=Li(s),delete n[i];return}const a=e?Vg(i):String(i).trim();a!==i&&delete n[i],n[a]=Li(s),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return V.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=e&&V.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
8
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[nu]=this[nu]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=Ss(o);r[a]||(Gg(s,o),r[a]=!0)}return V.isArray(e)?e.forEach(i):i(e),this}};rn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);V.freezeMethods(rn.prototype);V.freezeMethods(rn);function ka(t,e){const n=this||ps,r=e||n,s=rn.from(r.headers);let i=r.data;return V.forEach(t,function(a){i=a.call(n,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function P0(t){return!!(t&&t.__CANCEL__)}function ai(t,e,n){Ae.call(this,t??"canceled",Ae.ERR_CANCELED,e,n),this.name="CanceledError"}V.inherits(ai,Ae,{__CANCEL__:!0});function Yg(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Ae("Request failed with status code "+n.status,[Ae.ERR_BAD_REQUEST,Ae.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Xg=Fn.isStandardBrowserEnv?function(){return{write:function(n,r,s,i,o,a){const l=[];l.push(n+"="+encodeURIComponent(r)),V.isNumber(s)&&l.push("expires="+new Date(s).toGMTString()),V.isString(i)&&l.push("path="+i),V.isString(o)&&l.push("domain="+o),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Zg(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Jg(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function L0(t,e){return t&&!Zg(e)?Jg(t,e):e}const Qg=Fn.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function s(i){let o=i;return e&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(o){const a=V.isString(o)?s(o):o;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function e2(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function t2(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s=0,i=0,o;return e=e!==void 0?e:1e3,function(l){const f=Date.now(),m=r[i];o||(o=f),n[s]=l,r[s]=f;let p=i,C=0;for(;p!==s;)C+=n[p++],p=p%t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),f-o<e)return;const w=m&&f-m;return w?Math.round(C*1e3/w):void 0}}function ru(t,e){let n=0;const r=t2(50,250);return s=>{const i=s.loaded,o=s.lengthComputable?s.total:void 0,a=i-n,l=r(a),f=i<=o;n=i;const m={loaded:i,total:o,progress:o?i/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&f?(o-i)/l:void 0,event:s};m[e?"download":"upload"]=!0,t(m)}}const n2=typeof XMLHttpRequest<"u",r2=n2&&function(t){return new Promise(function(n,r){let s=t.data;const i=rn.from(t.headers).normalize(),o=t.responseType;let a;function l(){t.cancelToken&&t.cancelToken.unsubscribe(a),t.signal&&t.signal.removeEventListener("abort",a)}V.isFormData(s)&&(Fn.isStandardBrowserEnv||Fn.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.setContentType("multipart/form-data;",!1));let f=new XMLHttpRequest;if(t.auth){const w=t.auth.username||"",F=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(w+":"+F))}const m=L0(t.baseURL,t.url);f.open(t.method.toUpperCase(),M0(m,t.params,t.paramsSerializer),!0),f.timeout=t.timeout;function p(){if(!f)return;const w=rn.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),I={data:!o||o==="text"||o==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:w,config:t,request:f};Yg(function(E){n(E),l()},function(E){r(E),l()},I),f=null}if("onloadend"in f?f.onloadend=p:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(p)},f.onabort=function(){f&&(r(new Ae("Request aborted",Ae.ECONNABORTED,t,f)),f=null)},f.onerror=function(){r(new Ae("Network Error",Ae.ERR_NETWORK,t,f)),f=null},f.ontimeout=function(){let F=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const I=t.transitional||R0;t.timeoutErrorMessage&&(F=t.timeoutErrorMessage),r(new Ae(F,I.clarifyTimeoutError?Ae.ETIMEDOUT:Ae.ECONNABORTED,t,f)),f=null},Fn.isStandardBrowserEnv){const w=(t.withCredentials||Qg(m))&&t.xsrfCookieName&&Xg.read(t.xsrfCookieName);w&&i.set(t.xsrfHeaderName,w)}s===void 0&&i.setContentType(null),"setRequestHeader"in f&&V.forEach(i.toJSON(),function(F,I){f.setRequestHeader(I,F)}),V.isUndefined(t.withCredentials)||(f.withCredentials=!!t.withCredentials),o&&o!=="json"&&(f.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&f.addEventListener("progress",ru(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",ru(t.onUploadProgress)),(t.cancelToken||t.signal)&&(a=w=>{f&&(r(!w||w.type?new ai(null,t,f):w),f.abort(),f=null)},t.cancelToken&&t.cancelToken.subscribe(a),t.signal&&(t.signal.aborted?a():t.signal.addEventListener("abort",a)));const C=e2(m);if(C&&Fn.protocols.indexOf(C)===-1){r(new Ae("Unsupported protocol "+C+":",Ae.ERR_BAD_REQUEST,t));return}f.send(s||null)})},Oi={http:Fg,xhr:r2};V.forEach(Oi,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const s2={getAdapter:t=>{t=V.isArray(t)?t:[t];const{length:e}=t;let n,r;for(let s=0;s<e&&(n=t[s],!(r=V.isString(n)?Oi[n.toLowerCase()]:n));s++);if(!r)throw r===!1?new Ae(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(V.hasOwnProp(Oi,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!V.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Oi};function Fa(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ai(null,t)}function su(t){return Fa(t),t.headers=rn.from(t.headers),t.data=ka.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),s2.getAdapter(t.adapter||ps.adapter)(t).then(function(r){return Fa(t),r.data=ka.call(t,t.transformResponse,r),r.headers=rn.from(r.headers),r},function(r){return P0(r)||(Fa(t),r&&r.response&&(r.response.data=ka.call(t,t.transformResponse,r.response),r.response.headers=rn.from(r.response.headers))),Promise.reject(r)})}const iu=t=>t instanceof rn?t.toJSON():t;function ss(t,e){e=e||{};const n={};function r(f,m,p){return V.isPlainObject(f)&&V.isPlainObject(m)?V.merge.call({caseless:p},f,m):V.isPlainObject(m)?V.merge({},m):V.isArray(m)?m.slice():m}function s(f,m,p){if(V.isUndefined(m)){if(!V.isUndefined(f))return r(void 0,f,p)}else return r(f,m,p)}function i(f,m){if(!V.isUndefined(m))return r(void 0,m)}function o(f,m){if(V.isUndefined(m)){if(!V.isUndefined(f))return r(void 0,f)}else return r(void 0,m)}function a(f,m,p){if(p in e)return r(f,m);if(p in t)return r(void 0,f)}const l={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:(f,m)=>s(iu(f),iu(m),!0)};return V.forEach(Object.keys(Object.assign({},t,e)),function(m){const p=l[m]||s,C=p(t[m],e[m],m);V.isUndefined(C)&&p!==a||(n[m]=C)}),n}const O0="1.4.0",ul={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{ul[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const ou={};ul.transitional=function(e,n,r){function s(i,o){return"[Axios v"+O0+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(e===!1)throw new Ae(s(o," has been removed"+(n?" in "+n:"")),Ae.ERR_DEPRECATED);return n&&!ou[o]&&(ou[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,o,a):!0}};function i2(t,e,n){if(typeof t!="object")throw new Ae("options must be an object",Ae.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const i=r[s],o=e[i];if(o){const a=t[i],l=a===void 0||o(a,i,t);if(l!==!0)throw new Ae("option "+i+" must be "+l,Ae.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ae("Unknown option "+i,Ae.ERR_BAD_OPTION)}}const yc={assertOptions:i2,validators:ul},Jn=yc.validators;let Br=class{constructor(e){this.defaults=e,this.interceptors={request:new tu,response:new tu}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=ss(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&yc.assertOptions(r,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean)},!1),s!=null&&(V.isFunction(s)?n.paramsSerializer={serialize:s}:yc.assertOptions(s,{encode:Jn.function,serialize:Jn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o;o=i&&V.merge(i.common,i[n.method]),o&&V.forEach(["delete","get","head","post","put","patch","common"],F=>{delete i[F]}),n.headers=rn.concat(o,i);const a=[];let l=!0;this.interceptors.request.forEach(function(I){typeof I.runWhen=="function"&&I.runWhen(n)===!1||(l=l&&I.synchronous,a.unshift(I.fulfilled,I.rejected))});const f=[];this.interceptors.response.forEach(function(I){f.push(I.fulfilled,I.rejected)});let m,p=0,C;if(!l){const F=[su.bind(this),void 0];for(F.unshift.apply(F,a),F.push.apply(F,f),C=F.length,m=Promise.resolve(n);p<C;)m=m.then(F[p++],F[p++]);return m}C=a.length;let w=n;for(p=0;p<C;){const F=a[p++],I=a[p++];try{w=F(w)}catch(x){I.call(this,x);break}}try{m=su.call(this,w)}catch(F){return Promise.reject(F)}for(p=0,C=f.length;p<C;)m=m.then(f[p++],f[p++]);return m}getUri(e){e=ss(this.defaults,e);const n=L0(e.baseURL,e.url);return M0(n,e.params,e.paramsSerializer)}};V.forEach(["delete","get","head","options"],function(e){Br.prototype[e]=function(n,r){return this.request(ss(r||{},{method:e,url:n,data:(r||{}).data}))}});V.forEach(["post","put","patch"],function(e){function n(r){return function(i,o,a){return this.request(ss(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Br.prototype[e]=n(),Br.prototype[e+"Form"]=n(!0)});let o2=class N0{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=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 ai(i,o,a),n(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 n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new N0(function(s){e=s}),cancel:e}}};function a2(t){return function(n){return t.apply(null,n)}}function c2(t){return V.isObject(t)&&t.isAxiosError===!0}const gc={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(gc).forEach(([t,e])=>{gc[e]=t});function z0(t){const e=new Br(t),n=B0(Br.prototype.request,e);return V.extend(n,Br.prototype,e,{allOwnKeys:!0}),V.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return z0(ss(t,s))},n}const Be=z0(ps);Be.Axios=Br;Be.CanceledError=ai;Be.CancelToken=o2;Be.isCancel=P0;Be.VERSION=O0;Be.toFormData=Io;Be.AxiosError=Ae;Be.Cancel=Be.CanceledError;Be.all=function(e){return Promise.all(e)};Be.spread=a2;Be.isAxiosError=c2;Be.mergeConfig=ss;Be.AxiosHeaders=rn;Be.formToJSON=t=>W0(V.isHTMLForm(t)?new FormData(t):t);Be.HttpStatusCode=gc;Be.default=Be;const{Axios:kw,AxiosError:Fw,CanceledError:Tw,isCancel:Iw,CancelToken:Uw,VERSION:_w,all:Mw,Cancel:Rw,isAxiosError:Ww,spread:Pw,toFormData:Lw,AxiosHeaders:Ow,HttpStatusCode:Nw,formToJSON:zw,mergeConfig:Hw}=Be,Cn=60*1e3,H0={Mainnet:{api:"https://api.wormholescan.io",circleAPI:wd("Mainnet"),executorAPI:Sd("Mainnet"),chains:Ca("Mainnet")},Testnet:{api:"https://api.testnet.wormholescan.io",circleAPI:wd("Testnet"),executorAPI:Sd("Testnet"),chains:Ca("Testnet")},Devnet:{api:"http://guardian:7071",circleAPI:"",executorAPI:"",chains:Ca("Devnet")}};function q0(t,e){return Object.fromEntries(Object.entries(H0[t].chains).filter(([n,r])=>r.platform==e))}function l2(t,e){let n=H0[t];return e?fl(n,e):n}function d2(t,e,n){const r=q0(t,e);return n?fl(r,n):r}function fl(t,e){t||(t={});for(const[n,r]of Object.entries(e))typeof r=="object"&&!Array.isArray(r)?t[n]=fl(t[n],r):t[n]=r;return t}const u2=typeof Ne.process<"u";u2&&Ne.process.env.NETWORK;async function Rr(t,e,n=Cn,r){const s=Math.floor(n/e);let i=0;return new Promise((o,a)=>{t().then(l=>{if(l!==null){o(l);return}let f=setInterval(async()=>{if(i>=s){clearInterval(f),o(null);return}const m=await t();m!==null?(clearInterval(f),o(m)):r&&console.log(`Retrying ${r}, attempt ${i}/${s} `),i++},e)})})}const f2=2e3;var au;(function(t){t.complete="complete",t.pending_confirmations="pending_confirmations"})(au||(au={}));const h2=t=>({message:t.attestation,status:t.status});async function m2(t,e){var r;const n=`${t}/${e}`;try{const s=await Be.get(n),i=h2(s==null?void 0:s.data);return i.message==="PENDING"?null:i.message}catch(s){if(!s||typeof s=="object"&&(Be.isAxiosError(s)&&((r=s.response)==null?void 0:r.status)===404||"status"in s&&s.status===404))return null;throw s}}async function b2(t,e,n){return Rr(()=>m2(t,e),f2,n,"Circle:GetAttestation")}async function $s(t,e,n){if(!Zp(n))throw new Error("Invalid signer, not SignAndSendSigner or SignOnlySigner");return(await p2(e,async i=>cl(n)?n.signAndSend(i):t.sendWait(await n.sign(i)))).map(i=>({chain:t.chain,txid:i}))}async function p2(t,e){const n=[];let r=[];for await(const s of t)s.parallelizable?r.push(s):(r.length>0&&(n.push(...await e(r)),r=[]),n.push(...await e([s])));return r.length>0&&n.push(...await e(r)),n}class y2 extends Error{constructor(n){super(`Minimum transfer amount is ${bo(n)}`);ie(this,"min");this.min=n}minAmount(){return this.min}}class g2 extends Error{constructor(n){super("Unable to fetch a quote");ie(this,"internalError");this.internalError=n}}class hl extends Error{constructor(e){super(e)}}exports.TransferState=void 0;(function(t){t[t.Failed=-1]="Failed",t[t.Created=0]="Created",t[t.SourceInitiated=1]="SourceInitiated",t[t.SourceFinalized=2]="SourceFinalized",t[t.InReview=3]="InReview",t[t.Attested=4]="Attested",t[t.Refunded=5]="Refunded",t[t.DestinationInitiated=6]="DestinationInitiated",t[t.DestinationQueued=7]="DestinationQueued",t[t.DestinationFinalized=8]="DestinationFinalized"})(exports.TransferState||(exports.TransferState={}));function ml(t){return t.state===exports.TransferState.SourceInitiated}function js(t){return t.state===exports.TransferState.SourceFinalized}function cu(t){return t.state===exports.TransferState.InReview}function Jr(t){return t.state===exports.TransferState.Attested}function w2(t){return t.state===exports.TransferState.Refunded}function bl(t){return t.state===exports.TransferState.DestinationInitiated}function E2(t){return t.state===exports.TransferState.DestinationQueued}function A2(t){return t.state===exports.TransferState.DestinationFinalized}function K0(t){return t.state<0}function lu(t){return K0(t)&&t.error instanceof hl}class Bt{constructor(e,n,r,s){ie(this,"wh");ie(this,"fromChain");ie(this,"toChain");ie(this,"_state");ie(this,"transfer");ie(this,"txids",[]);ie(this,"attestations");this._state=exports.TransferState.Created,this.wh=e,this.transfer=n,this.fromChain=r??e.getChain(n.from.chain),this.toChain=s??e.getChain(n.to.chain)}getTransferState(){return this._state}static async from(e,n,r=Cn,s,i){if(ry(n))return n={...n,...await Bt.destinationOverrides(e.getChain(n.from.chain),e.getChain(n.to.chain),n)},new Bt(e,n,s,i);let o;if(Ar(n))o=await Bt.fromWormholeMessageId(e,n,r);else if(u0(n))o=await Bt.fromTransaction(e,n,r,s);else if(Ji(n))o=await Bt.fromCircleMessage(e,n);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,n,r){const{chain:s,emitter:i}=n,o=await Bt.getTransferVaa(e,n),a=o.payload.mintRecipient,l=_i(e.network,o.payload.targetDomain),{wormholeRelayer:f}=e.config.chains[l].contracts.cctp;let m=!1;if(f){const w=sn.chainAddress(s,f).address.toUniversalAddress();m=o.payloadName==="TransferWithRelay"&&a.equals(w)}const p={from:{chain:n.chain,address:o.payload.caller},to:{chain:l,address:a},amount:o.payload.token.amount,automatic:m},C=new Bt(e,p);return C.attestations=[{id:{emitter:i,sequence:o.sequence,chain:s},attestation:o}],C._state=exports.TransferState.Attested,C}static async fromCircleMessage(e,n){const[r,s]=exports.CircleBridge.deserialize(At.decode(n)),{payload:i}=r,o=i.messageSender,a=i.mintRecipient,l=_i(e.network,r.sourceDomain),f=_i(e.network,r.destinationDomain),m={from:{chain:l,address:o},to:{chain:f,address:a},amount:i.amount,automatic:!1},p=new Bt(e,m);return p.attestations=[{id:{hash:s},attestation:{message:r}}],p._state=exports.TransferState.SourceInitiated,p}static async fromTransaction(e,n,r,s){const{chain:i,txid:o}=n;s=s??e.getChain(i);let a=[];try{a=await s.parseTransaction(o)}catch(f){if(!(f.message.includes("no bridge messages found")||f.message.includes("not found")))throw f}let l;if(a.length>0)l=await Bt.fromWormholeMessageId(e,a[0],r);else{const m=await(await s.getCircleBridge()).parseTransactionDetails(o),p={...m,automatic:!1};l=new Bt(e,p),l.attestations=[{id:m.id,attestation:{message:m.message}}]}return l._state=exports.TransferState.SourceInitiated,l.txids=[n],l}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:n})=>n)}async _fetchWormholeAttestation(e){let n=this.attestations??[];if(!n||n.length==0)throw new Error("No VAA details available");for(const r in n)n[r].attestation||(n[r].attestation=await Bt.getTransferVaa(this.wh,n[r].id,e));return this.attestations=n,n.map(r=>r.id)}async _fetchCircleAttestation(e){var r,s;let n=this.attestations??[];if(!n||n.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],l=await(await this.wh.getChain(this.transfer.from.chain).getCircleBridge()).parseTransactionDetails(i.txid);n=[{id:l.id,attestation:{message:l.message}}]}for(const i in n){const o=n[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");n[i].attestation.attestation=a}return this.attestations=n,n.map(i=>i.id)}async fetchAttestation(e){if(this._state<exports.TransferState.SourceInitiated)throw new Error("Invalid state transition in `fetchAttestation`");const n=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 n}async completeTransfer(e){var p;if(this._state<exports.TransferState.Attested)throw new Error("Invalid state transition in `finish`");if(this.transfer.automatic)throw this.attestations?this.attestations.find(w=>Ar(w.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 n=this.attestations.filter(C=>Ji(C.id));if(n.length>1)throw new Error(`Expected a single circle attestation, found ${n.length}`);const{id:r,attestation:s}=n[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(),l=sn.parseAddress(e.chain(),e.address()),f=a.redeem(l,i,o),m=await $s(this.toChain,f,e);return(p=this.txids)==null||p.push(...m),m.map(({txid:C})=>C)}}(function(t){async function e(f,m,p){let C;return m.automatic?C=(await f.getAutomaticCircleBridge()).transfer(m.from.address,{chain:m.to.chain,address:m.to.address},m.amount,m.nativeGas):C=(await f.getCircleBridge()).transfer(m.from.address,{chain:m.to.chain,address:m.to.address},m.amount),await $s(f,C,p)}t.transfer=e;async function*n(f,m,p=Cn,C,w){var x,E;const F=Date.now(),I=(_,k)=>Math.max(k-(Date.now()-_),0);if(C=C??f.getChain(m.from),w=w??f.getChain(m.to),ml(m)){if(m.originTxs.length===0)throw"Invalid state transition: no originating transactions";const _=m.originTxs[m.originTxs.length-1],k=await t.getTransferMessage(C,_.txid);m={...m,attestation:{id:k.id,attestation:{message:k.message}},state:exports.TransferState.SourceFinalized},yield m}if(js(m)){if(!m.attestation)throw"Invalid state transition: no attestation id";if(Ar(m.attestation.id)){let _=m.attestation.attestation?m.attestation.attestation:void 0;_||(_=await t.getTransferVaa(f,m.attestation.id,I(F,p)),m={...m,attestation:{id:m.attestation.id,attestation:_},state:exports.TransferState.Attested},yield m)}else if(Ji(m.attestation.id)){const _=await f.getCircleAttestation(m.attestation.id.hash,p),k=m.originTxs[m.originTxs.length-1],M=await(await C.getCircleBridge()).parseTransactionDetails(k.txid);_&&(m={...m,attestation:{id:m.attestation.id,attestation:{attestation:_,message:M.message}},state:exports.TransferState.Attested},yield m)}}if(Jr(m)||js(m)){if(!m.attestation)throw"Invalid state transition";if(Ar(m.attestation.id)){const _=await f.getTransactionStatus(m.attestation.id,I(F,p));if(_&&((E=(x=_.globalTx)==null?void 0:x.destinationTx)!=null&&E.txHash)){const{chainId:k,txHash:P}=_.globalTx.destinationTx;m={...m,destinationTxs:[{chain:us(k),txid:P}],state:exports.TransferState.DestinationInitiated},yield m}}}(Jr(m)||bl(m))&&(await t.isTransferComplete(w,m.attestation.attestation)&&(m={...m,state:exports.TransferState.DestinationFinalized,destinationTxs:[]}),yield m)}t.track=n;async function r(f,m,p){const C={...p};if(hn(m.chain)==="Solana"&&!C.automatic){const w=sn.parseAddress(m.chain,_s.get(m.network,m.chain));C.to=await m.getTokenAccount(C.to.address,w)}return C}t.destinationOverrides=r;async function s(f,m,p){if(!Os(m.network,m.chain))throw new Error(`Invalid destination chain ${m.chain} for Circle transfer`);const C=_s.get(m.network,m.chain);if(!C)throw"Invalid transfer, no USDC contract on destination";if(!Os(f.network,f.chain))throw new Error(`Invalid source chain ${f.chain} for Circle transfer`);const w=_s.get(f.network,f.chain);if(!w)throw"Invalid transfer, no USDC contract on source";const F=sn.chainAddress(m.chain,C),I=sn.chainAddress(f.chain,w),x=(f.chain==="Polygon"?2e3*200:Lc(f.chain))+zc,E=p.automatic?Ls(0,5,0):Ls(24,0,0);if(!p.automatic)return{sourceToken:{token:I,amount:p.amount},destinationToken:{token:F,amount:p.amount},eta:x,expires:E};let _=p.amount;const k=p.nativeGas?p.nativeGas:0n;_-=k;const M=await(await f.getAutomaticCircleBridge()).getRelayerFee(m.chain);_-=M;let $=0n;return p.nativeGas&&($=await(await m.getAutomaticCircleBridge()).nativeTokenAmount(k)),{sourceToken:{token:I,amount:p.amount},destinationToken:{token:F,amount:_},relayFee:{token:I,amount:M},destinationNativeGas:$,eta:x,expires:E}}t.quoteTransfer=s;async function i(f,m){if(!exports.CircleBridge.isCircleAttestation(m))throw new Error("Must check for completion with circle message");return await(await f.getCircleBridge()).isTransferCompleted(m.message)}t.isTransferComplete=i;async function o(f,m,p){const C=await f.getVaa(m,"AutomaticCircleBridge:TransferWithRelay",p);if(!C)throw new Error("No VAA available after timeout exhausted");return C}t.getTransferVaa=o;async function a(f,m){return await(await f.getCircleBridge()).parseTransactionDetails(m)}t.getTransferMessage=a;function l(f){var _,k;const{from:m,to:p}=f.transfer;let C={from:m.chain,to:p.chain,state:exports.TransferState.Created};const w=f.txids.filter(P=>P.chain===f.transfer.from.chain);w.length>0&&(C={...C,state:exports.TransferState.SourceInitiated,originTxs:w});const F=((_=f.attestations)==null?void 0:_.filter(P=>Ar(P.id)))??[],I=((k=f.attestations)==null?void 0:k.filter(P=>Ji(P.id)))??[],x=I.length>0?I[0]:F.length>0?F[0]:void 0;x&&x.id&&(C={...C,state:exports.TransferState.SourceFinalized,attestation:x},x.attestation&&(C={...C,state:exports.TransferState.Attested,attestation:{id:x.id,attestation:x.attestation}}));const E=f.txids.filter(P=>P.chain===f.transfer.to.chain);return E.length>0&&(C={...C,state:exports.TransferState.DestinationInitiated,destinationTxs:E}),C}t.getReceipt=l})(Bt||(Bt={}));const Uo=2e3;async function $0(t,e){var l;const{chain:n,emitter:r,sequence:s}=e,i=fn(n),o=Qu("0x",r.toString()),a=`${t}/v1/signed_vaa/${i}/${o}/${s}`;try{const{data:{vaaBytes:f}}=await Be.get(a);return go.decode(f)}catch(f){if(!f||typeof f=="object"&&(Be.isAxiosError(f)&&((l=f.response)==null?void 0:l.status)===404||"status"in f&&f.status===404))return null;throw f}}async function B2(t,e,n){return await Rr(()=>$0(t,e),Uo,n,"Wormholescan:GetVaaBytes")}async function x2(t,e,n){const r=await $0(t,e);return r?Zr(n,r):null}async function C2(t,e,n,r){return await Rr(()=>x2(t,e,n),Uo,r,"Wormholescan:GetVaaBytes")}async function S2(t,e){var l;const{chain:n,emitter:r,sequence:s}=e,i=fn(n),o=r.toUniversalAddress().toString(),a=`${t}/api/v1/transactions/${i}/${o}/${s}`;try{return(await Be.get(a)).data}catch(f){if(!f||typeof f=="object"&&(Be.isAxiosError(f)&&((l=f.response)==null?void 0:l.status)===404||"status"in f&&f.status===404))return null;throw f}}async function D2(t,e,n){return await Rr(()=>S2(t,e),Uo,n,"Wormholescan:GetTransactionStatus")}async function v2(t,e){var r;const n=`${t}/api/v1/vaas?txHash=${e}`;try{const s=await Be.get(n);if(s.data.data.length>0)return s.data.data[0]}catch(s){if(!s||typeof s=="object"&&(Be.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 du(t,e,n,r){const i=await Rr(()=>v2(t,e),Uo,r,"Wormholescan:GetVaaByTxHash");return i?Zr(n,go.decode(i.vaa)):null}async function k2(t,e,n=50,r=0){var i;const s=`${t}/api/v1/transactions?address=${e}&pageSize=${n}&page=${r}`;try{const o=await Be.get(s);if(o.data.transactions.length>0)return o.data.transactions}catch(o){if(!o||typeof o=="object"&&(Be.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 F2(t){const e=`${t}/v1/governor/token_list`;try{const n=await Be.get(e);if(n.data&&n.data.entries.length>0)return n.data.entries.reduce((r,s)=>{const i=us(s.originChainId);return r[i]=r[i]||{},r[i][s.originAddress]=s.price,r},{})}catch{}return null}async function T2(t){const e=`${t}/v1/governor/available_notional_by_chain`;try{const n=await Be.get(e);if(n.data&&n.data.entries.length>0)return n.data.entries.reduce((r,s)=>{const i=s.bigTransactionSize==="0"?void 0:Is(Ti(s.bigTransactionSize,2));return r[us(s.chainId)]={available:Is(Ti(s.remainingAvailableNotional,2)),limit:Is(Ti(s.notionalLimit,2)),maxSize:i},r},{})}catch{}return null}async function I2(t,e){const{chain:n,emitter:r,sequence:s}=e,i=fn(n),o=r.toUniversalAddress().toString(),a=`${t}/v1/governor/is_vaa_enqueued/${i}/${o}/${s}`;return(await Be.get(a)).data.isEnqueued}class Ye{constructor(e,n,r,s){ie(this,"wh");ie(this,"fromChain");ie(this,"toChain");ie(this,"_state");ie(this,"transfer");ie(this,"txids",[]);ie(this,"attestations");this._state=exports.TransferState.Created,this.wh=e,this.transfer=n,this.fromChain=r??e.getChain(n.from.chain),this.toChain=s??e.getChain(n.to.chain)}getTransferState(){return this._state}static async from(e,n,r=6e3,s,i){if(hy(n))return s=s??e.getChain(n.from.chain),i=i??e.getChain(n.to.chain),Ye.validateTransferDetails(e,n,s,i),n=await Ye.destinationOverrides(s,i,n),new Ye(e,n,s,i);let o;if(Ar(n))o=await Ye.fromIdentifier(e,n,r);else if(u0(n))o=await Ye.fromTransaction(e,n,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,n,r){const s=await Ye.getTransferVaa(e,n,r);if(!s)throw new Error("VAA not found");const i=s.protocolName;let o={chain:s.emitterChain,address:s.emitterAddress},{token:a,to:l}=s.payload,f;if(a.chain===o.chain)f=await e.getTokenNativeAddress(o.chain,a.chain,a.address);else{const x=await(await(await e.getChain(o.chain)).getTokenBridge()).getWrappedAsset(a);f=or(o.chain,x.toString())}const m=await e.getDecimals(o.chain,f),p=Kr(zn(a.amount,Math.min(m,Ye.MAX_DECIMALS)),m);(i==="AutomaticTokenBridge"||i==="ExecutorTokenBridge")&&(o={chain:s.emitterChain,address:s.payload.from},l={chain:s.payload.to.chain,address:s.payload.payload.targetRecipient});const C={token:a,amount:kt(p),from:o,to:l,protocol:i,nativeGas:i==="AutomaticTokenBridge"?s.payload.payload.toNativeTokenAmount:0n},w=new Ye(e,C);return w.attestations=[{id:n,attestation:s}],w._state=exports.TransferState.Attested,w}static async fromTransaction(e,n,r,s){s=s??e.getChain(n.chain);const i=await Ye.getTransferMessage(s,n.txid,r),o=await Ye.fromIdentifier(e,i,r);return o.txids=[n],o}async initiateTransfer(e){if(this._state!==exports.TransferState.Created)throw new Error("Invalid state transition in `initiateTransfer`");return this.txids=await Ye.transfer(this.fromChain,this.transfer,e),this._state=exports.TransferState.SourceInitiated,this.txids.map(({txid:n})=>n)}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 n=this.txids[this.txids.length-1],r=await Ye.getTransferMessage(this.fromChain,n.txid,e);this.attestations=[{id:r}]}for(const n in this.attestations){if(this.attestations[n].attestation)continue;const r=await Ye.getTransferVaa(this.wh,this.attestations[n].id,e);if(!r)throw new Error("VAA not found");this.attestations[n].attestation=r}if(this._state=exports.TransferState.Attested,this.attestations.length>0){const{attestation:n}=this.attestations[0];await Ye.isTransferComplete(this.toChain,n)&&(this._state=exports.TransferState.DestinationFinalized)}return this.attestations.map(n=>n.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:n}=this.attestations[0];if(!n)throw new Error(`No VAA found for ${this.attestations[0].id.sequence}`);const r=await Ye.redeem(this.toChain,n,e);return this.txids.push(...r),this._state=exports.TransferState.DestinationInitiated,r.map(({txid:s})=>s)}}(function(t){t.MAX_DECIMALS=8;async function e(x,E,_){const k=or(_.chain(),_.address()),P=vo(E.token)?E.token.address:E.token;let M;if(E.protocol==="AutomaticTokenBridge")M=(await x.getAutomaticTokenBridge()).transfer(k,E.to,P,E.amount,E.nativeGas);else if(E.protocol==="TokenBridge")M=(await x.getTokenBridge()).transfer(k,E.to,P,E.amount,E.payload);else if(E.protocol==="ExecutorTokenBridge"){if(!E.executorQuote)throw new Error("ExecutorTokenBridge transfer requires an executorQuote");const $=E.executorQuote.relayInstructions.requests.find(Y=>Y.request.type==="GasDropOffInstruction");$&&$.request.type==="GasDropOffInstruction"&&$.request.recipient.equals(St.ZERO)&&($.request.recipient=E.to.address.toUniversalAddress()),M=(await x.getExecutorTokenBridge()).transfer(k,E.to,P,E.amount,E.executorQuote,E.referrerFee)}else throw new Error("Unknown token transfer protocol");return $s(x,M,_)}t.transfer=e;async function n(x,E,_){const k=or(_.chain(),_.address()),P=E.protocolName==="AutomaticTokenBridge"?(await x.getAutomaticTokenBridge()).redeem(k,E):E.protocolName==="ExecutorTokenBridge"?(await x.getExecutorTokenBridge()).redeem(k,E):(await x.getTokenBridge()).redeem(k,E);return $s(x,P,_)}t.redeem=n;async function*r(x,E,_=Cn,k,P){var G,Y,L,j;const M=Date.now(),$=(O,q)=>Math.max(q-(Date.now()-O),0);if(k=k??x.getChain(E.from),ml(E)){if(E.originTxs.length===0)throw"Origin transactions required to fetch message id";const{txid:O}=E.originTxs[E.originTxs.length-1],q=await t.getTransferMessage(k,O,$(M,_));E={...E,state:exports.TransferState.SourceFinalized,attestation:{id:q}},yield E}if(js(E)||cu(E)){if(!E.attestation.id)throw"Attestation id required to fetch attestation";const{id:O}=E.attestation,q=await t.getTransferVaa(x,O,$(M,_));throw q?(E={...E,attestation:{id:O,attestation:q},state:exports.TransferState.Attested},yield E):await t.isTransferEnqueued(x,O)&&(E={...E,state:exports.TransferState.InReview},yield E),new Error("Attestation not found")}if(Jr(E)||js(E)||cu(E)||lu(E)){if(!((G=E.attestation)!=null&&G.id))throw"Attestation id required to fetch redeem tx";const{id:O}=E.attestation,q=await x.getTransactionStatus(O,$(M,_));if(q&&((L=(Y=q.globalTx)==null?void 0:Y.destinationTx)!=null&&L.txHash)){const{chainId:B,txHash:c}=q.globalTx.destinationTx;E={...E,destinationTxs:[{chain:us(B),txid:c}],state:exports.TransferState.DestinationInitiated,attestation:E.attestation}}yield E}if(Jr(E)||bl(E)||lu(E)){if(!((j=E.attestation)!=null&&j.attestation))throw"Signed Attestation required to check for redeem";if(E.attestation.attestation.payloadName==="AttestMeta")throw new Error("Unable to track an AttestMeta receipt");await t.isTransferComplete(P??x.getChain(E.attestation.attestation.payload.to.chain),E.attestation.attestation)&&(E={...E,state:exports.TransferState.DestinationFinalized,attestation:E.attestation}),yield E}if(Jr(E)&&E.attestation.attestation.protocolName==="ExecutorTokenBridge"){const[O]=await x.getExecutorTxStatus(E.originTxs.at(-1).txid,E.from);if(!O)throw new Error("No transaction status found");const q=O.status;(q===jr.Failed||q===jr.Underpaid||q===jr.Unsupported||q===jr.Aborted)&&(E={...E,state:exports.TransferState.Failed,error:new hl(`Relay failed with status: ${q}`)},yield E)}yield E}t.track=r;function s(x){const{transfer:E}=x,_=E.from.chain,k=E.to.chain;let P={from:_,to:k,state:exports.TransferState.Created};const M=x.txids.filter(L=>L.chain===E.from.chain);M.length>0&&(P={...P,state:exports.TransferState.SourceInitiated,originTxs:M});const $=x.attestations&&x.attestations.length>0?x.attestations[0]:void 0,G=$&&$.id?{id:$.id,attestation:$.attestation}:void 0;G&&G.id&&(P={...P,state:exports.TransferState.SourceFinalized,attestation:{id:G.id}},G.attestation&&(P={...P,state:exports.TransferState.Attested,attestation:{id:G.id,attestation:G.attestation}}));const Y=x.txids.filter(L=>L.chain===E.to.chain);return Y.length>0&&(P={...P,state:exports.TransferState.DestinationFinalized,destinationTxs:Y}),P}t.getReceipt=s;async function i(x,E,_){let k;const P=await x.getTokenBridge();if(Pt(_.address)){const G=await P.getWrappedNative();k={chain:_.chain,address:await P.getTokenUniversalAddress(G)}}else try{let G;St.instanceof(_.address)?G=await P.getWrappedAsset(_):G=_.address,k=await P.getOriginalAsset(G)}catch(G){if(!G.message.includes("not a wrapped asset"))throw G;let Y;St.instanceof(_.address)?Y=await P.getTokenNativeAddress(x.chain,_.address):Y=_.address,k={chain:_.chain,address:await P.getTokenUniversalAddress(Y)}}const M=await E.getTokenBridge();if(k.chain===E.chain){const G=await M.getTokenNativeAddress(k.chain,k.address),Y=await M.getWrappedNative();return In({chain:E.chain,address:Y})===In({chain:E.chain,address:G})?{chain:E.chain,address:"native"}:{chain:E.chain,address:G}}const $=await M.getWrappedAsset(k);return{chain:E.chain,address:$}}t.lookupDestinationToken=i;async function o(x,E){return(E.protocolName==="AutomaticTokenBridge"||E.protocolName==="ExecutorTokenBridge")&&(E=Zr("TokenBridge:TransferWithPayload",Wi(E))),(await x.getTokenBridge()).isTransferCompleted(E)}t.isTransferComplete=o;async function a(x,E,_){const k=await sn.parseMessageFromTx(x,E,_);if(k.length!==1)throw new Error("Expected a single Wormhole Message, got: "+k.length);return k[0]}t.getTransferMessage=a;async function l(x,E,_){const k=await x.getVaa(E,hc.getTransferDiscriminator(),_);if(!k)return null;if(k.payloadName==="TransferWithPayload"){const{chain:P,address:M}=k.payload.to,{tokenBridgeRelayer:$}=x.config.chains[P].contracts,G=$?n0(P,$):null;if(G&&M.equals(G))return Zr("AutomaticTokenBridge:TransferWithRelay",Wi(k));try{return Zr("ExecutorTokenBridge:TransferWithExecutorRelay",Wi(k))}catch{}}return k}t.getTransferVaa=l;async function f(x,E){return await x.getIsVaaEnqueued(E)}t.isTransferEnqueued=f;function m(x,E,_,k){if(E.amount===0n)throw new Error("Amount cannot be 0");if(E.from.chain===E.to.chain)throw new Error("Cannot transfer to the same chain");if(_=_??x.getChain(E.from.chain),k=k??x.getChain(E.to.chain),E.protocol==="AutomaticTokenBridge"){if(!_.supportsAutomaticTokenBridge())throw new Error(`Automatic Token Bridge not supported on ${E.from.chain}`);if(!k.supportsAutomaticTokenBridge())throw new Error(`Automatic Token Bridge not supported on ${E.to.chain}`);const P=E.nativeGas??0n;if(P>E.amount)throw new Error(`Native gas amount > amount (${P} > ${E.amount})`)}else if(E.protocol==="TokenBridge"){if(!_.supportsTokenBridge())throw new Error(`Token Bridge not supported on ${E.from.chain}`);if(!k.supportsTokenBridge())throw new Error(`Token Bridge not supported on ${E.to.chain}`)}else if(E.protocol==="ExecutorTokenBridge"){if(!_.supportsExecutorTokenBridge())throw new Error(`Token Bridge Executor not supported on ${E.from.chain}`);if(!k.supportsExecutorTokenBridge())throw new Error(`Token Bridge Executor not supported on ${E.to.chain}`)}else throw new Error("Unknown token transfer protocol")}t.validateTransferDetails=m;async function p(x,E,_,k){const P=await E.getTokenBridge();let M;if(Pt(k.token.address))M=await P.getWrappedNative();else if(St.instanceof(k.token.address))try{M=await P.getWrappedAsset(k.token)}catch(Z){if(!Z.message.includes("not a wrapped asset"))throw Z;M=await P.getTokenNativeAddress(E.chain,k.token.address)}else M=k.token.address;sn.tokenId(E.chain,M.toString());const $=await E.getDecimals(M),G=zn(k.amount,$),Y=Ii(G,t.MAX_DECIMALS),[L,j]=await Promise.all([F2(x.config.api),T2(x.config.api)]),O=[];if(j!==null&&E.chain in j&&L!==null){let Z;if(Pt(k.token.address))Z={chain:E.chain,address:await P.getTokenUniversalAddress(M)};else try{Z=await P.getOriginalAsset(k.token.address)}catch(ee){if(!ee.message.includes("not a wrapped asset"))throw ee;Z={chain:E.chain,address:await P.getTokenUniversalAddress(M)}}if(Z.chain in L&&Z.address.toString()in L[Z.chain]){const ee=j[E.chain],le=L[Z.chain][Z.address.toString()]*Is(Y);ee.maxSize&&le>ee.maxSize&&O.push({type:"GovernorLimitWarning",reason:"ExceedsLargeTransferLimit"}),le>ee.available&&O.push({type:"GovernorLimitWarning",reason:"ExceedsRemainingNotional"})}}const q=await t.lookupDestinationToken(E,_,k.token),B=await _.getDecimals(q.address),c=Kr(Y,B),b=Lc(E.chain)+zc,y={sourceToken:{token:k.token,amount:kt(Y)},destinationToken:{token:q,amount:kt(c)},warnings:O.length>0?O:void 0,eta:b};if(k.protocol==="TokenBridge")return{...y,expires:Ls(24,0,0)};if(k.protocol==="ExecutorTokenBridge"){const Z=await w(x,E,_,k.gasLimit,k.msgValue,k.nativeGas),ee=Z.relayInstructions.requests.find(be=>be.request.type==="GasDropOffInstruction"),ve=(ee==null?void 0:ee.request.type)==="GasDropOffInstruction"?ee.request.dropOff:void 0;let le;if(k.referrerFee&&k.referrerFee.feeDbps>0n){const{feeDbps:be,referrer:ln}=k.referrerFee,xe=t.calculateReferrerFee(Y,be),Re=kt(xe.fee),Jt=kt(xe.remaining);if(Jt<=0n)throw new Error("Remaining amount after referrer fee is <= 0");le={feeDbps:be,feeAmount:Re,remainingAmount:Jt,referrer:ln}}return{...y,destinationToken:{token:q,amount:le!=null&&le.remainingAmount?kt(Kr(zn(le.remainingAmount,$),B)):kt(c)},expires:Z.signedQuote.quote.expiryTime,relayFee:{token:al(E.chain),amount:Z.estimatedCost},destinationNativeGas:ve,details:{executorQuote:Z,referrerFee:le}}}if(k.protocol!=="AutomaticTokenBridge")throw new Error("Unknown token transfer protocol");const v=await(await E.getAutomaticTokenBridge()).getRelayerFee(_.chain,M),U=Kr(Ii(zn(v,$),t.MAX_DECIMALS),B),W=k.nativeGas??0n,A=kt(Kr(Ii(zn(W,$),t.MAX_DECIMALS),B)),h=890880n;let T=0n;if(k.nativeGas){const Z=await _.getAutomaticTokenBridge(),[ee,ve]=await Promise.all([Z.maxSwapAmount(q.address),Z.nativeTokenAmount(q.address,A)]);if(A>ee)throw new Error(`Native gas amount exceeds maximum swap amount: ${ud(A,B)}>${ud(ee,B)}`);if(hn(_.chain)==="Solana"&&ve<h)throw new Error(`Native gas amount must be at least ${h} lamports`);T=ve}const se=kt(c)-A-kt(U);if(hn(q.chain)==="Solana"){const Z=await _.getNativeWrappedTokenId();if((Pt(q.address)||l0(q,Z))&&se<h)throw new Error(`Destination amount must be at least ${h} lamports`)}return{sourceToken:{token:k.token,amount:kt(Y)},destinationToken:{token:q,amount:se},relayFee:{token:q,amount:kt(U)},destinationNativeGas:T,warnings:O.length>0?O:void 0,eta:b,expires:Ls(0,5,0)}}t.quoteTransfer=p;async function C(x,E){const k=(await x.getExecutorCapabilities())[fn(E.chain)];if(!k)throw new Error(`No executor capabilities found for destination chain ${E.chain}`);return BigInt(k.gasDropOffLimit)}t.getExecutorGasDropOffLimit=C;async function w(x,E,_,k,P,M){const $=await x.getExecutorCapabilities();if(!$[fn(E.chain)])throw new Error(`No executor capabilities found for source chain ${E.chain}`);const Y=$[fn(_.chain)];if(!Y||!Y.requestPrefixes.includes("ERV1"))throw new Error(`No executor capabilities found for destination chain ${_.chain}`);const L=M??0n;if(L>BigInt(Y.gasDropOffLimit))throw new Error(`Native gas amount ${L} exceeds limit ${BigInt(Y.gasDropOffLimit)} for destination chain ${_.chain}`);const j=[];j.push({request:{type:"GasInstruction",gasLimit:k,msgValue:P}}),L>0n&&j.push({request:{type:"GasDropOffInstruction",dropOff:L,recipient:St.ZERO}});const O={requests:j},q=bn(E0,O),B=await x.getExecutorQuote(E.chain,_.chain,At.encode(q,!0));if(!B.estimatedCost)throw new Error("No estimated cost");const c=BigInt(B.estimatedCost);return{signedQuote:pn(A0,At.decode(B.signedQuote)),estimatedCost:c,relayInstructions:O}}t.getExecutorQuote=w;async function F(x,E,_){const k={..._};if(hn(_.to.chain)==="Solana"&&k.protocol==="TokenBridge"){const P=await t.lookupDestinationToken(x,E,k.token);if(Pt(P.address)){const M=await E.getNativeWrappedTokenId();k.to=await E.getTokenAccount(k.to.address,M.address)}else k.to=await E.getTokenAccount(k.to.address,P.address)}if(k.to.chain==="Sei"&&k.protocol==="TokenBridge"){if(k.to.chain==="Sei"&&k.payload)throw new Error("Arbitrary payloads unsupported for Sei");k.payload=Lt.encode(JSON.stringify({basic_recipient:{recipient:go.encode(k.to.address.toString())}}));const P=E.config.contracts.translator;if(P===void 0||P==="")throw new Error("Unexpected empty translator address");k.to=sn.chainAddress(k.to.chain,P)}return k}t.destinationOverrides=F;function I(x,E){if(E>65535n)throw new Error("dBps exceeds max u16");const k=l1(x,E),P=kt(k),$=kt(x)-P;return{fee:k,remaining:zn($,x.decimals)}}t.calculateReferrerFee=I})(Ye||(Ye={}));function U2(t){if(t.length===0)return[];const{chain:e}=t[0];if(!t.every(n=>n.chain===e))throw new Error("Not every chain is equal");return Array.from(new Set(t.map(n=>In(n)))).map(n=>sn.tokenId(e,n))}async function _2(t,e,n){const r=In(e),s=t.config.tokenMap?fs.byAddress(t.config.tokenMap,r):void 0,i=s?s.symbol:void 0,o=Pt(e.address)?await t.getNativeWrappedTokenId():void 0;return n=n??await t.getDecimals(e.address),{id:e,decimals:n,wrapped:o,symbol:i}}class j0{constructor(e,n){ie(this,"wh");ie(this,"routeConstructors");ie(this,"inputTokenList");this.wh=e,this.routeConstructors=n}async supportedDestinationTokens(e,n,r){const[,s]=d0(n.network,n.chain,e),i=await Promise.all(this.routeConstructors.map(async o=>{if(!o.supportedNetworks().includes(n.network))return[];const l=o.supportedChains(n.network);if(!l.includes(n.chain)||!l.includes(r.chain))return[];try{return await o.supportedDestinationTokens(s,n,r)}catch{return[]}}));return U2(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=In(Pt(e.destination.id.address)?e.destination.wrapped:e.destination.id),o=(await r.supportedDestinationTokens(e.source.id,e.fromChain,e.toChain)).filter(a=>In(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,n,r){ie(this,"_network");ie(this,"_platforms");ie(this,"_chains");ie(this,"config");this._network=e,this.config=l2(e,r),this._chains=new Map,this._platforms=new Map;for(const s of n)this._platforms.set(s._platform,new s(e,this.config.chains))}get network(){return this._network}async circleTransfer(e,n,r,s,i,o){if(s&&i)throw new Error("Payload with automatic delivery is not supported");if(!Os(this.network,n.chain)||!Os(this.network,r.chain)||!Ad(this.network,n.chain)||!Ad(this.network,r.chain))throw new Error(`Network and chain not supported: ${this.network} ${n.chain} `);if(s){const f=await(await this.getChain(n.chain).getAutomaticCircleBridge()).getRelayerFee(r.chain)+(o||0n);if(e<f)throw new Error(`Amount must be > ${f} (relayerFee + nativeGas)`)}return await Bt.from(this,{amount:e,from:n,to:r,automatic:s,payload:i,nativeGas:o})}async tokenTransfer(e,n,r,s,i,o){switch(i){case"TokenBridge":return await Ye.from(this,{token:e,amount:n,from:r,to:s,protocol:i,payload:o});case"AutomaticTokenBridge":return await Ye.from(this,{token:e,amount:n,from:r,to:s,protocol:i,nativeGas:o});case"ExecutorTokenBridge":return await Ye.from(this,{token:e,amount:n,from:r,to:s,protocol:i});default:throw new Error(`Protocol ${i} is not supported`)}}resolver(e){return new j0(this,e)}getContracts(e){var n;return(n=this.config.chains[e])==null?void 0:n.contracts}getPlatform(e){const n=this._platforms.get(e);if(!n)throw new Error(`Not able to retrieve platform ${e}. Did it get registered in the constructor?`);return n}getChain(e){const n=hn(e);return this._chains.has(e)||this._chains.set(e,this.getPlatform(n).getChain(e)),this._chains.get(e)}async getWrappedAsset(e,n){const s=await this.getChain(e).getTokenBridge();return{chain:e,address:await s.getWrappedAsset(n)}}async getOriginalAsset(e){return await(await this.getChain(e.chain).getTokenBridge()).getOriginalAsset(e.address)}async getTokenUniversalAddress(e,n){return await(await this.getChain(e).getTokenBridge()).getTokenUniversalAddress(n)}async getTokenNativeAddress(e,n,r){return await(await this.getChain(e).getTokenBridge()).getTokenNativeAddress(n,r)}async getDecimals(e,n){return await this.getChain(e).getDecimals(n)}async getBalance(e,n,r){return this.getChain(e).getBalance(r,n)}async getTokenAccount(e,n){return this.getChain(e.chain).getTokenAccount(e.address,n.address)}async getVaaBytes(e,n=Cn){return await B2(this.config.api,e,n)}async getVaa(e,n,r=Cn){return typeof e=="string"?await du(this.config.api,e,n,r):await C2(this.config.api,e,n,r)}async getIsVaaEnqueued(e){return await I2(this.config.api,e)}async getCircleAttestation(e,n=Cn){return b2(this.config.circleAPI,e,n)}async getTransactionStatus(e,n=Cn){let r;if(typeof e=="string"){const s=await du(this.config.api,e,"Uint8Array",n);if(!s)return null;r={emitter:s.emitterAddress,chain:s.emitterChain,sequence:s.sequence}}else r=e;return await D2(this.config.api,r,n)}async getExecutorCapabilities(){return await jy(this.config.executorAPI)}async getExecutorQuote(e,n,r){return await Vy(this.config.executorAPI,e,n,r)}async getExecutorTxStatus(e,n){return await Gy(this.config.executorAPI,e,n)}async getTransactionsForAddress(e,n=50,r=0){return k2(this.config.api,e,n,r)}static parseAddress(e,n){return or(e,n)}static canonicalAddress(e){return In(e)}static chainAddress(e,n){return{chain:e,address:sn.parseAddress(e,n)}}static tokenId(e,n){return Pt(n)?al(e):this.chainAddress(e,n)}static async parseMessageFromTx(e,n,r=Cn){const i=await Rr(async()=>{try{const o=await e.parseTransaction(n);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 ${n}`);return i}}class _o{constructor(e){ie(this,"wh");this.wh=e}transferUrl(e){return`https://wormholescan.io/#/tx/${e}?network=${this.wh.network}`}}class V0 extends _o{}ie(V0,"IS_AUTOMATIC",!0);function M2(t){return!!t.constructor.IS_AUTOMATIC}class wc extends _o{}ie(wc,"NATIVE_GAS_DROPOFF_SUPPORTED",!1),ie(wc,"IS_AUTOMATIC",!1);function R2(t){return t.complete!==void 0}class W2 extends _o{}function P2(t){return t.finalize!==void 0}var Ec={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(t,e){var n=ae,r=n.Buffer;function s(o,a){for(var l in o)a[l]=o[l]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(s(n,e),e.Buffer=i);function i(o,a,l){return r(o,a,l)}i.prototype=Object.create(r.prototype),s(r,i),i.from=function(o,a,l){if(typeof o=="number")throw new TypeError("Argument must not be a number");return r(o,a,l)},i.alloc=function(o,a,l){if(typeof o!="number")throw new TypeError("Argument must be a number");var f=r(o);return a!==void 0?typeof l=="string"?f.fill(a,l):f.fill(a):f.fill(0),f},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 n.SlowBuffer(o)}})(Ec,Ec.exports);var G0=Ec.exports,pl={exports:{}};pl.exports;(function(t){(function(e,n){function r(B,c){if(!B)throw new Error(c||"Assertion failed")}function s(B,c){B.super_=c;var b=function(){};b.prototype=c.prototype,B.prototype=new b,B.prototype.constructor=B}function i(B,c,b){if(i.isBN(B))return B;this.negative=0,this.words=null,this.length=0,this.red=null,B!==null&&((c==="le"||c==="be")&&(b=c,c=10),this._init(B||0,c||10,b||"be"))}typeof e=="object"?e.exports=i:n.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(c){return c instanceof i?!0:c!==null&&typeof c=="object"&&c.constructor.wordSize===i.wordSize&&Array.isArray(c.words)},i.max=function(c,b){return c.cmp(b)>0?c:b},i.min=function(c,b){return c.cmp(b)<0?c:b},i.prototype._init=function(c,b,y){if(typeof c=="number")return this._initNumber(c,b,y);if(typeof c=="object")return this._initArray(c,b,y);b==="hex"&&(b=16),r(b===(b|0)&&b>=2&&b<=36),c=c.toString().replace(/\s+/g,"");var S=0;c[0]==="-"&&(S++,this.negative=1),S<c.length&&(b===16?this._parseHex(c,S,y):(this._parseBase(c,b,S),y==="le"&&this._initArray(this.toArray(),b,y)))},i.prototype._initNumber=function(c,b,y){c<0&&(this.negative=1,c=-c),c<67108864?(this.words=[c&67108863],this.length=1):c<4503599627370496?(this.words=[c&67108863,c/67108864&67108863],this.length=2):(r(c<9007199254740992),this.words=[c&67108863,c/67108864&67108863,1],this.length=3),y==="le"&&this._initArray(this.toArray(),b,y)},i.prototype._initArray=function(c,b,y){if(r(typeof c.length=="number"),c.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(c.length/3),this.words=new Array(this.length);for(var S=0;S<this.length;S++)this.words[S]=0;var v,U,W=0;if(y==="be")for(S=c.length-1,v=0;S>=0;S-=3)U=c[S]|c[S-1]<<8|c[S-2]<<16,this.words[v]|=U<<W&67108863,this.words[v+1]=U>>>26-W&67108863,W+=24,W>=26&&(W-=26,v++);else if(y==="le")for(S=0,v=0;S<c.length;S+=3)U=c[S]|c[S+1]<<8|c[S+2]<<16,this.words[v]|=U<<W&67108863,this.words[v+1]=U>>>26-W&67108863,W+=24,W>=26&&(W-=26,v++);return this._strip()};function a(B,c){var b=B.charCodeAt(c);if(b>=48&&b<=57)return b-48;if(b>=65&&b<=70)return b-55;if(b>=97&&b<=102)return b-87;r(!1,"Invalid character in "+B)}function l(B,c,b){var y=a(B,b);return b-1>=c&&(y|=a(B,b-1)<<4),y}i.prototype._parseHex=function(c,b,y){this.length=Math.ceil((c.length-b)/6),this.words=new Array(this.length);for(var S=0;S<this.length;S++)this.words[S]=0;var v=0,U=0,W;if(y==="be")for(S=c.length-1;S>=b;S-=2)W=l(c,b,S)<<v,this.words[U]|=W&67108863,v>=18?(v-=18,U+=1,this.words[U]|=W>>>26):v+=8;else{var A=c.length-b;for(S=A%2===0?b+1:b;S<c.length;S+=2)W=l(c,b,S)<<v,this.words[U]|=W&67108863,v>=18?(v-=18,U+=1,this.words[U]|=W>>>26):v+=8}this._strip()};function f(B,c,b,y){for(var S=0,v=0,U=Math.min(B.length,b),W=c;W<U;W++){var A=B.charCodeAt(W)-48;S*=y,A>=49?v=A-49+10:A>=17?v=A-17+10:v=A,r(A>=0&&v<y,"Invalid character"),S+=v}return S}i.prototype._parseBase=function(c,b,y){this.words=[0],this.length=1;for(var S=0,v=1;v<=67108863;v*=b)S++;S--,v=v/b|0;for(var U=c.length-y,W=U%S,A=Math.min(U,U-W)+y,h=0,T=y;T<A;T+=S)h=f(c,T,T+S,b),this.imuln(v),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(W!==0){var se=1;for(h=f(c,T,c.length,b),T=0;T<W;T++)se*=b;this.imuln(se),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this._strip()},i.prototype.copy=function(c){c.words=new Array(this.length);for(var b=0;b<this.length;b++)c.words[b]=this.words[b];c.length=this.length,c.negative=this.negative,c.red=this.red};function m(B,c){B.words=c.words,B.length=c.length,B.negative=c.negative,B.red=c.red}if(i.prototype._move=function(c){m(c,this)},i.prototype.clone=function(){var c=new i(null);return this.copy(c),c},i.prototype._expand=function(c){for(;this.length<c;)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")]=p}catch{i.prototype.inspect=p}else i.prototype.inspect=p;function p(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var C=["","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"],w=[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],F=[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(c,b){c=c||10,b=b|0||1;var y;if(c===16||c==="hex"){y="";for(var S=0,v=0,U=0;U<this.length;U++){var W=this.words[U],A=((W<<S|v)&16777215).toString(16);v=W>>>24-S&16777215,S+=2,S>=26&&(S-=26,U--),v!==0||U!==this.length-1?y=C[6-A.length]+A+y:y=A+y}for(v!==0&&(y=v.toString(16)+y);y.length%b!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}if(c===(c|0)&&c>=2&&c<=36){var h=w[c],T=F[c];y="";var se=this.clone();for(se.negative=0;!se.isZero();){var Z=se.modrn(T).toString(c);se=se.idivn(T),se.isZero()?y=Z+y:y=C[h-Z.length]+Z+y}for(this.isZero()&&(y="0"+y);y.length%b!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var c=this.words[0];return this.length===2?c+=this.words[1]*67108864:this.length===3&&this.words[2]===1?c+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-c:c},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(c,b){return this.toArrayLike(o,c,b)}),i.prototype.toArray=function(c,b){return this.toArrayLike(Array,c,b)};var I=function(c,b){return c.allocUnsafe?c.allocUnsafe(b):new c(b)};i.prototype.toArrayLike=function(c,b,y){this._strip();var S=this.byteLength(),v=y||Math.max(1,S);r(S<=v,"byte array longer than desired length"),r(v>0,"Requested array length <= 0");var U=I(c,v),W=b==="le"?"LE":"BE";return this["_toArrayLike"+W](U,S),U},i.prototype._toArrayLikeLE=function(c,b){for(var y=0,S=0,v=0,U=0;v<this.length;v++){var W=this.words[v]<<U|S;c[y++]=W&255,y<c.length&&(c[y++]=W>>8&255),y<c.length&&(c[y++]=W>>16&255),U===6?(y<c.length&&(c[y++]=W>>24&255),S=0,U=0):(S=W>>>24,U+=2)}if(y<c.length)for(c[y++]=S;y<c.length;)c[y++]=0},i.prototype._toArrayLikeBE=function(c,b){for(var y=c.length-1,S=0,v=0,U=0;v<this.length;v++){var W=this.words[v]<<U|S;c[y--]=W&255,y>=0&&(c[y--]=W>>8&255),y>=0&&(c[y--]=W>>16&255),U===6?(y>=0&&(c[y--]=W>>24&255),S=0,U=0):(S=W>>>24,U+=2)}if(y>=0)for(c[y--]=S;y>=0;)c[y--]=0},Math.clz32?i.prototype._countBits=function(c){return 32-Math.clz32(c)}:i.prototype._countBits=function(c){var b=c,y=0;return b>=4096&&(y+=13,b>>>=13),b>=64&&(y+=7,b>>>=7),b>=8&&(y+=4,b>>>=4),b>=2&&(y+=2,b>>>=2),y+b},i.prototype._zeroBits=function(c){if(c===0)return 26;var b=c,y=0;return b&8191||(y+=13,b>>>=13),b&127||(y+=7,b>>>=7),b&15||(y+=4,b>>>=4),b&3||(y+=2,b>>>=2),b&1||y++,y},i.prototype.bitLength=function(){var c=this.words[this.length-1],b=this._countBits(c);return(this.length-1)*26+b};function x(B){for(var c=new Array(B.bitLength()),b=0;b<c.length;b++){var y=b/26|0,S=b%26;c[b]=B.words[y]>>>S&1}return c}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var c=0,b=0;b<this.length;b++){var y=this._zeroBits(this.words[b]);if(c+=y,y!==26)break}return c},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(c){return this.negative!==0?this.abs().inotn(c).iaddn(1):this.clone()},i.prototype.fromTwos=function(c){return this.testn(c-1)?this.notn(c).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(c){for(;this.length<c.length;)this.words[this.length++]=0;for(var b=0;b<c.length;b++)this.words[b]=this.words[b]|c.words[b];return this._strip()},i.prototype.ior=function(c){return r((this.negative|c.negative)===0),this.iuor(c)},i.prototype.or=function(c){return this.length>c.length?this.clone().ior(c):c.clone().ior(this)},i.prototype.uor=function(c){return this.length>c.length?this.clone().iuor(c):c.clone().iuor(this)},i.prototype.iuand=function(c){var b;this.length>c.length?b=c:b=this;for(var y=0;y<b.length;y++)this.words[y]=this.words[y]&c.words[y];return this.length=b.length,this._strip()},i.prototype.iand=function(c){return r((this.negative|c.negative)===0),this.iuand(c)},i.prototype.and=function(c){return this.length>c.length?this.clone().iand(c):c.clone().iand(this)},i.prototype.uand=function(c){return this.length>c.length?this.clone().iuand(c):c.clone().iuand(this)},i.prototype.iuxor=function(c){var b,y;this.length>c.length?(b=this,y=c):(b=c,y=this);for(var S=0;S<y.length;S++)this.words[S]=b.words[S]^y.words[S];if(this!==b)for(;S<b.length;S++)this.words[S]=b.words[S];return this.length=b.length,this._strip()},i.prototype.ixor=function(c){return r((this.negative|c.negative)===0),this.iuxor(c)},i.prototype.xor=function(c){return this.length>c.length?this.clone().ixor(c):c.clone().ixor(this)},i.prototype.uxor=function(c){return this.length>c.length?this.clone().iuxor(c):c.clone().iuxor(this)},i.prototype.inotn=function(c){r(typeof c=="number"&&c>=0);var b=Math.ceil(c/26)|0,y=c%26;this._expand(b),y>0&&b--;for(var S=0;S<b;S++)this.words[S]=~this.words[S]&67108863;return y>0&&(this.words[S]=~this.words[S]&67108863>>26-y),this._strip()},i.prototype.notn=function(c){return this.clone().inotn(c)},i.prototype.setn=function(c,b){r(typeof c=="number"&&c>=0);var y=c/26|0,S=c%26;return this._expand(y+1),b?this.words[y]=this.words[y]|1<<S:this.words[y]=this.words[y]&~(1<<S),this._strip()},i.prototype.iadd=function(c){var b;if(this.negative!==0&&c.negative===0)return this.negative=0,b=this.isub(c),this.negative^=1,this._normSign();if(this.negative===0&&c.negative!==0)return c.negative=0,b=this.isub(c),c.negative=1,b._normSign();var y,S;this.length>c.length?(y=this,S=c):(y=c,S=this);for(var v=0,U=0;U<S.length;U++)b=(y.words[U]|0)+(S.words[U]|0)+v,this.words[U]=b&67108863,v=b>>>26;for(;v!==0&&U<y.length;U++)b=(y.words[U]|0)+v,this.words[U]=b&67108863,v=b>>>26;if(this.length=y.length,v!==0)this.words[this.length]=v,this.length++;else if(y!==this)for(;U<y.length;U++)this.words[U]=y.words[U];return this},i.prototype.add=function(c){var b;return c.negative!==0&&this.negative===0?(c.negative=0,b=this.sub(c),c.negative^=1,b):c.negative===0&&this.negative!==0?(this.negative=0,b=c.sub(this),this.negative=1,b):this.length>c.length?this.clone().iadd(c):c.clone().iadd(this)},i.prototype.isub=function(c){if(c.negative!==0){c.negative=0;var b=this.iadd(c);return c.negative=1,b._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(c),this.negative=1,this._normSign();var y=this.cmp(c);if(y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var S,v;y>0?(S=this,v=c):(S=c,v=this);for(var U=0,W=0;W<v.length;W++)b=(S.words[W]|0)-(v.words[W]|0)+U,U=b>>26,this.words[W]=b&67108863;for(;U!==0&&W<S.length;W++)b=(S.words[W]|0)+U,U=b>>26,this.words[W]=b&67108863;if(U===0&&W<S.length&&S!==this)for(;W<S.length;W++)this.words[W]=S.words[W];return this.length=Math.max(this.length,W),S!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(c){return this.clone().isub(c)};function E(B,c,b){b.negative=c.negative^B.negative;var y=B.length+c.length|0;b.length=y,y=y-1|0;var S=B.words[0]|0,v=c.words[0]|0,U=S*v,W=U&67108863,A=U/67108864|0;b.words[0]=W;for(var h=1;h<y;h++){for(var T=A>>>26,se=A&67108863,Z=Math.min(h,c.length-1),ee=Math.max(0,h-B.length+1);ee<=Z;ee++){var ve=h-ee|0;S=B.words[ve]|0,v=c.words[ee]|0,U=S*v+se,T+=U/67108864|0,se=U&67108863}b.words[h]=se|0,A=T|0}return A!==0?b.words[h]=A|0:b.length--,b._strip()}var _=function(c,b,y){var S=c.words,v=b.words,U=y.words,W=0,A,h,T,se=S[0]|0,Z=se&8191,ee=se>>>13,ve=S[1]|0,le=ve&8191,be=ve>>>13,ln=S[2]|0,xe=ln&8191,Re=ln>>>13,Jt=S[3]|0,Ue=Jt&8191,$e=Jt>>>13,mi=S[4]|0,Le=mi&8191,je=mi>>>13,bi=S[5]|0,ze=bi&8191,We=bi>>>13,Gt=S[6]|0,Oe=Gt&8191,Ve=Gt>>>13,dn=S[7]|0,Ge=dn&8191,g=dn>>>13,d=S[8]|0,u=d&8191,D=d>>>13,R=S[9]|0,N=R&8191,K=R>>>13,pe=v[0]|0,he=pe&8191,ue=pe>>>13,Pe=v[1]|0,de=Pe&8191,tt=Pe>>>13,Gl=v[2]|0,nt=Gl&8191,rt=Gl>>>13,Yl=v[3]|0,st=Yl&8191,it=Yl>>>13,Xl=v[4]|0,ot=Xl&8191,at=Xl>>>13,Zl=v[5]|0,ct=Zl&8191,lt=Zl>>>13,Jl=v[6]|0,dt=Jl&8191,ut=Jl>>>13,Ql=v[7]|0,ft=Ql&8191,ht=Ql>>>13,ed=v[8]|0,mt=ed&8191,bt=ed>>>13,td=v[9]|0,pt=td&8191,yt=td>>>13;y.negative=c.negative^b.negative,y.length=19,A=Math.imul(Z,he),h=Math.imul(Z,ue),h=h+Math.imul(ee,he)|0,T=Math.imul(ee,ue);var Jo=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(Jo>>>26)|0,Jo&=67108863,A=Math.imul(le,he),h=Math.imul(le,ue),h=h+Math.imul(be,he)|0,T=Math.imul(be,ue),A=A+Math.imul(Z,de)|0,h=h+Math.imul(Z,tt)|0,h=h+Math.imul(ee,de)|0,T=T+Math.imul(ee,tt)|0;var Qo=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(Qo>>>26)|0,Qo&=67108863,A=Math.imul(xe,he),h=Math.imul(xe,ue),h=h+Math.imul(Re,he)|0,T=Math.imul(Re,ue),A=A+Math.imul(le,de)|0,h=h+Math.imul(le,tt)|0,h=h+Math.imul(be,de)|0,T=T+Math.imul(be,tt)|0,A=A+Math.imul(Z,nt)|0,h=h+Math.imul(Z,rt)|0,h=h+Math.imul(ee,nt)|0,T=T+Math.imul(ee,rt)|0;var ea=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(ea>>>26)|0,ea&=67108863,A=Math.imul(Ue,he),h=Math.imul(Ue,ue),h=h+Math.imul($e,he)|0,T=Math.imul($e,ue),A=A+Math.imul(xe,de)|0,h=h+Math.imul(xe,tt)|0,h=h+Math.imul(Re,de)|0,T=T+Math.imul(Re,tt)|0,A=A+Math.imul(le,nt)|0,h=h+Math.imul(le,rt)|0,h=h+Math.imul(be,nt)|0,T=T+Math.imul(be,rt)|0,A=A+Math.imul(Z,st)|0,h=h+Math.imul(Z,it)|0,h=h+Math.imul(ee,st)|0,T=T+Math.imul(ee,it)|0;var ta=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(ta>>>26)|0,ta&=67108863,A=Math.imul(Le,he),h=Math.imul(Le,ue),h=h+Math.imul(je,he)|0,T=Math.imul(je,ue),A=A+Math.imul(Ue,de)|0,h=h+Math.imul(Ue,tt)|0,h=h+Math.imul($e,de)|0,T=T+Math.imul($e,tt)|0,A=A+Math.imul(xe,nt)|0,h=h+Math.imul(xe,rt)|0,h=h+Math.imul(Re,nt)|0,T=T+Math.imul(Re,rt)|0,A=A+Math.imul(le,st)|0,h=h+Math.imul(le,it)|0,h=h+Math.imul(be,st)|0,T=T+Math.imul(be,it)|0,A=A+Math.imul(Z,ot)|0,h=h+Math.imul(Z,at)|0,h=h+Math.imul(ee,ot)|0,T=T+Math.imul(ee,at)|0;var na=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(na>>>26)|0,na&=67108863,A=Math.imul(ze,he),h=Math.imul(ze,ue),h=h+Math.imul(We,he)|0,T=Math.imul(We,ue),A=A+Math.imul(Le,de)|0,h=h+Math.imul(Le,tt)|0,h=h+Math.imul(je,de)|0,T=T+Math.imul(je,tt)|0,A=A+Math.imul(Ue,nt)|0,h=h+Math.imul(Ue,rt)|0,h=h+Math.imul($e,nt)|0,T=T+Math.imul($e,rt)|0,A=A+Math.imul(xe,st)|0,h=h+Math.imul(xe,it)|0,h=h+Math.imul(Re,st)|0,T=T+Math.imul(Re,it)|0,A=A+Math.imul(le,ot)|0,h=h+Math.imul(le,at)|0,h=h+Math.imul(be,ot)|0,T=T+Math.imul(be,at)|0,A=A+Math.imul(Z,ct)|0,h=h+Math.imul(Z,lt)|0,h=h+Math.imul(ee,ct)|0,T=T+Math.imul(ee,lt)|0;var ra=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(ra>>>26)|0,ra&=67108863,A=Math.imul(Oe,he),h=Math.imul(Oe,ue),h=h+Math.imul(Ve,he)|0,T=Math.imul(Ve,ue),A=A+Math.imul(ze,de)|0,h=h+Math.imul(ze,tt)|0,h=h+Math.imul(We,de)|0,T=T+Math.imul(We,tt)|0,A=A+Math.imul(Le,nt)|0,h=h+Math.imul(Le,rt)|0,h=h+Math.imul(je,nt)|0,T=T+Math.imul(je,rt)|0,A=A+Math.imul(Ue,st)|0,h=h+Math.imul(Ue,it)|0,h=h+Math.imul($e,st)|0,T=T+Math.imul($e,it)|0,A=A+Math.imul(xe,ot)|0,h=h+Math.imul(xe,at)|0,h=h+Math.imul(Re,ot)|0,T=T+Math.imul(Re,at)|0,A=A+Math.imul(le,ct)|0,h=h+Math.imul(le,lt)|0,h=h+Math.imul(be,ct)|0,T=T+Math.imul(be,lt)|0,A=A+Math.imul(Z,dt)|0,h=h+Math.imul(Z,ut)|0,h=h+Math.imul(ee,dt)|0,T=T+Math.imul(ee,ut)|0;var sa=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(sa>>>26)|0,sa&=67108863,A=Math.imul(Ge,he),h=Math.imul(Ge,ue),h=h+Math.imul(g,he)|0,T=Math.imul(g,ue),A=A+Math.imul(Oe,de)|0,h=h+Math.imul(Oe,tt)|0,h=h+Math.imul(Ve,de)|0,T=T+Math.imul(Ve,tt)|0,A=A+Math.imul(ze,nt)|0,h=h+Math.imul(ze,rt)|0,h=h+Math.imul(We,nt)|0,T=T+Math.imul(We,rt)|0,A=A+Math.imul(Le,st)|0,h=h+Math.imul(Le,it)|0,h=h+Math.imul(je,st)|0,T=T+Math.imul(je,it)|0,A=A+Math.imul(Ue,ot)|0,h=h+Math.imul(Ue,at)|0,h=h+Math.imul($e,ot)|0,T=T+Math.imul($e,at)|0,A=A+Math.imul(xe,ct)|0,h=h+Math.imul(xe,lt)|0,h=h+Math.imul(Re,ct)|0,T=T+Math.imul(Re,lt)|0,A=A+Math.imul(le,dt)|0,h=h+Math.imul(le,ut)|0,h=h+Math.imul(be,dt)|0,T=T+Math.imul(be,ut)|0,A=A+Math.imul(Z,ft)|0,h=h+Math.imul(Z,ht)|0,h=h+Math.imul(ee,ft)|0,T=T+Math.imul(ee,ht)|0;var ia=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(ia>>>26)|0,ia&=67108863,A=Math.imul(u,he),h=Math.imul(u,ue),h=h+Math.imul(D,he)|0,T=Math.imul(D,ue),A=A+Math.imul(Ge,de)|0,h=h+Math.imul(Ge,tt)|0,h=h+Math.imul(g,de)|0,T=T+Math.imul(g,tt)|0,A=A+Math.imul(Oe,nt)|0,h=h+Math.imul(Oe,rt)|0,h=h+Math.imul(Ve,nt)|0,T=T+Math.imul(Ve,rt)|0,A=A+Math.imul(ze,st)|0,h=h+Math.imul(ze,it)|0,h=h+Math.imul(We,st)|0,T=T+Math.imul(We,it)|0,A=A+Math.imul(Le,ot)|0,h=h+Math.imul(Le,at)|0,h=h+Math.imul(je,ot)|0,T=T+Math.imul(je,at)|0,A=A+Math.imul(Ue,ct)|0,h=h+Math.imul(Ue,lt)|0,h=h+Math.imul($e,ct)|0,T=T+Math.imul($e,lt)|0,A=A+Math.imul(xe,dt)|0,h=h+Math.imul(xe,ut)|0,h=h+Math.imul(Re,dt)|0,T=T+Math.imul(Re,ut)|0,A=A+Math.imul(le,ft)|0,h=h+Math.imul(le,ht)|0,h=h+Math.imul(be,ft)|0,T=T+Math.imul(be,ht)|0,A=A+Math.imul(Z,mt)|0,h=h+Math.imul(Z,bt)|0,h=h+Math.imul(ee,mt)|0,T=T+Math.imul(ee,bt)|0;var oa=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(oa>>>26)|0,oa&=67108863,A=Math.imul(N,he),h=Math.imul(N,ue),h=h+Math.imul(K,he)|0,T=Math.imul(K,ue),A=A+Math.imul(u,de)|0,h=h+Math.imul(u,tt)|0,h=h+Math.imul(D,de)|0,T=T+Math.imul(D,tt)|0,A=A+Math.imul(Ge,nt)|0,h=h+Math.imul(Ge,rt)|0,h=h+Math.imul(g,nt)|0,T=T+Math.imul(g,rt)|0,A=A+Math.imul(Oe,st)|0,h=h+Math.imul(Oe,it)|0,h=h+Math.imul(Ve,st)|0,T=T+Math.imul(Ve,it)|0,A=A+Math.imul(ze,ot)|0,h=h+Math.imul(ze,at)|0,h=h+Math.imul(We,ot)|0,T=T+Math.imul(We,at)|0,A=A+Math.imul(Le,ct)|0,h=h+Math.imul(Le,lt)|0,h=h+Math.imul(je,ct)|0,T=T+Math.imul(je,lt)|0,A=A+Math.imul(Ue,dt)|0,h=h+Math.imul(Ue,ut)|0,h=h+Math.imul($e,dt)|0,T=T+Math.imul($e,ut)|0,A=A+Math.imul(xe,ft)|0,h=h+Math.imul(xe,ht)|0,h=h+Math.imul(Re,ft)|0,T=T+Math.imul(Re,ht)|0,A=A+Math.imul(le,mt)|0,h=h+Math.imul(le,bt)|0,h=h+Math.imul(be,mt)|0,T=T+Math.imul(be,bt)|0,A=A+Math.imul(Z,pt)|0,h=h+Math.imul(Z,yt)|0,h=h+Math.imul(ee,pt)|0,T=T+Math.imul(ee,yt)|0;var aa=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(aa>>>26)|0,aa&=67108863,A=Math.imul(N,de),h=Math.imul(N,tt),h=h+Math.imul(K,de)|0,T=Math.imul(K,tt),A=A+Math.imul(u,nt)|0,h=h+Math.imul(u,rt)|0,h=h+Math.imul(D,nt)|0,T=T+Math.imul(D,rt)|0,A=A+Math.imul(Ge,st)|0,h=h+Math.imul(Ge,it)|0,h=h+Math.imul(g,st)|0,T=T+Math.imul(g,it)|0,A=A+Math.imul(Oe,ot)|0,h=h+Math.imul(Oe,at)|0,h=h+Math.imul(Ve,ot)|0,T=T+Math.imul(Ve,at)|0,A=A+Math.imul(ze,ct)|0,h=h+Math.imul(ze,lt)|0,h=h+Math.imul(We,ct)|0,T=T+Math.imul(We,lt)|0,A=A+Math.imul(Le,dt)|0,h=h+Math.imul(Le,ut)|0,h=h+Math.imul(je,dt)|0,T=T+Math.imul(je,ut)|0,A=A+Math.imul(Ue,ft)|0,h=h+Math.imul(Ue,ht)|0,h=h+Math.imul($e,ft)|0,T=T+Math.imul($e,ht)|0,A=A+Math.imul(xe,mt)|0,h=h+Math.imul(xe,bt)|0,h=h+Math.imul(Re,mt)|0,T=T+Math.imul(Re,bt)|0,A=A+Math.imul(le,pt)|0,h=h+Math.imul(le,yt)|0,h=h+Math.imul(be,pt)|0,T=T+Math.imul(be,yt)|0;var ca=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(ca>>>26)|0,ca&=67108863,A=Math.imul(N,nt),h=Math.imul(N,rt),h=h+Math.imul(K,nt)|0,T=Math.imul(K,rt),A=A+Math.imul(u,st)|0,h=h+Math.imul(u,it)|0,h=h+Math.imul(D,st)|0,T=T+Math.imul(D,it)|0,A=A+Math.imul(Ge,ot)|0,h=h+Math.imul(Ge,at)|0,h=h+Math.imul(g,ot)|0,T=T+Math.imul(g,at)|0,A=A+Math.imul(Oe,ct)|0,h=h+Math.imul(Oe,lt)|0,h=h+Math.imul(Ve,ct)|0,T=T+Math.imul(Ve,lt)|0,A=A+Math.imul(ze,dt)|0,h=h+Math.imul(ze,ut)|0,h=h+Math.imul(We,dt)|0,T=T+Math.imul(We,ut)|0,A=A+Math.imul(Le,ft)|0,h=h+Math.imul(Le,ht)|0,h=h+Math.imul(je,ft)|0,T=T+Math.imul(je,ht)|0,A=A+Math.imul(Ue,mt)|0,h=h+Math.imul(Ue,bt)|0,h=h+Math.imul($e,mt)|0,T=T+Math.imul($e,bt)|0,A=A+Math.imul(xe,pt)|0,h=h+Math.imul(xe,yt)|0,h=h+Math.imul(Re,pt)|0,T=T+Math.imul(Re,yt)|0;var la=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(la>>>26)|0,la&=67108863,A=Math.imul(N,st),h=Math.imul(N,it),h=h+Math.imul(K,st)|0,T=Math.imul(K,it),A=A+Math.imul(u,ot)|0,h=h+Math.imul(u,at)|0,h=h+Math.imul(D,ot)|0,T=T+Math.imul(D,at)|0,A=A+Math.imul(Ge,ct)|0,h=h+Math.imul(Ge,lt)|0,h=h+Math.imul(g,ct)|0,T=T+Math.imul(g,lt)|0,A=A+Math.imul(Oe,dt)|0,h=h+Math.imul(Oe,ut)|0,h=h+Math.imul(Ve,dt)|0,T=T+Math.imul(Ve,ut)|0,A=A+Math.imul(ze,ft)|0,h=h+Math.imul(ze,ht)|0,h=h+Math.imul(We,ft)|0,T=T+Math.imul(We,ht)|0,A=A+Math.imul(Le,mt)|0,h=h+Math.imul(Le,bt)|0,h=h+Math.imul(je,mt)|0,T=T+Math.imul(je,bt)|0,A=A+Math.imul(Ue,pt)|0,h=h+Math.imul(Ue,yt)|0,h=h+Math.imul($e,pt)|0,T=T+Math.imul($e,yt)|0;var da=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(da>>>26)|0,da&=67108863,A=Math.imul(N,ot),h=Math.imul(N,at),h=h+Math.imul(K,ot)|0,T=Math.imul(K,at),A=A+Math.imul(u,ct)|0,h=h+Math.imul(u,lt)|0,h=h+Math.imul(D,ct)|0,T=T+Math.imul(D,lt)|0,A=A+Math.imul(Ge,dt)|0,h=h+Math.imul(Ge,ut)|0,h=h+Math.imul(g,dt)|0,T=T+Math.imul(g,ut)|0,A=A+Math.imul(Oe,ft)|0,h=h+Math.imul(Oe,ht)|0,h=h+Math.imul(Ve,ft)|0,T=T+Math.imul(Ve,ht)|0,A=A+Math.imul(ze,mt)|0,h=h+Math.imul(ze,bt)|0,h=h+Math.imul(We,mt)|0,T=T+Math.imul(We,bt)|0,A=A+Math.imul(Le,pt)|0,h=h+Math.imul(Le,yt)|0,h=h+Math.imul(je,pt)|0,T=T+Math.imul(je,yt)|0;var ua=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(ua>>>26)|0,ua&=67108863,A=Math.imul(N,ct),h=Math.imul(N,lt),h=h+Math.imul(K,ct)|0,T=Math.imul(K,lt),A=A+Math.imul(u,dt)|0,h=h+Math.imul(u,ut)|0,h=h+Math.imul(D,dt)|0,T=T+Math.imul(D,ut)|0,A=A+Math.imul(Ge,ft)|0,h=h+Math.imul(Ge,ht)|0,h=h+Math.imul(g,ft)|0,T=T+Math.imul(g,ht)|0,A=A+Math.imul(Oe,mt)|0,h=h+Math.imul(Oe,bt)|0,h=h+Math.imul(Ve,mt)|0,T=T+Math.imul(Ve,bt)|0,A=A+Math.imul(ze,pt)|0,h=h+Math.imul(ze,yt)|0,h=h+Math.imul(We,pt)|0,T=T+Math.imul(We,yt)|0;var fa=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(fa>>>26)|0,fa&=67108863,A=Math.imul(N,dt),h=Math.imul(N,ut),h=h+Math.imul(K,dt)|0,T=Math.imul(K,ut),A=A+Math.imul(u,ft)|0,h=h+Math.imul(u,ht)|0,h=h+Math.imul(D,ft)|0,T=T+Math.imul(D,ht)|0,A=A+Math.imul(Ge,mt)|0,h=h+Math.imul(Ge,bt)|0,h=h+Math.imul(g,mt)|0,T=T+Math.imul(g,bt)|0,A=A+Math.imul(Oe,pt)|0,h=h+Math.imul(Oe,yt)|0,h=h+Math.imul(Ve,pt)|0,T=T+Math.imul(Ve,yt)|0;var ha=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(ha>>>26)|0,ha&=67108863,A=Math.imul(N,ft),h=Math.imul(N,ht),h=h+Math.imul(K,ft)|0,T=Math.imul(K,ht),A=A+Math.imul(u,mt)|0,h=h+Math.imul(u,bt)|0,h=h+Math.imul(D,mt)|0,T=T+Math.imul(D,bt)|0,A=A+Math.imul(Ge,pt)|0,h=h+Math.imul(Ge,yt)|0,h=h+Math.imul(g,pt)|0,T=T+Math.imul(g,yt)|0;var ma=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(ma>>>26)|0,ma&=67108863,A=Math.imul(N,mt),h=Math.imul(N,bt),h=h+Math.imul(K,mt)|0,T=Math.imul(K,bt),A=A+Math.imul(u,pt)|0,h=h+Math.imul(u,yt)|0,h=h+Math.imul(D,pt)|0,T=T+Math.imul(D,yt)|0;var ba=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(ba>>>26)|0,ba&=67108863,A=Math.imul(N,pt),h=Math.imul(N,yt),h=h+Math.imul(K,pt)|0,T=Math.imul(K,yt);var pa=(W+A|0)+((h&8191)<<13)|0;return W=(T+(h>>>13)|0)+(pa>>>26)|0,pa&=67108863,U[0]=Jo,U[1]=Qo,U[2]=ea,U[3]=ta,U[4]=na,U[5]=ra,U[6]=sa,U[7]=ia,U[8]=oa,U[9]=aa,U[10]=ca,U[11]=la,U[12]=da,U[13]=ua,U[14]=fa,U[15]=ha,U[16]=ma,U[17]=ba,U[18]=pa,W!==0&&(U[19]=W,y.length++),y};Math.imul||(_=E);function k(B,c,b){b.negative=c.negative^B.negative,b.length=B.length+c.length;for(var y=0,S=0,v=0;v<b.length-1;v++){var U=S;S=0;for(var W=y&67108863,A=Math.min(v,c.length-1),h=Math.max(0,v-B.length+1);h<=A;h++){var T=v-h,se=B.words[T]|0,Z=c.words[h]|0,ee=se*Z,ve=ee&67108863;U=U+(ee/67108864|0)|0,ve=ve+W|0,W=ve&67108863,U=U+(ve>>>26)|0,S+=U>>>26,U&=67108863}b.words[v]=W,y=U,U=S}return y!==0?b.words[v]=y:b.length--,b._strip()}function P(B,c,b){return k(B,c,b)}i.prototype.mulTo=function(c,b){var y,S=this.length+c.length;return this.length===10&&c.length===10?y=_(this,c,b):S<63?y=E(this,c,b):S<1024?y=k(this,c,b):y=P(this,c,b),y},i.prototype.mul=function(c){var b=new i(null);return b.words=new Array(this.length+c.length),this.mulTo(c,b)},i.prototype.mulf=function(c){var b=new i(null);return b.words=new Array(this.length+c.length),P(this,c,b)},i.prototype.imul=function(c){return this.clone().mulTo(c,this)},i.prototype.imuln=function(c){var b=c<0;b&&(c=-c),r(typeof c=="number"),r(c<67108864);for(var y=0,S=0;S<this.length;S++){var v=(this.words[S]|0)*c,U=(v&67108863)+(y&67108863);y>>=26,y+=v/67108864|0,y+=U>>>26,this.words[S]=U&67108863}return y!==0&&(this.words[S]=y,this.length++),this.length=c===0?1:this.length,b?this.ineg():this},i.prototype.muln=function(c){return this.clone().imuln(c)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(c){var b=x(c);if(b.length===0)return new i(1);for(var y=this,S=0;S<b.length&&b[S]===0;S++,y=y.sqr());if(++S<b.length)for(var v=y.sqr();S<b.length;S++,v=v.sqr())b[S]!==0&&(y=y.mul(v));return y},i.prototype.iushln=function(c){r(typeof c=="number"&&c>=0);var b=c%26,y=(c-b)/26,S=67108863>>>26-b<<26-b,v;if(b!==0){var U=0;for(v=0;v<this.length;v++){var W=this.words[v]&S,A=(this.words[v]|0)-W<<b;this.words[v]=A|U,U=W>>>26-b}U&&(this.words[v]=U,this.length++)}if(y!==0){for(v=this.length-1;v>=0;v--)this.words[v+y]=this.words[v];for(v=0;v<y;v++)this.words[v]=0;this.length+=y}return this._strip()},i.prototype.ishln=function(c){return r(this.negative===0),this.iushln(c)},i.prototype.iushrn=function(c,b,y){r(typeof c=="number"&&c>=0);var S;b?S=(b-b%26)/26:S=0;var v=c%26,U=Math.min((c-v)/26,this.length),W=67108863^67108863>>>v<<v,A=y;if(S-=U,S=Math.max(0,S),A){for(var h=0;h<U;h++)A.words[h]=this.words[h];A.length=U}if(U!==0)if(this.length>U)for(this.length-=U,h=0;h<this.length;h++)this.words[h]=this.words[h+U];else this.words[0]=0,this.length=1;var T=0;for(h=this.length-1;h>=0&&(T!==0||h>=S);h--){var se=this.words[h]|0;this.words[h]=T<<26-v|se>>>v,T=se&W}return A&&T!==0&&(A.words[A.length++]=T),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(c,b,y){return r(this.negative===0),this.iushrn(c,b,y)},i.prototype.shln=function(c){return this.clone().ishln(c)},i.prototype.ushln=function(c){return this.clone().iushln(c)},i.prototype.shrn=function(c){return this.clone().ishrn(c)},i.prototype.ushrn=function(c){return this.clone().iushrn(c)},i.prototype.testn=function(c){r(typeof c=="number"&&c>=0);var b=c%26,y=(c-b)/26,S=1<<b;if(this.length<=y)return!1;var v=this.words[y];return!!(v&S)},i.prototype.imaskn=function(c){r(typeof c=="number"&&c>=0);var b=c%26,y=(c-b)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=y)return this;if(b!==0&&y++,this.length=Math.min(y,this.length),b!==0){var S=67108863^67108863>>>b<<b;this.words[this.length-1]&=S}return this._strip()},i.prototype.maskn=function(c){return this.clone().imaskn(c)},i.prototype.iaddn=function(c){return r(typeof c=="number"),r(c<67108864),c<0?this.isubn(-c):this.negative!==0?this.length===1&&(this.words[0]|0)<=c?(this.words[0]=c-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(c),this.negative=1,this):this._iaddn(c)},i.prototype._iaddn=function(c){this.words[0]+=c;for(var b=0;b<this.length&&this.words[b]>=67108864;b++)this.words[b]-=67108864,b===this.length-1?this.words[b+1]=1:this.words[b+1]++;return this.length=Math.max(this.length,b+1),this},i.prototype.isubn=function(c){if(r(typeof c=="number"),r(c<67108864),c<0)return this.iaddn(-c);if(this.negative!==0)return this.negative=0,this.iaddn(c),this.negative=1,this;if(this.words[0]-=c,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var b=0;b<this.length&&this.words[b]<0;b++)this.words[b]+=67108864,this.words[b+1]-=1;return this._strip()},i.prototype.addn=function(c){return this.clone().iaddn(c)},i.prototype.subn=function(c){return this.clone().isubn(c)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(c,b,y){var S=c.length+y,v;this._expand(S);var U,W=0;for(v=0;v<c.length;v++){U=(this.words[v+y]|0)+W;var A=(c.words[v]|0)*b;U-=A&67108863,W=(U>>26)-(A/67108864|0),this.words[v+y]=U&67108863}for(;v<this.length-y;v++)U=(this.words[v+y]|0)+W,W=U>>26,this.words[v+y]=U&67108863;if(W===0)return this._strip();for(r(W===-1),W=0,v=0;v<this.length;v++)U=-(this.words[v]|0)+W,W=U>>26,this.words[v]=U&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(c,b){var y=this.length-c.length,S=this.clone(),v=c,U=v.words[v.length-1]|0,W=this._countBits(U);y=26-W,y!==0&&(v=v.ushln(y),S.iushln(y),U=v.words[v.length-1]|0);var A=S.length-v.length,h;if(b!=="mod"){h=new i(null),h.length=A+1,h.words=new Array(h.length);for(var T=0;T<h.length;T++)h.words[T]=0}var se=S.clone()._ishlnsubmul(v,1,A);se.negative===0&&(S=se,h&&(h.words[A]=1));for(var Z=A-1;Z>=0;Z--){var ee=(S.words[v.length+Z]|0)*67108864+(S.words[v.length+Z-1]|0);for(ee=Math.min(ee/U|0,67108863),S._ishlnsubmul(v,ee,Z);S.negative!==0;)ee--,S.negative=0,S._ishlnsubmul(v,1,Z),S.isZero()||(S.negative^=1);h&&(h.words[Z]=ee)}return h&&h._strip(),S._strip(),b!=="div"&&y!==0&&S.iushrn(y),{div:h||null,mod:S}},i.prototype.divmod=function(c,b,y){if(r(!c.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var S,v,U;return this.negative!==0&&c.negative===0?(U=this.neg().divmod(c,b),b!=="mod"&&(S=U.div.neg()),b!=="div"&&(v=U.mod.neg(),y&&v.negative!==0&&v.iadd(c)),{div:S,mod:v}):this.negative===0&&c.negative!==0?(U=this.divmod(c.neg(),b),b!=="mod"&&(S=U.div.neg()),{div:S,mod:U.mod}):this.negative&c.negative?(U=this.neg().divmod(c.neg(),b),b!=="div"&&(v=U.mod.neg(),y&&v.negative!==0&&v.isub(c)),{div:U.div,mod:v}):c.length>this.length||this.cmp(c)<0?{div:new i(0),mod:this}:c.length===1?b==="div"?{div:this.divn(c.words[0]),mod:null}:b==="mod"?{div:null,mod:new i(this.modrn(c.words[0]))}:{div:this.divn(c.words[0]),mod:new i(this.modrn(c.words[0]))}:this._wordDiv(c,b)},i.prototype.div=function(c){return this.divmod(c,"div",!1).div},i.prototype.mod=function(c){return this.divmod(c,"mod",!1).mod},i.prototype.umod=function(c){return this.divmod(c,"mod",!0).mod},i.prototype.divRound=function(c){var b=this.divmod(c);if(b.mod.isZero())return b.div;var y=b.div.negative!==0?b.mod.isub(c):b.mod,S=c.ushrn(1),v=c.andln(1),U=y.cmp(S);return U<0||v===1&&U===0?b.div:b.div.negative!==0?b.div.isubn(1):b.div.iaddn(1)},i.prototype.modrn=function(c){var b=c<0;b&&(c=-c),r(c<=67108863);for(var y=(1<<26)%c,S=0,v=this.length-1;v>=0;v--)S=(y*S+(this.words[v]|0))%c;return b?-S:S},i.prototype.modn=function(c){return this.modrn(c)},i.prototype.idivn=function(c){var b=c<0;b&&(c=-c),r(c<=67108863);for(var y=0,S=this.length-1;S>=0;S--){var v=(this.words[S]|0)+y*67108864;this.words[S]=v/c|0,y=v%c}return this._strip(),b?this.ineg():this},i.prototype.divn=function(c){return this.clone().idivn(c)},i.prototype.egcd=function(c){r(c.negative===0),r(!c.isZero());var b=this,y=c.clone();b.negative!==0?b=b.umod(c):b=b.clone();for(var S=new i(1),v=new i(0),U=new i(0),W=new i(1),A=0;b.isEven()&&y.isEven();)b.iushrn(1),y.iushrn(1),++A;for(var h=y.clone(),T=b.clone();!b.isZero();){for(var se=0,Z=1;!(b.words[0]&Z)&&se<26;++se,Z<<=1);if(se>0)for(b.iushrn(se);se-- >0;)(S.isOdd()||v.isOdd())&&(S.iadd(h),v.isub(T)),S.iushrn(1),v.iushrn(1);for(var ee=0,ve=1;!(y.words[0]&ve)&&ee<26;++ee,ve<<=1);if(ee>0)for(y.iushrn(ee);ee-- >0;)(U.isOdd()||W.isOdd())&&(U.iadd(h),W.isub(T)),U.iushrn(1),W.iushrn(1);b.cmp(y)>=0?(b.isub(y),S.isub(U),v.isub(W)):(y.isub(b),U.isub(S),W.isub(v))}return{a:U,b:W,gcd:y.iushln(A)}},i.prototype._invmp=function(c){r(c.negative===0),r(!c.isZero());var b=this,y=c.clone();b.negative!==0?b=b.umod(c):b=b.clone();for(var S=new i(1),v=new i(0),U=y.clone();b.cmpn(1)>0&&y.cmpn(1)>0;){for(var W=0,A=1;!(b.words[0]&A)&&W<26;++W,A<<=1);if(W>0)for(b.iushrn(W);W-- >0;)S.isOdd()&&S.iadd(U),S.iushrn(1);for(var h=0,T=1;!(y.words[0]&T)&&h<26;++h,T<<=1);if(h>0)for(y.iushrn(h);h-- >0;)v.isOdd()&&v.iadd(U),v.iushrn(1);b.cmp(y)>=0?(b.isub(y),S.isub(v)):(y.isub(b),v.isub(S))}var se;return b.cmpn(1)===0?se=S:se=v,se.cmpn(0)<0&&se.iadd(c),se},i.prototype.gcd=function(c){if(this.isZero())return c.abs();if(c.isZero())return this.abs();var b=this.clone(),y=c.clone();b.negative=0,y.negative=0;for(var S=0;b.isEven()&&y.isEven();S++)b.iushrn(1),y.iushrn(1);do{for(;b.isEven();)b.iushrn(1);for(;y.isEven();)y.iushrn(1);var v=b.cmp(y);if(v<0){var U=b;b=y,y=U}else if(v===0||y.cmpn(1)===0)break;b.isub(y)}while(!0);return y.iushln(S)},i.prototype.invm=function(c){return this.egcd(c).a.umod(c)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(c){return this.words[0]&c},i.prototype.bincn=function(c){r(typeof c=="number");var b=c%26,y=(c-b)/26,S=1<<b;if(this.length<=y)return this._expand(y+1),this.words[y]|=S,this;for(var v=S,U=y;v!==0&&U<this.length;U++){var W=this.words[U]|0;W+=v,v=W>>>26,W&=67108863,this.words[U]=W}return v!==0&&(this.words[U]=v,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(c){var b=c<0;if(this.negative!==0&&!b)return-1;if(this.negative===0&&b)return 1;this._strip();var y;if(this.length>1)y=1;else{b&&(c=-c),r(c<=67108863,"Number is too big");var S=this.words[0]|0;y=S===c?0:S<c?-1:1}return this.negative!==0?-y|0:y},i.prototype.cmp=function(c){if(this.negative!==0&&c.negative===0)return-1;if(this.negative===0&&c.negative!==0)return 1;var b=this.ucmp(c);return this.negative!==0?-b|0:b},i.prototype.ucmp=function(c){if(this.length>c.length)return 1;if(this.length<c.length)return-1;for(var b=0,y=this.length-1;y>=0;y--){var S=this.words[y]|0,v=c.words[y]|0;if(S!==v){S<v?b=-1:S>v&&(b=1);break}}return b},i.prototype.gtn=function(c){return this.cmpn(c)===1},i.prototype.gt=function(c){return this.cmp(c)===1},i.prototype.gten=function(c){return this.cmpn(c)>=0},i.prototype.gte=function(c){return this.cmp(c)>=0},i.prototype.ltn=function(c){return this.cmpn(c)===-1},i.prototype.lt=function(c){return this.cmp(c)===-1},i.prototype.lten=function(c){return this.cmpn(c)<=0},i.prototype.lte=function(c){return this.cmp(c)<=0},i.prototype.eqn=function(c){return this.cmpn(c)===0},i.prototype.eq=function(c){return this.cmp(c)===0},i.red=function(c){return new O(c)},i.prototype.toRed=function(c){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),c.convertTo(this)._forceRed(c)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(c){return this.red=c,this},i.prototype.forceRed=function(c){return r(!this.red,"Already a number in reduction context"),this._forceRed(c)},i.prototype.redAdd=function(c){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,c)},i.prototype.redIAdd=function(c){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,c)},i.prototype.redSub=function(c){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,c)},i.prototype.redISub=function(c){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,c)},i.prototype.redShl=function(c){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,c)},i.prototype.redMul=function(c){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.mul(this,c)},i.prototype.redIMul=function(c){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.imul(this,c)},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(c){return r(this.red&&!c.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,c)};var M={k256:null,p224:null,p192:null,p25519:null};function $(B,c){this.name=B,this.p=new i(c,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var c=new i(null);return c.words=new Array(Math.ceil(this.n/13)),c},$.prototype.ireduce=function(c){var b=c,y;do this.split(b,this.tmp),b=this.imulK(b),b=b.iadd(this.tmp),y=b.bitLength();while(y>this.n);var S=y<this.n?-1:b.ucmp(this.p);return S===0?(b.words[0]=0,b.length=1):S>0?b.isub(this.p):b.strip!==void 0?b.strip():b._strip(),b},$.prototype.split=function(c,b){c.iushrn(this.n,0,b)},$.prototype.imulK=function(c){return c.imul(this.k)};function G(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(G,$),G.prototype.split=function(c,b){for(var y=4194303,S=Math.min(c.length,9),v=0;v<S;v++)b.words[v]=c.words[v];if(b.length=S,c.length<=9){c.words[0]=0,c.length=1;return}var U=c.words[9];for(b.words[b.length++]=U&y,v=10;v<c.length;v++){var W=c.words[v]|0;c.words[v-10]=(W&y)<<4|U>>>22,U=W}U>>>=22,c.words[v-10]=U,U===0&&c.length>10?c.length-=10:c.length-=9},G.prototype.imulK=function(c){c.words[c.length]=0,c.words[c.length+1]=0,c.length+=2;for(var b=0,y=0;y<c.length;y++){var S=c.words[y]|0;b+=S*977,c.words[y]=b&67108863,b=S*64+(b/67108864|0)}return c.words[c.length-1]===0&&(c.length--,c.words[c.length-1]===0&&c.length--),c};function Y(){$.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}s(Y,$);function L(){$.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}s(L,$);function j(){$.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}s(j,$),j.prototype.imulK=function(c){for(var b=0,y=0;y<c.length;y++){var S=(c.words[y]|0)*19+b,v=S&67108863;S>>>=26,c.words[y]=v,b=S}return b!==0&&(c.words[c.length++]=b),c},i._prime=function(c){if(M[c])return M[c];var b;if(c==="k256")b=new G;else if(c==="p224")b=new Y;else if(c==="p192")b=new L;else if(c==="p25519")b=new j;else throw new Error("Unknown prime "+c);return M[c]=b,b};function O(B){if(typeof B=="string"){var c=i._prime(B);this.m=c.p,this.prime=c}else r(B.gtn(1),"modulus must be greater than 1"),this.m=B,this.prime=null}O.prototype._verify1=function(c){r(c.negative===0,"red works only with positives"),r(c.red,"red works only with red numbers")},O.prototype._verify2=function(c,b){r((c.negative|b.negative)===0,"red works only with positives"),r(c.red&&c.red===b.red,"red works only with red numbers")},O.prototype.imod=function(c){return this.prime?this.prime.ireduce(c)._forceRed(this):(m(c,c.umod(this.m)._forceRed(this)),c)},O.prototype.neg=function(c){return c.isZero()?c.clone():this.m.sub(c)._forceRed(this)},O.prototype.add=function(c,b){this._verify2(c,b);var y=c.add(b);return y.cmp(this.m)>=0&&y.isub(this.m),y._forceRed(this)},O.prototype.iadd=function(c,b){this._verify2(c,b);var y=c.iadd(b);return y.cmp(this.m)>=0&&y.isub(this.m),y},O.prototype.sub=function(c,b){this._verify2(c,b);var y=c.sub(b);return y.cmpn(0)<0&&y.iadd(this.m),y._forceRed(this)},O.prototype.isub=function(c,b){this._verify2(c,b);var y=c.isub(b);return y.cmpn(0)<0&&y.iadd(this.m),y},O.prototype.shl=function(c,b){return this._verify1(c),this.imod(c.ushln(b))},O.prototype.imul=function(c,b){return this._verify2(c,b),this.imod(c.imul(b))},O.prototype.mul=function(c,b){return this._verify2(c,b),this.imod(c.mul(b))},O.prototype.isqr=function(c){return this.imul(c,c.clone())},O.prototype.sqr=function(c){return this.mul(c,c)},O.prototype.sqrt=function(c){if(c.isZero())return c.clone();var b=this.m.andln(3);if(r(b%2===1),b===3){var y=this.m.add(new i(1)).iushrn(2);return this.pow(c,y)}for(var S=this.m.subn(1),v=0;!S.isZero()&&S.andln(1)===0;)v++,S.iushrn(1);r(!S.isZero());var U=new i(1).toRed(this),W=U.redNeg(),A=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new i(2*h*h).toRed(this);this.pow(h,A).cmp(W)!==0;)h.redIAdd(W);for(var T=this.pow(h,S),se=this.pow(c,S.addn(1).iushrn(1)),Z=this.pow(c,S),ee=v;Z.cmp(U)!==0;){for(var ve=Z,le=0;ve.cmp(U)!==0;le++)ve=ve.redSqr();r(le<ee);var be=this.pow(T,new i(1).iushln(ee-le-1));se=se.redMul(be),T=be.redSqr(),Z=Z.redMul(T),ee=le}return se},O.prototype.invm=function(c){var b=c._invmp(this.m);return b.negative!==0?(b.negative=0,this.imod(b).redNeg()):this.imod(b)},O.prototype.pow=function(c,b){if(b.isZero())return new i(1).toRed(this);if(b.cmpn(1)===0)return c.clone();var y=4,S=new Array(1<<y);S[0]=new i(1).toRed(this),S[1]=c;for(var v=2;v<S.length;v++)S[v]=this.mul(S[v-1],c);var U=S[0],W=0,A=0,h=b.bitLength()%26;for(h===0&&(h=26),v=b.length-1;v>=0;v--){for(var T=b.words[v],se=h-1;se>=0;se--){var Z=T>>se&1;if(U!==S[0]&&(U=this.sqr(U)),Z===0&&W===0){A=0;continue}W<<=1,W|=Z,A++,!(A!==y&&(v!==0||se!==0))&&(U=this.mul(U,S[W]),A=0,W=0)}h=26}return U},O.prototype.convertTo=function(c){var b=c.umod(this.m);return b===c?b.clone():b},O.prototype.convertFrom=function(c){var b=c.clone();return b.red=null,b},i.mont=function(c){return new q(c)};function q(B){O.call(this,B),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(q,O),q.prototype.convertTo=function(c){return this.imod(c.ushln(this.shift))},q.prototype.convertFrom=function(c){var b=this.imod(c.mul(this.rinv));return b.red=null,b},q.prototype.imul=function(c,b){if(c.isZero()||b.isZero())return c.words[0]=0,c.length=1,c;var y=c.imul(b),S=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),v=y.isub(S).iushrn(this.shift),U=v;return v.cmp(this.m)>=0?U=v.isub(this.m):v.cmpn(0)<0&&(U=v.iadd(this.m)),U._forceRed(this)},q.prototype.mul=function(c,b){if(c.isZero()||b.isZero())return new i(0)._forceRed(this);var y=c.mul(b),S=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),v=y.isub(S).iushrn(this.shift),U=v;return v.cmp(this.m)>=0?U=v.isub(this.m):v.cmpn(0)<0&&(U=v.iadd(this.m)),U._forceRed(this)},q.prototype.invm=function(c){var b=this.imod(c._invmp(this.m).mul(this.r2));return b._forceRed(this)}})(t,an)})(pl);var yl=pl.exports;const Ac=Js(yl),Y0="6.13.5";function L2(t,e,n){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 t===e)return}const s=new Error(`invalid value for type ${e}`);throw s.code="INVALID_ARGUMENT",s.argument=`value.${n}`,s.value=t,s}async function O2(t){const e=Object.keys(t);return(await Promise.all(e.map(r=>Promise.resolve(t[r])))).reduce((r,s,i)=>(r[e[i]]=s,r),{})}function Bc(t,e,n){for(let r in e){let s=e[r];const i=n?n[r]:null;i&&L2(s,i,r),Object.defineProperty(t,r,{enumerable:!0,value:s,writable:!1})}}function Vr(t){if(t==null)return"null";if(Array.isArray(t))return"[ "+t.map(Vr).join(", ")+" ]";if(t instanceof Uint8Array){const e="0123456789abcdef";let n="0x";for(let r=0;r<t.length;r++)n+=e[t[r]>>4],n+=e[t[r]&15];return n}if(typeof t=="object"&&typeof t.toJSON=="function")return Vr(t.toJSON());switch(typeof t){case"boolean":case"symbol":return t.toString();case"bigint":return BigInt(t).toString();case"number":return t.toString();case"string":return JSON.stringify(t);case"object":{const e=Object.keys(t);return e.sort(),"{ "+e.map(n=>`${Vr(n)}: ${Vr(t[n])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function X0(t,e){return t&&t.code===e}function N2(t){return X0(t,"CALL_EXCEPTION")}function Z0(t,e,n){let r=t;{const i=[];if(n){if("message"in n||"code"in n||"name"in n)throw new Error(`value will overwrite populated values: ${Vr(n)}`);for(const o in n){if(o==="shortMessage")continue;const a=n[o];i.push(o+"="+Vr(a))}}i.push(`code=${e}`),i.push(`version=${Y0}`),i.length&&(t+=" ("+i.join(", ")+")")}let s;switch(e){case"INVALID_ARGUMENT":s=new TypeError(t);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":s=new RangeError(t);break;default:s=new Error(t)}return Bc(s,{code:e}),n&&Object.assign(s,n),s.shortMessage==null&&Bc(s,{shortMessage:r}),s}function Un(t,e,n,r){if(!t)throw Z0(e,n,r)}function tr(t,e,n,r){Un(t,e,"INVALID_ARGUMENT",{argument:n,value:r})}function z2(t,e,n){n==null&&(n=""),n&&(n=": "+n),Un(t>=e,"missing argument"+n,"MISSING_ARGUMENT",{count:t,expectedCount:e}),Un(t<=e,"too many arguments"+n,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}const H2=["NFD","NFC","NFKD","NFKC"].reduce((t,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"&&"é".normalize("NFD")!=="é")throw new Error("broken");t.push(e)}catch{}return t},[]);function q2(t){Un(H2.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function K2(t,e,n){if(n==null&&(n=""),t!==e){let r=n,s="new";n&&(r+=".",s+=" "+n),Un(!1,`private constructor; use ${r}from* methods`,"UNSUPPORTED_OPERATION",{operation:s})}}function J0(t,e,n){if(t instanceof Uint8Array)return n?new Uint8Array(t):t;if(typeof t=="string"&&t.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const r=new Uint8Array((t.length-2)/2);let s=2;for(let i=0;i<r.length;i++)r[i]=parseInt(t.substring(s,s+2),16),s+=2;return r}tr(!1,"invalid BytesLike value",e||"value",t)}function Wr(t,e){return J0(t,e,!1)}function $2(t,e){return J0(t,e,!0)}function gl(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||typeof e=="number"&&t.length!==2+2*e||e===!0&&t.length%2!==0)}function j2(t){return gl(t,!0)||t instanceof Uint8Array}const uu="0123456789abcdef";function ci(t){const e=Wr(t);let n="0x";for(let r=0;r<e.length;r++){const s=e[r];n+=uu[(s&240)>>4]+uu[s&15]}return n}function V2(t){return"0x"+t.map(e=>ci(e).substring(2)).join("")}function G2(t){return gl(t,!0)?(t.length-2)/2:Wr(t).length}function Y2(t,e,n){const r=Wr(t);return n!=null&&n>r.length&&Un(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:n}),ci(r.slice(e??0,n??r.length))}function Q0(t,e,n){const r=Wr(t);Un(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),n?s.set(r,e-r.length):s.set(r,0),ci(s)}function X2(t,e){return Q0(t,e,!0)}function Z2(t,e){return Q0(t,e,!1)}function Vs(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function wl(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function J2(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Vs(t.outputLen),Vs(t.blockLen)}function xc(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function eh(t,e){wl(t);const n=e.outputLen;if(t.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}const Ta=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const th=t=>t instanceof Uint8Array,nh=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),Q2=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),e8=(t,e)=>t<<32-e|t>>>e,t8=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!t8)throw new Error("Non little-endian hardware is not supported");const n8=async()=>{};async function r8(t,e,n){let r=Date.now();for(let s=0;s<t;s++){n(s);const i=Date.now()-r;i>=0&&i<e||(await n8(),r+=i)}}function s8(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function El(t){if(typeof t=="string"&&(t=s8(t)),!th(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}function i8(...t){const e=new Uint8Array(t.reduce((r,s)=>r+s.length,0));let n=0;return t.forEach(r=>{if(!th(r))throw new Error("Uint8Array expected");e.set(r,n),n+=r.length}),e}class rh{clone(){return this._cloneInto()}}const o8={}.toString;function a8(t,e){if(e!==void 0&&o8.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(t,e)}function sh(t){const e=r=>t().update(El(r)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function c8(t=32){if(Ta&&typeof Ta.getRandomValues=="function")return Ta.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}const Ai=BigInt(2**32-1),Cc=BigInt(32);function ih(t,e=!1){return e?{h:Number(t&Ai),l:Number(t>>Cc&Ai)}:{h:Number(t>>Cc&Ai)|0,l:Number(t&Ai)|0}}function oh(t,e=!1){let n=new Uint32Array(t.length),r=new Uint32Array(t.length);for(let s=0;s<t.length;s++){const{h:i,l:o}=ih(t[s],e);[n[s],r[s]]=[i,o]}return[n,r]}const l8=(t,e)=>BigInt(t>>>0)<<Cc|BigInt(e>>>0),d8=(t,e,n)=>t>>>n,u8=(t,e,n)=>t<<32-n|e>>>n,f8=(t,e,n)=>t>>>n|e<<32-n,h8=(t,e,n)=>t<<32-n|e>>>n,m8=(t,e,n)=>t<<64-n|e>>>n-32,b8=(t,e,n)=>t>>>n-32|e<<64-n,p8=(t,e)=>e,y8=(t,e)=>t,ah=(t,e,n)=>t<<n|e>>>32-n,ch=(t,e,n)=>e<<n|t>>>32-n,lh=(t,e,n)=>e<<n-32|t>>>64-n,dh=(t,e,n)=>t<<n-32|e>>>64-n;function g8(t,e,n,r){const s=(e>>>0)+(r>>>0);return{h:t+n+(s/2**32|0)|0,l:s|0}}const w8=(t,e,n)=>(t>>>0)+(e>>>0)+(n>>>0),E8=(t,e,n,r)=>e+n+r+(t/2**32|0)|0,A8=(t,e,n,r)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0),B8=(t,e,n,r,s)=>e+n+r+s+(t/2**32|0)|0,x8=(t,e,n,r,s)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0)+(s>>>0),C8=(t,e,n,r,s,i)=>e+n+r+s+i+(t/2**32|0)|0,S8={fromBig:ih,split:oh,toBig:l8,shrSH:d8,shrSL:u8,rotrSH:f8,rotrSL:h8,rotrBH:m8,rotrBL:b8,rotr32H:p8,rotr32L:y8,rotlSH:ah,rotlSL:ch,rotlBH:lh,rotlBL:dh,add:g8,add3L:w8,add3H:E8,add4L:A8,add4H:B8,add5H:C8,add5L:x8},[uh,fh,hh]=[[],[],[]],D8=BigInt(0),Ds=BigInt(1),v8=BigInt(2),k8=BigInt(7),F8=BigInt(256),T8=BigInt(113);for(let t=0,e=Ds,n=1,r=0;t<24;t++){[n,r]=[r,(2*n+3*r)%5],uh.push(2*(5*r+n)),fh.push((t+1)*(t+2)/2%64);let s=D8;for(let i=0;i<7;i++)e=(e<<Ds^(e>>k8)*T8)%F8,e&v8&&(s^=Ds<<(Ds<<BigInt(i))-Ds);hh.push(s)}const[I8,U8]=oh(hh,!0),fu=(t,e,n)=>n>32?lh(t,e,n):ah(t,e,n),hu=(t,e,n)=>n>32?dh(t,e,n):ch(t,e,n);function _8(t,e=24){const n=new Uint32Array(10);for(let r=24-e;r<24;r++){for(let o=0;o<10;o++)n[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,l=(o+2)%10,f=n[l],m=n[l+1],p=fu(f,m,1)^n[a],C=hu(f,m,1)^n[a+1];for(let w=0;w<50;w+=10)t[o+w]^=p,t[o+w+1]^=C}let s=t[2],i=t[3];for(let o=0;o<24;o++){const a=fh[o],l=fu(s,i,a),f=hu(s,i,a),m=uh[o];s=t[m],i=t[m+1],t[m]=l,t[m+1]=f}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)n[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~n[(a+2)%10]&n[(a+4)%10]}t[0]^=I8[r],t[1]^=U8[r]}n.fill(0)}class Al extends rh{constructor(e,n,r,s=!1,i=24){if(super(),this.blockLen=e,this.suffix=n,this.outputLen=r,this.enableXOF=s,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Vs(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=nh(this.state)}keccak(){_8(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){xc(this);const{blockLen:n,state:r}=this;e=El(e);const s=e.length;for(let i=0;i<s;){const o=Math.min(n-this.pos,s-i);for(let a=0;a<o;a++)r[this.pos++]^=e[i++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:n,pos:r,blockLen:s}=this;e[r]^=n,n&128&&r===s-1&&this.keccak(),e[s-1]^=128,this.keccak()}writeInto(e){xc(this,!1),wl(e),this.finish();const n=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(n.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 Vs(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(eh(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:n,suffix:r,outputLen:s,rounds:i,enableXOF:o}=this;return e||(e=new Al(n,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 M8=(t,e,n)=>sh(()=>new Al(e,t,n)),R8=M8(1,136,256/8);let mh=!1;const bh=function(t){return R8(t)};let ph=bh;function ys(t){const e=Wr(t,"data");return ci(ph(e))}ys._=bh;ys.lock=function(){mh=!0};ys.register=function(t){if(mh)throw new TypeError("keccak256 is locked");ph=t};Object.freeze(ys);const W8=BigInt(0),P8=BigInt(36);function mu(t){t=t.toLowerCase();const e=t.substring(2).split(""),n=new Uint8Array(40);for(let s=0;s<40;s++)n[s]=e[s].charCodeAt(0);const r=Wr(ys(n));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 Bl={};for(let t=0;t<10;t++)Bl[String(t)]=String(t);for(let t=0;t<26;t++)Bl[String.fromCharCode(65+t)]=String(10+t);const bu=15;function L8(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(r=>Bl[r]).join("");for(;e.length>=bu;){let r=e.substring(0,bu);e=parseInt(r,10)%97+e.substring(r.length)}let n=String(98-parseInt(e,10)%97);for(;n.length<2;)n="0"+n;return n}const O8=function(){const t={};for(let e=0;e<36;e++){const n="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[n]=BigInt(e)}return t}();function N8(t){t=t.toLowerCase();let e=W8;for(let n=0;n<t.length;n++)e=e*P8+O8[t[n]];return e}function xr(t){if(tr(typeof t=="string","invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/)){t.startsWith("0x")||(t="0x"+t);const e=mu(t);return tr(!t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||e===t,"bad address checksum","address",t),e}if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){tr(t.substring(2,4)===L8(t),"bad icap checksum","address",t);let e=N8(t.substring(4)).toString(16);for(;e.length<40;)e="0"+e;return mu("0x"+e)}tr(!1,"invalid address","address",t)}function yh(t){return t&&typeof t.getAddress=="function"}function z8(t){try{return xr(t),!0}catch{}return!1}async function Ia(t,e){const n=await e;return(n==null||n==="0x0000000000000000000000000000000000000000")&&(Un(typeof t!="string","unconfigured name","UNCONFIGURED_NAME",{value:t}),tr(!1,"invalid AddressLike value; did not resolve to a value address","target",t)),xr(n)}function H8(t,e){if(typeof t=="string")return t.match(/^0x[0-9a-f]{40}$/i)?xr(t):(Un(e!=null,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),Ia(t,e.resolveName(t)));if(yh(t))return Ia(t,t.getAddress());if(t&&typeof t.then=="function")return Ia(t,t);tr(!1,"unsupported addressable value","target",t)}const q8=0,K8=0n,xl="Evm",$8=(t,e)=>({...t,from:e}),j8=(t,e)=>({...t,chainId:e}),V8="0x0000000000000000000000000000000000000000",Qt=class Qt{constructor(e){ie(this,"type","Native");ie(this,"address");if(Qt.instanceof(e)){const n=e;this.address=n.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=xr(e)}else if(e instanceof Uint8Array)e=this.trimUniversalAddress(e),this.address=xr(At.encode(e));else if(St.instanceof(e)){const n=this.trimUniversalAddress(e.toUint8Array());this.address=xr(At.encode(n))}else throw new Error(`Invalid EVM address ${e}`)}unwrap(){return this.address}toString(){return this.address}toNative(){return this}toUint8Array(){return At.decode(this.address)}toUniversalAddress(){return new St(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!==St.byteSize)throw new Error(`Invalid universal address, expected ${St.byteSize} bytes`);if(Us.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 z8(e)}static instanceof(e){return e.constructor.platform===Qt.platform}equals(e){return Qt.instanceof(e)?e.address===this.address:e.equals(this.toUniversalAddress())}};ie(Qt,"byteSize",20),ie(Qt,"platform",xl);let eo=Qt;tl(xl,eo);var Bi=G0.Buffer;function G8(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),n=0;n<e.length;n++)e[n]=255;for(var r=0;r<t.length;r++){var s=t.charAt(r),i=s.charCodeAt(0);if(e[i]!==255)throw new TypeError(s+" is ambiguous");e[i]=r}var o=t.length,a=t.charAt(0),l=Math.log(o)/Math.log(256),f=Math.log(256)/Math.log(o);function m(w){if((Array.isArray(w)||w instanceof Uint8Array)&&(w=Bi.from(w)),!Bi.isBuffer(w))throw new TypeError("Expected Buffer");if(w.length===0)return"";for(var F=0,I=0,x=0,E=w.length;x!==E&&w[x]===0;)x++,F++;for(var _=(E-x)*f+1>>>0,k=new Uint8Array(_);x!==E;){for(var P=w[x],M=0,$=_-1;(P!==0||M<I)&&$!==-1;$--,M++)P+=256*k[$]>>>0,k[$]=P%o>>>0,P=P/o>>>0;if(P!==0)throw new Error("Non-zero carry");I=M,x++}for(var G=_-I;G!==_&&k[G]===0;)G++;for(var Y=a.repeat(F);G<_;++G)Y+=t.charAt(k[G]);return Y}function p(w){if(typeof w!="string")throw new TypeError("Expected String");if(w.length===0)return Bi.alloc(0);for(var F=0,I=0,x=0;w[F]===a;)I++,F++;for(var E=(w.length-F)*l+1>>>0,_=new Uint8Array(E);F<w.length;){var k=w.charCodeAt(F);if(k>255)return;var P=e[k];if(P===255)return;for(var M=0,$=E-1;(P!==0||M<x)&&$!==-1;$--,M++)P+=o*_[$]>>>0,_[$]=P%256>>>0,P=P/256>>>0;if(P!==0)throw new Error("Non-zero carry");x=M,F++}for(var G=E-x;G!==E&&_[G]===0;)G++;var Y=Bi.allocUnsafe(I+(E-G));Y.fill(0,0,I);for(var L=I;G!==E;)Y[L++]=_[G++];return Y}function C(w){var F=p(w);if(F)return F;throw new Error("Non-base"+o+" character")}return{encode:m,decodeUnsafe:p,decode:C}}var Y8=G8,X8=Y8,Z8="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",gh=X8(Z8);const Ct=Js(gh);var Ft={};function Hn(t,e,n){return e<=t&&t<=n}function Mo(t){if(t===void 0)return{};if(t===Object(t))return t;throw TypeError("Could not convert argument to dictionary")}function J8(t){for(var e=String(t),n=e.length,r=0,s=[];r<n;){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===n-1)s.push(65533);else{var o=t.charCodeAt(r+1);if(56320<=o&&o<=57343){var a=i&1023,l=o&1023;s.push(65536+(a<<10)+l),r+=1}else s.push(65533)}r+=1}return s}function Q8(t){for(var e="",n=0;n<t.length;++n){var r=t[n];r<=65535?e+=String.fromCharCode(r):(r-=65536,e+=String.fromCharCode((r>>10)+55296,(r&1023)+56320))}return e}var to=-1;function Cl(t){this.tokens=[].slice.call(t)}Cl.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():to},prepend:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.unshift(e.pop());else this.tokens.unshift(t)},push:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.push(e.shift());else this.tokens.push(t)}};var is=-1;function Ua(t,e){if(t)throw TypeError("Decoder error");return e||65533}var no="utf-8";function ro(t,e){if(!(this instanceof ro))return new ro(t,e);if(t=t!==void 0?String(t).toLowerCase():no,t!==no)throw new Error("Encoding not supported. Only utf-8 is supported");e=Mo(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})}ro.prototype={decode:function(e,n){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),n=Mo(n),this._streaming||(this._decoder=new e3({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!n.stream;for(var s=new Cl(r),i=[],o;!s.endOfStream()&&(o=this._decoder.handler(s,s.read()),o!==is);)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===is)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),Q8(i)}};function so(t,e){if(!(this instanceof so))return new so(t,e);if(t=t!==void 0?String(t).toLowerCase():no,t!==no)throw new Error("Encoding not supported. Only utf-8 is supported");e=Mo(e),this._streaming=!1,this._encoder=null,this._options={fatal:!!e.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}so.prototype={encode:function(e,n){e=e?String(e):"",n=Mo(n),this._streaming||(this._encoder=new t3(this._options)),this._streaming=!!n.stream;for(var r=[],s=new Cl(J8(e)),i;!s.endOfStream()&&(i=this._encoder.handler(s,s.read()),i!==is);)Array.isArray(i)?r.push.apply(r,i):r.push(i);if(!this._streaming){for(;i=this._encoder.handler(s,s.read()),i!==is;)Array.isArray(i)?r.push.apply(r,i):r.push(i);this._encoder=null}return new Uint8Array(r)}};function e3(t){var e=t.fatal,n=0,r=0,s=0,i=128,o=191;this.handler=function(a,l){if(l===to&&s!==0)return s=0,Ua(e);if(l===to)return is;if(s===0){if(Hn(l,0,127))return l;if(Hn(l,194,223))s=1,n=l-192;else if(Hn(l,224,239))l===224&&(i=160),l===237&&(o=159),s=2,n=l-224;else if(Hn(l,240,244))l===240&&(i=144),l===244&&(o=143),s=3,n=l-240;else return Ua(e);return n=n<<6*s,null}if(!Hn(l,i,o))return n=s=r=0,i=128,o=191,a.prepend(l),Ua(e);if(i=128,o=191,r+=1,n+=l-128<<6*(s-r),r!==s)return null;var f=n;return n=s=r=0,f}}function t3(t){t.fatal,this.handler=function(e,n){if(n===to)return is;if(Hn(n,0,127))return n;var r,s;Hn(n,128,2047)?(r=1,s=192):Hn(n,2048,65535)?(r=2,s=224):Hn(n,65536,1114111)&&(r=3,s=240);for(var i=[(n>>6*r)+s];r>0;){var o=n>>6*(r-1);i.push(128|o&63),r-=1}return i}}const n3=Object.freeze(Object.defineProperty({__proto__:null,TextDecoder:ro,TextEncoder:so},Symbol.toStringTag,{value:"Module"})),r3=Ic(n3);var s3=an&&an.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),i3=an&&an.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Rn=an&&an.__decorate||function(t,e,n,r){var s=arguments.length,i=s<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s<3?o(i):s>3?o(e,n,i):o(e,n))||i);return s>3&&i&&Object.defineProperty(e,n,i),i},o3=an&&an.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.hasOwnProperty.call(t,n)&&s3(e,t,n);return i3(e,t),e},wh=an&&an.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ft,"__esModule",{value:!0});var Eh=Ft.deserializeUnchecked=Dh=Ft.deserialize=Sh=Ft.serialize=Ft.BinaryReader=Ft.BinaryWriter=Ft.BorshError=Ft.baseDecode=Ft.baseEncode=void 0;const nr=wh(yl),Ah=wh(gh),a3=o3(r3),c3=typeof TextDecoder!="function"?a3.TextDecoder:TextDecoder,l3=new c3("utf-8",{fatal:!0});function d3(t){return typeof t=="string"&&(t=Ne.Buffer.from(t,"utf8")),Ah.default.encode(Ne.Buffer.from(t))}Ft.baseEncode=d3;function u3(t){return Ne.Buffer.from(Ah.default.decode(t))}Ft.baseDecode=u3;const _a=1024;class Nt 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(".")}}Ft.BorshError=Nt;class Bh{constructor(){this.buf=Ne.Buffer.alloc(_a),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=Ne.Buffer.concat([this.buf,Ne.Buffer.alloc(_a)]))}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(Ne.Buffer.from(new nr.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(Ne.Buffer.from(new nr.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(Ne.Buffer.from(new nr.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(Ne.Buffer.from(new nr.default(e).toArray("le",64)))}writeBuffer(e){this.buf=Ne.Buffer.concat([Ne.Buffer.from(this.buf.subarray(0,this.length)),e,Ne.Buffer.alloc(_a)]),this.length+=e.length}writeString(e){this.maybeResize();const n=Ne.Buffer.from(e,"utf8");this.writeU32(n.length),this.writeBuffer(n)}writeFixedArray(e){this.writeBuffer(Ne.Buffer.from(e))}writeArray(e,n){this.maybeResize(),this.writeU32(e.length);for(const r of e)this.maybeResize(),n(r)}toArray(){return this.buf.subarray(0,this.length)}}Ft.BinaryWriter=Bh;function Wn(t,e,n){const r=n.value;n.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 Nt("Reached the end of buffer when deserializing")}throw i}}}class Zt{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 nr.default(e,"le")}readU128(){const e=this.readBuffer(16);return new nr.default(e,"le")}readU256(){const e=this.readBuffer(32);return new nr.default(e,"le")}readU512(){const e=this.readBuffer(64);return new nr.default(e,"le")}readBuffer(e){if(this.offset+e>this.buf.length)throw new Nt(`Expected buffer length ${e} isn't within bounds`);const n=this.buf.slice(this.offset,this.offset+e);return this.offset+=e,n}readString(){const e=this.readU32(),n=this.readBuffer(e);try{return l3.decode(n)}catch(r){throw new Nt(`Error decoding UTF-8 string: ${r}`)}}readFixedArray(e){return new Uint8Array(this.readBuffer(e))}readArray(e){const n=this.readU32(),r=Array();for(let s=0;s<n;++s)r.push(e());return r}}Rn([Wn],Zt.prototype,"readU8",null);Rn([Wn],Zt.prototype,"readU16",null);Rn([Wn],Zt.prototype,"readU32",null);Rn([Wn],Zt.prototype,"readU64",null);Rn([Wn],Zt.prototype,"readU128",null);Rn([Wn],Zt.prototype,"readU256",null);Rn([Wn],Zt.prototype,"readU512",null);Rn([Wn],Zt.prototype,"readString",null);Rn([Wn],Zt.prototype,"readFixedArray",null);Rn([Wn],Zt.prototype,"readArray",null);Ft.BinaryReader=Zt;function xh(t){return t.charAt(0).toUpperCase()+t.slice(1)}function ur(t,e,n,r,s){try{if(typeof r=="string")s[`write${xh(r)}`](n);else if(r instanceof Array)if(typeof r[0]=="number"){if(n.length!==r[0])throw new Nt(`Expecting byte array of length ${r[0]}, but got ${n.length} bytes`);s.writeFixedArray(n)}else if(r.length===2&&typeof r[1]=="number"){if(n.length!==r[1])throw new Nt(`Expecting byte array of length ${r[1]}, but got ${n.length} bytes`);for(let i=0;i<r[1];i++)ur(t,null,n[i],r[0],s)}else s.writeArray(n,i=>{ur(t,e,i,r[0],s)});else if(r.kind!==void 0)switch(r.kind){case"option":{n==null?s.writeU8(0):(s.writeU8(1),ur(t,e,n,r.type,s));break}case"map":{s.writeU32(n.size),n.forEach((i,o)=>{ur(t,e,o,r.key,s),ur(t,e,i,r.value,s)});break}default:throw new Nt(`FieldType ${r} unrecognized`)}else Ch(t,n,s)}catch(i){throw i instanceof Nt&&i.addToFieldPath(e),i}}function Ch(t,e,n){if(typeof e.borshSerialize=="function"){e.borshSerialize(n);return}const r=t.get(e.constructor);if(!r)throw new Nt(`Class ${e.constructor.name} is missing in schema`);if(r.kind==="struct")r.fields.map(([s,i])=>{ur(t,s,e[s],i,n)});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){n.writeU8(i),ur(t,o,e[o],a,n);break}}}else throw new Nt(`Unexpected schema kind: ${r.kind} for ${e.constructor.name}`)}function f3(t,e,n=Bh){const r=new n;return Ch(t,e,r),r.toArray()}var Sh=Ft.serialize=f3;function fr(t,e,n,r){try{if(typeof n=="string")return r[`read${xh(n)}`]();if(n instanceof Array){if(typeof n[0]=="number")return r.readFixedArray(n[0]);if(typeof n[1]=="number"){const s=[];for(let i=0;i<n[1];i++)s.push(fr(t,null,n[0],r));return s}else return r.readArray(()=>fr(t,e,n[0],r))}if(n.kind==="option")return r.readU8()?fr(t,e,n.type,r):void 0;if(n.kind==="map"){let s=new Map;const i=r.readU32();for(let o=0;o<i;o++){const a=fr(t,e,n.key,r),l=fr(t,e,n.value,r);s.set(a,l)}return s}return Sl(t,n,r)}catch(s){throw s instanceof Nt&&s.addToFieldPath(e),s}}function Sl(t,e,n){if(typeof e.borshDeserialize=="function")return e.borshDeserialize(n);const r=t.get(e);if(!r)throw new Nt(`Class ${e.name} is missing in schema`);if(r.kind==="struct"){const s={};for(const[i,o]of t.get(e).fields)s[i]=fr(t,i,o,n);return new e(s)}if(r.kind==="enum"){const s=n.readU8();if(s>=r.values.length)throw new Nt(`Enum index: ${s} is out of range`);const[i,o]=r.values[s],a=fr(t,i,o,n);return new e({[i]:a})}throw new Nt(`Unexpected schema kind: ${r.kind} for ${e.constructor.name}`)}function h3(t,e,n,r=Zt){const s=new r(n),i=Sl(t,e,s);if(s.offset<n.length)throw new Nt(`Unexpected ${n.length-s.offset} bytes after deserialized data`);return i}var Dh=Ft.deserialize=h3;function m3(t,e,n,r=Zt){const s=new r(n);return Sl(t,e,s)}Eh=Ft.deserializeUnchecked=m3;var H={};Object.defineProperty(H,"__esModule",{value:!0});exports.s16=H.s16=H.s8=H.nu64be=H.u48be=H.u40be=H.u32be=H.u24be=H.u16be=vt=H.nu64=H.u48=H.u40=exports.u32=H.u32=H.u24=exports.u16=H.u16=exports.u8=H.u8=sr=H.offset=exports.greedy=H.greedy=H.Constant=H.UTF8=H.CString=H.Blob=H.Boolean=H.BitField=H.BitStructure=H.VariantLayout=H.Union=H.UnionLayoutDiscriminator=H.UnionDiscriminator=H.Structure=H.Sequence=H.DoubleBE=H.Double=H.FloatBE=H.Float=H.NearInt64BE=H.NearInt64=H.NearUInt64BE=H.NearUInt64=H.IntBE=H.Int=H.UIntBE=H.UInt=H.OffsetLayout=H.GreedyCount=H.ExternalLayout=H.bindConstructorLayout=H.nameWithProperty=H.Layout=H.uint8ArrayToBuffer=H.checkUint8Array=void 0;H.constant=H.utf8=H.cstr=exports.blob=H.blob=H.unionLayoutDiscriminator=H.union=exports.seq=H.seq=H.bits=exports.struct=H.struct=H.f64be=H.f64=H.f32be=H.f32=H.ns64be=H.s48be=H.s40be=H.s32be=H.s24be=H.s16be=exports.ns64=H.ns64=H.s48=H.s40=H.s32=H.s24=void 0;const Dl=ae;function gs(t){if(!(t instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}H.checkUint8Array=gs;function De(t){return gs(t),Dl.Buffer.from(t.buffer,t.byteOffset,t.length)}H.uint8ArrayToBuffer=De;class Te{constructor(e,n){if(!Number.isInteger(e))throw new TypeError("span must be an integer");this.span=e,this.property=n}makeDestinationObject(){return{}}getSpan(e,n){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(e){const n=Object.create(this.constructor.prototype);return Object.assign(n,this),n.property=e,n}fromArray(e){}}H.Layout=Te;function vl(t,e){return e.property?t+"["+e.property+"]":t}H.nameWithProperty=vl;function b3(t,e){if(typeof t!="function")throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(t,"layout_"))throw new Error("Class is already bound to a layout");if(!(e&&e instanceof Te))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");t.layout_=e,e.boundConstructor_=t,e.makeDestinationObject=()=>new t,Object.defineProperty(t.prototype,"encode",{value(n,r){return e.encode(this,n,r)},writable:!0}),Object.defineProperty(t,"decode",{value(n,r){return e.decode(n,r)},writable:!0})}H.bindConstructorLayout=b3;class $t extends Te{isCount(){throw new Error("ExternalLayout is abstract")}}H.ExternalLayout=$t;class vh extends $t{constructor(e=1,n){if(!Number.isInteger(e)||0>=e)throw new TypeError("elementSpan must be a (positive) integer");super(-1,n),this.elementSpan=e}isCount(){return!0}decode(e,n=0){gs(e);const r=e.length-n;return Math.floor(r/this.elementSpan)}encode(e,n,r){return 0}}H.GreedyCount=vh;class kl extends $t{constructor(e,n=0,r){if(!(e instanceof Te))throw new TypeError("layout must be a Layout");if(!Number.isInteger(n))throw new TypeError("offset must be integer or undefined");super(e.span,r||e.property),this.layout=e,this.offset=n}isCount(){return this.layout instanceof on||this.layout instanceof mn}decode(e,n=0){return this.layout.decode(e,n+this.offset)}encode(e,n,r=0){return this.layout.encode(e,n,r+this.offset)}}H.OffsetLayout=kl;class on extends Te{constructor(e,n){if(super(e,n),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,n=0){return De(e).readUIntLE(n,this.span)}encode(e,n,r=0){return De(n).writeUIntLE(e,r,this.span),this.span}}H.UInt=on;class mn extends Te{constructor(e,n){if(super(e,n),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,n=0){return De(e).readUIntBE(n,this.span)}encode(e,n,r=0){return De(n).writeUIntBE(e,r,this.span),this.span}}H.UIntBE=mn;class Pr extends Te{constructor(e,n){if(super(e,n),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,n=0){return De(e).readIntLE(n,this.span)}encode(e,n,r=0){return De(n).writeIntLE(e,r,this.span),this.span}}H.Int=Pr;class ws extends Te{constructor(e,n){if(super(e,n),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,n=0){return De(e).readIntBE(n,this.span)}encode(e,n,r=0){return De(n).writeIntBE(e,r,this.span),this.span}}H.IntBE=ws;const Sc=Math.pow(2,32);function Ro(t){const e=Math.floor(t/Sc),n=t-e*Sc;return{hi32:e,lo32:n}}function Wo(t,e){return t*Sc+e}class kh extends Te{constructor(e){super(8,e)}decode(e,n=0){const r=De(e),s=r.readUInt32LE(n),i=r.readUInt32LE(n+4);return Wo(i,s)}encode(e,n,r=0){const s=Ro(e),i=De(n);return i.writeUInt32LE(s.lo32,r),i.writeUInt32LE(s.hi32,r+4),8}}H.NearUInt64=kh;class Fh extends Te{constructor(e){super(8,e)}decode(e,n=0){const r=De(e),s=r.readUInt32BE(n),i=r.readUInt32BE(n+4);return Wo(s,i)}encode(e,n,r=0){const s=Ro(e),i=De(n);return i.writeUInt32BE(s.hi32,r),i.writeUInt32BE(s.lo32,r+4),8}}H.NearUInt64BE=Fh;class Th extends Te{constructor(e){super(8,e)}decode(e,n=0){const r=De(e),s=r.readUInt32LE(n),i=r.readInt32LE(n+4);return Wo(i,s)}encode(e,n,r=0){const s=Ro(e),i=De(n);return i.writeUInt32LE(s.lo32,r),i.writeInt32LE(s.hi32,r+4),8}}H.NearInt64=Th;class Ih extends Te{constructor(e){super(8,e)}decode(e,n=0){const r=De(e),s=r.readInt32BE(n),i=r.readUInt32BE(n+4);return Wo(s,i)}encode(e,n,r=0){const s=Ro(e),i=De(n);return i.writeInt32BE(s.hi32,r),i.writeUInt32BE(s.lo32,r+4),8}}H.NearInt64BE=Ih;class Uh extends Te{constructor(e){super(4,e)}decode(e,n=0){return De(e).readFloatLE(n)}encode(e,n,r=0){return De(n).writeFloatLE(e,r),4}}H.Float=Uh;class _h extends Te{constructor(e){super(4,e)}decode(e,n=0){return De(e).readFloatBE(n)}encode(e,n,r=0){return De(n).writeFloatBE(e,r),4}}H.FloatBE=_h;class Mh extends Te{constructor(e){super(8,e)}decode(e,n=0){return De(e).readDoubleLE(n)}encode(e,n,r=0){return De(n).writeDoubleLE(e,r),8}}H.Double=Mh;class Rh extends Te{constructor(e){super(8,e)}decode(e,n=0){return De(e).readDoubleBE(n)}encode(e,n,r=0){return De(n).writeDoubleBE(e,r),8}}H.DoubleBE=Rh;class Wh extends Te{constructor(e,n,r){if(!(e instanceof Te))throw new TypeError("elementLayout must be a Layout");if(!(n instanceof $t&&n.isCount()||Number.isInteger(n)&&0<=n))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let s=-1;!(n instanceof $t)&&0<e.span&&(s=n*e.span),super(s,r),this.elementLayout=e,this.count=n}getSpan(e,n=0){if(0<=this.span)return this.span;let r=0,s=this.count;if(s instanceof $t&&(s=s.decode(e,n)),0<this.elementLayout.span)r=s*this.elementLayout.span;else{let i=0;for(;i<s;)r+=this.elementLayout.getSpan(e,n+r),++i}return r}decode(e,n=0){const r=[];let s=0,i=this.count;for(i instanceof $t&&(i=i.decode(e,n));s<i;)r.push(this.elementLayout.decode(e,n)),n+=this.elementLayout.getSpan(e,n),s+=1;return r}encode(e,n,r=0){const s=this.elementLayout,i=e.reduce((o,a)=>o+s.encode(a,n,r+o),0);return this.count instanceof $t&&this.count.encode(e.length,n,r),i}}H.Sequence=Wh;class Ph extends Te{constructor(e,n,r){if(!(Array.isArray(e)&&e.reduce((i,o)=>i&&o instanceof Te,!0)))throw new TypeError("fields must be array of Layout instances");typeof n=="boolean"&&r===void 0&&(r=n,n=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,n),this.fields=e,this.decodePrefixes=!!r}getSpan(e,n=0){if(0<=this.span)return this.span;let r=0;try{r=this.fields.reduce((s,i)=>{const o=i.getSpan(e,n);return n+=o,s+o},0)}catch{throw new RangeError("indeterminate span")}return r}decode(e,n=0){gs(e);const r=this.makeDestinationObject();for(const s of this.fields)if(s.property!==void 0&&(r[s.property]=s.decode(e,n)),n+=s.getSpan(e,n),this.decodePrefixes&&e.length===n)break;return r}encode(e,n,r=0){const s=r;let i=0,o=0;for(const a of this.fields){let l=a.span;if(o=0<l?l:0,a.property!==void 0){const f=e[a.property];f!==void 0&&(o=a.encode(f,n,r),0>l&&(l=a.getSpan(n,r)))}i=r,r+=l}return i+o-s}fromArray(e){const n=this.makeDestinationObject();for(const r of this.fields)r.property!==void 0&&0<e.length&&(n[r.property]=e.shift());return n}layoutFor(e){if(typeof e!="string")throw new TypeError("property must be string");for(const n of this.fields)if(n.property===e)return n}offsetOf(e){if(typeof e!="string")throw new TypeError("property must be string");let n=0;for(const r of this.fields){if(r.property===e)return n;0>r.span?n=-1:0<=n&&(n+=r.span)}}}H.Structure=Ph;class Fl{constructor(e){this.property=e}decode(e,n){throw new Error("UnionDiscriminator is abstract")}encode(e,n,r){throw new Error("UnionDiscriminator is abstract")}}H.UnionDiscriminator=Fl;class io extends Fl{constructor(e,n){if(!(e instanceof $t&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(n||e.property||"variant"),this.layout=e}decode(e,n){return this.layout.decode(e,n)}encode(e,n,r){return this.layout.encode(e,n,r)}}H.UnionLayoutDiscriminator=io;class Tl extends Te{constructor(e,n,r){let s;if(e instanceof on||e instanceof mn)s=new io(new kl(e));else if(e instanceof $t&&e.isCount())s=new io(e);else if(e instanceof Fl)s=e;else throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(n===void 0&&(n=null),!(n===null||n instanceof Te))throw new TypeError("defaultLayout must be null or a Layout");if(n!==null){if(0>n.span)throw new Error("defaultLayout must have constant span");n.property===void 0&&(n=n.replicate("content"))}let i=-1;n&&(i=n.span,0<=i&&(e instanceof on||e instanceof mn)&&(i+=s.layout.span)),super(i,r),this.discriminator=s,this.usesPrefixDiscriminator=e instanceof on||e instanceof mn,this.defaultLayout=n,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,n=0){if(0<=this.span)return this.span;const r=this.getVariant(e,n);if(!r)throw new Error("unable to determine span for unrecognized variant");return r.getSpan(e,n)}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 n=this.registry[e[this.discriminator.property]];if(n&&(!n.layout||n.property&&Object.prototype.hasOwnProperty.call(e,n.property)))return n}else for(const n in this.registry){const r=this.registry[n];if(r.property&&Object.prototype.hasOwnProperty.call(e,r.property))return r}throw new Error("unable to infer src variant")}decode(e,n=0){let r;const s=this.discriminator,i=s.decode(e,n),o=this.registry[i];if(o===void 0){const a=this.defaultLayout;let l=0;this.usesPrefixDiscriminator&&(l=s.layout.span),r=this.makeDestinationObject(),r[s.property]=i,r[a.property]=a.decode(e,n+l)}else r=o.decode(e,n);return r}encode(e,n,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],n,r),a+o.encode(e[o.property],n,r+a)}return s.encode(e,n,r)}addVariant(e,n,r){const s=new Lh(this,e,n,r);return this.registry[e]=s,s}getVariant(e,n=0){let r;return e instanceof Uint8Array?r=this.discriminator.decode(e,n):r=e,this.registry[r]}}H.Union=Tl;class Lh extends Te{constructor(e,n,r,s){if(!(e instanceof Tl))throw new TypeError("union must be a Union");if(!Number.isInteger(n)||0>n)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 Te))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=n,this.layout=r||null}getSpan(e,n=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,n+r)),r+s}decode(e,n=0){const r=this.makeDestinationObject();if(this!==this.union.getVariant(e,n))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,n+s):this.property?r[this.property]=!0:this.union.usesPrefixDiscriminator&&(r[this.union.discriminator.property]=this.variant),r}encode(e,n,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,n,r);let i=s;if(this.layout&&(this.layout.encode(e[this.property],n,r+s),i+=this.layout.getSpan(n,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)}}H.VariantLayout=Lh;function qr(t){return 0>t&&(t+=4294967296),t}class Il extends Te{constructor(e,n,r){if(!(e instanceof on||e instanceof mn))throw new TypeError("word must be a UInt or UIntBE layout");if(typeof n=="string"&&r===void 0&&(r=n,n=!1),4<e.span)throw new RangeError("word cannot exceed 32 bits");super(e.span,r),this.word=e,this.msb=!!n,this.fields=[];let s=0;this._packedSetValue=function(i){return s=qr(i),this},this._packedGetValue=function(){return s}}decode(e,n=0){const r=this.makeDestinationObject(),s=this.word.decode(e,n);this._packedSetValue(s);for(const i of this.fields)i.property!==void 0&&(r[i.property]=i.decode(e));return r}encode(e,n,r=0){const s=this.word.decode(n,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(),n,r)}addField(e,n){const r=new Ul(this,e,n);return this.fields.push(r),r}addBoolean(e){const n=new Oh(this,e);return this.fields.push(n),n}fieldFor(e){if(typeof e!="string")throw new TypeError("property must be string");for(const n of this.fields)if(n.property===e)return n}}H.BitStructure=Il;class Ul{constructor(e,n,r){if(!(e instanceof Il))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(n)||0>=n)throw new TypeError("bits must be positive integer");const s=8*e.span,i=e.fields.reduce((o,a)=>o+a.bits,0);if(n+i>s)throw new Error("bits too long for span remainder ("+(s-i)+" of "+s+" remain)");this.container=e,this.bits=n,this.valueMask=(1<<n)-1,n===32&&(this.valueMask=4294967295),this.start=i,this.container.msb&&(this.start=s-i-n),this.wordMask=qr(this.valueMask<<this.start),this.property=r}decode(e,n){const r=this.container._packedGetValue();return qr(r&this.wordMask)>>>this.start}encode(e){if(typeof e!="number"||!Number.isInteger(e)||e!==qr(e&this.valueMask))throw new TypeError(vl("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);const n=this.container._packedGetValue(),r=qr(e<<this.start);this.container._packedSetValue(qr(n&~this.wordMask)|r)}}H.BitField=Ul;let Oh=class extends Ul{constructor(e,n){super(e,1,n)}decode(e,n){return!!super.decode(e,n)}encode(e){typeof e=="boolean"&&(e=+e),super.encode(e)}};H.Boolean=Oh;let Nh=class extends Te{constructor(e,n){if(!(e instanceof $t&&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 $t||(r=e),super(r,n),this.length=e}getSpan(e,n){let r=this.span;return 0>r&&(r=this.length.decode(e,n)),r}decode(e,n=0){let r=this.span;return 0>r&&(r=this.length.decode(e,n)),De(e).slice(n,n+r)}encode(e,n,r){let s=this.length;if(this.length instanceof $t&&(s=e.length),!(e instanceof Uint8Array&&s===e.length))throw new TypeError(vl("Blob.encode",this)+" requires (length "+s+") Uint8Array as src");if(r+s>n.length)throw new RangeError("encoding overruns Uint8Array");const i=De(e);return De(n).write(i.toString("hex"),r,s,"hex"),this.length instanceof $t&&this.length.encode(s,n,r),s}};H.Blob=Nh;class zh extends Te{constructor(e){super(-1,e)}getSpan(e,n=0){gs(e);let r=n;for(;r<e.length&&e[r]!==0;)r+=1;return 1+r-n}decode(e,n=0){const r=this.getSpan(e,n);return De(e).slice(n,n+r-1).toString("utf-8")}encode(e,n,r=0){typeof e!="string"&&(e=String(e));const s=Dl.Buffer.from(e,"utf8"),i=s.length;if(r+i>n.length)throw new RangeError("encoding overruns Buffer");const o=De(n);return s.copy(o,r),o[r+i]=0,i+1}}H.CString=zh;class Hh extends Te{constructor(e,n){if(typeof e=="string"&&n===void 0&&(n=e,e=void 0),e===void 0)e=-1;else if(!Number.isInteger(e))throw new TypeError("maxSpan must be an integer");super(-1,n),this.maxSpan=e}getSpan(e,n=0){return gs(e),e.length-n}decode(e,n=0){const r=this.getSpan(e,n);if(0<=this.maxSpan&&this.maxSpan<r)throw new RangeError("text length exceeds maxSpan");return De(e).slice(n,n+r).toString("utf-8")}encode(e,n,r=0){typeof e!="string"&&(e=String(e));const s=Dl.Buffer.from(e,"utf8"),i=s.length;if(0<=this.maxSpan&&this.maxSpan<i)throw new RangeError("text length exceeds maxSpan");if(r+i>n.length)throw new RangeError("encoding overruns Buffer");return s.copy(De(n),r),i}}H.UTF8=Hh;class qh extends Te{constructor(e,n){super(0,n),this.value=e}decode(e,n){return this.value}encode(e,n,r){return 0}}H.Constant=qh;exports.greedy=H.greedy=(t,e)=>new vh(t,e);var sr=H.offset=(t,e,n)=>new kl(t,e,n);exports.u8=H.u8=t=>new on(1,t);exports.u16=H.u16=t=>new on(2,t);H.u24=t=>new on(3,t);exports.u32=H.u32=t=>new on(4,t);H.u40=t=>new on(5,t);H.u48=t=>new on(6,t);var vt=H.nu64=t=>new kh(t);H.u16be=t=>new mn(2,t);H.u24be=t=>new mn(3,t);H.u32be=t=>new mn(4,t);H.u40be=t=>new mn(5,t);H.u48be=t=>new mn(6,t);H.nu64be=t=>new Fh(t);H.s8=t=>new Pr(1,t);exports.s16=H.s16=t=>new Pr(2,t);H.s24=t=>new Pr(3,t);H.s32=t=>new Pr(4,t);H.s40=t=>new Pr(5,t);H.s48=t=>new Pr(6,t);exports.ns64=H.ns64=t=>new Th(t);H.s16be=t=>new ws(2,t);H.s24be=t=>new ws(3,t);H.s32be=t=>new ws(4,t);H.s40be=t=>new ws(5,t);H.s48be=t=>new ws(6,t);H.ns64be=t=>new Ih(t);H.f32=t=>new Uh(t);H.f32be=t=>new _h(t);H.f64=t=>new Mh(t);H.f64be=t=>new Rh(t);exports.struct=H.struct=(t,e,n)=>new Ph(t,e,n);H.bits=(t,e,n)=>new Il(t,e,n);exports.seq=H.seq=(t,e,n)=>new Wh(t,e,n);H.union=(t,e,n)=>new Tl(t,e,n);H.unionLayoutDiscriminator=(t,e)=>new io(t,e);exports.blob=H.blob=(t,e)=>new Nh(t,e);H.cstr=t=>new zh(t);H.utf8=(t,e)=>new Hh(t,e);H.constant=(t,e)=>new qh(t,e);var li={};Object.defineProperty(li,"__esModule",{value:!0});function p3(t){{const e=Ne.Buffer.from(t);e.reverse();const n=e.toString("hex");return n.length===0?BigInt(0):BigInt(`0x${n}`)}}var Kh=li.toBigIntLE=p3;function y3(t){{const e=t.toString("hex");return e.length===0?BigInt(0):BigInt(`0x${e}`)}}li.toBigIntBE=y3;function g3(t,e){{const n=t.toString(16),r=Ne.Buffer.from(n.padStart(e*2,"0").slice(0,e*2),"hex");return r.reverse(),r}}var _l=li.toBufferLE=g3;function w3(t,e){{const n=t.toString(16);return Ne.Buffer.from(n.padStart(e*2,"0").slice(0,e*2),"hex")}}li.toBufferBE=w3;class E3 extends TypeError{constructor(e,n){let r;const{message:s,explanation:i,...o}=e,{path:a}=e,l=a.length===0?s:`At path: ${a.join(".")} -- ${s}`;super(i??l),i!=null&&(this.cause=l),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...n()])}}function A3(t){return di(t)&&typeof t[Symbol.iterator]=="function"}function di(t){return typeof t=="object"&&t!=null}function oo(t){return di(t)&&!Array.isArray(t)}function yn(t){return typeof t=="symbol"?t.toString():typeof t=="string"?JSON.stringify(t):`${t}`}function B3(t){const{done:e,value:n}=t.next();return e?void 0:n}function x3(t,e,n,r){if(t===!0)return;t===!1?t={}:typeof t=="string"&&(t={message:t});const{path:s,branch:i}=e,{type:o}=n,{refinement:a,message:l=`Expected a value of type \`${o}\`${a?` with refinement \`${a}\``:""}, but received: \`${yn(r)}\``}=t;return{value:r,type:o,refinement:a,key:s[s.length-1],path:s,branch:i,...t,message:l}}function*pu(t,e,n,r){A3(t)||(t=[t]);for(const s of t){const i=x3(s,e,n,r);i&&(yield i)}}function*Ml(t,e,n={}){const{path:r=[],branch:s=[t],coerce:i=!1,mask:o=!1}=n,a={path:r,branch:s,mask:o};i&&(t=e.coercer(t,a));let l="valid";for(const f of e.validator(t,a))f.explanation=n.message,l="not_valid",yield[f,void 0];for(let[f,m,p]of e.entries(t,a)){const C=Ml(m,p,{path:f===void 0?r:[...r,f],branch:f===void 0?s:[...s,m],coerce:i,mask:o,message:n.message});for(const w of C)w[0]?(l=w[0].refinement!=null?"not_refined":"not_valid",yield[w[0],void 0]):i&&(m=w[1],f===void 0?t=m:t instanceof Map?t.set(f,m):t instanceof Set?t.add(m):di(t)&&(m!==void 0||f in t)&&(t[f]=m))}if(l!=="not_valid")for(const f of e.refiner(t,a))f.explanation=n.message,l="not_refined",yield[f,void 0];l==="valid"&&(yield[void 0,t])}let Pn=class{constructor(e){const{type:n,schema:r,validator:s,refiner:i,coercer:o=l=>l,entries:a=function*(){}}=e;this.type=n,this.schema=r,this.entries=a,this.coercer=o,s?this.validator=(l,f)=>{const m=s(l,f);return pu(m,f,this,l)}:this.validator=()=>[],i?this.refiner=(l,f)=>{const m=i(l,f);return pu(m,f,this,l)}:this.refiner=()=>[]}assert(e,n){return $h(e,this,n)}create(e,n){return te(e,this,n)}is(e){return jh(e,this)}mask(e,n){return C3(e,this,n)}validate(e,n={}){return ui(e,this,n)}};function $h(t,e,n){const r=ui(t,e,{message:n});if(r[0])throw r[0]}function te(t,e,n){const r=ui(t,e,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function C3(t,e,n){const r=ui(t,e,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}function jh(t,e){return!ui(t,e)[0]}function ui(t,e,n={}){const r=Ml(t,e,n),s=B3(r);return s[0]?[new E3(s[0],function*(){for(const o of r)o[0]&&(yield o[0])}),void 0]:[void 0,s[1]]}function Lr(t,e){return new Pn({type:t,schema:null,validator:e})}function S3(){return Lr("any",()=>!0)}function ne(t){return new Pn({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[n,r]of e.entries())yield[n,r,t]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${yn(e)}`}})}function _n(){return Lr("boolean",t=>typeof t=="boolean")}function Rl(t){return Lr("instance",e=>e instanceof t||`Expected a \`${t.name}\` instance, but received: ${yn(e)}`)}function He(t){const e=yn(t),n=typeof t;return new Pn({type:"literal",schema:n==="string"||n==="number"||n==="boolean"?t:null,validator(r){return r===t||`Expected the literal \`${e}\`, but received: ${yn(r)}`}})}function D3(){return Lr("never",()=>!1)}function re(t){return new Pn({...t,validator:(e,n)=>e===null||t.validator(e,n),refiner:(e,n)=>e===null||t.refiner(e,n)})}function z(){return Lr("number",t=>typeof t=="number"&&!isNaN(t)||`Expected a number, but received: ${yn(t)}`)}function ce(t){return new Pn({...t,validator:(e,n)=>e===void 0||t.validator(e,n),refiner:(e,n)=>e===void 0||t.refiner(e,n)})}function Vh(t,e){return new Pn({type:"record",schema:null,*entries(n){if(di(n))for(const r in n){const s=n[r];yield[r,r,t],yield[r,s,e]}},validator(n){return oo(n)||`Expected an object, but received: ${yn(n)}`},coercer(n){return oo(n)?{...n}:n}})}function Q(){return Lr("string",t=>typeof t=="string"||`Expected a string, but received: ${yn(t)}`)}function Wl(t){const e=D3();return new Pn({type:"tuple",schema:null,*entries(n){if(Array.isArray(n)){const r=Math.max(t.length,n.length);for(let s=0;s<r;s++)yield[s,n[s],t[s]||e]}},validator(n){return Array.isArray(n)||`Expected an array, but received: ${yn(n)}`},coercer(n){return Array.isArray(n)?n.slice():n}})}function X(t){const e=Object.keys(t);return new Pn({type:"type",schema:t,*entries(n){if(di(n))for(const r of e)yield[r,n[r],t[r]]},validator(n){return oo(n)||`Expected an object, but received: ${yn(n)}`},coercer(n){return oo(n)?{...n}:n}})}function Ht(t){const e=t.map(n=>n.type).join(" | ");return new Pn({type:"union",schema:null,coercer(n,r){for(const s of t){const[i,o]=s.validate(n,{coerce:!0,mask:r.mask});if(!i)return o}return n},validator(n,r){const s=[];for(const i of t){const[...o]=Ml(n,i,r),[a]=o;if(a[0])for(const[l]of o)l&&s.push(l);else return[]}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${yn(n)}`,...s]}})}function Es(){return Lr("unknown",()=>!0)}function fi(t,e,n){return new Pn({...t,coercer:(r,s)=>jh(r,e)?t.coercer(n(r,s),s):t.coercer(r,s)})}var xi,v3=new Uint8Array(16);function Gh(){if(!xi&&(xi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!xi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return xi(v3)}const k3=/^(?:[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 Po(t){return typeof t=="string"&&k3.test(t)}var Dt=[];for(var Ma=0;Ma<256;++Ma)Dt.push((Ma+256).toString(16).substr(1));function Lo(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Dt[t[e+0]]+Dt[t[e+1]]+Dt[t[e+2]]+Dt[t[e+3]]+"-"+Dt[t[e+4]]+Dt[t[e+5]]+"-"+Dt[t[e+6]]+Dt[t[e+7]]+"-"+Dt[t[e+8]]+Dt[t[e+9]]+"-"+Dt[t[e+10]]+Dt[t[e+11]]+Dt[t[e+12]]+Dt[t[e+13]]+Dt[t[e+14]]+Dt[t[e+15]]).toLowerCase();if(!Po(n))throw TypeError("Stringified UUID is invalid");return n}var yu,Ra,Wa=0,Pa=0;function F3(t,e,n){var r=e&&n||0,s=e||new Array(16);t=t||{};var i=t.node||yu,o=t.clockseq!==void 0?t.clockseq:Ra;if(i==null||o==null){var a=t.random||(t.rng||Gh)();i==null&&(i=yu=[a[0]|1,a[1],a[2],a[3],a[4],a[5]]),o==null&&(o=Ra=(a[6]<<8|a[7])&16383)}var l=t.msecs!==void 0?t.msecs:Date.now(),f=t.nsecs!==void 0?t.nsecs:Pa+1,m=l-Wa+(f-Pa)/1e4;if(m<0&&t.clockseq===void 0&&(o=o+1&16383),(m<0||l>Wa)&&t.nsecs===void 0&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Wa=l,Pa=f,Ra=o,l+=122192928e5;var p=((l&268435455)*1e4+f)%4294967296;s[r++]=p>>>24&255,s[r++]=p>>>16&255,s[r++]=p>>>8&255,s[r++]=p&255;var C=l/4294967296*1e4&268435455;s[r++]=C>>>8&255,s[r++]=C&255,s[r++]=C>>>24&15|16,s[r++]=C>>>16&255,s[r++]=o>>>8|128,s[r++]=o&255;for(var w=0;w<6;++w)s[r+w]=i[w];return e||Lo(s)}function Yh(t){if(!Po(t))throw TypeError("Invalid UUID");var e,n=new Uint8Array(16);return n[0]=(e=parseInt(t.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=e&255,n[4]=(e=parseInt(t.slice(9,13),16))>>>8,n[5]=e&255,n[6]=(e=parseInt(t.slice(14,18),16))>>>8,n[7]=e&255,n[8]=(e=parseInt(t.slice(19,23),16))>>>8,n[9]=e&255,n[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=e&255,n}function T3(t){t=unescape(encodeURIComponent(t));for(var e=[],n=0;n<t.length;++n)e.push(t.charCodeAt(n));return e}var I3="6ba7b810-9dad-11d1-80b4-00c04fd430c8",U3="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Xh(t,e,n){function r(s,i,o,a){if(typeof s=="string"&&(s=T3(s)),typeof i=="string"&&(i=Yh(i)),i.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var l=new Uint8Array(16+s.length);if(l.set(i),l.set(s,i.length),l=n(l),l[6]=l[6]&15|e,l[8]=l[8]&63|128,o){a=a||0;for(var f=0;f<16;++f)o[a+f]=l[f];return o}return Lo(l)}try{r.name=t}catch{}return r.DNS=I3,r.URL=U3,r}function _3(t){if(typeof t=="string"){var e=unescape(encodeURIComponent(t));t=new Uint8Array(e.length);for(var n=0;n<e.length;++n)t[n]=e.charCodeAt(n)}return M3(R3(W3(t),t.length*8))}function M3(t){for(var e=[],n=t.length*32,r="0123456789abcdef",s=0;s<n;s+=8){var i=t[s>>5]>>>s%32&255,o=parseInt(r.charAt(i>>>4&15)+r.charAt(i&15),16);e.push(o)}return e}function Zh(t){return(t+64>>>9<<4)+14+1}function R3(t,e){t[e>>5]|=128<<e%32,t[Zh(e)-1]=e;for(var n=1732584193,r=-271733879,s=-1732584194,i=271733878,o=0;o<t.length;o+=16){var a=n,l=r,f=s,m=i;n=_t(n,r,s,i,t[o],7,-680876936),i=_t(i,n,r,s,t[o+1],12,-389564586),s=_t(s,i,n,r,t[o+2],17,606105819),r=_t(r,s,i,n,t[o+3],22,-1044525330),n=_t(n,r,s,i,t[o+4],7,-176418897),i=_t(i,n,r,s,t[o+5],12,1200080426),s=_t(s,i,n,r,t[o+6],17,-1473231341),r=_t(r,s,i,n,t[o+7],22,-45705983),n=_t(n,r,s,i,t[o+8],7,1770035416),i=_t(i,n,r,s,t[o+9],12,-1958414417),s=_t(s,i,n,r,t[o+10],17,-42063),r=_t(r,s,i,n,t[o+11],22,-1990404162),n=_t(n,r,s,i,t[o+12],7,1804603682),i=_t(i,n,r,s,t[o+13],12,-40341101),s=_t(s,i,n,r,t[o+14],17,-1502002290),r=_t(r,s,i,n,t[o+15],22,1236535329),n=Mt(n,r,s,i,t[o+1],5,-165796510),i=Mt(i,n,r,s,t[o+6],9,-1069501632),s=Mt(s,i,n,r,t[o+11],14,643717713),r=Mt(r,s,i,n,t[o],20,-373897302),n=Mt(n,r,s,i,t[o+5],5,-701558691),i=Mt(i,n,r,s,t[o+10],9,38016083),s=Mt(s,i,n,r,t[o+15],14,-660478335),r=Mt(r,s,i,n,t[o+4],20,-405537848),n=Mt(n,r,s,i,t[o+9],5,568446438),i=Mt(i,n,r,s,t[o+14],9,-1019803690),s=Mt(s,i,n,r,t[o+3],14,-187363961),r=Mt(r,s,i,n,t[o+8],20,1163531501),n=Mt(n,r,s,i,t[o+13],5,-1444681467),i=Mt(i,n,r,s,t[o+2],9,-51403784),s=Mt(s,i,n,r,t[o+7],14,1735328473),r=Mt(r,s,i,n,t[o+12],20,-1926607734),n=Rt(n,r,s,i,t[o+5],4,-378558),i=Rt(i,n,r,s,t[o+8],11,-2022574463),s=Rt(s,i,n,r,t[o+11],16,1839030562),r=Rt(r,s,i,n,t[o+14],23,-35309556),n=Rt(n,r,s,i,t[o+1],4,-1530992060),i=Rt(i,n,r,s,t[o+4],11,1272893353),s=Rt(s,i,n,r,t[o+7],16,-155497632),r=Rt(r,s,i,n,t[o+10],23,-1094730640),n=Rt(n,r,s,i,t[o+13],4,681279174),i=Rt(i,n,r,s,t[o],11,-358537222),s=Rt(s,i,n,r,t[o+3],16,-722521979),r=Rt(r,s,i,n,t[o+6],23,76029189),n=Rt(n,r,s,i,t[o+9],4,-640364487),i=Rt(i,n,r,s,t[o+12],11,-421815835),s=Rt(s,i,n,r,t[o+15],16,530742520),r=Rt(r,s,i,n,t[o+2],23,-995338651),n=Wt(n,r,s,i,t[o],6,-198630844),i=Wt(i,n,r,s,t[o+7],10,1126891415),s=Wt(s,i,n,r,t[o+14],15,-1416354905),r=Wt(r,s,i,n,t[o+5],21,-57434055),n=Wt(n,r,s,i,t[o+12],6,1700485571),i=Wt(i,n,r,s,t[o+3],10,-1894986606),s=Wt(s,i,n,r,t[o+10],15,-1051523),r=Wt(r,s,i,n,t[o+1],21,-2054922799),n=Wt(n,r,s,i,t[o+8],6,1873313359),i=Wt(i,n,r,s,t[o+15],10,-30611744),s=Wt(s,i,n,r,t[o+6],15,-1560198380),r=Wt(r,s,i,n,t[o+13],21,1309151649),n=Wt(n,r,s,i,t[o+4],6,-145523070),i=Wt(i,n,r,s,t[o+11],10,-1120210379),s=Wt(s,i,n,r,t[o+2],15,718787259),r=Wt(r,s,i,n,t[o+9],21,-343485551),n=rr(n,a),r=rr(r,l),s=rr(s,f),i=rr(i,m)}return[n,r,s,i]}function W3(t){if(t.length===0)return[];for(var e=t.length*8,n=new Uint32Array(Zh(e)),r=0;r<e;r+=8)n[r>>5]|=(t[r/8]&255)<<r%32;return n}function rr(t,e){var n=(t&65535)+(e&65535),r=(t>>16)+(e>>16)+(n>>16);return r<<16|n&65535}function P3(t,e){return t<<e|t>>>32-e}function Oo(t,e,n,r,s,i){return rr(P3(rr(rr(e,t),rr(r,i)),s),n)}function _t(t,e,n,r,s,i,o){return Oo(e&n|~e&r,t,e,s,i,o)}function Mt(t,e,n,r,s,i,o){return Oo(e&r|n&~r,t,e,s,i,o)}function Rt(t,e,n,r,s,i,o){return Oo(e^n^r,t,e,s,i,o)}function Wt(t,e,n,r,s,i,o){return Oo(n^(e|~r),t,e,s,i,o)}var L3=Xh("v3",48,_3);function O3(t,e,n){t=t||{};var r=t.random||(t.rng||Gh)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(var s=0;s<16;++s)e[n+s]=r[s];return e}return Lo(r)}function N3(t,e,n,r){switch(t){case 0:return e&n^~e&r;case 1:return e^n^r;case 2:return e&n^e&r^n&r;case 3:return e^n^r}}function La(t,e){return t<<e|t>>>32-e}function z3(t){var e=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){var r=unescape(encodeURIComponent(t));t=[];for(var s=0;s<r.length;++s)t.push(r.charCodeAt(s))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);for(var i=t.length/4+2,o=Math.ceil(i/16),a=new Array(o),l=0;l<o;++l){for(var f=new Uint32Array(16),m=0;m<16;++m)f[m]=t[l*64+m*4]<<24|t[l*64+m*4+1]<<16|t[l*64+m*4+2]<<8|t[l*64+m*4+3];a[l]=f}a[o-1][14]=(t.length-1)*8/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=(t.length-1)*8&4294967295;for(var p=0;p<o;++p){for(var C=new Uint32Array(80),w=0;w<16;++w)C[w]=a[p][w];for(var F=16;F<80;++F)C[F]=La(C[F-3]^C[F-8]^C[F-14]^C[F-16],1);for(var I=n[0],x=n[1],E=n[2],_=n[3],k=n[4],P=0;P<80;++P){var M=Math.floor(P/20),$=La(I,5)+N3(M,x,E,_)+k+e[M]+C[P]>>>0;k=_,_=E,E=La(x,30)>>>0,x=I,I=$}n[0]=n[0]+I>>>0,n[1]=n[1]+x>>>0,n[2]=n[2]+E>>>0,n[3]=n[3]+_>>>0,n[4]=n[4]+k>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,n[0]&255,n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,n[1]&255,n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,n[2]&255,n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,n[3]&255,n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,n[4]&255]}var H3=Xh("v5",80,z3);const q3="00000000-0000-0000-0000-000000000000";function K3(t){if(!Po(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)}const $3=Object.freeze(Object.defineProperty({__proto__:null,NIL:q3,parse:Yh,stringify:Lo,v1:F3,v3:L3,v4:O3,v5:H3,validate:Po,version:K3},Symbol.toStringTag,{value:"Module"})),Jh=Ic($3),j3=Jh.v4,V3=function(t,e,n,r){if(typeof t!="string")throw new TypeError(t+" 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:t};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 n>"u"){const o=typeof r.generator=="function"?r.generator:function(){return j3()};i.id=o(i,r)}else s===2&&n===null?r.notificationIdNull&&(i.id=null):i.id=n;return i};var G3=V3;const Y3=Jh.v4,X3=G3,Gs=function(t,e){if(!(this instanceof Gs))return new Gs(t,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 Y3()},version:typeof e.version<"u"?e.version:2,notificationIdNull:typeof e.notificationIdNull=="boolean"?e.notificationIdNull:!1},this.callServer=t};var Z3=Gs;Gs.prototype.request=function(t,e,n,r){const s=this;let i=null;const o=Array.isArray(t)&&typeof e=="function";if(this.options.version===1&&o)throw new TypeError("JSON-RPC 1.0 does not support batching");if(o||!o&&t&&typeof t=="object"&&typeof e=="function")r=e,i=t;else{typeof n=="function"&&(r=n,n=void 0);const f=typeof r=="function";try{i=X3(t,e,n,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(m){if(f)return r(m);throw m}if(!f)return i}let l;try{l=JSON.stringify(i,this.options.replacer)}catch(f){return r(f)}return this.callServer(l,function(f,m){s._parseResponse(f,m,r)}),i};Gs.prototype._parseResponse=function(t,e,n){if(t){n(t);return}if(!e)return n();let r;try{r=JSON.parse(e,this.options.reviver)}catch(s){return n(s)}if(n.length===3)if(Array.isArray(r)){const s=function(o){return typeof o.error<"u"},i=function(o){return!s(o)};return n(null,r.filter(s),r.filter(i))}else return n(null,r.error,r.result);n(null,r)};const Qh=Js(Z3);var em={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function s(l,f,m){this.fn=l,this.context=f,this.once=m||!1}function i(l,f,m,p,C){if(typeof m!="function")throw new TypeError("The listener must be a function");var w=new s(m,p||l,C),F=n?n+f:f;return l._events[F]?l._events[F].fn?l._events[F]=[l._events[F],w]:l._events[F].push(w):(l._events[F]=w,l._eventsCount++),l}function o(l,f){--l._eventsCount===0?l._events=new r:delete l._events[f]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var f=[],m,p;if(this._eventsCount===0)return f;for(p in m=this._events)e.call(m,p)&&f.push(n?p.slice(1):p);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(m)):f},a.prototype.listeners=function(f){var m=n?n+f:f,p=this._events[m];if(!p)return[];if(p.fn)return[p.fn];for(var C=0,w=p.length,F=new Array(w);C<w;C++)F[C]=p[C].fn;return F},a.prototype.listenerCount=function(f){var m=n?n+f:f,p=this._events[m];return p?p.fn?1:p.length:0},a.prototype.emit=function(f,m,p,C,w,F){var I=n?n+f:f;if(!this._events[I])return!1;var x=this._events[I],E=arguments.length,_,k;if(x.fn){switch(x.once&&this.removeListener(f,x.fn,void 0,!0),E){case 1:return x.fn.call(x.context),!0;case 2:return x.fn.call(x.context,m),!0;case 3:return x.fn.call(x.context,m,p),!0;case 4:return x.fn.call(x.context,m,p,C),!0;case 5:return x.fn.call(x.context,m,p,C,w),!0;case 6:return x.fn.call(x.context,m,p,C,w,F),!0}for(k=1,_=new Array(E-1);k<E;k++)_[k-1]=arguments[k];x.fn.apply(x.context,_)}else{var P=x.length,M;for(k=0;k<P;k++)switch(x[k].once&&this.removeListener(f,x[k].fn,void 0,!0),E){case 1:x[k].fn.call(x[k].context);break;case 2:x[k].fn.call(x[k].context,m);break;case 3:x[k].fn.call(x[k].context,m,p);break;case 4:x[k].fn.call(x[k].context,m,p,C);break;default:if(!_)for(M=1,_=new Array(E-1);M<E;M++)_[M-1]=arguments[M];x[k].fn.apply(x[k].context,_)}}return!0},a.prototype.on=function(f,m,p){return i(this,f,m,p,!1)},a.prototype.once=function(f,m,p){return i(this,f,m,p,!0)},a.prototype.removeListener=function(f,m,p,C){var w=n?n+f:f;if(!this._events[w])return this;if(!m)return o(this,w),this;var F=this._events[w];if(F.fn)F.fn===m&&(!C||F.once)&&(!p||F.context===p)&&o(this,w);else{for(var I=0,x=[],E=F.length;I<E;I++)(F[I].fn!==m||C&&!F[I].once||p&&F[I].context!==p)&&x.push(F[I]);x.length?this._events[w]=x.length===1?x[0]:x:o(this,w)}return this},a.prototype.removeAllListeners=function(f){var m;return f?(m=n?n+f:f,this._events[m]&&o(this,m)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,t.exports=a})(em);var J3=em.exports;const Pl=Js(J3);var Q3=class extends Pl{constructor(e,n,r){super();ie(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,n,r){const s=r||n;try{this.socket.send(e),s()}catch(i){s(i)}}close(e,n){this.socket.close(e,n)}addEventListener(e,n,r){this.socket.addEventListener(e,n,r)}};function e4(t,e){return new Q3(t,e)}var t4=class{encode(t){return JSON.stringify(t)}decode(t){return JSON.parse(t)}},n4=class extends Pl{constructor(e,n="ws://localhost:8080",{autoconnect:r=!0,reconnect:s=!0,reconnect_interval:i=1e3,max_reconnects:o=5,...a}={},l,f){super();ie(this,"address");ie(this,"rpc_id");ie(this,"queue");ie(this,"options");ie(this,"autoconnect");ie(this,"ready");ie(this,"reconnect");ie(this,"reconnect_timer_id");ie(this,"reconnect_interval");ie(this,"max_reconnects");ie(this,"rest_options");ie(this,"current_reconnects");ie(this,"generate_request_id");ie(this,"socket");ie(this,"webSocketFactory");ie(this,"dataPack");this.webSocketFactory=e,this.queue={},this.rpc_id=0,this.address=n,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=l||(()=>typeof this.rpc_id=="number"?++this.rpc_id:Number(this.rpc_id)+1),f?this.dataPack=f:this.dataPack=new t4,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,n,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,n),l={jsonrpc:"2.0",method:e,params:n||void 0,id:a};this.socket.send(this.dataPack.encode(l),s,f=>{if(f)return o(f);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 n=await this.call("rpc.login",e);if(!n)throw new Error("authentication failed");return n}async listMethods(){return await this.call("__listMethods")}notify(e,n){return new Promise((r,s)=>{if(!this.ready)return s(new Error("socket not ready"));const i={jsonrpc:"2.0",method:e,params:n};this.socket.send(this.dataPack.encode(i),o=>{if(o)return s(o);r()})})}async subscribe(e){typeof e=="string"&&(e=[e]);const n=await this.call("rpc.on",e);if(typeof e=="string"&&n[e]!=="ok")throw new Error("Failed subscribing to an event '"+e+"' with: "+n[e]);return n}async unsubscribe(e){typeof e=="string"&&(e=[e]);const n=await this.call("rpc.off",e);if(typeof e=="string"&&n[e]!=="ok")throw new Error("Failed unsubscribing from an event with: "+n);return n}close(e,n){this.socket.close(e||1e3,n)}setAutoReconnect(e){this.reconnect=e}setReconnectInterval(e){this.reconnect_interval=e}setMaxReconnects(e){this.max_reconnects=e}_connect(e,n){clearTimeout(this.reconnect_timer_id),this.socket=this.webSocketFactory(e,n),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,n),this.reconnect_interval)))})}};const r4=Mr.utils.randomPrivateKey,gu=()=>{const t=Mr.utils.randomPrivateKey(),e=ao(t),n=new Uint8Array(64);return n.set(t),n.set(e,32),{publicKey:e,secretKey:n}},ao=Mr.getPublicKey;function wu(t){try{return Mr.ExtendedPoint.fromHex(t),!0}catch{return!1}}const Ll=(t,e)=>Mr.sign(t,e.slice(0,32)),s4=Mr.verify,ge=t=>ae.Buffer.isBuffer(t)?t:t instanceof Uint8Array?ae.Buffer.from(t.buffer,t.byteOffset,t.byteLength):ae.Buffer.from(t);class Ol{constructor(e){Object.assign(this,e)}encode(){return ae.Buffer.from(Sh(Ws,this))}static decode(e){return Dh(Ws,this,e)}static decodeUnchecked(e){return Eh(Ws,this,e)}}class i4 extends Ol{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(n=>{this.enum=n})}}const Ws=new Map;var tm;const nm=32,Tn=32;function o4(t){return t._bn!==void 0}let Eu=1;class J extends Ol{constructor(e){if(super({}),this._bn=void 0,o4(e))this._bn=e._bn;else{if(typeof e=="string"){const n=Ct.decode(e);if(n.length!=Tn)throw new Error("Invalid public key input");this._bn=new Ac(n)}else this._bn=new Ac(e);if(this._bn.byteLength()>Tn)throw new Error("Invalid public key input")}}static unique(){const e=new J(Eu);return Eu+=1,new J(e.toBuffer())}equals(e){return this._bn.eq(e._bn)}toBase58(){return Ct.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===Tn)return e;const n=ae.Buffer.alloc(32);return e.copy(n,32-e.length),n}get[Symbol.toStringTag](){return`PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed(e,n,r){const s=ae.Buffer.concat([e.toBuffer(),ae.Buffer.from(n),r.toBuffer()]),i=Gi(s);return new J(i)}static createProgramAddressSync(e,n){let r=ae.Buffer.alloc(0);e.forEach(function(i){if(i.length>nm)throw new TypeError("Max seed length exceeded");r=ae.Buffer.concat([r,ge(i)])}),r=ae.Buffer.concat([r,n.toBuffer(),ae.Buffer.from("ProgramDerivedAddress")]);const s=Gi(r);if(wu(s))throw new Error("Invalid seeds, address must fall off the curve");return new J(s)}static async createProgramAddress(e,n){return this.createProgramAddressSync(e,n)}static findProgramAddressSync(e,n){let r=255,s;for(;r!=0;){try{const i=e.concat(ae.Buffer.from([r]));s=this.createProgramAddressSync(i,n)}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,n){return this.findProgramAddressSync(e,n)}static isOnCurve(e){const n=new J(e);return wu(n.toBytes())}}tm=J;J.default=new tm("11111111111111111111111111111111");Ws.set(J,{kind:"struct",fields:[["_bn","u256"]]});class a4{constructor(e){if(this._publicKey=void 0,this._secretKey=void 0,e){const n=ge(e);if(e.length!==64)throw new Error("bad secret key size");this._publicKey=n.slice(32,64),this._secretKey=n.slice(0,32)}else this._secretKey=ge(r4()),this._publicKey=ge(ao(this._secretKey))}get publicKey(){return new J(this._publicKey)}get secretKey(){return ae.Buffer.concat([this._secretKey,this._publicKey],64)}}const c4=new J("BPFLoader1111111111111111111111111111111111"),ir=1232,No=127,Ys=64;class zo extends Error{constructor(e){super(`Signature ${e} has expired: block height exceeded.`),this.signature=void 0,this.signature=e}}Object.defineProperty(zo.prototype,"name",{value:"TransactionExpiredBlockheightExceededError"});class Nl extends Error{constructor(e,n){super(`Transaction was not confirmed in ${n.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(Nl.prototype,"name",{value:"TransactionExpiredTimeoutError"});class Gr extends Error{constructor(e){super(`Signature ${e} has expired: the nonce is no longer valid.`),this.signature=void 0,this.signature=e}}Object.defineProperty(Gr.prototype,"name",{value:"TransactionExpiredNonceInvalidError"});class Xs{constructor(e,n){this.staticAccountKeys=void 0,this.accountKeysFromLookups=void 0,this.staticAccountKeys=e,this.accountKeysFromLookups=n}keySegments(){const e=[this.staticAccountKeys];return this.accountKeysFromLookups&&(e.push(this.accountKeysFromLookups.writable),e.push(this.accountKeysFromLookups.readonly)),e}get(e){for(const n of this.keySegments()){if(e<n.length)return n[e];e-=n.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 we=(t="publicKey")=>exports.blob(32,t),l4=(t="signature")=>exports.blob(64,t),Er=(t="string")=>{const e=exports.struct([exports.u32("length"),exports.u32("lengthPadding"),exports.blob(sr(exports.u32(),-8),"chars")],t),n=e.decode.bind(e),r=e.encode.bind(e),s=e;return s.decode=(i,o)=>n(i,o).chars.toString(),s.encode=(i,o,a)=>{const l={chars:ae.Buffer.from(i,"utf8")};return r(l,o,a)},s.alloc=i=>exports.u32().span+exports.u32().span+ae.Buffer.from(i,"utf8").length,s},d4=(t="authorized")=>exports.struct([we("staker"),we("withdrawer")],t),u4=(t="lockup")=>exports.struct([exports.ns64("unixTimestamp"),exports.ns64("epoch"),we("custodian")],t),f4=(t="voteInit")=>exports.struct([we("nodePubkey"),we("authorizedVoter"),we("authorizedWithdrawer"),exports.u8("commission")],t),h4=(t="voteAuthorizeWithSeedArgs")=>exports.struct([exports.u32("voteAuthorizationType"),we("currentAuthorityDerivedKeyOwnerPubkey"),Er("currentAuthorityDerivedKeySeed"),we("newAuthorized")],t);function rm(t,e){const n=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*n(s.elementLayout)}else if("fields"in s)return rm({layout:s},e[s.property]);return 0};let r=0;return t.layout.fields.forEach(s=>{r+=n(s)}),r}function qt(t){let e=0,n=0;for(;;){let r=t.shift();if(e|=(r&127)<<n*7,n+=1,!(r&128))break}return e}function Xt(t,e){let n=e;for(;;){let r=n&127;if(n>>=7,n==0){t.push(r);break}else r|=128,t.push(r)}}function Se(t,e){if(!t)throw new Error(e||"Assertion failed")}class Ho{constructor(e,n){this.payer=void 0,this.keyMetaMap=void 0,this.payer=e,this.keyMetaMap=n}static compile(e,n){const r=new Map,s=o=>{const a=o.toBase58();let l=r.get(a);return l===void 0&&(l={isSigner:!1,isWritable:!1,isInvoked:!1},r.set(a,l)),l},i=s(n);i.isSigner=!0,i.isWritable=!0;for(const o of e){s(o.programId).isInvoked=!0;for(const a of o.keys){const l=s(a.pubkey);l.isSigner||(l.isSigner=a.isSigner),l.isWritable||(l.isWritable=a.isWritable)}}return new Ho(n,r)}getMessageComponents(){const e=[...this.keyMetaMap.entries()];Se(e.length<=256,"Max static account keys length exceeded");const n=e.filter(([,l])=>l.isSigner&&l.isWritable),r=e.filter(([,l])=>l.isSigner&&!l.isWritable),s=e.filter(([,l])=>!l.isSigner&&l.isWritable),i=e.filter(([,l])=>!l.isSigner&&!l.isWritable),o={numRequiredSignatures:n.length+r.length,numReadonlySignedAccounts:r.length,numReadonlyUnsignedAccounts:i.length};{Se(n.length>0,"Expected at least one writable signer key");const[l]=n[0];Se(l===this.payer.toBase58(),"Expected first writable signer key to be the fee payer")}const a=[...n.map(([l])=>new J(l)),...r.map(([l])=>new J(l)),...s.map(([l])=>new J(l)),...i.map(([l])=>new J(l))];return[o,a]}extractTableLookup(e){const[n,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(!(n.length===0&&s.length===0))return[{accountKey:e.key,writableIndexes:n,readonlyIndexes:s},{writable:r,readonly:i}]}drainKeysFoundInLookupTable(e,n){const r=new Array,s=new Array;for(const[i,o]of this.keyMetaMap.entries())if(n(o)){const a=new J(i),l=e.findIndex(f=>f.equals(a));l>=0&&(Se(l<256,"Max lookup table index exceeded"),r.push(l),s.push(a),this.keyMetaMap.delete(i))}return[r,s]}}const sm="Reached end of buffer unexpectedly";function Sn(t){if(t.length===0)throw new Error(sm);return t.shift()}function Kt(t,...e){const[n]=e;if(e.length===2?n+(e[1]??0)>t.length:n>=t.length)throw new Error(sm);return t.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(n=>new J(n)),this.recentBlockhash=e.recentBlockhash,this.instructions=e.instructions,this.instructions.forEach(n=>this.indexToProgramIds.set(n.programIdIndex,this.accountKeys[n.programIdIndex]))}get version(){return"legacy"}get staticAccountKeys(){return this.accountKeys}get compiledInstructions(){return this.instructions.map(e=>({programIdIndex:e.programIdIndex,accountKeyIndexes:e.accounts,data:Ct.decode(e.data)}))}get addressTableLookups(){return[]}getAccountKeys(){return new Xs(this.staticAccountKeys)}static compile(e){const n=Ho.compile(e.instructions,e.payerKey),[r,s]=n.getMessageComponents(),o=new Xs(s).compileInstructions(e.instructions).map(a=>({programIdIndex:a.programIdIndex,accounts:a.accountKeyIndexes,data:Ct.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 n=this.header.numRequiredSignatures;if(e>=this.header.numRequiredSignatures){const r=e-n,i=this.accountKeys.length-n-this.header.numReadonlyUnsignedAccounts;return r<i}else{const r=n-this.header.numReadonlySignedAccounts;return e<r}}isProgramId(e){return this.indexToProgramIds.has(e)}programIds(){return[...this.indexToProgramIds.values()]}nonProgramIds(){return this.accountKeys.filter((e,n)=>!this.isProgramId(n))}serialize(){const e=this.accountKeys.length;let n=[];Xt(n,e);const r=this.instructions.map(p=>{const{accounts:C,programIdIndex:w}=p,F=Array.from(Ct.decode(p.data));let I=[];Xt(I,C.length);let x=[];return Xt(x,F.length),{programIdIndex:w,keyIndicesCount:ae.Buffer.from(I),keyIndices:C,dataLength:ae.Buffer.from(x),data:F}});let s=[];Xt(s,r.length);let i=ae.Buffer.alloc(ir);ae.Buffer.from(s).copy(i);let o=s.length;r.forEach(p=>{const w=exports.struct([exports.u8("programIdIndex"),exports.blob(p.keyIndicesCount.length,"keyIndicesCount"),exports.seq(exports.u8("keyIndex"),p.keyIndices.length,"keyIndices"),exports.blob(p.dataLength.length,"dataLength"),exports.seq(exports.u8("userdatum"),p.data.length,"data")]).encode(p,i,o);o+=w}),i=i.slice(0,o);const a=exports.struct([exports.blob(1,"numRequiredSignatures"),exports.blob(1,"numReadonlySignedAccounts"),exports.blob(1,"numReadonlyUnsignedAccounts"),exports.blob(n.length,"keyCount"),exports.seq(we("key"),e,"keys"),we("recentBlockhash")]),l={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(n),keys:this.accountKeys.map(p=>ge(p.toBytes())),recentBlockhash:Ct.decode(this.recentBlockhash)};let f=ae.Buffer.alloc(2048);const m=a.encode(l,f);return i.copy(f,m),f.slice(0,m+i.length)}static from(e){let n=[...e];const r=Sn(n);if(r!==(r&No))throw new Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");const s=Sn(n),i=Sn(n),o=qt(n);let a=[];for(let C=0;C<o;C++){const w=Kt(n,0,Tn);a.push(new J(ae.Buffer.from(w)))}const l=Kt(n,0,Tn),f=qt(n);let m=[];for(let C=0;C<f;C++){const w=Sn(n),F=qt(n),I=Kt(n,0,F),x=qt(n),E=Kt(n,0,x),_=Ct.encode(ae.Buffer.from(E));m.push({programIdIndex:w,accounts:I,data:_})}const p={header:{numRequiredSignatures:r,numReadonlySignedAccounts:s,numReadonlyUnsignedAccounts:i},recentBlockhash:Ct.encode(ae.Buffer.from(l)),accountKeys:a,instructions:m};return new cn(p)}}class ar{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 n of this.addressTableLookups)e+=n.readonlyIndexes.length+n.writableIndexes.length;return e}getAccountKeys(e){let n;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");n=e.accountKeysFromLookups}else if(e&&"addressLookupTableAccounts"in e&&e.addressLookupTableAccounts)n=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 Xs(this.staticAccountKeys,n)}isAccountSigner(e){return e<this.header.numRequiredSignatures}isAccountWritable(e){const n=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-n,o=r-n-this.header.numReadonlyUnsignedAccounts;return s<o}else{const s=n-this.header.numReadonlySignedAccounts;return e<s}}resolveAddressTableLookups(e){const n={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)n.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)n.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 n}static compile(e){const n=Ho.compile(e.instructions,e.payerKey),r=new Array,s={writable:new Array,readonly:new Array},i=e.addressLookupTableAccounts||[];for(const m of i){const p=n.extractTableLookup(m);if(p!==void 0){const[C,{writable:w,readonly:F}]=p;r.push(C),s.writable.push(...w),s.readonly.push(...F)}}const[o,a]=n.getMessageComponents(),f=new Xs(a,s).compileInstructions(e.instructions);return new ar({header:o,staticAccountKeys:a,recentBlockhash:e.recentBlockhash,compiledInstructions:f,addressTableLookups:r})}serialize(){const e=Array();Xt(e,this.staticAccountKeys.length);const n=this.serializeInstructions(),r=Array();Xt(r,this.compiledInstructions.length);const s=this.serializeAddressTableLookups(),i=Array();Xt(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(we(),this.staticAccountKeys.length,"staticAccountKeys"),we("recentBlockhash"),exports.blob(r.length,"instructionsLength"),exports.blob(n.length,"serializedInstructions"),exports.blob(i.length,"addressTableLookupsLength"),exports.blob(s.length,"serializedAddressTableLookups")]),a=new Uint8Array(ir),f=o.encode({prefix:128,header:this.header,staticAccountKeysLength:new Uint8Array(e),staticAccountKeys:this.staticAccountKeys.map(m=>m.toBytes()),recentBlockhash:Ct.decode(this.recentBlockhash),instructionsLength:new Uint8Array(r),serializedInstructions:n,addressTableLookupsLength:new Uint8Array(i),serializedAddressTableLookups:s},a);return a.slice(0,f)}serializeInstructions(){let e=0;const n=new Uint8Array(ir);for(const r of this.compiledInstructions){const s=Array();Xt(s,r.accountKeyIndexes.length);const i=Array();Xt(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},n,e)}return n.slice(0,e)}serializeAddressTableLookups(){let e=0;const n=new Uint8Array(ir);for(const r of this.addressTableLookups){const s=Array();Xt(s,r.writableIndexes.length);const i=Array();Xt(i,r.readonlyIndexes.length);const o=exports.struct([we("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},n,e)}return n.slice(0,e)}static deserialize(e){let n=[...e];const r=Sn(n),s=r&No;Se(r!==s,"Expected versioned message but received legacy message");const i=s;Se(i===0,`Expected versioned message with version 0 but found version ${i}`);const o={numRequiredSignatures:Sn(n),numReadonlySignedAccounts:Sn(n),numReadonlyUnsignedAccounts:Sn(n)},a=[],l=qt(n);for(let F=0;F<l;F++)a.push(new J(Kt(n,0,Tn)));const f=Ct.encode(Kt(n,0,Tn)),m=qt(n),p=[];for(let F=0;F<m;F++){const I=Sn(n),x=qt(n),E=Kt(n,0,x),_=qt(n),k=new Uint8Array(Kt(n,0,_));p.push({programIdIndex:I,accountKeyIndexes:E,data:k})}const C=qt(n),w=[];for(let F=0;F<C;F++){const I=new J(Kt(n,0,Tn)),x=qt(n),E=Kt(n,0,x),_=qt(n),k=Kt(n,0,_);w.push({accountKey:I,writableIndexes:E,readonlyIndexes:k})}return new ar({header:o,staticAccountKeys:a,recentBlockhash:f,compiledInstructions:p,addressTableLookups:w})}}const zl={deserializeMessageVersion(t){const e=t[0],n=e&No;return n===e?"legacy":n},deserialize:t=>{const e=zl.deserializeMessageVersion(t);if(e==="legacy")return cn.from(t);if(e===0)return ar.deserialize(t);throw new Error(`Transaction message version ${e} deserialization is not supported`)}};let On=function(t){return t[t.BLOCKHEIGHT_EXCEEDED=0]="BLOCKHEIGHT_EXCEEDED",t[t.PROCESSED=1]="PROCESSED",t[t.TIMED_OUT=2]="TIMED_OUT",t[t.NONCE_INVALID=3]="NONCE_INVALID",t}({});const m4=ae.Buffer.alloc(Ys).fill(0);class Ie{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:n,isWritable:r})=>({pubkey:e.toJSON(),isSigner:n,isWritable:r})),programId:this.programId.toJSON(),data:[...this.data]}}}class Ce{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:n,nonceInfo:r}=e;this.minNonceContextSlot=n,this.nonceInfo=r}else if(Object.prototype.hasOwnProperty.call(e,"lastValidBlockHeight")){const{blockhash:n,lastValidBlockHeight:r}=e;this.recentBlockhash=n,this.lastValidBlockHeight=r}else{const{recentBlockhash:n,nonceInfo:r}=e;r&&(this.nonceInfo=r),this.recentBlockhash=n}}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(n=>{"instructions"in n?this.instructions=this.instructions.concat(n.instructions):"data"in n&&"programId"in n&&"keys"in n?this.instructions.push(n):this.instructions.push(new Ie(n))}),this}compileMessage(){if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json))return this._message;let e,n;if(this.nonceInfo?(e=this.nonceInfo.nonce,this.instructions[0]!=this.nonceInfo.nonceInstruction?n=[this.nonceInfo.nonceInstruction,...this.instructions]:n=this.instructions):(e=this.recentBlockhash,n=this.instructions),!e)throw new Error("Transaction recentBlockhash required");n.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 I=0;I<n.length;I++)if(n[I].programId===void 0)throw new Error(`Transaction instruction index ${I} has undefined program id`);const s=[],i=[];n.forEach(I=>{I.keys.forEach(E=>{i.push({...E})});const x=I.programId.toString();s.includes(x)||s.push(x)}),s.forEach(I=>{i.push({pubkey:new J(I),isSigner:!1,isWritable:!1})});const o=[];i.forEach(I=>{const x=I.pubkey.toString(),E=o.findIndex(_=>_.pubkey.toString()===x);E>-1?(o[E].isWritable=o[E].isWritable||I.isWritable,o[E].isSigner=o[E].isSigner||I.isSigner):o.push(I)}),o.sort(function(I,x){if(I.isSigner!==x.isSigner)return I.isSigner?-1:1;if(I.isWritable!==x.isWritable)return I.isWritable?-1:1;const E={localeMatcher:"best fit",usage:"sort",sensitivity:"variant",ignorePunctuation:!1,numeric:!1,caseFirst:"lower"};return I.pubkey.toBase58().localeCompare(x.pubkey.toBase58(),"en",E)});const a=o.findIndex(I=>I.pubkey.equals(r));if(a>-1){const[I]=o.splice(a,1);I.isSigner=!0,I.isWritable=!0,o.unshift(I)}else o.unshift({pubkey:r,isSigner:!0,isWritable:!0});for(const I of this.signatures){const x=o.findIndex(E=>E.pubkey.equals(I.publicKey));if(x>-1)o[x].isSigner||(o[x].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: ${I.publicKey.toString()}`)}let l=0,f=0,m=0;const p=[],C=[];o.forEach(({pubkey:I,isSigner:x,isWritable:E})=>{x?(p.push(I.toString()),l+=1,E||(f+=1)):(C.push(I.toString()),E||(m+=1))});const w=p.concat(C),F=n.map(I=>{const{data:x,programId:E}=I;return{programIdIndex:w.indexOf(E.toString()),accounts:I.keys.map(_=>w.indexOf(_.pubkey.toString())),data:Ct.encode(x)}});return F.forEach(I=>{Se(I.programIdIndex>=0),I.accounts.forEach(x=>Se(x>=0))}),new cn({header:{numRequiredSignatures:l,numReadonlySignedAccounts:f,numReadonlyUnsignedAccounts:m},accountKeys:w,recentBlockhash:e,instructions:F})}_compile(){const e=this.compileMessage(),n=e.accountKeys.slice(0,e.header.numRequiredSignatures);return this.signatures.length===n.length&&this.signatures.every((s,i)=>n[i].equals(s.publicKey))||(this.signatures=n.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 n=new Set;this.signatures=e.filter(r=>{const s=r.toString();return n.has(s)?!1:(n.add(s),!0)}).map(r=>({signature:null,publicKey:r}))}sign(...e){if(e.length===0)throw new Error("No signers");const n=new Set,r=[];for(const i of e){const o=i.publicKey.toString();n.has(o)||(n.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 n=new Set,r=[];for(const i of e){const o=i.publicKey.toString();n.has(o)||(n.add(o),r.push(i))}const s=this._compile();this._partialSign(s,...r)}_partialSign(e,...n){const r=e.serialize();n.forEach(s=>{const i=Ll(r,s.secretKey);this._addSignature(s.publicKey,ge(i))})}addSignature(e,n){this._compile(),this._addSignature(e,n)}_addSignature(e,n){Se(n.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(n)}verifySignatures(e=!0){return!this._getMessageSignednessErrors(this.serializeMessage(),e)}_getMessageSignednessErrors(e,n){const r={};for(const{signature:s,publicKey:i}of this.signatures)s===null?n&&(r.missing||(r.missing=[])).push(i):s4(s,e,i.toBytes())||(r.invalid||(r.invalid=[])).push(i);return r.invalid||r.missing?r:void 0}serialize(e){const{requireAllSignatures:n,verifySignatures:r}=Object.assign({requireAllSignatures:!0,verifySignatures:!0},e),s=this.serializeMessage();if(r){const i=this._getMessageSignednessErrors(s,n);if(i){let o="Signature verification failed.";throw i.invalid&&(o+=`
6
+ */(function(t){const e=ho,n=Uc,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=_,t.INSPECT_MAX_BYTES=50;const s=2147483647;t.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 g=new Uint8Array(1),d={foo:function(){return 42}};return Object.setPrototypeOf(d,Uint8Array.prototype),Object.setPrototypeOf(g,d),g.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(g){if(g>s)throw new RangeError('The value "'+g+'" is invalid for option "size"');const d=new Uint8Array(g);return Object.setPrototypeOf(d,a.prototype),d}function a(g,d,u){if(typeof g=="number"){if(typeof d=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(g)}return l(g,d,u)}a.poolSize=8192;function l(g,d,u){if(typeof g=="string")return C(g,d);if(ArrayBuffer.isView(g))return F(g);if(g==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof g);if(Gt(g,ArrayBuffer)||g&&Gt(g.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Gt(g,SharedArrayBuffer)||g&&Gt(g.buffer,SharedArrayBuffer)))return I(g,d,u);if(typeof g=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const D=g.valueOf&&g.valueOf();if(D!=null&&D!==g)return a.from(D,d,u);const R=x(g);if(R)return R;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof g[Symbol.toPrimitive]=="function")return a.from(g[Symbol.toPrimitive]("string"),d,u);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof g)}a.from=function(g,d,u){return l(g,d,u)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function f(g){if(typeof g!="number")throw new TypeError('"size" argument must be of type number');if(g<0)throw new RangeError('The value "'+g+'" is invalid for option "size"')}function m(g,d,u){return f(g),g<=0?o(g):d!==void 0?typeof u=="string"?o(g).fill(d,u):o(g).fill(d):o(g)}a.alloc=function(g,d,u){return m(g,d,u)};function p(g){return f(g),o(g<0?0:E(g)|0)}a.allocUnsafe=function(g){return p(g)},a.allocUnsafeSlow=function(g){return p(g)};function C(g,d){if((typeof d!="string"||d==="")&&(d="utf8"),!a.isEncoding(d))throw new TypeError("Unknown encoding: "+d);const u=k(g,d)|0;let D=o(u);const R=D.write(g,d);return R!==u&&(D=D.slice(0,R)),D}function w(g){const d=g.length<0?0:E(g.length)|0,u=o(d);for(let D=0;D<d;D+=1)u[D]=g[D]&255;return u}function F(g){if(Gt(g,Uint8Array)){const d=new Uint8Array(g);return I(d.buffer,d.byteOffset,d.byteLength)}return w(g)}function I(g,d,u){if(d<0||g.byteLength<d)throw new RangeError('"offset" is outside of buffer bounds');if(g.byteLength<d+(u||0))throw new RangeError('"length" is outside of buffer bounds');let D;return d===void 0&&u===void 0?D=new Uint8Array(g):u===void 0?D=new Uint8Array(g,d):D=new Uint8Array(g,d,u),Object.setPrototypeOf(D,a.prototype),D}function x(g){if(a.isBuffer(g)){const d=E(g.length)|0,u=o(d);return u.length===0||g.copy(u,0,0,d),u}if(g.length!==void 0)return typeof g.length!="number"||Oe(g.length)?o(0):w(g);if(g.type==="Buffer"&&Array.isArray(g.data))return w(g.data)}function E(g){if(g>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return g|0}function _(g){return+g!=g&&(g=0),a.alloc(+g)}a.isBuffer=function(d){return d!=null&&d._isBuffer===!0&&d!==a.prototype},a.compare=function(d,u){if(Gt(d,Uint8Array)&&(d=a.from(d,d.offset,d.byteLength)),Gt(u,Uint8Array)&&(u=a.from(u,u.offset,u.byteLength)),!a.isBuffer(d)||!a.isBuffer(u))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(d===u)return 0;let D=d.length,R=u.length;for(let N=0,K=Math.min(D,R);N<K;++N)if(d[N]!==u[N]){D=d[N],R=u[N];break}return D<R?-1:R<D?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,u){if(!Array.isArray(d))throw new TypeError('"list" argument must be an Array of Buffers');if(d.length===0)return a.alloc(0);let D;if(u===void 0)for(u=0,D=0;D<d.length;++D)u+=d[D].length;const R=a.allocUnsafe(u);let N=0;for(D=0;D<d.length;++D){let K=d[D];if(Gt(K,Uint8Array))N+K.length>R.length?(a.isBuffer(K)||(K=a.from(K)),K.copy(R,N)):Uint8Array.prototype.set.call(R,K,N);else if(a.isBuffer(K))K.copy(R,N);else throw new TypeError('"list" argument must be an Array of Buffers');N+=K.length}return R};function k(g,d){if(a.isBuffer(g))return g.length;if(ArrayBuffer.isView(g)||Gt(g,ArrayBuffer))return g.byteLength;if(typeof g!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof g);const u=g.length,D=arguments.length>2&&arguments[2]===!0;if(!D&&u===0)return 0;let R=!1;for(;;)switch(d){case"ascii":case"latin1":case"binary":return u;case"utf8":case"utf-8":return Le(g).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u*2;case"hex":return u>>>1;case"base64":return ze(g).length;default:if(R)return D?-1:Le(g).length;d=(""+d).toLowerCase(),R=!0}}a.byteLength=k;function P(g,d,u){let D=!1;if((d===void 0||d<0)&&(d=0),d>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,d>>>=0,u<=d))return"";for(g||(g="utf8");;)switch(g){case"hex":return U(this,d,u);case"utf8":case"utf-8":return c(this,d,u);case"ascii":return S(this,d,u);case"latin1":case"binary":return v(this,d,u);case"base64":return B(this,d,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W(this,d,u);default:if(D)throw new TypeError("Unknown encoding: "+g);g=(g+"").toLowerCase(),D=!0}}a.prototype._isBuffer=!0;function M(g,d,u){const D=g[d];g[d]=g[u],g[u]=D}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 u=0;u<d;u+=2)M(this,u,u+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 u=0;u<d;u+=4)M(this,u,u+3),M(this,u+1,u+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 u=0;u<d;u+=8)M(this,u,u+7),M(this,u+1,u+6),M(this,u+2,u+5),M(this,u+3,u+4);return this},a.prototype.toString=function(){const d=this.length;return d===0?"":arguments.length===0?c(this,0,d):P.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 u=t.INSPECT_MAX_BYTES;return d=this.toString("hex",0,u).replace(/(.{2})/g,"$1 ").trim(),this.length>u&&(d+=" ... "),"<Buffer "+d+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(d,u,D,R,N){if(Gt(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(u===void 0&&(u=0),D===void 0&&(D=d?d.length:0),R===void 0&&(R=0),N===void 0&&(N=this.length),u<0||D>d.length||R<0||N>this.length)throw new RangeError("out of range index");if(R>=N&&u>=D)return 0;if(R>=N)return-1;if(u>=D)return 1;if(u>>>=0,D>>>=0,R>>>=0,N>>>=0,this===d)return 0;let K=N-R,pe=D-u;const he=Math.min(K,pe),ue=this.slice(R,N),Pe=d.slice(u,D);for(let de=0;de<he;++de)if(ue[de]!==Pe[de]){K=ue[de],pe=Pe[de];break}return K<pe?-1:pe<K?1:0};function $(g,d,u,D,R){if(g.length===0)return-1;if(typeof u=="string"?(D=u,u=0):u>2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),u=+u,Oe(u)&&(u=R?0:g.length-1),u<0&&(u=g.length+u),u>=g.length){if(R)return-1;u=g.length-1}else if(u<0)if(R)u=0;else return-1;if(typeof d=="string"&&(d=a.from(d,D)),a.isBuffer(d))return d.length===0?-1:G(g,d,u,D,R);if(typeof d=="number")return d=d&255,typeof Uint8Array.prototype.indexOf=="function"?R?Uint8Array.prototype.indexOf.call(g,d,u):Uint8Array.prototype.lastIndexOf.call(g,d,u):G(g,[d],u,D,R);throw new TypeError("val must be string, number or Buffer")}function G(g,d,u,D,R){let N=1,K=g.length,pe=d.length;if(D!==void 0&&(D=String(D).toLowerCase(),D==="ucs2"||D==="ucs-2"||D==="utf16le"||D==="utf-16le")){if(g.length<2||d.length<2)return-1;N=2,K/=2,pe/=2,u/=2}function he(Pe,de){return N===1?Pe[de]:Pe.readUInt16BE(de*N)}let ue;if(R){let Pe=-1;for(ue=u;ue<K;ue++)if(he(g,ue)===he(d,Pe===-1?0:ue-Pe)){if(Pe===-1&&(Pe=ue),ue-Pe+1===pe)return Pe*N}else Pe!==-1&&(ue-=ue-Pe),Pe=-1}else for(u+pe>K&&(u=K-pe),ue=u;ue>=0;ue--){let Pe=!0;for(let de=0;de<pe;de++)if(he(g,ue+de)!==he(d,de)){Pe=!1;break}if(Pe)return ue}return-1}a.prototype.includes=function(d,u,D){return this.indexOf(d,u,D)!==-1},a.prototype.indexOf=function(d,u,D){return $(this,d,u,D,!0)},a.prototype.lastIndexOf=function(d,u,D){return $(this,d,u,D,!1)};function Y(g,d,u,D){u=Number(u)||0;const R=g.length-u;D?(D=Number(D),D>R&&(D=R)):D=R;const N=d.length;D>N/2&&(D=N/2);let K;for(K=0;K<D;++K){const pe=parseInt(d.substr(K*2,2),16);if(Oe(pe))return K;g[u+K]=pe}return K}function L(g,d,u,D){return We(Le(d,g.length-u),g,u,D)}function j(g,d,u,D){return We(je(d),g,u,D)}function O(g,d,u,D){return We(ze(d),g,u,D)}function q(g,d,u,D){return We(bi(d,g.length-u),g,u,D)}a.prototype.write=function(d,u,D,R){if(u===void 0)R="utf8",D=this.length,u=0;else if(D===void 0&&typeof u=="string")R=u,D=this.length,u=0;else if(isFinite(u))u=u>>>0,isFinite(D)?(D=D>>>0,R===void 0&&(R="utf8")):(R=D,D=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const N=this.length-u;if((D===void 0||D>N)&&(D=N),d.length>0&&(D<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");R||(R="utf8");let K=!1;for(;;)switch(R){case"hex":return Y(this,d,u,D);case"utf8":case"utf-8":return L(this,d,u,D);case"ascii":case"latin1":case"binary":return j(this,d,u,D);case"base64":return O(this,d,u,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,d,u,D);default:if(K)throw new TypeError("Unknown encoding: "+R);R=(""+R).toLowerCase(),K=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function B(g,d,u){return d===0&&u===g.length?e.fromByteArray(g):e.fromByteArray(g.slice(d,u))}function c(g,d,u){u=Math.min(g.length,u);const D=[];let R=d;for(;R<u;){const N=g[R];let K=null,pe=N>239?4:N>223?3:N>191?2:1;if(R+pe<=u){let he,ue,Pe,de;switch(pe){case 1:N<128&&(K=N);break;case 2:he=g[R+1],(he&192)===128&&(de=(N&31)<<6|he&63,de>127&&(K=de));break;case 3:he=g[R+1],ue=g[R+2],(he&192)===128&&(ue&192)===128&&(de=(N&15)<<12|(he&63)<<6|ue&63,de>2047&&(de<55296||de>57343)&&(K=de));break;case 4:he=g[R+1],ue=g[R+2],Pe=g[R+3],(he&192)===128&&(ue&192)===128&&(Pe&192)===128&&(de=(N&15)<<18|(he&63)<<12|(ue&63)<<6|Pe&63,de>65535&&de<1114112&&(K=de))}}K===null?(K=65533,pe=1):K>65535&&(K-=65536,D.push(K>>>10&1023|55296),K=56320|K&1023),D.push(K),R+=pe}return y(D)}const b=4096;function y(g){const d=g.length;if(d<=b)return String.fromCharCode.apply(String,g);let u="",D=0;for(;D<d;)u+=String.fromCharCode.apply(String,g.slice(D,D+=b));return u}function S(g,d,u){let D="";u=Math.min(g.length,u);for(let R=d;R<u;++R)D+=String.fromCharCode(g[R]&127);return D}function v(g,d,u){let D="";u=Math.min(g.length,u);for(let R=d;R<u;++R)D+=String.fromCharCode(g[R]);return D}function U(g,d,u){const D=g.length;(!d||d<0)&&(d=0),(!u||u<0||u>D)&&(u=D);let R="";for(let N=d;N<u;++N)R+=Ve[g[N]];return R}function W(g,d,u){const D=g.slice(d,u);let R="";for(let N=0;N<D.length-1;N+=2)R+=String.fromCharCode(D[N]+D[N+1]*256);return R}a.prototype.slice=function(d,u){const D=this.length;d=~~d,u=u===void 0?D:~~u,d<0?(d+=D,d<0&&(d=0)):d>D&&(d=D),u<0?(u+=D,u<0&&(u=0)):u>D&&(u=D),u<d&&(u=d);const R=this.subarray(d,u);return Object.setPrototypeOf(R,a.prototype),R};function A(g,d,u){if(g%1!==0||g<0)throw new RangeError("offset is not uint");if(g+d>u)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(d,u,D){d=d>>>0,u=u>>>0,D||A(d,u,this.length);let R=this[d],N=1,K=0;for(;++K<u&&(N*=256);)R+=this[d+K]*N;return R},a.prototype.readUintBE=a.prototype.readUIntBE=function(d,u,D){d=d>>>0,u=u>>>0,D||A(d,u,this.length);let R=this[d+--u],N=1;for(;u>0&&(N*=256);)R+=this[d+--u]*N;return R},a.prototype.readUint8=a.prototype.readUInt8=function(d,u){return d=d>>>0,u||A(d,1,this.length),this[d]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(d,u){return d=d>>>0,u||A(d,2,this.length),this[d]|this[d+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(d,u){return d=d>>>0,u||A(d,2,this.length),this[d]<<8|this[d+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(d,u){return d=d>>>0,u||A(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,u){return d=d>>>0,u||A(d,4,this.length),this[d]*16777216+(this[d+1]<<16|this[d+2]<<8|this[d+3])},a.prototype.readBigUInt64LE=dn(function(d){d=d>>>0,Jt(d,"offset");const u=this[d],D=this[d+7];(u===void 0||D===void 0)&&Ue(d,this.length-8);const R=u+this[++d]*2**8+this[++d]*2**16+this[++d]*2**24,N=this[++d]+this[++d]*2**8+this[++d]*2**16+D*2**24;return BigInt(R)+(BigInt(N)<<BigInt(32))}),a.prototype.readBigUInt64BE=dn(function(d){d=d>>>0,Jt(d,"offset");const u=this[d],D=this[d+7];(u===void 0||D===void 0)&&Ue(d,this.length-8);const R=u*2**24+this[++d]*2**16+this[++d]*2**8+this[++d],N=this[++d]*2**24+this[++d]*2**16+this[++d]*2**8+D;return(BigInt(R)<<BigInt(32))+BigInt(N)}),a.prototype.readIntLE=function(d,u,D){d=d>>>0,u=u>>>0,D||A(d,u,this.length);let R=this[d],N=1,K=0;for(;++K<u&&(N*=256);)R+=this[d+K]*N;return N*=128,R>=N&&(R-=Math.pow(2,8*u)),R},a.prototype.readIntBE=function(d,u,D){d=d>>>0,u=u>>>0,D||A(d,u,this.length);let R=u,N=1,K=this[d+--R];for(;R>0&&(N*=256);)K+=this[d+--R]*N;return N*=128,K>=N&&(K-=Math.pow(2,8*u)),K},a.prototype.readInt8=function(d,u){return d=d>>>0,u||A(d,1,this.length),this[d]&128?(255-this[d]+1)*-1:this[d]},a.prototype.readInt16LE=function(d,u){d=d>>>0,u||A(d,2,this.length);const D=this[d]|this[d+1]<<8;return D&32768?D|4294901760:D},a.prototype.readInt16BE=function(d,u){d=d>>>0,u||A(d,2,this.length);const D=this[d+1]|this[d]<<8;return D&32768?D|4294901760:D},a.prototype.readInt32LE=function(d,u){return d=d>>>0,u||A(d,4,this.length),this[d]|this[d+1]<<8|this[d+2]<<16|this[d+3]<<24},a.prototype.readInt32BE=function(d,u){return d=d>>>0,u||A(d,4,this.length),this[d]<<24|this[d+1]<<16|this[d+2]<<8|this[d+3]},a.prototype.readBigInt64LE=dn(function(d){d=d>>>0,Jt(d,"offset");const u=this[d],D=this[d+7];(u===void 0||D===void 0)&&Ue(d,this.length-8);const R=this[d+4]+this[d+5]*2**8+this[d+6]*2**16+(D<<24);return(BigInt(R)<<BigInt(32))+BigInt(u+this[++d]*2**8+this[++d]*2**16+this[++d]*2**24)}),a.prototype.readBigInt64BE=dn(function(d){d=d>>>0,Jt(d,"offset");const u=this[d],D=this[d+7];(u===void 0||D===void 0)&&Ue(d,this.length-8);const R=(u<<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+D)}),a.prototype.readFloatLE=function(d,u){return d=d>>>0,u||A(d,4,this.length),n.read(this,d,!0,23,4)},a.prototype.readFloatBE=function(d,u){return d=d>>>0,u||A(d,4,this.length),n.read(this,d,!1,23,4)},a.prototype.readDoubleLE=function(d,u){return d=d>>>0,u||A(d,8,this.length),n.read(this,d,!0,52,8)},a.prototype.readDoubleBE=function(d,u){return d=d>>>0,u||A(d,8,this.length),n.read(this,d,!1,52,8)};function h(g,d,u,D,R,N){if(!a.isBuffer(g))throw new TypeError('"buffer" argument must be a Buffer instance');if(d>R||d<N)throw new RangeError('"value" argument is out of bounds');if(u+D>g.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(d,u,D,R){if(d=+d,u=u>>>0,D=D>>>0,!R){const pe=Math.pow(2,8*D)-1;h(this,d,u,D,pe,0)}let N=1,K=0;for(this[u]=d&255;++K<D&&(N*=256);)this[u+K]=d/N&255;return u+D},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(d,u,D,R){if(d=+d,u=u>>>0,D=D>>>0,!R){const pe=Math.pow(2,8*D)-1;h(this,d,u,D,pe,0)}let N=D-1,K=1;for(this[u+N]=d&255;--N>=0&&(K*=256);)this[u+N]=d/K&255;return u+D},a.prototype.writeUint8=a.prototype.writeUInt8=function(d,u,D){return d=+d,u=u>>>0,D||h(this,d,u,1,255,0),this[u]=d&255,u+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(d,u,D){return d=+d,u=u>>>0,D||h(this,d,u,2,65535,0),this[u]=d&255,this[u+1]=d>>>8,u+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(d,u,D){return d=+d,u=u>>>0,D||h(this,d,u,2,65535,0),this[u]=d>>>8,this[u+1]=d&255,u+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(d,u,D){return d=+d,u=u>>>0,D||h(this,d,u,4,4294967295,0),this[u+3]=d>>>24,this[u+2]=d>>>16,this[u+1]=d>>>8,this[u]=d&255,u+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(d,u,D){return d=+d,u=u>>>0,D||h(this,d,u,4,4294967295,0),this[u]=d>>>24,this[u+1]=d>>>16,this[u+2]=d>>>8,this[u+3]=d&255,u+4};function T(g,d,u,D,R){Re(d,D,R,g,u,7);let N=Number(d&BigInt(4294967295));g[u++]=N,N=N>>8,g[u++]=N,N=N>>8,g[u++]=N,N=N>>8,g[u++]=N;let K=Number(d>>BigInt(32)&BigInt(4294967295));return g[u++]=K,K=K>>8,g[u++]=K,K=K>>8,g[u++]=K,K=K>>8,g[u++]=K,u}function se(g,d,u,D,R){Re(d,D,R,g,u,7);let N=Number(d&BigInt(4294967295));g[u+7]=N,N=N>>8,g[u+6]=N,N=N>>8,g[u+5]=N,N=N>>8,g[u+4]=N;let K=Number(d>>BigInt(32)&BigInt(4294967295));return g[u+3]=K,K=K>>8,g[u+2]=K,K=K>>8,g[u+1]=K,K=K>>8,g[u]=K,u+8}a.prototype.writeBigUInt64LE=dn(function(d,u=0){return T(this,d,u,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=dn(function(d,u=0){return se(this,d,u,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(d,u,D,R){if(d=+d,u=u>>>0,!R){const he=Math.pow(2,8*D-1);h(this,d,u,D,he-1,-he)}let N=0,K=1,pe=0;for(this[u]=d&255;++N<D&&(K*=256);)d<0&&pe===0&&this[u+N-1]!==0&&(pe=1),this[u+N]=(d/K>>0)-pe&255;return u+D},a.prototype.writeIntBE=function(d,u,D,R){if(d=+d,u=u>>>0,!R){const he=Math.pow(2,8*D-1);h(this,d,u,D,he-1,-he)}let N=D-1,K=1,pe=0;for(this[u+N]=d&255;--N>=0&&(K*=256);)d<0&&pe===0&&this[u+N+1]!==0&&(pe=1),this[u+N]=(d/K>>0)-pe&255;return u+D},a.prototype.writeInt8=function(d,u,D){return d=+d,u=u>>>0,D||h(this,d,u,1,127,-128),d<0&&(d=255+d+1),this[u]=d&255,u+1},a.prototype.writeInt16LE=function(d,u,D){return d=+d,u=u>>>0,D||h(this,d,u,2,32767,-32768),this[u]=d&255,this[u+1]=d>>>8,u+2},a.prototype.writeInt16BE=function(d,u,D){return d=+d,u=u>>>0,D||h(this,d,u,2,32767,-32768),this[u]=d>>>8,this[u+1]=d&255,u+2},a.prototype.writeInt32LE=function(d,u,D){return d=+d,u=u>>>0,D||h(this,d,u,4,2147483647,-2147483648),this[u]=d&255,this[u+1]=d>>>8,this[u+2]=d>>>16,this[u+3]=d>>>24,u+4},a.prototype.writeInt32BE=function(d,u,D){return d=+d,u=u>>>0,D||h(this,d,u,4,2147483647,-2147483648),d<0&&(d=4294967295+d+1),this[u]=d>>>24,this[u+1]=d>>>16,this[u+2]=d>>>8,this[u+3]=d&255,u+4},a.prototype.writeBigInt64LE=dn(function(d,u=0){return T(this,d,u,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=dn(function(d,u=0){return se(this,d,u,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Z(g,d,u,D,R,N){if(u+D>g.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function ee(g,d,u,D,R){return d=+d,u=u>>>0,R||Z(g,d,u,4),n.write(g,d,u,D,23,4),u+4}a.prototype.writeFloatLE=function(d,u,D){return ee(this,d,u,!0,D)},a.prototype.writeFloatBE=function(d,u,D){return ee(this,d,u,!1,D)};function ve(g,d,u,D,R){return d=+d,u=u>>>0,R||Z(g,d,u,8),n.write(g,d,u,D,52,8),u+8}a.prototype.writeDoubleLE=function(d,u,D){return ve(this,d,u,!0,D)},a.prototype.writeDoubleBE=function(d,u,D){return ve(this,d,u,!1,D)},a.prototype.copy=function(d,u,D,R){if(!a.isBuffer(d))throw new TypeError("argument should be a Buffer");if(D||(D=0),!R&&R!==0&&(R=this.length),u>=d.length&&(u=d.length),u||(u=0),R>0&&R<D&&(R=D),R===D||d.length===0||this.length===0)return 0;if(u<0)throw new RangeError("targetStart out of bounds");if(D<0||D>=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-u<R-D&&(R=d.length-u+D);const N=R-D;return this===d&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(u,D,R):Uint8Array.prototype.set.call(d,this.subarray(D,R),u),N},a.prototype.fill=function(d,u,D,R){if(typeof d=="string"){if(typeof u=="string"?(R=u,u=0,D=this.length):typeof D=="string"&&(R=D,D=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 K=d.charCodeAt(0);(R==="utf8"&&K<128||R==="latin1")&&(d=K)}}else typeof d=="number"?d=d&255:typeof d=="boolean"&&(d=Number(d));if(u<0||this.length<u||this.length<D)throw new RangeError("Out of range index");if(D<=u)return this;u=u>>>0,D=D===void 0?this.length:D>>>0,d||(d=0);let N;if(typeof d=="number")for(N=u;N<D;++N)this[N]=d;else{const K=a.isBuffer(d)?d:a.from(d,R),pe=K.length;if(pe===0)throw new TypeError('The value "'+d+'" is invalid for argument "value"');for(N=0;N<D-u;++N)this[N+u]=K[N%pe]}return this};const le={};function be(g,d,u){le[g]=class extends u{constructor(){super(),Object.defineProperty(this,"message",{value:d.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${g}]`,this.stack,delete this.name}get code(){return g}set code(R){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:R,writable:!0})}toString(){return`${this.name} [${g}]: ${this.message}`}}}be("ERR_BUFFER_OUT_OF_BOUNDS",function(g){return g?`${g} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),be("ERR_INVALID_ARG_TYPE",function(g,d){return`The "${g}" argument must be of type number. Received type ${typeof d}`},TypeError),be("ERR_OUT_OF_RANGE",function(g,d,u){let D=`The value of "${g}" is out of range.`,R=u;return Number.isInteger(u)&&Math.abs(u)>2**32?R=ln(String(u)):typeof u=="bigint"&&(R=String(u),(u>BigInt(2)**BigInt(32)||u<-(BigInt(2)**BigInt(32)))&&(R=ln(R)),R+="n"),D+=` It must be ${d}. Received ${R}`,D},RangeError);function ln(g){let d="",u=g.length;const D=g[0]==="-"?1:0;for(;u>=D+4;u-=3)d=`_${g.slice(u-3,u)}${d}`;return`${g.slice(0,u)}${d}`}function xe(g,d,u){Jt(d,"offset"),(g[d]===void 0||g[d+u]===void 0)&&Ue(d,g.length-(u+1))}function Re(g,d,u,D,R,N){if(g>u||g<d){const K=typeof d=="bigint"?"n":"";let pe;throw d===0||d===BigInt(0)?pe=`>= 0${K} and < 2${K} ** ${(N+1)*8}${K}`:pe=`>= -(2${K} ** ${(N+1)*8-1}${K}) and < 2 ** ${(N+1)*8-1}${K}`,new le.ERR_OUT_OF_RANGE("value",pe,g)}xe(D,R,N)}function Jt(g,d){if(typeof g!="number")throw new le.ERR_INVALID_ARG_TYPE(d,"number",g)}function Ue(g,d,u){throw Math.floor(g)!==g?(Jt(g,u),new le.ERR_OUT_OF_RANGE("offset","an integer",g)):d<0?new le.ERR_BUFFER_OUT_OF_BOUNDS:new le.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${d}`,g)}const $e=/[^+/0-9A-Za-z-_]/g;function mi(g){if(g=g.split("=")[0],g=g.trim().replace($e,""),g.length<2)return"";for(;g.length%4!==0;)g=g+"=";return g}function Le(g,d){d=d||1/0;let u;const D=g.length;let R=null;const N=[];for(let K=0;K<D;++K){if(u=g.charCodeAt(K),u>55295&&u<57344){if(!R){if(u>56319){(d-=3)>-1&&N.push(239,191,189);continue}else if(K+1===D){(d-=3)>-1&&N.push(239,191,189);continue}R=u;continue}if(u<56320){(d-=3)>-1&&N.push(239,191,189),R=u;continue}u=(R-55296<<10|u-56320)+65536}else R&&(d-=3)>-1&&N.push(239,191,189);if(R=null,u<128){if((d-=1)<0)break;N.push(u)}else if(u<2048){if((d-=2)<0)break;N.push(u>>6|192,u&63|128)}else if(u<65536){if((d-=3)<0)break;N.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((d-=4)<0)break;N.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw new Error("Invalid code point")}return N}function je(g){const d=[];for(let u=0;u<g.length;++u)d.push(g.charCodeAt(u)&255);return d}function bi(g,d){let u,D,R;const N=[];for(let K=0;K<g.length&&!((d-=2)<0);++K)u=g.charCodeAt(K),D=u>>8,R=u%256,N.push(R),N.push(D);return N}function ze(g){return e.toByteArray(mi(g))}function We(g,d,u,D){let R;for(R=0;R<D&&!(R+u>=d.length||R>=g.length);++R)d[R+u]=g[R];return R}function Gt(g,d){return g instanceof d||g!=null&&g.constructor!=null&&g.constructor.name!=null&&g.constructor.name===d.name}function Oe(g){return g!==g}const Ve=function(){const g="0123456789abcdef",d=new Array(256);for(let u=0;u<16;++u){const D=u*16;for(let R=0;R<16;++R)d[D+R]=g[u]+g[R]}return d}();function dn(g){return typeof BigInt>"u"?Ge:g}function Ge(){throw new Error("BigInt not supported")}})(ae);var Pu={exports:{}},et=Pu.exports={},An,Bn;function ja(){throw new Error("setTimeout has not been defined")}function Va(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?An=setTimeout:An=ja}catch{An=ja}try{typeof clearTimeout=="function"?Bn=clearTimeout:Bn=Va}catch{Bn=Va}})();function Lu(t){if(An===setTimeout)return setTimeout(t,0);if((An===ja||!An)&&setTimeout)return An=setTimeout,setTimeout(t,0);try{return An(t,0)}catch{try{return An.call(null,t,0)}catch{return An.call(this,t,0)}}}function Om(t){if(Bn===clearTimeout)return clearTimeout(t);if((Bn===Va||!Bn)&&clearTimeout)return Bn=clearTimeout,clearTimeout(t);try{return Bn(t)}catch{try{return Bn.call(null,t)}catch{return Bn.call(this,t)}}}var Kn=[],Yr=!1,br,Si=-1;function Nm(){!Yr||!br||(Yr=!1,br.length?Kn=br.concat(Kn):Si=-1,Kn.length&&Ou())}function Ou(){if(!Yr){var t=Lu(Nm);Yr=!0;for(var e=Kn.length;e;){for(br=Kn,Kn=[];++Si<e;)br&&br[Si].run();Si=-1,e=Kn.length}br=null,Yr=!1,Om(t)}}et.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];Kn.push(new Nu(t,e)),Kn.length===1&&!Yr&&Lu(Ou)};function Nu(t,e){this.fun=t,this.array=e}Nu.prototype.run=function(){this.fun.apply(null,this.array)};et.title="browser";et.browser=!0;et.env={};et.argv=[];et.version="";et.versions={};function jn(){}et.on=jn;et.addListener=jn;et.once=jn;et.off=jn;et.removeListener=jn;et.removeAllListeners=jn;et.emit=jn;et.prependListener=jn;et.prependOnceListener=jn;et.listeners=function(t){return[]};et.binding=function(t){throw new Error("process.binding is not supported")};et.cwd=function(){return"/"};et.chdir=function(t){throw new Error("process.chdir is not supported")};et.umask=function(){return 0};var zu=Pu.exports;(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=ae,n=zu,r=o=>o&&o.__esModule?o:{default:o},s=r(n),i=globalThis||window||void 0||self;Object.defineProperty(t,"Buffer",{enumerable:!0,get:()=>e.Buffer}),Object.defineProperty(t,"process",{enumerable:!0,get:()=>s.default}),t.global=i})(Ne);const Hi=t=>[...Array(t).keys()],Hu=(t,e)=>t.map(n=>n[e]),pr=t=>Hi(t[0].length).map(e=>Hi(t.length).map(n=>t[n][e])),zm=(t,e,n)=>{const r=new Set(Array.isArray(e)?e:[e]);return t.filter((s,i)=>r.has(i)!==n)};function Hm(t,e=!1){if(t.length===0)throw new Error("Can't calculate median of empty array");const n=e?t:[...t].sort((o,a)=>o>a?1:o<a?-1:0),r=Math.floor(n.length/2);if(n.length%2===1)return n[r];const s=n[r-1],i=n[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 qm(t){return["string","number","symbol","bigint","boolean"].includes(typeof t)}const nd=t=>t.length===2&&!Array.isArray(t[0])&&Array.isArray(t[1]),qi=t=>t.length===0?[]:Array.isArray(t[0])?t.map(([e,n])=>Array.isArray(n)?(nd(n)?qi(n):n).map(r=>[e,r].flat()):[[e,n]]).flat():nd(t)?qi(t[1]).map(e=>[t[0],e]):t,Km=(t,e)=>{const n=qi(t);if(n.length===0)throw new Error("Invalid mapping: empty");const r=e===void 0?[Hi(n[0].length-1),[n[0].length-1]]:e.map(C=>typeof C=="number"?[C]:C);let s=[],i=!0;const o=(C,w)=>{const F=Array.from(new Set(C[0]).values()),I=new Map(F.map(E=>[E,[]]));for(const[E,_]of C[0].entries())I.get(_).push(E);if(C.length===1){const E=Object.fromEntries(F.map(_=>[_,I.get(_).map(k=>w[k].length===1?w[k][0]:w[k])]));if(i){for(const _ of I.values())if(_.length>1)return i=!1,E;s.push(E)}return E}const x=pr(C.slice(1));return Object.fromEntries(F.map(E=>{const _=I.get(E),k=pr(_.map(M=>x[M])),P=_.map(M=>w[M]);return[E,o(k,P)]}))},a=pr(n),l=C=>{const w=a[C];if(w===void 0)throw new Error(`Invalid shape: column ${C} does not exist`);return w},[f,m]=r.map(C=>C.map(w=>l(w)));if(f.length===0)throw new Error("Invalid shape: empty key set");if(m.length===0)throw new Error("Invalid shape: empty value set");for(const C of f)for(const w of C)if(!qm(w))throw new Error(`Invalid key: ${w} in ${C}`);const p=o(f,pr(m));if(i)for(const C of s)for(const w of Object.keys(C))C[w]=C[w][0];return p};function fe(t,e){const n=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=>n(r[i.toString()])})};return n(Km(t,e))}function _c(t){let e=null;return()=>(e||(e=t()),e)}function $m(t){try{return t(),!1}catch{return!0}}function jm(t,e,n){return t<e?e:t>n?n:t}var Vm=["int","uint","bytes","array","switch"],qu="big",mo=6,Dr=t=>typeof t=="number"||typeof t=="bigint",cs=t=>t instanceof Uint8Array,Gm=t=>Dr(t)||cs(t),Ps=t=>Vm.includes(t==null?void 0:t.binary),Ym=t=>Ps(t)||Array.isArray(t)&&t.every(Ps),Xm=t=>typeof(t==null?void 0:t.from)=="number",Zm=t=>typeof(t==null?void 0:t.from)=="bigint",Jm=t=>Xm(t)||Zm(t),ls=t=>cs(t==null?void 0:t.from),Qm=t=>Jm(t)||ls(t),Ku=(t,e)=>{if(t!==e)throw new Error(`size mismatch: layout size: ${t}, data size: ${e}`);return e},Qr=t=>"layout"in t&&t.layout!==void 0,Ga=(t,e)=>"size"in t&&t.size!==void 0?Ku(t.size,e):e,Ya=(t,e)=>{if(t!=e)throw new Error(`value mismatch: (constant) layout value: ${t}, data value: ${e}`)},Xa=(t,e,n)=>{const r=(f,m)=>m===void 0?[0,f.length]:Array.isArray(m)?m:[m,f.length],[s,i]=r(t,n==null?void 0:n.customSlice),[o,a]=r(e,n==null?void 0:n.dataSlice),l=i-s;Ku(l,a-o);for(let f=0;f<t.length;++f)if(t[f+s]!==e[f+o])throw new Error(`binary data mismatch: layout value: ${t}, offset: ${s}, data value: ${e}, offset: ${o}`)};function $u(t,e){const n=e[t.idTag??"id"];return t.layouts.find(([r])=>(Array.isArray(r)?r[1]:r)==n)}function ju(t){return dr(t,tn)}var tn=Symbol("staticCalc");function e1(t,e){const n=[],r=dr(t,e,n);if(r===null)throw new Error(`coding error: couldn't calculate layout size for layout ${t} with data ${e}`);return[r,n]}function rd(t,e,n){const r=s=>(n!==void 0&&n.push(s),s);switch(t.binary){case"int":case"uint":return t.size;case"bytes":{if("size"in t&&e===tn)return t.size;const s="lengthSize"in t?t.lengthSize|0:0;if(Qr(t)){const{custom:o}=t,a=dr(t.layout,o===void 0?e:typeof o.from=="function"?e!==tn?r(o.from(e)):tn:o.from,n);return a===null?"size"in t?t.size??null:null:s+Ga(t,a)}const{custom:i}=t;return cs(i)?s+i.length:ls(i)?s+i.from.length:e===tn?null:s+Ga(t,i!==void 0?r(i.from(e)).length:e.length)}case"array":{const s="length"in t?t.length:void 0;if(e===tn){if(s!==void 0){const o=dr(t.layout,tn,n);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 t&&t.lengthSize!==void 0&&(i+=t.lengthSize);for(let o=0;o<e.length;++o){const a=dr(t.layout,e[o],n);if(a===null)return null;i+=a}return i}case"switch":{if(e!==tn){const[i,o]=$u(t,e),a=dr(o,e,n);return a!==null?t.idSize+a:null}let s=null;for(const[i,o]of t.layouts){const a=dr(o,tn,n);if(s===null)s=a;else if(a!==s)return null}return t.idSize+s}}}function dr(t,e,n){if(Ps(t))return rd(t,e,n);let r=0;for(const s of t){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=rd(s,i,n);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 wa=(t,e)=>{t.bytes.set(e,t.offset),t.offset+=e.length},sd=t=>t.bytesConversions[t.position++];function bn(t,e,n){const[r,s]=e1(t,e),i={bytes:new Uint8Array(r),offset:0};if(Di(t,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 i.bytes}var id=2**(mo*8);function yr(t,e,n,r=qu,s=!1){if(!s&&t<0)throw new Error(`Value ${t} is negative but unsigned`);if(typeof t=="number"){if(!Number.isInteger(t))throw new Error(`Value ${t} is not an integer`);if(e>mo){if(t>=id)throw new Error(`Value ${t} is too large to be safely converted into an integer`);if(s&&t<-id)throw new Error(`Value ${t} is too small to be safely converted into an integer`)}}const i=2n**BigInt(e*8-(s?1:0));if(t>=i)throw new Error(`Value ${t} is too large for ${e} bytes`);if(s&&t<-i)throw new Error(`Value ${t} is too small for ${e} bytes`);for(let o=0;o<e;++o)n.bytes[n.offset+o]=Number(BigInt(t)>>BigInt(8*(r==="big"?e-o-1:o))&0xffn);n.offset+=e}function Di(t,e,n,r){if(Ps(t))od(t,e,n,r);else for(const s of t)try{od(s,e[s.name],n,r)}catch(i){throw i.message=`when serializing item '${s.name}': ${i.message}`,i}}function od(t,e,n,r){switch(t.binary){case"int":case"uint":{const s=(()=>{var i;return Dr(t.custom)?("omit"in t&&t.omit||Ya(t.custom,e),t.custom):Dr((i=t==null?void 0:t.custom)==null?void 0:i.from)?t.custom.from:t.custom!==void 0?t.custom.from(e):e})();yr(s,t.size,n,t.endianness,t.binary==="int");break}case"bytes":{const s=n.offset;if("lengthSize"in t&&t.lengthSize!==void 0&&(n.offset+=t.lengthSize),Qr(t)){const{custom:i}=t;let o;i===void 0?o=e:typeof i.from!="function"?o=i.from:o=sd(r),Di(t.layout,o,n,r)}else{const{custom:i}=t;cs(i)?("omit"in t&&t.omit||Xa(i,e),wa(n,i)):ls(i)?wa(n,i.from):wa(n,i!==void 0?sd(r):e)}if("lengthSize"in t&&t.lengthSize!==void 0){const i=n.offset-s-t.lengthSize,o=n.offset;n.offset=s,yr(i,t.lengthSize,n,t.lengthEndianness),n.offset=o}else Ga(t,n.offset-s);break}case"array":{if("length"in t&&t.length!==e.length)throw new Error(`array length mismatch: layout length: ${t.length}, data length: ${e.length}`);"lengthSize"in t&&t.lengthSize!==void 0&&yr(e.length,t.lengthSize,n,t.lengthEndianness);for(let s=0;s<e.length;++s)Di(t.layout,e[s],n,r);break}case"switch":{const[s,i]=$u(t,e),o=Array.isArray(s)?s[0]:s;yr(o,t.idSize,n,t.idEndianness),Di(i,e,n,r);break}}}function Vu(t){const e=t.custom;if(!("cachedSerializedFrom"in e)&&(e.cachedSerializedFrom=bn(t.layout,e.from),"size"in t&&t.size!==void 0&&t.size!==e.cachedSerializedFrom.length))throw new Error("Layout specification error: custom.from does not serialize to specified size");return e.cachedSerializedFrom}function pn(t,e,n){const r=n??!0,s={bytes:e,offset:0,end:e.length},i=ks(t,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 vi(t,e){const n=t.offset+e;if(n>t.end)throw new Error(`chunk is shorter than expected: ${t.end} < ${n}`);t.offset=n}function ks(t,e){if(!Array.isArray(t))return ad(t,e);let n={};for(const r of t)try{(r.omit?{}:n)[r.name]=ad(r,e)}catch(s){throw s.message=`when deserializing item '${r.name}': ${s.message}`,s}return n}function pi(t,e,n=qu,r=!1){let s=0n;for(let i=0;i<e;++i)s|=BigInt(t.bytes[t.offset+i])<<BigInt(8*(n==="big"?e-i-1:i));return r&&t.bytes[t.offset+(n==="big"?0:e-1)]&128&&(s-=1n<<BigInt(8*e)),vi(t,e),e>mo?s:Number(s)}function ad(t,e){switch(t.binary){case"int":case"uint":{const n=pi(e,t.size,t.endianness,t.binary==="int"),{custom:r}=t;return Dr(r)?(Ya(r,n),r):Dr(r==null?void 0:r.from)?(Ya(r.from,n),r.to):r!==void 0?r.to(n):n}case"bytes":{const n="lengthSize"in t&&t.lengthSize!==void 0?pi(e,t.lengthSize,t.lengthEndianness):t==null?void 0:t.size;if(Qr(t)){const{custom:a}=t,l=e.offset;let f;if(n===void 0)f=ks(t.layout,e);else{const m={...e,end:e.offset+n};if(vi(e,n),f=ks(t.layout,m),m.offset!==m.end)throw new Error(`read less data than expected: ${m.offset-e.offset} < ${n}`)}return a!==void 0?typeof a.from!="function"?(Xa(Vu(t),e.bytes,{dataSlice:[l,e.offset]}),a.to):a.to(f):f}const{custom:r}=t;{let a,l;if(cs(r)?a=r:ls(r)&&(a=r.from,l=r.to),a!==void 0){const f=n??a.length,m=e.bytes.subarray(e.offset,e.offset+f);return Xa(a,m),vi(e,f),l??a}}const s=e.offset,i=n!==void 0?e.offset+n:e.end;vi(e,i-s);const o=e.bytes.subarray(s,i);return r!==void 0?r.to(o):o}case"array":{let n=[];const{layout:r}=t,s=()=>{const o=ks(r,e);n.push(o)};let i=null;if("length"in t&&t.length!==void 0?i=t.length:"lengthSize"in t&&t.lengthSize!==void 0&&(i=pi(e,t.lengthSize,t.lengthEndianness)),i!==null)for(let o=0;o<i;++o)s();else for(;e.offset<e.end;)s();return n}case"switch":{const n=pi(e,t.idSize,t.idEndianness),{layouts:r}=t;if(r.length===0)throw new Error("switch item has no layouts");const s=typeof r[0][0]=="number",i=r.find(([f])=>s?f===n:f[0]===n);if(i===void 0)throw new Error(`unknown id value: ${n}`);const[o,a]=i,l=ks(a,e);return{[t.idTag??"id"]:s?n:o[1],...l}}}}function t1(t,e){return ki(t,e)}function cd(t,e){switch(t.binary){case"bytes":if(Qr(t)){const{custom:n}=t;return n===void 0||typeof n.from!="function"?ki(t.layout,n?n.from:e):e}case"int":case"uint":{const{custom:n}=t;return t!=null&&t.omit?void 0:Gm(n)?n:Qm(n)?n.to:e}case"array":return Array.isArray(e)?e.map(n=>ki(t.layout,n)):void 0;case"switch":{const n=e[t.idTag??"id"],[r,s]=t.layouts.find(([i])=>(Array.isArray(i)?i[1]:i)==n);return{[t.idTag??"id"]:n,...ki(s,e)}}}}function ki(t,e){if(e=e??{},Ps(t))return cd(t,e);const n={};for(const r of t){const s=cd(r,e[r.name]??{});s!==void 0&&(n[r.name]=s)}return n}function n1(t,e){const[n,r]=s1(t);if(!n)throw new Error("Cannot uniquely distinguished the given layouts");return s=>{const i=r(s);return i.length===0?null:i[0]}}function Za(t){return t.reduce((e,n)=>e|BigInt(1)<<BigInt(n),BigInt(0))}function yi(t){const e=[];for(let n=0n;t>0n;t>>=1n,++n)t&1n&&e.push(Number(n));return e}function wt(t){let e=0;for(;t>0n;t>>=1n)e+=Number(t&1n);return e}var ld=t=>t>0?2**(8*t)-1:1/0;function dd(t,e,n){var r;switch(t.binary){case"int":case"uint":{const s=Dr(t.custom)?t.custom:Dr((r=t==null?void 0:t.custom)==null?void 0:r.from)?t.custom.from:null;if(s!==null&&e!==null){const i={bytes:new Uint8Array(t.size),offset:0};yr(s,t.size,i,t.endianness,t.binary==="int"),n.push([e,i.bytes])}return[t.size,t.size]}case"bytes":{const s="lengthSize"in t?t.lengthSize|0:0;let i,o;if(Qr(t)){const{custom:l}=t;if(l!==void 0&&typeof l.from!="function")i=Vu(t),o=i.length;else{const f=ju(t.layout);f!==null&&(o=f)}}else{const{custom:l}=t;cs(l)?(i=l,o=l.length):ls(l)&&(i=l.from,o=l.from.length)}if(s>0&&e!==null){if(o!==void 0){const l={bytes:new Uint8Array(s),offset:0},f=t.lengthEndianness;yr(o,s,l,f,!1),n.push([e,l.bytes])}e+=s}if(i!==void 0)return e!==null&&n.push([e,i]),[s+i.length,s+i.length];const a="size"in t&&t.size!==void 0?[t.size,t.size]:void 0;if(Qr(t)){const l=Fi(t.layout,e,n);return a??[s+l[0],s+l[1]]}return a??[s,ld(s)]}case"array":{if("length"in t){let i=[];const o=Fi(t.layout,0,i);if(e!==null)if(o[0]!==o[1]){if(t.length>0)for(const[a,l]of i)n.push([e+a,l])}else for(let a=0;a<t.length;++a)for(const[l,f]of i)n.push([e+l+a*o[0],f]);return[t.length*o[0],t.length*o[1]]}const s=t.lengthSize|0;return[s,ld(s)]}case"switch":{const s=t.layouts.map(l=>[]),{idSize:i,idEndianness:o}=t,a=t.layouts.map(([l,f],m)=>{const p=Array.isArray(l)?l[0]:l;if(e!==null){const w={bytes:new Uint8Array(i),offset:0};yr(p,i,w,o),s[m].push([0,w.bytes])}const C=Fi(f,e!==null?i:null,s[m]);return[C[0]+i,C[1]+i]});return e!==null&&s.every(l=>l.length>0)&&(()=>{const l=Math.min(...s.map(m=>m.at(-1)[0]+m.at(-1)[1].length)),f=s.map(m=>0);for(let m=0;m<l;){let p=null,C=0;for(;C<s.length;){let w=f[C];const F=s[C],[I,x]=F[w];if(I+x.length<=m){if(++w,w===F.length)return;f[C]=w,m=F[w][0];break}const E=x[m-I];if(p===null&&(p=E),E!==p){++m;break}++C}C===s.length&&(n.push([e+m,new Uint8Array([p])]),++m)}})(),[Math.min(...a.map(([l])=>l)),Math.max(...a.map(([l,f])=>f))]}}}function Fi(t,e,n){if(!Array.isArray(t))return dd(t,e,n);let r=[0,0];for(const s of t){const i=dd(s,e,n);r[0]+=i[0],r[1]+=i[1],e!==null&&(e=i[0]===i[1]?e+i[0]:null)}return r}function r1(t){const e=new Map;let n=[];const r=s=>{for(;n.length>0&&n[0][0]<s;){const i=n[0][0]+1,o=n.findIndex(([a])=>i<=a);o===-1?n=[]:n.splice(0,o),e.set(i,Za(n.map(([,a])=>a)))}};for(const[[s,i],o]of t){r(s);const a=n.findIndex(([l])=>l>i);a===-1?n.push([i,o]):n.splice(a,0,[i,o]),e.set(s,Za(n.map(([,l])=>l)))}return r(1/0),e}function s1(t){if(t.length===0)throw new Error("Cannot discriminate empty set of layouts");const e=0n,n=(1n<<BigInt(t.length))-1n,r=t.map(()=>[]),s=t.map((k,P)=>Fi(k,0,r[P])),i=s.map((k,P)=>[k,P]).sort(([[k]],[[P]])=>k-P),o=(()=>{let k=n;const P=new Map;for(const[[M],$]of i)k^=1n<<BigInt($),P.set(M,k);return P})(),a=r1(i),l=t.length-Math.max(...[...a.values()].map(k=>wt(k))),f=k=>{let P=n;for(const[M,$]of o){if(k<M)break;P=$}return P},m=k=>{let P=e;for(const[M,$]of a){if(k<M)break;P=$}return P},p=Array.from({length:Math.max(...r.map(k=>k.length>0?k.at(-1)[0]+k.at(-1)[1].length:0))}).map(()=>[]);for(let k=0;k<r.length;++k)for(const[P,M]of r[k])for(let $=0;$<M.length;++$)p[P+$].push([M[$],k]);let C=[];for(const[k,P]of p.entries()){const M=f(k),$=M^Za(P.map(([,j])=>j)),G=n^M,Y=new Map;for(const[j,O]of P)Y.has(j)||Y.set(j,e),Y.set(j,Y.get(j)|1n<<BigInt(O));let L=t.length-Math.max(wt($),wt(G));for(const j of Y.values()){const O=P.length-wt(j)+wt(G);L=Math.min(L,O)}if(L!==0){if(L===t.length-1)return[!0,j=>yi(j.length<=k?G:Y.get(j[k])??e)];C.push([L,k,G,Y,$])}}if(l===t.length-1)return[!0,k=>yi(m(k.length))];C.sort(([k],[P])=>P-k);let w=!0;const F=new Map,I=new Map,x=(k,P)=>{F.set(k,P),I.has(wt(k))||I.set(wt(k),[]),I.get(wt(k)).push(k)},E=(k,P)=>{if(wt(k)<=1||F.has(k))return;let M=0;const $=new Map;for(const Y of yi(k)){const L=s[Y][0],j=a.get(L)&k;$.set(L,j),M=Math.max(M,wt(j))}M=wt(k)-M;const G=[];for(const[Y,L,j,O,q]of P){const B=new Map;let c=0;for(const[S,v]of O){const U=v&k;wt(U)>0&&(B.set(S,U),c+=wt(U))}const b=j&k;let y=B.size>0?Y:0;for(const S of B.values()){const v=c-wt(S)+wt(b);y=Math.min(y,v)}if(y!==0){if(y===wt(k)-1){x(k,[L,b,B]);return}G.push([y,L,b,B,q&k])}}if(M===wt(k)-1){x(k,"size");return}if(G.sort(([Y],[L])=>L-Y),G.length>0&&G[0][0]>=M){const[,Y,L,j,O]=G[0];x(k,[Y,L,j]),E(L,G);for(const q of j.values())E(q|O,G.slice(1));return}if(M>0){x(k,"size");for(const Y of $.values())E(Y,G);return}x(k,"indistinguishable"),w=!1};E(n,C);const _=k=>{for(let P=wt(k)+1;P<t.length-2;++P)for(const M of I.get(P)??[])if((k&M)==k)return F.get(M);throw new Error("Implementation error in layout discrimination algorithm")};return[w,k=>{let P=n,M=F.get(P);for(;M!=="indistinguishable";){if(M==="size")P&=m(k.length);else{const[$,G,Y]=M;if(k.length<=$)P&=G;else{const L=k[$];for(const[j,O]of Y)j!==L&&(P^=P&O);P^=P&G}}if(wt(P)<=1)break;M=F.get(P)??_(P)}return yi(P)}]}var bo=(t,e)=>({...t,binary:"bytes",...e===void 0?{}:Ym(e)?{layout:e}:e instanceof Uint8Array||ls(e)||!Array.isArray(e)?{custom:e}:{layout:e[0],custom:e[1]}});function i1(t,e){const n=Object.fromEntries(t.map(([s,i])=>[i,s])),r=Object.fromEntries(t);return{binary:"uint",size:(e==null?void 0:e.size)??1,endianness:(e==null?void 0:e.endianness)??"big",custom:{to:s=>{const i=n[s];if(i===void 0)throw new Error(`Invalid enum value: ${s}`);return i},from:s=>r[s]}}}function o1(t,e){return{binary:"uint",size:Math.ceil(t.length/8),custom:{to:n=>{const r={};for(let s=0;s<t.length;++s)t[s]&&(r[t[s]]=(BigInt(n)&1n<<BigInt(s))!==0n);return r},from:n=>{let r=0n;for(let s=0;s<t.length;++s)t[s]&&n[t[s]]&&(r|=1n<<BigInt(s));return t.length>mo?r:Number(r)}}}}function a1(t,e){return Number(Number(t).toFixed(e))}function Ti(t,e){if(c1(t,e),t=t.toString(),t.includes("e"))throw new Error("Scientific notation is not supported yet by Amount");const n=t.split(".");if(n.length>2)throw"Too many decimals";let[r,s]=n.length===0?["0",""]:n.length===1?[n[0],""]:n;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 Ii(t,e){if(t.decimals<=e)return t;const n=BigInt(t.decimals-e);return{amount:(kt(t)/10n**n*10n**n).toString(),decimals:t.decimals}}function Kr(t,e){if(t.decimals===e)return t;if(t.amount==="0")return{amount:t.amount,decimals:e};const n=e-t.decimals;if(n>0)return{amount:t.amount+"0".repeat(n),decimals:e};if(BigInt(t.amount.substring(t.amount.length+n))===0n)return{amount:t.amount.substring(0,t.amount.length+n),decimals:e};throw new Error(`scaleAmount(${JSON.stringify(t)}, ${e}) would result in altered amount. Use truncateAmount first if you intended to truncate it.`)}function zn(t,e){return{amount:t.toString(),decimals:e}}function kt(t){return Gu(t),BigInt(t.amount)}function po(t,e){Gu(t);let n=t.amount.substring(0,t.amount.length-t.decimals).padStart(1,"0"),r=t.amount.substring(t.amount.length-t.decimals).padStart(t.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?`${n}.${r}`:n}function Is(t){return Number(po(t))}function ud(t,e){return po(zn(t,e))}function c1(t,e){if(typeof t=="number"){if(!isFinite(t))throw new Error("Amount: invalid input. Amount must be finite");if(t<0)throw new Error("Amount: invalid input. Amount cannot be negative")}else if(!/^[0-9\.]*$/.test(t))throw new Error("Amount: invalid input. Must only contain digits.");if(!isFinite(e))throw new Error("Amount: invalid input. Decimals must be finite")}function Gu(t){if(!/^[0-9]*$/.test(t.amount))throw new Error("Amount: invalid input. Must only contain digits.");if(t.decimals<0)throw new Error("Amount: invalid input. Decimals must be >= 0");if(!isFinite(t.decimals))throw new Error("Amount: invalid input. Decimals must be a finite number.")}function l1(t,e){const r=kt(t)*e/100000n;return zn(r,t.decimals)}const Ls=(t=0,e=0,n=0)=>new Date(Date.now()+(t*60*60+e*60+n)*1e3);/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function es(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function d1(t,...e){if(!es(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function Yu(t,e){return Array.isArray(e)?e.length===0?!0:t?e.every(n=>typeof n=="string"):e.every(n=>Number.isSafeInteger(n)):!1}function Xu(t){if(typeof t!="function")throw new Error("function expected");return!0}function vr(t,e){if(typeof e!="string")throw new Error(`${t}: string expected`);return!0}function ds(t){if(!Number.isSafeInteger(t))throw new Error(`invalid integer: ${t}`)}function Ki(t){if(!Array.isArray(t))throw new Error("array expected")}function $i(t,e){if(!Yu(!0,e))throw new Error(`${t}: array of strings expected`)}function Mc(t,e){if(!Yu(!1,e))throw new Error(`${t}: array of numbers expected`)}function Qs(...t){const e=i=>i,n=(i,o)=>a=>i(o(a)),r=t.map(i=>i.encode).reduceRight(n,e),s=t.map(i=>i.decode).reduce(n,e);return{encode:r,decode:s}}function yo(t){const e=typeof t=="string"?t.split(""):t,n=e.length;$i("alphabet",e);const r=new Map(e.map((s,i)=>[s,i]));return{encode:s=>(Ki(s),s.map(i=>{if(!Number.isSafeInteger(i)||i<0||i>=n)throw new Error(`alphabet.encode: digit index outside alphabet "${i}". Allowed: ${t}`);return e[i]})),decode:s=>(Ki(s),s.map(i=>{vr("alphabet.decode",i);const o=r.get(i);if(o===void 0)throw new Error(`Unknown letter: "${i}". Allowed: ${t}`);return o}))}}function go(t=""){return vr("join",t),{encode:e=>($i("join.decode",e),e.join(t)),decode:e=>(vr("join.decode",e),e.split(t))}}function u1(t,e="="){return ds(t),vr("padding",e),{encode(n){for($i("padding.encode",n);n.length*t%8;)n.push(e);return n},decode(n){$i("padding.decode",n);let r=n.length;if(r*t%8)throw new Error("padding: invalid, string should have whole number of bytes");for(;r>0&&n[r-1]===e;r--)if((r-1)*t%8===0)throw new Error("padding: invalid, string has too much padding");return n.slice(0,r)}}}function fd(t,e,n){if(e<2)throw new Error(`convertRadix: invalid from=${e}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: invalid to=${n}, base cannot be less than 2`);if(Ki(t),!t.length)return[];let r=0;const s=[],i=Array.from(t,a=>{if(ds(a),a<0||a>=e)throw new Error(`invalid integer: ${a}`);return a}),o=i.length;for(;;){let a=0,l=!0;for(let f=r;f<o;f++){const m=i[f],p=e*a,C=p+m;if(!Number.isSafeInteger(C)||p/e!==a||C-m!==p)throw new Error("convertRadix: carry overflow");const w=C/n;a=C%n;const F=Math.floor(w);if(i[f]=F,!Number.isSafeInteger(F)||F*n+a!==C)throw new Error("convertRadix: carry overflow");if(l)F?l=!1:r=f;else continue}if(s.push(a),l)break}for(let a=0;a<t.length-1&&t[a]===0;a++)s.push(0);return s.reverse()}const Zu=(t,e)=>e===0?t:Zu(e,t%e),ji=(t,e)=>t+(e-Zu(t,e)),Ui=(()=>{let t=[];for(let e=0;e<40;e++)t.push(2**e);return t})();function Ja(t,e,n,r){if(Ki(t),e<=0||e>32)throw new Error(`convertRadix2: wrong from=${e}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(ji(e,n)>32)throw new Error(`convertRadix2: carry overflow from=${e} to=${n} carryBits=${ji(e,n)}`);let s=0,i=0;const o=Ui[e],a=Ui[n]-1,l=[];for(const f of t){if(ds(f),f>=o)throw new Error(`convertRadix2: invalid data word=${f} from=${e}`);if(s=s<<e|f,i+e>32)throw new Error(`convertRadix2: carry overflow pos=${i} from=${e}`);for(i+=e;i>=n;i-=n)l.push((s>>i-n&a)>>>0);const m=Ui[i];if(m===void 0)throw new Error("invalid carry");s&=m-1}if(s=s<<n-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&&l.push(s>>>0),l}function f1(t){ds(t);const e=2**8;return{encode:n=>{if(!es(n))throw new Error("radix.encode input should be Uint8Array");return fd(Array.from(n),e,t)},decode:n=>(Mc("radix.decode",n),Uint8Array.from(fd(n,t,e)))}}function Rc(t,e=!1){if(ds(t),t<=0||t>32)throw new Error("radix2: bits should be in (0..32]");if(ji(8,t)>32||ji(t,8)>32)throw new Error("radix2: carry overflow");return{encode:n=>{if(!es(n))throw new Error("radix2.encode input should be Uint8Array");return Ja(Array.from(n),8,t,!e)},decode:n=>(Mc("radix2.decode",n),Uint8Array.from(Ja(n,t,8,e)))}}function hd(t){return Xu(t),function(...e){try{return t.apply(null,e)}catch{}}}function h1(t,e){return ds(t),Xu(e),{encode(n){if(!es(n))throw new Error("checksum.encode: input should be Uint8Array");const r=e(n).slice(0,t),s=new Uint8Array(n.length+t);return s.set(n),s.set(r,n.length),s},decode(n){if(!es(n))throw new Error("checksum.decode: input should be Uint8Array");const r=n.slice(0,-t),s=n.slice(-t),i=e(r).slice(0,t);for(let o=0;o<t;o++)if(i[o]!==s[o])throw new Error("Invalid checksum");return r}}}const md=Qs(Rc(4),yo("0123456789ABCDEF"),go("")),m1=typeof Uint8Array.from([]).toBase64=="function"&&typeof Uint8Array.fromBase64=="function",b1=(t,e)=>{vr("base64",t);const n=/^[A-Za-z0-9=+/]+$/,r="base64";if(t.length>0&&!n.test(t))throw new Error("invalid base64");return Uint8Array.fromBase64(t,{alphabet:r,lastChunkHandling:"strict"})},bd=m1?{encode(t){return d1(t),t.toBase64()},decode(t){return b1(t)}}:Qs(Rc(6),yo("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),u1(6),go("")),p1=t=>Qs(f1(58),yo(t),go("")),Vi=p1("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),y1=t=>Qs(h1(4,e=>t(t(e))),Vi),Qa=Qs(yo("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),go("")),pd=[996825010,642813549,513874426,1027748829,705979059];function xs(t){const e=t>>25;let n=(t&33554431)<<5;for(let r=0;r<pd.length;r++)(e>>r&1)===1&&(n^=pd[r]);return n}function yd(t,e,n=1){const r=t.length;let s=1;for(let i=0;i<r;i++){const o=t.charCodeAt(i);if(o<33||o>126)throw new Error(`Invalid prefix (${t})`);s=xs(s)^o>>5}s=xs(s);for(let i=0;i<r;i++)s=xs(s)^t.charCodeAt(i)&31;for(let i of e)s=xs(s)^i;for(let i=0;i<6;i++)s=xs(s);return s^=n,Qa.encode(Ja([s%Ui[30]],30,5,!1))}function g1(t){const e=t==="bech32"?1:734539939,n=Rc(5),r=n.decode,s=n.encode,i=hd(r);function o(p,C,w=90){vr("bech32.encode prefix",p),es(C)&&(C=Array.from(C)),Mc("bech32.encode",C);const F=p.length;if(F===0)throw new TypeError(`Invalid prefix length ${F}`);const I=F+7+C.length;if(w!==!1&&I>w)throw new TypeError(`Length ${I} exceeds limit ${w}`);const x=p.toLowerCase(),E=yd(x,C,e);return`${x}1${Qa.encode(C)}${E}`}function a(p,C=90){vr("bech32.decode input",p);const w=p.length;if(w<8||C!==!1&&w>C)throw new TypeError(`invalid string length: ${w} (${p}). Expected (8..${C})`);const F=p.toLowerCase();if(p!==F&&p!==p.toUpperCase())throw new Error("String must be lowercase or uppercase");const I=F.lastIndexOf("1");if(I===0||I===-1)throw new Error('Letter "1" must be present between prefix and data only');const x=F.slice(0,I),E=F.slice(I+1);if(E.length<6)throw new Error("Data must be at least 6 characters long");const _=Qa.decode(E).slice(0,-6),k=yd(x,_,e);if(!E.endsWith(k))throw new Error(`Invalid checksum in ${p}: expected "${k}"`);return{prefix:x,words:_}}const l=hd(a);function f(p){const{prefix:C,words:w}=a(p,!1);return{prefix:C,words:w,bytes:r(w)}}function m(p,C){return o(p,s(C))}return{encode:o,decode:a,encodeFromBytes:m,decodeToBytes:f,decodeUnsafe:l,fromWords:r,fromWordsUnsafe:i,toWords:s}}const Ju=g1("bech32"),Qu=(t,e)=>e.startsWith(t)?e.slice(t.length):e,w1=/^(?:0x)?[0-9a-fA-F]+$/,At={valid:t=>w1.test(t),decode:t=>md.decode(Qu("0x",t).toUpperCase()),encode:(t,e=!1)=>(t=typeof t=="string"?Lt.encode(t):t,(e?"0x":"")+md.encode(t).toLowerCase())},E1=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,wo={valid:t=>E1.test(t),decode:bd.decode,encode:t=>bd.encode(typeof t=="string"?Lt.encode(t):t)},ef={decode:Vi.decode,encode:t=>Vi.encode(typeof t=="string"?Lt.encode(t):t)},Us={decode:t=>(typeof t!="string"&&(t=At.encode(t,!0)),t===""||t==="0x"?0n:BigInt(t)),encode:(t,e=!1)=>Us.toString(t,e),toString:(t,e=!1)=>{let n=t.toString(16);return n=n.length%2===1?n="0"+n:n,e?"0x"+n:n},toBytes:(t,e)=>{typeof t=="number"&&(t=Us.toBigInt(t));const n=At.decode(Us.toString(t));if(!e)return n;if(e<n.length)throw new Error(`Can't fit ${t} into ${e} bytes.`);return Lt.zpad(n,e)},toNumber:t=>{if(t>BigInt(Number.MAX_SAFE_INTEGER))throw new Error(`Invalid cast: ${t} exceeds MAX_SAFE_INTEGER`);return Number(t)},toBigInt:t=>{if(t>Number.MAX_SAFE_INTEGER)throw new Error(`Invalid cast: ${t} exceeds MAX_SAFE_INTEGER`);return BigInt(t)}},Lt={encode:t=>new TextEncoder().encode(t),decode:t=>new TextDecoder().decode(t),equals:(t,e)=>t.length===e.length&&t.every((n,r)=>n===e[r]),zpad:(t,e,n=!0)=>n?Lt.concat(new Uint8Array(e-t.length),t):Lt.concat(t,new Uint8Array(e-t.length)),concat:(...t)=>{const e=t.reduce((s,i)=>s+i.length,0),n=new Uint8Array(e);let r=0;return t.forEach(s=>{n.set(s,r),r+=s.length}),n}},Wc=[[1,"Solana"],[2,"Ethereum"],[4,"Bsc"],[5,"Polygon"],[6,"Avalanche"],[8,"Algorand"],[10,"Fantom"],[13,"Klaytn"],[14,"Celo"],[15,"Near"],[16,"Moonbeam"],[17,"Neon"],[18,"Terra2"],[19,"Injective"],[20,"Osmosis"],[21,"Sui"],[22,"Aptos"],[23,"Arbitrum"],[24,"Optimism"],[26,"Pythnet"],[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"],[51,"Fogo"],[52,"Sonic"],[53,"Converge"],[55,"Plume"],[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"]],[Aw,tf]=pr(Wc),ei=fe(Wc,[1,0]),Gi=fe(Wc),ti=t=>ei.has(t),ec=t=>Gi.has(t),fn=t=>{switch(typeof t){case"string":if(ti(t))return ei(t);break;case"number":if(ec(t))return t;break}throw Error(`Cannot convert to ChainId: ${t}`)},us=t=>{switch(typeof t){case"string":if(ti(t))return t;break;case"number":if(ec(t))return Gi(t);break;case"bigint":if(ec(Number(t)))return Gi.get(Number(t));break}throw Error(`Cannot convert to Chain: ${t}`)},Pc=[["Evm",["Arbitrum","Avalanche","Base","Bsc","Celo","Ethereum","Fantom","Klaytn","Moonbeam","Neon","Optimism","Polygon","Sepolia","ArbitrumSepolia","BaseSepolia","OptimismSepolia","Holesky","PolygonSepolia","Mantle","Scroll","Blast","Xlayer","Linea","Berachain","Seievm","Snaxchain","Unichain","Worldchain","Ink","HyperEVM","Monad","Mezo","Sonic","Converge","Plume"]],["Solana",["Solana","Pythnet","Fogo"]],["Cosmwasm",["Cosmoshub","Evmos","Injective","Kujira","Osmosis","Sei","Terra2","Wormchain","Dymension","Neutron","Stargaze","Celestia","Seda","Provenance","Noble"]],["Btc",["Btc"]],["Algorand",["Algorand"]],["Sui",["Sui"]],["Aptos",["Aptos"]],["Near",["Near"]]];Hu(Pc,0);const nf=fe(Pc),hn=fe(Pc,[1,0]),A1=[["Evm","hex"],["Solana","base58"],["Cosmwasm","bech32"],["Btc","bech32"],["Algorand","algorandAppId"],["Sui","hex"],["Aptos","hex"],["Near","sha256"]],B1=fe(A1),fs={byAddress:(t,e)=>Object.values(t).find(n=>rf(n.address,e)),native:t=>fs.byAddress(t,"native"),bySymbol:(t,e)=>{const n=Object.values(t).filter(r=>r.symbol===e);return n&&n.length>0?n:void 0},byKey:(t,e)=>{const n=Object.entries(t).find(([r])=>e===r);return n?n[1]:void 0}},rf=(t,e)=>t.toLowerCase()===e.toLowerCase();var gd;(function(t){t[t.Finalized=1]="Finalized",t[t.Immediate=200]="Immediate",t[t.Safe=201]="Safe"})(gd||(gd={}));const x1=[["Ethereum",32]];fe(x1);const C1=[["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],["Avalanche",0],["Sui",0],["Algorand",0],["Aptos",0],["Klaytn",0],["Sei",0],["Near",0],["Osmosis",0],["Terra2",0],["Injective",0],["Berachain",1],["Seievm",1],["Snaxchain",512],["Unichain",1024],["Ink",512],["HyperEVM",1],["Monad",1],["Mezo",1],["Sonic",1],["Converge",4096],["Fogo",32],["Plume",64],["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]],sf=fe(C1),S1=[["Algorand",3300],["Aptos",4e3],["Arbitrum",260],["ArbitrumSepolia",260],["Avalanche",2e3],["Base",2e3],["BaseSepolia",2e3],["Blast",2e3],["Bsc",3e3],["Celo",5e3],["Cosmoshub",5e3],["Ethereum",15e3],["Evmos",2e3],["Fantom",2500],["Holesky",15e3],["Injective",2500],["Klaytn",1e3],["Kujira",3e3],["Mantle",2e3],["Moonbeam",12e3],["Monad",1e3],["Near",1500],["Neon",3e4],["Optimism",2e3],["OptimismSepolia",2e3],["Osmosis",6e3],["Polygon",2e3],["PolygonSepolia",2e3],["Scroll",3e3],["Sei",400],["Sepolia",15e3],["Solana",400],["Sui",3e3],["Terra2",6e3],["Unichain",1e3],["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],["Converge",100],["Fogo",400],["Plume",250]],of=fe(S1);function Lc(t){const e=sf.get(t);if(e===void 0)throw new Error("Cannot find finality for "+t);const n=of.get(t);if(n===void 0)throw new Error("Cannot find block time for "+t);return e*n}const D1=[["Evm",18],["Solana",9],["Sui",9],["Aptos",8],["Cosmwasm",6],["Algorand",6],["Btc",8],["Near",12]],af=fe(D1),v1=[["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/"}}],["Mezo",{name:"Mezo Explorer",baseUrl:"https://explorer.mezo.org/",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/"}}],["Mezo",{name:"Mezo Explorer",baseUrl:"https://explorer.test.mezo.org/",endpoints:{tx:"tx/",account:"address/"}}]]]],k1=fe(v1),F1=(t,e)=>t==="Devnet"?void 0:k1.get(t,e),T1=[["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"],["Sei","https://sei-rpc.polkachu.com/"],["Algorand","https://mainnet-api.algonode.cloud"],["Terra2","https://terra-rpc.polkachu.com"],["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/"],["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"],["HyperEVM","https://rpc.hyperliquid.xyz/evm"],["Mezo","https://jsonrpc-mezo.boar.network/"],["Plume","https://rpc.plume.org/"]]],["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"],["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/"],["Sepolia","https://ethereum-sepolia.publicnode.com"],["Algorand","https://testnet-api.algonode.cloud"],["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"],["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"],["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"],["Converge","https://rpc-converge-testnet-1.t.conduit.xyz"],["Fogo","https://testnet.fogo.io"],["Plume","https://testnet-rpc.plume.org"]]],["Devnet",[["Ethereum","http://eth-devnet:8545"],["Bsc","http://eth-devnet2:8545"],["Solana","http://solana-devnet:8899"]]]],I1=fe(T1),cf=(t,e)=>I1.get(t,e)??"",lf=[["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"],["Terra2","phoenix-1"],["Wormchain","wormchain"],["Kujira","kaiyo-1"],["Solana","5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d"],["Sui","35834a8a"],["Arbitrum",42161n],["Avalanche",43114n],["Base",8453n],["Bsc",56n],["Celo",42220n],["Ethereum",1n],["Fantom",250n],["Klaytn",8217n],["Moonbeam",1284n],["Neon",245022934n],["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],["Seievm",1329n],["Unichain",130n],["Worldchain",480n],["Ink",57073n],["Sonic",146n],["HyperEVM",999n],["Mezo",31612n],["Plume",98866n]]],["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"],["Terra2","pisco-1"],["Wormchain","wormchain-testnet-0"],["Kujira","harpoon-4"],["Solana","EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG"],["Sui","4c78adac"],["Arbitrum",421613n],["Avalanche",43113n],["Base",84531n],["Bsc",97n],["Celo",44787n],["Ethereum",5n],["Fantom",4002n],["Klaytn",1001n],["Moonbeam",1287n],["Neon",245022940n],["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],["Converge",52085145n],["Fogo","9GGSFo95raqzZxWqKM5tGYvJp5iv4Dm565S4r8h5PEu9"],["Plume",98867n]]],["Devnet",[["Aptos",0n],["Algorand","sandnet-v1.0"],["Bsc",1397n],["Ethereum",1337n],["Injective","injective_devnet_fake"],["Solana","8wF6jKV3cKwyaVkWcoV9KpDqmkjvEYno9hKZrKx8TbZn"]]]],df=fe(lf),U1=fe(lf,[2,[0,1]]);function _1(t,e){const r=U1(e).filter(([s,i])=>hn(i)===t);if(r.length!==1)throw new Error(`Platform ${t} has multiple chains with native chain id ${e}`);return r[0]}const M1=[["Mainnet","https://iris-api.circle.com/v1/attestations"],["Testnet","https://iris-api-sandbox.circle.com/v1/attestations"]],wd=fe(M1),R1=[["Mainnet",[["Ethereum","0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"],["Avalanche","0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"],["Optimism","0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85"],["Arbitrum","0xaf88d065e77c8cC2239327C5EDb3A432268e5831"],["Solana","EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"],["Base","0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"],["Polygon","0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359"],["Sui","0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC"],["Aptos","0xbae207659db88bea0cbead6da0ed00aac12edcdda169e591cd41c94180b46f3b"],["Unichain","0x078D782b760474a361dDA0AF3839290b0EF57AD6"],["Sonic","0x29219dd400f2Bf60E5a23d13Be72B486D4038894"],["Linea","0x176211869cA2b568f2A7D4EE941E073a821EE1ff"],["Worldchain","0x79A02482A880bCE3F13e09Da970dC34db4CD24d1"]]],["Testnet",[["Sepolia","0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238"],["Avalanche","0x5425890298aed601595a70AB815c96711a31Bc65"],["OptimismSepolia","0x5fd84259d66Cd46123540766Be93DFE6D43130D7"],["ArbitrumSepolia","0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"],["Solana","4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU"],["BaseSepolia","0x036CbD53842c5426634e7929541eC2318f3dCF7e"],["Polygon","0x9999f7Fea5938fD3b1E26A12c3f2fb024e194f97"],["Sui","0xa1ec7fc00a6f40db9693ad1415d0c193ad3906494428cf252621037bd7117e29::usdc::USDC"],["Aptos","0x69091fbab5f7d635ee7ac5098cf0c1efbe31d68fec0f2cd565e8d168daf52832"],["Unichain","0x31d0220469e10c4E71834a79b1f276d740d3768F"],["Sonic","0xA4879Fed32Ecbef99399e5cbC247E533421C4eC6"],["Linea","0xFEce4462D57bD51A6A552365A011b95f0E16d9B7"]]]],_s=fe(R1),Oc=[["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]]]],uf=fe(Oc,[[0,1],2]),tc=fe(Oc,[[0,2],1]),[Bw,xw]=pr(Oc),Os=(t,e)=>uf.has(t,e),Ed=(t,e)=>tc.has(t,e),Ad=(t,e)=>_s.has(t,e),_i=(t,e)=>{switch(typeof e){case"string":if(Os(t,e))return e;break;case"number":if(Ed(t,e))return tc(t,e);break;case"bigint":const n=Number(e);if(Ed(t,n))return tc(t,n);break}throw Error(`Cannot convert to Chain: ${e}`)},W1=[["Mainnet",[["Solana","worm2ZoG2kUd4vFXhvjh93UUH596ayRfgQ2MgjNMTth"],["Ethereum","0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B"],["Bsc","0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B"],["Polygon","0x7A4B5a56256163F07b2C80A7cA55aBE66c4ec4d7"],["Avalanche","0x54a8e5f9c4CbA08F9943965859F6c34eAF03E26c"],["Algorand","842125965"],["Fantom","0x126783A6Cb203a3E35344528B26ca3a0489a1485"],["Klaytn","0x0C21603c4f3a6387e241c0091A7EA39E43E90bb7"],["Celo","0xa321448d90d4e5b0A732867c18eA198e75CAC48E"],["Near","contract.wormhole_crypto.near"],["Injective","inj17p9rzwnnfxcjp32un9ug7yhhzgtkhvl9l2q74d"],["Aptos","0x5bc11445584a763c1fa7ed39081f1b920954da14e04b32440cba863d03e19625"],["Sui","0xaeab97f96cf9877fee2883315d459552b2b921edc16d7ceac6eab944dd88919c"],["Moonbeam","0xC8e2b0cD52Cf01b0Ce87d389Daa3d414d4cE29f3"],["Terra2","terra12mrnzvhx3rpej6843uge2yyfppfyd3u9c3uq223q8sl48huz9juqffcnhp"],["Arbitrum","0xa5f208e072434bC67592E4C49C1B991BA79BCA46"],["Optimism","0xEe91C335eab126dF5fDB3797EA9d6aD93aeC9722"],["Pythnet","H3fxXJ86ADW2PNuDDmZJg6mzTtPxkYCpNuQUTgmJ7AjU"],["Base","0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"],["Xlayer","0x194B123c5E96B9b2E49763619985790Dc241CAC0"],["Sei","sei1gjrrme22cyha4ht2xapn3f08zzw6z3d4uxx6fyy9zd5dyr3yxgzqqncdqn"],["Wormchain","wormhole1ufs3tlq4umljk0qfe8k5ya0x6hpavn897u2cnf9k0en9jr7qarqqaqfk2j"],["Neutron","neutron16rerygcpahqcxx5t8vjla46ym8ccn7xz7rtc6ju5ujcd36cmc7zs9zrunh"],["Blast","0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"],["Scroll","0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"],["Mantle","0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"],["Snaxchain","0xc1BA3CC4bFE724A08FbbFbF64F8db196738665f4"],["Berachain","0xCa1D5a146B03f6303baF59e5AD5615ae0b9d146D"],["Seievm","0xCa1D5a146B03f6303baF59e5AD5615ae0b9d146D"],["Unichain","0xCa1D5a146B03f6303baF59e5AD5615ae0b9d146D"],["Worldchain","0xcbcEe4e081464A15d8Ad5f58BB493954421eB506"],["Ink","0xCa1D5a146B03f6303baF59e5AD5615ae0b9d146D"],["HyperEVM","0x7C0faFc4384551f063e05aee704ab943b8B53aB3"],["Mezo","0xaBf89de706B583424328B54dD05a8fC986750Da8"],["Plume","0xaBf89de706B583424328B54dD05a8fC986750Da8"]]],["Testnet",[["Solana","3u8hJUVTA4jH1wYAyUur7FFZVQ8H635K3tSHHF4ssjQ5"],["Ethereum","0x706abc4E45D419950511e474C7B9Ed348A4a716c"],["Bsc","0x68605AD7b15c732a30b1BbC62BE8F2A509D74b4D"],["Polygon","0x0CBE91CF822c73C2315FB05100C2F714765d5c20"],["Avalanche","0x7bbcE28e64B3F8b84d876Ab298393c38ad7aac4C"],["Algorand","86525623"],["Fantom","0x1BB3B4119b7BA9dfad76B0545fb3F531383c3bB7"],["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"],["Pythnet","EUrRARh92Cdc54xrDn6qzaqjA77NRrCcfbr8kPwoTL4z"],["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"],["Converge","0x556B259cFaCd9896B2773310080c7c3bcE90Ff01"],["Fogo","BhnQyKoQQgpuRTRo6D8Emz93PvXCYfVgHhnrR4T3qhw4"],["Plume","0x81705b969cDcc6FbFde91a0C6777bE0EF3A75855"]]],["Devnet",[["Solana","Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o"],["Ethereum","0xC89Ce4735882C9F0f0FE26686c53074E09B0D550"],["Bsc","0xC89Ce4735882C9F0f0FE26686c53074E09B0D550"],["Algorand","1004"],["Near","wormhole.test.near"],["Aptos","0xde0036a9600559e295d5f6802ef6f3f802f510366e0c23912b0655d972166017"],["Sui","0x5a5160ca3c2037f4b4051344096ef7a48ebf4400b3f385e57ea90e1628a8bde0"],["Terra2","terra14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9ssrc8au"],["Wormchain","wormhole17p9rzwnnfxcjp32un9ug7yhhzgtkhvl9jfksztgw5uh69wac2pgshdnj3k"]]]],ff=[["Mainnet",[["Solana","wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb"],["Ethereum","0x3ee18B2214AFF97000D974cf647E7C347E8fa585"],["Bsc","0xB6F6D86a8f9879A9c87f643768d9efc38c1Da6E7"],["Polygon","0x5a58505a96D1dbf8dF91cB21B54419FC36e93fdE"],["Avalanche","0x0e082F06FF657D94310cB8cE8B0D9a04541d8052"],["Algorand","842126029"],["Fantom","0x7C9Fc5741288cDFdD83CeB07f3ea7e22618D79D2"],["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"],["Sei","sei1smzlm9t79kur392nu9egl8p8je9j92q4gzguewj56a05kyxxra0qy0nuf3"],["Wormchain","wormhole1466nf3zuxpya8q9emxukd7vftaf6h4psr0a07srl5zw74zh84yjq4lyjmh"],["Blast","0x24850c6f61C438823F01B7A3BF2B89B72174Fa9d"],["Scroll","0x24850c6f61C438823F01B7A3BF2B89B72174Fa9d"],["Mantle","0x24850c6f61C438823F01B7A3BF2B89B72174Fa9d"],["Snaxchain","0x8B94bfE456B48a6025b92E11Be393BAa86e68410"],["Berachain","0x3Ff72741fd67D6AD0668d93B41a09248F4700560"],["Seievm","0x3Ff72741fd67D6AD0668d93B41a09248F4700560"],["Unichain","0x3Ff72741fd67D6AD0668d93B41a09248F4700560"],["Worldchain","0xc309275443519adca74c9136b02A38eF96E3a1f6"],["Ink","0x3Ff72741fd67D6AD0668d93B41a09248F4700560"]]],["Testnet",[["Solana","DZnkkTmCiFWfYTfT41X3Rd1kDgozqzxWaHqsw6W4x2oe"],["Ethereum","0xF890982f9310df57d00f659cf4fd87e65adEd8d7"],["Bsc","0x9dcF9D205C9De35334D646BeE44b2D2859712A09"],["Polygon","0x377D55a7928c046E18eEbb61977e714d2a76472a"],["Avalanche","0x61E44E506Ca5659E6c0bba9b678586fA2d729756"],["Algorand","86525641"],["Fantom","0x599CEa2204B4FaECd584Ab1F2b6aCA137a0afbE8"],["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"],["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"],["Fogo","78HdStBqCMioGii9D8mF3zQaWDqDZBQWTUwjjpdmbJKX"]]],["Devnet",[["Solana","B6RHG3mfcckmrYN1UhmJzyS1XX3fZKbkeUcpJe9Sy3FE"],["Ethereum","0x0290FB167208Af455bB137780163b7B7a9a10C16"],["Bsc","0x0290FB167208Af455bB137780163b7B7a9a10C16"],["Algorand","1006"],["Near","token.test.near"],["Aptos","0x84a5f374d29fc77e370014dce4fd6a55b58ad608de8074b0be5571701724da31"],["Sui","0xa6a3da85bbe05da5bfd953708d56f1a3a023e7fb58e5a824a3d4de3791e8f690"],["Terra2","terra1nc5tatafv6eyq7llkr2gv50ff9e22mnf70qgjlv737ktmt4eswrquka9l6"],["Wormchain","wormhole1ghd753shjuwexxywmgs4xz7x2q732vcnkm6h2pyv9s6ah3hylvrqtm7t3h"]]]],hf=[["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",""]]]],mf=[["Mainnet",[["Arbitrum",{relayer:"0x04C98824a64d75CD1E9Bc418088b4c9A99048153",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Avalanche",{relayer:"0x8849F05675E034b54506caB84450c8C82694a786",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Base",{relayer:"0xD8B736EF27Fc997b1d00F22FE37A58145D3BDA07",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Berachain",{relayer:"0xFAeFa20CB3759AEd2310E25015F05d62D8567A3F",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Bsc",{relayer:"0x2513515340fF71DD5AF02fC1BdB9615704d91524",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Celo",{relayer:"0xe478DEe705BEae591395B08934FA19F54df316BE",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Ethereum",{relayer:"0xa8969F3f8D97b3Ed89D4e2EC19B6B0CfD504b212",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Moonbeam",{relayer:"0xF6b9616C63Fa48D07D82c93CE02B5d9111c51a3d",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Optimism",{relayer:"0x37aC29617AE74c750a1e4d55990296BAF9b8De73",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Polygon",{relayer:"0x1d98CA4221516B9ac4869F5CeA7E6bb9C41609D6",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Scroll",{relayer:"0x05129e142e7d5A518D81f19Db342fBF5f7E26A18",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Seievm",{relayer:"0x7C129bc8F6188d12c0d1BBDE247F134148B97618",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Solana",{relayer:"tbr7Qje6qBzPwfM52csL5KFi8ps5c5vDyiVVBLYVdRf"}],["Unichain",{relayer:"0x9Bca817F67f01557aeD615130825A28F4C5f3b87",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Worldchain",{relayer:"0xc0565Bd29b34603C0383598E16843d95Ae9c4f65",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}]]],["Testnet",[["Avalanche",{relayer:"0x10Ce9a35883C44640e8B12fea4Cc1e77F77D8c52",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["BaseSepolia",{relayer:"0x523d25D33B975ad72283f73B1103354352dBCBb8",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Fogo",{relayer:"tbr7Qje6qBzPwfM52csL5KFi8ps5c5vDyiVVBLYVdRf"}],["Sepolia",{relayer:"0xb0b2119067cF04fa959f654250BD49fE1BD6F53c",relayerWithReferrer:"0x412f30e9f8B4a1e99eaE90209A6b00f5C3cc8739"}],["Solana",{relayer:"tbr7Qje6qBzPwfM52csL5KFi8ps5c5vDyiVVBLYVdRf"}]]]],bf=[["Mainnet",[["Aptos","0x11aa75c059e1a7855be66b931bf340a2e0973274ac16b5f519c02ceafaf08a18"],["Arbitrum","0x3980f8318fc03d79033Bbb421A622CDF8d2Eeab4"],["Avalanche","0x4661F0E629E4ba8D04Ee90080Aee079740B00381"],["Base","0x9E1936E91A4a5AE5A5F75fFc472D6cb8e93597ea"],["Berachain","0x0Dd7a5a32311b8D87A615Cc7f079B632D3d5e2D3"],["Bsc","0xeC8cCCD058DbF28e5D002869Aa9aFa3992bf4ee0"],["Celo","0xe6Ea5087c6860B94Cf098a403506262D8F28cF05"],["Ethereum","0x84EEe8dBa37C36947397E1E11251cA9A06Fc6F8a"],["HyperEVM","0xd7717899cc4381033Bc200431286D0AC14265F78"],["Linea","0x23aF2B5296122544A9A7861da43405D5B15a9bD3"],["Mezo","0x0f9b8E144Cc5C5e7C0073829Afd30F26A50c5606"],["Moonbeam","0x85D06449C78064c2E02d787e9DC71716786F8D19"],["Optimism","0x85B704501f6AE718205C0636260768C4e72ac3e7"],["Polygon","0x0B23efA164aB3eD08e9a39AC7aD930Ff4F5A5e81"],["Scroll","0xcFAdDE24640e395F5A71456A825D0D7C3741F075"],["Seievm","0x25f1c923fb7a5aefa5f0a2b419fc70f2368e66e5"],["Solana","execXUrAsMnqMmTHj5m7N1YQgsDz3cwGLYCYyuDRciV"],["Sonic","0x3Fdc36b4260Da38fBDba1125cCBD33DD0AC74812"],["Sui","0xdb0fe8bb1e2b5be628adbea0636063325073e1070ee11e4281457dfd7f158235"],["Unichain","0x764dD868eAdD27ce57BCB801E4ca4a193d231Aed"],["Worldchain","0x8689b4E6226AdC8fa8FF80aCc3a60AcE31e8804B"]]],["Testnet",[["Aptos","0x139717c339f08af674be77143507a905aa28cbc67a0e53e7095c07b630d73815"],["Avalanche","0x4661F0E629E4ba8D04Ee90080Aee079740B00381"],["BaseSepolia","0x51B47D493CBA7aB97e3F8F163D6Ce07592CE4482"],["Converge","0xAab9935349B9c08e0e970720F6D640d5B91C293E"],["Fogo","execXUrAsMnqMmTHj5m7N1YQgsDz3cwGLYCYyuDRciV"],["Monad","0xC04dE634982cAdF2A677310b73630B7Ac56A3f65"],["Plume","0x8fc2FbA8F962fbE89a9B02f03557a011c335A455"],["Seievm","0x25f1c923Fb7A5aEFA5F0A2b419fC70f2368e66e5"],["Sepolia","0xD0fb39f5a3361F21457653cB70F9D0C9bD86B66B"],["Solana","execXUrAsMnqMmTHj5m7N1YQgsDz3cwGLYCYyuDRciV"],["Sui","0x4000cfe2955d8355b3d3cf186f854fea9f787a457257056926fde1ec977670eb"]]]],P1=[["Mainnet",[["Solana","WnFt12ZrnzZrFZkt2xsNsaNWoQribnuQ5B5FrDbwDhD"],["Ethereum","0x6FFd7EdE62328b3Af38FCD61461Bbfc52F5651fE"],["Bsc","0x5a58505a96D1dbf8dF91cB21B54419FC36e93fdE"],["Polygon","0x90BBd86a6Fe93D3bc3ed6335935447E75fAb7fCf"],["Avalanche","0xf7B6737Ca9c4e08aE573F75A97B73D7a813f5De5"],["Fantom","0xA9c7119aBDa80d4a4E0C06C8F4d8cF5893234535"],["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"],["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"],["Bsc","0x26b4afb60d6c903165150c6f0aa14f8016be4aec"],["Aptos","0x46da3d4c569388af61f951bdd1153f4c875f90c2991f6b2d0a38e2161a40852c"]]]],L1=[["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"],["Seievm","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"],["Mezo","0x362fca37E45fe1096b42021b543f462D49a5C8df"],["Monad","0x362fca37E45fe1096b42021b543f462D49a5C8df"],["PolygonSepolia","0x362fca37E45fe1096b42021b543f462D49a5C8df"]]],["Devnet",[["Ethereum","0xcC680D088586c09c3E0E099a676FA4b6e42467b4"],["Bsc","0xcC680D088586c09c3E0E099a676FA4b6e42467b4"]]]],pf=[["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:""}]]]],O1=[["Mainnet",[["Wormchain","wormhole14ejqjyq8um4p3xfqj74yld5waqljf88fz25yxnma0cngspxe3les00fpjx"]]],["Testnet",[["Wormchain","wormhole1ctnjk7an90lz5wjfvr3cf6x984a8cjnv8dpmztmlpcq4xteaa2xs9pwmzk"]]]],N1=[["Mainnet",[["Sei","sei189adguawugk3e55zn63z8r9ll29xrjwca636ra7v7gxuzn98sxyqwzt47l"]]],["Testnet",[["Sei","sei1dkdwdvknx0qav5cp5kw68mkn3r99m3svkyjfvkztwh97dv2lm0ksj6xrak"]]]],z1=[["Mainnet",[["Polygon",["Ethereum","0x86E4Dc95c7FBdBf52e33D563BbDB00823894C287"]],["Optimism",["Ethereum","0xdfe97868233d1aa22e815a266982f2cf17685a27"]],["Arbitrum",["Ethereum","0x1c479675ad559dc151f6ec7ed3fbf8cee79582b6"]]]],["Testnet",[["Polygon",["Ethereum","0x2890ba17efe978480615e330ecb65333b880928e"]],["Optimism",["Ethereum","0xe6dfba0953616bacab0c9a8ecb3a9bba77fc15c0"]],["Arbitrum",["Ethereum","0x45af9ed1d03703e480ce7d328fb684bb67da5049"]]]]],yf=[["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}]]]],H1=[["Mainnet",[["Solana","87MEvHZCXE3ML5rrmh5uX1FbShHmRXXS32xJDGbQ7h5t"],["Polygon","0x09959798B95d00a3183d20FaC298E4594E599eab"],["Arbitrum","0x1293a54e160D1cd7075487898d65266081A15458"],["Optimism","0x1293a54e160D1cd7075487898d65266081A15458"],["Base","0x09959798B95d00a3183d20FaC298E4594E599eab"]]]],q1=fe(W1),K1=fe(ff),$1=fe(hf),nc=fe(mf),j1=fe(bf),V1=fe(P1),G1=fe(L1),Bd=fe(O1),xd=fe(N1),Cd=fe(yf),Mi=fe(H1),rc=fe(pf);fe(z1);const Y1=fe(ff,[0,1]),X1=fe(hf,[0,1]),Z1=fe(mf,[0,1]);fe(bf,[0,1]);const J1=fe(pf,[0,1]),Q1=fe(yf,[0,1]),Nc=[["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"]]]],[Cw,Sw]=zm(pr(qi(Nc)),[1,2]);fe(Nc,[[0,2],1]);fe(Nc,[1,[0,2]]);const zc=5,eb=[["Mainnet",[["Ethereum","0x18084fbA666a33d37592fA2633fD49a74DD93a88"],["Solana","6DNSN2BJsaPFdFFc1zP37kkeNe4Usc1Sqkzr9C9vPWcU"],["Polygon","0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b"],["Arbitrum","0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40"],["Optimism","0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40"],["Base","0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b"]]]],tb=fe(eb),nb=[["Mainnet","https://executor.labsapis.com/v0"],["Testnet","https://executor-testnet.labsapis.com/v0"]],Sd=fe(nb),Hr=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Eo(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function ts(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function Vt(t,...e){if(!Eo(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function gf(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");ts(t.outputLen),ts(t.blockLen)}function kr(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function Hc(t,e){Vt(t);const n=e.outputLen;if(t.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function wf(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function $n(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function Ri(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function gn(t,e){return t<<32-e|t>>>e}function rb(t,e){return t<<e|t>>>32-e>>>0}const Ef=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Af(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}const sb=Ef?t=>t:t=>Af(t);function ib(t){for(let e=0;e<t.length;e++)t[e]=Af(t[e]);return t}const sc=Ef?t=>t:ib,Bf=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",ob=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Fr(t){if(Vt(t),Bf)return t.toHex();let e="";for(let n=0;n<t.length;n++)e+=ob[t[n]];return e}const Ln={_0:48,_9:57,A:65,F:70,a:97,f:102};function Dd(t){if(t>=Ln._0&&t<=Ln._9)return t-Ln._0;if(t>=Ln.A&&t<=Ln.F)return t-(Ln.A-10);if(t>=Ln.a&&t<=Ln.f)return t-(Ln.a-10)}function Ao(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);if(Bf)return Uint8Array.fromHex(t);const e=t.length,n=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const r=new Uint8Array(n);for(let s=0,i=0;s<n;s++,i+=2){const o=Dd(t.charCodeAt(i)),a=Dd(t.charCodeAt(i+1));if(o===void 0||a===void 0){const l=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character "'+l+'" at index '+i)}r[s]=o*16+a}return r}function qc(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function hs(t){return typeof t=="string"&&(t=qc(t)),Vt(t),t}function ab(t){return typeof t=="string"&&(t=qc(t)),Vt(t),t}function kn(...t){let e=0;for(let r=0;r<t.length;r++){const s=t[r];Vt(s),e+=s.length}const n=new Uint8Array(e);for(let r=0,s=0;r<t.length;r++){const i=t[r];n.set(i,s),s+=i.length}return n}function cb(t,e){if(e!==void 0&&{}.toString.call(e)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(t,e)}let Bo=class{};function ni(t){const e=r=>t().update(hs(r)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function lb(t){const e=(r,s)=>t(s).update(hs(r)).digest(),n=t({});return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=r=>t(r),e}function Kc(t=32){if(Hr&&typeof Hr.getRandomValues=="function")return Hr.getRandomValues(new Uint8Array(t));if(Hr&&typeof Hr.randomBytes=="function")return Uint8Array.from(Hr.randomBytes(t));throw new Error("crypto.getRandomValues must be defined")}function db(t,e,n,r){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,n,r);const s=BigInt(32),i=BigInt(4294967295),o=Number(n>>s&i),a=Number(n&i),l=r?4:0,f=r?0:4;t.setUint32(e+l,o,r),t.setUint32(e+f,a,r)}function ub(t,e,n){return t&e^~t&n}function fb(t,e,n){return t&e^t&n^e&n}class $c extends Bo{constructor(e,n,r,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=n,this.padOffset=r,this.isLE=s,this.buffer=new Uint8Array(e),this.view=Ri(this.buffer)}update(e){kr(this),e=hs(e),Vt(e);const{view:n,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 l=Ri(e);for(;s<=i-o;o+=s)this.process(l,o);continue}r.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===s&&(this.process(n,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){kr(this),Hc(e,this),this.finished=!0;const{buffer:n,view:r,blockLen:s,isLE:i}=this;let{pos:o}=this;n[o++]=128,$n(this.buffer.subarray(o)),this.padOffset>s-o&&(this.process(r,0),o=0);for(let p=o;p<s;p++)n[p]=0;db(r,s-8,BigInt(this.length*8),i),this.process(r,0);const a=Ri(e),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const f=l/4,m=this.get();if(f>m.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p<f;p++)a.setUint32(4*p,m[p],i)}digest(){const{buffer:e,outputLen:n}=this;this.digestInto(e);const r=e.slice(0,n);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:n,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%n&&e.buffer.set(r),e}clone(){return this._cloneInto()}}const Gn=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),It=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),gi=BigInt(2**32-1),vd=BigInt(32);function xf(t,e=!1){return e?{h:Number(t&gi),l:Number(t>>vd&gi)}:{h:Number(t>>vd&gi)|0,l:Number(t&gi)|0}}function Cf(t,e=!1){const n=t.length;let r=new Uint32Array(n),s=new Uint32Array(n);for(let i=0;i<n;i++){const{h:o,l:a}=xf(t[i],e);[r[i],s[i]]=[o,a]}return[r,s]}const kd=(t,e,n)=>t>>>n,Fd=(t,e,n)=>t<<32-n|e>>>n,cr=(t,e,n)=>t>>>n|e<<32-n,lr=(t,e,n)=>t<<32-n|e>>>n,Fs=(t,e,n)=>t<<64-n|e>>>n-32,Ts=(t,e,n)=>t>>>n-32|e<<64-n,hb=(t,e)=>e,mb=(t,e)=>t,bb=(t,e,n)=>t<<n|e>>>32-n,pb=(t,e,n)=>e<<n|t>>>32-n,yb=(t,e,n)=>e<<n-32|t>>>64-n,gb=(t,e,n)=>t<<n-32|e>>>64-n;function wn(t,e,n,r){const s=(e>>>0)+(r>>>0);return{h:t+n+(s/2**32|0)|0,l:s|0}}const Sf=(t,e,n)=>(t>>>0)+(e>>>0)+(n>>>0),Df=(t,e,n,r)=>e+n+r+(t/2**32|0)|0,wb=(t,e,n,r)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0),Eb=(t,e,n,r,s)=>e+n+r+s+(t/2**32|0)|0,Ab=(t,e,n,r,s)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0)+(s>>>0),Bb=(t,e,n,r,s,i)=>e+n+r+s+i+(t/2**32|0)|0,xb=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 Cb extends $c{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:n,C:r,D:s,E:i,F:o,G:a,H:l}=this;return[e,n,r,s,i,o,a,l]}set(e,n,r,s,i,o,a,l){this.A=e|0,this.B=n|0,this.C=r|0,this.D=s|0,this.E=i|0,this.F=o|0,this.G=a|0,this.H=l|0}process(e,n){for(let p=0;p<16;p++,n+=4)Yn[p]=e.getUint32(n,!1);for(let p=16;p<64;p++){const C=Yn[p-15],w=Yn[p-2],F=gn(C,7)^gn(C,18)^C>>>3,I=gn(w,17)^gn(w,19)^w>>>10;Yn[p]=I+Yn[p-7]+F+Yn[p-16]|0}let{A:r,B:s,C:i,D:o,E:a,F:l,G:f,H:m}=this;for(let p=0;p<64;p++){const C=gn(a,6)^gn(a,11)^gn(a,25),w=m+C+ub(a,l,f)+xb[p]+Yn[p]|0,I=(gn(r,2)^gn(r,13)^gn(r,22))+fb(r,s,i)|0;m=f,f=l,l=a,a=o+w|0,o=i,i=s,s=r,r=w+I|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,l=l+this.F|0,f=f+this.G|0,m=m+this.H|0,this.set(r,s,i,o,a,l,f,m)}roundClean(){$n(Yn)}destroy(){this.set(0,0,0,0,0,0,0,0),$n(this.buffer)}}const vf=Cf(["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(t=>BigInt(t))),Sb=vf[0],Db=vf[1],Xn=new Uint32Array(80),Zn=new Uint32Array(80);class kf extends $c{constructor(e=64){super(128,e,16,!1),this.Ah=It[0]|0,this.Al=It[1]|0,this.Bh=It[2]|0,this.Bl=It[3]|0,this.Ch=It[4]|0,this.Cl=It[5]|0,this.Dh=It[6]|0,this.Dl=It[7]|0,this.Eh=It[8]|0,this.El=It[9]|0,this.Fh=It[10]|0,this.Fl=It[11]|0,this.Gh=It[12]|0,this.Gl=It[13]|0,this.Hh=It[14]|0,this.Hl=It[15]|0}get(){const{Ah:e,Al:n,Bh:r,Bl:s,Ch:i,Cl:o,Dh:a,Dl:l,Eh:f,El:m,Fh:p,Fl:C,Gh:w,Gl:F,Hh:I,Hl:x}=this;return[e,n,r,s,i,o,a,l,f,m,p,C,w,F,I,x]}set(e,n,r,s,i,o,a,l,f,m,p,C,w,F,I,x){this.Ah=e|0,this.Al=n|0,this.Bh=r|0,this.Bl=s|0,this.Ch=i|0,this.Cl=o|0,this.Dh=a|0,this.Dl=l|0,this.Eh=f|0,this.El=m|0,this.Fh=p|0,this.Fl=C|0,this.Gh=w|0,this.Gl=F|0,this.Hh=I|0,this.Hl=x|0}process(e,n){for(let k=0;k<16;k++,n+=4)Xn[k]=e.getUint32(n),Zn[k]=e.getUint32(n+=4);for(let k=16;k<80;k++){const P=Xn[k-15]|0,M=Zn[k-15]|0,$=cr(P,M,1)^cr(P,M,8)^kd(P,M,7),G=lr(P,M,1)^lr(P,M,8)^Fd(P,M,7),Y=Xn[k-2]|0,L=Zn[k-2]|0,j=cr(Y,L,19)^Fs(Y,L,61)^kd(Y,L,6),O=lr(Y,L,19)^Ts(Y,L,61)^Fd(Y,L,6),q=wb(G,O,Zn[k-7],Zn[k-16]),B=Eb(q,$,j,Xn[k-7],Xn[k-16]);Xn[k]=B|0,Zn[k]=q|0}let{Ah:r,Al:s,Bh:i,Bl:o,Ch:a,Cl:l,Dh:f,Dl:m,Eh:p,El:C,Fh:w,Fl:F,Gh:I,Gl:x,Hh:E,Hl:_}=this;for(let k=0;k<80;k++){const P=cr(p,C,14)^cr(p,C,18)^Fs(p,C,41),M=lr(p,C,14)^lr(p,C,18)^Ts(p,C,41),$=p&w^~p&I,G=C&F^~C&x,Y=Ab(_,M,G,Db[k],Zn[k]),L=Bb(Y,E,P,$,Sb[k],Xn[k]),j=Y|0,O=cr(r,s,28)^Fs(r,s,34)^Fs(r,s,39),q=lr(r,s,28)^Ts(r,s,34)^Ts(r,s,39),B=r&i^r&a^i&a,c=s&o^s&l^o&l;E=I|0,_=x|0,I=w|0,x=F|0,w=p|0,F=C|0,{h:p,l:C}=wn(f|0,m|0,L|0,j|0),f=a|0,m=l|0,a=i|0,l=o|0,i=r|0,o=s|0;const b=Sf(j,q,c);r=Df(b,L,O,B),s=b|0}({h:r,l:s}=wn(this.Ah|0,this.Al|0,r|0,s|0)),{h:i,l:o}=wn(this.Bh|0,this.Bl|0,i|0,o|0),{h:a,l}=wn(this.Ch|0,this.Cl|0,a|0,l|0),{h:f,l:m}=wn(this.Dh|0,this.Dl|0,f|0,m|0),{h:p,l:C}=wn(this.Eh|0,this.El|0,p|0,C|0),{h:w,l:F}=wn(this.Fh|0,this.Fl|0,w|0,F|0),{h:I,l:x}=wn(this.Gh|0,this.Gl|0,I|0,x|0),{h:E,l:_}=wn(this.Hh|0,this.Hl|0,E|0,_|0),this.set(r,s,i,o,a,l,f,m,p,C,w,F,I,x,E,_)}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 Ut=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class vb extends kf{constructor(){super(32),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}}const jc=ni(()=>new Cb),Vc=ni(()=>new kf),kb=ni(()=>new vb),Yi=jc,Fb=BigInt(0),Cs=BigInt(1),Tb=BigInt(2),Ib=BigInt(7),Ub=BigInt(256),_b=BigInt(113),Ff=[],Tf=[],If=[];for(let t=0,e=Cs,n=1,r=0;t<24;t++){[n,r]=[r,(2*n+3*r)%5],Ff.push(2*(5*r+n)),Tf.push((t+1)*(t+2)/2%64);let s=Fb;for(let i=0;i<7;i++)e=(e<<Cs^(e>>Ib)*_b)%Ub,e&Tb&&(s^=Cs<<(Cs<<BigInt(i))-Cs);If.push(s)}const Uf=Cf(If,!0),Mb=Uf[0],Rb=Uf[1],Td=(t,e,n)=>n>32?yb(t,e,n):bb(t,e,n),Id=(t,e,n)=>n>32?gb(t,e,n):pb(t,e,n);function Wb(t,e=24){const n=new Uint32Array(10);for(let r=24-e;r<24;r++){for(let o=0;o<10;o++)n[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,l=(o+2)%10,f=n[l],m=n[l+1],p=Td(f,m,1)^n[a],C=Id(f,m,1)^n[a+1];for(let w=0;w<50;w+=10)t[o+w]^=p,t[o+w+1]^=C}let s=t[2],i=t[3];for(let o=0;o<24;o++){const a=Tf[o],l=Td(s,i,a),f=Id(s,i,a),m=Ff[o];s=t[m],i=t[m+1],t[m]=l,t[m+1]=f}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)n[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~n[(a+2)%10]&n[(a+4)%10]}t[0]^=Mb[r],t[1]^=Rb[r]}$n(n)}let Pb=class _f extends Bo{constructor(e,n,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=n,this.outputLen=r,this.enableXOF=s,this.rounds=i,ts(r),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=wf(this.state)}clone(){return this._cloneInto()}keccak(){sc(this.state32),Wb(this.state32,this.rounds),sc(this.state32),this.posOut=0,this.pos=0}update(e){kr(this),e=hs(e),Vt(e);const{blockLen:n,state:r}=this,s=e.length;for(let i=0;i<s;){const o=Math.min(n-this.pos,s-i);for(let a=0;a<o;a++)r[this.pos++]^=e[i++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:n,pos:r,blockLen:s}=this;e[r]^=n,n&128&&r===s-1&&this.keccak(),e[s-1]^=128,this.keccak()}writeInto(e){kr(this,!1),Vt(e),this.finish();const n=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(n.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 ts(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Hc(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:n,suffix:r,outputLen:s,rounds:i,enableXOF:o}=this;return e||(e=new _f(n,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 Mf=(t,e,n)=>ni(()=>new Pb(e,t,n)),Lb=Mf(6,136,256/8),Ns=Mf(1,136,256/8),Ob=Vc,Nb=kb;class Rf extends Bo{constructor(e,n){super(),this.finished=!1,this.destroyed=!1,gf(e);const r=hs(n);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 kr(this),this.iHash.update(e),this}digestInto(e){kr(this),Vt(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:n,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=n._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 Gc=(t,e,n)=>new Rf(t,e).update(n).digest();Gc.create=(t,e)=>new Rf(t,e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Yc=BigInt(0),Xi=BigInt(1);function Tr(t,e){if(typeof e!="boolean")throw new Error(t+" boolean expected, got "+e)}function wi(t){const e=t.toString(16);return e.length&1?"0"+e:e}function Wf(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?Yc:BigInt("0x"+t)}function ri(t){return Wf(Fr(t))}function zs(t){return Vt(t),Wf(Fr(Uint8Array.from(t).reverse()))}function Xc(t,e){return Ao(t.toString(16).padStart(e*2,"0"))}function xo(t,e){return Xc(t,e).reverse()}function Ze(t,e,n){let r;if(typeof e=="string")try{r=Ao(e)}catch(i){throw new Error(t+" must be hex string or Uint8Array, cause: "+i)}else if(Eo(e))r=Uint8Array.from(e);else throw new Error(t+" must be hex string or Uint8Array");const s=r.length;if(typeof n=="number"&&s!==n)throw new Error(t+" of length "+n+" expected, got "+s);return r}const Ea=t=>typeof t=="bigint"&&Yc<=t;function Pf(t,e,n){return Ea(t)&&Ea(e)&&Ea(n)&&e<=t&&t<n}function $r(t,e,n,r){if(!Pf(e,n,r))throw new Error("expected valid "+t+": "+n+" <= n < "+r+", got "+e)}function Lf(t){let e;for(e=0;t>Yc;t>>=Xi,e+=1);return e}function zb(t,e){return t>>BigInt(e)&Xi}const si=t=>(Xi<<BigInt(t))-Xi;function Hb(t,e,n){if(typeof t!="number"||t<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 n!="function")throw new Error("hmacFn must be a function");const r=w=>new Uint8Array(w),s=w=>Uint8Array.of(w);let i=r(t),o=r(t),a=0;const l=()=>{i.fill(1),o.fill(0),a=0},f=(...w)=>n(o,i,...w),m=(w=r(0))=>{o=f(s(0),w),i=f(),w.length!==0&&(o=f(s(1),w),i=f())},p=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let w=0;const F=[];for(;w<e;){i=f();const I=i.slice();F.push(I),w+=i.length}return kn(...F)};return(w,F)=>{l(),m(w);let I;for(;!(I=F(p()));)m();return l(),I}}function qb(t){return typeof t=="function"&&Number.isSafeInteger(t.outputLen)}function ms(t,e,n={}){if(!t||typeof t!="object")throw new Error("expected valid options object");function r(s,i,o){const a=t[s];if(o&&a===void 0)return;const l=typeof a;if(l!==i||a===null)throw new Error(`param "${s}" is invalid: expected ${i}, got ${l}`)}Object.entries(e).forEach(([s,i])=>r(s,i,!1)),Object.entries(n).forEach(([s,i])=>r(s,i,!0))}const Kb=()=>{throw new Error("not implemented")};function Hs(t){const e=new WeakMap;return(n,...r)=>{const s=e.get(n);if(s!==void 0)return s;const i=t(n,...r);return e.set(n,i),i}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const jt=BigInt(0),Tt=BigInt(1),gr=BigInt(2),$b=BigInt(3),Of=BigInt(4),Nf=BigInt(5),zf=BigInt(8);function Je(t,e){const n=t%e;return n>=jt?n:e+n}function Xe(t,e,n){let r=t;for(;e-- >jt;)r*=r,r%=n;return r}function Ud(t,e){if(t===jt)throw new Error("invert: expected non-zero number");if(e<=jt)throw new Error("invert: expected positive modulus, got "+e);let n=Je(t,e),r=e,s=jt,i=Tt;for(;n!==jt;){const a=r/n,l=r%n,f=s-i*a;r=n,n=l,s=i,i=f}if(r!==Tt)throw new Error("invert: does not exist");return Je(s,e)}function Hf(t,e){const n=(t.ORDER+Tt)/Of,r=t.pow(e,n);if(!t.eql(t.sqr(r),e))throw new Error("Cannot find square root");return r}function jb(t,e){const n=(t.ORDER-Nf)/zf,r=t.mul(e,gr),s=t.pow(r,n),i=t.mul(e,s),o=t.mul(t.mul(i,gr),s),a=t.mul(i,t.sub(o,t.ONE));if(!t.eql(t.sqr(a),e))throw new Error("Cannot find square root");return a}function Vb(t){if(t<BigInt(3))throw new Error("sqrt is not defined for small field");let e=t-Tt,n=0;for(;e%gr===jt;)e/=gr,n++;let r=gr;const s=_r(t);for(;ic(s,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return Hf;let i=s.pow(r,e);const o=(e+Tt)/gr;return function(l,f){if(l.is0(f))return f;if(ic(l,f)!==1)throw new Error("Cannot find square root");let m=n,p=l.mul(l.ONE,i),C=l.pow(f,e),w=l.pow(f,o);for(;!l.eql(C,l.ONE);){if(l.is0(C))return l.ZERO;let F=1,I=l.sqr(C);for(;!l.eql(I,l.ONE);)if(F++,I=l.sqr(I),F===m)throw new Error("Cannot find square root");const x=Tt<<BigInt(m-F-1),E=l.pow(p,x);m=F,p=l.sqr(E),C=l.mul(C,p),w=l.mul(w,E)}return w}}function Gb(t){return t%Of===$b?Hf:t%zf===Nf?jb:Vb(t)}const Yb=(t,e)=>(Je(t,e)&Tt)===Tt,Xb=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Zb(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"},n=Xb.reduce((r,s)=>(r[s]="function",r),e);return ms(t,n),t}function qf(t,e,n){if(n<jt)throw new Error("invalid exponent, negatives unsupported");if(n===jt)return t.ONE;if(n===Tt)return e;let r=t.ONE,s=e;for(;n>jt;)n&Tt&&(r=t.mul(r,s)),s=t.sqr(s),n>>=Tt;return r}function Zc(t,e,n=!1){const r=new Array(e.length).fill(n?t.ZERO:void 0),s=e.reduce((o,a,l)=>t.is0(a)?o:(r[l]=o,t.mul(o,a)),t.ONE),i=t.inv(s);return e.reduceRight((o,a,l)=>t.is0(a)?o:(r[l]=t.mul(o,r[l]),t.mul(o,a)),i),r}function ic(t,e){const n=(t.ORDER-Tt)/gr,r=t.pow(e,n),s=t.eql(r,t.ONE),i=t.eql(r,t.ZERO),o=t.eql(r,t.neg(t.ONE));if(!s&&!i&&!o)throw new Error("invalid Legendre symbol result");return s?1:i?0:-1}function Jb(t,e){e!==void 0&&ts(e);const n=e!==void 0?e:t.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function _r(t,e,n=!1,r={}){if(t<=jt)throw new Error("invalid field: expected ORDER > 0, got "+t);let s,i;if(typeof e=="object"&&e!=null){if(r.sqrt||n)throw new Error("cannot specify opts in two arguments");const m=e;m.BITS&&(s=m.BITS),m.sqrt&&(i=m.sqrt),typeof m.isLE=="boolean"&&(n=m.isLE)}else typeof e=="number"&&(s=e),r.sqrt&&(i=r.sqrt);const{nBitLength:o,nByteLength:a}=Jb(t,s);if(a>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let l;const f=Object.freeze({ORDER:t,isLE:n,BITS:o,BYTES:a,MASK:si(o),ZERO:jt,ONE:Tt,create:m=>Je(m,t),isValid:m=>{if(typeof m!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof m);return jt<=m&&m<t},is0:m=>m===jt,isValidNot0:m=>!f.is0(m)&&f.isValid(m),isOdd:m=>(m&Tt)===Tt,neg:m=>Je(-m,t),eql:(m,p)=>m===p,sqr:m=>Je(m*m,t),add:(m,p)=>Je(m+p,t),sub:(m,p)=>Je(m-p,t),mul:(m,p)=>Je(m*p,t),pow:(m,p)=>qf(f,m,p),div:(m,p)=>Je(m*Ud(p,t),t),sqrN:m=>m*m,addN:(m,p)=>m+p,subN:(m,p)=>m-p,mulN:(m,p)=>m*p,inv:m=>Ud(m,t),sqrt:i||(m=>(l||(l=Gb(t)),l(f,m))),toBytes:m=>n?xo(m,a):Xc(m,a),fromBytes:m=>{if(m.length!==a)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+m.length);return n?zs(m):ri(m)},invertBatch:m=>Zc(f,m),cmov:(m,p,C)=>C?p:m});return Object.freeze(f)}function Kf(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function Jc(t){const e=Kf(t);return e+Math.ceil(e/2)}function $f(t,e,n=!1){const r=t.length,s=Kf(e),i=Jc(e);if(r<16||r<i||r>1024)throw new Error("expected "+i+"-1024 bytes of input, got "+r);const o=n?zs(t):ri(t),a=Je(o,e-Tt)+Tt;return n?xo(a,s):Xc(a,s)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ns=BigInt(0),wr=BigInt(1);function Ms(t,e){const n=e.negate();return t?n:e}function Qc(t,e,n){const r=e==="pz"?o=>o.pz:o=>o.ez,s=Zc(t.Fp,n.map(r));return n.map((o,a)=>o.toAffine(s[a])).map(t.fromAffine)}function jf(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function Aa(t,e){jf(t,e);const n=Math.ceil(e/t)+1,r=2**(t-1),s=2**t,i=si(t),o=BigInt(t);return{windows:n,windowSize:r,mask:i,maxNumber:s,shiftBy:o}}function _d(t,e,n){const{windowSize:r,mask:s,maxNumber:i,shiftBy:o}=n;let a=Number(t&s),l=t>>o;a>r&&(a-=i,l+=wr);const f=e*r,m=f+Math.abs(a)-1,p=a===0,C=a<0,w=e%2!==0;return{nextN:l,offset:m,isZero:p,isNeg:C,isNegF:w,offsetF:f}}function Qb(t,e){if(!Array.isArray(t))throw new Error("array expected");t.forEach((n,r)=>{if(!(n instanceof e))throw new Error("invalid point at index "+r)})}function ep(t,e){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((n,r)=>{if(!e.isValid(n))throw new Error("invalid scalar at index "+r)})}const Ba=new WeakMap,Vf=new WeakMap;function xa(t){return Vf.get(t)||1}function Md(t){if(t!==ns)throw new Error("invalid wNAF")}function Gf(t,e){return{constTimeNegate:Ms,hasPrecomputes(n){return xa(n)!==1},unsafeLadder(n,r,s=t.ZERO){let i=n;for(;r>ns;)r&wr&&(s=s.add(i)),i=i.double(),r>>=wr;return s},precomputeWindow(n,r){const{windows:s,windowSize:i}=Aa(r,e),o=[];let a=n,l=a;for(let f=0;f<s;f++){l=a,o.push(l);for(let m=1;m<i;m++)l=l.add(a),o.push(l);a=l.double()}return o},wNAF(n,r,s){let i=t.ZERO,o=t.BASE;const a=Aa(n,e);for(let l=0;l<a.windows;l++){const{nextN:f,offset:m,isZero:p,isNeg:C,isNegF:w,offsetF:F}=_d(s,l,a);s=f,p?o=o.add(Ms(w,r[F])):i=i.add(Ms(C,r[m]))}return Md(s),{p:i,f:o}},wNAFUnsafe(n,r,s,i=t.ZERO){const o=Aa(n,e);for(let a=0;a<o.windows&&s!==ns;a++){const{nextN:l,offset:f,isZero:m,isNeg:p}=_d(s,a,o);if(s=l,!m){const C=r[f];i=i.add(p?C.negate():C)}}return Md(s),i},getPrecomputes(n,r,s){let i=Ba.get(r);return i||(i=this.precomputeWindow(r,n),n!==1&&(typeof s=="function"&&(i=s(i)),Ba.set(r,i))),i},wNAFCached(n,r,s){const i=xa(n);return this.wNAF(i,this.getPrecomputes(i,n,s),r)},wNAFCachedUnsafe(n,r,s,i){const o=xa(n);return o===1?this.unsafeLadder(n,r,i):this.wNAFUnsafe(o,this.getPrecomputes(o,n,s),r,i)},setWindowSize(n,r){jf(r,e),Vf.set(n,r),Ba.delete(n)}}}function tp(t,e,n,r){let s=e,i=t.ZERO,o=t.ZERO;for(;n>ns||r>ns;)n&wr&&(i=i.add(s)),r&wr&&(o=o.add(s)),s=s.double(),n>>=wr,r>>=wr;return{p1:i,p2:o}}function Yf(t,e,n,r){Qb(n,t),ep(r,e);const s=n.length,i=r.length;if(s!==i)throw new Error("arrays of points and scalars must have equal length");const o=t.ZERO,a=Lf(BigInt(s));let l=1;a>12?l=a-3:a>4?l=a-2:a>0&&(l=2);const f=si(l),m=new Array(Number(f)+1).fill(o),p=Math.floor((e.BITS-1)/l)*l;let C=o;for(let w=p;w>=0;w-=l){m.fill(o);for(let I=0;I<i;I++){const x=r[I],E=Number(x>>BigInt(w)&f);m[E]=m[E].add(n[I])}let F=o;for(let I=m.length-1,x=o;I>0;I--)x=x.add(m[I]),F=F.add(x);if(C=C.add(F),w!==0)for(let I=0;I<l;I++)C=C.double()}return C}function Rd(t,e){if(e){if(e.ORDER!==t)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return Zb(e),e}else return _r(t)}function Xf(t,e,n={}){if(!e||typeof e!="object")throw new Error(`expected valid ${t} CURVE object`);for(const a of["p","n","h"]){const l=e[a];if(!(typeof l=="bigint"&&l>ns))throw new Error(`CURVE.${a} must be positive bigint`)}const r=Rd(e.p,n.Fp),s=Rd(e.n,n.Fn),o=["Gx","Gy","a",t==="weierstrass"?"b":"d"];for(const a of o)if(!r.isValid(e[a]))throw new Error(`CURVE.${a} must be valid field element of CURVE.Fp`);return{Fp:r,Fn:s}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Wd(t){t.lowS!==void 0&&Tr("lowS",t.lowS),t.prehash!==void 0&&Tr("prehash",t.prehash)}class np extends Error{constructor(e=""){super(e)}}const Nn={Err:np,_tlv:{encode:(t,e)=>{const{Err:n}=Nn;if(t<0||t>256)throw new n("tlv.encode: wrong tag");if(e.length&1)throw new n("tlv.encode: unpadded data");const r=e.length/2,s=wi(r);if(s.length/2&128)throw new n("tlv.encode: long form length too big");const i=r>127?wi(s.length/2|128):"";return wi(t)+i+s+e},decode(t,e){const{Err:n}=Nn;let r=0;if(t<0||t>256)throw new n("tlv.encode: wrong tag");if(e.length<2||e[r++]!==t)throw new n("tlv.decode: wrong tlv");const s=e[r++],i=!!(s&128);let o=0;if(!i)o=s;else{const l=s&127;if(!l)throw new n("tlv.decode(long): indefinite length not supported");if(l>4)throw new n("tlv.decode(long): byte length is too big");const f=e.subarray(r,r+l);if(f.length!==l)throw new n("tlv.decode: length bytes not complete");if(f[0]===0)throw new n("tlv.decode(long): zero leftmost byte");for(const m of f)o=o<<8|m;if(r+=l,o<128)throw new n("tlv.decode(long): not minimal encoding")}const a=e.subarray(r,r+o);if(a.length!==o)throw new n("tlv.decode: wrong value length");return{v:a,l:e.subarray(r+o)}}},_int:{encode(t){const{Err:e}=Nn;if(t<Rs)throw new e("integer: negative integers are not allowed");let n=wi(t);if(Number.parseInt(n[0],16)&8&&(n="00"+n),n.length&1)throw new e("unexpected DER parsing assertion: unpadded hex");return n},decode(t){const{Err:e}=Nn;if(t[0]&128)throw new e("invalid signature integer: negative");if(t[0]===0&&!(t[1]&128))throw new e("invalid signature integer: unnecessary leading zero");return ri(t)}},toSig(t){const{Err:e,_int:n,_tlv:r}=Nn,s=Ze("signature",t),{v:i,l:o}=r.decode(48,s);if(o.length)throw new e("invalid signature: left bytes after parsing");const{v:a,l}=r.decode(2,i),{v:f,l:m}=r.decode(2,l);if(m.length)throw new e("invalid signature: left bytes after parsing");return{r:n.decode(a),s:n.decode(f)}},hexFromSig(t){const{_tlv:e,_int:n}=Nn,r=e.encode(2,n.encode(t.r)),s=e.encode(2,n.encode(t.s)),i=r+s;return e.encode(48,i)}},Rs=BigInt(0),Xr=BigInt(1),rp=BigInt(2),Ei=BigInt(3),sp=BigInt(4);function Zf(t,e,n){function r(s){const i=t.sqr(s),o=t.mul(i,s);return t.add(t.add(o,t.mul(s,e)),n)}return r}function el(t,e,n){const{BYTES:r}=t;function s(i){let o;if(typeof i=="bigint")o=i;else{let a=Ze("private key",i);if(e){if(!e.includes(a.length*2))throw new Error("invalid private key");const l=new Uint8Array(r);l.set(a,l.length-a.length),a=l}try{o=t.fromBytes(a)}catch{throw new Error(`invalid private key: expected ui8a of size ${r}, got ${typeof i}`)}}if(n&&(o=t.create(o)),!t.isValidNot0(o))throw new Error("invalid private key: out of range [1..N-1]");return o}return s}function Jf(t,e={}){const{Fp:n,Fn:r}=Xf("weierstrass",t,e),{h:s,n:i}=t;ms(e,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:o}=e;if(o&&(!n.is0(t.a)||typeof o.beta!="bigint"||typeof o.splitScalar!="function"))throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function');function a(){if(!n.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function l(Y,L,j){const{x:O,y:q}=L.toAffine(),B=n.toBytes(O);if(Tr("isCompressed",j),j){a();const c=!n.isOdd(q);return kn(Qf(c),B)}else return kn(Uint8Array.of(4),B,n.toBytes(q))}function f(Y){Vt(Y);const L=n.BYTES,j=L+1,O=2*L+1,q=Y.length,B=Y[0],c=Y.subarray(1);if(q===j&&(B===2||B===3)){const b=n.fromBytes(c);if(!n.isValid(b))throw new Error("bad point: is not on curve, wrong x");const y=C(b);let S;try{S=n.sqrt(y)}catch(W){const A=W instanceof Error?": "+W.message:"";throw new Error("bad point: is not on curve, sqrt error"+A)}a();const v=n.isOdd(S);return(B&1)===1!==v&&(S=n.neg(S)),{x:b,y:S}}else if(q===O&&B===4){const b=n.fromBytes(c.subarray(L*0,L*1)),y=n.fromBytes(c.subarray(L*1,L*2));if(!w(b,y))throw new Error("bad point: is not on curve");return{x:b,y}}else throw new Error(`bad point: got length ${q}, expected compressed=${j} or uncompressed=${O}`)}const m=e.toBytes||l,p=e.fromBytes||f,C=Zf(n,t.a,t.b);function w(Y,L){const j=n.sqr(L),O=C(Y);return n.eql(j,O)}if(!w(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const F=n.mul(n.pow(t.a,Ei),sp),I=n.mul(n.sqr(t.b),BigInt(27));if(n.is0(n.add(F,I)))throw new Error("bad curve params: a or b");function x(Y,L,j=!1){if(!n.isValid(L)||j&&n.is0(L))throw new Error(`bad point coordinate ${Y}`);return L}function E(Y){if(!(Y instanceof M))throw new Error("ProjectivePoint expected")}const _=Hs((Y,L)=>{const{px:j,py:O,pz:q}=Y;if(n.eql(q,n.ONE))return{x:j,y:O};const B=Y.is0();L==null&&(L=B?n.ONE:n.inv(q));const c=n.mul(j,L),b=n.mul(O,L),y=n.mul(q,L);if(B)return{x:n.ZERO,y:n.ZERO};if(!n.eql(y,n.ONE))throw new Error("invZ was invalid");return{x:c,y:b}}),k=Hs(Y=>{if(Y.is0()){if(e.allowInfinityPoint&&!n.is0(Y.py))return;throw new Error("bad point: ZERO")}const{x:L,y:j}=Y.toAffine();if(!n.isValid(L)||!n.isValid(j))throw new Error("bad point: x or y not field elements");if(!w(L,j))throw new Error("bad point: equation left != right");if(!Y.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function P(Y,L,j,O,q){return j=new M(n.mul(j.px,Y),j.py,j.pz),L=Ms(O,L),j=Ms(q,j),L.add(j)}class M{constructor(L,j,O){this.px=x("x",L),this.py=x("y",j,!0),this.pz=x("z",O),Object.freeze(this)}static fromAffine(L){const{x:j,y:O}=L||{};if(!L||!n.isValid(j)||!n.isValid(O))throw new Error("invalid affine point");if(L instanceof M)throw new Error("projective point not allowed");return n.is0(j)&&n.is0(O)?M.ZERO:new M(j,O,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(L){return Qc(M,"pz",L)}static fromBytes(L){return Vt(L),M.fromHex(L)}static fromHex(L){const j=M.fromAffine(p(Ze("pointHex",L)));return j.assertValidity(),j}static fromPrivateKey(L){const j=el(r,e.allowedPrivateKeyLengths,e.wrapPrivateKey);return M.BASE.multiply(j(L))}static msm(L,j){return Yf(M,r,L,j)}precompute(L=8,j=!0){return G.setWindowSize(this,L),j||this.multiply(Ei),this}_setWindowSize(L){this.precompute(L)}assertValidity(){k(this)}hasEvenY(){const{y:L}=this.toAffine();if(!n.isOdd)throw new Error("Field doesn't support isOdd");return!n.isOdd(L)}equals(L){E(L);const{px:j,py:O,pz:q}=this,{px:B,py:c,pz:b}=L,y=n.eql(n.mul(j,b),n.mul(B,q)),S=n.eql(n.mul(O,b),n.mul(c,q));return y&&S}negate(){return new M(this.px,n.neg(this.py),this.pz)}double(){const{a:L,b:j}=t,O=n.mul(j,Ei),{px:q,py:B,pz:c}=this;let b=n.ZERO,y=n.ZERO,S=n.ZERO,v=n.mul(q,q),U=n.mul(B,B),W=n.mul(c,c),A=n.mul(q,B);return A=n.add(A,A),S=n.mul(q,c),S=n.add(S,S),b=n.mul(L,S),y=n.mul(O,W),y=n.add(b,y),b=n.sub(U,y),y=n.add(U,y),y=n.mul(b,y),b=n.mul(A,b),S=n.mul(O,S),W=n.mul(L,W),A=n.sub(v,W),A=n.mul(L,A),A=n.add(A,S),S=n.add(v,v),v=n.add(S,v),v=n.add(v,W),v=n.mul(v,A),y=n.add(y,v),W=n.mul(B,c),W=n.add(W,W),v=n.mul(W,A),b=n.sub(b,v),S=n.mul(W,U),S=n.add(S,S),S=n.add(S,S),new M(b,y,S)}add(L){E(L);const{px:j,py:O,pz:q}=this,{px:B,py:c,pz:b}=L;let y=n.ZERO,S=n.ZERO,v=n.ZERO;const U=t.a,W=n.mul(t.b,Ei);let A=n.mul(j,B),h=n.mul(O,c),T=n.mul(q,b),se=n.add(j,O),Z=n.add(B,c);se=n.mul(se,Z),Z=n.add(A,h),se=n.sub(se,Z),Z=n.add(j,q);let ee=n.add(B,b);return Z=n.mul(Z,ee),ee=n.add(A,T),Z=n.sub(Z,ee),ee=n.add(O,q),y=n.add(c,b),ee=n.mul(ee,y),y=n.add(h,T),ee=n.sub(ee,y),v=n.mul(U,Z),y=n.mul(W,T),v=n.add(y,v),y=n.sub(h,v),v=n.add(h,v),S=n.mul(y,v),h=n.add(A,A),h=n.add(h,A),T=n.mul(U,T),Z=n.mul(W,Z),h=n.add(h,T),T=n.sub(A,T),T=n.mul(U,T),Z=n.add(Z,T),A=n.mul(h,Z),S=n.add(S,A),A=n.mul(ee,Z),y=n.mul(se,y),y=n.sub(y,A),A=n.mul(se,h),v=n.mul(ee,v),v=n.add(v,A),new M(y,S,v)}subtract(L){return this.add(L.negate())}is0(){return this.equals(M.ZERO)}multiply(L){const{endo:j}=e;if(!r.isValidNot0(L))throw new Error("invalid scalar: out of range");let O,q;const B=c=>G.wNAFCached(this,c,M.normalizeZ);if(j){const{k1neg:c,k1:b,k2neg:y,k2:S}=j.splitScalar(L),{p:v,f:U}=B(b),{p:W,f:A}=B(S);q=U.add(A),O=P(j.beta,v,W,c,y)}else{const{p:c,f:b}=B(L);O=c,q=b}return M.normalizeZ([O,q])[0]}multiplyUnsafe(L){const{endo:j}=e,O=this;if(!r.isValid(L))throw new Error("invalid scalar: out of range");if(L===Rs||O.is0())return M.ZERO;if(L===Xr)return O;if(G.hasPrecomputes(this))return this.multiply(L);if(j){const{k1neg:q,k1:B,k2neg:c,k2:b}=j.splitScalar(L),{p1:y,p2:S}=tp(M,O,B,b);return P(j.beta,y,S,q,c)}else return G.wNAFCachedUnsafe(O,L)}multiplyAndAddUnsafe(L,j,O){const q=this.multiplyUnsafe(j).add(L.multiplyUnsafe(O));return q.is0()?void 0:q}toAffine(L){return _(this,L)}isTorsionFree(){const{isTorsionFree:L}=e;return s===Xr?!0:L?L(M,this):G.wNAFCachedUnsafe(this,i).is0()}clearCofactor(){const{clearCofactor:L}=e;return s===Xr?this:L?L(M,this):this.multiplyUnsafe(s)}toBytes(L=!0){return Tr("isCompressed",L),this.assertValidity(),m(M,this,L)}toRawBytes(L=!0){return this.toBytes(L)}toHex(L=!0){return Fr(this.toBytes(L))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}M.BASE=new M(t.Gx,t.Gy,n.ONE),M.ZERO=new M(n.ZERO,n.ONE,n.ZERO),M.Fp=n,M.Fn=r;const $=r.BITS,G=Gf(M,e.endo?Math.ceil($/2):$);return M}function ip(t){const{CURVE:e,curveOpts:n}=e0(t),r=Jf(e,n);return cp(t,r)}function Qf(t){return Uint8Array.of(t?2:3)}function op(t,e,n={}){ms(e,{hash:"function"},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const r=e.randomBytes||Kc,s=e.hmac||((O,...q)=>Gc(e.hash,O,kn(...q))),{Fp:i,Fn:o}=t,{ORDER:a,BITS:l}=o;function f(O){const q=a>>Xr;return O>q}function m(O){return f(O)?o.neg(O):O}function p(O,q){if(!o.isValidNot0(q))throw new Error(`invalid signature ${O}: out of range 1..CURVE.n`)}class C{constructor(q,B,c){p("r",q),p("s",B),this.r=q,this.s=B,c!=null&&(this.recovery=c),Object.freeze(this)}static fromCompact(q){const B=o.BYTES,c=Ze("compactSignature",q,B*2);return new C(o.fromBytes(c.subarray(0,B)),o.fromBytes(c.subarray(B,B*2)))}static fromDER(q){const{r:B,s:c}=Nn.toSig(Ze("DER",q));return new C(B,c)}assertValidity(){}addRecoveryBit(q){return new C(this.r,this.s,q)}recoverPublicKey(q){const B=i.ORDER,{r:c,s:b,recovery:y}=this;if(y==null||![0,1,2,3].includes(y))throw new Error("recovery id invalid");if(a*rp<B&&y>1)throw new Error("recovery id is ambiguous for h>1 curve");const v=y===2||y===3?c+a:c;if(!i.isValid(v))throw new Error("recovery id 2 or 3 invalid");const U=i.toBytes(v),W=t.fromHex(kn(Qf((y&1)===0),U)),A=o.inv(v),h=k(Ze("msgHash",q)),T=o.create(-h*A),se=o.create(b*A),Z=t.BASE.multiplyUnsafe(T).add(W.multiplyUnsafe(se));if(Z.is0())throw new Error("point at infinify");return Z.assertValidity(),Z}hasHighS(){return f(this.s)}normalizeS(){return this.hasHighS()?new C(this.r,o.neg(this.s),this.recovery):this}toBytes(q){if(q==="compact")return kn(o.toBytes(this.r),o.toBytes(this.s));if(q==="der")return Ao(Nn.hexFromSig(this));throw new Error("invalid format")}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return Fr(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return Fr(this.toBytes("compact"))}}const w=el(o,n.allowedPrivateKeyLengths,n.wrapPrivateKey),F={isValidPrivateKey(O){try{return w(O),!0}catch{return!1}},normPrivateKeyToScalar:w,randomPrivateKey:()=>{const O=a;return $f(r(Jc(O)),O)},precompute(O=8,q=t.BASE){return q.precompute(O,!1)}};function I(O,q=!0){return t.fromPrivateKey(O).toBytes(q)}function x(O){if(typeof O=="bigint")return!1;if(O instanceof t)return!0;const B=Ze("key",O).length,c=i.BYTES,b=c+1,y=2*c+1;if(!(n.allowedPrivateKeyLengths||o.BYTES===b))return B===b||B===y}function E(O,q,B=!0){if(x(O)===!0)throw new Error("first arg must be private key");if(x(q)===!1)throw new Error("second arg must be public key");return t.fromHex(q).multiply(w(O)).toBytes(B)}const _=e.bits2int||function(O){if(O.length>8192)throw new Error("input is too large");const q=ri(O),B=O.length*8-l;return B>0?q>>BigInt(B):q},k=e.bits2int_modN||function(O){return o.create(_(O))},P=si(l);function M(O){return $r("num < 2^"+l,O,Rs,P),o.toBytes(O)}function $(O,q,B=G){if(["recovered","canonical"].some(se=>se in B))throw new Error("sign() legacy options not supported");const{hash:c}=e;let{lowS:b,prehash:y,extraEntropy:S}=B;b==null&&(b=!0),O=Ze("msgHash",O),Wd(B),y&&(O=Ze("prehashed msgHash",c(O)));const v=k(O),U=w(q),W=[M(U),M(v)];if(S!=null&&S!==!1){const se=S===!0?r(i.BYTES):S;W.push(Ze("extraEntropy",se))}const A=kn(...W),h=v;function T(se){const Z=_(se);if(!o.isValidNot0(Z))return;const ee=o.inv(Z),ve=t.BASE.multiply(Z).toAffine(),le=o.create(ve.x);if(le===Rs)return;const be=o.create(ee*o.create(h+le*U));if(be===Rs)return;let ln=(ve.x===le?0:2)|Number(ve.y&Xr),xe=be;return b&&f(be)&&(xe=m(be),ln^=1),new C(le,xe,ln)}return{seed:A,k2sig:T}}const G={lowS:e.lowS,prehash:!1},Y={lowS:e.lowS,prehash:!1};function L(O,q,B=G){const{seed:c,k2sig:b}=$(O,q,B);return Hb(e.hash.outputLen,o.BYTES,s)(c,b)}t.BASE.precompute(8);function j(O,q,B,c=Y){const b=O;q=Ze("msgHash",q),B=Ze("publicKey",B),Wd(c);const{lowS:y,prehash:S,format:v}=c;if("strict"in c)throw new Error("options.strict was renamed to lowS");if(v!==void 0&&!["compact","der","js"].includes(v))throw new Error('format must be "compact", "der" or "js"');const U=typeof b=="string"||Eo(b),W=!U&&!v&&typeof b=="object"&&b!==null&&typeof b.r=="bigint"&&typeof b.s=="bigint";if(!U&&!W)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let A,h;try{if(W)if(v===void 0||v==="js")A=new C(b.r,b.s);else throw new Error("invalid format");if(U){try{v!=="compact"&&(A=C.fromDER(b))}catch(xe){if(!(xe instanceof Nn.Err))throw xe}!A&&v!=="der"&&(A=C.fromCompact(b))}h=t.fromHex(B)}catch{return!1}if(!A||y&&A.hasHighS())return!1;S&&(q=e.hash(q));const{r:T,s:se}=A,Z=k(q),ee=o.inv(se),ve=o.create(Z*ee),le=o.create(T*ee),be=t.BASE.multiplyUnsafe(ve).add(h.multiplyUnsafe(le));return be.is0()?!1:o.create(be.x)===T}return Object.freeze({getPublicKey:I,getSharedSecret:E,sign:L,verify:j,utils:F,Point:t,Signature:C})}function e0(t){const e={a:t.a,b:t.b,p:t.Fp.ORDER,n:t.n,h:t.h,Gx:t.Gx,Gy:t.Gy},n=t.Fp,r=_r(e.n,t.nBitLength),s={Fp:n,Fn:r,allowedPrivateKeyLengths:t.allowedPrivateKeyLengths,allowInfinityPoint:t.allowInfinityPoint,endo:t.endo,wrapPrivateKey:t.wrapPrivateKey,isTorsionFree:t.isTorsionFree,clearCofactor:t.clearCofactor,fromBytes:t.fromBytes,toBytes:t.toBytes};return{CURVE:e,curveOpts:s}}function ap(t){const{CURVE:e,curveOpts:n}=e0(t),r={hash:t.hash,hmac:t.hmac,randomBytes:t.randomBytes,lowS:t.lowS,bits2int:t.bits2int,bits2int_modN:t.bits2int_modN};return{CURVE:e,curveOpts:n,ecdsaOpts:r}}function cp(t,e){const{Fp:n,Fn:r}=e;function s(a){return Pf(a,Xr,r.ORDER)}const i=Zf(n,t.a,t.b),o=el(r,t.allowedPrivateKeyLengths,t.wrapPrivateKey);return Object.assign({},{CURVE:t,Point:e,ProjectivePoint:e,normPrivateKeyToScalar:o,weierstrassEquation:i,isWithinCurveOrder:s})}function lp(t,e){return Object.assign({},e,{ProjectivePoint:e.Point,CURVE:t})}function t0(t){const{CURVE:e,curveOpts:n,ecdsaOpts:r}=ap(t),s=Jf(e,n),i=op(s,r,n);return lp(t,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function dp(t,e){const n=r=>t0({...t,hash:r});return{...n(e),create:n}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Zi={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")};BigInt(0);const up=BigInt(1),oc=BigInt(2),Pd=(t,e)=>(t+e/oc)/e;function fp(t){const e=Zi.p,n=BigInt(3),r=BigInt(6),s=BigInt(11),i=BigInt(22),o=BigInt(23),a=BigInt(44),l=BigInt(88),f=t*t*t%e,m=f*f*t%e,p=Xe(m,n,e)*m%e,C=Xe(p,n,e)*m%e,w=Xe(C,oc,e)*f%e,F=Xe(w,s,e)*w%e,I=Xe(F,i,e)*F%e,x=Xe(I,a,e)*I%e,E=Xe(x,l,e)*x%e,_=Xe(E,a,e)*I%e,k=Xe(_,n,e)*m%e,P=Xe(k,o,e)*F%e,M=Xe(P,r,e)*f%e,$=Xe(M,oc,e);if(!ac.eql(ac.sqr($),t))throw new Error("Cannot find square root");return $}const ac=_r(Zi.p,void 0,void 0,{sqrt:fp}),Qn=dp({...Zi,Fp:ac,lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=Zi.n,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-up*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=n,o=BigInt("0x100000000000000000000000000000000"),a=Pd(i*t,e),l=Pd(-r*t,e);let f=Je(t-a*n-l*s,e),m=Je(-a*r-l*i,e);const p=f>o,C=m>o;if(p&&(f=e-f),C&&(m=e-m),f>o||m>o)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:p,k1:f,k2neg:C,k2:m}}}},jc);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const En=BigInt(0),Ot=BigInt(1),Ca=BigInt(2),hp=BigInt(8),mp={zip215:!0};function bp(t,e,n,r){const s=t.sqr(n),i=t.sqr(r),o=t.add(t.mul(e.a,s),i),a=t.add(t.ONE,t.mul(e.d,t.mul(s,i)));return t.eql(o,a)}function pp(t,e={}){const{Fp:n,Fn:r}=Xf("edwards",t,e),{h:s,n:i}=t;ms(e,{},{uvRatio:"function"});const o=Ca<<BigInt(r.BYTES*8)-Ot,a=I=>n.create(I),l=e.uvRatio||((I,x)=>{try{return{isValid:!0,value:n.sqrt(n.div(I,x))}}catch{return{isValid:!1,value:En}}});if(!bp(n,t,t.Gx,t.Gy))throw new Error("bad curve params: generator point");function f(I,x,E=!1){const _=E?Ot:En;return $r("coordinate "+I,x,_,o),x}function m(I){if(!(I instanceof w))throw new Error("ExtendedPoint expected")}const p=Hs((I,x)=>{const{ex:E,ey:_,ez:k}=I,P=I.is0();x==null&&(x=P?hp:n.inv(k));const M=a(E*x),$=a(_*x),G=a(k*x);if(P)return{x:En,y:Ot};if(G!==Ot)throw new Error("invZ was invalid");return{x:M,y:$}}),C=Hs(I=>{const{a:x,d:E}=t;if(I.is0())throw new Error("bad point: ZERO");const{ex:_,ey:k,ez:P,et:M}=I,$=a(_*_),G=a(k*k),Y=a(P*P),L=a(Y*Y),j=a($*x),O=a(Y*a(j+G)),q=a(L+a(E*a($*G)));if(O!==q)throw new Error("bad point: equation left != right (1)");const B=a(_*k),c=a(P*M);if(B!==c)throw new Error("bad point: equation left != right (2)");return!0});class w{constructor(x,E,_,k){this.ex=f("x",x),this.ey=f("y",E),this.ez=f("z",_,!0),this.et=f("t",k),Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(x){if(x instanceof w)throw new Error("extended point not allowed");const{x:E,y:_}=x||{};return f("x",E),f("y",_),new w(E,_,Ot,a(E*_))}static normalizeZ(x){return Qc(w,"ez",x)}static msm(x,E){return Yf(w,r,x,E)}_setWindowSize(x){this.precompute(x)}precompute(x=8,E=!0){return F.setWindowSize(this,x),E||this.multiply(Ca),this}assertValidity(){C(this)}equals(x){m(x);const{ex:E,ey:_,ez:k}=this,{ex:P,ey:M,ez:$}=x,G=a(E*$),Y=a(P*k),L=a(_*$),j=a(M*k);return G===Y&&L===j}is0(){return this.equals(w.ZERO)}negate(){return new w(a(-this.ex),this.ey,this.ez,a(-this.et))}double(){const{a:x}=t,{ex:E,ey:_,ez:k}=this,P=a(E*E),M=a(_*_),$=a(Ca*a(k*k)),G=a(x*P),Y=E+_,L=a(a(Y*Y)-P-M),j=G+M,O=j-$,q=G-M,B=a(L*O),c=a(j*q),b=a(L*q),y=a(O*j);return new w(B,c,y,b)}add(x){m(x);const{a:E,d:_}=t,{ex:k,ey:P,ez:M,et:$}=this,{ex:G,ey:Y,ez:L,et:j}=x,O=a(k*G),q=a(P*Y),B=a($*_*j),c=a(M*L),b=a((k+P)*(G+Y)-O-q),y=c-B,S=c+B,v=a(q-E*O),U=a(b*y),W=a(S*v),A=a(b*v),h=a(y*S);return new w(U,W,h,A)}subtract(x){return this.add(x.negate())}multiply(x){const E=x;$r("scalar",E,Ot,i);const{p:_,f:k}=F.wNAFCached(this,E,w.normalizeZ);return w.normalizeZ([_,k])[0]}multiplyUnsafe(x,E=w.ZERO){const _=x;return $r("scalar",_,En,i),_===En?w.ZERO:this.is0()||_===Ot?this:F.wNAFCachedUnsafe(this,_,w.normalizeZ,E)}isSmallOrder(){return this.multiplyUnsafe(s).is0()}isTorsionFree(){return F.wNAFCachedUnsafe(this,i).is0()}toAffine(x){return p(this,x)}clearCofactor(){return s===Ot?this:this.multiplyUnsafe(s)}static fromBytes(x,E=!1){return Vt(x),this.fromHex(x,E)}static fromHex(x,E=!1){const{d:_,a:k}=t,P=n.BYTES;x=Ze("pointHex",x,P),Tr("zip215",E);const M=x.slice(),$=x[P-1];M[P-1]=$&-129;const G=zs(M),Y=E?o:n.ORDER;$r("pointHex.y",G,En,Y);const L=a(G*G),j=a(L-Ot),O=a(_*L-k);let{isValid:q,value:B}=l(j,O);if(!q)throw new Error("Point.fromHex: invalid y coordinate");const c=(B&Ot)===Ot,b=($&128)!==0;if(!E&&B===En&&b)throw new Error("Point.fromHex: x=0 and x_0=1");return b!==c&&(B=a(-B)),w.fromAffine({x:B,y:G})}static fromPrivateScalar(x){return w.BASE.multiply(x)}toBytes(){const{x,y:E}=this.toAffine(),_=xo(E,n.BYTES);return _[_.length-1]|=x&Ot?128:0,_}toRawBytes(){return this.toBytes()}toHex(){return Fr(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}w.BASE=new w(t.Gx,t.Gy,Ot,a(t.Gx*t.Gy)),w.ZERO=new w(En,Ot,Ot,En),w.Fp=n,w.Fn=r;const F=Gf(w,r.BYTES*8);return w}function yp(t,e){ms(e,{hash:"function"},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",mapToCurve:"function"});const{prehash:n,hash:r}=e,{BASE:s,Fp:i,Fn:o}=t,a=o.ORDER,l=e.randomBytes||Kc,f=e.adjustScalarBytes||(M=>M),m=e.domain||((M,$,G)=>{if(Tr("phflag",G),$.length||G)throw new Error("Contexts/pre-hash are not supported");return M});function p(M){return o.create(M)}function C(M){return p(zs(M))}function w(M){const $=i.BYTES;M=Ze("private key",M,$);const G=Ze("hashed private key",r(M),2*$),Y=f(G.slice(0,$)),L=G.slice($,2*$),j=C(Y);return{head:Y,prefix:L,scalar:j}}function F(M){const{head:$,prefix:G,scalar:Y}=w(M),L=s.multiply(Y),j=L.toBytes();return{head:$,prefix:G,scalar:Y,point:L,pointBytes:j}}function I(M){return F(M).pointBytes}function x(M=Uint8Array.of(),...$){const G=kn(...$);return C(r(m(G,Ze("context",M),!!n)))}function E(M,$,G={}){M=Ze("message",M),n&&(M=n(M));const{prefix:Y,scalar:L,pointBytes:j}=F($),O=x(G.context,Y,M),q=s.multiply(O).toBytes(),B=x(G.context,q,j,M),c=p(O+B*L);$r("signature.s",c,En,a);const b=i.BYTES,y=kn(q,xo(c,b));return Ze("result",y,b*2)}const _=mp;function k(M,$,G,Y=_){const{context:L,zip215:j}=Y,O=i.BYTES;M=Ze("signature",M,2*O),$=Ze("message",$),G=Ze("publicKey",G,O),j!==void 0&&Tr("zip215",j),n&&($=n($));const q=zs(M.slice(O,2*O));let B,c,b;try{B=t.fromHex(G,j),c=t.fromHex(M.slice(0,O),j),b=s.multiplyUnsafe(q)}catch{return!1}if(!j&&B.isSmallOrder())return!1;const y=x(L,c.toBytes(),B.toBytes(),$);return c.add(B.multiplyUnsafe(y)).subtract(b).clearCofactor().is0()}return s.precompute(8),{getPublicKey:I,sign:E,verify:k,utils:{getExtendedPublicKey:F,randomPrivateKey:()=>l(i.BYTES),precompute(M=8,$=t.BASE){return $.precompute(M,!1)}},Point:t}}function gp(t){const e={a:t.a,d:t.d,p:t.Fp.ORDER,n:t.n,h:t.h,Gx:t.Gx,Gy:t.Gy},n=t.Fp,r=_r(e.n,t.nBitLength,!0),s={Fp:n,Fn:r,uvRatio:t.uvRatio},i={hash:t.hash,randomBytes:t.randomBytes,adjustScalarBytes:t.adjustScalarBytes,domain:t.domain,prehash:t.prehash,mapToCurve:t.mapToCurve};return{CURVE:e,curveOpts:s,eddsaOpts:i}}function wp(t,e){return Object.assign({},e,{ExtendedPoint:e.Point,CURVE:t})}function Ep(t){const{CURVE:e,curveOpts:n,eddsaOpts:r}=gp(t),s=pp(e,n),i=yp(s,r);return wp(t,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */BigInt(0);const Ap=BigInt(1),Ld=BigInt(2);BigInt(3);const Bp=BigInt(5),xp=BigInt(8),Co={p:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:xp,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function Cp(t){const e=BigInt(10),n=BigInt(20),r=BigInt(40),s=BigInt(80),i=Co.p,a=t*t%i*t%i,l=Xe(a,Ld,i)*a%i,f=Xe(l,Ap,i)*t%i,m=Xe(f,Bp,i)*f%i,p=Xe(m,e,i)*m%i,C=Xe(p,n,i)*p%i,w=Xe(C,r,i)*C%i,F=Xe(w,s,i)*w%i,I=Xe(F,s,i)*w%i,x=Xe(I,e,i)*m%i;return{pow_p_5_8:Xe(x,Ld,i)*t%i,b2:a}}function Sp(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}const Od=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function Dp(t,e){const n=Co.p,r=Je(e*e*e,n),s=Je(r*r*e,n),i=Cp(t*s).pow_p_5_8;let o=Je(t*r*i,n);const a=Je(e*o*o,n),l=o,f=Je(o*Od,n),m=a===t,p=a===Je(-t,n),C=a===Je(-t*Od,n);return m&&(o=l),(p||C)&&(o=f),Yb(o,n)&&(o=Je(-o,n)),{isValid:m||p,value:o}}const vp=_r(Co.p,void 0,!0),kp={...Co,Fp:vp,hash:Vc,adjustScalarBytes:Sp,uvRatio:Dp},Mr=Ep(kp),Fp=[{name:"appIdPrefix",binary:"bytes",custom:Lt.encode("appID"),omit:!0},{name:"appId",binary:"uint",size:8}],Yt=class Yt{constructor(e,n="hex"){ie(this,"address");this.address=typeof e=="string"?Yt.stringToUint8Array(e,n):e}toNative(e){return or(e,this)}unwrap(){return this.address}toString(){return At.encode(this.address,!0)}toUint8Array(){return this.address}toUniversalAddress(){return this}equals(e){return Lt.equals(this.address,e.address)}static isValidAddress(e,n="hex"){return!$m(()=>Yt.stringToUint8Array(e,n))}static instanceof(e){return typeof e=="object"&&"constructor"in e&&e.constructor.type===Yt.type}static stringToUint8Array(e,n){const r=(()=>{switch(n){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 ${n}`);return At.decode(e);case"base58":return ef.decode(e);case"bech32":return Ju.decodeToBytes(e).bytes;case"algorandAppId":return Nb(bn(Fp,{appId:BigInt(e)}));case"sha256":return Yi(e)}})();if(r.length>Yt.byteSize)throw new Error(`string ${e} has invalid length for format ${n}`);return r.length<Yt.byteSize?Lt.zpad(r,Yt.byteSize):r}};ie(Yt,"byteSize",32),ie(Yt,"type","Universal"),ie(Yt,"ZERO",new Yt(new Uint8Array(Yt.byteSize)));let St=Yt;function Tp(t){return typeof t=="object"&&"setChain"in t}const cc=new Map;function tl(t,e){cc.has(t)||cc.set(t,e)}function or(t,e){const n=hn.get(t),r=cc.get(n);if(!r)throw new Error(`No native address type registered for platform ${n}, import the platform directly or, if using sdk package, import the addresses conditional export`);try{const s=new r(e);return Tp(s)&&s.setChain(t),s}catch(s){const i=`Error parsing address as a native ${t} address: ${s.message}`;if(St.instanceof(e))throw i;return new St(e).toNative(t)}}function n0(t,e){const n=hn.get(t);return new St(e,B1.get(n))}function Ip(t){return"getVersion"in t}const er={};function Up(t,e,n){e in er||(er[e]={});const r=er[e];if(t in r)throw new Error(`Protocol ${t} for protocol ${e} has already registered`);er[e][t]=n}function _p(t,e){const n=ti(t)?hn.get(t):t;return e in er?n in er[e]:!1}function r0(t,e){if(e in er){const n=er[e];if(n&&t in n){const r=n[t];if(r)return r}}throw new Error(`No protocols registered for ${t}:${e}. This may be because the platform specific protocol implementation is not registered (by installing and importing it) or no implementation exists for this platform`)}const Mp=(t,e,n,r)=>r0(t,e).fromRpc(n,r),lc=(t,e)=>t?`${t}:${e}`:e,dc=new Map;function Rp(t,e,n){const r=lc(t,e);if(dc.has(r))throw new Error(`Payload type ${r} already registered`);dc.set(r,n)}function gt(t,e){for(const[n,r]of e)Rp(t,n,r)}const qe={binary:"uint",size:32},s0={binary:"uint",size:2},zt=t=>({...s0,custom:{to:e=>{if(e===0){if(!(t!=null&&t.allowNull))throw new Error("ChainId 0 is not valid for this protocol and action");return null}const n=us(e),r=(t==null?void 0:t.allowedChains)??tf;if(!r.includes(n))throw new Error(`Chain ${n} not in allowed chains ${r}`);return n},from:e=>e==null?0:ei(e)}}),Wp=t=>({...s0,custom:{to:t,from:ei(t)}}),rs={binary:"uint",size:4},So={binary:"uint",size:8},i0={to:t=>new Date(Number(t*1000n)),from:t=>BigInt(t.getTime())/1000n},nl={binary:"uint",size:4},Vn=t=>({name:"payloadId",binary:"uint",size:1,custom:t,omit:!0}),Do={binary:"uint",size:8};class Pp{constructor(e,n,r){ie(this,"r");ie(this,"s");ie(this,"v");this.r=e,this.s=n,this.v=r}encode(){return bn(Ji,this)}static decode(e){return pn(Ji,e)}}var Nd;(function(t){function e(i){return Qn.getPublicKey(i)}t.toPubkey=e;function n(i,o){if(o.length!=32)throw new Error("hash.length != 32");return Qn.sign(o,i)}t.sign=n;function r(i,o,a){const{r:l,s:f}=i;return Qn.verify({r:l,s:f},a,o)}t.validate=r;function s(i,o){const{r:a,s:l,v:f}=i,m=new Qn.Signature(a,l);return m.recovery=f,m.recoverPublicKey(o).toRawBytes()}t.recover=s})(Nd||(Nd={}));const Lp=[{name:"r",binary:"uint",size:32},{name:"s",binary:"uint",size:32},{name:"v",binary:"uint",size:1}],Ji={binary:"bytes",layout:Lp,custom:{to:t=>new Pp(t.r,t.s,t.v),from:t=>({r:t.r,s:t.s,v:t.v})}},me={binary:"bytes",size:32,custom:{to:t=>new St(t),from:t=>t.toUint8Array()}},Op=t=>{const e=t.findIndex(n=>n!==0);return-1<e?t.slice(e):new Uint8Array([])},o0={to:Lt.decode,from:Lt.encode},rl=t=>({binary:"bytes",size:t,custom:{to:e=>Lt.decode(Op(e)),from:e=>Lt.zpad(Lt.encode(e),t)}});function a0(t){const e=t.indexOf(":");return e!==-1?[t.slice(0,e),t.slice(e+1)]:[null,t]}const Np=[{name:"guardianIndex",binary:"uint",size:1},{name:"signature",...Ji}],sl=[{name:"version",binary:"uint",size:1,custom:1,omit:!0},{name:"guardianSet",...nl},{name:"signatures",binary:"array",lengthSize:1,layout:Np}],il=[{name:"timestamp",binary:"uint",size:4},{name:"nonce",binary:"uint",size:4},{name:"emitterChain",...zt()},{name:"emitterAddress",...me},{name:"sequence",...Do},{name:"consistencyLevel",binary:"uint",size:1}],zp=[...sl,...il];function qs(t){const e=dc.get(t);if(!e)throw new Error(`No layout registered for payload type ${t}`);return e}function c0(t){return{name:"payload",binary:"bytes",...t==="Uint8Array"?{}:{layout:qs(t)}}}function Wi(t){const e=[...zp,c0(t.payloadLiteral)];return bn(e,t)}function Hp(t,e){if(t==="Uint8Array")return e;const n=qs(t);return bn(n,e)}function ol(t,e){const n=(()=>{if(Array.isArray(t[0]))return t.flatMap(([o,a])=>a.map(l=>lc(o,l)));if(typeof t[1]=="string")return t;const[s,i]=t;return i.map(o=>lc(s,o))})(),r=n1(n.map(s=>qs(s)));return s=>{typeof s=="string"&&(s=At.decode(s));const i=r(s);return Array.isArray(i)?i.map(o=>n[o]):i!==null?n[i]:null}}function Zr(t,e){typeof e=="string"&&(e=At.decode(e));const[n,r]=pn(sl,e,!1);for(let w=1;w<n.signatures.length;++w)if(n.signatures[w].guardianIndex<=n.signatures[w-1].guardianIndex)throw new Error("Guardian signatures must be in ascending order of guardian set index");const s=r,[i,o]=pn(il,e.subarray(s),!1),a=s+o,[l,f]=typeof t=="string"?[t,zd(t,e.subarray(a))]:zd(t,e.subarray(a)),[m,p]=a0(l),C=Ns(e.slice(s));return{protocolName:m,payloadName:p,payloadLiteral:l,...n,...i,payload:f,hash:C}}function zd(t,e,n=0){return(()=>{if(typeof e=="string"&&(e=At.decode(e)),t==="Uint8Array")return e.slice(n);if(typeof t=="string")return pn(qs(t),e.subarray(n));const r=t(e.slice(n));if(r===null)throw new Error(`Encoded data does not match any of the given payload types - ${e}`);return[r,pn(qs(r),e.subarray(n))]})()}function qp(t){return t.getBalances!==void 0}class Kp{constructor(e,n){ie(this,"network");ie(this,"config");this.network=e,this.config=n}utils(){return this.constructor}getProtocol(e,n){return Mp(this.utils()._platform,e,n,this.config)}getProtocolInitializer(e){return r0(this.utils()._platform,e)}async parseWormholeMessages(e,n,r){return(await this.getProtocol("WormholeCore",n)).parseTransaction(r)}}const $p=[["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"}]]]],Hd=fe($p,[0,[1,2]]),jp=[["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"}]]]],qd=fe(jp,[0,[1,2]]);function vo(t,e){if(t!=="Devnet"){if(t==="Mainnet"){if(!Hd.has(e))return;const n=Hd.get(e);return Object.fromEntries(n.map(([r,s])=>[r,{...s,chain:e,key:r}]))}if(t==="Testnet"){if(!qd.has(e))return;const n=qd.get(e);return Object.fromEntries(n.map(([r,s])=>[r,{...s,chain:e,key:r}]))}throw new Error("Unsupported network: "+t)}}function Vp(t,e){const n=vo(t,e);return n?fs.native(n):void 0}function Gp(t,e,n){const r=vo(t,e);return r?fs.byAddress(r,n):void 0}function Yp(t,e,n){const r=vo(t,e);return r?fs.byKey(r,n):void 0}function Xp(t,e){const n={coreBridge:q1.get(t,e),tokenBridge:K1.get(t,e),nftBridge:V1.get(t,e),relayer:G1.get(t,e),tokenBridgeRelayer:$1.get(t,e),tbtc:Mi.get(t,e),executor:j1.get(t,e)};return nc.has(t,e)&&(n.executorTokenBridge=nc.get(t,e)),rc.has(t,e)&&(n.cctp=rc.get(t,e)),Bd.has(t,e)&&(n.gateway=Bd.get(t,e)),xd.has(t,e)&&(n.translator=xd.get(t,e)),Cd.has(t,e)&&(n.portico=Cd.get(t,e)),Mi.has(t,e)&&(n.tbtc=Mi.get(t,e)),n}function Pt(t){return typeof t=="string"&&t==="native"}function al(t){return{chain:t,address:"native"}}function ko(t){return typeof t=="object"&&t.address!==void 0&&t.chain!==void 0&&ti(t.chain)}function l0(t,e){return t.chain!==e.chain?!1:Pt(t.address)&&Pt(e.address)?!0:In(t)===In(e)}function In(t){return ko(t)&&Pt(t.address)?t.address:t.address.toNative(t.chain).toString()}function Zp(t){if(Pt(t.address))throw new Error("Invalid address, cannot convert the string literal `native` to a Universal Address");return t.address.toUniversalAddress().toString()}function d0(t,e,n){let r;if(ko(n)){if(!Pt(n.address))return[!1,n];r=n.address}else r=n;if(Pt(r)){const i=Vp(t,e);if(!i)throw new Error("Invalid destination token");const o=i.wrappedKey,a=Yp(t,e,o);if(!a)throw new Error("Invalid wrapped token key: "+o);return[!0,{chain:e,address:or(e,a.address)}]}return[!1,{chain:e,address:r}]}function u0(t){return t.chain!==void 0&&t.txid!==void 0}function Sa(t){return tf.map(n=>{const r=hn(n);let s="";try{s=df.get(t,n)}catch{}const i=vo(t,n),o=i?Object.values(i).find(l=>Pt(l.address)&&l.wrappedKey):void 0,a=o?i[o.wrappedKey]:void 0;return{key:n,platform:r,network:t,chainId:fn(n),finalityThreshold:sf.get(n)??0,blockTime:of.get(n)??0,contracts:Xp(t,n),nativeTokenDecimals:af(r),nativeChainId:s,tokenMap:i,wrappedNative:a,explorer:F1(t,n),rpc:cf(t,n)}}).reduce((n,r)=>({...n,[r.key]:r}),{})}function Jp(t){return f0(t)||cl(t)}function f0(t){return typeof t=="object"&&"chain"in t&&typeof t.chain=="function"&&"address"in t&&typeof t.address=="function"&&"sign"in t&&typeof t.sign=="function"}function cl(t){return typeof t=="object"&&"chain"in t&&typeof t.chain=="function"&&"address"in t&&typeof t.address=="function"&&"signAndSend"in t&&typeof t.signAndSend=="function"}class Qp{constructor(e,n,r){ie(this,"_chain");ie(this,"_address");ie(this,"_signer");this._chain=e,this._address=n,this._signer=r}unwrap(){return this._signer}}function Ar(t){return t.sequence!==void 0&&t.emitter!==void 0&&t.chain!==void 0}function Qi(t){return t.hash!==void 0}const Kd=t=>[Vn(1),{name:"token",binary:"bytes",layout:[{name:"address",...me},{name:"amount",...qe}]},{name:"sourceDomain",...rs},{name:"targetDomain",...rs},{name:"nonce",...So},{name:"caller",...me},{name:"mintRecipient",...me},bo({name:"payload",lengthSize:2},t)],ey=[Vn(1),{name:"targetRelayerFee",...qe},{name:"toNativeTokenAmount",...qe},{name:"targetRecipient",...me}],ty=[["DepositWithPayload",Kd()],["TransferWithRelay",Kd(ey)]];gt("AutomaticCircleBridge",ty);const h0={binary:"uint",size:4,custom:0,omit:!0},ny=[{name:"messageBodyVersion",...h0},{name:"burnToken",...me},{name:"mintRecipient",...me},{name:"amount",...qe},{name:"messageSender",...me}],uc=[{name:"version",...h0},{name:"sourceDomain",...rs},{name:"destinationDomain",...rs},{name:"nonce",...So},{name:"sender",...me},{name:"recipient",...me},{name:"destinationCaller",...me},{name:"payload",binary:"bytes",layout:ny}],ry=[["Message",uc]];gt("CircleBridge",ry);exports.CircleBridge=void 0;(function(t){t.isCircleAttestation=e=>e.message!==void 0,t.deserialize=e=>{const n=pn(uc,e),r=At.encode(Ns(e),!0);return[n,r]},t.serialize=e=>bn(uc,e)})(exports.CircleBridge||(exports.CircleBridge={}));var $d;(function(t){const e="AutomaticCircleBridge",n=["DepositWithPayload","TransferWithRelay"];t.getTransferDiscriminator=_c(()=>ol([e,n]))})($d||($d={}));function sy(t){return t.amount!==void 0&&t.from!==void 0&&t.to!==void 0}const jd={binary:"bytes",size:32,custom:{to:t=>Hi(t.byteLength).map(e=>String.fromCharCode(t[e])).join(""),from:t=>new Uint8Array(t.split("").map(e=>e.charCodeAt(0)))}},m0=[{name:"token",binary:"bytes",layout:[{name:"amount",...qe},{name:"address",...me},{name:"chain",...zt()}]},{name:"to",binary:"bytes",layout:[{name:"address",...me},{name:"chain",...zt()}]}],b0=[Vn(1),...m0,{name:"fee",...qe}],ii=t=>[Vn(3),...m0,{name:"from",...me},bo({name:"payload"},t)],iy=[["AttestMeta",[Vn(2),{name:"token",binary:"bytes",layout:[{name:"address",...me},{name:"chain",...zt()}]},{name:"decimals",binary:"uint",size:1},{name:"symbol",...jd},{name:"name",...jd}]],["Transfer",b0],["TransferWithPayload",ii()]];gt("TokenBridge",iy);const oy=o1(["shouldWrapNative","shouldUnwrapNative"]),eo=[{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",...oy}];({...me},{...qe}),{...me},{...me},{...me},{...qe},{...qe},{...qe},{...qe};const fc=[{name:"flagSet",binary:"bytes",layout:eo},{name:"finalTokenAddress",...me},{name:"recipientAddress",...me},{name:"cannonAssetAmount",...qe},{name:"minAmountFinish",...qe},{name:"relayerFee",...qe}],ay=[["Transfer",ii(fc)]];gt("PorticoBridge",ay);exports.PorticoBridge=void 0;(function(t){t.deserializePayload=e=>pn(fc,e),t.serializePayload=e=>bn(fc,e),t.deserializeFlagSet=e=>pn(eo,e),t.serializeFlagSet=e=>bn(eo,e)})(exports.PorticoBridge||(exports.PorticoBridge={}));const p0={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",...qe},{name:"targetChainRefundPerGasUnused",...qe}]},Vd={binary:"bytes",layout:[{name:"chain",...zt()},{name:"address",...me}]},cy=[{name:"chain",...zt()},{name:"emitterAddress",...me},{name:"sequence",...Do}],ly=[{name:"size",binary:"uint",size:4,custom:12,omit:!0},{name:"domain",...rs},{name:"nonce",...So}],y0={binary:"switch",idSize:1,idTag:"keyType",layouts:[[[1,"VAA"],cy],[[2,"CCTP"],ly]]},g0=t=>[Vn(1),{name:"target",...Vd},bo({name:"payload",lengthSize:4},t),{name:"requestedReceiverValue",...qe},{name:"extraReceiverValue",...qe},{name:"executionInfo",...p0},{name:"refund",...Vd},{name:"refundDeliveryProvider",...me},{name:"sourceDeliveryProvider",...me},{name:"senderAddress",...me},{name:"messageKeys",binary:"array",lengthSize:1,layout:y0}],dy=[["DeliveryInstruction",g0()],["RedeliveryInstruction",[Vn(2),{name:"deliveryVaaKey",binary:"bytes",layout:y0},{name:"targetChain",...zt()},{name:"newRequestedReceiverValue",...qe},{name:"newEncodedExecutionInfo",...p0},{name:"newSourceDeliveryProvider",...me},{name:"newSenderAddress",...me}]]];gt("Relayer",dy);const uy=[Vn(1),{name:"targetRelayerFee",...qe},{name:"toNativeTokenAmount",...qe},{name:"targetRecipient",...me}],fy=[["TransferWithRelay",ii(uy)]];gt("AutomaticTokenBridge",fy);const hy=t=>new Error(`Token ${t} is not a wrapped asset`);var hc;(function(t){const e="TokenBridge",n=["Transfer","TransferWithPayload"],r=["AttestMeta"];[...n,...r],t.getTransferDiscriminator=_c(()=>ol([e,n]))})(hc||(hc={}));function my(t){return t.token!==void 0&&t.amount!==void 0&&t.from!==void 0&&t.to!==void 0}const by=[{name:"targetRecipient",...me}],py=[["TransferWithExecutorRelay",ii(by)]];gt("ExecutorTokenBridge",py);const yy=[["Add",1],["Subtract",2],["Unknown",3]],mc={binary:"bytes",size:20,custom:{to:t=>At.encode(t,!0),from:t=>At.decode(t)}},gy=[["UpgradeContract",[!1,[{name:"newContract",...me}]]],["RegisterChain",[!0,[{name:"foreignChain",...zt()},{name:"foreignAddress",...me}]]],["RecoverChainId",[!1,[{name:"evmChainId",binary:"uint",size:32},{name:"newChainId",...zt({allowedChains:nf("Evm")})}]]],["GuardianSetUpgrade",[!0,[{name:"guardianSet",...nl},{name:"guardians",binary:"array",lengthSize:1,layout:mc}]]],["SetMessageFee",[!1,[{name:"messageFee",binary:"uint",size:32}]]],["TransferFees",[!0,[{name:"amount",binary:"uint",size:32},{name:"recipient",...me}]]],["UpdateDefaultProvider",[!1,[{name:"defaultProvider",...me}]]],["RegisterEmitterAndDomain",[!0,[{name:"emitterChain",...zt()},{name:"emitterAddress",...me},{name:"domain",binary:"uint",size:4}]]],["UpdateFinality",[!1,[{name:"finality",binary:"uint",size:1}]]]],Da={binary:"bytes",size:32},Gd=[{name:"contractAddr",...me},{name:"codeId",binary:"uint",size:8}],wy=[["StoreCode",[!1,[{name:"wasmHash",...Da}]]],["InstantiateContract",[!1,[{name:"instantiationParamsHash",...Da}]]],["MigrateContract",[!1,[{name:"migrationParamsHash",...Da}]]],["AddWasmInstantiateAllowlist",[!1,Gd]],["DeleteWasmInstantiateAllowlist",[!1,Gd]]],Ey=(()=>{const t=s=>({binary:"bytes",size:s,custom:o0}),e=[{name:"height",binary:"uint",size:8}],n=ju(e),r=s=>[{name:"name",...t(s)},...e];return{binary:"bytes",custom:{to:s=>pn(r(s.length-n),s),from:s=>bn(r(s.name.length),s)}}})(),Ay=[["ScheduleUpgrade",[!1,Ey]],["CancelUpgrade",[!0,[]]],["SetIbcComposabilityMwContract",[!1,[{name:"contractAddress",...me}]]]],By=[["ModifyBalance",[!1,[{name:"sequence",...Do},{name:"modifiedChain",...zt()},{name:"tokenChain",...zt()},{name:"tokenAddress",...me},{name:"kind",...i1(yy)},{name:"amount",...qe},{name:"reason",...rl(32)}]]]],xy=[["ActionUpdateChannelChain",[!1,[{name:"channelId",...rl(64)},{name:"channelChain",...zt({allowedChains:nf("Cosmwasm")})}]]]],Cy=[["GeneralPurposeEvm",[!1,[{name:"governanceContract",...mc},{name:"targetContract",...mc},{name:"payload",binary:"bytes",lengthSize:2}]]],["GeneralPurposeSolana",[!1,[{name:"governanceContract",...me},{name:"payload",binary:"bytes"}]]]],w0=[...gy,...wy,...Ay,...By,...xy,...Cy];Hu(w0,0);const Yd=Object.fromEntries(w0),Sy=[["WormholeCore","Core"],["TokenBridge","TokenBridge"],["NftBridge","NftBridge"],["Relayer","WormholeRelayer"],["CircleBridge","CircleIntegration"],["IbcBridge","IbcTranslator"],["IbcReceiver","IbcReceiver"],["GlobalAccountant","GlobalAccountant"],["GeneralPurposeGovernance","GeneralPurposeGovernance"],["WormchainGovernance","WasmdModule"],["GatewayGovernance","GatewayModule"]],Dy=fe(Sy),vy=t=>({to:t,from:(()=>{const n=new Uint8Array(32),r=Dy(t);for(let s=1;s<=r.length;++s)n[32-s]=r.charCodeAt(r.length-s);return n})()}),ky=(t,e)=>({to:t,from:e}),Fy=(t,e,n)=>[{name:"protocol",binary:"bytes",custom:vy(t)},{name:"action",binary:"uint",size:1,custom:ky(e,n)},{name:"chain",...zt({allowNull:Yd[e][0]})},{name:"actionArgs",binary:"bytes",layout:Yd[e][1]}],Fe=(t,e,n)=>[e,Fy(t,e,n)],Ty=[Fe("WormholeCore","UpgradeContract",1),Fe("WormholeCore","GuardianSetUpgrade",2),Fe("WormholeCore","SetMessageFee",3),Fe("WormholeCore","TransferFees",4),Fe("WormholeCore","RecoverChainId",5)],Iy=[Fe("TokenBridge","RegisterChain",1),Fe("TokenBridge","UpgradeContract",2),Fe("TokenBridge","RecoverChainId",3)],Uy=[Fe("NftBridge","RegisterChain",1),Fe("NftBridge","UpgradeContract",2),Fe("NftBridge","RecoverChainId",3)],_y=[Fe("Relayer","RegisterChain",1),Fe("Relayer","UpgradeContract",2),Fe("Relayer","UpdateDefaultProvider",3)],My=[Fe("CircleBridge","UpdateFinality",1),Fe("CircleBridge","RegisterEmitterAndDomain",2),Fe("CircleBridge","UpgradeContract",3)],Ry=[Fe("IbcBridge","ActionUpdateChannelChain",1)],Wy=[Fe("IbcReceiver","ActionUpdateChannelChain",1)],Py=[Fe("GlobalAccountant","ModifyBalance",1)],Ly=[Fe("GeneralPurposeGovernance","GeneralPurposeEvm",1),Fe("GeneralPurposeGovernance","GeneralPurposeSolana",2)],Oy=[Fe("WormchainGovernance","StoreCode",1),Fe("WormchainGovernance","InstantiateContract",2),Fe("WormchainGovernance","MigrateContract",3),Fe("WormchainGovernance","AddWasmInstantiateAllowlist",4),Fe("WormchainGovernance","DeleteWasmInstantiateAllowlist",5)],Ny=[Fe("GatewayGovernance","ScheduleUpgrade",1),Fe("GatewayGovernance","CancelUpgrade",2),Fe("GatewayGovernance","SetIbcComposabilityMwContract",3)];gt("WormholeCore",Ty);gt("TokenBridge",Iy);gt("NftBridge",Uy);gt("Relayer",_y);gt("CircleBridge",My);gt("IbcBridge",Ry);gt("IbcReceiver",Wy);gt("GlobalAccountant",Py);gt("GeneralPurposeGovernance",Ly);gt("WormchainGovernance",Oy);gt("GatewayGovernance",Ny);exports.TBTCBridge=void 0;(function(t){const e="TBTCBridge",n=["GatewayTransfer","Transfer"];[...n],t.getTransferDiscriminator=_c(()=>ol([e,n])),t.getNativeTbtcToken=r=>{const s=tb.get("Mainnet",r);if(s)return{chain:r,address:or(r,s)}}})(exports.TBTCBridge||(exports.TBTCBridge={}));const zy=[{name:"recipient",...me}],Hy=[["GatewayTransfer",ii(zy)],["Transfer",b0]];gt("TBTCBridge",Hy);const qy=[{name:"gasLimit",binary:"uint",size:16},{name:"msgValue",binary:"uint",size:16}],Ky=[{name:"dropOff",binary:"uint",size:16},{name:"recipient",...me}],$y=[{name:"request",binary:"switch",idSize:1,idTag:"type",layouts:[[[1,"GasInstruction"],qy],[[2,"GasDropOffInstruction"],Ky]]}],E0=[{name:"requests",binary:"array",layout:$y}],jy=[{name:"quote",binary:"switch",idSize:4,idTag:"prefix",layouts:[[[1162948657,"EQ01"],[{name:"quoterAddress",binary:"bytes",size:20},{name:"payeeAddress",binary:"bytes",size:32},{name:"srcChain",binary:"uint",size:2},{name:"dstChain",binary:"uint",size:2},{name:"expiryTime",binary:"uint",size:8,custom:i0},{name:"baseFee",binary:"uint",size:8},{name:"dstGasPrice",binary:"uint",size:8},{name:"srcPrice",binary:"uint",size:8},{name:"dstPrice",binary:"uint",size:8}]]]}],A0=[...jy,{name:"signature",binary:"bytes",size:65}];var jr;(function(t){t.Pending="pending",t.Failed="failed",t.Unsupported="unsupported",t.Submitted="submitted",t.Underpaid="underpaid",t.Aborted="aborted"})(jr||(jr={}));var Xd;(function(t){t.ERM1="ERM1",t.ERV1="ERV1",t.ERN1="ERN1",t.ERC1="ERC1",t.ERC2="ERC2"})(Xd||(Xd={}));async function Vy(t){const e=`${t}/capabilities`;try{const n=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return await n.json()}catch{throw new Error("Failed to fetch capabilities.")}}async function Gy(t,e,n,r){const s=`${t}/quote`;try{const i=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({srcChain:fn(e),dstChain:fn(n),relayInstructions:r})});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return await i.json()}catch{throw new Error("Failed to fetch signed quote.")}}async function Yy(t,e,n){const r=`${t}/status/tx`;try{const s=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({txHash:e,chainId:fn(n)})});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return await s.json()}catch{throw new Error(`Failed to fetch status for txHash: ${e}.`)}}function B0(t,e){return function(){return t.apply(e,arguments)}}const{toString:Xy}=Object.prototype,{getPrototypeOf:ll}=Object,Fo=(t=>e=>{const n=Xy.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Mn=t=>(t=t.toLowerCase(),e=>Fo(e)===t),To=t=>e=>typeof e===t,{isArray:bs}=Array,Ks=To("undefined");function Zy(t){return t!==null&&!Ks(t)&&t.constructor!==null&&!Ks(t.constructor)&&nn(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const x0=Mn("ArrayBuffer");function Jy(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&x0(t.buffer),e}const Qy=To("string"),nn=To("function"),C0=To("number"),Io=t=>t!==null&&typeof t=="object",eg=t=>t===!0||t===!1,Pi=t=>{if(Fo(t)!=="object")return!1;const e=ll(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},tg=Mn("Date"),ng=Mn("File"),rg=Mn("Blob"),sg=Mn("FileList"),ig=t=>Io(t)&&nn(t.pipe),og=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||nn(t.append)&&((e=Fo(t))==="formdata"||e==="object"&&nn(t.toString)&&t.toString()==="[object FormData]"))},ag=Mn("URLSearchParams"),cg=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function oi(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),bs(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let a;for(r=0;r<o;r++)a=i[r],e.call(null,t[a],a,t)}}function S0(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}const D0=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Ne.global,v0=t=>!Ks(t)&&t!==D0;function bc(){const{caseless:t}=v0(this)&&this||{},e={},n=(r,s)=>{const i=t&&S0(e,s)||s;Pi(e[i])&&Pi(r)?e[i]=bc(e[i],r):Pi(r)?e[i]=bc({},r):bs(r)?e[i]=r.slice():e[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&oi(arguments[r],n);return e}const lg=(t,e,n,{allOwnKeys:r}={})=>(oi(e,(s,i)=>{n&&nn(s)?t[i]=B0(s,n):t[i]=s},{allOwnKeys:r}),t),dg=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),ug=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},fg=(t,e,n,r)=>{let s,i,o;const a={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),i=s.length;i-- >0;)o=s[i],(!r||r(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&ll(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},hg=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},mg=t=>{if(!t)return null;if(bs(t))return t;let e=t.length;if(!C0(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},bg=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&ll(Uint8Array)),pg=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let s;for(;(s=r.next())&&!s.done;){const i=s.value;e.call(t,i[0],i[1])}},yg=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},gg=Mn("HTMLFormElement"),wg=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Zd=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Eg=Mn("RegExp"),k0=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};oi(n,(s,i)=>{e(s,i,t)!==!1&&(r[i]=s)}),Object.defineProperties(t,r)},Ag=t=>{k0(t,(e,n)=>{if(nn(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];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 '"+n+"'")})}})},Bg=(t,e)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return bs(t)?r(t):r(String(t).split(e)),n},xg=()=>{},Cg=(t,e)=>(t=+t,Number.isFinite(t)?t:e),va="abcdefghijklmnopqrstuvwxyz",Jd="0123456789",F0={DIGIT:Jd,ALPHA:va,ALPHA_DIGIT:va+va.toUpperCase()+Jd},Sg=(t=16,e=F0.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function Dg(t){return!!(t&&nn(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const vg=t=>{const e=new Array(10),n=(r,s)=>{if(Io(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[s]=r;const i=bs(r)?[]:{};return oi(r,(o,a)=>{const l=n(o,s+1);!Ks(l)&&(i[a]=l)}),e[s]=void 0,i}}return r};return n(t,0)},kg=Mn("AsyncFunction"),Fg=t=>t&&(Io(t)||nn(t))&&nn(t.then)&&nn(t.catch),V={isArray:bs,isArrayBuffer:x0,isBuffer:Zy,isFormData:og,isArrayBufferView:Jy,isString:Qy,isNumber:C0,isBoolean:eg,isObject:Io,isPlainObject:Pi,isUndefined:Ks,isDate:tg,isFile:ng,isBlob:rg,isRegExp:Eg,isFunction:nn,isStream:ig,isURLSearchParams:ag,isTypedArray:bg,isFileList:sg,forEach:oi,merge:bc,extend:lg,trim:cg,stripBOM:dg,inherits:ug,toFlatObject:fg,kindOf:Fo,kindOfTest:Mn,endsWith:hg,toArray:mg,forEachEntry:pg,matchAll:yg,isHTMLForm:gg,hasOwnProperty:Zd,hasOwnProp:Zd,reduceDescriptors:k0,freezeMethods:Ag,toObjectSet:Bg,toCamelCase:wg,noop:xg,toFiniteNumber:Cg,findKey:S0,global:D0,isContextDefined:v0,ALPHABET:F0,generateString:Sg,isSpecCompliantForm:Dg,toJSONObject:vg,isAsyncFn:kg,isThenable:Fg};function Ae(t,e,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}V.inherits(Ae,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:V.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const T0=Ae.prototype,I0={};["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(t=>{I0[t]={value:t}});Object.defineProperties(Ae,I0);Object.defineProperty(T0,"isAxiosError",{value:!0});Ae.from=(t,e,n,r,s,i)=>{const o=Object.create(T0);return V.toFlatObject(t,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Ae.call(o,t.message,e,n,r,s),o.cause=t,o.name=t.name,i&&Object.assign(o,i),o};const Tg=null;function pc(t){return V.isPlainObject(t)||V.isArray(t)}function U0(t){return V.endsWith(t,"[]")?t.slice(0,-2):t}function Qd(t,e,n){return t?t.concat(e).map(function(s,i){return s=U0(s),!n&&i?"["+s+"]":s}).join(n?".":""):e}function Ig(t){return V.isArray(t)&&!t.some(pc)}const Ug=V.toFlatObject(V,{},null,function(e){return/^is[A-Z]/.test(e)});function Uo(t,e,n){if(!V.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=V.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(I,x){return!V.isUndefined(x[I])});const r=n.metaTokens,s=n.visitor||m,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&V.isSpecCompliantForm(e);if(!V.isFunction(s))throw new TypeError("visitor must be a function");function f(F){if(F===null)return"";if(V.isDate(F))return F.toISOString();if(!l&&V.isBlob(F))throw new Ae("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(F)||V.isTypedArray(F)?l&&typeof Blob=="function"?new Blob([F]):Ne.Buffer.from(F):F}function m(F,I,x){let E=F;if(F&&!x&&typeof F=="object"){if(V.endsWith(I,"{}"))I=r?I:I.slice(0,-2),F=JSON.stringify(F);else if(V.isArray(F)&&Ig(F)||(V.isFileList(F)||V.endsWith(I,"[]"))&&(E=V.toArray(F)))return I=U0(I),E.forEach(function(k,P){!(V.isUndefined(k)||k===null)&&e.append(o===!0?Qd([I],P,i):o===null?I:I+"[]",f(k))}),!1}return pc(F)?!0:(e.append(Qd(x,I,i),f(F)),!1)}const p=[],C=Object.assign(Ug,{defaultVisitor:m,convertValue:f,isVisitable:pc});function w(F,I){if(!V.isUndefined(F)){if(p.indexOf(F)!==-1)throw Error("Circular reference detected in "+I.join("."));p.push(F),V.forEach(F,function(E,_){(!(V.isUndefined(E)||E===null)&&s.call(e,E,V.isString(_)?_.trim():_,I,C))===!0&&w(E,I?I.concat(_):[_])}),p.pop()}}if(!V.isObject(t))throw new TypeError("data must be an object");return w(t),e}function eu(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function dl(t,e){this._pairs=[],t&&Uo(t,this,e)}const _0=dl.prototype;_0.append=function(e,n){this._pairs.push([e,n])};_0.toString=function(e){const n=e?function(r){return e.call(this,r,eu)}:eu;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function _g(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function M0(t,e,n){if(!e)return t;const r=n&&n.encode||_g,s=n&&n.serialize;let i;if(s?i=s(e,n):i=V.isURLSearchParams(e)?e.toString():new dl(e,n).toString(r),i){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class tu{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,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){V.forEach(this.handlers,function(r){r!==null&&e(r)})}}const R0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Mg=typeof URLSearchParams<"u"?URLSearchParams:dl,Rg=typeof FormData<"u"?FormData:null,Wg=typeof Blob<"u"?Blob:null,Pg=(()=>{let t;return typeof navigator<"u"&&((t=navigator.product)==="ReactNative"||t==="NativeScript"||t==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Lg=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Fn={classes:{URLSearchParams:Mg,FormData:Rg,Blob:Wg},isStandardBrowserEnv:Pg,isStandardBrowserWebWorkerEnv:Lg,protocols:["http","https","file","blob","url","data"]};function Og(t,e){return Uo(t,new Fn.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return Fn.isNode&&V.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function Ng(t){return V.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function zg(t){const e={},n=Object.keys(t);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],e[i]=t[i];return e}function W0(t){function e(n,r,s,i){let o=n[i++];const a=Number.isFinite(+o),l=i>=n.length;return o=!o&&V.isArray(s)?s.length:o,l?(V.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!V.isObject(s[o]))&&(s[o]=[]),e(n,r,s[o],i)&&V.isArray(s[o])&&(s[o]=zg(s[o])),!a)}if(V.isFormData(t)&&V.isFunction(t.entries)){const n={};return V.forEachEntry(t,(r,s)=>{e(Ng(r),s,n,0)}),n}return null}const Hg={"Content-Type":void 0};function qg(t,e,n){if(V.isString(t))try{return(e||JSON.parse)(t),V.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const ps={transitional:R0,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=V.isObject(e);if(i&&V.isHTMLForm(e)&&(e=new FormData(e)),V.isFormData(e))return s&&s?JSON.stringify(W0(e)):e;if(V.isArrayBuffer(e)||V.isBuffer(e)||V.isStream(e)||V.isFile(e)||V.isBlob(e))return e;if(V.isArrayBufferView(e))return e.buffer;if(V.isURLSearchParams(e))return n.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 Og(e,this.formSerializer).toString();if((a=V.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Uo(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),qg(e)):e}],transformResponse:[function(e){const n=this.transitional||ps.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(e&&V.isString(e)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?Ae.from(a,Ae.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:Fn.classes.FormData,Blob:Fn.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};V.forEach(["delete","get","head"],function(e){ps.headers[e]={}});V.forEach(["post","put","patch"],function(e){ps.headers[e]=V.merge(Hg)});const Kg=V.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"]),$g=t=>{const e={};let n,r,s;return t&&t.split(`
7
+ `).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||e[n]&&Kg[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},nu=Symbol("internals");function Ss(t){return t&&String(t).trim().toLowerCase()}function Li(t){return t===!1||t==null?t:V.isArray(t)?t.map(Li):String(t)}function jg(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const Vg=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ka(t,e,n,r,s){if(V.isFunction(r))return r.call(this,e,n);if(s&&(e=n),!!V.isString(e)){if(V.isString(r))return e.indexOf(r)!==-1;if(V.isRegExp(r))return r.test(e)}}function Gg(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Yg(t,e){const n=V.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{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,n,r){const s=this;function i(a,l,f){const m=Ss(l);if(!m)throw new Error("header name must be a non-empty string");const p=V.findKey(s,m);(!p||s[p]===void 0||f===!0||f===void 0&&s[p]!==!1)&&(s[p||l]=Li(a))}const o=(a,l)=>V.forEach(a,(f,m)=>i(f,m,l));return V.isPlainObject(e)||e instanceof this.constructor?o(e,n):V.isString(e)&&(e=e.trim())&&!Vg(e)?o($g(e),n):e!=null&&i(n,e,r),this}get(e,n){if(e=Ss(e),e){const r=V.findKey(this,e);if(r){const s=this[r];if(!n)return s;if(n===!0)return jg(s);if(V.isFunction(n))return n.call(this,s,r);if(V.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Ss(e),e){const r=V.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||ka(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let s=!1;function i(o){if(o=Ss(o),o){const a=V.findKey(r,o);a&&(!n||ka(r,r[a],a,n))&&(delete r[a],s=!0)}}return V.isArray(e)?e.forEach(i):i(e),s}clear(e){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!e||ka(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){const n=this,r={};return V.forEach(this,(s,i)=>{const o=V.findKey(r,i);if(o){n[o]=Li(s),delete n[i];return}const a=e?Gg(i):String(i).trim();a!==i&&delete n[i],n[a]=Li(s),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return V.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=e&&V.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
8
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[nu]=this[nu]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=Ss(o);r[a]||(Yg(s,o),r[a]=!0)}return V.isArray(e)?e.forEach(i):i(e),this}};rn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);V.freezeMethods(rn.prototype);V.freezeMethods(rn);function Fa(t,e){const n=this||ps,r=e||n,s=rn.from(r.headers);let i=r.data;return V.forEach(t,function(a){i=a.call(n,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function P0(t){return!!(t&&t.__CANCEL__)}function ai(t,e,n){Ae.call(this,t??"canceled",Ae.ERR_CANCELED,e,n),this.name="CanceledError"}V.inherits(ai,Ae,{__CANCEL__:!0});function Xg(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Ae("Request failed with status code "+n.status,[Ae.ERR_BAD_REQUEST,Ae.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Zg=Fn.isStandardBrowserEnv?function(){return{write:function(n,r,s,i,o,a){const l=[];l.push(n+"="+encodeURIComponent(r)),V.isNumber(s)&&l.push("expires="+new Date(s).toGMTString()),V.isString(i)&&l.push("path="+i),V.isString(o)&&l.push("domain="+o),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Jg(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Qg(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function L0(t,e){return t&&!Jg(e)?Qg(t,e):e}const e2=Fn.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function s(i){let o=i;return e&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(o){const a=V.isString(o)?s(o):o;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function t2(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function n2(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s=0,i=0,o;return e=e!==void 0?e:1e3,function(l){const f=Date.now(),m=r[i];o||(o=f),n[s]=l,r[s]=f;let p=i,C=0;for(;p!==s;)C+=n[p++],p=p%t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),f-o<e)return;const w=m&&f-m;return w?Math.round(C*1e3/w):void 0}}function ru(t,e){let n=0;const r=n2(50,250);return s=>{const i=s.loaded,o=s.lengthComputable?s.total:void 0,a=i-n,l=r(a),f=i<=o;n=i;const m={loaded:i,total:o,progress:o?i/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&f?(o-i)/l:void 0,event:s};m[e?"download":"upload"]=!0,t(m)}}const r2=typeof XMLHttpRequest<"u",s2=r2&&function(t){return new Promise(function(n,r){let s=t.data;const i=rn.from(t.headers).normalize(),o=t.responseType;let a;function l(){t.cancelToken&&t.cancelToken.unsubscribe(a),t.signal&&t.signal.removeEventListener("abort",a)}V.isFormData(s)&&(Fn.isStandardBrowserEnv||Fn.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.setContentType("multipart/form-data;",!1));let f=new XMLHttpRequest;if(t.auth){const w=t.auth.username||"",F=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(w+":"+F))}const m=L0(t.baseURL,t.url);f.open(t.method.toUpperCase(),M0(m,t.params,t.paramsSerializer),!0),f.timeout=t.timeout;function p(){if(!f)return;const w=rn.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),I={data:!o||o==="text"||o==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:w,config:t,request:f};Xg(function(E){n(E),l()},function(E){r(E),l()},I),f=null}if("onloadend"in f?f.onloadend=p:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(p)},f.onabort=function(){f&&(r(new Ae("Request aborted",Ae.ECONNABORTED,t,f)),f=null)},f.onerror=function(){r(new Ae("Network Error",Ae.ERR_NETWORK,t,f)),f=null},f.ontimeout=function(){let F=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const I=t.transitional||R0;t.timeoutErrorMessage&&(F=t.timeoutErrorMessage),r(new Ae(F,I.clarifyTimeoutError?Ae.ETIMEDOUT:Ae.ECONNABORTED,t,f)),f=null},Fn.isStandardBrowserEnv){const w=(t.withCredentials||e2(m))&&t.xsrfCookieName&&Zg.read(t.xsrfCookieName);w&&i.set(t.xsrfHeaderName,w)}s===void 0&&i.setContentType(null),"setRequestHeader"in f&&V.forEach(i.toJSON(),function(F,I){f.setRequestHeader(I,F)}),V.isUndefined(t.withCredentials)||(f.withCredentials=!!t.withCredentials),o&&o!=="json"&&(f.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&f.addEventListener("progress",ru(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",ru(t.onUploadProgress)),(t.cancelToken||t.signal)&&(a=w=>{f&&(r(!w||w.type?new ai(null,t,f):w),f.abort(),f=null)},t.cancelToken&&t.cancelToken.subscribe(a),t.signal&&(t.signal.aborted?a():t.signal.addEventListener("abort",a)));const C=t2(m);if(C&&Fn.protocols.indexOf(C)===-1){r(new Ae("Unsupported protocol "+C+":",Ae.ERR_BAD_REQUEST,t));return}f.send(s||null)})},Oi={http:Tg,xhr:s2};V.forEach(Oi,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const i2={getAdapter:t=>{t=V.isArray(t)?t:[t];const{length:e}=t;let n,r;for(let s=0;s<e&&(n=t[s],!(r=V.isString(n)?Oi[n.toLowerCase()]:n));s++);if(!r)throw r===!1?new Ae(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(V.hasOwnProp(Oi,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!V.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Oi};function Ta(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ai(null,t)}function su(t){return Ta(t),t.headers=rn.from(t.headers),t.data=Fa.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),i2.getAdapter(t.adapter||ps.adapter)(t).then(function(r){return Ta(t),r.data=Fa.call(t,t.transformResponse,r),r.headers=rn.from(r.headers),r},function(r){return P0(r)||(Ta(t),r&&r.response&&(r.response.data=Fa.call(t,t.transformResponse,r.response),r.response.headers=rn.from(r.response.headers))),Promise.reject(r)})}const iu=t=>t instanceof rn?t.toJSON():t;function ss(t,e){e=e||{};const n={};function r(f,m,p){return V.isPlainObject(f)&&V.isPlainObject(m)?V.merge.call({caseless:p},f,m):V.isPlainObject(m)?V.merge({},m):V.isArray(m)?m.slice():m}function s(f,m,p){if(V.isUndefined(m)){if(!V.isUndefined(f))return r(void 0,f,p)}else return r(f,m,p)}function i(f,m){if(!V.isUndefined(m))return r(void 0,m)}function o(f,m){if(V.isUndefined(m)){if(!V.isUndefined(f))return r(void 0,f)}else return r(void 0,m)}function a(f,m,p){if(p in e)return r(f,m);if(p in t)return r(void 0,f)}const l={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:(f,m)=>s(iu(f),iu(m),!0)};return V.forEach(Object.keys(Object.assign({},t,e)),function(m){const p=l[m]||s,C=p(t[m],e[m],m);V.isUndefined(C)&&p!==a||(n[m]=C)}),n}const O0="1.4.0",ul={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{ul[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const ou={};ul.transitional=function(e,n,r){function s(i,o){return"[Axios v"+O0+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(e===!1)throw new Ae(s(o," has been removed"+(n?" in "+n:"")),Ae.ERR_DEPRECATED);return n&&!ou[o]&&(ou[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,o,a):!0}};function o2(t,e,n){if(typeof t!="object")throw new Ae("options must be an object",Ae.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const i=r[s],o=e[i];if(o){const a=t[i],l=a===void 0||o(a,i,t);if(l!==!0)throw new Ae("option "+i+" must be "+l,Ae.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ae("Unknown option "+i,Ae.ERR_BAD_OPTION)}}const yc={assertOptions:o2,validators:ul},Jn=yc.validators;let Br=class{constructor(e){this.defaults=e,this.interceptors={request:new tu,response:new tu}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=ss(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&yc.assertOptions(r,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean)},!1),s!=null&&(V.isFunction(s)?n.paramsSerializer={serialize:s}:yc.assertOptions(s,{encode:Jn.function,serialize:Jn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o;o=i&&V.merge(i.common,i[n.method]),o&&V.forEach(["delete","get","head","post","put","patch","common"],F=>{delete i[F]}),n.headers=rn.concat(o,i);const a=[];let l=!0;this.interceptors.request.forEach(function(I){typeof I.runWhen=="function"&&I.runWhen(n)===!1||(l=l&&I.synchronous,a.unshift(I.fulfilled,I.rejected))});const f=[];this.interceptors.response.forEach(function(I){f.push(I.fulfilled,I.rejected)});let m,p=0,C;if(!l){const F=[su.bind(this),void 0];for(F.unshift.apply(F,a),F.push.apply(F,f),C=F.length,m=Promise.resolve(n);p<C;)m=m.then(F[p++],F[p++]);return m}C=a.length;let w=n;for(p=0;p<C;){const F=a[p++],I=a[p++];try{w=F(w)}catch(x){I.call(this,x);break}}try{m=su.call(this,w)}catch(F){return Promise.reject(F)}for(p=0,C=f.length;p<C;)m=m.then(f[p++],f[p++]);return m}getUri(e){e=ss(this.defaults,e);const n=L0(e.baseURL,e.url);return M0(n,e.params,e.paramsSerializer)}};V.forEach(["delete","get","head","options"],function(e){Br.prototype[e]=function(n,r){return this.request(ss(r||{},{method:e,url:n,data:(r||{}).data}))}});V.forEach(["post","put","patch"],function(e){function n(r){return function(i,o,a){return this.request(ss(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Br.prototype[e]=n(),Br.prototype[e+"Form"]=n(!0)});let a2=class N0{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=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 ai(i,o,a),n(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 n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new N0(function(s){e=s}),cancel:e}}};function c2(t){return function(n){return t.apply(null,n)}}function l2(t){return V.isObject(t)&&t.isAxiosError===!0}const gc={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(gc).forEach(([t,e])=>{gc[e]=t});function z0(t){const e=new Br(t),n=B0(Br.prototype.request,e);return V.extend(n,Br.prototype,e,{allOwnKeys:!0}),V.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return z0(ss(t,s))},n}const Be=z0(ps);Be.Axios=Br;Be.CanceledError=ai;Be.CancelToken=a2;Be.isCancel=P0;Be.VERSION=O0;Be.toFormData=Uo;Be.AxiosError=Ae;Be.Cancel=Be.CanceledError;Be.all=function(e){return Promise.all(e)};Be.spread=c2;Be.isAxiosError=l2;Be.mergeConfig=ss;Be.AxiosHeaders=rn;Be.formToJSON=t=>W0(V.isHTMLForm(t)?new FormData(t):t);Be.HttpStatusCode=gc;Be.default=Be;const{Axios:Fw,AxiosError:Tw,CanceledError:Iw,isCancel:Uw,CancelToken:_w,VERSION:Mw,all:Rw,Cancel:Ww,isAxiosError:Pw,spread:Lw,toFormData:Ow,AxiosHeaders:Nw,HttpStatusCode:zw,formToJSON:Hw,mergeConfig:qw}=Be,Cn=60*1e3,H0={Mainnet:{api:"https://api.wormholescan.io",circleAPI:wd("Mainnet"),executorAPI:Sd("Mainnet"),chains:Sa("Mainnet")},Testnet:{api:"https://api.testnet.wormholescan.io",circleAPI:wd("Testnet"),executorAPI:Sd("Testnet"),chains:Sa("Testnet")},Devnet:{api:"http://guardian:7071",circleAPI:"",executorAPI:"",chains:Sa("Devnet")}};function q0(t,e){return Object.fromEntries(Object.entries(H0[t].chains).filter(([n,r])=>r.platform==e))}function d2(t,e){let n=H0[t];return e?fl(n,e):n}function u2(t,e,n){const r=q0(t,e);return n?fl(r,n):r}function fl(t,e){t||(t={});for(const[n,r]of Object.entries(e))typeof r=="object"&&!Array.isArray(r)?t[n]=fl(t[n],r):t[n]=r;return t}const f2=typeof Ne.process<"u";f2&&Ne.process.env.NETWORK;async function Rr(t,e,n=Cn,r){const s=Math.floor(n/e);let i=0;return new Promise((o,a)=>{t().then(l=>{if(l!==null){o(l);return}let f=setInterval(async()=>{if(i>=s){clearInterval(f),o(null);return}const m=await t();m!==null?(clearInterval(f),o(m)):r&&console.log(`Retrying ${r}, attempt ${i}/${s} `),i++},e)})})}const h2=2e3;var au;(function(t){t.complete="complete",t.pending_confirmations="pending_confirmations"})(au||(au={}));const m2=t=>({message:t.attestation,status:t.status});async function b2(t,e){var r;const n=`${t}/${e}`;try{const s=await Be.get(n),i=m2(s==null?void 0:s.data);return i.message==="PENDING"?null:i.message}catch(s){if(!s||typeof s=="object"&&(Be.isAxiosError(s)&&((r=s.response)==null?void 0:r.status)===404||"status"in s&&s.status===404))return null;throw s}}async function p2(t,e,n){return Rr(()=>b2(t,e),h2,n,"Circle:GetAttestation")}async function $s(t,e,n){if(!Jp(n))throw new Error("Invalid signer, not SignAndSendSigner or SignOnlySigner");return(await y2(e,async i=>cl(n)?n.signAndSend(i):t.sendWait(await n.sign(i)))).map(i=>({chain:t.chain,txid:i}))}async function y2(t,e){const n=[];let r=[];for await(const s of t)s.parallelizable?r.push(s):(r.length>0&&(n.push(...await e(r)),r=[]),n.push(...await e([s])));return r.length>0&&n.push(...await e(r)),n}class g2 extends Error{constructor(n){super(`Minimum transfer amount is ${po(n)}`);ie(this,"min");this.min=n}minAmount(){return this.min}}class w2 extends Error{constructor(n){super("Unable to fetch a quote");ie(this,"internalError");this.internalError=n}}class hl extends Error{constructor(e){super(e)}}exports.TransferState=void 0;(function(t){t[t.Failed=-1]="Failed",t[t.Created=0]="Created",t[t.SourceInitiated=1]="SourceInitiated",t[t.SourceFinalized=2]="SourceFinalized",t[t.InReview=3]="InReview",t[t.Attested=4]="Attested",t[t.Refunded=5]="Refunded",t[t.DestinationInitiated=6]="DestinationInitiated",t[t.DestinationQueued=7]="DestinationQueued",t[t.DestinationFinalized=8]="DestinationFinalized"})(exports.TransferState||(exports.TransferState={}));function ml(t){return t.state===exports.TransferState.SourceInitiated}function js(t){return t.state===exports.TransferState.SourceFinalized}function cu(t){return t.state===exports.TransferState.InReview}function Jr(t){return t.state===exports.TransferState.Attested}function E2(t){return t.state===exports.TransferState.Refunded}function bl(t){return t.state===exports.TransferState.DestinationInitiated}function A2(t){return t.state===exports.TransferState.DestinationQueued}function B2(t){return t.state===exports.TransferState.DestinationFinalized}function K0(t){return t.state<0}function lu(t){return K0(t)&&t.error instanceof hl}class Bt{constructor(e,n,r,s){ie(this,"wh");ie(this,"fromChain");ie(this,"toChain");ie(this,"_state");ie(this,"transfer");ie(this,"txids",[]);ie(this,"attestations");this._state=exports.TransferState.Created,this.wh=e,this.transfer=n,this.fromChain=r??e.getChain(n.from.chain),this.toChain=s??e.getChain(n.to.chain)}getTransferState(){return this._state}static async from(e,n,r=Cn,s,i){if(sy(n))return n={...n,...await Bt.destinationOverrides(e.getChain(n.from.chain),e.getChain(n.to.chain),n)},new Bt(e,n,s,i);let o;if(Ar(n))o=await Bt.fromWormholeMessageId(e,n,r);else if(u0(n))o=await Bt.fromTransaction(e,n,r,s);else if(Qi(n))o=await Bt.fromCircleMessage(e,n);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,n,r){const{chain:s,emitter:i}=n,o=await Bt.getTransferVaa(e,n),a=o.payload.mintRecipient,l=_i(e.network,o.payload.targetDomain),{wormholeRelayer:f}=e.config.chains[l].contracts.cctp;let m=!1;if(f){const w=sn.chainAddress(s,f).address.toUniversalAddress();m=o.payloadName==="TransferWithRelay"&&a.equals(w)}const p={from:{chain:n.chain,address:o.payload.caller},to:{chain:l,address:a},amount:o.payload.token.amount,automatic:m},C=new Bt(e,p);return C.attestations=[{id:{emitter:i,sequence:o.sequence,chain:s},attestation:o}],C._state=exports.TransferState.Attested,C}static async fromCircleMessage(e,n){const[r,s]=exports.CircleBridge.deserialize(At.decode(n)),{payload:i}=r,o=i.messageSender,a=i.mintRecipient,l=_i(e.network,r.sourceDomain),f=_i(e.network,r.destinationDomain),m={from:{chain:l,address:o},to:{chain:f,address:a},amount:i.amount,automatic:!1},p=new Bt(e,m);return p.attestations=[{id:{hash:s},attestation:{message:r}}],p._state=exports.TransferState.SourceInitiated,p}static async fromTransaction(e,n,r,s){const{chain:i,txid:o}=n;s=s??e.getChain(i);let a=[];try{a=await s.parseTransaction(o)}catch(f){if(!(f.message.includes("no bridge messages found")||f.message.includes("not found")))throw f}let l;if(a.length>0)l=await Bt.fromWormholeMessageId(e,a[0],r);else{const m=await(await s.getCircleBridge()).parseTransactionDetails(o),p={...m,automatic:!1};l=new Bt(e,p),l.attestations=[{id:m.id,attestation:{message:m.message}}]}return l._state=exports.TransferState.SourceInitiated,l.txids=[n],l}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:n})=>n)}async _fetchWormholeAttestation(e){let n=this.attestations??[];if(!n||n.length==0)throw new Error("No VAA details available");for(const r in n)n[r].attestation||(n[r].attestation=await Bt.getTransferVaa(this.wh,n[r].id,e));return this.attestations=n,n.map(r=>r.id)}async _fetchCircleAttestation(e){var r,s;let n=this.attestations??[];if(!n||n.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],l=await(await this.wh.getChain(this.transfer.from.chain).getCircleBridge()).parseTransactionDetails(i.txid);n=[{id:l.id,attestation:{message:l.message}}]}for(const i in n){const o=n[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");n[i].attestation.attestation=a}return this.attestations=n,n.map(i=>i.id)}async fetchAttestation(e){if(this._state<exports.TransferState.SourceInitiated)throw new Error("Invalid state transition in `fetchAttestation`");const n=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 n}async completeTransfer(e){var p;if(this._state<exports.TransferState.Attested)throw new Error("Invalid state transition in `finish`");if(this.transfer.automatic)throw this.attestations?this.attestations.find(w=>Ar(w.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 n=this.attestations.filter(C=>Qi(C.id));if(n.length>1)throw new Error(`Expected a single circle attestation, found ${n.length}`);const{id:r,attestation:s}=n[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(),l=sn.parseAddress(e.chain(),e.address()),f=a.redeem(l,i,o),m=await $s(this.toChain,f,e);return(p=this.txids)==null||p.push(...m),m.map(({txid:C})=>C)}}(function(t){async function e(f,m,p){let C;return m.automatic?C=(await f.getAutomaticCircleBridge()).transfer(m.from.address,{chain:m.to.chain,address:m.to.address},m.amount,m.nativeGas):C=(await f.getCircleBridge()).transfer(m.from.address,{chain:m.to.chain,address:m.to.address},m.amount),await $s(f,C,p)}t.transfer=e;async function*n(f,m,p=Cn,C,w){var x,E;const F=Date.now(),I=(_,k)=>Math.max(k-(Date.now()-_),0);if(C=C??f.getChain(m.from),w=w??f.getChain(m.to),ml(m)){if(m.originTxs.length===0)throw"Invalid state transition: no originating transactions";const _=m.originTxs[m.originTxs.length-1],k=await t.getTransferMessage(C,_.txid);m={...m,attestation:{id:k.id,attestation:{message:k.message}},state:exports.TransferState.SourceFinalized},yield m}if(js(m)){if(!m.attestation)throw"Invalid state transition: no attestation id";if(Ar(m.attestation.id)){let _=m.attestation.attestation?m.attestation.attestation:void 0;_||(_=await t.getTransferVaa(f,m.attestation.id,I(F,p)),m={...m,attestation:{id:m.attestation.id,attestation:_},state:exports.TransferState.Attested},yield m)}else if(Qi(m.attestation.id)){const _=await f.getCircleAttestation(m.attestation.id.hash,p),k=m.originTxs[m.originTxs.length-1],M=await(await C.getCircleBridge()).parseTransactionDetails(k.txid);_&&(m={...m,attestation:{id:m.attestation.id,attestation:{attestation:_,message:M.message}},state:exports.TransferState.Attested},yield m)}}if(Jr(m)||js(m)){if(!m.attestation)throw"Invalid state transition";if(Ar(m.attestation.id)){const _=await f.getTransactionStatus(m.attestation.id,I(F,p));if(_&&((E=(x=_.globalTx)==null?void 0:x.destinationTx)!=null&&E.txHash)){const{chainId:k,txHash:P}=_.globalTx.destinationTx;m={...m,destinationTxs:[{chain:us(k),txid:P}],state:exports.TransferState.DestinationInitiated},yield m}}}(Jr(m)||bl(m))&&(await t.isTransferComplete(w,m.attestation.attestation)&&(m={...m,state:exports.TransferState.DestinationFinalized,destinationTxs:[]}),yield m)}t.track=n;async function r(f,m,p){const C={...p};if(hn(m.chain)==="Solana"&&!C.automatic){const w=sn.parseAddress(m.chain,_s.get(m.network,m.chain));C.to=await m.getTokenAccount(C.to.address,w)}return C}t.destinationOverrides=r;async function s(f,m,p){if(!Os(m.network,m.chain))throw new Error(`Invalid destination chain ${m.chain} for Circle transfer`);const C=_s.get(m.network,m.chain);if(!C)throw"Invalid transfer, no USDC contract on destination";if(!Os(f.network,f.chain))throw new Error(`Invalid source chain ${f.chain} for Circle transfer`);const w=_s.get(f.network,f.chain);if(!w)throw"Invalid transfer, no USDC contract on source";const F=sn.chainAddress(m.chain,C),I=sn.chainAddress(f.chain,w),x=(f.chain==="Polygon"?2e3*200:Lc(f.chain))+zc,E=p.automatic?Ls(0,5,0):Ls(24,0,0);if(!p.automatic)return{sourceToken:{token:I,amount:p.amount},destinationToken:{token:F,amount:p.amount},eta:x,expires:E};let _=p.amount;const k=p.nativeGas?p.nativeGas:0n;_-=k;const M=await(await f.getAutomaticCircleBridge()).getRelayerFee(m.chain);_-=M;let $=0n;return p.nativeGas&&($=await(await m.getAutomaticCircleBridge()).nativeTokenAmount(k)),{sourceToken:{token:I,amount:p.amount},destinationToken:{token:F,amount:_},relayFee:{token:I,amount:M},destinationNativeGas:$,eta:x,expires:E}}t.quoteTransfer=s;async function i(f,m){if(!exports.CircleBridge.isCircleAttestation(m))throw new Error("Must check for completion with circle message");return await(await f.getCircleBridge()).isTransferCompleted(m.message)}t.isTransferComplete=i;async function o(f,m,p){const C=await f.getVaa(m,"AutomaticCircleBridge:TransferWithRelay",p);if(!C)throw new Error("No VAA available after timeout exhausted");return C}t.getTransferVaa=o;async function a(f,m){return await(await f.getCircleBridge()).parseTransactionDetails(m)}t.getTransferMessage=a;function l(f){var _,k;const{from:m,to:p}=f.transfer;let C={from:m.chain,to:p.chain,state:exports.TransferState.Created};const w=f.txids.filter(P=>P.chain===f.transfer.from.chain);w.length>0&&(C={...C,state:exports.TransferState.SourceInitiated,originTxs:w});const F=((_=f.attestations)==null?void 0:_.filter(P=>Ar(P.id)))??[],I=((k=f.attestations)==null?void 0:k.filter(P=>Qi(P.id)))??[],x=I.length>0?I[0]:F.length>0?F[0]:void 0;x&&x.id&&(C={...C,state:exports.TransferState.SourceFinalized,attestation:x},x.attestation&&(C={...C,state:exports.TransferState.Attested,attestation:{id:x.id,attestation:x.attestation}}));const E=f.txids.filter(P=>P.chain===f.transfer.to.chain);return E.length>0&&(C={...C,state:exports.TransferState.DestinationInitiated,destinationTxs:E}),C}t.getReceipt=l})(Bt||(Bt={}));const _o=2e3;async function $0(t,e){var l;const{chain:n,emitter:r,sequence:s}=e,i=fn(n),o=Qu("0x",r.toString()),a=`${t}/v1/signed_vaa/${i}/${o}/${s}`;try{const{data:{vaaBytes:f}}=await Be.get(a);return wo.decode(f)}catch(f){if(!f||typeof f=="object"&&(Be.isAxiosError(f)&&((l=f.response)==null?void 0:l.status)===404||"status"in f&&f.status===404))return null;throw f}}async function x2(t,e,n){return await Rr(()=>$0(t,e),_o,n,"Wormholescan:GetVaaBytes")}async function C2(t,e,n){const r=await $0(t,e);return r?Zr(n,r):null}async function S2(t,e,n,r){return await Rr(()=>C2(t,e,n),_o,r,"Wormholescan:GetVaaBytes")}async function D2(t,e){var l;const{chain:n,emitter:r,sequence:s}=e,i=fn(n),o=r.toUniversalAddress().toString(),a=`${t}/api/v1/transactions/${i}/${o}/${s}`;try{return(await Be.get(a)).data}catch(f){if(!f||typeof f=="object"&&(Be.isAxiosError(f)&&((l=f.response)==null?void 0:l.status)===404||"status"in f&&f.status===404))return null;throw f}}async function v2(t,e,n){return await Rr(()=>D2(t,e),_o,n,"Wormholescan:GetTransactionStatus")}async function k2(t,e){var r;const n=`${t}/api/v1/vaas?txHash=${e}`;try{const s=await Be.get(n);if(s.data.data.length>0)return s.data.data[0]}catch(s){if(!s||typeof s=="object"&&(Be.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 du(t,e,n,r){const i=await Rr(()=>k2(t,e),_o,r,"Wormholescan:GetVaaByTxHash");return i?Zr(n,wo.decode(i.vaa)):null}async function F2(t,e,n=50,r=0){var i;const s=`${t}/api/v1/transactions?address=${e}&pageSize=${n}&page=${r}`;try{const o=await Be.get(s);if(o.data.transactions.length>0)return o.data.transactions}catch(o){if(!o||typeof o=="object"&&(Be.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 T2(t){const e=`${t}/v1/governor/token_list`;try{const n=await Be.get(e);if(n.data&&n.data.entries.length>0)return n.data.entries.reduce((r,s)=>{const i=us(s.originChainId);return r[i]=r[i]||{},r[i][s.originAddress]=s.price,r},{})}catch{}return null}async function I2(t){const e=`${t}/v1/governor/available_notional_by_chain`;try{const n=await Be.get(e);if(n.data&&n.data.entries.length>0)return n.data.entries.reduce((r,s)=>{const i=s.bigTransactionSize==="0"?void 0:Is(Ti(s.bigTransactionSize,2));return r[us(s.chainId)]={available:Is(Ti(s.remainingAvailableNotional,2)),limit:Is(Ti(s.notionalLimit,2)),maxSize:i},r},{})}catch{}return null}async function U2(t,e){const{chain:n,emitter:r,sequence:s}=e,i=fn(n),o=r.toUniversalAddress().toString(),a=`${t}/v1/governor/is_vaa_enqueued/${i}/${o}/${s}`;return(await Be.get(a)).data.isEnqueued}class Ye{constructor(e,n,r,s){ie(this,"wh");ie(this,"fromChain");ie(this,"toChain");ie(this,"_state");ie(this,"transfer");ie(this,"txids",[]);ie(this,"attestations");this._state=exports.TransferState.Created,this.wh=e,this.transfer=n,this.fromChain=r??e.getChain(n.from.chain),this.toChain=s??e.getChain(n.to.chain)}getTransferState(){return this._state}static async from(e,n,r=6e3,s,i){if(my(n))return s=s??e.getChain(n.from.chain),i=i??e.getChain(n.to.chain),Ye.validateTransferDetails(e,n,s,i),n=await Ye.destinationOverrides(s,i,n),new Ye(e,n,s,i);let o;if(Ar(n))o=await Ye.fromIdentifier(e,n,r);else if(u0(n))o=await Ye.fromTransaction(e,n,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,n,r){const s=await Ye.getTransferVaa(e,n,r);if(!s)throw new Error("VAA not found");const i=s.protocolName;let o={chain:s.emitterChain,address:s.emitterAddress},{token:a,to:l}=s.payload,f;if(a.chain===o.chain)f=await e.getTokenNativeAddress(o.chain,a.chain,a.address);else{const x=await(await(await e.getChain(o.chain)).getTokenBridge()).getWrappedAsset(a);f=or(o.chain,x.toString())}const m=await e.getDecimals(o.chain,f),p=Kr(zn(a.amount,Math.min(m,Ye.MAX_DECIMALS)),m);(i==="AutomaticTokenBridge"||i==="ExecutorTokenBridge")&&(o={chain:s.emitterChain,address:s.payload.from},l={chain:s.payload.to.chain,address:s.payload.payload.targetRecipient});const C={token:a,amount:kt(p),from:o,to:l,protocol:i,nativeGas:i==="AutomaticTokenBridge"?s.payload.payload.toNativeTokenAmount:0n},w=new Ye(e,C);return w.attestations=[{id:n,attestation:s}],w._state=exports.TransferState.Attested,w}static async fromTransaction(e,n,r,s){s=s??e.getChain(n.chain);const i=await Ye.getTransferMessage(s,n.txid,r),o=await Ye.fromIdentifier(e,i,r);return o.txids=[n],o}async initiateTransfer(e){if(this._state!==exports.TransferState.Created)throw new Error("Invalid state transition in `initiateTransfer`");return this.txids=await Ye.transfer(this.fromChain,this.transfer,e),this._state=exports.TransferState.SourceInitiated,this.txids.map(({txid:n})=>n)}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 n=this.txids[this.txids.length-1],r=await Ye.getTransferMessage(this.fromChain,n.txid,e);this.attestations=[{id:r}]}for(const n in this.attestations){if(this.attestations[n].attestation)continue;const r=await Ye.getTransferVaa(this.wh,this.attestations[n].id,e);if(!r)throw new Error("VAA not found");this.attestations[n].attestation=r}if(this._state=exports.TransferState.Attested,this.attestations.length>0){const{attestation:n}=this.attestations[0];await Ye.isTransferComplete(this.toChain,n)&&(this._state=exports.TransferState.DestinationFinalized)}return this.attestations.map(n=>n.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:n}=this.attestations[0];if(!n)throw new Error(`No VAA found for ${this.attestations[0].id.sequence}`);const r=await Ye.redeem(this.toChain,n,e);return this.txids.push(...r),this._state=exports.TransferState.DestinationInitiated,r.map(({txid:s})=>s)}}(function(t){t.MAX_DECIMALS=8;async function e(x,E,_){const k=or(_.chain(),_.address()),P=ko(E.token)?E.token.address:E.token;let M;if(E.protocol==="AutomaticTokenBridge")M=(await x.getAutomaticTokenBridge()).transfer(k,E.to,P,E.amount,E.nativeGas);else if(E.protocol==="TokenBridge")M=(await x.getTokenBridge()).transfer(k,E.to,P,E.amount,E.payload);else if(E.protocol==="ExecutorTokenBridge"){if(!E.executorQuote)throw new Error("ExecutorTokenBridge transfer requires an executorQuote");const $=E.executorQuote.relayInstructions.requests.find(Y=>Y.request.type==="GasDropOffInstruction");$&&$.request.type==="GasDropOffInstruction"&&$.request.recipient.equals(St.ZERO)&&($.request.recipient=E.to.address.toUniversalAddress()),M=(await x.getExecutorTokenBridge()).transfer(k,E.to,P,E.amount,E.executorQuote,E.referrerFee)}else throw new Error("Unknown token transfer protocol");return $s(x,M,_)}t.transfer=e;async function n(x,E,_){const k=or(_.chain(),_.address()),P=E.protocolName==="AutomaticTokenBridge"?(await x.getAutomaticTokenBridge()).redeem(k,E):E.protocolName==="ExecutorTokenBridge"?(await x.getExecutorTokenBridge()).redeem(k,E):(await x.getTokenBridge()).redeem(k,E);return $s(x,P,_)}t.redeem=n;async function*r(x,E,_=Cn,k,P){var G,Y,L,j;const M=Date.now(),$=(O,q)=>Math.max(q-(Date.now()-O),0);if(k=k??x.getChain(E.from),ml(E)){if(E.originTxs.length===0)throw"Origin transactions required to fetch message id";const{txid:O}=E.originTxs[E.originTxs.length-1],q=await t.getTransferMessage(k,O,$(M,_));E={...E,state:exports.TransferState.SourceFinalized,attestation:{id:q}},yield E}if(js(E)||cu(E)){if(!E.attestation.id)throw"Attestation id required to fetch attestation";const{id:O}=E.attestation,q=await t.getTransferVaa(x,O,$(M,_));throw q?(E={...E,attestation:{id:O,attestation:q},state:exports.TransferState.Attested},yield E):await t.isTransferEnqueued(x,O)&&(E={...E,state:exports.TransferState.InReview},yield E),new Error("Attestation not found")}if(Jr(E)||js(E)||cu(E)||lu(E)){if(!((G=E.attestation)!=null&&G.id))throw"Attestation id required to fetch redeem tx";const{id:O}=E.attestation,q=await x.getTransactionStatus(O,$(M,_));if(q&&((L=(Y=q.globalTx)==null?void 0:Y.destinationTx)!=null&&L.txHash)){const{chainId:B,txHash:c}=q.globalTx.destinationTx;E={...E,destinationTxs:[{chain:us(B),txid:c}],state:exports.TransferState.DestinationInitiated,attestation:E.attestation}}yield E}if(Jr(E)||bl(E)||lu(E)){if(!((j=E.attestation)!=null&&j.attestation))throw"Signed Attestation required to check for redeem";if(E.attestation.attestation.payloadName==="AttestMeta")throw new Error("Unable to track an AttestMeta receipt");await t.isTransferComplete(P??x.getChain(E.attestation.attestation.payload.to.chain),E.attestation.attestation)&&(E={...E,state:exports.TransferState.DestinationFinalized,attestation:E.attestation}),yield E}if(Jr(E)&&E.attestation.attestation.protocolName==="ExecutorTokenBridge"){const[O]=await x.getExecutorTxStatus(E.originTxs.at(-1).txid,E.from);if(!O)throw new Error("No transaction status found");const q=O.status;(q===jr.Failed||q===jr.Underpaid||q===jr.Unsupported||q===jr.Aborted)&&(E={...E,state:exports.TransferState.Failed,error:new hl(`Relay failed with status: ${q}`)},yield E)}yield E}t.track=r;function s(x){const{transfer:E}=x,_=E.from.chain,k=E.to.chain;let P={from:_,to:k,state:exports.TransferState.Created};const M=x.txids.filter(L=>L.chain===E.from.chain);M.length>0&&(P={...P,state:exports.TransferState.SourceInitiated,originTxs:M});const $=x.attestations&&x.attestations.length>0?x.attestations[0]:void 0,G=$&&$.id?{id:$.id,attestation:$.attestation}:void 0;G&&G.id&&(P={...P,state:exports.TransferState.SourceFinalized,attestation:{id:G.id}},G.attestation&&(P={...P,state:exports.TransferState.Attested,attestation:{id:G.id,attestation:G.attestation}}));const Y=x.txids.filter(L=>L.chain===E.to.chain);return Y.length>0&&(P={...P,state:exports.TransferState.DestinationFinalized,destinationTxs:Y}),P}t.getReceipt=s;async function i(x,E,_){let k;const P=await x.getTokenBridge();if(Pt(_.address)){const G=await P.getWrappedNative();k={chain:_.chain,address:await P.getTokenUniversalAddress(G)}}else try{let G;St.instanceof(_.address)?G=await P.getWrappedAsset(_):G=_.address,k=await P.getOriginalAsset(G)}catch(G){if(!G.message.includes("not a wrapped asset"))throw G;let Y;St.instanceof(_.address)?Y=await P.getTokenNativeAddress(x.chain,_.address):Y=_.address,k={chain:_.chain,address:await P.getTokenUniversalAddress(Y)}}const M=await E.getTokenBridge();if(k.chain===E.chain){const G=await M.getTokenNativeAddress(k.chain,k.address),Y=await M.getWrappedNative();return In({chain:E.chain,address:Y})===In({chain:E.chain,address:G})?{chain:E.chain,address:"native"}:{chain:E.chain,address:G}}const $=await M.getWrappedAsset(k);return{chain:E.chain,address:$}}t.lookupDestinationToken=i;async function o(x,E){return(E.protocolName==="AutomaticTokenBridge"||E.protocolName==="ExecutorTokenBridge")&&(E=Zr("TokenBridge:TransferWithPayload",Wi(E))),(await x.getTokenBridge()).isTransferCompleted(E)}t.isTransferComplete=o;async function a(x,E,_){const k=await sn.parseMessageFromTx(x,E,_);if(k.length!==1)throw new Error("Expected a single Wormhole Message, got: "+k.length);return k[0]}t.getTransferMessage=a;async function l(x,E,_){const k=await x.getVaa(E,hc.getTransferDiscriminator(),_);if(!k)return null;if(k.payloadName==="TransferWithPayload"){const{chain:P,address:M}=k.payload.to,{tokenBridgeRelayer:$}=x.config.chains[P].contracts,G=$?n0(P,$):null;if(G&&M.equals(G))return Zr("AutomaticTokenBridge:TransferWithRelay",Wi(k));try{return Zr("ExecutorTokenBridge:TransferWithExecutorRelay",Wi(k))}catch{}}return k}t.getTransferVaa=l;async function f(x,E){return await x.getIsVaaEnqueued(E)}t.isTransferEnqueued=f;function m(x,E,_,k){if(E.amount===0n)throw new Error("Amount cannot be 0");if(E.from.chain===E.to.chain)throw new Error("Cannot transfer to the same chain");if(_=_??x.getChain(E.from.chain),k=k??x.getChain(E.to.chain),E.protocol==="AutomaticTokenBridge"){if(!_.supportsAutomaticTokenBridge())throw new Error(`Automatic Token Bridge not supported on ${E.from.chain}`);if(!k.supportsAutomaticTokenBridge())throw new Error(`Automatic Token Bridge not supported on ${E.to.chain}`);const P=E.nativeGas??0n;if(P>E.amount)throw new Error(`Native gas amount > amount (${P} > ${E.amount})`)}else if(E.protocol==="TokenBridge"){if(!_.supportsTokenBridge())throw new Error(`Token Bridge not supported on ${E.from.chain}`);if(!k.supportsTokenBridge())throw new Error(`Token Bridge not supported on ${E.to.chain}`)}else if(E.protocol==="ExecutorTokenBridge"){if(!_.supportsExecutorTokenBridge())throw new Error(`Token Bridge Executor not supported on ${E.from.chain}`);if(!k.supportsExecutorTokenBridge())throw new Error(`Token Bridge Executor not supported on ${E.to.chain}`)}else throw new Error("Unknown token transfer protocol")}t.validateTransferDetails=m;async function p(x,E,_,k){const P=await E.getTokenBridge();let M;if(Pt(k.token.address))M=await P.getWrappedNative();else if(St.instanceof(k.token.address))try{M=await P.getWrappedAsset(k.token)}catch(Z){if(!Z.message.includes("not a wrapped asset"))throw Z;M=await P.getTokenNativeAddress(E.chain,k.token.address)}else M=k.token.address;sn.tokenId(E.chain,M.toString());const $=await E.getDecimals(M),G=zn(k.amount,$),Y=Ii(G,t.MAX_DECIMALS),[L,j]=await Promise.all([T2(x.config.api),I2(x.config.api)]),O=[];if(j!==null&&E.chain in j&&L!==null){let Z;if(Pt(k.token.address))Z={chain:E.chain,address:await P.getTokenUniversalAddress(M)};else try{Z=await P.getOriginalAsset(k.token.address)}catch(ee){if(!ee.message.includes("not a wrapped asset"))throw ee;Z={chain:E.chain,address:await P.getTokenUniversalAddress(M)}}if(Z.chain in L&&Z.address.toString()in L[Z.chain]){const ee=j[E.chain],le=L[Z.chain][Z.address.toString()]*Is(Y);ee.maxSize&&le>ee.maxSize&&O.push({type:"GovernorLimitWarning",reason:"ExceedsLargeTransferLimit"}),le>ee.available&&O.push({type:"GovernorLimitWarning",reason:"ExceedsRemainingNotional"})}}const q=await t.lookupDestinationToken(E,_,k.token),B=await _.getDecimals(q.address),c=Kr(Y,B),b=Lc(E.chain)+zc,y={sourceToken:{token:k.token,amount:kt(Y)},destinationToken:{token:q,amount:kt(c)},warnings:O.length>0?O:void 0,eta:b};if(k.protocol==="TokenBridge")return{...y,expires:Ls(24,0,0)};if(k.protocol==="ExecutorTokenBridge"){const Z=await w(x,E,_,k.gasLimit,k.msgValue,k.nativeGas),ee=Z.relayInstructions.requests.find(be=>be.request.type==="GasDropOffInstruction"),ve=(ee==null?void 0:ee.request.type)==="GasDropOffInstruction"?ee.request.dropOff:void 0;let le;if(k.referrerFee&&k.referrerFee.feeDbps>0n){const{feeDbps:be,referrer:ln}=k.referrerFee,xe=t.calculateReferrerFee(Y,be),Re=kt(xe.fee),Jt=kt(xe.remaining);if(Jt<=0n)throw new Error("Remaining amount after referrer fee is <= 0");le={feeDbps:be,feeAmount:Re,remainingAmount:Jt,referrer:ln}}return{...y,destinationToken:{token:q,amount:le!=null&&le.remainingAmount?kt(Kr(zn(le.remainingAmount,$),B)):kt(c)},expires:Z.signedQuote.quote.expiryTime,relayFee:{token:al(E.chain),amount:Z.estimatedCost},destinationNativeGas:ve,details:{executorQuote:Z,referrerFee:le}}}if(k.protocol!=="AutomaticTokenBridge")throw new Error("Unknown token transfer protocol");const v=await(await E.getAutomaticTokenBridge()).getRelayerFee(_.chain,M),U=Kr(Ii(zn(v,$),t.MAX_DECIMALS),B),W=k.nativeGas??0n,A=kt(Kr(Ii(zn(W,$),t.MAX_DECIMALS),B)),h=890880n;let T=0n;if(k.nativeGas){const Z=await _.getAutomaticTokenBridge(),[ee,ve]=await Promise.all([Z.maxSwapAmount(q.address),Z.nativeTokenAmount(q.address,A)]);if(A>ee)throw new Error(`Native gas amount exceeds maximum swap amount: ${ud(A,B)}>${ud(ee,B)}`);if(hn(_.chain)==="Solana"&&ve<h)throw new Error(`Native gas amount must be at least ${h} lamports`);T=ve}const se=kt(c)-A-kt(U);if(hn(q.chain)==="Solana"){const Z=await _.getNativeWrappedTokenId();if((Pt(q.address)||l0(q,Z))&&se<h)throw new Error(`Destination amount must be at least ${h} lamports`)}return{sourceToken:{token:k.token,amount:kt(Y)},destinationToken:{token:q,amount:se},relayFee:{token:q,amount:kt(U)},destinationNativeGas:T,warnings:O.length>0?O:void 0,eta:b,expires:Ls(0,5,0)}}t.quoteTransfer=p;async function C(x,E){const k=(await x.getExecutorCapabilities())[fn(E.chain)];if(!k)throw new Error(`No executor capabilities found for destination chain ${E.chain}`);return BigInt(k.gasDropOffLimit)}t.getExecutorGasDropOffLimit=C;async function w(x,E,_,k,P,M){const $=await x.getExecutorCapabilities();if(!$[fn(E.chain)])throw new Error(`No executor capabilities found for source chain ${E.chain}`);const Y=$[fn(_.chain)];if(!Y||!Y.requestPrefixes.includes("ERV1"))throw new Error(`No executor capabilities found for destination chain ${_.chain}`);const L=M??0n;if(L>BigInt(Y.gasDropOffLimit))throw new Error(`Native gas amount ${L} exceeds limit ${BigInt(Y.gasDropOffLimit)} for destination chain ${_.chain}`);const j=[];j.push({request:{type:"GasInstruction",gasLimit:k,msgValue:P}}),L>0n&&j.push({request:{type:"GasDropOffInstruction",dropOff:L,recipient:St.ZERO}});const O={requests:j},q=bn(E0,O),B=await x.getExecutorQuote(E.chain,_.chain,At.encode(q,!0));if(!B.estimatedCost)throw new Error("No estimated cost");const c=BigInt(B.estimatedCost);return{signedQuote:pn(A0,At.decode(B.signedQuote)),estimatedCost:c,relayInstructions:O}}t.getExecutorQuote=w;async function F(x,E,_){const k={..._};if(hn(_.to.chain)==="Solana"&&k.protocol==="TokenBridge"){const P=await t.lookupDestinationToken(x,E,k.token);if(Pt(P.address)){const M=await E.getNativeWrappedTokenId();k.to=await E.getTokenAccount(k.to.address,M.address)}else k.to=await E.getTokenAccount(k.to.address,P.address)}if(k.to.chain==="Sei"&&k.protocol==="TokenBridge"){if(k.to.chain==="Sei"&&k.payload)throw new Error("Arbitrary payloads unsupported for Sei");k.payload=Lt.encode(JSON.stringify({basic_recipient:{recipient:wo.encode(k.to.address.toString())}}));const P=E.config.contracts.translator;if(P===void 0||P==="")throw new Error("Unexpected empty translator address");k.to=sn.chainAddress(k.to.chain,P)}return k}t.destinationOverrides=F;function I(x,E){if(E>65535n)throw new Error("dBps exceeds max u16");const k=l1(x,E),P=kt(k),$=kt(x)-P;return{fee:k,remaining:zn($,x.decimals)}}t.calculateReferrerFee=I})(Ye||(Ye={}));function _2(t){if(t.length===0)return[];const{chain:e}=t[0];if(!t.every(n=>n.chain===e))throw new Error("Not every chain is equal");return Array.from(new Set(t.map(n=>In(n)))).map(n=>sn.tokenId(e,n))}async function M2(t,e,n){const r=In(e),s=t.config.tokenMap?fs.byAddress(t.config.tokenMap,r):void 0,i=s?s.symbol:void 0,o=Pt(e.address)?await t.getNativeWrappedTokenId():void 0;return n=n??await t.getDecimals(e.address),{id:e,decimals:n,wrapped:o,symbol:i}}class j0{constructor(e,n){ie(this,"wh");ie(this,"routeConstructors");ie(this,"inputTokenList");this.wh=e,this.routeConstructors=n}async supportedDestinationTokens(e,n,r){const[,s]=d0(n.network,n.chain,e),i=await Promise.all(this.routeConstructors.map(async o=>{if(!o.supportedNetworks().includes(n.network))return[];const l=o.supportedChains(n.network);if(!l.includes(n.chain)||!l.includes(r.chain))return[];try{return await o.supportedDestinationTokens(s,n,r)}catch{return[]}}));return _2(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=In(Pt(e.destination.id.address)?e.destination.wrapped:e.destination.id),o=(await r.supportedDestinationTokens(e.source.id,e.fromChain,e.toChain)).filter(a=>In(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,n,r){ie(this,"_network");ie(this,"_platforms");ie(this,"_chains");ie(this,"config");this._network=e,this.config=d2(e,r),this._chains=new Map,this._platforms=new Map;for(const s of n)this._platforms.set(s._platform,new s(e,this.config.chains))}get network(){return this._network}async circleTransfer(e,n,r,s,i,o){if(s&&i)throw new Error("Payload with automatic delivery is not supported");if(!Os(this.network,n.chain)||!Os(this.network,r.chain)||!Ad(this.network,n.chain)||!Ad(this.network,r.chain))throw new Error(`Network and chain not supported: ${this.network} ${n.chain} `);if(s){const f=await(await this.getChain(n.chain).getAutomaticCircleBridge()).getRelayerFee(r.chain)+(o||0n);if(e<f)throw new Error(`Amount must be > ${f} (relayerFee + nativeGas)`)}return await Bt.from(this,{amount:e,from:n,to:r,automatic:s,payload:i,nativeGas:o})}async tokenTransfer(e,n,r,s,i,o){switch(i){case"TokenBridge":return await Ye.from(this,{token:e,amount:n,from:r,to:s,protocol:i,payload:o});case"AutomaticTokenBridge":return await Ye.from(this,{token:e,amount:n,from:r,to:s,protocol:i,nativeGas:o});case"ExecutorTokenBridge":return await Ye.from(this,{token:e,amount:n,from:r,to:s,protocol:i});default:throw new Error(`Protocol ${i} is not supported`)}}resolver(e){return new j0(this,e)}getContracts(e){var n;return(n=this.config.chains[e])==null?void 0:n.contracts}getPlatform(e){const n=this._platforms.get(e);if(!n)throw new Error(`Not able to retrieve platform ${e}. Did it get registered in the constructor?`);return n}getChain(e){const n=hn(e);return this._chains.has(e)||this._chains.set(e,this.getPlatform(n).getChain(e)),this._chains.get(e)}async getWrappedAsset(e,n){const s=await this.getChain(e).getTokenBridge();return{chain:e,address:await s.getWrappedAsset(n)}}async getOriginalAsset(e){return await(await this.getChain(e.chain).getTokenBridge()).getOriginalAsset(e.address)}async getTokenUniversalAddress(e,n){return await(await this.getChain(e).getTokenBridge()).getTokenUniversalAddress(n)}async getTokenNativeAddress(e,n,r){return await(await this.getChain(e).getTokenBridge()).getTokenNativeAddress(n,r)}async getDecimals(e,n){return await this.getChain(e).getDecimals(n)}async getBalance(e,n,r){return this.getChain(e).getBalance(r,n)}async getTokenAccount(e,n){return this.getChain(e.chain).getTokenAccount(e.address,n.address)}async getVaaBytes(e,n=Cn){return await x2(this.config.api,e,n)}async getVaa(e,n,r=Cn){return typeof e=="string"?await du(this.config.api,e,n,r):await S2(this.config.api,e,n,r)}async getIsVaaEnqueued(e){return await U2(this.config.api,e)}async getCircleAttestation(e,n=Cn){return p2(this.config.circleAPI,e,n)}async getTransactionStatus(e,n=Cn){let r;if(typeof e=="string"){const s=await du(this.config.api,e,"Uint8Array",n);if(!s)return null;r={emitter:s.emitterAddress,chain:s.emitterChain,sequence:s.sequence}}else r=e;return await v2(this.config.api,r,n)}async getExecutorCapabilities(){return await Vy(this.config.executorAPI)}async getExecutorQuote(e,n,r){return await Gy(this.config.executorAPI,e,n,r)}async getExecutorTxStatus(e,n){return await Yy(this.config.executorAPI,e,n)}async getTransactionsForAddress(e,n=50,r=0){return F2(this.config.api,e,n,r)}static parseAddress(e,n){return or(e,n)}static canonicalAddress(e){return In(e)}static chainAddress(e,n){return{chain:e,address:sn.parseAddress(e,n)}}static tokenId(e,n){return Pt(n)?al(e):this.chainAddress(e,n)}static async parseMessageFromTx(e,n,r=Cn){const i=await Rr(async()=>{try{const o=await e.parseTransaction(n);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 ${n}`);return i}}class Mo{constructor(e){ie(this,"wh");this.wh=e}transferUrl(e){return`https://wormholescan.io/#/tx/${e}?network=${this.wh.network}`}}class V0 extends Mo{}ie(V0,"IS_AUTOMATIC",!0);function R2(t){return!!t.constructor.IS_AUTOMATIC}class wc extends Mo{}ie(wc,"NATIVE_GAS_DROPOFF_SUPPORTED",!1),ie(wc,"IS_AUTOMATIC",!1);function W2(t){return t.complete!==void 0}class P2 extends Mo{}function L2(t){return t.finalize!==void 0}var Ec={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(t,e){var n=ae,r=n.Buffer;function s(o,a){for(var l in o)a[l]=o[l]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(s(n,e),e.Buffer=i);function i(o,a,l){return r(o,a,l)}i.prototype=Object.create(r.prototype),s(r,i),i.from=function(o,a,l){if(typeof o=="number")throw new TypeError("Argument must not be a number");return r(o,a,l)},i.alloc=function(o,a,l){if(typeof o!="number")throw new TypeError("Argument must be a number");var f=r(o);return a!==void 0?typeof l=="string"?f.fill(a,l):f.fill(a):f.fill(0),f},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 n.SlowBuffer(o)}})(Ec,Ec.exports);var G0=Ec.exports,pl={exports:{}};pl.exports;(function(t){(function(e,n){function r(B,c){if(!B)throw new Error(c||"Assertion failed")}function s(B,c){B.super_=c;var b=function(){};b.prototype=c.prototype,B.prototype=new b,B.prototype.constructor=B}function i(B,c,b){if(i.isBN(B))return B;this.negative=0,this.words=null,this.length=0,this.red=null,B!==null&&((c==="le"||c==="be")&&(b=c,c=10),this._init(B||0,c||10,b||"be"))}typeof e=="object"?e.exports=i:n.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(c){return c instanceof i?!0:c!==null&&typeof c=="object"&&c.constructor.wordSize===i.wordSize&&Array.isArray(c.words)},i.max=function(c,b){return c.cmp(b)>0?c:b},i.min=function(c,b){return c.cmp(b)<0?c:b},i.prototype._init=function(c,b,y){if(typeof c=="number")return this._initNumber(c,b,y);if(typeof c=="object")return this._initArray(c,b,y);b==="hex"&&(b=16),r(b===(b|0)&&b>=2&&b<=36),c=c.toString().replace(/\s+/g,"");var S=0;c[0]==="-"&&(S++,this.negative=1),S<c.length&&(b===16?this._parseHex(c,S,y):(this._parseBase(c,b,S),y==="le"&&this._initArray(this.toArray(),b,y)))},i.prototype._initNumber=function(c,b,y){c<0&&(this.negative=1,c=-c),c<67108864?(this.words=[c&67108863],this.length=1):c<4503599627370496?(this.words=[c&67108863,c/67108864&67108863],this.length=2):(r(c<9007199254740992),this.words=[c&67108863,c/67108864&67108863,1],this.length=3),y==="le"&&this._initArray(this.toArray(),b,y)},i.prototype._initArray=function(c,b,y){if(r(typeof c.length=="number"),c.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(c.length/3),this.words=new Array(this.length);for(var S=0;S<this.length;S++)this.words[S]=0;var v,U,W=0;if(y==="be")for(S=c.length-1,v=0;S>=0;S-=3)U=c[S]|c[S-1]<<8|c[S-2]<<16,this.words[v]|=U<<W&67108863,this.words[v+1]=U>>>26-W&67108863,W+=24,W>=26&&(W-=26,v++);else if(y==="le")for(S=0,v=0;S<c.length;S+=3)U=c[S]|c[S+1]<<8|c[S+2]<<16,this.words[v]|=U<<W&67108863,this.words[v+1]=U>>>26-W&67108863,W+=24,W>=26&&(W-=26,v++);return this._strip()};function a(B,c){var b=B.charCodeAt(c);if(b>=48&&b<=57)return b-48;if(b>=65&&b<=70)return b-55;if(b>=97&&b<=102)return b-87;r(!1,"Invalid character in "+B)}function l(B,c,b){var y=a(B,b);return b-1>=c&&(y|=a(B,b-1)<<4),y}i.prototype._parseHex=function(c,b,y){this.length=Math.ceil((c.length-b)/6),this.words=new Array(this.length);for(var S=0;S<this.length;S++)this.words[S]=0;var v=0,U=0,W;if(y==="be")for(S=c.length-1;S>=b;S-=2)W=l(c,b,S)<<v,this.words[U]|=W&67108863,v>=18?(v-=18,U+=1,this.words[U]|=W>>>26):v+=8;else{var A=c.length-b;for(S=A%2===0?b+1:b;S<c.length;S+=2)W=l(c,b,S)<<v,this.words[U]|=W&67108863,v>=18?(v-=18,U+=1,this.words[U]|=W>>>26):v+=8}this._strip()};function f(B,c,b,y){for(var S=0,v=0,U=Math.min(B.length,b),W=c;W<U;W++){var A=B.charCodeAt(W)-48;S*=y,A>=49?v=A-49+10:A>=17?v=A-17+10:v=A,r(A>=0&&v<y,"Invalid character"),S+=v}return S}i.prototype._parseBase=function(c,b,y){this.words=[0],this.length=1;for(var S=0,v=1;v<=67108863;v*=b)S++;S--,v=v/b|0;for(var U=c.length-y,W=U%S,A=Math.min(U,U-W)+y,h=0,T=y;T<A;T+=S)h=f(c,T,T+S,b),this.imuln(v),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(W!==0){var se=1;for(h=f(c,T,c.length,b),T=0;T<W;T++)se*=b;this.imuln(se),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this._strip()},i.prototype.copy=function(c){c.words=new Array(this.length);for(var b=0;b<this.length;b++)c.words[b]=this.words[b];c.length=this.length,c.negative=this.negative,c.red=this.red};function m(B,c){B.words=c.words,B.length=c.length,B.negative=c.negative,B.red=c.red}if(i.prototype._move=function(c){m(c,this)},i.prototype.clone=function(){var c=new i(null);return this.copy(c),c},i.prototype._expand=function(c){for(;this.length<c;)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")]=p}catch{i.prototype.inspect=p}else i.prototype.inspect=p;function p(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var C=["","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"],w=[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],F=[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(c,b){c=c||10,b=b|0||1;var y;if(c===16||c==="hex"){y="";for(var S=0,v=0,U=0;U<this.length;U++){var W=this.words[U],A=((W<<S|v)&16777215).toString(16);v=W>>>24-S&16777215,S+=2,S>=26&&(S-=26,U--),v!==0||U!==this.length-1?y=C[6-A.length]+A+y:y=A+y}for(v!==0&&(y=v.toString(16)+y);y.length%b!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}if(c===(c|0)&&c>=2&&c<=36){var h=w[c],T=F[c];y="";var se=this.clone();for(se.negative=0;!se.isZero();){var Z=se.modrn(T).toString(c);se=se.idivn(T),se.isZero()?y=Z+y:y=C[h-Z.length]+Z+y}for(this.isZero()&&(y="0"+y);y.length%b!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var c=this.words[0];return this.length===2?c+=this.words[1]*67108864:this.length===3&&this.words[2]===1?c+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-c:c},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(c,b){return this.toArrayLike(o,c,b)}),i.prototype.toArray=function(c,b){return this.toArrayLike(Array,c,b)};var I=function(c,b){return c.allocUnsafe?c.allocUnsafe(b):new c(b)};i.prototype.toArrayLike=function(c,b,y){this._strip();var S=this.byteLength(),v=y||Math.max(1,S);r(S<=v,"byte array longer than desired length"),r(v>0,"Requested array length <= 0");var U=I(c,v),W=b==="le"?"LE":"BE";return this["_toArrayLike"+W](U,S),U},i.prototype._toArrayLikeLE=function(c,b){for(var y=0,S=0,v=0,U=0;v<this.length;v++){var W=this.words[v]<<U|S;c[y++]=W&255,y<c.length&&(c[y++]=W>>8&255),y<c.length&&(c[y++]=W>>16&255),U===6?(y<c.length&&(c[y++]=W>>24&255),S=0,U=0):(S=W>>>24,U+=2)}if(y<c.length)for(c[y++]=S;y<c.length;)c[y++]=0},i.prototype._toArrayLikeBE=function(c,b){for(var y=c.length-1,S=0,v=0,U=0;v<this.length;v++){var W=this.words[v]<<U|S;c[y--]=W&255,y>=0&&(c[y--]=W>>8&255),y>=0&&(c[y--]=W>>16&255),U===6?(y>=0&&(c[y--]=W>>24&255),S=0,U=0):(S=W>>>24,U+=2)}if(y>=0)for(c[y--]=S;y>=0;)c[y--]=0},Math.clz32?i.prototype._countBits=function(c){return 32-Math.clz32(c)}:i.prototype._countBits=function(c){var b=c,y=0;return b>=4096&&(y+=13,b>>>=13),b>=64&&(y+=7,b>>>=7),b>=8&&(y+=4,b>>>=4),b>=2&&(y+=2,b>>>=2),y+b},i.prototype._zeroBits=function(c){if(c===0)return 26;var b=c,y=0;return b&8191||(y+=13,b>>>=13),b&127||(y+=7,b>>>=7),b&15||(y+=4,b>>>=4),b&3||(y+=2,b>>>=2),b&1||y++,y},i.prototype.bitLength=function(){var c=this.words[this.length-1],b=this._countBits(c);return(this.length-1)*26+b};function x(B){for(var c=new Array(B.bitLength()),b=0;b<c.length;b++){var y=b/26|0,S=b%26;c[b]=B.words[y]>>>S&1}return c}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var c=0,b=0;b<this.length;b++){var y=this._zeroBits(this.words[b]);if(c+=y,y!==26)break}return c},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(c){return this.negative!==0?this.abs().inotn(c).iaddn(1):this.clone()},i.prototype.fromTwos=function(c){return this.testn(c-1)?this.notn(c).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(c){for(;this.length<c.length;)this.words[this.length++]=0;for(var b=0;b<c.length;b++)this.words[b]=this.words[b]|c.words[b];return this._strip()},i.prototype.ior=function(c){return r((this.negative|c.negative)===0),this.iuor(c)},i.prototype.or=function(c){return this.length>c.length?this.clone().ior(c):c.clone().ior(this)},i.prototype.uor=function(c){return this.length>c.length?this.clone().iuor(c):c.clone().iuor(this)},i.prototype.iuand=function(c){var b;this.length>c.length?b=c:b=this;for(var y=0;y<b.length;y++)this.words[y]=this.words[y]&c.words[y];return this.length=b.length,this._strip()},i.prototype.iand=function(c){return r((this.negative|c.negative)===0),this.iuand(c)},i.prototype.and=function(c){return this.length>c.length?this.clone().iand(c):c.clone().iand(this)},i.prototype.uand=function(c){return this.length>c.length?this.clone().iuand(c):c.clone().iuand(this)},i.prototype.iuxor=function(c){var b,y;this.length>c.length?(b=this,y=c):(b=c,y=this);for(var S=0;S<y.length;S++)this.words[S]=b.words[S]^y.words[S];if(this!==b)for(;S<b.length;S++)this.words[S]=b.words[S];return this.length=b.length,this._strip()},i.prototype.ixor=function(c){return r((this.negative|c.negative)===0),this.iuxor(c)},i.prototype.xor=function(c){return this.length>c.length?this.clone().ixor(c):c.clone().ixor(this)},i.prototype.uxor=function(c){return this.length>c.length?this.clone().iuxor(c):c.clone().iuxor(this)},i.prototype.inotn=function(c){r(typeof c=="number"&&c>=0);var b=Math.ceil(c/26)|0,y=c%26;this._expand(b),y>0&&b--;for(var S=0;S<b;S++)this.words[S]=~this.words[S]&67108863;return y>0&&(this.words[S]=~this.words[S]&67108863>>26-y),this._strip()},i.prototype.notn=function(c){return this.clone().inotn(c)},i.prototype.setn=function(c,b){r(typeof c=="number"&&c>=0);var y=c/26|0,S=c%26;return this._expand(y+1),b?this.words[y]=this.words[y]|1<<S:this.words[y]=this.words[y]&~(1<<S),this._strip()},i.prototype.iadd=function(c){var b;if(this.negative!==0&&c.negative===0)return this.negative=0,b=this.isub(c),this.negative^=1,this._normSign();if(this.negative===0&&c.negative!==0)return c.negative=0,b=this.isub(c),c.negative=1,b._normSign();var y,S;this.length>c.length?(y=this,S=c):(y=c,S=this);for(var v=0,U=0;U<S.length;U++)b=(y.words[U]|0)+(S.words[U]|0)+v,this.words[U]=b&67108863,v=b>>>26;for(;v!==0&&U<y.length;U++)b=(y.words[U]|0)+v,this.words[U]=b&67108863,v=b>>>26;if(this.length=y.length,v!==0)this.words[this.length]=v,this.length++;else if(y!==this)for(;U<y.length;U++)this.words[U]=y.words[U];return this},i.prototype.add=function(c){var b;return c.negative!==0&&this.negative===0?(c.negative=0,b=this.sub(c),c.negative^=1,b):c.negative===0&&this.negative!==0?(this.negative=0,b=c.sub(this),this.negative=1,b):this.length>c.length?this.clone().iadd(c):c.clone().iadd(this)},i.prototype.isub=function(c){if(c.negative!==0){c.negative=0;var b=this.iadd(c);return c.negative=1,b._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(c),this.negative=1,this._normSign();var y=this.cmp(c);if(y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var S,v;y>0?(S=this,v=c):(S=c,v=this);for(var U=0,W=0;W<v.length;W++)b=(S.words[W]|0)-(v.words[W]|0)+U,U=b>>26,this.words[W]=b&67108863;for(;U!==0&&W<S.length;W++)b=(S.words[W]|0)+U,U=b>>26,this.words[W]=b&67108863;if(U===0&&W<S.length&&S!==this)for(;W<S.length;W++)this.words[W]=S.words[W];return this.length=Math.max(this.length,W),S!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(c){return this.clone().isub(c)};function E(B,c,b){b.negative=c.negative^B.negative;var y=B.length+c.length|0;b.length=y,y=y-1|0;var S=B.words[0]|0,v=c.words[0]|0,U=S*v,W=U&67108863,A=U/67108864|0;b.words[0]=W;for(var h=1;h<y;h++){for(var T=A>>>26,se=A&67108863,Z=Math.min(h,c.length-1),ee=Math.max(0,h-B.length+1);ee<=Z;ee++){var ve=h-ee|0;S=B.words[ve]|0,v=c.words[ee]|0,U=S*v+se,T+=U/67108864|0,se=U&67108863}b.words[h]=se|0,A=T|0}return A!==0?b.words[h]=A|0:b.length--,b._strip()}var _=function(c,b,y){var S=c.words,v=b.words,U=y.words,W=0,A,h,T,se=S[0]|0,Z=se&8191,ee=se>>>13,ve=S[1]|0,le=ve&8191,be=ve>>>13,ln=S[2]|0,xe=ln&8191,Re=ln>>>13,Jt=S[3]|0,Ue=Jt&8191,$e=Jt>>>13,mi=S[4]|0,Le=mi&8191,je=mi>>>13,bi=S[5]|0,ze=bi&8191,We=bi>>>13,Gt=S[6]|0,Oe=Gt&8191,Ve=Gt>>>13,dn=S[7]|0,Ge=dn&8191,g=dn>>>13,d=S[8]|0,u=d&8191,D=d>>>13,R=S[9]|0,N=R&8191,K=R>>>13,pe=v[0]|0,he=pe&8191,ue=pe>>>13,Pe=v[1]|0,de=Pe&8191,tt=Pe>>>13,Gl=v[2]|0,nt=Gl&8191,rt=Gl>>>13,Yl=v[3]|0,st=Yl&8191,it=Yl>>>13,Xl=v[4]|0,ot=Xl&8191,at=Xl>>>13,Zl=v[5]|0,ct=Zl&8191,lt=Zl>>>13,Jl=v[6]|0,dt=Jl&8191,ut=Jl>>>13,Ql=v[7]|0,ft=Ql&8191,ht=Ql>>>13,ed=v[8]|0,mt=ed&8191,bt=ed>>>13,td=v[9]|0,pt=td&8191,yt=td>>>13;y.negative=c.negative^b.negative,y.length=19,A=Math.imul(Z,he),h=Math.imul(Z,ue),h=h+Math.imul(ee,he)|0,T=Math.imul(ee,ue);var Qo=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(Qo>>>26)|0,Qo&=67108863,A=Math.imul(le,he),h=Math.imul(le,ue),h=h+Math.imul(be,he)|0,T=Math.imul(be,ue),A=A+Math.imul(Z,de)|0,h=h+Math.imul(Z,tt)|0,h=h+Math.imul(ee,de)|0,T=T+Math.imul(ee,tt)|0;var ea=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(ea>>>26)|0,ea&=67108863,A=Math.imul(xe,he),h=Math.imul(xe,ue),h=h+Math.imul(Re,he)|0,T=Math.imul(Re,ue),A=A+Math.imul(le,de)|0,h=h+Math.imul(le,tt)|0,h=h+Math.imul(be,de)|0,T=T+Math.imul(be,tt)|0,A=A+Math.imul(Z,nt)|0,h=h+Math.imul(Z,rt)|0,h=h+Math.imul(ee,nt)|0,T=T+Math.imul(ee,rt)|0;var ta=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(ta>>>26)|0,ta&=67108863,A=Math.imul(Ue,he),h=Math.imul(Ue,ue),h=h+Math.imul($e,he)|0,T=Math.imul($e,ue),A=A+Math.imul(xe,de)|0,h=h+Math.imul(xe,tt)|0,h=h+Math.imul(Re,de)|0,T=T+Math.imul(Re,tt)|0,A=A+Math.imul(le,nt)|0,h=h+Math.imul(le,rt)|0,h=h+Math.imul(be,nt)|0,T=T+Math.imul(be,rt)|0,A=A+Math.imul(Z,st)|0,h=h+Math.imul(Z,it)|0,h=h+Math.imul(ee,st)|0,T=T+Math.imul(ee,it)|0;var na=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(na>>>26)|0,na&=67108863,A=Math.imul(Le,he),h=Math.imul(Le,ue),h=h+Math.imul(je,he)|0,T=Math.imul(je,ue),A=A+Math.imul(Ue,de)|0,h=h+Math.imul(Ue,tt)|0,h=h+Math.imul($e,de)|0,T=T+Math.imul($e,tt)|0,A=A+Math.imul(xe,nt)|0,h=h+Math.imul(xe,rt)|0,h=h+Math.imul(Re,nt)|0,T=T+Math.imul(Re,rt)|0,A=A+Math.imul(le,st)|0,h=h+Math.imul(le,it)|0,h=h+Math.imul(be,st)|0,T=T+Math.imul(be,it)|0,A=A+Math.imul(Z,ot)|0,h=h+Math.imul(Z,at)|0,h=h+Math.imul(ee,ot)|0,T=T+Math.imul(ee,at)|0;var ra=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(ra>>>26)|0,ra&=67108863,A=Math.imul(ze,he),h=Math.imul(ze,ue),h=h+Math.imul(We,he)|0,T=Math.imul(We,ue),A=A+Math.imul(Le,de)|0,h=h+Math.imul(Le,tt)|0,h=h+Math.imul(je,de)|0,T=T+Math.imul(je,tt)|0,A=A+Math.imul(Ue,nt)|0,h=h+Math.imul(Ue,rt)|0,h=h+Math.imul($e,nt)|0,T=T+Math.imul($e,rt)|0,A=A+Math.imul(xe,st)|0,h=h+Math.imul(xe,it)|0,h=h+Math.imul(Re,st)|0,T=T+Math.imul(Re,it)|0,A=A+Math.imul(le,ot)|0,h=h+Math.imul(le,at)|0,h=h+Math.imul(be,ot)|0,T=T+Math.imul(be,at)|0,A=A+Math.imul(Z,ct)|0,h=h+Math.imul(Z,lt)|0,h=h+Math.imul(ee,ct)|0,T=T+Math.imul(ee,lt)|0;var sa=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(sa>>>26)|0,sa&=67108863,A=Math.imul(Oe,he),h=Math.imul(Oe,ue),h=h+Math.imul(Ve,he)|0,T=Math.imul(Ve,ue),A=A+Math.imul(ze,de)|0,h=h+Math.imul(ze,tt)|0,h=h+Math.imul(We,de)|0,T=T+Math.imul(We,tt)|0,A=A+Math.imul(Le,nt)|0,h=h+Math.imul(Le,rt)|0,h=h+Math.imul(je,nt)|0,T=T+Math.imul(je,rt)|0,A=A+Math.imul(Ue,st)|0,h=h+Math.imul(Ue,it)|0,h=h+Math.imul($e,st)|0,T=T+Math.imul($e,it)|0,A=A+Math.imul(xe,ot)|0,h=h+Math.imul(xe,at)|0,h=h+Math.imul(Re,ot)|0,T=T+Math.imul(Re,at)|0,A=A+Math.imul(le,ct)|0,h=h+Math.imul(le,lt)|0,h=h+Math.imul(be,ct)|0,T=T+Math.imul(be,lt)|0,A=A+Math.imul(Z,dt)|0,h=h+Math.imul(Z,ut)|0,h=h+Math.imul(ee,dt)|0,T=T+Math.imul(ee,ut)|0;var ia=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(ia>>>26)|0,ia&=67108863,A=Math.imul(Ge,he),h=Math.imul(Ge,ue),h=h+Math.imul(g,he)|0,T=Math.imul(g,ue),A=A+Math.imul(Oe,de)|0,h=h+Math.imul(Oe,tt)|0,h=h+Math.imul(Ve,de)|0,T=T+Math.imul(Ve,tt)|0,A=A+Math.imul(ze,nt)|0,h=h+Math.imul(ze,rt)|0,h=h+Math.imul(We,nt)|0,T=T+Math.imul(We,rt)|0,A=A+Math.imul(Le,st)|0,h=h+Math.imul(Le,it)|0,h=h+Math.imul(je,st)|0,T=T+Math.imul(je,it)|0,A=A+Math.imul(Ue,ot)|0,h=h+Math.imul(Ue,at)|0,h=h+Math.imul($e,ot)|0,T=T+Math.imul($e,at)|0,A=A+Math.imul(xe,ct)|0,h=h+Math.imul(xe,lt)|0,h=h+Math.imul(Re,ct)|0,T=T+Math.imul(Re,lt)|0,A=A+Math.imul(le,dt)|0,h=h+Math.imul(le,ut)|0,h=h+Math.imul(be,dt)|0,T=T+Math.imul(be,ut)|0,A=A+Math.imul(Z,ft)|0,h=h+Math.imul(Z,ht)|0,h=h+Math.imul(ee,ft)|0,T=T+Math.imul(ee,ht)|0;var oa=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(oa>>>26)|0,oa&=67108863,A=Math.imul(u,he),h=Math.imul(u,ue),h=h+Math.imul(D,he)|0,T=Math.imul(D,ue),A=A+Math.imul(Ge,de)|0,h=h+Math.imul(Ge,tt)|0,h=h+Math.imul(g,de)|0,T=T+Math.imul(g,tt)|0,A=A+Math.imul(Oe,nt)|0,h=h+Math.imul(Oe,rt)|0,h=h+Math.imul(Ve,nt)|0,T=T+Math.imul(Ve,rt)|0,A=A+Math.imul(ze,st)|0,h=h+Math.imul(ze,it)|0,h=h+Math.imul(We,st)|0,T=T+Math.imul(We,it)|0,A=A+Math.imul(Le,ot)|0,h=h+Math.imul(Le,at)|0,h=h+Math.imul(je,ot)|0,T=T+Math.imul(je,at)|0,A=A+Math.imul(Ue,ct)|0,h=h+Math.imul(Ue,lt)|0,h=h+Math.imul($e,ct)|0,T=T+Math.imul($e,lt)|0,A=A+Math.imul(xe,dt)|0,h=h+Math.imul(xe,ut)|0,h=h+Math.imul(Re,dt)|0,T=T+Math.imul(Re,ut)|0,A=A+Math.imul(le,ft)|0,h=h+Math.imul(le,ht)|0,h=h+Math.imul(be,ft)|0,T=T+Math.imul(be,ht)|0,A=A+Math.imul(Z,mt)|0,h=h+Math.imul(Z,bt)|0,h=h+Math.imul(ee,mt)|0,T=T+Math.imul(ee,bt)|0;var aa=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(aa>>>26)|0,aa&=67108863,A=Math.imul(N,he),h=Math.imul(N,ue),h=h+Math.imul(K,he)|0,T=Math.imul(K,ue),A=A+Math.imul(u,de)|0,h=h+Math.imul(u,tt)|0,h=h+Math.imul(D,de)|0,T=T+Math.imul(D,tt)|0,A=A+Math.imul(Ge,nt)|0,h=h+Math.imul(Ge,rt)|0,h=h+Math.imul(g,nt)|0,T=T+Math.imul(g,rt)|0,A=A+Math.imul(Oe,st)|0,h=h+Math.imul(Oe,it)|0,h=h+Math.imul(Ve,st)|0,T=T+Math.imul(Ve,it)|0,A=A+Math.imul(ze,ot)|0,h=h+Math.imul(ze,at)|0,h=h+Math.imul(We,ot)|0,T=T+Math.imul(We,at)|0,A=A+Math.imul(Le,ct)|0,h=h+Math.imul(Le,lt)|0,h=h+Math.imul(je,ct)|0,T=T+Math.imul(je,lt)|0,A=A+Math.imul(Ue,dt)|0,h=h+Math.imul(Ue,ut)|0,h=h+Math.imul($e,dt)|0,T=T+Math.imul($e,ut)|0,A=A+Math.imul(xe,ft)|0,h=h+Math.imul(xe,ht)|0,h=h+Math.imul(Re,ft)|0,T=T+Math.imul(Re,ht)|0,A=A+Math.imul(le,mt)|0,h=h+Math.imul(le,bt)|0,h=h+Math.imul(be,mt)|0,T=T+Math.imul(be,bt)|0,A=A+Math.imul(Z,pt)|0,h=h+Math.imul(Z,yt)|0,h=h+Math.imul(ee,pt)|0,T=T+Math.imul(ee,yt)|0;var ca=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(ca>>>26)|0,ca&=67108863,A=Math.imul(N,de),h=Math.imul(N,tt),h=h+Math.imul(K,de)|0,T=Math.imul(K,tt),A=A+Math.imul(u,nt)|0,h=h+Math.imul(u,rt)|0,h=h+Math.imul(D,nt)|0,T=T+Math.imul(D,rt)|0,A=A+Math.imul(Ge,st)|0,h=h+Math.imul(Ge,it)|0,h=h+Math.imul(g,st)|0,T=T+Math.imul(g,it)|0,A=A+Math.imul(Oe,ot)|0,h=h+Math.imul(Oe,at)|0,h=h+Math.imul(Ve,ot)|0,T=T+Math.imul(Ve,at)|0,A=A+Math.imul(ze,ct)|0,h=h+Math.imul(ze,lt)|0,h=h+Math.imul(We,ct)|0,T=T+Math.imul(We,lt)|0,A=A+Math.imul(Le,dt)|0,h=h+Math.imul(Le,ut)|0,h=h+Math.imul(je,dt)|0,T=T+Math.imul(je,ut)|0,A=A+Math.imul(Ue,ft)|0,h=h+Math.imul(Ue,ht)|0,h=h+Math.imul($e,ft)|0,T=T+Math.imul($e,ht)|0,A=A+Math.imul(xe,mt)|0,h=h+Math.imul(xe,bt)|0,h=h+Math.imul(Re,mt)|0,T=T+Math.imul(Re,bt)|0,A=A+Math.imul(le,pt)|0,h=h+Math.imul(le,yt)|0,h=h+Math.imul(be,pt)|0,T=T+Math.imul(be,yt)|0;var la=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(la>>>26)|0,la&=67108863,A=Math.imul(N,nt),h=Math.imul(N,rt),h=h+Math.imul(K,nt)|0,T=Math.imul(K,rt),A=A+Math.imul(u,st)|0,h=h+Math.imul(u,it)|0,h=h+Math.imul(D,st)|0,T=T+Math.imul(D,it)|0,A=A+Math.imul(Ge,ot)|0,h=h+Math.imul(Ge,at)|0,h=h+Math.imul(g,ot)|0,T=T+Math.imul(g,at)|0,A=A+Math.imul(Oe,ct)|0,h=h+Math.imul(Oe,lt)|0,h=h+Math.imul(Ve,ct)|0,T=T+Math.imul(Ve,lt)|0,A=A+Math.imul(ze,dt)|0,h=h+Math.imul(ze,ut)|0,h=h+Math.imul(We,dt)|0,T=T+Math.imul(We,ut)|0,A=A+Math.imul(Le,ft)|0,h=h+Math.imul(Le,ht)|0,h=h+Math.imul(je,ft)|0,T=T+Math.imul(je,ht)|0,A=A+Math.imul(Ue,mt)|0,h=h+Math.imul(Ue,bt)|0,h=h+Math.imul($e,mt)|0,T=T+Math.imul($e,bt)|0,A=A+Math.imul(xe,pt)|0,h=h+Math.imul(xe,yt)|0,h=h+Math.imul(Re,pt)|0,T=T+Math.imul(Re,yt)|0;var da=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(da>>>26)|0,da&=67108863,A=Math.imul(N,st),h=Math.imul(N,it),h=h+Math.imul(K,st)|0,T=Math.imul(K,it),A=A+Math.imul(u,ot)|0,h=h+Math.imul(u,at)|0,h=h+Math.imul(D,ot)|0,T=T+Math.imul(D,at)|0,A=A+Math.imul(Ge,ct)|0,h=h+Math.imul(Ge,lt)|0,h=h+Math.imul(g,ct)|0,T=T+Math.imul(g,lt)|0,A=A+Math.imul(Oe,dt)|0,h=h+Math.imul(Oe,ut)|0,h=h+Math.imul(Ve,dt)|0,T=T+Math.imul(Ve,ut)|0,A=A+Math.imul(ze,ft)|0,h=h+Math.imul(ze,ht)|0,h=h+Math.imul(We,ft)|0,T=T+Math.imul(We,ht)|0,A=A+Math.imul(Le,mt)|0,h=h+Math.imul(Le,bt)|0,h=h+Math.imul(je,mt)|0,T=T+Math.imul(je,bt)|0,A=A+Math.imul(Ue,pt)|0,h=h+Math.imul(Ue,yt)|0,h=h+Math.imul($e,pt)|0,T=T+Math.imul($e,yt)|0;var ua=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(ua>>>26)|0,ua&=67108863,A=Math.imul(N,ot),h=Math.imul(N,at),h=h+Math.imul(K,ot)|0,T=Math.imul(K,at),A=A+Math.imul(u,ct)|0,h=h+Math.imul(u,lt)|0,h=h+Math.imul(D,ct)|0,T=T+Math.imul(D,lt)|0,A=A+Math.imul(Ge,dt)|0,h=h+Math.imul(Ge,ut)|0,h=h+Math.imul(g,dt)|0,T=T+Math.imul(g,ut)|0,A=A+Math.imul(Oe,ft)|0,h=h+Math.imul(Oe,ht)|0,h=h+Math.imul(Ve,ft)|0,T=T+Math.imul(Ve,ht)|0,A=A+Math.imul(ze,mt)|0,h=h+Math.imul(ze,bt)|0,h=h+Math.imul(We,mt)|0,T=T+Math.imul(We,bt)|0,A=A+Math.imul(Le,pt)|0,h=h+Math.imul(Le,yt)|0,h=h+Math.imul(je,pt)|0,T=T+Math.imul(je,yt)|0;var fa=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(fa>>>26)|0,fa&=67108863,A=Math.imul(N,ct),h=Math.imul(N,lt),h=h+Math.imul(K,ct)|0,T=Math.imul(K,lt),A=A+Math.imul(u,dt)|0,h=h+Math.imul(u,ut)|0,h=h+Math.imul(D,dt)|0,T=T+Math.imul(D,ut)|0,A=A+Math.imul(Ge,ft)|0,h=h+Math.imul(Ge,ht)|0,h=h+Math.imul(g,ft)|0,T=T+Math.imul(g,ht)|0,A=A+Math.imul(Oe,mt)|0,h=h+Math.imul(Oe,bt)|0,h=h+Math.imul(Ve,mt)|0,T=T+Math.imul(Ve,bt)|0,A=A+Math.imul(ze,pt)|0,h=h+Math.imul(ze,yt)|0,h=h+Math.imul(We,pt)|0,T=T+Math.imul(We,yt)|0;var ha=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(ha>>>26)|0,ha&=67108863,A=Math.imul(N,dt),h=Math.imul(N,ut),h=h+Math.imul(K,dt)|0,T=Math.imul(K,ut),A=A+Math.imul(u,ft)|0,h=h+Math.imul(u,ht)|0,h=h+Math.imul(D,ft)|0,T=T+Math.imul(D,ht)|0,A=A+Math.imul(Ge,mt)|0,h=h+Math.imul(Ge,bt)|0,h=h+Math.imul(g,mt)|0,T=T+Math.imul(g,bt)|0,A=A+Math.imul(Oe,pt)|0,h=h+Math.imul(Oe,yt)|0,h=h+Math.imul(Ve,pt)|0,T=T+Math.imul(Ve,yt)|0;var ma=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(ma>>>26)|0,ma&=67108863,A=Math.imul(N,ft),h=Math.imul(N,ht),h=h+Math.imul(K,ft)|0,T=Math.imul(K,ht),A=A+Math.imul(u,mt)|0,h=h+Math.imul(u,bt)|0,h=h+Math.imul(D,mt)|0,T=T+Math.imul(D,bt)|0,A=A+Math.imul(Ge,pt)|0,h=h+Math.imul(Ge,yt)|0,h=h+Math.imul(g,pt)|0,T=T+Math.imul(g,yt)|0;var ba=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(ba>>>26)|0,ba&=67108863,A=Math.imul(N,mt),h=Math.imul(N,bt),h=h+Math.imul(K,mt)|0,T=Math.imul(K,bt),A=A+Math.imul(u,pt)|0,h=h+Math.imul(u,yt)|0,h=h+Math.imul(D,pt)|0,T=T+Math.imul(D,yt)|0;var pa=(W+A|0)+((h&8191)<<13)|0;W=(T+(h>>>13)|0)+(pa>>>26)|0,pa&=67108863,A=Math.imul(N,pt),h=Math.imul(N,yt),h=h+Math.imul(K,pt)|0,T=Math.imul(K,yt);var ya=(W+A|0)+((h&8191)<<13)|0;return W=(T+(h>>>13)|0)+(ya>>>26)|0,ya&=67108863,U[0]=Qo,U[1]=ea,U[2]=ta,U[3]=na,U[4]=ra,U[5]=sa,U[6]=ia,U[7]=oa,U[8]=aa,U[9]=ca,U[10]=la,U[11]=da,U[12]=ua,U[13]=fa,U[14]=ha,U[15]=ma,U[16]=ba,U[17]=pa,U[18]=ya,W!==0&&(U[19]=W,y.length++),y};Math.imul||(_=E);function k(B,c,b){b.negative=c.negative^B.negative,b.length=B.length+c.length;for(var y=0,S=0,v=0;v<b.length-1;v++){var U=S;S=0;for(var W=y&67108863,A=Math.min(v,c.length-1),h=Math.max(0,v-B.length+1);h<=A;h++){var T=v-h,se=B.words[T]|0,Z=c.words[h]|0,ee=se*Z,ve=ee&67108863;U=U+(ee/67108864|0)|0,ve=ve+W|0,W=ve&67108863,U=U+(ve>>>26)|0,S+=U>>>26,U&=67108863}b.words[v]=W,y=U,U=S}return y!==0?b.words[v]=y:b.length--,b._strip()}function P(B,c,b){return k(B,c,b)}i.prototype.mulTo=function(c,b){var y,S=this.length+c.length;return this.length===10&&c.length===10?y=_(this,c,b):S<63?y=E(this,c,b):S<1024?y=k(this,c,b):y=P(this,c,b),y},i.prototype.mul=function(c){var b=new i(null);return b.words=new Array(this.length+c.length),this.mulTo(c,b)},i.prototype.mulf=function(c){var b=new i(null);return b.words=new Array(this.length+c.length),P(this,c,b)},i.prototype.imul=function(c){return this.clone().mulTo(c,this)},i.prototype.imuln=function(c){var b=c<0;b&&(c=-c),r(typeof c=="number"),r(c<67108864);for(var y=0,S=0;S<this.length;S++){var v=(this.words[S]|0)*c,U=(v&67108863)+(y&67108863);y>>=26,y+=v/67108864|0,y+=U>>>26,this.words[S]=U&67108863}return y!==0&&(this.words[S]=y,this.length++),this.length=c===0?1:this.length,b?this.ineg():this},i.prototype.muln=function(c){return this.clone().imuln(c)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(c){var b=x(c);if(b.length===0)return new i(1);for(var y=this,S=0;S<b.length&&b[S]===0;S++,y=y.sqr());if(++S<b.length)for(var v=y.sqr();S<b.length;S++,v=v.sqr())b[S]!==0&&(y=y.mul(v));return y},i.prototype.iushln=function(c){r(typeof c=="number"&&c>=0);var b=c%26,y=(c-b)/26,S=67108863>>>26-b<<26-b,v;if(b!==0){var U=0;for(v=0;v<this.length;v++){var W=this.words[v]&S,A=(this.words[v]|0)-W<<b;this.words[v]=A|U,U=W>>>26-b}U&&(this.words[v]=U,this.length++)}if(y!==0){for(v=this.length-1;v>=0;v--)this.words[v+y]=this.words[v];for(v=0;v<y;v++)this.words[v]=0;this.length+=y}return this._strip()},i.prototype.ishln=function(c){return r(this.negative===0),this.iushln(c)},i.prototype.iushrn=function(c,b,y){r(typeof c=="number"&&c>=0);var S;b?S=(b-b%26)/26:S=0;var v=c%26,U=Math.min((c-v)/26,this.length),W=67108863^67108863>>>v<<v,A=y;if(S-=U,S=Math.max(0,S),A){for(var h=0;h<U;h++)A.words[h]=this.words[h];A.length=U}if(U!==0)if(this.length>U)for(this.length-=U,h=0;h<this.length;h++)this.words[h]=this.words[h+U];else this.words[0]=0,this.length=1;var T=0;for(h=this.length-1;h>=0&&(T!==0||h>=S);h--){var se=this.words[h]|0;this.words[h]=T<<26-v|se>>>v,T=se&W}return A&&T!==0&&(A.words[A.length++]=T),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(c,b,y){return r(this.negative===0),this.iushrn(c,b,y)},i.prototype.shln=function(c){return this.clone().ishln(c)},i.prototype.ushln=function(c){return this.clone().iushln(c)},i.prototype.shrn=function(c){return this.clone().ishrn(c)},i.prototype.ushrn=function(c){return this.clone().iushrn(c)},i.prototype.testn=function(c){r(typeof c=="number"&&c>=0);var b=c%26,y=(c-b)/26,S=1<<b;if(this.length<=y)return!1;var v=this.words[y];return!!(v&S)},i.prototype.imaskn=function(c){r(typeof c=="number"&&c>=0);var b=c%26,y=(c-b)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=y)return this;if(b!==0&&y++,this.length=Math.min(y,this.length),b!==0){var S=67108863^67108863>>>b<<b;this.words[this.length-1]&=S}return this._strip()},i.prototype.maskn=function(c){return this.clone().imaskn(c)},i.prototype.iaddn=function(c){return r(typeof c=="number"),r(c<67108864),c<0?this.isubn(-c):this.negative!==0?this.length===1&&(this.words[0]|0)<=c?(this.words[0]=c-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(c),this.negative=1,this):this._iaddn(c)},i.prototype._iaddn=function(c){this.words[0]+=c;for(var b=0;b<this.length&&this.words[b]>=67108864;b++)this.words[b]-=67108864,b===this.length-1?this.words[b+1]=1:this.words[b+1]++;return this.length=Math.max(this.length,b+1),this},i.prototype.isubn=function(c){if(r(typeof c=="number"),r(c<67108864),c<0)return this.iaddn(-c);if(this.negative!==0)return this.negative=0,this.iaddn(c),this.negative=1,this;if(this.words[0]-=c,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var b=0;b<this.length&&this.words[b]<0;b++)this.words[b]+=67108864,this.words[b+1]-=1;return this._strip()},i.prototype.addn=function(c){return this.clone().iaddn(c)},i.prototype.subn=function(c){return this.clone().isubn(c)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(c,b,y){var S=c.length+y,v;this._expand(S);var U,W=0;for(v=0;v<c.length;v++){U=(this.words[v+y]|0)+W;var A=(c.words[v]|0)*b;U-=A&67108863,W=(U>>26)-(A/67108864|0),this.words[v+y]=U&67108863}for(;v<this.length-y;v++)U=(this.words[v+y]|0)+W,W=U>>26,this.words[v+y]=U&67108863;if(W===0)return this._strip();for(r(W===-1),W=0,v=0;v<this.length;v++)U=-(this.words[v]|0)+W,W=U>>26,this.words[v]=U&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(c,b){var y=this.length-c.length,S=this.clone(),v=c,U=v.words[v.length-1]|0,W=this._countBits(U);y=26-W,y!==0&&(v=v.ushln(y),S.iushln(y),U=v.words[v.length-1]|0);var A=S.length-v.length,h;if(b!=="mod"){h=new i(null),h.length=A+1,h.words=new Array(h.length);for(var T=0;T<h.length;T++)h.words[T]=0}var se=S.clone()._ishlnsubmul(v,1,A);se.negative===0&&(S=se,h&&(h.words[A]=1));for(var Z=A-1;Z>=0;Z--){var ee=(S.words[v.length+Z]|0)*67108864+(S.words[v.length+Z-1]|0);for(ee=Math.min(ee/U|0,67108863),S._ishlnsubmul(v,ee,Z);S.negative!==0;)ee--,S.negative=0,S._ishlnsubmul(v,1,Z),S.isZero()||(S.negative^=1);h&&(h.words[Z]=ee)}return h&&h._strip(),S._strip(),b!=="div"&&y!==0&&S.iushrn(y),{div:h||null,mod:S}},i.prototype.divmod=function(c,b,y){if(r(!c.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var S,v,U;return this.negative!==0&&c.negative===0?(U=this.neg().divmod(c,b),b!=="mod"&&(S=U.div.neg()),b!=="div"&&(v=U.mod.neg(),y&&v.negative!==0&&v.iadd(c)),{div:S,mod:v}):this.negative===0&&c.negative!==0?(U=this.divmod(c.neg(),b),b!=="mod"&&(S=U.div.neg()),{div:S,mod:U.mod}):this.negative&c.negative?(U=this.neg().divmod(c.neg(),b),b!=="div"&&(v=U.mod.neg(),y&&v.negative!==0&&v.isub(c)),{div:U.div,mod:v}):c.length>this.length||this.cmp(c)<0?{div:new i(0),mod:this}:c.length===1?b==="div"?{div:this.divn(c.words[0]),mod:null}:b==="mod"?{div:null,mod:new i(this.modrn(c.words[0]))}:{div:this.divn(c.words[0]),mod:new i(this.modrn(c.words[0]))}:this._wordDiv(c,b)},i.prototype.div=function(c){return this.divmod(c,"div",!1).div},i.prototype.mod=function(c){return this.divmod(c,"mod",!1).mod},i.prototype.umod=function(c){return this.divmod(c,"mod",!0).mod},i.prototype.divRound=function(c){var b=this.divmod(c);if(b.mod.isZero())return b.div;var y=b.div.negative!==0?b.mod.isub(c):b.mod,S=c.ushrn(1),v=c.andln(1),U=y.cmp(S);return U<0||v===1&&U===0?b.div:b.div.negative!==0?b.div.isubn(1):b.div.iaddn(1)},i.prototype.modrn=function(c){var b=c<0;b&&(c=-c),r(c<=67108863);for(var y=(1<<26)%c,S=0,v=this.length-1;v>=0;v--)S=(y*S+(this.words[v]|0))%c;return b?-S:S},i.prototype.modn=function(c){return this.modrn(c)},i.prototype.idivn=function(c){var b=c<0;b&&(c=-c),r(c<=67108863);for(var y=0,S=this.length-1;S>=0;S--){var v=(this.words[S]|0)+y*67108864;this.words[S]=v/c|0,y=v%c}return this._strip(),b?this.ineg():this},i.prototype.divn=function(c){return this.clone().idivn(c)},i.prototype.egcd=function(c){r(c.negative===0),r(!c.isZero());var b=this,y=c.clone();b.negative!==0?b=b.umod(c):b=b.clone();for(var S=new i(1),v=new i(0),U=new i(0),W=new i(1),A=0;b.isEven()&&y.isEven();)b.iushrn(1),y.iushrn(1),++A;for(var h=y.clone(),T=b.clone();!b.isZero();){for(var se=0,Z=1;!(b.words[0]&Z)&&se<26;++se,Z<<=1);if(se>0)for(b.iushrn(se);se-- >0;)(S.isOdd()||v.isOdd())&&(S.iadd(h),v.isub(T)),S.iushrn(1),v.iushrn(1);for(var ee=0,ve=1;!(y.words[0]&ve)&&ee<26;++ee,ve<<=1);if(ee>0)for(y.iushrn(ee);ee-- >0;)(U.isOdd()||W.isOdd())&&(U.iadd(h),W.isub(T)),U.iushrn(1),W.iushrn(1);b.cmp(y)>=0?(b.isub(y),S.isub(U),v.isub(W)):(y.isub(b),U.isub(S),W.isub(v))}return{a:U,b:W,gcd:y.iushln(A)}},i.prototype._invmp=function(c){r(c.negative===0),r(!c.isZero());var b=this,y=c.clone();b.negative!==0?b=b.umod(c):b=b.clone();for(var S=new i(1),v=new i(0),U=y.clone();b.cmpn(1)>0&&y.cmpn(1)>0;){for(var W=0,A=1;!(b.words[0]&A)&&W<26;++W,A<<=1);if(W>0)for(b.iushrn(W);W-- >0;)S.isOdd()&&S.iadd(U),S.iushrn(1);for(var h=0,T=1;!(y.words[0]&T)&&h<26;++h,T<<=1);if(h>0)for(y.iushrn(h);h-- >0;)v.isOdd()&&v.iadd(U),v.iushrn(1);b.cmp(y)>=0?(b.isub(y),S.isub(v)):(y.isub(b),v.isub(S))}var se;return b.cmpn(1)===0?se=S:se=v,se.cmpn(0)<0&&se.iadd(c),se},i.prototype.gcd=function(c){if(this.isZero())return c.abs();if(c.isZero())return this.abs();var b=this.clone(),y=c.clone();b.negative=0,y.negative=0;for(var S=0;b.isEven()&&y.isEven();S++)b.iushrn(1),y.iushrn(1);do{for(;b.isEven();)b.iushrn(1);for(;y.isEven();)y.iushrn(1);var v=b.cmp(y);if(v<0){var U=b;b=y,y=U}else if(v===0||y.cmpn(1)===0)break;b.isub(y)}while(!0);return y.iushln(S)},i.prototype.invm=function(c){return this.egcd(c).a.umod(c)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(c){return this.words[0]&c},i.prototype.bincn=function(c){r(typeof c=="number");var b=c%26,y=(c-b)/26,S=1<<b;if(this.length<=y)return this._expand(y+1),this.words[y]|=S,this;for(var v=S,U=y;v!==0&&U<this.length;U++){var W=this.words[U]|0;W+=v,v=W>>>26,W&=67108863,this.words[U]=W}return v!==0&&(this.words[U]=v,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(c){var b=c<0;if(this.negative!==0&&!b)return-1;if(this.negative===0&&b)return 1;this._strip();var y;if(this.length>1)y=1;else{b&&(c=-c),r(c<=67108863,"Number is too big");var S=this.words[0]|0;y=S===c?0:S<c?-1:1}return this.negative!==0?-y|0:y},i.prototype.cmp=function(c){if(this.negative!==0&&c.negative===0)return-1;if(this.negative===0&&c.negative!==0)return 1;var b=this.ucmp(c);return this.negative!==0?-b|0:b},i.prototype.ucmp=function(c){if(this.length>c.length)return 1;if(this.length<c.length)return-1;for(var b=0,y=this.length-1;y>=0;y--){var S=this.words[y]|0,v=c.words[y]|0;if(S!==v){S<v?b=-1:S>v&&(b=1);break}}return b},i.prototype.gtn=function(c){return this.cmpn(c)===1},i.prototype.gt=function(c){return this.cmp(c)===1},i.prototype.gten=function(c){return this.cmpn(c)>=0},i.prototype.gte=function(c){return this.cmp(c)>=0},i.prototype.ltn=function(c){return this.cmpn(c)===-1},i.prototype.lt=function(c){return this.cmp(c)===-1},i.prototype.lten=function(c){return this.cmpn(c)<=0},i.prototype.lte=function(c){return this.cmp(c)<=0},i.prototype.eqn=function(c){return this.cmpn(c)===0},i.prototype.eq=function(c){return this.cmp(c)===0},i.red=function(c){return new O(c)},i.prototype.toRed=function(c){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),c.convertTo(this)._forceRed(c)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(c){return this.red=c,this},i.prototype.forceRed=function(c){return r(!this.red,"Already a number in reduction context"),this._forceRed(c)},i.prototype.redAdd=function(c){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,c)},i.prototype.redIAdd=function(c){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,c)},i.prototype.redSub=function(c){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,c)},i.prototype.redISub=function(c){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,c)},i.prototype.redShl=function(c){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,c)},i.prototype.redMul=function(c){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.mul(this,c)},i.prototype.redIMul=function(c){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.imul(this,c)},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(c){return r(this.red&&!c.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,c)};var M={k256:null,p224:null,p192:null,p25519:null};function $(B,c){this.name=B,this.p=new i(c,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var c=new i(null);return c.words=new Array(Math.ceil(this.n/13)),c},$.prototype.ireduce=function(c){var b=c,y;do this.split(b,this.tmp),b=this.imulK(b),b=b.iadd(this.tmp),y=b.bitLength();while(y>this.n);var S=y<this.n?-1:b.ucmp(this.p);return S===0?(b.words[0]=0,b.length=1):S>0?b.isub(this.p):b.strip!==void 0?b.strip():b._strip(),b},$.prototype.split=function(c,b){c.iushrn(this.n,0,b)},$.prototype.imulK=function(c){return c.imul(this.k)};function G(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(G,$),G.prototype.split=function(c,b){for(var y=4194303,S=Math.min(c.length,9),v=0;v<S;v++)b.words[v]=c.words[v];if(b.length=S,c.length<=9){c.words[0]=0,c.length=1;return}var U=c.words[9];for(b.words[b.length++]=U&y,v=10;v<c.length;v++){var W=c.words[v]|0;c.words[v-10]=(W&y)<<4|U>>>22,U=W}U>>>=22,c.words[v-10]=U,U===0&&c.length>10?c.length-=10:c.length-=9},G.prototype.imulK=function(c){c.words[c.length]=0,c.words[c.length+1]=0,c.length+=2;for(var b=0,y=0;y<c.length;y++){var S=c.words[y]|0;b+=S*977,c.words[y]=b&67108863,b=S*64+(b/67108864|0)}return c.words[c.length-1]===0&&(c.length--,c.words[c.length-1]===0&&c.length--),c};function Y(){$.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}s(Y,$);function L(){$.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}s(L,$);function j(){$.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}s(j,$),j.prototype.imulK=function(c){for(var b=0,y=0;y<c.length;y++){var S=(c.words[y]|0)*19+b,v=S&67108863;S>>>=26,c.words[y]=v,b=S}return b!==0&&(c.words[c.length++]=b),c},i._prime=function(c){if(M[c])return M[c];var b;if(c==="k256")b=new G;else if(c==="p224")b=new Y;else if(c==="p192")b=new L;else if(c==="p25519")b=new j;else throw new Error("Unknown prime "+c);return M[c]=b,b};function O(B){if(typeof B=="string"){var c=i._prime(B);this.m=c.p,this.prime=c}else r(B.gtn(1),"modulus must be greater than 1"),this.m=B,this.prime=null}O.prototype._verify1=function(c){r(c.negative===0,"red works only with positives"),r(c.red,"red works only with red numbers")},O.prototype._verify2=function(c,b){r((c.negative|b.negative)===0,"red works only with positives"),r(c.red&&c.red===b.red,"red works only with red numbers")},O.prototype.imod=function(c){return this.prime?this.prime.ireduce(c)._forceRed(this):(m(c,c.umod(this.m)._forceRed(this)),c)},O.prototype.neg=function(c){return c.isZero()?c.clone():this.m.sub(c)._forceRed(this)},O.prototype.add=function(c,b){this._verify2(c,b);var y=c.add(b);return y.cmp(this.m)>=0&&y.isub(this.m),y._forceRed(this)},O.prototype.iadd=function(c,b){this._verify2(c,b);var y=c.iadd(b);return y.cmp(this.m)>=0&&y.isub(this.m),y},O.prototype.sub=function(c,b){this._verify2(c,b);var y=c.sub(b);return y.cmpn(0)<0&&y.iadd(this.m),y._forceRed(this)},O.prototype.isub=function(c,b){this._verify2(c,b);var y=c.isub(b);return y.cmpn(0)<0&&y.iadd(this.m),y},O.prototype.shl=function(c,b){return this._verify1(c),this.imod(c.ushln(b))},O.prototype.imul=function(c,b){return this._verify2(c,b),this.imod(c.imul(b))},O.prototype.mul=function(c,b){return this._verify2(c,b),this.imod(c.mul(b))},O.prototype.isqr=function(c){return this.imul(c,c.clone())},O.prototype.sqr=function(c){return this.mul(c,c)},O.prototype.sqrt=function(c){if(c.isZero())return c.clone();var b=this.m.andln(3);if(r(b%2===1),b===3){var y=this.m.add(new i(1)).iushrn(2);return this.pow(c,y)}for(var S=this.m.subn(1),v=0;!S.isZero()&&S.andln(1)===0;)v++,S.iushrn(1);r(!S.isZero());var U=new i(1).toRed(this),W=U.redNeg(),A=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new i(2*h*h).toRed(this);this.pow(h,A).cmp(W)!==0;)h.redIAdd(W);for(var T=this.pow(h,S),se=this.pow(c,S.addn(1).iushrn(1)),Z=this.pow(c,S),ee=v;Z.cmp(U)!==0;){for(var ve=Z,le=0;ve.cmp(U)!==0;le++)ve=ve.redSqr();r(le<ee);var be=this.pow(T,new i(1).iushln(ee-le-1));se=se.redMul(be),T=be.redSqr(),Z=Z.redMul(T),ee=le}return se},O.prototype.invm=function(c){var b=c._invmp(this.m);return b.negative!==0?(b.negative=0,this.imod(b).redNeg()):this.imod(b)},O.prototype.pow=function(c,b){if(b.isZero())return new i(1).toRed(this);if(b.cmpn(1)===0)return c.clone();var y=4,S=new Array(1<<y);S[0]=new i(1).toRed(this),S[1]=c;for(var v=2;v<S.length;v++)S[v]=this.mul(S[v-1],c);var U=S[0],W=0,A=0,h=b.bitLength()%26;for(h===0&&(h=26),v=b.length-1;v>=0;v--){for(var T=b.words[v],se=h-1;se>=0;se--){var Z=T>>se&1;if(U!==S[0]&&(U=this.sqr(U)),Z===0&&W===0){A=0;continue}W<<=1,W|=Z,A++,!(A!==y&&(v!==0||se!==0))&&(U=this.mul(U,S[W]),A=0,W=0)}h=26}return U},O.prototype.convertTo=function(c){var b=c.umod(this.m);return b===c?b.clone():b},O.prototype.convertFrom=function(c){var b=c.clone();return b.red=null,b},i.mont=function(c){return new q(c)};function q(B){O.call(this,B),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(q,O),q.prototype.convertTo=function(c){return this.imod(c.ushln(this.shift))},q.prototype.convertFrom=function(c){var b=this.imod(c.mul(this.rinv));return b.red=null,b},q.prototype.imul=function(c,b){if(c.isZero()||b.isZero())return c.words[0]=0,c.length=1,c;var y=c.imul(b),S=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),v=y.isub(S).iushrn(this.shift),U=v;return v.cmp(this.m)>=0?U=v.isub(this.m):v.cmpn(0)<0&&(U=v.iadd(this.m)),U._forceRed(this)},q.prototype.mul=function(c,b){if(c.isZero()||b.isZero())return new i(0)._forceRed(this);var y=c.mul(b),S=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),v=y.isub(S).iushrn(this.shift),U=v;return v.cmp(this.m)>=0?U=v.isub(this.m):v.cmpn(0)<0&&(U=v.iadd(this.m)),U._forceRed(this)},q.prototype.invm=function(c){var b=this.imod(c._invmp(this.m).mul(this.r2));return b._forceRed(this)}})(t,an)})(pl);var yl=pl.exports;const Ac=Js(yl),Y0="6.13.5";function O2(t,e,n){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 t===e)return}const s=new Error(`invalid value for type ${e}`);throw s.code="INVALID_ARGUMENT",s.argument=`value.${n}`,s.value=t,s}async function N2(t){const e=Object.keys(t);return(await Promise.all(e.map(r=>Promise.resolve(t[r])))).reduce((r,s,i)=>(r[e[i]]=s,r),{})}function Bc(t,e,n){for(let r in e){let s=e[r];const i=n?n[r]:null;i&&O2(s,i,r),Object.defineProperty(t,r,{enumerable:!0,value:s,writable:!1})}}function Vr(t){if(t==null)return"null";if(Array.isArray(t))return"[ "+t.map(Vr).join(", ")+" ]";if(t instanceof Uint8Array){const e="0123456789abcdef";let n="0x";for(let r=0;r<t.length;r++)n+=e[t[r]>>4],n+=e[t[r]&15];return n}if(typeof t=="object"&&typeof t.toJSON=="function")return Vr(t.toJSON());switch(typeof t){case"boolean":case"symbol":return t.toString();case"bigint":return BigInt(t).toString();case"number":return t.toString();case"string":return JSON.stringify(t);case"object":{const e=Object.keys(t);return e.sort(),"{ "+e.map(n=>`${Vr(n)}: ${Vr(t[n])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function X0(t,e){return t&&t.code===e}function z2(t){return X0(t,"CALL_EXCEPTION")}function Z0(t,e,n){let r=t;{const i=[];if(n){if("message"in n||"code"in n||"name"in n)throw new Error(`value will overwrite populated values: ${Vr(n)}`);for(const o in n){if(o==="shortMessage")continue;const a=n[o];i.push(o+"="+Vr(a))}}i.push(`code=${e}`),i.push(`version=${Y0}`),i.length&&(t+=" ("+i.join(", ")+")")}let s;switch(e){case"INVALID_ARGUMENT":s=new TypeError(t);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":s=new RangeError(t);break;default:s=new Error(t)}return Bc(s,{code:e}),n&&Object.assign(s,n),s.shortMessage==null&&Bc(s,{shortMessage:r}),s}function Un(t,e,n,r){if(!t)throw Z0(e,n,r)}function tr(t,e,n,r){Un(t,e,"INVALID_ARGUMENT",{argument:n,value:r})}function H2(t,e,n){n==null&&(n=""),n&&(n=": "+n),Un(t>=e,"missing argument"+n,"MISSING_ARGUMENT",{count:t,expectedCount:e}),Un(t<=e,"too many arguments"+n,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}const q2=["NFD","NFC","NFKD","NFKC"].reduce((t,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"&&"é".normalize("NFD")!=="é")throw new Error("broken");t.push(e)}catch{}return t},[]);function K2(t){Un(q2.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function $2(t,e,n){if(n==null&&(n=""),t!==e){let r=n,s="new";n&&(r+=".",s+=" "+n),Un(!1,`private constructor; use ${r}from* methods`,"UNSUPPORTED_OPERATION",{operation:s})}}function J0(t,e,n){if(t instanceof Uint8Array)return n?new Uint8Array(t):t;if(typeof t=="string"&&t.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const r=new Uint8Array((t.length-2)/2);let s=2;for(let i=0;i<r.length;i++)r[i]=parseInt(t.substring(s,s+2),16),s+=2;return r}tr(!1,"invalid BytesLike value",e||"value",t)}function Wr(t,e){return J0(t,e,!1)}function j2(t,e){return J0(t,e,!0)}function gl(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||typeof e=="number"&&t.length!==2+2*e||e===!0&&t.length%2!==0)}function V2(t){return gl(t,!0)||t instanceof Uint8Array}const uu="0123456789abcdef";function ci(t){const e=Wr(t);let n="0x";for(let r=0;r<e.length;r++){const s=e[r];n+=uu[(s&240)>>4]+uu[s&15]}return n}function G2(t){return"0x"+t.map(e=>ci(e).substring(2)).join("")}function Y2(t){return gl(t,!0)?(t.length-2)/2:Wr(t).length}function X2(t,e,n){const r=Wr(t);return n!=null&&n>r.length&&Un(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:n}),ci(r.slice(e??0,n??r.length))}function Q0(t,e,n){const r=Wr(t);Un(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),n?s.set(r,e-r.length):s.set(r,0),ci(s)}function Z2(t,e){return Q0(t,e,!0)}function J2(t,e){return Q0(t,e,!1)}function Vs(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function wl(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function Q2(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Vs(t.outputLen),Vs(t.blockLen)}function xc(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function eh(t,e){wl(t);const n=e.outputLen;if(t.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}const Ia=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const th=t=>t instanceof Uint8Array,nh=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),e8=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),t8=(t,e)=>t<<32-e|t>>>e,n8=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!n8)throw new Error("Non little-endian hardware is not supported");const r8=async()=>{};async function s8(t,e,n){let r=Date.now();for(let s=0;s<t;s++){n(s);const i=Date.now()-r;i>=0&&i<e||(await r8(),r+=i)}}function i8(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function El(t){if(typeof t=="string"&&(t=i8(t)),!th(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}function o8(...t){const e=new Uint8Array(t.reduce((r,s)=>r+s.length,0));let n=0;return t.forEach(r=>{if(!th(r))throw new Error("Uint8Array expected");e.set(r,n),n+=r.length}),e}class rh{clone(){return this._cloneInto()}}const a8={}.toString;function c8(t,e){if(e!==void 0&&a8.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(t,e)}function sh(t){const e=r=>t().update(El(r)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function l8(t=32){if(Ia&&typeof Ia.getRandomValues=="function")return Ia.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}const Ai=BigInt(2**32-1),Cc=BigInt(32);function ih(t,e=!1){return e?{h:Number(t&Ai),l:Number(t>>Cc&Ai)}:{h:Number(t>>Cc&Ai)|0,l:Number(t&Ai)|0}}function oh(t,e=!1){let n=new Uint32Array(t.length),r=new Uint32Array(t.length);for(let s=0;s<t.length;s++){const{h:i,l:o}=ih(t[s],e);[n[s],r[s]]=[i,o]}return[n,r]}const d8=(t,e)=>BigInt(t>>>0)<<Cc|BigInt(e>>>0),u8=(t,e,n)=>t>>>n,f8=(t,e,n)=>t<<32-n|e>>>n,h8=(t,e,n)=>t>>>n|e<<32-n,m8=(t,e,n)=>t<<32-n|e>>>n,b8=(t,e,n)=>t<<64-n|e>>>n-32,p8=(t,e,n)=>t>>>n-32|e<<64-n,y8=(t,e)=>e,g8=(t,e)=>t,ah=(t,e,n)=>t<<n|e>>>32-n,ch=(t,e,n)=>e<<n|t>>>32-n,lh=(t,e,n)=>e<<n-32|t>>>64-n,dh=(t,e,n)=>t<<n-32|e>>>64-n;function w8(t,e,n,r){const s=(e>>>0)+(r>>>0);return{h:t+n+(s/2**32|0)|0,l:s|0}}const E8=(t,e,n)=>(t>>>0)+(e>>>0)+(n>>>0),A8=(t,e,n,r)=>e+n+r+(t/2**32|0)|0,B8=(t,e,n,r)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0),x8=(t,e,n,r,s)=>e+n+r+s+(t/2**32|0)|0,C8=(t,e,n,r,s)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0)+(s>>>0),S8=(t,e,n,r,s,i)=>e+n+r+s+i+(t/2**32|0)|0,D8={fromBig:ih,split:oh,toBig:d8,shrSH:u8,shrSL:f8,rotrSH:h8,rotrSL:m8,rotrBH:b8,rotrBL:p8,rotr32H:y8,rotr32L:g8,rotlSH:ah,rotlSL:ch,rotlBH:lh,rotlBL:dh,add:w8,add3L:E8,add3H:A8,add4L:B8,add4H:x8,add5H:S8,add5L:C8},[uh,fh,hh]=[[],[],[]],v8=BigInt(0),Ds=BigInt(1),k8=BigInt(2),F8=BigInt(7),T8=BigInt(256),I8=BigInt(113);for(let t=0,e=Ds,n=1,r=0;t<24;t++){[n,r]=[r,(2*n+3*r)%5],uh.push(2*(5*r+n)),fh.push((t+1)*(t+2)/2%64);let s=v8;for(let i=0;i<7;i++)e=(e<<Ds^(e>>F8)*I8)%T8,e&k8&&(s^=Ds<<(Ds<<BigInt(i))-Ds);hh.push(s)}const[U8,_8]=oh(hh,!0),fu=(t,e,n)=>n>32?lh(t,e,n):ah(t,e,n),hu=(t,e,n)=>n>32?dh(t,e,n):ch(t,e,n);function M8(t,e=24){const n=new Uint32Array(10);for(let r=24-e;r<24;r++){for(let o=0;o<10;o++)n[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,l=(o+2)%10,f=n[l],m=n[l+1],p=fu(f,m,1)^n[a],C=hu(f,m,1)^n[a+1];for(let w=0;w<50;w+=10)t[o+w]^=p,t[o+w+1]^=C}let s=t[2],i=t[3];for(let o=0;o<24;o++){const a=fh[o],l=fu(s,i,a),f=hu(s,i,a),m=uh[o];s=t[m],i=t[m+1],t[m]=l,t[m+1]=f}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)n[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~n[(a+2)%10]&n[(a+4)%10]}t[0]^=U8[r],t[1]^=_8[r]}n.fill(0)}class Al extends rh{constructor(e,n,r,s=!1,i=24){if(super(),this.blockLen=e,this.suffix=n,this.outputLen=r,this.enableXOF=s,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Vs(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=nh(this.state)}keccak(){M8(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){xc(this);const{blockLen:n,state:r}=this;e=El(e);const s=e.length;for(let i=0;i<s;){const o=Math.min(n-this.pos,s-i);for(let a=0;a<o;a++)r[this.pos++]^=e[i++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:n,pos:r,blockLen:s}=this;e[r]^=n,n&128&&r===s-1&&this.keccak(),e[s-1]^=128,this.keccak()}writeInto(e){xc(this,!1),wl(e),this.finish();const n=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(n.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 Vs(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(eh(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:n,suffix:r,outputLen:s,rounds:i,enableXOF:o}=this;return e||(e=new Al(n,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 R8=(t,e,n)=>sh(()=>new Al(e,t,n)),W8=R8(1,136,256/8);let mh=!1;const bh=function(t){return W8(t)};let ph=bh;function ys(t){const e=Wr(t,"data");return ci(ph(e))}ys._=bh;ys.lock=function(){mh=!0};ys.register=function(t){if(mh)throw new TypeError("keccak256 is locked");ph=t};Object.freeze(ys);const P8=BigInt(0),L8=BigInt(36);function mu(t){t=t.toLowerCase();const e=t.substring(2).split(""),n=new Uint8Array(40);for(let s=0;s<40;s++)n[s]=e[s].charCodeAt(0);const r=Wr(ys(n));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 Bl={};for(let t=0;t<10;t++)Bl[String(t)]=String(t);for(let t=0;t<26;t++)Bl[String.fromCharCode(65+t)]=String(10+t);const bu=15;function O8(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(r=>Bl[r]).join("");for(;e.length>=bu;){let r=e.substring(0,bu);e=parseInt(r,10)%97+e.substring(r.length)}let n=String(98-parseInt(e,10)%97);for(;n.length<2;)n="0"+n;return n}const N8=function(){const t={};for(let e=0;e<36;e++){const n="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[n]=BigInt(e)}return t}();function z8(t){t=t.toLowerCase();let e=P8;for(let n=0;n<t.length;n++)e=e*L8+N8[t[n]];return e}function xr(t){if(tr(typeof t=="string","invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/)){t.startsWith("0x")||(t="0x"+t);const e=mu(t);return tr(!t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||e===t,"bad address checksum","address",t),e}if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){tr(t.substring(2,4)===O8(t),"bad icap checksum","address",t);let e=z8(t.substring(4)).toString(16);for(;e.length<40;)e="0"+e;return mu("0x"+e)}tr(!1,"invalid address","address",t)}function yh(t){return t&&typeof t.getAddress=="function"}function H8(t){try{return xr(t),!0}catch{}return!1}async function Ua(t,e){const n=await e;return(n==null||n==="0x0000000000000000000000000000000000000000")&&(Un(typeof t!="string","unconfigured name","UNCONFIGURED_NAME",{value:t}),tr(!1,"invalid AddressLike value; did not resolve to a value address","target",t)),xr(n)}function q8(t,e){if(typeof t=="string")return t.match(/^0x[0-9a-f]{40}$/i)?xr(t):(Un(e!=null,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),Ua(t,e.resolveName(t)));if(yh(t))return Ua(t,t.getAddress());if(t&&typeof t.then=="function")return Ua(t,t);tr(!1,"unsupported addressable value","target",t)}const K8=0,$8=0n,xl="Evm",j8=(t,e)=>({...t,from:e}),V8=(t,e)=>({...t,chainId:e}),G8="0x0000000000000000000000000000000000000000",Qt=class Qt{constructor(e){ie(this,"type","Native");ie(this,"address");if(Qt.instanceof(e)){const n=e;this.address=n.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=xr(e)}else if(e instanceof Uint8Array)e=this.trimUniversalAddress(e),this.address=xr(At.encode(e));else if(St.instanceof(e)){const n=this.trimUniversalAddress(e.toUint8Array());this.address=xr(At.encode(n))}else throw new Error(`Invalid EVM address ${e}`)}unwrap(){return this.address}toString(){return this.address}toNative(){return this}toUint8Array(){return At.decode(this.address)}toUniversalAddress(){return new St(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!==St.byteSize)throw new Error(`Invalid universal address, expected ${St.byteSize} bytes`);if(Us.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 H8(e)}static instanceof(e){return e.constructor.platform===Qt.platform}equals(e){return Qt.instanceof(e)?e.address===this.address:e.equals(this.toUniversalAddress())}};ie(Qt,"byteSize",20),ie(Qt,"platform",xl);let to=Qt;tl(xl,to);var Bi=G0.Buffer;function Y8(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),n=0;n<e.length;n++)e[n]=255;for(var r=0;r<t.length;r++){var s=t.charAt(r),i=s.charCodeAt(0);if(e[i]!==255)throw new TypeError(s+" is ambiguous");e[i]=r}var o=t.length,a=t.charAt(0),l=Math.log(o)/Math.log(256),f=Math.log(256)/Math.log(o);function m(w){if((Array.isArray(w)||w instanceof Uint8Array)&&(w=Bi.from(w)),!Bi.isBuffer(w))throw new TypeError("Expected Buffer");if(w.length===0)return"";for(var F=0,I=0,x=0,E=w.length;x!==E&&w[x]===0;)x++,F++;for(var _=(E-x)*f+1>>>0,k=new Uint8Array(_);x!==E;){for(var P=w[x],M=0,$=_-1;(P!==0||M<I)&&$!==-1;$--,M++)P+=256*k[$]>>>0,k[$]=P%o>>>0,P=P/o>>>0;if(P!==0)throw new Error("Non-zero carry");I=M,x++}for(var G=_-I;G!==_&&k[G]===0;)G++;for(var Y=a.repeat(F);G<_;++G)Y+=t.charAt(k[G]);return Y}function p(w){if(typeof w!="string")throw new TypeError("Expected String");if(w.length===0)return Bi.alloc(0);for(var F=0,I=0,x=0;w[F]===a;)I++,F++;for(var E=(w.length-F)*l+1>>>0,_=new Uint8Array(E);F<w.length;){var k=w.charCodeAt(F);if(k>255)return;var P=e[k];if(P===255)return;for(var M=0,$=E-1;(P!==0||M<x)&&$!==-1;$--,M++)P+=o*_[$]>>>0,_[$]=P%256>>>0,P=P/256>>>0;if(P!==0)throw new Error("Non-zero carry");x=M,F++}for(var G=E-x;G!==E&&_[G]===0;)G++;var Y=Bi.allocUnsafe(I+(E-G));Y.fill(0,0,I);for(var L=I;G!==E;)Y[L++]=_[G++];return Y}function C(w){var F=p(w);if(F)return F;throw new Error("Non-base"+o+" character")}return{encode:m,decodeUnsafe:p,decode:C}}var X8=Y8,Z8=X8,J8="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",gh=Z8(J8);const Ct=Js(gh);var Ft={};function Hn(t,e,n){return e<=t&&t<=n}function Ro(t){if(t===void 0)return{};if(t===Object(t))return t;throw TypeError("Could not convert argument to dictionary")}function Q8(t){for(var e=String(t),n=e.length,r=0,s=[];r<n;){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===n-1)s.push(65533);else{var o=t.charCodeAt(r+1);if(56320<=o&&o<=57343){var a=i&1023,l=o&1023;s.push(65536+(a<<10)+l),r+=1}else s.push(65533)}r+=1}return s}function e3(t){for(var e="",n=0;n<t.length;++n){var r=t[n];r<=65535?e+=String.fromCharCode(r):(r-=65536,e+=String.fromCharCode((r>>10)+55296,(r&1023)+56320))}return e}var no=-1;function Cl(t){this.tokens=[].slice.call(t)}Cl.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():no},prepend:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.unshift(e.pop());else this.tokens.unshift(t)},push:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.push(e.shift());else this.tokens.push(t)}};var is=-1;function _a(t,e){if(t)throw TypeError("Decoder error");return e||65533}var ro="utf-8";function so(t,e){if(!(this instanceof so))return new so(t,e);if(t=t!==void 0?String(t).toLowerCase():ro,t!==ro)throw new Error("Encoding not supported. Only utf-8 is supported");e=Ro(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})}so.prototype={decode:function(e,n){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),n=Ro(n),this._streaming||(this._decoder=new t3({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!n.stream;for(var s=new Cl(r),i=[],o;!s.endOfStream()&&(o=this._decoder.handler(s,s.read()),o!==is);)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===is)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),e3(i)}};function io(t,e){if(!(this instanceof io))return new io(t,e);if(t=t!==void 0?String(t).toLowerCase():ro,t!==ro)throw new Error("Encoding not supported. Only utf-8 is supported");e=Ro(e),this._streaming=!1,this._encoder=null,this._options={fatal:!!e.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}io.prototype={encode:function(e,n){e=e?String(e):"",n=Ro(n),this._streaming||(this._encoder=new n3(this._options)),this._streaming=!!n.stream;for(var r=[],s=new Cl(Q8(e)),i;!s.endOfStream()&&(i=this._encoder.handler(s,s.read()),i!==is);)Array.isArray(i)?r.push.apply(r,i):r.push(i);if(!this._streaming){for(;i=this._encoder.handler(s,s.read()),i!==is;)Array.isArray(i)?r.push.apply(r,i):r.push(i);this._encoder=null}return new Uint8Array(r)}};function t3(t){var e=t.fatal,n=0,r=0,s=0,i=128,o=191;this.handler=function(a,l){if(l===no&&s!==0)return s=0,_a(e);if(l===no)return is;if(s===0){if(Hn(l,0,127))return l;if(Hn(l,194,223))s=1,n=l-192;else if(Hn(l,224,239))l===224&&(i=160),l===237&&(o=159),s=2,n=l-224;else if(Hn(l,240,244))l===240&&(i=144),l===244&&(o=143),s=3,n=l-240;else return _a(e);return n=n<<6*s,null}if(!Hn(l,i,o))return n=s=r=0,i=128,o=191,a.prepend(l),_a(e);if(i=128,o=191,r+=1,n+=l-128<<6*(s-r),r!==s)return null;var f=n;return n=s=r=0,f}}function n3(t){t.fatal,this.handler=function(e,n){if(n===no)return is;if(Hn(n,0,127))return n;var r,s;Hn(n,128,2047)?(r=1,s=192):Hn(n,2048,65535)?(r=2,s=224):Hn(n,65536,1114111)&&(r=3,s=240);for(var i=[(n>>6*r)+s];r>0;){var o=n>>6*(r-1);i.push(128|o&63),r-=1}return i}}const r3=Object.freeze(Object.defineProperty({__proto__:null,TextDecoder:so,TextEncoder:io},Symbol.toStringTag,{value:"Module"})),s3=Ic(r3);var i3=an&&an.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),o3=an&&an.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Rn=an&&an.__decorate||function(t,e,n,r){var s=arguments.length,i=s<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s<3?o(i):s>3?o(e,n,i):o(e,n))||i);return s>3&&i&&Object.defineProperty(e,n,i),i},a3=an&&an.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.hasOwnProperty.call(t,n)&&i3(e,t,n);return o3(e,t),e},wh=an&&an.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ft,"__esModule",{value:!0});var Eh=Ft.deserializeUnchecked=Dh=Ft.deserialize=Sh=Ft.serialize=Ft.BinaryReader=Ft.BinaryWriter=Ft.BorshError=Ft.baseDecode=Ft.baseEncode=void 0;const nr=wh(yl),Ah=wh(gh),c3=a3(s3),l3=typeof TextDecoder!="function"?c3.TextDecoder:TextDecoder,d3=new l3("utf-8",{fatal:!0});function u3(t){return typeof t=="string"&&(t=Ne.Buffer.from(t,"utf8")),Ah.default.encode(Ne.Buffer.from(t))}Ft.baseEncode=u3;function f3(t){return Ne.Buffer.from(Ah.default.decode(t))}Ft.baseDecode=f3;const Ma=1024;class Nt 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(".")}}Ft.BorshError=Nt;class Bh{constructor(){this.buf=Ne.Buffer.alloc(Ma),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=Ne.Buffer.concat([this.buf,Ne.Buffer.alloc(Ma)]))}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(Ne.Buffer.from(new nr.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(Ne.Buffer.from(new nr.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(Ne.Buffer.from(new nr.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(Ne.Buffer.from(new nr.default(e).toArray("le",64)))}writeBuffer(e){this.buf=Ne.Buffer.concat([Ne.Buffer.from(this.buf.subarray(0,this.length)),e,Ne.Buffer.alloc(Ma)]),this.length+=e.length}writeString(e){this.maybeResize();const n=Ne.Buffer.from(e,"utf8");this.writeU32(n.length),this.writeBuffer(n)}writeFixedArray(e){this.writeBuffer(Ne.Buffer.from(e))}writeArray(e,n){this.maybeResize(),this.writeU32(e.length);for(const r of e)this.maybeResize(),n(r)}toArray(){return this.buf.subarray(0,this.length)}}Ft.BinaryWriter=Bh;function Wn(t,e,n){const r=n.value;n.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 Nt("Reached the end of buffer when deserializing")}throw i}}}class Zt{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 nr.default(e,"le")}readU128(){const e=this.readBuffer(16);return new nr.default(e,"le")}readU256(){const e=this.readBuffer(32);return new nr.default(e,"le")}readU512(){const e=this.readBuffer(64);return new nr.default(e,"le")}readBuffer(e){if(this.offset+e>this.buf.length)throw new Nt(`Expected buffer length ${e} isn't within bounds`);const n=this.buf.slice(this.offset,this.offset+e);return this.offset+=e,n}readString(){const e=this.readU32(),n=this.readBuffer(e);try{return d3.decode(n)}catch(r){throw new Nt(`Error decoding UTF-8 string: ${r}`)}}readFixedArray(e){return new Uint8Array(this.readBuffer(e))}readArray(e){const n=this.readU32(),r=Array();for(let s=0;s<n;++s)r.push(e());return r}}Rn([Wn],Zt.prototype,"readU8",null);Rn([Wn],Zt.prototype,"readU16",null);Rn([Wn],Zt.prototype,"readU32",null);Rn([Wn],Zt.prototype,"readU64",null);Rn([Wn],Zt.prototype,"readU128",null);Rn([Wn],Zt.prototype,"readU256",null);Rn([Wn],Zt.prototype,"readU512",null);Rn([Wn],Zt.prototype,"readString",null);Rn([Wn],Zt.prototype,"readFixedArray",null);Rn([Wn],Zt.prototype,"readArray",null);Ft.BinaryReader=Zt;function xh(t){return t.charAt(0).toUpperCase()+t.slice(1)}function ur(t,e,n,r,s){try{if(typeof r=="string")s[`write${xh(r)}`](n);else if(r instanceof Array)if(typeof r[0]=="number"){if(n.length!==r[0])throw new Nt(`Expecting byte array of length ${r[0]}, but got ${n.length} bytes`);s.writeFixedArray(n)}else if(r.length===2&&typeof r[1]=="number"){if(n.length!==r[1])throw new Nt(`Expecting byte array of length ${r[1]}, but got ${n.length} bytes`);for(let i=0;i<r[1];i++)ur(t,null,n[i],r[0],s)}else s.writeArray(n,i=>{ur(t,e,i,r[0],s)});else if(r.kind!==void 0)switch(r.kind){case"option":{n==null?s.writeU8(0):(s.writeU8(1),ur(t,e,n,r.type,s));break}case"map":{s.writeU32(n.size),n.forEach((i,o)=>{ur(t,e,o,r.key,s),ur(t,e,i,r.value,s)});break}default:throw new Nt(`FieldType ${r} unrecognized`)}else Ch(t,n,s)}catch(i){throw i instanceof Nt&&i.addToFieldPath(e),i}}function Ch(t,e,n){if(typeof e.borshSerialize=="function"){e.borshSerialize(n);return}const r=t.get(e.constructor);if(!r)throw new Nt(`Class ${e.constructor.name} is missing in schema`);if(r.kind==="struct")r.fields.map(([s,i])=>{ur(t,s,e[s],i,n)});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){n.writeU8(i),ur(t,o,e[o],a,n);break}}}else throw new Nt(`Unexpected schema kind: ${r.kind} for ${e.constructor.name}`)}function h3(t,e,n=Bh){const r=new n;return Ch(t,e,r),r.toArray()}var Sh=Ft.serialize=h3;function fr(t,e,n,r){try{if(typeof n=="string")return r[`read${xh(n)}`]();if(n instanceof Array){if(typeof n[0]=="number")return r.readFixedArray(n[0]);if(typeof n[1]=="number"){const s=[];for(let i=0;i<n[1];i++)s.push(fr(t,null,n[0],r));return s}else return r.readArray(()=>fr(t,e,n[0],r))}if(n.kind==="option")return r.readU8()?fr(t,e,n.type,r):void 0;if(n.kind==="map"){let s=new Map;const i=r.readU32();for(let o=0;o<i;o++){const a=fr(t,e,n.key,r),l=fr(t,e,n.value,r);s.set(a,l)}return s}return Sl(t,n,r)}catch(s){throw s instanceof Nt&&s.addToFieldPath(e),s}}function Sl(t,e,n){if(typeof e.borshDeserialize=="function")return e.borshDeserialize(n);const r=t.get(e);if(!r)throw new Nt(`Class ${e.name} is missing in schema`);if(r.kind==="struct"){const s={};for(const[i,o]of t.get(e).fields)s[i]=fr(t,i,o,n);return new e(s)}if(r.kind==="enum"){const s=n.readU8();if(s>=r.values.length)throw new Nt(`Enum index: ${s} is out of range`);const[i,o]=r.values[s],a=fr(t,i,o,n);return new e({[i]:a})}throw new Nt(`Unexpected schema kind: ${r.kind} for ${e.constructor.name}`)}function m3(t,e,n,r=Zt){const s=new r(n),i=Sl(t,e,s);if(s.offset<n.length)throw new Nt(`Unexpected ${n.length-s.offset} bytes after deserialized data`);return i}var Dh=Ft.deserialize=m3;function b3(t,e,n,r=Zt){const s=new r(n);return Sl(t,e,s)}Eh=Ft.deserializeUnchecked=b3;var H={};Object.defineProperty(H,"__esModule",{value:!0});exports.s16=H.s16=H.s8=H.nu64be=H.u48be=H.u40be=H.u32be=H.u24be=H.u16be=vt=H.nu64=H.u48=H.u40=exports.u32=H.u32=H.u24=exports.u16=H.u16=exports.u8=H.u8=sr=H.offset=exports.greedy=H.greedy=H.Constant=H.UTF8=H.CString=H.Blob=H.Boolean=H.BitField=H.BitStructure=H.VariantLayout=H.Union=H.UnionLayoutDiscriminator=H.UnionDiscriminator=H.Structure=H.Sequence=H.DoubleBE=H.Double=H.FloatBE=H.Float=H.NearInt64BE=H.NearInt64=H.NearUInt64BE=H.NearUInt64=H.IntBE=H.Int=H.UIntBE=H.UInt=H.OffsetLayout=H.GreedyCount=H.ExternalLayout=H.bindConstructorLayout=H.nameWithProperty=H.Layout=H.uint8ArrayToBuffer=H.checkUint8Array=void 0;H.constant=H.utf8=H.cstr=exports.blob=H.blob=H.unionLayoutDiscriminator=H.union=exports.seq=H.seq=H.bits=exports.struct=H.struct=H.f64be=H.f64=H.f32be=H.f32=H.ns64be=H.s48be=H.s40be=H.s32be=H.s24be=H.s16be=exports.ns64=H.ns64=H.s48=H.s40=H.s32=H.s24=void 0;const Dl=ae;function gs(t){if(!(t instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}H.checkUint8Array=gs;function De(t){return gs(t),Dl.Buffer.from(t.buffer,t.byteOffset,t.length)}H.uint8ArrayToBuffer=De;class Te{constructor(e,n){if(!Number.isInteger(e))throw new TypeError("span must be an integer");this.span=e,this.property=n}makeDestinationObject(){return{}}getSpan(e,n){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(e){const n=Object.create(this.constructor.prototype);return Object.assign(n,this),n.property=e,n}fromArray(e){}}H.Layout=Te;function vl(t,e){return e.property?t+"["+e.property+"]":t}H.nameWithProperty=vl;function p3(t,e){if(typeof t!="function")throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(t,"layout_"))throw new Error("Class is already bound to a layout");if(!(e&&e instanceof Te))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");t.layout_=e,e.boundConstructor_=t,e.makeDestinationObject=()=>new t,Object.defineProperty(t.prototype,"encode",{value(n,r){return e.encode(this,n,r)},writable:!0}),Object.defineProperty(t,"decode",{value(n,r){return e.decode(n,r)},writable:!0})}H.bindConstructorLayout=p3;class $t extends Te{isCount(){throw new Error("ExternalLayout is abstract")}}H.ExternalLayout=$t;class vh extends $t{constructor(e=1,n){if(!Number.isInteger(e)||0>=e)throw new TypeError("elementSpan must be a (positive) integer");super(-1,n),this.elementSpan=e}isCount(){return!0}decode(e,n=0){gs(e);const r=e.length-n;return Math.floor(r/this.elementSpan)}encode(e,n,r){return 0}}H.GreedyCount=vh;class kl extends $t{constructor(e,n=0,r){if(!(e instanceof Te))throw new TypeError("layout must be a Layout");if(!Number.isInteger(n))throw new TypeError("offset must be integer or undefined");super(e.span,r||e.property),this.layout=e,this.offset=n}isCount(){return this.layout instanceof on||this.layout instanceof mn}decode(e,n=0){return this.layout.decode(e,n+this.offset)}encode(e,n,r=0){return this.layout.encode(e,n,r+this.offset)}}H.OffsetLayout=kl;class on extends Te{constructor(e,n){if(super(e,n),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,n=0){return De(e).readUIntLE(n,this.span)}encode(e,n,r=0){return De(n).writeUIntLE(e,r,this.span),this.span}}H.UInt=on;class mn extends Te{constructor(e,n){if(super(e,n),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,n=0){return De(e).readUIntBE(n,this.span)}encode(e,n,r=0){return De(n).writeUIntBE(e,r,this.span),this.span}}H.UIntBE=mn;class Pr extends Te{constructor(e,n){if(super(e,n),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,n=0){return De(e).readIntLE(n,this.span)}encode(e,n,r=0){return De(n).writeIntLE(e,r,this.span),this.span}}H.Int=Pr;class ws extends Te{constructor(e,n){if(super(e,n),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,n=0){return De(e).readIntBE(n,this.span)}encode(e,n,r=0){return De(n).writeIntBE(e,r,this.span),this.span}}H.IntBE=ws;const Sc=Math.pow(2,32);function Wo(t){const e=Math.floor(t/Sc),n=t-e*Sc;return{hi32:e,lo32:n}}function Po(t,e){return t*Sc+e}class kh extends Te{constructor(e){super(8,e)}decode(e,n=0){const r=De(e),s=r.readUInt32LE(n),i=r.readUInt32LE(n+4);return Po(i,s)}encode(e,n,r=0){const s=Wo(e),i=De(n);return i.writeUInt32LE(s.lo32,r),i.writeUInt32LE(s.hi32,r+4),8}}H.NearUInt64=kh;class Fh extends Te{constructor(e){super(8,e)}decode(e,n=0){const r=De(e),s=r.readUInt32BE(n),i=r.readUInt32BE(n+4);return Po(s,i)}encode(e,n,r=0){const s=Wo(e),i=De(n);return i.writeUInt32BE(s.hi32,r),i.writeUInt32BE(s.lo32,r+4),8}}H.NearUInt64BE=Fh;class Th extends Te{constructor(e){super(8,e)}decode(e,n=0){const r=De(e),s=r.readUInt32LE(n),i=r.readInt32LE(n+4);return Po(i,s)}encode(e,n,r=0){const s=Wo(e),i=De(n);return i.writeUInt32LE(s.lo32,r),i.writeInt32LE(s.hi32,r+4),8}}H.NearInt64=Th;class Ih extends Te{constructor(e){super(8,e)}decode(e,n=0){const r=De(e),s=r.readInt32BE(n),i=r.readUInt32BE(n+4);return Po(s,i)}encode(e,n,r=0){const s=Wo(e),i=De(n);return i.writeInt32BE(s.hi32,r),i.writeUInt32BE(s.lo32,r+4),8}}H.NearInt64BE=Ih;class Uh extends Te{constructor(e){super(4,e)}decode(e,n=0){return De(e).readFloatLE(n)}encode(e,n,r=0){return De(n).writeFloatLE(e,r),4}}H.Float=Uh;class _h extends Te{constructor(e){super(4,e)}decode(e,n=0){return De(e).readFloatBE(n)}encode(e,n,r=0){return De(n).writeFloatBE(e,r),4}}H.FloatBE=_h;class Mh extends Te{constructor(e){super(8,e)}decode(e,n=0){return De(e).readDoubleLE(n)}encode(e,n,r=0){return De(n).writeDoubleLE(e,r),8}}H.Double=Mh;class Rh extends Te{constructor(e){super(8,e)}decode(e,n=0){return De(e).readDoubleBE(n)}encode(e,n,r=0){return De(n).writeDoubleBE(e,r),8}}H.DoubleBE=Rh;class Wh extends Te{constructor(e,n,r){if(!(e instanceof Te))throw new TypeError("elementLayout must be a Layout");if(!(n instanceof $t&&n.isCount()||Number.isInteger(n)&&0<=n))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let s=-1;!(n instanceof $t)&&0<e.span&&(s=n*e.span),super(s,r),this.elementLayout=e,this.count=n}getSpan(e,n=0){if(0<=this.span)return this.span;let r=0,s=this.count;if(s instanceof $t&&(s=s.decode(e,n)),0<this.elementLayout.span)r=s*this.elementLayout.span;else{let i=0;for(;i<s;)r+=this.elementLayout.getSpan(e,n+r),++i}return r}decode(e,n=0){const r=[];let s=0,i=this.count;for(i instanceof $t&&(i=i.decode(e,n));s<i;)r.push(this.elementLayout.decode(e,n)),n+=this.elementLayout.getSpan(e,n),s+=1;return r}encode(e,n,r=0){const s=this.elementLayout,i=e.reduce((o,a)=>o+s.encode(a,n,r+o),0);return this.count instanceof $t&&this.count.encode(e.length,n,r),i}}H.Sequence=Wh;class Ph extends Te{constructor(e,n,r){if(!(Array.isArray(e)&&e.reduce((i,o)=>i&&o instanceof Te,!0)))throw new TypeError("fields must be array of Layout instances");typeof n=="boolean"&&r===void 0&&(r=n,n=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,n),this.fields=e,this.decodePrefixes=!!r}getSpan(e,n=0){if(0<=this.span)return this.span;let r=0;try{r=this.fields.reduce((s,i)=>{const o=i.getSpan(e,n);return n+=o,s+o},0)}catch{throw new RangeError("indeterminate span")}return r}decode(e,n=0){gs(e);const r=this.makeDestinationObject();for(const s of this.fields)if(s.property!==void 0&&(r[s.property]=s.decode(e,n)),n+=s.getSpan(e,n),this.decodePrefixes&&e.length===n)break;return r}encode(e,n,r=0){const s=r;let i=0,o=0;for(const a of this.fields){let l=a.span;if(o=0<l?l:0,a.property!==void 0){const f=e[a.property];f!==void 0&&(o=a.encode(f,n,r),0>l&&(l=a.getSpan(n,r)))}i=r,r+=l}return i+o-s}fromArray(e){const n=this.makeDestinationObject();for(const r of this.fields)r.property!==void 0&&0<e.length&&(n[r.property]=e.shift());return n}layoutFor(e){if(typeof e!="string")throw new TypeError("property must be string");for(const n of this.fields)if(n.property===e)return n}offsetOf(e){if(typeof e!="string")throw new TypeError("property must be string");let n=0;for(const r of this.fields){if(r.property===e)return n;0>r.span?n=-1:0<=n&&(n+=r.span)}}}H.Structure=Ph;class Fl{constructor(e){this.property=e}decode(e,n){throw new Error("UnionDiscriminator is abstract")}encode(e,n,r){throw new Error("UnionDiscriminator is abstract")}}H.UnionDiscriminator=Fl;class oo extends Fl{constructor(e,n){if(!(e instanceof $t&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(n||e.property||"variant"),this.layout=e}decode(e,n){return this.layout.decode(e,n)}encode(e,n,r){return this.layout.encode(e,n,r)}}H.UnionLayoutDiscriminator=oo;class Tl extends Te{constructor(e,n,r){let s;if(e instanceof on||e instanceof mn)s=new oo(new kl(e));else if(e instanceof $t&&e.isCount())s=new oo(e);else if(e instanceof Fl)s=e;else throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(n===void 0&&(n=null),!(n===null||n instanceof Te))throw new TypeError("defaultLayout must be null or a Layout");if(n!==null){if(0>n.span)throw new Error("defaultLayout must have constant span");n.property===void 0&&(n=n.replicate("content"))}let i=-1;n&&(i=n.span,0<=i&&(e instanceof on||e instanceof mn)&&(i+=s.layout.span)),super(i,r),this.discriminator=s,this.usesPrefixDiscriminator=e instanceof on||e instanceof mn,this.defaultLayout=n,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,n=0){if(0<=this.span)return this.span;const r=this.getVariant(e,n);if(!r)throw new Error("unable to determine span for unrecognized variant");return r.getSpan(e,n)}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 n=this.registry[e[this.discriminator.property]];if(n&&(!n.layout||n.property&&Object.prototype.hasOwnProperty.call(e,n.property)))return n}else for(const n in this.registry){const r=this.registry[n];if(r.property&&Object.prototype.hasOwnProperty.call(e,r.property))return r}throw new Error("unable to infer src variant")}decode(e,n=0){let r;const s=this.discriminator,i=s.decode(e,n),o=this.registry[i];if(o===void 0){const a=this.defaultLayout;let l=0;this.usesPrefixDiscriminator&&(l=s.layout.span),r=this.makeDestinationObject(),r[s.property]=i,r[a.property]=a.decode(e,n+l)}else r=o.decode(e,n);return r}encode(e,n,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],n,r),a+o.encode(e[o.property],n,r+a)}return s.encode(e,n,r)}addVariant(e,n,r){const s=new Lh(this,e,n,r);return this.registry[e]=s,s}getVariant(e,n=0){let r;return e instanceof Uint8Array?r=this.discriminator.decode(e,n):r=e,this.registry[r]}}H.Union=Tl;class Lh extends Te{constructor(e,n,r,s){if(!(e instanceof Tl))throw new TypeError("union must be a Union");if(!Number.isInteger(n)||0>n)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 Te))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=n,this.layout=r||null}getSpan(e,n=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,n+r)),r+s}decode(e,n=0){const r=this.makeDestinationObject();if(this!==this.union.getVariant(e,n))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,n+s):this.property?r[this.property]=!0:this.union.usesPrefixDiscriminator&&(r[this.union.discriminator.property]=this.variant),r}encode(e,n,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,n,r);let i=s;if(this.layout&&(this.layout.encode(e[this.property],n,r+s),i+=this.layout.getSpan(n,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)}}H.VariantLayout=Lh;function qr(t){return 0>t&&(t+=4294967296),t}class Il extends Te{constructor(e,n,r){if(!(e instanceof on||e instanceof mn))throw new TypeError("word must be a UInt or UIntBE layout");if(typeof n=="string"&&r===void 0&&(r=n,n=!1),4<e.span)throw new RangeError("word cannot exceed 32 bits");super(e.span,r),this.word=e,this.msb=!!n,this.fields=[];let s=0;this._packedSetValue=function(i){return s=qr(i),this},this._packedGetValue=function(){return s}}decode(e,n=0){const r=this.makeDestinationObject(),s=this.word.decode(e,n);this._packedSetValue(s);for(const i of this.fields)i.property!==void 0&&(r[i.property]=i.decode(e));return r}encode(e,n,r=0){const s=this.word.decode(n,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(),n,r)}addField(e,n){const r=new Ul(this,e,n);return this.fields.push(r),r}addBoolean(e){const n=new Oh(this,e);return this.fields.push(n),n}fieldFor(e){if(typeof e!="string")throw new TypeError("property must be string");for(const n of this.fields)if(n.property===e)return n}}H.BitStructure=Il;class Ul{constructor(e,n,r){if(!(e instanceof Il))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(n)||0>=n)throw new TypeError("bits must be positive integer");const s=8*e.span,i=e.fields.reduce((o,a)=>o+a.bits,0);if(n+i>s)throw new Error("bits too long for span remainder ("+(s-i)+" of "+s+" remain)");this.container=e,this.bits=n,this.valueMask=(1<<n)-1,n===32&&(this.valueMask=4294967295),this.start=i,this.container.msb&&(this.start=s-i-n),this.wordMask=qr(this.valueMask<<this.start),this.property=r}decode(e,n){const r=this.container._packedGetValue();return qr(r&this.wordMask)>>>this.start}encode(e){if(typeof e!="number"||!Number.isInteger(e)||e!==qr(e&this.valueMask))throw new TypeError(vl("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);const n=this.container._packedGetValue(),r=qr(e<<this.start);this.container._packedSetValue(qr(n&~this.wordMask)|r)}}H.BitField=Ul;let Oh=class extends Ul{constructor(e,n){super(e,1,n)}decode(e,n){return!!super.decode(e,n)}encode(e){typeof e=="boolean"&&(e=+e),super.encode(e)}};H.Boolean=Oh;let Nh=class extends Te{constructor(e,n){if(!(e instanceof $t&&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 $t||(r=e),super(r,n),this.length=e}getSpan(e,n){let r=this.span;return 0>r&&(r=this.length.decode(e,n)),r}decode(e,n=0){let r=this.span;return 0>r&&(r=this.length.decode(e,n)),De(e).slice(n,n+r)}encode(e,n,r){let s=this.length;if(this.length instanceof $t&&(s=e.length),!(e instanceof Uint8Array&&s===e.length))throw new TypeError(vl("Blob.encode",this)+" requires (length "+s+") Uint8Array as src");if(r+s>n.length)throw new RangeError("encoding overruns Uint8Array");const i=De(e);return De(n).write(i.toString("hex"),r,s,"hex"),this.length instanceof $t&&this.length.encode(s,n,r),s}};H.Blob=Nh;class zh extends Te{constructor(e){super(-1,e)}getSpan(e,n=0){gs(e);let r=n;for(;r<e.length&&e[r]!==0;)r+=1;return 1+r-n}decode(e,n=0){const r=this.getSpan(e,n);return De(e).slice(n,n+r-1).toString("utf-8")}encode(e,n,r=0){typeof e!="string"&&(e=String(e));const s=Dl.Buffer.from(e,"utf8"),i=s.length;if(r+i>n.length)throw new RangeError("encoding overruns Buffer");const o=De(n);return s.copy(o,r),o[r+i]=0,i+1}}H.CString=zh;class Hh extends Te{constructor(e,n){if(typeof e=="string"&&n===void 0&&(n=e,e=void 0),e===void 0)e=-1;else if(!Number.isInteger(e))throw new TypeError("maxSpan must be an integer");super(-1,n),this.maxSpan=e}getSpan(e,n=0){return gs(e),e.length-n}decode(e,n=0){const r=this.getSpan(e,n);if(0<=this.maxSpan&&this.maxSpan<r)throw new RangeError("text length exceeds maxSpan");return De(e).slice(n,n+r).toString("utf-8")}encode(e,n,r=0){typeof e!="string"&&(e=String(e));const s=Dl.Buffer.from(e,"utf8"),i=s.length;if(0<=this.maxSpan&&this.maxSpan<i)throw new RangeError("text length exceeds maxSpan");if(r+i>n.length)throw new RangeError("encoding overruns Buffer");return s.copy(De(n),r),i}}H.UTF8=Hh;class qh extends Te{constructor(e,n){super(0,n),this.value=e}decode(e,n){return this.value}encode(e,n,r){return 0}}H.Constant=qh;exports.greedy=H.greedy=(t,e)=>new vh(t,e);var sr=H.offset=(t,e,n)=>new kl(t,e,n);exports.u8=H.u8=t=>new on(1,t);exports.u16=H.u16=t=>new on(2,t);H.u24=t=>new on(3,t);exports.u32=H.u32=t=>new on(4,t);H.u40=t=>new on(5,t);H.u48=t=>new on(6,t);var vt=H.nu64=t=>new kh(t);H.u16be=t=>new mn(2,t);H.u24be=t=>new mn(3,t);H.u32be=t=>new mn(4,t);H.u40be=t=>new mn(5,t);H.u48be=t=>new mn(6,t);H.nu64be=t=>new Fh(t);H.s8=t=>new Pr(1,t);exports.s16=H.s16=t=>new Pr(2,t);H.s24=t=>new Pr(3,t);H.s32=t=>new Pr(4,t);H.s40=t=>new Pr(5,t);H.s48=t=>new Pr(6,t);exports.ns64=H.ns64=t=>new Th(t);H.s16be=t=>new ws(2,t);H.s24be=t=>new ws(3,t);H.s32be=t=>new ws(4,t);H.s40be=t=>new ws(5,t);H.s48be=t=>new ws(6,t);H.ns64be=t=>new Ih(t);H.f32=t=>new Uh(t);H.f32be=t=>new _h(t);H.f64=t=>new Mh(t);H.f64be=t=>new Rh(t);exports.struct=H.struct=(t,e,n)=>new Ph(t,e,n);H.bits=(t,e,n)=>new Il(t,e,n);exports.seq=H.seq=(t,e,n)=>new Wh(t,e,n);H.union=(t,e,n)=>new Tl(t,e,n);H.unionLayoutDiscriminator=(t,e)=>new oo(t,e);exports.blob=H.blob=(t,e)=>new Nh(t,e);H.cstr=t=>new zh(t);H.utf8=(t,e)=>new Hh(t,e);H.constant=(t,e)=>new qh(t,e);var li={};Object.defineProperty(li,"__esModule",{value:!0});function y3(t){{const e=Ne.Buffer.from(t);e.reverse();const n=e.toString("hex");return n.length===0?BigInt(0):BigInt(`0x${n}`)}}var Kh=li.toBigIntLE=y3;function g3(t){{const e=t.toString("hex");return e.length===0?BigInt(0):BigInt(`0x${e}`)}}li.toBigIntBE=g3;function w3(t,e){{const n=t.toString(16),r=Ne.Buffer.from(n.padStart(e*2,"0").slice(0,e*2),"hex");return r.reverse(),r}}var _l=li.toBufferLE=w3;function E3(t,e){{const n=t.toString(16);return Ne.Buffer.from(n.padStart(e*2,"0").slice(0,e*2),"hex")}}li.toBufferBE=E3;class A3 extends TypeError{constructor(e,n){let r;const{message:s,explanation:i,...o}=e,{path:a}=e,l=a.length===0?s:`At path: ${a.join(".")} -- ${s}`;super(i??l),i!=null&&(this.cause=l),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...n()])}}function B3(t){return di(t)&&typeof t[Symbol.iterator]=="function"}function di(t){return typeof t=="object"&&t!=null}function ao(t){return di(t)&&!Array.isArray(t)}function yn(t){return typeof t=="symbol"?t.toString():typeof t=="string"?JSON.stringify(t):`${t}`}function x3(t){const{done:e,value:n}=t.next();return e?void 0:n}function C3(t,e,n,r){if(t===!0)return;t===!1?t={}:typeof t=="string"&&(t={message:t});const{path:s,branch:i}=e,{type:o}=n,{refinement:a,message:l=`Expected a value of type \`${o}\`${a?` with refinement \`${a}\``:""}, but received: \`${yn(r)}\``}=t;return{value:r,type:o,refinement:a,key:s[s.length-1],path:s,branch:i,...t,message:l}}function*pu(t,e,n,r){B3(t)||(t=[t]);for(const s of t){const i=C3(s,e,n,r);i&&(yield i)}}function*Ml(t,e,n={}){const{path:r=[],branch:s=[t],coerce:i=!1,mask:o=!1}=n,a={path:r,branch:s,mask:o};i&&(t=e.coercer(t,a));let l="valid";for(const f of e.validator(t,a))f.explanation=n.message,l="not_valid",yield[f,void 0];for(let[f,m,p]of e.entries(t,a)){const C=Ml(m,p,{path:f===void 0?r:[...r,f],branch:f===void 0?s:[...s,m],coerce:i,mask:o,message:n.message});for(const w of C)w[0]?(l=w[0].refinement!=null?"not_refined":"not_valid",yield[w[0],void 0]):i&&(m=w[1],f===void 0?t=m:t instanceof Map?t.set(f,m):t instanceof Set?t.add(m):di(t)&&(m!==void 0||f in t)&&(t[f]=m))}if(l!=="not_valid")for(const f of e.refiner(t,a))f.explanation=n.message,l="not_refined",yield[f,void 0];l==="valid"&&(yield[void 0,t])}let Pn=class{constructor(e){const{type:n,schema:r,validator:s,refiner:i,coercer:o=l=>l,entries:a=function*(){}}=e;this.type=n,this.schema=r,this.entries=a,this.coercer=o,s?this.validator=(l,f)=>{const m=s(l,f);return pu(m,f,this,l)}:this.validator=()=>[],i?this.refiner=(l,f)=>{const m=i(l,f);return pu(m,f,this,l)}:this.refiner=()=>[]}assert(e,n){return $h(e,this,n)}create(e,n){return te(e,this,n)}is(e){return jh(e,this)}mask(e,n){return S3(e,this,n)}validate(e,n={}){return ui(e,this,n)}};function $h(t,e,n){const r=ui(t,e,{message:n});if(r[0])throw r[0]}function te(t,e,n){const r=ui(t,e,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function S3(t,e,n){const r=ui(t,e,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}function jh(t,e){return!ui(t,e)[0]}function ui(t,e,n={}){const r=Ml(t,e,n),s=x3(r);return s[0]?[new A3(s[0],function*(){for(const o of r)o[0]&&(yield o[0])}),void 0]:[void 0,s[1]]}function Lr(t,e){return new Pn({type:t,schema:null,validator:e})}function D3(){return Lr("any",()=>!0)}function ne(t){return new Pn({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[n,r]of e.entries())yield[n,r,t]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${yn(e)}`}})}function _n(){return Lr("boolean",t=>typeof t=="boolean")}function Rl(t){return Lr("instance",e=>e instanceof t||`Expected a \`${t.name}\` instance, but received: ${yn(e)}`)}function He(t){const e=yn(t),n=typeof t;return new Pn({type:"literal",schema:n==="string"||n==="number"||n==="boolean"?t:null,validator(r){return r===t||`Expected the literal \`${e}\`, but received: ${yn(r)}`}})}function v3(){return Lr("never",()=>!1)}function re(t){return new Pn({...t,validator:(e,n)=>e===null||t.validator(e,n),refiner:(e,n)=>e===null||t.refiner(e,n)})}function z(){return Lr("number",t=>typeof t=="number"&&!isNaN(t)||`Expected a number, but received: ${yn(t)}`)}function ce(t){return new Pn({...t,validator:(e,n)=>e===void 0||t.validator(e,n),refiner:(e,n)=>e===void 0||t.refiner(e,n)})}function Vh(t,e){return new Pn({type:"record",schema:null,*entries(n){if(di(n))for(const r in n){const s=n[r];yield[r,r,t],yield[r,s,e]}},validator(n){return ao(n)||`Expected an object, but received: ${yn(n)}`},coercer(n){return ao(n)?{...n}:n}})}function Q(){return Lr("string",t=>typeof t=="string"||`Expected a string, but received: ${yn(t)}`)}function Wl(t){const e=v3();return new Pn({type:"tuple",schema:null,*entries(n){if(Array.isArray(n)){const r=Math.max(t.length,n.length);for(let s=0;s<r;s++)yield[s,n[s],t[s]||e]}},validator(n){return Array.isArray(n)||`Expected an array, but received: ${yn(n)}`},coercer(n){return Array.isArray(n)?n.slice():n}})}function X(t){const e=Object.keys(t);return new Pn({type:"type",schema:t,*entries(n){if(di(n))for(const r of e)yield[r,n[r],t[r]]},validator(n){return ao(n)||`Expected an object, but received: ${yn(n)}`},coercer(n){return ao(n)?{...n}:n}})}function Ht(t){const e=t.map(n=>n.type).join(" | ");return new Pn({type:"union",schema:null,coercer(n,r){for(const s of t){const[i,o]=s.validate(n,{coerce:!0,mask:r.mask});if(!i)return o}return n},validator(n,r){const s=[];for(const i of t){const[...o]=Ml(n,i,r),[a]=o;if(a[0])for(const[l]of o)l&&s.push(l);else return[]}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${yn(n)}`,...s]}})}function Es(){return Lr("unknown",()=>!0)}function fi(t,e,n){return new Pn({...t,coercer:(r,s)=>jh(r,e)?t.coercer(n(r,s),s):t.coercer(r,s)})}var xi,k3=new Uint8Array(16);function Gh(){if(!xi&&(xi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!xi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return xi(k3)}const F3=/^(?:[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 Lo(t){return typeof t=="string"&&F3.test(t)}var Dt=[];for(var Ra=0;Ra<256;++Ra)Dt.push((Ra+256).toString(16).substr(1));function Oo(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Dt[t[e+0]]+Dt[t[e+1]]+Dt[t[e+2]]+Dt[t[e+3]]+"-"+Dt[t[e+4]]+Dt[t[e+5]]+"-"+Dt[t[e+6]]+Dt[t[e+7]]+"-"+Dt[t[e+8]]+Dt[t[e+9]]+"-"+Dt[t[e+10]]+Dt[t[e+11]]+Dt[t[e+12]]+Dt[t[e+13]]+Dt[t[e+14]]+Dt[t[e+15]]).toLowerCase();if(!Lo(n))throw TypeError("Stringified UUID is invalid");return n}var yu,Wa,Pa=0,La=0;function T3(t,e,n){var r=e&&n||0,s=e||new Array(16);t=t||{};var i=t.node||yu,o=t.clockseq!==void 0?t.clockseq:Wa;if(i==null||o==null){var a=t.random||(t.rng||Gh)();i==null&&(i=yu=[a[0]|1,a[1],a[2],a[3],a[4],a[5]]),o==null&&(o=Wa=(a[6]<<8|a[7])&16383)}var l=t.msecs!==void 0?t.msecs:Date.now(),f=t.nsecs!==void 0?t.nsecs:La+1,m=l-Pa+(f-La)/1e4;if(m<0&&t.clockseq===void 0&&(o=o+1&16383),(m<0||l>Pa)&&t.nsecs===void 0&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Pa=l,La=f,Wa=o,l+=122192928e5;var p=((l&268435455)*1e4+f)%4294967296;s[r++]=p>>>24&255,s[r++]=p>>>16&255,s[r++]=p>>>8&255,s[r++]=p&255;var C=l/4294967296*1e4&268435455;s[r++]=C>>>8&255,s[r++]=C&255,s[r++]=C>>>24&15|16,s[r++]=C>>>16&255,s[r++]=o>>>8|128,s[r++]=o&255;for(var w=0;w<6;++w)s[r+w]=i[w];return e||Oo(s)}function Yh(t){if(!Lo(t))throw TypeError("Invalid UUID");var e,n=new Uint8Array(16);return n[0]=(e=parseInt(t.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=e&255,n[4]=(e=parseInt(t.slice(9,13),16))>>>8,n[5]=e&255,n[6]=(e=parseInt(t.slice(14,18),16))>>>8,n[7]=e&255,n[8]=(e=parseInt(t.slice(19,23),16))>>>8,n[9]=e&255,n[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=e&255,n}function I3(t){t=unescape(encodeURIComponent(t));for(var e=[],n=0;n<t.length;++n)e.push(t.charCodeAt(n));return e}var U3="6ba7b810-9dad-11d1-80b4-00c04fd430c8",_3="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Xh(t,e,n){function r(s,i,o,a){if(typeof s=="string"&&(s=I3(s)),typeof i=="string"&&(i=Yh(i)),i.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var l=new Uint8Array(16+s.length);if(l.set(i),l.set(s,i.length),l=n(l),l[6]=l[6]&15|e,l[8]=l[8]&63|128,o){a=a||0;for(var f=0;f<16;++f)o[a+f]=l[f];return o}return Oo(l)}try{r.name=t}catch{}return r.DNS=U3,r.URL=_3,r}function M3(t){if(typeof t=="string"){var e=unescape(encodeURIComponent(t));t=new Uint8Array(e.length);for(var n=0;n<e.length;++n)t[n]=e.charCodeAt(n)}return R3(W3(P3(t),t.length*8))}function R3(t){for(var e=[],n=t.length*32,r="0123456789abcdef",s=0;s<n;s+=8){var i=t[s>>5]>>>s%32&255,o=parseInt(r.charAt(i>>>4&15)+r.charAt(i&15),16);e.push(o)}return e}function Zh(t){return(t+64>>>9<<4)+14+1}function W3(t,e){t[e>>5]|=128<<e%32,t[Zh(e)-1]=e;for(var n=1732584193,r=-271733879,s=-1732584194,i=271733878,o=0;o<t.length;o+=16){var a=n,l=r,f=s,m=i;n=_t(n,r,s,i,t[o],7,-680876936),i=_t(i,n,r,s,t[o+1],12,-389564586),s=_t(s,i,n,r,t[o+2],17,606105819),r=_t(r,s,i,n,t[o+3],22,-1044525330),n=_t(n,r,s,i,t[o+4],7,-176418897),i=_t(i,n,r,s,t[o+5],12,1200080426),s=_t(s,i,n,r,t[o+6],17,-1473231341),r=_t(r,s,i,n,t[o+7],22,-45705983),n=_t(n,r,s,i,t[o+8],7,1770035416),i=_t(i,n,r,s,t[o+9],12,-1958414417),s=_t(s,i,n,r,t[o+10],17,-42063),r=_t(r,s,i,n,t[o+11],22,-1990404162),n=_t(n,r,s,i,t[o+12],7,1804603682),i=_t(i,n,r,s,t[o+13],12,-40341101),s=_t(s,i,n,r,t[o+14],17,-1502002290),r=_t(r,s,i,n,t[o+15],22,1236535329),n=Mt(n,r,s,i,t[o+1],5,-165796510),i=Mt(i,n,r,s,t[o+6],9,-1069501632),s=Mt(s,i,n,r,t[o+11],14,643717713),r=Mt(r,s,i,n,t[o],20,-373897302),n=Mt(n,r,s,i,t[o+5],5,-701558691),i=Mt(i,n,r,s,t[o+10],9,38016083),s=Mt(s,i,n,r,t[o+15],14,-660478335),r=Mt(r,s,i,n,t[o+4],20,-405537848),n=Mt(n,r,s,i,t[o+9],5,568446438),i=Mt(i,n,r,s,t[o+14],9,-1019803690),s=Mt(s,i,n,r,t[o+3],14,-187363961),r=Mt(r,s,i,n,t[o+8],20,1163531501),n=Mt(n,r,s,i,t[o+13],5,-1444681467),i=Mt(i,n,r,s,t[o+2],9,-51403784),s=Mt(s,i,n,r,t[o+7],14,1735328473),r=Mt(r,s,i,n,t[o+12],20,-1926607734),n=Rt(n,r,s,i,t[o+5],4,-378558),i=Rt(i,n,r,s,t[o+8],11,-2022574463),s=Rt(s,i,n,r,t[o+11],16,1839030562),r=Rt(r,s,i,n,t[o+14],23,-35309556),n=Rt(n,r,s,i,t[o+1],4,-1530992060),i=Rt(i,n,r,s,t[o+4],11,1272893353),s=Rt(s,i,n,r,t[o+7],16,-155497632),r=Rt(r,s,i,n,t[o+10],23,-1094730640),n=Rt(n,r,s,i,t[o+13],4,681279174),i=Rt(i,n,r,s,t[o],11,-358537222),s=Rt(s,i,n,r,t[o+3],16,-722521979),r=Rt(r,s,i,n,t[o+6],23,76029189),n=Rt(n,r,s,i,t[o+9],4,-640364487),i=Rt(i,n,r,s,t[o+12],11,-421815835),s=Rt(s,i,n,r,t[o+15],16,530742520),r=Rt(r,s,i,n,t[o+2],23,-995338651),n=Wt(n,r,s,i,t[o],6,-198630844),i=Wt(i,n,r,s,t[o+7],10,1126891415),s=Wt(s,i,n,r,t[o+14],15,-1416354905),r=Wt(r,s,i,n,t[o+5],21,-57434055),n=Wt(n,r,s,i,t[o+12],6,1700485571),i=Wt(i,n,r,s,t[o+3],10,-1894986606),s=Wt(s,i,n,r,t[o+10],15,-1051523),r=Wt(r,s,i,n,t[o+1],21,-2054922799),n=Wt(n,r,s,i,t[o+8],6,1873313359),i=Wt(i,n,r,s,t[o+15],10,-30611744),s=Wt(s,i,n,r,t[o+6],15,-1560198380),r=Wt(r,s,i,n,t[o+13],21,1309151649),n=Wt(n,r,s,i,t[o+4],6,-145523070),i=Wt(i,n,r,s,t[o+11],10,-1120210379),s=Wt(s,i,n,r,t[o+2],15,718787259),r=Wt(r,s,i,n,t[o+9],21,-343485551),n=rr(n,a),r=rr(r,l),s=rr(s,f),i=rr(i,m)}return[n,r,s,i]}function P3(t){if(t.length===0)return[];for(var e=t.length*8,n=new Uint32Array(Zh(e)),r=0;r<e;r+=8)n[r>>5]|=(t[r/8]&255)<<r%32;return n}function rr(t,e){var n=(t&65535)+(e&65535),r=(t>>16)+(e>>16)+(n>>16);return r<<16|n&65535}function L3(t,e){return t<<e|t>>>32-e}function No(t,e,n,r,s,i){return rr(L3(rr(rr(e,t),rr(r,i)),s),n)}function _t(t,e,n,r,s,i,o){return No(e&n|~e&r,t,e,s,i,o)}function Mt(t,e,n,r,s,i,o){return No(e&r|n&~r,t,e,s,i,o)}function Rt(t,e,n,r,s,i,o){return No(e^n^r,t,e,s,i,o)}function Wt(t,e,n,r,s,i,o){return No(n^(e|~r),t,e,s,i,o)}var O3=Xh("v3",48,M3);function N3(t,e,n){t=t||{};var r=t.random||(t.rng||Gh)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(var s=0;s<16;++s)e[n+s]=r[s];return e}return Oo(r)}function z3(t,e,n,r){switch(t){case 0:return e&n^~e&r;case 1:return e^n^r;case 2:return e&n^e&r^n&r;case 3:return e^n^r}}function Oa(t,e){return t<<e|t>>>32-e}function H3(t){var e=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){var r=unescape(encodeURIComponent(t));t=[];for(var s=0;s<r.length;++s)t.push(r.charCodeAt(s))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);for(var i=t.length/4+2,o=Math.ceil(i/16),a=new Array(o),l=0;l<o;++l){for(var f=new Uint32Array(16),m=0;m<16;++m)f[m]=t[l*64+m*4]<<24|t[l*64+m*4+1]<<16|t[l*64+m*4+2]<<8|t[l*64+m*4+3];a[l]=f}a[o-1][14]=(t.length-1)*8/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=(t.length-1)*8&4294967295;for(var p=0;p<o;++p){for(var C=new Uint32Array(80),w=0;w<16;++w)C[w]=a[p][w];for(var F=16;F<80;++F)C[F]=Oa(C[F-3]^C[F-8]^C[F-14]^C[F-16],1);for(var I=n[0],x=n[1],E=n[2],_=n[3],k=n[4],P=0;P<80;++P){var M=Math.floor(P/20),$=Oa(I,5)+z3(M,x,E,_)+k+e[M]+C[P]>>>0;k=_,_=E,E=Oa(x,30)>>>0,x=I,I=$}n[0]=n[0]+I>>>0,n[1]=n[1]+x>>>0,n[2]=n[2]+E>>>0,n[3]=n[3]+_>>>0,n[4]=n[4]+k>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,n[0]&255,n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,n[1]&255,n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,n[2]&255,n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,n[3]&255,n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,n[4]&255]}var q3=Xh("v5",80,H3);const K3="00000000-0000-0000-0000-000000000000";function $3(t){if(!Lo(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)}const j3=Object.freeze(Object.defineProperty({__proto__:null,NIL:K3,parse:Yh,stringify:Oo,v1:T3,v3:O3,v4:N3,v5:q3,validate:Lo,version:$3},Symbol.toStringTag,{value:"Module"})),Jh=Ic(j3),V3=Jh.v4,G3=function(t,e,n,r){if(typeof t!="string")throw new TypeError(t+" 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:t};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 n>"u"){const o=typeof r.generator=="function"?r.generator:function(){return V3()};i.id=o(i,r)}else s===2&&n===null?r.notificationIdNull&&(i.id=null):i.id=n;return i};var Y3=G3;const X3=Jh.v4,Z3=Y3,Gs=function(t,e){if(!(this instanceof Gs))return new Gs(t,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 X3()},version:typeof e.version<"u"?e.version:2,notificationIdNull:typeof e.notificationIdNull=="boolean"?e.notificationIdNull:!1},this.callServer=t};var J3=Gs;Gs.prototype.request=function(t,e,n,r){const s=this;let i=null;const o=Array.isArray(t)&&typeof e=="function";if(this.options.version===1&&o)throw new TypeError("JSON-RPC 1.0 does not support batching");if(o||!o&&t&&typeof t=="object"&&typeof e=="function")r=e,i=t;else{typeof n=="function"&&(r=n,n=void 0);const f=typeof r=="function";try{i=Z3(t,e,n,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(m){if(f)return r(m);throw m}if(!f)return i}let l;try{l=JSON.stringify(i,this.options.replacer)}catch(f){return r(f)}return this.callServer(l,function(f,m){s._parseResponse(f,m,r)}),i};Gs.prototype._parseResponse=function(t,e,n){if(t){n(t);return}if(!e)return n();let r;try{r=JSON.parse(e,this.options.reviver)}catch(s){return n(s)}if(n.length===3)if(Array.isArray(r)){const s=function(o){return typeof o.error<"u"},i=function(o){return!s(o)};return n(null,r.filter(s),r.filter(i))}else return n(null,r.error,r.result);n(null,r)};const Qh=Js(J3);var em={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function s(l,f,m){this.fn=l,this.context=f,this.once=m||!1}function i(l,f,m,p,C){if(typeof m!="function")throw new TypeError("The listener must be a function");var w=new s(m,p||l,C),F=n?n+f:f;return l._events[F]?l._events[F].fn?l._events[F]=[l._events[F],w]:l._events[F].push(w):(l._events[F]=w,l._eventsCount++),l}function o(l,f){--l._eventsCount===0?l._events=new r:delete l._events[f]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var f=[],m,p;if(this._eventsCount===0)return f;for(p in m=this._events)e.call(m,p)&&f.push(n?p.slice(1):p);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(m)):f},a.prototype.listeners=function(f){var m=n?n+f:f,p=this._events[m];if(!p)return[];if(p.fn)return[p.fn];for(var C=0,w=p.length,F=new Array(w);C<w;C++)F[C]=p[C].fn;return F},a.prototype.listenerCount=function(f){var m=n?n+f:f,p=this._events[m];return p?p.fn?1:p.length:0},a.prototype.emit=function(f,m,p,C,w,F){var I=n?n+f:f;if(!this._events[I])return!1;var x=this._events[I],E=arguments.length,_,k;if(x.fn){switch(x.once&&this.removeListener(f,x.fn,void 0,!0),E){case 1:return x.fn.call(x.context),!0;case 2:return x.fn.call(x.context,m),!0;case 3:return x.fn.call(x.context,m,p),!0;case 4:return x.fn.call(x.context,m,p,C),!0;case 5:return x.fn.call(x.context,m,p,C,w),!0;case 6:return x.fn.call(x.context,m,p,C,w,F),!0}for(k=1,_=new Array(E-1);k<E;k++)_[k-1]=arguments[k];x.fn.apply(x.context,_)}else{var P=x.length,M;for(k=0;k<P;k++)switch(x[k].once&&this.removeListener(f,x[k].fn,void 0,!0),E){case 1:x[k].fn.call(x[k].context);break;case 2:x[k].fn.call(x[k].context,m);break;case 3:x[k].fn.call(x[k].context,m,p);break;case 4:x[k].fn.call(x[k].context,m,p,C);break;default:if(!_)for(M=1,_=new Array(E-1);M<E;M++)_[M-1]=arguments[M];x[k].fn.apply(x[k].context,_)}}return!0},a.prototype.on=function(f,m,p){return i(this,f,m,p,!1)},a.prototype.once=function(f,m,p){return i(this,f,m,p,!0)},a.prototype.removeListener=function(f,m,p,C){var w=n?n+f:f;if(!this._events[w])return this;if(!m)return o(this,w),this;var F=this._events[w];if(F.fn)F.fn===m&&(!C||F.once)&&(!p||F.context===p)&&o(this,w);else{for(var I=0,x=[],E=F.length;I<E;I++)(F[I].fn!==m||C&&!F[I].once||p&&F[I].context!==p)&&x.push(F[I]);x.length?this._events[w]=x.length===1?x[0]:x:o(this,w)}return this},a.prototype.removeAllListeners=function(f){var m;return f?(m=n?n+f:f,this._events[m]&&o(this,m)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,t.exports=a})(em);var Q3=em.exports;const Pl=Js(Q3);var e4=class extends Pl{constructor(e,n,r){super();ie(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,n,r){const s=r||n;try{this.socket.send(e),s()}catch(i){s(i)}}close(e,n){this.socket.close(e,n)}addEventListener(e,n,r){this.socket.addEventListener(e,n,r)}};function t4(t,e){return new e4(t,e)}var n4=class{encode(t){return JSON.stringify(t)}decode(t){return JSON.parse(t)}},r4=class extends Pl{constructor(e,n="ws://localhost:8080",{autoconnect:r=!0,reconnect:s=!0,reconnect_interval:i=1e3,max_reconnects:o=5,...a}={},l,f){super();ie(this,"address");ie(this,"rpc_id");ie(this,"queue");ie(this,"options");ie(this,"autoconnect");ie(this,"ready");ie(this,"reconnect");ie(this,"reconnect_timer_id");ie(this,"reconnect_interval");ie(this,"max_reconnects");ie(this,"rest_options");ie(this,"current_reconnects");ie(this,"generate_request_id");ie(this,"socket");ie(this,"webSocketFactory");ie(this,"dataPack");this.webSocketFactory=e,this.queue={},this.rpc_id=0,this.address=n,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=l||(()=>typeof this.rpc_id=="number"?++this.rpc_id:Number(this.rpc_id)+1),f?this.dataPack=f:this.dataPack=new n4,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,n,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,n),l={jsonrpc:"2.0",method:e,params:n||void 0,id:a};this.socket.send(this.dataPack.encode(l),s,f=>{if(f)return o(f);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 n=await this.call("rpc.login",e);if(!n)throw new Error("authentication failed");return n}async listMethods(){return await this.call("__listMethods")}notify(e,n){return new Promise((r,s)=>{if(!this.ready)return s(new Error("socket not ready"));const i={jsonrpc:"2.0",method:e,params:n};this.socket.send(this.dataPack.encode(i),o=>{if(o)return s(o);r()})})}async subscribe(e){typeof e=="string"&&(e=[e]);const n=await this.call("rpc.on",e);if(typeof e=="string"&&n[e]!=="ok")throw new Error("Failed subscribing to an event '"+e+"' with: "+n[e]);return n}async unsubscribe(e){typeof e=="string"&&(e=[e]);const n=await this.call("rpc.off",e);if(typeof e=="string"&&n[e]!=="ok")throw new Error("Failed unsubscribing from an event with: "+n);return n}close(e,n){this.socket.close(e||1e3,n)}setAutoReconnect(e){this.reconnect=e}setReconnectInterval(e){this.reconnect_interval=e}setMaxReconnects(e){this.max_reconnects=e}_connect(e,n){clearTimeout(this.reconnect_timer_id),this.socket=this.webSocketFactory(e,n),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,n),this.reconnect_interval)))})}};const s4=Mr.utils.randomPrivateKey,gu=()=>{const t=Mr.utils.randomPrivateKey(),e=co(t),n=new Uint8Array(64);return n.set(t),n.set(e,32),{publicKey:e,secretKey:n}},co=Mr.getPublicKey;function wu(t){try{return Mr.ExtendedPoint.fromHex(t),!0}catch{return!1}}const Ll=(t,e)=>Mr.sign(t,e.slice(0,32)),i4=Mr.verify,ge=t=>ae.Buffer.isBuffer(t)?t:t instanceof Uint8Array?ae.Buffer.from(t.buffer,t.byteOffset,t.byteLength):ae.Buffer.from(t);class Ol{constructor(e){Object.assign(this,e)}encode(){return ae.Buffer.from(Sh(Ws,this))}static decode(e){return Dh(Ws,this,e)}static decodeUnchecked(e){return Eh(Ws,this,e)}}class o4 extends Ol{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(n=>{this.enum=n})}}const Ws=new Map;var tm;const nm=32,Tn=32;function a4(t){return t._bn!==void 0}let Eu=1;class J extends Ol{constructor(e){if(super({}),this._bn=void 0,a4(e))this._bn=e._bn;else{if(typeof e=="string"){const n=Ct.decode(e);if(n.length!=Tn)throw new Error("Invalid public key input");this._bn=new Ac(n)}else this._bn=new Ac(e);if(this._bn.byteLength()>Tn)throw new Error("Invalid public key input")}}static unique(){const e=new J(Eu);return Eu+=1,new J(e.toBuffer())}equals(e){return this._bn.eq(e._bn)}toBase58(){return Ct.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===Tn)return e;const n=ae.Buffer.alloc(32);return e.copy(n,32-e.length),n}get[Symbol.toStringTag](){return`PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed(e,n,r){const s=ae.Buffer.concat([e.toBuffer(),ae.Buffer.from(n),r.toBuffer()]),i=Yi(s);return new J(i)}static createProgramAddressSync(e,n){let r=ae.Buffer.alloc(0);e.forEach(function(i){if(i.length>nm)throw new TypeError("Max seed length exceeded");r=ae.Buffer.concat([r,ge(i)])}),r=ae.Buffer.concat([r,n.toBuffer(),ae.Buffer.from("ProgramDerivedAddress")]);const s=Yi(r);if(wu(s))throw new Error("Invalid seeds, address must fall off the curve");return new J(s)}static async createProgramAddress(e,n){return this.createProgramAddressSync(e,n)}static findProgramAddressSync(e,n){let r=255,s;for(;r!=0;){try{const i=e.concat(ae.Buffer.from([r]));s=this.createProgramAddressSync(i,n)}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,n){return this.findProgramAddressSync(e,n)}static isOnCurve(e){const n=new J(e);return wu(n.toBytes())}}tm=J;J.default=new tm("11111111111111111111111111111111");Ws.set(J,{kind:"struct",fields:[["_bn","u256"]]});class c4{constructor(e){if(this._publicKey=void 0,this._secretKey=void 0,e){const n=ge(e);if(e.length!==64)throw new Error("bad secret key size");this._publicKey=n.slice(32,64),this._secretKey=n.slice(0,32)}else this._secretKey=ge(s4()),this._publicKey=ge(co(this._secretKey))}get publicKey(){return new J(this._publicKey)}get secretKey(){return ae.Buffer.concat([this._secretKey,this._publicKey],64)}}const l4=new J("BPFLoader1111111111111111111111111111111111"),ir=1232,zo=127,Ys=64;class Ho extends Error{constructor(e){super(`Signature ${e} has expired: block height exceeded.`),this.signature=void 0,this.signature=e}}Object.defineProperty(Ho.prototype,"name",{value:"TransactionExpiredBlockheightExceededError"});class Nl extends Error{constructor(e,n){super(`Transaction was not confirmed in ${n.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(Nl.prototype,"name",{value:"TransactionExpiredTimeoutError"});class Gr extends Error{constructor(e){super(`Signature ${e} has expired: the nonce is no longer valid.`),this.signature=void 0,this.signature=e}}Object.defineProperty(Gr.prototype,"name",{value:"TransactionExpiredNonceInvalidError"});class Xs{constructor(e,n){this.staticAccountKeys=void 0,this.accountKeysFromLookups=void 0,this.staticAccountKeys=e,this.accountKeysFromLookups=n}keySegments(){const e=[this.staticAccountKeys];return this.accountKeysFromLookups&&(e.push(this.accountKeysFromLookups.writable),e.push(this.accountKeysFromLookups.readonly)),e}get(e){for(const n of this.keySegments()){if(e<n.length)return n[e];e-=n.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 we=(t="publicKey")=>exports.blob(32,t),d4=(t="signature")=>exports.blob(64,t),Er=(t="string")=>{const e=exports.struct([exports.u32("length"),exports.u32("lengthPadding"),exports.blob(sr(exports.u32(),-8),"chars")],t),n=e.decode.bind(e),r=e.encode.bind(e),s=e;return s.decode=(i,o)=>n(i,o).chars.toString(),s.encode=(i,o,a)=>{const l={chars:ae.Buffer.from(i,"utf8")};return r(l,o,a)},s.alloc=i=>exports.u32().span+exports.u32().span+ae.Buffer.from(i,"utf8").length,s},u4=(t="authorized")=>exports.struct([we("staker"),we("withdrawer")],t),f4=(t="lockup")=>exports.struct([exports.ns64("unixTimestamp"),exports.ns64("epoch"),we("custodian")],t),h4=(t="voteInit")=>exports.struct([we("nodePubkey"),we("authorizedVoter"),we("authorizedWithdrawer"),exports.u8("commission")],t),m4=(t="voteAuthorizeWithSeedArgs")=>exports.struct([exports.u32("voteAuthorizationType"),we("currentAuthorityDerivedKeyOwnerPubkey"),Er("currentAuthorityDerivedKeySeed"),we("newAuthorized")],t);function rm(t,e){const n=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*n(s.elementLayout)}else if("fields"in s)return rm({layout:s},e[s.property]);return 0};let r=0;return t.layout.fields.forEach(s=>{r+=n(s)}),r}function qt(t){let e=0,n=0;for(;;){let r=t.shift();if(e|=(r&127)<<n*7,n+=1,!(r&128))break}return e}function Xt(t,e){let n=e;for(;;){let r=n&127;if(n>>=7,n==0){t.push(r);break}else r|=128,t.push(r)}}function Se(t,e){if(!t)throw new Error(e||"Assertion failed")}class qo{constructor(e,n){this.payer=void 0,this.keyMetaMap=void 0,this.payer=e,this.keyMetaMap=n}static compile(e,n){const r=new Map,s=o=>{const a=o.toBase58();let l=r.get(a);return l===void 0&&(l={isSigner:!1,isWritable:!1,isInvoked:!1},r.set(a,l)),l},i=s(n);i.isSigner=!0,i.isWritable=!0;for(const o of e){s(o.programId).isInvoked=!0;for(const a of o.keys){const l=s(a.pubkey);l.isSigner||(l.isSigner=a.isSigner),l.isWritable||(l.isWritable=a.isWritable)}}return new qo(n,r)}getMessageComponents(){const e=[...this.keyMetaMap.entries()];Se(e.length<=256,"Max static account keys length exceeded");const n=e.filter(([,l])=>l.isSigner&&l.isWritable),r=e.filter(([,l])=>l.isSigner&&!l.isWritable),s=e.filter(([,l])=>!l.isSigner&&l.isWritable),i=e.filter(([,l])=>!l.isSigner&&!l.isWritable),o={numRequiredSignatures:n.length+r.length,numReadonlySignedAccounts:r.length,numReadonlyUnsignedAccounts:i.length};{Se(n.length>0,"Expected at least one writable signer key");const[l]=n[0];Se(l===this.payer.toBase58(),"Expected first writable signer key to be the fee payer")}const a=[...n.map(([l])=>new J(l)),...r.map(([l])=>new J(l)),...s.map(([l])=>new J(l)),...i.map(([l])=>new J(l))];return[o,a]}extractTableLookup(e){const[n,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(!(n.length===0&&s.length===0))return[{accountKey:e.key,writableIndexes:n,readonlyIndexes:s},{writable:r,readonly:i}]}drainKeysFoundInLookupTable(e,n){const r=new Array,s=new Array;for(const[i,o]of this.keyMetaMap.entries())if(n(o)){const a=new J(i),l=e.findIndex(f=>f.equals(a));l>=0&&(Se(l<256,"Max lookup table index exceeded"),r.push(l),s.push(a),this.keyMetaMap.delete(i))}return[r,s]}}const sm="Reached end of buffer unexpectedly";function Sn(t){if(t.length===0)throw new Error(sm);return t.shift()}function Kt(t,...e){const[n]=e;if(e.length===2?n+(e[1]??0)>t.length:n>=t.length)throw new Error(sm);return t.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(n=>new J(n)),this.recentBlockhash=e.recentBlockhash,this.instructions=e.instructions,this.instructions.forEach(n=>this.indexToProgramIds.set(n.programIdIndex,this.accountKeys[n.programIdIndex]))}get version(){return"legacy"}get staticAccountKeys(){return this.accountKeys}get compiledInstructions(){return this.instructions.map(e=>({programIdIndex:e.programIdIndex,accountKeyIndexes:e.accounts,data:Ct.decode(e.data)}))}get addressTableLookups(){return[]}getAccountKeys(){return new Xs(this.staticAccountKeys)}static compile(e){const n=qo.compile(e.instructions,e.payerKey),[r,s]=n.getMessageComponents(),o=new Xs(s).compileInstructions(e.instructions).map(a=>({programIdIndex:a.programIdIndex,accounts:a.accountKeyIndexes,data:Ct.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 n=this.header.numRequiredSignatures;if(e>=this.header.numRequiredSignatures){const r=e-n,i=this.accountKeys.length-n-this.header.numReadonlyUnsignedAccounts;return r<i}else{const r=n-this.header.numReadonlySignedAccounts;return e<r}}isProgramId(e){return this.indexToProgramIds.has(e)}programIds(){return[...this.indexToProgramIds.values()]}nonProgramIds(){return this.accountKeys.filter((e,n)=>!this.isProgramId(n))}serialize(){const e=this.accountKeys.length;let n=[];Xt(n,e);const r=this.instructions.map(p=>{const{accounts:C,programIdIndex:w}=p,F=Array.from(Ct.decode(p.data));let I=[];Xt(I,C.length);let x=[];return Xt(x,F.length),{programIdIndex:w,keyIndicesCount:ae.Buffer.from(I),keyIndices:C,dataLength:ae.Buffer.from(x),data:F}});let s=[];Xt(s,r.length);let i=ae.Buffer.alloc(ir);ae.Buffer.from(s).copy(i);let o=s.length;r.forEach(p=>{const w=exports.struct([exports.u8("programIdIndex"),exports.blob(p.keyIndicesCount.length,"keyIndicesCount"),exports.seq(exports.u8("keyIndex"),p.keyIndices.length,"keyIndices"),exports.blob(p.dataLength.length,"dataLength"),exports.seq(exports.u8("userdatum"),p.data.length,"data")]).encode(p,i,o);o+=w}),i=i.slice(0,o);const a=exports.struct([exports.blob(1,"numRequiredSignatures"),exports.blob(1,"numReadonlySignedAccounts"),exports.blob(1,"numReadonlyUnsignedAccounts"),exports.blob(n.length,"keyCount"),exports.seq(we("key"),e,"keys"),we("recentBlockhash")]),l={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(n),keys:this.accountKeys.map(p=>ge(p.toBytes())),recentBlockhash:Ct.decode(this.recentBlockhash)};let f=ae.Buffer.alloc(2048);const m=a.encode(l,f);return i.copy(f,m),f.slice(0,m+i.length)}static from(e){let n=[...e];const r=Sn(n);if(r!==(r&zo))throw new Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");const s=Sn(n),i=Sn(n),o=qt(n);let a=[];for(let C=0;C<o;C++){const w=Kt(n,0,Tn);a.push(new J(ae.Buffer.from(w)))}const l=Kt(n,0,Tn),f=qt(n);let m=[];for(let C=0;C<f;C++){const w=Sn(n),F=qt(n),I=Kt(n,0,F),x=qt(n),E=Kt(n,0,x),_=Ct.encode(ae.Buffer.from(E));m.push({programIdIndex:w,accounts:I,data:_})}const p={header:{numRequiredSignatures:r,numReadonlySignedAccounts:s,numReadonlyUnsignedAccounts:i},recentBlockhash:Ct.encode(ae.Buffer.from(l)),accountKeys:a,instructions:m};return new cn(p)}}class ar{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 n of this.addressTableLookups)e+=n.readonlyIndexes.length+n.writableIndexes.length;return e}getAccountKeys(e){let n;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");n=e.accountKeysFromLookups}else if(e&&"addressLookupTableAccounts"in e&&e.addressLookupTableAccounts)n=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 Xs(this.staticAccountKeys,n)}isAccountSigner(e){return e<this.header.numRequiredSignatures}isAccountWritable(e){const n=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-n,o=r-n-this.header.numReadonlyUnsignedAccounts;return s<o}else{const s=n-this.header.numReadonlySignedAccounts;return e<s}}resolveAddressTableLookups(e){const n={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)n.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)n.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 n}static compile(e){const n=qo.compile(e.instructions,e.payerKey),r=new Array,s={writable:new Array,readonly:new Array},i=e.addressLookupTableAccounts||[];for(const m of i){const p=n.extractTableLookup(m);if(p!==void 0){const[C,{writable:w,readonly:F}]=p;r.push(C),s.writable.push(...w),s.readonly.push(...F)}}const[o,a]=n.getMessageComponents(),f=new Xs(a,s).compileInstructions(e.instructions);return new ar({header:o,staticAccountKeys:a,recentBlockhash:e.recentBlockhash,compiledInstructions:f,addressTableLookups:r})}serialize(){const e=Array();Xt(e,this.staticAccountKeys.length);const n=this.serializeInstructions(),r=Array();Xt(r,this.compiledInstructions.length);const s=this.serializeAddressTableLookups(),i=Array();Xt(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(we(),this.staticAccountKeys.length,"staticAccountKeys"),we("recentBlockhash"),exports.blob(r.length,"instructionsLength"),exports.blob(n.length,"serializedInstructions"),exports.blob(i.length,"addressTableLookupsLength"),exports.blob(s.length,"serializedAddressTableLookups")]),a=new Uint8Array(ir),f=o.encode({prefix:128,header:this.header,staticAccountKeysLength:new Uint8Array(e),staticAccountKeys:this.staticAccountKeys.map(m=>m.toBytes()),recentBlockhash:Ct.decode(this.recentBlockhash),instructionsLength:new Uint8Array(r),serializedInstructions:n,addressTableLookupsLength:new Uint8Array(i),serializedAddressTableLookups:s},a);return a.slice(0,f)}serializeInstructions(){let e=0;const n=new Uint8Array(ir);for(const r of this.compiledInstructions){const s=Array();Xt(s,r.accountKeyIndexes.length);const i=Array();Xt(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},n,e)}return n.slice(0,e)}serializeAddressTableLookups(){let e=0;const n=new Uint8Array(ir);for(const r of this.addressTableLookups){const s=Array();Xt(s,r.writableIndexes.length);const i=Array();Xt(i,r.readonlyIndexes.length);const o=exports.struct([we("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},n,e)}return n.slice(0,e)}static deserialize(e){let n=[...e];const r=Sn(n),s=r&zo;Se(r!==s,"Expected versioned message but received legacy message");const i=s;Se(i===0,`Expected versioned message with version 0 but found version ${i}`);const o={numRequiredSignatures:Sn(n),numReadonlySignedAccounts:Sn(n),numReadonlyUnsignedAccounts:Sn(n)},a=[],l=qt(n);for(let F=0;F<l;F++)a.push(new J(Kt(n,0,Tn)));const f=Ct.encode(Kt(n,0,Tn)),m=qt(n),p=[];for(let F=0;F<m;F++){const I=Sn(n),x=qt(n),E=Kt(n,0,x),_=qt(n),k=new Uint8Array(Kt(n,0,_));p.push({programIdIndex:I,accountKeyIndexes:E,data:k})}const C=qt(n),w=[];for(let F=0;F<C;F++){const I=new J(Kt(n,0,Tn)),x=qt(n),E=Kt(n,0,x),_=qt(n),k=Kt(n,0,_);w.push({accountKey:I,writableIndexes:E,readonlyIndexes:k})}return new ar({header:o,staticAccountKeys:a,recentBlockhash:f,compiledInstructions:p,addressTableLookups:w})}}const zl={deserializeMessageVersion(t){const e=t[0],n=e&zo;return n===e?"legacy":n},deserialize:t=>{const e=zl.deserializeMessageVersion(t);if(e==="legacy")return cn.from(t);if(e===0)return ar.deserialize(t);throw new Error(`Transaction message version ${e} deserialization is not supported`)}};let On=function(t){return t[t.BLOCKHEIGHT_EXCEEDED=0]="BLOCKHEIGHT_EXCEEDED",t[t.PROCESSED=1]="PROCESSED",t[t.TIMED_OUT=2]="TIMED_OUT",t[t.NONCE_INVALID=3]="NONCE_INVALID",t}({});const b4=ae.Buffer.alloc(Ys).fill(0);class Ie{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:n,isWritable:r})=>({pubkey:e.toJSON(),isSigner:n,isWritable:r})),programId:this.programId.toJSON(),data:[...this.data]}}}class Ce{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:n,nonceInfo:r}=e;this.minNonceContextSlot=n,this.nonceInfo=r}else if(Object.prototype.hasOwnProperty.call(e,"lastValidBlockHeight")){const{blockhash:n,lastValidBlockHeight:r}=e;this.recentBlockhash=n,this.lastValidBlockHeight=r}else{const{recentBlockhash:n,nonceInfo:r}=e;r&&(this.nonceInfo=r),this.recentBlockhash=n}}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(n=>{"instructions"in n?this.instructions=this.instructions.concat(n.instructions):"data"in n&&"programId"in n&&"keys"in n?this.instructions.push(n):this.instructions.push(new Ie(n))}),this}compileMessage(){if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json))return this._message;let e,n;if(this.nonceInfo?(e=this.nonceInfo.nonce,this.instructions[0]!=this.nonceInfo.nonceInstruction?n=[this.nonceInfo.nonceInstruction,...this.instructions]:n=this.instructions):(e=this.recentBlockhash,n=this.instructions),!e)throw new Error("Transaction recentBlockhash required");n.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 I=0;I<n.length;I++)if(n[I].programId===void 0)throw new Error(`Transaction instruction index ${I} has undefined program id`);const s=[],i=[];n.forEach(I=>{I.keys.forEach(E=>{i.push({...E})});const x=I.programId.toString();s.includes(x)||s.push(x)}),s.forEach(I=>{i.push({pubkey:new J(I),isSigner:!1,isWritable:!1})});const o=[];i.forEach(I=>{const x=I.pubkey.toString(),E=o.findIndex(_=>_.pubkey.toString()===x);E>-1?(o[E].isWritable=o[E].isWritable||I.isWritable,o[E].isSigner=o[E].isSigner||I.isSigner):o.push(I)}),o.sort(function(I,x){if(I.isSigner!==x.isSigner)return I.isSigner?-1:1;if(I.isWritable!==x.isWritable)return I.isWritable?-1:1;const E={localeMatcher:"best fit",usage:"sort",sensitivity:"variant",ignorePunctuation:!1,numeric:!1,caseFirst:"lower"};return I.pubkey.toBase58().localeCompare(x.pubkey.toBase58(),"en",E)});const a=o.findIndex(I=>I.pubkey.equals(r));if(a>-1){const[I]=o.splice(a,1);I.isSigner=!0,I.isWritable=!0,o.unshift(I)}else o.unshift({pubkey:r,isSigner:!0,isWritable:!0});for(const I of this.signatures){const x=o.findIndex(E=>E.pubkey.equals(I.publicKey));if(x>-1)o[x].isSigner||(o[x].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: ${I.publicKey.toString()}`)}let l=0,f=0,m=0;const p=[],C=[];o.forEach(({pubkey:I,isSigner:x,isWritable:E})=>{x?(p.push(I.toString()),l+=1,E||(f+=1)):(C.push(I.toString()),E||(m+=1))});const w=p.concat(C),F=n.map(I=>{const{data:x,programId:E}=I;return{programIdIndex:w.indexOf(E.toString()),accounts:I.keys.map(_=>w.indexOf(_.pubkey.toString())),data:Ct.encode(x)}});return F.forEach(I=>{Se(I.programIdIndex>=0),I.accounts.forEach(x=>Se(x>=0))}),new cn({header:{numRequiredSignatures:l,numReadonlySignedAccounts:f,numReadonlyUnsignedAccounts:m},accountKeys:w,recentBlockhash:e,instructions:F})}_compile(){const e=this.compileMessage(),n=e.accountKeys.slice(0,e.header.numRequiredSignatures);return this.signatures.length===n.length&&this.signatures.every((s,i)=>n[i].equals(s.publicKey))||(this.signatures=n.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 n=new Set;this.signatures=e.filter(r=>{const s=r.toString();return n.has(s)?!1:(n.add(s),!0)}).map(r=>({signature:null,publicKey:r}))}sign(...e){if(e.length===0)throw new Error("No signers");const n=new Set,r=[];for(const i of e){const o=i.publicKey.toString();n.has(o)||(n.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 n=new Set,r=[];for(const i of e){const o=i.publicKey.toString();n.has(o)||(n.add(o),r.push(i))}const s=this._compile();this._partialSign(s,...r)}_partialSign(e,...n){const r=e.serialize();n.forEach(s=>{const i=Ll(r,s.secretKey);this._addSignature(s.publicKey,ge(i))})}addSignature(e,n){this._compile(),this._addSignature(e,n)}_addSignature(e,n){Se(n.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(n)}verifySignatures(e=!0){return!this._getMessageSignednessErrors(this.serializeMessage(),e)}_getMessageSignednessErrors(e,n){const r={};for(const{signature:s,publicKey:i}of this.signatures)s===null?n&&(r.missing||(r.missing=[])).push(i):i4(s,e,i.toBytes())||(r.invalid||(r.invalid=[])).push(i);return r.invalid||r.missing?r:void 0}serialize(e){const{requireAllSignatures:n,verifySignatures:r}=Object.assign({requireAllSignatures:!0,verifySignatures:!0},e),s=this.serializeMessage();if(r){const i=this._getMessageSignednessErrors(s,n);if(i){let o="Signature verification failed.";throw i.invalid&&(o+=`
9
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:n}=this,r=[];Xt(r,n.length);const s=r.length+n.length*64+e.length,i=ae.Buffer.alloc(s);return Se(n.length<256),ae.Buffer.from(r).copy(i,0),n.forEach(({signature:o},a)=>{o!==null&&(Se(o.length===64,"signature has invalid length"),ae.Buffer.from(o).copy(i,r.length+a*64))}),e.copy(i,r.length+n.length*64),Se(i.length<=ir,`Transaction too large: ${i.length} > ${ir}`),i}get keys(){return Se(this.instructions.length===1),this.instructions[0].keys.map(e=>e.pubkey)}get programId(){return Se(this.instructions.length===1),this.instructions[0].programId}get data(){return Se(this.instructions.length===1),this.instructions[0].data}static from(e){let n=[...e];const r=qt(n);let s=[];for(let i=0;i<r;i++){const o=Kt(n,0,Ys);s.push(Ct.encode(ae.Buffer.from(o)))}return Ce.populate(cn.from(n),s)}static populate(e,n=[]){const r=new Ce;return r.recentBlockhash=e.recentBlockhash,e.header.numRequiredSignatures>0&&(r.feePayer=e.accountKeys[0]),n.forEach((s,i)=>{const o={signature:s==Ct.encode(m4)?null:Ct.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(l=>l.publicKey.toString()===a.toString())||e.isAccountSigner(o),isWritable:e.isAccountWritable(o)}});r.instructions.push(new Ie({keys:i,programId:e.accountKeys[s.programIdIndex],data:Ct.decode(s.data)}))}),r._message=e,r._json=r.toJSON(),r}}class qo{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,n){const{header:r,compiledInstructions:s,recentBlockhash:i}=e,{numRequiredSignatures:o,numReadonlySignedAccounts:a,numReadonlyUnsignedAccounts:l}=r,f=o-a;Se(f>0,"Message header is invalid");const m=e.staticAccountKeys.length-o-l;Se(m>=0,"Message header is invalid");const p=e.getAccountKeys(n),C=p.get(0);if(C===void 0)throw new Error("Failed to decompile message because no account keys were found");const w=[];for(const F of s){const I=[];for(const E of F.accountKeyIndexes){const _=p.get(E);if(_===void 0)throw new Error(`Failed to find key for account key index ${E}`);const k=E<o;let P;k?P=E<f:E<p.staticAccountKeys.length?P=E-o<m:P=E-p.staticAccountKeys.length<p.accountKeysFromLookups.writable.length,I.push({pubkey:_,isSigner:E<r.numRequiredSignatures,isWritable:P})}const x=p.get(F.programIdIndex);if(x===void 0)throw new Error(`Failed to find program id for program id index ${F.programIdIndex}`);w.push(new Ie({programId:x,data:ge(F.data),keys:I}))}return new qo({payerKey:C,instructions:w,recentBlockhash:i})}compileToLegacyMessage(){return cn.compile({payerKey:this.payerKey,recentBlockhash:this.recentBlockhash,instructions:this.instructions})}compileToV0Message(e){return ar.compile({payerKey:this.payerKey,recentBlockhash:this.recentBlockhash,instructions:this.instructions,addressLookupTableAccounts:e})}}class Ko{get version(){return this.message.version}constructor(e,n){if(this.signatures=void 0,this.message=void 0,n!==void 0)Se(n.length===e.header.numRequiredSignatures,"Expected signatures length to be equal to the number of required signatures"),this.signatures=n;else{const r=[];for(let s=0;s<e.header.numRequiredSignatures;s++)r.push(new Uint8Array(Ys));this.signatures=r}this.message=e}serialize(){const e=this.message.serialize(),n=Array();Xt(n,this.signatures.length);const r=exports.struct([exports.blob(n.length,"encodedSignaturesLength"),exports.seq(l4(),this.signatures.length,"signatures"),exports.blob(e.length,"serializedMessage")]),s=new Uint8Array(2048),i=r.encode({encodedSignaturesLength:new Uint8Array(n),signatures:this.signatures,serializedMessage:e},s);return s.slice(0,i)}static deserialize(e){let n=[...e];const r=[],s=qt(n);for(let o=0;o<s;o++)r.push(new Uint8Array(Kt(n,0,Ys)));const i=zl.deserialize(new Uint8Array(n));return new Ko(i,r)}sign(e){const n=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));Se(i>=0,`Cannot sign with non signer key ${s.publicKey.toBase58()}`),this.signatures[i]=Ll(n,s.secretKey)}}addSignature(e,n){Se(n.byteLength===64,"Signature must be 64 bytes long");const s=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures).findIndex(i=>i.equals(e));Se(s>=0,`Can not add signature; \`${e.toBase58()}\` is not required to sign this transaction`),this.signatures[s]=n}}const b4=160,p4=64,y4=b4/p4,im=1e3/y4,un=new J("SysvarC1ock11111111111111111111111111111111"),g4=new J("SysvarEpochSchedu1e111111111111111111111111"),om=new J("Sysvar1nstructions1111111111111111111111111"),Ni=new J("SysvarRecentB1ockHashes11111111111111111111"),Ir=new J("SysvarRent111111111111111111111111111111111"),w4=new J("SysvarRewards111111111111111111111111111111"),E4=new J("SysvarS1otHashes111111111111111111111111111"),A4=new J("SysvarS1otHistory11111111111111111111111111"),zi=new J("SysvarStakeHistory1111111111111111111111111");class os extends Error{constructor({action:e,signature:n,transactionMessage:r,logs:s}){const i=s?`Logs:
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:n}=this,r=[];Xt(r,n.length);const s=r.length+n.length*64+e.length,i=ae.Buffer.alloc(s);return Se(n.length<256),ae.Buffer.from(r).copy(i,0),n.forEach(({signature:o},a)=>{o!==null&&(Se(o.length===64,"signature has invalid length"),ae.Buffer.from(o).copy(i,r.length+a*64))}),e.copy(i,r.length+n.length*64),Se(i.length<=ir,`Transaction too large: ${i.length} > ${ir}`),i}get keys(){return Se(this.instructions.length===1),this.instructions[0].keys.map(e=>e.pubkey)}get programId(){return Se(this.instructions.length===1),this.instructions[0].programId}get data(){return Se(this.instructions.length===1),this.instructions[0].data}static from(e){let n=[...e];const r=qt(n);let s=[];for(let i=0;i<r;i++){const o=Kt(n,0,Ys);s.push(Ct.encode(ae.Buffer.from(o)))}return Ce.populate(cn.from(n),s)}static populate(e,n=[]){const r=new Ce;return r.recentBlockhash=e.recentBlockhash,e.header.numRequiredSignatures>0&&(r.feePayer=e.accountKeys[0]),n.forEach((s,i)=>{const o={signature:s==Ct.encode(b4)?null:Ct.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(l=>l.publicKey.toString()===a.toString())||e.isAccountSigner(o),isWritable:e.isAccountWritable(o)}});r.instructions.push(new Ie({keys:i,programId:e.accountKeys[s.programIdIndex],data:Ct.decode(s.data)}))}),r._message=e,r._json=r.toJSON(),r}}class Ko{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,n){const{header:r,compiledInstructions:s,recentBlockhash:i}=e,{numRequiredSignatures:o,numReadonlySignedAccounts:a,numReadonlyUnsignedAccounts:l}=r,f=o-a;Se(f>0,"Message header is invalid");const m=e.staticAccountKeys.length-o-l;Se(m>=0,"Message header is invalid");const p=e.getAccountKeys(n),C=p.get(0);if(C===void 0)throw new Error("Failed to decompile message because no account keys were found");const w=[];for(const F of s){const I=[];for(const E of F.accountKeyIndexes){const _=p.get(E);if(_===void 0)throw new Error(`Failed to find key for account key index ${E}`);const k=E<o;let P;k?P=E<f:E<p.staticAccountKeys.length?P=E-o<m:P=E-p.staticAccountKeys.length<p.accountKeysFromLookups.writable.length,I.push({pubkey:_,isSigner:E<r.numRequiredSignatures,isWritable:P})}const x=p.get(F.programIdIndex);if(x===void 0)throw new Error(`Failed to find program id for program id index ${F.programIdIndex}`);w.push(new Ie({programId:x,data:ge(F.data),keys:I}))}return new Ko({payerKey:C,instructions:w,recentBlockhash:i})}compileToLegacyMessage(){return cn.compile({payerKey:this.payerKey,recentBlockhash:this.recentBlockhash,instructions:this.instructions})}compileToV0Message(e){return ar.compile({payerKey:this.payerKey,recentBlockhash:this.recentBlockhash,instructions:this.instructions,addressLookupTableAccounts:e})}}class $o{get version(){return this.message.version}constructor(e,n){if(this.signatures=void 0,this.message=void 0,n!==void 0)Se(n.length===e.header.numRequiredSignatures,"Expected signatures length to be equal to the number of required signatures"),this.signatures=n;else{const r=[];for(let s=0;s<e.header.numRequiredSignatures;s++)r.push(new Uint8Array(Ys));this.signatures=r}this.message=e}serialize(){const e=this.message.serialize(),n=Array();Xt(n,this.signatures.length);const r=exports.struct([exports.blob(n.length,"encodedSignaturesLength"),exports.seq(d4(),this.signatures.length,"signatures"),exports.blob(e.length,"serializedMessage")]),s=new Uint8Array(2048),i=r.encode({encodedSignaturesLength:new Uint8Array(n),signatures:this.signatures,serializedMessage:e},s);return s.slice(0,i)}static deserialize(e){let n=[...e];const r=[],s=qt(n);for(let o=0;o<s;o++)r.push(new Uint8Array(Kt(n,0,Ys)));const i=zl.deserialize(new Uint8Array(n));return new $o(i,r)}sign(e){const n=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));Se(i>=0,`Cannot sign with non signer key ${s.publicKey.toBase58()}`),this.signatures[i]=Ll(n,s.secretKey)}}addSignature(e,n){Se(n.byteLength===64,"Signature must be 64 bytes long");const s=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures).findIndex(i=>i.equals(e));Se(s>=0,`Can not add signature; \`${e.toBase58()}\` is not required to sign this transaction`),this.signatures[s]=n}}const p4=160,y4=64,g4=p4/y4,im=1e3/g4,un=new J("SysvarC1ock11111111111111111111111111111111"),w4=new J("SysvarEpochSchedu1e111111111111111111111111"),om=new J("Sysvar1nstructions1111111111111111111111111"),Ni=new J("SysvarRecentB1ockHashes11111111111111111111"),Ir=new J("SysvarRent111111111111111111111111111111111"),E4=new J("SysvarRewards111111111111111111111111111111"),A4=new J("SysvarS1otHashes111111111111111111111111111"),B4=new J("SysvarS1otHistory11111111111111111111111111"),zi=new J("SysvarStakeHistory1111111111111111111111111");class os extends Error{constructor({action:e,signature:n,transactionMessage:r,logs:s}){const i=s?`Logs:
11
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 ${n} resulted in an error.
12
12
  ${r}. `+i+o;break;case"simulate":a=`Simulation failed.
13
13
  Message: ${r}.
14
- `+i+o;break;default:a=`Unknown action '${(l=>l)(e)}'`}super(a),this.signature=void 0,this.transactionMessage=void 0,this.transactionLogs=void 0,this.signature=n,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((n,r)=>{e.getTransaction(this.signature).then(s=>{if(s&&s.meta&&s.meta.logMessages){const i=s.meta.logMessages;this.transactionLogs=i,n(i)}else r(new Error("Log messages not found"))}).catch(r)})),await this.transactionLogs}}const B4={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:n,data:r},s){super(s!=null?`${s}: ${n}`:n),this.code=void 0,this.data=void 0,this.code=e,this.data=r,this.name="SolanaJSONRPCError"}}async function Dc(t,e,n,r){const s=r&&{skipPreflight:r.skipPreflight,preflightCommitment:r.preflightCommitment||r.commitment,maxRetries:r.maxRetries,minContextSlot:r.minContextSlot},i=await t.sendTransaction(e,n,s);let o;if(e.recentBlockhash!=null&&e.lastValidBlockHeight!=null)o=(await t.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,l=a.keys[0].pubkey;o=(await t.confirmTransaction({abortSignal:r==null?void 0:r.abortSignal,minContextSlot:e.minNonceContextSlot,nonceAccountPubkey:l,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 t.confirmTransaction(i,r&&r.commitment)).value;if(o.err)throw i!=null?new os({action:"send",signature:i,transactionMessage:`Status: (${JSON.stringify(o)})`}):new Error(`Transaction ${i} failed (${JSON.stringify(o)})`);return i}function hr(t){return new Promise(e=>setTimeout(e,t))}function Ee(t,e){const n=t.layout.span>=0?t.layout.span:rm(t,e),r=ae.Buffer.alloc(n),s=Object.assign({instruction:t.index},e);return t.layout.encode(s,r),r}function ke(t,e){let n;try{n=t.layout.decode(e)}catch(r){throw new Error("invalid instruction; "+r)}if(n.instruction!==t.index)throw new Error(`invalid instruction; instruction index mismatch ${n.instruction} != ${t.index}`);return n}const am=vt("lamportsPerSignature"),cm=exports.struct([exports.u32("version"),exports.u32("state"),we("authorizedPubkey"),we("nonce"),exports.struct([am],"feeCalculator")]),vc=cm.span;class $o{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 n=cm.decode(ge(e),0);return new $o({authorizedPubkey:new J(n.authorizedPubkey),nonce:new J(n.nonce).toString(),feeCalculator:n.feeCalculator})}}const x4=t=>{const e=t.decode.bind(t),n=t.encode.bind(t);return{decode:e,encode:n}},C4=t=>e=>{const n=exports.blob(t,e),{encode:r,decode:s}=x4(n),i=n;return i.decode=(o,a)=>{const l=s(o,a);return Kh(ae.Buffer.from(l))},i.encode=(o,a,l)=>{const f=_l(o,t);return r(f,a,l)},i},as=C4(8);class S4{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(Me))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:n,space:r,programId:s}=ke(Me.Create,e.data);return{fromPubkey:e.keys[0].pubkey,newAccountPubkey:e.keys[1].pubkey,lamports:n,space:r,programId:new J(s)}}static decodeTransfer(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{lamports:n}=ke(Me.Transfer,e.data);return{fromPubkey:e.keys[0].pubkey,toPubkey:e.keys[1].pubkey,lamports:n}}static decodeTransferWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{lamports:n,seed:r,programId:s}=ke(Me.TransferWithSeed,e.data);return{fromPubkey:e.keys[0].pubkey,basePubkey:e.keys[1].pubkey,toPubkey:e.keys[2].pubkey,lamports:n,seed:r,programId:new J(s)}}static decodeAllocate(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{space:n}=ke(Me.Allocate,e.data);return{accountPubkey:e.keys[0].pubkey,space:n}}static decodeAllocateWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{base:n,seed:r,space:s,programId:i}=ke(Me.AllocateWithSeed,e.data);return{accountPubkey:e.keys[0].pubkey,basePubkey:new J(n),seed:r,space:s,programId:new J(i)}}static decodeAssign(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{programId:n}=ke(Me.Assign,e.data);return{accountPubkey:e.keys[0].pubkey,programId:new J(n)}}static decodeAssignWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{base:n,seed:r,programId:s}=ke(Me.AssignWithSeed,e.data);return{accountPubkey:e.keys[0].pubkey,basePubkey:new J(n),seed:r,programId:new J(s)}}static decodeCreateWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{base:n,seed:r,lamports:s,space:i,programId:o}=ke(Me.CreateWithSeed,e.data);return{fromPubkey:e.keys[0].pubkey,newAccountPubkey:e.keys[1].pubkey,basePubkey:new J(n),seed:r,lamports:s,space:i,programId:new J(o)}}static decodeNonceInitialize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{authorized:n}=ke(Me.InitializeNonceAccount,e.data);return{noncePubkey:e.keys[0].pubkey,authorizedPubkey:new J(n)}}static decodeNonceAdvance(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),ke(Me.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:n}=ke(Me.WithdrawNonceAccount,e.data);return{noncePubkey:e.keys[0].pubkey,toPubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey,lamports:n}}static decodeNonceAuthorize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{authorized:n}=ke(Me.AuthorizeNonceAccount,e.data);return{noncePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[1].pubkey,newAuthorizedPubkey:new J(n)}}static checkProgramId(e){if(!e.equals(Et.programId))throw new Error("invalid instruction; programId is not SystemProgram")}static checkKeyLength(e,n){if(e.length<n)throw new Error(`invalid instruction; found ${e.length} keys, expected at least ${n}`)}}const Me=Object.freeze({Create:{index:0,layout:exports.struct([exports.u32("instruction"),exports.ns64("lamports"),exports.ns64("space"),we("programId")])},Assign:{index:1,layout:exports.struct([exports.u32("instruction"),we("programId")])},Transfer:{index:2,layout:exports.struct([exports.u32("instruction"),as("lamports")])},CreateWithSeed:{index:3,layout:exports.struct([exports.u32("instruction"),we("base"),Er("seed"),exports.ns64("lamports"),exports.ns64("space"),we("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"),we("authorized")])},AuthorizeNonceAccount:{index:7,layout:exports.struct([exports.u32("instruction"),we("authorized")])},Allocate:{index:8,layout:exports.struct([exports.u32("instruction"),exports.ns64("space")])},AllocateWithSeed:{index:9,layout:exports.struct([exports.u32("instruction"),we("base"),Er("seed"),exports.ns64("space"),we("programId")])},AssignWithSeed:{index:10,layout:exports.struct([exports.u32("instruction"),we("base"),Er("seed"),we("programId")])},TransferWithSeed:{index:11,layout:exports.struct([exports.u32("instruction"),as("lamports"),Er("seed"),we("programId")])},UpgradeNonceAccount:{index:12,layout:exports.struct([exports.u32("instruction")])}});class Et{constructor(){}static createAccount(e){const n=Me.Create,r=Ee(n,{lamports:e.lamports,space:e.space,programId:ge(e.programId.toBuffer())});return new Ie({keys:[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.newAccountPubkey,isSigner:!0,isWritable:!0}],programId:this.programId,data:r})}static transfer(e){let n,r;if("basePubkey"in e){const s=Me.TransferWithSeed;n=Ee(s,{lamports:BigInt(e.lamports),seed:e.seed,programId:ge(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=Me.Transfer;n=Ee(s,{lamports:BigInt(e.lamports)}),r=[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0}]}return new Ie({keys:r,programId:this.programId,data:n})}static assign(e){let n,r;if("basePubkey"in e){const s=Me.AssignWithSeed;n=Ee(s,{base:ge(e.basePubkey.toBuffer()),seed:e.seed,programId:ge(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]}else{const s=Me.Assign;n=Ee(s,{programId:ge(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]}return new Ie({keys:r,programId:this.programId,data:n})}static createAccountWithSeed(e){const n=Me.CreateWithSeed,r=Ee(n,{base:ge(e.basePubkey.toBuffer()),seed:e.seed,lamports:e.lamports,space:e.space,programId:ge(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 Ie({keys:s,programId:this.programId,data:r})}static createNonceAccount(e){const n=new Ce;"basePubkey"in e&&"seed"in e?n.add(Et.createAccountWithSeed({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,basePubkey:e.basePubkey,seed:e.seed,lamports:e.lamports,space:vc,programId:this.programId})):n.add(Et.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,lamports:e.lamports,space:vc,programId:this.programId}));const r={noncePubkey:e.noncePubkey,authorizedPubkey:e.authorizedPubkey};return n.add(this.nonceInitialize(r)),n}static nonceInitialize(e){const n=Me.InitializeNonceAccount,r=Ee(n,{authorized:ge(e.authorizedPubkey.toBuffer())}),s={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:Ni,isSigner:!1,isWritable:!1},{pubkey:Ir,isSigner:!1,isWritable:!1}],programId:this.programId,data:r};return new Ie(s)}static nonceAdvance(e){const n=Me.AdvanceNonceAccount,r=Ee(n),s={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:Ni,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:r};return new Ie(s)}static nonceWithdraw(e){const n=Me.WithdrawNonceAccount,r=Ee(n,{lamports:e.lamports});return new Ie({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0},{pubkey:Ni,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 n=Me.AuthorizeNonceAccount,r=Ee(n,{authorized:ge(e.newAuthorizedPubkey.toBuffer())});return new Ie({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:r})}static allocate(e){let n,r;if("basePubkey"in e){const s=Me.AllocateWithSeed;n=Ee(s,{base:ge(e.basePubkey.toBuffer()),seed:e.seed,space:e.space,programId:ge(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]}else{const s=Me.Allocate;n=Ee(s,{space:e.space}),r=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]}return new Ie({keys:r,programId:this.programId,data:n})}}Et.programId=new J("11111111111111111111111111111111");const D4=ir-300;class Ur{constructor(){}static getMinNumSignatures(e){return 2*(Math.ceil(e/Ur.chunkSize)+1+1)}static async load(e,n,r,s,i){{const p=await e.getMinimumBalanceForRentExemption(i.length),C=await e.getAccountInfo(r.publicKey,"confirmed");let w=null;if(C!==null){if(C.executable)return console.error("Program load failed, account is already executable"),!1;C.data.length!==i.length&&(w=w||new Ce,w.add(Et.allocate({accountPubkey:r.publicKey,space:i.length}))),C.owner.equals(s)||(w=w||new Ce,w.add(Et.assign({accountPubkey:r.publicKey,programId:s}))),C.lamports<p&&(w=w||new Ce,w.add(Et.transfer({fromPubkey:n.publicKey,toPubkey:r.publicKey,lamports:p-C.lamports})))}else w=new Ce().add(Et.createAccount({fromPubkey:n.publicKey,newAccountPubkey:r.publicKey,lamports:p>0?p:1,space:i.length,programId:s}));w!==null&&await Dc(e,w,[n,r],{commitment:"confirmed"})}const o=exports.struct([exports.u32("instruction"),exports.u32("offset"),exports.u32("bytesLength"),exports.u32("bytesLengthPadding"),exports.seq(exports.u8("byte"),sr(exports.u32(),-8),"bytes")]),a=Ur.chunkSize;let l=0,f=i,m=[];for(;f.length>0;){const p=f.slice(0,a),C=ae.Buffer.alloc(a+16);o.encode({instruction:0,offset:l,bytes:p,bytesLength:0,bytesLengthPadding:0},C);const w=new Ce().add({keys:[{pubkey:r.publicKey,isSigner:!0,isWritable:!0}],programId:s,data:C});m.push(Dc(e,w,[n,r],{commitment:"confirmed"})),e._rpcEndpoint.includes("solana.com")&&await hr(1e3/4),l+=a,f=f.slice(a)}await Promise.all(m);{const p=exports.struct([exports.u32("instruction")]),C=ae.Buffer.alloc(p.span);p.encode({instruction:1},C);const w=new Ce().add({keys:[{pubkey:r.publicKey,isSigner:!0,isWritable:!0},{pubkey:Ir,isSigner:!1,isWritable:!1}],programId:s,data:C}),F="processed",I=await e.sendTransaction(w,[n,r],{preflightCommitment:F}),{context:x,value:E}=await e.confirmTransaction({signature:I,lastValidBlockHeight:w.lastValidBlockHeight,blockhash:w.recentBlockhash},F);if(E.err)throw new Error(`Transaction ${I} failed (${JSON.stringify(E)})`);for(;;){try{if(await e.getSlot({commitment:F})>x.slot)break}catch{}await new Promise(_=>setTimeout(_,Math.round(im/2)))}}return!0}}Ur.chunkSize=D4;const v4=new J("BPFLoader2111111111111111111111111111111111");class k4{static getMinNumSignatures(e){return Ur.getMinNumSignatures(e)}static load(e,n,r,s,i){return Ur.load(e,n,r,i,s)}}function F4(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Oa,Au;function T4(){if(Au)return Oa;Au=1;var t=Object.prototype.toString,e=Object.keys||function(r){var s=[];for(var i in r)s.push(i);return s};function n(r,s){var i,o,a,l,f,m,p;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 n(r.toJSON(),s);if(p=t.call(r),p==="[object Array]"){for(a="[",o=r.length-1,i=0;i<o;i++)a+=n(r[i],!0)+",";return o>-1&&(a+=n(r[i],!0)),a+"]"}else if(p==="[object Object]"){for(l=e(r).sort(),o=l.length,a="",i=0;i<o;)f=l[i],m=n(r[f],!1),m!==void 0&&(a&&(a+=","),a+=JSON.stringify(f)+":"+m),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 Oa=function(r){var s=n(r,!1);if(s!==void 0)return""+s},Oa}var I4=T4(),Bu=F4(I4);const vs=32;function Na(t){let e=0;for(;t>1;)t/=2,e++;return e}function U4(t){return t===0?1:(t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t|=t>>32,t+1)}class lm{constructor(e,n,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=n,this.warmup=r,this.firstNormalEpoch=s,this.firstNormalSlot=i}getEpoch(e){return this.getEpochAndSlotIndex(e)[0]}getEpochAndSlotIndex(e){if(e<this.firstNormalSlot){const n=Na(U4(e+vs+1))-Na(vs)-1,r=this.getSlotsInEpoch(n),s=e-(r-vs);return[n,s]}else{const n=e-this.firstNormalSlot,r=Math.floor(n/this.slotsPerEpoch),s=this.firstNormalEpoch+r,i=n%this.slotsPerEpoch;return[s,i]}}getFirstSlotInEpoch(e){return e<=this.firstNormalEpoch?(Math.pow(2,e)-1)*vs:(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+Na(vs)):this.slotsPerEpoch}}var _4=globalThis.fetch;class M4 extends n4{constructor(e,n,r){const s=i=>{const o=e4(i,{autoconnect:!0,max_reconnects:5,reconnect:!0,reconnect_interval:1e3,...n});return"socket"in o?this.underlyingSocket=o.socket:this.underlyingSocket=o,o};super(s,e,n,r),this.underlyingSocket=void 0}call(...e){var r;const n=(r=this.underlyingSocket)==null?void 0:r.readyState;return n===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 "+n+")"))}notify(...e){var r;const n=(r=this.underlyingSocket)==null?void 0:r.readyState;return n===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 "+n+")"))}}function R4(t,e){let n;try{n=t.layout.decode(e)}catch(r){throw new Error("invalid instruction; "+r)}if(n.typeIndex!==t.index)throw new Error(`invalid account data; account type mismatch ${n.typeIndex} != ${t.index}`);return n}const xu=56;class co{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 n=R4(W4,e),r=e.length-xu;Se(r>=0,"lookup table is invalid"),Se(r%32===0,"lookup table is invalid");const s=r/32,{addresses:i}=exports.struct([exports.seq(we(),s,"addresses")]).decode(e.slice(xu));return{deactivationSlot:n.deactivationSlot,lastExtendedSlot:n.lastExtendedSlot,lastExtendedSlotStartIndex:n.lastExtendedStartIndex,authority:n.authority.length!==0?new J(n.authority[0]):void 0,addresses:i.map(o=>new J(o))}}}const W4={index:1,layout:exports.struct([exports.u32("typeIndex"),as("deactivationSlot"),vt("lastExtendedSlot"),exports.u8("lastExtendedStartIndex"),exports.u8(),exports.seq(we(),sr(exports.u8(),-1),"authority")])},P4=/^[^:]+:\/\/([^:[]+|\[[^\]]+\])(:\d+)?(.*)/i;function L4(t){const e=t.match(P4);if(e==null)throw TypeError(`Failed to validate endpoint URL \`${t}\``);const[n,r,s,i]=e,o=t.startsWith("https:")?"wss:":"ws:",a=s==null?null:parseInt(s.slice(1),10),l=a==null?"":`:${a+1}`;return`${o}//${r}${l}${i}`}const Ke=fi(Rl(J),Q(),t=>new J(t)),dm=Wl([Q(),He("base64")]),Hl=fi(Rl(ae.Buffer),dm,t=>ae.Buffer.from(t[0],"base64")),um=30*1e3;function O4(t){if(/^https?:/.test(t)===!1)throw new TypeError("Endpoint URL must start with `http:` or `https:`.");return t}function _e(t){let e,n;if(typeof t=="string")e=t;else if(t){const{commitment:r,...s}=t;e=r,n=s}return{commitment:e,config:n}}function Cu(t){return t.map(e=>"memcmp"in e?{...e,memcmp:{...e.memcmp,encoding:e.memcmp.encoding??"base58"}}:e)}function fm(t){return Ht([X({jsonrpc:He("2.0"),id:Q(),result:t}),X({jsonrpc:He("2.0"),id:Q(),error:X({code:Es(),message:Q(),data:ce(S3())})})])}const N4=fm(Es());function ye(t){return fi(fm(t),N4,e=>"error"in e?e:{...e,result:te(e.result,t)})}function Qe(t){return ye(X({context:X({slot:z()}),value:t}))}function jo(t){return X({context:X({slot:z()}),value:t})}function za(t,e){return t===0?new ar({header:e.header,staticAccountKeys:e.accountKeys.map(n=>new J(n)),recentBlockhash:e.recentBlockhash,compiledInstructions:e.instructions.map(n=>({programIdIndex:n.programIdIndex,accountKeyIndexes:n.accounts,data:Ct.decode(n.data)})),addressTableLookups:e.addressTableLookups}):new cn(e)}const z4=X({foundation:z(),foundationTerm:z(),initial:z(),taper:z(),terminal:z()}),H4=ye(ne(re(X({epoch:z(),effectiveSlot:z(),amount:z(),postBalance:z(),commission:ce(re(z()))})))),q4=ne(X({slot:z(),prioritizationFee:z()})),K4=X({total:z(),validator:z(),foundation:z(),epoch:z()}),$4=X({epoch:z(),slotIndex:z(),slotsInEpoch:z(),absoluteSlot:z(),blockHeight:ce(z()),transactionCount:ce(z())}),j4=X({slotsPerEpoch:z(),leaderScheduleSlotOffset:z(),warmup:_n(),firstNormalEpoch:z(),firstNormalSlot:z()}),V4=Vh(Q(),ne(z())),Or=re(Ht([X({}),Q()])),G4=X({err:Or}),Y4=He("receivedSignature"),X4=X({"solana-core":Q(),"feature-set":ce(z())}),Z4=X({program:Q(),programId:Ke,parsed:Es()}),J4=X({programId:Ke,accounts:ne(Ke),data:Q()}),Su=Qe(X({err:re(Ht([X({}),Q()])),logs:re(ne(Q())),accounts:ce(re(ne(re(X({executable:_n(),owner:Q(),lamports:z(),data:ne(Q()),rentEpoch:ce(z())}))))),unitsConsumed:ce(z()),returnData:ce(re(X({programId:Q(),data:Wl([Q(),He("base64")])}))),innerInstructions:ce(re(ne(X({index:z(),instructions:ne(Ht([Z4,J4]))}))))})),Q4=Qe(X({byIdentity:Vh(Q(),ne(z())),range:X({firstSlot:z(),lastSlot:z()})}));function e6(t,e,n,r,s,i){const o=n||_4;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 l;return r&&(l=async(m,p)=>{const C=await new Promise((w,F)=>{try{r(m,p,(I,x)=>w([I,x]))}catch(I){F(I)}});return await o(...C)}),new Qh(async(m,p)=>{const C={method:"POST",body:m,agent:a,headers:Object.assign({"Content-Type":"application/json"},e||{},ew)};try{let w=5,F,I=500;for(;l?F=await l(t,C):F=await o(t,C),!(F.status!==429||s===!0||(w-=1,w===0));)console.error(`Server responded with ${F.status} ${F.statusText}. Retrying after ${I}ms delay...`),await hr(I),I*=2;const x=await F.text();F.ok?p(null,x):p(new Error(`${F.status} ${F.statusText}: ${x}`))}catch(w){w instanceof Error&&p(w)}},{})}function t6(t){return(e,n)=>new Promise((r,s)=>{t.request(e,n,(i,o)=>{if(i){s(i);return}r(o)})})}function n6(t){return e=>new Promise((n,r)=>{e.length===0&&n([]);const s=e.map(i=>t.request(i.methodName,i.args));t.request(s,(i,o)=>{if(i){r(i);return}n(o)})})}const r6=ye(z4),s6=ye(K4),i6=ye(q4),o6=ye($4),a6=ye(j4),c6=ye(V4),l6=ye(z()),d6=Qe(X({total:z(),circulating:z(),nonCirculating:z(),nonCirculatingAccounts:ne(Ke)})),kc=X({amount:Q(),uiAmount:re(z()),decimals:z(),uiAmountString:ce(Q())}),u6=Qe(ne(X({address:Ke,amount:Q(),uiAmount:re(z()),decimals:z(),uiAmountString:ce(Q())}))),f6=Qe(ne(X({pubkey:Ke,account:X({executable:_n(),owner:Ke,lamports:z(),data:Hl,rentEpoch:z()})}))),Fc=X({program:Q(),parsed:Es(),space:z()}),h6=Qe(ne(X({pubkey:Ke,account:X({executable:_n(),owner:Ke,lamports:z(),data:Fc,rentEpoch:z()})}))),m6=Qe(ne(X({lamports:z(),address:Ke}))),Zs=X({executable:_n(),owner:Ke,lamports:z(),data:Hl,rentEpoch:z()}),b6=X({pubkey:Ke,account:Zs}),p6=fi(Ht([Rl(ae.Buffer),Fc]),Ht([dm,Fc]),t=>Array.isArray(t)?te(t,Hl):t),Tc=X({executable:_n(),owner:Ke,lamports:z(),data:p6,rentEpoch:z()}),y6=X({pubkey:Ke,account:Tc}),g6=X({state:Ht([He("active"),He("inactive"),He("activating"),He("deactivating")]),active:z(),inactive:z()}),w6=ye(ne(X({signature:Q(),slot:z(),err:Or,memo:re(Q()),blockTime:ce(re(z()))}))),E6=ye(ne(X({signature:Q(),slot:z(),err:Or,memo:re(Q()),blockTime:ce(re(z()))}))),A6=X({subscription:z(),result:jo(Zs)}),B6=X({pubkey:Ke,account:Zs}),x6=X({subscription:z(),result:jo(B6)}),C6=X({parent:z(),slot:z(),root:z()}),S6=X({subscription:z(),result:C6}),D6=Ht([X({type:Ht([He("firstShredReceived"),He("completed"),He("optimisticConfirmation"),He("root")]),slot:z(),timestamp:z()}),X({type:He("createdBank"),parent:z(),slot:z(),timestamp:z()}),X({type:He("frozen"),slot:z(),timestamp:z(),stats:X({numTransactionEntries:z(),numSuccessfulTransactions:z(),numFailedTransactions:z(),maxTransactionsPerEntry:z()})}),X({type:He("dead"),slot:z(),timestamp:z(),err:Q()})]),v6=X({subscription:z(),result:D6}),k6=X({subscription:z(),result:jo(Ht([G4,Y4]))}),F6=X({subscription:z(),result:z()}),T6=X({pubkey:Q(),gossip:re(Q()),tpu:re(Q()),rpc:re(Q()),version:re(Q())}),Du=X({votePubkey:Q(),nodePubkey:Q(),activatedStake:z(),epochVoteAccount:_n(),epochCredits:ne(Wl([z(),z(),z()])),commission:z(),lastVote:z(),rootSlot:re(z())}),I6=ye(X({current:ne(Du),delinquent:ne(Du)})),U6=Ht([He("processed"),He("confirmed"),He("finalized")]),_6=X({slot:z(),confirmations:re(z()),err:Or,confirmationStatus:ce(U6)}),M6=Qe(ne(re(_6))),R6=ye(z()),hm=X({accountKey:Ke,writableIndexes:ne(z()),readonlyIndexes:ne(z())}),ql=X({signatures:ne(Q()),message:X({accountKeys:ne(Q()),header:X({numRequiredSignatures:z(),numReadonlySignedAccounts:z(),numReadonlyUnsignedAccounts:z()}),instructions:ne(X({accounts:ne(z()),data:Q(),programIdIndex:z()})),recentBlockhash:Q(),addressTableLookups:ce(ne(hm))})}),mm=X({pubkey:Ke,signer:_n(),writable:_n(),source:ce(Ht([He("transaction"),He("lookupTable")]))}),bm=X({accountKeys:ne(mm),signatures:ne(Q())}),pm=X({parsed:Es(),program:Q(),programId:Ke}),ym=X({accounts:ne(Ke),data:Q(),programId:Ke}),W6=Ht([ym,pm]),P6=Ht([X({parsed:Es(),program:Q(),programId:Q()}),X({accounts:ne(Q()),data:Q(),programId:Q()})]),gm=fi(W6,P6,t=>"accounts"in t?te(t,ym):te(t,pm)),wm=X({signatures:ne(Q()),message:X({accountKeys:ne(mm),instructions:ne(gm),recentBlockhash:Q(),addressTableLookups:ce(re(ne(hm)))})}),lo=X({accountIndex:z(),mint:Q(),owner:ce(Q()),programId:ce(Q()),uiTokenAmount:kc}),Em=X({writable:ne(Ke),readonly:ne(Ke)}),Vo=X({err:Or,fee:z(),innerInstructions:ce(re(ne(X({index:z(),instructions:ne(X({accounts:ne(z()),data:Q(),programIdIndex:z()}))})))),preBalances:ne(z()),postBalances:ne(z()),logMessages:ce(re(ne(Q()))),preTokenBalances:ce(re(ne(lo))),postTokenBalances:ce(re(ne(lo))),loadedAddresses:ce(Em),computeUnitsConsumed:ce(z())}),Kl=X({err:Or,fee:z(),innerInstructions:ce(re(ne(X({index:z(),instructions:ne(gm)})))),preBalances:ne(z()),postBalances:ne(z()),logMessages:ce(re(ne(Q()))),preTokenBalances:ce(re(ne(lo))),postTokenBalances:ce(re(ne(lo))),loadedAddresses:ce(Em),computeUnitsConsumed:ce(z())}),As=Ht([He(0),He("legacy")]),Nr=X({pubkey:Q(),lamports:z(),postBalance:re(z()),rewardType:re(Q()),commission:ce(re(z()))}),L6=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),transactions:ne(X({transaction:ql,meta:re(Vo),version:ce(As)})),rewards:ce(ne(Nr)),blockTime:re(z()),blockHeight:re(z())}))),O6=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),rewards:ce(ne(Nr)),blockTime:re(z()),blockHeight:re(z())}))),N6=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),transactions:ne(X({transaction:bm,meta:re(Vo),version:ce(As)})),rewards:ce(ne(Nr)),blockTime:re(z()),blockHeight:re(z())}))),z6=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),transactions:ne(X({transaction:wm,meta:re(Kl),version:ce(As)})),rewards:ce(ne(Nr)),blockTime:re(z()),blockHeight:re(z())}))),H6=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),transactions:ne(X({transaction:bm,meta:re(Kl),version:ce(As)})),rewards:ce(ne(Nr)),blockTime:re(z()),blockHeight:re(z())}))),q6=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),rewards:ce(ne(Nr)),blockTime:re(z()),blockHeight:re(z())}))),K6=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),transactions:ne(X({transaction:ql,meta:re(Vo)})),rewards:ce(ne(Nr)),blockTime:re(z())}))),vu=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),signatures:ne(Q()),blockTime:re(z())}))),Ha=ye(re(X({slot:z(),meta:re(Vo),blockTime:ce(re(z())),transaction:ql,version:ce(As)}))),Ci=ye(re(X({slot:z(),transaction:wm,meta:re(Kl),blockTime:ce(re(z())),version:ce(As)}))),$6=Qe(X({blockhash:Q(),lastValidBlockHeight:z()})),j6=Qe(_n()),V6=X({slot:z(),numTransactions:z(),numSlots:z(),samplePeriodSecs:z()}),G6=ye(ne(V6)),Y6=Qe(re(X({feeCalculator:X({lamportsPerSignature:z()})}))),X6=ye(Q()),Z6=ye(Q()),J6=X({err:Or,logs:ne(Q()),signature:Q()}),Q6=X({result:jo(J6),subscription:z()}),ew={"solana-client":"js/1.0.0-maintenance"};class Am{constructor(e,n){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 f={};return async m=>{const{commitment:p,config:C}=_e(m),w=this._buildArgs([],p,void 0,C),F=Bu(w);return f[F]=f[F]??(async()=>{try{const I=await this._rpcRequest("getBlockHeight",w),x=te(I,ye(z()));if("error"in x)throw new oe(x.error,"failed to get block height information");return x.result}finally{delete f[F]}})(),await f[F]}})();let r,s,i,o,a,l;n&&typeof n=="string"?this._commitment=n:n&&(this._commitment=n.commitment,this._confirmTransactionInitialTimeout=n.confirmTransactionInitialTimeout,r=n.wsEndpoint,s=n.httpHeaders,i=n.fetch,o=n.fetchMiddleware,a=n.disableRetryOnRateLimit,l=n.httpAgent),this._rpcEndpoint=O4(e),this._rpcWsEndpoint=r||L4(e),this._rpcClient=e6(e,s,i,o,a,l),this._rpcRequest=t6(this._rpcClient),this._rpcBatchRequest=n6(this._rpcClient),this._rpcWebSocket=new M4(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,n){const{commitment:r,config:s}=_e(n),i=this._buildArgs([e.toBase58()],r,void 0,s),o=await this._rpcRequest("getBalance",i),a=te(o,Qe(z()));if("error"in a)throw new oe(a.error,`failed to get balance for ${e.toBase58()}`);return a.result}async getBalance(e,n){return await this.getBalanceAndContext(e,n).then(r=>r.value).catch(r=>{throw new Error("failed to get balance of account "+e.toBase58()+": "+r)})}async getBlockTime(e){const n=await this._rpcRequest("getBlockTime",[e]),r=te(n,ye(re(z())));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",[]),n=te(e,ye(z()));if("error"in n)throw new oe(n.error,"failed to get minimum ledger slot");return n.result}async getFirstAvailableBlock(){const e=await this._rpcRequest("getFirstAvailableBlock",[]),n=te(e,l6);if("error"in n)throw new oe(n.error,"failed to get first available block");return n.result}async getSupply(e){let n={};typeof e=="string"?n={commitment:e}:e?n={...e,commitment:e&&e.commitment||this.commitment}:n={commitment:this.commitment};const r=await this._rpcRequest("getSupply",[n]),s=te(r,d6);if("error"in s)throw new oe(s.error,"failed to get supply");return s.result}async getTokenSupply(e,n){const r=this._buildArgs([e.toBase58()],n),s=await this._rpcRequest("getTokenSupply",r),i=te(s,Qe(kc));if("error"in i)throw new oe(i.error,"failed to get token supply");return i.result}async getTokenAccountBalance(e,n){const r=this._buildArgs([e.toBase58()],n),s=await this._rpcRequest("getTokenAccountBalance",r),i=te(s,Qe(kc));if("error"in i)throw new oe(i.error,"failed to get token account balance");return i.result}async getTokenAccountsByOwner(e,n,r){const{commitment:s,config:i}=_e(r);let o=[e.toBase58()];"mint"in n?o.push({mint:n.mint.toBase58()}):o.push({programId:n.programId.toBase58()});const a=this._buildArgs(o,s,"base64",i),l=await this._rpcRequest("getTokenAccountsByOwner",a),f=te(l,f6);if("error"in f)throw new oe(f.error,`failed to get token accounts owned by account ${e.toBase58()}`);return f.result}async getParsedTokenAccountsByOwner(e,n,r){let s=[e.toBase58()];"mint"in n?s.push({mint:n.mint.toBase58()}):s.push({programId:n.programId.toBase58()});const i=this._buildArgs(s,r,"jsonParsed"),o=await this._rpcRequest("getTokenAccountsByOwner",i),a=te(o,h6);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 n={...e,commitment:e&&e.commitment||this.commitment},r=n.filter||n.commitment?[n]:[],s=await this._rpcRequest("getLargestAccounts",r),i=te(s,m6);if("error"in i)throw new oe(i.error,"failed to get largest accounts");return i.result}async getTokenLargestAccounts(e,n){const r=this._buildArgs([e.toBase58()],n),s=await this._rpcRequest("getTokenLargestAccounts",r),i=te(s,u6);if("error"in i)throw new oe(i.error,"failed to get token largest accounts");return i.result}async getAccountInfoAndContext(e,n){const{commitment:r,config:s}=_e(n),i=this._buildArgs([e.toBase58()],r,"base64",s),o=await this._rpcRequest("getAccountInfo",i),a=te(o,Qe(re(Zs)));if("error"in a)throw new oe(a.error,`failed to get info about account ${e.toBase58()}`);return a.result}async getParsedAccountInfo(e,n){const{commitment:r,config:s}=_e(n),i=this._buildArgs([e.toBase58()],r,"jsonParsed",s),o=await this._rpcRequest("getAccountInfo",i),a=te(o,Qe(re(Tc)));if("error"in a)throw new oe(a.error,`failed to get info about account ${e.toBase58()}`);return a.result}async getAccountInfo(e,n){try{return(await this.getAccountInfoAndContext(e,n)).value}catch(r){throw new Error("failed to get info about account "+e.toBase58()+": "+r)}}async getMultipleParsedAccounts(e,n){const{commitment:r,config:s}=_e(n),i=e.map(f=>f.toBase58()),o=this._buildArgs([i],r,"jsonParsed",s),a=await this._rpcRequest("getMultipleAccounts",o),l=te(a,Qe(ne(re(Tc))));if("error"in l)throw new oe(l.error,`failed to get info for accounts ${i}`);return l.result}async getMultipleAccountsInfoAndContext(e,n){const{commitment:r,config:s}=_e(n),i=e.map(f=>f.toBase58()),o=this._buildArgs([i],r,"base64",s),a=await this._rpcRequest("getMultipleAccounts",o),l=te(a,Qe(ne(re(Zs))));if("error"in l)throw new oe(l.error,`failed to get info for accounts ${i}`);return l.result}async getMultipleAccountsInfo(e,n){return(await this.getMultipleAccountsInfoAndContext(e,n)).value}async getStakeActivation(e,n,r){const{commitment:s,config:i}=_e(n),o=this._buildArgs([e.toBase58()],s,void 0,{...i,epoch:r??(i==null?void 0:i.epoch)}),a=await this._rpcRequest("getStakeActivation",o),l=te(a,ye(g6));if("error"in l)throw new oe(l.error,`failed to get Stake Activation ${e.toBase58()}`);return l.result}async getProgramAccounts(e,n){const{commitment:r,config:s}=_e(n),{encoding:i,...o}=s||{},a=this._buildArgs([e.toBase58()],r,i||"base64",{...o,...o.filters?{filters:Cu(o.filters)}:null}),l=await this._rpcRequest("getProgramAccounts",a),f=ne(b6),m=o.withContext===!0?te(l,Qe(f)):te(l,ye(f));if("error"in m)throw new oe(m.error,`failed to get accounts owned by program ${e.toBase58()}`);return m.result}async getParsedProgramAccounts(e,n){const{commitment:r,config:s}=_e(n),i=this._buildArgs([e.toBase58()],r,"jsonParsed",s),o=await this._rpcRequest("getProgramAccounts",i),a=te(o,ye(ne(y6)));if("error"in a)throw new oe(a.error,`failed to get accounts owned by program ${e.toBase58()}`);return a.result}async confirmTransaction(e,n){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=Ct.decode(r)}catch{throw new Error("signature must be base58 encoded: "+r)}return Se(s.length===64,"signature has invalid length"),typeof e=="string"?await this.confirmTransactionUsingLegacyTimeoutStrategy({commitment:n||this.commitment,signature:r}):"lastValidBlockHeight"in e?await this.confirmTransactionUsingBlockHeightExceedanceStrategy({commitment:n||this.commitment,strategy:e}):await this.confirmTransactionUsingDurableNonceStrategy({commitment:n||this.commitment,strategy:e})}getCancellationPromise(e){return new Promise((n,r)=>{e!=null&&(e.aborted?r(e.reason):e.addEventListener("abort",()=>{r(e.reason)}))})}getTransactionConfirmationPromise({commitment:e,signature:n}){let r,s,i=!1;const o=new Promise((l,f)=>{try{r=this.onSignature(n,(p,C)=>{r=void 0;const w={context:C,value:p};l({__type:On.PROCESSED,response:w})},e);const m=new Promise(p=>{r==null?p():s=this._onSubscriptionStateChange(r,C=>{C==="subscribed"&&p()})});(async()=>{if(await m,i)return;const p=await this.getSignatureStatus(n);if(i||p==null)return;const{context:C,value:w}=p;if(w!=null)if(w!=null&&w.err)f(w.err);else{switch(e){case"confirmed":case"single":case"singleGossip":{if(w.confirmationStatus==="processed")return;break}case"finalized":case"max":case"root":{if(w.confirmationStatus==="processed"||w.confirmationStatus==="confirmed")return;break}case"processed":case"recent":}i=!0,l({__type:On.PROCESSED,response:{context:C,value:w}})}})()}catch(m){f(m)}});return{abortConfirmation:()=>{s&&(s(),s=void 0),r!=null&&(this.removeSignatureListener(r),r=void 0)},confirmationPromise:o}}async confirmTransactionUsingBlockHeightExceedanceStrategy({commitment:e,strategy:{abortSignal:n,lastValidBlockHeight:r,signature:s}}){let i=!1;const o=new Promise(p=>{const C=async()=>{try{return await this.getBlockHeight(e)}catch{return-1}};(async()=>{let w=await C();if(!i){for(;w<=r;)if(await hr(1e3),i||(w=await C(),i))return;p({__type:On.BLOCKHEIGHT_EXCEEDED})}})()}),{abortConfirmation:a,confirmationPromise:l}=this.getTransactionConfirmationPromise({commitment:e,signature:s}),f=this.getCancellationPromise(n);let m;try{const p=await Promise.race([f,l,o]);if(p.__type===On.PROCESSED)m=p.response;else throw new zo(s)}finally{i=!0,a()}return m}async confirmTransactionUsingDurableNonceStrategy({commitment:e,strategy:{abortSignal:n,minContextSlot:r,nonceAccountPubkey:s,nonceValue:i,signature:o}}){let a=!1;const l=new Promise(w=>{let F=i,I=null;const x=async()=>{try{const{context:E,value:_}=await this.getNonceAndContext(s,{commitment:e,minContextSlot:r});return I=E.slot,_==null?void 0:_.nonce}catch{return F}};(async()=>{if(F=await x(),!a)for(;;){if(i!==F){w({__type:On.NONCE_INVALID,slotInWhichNonceDidAdvance:I});return}if(await hr(2e3),a||(F=await x(),a))return}})()}),{abortConfirmation:f,confirmationPromise:m}=this.getTransactionConfirmationPromise({commitment:e,signature:o}),p=this.getCancellationPromise(n);let C;try{const w=await Promise.race([p,m,l]);if(w.__type===On.PROCESSED)C=w.response;else{let F;for(;;){const I=await this.getSignatureStatus(o);if(I==null)break;if(I.context.slot<(w.slotInWhichNonceDidAdvance??r)){await hr(400);continue}F=I;break}if(F!=null&&F.value){const I=e||"finalized",{confirmationStatus:x}=F.value;switch(I){case"processed":case"recent":if(x!=="processed"&&x!=="confirmed"&&x!=="finalized")throw new Gr(o);break;case"confirmed":case"single":case"singleGossip":if(x!=="confirmed"&&x!=="finalized")throw new Gr(o);break;case"finalized":case"max":case"root":if(x!=="finalized")throw new Gr(o);break;default:}C={context:F.context,value:{err:F.value.err}}}else throw new Gr(o)}}finally{a=!0,f()}return C}async confirmTransactionUsingLegacyTimeoutStrategy({commitment:e,signature:n}){let r;const s=new Promise(l=>{let f=this._confirmTransactionInitialTimeout||6e4;switch(e){case"processed":case"recent":case"single":case"confirmed":case"singleGossip":{f=this._confirmTransactionInitialTimeout||3e4;break}}r=setTimeout(()=>l({__type:On.TIMED_OUT,timeoutMs:f}),f)}),{abortConfirmation:i,confirmationPromise:o}=this.getTransactionConfirmationPromise({commitment:e,signature:n});let a;try{const l=await Promise.race([o,s]);if(l.__type===On.PROCESSED)a=l.response;else throw new Nl(n,l.timeoutMs/1e3)}finally{clearTimeout(r),i()}return a}async getClusterNodes(){const e=await this._rpcRequest("getClusterNodes",[]),n=te(e,ye(ne(T6)));if("error"in n)throw new oe(n.error,"failed to get cluster nodes");return n.result}async getVoteAccounts(e){const n=this._buildArgs([],e),r=await this._rpcRequest("getVoteAccounts",n),s=te(r,I6);if("error"in s)throw new oe(s.error,"failed to get vote accounts");return s.result}async getSlot(e){const{commitment:n,config:r}=_e(e),s=this._buildArgs([],n,void 0,r),i=await this._rpcRequest("getSlot",s),o=te(i,ye(z()));if("error"in o)throw new oe(o.error,"failed to get slot");return o.result}async getSlotLeader(e){const{commitment:n,config:r}=_e(e),s=this._buildArgs([],n,void 0,r),i=await this._rpcRequest("getSlotLeader",s),o=te(i,ye(Q()));if("error"in o)throw new oe(o.error,"failed to get slot leader");return o.result}async getSlotLeaders(e,n){const r=[e,n],s=await this._rpcRequest("getSlotLeaders",r),i=te(s,ye(ne(Ke)));if("error"in i)throw new oe(i.error,"failed to get slot leaders");return i.result}async getSignatureStatus(e,n){const{context:r,value:s}=await this.getSignatureStatuses([e],n);Se(s.length===1);const i=s[0];return{context:r,value:i}}async getSignatureStatuses(e,n){const r=[e];n&&r.push(n);const s=await this._rpcRequest("getSignatureStatuses",r),i=te(s,M6);if("error"in i)throw new oe(i.error,"failed to get signature status");return i.result}async getTransactionCount(e){const{commitment:n,config:r}=_e(e),s=this._buildArgs([],n,void 0,r),i=await this._rpcRequest("getTransactionCount",s),o=te(i,ye(z()));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 n=this._buildArgs([],e),r=await this._rpcRequest("getInflationGovernor",n),s=te(r,r6);if("error"in s)throw new oe(s.error,"failed to get inflation");return s.result}async getInflationReward(e,n,r){const{commitment:s,config:i}=_e(r),o=this._buildArgs([e.map(f=>f.toBase58())],s,void 0,{...i,epoch:n??(i==null?void 0:i.epoch)}),a=await this._rpcRequest("getInflationReward",o),l=te(a,H4);if("error"in l)throw new oe(l.error,"failed to get inflation reward");return l.result}async getInflationRate(){const e=await this._rpcRequest("getInflationRate",[]),n=te(e,s6);if("error"in n)throw new oe(n.error,"failed to get inflation rate");return n.result}async getEpochInfo(e){const{commitment:n,config:r}=_e(e),s=this._buildArgs([],n,void 0,r),i=await this._rpcRequest("getEpochInfo",s),o=te(i,o6);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",[]),n=te(e,a6);if("error"in n)throw new oe(n.error,"failed to get epoch schedule");const r=n.result;return new lm(r.slotsPerEpoch,r.leaderScheduleSlotOffset,r.warmup,r.firstNormalEpoch,r.firstNormalSlot)}async getLeaderSchedule(){const e=await this._rpcRequest("getLeaderSchedule",[]),n=te(e,c6);if("error"in n)throw new oe(n.error,"failed to get leader schedule");return n.result}async getMinimumBalanceForRentExemption(e,n){const r=this._buildArgs([e],n),s=await this._rpcRequest("getMinimumBalanceForRentExemption",r),i=te(s,R6);return"error"in i?(console.warn("Unable to fetch minimum balance for rent exemption"),0):i.result}async getRecentBlockhashAndContext(e){const{context:n,value:{blockhash:r}}=await this.getLatestBlockhashAndContext(e);return{context:n,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 n=await this._rpcRequest("getRecentPerformanceSamples",e?[e]:[]),r=te(n,G6);if("error"in r)throw new oe(r.error,"failed to get recent performance samples");return r.result}async getFeeCalculatorForBlockhash(e,n){const r=this._buildArgs([e],n),s=await this._rpcRequest("getFeeCalculatorForBlockhash",r),i=te(s,Y6);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,n){const r=ge(e.serialize()).toString("base64"),s=this._buildArgs([r],n),i=await this._rpcRequest("getFeeForMessage",s),o=te(i,Qe(re(z())));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 n=(o=e==null?void 0:e.lockedWritableAccounts)==null?void 0:o.map(a=>a.toBase58()),r=n!=null&&n.length?[n]:[],s=await this._rpcRequest("getRecentPrioritizationFees",r),i=te(s,i6);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(n){throw new Error("failed to get recent blockhash: "+n)}}async getLatestBlockhash(e){try{return(await this.getLatestBlockhashAndContext(e)).value}catch(n){throw new Error("failed to get recent blockhash: "+n)}}async getLatestBlockhashAndContext(e){const{commitment:n,config:r}=_e(e),s=this._buildArgs([],n,void 0,r),i=await this._rpcRequest("getLatestBlockhash",s),o=te(i,$6);if("error"in o)throw new oe(o.error,"failed to get latest blockhash");return o.result}async isBlockhashValid(e,n){const{commitment:r,config:s}=_e(n),i=this._buildArgs([e],r,void 0,s),o=await this._rpcRequest("isBlockhashValid",i),a=te(o,j6);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",[]),n=te(e,ye(X4));if("error"in n)throw new oe(n.error,"failed to get version");return n.result}async getGenesisHash(){const e=await this._rpcRequest("getGenesisHash",[]),n=te(e,ye(Q()));if("error"in n)throw new oe(n.error,"failed to get genesis hash");return n.result}async getBlock(e,n){const{commitment:r,config:s}=_e(n),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=te(o,N6);if("error"in a)throw a.error;return a.result}case"none":{const a=te(o,O6);if("error"in a)throw a.error;return a.result}default:{const a=te(o,L6);if("error"in a)throw a.error;const{result:l}=a;return l?{...l,transactions:l.transactions.map(({transaction:f,meta:m,version:p})=>({meta:m,transaction:{...f,message:za(p,f.message)},version:p}))}:null}}}catch(a){throw new oe(a,"failed to get confirmed block")}}async getParsedBlock(e,n){const{commitment:r,config:s}=_e(n),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=te(o,H6);if("error"in a)throw a.error;return a.result}case"none":{const a=te(o,q6);if("error"in a)throw a.error;return a.result}default:{const a=te(o,z6);if("error"in a)throw a.error;return a.result}}}catch(a){throw new oe(a,"failed to get block")}}async getBlockProduction(e){let n,r;if(typeof e=="string")r=e;else if(e){const{commitment:a,...l}=e;r=a,n=l}const s=this._buildArgs([],r,"base64",n),i=await this._rpcRequest("getBlockProduction",s),o=te(i,Q4);if("error"in o)throw new oe(o.error,"failed to get block production information");return o.result}async getTransaction(e,n){const{commitment:r,config:s}=_e(n),i=this._buildArgsAtLeastConfirmed([e],r,void 0,s),o=await this._rpcRequest("getTransaction",i),a=te(o,Ha);if("error"in a)throw new oe(a.error,"failed to get transaction");const l=a.result;return l&&{...l,transaction:{...l.transaction,message:za(l.version,l.transaction.message)}}}async getParsedTransaction(e,n){const{commitment:r,config:s}=_e(n),i=this._buildArgsAtLeastConfirmed([e],r,"jsonParsed",s),o=await this._rpcRequest("getTransaction",i),a=te(o,Ci);if("error"in a)throw new oe(a.error,"failed to get transaction");return a.result}async getParsedTransactions(e,n){const{commitment:r,config:s}=_e(n),i=e.map(l=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([l],r,"jsonParsed",s)}));return(await this._rpcBatchRequest(i)).map(l=>{const f=te(l,Ci);if("error"in f)throw new oe(f.error,"failed to get transactions");return f.result})}async getTransactions(e,n){const{commitment:r,config:s}=_e(n),i=e.map(l=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([l],r,void 0,s)}));return(await this._rpcBatchRequest(i)).map(l=>{const f=te(l,Ha);if("error"in f)throw new oe(f.error,"failed to get transactions");const m=f.result;return m&&{...m,transaction:{...m.transaction,message:za(m.version,m.transaction.message)}}})}async getConfirmedBlock(e,n){const r=this._buildArgsAtLeastConfirmed([e],n),s=await this._rpcRequest("getBlock",r),i=te(s,K6);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:l,meta:f})=>{const m=new cn(l.message);return{meta:f,transaction:{...l,message:m}}})};return{...a,transactions:a.transactions.map(({transaction:l,meta:f})=>({meta:f,transaction:Ce.populate(l.message,l.signatures)}))}}async getBlocks(e,n,r){const s=this._buildArgsAtLeastConfirmed(n!==void 0?[e,n]:[e],r),i=await this._rpcRequest("getBlocks",s),o=te(i,ye(ne(z())));if("error"in o)throw new oe(o.error,"failed to get blocks");return o.result}async getBlockSignatures(e,n){const r=this._buildArgsAtLeastConfirmed([e],n,void 0,{transactionDetails:"signatures",rewards:!1}),s=await this._rpcRequest("getBlock",r),i=te(s,vu);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,n){const r=this._buildArgsAtLeastConfirmed([e],n,void 0,{transactionDetails:"signatures",rewards:!1}),s=await this._rpcRequest("getBlock",r),i=te(s,vu);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,n){const r=this._buildArgsAtLeastConfirmed([e],n),s=await this._rpcRequest("getTransaction",r),i=te(s,Ha);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),l=o.transaction.signatures;return{...o,transaction:Ce.populate(a,l)}}async getParsedConfirmedTransaction(e,n){const r=this._buildArgsAtLeastConfirmed([e],n,"jsonParsed"),s=await this._rpcRequest("getTransaction",r),i=te(s,Ci);if("error"in i)throw new oe(i.error,"failed to get confirmed transaction");return i.result}async getParsedConfirmedTransactions(e,n){const r=e.map(o=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([o],n,"jsonParsed")}));return(await this._rpcBatchRequest(r)).map(o=>{const a=te(o,Ci);if("error"in a)throw new oe(a.error,"failed to get confirmed transactions");return a.result})}async getConfirmedSignaturesForAddress(e,n,r){let s={},i=await this.getFirstAvailableBlock();for(;!("until"in s)&&(n--,!(n<=0||n<i));)try{const l=await this.getConfirmedBlockSignatures(n,"finalized");l.signatures.length>0&&(s.until=l.signatures[l.signatures.length-1].toString())}catch(l){if(l instanceof Error&&l.message.includes("skipped"))continue;throw l}let o=await this.getSlot("finalized");for(;!("before"in s)&&(r++,!(r>o));)try{const l=await this.getConfirmedBlockSignatures(r);l.signatures.length>0&&(s.before=l.signatures[l.signatures.length-1].toString())}catch(l){if(l instanceof Error&&l.message.includes("skipped"))continue;throw l}return(await this.getConfirmedSignaturesForAddress2(e,s)).map(l=>l.signature)}async getConfirmedSignaturesForAddress2(e,n,r){const s=this._buildArgsAtLeastConfirmed([e.toBase58()],r,void 0,n),i=await this._rpcRequest("getConfirmedSignaturesForAddress2",s),o=te(i,w6);if("error"in o)throw new oe(o.error,"failed to get confirmed signatures for address");return o.result}async getSignaturesForAddress(e,n,r){const s=this._buildArgsAtLeastConfirmed([e.toBase58()],r,void 0,n),i=await this._rpcRequest("getSignaturesForAddress",s),o=te(i,E6);if("error"in o)throw new oe(o.error,"failed to get signatures for address");return o.result}async getAddressLookupTable(e,n){const{context:r,value:s}=await this.getAccountInfoAndContext(e,n);let i=null;return s!==null&&(i=new co({key:e,state:co.deserialize(s.data)})),{context:r,value:i}}async getNonceAndContext(e,n){const{context:r,value:s}=await this.getAccountInfoAndContext(e,n);let i=null;return s!==null&&(i=$o.fromAccountData(s.data)),{context:r,value:i}}async getNonce(e,n){return await this.getNonceAndContext(e,n).then(r=>r.value).catch(r=>{throw new Error("failed to get nonce for account "+e.toBase58()+": "+r)})}async requestAirdrop(e,n){const r=await this._rpcRequest("requestAirdrop",[e.toBase58(),n]),s=te(r,X6);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 hr(100);const r=Date.now()-this._blockhashInfo.lastFetch>=um;if(this._blockhashInfo.latestBlockhash!==null&&!r)return this._blockhashInfo.latestBlockhash}return await this._pollNewBlockhash()}async _pollNewBlockhash(){this._pollingBlockhash=!0;try{const e=Date.now(),n=this._blockhashInfo.latestBlockhash,r=n?n.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 hr(im/2)}throw new Error(`Unable to obtain a new blockhash after ${Date.now()-e}ms`)}finally{this._pollingBlockhash=!1}}async getStakeMinimumDelegation(e){const{commitment:n,config:r}=_e(e),s=this._buildArgs([],n,"base64",r),i=await this._rpcRequest("getStakeMinimumDelegation",s),o=te(i,Qe(z()));if("error"in o)throw new oe(o.error,"failed to get stake minimum delegation");return o.result}async simulateTransaction(e,n,r){if("message"in e){const I=e.serialize(),x=ae.Buffer.from(I).toString("base64");if(Array.isArray(n)||r!==void 0)throw new Error("Invalid arguments");const E=n||{};E.encoding="base64","commitment"in E||(E.commitment=this.commitment),n&&typeof n=="object"&&"innerInstructions"in n&&(E.innerInstructions=n.innerInstructions);const _=[x,E],k=await this._rpcRequest("simulateTransaction",_),P=te(k,Su);if("error"in P)throw new Error("failed to simulate transaction: "+P.error.message);return P.result}let s;if(e instanceof Ce){let F=e;s=new Ce,s.feePayer=F.feePayer,s.instructions=e.instructions,s.nonceInfo=F.nonceInfo,s.signatures=F.signatures}else s=Ce.populate(e),s._message=s._json=void 0;if(n!==void 0&&!Array.isArray(n))throw new Error("Invalid arguments");const i=n;if(s.nonceInfo&&i)s.sign(...i);else{let F=this._disableBlockhashCaching;for(;;){const I=await this._blockhashWithExpiryBlockHeight(F);if(s.lastValidBlockHeight=I.lastValidBlockHeight,s.recentBlockhash=I.blockhash,!i)break;if(s.sign(...i),!s.signature)throw new Error("!signature");const x=s.signature.toString("base64");if(!this._blockhashInfo.simulatedSignatures.includes(x)&&!this._blockhashInfo.transactionSignatures.includes(x)){this._blockhashInfo.simulatedSignatures.push(x);break}else F=!0}}const o=s._compile(),a=o.serialize(),f=s._serialize(a).toString("base64"),m={encoding:"base64",commitment:this.commitment};if(r){const F=(Array.isArray(r)?r:o.nonProgramIds()).map(I=>I.toBase58());m.accounts={encoding:"base64",addresses:F}}i&&(m.sigVerify=!0),n&&typeof n=="object"&&"innerInstructions"in n&&(m.innerInstructions=n.innerInstructions);const p=[f,m],C=await this._rpcRequest("simulateTransaction",p),w=te(C,Su);if("error"in w){let F;if("data"in w.error&&(F=w.error.data.logs,F&&Array.isArray(F))){const I=`
15
- `,x=I+F.join(I);console.error(w.error.message,x)}throw new os({action:"simulate",signature:"",transactionMessage:w.error.message,logs:F})}return w.result}async sendTransaction(e,n,r){if("version"in e){if(n&&Array.isArray(n))throw new Error("Invalid arguments");const o=e.serialize();return await this.sendRawTransaction(o,n)}if(n===void 0||!Array.isArray(n))throw new Error("Invalid arguments");const s=n;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 l=e.signature.toString("base64");if(this._blockhashInfo.transactionSignatures.includes(l))o=!0;else{this._blockhashInfo.transactionSignatures.push(l);break}}}const i=e.serialize();return await this.sendRawTransaction(i,r)}async sendRawTransaction(e,n){const r=ge(e).toString("base64");return await this.sendEncodedTransaction(r,n)}async sendEncodedTransaction(e,n){const r={encoding:"base64"},s=n&&n.skipPreflight,i=s===!0?"processed":n&&n.preflightCommitment||this.commitment;n&&n.maxRetries!=null&&(r.maxRetries=n.maxRetries),n&&n.minContextSlot!=null&&(r.minContextSlot=n.minContextSlot),s&&(r.skipPreflight=s),i&&(r.preflightCommitment=i);const o=[e,r],a=await this._rpcRequest("sendTransaction",o),l=te(a,Z6);if("error"in l){let f;throw"data"in l.error&&(f=l.error.data.logs),new os({action:s?"send":"simulate",signature:"",transactionMessage:l.error.message,logs:f})}return l.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(([n,r])=>{this._setSubscription(n,{...r,state:"pending"})})}_setSubscription(e,n){var s;const r=(s=this._subscriptionsByHash[e])==null?void 0:s.state;if(this._subscriptionsByHash[e]=n,r!==n.state){const i=this._subscriptionStateChangeCallbacksByHash[e];i&&i.forEach(o=>{try{o(n.state)}catch{}})}}_onSubscriptionStateChange(e,n){var i;const r=this._subscriptionHashByClientSubscriptionId[e];if(r==null)return()=>{};const s=(i=this._subscriptionStateChangeCallbacksByHash)[r]||(i[r]=new Set);return s.add(n),()=>{s.delete(n),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,n=()=>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}),!n())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),!n())return;this._setSubscription(r,{...s,state:"subscribed"}),await this._updateSubscriptions();return}}this._setSubscription(r,{...s,state:"unsubscribed"}),await this._updateSubscriptions()})();break}}))}_handleServerNotification(e,n){const r=this._subscriptionCallbacksByServerSubscriptionId[e];r!==void 0&&r.forEach(s=>{try{s(...n)}catch(i){console.error(i)}})}_wsOnAccountNotification(e){const{result:n,subscription:r}=te(e,A6);this._handleServerNotification(r,[n.value,n.context])}_makeSubscription(e,n){const r=this._nextClientSubscriptionId++,s=Bu([e.method,n]),i=this._subscriptionsByHash[s];return i===void 0?this._subscriptionsByHash[s]={...e,args:n,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];Se(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,n,r){const{commitment:s,config:i}=_e(r),o=this._buildArgs([e.toBase58()],s||this._commitment||"finalized","base64",i);return this._makeSubscription({callback:n,method:"accountSubscribe",unsubscribeMethod:"accountUnsubscribe"},o)}async removeAccountChangeListener(e){await this._unsubscribeClientSubscription(e,"account change")}_wsOnProgramAccountNotification(e){const{result:n,subscription:r}=te(e,x6);this._handleServerNotification(r,[{accountId:n.value.pubkey,accountInfo:n.value.account},n.context])}onProgramAccountChange(e,n,r,s){const{commitment:i,config:o}=_e(r),a=this._buildArgs([e.toBase58()],i||this._commitment||"finalized","base64",o||(s?{filters:Cu(s)}:void 0));return this._makeSubscription({callback:n,method:"programSubscribe",unsubscribeMethod:"programUnsubscribe"},a)}async removeProgramAccountChangeListener(e){await this._unsubscribeClientSubscription(e,"program account change")}onLogs(e,n,r){const s=this._buildArgs([typeof e=="object"?{mentions:[e.toString()]}:e],r||this._commitment||"finalized");return this._makeSubscription({callback:n,method:"logsSubscribe",unsubscribeMethod:"logsUnsubscribe"},s)}async removeOnLogsListener(e){await this._unsubscribeClientSubscription(e,"logs")}_wsOnLogsNotification(e){const{result:n,subscription:r}=te(e,Q6);this._handleServerNotification(r,[n.value,n.context])}_wsOnSlotNotification(e){const{result:n,subscription:r}=te(e,S6);this._handleServerNotification(r,[n])}onSlotChange(e){return this._makeSubscription({callback:e,method:"slotSubscribe",unsubscribeMethod:"slotUnsubscribe"},[])}async removeSlotChangeListener(e){await this._unsubscribeClientSubscription(e,"slot change")}_wsOnSlotUpdatesNotification(e){const{result:n,subscription:r}=te(e,v6);this._handleServerNotification(r,[n])}onSlotUpdate(e){return this._makeSubscription({callback:e,method:"slotsUpdatesSubscribe",unsubscribeMethod:"slotsUpdatesUnsubscribe"},[])}async removeSlotUpdateListener(e){await this._unsubscribeClientSubscription(e,"slot update")}async _unsubscribeClientSubscription(e,n){const r=this._subscriptionDisposeFunctionsByClientSubscriptionId[e];r?await r():console.warn(`Ignored unsubscribe request because an active subscription with id \`${e}\` for '${n}' events could not be found.`)}_buildArgs(e,n,r,s){const i=n||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,n,r,s){const i=n||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,n,r,s)}_wsOnSignatureNotification(e){const{result:n,subscription:r}=te(e,k6);n.value!=="receivedSignature"&&this._subscriptionsAutoDisposedByRpc.add(r),this._handleServerNotification(r,n.value==="receivedSignature"?[{type:"received"},n.context]:[{type:"status",result:n.value},n.context])}onSignature(e,n,r){const s=this._buildArgs([e],r||this._commitment||"finalized"),i=this._makeSubscription({callback:(o,a)=>{if(o.type==="status"){n(o.result,a);try{this.removeSignatureListener(i)}catch{}}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},s);return i}onSignatureWithOptions(e,n,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:(l,f)=>{n(l,f);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:n,subscription:r}=te(e,F6);this._handleServerNotification(r,[n])}onRootChange(e){return this._makeSubscription({callback:e,method:"rootSubscribe",unsubscribeMethod:"rootUnsubscribe"},[])}async removeRootChangeListener(e){await this._unsubscribeClientSubscription(e,"root change")}}class Cr{constructor(e){this._keypair=void 0,this._keypair=e??gu()}static generate(){return new Cr(gu())}static fromSecretKey(e,n){if(e.byteLength!==64)throw new Error("bad secret key size");const r=e.slice(32,64);if(!n||!n.skipValidation){const s=e.slice(0,32),i=ao(s);for(let o=0;o<32;o++)if(r[o]!==i[o])throw new Error("provided secretKey is invalid")}return new Cr({publicKey:r,secretKey:e})}static fromSeed(e){const n=ao(e),r=new Uint8Array(64);return r.set(e),r.set(n,32),new Cr({publicKey:n,secretKey:r})}get publicKey(){return new J(this._keypair.publicKey)}get secretKey(){return new Uint8Array(this._keypair.secretKey)}}const qn=Object.freeze({CreateLookupTable:{index:0,layout:exports.struct([exports.u32("instruction"),as("recentSlot"),exports.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:exports.struct([exports.u32("instruction")])},ExtendLookupTable:{index:2,layout:exports.struct([exports.u32("instruction"),as(),exports.seq(we(),sr(exports.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:exports.struct([exports.u32("instruction")])},CloseLookupTable:{index:4,layout:exports.struct([exports.u32("instruction")])}});class tw{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(qn))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:n}=ke(qn.CreateLookupTable,e.data);return{authority:e.keys[1].pubkey,payer:e.keys[2].pubkey,recentSlot:Number(n)}}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:n}=ke(qn.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:n.map(r=>new J(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(Go.programId))throw new Error("invalid instruction; programId is not AddressLookupTable Program")}static checkKeysLength(e,n){if(e.length<n)throw new Error(`invalid instruction; found ${e.length} keys, expected at least ${n}`)}}class Go{constructor(){}static createLookupTable(e){const[n,r]=J.findProgramAddressSync([e.authority.toBuffer(),_l(BigInt(e.recentSlot),8)],this.programId),s=qn.CreateLookupTable,i=Ee(s,{recentSlot:BigInt(e.recentSlot),bumpSeed:r}),o=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1},{pubkey:e.payer,isSigner:!0,isWritable:!0},{pubkey:Et.programId,isSigner:!1,isWritable:!1}];return[new Ie({programId:this.programId,keys:o,data:i}),n]}static freezeLookupTable(e){const n=qn.FreezeLookupTable,r=Ee(n),s=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return new Ie({programId:this.programId,keys:s,data:r})}static extendLookupTable(e){const n=qn.ExtendLookupTable,r=Ee(n,{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:Et.programId,isSigner:!1,isWritable:!1}),new Ie({programId:this.programId,keys:s,data:r})}static deactivateLookupTable(e){const n=qn.DeactivateLookupTable,r=Ee(n),s=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return new Ie({programId:this.programId,keys:s,data:r})}static closeLookupTable(e){const n=qn.CloseLookupTable,r=Ee(n),s=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1},{pubkey:e.recipient,isSigner:!1,isWritable:!0}];return new Ie({programId:this.programId,keys:s,data:r})}}Go.programId=new J("AddressLookupTab1e1111111111111111111111111");class nw{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(Dn))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:n,additionalFee:r}=ke(Dn.RequestUnits,e.data);return{units:n,additionalFee:r}}static decodeRequestHeapFrame(e){this.checkProgramId(e.programId);const{bytes:n}=ke(Dn.RequestHeapFrame,e.data);return{bytes:n}}static decodeSetComputeUnitLimit(e){this.checkProgramId(e.programId);const{units:n}=ke(Dn.SetComputeUnitLimit,e.data);return{units:n}}static decodeSetComputeUnitPrice(e){this.checkProgramId(e.programId);const{microLamports:n}=ke(Dn.SetComputeUnitPrice,e.data);return{microLamports:n}}static checkProgramId(e){if(!e.equals(Yo.programId))throw new Error("invalid instruction; programId is not ComputeBudgetProgram")}}const Dn=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"),as("microLamports")])}});class Yo{constructor(){}static requestUnits(e){const n=Dn.RequestUnits,r=Ee(n,e);return new Ie({keys:[],programId:this.programId,data:r})}static requestHeapFrame(e){const n=Dn.RequestHeapFrame,r=Ee(n,e);return new Ie({keys:[],programId:this.programId,data:r})}static setComputeUnitLimit(e){const n=Dn.SetComputeUnitLimit,r=Ee(n,e);return new Ie({keys:[],programId:this.programId,data:r})}static setComputeUnitPrice(e){const n=Dn.SetComputeUnitPrice,r=Ee(n,{microLamports:BigInt(e.microLamports)});return new Ie({keys:[],programId:this.programId,data:r})}}Yo.programId=new J("ComputeBudget111111111111111111111111111111");const ku=64,Fu=32,Tu=64,Iu=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 Xo{constructor(){}static createInstructionWithPublicKey(e){const{publicKey:n,message:r,signature:s,instructionIndex:i}=e;Se(n.length===Fu,`Public Key must be ${Fu} bytes but received ${n.length} bytes`),Se(s.length===Tu,`Signature must be ${Tu} bytes but received ${s.length} bytes`);const o=Iu.span,a=o+n.length,l=a+s.length,f=1,m=ae.Buffer.alloc(l+r.length),p=i??65535;return Iu.encode({numSignatures:f,padding:0,signatureOffset:a,signatureInstructionIndex:p,publicKeyOffset:o,publicKeyInstructionIndex:p,messageDataOffset:l,messageDataSize:r.length,messageInstructionIndex:p},m),m.fill(n,o),m.fill(s,a),m.fill(r,l),new Ie({keys:[],programId:Xo.programId,data:m})}static createInstructionWithPrivateKey(e){const{privateKey:n,message:r,instructionIndex:s}=e;Se(n.length===ku,`Private key must be ${ku} bytes but received ${n.length} bytes`);try{const i=Cr.fromSecretKey(n),o=i.publicKey.toBytes(),a=Ll(r,i.secretKey);return this.createInstructionWithPublicKey({publicKey:o,message:r,signature:a,instructionIndex:s})}catch(i){throw new Error(`Error creating instruction; ${i}`)}}}Xo.programId=new J("Ed25519SigVerify111111111111111111111111111");const rw=(t,e)=>{const n=Qn.sign(t,e);return[n.toCompactRawBytes(),n.recovery]};Qn.utils.isValidPrivateKey;const sw=Qn.getPublicKey,Uu=32,qa=20,_u=64,iw=11,Ka=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 Sr{constructor(){}static publicKeyToEthAddress(e){Se(e.length===_u,`Public key must be ${_u} bytes but received ${e.length} bytes`);try{return ae.Buffer.from(Ns(ge(e))).slice(-qa)}catch(n){throw new Error(`Error constructing Ethereum address: ${n}`)}}static createInstructionWithPublicKey(e){const{publicKey:n,message:r,signature:s,recoveryId:i,instructionIndex:o}=e;return Sr.createInstructionWithEthAddress({ethAddress:Sr.publicKeyToEthAddress(n),message:r,signature:s,recoveryId:i,instructionIndex:o})}static createInstructionWithEthAddress(e){const{ethAddress:n,message:r,signature:s,recoveryId:i,instructionIndex:o=0}=e;let a;typeof n=="string"?n.startsWith("0x")?a=ae.Buffer.from(n.substr(2),"hex"):a=ae.Buffer.from(n,"hex"):a=n,Se(a.length===qa,`Address must be ${qa} bytes but received ${a.length} bytes`);const l=1+iw,f=l,m=l+a.length,p=m+s.length+1,C=1,w=ae.Buffer.alloc(Ka.span+r.length);return Ka.encode({numSignatures:C,signatureOffset:m,signatureInstructionIndex:o,ethAddressOffset:f,ethAddressInstructionIndex:o,messageDataOffset:p,messageDataSize:r.length,messageInstructionIndex:o,signature:ge(s),ethAddress:ge(a),recoveryId:i},w),w.fill(ge(r),Ka.span),new Ie({keys:[],programId:Sr.programId,data:w})}static createInstructionWithPrivateKey(e){const{privateKey:n,message:r,instructionIndex:s}=e;Se(n.length===Uu,`Private key must be ${Uu} bytes but received ${n.length} bytes`);try{const i=ge(n),o=sw(i,!1).slice(1),a=ae.Buffer.from(Ns(ge(r))),[l,f]=rw(a,i);return this.createInstructionWithPublicKey({publicKey:o,message:r,signature:l,recoveryId:f,instructionIndex:s})}catch(i){throw new Error(`Error creating instruction; ${i}`)}}}Sr.programId=new J("KeccakSecp256k11111111111111111111111111111");var Bm;const xm=new J("StakeConfig11111111111111111111111111111111");class Cm{constructor(e,n){this.staker=void 0,this.withdrawer=void 0,this.staker=e,this.withdrawer=n}}class hi{constructor(e,n,r){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=e,this.epoch=n,this.custodian=r}}Bm=hi;hi.default=new Bm(0,0,J.default);class ow{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(xt))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:n,lockup:r}=ke(xt.Initialize,e.data);return{stakePubkey:e.keys[0].pubkey,authorized:new Cm(new J(n.staker),new J(n.withdrawer)),lockup:new hi(r.unixTimestamp,r.epoch,new J(r.custodian))}}static decodeDelegate(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,6),ke(xt.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:n,stakeAuthorizationType:r}=ke(xt.Authorize,e.data),s={stakePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey,newAuthorizedPubkey:new J(n),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:n,stakeAuthorizationType:r,authoritySeed:s,authorityOwner:i}=ke(xt.AuthorizeWithSeed,e.data),o={stakePubkey:e.keys[0].pubkey,authorityBase:e.keys[1].pubkey,authoritySeed:s,authorityOwner:new J(i),newAuthorizedPubkey:new J(n),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:n}=ke(xt.Split,e.data);return{stakePubkey:e.keys[0].pubkey,splitStakePubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[2].pubkey,lamports:n}}static decodeMerge(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),ke(xt.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:n}=ke(xt.Withdraw,e.data),r={stakePubkey:e.keys[0].pubkey,toPubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey,lamports:n};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),ke(xt.Deactivate,e.data),{stakePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey}}static checkProgramId(e){if(!e.equals(Zo.programId))throw new Error("invalid instruction; programId is not StakeProgram")}static checkKeyLength(e,n){if(e.length<n)throw new Error(`invalid instruction; found ${e.length} keys, expected at least ${n}`)}}const xt=Object.freeze({Initialize:{index:0,layout:exports.struct([exports.u32("instruction"),d4(),u4()])},Authorize:{index:1,layout:exports.struct([exports.u32("instruction"),we("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"),we("newAuthorized"),exports.u32("stakeAuthorizationType"),Er("authoritySeed"),we("authorityOwner")])}}),aw=Object.freeze({Staker:{index:0},Withdrawer:{index:1}});class Zo{constructor(){}static initialize(e){const{stakePubkey:n,authorized:r,lockup:s}=e,i=s||hi.default,o=xt.Initialize,a=Ee(o,{authorized:{staker:ge(r.staker.toBuffer()),withdrawer:ge(r.withdrawer.toBuffer())},lockup:{unixTimestamp:i.unixTimestamp,epoch:i.epoch,custodian:ge(i.custodian.toBuffer())}}),l={keys:[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:Ir,isSigner:!1,isWritable:!1}],programId:this.programId,data:a};return new Ie(l)}static createAccountWithSeed(e){const n=new Ce;n.add(Et.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 n.add(this.initialize({stakePubkey:r,authorized:s,lockup:i}))}static createAccount(e){const n=new Ce;n.add(Et.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 n.add(this.initialize({stakePubkey:r,authorized:s,lockup:i}))}static delegate(e){const{stakePubkey:n,authorizedPubkey:r,votePubkey:s}=e,i=xt.Delegate,o=Ee(i);return new Ce().add({keys:[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!1},{pubkey:un,isSigner:!1,isWritable:!1},{pubkey:zi,isSigner:!1,isWritable:!1},{pubkey:xm,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:o})}static authorize(e){const{stakePubkey:n,authorizedPubkey:r,newAuthorizedPubkey:s,stakeAuthorizationType:i,custodianPubkey:o}=e,a=xt.Authorize,l=Ee(a,{newAuthorized:ge(s.toBuffer()),stakeAuthorizationType:i.index}),f=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:un,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}];return o&&f.push({pubkey:o,isSigner:!0,isWritable:!1}),new Ce().add({keys:f,programId:this.programId,data:l})}static authorizeWithSeed(e){const{stakePubkey:n,authorityBase:r,authoritySeed:s,authorityOwner:i,newAuthorizedPubkey:o,stakeAuthorizationType:a,custodianPubkey:l}=e,f=xt.AuthorizeWithSeed,m=Ee(f,{newAuthorized:ge(o.toBuffer()),stakeAuthorizationType:a.index,authoritySeed:s,authorityOwner:ge(i.toBuffer())}),p=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1},{pubkey:un,isSigner:!1,isWritable:!1}];return l&&p.push({pubkey:l,isSigner:!0,isWritable:!1}),new Ce().add({keys:p,programId:this.programId,data:m})}static splitInstruction(e){const{stakePubkey:n,authorizedPubkey:r,splitStakePubkey:s,lamports:i}=e,o=xt.Split,a=Ee(o,{lamports:i});return new Ie({keys:[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:a})}static split(e,n){const r=new Ce;return r.add(Et.createAccount({fromPubkey:e.authorizedPubkey,newAccountPubkey:e.splitStakePubkey,lamports:n,space:this.space,programId:this.programId})),r.add(this.splitInstruction(e))}static splitWithSeed(e,n){const{stakePubkey:r,authorizedPubkey:s,splitStakePubkey:i,basePubkey:o,seed:a,lamports:l}=e,f=new Ce;return f.add(Et.allocate({accountPubkey:i,basePubkey:o,seed:a,space:this.space,programId:this.programId})),n&&n>0&&f.add(Et.transfer({fromPubkey:e.authorizedPubkey,toPubkey:i,lamports:n})),f.add(this.splitInstruction({stakePubkey:r,authorizedPubkey:s,splitStakePubkey:i,lamports:l}))}static merge(e){const{stakePubkey:n,sourceStakePubKey:r,authorizedPubkey:s}=e,i=xt.Merge,o=Ee(i);return new Ce().add({keys:[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:un,isSigner:!1,isWritable:!1},{pubkey:zi,isSigner:!1,isWritable:!1},{pubkey:s,isSigner:!0,isWritable:!1}],programId:this.programId,data:o})}static withdraw(e){const{stakePubkey:n,authorizedPubkey:r,toPubkey:s,lamports:i,custodianPubkey:o}=e,a=xt.Withdraw,l=Ee(a,{lamports:i}),f=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:un,isSigner:!1,isWritable:!1},{pubkey:zi,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return o&&f.push({pubkey:o,isSigner:!0,isWritable:!1}),new Ce().add({keys:f,programId:this.programId,data:l})}static deactivate(e){const{stakePubkey:n,authorizedPubkey:r}=e,s=xt.Deactivate,i=Ee(s);return new Ce().add({keys:[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:un,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:i})}}Zo.programId=new J("Stake11111111111111111111111111111111111111");Zo.space=200;class Sm{constructor(e,n,r,s){this.nodePubkey=void 0,this.authorizedVoter=void 0,this.authorizedWithdrawer=void 0,this.commission=void 0,this.nodePubkey=e,this.authorizedVoter=n,this.authorizedWithdrawer=r,this.commission=s}}class cw{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(vn))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:n}=ke(vn.InitializeAccount,e.data);return{votePubkey:e.keys[0].pubkey,nodePubkey:e.keys[3].pubkey,voteInit:new Sm(new J(n.nodePubkey),new J(n.authorizedVoter),new J(n.authorizedWithdrawer),n.commission)}}static decodeAuthorize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{newAuthorized:n,voteAuthorizationType:r}=ke(vn.Authorize,e.data);return{votePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey,newAuthorizedPubkey:new J(n),voteAuthorizationType:{index:r}}}static decodeAuthorizeWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{voteAuthorizeWithSeedArgs:{currentAuthorityDerivedKeyOwnerPubkey:n,currentAuthorityDerivedKeySeed:r,newAuthorized:s,voteAuthorizationType:i}}=ke(vn.AuthorizeWithSeed,e.data);return{currentAuthorityDerivedKeyBasePubkey:e.keys[2].pubkey,currentAuthorityDerivedKeyOwnerPubkey:new J(n),currentAuthorityDerivedKeySeed:r,newAuthorizedPubkey:new J(s),voteAuthorizationType:{index:i},votePubkey:e.keys[0].pubkey}}static decodeWithdraw(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{lamports:n}=ke(vn.Withdraw,e.data);return{votePubkey:e.keys[0].pubkey,authorizedWithdrawerPubkey:e.keys[2].pubkey,lamports:n,toPubkey:e.keys[1].pubkey}}static checkProgramId(e){if(!e.equals(Bs.programId))throw new Error("invalid instruction; programId is not VoteProgram")}static checkKeyLength(e,n){if(e.length<n)throw new Error(`invalid instruction; found ${e.length} keys, expected at least ${n}`)}}const vn=Object.freeze({InitializeAccount:{index:0,layout:exports.struct([exports.u32("instruction"),f4()])},Authorize:{index:1,layout:exports.struct([exports.u32("instruction"),we("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"),h4()])}}),lw=Object.freeze({Voter:{index:0},Withdrawer:{index:1}});class Bs{constructor(){}static initializeAccount(e){const{votePubkey:n,nodePubkey:r,voteInit:s}=e,i=vn.InitializeAccount,o=Ee(i,{voteInit:{nodePubkey:ge(s.nodePubkey.toBuffer()),authorizedVoter:ge(s.authorizedVoter.toBuffer()),authorizedWithdrawer:ge(s.authorizedWithdrawer.toBuffer()),commission:s.commission}}),a={keys:[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:Ir,isSigner:!1,isWritable:!1},{pubkey:un,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:o};return new Ie(a)}static createAccount(e){const n=new Ce;return n.add(Et.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.votePubkey,lamports:e.lamports,space:this.space,programId:this.programId})),n.add(this.initializeAccount({votePubkey:e.votePubkey,nodePubkey:e.voteInit.nodePubkey,voteInit:e.voteInit}))}static authorize(e){const{votePubkey:n,authorizedPubkey:r,newAuthorizedPubkey:s,voteAuthorizationType:i}=e,o=vn.Authorize,a=Ee(o,{newAuthorized:ge(s.toBuffer()),voteAuthorizationType:i.index}),l=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:un,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return new Ce().add({keys:l,programId:this.programId,data:a})}static authorizeWithSeed(e){const{currentAuthorityDerivedKeyBasePubkey:n,currentAuthorityDerivedKeyOwnerPubkey:r,currentAuthorityDerivedKeySeed:s,newAuthorizedPubkey:i,voteAuthorizationType:o,votePubkey:a}=e,l=vn.AuthorizeWithSeed,f=Ee(l,{voteAuthorizeWithSeedArgs:{currentAuthorityDerivedKeyOwnerPubkey:ge(r.toBuffer()),currentAuthorityDerivedKeySeed:s,newAuthorized:ge(i.toBuffer()),voteAuthorizationType:o.index}}),m=[{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:un,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}];return new Ce().add({keys:m,programId:this.programId,data:f})}static withdraw(e){const{votePubkey:n,authorizedWithdrawerPubkey:r,lamports:s,toPubkey:i}=e,o=vn.Withdraw,a=Ee(o,{lamports:s}),l=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}];return new Ce().add({keys:l,programId:this.programId,data:a})}static safeWithdraw(e,n,r){if(e.lamports>n-r)throw new Error("Withdraw will leave vote account with insufficient funds.");return Bs.withdraw(e)}static updateValidatorIdentity(e){const{votePubkey:n,authorizedWithdrawerPubkey:r,nodePubkey:s}=e,i=vn.UpdateValidatorIdentity,o=Ee(i),a=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!0,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return new Ce().add({keys:a,programId:this.programId,data:o})}}Bs.programId=new J("Vote111111111111111111111111111111111111111");Bs.space=3762;const Dm=new J("Va1idator1nfo111111111111111111111111111111"),dw=X({name:Q(),website:ce(Q()),details:ce(Q()),iconUrl:ce(Q()),keybaseUsername:ce(Q())});class $l{constructor(e,n){this.key=void 0,this.info=void 0,this.key=e,this.info=n}static fromConfigData(e){let n=[...e];if(qt(n)!==2)return null;const s=[];for(let i=0;i<2;i++){const o=new J(Kt(n,0,Tn)),a=Sn(n)===1;s.push({publicKey:o,isSigner:a})}if(s[0].publicKey.equals(Dm)&&s[1].isSigner){const i=Er().decode(ae.Buffer.from(n)),o=JSON.parse(i);return $h(o,dw),new $l(s[1].publicKey,o)}return null}}const uw=new J("Vote111111111111111111111111111111111111111"),fw=exports.struct([we("nodePubkey"),we("authorizedWithdrawer"),exports.u8("commission"),vt(),exports.seq(exports.struct([vt("slot"),exports.u32("confirmationCount")]),sr(exports.u32(),-8),"votes"),exports.u8("rootSlotValid"),vt("rootSlot"),vt(),exports.seq(exports.struct([vt("epoch"),we("authorizedVoter")]),sr(exports.u32(),-8),"authorizedVoters"),exports.struct([exports.seq(exports.struct([we("authorizedPubkey"),vt("epochOfLastAuthorizedSwitch"),vt("targetEpoch")]),32,"buf"),vt("idx"),exports.u8("isEmpty")],"priorVoters"),vt(),exports.seq(exports.struct([vt("epoch"),vt("credits"),vt("prevCredits")]),sr(exports.u32(),-8),"epochCredits"),exports.struct([vt("slot"),vt("timestamp")],"lastTimestamp")]);class jl{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=fw.decode(ge(e),4);let s=r.rootSlot;return r.rootSlotValid||(s=null),new jl({nodePubkey:new J(r.nodePubkey),authorizedWithdrawer:new J(r.authorizedWithdrawer),commission:r.commission,votes:r.votes,rootSlot:s,authorizedVoters:r.authorizedVoters.map(hw),priorVoters:mw(r.priorVoters),epochCredits:r.epochCredits,lastTimestamp:r.lastTimestamp})}}function hw({authorizedVoter:t,epoch:e}){return{epoch:e,authorizedVoter:new J(t)}}function Mu({authorizedPubkey:t,epochOfLastAuthorizedSwitch:e,targetEpoch:n}){return{authorizedPubkey:new J(t),epochOfLastAuthorizedSwitch:e,targetEpoch:n}}function mw({buf:t,idx:e,isEmpty:n}){return n?[]:[...t.slice(e+1).map(Mu),...t.slice(0,e).map(Mu)]}const Ru={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 vm(t,e){const n=e===!1?"http":"https";if(!t)return Ru[n].devnet;const r=Ru[n][t];if(!r)throw new Error(`Unknown ${n} cluster: ${t}`);return r}async function bw(t,e,n,r){let s,i;n&&Object.prototype.hasOwnProperty.call(n,"lastValidBlockHeight")||n&&Object.prototype.hasOwnProperty.call(n,"nonceValue")?(s=n,i=r):i=n;const o=i&&{skipPreflight:i.skipPreflight,preflightCommitment:i.preflightCommitment||i.commitment,minContextSlot:i.minContextSlot},a=await t.sendRawTransaction(e,o),l=i&&i.commitment,m=(await(s?t.confirmTransaction(s,l):t.confirmTransaction(a,l))).value;if(m.err)throw a!=null?new os({action:o!=null&&o.skipPreflight?"send":"simulate",signature:a,transactionMessage:`Status: (${JSON.stringify(m)})`}):new Error(`Raw transaction ${a} failed (${JSON.stringify(m)})`);return a}const km=1e9,pw=Object.freeze(Object.defineProperty({__proto__:null,Account:a4,AddressLookupTableAccount:co,AddressLookupTableInstruction:tw,AddressLookupTableProgram:Go,Authorized:Cm,BLOCKHASH_CACHE_TIMEOUT_MS:um,BPF_LOADER_DEPRECATED_PROGRAM_ID:c4,BPF_LOADER_PROGRAM_ID:v4,BpfLoader:k4,COMPUTE_BUDGET_INSTRUCTION_LAYOUTS:Dn,ComputeBudgetInstruction:nw,ComputeBudgetProgram:Yo,Connection:Am,Ed25519Program:Xo,Enum:i4,EpochSchedule:lm,FeeCalculatorLayout:am,Keypair:Cr,LAMPORTS_PER_SOL:km,LOOKUP_TABLE_INSTRUCTION_LAYOUTS:qn,Loader:Ur,Lockup:hi,MAX_SEED_LENGTH:nm,Message:cn,MessageAccountKeys:Xs,MessageV0:ar,NONCE_ACCOUNT_LENGTH:vc,NonceAccount:$o,PACKET_DATA_SIZE:ir,PUBLIC_KEY_LENGTH:Tn,PublicKey:J,SIGNATURE_LENGTH_IN_BYTES:Ys,SOLANA_SCHEMA:Ws,STAKE_CONFIG_ID:xm,STAKE_INSTRUCTION_LAYOUTS:xt,SYSTEM_INSTRUCTION_LAYOUTS:Me,SYSVAR_CLOCK_PUBKEY:un,SYSVAR_EPOCH_SCHEDULE_PUBKEY:g4,SYSVAR_INSTRUCTIONS_PUBKEY:om,SYSVAR_RECENT_BLOCKHASHES_PUBKEY:Ni,SYSVAR_RENT_PUBKEY:Ir,SYSVAR_REWARDS_PUBKEY:w4,SYSVAR_SLOT_HASHES_PUBKEY:E4,SYSVAR_SLOT_HISTORY_PUBKEY:A4,SYSVAR_STAKE_HISTORY_PUBKEY:zi,Secp256k1Program:Sr,SendTransactionError:os,SolanaJSONRPCError:oe,SolanaJSONRPCErrorCode:B4,StakeAuthorizationLayout:aw,StakeInstruction:ow,StakeProgram:Zo,Struct:Ol,SystemInstruction:S4,SystemProgram:Et,Transaction:Ce,TransactionExpiredBlockheightExceededError:zo,TransactionExpiredNonceInvalidError:Gr,TransactionExpiredTimeoutError:Nl,TransactionInstruction:Ie,TransactionMessage:qo,TransactionStatus:On,VALIDATOR_INFO_KEY:Dm,VERSION_PREFIX_MASK:No,VOTE_PROGRAM_ID:uw,ValidatorInfo:$l,VersionedMessage:zl,VersionedTransaction:Ko,VoteAccount:jl,VoteAuthorizationLayout:lw,VoteInit:Sm,VoteInstruction:cw,VoteProgram:Bs,clusterApiUrl:vm,sendAndConfirmRawTransaction:bw,sendAndConfirmTransaction:Dc},Symbol.toStringTag,{value:"Module"})),Vl="Solana",yw="11111111111111111111111111111111",mr=class mr{constructor(e){ie(this,"type","Native");ie(this,"address");mr.instanceof(e)?this.address=e.address:St.instanceof(e)?this.address=new J(e.toUint8Array()):typeof e=="string"&&At.valid(e)?this.address=new J(At.decode(e)):this.address=new J(e)}unwrap(){return this.address}toString(){return this.address.toBase58()}toUint8Array(){return new Uint8Array(this.address.toBytes())}toNative(){return this}toUniversalAddress(){return new St(this.toUint8Array())}static instanceof(e){return e.constructor.platform===mr.platform}equals(e){return mr.instanceof(e)?e.unwrap().equals(this.unwrap()):this.toUniversalAddress().equals(e)}};ie(mr,"byteSize",32),ie(mr,"platform",Vl);let uo=mr;tl(Vl,uo);exports.AddressLookupTableAccount=co;exports.AddressLookupTableProgram=Go;exports.AutomaticRoute=V0;exports.BN=Ac;exports.CircleTransfer=Bt;exports.ComputeBudgetProgram=Yo;exports.Connection=Am;exports.DEFAULT_TASK_TIMEOUT=Cn;exports.ErrNotWrapped=fy;exports.EventEmitter=Pl;exports.EvmAddress=eo;exports.EvmZeroAddress=V8;exports.Field=_r;exports.FinalizableRoute=W2;exports.FpInvertBatch=Zc;exports.FpLegendre=ic;exports.FpPow=qf;exports.Hash=rh;exports.Hash$1=Ao;exports.HashMD=$c;exports.Keypair=Cr;exports.LAMPORTS_PER_SOL=km;exports.ManualRoute=wc;exports.Message=cn;exports.MessageV0=ar;exports.MinAmountError=y2;exports.PlatformContext=qp;exports.PlatformNativeSigner=Jp;exports.PublicKey=J;exports.RelayFailedError=hl;exports.Route=_o;exports.RouteResolver=j0;exports.RpcClient=Qh;exports.SYSVAR_CLOCK_PUBKEY=un;exports.SYSVAR_INSTRUCTIONS_PUBKEY=om;exports.SYSVAR_RENT_PUBKEY=Ir;exports.Secp256k1Program=Sr;exports.SendTransactionError=os;exports.SolanaAddress=uo;exports.SolanaZeroAddress=yw;exports.SystemProgram=Et;exports.TokenTransfer=Ye;exports.Transaction=Ce;exports.TransactionExpiredBlockheightExceededError=zo;exports.TransactionInstruction=Ie;exports.TransactionMessage=qo;exports.UnavailableError=g2;exports.UniversalAddress=St;exports.VersionedTransaction=Ko;exports.Wormhole=sn;exports._platform=xl;exports._platform$1=Vl;exports._validateObject=ms;exports.abytes=Vt;exports.add=wn;exports.add3H=Df;exports.add3L=Sf;exports.addChainId=j8;exports.addFixedValues=t1;exports.addFrom=$8;exports.aexists=kr;exports.ahash=gf;exports.amountItem=qe;exports.anumber=ts;exports.aoutput=Hc;exports.applyChainsConfigConfigOverrides=d2;exports.assert=Un;exports.assertArgument=tr;exports.assertArgumentCount=z2;exports.assertNormalize=q2;exports.assertPrivate=K2;exports.asyncLoop=r8;exports.axios=Be;exports.b58=ef;exports.b64=go;exports.bech32=Ju;exports.bignum=Us;exports.bitGet=Nb;exports.bitLen=Lf;exports.bitMask=si;exports.bnExports=yl;exports.bound=jm;exports.browserExports=zu;exports.bs58=Ct;exports.bufferPolyfill=ae;exports.bytes=Lt;exports.bytes$1=wl;exports.bytesToHex=Fr;exports.bytesToNumberBE=ri;exports.canonicalAddress=In;exports.chainIdToChain=Vi;exports.chainItem=zt;exports.chainToChainId=ei;exports.chainToPlatform=hn;exports.checkOpts=a8;exports.checkOpts$1=ab;exports.circleChainId=uf;exports.circleContractChains=Z1;exports.circleContracts=rc;exports.circleDomainItem=rs;exports.circleNonceItem=Co;exports.clean=$n;exports.clusterApiUrl=vm;exports.commonjsGlobal=an;exports.concat=V2;exports.concatBytes=i8;exports.concatBytes$1=kn;exports.constMap=fe;exports.createBase58check=y1;exports.createHasher=ni;exports.createOptHasher=cb;exports.createView=Q2;exports.createView$1=Ri;exports.customizableBytes=mo;exports.dataLength=G2;exports.dataSlice=Y2;exports.dateConversion=i0;exports.decomposeLiteral=a0;exports.defineProperties=Bc;exports.deliveryInstructionLayout=g0;exports.denoise=a1;exports.deserialize=Zr;exports.deserialize$1=pn;exports.display=bo;exports.dist=Ne;exports.ed25519=Mr;exports.ensureBytes=Ze;exports.envelopeLayout=il;exports.estimateFinalityTime=Lc;exports.executorTokenBridge=nc;exports.exists=xc;exports.expiration=Ls;exports.filters=fs;exports.fixedChainItem=Rp;exports.fixedLengthStringItem=rl;exports.fromBaseUnits=zn;exports.fromBig=xf;exports.getAddress=xr;exports.getAugmentedNamespace=Ic;exports.getBytes=Wr;exports.getBytesCopy=$2;exports.getDefaultExportFromCjs=Js;exports.getMinHashLength=Jc;exports.getTokenByAddress=Vp;exports.getTokenDetails=_2;exports.guardianAttestationEta=zc;exports.guardianSetItem=nl;exports.hash=J2;exports.headerLayout=sl;exports.hex=At;exports.hexToBytes=Eo;exports.hexlify=ci;exports.hmac=Gc;exports.index_browser_esm=pw;exports.isAddressable=yh;exports.isAttested=Jr;exports.isAutomatic=M2;exports.isBytes=wo;exports.isBytesLike=j2;exports.isCallException=N2;exports.isChain=ti;exports.isCompleted=A2;exports.isDestinationQueued=E2;exports.isEqualCaseInsensitive=rf;exports.isError=X0;exports.isFailed=K0;exports.isFinalizable=P2;exports.isHash=Hb;exports.isHexString=gl;exports.isManual=R2;exports.isNative=Pt;exports.isRedeemed=bl;exports.isRefunded=w2;exports.isSameToken=l0;exports.isSignAndSendSigner=cl;exports.isSignOnlySigner=f0;exports.isSourceFinalized=js;exports.isSourceInitiated=ml;exports.isTokenId=vo;exports.isVersionedProtocolInitializer=Tp;exports.isWormholeMessageId=Ar;exports.kdfInputToBytes=ob;exports.keccak256=ys;exports.keccak_256=Ns;exports.makeError=Z0;exports.mapHashToField=$f;exports.median=Hm;exports.memoized=Hs;exports.mod=Je;exports.nativeDecimals=af;exports.nativeTokenId=al;exports.networkChainToNativeChainId=df;exports.networkPlatformConfigs=q0;exports.normalizeZ=Qc;exports.notImplemented=qb;exports.number=Vs;exports.output=eh;exports.parse=Ti;exports.payloadIdItem=Vn;exports.payloadLiteralToPayloadItemLayout=c0;exports.platformNativeChainIdToNetworkChain=_1;exports.porticoContractChains=J1;exports.protocolIsRegistered=Up;exports.randomBytes=c8;exports.randomBytes$1=Kc;exports.registerNative=tl;exports.registerPayloadTypes=gt;exports.registerProtocol=Ip;exports.relayInstructionsLayout=E0;exports.resolveAddress=H8;exports.resolveProperties=O2;exports.resolveWrappedToken=d0;exports.retry=Rr;exports.rotl=nb;exports.rotr=e8;exports.rotr32H=fb;exports.rotr32L=hb;exports.rotrBH=Fs;exports.rotrBL=Ts;exports.rotrSH=cr;exports.rotrSL=lr;exports.rpcAddress=cf;exports.safeBufferExports=G0;exports.scale=Kr;exports.secp256k1=Qn;exports.sequenceItem=So;exports.serialize=bn;exports.serialize$1=Wi;exports.serializePayload=zp;exports.sha256=Gi;exports.sha256$1=jc;exports.sha3_256=Pb;exports.sha512=Lb;exports.sha512$1=Vc;exports.signSendWait=$s;exports.signatureItem=Zi;exports.signedQuoteLayout=A0;exports.stringConversion=o0;exports.supportsIndexerUtils=Hp;exports.swap32IfBE=sc;exports.swap8IfBE=rb;exports.tbtc=Mi;exports.toBigIntLE_1=Kh;exports.toBufferLE_1=_l;exports.toBytes=El;exports.toBytes$1=hs;exports.toChain=us;exports.toChainId=fn;exports.toCircleChain=_i;exports.toNative=or;exports.toUniversal=n0;exports.tokenBridgeChains=Y1;exports.tokenBridgeRelayerChains=X1;exports.truncate=Ii;exports.u32$1=nh;exports.u32$2=wf;exports.u64=S8;exports.units=kt;exports.universalAddress=Xp;exports.universalAddressItem=me;exports.unusedArbiterFee=K8;exports.unusedNonce=q8;exports.usdcContract=_s;exports.utf8ToBytes=qc;exports.version=Y0;exports.weierstrass=t0;exports.weierstrassPoints=sp;exports.whole=Is;exports.wrapConstructor=sh;exports.zeroPadBytes=Z2;exports.zeroPadValue=X2;
14
+ `+i+o;break;default:a=`Unknown action '${(l=>l)(e)}'`}super(a),this.signature=void 0,this.transactionMessage=void 0,this.transactionLogs=void 0,this.signature=n,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((n,r)=>{e.getTransaction(this.signature).then(s=>{if(s&&s.meta&&s.meta.logMessages){const i=s.meta.logMessages;this.transactionLogs=i,n(i)}else r(new Error("Log messages not found"))}).catch(r)})),await this.transactionLogs}}const x4={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:n,data:r},s){super(s!=null?`${s}: ${n}`:n),this.code=void 0,this.data=void 0,this.code=e,this.data=r,this.name="SolanaJSONRPCError"}}async function Dc(t,e,n,r){const s=r&&{skipPreflight:r.skipPreflight,preflightCommitment:r.preflightCommitment||r.commitment,maxRetries:r.maxRetries,minContextSlot:r.minContextSlot},i=await t.sendTransaction(e,n,s);let o;if(e.recentBlockhash!=null&&e.lastValidBlockHeight!=null)o=(await t.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,l=a.keys[0].pubkey;o=(await t.confirmTransaction({abortSignal:r==null?void 0:r.abortSignal,minContextSlot:e.minNonceContextSlot,nonceAccountPubkey:l,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 t.confirmTransaction(i,r&&r.commitment)).value;if(o.err)throw i!=null?new os({action:"send",signature:i,transactionMessage:`Status: (${JSON.stringify(o)})`}):new Error(`Transaction ${i} failed (${JSON.stringify(o)})`);return i}function hr(t){return new Promise(e=>setTimeout(e,t))}function Ee(t,e){const n=t.layout.span>=0?t.layout.span:rm(t,e),r=ae.Buffer.alloc(n),s=Object.assign({instruction:t.index},e);return t.layout.encode(s,r),r}function ke(t,e){let n;try{n=t.layout.decode(e)}catch(r){throw new Error("invalid instruction; "+r)}if(n.instruction!==t.index)throw new Error(`invalid instruction; instruction index mismatch ${n.instruction} != ${t.index}`);return n}const am=vt("lamportsPerSignature"),cm=exports.struct([exports.u32("version"),exports.u32("state"),we("authorizedPubkey"),we("nonce"),exports.struct([am],"feeCalculator")]),vc=cm.span;class jo{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 n=cm.decode(ge(e),0);return new jo({authorizedPubkey:new J(n.authorizedPubkey),nonce:new J(n.nonce).toString(),feeCalculator:n.feeCalculator})}}const C4=t=>{const e=t.decode.bind(t),n=t.encode.bind(t);return{decode:e,encode:n}},S4=t=>e=>{const n=exports.blob(t,e),{encode:r,decode:s}=C4(n),i=n;return i.decode=(o,a)=>{const l=s(o,a);return Kh(ae.Buffer.from(l))},i.encode=(o,a,l)=>{const f=_l(o,t);return r(f,a,l)},i},as=S4(8);class D4{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(Me))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:n,space:r,programId:s}=ke(Me.Create,e.data);return{fromPubkey:e.keys[0].pubkey,newAccountPubkey:e.keys[1].pubkey,lamports:n,space:r,programId:new J(s)}}static decodeTransfer(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{lamports:n}=ke(Me.Transfer,e.data);return{fromPubkey:e.keys[0].pubkey,toPubkey:e.keys[1].pubkey,lamports:n}}static decodeTransferWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{lamports:n,seed:r,programId:s}=ke(Me.TransferWithSeed,e.data);return{fromPubkey:e.keys[0].pubkey,basePubkey:e.keys[1].pubkey,toPubkey:e.keys[2].pubkey,lamports:n,seed:r,programId:new J(s)}}static decodeAllocate(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{space:n}=ke(Me.Allocate,e.data);return{accountPubkey:e.keys[0].pubkey,space:n}}static decodeAllocateWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{base:n,seed:r,space:s,programId:i}=ke(Me.AllocateWithSeed,e.data);return{accountPubkey:e.keys[0].pubkey,basePubkey:new J(n),seed:r,space:s,programId:new J(i)}}static decodeAssign(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{programId:n}=ke(Me.Assign,e.data);return{accountPubkey:e.keys[0].pubkey,programId:new J(n)}}static decodeAssignWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{base:n,seed:r,programId:s}=ke(Me.AssignWithSeed,e.data);return{accountPubkey:e.keys[0].pubkey,basePubkey:new J(n),seed:r,programId:new J(s)}}static decodeCreateWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{base:n,seed:r,lamports:s,space:i,programId:o}=ke(Me.CreateWithSeed,e.data);return{fromPubkey:e.keys[0].pubkey,newAccountPubkey:e.keys[1].pubkey,basePubkey:new J(n),seed:r,lamports:s,space:i,programId:new J(o)}}static decodeNonceInitialize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{authorized:n}=ke(Me.InitializeNonceAccount,e.data);return{noncePubkey:e.keys[0].pubkey,authorizedPubkey:new J(n)}}static decodeNonceAdvance(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),ke(Me.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:n}=ke(Me.WithdrawNonceAccount,e.data);return{noncePubkey:e.keys[0].pubkey,toPubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey,lamports:n}}static decodeNonceAuthorize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{authorized:n}=ke(Me.AuthorizeNonceAccount,e.data);return{noncePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[1].pubkey,newAuthorizedPubkey:new J(n)}}static checkProgramId(e){if(!e.equals(Et.programId))throw new Error("invalid instruction; programId is not SystemProgram")}static checkKeyLength(e,n){if(e.length<n)throw new Error(`invalid instruction; found ${e.length} keys, expected at least ${n}`)}}const Me=Object.freeze({Create:{index:0,layout:exports.struct([exports.u32("instruction"),exports.ns64("lamports"),exports.ns64("space"),we("programId")])},Assign:{index:1,layout:exports.struct([exports.u32("instruction"),we("programId")])},Transfer:{index:2,layout:exports.struct([exports.u32("instruction"),as("lamports")])},CreateWithSeed:{index:3,layout:exports.struct([exports.u32("instruction"),we("base"),Er("seed"),exports.ns64("lamports"),exports.ns64("space"),we("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"),we("authorized")])},AuthorizeNonceAccount:{index:7,layout:exports.struct([exports.u32("instruction"),we("authorized")])},Allocate:{index:8,layout:exports.struct([exports.u32("instruction"),exports.ns64("space")])},AllocateWithSeed:{index:9,layout:exports.struct([exports.u32("instruction"),we("base"),Er("seed"),exports.ns64("space"),we("programId")])},AssignWithSeed:{index:10,layout:exports.struct([exports.u32("instruction"),we("base"),Er("seed"),we("programId")])},TransferWithSeed:{index:11,layout:exports.struct([exports.u32("instruction"),as("lamports"),Er("seed"),we("programId")])},UpgradeNonceAccount:{index:12,layout:exports.struct([exports.u32("instruction")])}});class Et{constructor(){}static createAccount(e){const n=Me.Create,r=Ee(n,{lamports:e.lamports,space:e.space,programId:ge(e.programId.toBuffer())});return new Ie({keys:[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.newAccountPubkey,isSigner:!0,isWritable:!0}],programId:this.programId,data:r})}static transfer(e){let n,r;if("basePubkey"in e){const s=Me.TransferWithSeed;n=Ee(s,{lamports:BigInt(e.lamports),seed:e.seed,programId:ge(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=Me.Transfer;n=Ee(s,{lamports:BigInt(e.lamports)}),r=[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0}]}return new Ie({keys:r,programId:this.programId,data:n})}static assign(e){let n,r;if("basePubkey"in e){const s=Me.AssignWithSeed;n=Ee(s,{base:ge(e.basePubkey.toBuffer()),seed:e.seed,programId:ge(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]}else{const s=Me.Assign;n=Ee(s,{programId:ge(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]}return new Ie({keys:r,programId:this.programId,data:n})}static createAccountWithSeed(e){const n=Me.CreateWithSeed,r=Ee(n,{base:ge(e.basePubkey.toBuffer()),seed:e.seed,lamports:e.lamports,space:e.space,programId:ge(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 Ie({keys:s,programId:this.programId,data:r})}static createNonceAccount(e){const n=new Ce;"basePubkey"in e&&"seed"in e?n.add(Et.createAccountWithSeed({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,basePubkey:e.basePubkey,seed:e.seed,lamports:e.lamports,space:vc,programId:this.programId})):n.add(Et.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,lamports:e.lamports,space:vc,programId:this.programId}));const r={noncePubkey:e.noncePubkey,authorizedPubkey:e.authorizedPubkey};return n.add(this.nonceInitialize(r)),n}static nonceInitialize(e){const n=Me.InitializeNonceAccount,r=Ee(n,{authorized:ge(e.authorizedPubkey.toBuffer())}),s={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:Ni,isSigner:!1,isWritable:!1},{pubkey:Ir,isSigner:!1,isWritable:!1}],programId:this.programId,data:r};return new Ie(s)}static nonceAdvance(e){const n=Me.AdvanceNonceAccount,r=Ee(n),s={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:Ni,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:r};return new Ie(s)}static nonceWithdraw(e){const n=Me.WithdrawNonceAccount,r=Ee(n,{lamports:e.lamports});return new Ie({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0},{pubkey:Ni,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 n=Me.AuthorizeNonceAccount,r=Ee(n,{authorized:ge(e.newAuthorizedPubkey.toBuffer())});return new Ie({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:r})}static allocate(e){let n,r;if("basePubkey"in e){const s=Me.AllocateWithSeed;n=Ee(s,{base:ge(e.basePubkey.toBuffer()),seed:e.seed,space:e.space,programId:ge(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]}else{const s=Me.Allocate;n=Ee(s,{space:e.space}),r=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]}return new Ie({keys:r,programId:this.programId,data:n})}}Et.programId=new J("11111111111111111111111111111111");const v4=ir-300;class Ur{constructor(){}static getMinNumSignatures(e){return 2*(Math.ceil(e/Ur.chunkSize)+1+1)}static async load(e,n,r,s,i){{const p=await e.getMinimumBalanceForRentExemption(i.length),C=await e.getAccountInfo(r.publicKey,"confirmed");let w=null;if(C!==null){if(C.executable)return console.error("Program load failed, account is already executable"),!1;C.data.length!==i.length&&(w=w||new Ce,w.add(Et.allocate({accountPubkey:r.publicKey,space:i.length}))),C.owner.equals(s)||(w=w||new Ce,w.add(Et.assign({accountPubkey:r.publicKey,programId:s}))),C.lamports<p&&(w=w||new Ce,w.add(Et.transfer({fromPubkey:n.publicKey,toPubkey:r.publicKey,lamports:p-C.lamports})))}else w=new Ce().add(Et.createAccount({fromPubkey:n.publicKey,newAccountPubkey:r.publicKey,lamports:p>0?p:1,space:i.length,programId:s}));w!==null&&await Dc(e,w,[n,r],{commitment:"confirmed"})}const o=exports.struct([exports.u32("instruction"),exports.u32("offset"),exports.u32("bytesLength"),exports.u32("bytesLengthPadding"),exports.seq(exports.u8("byte"),sr(exports.u32(),-8),"bytes")]),a=Ur.chunkSize;let l=0,f=i,m=[];for(;f.length>0;){const p=f.slice(0,a),C=ae.Buffer.alloc(a+16);o.encode({instruction:0,offset:l,bytes:p,bytesLength:0,bytesLengthPadding:0},C);const w=new Ce().add({keys:[{pubkey:r.publicKey,isSigner:!0,isWritable:!0}],programId:s,data:C});m.push(Dc(e,w,[n,r],{commitment:"confirmed"})),e._rpcEndpoint.includes("solana.com")&&await hr(1e3/4),l+=a,f=f.slice(a)}await Promise.all(m);{const p=exports.struct([exports.u32("instruction")]),C=ae.Buffer.alloc(p.span);p.encode({instruction:1},C);const w=new Ce().add({keys:[{pubkey:r.publicKey,isSigner:!0,isWritable:!0},{pubkey:Ir,isSigner:!1,isWritable:!1}],programId:s,data:C}),F="processed",I=await e.sendTransaction(w,[n,r],{preflightCommitment:F}),{context:x,value:E}=await e.confirmTransaction({signature:I,lastValidBlockHeight:w.lastValidBlockHeight,blockhash:w.recentBlockhash},F);if(E.err)throw new Error(`Transaction ${I} failed (${JSON.stringify(E)})`);for(;;){try{if(await e.getSlot({commitment:F})>x.slot)break}catch{}await new Promise(_=>setTimeout(_,Math.round(im/2)))}}return!0}}Ur.chunkSize=v4;const k4=new J("BPFLoader2111111111111111111111111111111111");class F4{static getMinNumSignatures(e){return Ur.getMinNumSignatures(e)}static load(e,n,r,s,i){return Ur.load(e,n,r,i,s)}}function T4(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Na,Au;function I4(){if(Au)return Na;Au=1;var t=Object.prototype.toString,e=Object.keys||function(r){var s=[];for(var i in r)s.push(i);return s};function n(r,s){var i,o,a,l,f,m,p;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 n(r.toJSON(),s);if(p=t.call(r),p==="[object Array]"){for(a="[",o=r.length-1,i=0;i<o;i++)a+=n(r[i],!0)+",";return o>-1&&(a+=n(r[i],!0)),a+"]"}else if(p==="[object Object]"){for(l=e(r).sort(),o=l.length,a="",i=0;i<o;)f=l[i],m=n(r[f],!1),m!==void 0&&(a&&(a+=","),a+=JSON.stringify(f)+":"+m),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 Na=function(r){var s=n(r,!1);if(s!==void 0)return""+s},Na}var U4=I4(),Bu=T4(U4);const vs=32;function za(t){let e=0;for(;t>1;)t/=2,e++;return e}function _4(t){return t===0?1:(t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t|=t>>32,t+1)}class lm{constructor(e,n,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=n,this.warmup=r,this.firstNormalEpoch=s,this.firstNormalSlot=i}getEpoch(e){return this.getEpochAndSlotIndex(e)[0]}getEpochAndSlotIndex(e){if(e<this.firstNormalSlot){const n=za(_4(e+vs+1))-za(vs)-1,r=this.getSlotsInEpoch(n),s=e-(r-vs);return[n,s]}else{const n=e-this.firstNormalSlot,r=Math.floor(n/this.slotsPerEpoch),s=this.firstNormalEpoch+r,i=n%this.slotsPerEpoch;return[s,i]}}getFirstSlotInEpoch(e){return e<=this.firstNormalEpoch?(Math.pow(2,e)-1)*vs:(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+za(vs)):this.slotsPerEpoch}}var M4=globalThis.fetch;class R4 extends r4{constructor(e,n,r){const s=i=>{const o=t4(i,{autoconnect:!0,max_reconnects:5,reconnect:!0,reconnect_interval:1e3,...n});return"socket"in o?this.underlyingSocket=o.socket:this.underlyingSocket=o,o};super(s,e,n,r),this.underlyingSocket=void 0}call(...e){var r;const n=(r=this.underlyingSocket)==null?void 0:r.readyState;return n===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 "+n+")"))}notify(...e){var r;const n=(r=this.underlyingSocket)==null?void 0:r.readyState;return n===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 "+n+")"))}}function W4(t,e){let n;try{n=t.layout.decode(e)}catch(r){throw new Error("invalid instruction; "+r)}if(n.typeIndex!==t.index)throw new Error(`invalid account data; account type mismatch ${n.typeIndex} != ${t.index}`);return n}const xu=56;class lo{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 n=W4(P4,e),r=e.length-xu;Se(r>=0,"lookup table is invalid"),Se(r%32===0,"lookup table is invalid");const s=r/32,{addresses:i}=exports.struct([exports.seq(we(),s,"addresses")]).decode(e.slice(xu));return{deactivationSlot:n.deactivationSlot,lastExtendedSlot:n.lastExtendedSlot,lastExtendedSlotStartIndex:n.lastExtendedStartIndex,authority:n.authority.length!==0?new J(n.authority[0]):void 0,addresses:i.map(o=>new J(o))}}}const P4={index:1,layout:exports.struct([exports.u32("typeIndex"),as("deactivationSlot"),vt("lastExtendedSlot"),exports.u8("lastExtendedStartIndex"),exports.u8(),exports.seq(we(),sr(exports.u8(),-1),"authority")])},L4=/^[^:]+:\/\/([^:[]+|\[[^\]]+\])(:\d+)?(.*)/i;function O4(t){const e=t.match(L4);if(e==null)throw TypeError(`Failed to validate endpoint URL \`${t}\``);const[n,r,s,i]=e,o=t.startsWith("https:")?"wss:":"ws:",a=s==null?null:parseInt(s.slice(1),10),l=a==null?"":`:${a+1}`;return`${o}//${r}${l}${i}`}const Ke=fi(Rl(J),Q(),t=>new J(t)),dm=Wl([Q(),He("base64")]),Hl=fi(Rl(ae.Buffer),dm,t=>ae.Buffer.from(t[0],"base64")),um=30*1e3;function N4(t){if(/^https?:/.test(t)===!1)throw new TypeError("Endpoint URL must start with `http:` or `https:`.");return t}function _e(t){let e,n;if(typeof t=="string")e=t;else if(t){const{commitment:r,...s}=t;e=r,n=s}return{commitment:e,config:n}}function Cu(t){return t.map(e=>"memcmp"in e?{...e,memcmp:{...e.memcmp,encoding:e.memcmp.encoding??"base58"}}:e)}function fm(t){return Ht([X({jsonrpc:He("2.0"),id:Q(),result:t}),X({jsonrpc:He("2.0"),id:Q(),error:X({code:Es(),message:Q(),data:ce(D3())})})])}const z4=fm(Es());function ye(t){return fi(fm(t),z4,e=>"error"in e?e:{...e,result:te(e.result,t)})}function Qe(t){return ye(X({context:X({slot:z()}),value:t}))}function Vo(t){return X({context:X({slot:z()}),value:t})}function Ha(t,e){return t===0?new ar({header:e.header,staticAccountKeys:e.accountKeys.map(n=>new J(n)),recentBlockhash:e.recentBlockhash,compiledInstructions:e.instructions.map(n=>({programIdIndex:n.programIdIndex,accountKeyIndexes:n.accounts,data:Ct.decode(n.data)})),addressTableLookups:e.addressTableLookups}):new cn(e)}const H4=X({foundation:z(),foundationTerm:z(),initial:z(),taper:z(),terminal:z()}),q4=ye(ne(re(X({epoch:z(),effectiveSlot:z(),amount:z(),postBalance:z(),commission:ce(re(z()))})))),K4=ne(X({slot:z(),prioritizationFee:z()})),$4=X({total:z(),validator:z(),foundation:z(),epoch:z()}),j4=X({epoch:z(),slotIndex:z(),slotsInEpoch:z(),absoluteSlot:z(),blockHeight:ce(z()),transactionCount:ce(z())}),V4=X({slotsPerEpoch:z(),leaderScheduleSlotOffset:z(),warmup:_n(),firstNormalEpoch:z(),firstNormalSlot:z()}),G4=Vh(Q(),ne(z())),Or=re(Ht([X({}),Q()])),Y4=X({err:Or}),X4=He("receivedSignature"),Z4=X({"solana-core":Q(),"feature-set":ce(z())}),J4=X({program:Q(),programId:Ke,parsed:Es()}),Q4=X({programId:Ke,accounts:ne(Ke),data:Q()}),Su=Qe(X({err:re(Ht([X({}),Q()])),logs:re(ne(Q())),accounts:ce(re(ne(re(X({executable:_n(),owner:Q(),lamports:z(),data:ne(Q()),rentEpoch:ce(z())}))))),unitsConsumed:ce(z()),returnData:ce(re(X({programId:Q(),data:Wl([Q(),He("base64")])}))),innerInstructions:ce(re(ne(X({index:z(),instructions:ne(Ht([J4,Q4]))}))))})),e6=Qe(X({byIdentity:Vh(Q(),ne(z())),range:X({firstSlot:z(),lastSlot:z()})}));function t6(t,e,n,r,s,i){const o=n||M4;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 l;return r&&(l=async(m,p)=>{const C=await new Promise((w,F)=>{try{r(m,p,(I,x)=>w([I,x]))}catch(I){F(I)}});return await o(...C)}),new Qh(async(m,p)=>{const C={method:"POST",body:m,agent:a,headers:Object.assign({"Content-Type":"application/json"},e||{},tw)};try{let w=5,F,I=500;for(;l?F=await l(t,C):F=await o(t,C),!(F.status!==429||s===!0||(w-=1,w===0));)console.error(`Server responded with ${F.status} ${F.statusText}. Retrying after ${I}ms delay...`),await hr(I),I*=2;const x=await F.text();F.ok?p(null,x):p(new Error(`${F.status} ${F.statusText}: ${x}`))}catch(w){w instanceof Error&&p(w)}},{})}function n6(t){return(e,n)=>new Promise((r,s)=>{t.request(e,n,(i,o)=>{if(i){s(i);return}r(o)})})}function r6(t){return e=>new Promise((n,r)=>{e.length===0&&n([]);const s=e.map(i=>t.request(i.methodName,i.args));t.request(s,(i,o)=>{if(i){r(i);return}n(o)})})}const s6=ye(H4),i6=ye($4),o6=ye(K4),a6=ye(j4),c6=ye(V4),l6=ye(G4),d6=ye(z()),u6=Qe(X({total:z(),circulating:z(),nonCirculating:z(),nonCirculatingAccounts:ne(Ke)})),kc=X({amount:Q(),uiAmount:re(z()),decimals:z(),uiAmountString:ce(Q())}),f6=Qe(ne(X({address:Ke,amount:Q(),uiAmount:re(z()),decimals:z(),uiAmountString:ce(Q())}))),h6=Qe(ne(X({pubkey:Ke,account:X({executable:_n(),owner:Ke,lamports:z(),data:Hl,rentEpoch:z()})}))),Fc=X({program:Q(),parsed:Es(),space:z()}),m6=Qe(ne(X({pubkey:Ke,account:X({executable:_n(),owner:Ke,lamports:z(),data:Fc,rentEpoch:z()})}))),b6=Qe(ne(X({lamports:z(),address:Ke}))),Zs=X({executable:_n(),owner:Ke,lamports:z(),data:Hl,rentEpoch:z()}),p6=X({pubkey:Ke,account:Zs}),y6=fi(Ht([Rl(ae.Buffer),Fc]),Ht([dm,Fc]),t=>Array.isArray(t)?te(t,Hl):t),Tc=X({executable:_n(),owner:Ke,lamports:z(),data:y6,rentEpoch:z()}),g6=X({pubkey:Ke,account:Tc}),w6=X({state:Ht([He("active"),He("inactive"),He("activating"),He("deactivating")]),active:z(),inactive:z()}),E6=ye(ne(X({signature:Q(),slot:z(),err:Or,memo:re(Q()),blockTime:ce(re(z()))}))),A6=ye(ne(X({signature:Q(),slot:z(),err:Or,memo:re(Q()),blockTime:ce(re(z()))}))),B6=X({subscription:z(),result:Vo(Zs)}),x6=X({pubkey:Ke,account:Zs}),C6=X({subscription:z(),result:Vo(x6)}),S6=X({parent:z(),slot:z(),root:z()}),D6=X({subscription:z(),result:S6}),v6=Ht([X({type:Ht([He("firstShredReceived"),He("completed"),He("optimisticConfirmation"),He("root")]),slot:z(),timestamp:z()}),X({type:He("createdBank"),parent:z(),slot:z(),timestamp:z()}),X({type:He("frozen"),slot:z(),timestamp:z(),stats:X({numTransactionEntries:z(),numSuccessfulTransactions:z(),numFailedTransactions:z(),maxTransactionsPerEntry:z()})}),X({type:He("dead"),slot:z(),timestamp:z(),err:Q()})]),k6=X({subscription:z(),result:v6}),F6=X({subscription:z(),result:Vo(Ht([Y4,X4]))}),T6=X({subscription:z(),result:z()}),I6=X({pubkey:Q(),gossip:re(Q()),tpu:re(Q()),rpc:re(Q()),version:re(Q())}),Du=X({votePubkey:Q(),nodePubkey:Q(),activatedStake:z(),epochVoteAccount:_n(),epochCredits:ne(Wl([z(),z(),z()])),commission:z(),lastVote:z(),rootSlot:re(z())}),U6=ye(X({current:ne(Du),delinquent:ne(Du)})),_6=Ht([He("processed"),He("confirmed"),He("finalized")]),M6=X({slot:z(),confirmations:re(z()),err:Or,confirmationStatus:ce(_6)}),R6=Qe(ne(re(M6))),W6=ye(z()),hm=X({accountKey:Ke,writableIndexes:ne(z()),readonlyIndexes:ne(z())}),ql=X({signatures:ne(Q()),message:X({accountKeys:ne(Q()),header:X({numRequiredSignatures:z(),numReadonlySignedAccounts:z(),numReadonlyUnsignedAccounts:z()}),instructions:ne(X({accounts:ne(z()),data:Q(),programIdIndex:z()})),recentBlockhash:Q(),addressTableLookups:ce(ne(hm))})}),mm=X({pubkey:Ke,signer:_n(),writable:_n(),source:ce(Ht([He("transaction"),He("lookupTable")]))}),bm=X({accountKeys:ne(mm),signatures:ne(Q())}),pm=X({parsed:Es(),program:Q(),programId:Ke}),ym=X({accounts:ne(Ke),data:Q(),programId:Ke}),P6=Ht([ym,pm]),L6=Ht([X({parsed:Es(),program:Q(),programId:Q()}),X({accounts:ne(Q()),data:Q(),programId:Q()})]),gm=fi(P6,L6,t=>"accounts"in t?te(t,ym):te(t,pm)),wm=X({signatures:ne(Q()),message:X({accountKeys:ne(mm),instructions:ne(gm),recentBlockhash:Q(),addressTableLookups:ce(re(ne(hm)))})}),uo=X({accountIndex:z(),mint:Q(),owner:ce(Q()),programId:ce(Q()),uiTokenAmount:kc}),Em=X({writable:ne(Ke),readonly:ne(Ke)}),Go=X({err:Or,fee:z(),innerInstructions:ce(re(ne(X({index:z(),instructions:ne(X({accounts:ne(z()),data:Q(),programIdIndex:z()}))})))),preBalances:ne(z()),postBalances:ne(z()),logMessages:ce(re(ne(Q()))),preTokenBalances:ce(re(ne(uo))),postTokenBalances:ce(re(ne(uo))),loadedAddresses:ce(Em),computeUnitsConsumed:ce(z())}),Kl=X({err:Or,fee:z(),innerInstructions:ce(re(ne(X({index:z(),instructions:ne(gm)})))),preBalances:ne(z()),postBalances:ne(z()),logMessages:ce(re(ne(Q()))),preTokenBalances:ce(re(ne(uo))),postTokenBalances:ce(re(ne(uo))),loadedAddresses:ce(Em),computeUnitsConsumed:ce(z())}),As=Ht([He(0),He("legacy")]),Nr=X({pubkey:Q(),lamports:z(),postBalance:re(z()),rewardType:re(Q()),commission:ce(re(z()))}),O6=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),transactions:ne(X({transaction:ql,meta:re(Go),version:ce(As)})),rewards:ce(ne(Nr)),blockTime:re(z()),blockHeight:re(z())}))),N6=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),rewards:ce(ne(Nr)),blockTime:re(z()),blockHeight:re(z())}))),z6=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),transactions:ne(X({transaction:bm,meta:re(Go),version:ce(As)})),rewards:ce(ne(Nr)),blockTime:re(z()),blockHeight:re(z())}))),H6=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),transactions:ne(X({transaction:wm,meta:re(Kl),version:ce(As)})),rewards:ce(ne(Nr)),blockTime:re(z()),blockHeight:re(z())}))),q6=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),transactions:ne(X({transaction:bm,meta:re(Kl),version:ce(As)})),rewards:ce(ne(Nr)),blockTime:re(z()),blockHeight:re(z())}))),K6=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),rewards:ce(ne(Nr)),blockTime:re(z()),blockHeight:re(z())}))),$6=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),transactions:ne(X({transaction:ql,meta:re(Go)})),rewards:ce(ne(Nr)),blockTime:re(z())}))),vu=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),signatures:ne(Q()),blockTime:re(z())}))),qa=ye(re(X({slot:z(),meta:re(Go),blockTime:ce(re(z())),transaction:ql,version:ce(As)}))),Ci=ye(re(X({slot:z(),transaction:wm,meta:re(Kl),blockTime:ce(re(z())),version:ce(As)}))),j6=Qe(X({blockhash:Q(),lastValidBlockHeight:z()})),V6=Qe(_n()),G6=X({slot:z(),numTransactions:z(),numSlots:z(),samplePeriodSecs:z()}),Y6=ye(ne(G6)),X6=Qe(re(X({feeCalculator:X({lamportsPerSignature:z()})}))),Z6=ye(Q()),J6=ye(Q()),Q6=X({err:Or,logs:ne(Q()),signature:Q()}),ew=X({result:Vo(Q6),subscription:z()}),tw={"solana-client":"js/1.0.0-maintenance"};class Am{constructor(e,n){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 f={};return async m=>{const{commitment:p,config:C}=_e(m),w=this._buildArgs([],p,void 0,C),F=Bu(w);return f[F]=f[F]??(async()=>{try{const I=await this._rpcRequest("getBlockHeight",w),x=te(I,ye(z()));if("error"in x)throw new oe(x.error,"failed to get block height information");return x.result}finally{delete f[F]}})(),await f[F]}})();let r,s,i,o,a,l;n&&typeof n=="string"?this._commitment=n:n&&(this._commitment=n.commitment,this._confirmTransactionInitialTimeout=n.confirmTransactionInitialTimeout,r=n.wsEndpoint,s=n.httpHeaders,i=n.fetch,o=n.fetchMiddleware,a=n.disableRetryOnRateLimit,l=n.httpAgent),this._rpcEndpoint=N4(e),this._rpcWsEndpoint=r||O4(e),this._rpcClient=t6(e,s,i,o,a,l),this._rpcRequest=n6(this._rpcClient),this._rpcBatchRequest=r6(this._rpcClient),this._rpcWebSocket=new R4(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,n){const{commitment:r,config:s}=_e(n),i=this._buildArgs([e.toBase58()],r,void 0,s),o=await this._rpcRequest("getBalance",i),a=te(o,Qe(z()));if("error"in a)throw new oe(a.error,`failed to get balance for ${e.toBase58()}`);return a.result}async getBalance(e,n){return await this.getBalanceAndContext(e,n).then(r=>r.value).catch(r=>{throw new Error("failed to get balance of account "+e.toBase58()+": "+r)})}async getBlockTime(e){const n=await this._rpcRequest("getBlockTime",[e]),r=te(n,ye(re(z())));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",[]),n=te(e,ye(z()));if("error"in n)throw new oe(n.error,"failed to get minimum ledger slot");return n.result}async getFirstAvailableBlock(){const e=await this._rpcRequest("getFirstAvailableBlock",[]),n=te(e,d6);if("error"in n)throw new oe(n.error,"failed to get first available block");return n.result}async getSupply(e){let n={};typeof e=="string"?n={commitment:e}:e?n={...e,commitment:e&&e.commitment||this.commitment}:n={commitment:this.commitment};const r=await this._rpcRequest("getSupply",[n]),s=te(r,u6);if("error"in s)throw new oe(s.error,"failed to get supply");return s.result}async getTokenSupply(e,n){const r=this._buildArgs([e.toBase58()],n),s=await this._rpcRequest("getTokenSupply",r),i=te(s,Qe(kc));if("error"in i)throw new oe(i.error,"failed to get token supply");return i.result}async getTokenAccountBalance(e,n){const r=this._buildArgs([e.toBase58()],n),s=await this._rpcRequest("getTokenAccountBalance",r),i=te(s,Qe(kc));if("error"in i)throw new oe(i.error,"failed to get token account balance");return i.result}async getTokenAccountsByOwner(e,n,r){const{commitment:s,config:i}=_e(r);let o=[e.toBase58()];"mint"in n?o.push({mint:n.mint.toBase58()}):o.push({programId:n.programId.toBase58()});const a=this._buildArgs(o,s,"base64",i),l=await this._rpcRequest("getTokenAccountsByOwner",a),f=te(l,h6);if("error"in f)throw new oe(f.error,`failed to get token accounts owned by account ${e.toBase58()}`);return f.result}async getParsedTokenAccountsByOwner(e,n,r){let s=[e.toBase58()];"mint"in n?s.push({mint:n.mint.toBase58()}):s.push({programId:n.programId.toBase58()});const i=this._buildArgs(s,r,"jsonParsed"),o=await this._rpcRequest("getTokenAccountsByOwner",i),a=te(o,m6);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 n={...e,commitment:e&&e.commitment||this.commitment},r=n.filter||n.commitment?[n]:[],s=await this._rpcRequest("getLargestAccounts",r),i=te(s,b6);if("error"in i)throw new oe(i.error,"failed to get largest accounts");return i.result}async getTokenLargestAccounts(e,n){const r=this._buildArgs([e.toBase58()],n),s=await this._rpcRequest("getTokenLargestAccounts",r),i=te(s,f6);if("error"in i)throw new oe(i.error,"failed to get token largest accounts");return i.result}async getAccountInfoAndContext(e,n){const{commitment:r,config:s}=_e(n),i=this._buildArgs([e.toBase58()],r,"base64",s),o=await this._rpcRequest("getAccountInfo",i),a=te(o,Qe(re(Zs)));if("error"in a)throw new oe(a.error,`failed to get info about account ${e.toBase58()}`);return a.result}async getParsedAccountInfo(e,n){const{commitment:r,config:s}=_e(n),i=this._buildArgs([e.toBase58()],r,"jsonParsed",s),o=await this._rpcRequest("getAccountInfo",i),a=te(o,Qe(re(Tc)));if("error"in a)throw new oe(a.error,`failed to get info about account ${e.toBase58()}`);return a.result}async getAccountInfo(e,n){try{return(await this.getAccountInfoAndContext(e,n)).value}catch(r){throw new Error("failed to get info about account "+e.toBase58()+": "+r)}}async getMultipleParsedAccounts(e,n){const{commitment:r,config:s}=_e(n),i=e.map(f=>f.toBase58()),o=this._buildArgs([i],r,"jsonParsed",s),a=await this._rpcRequest("getMultipleAccounts",o),l=te(a,Qe(ne(re(Tc))));if("error"in l)throw new oe(l.error,`failed to get info for accounts ${i}`);return l.result}async getMultipleAccountsInfoAndContext(e,n){const{commitment:r,config:s}=_e(n),i=e.map(f=>f.toBase58()),o=this._buildArgs([i],r,"base64",s),a=await this._rpcRequest("getMultipleAccounts",o),l=te(a,Qe(ne(re(Zs))));if("error"in l)throw new oe(l.error,`failed to get info for accounts ${i}`);return l.result}async getMultipleAccountsInfo(e,n){return(await this.getMultipleAccountsInfoAndContext(e,n)).value}async getStakeActivation(e,n,r){const{commitment:s,config:i}=_e(n),o=this._buildArgs([e.toBase58()],s,void 0,{...i,epoch:r??(i==null?void 0:i.epoch)}),a=await this._rpcRequest("getStakeActivation",o),l=te(a,ye(w6));if("error"in l)throw new oe(l.error,`failed to get Stake Activation ${e.toBase58()}`);return l.result}async getProgramAccounts(e,n){const{commitment:r,config:s}=_e(n),{encoding:i,...o}=s||{},a=this._buildArgs([e.toBase58()],r,i||"base64",{...o,...o.filters?{filters:Cu(o.filters)}:null}),l=await this._rpcRequest("getProgramAccounts",a),f=ne(p6),m=o.withContext===!0?te(l,Qe(f)):te(l,ye(f));if("error"in m)throw new oe(m.error,`failed to get accounts owned by program ${e.toBase58()}`);return m.result}async getParsedProgramAccounts(e,n){const{commitment:r,config:s}=_e(n),i=this._buildArgs([e.toBase58()],r,"jsonParsed",s),o=await this._rpcRequest("getProgramAccounts",i),a=te(o,ye(ne(g6)));if("error"in a)throw new oe(a.error,`failed to get accounts owned by program ${e.toBase58()}`);return a.result}async confirmTransaction(e,n){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=Ct.decode(r)}catch{throw new Error("signature must be base58 encoded: "+r)}return Se(s.length===64,"signature has invalid length"),typeof e=="string"?await this.confirmTransactionUsingLegacyTimeoutStrategy({commitment:n||this.commitment,signature:r}):"lastValidBlockHeight"in e?await this.confirmTransactionUsingBlockHeightExceedanceStrategy({commitment:n||this.commitment,strategy:e}):await this.confirmTransactionUsingDurableNonceStrategy({commitment:n||this.commitment,strategy:e})}getCancellationPromise(e){return new Promise((n,r)=>{e!=null&&(e.aborted?r(e.reason):e.addEventListener("abort",()=>{r(e.reason)}))})}getTransactionConfirmationPromise({commitment:e,signature:n}){let r,s,i=!1;const o=new Promise((l,f)=>{try{r=this.onSignature(n,(p,C)=>{r=void 0;const w={context:C,value:p};l({__type:On.PROCESSED,response:w})},e);const m=new Promise(p=>{r==null?p():s=this._onSubscriptionStateChange(r,C=>{C==="subscribed"&&p()})});(async()=>{if(await m,i)return;const p=await this.getSignatureStatus(n);if(i||p==null)return;const{context:C,value:w}=p;if(w!=null)if(w!=null&&w.err)f(w.err);else{switch(e){case"confirmed":case"single":case"singleGossip":{if(w.confirmationStatus==="processed")return;break}case"finalized":case"max":case"root":{if(w.confirmationStatus==="processed"||w.confirmationStatus==="confirmed")return;break}case"processed":case"recent":}i=!0,l({__type:On.PROCESSED,response:{context:C,value:w}})}})()}catch(m){f(m)}});return{abortConfirmation:()=>{s&&(s(),s=void 0),r!=null&&(this.removeSignatureListener(r),r=void 0)},confirmationPromise:o}}async confirmTransactionUsingBlockHeightExceedanceStrategy({commitment:e,strategy:{abortSignal:n,lastValidBlockHeight:r,signature:s}}){let i=!1;const o=new Promise(p=>{const C=async()=>{try{return await this.getBlockHeight(e)}catch{return-1}};(async()=>{let w=await C();if(!i){for(;w<=r;)if(await hr(1e3),i||(w=await C(),i))return;p({__type:On.BLOCKHEIGHT_EXCEEDED})}})()}),{abortConfirmation:a,confirmationPromise:l}=this.getTransactionConfirmationPromise({commitment:e,signature:s}),f=this.getCancellationPromise(n);let m;try{const p=await Promise.race([f,l,o]);if(p.__type===On.PROCESSED)m=p.response;else throw new Ho(s)}finally{i=!0,a()}return m}async confirmTransactionUsingDurableNonceStrategy({commitment:e,strategy:{abortSignal:n,minContextSlot:r,nonceAccountPubkey:s,nonceValue:i,signature:o}}){let a=!1;const l=new Promise(w=>{let F=i,I=null;const x=async()=>{try{const{context:E,value:_}=await this.getNonceAndContext(s,{commitment:e,minContextSlot:r});return I=E.slot,_==null?void 0:_.nonce}catch{return F}};(async()=>{if(F=await x(),!a)for(;;){if(i!==F){w({__type:On.NONCE_INVALID,slotInWhichNonceDidAdvance:I});return}if(await hr(2e3),a||(F=await x(),a))return}})()}),{abortConfirmation:f,confirmationPromise:m}=this.getTransactionConfirmationPromise({commitment:e,signature:o}),p=this.getCancellationPromise(n);let C;try{const w=await Promise.race([p,m,l]);if(w.__type===On.PROCESSED)C=w.response;else{let F;for(;;){const I=await this.getSignatureStatus(o);if(I==null)break;if(I.context.slot<(w.slotInWhichNonceDidAdvance??r)){await hr(400);continue}F=I;break}if(F!=null&&F.value){const I=e||"finalized",{confirmationStatus:x}=F.value;switch(I){case"processed":case"recent":if(x!=="processed"&&x!=="confirmed"&&x!=="finalized")throw new Gr(o);break;case"confirmed":case"single":case"singleGossip":if(x!=="confirmed"&&x!=="finalized")throw new Gr(o);break;case"finalized":case"max":case"root":if(x!=="finalized")throw new Gr(o);break;default:}C={context:F.context,value:{err:F.value.err}}}else throw new Gr(o)}}finally{a=!0,f()}return C}async confirmTransactionUsingLegacyTimeoutStrategy({commitment:e,signature:n}){let r;const s=new Promise(l=>{let f=this._confirmTransactionInitialTimeout||6e4;switch(e){case"processed":case"recent":case"single":case"confirmed":case"singleGossip":{f=this._confirmTransactionInitialTimeout||3e4;break}}r=setTimeout(()=>l({__type:On.TIMED_OUT,timeoutMs:f}),f)}),{abortConfirmation:i,confirmationPromise:o}=this.getTransactionConfirmationPromise({commitment:e,signature:n});let a;try{const l=await Promise.race([o,s]);if(l.__type===On.PROCESSED)a=l.response;else throw new Nl(n,l.timeoutMs/1e3)}finally{clearTimeout(r),i()}return a}async getClusterNodes(){const e=await this._rpcRequest("getClusterNodes",[]),n=te(e,ye(ne(I6)));if("error"in n)throw new oe(n.error,"failed to get cluster nodes");return n.result}async getVoteAccounts(e){const n=this._buildArgs([],e),r=await this._rpcRequest("getVoteAccounts",n),s=te(r,U6);if("error"in s)throw new oe(s.error,"failed to get vote accounts");return s.result}async getSlot(e){const{commitment:n,config:r}=_e(e),s=this._buildArgs([],n,void 0,r),i=await this._rpcRequest("getSlot",s),o=te(i,ye(z()));if("error"in o)throw new oe(o.error,"failed to get slot");return o.result}async getSlotLeader(e){const{commitment:n,config:r}=_e(e),s=this._buildArgs([],n,void 0,r),i=await this._rpcRequest("getSlotLeader",s),o=te(i,ye(Q()));if("error"in o)throw new oe(o.error,"failed to get slot leader");return o.result}async getSlotLeaders(e,n){const r=[e,n],s=await this._rpcRequest("getSlotLeaders",r),i=te(s,ye(ne(Ke)));if("error"in i)throw new oe(i.error,"failed to get slot leaders");return i.result}async getSignatureStatus(e,n){const{context:r,value:s}=await this.getSignatureStatuses([e],n);Se(s.length===1);const i=s[0];return{context:r,value:i}}async getSignatureStatuses(e,n){const r=[e];n&&r.push(n);const s=await this._rpcRequest("getSignatureStatuses",r),i=te(s,R6);if("error"in i)throw new oe(i.error,"failed to get signature status");return i.result}async getTransactionCount(e){const{commitment:n,config:r}=_e(e),s=this._buildArgs([],n,void 0,r),i=await this._rpcRequest("getTransactionCount",s),o=te(i,ye(z()));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 n=this._buildArgs([],e),r=await this._rpcRequest("getInflationGovernor",n),s=te(r,s6);if("error"in s)throw new oe(s.error,"failed to get inflation");return s.result}async getInflationReward(e,n,r){const{commitment:s,config:i}=_e(r),o=this._buildArgs([e.map(f=>f.toBase58())],s,void 0,{...i,epoch:n??(i==null?void 0:i.epoch)}),a=await this._rpcRequest("getInflationReward",o),l=te(a,q4);if("error"in l)throw new oe(l.error,"failed to get inflation reward");return l.result}async getInflationRate(){const e=await this._rpcRequest("getInflationRate",[]),n=te(e,i6);if("error"in n)throw new oe(n.error,"failed to get inflation rate");return n.result}async getEpochInfo(e){const{commitment:n,config:r}=_e(e),s=this._buildArgs([],n,void 0,r),i=await this._rpcRequest("getEpochInfo",s),o=te(i,a6);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",[]),n=te(e,c6);if("error"in n)throw new oe(n.error,"failed to get epoch schedule");const r=n.result;return new lm(r.slotsPerEpoch,r.leaderScheduleSlotOffset,r.warmup,r.firstNormalEpoch,r.firstNormalSlot)}async getLeaderSchedule(){const e=await this._rpcRequest("getLeaderSchedule",[]),n=te(e,l6);if("error"in n)throw new oe(n.error,"failed to get leader schedule");return n.result}async getMinimumBalanceForRentExemption(e,n){const r=this._buildArgs([e],n),s=await this._rpcRequest("getMinimumBalanceForRentExemption",r),i=te(s,W6);return"error"in i?(console.warn("Unable to fetch minimum balance for rent exemption"),0):i.result}async getRecentBlockhashAndContext(e){const{context:n,value:{blockhash:r}}=await this.getLatestBlockhashAndContext(e);return{context:n,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 n=await this._rpcRequest("getRecentPerformanceSamples",e?[e]:[]),r=te(n,Y6);if("error"in r)throw new oe(r.error,"failed to get recent performance samples");return r.result}async getFeeCalculatorForBlockhash(e,n){const r=this._buildArgs([e],n),s=await this._rpcRequest("getFeeCalculatorForBlockhash",r),i=te(s,X6);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,n){const r=ge(e.serialize()).toString("base64"),s=this._buildArgs([r],n),i=await this._rpcRequest("getFeeForMessage",s),o=te(i,Qe(re(z())));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 n=(o=e==null?void 0:e.lockedWritableAccounts)==null?void 0:o.map(a=>a.toBase58()),r=n!=null&&n.length?[n]:[],s=await this._rpcRequest("getRecentPrioritizationFees",r),i=te(s,o6);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(n){throw new Error("failed to get recent blockhash: "+n)}}async getLatestBlockhash(e){try{return(await this.getLatestBlockhashAndContext(e)).value}catch(n){throw new Error("failed to get recent blockhash: "+n)}}async getLatestBlockhashAndContext(e){const{commitment:n,config:r}=_e(e),s=this._buildArgs([],n,void 0,r),i=await this._rpcRequest("getLatestBlockhash",s),o=te(i,j6);if("error"in o)throw new oe(o.error,"failed to get latest blockhash");return o.result}async isBlockhashValid(e,n){const{commitment:r,config:s}=_e(n),i=this._buildArgs([e],r,void 0,s),o=await this._rpcRequest("isBlockhashValid",i),a=te(o,V6);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",[]),n=te(e,ye(Z4));if("error"in n)throw new oe(n.error,"failed to get version");return n.result}async getGenesisHash(){const e=await this._rpcRequest("getGenesisHash",[]),n=te(e,ye(Q()));if("error"in n)throw new oe(n.error,"failed to get genesis hash");return n.result}async getBlock(e,n){const{commitment:r,config:s}=_e(n),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=te(o,z6);if("error"in a)throw a.error;return a.result}case"none":{const a=te(o,N6);if("error"in a)throw a.error;return a.result}default:{const a=te(o,O6);if("error"in a)throw a.error;const{result:l}=a;return l?{...l,transactions:l.transactions.map(({transaction:f,meta:m,version:p})=>({meta:m,transaction:{...f,message:Ha(p,f.message)},version:p}))}:null}}}catch(a){throw new oe(a,"failed to get confirmed block")}}async getParsedBlock(e,n){const{commitment:r,config:s}=_e(n),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=te(o,q6);if("error"in a)throw a.error;return a.result}case"none":{const a=te(o,K6);if("error"in a)throw a.error;return a.result}default:{const a=te(o,H6);if("error"in a)throw a.error;return a.result}}}catch(a){throw new oe(a,"failed to get block")}}async getBlockProduction(e){let n,r;if(typeof e=="string")r=e;else if(e){const{commitment:a,...l}=e;r=a,n=l}const s=this._buildArgs([],r,"base64",n),i=await this._rpcRequest("getBlockProduction",s),o=te(i,e6);if("error"in o)throw new oe(o.error,"failed to get block production information");return o.result}async getTransaction(e,n){const{commitment:r,config:s}=_e(n),i=this._buildArgsAtLeastConfirmed([e],r,void 0,s),o=await this._rpcRequest("getTransaction",i),a=te(o,qa);if("error"in a)throw new oe(a.error,"failed to get transaction");const l=a.result;return l&&{...l,transaction:{...l.transaction,message:Ha(l.version,l.transaction.message)}}}async getParsedTransaction(e,n){const{commitment:r,config:s}=_e(n),i=this._buildArgsAtLeastConfirmed([e],r,"jsonParsed",s),o=await this._rpcRequest("getTransaction",i),a=te(o,Ci);if("error"in a)throw new oe(a.error,"failed to get transaction");return a.result}async getParsedTransactions(e,n){const{commitment:r,config:s}=_e(n),i=e.map(l=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([l],r,"jsonParsed",s)}));return(await this._rpcBatchRequest(i)).map(l=>{const f=te(l,Ci);if("error"in f)throw new oe(f.error,"failed to get transactions");return f.result})}async getTransactions(e,n){const{commitment:r,config:s}=_e(n),i=e.map(l=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([l],r,void 0,s)}));return(await this._rpcBatchRequest(i)).map(l=>{const f=te(l,qa);if("error"in f)throw new oe(f.error,"failed to get transactions");const m=f.result;return m&&{...m,transaction:{...m.transaction,message:Ha(m.version,m.transaction.message)}}})}async getConfirmedBlock(e,n){const r=this._buildArgsAtLeastConfirmed([e],n),s=await this._rpcRequest("getBlock",r),i=te(s,$6);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:l,meta:f})=>{const m=new cn(l.message);return{meta:f,transaction:{...l,message:m}}})};return{...a,transactions:a.transactions.map(({transaction:l,meta:f})=>({meta:f,transaction:Ce.populate(l.message,l.signatures)}))}}async getBlocks(e,n,r){const s=this._buildArgsAtLeastConfirmed(n!==void 0?[e,n]:[e],r),i=await this._rpcRequest("getBlocks",s),o=te(i,ye(ne(z())));if("error"in o)throw new oe(o.error,"failed to get blocks");return o.result}async getBlockSignatures(e,n){const r=this._buildArgsAtLeastConfirmed([e],n,void 0,{transactionDetails:"signatures",rewards:!1}),s=await this._rpcRequest("getBlock",r),i=te(s,vu);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,n){const r=this._buildArgsAtLeastConfirmed([e],n,void 0,{transactionDetails:"signatures",rewards:!1}),s=await this._rpcRequest("getBlock",r),i=te(s,vu);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,n){const r=this._buildArgsAtLeastConfirmed([e],n),s=await this._rpcRequest("getTransaction",r),i=te(s,qa);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),l=o.transaction.signatures;return{...o,transaction:Ce.populate(a,l)}}async getParsedConfirmedTransaction(e,n){const r=this._buildArgsAtLeastConfirmed([e],n,"jsonParsed"),s=await this._rpcRequest("getTransaction",r),i=te(s,Ci);if("error"in i)throw new oe(i.error,"failed to get confirmed transaction");return i.result}async getParsedConfirmedTransactions(e,n){const r=e.map(o=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([o],n,"jsonParsed")}));return(await this._rpcBatchRequest(r)).map(o=>{const a=te(o,Ci);if("error"in a)throw new oe(a.error,"failed to get confirmed transactions");return a.result})}async getConfirmedSignaturesForAddress(e,n,r){let s={},i=await this.getFirstAvailableBlock();for(;!("until"in s)&&(n--,!(n<=0||n<i));)try{const l=await this.getConfirmedBlockSignatures(n,"finalized");l.signatures.length>0&&(s.until=l.signatures[l.signatures.length-1].toString())}catch(l){if(l instanceof Error&&l.message.includes("skipped"))continue;throw l}let o=await this.getSlot("finalized");for(;!("before"in s)&&(r++,!(r>o));)try{const l=await this.getConfirmedBlockSignatures(r);l.signatures.length>0&&(s.before=l.signatures[l.signatures.length-1].toString())}catch(l){if(l instanceof Error&&l.message.includes("skipped"))continue;throw l}return(await this.getConfirmedSignaturesForAddress2(e,s)).map(l=>l.signature)}async getConfirmedSignaturesForAddress2(e,n,r){const s=this._buildArgsAtLeastConfirmed([e.toBase58()],r,void 0,n),i=await this._rpcRequest("getConfirmedSignaturesForAddress2",s),o=te(i,E6);if("error"in o)throw new oe(o.error,"failed to get confirmed signatures for address");return o.result}async getSignaturesForAddress(e,n,r){const s=this._buildArgsAtLeastConfirmed([e.toBase58()],r,void 0,n),i=await this._rpcRequest("getSignaturesForAddress",s),o=te(i,A6);if("error"in o)throw new oe(o.error,"failed to get signatures for address");return o.result}async getAddressLookupTable(e,n){const{context:r,value:s}=await this.getAccountInfoAndContext(e,n);let i=null;return s!==null&&(i=new lo({key:e,state:lo.deserialize(s.data)})),{context:r,value:i}}async getNonceAndContext(e,n){const{context:r,value:s}=await this.getAccountInfoAndContext(e,n);let i=null;return s!==null&&(i=jo.fromAccountData(s.data)),{context:r,value:i}}async getNonce(e,n){return await this.getNonceAndContext(e,n).then(r=>r.value).catch(r=>{throw new Error("failed to get nonce for account "+e.toBase58()+": "+r)})}async requestAirdrop(e,n){const r=await this._rpcRequest("requestAirdrop",[e.toBase58(),n]),s=te(r,Z6);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 hr(100);const r=Date.now()-this._blockhashInfo.lastFetch>=um;if(this._blockhashInfo.latestBlockhash!==null&&!r)return this._blockhashInfo.latestBlockhash}return await this._pollNewBlockhash()}async _pollNewBlockhash(){this._pollingBlockhash=!0;try{const e=Date.now(),n=this._blockhashInfo.latestBlockhash,r=n?n.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 hr(im/2)}throw new Error(`Unable to obtain a new blockhash after ${Date.now()-e}ms`)}finally{this._pollingBlockhash=!1}}async getStakeMinimumDelegation(e){const{commitment:n,config:r}=_e(e),s=this._buildArgs([],n,"base64",r),i=await this._rpcRequest("getStakeMinimumDelegation",s),o=te(i,Qe(z()));if("error"in o)throw new oe(o.error,"failed to get stake minimum delegation");return o.result}async simulateTransaction(e,n,r){if("message"in e){const I=e.serialize(),x=ae.Buffer.from(I).toString("base64");if(Array.isArray(n)||r!==void 0)throw new Error("Invalid arguments");const E=n||{};E.encoding="base64","commitment"in E||(E.commitment=this.commitment),n&&typeof n=="object"&&"innerInstructions"in n&&(E.innerInstructions=n.innerInstructions);const _=[x,E],k=await this._rpcRequest("simulateTransaction",_),P=te(k,Su);if("error"in P)throw new Error("failed to simulate transaction: "+P.error.message);return P.result}let s;if(e instanceof Ce){let F=e;s=new Ce,s.feePayer=F.feePayer,s.instructions=e.instructions,s.nonceInfo=F.nonceInfo,s.signatures=F.signatures}else s=Ce.populate(e),s._message=s._json=void 0;if(n!==void 0&&!Array.isArray(n))throw new Error("Invalid arguments");const i=n;if(s.nonceInfo&&i)s.sign(...i);else{let F=this._disableBlockhashCaching;for(;;){const I=await this._blockhashWithExpiryBlockHeight(F);if(s.lastValidBlockHeight=I.lastValidBlockHeight,s.recentBlockhash=I.blockhash,!i)break;if(s.sign(...i),!s.signature)throw new Error("!signature");const x=s.signature.toString("base64");if(!this._blockhashInfo.simulatedSignatures.includes(x)&&!this._blockhashInfo.transactionSignatures.includes(x)){this._blockhashInfo.simulatedSignatures.push(x);break}else F=!0}}const o=s._compile(),a=o.serialize(),f=s._serialize(a).toString("base64"),m={encoding:"base64",commitment:this.commitment};if(r){const F=(Array.isArray(r)?r:o.nonProgramIds()).map(I=>I.toBase58());m.accounts={encoding:"base64",addresses:F}}i&&(m.sigVerify=!0),n&&typeof n=="object"&&"innerInstructions"in n&&(m.innerInstructions=n.innerInstructions);const p=[f,m],C=await this._rpcRequest("simulateTransaction",p),w=te(C,Su);if("error"in w){let F;if("data"in w.error&&(F=w.error.data.logs,F&&Array.isArray(F))){const I=`
15
+ `,x=I+F.join(I);console.error(w.error.message,x)}throw new os({action:"simulate",signature:"",transactionMessage:w.error.message,logs:F})}return w.result}async sendTransaction(e,n,r){if("version"in e){if(n&&Array.isArray(n))throw new Error("Invalid arguments");const o=e.serialize();return await this.sendRawTransaction(o,n)}if(n===void 0||!Array.isArray(n))throw new Error("Invalid arguments");const s=n;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 l=e.signature.toString("base64");if(this._blockhashInfo.transactionSignatures.includes(l))o=!0;else{this._blockhashInfo.transactionSignatures.push(l);break}}}const i=e.serialize();return await this.sendRawTransaction(i,r)}async sendRawTransaction(e,n){const r=ge(e).toString("base64");return await this.sendEncodedTransaction(r,n)}async sendEncodedTransaction(e,n){const r={encoding:"base64"},s=n&&n.skipPreflight,i=s===!0?"processed":n&&n.preflightCommitment||this.commitment;n&&n.maxRetries!=null&&(r.maxRetries=n.maxRetries),n&&n.minContextSlot!=null&&(r.minContextSlot=n.minContextSlot),s&&(r.skipPreflight=s),i&&(r.preflightCommitment=i);const o=[e,r],a=await this._rpcRequest("sendTransaction",o),l=te(a,J6);if("error"in l){let f;throw"data"in l.error&&(f=l.error.data.logs),new os({action:s?"send":"simulate",signature:"",transactionMessage:l.error.message,logs:f})}return l.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(([n,r])=>{this._setSubscription(n,{...r,state:"pending"})})}_setSubscription(e,n){var s;const r=(s=this._subscriptionsByHash[e])==null?void 0:s.state;if(this._subscriptionsByHash[e]=n,r!==n.state){const i=this._subscriptionStateChangeCallbacksByHash[e];i&&i.forEach(o=>{try{o(n.state)}catch{}})}}_onSubscriptionStateChange(e,n){var i;const r=this._subscriptionHashByClientSubscriptionId[e];if(r==null)return()=>{};const s=(i=this._subscriptionStateChangeCallbacksByHash)[r]||(i[r]=new Set);return s.add(n),()=>{s.delete(n),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,n=()=>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}),!n())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),!n())return;this._setSubscription(r,{...s,state:"subscribed"}),await this._updateSubscriptions();return}}this._setSubscription(r,{...s,state:"unsubscribed"}),await this._updateSubscriptions()})();break}}))}_handleServerNotification(e,n){const r=this._subscriptionCallbacksByServerSubscriptionId[e];r!==void 0&&r.forEach(s=>{try{s(...n)}catch(i){console.error(i)}})}_wsOnAccountNotification(e){const{result:n,subscription:r}=te(e,B6);this._handleServerNotification(r,[n.value,n.context])}_makeSubscription(e,n){const r=this._nextClientSubscriptionId++,s=Bu([e.method,n]),i=this._subscriptionsByHash[s];return i===void 0?this._subscriptionsByHash[s]={...e,args:n,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];Se(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,n,r){const{commitment:s,config:i}=_e(r),o=this._buildArgs([e.toBase58()],s||this._commitment||"finalized","base64",i);return this._makeSubscription({callback:n,method:"accountSubscribe",unsubscribeMethod:"accountUnsubscribe"},o)}async removeAccountChangeListener(e){await this._unsubscribeClientSubscription(e,"account change")}_wsOnProgramAccountNotification(e){const{result:n,subscription:r}=te(e,C6);this._handleServerNotification(r,[{accountId:n.value.pubkey,accountInfo:n.value.account},n.context])}onProgramAccountChange(e,n,r,s){const{commitment:i,config:o}=_e(r),a=this._buildArgs([e.toBase58()],i||this._commitment||"finalized","base64",o||(s?{filters:Cu(s)}:void 0));return this._makeSubscription({callback:n,method:"programSubscribe",unsubscribeMethod:"programUnsubscribe"},a)}async removeProgramAccountChangeListener(e){await this._unsubscribeClientSubscription(e,"program account change")}onLogs(e,n,r){const s=this._buildArgs([typeof e=="object"?{mentions:[e.toString()]}:e],r||this._commitment||"finalized");return this._makeSubscription({callback:n,method:"logsSubscribe",unsubscribeMethod:"logsUnsubscribe"},s)}async removeOnLogsListener(e){await this._unsubscribeClientSubscription(e,"logs")}_wsOnLogsNotification(e){const{result:n,subscription:r}=te(e,ew);this._handleServerNotification(r,[n.value,n.context])}_wsOnSlotNotification(e){const{result:n,subscription:r}=te(e,D6);this._handleServerNotification(r,[n])}onSlotChange(e){return this._makeSubscription({callback:e,method:"slotSubscribe",unsubscribeMethod:"slotUnsubscribe"},[])}async removeSlotChangeListener(e){await this._unsubscribeClientSubscription(e,"slot change")}_wsOnSlotUpdatesNotification(e){const{result:n,subscription:r}=te(e,k6);this._handleServerNotification(r,[n])}onSlotUpdate(e){return this._makeSubscription({callback:e,method:"slotsUpdatesSubscribe",unsubscribeMethod:"slotsUpdatesUnsubscribe"},[])}async removeSlotUpdateListener(e){await this._unsubscribeClientSubscription(e,"slot update")}async _unsubscribeClientSubscription(e,n){const r=this._subscriptionDisposeFunctionsByClientSubscriptionId[e];r?await r():console.warn(`Ignored unsubscribe request because an active subscription with id \`${e}\` for '${n}' events could not be found.`)}_buildArgs(e,n,r,s){const i=n||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,n,r,s){const i=n||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,n,r,s)}_wsOnSignatureNotification(e){const{result:n,subscription:r}=te(e,F6);n.value!=="receivedSignature"&&this._subscriptionsAutoDisposedByRpc.add(r),this._handleServerNotification(r,n.value==="receivedSignature"?[{type:"received"},n.context]:[{type:"status",result:n.value},n.context])}onSignature(e,n,r){const s=this._buildArgs([e],r||this._commitment||"finalized"),i=this._makeSubscription({callback:(o,a)=>{if(o.type==="status"){n(o.result,a);try{this.removeSignatureListener(i)}catch{}}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},s);return i}onSignatureWithOptions(e,n,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:(l,f)=>{n(l,f);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:n,subscription:r}=te(e,T6);this._handleServerNotification(r,[n])}onRootChange(e){return this._makeSubscription({callback:e,method:"rootSubscribe",unsubscribeMethod:"rootUnsubscribe"},[])}async removeRootChangeListener(e){await this._unsubscribeClientSubscription(e,"root change")}}class Cr{constructor(e){this._keypair=void 0,this._keypair=e??gu()}static generate(){return new Cr(gu())}static fromSecretKey(e,n){if(e.byteLength!==64)throw new Error("bad secret key size");const r=e.slice(32,64);if(!n||!n.skipValidation){const s=e.slice(0,32),i=co(s);for(let o=0;o<32;o++)if(r[o]!==i[o])throw new Error("provided secretKey is invalid")}return new Cr({publicKey:r,secretKey:e})}static fromSeed(e){const n=co(e),r=new Uint8Array(64);return r.set(e),r.set(n,32),new Cr({publicKey:n,secretKey:r})}get publicKey(){return new J(this._keypair.publicKey)}get secretKey(){return new Uint8Array(this._keypair.secretKey)}}const qn=Object.freeze({CreateLookupTable:{index:0,layout:exports.struct([exports.u32("instruction"),as("recentSlot"),exports.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:exports.struct([exports.u32("instruction")])},ExtendLookupTable:{index:2,layout:exports.struct([exports.u32("instruction"),as(),exports.seq(we(),sr(exports.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:exports.struct([exports.u32("instruction")])},CloseLookupTable:{index:4,layout:exports.struct([exports.u32("instruction")])}});class nw{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(qn))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:n}=ke(qn.CreateLookupTable,e.data);return{authority:e.keys[1].pubkey,payer:e.keys[2].pubkey,recentSlot:Number(n)}}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:n}=ke(qn.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:n.map(r=>new J(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(Yo.programId))throw new Error("invalid instruction; programId is not AddressLookupTable Program")}static checkKeysLength(e,n){if(e.length<n)throw new Error(`invalid instruction; found ${e.length} keys, expected at least ${n}`)}}class Yo{constructor(){}static createLookupTable(e){const[n,r]=J.findProgramAddressSync([e.authority.toBuffer(),_l(BigInt(e.recentSlot),8)],this.programId),s=qn.CreateLookupTable,i=Ee(s,{recentSlot:BigInt(e.recentSlot),bumpSeed:r}),o=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1},{pubkey:e.payer,isSigner:!0,isWritable:!0},{pubkey:Et.programId,isSigner:!1,isWritable:!1}];return[new Ie({programId:this.programId,keys:o,data:i}),n]}static freezeLookupTable(e){const n=qn.FreezeLookupTable,r=Ee(n),s=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return new Ie({programId:this.programId,keys:s,data:r})}static extendLookupTable(e){const n=qn.ExtendLookupTable,r=Ee(n,{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:Et.programId,isSigner:!1,isWritable:!1}),new Ie({programId:this.programId,keys:s,data:r})}static deactivateLookupTable(e){const n=qn.DeactivateLookupTable,r=Ee(n),s=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return new Ie({programId:this.programId,keys:s,data:r})}static closeLookupTable(e){const n=qn.CloseLookupTable,r=Ee(n),s=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1},{pubkey:e.recipient,isSigner:!1,isWritable:!0}];return new Ie({programId:this.programId,keys:s,data:r})}}Yo.programId=new J("AddressLookupTab1e1111111111111111111111111");class rw{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(Dn))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:n,additionalFee:r}=ke(Dn.RequestUnits,e.data);return{units:n,additionalFee:r}}static decodeRequestHeapFrame(e){this.checkProgramId(e.programId);const{bytes:n}=ke(Dn.RequestHeapFrame,e.data);return{bytes:n}}static decodeSetComputeUnitLimit(e){this.checkProgramId(e.programId);const{units:n}=ke(Dn.SetComputeUnitLimit,e.data);return{units:n}}static decodeSetComputeUnitPrice(e){this.checkProgramId(e.programId);const{microLamports:n}=ke(Dn.SetComputeUnitPrice,e.data);return{microLamports:n}}static checkProgramId(e){if(!e.equals(Xo.programId))throw new Error("invalid instruction; programId is not ComputeBudgetProgram")}}const Dn=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"),as("microLamports")])}});class Xo{constructor(){}static requestUnits(e){const n=Dn.RequestUnits,r=Ee(n,e);return new Ie({keys:[],programId:this.programId,data:r})}static requestHeapFrame(e){const n=Dn.RequestHeapFrame,r=Ee(n,e);return new Ie({keys:[],programId:this.programId,data:r})}static setComputeUnitLimit(e){const n=Dn.SetComputeUnitLimit,r=Ee(n,e);return new Ie({keys:[],programId:this.programId,data:r})}static setComputeUnitPrice(e){const n=Dn.SetComputeUnitPrice,r=Ee(n,{microLamports:BigInt(e.microLamports)});return new Ie({keys:[],programId:this.programId,data:r})}}Xo.programId=new J("ComputeBudget111111111111111111111111111111");const ku=64,Fu=32,Tu=64,Iu=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 Zo{constructor(){}static createInstructionWithPublicKey(e){const{publicKey:n,message:r,signature:s,instructionIndex:i}=e;Se(n.length===Fu,`Public Key must be ${Fu} bytes but received ${n.length} bytes`),Se(s.length===Tu,`Signature must be ${Tu} bytes but received ${s.length} bytes`);const o=Iu.span,a=o+n.length,l=a+s.length,f=1,m=ae.Buffer.alloc(l+r.length),p=i??65535;return Iu.encode({numSignatures:f,padding:0,signatureOffset:a,signatureInstructionIndex:p,publicKeyOffset:o,publicKeyInstructionIndex:p,messageDataOffset:l,messageDataSize:r.length,messageInstructionIndex:p},m),m.fill(n,o),m.fill(s,a),m.fill(r,l),new Ie({keys:[],programId:Zo.programId,data:m})}static createInstructionWithPrivateKey(e){const{privateKey:n,message:r,instructionIndex:s}=e;Se(n.length===ku,`Private key must be ${ku} bytes but received ${n.length} bytes`);try{const i=Cr.fromSecretKey(n),o=i.publicKey.toBytes(),a=Ll(r,i.secretKey);return this.createInstructionWithPublicKey({publicKey:o,message:r,signature:a,instructionIndex:s})}catch(i){throw new Error(`Error creating instruction; ${i}`)}}}Zo.programId=new J("Ed25519SigVerify111111111111111111111111111");const sw=(t,e)=>{const n=Qn.sign(t,e);return[n.toCompactRawBytes(),n.recovery]};Qn.utils.isValidPrivateKey;const iw=Qn.getPublicKey,Uu=32,Ka=20,_u=64,ow=11,$a=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 Sr{constructor(){}static publicKeyToEthAddress(e){Se(e.length===_u,`Public key must be ${_u} bytes but received ${e.length} bytes`);try{return ae.Buffer.from(Ns(ge(e))).slice(-Ka)}catch(n){throw new Error(`Error constructing Ethereum address: ${n}`)}}static createInstructionWithPublicKey(e){const{publicKey:n,message:r,signature:s,recoveryId:i,instructionIndex:o}=e;return Sr.createInstructionWithEthAddress({ethAddress:Sr.publicKeyToEthAddress(n),message:r,signature:s,recoveryId:i,instructionIndex:o})}static createInstructionWithEthAddress(e){const{ethAddress:n,message:r,signature:s,recoveryId:i,instructionIndex:o=0}=e;let a;typeof n=="string"?n.startsWith("0x")?a=ae.Buffer.from(n.substr(2),"hex"):a=ae.Buffer.from(n,"hex"):a=n,Se(a.length===Ka,`Address must be ${Ka} bytes but received ${a.length} bytes`);const l=1+ow,f=l,m=l+a.length,p=m+s.length+1,C=1,w=ae.Buffer.alloc($a.span+r.length);return $a.encode({numSignatures:C,signatureOffset:m,signatureInstructionIndex:o,ethAddressOffset:f,ethAddressInstructionIndex:o,messageDataOffset:p,messageDataSize:r.length,messageInstructionIndex:o,signature:ge(s),ethAddress:ge(a),recoveryId:i},w),w.fill(ge(r),$a.span),new Ie({keys:[],programId:Sr.programId,data:w})}static createInstructionWithPrivateKey(e){const{privateKey:n,message:r,instructionIndex:s}=e;Se(n.length===Uu,`Private key must be ${Uu} bytes but received ${n.length} bytes`);try{const i=ge(n),o=iw(i,!1).slice(1),a=ae.Buffer.from(Ns(ge(r))),[l,f]=sw(a,i);return this.createInstructionWithPublicKey({publicKey:o,message:r,signature:l,recoveryId:f,instructionIndex:s})}catch(i){throw new Error(`Error creating instruction; ${i}`)}}}Sr.programId=new J("KeccakSecp256k11111111111111111111111111111");var Bm;const xm=new J("StakeConfig11111111111111111111111111111111");class Cm{constructor(e,n){this.staker=void 0,this.withdrawer=void 0,this.staker=e,this.withdrawer=n}}class hi{constructor(e,n,r){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=e,this.epoch=n,this.custodian=r}}Bm=hi;hi.default=new Bm(0,0,J.default);class aw{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(xt))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:n,lockup:r}=ke(xt.Initialize,e.data);return{stakePubkey:e.keys[0].pubkey,authorized:new Cm(new J(n.staker),new J(n.withdrawer)),lockup:new hi(r.unixTimestamp,r.epoch,new J(r.custodian))}}static decodeDelegate(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,6),ke(xt.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:n,stakeAuthorizationType:r}=ke(xt.Authorize,e.data),s={stakePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey,newAuthorizedPubkey:new J(n),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:n,stakeAuthorizationType:r,authoritySeed:s,authorityOwner:i}=ke(xt.AuthorizeWithSeed,e.data),o={stakePubkey:e.keys[0].pubkey,authorityBase:e.keys[1].pubkey,authoritySeed:s,authorityOwner:new J(i),newAuthorizedPubkey:new J(n),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:n}=ke(xt.Split,e.data);return{stakePubkey:e.keys[0].pubkey,splitStakePubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[2].pubkey,lamports:n}}static decodeMerge(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),ke(xt.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:n}=ke(xt.Withdraw,e.data),r={stakePubkey:e.keys[0].pubkey,toPubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey,lamports:n};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),ke(xt.Deactivate,e.data),{stakePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey}}static checkProgramId(e){if(!e.equals(Jo.programId))throw new Error("invalid instruction; programId is not StakeProgram")}static checkKeyLength(e,n){if(e.length<n)throw new Error(`invalid instruction; found ${e.length} keys, expected at least ${n}`)}}const xt=Object.freeze({Initialize:{index:0,layout:exports.struct([exports.u32("instruction"),u4(),f4()])},Authorize:{index:1,layout:exports.struct([exports.u32("instruction"),we("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"),we("newAuthorized"),exports.u32("stakeAuthorizationType"),Er("authoritySeed"),we("authorityOwner")])}}),cw=Object.freeze({Staker:{index:0},Withdrawer:{index:1}});class Jo{constructor(){}static initialize(e){const{stakePubkey:n,authorized:r,lockup:s}=e,i=s||hi.default,o=xt.Initialize,a=Ee(o,{authorized:{staker:ge(r.staker.toBuffer()),withdrawer:ge(r.withdrawer.toBuffer())},lockup:{unixTimestamp:i.unixTimestamp,epoch:i.epoch,custodian:ge(i.custodian.toBuffer())}}),l={keys:[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:Ir,isSigner:!1,isWritable:!1}],programId:this.programId,data:a};return new Ie(l)}static createAccountWithSeed(e){const n=new Ce;n.add(Et.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 n.add(this.initialize({stakePubkey:r,authorized:s,lockup:i}))}static createAccount(e){const n=new Ce;n.add(Et.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 n.add(this.initialize({stakePubkey:r,authorized:s,lockup:i}))}static delegate(e){const{stakePubkey:n,authorizedPubkey:r,votePubkey:s}=e,i=xt.Delegate,o=Ee(i);return new Ce().add({keys:[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!1},{pubkey:un,isSigner:!1,isWritable:!1},{pubkey:zi,isSigner:!1,isWritable:!1},{pubkey:xm,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:o})}static authorize(e){const{stakePubkey:n,authorizedPubkey:r,newAuthorizedPubkey:s,stakeAuthorizationType:i,custodianPubkey:o}=e,a=xt.Authorize,l=Ee(a,{newAuthorized:ge(s.toBuffer()),stakeAuthorizationType:i.index}),f=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:un,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}];return o&&f.push({pubkey:o,isSigner:!0,isWritable:!1}),new Ce().add({keys:f,programId:this.programId,data:l})}static authorizeWithSeed(e){const{stakePubkey:n,authorityBase:r,authoritySeed:s,authorityOwner:i,newAuthorizedPubkey:o,stakeAuthorizationType:a,custodianPubkey:l}=e,f=xt.AuthorizeWithSeed,m=Ee(f,{newAuthorized:ge(o.toBuffer()),stakeAuthorizationType:a.index,authoritySeed:s,authorityOwner:ge(i.toBuffer())}),p=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1},{pubkey:un,isSigner:!1,isWritable:!1}];return l&&p.push({pubkey:l,isSigner:!0,isWritable:!1}),new Ce().add({keys:p,programId:this.programId,data:m})}static splitInstruction(e){const{stakePubkey:n,authorizedPubkey:r,splitStakePubkey:s,lamports:i}=e,o=xt.Split,a=Ee(o,{lamports:i});return new Ie({keys:[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:a})}static split(e,n){const r=new Ce;return r.add(Et.createAccount({fromPubkey:e.authorizedPubkey,newAccountPubkey:e.splitStakePubkey,lamports:n,space:this.space,programId:this.programId})),r.add(this.splitInstruction(e))}static splitWithSeed(e,n){const{stakePubkey:r,authorizedPubkey:s,splitStakePubkey:i,basePubkey:o,seed:a,lamports:l}=e,f=new Ce;return f.add(Et.allocate({accountPubkey:i,basePubkey:o,seed:a,space:this.space,programId:this.programId})),n&&n>0&&f.add(Et.transfer({fromPubkey:e.authorizedPubkey,toPubkey:i,lamports:n})),f.add(this.splitInstruction({stakePubkey:r,authorizedPubkey:s,splitStakePubkey:i,lamports:l}))}static merge(e){const{stakePubkey:n,sourceStakePubKey:r,authorizedPubkey:s}=e,i=xt.Merge,o=Ee(i);return new Ce().add({keys:[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:un,isSigner:!1,isWritable:!1},{pubkey:zi,isSigner:!1,isWritable:!1},{pubkey:s,isSigner:!0,isWritable:!1}],programId:this.programId,data:o})}static withdraw(e){const{stakePubkey:n,authorizedPubkey:r,toPubkey:s,lamports:i,custodianPubkey:o}=e,a=xt.Withdraw,l=Ee(a,{lamports:i}),f=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:un,isSigner:!1,isWritable:!1},{pubkey:zi,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return o&&f.push({pubkey:o,isSigner:!0,isWritable:!1}),new Ce().add({keys:f,programId:this.programId,data:l})}static deactivate(e){const{stakePubkey:n,authorizedPubkey:r}=e,s=xt.Deactivate,i=Ee(s);return new Ce().add({keys:[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:un,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:i})}}Jo.programId=new J("Stake11111111111111111111111111111111111111");Jo.space=200;class Sm{constructor(e,n,r,s){this.nodePubkey=void 0,this.authorizedVoter=void 0,this.authorizedWithdrawer=void 0,this.commission=void 0,this.nodePubkey=e,this.authorizedVoter=n,this.authorizedWithdrawer=r,this.commission=s}}class lw{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(vn))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:n}=ke(vn.InitializeAccount,e.data);return{votePubkey:e.keys[0].pubkey,nodePubkey:e.keys[3].pubkey,voteInit:new Sm(new J(n.nodePubkey),new J(n.authorizedVoter),new J(n.authorizedWithdrawer),n.commission)}}static decodeAuthorize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{newAuthorized:n,voteAuthorizationType:r}=ke(vn.Authorize,e.data);return{votePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey,newAuthorizedPubkey:new J(n),voteAuthorizationType:{index:r}}}static decodeAuthorizeWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{voteAuthorizeWithSeedArgs:{currentAuthorityDerivedKeyOwnerPubkey:n,currentAuthorityDerivedKeySeed:r,newAuthorized:s,voteAuthorizationType:i}}=ke(vn.AuthorizeWithSeed,e.data);return{currentAuthorityDerivedKeyBasePubkey:e.keys[2].pubkey,currentAuthorityDerivedKeyOwnerPubkey:new J(n),currentAuthorityDerivedKeySeed:r,newAuthorizedPubkey:new J(s),voteAuthorizationType:{index:i},votePubkey:e.keys[0].pubkey}}static decodeWithdraw(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{lamports:n}=ke(vn.Withdraw,e.data);return{votePubkey:e.keys[0].pubkey,authorizedWithdrawerPubkey:e.keys[2].pubkey,lamports:n,toPubkey:e.keys[1].pubkey}}static checkProgramId(e){if(!e.equals(Bs.programId))throw new Error("invalid instruction; programId is not VoteProgram")}static checkKeyLength(e,n){if(e.length<n)throw new Error(`invalid instruction; found ${e.length} keys, expected at least ${n}`)}}const vn=Object.freeze({InitializeAccount:{index:0,layout:exports.struct([exports.u32("instruction"),h4()])},Authorize:{index:1,layout:exports.struct([exports.u32("instruction"),we("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"),m4()])}}),dw=Object.freeze({Voter:{index:0},Withdrawer:{index:1}});class Bs{constructor(){}static initializeAccount(e){const{votePubkey:n,nodePubkey:r,voteInit:s}=e,i=vn.InitializeAccount,o=Ee(i,{voteInit:{nodePubkey:ge(s.nodePubkey.toBuffer()),authorizedVoter:ge(s.authorizedVoter.toBuffer()),authorizedWithdrawer:ge(s.authorizedWithdrawer.toBuffer()),commission:s.commission}}),a={keys:[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:Ir,isSigner:!1,isWritable:!1},{pubkey:un,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:o};return new Ie(a)}static createAccount(e){const n=new Ce;return n.add(Et.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.votePubkey,lamports:e.lamports,space:this.space,programId:this.programId})),n.add(this.initializeAccount({votePubkey:e.votePubkey,nodePubkey:e.voteInit.nodePubkey,voteInit:e.voteInit}))}static authorize(e){const{votePubkey:n,authorizedPubkey:r,newAuthorizedPubkey:s,voteAuthorizationType:i}=e,o=vn.Authorize,a=Ee(o,{newAuthorized:ge(s.toBuffer()),voteAuthorizationType:i.index}),l=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:un,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return new Ce().add({keys:l,programId:this.programId,data:a})}static authorizeWithSeed(e){const{currentAuthorityDerivedKeyBasePubkey:n,currentAuthorityDerivedKeyOwnerPubkey:r,currentAuthorityDerivedKeySeed:s,newAuthorizedPubkey:i,voteAuthorizationType:o,votePubkey:a}=e,l=vn.AuthorizeWithSeed,f=Ee(l,{voteAuthorizeWithSeedArgs:{currentAuthorityDerivedKeyOwnerPubkey:ge(r.toBuffer()),currentAuthorityDerivedKeySeed:s,newAuthorized:ge(i.toBuffer()),voteAuthorizationType:o.index}}),m=[{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:un,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}];return new Ce().add({keys:m,programId:this.programId,data:f})}static withdraw(e){const{votePubkey:n,authorizedWithdrawerPubkey:r,lamports:s,toPubkey:i}=e,o=vn.Withdraw,a=Ee(o,{lamports:s}),l=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}];return new Ce().add({keys:l,programId:this.programId,data:a})}static safeWithdraw(e,n,r){if(e.lamports>n-r)throw new Error("Withdraw will leave vote account with insufficient funds.");return Bs.withdraw(e)}static updateValidatorIdentity(e){const{votePubkey:n,authorizedWithdrawerPubkey:r,nodePubkey:s}=e,i=vn.UpdateValidatorIdentity,o=Ee(i),a=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!0,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return new Ce().add({keys:a,programId:this.programId,data:o})}}Bs.programId=new J("Vote111111111111111111111111111111111111111");Bs.space=3762;const Dm=new J("Va1idator1nfo111111111111111111111111111111"),uw=X({name:Q(),website:ce(Q()),details:ce(Q()),iconUrl:ce(Q()),keybaseUsername:ce(Q())});class $l{constructor(e,n){this.key=void 0,this.info=void 0,this.key=e,this.info=n}static fromConfigData(e){let n=[...e];if(qt(n)!==2)return null;const s=[];for(let i=0;i<2;i++){const o=new J(Kt(n,0,Tn)),a=Sn(n)===1;s.push({publicKey:o,isSigner:a})}if(s[0].publicKey.equals(Dm)&&s[1].isSigner){const i=Er().decode(ae.Buffer.from(n)),o=JSON.parse(i);return $h(o,uw),new $l(s[1].publicKey,o)}return null}}const fw=new J("Vote111111111111111111111111111111111111111"),hw=exports.struct([we("nodePubkey"),we("authorizedWithdrawer"),exports.u8("commission"),vt(),exports.seq(exports.struct([vt("slot"),exports.u32("confirmationCount")]),sr(exports.u32(),-8),"votes"),exports.u8("rootSlotValid"),vt("rootSlot"),vt(),exports.seq(exports.struct([vt("epoch"),we("authorizedVoter")]),sr(exports.u32(),-8),"authorizedVoters"),exports.struct([exports.seq(exports.struct([we("authorizedPubkey"),vt("epochOfLastAuthorizedSwitch"),vt("targetEpoch")]),32,"buf"),vt("idx"),exports.u8("isEmpty")],"priorVoters"),vt(),exports.seq(exports.struct([vt("epoch"),vt("credits"),vt("prevCredits")]),sr(exports.u32(),-8),"epochCredits"),exports.struct([vt("slot"),vt("timestamp")],"lastTimestamp")]);class jl{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=hw.decode(ge(e),4);let s=r.rootSlot;return r.rootSlotValid||(s=null),new jl({nodePubkey:new J(r.nodePubkey),authorizedWithdrawer:new J(r.authorizedWithdrawer),commission:r.commission,votes:r.votes,rootSlot:s,authorizedVoters:r.authorizedVoters.map(mw),priorVoters:bw(r.priorVoters),epochCredits:r.epochCredits,lastTimestamp:r.lastTimestamp})}}function mw({authorizedVoter:t,epoch:e}){return{epoch:e,authorizedVoter:new J(t)}}function Mu({authorizedPubkey:t,epochOfLastAuthorizedSwitch:e,targetEpoch:n}){return{authorizedPubkey:new J(t),epochOfLastAuthorizedSwitch:e,targetEpoch:n}}function bw({buf:t,idx:e,isEmpty:n}){return n?[]:[...t.slice(e+1).map(Mu),...t.slice(0,e).map(Mu)]}const Ru={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 vm(t,e){const n=e===!1?"http":"https";if(!t)return Ru[n].devnet;const r=Ru[n][t];if(!r)throw new Error(`Unknown ${n} cluster: ${t}`);return r}async function pw(t,e,n,r){let s,i;n&&Object.prototype.hasOwnProperty.call(n,"lastValidBlockHeight")||n&&Object.prototype.hasOwnProperty.call(n,"nonceValue")?(s=n,i=r):i=n;const o=i&&{skipPreflight:i.skipPreflight,preflightCommitment:i.preflightCommitment||i.commitment,minContextSlot:i.minContextSlot},a=await t.sendRawTransaction(e,o),l=i&&i.commitment,m=(await(s?t.confirmTransaction(s,l):t.confirmTransaction(a,l))).value;if(m.err)throw a!=null?new os({action:o!=null&&o.skipPreflight?"send":"simulate",signature:a,transactionMessage:`Status: (${JSON.stringify(m)})`}):new Error(`Raw transaction ${a} failed (${JSON.stringify(m)})`);return a}const km=1e9,yw=Object.freeze(Object.defineProperty({__proto__:null,Account:c4,AddressLookupTableAccount:lo,AddressLookupTableInstruction:nw,AddressLookupTableProgram:Yo,Authorized:Cm,BLOCKHASH_CACHE_TIMEOUT_MS:um,BPF_LOADER_DEPRECATED_PROGRAM_ID:l4,BPF_LOADER_PROGRAM_ID:k4,BpfLoader:F4,COMPUTE_BUDGET_INSTRUCTION_LAYOUTS:Dn,ComputeBudgetInstruction:rw,ComputeBudgetProgram:Xo,Connection:Am,Ed25519Program:Zo,Enum:o4,EpochSchedule:lm,FeeCalculatorLayout:am,Keypair:Cr,LAMPORTS_PER_SOL:km,LOOKUP_TABLE_INSTRUCTION_LAYOUTS:qn,Loader:Ur,Lockup:hi,MAX_SEED_LENGTH:nm,Message:cn,MessageAccountKeys:Xs,MessageV0:ar,NONCE_ACCOUNT_LENGTH:vc,NonceAccount:jo,PACKET_DATA_SIZE:ir,PUBLIC_KEY_LENGTH:Tn,PublicKey:J,SIGNATURE_LENGTH_IN_BYTES:Ys,SOLANA_SCHEMA:Ws,STAKE_CONFIG_ID:xm,STAKE_INSTRUCTION_LAYOUTS:xt,SYSTEM_INSTRUCTION_LAYOUTS:Me,SYSVAR_CLOCK_PUBKEY:un,SYSVAR_EPOCH_SCHEDULE_PUBKEY:w4,SYSVAR_INSTRUCTIONS_PUBKEY:om,SYSVAR_RECENT_BLOCKHASHES_PUBKEY:Ni,SYSVAR_RENT_PUBKEY:Ir,SYSVAR_REWARDS_PUBKEY:E4,SYSVAR_SLOT_HASHES_PUBKEY:A4,SYSVAR_SLOT_HISTORY_PUBKEY:B4,SYSVAR_STAKE_HISTORY_PUBKEY:zi,Secp256k1Program:Sr,SendTransactionError:os,SolanaJSONRPCError:oe,SolanaJSONRPCErrorCode:x4,StakeAuthorizationLayout:cw,StakeInstruction:aw,StakeProgram:Jo,Struct:Ol,SystemInstruction:D4,SystemProgram:Et,Transaction:Ce,TransactionExpiredBlockheightExceededError:Ho,TransactionExpiredNonceInvalidError:Gr,TransactionExpiredTimeoutError:Nl,TransactionInstruction:Ie,TransactionMessage:Ko,TransactionStatus:On,VALIDATOR_INFO_KEY:Dm,VERSION_PREFIX_MASK:zo,VOTE_PROGRAM_ID:fw,ValidatorInfo:$l,VersionedMessage:zl,VersionedTransaction:$o,VoteAccount:jl,VoteAuthorizationLayout:dw,VoteInit:Sm,VoteInstruction:lw,VoteProgram:Bs,clusterApiUrl:vm,sendAndConfirmRawTransaction:pw,sendAndConfirmTransaction:Dc},Symbol.toStringTag,{value:"Module"})),Vl="Solana",gw="11111111111111111111111111111111",mr=class mr{constructor(e){ie(this,"type","Native");ie(this,"address");mr.instanceof(e)?this.address=e.address:St.instanceof(e)?this.address=new J(e.toUint8Array()):typeof e=="string"&&At.valid(e)?this.address=new J(At.decode(e)):this.address=new J(e)}unwrap(){return this.address}toString(){return this.address.toBase58()}toUint8Array(){return new Uint8Array(this.address.toBytes())}toNative(){return this}toUniversalAddress(){return new St(this.toUint8Array())}static instanceof(e){return e.constructor.platform===mr.platform}equals(e){return mr.instanceof(e)?e.unwrap().equals(this.unwrap()):this.toUniversalAddress().equals(e)}};ie(mr,"byteSize",32),ie(mr,"platform",Vl);let fo=mr;tl(Vl,fo);exports.AddressLookupTableAccount=lo;exports.AddressLookupTableProgram=Yo;exports.AutomaticRoute=V0;exports.BN=Ac;exports.CircleTransfer=Bt;exports.ComputeBudgetProgram=Xo;exports.Connection=Am;exports.DEFAULT_TASK_TIMEOUT=Cn;exports.ErrNotWrapped=hy;exports.EventEmitter=Pl;exports.EvmAddress=to;exports.EvmZeroAddress=G8;exports.Field=_r;exports.FinalizableRoute=P2;exports.FpInvertBatch=Zc;exports.FpLegendre=ic;exports.FpPow=qf;exports.Hash=rh;exports.Hash$1=Bo;exports.HashMD=$c;exports.Keypair=Cr;exports.LAMPORTS_PER_SOL=km;exports.ManualRoute=wc;exports.Message=cn;exports.MessageV0=ar;exports.MinAmountError=g2;exports.PlatformContext=Kp;exports.PlatformNativeSigner=Qp;exports.PublicKey=J;exports.RelayFailedError=hl;exports.Route=Mo;exports.RouteResolver=j0;exports.RpcClient=Qh;exports.SYSVAR_CLOCK_PUBKEY=un;exports.SYSVAR_INSTRUCTIONS_PUBKEY=om;exports.SYSVAR_RENT_PUBKEY=Ir;exports.Secp256k1Program=Sr;exports.SendTransactionError=os;exports.SolanaAddress=fo;exports.SolanaZeroAddress=gw;exports.SystemProgram=Et;exports.TokenTransfer=Ye;exports.Transaction=Ce;exports.TransactionExpiredBlockheightExceededError=Ho;exports.TransactionInstruction=Ie;exports.TransactionMessage=Ko;exports.UnavailableError=w2;exports.UniversalAddress=St;exports.VersionedTransaction=$o;exports.Wormhole=sn;exports._platform=xl;exports._platform$1=Vl;exports._validateObject=ms;exports.abytes=Vt;exports.add=wn;exports.add3H=Df;exports.add3L=Sf;exports.addChainId=V8;exports.addFixedValues=t1;exports.addFrom=j8;exports.aexists=kr;exports.ahash=gf;exports.amountItem=qe;exports.anumber=ts;exports.aoutput=Hc;exports.applyChainsConfigConfigOverrides=u2;exports.assert=Un;exports.assertArgument=tr;exports.assertArgumentCount=H2;exports.assertNormalize=K2;exports.assertPrivate=$2;exports.asyncLoop=s8;exports.axios=Be;exports.b58=ef;exports.b64=wo;exports.base58=Vi;exports.bech32=Ju;exports.bignum=Us;exports.bitGet=zb;exports.bitLen=Lf;exports.bitMask=si;exports.bnExports=yl;exports.bound=jm;exports.browserExports=zu;exports.bs58=Ct;exports.bufferPolyfill=ae;exports.bytes=Lt;exports.bytes$1=wl;exports.bytesToHex=Fr;exports.bytesToNumberBE=ri;exports.canonicalAddress=In;exports.chainIdToChain=Gi;exports.chainItem=zt;exports.chainToChainId=ei;exports.chainToPlatform=hn;exports.checkOpts=c8;exports.checkOpts$1=cb;exports.circleChainId=uf;exports.circleContractChains=J1;exports.circleContracts=rc;exports.circleDomainItem=rs;exports.circleNonceItem=So;exports.clean=$n;exports.clusterApiUrl=vm;exports.commonjsGlobal=an;exports.concat=G2;exports.concatBytes=o8;exports.concatBytes$1=kn;exports.constMap=fe;exports.createBase58check=y1;exports.createHasher=ni;exports.createOptHasher=lb;exports.createView=e8;exports.createView$1=Ri;exports.customizableBytes=bo;exports.dataLength=Y2;exports.dataSlice=X2;exports.dateConversion=i0;exports.decomposeLiteral=a0;exports.defineProperties=Bc;exports.deliveryInstructionLayout=g0;exports.denoise=a1;exports.deserialize=Zr;exports.deserialize$1=pn;exports.display=po;exports.dist=Ne;exports.ed25519=Mr;exports.ensureBytes=Ze;exports.envelopeLayout=il;exports.estimateFinalityTime=Lc;exports.executorTokenBridge=nc;exports.executorTokenBridgeChains=Z1;exports.exists=xc;exports.expiration=Ls;exports.filters=fs;exports.fixedChainItem=Wp;exports.fixedLengthStringItem=rl;exports.fromBaseUnits=zn;exports.fromBig=xf;exports.getAddress=xr;exports.getAugmentedNamespace=Ic;exports.getBytes=Wr;exports.getBytesCopy=j2;exports.getDefaultExportFromCjs=Js;exports.getMinHashLength=Jc;exports.getTokenByAddress=Gp;exports.getTokenDetails=M2;exports.guardianAttestationEta=zc;exports.guardianSetItem=nl;exports.hash=Q2;exports.headerLayout=sl;exports.hex=At;exports.hexToBytes=Ao;exports.hexlify=ci;exports.hmac=Gc;exports.index_browser_esm=yw;exports.isAddressable=yh;exports.isAttested=Jr;exports.isAutomatic=R2;exports.isBytes=Eo;exports.isBytesLike=V2;exports.isCallException=z2;exports.isChain=ti;exports.isCompleted=B2;exports.isDestinationQueued=A2;exports.isEqualCaseInsensitive=rf;exports.isError=X0;exports.isFailed=K0;exports.isFinalizable=L2;exports.isHash=qb;exports.isHexString=gl;exports.isManual=W2;exports.isNative=Pt;exports.isRedeemed=bl;exports.isRefunded=E2;exports.isSameToken=l0;exports.isSignAndSendSigner=cl;exports.isSignOnlySigner=f0;exports.isSourceFinalized=js;exports.isSourceInitiated=ml;exports.isTokenId=ko;exports.isVersionedProtocolInitializer=Ip;exports.isWormholeMessageId=Ar;exports.kdfInputToBytes=ab;exports.keccak256=ys;exports.keccak_256=Ns;exports.makeError=Z0;exports.mapHashToField=$f;exports.median=Hm;exports.memoized=Hs;exports.mod=Je;exports.nativeDecimals=af;exports.nativeTokenId=al;exports.networkChainToNativeChainId=df;exports.networkPlatformConfigs=q0;exports.normalizeZ=Qc;exports.notImplemented=Kb;exports.number=Vs;exports.output=eh;exports.parse=Ti;exports.payloadIdItem=Vn;exports.payloadLiteralToPayloadItemLayout=c0;exports.platformNativeChainIdToNetworkChain=_1;exports.porticoContractChains=Q1;exports.protocolIsRegistered=_p;exports.randomBytes=l8;exports.randomBytes$1=Kc;exports.registerNative=tl;exports.registerPayloadTypes=gt;exports.registerProtocol=Up;exports.relayInstructionsLayout=E0;exports.resolveAddress=q8;exports.resolveProperties=N2;exports.resolveWrappedToken=d0;exports.retry=Rr;exports.rotl=rb;exports.rotr=t8;exports.rotr32H=hb;exports.rotr32L=mb;exports.rotrBH=Fs;exports.rotrBL=Ts;exports.rotrSH=cr;exports.rotrSL=lr;exports.rpcAddress=cf;exports.safeBufferExports=G0;exports.scale=Kr;exports.secp256k1=Qn;exports.sequenceItem=Do;exports.serialize=bn;exports.serialize$1=Wi;exports.serializePayload=Hp;exports.sha256=Yi;exports.sha256$1=jc;exports.sha3_256=Lb;exports.sha512=Ob;exports.sha512$1=Vc;exports.signSendWait=$s;exports.signatureItem=Ji;exports.signedQuoteLayout=A0;exports.stringConversion=o0;exports.supportsIndexerUtils=qp;exports.swap32IfBE=sc;exports.swap8IfBE=sb;exports.tbtc=Mi;exports.toBigIntLE_1=Kh;exports.toBufferLE_1=_l;exports.toBytes=El;exports.toBytes$1=hs;exports.toChain=us;exports.toChainId=fn;exports.toCircleChain=_i;exports.toNative=or;exports.toUniversal=n0;exports.tokenBridgeChains=Y1;exports.tokenBridgeRelayerChains=X1;exports.truncate=Ii;exports.u32$1=nh;exports.u32$2=wf;exports.u64=D8;exports.units=kt;exports.universalAddress=Zp;exports.universalAddressItem=me;exports.unusedArbiterFee=$8;exports.unusedNonce=K8;exports.usdcContract=_s;exports.utf8ToBytes=qc;exports.version=Y0;exports.weierstrass=t0;exports.weierstrassPoints=ip;exports.whole=Is;exports.wrapConstructor=sh;exports.zeroPadBytes=J2;exports.zeroPadValue=Z2;