@wormhole-foundation/wormhole-connect 3.0.2-beta.0-development → 3.0.2-beta.1-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 (290) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/{basic-ChNCp6rI.js → basic-PUjrTVXb.js} +1 -1
  3. package/dist/assets/{evm-DSirgd5b.js → evm-CO5UWnAY.js} +2 -2
  4. package/dist/assets/{index-L-lC4rqb.js → index-1lzfHdT2.js} +1 -1
  5. package/dist/assets/{index-CHfaLf5J.js → index-DBVZDYF7.js} +1 -1
  6. package/dist/assets/index-DKlPX3ZI.js +1 -0
  7. package/dist/assets/{index-BtCrMDAu.js → index-Ddk7n7Ti.js} +1 -1
  8. package/dist/assets/{index-HhyysXFu.js → index-DyUmO4PR.js} +1 -1
  9. package/dist/assets/{index-BiwA3Bbq.js → index-MMzKxP1N.js} +1 -1
  10. package/dist/assets/{secp256k1-Cd7rIav0.js → secp256k1-0LtSM2L1.js} +1 -1
  11. package/dist/assets/{secp256k1-BQBOR8e3.js → secp256k1-DwTU3j1N.js} +1 -1
  12. package/dist/assets/{solana-DcwLWeKT.js → solana-DlGdMBSL.js} +4 -4
  13. package/dist/assets/{w3m-modal-DdptuLHe.js → w3m-modal-DD9Jgepz.js} +1 -1
  14. package/dist/main.js +72 -70
  15. package/dist/src/AppRouter.d.ts.map +1 -1
  16. package/dist/src/config/mainnet/tokens.d.ts.map +1 -1
  17. package/dist/src/config/testnet/tokens.d.ts.map +1 -1
  18. package/dist/src/config/tokens.d.ts +1 -1
  19. package/dist/src/config/tokens.d.ts.map +1 -1
  20. package/dist/src/exports/index.d.ts +2 -2
  21. package/dist/src/exports/index.d.ts.map +1 -1
  22. package/dist/src/hooks/useFetchQuotes.d.ts.map +1 -1
  23. package/dist/src/icons/Chains/PLUME.d.ts.map +1 -1
  24. package/dist/src/icons/PoweredBy.d.ts.map +1 -1
  25. package/dist/src/icons/Routing.d.ts +5 -0
  26. package/dist/src/icons/Routing.d.ts.map +1 -0
  27. package/dist/src/icons/Tokens/PLUME.d.ts.map +1 -1
  28. package/dist/src/store/transferInput.d.ts +1 -1
  29. package/dist/src/store/transferInput.d.ts.map +1 -1
  30. package/dist/src/utils/coingecko.d.ts.map +1 -1
  31. package/dist/src/utils/formatNumber.d.ts +23 -0
  32. package/dist/src/utils/formatNumber.d.ts.map +1 -0
  33. package/dist/src/utils/index.d.ts +3 -1
  34. package/dist/src/utils/index.d.ts.map +1 -1
  35. package/dist/src/utils/routes.d.ts +12 -0
  36. package/dist/src/utils/routes.d.ts.map +1 -0
  37. package/dist/src/views/v2/Bridge/AmountInput/index.d.ts.map +1 -1
  38. package/dist/src/views/v2/Bridge/AssetPicker/TokenItem.d.ts.map +1 -1
  39. package/dist/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
  40. package/dist/src/views/v2/Redeem/TransactionDetails/index.d.ts.map +1 -1
  41. package/dist/src/views/v3/Bridge/AmountInput/index.d.ts.map +1 -1
  42. package/dist/src/views/v3/Bridge/AssetPicker/TokenItem.d.ts.map +1 -1
  43. package/dist/src/views/v3/Bridge/AssetPicker/index.d.ts.map +1 -1
  44. package/dist/src/views/v3/Bridge/GasSlider/index.d.ts.map +1 -1
  45. package/dist/src/views/v3/Bridge/Routes/Eta.d.ts +6 -0
  46. package/dist/src/views/v3/Bridge/Routes/Eta.d.ts.map +1 -0
  47. package/dist/src/views/v3/Bridge/Routes/RouteBadge.d.ts.map +1 -1
  48. package/dist/src/views/v3/Bridge/Routes/RoutesBottomSheet.d.ts +7 -6
  49. package/dist/src/views/v3/Bridge/Routes/RoutesBottomSheet.d.ts.map +1 -1
  50. package/dist/src/views/v3/Bridge/Routes/RoutesLink.d.ts +7 -0
  51. package/dist/src/views/v3/Bridge/Routes/RoutesLink.d.ts.map +1 -0
  52. package/dist/src/views/v3/Bridge/Routes/RoutesList.d.ts +2 -1
  53. package/dist/src/views/v3/Bridge/Routes/RoutesList.d.ts.map +1 -1
  54. package/dist/src/views/v3/Bridge/Routes/RoutesLoader.d.ts +4 -0
  55. package/dist/src/views/v3/Bridge/Routes/RoutesLoader.d.ts.map +1 -0
  56. package/dist/src/views/v3/Bridge/Routes/RoutesModal.d.ts +6 -5
  57. package/dist/src/views/v3/Bridge/Routes/RoutesModal.d.ts.map +1 -1
  58. package/dist/src/views/v3/Bridge/Routes/SingleRoute.d.ts +1 -0
  59. package/dist/src/views/v3/Bridge/Routes/SingleRoute.d.ts.map +1 -1
  60. package/dist/src/views/v3/Bridge/Routes/index.d.ts.map +1 -1
  61. package/dist/src/views/v3/Redeem/TransactionDetails/index.d.ts.map +1 -1
  62. package/lib/account-Br8E7RB6.js +1 -0
  63. package/lib/{account-BTK2b2Fv.mjs → account-CVa_3S2g.mjs} +1 -1
  64. package/lib/{address-8wLqn60W.mjs → address-BApwdEpr.mjs} +96 -96
  65. package/lib/address-BwQqFkyh.js +1 -0
  66. package/lib/address-C2pxq9b2.js +1 -0
  67. package/lib/{address-n0gAFMrZ.mjs → address-f6joE_ig.mjs} +12 -12
  68. package/lib/aptos-CMRGggVs.js +2 -0
  69. package/lib/{aptos-CK-j196x.js → aptos-CTKQNmlP.js} +1 -1
  70. package/lib/{aptos-B-DJQlwt.mjs → aptos-CfFbx7uf.mjs} +9 -9
  71. package/lib/{aptos-Bwcz9wZX.mjs → aptos-fozuppXh.mjs} +3 -3
  72. package/lib/{basic-DHWVLmCq.mjs → basic-BA2aRJJn.mjs} +2 -2
  73. package/lib/{basic-B5ZFelC_.js → basic-DUWaF2I0.js} +1 -1
  74. package/lib/{basic-E2M-9h1u.js → basic-DeiUayOA.js} +1 -1
  75. package/lib/{basic-Pour9Ggp.mjs → basic-DoC8u7J8.mjs} +2 -2
  76. package/lib/{blake2b-C5HyObld.mjs → blake2b-BGxWUAjG.mjs} +23 -23
  77. package/lib/blake2b-Fj1aPKgL.js +1 -0
  78. package/lib/{browser-ponyfill-jK8MKVVg.mjs → browser-ponyfill-D5AN8ZPp.mjs} +1 -1
  79. package/lib/browser-ponyfill-Dn6gsMYK.js +2 -0
  80. package/lib/{chain-Bm6u6eUF.mjs → chain-DAw2I5H8.mjs} +1 -1
  81. package/lib/chain-DnPXlO8g.js +1 -0
  82. package/lib/chunk-KJH4KKG6-BjF7YUcU.js +470 -0
  83. package/lib/{chunk-KJH4KKG6-DJsu-Y-X.mjs → chunk-KJH4KKG6-DmVjhXO7.mjs} +144 -144
  84. package/lib/{constants-Cf2YMjNo.js → constants-BtNs_2F4.js} +1 -1
  85. package/lib/{constants-B7AbX6qr.mjs → constants-Dcc2nVaW.mjs} +3 -3
  86. package/lib/contract-BEHYQLvJ.js +1 -0
  87. package/lib/{contract-llnN6ki0.mjs → contract-BkMAZomO.mjs} +123 -123
  88. package/lib/{core-CF5c7Vev.mjs → core-BHV42Qa0.mjs} +25 -26
  89. package/lib/core-CV23yxnG.js +889 -0
  90. package/lib/create-CHcGblj6.js +1 -0
  91. package/lib/{create-Dm87_0zG.mjs → create-CKLtL7hr.mjs} +1 -1
  92. package/lib/{evm-BYIGg8e4.mjs → evm-Bf7qbM19.mjs} +42 -42
  93. package/lib/{evm-B2hUWkt7.js → evm-ClWkquRx.js} +2 -2
  94. package/lib/{evm-fvvpk-li.mjs → evm-DhMoy8cH.mjs} +6 -6
  95. package/lib/{evm-DFNbMHoa.js → evm-tXmzU9Xp.js} +2 -2
  96. package/lib/executor.js +1 -1
  97. package/lib/executor.mjs +145 -138
  98. package/lib/hosted.js +1 -1
  99. package/lib/hosted.mjs +1 -1
  100. package/lib/{index-Cwo5AKUC.mjs → index-1rCCpdwd.mjs} +5 -5
  101. package/lib/{index-DBCa3k0j.mjs → index-3HvzWPL7.mjs} +9 -9
  102. package/lib/{index-MOwE6ses.mjs → index-B7ztYPhr.mjs} +21 -22
  103. package/lib/index-BM-0SeYB.js +1 -0
  104. package/lib/{index-DiQ8Ytrt.mjs → index-BTnpftLz.mjs} +1 -1
  105. package/lib/{index-BiCMaXJS.js → index-BWQMi6Rj.js} +1 -1
  106. package/lib/index-BbgKw2pu.js +1 -0
  107. package/lib/index-BblcpkoK.js +1 -0
  108. package/lib/index-Bfblsmud.js +1 -0
  109. package/lib/{index-C_0yAOSX.mjs → index-BfkFXEnG.mjs} +25082 -24072
  110. package/lib/{index-fi1sh8vr.mjs → index-BijBPDRn.mjs} +2 -2
  111. package/lib/index-BoquY9R2.js +337 -0
  112. package/lib/index-C2NtsO9Q.js +1 -0
  113. package/lib/{index-CNuk-XLX.mjs → index-C4JmrizV.mjs} +4 -4
  114. package/lib/index-C8TtXpOf.js +1 -0
  115. package/lib/index-CB8kOyIP.js +1 -0
  116. package/lib/index-CInVjUCW.js +1 -0
  117. package/lib/{index-BF11RebI.mjs → index-CLTklDbp.mjs} +1 -1
  118. package/lib/index-CQvgeH_r.js +1 -0
  119. package/lib/{index-DzYjoSJp.mjs → index-CUnOYRFQ.mjs} +23 -24
  120. package/lib/{index-DGh9LzN1.mjs → index-CWe_BTdo.mjs} +31 -31
  121. package/lib/{index-2Bz1Np4K.mjs → index-CZ91lJ9M.mjs} +5 -5
  122. package/lib/{index-Dgy1FO7C.js → index-CgyVnj6U.js} +1 -1
  123. package/lib/{index-BzJcFdt_.mjs → index-Clr2JjoJ.mjs} +44 -44
  124. package/lib/index-CnnCCv6Q.js +1 -0
  125. package/lib/{index-CJnRWlFf.mjs → index-CwxGLNEk.mjs} +48 -49
  126. package/lib/index-D7BLfz05.js +1 -0
  127. package/lib/index-DM7C-wvQ.js +3 -0
  128. package/lib/{index-DhIh3xiW.mjs → index-DNy_sNGr.mjs} +8 -8
  129. package/lib/{index-BZaRg0yd.mjs → index-DVcaDWmz.mjs} +1 -1
  130. package/lib/{index-CsAigASU.mjs → index-DWOP9OBp.mjs} +17 -17
  131. package/lib/{index-CTLz8Fz0.mjs → index-Dda5qc2t.mjs} +13 -14
  132. package/lib/{index-CLBXF_zH.mjs → index-DeaiBvpG.mjs} +16 -16
  133. package/lib/index-HOuGP-7b.js +1 -0
  134. package/lib/{index-Dt2uNp-N.mjs → index-KZve3tYJ.mjs} +4 -4
  135. package/lib/{index-CJDBidKv.mjs → index-SIyXqCAN.mjs} +41 -41
  136. package/lib/index-WhVYPMUr.js +1 -0
  137. package/lib/index-hmjT4xa7.js +1 -0
  138. package/lib/index-ledagFNU.js +1 -0
  139. package/lib/index-pbRVlgcN.js +1 -0
  140. package/lib/{index-BpQXUhR4.mjs → index-qK7AyMAk.mjs} +23 -27
  141. package/lib/index-ttZu99PZ.js +1 -0
  142. package/lib/{index.es-BqRBGIq6.mjs → index.es-BXRQf6Oi.mjs} +25 -26
  143. package/lib/index.es-BjGaOok5.js +11 -0
  144. package/lib/index.es-D6S74vhi.js +27 -0
  145. package/lib/{index.es-DgCZuUzB.mjs → index.es-cOw8juwf.mjs} +741 -737
  146. package/lib/index.js +1 -1
  147. package/lib/index.mjs +17 -16
  148. package/lib/mayan.js +3 -3
  149. package/lib/mayan.mjs +918 -891
  150. package/lib/mint-CL36R6ED.js +1 -0
  151. package/lib/{mint-Dc-VsiAn.mjs → mint-DunEG1jV.mjs} +32 -33
  152. package/lib/ntt.js +1 -1
  153. package/lib/ntt.mjs +2332 -2373
  154. package/lib/platform-7vCWzCny.js +1 -0
  155. package/lib/platform-BKhoO9So.js +1 -0
  156. package/lib/{platform-B95L0Vxv.mjs → platform-BN6LFtXE.mjs} +16 -16
  157. package/lib/{platform-DnP_1wGA.mjs → platform-BYLu9SzP.mjs} +4 -4
  158. package/lib/platform-Bbe26nx7.js +1 -0
  159. package/lib/{platform-DiG7WY9Z.mjs → platform-DCgWqmh1.mjs} +4 -4
  160. package/lib/{provider-jsonrpc-CRABh2gN.mjs → provider-jsonrpc-Bmgnrmpy.mjs} +155 -155
  161. package/lib/provider-jsonrpc-CbtP2Ffg.js +1 -0
  162. package/lib/{secp256k1-zHHDNAlH.mjs → secp256k1-BDQEvyHq.mjs} +1 -1
  163. package/lib/{secp256k1-obBDPYM-.mjs → secp256k1-C77Oh9AA.mjs} +1 -1
  164. package/lib/{secp256k1-2hq3Jk4g.mjs → secp256k1-CCn2vlXj.mjs} +1 -1
  165. package/lib/{secp256k1-B94G4gyy.js → secp256k1-CHAR40au.js} +1 -1
  166. package/lib/{secp256k1-DCcAh19h.js → secp256k1-D-DmPYcJ.js} +1 -1
  167. package/lib/{secp256k1-CjndBUS7.js → secp256k1-DYWDlveU.js} +1 -1
  168. package/lib/{signer-N_ccpPOz.mjs → signer-BIcn81N5.mjs} +18 -18
  169. package/lib/signer-H7atraks.js +1 -0
  170. package/lib/{solana-_Ha4YgiP.mjs → solana-B0QSg7B3.mjs} +30 -30
  171. package/lib/solana-Cs5VyB20.js +900 -0
  172. package/lib/solana-uvHG8JV5.js +1 -0
  173. package/lib/solana-zyfOlbhb.mjs +18 -0
  174. package/lib/{solanaEmbed.esm-DK5RIquB.mjs → solanaEmbed.esm-BqdznDuW.mjs} +623 -622
  175. package/lib/solanaEmbed.esm-D8vtESE6.js +10 -0
  176. package/lib/src/AppRouter.d.ts.map +1 -1
  177. package/lib/src/config/mainnet/tokens.d.ts.map +1 -1
  178. package/lib/src/config/testnet/tokens.d.ts.map +1 -1
  179. package/lib/src/config/tokens.d.ts +1 -1
  180. package/lib/src/config/tokens.d.ts.map +1 -1
  181. package/lib/src/exports/index.d.ts +2 -2
  182. package/lib/src/exports/index.d.ts.map +1 -1
  183. package/lib/src/hooks/useFetchQuotes.d.ts.map +1 -1
  184. package/lib/src/icons/Chains/PLUME.d.ts.map +1 -1
  185. package/lib/src/icons/PoweredBy.d.ts.map +1 -1
  186. package/lib/src/icons/Routing.d.ts +5 -0
  187. package/lib/src/icons/Routing.d.ts.map +1 -0
  188. package/lib/src/icons/Tokens/PLUME.d.ts.map +1 -1
  189. package/lib/src/store/transferInput.d.ts +1 -1
  190. package/lib/src/store/transferInput.d.ts.map +1 -1
  191. package/lib/src/utils/coingecko.d.ts.map +1 -1
  192. package/lib/src/utils/formatNumber.d.ts +23 -0
  193. package/lib/src/utils/formatNumber.d.ts.map +1 -0
  194. package/lib/src/utils/index.d.ts +3 -1
  195. package/lib/src/utils/index.d.ts.map +1 -1
  196. package/lib/src/utils/routes.d.ts +12 -0
  197. package/lib/src/utils/routes.d.ts.map +1 -0
  198. package/lib/src/views/v2/Bridge/AmountInput/index.d.ts.map +1 -1
  199. package/lib/src/views/v2/Bridge/AssetPicker/TokenItem.d.ts.map +1 -1
  200. package/lib/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
  201. package/lib/src/views/v2/Redeem/TransactionDetails/index.d.ts.map +1 -1
  202. package/lib/src/views/v3/Bridge/AmountInput/index.d.ts.map +1 -1
  203. package/lib/src/views/v3/Bridge/AssetPicker/TokenItem.d.ts.map +1 -1
  204. package/lib/src/views/v3/Bridge/AssetPicker/index.d.ts.map +1 -1
  205. package/lib/src/views/v3/Bridge/GasSlider/index.d.ts.map +1 -1
  206. package/lib/src/views/v3/Bridge/Routes/Eta.d.ts +6 -0
  207. package/lib/src/views/v3/Bridge/Routes/Eta.d.ts.map +1 -0
  208. package/lib/src/views/v3/Bridge/Routes/RouteBadge.d.ts.map +1 -1
  209. package/lib/src/views/v3/Bridge/Routes/RoutesBottomSheet.d.ts +7 -6
  210. package/lib/src/views/v3/Bridge/Routes/RoutesBottomSheet.d.ts.map +1 -1
  211. package/lib/src/views/v3/Bridge/Routes/RoutesLink.d.ts +7 -0
  212. package/lib/src/views/v3/Bridge/Routes/RoutesLink.d.ts.map +1 -0
  213. package/lib/src/views/v3/Bridge/Routes/RoutesList.d.ts +2 -1
  214. package/lib/src/views/v3/Bridge/Routes/RoutesList.d.ts.map +1 -1
  215. package/lib/src/views/v3/Bridge/Routes/RoutesLoader.d.ts +4 -0
  216. package/lib/src/views/v3/Bridge/Routes/RoutesLoader.d.ts.map +1 -0
  217. package/lib/src/views/v3/Bridge/Routes/RoutesModal.d.ts +6 -5
  218. package/lib/src/views/v3/Bridge/Routes/RoutesModal.d.ts.map +1 -1
  219. package/lib/src/views/v3/Bridge/Routes/SingleRoute.d.ts +1 -0
  220. package/lib/src/views/v3/Bridge/Routes/SingleRoute.d.ts.map +1 -1
  221. package/lib/src/views/v3/Bridge/Routes/index.d.ts.map +1 -1
  222. package/lib/src/views/v3/Redeem/TransactionDetails/index.d.ts.map +1 -1
  223. package/lib/{sui-CQcQ6w_P.mjs → sui-B38DyOqM.mjs} +44 -44
  224. package/lib/{sui-BplKFZQu.mjs → sui-BpfnZR4f.mjs} +3 -3
  225. package/lib/sui-CT9MWY38.js +1 -0
  226. package/lib/{sui-_hvmCvD8.js → sui-DXQAMRQJ.js} +1 -1
  227. package/lib/{tokens-DNv0ZNvU.js → tokens-CmINcwKk.js} +31 -31
  228. package/lib/{tokens-Dl4YwW18.mjs → tokens-YxAPPVy3.mjs} +1726 -1724
  229. package/lib/transfer-BQ72fByU.js +1 -0
  230. package/lib/transfer-bTW0j9yh.mjs +58 -0
  231. package/lib/units-Ckije3Qv.js +1 -0
  232. package/lib/{units-DPWUSE6J.mjs → units-CtyvuzxQ.mjs} +13 -13
  233. package/lib/unsignedTransaction-C6Qp42VS.js +1 -0
  234. package/lib/{unsignedTransaction-DwcUilyN.mjs → unsignedTransaction-CXB-QCUC.mjs} +18 -18
  235. package/lib/{w3m-modal-BJILsxDp.mjs → w3m-modal-B7LUHLWC.mjs} +2 -2
  236. package/lib/{w3m-modal-D4CpFxO2.mjs → w3m-modal-BOTzBqbc.mjs} +2 -2
  237. package/lib/{w3m-modal-CrfHWSrF.js → w3m-modal-BTb03-7B.js} +1 -1
  238. package/lib/{w3m-modal-CBG2MSPp.js → w3m-modal-xmdf4r6V.js} +1 -1
  239. package/lib/web3-COTIsLs8.js +22 -0
  240. package/lib/{address-B-XN4tFw.mjs → web3-DYVeiqSa.mjs} +6599 -6576
  241. package/package.json +32 -32
  242. package/dist/assets/index-BWPgrXHs.js +0 -1
  243. package/lib/account-cRt2xMoW.js +0 -1
  244. package/lib/address-BGujeWtN.js +0 -22
  245. package/lib/address-C7DIAk4M.js +0 -1
  246. package/lib/address-KNhRm6oe.js +0 -1
  247. package/lib/aptos-f5TqmvqV.js +0 -2
  248. package/lib/blake2b-B-MRXUPb.js +0 -1
  249. package/lib/browser-ponyfill-CE6vRkjp.js +0 -2
  250. package/lib/chain-Hsn22HAP.js +0 -1
  251. package/lib/chunk-KJH4KKG6-CoyI75Ig.js +0 -470
  252. package/lib/contract-D2fTrJgn.js +0 -1
  253. package/lib/core-v0G9f7LX.js +0 -889
  254. package/lib/create-DoZZ7ciL.js +0 -1
  255. package/lib/index-B8-KKWD-.js +0 -1
  256. package/lib/index-BHbvgOMD.js +0 -1
  257. package/lib/index-BHfUgvSV.js +0 -1
  258. package/lib/index-BTKC7Hou.js +0 -1
  259. package/lib/index-BWXglAWd.js +0 -1
  260. package/lib/index-Bpp8C4u8.js +0 -1
  261. package/lib/index-CF2fHBHJ.js +0 -3
  262. package/lib/index-CTPz98nv.js +0 -1
  263. package/lib/index-ClMoiji-.js +0 -1
  264. package/lib/index-ClsVcH6F.js +0 -1
  265. package/lib/index-CqOI6LVu.js +0 -1
  266. package/lib/index-DCz_4mcz.js +0 -1
  267. package/lib/index-DKksdvND.js +0 -335
  268. package/lib/index-DRv3ZpVL.js +0 -1
  269. package/lib/index-DYqo8IhM.js +0 -1
  270. package/lib/index-DZubce9o.js +0 -1
  271. package/lib/index-DprM_IpB.js +0 -1
  272. package/lib/index-DshEQYMA.js +0 -1
  273. package/lib/index-JrM783SN.js +0 -1
  274. package/lib/index.es-C6YhioMN.js +0 -27
  275. package/lib/index.es-D3Xxxr8I.js +0 -11
  276. package/lib/mint-DlXC3sGi.js +0 -1
  277. package/lib/platform-B1XoDKoN.js +0 -1
  278. package/lib/platform-COuZC5Zc.js +0 -1
  279. package/lib/platform-NG3efAb2.js +0 -1
  280. package/lib/provider-jsonrpc-pXNHQF7n.js +0 -1
  281. package/lib/signer-CCa6npZ3.js +0 -1
  282. package/lib/solana-BJ3aReZw.mjs +0 -18
  283. package/lib/solana-BwyVgP30.js +0 -1
  284. package/lib/solana-CanFuMgA.js +0 -900
  285. package/lib/solanaEmbed.esm-C--1F7Lx.js +0 -10
  286. package/lib/sui-Bs83Gy5Z.js +0 -1
  287. package/lib/units-BvcKDiAx.js +0 -1
  288. package/lib/unsignedTransaction-dN_5EJf5.js +0 -1
  289. package/lib/web3-Bu_6UejS.mjs +0 -67
  290. package/lib/web3-Doz_0RHD.js +0 -1
@@ -1,22 +0,0 @@
1
- "use strict";var e1=Object.defineProperty;var t1=(t,e,n)=>e in t?e1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var ie=(t,e,n)=>t1(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 ni(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Wc(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 We={},_a={},_s={},dl;function n1(){if(dl)return _s;dl=1,_s.byteLength=a,_s.toByteArray=h,_s.fromByteArray=B;for(var t=[],e=[],n=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,i=r.length;s<i;++s)t[s]=r[s],e[r.charCodeAt(s)]=s;e[45]=62,e[95]=63;function o(g){var _=g.length;if(_%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var v=g.indexOf("=");v===-1&&(v=_);var A=v===_?0:4-v%4;return[v,A]}function a(g){var _=o(g),v=_[0],A=_[1];return(v+A)*3/4-A}function d(g,_,v){return(_+v)*3/4-v}function h(g){var _,v=o(g),A=v[0],w=v[1],F=new n(d(g,A,w)),x=0,N=w>0?A-4:A,k;for(k=0;k<N;k+=4)_=e[g.charCodeAt(k)]<<18|e[g.charCodeAt(k+1)]<<12|e[g.charCodeAt(k+2)]<<6|e[g.charCodeAt(k+3)],F[x++]=_>>16&255,F[x++]=_>>8&255,F[x++]=_&255;return w===2&&(_=e[g.charCodeAt(k)]<<2|e[g.charCodeAt(k+1)]>>4,F[x++]=_&255),w===1&&(_=e[g.charCodeAt(k)]<<10|e[g.charCodeAt(k+1)]<<4|e[g.charCodeAt(k+2)]>>2,F[x++]=_>>8&255,F[x++]=_&255),F}function u(g){return t[g>>18&63]+t[g>>12&63]+t[g>>6&63]+t[g&63]}function p(g,_,v){for(var A,w=[],F=_;F<v;F+=3)A=(g[F]<<16&16711680)+(g[F+1]<<8&65280)+(g[F+2]&255),w.push(u(A));return w.join("")}function B(g){for(var _,v=g.length,A=v%3,w=[],F=16383,x=0,N=v-A;x<N;x+=F)w.push(p(g,x,x+F>N?N:x+F));return A===1?(_=g[v-1],w.push(t[_>>2]+t[_<<4&63]+"==")):A===2&&(_=(g[v-2]<<8)+g[v-1],w.push(t[_>>10]+t[_>>4&63]+t[_<<2&63]+"=")),w.join("")}return _s}var Ei={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var ll;function r1(){return ll||(ll=1,Ei.read=function(t,e,n,r,s){var i,o,a=s*8-r-1,d=(1<<a)-1,h=d>>1,u=-7,p=n?s-1:0,B=n?-1:1,g=t[e+p];for(p+=B,i=g&(1<<-u)-1,g>>=-u,u+=a;u>0;i=i*256+t[e+p],p+=B,u-=8);for(o=i&(1<<-u)-1,i>>=-u,u+=r;u>0;o=o*256+t[e+p],p+=B,u-=8);if(i===0)i=1-h;else{if(i===d)return o?NaN:(g?-1:1)*(1/0);o=o+Math.pow(2,r),i=i-h}return(g?-1:1)*o*Math.pow(2,i-r)},Ei.write=function(t,e,n,r,s,i){var o,a,d,h=i*8-s-1,u=(1<<h)-1,p=u>>1,B=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=r?0:i-1,_=r?1:-1,v=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=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(d=Math.pow(2,-o))<1&&(o--,d*=2),o+p>=1?e+=B/d:e+=B*Math.pow(2,1-p),e*d>=2&&(o++,d/=2),o+p>=u?(a=0,o=u):o+p>=1?(a=(e*d-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+g]=a&255,g+=_,a/=256,s-=8);for(o=o<<s|a,h+=s;h>0;t[n+g]=o&255,g+=_,o/=256,h-=8);t[n+g-_]|=v*128}),Ei}/*!
2
- * The buffer module from node.js, for the browser.
3
- *
4
- * @author Feross Aboukhadijeh <https://feross.org>
5
- * @license MIT
6
- */var ul;function ls(){return ul||(ul=1,function(t){const e=n1(),n=r1(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=F,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 E=new Uint8Array(1),l={foo:function(){return 42}};return Object.setPrototypeOf(l,Uint8Array.prototype),Object.setPrototypeOf(E,l),E.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(E){if(E>s)throw new RangeError('The value "'+E+'" is invalid for option "size"');const l=new Uint8Array(E);return Object.setPrototypeOf(l,a.prototype),l}function a(E,l,f){if(typeof E=="number"){if(typeof l=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(E)}return d(E,l,f)}a.poolSize=8192;function d(E,l,f){if(typeof E=="string")return B(E,l);if(ArrayBuffer.isView(E))return _(E);if(E==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E);if(Jt(E,ArrayBuffer)||E&&Jt(E.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Jt(E,SharedArrayBuffer)||E&&Jt(E.buffer,SharedArrayBuffer)))return v(E,l,f);if(typeof E=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const D=E.valueOf&&E.valueOf();if(D!=null&&D!==E)return a.from(D,l,f);const U=A(E);if(U)return U;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof E[Symbol.toPrimitive]=="function")return a.from(E[Symbol.toPrimitive]("string"),l,f);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E)}a.from=function(E,l,f){return d(E,l,f)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function h(E){if(typeof E!="number")throw new TypeError('"size" argument must be of type number');if(E<0)throw new RangeError('The value "'+E+'" is invalid for option "size"')}function u(E,l,f){return h(E),E<=0?o(E):l!==void 0?typeof f=="string"?o(E).fill(l,f):o(E).fill(l):o(E)}a.alloc=function(E,l,f){return u(E,l,f)};function p(E){return h(E),o(E<0?0:w(E)|0)}a.allocUnsafe=function(E){return p(E)},a.allocUnsafeSlow=function(E){return p(E)};function B(E,l){if((typeof l!="string"||l==="")&&(l="utf8"),!a.isEncoding(l))throw new TypeError("Unknown encoding: "+l);const f=x(E,l)|0;let D=o(f);const U=D.write(E,l);return U!==f&&(D=D.slice(0,U)),D}function g(E){const l=E.length<0?0:w(E.length)|0,f=o(l);for(let D=0;D<l;D+=1)f[D]=E[D]&255;return f}function _(E){if(Jt(E,Uint8Array)){const l=new Uint8Array(E);return v(l.buffer,l.byteOffset,l.byteLength)}return g(E)}function v(E,l,f){if(l<0||E.byteLength<l)throw new RangeError('"offset" is outside of buffer bounds');if(E.byteLength<l+(f||0))throw new RangeError('"length" is outside of buffer bounds');let D;return l===void 0&&f===void 0?D=new Uint8Array(E):f===void 0?D=new Uint8Array(E,l):D=new Uint8Array(E,l,f),Object.setPrototypeOf(D,a.prototype),D}function A(E){if(a.isBuffer(E)){const l=w(E.length)|0,f=o(l);return f.length===0||E.copy(f,0,0,l),f}if(E.length!==void 0)return typeof E.length!="number"||Pe(E.length)?o(0):g(E);if(E.type==="Buffer"&&Array.isArray(E.data))return g(E.data)}function w(E){if(E>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return E|0}function F(E){return+E!=E&&(E=0),a.alloc(+E)}a.isBuffer=function(l){return l!=null&&l._isBuffer===!0&&l!==a.prototype},a.compare=function(l,f){if(Jt(l,Uint8Array)&&(l=a.from(l,l.offset,l.byteLength)),Jt(f,Uint8Array)&&(f=a.from(f,f.offset,f.byteLength)),!a.isBuffer(l)||!a.isBuffer(f))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(l===f)return 0;let D=l.length,U=f.length;for(let W=0,V=Math.min(D,U);W<V;++W)if(l[W]!==f[W]){D=l[W],U=f[W];break}return D<U?-1:U<D?1:0},a.isEncoding=function(l){switch(String(l).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(l,f){if(!Array.isArray(l))throw new TypeError('"list" argument must be an Array of Buffers');if(l.length===0)return a.alloc(0);let D;if(f===void 0)for(f=0,D=0;D<l.length;++D)f+=l[D].length;const U=a.allocUnsafe(f);let W=0;for(D=0;D<l.length;++D){let V=l[D];if(Jt(V,Uint8Array))W+V.length>U.length?(a.isBuffer(V)||(V=a.from(V)),V.copy(U,W)):Uint8Array.prototype.set.call(U,V,W);else if(a.isBuffer(V))V.copy(U,W);else throw new TypeError('"list" argument must be an Array of Buffers');W+=V.length}return U};function x(E,l){if(a.isBuffer(E))return E.length;if(ArrayBuffer.isView(E)||Jt(E,ArrayBuffer))return E.byteLength;if(typeof E!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof E);const f=E.length,D=arguments.length>2&&arguments[2]===!0;if(!D&&f===0)return 0;let U=!1;for(;;)switch(l){case"ascii":case"latin1":case"binary":return f;case"utf8":case"utf-8":return Me(E).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f*2;case"hex":return f>>>1;case"base64":return ze(E).length;default:if(U)return D?-1:Me(E).length;l=(""+l).toLowerCase(),U=!0}}a.byteLength=x;function N(E,l,f){let D=!1;if((l===void 0||l<0)&&(l=0),l>this.length||((f===void 0||f>this.length)&&(f=this.length),f<=0)||(f>>>=0,l>>>=0,f<=l))return"";for(E||(E="utf8");;)switch(E){case"hex":return O(this,l,f);case"utf8":case"utf-8":return c(this,l,f);case"ascii":return T(this,l,f);case"latin1":case"binary":return R(this,l,f);case"base64":return C(this,l,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,l,f);default:if(D)throw new TypeError("Unknown encoding: "+E);E=(E+"").toLowerCase(),D=!0}}a.prototype._isBuffer=!0;function k(E,l,f){const D=E[l];E[l]=E[f],E[f]=D}a.prototype.swap16=function(){const l=this.length;if(l%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let f=0;f<l;f+=2)k(this,f,f+1);return this},a.prototype.swap32=function(){const l=this.length;if(l%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let f=0;f<l;f+=4)k(this,f,f+3),k(this,f+1,f+2);return this},a.prototype.swap64=function(){const l=this.length;if(l%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let f=0;f<l;f+=8)k(this,f,f+7),k(this,f+1,f+6),k(this,f+2,f+5),k(this,f+3,f+4);return this},a.prototype.toString=function(){const l=this.length;return l===0?"":arguments.length===0?c(this,0,l):N.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(l){if(!a.isBuffer(l))throw new TypeError("Argument must be a Buffer");return this===l?!0:a.compare(this,l)===0},a.prototype.inspect=function(){let l="";const f=t.INSPECT_MAX_BYTES;return l=this.toString("hex",0,f).replace(/(.{2})/g,"$1 ").trim(),this.length>f&&(l+=" ... "),"<Buffer "+l+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(l,f,D,U,W){if(Jt(l,Uint8Array)&&(l=a.from(l,l.offset,l.byteLength)),!a.isBuffer(l))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof l);if(f===void 0&&(f=0),D===void 0&&(D=l?l.length:0),U===void 0&&(U=0),W===void 0&&(W=this.length),f<0||D>l.length||U<0||W>this.length)throw new RangeError("out of range index");if(U>=W&&f>=D)return 0;if(U>=W)return-1;if(f>=D)return 1;if(f>>>=0,D>>>=0,U>>>=0,W>>>=0,this===l)return 0;let V=W-U,ge=D-f;const he=Math.min(V,ge),ue=this.slice(U,W),Le=l.slice(f,D);for(let le=0;le<he;++le)if(ue[le]!==Le[le]){V=ue[le],ge=Le[le];break}return V<ge?-1:ge<V?1:0};function q(E,l,f,D,U){if(E.length===0)return-1;if(typeof f=="string"?(D=f,f=0):f>2147483647?f=2147483647:f<-2147483648&&(f=-2147483648),f=+f,Pe(f)&&(f=U?0:E.length-1),f<0&&(f=E.length+f),f>=E.length){if(U)return-1;f=E.length-1}else if(f<0)if(U)f=0;else return-1;if(typeof l=="string"&&(l=a.from(l,D)),a.isBuffer(l))return l.length===0?-1:G(E,l,f,D,U);if(typeof l=="number")return l=l&255,typeof Uint8Array.prototype.indexOf=="function"?U?Uint8Array.prototype.indexOf.call(E,l,f):Uint8Array.prototype.lastIndexOf.call(E,l,f):G(E,[l],f,D,U);throw new TypeError("val must be string, number or Buffer")}function G(E,l,f,D,U){let W=1,V=E.length,ge=l.length;if(D!==void 0&&(D=String(D).toLowerCase(),D==="ucs2"||D==="ucs-2"||D==="utf16le"||D==="utf-16le")){if(E.length<2||l.length<2)return-1;W=2,V/=2,ge/=2,f/=2}function he(Le,le){return W===1?Le[le]:Le.readUInt16BE(le*W)}let ue;if(U){let Le=-1;for(ue=f;ue<V;ue++)if(he(E,ue)===he(l,Le===-1?0:ue-Le)){if(Le===-1&&(Le=ue),ue-Le+1===ge)return Le*W}else Le!==-1&&(ue-=ue-Le),Le=-1}else for(f+ge>V&&(f=V-ge),ue=f;ue>=0;ue--){let Le=!0;for(let le=0;le<ge;le++)if(he(E,ue+le)!==he(l,le)){Le=!1;break}if(Le)return ue}return-1}a.prototype.includes=function(l,f,D){return this.indexOf(l,f,D)!==-1},a.prototype.indexOf=function(l,f,D){return q(this,l,f,D,!0)},a.prototype.lastIndexOf=function(l,f,D){return q(this,l,f,D,!1)};function Y(E,l,f,D){f=Number(f)||0;const U=E.length-f;D?(D=Number(D),D>U&&(D=U)):D=U;const W=l.length;D>W/2&&(D=W/2);let V;for(V=0;V<D;++V){const ge=parseInt(l.substr(V*2,2),16);if(Pe(ge))return V;E[f+V]=ge}return V}function M(E,l,f,D){return Ue(Me(l,E.length-f),E,f,D)}function j(E,l,f,D){return Ue(Ve(l),E,f,D)}function P(E,l,f,D){return Ue(ze(l),E,f,D)}function $(E,l,f,D){return Ue(yi(l,E.length-f),E,f,D)}a.prototype.write=function(l,f,D,U){if(f===void 0)U="utf8",D=this.length,f=0;else if(D===void 0&&typeof f=="string")U=f,D=this.length,f=0;else if(isFinite(f))f=f>>>0,isFinite(D)?(D=D>>>0,U===void 0&&(U="utf8")):(U=D,D=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const W=this.length-f;if((D===void 0||D>W)&&(D=W),l.length>0&&(D<0||f<0)||f>this.length)throw new RangeError("Attempt to write outside buffer bounds");U||(U="utf8");let V=!1;for(;;)switch(U){case"hex":return Y(this,l,f,D);case"utf8":case"utf-8":return M(this,l,f,D);case"ascii":case"latin1":case"binary":return j(this,l,f,D);case"base64":return P(this,l,f,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,l,f,D);default:if(V)throw new TypeError("Unknown encoding: "+U);U=(""+U).toLowerCase(),V=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(E,l,f){return l===0&&f===E.length?e.fromByteArray(E):e.fromByteArray(E.slice(l,f))}function c(E,l,f){f=Math.min(E.length,f);const D=[];let U=l;for(;U<f;){const W=E[U];let V=null,ge=W>239?4:W>223?3:W>191?2:1;if(U+ge<=f){let he,ue,Le,le;switch(ge){case 1:W<128&&(V=W);break;case 2:he=E[U+1],(he&192)===128&&(le=(W&31)<<6|he&63,le>127&&(V=le));break;case 3:he=E[U+1],ue=E[U+2],(he&192)===128&&(ue&192)===128&&(le=(W&15)<<12|(he&63)<<6|ue&63,le>2047&&(le<55296||le>57343)&&(V=le));break;case 4:he=E[U+1],ue=E[U+2],Le=E[U+3],(he&192)===128&&(ue&192)===128&&(Le&192)===128&&(le=(W&15)<<18|(he&63)<<12|(ue&63)<<6|Le&63,le>65535&&le<1114112&&(V=le))}}V===null?(V=65533,ge=1):V>65535&&(V-=65536,D.push(V>>>10&1023|55296),V=56320|V&1023),D.push(V),U+=ge}return y(D)}const b=4096;function y(E){const l=E.length;if(l<=b)return String.fromCharCode.apply(String,E);let f="",D=0;for(;D<l;)f+=String.fromCharCode.apply(String,E.slice(D,D+=b));return f}function T(E,l,f){let D="";f=Math.min(E.length,f);for(let U=l;U<f;++U)D+=String.fromCharCode(E[U]&127);return D}function R(E,l,f){let D="";f=Math.min(E.length,f);for(let U=l;U<f;++U)D+=String.fromCharCode(E[U]);return D}function O(E,l,f){const D=E.length;(!l||l<0)&&(l=0),(!f||f<0||f>D)&&(f=D);let U="";for(let W=l;W<f;++W)U+=je[E[W]];return U}function L(E,l,f){const D=E.slice(l,f);let U="";for(let W=0;W<D.length-1;W+=2)U+=String.fromCharCode(D[W]+D[W+1]*256);return U}a.prototype.slice=function(l,f){const D=this.length;l=~~l,f=f===void 0?D:~~f,l<0?(l+=D,l<0&&(l=0)):l>D&&(l=D),f<0?(f+=D,f<0&&(f=0)):f>D&&(f=D),f<l&&(f=l);const U=this.subarray(l,f);return Object.setPrototypeOf(U,a.prototype),U};function S(E,l,f){if(E%1!==0||E<0)throw new RangeError("offset is not uint");if(E+l>f)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(l,f,D){l=l>>>0,f=f>>>0,D||S(l,f,this.length);let U=this[l],W=1,V=0;for(;++V<f&&(W*=256);)U+=this[l+V]*W;return U},a.prototype.readUintBE=a.prototype.readUIntBE=function(l,f,D){l=l>>>0,f=f>>>0,D||S(l,f,this.length);let U=this[l+--f],W=1;for(;f>0&&(W*=256);)U+=this[l+--f]*W;return U},a.prototype.readUint8=a.prototype.readUInt8=function(l,f){return l=l>>>0,f||S(l,1,this.length),this[l]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(l,f){return l=l>>>0,f||S(l,2,this.length),this[l]|this[l+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(l,f){return l=l>>>0,f||S(l,2,this.length),this[l]<<8|this[l+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(l,f){return l=l>>>0,f||S(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+this[l+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(l,f){return l=l>>>0,f||S(l,4,this.length),this[l]*16777216+(this[l+1]<<16|this[l+2]<<8|this[l+3])},a.prototype.readBigUInt64LE=ln(function(l){l=l>>>0,tn(l,"offset");const f=this[l],D=this[l+7];(f===void 0||D===void 0)&&Fe(l,this.length-8);const U=f+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24,W=this[++l]+this[++l]*2**8+this[++l]*2**16+D*2**24;return BigInt(U)+(BigInt(W)<<BigInt(32))}),a.prototype.readBigUInt64BE=ln(function(l){l=l>>>0,tn(l,"offset");const f=this[l],D=this[l+7];(f===void 0||D===void 0)&&Fe(l,this.length-8);const U=f*2**24+this[++l]*2**16+this[++l]*2**8+this[++l],W=this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+D;return(BigInt(U)<<BigInt(32))+BigInt(W)}),a.prototype.readIntLE=function(l,f,D){l=l>>>0,f=f>>>0,D||S(l,f,this.length);let U=this[l],W=1,V=0;for(;++V<f&&(W*=256);)U+=this[l+V]*W;return W*=128,U>=W&&(U-=Math.pow(2,8*f)),U},a.prototype.readIntBE=function(l,f,D){l=l>>>0,f=f>>>0,D||S(l,f,this.length);let U=f,W=1,V=this[l+--U];for(;U>0&&(W*=256);)V+=this[l+--U]*W;return W*=128,V>=W&&(V-=Math.pow(2,8*f)),V},a.prototype.readInt8=function(l,f){return l=l>>>0,f||S(l,1,this.length),this[l]&128?(255-this[l]+1)*-1:this[l]},a.prototype.readInt16LE=function(l,f){l=l>>>0,f||S(l,2,this.length);const D=this[l]|this[l+1]<<8;return D&32768?D|4294901760:D},a.prototype.readInt16BE=function(l,f){l=l>>>0,f||S(l,2,this.length);const D=this[l+1]|this[l]<<8;return D&32768?D|4294901760:D},a.prototype.readInt32LE=function(l,f){return l=l>>>0,f||S(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},a.prototype.readInt32BE=function(l,f){return l=l>>>0,f||S(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},a.prototype.readBigInt64LE=ln(function(l){l=l>>>0,tn(l,"offset");const f=this[l],D=this[l+7];(f===void 0||D===void 0)&&Fe(l,this.length-8);const U=this[l+4]+this[l+5]*2**8+this[l+6]*2**16+(D<<24);return(BigInt(U)<<BigInt(32))+BigInt(f+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24)}),a.prototype.readBigInt64BE=ln(function(l){l=l>>>0,tn(l,"offset");const f=this[l],D=this[l+7];(f===void 0||D===void 0)&&Fe(l,this.length-8);const U=(f<<24)+this[++l]*2**16+this[++l]*2**8+this[++l];return(BigInt(U)<<BigInt(32))+BigInt(this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+D)}),a.prototype.readFloatLE=function(l,f){return l=l>>>0,f||S(l,4,this.length),n.read(this,l,!0,23,4)},a.prototype.readFloatBE=function(l,f){return l=l>>>0,f||S(l,4,this.length),n.read(this,l,!1,23,4)},a.prototype.readDoubleLE=function(l,f){return l=l>>>0,f||S(l,8,this.length),n.read(this,l,!0,52,8)},a.prototype.readDoubleBE=function(l,f){return l=l>>>0,f||S(l,8,this.length),n.read(this,l,!1,52,8)};function m(E,l,f,D,U,W){if(!a.isBuffer(E))throw new TypeError('"buffer" argument must be a Buffer instance');if(l>U||l<W)throw new RangeError('"value" argument is out of bounds');if(f+D>E.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(l,f,D,U){if(l=+l,f=f>>>0,D=D>>>0,!U){const ge=Math.pow(2,8*D)-1;m(this,l,f,D,ge,0)}let W=1,V=0;for(this[f]=l&255;++V<D&&(W*=256);)this[f+V]=l/W&255;return f+D},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(l,f,D,U){if(l=+l,f=f>>>0,D=D>>>0,!U){const ge=Math.pow(2,8*D)-1;m(this,l,f,D,ge,0)}let W=D-1,V=1;for(this[f+W]=l&255;--W>=0&&(V*=256);)this[f+W]=l/V&255;return f+D},a.prototype.writeUint8=a.prototype.writeUInt8=function(l,f,D){return l=+l,f=f>>>0,D||m(this,l,f,1,255,0),this[f]=l&255,f+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(l,f,D){return l=+l,f=f>>>0,D||m(this,l,f,2,65535,0),this[f]=l&255,this[f+1]=l>>>8,f+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(l,f,D){return l=+l,f=f>>>0,D||m(this,l,f,2,65535,0),this[f]=l>>>8,this[f+1]=l&255,f+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(l,f,D){return l=+l,f=f>>>0,D||m(this,l,f,4,4294967295,0),this[f+3]=l>>>24,this[f+2]=l>>>16,this[f+1]=l>>>8,this[f]=l&255,f+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(l,f,D){return l=+l,f=f>>>0,D||m(this,l,f,4,4294967295,0),this[f]=l>>>24,this[f+1]=l>>>16,this[f+2]=l>>>8,this[f+3]=l&255,f+4};function I(E,l,f,D,U){Ne(l,D,U,E,f,7);let W=Number(l&BigInt(4294967295));E[f++]=W,W=W>>8,E[f++]=W,W=W>>8,E[f++]=W,W=W>>8,E[f++]=W;let V=Number(l>>BigInt(32)&BigInt(4294967295));return E[f++]=V,V=V>>8,E[f++]=V,V=V>>8,E[f++]=V,V=V>>8,E[f++]=V,f}function se(E,l,f,D,U){Ne(l,D,U,E,f,7);let W=Number(l&BigInt(4294967295));E[f+7]=W,W=W>>8,E[f+6]=W,W=W>>8,E[f+5]=W,W=W>>8,E[f+4]=W;let V=Number(l>>BigInt(32)&BigInt(4294967295));return E[f+3]=V,V=V>>8,E[f+2]=V,V=V>>8,E[f+1]=V,V=V>>8,E[f]=V,f+8}a.prototype.writeBigUInt64LE=ln(function(l,f=0){return I(this,l,f,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=ln(function(l,f=0){return se(this,l,f,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(l,f,D,U){if(l=+l,f=f>>>0,!U){const he=Math.pow(2,8*D-1);m(this,l,f,D,he-1,-he)}let W=0,V=1,ge=0;for(this[f]=l&255;++W<D&&(V*=256);)l<0&&ge===0&&this[f+W-1]!==0&&(ge=1),this[f+W]=(l/V>>0)-ge&255;return f+D},a.prototype.writeIntBE=function(l,f,D,U){if(l=+l,f=f>>>0,!U){const he=Math.pow(2,8*D-1);m(this,l,f,D,he-1,-he)}let W=D-1,V=1,ge=0;for(this[f+W]=l&255;--W>=0&&(V*=256);)l<0&&ge===0&&this[f+W+1]!==0&&(ge=1),this[f+W]=(l/V>>0)-ge&255;return f+D},a.prototype.writeInt8=function(l,f,D){return l=+l,f=f>>>0,D||m(this,l,f,1,127,-128),l<0&&(l=255+l+1),this[f]=l&255,f+1},a.prototype.writeInt16LE=function(l,f,D){return l=+l,f=f>>>0,D||m(this,l,f,2,32767,-32768),this[f]=l&255,this[f+1]=l>>>8,f+2},a.prototype.writeInt16BE=function(l,f,D){return l=+l,f=f>>>0,D||m(this,l,f,2,32767,-32768),this[f]=l>>>8,this[f+1]=l&255,f+2},a.prototype.writeInt32LE=function(l,f,D){return l=+l,f=f>>>0,D||m(this,l,f,4,2147483647,-2147483648),this[f]=l&255,this[f+1]=l>>>8,this[f+2]=l>>>16,this[f+3]=l>>>24,f+4},a.prototype.writeInt32BE=function(l,f,D){return l=+l,f=f>>>0,D||m(this,l,f,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),this[f]=l>>>24,this[f+1]=l>>>16,this[f+2]=l>>>8,this[f+3]=l&255,f+4},a.prototype.writeBigInt64LE=ln(function(l,f=0){return I(this,l,f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=ln(function(l,f=0){return se(this,l,f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function J(E,l,f,D,U,W){if(f+D>E.length)throw new RangeError("Index out of range");if(f<0)throw new RangeError("Index out of range")}function ee(E,l,f,D,U){return l=+l,f=f>>>0,U||J(E,l,f,4),n.write(E,l,f,D,23,4),f+4}a.prototype.writeFloatLE=function(l,f,D){return ee(this,l,f,!0,D)},a.prototype.writeFloatBE=function(l,f,D){return ee(this,l,f,!1,D)};function Te(E,l,f,D,U){return l=+l,f=f>>>0,U||J(E,l,f,8),n.write(E,l,f,D,52,8),f+8}a.prototype.writeDoubleLE=function(l,f,D){return Te(this,l,f,!0,D)},a.prototype.writeDoubleBE=function(l,f,D){return Te(this,l,f,!1,D)},a.prototype.copy=function(l,f,D,U){if(!a.isBuffer(l))throw new TypeError("argument should be a Buffer");if(D||(D=0),!U&&U!==0&&(U=this.length),f>=l.length&&(f=l.length),f||(f=0),U>0&&U<D&&(U=D),U===D||l.length===0||this.length===0)return 0;if(f<0)throw new RangeError("targetStart out of bounds");if(D<0||D>=this.length)throw new RangeError("Index out of range");if(U<0)throw new RangeError("sourceEnd out of bounds");U>this.length&&(U=this.length),l.length-f<U-D&&(U=l.length-f+D);const W=U-D;return this===l&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(f,D,U):Uint8Array.prototype.set.call(l,this.subarray(D,U),f),W},a.prototype.fill=function(l,f,D,U){if(typeof l=="string"){if(typeof f=="string"?(U=f,f=0,D=this.length):typeof D=="string"&&(U=D,D=this.length),U!==void 0&&typeof U!="string")throw new TypeError("encoding must be a string");if(typeof U=="string"&&!a.isEncoding(U))throw new TypeError("Unknown encoding: "+U);if(l.length===1){const V=l.charCodeAt(0);(U==="utf8"&&V<128||U==="latin1")&&(l=V)}}else typeof l=="number"?l=l&255:typeof l=="boolean"&&(l=Number(l));if(f<0||this.length<f||this.length<D)throw new RangeError("Out of range index");if(D<=f)return this;f=f>>>0,D=D===void 0?this.length:D>>>0,l||(l=0);let W;if(typeof l=="number")for(W=f;W<D;++W)this[W]=l;else{const V=a.isBuffer(l)?l:a.from(l,U),ge=V.length;if(ge===0)throw new TypeError('The value "'+l+'" is invalid for argument "value"');for(W=0;W<D-f;++W)this[W+f]=V[W%ge]}return this};const de={};function pe(E,l,f){de[E]=class extends f{constructor(){super(),Object.defineProperty(this,"message",{value:l.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${E}]`,this.stack,delete this.name}get code(){return E}set code(U){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:U,writable:!0})}toString(){return`${this.name} [${E}]: ${this.message}`}}}pe("ERR_BUFFER_OUT_OF_BOUNDS",function(E){return E?`${E} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),pe("ERR_INVALID_ARG_TYPE",function(E,l){return`The "${E}" argument must be of type number. Received type ${typeof l}`},TypeError),pe("ERR_OUT_OF_RANGE",function(E,l,f){let D=`The value of "${E}" is out of range.`,U=f;return Number.isInteger(f)&&Math.abs(f)>2**32?U=dn(String(f)):typeof f=="bigint"&&(U=String(f),(f>BigInt(2)**BigInt(32)||f<-(BigInt(2)**BigInt(32)))&&(U=dn(U)),U+="n"),D+=` It must be ${l}. Received ${U}`,D},RangeError);function dn(E){let l="",f=E.length;const D=E[0]==="-"?1:0;for(;f>=D+4;f-=3)l=`_${E.slice(f-3,f)}${l}`;return`${E.slice(0,f)}${l}`}function Ce(E,l,f){tn(l,"offset"),(E[l]===void 0||E[l+f]===void 0)&&Fe(l,E.length-(f+1))}function Ne(E,l,f,D,U,W){if(E>f||E<l){const V=typeof l=="bigint"?"n":"";let ge;throw l===0||l===BigInt(0)?ge=`>= 0${V} and < 2${V} ** ${(W+1)*8}${V}`:ge=`>= -(2${V} ** ${(W+1)*8-1}${V}) and < 2 ** ${(W+1)*8-1}${V}`,new de.ERR_OUT_OF_RANGE("value",ge,E)}Ce(D,U,W)}function tn(E,l){if(typeof E!="number")throw new de.ERR_INVALID_ARG_TYPE(l,"number",E)}function Fe(E,l,f){throw Math.floor(E)!==E?(tn(E,f),new de.ERR_OUT_OF_RANGE("offset","an integer",E)):l<0?new de.ERR_BUFFER_OUT_OF_BOUNDS:new de.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${l}`,E)}const Ke=/[^+/0-9A-Za-z-_]/g;function gi(E){if(E=E.split("=")[0],E=E.trim().replace(Ke,""),E.length<2)return"";for(;E.length%4!==0;)E=E+"=";return E}function Me(E,l){l=l||1/0;let f;const D=E.length;let U=null;const W=[];for(let V=0;V<D;++V){if(f=E.charCodeAt(V),f>55295&&f<57344){if(!U){if(f>56319){(l-=3)>-1&&W.push(239,191,189);continue}else if(V+1===D){(l-=3)>-1&&W.push(239,191,189);continue}U=f;continue}if(f<56320){(l-=3)>-1&&W.push(239,191,189),U=f;continue}f=(U-55296<<10|f-56320)+65536}else U&&(l-=3)>-1&&W.push(239,191,189);if(U=null,f<128){if((l-=1)<0)break;W.push(f)}else if(f<2048){if((l-=2)<0)break;W.push(f>>6|192,f&63|128)}else if(f<65536){if((l-=3)<0)break;W.push(f>>12|224,f>>6&63|128,f&63|128)}else if(f<1114112){if((l-=4)<0)break;W.push(f>>18|240,f>>12&63|128,f>>6&63|128,f&63|128)}else throw new Error("Invalid code point")}return W}function Ve(E){const l=[];for(let f=0;f<E.length;++f)l.push(E.charCodeAt(f)&255);return l}function yi(E,l){let f,D,U;const W=[];for(let V=0;V<E.length&&!((l-=2)<0);++V)f=E.charCodeAt(V),D=f>>8,U=f%256,W.push(U),W.push(D);return W}function ze(E){return e.toByteArray(gi(E))}function Ue(E,l,f,D){let U;for(U=0;U<D&&!(U+f>=l.length||U>=E.length);++U)l[U+f]=E[U];return U}function Jt(E,l){return E instanceof l||E!=null&&E.constructor!=null&&E.constructor.name!=null&&E.constructor.name===l.name}function Pe(E){return E!==E}const je=function(){const E="0123456789abcdef",l=new Array(256);for(let f=0;f<16;++f){const D=f*16;for(let U=0;U<16;++U)l[D+U]=E[f]+E[U]}return l}();function ln(E){return typeof BigInt>"u"?Ge:E}function Ge(){throw new Error("BigInt not supported")}}(_a)),_a}var Yu={exports:{}},et=Yu.exports={},Bn,xn;function Qa(){throw new Error("setTimeout has not been defined")}function ec(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Bn=setTimeout:Bn=Qa}catch{Bn=Qa}try{typeof clearTimeout=="function"?xn=clearTimeout:xn=ec}catch{xn=ec}})();function Xu(t){if(Bn===setTimeout)return setTimeout(t,0);if((Bn===Qa||!Bn)&&setTimeout)return Bn=setTimeout,setTimeout(t,0);try{return Bn(t,0)}catch{try{return Bn.call(null,t,0)}catch{return Bn.call(this,t,0)}}}function s1(t){if(xn===clearTimeout)return clearTimeout(t);if((xn===ec||!xn)&&clearTimeout)return xn=clearTimeout,clearTimeout(t);try{return xn(t)}catch{try{return xn.call(null,t)}catch{return xn.call(this,t)}}}var Kn=[],Jr=!1,br,Ri=-1;function i1(){!Jr||!br||(Jr=!1,br.length?Kn=br.concat(Kn):Ri=-1,Kn.length&&Ju())}function Ju(){if(!Jr){var t=Xu(i1);Jr=!0;for(var e=Kn.length;e;){for(br=Kn,Kn=[];++Ri<e;)br&&br[Ri].run();Ri=-1,e=Kn.length}br=null,Jr=!1,s1(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 Zu(t,e)),Kn.length===1&&!Jr&&Xu(Ju)};function Zu(t,e){this.fun=t,this.array=e}Zu.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 Qu=Yu.exports;(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=ls(),n=Qu,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})(We);const Vi=t=>[...Array(t).keys()],ef=(t,e)=>t.map(n=>n[e]),pr=t=>Vi(t[0].length).map(e=>Vi(t.length).map(n=>t[n][e])),o1=(t,e,n)=>{const r=new Set(Array.isArray(e)?e:[e]);return t.filter((s,i)=>r.has(i)!==n)};function a1(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 c1(t){return["string","number","symbol","bigint","boolean"].includes(typeof t)}const fl=t=>t.length===2&&!Array.isArray(t[0])&&Array.isArray(t[1]),ji=t=>t.length===0?[]:Array.isArray(t[0])?t.map(([e,n])=>Array.isArray(n)?(fl(n)?ji(n):n).map(r=>[e,r].flat()):[[e,n]]).flat():fl(t)?ji(t[1]).map(e=>[t[0],e]):t,d1=(t,e)=>{const n=ji(t);if(n.length===0)throw new Error("Invalid mapping: empty");const r=e===void 0?[Vi(n[0].length-1),[n[0].length-1]]:e.map(B=>typeof B=="number"?[B]:B);let s=[],i=!0;const o=(B,g)=>{const _=Array.from(new Set(B[0]).values()),v=new Map(_.map(w=>[w,[]]));for(const[w,F]of B[0].entries())v.get(F).push(w);if(B.length===1){const w=Object.fromEntries(_.map(F=>[F,v.get(F).map(x=>g[x].length===1?g[x][0]:g[x])]));if(i){for(const F of v.values())if(F.length>1)return i=!1,w;s.push(w)}return w}const A=pr(B.slice(1));return Object.fromEntries(_.map(w=>{const F=v.get(w),x=pr(F.map(k=>A[k])),N=F.map(k=>g[k]);return[w,o(x,N)]}))},a=pr(n),d=B=>{const g=a[B];if(g===void 0)throw new Error(`Invalid shape: column ${B} does not exist`);return g},[h,u]=r.map(B=>B.map(g=>d(g)));if(h.length===0)throw new Error("Invalid shape: empty key set");if(u.length===0)throw new Error("Invalid shape: empty value set");for(const B of h)for(const g of B)if(!c1(g))throw new Error(`Invalid key: ${g} in ${B}`);const p=o(h,pr(u));if(i)for(const B of s)for(const g of Object.keys(B))B[g]=B[g][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(d1(t,e))}function zc(t){let e=null;return()=>(e||(e=t()),e)}function l1(t){try{return t(),!1}catch{return!0}}function u1(t,e,n){return t<e?e:t>n?n:t}var f1=["int","uint","bytes","array","switch"],tf="big",Eo=6,Tr=t=>typeof t=="number"||typeof t=="bigint",us=t=>t instanceof Uint8Array,h1=t=>Tr(t)||us(t),zs=t=>f1.includes(t==null?void 0:t.binary),m1=t=>zs(t)||Array.isArray(t)&&t.every(zs),b1=t=>typeof(t==null?void 0:t.from)=="number",p1=t=>typeof(t==null?void 0:t.from)=="bigint",g1=t=>b1(t)||p1(t),fs=t=>us(t==null?void 0:t.from),y1=t=>g1(t)||fs(t),nf=(t,e)=>{if(t!==e)throw new Error(`size mismatch: layout size: ${t}, data size: ${e}`);return e},ns=t=>"layout"in t&&t.layout!==void 0,tc=(t,e)=>"size"in t&&t.size!==void 0?nf(t.size,e):e,nc=(t,e)=>{if(t!=e)throw new Error(`value mismatch: (constant) layout value: ${t}, data value: ${e}`)},rc=(t,e,n)=>{const r=(h,u)=>u===void 0?[0,h.length]:Array.isArray(u)?u:[u,h.length],[s,i]=r(t,n==null?void 0:n.customSlice),[o,a]=r(e,n==null?void 0:n.dataSlice),d=i-s;nf(d,a-o);for(let h=0;h<t.length;++h)if(t[h+s]!==e[h+o])throw new Error(`binary data mismatch: layout value: ${t}, offset: ${s}, data value: ${e}, offset: ${o}`)};function rf(t,e){const n=e[t.idTag??"id"];return t.layouts.find(([r])=>(Array.isArray(r)?r[1]:r)==n)}function sf(t){return lr(t,rn)}var rn=Symbol("staticCalc");function E1(t,e){const n=[],r=lr(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 hl(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===rn)return t.size;const s="lengthSize"in t?t.lengthSize|0:0;if(ns(t)){const{custom:o}=t,a=lr(t.layout,o===void 0?e:typeof o.from=="function"?e!==rn?r(o.from(e)):rn:o.from,n);return a===null?"size"in t?t.size??null:null:s+tc(t,a)}const{custom:i}=t;return us(i)?s+i.length:fs(i)?s+i.from.length:e===rn?null:s+tc(t,i!==void 0?r(i.from(e)).length:e.length)}case"array":{const s="length"in t?t.length:void 0;if(e===rn){if(s!==void 0){const o=lr(t.layout,rn,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=lr(t.layout,e[o],n);if(a===null)return null;i+=a}return i}case"switch":{if(e!==rn){const[i,o]=rf(t,e),a=lr(o,e,n);return a!==null?t.idSize+a:null}let s=null;for(const[i,o]of t.layouts){const a=lr(o,rn,n);if(s===null)s=a;else if(a!==s)return null}return t.idSize+s}}}function lr(t,e,n){if(zs(t))return hl(t,e,n);let r=0;for(const s of t){let i;if(e===rn)i=rn;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=hl(s,i,n);if(o===null){if(e!==rn)throw new Error(`coding error: couldn't calculate size for layout item: ${s.name}`);return null}r+=o}return r}var Ta=(t,e)=>{t.bytes.set(e,t.offset),t.offset+=e.length},ml=t=>t.bytesConversions[t.position++];function bn(t,e,n){const[r,s]=E1(t,e),i={bytes:new Uint8Array(r),offset:0};if(vi(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 bl=2**(Eo*8);function gr(t,e,n,r=tf,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>Eo){if(t>=bl)throw new Error(`Value ${t} is too large to be safely converted into an integer`);if(s&&t<-bl)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 vi(t,e,n,r){if(zs(t))pl(t,e,n,r);else for(const s of t)try{pl(s,e[s.name],n,r)}catch(i){throw i.message=`when serializing item '${s.name}': ${i.message}`,i}}function pl(t,e,n,r){switch(t.binary){case"int":case"uint":{const s=(()=>{var i;return Tr(t.custom)?("omit"in t&&t.omit||nc(t.custom,e),t.custom):Tr((i=t==null?void 0:t.custom)==null?void 0:i.from)?t.custom.from:t.custom!==void 0?t.custom.from(e):e})();gr(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),ns(t)){const{custom:i}=t;let o;i===void 0?o=e:typeof i.from!="function"?o=i.from:o=ml(r),vi(t.layout,o,n,r)}else{const{custom:i}=t;us(i)?("omit"in t&&t.omit||rc(i,e),Ta(n,i)):fs(i)?Ta(n,i.from):Ta(n,i!==void 0?ml(r):e)}if("lengthSize"in t&&t.lengthSize!==void 0){const i=n.offset-s-t.lengthSize,o=n.offset;n.offset=s,gr(i,t.lengthSize,n,t.lengthEndianness),n.offset=o}else tc(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&&gr(e.length,t.lengthSize,n,t.lengthEndianness);for(let s=0;s<e.length;++s)vi(t.layout,e[s],n,r);break}case"switch":{const[s,i]=rf(t,e),o=Array.isArray(s)?s[0]:s;gr(o,t.idSize,n,t.idEndianness),vi(i,e,n,r);break}}}function of(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=Fs(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 Ii(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 Fs(t,e){if(!Array.isArray(t))return gl(t,e);let n={};for(const r of t)try{(r.omit?{}:n)[r.name]=gl(r,e)}catch(s){throw s.message=`when deserializing item '${r.name}': ${s.message}`,s}return n}function Ai(t,e,n=tf,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)),Ii(t,e),e>Eo?s:Number(s)}function gl(t,e){switch(t.binary){case"int":case"uint":{const n=Ai(e,t.size,t.endianness,t.binary==="int"),{custom:r}=t;return Tr(r)?(nc(r,n),r):Tr(r==null?void 0:r.from)?(nc(r.from,n),r.to):r!==void 0?r.to(n):n}case"bytes":{const n="lengthSize"in t&&t.lengthSize!==void 0?Ai(e,t.lengthSize,t.lengthEndianness):t==null?void 0:t.size;if(ns(t)){const{custom:a}=t,d=e.offset;let h;if(n===void 0)h=Fs(t.layout,e);else{const u={...e,end:e.offset+n};if(Ii(e,n),h=Fs(t.layout,u),u.offset!==u.end)throw new Error(`read less data than expected: ${u.offset-e.offset} < ${n}`)}return a!==void 0?typeof a.from!="function"?(rc(of(t),e.bytes,{dataSlice:[d,e.offset]}),a.to):a.to(h):h}const{custom:r}=t;{let a,d;if(us(r)?a=r:fs(r)&&(a=r.from,d=r.to),a!==void 0){const h=n??a.length,u=e.bytes.subarray(e.offset,e.offset+h);return rc(a,u),Ii(e,h),d??a}}const s=e.offset,i=n!==void 0?e.offset+n:e.end;Ii(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=Fs(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=Ai(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=Ai(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(([h])=>s?h===n:h[0]===n);if(i===void 0)throw new Error(`unknown id value: ${n}`);const[o,a]=i,d=Fs(a,e);return{[t.idTag??"id"]:s?n:o[1],...d}}}}function A1(t,e){return Fi(t,e)}function yl(t,e){switch(t.binary){case"bytes":if(ns(t)){const{custom:n}=t;return n===void 0||typeof n.from!="function"?Fi(t.layout,n?n.from:e):e}case"int":case"uint":{const{custom:n}=t;return t!=null&&t.omit?void 0:h1(n)?n:y1(n)?n.to:e}case"array":return Array.isArray(e)?e.map(n=>Fi(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,...Fi(s,e)}}}}function Fi(t,e){if(e=e??{},zs(t))return yl(t,e);const n={};for(const r of t){const s=yl(r,e[r.name]??{});s!==void 0&&(n[r.name]=s)}return n}function w1(t,e){const[n,r]=C1(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 sc(t){return t.reduce((e,n)=>e|BigInt(1)<<BigInt(n),BigInt(0))}function wi(t){const e=[];for(let n=0n;t>0n;t>>=1n,++n)t&1n&&e.push(Number(n));return e}function Et(t){let e=0;for(;t>0n;t>>=1n)e+=Number(t&1n);return e}var El=t=>t>0?2**(8*t)-1:1/0;function Al(t,e,n){var r;switch(t.binary){case"int":case"uint":{const s=Tr(t.custom)?t.custom:Tr((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};gr(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(ns(t)){const{custom:d}=t;if(d!==void 0&&typeof d.from!="function")i=of(t),o=i.length;else{const h=sf(t.layout);h!==null&&(o=h)}}else{const{custom:d}=t;us(d)?(i=d,o=d.length):fs(d)&&(i=d.from,o=d.from.length)}if(s>0&&e!==null){if(o!==void 0){const d={bytes:new Uint8Array(s),offset:0},h=t.lengthEndianness;gr(o,s,d,h,!1),n.push([e,d.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(ns(t)){const d=ki(t.layout,e,n);return a??[s+d[0],s+d[1]]}return a??[s,El(s)]}case"array":{if("length"in t){let i=[];const o=ki(t.layout,0,i);if(e!==null)if(o[0]!==o[1]){if(t.length>0)for(const[a,d]of i)n.push([e+a,d])}else for(let a=0;a<t.length;++a)for(const[d,h]of i)n.push([e+d+a*o[0],h]);return[t.length*o[0],t.length*o[1]]}const s=t.lengthSize|0;return[s,El(s)]}case"switch":{const s=t.layouts.map(d=>[]),{idSize:i,idEndianness:o}=t,a=t.layouts.map(([d,h],u)=>{const p=Array.isArray(d)?d[0]:d;if(e!==null){const g={bytes:new Uint8Array(i),offset:0};gr(p,i,g,o),s[u].push([0,g.bytes])}const B=ki(h,e!==null?i:null,s[u]);return[B[0]+i,B[1]+i]});return e!==null&&s.every(d=>d.length>0)&&(()=>{const d=Math.min(...s.map(u=>u.at(-1)[0]+u.at(-1)[1].length)),h=s.map(u=>0);for(let u=0;u<d;){let p=null,B=0;for(;B<s.length;){let g=h[B];const _=s[B],[v,A]=_[g];if(v+A.length<=u){if(++g,g===_.length)return;h[B]=g,u=_[g][0];break}const w=A[u-v];if(p===null&&(p=w),w!==p){++u;break}++B}B===s.length&&(n.push([e+u,new Uint8Array([p])]),++u)}})(),[Math.min(...a.map(([d])=>d)),Math.max(...a.map(([d,h])=>h))]}}}function ki(t,e,n){if(!Array.isArray(t))return Al(t,e,n);let r=[0,0];for(const s of t){const i=Al(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 S1(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,sc(n.map(([,a])=>a)))}};for(const[[s,i],o]of t){r(s);const a=n.findIndex(([d])=>d>i);a===-1?n.push([i,o]):n.splice(a,0,[i,o]),e.set(s,sc(n.map(([,d])=>d)))}return r(1/0),e}function C1(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((x,N)=>ki(x,0,r[N])),i=s.map((x,N)=>[x,N]).sort(([[x]],[[N]])=>x-N),o=(()=>{let x=n;const N=new Map;for(const[[k],q]of i)x^=1n<<BigInt(q),N.set(k,x);return N})(),a=S1(i),d=t.length-Math.max(...[...a.values()].map(x=>Et(x))),h=x=>{let N=n;for(const[k,q]of o){if(x<k)break;N=q}return N},u=x=>{let N=e;for(const[k,q]of a){if(x<k)break;N=q}return N},p=Array.from({length:Math.max(...r.map(x=>x.length>0?x.at(-1)[0]+x.at(-1)[1].length:0))}).map(()=>[]);for(let x=0;x<r.length;++x)for(const[N,k]of r[x])for(let q=0;q<k.length;++q)p[N+q].push([k[q],x]);let B=[];for(const[x,N]of p.entries()){const k=h(x),q=k^sc(N.map(([,j])=>j)),G=n^k,Y=new Map;for(const[j,P]of N)Y.has(j)||Y.set(j,e),Y.set(j,Y.get(j)|1n<<BigInt(P));let M=t.length-Math.max(Et(q),Et(G));for(const j of Y.values()){const P=N.length-Et(j)+Et(G);M=Math.min(M,P)}if(M!==0){if(M===t.length-1)return[!0,j=>wi(j.length<=x?G:Y.get(j[x])??e)];B.push([M,x,G,Y,q])}}if(d===t.length-1)return[!0,x=>wi(u(x.length))];B.sort(([x],[N])=>N-x);let g=!0;const _=new Map,v=new Map,A=(x,N)=>{_.set(x,N),v.has(Et(x))||v.set(Et(x),[]),v.get(Et(x)).push(x)},w=(x,N)=>{if(Et(x)<=1||_.has(x))return;let k=0;const q=new Map;for(const Y of wi(x)){const M=s[Y][0],j=a.get(M)&x;q.set(M,j),k=Math.max(k,Et(j))}k=Et(x)-k;const G=[];for(const[Y,M,j,P,$]of N){const C=new Map;let c=0;for(const[T,R]of P){const O=R&x;Et(O)>0&&(C.set(T,O),c+=Et(O))}const b=j&x;let y=C.size>0?Y:0;for(const T of C.values()){const R=c-Et(T)+Et(b);y=Math.min(y,R)}if(y!==0){if(y===Et(x)-1){A(x,[M,b,C]);return}G.push([y,M,b,C,$&x])}}if(k===Et(x)-1){A(x,"size");return}if(G.sort(([Y],[M])=>M-Y),G.length>0&&G[0][0]>=k){const[,Y,M,j,P]=G[0];A(x,[Y,M,j]),w(M,G);for(const $ of j.values())w($|P,G.slice(1));return}if(k>0){A(x,"size");for(const Y of q.values())w(Y,G);return}A(x,"indistinguishable"),g=!1};w(n,B);const F=x=>{for(let N=Et(x)+1;N<t.length-2;++N)for(const k of v.get(N)??[])if((x&k)==x)return _.get(k);throw new Error("Implementation error in layout discrimination algorithm")};return[g,x=>{let N=n,k=_.get(N);for(;k!=="indistinguishable";){if(k==="size")N&=u(x.length);else{const[q,G,Y]=k;if(x.length<=q)N&=G;else{const M=x[q];for(const[j,P]of Y)j!==M&&(N^=N&P);N^=N&G}}if(Et(N)<=1)break;k=_.get(N)??F(N)}return wi(N)}]}var Ao=(t,e)=>({...t,binary:"bytes",...e===void 0?{}:m1(e)?{layout:e}:e instanceof Uint8Array||fs(e)||!Array.isArray(e)?{custom:e}:{layout:e[0],custom:e[1]}});function B1(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 x1(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>Eo?r:Number(r)}}}}function _1(t,e){return Number(Number(t).toFixed(e))}function Oi(t,e){if(T1(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 Ni(t,e){if(t.decimals<=e)return t;const n=BigInt(t.decimals-e);return{amount:(Dt(t)/10n**n*10n**n).toString(),decimals:t.decimals}}function Vr(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 Hn(t,e){return{amount:t.toString(),decimals:e}}function Dt(t){return af(t),BigInt(t.amount)}function wo(t,e){af(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 Ns(t){return Number(wo(t))}function wl(t,e){return wo(Hn(t,e))}function T1(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 af(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 D1(t,e){const r=Dt(t)*e/100000n;return Hn(r,t.decimals)}const Hs=(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 rs(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function R1(t,...e){if(!rs(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 cf(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 df(t){if(typeof t!="function")throw new Error("function expected");return!0}function Dr(t,e){if(typeof e!="string")throw new Error(`${t}: string expected`);return!0}function hs(t){if(!Number.isSafeInteger(t))throw new Error(`invalid integer: ${t}`)}function Gi(t){if(!Array.isArray(t))throw new Error("array expected")}function Yi(t,e){if(!cf(!0,e))throw new Error(`${t}: array of strings expected`)}function Hc(t,e){if(!cf(!1,e))throw new Error(`${t}: array of numbers expected`)}function ri(...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 So(t){const e=typeof t=="string"?t.split(""):t,n=e.length;Yi("alphabet",e);const r=new Map(e.map((s,i)=>[s,i]));return{encode:s=>(Gi(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=>(Gi(s),s.map(i=>{Dr("alphabet.decode",i);const o=r.get(i);if(o===void 0)throw new Error(`Unknown letter: "${i}". Allowed: ${t}`);return o}))}}function Co(t=""){return Dr("join",t),{encode:e=>(Yi("join.decode",e),e.join(t)),decode:e=>(Dr("join.decode",e),e.split(t))}}function v1(t,e="="){return hs(t),Dr("padding",e),{encode(n){for(Yi("padding.encode",n);n.length*t%8;)n.push(e);return n},decode(n){Yi("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 Sl(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(Gi(t),!t.length)return[];let r=0;const s=[],i=Array.from(t,a=>{if(hs(a),a<0||a>=e)throw new Error(`invalid integer: ${a}`);return a}),o=i.length;for(;;){let a=0,d=!0;for(let h=r;h<o;h++){const u=i[h],p=e*a,B=p+u;if(!Number.isSafeInteger(B)||p/e!==a||B-u!==p)throw new Error("convertRadix: carry overflow");const g=B/n;a=B%n;const _=Math.floor(g);if(i[h]=_,!Number.isSafeInteger(_)||_*n+a!==B)throw new Error("convertRadix: carry overflow");if(d)_?d=!1:r=h;else continue}if(s.push(a),d)break}for(let a=0;a<t.length-1&&t[a]===0;a++)s.push(0);return s.reverse()}const lf=(t,e)=>e===0?t:lf(e,t%e),Xi=(t,e)=>t+(e-lf(t,e)),Ui=(()=>{let t=[];for(let e=0;e<40;e++)t.push(2**e);return t})();function ic(t,e,n,r){if(Gi(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(Xi(e,n)>32)throw new Error(`convertRadix2: carry overflow from=${e} to=${n} carryBits=${Xi(e,n)}`);let s=0,i=0;const o=Ui[e],a=Ui[n]-1,d=[];for(const h of t){if(hs(h),h>=o)throw new Error(`convertRadix2: invalid data word=${h} from=${e}`);if(s=s<<e|h,i+e>32)throw new Error(`convertRadix2: carry overflow pos=${i} from=${e}`);for(i+=e;i>=n;i-=n)d.push((s>>i-n&a)>>>0);const u=Ui[i];if(u===void 0)throw new Error("invalid carry");s&=u-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&&d.push(s>>>0),d}function I1(t){hs(t);const e=2**8;return{encode:n=>{if(!rs(n))throw new Error("radix.encode input should be Uint8Array");return Sl(Array.from(n),e,t)},decode:n=>(Hc("radix.decode",n),Uint8Array.from(Sl(n,t,e)))}}function qc(t,e=!1){if(hs(t),t<=0||t>32)throw new Error("radix2: bits should be in (0..32]");if(Xi(8,t)>32||Xi(t,8)>32)throw new Error("radix2: carry overflow");return{encode:n=>{if(!rs(n))throw new Error("radix2.encode input should be Uint8Array");return ic(Array.from(n),8,t,!e)},decode:n=>(Hc("radix2.decode",n),Uint8Array.from(ic(n,t,8,e)))}}function Cl(t){return df(t),function(...e){try{return t.apply(null,e)}catch{}}}function F1(t,e){return hs(t),df(e),{encode(n){if(!rs(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(!rs(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 Bl=ri(qc(4),So("0123456789ABCDEF"),Co("")),k1=typeof Uint8Array.from([]).toBase64=="function"&&typeof Uint8Array.fromBase64=="function",O1=(t,e)=>{Dr("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"})},xl=k1?{encode(t){return R1(t),t.toBase64()},decode(t){return O1(t)}}:ri(qc(6),So("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),v1(6),Co("")),N1=t=>ri(I1(58),So(t),Co("")),Ji=N1("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),U1=t=>ri(F1(4,e=>t(t(e))),Ji),oc=ri(So("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),Co("")),_l=[996825010,642813549,513874426,1027748829,705979059];function Ts(t){const e=t>>25;let n=(t&33554431)<<5;for(let r=0;r<_l.length;r++)(e>>r&1)===1&&(n^=_l[r]);return n}function Tl(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=Ts(s)^o>>5}s=Ts(s);for(let i=0;i<r;i++)s=Ts(s)^t.charCodeAt(i)&31;for(let i of e)s=Ts(s)^i;for(let i=0;i<6;i++)s=Ts(s);return s^=n,oc.encode(ic([s%Ui[30]],30,5,!1))}function L1(t){const e=t==="bech32"?1:734539939,n=qc(5),r=n.decode,s=n.encode,i=Cl(r);function o(p,B,g=90){Dr("bech32.encode prefix",p),rs(B)&&(B=Array.from(B)),Hc("bech32.encode",B);const _=p.length;if(_===0)throw new TypeError(`Invalid prefix length ${_}`);const v=_+7+B.length;if(g!==!1&&v>g)throw new TypeError(`Length ${v} exceeds limit ${g}`);const A=p.toLowerCase(),w=Tl(A,B,e);return`${A}1${oc.encode(B)}${w}`}function a(p,B=90){Dr("bech32.decode input",p);const g=p.length;if(g<8||B!==!1&&g>B)throw new TypeError(`invalid string length: ${g} (${p}). Expected (8..${B})`);const _=p.toLowerCase();if(p!==_&&p!==p.toUpperCase())throw new Error("String must be lowercase or uppercase");const v=_.lastIndexOf("1");if(v===0||v===-1)throw new Error('Letter "1" must be present between prefix and data only');const A=_.slice(0,v),w=_.slice(v+1);if(w.length<6)throw new Error("Data must be at least 6 characters long");const F=oc.decode(w).slice(0,-6),x=Tl(A,F,e);if(!w.endsWith(x))throw new Error(`Invalid checksum in ${p}: expected "${x}"`);return{prefix:A,words:F}}const d=Cl(a);function h(p){const{prefix:B,words:g}=a(p,!1);return{prefix:B,words:g,bytes:r(g)}}function u(p,B){return o(p,s(B))}return{encode:o,decode:a,encodeFromBytes:u,decodeToBytes:h,decodeUnsafe:d,fromWords:r,fromWordsUnsafe:i,toWords:s}}const uf=L1("bech32"),ff=(t,e)=>e.startsWith(t)?e.slice(t.length):e,M1=/^(?:0x)?[0-9a-fA-F]+$/,wt={valid:t=>M1.test(t),decode:t=>Bl.decode(ff("0x",t).toUpperCase()),encode:(t,e=!1)=>(t=typeof t=="string"?Pt.encode(t):t,(e?"0x":"")+Bl.encode(t).toLowerCase())},P1=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,Bo={valid:t=>P1.test(t),decode:xl.decode,encode:t=>xl.encode(typeof t=="string"?Pt.encode(t):t)},hf={decode:Ji.decode,encode:t=>Ji.encode(typeof t=="string"?Pt.encode(t):t)},Us={decode:t=>(typeof t!="string"&&(t=wt.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=wt.decode(Us.toString(t));if(!e)return n;if(e<n.length)throw new Error(`Can't fit ${t} into ${e} bytes.`);return Pt.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)}},Pt={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?Pt.concat(new Uint8Array(e-t.length),t):Pt.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}},$c=[[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"]],[AS,mf]=pr($c),si=fe($c,[1,0]),Zi=fe($c),ii=t=>si.has(t),ac=t=>Zi.has(t),fn=t=>{switch(typeof t){case"string":if(ii(t))return si(t);break;case"number":if(ac(t))return t;break}throw Error(`Cannot convert to ChainId: ${t}`)},ms=t=>{switch(typeof t){case"string":if(ii(t))return t;break;case"number":if(ac(t))return Zi(t);break;case"bigint":if(ac(Number(t)))return Zi.get(Number(t));break}throw Error(`Cannot convert to Chain: ${t}`)},Kc=[["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"]]];ef(Kc,0);const bf=fe(Kc),hn=fe(Kc,[1,0]),W1=[["Evm","hex"],["Solana","base58"],["Cosmwasm","bech32"],["Btc","bech32"],["Algorand","algorandAppId"],["Sui","hex"],["Aptos","hex"],["Near","sha256"]],z1=fe(W1),bs={byAddress:(t,e)=>Object.values(t).find(n=>pf(n.address,e)),native:t=>bs.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}},pf=(t,e)=>t.toLowerCase()===e.toLowerCase();var Dl;(function(t){t[t.Finalized=1]="Finalized",t[t.Immediate=200]="Immediate",t[t.Safe=201]="Safe"})(Dl||(Dl={}));const H1=[["Ethereum",32]];fe(H1);const q1=[["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]],gf=fe(q1),$1=[["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]],yf=fe($1);function Vc(t){const e=gf.get(t);if(e===void 0)throw new Error("Cannot find finality for "+t);const n=yf.get(t);if(n===void 0)throw new Error("Cannot find block time for "+t);return e*n}const K1=[["Evm",18],["Solana",9],["Sui",9],["Aptos",8],["Cosmwasm",6],["Algorand",6],["Btc",8],["Near",12]],Ef=fe(K1),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/"}}]]]],j1=fe(V1),G1=(t,e)=>t==="Devnet"?void 0:j1.get(t,e),Y1=[["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"]]]],X1=fe(Y1),Af=(t,e)=>X1.get(t,e)??"",wf=[["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"]]]],Sf=fe(wf),J1=fe(wf,[2,[0,1]]);function Z1(t,e){const r=J1(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 Q1=[["Mainnet","https://iris-api.circle.com/v1/attestations"],["Testnet","https://iris-api-sandbox.circle.com/v1/attestations"]],Rl=fe(Q1),eb=[["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"]]]],Ls=fe(eb),jc=[["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]]]],Cf=fe(jc,[[0,1],2]),cc=fe(jc,[[0,2],1]),[wS,SS]=pr(jc),qs=(t,e)=>Cf.has(t,e),vl=(t,e)=>cc.has(t,e),Il=(t,e)=>Ls.has(t,e),Li=(t,e)=>{switch(typeof e){case"string":if(qs(t,e))return e;break;case"number":if(vl(t,e))return cc(t,e);break;case"bigint":const n=Number(e);if(vl(t,n))return cc(t,n);break}throw Error(`Cannot convert to Chain: ${e}`)},tb=[["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"]]]],Bf=[["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"]]]],xf=[["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",""]]]],_f=[["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"}]]]],Tf=[["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"]]]],nb=[["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"]]]],rb=[["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"]]]],Df=[["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:""}]]]],sb=[["Mainnet",[["Wormchain","wormhole14ejqjyq8um4p3xfqj74yld5waqljf88fz25yxnma0cngspxe3les00fpjx"]]],["Testnet",[["Wormchain","wormhole1ctnjk7an90lz5wjfvr3cf6x984a8cjnv8dpmztmlpcq4xteaa2xs9pwmzk"]]]],ib=[["Mainnet",[["Sei","sei189adguawugk3e55zn63z8r9ll29xrjwca636ra7v7gxuzn98sxyqwzt47l"]]],["Testnet",[["Sei","sei1dkdwdvknx0qav5cp5kw68mkn3r99m3svkyjfvkztwh97dv2lm0ksj6xrak"]]]],ob=[["Mainnet",[["Polygon",["Ethereum","0x86E4Dc95c7FBdBf52e33D563BbDB00823894C287"]],["Optimism",["Ethereum","0xdfe97868233d1aa22e815a266982f2cf17685a27"]],["Arbitrum",["Ethereum","0x1c479675ad559dc151f6ec7ed3fbf8cee79582b6"]]]],["Testnet",[["Polygon",["Ethereum","0x2890ba17efe978480615e330ecb65333b880928e"]],["Optimism",["Ethereum","0xe6dfba0953616bacab0c9a8ecb3a9bba77fc15c0"]],["Arbitrum",["Ethereum","0x45af9ed1d03703e480ce7d328fb684bb67da5049"]]]]],Rf=[["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}]]]],ab=[["Mainnet",[["Solana","87MEvHZCXE3ML5rrmh5uX1FbShHmRXXS32xJDGbQ7h5t"],["Polygon","0x09959798B95d00a3183d20FaC298E4594E599eab"],["Arbitrum","0x1293a54e160D1cd7075487898d65266081A15458"],["Optimism","0x1293a54e160D1cd7075487898d65266081A15458"],["Base","0x09959798B95d00a3183d20FaC298E4594E599eab"]]]],cb=fe(tb),db=fe(Bf),lb=fe(xf),dc=fe(_f),ub=fe(Tf),fb=fe(nb),hb=fe(rb),Fl=fe(sb),kl=fe(ib),Ol=fe(Rf),Mi=fe(ab),lc=fe(Df);fe(ob);const mb=fe(Bf,[0,1]),bb=fe(xf,[0,1]),pb=fe(_f,[0,1]);fe(Tf,[0,1]);const gb=fe(Df,[0,1]),yb=fe(Rf,[0,1]),Gc=[["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"]]]],[CS,BS]=o1(pr(ji(Gc)),[1,2]);fe(Gc,[[0,2],1]);fe(Gc,[1,[0,2]]);const Yc=5,Eb=[["Mainnet",[["Ethereum","0x18084fbA666a33d37592fA2633fD49a74DD93a88"],["Solana","6DNSN2BJsaPFdFFc1zP37kkeNe4Usc1Sqkzr9C9vPWcU"],["Polygon","0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b"],["Arbitrum","0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40"],["Optimism","0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40"],["Base","0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b"]]]],Ab=fe(Eb),wb=[["Mainnet","https://executor.labsapis.com/v0"],["Testnet","https://executor-testnet.labsapis.com/v0"]],Nl=fe(wb),qr=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function xo(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function ss(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function Xt(t,...e){if(!xo(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 vf(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");ss(t.outputLen),ss(t.blockLen)}function Rr(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 Xc(t,e){Xt(t);const n=e.outputLen;if(t.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function If(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function Vn(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function Pi(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function En(t,e){return t<<32-e|t>>>e}function Sb(t,e){return t<<e|t>>>32-e>>>0}const Ff=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function kf(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}const Cb=Ff?t=>t:t=>kf(t);function Bb(t){for(let e=0;e<t.length;e++)t[e]=kf(t[e]);return t}const uc=Ff?t=>t:Bb,Of=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",xb=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function vr(t){if(Xt(t),Of)return t.toHex();let e="";for(let n=0;n<t.length;n++)e+=xb[t[n]];return e}const Mn={_0:48,_9:57,A:65,F:70,a:97,f:102};function Ul(t){if(t>=Mn._0&&t<=Mn._9)return t-Mn._0;if(t>=Mn.A&&t<=Mn.F)return t-(Mn.A-10);if(t>=Mn.a&&t<=Mn.f)return t-(Mn.a-10)}function _o(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);if(Of)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=Ul(t.charCodeAt(i)),a=Ul(t.charCodeAt(i+1));if(o===void 0||a===void 0){const d=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character "'+d+'" at index '+i)}r[s]=o*16+a}return r}function Jc(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function ps(t){return typeof t=="string"&&(t=Jc(t)),Xt(t),t}function _b(t){return typeof t=="string"&&(t=Jc(t)),Xt(t),t}function vn(...t){let e=0;for(let r=0;r<t.length;r++){const s=t[r];Xt(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 Tb(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 To=class{};function oi(t){const e=r=>t().update(ps(r)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function Db(t){const e=(r,s)=>t(s).update(ps(r)).digest(),n=t({});return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=r=>t(r),e}function Zc(t=32){if(qr&&typeof qr.getRandomValues=="function")return qr.getRandomValues(new Uint8Array(t));if(qr&&typeof qr.randomBytes=="function")return Uint8Array.from(qr.randomBytes(t));throw new Error("crypto.getRandomValues must be defined")}function Rb(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),d=r?4:0,h=r?0:4;t.setUint32(e+d,o,r),t.setUint32(e+h,a,r)}function vb(t,e,n){return t&e^~t&n}function Ib(t,e,n){return t&e^t&n^e&n}class Qc extends To{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=Pi(this.buffer)}update(e){Rr(this),e=ps(e),Xt(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 d=Pi(e);for(;s<=i-o;o+=s)this.process(d,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){Rr(this),Xc(e,this),this.finished=!0;const{buffer:n,view:r,blockLen:s,isLE:i}=this;let{pos:o}=this;n[o++]=128,Vn(this.buffer.subarray(o)),this.padOffset>s-o&&(this.process(r,0),o=0);for(let p=o;p<s;p++)n[p]=0;Rb(r,s-8,BigInt(this.length*8),i),this.process(r,0);const a=Pi(e),d=this.outputLen;if(d%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const h=d/4,u=this.get();if(h>u.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p<h;p++)a.setUint32(4*p,u[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 Yn=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]),Si=BigInt(2**32-1),Ll=BigInt(32);function Nf(t,e=!1){return e?{h:Number(t&Si),l:Number(t>>Ll&Si)}:{h:Number(t>>Ll&Si)|0,l:Number(t&Si)|0}}function Uf(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}=Nf(t[i],e);[r[i],s[i]]=[o,a]}return[r,s]}const Ml=(t,e,n)=>t>>>n,Pl=(t,e,n)=>t<<32-n|e>>>n,cr=(t,e,n)=>t>>>n|e<<32-n,dr=(t,e,n)=>t<<32-n|e>>>n,ks=(t,e,n)=>t<<64-n|e>>>n-32,Os=(t,e,n)=>t>>>n-32|e<<64-n,Fb=(t,e)=>e,kb=(t,e)=>t,Ob=(t,e,n)=>t<<n|e>>>32-n,Nb=(t,e,n)=>e<<n|t>>>32-n,Ub=(t,e,n)=>e<<n-32|t>>>64-n,Lb=(t,e,n)=>t<<n-32|e>>>64-n;function Sn(t,e,n,r){const s=(e>>>0)+(r>>>0);return{h:t+n+(s/2**32|0)|0,l:s|0}}const Lf=(t,e,n)=>(t>>>0)+(e>>>0)+(n>>>0),Mf=(t,e,n,r)=>e+n+r+(t/2**32|0)|0,Mb=(t,e,n,r)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0),Pb=(t,e,n,r,s)=>e+n+r+s+(t/2**32|0)|0,Wb=(t,e,n,r,s)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0)+(s>>>0),zb=(t,e,n,r,s,i)=>e+n+r+s+i+(t/2**32|0)|0,Hb=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]),Xn=new Uint32Array(64);class qb extends Qc{constructor(e=32){super(64,e,8,!1),this.A=Yn[0]|0,this.B=Yn[1]|0,this.C=Yn[2]|0,this.D=Yn[3]|0,this.E=Yn[4]|0,this.F=Yn[5]|0,this.G=Yn[6]|0,this.H=Yn[7]|0}get(){const{A:e,B:n,C:r,D:s,E:i,F:o,G:a,H:d}=this;return[e,n,r,s,i,o,a,d]}set(e,n,r,s,i,o,a,d){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=d|0}process(e,n){for(let p=0;p<16;p++,n+=4)Xn[p]=e.getUint32(n,!1);for(let p=16;p<64;p++){const B=Xn[p-15],g=Xn[p-2],_=En(B,7)^En(B,18)^B>>>3,v=En(g,17)^En(g,19)^g>>>10;Xn[p]=v+Xn[p-7]+_+Xn[p-16]|0}let{A:r,B:s,C:i,D:o,E:a,F:d,G:h,H:u}=this;for(let p=0;p<64;p++){const B=En(a,6)^En(a,11)^En(a,25),g=u+B+vb(a,d,h)+Hb[p]+Xn[p]|0,v=(En(r,2)^En(r,13)^En(r,22))+Ib(r,s,i)|0;u=h,h=d,d=a,a=o+g|0,o=i,i=s,s=r,r=g+v|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,d=d+this.F|0,h=h+this.G|0,u=u+this.H|0,this.set(r,s,i,o,a,d,h,u)}roundClean(){Vn(Xn)}destroy(){this.set(0,0,0,0,0,0,0,0),Vn(this.buffer)}}const Pf=Uf(["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))),$b=Pf[0],Kb=Pf[1],Jn=new Uint32Array(80),Zn=new Uint32Array(80);class Wf extends Qc{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:d,Eh:h,El:u,Fh:p,Fl:B,Gh:g,Gl:_,Hh:v,Hl:A}=this;return[e,n,r,s,i,o,a,d,h,u,p,B,g,_,v,A]}set(e,n,r,s,i,o,a,d,h,u,p,B,g,_,v,A){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=d|0,this.Eh=h|0,this.El=u|0,this.Fh=p|0,this.Fl=B|0,this.Gh=g|0,this.Gl=_|0,this.Hh=v|0,this.Hl=A|0}process(e,n){for(let x=0;x<16;x++,n+=4)Jn[x]=e.getUint32(n),Zn[x]=e.getUint32(n+=4);for(let x=16;x<80;x++){const N=Jn[x-15]|0,k=Zn[x-15]|0,q=cr(N,k,1)^cr(N,k,8)^Ml(N,k,7),G=dr(N,k,1)^dr(N,k,8)^Pl(N,k,7),Y=Jn[x-2]|0,M=Zn[x-2]|0,j=cr(Y,M,19)^ks(Y,M,61)^Ml(Y,M,6),P=dr(Y,M,19)^Os(Y,M,61)^Pl(Y,M,6),$=Mb(G,P,Zn[x-7],Zn[x-16]),C=Pb($,q,j,Jn[x-7],Jn[x-16]);Jn[x]=C|0,Zn[x]=$|0}let{Ah:r,Al:s,Bh:i,Bl:o,Ch:a,Cl:d,Dh:h,Dl:u,Eh:p,El:B,Fh:g,Fl:_,Gh:v,Gl:A,Hh:w,Hl:F}=this;for(let x=0;x<80;x++){const N=cr(p,B,14)^cr(p,B,18)^ks(p,B,41),k=dr(p,B,14)^dr(p,B,18)^Os(p,B,41),q=p&g^~p&v,G=B&_^~B&A,Y=Wb(F,k,G,Kb[x],Zn[x]),M=zb(Y,w,N,q,$b[x],Jn[x]),j=Y|0,P=cr(r,s,28)^ks(r,s,34)^ks(r,s,39),$=dr(r,s,28)^Os(r,s,34)^Os(r,s,39),C=r&i^r&a^i&a,c=s&o^s&d^o&d;w=v|0,F=A|0,v=g|0,A=_|0,g=p|0,_=B|0,{h:p,l:B}=Sn(h|0,u|0,M|0,j|0),h=a|0,u=d|0,a=i|0,d=o|0,i=r|0,o=s|0;const b=Lf(j,$,c);r=Mf(b,M,P,C),s=b|0}({h:r,l:s}=Sn(this.Ah|0,this.Al|0,r|0,s|0)),{h:i,l:o}=Sn(this.Bh|0,this.Bl|0,i|0,o|0),{h:a,l:d}=Sn(this.Ch|0,this.Cl|0,a|0,d|0),{h,l:u}=Sn(this.Dh|0,this.Dl|0,h|0,u|0),{h:p,l:B}=Sn(this.Eh|0,this.El|0,p|0,B|0),{h:g,l:_}=Sn(this.Fh|0,this.Fl|0,g|0,_|0),{h:v,l:A}=Sn(this.Gh|0,this.Gl|0,v|0,A|0),{h:w,l:F}=Sn(this.Hh|0,this.Hl|0,w|0,F|0),this.set(r,s,i,o,a,d,h,u,p,B,g,_,v,A,w,F)}roundClean(){Vn(Jn,Zn)}destroy(){Vn(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Ft=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class Vb extends Wf{constructor(){super(32),this.Ah=Ft[0]|0,this.Al=Ft[1]|0,this.Bh=Ft[2]|0,this.Bl=Ft[3]|0,this.Ch=Ft[4]|0,this.Cl=Ft[5]|0,this.Dh=Ft[6]|0,this.Dl=Ft[7]|0,this.Eh=Ft[8]|0,this.El=Ft[9]|0,this.Fh=Ft[10]|0,this.Fl=Ft[11]|0,this.Gh=Ft[12]|0,this.Gl=Ft[13]|0,this.Hh=Ft[14]|0,this.Hl=Ft[15]|0}}const ed=oi(()=>new qb),td=oi(()=>new Wf),jb=oi(()=>new Vb),Qi=ed,Gb=BigInt(0),Ds=BigInt(1),Yb=BigInt(2),Xb=BigInt(7),Jb=BigInt(256),Zb=BigInt(113),zf=[],Hf=[],qf=[];for(let t=0,e=Ds,n=1,r=0;t<24;t++){[n,r]=[r,(2*n+3*r)%5],zf.push(2*(5*r+n)),Hf.push((t+1)*(t+2)/2%64);let s=Gb;for(let i=0;i<7;i++)e=(e<<Ds^(e>>Xb)*Zb)%Jb,e&Yb&&(s^=Ds<<(Ds<<BigInt(i))-Ds);qf.push(s)}const $f=Uf(qf,!0),Qb=$f[0],ep=$f[1],Wl=(t,e,n)=>n>32?Ub(t,e,n):Ob(t,e,n),zl=(t,e,n)=>n>32?Lb(t,e,n):Nb(t,e,n);function tp(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,d=(o+2)%10,h=n[d],u=n[d+1],p=Wl(h,u,1)^n[a],B=zl(h,u,1)^n[a+1];for(let g=0;g<50;g+=10)t[o+g]^=p,t[o+g+1]^=B}let s=t[2],i=t[3];for(let o=0;o<24;o++){const a=Hf[o],d=Wl(s,i,a),h=zl(s,i,a),u=zf[o];s=t[u],i=t[u+1],t[u]=d,t[u+1]=h}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]^=Qb[r],t[1]^=ep[r]}Vn(n)}let np=class Kf extends To{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,ss(r),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=If(this.state)}clone(){return this._cloneInto()}keccak(){uc(this.state32),tp(this.state32,this.rounds),uc(this.state32),this.posOut=0,this.pos=0}update(e){Rr(this),e=ps(e),Xt(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){Rr(this,!1),Xt(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 ss(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Xc(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,Vn(this.state)}_cloneInto(e){const{blockLen:n,suffix:r,outputLen:s,rounds:i,enableXOF:o}=this;return e||(e=new Kf(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 Vf=(t,e,n)=>oi(()=>new np(e,t,n)),rp=Vf(6,136,256/8),$s=Vf(1,136,256/8),sp=td,ip=jb;class jf extends To{constructor(e,n){super(),this.finished=!1,this.destroyed=!1,vf(e);const r=ps(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),Vn(i)}update(e){return Rr(this),this.iHash.update(e),this}digestInto(e){Rr(this),Xt(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 nd=(t,e,n)=>new jf(t,e).update(n).digest();nd.create=(t,e)=>new jf(t,e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const rd=BigInt(0),eo=BigInt(1);function Ir(t,e){if(typeof e!="boolean")throw new Error(t+" boolean expected, got "+e)}function Ci(t){const e=t.toString(16);return e.length&1?"0"+e:e}function Gf(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?rd:BigInt("0x"+t)}function ai(t){return Gf(vr(t))}function Ks(t){return Xt(t),Gf(vr(Uint8Array.from(t).reverse()))}function sd(t,e){return _o(t.toString(16).padStart(e*2,"0"))}function Do(t,e){return sd(t,e).reverse()}function Je(t,e,n){let r;if(typeof e=="string")try{r=_o(e)}catch(i){throw new Error(t+" must be hex string or Uint8Array, cause: "+i)}else if(xo(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 Da=t=>typeof t=="bigint"&&rd<=t;function Yf(t,e,n){return Da(t)&&Da(e)&&Da(n)&&e<=t&&t<n}function jr(t,e,n,r){if(!Yf(e,n,r))throw new Error("expected valid "+t+": "+n+" <= n < "+r+", got "+e)}function Xf(t){let e;for(e=0;t>rd;t>>=eo,e+=1);return e}function op(t,e){return t>>BigInt(e)&eo}const ci=t=>(eo<<BigInt(t))-eo;function ap(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=g=>new Uint8Array(g),s=g=>Uint8Array.of(g);let i=r(t),o=r(t),a=0;const d=()=>{i.fill(1),o.fill(0),a=0},h=(...g)=>n(o,i,...g),u=(g=r(0))=>{o=h(s(0),g),i=h(),g.length!==0&&(o=h(s(1),g),i=h())},p=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let g=0;const _=[];for(;g<e;){i=h();const v=i.slice();_.push(v),g+=i.length}return vn(..._)};return(g,_)=>{d(),u(g);let v;for(;!(v=_(p()));)u();return d(),v}}function cp(t){return typeof t=="function"&&Number.isSafeInteger(t.outputLen)}function gs(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 d=typeof a;if(d!==i||a===null)throw new Error(`param "${s}" is invalid: expected ${i}, got ${d}`)}Object.entries(e).forEach(([s,i])=>r(s,i,!1)),Object.entries(n).forEach(([s,i])=>r(s,i,!0))}const dp=()=>{throw new Error("not implemented")};function Vs(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),vt=BigInt(1),yr=BigInt(2),lp=BigInt(3),Jf=BigInt(4),Zf=BigInt(5),Qf=BigInt(8);function Ze(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 Hl(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=Ze(t,e),r=e,s=jt,i=vt;for(;n!==jt;){const a=r/n,d=r%n,h=s-i*a;r=n,n=d,s=i,i=h}if(r!==vt)throw new Error("invert: does not exist");return Ze(s,e)}function e0(t,e){const n=(t.ORDER+vt)/Jf,r=t.pow(e,n);if(!t.eql(t.sqr(r),e))throw new Error("Cannot find square root");return r}function up(t,e){const n=(t.ORDER-Zf)/Qf,r=t.mul(e,yr),s=t.pow(r,n),i=t.mul(e,s),o=t.mul(t.mul(i,yr),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 fp(t){if(t<BigInt(3))throw new Error("sqrt is not defined for small field");let e=t-vt,n=0;for(;e%yr===jt;)e/=yr,n++;let r=yr;const s=Nr(t);for(;fc(s,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return e0;let i=s.pow(r,e);const o=(e+vt)/yr;return function(d,h){if(d.is0(h))return h;if(fc(d,h)!==1)throw new Error("Cannot find square root");let u=n,p=d.mul(d.ONE,i),B=d.pow(h,e),g=d.pow(h,o);for(;!d.eql(B,d.ONE);){if(d.is0(B))return d.ZERO;let _=1,v=d.sqr(B);for(;!d.eql(v,d.ONE);)if(_++,v=d.sqr(v),_===u)throw new Error("Cannot find square root");const A=vt<<BigInt(u-_-1),w=d.pow(p,A);u=_,p=d.sqr(w),B=d.mul(B,p),g=d.mul(g,w)}return g}}function hp(t){return t%Jf===lp?e0:t%Qf===Zf?up:fp(t)}const mp=(t,e)=>(Ze(t,e)&vt)===vt,bp=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function pp(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"},n=bp.reduce((r,s)=>(r[s]="function",r),e);return gs(t,n),t}function t0(t,e,n){if(n<jt)throw new Error("invalid exponent, negatives unsupported");if(n===jt)return t.ONE;if(n===vt)return e;let r=t.ONE,s=e;for(;n>jt;)n&vt&&(r=t.mul(r,s)),s=t.sqr(s),n>>=vt;return r}function id(t,e,n=!1){const r=new Array(e.length).fill(n?t.ZERO:void 0),s=e.reduce((o,a,d)=>t.is0(a)?o:(r[d]=o,t.mul(o,a)),t.ONE),i=t.inv(s);return e.reduceRight((o,a,d)=>t.is0(a)?o:(r[d]=t.mul(o,r[d]),t.mul(o,a)),i),r}function fc(t,e){const n=(t.ORDER-vt)/yr,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 gp(t,e){e!==void 0&&ss(e);const n=e!==void 0?e:t.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function Nr(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 u=e;u.BITS&&(s=u.BITS),u.sqrt&&(i=u.sqrt),typeof u.isLE=="boolean"&&(n=u.isLE)}else typeof e=="number"&&(s=e),r.sqrt&&(i=r.sqrt);const{nBitLength:o,nByteLength:a}=gp(t,s);if(a>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let d;const h=Object.freeze({ORDER:t,isLE:n,BITS:o,BYTES:a,MASK:ci(o),ZERO:jt,ONE:vt,create:u=>Ze(u,t),isValid:u=>{if(typeof u!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof u);return jt<=u&&u<t},is0:u=>u===jt,isValidNot0:u=>!h.is0(u)&&h.isValid(u),isOdd:u=>(u&vt)===vt,neg:u=>Ze(-u,t),eql:(u,p)=>u===p,sqr:u=>Ze(u*u,t),add:(u,p)=>Ze(u+p,t),sub:(u,p)=>Ze(u-p,t),mul:(u,p)=>Ze(u*p,t),pow:(u,p)=>t0(h,u,p),div:(u,p)=>Ze(u*Hl(p,t),t),sqrN:u=>u*u,addN:(u,p)=>u+p,subN:(u,p)=>u-p,mulN:(u,p)=>u*p,inv:u=>Hl(u,t),sqrt:i||(u=>(d||(d=hp(t)),d(h,u))),toBytes:u=>n?Do(u,a):sd(u,a),fromBytes:u=>{if(u.length!==a)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+u.length);return n?Ks(u):ai(u)},invertBatch:u=>id(h,u),cmov:(u,p,B)=>B?p:u});return Object.freeze(h)}function n0(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 od(t){const e=n0(t);return e+Math.ceil(e/2)}function r0(t,e,n=!1){const r=t.length,s=n0(e),i=od(e);if(r<16||r<i||r>1024)throw new Error("expected "+i+"-1024 bytes of input, got "+r);const o=n?Ks(t):ai(t),a=Ze(o,e-vt)+vt;return n?Do(a,s):sd(a,s)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const is=BigInt(0),Er=BigInt(1);function Ms(t,e){const n=e.negate();return t?n:e}function ad(t,e,n){const r=e==="pz"?o=>o.pz:o=>o.ez,s=id(t.Fp,n.map(r));return n.map((o,a)=>o.toAffine(s[a])).map(t.fromAffine)}function s0(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function Ra(t,e){s0(t,e);const n=Math.ceil(e/t)+1,r=2**(t-1),s=2**t,i=ci(t),o=BigInt(t);return{windows:n,windowSize:r,mask:i,maxNumber:s,shiftBy:o}}function ql(t,e,n){const{windowSize:r,mask:s,maxNumber:i,shiftBy:o}=n;let a=Number(t&s),d=t>>o;a>r&&(a-=i,d+=Er);const h=e*r,u=h+Math.abs(a)-1,p=a===0,B=a<0,g=e%2!==0;return{nextN:d,offset:u,isZero:p,isNeg:B,isNegF:g,offsetF:h}}function yp(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 va=new WeakMap,i0=new WeakMap;function Ia(t){return i0.get(t)||1}function $l(t){if(t!==is)throw new Error("invalid wNAF")}function o0(t,e){return{constTimeNegate:Ms,hasPrecomputes(n){return Ia(n)!==1},unsafeLadder(n,r,s=t.ZERO){let i=n;for(;r>is;)r&Er&&(s=s.add(i)),i=i.double(),r>>=Er;return s},precomputeWindow(n,r){const{windows:s,windowSize:i}=Ra(r,e),o=[];let a=n,d=a;for(let h=0;h<s;h++){d=a,o.push(d);for(let u=1;u<i;u++)d=d.add(a),o.push(d);a=d.double()}return o},wNAF(n,r,s){let i=t.ZERO,o=t.BASE;const a=Ra(n,e);for(let d=0;d<a.windows;d++){const{nextN:h,offset:u,isZero:p,isNeg:B,isNegF:g,offsetF:_}=ql(s,d,a);s=h,p?o=o.add(Ms(g,r[_])):i=i.add(Ms(B,r[u]))}return $l(s),{p:i,f:o}},wNAFUnsafe(n,r,s,i=t.ZERO){const o=Ra(n,e);for(let a=0;a<o.windows&&s!==is;a++){const{nextN:d,offset:h,isZero:u,isNeg:p}=ql(s,a,o);if(s=d,!u){const B=r[h];i=i.add(p?B.negate():B)}}return $l(s),i},getPrecomputes(n,r,s){let i=va.get(r);return i||(i=this.precomputeWindow(r,n),n!==1&&(typeof s=="function"&&(i=s(i)),va.set(r,i))),i},wNAFCached(n,r,s){const i=Ia(n);return this.wNAF(i,this.getPrecomputes(i,n,s),r)},wNAFCachedUnsafe(n,r,s,i){const o=Ia(n);return o===1?this.unsafeLadder(n,r,i):this.wNAFUnsafe(o,this.getPrecomputes(o,n,s),r,i)},setWindowSize(n,r){s0(r,e),i0.set(n,r),va.delete(n)}}}function Ap(t,e,n,r){let s=e,i=t.ZERO,o=t.ZERO;for(;n>is||r>is;)n&Er&&(i=i.add(s)),r&Er&&(o=o.add(s)),s=s.double(),n>>=Er,r>>=Er;return{p1:i,p2:o}}function a0(t,e,n,r){yp(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=Xf(BigInt(s));let d=1;a>12?d=a-3:a>4?d=a-2:a>0&&(d=2);const h=ci(d),u=new Array(Number(h)+1).fill(o),p=Math.floor((e.BITS-1)/d)*d;let B=o;for(let g=p;g>=0;g-=d){u.fill(o);for(let v=0;v<i;v++){const A=r[v],w=Number(A>>BigInt(g)&h);u[w]=u[w].add(n[v])}let _=o;for(let v=u.length-1,A=o;v>0;v--)A=A.add(u[v]),_=_.add(A);if(B=B.add(_),g!==0)for(let v=0;v<d;v++)B=B.double()}return B}function Kl(t,e){if(e){if(e.ORDER!==t)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return pp(e),e}else return Nr(t)}function c0(t,e,n={}){if(!e||typeof e!="object")throw new Error(`expected valid ${t} CURVE object`);for(const a of["p","n","h"]){const d=e[a];if(!(typeof d=="bigint"&&d>is))throw new Error(`CURVE.${a} must be positive bigint`)}const r=Kl(e.p,n.Fp),s=Kl(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 Vl(t){t.lowS!==void 0&&Ir("lowS",t.lowS),t.prehash!==void 0&&Ir("prehash",t.prehash)}class wp extends Error{constructor(e=""){super(e)}}const zn={Err:wp,_tlv:{encode:(t,e)=>{const{Err:n}=zn;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=Ci(r);if(s.length/2&128)throw new n("tlv.encode: long form length too big");const i=r>127?Ci(s.length/2|128):"";return Ci(t)+i+s+e},decode(t,e){const{Err:n}=zn;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 d=s&127;if(!d)throw new n("tlv.decode(long): indefinite length not supported");if(d>4)throw new n("tlv.decode(long): byte length is too big");const h=e.subarray(r,r+d);if(h.length!==d)throw new n("tlv.decode: length bytes not complete");if(h[0]===0)throw new n("tlv.decode(long): zero leftmost byte");for(const u of h)o=o<<8|u;if(r+=d,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}=zn;if(t<Ps)throw new e("integer: negative integers are not allowed");let n=Ci(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}=zn;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 ai(t)}},toSig(t){const{Err:e,_int:n,_tlv:r}=zn,s=Je("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:d}=r.decode(2,i),{v:h,l:u}=r.decode(2,d);if(u.length)throw new e("invalid signature: left bytes after parsing");return{r:n.decode(a),s:n.decode(h)}},hexFromSig(t){const{_tlv:e,_int:n}=zn,r=e.encode(2,n.encode(t.r)),s=e.encode(2,n.encode(t.s)),i=r+s;return e.encode(48,i)}},Ps=BigInt(0),Zr=BigInt(1),Sp=BigInt(2),Bi=BigInt(3),Cp=BigInt(4);function d0(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 cd(t,e,n){const{BYTES:r}=t;function s(i){let o;if(typeof i=="bigint")o=i;else{let a=Je("private key",i);if(e){if(!e.includes(a.length*2))throw new Error("invalid private key");const d=new Uint8Array(r);d.set(a,d.length-a.length),a=d}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 l0(t,e={}){const{Fp:n,Fn:r}=c0("weierstrass",t,e),{h:s,n:i}=t;gs(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 d(Y,M,j){const{x:P,y:$}=M.toAffine(),C=n.toBytes(P);if(Ir("isCompressed",j),j){a();const c=!n.isOdd($);return vn(u0(c),C)}else return vn(Uint8Array.of(4),C,n.toBytes($))}function h(Y){Xt(Y);const M=n.BYTES,j=M+1,P=2*M+1,$=Y.length,C=Y[0],c=Y.subarray(1);if($===j&&(C===2||C===3)){const b=n.fromBytes(c);if(!n.isValid(b))throw new Error("bad point: is not on curve, wrong x");const y=B(b);let T;try{T=n.sqrt(y)}catch(L){const S=L instanceof Error?": "+L.message:"";throw new Error("bad point: is not on curve, sqrt error"+S)}a();const R=n.isOdd(T);return(C&1)===1!==R&&(T=n.neg(T)),{x:b,y:T}}else if($===P&&C===4){const b=n.fromBytes(c.subarray(M*0,M*1)),y=n.fromBytes(c.subarray(M*1,M*2));if(!g(b,y))throw new Error("bad point: is not on curve");return{x:b,y}}else throw new Error(`bad point: got length ${$}, expected compressed=${j} or uncompressed=${P}`)}const u=e.toBytes||d,p=e.fromBytes||h,B=d0(n,t.a,t.b);function g(Y,M){const j=n.sqr(M),P=B(Y);return n.eql(j,P)}if(!g(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const _=n.mul(n.pow(t.a,Bi),Cp),v=n.mul(n.sqr(t.b),BigInt(27));if(n.is0(n.add(_,v)))throw new Error("bad curve params: a or b");function A(Y,M,j=!1){if(!n.isValid(M)||j&&n.is0(M))throw new Error(`bad point coordinate ${Y}`);return M}function w(Y){if(!(Y instanceof k))throw new Error("ProjectivePoint expected")}const F=Vs((Y,M)=>{const{px:j,py:P,pz:$}=Y;if(n.eql($,n.ONE))return{x:j,y:P};const C=Y.is0();M==null&&(M=C?n.ONE:n.inv($));const c=n.mul(j,M),b=n.mul(P,M),y=n.mul($,M);if(C)return{x:n.ZERO,y:n.ZERO};if(!n.eql(y,n.ONE))throw new Error("invZ was invalid");return{x:c,y:b}}),x=Vs(Y=>{if(Y.is0()){if(e.allowInfinityPoint&&!n.is0(Y.py))return;throw new Error("bad point: ZERO")}const{x:M,y:j}=Y.toAffine();if(!n.isValid(M)||!n.isValid(j))throw new Error("bad point: x or y not field elements");if(!g(M,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 N(Y,M,j,P,$){return j=new k(n.mul(j.px,Y),j.py,j.pz),M=Ms(P,M),j=Ms($,j),M.add(j)}class k{constructor(M,j,P){this.px=A("x",M),this.py=A("y",j,!0),this.pz=A("z",P),Object.freeze(this)}static fromAffine(M){const{x:j,y:P}=M||{};if(!M||!n.isValid(j)||!n.isValid(P))throw new Error("invalid affine point");if(M instanceof k)throw new Error("projective point not allowed");return n.is0(j)&&n.is0(P)?k.ZERO:new k(j,P,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(M){return ad(k,"pz",M)}static fromBytes(M){return Xt(M),k.fromHex(M)}static fromHex(M){const j=k.fromAffine(p(Je("pointHex",M)));return j.assertValidity(),j}static fromPrivateKey(M){const j=cd(r,e.allowedPrivateKeyLengths,e.wrapPrivateKey);return k.BASE.multiply(j(M))}static msm(M,j){return a0(k,r,M,j)}precompute(M=8,j=!0){return G.setWindowSize(this,M),j||this.multiply(Bi),this}_setWindowSize(M){this.precompute(M)}assertValidity(){x(this)}hasEvenY(){const{y:M}=this.toAffine();if(!n.isOdd)throw new Error("Field doesn't support isOdd");return!n.isOdd(M)}equals(M){w(M);const{px:j,py:P,pz:$}=this,{px:C,py:c,pz:b}=M,y=n.eql(n.mul(j,b),n.mul(C,$)),T=n.eql(n.mul(P,b),n.mul(c,$));return y&&T}negate(){return new k(this.px,n.neg(this.py),this.pz)}double(){const{a:M,b:j}=t,P=n.mul(j,Bi),{px:$,py:C,pz:c}=this;let b=n.ZERO,y=n.ZERO,T=n.ZERO,R=n.mul($,$),O=n.mul(C,C),L=n.mul(c,c),S=n.mul($,C);return S=n.add(S,S),T=n.mul($,c),T=n.add(T,T),b=n.mul(M,T),y=n.mul(P,L),y=n.add(b,y),b=n.sub(O,y),y=n.add(O,y),y=n.mul(b,y),b=n.mul(S,b),T=n.mul(P,T),L=n.mul(M,L),S=n.sub(R,L),S=n.mul(M,S),S=n.add(S,T),T=n.add(R,R),R=n.add(T,R),R=n.add(R,L),R=n.mul(R,S),y=n.add(y,R),L=n.mul(C,c),L=n.add(L,L),R=n.mul(L,S),b=n.sub(b,R),T=n.mul(L,O),T=n.add(T,T),T=n.add(T,T),new k(b,y,T)}add(M){w(M);const{px:j,py:P,pz:$}=this,{px:C,py:c,pz:b}=M;let y=n.ZERO,T=n.ZERO,R=n.ZERO;const O=t.a,L=n.mul(t.b,Bi);let S=n.mul(j,C),m=n.mul(P,c),I=n.mul($,b),se=n.add(j,P),J=n.add(C,c);se=n.mul(se,J),J=n.add(S,m),se=n.sub(se,J),J=n.add(j,$);let ee=n.add(C,b);return J=n.mul(J,ee),ee=n.add(S,I),J=n.sub(J,ee),ee=n.add(P,$),y=n.add(c,b),ee=n.mul(ee,y),y=n.add(m,I),ee=n.sub(ee,y),R=n.mul(O,J),y=n.mul(L,I),R=n.add(y,R),y=n.sub(m,R),R=n.add(m,R),T=n.mul(y,R),m=n.add(S,S),m=n.add(m,S),I=n.mul(O,I),J=n.mul(L,J),m=n.add(m,I),I=n.sub(S,I),I=n.mul(O,I),J=n.add(J,I),S=n.mul(m,J),T=n.add(T,S),S=n.mul(ee,J),y=n.mul(se,y),y=n.sub(y,S),S=n.mul(se,m),R=n.mul(ee,R),R=n.add(R,S),new k(y,T,R)}subtract(M){return this.add(M.negate())}is0(){return this.equals(k.ZERO)}multiply(M){const{endo:j}=e;if(!r.isValidNot0(M))throw new Error("invalid scalar: out of range");let P,$;const C=c=>G.wNAFCached(this,c,k.normalizeZ);if(j){const{k1neg:c,k1:b,k2neg:y,k2:T}=j.splitScalar(M),{p:R,f:O}=C(b),{p:L,f:S}=C(T);$=O.add(S),P=N(j.beta,R,L,c,y)}else{const{p:c,f:b}=C(M);P=c,$=b}return k.normalizeZ([P,$])[0]}multiplyUnsafe(M){const{endo:j}=e,P=this;if(!r.isValid(M))throw new Error("invalid scalar: out of range");if(M===Ps||P.is0())return k.ZERO;if(M===Zr)return P;if(G.hasPrecomputes(this))return this.multiply(M);if(j){const{k1neg:$,k1:C,k2neg:c,k2:b}=j.splitScalar(M),{p1:y,p2:T}=Ap(k,P,C,b);return N(j.beta,y,T,$,c)}else return G.wNAFCachedUnsafe(P,M)}multiplyAndAddUnsafe(M,j,P){const $=this.multiplyUnsafe(j).add(M.multiplyUnsafe(P));return $.is0()?void 0:$}toAffine(M){return F(this,M)}isTorsionFree(){const{isTorsionFree:M}=e;return s===Zr?!0:M?M(k,this):G.wNAFCachedUnsafe(this,i).is0()}clearCofactor(){const{clearCofactor:M}=e;return s===Zr?this:M?M(k,this):this.multiplyUnsafe(s)}toBytes(M=!0){return Ir("isCompressed",M),this.assertValidity(),u(k,this,M)}toRawBytes(M=!0){return this.toBytes(M)}toHex(M=!0){return vr(this.toBytes(M))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}k.BASE=new k(t.Gx,t.Gy,n.ONE),k.ZERO=new k(n.ZERO,n.ONE,n.ZERO),k.Fp=n,k.Fn=r;const q=r.BITS,G=o0(k,e.endo?Math.ceil(q/2):q);return k}function Bp(t){const{CURVE:e,curveOpts:n}=f0(t),r=l0(e,n);return Tp(t,r)}function u0(t){return Uint8Array.of(t?2:3)}function xp(t,e,n={}){gs(e,{hash:"function"},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const r=e.randomBytes||Zc,s=e.hmac||((P,...$)=>nd(e.hash,P,vn(...$))),{Fp:i,Fn:o}=t,{ORDER:a,BITS:d}=o;function h(P){const $=a>>Zr;return P>$}function u(P){return h(P)?o.neg(P):P}function p(P,$){if(!o.isValidNot0($))throw new Error(`invalid signature ${P}: out of range 1..CURVE.n`)}class B{constructor($,C,c){p("r",$),p("s",C),this.r=$,this.s=C,c!=null&&(this.recovery=c),Object.freeze(this)}static fromCompact($){const C=o.BYTES,c=Je("compactSignature",$,C*2);return new B(o.fromBytes(c.subarray(0,C)),o.fromBytes(c.subarray(C,C*2)))}static fromDER($){const{r:C,s:c}=zn.toSig(Je("DER",$));return new B(C,c)}assertValidity(){}addRecoveryBit($){return new B(this.r,this.s,$)}recoverPublicKey($){const C=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*Sp<C&&y>1)throw new Error("recovery id is ambiguous for h>1 curve");const R=y===2||y===3?c+a:c;if(!i.isValid(R))throw new Error("recovery id 2 or 3 invalid");const O=i.toBytes(R),L=t.fromHex(vn(u0((y&1)===0),O)),S=o.inv(R),m=x(Je("msgHash",$)),I=o.create(-m*S),se=o.create(b*S),J=t.BASE.multiplyUnsafe(I).add(L.multiplyUnsafe(se));if(J.is0())throw new Error("point at infinify");return J.assertValidity(),J}hasHighS(){return h(this.s)}normalizeS(){return this.hasHighS()?new B(this.r,o.neg(this.s),this.recovery):this}toBytes($){if($==="compact")return vn(o.toBytes(this.r),o.toBytes(this.s));if($==="der")return _o(zn.hexFromSig(this));throw new Error("invalid format")}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return vr(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return vr(this.toBytes("compact"))}}const g=cd(o,n.allowedPrivateKeyLengths,n.wrapPrivateKey),_={isValidPrivateKey(P){try{return g(P),!0}catch{return!1}},normPrivateKeyToScalar:g,randomPrivateKey:()=>{const P=a;return r0(r(od(P)),P)},precompute(P=8,$=t.BASE){return $.precompute(P,!1)}};function v(P,$=!0){return t.fromPrivateKey(P).toBytes($)}function A(P){if(typeof P=="bigint")return!1;if(P instanceof t)return!0;const C=Je("key",P).length,c=i.BYTES,b=c+1,y=2*c+1;if(!(n.allowedPrivateKeyLengths||o.BYTES===b))return C===b||C===y}function w(P,$,C=!0){if(A(P)===!0)throw new Error("first arg must be private key");if(A($)===!1)throw new Error("second arg must be public key");return t.fromHex($).multiply(g(P)).toBytes(C)}const F=e.bits2int||function(P){if(P.length>8192)throw new Error("input is too large");const $=ai(P),C=P.length*8-d;return C>0?$>>BigInt(C):$},x=e.bits2int_modN||function(P){return o.create(F(P))},N=ci(d);function k(P){return jr("num < 2^"+d,P,Ps,N),o.toBytes(P)}function q(P,$,C=G){if(["recovered","canonical"].some(se=>se in C))throw new Error("sign() legacy options not supported");const{hash:c}=e;let{lowS:b,prehash:y,extraEntropy:T}=C;b==null&&(b=!0),P=Je("msgHash",P),Vl(C),y&&(P=Je("prehashed msgHash",c(P)));const R=x(P),O=g($),L=[k(O),k(R)];if(T!=null&&T!==!1){const se=T===!0?r(i.BYTES):T;L.push(Je("extraEntropy",se))}const S=vn(...L),m=R;function I(se){const J=F(se);if(!o.isValidNot0(J))return;const ee=o.inv(J),Te=t.BASE.multiply(J).toAffine(),de=o.create(Te.x);if(de===Ps)return;const pe=o.create(ee*o.create(m+de*O));if(pe===Ps)return;let dn=(Te.x===de?0:2)|Number(Te.y&Zr),Ce=pe;return b&&h(pe)&&(Ce=u(pe),dn^=1),new B(de,Ce,dn)}return{seed:S,k2sig:I}}const G={lowS:e.lowS,prehash:!1},Y={lowS:e.lowS,prehash:!1};function M(P,$,C=G){const{seed:c,k2sig:b}=q(P,$,C);return ap(e.hash.outputLen,o.BYTES,s)(c,b)}t.BASE.precompute(8);function j(P,$,C,c=Y){const b=P;$=Je("msgHash",$),C=Je("publicKey",C),Vl(c);const{lowS:y,prehash:T,format:R}=c;if("strict"in c)throw new Error("options.strict was renamed to lowS");if(R!==void 0&&!["compact","der","js"].includes(R))throw new Error('format must be "compact", "der" or "js"');const O=typeof b=="string"||xo(b),L=!O&&!R&&typeof b=="object"&&b!==null&&typeof b.r=="bigint"&&typeof b.s=="bigint";if(!O&&!L)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let S,m;try{if(L)if(R===void 0||R==="js")S=new B(b.r,b.s);else throw new Error("invalid format");if(O){try{R!=="compact"&&(S=B.fromDER(b))}catch(Ce){if(!(Ce instanceof zn.Err))throw Ce}!S&&R!=="der"&&(S=B.fromCompact(b))}m=t.fromHex(C)}catch{return!1}if(!S||y&&S.hasHighS())return!1;T&&($=e.hash($));const{r:I,s:se}=S,J=x($),ee=o.inv(se),Te=o.create(J*ee),de=o.create(I*ee),pe=t.BASE.multiplyUnsafe(Te).add(m.multiplyUnsafe(de));return pe.is0()?!1:o.create(pe.x)===I}return Object.freeze({getPublicKey:v,getSharedSecret:w,sign:M,verify:j,utils:_,Point:t,Signature:B})}function f0(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=Nr(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 _p(t){const{CURVE:e,curveOpts:n}=f0(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 Tp(t,e){const{Fp:n,Fn:r}=e;function s(a){return Yf(a,Zr,r.ORDER)}const i=d0(n,t.a,t.b),o=cd(r,t.allowedPrivateKeyLengths,t.wrapPrivateKey);return Object.assign({},{CURVE:t,Point:e,ProjectivePoint:e,normPrivateKeyToScalar:o,weierstrassEquation:i,isWithinCurveOrder:s})}function Dp(t,e){return Object.assign({},e,{ProjectivePoint:e.Point,CURVE:t})}function h0(t){const{CURVE:e,curveOpts:n,ecdsaOpts:r}=_p(t),s=l0(e,n),i=xp(s,r,n);return Dp(t,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Rp(t,e){const n=r=>h0({...t,hash:r});return{...n(e),create:n}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const to={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")};BigInt(0);const vp=BigInt(1),hc=BigInt(2),jl=(t,e)=>(t+e/hc)/e;function Ip(t){const e=to.p,n=BigInt(3),r=BigInt(6),s=BigInt(11),i=BigInt(22),o=BigInt(23),a=BigInt(44),d=BigInt(88),h=t*t*t%e,u=h*h*t%e,p=Xe(u,n,e)*u%e,B=Xe(p,n,e)*u%e,g=Xe(B,hc,e)*h%e,_=Xe(g,s,e)*g%e,v=Xe(_,i,e)*_%e,A=Xe(v,a,e)*v%e,w=Xe(A,d,e)*A%e,F=Xe(w,a,e)*v%e,x=Xe(F,n,e)*u%e,N=Xe(x,o,e)*_%e,k=Xe(N,r,e)*h%e,q=Xe(k,hc,e);if(!mc.eql(mc.sqr(q),t))throw new Error("Cannot find square root");return q}const mc=Nr(to.p,void 0,void 0,{sqrt:Ip}),Qn=Rp({...to,Fp:mc,lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=to.n,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-vp*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=n,o=BigInt("0x100000000000000000000000000000000"),a=jl(i*t,e),d=jl(-r*t,e);let h=Ze(t-a*n-d*s,e),u=Ze(-a*r-d*i,e);const p=h>o,B=u>o;if(p&&(h=e-h),B&&(u=e-u),h>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:p,k1:h,k2neg:B,k2:u}}}},ed);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Cn=BigInt(0),Wt=BigInt(1),Fa=BigInt(2),Fp=BigInt(8),kp={zip215:!0};function Op(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 Np(t,e={}){const{Fp:n,Fn:r}=c0("edwards",t,e),{h:s,n:i}=t;gs(e,{},{uvRatio:"function"});const o=Fa<<BigInt(r.BYTES*8)-Wt,a=v=>n.create(v),d=e.uvRatio||((v,A)=>{try{return{isValid:!0,value:n.sqrt(n.div(v,A))}}catch{return{isValid:!1,value:Cn}}});if(!Op(n,t,t.Gx,t.Gy))throw new Error("bad curve params: generator point");function h(v,A,w=!1){const F=w?Wt:Cn;return jr("coordinate "+v,A,F,o),A}function u(v){if(!(v instanceof g))throw new Error("ExtendedPoint expected")}const p=Vs((v,A)=>{const{ex:w,ey:F,ez:x}=v,N=v.is0();A==null&&(A=N?Fp:n.inv(x));const k=a(w*A),q=a(F*A),G=a(x*A);if(N)return{x:Cn,y:Wt};if(G!==Wt)throw new Error("invZ was invalid");return{x:k,y:q}}),B=Vs(v=>{const{a:A,d:w}=t;if(v.is0())throw new Error("bad point: ZERO");const{ex:F,ey:x,ez:N,et:k}=v,q=a(F*F),G=a(x*x),Y=a(N*N),M=a(Y*Y),j=a(q*A),P=a(Y*a(j+G)),$=a(M+a(w*a(q*G)));if(P!==$)throw new Error("bad point: equation left != right (1)");const C=a(F*x),c=a(N*k);if(C!==c)throw new Error("bad point: equation left != right (2)");return!0});class g{constructor(A,w,F,x){this.ex=h("x",A),this.ey=h("y",w),this.ez=h("z",F,!0),this.et=h("t",x),Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(A){if(A instanceof g)throw new Error("extended point not allowed");const{x:w,y:F}=A||{};return h("x",w),h("y",F),new g(w,F,Wt,a(w*F))}static normalizeZ(A){return ad(g,"ez",A)}static msm(A,w){return a0(g,r,A,w)}_setWindowSize(A){this.precompute(A)}precompute(A=8,w=!0){return _.setWindowSize(this,A),w||this.multiply(Fa),this}assertValidity(){B(this)}equals(A){u(A);const{ex:w,ey:F,ez:x}=this,{ex:N,ey:k,ez:q}=A,G=a(w*q),Y=a(N*x),M=a(F*q),j=a(k*x);return G===Y&&M===j}is0(){return this.equals(g.ZERO)}negate(){return new g(a(-this.ex),this.ey,this.ez,a(-this.et))}double(){const{a:A}=t,{ex:w,ey:F,ez:x}=this,N=a(w*w),k=a(F*F),q=a(Fa*a(x*x)),G=a(A*N),Y=w+F,M=a(a(Y*Y)-N-k),j=G+k,P=j-q,$=G-k,C=a(M*P),c=a(j*$),b=a(M*$),y=a(P*j);return new g(C,c,y,b)}add(A){u(A);const{a:w,d:F}=t,{ex:x,ey:N,ez:k,et:q}=this,{ex:G,ey:Y,ez:M,et:j}=A,P=a(x*G),$=a(N*Y),C=a(q*F*j),c=a(k*M),b=a((x+N)*(G+Y)-P-$),y=c-C,T=c+C,R=a($-w*P),O=a(b*y),L=a(T*R),S=a(b*R),m=a(y*T);return new g(O,L,m,S)}subtract(A){return this.add(A.negate())}multiply(A){const w=A;jr("scalar",w,Wt,i);const{p:F,f:x}=_.wNAFCached(this,w,g.normalizeZ);return g.normalizeZ([F,x])[0]}multiplyUnsafe(A,w=g.ZERO){const F=A;return jr("scalar",F,Cn,i),F===Cn?g.ZERO:this.is0()||F===Wt?this:_.wNAFCachedUnsafe(this,F,g.normalizeZ,w)}isSmallOrder(){return this.multiplyUnsafe(s).is0()}isTorsionFree(){return _.wNAFCachedUnsafe(this,i).is0()}toAffine(A){return p(this,A)}clearCofactor(){return s===Wt?this:this.multiplyUnsafe(s)}static fromBytes(A,w=!1){return Xt(A),this.fromHex(A,w)}static fromHex(A,w=!1){const{d:F,a:x}=t,N=n.BYTES;A=Je("pointHex",A,N),Ir("zip215",w);const k=A.slice(),q=A[N-1];k[N-1]=q&-129;const G=Ks(k),Y=w?o:n.ORDER;jr("pointHex.y",G,Cn,Y);const M=a(G*G),j=a(M-Wt),P=a(F*M-x);let{isValid:$,value:C}=d(j,P);if(!$)throw new Error("Point.fromHex: invalid y coordinate");const c=(C&Wt)===Wt,b=(q&128)!==0;if(!w&&C===Cn&&b)throw new Error("Point.fromHex: x=0 and x_0=1");return b!==c&&(C=a(-C)),g.fromAffine({x:C,y:G})}static fromPrivateScalar(A){return g.BASE.multiply(A)}toBytes(){const{x:A,y:w}=this.toAffine(),F=Do(w,n.BYTES);return F[F.length-1]|=A&Wt?128:0,F}toRawBytes(){return this.toBytes()}toHex(){return vr(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}g.BASE=new g(t.Gx,t.Gy,Wt,a(t.Gx*t.Gy)),g.ZERO=new g(Cn,Wt,Wt,Cn),g.Fp=n,g.Fn=r;const _=o0(g,r.BYTES*8);return g}function Up(t,e){gs(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,d=e.randomBytes||Zc,h=e.adjustScalarBytes||(k=>k),u=e.domain||((k,q,G)=>{if(Ir("phflag",G),q.length||G)throw new Error("Contexts/pre-hash are not supported");return k});function p(k){return o.create(k)}function B(k){return p(Ks(k))}function g(k){const q=i.BYTES;k=Je("private key",k,q);const G=Je("hashed private key",r(k),2*q),Y=h(G.slice(0,q)),M=G.slice(q,2*q),j=B(Y);return{head:Y,prefix:M,scalar:j}}function _(k){const{head:q,prefix:G,scalar:Y}=g(k),M=s.multiply(Y),j=M.toBytes();return{head:q,prefix:G,scalar:Y,point:M,pointBytes:j}}function v(k){return _(k).pointBytes}function A(k=Uint8Array.of(),...q){const G=vn(...q);return B(r(u(G,Je("context",k),!!n)))}function w(k,q,G={}){k=Je("message",k),n&&(k=n(k));const{prefix:Y,scalar:M,pointBytes:j}=_(q),P=A(G.context,Y,k),$=s.multiply(P).toBytes(),C=A(G.context,$,j,k),c=p(P+C*M);jr("signature.s",c,Cn,a);const b=i.BYTES,y=vn($,Do(c,b));return Je("result",y,b*2)}const F=kp;function x(k,q,G,Y=F){const{context:M,zip215:j}=Y,P=i.BYTES;k=Je("signature",k,2*P),q=Je("message",q),G=Je("publicKey",G,P),j!==void 0&&Ir("zip215",j),n&&(q=n(q));const $=Ks(k.slice(P,2*P));let C,c,b;try{C=t.fromHex(G,j),c=t.fromHex(k.slice(0,P),j),b=s.multiplyUnsafe($)}catch{return!1}if(!j&&C.isSmallOrder())return!1;const y=A(M,c.toBytes(),C.toBytes(),q);return c.add(C.multiplyUnsafe(y)).subtract(b).clearCofactor().is0()}return s.precompute(8),{getPublicKey:v,sign:w,verify:x,utils:{getExtendedPublicKey:_,randomPrivateKey:()=>d(i.BYTES),precompute(k=8,q=t.BASE){return q.precompute(k,!1)}},Point:t}}function Lp(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=Nr(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 Mp(t,e){return Object.assign({},e,{ExtendedPoint:e.Point,CURVE:t})}function Pp(t){const{CURVE:e,curveOpts:n,eddsaOpts:r}=Lp(t),s=Np(e,n),i=Up(s,r);return Mp(t,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */BigInt(0);const Wp=BigInt(1),Gl=BigInt(2);BigInt(3);const zp=BigInt(5),Hp=BigInt(8),Ro={p:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:Hp,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function qp(t){const e=BigInt(10),n=BigInt(20),r=BigInt(40),s=BigInt(80),i=Ro.p,a=t*t%i*t%i,d=Xe(a,Gl,i)*a%i,h=Xe(d,Wp,i)*t%i,u=Xe(h,zp,i)*h%i,p=Xe(u,e,i)*u%i,B=Xe(p,n,i)*p%i,g=Xe(B,r,i)*B%i,_=Xe(g,s,i)*g%i,v=Xe(_,s,i)*g%i,A=Xe(v,e,i)*u%i;return{pow_p_5_8:Xe(A,Gl,i)*t%i,b2:a}}function $p(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}const Yl=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function Kp(t,e){const n=Ro.p,r=Ze(e*e*e,n),s=Ze(r*r*e,n),i=qp(t*s).pow_p_5_8;let o=Ze(t*r*i,n);const a=Ze(e*o*o,n),d=o,h=Ze(o*Yl,n),u=a===t,p=a===Ze(-t,n),B=a===Ze(-t*Yl,n);return u&&(o=d),(p||B)&&(o=h),mp(o,n)&&(o=Ze(-o,n)),{isValid:u||p,value:o}}const Vp=Nr(Ro.p,void 0,!0),jp={...Ro,Fp:Vp,hash:td,adjustScalarBytes:$p,uvRatio:Kp},Ur=Pp(jp),Gp=[{name:"appIdPrefix",binary:"bytes",custom:Pt.encode("appID"),omit:!0},{name:"appId",binary:"uint",size:8}],Zt=class Zt{constructor(e,n="hex"){ie(this,"address");this.address=typeof e=="string"?Zt.stringToUint8Array(e,n):e}toNative(e){return or(e,this)}unwrap(){return this.address}toString(){return wt.encode(this.address,!0)}toUint8Array(){return this.address}toUniversalAddress(){return this}equals(e){return Pt.equals(this.address,e.address)}static isValidAddress(e,n="hex"){return!l1(()=>Zt.stringToUint8Array(e,n))}static instanceof(e){return typeof e=="object"&&"constructor"in e&&e.constructor.type===Zt.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 wt.decode(e);case"base58":return hf.decode(e);case"bech32":return uf.decodeToBytes(e).bytes;case"algorandAppId":return ip(bn(Gp,{appId:BigInt(e)}));case"sha256":return Qi(e)}})();if(r.length>Zt.byteSize)throw new Error(`string ${e} has invalid length for format ${n}`);return r.length<Zt.byteSize?Pt.zpad(r,Zt.byteSize):r}};ie(Zt,"byteSize",32),ie(Zt,"type","Universal"),ie(Zt,"ZERO",new Zt(new Uint8Array(Zt.byteSize)));let xt=Zt;function Yp(t){return typeof t=="object"&&"setChain"in t}const bc=new Map;function dd(t,e){bc.has(t)||bc.set(t,e)}function or(t,e){const n=hn.get(t),r=bc.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 Yp(s)&&s.setChain(t),s}catch(s){const i=`Error parsing address as a native ${t} address: ${s.message}`;if(xt.instanceof(e))throw i;return new xt(e).toNative(t)}}function m0(t,e){const n=hn.get(t);return new xt(e,z1.get(n))}function Xp(t){return"getVersion"in t}const er={};function Jp(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 Zp(t,e){const n=ii(t)?hn.get(t):t;return e in er?n in er[e]:!1}function b0(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 Qp=(t,e,n,r)=>b0(t,e).fromRpc(n,r),pc=(t,e)=>t?`${t}:${e}`:e,gc=new Map;function eg(t,e,n){const r=pc(t,e);if(gc.has(r))throw new Error(`Payload type ${r} already registered`);gc.set(r,n)}function yt(t,e){for(const[n,r]of e)eg(t,n,r)}const qe={binary:"uint",size:32},p0={binary:"uint",size:2},Ht=t=>({...p0,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=ms(e),r=(t==null?void 0:t.allowedChains)??mf;if(!r.includes(n))throw new Error(`Chain ${n} not in allowed chains ${r}`);return n},from:e=>e==null?0:si(e)}}),tg=t=>({...p0,custom:{to:t,from:si(t)}}),os={binary:"uint",size:4},vo={binary:"uint",size:8},g0={to:t=>new Date(Number(t*1000n)),from:t=>BigInt(t.getTime())/1000n},ld={binary:"uint",size:4},Gn=t=>({name:"payloadId",binary:"uint",size:1,custom:t,omit:!0}),Io={binary:"uint",size:8};class ng{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(no,this)}static decode(e){return pn(no,e)}}var Xl;(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:d,s:h}=i;return Qn.verify({r:d,s:h},a,o)}t.validate=r;function s(i,o){const{r:a,s:d,v:h}=i,u=new Qn.Signature(a,d);return u.recovery=h,u.recoverPublicKey(o).toRawBytes()}t.recover=s})(Xl||(Xl={}));const rg=[{name:"r",binary:"uint",size:32},{name:"s",binary:"uint",size:32},{name:"v",binary:"uint",size:1}],no={binary:"bytes",layout:rg,custom:{to:t=>new ng(t.r,t.s,t.v),from:t=>({r:t.r,s:t.s,v:t.v})}},be={binary:"bytes",size:32,custom:{to:t=>new xt(t),from:t=>t.toUint8Array()}},sg=t=>{const e=t.findIndex(n=>n!==0);return-1<e?t.slice(e):new Uint8Array([])},y0={to:Pt.decode,from:Pt.encode},ud=t=>({binary:"bytes",size:t,custom:{to:e=>Pt.decode(sg(e)),from:e=>Pt.zpad(Pt.encode(e),t)}});function E0(t){const e=t.indexOf(":");return e!==-1?[t.slice(0,e),t.slice(e+1)]:[null,t]}const ig=[{name:"guardianIndex",binary:"uint",size:1},{name:"signature",...no}],fd=[{name:"version",binary:"uint",size:1,custom:1,omit:!0},{name:"guardianSet",...ld},{name:"signatures",binary:"array",lengthSize:1,layout:ig}],hd=[{name:"timestamp",binary:"uint",size:4},{name:"nonce",binary:"uint",size:4},{name:"emitterChain",...Ht()},{name:"emitterAddress",...be},{name:"sequence",...Io},{name:"consistencyLevel",binary:"uint",size:1}],og=[...fd,...hd];function js(t){const e=gc.get(t);if(!e)throw new Error(`No layout registered for payload type ${t}`);return e}function A0(t){return{name:"payload",binary:"bytes",...t==="Uint8Array"?{}:{layout:js(t)}}}function Wi(t){const e=[...og,A0(t.payloadLiteral)];return bn(e,t)}function ag(t,e){if(t==="Uint8Array")return e;const n=js(t);return bn(n,e)}function md(t,e){const n=(()=>{if(Array.isArray(t[0]))return t.flatMap(([o,a])=>a.map(d=>pc(o,d)));if(typeof t[1]=="string")return t;const[s,i]=t;return i.map(o=>pc(s,o))})(),r=w1(n.map(s=>js(s)));return s=>{typeof s=="string"&&(s=wt.decode(s));const i=r(s);return Array.isArray(i)?i.map(o=>n[o]):i!==null?n[i]:null}}function Qr(t,e){typeof e=="string"&&(e=wt.decode(e));const[n,r]=pn(fd,e,!1);for(let g=1;g<n.signatures.length;++g)if(n.signatures[g].guardianIndex<=n.signatures[g-1].guardianIndex)throw new Error("Guardian signatures must be in ascending order of guardian set index");const s=r,[i,o]=pn(hd,e.subarray(s),!1),a=s+o,[d,h]=typeof t=="string"?[t,Jl(t,e.subarray(a))]:Jl(t,e.subarray(a)),[u,p]=E0(d),B=$s(e.slice(s));return{protocolName:u,payloadName:p,payloadLiteral:d,...n,...i,payload:h,hash:B}}function Jl(t,e,n=0){return(()=>{if(typeof e=="string"&&(e=wt.decode(e)),t==="Uint8Array")return e.slice(n);if(typeof t=="string")return pn(js(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(js(r),e.subarray(n))]})()}function cg(t){return t.getBalances!==void 0}class dg{constructor(e,n){ie(this,"network");ie(this,"config");this.network=e,this.config=n}utils(){return this.constructor}getProtocol(e,n){return Qp(this.utils()._platform,e,n,this.config)}getProtocolInitializer(e){return b0(this.utils()._platform,e)}async parseWormholeMessages(e,n,r){return(await this.getProtocol("WormholeCore",n)).parseTransaction(r)}}const lg=[["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"}]]]],Zl=fe(lg,[0,[1,2]]),ug=[["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"}]]]],Ql=fe(ug,[0,[1,2]]);function Fo(t,e){if(t!=="Devnet"){if(t==="Mainnet"){if(!Zl.has(e))return;const n=Zl.get(e);return Object.fromEntries(n.map(([r,s])=>[r,{...s,chain:e,key:r}]))}if(t==="Testnet"){if(!Ql.has(e))return;const n=Ql.get(e);return Object.fromEntries(n.map(([r,s])=>[r,{...s,chain:e,key:r}]))}throw new Error("Unsupported network: "+t)}}function fg(t,e){const n=Fo(t,e);return n?bs.native(n):void 0}function hg(t,e,n){const r=Fo(t,e);return r?bs.byAddress(r,n):void 0}function mg(t,e,n){const r=Fo(t,e);return r?bs.byKey(r,n):void 0}function bg(t,e){const n={coreBridge:cb.get(t,e),tokenBridge:db.get(t,e),nftBridge:fb.get(t,e),relayer:hb.get(t,e),tokenBridgeRelayer:lb.get(t,e),tbtc:Mi.get(t,e),executor:ub.get(t,e)};return dc.has(t,e)&&(n.executorTokenBridge=dc.get(t,e)),lc.has(t,e)&&(n.cctp=lc.get(t,e)),Fl.has(t,e)&&(n.gateway=Fl.get(t,e)),kl.has(t,e)&&(n.translator=kl.get(t,e)),Ol.has(t,e)&&(n.portico=Ol.get(t,e)),Mi.has(t,e)&&(n.tbtc=Mi.get(t,e)),n}function Lt(t){return typeof t=="string"&&t==="native"}function bd(t){return{chain:t,address:"native"}}function ko(t){return typeof t=="object"&&t.address!==void 0&&t.chain!==void 0&&ii(t.chain)}function w0(t,e){return t.chain!==e.chain?!1:Lt(t.address)&&Lt(e.address)?!0:Fn(t)===Fn(e)}function Fn(t){return ko(t)&&Lt(t.address)?t.address:t.address.toNative(t.chain).toString()}function pg(t){if(Lt(t.address))throw new Error("Invalid address, cannot convert the string literal `native` to a Universal Address");return t.address.toUniversalAddress().toString()}function S0(t,e,n){let r;if(ko(n)){if(!Lt(n.address))return[!1,n];r=n.address}else r=n;if(Lt(r)){const i=fg(t,e);if(!i)throw new Error("Invalid destination token");const o=i.wrappedKey,a=mg(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 C0(t){return t.chain!==void 0&&t.txid!==void 0}function ka(t){return mf.map(n=>{const r=hn(n);let s="";try{s=Sf.get(t,n)}catch{}const i=Fo(t,n),o=i?Object.values(i).find(d=>Lt(d.address)&&d.wrappedKey):void 0,a=o?i[o.wrappedKey]:void 0;return{key:n,platform:r,network:t,chainId:fn(n),finalityThreshold:gf.get(n)??0,blockTime:yf.get(n)??0,contracts:bg(t,n),nativeTokenDecimals:Ef(r),nativeChainId:s,tokenMap:i,wrappedNative:a,explorer:G1(t,n),rpc:Af(t,n)}}).reduce((n,r)=>({...n,[r.key]:r}),{})}function gg(t){return B0(t)||pd(t)}function B0(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 pd(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 yg{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 Sr(t){return t.sequence!==void 0&&t.emitter!==void 0&&t.chain!==void 0}function ro(t){return t.hash!==void 0}const eu=t=>[Gn(1),{name:"token",binary:"bytes",layout:[{name:"address",...be},{name:"amount",...qe}]},{name:"sourceDomain",...os},{name:"targetDomain",...os},{name:"nonce",...vo},{name:"caller",...be},{name:"mintRecipient",...be},Ao({name:"payload",lengthSize:2},t)],Eg=[Gn(1),{name:"targetRelayerFee",...qe},{name:"toNativeTokenAmount",...qe},{name:"targetRecipient",...be}],Ag=[["DepositWithPayload",eu()],["TransferWithRelay",eu(Eg)]];yt("AutomaticCircleBridge",Ag);const x0={binary:"uint",size:4,custom:0,omit:!0},wg=[{name:"messageBodyVersion",...x0},{name:"burnToken",...be},{name:"mintRecipient",...be},{name:"amount",...qe},{name:"messageSender",...be}],yc=[{name:"version",...x0},{name:"sourceDomain",...os},{name:"destinationDomain",...os},{name:"nonce",...vo},{name:"sender",...be},{name:"recipient",...be},{name:"destinationCaller",...be},{name:"payload",binary:"bytes",layout:wg}],Sg=[["Message",yc]];yt("CircleBridge",Sg);exports.CircleBridge=void 0;(function(t){t.isCircleAttestation=e=>e.message!==void 0,t.deserialize=e=>{const n=pn(yc,e),r=wt.encode($s(e),!0);return[n,r]},t.serialize=e=>bn(yc,e)})(exports.CircleBridge||(exports.CircleBridge={}));var tu;(function(t){const e="AutomaticCircleBridge",n=["DepositWithPayload","TransferWithRelay"];t.getTransferDiscriminator=zc(()=>md([e,n]))})(tu||(tu={}));function Cg(t){return t.amount!==void 0&&t.from!==void 0&&t.to!==void 0}const nu={binary:"bytes",size:32,custom:{to:t=>Vi(t.byteLength).map(e=>String.fromCharCode(t[e])).join(""),from:t=>new Uint8Array(t.split("").map(e=>e.charCodeAt(0)))}},_0=[{name:"token",binary:"bytes",layout:[{name:"amount",...qe},{name:"address",...be},{name:"chain",...Ht()}]},{name:"to",binary:"bytes",layout:[{name:"address",...be},{name:"chain",...Ht()}]}],T0=[Gn(1),..._0,{name:"fee",...qe}],di=t=>[Gn(3),..._0,{name:"from",...be},Ao({name:"payload"},t)],Bg=[["AttestMeta",[Gn(2),{name:"token",binary:"bytes",layout:[{name:"address",...be},{name:"chain",...Ht()}]},{name:"decimals",binary:"uint",size:1},{name:"symbol",...nu},{name:"name",...nu}]],["Transfer",T0],["TransferWithPayload",di()]];yt("TokenBridge",Bg);const xg=x1(["shouldWrapNative","shouldUnwrapNative"]),so=[{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",...xg}];({...be},{...qe}),{...be},{...be},{...be},{...qe},{...qe},{...qe},{...qe};const Ec=[{name:"flagSet",binary:"bytes",layout:so},{name:"finalTokenAddress",...be},{name:"recipientAddress",...be},{name:"cannonAssetAmount",...qe},{name:"minAmountFinish",...qe},{name:"relayerFee",...qe}],_g=[["Transfer",di(Ec)]];yt("PorticoBridge",_g);exports.PorticoBridge=void 0;(function(t){t.deserializePayload=e=>pn(Ec,e),t.serializePayload=e=>bn(Ec,e),t.deserializeFlagSet=e=>pn(so,e),t.serializeFlagSet=e=>bn(so,e)})(exports.PorticoBridge||(exports.PorticoBridge={}));const D0={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}]},ru={binary:"bytes",layout:[{name:"chain",...Ht()},{name:"address",...be}]},Tg=[{name:"chain",...Ht()},{name:"emitterAddress",...be},{name:"sequence",...Io}],Dg=[{name:"size",binary:"uint",size:4,custom:12,omit:!0},{name:"domain",...os},{name:"nonce",...vo}],R0={binary:"switch",idSize:1,idTag:"keyType",layouts:[[[1,"VAA"],Tg],[[2,"CCTP"],Dg]]},v0=t=>[Gn(1),{name:"target",...ru},Ao({name:"payload",lengthSize:4},t),{name:"requestedReceiverValue",...qe},{name:"extraReceiverValue",...qe},{name:"executionInfo",...D0},{name:"refund",...ru},{name:"refundDeliveryProvider",...be},{name:"sourceDeliveryProvider",...be},{name:"senderAddress",...be},{name:"messageKeys",binary:"array",lengthSize:1,layout:R0}],Rg=[["DeliveryInstruction",v0()],["RedeliveryInstruction",[Gn(2),{name:"deliveryVaaKey",binary:"bytes",layout:R0},{name:"targetChain",...Ht()},{name:"newRequestedReceiverValue",...qe},{name:"newEncodedExecutionInfo",...D0},{name:"newSourceDeliveryProvider",...be},{name:"newSenderAddress",...be}]]];yt("Relayer",Rg);const vg=[Gn(1),{name:"targetRelayerFee",...qe},{name:"toNativeTokenAmount",...qe},{name:"targetRecipient",...be}],Ig=[["TransferWithRelay",di(vg)]];yt("AutomaticTokenBridge",Ig);const Fg=t=>new Error(`Token ${t} is not a wrapped asset`);var Ac;(function(t){const e="TokenBridge",n=["Transfer","TransferWithPayload"],r=["AttestMeta"];[...n,...r],t.getTransferDiscriminator=zc(()=>md([e,n]))})(Ac||(Ac={}));function kg(t){return t.token!==void 0&&t.amount!==void 0&&t.from!==void 0&&t.to!==void 0}const Og=[{name:"targetRecipient",...be}],Ng=[["TransferWithExecutorRelay",di(Og)]];yt("ExecutorTokenBridge",Ng);const Ug=[["Add",1],["Subtract",2],["Unknown",3]],wc={binary:"bytes",size:20,custom:{to:t=>wt.encode(t,!0),from:t=>wt.decode(t)}},Lg=[["UpgradeContract",[!1,[{name:"newContract",...be}]]],["RegisterChain",[!0,[{name:"foreignChain",...Ht()},{name:"foreignAddress",...be}]]],["RecoverChainId",[!1,[{name:"evmChainId",binary:"uint",size:32},{name:"newChainId",...Ht({allowedChains:bf("Evm")})}]]],["GuardianSetUpgrade",[!0,[{name:"guardianSet",...ld},{name:"guardians",binary:"array",lengthSize:1,layout:wc}]]],["SetMessageFee",[!1,[{name:"messageFee",binary:"uint",size:32}]]],["TransferFees",[!0,[{name:"amount",binary:"uint",size:32},{name:"recipient",...be}]]],["UpdateDefaultProvider",[!1,[{name:"defaultProvider",...be}]]],["RegisterEmitterAndDomain",[!0,[{name:"emitterChain",...Ht()},{name:"emitterAddress",...be},{name:"domain",binary:"uint",size:4}]]],["UpdateFinality",[!1,[{name:"finality",binary:"uint",size:1}]]]],Oa={binary:"bytes",size:32},su=[{name:"contractAddr",...be},{name:"codeId",binary:"uint",size:8}],Mg=[["StoreCode",[!1,[{name:"wasmHash",...Oa}]]],["InstantiateContract",[!1,[{name:"instantiationParamsHash",...Oa}]]],["MigrateContract",[!1,[{name:"migrationParamsHash",...Oa}]]],["AddWasmInstantiateAllowlist",[!1,su]],["DeleteWasmInstantiateAllowlist",[!1,su]]],Pg=(()=>{const t=s=>({binary:"bytes",size:s,custom:y0}),e=[{name:"height",binary:"uint",size:8}],n=sf(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)}}})(),Wg=[["ScheduleUpgrade",[!1,Pg]],["CancelUpgrade",[!0,[]]],["SetIbcComposabilityMwContract",[!1,[{name:"contractAddress",...be}]]]],zg=[["ModifyBalance",[!1,[{name:"sequence",...Io},{name:"modifiedChain",...Ht()},{name:"tokenChain",...Ht()},{name:"tokenAddress",...be},{name:"kind",...B1(Ug)},{name:"amount",...qe},{name:"reason",...ud(32)}]]]],Hg=[["ActionUpdateChannelChain",[!1,[{name:"channelId",...ud(64)},{name:"channelChain",...Ht({allowedChains:bf("Cosmwasm")})}]]]],qg=[["GeneralPurposeEvm",[!1,[{name:"governanceContract",...wc},{name:"targetContract",...wc},{name:"payload",binary:"bytes",lengthSize:2}]]],["GeneralPurposeSolana",[!1,[{name:"governanceContract",...be},{name:"payload",binary:"bytes"}]]]],I0=[...Lg,...Mg,...Wg,...zg,...Hg,...qg];ef(I0,0);const iu=Object.fromEntries(I0),$g=[["WormholeCore","Core"],["TokenBridge","TokenBridge"],["NftBridge","NftBridge"],["Relayer","WormholeRelayer"],["CircleBridge","CircleIntegration"],["IbcBridge","IbcTranslator"],["IbcReceiver","IbcReceiver"],["GlobalAccountant","GlobalAccountant"],["GeneralPurposeGovernance","GeneralPurposeGovernance"],["WormchainGovernance","WasmdModule"],["GatewayGovernance","GatewayModule"]],Kg=fe($g),Vg=t=>({to:t,from:(()=>{const n=new Uint8Array(32),r=Kg(t);for(let s=1;s<=r.length;++s)n[32-s]=r.charCodeAt(r.length-s);return n})()}),jg=(t,e)=>({to:t,from:e}),Gg=(t,e,n)=>[{name:"protocol",binary:"bytes",custom:Vg(t)},{name:"action",binary:"uint",size:1,custom:jg(e,n)},{name:"chain",...Ht({allowNull:iu[e][0]})},{name:"actionArgs",binary:"bytes",layout:iu[e][1]}],Re=(t,e,n)=>[e,Gg(t,e,n)],Yg=[Re("WormholeCore","UpgradeContract",1),Re("WormholeCore","GuardianSetUpgrade",2),Re("WormholeCore","SetMessageFee",3),Re("WormholeCore","TransferFees",4),Re("WormholeCore","RecoverChainId",5)],Xg=[Re("TokenBridge","RegisterChain",1),Re("TokenBridge","UpgradeContract",2),Re("TokenBridge","RecoverChainId",3)],Jg=[Re("NftBridge","RegisterChain",1),Re("NftBridge","UpgradeContract",2),Re("NftBridge","RecoverChainId",3)],Zg=[Re("Relayer","RegisterChain",1),Re("Relayer","UpgradeContract",2),Re("Relayer","UpdateDefaultProvider",3)],Qg=[Re("CircleBridge","UpdateFinality",1),Re("CircleBridge","RegisterEmitterAndDomain",2),Re("CircleBridge","UpgradeContract",3)],ey=[Re("IbcBridge","ActionUpdateChannelChain",1)],ty=[Re("IbcReceiver","ActionUpdateChannelChain",1)],ny=[Re("GlobalAccountant","ModifyBalance",1)],ry=[Re("GeneralPurposeGovernance","GeneralPurposeEvm",1),Re("GeneralPurposeGovernance","GeneralPurposeSolana",2)],sy=[Re("WormchainGovernance","StoreCode",1),Re("WormchainGovernance","InstantiateContract",2),Re("WormchainGovernance","MigrateContract",3),Re("WormchainGovernance","AddWasmInstantiateAllowlist",4),Re("WormchainGovernance","DeleteWasmInstantiateAllowlist",5)],iy=[Re("GatewayGovernance","ScheduleUpgrade",1),Re("GatewayGovernance","CancelUpgrade",2),Re("GatewayGovernance","SetIbcComposabilityMwContract",3)];yt("WormholeCore",Yg);yt("TokenBridge",Xg);yt("NftBridge",Jg);yt("Relayer",Zg);yt("CircleBridge",Qg);yt("IbcBridge",ey);yt("IbcReceiver",ty);yt("GlobalAccountant",ny);yt("GeneralPurposeGovernance",ry);yt("WormchainGovernance",sy);yt("GatewayGovernance",iy);exports.TBTCBridge=void 0;(function(t){const e="TBTCBridge",n=["GatewayTransfer","Transfer"];[...n],t.getTransferDiscriminator=zc(()=>md([e,n])),t.getNativeTbtcToken=r=>{const s=Ab.get("Mainnet",r);if(s)return{chain:r,address:or(r,s)}}})(exports.TBTCBridge||(exports.TBTCBridge={}));const oy=[{name:"recipient",...be}],ay=[["GatewayTransfer",di(oy)],["Transfer",T0]];yt("TBTCBridge",ay);const cy=[{name:"gasLimit",binary:"uint",size:16},{name:"msgValue",binary:"uint",size:16}],dy=[{name:"dropOff",binary:"uint",size:16},{name:"recipient",...be}],ly=[{name:"request",binary:"switch",idSize:1,idTag:"type",layouts:[[[1,"GasInstruction"],cy],[[2,"GasDropOffInstruction"],dy]]}],F0=[{name:"requests",binary:"array",layout:ly}],uy=[{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:g0},{name:"baseFee",binary:"uint",size:8},{name:"dstGasPrice",binary:"uint",size:8},{name:"srcPrice",binary:"uint",size:8},{name:"dstPrice",binary:"uint",size:8}]]]}],k0=[...uy,{name:"signature",binary:"bytes",size:65}];var Gr;(function(t){t.Pending="pending",t.Failed="failed",t.Unsupported="unsupported",t.Submitted="submitted",t.Underpaid="underpaid",t.Aborted="aborted"})(Gr||(Gr={}));var ou;(function(t){t.ERM1="ERM1",t.ERV1="ERV1",t.ERN1="ERN1",t.ERC1="ERC1",t.ERC2="ERC2"})(ou||(ou={}));async function fy(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 hy(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 my(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 O0(t,e){return function(){return t.apply(e,arguments)}}const{toString:by}=Object.prototype,{getPrototypeOf:gd}=Object,{iterator:Oo,toStringTag:N0}=Symbol,No=(t=>e=>{const n=by.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),yn=t=>(t=t.toLowerCase(),e=>No(e)===t),Uo=t=>e=>typeof e===t,{isArray:ys}=Array,Gs=Uo("undefined");function py(t){return t!==null&&!Gs(t)&&t.constructor!==null&&!Gs(t.constructor)&&Gt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const U0=yn("ArrayBuffer");function gy(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&U0(t.buffer),e}const yy=Uo("string"),Gt=Uo("function"),L0=Uo("number"),Lo=t=>t!==null&&typeof t=="object",Ey=t=>t===!0||t===!1,zi=t=>{if(No(t)!=="object")return!1;const e=gd(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(N0 in t)&&!(Oo in t)},Ay=yn("Date"),wy=yn("File"),Sy=yn("Blob"),Cy=yn("FileList"),By=t=>Lo(t)&&Gt(t.pipe),xy=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Gt(t.append)&&((e=No(t))==="formdata"||e==="object"&&Gt(t.toString)&&t.toString()==="[object FormData]"))},_y=yn("URLSearchParams"),[Ty,Dy,Ry,vy]=["ReadableStream","Request","Response","Headers"].map(yn),Iy=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function li(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),ys(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 M0(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 Ar=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:We.global,P0=t=>!Gs(t)&&t!==Ar;function Sc(){const{caseless:t}=P0(this)&&this||{},e={},n=(r,s)=>{const i=t&&M0(e,s)||s;zi(e[i])&&zi(r)?e[i]=Sc(e[i],r):zi(r)?e[i]=Sc({},r):ys(r)?e[i]=r.slice():e[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&li(arguments[r],n);return e}const Fy=(t,e,n,{allOwnKeys:r}={})=>(li(e,(s,i)=>{n&&Gt(s)?t[i]=O0(s,n):t[i]=s},{allOwnKeys:r}),t),ky=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Oy=(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)},Ny=(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&&gd(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Uy=(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},Ly=t=>{if(!t)return null;if(ys(t))return t;let e=t.length;if(!L0(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},My=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&gd(Uint8Array)),Py=(t,e)=>{const r=(t&&t[Oo]).call(t);let s;for(;(s=r.next())&&!s.done;){const i=s.value;e.call(t,i[0],i[1])}},Wy=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},zy=yn("HTMLFormElement"),Hy=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),au=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),qy=yn("RegExp"),W0=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};li(n,(s,i)=>{let o;(o=e(s,i,t))!==!1&&(r[i]=o||s)}),Object.defineProperties(t,r)},$y=t=>{W0(t,(e,n)=>{if(Gt(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Gt(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+"'")})}})},Ky=(t,e)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return ys(t)?r(t):r(String(t).split(e)),n},Vy=()=>{},jy=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Gy(t){return!!(t&&Gt(t.append)&&t[N0]==="FormData"&&t[Oo])}const Yy=t=>{const e=new Array(10),n=(r,s)=>{if(Lo(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[s]=r;const i=ys(r)?[]:{};return li(r,(o,a)=>{const d=n(o,s+1);!Gs(d)&&(i[a]=d)}),e[s]=void 0,i}}return r};return n(t,0)},Xy=yn("AsyncFunction"),Jy=t=>t&&(Lo(t)||Gt(t))&&Gt(t.then)&&Gt(t.catch),z0=((t,e)=>t?setImmediate:e?((n,r)=>(Ar.addEventListener("message",({source:s,data:i})=>{s===Ar&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Ar.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Gt(Ar.postMessage)),Zy=typeof queueMicrotask<"u"?queueMicrotask.bind(Ar):typeof We.process<"u"&&We.process.nextTick||z0,Qy=t=>t!=null&&Gt(t[Oo]),K={isArray:ys,isArrayBuffer:U0,isBuffer:py,isFormData:xy,isArrayBufferView:gy,isString:yy,isNumber:L0,isBoolean:Ey,isObject:Lo,isPlainObject:zi,isReadableStream:Ty,isRequest:Dy,isResponse:Ry,isHeaders:vy,isUndefined:Gs,isDate:Ay,isFile:wy,isBlob:Sy,isRegExp:qy,isFunction:Gt,isStream:By,isURLSearchParams:_y,isTypedArray:My,isFileList:Cy,forEach:li,merge:Sc,extend:Fy,trim:Iy,stripBOM:ky,inherits:Oy,toFlatObject:Ny,kindOf:No,kindOfTest:yn,endsWith:Uy,toArray:Ly,forEachEntry:Py,matchAll:Wy,isHTMLForm:zy,hasOwnProperty:au,hasOwnProp:au,reduceDescriptors:W0,freezeMethods:$y,toObjectSet:Ky,toCamelCase:Hy,noop:Vy,toFiniteNumber:jy,findKey:M0,global:Ar,isContextDefined:P0,isSpecCompliantForm:Gy,toJSONObject:Yy,isAsyncFn:Xy,isThenable:Jy,setImmediate:z0,asap:Zy,isIterable:Qy};function me(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,this.status=s.status?s.status:null)}K.inherits(me,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:K.toJSONObject(this.config),code:this.code,status:this.status}}});const H0=me.prototype,q0={};["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=>{q0[t]={value:t}});Object.defineProperties(me,q0);Object.defineProperty(H0,"isAxiosError",{value:!0});me.from=(t,e,n,r,s,i)=>{const o=Object.create(H0);return K.toFlatObject(t,o,function(d){return d!==Error.prototype},a=>a!=="isAxiosError"),me.call(o,t.message,e,n,r,s),o.cause=t,o.name=t.name,i&&Object.assign(o,i),o};const eE=null;function Cc(t){return K.isPlainObject(t)||K.isArray(t)}function $0(t){return K.endsWith(t,"[]")?t.slice(0,-2):t}function cu(t,e,n){return t?t.concat(e).map(function(s,i){return s=$0(s),!n&&i?"["+s+"]":s}).join(n?".":""):e}function tE(t){return K.isArray(t)&&!t.some(Cc)}const nE=K.toFlatObject(K,{},null,function(e){return/^is[A-Z]/.test(e)});function Mo(t,e,n){if(!K.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,A){return!K.isUndefined(A[v])});const r=n.metaTokens,s=n.visitor||u,i=n.dots,o=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&K.isSpecCompliantForm(e);if(!K.isFunction(s))throw new TypeError("visitor must be a function");function h(_){if(_===null)return"";if(K.isDate(_))return _.toISOString();if(K.isBoolean(_))return _.toString();if(!d&&K.isBlob(_))throw new me("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(_)||K.isTypedArray(_)?d&&typeof Blob=="function"?new Blob([_]):We.Buffer.from(_):_}function u(_,v,A){let w=_;if(_&&!A&&typeof _=="object"){if(K.endsWith(v,"{}"))v=r?v:v.slice(0,-2),_=JSON.stringify(_);else if(K.isArray(_)&&tE(_)||(K.isFileList(_)||K.endsWith(v,"[]"))&&(w=K.toArray(_)))return v=$0(v),w.forEach(function(x,N){!(K.isUndefined(x)||x===null)&&e.append(o===!0?cu([v],N,i):o===null?v:v+"[]",h(x))}),!1}return Cc(_)?!0:(e.append(cu(A,v,i),h(_)),!1)}const p=[],B=Object.assign(nE,{defaultVisitor:u,convertValue:h,isVisitable:Cc});function g(_,v){if(!K.isUndefined(_)){if(p.indexOf(_)!==-1)throw Error("Circular reference detected in "+v.join("."));p.push(_),K.forEach(_,function(w,F){(!(K.isUndefined(w)||w===null)&&s.call(e,w,K.isString(F)?F.trim():F,v,B))===!0&&g(w,v?v.concat(F):[F])}),p.pop()}}if(!K.isObject(t))throw new TypeError("data must be an object");return g(t),e}function du(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function yd(t,e){this._pairs=[],t&&Mo(t,this,e)}const K0=yd.prototype;K0.append=function(e,n){this._pairs.push([e,n])};K0.toString=function(e){const n=e?function(r){return e.call(this,r,du)}:du;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function rE(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function V0(t,e,n){if(!e)return t;const r=n&&n.encode||rE;K.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(e,n):i=K.isURLSearchParams(e)?e.toString():new yd(e,n).toString(r),i){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class lu{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){K.forEach(this.handlers,function(r){r!==null&&e(r)})}}const j0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},sE=typeof URLSearchParams<"u"?URLSearchParams:yd,iE=typeof FormData<"u"?FormData:null,oE=typeof Blob<"u"?Blob:null,aE={isBrowser:!0,classes:{URLSearchParams:sE,FormData:iE,Blob:oE},protocols:["http","https","file","blob","url","data"]},Ed=typeof window<"u"&&typeof document<"u",Bc=typeof navigator=="object"&&navigator||void 0,cE=Ed&&(!Bc||["ReactNative","NativeScript","NS"].indexOf(Bc.product)<0),dE=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",lE=Ed&&window.location.href||"http://localhost",uE=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ed,hasStandardBrowserEnv:cE,hasStandardBrowserWebWorkerEnv:dE,navigator:Bc,origin:lE},Symbol.toStringTag,{value:"Module"})),Mt={...uE,...aE};function fE(t,e){return Mo(t,new Mt.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return Mt.isNode&&K.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function hE(t){return K.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function mE(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 G0(t){function e(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),d=i>=n.length;return o=!o&&K.isArray(s)?s.length:o,d?(K.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!K.isObject(s[o]))&&(s[o]=[]),e(n,r,s[o],i)&&K.isArray(s[o])&&(s[o]=mE(s[o])),!a)}if(K.isFormData(t)&&K.isFunction(t.entries)){const n={};return K.forEachEntry(t,(r,s)=>{e(hE(r),s,n,0)}),n}return null}function bE(t,e,n){if(K.isString(t))try{return(e||JSON.parse)(t),K.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const ui={transitional:j0,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=K.isObject(e);if(i&&K.isHTMLForm(e)&&(e=new FormData(e)),K.isFormData(e))return s?JSON.stringify(G0(e)):e;if(K.isArrayBuffer(e)||K.isBuffer(e)||K.isStream(e)||K.isFile(e)||K.isBlob(e)||K.isReadableStream(e))return e;if(K.isArrayBufferView(e))return e.buffer;if(K.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 fE(e,this.formSerializer).toString();if((a=K.isFileList(e))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Mo(a?{"files[]":e}:e,d&&new d,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),bE(e)):e}],transformResponse:[function(e){const n=this.transitional||ui.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(K.isResponse(e)||K.isReadableStream(e))return e;if(e&&K.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"?me.from(a,me.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:Mt.classes.FormData,Blob:Mt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],t=>{ui.headers[t]={}});const pE=K.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"]),gE=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]&&pE[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},uu=Symbol("internals");function Rs(t){return t&&String(t).trim().toLowerCase()}function Hi(t){return t===!1||t==null?t:K.isArray(t)?t.map(Hi):String(t)}function yE(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 EE=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Na(t,e,n,r,s){if(K.isFunction(r))return r.call(this,e,n);if(s&&(e=n),!!K.isString(e)){if(K.isString(r))return e.indexOf(r)!==-1;if(K.isRegExp(r))return r.test(e)}}function AE(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function wE(t,e){const n=K.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 Yt=class{constructor(e){e&&this.set(e)}set(e,n,r){const s=this;function i(a,d,h){const u=Rs(d);if(!u)throw new Error("header name must be a non-empty string");const p=K.findKey(s,u);(!p||s[p]===void 0||h===!0||h===void 0&&s[p]!==!1)&&(s[p||d]=Hi(a))}const o=(a,d)=>K.forEach(a,(h,u)=>i(h,u,d));if(K.isPlainObject(e)||e instanceof this.constructor)o(e,n);else if(K.isString(e)&&(e=e.trim())&&!EE(e))o(gE(e),n);else if(K.isObject(e)&&K.isIterable(e)){let a={},d,h;for(const u of e){if(!K.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[h=u[0]]=(d=a[h])?K.isArray(d)?[...d,u[1]]:[d,u[1]]:u[1]}o(a,n)}else e!=null&&i(n,e,r);return this}get(e,n){if(e=Rs(e),e){const r=K.findKey(this,e);if(r){const s=this[r];if(!n)return s;if(n===!0)return yE(s);if(K.isFunction(n))return n.call(this,s,r);if(K.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Rs(e),e){const r=K.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Na(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let s=!1;function i(o){if(o=Rs(o),o){const a=K.findKey(r,o);a&&(!n||Na(r,r[a],a,n))&&(delete r[a],s=!0)}}return K.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||Na(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){const n=this,r={};return K.forEach(this,(s,i)=>{const o=K.findKey(r,i);if(o){n[o]=Hi(s),delete n[i];return}const a=e?AE(i):String(i).trim();a!==i&&delete n[i],n[a]=Hi(s),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return K.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=e&&K.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
- `)}getSetCookie(){return this.get("set-cookie")||[]}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[uu]=this[uu]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=Rs(o);r[a]||(wE(s,o),r[a]=!0)}return K.isArray(e)?e.forEach(i):i(e),this}};Yt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);K.reduceDescriptors(Yt.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});K.freezeMethods(Yt);function Ua(t,e){const n=this||ui,r=e||n,s=Yt.from(r.headers);let i=r.data;return K.forEach(t,function(a){i=a.call(n,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function Y0(t){return!!(t&&t.__CANCEL__)}function Es(t,e,n){me.call(this,t??"canceled",me.ERR_CANCELED,e,n),this.name="CanceledError"}K.inherits(Es,me,{__CANCEL__:!0});function X0(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new me("Request failed with status code "+n.status,[me.ERR_BAD_REQUEST,me.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function SE(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function CE(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(d){const h=Date.now(),u=r[i];o||(o=h),n[s]=d,r[s]=h;let p=i,B=0;for(;p!==s;)B+=n[p++],p=p%t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),h-o<e)return;const g=u&&h-u;return g?Math.round(B*1e3/g):void 0}}function BE(t,e){let n=0,r=1e3/e,s,i;const o=(h,u=Date.now())=>{n=u,s=null,i&&(clearTimeout(i),i=null),t.apply(null,h)};return[(...h)=>{const u=Date.now(),p=u-n;p>=r?o(h,u):(s=h,i||(i=setTimeout(()=>{i=null,o(s)},r-p)))},()=>s&&o(s)]}const io=(t,e,n=3)=>{let r=0;const s=CE(50,250);return BE(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,d=o-r,h=s(d),u=o<=a;r=o;const p={loaded:o,total:a,progress:a?o/a:void 0,bytes:d,rate:h||void 0,estimated:h&&a&&u?(a-o)/h:void 0,event:i,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(p)},n)},fu=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},hu=t=>(...e)=>K.asap(()=>t(...e)),xE=Mt.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Mt.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Mt.origin),Mt.navigator&&/(msie|trident)/i.test(Mt.navigator.userAgent)):()=>!0,_E=Mt.hasStandardBrowserEnv?{write(t,e,n,r,s,i){const o=[t+"="+encodeURIComponent(e)];K.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),K.isString(r)&&o.push("path="+r),K.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function TE(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function DE(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function J0(t,e,n){let r=!TE(e);return t&&(r||n==!1)?DE(t,e):e}const mu=t=>t instanceof Yt?{...t}:t;function Fr(t,e){e=e||{};const n={};function r(h,u,p,B){return K.isPlainObject(h)&&K.isPlainObject(u)?K.merge.call({caseless:B},h,u):K.isPlainObject(u)?K.merge({},u):K.isArray(u)?u.slice():u}function s(h,u,p,B){if(K.isUndefined(u)){if(!K.isUndefined(h))return r(void 0,h,p,B)}else return r(h,u,p,B)}function i(h,u){if(!K.isUndefined(u))return r(void 0,u)}function o(h,u){if(K.isUndefined(u)){if(!K.isUndefined(h))return r(void 0,h)}else return r(void 0,u)}function a(h,u,p){if(p in e)return r(h,u);if(p in t)return r(void 0,h)}const d={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(h,u,p)=>s(mu(h),mu(u),p,!0)};return K.forEach(Object.keys(Object.assign({},t,e)),function(u){const p=d[u]||s,B=p(t[u],e[u],u);K.isUndefined(B)&&p!==a||(n[u]=B)}),n}const Z0=t=>{const e=Fr({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=e;e.headers=o=Yt.from(o),e.url=V0(J0(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let d;if(K.isFormData(n)){if(Mt.hasStandardBrowserEnv||Mt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((d=o.getContentType())!==!1){const[h,...u]=d?d.split(";").map(p=>p.trim()).filter(Boolean):[];o.setContentType([h||"multipart/form-data",...u].join("; "))}}if(Mt.hasStandardBrowserEnv&&(r&&K.isFunction(r)&&(r=r(e)),r||r!==!1&&xE(e.url))){const h=s&&i&&_E.read(i);h&&o.set(s,h)}return e},RE=typeof XMLHttpRequest<"u",vE=RE&&function(t){return new Promise(function(n,r){const s=Z0(t);let i=s.data;const o=Yt.from(s.headers).normalize();let{responseType:a,onUploadProgress:d,onDownloadProgress:h}=s,u,p,B,g,_;function v(){g&&g(),_&&_(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let A=new XMLHttpRequest;A.open(s.method.toUpperCase(),s.url,!0),A.timeout=s.timeout;function w(){if(!A)return;const x=Yt.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),k={data:!a||a==="text"||a==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:x,config:t,request:A};X0(function(G){n(G),v()},function(G){r(G),v()},k),A=null}"onloadend"in A?A.onloadend=w:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.indexOf("file:")===0)||setTimeout(w)},A.onabort=function(){A&&(r(new me("Request aborted",me.ECONNABORTED,t,A)),A=null)},A.onerror=function(){r(new me("Network Error",me.ERR_NETWORK,t,A)),A=null},A.ontimeout=function(){let N=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const k=s.transitional||j0;s.timeoutErrorMessage&&(N=s.timeoutErrorMessage),r(new me(N,k.clarifyTimeoutError?me.ETIMEDOUT:me.ECONNABORTED,t,A)),A=null},i===void 0&&o.setContentType(null),"setRequestHeader"in A&&K.forEach(o.toJSON(),function(N,k){A.setRequestHeader(k,N)}),K.isUndefined(s.withCredentials)||(A.withCredentials=!!s.withCredentials),a&&a!=="json"&&(A.responseType=s.responseType),h&&([B,_]=io(h,!0),A.addEventListener("progress",B)),d&&A.upload&&([p,g]=io(d),A.upload.addEventListener("progress",p),A.upload.addEventListener("loadend",g)),(s.cancelToken||s.signal)&&(u=x=>{A&&(r(!x||x.type?new Es(null,t,A):x),A.abort(),A=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const F=SE(s.url);if(F&&Mt.protocols.indexOf(F)===-1){r(new me("Unsupported protocol "+F+":",me.ERR_BAD_REQUEST,t));return}A.send(i||null)})},IE=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,s;const i=function(h){if(!s){s=!0,a();const u=h instanceof Error?h:this.reason;r.abort(u instanceof me?u:new Es(u instanceof Error?u.message:u))}};let o=e&&setTimeout(()=>{o=null,i(new me(`timeout ${e} of ms exceeded`,me.ETIMEDOUT))},e);const a=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(h=>{h.unsubscribe?h.unsubscribe(i):h.removeEventListener("abort",i)}),t=null)};t.forEach(h=>h.addEventListener("abort",i));const{signal:d}=r;return d.unsubscribe=()=>K.asap(a),d}},FE=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,s;for(;r<n;)s=r+e,yield t.slice(r,s),r=s},kE=async function*(t,e){for await(const n of OE(t))yield*FE(n,e)},OE=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},bu=(t,e,n,r)=>{const s=kE(t,e);let i=0,o,a=d=>{o||(o=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:h,value:u}=await s.next();if(h){a(),d.close();return}let p=u.byteLength;if(n){let B=i+=p;n(B)}d.enqueue(new Uint8Array(u))}catch(h){throw a(h),h}},cancel(d){return a(d),s.return()}},{highWaterMark:2})},Po=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Q0=Po&&typeof ReadableStream=="function",NE=Po&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),eh=(t,...e)=>{try{return!!t(...e)}catch{return!1}},UE=Q0&&eh(()=>{let t=!1;const e=new Request(Mt.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),pu=64*1024,xc=Q0&&eh(()=>K.isReadableStream(new Response("").body)),oo={stream:xc&&(t=>t.body)};Po&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!oo[e]&&(oo[e]=K.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new me(`Response type '${e}' is not supported`,me.ERR_NOT_SUPPORT,r)})})})(new Response);const LE=async t=>{if(t==null)return 0;if(K.isBlob(t))return t.size;if(K.isSpecCompliantForm(t))return(await new Request(Mt.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(K.isArrayBufferView(t)||K.isArrayBuffer(t))return t.byteLength;if(K.isURLSearchParams(t)&&(t=t+""),K.isString(t))return(await NE(t)).byteLength},ME=async(t,e)=>{const n=K.toFiniteNumber(t.getContentLength());return n??LE(e)},PE=Po&&(async t=>{let{url:e,method:n,data:r,signal:s,cancelToken:i,timeout:o,onDownloadProgress:a,onUploadProgress:d,responseType:h,headers:u,withCredentials:p="same-origin",fetchOptions:B}=Z0(t);h=h?(h+"").toLowerCase():"text";let g=IE([s,i&&i.toAbortSignal()],o),_;const v=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let A;try{if(d&&UE&&n!=="get"&&n!=="head"&&(A=await ME(u,r))!==0){let k=new Request(e,{method:"POST",body:r,duplex:"half"}),q;if(K.isFormData(r)&&(q=k.headers.get("content-type"))&&u.setContentType(q),k.body){const[G,Y]=fu(A,io(hu(d)));r=bu(k.body,pu,G,Y)}}K.isString(p)||(p=p?"include":"omit");const w="credentials"in Request.prototype;_=new Request(e,{...B,signal:g,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:w?p:void 0});let F=await fetch(_,B);const x=xc&&(h==="stream"||h==="response");if(xc&&(a||x&&v)){const k={};["status","statusText","headers"].forEach(M=>{k[M]=F[M]});const q=K.toFiniteNumber(F.headers.get("content-length")),[G,Y]=a&&fu(q,io(hu(a),!0))||[];F=new Response(bu(F.body,pu,G,()=>{Y&&Y(),v&&v()}),k)}h=h||"text";let N=await oo[K.findKey(oo,h)||"text"](F,t);return!x&&v&&v(),await new Promise((k,q)=>{X0(k,q,{data:N,headers:Yt.from(F.headers),status:F.status,statusText:F.statusText,config:t,request:_})})}catch(w){throw v&&v(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new me("Network Error",me.ERR_NETWORK,t,_),{cause:w.cause||w}):me.from(w,w&&w.code,t,_)}}),_c={http:eE,xhr:vE,fetch:PE};K.forEach(_c,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const gu=t=>`- ${t}`,WE=t=>K.isFunction(t)||t===null||t===!1,th={getAdapter:t=>{t=K.isArray(t)?t:[t];const{length:e}=t;let n,r;const s={};for(let i=0;i<e;i++){n=t[i];let o;if(r=n,!WE(n)&&(r=_c[(o=String(n)).toLowerCase()],r===void 0))throw new me(`Unknown adapter '${o}'`);if(r)break;s[o||"#"+i]=r}if(!r){const i=Object.entries(s).map(([a,d])=>`adapter ${a} `+(d===!1?"is not supported by the environment":"is not available in the build"));let o=e?i.length>1?`since :
9
- `+i.map(gu).join(`
10
- `):" "+gu(i[0]):"as no adapter specified";throw new me("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:_c};function La(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Es(null,t)}function yu(t){return La(t),t.headers=Yt.from(t.headers),t.data=Ua.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),th.getAdapter(t.adapter||ui.adapter)(t).then(function(r){return La(t),r.data=Ua.call(t,t.transformResponse,r),r.headers=Yt.from(r.headers),r},function(r){return Y0(r)||(La(t),r&&r.response&&(r.response.data=Ua.call(t,t.transformResponse,r.response),r.response.headers=Yt.from(r.response.headers))),Promise.reject(r)})}const nh="1.10.0",Wo={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Wo[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Eu={};Wo.transitional=function(e,n,r){function s(i,o){return"[Axios v"+nh+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(e===!1)throw new me(s(o," has been removed"+(n?" in "+n:"")),me.ERR_DEPRECATED);return n&&!Eu[o]&&(Eu[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}};Wo.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function zE(t,e,n){if(typeof t!="object")throw new me("options must be an object",me.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],d=a===void 0||o(a,i,t);if(d!==!0)throw new me("option "+i+" must be "+d,me.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new me("Unknown option "+i,me.ERR_BAD_OPTION)}}const qi={assertOptions:zE,validators:Wo},An=qi.validators;let Cr=class{constructor(e){this.defaults=e||{},this.interceptors={request:new lu,response:new lu}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
11
- `+i):r.stack=i}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Fr(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&qi.assertOptions(r,{silentJSONParsing:An.transitional(An.boolean),forcedJSONParsing:An.transitional(An.boolean),clarifyTimeoutError:An.transitional(An.boolean)},!1),s!=null&&(K.isFunction(s)?n.paramsSerializer={serialize:s}:qi.assertOptions(s,{encode:An.function,serialize:An.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),qi.assertOptions(n,{baseUrl:An.spelling("baseURL"),withXsrfToken:An.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&K.merge(i.common,i[n.method]);i&&K.forEach(["delete","get","head","post","put","patch","common"],_=>{delete i[_]}),n.headers=Yt.concat(o,i);const a=[];let d=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(d=d&&v.synchronous,a.unshift(v.fulfilled,v.rejected))});const h=[];this.interceptors.response.forEach(function(v){h.push(v.fulfilled,v.rejected)});let u,p=0,B;if(!d){const _=[yu.bind(this),void 0];for(_.unshift.apply(_,a),_.push.apply(_,h),B=_.length,u=Promise.resolve(n);p<B;)u=u.then(_[p++],_[p++]);return u}B=a.length;let g=n;for(p=0;p<B;){const _=a[p++],v=a[p++];try{g=_(g)}catch(A){v.call(this,A);break}}try{u=yu.call(this,g)}catch(_){return Promise.reject(_)}for(p=0,B=h.length;p<B;)u=u.then(h[p++],h[p++]);return u}getUri(e){e=Fr(this.defaults,e);const n=J0(e.baseURL,e.url,e.allowAbsoluteUrls);return V0(n,e.params,e.paramsSerializer)}};K.forEach(["delete","get","head","options"],function(e){Cr.prototype[e]=function(n,r){return this.request(Fr(r||{},{method:e,url:n,data:(r||{}).data}))}});K.forEach(["post","put","patch"],function(e){function n(r){return function(i,o,a){return this.request(Fr(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Cr.prototype[e]=n(),Cr.prototype[e+"Form"]=n(!0)});let HE=class rh{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 Es(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)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new rh(function(s){e=s}),cancel:e}}};function qE(t){return function(n){return t.apply(null,n)}}function $E(t){return K.isObject(t)&&t.isAxiosError===!0}const Tc={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(Tc).forEach(([t,e])=>{Tc[e]=t});function sh(t){const e=new Cr(t),n=O0(Cr.prototype.request,e);return K.extend(n,Cr.prototype,e,{allOwnKeys:!0}),K.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return sh(Fr(t,s))},n}const Se=sh(ui);Se.Axios=Cr;Se.CanceledError=Es;Se.CancelToken=HE;Se.isCancel=Y0;Se.VERSION=nh;Se.toFormData=Mo;Se.AxiosError=me;Se.Cancel=Se.CanceledError;Se.all=function(e){return Promise.all(e)};Se.spread=qE;Se.isAxiosError=$E;Se.mergeConfig=Fr;Se.AxiosHeaders=Yt;Se.formToJSON=t=>G0(K.isHTMLForm(t)?new FormData(t):t);Se.getAdapter=th.getAdapter;Se.HttpStatusCode=Tc;Se.default=Se;const{Axios:DS,AxiosError:KE,CanceledError:RS,isCancel:vS,CancelToken:IS,VERSION:FS,all:kS,Cancel:OS,isAxiosError:VE,spread:NS,toFormData:US,AxiosHeaders:LS,HttpStatusCode:MS,formToJSON:PS,getAdapter:WS,mergeConfig:zS}=Se,_n=60*1e3,ih={Mainnet:{api:"https://api.wormholescan.io",circleAPI:Rl("Mainnet"),executorAPI:Nl("Mainnet"),chains:ka("Mainnet")},Testnet:{api:"https://api.testnet.wormholescan.io",circleAPI:Rl("Testnet"),executorAPI:Nl("Testnet"),chains:ka("Testnet")},Devnet:{api:"http://guardian:7071",circleAPI:"",executorAPI:"",chains:ka("Devnet")}};function oh(t,e){return Object.fromEntries(Object.entries(ih[t].chains).filter(([n,r])=>r.platform==e))}function jE(t,e){let n=ih[t];return e?Ad(n,e):n}function GE(t,e,n){const r=oh(t,e);return n?Ad(r,n):r}function Ad(t,e){t||(t={});for(const[n,r]of Object.entries(e))typeof r=="object"&&!Array.isArray(r)?t[n]=Ad(t[n],r):t[n]=r;return t}const YE=typeof We.process<"u";YE&&We.process.env.NETWORK;async function Lr(t,e,n=_n,r){const s=Math.floor(n/e);let i=0;return new Promise((o,a)=>{t().then(d=>{if(d!==null){o(d);return}let h=setInterval(async()=>{if(i>=s){clearInterval(h),o(null);return}const u=await t();u!==null?(clearInterval(h),o(u)):r&&console.log(`Retrying ${r}, attempt ${i}/${s} `),i++},e)})})}const XE=2e3;var Au;(function(t){t.complete="complete",t.pending_confirmations="pending_confirmations"})(Au||(Au={}));const JE=t=>({message:t.attestation,status:t.status});async function ZE(t,e){var r;const n=`${t}/${e}`;try{const s=await Se.get(n),i=JE(s==null?void 0:s.data);return i.message==="PENDING"?null:i.message}catch(s){if(!s||typeof s=="object"&&(Se.isAxiosError(s)&&((r=s.response)==null?void 0:r.status)===404||"status"in s&&s.status===404))return null;throw s}}async function QE(t,e,n){return Lr(()=>ZE(t,e),XE,n,"Circle:GetAttestation")}async function Ys(t,e,n){if(!gg(n))throw new Error("Invalid signer, not SignAndSendSigner or SignOnlySigner");return(await e2(e,async i=>pd(n)?n.signAndSend(i):t.sendWait(await n.sign(i)))).map(i=>({chain:t.chain,txid:i}))}async function e2(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 t2 extends Error{constructor(n){super(`Minimum transfer amount is ${wo(n)}`);ie(this,"min");this.min=n}minAmount(){return this.min}}class n2 extends Error{constructor(n){super("Unable to fetch a quote");ie(this,"internalError");this.internalError=n}}class wd 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 Sd(t){return t.state===exports.TransferState.SourceInitiated}function Xs(t){return t.state===exports.TransferState.SourceFinalized}function wu(t){return t.state===exports.TransferState.InReview}function es(t){return t.state===exports.TransferState.Attested}function r2(t){return t.state===exports.TransferState.Refunded}function Cd(t){return t.state===exports.TransferState.DestinationInitiated}function s2(t){return t.state===exports.TransferState.DestinationQueued}function i2(t){return t.state===exports.TransferState.DestinationFinalized}function ah(t){return t.state<0}function Su(t){return ah(t)&&t.error instanceof wd}class St{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=_n,s,i){if(Cg(n))return n={...n,...await St.destinationOverrides(e.getChain(n.from.chain),e.getChain(n.to.chain),n)},new St(e,n,s,i);let o;if(Sr(n))o=await St.fromWormholeMessageId(e,n,r);else if(C0(n))o=await St.fromTransaction(e,n,r,s);else if(ro(n))o=await St.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 St.getTransferVaa(e,n),a=o.payload.mintRecipient,d=Li(e.network,o.payload.targetDomain),{wormholeRelayer:h}=e.config.chains[d].contracts.cctp;let u=!1;if(h){const g=sn.chainAddress(s,h).address.toUniversalAddress();u=o.payloadName==="TransferWithRelay"&&a.equals(g)}const p={from:{chain:n.chain,address:o.payload.caller},to:{chain:d,address:a},amount:o.payload.token.amount,automatic:u},B=new St(e,p);return B.attestations=[{id:{emitter:i,sequence:o.sequence,chain:s},attestation:o}],B._state=exports.TransferState.Attested,B}static async fromCircleMessage(e,n){const[r,s]=exports.CircleBridge.deserialize(wt.decode(n)),{payload:i}=r,o=i.messageSender,a=i.mintRecipient,d=Li(e.network,r.sourceDomain),h=Li(e.network,r.destinationDomain),u={from:{chain:d,address:o},to:{chain:h,address:a},amount:i.amount,automatic:!1},p=new St(e,u);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(h){if(!(h.message.includes("no bridge messages found")||h.message.includes("not found")))throw h}let d;if(a.length>0)d=await St.fromWormholeMessageId(e,a[0],r);else{const u=await(await s.getCircleBridge()).parseTransactionDetails(o),p={...u,automatic:!1};d=new St(e,p),d.attestations=[{id:u.id,attestation:{message:u.message}}]}return d._state=exports.TransferState.SourceInitiated,d.txids=[n],d}async initiateTransfer(e){if(this._state!==exports.TransferState.Created)throw new Error("Invalid state transition in `start`");return this.txids=await St.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 St.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],d=await(await this.wh.getChain(this.transfer.from.chain).getCircleBridge()).parseTransactionDetails(i.txid);n=[{id:d.id,attestation:{message:d.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 St.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(g=>Sr(g.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(B=>ro(B.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(),d=sn.parseAddress(e.chain(),e.address()),h=a.redeem(d,i,o),u=await Ys(this.toChain,h,e);return(p=this.txids)==null||p.push(...u),u.map(({txid:B})=>B)}}(function(t){async function e(h,u,p){let B;return u.automatic?B=(await h.getAutomaticCircleBridge()).transfer(u.from.address,{chain:u.to.chain,address:u.to.address},u.amount,u.nativeGas):B=(await h.getCircleBridge()).transfer(u.from.address,{chain:u.to.chain,address:u.to.address},u.amount),await Ys(h,B,p)}t.transfer=e;async function*n(h,u,p=_n,B,g){var A,w;const _=Date.now(),v=(F,x)=>Math.max(x-(Date.now()-F),0);if(B=B??h.getChain(u.from),g=g??h.getChain(u.to),Sd(u)){if(u.originTxs.length===0)throw"Invalid state transition: no originating transactions";const F=u.originTxs[u.originTxs.length-1],x=await t.getTransferMessage(B,F.txid);u={...u,attestation:{id:x.id,attestation:{message:x.message}},state:exports.TransferState.SourceFinalized},yield u}if(Xs(u)){if(!u.attestation)throw"Invalid state transition: no attestation id";if(Sr(u.attestation.id)){let F=u.attestation.attestation?u.attestation.attestation:void 0;F||(F=await t.getTransferVaa(h,u.attestation.id,v(_,p)),u={...u,attestation:{id:u.attestation.id,attestation:F},state:exports.TransferState.Attested},yield u)}else if(ro(u.attestation.id)){const F=await h.getCircleAttestation(u.attestation.id.hash,p),x=u.originTxs[u.originTxs.length-1],k=await(await B.getCircleBridge()).parseTransactionDetails(x.txid);F&&(u={...u,attestation:{id:u.attestation.id,attestation:{attestation:F,message:k.message}},state:exports.TransferState.Attested},yield u)}}if(es(u)||Xs(u)){if(!u.attestation)throw"Invalid state transition";if(Sr(u.attestation.id)){const F=await h.getTransactionStatus(u.attestation.id,v(_,p));if(F&&((w=(A=F.globalTx)==null?void 0:A.destinationTx)!=null&&w.txHash)){const{chainId:x,txHash:N}=F.globalTx.destinationTx;u={...u,destinationTxs:[{chain:ms(x),txid:N}],state:exports.TransferState.DestinationInitiated},yield u}}}(es(u)||Cd(u))&&(await t.isTransferComplete(g,u.attestation.attestation)&&(u={...u,state:exports.TransferState.DestinationFinalized,destinationTxs:[]}),yield u)}t.track=n;async function r(h,u,p){const B={...p};if(hn(u.chain)==="Solana"&&!B.automatic){const g=sn.parseAddress(u.chain,Ls.get(u.network,u.chain));B.to=await u.getTokenAccount(B.to.address,g)}return B}t.destinationOverrides=r;async function s(h,u,p){if(!qs(u.network,u.chain))throw new Error(`Invalid destination chain ${u.chain} for Circle transfer`);const B=Ls.get(u.network,u.chain);if(!B)throw"Invalid transfer, no USDC contract on destination";if(!qs(h.network,h.chain))throw new Error(`Invalid source chain ${h.chain} for Circle transfer`);const g=Ls.get(h.network,h.chain);if(!g)throw"Invalid transfer, no USDC contract on source";const _=sn.chainAddress(u.chain,B),v=sn.chainAddress(h.chain,g),A=(h.chain==="Polygon"?2e3*200:Vc(h.chain))+Yc,w=p.automatic?Hs(0,5,0):Hs(24,0,0);if(!p.automatic)return{sourceToken:{token:v,amount:p.amount},destinationToken:{token:_,amount:p.amount},eta:A,expires:w};let F=p.amount;const x=p.nativeGas?p.nativeGas:0n;F-=x;const k=await(await h.getAutomaticCircleBridge()).getRelayerFee(u.chain);F-=k;let q=0n;return p.nativeGas&&(q=await(await u.getAutomaticCircleBridge()).nativeTokenAmount(x)),{sourceToken:{token:v,amount:p.amount},destinationToken:{token:_,amount:F},relayFee:{token:v,amount:k},destinationNativeGas:q,eta:A,expires:w}}t.quoteTransfer=s;async function i(h,u){if(!exports.CircleBridge.isCircleAttestation(u))throw new Error("Must check for completion with circle message");return await(await h.getCircleBridge()).isTransferCompleted(u.message)}t.isTransferComplete=i;async function o(h,u,p){const B=await h.getVaa(u,"AutomaticCircleBridge:TransferWithRelay",p);if(!B)throw new Error("No VAA available after timeout exhausted");return B}t.getTransferVaa=o;async function a(h,u){return await(await h.getCircleBridge()).parseTransactionDetails(u)}t.getTransferMessage=a;function d(h){var F,x;const{from:u,to:p}=h.transfer;let B={from:u.chain,to:p.chain,state:exports.TransferState.Created};const g=h.txids.filter(N=>N.chain===h.transfer.from.chain);g.length>0&&(B={...B,state:exports.TransferState.SourceInitiated,originTxs:g});const _=((F=h.attestations)==null?void 0:F.filter(N=>Sr(N.id)))??[],v=((x=h.attestations)==null?void 0:x.filter(N=>ro(N.id)))??[],A=v.length>0?v[0]:_.length>0?_[0]:void 0;A&&A.id&&(B={...B,state:exports.TransferState.SourceFinalized,attestation:A},A.attestation&&(B={...B,state:exports.TransferState.Attested,attestation:{id:A.id,attestation:A.attestation}}));const w=h.txids.filter(N=>N.chain===h.transfer.to.chain);return w.length>0&&(B={...B,state:exports.TransferState.DestinationInitiated,destinationTxs:w}),B}t.getReceipt=d})(St||(St={}));const zo=2e3;async function ch(t,e){var d;const{chain:n,emitter:r,sequence:s}=e,i=fn(n),o=ff("0x",r.toString()),a=`${t}/v1/signed_vaa/${i}/${o}/${s}`;try{const{data:{vaaBytes:h}}=await Se.get(a);return Bo.decode(h)}catch(h){if(!h||typeof h=="object"&&(Se.isAxiosError(h)&&((d=h.response)==null?void 0:d.status)===404||"status"in h&&h.status===404))return null;throw h}}async function o2(t,e,n){return await Lr(()=>ch(t,e),zo,n,"Wormholescan:GetVaaBytes")}async function a2(t,e,n){const r=await ch(t,e);return r?Qr(n,r):null}async function c2(t,e,n,r){return await Lr(()=>a2(t,e,n),zo,r,"Wormholescan:GetVaaBytes")}async function d2(t,e){var d;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 Se.get(a)).data}catch(h){if(!h||typeof h=="object"&&(Se.isAxiosError(h)&&((d=h.response)==null?void 0:d.status)===404||"status"in h&&h.status===404))return null;throw h}}async function l2(t,e,n){return await Lr(()=>d2(t,e),zo,n,"Wormholescan:GetTransactionStatus")}async function u2(t,e){var r;const n=`${t}/api/v1/vaas?txHash=${e}`;try{const s=await Se.get(n);if(s.data.data.length>0)return s.data.data[0]}catch(s){if(!s||typeof s=="object"&&(Se.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 Cu(t,e,n,r){const i=await Lr(()=>u2(t,e),zo,r,"Wormholescan:GetVaaByTxHash");return i?Qr(n,Bo.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 Se.get(s);if(o.data.transactions.length>0)return o.data.transactions}catch(o){if(!o||typeof o=="object"&&(Se.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 h2(t){const e=`${t}/v1/governor/token_list`;try{const n=await Se.get(e);if(n.data&&n.data.entries.length>0)return n.data.entries.reduce((r,s)=>{const i=ms(s.originChainId);return r[i]=r[i]||{},r[i][s.originAddress]=s.price,r},{})}catch{}return null}async function m2(t){const e=`${t}/v1/governor/available_notional_by_chain`;try{const n=await Se.get(e);if(n.data&&n.data.entries.length>0)return n.data.entries.reduce((r,s)=>{const i=s.bigTransactionSize==="0"?void 0:Ns(Oi(s.bigTransactionSize,2));return r[ms(s.chainId)]={available:Ns(Oi(s.remainingAvailableNotional,2)),limit:Ns(Oi(s.notionalLimit,2)),maxSize:i},r},{})}catch{}return null}async function b2(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 Se.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(kg(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(Sr(n))o=await Ye.fromIdentifier(e,n,r);else if(C0(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:d}=s.payload,h;if(a.chain===o.chain)h=await e.getTokenNativeAddress(o.chain,a.chain,a.address);else{const A=await(await(await e.getChain(o.chain)).getTokenBridge()).getWrappedAsset(a);h=or(o.chain,A.toString())}const u=await e.getDecimals(o.chain,h),p=Vr(Hn(a.amount,Math.min(u,Ye.MAX_DECIMALS)),u);(i==="AutomaticTokenBridge"||i==="ExecutorTokenBridge")&&(o={chain:s.emitterChain,address:s.payload.from},d={chain:s.payload.to.chain,address:s.payload.payload.targetRecipient});const B={token:a,amount:Dt(p),from:o,to:d,protocol:i,nativeGas:i==="AutomaticTokenBridge"?s.payload.payload.toNativeTokenAmount:0n},g=new Ye(e,B);return g.attestations=[{id:n,attestation:s}],g._state=exports.TransferState.Attested,g}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(A,w,F){const x=or(F.chain(),F.address()),N=ko(w.token)?w.token.address:w.token;let k;if(w.protocol==="AutomaticTokenBridge")k=(await A.getAutomaticTokenBridge()).transfer(x,w.to,N,w.amount,w.nativeGas);else if(w.protocol==="TokenBridge")k=(await A.getTokenBridge()).transfer(x,w.to,N,w.amount,w.payload);else if(w.protocol==="ExecutorTokenBridge"){if(!w.executorQuote)throw new Error("ExecutorTokenBridge transfer requires an executorQuote");const q=w.executorQuote.relayInstructions.requests.find(Y=>Y.request.type==="GasDropOffInstruction");q&&q.request.type==="GasDropOffInstruction"&&q.request.recipient.equals(xt.ZERO)&&(q.request.recipient=w.to.address.toUniversalAddress()),k=(await A.getExecutorTokenBridge()).transfer(x,w.to,N,w.amount,w.executorQuote,w.referrerFee)}else throw new Error("Unknown token transfer protocol");return Ys(A,k,F)}t.transfer=e;async function n(A,w,F){const x=or(F.chain(),F.address()),N=w.protocolName==="AutomaticTokenBridge"?(await A.getAutomaticTokenBridge()).redeem(x,w):w.protocolName==="ExecutorTokenBridge"?(await A.getExecutorTokenBridge()).redeem(x,w):(await A.getTokenBridge()).redeem(x,w);return Ys(A,N,F)}t.redeem=n;async function*r(A,w,F=_n,x,N){var G,Y,M,j;const k=Date.now(),q=(P,$)=>Math.max($-(Date.now()-P),0);if(x=x??A.getChain(w.from),Sd(w)){if(w.originTxs.length===0)throw"Origin transactions required to fetch message id";const{txid:P}=w.originTxs[w.originTxs.length-1],$=await t.getTransferMessage(x,P,q(k,F));w={...w,state:exports.TransferState.SourceFinalized,attestation:{id:$}},yield w}if(Xs(w)||wu(w)){if(!w.attestation.id)throw"Attestation id required to fetch attestation";const{id:P}=w.attestation,$=await t.getTransferVaa(A,P,q(k,F));throw $?(w={...w,attestation:{id:P,attestation:$},state:exports.TransferState.Attested},yield w):await t.isTransferEnqueued(A,P)&&(w={...w,state:exports.TransferState.InReview},yield w),new Error("Attestation not found")}if(es(w)||Xs(w)||wu(w)||Su(w)){if(!((G=w.attestation)!=null&&G.id))throw"Attestation id required to fetch redeem tx";const{id:P}=w.attestation,$=await A.getTransactionStatus(P,q(k,F));if($&&((M=(Y=$.globalTx)==null?void 0:Y.destinationTx)!=null&&M.txHash)){const{chainId:C,txHash:c}=$.globalTx.destinationTx;w={...w,destinationTxs:[{chain:ms(C),txid:c}],state:exports.TransferState.DestinationInitiated,attestation:w.attestation}}yield w}if(es(w)||Cd(w)||Su(w)){if(!((j=w.attestation)!=null&&j.attestation))throw"Signed Attestation required to check for redeem";if(w.attestation.attestation.payloadName==="AttestMeta")throw new Error("Unable to track an AttestMeta receipt");await t.isTransferComplete(N??A.getChain(w.attestation.attestation.payload.to.chain),w.attestation.attestation)&&(w={...w,state:exports.TransferState.DestinationFinalized,attestation:w.attestation}),yield w}if(es(w)&&w.attestation.attestation.protocolName==="ExecutorTokenBridge"){const[P]=await A.getExecutorTxStatus(w.originTxs.at(-1).txid,w.from);if(!P)throw new Error("No transaction status found");const $=P.status;($===Gr.Failed||$===Gr.Underpaid||$===Gr.Unsupported||$===Gr.Aborted)&&(w={...w,state:exports.TransferState.Failed,error:new wd(`Relay failed with status: ${$}`)},yield w)}yield w}t.track=r;function s(A){const{transfer:w}=A,F=w.from.chain,x=w.to.chain;let N={from:F,to:x,state:exports.TransferState.Created};const k=A.txids.filter(M=>M.chain===w.from.chain);k.length>0&&(N={...N,state:exports.TransferState.SourceInitiated,originTxs:k});const q=A.attestations&&A.attestations.length>0?A.attestations[0]:void 0,G=q&&q.id?{id:q.id,attestation:q.attestation}:void 0;G&&G.id&&(N={...N,state:exports.TransferState.SourceFinalized,attestation:{id:G.id}},G.attestation&&(N={...N,state:exports.TransferState.Attested,attestation:{id:G.id,attestation:G.attestation}}));const Y=A.txids.filter(M=>M.chain===w.to.chain);return Y.length>0&&(N={...N,state:exports.TransferState.DestinationFinalized,destinationTxs:Y}),N}t.getReceipt=s;async function i(A,w,F){let x;const N=await A.getTokenBridge();if(Lt(F.address)){const G=await N.getWrappedNative();x={chain:F.chain,address:await N.getTokenUniversalAddress(G)}}else try{let G;xt.instanceof(F.address)?G=await N.getWrappedAsset(F):G=F.address,x=await N.getOriginalAsset(G)}catch(G){if(!G.message.includes("not a wrapped asset"))throw G;let Y;xt.instanceof(F.address)?Y=await N.getTokenNativeAddress(A.chain,F.address):Y=F.address,x={chain:F.chain,address:await N.getTokenUniversalAddress(Y)}}const k=await w.getTokenBridge();if(x.chain===w.chain){const G=await k.getTokenNativeAddress(x.chain,x.address),Y=await k.getWrappedNative();return Fn({chain:w.chain,address:Y})===Fn({chain:w.chain,address:G})?{chain:w.chain,address:"native"}:{chain:w.chain,address:G}}const q=await k.getWrappedAsset(x);return{chain:w.chain,address:q}}t.lookupDestinationToken=i;async function o(A,w){return(w.protocolName==="AutomaticTokenBridge"||w.protocolName==="ExecutorTokenBridge")&&(w=Qr("TokenBridge:TransferWithPayload",Wi(w))),(await A.getTokenBridge()).isTransferCompleted(w)}t.isTransferComplete=o;async function a(A,w,F){const x=await sn.parseMessageFromTx(A,w,F);if(x.length!==1)throw new Error("Expected a single Wormhole Message, got: "+x.length);return x[0]}t.getTransferMessage=a;async function d(A,w,F){const x=await A.getVaa(w,Ac.getTransferDiscriminator(),F);if(!x)return null;if(x.payloadName==="TransferWithPayload"){const{chain:N,address:k}=x.payload.to,{tokenBridgeRelayer:q}=A.config.chains[N].contracts,G=q?m0(N,q):null;if(G&&k.equals(G))return Qr("AutomaticTokenBridge:TransferWithRelay",Wi(x));try{return Qr("ExecutorTokenBridge:TransferWithExecutorRelay",Wi(x))}catch{}}return x}t.getTransferVaa=d;async function h(A,w){return await A.getIsVaaEnqueued(w)}t.isTransferEnqueued=h;function u(A,w,F,x){if(w.amount===0n)throw new Error("Amount cannot be 0");if(w.from.chain===w.to.chain)throw new Error("Cannot transfer to the same chain");if(F=F??A.getChain(w.from.chain),x=x??A.getChain(w.to.chain),w.protocol==="AutomaticTokenBridge"){if(!F.supportsAutomaticTokenBridge())throw new Error(`Automatic Token Bridge not supported on ${w.from.chain}`);if(!x.supportsAutomaticTokenBridge())throw new Error(`Automatic Token Bridge not supported on ${w.to.chain}`);const N=w.nativeGas??0n;if(N>w.amount)throw new Error(`Native gas amount > amount (${N} > ${w.amount})`)}else if(w.protocol==="TokenBridge"){if(!F.supportsTokenBridge())throw new Error(`Token Bridge not supported on ${w.from.chain}`);if(!x.supportsTokenBridge())throw new Error(`Token Bridge not supported on ${w.to.chain}`)}else if(w.protocol==="ExecutorTokenBridge"){if(!F.supportsExecutorTokenBridge())throw new Error(`Token Bridge Executor not supported on ${w.from.chain}`);if(!x.supportsExecutorTokenBridge())throw new Error(`Token Bridge Executor not supported on ${w.to.chain}`)}else throw new Error("Unknown token transfer protocol")}t.validateTransferDetails=u;async function p(A,w,F,x){const N=await w.getTokenBridge();let k;if(Lt(x.token.address))k=await N.getWrappedNative();else if(xt.instanceof(x.token.address))try{k=await N.getWrappedAsset(x.token)}catch(J){if(!J.message.includes("not a wrapped asset"))throw J;k=await N.getTokenNativeAddress(w.chain,x.token.address)}else k=x.token.address;sn.tokenId(w.chain,k.toString());const q=await w.getDecimals(k),G=Hn(x.amount,q),Y=Ni(G,t.MAX_DECIMALS),[M,j]=await Promise.all([h2(A.config.api),m2(A.config.api)]),P=[];if(j!==null&&w.chain in j&&M!==null){let J;if(Lt(x.token.address))J={chain:w.chain,address:await N.getTokenUniversalAddress(k)};else try{J=await N.getOriginalAsset(x.token.address)}catch(ee){if(!ee.message.includes("not a wrapped asset"))throw ee;J={chain:w.chain,address:await N.getTokenUniversalAddress(k)}}if(J.chain in M&&J.address.toString()in M[J.chain]){const ee=j[w.chain],de=M[J.chain][J.address.toString()]*Ns(Y);ee.maxSize&&de>ee.maxSize&&P.push({type:"GovernorLimitWarning",reason:"ExceedsLargeTransferLimit"}),de>ee.available&&P.push({type:"GovernorLimitWarning",reason:"ExceedsRemainingNotional"})}}const $=await t.lookupDestinationToken(w,F,x.token),C=await F.getDecimals($.address),c=Vr(Y,C),b=Vc(w.chain)+Yc,y={sourceToken:{token:x.token,amount:Dt(Y)},destinationToken:{token:$,amount:Dt(c)},warnings:P.length>0?P:void 0,eta:b};if(x.protocol==="TokenBridge")return{...y,expires:Hs(24,0,0)};if(x.protocol==="ExecutorTokenBridge"){const J=await g(A,w,F,x.gasLimit,x.msgValue,x.nativeGas),ee=J.relayInstructions.requests.find(pe=>pe.request.type==="GasDropOffInstruction"),Te=(ee==null?void 0:ee.request.type)==="GasDropOffInstruction"?ee.request.dropOff:void 0;let de;if(x.referrerFee&&x.referrerFee.feeDbps>0n){const{feeDbps:pe,referrer:dn}=x.referrerFee,Ce=t.calculateReferrerFee(Y,pe),Ne=Dt(Ce.fee),tn=Dt(Ce.remaining);if(tn<=0n)throw new Error("Remaining amount after referrer fee is <= 0");de={feeDbps:pe,feeAmount:Ne,remainingAmount:tn,referrer:dn}}return{...y,destinationToken:{token:$,amount:de!=null&&de.remainingAmount?Dt(Vr(Hn(de.remainingAmount,q),C)):Dt(c)},expires:J.signedQuote.quote.expiryTime,relayFee:{token:bd(w.chain),amount:J.estimatedCost},destinationNativeGas:Te,details:{executorQuote:J,referrerFee:de}}}if(x.protocol!=="AutomaticTokenBridge")throw new Error("Unknown token transfer protocol");const R=await(await w.getAutomaticTokenBridge()).getRelayerFee(F.chain,k),O=Vr(Ni(Hn(R,q),t.MAX_DECIMALS),C),L=x.nativeGas??0n,S=Dt(Vr(Ni(Hn(L,q),t.MAX_DECIMALS),C)),m=890880n;let I=0n;if(x.nativeGas){const J=await F.getAutomaticTokenBridge(),[ee,Te]=await Promise.all([J.maxSwapAmount($.address),J.nativeTokenAmount($.address,S)]);if(S>ee)throw new Error(`Native gas amount exceeds maximum swap amount: ${wl(S,C)}>${wl(ee,C)}`);if(hn(F.chain)==="Solana"&&Te<m)throw new Error(`Native gas amount must be at least ${m} lamports`);I=Te}const se=Dt(c)-S-Dt(O);if(hn($.chain)==="Solana"){const J=await F.getNativeWrappedTokenId();if((Lt($.address)||w0($,J))&&se<m)throw new Error(`Destination amount must be at least ${m} lamports`)}return{sourceToken:{token:x.token,amount:Dt(Y)},destinationToken:{token:$,amount:se},relayFee:{token:$,amount:Dt(O)},destinationNativeGas:I,warnings:P.length>0?P:void 0,eta:b,expires:Hs(0,5,0)}}t.quoteTransfer=p;async function B(A,w){const x=(await A.getExecutorCapabilities())[fn(w.chain)];if(!x)throw new Error(`No executor capabilities found for destination chain ${w.chain}`);return BigInt(x.gasDropOffLimit)}t.getExecutorGasDropOffLimit=B;async function g(A,w,F,x,N,k){const q=await A.getExecutorCapabilities();if(!q[fn(w.chain)])throw new Error(`No executor capabilities found for source chain ${w.chain}`);const Y=q[fn(F.chain)];if(!Y||!Y.requestPrefixes.includes("ERV1"))throw new Error(`No executor capabilities found for destination chain ${F.chain}`);const M=k??0n;if(M>BigInt(Y.gasDropOffLimit))throw new Error(`Native gas amount ${M} exceeds limit ${BigInt(Y.gasDropOffLimit)} for destination chain ${F.chain}`);const j=[];j.push({request:{type:"GasInstruction",gasLimit:x,msgValue:N}}),M>0n&&j.push({request:{type:"GasDropOffInstruction",dropOff:M,recipient:xt.ZERO}});const P={requests:j},$=bn(F0,P),C=await A.getExecutorQuote(w.chain,F.chain,wt.encode($,!0));if(!C.estimatedCost)throw new Error("No estimated cost");const c=BigInt(C.estimatedCost);return{signedQuote:pn(k0,wt.decode(C.signedQuote)),estimatedCost:c,relayInstructions:P}}t.getExecutorQuote=g;async function _(A,w,F){const x={...F};if(hn(F.to.chain)==="Solana"&&x.protocol==="TokenBridge"){const N=await t.lookupDestinationToken(A,w,x.token);if(Lt(N.address)){const k=await w.getNativeWrappedTokenId();x.to=await w.getTokenAccount(x.to.address,k.address)}else x.to=await w.getTokenAccount(x.to.address,N.address)}if(x.to.chain==="Sei"&&x.protocol==="TokenBridge"){if(x.to.chain==="Sei"&&x.payload)throw new Error("Arbitrary payloads unsupported for Sei");x.payload=Pt.encode(JSON.stringify({basic_recipient:{recipient:Bo.encode(x.to.address.toString())}}));const N=w.config.contracts.translator;if(N===void 0||N==="")throw new Error("Unexpected empty translator address");x.to=sn.chainAddress(x.to.chain,N)}return x}t.destinationOverrides=_;function v(A,w){if(w>65535n)throw new Error("dBps exceeds max u16");const x=D1(A,w),N=Dt(x),q=Dt(A)-N;return{fee:x,remaining:Hn(q,A.decimals)}}t.calculateReferrerFee=v})(Ye||(Ye={}));function p2(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=>Fn(n)))).map(n=>sn.tokenId(e,n))}async function g2(t,e,n){const r=Fn(e),s=t.config.tokenMap?bs.byAddress(t.config.tokenMap,r):void 0,i=s?s.symbol:void 0,o=Lt(e.address)?await t.getNativeWrappedTokenId():void 0;return n=n??await t.getDecimals(e.address),{id:e,decimals:n,wrapped:o,symbol:i}}class dh{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]=S0(n.network,n.chain,e),i=await Promise.all(this.routeConstructors.map(async o=>{if(!o.supportedNetworks().includes(n.network))return[];const d=o.supportedChains(n.network);if(!d.includes(n.chain)||!d.includes(r.chain))return[];try{return await o.supportedDestinationTokens(s,n,r)}catch{return[]}}));return p2(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=Fn(Lt(e.destination.id.address)?e.destination.wrapped:e.destination.id),o=(await r.supportedDestinationTokens(e.source.id,e.fromChain,e.toChain)).filter(a=>Fn(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=jE(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(!qs(this.network,n.chain)||!qs(this.network,r.chain)||!Il(this.network,n.chain)||!Il(this.network,r.chain))throw new Error(`Network and chain not supported: ${this.network} ${n.chain} `);if(s){const h=await(await this.getChain(n.chain).getAutomaticCircleBridge()).getRelayerFee(r.chain)+(o||0n);if(e<h)throw new Error(`Amount must be > ${h} (relayerFee + nativeGas)`)}return await St.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 dh(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=_n){return await o2(this.config.api,e,n)}async getVaa(e,n,r=_n){return typeof e=="string"?await Cu(this.config.api,e,n,r):await c2(this.config.api,e,n,r)}async getIsVaaEnqueued(e){return await b2(this.config.api,e)}async getCircleAttestation(e,n=_n){return QE(this.config.circleAPI,e,n)}async getTransactionStatus(e,n=_n){let r;if(typeof e=="string"){const s=await Cu(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 l2(this.config.api,r,n)}async getExecutorCapabilities(){return await fy(this.config.executorAPI)}async getExecutorQuote(e,n,r){return await hy(this.config.executorAPI,e,n,r)}async getExecutorTxStatus(e,n){return await my(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 Fn(e)}static chainAddress(e,n){return{chain:e,address:sn.parseAddress(e,n)}}static tokenId(e,n){return Lt(n)?bd(e):this.chainAddress(e,n)}static async parseMessageFromTx(e,n,r=_n){const i=await Lr(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 Ho{constructor(e){ie(this,"wh");this.wh=e}transferUrl(e){return`https://wormholescan.io/#/tx/${e}?network=${this.wh.network}`}}class lh extends Ho{}ie(lh,"IS_AUTOMATIC",!0);function y2(t){return!!t.constructor.IS_AUTOMATIC}class Dc extends Ho{}ie(Dc,"NATIVE_GAS_DROPOFF_SUPPORTED",!1),ie(Dc,"IS_AUTOMATIC",!1);function E2(t){return t.complete!==void 0}class A2 extends Ho{}function w2(t){return t.finalize!==void 0}var ce=ls(),Rc={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(t,e){var n=ls(),r=n.Buffer;function s(o,a){for(var d in o)a[d]=o[d]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(s(n,e),e.Buffer=i);function i(o,a,d){return r(o,a,d)}i.prototype=Object.create(r.prototype),s(r,i),i.from=function(o,a,d){if(typeof o=="number")throw new TypeError("Argument must not be a number");return r(o,a,d)},i.alloc=function(o,a,d){if(typeof o!="number")throw new TypeError("Argument must be a number");var h=r(o);return a!==void 0?typeof d=="string"?h.fill(a,d):h.fill(a):h.fill(0),h},i.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r(o)},i.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(o)}})(Rc,Rc.exports);var uh=Rc.exports,Bd={exports:{}};Bd.exports;(function(t){(function(e,n){function r(C,c){if(!C)throw new Error(c||"Assertion failed")}function s(C,c){C.super_=c;var b=function(){};b.prototype=c.prototype,C.prototype=new b,C.prototype.constructor=C}function i(C,c,b){if(i.isBN(C))return C;this.negative=0,this.words=null,this.length=0,this.red=null,C!==null&&((c==="le"||c==="be")&&(b=c,c=10),this._init(C||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=ls().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 T=0;c[0]==="-"&&(T++,this.negative=1),T<c.length&&(b===16?this._parseHex(c,T,y):(this._parseBase(c,b,T),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 T=0;T<this.length;T++)this.words[T]=0;var R,O,L=0;if(y==="be")for(T=c.length-1,R=0;T>=0;T-=3)O=c[T]|c[T-1]<<8|c[T-2]<<16,this.words[R]|=O<<L&67108863,this.words[R+1]=O>>>26-L&67108863,L+=24,L>=26&&(L-=26,R++);else if(y==="le")for(T=0,R=0;T<c.length;T+=3)O=c[T]|c[T+1]<<8|c[T+2]<<16,this.words[R]|=O<<L&67108863,this.words[R+1]=O>>>26-L&67108863,L+=24,L>=26&&(L-=26,R++);return this._strip()};function a(C,c){var b=C.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 "+C)}function d(C,c,b){var y=a(C,b);return b-1>=c&&(y|=a(C,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 T=0;T<this.length;T++)this.words[T]=0;var R=0,O=0,L;if(y==="be")for(T=c.length-1;T>=b;T-=2)L=d(c,b,T)<<R,this.words[O]|=L&67108863,R>=18?(R-=18,O+=1,this.words[O]|=L>>>26):R+=8;else{var S=c.length-b;for(T=S%2===0?b+1:b;T<c.length;T+=2)L=d(c,b,T)<<R,this.words[O]|=L&67108863,R>=18?(R-=18,O+=1,this.words[O]|=L>>>26):R+=8}this._strip()};function h(C,c,b,y){for(var T=0,R=0,O=Math.min(C.length,b),L=c;L<O;L++){var S=C.charCodeAt(L)-48;T*=y,S>=49?R=S-49+10:S>=17?R=S-17+10:R=S,r(S>=0&&R<y,"Invalid character"),T+=R}return T}i.prototype._parseBase=function(c,b,y){this.words=[0],this.length=1;for(var T=0,R=1;R<=67108863;R*=b)T++;T--,R=R/b|0;for(var O=c.length-y,L=O%T,S=Math.min(O,O-L)+y,m=0,I=y;I<S;I+=T)m=h(c,I,I+T,b),this.imuln(R),this.words[0]+m<67108864?this.words[0]+=m:this._iaddn(m);if(L!==0){var se=1;for(m=h(c,I,c.length,b),I=0;I<L;I++)se*=b;this.imuln(se),this.words[0]+m<67108864?this.words[0]+=m:this._iaddn(m)}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 u(C,c){C.words=c.words,C.length=c.length,C.negative=c.negative,C.red=c.red}if(i.prototype._move=function(c){u(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 B=["","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"],g=[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],_=[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 T=0,R=0,O=0;O<this.length;O++){var L=this.words[O],S=((L<<T|R)&16777215).toString(16);R=L>>>24-T&16777215,T+=2,T>=26&&(T-=26,O--),R!==0||O!==this.length-1?y=B[6-S.length]+S+y:y=S+y}for(R!==0&&(y=R.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 m=g[c],I=_[c];y="";var se=this.clone();for(se.negative=0;!se.isZero();){var J=se.modrn(I).toString(c);se=se.idivn(I),se.isZero()?y=J+y:y=B[m-J.length]+J+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 v=function(c,b){return c.allocUnsafe?c.allocUnsafe(b):new c(b)};i.prototype.toArrayLike=function(c,b,y){this._strip();var T=this.byteLength(),R=y||Math.max(1,T);r(T<=R,"byte array longer than desired length"),r(R>0,"Requested array length <= 0");var O=v(c,R),L=b==="le"?"LE":"BE";return this["_toArrayLike"+L](O,T),O},i.prototype._toArrayLikeLE=function(c,b){for(var y=0,T=0,R=0,O=0;R<this.length;R++){var L=this.words[R]<<O|T;c[y++]=L&255,y<c.length&&(c[y++]=L>>8&255),y<c.length&&(c[y++]=L>>16&255),O===6?(y<c.length&&(c[y++]=L>>24&255),T=0,O=0):(T=L>>>24,O+=2)}if(y<c.length)for(c[y++]=T;y<c.length;)c[y++]=0},i.prototype._toArrayLikeBE=function(c,b){for(var y=c.length-1,T=0,R=0,O=0;R<this.length;R++){var L=this.words[R]<<O|T;c[y--]=L&255,y>=0&&(c[y--]=L>>8&255),y>=0&&(c[y--]=L>>16&255),O===6?(y>=0&&(c[y--]=L>>24&255),T=0,O=0):(T=L>>>24,O+=2)}if(y>=0)for(c[y--]=T;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 A(C){for(var c=new Array(C.bitLength()),b=0;b<c.length;b++){var y=b/26|0,T=b%26;c[b]=C.words[y]>>>T&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 T=0;T<y.length;T++)this.words[T]=b.words[T]^y.words[T];if(this!==b)for(;T<b.length;T++)this.words[T]=b.words[T];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 T=0;T<b;T++)this.words[T]=~this.words[T]&67108863;return y>0&&(this.words[T]=~this.words[T]&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,T=c%26;return this._expand(y+1),b?this.words[y]=this.words[y]|1<<T:this.words[y]=this.words[y]&~(1<<T),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,T;this.length>c.length?(y=this,T=c):(y=c,T=this);for(var R=0,O=0;O<T.length;O++)b=(y.words[O]|0)+(T.words[O]|0)+R,this.words[O]=b&67108863,R=b>>>26;for(;R!==0&&O<y.length;O++)b=(y.words[O]|0)+R,this.words[O]=b&67108863,R=b>>>26;if(this.length=y.length,R!==0)this.words[this.length]=R,this.length++;else if(y!==this)for(;O<y.length;O++)this.words[O]=y.words[O];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 T,R;y>0?(T=this,R=c):(T=c,R=this);for(var O=0,L=0;L<R.length;L++)b=(T.words[L]|0)-(R.words[L]|0)+O,O=b>>26,this.words[L]=b&67108863;for(;O!==0&&L<T.length;L++)b=(T.words[L]|0)+O,O=b>>26,this.words[L]=b&67108863;if(O===0&&L<T.length&&T!==this)for(;L<T.length;L++)this.words[L]=T.words[L];return this.length=Math.max(this.length,L),T!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(c){return this.clone().isub(c)};function w(C,c,b){b.negative=c.negative^C.negative;var y=C.length+c.length|0;b.length=y,y=y-1|0;var T=C.words[0]|0,R=c.words[0]|0,O=T*R,L=O&67108863,S=O/67108864|0;b.words[0]=L;for(var m=1;m<y;m++){for(var I=S>>>26,se=S&67108863,J=Math.min(m,c.length-1),ee=Math.max(0,m-C.length+1);ee<=J;ee++){var Te=m-ee|0;T=C.words[Te]|0,R=c.words[ee]|0,O=T*R+se,I+=O/67108864|0,se=O&67108863}b.words[m]=se|0,S=I|0}return S!==0?b.words[m]=S|0:b.length--,b._strip()}var F=function(c,b,y){var T=c.words,R=b.words,O=y.words,L=0,S,m,I,se=T[0]|0,J=se&8191,ee=se>>>13,Te=T[1]|0,de=Te&8191,pe=Te>>>13,dn=T[2]|0,Ce=dn&8191,Ne=dn>>>13,tn=T[3]|0,Fe=tn&8191,Ke=tn>>>13,gi=T[4]|0,Me=gi&8191,Ve=gi>>>13,yi=T[5]|0,ze=yi&8191,Ue=yi>>>13,Jt=T[6]|0,Pe=Jt&8191,je=Jt>>>13,ln=T[7]|0,Ge=ln&8191,E=ln>>>13,l=T[8]|0,f=l&8191,D=l>>>13,U=T[9]|0,W=U&8191,V=U>>>13,ge=R[0]|0,he=ge&8191,ue=ge>>>13,Le=R[1]|0,le=Le&8191,tt=Le>>>13,tl=R[2]|0,nt=tl&8191,rt=tl>>>13,nl=R[3]|0,st=nl&8191,it=nl>>>13,rl=R[4]|0,ot=rl&8191,at=rl>>>13,sl=R[5]|0,ct=sl&8191,dt=sl>>>13,il=R[6]|0,lt=il&8191,ut=il>>>13,ol=R[7]|0,ft=ol&8191,ht=ol>>>13,al=R[8]|0,mt=al&8191,bt=al>>>13,cl=R[9]|0,pt=cl&8191,gt=cl>>>13;y.negative=c.negative^b.negative,y.length=19,S=Math.imul(J,he),m=Math.imul(J,ue),m=m+Math.imul(ee,he)|0,I=Math.imul(ee,ue);var aa=(L+S|0)+((m&8191)<<13)|0;L=(I+(m>>>13)|0)+(aa>>>26)|0,aa&=67108863,S=Math.imul(de,he),m=Math.imul(de,ue),m=m+Math.imul(pe,he)|0,I=Math.imul(pe,ue),S=S+Math.imul(J,le)|0,m=m+Math.imul(J,tt)|0,m=m+Math.imul(ee,le)|0,I=I+Math.imul(ee,tt)|0;var ca=(L+S|0)+((m&8191)<<13)|0;L=(I+(m>>>13)|0)+(ca>>>26)|0,ca&=67108863,S=Math.imul(Ce,he),m=Math.imul(Ce,ue),m=m+Math.imul(Ne,he)|0,I=Math.imul(Ne,ue),S=S+Math.imul(de,le)|0,m=m+Math.imul(de,tt)|0,m=m+Math.imul(pe,le)|0,I=I+Math.imul(pe,tt)|0,S=S+Math.imul(J,nt)|0,m=m+Math.imul(J,rt)|0,m=m+Math.imul(ee,nt)|0,I=I+Math.imul(ee,rt)|0;var da=(L+S|0)+((m&8191)<<13)|0;L=(I+(m>>>13)|0)+(da>>>26)|0,da&=67108863,S=Math.imul(Fe,he),m=Math.imul(Fe,ue),m=m+Math.imul(Ke,he)|0,I=Math.imul(Ke,ue),S=S+Math.imul(Ce,le)|0,m=m+Math.imul(Ce,tt)|0,m=m+Math.imul(Ne,le)|0,I=I+Math.imul(Ne,tt)|0,S=S+Math.imul(de,nt)|0,m=m+Math.imul(de,rt)|0,m=m+Math.imul(pe,nt)|0,I=I+Math.imul(pe,rt)|0,S=S+Math.imul(J,st)|0,m=m+Math.imul(J,it)|0,m=m+Math.imul(ee,st)|0,I=I+Math.imul(ee,it)|0;var la=(L+S|0)+((m&8191)<<13)|0;L=(I+(m>>>13)|0)+(la>>>26)|0,la&=67108863,S=Math.imul(Me,he),m=Math.imul(Me,ue),m=m+Math.imul(Ve,he)|0,I=Math.imul(Ve,ue),S=S+Math.imul(Fe,le)|0,m=m+Math.imul(Fe,tt)|0,m=m+Math.imul(Ke,le)|0,I=I+Math.imul(Ke,tt)|0,S=S+Math.imul(Ce,nt)|0,m=m+Math.imul(Ce,rt)|0,m=m+Math.imul(Ne,nt)|0,I=I+Math.imul(Ne,rt)|0,S=S+Math.imul(de,st)|0,m=m+Math.imul(de,it)|0,m=m+Math.imul(pe,st)|0,I=I+Math.imul(pe,it)|0,S=S+Math.imul(J,ot)|0,m=m+Math.imul(J,at)|0,m=m+Math.imul(ee,ot)|0,I=I+Math.imul(ee,at)|0;var ua=(L+S|0)+((m&8191)<<13)|0;L=(I+(m>>>13)|0)+(ua>>>26)|0,ua&=67108863,S=Math.imul(ze,he),m=Math.imul(ze,ue),m=m+Math.imul(Ue,he)|0,I=Math.imul(Ue,ue),S=S+Math.imul(Me,le)|0,m=m+Math.imul(Me,tt)|0,m=m+Math.imul(Ve,le)|0,I=I+Math.imul(Ve,tt)|0,S=S+Math.imul(Fe,nt)|0,m=m+Math.imul(Fe,rt)|0,m=m+Math.imul(Ke,nt)|0,I=I+Math.imul(Ke,rt)|0,S=S+Math.imul(Ce,st)|0,m=m+Math.imul(Ce,it)|0,m=m+Math.imul(Ne,st)|0,I=I+Math.imul(Ne,it)|0,S=S+Math.imul(de,ot)|0,m=m+Math.imul(de,at)|0,m=m+Math.imul(pe,ot)|0,I=I+Math.imul(pe,at)|0,S=S+Math.imul(J,ct)|0,m=m+Math.imul(J,dt)|0,m=m+Math.imul(ee,ct)|0,I=I+Math.imul(ee,dt)|0;var fa=(L+S|0)+((m&8191)<<13)|0;L=(I+(m>>>13)|0)+(fa>>>26)|0,fa&=67108863,S=Math.imul(Pe,he),m=Math.imul(Pe,ue),m=m+Math.imul(je,he)|0,I=Math.imul(je,ue),S=S+Math.imul(ze,le)|0,m=m+Math.imul(ze,tt)|0,m=m+Math.imul(Ue,le)|0,I=I+Math.imul(Ue,tt)|0,S=S+Math.imul(Me,nt)|0,m=m+Math.imul(Me,rt)|0,m=m+Math.imul(Ve,nt)|0,I=I+Math.imul(Ve,rt)|0,S=S+Math.imul(Fe,st)|0,m=m+Math.imul(Fe,it)|0,m=m+Math.imul(Ke,st)|0,I=I+Math.imul(Ke,it)|0,S=S+Math.imul(Ce,ot)|0,m=m+Math.imul(Ce,at)|0,m=m+Math.imul(Ne,ot)|0,I=I+Math.imul(Ne,at)|0,S=S+Math.imul(de,ct)|0,m=m+Math.imul(de,dt)|0,m=m+Math.imul(pe,ct)|0,I=I+Math.imul(pe,dt)|0,S=S+Math.imul(J,lt)|0,m=m+Math.imul(J,ut)|0,m=m+Math.imul(ee,lt)|0,I=I+Math.imul(ee,ut)|0;var ha=(L+S|0)+((m&8191)<<13)|0;L=(I+(m>>>13)|0)+(ha>>>26)|0,ha&=67108863,S=Math.imul(Ge,he),m=Math.imul(Ge,ue),m=m+Math.imul(E,he)|0,I=Math.imul(E,ue),S=S+Math.imul(Pe,le)|0,m=m+Math.imul(Pe,tt)|0,m=m+Math.imul(je,le)|0,I=I+Math.imul(je,tt)|0,S=S+Math.imul(ze,nt)|0,m=m+Math.imul(ze,rt)|0,m=m+Math.imul(Ue,nt)|0,I=I+Math.imul(Ue,rt)|0,S=S+Math.imul(Me,st)|0,m=m+Math.imul(Me,it)|0,m=m+Math.imul(Ve,st)|0,I=I+Math.imul(Ve,it)|0,S=S+Math.imul(Fe,ot)|0,m=m+Math.imul(Fe,at)|0,m=m+Math.imul(Ke,ot)|0,I=I+Math.imul(Ke,at)|0,S=S+Math.imul(Ce,ct)|0,m=m+Math.imul(Ce,dt)|0,m=m+Math.imul(Ne,ct)|0,I=I+Math.imul(Ne,dt)|0,S=S+Math.imul(de,lt)|0,m=m+Math.imul(de,ut)|0,m=m+Math.imul(pe,lt)|0,I=I+Math.imul(pe,ut)|0,S=S+Math.imul(J,ft)|0,m=m+Math.imul(J,ht)|0,m=m+Math.imul(ee,ft)|0,I=I+Math.imul(ee,ht)|0;var ma=(L+S|0)+((m&8191)<<13)|0;L=(I+(m>>>13)|0)+(ma>>>26)|0,ma&=67108863,S=Math.imul(f,he),m=Math.imul(f,ue),m=m+Math.imul(D,he)|0,I=Math.imul(D,ue),S=S+Math.imul(Ge,le)|0,m=m+Math.imul(Ge,tt)|0,m=m+Math.imul(E,le)|0,I=I+Math.imul(E,tt)|0,S=S+Math.imul(Pe,nt)|0,m=m+Math.imul(Pe,rt)|0,m=m+Math.imul(je,nt)|0,I=I+Math.imul(je,rt)|0,S=S+Math.imul(ze,st)|0,m=m+Math.imul(ze,it)|0,m=m+Math.imul(Ue,st)|0,I=I+Math.imul(Ue,it)|0,S=S+Math.imul(Me,ot)|0,m=m+Math.imul(Me,at)|0,m=m+Math.imul(Ve,ot)|0,I=I+Math.imul(Ve,at)|0,S=S+Math.imul(Fe,ct)|0,m=m+Math.imul(Fe,dt)|0,m=m+Math.imul(Ke,ct)|0,I=I+Math.imul(Ke,dt)|0,S=S+Math.imul(Ce,lt)|0,m=m+Math.imul(Ce,ut)|0,m=m+Math.imul(Ne,lt)|0,I=I+Math.imul(Ne,ut)|0,S=S+Math.imul(de,ft)|0,m=m+Math.imul(de,ht)|0,m=m+Math.imul(pe,ft)|0,I=I+Math.imul(pe,ht)|0,S=S+Math.imul(J,mt)|0,m=m+Math.imul(J,bt)|0,m=m+Math.imul(ee,mt)|0,I=I+Math.imul(ee,bt)|0;var ba=(L+S|0)+((m&8191)<<13)|0;L=(I+(m>>>13)|0)+(ba>>>26)|0,ba&=67108863,S=Math.imul(W,he),m=Math.imul(W,ue),m=m+Math.imul(V,he)|0,I=Math.imul(V,ue),S=S+Math.imul(f,le)|0,m=m+Math.imul(f,tt)|0,m=m+Math.imul(D,le)|0,I=I+Math.imul(D,tt)|0,S=S+Math.imul(Ge,nt)|0,m=m+Math.imul(Ge,rt)|0,m=m+Math.imul(E,nt)|0,I=I+Math.imul(E,rt)|0,S=S+Math.imul(Pe,st)|0,m=m+Math.imul(Pe,it)|0,m=m+Math.imul(je,st)|0,I=I+Math.imul(je,it)|0,S=S+Math.imul(ze,ot)|0,m=m+Math.imul(ze,at)|0,m=m+Math.imul(Ue,ot)|0,I=I+Math.imul(Ue,at)|0,S=S+Math.imul(Me,ct)|0,m=m+Math.imul(Me,dt)|0,m=m+Math.imul(Ve,ct)|0,I=I+Math.imul(Ve,dt)|0,S=S+Math.imul(Fe,lt)|0,m=m+Math.imul(Fe,ut)|0,m=m+Math.imul(Ke,lt)|0,I=I+Math.imul(Ke,ut)|0,S=S+Math.imul(Ce,ft)|0,m=m+Math.imul(Ce,ht)|0,m=m+Math.imul(Ne,ft)|0,I=I+Math.imul(Ne,ht)|0,S=S+Math.imul(de,mt)|0,m=m+Math.imul(de,bt)|0,m=m+Math.imul(pe,mt)|0,I=I+Math.imul(pe,bt)|0,S=S+Math.imul(J,pt)|0,m=m+Math.imul(J,gt)|0,m=m+Math.imul(ee,pt)|0,I=I+Math.imul(ee,gt)|0;var pa=(L+S|0)+((m&8191)<<13)|0;L=(I+(m>>>13)|0)+(pa>>>26)|0,pa&=67108863,S=Math.imul(W,le),m=Math.imul(W,tt),m=m+Math.imul(V,le)|0,I=Math.imul(V,tt),S=S+Math.imul(f,nt)|0,m=m+Math.imul(f,rt)|0,m=m+Math.imul(D,nt)|0,I=I+Math.imul(D,rt)|0,S=S+Math.imul(Ge,st)|0,m=m+Math.imul(Ge,it)|0,m=m+Math.imul(E,st)|0,I=I+Math.imul(E,it)|0,S=S+Math.imul(Pe,ot)|0,m=m+Math.imul(Pe,at)|0,m=m+Math.imul(je,ot)|0,I=I+Math.imul(je,at)|0,S=S+Math.imul(ze,ct)|0,m=m+Math.imul(ze,dt)|0,m=m+Math.imul(Ue,ct)|0,I=I+Math.imul(Ue,dt)|0,S=S+Math.imul(Me,lt)|0,m=m+Math.imul(Me,ut)|0,m=m+Math.imul(Ve,lt)|0,I=I+Math.imul(Ve,ut)|0,S=S+Math.imul(Fe,ft)|0,m=m+Math.imul(Fe,ht)|0,m=m+Math.imul(Ke,ft)|0,I=I+Math.imul(Ke,ht)|0,S=S+Math.imul(Ce,mt)|0,m=m+Math.imul(Ce,bt)|0,m=m+Math.imul(Ne,mt)|0,I=I+Math.imul(Ne,bt)|0,S=S+Math.imul(de,pt)|0,m=m+Math.imul(de,gt)|0,m=m+Math.imul(pe,pt)|0,I=I+Math.imul(pe,gt)|0;var ga=(L+S|0)+((m&8191)<<13)|0;L=(I+(m>>>13)|0)+(ga>>>26)|0,ga&=67108863,S=Math.imul(W,nt),m=Math.imul(W,rt),m=m+Math.imul(V,nt)|0,I=Math.imul(V,rt),S=S+Math.imul(f,st)|0,m=m+Math.imul(f,it)|0,m=m+Math.imul(D,st)|0,I=I+Math.imul(D,it)|0,S=S+Math.imul(Ge,ot)|0,m=m+Math.imul(Ge,at)|0,m=m+Math.imul(E,ot)|0,I=I+Math.imul(E,at)|0,S=S+Math.imul(Pe,ct)|0,m=m+Math.imul(Pe,dt)|0,m=m+Math.imul(je,ct)|0,I=I+Math.imul(je,dt)|0,S=S+Math.imul(ze,lt)|0,m=m+Math.imul(ze,ut)|0,m=m+Math.imul(Ue,lt)|0,I=I+Math.imul(Ue,ut)|0,S=S+Math.imul(Me,ft)|0,m=m+Math.imul(Me,ht)|0,m=m+Math.imul(Ve,ft)|0,I=I+Math.imul(Ve,ht)|0,S=S+Math.imul(Fe,mt)|0,m=m+Math.imul(Fe,bt)|0,m=m+Math.imul(Ke,mt)|0,I=I+Math.imul(Ke,bt)|0,S=S+Math.imul(Ce,pt)|0,m=m+Math.imul(Ce,gt)|0,m=m+Math.imul(Ne,pt)|0,I=I+Math.imul(Ne,gt)|0;var ya=(L+S|0)+((m&8191)<<13)|0;L=(I+(m>>>13)|0)+(ya>>>26)|0,ya&=67108863,S=Math.imul(W,st),m=Math.imul(W,it),m=m+Math.imul(V,st)|0,I=Math.imul(V,it),S=S+Math.imul(f,ot)|0,m=m+Math.imul(f,at)|0,m=m+Math.imul(D,ot)|0,I=I+Math.imul(D,at)|0,S=S+Math.imul(Ge,ct)|0,m=m+Math.imul(Ge,dt)|0,m=m+Math.imul(E,ct)|0,I=I+Math.imul(E,dt)|0,S=S+Math.imul(Pe,lt)|0,m=m+Math.imul(Pe,ut)|0,m=m+Math.imul(je,lt)|0,I=I+Math.imul(je,ut)|0,S=S+Math.imul(ze,ft)|0,m=m+Math.imul(ze,ht)|0,m=m+Math.imul(Ue,ft)|0,I=I+Math.imul(Ue,ht)|0,S=S+Math.imul(Me,mt)|0,m=m+Math.imul(Me,bt)|0,m=m+Math.imul(Ve,mt)|0,I=I+Math.imul(Ve,bt)|0,S=S+Math.imul(Fe,pt)|0,m=m+Math.imul(Fe,gt)|0,m=m+Math.imul(Ke,pt)|0,I=I+Math.imul(Ke,gt)|0;var Ea=(L+S|0)+((m&8191)<<13)|0;L=(I+(m>>>13)|0)+(Ea>>>26)|0,Ea&=67108863,S=Math.imul(W,ot),m=Math.imul(W,at),m=m+Math.imul(V,ot)|0,I=Math.imul(V,at),S=S+Math.imul(f,ct)|0,m=m+Math.imul(f,dt)|0,m=m+Math.imul(D,ct)|0,I=I+Math.imul(D,dt)|0,S=S+Math.imul(Ge,lt)|0,m=m+Math.imul(Ge,ut)|0,m=m+Math.imul(E,lt)|0,I=I+Math.imul(E,ut)|0,S=S+Math.imul(Pe,ft)|0,m=m+Math.imul(Pe,ht)|0,m=m+Math.imul(je,ft)|0,I=I+Math.imul(je,ht)|0,S=S+Math.imul(ze,mt)|0,m=m+Math.imul(ze,bt)|0,m=m+Math.imul(Ue,mt)|0,I=I+Math.imul(Ue,bt)|0,S=S+Math.imul(Me,pt)|0,m=m+Math.imul(Me,gt)|0,m=m+Math.imul(Ve,pt)|0,I=I+Math.imul(Ve,gt)|0;var Aa=(L+S|0)+((m&8191)<<13)|0;L=(I+(m>>>13)|0)+(Aa>>>26)|0,Aa&=67108863,S=Math.imul(W,ct),m=Math.imul(W,dt),m=m+Math.imul(V,ct)|0,I=Math.imul(V,dt),S=S+Math.imul(f,lt)|0,m=m+Math.imul(f,ut)|0,m=m+Math.imul(D,lt)|0,I=I+Math.imul(D,ut)|0,S=S+Math.imul(Ge,ft)|0,m=m+Math.imul(Ge,ht)|0,m=m+Math.imul(E,ft)|0,I=I+Math.imul(E,ht)|0,S=S+Math.imul(Pe,mt)|0,m=m+Math.imul(Pe,bt)|0,m=m+Math.imul(je,mt)|0,I=I+Math.imul(je,bt)|0,S=S+Math.imul(ze,pt)|0,m=m+Math.imul(ze,gt)|0,m=m+Math.imul(Ue,pt)|0,I=I+Math.imul(Ue,gt)|0;var wa=(L+S|0)+((m&8191)<<13)|0;L=(I+(m>>>13)|0)+(wa>>>26)|0,wa&=67108863,S=Math.imul(W,lt),m=Math.imul(W,ut),m=m+Math.imul(V,lt)|0,I=Math.imul(V,ut),S=S+Math.imul(f,ft)|0,m=m+Math.imul(f,ht)|0,m=m+Math.imul(D,ft)|0,I=I+Math.imul(D,ht)|0,S=S+Math.imul(Ge,mt)|0,m=m+Math.imul(Ge,bt)|0,m=m+Math.imul(E,mt)|0,I=I+Math.imul(E,bt)|0,S=S+Math.imul(Pe,pt)|0,m=m+Math.imul(Pe,gt)|0,m=m+Math.imul(je,pt)|0,I=I+Math.imul(je,gt)|0;var Sa=(L+S|0)+((m&8191)<<13)|0;L=(I+(m>>>13)|0)+(Sa>>>26)|0,Sa&=67108863,S=Math.imul(W,ft),m=Math.imul(W,ht),m=m+Math.imul(V,ft)|0,I=Math.imul(V,ht),S=S+Math.imul(f,mt)|0,m=m+Math.imul(f,bt)|0,m=m+Math.imul(D,mt)|0,I=I+Math.imul(D,bt)|0,S=S+Math.imul(Ge,pt)|0,m=m+Math.imul(Ge,gt)|0,m=m+Math.imul(E,pt)|0,I=I+Math.imul(E,gt)|0;var Ca=(L+S|0)+((m&8191)<<13)|0;L=(I+(m>>>13)|0)+(Ca>>>26)|0,Ca&=67108863,S=Math.imul(W,mt),m=Math.imul(W,bt),m=m+Math.imul(V,mt)|0,I=Math.imul(V,bt),S=S+Math.imul(f,pt)|0,m=m+Math.imul(f,gt)|0,m=m+Math.imul(D,pt)|0,I=I+Math.imul(D,gt)|0;var Ba=(L+S|0)+((m&8191)<<13)|0;L=(I+(m>>>13)|0)+(Ba>>>26)|0,Ba&=67108863,S=Math.imul(W,pt),m=Math.imul(W,gt),m=m+Math.imul(V,pt)|0,I=Math.imul(V,gt);var xa=(L+S|0)+((m&8191)<<13)|0;return L=(I+(m>>>13)|0)+(xa>>>26)|0,xa&=67108863,O[0]=aa,O[1]=ca,O[2]=da,O[3]=la,O[4]=ua,O[5]=fa,O[6]=ha,O[7]=ma,O[8]=ba,O[9]=pa,O[10]=ga,O[11]=ya,O[12]=Ea,O[13]=Aa,O[14]=wa,O[15]=Sa,O[16]=Ca,O[17]=Ba,O[18]=xa,L!==0&&(O[19]=L,y.length++),y};Math.imul||(F=w);function x(C,c,b){b.negative=c.negative^C.negative,b.length=C.length+c.length;for(var y=0,T=0,R=0;R<b.length-1;R++){var O=T;T=0;for(var L=y&67108863,S=Math.min(R,c.length-1),m=Math.max(0,R-C.length+1);m<=S;m++){var I=R-m,se=C.words[I]|0,J=c.words[m]|0,ee=se*J,Te=ee&67108863;O=O+(ee/67108864|0)|0,Te=Te+L|0,L=Te&67108863,O=O+(Te>>>26)|0,T+=O>>>26,O&=67108863}b.words[R]=L,y=O,O=T}return y!==0?b.words[R]=y:b.length--,b._strip()}function N(C,c,b){return x(C,c,b)}i.prototype.mulTo=function(c,b){var y,T=this.length+c.length;return this.length===10&&c.length===10?y=F(this,c,b):T<63?y=w(this,c,b):T<1024?y=x(this,c,b):y=N(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),N(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,T=0;T<this.length;T++){var R=(this.words[T]|0)*c,O=(R&67108863)+(y&67108863);y>>=26,y+=R/67108864|0,y+=O>>>26,this.words[T]=O&67108863}return y!==0&&(this.words[T]=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=A(c);if(b.length===0)return new i(1);for(var y=this,T=0;T<b.length&&b[T]===0;T++,y=y.sqr());if(++T<b.length)for(var R=y.sqr();T<b.length;T++,R=R.sqr())b[T]!==0&&(y=y.mul(R));return y},i.prototype.iushln=function(c){r(typeof c=="number"&&c>=0);var b=c%26,y=(c-b)/26,T=67108863>>>26-b<<26-b,R;if(b!==0){var O=0;for(R=0;R<this.length;R++){var L=this.words[R]&T,S=(this.words[R]|0)-L<<b;this.words[R]=S|O,O=L>>>26-b}O&&(this.words[R]=O,this.length++)}if(y!==0){for(R=this.length-1;R>=0;R--)this.words[R+y]=this.words[R];for(R=0;R<y;R++)this.words[R]=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 T;b?T=(b-b%26)/26:T=0;var R=c%26,O=Math.min((c-R)/26,this.length),L=67108863^67108863>>>R<<R,S=y;if(T-=O,T=Math.max(0,T),S){for(var m=0;m<O;m++)S.words[m]=this.words[m];S.length=O}if(O!==0)if(this.length>O)for(this.length-=O,m=0;m<this.length;m++)this.words[m]=this.words[m+O];else this.words[0]=0,this.length=1;var I=0;for(m=this.length-1;m>=0&&(I!==0||m>=T);m--){var se=this.words[m]|0;this.words[m]=I<<26-R|se>>>R,I=se&L}return S&&I!==0&&(S.words[S.length++]=I),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,T=1<<b;if(this.length<=y)return!1;var R=this.words[y];return!!(R&T)},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 T=67108863^67108863>>>b<<b;this.words[this.length-1]&=T}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 T=c.length+y,R;this._expand(T);var O,L=0;for(R=0;R<c.length;R++){O=(this.words[R+y]|0)+L;var S=(c.words[R]|0)*b;O-=S&67108863,L=(O>>26)-(S/67108864|0),this.words[R+y]=O&67108863}for(;R<this.length-y;R++)O=(this.words[R+y]|0)+L,L=O>>26,this.words[R+y]=O&67108863;if(L===0)return this._strip();for(r(L===-1),L=0,R=0;R<this.length;R++)O=-(this.words[R]|0)+L,L=O>>26,this.words[R]=O&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(c,b){var y=this.length-c.length,T=this.clone(),R=c,O=R.words[R.length-1]|0,L=this._countBits(O);y=26-L,y!==0&&(R=R.ushln(y),T.iushln(y),O=R.words[R.length-1]|0);var S=T.length-R.length,m;if(b!=="mod"){m=new i(null),m.length=S+1,m.words=new Array(m.length);for(var I=0;I<m.length;I++)m.words[I]=0}var se=T.clone()._ishlnsubmul(R,1,S);se.negative===0&&(T=se,m&&(m.words[S]=1));for(var J=S-1;J>=0;J--){var ee=(T.words[R.length+J]|0)*67108864+(T.words[R.length+J-1]|0);for(ee=Math.min(ee/O|0,67108863),T._ishlnsubmul(R,ee,J);T.negative!==0;)ee--,T.negative=0,T._ishlnsubmul(R,1,J),T.isZero()||(T.negative^=1);m&&(m.words[J]=ee)}return m&&m._strip(),T._strip(),b!=="div"&&y!==0&&T.iushrn(y),{div:m||null,mod:T}},i.prototype.divmod=function(c,b,y){if(r(!c.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var T,R,O;return this.negative!==0&&c.negative===0?(O=this.neg().divmod(c,b),b!=="mod"&&(T=O.div.neg()),b!=="div"&&(R=O.mod.neg(),y&&R.negative!==0&&R.iadd(c)),{div:T,mod:R}):this.negative===0&&c.negative!==0?(O=this.divmod(c.neg(),b),b!=="mod"&&(T=O.div.neg()),{div:T,mod:O.mod}):this.negative&c.negative?(O=this.neg().divmod(c.neg(),b),b!=="div"&&(R=O.mod.neg(),y&&R.negative!==0&&R.isub(c)),{div:O.div,mod:R}):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,T=c.ushrn(1),R=c.andln(1),O=y.cmp(T);return O<0||R===1&&O===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,T=0,R=this.length-1;R>=0;R--)T=(y*T+(this.words[R]|0))%c;return b?-T:T},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,T=this.length-1;T>=0;T--){var R=(this.words[T]|0)+y*67108864;this.words[T]=R/c|0,y=R%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 T=new i(1),R=new i(0),O=new i(0),L=new i(1),S=0;b.isEven()&&y.isEven();)b.iushrn(1),y.iushrn(1),++S;for(var m=y.clone(),I=b.clone();!b.isZero();){for(var se=0,J=1;!(b.words[0]&J)&&se<26;++se,J<<=1);if(se>0)for(b.iushrn(se);se-- >0;)(T.isOdd()||R.isOdd())&&(T.iadd(m),R.isub(I)),T.iushrn(1),R.iushrn(1);for(var ee=0,Te=1;!(y.words[0]&Te)&&ee<26;++ee,Te<<=1);if(ee>0)for(y.iushrn(ee);ee-- >0;)(O.isOdd()||L.isOdd())&&(O.iadd(m),L.isub(I)),O.iushrn(1),L.iushrn(1);b.cmp(y)>=0?(b.isub(y),T.isub(O),R.isub(L)):(y.isub(b),O.isub(T),L.isub(R))}return{a:O,b:L,gcd:y.iushln(S)}},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 T=new i(1),R=new i(0),O=y.clone();b.cmpn(1)>0&&y.cmpn(1)>0;){for(var L=0,S=1;!(b.words[0]&S)&&L<26;++L,S<<=1);if(L>0)for(b.iushrn(L);L-- >0;)T.isOdd()&&T.iadd(O),T.iushrn(1);for(var m=0,I=1;!(y.words[0]&I)&&m<26;++m,I<<=1);if(m>0)for(y.iushrn(m);m-- >0;)R.isOdd()&&R.iadd(O),R.iushrn(1);b.cmp(y)>=0?(b.isub(y),T.isub(R)):(y.isub(b),R.isub(T))}var se;return b.cmpn(1)===0?se=T:se=R,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 T=0;b.isEven()&&y.isEven();T++)b.iushrn(1),y.iushrn(1);do{for(;b.isEven();)b.iushrn(1);for(;y.isEven();)y.iushrn(1);var R=b.cmp(y);if(R<0){var O=b;b=y,y=O}else if(R===0||y.cmpn(1)===0)break;b.isub(y)}while(!0);return y.iushln(T)},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,T=1<<b;if(this.length<=y)return this._expand(y+1),this.words[y]|=T,this;for(var R=T,O=y;R!==0&&O<this.length;O++){var L=this.words[O]|0;L+=R,R=L>>>26,L&=67108863,this.words[O]=L}return R!==0&&(this.words[O]=R,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 T=this.words[0]|0;y=T===c?0:T<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 T=this.words[y]|0,R=c.words[y]|0;if(T!==R){T<R?b=-1:T>R&&(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 P(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 k={k256:null,p224:null,p192:null,p25519:null};function q(C,c){this.name=C,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()}q.prototype._tmp=function(){var c=new i(null);return c.words=new Array(Math.ceil(this.n/13)),c},q.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 T=y<this.n?-1:b.ucmp(this.p);return T===0?(b.words[0]=0,b.length=1):T>0?b.isub(this.p):b.strip!==void 0?b.strip():b._strip(),b},q.prototype.split=function(c,b){c.iushrn(this.n,0,b)},q.prototype.imulK=function(c){return c.imul(this.k)};function G(){q.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(G,q),G.prototype.split=function(c,b){for(var y=4194303,T=Math.min(c.length,9),R=0;R<T;R++)b.words[R]=c.words[R];if(b.length=T,c.length<=9){c.words[0]=0,c.length=1;return}var O=c.words[9];for(b.words[b.length++]=O&y,R=10;R<c.length;R++){var L=c.words[R]|0;c.words[R-10]=(L&y)<<4|O>>>22,O=L}O>>>=22,c.words[R-10]=O,O===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 T=c.words[y]|0;b+=T*977,c.words[y]=b&67108863,b=T*64+(b/67108864|0)}return c.words[c.length-1]===0&&(c.length--,c.words[c.length-1]===0&&c.length--),c};function Y(){q.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}s(Y,q);function M(){q.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}s(M,q);function j(){q.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}s(j,q),j.prototype.imulK=function(c){for(var b=0,y=0;y<c.length;y++){var T=(c.words[y]|0)*19+b,R=T&67108863;T>>>=26,c.words[y]=R,b=T}return b!==0&&(c.words[c.length++]=b),c},i._prime=function(c){if(k[c])return k[c];var b;if(c==="k256")b=new G;else if(c==="p224")b=new Y;else if(c==="p192")b=new M;else if(c==="p25519")b=new j;else throw new Error("Unknown prime "+c);return k[c]=b,b};function P(C){if(typeof C=="string"){var c=i._prime(C);this.m=c.p,this.prime=c}else r(C.gtn(1),"modulus must be greater than 1"),this.m=C,this.prime=null}P.prototype._verify1=function(c){r(c.negative===0,"red works only with positives"),r(c.red,"red works only with red numbers")},P.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")},P.prototype.imod=function(c){return this.prime?this.prime.ireduce(c)._forceRed(this):(u(c,c.umod(this.m)._forceRed(this)),c)},P.prototype.neg=function(c){return c.isZero()?c.clone():this.m.sub(c)._forceRed(this)},P.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)},P.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},P.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)},P.prototype.isub=function(c,b){this._verify2(c,b);var y=c.isub(b);return y.cmpn(0)<0&&y.iadd(this.m),y},P.prototype.shl=function(c,b){return this._verify1(c),this.imod(c.ushln(b))},P.prototype.imul=function(c,b){return this._verify2(c,b),this.imod(c.imul(b))},P.prototype.mul=function(c,b){return this._verify2(c,b),this.imod(c.mul(b))},P.prototype.isqr=function(c){return this.imul(c,c.clone())},P.prototype.sqr=function(c){return this.mul(c,c)},P.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 T=this.m.subn(1),R=0;!T.isZero()&&T.andln(1)===0;)R++,T.iushrn(1);r(!T.isZero());var O=new i(1).toRed(this),L=O.redNeg(),S=this.m.subn(1).iushrn(1),m=this.m.bitLength();for(m=new i(2*m*m).toRed(this);this.pow(m,S).cmp(L)!==0;)m.redIAdd(L);for(var I=this.pow(m,T),se=this.pow(c,T.addn(1).iushrn(1)),J=this.pow(c,T),ee=R;J.cmp(O)!==0;){for(var Te=J,de=0;Te.cmp(O)!==0;de++)Te=Te.redSqr();r(de<ee);var pe=this.pow(I,new i(1).iushln(ee-de-1));se=se.redMul(pe),I=pe.redSqr(),J=J.redMul(I),ee=de}return se},P.prototype.invm=function(c){var b=c._invmp(this.m);return b.negative!==0?(b.negative=0,this.imod(b).redNeg()):this.imod(b)},P.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,T=new Array(1<<y);T[0]=new i(1).toRed(this),T[1]=c;for(var R=2;R<T.length;R++)T[R]=this.mul(T[R-1],c);var O=T[0],L=0,S=0,m=b.bitLength()%26;for(m===0&&(m=26),R=b.length-1;R>=0;R--){for(var I=b.words[R],se=m-1;se>=0;se--){var J=I>>se&1;if(O!==T[0]&&(O=this.sqr(O)),J===0&&L===0){S=0;continue}L<<=1,L|=J,S++,!(S!==y&&(R!==0||se!==0))&&(O=this.mul(O,T[L]),S=0,L=0)}m=26}return O},P.prototype.convertTo=function(c){var b=c.umod(this.m);return b===c?b.clone():b},P.prototype.convertFrom=function(c){var b=c.clone();return b.red=null,b},i.mont=function(c){return new $(c)};function $(C){P.call(this,C),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($,P),$.prototype.convertTo=function(c){return this.imod(c.ushln(this.shift))},$.prototype.convertFrom=function(c){var b=this.imod(c.mul(this.rinv));return b.red=null,b},$.prototype.imul=function(c,b){if(c.isZero()||b.isZero())return c.words[0]=0,c.length=1,c;var y=c.imul(b),T=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),R=y.isub(T).iushrn(this.shift),O=R;return R.cmp(this.m)>=0?O=R.isub(this.m):R.cmpn(0)<0&&(O=R.iadd(this.m)),O._forceRed(this)},$.prototype.mul=function(c,b){if(c.isZero()||b.isZero())return new i(0)._forceRed(this);var y=c.mul(b),T=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),R=y.isub(T).iushrn(this.shift),O=R;return R.cmp(this.m)>=0?O=R.isub(this.m):R.cmpn(0)<0&&(O=R.iadd(this.m)),O._forceRed(this)},$.prototype.invm=function(c){var b=this.imod(c._invmp(this.m).mul(this.r2));return b._forceRed(this)}})(t,an)})(Bd);var xd=Bd.exports;const vc=ni(xd),fh="6.13.5";function S2(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 C2(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 Ic(t,e,n){for(let r in e){let s=e[r];const i=n?n[r]:null;i&&S2(s,i,r),Object.defineProperty(t,r,{enumerable:!0,value:s,writable:!1})}}function Yr(t){if(t==null)return"null";if(Array.isArray(t))return"[ "+t.map(Yr).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 Yr(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=>`${Yr(n)}: ${Yr(t[n])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function hh(t,e){return t&&t.code===e}function B2(t){return hh(t,"CALL_EXCEPTION")}function mh(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: ${Yr(n)}`);for(const o in n){if(o==="shortMessage")continue;const a=n[o];i.push(o+"="+Yr(a))}}i.push(`code=${e}`),i.push(`version=${fh}`),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 Ic(s,{code:e}),n&&Object.assign(s,n),s.shortMessage==null&&Ic(s,{shortMessage:r}),s}function kn(t,e,n,r){if(!t)throw mh(e,n,r)}function tr(t,e,n,r){kn(t,e,"INVALID_ARGUMENT",{argument:n,value:r})}function x2(t,e,n){n==null&&(n=""),n&&(n=": "+n),kn(t>=e,"missing argument"+n,"MISSING_ARGUMENT",{count:t,expectedCount:e}),kn(t<=e,"too many arguments"+n,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}const _2=["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 T2(t){kn(_2.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function D2(t,e,n){if(n==null&&(n=""),t!==e){let r=n,s="new";n&&(r+=".",s+=" "+n),kn(!1,`private constructor; use ${r}from* methods`,"UNSUPPORTED_OPERATION",{operation:s})}}function bh(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 Mr(t,e){return bh(t,e,!1)}function R2(t,e){return bh(t,e,!0)}function _d(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 _d(t,!0)||t instanceof Uint8Array}const Bu="0123456789abcdef";function fi(t){const e=Mr(t);let n="0x";for(let r=0;r<e.length;r++){const s=e[r];n+=Bu[(s&240)>>4]+Bu[s&15]}return n}function I2(t){return"0x"+t.map(e=>fi(e).substring(2)).join("")}function F2(t){return _d(t,!0)?(t.length-2)/2:Mr(t).length}function k2(t,e,n){const r=Mr(t);return n!=null&&n>r.length&&kn(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:n}),fi(r.slice(e??0,n??r.length))}function ph(t,e,n){const r=Mr(t);kn(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),fi(s)}function O2(t,e){return ph(t,e,!0)}function N2(t,e){return ph(t,e,!1)}function Js(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function Td(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 U2(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Js(t.outputLen),Js(t.blockLen)}function Fc(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 gh(t,e){Td(t);const n=e.outputLen;if(t.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}const Ma=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const yh=t=>t instanceof Uint8Array,Eh=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),L2=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),M2=(t,e)=>t<<32-e|t>>>e,P2=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!P2)throw new Error("Non little-endian hardware is not supported");const W2=async()=>{};async function z2(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 W2(),r+=i)}}function H2(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function Dd(t){if(typeof t=="string"&&(t=H2(t)),!yh(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}function q2(...t){const e=new Uint8Array(t.reduce((r,s)=>r+s.length,0));let n=0;return t.forEach(r=>{if(!yh(r))throw new Error("Uint8Array expected");e.set(r,n),n+=r.length}),e}class Ah{clone(){return this._cloneInto()}}const $2={}.toString;function K2(t,e){if(e!==void 0&&$2.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(t,e)}function wh(t){const e=r=>t().update(Dd(r)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function V2(t=32){if(Ma&&typeof Ma.getRandomValues=="function")return Ma.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}const xi=BigInt(2**32-1),kc=BigInt(32);function Sh(t,e=!1){return e?{h:Number(t&xi),l:Number(t>>kc&xi)}:{h:Number(t>>kc&xi)|0,l:Number(t&xi)|0}}function Ch(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}=Sh(t[s],e);[n[s],r[s]]=[i,o]}return[n,r]}const j2=(t,e)=>BigInt(t>>>0)<<kc|BigInt(e>>>0),G2=(t,e,n)=>t>>>n,Y2=(t,e,n)=>t<<32-n|e>>>n,X2=(t,e,n)=>t>>>n|e<<32-n,J2=(t,e,n)=>t<<32-n|e>>>n,Z2=(t,e,n)=>t<<64-n|e>>>n-32,Q2=(t,e,n)=>t>>>n-32|e<<64-n,e8=(t,e)=>e,t8=(t,e)=>t,Bh=(t,e,n)=>t<<n|e>>>32-n,xh=(t,e,n)=>e<<n|t>>>32-n,_h=(t,e,n)=>e<<n-32|t>>>64-n,Th=(t,e,n)=>t<<n-32|e>>>64-n;function n8(t,e,n,r){const s=(e>>>0)+(r>>>0);return{h:t+n+(s/2**32|0)|0,l:s|0}}const r8=(t,e,n)=>(t>>>0)+(e>>>0)+(n>>>0),s8=(t,e,n,r)=>e+n+r+(t/2**32|0)|0,i8=(t,e,n,r)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0),o8=(t,e,n,r,s)=>e+n+r+s+(t/2**32|0)|0,a8=(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,d8={fromBig:Sh,split:Ch,toBig:j2,shrSH:G2,shrSL:Y2,rotrSH:X2,rotrSL:J2,rotrBH:Z2,rotrBL:Q2,rotr32H:e8,rotr32L:t8,rotlSH:Bh,rotlSL:xh,rotlBH:_h,rotlBL:Th,add:n8,add3L:r8,add3H:s8,add4L:i8,add4H:o8,add5H:c8,add5L:a8},[Dh,Rh,vh]=[[],[],[]],l8=BigInt(0),vs=BigInt(1),u8=BigInt(2),f8=BigInt(7),h8=BigInt(256),m8=BigInt(113);for(let t=0,e=vs,n=1,r=0;t<24;t++){[n,r]=[r,(2*n+3*r)%5],Dh.push(2*(5*r+n)),Rh.push((t+1)*(t+2)/2%64);let s=l8;for(let i=0;i<7;i++)e=(e<<vs^(e>>f8)*m8)%h8,e&u8&&(s^=vs<<(vs<<BigInt(i))-vs);vh.push(s)}const[b8,p8]=Ch(vh,!0),xu=(t,e,n)=>n>32?_h(t,e,n):Bh(t,e,n),_u=(t,e,n)=>n>32?Th(t,e,n):xh(t,e,n);function g8(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,d=(o+2)%10,h=n[d],u=n[d+1],p=xu(h,u,1)^n[a],B=_u(h,u,1)^n[a+1];for(let g=0;g<50;g+=10)t[o+g]^=p,t[o+g+1]^=B}let s=t[2],i=t[3];for(let o=0;o<24;o++){const a=Rh[o],d=xu(s,i,a),h=_u(s,i,a),u=Dh[o];s=t[u],i=t[u+1],t[u]=d,t[u+1]=h}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]^=b8[r],t[1]^=p8[r]}n.fill(0)}class Rd extends Ah{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,Js(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Eh(this.state)}keccak(){g8(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){Fc(this);const{blockLen:n,state:r}=this;e=Dd(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){Fc(this,!1),Td(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 Js(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(gh(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 Rd(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 y8=(t,e,n)=>wh(()=>new Rd(e,t,n)),E8=y8(1,136,256/8);let Ih=!1;const Fh=function(t){return E8(t)};let kh=Fh;function As(t){const e=Mr(t,"data");return fi(kh(e))}As._=Fh;As.lock=function(){Ih=!0};As.register=function(t){if(Ih)throw new TypeError("keccak256 is locked");kh=t};Object.freeze(As);const A8=BigInt(0),w8=BigInt(36);function Tu(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=Mr(As(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 vd={};for(let t=0;t<10;t++)vd[String(t)]=String(t);for(let t=0;t<26;t++)vd[String.fromCharCode(65+t)]=String(10+t);const Du=15;function S8(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(r=>vd[r]).join("");for(;e.length>=Du;){let r=e.substring(0,Du);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 C8=function(){const t={};for(let e=0;e<36;e++){const n="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[n]=BigInt(e)}return t}();function B8(t){t=t.toLowerCase();let e=A8;for(let n=0;n<t.length;n++)e=e*w8+C8[t[n]];return e}function Br(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=Tu(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)===S8(t),"bad icap checksum","address",t);let e=B8(t.substring(4)).toString(16);for(;e.length<40;)e="0"+e;return Tu("0x"+e)}tr(!1,"invalid address","address",t)}function Oh(t){return t&&typeof t.getAddress=="function"}function x8(t){try{return Br(t),!0}catch{}return!1}async function Pa(t,e){const n=await e;return(n==null||n==="0x0000000000000000000000000000000000000000")&&(kn(typeof t!="string","unconfigured name","UNCONFIGURED_NAME",{value:t}),tr(!1,"invalid AddressLike value; did not resolve to a value address","target",t)),Br(n)}function _8(t,e){if(typeof t=="string")return t.match(/^0x[0-9a-f]{40}$/i)?Br(t):(kn(e!=null,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),Pa(t,e.resolveName(t)));if(Oh(t))return Pa(t,t.getAddress());if(t&&typeof t.then=="function")return Pa(t,t);tr(!1,"unsupported addressable value","target",t)}const T8=0,D8=0n,Id="Evm",R8=(t,e)=>({...t,from:e}),v8=(t,e)=>({...t,chainId:e}),I8="0x0000000000000000000000000000000000000000",nn=class nn{constructor(e){ie(this,"type","Native");ie(this,"address");if(nn.instanceof(e)){const n=e;this.address=n.address;return}if(typeof e=="string"){if(!nn.isValidAddress(e))throw new Error(`Invalid EVM address, expected ${nn.byteSize}-byte hex string but got ${e}`);this.address=Br(e)}else if(e instanceof Uint8Array)e=this.trimUniversalAddress(e),this.address=Br(wt.encode(e));else if(xt.instanceof(e)){const n=this.trimUniversalAddress(e.toUint8Array());this.address=Br(wt.encode(n))}else throw new Error(`Invalid EVM address ${e}`)}unwrap(){return this.address}toString(){return this.address}toNative(){return this}toUint8Array(){return wt.decode(this.address)}toUniversalAddress(){return new xt(this.address,"hex")}trimUniversalAddress(e){if(e.length===nn.byteSize)return e;if(e.length<nn.byteSize)throw new Error(`Invalid evm address, expected ${nn.byteSize} bytes`);if(e.length!==xt.byteSize)throw new Error(`Invalid universal address, expected ${xt.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 x8(e)}static instanceof(e){return e.constructor.platform===nn.platform}equals(e){return nn.instanceof(e)?e.address===this.address:e.equals(this.toUniversalAddress())}};ie(nn,"byteSize",20),ie(nn,"platform",Id);let ao=nn;dd(Id,ao);var _i=uh.Buffer;function F8(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),d=Math.log(o)/Math.log(256),h=Math.log(256)/Math.log(o);function u(g){if((Array.isArray(g)||g instanceof Uint8Array)&&(g=_i.from(g)),!_i.isBuffer(g))throw new TypeError("Expected Buffer");if(g.length===0)return"";for(var _=0,v=0,A=0,w=g.length;A!==w&&g[A]===0;)A++,_++;for(var F=(w-A)*h+1>>>0,x=new Uint8Array(F);A!==w;){for(var N=g[A],k=0,q=F-1;(N!==0||k<v)&&q!==-1;q--,k++)N+=256*x[q]>>>0,x[q]=N%o>>>0,N=N/o>>>0;if(N!==0)throw new Error("Non-zero carry");v=k,A++}for(var G=F-v;G!==F&&x[G]===0;)G++;for(var Y=a.repeat(_);G<F;++G)Y+=t.charAt(x[G]);return Y}function p(g){if(typeof g!="string")throw new TypeError("Expected String");if(g.length===0)return _i.alloc(0);for(var _=0,v=0,A=0;g[_]===a;)v++,_++;for(var w=(g.length-_)*d+1>>>0,F=new Uint8Array(w);_<g.length;){var x=g.charCodeAt(_);if(x>255)return;var N=e[x];if(N===255)return;for(var k=0,q=w-1;(N!==0||k<A)&&q!==-1;q--,k++)N+=o*F[q]>>>0,F[q]=N%256>>>0,N=N/256>>>0;if(N!==0)throw new Error("Non-zero carry");A=k,_++}for(var G=w-A;G!==w&&F[G]===0;)G++;var Y=_i.allocUnsafe(v+(w-G));Y.fill(0,0,v);for(var M=v;G!==w;)Y[M++]=F[G++];return Y}function B(g){var _=p(g);if(_)return _;throw new Error("Non-base"+o+" character")}return{encode:u,decodeUnsafe:p,decode:B}}var k8=F8,O8=k8,N8="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",Nh=O8(N8);const Bt=ni(Nh);var Rt={};function qn(t,e,n){return e<=t&&t<=n}function qo(t){if(t===void 0)return{};if(t===Object(t))return t;throw TypeError("Could not convert argument to dictionary")}function U8(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,d=o&1023;s.push(65536+(a<<10)+d),r+=1}else s.push(65533)}r+=1}return s}function L8(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 co=-1;function Fd(t){this.tokens=[].slice.call(t)}Fd.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():co},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 as=-1;function Wa(t,e){if(t)throw TypeError("Decoder error");return e||65533}var lo="utf-8";function uo(t,e){if(!(this instanceof uo))return new uo(t,e);if(t=t!==void 0?String(t).toLowerCase():lo,t!==lo)throw new Error("Encoding not supported. Only utf-8 is supported");e=qo(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})}uo.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=qo(n),this._streaming||(this._decoder=new M8({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!n.stream;for(var s=new Fd(r),i=[],o;!s.endOfStream()&&(o=this._decoder.handler(s,s.read()),o!==as);)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===as)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),L8(i)}};function fo(t,e){if(!(this instanceof fo))return new fo(t,e);if(t=t!==void 0?String(t).toLowerCase():lo,t!==lo)throw new Error("Encoding not supported. Only utf-8 is supported");e=qo(e),this._streaming=!1,this._encoder=null,this._options={fatal:!!e.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}fo.prototype={encode:function(e,n){e=e?String(e):"",n=qo(n),this._streaming||(this._encoder=new P8(this._options)),this._streaming=!!n.stream;for(var r=[],s=new Fd(U8(e)),i;!s.endOfStream()&&(i=this._encoder.handler(s,s.read()),i!==as);)Array.isArray(i)?r.push.apply(r,i):r.push(i);if(!this._streaming){for(;i=this._encoder.handler(s,s.read()),i!==as;)Array.isArray(i)?r.push.apply(r,i):r.push(i);this._encoder=null}return new Uint8Array(r)}};function M8(t){var e=t.fatal,n=0,r=0,s=0,i=128,o=191;this.handler=function(a,d){if(d===co&&s!==0)return s=0,Wa(e);if(d===co)return as;if(s===0){if(qn(d,0,127))return d;if(qn(d,194,223))s=1,n=d-192;else if(qn(d,224,239))d===224&&(i=160),d===237&&(o=159),s=2,n=d-224;else if(qn(d,240,244))d===240&&(i=144),d===244&&(o=143),s=3,n=d-240;else return Wa(e);return n=n<<6*s,null}if(!qn(d,i,o))return n=s=r=0,i=128,o=191,a.prepend(d),Wa(e);if(i=128,o=191,r+=1,n+=d-128<<6*(s-r),r!==s)return null;var h=n;return n=s=r=0,h}}function P8(t){t.fatal,this.handler=function(e,n){if(n===co)return as;if(qn(n,0,127))return n;var r,s;qn(n,128,2047)?(r=1,s=192):qn(n,2048,65535)?(r=2,s=224):qn(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 W8=Object.freeze(Object.defineProperty({__proto__:null,TextDecoder:uo,TextEncoder:fo},Symbol.toStringTag,{value:"Module"})),z8=Wc(W8);var H8=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]}),q8=an&&an.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Nn=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},$8=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)&&H8(e,t,n);return q8(e,t),e},Uh=an&&an.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Rt,"__esModule",{value:!0});var Lh=Rt.deserializeUnchecked=qh=Rt.deserialize=Hh=Rt.serialize=Rt.BinaryReader=Rt.BinaryWriter=Rt.BorshError=Rt.baseDecode=Rt.baseEncode=void 0;const nr=Uh(xd),Mh=Uh(Nh),K8=$8(z8),V8=typeof TextDecoder!="function"?K8.TextDecoder:TextDecoder,j8=new V8("utf-8",{fatal:!0});function G8(t){return typeof t=="string"&&(t=We.Buffer.from(t,"utf8")),Mh.default.encode(We.Buffer.from(t))}Rt.baseEncode=G8;function Y8(t){return We.Buffer.from(Mh.default.decode(t))}Rt.baseDecode=Y8;const za=1024;class zt 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(".")}}Rt.BorshError=zt;class Ph{constructor(){this.buf=We.Buffer.alloc(za),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=We.Buffer.concat([this.buf,We.Buffer.alloc(za)]))}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(We.Buffer.from(new nr.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(We.Buffer.from(new nr.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(We.Buffer.from(new nr.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(We.Buffer.from(new nr.default(e).toArray("le",64)))}writeBuffer(e){this.buf=We.Buffer.concat([We.Buffer.from(this.buf.subarray(0,this.length)),e,We.Buffer.alloc(za)]),this.length+=e.length}writeString(e){this.maybeResize();const n=We.Buffer.from(e,"utf8");this.writeU32(n.length),this.writeBuffer(n)}writeFixedArray(e){this.writeBuffer(We.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)}}Rt.BinaryWriter=Ph;function Un(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 zt("Reached the end of buffer when deserializing")}throw i}}}class en{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 zt(`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 j8.decode(n)}catch(r){throw new zt(`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}}Nn([Un],en.prototype,"readU8",null);Nn([Un],en.prototype,"readU16",null);Nn([Un],en.prototype,"readU32",null);Nn([Un],en.prototype,"readU64",null);Nn([Un],en.prototype,"readU128",null);Nn([Un],en.prototype,"readU256",null);Nn([Un],en.prototype,"readU512",null);Nn([Un],en.prototype,"readString",null);Nn([Un],en.prototype,"readFixedArray",null);Nn([Un],en.prototype,"readArray",null);Rt.BinaryReader=en;function Wh(t){return t.charAt(0).toUpperCase()+t.slice(1)}function ur(t,e,n,r,s){try{if(typeof r=="string")s[`write${Wh(r)}`](n);else if(r instanceof Array)if(typeof r[0]=="number"){if(n.length!==r[0])throw new zt(`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 zt(`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 zt(`FieldType ${r} unrecognized`)}else zh(t,n,s)}catch(i){throw i instanceof zt&&i.addToFieldPath(e),i}}function zh(t,e,n){if(typeof e.borshSerialize=="function"){e.borshSerialize(n);return}const r=t.get(e.constructor);if(!r)throw new zt(`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 zt(`Unexpected schema kind: ${r.kind} for ${e.constructor.name}`)}function X8(t,e,n=Ph){const r=new n;return zh(t,e,r),r.toArray()}var Hh=Rt.serialize=X8;function fr(t,e,n,r){try{if(typeof n=="string")return r[`read${Wh(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),d=fr(t,e,n.value,r);s.set(a,d)}return s}return kd(t,n,r)}catch(s){throw s instanceof zt&&s.addToFieldPath(e),s}}function kd(t,e,n){if(typeof e.borshDeserialize=="function")return e.borshDeserialize(n);const r=t.get(e);if(!r)throw new zt(`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 zt(`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 zt(`Unexpected schema kind: ${r.kind} for ${e.constructor.name}`)}function J8(t,e,n,r=en){const s=new r(n),i=kd(t,e,s);if(s.offset<n.length)throw new zt(`Unexpected ${n.length-s.offset} bytes after deserialized data`);return i}var qh=Rt.deserialize=J8;function Z8(t,e,n,r=en){const s=new r(n);return kd(t,e,s)}Lh=Rt.deserializeUnchecked=Z8;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=Tt=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 Od=ls();function ws(t){if(!(t instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}H.checkUint8Array=ws;function _e(t){return ws(t),Od.Buffer.from(t.buffer,t.byteOffset,t.length)}H.uint8ArrayToBuffer=_e;class ve{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=ve;function Nd(t,e){return e.property?t+"["+e.property+"]":t}H.nameWithProperty=Nd;function Q8(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 ve))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=Q8;class Vt extends ve{isCount(){throw new Error("ExternalLayout is abstract")}}H.ExternalLayout=Vt;class $h extends Vt{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){ws(e);const r=e.length-n;return Math.floor(r/this.elementSpan)}encode(e,n,r){return 0}}H.GreedyCount=$h;class Ud extends Vt{constructor(e,n=0,r){if(!(e instanceof ve))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=Ud;class on extends ve{constructor(e,n){if(super(e,n),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,n=0){return _e(e).readUIntLE(n,this.span)}encode(e,n,r=0){return _e(n).writeUIntLE(e,r,this.span),this.span}}H.UInt=on;class mn extends ve{constructor(e,n){if(super(e,n),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,n=0){return _e(e).readUIntBE(n,this.span)}encode(e,n,r=0){return _e(n).writeUIntBE(e,r,this.span),this.span}}H.UIntBE=mn;class Pr extends ve{constructor(e,n){if(super(e,n),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,n=0){return _e(e).readIntLE(n,this.span)}encode(e,n,r=0){return _e(n).writeIntLE(e,r,this.span),this.span}}H.Int=Pr;class Ss extends ve{constructor(e,n){if(super(e,n),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,n=0){return _e(e).readIntBE(n,this.span)}encode(e,n,r=0){return _e(n).writeIntBE(e,r,this.span),this.span}}H.IntBE=Ss;const Oc=Math.pow(2,32);function $o(t){const e=Math.floor(t/Oc),n=t-e*Oc;return{hi32:e,lo32:n}}function Ko(t,e){return t*Oc+e}class Kh extends ve{constructor(e){super(8,e)}decode(e,n=0){const r=_e(e),s=r.readUInt32LE(n),i=r.readUInt32LE(n+4);return Ko(i,s)}encode(e,n,r=0){const s=$o(e),i=_e(n);return i.writeUInt32LE(s.lo32,r),i.writeUInt32LE(s.hi32,r+4),8}}H.NearUInt64=Kh;class Vh extends ve{constructor(e){super(8,e)}decode(e,n=0){const r=_e(e),s=r.readUInt32BE(n),i=r.readUInt32BE(n+4);return Ko(s,i)}encode(e,n,r=0){const s=$o(e),i=_e(n);return i.writeUInt32BE(s.hi32,r),i.writeUInt32BE(s.lo32,r+4),8}}H.NearUInt64BE=Vh;class jh extends ve{constructor(e){super(8,e)}decode(e,n=0){const r=_e(e),s=r.readUInt32LE(n),i=r.readInt32LE(n+4);return Ko(i,s)}encode(e,n,r=0){const s=$o(e),i=_e(n);return i.writeUInt32LE(s.lo32,r),i.writeInt32LE(s.hi32,r+4),8}}H.NearInt64=jh;class Gh extends ve{constructor(e){super(8,e)}decode(e,n=0){const r=_e(e),s=r.readInt32BE(n),i=r.readUInt32BE(n+4);return Ko(s,i)}encode(e,n,r=0){const s=$o(e),i=_e(n);return i.writeInt32BE(s.hi32,r),i.writeUInt32BE(s.lo32,r+4),8}}H.NearInt64BE=Gh;class Yh extends ve{constructor(e){super(4,e)}decode(e,n=0){return _e(e).readFloatLE(n)}encode(e,n,r=0){return _e(n).writeFloatLE(e,r),4}}H.Float=Yh;class Xh extends ve{constructor(e){super(4,e)}decode(e,n=0){return _e(e).readFloatBE(n)}encode(e,n,r=0){return _e(n).writeFloatBE(e,r),4}}H.FloatBE=Xh;class Jh extends ve{constructor(e){super(8,e)}decode(e,n=0){return _e(e).readDoubleLE(n)}encode(e,n,r=0){return _e(n).writeDoubleLE(e,r),8}}H.Double=Jh;class Zh extends ve{constructor(e){super(8,e)}decode(e,n=0){return _e(e).readDoubleBE(n)}encode(e,n,r=0){return _e(n).writeDoubleBE(e,r),8}}H.DoubleBE=Zh;class Qh extends ve{constructor(e,n,r){if(!(e instanceof ve))throw new TypeError("elementLayout must be a Layout");if(!(n instanceof Vt&&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 Vt)&&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 Vt&&(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 Vt&&(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 Vt&&this.count.encode(e.length,n,r),i}}H.Sequence=Qh;class em extends ve{constructor(e,n,r){if(!(Array.isArray(e)&&e.reduce((i,o)=>i&&o instanceof ve,!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){ws(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 d=a.span;if(o=0<d?d:0,a.property!==void 0){const h=e[a.property];h!==void 0&&(o=a.encode(h,n,r),0>d&&(d=a.getSpan(n,r)))}i=r,r+=d}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=em;class Ld{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=Ld;class ho extends Ld{constructor(e,n){if(!(e instanceof Vt&&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=ho;class Md extends ve{constructor(e,n,r){let s;if(e instanceof on||e instanceof mn)s=new ho(new Ud(e));else if(e instanceof Vt&&e.isCount())s=new ho(e);else if(e instanceof Ld)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 ve))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 d=0;this.usesPrefixDiscriminator&&(d=s.layout.span),r=this.makeDestinationObject(),r[s.property]=i,r[a.property]=a.decode(e,n+d)}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 tm(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=Md;class tm extends ve{constructor(e,n,r,s){if(!(e instanceof Md))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 ve))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=tm;function Kr(t){return 0>t&&(t+=4294967296),t}class Pd extends ve{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=Kr(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 Wd(this,e,n);return this.fields.push(r),r}addBoolean(e){const n=new nm(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=Pd;class Wd{constructor(e,n,r){if(!(e instanceof Pd))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=Kr(this.valueMask<<this.start),this.property=r}decode(e,n){const r=this.container._packedGetValue();return Kr(r&this.wordMask)>>>this.start}encode(e){if(typeof e!="number"||!Number.isInteger(e)||e!==Kr(e&this.valueMask))throw new TypeError(Nd("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);const n=this.container._packedGetValue(),r=Kr(e<<this.start);this.container._packedSetValue(Kr(n&~this.wordMask)|r)}}H.BitField=Wd;let nm=class extends Wd{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=nm;let rm=class extends ve{constructor(e,n){if(!(e instanceof Vt&&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 Vt||(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)),_e(e).slice(n,n+r)}encode(e,n,r){let s=this.length;if(this.length instanceof Vt&&(s=e.length),!(e instanceof Uint8Array&&s===e.length))throw new TypeError(Nd("Blob.encode",this)+" requires (length "+s+") Uint8Array as src");if(r+s>n.length)throw new RangeError("encoding overruns Uint8Array");const i=_e(e);return _e(n).write(i.toString("hex"),r,s,"hex"),this.length instanceof Vt&&this.length.encode(s,n,r),s}};H.Blob=rm;class sm extends ve{constructor(e){super(-1,e)}getSpan(e,n=0){ws(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 _e(e).slice(n,n+r-1).toString("utf-8")}encode(e,n,r=0){typeof e!="string"&&(e=String(e));const s=Od.Buffer.from(e,"utf8"),i=s.length;if(r+i>n.length)throw new RangeError("encoding overruns Buffer");const o=_e(n);return s.copy(o,r),o[r+i]=0,i+1}}H.CString=sm;class im extends ve{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 ws(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 _e(e).slice(n,n+r).toString("utf-8")}encode(e,n,r=0){typeof e!="string"&&(e=String(e));const s=Od.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(_e(n),r),i}}H.UTF8=im;class om extends ve{constructor(e,n){super(0,n),this.value=e}decode(e,n){return this.value}encode(e,n,r){return 0}}H.Constant=om;exports.greedy=H.greedy=(t,e)=>new $h(t,e);var sr=H.offset=(t,e,n)=>new Ud(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 Tt=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 Vh(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 jh(t);H.s16be=t=>new Ss(2,t);H.s24be=t=>new Ss(3,t);H.s32be=t=>new Ss(4,t);H.s40be=t=>new Ss(5,t);H.s48be=t=>new Ss(6,t);H.ns64be=t=>new Gh(t);H.f32=t=>new Yh(t);H.f32be=t=>new Xh(t);H.f64=t=>new Jh(t);H.f64be=t=>new Zh(t);exports.struct=H.struct=(t,e,n)=>new em(t,e,n);H.bits=(t,e,n)=>new Pd(t,e,n);exports.seq=H.seq=(t,e,n)=>new Qh(t,e,n);H.union=(t,e,n)=>new Md(t,e,n);H.unionLayoutDiscriminator=(t,e)=>new ho(t,e);exports.blob=H.blob=(t,e)=>new rm(t,e);H.cstr=t=>new sm(t);H.utf8=(t,e)=>new im(t,e);H.constant=(t,e)=>new om(t,e);var eA=1,tA=2,nA=3,rA=4,sA=5,iA=6,oA=7,aA=8,cA=9,dA=10,lA=-32700,uA=-32603,fA=-32602,hA=-32601,mA=-32600,bA=-32016,pA=-32015,gA=-32014,yA=-32013,EA=-32012,AA=-32011,wA=-32010,SA=-32009,CA=-32008,BA=-32007,xA=-32006,_A=-32005,TA=-32004,DA=-32003,RA=-32002,vA=-32001,IA=28e5,FA=2800001,kA=2800002,OA=2800003,NA=2800004,UA=2800005,LA=2800006,MA=2800007,PA=2800008,WA=2800009,zA=2800010,HA=2800011,qA=323e4,$A=32300001,KA=3230002,VA=3230003,jA=3230004,GA=361e4,YA=3610001,XA=3610002,JA=3610003,ZA=3610004,QA=3610005,e3=3610006,t3=3610007,n3=3611e3,r3=3704e3,s3=3704001,i3=3704002,o3=3704003,a3=3704004,c3=4128e3,d3=4128001,l3=4128002,u3=4615e3,f3=4615001,h3=4615002,m3=4615003,b3=4615004,p3=4615005,g3=4615006,y3=4615007,E3=4615008,A3=4615009,w3=4615010,S3=4615011,C3=4615012,B3=4615013,x3=4615014,_3=4615015,T3=4615016,D3=4615017,R3=4615018,v3=4615019,I3=4615020,F3=4615021,k3=4615022,O3=4615023,N3=4615024,U3=4615025,L3=4615026,M3=4615027,P3=4615028,W3=4615029,z3=4615030,H3=4615031,q3=4615032,$3=4615033,K3=4615034,V3=4615035,j3=4615036,G3=4615037,Y3=4615038,X3=4615039,J3=4615040,Z3=4615041,Q3=4615042,e6=4615043,t6=4615044,n6=4615045,r6=4615046,s6=4615047,i6=4615048,o6=4615049,a6=4615050,c6=4615051,d6=4615052,l6=4615053,u6=4615054,f6=5508e3,h6=5508001,m6=5508002,b6=5508003,p6=5508004,g6=5508005,y6=5508006,E6=5508007,A6=5508008,w6=5508009,S6=5508010,C6=5508011,B6=5663e3,x6=5663001,_6=5663002,T6=5663003,D6=5663004,R6=5663005,v6=5663006,I6=5663007,F6=5663008,k6=5663009,O6=5663010,N6=5663011,U6=5663012,L6=5663013,M6=5663014,P6=5663015,W6=5663016,z6=5663017,H6=5663018,q6=5663019,$6=5663020,K6=705e4,V6=7050001,j6=7050002,G6=7050003,Y6=7050004,X6=7050005,J6=7050006,Z6=7050007,Q6=7050008,e4=7050009,t4=7050010,n4=7050011,r4=7050012,s4=7050013,i4=7050014,o4=7050015,a4=7050016,c4=7050017,d4=7050018,l4=7050019,u4=7050020,f4=7050021,h4=7050022,m4=7050023,b4=7050024,p4=7050025,g4=7050026,y4=7050027,E4=7050028,A4=7050029,w4=7050030,S4=7050031,C4=7050032,B4=7050033,x4=7050034,_4=7050035,T4=7050036,am=8078e3,cm=8078001,D4=8078002,R4=8078003,dm=8078004,lm=8078005,um=8078006,v4=8078007,I4=8078008,F4=8078009,k4=8078010,fm=8078011,O4=8078012,N4=8078013,U4=8078014,L4=8078015,M4=8078016,P4=8078017,W4=8078018,z4=8078019,H4=8078020,q4=8078021,$4=8078022,K4=81e5,V4=8100001,j4=8100002,G4=8100003,Y4=819e4,X4=8190001,J4=8190002,Z4=8190003,Q4=8190004,e5=99e5,t5=9900001,n5=9900002,r5=9900003,s5=9900004;function hm(t){return Array.isArray(t)?"%5B"+t.map(hm).join("%2C%20")+"%5D":typeof t=="bigint"?`${t}n`:encodeURIComponent(String(t!=null&&Object.getPrototypeOf(t)===null?{...t}:t))}function i5([t,e]){return`${t}=${hm(e)}`}function o5(t){const e=Object.entries(t).map(i5).join("&");return btoa(e)}var a5={[qA]:"Account not found at address: $address",[jA]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[VA]:"Expected decoded account at address: $address",[KA]:"Failed to decode account data at address: $address",[$A]:"Accounts not found at addresses: $addresses",[WA]:"Unable to find a viable program address bump seed.",[kA]:"$putativeAddress is not a base58-encoded address.",[IA]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[OA]:"The `CryptoKey` must be an `Ed25519` public key.",[HA]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[PA]:"Invalid seeds; point must fall off the Ed25519 curve.",[NA]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[LA]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[MA]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[UA]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[zA]:"Program address cannot end with PDA marker.",[FA]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[rA]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[eA]:"The network has progressed past the last block for which this transaction could have been committed.",[am]:"Codec [$codecDescription] cannot decode empty byte arrays.",[$4]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[H4]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[lm]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[um]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[dm]:"Encoder and decoder must either both be fixed-size or variable-size.",[I4]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[D4]:"Expected a fixed-size codec, got a variable-size one.",[N4]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[R4]:"Expected a variable-size codec, got a fixed-size one.",[z4]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[cm]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[W4]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[F4]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[k4]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[L4]:"Invalid literal union variant. Expected one of [$variants], got $value.",[v4]:"Expected [$codecDescription] to have $expected items, got $actual.",[O4]:"Invalid value $value for base $base with alphabet $alphabet.",[M4]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[fm]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[U4]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[q4]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[P4]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[n3]:"No random values implementation could be found.",[A3]:"instruction requires an uninitialized account",[O3]:"instruction tries to borrow reference for an account which is already borrowed",[N3]:"instruction left account with an outstanding borrowed reference",[F3]:"program other than the account's owner changed the size of the account data",[p3]:"account data too small for instruction",[k3]:"instruction expected an executable account",[r6]:"An account does not have enough lamports to be rent-exempt",[i6]:"Program arithmetic overflowed",[n6]:"Failed to serialize or deserialize account data: $encodedData",[u6]:"Builtin programs must consume compute units",[q3]:"Cross-program invocation call depth too deep",[Y3]:"Computational budget exceeded",[L3]:"custom program error: #$code",[D3]:"instruction contains duplicate accounts",[U3]:"instruction modifications of multiply-passed account differ",[z3]:"executable accounts must be rent exempt",[P3]:"instruction changed executable accounts data",[W3]:"instruction changed the balance of an executable account",[R3]:"instruction changed executable bit of an account",[x3]:"instruction modified data of an account it does not own",[B3]:"instruction spent from the balance of an account it does not own",[f3]:"generic instruction error",[a6]:"Provided owner is not allowed",[e6]:"Account is immutable",[t6]:"Incorrect authority provided",[y3]:"incorrect program id for instruction",[g3]:"insufficient funds for instruction",[b3]:"invalid account data for instruction",[s6]:"Invalid account owner",[h3]:"invalid program argument",[M3]:"program returned invalid error code",[m3]:"invalid instruction data",[G3]:"Failed to reallocate account data",[j3]:"Provided seeds do not result in a valid address",[c6]:"Accounts data allocations exceeded the maximum allowed per transaction",[d6]:"Max accounts exceeded",[l6]:"Max instruction trace length exceeded",[V3]:"Length of the seed is too long for address generation",[$3]:"An account required by the instruction is missing",[E3]:"missing required signature for instruction",[C3]:"instruction illegally modified the program id of an account",[I3]:"insufficient account keys for instruction",[X3]:"Cross-program invocation with unauthorized signer or writable account",[J3]:"Failed to create program execution environment",[Q3]:"Program failed to compile",[Z3]:"Program failed to complete",[T3]:"instruction modified data of a read-only account",[_3]:"instruction changed the balance of a read-only account",[K3]:"Cross-program invocation reentrancy not allowed for this instruction",[v3]:"instruction modified rent epoch of an account",[S3]:"sum of account balances before and after instruction do not match",[w3]:"instruction requires an initialized account",[u3]:"",[H3]:"Unsupported program id",[o6]:"Unsupported sysvar",[c3]:"The instruction does not have any accounts.",[d3]:"The instruction does not have any data.",[l3]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[sA]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[tA]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[n5]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[s5]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[t5]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[e5]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[r5]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[uA]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[fA]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[mA]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[hA]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[lA]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[EA]:"$__serverMessage",[vA]:"$__serverMessage",[TA]:"$__serverMessage",[gA]:"$__serverMessage",[wA]:"$__serverMessage",[SA]:"$__serverMessage",[bA]:"Minimum context slot has not been reached",[_A]:"Node is unhealthy; behind by $numSlotsBehind slots",[CA]:"No snapshot",[RA]:"Transaction simulation failed",[BA]:"$__serverMessage",[AA]:"Transaction history is not available from this node",[xA]:"$__serverMessage",[yA]:"Transaction signature length mismatch",[DA]:"Transaction signature verification failure",[pA]:"$__serverMessage",[r3]:"Key pair bytes must be of length 64, got $byteLength.",[s3]:"Expected private key bytes with length 32. Actual length: $actualLength.",[i3]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[a3]:"The provided private key does not match the provided public key.",[o3]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[iA]:"Lamports value must be in the range [0, 2e64-1]",[oA]:"`$value` cannot be parsed as a `BigInt`",[dA]:"$message",[aA]:"`$value` cannot be parsed as a `Number`",[nA]:"No nonce account could be found at address `$nonceAccountAddress`",[Y4]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[J4]:"WebSocket was closed before payload could be added to the send buffer",[Z4]:"WebSocket connection closed",[Q4]:"WebSocket failed to connect",[X4]:"Failed to obtain a subscription id from the server",[G4]:"Could not find an API plan for RPC method: `$method`",[K4]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[j4]:"HTTP error ($statusCode): $message",[V4]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[f6]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[h6]:"The provided value does not implement the `KeyPairSigner` interface",[b6]:"The provided value does not implement the `MessageModifyingSigner` interface",[p6]:"The provided value does not implement the `MessagePartialSigner` interface",[m6]:"The provided value does not implement any of the `MessageSigner` interfaces",[y6]:"The provided value does not implement the `TransactionModifyingSigner` interface",[E6]:"The provided value does not implement the `TransactionPartialSigner` interface",[A6]:"The provided value does not implement the `TransactionSendingSigner` interface",[g6]:"The provided value does not implement any of the `TransactionSigner` interfaces",[w6]:"More than one `TransactionSendingSigner` was identified.",[S6]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[C6]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[t3]:"Cannot export a non-extractable key.",[YA]:"No digest implementation could be found.",[GA]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[XA]:`This runtime does not support the generation of Ed25519 key pairs.
12
-
13
- Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
14
-
15
- For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,[JA]:"No signature verification implementation could be found.",[ZA]:"No key generation implementation could be found.",[QA]:"No signing implementation could be found.",[e3]:"No key export implementation could be found.",[cA]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[a4]:"Transaction processing left an account with an outstanding borrowed reference",[V6]:"Account in use",[j6]:"Account loaded twice",[G6]:"Attempt to debit an account but found no record of a prior credit.",[m4]:"Transaction loads an address table account that doesn't exist",[Z6]:"This transaction has already been processed",[Q6]:"Blockhash not found",[e4]:"Loader call chain is too deep",[o4]:"Transactions are currently disabled due to cluster maintenance",[w4]:"Transaction contains a duplicate instruction ($index) that is not allowed",[X6]:"Insufficient funds for fee",[S4]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[J6]:"This account may not be used to pay transaction fees",[n4]:"Transaction contains an invalid account reference",[p4]:"Transaction loads an address table account with invalid data",[g4]:"Transaction address table lookup uses an invalid index",[b4]:"Transaction loads an address table account with an invalid owner",[B4]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[s4]:"This program may not be used for executing instructions",[y4]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[l4]:"Transaction loads a writable account that cannot be written",[C4]:"Transaction exceeded max loaded accounts data size cap",[t4]:"Transaction requires a fee but has no signature present",[Y6]:"Attempt to load a program that does not exist",[_4]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[x4]:"ResanitizationNeeded",[i4]:"Transaction failed to sanitize accounts offsets correctly",[r4]:"Transaction did not pass signature verification",[h4]:"Transaction locked too many accounts",[T4]:"Sum of account balances before and after transaction do not match",[K6]:"The transaction failed with the error `$errorName`",[d4]:"Transaction version is unsupported",[f4]:"Transaction would exceed account data limit within the block",[A4]:"Transaction would exceed total account data limit",[u4]:"Transaction would exceed max account limit within the block",[c4]:"Transaction would exceed max Block Cost Limit",[E4]:"Transaction would exceed max Vote Cost Limit",[P6]:"Attempted to sign a transaction with an address that is not a signer for it",[O6]:"Transaction is missing an address at index: $index.",[W6]:"Transaction has no expected signers therefore it cannot be encoded",[$6]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[_6]:"Transaction does not have a blockhash lifetime",[T6]:"Transaction is not a durable nonce transaction",[R6]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[v6]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[F6]:"No fee payer set in CompiledTransaction",[I6]:"Could not find program address at index $index",[H6]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[q6]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[N6]:"Transaction is missing a fee payer.",[U6]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[M6]:"Transaction first instruction is not advance nonce account instruction.",[L6]:"Transaction with no instructions cannot be durable nonce transaction.",[B6]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[x6]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[z6]:"The transaction message expected the transaction to have $signerAddressesLength signatures, got $signaturesLength.",[k6]:"Transaction is missing signatures for addresses: $addresses.",[D6]:"Transaction version must be in the range [0, 127]. `$actualVersion` given"},Pn="i",wn="t";function c5(t,e={}){const n=a5[t];if(n.length===0)return"";let r;function s(o){if(r[wn]===2){const a=n.slice(r[Pn]+1,o);i.push(a in e?`${e[a]}`:`$${a}`)}else r[wn]===1&&i.push(n.slice(r[Pn],o))}const i=[];return n.split("").forEach((o,a)=>{if(a===0){r={[Pn]:0,[wn]:n[0]==="\\"?0:n[0]==="$"?2:1};return}let d;switch(r[wn]){case 0:d={[Pn]:a,[wn]:1};break;case 1:o==="\\"?d={[Pn]:a,[wn]:0}:o==="$"&&(d={[Pn]:a,[wn]:2});break;case 2:o==="\\"?d={[Pn]:a,[wn]:0}:o==="$"?d={[Pn]:a,[wn]:2}:o.match(/\w/)||(d={[Pn]:a,[wn]:1});break}d&&(r!==d&&s(a),r=d)}),s(),i.join("")}function d5(t,e={}){if(We.process.env.NODE_ENV!=="production")return c5(t,e);{let n=`Solana error #${t}; Decode this error by running \`npx @solana/errors decode -- ${t}`;return Object.keys(e).length&&(n+=` '${o5(e)}'`),`${n}\``}}var ts=class extends Error{constructor(...[e,n]){let r,s;if(n){const{cause:o,...a}=n;o&&(s={cause:o}),Object.keys(a).length>0&&(r=a)}const i=d5(e,r);super(i,s);ie(this,"cause",this.cause);ie(this,"context");this.context={__code:e,...r},this.name="SolanaError"}};function l5(t,e){return"fixedSize"in e?e.fixedSize:e.getSizeFromValue(t)}function u5(t){return Object.freeze({...t,encode:e=>{const n=new Uint8Array(l5(e,t));return t.write(e,n,0),n}})}function f5(t){return Object.freeze({...t,decode:(e,n=0)=>t.read(e,n)[0]})}function $r(t){return"fixedSize"in t&&typeof t.fixedSize=="number"}function h5(t,e){if($r(t)!==$r(e))throw new ts(dm);if($r(t)&&$r(e)&&t.fixedSize!==e.fixedSize)throw new ts(lm,{decoderFixedSize:e.fixedSize,encoderFixedSize:t.fixedSize});if(!$r(t)&&!$r(e)&&t.maxSize!==e.maxSize)throw new ts(um,{decoderMaxSize:e.maxSize,encoderMaxSize:t.maxSize});return{...e,...t,decode:e.decode,encode:t.encode,read:e.read,write:t.write}}function m5(t,e,n=0){if(e.length-n<=0)throw new ts(am,{codecDescription:t})}function b5(t,e,n,r=0){const s=n.length-r;if(s<e)throw new ts(cm,{bytesLength:s,codecDescription:t,expected:e})}function p5(t,e,n,r){if(r<e||r>n)throw new ts(fm,{codecDescription:t,max:n,min:e,value:r})}function mm(t){return(t==null?void 0:t.endian)!==1}function g5(t){return u5({fixedSize:t.size,write(e,n,r){t.range&&p5(t.name,t.range[0],t.range[1],e);const s=new ArrayBuffer(t.size);return t.set(new DataView(s),e,mm(t.config)),n.set(new Uint8Array(s),r),r+t.size}})}function y5(t){return f5({fixedSize:t.size,read(e,n=0){m5(t.name,e,n),b5(t.name,t.size,e,n);const r=new DataView(E5(e,n,t.size));return[t.get(r,mm(t.config)),n+t.size]}})}function E5(t,e,n){const r=t.byteOffset+(e??0),s=n??t.byteLength;return t.buffer.slice(r,r+s)}var bm=(t={})=>g5({config:t,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(e,n,r)=>e.setBigUint64(0,BigInt(n),r),size:8}),A5=(t={})=>y5({config:t,get:(e,n)=>e.getBigUint64(0,n),name:"u64",size:8}),w5=(t={})=>h5(bm(t),A5(t));class S5 extends TypeError{constructor(e,n){let r;const{message:s,explanation:i,...o}=e,{path:a}=e,d=a.length===0?s:`At path: ${a.join(".")} -- ${s}`;super(i??d),i!=null&&(this.cause=d),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...n()])}}function C5(t){return hi(t)&&typeof t[Symbol.iterator]=="function"}function hi(t){return typeof t=="object"&&t!=null}function mo(t){return hi(t)&&!Array.isArray(t)}function gn(t){return typeof t=="symbol"?t.toString():typeof t=="string"?JSON.stringify(t):`${t}`}function B5(t){const{done:e,value:n}=t.next();return e?void 0:n}function x5(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:d=`Expected a value of type \`${o}\`${a?` with refinement \`${a}\``:""}, but received: \`${gn(r)}\``}=t;return{value:r,type:o,refinement:a,key:s[s.length-1],path:s,branch:i,...t,message:d}}function*Ru(t,e,n,r){C5(t)||(t=[t]);for(const s of t){const i=x5(s,e,n,r);i&&(yield i)}}function*zd(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 d="valid";for(const h of e.validator(t,a))h.explanation=n.message,d="not_valid",yield[h,void 0];for(let[h,u,p]of e.entries(t,a)){const B=zd(u,p,{path:h===void 0?r:[...r,h],branch:h===void 0?s:[...s,u],coerce:i,mask:o,message:n.message});for(const g of B)g[0]?(d=g[0].refinement!=null?"not_refined":"not_valid",yield[g[0],void 0]):i&&(u=g[1],h===void 0?t=u:t instanceof Map?t.set(h,u):t instanceof Set?t.add(u):hi(t)&&(u!==void 0||h in t)&&(t[h]=u))}if(d!=="not_valid")for(const h of e.refiner(t,a))h.explanation=n.message,d="not_refined",yield[h,void 0];d==="valid"&&(yield[void 0,t])}let Ln=class{constructor(e){const{type:n,schema:r,validator:s,refiner:i,coercer:o=d=>d,entries:a=function*(){}}=e;this.type=n,this.schema=r,this.entries=a,this.coercer=o,s?this.validator=(d,h)=>{const u=s(d,h);return Ru(u,h,this,d)}:this.validator=()=>[],i?this.refiner=(d,h)=>{const u=i(d,h);return Ru(u,h,this,d)}:this.refiner=()=>[]}assert(e,n){return pm(e,this,n)}create(e,n){return te(e,this,n)}is(e){return gm(e,this)}mask(e,n){return _5(e,this,n)}validate(e,n={}){return mi(e,this,n)}};function pm(t,e,n){const r=mi(t,e,{message:n});if(r[0])throw r[0]}function te(t,e,n){const r=mi(t,e,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function _5(t,e,n){const r=mi(t,e,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}function gm(t,e){return!mi(t,e)[0]}function mi(t,e,n={}){const r=zd(t,e,n),s=B5(r);return s[0]?[new S5(s[0],function*(){for(const o of r)o[0]&&(yield o[0])}),void 0]:[void 0,s[1]]}function Wr(t,e){return new Ln({type:t,schema:null,validator:e})}function T5(){return Wr("any",()=>!0)}function ne(t){return new Ln({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: ${gn(e)}`}})}function On(){return Wr("boolean",t=>typeof t=="boolean")}function Hd(t){return Wr("instance",e=>e instanceof t||`Expected a \`${t.name}\` instance, but received: ${gn(e)}`)}function He(t){const e=gn(t),n=typeof t;return new Ln({type:"literal",schema:n==="string"||n==="number"||n==="boolean"?t:null,validator(r){return r===t||`Expected the literal \`${e}\`, but received: ${gn(r)}`}})}function D5(){return Wr("never",()=>!1)}function re(t){return new Ln({...t,validator:(e,n)=>e===null||t.validator(e,n),refiner:(e,n)=>e===null||t.refiner(e,n)})}function z(){return Wr("number",t=>typeof t=="number"&&!isNaN(t)||`Expected a number, but received: ${gn(t)}`)}function ae(t){return new Ln({...t,validator:(e,n)=>e===void 0||t.validator(e,n),refiner:(e,n)=>e===void 0||t.refiner(e,n)})}function ym(t,e){return new Ln({type:"record",schema:null,*entries(n){if(hi(n))for(const r in n){const s=n[r];yield[r,r,t],yield[r,s,e]}},validator(n){return mo(n)||`Expected an object, but received: ${gn(n)}`},coercer(n){return mo(n)?{...n}:n}})}function Q(){return Wr("string",t=>typeof t=="string"||`Expected a string, but received: ${gn(t)}`)}function qd(t){const e=D5();return new Ln({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: ${gn(n)}`},coercer(n){return Array.isArray(n)?n.slice():n}})}function X(t){const e=Object.keys(t);return new Ln({type:"type",schema:t,*entries(n){if(hi(n))for(const r of e)yield[r,n[r],t[r]]},validator(n){return mo(n)||`Expected an object, but received: ${gn(n)}`},coercer(n){return mo(n)?{...n}:n}})}function qt(t){const e=t.map(n=>n.type).join(" | ");return new Ln({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]=zd(n,i,r),[a]=o;if(a[0])for(const[d]of o)d&&s.push(d);else return[]}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${gn(n)}`,...s]}})}function Cs(){return Wr("unknown",()=>!0)}function bi(t,e,n){return new Ln({...t,coercer:(r,s)=>gm(r,e)?t.coercer(n(r,s),s):t.coercer(r,s)})}var Ti,R5=new Uint8Array(16);function Em(){if(!Ti&&(Ti=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Ti))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ti(R5)}const v5=/^(?:[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 Vo(t){return typeof t=="string"&&v5.test(t)}var _t=[];for(var Ha=0;Ha<256;++Ha)_t.push((Ha+256).toString(16).substr(1));function jo(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(_t[t[e+0]]+_t[t[e+1]]+_t[t[e+2]]+_t[t[e+3]]+"-"+_t[t[e+4]]+_t[t[e+5]]+"-"+_t[t[e+6]]+_t[t[e+7]]+"-"+_t[t[e+8]]+_t[t[e+9]]+"-"+_t[t[e+10]]+_t[t[e+11]]+_t[t[e+12]]+_t[t[e+13]]+_t[t[e+14]]+_t[t[e+15]]).toLowerCase();if(!Vo(n))throw TypeError("Stringified UUID is invalid");return n}var vu,qa,$a=0,Ka=0;function I5(t,e,n){var r=e&&n||0,s=e||new Array(16);t=t||{};var i=t.node||vu,o=t.clockseq!==void 0?t.clockseq:qa;if(i==null||o==null){var a=t.random||(t.rng||Em)();i==null&&(i=vu=[a[0]|1,a[1],a[2],a[3],a[4],a[5]]),o==null&&(o=qa=(a[6]<<8|a[7])&16383)}var d=t.msecs!==void 0?t.msecs:Date.now(),h=t.nsecs!==void 0?t.nsecs:Ka+1,u=d-$a+(h-Ka)/1e4;if(u<0&&t.clockseq===void 0&&(o=o+1&16383),(u<0||d>$a)&&t.nsecs===void 0&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");$a=d,Ka=h,qa=o,d+=122192928e5;var p=((d&268435455)*1e4+h)%4294967296;s[r++]=p>>>24&255,s[r++]=p>>>16&255,s[r++]=p>>>8&255,s[r++]=p&255;var B=d/4294967296*1e4&268435455;s[r++]=B>>>8&255,s[r++]=B&255,s[r++]=B>>>24&15|16,s[r++]=B>>>16&255,s[r++]=o>>>8|128,s[r++]=o&255;for(var g=0;g<6;++g)s[r+g]=i[g];return e||jo(s)}function Am(t){if(!Vo(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 F5(t){t=unescape(encodeURIComponent(t));for(var e=[],n=0;n<t.length;++n)e.push(t.charCodeAt(n));return e}var k5="6ba7b810-9dad-11d1-80b4-00c04fd430c8",O5="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function wm(t,e,n){function r(s,i,o,a){if(typeof s=="string"&&(s=F5(s)),typeof i=="string"&&(i=Am(i)),i.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var d=new Uint8Array(16+s.length);if(d.set(i),d.set(s,i.length),d=n(d),d[6]=d[6]&15|e,d[8]=d[8]&63|128,o){a=a||0;for(var h=0;h<16;++h)o[a+h]=d[h];return o}return jo(d)}try{r.name=t}catch{}return r.DNS=k5,r.URL=O5,r}function N5(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 U5(L5(M5(t),t.length*8))}function U5(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 Sm(t){return(t+64>>>9<<4)+14+1}function L5(t,e){t[e>>5]|=128<<e%32,t[Sm(e)-1]=e;for(var n=1732584193,r=-271733879,s=-1732584194,i=271733878,o=0;o<t.length;o+=16){var a=n,d=r,h=s,u=i;n=kt(n,r,s,i,t[o],7,-680876936),i=kt(i,n,r,s,t[o+1],12,-389564586),s=kt(s,i,n,r,t[o+2],17,606105819),r=kt(r,s,i,n,t[o+3],22,-1044525330),n=kt(n,r,s,i,t[o+4],7,-176418897),i=kt(i,n,r,s,t[o+5],12,1200080426),s=kt(s,i,n,r,t[o+6],17,-1473231341),r=kt(r,s,i,n,t[o+7],22,-45705983),n=kt(n,r,s,i,t[o+8],7,1770035416),i=kt(i,n,r,s,t[o+9],12,-1958414417),s=kt(s,i,n,r,t[o+10],17,-42063),r=kt(r,s,i,n,t[o+11],22,-1990404162),n=kt(n,r,s,i,t[o+12],7,1804603682),i=kt(i,n,r,s,t[o+13],12,-40341101),s=kt(s,i,n,r,t[o+14],17,-1502002290),r=kt(r,s,i,n,t[o+15],22,1236535329),n=Ot(n,r,s,i,t[o+1],5,-165796510),i=Ot(i,n,r,s,t[o+6],9,-1069501632),s=Ot(s,i,n,r,t[o+11],14,643717713),r=Ot(r,s,i,n,t[o],20,-373897302),n=Ot(n,r,s,i,t[o+5],5,-701558691),i=Ot(i,n,r,s,t[o+10],9,38016083),s=Ot(s,i,n,r,t[o+15],14,-660478335),r=Ot(r,s,i,n,t[o+4],20,-405537848),n=Ot(n,r,s,i,t[o+9],5,568446438),i=Ot(i,n,r,s,t[o+14],9,-1019803690),s=Ot(s,i,n,r,t[o+3],14,-187363961),r=Ot(r,s,i,n,t[o+8],20,1163531501),n=Ot(n,r,s,i,t[o+13],5,-1444681467),i=Ot(i,n,r,s,t[o+2],9,-51403784),s=Ot(s,i,n,r,t[o+7],14,1735328473),r=Ot(r,s,i,n,t[o+12],20,-1926607734),n=Nt(n,r,s,i,t[o+5],4,-378558),i=Nt(i,n,r,s,t[o+8],11,-2022574463),s=Nt(s,i,n,r,t[o+11],16,1839030562),r=Nt(r,s,i,n,t[o+14],23,-35309556),n=Nt(n,r,s,i,t[o+1],4,-1530992060),i=Nt(i,n,r,s,t[o+4],11,1272893353),s=Nt(s,i,n,r,t[o+7],16,-155497632),r=Nt(r,s,i,n,t[o+10],23,-1094730640),n=Nt(n,r,s,i,t[o+13],4,681279174),i=Nt(i,n,r,s,t[o],11,-358537222),s=Nt(s,i,n,r,t[o+3],16,-722521979),r=Nt(r,s,i,n,t[o+6],23,76029189),n=Nt(n,r,s,i,t[o+9],4,-640364487),i=Nt(i,n,r,s,t[o+12],11,-421815835),s=Nt(s,i,n,r,t[o+15],16,530742520),r=Nt(r,s,i,n,t[o+2],23,-995338651),n=Ut(n,r,s,i,t[o],6,-198630844),i=Ut(i,n,r,s,t[o+7],10,1126891415),s=Ut(s,i,n,r,t[o+14],15,-1416354905),r=Ut(r,s,i,n,t[o+5],21,-57434055),n=Ut(n,r,s,i,t[o+12],6,1700485571),i=Ut(i,n,r,s,t[o+3],10,-1894986606),s=Ut(s,i,n,r,t[o+10],15,-1051523),r=Ut(r,s,i,n,t[o+1],21,-2054922799),n=Ut(n,r,s,i,t[o+8],6,1873313359),i=Ut(i,n,r,s,t[o+15],10,-30611744),s=Ut(s,i,n,r,t[o+6],15,-1560198380),r=Ut(r,s,i,n,t[o+13],21,1309151649),n=Ut(n,r,s,i,t[o+4],6,-145523070),i=Ut(i,n,r,s,t[o+11],10,-1120210379),s=Ut(s,i,n,r,t[o+2],15,718787259),r=Ut(r,s,i,n,t[o+9],21,-343485551),n=rr(n,a),r=rr(r,d),s=rr(s,h),i=rr(i,u)}return[n,r,s,i]}function M5(t){if(t.length===0)return[];for(var e=t.length*8,n=new Uint32Array(Sm(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 P5(t,e){return t<<e|t>>>32-e}function Go(t,e,n,r,s,i){return rr(P5(rr(rr(e,t),rr(r,i)),s),n)}function kt(t,e,n,r,s,i,o){return Go(e&n|~e&r,t,e,s,i,o)}function Ot(t,e,n,r,s,i,o){return Go(e&r|n&~r,t,e,s,i,o)}function Nt(t,e,n,r,s,i,o){return Go(e^n^r,t,e,s,i,o)}function Ut(t,e,n,r,s,i,o){return Go(n^(e|~r),t,e,s,i,o)}var W5=wm("v3",48,N5);function z5(t,e,n){t=t||{};var r=t.random||(t.rng||Em)();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 jo(r)}function H5(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 Va(t,e){return t<<e|t>>>32-e}function q5(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),d=0;d<o;++d){for(var h=new Uint32Array(16),u=0;u<16;++u)h[u]=t[d*64+u*4]<<24|t[d*64+u*4+1]<<16|t[d*64+u*4+2]<<8|t[d*64+u*4+3];a[d]=h}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 B=new Uint32Array(80),g=0;g<16;++g)B[g]=a[p][g];for(var _=16;_<80;++_)B[_]=Va(B[_-3]^B[_-8]^B[_-14]^B[_-16],1);for(var v=n[0],A=n[1],w=n[2],F=n[3],x=n[4],N=0;N<80;++N){var k=Math.floor(N/20),q=Va(v,5)+H5(k,A,w,F)+x+e[k]+B[N]>>>0;x=F,F=w,w=Va(A,30)>>>0,A=v,v=q}n[0]=n[0]+v>>>0,n[1]=n[1]+A>>>0,n[2]=n[2]+w>>>0,n[3]=n[3]+F>>>0,n[4]=n[4]+x>>>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 $5=wm("v5",80,q5);const K5="00000000-0000-0000-0000-000000000000";function V5(t){if(!Vo(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)}const j5=Object.freeze(Object.defineProperty({__proto__:null,NIL:K5,parse:Am,stringify:jo,v1:I5,v3:W5,v4:z5,v5:$5,validate:Vo,version:V5},Symbol.toStringTag,{value:"Module"})),Cm=Wc(j5),G5=Cm.v4,Y5=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 G5()};i.id=o(i,r)}else s===2&&n===null?r.notificationIdNull&&(i.id=null):i.id=n;return i};var X5=Y5;const J5=Cm.v4,Z5=X5,Zs=function(t,e){if(!(this instanceof Zs))return new Zs(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 J5()},version:typeof e.version<"u"?e.version:2,notificationIdNull:typeof e.notificationIdNull=="boolean"?e.notificationIdNull:!1},this.callServer=t};var Q5=Zs;Zs.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 h=typeof r=="function";try{i=Z5(t,e,n,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(u){if(h)return r(u);throw u}if(!h)return i}let d;try{d=JSON.stringify(i,this.options.replacer)}catch(h){return r(h)}return this.callServer(d,function(h,u){s._parseResponse(h,u,r)}),i};Zs.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 Bm=ni(Q5);var xm={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(d,h,u){this.fn=d,this.context=h,this.once=u||!1}function i(d,h,u,p,B){if(typeof u!="function")throw new TypeError("The listener must be a function");var g=new s(u,p||d,B),_=n?n+h:h;return d._events[_]?d._events[_].fn?d._events[_]=[d._events[_],g]:d._events[_].push(g):(d._events[_]=g,d._eventsCount++),d}function o(d,h){--d._eventsCount===0?d._events=new r:delete d._events[h]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var h=[],u,p;if(this._eventsCount===0)return h;for(p in u=this._events)e.call(u,p)&&h.push(n?p.slice(1):p);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(u)):h},a.prototype.listeners=function(h){var u=n?n+h:h,p=this._events[u];if(!p)return[];if(p.fn)return[p.fn];for(var B=0,g=p.length,_=new Array(g);B<g;B++)_[B]=p[B].fn;return _},a.prototype.listenerCount=function(h){var u=n?n+h:h,p=this._events[u];return p?p.fn?1:p.length:0},a.prototype.emit=function(h,u,p,B,g,_){var v=n?n+h:h;if(!this._events[v])return!1;var A=this._events[v],w=arguments.length,F,x;if(A.fn){switch(A.once&&this.removeListener(h,A.fn,void 0,!0),w){case 1:return A.fn.call(A.context),!0;case 2:return A.fn.call(A.context,u),!0;case 3:return A.fn.call(A.context,u,p),!0;case 4:return A.fn.call(A.context,u,p,B),!0;case 5:return A.fn.call(A.context,u,p,B,g),!0;case 6:return A.fn.call(A.context,u,p,B,g,_),!0}for(x=1,F=new Array(w-1);x<w;x++)F[x-1]=arguments[x];A.fn.apply(A.context,F)}else{var N=A.length,k;for(x=0;x<N;x++)switch(A[x].once&&this.removeListener(h,A[x].fn,void 0,!0),w){case 1:A[x].fn.call(A[x].context);break;case 2:A[x].fn.call(A[x].context,u);break;case 3:A[x].fn.call(A[x].context,u,p);break;case 4:A[x].fn.call(A[x].context,u,p,B);break;default:if(!F)for(k=1,F=new Array(w-1);k<w;k++)F[k-1]=arguments[k];A[x].fn.apply(A[x].context,F)}}return!0},a.prototype.on=function(h,u,p){return i(this,h,u,p,!1)},a.prototype.once=function(h,u,p){return i(this,h,u,p,!0)},a.prototype.removeListener=function(h,u,p,B){var g=n?n+h:h;if(!this._events[g])return this;if(!u)return o(this,g),this;var _=this._events[g];if(_.fn)_.fn===u&&(!B||_.once)&&(!p||_.context===p)&&o(this,g);else{for(var v=0,A=[],w=_.length;v<w;v++)(_[v].fn!==u||B&&!_[v].once||p&&_[v].context!==p)&&A.push(_[v]);A.length?this._events[g]=A.length===1?A[0]:A:o(this,g)}return this},a.prototype.removeAllListeners=function(h){var u;return h?(u=n?n+h:h,this._events[u]&&o(this,u)):(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})(xm);var ew=xm.exports;const $d=ni(ew);var tw=class extends $d{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 nw(t,e){return new tw(t,e)}var rw=class{encode(t){return JSON.stringify(t)}decode(t){return JSON.parse(t)}},sw=class extends $d{constructor(e,n="ws://localhost:8080",{autoconnect:r=!0,reconnect:s=!0,reconnect_interval:i=1e3,max_reconnects:o=5,...a}={},d,h){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=d||(()=>typeof this.rpc_id=="number"?++this.rpc_id:Number(this.rpc_id)+1),h?this.dataPack=h:this.dataPack=new rw,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),d={jsonrpc:"2.0",method:e,params:n||void 0,id:a};this.socket.send(this.dataPack.encode(d),s,h=>{if(h)return o(h);this.queue[a]={promise:[i,o]},r&&(this.queue[a].timeout=setTimeout(()=>{delete this.queue[a],o(new Error("reply timeout"))},r))})})}async login(e){const 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=ce.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 iw=Ur.utils.randomPrivateKey,Iu=()=>{const t=Ur.utils.randomPrivateKey(),e=bo(t),n=new Uint8Array(64);return n.set(t),n.set(e,32),{publicKey:e,secretKey:n}},bo=Ur.getPublicKey;function Fu(t){try{return Ur.ExtendedPoint.fromHex(t),!0}catch{return!1}}const Kd=(t,e)=>Ur.sign(t,e.slice(0,32)),ow=Ur.verify,Ee=t=>ce.Buffer.isBuffer(t)?t:t instanceof Uint8Array?ce.Buffer.from(t.buffer,t.byteOffset,t.byteLength):ce.Buffer.from(t);class Vd{constructor(e){Object.assign(this,e)}encode(){return ce.Buffer.from(Hh(Ws,this))}static decode(e){return qh(Ws,this,e)}static decodeUnchecked(e){return Lh(Ws,this,e)}}class aw extends Vd{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 _m;const Tm=32,In=32;function cw(t){return t._bn!==void 0}let ku=1;class Z extends Vd{constructor(e){if(super({}),this._bn=void 0,cw(e))this._bn=e._bn;else{if(typeof e=="string"){const n=Bt.decode(e);if(n.length!=In)throw new Error("Invalid public key input");this._bn=new vc(n)}else this._bn=new vc(e);if(this._bn.byteLength()>In)throw new Error("Invalid public key input")}}static unique(){const e=new Z(ku);return ku+=1,new Z(e.toBuffer())}equals(e){return this._bn.eq(e._bn)}toBase58(){return Bt.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(ce.Buffer);if(e.length===In)return e;const n=ce.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=ce.Buffer.concat([e.toBuffer(),ce.Buffer.from(n),r.toBuffer()]),i=Qi(s);return new Z(i)}static createProgramAddressSync(e,n){let r=ce.Buffer.alloc(0);e.forEach(function(i){if(i.length>Tm)throw new TypeError("Max seed length exceeded");r=ce.Buffer.concat([r,Ee(i)])}),r=ce.Buffer.concat([r,n.toBuffer(),ce.Buffer.from("ProgramDerivedAddress")]);const s=Qi(r);if(Fu(s))throw new Error("Invalid seeds, address must fall off the curve");return new Z(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(ce.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 Z(e);return Fu(n.toBytes())}}_m=Z;Z.default=new _m("11111111111111111111111111111111");Ws.set(Z,{kind:"struct",fields:[["_bn","u256"]]});class dw{constructor(e){if(this._publicKey=void 0,this._secretKey=void 0,e){const n=Ee(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=Ee(iw()),this._publicKey=Ee(bo(this._secretKey))}get publicKey(){return new Z(this._publicKey)}get secretKey(){return ce.Buffer.concat([this._secretKey,this._publicKey],64)}}const lw=new Z("BPFLoader1111111111111111111111111111111111"),ir=1232,Yo=127,Qs=64;class Xo extends Error{constructor(e){super(`Signature ${e} has expired: block height exceeded.`),this.signature=void 0,this.signature=e}}Object.defineProperty(Xo.prototype,"name",{value:"TransactionExpiredBlockheightExceededError"});class jd 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(jd.prototype,"name",{value:"TransactionExpiredTimeoutError"});class Xr extends Error{constructor(e){super(`Signature ${e} has expired: the nonce is no longer valid.`),this.signature=void 0,this.signature=e}}Object.defineProperty(Xr.prototype,"name",{value:"TransactionExpiredNonceInvalidError"});class ei{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 Ae=(t="publicKey")=>exports.blob(32,t),uw=(t="signature")=>exports.blob(64,t),wr=(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 d={chars:ce.Buffer.from(i,"utf8")};return r(d,o,a)},s.alloc=i=>exports.u32().span+exports.u32().span+ce.Buffer.from(i,"utf8").length,s},fw=(t="authorized")=>exports.struct([Ae("staker"),Ae("withdrawer")],t),hw=(t="lockup")=>exports.struct([exports.ns64("unixTimestamp"),exports.ns64("epoch"),Ae("custodian")],t),mw=(t="voteInit")=>exports.struct([Ae("nodePubkey"),Ae("authorizedVoter"),Ae("authorizedWithdrawer"),exports.u8("commission")],t),bw=(t="voteAuthorizeWithSeedArgs")=>exports.struct([exports.u32("voteAuthorizationType"),Ae("currentAuthorityDerivedKeyOwnerPubkey"),wr("currentAuthorityDerivedKeySeed"),Ae("newAuthorized")],t);function Dm(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 Dm({layout:s},e[s.property]);return 0};let r=0;return t.layout.fields.forEach(s=>{r+=n(s)}),r}function $t(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 Qt(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 xe(t,e){if(!t)throw new Error(e||"Assertion failed")}class Jo{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 d=r.get(a);return d===void 0&&(d={isSigner:!1,isWritable:!1,isInvoked:!1},r.set(a,d)),d},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 d=s(a.pubkey);d.isSigner||(d.isSigner=a.isSigner),d.isWritable||(d.isWritable=a.isWritable)}}return new Jo(n,r)}getMessageComponents(){const e=[...this.keyMetaMap.entries()];xe(e.length<=256,"Max static account keys length exceeded");const n=e.filter(([,d])=>d.isSigner&&d.isWritable),r=e.filter(([,d])=>d.isSigner&&!d.isWritable),s=e.filter(([,d])=>!d.isSigner&&d.isWritable),i=e.filter(([,d])=>!d.isSigner&&!d.isWritable),o={numRequiredSignatures:n.length+r.length,numReadonlySignedAccounts:r.length,numReadonlyUnsignedAccounts:i.length};{xe(n.length>0,"Expected at least one writable signer key");const[d]=n[0];xe(d===this.payer.toBase58(),"Expected first writable signer key to be the fee payer")}const a=[...n.map(([d])=>new Z(d)),...r.map(([d])=>new Z(d)),...s.map(([d])=>new Z(d)),...i.map(([d])=>new Z(d))];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 Z(i),d=e.findIndex(h=>h.equals(a));d>=0&&(xe(d<256,"Max lookup table index exceeded"),r.push(d),s.push(a),this.keyMetaMap.delete(i))}return[r,s]}}const Rm="Reached end of buffer unexpectedly";function Tn(t){if(t.length===0)throw new Error(Rm);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(Rm);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 Z(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:Bt.decode(e.data)}))}get addressTableLookups(){return[]}getAccountKeys(){return new ei(this.staticAccountKeys)}static compile(e){const n=Jo.compile(e.instructions,e.payerKey),[r,s]=n.getMessageComponents(),o=new ei(s).compileInstructions(e.instructions).map(a=>({programIdIndex:a.programIdIndex,accounts:a.accountKeyIndexes,data:Bt.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=[];Qt(n,e);const r=this.instructions.map(p=>{const{accounts:B,programIdIndex:g}=p,_=Array.from(Bt.decode(p.data));let v=[];Qt(v,B.length);let A=[];return Qt(A,_.length),{programIdIndex:g,keyIndicesCount:ce.Buffer.from(v),keyIndices:B,dataLength:ce.Buffer.from(A),data:_}});let s=[];Qt(s,r.length);let i=ce.Buffer.alloc(ir);ce.Buffer.from(s).copy(i);let o=s.length;r.forEach(p=>{const g=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+=g}),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(Ae("key"),e,"keys"),Ae("recentBlockhash")]),d={numRequiredSignatures:ce.Buffer.from([this.header.numRequiredSignatures]),numReadonlySignedAccounts:ce.Buffer.from([this.header.numReadonlySignedAccounts]),numReadonlyUnsignedAccounts:ce.Buffer.from([this.header.numReadonlyUnsignedAccounts]),keyCount:ce.Buffer.from(n),keys:this.accountKeys.map(p=>Ee(p.toBytes())),recentBlockhash:Bt.decode(this.recentBlockhash)};let h=ce.Buffer.alloc(2048);const u=a.encode(d,h);return i.copy(h,u),h.slice(0,u+i.length)}static from(e){let n=[...e];const r=Tn(n);if(r!==(r&Yo))throw new Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");const s=Tn(n),i=Tn(n),o=$t(n);let a=[];for(let B=0;B<o;B++){const g=Kt(n,0,In);a.push(new Z(ce.Buffer.from(g)))}const d=Kt(n,0,In),h=$t(n);let u=[];for(let B=0;B<h;B++){const g=Tn(n),_=$t(n),v=Kt(n,0,_),A=$t(n),w=Kt(n,0,A),F=Bt.encode(ce.Buffer.from(w));u.push({programIdIndex:g,accounts:v,data:F})}const p={header:{numRequiredSignatures:r,numReadonlySignedAccounts:s,numReadonlyUnsignedAccounts:i},recentBlockhash:Bt.encode(ce.Buffer.from(d)),accountKeys:a,instructions:u};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 ei(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=Jo.compile(e.instructions,e.payerKey),r=new Array,s={writable:new Array,readonly:new Array},i=e.addressLookupTableAccounts||[];for(const u of i){const p=n.extractTableLookup(u);if(p!==void 0){const[B,{writable:g,readonly:_}]=p;r.push(B),s.writable.push(...g),s.readonly.push(..._)}}const[o,a]=n.getMessageComponents(),h=new ei(a,s).compileInstructions(e.instructions);return new ar({header:o,staticAccountKeys:a,recentBlockhash:e.recentBlockhash,compiledInstructions:h,addressTableLookups:r})}serialize(){const e=Array();Qt(e,this.staticAccountKeys.length);const n=this.serializeInstructions(),r=Array();Qt(r,this.compiledInstructions.length);const s=this.serializeAddressTableLookups(),i=Array();Qt(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(Ae(),this.staticAccountKeys.length,"staticAccountKeys"),Ae("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),h=o.encode({prefix:128,header:this.header,staticAccountKeysLength:new Uint8Array(e),staticAccountKeys:this.staticAccountKeys.map(u=>u.toBytes()),recentBlockhash:Bt.decode(this.recentBlockhash),instructionsLength:new Uint8Array(r),serializedInstructions:n,addressTableLookupsLength:new Uint8Array(i),serializedAddressTableLookups:s},a);return a.slice(0,h)}serializeInstructions(){let e=0;const n=new Uint8Array(ir);for(const r of this.compiledInstructions){const s=Array();Qt(s,r.accountKeyIndexes.length);const i=Array();Qt(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();Qt(s,r.writableIndexes.length);const i=Array();Qt(i,r.readonlyIndexes.length);const o=exports.struct([Ae("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=Tn(n),s=r&Yo;xe(r!==s,"Expected versioned message but received legacy message");const i=s;xe(i===0,`Expected versioned message with version 0 but found version ${i}`);const o={numRequiredSignatures:Tn(n),numReadonlySignedAccounts:Tn(n),numReadonlyUnsignedAccounts:Tn(n)},a=[],d=$t(n);for(let _=0;_<d;_++)a.push(new Z(Kt(n,0,In)));const h=Bt.encode(Kt(n,0,In)),u=$t(n),p=[];for(let _=0;_<u;_++){const v=Tn(n),A=$t(n),w=Kt(n,0,A),F=$t(n),x=new Uint8Array(Kt(n,0,F));p.push({programIdIndex:v,accountKeyIndexes:w,data:x})}const B=$t(n),g=[];for(let _=0;_<B;_++){const v=new Z(Kt(n,0,In)),A=$t(n),w=Kt(n,0,A),F=$t(n),x=Kt(n,0,F);g.push({accountKey:v,writableIndexes:w,readonlyIndexes:x})}return new ar({header:o,staticAccountKeys:a,recentBlockhash:h,compiledInstructions:p,addressTableLookups:g})}}const Gd={deserializeMessageVersion(t){const e=t[0],n=e&Yo;return n===e?"legacy":n},deserialize:t=>{const e=Gd.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 Wn=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 pw=ce.Buffer.alloc(Qs).fill(0);class Ie{constructor(e){this.keys=void 0,this.programId=void 0,this.data=ce.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 Be{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 v=0;v<n.length;v++)if(n[v].programId===void 0)throw new Error(`Transaction instruction index ${v} has undefined program id`);const s=[],i=[];n.forEach(v=>{v.keys.forEach(w=>{i.push({...w})});const A=v.programId.toString();s.includes(A)||s.push(A)}),s.forEach(v=>{i.push({pubkey:new Z(v),isSigner:!1,isWritable:!1})});const o=[];i.forEach(v=>{const A=v.pubkey.toString(),w=o.findIndex(F=>F.pubkey.toString()===A);w>-1?(o[w].isWritable=o[w].isWritable||v.isWritable,o[w].isSigner=o[w].isSigner||v.isSigner):o.push(v)}),o.sort(function(v,A){if(v.isSigner!==A.isSigner)return v.isSigner?-1:1;if(v.isWritable!==A.isWritable)return v.isWritable?-1:1;const w={localeMatcher:"best fit",usage:"sort",sensitivity:"variant",ignorePunctuation:!1,numeric:!1,caseFirst:"lower"};return v.pubkey.toBase58().localeCompare(A.pubkey.toBase58(),"en",w)});const a=o.findIndex(v=>v.pubkey.equals(r));if(a>-1){const[v]=o.splice(a,1);v.isSigner=!0,v.isWritable=!0,o.unshift(v)}else o.unshift({pubkey:r,isSigner:!0,isWritable:!0});for(const v of this.signatures){const A=o.findIndex(w=>w.pubkey.equals(v.publicKey));if(A>-1)o[A].isSigner||(o[A].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: ${v.publicKey.toString()}`)}let d=0,h=0,u=0;const p=[],B=[];o.forEach(({pubkey:v,isSigner:A,isWritable:w})=>{A?(p.push(v.toString()),d+=1,w||(h+=1)):(B.push(v.toString()),w||(u+=1))});const g=p.concat(B),_=n.map(v=>{const{data:A,programId:w}=v;return{programIdIndex:g.indexOf(w.toString()),accounts:v.keys.map(F=>g.indexOf(F.pubkey.toString())),data:Bt.encode(A)}});return _.forEach(v=>{xe(v.programIdIndex>=0),v.accounts.forEach(A=>xe(A>=0))}),new cn({header:{numRequiredSignatures:d,numReadonlySignedAccounts:h,numReadonlyUnsignedAccounts:u},accountKeys:g,recentBlockhash:e,instructions:_})}_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=Kd(r,s.secretKey);this._addSignature(s.publicKey,Ee(i))})}addSignature(e,n){this._compile(),this._addSignature(e,n)}_addSignature(e,n){xe(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=ce.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):ow(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+=`
16
- Invalid signature for public key${i.invalid.length===1?"":"(s)"} [\`${i.invalid.map(a=>a.toBase58()).join("`, `")}\`].`),i.missing&&(o+=`
17
- 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=[];Qt(r,n.length);const s=r.length+n.length*64+e.length,i=ce.Buffer.alloc(s);return xe(n.length<256),ce.Buffer.from(r).copy(i,0),n.forEach(({signature:o},a)=>{o!==null&&(xe(o.length===64,"signature has invalid length"),ce.Buffer.from(o).copy(i,r.length+a*64))}),e.copy(i,r.length+n.length*64),xe(i.length<=ir,`Transaction too large: ${i.length} > ${ir}`),i}get keys(){return xe(this.instructions.length===1),this.instructions[0].keys.map(e=>e.pubkey)}get programId(){return xe(this.instructions.length===1),this.instructions[0].programId}get data(){return xe(this.instructions.length===1),this.instructions[0].data}static from(e){let n=[...e];const r=$t(n);let s=[];for(let i=0;i<r;i++){const o=Kt(n,0,Qs);s.push(Bt.encode(ce.Buffer.from(o)))}return Be.populate(cn.from(n),s)}static populate(e,n=[]){const r=new Be;return r.recentBlockhash=e.recentBlockhash,e.header.numRequiredSignatures>0&&(r.feePayer=e.accountKeys[0]),n.forEach((s,i)=>{const o={signature:s==Bt.encode(pw)?null:Bt.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(d=>d.publicKey.toString()===a.toString())||e.isAccountSigner(o),isWritable:e.isAccountWritable(o)}});r.instructions.push(new Ie({keys:i,programId:e.accountKeys[s.programIdIndex],data:Bt.decode(s.data)}))}),r._message=e,r._json=r.toJSON(),r}}class Zo{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:d}=r,h=o-a;xe(h>0,"Message header is invalid");const u=e.staticAccountKeys.length-o-d;xe(u>=0,"Message header is invalid");const p=e.getAccountKeys(n),B=p.get(0);if(B===void 0)throw new Error("Failed to decompile message because no account keys were found");const g=[];for(const _ of s){const v=[];for(const w of _.accountKeyIndexes){const F=p.get(w);if(F===void 0)throw new Error(`Failed to find key for account key index ${w}`);const x=w<o;let N;x?N=w<h:w<p.staticAccountKeys.length?N=w-o<u:N=w-p.staticAccountKeys.length<p.accountKeysFromLookups.writable.length,v.push({pubkey:F,isSigner:w<r.numRequiredSignatures,isWritable:N})}const A=p.get(_.programIdIndex);if(A===void 0)throw new Error(`Failed to find program id for program id index ${_.programIdIndex}`);g.push(new Ie({programId:A,data:Ee(_.data),keys:v}))}return new Zo({payerKey:B,instructions:g,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 Qo{get version(){return this.message.version}constructor(e,n){if(this.signatures=void 0,this.message=void 0,n!==void 0)xe(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(Qs));this.signatures=r}this.message=e}serialize(){const e=this.message.serialize(),n=Array();Qt(n,this.signatures.length);const r=exports.struct([exports.blob(n.length,"encodedSignaturesLength"),exports.seq(uw(),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=$t(n);for(let o=0;o<s;o++)r.push(new Uint8Array(Kt(n,0,Qs)));const i=Gd.deserialize(new Uint8Array(n));return new Qo(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));xe(i>=0,`Cannot sign with non signer key ${s.publicKey.toBase58()}`),this.signatures[i]=Kd(n,s.secretKey)}}addSignature(e,n){xe(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));xe(s>=0,`Can not add signature; \`${e.toBase58()}\` is not required to sign this transaction`),this.signatures[s]=n}}const gw=160,yw=64,Ew=gw/yw,vm=1e3/Ew,un=new Z("SysvarC1ock11111111111111111111111111111111"),Aw=new Z("SysvarEpochSchedu1e111111111111111111111111"),Im=new Z("Sysvar1nstructions1111111111111111111111111"),$i=new Z("SysvarRecentB1ockHashes11111111111111111111"),kr=new Z("SysvarRent111111111111111111111111111111111"),ww=new Z("SysvarRewards111111111111111111111111111111"),Sw=new Z("SysvarS1otHashes111111111111111111111111111"),Cw=new Z("SysvarS1otHistory11111111111111111111111111"),Ki=new Z("SysvarStakeHistory1111111111111111111111111");class cs extends Error{constructor({action:e,signature:n,transactionMessage:r,logs:s}){const i=s?`Logs:
18
- ${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.
19
- ${r}. `+i+o;break;case"simulate":a=`Simulation failed.
20
- Message: ${r}.
21
- `+i+o;break;default:a=`Unknown action '${(d=>d)(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 Bw={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 Nc(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,d=a.keys[0].pubkey;o=(await t.confirmTransaction({abortSignal:r==null?void 0:r.abortSignal,minContextSlot:e.minNonceContextSlot,nonceAccountPubkey:d,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 cs({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 we(t,e){const n=t.layout.span>=0?t.layout.span:Dm(t,e),r=ce.Buffer.alloc(n),s=Object.assign({instruction:t.index},e);return t.layout.encode(s,r),r}function De(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 Fm=Tt("lamportsPerSignature"),km=exports.struct([exports.u32("version"),exports.u32("state"),Ae("authorizedPubkey"),Ae("nonce"),exports.struct([Fm],"feeCalculator")]),Uc=km.span;class ea{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=km.decode(Ee(e),0);return new ea({authorizedPubkey:new Z(n.authorizedPubkey),nonce:new Z(n.nonce).toString(),feeCalculator:n.feeCalculator})}}function ds(t){const e=exports.blob(8,t),n=e.decode.bind(e),r=e.encode.bind(e),s=e,i=w5();return s.decode=(o,a)=>{const d=n(o,a);return i.decode(d)},s.encode=(o,a,d)=>{const h=i.encode(o);return r(h,a,d)},s}class xw{constructor(){}static decodeInstructionType(e){this.checkProgramId(e.programId);const r=exports.u32("instruction").decode(e.data);let s;for(const[i,o]of Object.entries(Oe))if(o.index==r){s=i;break}if(!s)throw new Error("Instruction type incorrect; not a SystemInstruction");return s}static decodeCreateAccount(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{lamports:n,space:r,programId:s}=De(Oe.Create,e.data);return{fromPubkey:e.keys[0].pubkey,newAccountPubkey:e.keys[1].pubkey,lamports:n,space:r,programId:new Z(s)}}static decodeTransfer(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{lamports:n}=De(Oe.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}=De(Oe.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 Z(s)}}static decodeAllocate(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{space:n}=De(Oe.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}=De(Oe.AllocateWithSeed,e.data);return{accountPubkey:e.keys[0].pubkey,basePubkey:new Z(n),seed:r,space:s,programId:new Z(i)}}static decodeAssign(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{programId:n}=De(Oe.Assign,e.data);return{accountPubkey:e.keys[0].pubkey,programId:new Z(n)}}static decodeAssignWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{base:n,seed:r,programId:s}=De(Oe.AssignWithSeed,e.data);return{accountPubkey:e.keys[0].pubkey,basePubkey:new Z(n),seed:r,programId:new Z(s)}}static decodeCreateWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{base:n,seed:r,lamports:s,space:i,programId:o}=De(Oe.CreateWithSeed,e.data);return{fromPubkey:e.keys[0].pubkey,newAccountPubkey:e.keys[1].pubkey,basePubkey:new Z(n),seed:r,lamports:s,space:i,programId:new Z(o)}}static decodeNonceInitialize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{authorized:n}=De(Oe.InitializeNonceAccount,e.data);return{noncePubkey:e.keys[0].pubkey,authorizedPubkey:new Z(n)}}static decodeNonceAdvance(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),De(Oe.AdvanceNonceAccount,e.data),{noncePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey}}static decodeNonceWithdraw(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,5);const{lamports:n}=De(Oe.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}=De(Oe.AuthorizeNonceAccount,e.data);return{noncePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[1].pubkey,newAuthorizedPubkey:new Z(n)}}static checkProgramId(e){if(!e.equals(At.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 Oe=Object.freeze({Create:{index:0,layout:exports.struct([exports.u32("instruction"),exports.ns64("lamports"),exports.ns64("space"),Ae("programId")])},Assign:{index:1,layout:exports.struct([exports.u32("instruction"),Ae("programId")])},Transfer:{index:2,layout:exports.struct([exports.u32("instruction"),ds("lamports")])},CreateWithSeed:{index:3,layout:exports.struct([exports.u32("instruction"),Ae("base"),wr("seed"),exports.ns64("lamports"),exports.ns64("space"),Ae("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"),Ae("authorized")])},AuthorizeNonceAccount:{index:7,layout:exports.struct([exports.u32("instruction"),Ae("authorized")])},Allocate:{index:8,layout:exports.struct([exports.u32("instruction"),exports.ns64("space")])},AllocateWithSeed:{index:9,layout:exports.struct([exports.u32("instruction"),Ae("base"),wr("seed"),exports.ns64("space"),Ae("programId")])},AssignWithSeed:{index:10,layout:exports.struct([exports.u32("instruction"),Ae("base"),wr("seed"),Ae("programId")])},TransferWithSeed:{index:11,layout:exports.struct([exports.u32("instruction"),ds("lamports"),wr("seed"),Ae("programId")])},UpgradeNonceAccount:{index:12,layout:exports.struct([exports.u32("instruction")])}});class At{constructor(){}static createAccount(e){const n=Oe.Create,r=we(n,{lamports:e.lamports,space:e.space,programId:Ee(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=Oe.TransferWithSeed;n=we(s,{lamports:BigInt(e.lamports),seed:e.seed,programId:Ee(e.programId.toBuffer())}),r=[{pubkey:e.fromPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0}]}else{const s=Oe.Transfer;n=we(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=Oe.AssignWithSeed;n=we(s,{base:Ee(e.basePubkey.toBuffer()),seed:e.seed,programId:Ee(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]}else{const s=Oe.Assign;n=we(s,{programId:Ee(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=Oe.CreateWithSeed,r=we(n,{base:Ee(e.basePubkey.toBuffer()),seed:e.seed,lamports:e.lamports,space:e.space,programId:Ee(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 Be;"basePubkey"in e&&"seed"in e?n.add(At.createAccountWithSeed({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,basePubkey:e.basePubkey,seed:e.seed,lamports:e.lamports,space:Uc,programId:this.programId})):n.add(At.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,lamports:e.lamports,space:Uc,programId:this.programId}));const r={noncePubkey:e.noncePubkey,authorizedPubkey:e.authorizedPubkey};return n.add(this.nonceInitialize(r)),n}static nonceInitialize(e){const n=Oe.InitializeNonceAccount,r=we(n,{authorized:Ee(e.authorizedPubkey.toBuffer())}),s={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:$i,isSigner:!1,isWritable:!1},{pubkey:kr,isSigner:!1,isWritable:!1}],programId:this.programId,data:r};return new Ie(s)}static nonceAdvance(e){const n=Oe.AdvanceNonceAccount,r=we(n),s={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:$i,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=Oe.WithdrawNonceAccount,r=we(n,{lamports:e.lamports});return new Ie({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0},{pubkey:$i,isSigner:!1,isWritable:!1},{pubkey:kr,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:r})}static nonceAuthorize(e){const n=Oe.AuthorizeNonceAccount,r=we(n,{authorized:Ee(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=Oe.AllocateWithSeed;n=we(s,{base:Ee(e.basePubkey.toBuffer()),seed:e.seed,space:e.space,programId:Ee(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]}else{const s=Oe.Allocate;n=we(s,{space:e.space}),r=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]}return new Ie({keys:r,programId:this.programId,data:n})}}At.programId=new Z("11111111111111111111111111111111");const _w=ir-300;class Or{constructor(){}static getMinNumSignatures(e){return 2*(Math.ceil(e/Or.chunkSize)+1+1)}static async load(e,n,r,s,i){{const p=await e.getMinimumBalanceForRentExemption(i.length),B=await e.getAccountInfo(r.publicKey,"confirmed");let g=null;if(B!==null){if(B.executable)return console.error("Program load failed, account is already executable"),!1;B.data.length!==i.length&&(g=g||new Be,g.add(At.allocate({accountPubkey:r.publicKey,space:i.length}))),B.owner.equals(s)||(g=g||new Be,g.add(At.assign({accountPubkey:r.publicKey,programId:s}))),B.lamports<p&&(g=g||new Be,g.add(At.transfer({fromPubkey:n.publicKey,toPubkey:r.publicKey,lamports:p-B.lamports})))}else g=new Be().add(At.createAccount({fromPubkey:n.publicKey,newAccountPubkey:r.publicKey,lamports:p>0?p:1,space:i.length,programId:s}));g!==null&&await Nc(e,g,[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=Or.chunkSize;let d=0,h=i,u=[];for(;h.length>0;){const p=h.slice(0,a),B=ce.Buffer.alloc(a+16);o.encode({instruction:0,offset:d,bytes:p,bytesLength:0,bytesLengthPadding:0},B);const g=new Be().add({keys:[{pubkey:r.publicKey,isSigner:!0,isWritable:!0}],programId:s,data:B});u.push(Nc(e,g,[n,r],{commitment:"confirmed"})),e._rpcEndpoint.includes("solana.com")&&await hr(1e3/4),d+=a,h=h.slice(a)}await Promise.all(u);{const p=exports.struct([exports.u32("instruction")]),B=ce.Buffer.alloc(p.span);p.encode({instruction:1},B);const g=new Be().add({keys:[{pubkey:r.publicKey,isSigner:!0,isWritable:!0},{pubkey:kr,isSigner:!1,isWritable:!1}],programId:s,data:B}),_="processed",v=await e.sendTransaction(g,[n,r],{preflightCommitment:_}),{context:A,value:w}=await e.confirmTransaction({signature:v,lastValidBlockHeight:g.lastValidBlockHeight,blockhash:g.recentBlockhash},_);if(w.err)throw new Error(`Transaction ${v} failed (${JSON.stringify(w)})`);for(;;){try{if(await e.getSlot({commitment:_})>A.slot)break}catch{}await new Promise(F=>setTimeout(F,Math.round(vm/2)))}}return!0}}Or.chunkSize=_w;const Tw=new Z("BPFLoader2111111111111111111111111111111111");class Dw{static getMinNumSignatures(e){return Or.getMinNumSignatures(e)}static load(e,n,r,s,i){return Or.load(e,n,r,i,s)}}function Rw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ja,Ou;function vw(){if(Ou)return ja;Ou=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,d,h,u,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(d=e(r).sort(),o=d.length,a="",i=0;i<o;)h=d[i],u=n(r[h],!1),u!==void 0&&(a&&(a+=","),a+=JSON.stringify(h)+":"+u),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 ja=function(r){var s=n(r,!1);if(s!==void 0)return""+s},ja}var Iw=vw(),Nu=Rw(Iw);const Is=32;function Ga(t){let e=0;for(;t>1;)t/=2,e++;return e}function Fw(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 Om{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=Ga(Fw(e+Is+1))-Ga(Is)-1,r=this.getSlotsInEpoch(n),s=e-(r-Is);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)*Is:(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+Ga(Is)):this.slotsPerEpoch}}var kw=globalThis.fetch;class Ow extends sw{constructor(e,n,r){const s=i=>{const o=nw(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 Nw(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 Uu=56;class po{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=Nw(Uw,e),r=e.length-Uu;xe(r>=0,"lookup table is invalid"),xe(r%32===0,"lookup table is invalid");const s=r/32,{addresses:i}=exports.struct([exports.seq(Ae(),s,"addresses")]).decode(e.slice(Uu));return{deactivationSlot:n.deactivationSlot,lastExtendedSlot:n.lastExtendedSlot,lastExtendedSlotStartIndex:n.lastExtendedStartIndex,authority:n.authority.length!==0?new Z(n.authority[0]):void 0,addresses:i.map(o=>new Z(o))}}}const Uw={index:1,layout:exports.struct([exports.u32("typeIndex"),ds("deactivationSlot"),Tt("lastExtendedSlot"),exports.u8("lastExtendedStartIndex"),exports.u8(),exports.seq(Ae(),sr(exports.u8(),-1),"authority")])},Lw=/^[^:]+:\/\/([^:[]+|\[[^\]]+\])(:\d+)?(.*)/i;function Mw(t){const e=t.match(Lw);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),d=a==null?"":`:${a+1}`;return`${o}//${r}${d}${i}`}const $e=bi(Hd(Z),Q(),t=>new Z(t)),Nm=qd([Q(),He("base64")]),Yd=bi(Hd(ce.Buffer),Nm,t=>ce.Buffer.from(t[0],"base64")),Um=30*1e3;function Pw(t){if(/^https?:/.test(t)===!1)throw new TypeError("Endpoint URL must start with `http:` or `https:`.");return t}function ke(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 Lu(t){return t.map(e=>"memcmp"in e?{...e,memcmp:{...e.memcmp,encoding:e.memcmp.encoding??"base58"}}:e)}function Lm(t){return qt([X({jsonrpc:He("2.0"),id:Q(),result:t}),X({jsonrpc:He("2.0"),id:Q(),error:X({code:Cs(),message:Q(),data:ae(T5())})})])}const Ww=Lm(Cs());function ye(t){return bi(Lm(t),Ww,e=>"error"in e?e:{...e,result:te(e.result,t)})}function Qe(t){return ye(X({context:X({slot:z()}),value:t}))}function ta(t){return X({context:X({slot:z()}),value:t})}function Ya(t,e){return t===0?new ar({header:e.header,staticAccountKeys:e.accountKeys.map(n=>new Z(n)),recentBlockhash:e.recentBlockhash,compiledInstructions:e.instructions.map(n=>({programIdIndex:n.programIdIndex,accountKeyIndexes:n.accounts,data:Bt.decode(n.data)})),addressTableLookups:e.addressTableLookups}):new cn(e)}const zw=X({foundation:z(),foundationTerm:z(),initial:z(),taper:z(),terminal:z()}),Hw=ye(ne(re(X({epoch:z(),effectiveSlot:z(),amount:z(),postBalance:z(),commission:ae(re(z()))})))),qw=ne(X({slot:z(),prioritizationFee:z()})),$w=X({total:z(),validator:z(),foundation:z(),epoch:z()}),Kw=X({epoch:z(),slotIndex:z(),slotsInEpoch:z(),absoluteSlot:z(),blockHeight:ae(z()),transactionCount:ae(z())}),Vw=X({slotsPerEpoch:z(),leaderScheduleSlotOffset:z(),warmup:On(),firstNormalEpoch:z(),firstNormalSlot:z()}),jw=ym(Q(),ne(z())),zr=re(qt([X({}),Q()])),Gw=X({err:zr}),Yw=He("receivedSignature"),Xw=X({"solana-core":Q(),"feature-set":ae(z())}),Jw=X({program:Q(),programId:$e,parsed:Cs()}),Zw=X({programId:$e,accounts:ne($e),data:Q()}),Mu=Qe(X({err:re(qt([X({}),Q()])),logs:re(ne(Q())),accounts:ae(re(ne(re(X({executable:On(),owner:Q(),lamports:z(),data:ne(Q()),rentEpoch:ae(z())}))))),unitsConsumed:ae(z()),returnData:ae(re(X({programId:Q(),data:qd([Q(),He("base64")])}))),innerInstructions:ae(re(ne(X({index:z(),instructions:ne(qt([Jw,Zw]))}))))})),Qw=Qe(X({byIdentity:ym(Q(),ne(z())),range:X({firstSlot:z(),lastSlot:z()})}));function e9(t,e,n,r,s,i){const o=n||kw;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 d;return r&&(d=async(u,p)=>{const B=await new Promise((g,_)=>{try{r(u,p,(v,A)=>g([v,A]))}catch(v){_(v)}});return await o(...B)}),new Bm(async(u,p)=>{const B={method:"POST",body:u,agent:a,headers:Object.assign({"Content-Type":"application/json"},e||{},eS)};try{let g=5,_,v=500;for(;d?_=await d(t,B):_=await o(t,B),!(_.status!==429||s===!0||(g-=1,g===0));)console.error(`Server responded with ${_.status} ${_.statusText}. Retrying after ${v}ms delay...`),await hr(v),v*=2;const A=await _.text();_.ok?p(null,A):p(new Error(`${_.status} ${_.statusText}: ${A}`))}catch(g){g instanceof Error&&p(g)}},{})}function t9(t){return(e,n)=>new Promise((r,s)=>{t.request(e,n,(i,o)=>{if(i){s(i);return}r(o)})})}function n9(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 r9=ye(zw),s9=ye($w),i9=ye(qw),o9=ye(Kw),a9=ye(Vw),c9=ye(jw),d9=ye(z()),l9=Qe(X({total:z(),circulating:z(),nonCirculating:z(),nonCirculatingAccounts:ne($e)})),Lc=X({amount:Q(),uiAmount:re(z()),decimals:z(),uiAmountString:ae(Q())}),u9=Qe(ne(X({address:$e,amount:Q(),uiAmount:re(z()),decimals:z(),uiAmountString:ae(Q())}))),f9=Qe(ne(X({pubkey:$e,account:X({executable:On(),owner:$e,lamports:z(),data:Yd,rentEpoch:z()})}))),Mc=X({program:Q(),parsed:Cs(),space:z()}),h9=Qe(ne(X({pubkey:$e,account:X({executable:On(),owner:$e,lamports:z(),data:Mc,rentEpoch:z()})}))),m9=Qe(ne(X({lamports:z(),address:$e}))),ti=X({executable:On(),owner:$e,lamports:z(),data:Yd,rentEpoch:z()}),b9=X({pubkey:$e,account:ti}),p9=bi(qt([Hd(ce.Buffer),Mc]),qt([Nm,Mc]),t=>Array.isArray(t)?te(t,Yd):t),Pc=X({executable:On(),owner:$e,lamports:z(),data:p9,rentEpoch:z()}),g9=X({pubkey:$e,account:Pc}),y9=X({state:qt([He("active"),He("inactive"),He("activating"),He("deactivating")]),active:z(),inactive:z()}),E9=ye(ne(X({signature:Q(),slot:z(),err:zr,memo:re(Q()),blockTime:ae(re(z()))}))),A9=ye(ne(X({signature:Q(),slot:z(),err:zr,memo:re(Q()),blockTime:ae(re(z()))}))),w9=X({subscription:z(),result:ta(ti)}),S9=X({pubkey:$e,account:ti}),C9=X({subscription:z(),result:ta(S9)}),B9=X({parent:z(),slot:z(),root:z()}),x9=X({subscription:z(),result:B9}),_9=qt([X({type:qt([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()})]),T9=X({subscription:z(),result:_9}),D9=X({subscription:z(),result:ta(qt([Gw,Yw]))}),R9=X({subscription:z(),result:z()}),v9=X({pubkey:Q(),gossip:re(Q()),tpu:re(Q()),rpc:re(Q()),version:re(Q())}),Pu=X({votePubkey:Q(),nodePubkey:Q(),activatedStake:z(),epochVoteAccount:On(),epochCredits:ne(qd([z(),z(),z()])),commission:z(),lastVote:z(),rootSlot:re(z())}),I9=ye(X({current:ne(Pu),delinquent:ne(Pu)})),F9=qt([He("processed"),He("confirmed"),He("finalized")]),k9=X({slot:z(),confirmations:re(z()),err:zr,confirmationStatus:ae(F9)}),O9=Qe(ne(re(k9))),N9=ye(z()),Mm=X({accountKey:$e,writableIndexes:ne(z()),readonlyIndexes:ne(z())}),Xd=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:ae(ne(Mm))})}),Pm=X({pubkey:$e,signer:On(),writable:On(),source:ae(qt([He("transaction"),He("lookupTable")]))}),Wm=X({accountKeys:ne(Pm),signatures:ne(Q())}),zm=X({parsed:Cs(),program:Q(),programId:$e}),Hm=X({accounts:ne($e),data:Q(),programId:$e}),U9=qt([Hm,zm]),L9=qt([X({parsed:Cs(),program:Q(),programId:Q()}),X({accounts:ne(Q()),data:Q(),programId:Q()})]),qm=bi(U9,L9,t=>"accounts"in t?te(t,Hm):te(t,zm)),$m=X({signatures:ne(Q()),message:X({accountKeys:ne(Pm),instructions:ne(qm),recentBlockhash:Q(),addressTableLookups:ae(re(ne(Mm)))})}),go=X({accountIndex:z(),mint:Q(),owner:ae(Q()),programId:ae(Q()),uiTokenAmount:Lc}),Km=X({writable:ne($e),readonly:ne($e)}),na=X({err:zr,fee:z(),innerInstructions:ae(re(ne(X({index:z(),instructions:ne(X({accounts:ne(z()),data:Q(),programIdIndex:z()}))})))),preBalances:ne(z()),postBalances:ne(z()),logMessages:ae(re(ne(Q()))),preTokenBalances:ae(re(ne(go))),postTokenBalances:ae(re(ne(go))),loadedAddresses:ae(Km),computeUnitsConsumed:ae(z())}),Jd=X({err:zr,fee:z(),innerInstructions:ae(re(ne(X({index:z(),instructions:ne(qm)})))),preBalances:ne(z()),postBalances:ne(z()),logMessages:ae(re(ne(Q()))),preTokenBalances:ae(re(ne(go))),postTokenBalances:ae(re(ne(go))),loadedAddresses:ae(Km),computeUnitsConsumed:ae(z())}),Bs=qt([He(0),He("legacy")]),Hr=X({pubkey:Q(),lamports:z(),postBalance:re(z()),rewardType:re(Q()),commission:ae(re(z()))}),M9=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),transactions:ne(X({transaction:Xd,meta:re(na),version:ae(Bs)})),rewards:ae(ne(Hr)),blockTime:re(z()),blockHeight:re(z())}))),P9=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),rewards:ae(ne(Hr)),blockTime:re(z()),blockHeight:re(z())}))),W9=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),transactions:ne(X({transaction:Wm,meta:re(na),version:ae(Bs)})),rewards:ae(ne(Hr)),blockTime:re(z()),blockHeight:re(z())}))),z9=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),transactions:ne(X({transaction:$m,meta:re(Jd),version:ae(Bs)})),rewards:ae(ne(Hr)),blockTime:re(z()),blockHeight:re(z())}))),H9=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),transactions:ne(X({transaction:Wm,meta:re(Jd),version:ae(Bs)})),rewards:ae(ne(Hr)),blockTime:re(z()),blockHeight:re(z())}))),q9=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),rewards:ae(ne(Hr)),blockTime:re(z()),blockHeight:re(z())}))),$9=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),transactions:ne(X({transaction:Xd,meta:re(na)})),rewards:ae(ne(Hr)),blockTime:re(z())}))),Wu=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),signatures:ne(Q()),blockTime:re(z())}))),Xa=ye(re(X({slot:z(),meta:re(na),blockTime:ae(re(z())),transaction:Xd,version:ae(Bs)}))),Di=ye(re(X({slot:z(),transaction:$m,meta:re(Jd),blockTime:ae(re(z())),version:ae(Bs)}))),K9=Qe(X({blockhash:Q(),lastValidBlockHeight:z()})),V9=Qe(On()),j9=X({slot:z(),numTransactions:z(),numSlots:z(),samplePeriodSecs:z()}),G9=ye(ne(j9)),Y9=Qe(re(X({feeCalculator:X({lamportsPerSignature:z()})}))),X9=ye(Q()),J9=ye(Q()),Z9=X({err:zr,logs:ne(Q()),signature:Q()}),Q9=X({result:ta(Z9),subscription:z()}),eS={"solana-client":"js/1.0.0-maintenance"};class Vm{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 h={};return async u=>{const{commitment:p,config:B}=ke(u),g=this._buildArgs([],p,void 0,B),_=Nu(g);return h[_]=h[_]??(async()=>{try{const v=await this._rpcRequest("getBlockHeight",g),A=te(v,ye(z()));if("error"in A)throw new oe(A.error,"failed to get block height information");return A.result}finally{delete h[_]}})(),await h[_]}})();let r,s,i,o,a,d;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,d=n.httpAgent),this._rpcEndpoint=Pw(e),this._rpcWsEndpoint=r||Mw(e),this._rpcClient=e9(e,s,i,o,a,d),this._rpcRequest=t9(this._rpcClient),this._rpcBatchRequest=n9(this._rpcClient),this._rpcWebSocket=new Ow(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}=ke(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,d9);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,l9);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(Lc));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(Lc));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}=ke(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),d=await this._rpcRequest("getTokenAccountsByOwner",a),h=te(d,f9);if("error"in h)throw new oe(h.error,`failed to get token accounts owned by account ${e.toBase58()}`);return h.result}async getParsedTokenAccountsByOwner(e,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,h9);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,m9);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,u9);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}=ke(n),i=this._buildArgs([e.toBase58()],r,"base64",s),o=await this._rpcRequest("getAccountInfo",i),a=te(o,Qe(re(ti)));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}=ke(n),i=this._buildArgs([e.toBase58()],r,"jsonParsed",s),o=await this._rpcRequest("getAccountInfo",i),a=te(o,Qe(re(Pc)));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}=ke(n),i=e.map(h=>h.toBase58()),o=this._buildArgs([i],r,"jsonParsed",s),a=await this._rpcRequest("getMultipleAccounts",o),d=te(a,Qe(ne(re(Pc))));if("error"in d)throw new oe(d.error,`failed to get info for accounts ${i}`);return d.result}async getMultipleAccountsInfoAndContext(e,n){const{commitment:r,config:s}=ke(n),i=e.map(h=>h.toBase58()),o=this._buildArgs([i],r,"base64",s),a=await this._rpcRequest("getMultipleAccounts",o),d=te(a,Qe(ne(re(ti))));if("error"in d)throw new oe(d.error,`failed to get info for accounts ${i}`);return d.result}async getMultipleAccountsInfo(e,n){return(await this.getMultipleAccountsInfoAndContext(e,n)).value}async getStakeActivation(e,n,r){const{commitment:s,config:i}=ke(n),o=this._buildArgs([e.toBase58()],s,void 0,{...i,epoch:r??(i==null?void 0:i.epoch)}),a=await this._rpcRequest("getStakeActivation",o),d=te(a,ye(y9));if("error"in d)throw new oe(d.error,`failed to get Stake Activation ${e.toBase58()}`);return d.result}async getProgramAccounts(e,n){const{commitment:r,config:s}=ke(n),{encoding:i,...o}=s||{},a=this._buildArgs([e.toBase58()],r,i||"base64",{...o,...o.filters?{filters:Lu(o.filters)}:null}),d=await this._rpcRequest("getProgramAccounts",a),h=ne(b9),u=o.withContext===!0?te(d,Qe(h)):te(d,ye(h));if("error"in u)throw new oe(u.error,`failed to get accounts owned by program ${e.toBase58()}`);return u.result}async getParsedProgramAccounts(e,n){const{commitment:r,config:s}=ke(n),i=this._buildArgs([e.toBase58()],r,"jsonParsed",s),o=await this._rpcRequest("getProgramAccounts",i),a=te(o,ye(ne(g9)));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=Bt.decode(r)}catch{throw new Error("signature must be base58 encoded: "+r)}return xe(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((d,h)=>{try{r=this.onSignature(n,(p,B)=>{r=void 0;const g={context:B,value:p};d({__type:Wn.PROCESSED,response:g})},e);const u=new Promise(p=>{r==null?p():s=this._onSubscriptionStateChange(r,B=>{B==="subscribed"&&p()})});(async()=>{if(await u,i)return;const p=await this.getSignatureStatus(n);if(i||p==null)return;const{context:B,value:g}=p;if(g!=null)if(g!=null&&g.err)h(g.err);else{switch(e){case"confirmed":case"single":case"singleGossip":{if(g.confirmationStatus==="processed")return;break}case"finalized":case"max":case"root":{if(g.confirmationStatus==="processed"||g.confirmationStatus==="confirmed")return;break}case"processed":case"recent":}i=!0,d({__type:Wn.PROCESSED,response:{context:B,value:g}})}})()}catch(u){h(u)}});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 B=async()=>{try{return await this.getBlockHeight(e)}catch{return-1}};(async()=>{let g=await B();if(!i){for(;g<=r;)if(await hr(1e3),i||(g=await B(),i))return;p({__type:Wn.BLOCKHEIGHT_EXCEEDED})}})()}),{abortConfirmation:a,confirmationPromise:d}=this.getTransactionConfirmationPromise({commitment:e,signature:s}),h=this.getCancellationPromise(n);let u;try{const p=await Promise.race([h,d,o]);if(p.__type===Wn.PROCESSED)u=p.response;else throw new Xo(s)}finally{i=!0,a()}return u}async confirmTransactionUsingDurableNonceStrategy({commitment:e,strategy:{abortSignal:n,minContextSlot:r,nonceAccountPubkey:s,nonceValue:i,signature:o}}){let a=!1;const d=new Promise(g=>{let _=i,v=null;const A=async()=>{try{const{context:w,value:F}=await this.getNonceAndContext(s,{commitment:e,minContextSlot:r});return v=w.slot,F==null?void 0:F.nonce}catch{return _}};(async()=>{if(_=await A(),!a)for(;;){if(i!==_){g({__type:Wn.NONCE_INVALID,slotInWhichNonceDidAdvance:v});return}if(await hr(2e3),a||(_=await A(),a))return}})()}),{abortConfirmation:h,confirmationPromise:u}=this.getTransactionConfirmationPromise({commitment:e,signature:o}),p=this.getCancellationPromise(n);let B;try{const g=await Promise.race([p,u,d]);if(g.__type===Wn.PROCESSED)B=g.response;else{let _;for(;;){const v=await this.getSignatureStatus(o);if(v==null)break;if(v.context.slot<(g.slotInWhichNonceDidAdvance??r)){await hr(400);continue}_=v;break}if(_!=null&&_.value){const v=e||"finalized",{confirmationStatus:A}=_.value;switch(v){case"processed":case"recent":if(A!=="processed"&&A!=="confirmed"&&A!=="finalized")throw new Xr(o);break;case"confirmed":case"single":case"singleGossip":if(A!=="confirmed"&&A!=="finalized")throw new Xr(o);break;case"finalized":case"max":case"root":if(A!=="finalized")throw new Xr(o);break;default:}B={context:_.context,value:{err:_.value.err}}}else throw new Xr(o)}}finally{a=!0,h()}return B}async confirmTransactionUsingLegacyTimeoutStrategy({commitment:e,signature:n}){let r;const s=new Promise(d=>{let h=this._confirmTransactionInitialTimeout||6e4;switch(e){case"processed":case"recent":case"single":case"confirmed":case"singleGossip":{h=this._confirmTransactionInitialTimeout||3e4;break}}r=setTimeout(()=>d({__type:Wn.TIMED_OUT,timeoutMs:h}),h)}),{abortConfirmation:i,confirmationPromise:o}=this.getTransactionConfirmationPromise({commitment:e,signature:n});let a;try{const d=await Promise.race([o,s]);if(d.__type===Wn.PROCESSED)a=d.response;else throw new jd(n,d.timeoutMs/1e3)}finally{clearTimeout(r),i()}return a}async getClusterNodes(){const e=await this._rpcRequest("getClusterNodes",[]),n=te(e,ye(ne(v9)));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,I9);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}=ke(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}=ke(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($e)));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);xe(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,O9);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}=ke(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,r9);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}=ke(r),o=this._buildArgs([e.map(h=>h.toBase58())],s,void 0,{...i,epoch:n??(i==null?void 0:i.epoch)}),a=await this._rpcRequest("getInflationReward",o),d=te(a,Hw);if("error"in d)throw new oe(d.error,"failed to get inflation reward");return d.result}async getInflationRate(){const e=await this._rpcRequest("getInflationRate",[]),n=te(e,s9);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}=ke(e),s=this._buildArgs([],n,void 0,r),i=await this._rpcRequest("getEpochInfo",s),o=te(i,o9);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,a9);if("error"in n)throw new oe(n.error,"failed to get epoch schedule");const r=n.result;return new Om(r.slotsPerEpoch,r.leaderScheduleSlotOffset,r.warmup,r.firstNormalEpoch,r.firstNormalSlot)}async getLeaderSchedule(){const e=await this._rpcRequest("getLeaderSchedule",[]),n=te(e,c9);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,N9);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,G9);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,Y9);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=Ee(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,i9);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}=ke(e),s=this._buildArgs([],n,void 0,r),i=await this._rpcRequest("getLatestBlockhash",s),o=te(i,K9);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}=ke(n),i=this._buildArgs([e],r,void 0,s),o=await this._rpcRequest("isBlockhashValid",i),a=te(o,V9);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(Xw));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}=ke(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,W9);if("error"in a)throw a.error;return a.result}case"none":{const a=te(o,P9);if("error"in a)throw a.error;return a.result}default:{const a=te(o,M9);if("error"in a)throw a.error;const{result:d}=a;return d?{...d,transactions:d.transactions.map(({transaction:h,meta:u,version:p})=>({meta:u,transaction:{...h,message:Ya(p,h.message)},version:p}))}:null}}}catch(a){throw new oe(a,"failed to get confirmed block")}}async getParsedBlock(e,n){const{commitment:r,config:s}=ke(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,H9);if("error"in a)throw a.error;return a.result}case"none":{const a=te(o,q9);if("error"in a)throw a.error;return a.result}default:{const a=te(o,z9);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,...d}=e;r=a,n=d}const s=this._buildArgs([],r,"base64",n),i=await this._rpcRequest("getBlockProduction",s),o=te(i,Qw);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}=ke(n),i=this._buildArgsAtLeastConfirmed([e],r,void 0,s),o=await this._rpcRequest("getTransaction",i),a=te(o,Xa);if("error"in a)throw new oe(a.error,"failed to get transaction");const d=a.result;return d&&{...d,transaction:{...d.transaction,message:Ya(d.version,d.transaction.message)}}}async getParsedTransaction(e,n){const{commitment:r,config:s}=ke(n),i=this._buildArgsAtLeastConfirmed([e],r,"jsonParsed",s),o=await this._rpcRequest("getTransaction",i),a=te(o,Di);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}=ke(n),i=e.map(d=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([d],r,"jsonParsed",s)}));return(await this._rpcBatchRequest(i)).map(d=>{const h=te(d,Di);if("error"in h)throw new oe(h.error,"failed to get transactions");return h.result})}async getTransactions(e,n){const{commitment:r,config:s}=ke(n),i=e.map(d=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([d],r,void 0,s)}));return(await this._rpcBatchRequest(i)).map(d=>{const h=te(d,Xa);if("error"in h)throw new oe(h.error,"failed to get transactions");const u=h.result;return u&&{...u,transaction:{...u.transaction,message:Ya(u.version,u.transaction.message)}}})}async getConfirmedBlock(e,n){const r=this._buildArgsAtLeastConfirmed([e],n),s=await this._rpcRequest("getBlock",r),i=te(s,$9);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:d,meta:h})=>{const u=new cn(d.message);return{meta:h,transaction:{...d,message:u}}})};return{...a,transactions:a.transactions.map(({transaction:d,meta:h})=>({meta:h,transaction:Be.populate(d.message,d.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,Wu);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,Wu);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,Xa);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),d=o.transaction.signatures;return{...o,transaction:Be.populate(a,d)}}async getParsedConfirmedTransaction(e,n){const r=this._buildArgsAtLeastConfirmed([e],n,"jsonParsed"),s=await this._rpcRequest("getTransaction",r),i=te(s,Di);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,Di);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 d=await this.getConfirmedBlockSignatures(n,"finalized");d.signatures.length>0&&(s.until=d.signatures[d.signatures.length-1].toString())}catch(d){if(d instanceof Error&&d.message.includes("skipped"))continue;throw d}let o=await this.getSlot("finalized");for(;!("before"in s)&&(r++,!(r>o));)try{const d=await this.getConfirmedBlockSignatures(r);d.signatures.length>0&&(s.before=d.signatures[d.signatures.length-1].toString())}catch(d){if(d instanceof Error&&d.message.includes("skipped"))continue;throw d}return(await this.getConfirmedSignaturesForAddress2(e,s)).map(d=>d.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,E9);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,A9);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 po({key:e,state:po.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=ea.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,X9);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(vm/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}=ke(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 v=e.serialize(),A=ce.Buffer.from(v).toString("base64");if(Array.isArray(n)||r!==void 0)throw new Error("Invalid arguments");const w=n||{};w.encoding="base64","commitment"in w||(w.commitment=this.commitment),n&&typeof n=="object"&&"innerInstructions"in n&&(w.innerInstructions=n.innerInstructions);const F=[A,w],x=await this._rpcRequest("simulateTransaction",F),N=te(x,Mu);if("error"in N)throw new Error("failed to simulate transaction: "+N.error.message);return N.result}let s;if(e instanceof Be){let _=e;s=new Be,s.feePayer=_.feePayer,s.instructions=e.instructions,s.nonceInfo=_.nonceInfo,s.signatures=_.signatures}else s=Be.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 _=this._disableBlockhashCaching;for(;;){const v=await this._blockhashWithExpiryBlockHeight(_);if(s.lastValidBlockHeight=v.lastValidBlockHeight,s.recentBlockhash=v.blockhash,!i)break;if(s.sign(...i),!s.signature)throw new Error("!signature");const A=s.signature.toString("base64");if(!this._blockhashInfo.simulatedSignatures.includes(A)&&!this._blockhashInfo.transactionSignatures.includes(A)){this._blockhashInfo.simulatedSignatures.push(A);break}else _=!0}}const o=s._compile(),a=o.serialize(),h=s._serialize(a).toString("base64"),u={encoding:"base64",commitment:this.commitment};if(r){const _=(Array.isArray(r)?r:o.nonProgramIds()).map(v=>v.toBase58());u.accounts={encoding:"base64",addresses:_}}i&&(u.sigVerify=!0),n&&typeof n=="object"&&"innerInstructions"in n&&(u.innerInstructions=n.innerInstructions);const p=[h,u],B=await this._rpcRequest("simulateTransaction",p),g=te(B,Mu);if("error"in g){let _;if("data"in g.error&&(_=g.error.data.logs,_&&Array.isArray(_))){const v=`
22
- `,A=v+_.join(v);console.error(g.error.message,A)}throw new cs({action:"simulate",signature:"",transactionMessage:g.error.message,logs:_})}return g.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 d=e.signature.toString("base64");if(this._blockhashInfo.transactionSignatures.includes(d))o=!0;else{this._blockhashInfo.transactionSignatures.push(d);break}}}const i=e.serialize();return await this.sendRawTransaction(i,r)}async sendRawTransaction(e,n){const r=Ee(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),d=te(a,J9);if("error"in d){let h;throw"data"in d.error&&(h=d.error.data.logs),new cs({action:s?"send":"simulate",signature:"",transactionMessage:d.error.message,logs:h})}return d.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,w9);this._handleServerNotification(r,[n.value,n.context])}_makeSubscription(e,n){const r=this._nextClientSubscriptionId++,s=Nu([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];xe(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}=ke(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,C9);this._handleServerNotification(r,[{accountId:n.value.pubkey,accountInfo:n.value.account},n.context])}onProgramAccountChange(e,n,r,s){const{commitment:i,config:o}=ke(r),a=this._buildArgs([e.toBase58()],i||this._commitment||"finalized","base64",o||(s?{filters:Lu(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,Q9);this._handleServerNotification(r,[n.value,n.context])}_wsOnSlotNotification(e){const{result:n,subscription:r}=te(e,x9);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,T9);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,D9);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:(d,h)=>{n(d,h);try{this.removeSignatureListener(a)}catch{}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},o);return a}async removeSignatureListener(e){await this._unsubscribeClientSubscription(e,"signature result")}_wsOnRootNotification(e){const{result:n,subscription:r}=te(e,R9);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 xr{constructor(e){this._keypair=void 0,this._keypair=e??Iu()}static generate(){return new xr(Iu())}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=bo(s);for(let o=0;o<32;o++)if(r[o]!==i[o])throw new Error("provided secretKey is invalid")}return new xr({publicKey:r,secretKey:e})}static fromSeed(e){const n=bo(e),r=new Uint8Array(64);return r.set(e),r.set(n,32),new xr({publicKey:n,secretKey:r})}get publicKey(){return new Z(this._keypair.publicKey)}get secretKey(){return new Uint8Array(this._keypair.secretKey)}}const $n=Object.freeze({CreateLookupTable:{index:0,layout:exports.struct([exports.u32("instruction"),ds("recentSlot"),exports.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:exports.struct([exports.u32("instruction")])},ExtendLookupTable:{index:2,layout:exports.struct([exports.u32("instruction"),ds(),exports.seq(Ae(),sr(exports.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:exports.struct([exports.u32("instruction")])},CloseLookupTable:{index:4,layout:exports.struct([exports.u32("instruction")])}});class tS{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($n))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}=De($n.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}=De($n.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 Z(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(ra.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 ra{constructor(){}static createLookupTable(e){const[n,r]=Z.findProgramAddressSync([e.authority.toBuffer(),bm().encode(e.recentSlot)],this.programId),s=$n.CreateLookupTable,i=we(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:At.programId,isSigner:!1,isWritable:!1}];return[new Ie({programId:this.programId,keys:o,data:i}),n]}static freezeLookupTable(e){const n=$n.FreezeLookupTable,r=we(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=$n.ExtendLookupTable,r=we(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:At.programId,isSigner:!1,isWritable:!1}),new Ie({programId:this.programId,keys:s,data:r})}static deactivateLookupTable(e){const n=$n.DeactivateLookupTable,r=we(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=$n.CloseLookupTable,r=we(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})}}ra.programId=new Z("AddressLookupTab1e1111111111111111111111111");class nS{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}=De(Dn.RequestUnits,e.data);return{units:n,additionalFee:r}}static decodeRequestHeapFrame(e){this.checkProgramId(e.programId);const{bytes:n}=De(Dn.RequestHeapFrame,e.data);return{bytes:n}}static decodeSetComputeUnitLimit(e){this.checkProgramId(e.programId);const{units:n}=De(Dn.SetComputeUnitLimit,e.data);return{units:n}}static decodeSetComputeUnitPrice(e){this.checkProgramId(e.programId);const{microLamports:n}=De(Dn.SetComputeUnitPrice,e.data);return{microLamports:n}}static checkProgramId(e){if(!e.equals(sa.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"),ds("microLamports")])}});class sa{constructor(){}static requestUnits(e){const n=Dn.RequestUnits,r=we(n,e);return new Ie({keys:[],programId:this.programId,data:r})}static requestHeapFrame(e){const n=Dn.RequestHeapFrame,r=we(n,e);return new Ie({keys:[],programId:this.programId,data:r})}static setComputeUnitLimit(e){const n=Dn.SetComputeUnitLimit,r=we(n,e);return new Ie({keys:[],programId:this.programId,data:r})}static setComputeUnitPrice(e){const n=Dn.SetComputeUnitPrice,r=we(n,{microLamports:BigInt(e.microLamports)});return new Ie({keys:[],programId:this.programId,data:r})}}sa.programId=new Z("ComputeBudget111111111111111111111111111111");const zu=64,Hu=32,qu=64,$u=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 ia{constructor(){}static createInstructionWithPublicKey(e){const{publicKey:n,message:r,signature:s,instructionIndex:i}=e;xe(n.length===Hu,`Public Key must be ${Hu} bytes but received ${n.length} bytes`),xe(s.length===qu,`Signature must be ${qu} bytes but received ${s.length} bytes`);const o=$u.span,a=o+n.length,d=a+s.length,h=1,u=ce.Buffer.alloc(d+r.length),p=i??65535;return $u.encode({numSignatures:h,padding:0,signatureOffset:a,signatureInstructionIndex:p,publicKeyOffset:o,publicKeyInstructionIndex:p,messageDataOffset:d,messageDataSize:r.length,messageInstructionIndex:p},u),u.fill(n,o),u.fill(s,a),u.fill(r,d),new Ie({keys:[],programId:ia.programId,data:u})}static createInstructionWithPrivateKey(e){const{privateKey:n,message:r,instructionIndex:s}=e;xe(n.length===zu,`Private key must be ${zu} bytes but received ${n.length} bytes`);try{const i=xr.fromSecretKey(n),o=i.publicKey.toBytes(),a=Kd(r,i.secretKey);return this.createInstructionWithPublicKey({publicKey:o,message:r,signature:a,instructionIndex:s})}catch(i){throw new Error(`Error creating instruction; ${i}`)}}}ia.programId=new Z("Ed25519SigVerify111111111111111111111111111");const rS=(t,e)=>{const n=Qn.sign(t,e);return[n.toCompactRawBytes(),n.recovery]};Qn.utils.isValidPrivateKey;const sS=Qn.getPublicKey,Ku=32,Ja=20,Vu=64,iS=11,Za=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 _r{constructor(){}static publicKeyToEthAddress(e){xe(e.length===Vu,`Public key must be ${Vu} bytes but received ${e.length} bytes`);try{return ce.Buffer.from($s(Ee(e))).slice(-Ja)}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 _r.createInstructionWithEthAddress({ethAddress:_r.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=ce.Buffer.from(n.substr(2),"hex"):a=ce.Buffer.from(n,"hex"):a=n,xe(a.length===Ja,`Address must be ${Ja} bytes but received ${a.length} bytes`);const d=1+iS,h=d,u=d+a.length,p=u+s.length+1,B=1,g=ce.Buffer.alloc(Za.span+r.length);return Za.encode({numSignatures:B,signatureOffset:u,signatureInstructionIndex:o,ethAddressOffset:h,ethAddressInstructionIndex:o,messageDataOffset:p,messageDataSize:r.length,messageInstructionIndex:o,signature:Ee(s),ethAddress:Ee(a),recoveryId:i},g),g.fill(Ee(r),Za.span),new Ie({keys:[],programId:_r.programId,data:g})}static createInstructionWithPrivateKey(e){const{privateKey:n,message:r,instructionIndex:s}=e;xe(n.length===Ku,`Private key must be ${Ku} bytes but received ${n.length} bytes`);try{const i=Ee(n),o=sS(i,!1).slice(1),a=ce.Buffer.from($s(Ee(r))),[d,h]=rS(a,i);return this.createInstructionWithPublicKey({publicKey:o,message:r,signature:d,recoveryId:h,instructionIndex:s})}catch(i){throw new Error(`Error creating instruction; ${i}`)}}}_r.programId=new Z("KeccakSecp256k11111111111111111111111111111");var jm;const Gm=new Z("StakeConfig11111111111111111111111111111111");class Ym{constructor(e,n){this.staker=void 0,this.withdrawer=void 0,this.staker=e,this.withdrawer=n}}class pi{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}}jm=pi;pi.default=new jm(0,0,Z.default);class oS{constructor(){}static decodeInstructionType(e){this.checkProgramId(e.programId);const r=exports.u32("instruction").decode(e.data);let s;for(const[i,o]of Object.entries(Ct))if(o.index==r){s=i;break}if(!s)throw new Error("Instruction type incorrect; not a StakeInstruction");return s}static decodeInitialize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{authorized:n,lockup:r}=De(Ct.Initialize,e.data);return{stakePubkey:e.keys[0].pubkey,authorized:new Ym(new Z(n.staker),new Z(n.withdrawer)),lockup:new pi(r.unixTimestamp,r.epoch,new Z(r.custodian))}}static decodeDelegate(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,6),De(Ct.Delegate,e.data),{stakePubkey:e.keys[0].pubkey,votePubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[5].pubkey}}static decodeAuthorize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{newAuthorized:n,stakeAuthorizationType:r}=De(Ct.Authorize,e.data),s={stakePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey,newAuthorizedPubkey:new Z(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}=De(Ct.AuthorizeWithSeed,e.data),o={stakePubkey:e.keys[0].pubkey,authorityBase:e.keys[1].pubkey,authoritySeed:s,authorityOwner:new Z(i),newAuthorizedPubkey:new Z(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}=De(Ct.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),De(Ct.Merge,e.data),{stakePubkey:e.keys[0].pubkey,sourceStakePubKey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey}}static decodeWithdraw(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,5);const{lamports:n}=De(Ct.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),De(Ct.Deactivate,e.data),{stakePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey}}static checkProgramId(e){if(!e.equals(oa.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 Ct=Object.freeze({Initialize:{index:0,layout:exports.struct([exports.u32("instruction"),fw(),hw()])},Authorize:{index:1,layout:exports.struct([exports.u32("instruction"),Ae("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"),Ae("newAuthorized"),exports.u32("stakeAuthorizationType"),wr("authoritySeed"),Ae("authorityOwner")])}}),aS=Object.freeze({Staker:{index:0},Withdrawer:{index:1}});class oa{constructor(){}static initialize(e){const{stakePubkey:n,authorized:r,lockup:s}=e,i=s||pi.default,o=Ct.Initialize,a=we(o,{authorized:{staker:Ee(r.staker.toBuffer()),withdrawer:Ee(r.withdrawer.toBuffer())},lockup:{unixTimestamp:i.unixTimestamp,epoch:i.epoch,custodian:Ee(i.custodian.toBuffer())}}),d={keys:[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:kr,isSigner:!1,isWritable:!1}],programId:this.programId,data:a};return new Ie(d)}static createAccountWithSeed(e){const n=new Be;n.add(At.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 Be;n.add(At.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=Ct.Delegate,o=we(i);return new Be().add({keys:[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!1},{pubkey:un,isSigner:!1,isWritable:!1},{pubkey:Ki,isSigner:!1,isWritable:!1},{pubkey:Gm,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=Ct.Authorize,d=we(a,{newAuthorized:Ee(s.toBuffer()),stakeAuthorizationType:i.index}),h=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:un,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}];return o&&h.push({pubkey:o,isSigner:!0,isWritable:!1}),new Be().add({keys:h,programId:this.programId,data:d})}static authorizeWithSeed(e){const{stakePubkey:n,authorityBase:r,authoritySeed:s,authorityOwner:i,newAuthorizedPubkey:o,stakeAuthorizationType:a,custodianPubkey:d}=e,h=Ct.AuthorizeWithSeed,u=we(h,{newAuthorized:Ee(o.toBuffer()),stakeAuthorizationType:a.index,authoritySeed:s,authorityOwner:Ee(i.toBuffer())}),p=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1},{pubkey:un,isSigner:!1,isWritable:!1}];return d&&p.push({pubkey:d,isSigner:!0,isWritable:!1}),new Be().add({keys:p,programId:this.programId,data:u})}static splitInstruction(e){const{stakePubkey:n,authorizedPubkey:r,splitStakePubkey:s,lamports:i}=e,o=Ct.Split,a=we(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 Be;return r.add(At.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:d}=e,h=new Be;return h.add(At.allocate({accountPubkey:i,basePubkey:o,seed:a,space:this.space,programId:this.programId})),n&&n>0&&h.add(At.transfer({fromPubkey:e.authorizedPubkey,toPubkey:i,lamports:n})),h.add(this.splitInstruction({stakePubkey:r,authorizedPubkey:s,splitStakePubkey:i,lamports:d}))}static merge(e){const{stakePubkey:n,sourceStakePubKey:r,authorizedPubkey:s}=e,i=Ct.Merge,o=we(i);return new Be().add({keys:[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:un,isSigner:!1,isWritable:!1},{pubkey:Ki,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=Ct.Withdraw,d=we(a,{lamports:i}),h=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:un,isSigner:!1,isWritable:!1},{pubkey:Ki,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return o&&h.push({pubkey:o,isSigner:!0,isWritable:!1}),new Be().add({keys:h,programId:this.programId,data:d})}static deactivate(e){const{stakePubkey:n,authorizedPubkey:r}=e,s=Ct.Deactivate,i=we(s);return new Be().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})}}oa.programId=new Z("Stake11111111111111111111111111111111111111");oa.space=200;class Xm{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 cS{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(Rn))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}=De(Rn.InitializeAccount,e.data);return{votePubkey:e.keys[0].pubkey,nodePubkey:e.keys[3].pubkey,voteInit:new Xm(new Z(n.nodePubkey),new Z(n.authorizedVoter),new Z(n.authorizedWithdrawer),n.commission)}}static decodeAuthorize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{newAuthorized:n,voteAuthorizationType:r}=De(Rn.Authorize,e.data);return{votePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey,newAuthorizedPubkey:new Z(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}}=De(Rn.AuthorizeWithSeed,e.data);return{currentAuthorityDerivedKeyBasePubkey:e.keys[2].pubkey,currentAuthorityDerivedKeyOwnerPubkey:new Z(n),currentAuthorityDerivedKeySeed:r,newAuthorizedPubkey:new Z(s),voteAuthorizationType:{index:i},votePubkey:e.keys[0].pubkey}}static decodeWithdraw(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{lamports:n}=De(Rn.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(xs.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 Rn=Object.freeze({InitializeAccount:{index:0,layout:exports.struct([exports.u32("instruction"),mw()])},Authorize:{index:1,layout:exports.struct([exports.u32("instruction"),Ae("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"),bw()])}}),dS=Object.freeze({Voter:{index:0},Withdrawer:{index:1}});class xs{constructor(){}static initializeAccount(e){const{votePubkey:n,nodePubkey:r,voteInit:s}=e,i=Rn.InitializeAccount,o=we(i,{voteInit:{nodePubkey:Ee(s.nodePubkey.toBuffer()),authorizedVoter:Ee(s.authorizedVoter.toBuffer()),authorizedWithdrawer:Ee(s.authorizedWithdrawer.toBuffer()),commission:s.commission}}),a={keys:[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:kr,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 Be;return n.add(At.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=Rn.Authorize,a=we(o,{newAuthorized:Ee(s.toBuffer()),voteAuthorizationType:i.index}),d=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:un,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return new Be().add({keys:d,programId:this.programId,data:a})}static authorizeWithSeed(e){const{currentAuthorityDerivedKeyBasePubkey:n,currentAuthorityDerivedKeyOwnerPubkey:r,currentAuthorityDerivedKeySeed:s,newAuthorizedPubkey:i,voteAuthorizationType:o,votePubkey:a}=e,d=Rn.AuthorizeWithSeed,h=we(d,{voteAuthorizeWithSeedArgs:{currentAuthorityDerivedKeyOwnerPubkey:Ee(r.toBuffer()),currentAuthorityDerivedKeySeed:s,newAuthorized:Ee(i.toBuffer()),voteAuthorizationType:o.index}}),u=[{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:un,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}];return new Be().add({keys:u,programId:this.programId,data:h})}static withdraw(e){const{votePubkey:n,authorizedWithdrawerPubkey:r,lamports:s,toPubkey:i}=e,o=Rn.Withdraw,a=we(o,{lamports:s}),d=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}];return new Be().add({keys:d,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 xs.withdraw(e)}static updateValidatorIdentity(e){const{votePubkey:n,authorizedWithdrawerPubkey:r,nodePubkey:s}=e,i=Rn.UpdateValidatorIdentity,o=we(i),a=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!0,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return new Be().add({keys:a,programId:this.programId,data:o})}}xs.programId=new Z("Vote111111111111111111111111111111111111111");xs.space=3762;const Jm=new Z("Va1idator1nfo111111111111111111111111111111"),lS=X({name:Q(),website:ae(Q()),details:ae(Q()),iconUrl:ae(Q()),keybaseUsername:ae(Q())});class Zd{constructor(e,n){this.key=void 0,this.info=void 0,this.key=e,this.info=n}static fromConfigData(e){let n=[...e];if($t(n)!==2)return null;const s=[];for(let i=0;i<2;i++){const o=new Z(Kt(n,0,In)),a=Tn(n)===1;s.push({publicKey:o,isSigner:a})}if(s[0].publicKey.equals(Jm)&&s[1].isSigner){const i=wr().decode(ce.Buffer.from(n)),o=JSON.parse(i);return pm(o,lS),new Zd(s[1].publicKey,o)}return null}}const uS=new Z("Vote111111111111111111111111111111111111111"),fS=exports.struct([Ae("nodePubkey"),Ae("authorizedWithdrawer"),exports.u8("commission"),Tt(),exports.seq(exports.struct([Tt("slot"),exports.u32("confirmationCount")]),sr(exports.u32(),-8),"votes"),exports.u8("rootSlotValid"),Tt("rootSlot"),Tt(),exports.seq(exports.struct([Tt("epoch"),Ae("authorizedVoter")]),sr(exports.u32(),-8),"authorizedVoters"),exports.struct([exports.seq(exports.struct([Ae("authorizedPubkey"),Tt("epochOfLastAuthorizedSwitch"),Tt("targetEpoch")]),32,"buf"),Tt("idx"),exports.u8("isEmpty")],"priorVoters"),Tt(),exports.seq(exports.struct([Tt("epoch"),Tt("credits"),Tt("prevCredits")]),sr(exports.u32(),-8),"epochCredits"),exports.struct([Tt("slot"),Tt("timestamp")],"lastTimestamp")]);class Qd{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=fS.decode(Ee(e),4);let s=r.rootSlot;return r.rootSlotValid||(s=null),new Qd({nodePubkey:new Z(r.nodePubkey),authorizedWithdrawer:new Z(r.authorizedWithdrawer),commission:r.commission,votes:r.votes,rootSlot:s,authorizedVoters:r.authorizedVoters.map(hS),priorVoters:mS(r.priorVoters),epochCredits:r.epochCredits,lastTimestamp:r.lastTimestamp})}}function hS({authorizedVoter:t,epoch:e}){return{epoch:e,authorizedVoter:new Z(t)}}function ju({authorizedPubkey:t,epochOfLastAuthorizedSwitch:e,targetEpoch:n}){return{authorizedPubkey:new Z(t),epochOfLastAuthorizedSwitch:e,targetEpoch:n}}function mS({buf:t,idx:e,isEmpty:n}){return n?[]:[...t.slice(e+1).map(ju),...t.slice(0,e).map(ju)]}const Gu={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 Zm(t,e){const n=e===!1?"http":"https";if(!t)return Gu[n].devnet;const r=Gu[n][t];if(!r)throw new Error(`Unknown ${n} cluster: ${t}`);return r}async function bS(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),d=i&&i.commitment,u=(await(s?t.confirmTransaction(s,d):t.confirmTransaction(a,d))).value;if(u.err)throw a!=null?new cs({action:o!=null&&o.skipPreflight?"send":"simulate",signature:a,transactionMessage:`Status: (${JSON.stringify(u)})`}):new Error(`Raw transaction ${a} failed (${JSON.stringify(u)})`);return a}const Qm=1e9,pS=Object.freeze(Object.defineProperty({__proto__:null,Account:dw,AddressLookupTableAccount:po,AddressLookupTableInstruction:tS,AddressLookupTableProgram:ra,Authorized:Ym,BLOCKHASH_CACHE_TIMEOUT_MS:Um,BPF_LOADER_DEPRECATED_PROGRAM_ID:lw,BPF_LOADER_PROGRAM_ID:Tw,BpfLoader:Dw,COMPUTE_BUDGET_INSTRUCTION_LAYOUTS:Dn,ComputeBudgetInstruction:nS,ComputeBudgetProgram:sa,Connection:Vm,Ed25519Program:ia,Enum:aw,EpochSchedule:Om,FeeCalculatorLayout:Fm,Keypair:xr,LAMPORTS_PER_SOL:Qm,LOOKUP_TABLE_INSTRUCTION_LAYOUTS:$n,Loader:Or,Lockup:pi,MAX_SEED_LENGTH:Tm,Message:cn,MessageAccountKeys:ei,MessageV0:ar,NONCE_ACCOUNT_LENGTH:Uc,NonceAccount:ea,PACKET_DATA_SIZE:ir,PUBLIC_KEY_LENGTH:In,PublicKey:Z,SIGNATURE_LENGTH_IN_BYTES:Qs,SOLANA_SCHEMA:Ws,STAKE_CONFIG_ID:Gm,STAKE_INSTRUCTION_LAYOUTS:Ct,SYSTEM_INSTRUCTION_LAYOUTS:Oe,SYSVAR_CLOCK_PUBKEY:un,SYSVAR_EPOCH_SCHEDULE_PUBKEY:Aw,SYSVAR_INSTRUCTIONS_PUBKEY:Im,SYSVAR_RECENT_BLOCKHASHES_PUBKEY:$i,SYSVAR_RENT_PUBKEY:kr,SYSVAR_REWARDS_PUBKEY:ww,SYSVAR_SLOT_HASHES_PUBKEY:Sw,SYSVAR_SLOT_HISTORY_PUBKEY:Cw,SYSVAR_STAKE_HISTORY_PUBKEY:Ki,Secp256k1Program:_r,SendTransactionError:cs,SolanaJSONRPCError:oe,SolanaJSONRPCErrorCode:Bw,StakeAuthorizationLayout:aS,StakeInstruction:oS,StakeProgram:oa,Struct:Vd,SystemInstruction:xw,SystemProgram:At,Transaction:Be,TransactionExpiredBlockheightExceededError:Xo,TransactionExpiredNonceInvalidError:Xr,TransactionExpiredTimeoutError:jd,TransactionInstruction:Ie,TransactionMessage:Zo,TransactionStatus:Wn,VALIDATOR_INFO_KEY:Jm,VERSION_PREFIX_MASK:Yo,VOTE_PROGRAM_ID:uS,ValidatorInfo:Zd,VersionedMessage:Gd,VersionedTransaction:Qo,VoteAccount:Qd,VoteAuthorizationLayout:dS,VoteInit:Xm,VoteInstruction:cS,VoteProgram:xs,clusterApiUrl:Zm,sendAndConfirmRawTransaction:bS,sendAndConfirmTransaction:Nc},Symbol.toStringTag,{value:"Module"})),el="Solana",gS="11111111111111111111111111111111",mr=class mr{constructor(e){ie(this,"type","Native");ie(this,"address");mr.instanceof(e)?this.address=e.address:xt.instanceof(e)?this.address=new Z(e.toUint8Array()):typeof e=="string"&&wt.valid(e)?this.address=new Z(wt.decode(e)):this.address=new Z(e)}unwrap(){return this.address}toString(){return this.address.toBase58()}toUint8Array(){return new Uint8Array(this.address.toBytes())}toNative(){return this}toUniversalAddress(){return new xt(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",el);let yo=mr;dd(el,yo);exports.AddressLookupTableAccount=po;exports.AddressLookupTableProgram=ra;exports.AutomaticRoute=lh;exports.AxiosError=KE;exports.BN=vc;exports.CircleTransfer=St;exports.ComputeBudgetProgram=sa;exports.Connection=Vm;exports.DEFAULT_TASK_TIMEOUT=_n;exports.ErrNotWrapped=Fg;exports.EventEmitter=$d;exports.EvmAddress=ao;exports.EvmZeroAddress=I8;exports.Field=Nr;exports.FinalizableRoute=A2;exports.FpInvertBatch=id;exports.FpLegendre=fc;exports.FpPow=t0;exports.Hash=Ah;exports.Hash$1=To;exports.HashMD=Qc;exports.Keypair=xr;exports.LAMPORTS_PER_SOL=Qm;exports.ManualRoute=Dc;exports.Message=cn;exports.MessageV0=ar;exports.MinAmountError=t2;exports.PlatformContext=dg;exports.PlatformNativeSigner=yg;exports.PublicKey=Z;exports.RelayFailedError=wd;exports.Route=Ho;exports.RouteResolver=dh;exports.RpcClient=Bm;exports.SYSVAR_CLOCK_PUBKEY=un;exports.SYSVAR_INSTRUCTIONS_PUBKEY=Im;exports.SYSVAR_RENT_PUBKEY=kr;exports.Secp256k1Program=_r;exports.SendTransactionError=cs;exports.SolanaAddress=yo;exports.SolanaZeroAddress=gS;exports.SystemProgram=At;exports.TokenTransfer=Ye;exports.Transaction=Be;exports.TransactionExpiredBlockheightExceededError=Xo;exports.TransactionInstruction=Ie;exports.TransactionMessage=Zo;exports.UnavailableError=n2;exports.UniversalAddress=xt;exports.VersionedTransaction=Qo;exports.Wormhole=sn;exports._platform=Id;exports._platform$1=el;exports._validateObject=gs;exports.abytes=Xt;exports.add=Sn;exports.add3H=Mf;exports.add3L=Lf;exports.addChainId=v8;exports.addFixedValues=A1;exports.addFrom=R8;exports.aexists=Rr;exports.ahash=vf;exports.amountItem=qe;exports.anumber=ss;exports.aoutput=Xc;exports.applyChainsConfigConfigOverrides=GE;exports.assert=kn;exports.assertArgument=tr;exports.assertArgumentCount=x2;exports.assertNormalize=T2;exports.assertPrivate=D2;exports.asyncLoop=z2;exports.axios=Se;exports.b58=hf;exports.b64=Bo;exports.base58=Ji;exports.bech32=uf;exports.bignum=Us;exports.bitGet=op;exports.bitLen=Xf;exports.bitMask=ci;exports.bnExports=xd;exports.bound=u1;exports.browserExports=Qu;exports.bs58=Bt;exports.bufferPolyfillExports=ce;exports.bytes=Pt;exports.bytes$1=Td;exports.bytesToHex=vr;exports.bytesToNumberBE=ai;exports.canonicalAddress=Fn;exports.chainIdToChain=Zi;exports.chainItem=Ht;exports.chainToChainId=si;exports.chainToPlatform=hn;exports.checkOpts=K2;exports.checkOpts$1=Tb;exports.circleChainId=Cf;exports.circleContractChains=gb;exports.circleContracts=lc;exports.circleDomainItem=os;exports.circleNonceItem=vo;exports.clean=Vn;exports.clusterApiUrl=Zm;exports.commonjsGlobal=an;exports.concat=I2;exports.concatBytes=q2;exports.concatBytes$1=vn;exports.constMap=fe;exports.createBase58check=U1;exports.createHasher=oi;exports.createOptHasher=Db;exports.createView=L2;exports.createView$1=Pi;exports.customizableBytes=Ao;exports.dataLength=F2;exports.dataSlice=k2;exports.dateConversion=g0;exports.decomposeLiteral=E0;exports.defineProperties=Ic;exports.deliveryInstructionLayout=v0;exports.denoise=_1;exports.deserialize=Qr;exports.deserialize$1=pn;exports.display=wo;exports.dist=We;exports.ed25519=Ur;exports.ensureBytes=Je;exports.envelopeLayout=hd;exports.estimateFinalityTime=Vc;exports.executorTokenBridge=dc;exports.executorTokenBridgeChains=pb;exports.exists=Fc;exports.expiration=Hs;exports.filters=bs;exports.fixedChainItem=tg;exports.fixedLengthStringItem=ud;exports.fromBaseUnits=Hn;exports.fromBig=Nf;exports.getAddress=Br;exports.getAugmentedNamespace=Wc;exports.getBytes=Mr;exports.getBytesCopy=R2;exports.getDefaultExportFromCjs=ni;exports.getMinHashLength=od;exports.getTokenByAddress=hg;exports.getTokenDetails=g2;exports.guardianAttestationEta=Yc;exports.guardianSetItem=ld;exports.hash=U2;exports.headerLayout=fd;exports.hex=wt;exports.hexToBytes=_o;exports.hexlify=fi;exports.hmac=nd;exports.index_browser_esm=pS;exports.isAddressable=Oh;exports.isAttested=es;exports.isAutomatic=y2;exports.isAxiosError=VE;exports.isBytes=xo;exports.isBytesLike=v2;exports.isCallException=B2;exports.isChain=ii;exports.isCompleted=i2;exports.isDestinationQueued=s2;exports.isEqualCaseInsensitive=pf;exports.isError=hh;exports.isFailed=ah;exports.isFinalizable=w2;exports.isHash=cp;exports.isHexString=_d;exports.isManual=E2;exports.isNative=Lt;exports.isRedeemed=Cd;exports.isRefunded=r2;exports.isSameToken=w0;exports.isSignAndSendSigner=pd;exports.isSignOnlySigner=B0;exports.isSourceFinalized=Xs;exports.isSourceInitiated=Sd;exports.isTokenId=ko;exports.isVersionedProtocolInitializer=Xp;exports.isWormholeMessageId=Sr;exports.kdfInputToBytes=_b;exports.keccak256=As;exports.keccak_256=$s;exports.makeError=mh;exports.mapHashToField=r0;exports.median=a1;exports.memoized=Vs;exports.mod=Ze;exports.nativeDecimals=Ef;exports.nativeTokenId=bd;exports.networkChainToNativeChainId=Sf;exports.networkPlatformConfigs=oh;exports.normalizeZ=ad;exports.notImplemented=dp;exports.number=Js;exports.output=gh;exports.parse=Oi;exports.payloadIdItem=Gn;exports.payloadLiteralToPayloadItemLayout=A0;exports.platformNativeChainIdToNetworkChain=Z1;exports.porticoContractChains=yb;exports.protocolIsRegistered=Zp;exports.randomBytes=V2;exports.randomBytes$1=Zc;exports.registerNative=dd;exports.registerPayloadTypes=yt;exports.registerProtocol=Jp;exports.relayInstructionsLayout=F0;exports.requireBufferPolyfill=ls;exports.resolveAddress=_8;exports.resolveProperties=C2;exports.resolveWrappedToken=S0;exports.retry=Lr;exports.rotl=Sb;exports.rotr=M2;exports.rotr32H=Fb;exports.rotr32L=kb;exports.rotrBH=ks;exports.rotrBL=Os;exports.rotrSH=cr;exports.rotrSL=dr;exports.rpcAddress=Af;exports.safeBufferExports=uh;exports.scale=Vr;exports.secp256k1=Qn;exports.sequenceItem=Io;exports.serialize=bn;exports.serialize$1=Wi;exports.serializePayload=ag;exports.sha256=Qi;exports.sha256$1=ed;exports.sha3_256=rp;exports.sha512=sp;exports.sha512$1=td;exports.signSendWait=Ys;exports.signatureItem=no;exports.signedQuoteLayout=k0;exports.stringConversion=y0;exports.supportsIndexerUtils=cg;exports.swap32IfBE=uc;exports.swap8IfBE=Cb;exports.tbtc=Mi;exports.toBytes=Dd;exports.toBytes$1=ps;exports.toChain=ms;exports.toChainId=fn;exports.toCircleChain=Li;exports.toNative=or;exports.toUniversal=m0;exports.tokenBridgeChains=mb;exports.tokenBridgeRelayerChains=bb;exports.truncate=Ni;exports.u32$1=Eh;exports.u32$2=If;exports.u64=d8;exports.units=Dt;exports.universalAddress=pg;exports.universalAddressItem=be;exports.unusedArbiterFee=D8;exports.unusedNonce=T8;exports.usdcContract=Ls;exports.utf8ToBytes=Jc;exports.version=fh;exports.weierstrass=h0;exports.weierstrassPoints=Bp;exports.whole=Ns;exports.wrapConstructor=wh;exports.zeroPadBytes=N2;exports.zeroPadValue=O2;