@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
@@ -0,0 +1,22 @@
1
+ "use strict";var r1=Object.defineProperty;var s1=(t,e,n)=>e in t?r1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var ie=(t,e,n)=>s1(t,typeof e!="symbol"?e+"":e,n);var cn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ri(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Hc(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 Ie={},ae={},Ao={};Ao.byteLength=a1;Ao.toByteArray=d1;Ao.fromByteArray=f1;var Tn=[],rn=[],i1=typeof Uint8Array<"u"?Uint8Array:Array,Da="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Kr=0,o1=Da.length;Kr<o1;++Kr)Tn[Kr]=Da[Kr],rn[Da.charCodeAt(Kr)]=Kr;rn[45]=62;rn[95]=63;function Xu(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function a1(t){var e=Xu(t),n=e[0],r=e[1];return(n+r)*3/4-r}function c1(t,e,n){return(e+n)*3/4-n}function d1(t){var e,n=Xu(t),r=n[0],s=n[1],i=new i1(c1(t,r,s)),o=0,a=s>0?r-4:r,d;for(d=0;d<a;d+=4)e=rn[t.charCodeAt(d)]<<18|rn[t.charCodeAt(d+1)]<<12|rn[t.charCodeAt(d+2)]<<6|rn[t.charCodeAt(d+3)],i[o++]=e>>16&255,i[o++]=e>>8&255,i[o++]=e&255;return s===2&&(e=rn[t.charCodeAt(d)]<<2|rn[t.charCodeAt(d+1)]>>4,i[o++]=e&255),s===1&&(e=rn[t.charCodeAt(d)]<<10|rn[t.charCodeAt(d+1)]<<4|rn[t.charCodeAt(d+2)]>>2,i[o++]=e>>8&255,i[o++]=e&255),i}function l1(t){return Tn[t>>18&63]+Tn[t>>12&63]+Tn[t>>6&63]+Tn[t&63]}function u1(t,e,n){for(var r,s=[],i=e;i<n;i+=3)r=(t[i]<<16&16711680)+(t[i+1]<<8&65280)+(t[i+2]&255),s.push(l1(r));return s.join("")}function f1(t){for(var e,n=t.length,r=n%3,s=[],i=16383,o=0,a=n-r;o<a;o+=i)s.push(u1(t,o,o+i>a?a:o+i));return r===1?(e=t[n-1],s.push(Tn[e>>2]+Tn[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],s.push(Tn[e>>10]+Tn[e>>4&63]+Tn[e<<2&63]+"=")),s.join("")}var $c={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */$c.read=function(t,e,n,r,s){var i,o,a=s*8-r-1,d=(1<<a)-1,h=d>>1,f=-7,p=n?s-1:0,B=n?-1:1,A=t[e+p];for(p+=B,i=A&(1<<-f)-1,A>>=-f,f+=a;f>0;i=i*256+t[e+p],p+=B,f-=8);for(o=i&(1<<-f)-1,i>>=-f,f+=r;f>0;o=o*256+t[e+p],p+=B,f-=8);if(i===0)i=1-h;else{if(i===d)return o?NaN:(A?-1:1)*(1/0);o=o+Math.pow(2,r),i=i-h}return(A?-1:1)*o*Math.pow(2,i-r)};$c.write=function(t,e,n,r,s,i){var o,a,d,h=i*8-s-1,f=(1<<h)-1,p=f>>1,B=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=r?0:i-1,R=r?1:-1,I=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=f):(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>=f?(a=0,o=f):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+A]=a&255,A+=R,a/=256,s-=8);for(o=o<<s|a,h+=s;h>0;t[n+A]=o&255,A+=R,o/=256,h-=8);t[n+A-R]|=I*128};/*!
2
+ * The buffer module from node.js, for the browser.
3
+ *
4
+ * @author Feross Aboukhadijeh <https://feross.org>
5
+ * @license MIT
6
+ */(function(t){const e=Ao,n=$c,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=k,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 y=new Uint8Array(1),l={foo:function(){return 42}};return Object.setPrototypeOf(l,Uint8Array.prototype),Object.setPrototypeOf(y,l),y.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(y){if(y>s)throw new RangeError('The value "'+y+'" is invalid for option "size"');const l=new Uint8Array(y);return Object.setPrototypeOf(l,a.prototype),l}function a(y,l,u){if(typeof y=="number"){if(typeof l=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(y)}return d(y,l,u)}a.poolSize=8192;function d(y,l,u){if(typeof y=="string")return B(y,l);if(ArrayBuffer.isView(y))return R(y);if(y==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof y);if(Jt(y,ArrayBuffer)||y&&Jt(y.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Jt(y,SharedArrayBuffer)||y&&Jt(y.buffer,SharedArrayBuffer)))return I(y,l,u);if(typeof y=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const T=y.valueOf&&y.valueOf();if(T!=null&&T!==y)return a.from(T,l,u);const N=E(y);if(N)return N;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof y[Symbol.toPrimitive]=="function")return a.from(y[Symbol.toPrimitive]("string"),l,u);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof y)}a.from=function(y,l,u){return d(y,l,u)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function h(y){if(typeof y!="number")throw new TypeError('"size" argument must be of type number');if(y<0)throw new RangeError('The value "'+y+'" is invalid for option "size"')}function f(y,l,u){return h(y),y<=0?o(y):l!==void 0?typeof u=="string"?o(y).fill(l,u):o(y).fill(l):o(y)}a.alloc=function(y,l,u){return f(y,l,u)};function p(y){return h(y),o(y<0?0:w(y)|0)}a.allocUnsafe=function(y){return p(y)},a.allocUnsafeSlow=function(y){return p(y)};function B(y,l){if((typeof l!="string"||l==="")&&(l="utf8"),!a.isEncoding(l))throw new TypeError("Unknown encoding: "+l);const u=_(y,l)|0;let T=o(u);const N=T.write(y,l);return N!==u&&(T=T.slice(0,N)),T}function A(y){const l=y.length<0?0:w(y.length)|0,u=o(l);for(let T=0;T<l;T+=1)u[T]=y[T]&255;return u}function R(y){if(Jt(y,Uint8Array)){const l=new Uint8Array(y);return I(l.buffer,l.byteOffset,l.byteLength)}return A(y)}function I(y,l,u){if(l<0||y.byteLength<l)throw new RangeError('"offset" is outside of buffer bounds');if(y.byteLength<l+(u||0))throw new RangeError('"length" is outside of buffer bounds');let T;return l===void 0&&u===void 0?T=new Uint8Array(y):u===void 0?T=new Uint8Array(y,l):T=new Uint8Array(y,l,u),Object.setPrototypeOf(T,a.prototype),T}function E(y){if(a.isBuffer(y)){const l=w(y.length)|0,u=o(l);return u.length===0||y.copy(u,0,0,l),u}if(y.length!==void 0)return typeof y.length!="number"||We(y.length)?o(0):A(y);if(y.type==="Buffer"&&Array.isArray(y.data))return A(y.data)}function w(y){if(y>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return y|0}function k(y){return+y!=y&&(y=0),a.alloc(+y)}a.isBuffer=function(l){return l!=null&&l._isBuffer===!0&&l!==a.prototype},a.compare=function(l,u){if(Jt(l,Uint8Array)&&(l=a.from(l,l.offset,l.byteLength)),Jt(u,Uint8Array)&&(u=a.from(u,u.offset,u.byteLength)),!a.isBuffer(l)||!a.isBuffer(u))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(l===u)return 0;let T=l.length,N=u.length;for(let W=0,V=Math.min(T,N);W<V;++W)if(l[W]!==u[W]){T=l[W],N=u[W];break}return T<N?-1:N<T?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,u){if(!Array.isArray(l))throw new TypeError('"list" argument must be an Array of Buffers');if(l.length===0)return a.alloc(0);let T;if(u===void 0)for(u=0,T=0;T<l.length;++T)u+=l[T].length;const N=a.allocUnsafe(u);let W=0;for(T=0;T<l.length;++T){let V=l[T];if(Jt(V,Uint8Array))W+V.length>N.length?(a.isBuffer(V)||(V=a.from(V)),V.copy(N,W)):Uint8Array.prototype.set.call(N,V,W);else if(a.isBuffer(V))V.copy(N,W);else throw new TypeError('"list" argument must be an Array of Buffers');W+=V.length}return N};function _(y,l){if(a.isBuffer(y))return y.length;if(ArrayBuffer.isView(y)||Jt(y,ArrayBuffer))return y.byteLength;if(typeof y!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof y);const u=y.length,T=arguments.length>2&&arguments[2]===!0;if(!T&&u===0)return 0;let N=!1;for(;;)switch(l){case"ascii":case"latin1":case"binary":return u;case"utf8":case"utf-8":return Pe(y).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u*2;case"hex":return u>>>1;case"base64":return ze(y).length;default:if(N)return T?-1:Pe(y).length;l=(""+l).toLowerCase(),N=!0}}a.byteLength=_;function U(y,l,u){let T=!1;if((l===void 0||l<0)&&(l=0),l>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,l>>>=0,u<=l))return"";for(y||(y="utf8");;)switch(y){case"hex":return F(this,l,u);case"utf8":case"utf-8":return c(this,l,u);case"ascii":return x(this,l,u);case"latin1":case"binary":return D(this,l,u);case"base64":return C(this,l,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,l,u);default:if(T)throw new TypeError("Unknown encoding: "+y);y=(y+"").toLowerCase(),T=!0}}a.prototype._isBuffer=!0;function O(y,l,u){const T=y[l];y[l]=y[u],y[u]=T}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 u=0;u<l;u+=2)O(this,u,u+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 u=0;u<l;u+=4)O(this,u,u+3),O(this,u+1,u+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 u=0;u<l;u+=8)O(this,u,u+7),O(this,u+1,u+6),O(this,u+2,u+5),O(this,u+3,u+4);return this},a.prototype.toString=function(){const l=this.length;return l===0?"":arguments.length===0?c(this,0,l):U.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 u=t.INSPECT_MAX_BYTES;return l=this.toString("hex",0,u).replace(/(.{2})/g,"$1 ").trim(),this.length>u&&(l+=" ... "),"<Buffer "+l+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(l,u,T,N,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(u===void 0&&(u=0),T===void 0&&(T=l?l.length:0),N===void 0&&(N=0),W===void 0&&(W=this.length),u<0||T>l.length||N<0||W>this.length)throw new RangeError("out of range index");if(N>=W&&u>=T)return 0;if(N>=W)return-1;if(u>=T)return 1;if(u>>>=0,T>>>=0,N>>>=0,W>>>=0,this===l)return 0;let V=W-N,ge=T-u;const he=Math.min(V,ge),ue=this.slice(N,W),Me=l.slice(u,T);for(let le=0;le<he;++le)if(ue[le]!==Me[le]){V=ue[le],ge=Me[le];break}return V<ge?-1:ge<V?1:0};function $(y,l,u,T,N){if(y.length===0)return-1;if(typeof u=="string"?(T=u,u=0):u>2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),u=+u,We(u)&&(u=N?0:y.length-1),u<0&&(u=y.length+u),u>=y.length){if(N)return-1;u=y.length-1}else if(u<0)if(N)u=0;else return-1;if(typeof l=="string"&&(l=a.from(l,T)),a.isBuffer(l))return l.length===0?-1:G(y,l,u,T,N);if(typeof l=="number")return l=l&255,typeof Uint8Array.prototype.indexOf=="function"?N?Uint8Array.prototype.indexOf.call(y,l,u):Uint8Array.prototype.lastIndexOf.call(y,l,u):G(y,[l],u,T,N);throw new TypeError("val must be string, number or Buffer")}function G(y,l,u,T,N){let W=1,V=y.length,ge=l.length;if(T!==void 0&&(T=String(T).toLowerCase(),T==="ucs2"||T==="ucs-2"||T==="utf16le"||T==="utf-16le")){if(y.length<2||l.length<2)return-1;W=2,V/=2,ge/=2,u/=2}function he(Me,le){return W===1?Me[le]:Me.readUInt16BE(le*W)}let ue;if(N){let Me=-1;for(ue=u;ue<V;ue++)if(he(y,ue)===he(l,Me===-1?0:ue-Me)){if(Me===-1&&(Me=ue),ue-Me+1===ge)return Me*W}else Me!==-1&&(ue-=ue-Me),Me=-1}else for(u+ge>V&&(u=V-ge),ue=u;ue>=0;ue--){let Me=!0;for(let le=0;le<ge;le++)if(he(y,ue+le)!==he(l,le)){Me=!1;break}if(Me)return ue}return-1}a.prototype.includes=function(l,u,T){return this.indexOf(l,u,T)!==-1},a.prototype.indexOf=function(l,u,T){return $(this,l,u,T,!0)},a.prototype.lastIndexOf=function(l,u,T){return $(this,l,u,T,!1)};function Y(y,l,u,T){u=Number(u)||0;const N=y.length-u;T?(T=Number(T),T>N&&(T=N)):T=N;const W=l.length;T>W/2&&(T=W/2);let V;for(V=0;V<T;++V){const ge=parseInt(l.substr(V*2,2),16);if(We(ge))return V;y[u+V]=ge}return V}function M(y,l,u,T){return Le(Pe(l,y.length-u),y,u,T)}function j(y,l,u,T){return Le(Ve(l),y,u,T)}function P(y,l,u,T){return Le(ze(l),y,u,T)}function q(y,l,u,T){return Le(Ai(l,y.length-u),y,u,T)}a.prototype.write=function(l,u,T,N){if(u===void 0)N="utf8",T=this.length,u=0;else if(T===void 0&&typeof u=="string")N=u,T=this.length,u=0;else if(isFinite(u))u=u>>>0,isFinite(T)?(T=T>>>0,N===void 0&&(N="utf8")):(N=T,T=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const W=this.length-u;if((T===void 0||T>W)&&(T=W),l.length>0&&(T<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");N||(N="utf8");let V=!1;for(;;)switch(N){case"hex":return Y(this,l,u,T);case"utf8":case"utf-8":return M(this,l,u,T);case"ascii":case"latin1":case"binary":return j(this,l,u,T);case"base64":return P(this,l,u,T);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,l,u,T);default:if(V)throw new TypeError("Unknown encoding: "+N);N=(""+N).toLowerCase(),V=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(y,l,u){return l===0&&u===y.length?e.fromByteArray(y):e.fromByteArray(y.slice(l,u))}function c(y,l,u){u=Math.min(y.length,u);const T=[];let N=l;for(;N<u;){const W=y[N];let V=null,ge=W>239?4:W>223?3:W>191?2:1;if(N+ge<=u){let he,ue,Me,le;switch(ge){case 1:W<128&&(V=W);break;case 2:he=y[N+1],(he&192)===128&&(le=(W&31)<<6|he&63,le>127&&(V=le));break;case 3:he=y[N+1],ue=y[N+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=y[N+1],ue=y[N+2],Me=y[N+3],(he&192)===128&&(ue&192)===128&&(Me&192)===128&&(le=(W&15)<<18|(he&63)<<12|(ue&63)<<6|Me&63,le>65535&&le<1114112&&(V=le))}}V===null?(V=65533,ge=1):V>65535&&(V-=65536,T.push(V>>>10&1023|55296),V=56320|V&1023),T.push(V),N+=ge}return g(T)}const b=4096;function g(y){const l=y.length;if(l<=b)return String.fromCharCode.apply(String,y);let u="",T=0;for(;T<l;)u+=String.fromCharCode.apply(String,y.slice(T,T+=b));return u}function x(y,l,u){let T="";u=Math.min(y.length,u);for(let N=l;N<u;++N)T+=String.fromCharCode(y[N]&127);return T}function D(y,l,u){let T="";u=Math.min(y.length,u);for(let N=l;N<u;++N)T+=String.fromCharCode(y[N]);return T}function F(y,l,u){const T=y.length;(!l||l<0)&&(l=0),(!u||u<0||u>T)&&(u=T);let N="";for(let W=l;W<u;++W)N+=je[y[W]];return N}function L(y,l,u){const T=y.slice(l,u);let N="";for(let W=0;W<T.length-1;W+=2)N+=String.fromCharCode(T[W]+T[W+1]*256);return N}a.prototype.slice=function(l,u){const T=this.length;l=~~l,u=u===void 0?T:~~u,l<0?(l+=T,l<0&&(l=0)):l>T&&(l=T),u<0?(u+=T,u<0&&(u=0)):u>T&&(u=T),u<l&&(u=l);const N=this.subarray(l,u);return Object.setPrototypeOf(N,a.prototype),N};function S(y,l,u){if(y%1!==0||y<0)throw new RangeError("offset is not uint");if(y+l>u)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(l,u,T){l=l>>>0,u=u>>>0,T||S(l,u,this.length);let N=this[l],W=1,V=0;for(;++V<u&&(W*=256);)N+=this[l+V]*W;return N},a.prototype.readUintBE=a.prototype.readUIntBE=function(l,u,T){l=l>>>0,u=u>>>0,T||S(l,u,this.length);let N=this[l+--u],W=1;for(;u>0&&(W*=256);)N+=this[l+--u]*W;return N},a.prototype.readUint8=a.prototype.readUInt8=function(l,u){return l=l>>>0,u||S(l,1,this.length),this[l]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(l,u){return l=l>>>0,u||S(l,2,this.length),this[l]|this[l+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(l,u){return l=l>>>0,u||S(l,2,this.length),this[l]<<8|this[l+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(l,u){return l=l>>>0,u||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,u){return l=l>>>0,u||S(l,4,this.length),this[l]*16777216+(this[l+1]<<16|this[l+2]<<8|this[l+3])},a.prototype.readBigUInt64LE=un(function(l){l=l>>>0,tn(l,"offset");const u=this[l],T=this[l+7];(u===void 0||T===void 0)&&ke(l,this.length-8);const N=u+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24,W=this[++l]+this[++l]*2**8+this[++l]*2**16+T*2**24;return BigInt(N)+(BigInt(W)<<BigInt(32))}),a.prototype.readBigUInt64BE=un(function(l){l=l>>>0,tn(l,"offset");const u=this[l],T=this[l+7];(u===void 0||T===void 0)&&ke(l,this.length-8);const N=u*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+T;return(BigInt(N)<<BigInt(32))+BigInt(W)}),a.prototype.readIntLE=function(l,u,T){l=l>>>0,u=u>>>0,T||S(l,u,this.length);let N=this[l],W=1,V=0;for(;++V<u&&(W*=256);)N+=this[l+V]*W;return W*=128,N>=W&&(N-=Math.pow(2,8*u)),N},a.prototype.readIntBE=function(l,u,T){l=l>>>0,u=u>>>0,T||S(l,u,this.length);let N=u,W=1,V=this[l+--N];for(;N>0&&(W*=256);)V+=this[l+--N]*W;return W*=128,V>=W&&(V-=Math.pow(2,8*u)),V},a.prototype.readInt8=function(l,u){return l=l>>>0,u||S(l,1,this.length),this[l]&128?(255-this[l]+1)*-1:this[l]},a.prototype.readInt16LE=function(l,u){l=l>>>0,u||S(l,2,this.length);const T=this[l]|this[l+1]<<8;return T&32768?T|4294901760:T},a.prototype.readInt16BE=function(l,u){l=l>>>0,u||S(l,2,this.length);const T=this[l+1]|this[l]<<8;return T&32768?T|4294901760:T},a.prototype.readInt32LE=function(l,u){return l=l>>>0,u||S(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},a.prototype.readInt32BE=function(l,u){return l=l>>>0,u||S(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},a.prototype.readBigInt64LE=un(function(l){l=l>>>0,tn(l,"offset");const u=this[l],T=this[l+7];(u===void 0||T===void 0)&&ke(l,this.length-8);const N=this[l+4]+this[l+5]*2**8+this[l+6]*2**16+(T<<24);return(BigInt(N)<<BigInt(32))+BigInt(u+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24)}),a.prototype.readBigInt64BE=un(function(l){l=l>>>0,tn(l,"offset");const u=this[l],T=this[l+7];(u===void 0||T===void 0)&&ke(l,this.length-8);const N=(u<<24)+this[++l]*2**16+this[++l]*2**8+this[++l];return(BigInt(N)<<BigInt(32))+BigInt(this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+T)}),a.prototype.readFloatLE=function(l,u){return l=l>>>0,u||S(l,4,this.length),n.read(this,l,!0,23,4)},a.prototype.readFloatBE=function(l,u){return l=l>>>0,u||S(l,4,this.length),n.read(this,l,!1,23,4)},a.prototype.readDoubleLE=function(l,u){return l=l>>>0,u||S(l,8,this.length),n.read(this,l,!0,52,8)},a.prototype.readDoubleBE=function(l,u){return l=l>>>0,u||S(l,8,this.length),n.read(this,l,!1,52,8)};function m(y,l,u,T,N,W){if(!a.isBuffer(y))throw new TypeError('"buffer" argument must be a Buffer instance');if(l>N||l<W)throw new RangeError('"value" argument is out of bounds');if(u+T>y.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(l,u,T,N){if(l=+l,u=u>>>0,T=T>>>0,!N){const ge=Math.pow(2,8*T)-1;m(this,l,u,T,ge,0)}let W=1,V=0;for(this[u]=l&255;++V<T&&(W*=256);)this[u+V]=l/W&255;return u+T},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(l,u,T,N){if(l=+l,u=u>>>0,T=T>>>0,!N){const ge=Math.pow(2,8*T)-1;m(this,l,u,T,ge,0)}let W=T-1,V=1;for(this[u+W]=l&255;--W>=0&&(V*=256);)this[u+W]=l/V&255;return u+T},a.prototype.writeUint8=a.prototype.writeUInt8=function(l,u,T){return l=+l,u=u>>>0,T||m(this,l,u,1,255,0),this[u]=l&255,u+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(l,u,T){return l=+l,u=u>>>0,T||m(this,l,u,2,65535,0),this[u]=l&255,this[u+1]=l>>>8,u+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(l,u,T){return l=+l,u=u>>>0,T||m(this,l,u,2,65535,0),this[u]=l>>>8,this[u+1]=l&255,u+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(l,u,T){return l=+l,u=u>>>0,T||m(this,l,u,4,4294967295,0),this[u+3]=l>>>24,this[u+2]=l>>>16,this[u+1]=l>>>8,this[u]=l&255,u+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(l,u,T){return l=+l,u=u>>>0,T||m(this,l,u,4,4294967295,0),this[u]=l>>>24,this[u+1]=l>>>16,this[u+2]=l>>>8,this[u+3]=l&255,u+4};function v(y,l,u,T,N){Ue(l,T,N,y,u,7);let W=Number(l&BigInt(4294967295));y[u++]=W,W=W>>8,y[u++]=W,W=W>>8,y[u++]=W,W=W>>8,y[u++]=W;let V=Number(l>>BigInt(32)&BigInt(4294967295));return y[u++]=V,V=V>>8,y[u++]=V,V=V>>8,y[u++]=V,V=V>>8,y[u++]=V,u}function se(y,l,u,T,N){Ue(l,T,N,y,u,7);let W=Number(l&BigInt(4294967295));y[u+7]=W,W=W>>8,y[u+6]=W,W=W>>8,y[u+5]=W,W=W>>8,y[u+4]=W;let V=Number(l>>BigInt(32)&BigInt(4294967295));return y[u+3]=V,V=V>>8,y[u+2]=V,V=V>>8,y[u+1]=V,V=V>>8,y[u]=V,u+8}a.prototype.writeBigUInt64LE=un(function(l,u=0){return v(this,l,u,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=un(function(l,u=0){return se(this,l,u,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(l,u,T,N){if(l=+l,u=u>>>0,!N){const he=Math.pow(2,8*T-1);m(this,l,u,T,he-1,-he)}let W=0,V=1,ge=0;for(this[u]=l&255;++W<T&&(V*=256);)l<0&&ge===0&&this[u+W-1]!==0&&(ge=1),this[u+W]=(l/V>>0)-ge&255;return u+T},a.prototype.writeIntBE=function(l,u,T,N){if(l=+l,u=u>>>0,!N){const he=Math.pow(2,8*T-1);m(this,l,u,T,he-1,-he)}let W=T-1,V=1,ge=0;for(this[u+W]=l&255;--W>=0&&(V*=256);)l<0&&ge===0&&this[u+W+1]!==0&&(ge=1),this[u+W]=(l/V>>0)-ge&255;return u+T},a.prototype.writeInt8=function(l,u,T){return l=+l,u=u>>>0,T||m(this,l,u,1,127,-128),l<0&&(l=255+l+1),this[u]=l&255,u+1},a.prototype.writeInt16LE=function(l,u,T){return l=+l,u=u>>>0,T||m(this,l,u,2,32767,-32768),this[u]=l&255,this[u+1]=l>>>8,u+2},a.prototype.writeInt16BE=function(l,u,T){return l=+l,u=u>>>0,T||m(this,l,u,2,32767,-32768),this[u]=l>>>8,this[u+1]=l&255,u+2},a.prototype.writeInt32LE=function(l,u,T){return l=+l,u=u>>>0,T||m(this,l,u,4,2147483647,-2147483648),this[u]=l&255,this[u+1]=l>>>8,this[u+2]=l>>>16,this[u+3]=l>>>24,u+4},a.prototype.writeInt32BE=function(l,u,T){return l=+l,u=u>>>0,T||m(this,l,u,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),this[u]=l>>>24,this[u+1]=l>>>16,this[u+2]=l>>>8,this[u+3]=l&255,u+4},a.prototype.writeBigInt64LE=un(function(l,u=0){return v(this,l,u,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=un(function(l,u=0){return se(this,l,u,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function J(y,l,u,T,N,W){if(u+T>y.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function ee(y,l,u,T,N){return l=+l,u=u>>>0,N||J(y,l,u,4),n.write(y,l,u,T,23,4),u+4}a.prototype.writeFloatLE=function(l,u,T){return ee(this,l,u,!0,T)},a.prototype.writeFloatBE=function(l,u,T){return ee(this,l,u,!1,T)};function Te(y,l,u,T,N){return l=+l,u=u>>>0,N||J(y,l,u,8),n.write(y,l,u,T,52,8),u+8}a.prototype.writeDoubleLE=function(l,u,T){return Te(this,l,u,!0,T)},a.prototype.writeDoubleBE=function(l,u,T){return Te(this,l,u,!1,T)},a.prototype.copy=function(l,u,T,N){if(!a.isBuffer(l))throw new TypeError("argument should be a Buffer");if(T||(T=0),!N&&N!==0&&(N=this.length),u>=l.length&&(u=l.length),u||(u=0),N>0&&N<T&&(N=T),N===T||l.length===0||this.length===0)return 0;if(u<0)throw new RangeError("targetStart out of bounds");if(T<0||T>=this.length)throw new RangeError("Index out of range");if(N<0)throw new RangeError("sourceEnd out of bounds");N>this.length&&(N=this.length),l.length-u<N-T&&(N=l.length-u+T);const W=N-T;return this===l&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(u,T,N):Uint8Array.prototype.set.call(l,this.subarray(T,N),u),W},a.prototype.fill=function(l,u,T,N){if(typeof l=="string"){if(typeof u=="string"?(N=u,u=0,T=this.length):typeof T=="string"&&(N=T,T=this.length),N!==void 0&&typeof N!="string")throw new TypeError("encoding must be a string");if(typeof N=="string"&&!a.isEncoding(N))throw new TypeError("Unknown encoding: "+N);if(l.length===1){const V=l.charCodeAt(0);(N==="utf8"&&V<128||N==="latin1")&&(l=V)}}else typeof l=="number"?l=l&255:typeof l=="boolean"&&(l=Number(l));if(u<0||this.length<u||this.length<T)throw new RangeError("Out of range index");if(T<=u)return this;u=u>>>0,T=T===void 0?this.length:T>>>0,l||(l=0);let W;if(typeof l=="number")for(W=u;W<T;++W)this[W]=l;else{const V=a.isBuffer(l)?l:a.from(l,N),ge=V.length;if(ge===0)throw new TypeError('The value "'+l+'" is invalid for argument "value"');for(W=0;W<T-u;++W)this[W+u]=V[W%ge]}return this};const de={};function pe(y,l,u){de[y]=class extends u{constructor(){super(),Object.defineProperty(this,"message",{value:l.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${y}]`,this.stack,delete this.name}get code(){return y}set code(N){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:N,writable:!0})}toString(){return`${this.name} [${y}]: ${this.message}`}}}pe("ERR_BUFFER_OUT_OF_BOUNDS",function(y){return y?`${y} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),pe("ERR_INVALID_ARG_TYPE",function(y,l){return`The "${y}" argument must be of type number. Received type ${typeof l}`},TypeError),pe("ERR_OUT_OF_RANGE",function(y,l,u){let T=`The value of "${y}" is out of range.`,N=u;return Number.isInteger(u)&&Math.abs(u)>2**32?N=ln(String(u)):typeof u=="bigint"&&(N=String(u),(u>BigInt(2)**BigInt(32)||u<-(BigInt(2)**BigInt(32)))&&(N=ln(N)),N+="n"),T+=` It must be ${l}. Received ${N}`,T},RangeError);function ln(y){let l="",u=y.length;const T=y[0]==="-"?1:0;for(;u>=T+4;u-=3)l=`_${y.slice(u-3,u)}${l}`;return`${y.slice(0,u)}${l}`}function Ce(y,l,u){tn(l,"offset"),(y[l]===void 0||y[l+u]===void 0)&&ke(l,y.length-(u+1))}function Ue(y,l,u,T,N,W){if(y>u||y<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,y)}Ce(T,N,W)}function tn(y,l){if(typeof y!="number")throw new de.ERR_INVALID_ARG_TYPE(l,"number",y)}function ke(y,l,u){throw Math.floor(y)!==y?(tn(y,u),new de.ERR_OUT_OF_RANGE("offset","an integer",y)):l<0?new de.ERR_BUFFER_OUT_OF_BOUNDS:new de.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${l}`,y)}const Ke=/[^+/0-9A-Za-z-_]/g;function Ei(y){if(y=y.split("=")[0],y=y.trim().replace(Ke,""),y.length<2)return"";for(;y.length%4!==0;)y=y+"=";return y}function Pe(y,l){l=l||1/0;let u;const T=y.length;let N=null;const W=[];for(let V=0;V<T;++V){if(u=y.charCodeAt(V),u>55295&&u<57344){if(!N){if(u>56319){(l-=3)>-1&&W.push(239,191,189);continue}else if(V+1===T){(l-=3)>-1&&W.push(239,191,189);continue}N=u;continue}if(u<56320){(l-=3)>-1&&W.push(239,191,189),N=u;continue}u=(N-55296<<10|u-56320)+65536}else N&&(l-=3)>-1&&W.push(239,191,189);if(N=null,u<128){if((l-=1)<0)break;W.push(u)}else if(u<2048){if((l-=2)<0)break;W.push(u>>6|192,u&63|128)}else if(u<65536){if((l-=3)<0)break;W.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((l-=4)<0)break;W.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw new Error("Invalid code point")}return W}function Ve(y){const l=[];for(let u=0;u<y.length;++u)l.push(y.charCodeAt(u)&255);return l}function Ai(y,l){let u,T,N;const W=[];for(let V=0;V<y.length&&!((l-=2)<0);++V)u=y.charCodeAt(V),T=u>>8,N=u%256,W.push(N),W.push(T);return W}function ze(y){return e.toByteArray(Ei(y))}function Le(y,l,u,T){let N;for(N=0;N<T&&!(N+u>=l.length||N>=y.length);++N)l[N+u]=y[N];return N}function Jt(y,l){return y instanceof l||y!=null&&y.constructor!=null&&y.constructor.name!=null&&y.constructor.name===l.name}function We(y){return y!==y}const je=function(){const y="0123456789abcdef",l=new Array(256);for(let u=0;u<16;++u){const T=u*16;for(let N=0;N<16;++N)l[T+N]=y[u]+y[N]}return l}();function un(y){return typeof BigInt>"u"?Ge:y}function Ge(){throw new Error("BigInt not supported")}})(ae);var Ju={exports:{}},et=Ju.exports={},xn,_n;function tc(){throw new Error("setTimeout has not been defined")}function nc(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?xn=setTimeout:xn=tc}catch{xn=tc}try{typeof clearTimeout=="function"?_n=clearTimeout:_n=nc}catch{_n=nc}})();function Zu(t){if(xn===setTimeout)return setTimeout(t,0);if((xn===tc||!xn)&&setTimeout)return xn=setTimeout,setTimeout(t,0);try{return xn(t,0)}catch{try{return xn.call(null,t,0)}catch{return xn.call(this,t,0)}}}function h1(t){if(_n===clearTimeout)return clearTimeout(t);if((_n===nc||!_n)&&clearTimeout)return _n=clearTimeout,clearTimeout(t);try{return _n(t)}catch{try{return _n.call(null,t)}catch{return _n.call(this,t)}}}var jn=[],es=!1,gr,vi=-1;function m1(){!es||!gr||(es=!1,gr.length?jn=gr.concat(jn):vi=-1,jn.length&&Qu())}function Qu(){if(!es){var t=Zu(m1);es=!0;for(var e=jn.length;e;){for(gr=jn,jn=[];++vi<e;)gr&&gr[vi].run();vi=-1,e=jn.length}gr=null,es=!1,h1(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];jn.push(new ef(t,e)),jn.length===1&&!es&&Zu(Qu)};function ef(t,e){this.fun=t,this.array=e}ef.prototype.run=function(){this.fun.apply(null,this.array)};et.title="browser";et.browser=!0;et.env={};et.argv=[];et.version="";et.versions={};function Yn(){}et.on=Yn;et.addListener=Yn;et.once=Yn;et.off=Yn;et.removeListener=Yn;et.removeAllListeners=Yn;et.emit=Yn;et.prependListener=Yn;et.prependOnceListener=Yn;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 tf=Ju.exports;(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=ae,n=tf,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})(Ie);const ji=t=>[...Array(t).keys()],nf=(t,e)=>t.map(n=>n[e]),yr=t=>ji(t[0].length).map(e=>ji(t.length).map(n=>t[n][e])),b1=(t,e,n)=>{const r=new Set(Array.isArray(e)?e:[e]);return t.filter((s,i)=>r.has(i)!==n)};function p1(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 g1(t){return["string","number","symbol","bigint","boolean"].includes(typeof t)}const hl=t=>t.length===2&&!Array.isArray(t[0])&&Array.isArray(t[1]),Gi=t=>t.length===0?[]:Array.isArray(t[0])?t.map(([e,n])=>Array.isArray(n)?(hl(n)?Gi(n):n).map(r=>[e,r].flat()):[[e,n]]).flat():hl(t)?Gi(t[1]).map(e=>[t[0],e]):t,y1=(t,e)=>{const n=Gi(t);if(n.length===0)throw new Error("Invalid mapping: empty");const r=e===void 0?[ji(n[0].length-1),[n[0].length-1]]:e.map(B=>typeof B=="number"?[B]:B);let s=[],i=!0;const o=(B,A)=>{const R=Array.from(new Set(B[0]).values()),I=new Map(R.map(w=>[w,[]]));for(const[w,k]of B[0].entries())I.get(k).push(w);if(B.length===1){const w=Object.fromEntries(R.map(k=>[k,I.get(k).map(_=>A[_].length===1?A[_][0]:A[_])]));if(i){for(const k of I.values())if(k.length>1)return i=!1,w;s.push(w)}return w}const E=yr(B.slice(1));return Object.fromEntries(R.map(w=>{const k=I.get(w),_=yr(k.map(O=>E[O])),U=k.map(O=>A[O]);return[w,o(_,U)]}))},a=yr(n),d=B=>{const A=a[B];if(A===void 0)throw new Error(`Invalid shape: column ${B} does not exist`);return A},[h,f]=r.map(B=>B.map(A=>d(A)));if(h.length===0)throw new Error("Invalid shape: empty key set");if(f.length===0)throw new Error("Invalid shape: empty value set");for(const B of h)for(const A of B)if(!g1(A))throw new Error(`Invalid key: ${A} in ${B}`);const p=o(h,yr(f));if(i)for(const B of s)for(const A of Object.keys(B))B[A]=B[A][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(y1(t,e))}function qc(t){let e=null;return()=>(e||(e=t()),e)}function E1(t){try{return t(),!1}catch{return!0}}function A1(t,e,n){return t<e?e:t>n?n:t}var w1=["int","uint","bytes","array","switch"],rf="big",wo=6,Rr=t=>typeof t=="number"||typeof t=="bigint",hs=t=>t instanceof Uint8Array,S1=t=>Rr(t)||hs(t),Hs=t=>w1.includes(t==null?void 0:t.binary),C1=t=>Hs(t)||Array.isArray(t)&&t.every(Hs),B1=t=>typeof(t==null?void 0:t.from)=="number",x1=t=>typeof(t==null?void 0:t.from)=="bigint",_1=t=>B1(t)||x1(t),ms=t=>hs(t==null?void 0:t.from),T1=t=>_1(t)||ms(t),sf=(t,e)=>{if(t!==e)throw new Error(`size mismatch: layout size: ${t}, data size: ${e}`);return e},is=t=>"layout"in t&&t.layout!==void 0,rc=(t,e)=>"size"in t&&t.size!==void 0?sf(t.size,e):e,sc=(t,e)=>{if(t!=e)throw new Error(`value mismatch: (constant) layout value: ${t}, data value: ${e}`)},ic=(t,e,n)=>{const r=(h,f)=>f===void 0?[0,h.length]:Array.isArray(f)?f:[f,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;sf(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 of(t,e){const n=e[t.idTag??"id"];return t.layouts.find(([r])=>(Array.isArray(r)?r[1]:r)==n)}function af(t){return fr(t,sn)}var sn=Symbol("staticCalc");function D1(t,e){const n=[],r=fr(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 ml(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===sn)return t.size;const s="lengthSize"in t?t.lengthSize|0:0;if(is(t)){const{custom:o}=t,a=fr(t.layout,o===void 0?e:typeof o.from=="function"?e!==sn?r(o.from(e)):sn:o.from,n);return a===null?"size"in t?t.size??null:null:s+rc(t,a)}const{custom:i}=t;return hs(i)?s+i.length:ms(i)?s+i.from.length:e===sn?null:s+rc(t,i!==void 0?r(i.from(e)).length:e.length)}case"array":{const s="length"in t?t.length:void 0;if(e===sn){if(s!==void 0){const o=fr(t.layout,sn,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=fr(t.layout,e[o],n);if(a===null)return null;i+=a}return i}case"switch":{if(e!==sn){const[i,o]=of(t,e),a=fr(o,e,n);return a!==null?t.idSize+a:null}let s=null;for(const[i,o]of t.layouts){const a=fr(o,sn,n);if(s===null)s=a;else if(a!==s)return null}return t.idSize+s}}}function fr(t,e,n){if(Hs(t))return ml(t,e,n);let r=0;for(const s of t){let i;if(e===sn)i=sn;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=ml(s,i,n);if(o===null){if(e!==sn)throw new Error(`coding error: couldn't calculate size for layout item: ${s.name}`);return null}r+=o}return r}var Ra=(t,e)=>{t.bytes.set(e,t.offset),t.offset+=e.length},bl=t=>t.bytesConversions[t.position++];function pn(t,e,n){const[r,s]=D1(t,e),i={bytes:new Uint8Array(r),offset:0};if(Ii(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 pl=2**(wo*8);function Er(t,e,n,r=rf,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>wo){if(t>=pl)throw new Error(`Value ${t} is too large to be safely converted into an integer`);if(s&&t<-pl)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 Ii(t,e,n,r){if(Hs(t))gl(t,e,n,r);else for(const s of t)try{gl(s,e[s.name],n,r)}catch(i){throw i.message=`when serializing item '${s.name}': ${i.message}`,i}}function gl(t,e,n,r){switch(t.binary){case"int":case"uint":{const s=(()=>{var i;return Rr(t.custom)?("omit"in t&&t.omit||sc(t.custom,e),t.custom):Rr((i=t==null?void 0:t.custom)==null?void 0:i.from)?t.custom.from:t.custom!==void 0?t.custom.from(e):e})();Er(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),is(t)){const{custom:i}=t;let o;i===void 0?o=e:typeof i.from!="function"?o=i.from:o=bl(r),Ii(t.layout,o,n,r)}else{const{custom:i}=t;hs(i)?("omit"in t&&t.omit||ic(i,e),Ra(n,i)):ms(i)?Ra(n,i.from):Ra(n,i!==void 0?bl(r):e)}if("lengthSize"in t&&t.lengthSize!==void 0){const i=n.offset-s-t.lengthSize,o=n.offset;n.offset=s,Er(i,t.lengthSize,n,t.lengthEndianness),n.offset=o}else rc(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&&Er(e.length,t.lengthSize,n,t.lengthEndianness);for(let s=0;s<e.length;++s)Ii(t.layout,e[s],n,r);break}case"switch":{const[s,i]=of(t,e),o=Array.isArray(s)?s[0]:s;Er(o,t.idSize,n,t.idEndianness),Ii(i,e,n,r);break}}}function cf(t){const e=t.custom;if(!("cachedSerializedFrom"in e)&&(e.cachedSerializedFrom=pn(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 gn(t,e,n){const r=n??!0,s={bytes:e,offset:0,end:e.length},i=ks(t,s);if(r&&s.offset!==s.end)throw new Error(`encoded data is longer than expected: ${s.end} > ${s.offset}`);return r?i:[i,s.offset]}function Fi(t,e){const n=t.offset+e;if(n>t.end)throw new Error(`chunk is shorter than expected: ${t.end} < ${n}`);t.offset=n}function ks(t,e){if(!Array.isArray(t))return yl(t,e);let n={};for(const r of t)try{(r.omit?{}:n)[r.name]=yl(r,e)}catch(s){throw s.message=`when deserializing item '${r.name}': ${s.message}`,s}return n}function wi(t,e,n=rf,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)),Fi(t,e),e>wo?s:Number(s)}function yl(t,e){switch(t.binary){case"int":case"uint":{const n=wi(e,t.size,t.endianness,t.binary==="int"),{custom:r}=t;return Rr(r)?(sc(r,n),r):Rr(r==null?void 0:r.from)?(sc(r.from,n),r.to):r!==void 0?r.to(n):n}case"bytes":{const n="lengthSize"in t&&t.lengthSize!==void 0?wi(e,t.lengthSize,t.lengthEndianness):t==null?void 0:t.size;if(is(t)){const{custom:a}=t,d=e.offset;let h;if(n===void 0)h=ks(t.layout,e);else{const f={...e,end:e.offset+n};if(Fi(e,n),h=ks(t.layout,f),f.offset!==f.end)throw new Error(`read less data than expected: ${f.offset-e.offset} < ${n}`)}return a!==void 0?typeof a.from!="function"?(ic(cf(t),e.bytes,{dataSlice:[d,e.offset]}),a.to):a.to(h):h}const{custom:r}=t;{let a,d;if(hs(r)?a=r:ms(r)&&(a=r.from,d=r.to),a!==void 0){const h=n??a.length,f=e.bytes.subarray(e.offset,e.offset+h);return ic(a,f),Fi(e,h),d??a}}const s=e.offset,i=n!==void 0?e.offset+n:e.end;Fi(e,i-s);const o=e.bytes.subarray(s,i);return r!==void 0?r.to(o):o}case"array":{let n=[];const{layout:r}=t,s=()=>{const o=ks(r,e);n.push(o)};let i=null;if("length"in t&&t.length!==void 0?i=t.length:"lengthSize"in t&&t.lengthSize!==void 0&&(i=wi(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=wi(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=ks(a,e);return{[t.idTag??"id"]:s?n:o[1],...d}}}}function R1(t,e){return ki(t,e)}function El(t,e){switch(t.binary){case"bytes":if(is(t)){const{custom:n}=t;return n===void 0||typeof n.from!="function"?ki(t.layout,n?n.from:e):e}case"int":case"uint":{const{custom:n}=t;return t!=null&&t.omit?void 0:S1(n)?n:T1(n)?n.to:e}case"array":return Array.isArray(e)?e.map(n=>ki(t.layout,n)):void 0;case"switch":{const n=e[t.idTag??"id"],[r,s]=t.layouts.find(([i])=>(Array.isArray(i)?i[1]:i)==n);return{[t.idTag??"id"]:n,...ki(s,e)}}}}function ki(t,e){if(e=e??{},Hs(t))return El(t,e);const n={};for(const r of t){const s=El(r,e[r.name]??{});s!==void 0&&(n[r.name]=s)}return n}function v1(t,e){const[n,r]=F1(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 oc(t){return t.reduce((e,n)=>e|BigInt(1)<<BigInt(n),BigInt(0))}function Si(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 Al=t=>t>0?2**(8*t)-1:1/0;function wl(t,e,n){var r;switch(t.binary){case"int":case"uint":{const s=Rr(t.custom)?t.custom:Rr((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};Er(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(is(t)){const{custom:d}=t;if(d!==void 0&&typeof d.from!="function")i=cf(t),o=i.length;else{const h=af(t.layout);h!==null&&(o=h)}}else{const{custom:d}=t;hs(d)?(i=d,o=d.length):ms(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;Er(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(is(t)){const d=Oi(t.layout,e,n);return a??[s+d[0],s+d[1]]}return a??[s,Al(s)]}case"array":{if("length"in t){let i=[];const o=Oi(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,Al(s)]}case"switch":{const s=t.layouts.map(d=>[]),{idSize:i,idEndianness:o}=t,a=t.layouts.map(([d,h],f)=>{const p=Array.isArray(d)?d[0]:d;if(e!==null){const A={bytes:new Uint8Array(i),offset:0};Er(p,i,A,o),s[f].push([0,A.bytes])}const B=Oi(h,e!==null?i:null,s[f]);return[B[0]+i,B[1]+i]});return e!==null&&s.every(d=>d.length>0)&&(()=>{const d=Math.min(...s.map(f=>f.at(-1)[0]+f.at(-1)[1].length)),h=s.map(f=>0);for(let f=0;f<d;){let p=null,B=0;for(;B<s.length;){let A=h[B];const R=s[B],[I,E]=R[A];if(I+E.length<=f){if(++A,A===R.length)return;h[B]=A,f=R[A][0];break}const w=E[f-I];if(p===null&&(p=w),w!==p){++f;break}++B}B===s.length&&(n.push([e+f,new Uint8Array([p])]),++f)}})(),[Math.min(...a.map(([d])=>d)),Math.max(...a.map(([d,h])=>h))]}}}function Oi(t,e,n){if(!Array.isArray(t))return wl(t,e,n);let r=[0,0];for(const s of t){const i=wl(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 I1(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,oc(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,oc(n.map(([,d])=>d)))}return r(1/0),e}function F1(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((_,U)=>Oi(_,0,r[U])),i=s.map((_,U)=>[_,U]).sort(([[_]],[[U]])=>_-U),o=(()=>{let _=n;const U=new Map;for(const[[O],$]of i)_^=1n<<BigInt($),U.set(O,_);return U})(),a=I1(i),d=t.length-Math.max(...[...a.values()].map(_=>Et(_))),h=_=>{let U=n;for(const[O,$]of o){if(_<O)break;U=$}return U},f=_=>{let U=e;for(const[O,$]of a){if(_<O)break;U=$}return U},p=Array.from({length:Math.max(...r.map(_=>_.length>0?_.at(-1)[0]+_.at(-1)[1].length:0))}).map(()=>[]);for(let _=0;_<r.length;++_)for(const[U,O]of r[_])for(let $=0;$<O.length;++$)p[U+$].push([O[$],_]);let B=[];for(const[_,U]of p.entries()){const O=h(_),$=O^oc(U.map(([,j])=>j)),G=n^O,Y=new Map;for(const[j,P]of U)Y.has(j)||Y.set(j,e),Y.set(j,Y.get(j)|1n<<BigInt(P));let M=t.length-Math.max(Et($),Et(G));for(const j of Y.values()){const P=U.length-Et(j)+Et(G);M=Math.min(M,P)}if(M!==0){if(M===t.length-1)return[!0,j=>Si(j.length<=_?G:Y.get(j[_])??e)];B.push([M,_,G,Y,$])}}if(d===t.length-1)return[!0,_=>Si(f(_.length))];B.sort(([_],[U])=>U-_);let A=!0;const R=new Map,I=new Map,E=(_,U)=>{R.set(_,U),I.has(Et(_))||I.set(Et(_),[]),I.get(Et(_)).push(_)},w=(_,U)=>{if(Et(_)<=1||R.has(_))return;let O=0;const $=new Map;for(const Y of Si(_)){const M=s[Y][0],j=a.get(M)&_;$.set(M,j),O=Math.max(O,Et(j))}O=Et(_)-O;const G=[];for(const[Y,M,j,P,q]of U){const C=new Map;let c=0;for(const[x,D]of P){const F=D&_;Et(F)>0&&(C.set(x,F),c+=Et(F))}const b=j&_;let g=C.size>0?Y:0;for(const x of C.values()){const D=c-Et(x)+Et(b);g=Math.min(g,D)}if(g!==0){if(g===Et(_)-1){E(_,[M,b,C]);return}G.push([g,M,b,C,q&_])}}if(O===Et(_)-1){E(_,"size");return}if(G.sort(([Y],[M])=>M-Y),G.length>0&&G[0][0]>=O){const[,Y,M,j,P]=G[0];E(_,[Y,M,j]),w(M,G);for(const q of j.values())w(q|P,G.slice(1));return}if(O>0){E(_,"size");for(const Y of $.values())w(Y,G);return}E(_,"indistinguishable"),A=!1};w(n,B);const k=_=>{for(let U=Et(_)+1;U<t.length-2;++U)for(const O of I.get(U)??[])if((_&O)==_)return R.get(O);throw new Error("Implementation error in layout discrimination algorithm")};return[A,_=>{let U=n,O=R.get(U);for(;O!=="indistinguishable";){if(O==="size")U&=f(_.length);else{const[$,G,Y]=O;if(_.length<=$)U&=G;else{const M=_[$];for(const[j,P]of Y)j!==M&&(U^=U&P);U^=U&G}}if(Et(U)<=1)break;O=R.get(U)??k(U)}return Si(U)}]}var So=(t,e)=>({...t,binary:"bytes",...e===void 0?{}:C1(e)?{layout:e}:e instanceof Uint8Array||ms(e)||!Array.isArray(e)?{custom:e}:{layout:e[0],custom:e[1]}});function k1(t,e){const n=Object.fromEntries(t.map(([s,i])=>[i,s])),r=Object.fromEntries(t);return{binary:"uint",size:(e==null?void 0:e.size)??1,endianness:(e==null?void 0:e.endianness)??"big",custom:{to:s=>{const i=n[s];if(i===void 0)throw new Error(`Invalid enum value: ${s}`);return i},from:s=>r[s]}}}function O1(t,e){return{binary:"uint",size:Math.ceil(t.length/8),custom:{to:n=>{const r={};for(let s=0;s<t.length;++s)t[s]&&(r[t[s]]=(BigInt(n)&1n<<BigInt(s))!==0n);return r},from:n=>{let r=0n;for(let s=0;s<t.length;++s)t[s]&&n[t[s]]&&(r|=1n<<BigInt(s));return t.length>wo?r:Number(r)}}}}function N1(t,e){return Number(Number(t).toFixed(e))}function Ni(t,e){if(U1(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 Ui(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 Yr(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 qn(t,e){return{amount:t.toString(),decimals:e}}function Dt(t){return df(t),BigInt(t.amount)}function Co(t,e){df(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 Us(t){return Number(Co(t))}function Sl(t,e){return Co(qn(t,e))}function U1(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 df(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 lf(t,e){const r=Dt(t)*e/100000n;return qn(r,t.decimals)}const $s=(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 os(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function L1(t,...e){if(!os(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 uf(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 ff(t){if(typeof t!="function")throw new Error("function expected");return!0}function vr(t,e){if(typeof e!="string")throw new Error(`${t}: string expected`);return!0}function bs(t){if(!Number.isSafeInteger(t))throw new Error(`invalid integer: ${t}`)}function Yi(t){if(!Array.isArray(t))throw new Error("array expected")}function Xi(t,e){if(!uf(!0,e))throw new Error(`${t}: array of strings expected`)}function Kc(t,e){if(!uf(!1,e))throw new Error(`${t}: array of numbers expected`)}function si(...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 Bo(t){const e=typeof t=="string"?t.split(""):t,n=e.length;Xi("alphabet",e);const r=new Map(e.map((s,i)=>[s,i]));return{encode:s=>(Yi(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=>(Yi(s),s.map(i=>{vr("alphabet.decode",i);const o=r.get(i);if(o===void 0)throw new Error(`Unknown letter: "${i}". Allowed: ${t}`);return o}))}}function xo(t=""){return vr("join",t),{encode:e=>(Xi("join.decode",e),e.join(t)),decode:e=>(vr("join.decode",e),e.split(t))}}function M1(t,e="="){return bs(t),vr("padding",e),{encode(n){for(Xi("padding.encode",n);n.length*t%8;)n.push(e);return n},decode(n){Xi("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 Cl(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(Yi(t),!t.length)return[];let r=0;const s=[],i=Array.from(t,a=>{if(bs(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 f=i[h],p=e*a,B=p+f;if(!Number.isSafeInteger(B)||p/e!==a||B-f!==p)throw new Error("convertRadix: carry overflow");const A=B/n;a=B%n;const R=Math.floor(A);if(i[h]=R,!Number.isSafeInteger(R)||R*n+a!==B)throw new Error("convertRadix: carry overflow");if(d)R?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 hf=(t,e)=>e===0?t:hf(e,t%e),Ji=(t,e)=>t+(e-hf(t,e)),Li=(()=>{let t=[];for(let e=0;e<40;e++)t.push(2**e);return t})();function ac(t,e,n,r){if(Yi(t),e<=0||e>32)throw new Error(`convertRadix2: wrong from=${e}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(Ji(e,n)>32)throw new Error(`convertRadix2: carry overflow from=${e} to=${n} carryBits=${Ji(e,n)}`);let s=0,i=0;const o=Li[e],a=Li[n]-1,d=[];for(const h of t){if(bs(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 f=Li[i];if(f===void 0)throw new Error("invalid carry");s&=f-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 P1(t){bs(t);const e=2**8;return{encode:n=>{if(!os(n))throw new Error("radix.encode input should be Uint8Array");return Cl(Array.from(n),e,t)},decode:n=>(Kc("radix.decode",n),Uint8Array.from(Cl(n,t,e)))}}function Vc(t,e=!1){if(bs(t),t<=0||t>32)throw new Error("radix2: bits should be in (0..32]");if(Ji(8,t)>32||Ji(t,8)>32)throw new Error("radix2: carry overflow");return{encode:n=>{if(!os(n))throw new Error("radix2.encode input should be Uint8Array");return ac(Array.from(n),8,t,!e)},decode:n=>(Kc("radix2.decode",n),Uint8Array.from(ac(n,t,8,e)))}}function Bl(t){return ff(t),function(...e){try{return t.apply(null,e)}catch{}}}function W1(t,e){return bs(t),ff(e),{encode(n){if(!os(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(!os(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 xl=si(Vc(4),Bo("0123456789ABCDEF"),xo("")),z1=typeof Uint8Array.from([]).toBase64=="function"&&typeof Uint8Array.fromBase64=="function",H1=(t,e)=>{vr("base64",t);const n=/^[A-Za-z0-9=+/]+$/,r="base64";if(t.length>0&&!n.test(t))throw new Error("invalid base64");return Uint8Array.fromBase64(t,{alphabet:r,lastChunkHandling:"strict"})},_l=z1?{encode(t){return L1(t),t.toBase64()},decode(t){return H1(t)}}:si(Vc(6),Bo("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),M1(6),xo("")),$1=t=>si(P1(58),Bo(t),xo("")),Zi=$1("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),q1=t=>si(W1(4,e=>t(t(e))),Zi),cc=si(Bo("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),xo("")),Tl=[996825010,642813549,513874426,1027748829,705979059];function Ds(t){const e=t>>25;let n=(t&33554431)<<5;for(let r=0;r<Tl.length;r++)(e>>r&1)===1&&(n^=Tl[r]);return n}function Dl(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=Ds(s)^o>>5}s=Ds(s);for(let i=0;i<r;i++)s=Ds(s)^t.charCodeAt(i)&31;for(let i of e)s=Ds(s)^i;for(let i=0;i<6;i++)s=Ds(s);return s^=n,cc.encode(ac([s%Li[30]],30,5,!1))}function K1(t){const e=t==="bech32"?1:734539939,n=Vc(5),r=n.decode,s=n.encode,i=Bl(r);function o(p,B,A=90){vr("bech32.encode prefix",p),os(B)&&(B=Array.from(B)),Kc("bech32.encode",B);const R=p.length;if(R===0)throw new TypeError(`Invalid prefix length ${R}`);const I=R+7+B.length;if(A!==!1&&I>A)throw new TypeError(`Length ${I} exceeds limit ${A}`);const E=p.toLowerCase(),w=Dl(E,B,e);return`${E}1${cc.encode(B)}${w}`}function a(p,B=90){vr("bech32.decode input",p);const A=p.length;if(A<8||B!==!1&&A>B)throw new TypeError(`invalid string length: ${A} (${p}). Expected (8..${B})`);const R=p.toLowerCase();if(p!==R&&p!==p.toUpperCase())throw new Error("String must be lowercase or uppercase");const I=R.lastIndexOf("1");if(I===0||I===-1)throw new Error('Letter "1" must be present between prefix and data only');const E=R.slice(0,I),w=R.slice(I+1);if(w.length<6)throw new Error("Data must be at least 6 characters long");const k=cc.decode(w).slice(0,-6),_=Dl(E,k,e);if(!w.endsWith(_))throw new Error(`Invalid checksum in ${p}: expected "${_}"`);return{prefix:E,words:k}}const d=Bl(a);function h(p){const{prefix:B,words:A}=a(p,!1);return{prefix:B,words:A,bytes:r(A)}}function f(p,B){return o(p,s(B))}return{encode:o,decode:a,encodeFromBytes:f,decodeToBytes:h,decodeUnsafe:d,fromWords:r,fromWordsUnsafe:i,toWords:s}}const mf=K1("bech32"),bf=(t,e)=>e.startsWith(t)?e.slice(t.length):e,V1=/^(?:0x)?[0-9a-fA-F]+$/,wt={valid:t=>V1.test(t),decode:t=>xl.decode(bf("0x",t).toUpperCase()),encode:(t,e=!1)=>(t=typeof t=="string"?Pt.encode(t):t,(e?"0x":"")+xl.encode(t).toLowerCase())},j1=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,_o={valid:t=>j1.test(t),decode:_l.decode,encode:t=>_l.encode(typeof t=="string"?Pt.encode(t):t)},pf={decode:Zi.decode,encode:t=>Zi.encode(typeof t=="string"?Pt.encode(t):t)},Ls={decode:t=>(typeof t!="string"&&(t=wt.encode(t,!0)),t===""||t==="0x"?0n:BigInt(t)),encode:(t,e=!1)=>Ls.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=Ls.toBigInt(t));const n=wt.decode(Ls.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}},jc=[[1,"Solana"],[2,"Ethereum"],[4,"Bsc"],[5,"Polygon"],[6,"Avalanche"],[8,"Algorand"],[10,"Fantom"],[13,"Klaytn"],[14,"Celo"],[15,"Near"],[16,"Moonbeam"],[17,"Neon"],[19,"Injective"],[20,"Osmosis"],[21,"Sui"],[22,"Aptos"],[23,"Arbitrum"],[24,"Optimism"],[26,"Pythnet"],[29,"Btc"],[30,"Base"],[32,"Sei"],[34,"Scroll"],[35,"Mantle"],[37,"Xlayer"],[38,"Linea"],[39,"Berachain"],[40,"Seievm"],[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"]],[MS,gf]=yr(jc),ii=fe(jc,[1,0]),Qi=fe(jc),oi=t=>ii.has(t),dc=t=>Qi.has(t),hn=t=>{switch(typeof t){case"string":if(oi(t))return ii(t);break;case"number":if(dc(t))return t;break}throw Error(`Cannot convert to ChainId: ${t}`)},ps=t=>{switch(typeof t){case"string":if(oi(t))return t;break;case"number":if(dc(t))return Qi(t);break;case"bigint":if(dc(Number(t)))return Qi.get(Number(t));break}throw Error(`Cannot convert to Chain: ${t}`)},Gc=[["Evm",["Arbitrum","Avalanche","Base","Bsc","Celo","Ethereum","Fantom","Klaytn","Moonbeam","Neon","Optimism","Polygon","Sepolia","ArbitrumSepolia","BaseSepolia","OptimismSepolia","Holesky","PolygonSepolia","Mantle","Scroll","Xlayer","Linea","Berachain","Seievm","Unichain","Worldchain","Ink","HyperEVM","Monad","Mezo","Sonic","Converge","Plume"]],["Solana",["Solana","Pythnet","Fogo"]],["Cosmwasm",["Cosmoshub","Evmos","Injective","Kujira","Osmosis","Sei","Wormchain","Dymension","Neutron","Stargaze","Celestia","Seda","Provenance","Noble"]],["Btc",["Btc"]],["Algorand",["Algorand"]],["Sui",["Sui"]],["Aptos",["Aptos"]],["Near",["Near"]]];nf(Gc,0);const yf=fe(Gc),mn=fe(Gc,[1,0]),G1=[["Evm","hex"],["Solana","base58"],["Cosmwasm","bech32"],["Btc","bech32"],["Algorand","algorandAppId"],["Sui","hex"],["Aptos","hex"],["Near","sha256"]],Y1=fe(G1),gs={byAddress:(t,e)=>Object.values(t).find(n=>Ef(n.address,e)),native:t=>gs.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}},Ef=(t,e)=>t.toLowerCase()===e.toLowerCase();var Rl;(function(t){t[t.Finalized=1]="Finalized",t[t.Immediate=200]="Immediate",t[t.Safe=201]="Safe"})(Rl||(Rl={}));const X1=[["Ethereum",32]];fe(X1);const J1=[["Solana",32],["Ethereum",72],["Bsc",15],["Optimism",512],["Base",512],["Arbitrum",4096],["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],["Injective",0],["Berachain",1],["Seievm",1],["Unichain",1024],["Ink",512],["HyperEVM",1],["Monad",1],["Mezo",1],["Sonic",1],["Converge",4096],["Fogo",32],["Plume",4096],["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]],Af=fe(J1),Z1=[["Algorand",3300],["Aptos",4e3],["Arbitrum",260],["ArbitrumSepolia",260],["Avalanche",2e3],["Base",2e3],["BaseSepolia",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],["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],["Seievm",400]],wf=fe(Z1);function Yc(t){const e=Af.get(t);if(e===void 0)throw new Error("Cannot find finality for "+t);const n=wf.get(t);if(n===void 0)throw new Error("Cannot find block time for "+t);return e*n}const Q1=[["Evm",18],["Solana",9],["Sui",9],["Aptos",8],["Cosmwasm",6],["Algorand",6],["Btc",8],["Near",12]],Sf=fe(Q1),eb=[["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/"}}]]]],tb=fe(eb),nb=(t,e)=>t==="Devnet"?void 0:tb.get(t,e),rb=[["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"],["Dymension","https://dymension-rpc.polkachu.com/"],["Stargaze","https://stargaze-rpc.polkachu.com/"],["Celestia","https://celestia-rpc.polkachu.com/"],["Neutron","https://neutron-rpc.polkachu.com/"],["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"],["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"],["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"],["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"],["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"]]]],sb=fe(rb),Cf=(t,e)=>sb.get(t,e)??"",Bf=[["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"],["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],["Linea",59144n],["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"],["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"],["Mantle",5003n],["Scroll",534351n],["Berachain",80069n],["Seievm",1328n],["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"]]]],xf=fe(Bf),ib=fe(Bf,[2,[0,1]]);function ob(t,e){const r=ib(e).filter(([s,i])=>mn(i)===t);if(r.length!==1)throw new Error(`Platform ${t} has multiple chains with native chain id ${e}`);return r[0]}const ab=[["Mainnet","https://iris-api.circle.com/v1/attestations"],["Testnet","https://iris-api-sandbox.circle.com/v1/attestations"]],vl=fe(ab),cb=[["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"],["Seievm","0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392"]]],["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"],["Seievm","0x4fCF1784B31630811181f670Aea7A7bEF803eaED"]]]],Ms=fe(cb),Xc=[["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]]]],_f=fe(Xc,[[0,1],2]),lc=fe(Xc,[[0,2],1]),[PS,WS]=yr(Xc),qs=(t,e)=>_f.has(t,e),Il=(t,e)=>lc.has(t,e),Fl=(t,e)=>Ms.has(t,e),Mi=(t,e)=>{switch(typeof e){case"string":if(qs(t,e))return e;break;case"number":if(Il(t,e))return lc(t,e);break;case"bigint":const n=Number(e);if(Il(t,n))return lc(t,n);break}throw Error(`Cannot convert to Chain: ${e}`)},db=[["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"],["Arbitrum","0xa5f208e072434bC67592E4C49C1B991BA79BCA46"],["Optimism","0xEe91C335eab126dF5fDB3797EA9d6aD93aeC9722"],["Pythnet","H3fxXJ86ADW2PNuDDmZJg6mzTtPxkYCpNuQUTgmJ7AjU"],["Base","0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"],["Xlayer","0x194B123c5E96B9b2E49763619985790Dc241CAC0"],["Sei","sei1gjrrme22cyha4ht2xapn3f08zzw6z3d4uxx6fyy9zd5dyr3yxgzqqncdqn"],["Wormchain","wormhole1ufs3tlq4umljk0qfe8k5ya0x6hpavn897u2cnf9k0en9jr7qarqqaqfk2j"],["Neutron","neutron16rerygcpahqcxx5t8vjla46ym8ccn7xz7rtc6ju5ujcd36cmc7zs9zrunh"],["Scroll","0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"],["Mantle","0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"],["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"],["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"],["Berachain","0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd"],["Seievm","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"],["Wormchain","wormhole17p9rzwnnfxcjp32un9ug7yhhzgtkhvl9jfksztgw5uh69wac2pgshdnj3k"]]]],Tf=[["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"],["Arbitrum","0x0b2402144Bb366A632D14B83F244D2e0e21bD39c"],["Optimism","0x1D68124e65faFC907325e3EDbF8c4d84499DAa8b"],["Base","0x8d2de8d2f73F1F4cAB472AC9A881C9b123C79627"],["Xlayer","0x5537857664B0f9eFe38C9f320F75fEf23234D904"],["Sei","sei1smzlm9t79kur392nu9egl8p8je9j92q4gzguewj56a05kyxxra0qy0nuf3"],["Wormchain","wormhole1466nf3zuxpya8q9emxukd7vftaf6h4psr0a07srl5zw74zh84yjq4lyjmh"],["Scroll","0x24850c6f61C438823F01B7A3BF2B89B72174Fa9d"],["Mantle","0x24850c6f61C438823F01B7A3BF2B89B72174Fa9d"],["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"],["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"],["Xlayer","0xdA91a06299BBF302091B053c6B9EF86Eff0f930D"],["Berachain","0xa10f2eF61dE1f19f586ab8B6F2EbA89bACE63F7a"],["Seievm","0x23908A62110e21C04F3A4e011d24F901F911744A"],["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"],["Wormchain","wormhole1ghd753shjuwexxywmgs4xz7x2q732vcnkm6h2pyv9s6ah3hylvrqtm7t3h"]]]],Df=[["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",""]]]],Rf=[["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"}]]]],vf=[["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"]]]],lb=[["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"]]]],ub=[["Mainnet",[["Ethereum","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Bsc","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Polygon","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Avalanche","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Fantom","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Klaytn","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Celo","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Moonbeam","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Base","0x706f82e9bb5b0813501714ab5974216704980e31"],["Arbitrum","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Optimism","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Scroll","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Mantle","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Xlayer","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Berachain","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Seievm","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Ink","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Worldchain","0x1520cc9e779c56dab5866bebfb885c86840c33d3"],["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"]]]],If=[["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:""}]]]],fb=[["Mainnet",[["Wormchain","wormhole14ejqjyq8um4p3xfqj74yld5waqljf88fz25yxnma0cngspxe3les00fpjx"]]],["Testnet",[["Wormchain","wormhole1ctnjk7an90lz5wjfvr3cf6x984a8cjnv8dpmztmlpcq4xteaa2xs9pwmzk"]]]],hb=[["Mainnet",[["Sei","sei189adguawugk3e55zn63z8r9ll29xrjwca636ra7v7gxuzn98sxyqwzt47l"]]],["Testnet",[["Sei","sei1dkdwdvknx0qav5cp5kw68mkn3r99m3svkyjfvkztwh97dv2lm0ksj6xrak"]]]],mb=[["Mainnet",[["Polygon",["Ethereum","0x86E4Dc95c7FBdBf52e33D563BbDB00823894C287"]],["Optimism",["Ethereum","0xdfe97868233d1aa22e815a266982f2cf17685a27"]],["Arbitrum",["Ethereum","0x1c479675ad559dc151f6ec7ed3fbf8cee79582b6"]]]],["Testnet",[["Polygon",["Ethereum","0x2890ba17efe978480615e330ecb65333b880928e"]],["Optimism",["Ethereum","0xe6dfba0953616bacab0c9a8ecb3a9bba77fc15c0"]],["Arbitrum",["Ethereum","0x45af9ed1d03703e480ce7d328fb684bb67da5049"]]]]],Ff=[["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}]]]],bb=[["Mainnet",[["Solana","87MEvHZCXE3ML5rrmh5uX1FbShHmRXXS32xJDGbQ7h5t"],["Polygon","0x09959798B95d00a3183d20FaC298E4594E599eab"],["Arbitrum","0x1293a54e160D1cd7075487898d65266081A15458"],["Optimism","0x1293a54e160D1cd7075487898d65266081A15458"],["Base","0x09959798B95d00a3183d20FaC298E4594E599eab"]]]],pb=fe(db),gb=fe(Tf),yb=fe(Df),uc=fe(Rf),Eb=fe(vf),Ab=fe(lb),wb=fe(ub),kl=fe(fb),Ol=fe(hb),Nl=fe(Ff),Pi=fe(bb),fc=fe(If);fe(mb);const Sb=fe(Tf,[0,1]),Cb=fe(Df,[0,1]),Bb=fe(Rf,[0,1]);fe(vf,[0,1]);const xb=fe(If,[0,1]),_b=fe(Ff,[0,1]),Jc=[["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"]]]],[zS,HS]=b1(yr(Gi(Jc)),[1,2]);fe(Jc,[[0,2],1]);fe(Jc,[1,[0,2]]);const Zc=5,Tb=[["Mainnet",[["Ethereum","0x18084fbA666a33d37592fA2633fD49a74DD93a88"],["Solana","6DNSN2BJsaPFdFFc1zP37kkeNe4Usc1Sqkzr9C9vPWcU"],["Polygon","0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b"],["Arbitrum","0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40"],["Optimism","0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40"],["Base","0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b"]]]],Db=fe(Tb),Rb=[["Mainnet","https://executor.labsapis.com/v0"],["Testnet","https://executor-testnet.labsapis.com/v0"]],Ul=fe(Rb),Vr=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function To(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function as(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function Xt(t,...e){if(!To(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 kf(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");as(t.outputLen),as(t.blockLen)}function Ir(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 Qc(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 Of(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function Gn(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function Wi(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function An(t,e){return t<<32-e|t>>>e}function vb(t,e){return t<<e|t>>>32-e>>>0}const Nf=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Uf(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}const Ib=Nf?t=>t:t=>Uf(t);function Fb(t){for(let e=0;e<t.length;e++)t[e]=Uf(t[e]);return t}const hc=Nf?t=>t:Fb,Lf=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",kb=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Fr(t){if(Xt(t),Lf)return t.toHex();let e="";for(let n=0;n<t.length;n++)e+=kb[t[n]];return e}const Wn={_0:48,_9:57,A:65,F:70,a:97,f:102};function Ll(t){if(t>=Wn._0&&t<=Wn._9)return t-Wn._0;if(t>=Wn.A&&t<=Wn.F)return t-(Wn.A-10);if(t>=Wn.a&&t<=Wn.f)return t-(Wn.a-10)}function Do(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);if(Lf)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=Ll(t.charCodeAt(i)),a=Ll(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 ed(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function ys(t){return typeof t=="string"&&(t=ed(t)),Xt(t),t}function Ob(t){return typeof t=="string"&&(t=ed(t)),Xt(t),t}function Fn(...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 Nb(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 Ro=class{};function ai(t){const e=r=>t().update(ys(r)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function Ub(t){const e=(r,s)=>t(s).update(ys(r)).digest(),n=t({});return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=r=>t(r),e}function td(t=32){if(Vr&&typeof Vr.getRandomValues=="function")return Vr.getRandomValues(new Uint8Array(t));if(Vr&&typeof Vr.randomBytes=="function")return Uint8Array.from(Vr.randomBytes(t));throw new Error("crypto.getRandomValues must be defined")}function Lb(t,e,n,r){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,n,r);const s=BigInt(32),i=BigInt(4294967295),o=Number(n>>s&i),a=Number(n&i),d=r?4:0,h=r?0:4;t.setUint32(e+d,o,r),t.setUint32(e+h,a,r)}function Mb(t,e,n){return t&e^~t&n}function Pb(t,e,n){return t&e^t&n^e&n}class nd extends Ro{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=Wi(this.buffer)}update(e){Ir(this),e=ys(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=Wi(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){Ir(this),Qc(e,this),this.finished=!0;const{buffer:n,view:r,blockLen:s,isLE:i}=this;let{pos:o}=this;n[o++]=128,Gn(this.buffer.subarray(o)),this.padOffset>s-o&&(this.process(r,0),o=0);for(let p=o;p<s;p++)n[p]=0;Lb(r,s-8,BigInt(this.length*8),i),this.process(r,0);const a=Wi(e),d=this.outputLen;if(d%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const h=d/4,f=this.get();if(h>f.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p<h;p++)a.setUint32(4*p,f[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 Jn=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]),Ci=BigInt(2**32-1),Ml=BigInt(32);function Mf(t,e=!1){return e?{h:Number(t&Ci),l:Number(t>>Ml&Ci)}:{h:Number(t>>Ml&Ci)|0,l:Number(t&Ci)|0}}function Pf(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}=Mf(t[i],e);[r[i],s[i]]=[o,a]}return[r,s]}const Pl=(t,e,n)=>t>>>n,Wl=(t,e,n)=>t<<32-n|e>>>n,lr=(t,e,n)=>t>>>n|e<<32-n,ur=(t,e,n)=>t<<32-n|e>>>n,Os=(t,e,n)=>t<<64-n|e>>>n-32,Ns=(t,e,n)=>t>>>n-32|e<<64-n,Wb=(t,e)=>e,zb=(t,e)=>t,Hb=(t,e,n)=>t<<n|e>>>32-n,$b=(t,e,n)=>e<<n|t>>>32-n,qb=(t,e,n)=>e<<n-32|t>>>64-n,Kb=(t,e,n)=>t<<n-32|e>>>64-n;function Cn(t,e,n,r){const s=(e>>>0)+(r>>>0);return{h:t+n+(s/2**32|0)|0,l:s|0}}const Wf=(t,e,n)=>(t>>>0)+(e>>>0)+(n>>>0),zf=(t,e,n,r)=>e+n+r+(t/2**32|0)|0,Vb=(t,e,n,r)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0),jb=(t,e,n,r,s)=>e+n+r+s+(t/2**32|0)|0,Gb=(t,e,n,r,s)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0)+(s>>>0),Yb=(t,e,n,r,s,i)=>e+n+r+s+i+(t/2**32|0)|0,Xb=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Zn=new Uint32Array(64);class Jb extends nd{constructor(e=32){super(64,e,8,!1),this.A=Jn[0]|0,this.B=Jn[1]|0,this.C=Jn[2]|0,this.D=Jn[3]|0,this.E=Jn[4]|0,this.F=Jn[5]|0,this.G=Jn[6]|0,this.H=Jn[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)Zn[p]=e.getUint32(n,!1);for(let p=16;p<64;p++){const B=Zn[p-15],A=Zn[p-2],R=An(B,7)^An(B,18)^B>>>3,I=An(A,17)^An(A,19)^A>>>10;Zn[p]=I+Zn[p-7]+R+Zn[p-16]|0}let{A:r,B:s,C:i,D:o,E:a,F:d,G:h,H:f}=this;for(let p=0;p<64;p++){const B=An(a,6)^An(a,11)^An(a,25),A=f+B+Mb(a,d,h)+Xb[p]+Zn[p]|0,I=(An(r,2)^An(r,13)^An(r,22))+Pb(r,s,i)|0;f=h,h=d,d=a,a=o+A|0,o=i,i=s,s=r,r=A+I|0}r=r+this.A|0,s=s+this.B|0,i=i+this.C|0,o=o+this.D|0,a=a+this.E|0,d=d+this.F|0,h=h+this.G|0,f=f+this.H|0,this.set(r,s,i,o,a,d,h,f)}roundClean(){Gn(Zn)}destroy(){this.set(0,0,0,0,0,0,0,0),Gn(this.buffer)}}const Hf=Pf(["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))),Zb=Hf[0],Qb=Hf[1],Qn=new Uint32Array(80),er=new Uint32Array(80);class $f extends nd{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:f,Fh:p,Fl:B,Gh:A,Gl:R,Hh:I,Hl:E}=this;return[e,n,r,s,i,o,a,d,h,f,p,B,A,R,I,E]}set(e,n,r,s,i,o,a,d,h,f,p,B,A,R,I,E){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=f|0,this.Fh=p|0,this.Fl=B|0,this.Gh=A|0,this.Gl=R|0,this.Hh=I|0,this.Hl=E|0}process(e,n){for(let _=0;_<16;_++,n+=4)Qn[_]=e.getUint32(n),er[_]=e.getUint32(n+=4);for(let _=16;_<80;_++){const U=Qn[_-15]|0,O=er[_-15]|0,$=lr(U,O,1)^lr(U,O,8)^Pl(U,O,7),G=ur(U,O,1)^ur(U,O,8)^Wl(U,O,7),Y=Qn[_-2]|0,M=er[_-2]|0,j=lr(Y,M,19)^Os(Y,M,61)^Pl(Y,M,6),P=ur(Y,M,19)^Ns(Y,M,61)^Wl(Y,M,6),q=Vb(G,P,er[_-7],er[_-16]),C=jb(q,$,j,Qn[_-7],Qn[_-16]);Qn[_]=C|0,er[_]=q|0}let{Ah:r,Al:s,Bh:i,Bl:o,Ch:a,Cl:d,Dh:h,Dl:f,Eh:p,El:B,Fh:A,Fl:R,Gh:I,Gl:E,Hh:w,Hl:k}=this;for(let _=0;_<80;_++){const U=lr(p,B,14)^lr(p,B,18)^Os(p,B,41),O=ur(p,B,14)^ur(p,B,18)^Ns(p,B,41),$=p&A^~p&I,G=B&R^~B&E,Y=Gb(k,O,G,Qb[_],er[_]),M=Yb(Y,w,U,$,Zb[_],Qn[_]),j=Y|0,P=lr(r,s,28)^Os(r,s,34)^Os(r,s,39),q=ur(r,s,28)^Ns(r,s,34)^Ns(r,s,39),C=r&i^r&a^i&a,c=s&o^s&d^o&d;w=I|0,k=E|0,I=A|0,E=R|0,A=p|0,R=B|0,{h:p,l:B}=Cn(h|0,f|0,M|0,j|0),h=a|0,f=d|0,a=i|0,d=o|0,i=r|0,o=s|0;const b=Wf(j,q,c);r=zf(b,M,P,C),s=b|0}({h:r,l:s}=Cn(this.Ah|0,this.Al|0,r|0,s|0)),{h:i,l:o}=Cn(this.Bh|0,this.Bl|0,i|0,o|0),{h:a,l:d}=Cn(this.Ch|0,this.Cl|0,a|0,d|0),{h,l:f}=Cn(this.Dh|0,this.Dl|0,h|0,f|0),{h:p,l:B}=Cn(this.Eh|0,this.El|0,p|0,B|0),{h:A,l:R}=Cn(this.Fh|0,this.Fl|0,A|0,R|0),{h:I,l:E}=Cn(this.Gh|0,this.Gl|0,I|0,E|0),{h:w,l:k}=Cn(this.Hh|0,this.Hl|0,w|0,k|0),this.set(r,s,i,o,a,d,h,f,p,B,A,R,I,E,w,k)}roundClean(){Gn(Qn,er)}destroy(){Gn(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 ep extends $f{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 rd=ai(()=>new Jb),sd=ai(()=>new $f),tp=ai(()=>new ep),eo=rd,np=BigInt(0),Rs=BigInt(1),rp=BigInt(2),sp=BigInt(7),ip=BigInt(256),op=BigInt(113),qf=[],Kf=[],Vf=[];for(let t=0,e=Rs,n=1,r=0;t<24;t++){[n,r]=[r,(2*n+3*r)%5],qf.push(2*(5*r+n)),Kf.push((t+1)*(t+2)/2%64);let s=np;for(let i=0;i<7;i++)e=(e<<Rs^(e>>sp)*op)%ip,e&rp&&(s^=Rs<<(Rs<<BigInt(i))-Rs);Vf.push(s)}const jf=Pf(Vf,!0),ap=jf[0],cp=jf[1],zl=(t,e,n)=>n>32?qb(t,e,n):Hb(t,e,n),Hl=(t,e,n)=>n>32?Kb(t,e,n):$b(t,e,n);function dp(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],f=n[d+1],p=zl(h,f,1)^n[a],B=Hl(h,f,1)^n[a+1];for(let A=0;A<50;A+=10)t[o+A]^=p,t[o+A+1]^=B}let s=t[2],i=t[3];for(let o=0;o<24;o++){const a=Kf[o],d=zl(s,i,a),h=Hl(s,i,a),f=qf[o];s=t[f],i=t[f+1],t[f]=d,t[f+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]^=ap[r],t[1]^=cp[r]}Gn(n)}let lp=class Gf extends Ro{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,as(r),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=Of(this.state)}clone(){return this._cloneInto()}keccak(){hc(this.state32),dp(this.state32,this.rounds),hc(this.state32),this.posOut=0,this.pos=0}update(e){Ir(this),e=ys(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){Ir(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 as(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Qc(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,Gn(this.state)}_cloneInto(e){const{blockLen:n,suffix:r,outputLen:s,rounds:i,enableXOF:o}=this;return e||(e=new Gf(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 Yf=(t,e,n)=>ai(()=>new lp(e,t,n)),up=Yf(6,136,256/8),Ks=Yf(1,136,256/8),fp=sd,hp=tp;class Xf extends Ro{constructor(e,n){super(),this.finished=!1,this.destroyed=!1,kf(e);const r=ys(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),Gn(i)}update(e){return Ir(this),this.iHash.update(e),this}digestInto(e){Ir(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 id=(t,e,n)=>new Xf(t,e).update(n).digest();id.create=(t,e)=>new Xf(t,e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const od=BigInt(0),to=BigInt(1);function kr(t,e){if(typeof e!="boolean")throw new Error(t+" boolean expected, got "+e)}function Bi(t){const e=t.toString(16);return e.length&1?"0"+e:e}function Jf(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?od:BigInt("0x"+t)}function ci(t){return Jf(Fr(t))}function Vs(t){return Xt(t),Jf(Fr(Uint8Array.from(t).reverse()))}function ad(t,e){return Do(t.toString(16).padStart(e*2,"0"))}function vo(t,e){return ad(t,e).reverse()}function Je(t,e,n){let r;if(typeof e=="string")try{r=Do(e)}catch(i){throw new Error(t+" must be hex string or Uint8Array, cause: "+i)}else if(To(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 va=t=>typeof t=="bigint"&&od<=t;function Zf(t,e,n){return va(t)&&va(e)&&va(n)&&e<=t&&t<n}function Xr(t,e,n,r){if(!Zf(e,n,r))throw new Error("expected valid "+t+": "+n+" <= n < "+r+", got "+e)}function Qf(t){let e;for(e=0;t>od;t>>=to,e+=1);return e}function mp(t,e){return t>>BigInt(e)&to}const di=t=>(to<<BigInt(t))-to;function bp(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=A=>new Uint8Array(A),s=A=>Uint8Array.of(A);let i=r(t),o=r(t),a=0;const d=()=>{i.fill(1),o.fill(0),a=0},h=(...A)=>n(o,i,...A),f=(A=r(0))=>{o=h(s(0),A),i=h(),A.length!==0&&(o=h(s(1),A),i=h())},p=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let A=0;const R=[];for(;A<e;){i=h();const I=i.slice();R.push(I),A+=i.length}return Fn(...R)};return(A,R)=>{d(),f(A);let I;for(;!(I=R(p()));)f();return d(),I}}function pp(t){return typeof t=="function"&&Number.isSafeInteger(t.outputLen)}function Es(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 gp=()=>{throw new Error("not implemented")};function js(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),Ar=BigInt(2),yp=BigInt(3),e0=BigInt(4),t0=BigInt(5),n0=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 $l(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 r0(t,e){const n=(t.ORDER+vt)/e0,r=t.pow(e,n);if(!t.eql(t.sqr(r),e))throw new Error("Cannot find square root");return r}function Ep(t,e){const n=(t.ORDER-t0)/n0,r=t.mul(e,Ar),s=t.pow(r,n),i=t.mul(e,s),o=t.mul(t.mul(i,Ar),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 Ap(t){if(t<BigInt(3))throw new Error("sqrt is not defined for small field");let e=t-vt,n=0;for(;e%Ar===jt;)e/=Ar,n++;let r=Ar;const s=Lr(t);for(;mc(s,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return r0;let i=s.pow(r,e);const o=(e+vt)/Ar;return function(d,h){if(d.is0(h))return h;if(mc(d,h)!==1)throw new Error("Cannot find square root");let f=n,p=d.mul(d.ONE,i),B=d.pow(h,e),A=d.pow(h,o);for(;!d.eql(B,d.ONE);){if(d.is0(B))return d.ZERO;let R=1,I=d.sqr(B);for(;!d.eql(I,d.ONE);)if(R++,I=d.sqr(I),R===f)throw new Error("Cannot find square root");const E=vt<<BigInt(f-R-1),w=d.pow(p,E);f=R,p=d.sqr(w),B=d.mul(B,p),A=d.mul(A,w)}return A}}function wp(t){return t%e0===yp?r0:t%n0===t0?Ep:Ap(t)}const Sp=(t,e)=>(Ze(t,e)&vt)===vt,Cp=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Bp(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"},n=Cp.reduce((r,s)=>(r[s]="function",r),e);return Es(t,n),t}function s0(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 cd(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 mc(t,e){const n=(t.ORDER-vt)/Ar,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 xp(t,e){e!==void 0&&as(e);const n=e!==void 0?e:t.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function Lr(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 f=e;f.BITS&&(s=f.BITS),f.sqrt&&(i=f.sqrt),typeof f.isLE=="boolean"&&(n=f.isLE)}else typeof e=="number"&&(s=e),r.sqrt&&(i=r.sqrt);const{nBitLength:o,nByteLength:a}=xp(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:di(o),ZERO:jt,ONE:vt,create:f=>Ze(f,t),isValid:f=>{if(typeof f!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof f);return jt<=f&&f<t},is0:f=>f===jt,isValidNot0:f=>!h.is0(f)&&h.isValid(f),isOdd:f=>(f&vt)===vt,neg:f=>Ze(-f,t),eql:(f,p)=>f===p,sqr:f=>Ze(f*f,t),add:(f,p)=>Ze(f+p,t),sub:(f,p)=>Ze(f-p,t),mul:(f,p)=>Ze(f*p,t),pow:(f,p)=>s0(h,f,p),div:(f,p)=>Ze(f*$l(p,t),t),sqrN:f=>f*f,addN:(f,p)=>f+p,subN:(f,p)=>f-p,mulN:(f,p)=>f*p,inv:f=>$l(f,t),sqrt:i||(f=>(d||(d=wp(t)),d(h,f))),toBytes:f=>n?vo(f,a):ad(f,a),fromBytes:f=>{if(f.length!==a)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+f.length);return n?Vs(f):ci(f)},invertBatch:f=>cd(h,f),cmov:(f,p,B)=>B?p:f});return Object.freeze(h)}function i0(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 dd(t){const e=i0(t);return e+Math.ceil(e/2)}function o0(t,e,n=!1){const r=t.length,s=i0(e),i=dd(e);if(r<16||r<i||r>1024)throw new Error("expected "+i+"-1024 bytes of input, got "+r);const o=n?Vs(t):ci(t),a=Ze(o,e-vt)+vt;return n?vo(a,s):ad(a,s)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const cs=BigInt(0),wr=BigInt(1);function Ps(t,e){const n=e.negate();return t?n:e}function ld(t,e,n){const r=e==="pz"?o=>o.pz:o=>o.ez,s=cd(t.Fp,n.map(r));return n.map((o,a)=>o.toAffine(s[a])).map(t.fromAffine)}function a0(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function Ia(t,e){a0(t,e);const n=Math.ceil(e/t)+1,r=2**(t-1),s=2**t,i=di(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+=wr);const h=e*r,f=h+Math.abs(a)-1,p=a===0,B=a<0,A=e%2!==0;return{nextN:d,offset:f,isZero:p,isNeg:B,isNegF:A,offsetF:h}}function _p(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 Tp(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 Fa=new WeakMap,c0=new WeakMap;function ka(t){return c0.get(t)||1}function Kl(t){if(t!==cs)throw new Error("invalid wNAF")}function d0(t,e){return{constTimeNegate:Ps,hasPrecomputes(n){return ka(n)!==1},unsafeLadder(n,r,s=t.ZERO){let i=n;for(;r>cs;)r&wr&&(s=s.add(i)),i=i.double(),r>>=wr;return s},precomputeWindow(n,r){const{windows:s,windowSize:i}=Ia(r,e),o=[];let a=n,d=a;for(let h=0;h<s;h++){d=a,o.push(d);for(let f=1;f<i;f++)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=Ia(n,e);for(let d=0;d<a.windows;d++){const{nextN:h,offset:f,isZero:p,isNeg:B,isNegF:A,offsetF:R}=ql(s,d,a);s=h,p?o=o.add(Ps(A,r[R])):i=i.add(Ps(B,r[f]))}return Kl(s),{p:i,f:o}},wNAFUnsafe(n,r,s,i=t.ZERO){const o=Ia(n,e);for(let a=0;a<o.windows&&s!==cs;a++){const{nextN:d,offset:h,isZero:f,isNeg:p}=ql(s,a,o);if(s=d,!f){const B=r[h];i=i.add(p?B.negate():B)}}return Kl(s),i},getPrecomputes(n,r,s){let i=Fa.get(r);return i||(i=this.precomputeWindow(r,n),n!==1&&(typeof s=="function"&&(i=s(i)),Fa.set(r,i))),i},wNAFCached(n,r,s){const i=ka(n);return this.wNAF(i,this.getPrecomputes(i,n,s),r)},wNAFCachedUnsafe(n,r,s,i){const o=ka(n);return o===1?this.unsafeLadder(n,r,i):this.wNAFUnsafe(o,this.getPrecomputes(o,n,s),r,i)},setWindowSize(n,r){a0(r,e),c0.set(n,r),Fa.delete(n)}}}function Dp(t,e,n,r){let s=e,i=t.ZERO,o=t.ZERO;for(;n>cs||r>cs;)n&wr&&(i=i.add(s)),r&wr&&(o=o.add(s)),s=s.double(),n>>=wr,r>>=wr;return{p1:i,p2:o}}function l0(t,e,n,r){_p(n,t),Tp(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=Qf(BigInt(s));let d=1;a>12?d=a-3:a>4?d=a-2:a>0&&(d=2);const h=di(d),f=new Array(Number(h)+1).fill(o),p=Math.floor((e.BITS-1)/d)*d;let B=o;for(let A=p;A>=0;A-=d){f.fill(o);for(let I=0;I<i;I++){const E=r[I],w=Number(E>>BigInt(A)&h);f[w]=f[w].add(n[I])}let R=o;for(let I=f.length-1,E=o;I>0;I--)E=E.add(f[I]),R=R.add(E);if(B=B.add(R),A!==0)for(let I=0;I<d;I++)B=B.double()}return B}function Vl(t,e){if(e){if(e.ORDER!==t)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return Bp(e),e}else return Lr(t)}function u0(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>cs))throw new Error(`CURVE.${a} must be positive bigint`)}const r=Vl(e.p,n.Fp),s=Vl(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 jl(t){t.lowS!==void 0&&kr("lowS",t.lowS),t.prehash!==void 0&&kr("prehash",t.prehash)}class Rp extends Error{constructor(e=""){super(e)}}const $n={Err:Rp,_tlv:{encode:(t,e)=>{const{Err:n}=$n;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=Bi(r);if(s.length/2&128)throw new n("tlv.encode: long form length too big");const i=r>127?Bi(s.length/2|128):"";return Bi(t)+i+s+e},decode(t,e){const{Err:n}=$n;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 f of h)o=o<<8|f;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}=$n;if(t<Ws)throw new e("integer: negative integers are not allowed");let n=Bi(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}=$n;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 ci(t)}},toSig(t){const{Err:e,_int:n,_tlv:r}=$n,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:f}=r.decode(2,d);if(f.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}=$n,r=e.encode(2,n.encode(t.r)),s=e.encode(2,n.encode(t.s)),i=r+s;return e.encode(48,i)}},Ws=BigInt(0),ts=BigInt(1),vp=BigInt(2),xi=BigInt(3),Ip=BigInt(4);function f0(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 ud(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 h0(t,e={}){const{Fp:n,Fn:r}=u0("weierstrass",t,e),{h:s,n:i}=t;Es(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:q}=M.toAffine(),C=n.toBytes(P);if(kr("isCompressed",j),j){a();const c=!n.isOdd(q);return Fn(m0(c),C)}else return Fn(Uint8Array.of(4),C,n.toBytes(q))}function h(Y){Xt(Y);const M=n.BYTES,j=M+1,P=2*M+1,q=Y.length,C=Y[0],c=Y.subarray(1);if(q===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 g=B(b);let x;try{x=n.sqrt(g)}catch(L){const S=L instanceof Error?": "+L.message:"";throw new Error("bad point: is not on curve, sqrt error"+S)}a();const D=n.isOdd(x);return(C&1)===1!==D&&(x=n.neg(x)),{x:b,y:x}}else if(q===P&&C===4){const b=n.fromBytes(c.subarray(M*0,M*1)),g=n.fromBytes(c.subarray(M*1,M*2));if(!A(b,g))throw new Error("bad point: is not on curve");return{x:b,y:g}}else throw new Error(`bad point: got length ${q}, expected compressed=${j} or uncompressed=${P}`)}const f=e.toBytes||d,p=e.fromBytes||h,B=f0(n,t.a,t.b);function A(Y,M){const j=n.sqr(M),P=B(Y);return n.eql(j,P)}if(!A(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const R=n.mul(n.pow(t.a,xi),Ip),I=n.mul(n.sqr(t.b),BigInt(27));if(n.is0(n.add(R,I)))throw new Error("bad curve params: a or b");function E(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 O))throw new Error("ProjectivePoint expected")}const k=js((Y,M)=>{const{px:j,py:P,pz:q}=Y;if(n.eql(q,n.ONE))return{x:j,y:P};const C=Y.is0();M==null&&(M=C?n.ONE:n.inv(q));const c=n.mul(j,M),b=n.mul(P,M),g=n.mul(q,M);if(C)return{x:n.ZERO,y:n.ZERO};if(!n.eql(g,n.ONE))throw new Error("invZ was invalid");return{x:c,y:b}}),_=js(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(!A(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 U(Y,M,j,P,q){return j=new O(n.mul(j.px,Y),j.py,j.pz),M=Ps(P,M),j=Ps(q,j),M.add(j)}class O{constructor(M,j,P){this.px=E("x",M),this.py=E("y",j,!0),this.pz=E("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 O)throw new Error("projective point not allowed");return n.is0(j)&&n.is0(P)?O.ZERO:new O(j,P,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(M){return ld(O,"pz",M)}static fromBytes(M){return Xt(M),O.fromHex(M)}static fromHex(M){const j=O.fromAffine(p(Je("pointHex",M)));return j.assertValidity(),j}static fromPrivateKey(M){const j=ud(r,e.allowedPrivateKeyLengths,e.wrapPrivateKey);return O.BASE.multiply(j(M))}static msm(M,j){return l0(O,r,M,j)}precompute(M=8,j=!0){return G.setWindowSize(this,M),j||this.multiply(xi),this}_setWindowSize(M){this.precompute(M)}assertValidity(){_(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:q}=this,{px:C,py:c,pz:b}=M,g=n.eql(n.mul(j,b),n.mul(C,q)),x=n.eql(n.mul(P,b),n.mul(c,q));return g&&x}negate(){return new O(this.px,n.neg(this.py),this.pz)}double(){const{a:M,b:j}=t,P=n.mul(j,xi),{px:q,py:C,pz:c}=this;let b=n.ZERO,g=n.ZERO,x=n.ZERO,D=n.mul(q,q),F=n.mul(C,C),L=n.mul(c,c),S=n.mul(q,C);return S=n.add(S,S),x=n.mul(q,c),x=n.add(x,x),b=n.mul(M,x),g=n.mul(P,L),g=n.add(b,g),b=n.sub(F,g),g=n.add(F,g),g=n.mul(b,g),b=n.mul(S,b),x=n.mul(P,x),L=n.mul(M,L),S=n.sub(D,L),S=n.mul(M,S),S=n.add(S,x),x=n.add(D,D),D=n.add(x,D),D=n.add(D,L),D=n.mul(D,S),g=n.add(g,D),L=n.mul(C,c),L=n.add(L,L),D=n.mul(L,S),b=n.sub(b,D),x=n.mul(L,F),x=n.add(x,x),x=n.add(x,x),new O(b,g,x)}add(M){w(M);const{px:j,py:P,pz:q}=this,{px:C,py:c,pz:b}=M;let g=n.ZERO,x=n.ZERO,D=n.ZERO;const F=t.a,L=n.mul(t.b,xi);let S=n.mul(j,C),m=n.mul(P,c),v=n.mul(q,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,q);let ee=n.add(C,b);return J=n.mul(J,ee),ee=n.add(S,v),J=n.sub(J,ee),ee=n.add(P,q),g=n.add(c,b),ee=n.mul(ee,g),g=n.add(m,v),ee=n.sub(ee,g),D=n.mul(F,J),g=n.mul(L,v),D=n.add(g,D),g=n.sub(m,D),D=n.add(m,D),x=n.mul(g,D),m=n.add(S,S),m=n.add(m,S),v=n.mul(F,v),J=n.mul(L,J),m=n.add(m,v),v=n.sub(S,v),v=n.mul(F,v),J=n.add(J,v),S=n.mul(m,J),x=n.add(x,S),S=n.mul(ee,J),g=n.mul(se,g),g=n.sub(g,S),S=n.mul(se,m),D=n.mul(ee,D),D=n.add(D,S),new O(g,x,D)}subtract(M){return this.add(M.negate())}is0(){return this.equals(O.ZERO)}multiply(M){const{endo:j}=e;if(!r.isValidNot0(M))throw new Error("invalid scalar: out of range");let P,q;const C=c=>G.wNAFCached(this,c,O.normalizeZ);if(j){const{k1neg:c,k1:b,k2neg:g,k2:x}=j.splitScalar(M),{p:D,f:F}=C(b),{p:L,f:S}=C(x);q=F.add(S),P=U(j.beta,D,L,c,g)}else{const{p:c,f:b}=C(M);P=c,q=b}return O.normalizeZ([P,q])[0]}multiplyUnsafe(M){const{endo:j}=e,P=this;if(!r.isValid(M))throw new Error("invalid scalar: out of range");if(M===Ws||P.is0())return O.ZERO;if(M===ts)return P;if(G.hasPrecomputes(this))return this.multiply(M);if(j){const{k1neg:q,k1:C,k2neg:c,k2:b}=j.splitScalar(M),{p1:g,p2:x}=Dp(O,P,C,b);return U(j.beta,g,x,q,c)}else return G.wNAFCachedUnsafe(P,M)}multiplyAndAddUnsafe(M,j,P){const q=this.multiplyUnsafe(j).add(M.multiplyUnsafe(P));return q.is0()?void 0:q}toAffine(M){return k(this,M)}isTorsionFree(){const{isTorsionFree:M}=e;return s===ts?!0:M?M(O,this):G.wNAFCachedUnsafe(this,i).is0()}clearCofactor(){const{clearCofactor:M}=e;return s===ts?this:M?M(O,this):this.multiplyUnsafe(s)}toBytes(M=!0){return kr("isCompressed",M),this.assertValidity(),f(O,this,M)}toRawBytes(M=!0){return this.toBytes(M)}toHex(M=!0){return Fr(this.toBytes(M))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}O.BASE=new O(t.Gx,t.Gy,n.ONE),O.ZERO=new O(n.ZERO,n.ONE,n.ZERO),O.Fp=n,O.Fn=r;const $=r.BITS,G=d0(O,e.endo?Math.ceil($/2):$);return O}function Fp(t){const{CURVE:e,curveOpts:n}=b0(t),r=h0(e,n);return Np(t,r)}function m0(t){return Uint8Array.of(t?2:3)}function kp(t,e,n={}){Es(e,{hash:"function"},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const r=e.randomBytes||td,s=e.hmac||((P,...q)=>id(e.hash,P,Fn(...q))),{Fp:i,Fn:o}=t,{ORDER:a,BITS:d}=o;function h(P){const q=a>>ts;return P>q}function f(P){return h(P)?o.neg(P):P}function p(P,q){if(!o.isValidNot0(q))throw new Error(`invalid signature ${P}: out of range 1..CURVE.n`)}class B{constructor(q,C,c){p("r",q),p("s",C),this.r=q,this.s=C,c!=null&&(this.recovery=c),Object.freeze(this)}static fromCompact(q){const C=o.BYTES,c=Je("compactSignature",q,C*2);return new B(o.fromBytes(c.subarray(0,C)),o.fromBytes(c.subarray(C,C*2)))}static fromDER(q){const{r:C,s:c}=$n.toSig(Je("DER",q));return new B(C,c)}assertValidity(){}addRecoveryBit(q){return new B(this.r,this.s,q)}recoverPublicKey(q){const C=i.ORDER,{r:c,s:b,recovery:g}=this;if(g==null||![0,1,2,3].includes(g))throw new Error("recovery id invalid");if(a*vp<C&&g>1)throw new Error("recovery id is ambiguous for h>1 curve");const D=g===2||g===3?c+a:c;if(!i.isValid(D))throw new Error("recovery id 2 or 3 invalid");const F=i.toBytes(D),L=t.fromHex(Fn(m0((g&1)===0),F)),S=o.inv(D),m=_(Je("msgHash",q)),v=o.create(-m*S),se=o.create(b*S),J=t.BASE.multiplyUnsafe(v).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(q){if(q==="compact")return Fn(o.toBytes(this.r),o.toBytes(this.s));if(q==="der")return Do($n.hexFromSig(this));throw new Error("invalid format")}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return Fr(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return Fr(this.toBytes("compact"))}}const A=ud(o,n.allowedPrivateKeyLengths,n.wrapPrivateKey),R={isValidPrivateKey(P){try{return A(P),!0}catch{return!1}},normPrivateKeyToScalar:A,randomPrivateKey:()=>{const P=a;return o0(r(dd(P)),P)},precompute(P=8,q=t.BASE){return q.precompute(P,!1)}};function I(P,q=!0){return t.fromPrivateKey(P).toBytes(q)}function E(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,g=2*c+1;if(!(n.allowedPrivateKeyLengths||o.BYTES===b))return C===b||C===g}function w(P,q,C=!0){if(E(P)===!0)throw new Error("first arg must be private key");if(E(q)===!1)throw new Error("second arg must be public key");return t.fromHex(q).multiply(A(P)).toBytes(C)}const k=e.bits2int||function(P){if(P.length>8192)throw new Error("input is too large");const q=ci(P),C=P.length*8-d;return C>0?q>>BigInt(C):q},_=e.bits2int_modN||function(P){return o.create(k(P))},U=di(d);function O(P){return Xr("num < 2^"+d,P,Ws,U),o.toBytes(P)}function $(P,q,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:g,extraEntropy:x}=C;b==null&&(b=!0),P=Je("msgHash",P),jl(C),g&&(P=Je("prehashed msgHash",c(P)));const D=_(P),F=A(q),L=[O(F),O(D)];if(x!=null&&x!==!1){const se=x===!0?r(i.BYTES):x;L.push(Je("extraEntropy",se))}const S=Fn(...L),m=D;function v(se){const J=k(se);if(!o.isValidNot0(J))return;const ee=o.inv(J),Te=t.BASE.multiply(J).toAffine(),de=o.create(Te.x);if(de===Ws)return;const pe=o.create(ee*o.create(m+de*F));if(pe===Ws)return;let ln=(Te.x===de?0:2)|Number(Te.y&ts),Ce=pe;return b&&h(pe)&&(Ce=f(pe),ln^=1),new B(de,Ce,ln)}return{seed:S,k2sig:v}}const G={lowS:e.lowS,prehash:!1},Y={lowS:e.lowS,prehash:!1};function M(P,q,C=G){const{seed:c,k2sig:b}=$(P,q,C);return bp(e.hash.outputLen,o.BYTES,s)(c,b)}t.BASE.precompute(8);function j(P,q,C,c=Y){const b=P;q=Je("msgHash",q),C=Je("publicKey",C),jl(c);const{lowS:g,prehash:x,format:D}=c;if("strict"in c)throw new Error("options.strict was renamed to lowS");if(D!==void 0&&!["compact","der","js"].includes(D))throw new Error('format must be "compact", "der" or "js"');const F=typeof b=="string"||To(b),L=!F&&!D&&typeof b=="object"&&b!==null&&typeof b.r=="bigint"&&typeof b.s=="bigint";if(!F&&!L)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let S,m;try{if(L)if(D===void 0||D==="js")S=new B(b.r,b.s);else throw new Error("invalid format");if(F){try{D!=="compact"&&(S=B.fromDER(b))}catch(Ce){if(!(Ce instanceof $n.Err))throw Ce}!S&&D!=="der"&&(S=B.fromCompact(b))}m=t.fromHex(C)}catch{return!1}if(!S||g&&S.hasHighS())return!1;x&&(q=e.hash(q));const{r:v,s:se}=S,J=_(q),ee=o.inv(se),Te=o.create(J*ee),de=o.create(v*ee),pe=t.BASE.multiplyUnsafe(Te).add(m.multiplyUnsafe(de));return pe.is0()?!1:o.create(pe.x)===v}return Object.freeze({getPublicKey:I,getSharedSecret:w,sign:M,verify:j,utils:R,Point:t,Signature:B})}function b0(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=Lr(e.n,t.nBitLength),s={Fp:n,Fn:r,allowedPrivateKeyLengths:t.allowedPrivateKeyLengths,allowInfinityPoint:t.allowInfinityPoint,endo:t.endo,wrapPrivateKey:t.wrapPrivateKey,isTorsionFree:t.isTorsionFree,clearCofactor:t.clearCofactor,fromBytes:t.fromBytes,toBytes:t.toBytes};return{CURVE:e,curveOpts:s}}function Op(t){const{CURVE:e,curveOpts:n}=b0(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 Np(t,e){const{Fp:n,Fn:r}=e;function s(a){return Zf(a,ts,r.ORDER)}const i=f0(n,t.a,t.b),o=ud(r,t.allowedPrivateKeyLengths,t.wrapPrivateKey);return Object.assign({},{CURVE:t,Point:e,ProjectivePoint:e,normPrivateKeyToScalar:o,weierstrassEquation:i,isWithinCurveOrder:s})}function Up(t,e){return Object.assign({},e,{ProjectivePoint:e.Point,CURVE:t})}function p0(t){const{CURVE:e,curveOpts:n,ecdsaOpts:r}=Op(t),s=h0(e,n),i=kp(s,r,n);return Up(t,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Lp(t,e){const n=r=>p0({...t,hash:r});return{...n(e),create:n}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const no={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")};BigInt(0);const Mp=BigInt(1),bc=BigInt(2),Gl=(t,e)=>(t+e/bc)/e;function Pp(t){const e=no.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,f=h*h*t%e,p=Xe(f,n,e)*f%e,B=Xe(p,n,e)*f%e,A=Xe(B,bc,e)*h%e,R=Xe(A,s,e)*A%e,I=Xe(R,i,e)*R%e,E=Xe(I,a,e)*I%e,w=Xe(E,d,e)*E%e,k=Xe(w,a,e)*I%e,_=Xe(k,n,e)*f%e,U=Xe(_,o,e)*R%e,O=Xe(U,r,e)*h%e,$=Xe(O,bc,e);if(!pc.eql(pc.sqr($),t))throw new Error("Cannot find square root");return $}const pc=Lr(no.p,void 0,void 0,{sqrt:Pp}),tr=Lp({...no,Fp:pc,lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=no.n,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-Mp*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=n,o=BigInt("0x100000000000000000000000000000000"),a=Gl(i*t,e),d=Gl(-r*t,e);let h=Ze(t-a*n-d*s,e),f=Ze(-a*r-d*i,e);const p=h>o,B=f>o;if(p&&(h=e-h),B&&(f=e-f),h>o||f>o)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:p,k1:h,k2neg:B,k2:f}}}},rd);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Bn=BigInt(0),Wt=BigInt(1),Oa=BigInt(2),Wp=BigInt(8),zp={zip215:!0};function Hp(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 $p(t,e={}){const{Fp:n,Fn:r}=u0("edwards",t,e),{h:s,n:i}=t;Es(e,{},{uvRatio:"function"});const o=Oa<<BigInt(r.BYTES*8)-Wt,a=I=>n.create(I),d=e.uvRatio||((I,E)=>{try{return{isValid:!0,value:n.sqrt(n.div(I,E))}}catch{return{isValid:!1,value:Bn}}});if(!Hp(n,t,t.Gx,t.Gy))throw new Error("bad curve params: generator point");function h(I,E,w=!1){const k=w?Wt:Bn;return Xr("coordinate "+I,E,k,o),E}function f(I){if(!(I instanceof A))throw new Error("ExtendedPoint expected")}const p=js((I,E)=>{const{ex:w,ey:k,ez:_}=I,U=I.is0();E==null&&(E=U?Wp:n.inv(_));const O=a(w*E),$=a(k*E),G=a(_*E);if(U)return{x:Bn,y:Wt};if(G!==Wt)throw new Error("invZ was invalid");return{x:O,y:$}}),B=js(I=>{const{a:E,d:w}=t;if(I.is0())throw new Error("bad point: ZERO");const{ex:k,ey:_,ez:U,et:O}=I,$=a(k*k),G=a(_*_),Y=a(U*U),M=a(Y*Y),j=a($*E),P=a(Y*a(j+G)),q=a(M+a(w*a($*G)));if(P!==q)throw new Error("bad point: equation left != right (1)");const C=a(k*_),c=a(U*O);if(C!==c)throw new Error("bad point: equation left != right (2)");return!0});class A{constructor(E,w,k,_){this.ex=h("x",E),this.ey=h("y",w),this.ez=h("z",k,!0),this.et=h("t",_),Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(E){if(E instanceof A)throw new Error("extended point not allowed");const{x:w,y:k}=E||{};return h("x",w),h("y",k),new A(w,k,Wt,a(w*k))}static normalizeZ(E){return ld(A,"ez",E)}static msm(E,w){return l0(A,r,E,w)}_setWindowSize(E){this.precompute(E)}precompute(E=8,w=!0){return R.setWindowSize(this,E),w||this.multiply(Oa),this}assertValidity(){B(this)}equals(E){f(E);const{ex:w,ey:k,ez:_}=this,{ex:U,ey:O,ez:$}=E,G=a(w*$),Y=a(U*_),M=a(k*$),j=a(O*_);return G===Y&&M===j}is0(){return this.equals(A.ZERO)}negate(){return new A(a(-this.ex),this.ey,this.ez,a(-this.et))}double(){const{a:E}=t,{ex:w,ey:k,ez:_}=this,U=a(w*w),O=a(k*k),$=a(Oa*a(_*_)),G=a(E*U),Y=w+k,M=a(a(Y*Y)-U-O),j=G+O,P=j-$,q=G-O,C=a(M*P),c=a(j*q),b=a(M*q),g=a(P*j);return new A(C,c,g,b)}add(E){f(E);const{a:w,d:k}=t,{ex:_,ey:U,ez:O,et:$}=this,{ex:G,ey:Y,ez:M,et:j}=E,P=a(_*G),q=a(U*Y),C=a($*k*j),c=a(O*M),b=a((_+U)*(G+Y)-P-q),g=c-C,x=c+C,D=a(q-w*P),F=a(b*g),L=a(x*D),S=a(b*D),m=a(g*x);return new A(F,L,m,S)}subtract(E){return this.add(E.negate())}multiply(E){const w=E;Xr("scalar",w,Wt,i);const{p:k,f:_}=R.wNAFCached(this,w,A.normalizeZ);return A.normalizeZ([k,_])[0]}multiplyUnsafe(E,w=A.ZERO){const k=E;return Xr("scalar",k,Bn,i),k===Bn?A.ZERO:this.is0()||k===Wt?this:R.wNAFCachedUnsafe(this,k,A.normalizeZ,w)}isSmallOrder(){return this.multiplyUnsafe(s).is0()}isTorsionFree(){return R.wNAFCachedUnsafe(this,i).is0()}toAffine(E){return p(this,E)}clearCofactor(){return s===Wt?this:this.multiplyUnsafe(s)}static fromBytes(E,w=!1){return Xt(E),this.fromHex(E,w)}static fromHex(E,w=!1){const{d:k,a:_}=t,U=n.BYTES;E=Je("pointHex",E,U),kr("zip215",w);const O=E.slice(),$=E[U-1];O[U-1]=$&-129;const G=Vs(O),Y=w?o:n.ORDER;Xr("pointHex.y",G,Bn,Y);const M=a(G*G),j=a(M-Wt),P=a(k*M-_);let{isValid:q,value:C}=d(j,P);if(!q)throw new Error("Point.fromHex: invalid y coordinate");const c=(C&Wt)===Wt,b=($&128)!==0;if(!w&&C===Bn&&b)throw new Error("Point.fromHex: x=0 and x_0=1");return b!==c&&(C=a(-C)),A.fromAffine({x:C,y:G})}static fromPrivateScalar(E){return A.BASE.multiply(E)}toBytes(){const{x:E,y:w}=this.toAffine(),k=vo(w,n.BYTES);return k[k.length-1]|=E&Wt?128:0,k}toRawBytes(){return this.toBytes()}toHex(){return Fr(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}A.BASE=new A(t.Gx,t.Gy,Wt,a(t.Gx*t.Gy)),A.ZERO=new A(Bn,Wt,Wt,Bn),A.Fp=n,A.Fn=r;const R=d0(A,r.BYTES*8);return A}function qp(t,e){Es(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||td,h=e.adjustScalarBytes||(O=>O),f=e.domain||((O,$,G)=>{if(kr("phflag",G),$.length||G)throw new Error("Contexts/pre-hash are not supported");return O});function p(O){return o.create(O)}function B(O){return p(Vs(O))}function A(O){const $=i.BYTES;O=Je("private key",O,$);const G=Je("hashed private key",r(O),2*$),Y=h(G.slice(0,$)),M=G.slice($,2*$),j=B(Y);return{head:Y,prefix:M,scalar:j}}function R(O){const{head:$,prefix:G,scalar:Y}=A(O),M=s.multiply(Y),j=M.toBytes();return{head:$,prefix:G,scalar:Y,point:M,pointBytes:j}}function I(O){return R(O).pointBytes}function E(O=Uint8Array.of(),...$){const G=Fn(...$);return B(r(f(G,Je("context",O),!!n)))}function w(O,$,G={}){O=Je("message",O),n&&(O=n(O));const{prefix:Y,scalar:M,pointBytes:j}=R($),P=E(G.context,Y,O),q=s.multiply(P).toBytes(),C=E(G.context,q,j,O),c=p(P+C*M);Xr("signature.s",c,Bn,a);const b=i.BYTES,g=Fn(q,vo(c,b));return Je("result",g,b*2)}const k=zp;function _(O,$,G,Y=k){const{context:M,zip215:j}=Y,P=i.BYTES;O=Je("signature",O,2*P),$=Je("message",$),G=Je("publicKey",G,P),j!==void 0&&kr("zip215",j),n&&($=n($));const q=Vs(O.slice(P,2*P));let C,c,b;try{C=t.fromHex(G,j),c=t.fromHex(O.slice(0,P),j),b=s.multiplyUnsafe(q)}catch{return!1}if(!j&&C.isSmallOrder())return!1;const g=E(M,c.toBytes(),C.toBytes(),$);return c.add(C.multiplyUnsafe(g)).subtract(b).clearCofactor().is0()}return s.precompute(8),{getPublicKey:I,sign:w,verify:_,utils:{getExtendedPublicKey:R,randomPrivateKey:()=>d(i.BYTES),precompute(O=8,$=t.BASE){return $.precompute(O,!1)}},Point:t}}function Kp(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=Lr(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 Vp(t,e){return Object.assign({},e,{ExtendedPoint:e.Point,CURVE:t})}function jp(t){const{CURVE:e,curveOpts:n,eddsaOpts:r}=Kp(t),s=$p(e,n),i=qp(s,r);return Vp(t,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */BigInt(0);const Gp=BigInt(1),Yl=BigInt(2);BigInt(3);const Yp=BigInt(5),Xp=BigInt(8),Io={p:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:Xp,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function Jp(t){const e=BigInt(10),n=BigInt(20),r=BigInt(40),s=BigInt(80),i=Io.p,a=t*t%i*t%i,d=Xe(a,Yl,i)*a%i,h=Xe(d,Gp,i)*t%i,f=Xe(h,Yp,i)*h%i,p=Xe(f,e,i)*f%i,B=Xe(p,n,i)*p%i,A=Xe(B,r,i)*B%i,R=Xe(A,s,i)*A%i,I=Xe(R,s,i)*A%i,E=Xe(I,e,i)*f%i;return{pow_p_5_8:Xe(E,Yl,i)*t%i,b2:a}}function Zp(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}const Xl=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function Qp(t,e){const n=Io.p,r=Ze(e*e*e,n),s=Ze(r*r*e,n),i=Jp(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*Xl,n),f=a===t,p=a===Ze(-t,n),B=a===Ze(-t*Xl,n);return f&&(o=d),(p||B)&&(o=h),Sp(o,n)&&(o=Ze(-o,n)),{isValid:f||p,value:o}}const eg=Lr(Io.p,void 0,!0),tg={...Io,Fp:eg,hash:sd,adjustScalarBytes:Zp,uvRatio:Qp},Mr=jp(tg),ng=[{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 cr(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!E1(()=>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 pf.decode(e);case"bech32":return mf.decodeToBytes(e).bytes;case"algorandAppId":return hp(pn(ng,{appId:BigInt(e)}));case"sha256":return eo(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 rg(t){return typeof t=="object"&&"setChain"in t}const gc=new Map;function fd(t,e){gc.has(t)||gc.set(t,e)}function cr(t,e){const n=mn.get(t),r=gc.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 rg(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 g0(t,e){const n=mn.get(t);return new xt(e,Y1.get(n))}function sg(t){return"getVersion"in t}const nr={};function ig(t,e,n){e in nr||(nr[e]={});const r=nr[e];if(t in r)throw new Error(`Protocol ${t} for protocol ${e} has already registered`);nr[e][t]=n}function og(t,e){const n=oi(t)?mn.get(t):t;return e in nr?n in nr[e]:!1}function y0(t,e){if(e in nr){const n=nr[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 ag=(t,e,n,r)=>y0(t,e).fromRpc(n,r),yc=(t,e)=>t?`${t}:${e}`:e,Ec=new Map;function cg(t,e,n){const r=yc(t,e);if(Ec.has(r))throw new Error(`Payload type ${r} already registered`);Ec.set(r,n)}function yt(t,e){for(const[n,r]of e)cg(t,n,r)}const $e={binary:"uint",size:32},E0={binary:"uint",size:2},Ht=t=>({...E0,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=ps(e),r=(t==null?void 0:t.allowedChains)??gf;if(!r.includes(n))throw new Error(`Chain ${n} not in allowed chains ${r}`);return n},from:e=>e==null?0:ii(e)}}),dg=t=>({...E0,custom:{to:t,from:ii(t)}}),ds={binary:"uint",size:4},Fo={binary:"uint",size:8},A0={to:t=>new Date(Number(t*1000n)),from:t=>BigInt(t.getTime())/1000n},hd={binary:"uint",size:4},Xn=t=>({name:"payloadId",binary:"uint",size:1,custom:t,omit:!0}),ko={binary:"uint",size:8};class lg{constructor(e,n,r){ie(this,"r");ie(this,"s");ie(this,"v");this.r=e,this.s=n,this.v=r}encode(){return pn(ro,this)}static decode(e){return gn(ro,e)}}var Jl;(function(t){function e(i){return tr.getPublicKey(i)}t.toPubkey=e;function n(i,o){if(o.length!=32)throw new Error("hash.length != 32");return tr.sign(o,i)}t.sign=n;function r(i,o,a){const{r:d,s:h}=i;return tr.verify({r:d,s:h},a,o)}t.validate=r;function s(i,o){const{r:a,s:d,v:h}=i,f=new tr.Signature(a,d);return f.recovery=h,f.recoverPublicKey(o).toRawBytes()}t.recover=s})(Jl||(Jl={}));const ug=[{name:"r",binary:"uint",size:32},{name:"s",binary:"uint",size:32},{name:"v",binary:"uint",size:1}],ro={binary:"bytes",layout:ug,custom:{to:t=>new lg(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()}},fg=t=>{const e=t.findIndex(n=>n!==0);return-1<e?t.slice(e):new Uint8Array([])},w0={to:Pt.decode,from:Pt.encode},md=t=>({binary:"bytes",size:t,custom:{to:e=>Pt.decode(fg(e)),from:e=>Pt.zpad(Pt.encode(e),t)}});function S0(t){const e=t.indexOf(":");return e!==-1?[t.slice(0,e),t.slice(e+1)]:[null,t]}const hg=[{name:"guardianIndex",binary:"uint",size:1},{name:"signature",...ro}],bd=[{name:"version",binary:"uint",size:1,custom:1,omit:!0},{name:"guardianSet",...hd},{name:"signatures",binary:"array",lengthSize:1,layout:hg}],pd=[{name:"timestamp",binary:"uint",size:4},{name:"nonce",binary:"uint",size:4},{name:"emitterChain",...Ht()},{name:"emitterAddress",...be},{name:"sequence",...ko},{name:"consistencyLevel",binary:"uint",size:1}],mg=[...bd,...pd];function Gs(t){const e=Ec.get(t);if(!e)throw new Error(`No layout registered for payload type ${t}`);return e}function C0(t){return{name:"payload",binary:"bytes",...t==="Uint8Array"?{}:{layout:Gs(t)}}}function zi(t){const e=[...mg,C0(t.payloadLiteral)];return pn(e,t)}function bg(t,e){if(t==="Uint8Array")return e;const n=Gs(t);return pn(n,e)}function gd(t,e){const n=(()=>{if(Array.isArray(t[0]))return t.flatMap(([o,a])=>a.map(d=>yc(o,d)));if(typeof t[1]=="string")return t;const[s,i]=t;return i.map(o=>yc(s,o))})(),r=v1(n.map(s=>Gs(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 ns(t,e){typeof e=="string"&&(e=wt.decode(e));const[n,r]=gn(bd,e,!1);for(let A=1;A<n.signatures.length;++A)if(n.signatures[A].guardianIndex<=n.signatures[A-1].guardianIndex)throw new Error("Guardian signatures must be in ascending order of guardian set index");const s=r,[i,o]=gn(pd,e.subarray(s),!1),a=s+o,[d,h]=typeof t=="string"?[t,Zl(t,e.subarray(a))]:Zl(t,e.subarray(a)),[f,p]=S0(d),B=Ks(e.slice(s));return{protocolName:f,payloadName:p,payloadLiteral:d,...n,...i,payload:h,hash:B}}function Zl(t,e,n=0){return(()=>{if(typeof e=="string"&&(e=wt.decode(e)),t==="Uint8Array")return e.slice(n);if(typeof t=="string")return gn(Gs(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,gn(Gs(r),e.subarray(n))]})()}function pg(t){return t.getBalances!==void 0}class gg{constructor(e,n){ie(this,"network");ie(this,"config");this.network=e,this.config=n}utils(){return this.constructor}getProtocol(e,n){return ag(this.utils()._platform,e,n,this.config)}getProtocolInitializer(e){return y0(this.utils()._platform,e)}async parseWormholeMessages(e,n,r){return(await this.getProtocol("WormholeCore",n)).parseTransaction(r)}}const yg=[["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"}]]]],Ql=fe(yg,[0,[1,2]]),Eg=[["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"}]]]],eu=fe(Eg,[0,[1,2]]);function Oo(t,e){if(t!=="Devnet"){if(t==="Mainnet"){if(!Ql.has(e))return;const n=Ql.get(e);return Object.fromEntries(n.map(([r,s])=>[r,{...s,chain:e,key:r}]))}if(t==="Testnet"){if(!eu.has(e))return;const n=eu.get(e);return Object.fromEntries(n.map(([r,s])=>[r,{...s,chain:e,key:r}]))}throw new Error("Unsupported network: "+t)}}function Ag(t,e){const n=Oo(t,e);return n?gs.native(n):void 0}function wg(t,e,n){const r=Oo(t,e);return r?gs.byAddress(r,n):void 0}function Sg(t,e,n){const r=Oo(t,e);return r?gs.byKey(r,n):void 0}function Cg(t,e){const n={coreBridge:pb.get(t,e),tokenBridge:gb.get(t,e),nftBridge:Ab.get(t,e),relayer:wb.get(t,e),tokenBridgeRelayer:yb.get(t,e),tbtc:Pi.get(t,e),executor:Eb.get(t,e)};return uc.has(t,e)&&(n.executorTokenBridge=uc.get(t,e)),fc.has(t,e)&&(n.cctp=fc.get(t,e)),kl.has(t,e)&&(n.gateway=kl.get(t,e)),Ol.has(t,e)&&(n.translator=Ol.get(t,e)),Nl.has(t,e)&&(n.portico=Nl.get(t,e)),Pi.has(t,e)&&(n.tbtc=Pi.get(t,e)),n}function Lt(t){return typeof t=="string"&&t==="native"}function yd(t){return{chain:t,address:"native"}}function No(t){return typeof t=="object"&&t.address!==void 0&&t.chain!==void 0&&oi(t.chain)}function B0(t,e){return t.chain!==e.chain?!1:Lt(t.address)&&Lt(e.address)?!0:On(t)===On(e)}function On(t){return No(t)&&Lt(t.address)?t.address:t.address.toNative(t.chain).toString()}function Bg(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 x0(t,e,n){let r;if(No(n)){if(!Lt(n.address))return[!1,n];r=n.address}else r=n;if(Lt(r)){const i=Ag(t,e);if(!i)throw new Error("Invalid destination token");const o=i.wrappedKey,a=Sg(t,e,o);if(!a)throw new Error("Invalid wrapped token key: "+o);return[!0,{chain:e,address:cr(e,a.address)}]}return[!1,{chain:e,address:r}]}function _0(t){return t.chain!==void 0&&t.txid!==void 0}function Na(t){return gf.map(n=>{const r=mn(n);let s="";try{s=xf.get(t,n)}catch{}const i=Oo(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:hn(n),finalityThreshold:Af.get(n)??0,blockTime:wf.get(n)??0,contracts:Cg(t,n),nativeTokenDecimals:Sf(r),nativeChainId:s,tokenMap:i,wrappedNative:a,explorer:nb(t,n),rpc:Cf(t,n)}}).reduce((n,r)=>({...n,[r.key]:r}),{})}function xg(t){return T0(t)||Ed(t)}function T0(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 Ed(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 _g{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 Br(t){return t.sequence!==void 0&&t.emitter!==void 0&&t.chain!==void 0}function so(t){return t.hash!==void 0}const tu=t=>[Xn(1),{name:"token",binary:"bytes",layout:[{name:"address",...be},{name:"amount",...$e}]},{name:"sourceDomain",...ds},{name:"targetDomain",...ds},{name:"nonce",...Fo},{name:"caller",...be},{name:"mintRecipient",...be},So({name:"payload",lengthSize:2},t)],Tg=[Xn(1),{name:"targetRelayerFee",...$e},{name:"toNativeTokenAmount",...$e},{name:"targetRecipient",...be}],Dg=[["DepositWithPayload",tu()],["TransferWithRelay",tu(Tg)]];yt("AutomaticCircleBridge",Dg);const D0={binary:"uint",size:4,custom:0,omit:!0},Rg=[{name:"messageBodyVersion",...D0},{name:"burnToken",...be},{name:"mintRecipient",...be},{name:"amount",...$e},{name:"messageSender",...be}],Ac=[{name:"version",...D0},{name:"sourceDomain",...ds},{name:"destinationDomain",...ds},{name:"nonce",...Fo},{name:"sender",...be},{name:"recipient",...be},{name:"destinationCaller",...be},{name:"payload",binary:"bytes",layout:Rg}],vg=[["Message",Ac]];yt("CircleBridge",vg);exports.CircleBridge=void 0;(function(t){t.isCircleAttestation=e=>e.message!==void 0,t.deserialize=e=>{const n=gn(Ac,e),r=wt.encode(Ks(e),!0);return[n,r]},t.serialize=e=>pn(Ac,e)})(exports.CircleBridge||(exports.CircleBridge={}));var nu;(function(t){const e="AutomaticCircleBridge",n=["DepositWithPayload","TransferWithRelay"];t.getTransferDiscriminator=qc(()=>gd([e,n]))})(nu||(nu={}));function Ig(t){return t.amount!==void 0&&t.from!==void 0&&t.to!==void 0}const ru={binary:"bytes",size:32,custom:{to:t=>ji(t.byteLength).map(e=>String.fromCharCode(t[e])).join(""),from:t=>new Uint8Array(t.split("").map(e=>e.charCodeAt(0)))}},R0=[{name:"token",binary:"bytes",layout:[{name:"amount",...$e},{name:"address",...be},{name:"chain",...Ht()}]},{name:"to",binary:"bytes",layout:[{name:"address",...be},{name:"chain",...Ht()}]}],v0=[Xn(1),...R0,{name:"fee",...$e}],li=t=>[Xn(3),...R0,{name:"from",...be},So({name:"payload"},t)],Fg=[["AttestMeta",[Xn(2),{name:"token",binary:"bytes",layout:[{name:"address",...be},{name:"chain",...Ht()}]},{name:"decimals",binary:"uint",size:1},{name:"symbol",...ru},{name:"name",...ru}]],["Transfer",v0],["TransferWithPayload",li()]];yt("TokenBridge",Fg);const kg=O1(["shouldWrapNative","shouldUnwrapNative"]),io=[{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",...kg}];({...be},{...$e}),{...be},{...be},{...be},{...$e},{...$e},{...$e},{...$e};const wc=[{name:"flagSet",binary:"bytes",layout:io},{name:"finalTokenAddress",...be},{name:"recipientAddress",...be},{name:"cannonAssetAmount",...$e},{name:"minAmountFinish",...$e},{name:"relayerFee",...$e}],Og=[["Transfer",li(wc)]];yt("PorticoBridge",Og);exports.PorticoBridge=void 0;(function(t){t.deserializePayload=e=>gn(wc,e),t.serializePayload=e=>pn(wc,e),t.deserializeFlagSet=e=>gn(io,e),t.serializeFlagSet=e=>pn(io,e)})(exports.PorticoBridge||(exports.PorticoBridge={}));const I0={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",...$e},{name:"targetChainRefundPerGasUnused",...$e}]},su={binary:"bytes",layout:[{name:"chain",...Ht()},{name:"address",...be}]},Ng=[{name:"chain",...Ht()},{name:"emitterAddress",...be},{name:"sequence",...ko}],Ug=[{name:"size",binary:"uint",size:4,custom:12,omit:!0},{name:"domain",...ds},{name:"nonce",...Fo}],F0={binary:"switch",idSize:1,idTag:"keyType",layouts:[[[1,"VAA"],Ng],[[2,"CCTP"],Ug]]},k0=t=>[Xn(1),{name:"target",...su},So({name:"payload",lengthSize:4},t),{name:"requestedReceiverValue",...$e},{name:"extraReceiverValue",...$e},{name:"executionInfo",...I0},{name:"refund",...su},{name:"refundDeliveryProvider",...be},{name:"sourceDeliveryProvider",...be},{name:"senderAddress",...be},{name:"messageKeys",binary:"array",lengthSize:1,layout:F0}],Lg=[["DeliveryInstruction",k0()],["RedeliveryInstruction",[Xn(2),{name:"deliveryVaaKey",binary:"bytes",layout:F0},{name:"targetChain",...Ht()},{name:"newRequestedReceiverValue",...$e},{name:"newEncodedExecutionInfo",...I0},{name:"newSourceDeliveryProvider",...be},{name:"newSenderAddress",...be}]]];yt("Relayer",Lg);const Mg=[Xn(1),{name:"targetRelayerFee",...$e},{name:"toNativeTokenAmount",...$e},{name:"targetRecipient",...be}],Pg=[["TransferWithRelay",li(Mg)]];yt("AutomaticTokenBridge",Pg);const Wg=t=>new Error(`Token ${t} is not a wrapped asset`);var Sc;(function(t){const e="TokenBridge",n=["Transfer","TransferWithPayload"],r=["AttestMeta"];[...n,...r],t.getTransferDiscriminator=qc(()=>gd([e,n]))})(Sc||(Sc={}));function zg(t){return t.token!==void 0&&t.amount!==void 0&&t.from!==void 0&&t.to!==void 0}const Hg=[{name:"targetRecipient",...be}],$g=[["TransferWithExecutorRelay",li(Hg)]];yt("ExecutorTokenBridge",$g);const qg=[["Add",1],["Subtract",2],["Unknown",3]],Cc={binary:"bytes",size:20,custom:{to:t=>wt.encode(t,!0),from:t=>wt.decode(t)}},Kg=[["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:yf("Evm")})}]]],["GuardianSetUpgrade",[!0,[{name:"guardianSet",...hd},{name:"guardians",binary:"array",lengthSize:1,layout:Cc}]]],["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}]]]],Ua={binary:"bytes",size:32},iu=[{name:"contractAddr",...be},{name:"codeId",binary:"uint",size:8}],Vg=[["StoreCode",[!1,[{name:"wasmHash",...Ua}]]],["InstantiateContract",[!1,[{name:"instantiationParamsHash",...Ua}]]],["MigrateContract",[!1,[{name:"migrationParamsHash",...Ua}]]],["AddWasmInstantiateAllowlist",[!1,iu]],["DeleteWasmInstantiateAllowlist",[!1,iu]]],jg=(()=>{const t=s=>({binary:"bytes",size:s,custom:w0}),e=[{name:"height",binary:"uint",size:8}],n=af(e),r=s=>[{name:"name",...t(s)},...e];return{binary:"bytes",custom:{to:s=>gn(r(s.length-n),s),from:s=>pn(r(s.name.length),s)}}})(),Gg=[["ScheduleUpgrade",[!1,jg]],["CancelUpgrade",[!0,[]]],["SetIbcComposabilityMwContract",[!1,[{name:"contractAddress",...be}]]]],Yg=[["ModifyBalance",[!1,[{name:"sequence",...ko},{name:"modifiedChain",...Ht()},{name:"tokenChain",...Ht()},{name:"tokenAddress",...be},{name:"kind",...k1(qg)},{name:"amount",...$e},{name:"reason",...md(32)}]]]],Xg=[["ActionUpdateChannelChain",[!1,[{name:"channelId",...md(64)},{name:"channelChain",...Ht({allowedChains:yf("Cosmwasm")})}]]]],Jg=[["GeneralPurposeEvm",[!1,[{name:"governanceContract",...Cc},{name:"targetContract",...Cc},{name:"payload",binary:"bytes",lengthSize:2}]]],["GeneralPurposeSolana",[!1,[{name:"governanceContract",...be},{name:"payload",binary:"bytes"}]]]],O0=[...Kg,...Vg,...Gg,...Yg,...Xg,...Jg];nf(O0,0);const ou=Object.fromEntries(O0),Zg=[["WormholeCore","Core"],["TokenBridge","TokenBridge"],["NftBridge","NftBridge"],["Relayer","WormholeRelayer"],["CircleBridge","CircleIntegration"],["IbcBridge","IbcTranslator"],["IbcReceiver","IbcReceiver"],["GlobalAccountant","GlobalAccountant"],["GeneralPurposeGovernance","GeneralPurposeGovernance"],["WormchainGovernance","WasmdModule"],["GatewayGovernance","GatewayModule"]],Qg=fe(Zg),ey=t=>({to:t,from:(()=>{const n=new Uint8Array(32),r=Qg(t);for(let s=1;s<=r.length;++s)n[32-s]=r.charCodeAt(r.length-s);return n})()}),ty=(t,e)=>({to:t,from:e}),ny=(t,e,n)=>[{name:"protocol",binary:"bytes",custom:ey(t)},{name:"action",binary:"uint",size:1,custom:ty(e,n)},{name:"chain",...Ht({allowNull:ou[e][0]})},{name:"actionArgs",binary:"bytes",layout:ou[e][1]}],Re=(t,e,n)=>[e,ny(t,e,n)],ry=[Re("WormholeCore","UpgradeContract",1),Re("WormholeCore","GuardianSetUpgrade",2),Re("WormholeCore","SetMessageFee",3),Re("WormholeCore","TransferFees",4),Re("WormholeCore","RecoverChainId",5)],sy=[Re("TokenBridge","RegisterChain",1),Re("TokenBridge","UpgradeContract",2),Re("TokenBridge","RecoverChainId",3)],iy=[Re("NftBridge","RegisterChain",1),Re("NftBridge","UpgradeContract",2),Re("NftBridge","RecoverChainId",3)],oy=[Re("Relayer","RegisterChain",1),Re("Relayer","UpgradeContract",2),Re("Relayer","UpdateDefaultProvider",3)],ay=[Re("CircleBridge","UpdateFinality",1),Re("CircleBridge","RegisterEmitterAndDomain",2),Re("CircleBridge","UpgradeContract",3)],cy=[Re("IbcBridge","ActionUpdateChannelChain",1)],dy=[Re("IbcReceiver","ActionUpdateChannelChain",1)],ly=[Re("GlobalAccountant","ModifyBalance",1)],uy=[Re("GeneralPurposeGovernance","GeneralPurposeEvm",1),Re("GeneralPurposeGovernance","GeneralPurposeSolana",2)],fy=[Re("WormchainGovernance","StoreCode",1),Re("WormchainGovernance","InstantiateContract",2),Re("WormchainGovernance","MigrateContract",3),Re("WormchainGovernance","AddWasmInstantiateAllowlist",4),Re("WormchainGovernance","DeleteWasmInstantiateAllowlist",5)],hy=[Re("GatewayGovernance","ScheduleUpgrade",1),Re("GatewayGovernance","CancelUpgrade",2),Re("GatewayGovernance","SetIbcComposabilityMwContract",3)];yt("WormholeCore",ry);yt("TokenBridge",sy);yt("NftBridge",iy);yt("Relayer",oy);yt("CircleBridge",ay);yt("IbcBridge",cy);yt("IbcReceiver",dy);yt("GlobalAccountant",ly);yt("GeneralPurposeGovernance",uy);yt("WormchainGovernance",fy);yt("GatewayGovernance",hy);exports.TBTCBridge=void 0;(function(t){const e="TBTCBridge",n=["GatewayTransfer","Transfer"];[...n],t.getTransferDiscriminator=qc(()=>gd([e,n])),t.getNativeTbtcToken=r=>{const s=Db.get("Mainnet",r);if(s)return{chain:r,address:cr(r,s)}}})(exports.TBTCBridge||(exports.TBTCBridge={}));const my=[{name:"recipient",...be}],by=[["GatewayTransfer",li(my)],["Transfer",v0]];yt("TBTCBridge",by);const py=[{name:"gasLimit",binary:"uint",size:16},{name:"msgValue",binary:"uint",size:16}],gy=[{name:"dropOff",binary:"uint",size:16},{name:"recipient",...be}],yy=[{name:"request",binary:"switch",idSize:1,idTag:"type",layouts:[[[1,"GasInstruction"],py],[[2,"GasDropOffInstruction"],gy]]}],N0=[{name:"requests",binary:"array",layout:yy}],Ey=[{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:A0},{name:"baseFee",binary:"uint",size:8},{name:"dstGasPrice",binary:"uint",size:8},{name:"srcPrice",binary:"uint",size:8},{name:"dstPrice",binary:"uint",size:8}]]]}],U0=[...Ey,{name:"signature",binary:"bytes",size:65}];var Jr;(function(t){t.Pending="pending",t.Failed="failed",t.Unsupported="unsupported",t.Submitted="submitted",t.Underpaid="underpaid",t.Aborted="aborted"})(Jr||(Jr={}));var au;(function(t){t.ERM1="ERM1",t.ERV1="ERV1",t.ERN1="ERN1",t.ERC1="ERC1",t.ERC2="ERC2"})(au||(au={}));async function Ay(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 wy(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:hn(e),dstChain:hn(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 Sy(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:hn(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 L0(t,e){return function(){return t.apply(e,arguments)}}const{toString:Cy}=Object.prototype,{getPrototypeOf:Ad}=Object,{iterator:Uo,toStringTag:M0}=Symbol,Lo=(t=>e=>{const n=Cy.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),En=t=>(t=t.toLowerCase(),e=>Lo(e)===t),Mo=t=>e=>typeof e===t,{isArray:As}=Array,Ys=Mo("undefined");function By(t){return t!==null&&!Ys(t)&&t.constructor!==null&&!Ys(t.constructor)&&Gt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const P0=En("ArrayBuffer");function xy(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&P0(t.buffer),e}const _y=Mo("string"),Gt=Mo("function"),W0=Mo("number"),Po=t=>t!==null&&typeof t=="object",Ty=t=>t===!0||t===!1,Hi=t=>{if(Lo(t)!=="object")return!1;const e=Ad(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(M0 in t)&&!(Uo in t)},Dy=En("Date"),Ry=En("File"),vy=En("Blob"),Iy=En("FileList"),Fy=t=>Po(t)&&Gt(t.pipe),ky=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Gt(t.append)&&((e=Lo(t))==="formdata"||e==="object"&&Gt(t.toString)&&t.toString()==="[object FormData]"))},Oy=En("URLSearchParams"),[Ny,Uy,Ly,My]=["ReadableStream","Request","Response","Headers"].map(En),Py=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ui(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),As(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 z0(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 Sr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Ie.global,H0=t=>!Ys(t)&&t!==Sr;function Bc(){const{caseless:t}=H0(this)&&this||{},e={},n=(r,s)=>{const i=t&&z0(e,s)||s;Hi(e[i])&&Hi(r)?e[i]=Bc(e[i],r):Hi(r)?e[i]=Bc({},r):As(r)?e[i]=r.slice():e[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&ui(arguments[r],n);return e}const Wy=(t,e,n,{allOwnKeys:r}={})=>(ui(e,(s,i)=>{n&&Gt(s)?t[i]=L0(s,n):t[i]=s},{allOwnKeys:r}),t),zy=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Hy=(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)},$y=(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&&Ad(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},qy=(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},Ky=t=>{if(!t)return null;if(As(t))return t;let e=t.length;if(!W0(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Vy=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ad(Uint8Array)),jy=(t,e)=>{const r=(t&&t[Uo]).call(t);let s;for(;(s=r.next())&&!s.done;){const i=s.value;e.call(t,i[0],i[1])}},Gy=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Yy=En("HTMLFormElement"),Xy=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),cu=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Jy=En("RegExp"),$0=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};ui(n,(s,i)=>{let o;(o=e(s,i,t))!==!1&&(r[i]=o||s)}),Object.defineProperties(t,r)},Zy=t=>{$0(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+"'")})}})},Qy=(t,e)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return As(t)?r(t):r(String(t).split(e)),n},eE=()=>{},tE=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function nE(t){return!!(t&&Gt(t.append)&&t[M0]==="FormData"&&t[Uo])}const rE=t=>{const e=new Array(10),n=(r,s)=>{if(Po(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[s]=r;const i=As(r)?[]:{};return ui(r,(o,a)=>{const d=n(o,s+1);!Ys(d)&&(i[a]=d)}),e[s]=void 0,i}}return r};return n(t,0)},sE=En("AsyncFunction"),iE=t=>t&&(Po(t)||Gt(t))&&Gt(t.then)&&Gt(t.catch),q0=((t,e)=>t?setImmediate:e?((n,r)=>(Sr.addEventListener("message",({source:s,data:i})=>{s===Sr&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Sr.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Gt(Sr.postMessage)),oE=typeof queueMicrotask<"u"?queueMicrotask.bind(Sr):typeof Ie.process<"u"&&Ie.process.nextTick||q0,aE=t=>t!=null&&Gt(t[Uo]),K={isArray:As,isArrayBuffer:P0,isBuffer:By,isFormData:ky,isArrayBufferView:xy,isString:_y,isNumber:W0,isBoolean:Ty,isObject:Po,isPlainObject:Hi,isReadableStream:Ny,isRequest:Uy,isResponse:Ly,isHeaders:My,isUndefined:Ys,isDate:Dy,isFile:Ry,isBlob:vy,isRegExp:Jy,isFunction:Gt,isStream:Fy,isURLSearchParams:Oy,isTypedArray:Vy,isFileList:Iy,forEach:ui,merge:Bc,extend:Wy,trim:Py,stripBOM:zy,inherits:Hy,toFlatObject:$y,kindOf:Lo,kindOfTest:En,endsWith:qy,toArray:Ky,forEachEntry:jy,matchAll:Gy,isHTMLForm:Yy,hasOwnProperty:cu,hasOwnProp:cu,reduceDescriptors:$0,freezeMethods:Zy,toObjectSet:Qy,toCamelCase:Xy,noop:eE,toFiniteNumber:tE,findKey:z0,global:Sr,isContextDefined:H0,isSpecCompliantForm:nE,toJSONObject:rE,isAsyncFn:sE,isThenable:iE,setImmediate:q0,asap:oE,isIterable:aE};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 K0=me.prototype,V0={};["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=>{V0[t]={value:t}});Object.defineProperties(me,V0);Object.defineProperty(K0,"isAxiosError",{value:!0});me.from=(t,e,n,r,s,i)=>{const o=Object.create(K0);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 cE=null;function xc(t){return K.isPlainObject(t)||K.isArray(t)}function j0(t){return K.endsWith(t,"[]")?t.slice(0,-2):t}function du(t,e,n){return t?t.concat(e).map(function(s,i){return s=j0(s),!n&&i?"["+s+"]":s}).join(n?".":""):e}function dE(t){return K.isArray(t)&&!t.some(xc)}const lE=K.toFlatObject(K,{},null,function(e){return/^is[A-Z]/.test(e)});function Wo(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(I,E){return!K.isUndefined(E[I])});const r=n.metaTokens,s=n.visitor||f,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(R){if(R===null)return"";if(K.isDate(R))return R.toISOString();if(K.isBoolean(R))return R.toString();if(!d&&K.isBlob(R))throw new me("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(R)||K.isTypedArray(R)?d&&typeof Blob=="function"?new Blob([R]):Ie.Buffer.from(R):R}function f(R,I,E){let w=R;if(R&&!E&&typeof R=="object"){if(K.endsWith(I,"{}"))I=r?I:I.slice(0,-2),R=JSON.stringify(R);else if(K.isArray(R)&&dE(R)||(K.isFileList(R)||K.endsWith(I,"[]"))&&(w=K.toArray(R)))return I=j0(I),w.forEach(function(_,U){!(K.isUndefined(_)||_===null)&&e.append(o===!0?du([I],U,i):o===null?I:I+"[]",h(_))}),!1}return xc(R)?!0:(e.append(du(E,I,i),h(R)),!1)}const p=[],B=Object.assign(lE,{defaultVisitor:f,convertValue:h,isVisitable:xc});function A(R,I){if(!K.isUndefined(R)){if(p.indexOf(R)!==-1)throw Error("Circular reference detected in "+I.join("."));p.push(R),K.forEach(R,function(w,k){(!(K.isUndefined(w)||w===null)&&s.call(e,w,K.isString(k)?k.trim():k,I,B))===!0&&A(w,I?I.concat(k):[k])}),p.pop()}}if(!K.isObject(t))throw new TypeError("data must be an object");return A(t),e}function lu(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function wd(t,e){this._pairs=[],t&&Wo(t,this,e)}const G0=wd.prototype;G0.append=function(e,n){this._pairs.push([e,n])};G0.toString=function(e){const n=e?function(r){return e.call(this,r,lu)}:lu;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function uE(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Y0(t,e,n){if(!e)return t;const r=n&&n.encode||uE;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 wd(e,n).toString(r),i){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class uu{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 X0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fE=typeof URLSearchParams<"u"?URLSearchParams:wd,hE=typeof FormData<"u"?FormData:null,mE=typeof Blob<"u"?Blob:null,bE={isBrowser:!0,classes:{URLSearchParams:fE,FormData:hE,Blob:mE},protocols:["http","https","file","blob","url","data"]},Sd=typeof window<"u"&&typeof document<"u",_c=typeof navigator=="object"&&navigator||void 0,pE=Sd&&(!_c||["ReactNative","NativeScript","NS"].indexOf(_c.product)<0),gE=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",yE=Sd&&window.location.href||"http://localhost",EE=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Sd,hasStandardBrowserEnv:pE,hasStandardBrowserWebWorkerEnv:gE,navigator:_c,origin:yE},Symbol.toStringTag,{value:"Module"})),Mt={...EE,...bE};function AE(t,e){return Wo(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 wE(t){return K.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function SE(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 J0(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]=SE(s[o])),!a)}if(K.isFormData(t)&&K.isFunction(t.entries)){const n={};return K.forEachEntry(t,(r,s)=>{e(wE(r),s,n,0)}),n}return null}function CE(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 fi={transitional:X0,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(J0(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 AE(e,this.formSerializer).toString();if((a=K.isFileList(e))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Wo(a?{"files[]":e}:e,d&&new d,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),CE(e)):e}],transformResponse:[function(e){const n=this.transitional||fi.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=>{fi.headers[t]={}});const BE=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"]),xE=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]&&BE[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},fu=Symbol("internals");function vs(t){return t&&String(t).trim().toLowerCase()}function $i(t){return t===!1||t==null?t:K.isArray(t)?t.map($i):String(t)}function _E(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 TE=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function La(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 DE(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function RE(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 f=vs(d);if(!f)throw new Error("header name must be a non-empty string");const p=K.findKey(s,f);(!p||s[p]===void 0||h===!0||h===void 0&&s[p]!==!1)&&(s[p||d]=$i(a))}const o=(a,d)=>K.forEach(a,(h,f)=>i(h,f,d));if(K.isPlainObject(e)||e instanceof this.constructor)o(e,n);else if(K.isString(e)&&(e=e.trim())&&!TE(e))o(xE(e),n);else if(K.isObject(e)&&K.isIterable(e)){let a={},d,h;for(const f of e){if(!K.isArray(f))throw TypeError("Object iterator must return a key-value pair");a[h=f[0]]=(d=a[h])?K.isArray(d)?[...d,f[1]]:[d,f[1]]:f[1]}o(a,n)}else e!=null&&i(n,e,r);return this}get(e,n){if(e=vs(e),e){const r=K.findKey(this,e);if(r){const s=this[r];if(!n)return s;if(n===!0)return _E(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=vs(e),e){const r=K.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||La(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let s=!1;function i(o){if(o=vs(o),o){const a=K.findKey(r,o);a&&(!n||La(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||La(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]=$i(s),delete n[i];return}const a=e?DE(i):String(i).trim();a!==i&&delete n[i],n[a]=$i(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[fu]=this[fu]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=vs(o);r[a]||(RE(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 Ma(t,e){const n=this||fi,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 Z0(t){return!!(t&&t.__CANCEL__)}function ws(t,e,n){me.call(this,t??"canceled",me.ERR_CANCELED,e,n),this.name="CanceledError"}K.inherits(ws,me,{__CANCEL__:!0});function Q0(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 vE(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function IE(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(),f=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 A=f&&h-f;return A?Math.round(B*1e3/A):void 0}}function FE(t,e){let n=0,r=1e3/e,s,i;const o=(h,f=Date.now())=>{n=f,s=null,i&&(clearTimeout(i),i=null),t.apply(null,h)};return[(...h)=>{const f=Date.now(),p=f-n;p>=r?o(h,f):(s=h,i||(i=setTimeout(()=>{i=null,o(s)},r-p)))},()=>s&&o(s)]}const oo=(t,e,n=3)=>{let r=0;const s=IE(50,250);return FE(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,d=o-r,h=s(d),f=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&&f?(a-o)/h:void 0,event:i,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(p)},n)},hu=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},mu=t=>(...e)=>K.asap(()=>t(...e)),kE=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,OE=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 NE(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function UE(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function eh(t,e,n){let r=!NE(e);return t&&(r||n==!1)?UE(t,e):e}const bu=t=>t instanceof Yt?{...t}:t;function Or(t,e){e=e||{};const n={};function r(h,f,p,B){return K.isPlainObject(h)&&K.isPlainObject(f)?K.merge.call({caseless:B},h,f):K.isPlainObject(f)?K.merge({},f):K.isArray(f)?f.slice():f}function s(h,f,p,B){if(K.isUndefined(f)){if(!K.isUndefined(h))return r(void 0,h,p,B)}else return r(h,f,p,B)}function i(h,f){if(!K.isUndefined(f))return r(void 0,f)}function o(h,f){if(K.isUndefined(f)){if(!K.isUndefined(h))return r(void 0,h)}else return r(void 0,f)}function a(h,f,p){if(p in e)return r(h,f);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,f,p)=>s(bu(h),bu(f),p,!0)};return K.forEach(Object.keys(Object.assign({},t,e)),function(f){const p=d[f]||s,B=p(t[f],e[f],f);K.isUndefined(B)&&p!==a||(n[f]=B)}),n}const th=t=>{const e=Or({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=e;e.headers=o=Yt.from(o),e.url=Y0(eh(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,...f]=d?d.split(";").map(p=>p.trim()).filter(Boolean):[];o.setContentType([h||"multipart/form-data",...f].join("; "))}}if(Mt.hasStandardBrowserEnv&&(r&&K.isFunction(r)&&(r=r(e)),r||r!==!1&&kE(e.url))){const h=s&&i&&OE.read(i);h&&o.set(s,h)}return e},LE=typeof XMLHttpRequest<"u",ME=LE&&function(t){return new Promise(function(n,r){const s=th(t);let i=s.data;const o=Yt.from(s.headers).normalize();let{responseType:a,onUploadProgress:d,onDownloadProgress:h}=s,f,p,B,A,R;function I(){A&&A(),R&&R(),s.cancelToken&&s.cancelToken.unsubscribe(f),s.signal&&s.signal.removeEventListener("abort",f)}let E=new XMLHttpRequest;E.open(s.method.toUpperCase(),s.url,!0),E.timeout=s.timeout;function w(){if(!E)return;const _=Yt.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),O={data:!a||a==="text"||a==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:_,config:t,request:E};Q0(function(G){n(G),I()},function(G){r(G),I()},O),E=null}"onloadend"in E?E.onloadend=w:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(w)},E.onabort=function(){E&&(r(new me("Request aborted",me.ECONNABORTED,t,E)),E=null)},E.onerror=function(){r(new me("Network Error",me.ERR_NETWORK,t,E)),E=null},E.ontimeout=function(){let U=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const O=s.transitional||X0;s.timeoutErrorMessage&&(U=s.timeoutErrorMessage),r(new me(U,O.clarifyTimeoutError?me.ETIMEDOUT:me.ECONNABORTED,t,E)),E=null},i===void 0&&o.setContentType(null),"setRequestHeader"in E&&K.forEach(o.toJSON(),function(U,O){E.setRequestHeader(O,U)}),K.isUndefined(s.withCredentials)||(E.withCredentials=!!s.withCredentials),a&&a!=="json"&&(E.responseType=s.responseType),h&&([B,R]=oo(h,!0),E.addEventListener("progress",B)),d&&E.upload&&([p,A]=oo(d),E.upload.addEventListener("progress",p),E.upload.addEventListener("loadend",A)),(s.cancelToken||s.signal)&&(f=_=>{E&&(r(!_||_.type?new ws(null,t,E):_),E.abort(),E=null)},s.cancelToken&&s.cancelToken.subscribe(f),s.signal&&(s.signal.aborted?f():s.signal.addEventListener("abort",f)));const k=vE(s.url);if(k&&Mt.protocols.indexOf(k)===-1){r(new me("Unsupported protocol "+k+":",me.ERR_BAD_REQUEST,t));return}E.send(i||null)})},PE=(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 f=h instanceof Error?h:this.reason;r.abort(f instanceof me?f:new ws(f instanceof Error?f.message:f))}};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}},WE=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},zE=async function*(t,e){for await(const n of HE(t))yield*WE(n,e)},HE=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()}},pu=(t,e,n,r)=>{const s=zE(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:f}=await s.next();if(h){a(),d.close();return}let p=f.byteLength;if(n){let B=i+=p;n(B)}d.enqueue(new Uint8Array(f))}catch(h){throw a(h),h}},cancel(d){return a(d),s.return()}},{highWaterMark:2})},zo=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",nh=zo&&typeof ReadableStream=="function",$E=zo&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),rh=(t,...e)=>{try{return!!t(...e)}catch{return!1}},qE=nh&&rh(()=>{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}),gu=64*1024,Tc=nh&&rh(()=>K.isReadableStream(new Response("").body)),ao={stream:Tc&&(t=>t.body)};zo&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!ao[e]&&(ao[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 KE=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 $E(t)).byteLength},VE=async(t,e)=>{const n=K.toFiniteNumber(t.getContentLength());return n??KE(e)},jE=zo&&(async t=>{let{url:e,method:n,data:r,signal:s,cancelToken:i,timeout:o,onDownloadProgress:a,onUploadProgress:d,responseType:h,headers:f,withCredentials:p="same-origin",fetchOptions:B}=th(t);h=h?(h+"").toLowerCase():"text";let A=PE([s,i&&i.toAbortSignal()],o),R;const I=A&&A.unsubscribe&&(()=>{A.unsubscribe()});let E;try{if(d&&qE&&n!=="get"&&n!=="head"&&(E=await VE(f,r))!==0){let O=new Request(e,{method:"POST",body:r,duplex:"half"}),$;if(K.isFormData(r)&&($=O.headers.get("content-type"))&&f.setContentType($),O.body){const[G,Y]=hu(E,oo(mu(d)));r=pu(O.body,gu,G,Y)}}K.isString(p)||(p=p?"include":"omit");const w="credentials"in Request.prototype;R=new Request(e,{...B,signal:A,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:w?p:void 0});let k=await fetch(R,B);const _=Tc&&(h==="stream"||h==="response");if(Tc&&(a||_&&I)){const O={};["status","statusText","headers"].forEach(M=>{O[M]=k[M]});const $=K.toFiniteNumber(k.headers.get("content-length")),[G,Y]=a&&hu($,oo(mu(a),!0))||[];k=new Response(pu(k.body,gu,G,()=>{Y&&Y(),I&&I()}),O)}h=h||"text";let U=await ao[K.findKey(ao,h)||"text"](k,t);return!_&&I&&I(),await new Promise((O,$)=>{Q0(O,$,{data:U,headers:Yt.from(k.headers),status:k.status,statusText:k.statusText,config:t,request:R})})}catch(w){throw I&&I(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new me("Network Error",me.ERR_NETWORK,t,R),{cause:w.cause||w}):me.from(w,w&&w.code,t,R)}}),Dc={http:cE,xhr:ME,fetch:jE};K.forEach(Dc,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const yu=t=>`- ${t}`,GE=t=>K.isFunction(t)||t===null||t===!1,sh={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,!GE(n)&&(r=Dc[(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(yu).join(`
10
+ `):" "+yu(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:Dc};function Pa(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ws(null,t)}function Eu(t){return Pa(t),t.headers=Yt.from(t.headers),t.data=Ma.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),sh.getAdapter(t.adapter||fi.adapter)(t).then(function(r){return Pa(t),r.data=Ma.call(t,t.transformResponse,r),r.headers=Yt.from(r.headers),r},function(r){return Z0(r)||(Pa(t),r&&r.response&&(r.response.data=Ma.call(t,t.transformResponse,r.response),r.response.headers=Yt.from(r.response.headers))),Promise.reject(r)})}const ih="1.10.0",Ho={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Ho[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Au={};Ho.transitional=function(e,n,r){function s(i,o){return"[Axios v"+ih+"] 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&&!Au[o]&&(Au[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}};Ho.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function YE(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:YE,validators:Ho},wn=qi.validators;let xr=class{constructor(e){this.defaults=e||{},this.interceptors={request:new uu,response:new uu}}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=Or(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&qi.assertOptions(r,{silentJSONParsing:wn.transitional(wn.boolean),forcedJSONParsing:wn.transitional(wn.boolean),clarifyTimeoutError:wn.transitional(wn.boolean)},!1),s!=null&&(K.isFunction(s)?n.paramsSerializer={serialize:s}:qi.assertOptions(s,{encode:wn.function,serialize:wn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),qi.assertOptions(n,{baseUrl:wn.spelling("baseURL"),withXsrfToken:wn.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"],R=>{delete i[R]}),n.headers=Yt.concat(o,i);const a=[];let d=!0;this.interceptors.request.forEach(function(I){typeof I.runWhen=="function"&&I.runWhen(n)===!1||(d=d&&I.synchronous,a.unshift(I.fulfilled,I.rejected))});const h=[];this.interceptors.response.forEach(function(I){h.push(I.fulfilled,I.rejected)});let f,p=0,B;if(!d){const R=[Eu.bind(this),void 0];for(R.unshift.apply(R,a),R.push.apply(R,h),B=R.length,f=Promise.resolve(n);p<B;)f=f.then(R[p++],R[p++]);return f}B=a.length;let A=n;for(p=0;p<B;){const R=a[p++],I=a[p++];try{A=R(A)}catch(E){I.call(this,E);break}}try{f=Eu.call(this,A)}catch(R){return Promise.reject(R)}for(p=0,B=h.length;p<B;)f=f.then(h[p++],h[p++]);return f}getUri(e){e=Or(this.defaults,e);const n=eh(e.baseURL,e.url,e.allowAbsoluteUrls);return Y0(n,e.params,e.paramsSerializer)}};K.forEach(["delete","get","head","options"],function(e){xr.prototype[e]=function(n,r){return this.request(Or(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(Or(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}xr.prototype[e]=n(),xr.prototype[e+"Form"]=n(!0)});let XE=class oh{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 ws(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 oh(function(s){e=s}),cancel:e}}};function JE(t){return function(n){return t.apply(null,n)}}function ZE(t){return K.isObject(t)&&t.isAxiosError===!0}const Rc={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(Rc).forEach(([t,e])=>{Rc[e]=t});function ah(t){const e=new xr(t),n=L0(xr.prototype.request,e);return K.extend(n,xr.prototype,e,{allOwnKeys:!0}),K.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return ah(Or(t,s))},n}const Se=ah(fi);Se.Axios=xr;Se.CanceledError=ws;Se.CancelToken=XE;Se.isCancel=Z0;Se.VERSION=ih;Se.toFormData=Wo;Se.AxiosError=me;Se.Cancel=Se.CanceledError;Se.all=function(e){return Promise.all(e)};Se.spread=JE;Se.isAxiosError=ZE;Se.mergeConfig=Or;Se.AxiosHeaders=Yt;Se.formToJSON=t=>J0(K.isHTMLForm(t)?new FormData(t):t);Se.getAdapter=sh.getAdapter;Se.HttpStatusCode=Rc;Se.default=Se;const{Axios:VS,AxiosError:QE,CanceledError:jS,isCancel:GS,CancelToken:YS,VERSION:XS,all:JS,Cancel:ZS,isAxiosError:eA,spread:QS,toFormData:eC,AxiosHeaders:tC,HttpStatusCode:nC,formToJSON:rC,getAdapter:sC,mergeConfig:iC}=Se,Dn=60*1e3,ch={Mainnet:{api:"https://api.wormholescan.io",circleAPI:vl("Mainnet"),executorAPI:Ul("Mainnet"),chains:Na("Mainnet")},Testnet:{api:"https://api.testnet.wormholescan.io",circleAPI:vl("Testnet"),executorAPI:Ul("Testnet"),chains:Na("Testnet")},Devnet:{api:"http://guardian:7071",circleAPI:"",executorAPI:"",chains:Na("Devnet")}};function dh(t,e){return Object.fromEntries(Object.entries(ch[t].chains).filter(([n,r])=>r.platform==e))}function tA(t,e){let n=ch[t];return e?Cd(n,e):n}function nA(t,e,n){const r=dh(t,e);return n?Cd(r,n):r}function Cd(t,e){t||(t={});for(const[n,r]of Object.entries(e))typeof r=="object"&&!Array.isArray(r)?t[n]=Cd(t[n],r):t[n]=r;return t}const rA=typeof Ie.process<"u";rA&&Ie.process.env.NETWORK;async function Pr(t,e,n=Dn,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 f=await t();f!==null?(clearInterval(h),o(f)):r&&console.log(`Retrying ${r}, attempt ${i}/${s} `),i++},e)})})}const sA=2e3;var wu;(function(t){t.complete="complete",t.pending_confirmations="pending_confirmations"})(wu||(wu={}));const iA=t=>({message:t.attestation,status:t.status});async function oA(t,e){var r;const n=`${t}/${e}`;try{const s=await Se.get(n),i=iA(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 aA(t,e,n){return Pr(()=>oA(t,e),sA,n,"Circle:GetAttestation")}async function Xs(t,e,n){if(!xg(n))throw new Error("Invalid signer, not SignAndSendSigner or SignOnlySigner");return(await cA(e,async i=>Ed(n)?n.signAndSend(i):t.sendWait(await n.sign(i)))).map(i=>({chain:t.chain,txid:i}))}async function cA(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 dA extends Error{constructor(n){super(`Minimum transfer amount is ${Co(n)}`);ie(this,"min");this.min=n}minAmount(){return this.min}}class lA extends Error{constructor(n){super("Unable to fetch a quote");ie(this,"internalError");this.internalError=n}}class Bd 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 xd(t){return t.state===exports.TransferState.SourceInitiated}function Js(t){return t.state===exports.TransferState.SourceFinalized}function Su(t){return t.state===exports.TransferState.InReview}function rs(t){return t.state===exports.TransferState.Attested}function uA(t){return t.state===exports.TransferState.Refunded}function _d(t){return t.state===exports.TransferState.DestinationInitiated}function fA(t){return t.state===exports.TransferState.DestinationQueued}function hA(t){return t.state===exports.TransferState.DestinationFinalized}function lh(t){return t.state<0}function Cu(t){return lh(t)&&t.error instanceof Bd}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=Dn,s,i){if(Ig(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(Br(n))o=await St.fromWormholeMessageId(e,n,r);else if(_0(n))o=await St.fromTransaction(e,n,r,s);else if(so(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=Mi(e.network,o.payload.targetDomain),{wormholeRelayer:h}=e.config.chains[d].contracts.cctp;let f=!1;if(h){const A=on.chainAddress(s,h).address.toUniversalAddress();f=o.payloadName==="TransferWithRelay"&&a.equals(A)}const p={from:{chain:n.chain,address:o.payload.caller},to:{chain:d,address:a},amount:o.payload.token.amount,automatic:f},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=Mi(e.network,r.sourceDomain),h=Mi(e.network,r.destinationDomain),f={from:{chain:d,address:o},to:{chain:h,address:a},amount:i.amount,automatic:!1},p=new St(e,f);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 f=await(await s.getCircleBridge()).parseTransactionDetails(o),p={...f,automatic:!1};d=new St(e,p),d.attestations=[{id:f.id,attestation:{message:f.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(A=>Br(A.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=>so(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=on.parseAddress(e.chain(),e.address()),h=a.redeem(d,i,o),f=await Xs(this.toChain,h,e);return(p=this.txids)==null||p.push(...f),f.map(({txid:B})=>B)}}(function(t){async function e(h,f,p){let B;return f.automatic?B=(await h.getAutomaticCircleBridge()).transfer(f.from.address,{chain:f.to.chain,address:f.to.address},f.amount,f.nativeGas):B=(await h.getCircleBridge()).transfer(f.from.address,{chain:f.to.chain,address:f.to.address},f.amount),await Xs(h,B,p)}t.transfer=e;async function*n(h,f,p=Dn,B,A){var E,w;const R=Date.now(),I=(k,_)=>Math.max(_-(Date.now()-k),0);if(B=B??h.getChain(f.from),A=A??h.getChain(f.to),xd(f)){if(f.originTxs.length===0)throw"Invalid state transition: no originating transactions";const k=f.originTxs[f.originTxs.length-1],_=await t.getTransferMessage(B,k.txid);f={...f,attestation:{id:_.id,attestation:{message:_.message}},state:exports.TransferState.SourceFinalized},yield f}if(Js(f)){if(!f.attestation)throw"Invalid state transition: no attestation id";if(Br(f.attestation.id)){let k=f.attestation.attestation?f.attestation.attestation:void 0;k||(k=await t.getTransferVaa(h,f.attestation.id,I(R,p)),f={...f,attestation:{id:f.attestation.id,attestation:k},state:exports.TransferState.Attested},yield f)}else if(so(f.attestation.id)){const k=await h.getCircleAttestation(f.attestation.id.hash,p),_=f.originTxs[f.originTxs.length-1],O=await(await B.getCircleBridge()).parseTransactionDetails(_.txid);k&&(f={...f,attestation:{id:f.attestation.id,attestation:{attestation:k,message:O.message}},state:exports.TransferState.Attested},yield f)}}if(rs(f)||Js(f)){if(!f.attestation)throw"Invalid state transition";if(Br(f.attestation.id)){const k=await h.getTransactionStatus(f.attestation.id,I(R,p));if(k&&((w=(E=k.globalTx)==null?void 0:E.destinationTx)!=null&&w.txHash)){const{chainId:_,txHash:U}=k.globalTx.destinationTx;f={...f,destinationTxs:[{chain:ps(_),txid:U}],state:exports.TransferState.DestinationInitiated},yield f}}}(rs(f)||_d(f))&&(await t.isTransferComplete(A,f.attestation.attestation)&&(f={...f,state:exports.TransferState.DestinationFinalized,destinationTxs:[]}),yield f)}t.track=n;async function r(h,f,p){const B={...p};if(mn(f.chain)==="Solana"&&!B.automatic){const A=on.parseAddress(f.chain,Ms.get(f.network,f.chain));B.to=await f.getTokenAccount(B.to.address,A)}return B}t.destinationOverrides=r;async function s(h,f,p){if(!qs(f.network,f.chain))throw new Error(`Invalid destination chain ${f.chain} for Circle transfer`);const B=Ms.get(f.network,f.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 A=Ms.get(h.network,h.chain);if(!A)throw"Invalid transfer, no USDC contract on source";const R=on.chainAddress(f.chain,B),I=on.chainAddress(h.chain,A),E=(h.chain==="Polygon"?2e3*200:Yc(h.chain))+Zc,w=p.automatic?$s(0,5,0):$s(24,0,0);if(!p.automatic)return{sourceToken:{token:I,amount:p.amount},destinationToken:{token:R,amount:p.amount},eta:E,expires:w};let k=p.amount;const _=p.nativeGas?p.nativeGas:0n;k-=_;const O=await(await h.getAutomaticCircleBridge()).getRelayerFee(f.chain);k-=O;let $=0n;return p.nativeGas&&($=await(await f.getAutomaticCircleBridge()).nativeTokenAmount(_)),{sourceToken:{token:I,amount:p.amount},destinationToken:{token:R,amount:k},relayFee:{token:I,amount:O},destinationNativeGas:$,eta:E,expires:w}}t.quoteTransfer=s;async function i(h,f){if(!exports.CircleBridge.isCircleAttestation(f))throw new Error("Must check for completion with circle message");return await(await h.getCircleBridge()).isTransferCompleted(f.message)}t.isTransferComplete=i;async function o(h,f,p){const B=await h.getVaa(f,"AutomaticCircleBridge:TransferWithRelay",p);if(!B)throw new Error("No VAA available after timeout exhausted");return B}t.getTransferVaa=o;async function a(h,f){return await(await h.getCircleBridge()).parseTransactionDetails(f)}t.getTransferMessage=a;function d(h){var k,_;const{from:f,to:p}=h.transfer;let B={from:f.chain,to:p.chain,state:exports.TransferState.Created};const A=h.txids.filter(U=>U.chain===h.transfer.from.chain);A.length>0&&(B={...B,state:exports.TransferState.SourceInitiated,originTxs:A});const R=((k=h.attestations)==null?void 0:k.filter(U=>Br(U.id)))??[],I=((_=h.attestations)==null?void 0:_.filter(U=>so(U.id)))??[],E=I.length>0?I[0]:R.length>0?R[0]:void 0;E&&E.id&&(B={...B,state:exports.TransferState.SourceFinalized,attestation:E},E.attestation&&(B={...B,state:exports.TransferState.Attested,attestation:{id:E.id,attestation:E.attestation}}));const w=h.txids.filter(U=>U.chain===h.transfer.to.chain);return w.length>0&&(B={...B,state:exports.TransferState.DestinationInitiated,destinationTxs:w}),B}t.getReceipt=d})(St||(St={}));const $o=2e3;async function uh(t,e){var d;const{chain:n,emitter:r,sequence:s}=e,i=hn(n),o=bf("0x",r.toString()),a=`${t}/v1/signed_vaa/${i}/${o}/${s}`;try{const{data:{vaaBytes:h}}=await Se.get(a);return _o.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 mA(t,e,n){return await Pr(()=>uh(t,e),$o,n,"Wormholescan:GetVaaBytes")}async function bA(t,e,n){const r=await uh(t,e);return r?ns(n,r):null}async function pA(t,e,n,r){return await Pr(()=>bA(t,e,n),$o,r,"Wormholescan:GetVaaBytes")}async function gA(t,e){var d;const{chain:n,emitter:r,sequence:s}=e,i=hn(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 yA(t,e,n){return await Pr(()=>gA(t,e),$o,n,"Wormholescan:GetTransactionStatus")}async function EA(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 Bu(t,e,n,r){const i=await Pr(()=>EA(t,e),$o,r,"Wormholescan:GetVaaByTxHash");return i?ns(n,_o.decode(i.vaa)):null}async function AA(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 wA(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=ps(s.originChainId);return r[i]=r[i]||{},r[i][s.originAddress]=s.price,r},{})}catch{}return null}async function SA(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:Us(Ni(s.bigTransactionSize,2));return r[ps(s.chainId)]={available:Us(Ni(s.remainingAvailableNotional,2)),limit:Us(Ni(s.notionalLimit,2)),maxSize:i},r},{})}catch{}return null}async function CA(t,e){const{chain:n,emitter:r,sequence:s}=e,i=hn(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(zg(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(Br(n))o=await Ye.fromIdentifier(e,n,r);else if(_0(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 E=await(await(await e.getChain(o.chain)).getTokenBridge()).getWrappedAsset(a);h=cr(o.chain,E.toString())}const f=await e.getDecimals(o.chain,h),p=Yr(qn(a.amount,Math.min(f,Ye.MAX_DECIMALS)),f);(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},A=new Ye(e,B);return A.attestations=[{id:n,attestation:s}],A._state=exports.TransferState.Attested,A}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(E,w,k){const _=cr(k.chain(),k.address()),U=No(w.token)?w.token.address:w.token;let O;if(w.protocol==="AutomaticTokenBridge")O=(await E.getAutomaticTokenBridge()).transfer(_,w.to,U,w.amount,w.nativeGas);else if(w.protocol==="TokenBridge")O=(await E.getTokenBridge()).transfer(_,w.to,U,w.amount,w.payload);else if(w.protocol==="ExecutorTokenBridge"){if(!w.executorQuote)throw new Error("ExecutorTokenBridge transfer requires an executorQuote");const $=w.executorQuote.relayInstructions.requests.find(Y=>Y.request.type==="GasDropOffInstruction");$&&$.request.type==="GasDropOffInstruction"&&$.request.recipient.equals(xt.ZERO)&&($.request.recipient=w.to.address.toUniversalAddress()),O=(await E.getExecutorTokenBridge()).transfer(_,w.to,U,w.amount,w.executorQuote,w.referrerFee)}else throw new Error("Unknown token transfer protocol");return Xs(E,O,k)}t.transfer=e;async function n(E,w,k){const _=cr(k.chain(),k.address()),U=w.protocolName==="AutomaticTokenBridge"?(await E.getAutomaticTokenBridge()).redeem(_,w):w.protocolName==="ExecutorTokenBridge"?(await E.getExecutorTokenBridge()).redeem(_,w):(await E.getTokenBridge()).redeem(_,w);return Xs(E,U,k)}t.redeem=n;async function*r(E,w,k=Dn,_,U){var G,Y,M,j;const O=Date.now(),$=(P,q)=>Math.max(q-(Date.now()-P),0);if(_=_??E.getChain(w.from),xd(w)){if(w.originTxs.length===0)throw"Origin transactions required to fetch message id";const{txid:P}=w.originTxs[w.originTxs.length-1],q=await t.getTransferMessage(_,P,$(O,k));w={...w,state:exports.TransferState.SourceFinalized,attestation:{id:q}},yield w}if(Js(w)||Su(w)){if(!w.attestation.id)throw"Attestation id required to fetch attestation";const{id:P}=w.attestation,q=await t.getTransferVaa(E,P,$(O,k));throw q?(w={...w,attestation:{id:P,attestation:q},state:exports.TransferState.Attested},yield w):await t.isTransferEnqueued(E,P)&&(w={...w,state:exports.TransferState.InReview},yield w),new Error("Attestation not found")}if(rs(w)||Js(w)||Su(w)||Cu(w)){if(!((G=w.attestation)!=null&&G.id))throw"Attestation id required to fetch redeem tx";const{id:P}=w.attestation,q=await E.getTransactionStatus(P,$(O,k));if(q&&((M=(Y=q.globalTx)==null?void 0:Y.destinationTx)!=null&&M.txHash)){const{chainId:C,txHash:c}=q.globalTx.destinationTx;w={...w,destinationTxs:[{chain:ps(C),txid:c}],state:exports.TransferState.DestinationInitiated,attestation:w.attestation}}yield w}if(rs(w)||_d(w)||Cu(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(U??E.getChain(w.attestation.attestation.payload.to.chain),w.attestation.attestation)&&(w={...w,state:exports.TransferState.DestinationFinalized,attestation:w.attestation}),yield w}if(rs(w)&&w.attestation.attestation.protocolName==="ExecutorTokenBridge"){const[P]=await E.getExecutorTxStatus(w.originTxs.at(-1).txid,w.from);if(!P)throw new Error("No transaction status found");const q=P.status;(q===Jr.Failed||q===Jr.Underpaid||q===Jr.Unsupported||q===Jr.Aborted)&&(w={...w,state:exports.TransferState.Failed,error:new Bd(`Relay failed with status: ${q}`)},yield w)}yield w}t.track=r;function s(E){const{transfer:w}=E,k=w.from.chain,_=w.to.chain;let U={from:k,to:_,state:exports.TransferState.Created};const O=E.txids.filter(M=>M.chain===w.from.chain);O.length>0&&(U={...U,state:exports.TransferState.SourceInitiated,originTxs:O});const $=E.attestations&&E.attestations.length>0?E.attestations[0]:void 0,G=$&&$.id?{id:$.id,attestation:$.attestation}:void 0;G&&G.id&&(U={...U,state:exports.TransferState.SourceFinalized,attestation:{id:G.id}},G.attestation&&(U={...U,state:exports.TransferState.Attested,attestation:{id:G.id,attestation:G.attestation}}));const Y=E.txids.filter(M=>M.chain===w.to.chain);return Y.length>0&&(U={...U,state:exports.TransferState.DestinationFinalized,destinationTxs:Y}),U}t.getReceipt=s;async function i(E,w,k){let _;const U=await E.getTokenBridge();if(Lt(k.address)){const G=await U.getWrappedNative();_={chain:k.chain,address:await U.getTokenUniversalAddress(G)}}else try{let G;xt.instanceof(k.address)?G=await U.getWrappedAsset(k):G=k.address,_=await U.getOriginalAsset(G)}catch(G){if(!G.message.includes("not a wrapped asset"))throw G;let Y;xt.instanceof(k.address)?Y=await U.getTokenNativeAddress(E.chain,k.address):Y=k.address,_={chain:k.chain,address:await U.getTokenUniversalAddress(Y)}}const O=await w.getTokenBridge();if(_.chain===w.chain){const G=await O.getTokenNativeAddress(_.chain,_.address),Y=await O.getWrappedNative();return On({chain:w.chain,address:Y})===On({chain:w.chain,address:G})?{chain:w.chain,address:"native"}:{chain:w.chain,address:G}}const $=await O.getWrappedAsset(_);return{chain:w.chain,address:$}}t.lookupDestinationToken=i;async function o(E,w){return(w.protocolName==="AutomaticTokenBridge"||w.protocolName==="ExecutorTokenBridge")&&(w=ns("TokenBridge:TransferWithPayload",zi(w))),(await E.getTokenBridge()).isTransferCompleted(w)}t.isTransferComplete=o;async function a(E,w,k){const _=await on.parseMessageFromTx(E,w,k);if(_.length!==1)throw new Error("Expected a single Wormhole Message, got: "+_.length);return _[0]}t.getTransferMessage=a;async function d(E,w,k){const _=await E.getVaa(w,Sc.getTransferDiscriminator(),k);if(!_)return null;if(_.payloadName==="TransferWithPayload"){const{chain:U,address:O}=_.payload.to,{tokenBridgeRelayer:$}=E.config.chains[U].contracts,G=$?g0(U,$):null;if(G&&O.equals(G))return ns("AutomaticTokenBridge:TransferWithRelay",zi(_));try{return ns("ExecutorTokenBridge:TransferWithExecutorRelay",zi(_))}catch{}}return _}t.getTransferVaa=d;async function h(E,w){return await E.getIsVaaEnqueued(w)}t.isTransferEnqueued=h;function f(E,w,k,_){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(k=k??E.getChain(w.from.chain),_=_??E.getChain(w.to.chain),w.protocol==="AutomaticTokenBridge"){if(!k.supportsAutomaticTokenBridge())throw new Error(`Automatic Token Bridge not supported on ${w.from.chain}`);if(!_.supportsAutomaticTokenBridge())throw new Error(`Automatic Token Bridge not supported on ${w.to.chain}`);const U=w.nativeGas??0n;if(U>w.amount)throw new Error(`Native gas amount > amount (${U} > ${w.amount})`)}else if(w.protocol==="TokenBridge"){if(!k.supportsTokenBridge())throw new Error(`Token Bridge not supported on ${w.from.chain}`);if(!_.supportsTokenBridge())throw new Error(`Token Bridge not supported on ${w.to.chain}`)}else if(w.protocol==="ExecutorTokenBridge"){if(!k.supportsExecutorTokenBridge())throw new Error(`Token Bridge Executor not supported on ${w.from.chain}`);if(!_.supportsExecutorTokenBridge())throw new Error(`Token Bridge Executor not supported on ${w.to.chain}`)}else throw new Error("Unknown token transfer protocol")}t.validateTransferDetails=f;async function p(E,w,k,_){const U=await w.getTokenBridge();let O;if(Lt(_.token.address))O=await U.getWrappedNative();else if(xt.instanceof(_.token.address))try{O=await U.getWrappedAsset(_.token)}catch(J){if(!J.message.includes("not a wrapped asset"))throw J;O=await U.getTokenNativeAddress(w.chain,_.token.address)}else O=_.token.address;on.tokenId(w.chain,O.toString());const $=await w.getDecimals(O),G=qn(_.amount,$),Y=Ui(G,t.MAX_DECIMALS),[M,j]=await Promise.all([wA(E.config.api),SA(E.config.api)]),P=[];if(j!==null&&w.chain in j&&M!==null){let J;if(Lt(_.token.address))J={chain:w.chain,address:await U.getTokenUniversalAddress(O)};else try{J=await U.getOriginalAsset(_.token.address)}catch(ee){if(!ee.message.includes("not a wrapped asset"))throw ee;J={chain:w.chain,address:await U.getTokenUniversalAddress(O)}}if(J.chain in M&&J.address.toString()in M[J.chain]){const ee=j[w.chain],de=M[J.chain][J.address.toString()]*Us(Y);ee.maxSize&&de>ee.maxSize&&P.push({type:"GovernorLimitWarning",reason:"ExceedsLargeTransferLimit"}),de>ee.available&&P.push({type:"GovernorLimitWarning",reason:"ExceedsRemainingNotional"})}}const q=await t.lookupDestinationToken(w,k,_.token),C=await k.getDecimals(q.address),c=Yr(Y,C),b=Yc(w.chain)+Zc,g={sourceToken:{token:_.token,amount:Dt(Y)},destinationToken:{token:q,amount:Dt(c)},warnings:P.length>0?P:void 0,eta:b};if(_.protocol==="TokenBridge")return{...g,expires:$s(24,0,0)};if(_.protocol==="ExecutorTokenBridge"){const J=await A(E,w,k,_.gasLimit,_.msgValue,_.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(_.referrerFee&&_.referrerFee.feeDbps>0n){const{feeDbps:pe,referrer:ln}=_.referrerFee,Ce=t.calculateReferrerFee(Y,pe),Ue=Dt(Ce.fee),tn=Dt(Ce.remaining);if(tn<=0n)throw new Error("Remaining amount after referrer fee is <= 0");de={feeDbps:pe,feeAmount:Ue,remainingAmount:tn,referrer:ln}}return{...g,destinationToken:{token:q,amount:de!=null&&de.remainingAmount?Dt(Yr(qn(de.remainingAmount,$),C)):Dt(c)},expires:J.signedQuote.quote.expiryTime,relayFee:{token:yd(w.chain),amount:J.estimatedCost},destinationNativeGas:Te,details:{executorQuote:J,referrerFee:de}}}if(_.protocol!=="AutomaticTokenBridge")throw new Error("Unknown token transfer protocol");const D=await(await w.getAutomaticTokenBridge()).getRelayerFee(k.chain,O),F=Yr(Ui(qn(D,$),t.MAX_DECIMALS),C),L=_.nativeGas??0n,S=Dt(Yr(Ui(qn(L,$),t.MAX_DECIMALS),C)),m=890880n;let v=0n;if(_.nativeGas){const J=await k.getAutomaticTokenBridge(),[ee,Te]=await Promise.all([J.maxSwapAmount(q.address),J.nativeTokenAmount(q.address,S)]);if(S>ee)throw new Error(`Native gas amount exceeds maximum swap amount: ${Sl(S,C)}>${Sl(ee,C)}`);if(mn(k.chain)==="Solana"&&Te<m)throw new Error(`Native gas amount must be at least ${m} lamports`);v=Te}const se=Dt(c)-S-Dt(F);if(mn(q.chain)==="Solana"){const J=await k.getNativeWrappedTokenId();if((Lt(q.address)||B0(q,J))&&se<m)throw new Error(`Destination amount must be at least ${m} lamports`)}return{sourceToken:{token:_.token,amount:Dt(Y)},destinationToken:{token:q,amount:se},relayFee:{token:q,amount:Dt(F)},destinationNativeGas:v,warnings:P.length>0?P:void 0,eta:b,expires:$s(0,5,0)}}t.quoteTransfer=p;async function B(E,w){const _=(await E.getExecutorCapabilities())[hn(w.chain)];if(!_)throw new Error(`No executor capabilities found for destination chain ${w.chain}`);return BigInt(_.gasDropOffLimit)}t.getExecutorGasDropOffLimit=B;async function A(E,w,k,_,U,O){const $=await E.getExecutorCapabilities();if(!$[hn(w.chain)])throw new Error(`No executor capabilities found for source chain ${w.chain}`);const Y=$[hn(k.chain)];if(!Y||!Y.requestPrefixes.includes("ERV1"))throw new Error(`No executor capabilities found for destination chain ${k.chain}`);const M=O??0n;if(M>BigInt(Y.gasDropOffLimit))throw new Error(`Native gas amount ${M} exceeds limit ${BigInt(Y.gasDropOffLimit)} for destination chain ${k.chain}`);const j=[];j.push({request:{type:"GasInstruction",gasLimit:_,msgValue:U}}),M>0n&&j.push({request:{type:"GasDropOffInstruction",dropOff:M,recipient:xt.ZERO}});const P={requests:j},q=pn(N0,P),C=await E.getExecutorQuote(w.chain,k.chain,wt.encode(q,!0));if(!C.estimatedCost)throw new Error("No estimated cost");const c=BigInt(C.estimatedCost);return{signedQuote:gn(U0,wt.decode(C.signedQuote)),estimatedCost:c,relayInstructions:P}}t.getExecutorQuote=A;async function R(E,w,k){const _={...k};if(mn(k.to.chain)==="Solana"&&_.protocol==="TokenBridge"){const U=await t.lookupDestinationToken(E,w,_.token);if(Lt(U.address)){const O=await w.getNativeWrappedTokenId();_.to=await w.getTokenAccount(_.to.address,O.address)}else _.to=await w.getTokenAccount(_.to.address,U.address)}if(_.to.chain==="Sei"&&_.protocol==="TokenBridge"){if(_.to.chain==="Sei"&&_.payload)throw new Error("Arbitrary payloads unsupported for Sei");_.payload=Pt.encode(JSON.stringify({basic_recipient:{recipient:_o.encode(_.to.address.toString())}}));const U=w.config.contracts.translator;if(U===void 0||U==="")throw new Error("Unexpected empty translator address");_.to=on.chainAddress(_.to.chain,U)}return _}t.destinationOverrides=R;function I(E,w){if(w>65535n)throw new Error("dBps exceeds max u16");const _=lf(E,w),U=Dt(_),$=Dt(E)-U;return{fee:_,remaining:qn($,E.decimals)}}t.calculateReferrerFee=I})(Ye||(Ye={}));function BA(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=>On(n)))).map(n=>on.tokenId(e,n))}async function xA(t,e,n){const r=On(e),s=t.config.tokenMap?gs.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 fh{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]=x0(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 BA(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=On(Lt(e.destination.id.address)?e.destination.wrapped:e.destination.id),o=(await r.supportedDestinationTokens(e.source.id,e.fromChain,e.toChain)).filter(a=>On(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 on{constructor(e,n,r){ie(this,"_network");ie(this,"_platforms");ie(this,"_chains");ie(this,"config");this._network=e,this.config=tA(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)||!Fl(this.network,n.chain)||!Fl(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 fh(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=mn(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=Dn){return await mA(this.config.api,e,n)}async getVaa(e,n,r=Dn){return typeof e=="string"?await Bu(this.config.api,e,n,r):await pA(this.config.api,e,n,r)}async getIsVaaEnqueued(e){return await CA(this.config.api,e)}async getCircleAttestation(e,n=Dn){return aA(this.config.circleAPI,e,n)}async getTransactionStatus(e,n=Dn){let r;if(typeof e=="string"){const s=await Bu(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 yA(this.config.api,r,n)}async getExecutorCapabilities(){return await Ay(this.config.executorAPI)}async getExecutorQuote(e,n,r){return await wy(this.config.executorAPI,e,n,r)}async getExecutorTxStatus(e,n){return await Sy(this.config.executorAPI,e,n)}async getTransactionsForAddress(e,n=50,r=0){return AA(this.config.api,e,n,r)}static parseAddress(e,n){return cr(e,n)}static canonicalAddress(e){return On(e)}static chainAddress(e,n){return{chain:e,address:on.parseAddress(e,n)}}static tokenId(e,n){return Lt(n)?yd(e):this.chainAddress(e,n)}static async parseMessageFromTx(e,n,r=Dn){const i=await Pr(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 qo{constructor(e){ie(this,"wh");this.wh=e}transferUrl(e){return`https://wormholescan.io/#/tx/${e}?network=${this.wh.network}`}}class hh extends qo{}ie(hh,"IS_AUTOMATIC",!0);function _A(t){return!!t.constructor.IS_AUTOMATIC}class vc extends qo{}ie(vc,"NATIVE_GAS_DROPOFF_SUPPORTED",!1),ie(vc,"IS_AUTOMATIC",!1);function TA(t){return t.complete!==void 0}class DA extends qo{}function RA(t){return t.finalize!==void 0}var Ic={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(t,e){var n=ae,r=n.Buffer;function s(o,a){for(var 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)}})(Ic,Ic.exports);var mh=Ic.exports,Td={exports:{}};Td.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=ae.Buffer}catch{}i.isBN=function(c){return c instanceof i?!0:c!==null&&typeof c=="object"&&c.constructor.wordSize===i.wordSize&&Array.isArray(c.words)},i.max=function(c,b){return c.cmp(b)>0?c:b},i.min=function(c,b){return c.cmp(b)<0?c:b},i.prototype._init=function(c,b,g){if(typeof c=="number")return this._initNumber(c,b,g);if(typeof c=="object")return this._initArray(c,b,g);b==="hex"&&(b=16),r(b===(b|0)&&b>=2&&b<=36),c=c.toString().replace(/\s+/g,"");var x=0;c[0]==="-"&&(x++,this.negative=1),x<c.length&&(b===16?this._parseHex(c,x,g):(this._parseBase(c,b,x),g==="le"&&this._initArray(this.toArray(),b,g)))},i.prototype._initNumber=function(c,b,g){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),g==="le"&&this._initArray(this.toArray(),b,g)},i.prototype._initArray=function(c,b,g){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 x=0;x<this.length;x++)this.words[x]=0;var D,F,L=0;if(g==="be")for(x=c.length-1,D=0;x>=0;x-=3)F=c[x]|c[x-1]<<8|c[x-2]<<16,this.words[D]|=F<<L&67108863,this.words[D+1]=F>>>26-L&67108863,L+=24,L>=26&&(L-=26,D++);else if(g==="le")for(x=0,D=0;x<c.length;x+=3)F=c[x]|c[x+1]<<8|c[x+2]<<16,this.words[D]|=F<<L&67108863,this.words[D+1]=F>>>26-L&67108863,L+=24,L>=26&&(L-=26,D++);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 g=a(C,b);return b-1>=c&&(g|=a(C,b-1)<<4),g}i.prototype._parseHex=function(c,b,g){this.length=Math.ceil((c.length-b)/6),this.words=new Array(this.length);for(var x=0;x<this.length;x++)this.words[x]=0;var D=0,F=0,L;if(g==="be")for(x=c.length-1;x>=b;x-=2)L=d(c,b,x)<<D,this.words[F]|=L&67108863,D>=18?(D-=18,F+=1,this.words[F]|=L>>>26):D+=8;else{var S=c.length-b;for(x=S%2===0?b+1:b;x<c.length;x+=2)L=d(c,b,x)<<D,this.words[F]|=L&67108863,D>=18?(D-=18,F+=1,this.words[F]|=L>>>26):D+=8}this._strip()};function h(C,c,b,g){for(var x=0,D=0,F=Math.min(C.length,b),L=c;L<F;L++){var S=C.charCodeAt(L)-48;x*=g,S>=49?D=S-49+10:S>=17?D=S-17+10:D=S,r(S>=0&&D<g,"Invalid character"),x+=D}return x}i.prototype._parseBase=function(c,b,g){this.words=[0],this.length=1;for(var x=0,D=1;D<=67108863;D*=b)x++;x--,D=D/b|0;for(var F=c.length-g,L=F%x,S=Math.min(F,F-L)+g,m=0,v=g;v<S;v+=x)m=h(c,v,v+x,b),this.imuln(D),this.words[0]+m<67108864?this.words[0]+=m:this._iaddn(m);if(L!==0){var se=1;for(m=h(c,v,c.length,b),v=0;v<L;v++)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 f(C,c){C.words=c.words,C.length=c.length,C.negative=c.negative,C.red=c.red}if(i.prototype._move=function(c){f(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"],A=[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],R=[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 g;if(c===16||c==="hex"){g="";for(var x=0,D=0,F=0;F<this.length;F++){var L=this.words[F],S=((L<<x|D)&16777215).toString(16);D=L>>>24-x&16777215,x+=2,x>=26&&(x-=26,F--),D!==0||F!==this.length-1?g=B[6-S.length]+S+g:g=S+g}for(D!==0&&(g=D.toString(16)+g);g.length%b!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}if(c===(c|0)&&c>=2&&c<=36){var m=A[c],v=R[c];g="";var se=this.clone();for(se.negative=0;!se.isZero();){var J=se.modrn(v).toString(c);se=se.idivn(v),se.isZero()?g=J+g:g=B[m-J.length]+J+g}for(this.isZero()&&(g="0"+g);g.length%b!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var c=this.words[0];return this.length===2?c+=this.words[1]*67108864:this.length===3&&this.words[2]===1?c+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-c:c},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(c,b){return this.toArrayLike(o,c,b)}),i.prototype.toArray=function(c,b){return this.toArrayLike(Array,c,b)};var I=function(c,b){return c.allocUnsafe?c.allocUnsafe(b):new c(b)};i.prototype.toArrayLike=function(c,b,g){this._strip();var x=this.byteLength(),D=g||Math.max(1,x);r(x<=D,"byte array longer than desired length"),r(D>0,"Requested array length <= 0");var F=I(c,D),L=b==="le"?"LE":"BE";return this["_toArrayLike"+L](F,x),F},i.prototype._toArrayLikeLE=function(c,b){for(var g=0,x=0,D=0,F=0;D<this.length;D++){var L=this.words[D]<<F|x;c[g++]=L&255,g<c.length&&(c[g++]=L>>8&255),g<c.length&&(c[g++]=L>>16&255),F===6?(g<c.length&&(c[g++]=L>>24&255),x=0,F=0):(x=L>>>24,F+=2)}if(g<c.length)for(c[g++]=x;g<c.length;)c[g++]=0},i.prototype._toArrayLikeBE=function(c,b){for(var g=c.length-1,x=0,D=0,F=0;D<this.length;D++){var L=this.words[D]<<F|x;c[g--]=L&255,g>=0&&(c[g--]=L>>8&255),g>=0&&(c[g--]=L>>16&255),F===6?(g>=0&&(c[g--]=L>>24&255),x=0,F=0):(x=L>>>24,F+=2)}if(g>=0)for(c[g--]=x;g>=0;)c[g--]=0},Math.clz32?i.prototype._countBits=function(c){return 32-Math.clz32(c)}:i.prototype._countBits=function(c){var b=c,g=0;return b>=4096&&(g+=13,b>>>=13),b>=64&&(g+=7,b>>>=7),b>=8&&(g+=4,b>>>=4),b>=2&&(g+=2,b>>>=2),g+b},i.prototype._zeroBits=function(c){if(c===0)return 26;var b=c,g=0;return b&8191||(g+=13,b>>>=13),b&127||(g+=7,b>>>=7),b&15||(g+=4,b>>>=4),b&3||(g+=2,b>>>=2),b&1||g++,g},i.prototype.bitLength=function(){var c=this.words[this.length-1],b=this._countBits(c);return(this.length-1)*26+b};function E(C){for(var c=new Array(C.bitLength()),b=0;b<c.length;b++){var g=b/26|0,x=b%26;c[b]=C.words[g]>>>x&1}return c}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var c=0,b=0;b<this.length;b++){var g=this._zeroBits(this.words[b]);if(c+=g,g!==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 g=0;g<b.length;g++)this.words[g]=this.words[g]&c.words[g];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,g;this.length>c.length?(b=this,g=c):(b=c,g=this);for(var x=0;x<g.length;x++)this.words[x]=b.words[x]^g.words[x];if(this!==b)for(;x<b.length;x++)this.words[x]=b.words[x];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,g=c%26;this._expand(b),g>0&&b--;for(var x=0;x<b;x++)this.words[x]=~this.words[x]&67108863;return g>0&&(this.words[x]=~this.words[x]&67108863>>26-g),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 g=c/26|0,x=c%26;return this._expand(g+1),b?this.words[g]=this.words[g]|1<<x:this.words[g]=this.words[g]&~(1<<x),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 g,x;this.length>c.length?(g=this,x=c):(g=c,x=this);for(var D=0,F=0;F<x.length;F++)b=(g.words[F]|0)+(x.words[F]|0)+D,this.words[F]=b&67108863,D=b>>>26;for(;D!==0&&F<g.length;F++)b=(g.words[F]|0)+D,this.words[F]=b&67108863,D=b>>>26;if(this.length=g.length,D!==0)this.words[this.length]=D,this.length++;else if(g!==this)for(;F<g.length;F++)this.words[F]=g.words[F];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 g=this.cmp(c);if(g===0)return this.negative=0,this.length=1,this.words[0]=0,this;var x,D;g>0?(x=this,D=c):(x=c,D=this);for(var F=0,L=0;L<D.length;L++)b=(x.words[L]|0)-(D.words[L]|0)+F,F=b>>26,this.words[L]=b&67108863;for(;F!==0&&L<x.length;L++)b=(x.words[L]|0)+F,F=b>>26,this.words[L]=b&67108863;if(F===0&&L<x.length&&x!==this)for(;L<x.length;L++)this.words[L]=x.words[L];return this.length=Math.max(this.length,L),x!==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 g=C.length+c.length|0;b.length=g,g=g-1|0;var x=C.words[0]|0,D=c.words[0]|0,F=x*D,L=F&67108863,S=F/67108864|0;b.words[0]=L;for(var m=1;m<g;m++){for(var v=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;x=C.words[Te]|0,D=c.words[ee]|0,F=x*D+se,v+=F/67108864|0,se=F&67108863}b.words[m]=se|0,S=v|0}return S!==0?b.words[m]=S|0:b.length--,b._strip()}var k=function(c,b,g){var x=c.words,D=b.words,F=g.words,L=0,S,m,v,se=x[0]|0,J=se&8191,ee=se>>>13,Te=x[1]|0,de=Te&8191,pe=Te>>>13,ln=x[2]|0,Ce=ln&8191,Ue=ln>>>13,tn=x[3]|0,ke=tn&8191,Ke=tn>>>13,Ei=x[4]|0,Pe=Ei&8191,Ve=Ei>>>13,Ai=x[5]|0,ze=Ai&8191,Le=Ai>>>13,Jt=x[6]|0,We=Jt&8191,je=Jt>>>13,un=x[7]|0,Ge=un&8191,y=un>>>13,l=x[8]|0,u=l&8191,T=l>>>13,N=x[9]|0,W=N&8191,V=N>>>13,ge=D[0]|0,he=ge&8191,ue=ge>>>13,Me=D[1]|0,le=Me&8191,tt=Me>>>13,il=D[2]|0,nt=il&8191,rt=il>>>13,ol=D[3]|0,st=ol&8191,it=ol>>>13,al=D[4]|0,ot=al&8191,at=al>>>13,cl=D[5]|0,ct=cl&8191,dt=cl>>>13,dl=D[6]|0,lt=dl&8191,ut=dl>>>13,ll=D[7]|0,ft=ll&8191,ht=ll>>>13,ul=D[8]|0,mt=ul&8191,bt=ul>>>13,fl=D[9]|0,pt=fl&8191,gt=fl>>>13;g.negative=c.negative^b.negative,g.length=19,S=Math.imul(J,he),m=Math.imul(J,ue),m=m+Math.imul(ee,he)|0,v=Math.imul(ee,ue);var da=(L+S|0)+((m&8191)<<13)|0;L=(v+(m>>>13)|0)+(da>>>26)|0,da&=67108863,S=Math.imul(de,he),m=Math.imul(de,ue),m=m+Math.imul(pe,he)|0,v=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,v=v+Math.imul(ee,tt)|0;var la=(L+S|0)+((m&8191)<<13)|0;L=(v+(m>>>13)|0)+(la>>>26)|0,la&=67108863,S=Math.imul(Ce,he),m=Math.imul(Ce,ue),m=m+Math.imul(Ue,he)|0,v=Math.imul(Ue,ue),S=S+Math.imul(de,le)|0,m=m+Math.imul(de,tt)|0,m=m+Math.imul(pe,le)|0,v=v+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,v=v+Math.imul(ee,rt)|0;var ua=(L+S|0)+((m&8191)<<13)|0;L=(v+(m>>>13)|0)+(ua>>>26)|0,ua&=67108863,S=Math.imul(ke,he),m=Math.imul(ke,ue),m=m+Math.imul(Ke,he)|0,v=Math.imul(Ke,ue),S=S+Math.imul(Ce,le)|0,m=m+Math.imul(Ce,tt)|0,m=m+Math.imul(Ue,le)|0,v=v+Math.imul(Ue,tt)|0,S=S+Math.imul(de,nt)|0,m=m+Math.imul(de,rt)|0,m=m+Math.imul(pe,nt)|0,v=v+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,v=v+Math.imul(ee,it)|0;var fa=(L+S|0)+((m&8191)<<13)|0;L=(v+(m>>>13)|0)+(fa>>>26)|0,fa&=67108863,S=Math.imul(Pe,he),m=Math.imul(Pe,ue),m=m+Math.imul(Ve,he)|0,v=Math.imul(Ve,ue),S=S+Math.imul(ke,le)|0,m=m+Math.imul(ke,tt)|0,m=m+Math.imul(Ke,le)|0,v=v+Math.imul(Ke,tt)|0,S=S+Math.imul(Ce,nt)|0,m=m+Math.imul(Ce,rt)|0,m=m+Math.imul(Ue,nt)|0,v=v+Math.imul(Ue,rt)|0,S=S+Math.imul(de,st)|0,m=m+Math.imul(de,it)|0,m=m+Math.imul(pe,st)|0,v=v+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,v=v+Math.imul(ee,at)|0;var ha=(L+S|0)+((m&8191)<<13)|0;L=(v+(m>>>13)|0)+(ha>>>26)|0,ha&=67108863,S=Math.imul(ze,he),m=Math.imul(ze,ue),m=m+Math.imul(Le,he)|0,v=Math.imul(Le,ue),S=S+Math.imul(Pe,le)|0,m=m+Math.imul(Pe,tt)|0,m=m+Math.imul(Ve,le)|0,v=v+Math.imul(Ve,tt)|0,S=S+Math.imul(ke,nt)|0,m=m+Math.imul(ke,rt)|0,m=m+Math.imul(Ke,nt)|0,v=v+Math.imul(Ke,rt)|0,S=S+Math.imul(Ce,st)|0,m=m+Math.imul(Ce,it)|0,m=m+Math.imul(Ue,st)|0,v=v+Math.imul(Ue,it)|0,S=S+Math.imul(de,ot)|0,m=m+Math.imul(de,at)|0,m=m+Math.imul(pe,ot)|0,v=v+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,v=v+Math.imul(ee,dt)|0;var ma=(L+S|0)+((m&8191)<<13)|0;L=(v+(m>>>13)|0)+(ma>>>26)|0,ma&=67108863,S=Math.imul(We,he),m=Math.imul(We,ue),m=m+Math.imul(je,he)|0,v=Math.imul(je,ue),S=S+Math.imul(ze,le)|0,m=m+Math.imul(ze,tt)|0,m=m+Math.imul(Le,le)|0,v=v+Math.imul(Le,tt)|0,S=S+Math.imul(Pe,nt)|0,m=m+Math.imul(Pe,rt)|0,m=m+Math.imul(Ve,nt)|0,v=v+Math.imul(Ve,rt)|0,S=S+Math.imul(ke,st)|0,m=m+Math.imul(ke,it)|0,m=m+Math.imul(Ke,st)|0,v=v+Math.imul(Ke,it)|0,S=S+Math.imul(Ce,ot)|0,m=m+Math.imul(Ce,at)|0,m=m+Math.imul(Ue,ot)|0,v=v+Math.imul(Ue,at)|0,S=S+Math.imul(de,ct)|0,m=m+Math.imul(de,dt)|0,m=m+Math.imul(pe,ct)|0,v=v+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,v=v+Math.imul(ee,ut)|0;var ba=(L+S|0)+((m&8191)<<13)|0;L=(v+(m>>>13)|0)+(ba>>>26)|0,ba&=67108863,S=Math.imul(Ge,he),m=Math.imul(Ge,ue),m=m+Math.imul(y,he)|0,v=Math.imul(y,ue),S=S+Math.imul(We,le)|0,m=m+Math.imul(We,tt)|0,m=m+Math.imul(je,le)|0,v=v+Math.imul(je,tt)|0,S=S+Math.imul(ze,nt)|0,m=m+Math.imul(ze,rt)|0,m=m+Math.imul(Le,nt)|0,v=v+Math.imul(Le,rt)|0,S=S+Math.imul(Pe,st)|0,m=m+Math.imul(Pe,it)|0,m=m+Math.imul(Ve,st)|0,v=v+Math.imul(Ve,it)|0,S=S+Math.imul(ke,ot)|0,m=m+Math.imul(ke,at)|0,m=m+Math.imul(Ke,ot)|0,v=v+Math.imul(Ke,at)|0,S=S+Math.imul(Ce,ct)|0,m=m+Math.imul(Ce,dt)|0,m=m+Math.imul(Ue,ct)|0,v=v+Math.imul(Ue,dt)|0,S=S+Math.imul(de,lt)|0,m=m+Math.imul(de,ut)|0,m=m+Math.imul(pe,lt)|0,v=v+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,v=v+Math.imul(ee,ht)|0;var pa=(L+S|0)+((m&8191)<<13)|0;L=(v+(m>>>13)|0)+(pa>>>26)|0,pa&=67108863,S=Math.imul(u,he),m=Math.imul(u,ue),m=m+Math.imul(T,he)|0,v=Math.imul(T,ue),S=S+Math.imul(Ge,le)|0,m=m+Math.imul(Ge,tt)|0,m=m+Math.imul(y,le)|0,v=v+Math.imul(y,tt)|0,S=S+Math.imul(We,nt)|0,m=m+Math.imul(We,rt)|0,m=m+Math.imul(je,nt)|0,v=v+Math.imul(je,rt)|0,S=S+Math.imul(ze,st)|0,m=m+Math.imul(ze,it)|0,m=m+Math.imul(Le,st)|0,v=v+Math.imul(Le,it)|0,S=S+Math.imul(Pe,ot)|0,m=m+Math.imul(Pe,at)|0,m=m+Math.imul(Ve,ot)|0,v=v+Math.imul(Ve,at)|0,S=S+Math.imul(ke,ct)|0,m=m+Math.imul(ke,dt)|0,m=m+Math.imul(Ke,ct)|0,v=v+Math.imul(Ke,dt)|0,S=S+Math.imul(Ce,lt)|0,m=m+Math.imul(Ce,ut)|0,m=m+Math.imul(Ue,lt)|0,v=v+Math.imul(Ue,ut)|0,S=S+Math.imul(de,ft)|0,m=m+Math.imul(de,ht)|0,m=m+Math.imul(pe,ft)|0,v=v+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,v=v+Math.imul(ee,bt)|0;var ga=(L+S|0)+((m&8191)<<13)|0;L=(v+(m>>>13)|0)+(ga>>>26)|0,ga&=67108863,S=Math.imul(W,he),m=Math.imul(W,ue),m=m+Math.imul(V,he)|0,v=Math.imul(V,ue),S=S+Math.imul(u,le)|0,m=m+Math.imul(u,tt)|0,m=m+Math.imul(T,le)|0,v=v+Math.imul(T,tt)|0,S=S+Math.imul(Ge,nt)|0,m=m+Math.imul(Ge,rt)|0,m=m+Math.imul(y,nt)|0,v=v+Math.imul(y,rt)|0,S=S+Math.imul(We,st)|0,m=m+Math.imul(We,it)|0,m=m+Math.imul(je,st)|0,v=v+Math.imul(je,it)|0,S=S+Math.imul(ze,ot)|0,m=m+Math.imul(ze,at)|0,m=m+Math.imul(Le,ot)|0,v=v+Math.imul(Le,at)|0,S=S+Math.imul(Pe,ct)|0,m=m+Math.imul(Pe,dt)|0,m=m+Math.imul(Ve,ct)|0,v=v+Math.imul(Ve,dt)|0,S=S+Math.imul(ke,lt)|0,m=m+Math.imul(ke,ut)|0,m=m+Math.imul(Ke,lt)|0,v=v+Math.imul(Ke,ut)|0,S=S+Math.imul(Ce,ft)|0,m=m+Math.imul(Ce,ht)|0,m=m+Math.imul(Ue,ft)|0,v=v+Math.imul(Ue,ht)|0,S=S+Math.imul(de,mt)|0,m=m+Math.imul(de,bt)|0,m=m+Math.imul(pe,mt)|0,v=v+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,v=v+Math.imul(ee,gt)|0;var ya=(L+S|0)+((m&8191)<<13)|0;L=(v+(m>>>13)|0)+(ya>>>26)|0,ya&=67108863,S=Math.imul(W,le),m=Math.imul(W,tt),m=m+Math.imul(V,le)|0,v=Math.imul(V,tt),S=S+Math.imul(u,nt)|0,m=m+Math.imul(u,rt)|0,m=m+Math.imul(T,nt)|0,v=v+Math.imul(T,rt)|0,S=S+Math.imul(Ge,st)|0,m=m+Math.imul(Ge,it)|0,m=m+Math.imul(y,st)|0,v=v+Math.imul(y,it)|0,S=S+Math.imul(We,ot)|0,m=m+Math.imul(We,at)|0,m=m+Math.imul(je,ot)|0,v=v+Math.imul(je,at)|0,S=S+Math.imul(ze,ct)|0,m=m+Math.imul(ze,dt)|0,m=m+Math.imul(Le,ct)|0,v=v+Math.imul(Le,dt)|0,S=S+Math.imul(Pe,lt)|0,m=m+Math.imul(Pe,ut)|0,m=m+Math.imul(Ve,lt)|0,v=v+Math.imul(Ve,ut)|0,S=S+Math.imul(ke,ft)|0,m=m+Math.imul(ke,ht)|0,m=m+Math.imul(Ke,ft)|0,v=v+Math.imul(Ke,ht)|0,S=S+Math.imul(Ce,mt)|0,m=m+Math.imul(Ce,bt)|0,m=m+Math.imul(Ue,mt)|0,v=v+Math.imul(Ue,bt)|0,S=S+Math.imul(de,pt)|0,m=m+Math.imul(de,gt)|0,m=m+Math.imul(pe,pt)|0,v=v+Math.imul(pe,gt)|0;var Ea=(L+S|0)+((m&8191)<<13)|0;L=(v+(m>>>13)|0)+(Ea>>>26)|0,Ea&=67108863,S=Math.imul(W,nt),m=Math.imul(W,rt),m=m+Math.imul(V,nt)|0,v=Math.imul(V,rt),S=S+Math.imul(u,st)|0,m=m+Math.imul(u,it)|0,m=m+Math.imul(T,st)|0,v=v+Math.imul(T,it)|0,S=S+Math.imul(Ge,ot)|0,m=m+Math.imul(Ge,at)|0,m=m+Math.imul(y,ot)|0,v=v+Math.imul(y,at)|0,S=S+Math.imul(We,ct)|0,m=m+Math.imul(We,dt)|0,m=m+Math.imul(je,ct)|0,v=v+Math.imul(je,dt)|0,S=S+Math.imul(ze,lt)|0,m=m+Math.imul(ze,ut)|0,m=m+Math.imul(Le,lt)|0,v=v+Math.imul(Le,ut)|0,S=S+Math.imul(Pe,ft)|0,m=m+Math.imul(Pe,ht)|0,m=m+Math.imul(Ve,ft)|0,v=v+Math.imul(Ve,ht)|0,S=S+Math.imul(ke,mt)|0,m=m+Math.imul(ke,bt)|0,m=m+Math.imul(Ke,mt)|0,v=v+Math.imul(Ke,bt)|0,S=S+Math.imul(Ce,pt)|0,m=m+Math.imul(Ce,gt)|0,m=m+Math.imul(Ue,pt)|0,v=v+Math.imul(Ue,gt)|0;var Aa=(L+S|0)+((m&8191)<<13)|0;L=(v+(m>>>13)|0)+(Aa>>>26)|0,Aa&=67108863,S=Math.imul(W,st),m=Math.imul(W,it),m=m+Math.imul(V,st)|0,v=Math.imul(V,it),S=S+Math.imul(u,ot)|0,m=m+Math.imul(u,at)|0,m=m+Math.imul(T,ot)|0,v=v+Math.imul(T,at)|0,S=S+Math.imul(Ge,ct)|0,m=m+Math.imul(Ge,dt)|0,m=m+Math.imul(y,ct)|0,v=v+Math.imul(y,dt)|0,S=S+Math.imul(We,lt)|0,m=m+Math.imul(We,ut)|0,m=m+Math.imul(je,lt)|0,v=v+Math.imul(je,ut)|0,S=S+Math.imul(ze,ft)|0,m=m+Math.imul(ze,ht)|0,m=m+Math.imul(Le,ft)|0,v=v+Math.imul(Le,ht)|0,S=S+Math.imul(Pe,mt)|0,m=m+Math.imul(Pe,bt)|0,m=m+Math.imul(Ve,mt)|0,v=v+Math.imul(Ve,bt)|0,S=S+Math.imul(ke,pt)|0,m=m+Math.imul(ke,gt)|0,m=m+Math.imul(Ke,pt)|0,v=v+Math.imul(Ke,gt)|0;var wa=(L+S|0)+((m&8191)<<13)|0;L=(v+(m>>>13)|0)+(wa>>>26)|0,wa&=67108863,S=Math.imul(W,ot),m=Math.imul(W,at),m=m+Math.imul(V,ot)|0,v=Math.imul(V,at),S=S+Math.imul(u,ct)|0,m=m+Math.imul(u,dt)|0,m=m+Math.imul(T,ct)|0,v=v+Math.imul(T,dt)|0,S=S+Math.imul(Ge,lt)|0,m=m+Math.imul(Ge,ut)|0,m=m+Math.imul(y,lt)|0,v=v+Math.imul(y,ut)|0,S=S+Math.imul(We,ft)|0,m=m+Math.imul(We,ht)|0,m=m+Math.imul(je,ft)|0,v=v+Math.imul(je,ht)|0,S=S+Math.imul(ze,mt)|0,m=m+Math.imul(ze,bt)|0,m=m+Math.imul(Le,mt)|0,v=v+Math.imul(Le,bt)|0,S=S+Math.imul(Pe,pt)|0,m=m+Math.imul(Pe,gt)|0,m=m+Math.imul(Ve,pt)|0,v=v+Math.imul(Ve,gt)|0;var Sa=(L+S|0)+((m&8191)<<13)|0;L=(v+(m>>>13)|0)+(Sa>>>26)|0,Sa&=67108863,S=Math.imul(W,ct),m=Math.imul(W,dt),m=m+Math.imul(V,ct)|0,v=Math.imul(V,dt),S=S+Math.imul(u,lt)|0,m=m+Math.imul(u,ut)|0,m=m+Math.imul(T,lt)|0,v=v+Math.imul(T,ut)|0,S=S+Math.imul(Ge,ft)|0,m=m+Math.imul(Ge,ht)|0,m=m+Math.imul(y,ft)|0,v=v+Math.imul(y,ht)|0,S=S+Math.imul(We,mt)|0,m=m+Math.imul(We,bt)|0,m=m+Math.imul(je,mt)|0,v=v+Math.imul(je,bt)|0,S=S+Math.imul(ze,pt)|0,m=m+Math.imul(ze,gt)|0,m=m+Math.imul(Le,pt)|0,v=v+Math.imul(Le,gt)|0;var Ca=(L+S|0)+((m&8191)<<13)|0;L=(v+(m>>>13)|0)+(Ca>>>26)|0,Ca&=67108863,S=Math.imul(W,lt),m=Math.imul(W,ut),m=m+Math.imul(V,lt)|0,v=Math.imul(V,ut),S=S+Math.imul(u,ft)|0,m=m+Math.imul(u,ht)|0,m=m+Math.imul(T,ft)|0,v=v+Math.imul(T,ht)|0,S=S+Math.imul(Ge,mt)|0,m=m+Math.imul(Ge,bt)|0,m=m+Math.imul(y,mt)|0,v=v+Math.imul(y,bt)|0,S=S+Math.imul(We,pt)|0,m=m+Math.imul(We,gt)|0,m=m+Math.imul(je,pt)|0,v=v+Math.imul(je,gt)|0;var Ba=(L+S|0)+((m&8191)<<13)|0;L=(v+(m>>>13)|0)+(Ba>>>26)|0,Ba&=67108863,S=Math.imul(W,ft),m=Math.imul(W,ht),m=m+Math.imul(V,ft)|0,v=Math.imul(V,ht),S=S+Math.imul(u,mt)|0,m=m+Math.imul(u,bt)|0,m=m+Math.imul(T,mt)|0,v=v+Math.imul(T,bt)|0,S=S+Math.imul(Ge,pt)|0,m=m+Math.imul(Ge,gt)|0,m=m+Math.imul(y,pt)|0,v=v+Math.imul(y,gt)|0;var xa=(L+S|0)+((m&8191)<<13)|0;L=(v+(m>>>13)|0)+(xa>>>26)|0,xa&=67108863,S=Math.imul(W,mt),m=Math.imul(W,bt),m=m+Math.imul(V,mt)|0,v=Math.imul(V,bt),S=S+Math.imul(u,pt)|0,m=m+Math.imul(u,gt)|0,m=m+Math.imul(T,pt)|0,v=v+Math.imul(T,gt)|0;var _a=(L+S|0)+((m&8191)<<13)|0;L=(v+(m>>>13)|0)+(_a>>>26)|0,_a&=67108863,S=Math.imul(W,pt),m=Math.imul(W,gt),m=m+Math.imul(V,pt)|0,v=Math.imul(V,gt);var Ta=(L+S|0)+((m&8191)<<13)|0;return L=(v+(m>>>13)|0)+(Ta>>>26)|0,Ta&=67108863,F[0]=da,F[1]=la,F[2]=ua,F[3]=fa,F[4]=ha,F[5]=ma,F[6]=ba,F[7]=pa,F[8]=ga,F[9]=ya,F[10]=Ea,F[11]=Aa,F[12]=wa,F[13]=Sa,F[14]=Ca,F[15]=Ba,F[16]=xa,F[17]=_a,F[18]=Ta,L!==0&&(F[19]=L,g.length++),g};Math.imul||(k=w);function _(C,c,b){b.negative=c.negative^C.negative,b.length=C.length+c.length;for(var g=0,x=0,D=0;D<b.length-1;D++){var F=x;x=0;for(var L=g&67108863,S=Math.min(D,c.length-1),m=Math.max(0,D-C.length+1);m<=S;m++){var v=D-m,se=C.words[v]|0,J=c.words[m]|0,ee=se*J,Te=ee&67108863;F=F+(ee/67108864|0)|0,Te=Te+L|0,L=Te&67108863,F=F+(Te>>>26)|0,x+=F>>>26,F&=67108863}b.words[D]=L,g=F,F=x}return g!==0?b.words[D]=g:b.length--,b._strip()}function U(C,c,b){return _(C,c,b)}i.prototype.mulTo=function(c,b){var g,x=this.length+c.length;return this.length===10&&c.length===10?g=k(this,c,b):x<63?g=w(this,c,b):x<1024?g=_(this,c,b):g=U(this,c,b),g},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),U(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 g=0,x=0;x<this.length;x++){var D=(this.words[x]|0)*c,F=(D&67108863)+(g&67108863);g>>=26,g+=D/67108864|0,g+=F>>>26,this.words[x]=F&67108863}return g!==0&&(this.words[x]=g,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=E(c);if(b.length===0)return new i(1);for(var g=this,x=0;x<b.length&&b[x]===0;x++,g=g.sqr());if(++x<b.length)for(var D=g.sqr();x<b.length;x++,D=D.sqr())b[x]!==0&&(g=g.mul(D));return g},i.prototype.iushln=function(c){r(typeof c=="number"&&c>=0);var b=c%26,g=(c-b)/26,x=67108863>>>26-b<<26-b,D;if(b!==0){var F=0;for(D=0;D<this.length;D++){var L=this.words[D]&x,S=(this.words[D]|0)-L<<b;this.words[D]=S|F,F=L>>>26-b}F&&(this.words[D]=F,this.length++)}if(g!==0){for(D=this.length-1;D>=0;D--)this.words[D+g]=this.words[D];for(D=0;D<g;D++)this.words[D]=0;this.length+=g}return this._strip()},i.prototype.ishln=function(c){return r(this.negative===0),this.iushln(c)},i.prototype.iushrn=function(c,b,g){r(typeof c=="number"&&c>=0);var x;b?x=(b-b%26)/26:x=0;var D=c%26,F=Math.min((c-D)/26,this.length),L=67108863^67108863>>>D<<D,S=g;if(x-=F,x=Math.max(0,x),S){for(var m=0;m<F;m++)S.words[m]=this.words[m];S.length=F}if(F!==0)if(this.length>F)for(this.length-=F,m=0;m<this.length;m++)this.words[m]=this.words[m+F];else this.words[0]=0,this.length=1;var v=0;for(m=this.length-1;m>=0&&(v!==0||m>=x);m--){var se=this.words[m]|0;this.words[m]=v<<26-D|se>>>D,v=se&L}return S&&v!==0&&(S.words[S.length++]=v),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(c,b,g){return r(this.negative===0),this.iushrn(c,b,g)},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,g=(c-b)/26,x=1<<b;if(this.length<=g)return!1;var D=this.words[g];return!!(D&x)},i.prototype.imaskn=function(c){r(typeof c=="number"&&c>=0);var b=c%26,g=(c-b)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=g)return this;if(b!==0&&g++,this.length=Math.min(g,this.length),b!==0){var x=67108863^67108863>>>b<<b;this.words[this.length-1]&=x}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,g){var x=c.length+g,D;this._expand(x);var F,L=0;for(D=0;D<c.length;D++){F=(this.words[D+g]|0)+L;var S=(c.words[D]|0)*b;F-=S&67108863,L=(F>>26)-(S/67108864|0),this.words[D+g]=F&67108863}for(;D<this.length-g;D++)F=(this.words[D+g]|0)+L,L=F>>26,this.words[D+g]=F&67108863;if(L===0)return this._strip();for(r(L===-1),L=0,D=0;D<this.length;D++)F=-(this.words[D]|0)+L,L=F>>26,this.words[D]=F&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(c,b){var g=this.length-c.length,x=this.clone(),D=c,F=D.words[D.length-1]|0,L=this._countBits(F);g=26-L,g!==0&&(D=D.ushln(g),x.iushln(g),F=D.words[D.length-1]|0);var S=x.length-D.length,m;if(b!=="mod"){m=new i(null),m.length=S+1,m.words=new Array(m.length);for(var v=0;v<m.length;v++)m.words[v]=0}var se=x.clone()._ishlnsubmul(D,1,S);se.negative===0&&(x=se,m&&(m.words[S]=1));for(var J=S-1;J>=0;J--){var ee=(x.words[D.length+J]|0)*67108864+(x.words[D.length+J-1]|0);for(ee=Math.min(ee/F|0,67108863),x._ishlnsubmul(D,ee,J);x.negative!==0;)ee--,x.negative=0,x._ishlnsubmul(D,1,J),x.isZero()||(x.negative^=1);m&&(m.words[J]=ee)}return m&&m._strip(),x._strip(),b!=="div"&&g!==0&&x.iushrn(g),{div:m||null,mod:x}},i.prototype.divmod=function(c,b,g){if(r(!c.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var x,D,F;return this.negative!==0&&c.negative===0?(F=this.neg().divmod(c,b),b!=="mod"&&(x=F.div.neg()),b!=="div"&&(D=F.mod.neg(),g&&D.negative!==0&&D.iadd(c)),{div:x,mod:D}):this.negative===0&&c.negative!==0?(F=this.divmod(c.neg(),b),b!=="mod"&&(x=F.div.neg()),{div:x,mod:F.mod}):this.negative&c.negative?(F=this.neg().divmod(c.neg(),b),b!=="div"&&(D=F.mod.neg(),g&&D.negative!==0&&D.isub(c)),{div:F.div,mod:D}):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 g=b.div.negative!==0?b.mod.isub(c):b.mod,x=c.ushrn(1),D=c.andln(1),F=g.cmp(x);return F<0||D===1&&F===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 g=(1<<26)%c,x=0,D=this.length-1;D>=0;D--)x=(g*x+(this.words[D]|0))%c;return b?-x:x},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 g=0,x=this.length-1;x>=0;x--){var D=(this.words[x]|0)+g*67108864;this.words[x]=D/c|0,g=D%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,g=c.clone();b.negative!==0?b=b.umod(c):b=b.clone();for(var x=new i(1),D=new i(0),F=new i(0),L=new i(1),S=0;b.isEven()&&g.isEven();)b.iushrn(1),g.iushrn(1),++S;for(var m=g.clone(),v=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;)(x.isOdd()||D.isOdd())&&(x.iadd(m),D.isub(v)),x.iushrn(1),D.iushrn(1);for(var ee=0,Te=1;!(g.words[0]&Te)&&ee<26;++ee,Te<<=1);if(ee>0)for(g.iushrn(ee);ee-- >0;)(F.isOdd()||L.isOdd())&&(F.iadd(m),L.isub(v)),F.iushrn(1),L.iushrn(1);b.cmp(g)>=0?(b.isub(g),x.isub(F),D.isub(L)):(g.isub(b),F.isub(x),L.isub(D))}return{a:F,b:L,gcd:g.iushln(S)}},i.prototype._invmp=function(c){r(c.negative===0),r(!c.isZero());var b=this,g=c.clone();b.negative!==0?b=b.umod(c):b=b.clone();for(var x=new i(1),D=new i(0),F=g.clone();b.cmpn(1)>0&&g.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;)x.isOdd()&&x.iadd(F),x.iushrn(1);for(var m=0,v=1;!(g.words[0]&v)&&m<26;++m,v<<=1);if(m>0)for(g.iushrn(m);m-- >0;)D.isOdd()&&D.iadd(F),D.iushrn(1);b.cmp(g)>=0?(b.isub(g),x.isub(D)):(g.isub(b),D.isub(x))}var se;return b.cmpn(1)===0?se=x:se=D,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(),g=c.clone();b.negative=0,g.negative=0;for(var x=0;b.isEven()&&g.isEven();x++)b.iushrn(1),g.iushrn(1);do{for(;b.isEven();)b.iushrn(1);for(;g.isEven();)g.iushrn(1);var D=b.cmp(g);if(D<0){var F=b;b=g,g=F}else if(D===0||g.cmpn(1)===0)break;b.isub(g)}while(!0);return g.iushln(x)},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,g=(c-b)/26,x=1<<b;if(this.length<=g)return this._expand(g+1),this.words[g]|=x,this;for(var D=x,F=g;D!==0&&F<this.length;F++){var L=this.words[F]|0;L+=D,D=L>>>26,L&=67108863,this.words[F]=L}return D!==0&&(this.words[F]=D,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 g;if(this.length>1)g=1;else{b&&(c=-c),r(c<=67108863,"Number is too big");var x=this.words[0]|0;g=x===c?0:x<c?-1:1}return this.negative!==0?-g|0:g},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,g=this.length-1;g>=0;g--){var x=this.words[g]|0,D=c.words[g]|0;if(x!==D){x<D?b=-1:x>D&&(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 O={k256:null,p224:null,p192:null,p25519:null};function $(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()}$.prototype._tmp=function(){var c=new i(null);return c.words=new Array(Math.ceil(this.n/13)),c},$.prototype.ireduce=function(c){var b=c,g;do this.split(b,this.tmp),b=this.imulK(b),b=b.iadd(this.tmp),g=b.bitLength();while(g>this.n);var x=g<this.n?-1:b.ucmp(this.p);return x===0?(b.words[0]=0,b.length=1):x>0?b.isub(this.p):b.strip!==void 0?b.strip():b._strip(),b},$.prototype.split=function(c,b){c.iushrn(this.n,0,b)},$.prototype.imulK=function(c){return c.imul(this.k)};function G(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(G,$),G.prototype.split=function(c,b){for(var g=4194303,x=Math.min(c.length,9),D=0;D<x;D++)b.words[D]=c.words[D];if(b.length=x,c.length<=9){c.words[0]=0,c.length=1;return}var F=c.words[9];for(b.words[b.length++]=F&g,D=10;D<c.length;D++){var L=c.words[D]|0;c.words[D-10]=(L&g)<<4|F>>>22,F=L}F>>>=22,c.words[D-10]=F,F===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,g=0;g<c.length;g++){var x=c.words[g]|0;b+=x*977,c.words[g]=b&67108863,b=x*64+(b/67108864|0)}return c.words[c.length-1]===0&&(c.length--,c.words[c.length-1]===0&&c.length--),c};function Y(){$.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}s(Y,$);function M(){$.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}s(M,$);function j(){$.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}s(j,$),j.prototype.imulK=function(c){for(var b=0,g=0;g<c.length;g++){var x=(c.words[g]|0)*19+b,D=x&67108863;x>>>=26,c.words[g]=D,b=x}return b!==0&&(c.words[c.length++]=b),c},i._prime=function(c){if(O[c])return O[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 O[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):(f(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 g=c.add(b);return g.cmp(this.m)>=0&&g.isub(this.m),g._forceRed(this)},P.prototype.iadd=function(c,b){this._verify2(c,b);var g=c.iadd(b);return g.cmp(this.m)>=0&&g.isub(this.m),g},P.prototype.sub=function(c,b){this._verify2(c,b);var g=c.sub(b);return g.cmpn(0)<0&&g.iadd(this.m),g._forceRed(this)},P.prototype.isub=function(c,b){this._verify2(c,b);var g=c.isub(b);return g.cmpn(0)<0&&g.iadd(this.m),g},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 g=this.m.add(new i(1)).iushrn(2);return this.pow(c,g)}for(var x=this.m.subn(1),D=0;!x.isZero()&&x.andln(1)===0;)D++,x.iushrn(1);r(!x.isZero());var F=new i(1).toRed(this),L=F.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 v=this.pow(m,x),se=this.pow(c,x.addn(1).iushrn(1)),J=this.pow(c,x),ee=D;J.cmp(F)!==0;){for(var Te=J,de=0;Te.cmp(F)!==0;de++)Te=Te.redSqr();r(de<ee);var pe=this.pow(v,new i(1).iushln(ee-de-1));se=se.redMul(pe),v=pe.redSqr(),J=J.redMul(v),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 g=4,x=new Array(1<<g);x[0]=new i(1).toRed(this),x[1]=c;for(var D=2;D<x.length;D++)x[D]=this.mul(x[D-1],c);var F=x[0],L=0,S=0,m=b.bitLength()%26;for(m===0&&(m=26),D=b.length-1;D>=0;D--){for(var v=b.words[D],se=m-1;se>=0;se--){var J=v>>se&1;if(F!==x[0]&&(F=this.sqr(F)),J===0&&L===0){S=0;continue}L<<=1,L|=J,S++,!(S!==g&&(D!==0||se!==0))&&(F=this.mul(F,x[L]),S=0,L=0)}m=26}return F},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 q(c)};function q(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(q,P),q.prototype.convertTo=function(c){return this.imod(c.ushln(this.shift))},q.prototype.convertFrom=function(c){var b=this.imod(c.mul(this.rinv));return b.red=null,b},q.prototype.imul=function(c,b){if(c.isZero()||b.isZero())return c.words[0]=0,c.length=1,c;var g=c.imul(b),x=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),D=g.isub(x).iushrn(this.shift),F=D;return D.cmp(this.m)>=0?F=D.isub(this.m):D.cmpn(0)<0&&(F=D.iadd(this.m)),F._forceRed(this)},q.prototype.mul=function(c,b){if(c.isZero()||b.isZero())return new i(0)._forceRed(this);var g=c.mul(b),x=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),D=g.isub(x).iushrn(this.shift),F=D;return D.cmp(this.m)>=0?F=D.isub(this.m):D.cmpn(0)<0&&(F=D.iadd(this.m)),F._forceRed(this)},q.prototype.invm=function(c){var b=this.imod(c._invmp(this.m).mul(this.r2));return b._forceRed(this)}})(t,cn)})(Td);var Dd=Td.exports;const Fc=ri(Dd),bh="6.13.5";function vA(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 IA(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 kc(t,e,n){for(let r in e){let s=e[r];const i=n?n[r]:null;i&&vA(s,i,r),Object.defineProperty(t,r,{enumerable:!0,value:s,writable:!1})}}function Zr(t){if(t==null)return"null";if(Array.isArray(t))return"[ "+t.map(Zr).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 Zr(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=>`${Zr(n)}: ${Zr(t[n])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function ph(t,e){return t&&t.code===e}function FA(t){return ph(t,"CALL_EXCEPTION")}function gh(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: ${Zr(n)}`);for(const o in n){if(o==="shortMessage")continue;const a=n[o];i.push(o+"="+Zr(a))}}i.push(`code=${e}`),i.push(`version=${bh}`),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 kc(s,{code:e}),n&&Object.assign(s,n),s.shortMessage==null&&kc(s,{shortMessage:r}),s}function Nn(t,e,n,r){if(!t)throw gh(e,n,r)}function rr(t,e,n,r){Nn(t,e,"INVALID_ARGUMENT",{argument:n,value:r})}function kA(t,e,n){n==null&&(n=""),n&&(n=": "+n),Nn(t>=e,"missing argument"+n,"MISSING_ARGUMENT",{count:t,expectedCount:e}),Nn(t<=e,"too many arguments"+n,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}const OA=["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 NA(t){Nn(OA.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function UA(t,e,n){if(n==null&&(n=""),t!==e){let r=n,s="new";n&&(r+=".",s+=" "+n),Nn(!1,`private constructor; use ${r}from* methods`,"UNSUPPORTED_OPERATION",{operation:s})}}function yh(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}rr(!1,"invalid BytesLike value",e||"value",t)}function Wr(t,e){return yh(t,e,!1)}function LA(t,e){return yh(t,e,!0)}function Rd(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 MA(t){return Rd(t,!0)||t instanceof Uint8Array}const xu="0123456789abcdef";function hi(t){const e=Wr(t);let n="0x";for(let r=0;r<e.length;r++){const s=e[r];n+=xu[(s&240)>>4]+xu[s&15]}return n}function PA(t){return"0x"+t.map(e=>hi(e).substring(2)).join("")}function WA(t){return Rd(t,!0)?(t.length-2)/2:Wr(t).length}function zA(t,e,n){const r=Wr(t);return n!=null&&n>r.length&&Nn(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:n}),hi(r.slice(e??0,n??r.length))}function Eh(t,e,n){const r=Wr(t);Nn(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),hi(s)}function HA(t,e){return Eh(t,e,!0)}function $A(t,e){return Eh(t,e,!1)}function Zs(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function vd(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 qA(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Zs(t.outputLen),Zs(t.blockLen)}function Oc(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 Ah(t,e){vd(t);const n=e.outputLen;if(t.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}const Wa=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const wh=t=>t instanceof Uint8Array,Sh=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),KA=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),VA=(t,e)=>t<<32-e|t>>>e,jA=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!jA)throw new Error("Non little-endian hardware is not supported");const GA=async()=>{};async function YA(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 GA(),r+=i)}}function XA(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function Id(t){if(typeof t=="string"&&(t=XA(t)),!wh(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}function JA(...t){const e=new Uint8Array(t.reduce((r,s)=>r+s.length,0));let n=0;return t.forEach(r=>{if(!wh(r))throw new Error("Uint8Array expected");e.set(r,n),n+=r.length}),e}class Ch{clone(){return this._cloneInto()}}const ZA={}.toString;function QA(t,e){if(e!==void 0&&ZA.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(t,e)}function Bh(t){const e=r=>t().update(Id(r)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function e2(t=32){if(Wa&&typeof Wa.getRandomValues=="function")return Wa.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}const _i=BigInt(2**32-1),Nc=BigInt(32);function xh(t,e=!1){return e?{h:Number(t&_i),l:Number(t>>Nc&_i)}:{h:Number(t>>Nc&_i)|0,l:Number(t&_i)|0}}function _h(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}=xh(t[s],e);[n[s],r[s]]=[i,o]}return[n,r]}const t2=(t,e)=>BigInt(t>>>0)<<Nc|BigInt(e>>>0),n2=(t,e,n)=>t>>>n,r2=(t,e,n)=>t<<32-n|e>>>n,s2=(t,e,n)=>t>>>n|e<<32-n,i2=(t,e,n)=>t<<32-n|e>>>n,o2=(t,e,n)=>t<<64-n|e>>>n-32,a2=(t,e,n)=>t>>>n-32|e<<64-n,c2=(t,e)=>e,d2=(t,e)=>t,Th=(t,e,n)=>t<<n|e>>>32-n,Dh=(t,e,n)=>e<<n|t>>>32-n,Rh=(t,e,n)=>e<<n-32|t>>>64-n,vh=(t,e,n)=>t<<n-32|e>>>64-n;function l2(t,e,n,r){const s=(e>>>0)+(r>>>0);return{h:t+n+(s/2**32|0)|0,l:s|0}}const u2=(t,e,n)=>(t>>>0)+(e>>>0)+(n>>>0),f2=(t,e,n,r)=>e+n+r+(t/2**32|0)|0,h2=(t,e,n,r)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0),m2=(t,e,n,r,s)=>e+n+r+s+(t/2**32|0)|0,b2=(t,e,n,r,s)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0)+(s>>>0),p2=(t,e,n,r,s,i)=>e+n+r+s+i+(t/2**32|0)|0,g2={fromBig:xh,split:_h,toBig:t2,shrSH:n2,shrSL:r2,rotrSH:s2,rotrSL:i2,rotrBH:o2,rotrBL:a2,rotr32H:c2,rotr32L:d2,rotlSH:Th,rotlSL:Dh,rotlBH:Rh,rotlBL:vh,add:l2,add3L:u2,add3H:f2,add4L:h2,add4H:m2,add5H:p2,add5L:b2},[Ih,Fh,kh]=[[],[],[]],y2=BigInt(0),Is=BigInt(1),E2=BigInt(2),A2=BigInt(7),w2=BigInt(256),S2=BigInt(113);for(let t=0,e=Is,n=1,r=0;t<24;t++){[n,r]=[r,(2*n+3*r)%5],Ih.push(2*(5*r+n)),Fh.push((t+1)*(t+2)/2%64);let s=y2;for(let i=0;i<7;i++)e=(e<<Is^(e>>A2)*S2)%w2,e&E2&&(s^=Is<<(Is<<BigInt(i))-Is);kh.push(s)}const[C2,B2]=_h(kh,!0),_u=(t,e,n)=>n>32?Rh(t,e,n):Th(t,e,n),Tu=(t,e,n)=>n>32?vh(t,e,n):Dh(t,e,n);function x2(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],f=n[d+1],p=_u(h,f,1)^n[a],B=Tu(h,f,1)^n[a+1];for(let A=0;A<50;A+=10)t[o+A]^=p,t[o+A+1]^=B}let s=t[2],i=t[3];for(let o=0;o<24;o++){const a=Fh[o],d=_u(s,i,a),h=Tu(s,i,a),f=Ih[o];s=t[f],i=t[f+1],t[f]=d,t[f+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]^=C2[r],t[1]^=B2[r]}n.fill(0)}class Fd extends Ch{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,Zs(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Sh(this.state)}keccak(){x2(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){Oc(this);const{blockLen:n,state:r}=this;e=Id(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){Oc(this,!1),vd(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 Zs(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Ah(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 Fd(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 _2=(t,e,n)=>Bh(()=>new Fd(e,t,n)),T2=_2(1,136,256/8);let Oh=!1;const Nh=function(t){return T2(t)};let Uh=Nh;function Ss(t){const e=Wr(t,"data");return hi(Uh(e))}Ss._=Nh;Ss.lock=function(){Oh=!0};Ss.register=function(t){if(Oh)throw new TypeError("keccak256 is locked");Uh=t};Object.freeze(Ss);const D2=BigInt(0),R2=BigInt(36);function Du(t){t=t.toLowerCase();const e=t.substring(2).split(""),n=new Uint8Array(40);for(let s=0;s<40;s++)n[s]=e[s].charCodeAt(0);const r=Wr(Ss(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 kd={};for(let t=0;t<10;t++)kd[String(t)]=String(t);for(let t=0;t<26;t++)kd[String.fromCharCode(65+t)]=String(10+t);const Ru=15;function v2(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(r=>kd[r]).join("");for(;e.length>=Ru;){let r=e.substring(0,Ru);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 I2=function(){const t={};for(let e=0;e<36;e++){const n="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[n]=BigInt(e)}return t}();function F2(t){t=t.toLowerCase();let e=D2;for(let n=0;n<t.length;n++)e=e*R2+I2[t[n]];return e}function _r(t){if(rr(typeof t=="string","invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/)){t.startsWith("0x")||(t="0x"+t);const e=Du(t);return rr(!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}$/)){rr(t.substring(2,4)===v2(t),"bad icap checksum","address",t);let e=F2(t.substring(4)).toString(16);for(;e.length<40;)e="0"+e;return Du("0x"+e)}rr(!1,"invalid address","address",t)}function Lh(t){return t&&typeof t.getAddress=="function"}function k2(t){try{return _r(t),!0}catch{}return!1}async function za(t,e){const n=await e;return(n==null||n==="0x0000000000000000000000000000000000000000")&&(Nn(typeof t!="string","unconfigured name","UNCONFIGURED_NAME",{value:t}),rr(!1,"invalid AddressLike value; did not resolve to a value address","target",t)),_r(n)}function O2(t,e){if(typeof t=="string")return t.match(/^0x[0-9a-f]{40}$/i)?_r(t):(Nn(e!=null,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),za(t,e.resolveName(t)));if(Lh(t))return za(t,t.getAddress());if(t&&typeof t.then=="function")return za(t,t);rr(!1,"unsupported addressable value","target",t)}const N2=0,U2=0n,Od="Evm",L2=(t,e)=>({...t,from:e}),M2=(t,e)=>({...t,chainId:e}),P2="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=_r(e)}else if(e instanceof Uint8Array)e=this.trimUniversalAddress(e),this.address=_r(wt.encode(e));else if(xt.instanceof(e)){const n=this.trimUniversalAddress(e.toUint8Array());this.address=_r(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(Ls.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 k2(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",Od);let co=nn;fd(Od,co);var Ti=mh.Buffer;function W2(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 f(A){if((Array.isArray(A)||A instanceof Uint8Array)&&(A=Ti.from(A)),!Ti.isBuffer(A))throw new TypeError("Expected Buffer");if(A.length===0)return"";for(var R=0,I=0,E=0,w=A.length;E!==w&&A[E]===0;)E++,R++;for(var k=(w-E)*h+1>>>0,_=new Uint8Array(k);E!==w;){for(var U=A[E],O=0,$=k-1;(U!==0||O<I)&&$!==-1;$--,O++)U+=256*_[$]>>>0,_[$]=U%o>>>0,U=U/o>>>0;if(U!==0)throw new Error("Non-zero carry");I=O,E++}for(var G=k-I;G!==k&&_[G]===0;)G++;for(var Y=a.repeat(R);G<k;++G)Y+=t.charAt(_[G]);return Y}function p(A){if(typeof A!="string")throw new TypeError("Expected String");if(A.length===0)return Ti.alloc(0);for(var R=0,I=0,E=0;A[R]===a;)I++,R++;for(var w=(A.length-R)*d+1>>>0,k=new Uint8Array(w);R<A.length;){var _=A.charCodeAt(R);if(_>255)return;var U=e[_];if(U===255)return;for(var O=0,$=w-1;(U!==0||O<E)&&$!==-1;$--,O++)U+=o*k[$]>>>0,k[$]=U%256>>>0,U=U/256>>>0;if(U!==0)throw new Error("Non-zero carry");E=O,R++}for(var G=w-E;G!==w&&k[G]===0;)G++;var Y=Ti.allocUnsafe(I+(w-G));Y.fill(0,0,I);for(var M=I;G!==w;)Y[M++]=k[G++];return Y}function B(A){var R=p(A);if(R)return R;throw new Error("Non-base"+o+" character")}return{encode:f,decodeUnsafe:p,decode:B}}var z2=W2,H2=z2,$2="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",Mh=H2($2);const Bt=ri(Mh);var Rt={};function Kn(t,e,n){return e<=t&&t<=n}function Ko(t){if(t===void 0)return{};if(t===Object(t))return t;throw TypeError("Could not convert argument to dictionary")}function q2(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 K2(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 lo=-1;function Nd(t){this.tokens=[].slice.call(t)}Nd.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():lo},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 ls=-1;function Ha(t,e){if(t)throw TypeError("Decoder error");return e||65533}var uo="utf-8";function fo(t,e){if(!(this instanceof fo))return new fo(t,e);if(t=t!==void 0?String(t).toLowerCase():uo,t!==uo)throw new Error("Encoding not supported. Only utf-8 is supported");e=Ko(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})}fo.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=Ko(n),this._streaming||(this._decoder=new V2({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!n.stream;for(var s=new Nd(r),i=[],o;!s.endOfStream()&&(o=this._decoder.handler(s,s.read()),o!==ls);)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===ls)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),K2(i)}};function ho(t,e){if(!(this instanceof ho))return new ho(t,e);if(t=t!==void 0?String(t).toLowerCase():uo,t!==uo)throw new Error("Encoding not supported. Only utf-8 is supported");e=Ko(e),this._streaming=!1,this._encoder=null,this._options={fatal:!!e.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}ho.prototype={encode:function(e,n){e=e?String(e):"",n=Ko(n),this._streaming||(this._encoder=new j2(this._options)),this._streaming=!!n.stream;for(var r=[],s=new Nd(q2(e)),i;!s.endOfStream()&&(i=this._encoder.handler(s,s.read()),i!==ls);)Array.isArray(i)?r.push.apply(r,i):r.push(i);if(!this._streaming){for(;i=this._encoder.handler(s,s.read()),i!==ls;)Array.isArray(i)?r.push.apply(r,i):r.push(i);this._encoder=null}return new Uint8Array(r)}};function V2(t){var e=t.fatal,n=0,r=0,s=0,i=128,o=191;this.handler=function(a,d){if(d===lo&&s!==0)return s=0,Ha(e);if(d===lo)return ls;if(s===0){if(Kn(d,0,127))return d;if(Kn(d,194,223))s=1,n=d-192;else if(Kn(d,224,239))d===224&&(i=160),d===237&&(o=159),s=2,n=d-224;else if(Kn(d,240,244))d===240&&(i=144),d===244&&(o=143),s=3,n=d-240;else return Ha(e);return n=n<<6*s,null}if(!Kn(d,i,o))return n=s=r=0,i=128,o=191,a.prepend(d),Ha(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 j2(t){t.fatal,this.handler=function(e,n){if(n===lo)return ls;if(Kn(n,0,127))return n;var r,s;Kn(n,128,2047)?(r=1,s=192):Kn(n,2048,65535)?(r=2,s=224):Kn(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 G2=Object.freeze(Object.defineProperty({__proto__:null,TextDecoder:fo,TextEncoder:ho},Symbol.toStringTag,{value:"Module"})),Y2=Hc(G2);var X2=cn&&cn.__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]}),J2=cn&&cn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ln=cn&&cn.__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},Z2=cn&&cn.__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)&&X2(e,t,n);return J2(e,t),e},Ph=cn&&cn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Rt,"__esModule",{value:!0});var Wh=Rt.deserializeUnchecked=Vh=Rt.deserialize=Kh=Rt.serialize=Rt.BinaryReader=Rt.BinaryWriter=Rt.BorshError=Rt.baseDecode=Rt.baseEncode=void 0;const sr=Ph(Dd),zh=Ph(Mh),Q2=Z2(Y2),e8=typeof TextDecoder!="function"?Q2.TextDecoder:TextDecoder,t8=new e8("utf-8",{fatal:!0});function n8(t){return typeof t=="string"&&(t=Ie.Buffer.from(t,"utf8")),zh.default.encode(Ie.Buffer.from(t))}Rt.baseEncode=n8;function r8(t){return Ie.Buffer.from(zh.default.decode(t))}Rt.baseDecode=r8;const $a=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 Hh{constructor(){this.buf=Ie.Buffer.alloc($a),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=Ie.Buffer.concat([this.buf,Ie.Buffer.alloc($a)]))}writeU8(e){this.maybeResize(),this.buf.writeUInt8(e,this.length),this.length+=1}writeU16(e){this.maybeResize(),this.buf.writeUInt16LE(e,this.length),this.length+=2}writeU32(e){this.maybeResize(),this.buf.writeUInt32LE(e,this.length),this.length+=4}writeU64(e){this.maybeResize(),this.writeBuffer(Ie.Buffer.from(new sr.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(Ie.Buffer.from(new sr.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(Ie.Buffer.from(new sr.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(Ie.Buffer.from(new sr.default(e).toArray("le",64)))}writeBuffer(e){this.buf=Ie.Buffer.concat([Ie.Buffer.from(this.buf.subarray(0,this.length)),e,Ie.Buffer.alloc($a)]),this.length+=e.length}writeString(e){this.maybeResize();const n=Ie.Buffer.from(e,"utf8");this.writeU32(n.length),this.writeBuffer(n)}writeFixedArray(e){this.writeBuffer(Ie.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=Hh;function Mn(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 sr.default(e,"le")}readU128(){const e=this.readBuffer(16);return new sr.default(e,"le")}readU256(){const e=this.readBuffer(32);return new sr.default(e,"le")}readU512(){const e=this.readBuffer(64);return new sr.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 t8.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}}Ln([Mn],en.prototype,"readU8",null);Ln([Mn],en.prototype,"readU16",null);Ln([Mn],en.prototype,"readU32",null);Ln([Mn],en.prototype,"readU64",null);Ln([Mn],en.prototype,"readU128",null);Ln([Mn],en.prototype,"readU256",null);Ln([Mn],en.prototype,"readU512",null);Ln([Mn],en.prototype,"readString",null);Ln([Mn],en.prototype,"readFixedArray",null);Ln([Mn],en.prototype,"readArray",null);Rt.BinaryReader=en;function $h(t){return t.charAt(0).toUpperCase()+t.slice(1)}function hr(t,e,n,r,s){try{if(typeof r=="string")s[`write${$h(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++)hr(t,null,n[i],r[0],s)}else s.writeArray(n,i=>{hr(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),hr(t,e,n,r.type,s));break}case"map":{s.writeU32(n.size),n.forEach((i,o)=>{hr(t,e,o,r.key,s),hr(t,e,i,r.value,s)});break}default:throw new zt(`FieldType ${r} unrecognized`)}else qh(t,n,s)}catch(i){throw i instanceof zt&&i.addToFieldPath(e),i}}function qh(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])=>{hr(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),hr(t,o,e[o],a,n);break}}}else throw new zt(`Unexpected schema kind: ${r.kind} for ${e.constructor.name}`)}function s8(t,e,n=Hh){const r=new n;return qh(t,e,r),r.toArray()}var Kh=Rt.serialize=s8;function mr(t,e,n,r){try{if(typeof n=="string")return r[`read${$h(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(mr(t,null,n[0],r));return s}else return r.readArray(()=>mr(t,e,n[0],r))}if(n.kind==="option")return r.readU8()?mr(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=mr(t,e,n.key,r),d=mr(t,e,n.value,r);s.set(a,d)}return s}return Ud(t,n,r)}catch(s){throw s instanceof zt&&s.addToFieldPath(e),s}}function Ud(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]=mr(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=mr(t,i,o,n);return new e({[i]:a})}throw new zt(`Unexpected schema kind: ${r.kind} for ${e.constructor.name}`)}function i8(t,e,n,r=en){const s=new r(n),i=Ud(t,e,s);if(s.offset<n.length)throw new zt(`Unexpected ${n.length-s.offset} bytes after deserialized data`);return i}var Vh=Rt.deserialize=i8;function o8(t,e,n,r=en){const s=new r(n);return Ud(t,e,s)}Wh=Rt.deserializeUnchecked=o8;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=or=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 Ld=ae;function Cs(t){if(!(t instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}H.checkUint8Array=Cs;function _e(t){return Cs(t),Ld.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 Md(t,e){return e.property?t+"["+e.property+"]":t}H.nameWithProperty=Md;function a8(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=a8;class Vt extends ve{isCount(){throw new Error("ExternalLayout is abstract")}}H.ExternalLayout=Vt;class jh 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){Cs(e);const r=e.length-n;return Math.floor(r/this.elementSpan)}encode(e,n,r){return 0}}H.GreedyCount=jh;class Pd 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 an||this.layout instanceof bn}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=Pd;class an 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=an;class bn 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=bn;class zr 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=zr;class Bs 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=Bs;const Uc=Math.pow(2,32);function Vo(t){const e=Math.floor(t/Uc),n=t-e*Uc;return{hi32:e,lo32:n}}function jo(t,e){return t*Uc+e}class Gh 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 jo(i,s)}encode(e,n,r=0){const s=Vo(e),i=_e(n);return i.writeUInt32LE(s.lo32,r),i.writeUInt32LE(s.hi32,r+4),8}}H.NearUInt64=Gh;class Yh 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 jo(s,i)}encode(e,n,r=0){const s=Vo(e),i=_e(n);return i.writeUInt32BE(s.hi32,r),i.writeUInt32BE(s.lo32,r+4),8}}H.NearUInt64BE=Yh;class Xh 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 jo(i,s)}encode(e,n,r=0){const s=Vo(e),i=_e(n);return i.writeUInt32LE(s.lo32,r),i.writeInt32LE(s.hi32,r+4),8}}H.NearInt64=Xh;class Jh 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 jo(s,i)}encode(e,n,r=0){const s=Vo(e),i=_e(n);return i.writeInt32BE(s.hi32,r),i.writeUInt32BE(s.lo32,r+4),8}}H.NearInt64BE=Jh;class Zh 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=Zh;class Qh 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=Qh;class em 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=em;class tm 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=tm;class nm 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=nm;class rm 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){Cs(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=rm;class Wd{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=Wd;class mo extends Wd{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=mo;class zd extends ve{constructor(e,n,r){let s;if(e instanceof an||e instanceof bn)s=new mo(new Pd(e));else if(e instanceof Vt&&e.isCount())s=new mo(e);else if(e instanceof Wd)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 an||e instanceof bn)&&(i+=s.layout.span)),super(i,r),this.discriminator=s,this.usesPrefixDiscriminator=e instanceof an||e instanceof bn,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 sm(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=zd;class sm extends ve{constructor(e,n,r,s){if(!(e instanceof zd))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=sm;function Gr(t){return 0>t&&(t+=4294967296),t}class Hd extends ve{constructor(e,n,r){if(!(e instanceof an||e instanceof bn))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=Gr(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 $d(this,e,n);return this.fields.push(r),r}addBoolean(e){const n=new im(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=Hd;class $d{constructor(e,n,r){if(!(e instanceof Hd))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=Gr(this.valueMask<<this.start),this.property=r}decode(e,n){const r=this.container._packedGetValue();return Gr(r&this.wordMask)>>>this.start}encode(e){if(typeof e!="number"||!Number.isInteger(e)||e!==Gr(e&this.valueMask))throw new TypeError(Md("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);const n=this.container._packedGetValue(),r=Gr(e<<this.start);this.container._packedSetValue(Gr(n&~this.wordMask)|r)}}H.BitField=$d;let im=class extends $d{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=im;let om=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(Md("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=om;class am extends ve{constructor(e){super(-1,e)}getSpan(e,n=0){Cs(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=Ld.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=am;class cm 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 Cs(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=Ld.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=cm;class dm 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=dm;exports.greedy=H.greedy=(t,e)=>new jh(t,e);var or=H.offset=(t,e,n)=>new Pd(t,e,n);exports.u8=H.u8=t=>new an(1,t);exports.u16=H.u16=t=>new an(2,t);H.u24=t=>new an(3,t);exports.u32=H.u32=t=>new an(4,t);H.u40=t=>new an(5,t);H.u48=t=>new an(6,t);var Tt=H.nu64=t=>new Gh(t);H.u16be=t=>new bn(2,t);H.u24be=t=>new bn(3,t);H.u32be=t=>new bn(4,t);H.u40be=t=>new bn(5,t);H.u48be=t=>new bn(6,t);H.nu64be=t=>new Yh(t);H.s8=t=>new zr(1,t);exports.s16=H.s16=t=>new zr(2,t);H.s24=t=>new zr(3,t);H.s32=t=>new zr(4,t);H.s40=t=>new zr(5,t);H.s48=t=>new zr(6,t);exports.ns64=H.ns64=t=>new Xh(t);H.s16be=t=>new Bs(2,t);H.s24be=t=>new Bs(3,t);H.s32be=t=>new Bs(4,t);H.s40be=t=>new Bs(5,t);H.s48be=t=>new Bs(6,t);H.ns64be=t=>new Jh(t);H.f32=t=>new Zh(t);H.f32be=t=>new Qh(t);H.f64=t=>new em(t);H.f64be=t=>new tm(t);exports.struct=H.struct=(t,e,n)=>new rm(t,e,n);H.bits=(t,e,n)=>new Hd(t,e,n);exports.seq=H.seq=(t,e,n)=>new nm(t,e,n);H.union=(t,e,n)=>new zd(t,e,n);H.unionLayoutDiscriminator=(t,e)=>new mo(t,e);exports.blob=H.blob=(t,e)=>new om(t,e);H.cstr=t=>new am(t);H.utf8=(t,e)=>new cm(t,e);H.constant=(t,e)=>new dm(t,e);var c8=1,d8=2,l8=3,u8=4,f8=5,h8=6,m8=7,b8=8,p8=9,g8=10,y8=-32700,E8=-32603,A8=-32602,w8=-32601,S8=-32600,C8=-32016,B8=-32015,x8=-32014,_8=-32013,T8=-32012,D8=-32011,R8=-32010,v8=-32009,I8=-32008,F8=-32007,k8=-32006,O8=-32005,N8=-32004,U8=-32003,L8=-32002,M8=-32001,P8=28e5,W8=2800001,z8=2800002,H8=2800003,$8=2800004,q8=2800005,K8=2800006,V8=2800007,j8=2800008,G8=2800009,Y8=2800010,X8=2800011,J8=323e4,Z8=32300001,Q8=3230002,e3=3230003,t3=3230004,n3=361e4,r3=3610001,s3=3610002,i3=3610003,o3=3610004,a3=3610005,c3=3610006,d3=3610007,l3=3611e3,u3=3704e3,f3=3704001,h3=3704002,m3=3704003,b3=3704004,p3=4128e3,g3=4128001,y3=4128002,E3=4615e3,A3=4615001,w3=4615002,S3=4615003,C3=4615004,B3=4615005,x3=4615006,_3=4615007,T3=4615008,D3=4615009,R3=4615010,v3=4615011,I3=4615012,F3=4615013,k3=4615014,O3=4615015,N3=4615016,U3=4615017,L3=4615018,M3=4615019,P3=4615020,W3=4615021,z3=4615022,H3=4615023,$3=4615024,q3=4615025,K3=4615026,V3=4615027,j3=4615028,G3=4615029,Y3=4615030,X3=4615031,J3=4615032,Z3=4615033,Q3=4615034,e6=4615035,t6=4615036,n6=4615037,r6=4615038,s6=4615039,i6=4615040,o6=4615041,a6=4615042,c6=4615043,d6=4615044,l6=4615045,u6=4615046,f6=4615047,h6=4615048,m6=4615049,b6=4615050,p6=4615051,g6=4615052,y6=4615053,E6=4615054,A6=5508e3,w6=5508001,S6=5508002,C6=5508003,B6=5508004,x6=5508005,_6=5508006,T6=5508007,D6=5508008,R6=5508009,v6=5508010,I6=5508011,F6=5663e3,k6=5663001,O6=5663002,N6=5663003,U6=5663004,L6=5663005,M6=5663006,P6=5663007,W6=5663008,z6=5663009,H6=5663010,$6=5663011,q6=5663012,K6=5663013,V6=5663014,j6=5663015,G6=5663016,Y6=5663017,X6=5663018,J6=5663019,Z6=5663020,Q6=705e4,e4=7050001,t4=7050002,n4=7050003,r4=7050004,s4=7050005,i4=7050006,o4=7050007,a4=7050008,c4=7050009,d4=7050010,l4=7050011,u4=7050012,f4=7050013,h4=7050014,m4=7050015,b4=7050016,p4=7050017,g4=7050018,y4=7050019,E4=7050020,A4=7050021,w4=7050022,S4=7050023,C4=7050024,B4=7050025,x4=7050026,_4=7050027,T4=7050028,D4=7050029,R4=7050030,v4=7050031,I4=7050032,F4=7050033,k4=7050034,O4=7050035,N4=7050036,lm=8078e3,um=8078001,U4=8078002,L4=8078003,fm=8078004,hm=8078005,mm=8078006,M4=8078007,P4=8078008,W4=8078009,z4=8078010,bm=8078011,H4=8078012,$4=8078013,q4=8078014,K4=8078015,V4=8078016,j4=8078017,G4=8078018,Y4=8078019,X4=8078020,J4=8078021,Z4=8078022,Q4=81e5,e5=8100001,t5=8100002,n5=8100003,r5=819e4,s5=8190001,i5=8190002,o5=8190003,a5=8190004,c5=99e5,d5=9900001,l5=9900002,u5=9900003,f5=9900004;function pm(t){return Array.isArray(t)?"%5B"+t.map(pm).join("%2C%20")+"%5D":typeof t=="bigint"?`${t}n`:encodeURIComponent(String(t!=null&&Object.getPrototypeOf(t)===null?{...t}:t))}function h5([t,e]){return`${t}=${pm(e)}`}function m5(t){const e=Object.entries(t).map(h5).join("&");return btoa(e)}var b5={[J8]:"Account not found at address: $address",[t3]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[e3]:"Expected decoded account at address: $address",[Q8]:"Failed to decode account data at address: $address",[Z8]:"Accounts not found at addresses: $addresses",[G8]:"Unable to find a viable program address bump seed.",[z8]:"$putativeAddress is not a base58-encoded address.",[P8]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[H8]:"The `CryptoKey` must be an `Ed25519` public key.",[X8]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[j8]:"Invalid seeds; point must fall off the Ed25519 curve.",[$8]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[K8]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[V8]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[q8]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[Y8]:"Program address cannot end with PDA marker.",[W8]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[u8]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[c8]:"The network has progressed past the last block for which this transaction could have been committed.",[lm]:"Codec [$codecDescription] cannot decode empty byte arrays.",[Z4]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[X4]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[hm]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[mm]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[fm]:"Encoder and decoder must either both be fixed-size or variable-size.",[P4]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[U4]:"Expected a fixed-size codec, got a variable-size one.",[$4]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[L4]:"Expected a variable-size codec, got a fixed-size one.",[Y4]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[um]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[G4]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[W4]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[z4]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[K4]:"Invalid literal union variant. Expected one of [$variants], got $value.",[M4]:"Expected [$codecDescription] to have $expected items, got $actual.",[H4]:"Invalid value $value for base $base with alphabet $alphabet.",[V4]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[bm]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[q4]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[J4]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[j4]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[l3]:"No random values implementation could be found.",[D3]:"instruction requires an uninitialized account",[H3]:"instruction tries to borrow reference for an account which is already borrowed",[$3]:"instruction left account with an outstanding borrowed reference",[W3]:"program other than the account's owner changed the size of the account data",[B3]:"account data too small for instruction",[z3]:"instruction expected an executable account",[u6]:"An account does not have enough lamports to be rent-exempt",[h6]:"Program arithmetic overflowed",[l6]:"Failed to serialize or deserialize account data: $encodedData",[E6]:"Builtin programs must consume compute units",[J3]:"Cross-program invocation call depth too deep",[r6]:"Computational budget exceeded",[K3]:"custom program error: #$code",[U3]:"instruction contains duplicate accounts",[q3]:"instruction modifications of multiply-passed account differ",[Y3]:"executable accounts must be rent exempt",[j3]:"instruction changed executable accounts data",[G3]:"instruction changed the balance of an executable account",[L3]:"instruction changed executable bit of an account",[k3]:"instruction modified data of an account it does not own",[F3]:"instruction spent from the balance of an account it does not own",[A3]:"generic instruction error",[b6]:"Provided owner is not allowed",[c6]:"Account is immutable",[d6]:"Incorrect authority provided",[_3]:"incorrect program id for instruction",[x3]:"insufficient funds for instruction",[C3]:"invalid account data for instruction",[f6]:"Invalid account owner",[w3]:"invalid program argument",[V3]:"program returned invalid error code",[S3]:"invalid instruction data",[n6]:"Failed to reallocate account data",[t6]:"Provided seeds do not result in a valid address",[p6]:"Accounts data allocations exceeded the maximum allowed per transaction",[g6]:"Max accounts exceeded",[y6]:"Max instruction trace length exceeded",[e6]:"Length of the seed is too long for address generation",[Z3]:"An account required by the instruction is missing",[T3]:"missing required signature for instruction",[I3]:"instruction illegally modified the program id of an account",[P3]:"insufficient account keys for instruction",[s6]:"Cross-program invocation with unauthorized signer or writable account",[i6]:"Failed to create program execution environment",[a6]:"Program failed to compile",[o6]:"Program failed to complete",[N3]:"instruction modified data of a read-only account",[O3]:"instruction changed the balance of a read-only account",[Q3]:"Cross-program invocation reentrancy not allowed for this instruction",[M3]:"instruction modified rent epoch of an account",[v3]:"sum of account balances before and after instruction do not match",[R3]:"instruction requires an initialized account",[E3]:"",[X3]:"Unsupported program id",[m6]:"Unsupported sysvar",[p3]:"The instruction does not have any accounts.",[g3]:"The instruction does not have any data.",[y3]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[f8]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[d8]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[l5]:"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",[f5]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[d5]:"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",[c5]:"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",[u5]:"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",[E8]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[A8]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[S8]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[w8]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[y8]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[T8]:"$__serverMessage",[M8]:"$__serverMessage",[N8]:"$__serverMessage",[x8]:"$__serverMessage",[R8]:"$__serverMessage",[v8]:"$__serverMessage",[C8]:"Minimum context slot has not been reached",[O8]:"Node is unhealthy; behind by $numSlotsBehind slots",[I8]:"No snapshot",[L8]:"Transaction simulation failed",[F8]:"$__serverMessage",[D8]:"Transaction history is not available from this node",[k8]:"$__serverMessage",[_8]:"Transaction signature length mismatch",[U8]:"Transaction signature verification failure",[B8]:"$__serverMessage",[u3]:"Key pair bytes must be of length 64, got $byteLength.",[f3]:"Expected private key bytes with length 32. Actual length: $actualLength.",[h3]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[b3]:"The provided private key does not match the provided public key.",[m3]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[h8]:"Lamports value must be in the range [0, 2e64-1]",[m8]:"`$value` cannot be parsed as a `BigInt`",[g8]:"$message",[b8]:"`$value` cannot be parsed as a `Number`",[l8]:"No nonce account could be found at address `$nonceAccountAddress`",[r5]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[i5]:"WebSocket was closed before payload could be added to the send buffer",[o5]:"WebSocket connection closed",[a5]:"WebSocket failed to connect",[s5]:"Failed to obtain a subscription id from the server",[n5]:"Could not find an API plan for RPC method: `$method`",[Q4]:"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`.",[t5]:"HTTP error ($statusCode): $message",[e5]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[A6]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[w6]:"The provided value does not implement the `KeyPairSigner` interface",[C6]:"The provided value does not implement the `MessageModifyingSigner` interface",[B6]:"The provided value does not implement the `MessagePartialSigner` interface",[S6]:"The provided value does not implement any of the `MessageSigner` interfaces",[_6]:"The provided value does not implement the `TransactionModifyingSigner` interface",[T6]:"The provided value does not implement the `TransactionPartialSigner` interface",[D6]:"The provided value does not implement the `TransactionSendingSigner` interface",[x6]:"The provided value does not implement any of the `TransactionSigner` interfaces",[R6]:"More than one `TransactionSendingSigner` was identified.",[v6]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[I6]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[d3]:"Cannot export a non-extractable key.",[r3]:"No digest implementation could be found.",[n3]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[s3]:`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.`,[i3]:"No signature verification implementation could be found.",[o3]:"No key generation implementation could be found.",[a3]:"No signing implementation could be found.",[c3]:"No key export implementation could be found.",[p8]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[b4]:"Transaction processing left an account with an outstanding borrowed reference",[e4]:"Account in use",[t4]:"Account loaded twice",[n4]:"Attempt to debit an account but found no record of a prior credit.",[S4]:"Transaction loads an address table account that doesn't exist",[o4]:"This transaction has already been processed",[a4]:"Blockhash not found",[c4]:"Loader call chain is too deep",[m4]:"Transactions are currently disabled due to cluster maintenance",[R4]:"Transaction contains a duplicate instruction ($index) that is not allowed",[s4]:"Insufficient funds for fee",[v4]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[i4]:"This account may not be used to pay transaction fees",[l4]:"Transaction contains an invalid account reference",[B4]:"Transaction loads an address table account with invalid data",[x4]:"Transaction address table lookup uses an invalid index",[C4]:"Transaction loads an address table account with an invalid owner",[F4]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[f4]:"This program may not be used for executing instructions",[_4]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[y4]:"Transaction loads a writable account that cannot be written",[I4]:"Transaction exceeded max loaded accounts data size cap",[d4]:"Transaction requires a fee but has no signature present",[r4]:"Attempt to load a program that does not exist",[O4]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[k4]:"ResanitizationNeeded",[h4]:"Transaction failed to sanitize accounts offsets correctly",[u4]:"Transaction did not pass signature verification",[w4]:"Transaction locked too many accounts",[N4]:"Sum of account balances before and after transaction do not match",[Q6]:"The transaction failed with the error `$errorName`",[g4]:"Transaction version is unsupported",[A4]:"Transaction would exceed account data limit within the block",[D4]:"Transaction would exceed total account data limit",[E4]:"Transaction would exceed max account limit within the block",[p4]:"Transaction would exceed max Block Cost Limit",[T4]:"Transaction would exceed max Vote Cost Limit",[j6]:"Attempted to sign a transaction with an address that is not a signer for it",[H6]:"Transaction is missing an address at index: $index.",[G6]:"Transaction has no expected signers therefore it cannot be encoded",[Z6]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[O6]:"Transaction does not have a blockhash lifetime",[N6]:"Transaction is not a durable nonce transaction",[L6]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[M6]:"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",[W6]:"No fee payer set in CompiledTransaction",[P6]:"Could not find program address at index $index",[X6]:"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",[J6]:"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",[$6]:"Transaction is missing a fee payer.",[q6]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[V6]:"Transaction first instruction is not advance nonce account instruction.",[K6]:"Transaction with no instructions cannot be durable nonce transaction.",[F6]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[k6]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[Y6]:"The transaction message expected the transaction to have $signerAddressesLength signatures, got $signaturesLength.",[z6]:"Transaction is missing signatures for addresses: $addresses.",[U6]:"Transaction version must be in the range [0, 127]. `$actualVersion` given"},zn="i",Sn="t";function p5(t,e={}){const n=b5[t];if(n.length===0)return"";let r;function s(o){if(r[Sn]===2){const a=n.slice(r[zn]+1,o);i.push(a in e?`${e[a]}`:`$${a}`)}else r[Sn]===1&&i.push(n.slice(r[zn],o))}const i=[];return n.split("").forEach((o,a)=>{if(a===0){r={[zn]:0,[Sn]:n[0]==="\\"?0:n[0]==="$"?2:1};return}let d;switch(r[Sn]){case 0:d={[zn]:a,[Sn]:1};break;case 1:o==="\\"?d={[zn]:a,[Sn]:0}:o==="$"&&(d={[zn]:a,[Sn]:2});break;case 2:o==="\\"?d={[zn]:a,[Sn]:0}:o==="$"?d={[zn]:a,[Sn]:2}:o.match(/\w/)||(d={[zn]:a,[Sn]:1});break}d&&(r!==d&&s(a),r=d)}),s(),i.join("")}function g5(t,e={}){if(Ie.process.env.NODE_ENV!=="production")return p5(t,e);{let n=`Solana error #${t}; Decode this error by running \`npx @solana/errors decode -- ${t}`;return Object.keys(e).length&&(n+=` '${m5(e)}'`),`${n}\``}}var ss=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=g5(e,r);super(i,s);ie(this,"cause",this.cause);ie(this,"context");this.context={__code:e,...r},this.name="SolanaError"}};function y5(t,e){return"fixedSize"in e?e.fixedSize:e.getSizeFromValue(t)}function E5(t){return Object.freeze({...t,encode:e=>{const n=new Uint8Array(y5(e,t));return t.write(e,n,0),n}})}function A5(t){return Object.freeze({...t,decode:(e,n=0)=>t.read(e,n)[0]})}function jr(t){return"fixedSize"in t&&typeof t.fixedSize=="number"}function w5(t,e){if(jr(t)!==jr(e))throw new ss(fm);if(jr(t)&&jr(e)&&t.fixedSize!==e.fixedSize)throw new ss(hm,{decoderFixedSize:e.fixedSize,encoderFixedSize:t.fixedSize});if(!jr(t)&&!jr(e)&&t.maxSize!==e.maxSize)throw new ss(mm,{decoderMaxSize:e.maxSize,encoderMaxSize:t.maxSize});return{...e,...t,decode:e.decode,encode:t.encode,read:e.read,write:t.write}}function S5(t,e,n=0){if(e.length-n<=0)throw new ss(lm,{codecDescription:t})}function C5(t,e,n,r=0){const s=n.length-r;if(s<e)throw new ss(um,{bytesLength:s,codecDescription:t,expected:e})}function B5(t,e,n,r){if(r<e||r>n)throw new ss(bm,{codecDescription:t,max:n,min:e,value:r})}function gm(t){return(t==null?void 0:t.endian)!==1}function x5(t){return E5({fixedSize:t.size,write(e,n,r){t.range&&B5(t.name,t.range[0],t.range[1],e);const s=new ArrayBuffer(t.size);return t.set(new DataView(s),e,gm(t.config)),n.set(new Uint8Array(s),r),r+t.size}})}function _5(t){return A5({fixedSize:t.size,read(e,n=0){S5(t.name,e,n),C5(t.name,t.size,e,n);const r=new DataView(T5(e,n,t.size));return[t.get(r,gm(t.config)),n+t.size]}})}function T5(t,e,n){const r=t.byteOffset+(e??0),s=n??t.byteLength;return t.buffer.slice(r,r+s)}var ym=(t={})=>x5({config:t,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(e,n,r)=>e.setBigUint64(0,BigInt(n),r),size:8}),D5=(t={})=>_5({config:t,get:(e,n)=>e.getBigUint64(0,n),name:"u64",size:8}),R5=(t={})=>w5(ym(t),D5(t));class v5 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 I5(t){return mi(t)&&typeof t[Symbol.iterator]=="function"}function mi(t){return typeof t=="object"&&t!=null}function bo(t){return mi(t)&&!Array.isArray(t)}function yn(t){return typeof t=="symbol"?t.toString():typeof t=="string"?JSON.stringify(t):`${t}`}function F5(t){const{done:e,value:n}=t.next();return e?void 0:n}function k5(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: \`${yn(r)}\``}=t;return{value:r,type:o,refinement:a,key:s[s.length-1],path:s,branch:i,...t,message:d}}function*vu(t,e,n,r){I5(t)||(t=[t]);for(const s of t){const i=k5(s,e,n,r);i&&(yield i)}}function*qd(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,f,p]of e.entries(t,a)){const B=qd(f,p,{path:h===void 0?r:[...r,h],branch:h===void 0?s:[...s,f],coerce:i,mask:o,message:n.message});for(const A of B)A[0]?(d=A[0].refinement!=null?"not_refined":"not_valid",yield[A[0],void 0]):i&&(f=A[1],h===void 0?t=f:t instanceof Map?t.set(h,f):t instanceof Set?t.add(f):mi(t)&&(f!==void 0||h in t)&&(t[h]=f))}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 Pn=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 f=s(d,h);return vu(f,h,this,d)}:this.validator=()=>[],i?this.refiner=(d,h)=>{const f=i(d,h);return vu(f,h,this,d)}:this.refiner=()=>[]}assert(e,n){return Em(e,this,n)}create(e,n){return te(e,this,n)}is(e){return Am(e,this)}mask(e,n){return O5(e,this,n)}validate(e,n={}){return bi(e,this,n)}};function Em(t,e,n){const r=bi(t,e,{message:n});if(r[0])throw r[0]}function te(t,e,n){const r=bi(t,e,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function O5(t,e,n){const r=bi(t,e,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}function Am(t,e){return!bi(t,e)[0]}function bi(t,e,n={}){const r=qd(t,e,n),s=F5(r);return s[0]?[new v5(s[0],function*(){for(const o of r)o[0]&&(yield o[0])}),void 0]:[void 0,s[1]]}function Hr(t,e){return new Pn({type:t,schema:null,validator:e})}function N5(){return Hr("any",()=>!0)}function ne(t){return new Pn({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[n,r]of e.entries())yield[n,r,t]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${yn(e)}`}})}function Un(){return Hr("boolean",t=>typeof t=="boolean")}function Kd(t){return Hr("instance",e=>e instanceof t||`Expected a \`${t.name}\` instance, but received: ${yn(e)}`)}function He(t){const e=yn(t),n=typeof t;return new Pn({type:"literal",schema:n==="string"||n==="number"||n==="boolean"?t:null,validator(r){return r===t||`Expected the literal \`${e}\`, but received: ${yn(r)}`}})}function U5(){return Hr("never",()=>!1)}function re(t){return new Pn({...t,validator:(e,n)=>e===null||t.validator(e,n),refiner:(e,n)=>e===null||t.refiner(e,n)})}function z(){return Hr("number",t=>typeof t=="number"&&!isNaN(t)||`Expected a number, but received: ${yn(t)}`)}function ce(t){return new Pn({...t,validator:(e,n)=>e===void 0||t.validator(e,n),refiner:(e,n)=>e===void 0||t.refiner(e,n)})}function wm(t,e){return new Pn({type:"record",schema:null,*entries(n){if(mi(n))for(const r in n){const s=n[r];yield[r,r,t],yield[r,s,e]}},validator(n){return bo(n)||`Expected an object, but received: ${yn(n)}`},coercer(n){return bo(n)?{...n}:n}})}function Q(){return Hr("string",t=>typeof t=="string"||`Expected a string, but received: ${yn(t)}`)}function Vd(t){const e=U5();return new Pn({type:"tuple",schema:null,*entries(n){if(Array.isArray(n)){const r=Math.max(t.length,n.length);for(let s=0;s<r;s++)yield[s,n[s],t[s]||e]}},validator(n){return Array.isArray(n)||`Expected an array, but received: ${yn(n)}`},coercer(n){return Array.isArray(n)?n.slice():n}})}function X(t){const e=Object.keys(t);return new Pn({type:"type",schema:t,*entries(n){if(mi(n))for(const r of e)yield[r,n[r],t[r]]},validator(n){return bo(n)||`Expected an object, but received: ${yn(n)}`},coercer(n){return bo(n)?{...n}:n}})}function $t(t){const e=t.map(n=>n.type).join(" | ");return new Pn({type:"union",schema:null,coercer(n,r){for(const s of t){const[i,o]=s.validate(n,{coerce:!0,mask:r.mask});if(!i)return o}return n},validator(n,r){const s=[];for(const i of t){const[...o]=qd(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: ${yn(n)}`,...s]}})}function xs(){return Hr("unknown",()=>!0)}function pi(t,e,n){return new Pn({...t,coercer:(r,s)=>Am(r,e)?t.coercer(n(r,s),s):t.coercer(r,s)})}var Di,L5=new Uint8Array(16);function Sm(){if(!Di&&(Di=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Di))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Di(L5)}const M5=/^(?:[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 Go(t){return typeof t=="string"&&M5.test(t)}var _t=[];for(var qa=0;qa<256;++qa)_t.push((qa+256).toString(16).substr(1));function Yo(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(!Go(n))throw TypeError("Stringified UUID is invalid");return n}var Iu,Ka,Va=0,ja=0;function P5(t,e,n){var r=e&&n||0,s=e||new Array(16);t=t||{};var i=t.node||Iu,o=t.clockseq!==void 0?t.clockseq:Ka;if(i==null||o==null){var a=t.random||(t.rng||Sm)();i==null&&(i=Iu=[a[0]|1,a[1],a[2],a[3],a[4],a[5]]),o==null&&(o=Ka=(a[6]<<8|a[7])&16383)}var d=t.msecs!==void 0?t.msecs:Date.now(),h=t.nsecs!==void 0?t.nsecs:ja+1,f=d-Va+(h-ja)/1e4;if(f<0&&t.clockseq===void 0&&(o=o+1&16383),(f<0||d>Va)&&t.nsecs===void 0&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Va=d,ja=h,Ka=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 A=0;A<6;++A)s[r+A]=i[A];return e||Yo(s)}function Cm(t){if(!Go(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 W5(t){t=unescape(encodeURIComponent(t));for(var e=[],n=0;n<t.length;++n)e.push(t.charCodeAt(n));return e}var z5="6ba7b810-9dad-11d1-80b4-00c04fd430c8",H5="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Bm(t,e,n){function r(s,i,o,a){if(typeof s=="string"&&(s=W5(s)),typeof i=="string"&&(i=Cm(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 Yo(d)}try{r.name=t}catch{}return r.DNS=z5,r.URL=H5,r}function $5(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 q5(K5(V5(t),t.length*8))}function q5(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 xm(t){return(t+64>>>9<<4)+14+1}function K5(t,e){t[e>>5]|=128<<e%32,t[xm(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,f=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=ir(n,a),r=ir(r,d),s=ir(s,h),i=ir(i,f)}return[n,r,s,i]}function V5(t){if(t.length===0)return[];for(var e=t.length*8,n=new Uint32Array(xm(e)),r=0;r<e;r+=8)n[r>>5]|=(t[r/8]&255)<<r%32;return n}function ir(t,e){var n=(t&65535)+(e&65535),r=(t>>16)+(e>>16)+(n>>16);return r<<16|n&65535}function j5(t,e){return t<<e|t>>>32-e}function Xo(t,e,n,r,s,i){return ir(j5(ir(ir(e,t),ir(r,i)),s),n)}function kt(t,e,n,r,s,i,o){return Xo(e&n|~e&r,t,e,s,i,o)}function Ot(t,e,n,r,s,i,o){return Xo(e&r|n&~r,t,e,s,i,o)}function Nt(t,e,n,r,s,i,o){return Xo(e^n^r,t,e,s,i,o)}function Ut(t,e,n,r,s,i,o){return Xo(n^(e|~r),t,e,s,i,o)}var G5=Bm("v3",48,$5);function Y5(t,e,n){t=t||{};var r=t.random||(t.rng||Sm)();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 Yo(r)}function X5(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 Ga(t,e){return t<<e|t>>>32-e}function J5(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),f=0;f<16;++f)h[f]=t[d*64+f*4]<<24|t[d*64+f*4+1]<<16|t[d*64+f*4+2]<<8|t[d*64+f*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),A=0;A<16;++A)B[A]=a[p][A];for(var R=16;R<80;++R)B[R]=Ga(B[R-3]^B[R-8]^B[R-14]^B[R-16],1);for(var I=n[0],E=n[1],w=n[2],k=n[3],_=n[4],U=0;U<80;++U){var O=Math.floor(U/20),$=Ga(I,5)+X5(O,E,w,k)+_+e[O]+B[U]>>>0;_=k,k=w,w=Ga(E,30)>>>0,E=I,I=$}n[0]=n[0]+I>>>0,n[1]=n[1]+E>>>0,n[2]=n[2]+w>>>0,n[3]=n[3]+k>>>0,n[4]=n[4]+_>>>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 Z5=Bm("v5",80,J5);const Q5="00000000-0000-0000-0000-000000000000";function ew(t){if(!Go(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)}const tw=Object.freeze(Object.defineProperty({__proto__:null,NIL:Q5,parse:Cm,stringify:Yo,v1:P5,v3:G5,v4:Y5,v5:Z5,validate:Go,version:ew},Symbol.toStringTag,{value:"Module"})),_m=Hc(tw),nw=_m.v4,rw=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 nw()};i.id=o(i,r)}else s===2&&n===null?r.notificationIdNull&&(i.id=null):i.id=n;return i};var sw=rw;const iw=_m.v4,ow=sw,Qs=function(t,e){if(!(this instanceof Qs))return new Qs(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 iw()},version:typeof e.version<"u"?e.version:2,notificationIdNull:typeof e.notificationIdNull=="boolean"?e.notificationIdNull:!1},this.callServer=t};var aw=Qs;Qs.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=ow(t,e,n,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(f){if(h)return r(f);throw f}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,f){s._parseResponse(h,f,r)}),i};Qs.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 Tm=ri(aw);var Dm={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,f){this.fn=d,this.context=h,this.once=f||!1}function i(d,h,f,p,B){if(typeof f!="function")throw new TypeError("The listener must be a function");var A=new s(f,p||d,B),R=n?n+h:h;return d._events[R]?d._events[R].fn?d._events[R]=[d._events[R],A]:d._events[R].push(A):(d._events[R]=A,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=[],f,p;if(this._eventsCount===0)return h;for(p in f=this._events)e.call(f,p)&&h.push(n?p.slice(1):p);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(f)):h},a.prototype.listeners=function(h){var f=n?n+h:h,p=this._events[f];if(!p)return[];if(p.fn)return[p.fn];for(var B=0,A=p.length,R=new Array(A);B<A;B++)R[B]=p[B].fn;return R},a.prototype.listenerCount=function(h){var f=n?n+h:h,p=this._events[f];return p?p.fn?1:p.length:0},a.prototype.emit=function(h,f,p,B,A,R){var I=n?n+h:h;if(!this._events[I])return!1;var E=this._events[I],w=arguments.length,k,_;if(E.fn){switch(E.once&&this.removeListener(h,E.fn,void 0,!0),w){case 1:return E.fn.call(E.context),!0;case 2:return E.fn.call(E.context,f),!0;case 3:return E.fn.call(E.context,f,p),!0;case 4:return E.fn.call(E.context,f,p,B),!0;case 5:return E.fn.call(E.context,f,p,B,A),!0;case 6:return E.fn.call(E.context,f,p,B,A,R),!0}for(_=1,k=new Array(w-1);_<w;_++)k[_-1]=arguments[_];E.fn.apply(E.context,k)}else{var U=E.length,O;for(_=0;_<U;_++)switch(E[_].once&&this.removeListener(h,E[_].fn,void 0,!0),w){case 1:E[_].fn.call(E[_].context);break;case 2:E[_].fn.call(E[_].context,f);break;case 3:E[_].fn.call(E[_].context,f,p);break;case 4:E[_].fn.call(E[_].context,f,p,B);break;default:if(!k)for(O=1,k=new Array(w-1);O<w;O++)k[O-1]=arguments[O];E[_].fn.apply(E[_].context,k)}}return!0},a.prototype.on=function(h,f,p){return i(this,h,f,p,!1)},a.prototype.once=function(h,f,p){return i(this,h,f,p,!0)},a.prototype.removeListener=function(h,f,p,B){var A=n?n+h:h;if(!this._events[A])return this;if(!f)return o(this,A),this;var R=this._events[A];if(R.fn)R.fn===f&&(!B||R.once)&&(!p||R.context===p)&&o(this,A);else{for(var I=0,E=[],w=R.length;I<w;I++)(R[I].fn!==f||B&&!R[I].once||p&&R[I].context!==p)&&E.push(R[I]);E.length?this._events[A]=E.length===1?E[0]:E:o(this,A)}return this},a.prototype.removeAllListeners=function(h){var f;return h?(f=n?n+h:h,this._events[f]&&o(this,f)):(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})(Dm);var cw=Dm.exports;const jd=ri(cw);var dw=class extends jd{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 lw(t,e){return new dw(t,e)}var uw=class{encode(t){return JSON.stringify(t)}decode(t){return JSON.parse(t)}},fw=class extends jd{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 uw,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=ae.Buffer.from(r).toString());try{r=this.dataPack.decode(r)}catch{return}if(r.notification&&this.listeners(r.notification).length){if(!Object.keys(r.params).length)return this.emit(r.notification);const s=[r.notification];if(r.params.constructor===Object)s.push(r.params);else for(let i=0;i<r.params.length;i++)s.push(r.params[i]);return Promise.resolve().then(()=>{this.emit.apply(this,s)})}if(!this.queue[r.id])return r.method?Promise.resolve().then(()=>{this.emit(r.method,r==null?void 0:r.params)}):void 0;"error"in r=="result"in r&&this.queue[r.id].promise[1](new Error('Server response malformed. Response must include either "result" or "error", but not both.')),this.queue[r.id].timeout&&clearTimeout(this.queue[r.id].timeout),r.error?this.queue[r.id].promise[1](r.error):this.queue[r.id].promise[0](r.result),delete this.queue[r.id]}),this.socket.addEventListener("error",r=>this.emit("error",r)),this.socket.addEventListener("close",({code:r,reason:s})=>{this.ready&&setTimeout(()=>this.emit("close",r,s),0),this.ready=!1,this.socket=void 0,r!==1e3&&(this.current_reconnects++,this.reconnect&&(this.max_reconnects>this.current_reconnects||this.max_reconnects===0)&&(this.reconnect_timer_id=setTimeout(()=>this._connect(e,n),this.reconnect_interval)))})}};const hw=Mr.utils.randomPrivateKey,Fu=()=>{const t=Mr.utils.randomPrivateKey(),e=po(t),n=new Uint8Array(64);return n.set(t),n.set(e,32),{publicKey:e,secretKey:n}},po=Mr.getPublicKey;function ku(t){try{return Mr.ExtendedPoint.fromHex(t),!0}catch{return!1}}const Gd=(t,e)=>Mr.sign(t,e.slice(0,32)),mw=Mr.verify,Ee=t=>ae.Buffer.isBuffer(t)?t:t instanceof Uint8Array?ae.Buffer.from(t.buffer,t.byteOffset,t.byteLength):ae.Buffer.from(t);class Yd{constructor(e){Object.assign(this,e)}encode(){return ae.Buffer.from(Kh(zs,this))}static decode(e){return Vh(zs,this,e)}static decodeUnchecked(e){return Wh(zs,this,e)}}class bw extends Yd{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 zs=new Map;var Rm;const vm=32,kn=32;function pw(t){return t._bn!==void 0}let Ou=1;class Z extends Yd{constructor(e){if(super({}),this._bn=void 0,pw(e))this._bn=e._bn;else{if(typeof e=="string"){const n=Bt.decode(e);if(n.length!=kn)throw new Error("Invalid public key input");this._bn=new Fc(n)}else this._bn=new Fc(e);if(this._bn.byteLength()>kn)throw new Error("Invalid public key input")}}static unique(){const e=new Z(Ou);return Ou+=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(ae.Buffer);if(e.length===kn)return e;const n=ae.Buffer.alloc(32);return e.copy(n,32-e.length),n}get[Symbol.toStringTag](){return`PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed(e,n,r){const s=ae.Buffer.concat([e.toBuffer(),ae.Buffer.from(n),r.toBuffer()]),i=eo(s);return new Z(i)}static createProgramAddressSync(e,n){let r=ae.Buffer.alloc(0);e.forEach(function(i){if(i.length>vm)throw new TypeError("Max seed length exceeded");r=ae.Buffer.concat([r,Ee(i)])}),r=ae.Buffer.concat([r,n.toBuffer(),ae.Buffer.from("ProgramDerivedAddress")]);const s=eo(r);if(ku(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(ae.Buffer.from([r]));s=this.createProgramAddressSync(i,n)}catch(i){if(i instanceof TypeError)throw i;r--;continue}return[s,r]}throw new Error("Unable to find a viable program address nonce")}static async findProgramAddress(e,n){return this.findProgramAddressSync(e,n)}static isOnCurve(e){const n=new Z(e);return ku(n.toBytes())}}Rm=Z;Z.default=new Rm("11111111111111111111111111111111");zs.set(Z,{kind:"struct",fields:[["_bn","u256"]]});class gw{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(hw()),this._publicKey=Ee(po(this._secretKey))}get publicKey(){return new Z(this._publicKey)}get secretKey(){return ae.Buffer.concat([this._secretKey,this._publicKey],64)}}const yw=new Z("BPFLoader1111111111111111111111111111111111"),ar=1232,Jo=127,ei=64;class Zo extends Error{constructor(e){super(`Signature ${e} has expired: block height exceeded.`),this.signature=void 0,this.signature=e}}Object.defineProperty(Zo.prototype,"name",{value:"TransactionExpiredBlockheightExceededError"});class Xd 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(Xd.prototype,"name",{value:"TransactionExpiredTimeoutError"});class Qr extends Error{constructor(e){super(`Signature ${e} has expired: the nonce is no longer valid.`),this.signature=void 0,this.signature=e}}Object.defineProperty(Qr.prototype,"name",{value:"TransactionExpiredNonceInvalidError"});class ti{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),Ew=(t="signature")=>exports.blob(64,t),Cr=(t="string")=>{const e=exports.struct([exports.u32("length"),exports.u32("lengthPadding"),exports.blob(or(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:ae.Buffer.from(i,"utf8")};return r(d,o,a)},s.alloc=i=>exports.u32().span+exports.u32().span+ae.Buffer.from(i,"utf8").length,s},Aw=(t="authorized")=>exports.struct([Ae("staker"),Ae("withdrawer")],t),ww=(t="lockup")=>exports.struct([exports.ns64("unixTimestamp"),exports.ns64("epoch"),Ae("custodian")],t),Sw=(t="voteInit")=>exports.struct([Ae("nodePubkey"),Ae("authorizedVoter"),Ae("authorizedWithdrawer"),exports.u8("commission")],t),Cw=(t="voteAuthorizeWithSeedArgs")=>exports.struct([exports.u32("voteAuthorizationType"),Ae("currentAuthorityDerivedKeyOwnerPubkey"),Cr("currentAuthorityDerivedKeySeed"),Ae("newAuthorized")],t);function Im(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 Im({layout:s},e[s.property]);return 0};let r=0;return t.layout.fields.forEach(s=>{r+=n(s)}),r}function qt(t){let e=0,n=0;for(;;){let r=t.shift();if(e|=(r&127)<<n*7,n+=1,!(r&128))break}return e}function 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 Qo{constructor(e,n){this.payer=void 0,this.keyMetaMap=void 0,this.payer=e,this.keyMetaMap=n}static compile(e,n){const r=new Map,s=o=>{const a=o.toBase58();let 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 Qo(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 Fm="Reached end of buffer unexpectedly";function Rn(t){if(t.length===0)throw new Error(Fm);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(Fm);return t.splice(...e)}class dn{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 ti(this.staticAccountKeys)}static compile(e){const n=Qo.compile(e.instructions,e.payerKey),[r,s]=n.getMessageComponents(),o=new ti(s).compileInstructions(e.instructions).map(a=>({programIdIndex:a.programIdIndex,accounts:a.accountKeyIndexes,data:Bt.encode(a.data)}));return new dn({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:A}=p,R=Array.from(Bt.decode(p.data));let I=[];Qt(I,B.length);let E=[];return Qt(E,R.length),{programIdIndex:A,keyIndicesCount:ae.Buffer.from(I),keyIndices:B,dataLength:ae.Buffer.from(E),data:R}});let s=[];Qt(s,r.length);let i=ae.Buffer.alloc(ar);ae.Buffer.from(s).copy(i);let o=s.length;r.forEach(p=>{const A=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+=A}),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:ae.Buffer.from([this.header.numRequiredSignatures]),numReadonlySignedAccounts:ae.Buffer.from([this.header.numReadonlySignedAccounts]),numReadonlyUnsignedAccounts:ae.Buffer.from([this.header.numReadonlyUnsignedAccounts]),keyCount:ae.Buffer.from(n),keys:this.accountKeys.map(p=>Ee(p.toBytes())),recentBlockhash:Bt.decode(this.recentBlockhash)};let h=ae.Buffer.alloc(2048);const f=a.encode(d,h);return i.copy(h,f),h.slice(0,f+i.length)}static from(e){let n=[...e];const r=Rn(n);if(r!==(r&Jo))throw new Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");const s=Rn(n),i=Rn(n),o=qt(n);let a=[];for(let B=0;B<o;B++){const A=Kt(n,0,kn);a.push(new Z(ae.Buffer.from(A)))}const d=Kt(n,0,kn),h=qt(n);let f=[];for(let B=0;B<h;B++){const A=Rn(n),R=qt(n),I=Kt(n,0,R),E=qt(n),w=Kt(n,0,E),k=Bt.encode(ae.Buffer.from(w));f.push({programIdIndex:A,accounts:I,data:k})}const p={header:{numRequiredSignatures:r,numReadonlySignedAccounts:s,numReadonlyUnsignedAccounts:i},recentBlockhash:Bt.encode(ae.Buffer.from(d)),accountKeys:a,instructions:f};return new dn(p)}}class dr{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 ti(this.staticAccountKeys,n)}isAccountSigner(e){return e<this.header.numRequiredSignatures}isAccountWritable(e){const n=this.header.numRequiredSignatures,r=this.staticAccountKeys.length;if(e>=r){const s=e-r,i=this.addressTableLookups.reduce((o,a)=>o+a.writableIndexes.length,0);return s<i}else if(e>=this.header.numRequiredSignatures){const s=e-n,o=r-n-this.header.numReadonlyUnsignedAccounts;return s<o}else{const s=n-this.header.numReadonlySignedAccounts;return e<s}}resolveAddressTableLookups(e){const n={writable:[],readonly:[]};for(const r of this.addressTableLookups){const s=e.find(i=>i.key.equals(r.accountKey));if(!s)throw new Error(`Failed to find address lookup table account for table key ${r.accountKey.toBase58()}`);for(const i of r.writableIndexes)if(i<s.state.addresses.length)n.writable.push(s.state.addresses[i]);else throw new Error(`Failed to find address for index ${i} in address lookup table ${r.accountKey.toBase58()}`);for(const i of r.readonlyIndexes)if(i<s.state.addresses.length)n.readonly.push(s.state.addresses[i]);else throw new Error(`Failed to find address for index ${i} in address lookup table ${r.accountKey.toBase58()}`)}return n}static compile(e){const n=Qo.compile(e.instructions,e.payerKey),r=new Array,s={writable:new Array,readonly:new Array},i=e.addressLookupTableAccounts||[];for(const f of i){const p=n.extractTableLookup(f);if(p!==void 0){const[B,{writable:A,readonly:R}]=p;r.push(B),s.writable.push(...A),s.readonly.push(...R)}}const[o,a]=n.getMessageComponents(),h=new ti(a,s).compileInstructions(e.instructions);return new dr({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(ar),h=o.encode({prefix:128,header:this.header,staticAccountKeysLength:new Uint8Array(e),staticAccountKeys:this.staticAccountKeys.map(f=>f.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(ar);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(ar);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=Rn(n),s=r&Jo;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:Rn(n),numReadonlySignedAccounts:Rn(n),numReadonlyUnsignedAccounts:Rn(n)},a=[],d=qt(n);for(let R=0;R<d;R++)a.push(new Z(Kt(n,0,kn)));const h=Bt.encode(Kt(n,0,kn)),f=qt(n),p=[];for(let R=0;R<f;R++){const I=Rn(n),E=qt(n),w=Kt(n,0,E),k=qt(n),_=new Uint8Array(Kt(n,0,k));p.push({programIdIndex:I,accountKeyIndexes:w,data:_})}const B=qt(n),A=[];for(let R=0;R<B;R++){const I=new Z(Kt(n,0,kn)),E=qt(n),w=Kt(n,0,E),k=qt(n),_=Kt(n,0,k);A.push({accountKey:I,writableIndexes:w,readonlyIndexes:_})}return new dr({header:o,staticAccountKeys:a,recentBlockhash:h,compiledInstructions:p,addressTableLookups:A})}}const Jd={deserializeMessageVersion(t){const e=t[0],n=e&Jo;return n===e?"legacy":n},deserialize:t=>{const e=Jd.deserializeMessageVersion(t);if(e==="legacy")return dn.from(t);if(e===0)return dr.deserialize(t);throw new Error(`Transaction message version ${e} deserialization is not supported`)}};let Hn=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 Bw=ae.Buffer.alloc(ei).fill(0);class Fe{constructor(e){this.keys=void 0,this.programId=void 0,this.data=ae.Buffer.alloc(0),this.programId=e.programId,this.keys=e.keys,e.data&&(this.data=e.data)}toJSON(){return{keys:this.keys.map(({pubkey:e,isSigner:n,isWritable:r})=>({pubkey:e.toJSON(),isSigner:n,isWritable:r})),programId:this.programId.toJSON(),data:[...this.data]}}}class 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 Fe(n))}),this}compileMessage(){if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json))return this._message;let e,n;if(this.nonceInfo?(e=this.nonceInfo.nonce,this.instructions[0]!=this.nonceInfo.nonceInstruction?n=[this.nonceInfo.nonceInstruction,...this.instructions]:n=this.instructions):(e=this.recentBlockhash,n=this.instructions),!e)throw new Error("Transaction recentBlockhash required");n.length<1&&console.warn("No instructions provided");let r;if(this.feePayer)r=this.feePayer;else if(this.signatures.length>0&&this.signatures[0].publicKey)r=this.signatures[0].publicKey;else throw new Error("Transaction fee payer required");for(let I=0;I<n.length;I++)if(n[I].programId===void 0)throw new Error(`Transaction instruction index ${I} has undefined program id`);const s=[],i=[];n.forEach(I=>{I.keys.forEach(w=>{i.push({...w})});const E=I.programId.toString();s.includes(E)||s.push(E)}),s.forEach(I=>{i.push({pubkey:new Z(I),isSigner:!1,isWritable:!1})});const o=[];i.forEach(I=>{const E=I.pubkey.toString(),w=o.findIndex(k=>k.pubkey.toString()===E);w>-1?(o[w].isWritable=o[w].isWritable||I.isWritable,o[w].isSigner=o[w].isSigner||I.isSigner):o.push(I)}),o.sort(function(I,E){if(I.isSigner!==E.isSigner)return I.isSigner?-1:1;if(I.isWritable!==E.isWritable)return I.isWritable?-1:1;const w={localeMatcher:"best fit",usage:"sort",sensitivity:"variant",ignorePunctuation:!1,numeric:!1,caseFirst:"lower"};return I.pubkey.toBase58().localeCompare(E.pubkey.toBase58(),"en",w)});const a=o.findIndex(I=>I.pubkey.equals(r));if(a>-1){const[I]=o.splice(a,1);I.isSigner=!0,I.isWritable=!0,o.unshift(I)}else o.unshift({pubkey:r,isSigner:!0,isWritable:!0});for(const I of this.signatures){const E=o.findIndex(w=>w.pubkey.equals(I.publicKey));if(E>-1)o[E].isSigner||(o[E].isSigner=!0,console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release."));else throw new Error(`unknown signer: ${I.publicKey.toString()}`)}let d=0,h=0,f=0;const p=[],B=[];o.forEach(({pubkey:I,isSigner:E,isWritable:w})=>{E?(p.push(I.toString()),d+=1,w||(h+=1)):(B.push(I.toString()),w||(f+=1))});const A=p.concat(B),R=n.map(I=>{const{data:E,programId:w}=I;return{programIdIndex:A.indexOf(w.toString()),accounts:I.keys.map(k=>A.indexOf(k.pubkey.toString())),data:Bt.encode(E)}});return R.forEach(I=>{xe(I.programIdIndex>=0),I.accounts.forEach(E=>xe(E>=0))}),new dn({header:{numRequiredSignatures:d,numReadonlySignedAccounts:h,numReadonlyUnsignedAccounts:f},accountKeys:A,recentBlockhash:e,instructions:R})}_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=Gd(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=ae.Buffer.from(n)}verifySignatures(e=!0){return!this._getMessageSignednessErrors(this.serializeMessage(),e)}_getMessageSignednessErrors(e,n){const r={};for(const{signature:s,publicKey:i}of this.signatures)s===null?n&&(r.missing||(r.missing=[])).push(i):mw(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=ae.Buffer.alloc(s);return xe(n.length<256),ae.Buffer.from(r).copy(i,0),n.forEach(({signature:o},a)=>{o!==null&&(xe(o.length===64,"signature has invalid length"),ae.Buffer.from(o).copy(i,r.length+a*64))}),e.copy(i,r.length+n.length*64),xe(i.length<=ar,`Transaction too large: ${i.length} > ${ar}`),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=qt(n);let s=[];for(let i=0;i<r;i++){const o=Kt(n,0,ei);s.push(Bt.encode(ae.Buffer.from(o)))}return Be.populate(dn.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(Bw)?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 Fe({keys:i,programId:e.accountKeys[s.programIdIndex],data:Bt.decode(s.data)}))}),r._message=e,r._json=r.toJSON(),r}}class ea{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 f=e.staticAccountKeys.length-o-d;xe(f>=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 A=[];for(const R of s){const I=[];for(const w of R.accountKeyIndexes){const k=p.get(w);if(k===void 0)throw new Error(`Failed to find key for account key index ${w}`);const _=w<o;let U;_?U=w<h:w<p.staticAccountKeys.length?U=w-o<f:U=w-p.staticAccountKeys.length<p.accountKeysFromLookups.writable.length,I.push({pubkey:k,isSigner:w<r.numRequiredSignatures,isWritable:U})}const E=p.get(R.programIdIndex);if(E===void 0)throw new Error(`Failed to find program id for program id index ${R.programIdIndex}`);A.push(new Fe({programId:E,data:Ee(R.data),keys:I}))}return new ea({payerKey:B,instructions:A,recentBlockhash:i})}compileToLegacyMessage(){return dn.compile({payerKey:this.payerKey,recentBlockhash:this.recentBlockhash,instructions:this.instructions})}compileToV0Message(e){return dr.compile({payerKey:this.payerKey,recentBlockhash:this.recentBlockhash,instructions:this.instructions,addressLookupTableAccounts:e})}}class ta{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(ei));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(Ew(),this.signatures.length,"signatures"),exports.blob(e.length,"serializedMessage")]),s=new Uint8Array(2048),i=r.encode({encodedSignaturesLength:new Uint8Array(n),signatures:this.signatures,serializedMessage:e},s);return s.slice(0,i)}static deserialize(e){let n=[...e];const r=[],s=qt(n);for(let o=0;o<s;o++)r.push(new Uint8Array(Kt(n,0,ei)));const i=Jd.deserialize(new Uint8Array(n));return new ta(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]=Gd(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 xw=160,_w=64,Tw=xw/_w,km=1e3/Tw,fn=new Z("SysvarC1ock11111111111111111111111111111111"),Dw=new Z("SysvarEpochSchedu1e111111111111111111111111"),Om=new Z("Sysvar1nstructions1111111111111111111111111"),Ki=new Z("SysvarRecentB1ockHashes11111111111111111111"),Nr=new Z("SysvarRent111111111111111111111111111111111"),Rw=new Z("SysvarRewards111111111111111111111111111111"),vw=new Z("SysvarS1otHashes111111111111111111111111111"),Iw=new Z("SysvarS1otHistory11111111111111111111111111"),Vi=new Z("SysvarStakeHistory1111111111111111111111111");class us 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 Fw={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 Lc(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 us({action:"send",signature:i,transactionMessage:`Status: (${JSON.stringify(o)})`}):new Error(`Transaction ${i} failed (${JSON.stringify(o)})`);return i}function br(t){return new Promise(e=>setTimeout(e,t))}function we(t,e){const n=t.layout.span>=0?t.layout.span:Im(t,e),r=ae.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 Nm=Tt("lamportsPerSignature"),Um=exports.struct([exports.u32("version"),exports.u32("state"),Ae("authorizedPubkey"),Ae("nonce"),exports.struct([Nm],"feeCalculator")]),Mc=Um.span;class na{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=Um.decode(Ee(e),0);return new na({authorizedPubkey:new Z(n.authorizedPubkey),nonce:new Z(n.nonce).toString(),feeCalculator:n.feeCalculator})}}function fs(t){const e=exports.blob(8,t),n=e.decode.bind(e),r=e.encode.bind(e),s=e,i=R5();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 kw{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(Ne))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(Ne.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(Ne.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(Ne.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(Ne.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(Ne.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(Ne.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(Ne.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(Ne.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(Ne.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(Ne.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(Ne.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(Ne.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 Ne=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"),fs("lamports")])},CreateWithSeed:{index:3,layout:exports.struct([exports.u32("instruction"),Ae("base"),Cr("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"),Cr("seed"),exports.ns64("space"),Ae("programId")])},AssignWithSeed:{index:10,layout:exports.struct([exports.u32("instruction"),Ae("base"),Cr("seed"),Ae("programId")])},TransferWithSeed:{index:11,layout:exports.struct([exports.u32("instruction"),fs("lamports"),Cr("seed"),Ae("programId")])},UpgradeNonceAccount:{index:12,layout:exports.struct([exports.u32("instruction")])}});class At{constructor(){}static createAccount(e){const n=Ne.Create,r=we(n,{lamports:e.lamports,space:e.space,programId:Ee(e.programId.toBuffer())});return new Fe({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=Ne.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=Ne.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 Fe({keys:r,programId:this.programId,data:n})}static assign(e){let n,r;if("basePubkey"in e){const s=Ne.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=Ne.Assign;n=we(s,{programId:Ee(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]}return new Fe({keys:r,programId:this.programId,data:n})}static createAccountWithSeed(e){const n=Ne.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 Fe({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:Mc,programId:this.programId})):n.add(At.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,lamports:e.lamports,space:Mc,programId:this.programId}));const r={noncePubkey:e.noncePubkey,authorizedPubkey:e.authorizedPubkey};return n.add(this.nonceInitialize(r)),n}static nonceInitialize(e){const n=Ne.InitializeNonceAccount,r=we(n,{authorized:Ee(e.authorizedPubkey.toBuffer())}),s={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:Ki,isSigner:!1,isWritable:!1},{pubkey:Nr,isSigner:!1,isWritable:!1}],programId:this.programId,data:r};return new Fe(s)}static nonceAdvance(e){const n=Ne.AdvanceNonceAccount,r=we(n),s={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:Ki,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:r};return new Fe(s)}static nonceWithdraw(e){const n=Ne.WithdrawNonceAccount,r=we(n,{lamports:e.lamports});return new Fe({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0},{pubkey:Ki,isSigner:!1,isWritable:!1},{pubkey:Nr,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:r})}static nonceAuthorize(e){const n=Ne.AuthorizeNonceAccount,r=we(n,{authorized:Ee(e.newAuthorizedPubkey.toBuffer())});return new Fe({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=Ne.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=Ne.Allocate;n=we(s,{space:e.space}),r=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]}return new Fe({keys:r,programId:this.programId,data:n})}}At.programId=new Z("11111111111111111111111111111111");const Ow=ar-300;class Ur{constructor(){}static getMinNumSignatures(e){return 2*(Math.ceil(e/Ur.chunkSize)+1+1)}static async load(e,n,r,s,i){{const p=await e.getMinimumBalanceForRentExemption(i.length),B=await e.getAccountInfo(r.publicKey,"confirmed");let A=null;if(B!==null){if(B.executable)return console.error("Program load failed, account is already executable"),!1;B.data.length!==i.length&&(A=A||new Be,A.add(At.allocate({accountPubkey:r.publicKey,space:i.length}))),B.owner.equals(s)||(A=A||new Be,A.add(At.assign({accountPubkey:r.publicKey,programId:s}))),B.lamports<p&&(A=A||new Be,A.add(At.transfer({fromPubkey:n.publicKey,toPubkey:r.publicKey,lamports:p-B.lamports})))}else A=new Be().add(At.createAccount({fromPubkey:n.publicKey,newAccountPubkey:r.publicKey,lamports:p>0?p:1,space:i.length,programId:s}));A!==null&&await Lc(e,A,[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"),or(exports.u32(),-8),"bytes")]),a=Ur.chunkSize;let d=0,h=i,f=[];for(;h.length>0;){const p=h.slice(0,a),B=ae.Buffer.alloc(a+16);o.encode({instruction:0,offset:d,bytes:p,bytesLength:0,bytesLengthPadding:0},B);const A=new Be().add({keys:[{pubkey:r.publicKey,isSigner:!0,isWritable:!0}],programId:s,data:B});f.push(Lc(e,A,[n,r],{commitment:"confirmed"})),e._rpcEndpoint.includes("solana.com")&&await br(1e3/4),d+=a,h=h.slice(a)}await Promise.all(f);{const p=exports.struct([exports.u32("instruction")]),B=ae.Buffer.alloc(p.span);p.encode({instruction:1},B);const A=new Be().add({keys:[{pubkey:r.publicKey,isSigner:!0,isWritable:!0},{pubkey:Nr,isSigner:!1,isWritable:!1}],programId:s,data:B}),R="processed",I=await e.sendTransaction(A,[n,r],{preflightCommitment:R}),{context:E,value:w}=await e.confirmTransaction({signature:I,lastValidBlockHeight:A.lastValidBlockHeight,blockhash:A.recentBlockhash},R);if(w.err)throw new Error(`Transaction ${I} failed (${JSON.stringify(w)})`);for(;;){try{if(await e.getSlot({commitment:R})>E.slot)break}catch{}await new Promise(k=>setTimeout(k,Math.round(km/2)))}}return!0}}Ur.chunkSize=Ow;const Nw=new Z("BPFLoader2111111111111111111111111111111111");class Uw{static getMinNumSignatures(e){return Ur.getMinNumSignatures(e)}static load(e,n,r,s,i){return Ur.load(e,n,r,i,s)}}function Lw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ya,Nu;function Mw(){if(Nu)return Ya;Nu=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,f,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],f=n(r[h],!1),f!==void 0&&(a&&(a+=","),a+=JSON.stringify(h)+":"+f),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 Ya=function(r){var s=n(r,!1);if(s!==void 0)return""+s},Ya}var Pw=Mw(),Uu=Lw(Pw);const Fs=32;function Xa(t){let e=0;for(;t>1;)t/=2,e++;return e}function Ww(t){return t===0?1:(t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t|=t>>32,t+1)}class Lm{constructor(e,n,r,s,i){this.slotsPerEpoch=void 0,this.leaderScheduleSlotOffset=void 0,this.warmup=void 0,this.firstNormalEpoch=void 0,this.firstNormalSlot=void 0,this.slotsPerEpoch=e,this.leaderScheduleSlotOffset=n,this.warmup=r,this.firstNormalEpoch=s,this.firstNormalSlot=i}getEpoch(e){return this.getEpochAndSlotIndex(e)[0]}getEpochAndSlotIndex(e){if(e<this.firstNormalSlot){const n=Xa(Ww(e+Fs+1))-Xa(Fs)-1,r=this.getSlotsInEpoch(n),s=e-(r-Fs);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)*Fs:(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+Xa(Fs)):this.slotsPerEpoch}}var zw=globalThis.fetch;class Hw extends fw{constructor(e,n,r){const s=i=>{const o=lw(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 $w(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 Lu=56;class go{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=$w(qw,e),r=e.length-Lu;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(Lu));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 qw={index:1,layout:exports.struct([exports.u32("typeIndex"),fs("deactivationSlot"),Tt("lastExtendedSlot"),exports.u8("lastExtendedStartIndex"),exports.u8(),exports.seq(Ae(),or(exports.u8(),-1),"authority")])},Kw=/^[^:]+:\/\/([^:[]+|\[[^\]]+\])(:\d+)?(.*)/i;function Vw(t){const e=t.match(Kw);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 qe=pi(Kd(Z),Q(),t=>new Z(t)),Mm=Vd([Q(),He("base64")]),Zd=pi(Kd(ae.Buffer),Mm,t=>ae.Buffer.from(t[0],"base64")),Pm=30*1e3;function jw(t){if(/^https?:/.test(t)===!1)throw new TypeError("Endpoint URL must start with `http:` or `https:`.");return t}function Oe(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 Mu(t){return t.map(e=>"memcmp"in e?{...e,memcmp:{...e.memcmp,encoding:e.memcmp.encoding??"base58"}}:e)}function Wm(t){return $t([X({jsonrpc:He("2.0"),id:Q(),result:t}),X({jsonrpc:He("2.0"),id:Q(),error:X({code:xs(),message:Q(),data:ce(N5())})})])}const Gw=Wm(xs());function ye(t){return pi(Wm(t),Gw,e=>"error"in e?e:{...e,result:te(e.result,t)})}function Qe(t){return ye(X({context:X({slot:z()}),value:t}))}function ra(t){return X({context:X({slot:z()}),value:t})}function Ja(t,e){return t===0?new dr({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 dn(e)}const Yw=X({foundation:z(),foundationTerm:z(),initial:z(),taper:z(),terminal:z()}),Xw=ye(ne(re(X({epoch:z(),effectiveSlot:z(),amount:z(),postBalance:z(),commission:ce(re(z()))})))),Jw=ne(X({slot:z(),prioritizationFee:z()})),Zw=X({total:z(),validator:z(),foundation:z(),epoch:z()}),Qw=X({epoch:z(),slotIndex:z(),slotsInEpoch:z(),absoluteSlot:z(),blockHeight:ce(z()),transactionCount:ce(z())}),e9=X({slotsPerEpoch:z(),leaderScheduleSlotOffset:z(),warmup:Un(),firstNormalEpoch:z(),firstNormalSlot:z()}),t9=wm(Q(),ne(z())),$r=re($t([X({}),Q()])),n9=X({err:$r}),r9=He("receivedSignature"),s9=X({"solana-core":Q(),"feature-set":ce(z())}),i9=X({program:Q(),programId:qe,parsed:xs()}),o9=X({programId:qe,accounts:ne(qe),data:Q()}),Pu=Qe(X({err:re($t([X({}),Q()])),logs:re(ne(Q())),accounts:ce(re(ne(re(X({executable:Un(),owner:Q(),lamports:z(),data:ne(Q()),rentEpoch:ce(z())}))))),unitsConsumed:ce(z()),returnData:ce(re(X({programId:Q(),data:Vd([Q(),He("base64")])}))),innerInstructions:ce(re(ne(X({index:z(),instructions:ne($t([i9,o9]))}))))})),a9=Qe(X({byIdentity:wm(Q(),ne(z())),range:X({firstSlot:z(),lastSlot:z()})}));function c9(t,e,n,r,s,i){const o=n||zw;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(f,p)=>{const B=await new Promise((A,R)=>{try{r(f,p,(I,E)=>A([I,E]))}catch(I){R(I)}});return await o(...B)}),new Tm(async(f,p)=>{const B={method:"POST",body:f,agent:a,headers:Object.assign({"Content-Type":"application/json"},e||{},cS)};try{let A=5,R,I=500;for(;d?R=await d(t,B):R=await o(t,B),!(R.status!==429||s===!0||(A-=1,A===0));)console.error(`Server responded with ${R.status} ${R.statusText}. Retrying after ${I}ms delay...`),await br(I),I*=2;const E=await R.text();R.ok?p(null,E):p(new Error(`${R.status} ${R.statusText}: ${E}`))}catch(A){A instanceof Error&&p(A)}},{})}function d9(t){return(e,n)=>new Promise((r,s)=>{t.request(e,n,(i,o)=>{if(i){s(i);return}r(o)})})}function l9(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 u9=ye(Yw),f9=ye(Zw),h9=ye(Jw),m9=ye(Qw),b9=ye(e9),p9=ye(t9),g9=ye(z()),y9=Qe(X({total:z(),circulating:z(),nonCirculating:z(),nonCirculatingAccounts:ne(qe)})),Pc=X({amount:Q(),uiAmount:re(z()),decimals:z(),uiAmountString:ce(Q())}),E9=Qe(ne(X({address:qe,amount:Q(),uiAmount:re(z()),decimals:z(),uiAmountString:ce(Q())}))),A9=Qe(ne(X({pubkey:qe,account:X({executable:Un(),owner:qe,lamports:z(),data:Zd,rentEpoch:z()})}))),Wc=X({program:Q(),parsed:xs(),space:z()}),w9=Qe(ne(X({pubkey:qe,account:X({executable:Un(),owner:qe,lamports:z(),data:Wc,rentEpoch:z()})}))),S9=Qe(ne(X({lamports:z(),address:qe}))),ni=X({executable:Un(),owner:qe,lamports:z(),data:Zd,rentEpoch:z()}),C9=X({pubkey:qe,account:ni}),B9=pi($t([Kd(ae.Buffer),Wc]),$t([Mm,Wc]),t=>Array.isArray(t)?te(t,Zd):t),zc=X({executable:Un(),owner:qe,lamports:z(),data:B9,rentEpoch:z()}),x9=X({pubkey:qe,account:zc}),_9=X({state:$t([He("active"),He("inactive"),He("activating"),He("deactivating")]),active:z(),inactive:z()}),T9=ye(ne(X({signature:Q(),slot:z(),err:$r,memo:re(Q()),blockTime:ce(re(z()))}))),D9=ye(ne(X({signature:Q(),slot:z(),err:$r,memo:re(Q()),blockTime:ce(re(z()))}))),R9=X({subscription:z(),result:ra(ni)}),v9=X({pubkey:qe,account:ni}),I9=X({subscription:z(),result:ra(v9)}),F9=X({parent:z(),slot:z(),root:z()}),k9=X({subscription:z(),result:F9}),O9=$t([X({type:$t([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()})]),N9=X({subscription:z(),result:O9}),U9=X({subscription:z(),result:ra($t([n9,r9]))}),L9=X({subscription:z(),result:z()}),M9=X({pubkey:Q(),gossip:re(Q()),tpu:re(Q()),rpc:re(Q()),version:re(Q())}),Wu=X({votePubkey:Q(),nodePubkey:Q(),activatedStake:z(),epochVoteAccount:Un(),epochCredits:ne(Vd([z(),z(),z()])),commission:z(),lastVote:z(),rootSlot:re(z())}),P9=ye(X({current:ne(Wu),delinquent:ne(Wu)})),W9=$t([He("processed"),He("confirmed"),He("finalized")]),z9=X({slot:z(),confirmations:re(z()),err:$r,confirmationStatus:ce(W9)}),H9=Qe(ne(re(z9))),$9=ye(z()),zm=X({accountKey:qe,writableIndexes:ne(z()),readonlyIndexes:ne(z())}),Qd=X({signatures:ne(Q()),message:X({accountKeys:ne(Q()),header:X({numRequiredSignatures:z(),numReadonlySignedAccounts:z(),numReadonlyUnsignedAccounts:z()}),instructions:ne(X({accounts:ne(z()),data:Q(),programIdIndex:z()})),recentBlockhash:Q(),addressTableLookups:ce(ne(zm))})}),Hm=X({pubkey:qe,signer:Un(),writable:Un(),source:ce($t([He("transaction"),He("lookupTable")]))}),$m=X({accountKeys:ne(Hm),signatures:ne(Q())}),qm=X({parsed:xs(),program:Q(),programId:qe}),Km=X({accounts:ne(qe),data:Q(),programId:qe}),q9=$t([Km,qm]),K9=$t([X({parsed:xs(),program:Q(),programId:Q()}),X({accounts:ne(Q()),data:Q(),programId:Q()})]),Vm=pi(q9,K9,t=>"accounts"in t?te(t,Km):te(t,qm)),jm=X({signatures:ne(Q()),message:X({accountKeys:ne(Hm),instructions:ne(Vm),recentBlockhash:Q(),addressTableLookups:ce(re(ne(zm)))})}),yo=X({accountIndex:z(),mint:Q(),owner:ce(Q()),programId:ce(Q()),uiTokenAmount:Pc}),Gm=X({writable:ne(qe),readonly:ne(qe)}),sa=X({err:$r,fee:z(),innerInstructions:ce(re(ne(X({index:z(),instructions:ne(X({accounts:ne(z()),data:Q(),programIdIndex:z()}))})))),preBalances:ne(z()),postBalances:ne(z()),logMessages:ce(re(ne(Q()))),preTokenBalances:ce(re(ne(yo))),postTokenBalances:ce(re(ne(yo))),loadedAddresses:ce(Gm),computeUnitsConsumed:ce(z())}),el=X({err:$r,fee:z(),innerInstructions:ce(re(ne(X({index:z(),instructions:ne(Vm)})))),preBalances:ne(z()),postBalances:ne(z()),logMessages:ce(re(ne(Q()))),preTokenBalances:ce(re(ne(yo))),postTokenBalances:ce(re(ne(yo))),loadedAddresses:ce(Gm),computeUnitsConsumed:ce(z())}),_s=$t([He(0),He("legacy")]),qr=X({pubkey:Q(),lamports:z(),postBalance:re(z()),rewardType:re(Q()),commission:ce(re(z()))}),V9=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),transactions:ne(X({transaction:Qd,meta:re(sa),version:ce(_s)})),rewards:ce(ne(qr)),blockTime:re(z()),blockHeight:re(z())}))),j9=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),rewards:ce(ne(qr)),blockTime:re(z()),blockHeight:re(z())}))),G9=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),transactions:ne(X({transaction:$m,meta:re(sa),version:ce(_s)})),rewards:ce(ne(qr)),blockTime:re(z()),blockHeight:re(z())}))),Y9=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),transactions:ne(X({transaction:jm,meta:re(el),version:ce(_s)})),rewards:ce(ne(qr)),blockTime:re(z()),blockHeight:re(z())}))),X9=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),transactions:ne(X({transaction:$m,meta:re(el),version:ce(_s)})),rewards:ce(ne(qr)),blockTime:re(z()),blockHeight:re(z())}))),J9=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),rewards:ce(ne(qr)),blockTime:re(z()),blockHeight:re(z())}))),Z9=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),transactions:ne(X({transaction:Qd,meta:re(sa)})),rewards:ce(ne(qr)),blockTime:re(z())}))),zu=ye(re(X({blockhash:Q(),previousBlockhash:Q(),parentSlot:z(),signatures:ne(Q()),blockTime:re(z())}))),Za=ye(re(X({slot:z(),meta:re(sa),blockTime:ce(re(z())),transaction:Qd,version:ce(_s)}))),Ri=ye(re(X({slot:z(),transaction:jm,meta:re(el),blockTime:ce(re(z())),version:ce(_s)}))),Q9=Qe(X({blockhash:Q(),lastValidBlockHeight:z()})),eS=Qe(Un()),tS=X({slot:z(),numTransactions:z(),numSlots:z(),samplePeriodSecs:z()}),nS=ye(ne(tS)),rS=Qe(re(X({feeCalculator:X({lamportsPerSignature:z()})}))),sS=ye(Q()),iS=ye(Q()),oS=X({err:$r,logs:ne(Q()),signature:Q()}),aS=X({result:ra(oS),subscription:z()}),cS={"solana-client":"js/1.0.0-maintenance"};class Ym{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 f=>{const{commitment:p,config:B}=Oe(f),A=this._buildArgs([],p,void 0,B),R=Uu(A);return h[R]=h[R]??(async()=>{try{const I=await this._rpcRequest("getBlockHeight",A),E=te(I,ye(z()));if("error"in E)throw new oe(E.error,"failed to get block height information");return E.result}finally{delete h[R]}})(),await h[R]}})();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=jw(e),this._rpcWsEndpoint=r||Vw(e),this._rpcClient=c9(e,s,i,o,a,d),this._rpcRequest=d9(this._rpcClient),this._rpcBatchRequest=l9(this._rpcClient),this._rpcWebSocket=new Hw(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}=Oe(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,g9);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,y9);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(Pc));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(Pc));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}=Oe(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,A9);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,w9);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,S9);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,E9);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}=Oe(n),i=this._buildArgs([e.toBase58()],r,"base64",s),o=await this._rpcRequest("getAccountInfo",i),a=te(o,Qe(re(ni)));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}=Oe(n),i=this._buildArgs([e.toBase58()],r,"jsonParsed",s),o=await this._rpcRequest("getAccountInfo",i),a=te(o,Qe(re(zc)));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}=Oe(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(zc))));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}=Oe(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(ni))));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}=Oe(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(_9));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}=Oe(n),{encoding:i,...o}=s||{},a=this._buildArgs([e.toBase58()],r,i||"base64",{...o,...o.filters?{filters:Mu(o.filters)}:null}),d=await this._rpcRequest("getProgramAccounts",a),h=ne(C9),f=o.withContext===!0?te(d,Qe(h)):te(d,ye(h));if("error"in f)throw new oe(f.error,`failed to get accounts owned by program ${e.toBase58()}`);return f.result}async getParsedProgramAccounts(e,n){const{commitment:r,config:s}=Oe(n),i=this._buildArgs([e.toBase58()],r,"jsonParsed",s),o=await this._rpcRequest("getProgramAccounts",i),a=te(o,ye(ne(x9)));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 A={context:B,value:p};d({__type:Hn.PROCESSED,response:A})},e);const f=new Promise(p=>{r==null?p():s=this._onSubscriptionStateChange(r,B=>{B==="subscribed"&&p()})});(async()=>{if(await f,i)return;const p=await this.getSignatureStatus(n);if(i||p==null)return;const{context:B,value:A}=p;if(A!=null)if(A!=null&&A.err)h(A.err);else{switch(e){case"confirmed":case"single":case"singleGossip":{if(A.confirmationStatus==="processed")return;break}case"finalized":case"max":case"root":{if(A.confirmationStatus==="processed"||A.confirmationStatus==="confirmed")return;break}case"processed":case"recent":}i=!0,d({__type:Hn.PROCESSED,response:{context:B,value:A}})}})()}catch(f){h(f)}});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 A=await B();if(!i){for(;A<=r;)if(await br(1e3),i||(A=await B(),i))return;p({__type:Hn.BLOCKHEIGHT_EXCEEDED})}})()}),{abortConfirmation:a,confirmationPromise:d}=this.getTransactionConfirmationPromise({commitment:e,signature:s}),h=this.getCancellationPromise(n);let f;try{const p=await Promise.race([h,d,o]);if(p.__type===Hn.PROCESSED)f=p.response;else throw new Zo(s)}finally{i=!0,a()}return f}async confirmTransactionUsingDurableNonceStrategy({commitment:e,strategy:{abortSignal:n,minContextSlot:r,nonceAccountPubkey:s,nonceValue:i,signature:o}}){let a=!1;const d=new Promise(A=>{let R=i,I=null;const E=async()=>{try{const{context:w,value:k}=await this.getNonceAndContext(s,{commitment:e,minContextSlot:r});return I=w.slot,k==null?void 0:k.nonce}catch{return R}};(async()=>{if(R=await E(),!a)for(;;){if(i!==R){A({__type:Hn.NONCE_INVALID,slotInWhichNonceDidAdvance:I});return}if(await br(2e3),a||(R=await E(),a))return}})()}),{abortConfirmation:h,confirmationPromise:f}=this.getTransactionConfirmationPromise({commitment:e,signature:o}),p=this.getCancellationPromise(n);let B;try{const A=await Promise.race([p,f,d]);if(A.__type===Hn.PROCESSED)B=A.response;else{let R;for(;;){const I=await this.getSignatureStatus(o);if(I==null)break;if(I.context.slot<(A.slotInWhichNonceDidAdvance??r)){await br(400);continue}R=I;break}if(R!=null&&R.value){const I=e||"finalized",{confirmationStatus:E}=R.value;switch(I){case"processed":case"recent":if(E!=="processed"&&E!=="confirmed"&&E!=="finalized")throw new Qr(o);break;case"confirmed":case"single":case"singleGossip":if(E!=="confirmed"&&E!=="finalized")throw new Qr(o);break;case"finalized":case"max":case"root":if(E!=="finalized")throw new Qr(o);break;default:}B={context:R.context,value:{err:R.value.err}}}else throw new Qr(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:Hn.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===Hn.PROCESSED)a=d.response;else throw new Xd(n,d.timeoutMs/1e3)}finally{clearTimeout(r),i()}return a}async getClusterNodes(){const e=await this._rpcRequest("getClusterNodes",[]),n=te(e,ye(ne(M9)));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,P9);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}=Oe(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}=Oe(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(qe)));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,H9);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}=Oe(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,u9);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}=Oe(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,Xw);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,f9);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}=Oe(e),s=this._buildArgs([],n,void 0,r),i=await this._rpcRequest("getEpochInfo",s),o=te(i,m9);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,b9);if("error"in n)throw new oe(n.error,"failed to get epoch schedule");const r=n.result;return new Lm(r.slotsPerEpoch,r.leaderScheduleSlotOffset,r.warmup,r.firstNormalEpoch,r.firstNormalSlot)}async getLeaderSchedule(){const e=await this._rpcRequest("getLeaderSchedule",[]),n=te(e,p9);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,$9);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,nS);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,rS);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,h9);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}=Oe(e),s=this._buildArgs([],n,void 0,r),i=await this._rpcRequest("getLatestBlockhash",s),o=te(i,Q9);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}=Oe(n),i=this._buildArgs([e],r,void 0,s),o=await this._rpcRequest("isBlockhashValid",i),a=te(o,eS);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(s9));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}=Oe(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,G9);if("error"in a)throw a.error;return a.result}case"none":{const a=te(o,j9);if("error"in a)throw a.error;return a.result}default:{const a=te(o,V9);if("error"in a)throw a.error;const{result:d}=a;return d?{...d,transactions:d.transactions.map(({transaction:h,meta:f,version:p})=>({meta:f,transaction:{...h,message:Ja(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}=Oe(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,X9);if("error"in a)throw a.error;return a.result}case"none":{const a=te(o,J9);if("error"in a)throw a.error;return a.result}default:{const a=te(o,Y9);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,a9);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}=Oe(n),i=this._buildArgsAtLeastConfirmed([e],r,void 0,s),o=await this._rpcRequest("getTransaction",i),a=te(o,Za);if("error"in a)throw new oe(a.error,"failed to get transaction");const d=a.result;return d&&{...d,transaction:{...d.transaction,message:Ja(d.version,d.transaction.message)}}}async getParsedTransaction(e,n){const{commitment:r,config:s}=Oe(n),i=this._buildArgsAtLeastConfirmed([e],r,"jsonParsed",s),o=await this._rpcRequest("getTransaction",i),a=te(o,Ri);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}=Oe(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,Ri);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}=Oe(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,Za);if("error"in h)throw new oe(h.error,"failed to get transactions");const f=h.result;return f&&{...f,transaction:{...f.transaction,message:Ja(f.version,f.transaction.message)}}})}async getConfirmedBlock(e,n){const r=this._buildArgsAtLeastConfirmed([e],n),s=await this._rpcRequest("getBlock",r),i=te(s,Z9);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 f=new dn(d.message);return{meta:h,transaction:{...d,message:f}}})};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,zu);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,zu);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,Za);if("error"in i)throw new oe(i.error,"failed to get transaction");const o=i.result;if(!o)return o;const a=new dn(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,Ri);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,Ri);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,T9);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,D9);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 go({key:e,state:go.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=na.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,sS);if("error"in s)throw new oe(s.error,`airdrop to ${e.toBase58()} failed`);return s.result}async _blockhashWithExpiryBlockHeight(e){if(!e){for(;this._pollingBlockhash;)await br(100);const r=Date.now()-this._blockhashInfo.lastFetch>=Pm;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 br(km/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}=Oe(e),s=this._buildArgs([],n,"base64",r),i=await this._rpcRequest("getStakeMinimumDelegation",s),o=te(i,Qe(z()));if("error"in o)throw new oe(o.error,"failed to get stake minimum delegation");return o.result}async simulateTransaction(e,n,r){if("message"in e){const I=e.serialize(),E=ae.Buffer.from(I).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 k=[E,w],_=await this._rpcRequest("simulateTransaction",k),U=te(_,Pu);if("error"in U)throw new Error("failed to simulate transaction: "+U.error.message);return U.result}let s;if(e instanceof Be){let R=e;s=new Be,s.feePayer=R.feePayer,s.instructions=e.instructions,s.nonceInfo=R.nonceInfo,s.signatures=R.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 R=this._disableBlockhashCaching;for(;;){const I=await this._blockhashWithExpiryBlockHeight(R);if(s.lastValidBlockHeight=I.lastValidBlockHeight,s.recentBlockhash=I.blockhash,!i)break;if(s.sign(...i),!s.signature)throw new Error("!signature");const E=s.signature.toString("base64");if(!this._blockhashInfo.simulatedSignatures.includes(E)&&!this._blockhashInfo.transactionSignatures.includes(E)){this._blockhashInfo.simulatedSignatures.push(E);break}else R=!0}}const o=s._compile(),a=o.serialize(),h=s._serialize(a).toString("base64"),f={encoding:"base64",commitment:this.commitment};if(r){const R=(Array.isArray(r)?r:o.nonProgramIds()).map(I=>I.toBase58());f.accounts={encoding:"base64",addresses:R}}i&&(f.sigVerify=!0),n&&typeof n=="object"&&"innerInstructions"in n&&(f.innerInstructions=n.innerInstructions);const p=[h,f],B=await this._rpcRequest("simulateTransaction",p),A=te(B,Pu);if("error"in A){let R;if("data"in A.error&&(R=A.error.data.logs,R&&Array.isArray(R))){const I=`
22
+ `,E=I+R.join(I);console.error(A.error.message,E)}throw new us({action:"simulate",signature:"",transactionMessage:A.error.message,logs:R})}return A.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,iS);if("error"in d){let h;throw"data"in d.error&&(h=d.error.data.logs),new us({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,R9);this._handleServerNotification(r,[n.value,n.context])}_makeSubscription(e,n){const r=this._nextClientSubscriptionId++,s=Uu([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}=Oe(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,I9);this._handleServerNotification(r,[{accountId:n.value.pubkey,accountInfo:n.value.account},n.context])}onProgramAccountChange(e,n,r,s){const{commitment:i,config:o}=Oe(r),a=this._buildArgs([e.toBase58()],i||this._commitment||"finalized","base64",o||(s?{filters:Mu(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,aS);this._handleServerNotification(r,[n.value,n.context])}_wsOnSlotNotification(e){const{result:n,subscription:r}=te(e,k9);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,N9);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,U9);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,L9);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 Tr{constructor(e){this._keypair=void 0,this._keypair=e??Fu()}static generate(){return new Tr(Fu())}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=po(s);for(let o=0;o<32;o++)if(r[o]!==i[o])throw new Error("provided secretKey is invalid")}return new Tr({publicKey:r,secretKey:e})}static fromSeed(e){const n=po(e),r=new Uint8Array(64);return r.set(e),r.set(n,32),new Tr({publicKey:n,secretKey:r})}get publicKey(){return new Z(this._keypair.publicKey)}get secretKey(){return new Uint8Array(this._keypair.secretKey)}}const Vn=Object.freeze({CreateLookupTable:{index:0,layout:exports.struct([exports.u32("instruction"),fs("recentSlot"),exports.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:exports.struct([exports.u32("instruction")])},ExtendLookupTable:{index:2,layout:exports.struct([exports.u32("instruction"),fs(),exports.seq(Ae(),or(exports.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:exports.struct([exports.u32("instruction")])},CloseLookupTable:{index:4,layout:exports.struct([exports.u32("instruction")])}});class dS{constructor(){}static decodeInstructionType(e){this.checkProgramId(e.programId);const r=exports.u32("instruction").decode(e.data);let s;for(const[i,o]of Object.entries(Vn))if(o.index==r){s=i;break}if(!s)throw new Error("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(Vn.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(Vn.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(ia.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 ia{constructor(){}static createLookupTable(e){const[n,r]=Z.findProgramAddressSync([e.authority.toBuffer(),ym().encode(e.recentSlot)],this.programId),s=Vn.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 Fe({programId:this.programId,keys:o,data:i}),n]}static freezeLookupTable(e){const n=Vn.FreezeLookupTable,r=we(n),s=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return new Fe({programId:this.programId,keys:s,data:r})}static extendLookupTable(e){const n=Vn.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 Fe({programId:this.programId,keys:s,data:r})}static deactivateLookupTable(e){const n=Vn.DeactivateLookupTable,r=we(n),s=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return new Fe({programId:this.programId,keys:s,data:r})}static closeLookupTable(e){const n=Vn.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 Fe({programId:this.programId,keys:s,data:r})}}ia.programId=new Z("AddressLookupTab1e1111111111111111111111111");class lS{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(vn))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(vn.RequestUnits,e.data);return{units:n,additionalFee:r}}static decodeRequestHeapFrame(e){this.checkProgramId(e.programId);const{bytes:n}=De(vn.RequestHeapFrame,e.data);return{bytes:n}}static decodeSetComputeUnitLimit(e){this.checkProgramId(e.programId);const{units:n}=De(vn.SetComputeUnitLimit,e.data);return{units:n}}static decodeSetComputeUnitPrice(e){this.checkProgramId(e.programId);const{microLamports:n}=De(vn.SetComputeUnitPrice,e.data);return{microLamports:n}}static checkProgramId(e){if(!e.equals(oa.programId))throw new Error("invalid instruction; programId is not ComputeBudgetProgram")}}const vn=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"),fs("microLamports")])}});class oa{constructor(){}static requestUnits(e){const n=vn.RequestUnits,r=we(n,e);return new Fe({keys:[],programId:this.programId,data:r})}static requestHeapFrame(e){const n=vn.RequestHeapFrame,r=we(n,e);return new Fe({keys:[],programId:this.programId,data:r})}static setComputeUnitLimit(e){const n=vn.SetComputeUnitLimit,r=we(n,e);return new Fe({keys:[],programId:this.programId,data:r})}static setComputeUnitPrice(e){const n=vn.SetComputeUnitPrice,r=we(n,{microLamports:BigInt(e.microLamports)});return new Fe({keys:[],programId:this.programId,data:r})}}oa.programId=new Z("ComputeBudget111111111111111111111111111111");const Hu=64,$u=32,qu=64,Ku=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 aa{constructor(){}static createInstructionWithPublicKey(e){const{publicKey:n,message:r,signature:s,instructionIndex:i}=e;xe(n.length===$u,`Public Key must be ${$u} bytes but received ${n.length} bytes`),xe(s.length===qu,`Signature must be ${qu} bytes but received ${s.length} bytes`);const o=Ku.span,a=o+n.length,d=a+s.length,h=1,f=ae.Buffer.alloc(d+r.length),p=i??65535;return Ku.encode({numSignatures:h,padding:0,signatureOffset:a,signatureInstructionIndex:p,publicKeyOffset:o,publicKeyInstructionIndex:p,messageDataOffset:d,messageDataSize:r.length,messageInstructionIndex:p},f),f.fill(n,o),f.fill(s,a),f.fill(r,d),new Fe({keys:[],programId:aa.programId,data:f})}static createInstructionWithPrivateKey(e){const{privateKey:n,message:r,instructionIndex:s}=e;xe(n.length===Hu,`Private key must be ${Hu} bytes but received ${n.length} bytes`);try{const i=Tr.fromSecretKey(n),o=i.publicKey.toBytes(),a=Gd(r,i.secretKey);return this.createInstructionWithPublicKey({publicKey:o,message:r,signature:a,instructionIndex:s})}catch(i){throw new Error(`Error creating instruction; ${i}`)}}}aa.programId=new Z("Ed25519SigVerify111111111111111111111111111");const uS=(t,e)=>{const n=tr.sign(t,e);return[n.toCompactRawBytes(),n.recovery]};tr.utils.isValidPrivateKey;const fS=tr.getPublicKey,Vu=32,Qa=20,ju=64,hS=11,ec=exports.struct([exports.u8("numSignatures"),exports.u16("signatureOffset"),exports.u8("signatureInstructionIndex"),exports.u16("ethAddressOffset"),exports.u8("ethAddressInstructionIndex"),exports.u16("messageDataOffset"),exports.u16("messageDataSize"),exports.u8("messageInstructionIndex"),exports.blob(20,"ethAddress"),exports.blob(64,"signature"),exports.u8("recoveryId")]);class Dr{constructor(){}static publicKeyToEthAddress(e){xe(e.length===ju,`Public key must be ${ju} bytes but received ${e.length} bytes`);try{return ae.Buffer.from(Ks(Ee(e))).slice(-Qa)}catch(n){throw new Error(`Error constructing Ethereum address: ${n}`)}}static createInstructionWithPublicKey(e){const{publicKey:n,message:r,signature:s,recoveryId:i,instructionIndex:o}=e;return Dr.createInstructionWithEthAddress({ethAddress:Dr.publicKeyToEthAddress(n),message:r,signature:s,recoveryId:i,instructionIndex:o})}static createInstructionWithEthAddress(e){const{ethAddress:n,message:r,signature:s,recoveryId:i,instructionIndex:o=0}=e;let a;typeof n=="string"?n.startsWith("0x")?a=ae.Buffer.from(n.substr(2),"hex"):a=ae.Buffer.from(n,"hex"):a=n,xe(a.length===Qa,`Address must be ${Qa} bytes but received ${a.length} bytes`);const d=1+hS,h=d,f=d+a.length,p=f+s.length+1,B=1,A=ae.Buffer.alloc(ec.span+r.length);return ec.encode({numSignatures:B,signatureOffset:f,signatureInstructionIndex:o,ethAddressOffset:h,ethAddressInstructionIndex:o,messageDataOffset:p,messageDataSize:r.length,messageInstructionIndex:o,signature:Ee(s),ethAddress:Ee(a),recoveryId:i},A),A.fill(Ee(r),ec.span),new Fe({keys:[],programId:Dr.programId,data:A})}static createInstructionWithPrivateKey(e){const{privateKey:n,message:r,instructionIndex:s}=e;xe(n.length===Vu,`Private key must be ${Vu} bytes but received ${n.length} bytes`);try{const i=Ee(n),o=fS(i,!1).slice(1),a=ae.Buffer.from(Ks(Ee(r))),[d,h]=uS(a,i);return this.createInstructionWithPublicKey({publicKey:o,message:r,signature:d,recoveryId:h,instructionIndex:s})}catch(i){throw new Error(`Error creating instruction; ${i}`)}}}Dr.programId=new Z("KeccakSecp256k11111111111111111111111111111");var Xm;const Jm=new Z("StakeConfig11111111111111111111111111111111");class Zm{constructor(e,n){this.staker=void 0,this.withdrawer=void 0,this.staker=e,this.withdrawer=n}}class gi{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}}Xm=gi;gi.default=new Xm(0,0,Z.default);class mS{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 Zm(new Z(n.staker),new Z(n.withdrawer)),lockup:new gi(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(ca.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"),Aw(),ww()])},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"),Cr("authoritySeed"),Ae("authorityOwner")])}}),bS=Object.freeze({Staker:{index:0},Withdrawer:{index:1}});class ca{constructor(){}static initialize(e){const{stakePubkey:n,authorized:r,lockup:s}=e,i=s||gi.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:Nr,isSigner:!1,isWritable:!1}],programId:this.programId,data:a};return new Fe(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:fn,isSigner:!1,isWritable:!1},{pubkey:Vi,isSigner:!1,isWritable:!1},{pubkey:Jm,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:fn,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,f=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:fn,isSigner:!1,isWritable:!1}];return d&&p.push({pubkey:d,isSigner:!0,isWritable:!1}),new Be().add({keys:p,programId:this.programId,data:f})}static splitInstruction(e){const{stakePubkey:n,authorizedPubkey:r,splitStakePubkey:s,lamports:i}=e,o=Ct.Split,a=we(o,{lamports:i});return new Fe({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:fn,isSigner:!1,isWritable:!1},{pubkey:Vi,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:fn,isSigner:!1,isWritable:!1},{pubkey:Vi,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:fn,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:i})}}ca.programId=new Z("Stake11111111111111111111111111111111111111");ca.space=200;class Qm{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 pS{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(In))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(In.InitializeAccount,e.data);return{votePubkey:e.keys[0].pubkey,nodePubkey:e.keys[3].pubkey,voteInit:new Qm(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(In.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(In.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(In.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(Ts.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 In=Object.freeze({InitializeAccount:{index:0,layout:exports.struct([exports.u32("instruction"),Sw()])},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"),Cw()])}}),gS=Object.freeze({Voter:{index:0},Withdrawer:{index:1}});class Ts{constructor(){}static initializeAccount(e){const{votePubkey:n,nodePubkey:r,voteInit:s}=e,i=In.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:Nr,isSigner:!1,isWritable:!1},{pubkey:fn,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:o};return new Fe(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=In.Authorize,a=we(o,{newAuthorized:Ee(s.toBuffer()),voteAuthorizationType:i.index}),d=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:fn,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=In.AuthorizeWithSeed,h=we(d,{voteAuthorizeWithSeedArgs:{currentAuthorityDerivedKeyOwnerPubkey:Ee(r.toBuffer()),currentAuthorityDerivedKeySeed:s,newAuthorized:Ee(i.toBuffer()),voteAuthorizationType:o.index}}),f=[{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:fn,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}];return new Be().add({keys:f,programId:this.programId,data:h})}static withdraw(e){const{votePubkey:n,authorizedWithdrawerPubkey:r,lamports:s,toPubkey:i}=e,o=In.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 Ts.withdraw(e)}static updateValidatorIdentity(e){const{votePubkey:n,authorizedWithdrawerPubkey:r,nodePubkey:s}=e,i=In.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})}}Ts.programId=new Z("Vote111111111111111111111111111111111111111");Ts.space=3762;const e1=new Z("Va1idator1nfo111111111111111111111111111111"),yS=X({name:Q(),website:ce(Q()),details:ce(Q()),iconUrl:ce(Q()),keybaseUsername:ce(Q())});class tl{constructor(e,n){this.key=void 0,this.info=void 0,this.key=e,this.info=n}static fromConfigData(e){let n=[...e];if(qt(n)!==2)return null;const s=[];for(let i=0;i<2;i++){const o=new Z(Kt(n,0,kn)),a=Rn(n)===1;s.push({publicKey:o,isSigner:a})}if(s[0].publicKey.equals(e1)&&s[1].isSigner){const i=Cr().decode(ae.Buffer.from(n)),o=JSON.parse(i);return Em(o,yS),new tl(s[1].publicKey,o)}return null}}const ES=new Z("Vote111111111111111111111111111111111111111"),AS=exports.struct([Ae("nodePubkey"),Ae("authorizedWithdrawer"),exports.u8("commission"),Tt(),exports.seq(exports.struct([Tt("slot"),exports.u32("confirmationCount")]),or(exports.u32(),-8),"votes"),exports.u8("rootSlotValid"),Tt("rootSlot"),Tt(),exports.seq(exports.struct([Tt("epoch"),Ae("authorizedVoter")]),or(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")]),or(exports.u32(),-8),"epochCredits"),exports.struct([Tt("slot"),Tt("timestamp")],"lastTimestamp")]);class nl{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=AS.decode(Ee(e),4);let s=r.rootSlot;return r.rootSlotValid||(s=null),new nl({nodePubkey:new Z(r.nodePubkey),authorizedWithdrawer:new Z(r.authorizedWithdrawer),commission:r.commission,votes:r.votes,rootSlot:s,authorizedVoters:r.authorizedVoters.map(wS),priorVoters:SS(r.priorVoters),epochCredits:r.epochCredits,lastTimestamp:r.lastTimestamp})}}function wS({authorizedVoter:t,epoch:e}){return{epoch:e,authorizedVoter:new Z(t)}}function Gu({authorizedPubkey:t,epochOfLastAuthorizedSwitch:e,targetEpoch:n}){return{authorizedPubkey:new Z(t),epochOfLastAuthorizedSwitch:e,targetEpoch:n}}function SS({buf:t,idx:e,isEmpty:n}){return n?[]:[...t.slice(e+1).map(Gu),...t.slice(0,e).map(Gu)]}const Yu={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 t1(t,e){const n=e===!1?"http":"https";if(!t)return Yu[n].devnet;const r=Yu[n][t];if(!r)throw new Error(`Unknown ${n} cluster: ${t}`);return r}async function CS(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,f=(await(s?t.confirmTransaction(s,d):t.confirmTransaction(a,d))).value;if(f.err)throw a!=null?new us({action:o!=null&&o.skipPreflight?"send":"simulate",signature:a,transactionMessage:`Status: (${JSON.stringify(f)})`}):new Error(`Raw transaction ${a} failed (${JSON.stringify(f)})`);return a}const n1=1e9,BS=Object.freeze(Object.defineProperty({__proto__:null,Account:gw,AddressLookupTableAccount:go,AddressLookupTableInstruction:dS,AddressLookupTableProgram:ia,Authorized:Zm,BLOCKHASH_CACHE_TIMEOUT_MS:Pm,BPF_LOADER_DEPRECATED_PROGRAM_ID:yw,BPF_LOADER_PROGRAM_ID:Nw,BpfLoader:Uw,COMPUTE_BUDGET_INSTRUCTION_LAYOUTS:vn,ComputeBudgetInstruction:lS,ComputeBudgetProgram:oa,Connection:Ym,Ed25519Program:aa,Enum:bw,EpochSchedule:Lm,FeeCalculatorLayout:Nm,Keypair:Tr,LAMPORTS_PER_SOL:n1,LOOKUP_TABLE_INSTRUCTION_LAYOUTS:Vn,Loader:Ur,Lockup:gi,MAX_SEED_LENGTH:vm,Message:dn,MessageAccountKeys:ti,MessageV0:dr,NONCE_ACCOUNT_LENGTH:Mc,NonceAccount:na,PACKET_DATA_SIZE:ar,PUBLIC_KEY_LENGTH:kn,PublicKey:Z,SIGNATURE_LENGTH_IN_BYTES:ei,SOLANA_SCHEMA:zs,STAKE_CONFIG_ID:Jm,STAKE_INSTRUCTION_LAYOUTS:Ct,SYSTEM_INSTRUCTION_LAYOUTS:Ne,SYSVAR_CLOCK_PUBKEY:fn,SYSVAR_EPOCH_SCHEDULE_PUBKEY:Dw,SYSVAR_INSTRUCTIONS_PUBKEY:Om,SYSVAR_RECENT_BLOCKHASHES_PUBKEY:Ki,SYSVAR_RENT_PUBKEY:Nr,SYSVAR_REWARDS_PUBKEY:Rw,SYSVAR_SLOT_HASHES_PUBKEY:vw,SYSVAR_SLOT_HISTORY_PUBKEY:Iw,SYSVAR_STAKE_HISTORY_PUBKEY:Vi,Secp256k1Program:Dr,SendTransactionError:us,SolanaJSONRPCError:oe,SolanaJSONRPCErrorCode:Fw,StakeAuthorizationLayout:bS,StakeInstruction:mS,StakeProgram:ca,Struct:Yd,SystemInstruction:kw,SystemProgram:At,Transaction:Be,TransactionExpiredBlockheightExceededError:Zo,TransactionExpiredNonceInvalidError:Qr,TransactionExpiredTimeoutError:Xd,TransactionInstruction:Fe,TransactionMessage:ea,TransactionStatus:Hn,VALIDATOR_INFO_KEY:e1,VERSION_PREFIX_MASK:Jo,VOTE_PROGRAM_ID:ES,ValidatorInfo:tl,VersionedMessage:Jd,VersionedTransaction:ta,VoteAccount:nl,VoteAuthorizationLayout:gS,VoteInit:Qm,VoteInstruction:pS,VoteProgram:Ts,clusterApiUrl:t1,sendAndConfirmRawTransaction:CS,sendAndConfirmTransaction:Lc},Symbol.toStringTag,{value:"Module"})),rl="Solana",xS="11111111111111111111111111111111",pr=class pr{constructor(e){ie(this,"type","Native");ie(this,"address");pr.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===pr.platform}equals(e){return pr.instanceof(e)?e.unwrap().equals(this.unwrap()):this.toUniversalAddress().equals(e)}};ie(pr,"byteSize",32),ie(pr,"platform",rl);let Eo=pr;fd(rl,Eo);const sl=t=>{const e=t.decode.bind(t),n=t.encode.bind(t);return{decode:e,encode:n}};var yi={};Object.defineProperty(yi,"__esModule",{value:!0});function _S(t){{const e=Ie.Buffer.from(t);e.reverse();const n=e.toString("hex");return n.length===0?BigInt(0):BigInt(`0x${n}`)}}var TS=yi.toBigIntLE=_S;function DS(t){{const e=t.toString("hex");return e.length===0?BigInt(0):BigInt(`0x${e}`)}}yi.toBigIntBE=DS;function RS(t,e){{const n=t.toString(16),r=Ie.Buffer.from(n.padStart(e*2,"0").slice(0,e*2),"hex");return r.reverse(),r}}var vS=yi.toBufferLE=RS;function IS(t,e){{const n=t.toString(16);return Ie.Buffer.from(n.padStart(e*2,"0").slice(0,e*2),"hex")}}yi.toBufferBE=IS;const FS=t=>e=>{const n=exports.blob(t,e),{encode:r,decode:s}=sl(n),i=n;return i.decode=(o,a)=>{const d=s(o,a);return TS(Ie.Buffer.from(d))},i.encode=(o,a,d)=>{const h=vS(o,t);return r(h,a,d)},i},kS=FS(8),OS=t=>{const e=exports.u8(t),{encode:n,decode:r}=sl(e),s=e;return s.decode=(i,o)=>!!r(i,o),s.encode=(i,o,a)=>{const d=Number(i);return n(d,o,a)},s},NS=t=>{const e=exports.blob(32,t),{encode:n,decode:r}=sl(e),s=e;return s.decode=(i,o)=>{const a=r(i,o);return new Z(a)},s.encode=(i,o,a)=>{const d=i.toBuffer();return n(d,o,a)},s};exports.AddressLookupTableAccount=go;exports.AddressLookupTableProgram=ia;exports.AutomaticRoute=hh;exports.AxiosError=QE;exports.BN=Fc;exports.CircleTransfer=St;exports.ComputeBudgetProgram=oa;exports.Connection=Ym;exports.DEFAULT_TASK_TIMEOUT=Dn;exports.ErrNotWrapped=Wg;exports.EventEmitter=jd;exports.EvmAddress=co;exports.EvmZeroAddress=P2;exports.Field=Lr;exports.FinalizableRoute=DA;exports.FpInvertBatch=cd;exports.FpLegendre=mc;exports.FpPow=s0;exports.Hash=Ch;exports.Hash$1=Ro;exports.HashMD=nd;exports.Keypair=Tr;exports.LAMPORTS_PER_SOL=n1;exports.ManualRoute=vc;exports.Message=dn;exports.MessageV0=dr;exports.MinAmountError=dA;exports.PlatformContext=gg;exports.PlatformNativeSigner=_g;exports.PublicKey=Z;exports.RelayFailedError=Bd;exports.Route=qo;exports.RouteResolver=fh;exports.RpcClient=Tm;exports.SYSVAR_CLOCK_PUBKEY=fn;exports.SYSVAR_INSTRUCTIONS_PUBKEY=Om;exports.SYSVAR_RENT_PUBKEY=Nr;exports.Secp256k1Program=Dr;exports.SendTransactionError=us;exports.SolanaAddress=Eo;exports.SolanaZeroAddress=xS;exports.SystemProgram=At;exports.TokenTransfer=Ye;exports.Transaction=Be;exports.TransactionExpiredBlockheightExceededError=Zo;exports.TransactionInstruction=Fe;exports.TransactionMessage=ea;exports.UnavailableError=lA;exports.UniversalAddress=xt;exports.VersionedTransaction=ta;exports.Wormhole=on;exports._platform=Od;exports._platform$1=rl;exports._validateObject=Es;exports.abytes=Xt;exports.add=Cn;exports.add3H=zf;exports.add3L=Wf;exports.addChainId=M2;exports.addFixedValues=R1;exports.addFrom=L2;exports.aexists=Ir;exports.ahash=kf;exports.amountItem=$e;exports.anumber=as;exports.aoutput=Qc;exports.applyChainsConfigConfigOverrides=nA;exports.assert=Nn;exports.assertArgument=rr;exports.assertArgumentCount=kA;exports.assertNormalize=NA;exports.assertPrivate=UA;exports.asyncLoop=YA;exports.axios=Se;exports.b58=pf;exports.b64=_o;exports.base58=Zi;exports.bech32=mf;exports.bignum=Ls;exports.bitGet=mp;exports.bitLen=Qf;exports.bitMask=di;exports.bnExports=Dd;exports.bool=OS;exports.bound=A1;exports.browserExports=tf;exports.bs58=Bt;exports.bufferPolyfill=ae;exports.bytes=Pt;exports.bytes$1=vd;exports.bytesToHex=Fr;exports.bytesToNumberBE=ci;exports.canonicalAddress=On;exports.chainIdToChain=Qi;exports.chainItem=Ht;exports.chainToChainId=ii;exports.chainToPlatform=mn;exports.checkOpts=QA;exports.checkOpts$1=Nb;exports.circleChainId=_f;exports.circleContractChains=xb;exports.circleContracts=fc;exports.circleDomainItem=ds;exports.circleNonceItem=Fo;exports.clean=Gn;exports.clusterApiUrl=t1;exports.commonjsGlobal=cn;exports.concat=PA;exports.concatBytes=JA;exports.concatBytes$1=Fn;exports.constMap=fe;exports.createBase58check=q1;exports.createHasher=ai;exports.createOptHasher=Ub;exports.createView=KA;exports.createView$1=Wi;exports.customizableBytes=So;exports.dataLength=WA;exports.dataSlice=zA;exports.dateConversion=A0;exports.decomposeLiteral=S0;exports.defineProperties=kc;exports.deliveryInstructionLayout=k0;exports.denoise=N1;exports.deserialize=ns;exports.deserialize$1=gn;exports.display=Co;exports.dist=Ie;exports.ed25519=Mr;exports.ensureBytes=Je;exports.envelopeLayout=pd;exports.estimateFinalityTime=Yc;exports.executorTokenBridge=uc;exports.executorTokenBridgeChains=Bb;exports.exists=Oc;exports.expiration=$s;exports.filters=gs;exports.fixedChainItem=dg;exports.fixedLengthStringItem=md;exports.fromBaseUnits=qn;exports.fromBig=Mf;exports.getAddress=_r;exports.getAugmentedNamespace=Hc;exports.getBytes=Wr;exports.getBytesCopy=LA;exports.getDeciBps=lf;exports.getDefaultExportFromCjs=ri;exports.getMinHashLength=dd;exports.getTokenByAddress=wg;exports.getTokenDetails=xA;exports.guardianAttestationEta=Zc;exports.guardianSetItem=hd;exports.hash=qA;exports.headerLayout=bd;exports.hex=wt;exports.hexToBytes=Do;exports.hexlify=hi;exports.hmac=id;exports.index_browser_esm=BS;exports.isAddressable=Lh;exports.isAttested=rs;exports.isAutomatic=_A;exports.isAxiosError=eA;exports.isBytes=To;exports.isBytesLike=MA;exports.isCallException=FA;exports.isChain=oi;exports.isCompleted=hA;exports.isDestinationQueued=fA;exports.isEqualCaseInsensitive=Ef;exports.isError=ph;exports.isFailed=lh;exports.isFinalizable=RA;exports.isHash=pp;exports.isHexString=Rd;exports.isManual=TA;exports.isNative=Lt;exports.isRedeemed=_d;exports.isRefunded=uA;exports.isSameToken=B0;exports.isSignAndSendSigner=Ed;exports.isSignOnlySigner=T0;exports.isSourceFinalized=Js;exports.isSourceInitiated=xd;exports.isTokenId=No;exports.isVersionedProtocolInitializer=sg;exports.isWormholeMessageId=Br;exports.kdfInputToBytes=Ob;exports.keccak256=Ss;exports.keccak_256=Ks;exports.makeError=gh;exports.mapHashToField=o0;exports.median=p1;exports.memoized=js;exports.mod=Ze;exports.nativeDecimals=Sf;exports.nativeTokenId=yd;exports.networkChainToNativeChainId=xf;exports.networkPlatformConfigs=dh;exports.normalizeZ=ld;exports.notImplemented=gp;exports.number=Zs;exports.output=Ah;exports.parse=Ni;exports.payloadIdItem=Xn;exports.payloadLiteralToPayloadItemLayout=C0;exports.platformNativeChainIdToNetworkChain=ob;exports.porticoContractChains=_b;exports.protocolIsRegistered=og;exports.publicKey=NS;exports.randomBytes=e2;exports.randomBytes$1=td;exports.registerNative=fd;exports.registerPayloadTypes=yt;exports.registerProtocol=ig;exports.relayInstructionsLayout=N0;exports.resolveAddress=O2;exports.resolveProperties=IA;exports.resolveWrappedToken=x0;exports.retry=Pr;exports.rotl=vb;exports.rotr=VA;exports.rotr32H=Wb;exports.rotr32L=zb;exports.rotrBH=Os;exports.rotrBL=Ns;exports.rotrSH=lr;exports.rotrSL=ur;exports.rpcAddress=Cf;exports.safeBufferExports=mh;exports.scale=Yr;exports.secp256k1=tr;exports.sequenceItem=ko;exports.serialize=pn;exports.serialize$1=zi;exports.serializePayload=bg;exports.sha256=eo;exports.sha256$1=rd;exports.sha3_256=up;exports.sha512=fp;exports.sha512$1=sd;exports.signSendWait=Xs;exports.signatureItem=ro;exports.signedQuoteLayout=U0;exports.stringConversion=w0;exports.supportsIndexerUtils=pg;exports.swap32IfBE=hc;exports.swap8IfBE=Ib;exports.tbtc=Pi;exports.toBytes=Id;exports.toBytes$1=ys;exports.toChain=ps;exports.toChainId=hn;exports.toCircleChain=Mi;exports.toNative=cr;exports.toUniversal=g0;exports.tokenBridgeChains=Sb;exports.tokenBridgeRelayerChains=Cb;exports.truncate=Ui;exports.u32$1=Sh;exports.u32$2=Of;exports.u64=kS;exports.u64$1=g2;exports.units=Dt;exports.universalAddress=Bg;exports.universalAddressItem=be;exports.unusedArbiterFee=U2;exports.unusedNonce=N2;exports.usdcContract=Ms;exports.utf8ToBytes=ed;exports.version=bh;exports.weierstrass=p0;exports.weierstrassPoints=Fp;exports.whole=Us;exports.wrapConstructor=Bh;exports.zeroPadBytes=$A;exports.zeroPadValue=HA;