@wormhole-foundation/wormhole-connect 3.0.0-beta.12-development → 3.0.0-beta.13-development

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (347) hide show
  1. package/dist/assets/{tokens-BjeNFBPV.js → tokens-CrPLX1jh.js} +13 -13
  2. package/dist/main.js +75 -75
  3. package/dist/src/components/SampleApp/index.d.ts.map +1 -1
  4. package/dist/src/config/mainnet/rpcs.d.ts.map +1 -1
  5. package/dist/src/config/mainnet/tokens.d.ts.map +1 -1
  6. package/dist/src/config/testnet/rpcs.d.ts.map +1 -1
  7. package/dist/src/config/testnet/tokens.d.ts.map +1 -1
  8. package/dist/src/config/types.d.ts +2 -1
  9. package/dist/src/config/types.d.ts.map +1 -1
  10. package/dist/src/contexts/TokensContext.d.ts.map +1 -1
  11. package/dist/src/exports/executor.d.ts +1 -1
  12. package/dist/src/exports/executor.d.ts.map +1 -1
  13. package/dist/src/icons/ChainIcons.d.ts.map +1 -1
  14. package/dist/src/icons/Chains/LINEA.d.ts +4 -0
  15. package/dist/src/icons/Chains/LINEA.d.ts.map +1 -0
  16. package/dist/src/icons/Chains/POLY.d.ts +2 -2
  17. package/dist/src/icons/Chains/POLY.d.ts.map +1 -1
  18. package/dist/src/icons/Chains/SONIC.d.ts +4 -0
  19. package/dist/src/icons/Chains/SONIC.d.ts.map +1 -0
  20. package/dist/src/icons/SvgDefs.d.ts.map +1 -1
  21. package/dist/src/icons/TokenIcons.d.ts.map +1 -1
  22. package/dist/src/icons/Tokens/POLY.d.ts.map +1 -1
  23. package/dist/src/sdklegacy/config/MAINNET.d.ts.map +1 -1
  24. package/dist/src/sdklegacy/config/TESTNET.d.ts.map +1 -1
  25. package/dist/src/utils/coingecko.d.ts.map +1 -1
  26. package/dist/src/utils/sdkv2.d.ts +1 -1
  27. package/dist/src/utils/sdkv2.d.ts.map +1 -1
  28. package/dist/src/utils/wallet/index.d.ts.map +1 -1
  29. package/dist/src/views/v2/Bridge/GasSlider/index.d.ts +1 -0
  30. package/dist/src/views/v2/Bridge/GasSlider/index.d.ts.map +1 -1
  31. package/dist/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
  32. package/dist/src/views/v2/Redeem/index.d.ts.map +1 -1
  33. package/lib/{account-k-CXVcvA.mjs → account-DRrQuG9b.mjs} +1 -1
  34. package/lib/{account-gVjkECaX.js → account-nmHnnwf-.js} +1 -1
  35. package/lib/{add-Bgr8Uh8B.mjs → add-B3TOzisV.mjs} +1 -1
  36. package/lib/{add-CgyvYm-l.js → add-PboF8xOA.js} +1 -1
  37. package/lib/{address-CrYNZ_Nj.mjs → address-BkeBsCZD.mjs} +1837 -1809
  38. package/lib/{address-ByLIzxVb.mjs → address-CHEvC20V.mjs} +1 -1
  39. package/lib/{address-DfgK_jn7.js → address-CslafWGT.js} +1 -1
  40. package/lib/address-DKM11kf_.js +15 -0
  41. package/lib/{address-DGYJWkFz.js → address-vHTAfgt6.js} +1 -1
  42. package/lib/{address-BJNAPSnr.mjs → address-xvE59bSC.mjs} +1 -1
  43. package/lib/{all-wallets-BeYsJiCM.js → all-wallets-C3KaOAtR.js} +1 -1
  44. package/lib/{all-wallets-DdRIEq-V.mjs → all-wallets-i8sBvyse.mjs} +1 -1
  45. package/lib/{app-store-C9yZzH2t.js → app-store-DMPxp7LI.js} +1 -1
  46. package/lib/{app-store-eKRqPW4N.mjs → app-store-D_gEJYR-.mjs} +1 -1
  47. package/lib/{apple-DQcCTOa_.mjs → apple-C7dx7WbA.mjs} +1 -1
  48. package/lib/{apple-B3Aps_l8.js → apple-CBv-wD_N.js} +1 -1
  49. package/lib/{aptos-DySrgy5u.mjs → aptos-5WdoBDe7.mjs} +3 -3
  50. package/lib/{aptos-IciOSw-S.js → aptos-7NDR_C5e.js} +2 -2
  51. package/lib/{aptos-CxfKcGPe.js → aptos-BHb4m4xc.js} +1 -1
  52. package/lib/{aptos-M18090BQ.mjs → aptos-DjCb_S8U.mjs} +7 -7
  53. package/lib/{arrow-bottom-CUgsoqql.js → arrow-bottom-JVAM2flH.js} +1 -1
  54. package/lib/{arrow-bottom-circle-CvfJ5p_y.mjs → arrow-bottom-circle-CNlCzI_j.mjs} +1 -1
  55. package/lib/{arrow-bottom-circle-u8tFbHrW.js → arrow-bottom-circle-Cwm4Epf6.js} +1 -1
  56. package/lib/{arrow-bottom-Duiu5Tg_.mjs → arrow-bottom-dGyduTnX.mjs} +1 -1
  57. package/lib/{arrow-left-IZiFrwcP.js → arrow-left-BCNUIhF5.js} +1 -1
  58. package/lib/{arrow-left-avYXBHF4.mjs → arrow-left-PKOB36Bh.mjs} +1 -1
  59. package/lib/{arrow-right-Cbunep5L.mjs → arrow-right-CS5PKMHz.mjs} +1 -1
  60. package/lib/{arrow-right-CF-NNN4L.js → arrow-right-DmYVvh1l.js} +1 -1
  61. package/lib/{arrow-top-DBWWW9Oy.mjs → arrow-top-BkM6S1a6.mjs} +1 -1
  62. package/lib/{arrow-top-DCGkz6k-.js → arrow-top-Bo7YKrfd.js} +1 -1
  63. package/lib/{bank-C2jhIapN.mjs → bank-CCF3DOdG.mjs} +1 -1
  64. package/lib/{bank-C-CLDGG9.js → bank-DLZl3tlW.js} +1 -1
  65. package/lib/{basic-CIBqPAeW.mjs → basic-B3TQQ8Sq.mjs} +2 -2
  66. package/lib/{basic-DVsxPr6-.js → basic-DVoqEslQ.js} +1 -1
  67. package/lib/{blake2b-GH2Zzt65.mjs → blake2b-CAi92fbu.mjs} +17 -17
  68. package/lib/{blake2b-CCJ4LnEi.js → blake2b-DQdnnomV.js} +1 -1
  69. package/lib/{browser-DFX8bJKi.mjs → browser-8x7RJ5du.mjs} +1 -1
  70. package/lib/{browser-BQ2hKa4j.js → browser-CRt_zD3Q.js} +1 -1
  71. package/lib/{browser-ponyfill-JlME40Yz.mjs → browser-ponyfill-B32wgiqZ.mjs} +1 -1
  72. package/lib/{browser-ponyfill-DqqaJGv_.js → browser-ponyfill-UnUv8h3i.js} +1 -1
  73. package/lib/{card-CUMXwdG1.js → card-B4Tu3QQo.js} +1 -1
  74. package/lib/{card-4-u9SA69.mjs → card-CXjBQX3v.mjs} +1 -1
  75. package/lib/{ccip-FetjJVFw.mjs → ccip-CIIU_fEJ.mjs} +2 -2
  76. package/lib/{ccip-BTGJ_kF8.js → ccip-DaWU7YTU.js} +1 -1
  77. package/lib/{chain-DTh9H2Cq.js → chain-CJuQGMF5.js} +1 -1
  78. package/lib/{chain-Dq8acwHq.mjs → chain-uXEmLNMk.mjs} +1 -1
  79. package/lib/{checkmark-DDLHlQQ9.mjs → checkmark-BAUqIoTm.mjs} +1 -1
  80. package/lib/{checkmark-BaLFRM45.js → checkmark-C7_13-xW.js} +1 -1
  81. package/lib/{checkmark-bold-COMu2UxE.js → checkmark-bold-BAPMY9Va.js} +1 -1
  82. package/lib/{checkmark-bold-CuRoxeU8.mjs → checkmark-bold-DdxcN-xa.mjs} +1 -1
  83. package/lib/{chevron-bottom-C4e9WRar.js → chevron-bottom-BhliKUSk.js} +1 -1
  84. package/lib/{chevron-bottom-BWzCLrD5.mjs → chevron-bottom-DPs0vktV.mjs} +1 -1
  85. package/lib/{chevron-left-CGVLc133.js → chevron-left-CmxD6cz4.js} +1 -1
  86. package/lib/{chevron-left--LyUtyQT.mjs → chevron-left-Dk6PhtGR.mjs} +1 -1
  87. package/lib/{chevron-right-kMciDMkJ.mjs → chevron-right-CkGXlHcz.mjs} +1 -1
  88. package/lib/{chevron-right-BwKWUL52.js → chevron-right-CsZm-r4d.js} +1 -1
  89. package/lib/{chevron-top-CAHxogoB.js → chevron-top-COxXTPhY.js} +1 -1
  90. package/lib/{chevron-top-DwIXDDfD.mjs → chevron-top-Cckcz4Qs.mjs} +1 -1
  91. package/lib/{chrome-store-KsYwGQZ1.js → chrome-store-BQDKjVx4.js} +1 -1
  92. package/lib/{chrome-store-BtgUtu2e.mjs → chrome-store-BWCBtyqY.mjs} +1 -1
  93. package/lib/{chunk-KJH4KKG6-DOESg_ru.js → chunk-KJH4KKG6-CAnNL4lj.js} +1 -1
  94. package/lib/{chunk-KJH4KKG6-cfe1Zo7n.mjs → chunk-KJH4KKG6-CCerRpgp.mjs} +2 -2
  95. package/lib/{clock-CeP_x_KK.mjs → clock-BVouBwH-.mjs} +1 -1
  96. package/lib/{clock-DZ0ehwc-.js → clock-DyD0fxqO.js} +1 -1
  97. package/lib/{close-fTN6nBRu.mjs → close-BWXb69Wl.mjs} +1 -1
  98. package/lib/{close-DQfNwzpp.js → close-Cw0rUieJ.js} +1 -1
  99. package/lib/{coinPlaceholder-DetWjpMK.mjs → coinPlaceholder-BMScJe5r.mjs} +1 -1
  100. package/lib/{coinPlaceholder-Dg3gZsJM.js → coinPlaceholder-cDwG015N.js} +1 -1
  101. package/lib/{compass-BNDqAmOT.js → compass-BEkdaonl.js} +1 -1
  102. package/lib/{compass-Bi1bPHDM.mjs → compass-Ck1hdMBP.mjs} +1 -1
  103. package/lib/{constants-CoxhiYrX.js → constants-84--TxnQ.js} +1 -1
  104. package/lib/{constants-CPx3n7t3.mjs → constants-DL79O3Cw.mjs} +4 -4
  105. package/lib/{contract-D8VzaUQJ.mjs → contract-C26uilM9.mjs} +171 -171
  106. package/lib/{contract-DYtnmT6F.js → contract-C2wJ6LwN.js} +1 -1
  107. package/lib/{copy-CYLp0MkE.js → copy-BLHxb-RP.js} +1 -1
  108. package/lib/{copy-C0ChGAOX.mjs → copy-Db7Dj1yY.mjs} +1 -1
  109. package/lib/{create-BRB2U1qV.js → create-D2vX2bRe.js} +1 -1
  110. package/lib/create-OmEBpMgv.mjs +18 -0
  111. package/lib/{cursor-DsUEeeMn.js → cursor-C1Sin6tb.js} +1 -1
  112. package/lib/{cursor-C0wqoNp_.mjs → cursor-CNsWvtzA.mjs} +1 -1
  113. package/lib/{cursor-transparent-DOFMlNyt.mjs → cursor-transparent-BunBBBx5.mjs} +1 -1
  114. package/lib/{cursor-transparent-Dgi2QAXz.js → cursor-transparent-SER8uk9I.js} +1 -1
  115. package/lib/{desktop-DvAIpuqU.mjs → desktop-B6mJxAHq.mjs} +1 -1
  116. package/lib/{desktop-7XDZ1UeO.js → desktop-BxtmfVtX.js} +1 -1
  117. package/lib/{disconnect-BPZFeB_X.js → disconnect-C41yMwSb.js} +1 -1
  118. package/lib/{disconnect-CVe77kqf.mjs → disconnect-D7XSHnMT.mjs} +1 -1
  119. package/lib/{discord-BQnoDtpm.js → discord-B03i6OzP.js} +1 -1
  120. package/lib/{discord-C8tW30M4.mjs → discord-BYp6ZBO5.mjs} +1 -1
  121. package/lib/{etherscan-XnmA1DYM.js → etherscan-DLF8GRx-.js} +1 -1
  122. package/lib/{etherscan-BbTgK2kR.mjs → etherscan-Db4s0bfM.mjs} +1 -1
  123. package/lib/{evm-BcBUJ9Y7.js → evm-BmUWgBnJ.js} +2 -2
  124. package/lib/{evm-B1mLJPQm.mjs → evm-Cfbj-u_x.mjs} +9 -9
  125. package/lib/{evm-B92-10xg.js → evm-DT7UH6jw.js} +3 -3
  126. package/lib/{evm-DDTF3fsK.mjs → evm-JX0NqvCN.mjs} +9 -9
  127. package/lib/{exclamation-triangle-BSU-BEmm.js → exclamation-triangle-Bnq3BTWj.js} +1 -1
  128. package/lib/{exclamation-triangle-CDPTA2Zq.mjs → exclamation-triangle-QwUrQkZz.mjs} +1 -1
  129. package/lib/executor.js +1 -1
  130. package/lib/executor.mjs +1130 -487
  131. package/lib/{extension-BoRmu23R.mjs → extension-BJ8ReR_0.mjs} +1 -1
  132. package/lib/{extension-JoJqEx2q.js → extension-CgcYwI-C.js} +1 -1
  133. package/lib/{external-link-BmVFZxUx.mjs → external-link-C-xXuK-w.mjs} +1 -1
  134. package/lib/{external-link-CDpvnIKV.js → external-link-DyvDlcrJ.js} +1 -1
  135. package/lib/{facebook-BU0IgAsn.mjs → facebook-0DLWcqgY.mjs} +1 -1
  136. package/lib/{facebook-DVG-Of9i.js → facebook-BpyxMifX.js} +1 -1
  137. package/lib/{farcaster-EqU1YhWT.mjs → farcaster-7pF76-yJ.mjs} +1 -1
  138. package/lib/{farcaster-HjCoTneu.js → farcaster-CWG8svoe.js} +1 -1
  139. package/lib/{filters-9uiEFQFc.mjs → filters-B13ud8_A.mjs} +1 -1
  140. package/lib/{filters-Dj4vA-oO.js → filters-QScvFA3B.js} +1 -1
  141. package/lib/{github-CHTQ7Hhb.js → github-B1QukX4i.js} +1 -1
  142. package/lib/{github-Bv36prmZ.mjs → github-D82vkMzo.mjs} +1 -1
  143. package/lib/{google-D4be9Rni.js → google-C6E4oHHf.js} +1 -1
  144. package/lib/{google-CIdoM_ZL.mjs → google-D4wJMU48.mjs} +1 -1
  145. package/lib/{help-circle-Cp-RWM01.js → help-circle-C4PprAiX.js} +1 -1
  146. package/lib/{help-circle-Di6XLLqm.mjs → help-circle-DoiMsREG.mjs} +1 -1
  147. package/lib/hosted.js +1 -1
  148. package/lib/hosted.mjs +1 -1
  149. package/lib/{id-zzAVAbpV.js → id-D6HBBibn.js} +1 -1
  150. package/lib/{id-BKRrmUYA.mjs → id-DOZCSctU.mjs} +1 -1
  151. package/lib/{image-CHXv-pfQ.mjs → image-Bz-sq4zu.mjs} +1 -1
  152. package/lib/{image-D0lV7yfg.js → image-DwgrdoFE.js} +1 -1
  153. package/lib/{index-CbF5x2NI.js → index-AZ65joOD.js} +1 -1
  154. package/lib/{index-BsqWniHZ.mjs → index-B0H8aSyJ.mjs} +2 -2
  155. package/lib/{index-CreVTM0z.mjs → index-B1YHtJKf.mjs} +32 -32
  156. package/lib/{index-6NFOdkn_.mjs → index-B2v8cGyE.mjs} +5 -5
  157. package/lib/{index-Bn829hfx.js → index-B586QVP1.js} +1 -1
  158. package/lib/{index-CjojdPoR.js → index-BOiHIPRm.js} +1 -1
  159. package/lib/{index-CSf9Xnts.mjs → index-BgvV5NF2.mjs} +5 -5
  160. package/lib/{index-BxR9BQdY.mjs → index-BjeolB9D.mjs} +5 -5
  161. package/lib/{index-WR7oDg9u.mjs → index-Bv-BZXf_.mjs} +6 -6
  162. package/lib/{index-T00Tc9JN.js → index-C2EKjwxb.js} +1 -1
  163. package/lib/{index-D4dCJIWy.js → index-C2oYdtY8.js} +1 -1
  164. package/lib/{index-Cj6R9JbK.js → index-CFfjoJR9.js} +1 -1
  165. package/lib/{index-B6QoC8kC.mjs → index-CIGkn9tA.mjs} +1 -1
  166. package/lib/{index-D0eLvswO.mjs → index-CNWcuxPc.mjs} +1 -1
  167. package/lib/{index-Dy8-WjNf.mjs → index-CNhD4Iu8.mjs} +14 -14
  168. package/lib/{index-Cv26ujGL.js → index-CP6-WHfp.js} +1 -1
  169. package/lib/{index-BuMERF6V.mjs → index-CRYNS9pm.mjs} +3 -3
  170. package/lib/{index-CMRsE6Rx.js → index-CZhOgoed.js} +2 -2
  171. package/lib/{index-C9CCEaud.js → index-Cet7Wvc5.js} +1 -1
  172. package/lib/{index-CpYW6xKB.mjs → index-Cg5Ko9uq.mjs} +12 -12
  173. package/lib/{index-iIndJffV.js → index-CjI7Vey3.js} +1 -1
  174. package/lib/{index-C_DPPfkk.js → index-Cjz6EL9G.js} +1 -1
  175. package/lib/{index-CJXywlFV.mjs → index-CrKGOs08.mjs} +5 -5
  176. package/lib/{index-Dg_iItNp.js → index-Cy_GmZ1K.js} +1 -1
  177. package/lib/{index-B8CSnOaL.mjs → index-D1vSocUD.mjs} +4 -4
  178. package/lib/{index-Co1W4Raf.mjs → index-D4WbU33f.mjs} +10 -10
  179. package/lib/{index-B4yQb6w1.mjs → index-DInWB5Ku.mjs} +78 -78
  180. package/lib/{index-BJjgo7T5.js → index-DQXzR255.js} +1 -1
  181. package/lib/{index-FyK0K3it.mjs → index-DSGGuRHs.mjs} +7 -7
  182. package/lib/{index-BOmzGtQH.mjs → index-DVj58Xn9.mjs} +13 -13
  183. package/lib/{index-CAZoTTeF.js → index-DXD0qvNV.js} +1 -1
  184. package/lib/{index-DLyteqgH.js → index-Dd0zXo9p.js} +1 -1
  185. package/lib/{index-BDN9fAFf.js → index-DflOc1lz.js} +1 -1
  186. package/lib/{index-DZ0LaYyC.js → index-DoubjpWw.js} +1 -1
  187. package/lib/{index-BBXzsMzy.mjs → index-Dpefdrdb.mjs} +3296 -3074
  188. package/lib/{index-0V2bg9Sg.mjs → index-DuXi1xNY.mjs} +2 -2
  189. package/lib/{index-Csb-_vqa.js → index-Dw8nyQGf.js} +1 -1
  190. package/lib/{index-DUoona4h.mjs → index-Naa9NLXw.mjs} +4 -4
  191. package/lib/{index-BBwY_mLw.mjs → index-UZaBhUoD.mjs} +4 -4
  192. package/lib/{index-D5Wl9ZPE.mjs → index-XkPtmd0r.mjs} +7 -7
  193. package/lib/{index-CFikcYS0.js → index-XrGXGqnM.js} +1 -1
  194. package/lib/{index--rEdlHs9.js → index-sIkHg4mO.js} +1 -1
  195. package/lib/{index-w1W7oltR.js → index-tVbvQzum.js} +60 -60
  196. package/lib/{index-Cvt-EnSZ.mjs → index-wFZO7Yy8.mjs} +19 -19
  197. package/lib/{index-uqZQu-qU.js → index-yI1a3BCl.js} +1 -1
  198. package/lib/{index-aoDDl5Bh.js → index-zrsGesGr.js} +1 -1
  199. package/lib/{index.es-Buu5D0rZ.mjs → index.es-CTerQ-xd.mjs} +6 -6
  200. package/lib/{index.es-SeoKSGri.js → index.es-DW-Rbcpg.js} +1 -1
  201. package/lib/{index.es-BjmsZFfK.mjs → index.es-FblCdfpc.mjs} +4 -4
  202. package/lib/{index.es-B-gAV41L.js → index.es-tq-RvjG8.js} +2 -2
  203. package/lib/index.js +1 -1
  204. package/lib/index.mjs +1 -1
  205. package/lib/{info-Bro13JOm.js → info-BifZFc7t.js} +1 -1
  206. package/lib/{info-circle-B1XYC5VH.js → info-circle-2P1Yxg4Q.js} +1 -1
  207. package/lib/{info-circle-Ysma0RJy.mjs → info-circle-BAC0QRkt.mjs} +1 -1
  208. package/lib/{info-DI_ShZXM.mjs → info-sSeB9YE8.mjs} +1 -1
  209. package/lib/{lightbulb-llAiUdyo.mjs → lightbulb-EmWyHxHf.mjs} +1 -1
  210. package/lib/{lightbulb-BWSob509.js → lightbulb-MtN8FDGi.js} +1 -1
  211. package/lib/{mail-rZToesAW.js → mail-CqXkLFqA.js} +1 -1
  212. package/lib/{mail-DoQE8IHx.mjs → mail-Kn0E2IkG.mjs} +1 -1
  213. package/lib/mayan.js +1 -1
  214. package/lib/mayan.mjs +9 -9
  215. package/lib/{mint-CyFSbOaj.js → mint-DzKeNBRo.js} +1 -1
  216. package/lib/{mint-CDUlLJB4.mjs → mint-WjTAjh-p.mjs} +2 -2
  217. package/lib/{mobile-BbcVkbmr.js → mobile-BE2FxzUq.js} +1 -1
  218. package/lib/{mobile-EtRDQH27.mjs → mobile-Dj3WE71d.mjs} +1 -1
  219. package/lib/{more-BK6O3COI.js → more-BGlDHap-.js} +1 -1
  220. package/lib/{more-DVrhZdB3.mjs → more-D4DDIvdG.mjs} +1 -1
  221. package/lib/{native-Bdd5l9MQ.js → native-CGkMKXpm.js} +1 -1
  222. package/lib/{native-D6oc9ERK.mjs → native-DCc4sjxb.mjs} +1 -1
  223. package/lib/{network-placeholder-BbB6hX07.mjs → network-placeholder-BBNnq4LJ.mjs} +1 -1
  224. package/lib/{network-placeholder-K8zio41s.js → network-placeholder-DZ6qNrD8.js} +1 -1
  225. package/lib/{nftPlaceholder-BMuE_429.mjs → nftPlaceholder-BGK-mcGP.mjs} +1 -1
  226. package/lib/{nftPlaceholder-L3ThVWUO.js → nftPlaceholder-t3eyvw1E.js} +1 -1
  227. package/lib/ntt.js +1 -1
  228. package/lib/ntt.mjs +10 -10
  229. package/lib/{off-CHM9QBcy.js → off-BBGwptS5.js} +1 -1
  230. package/lib/{off-CUzDZ7SQ.mjs → off-f4sOrEaa.mjs} +1 -1
  231. package/lib/{platform-CyoDzIPB.mjs → platform-BVScq6Cn.mjs} +6 -6
  232. package/lib/{platform-Ck9W87gm.mjs → platform-ByoVE-An.mjs} +4 -4
  233. package/lib/{platform-DbvllBcy.js → platform-DHBUZeaO.js} +1 -1
  234. package/lib/{platform-C7YwgvxU.js → platform-Yk6Fw43J.js} +1 -1
  235. package/lib/{platform-CgqczEeE.js → platform-_YLyrJdi.js} +1 -1
  236. package/lib/{platform-DkmFvjoG.mjs → platform-tSU41623.mjs} +16 -16
  237. package/lib/{play-store-DodlKRO8.js → play-store-BbN0jXQh.js} +1 -1
  238. package/lib/{play-store-B_TfUWJP.mjs → play-store-D8C6HS_a.mjs} +1 -1
  239. package/lib/{plus-BY6E-gA7.mjs → plus-CbTzHTic.mjs} +1 -1
  240. package/lib/{plus-DVGYUzNZ.js → plus-DmTKVIYx.js} +1 -1
  241. package/lib/{provider-jsonrpc-D033z3Mz.js → provider-jsonrpc-B0U6Ij-n.js} +1 -1
  242. package/lib/{provider-jsonrpc-BVvalXMV.mjs → provider-jsonrpc-pHUX5SqN.mjs} +155 -155
  243. package/lib/{qr-code-MKK1K7_f.js → qr-code-B6qlbkUI.js} +1 -1
  244. package/lib/{qr-code-DkdB4YWU.mjs → qr-code-BWVtySSk.mjs} +1 -1
  245. package/lib/{recycle-horizontal-Bg37UVPn.mjs → recycle-horizontal-Bs5gf79m.mjs} +1 -1
  246. package/lib/{recycle-horizontal-Bjn-ZLNs.js → recycle-horizontal-DzBA56-s.js} +1 -1
  247. package/lib/{refresh-dRlw97C1.js → refresh-62hm4k6x.js} +1 -1
  248. package/lib/{refresh-D6TcjIU1.mjs → refresh-ivbjdSCV.mjs} +1 -1
  249. package/lib/{reown-logo-Kc70GqDZ.js → reown-logo-CVyCROZP.js} +1 -1
  250. package/lib/{reown-logo-Dk82Zy5_.mjs → reown-logo-DkbDD804.mjs} +1 -1
  251. package/lib/{search-Dv-LI1Vx.js → search-BAemvNq7.js} +1 -1
  252. package/lib/{search-D83RKxoH.mjs → search-By1CMDmb.mjs} +1 -1
  253. package/lib/{secp256k1-BrfK8uV1.mjs → secp256k1-Cgk0g7W_.mjs} +1 -1
  254. package/lib/{secp256k1-DV6Qne0v.mjs → secp256k1-ClYndPcJ.mjs} +1 -1
  255. package/lib/{secp256k1-DXHZqO4S.js → secp256k1-DboBd6yN.js} +1 -1
  256. package/lib/{secp256k1-sf_P35Lc.js → secp256k1-uAsXZq5d.js} +1 -1
  257. package/lib/{send-Cyopk79y.mjs → send-BIKE35sd.mjs} +1 -1
  258. package/lib/{send-BSMIYys9.js → send-BQNTa-AX.js} +1 -1
  259. package/lib/{signer-DIpGs_9B.mjs → signer-CinqaaXD.mjs} +10 -10
  260. package/lib/{signer-BZ3rTVnM.js → signer-D-HjSIgq.js} +1 -1
  261. package/lib/{solana-DS2ZcUpG.js → solana-BUWSwHur.js} +4 -4
  262. package/lib/{solana-CrMvdvfl.mjs → solana-C2S4i5Ij.mjs} +11 -11
  263. package/lib/solana-CEz8hIFa.mjs +18 -0
  264. package/lib/solana-Dohpdke6.js +1 -0
  265. package/lib/{solanaEmbed.esm-Dj8UZAI5.mjs → solanaEmbed.esm-Dk8f6vW0.mjs} +2 -2
  266. package/lib/{solanaEmbed.esm-1oBtzdki.js → solanaEmbed.esm-lyjsfmH_.js} +1 -1
  267. package/lib/src/components/SampleApp/index.d.ts.map +1 -1
  268. package/lib/src/config/mainnet/rpcs.d.ts.map +1 -1
  269. package/lib/src/config/mainnet/tokens.d.ts.map +1 -1
  270. package/lib/src/config/testnet/rpcs.d.ts.map +1 -1
  271. package/lib/src/config/testnet/tokens.d.ts.map +1 -1
  272. package/lib/src/config/types.d.ts +2 -1
  273. package/lib/src/config/types.d.ts.map +1 -1
  274. package/lib/src/contexts/TokensContext.d.ts.map +1 -1
  275. package/lib/src/exports/executor.d.ts +1 -1
  276. package/lib/src/exports/executor.d.ts.map +1 -1
  277. package/lib/src/icons/ChainIcons.d.ts.map +1 -1
  278. package/lib/src/icons/Chains/LINEA.d.ts +4 -0
  279. package/lib/src/icons/Chains/LINEA.d.ts.map +1 -0
  280. package/lib/src/icons/Chains/POLY.d.ts +2 -2
  281. package/lib/src/icons/Chains/POLY.d.ts.map +1 -1
  282. package/lib/src/icons/Chains/SONIC.d.ts +4 -0
  283. package/lib/src/icons/Chains/SONIC.d.ts.map +1 -0
  284. package/lib/src/icons/SvgDefs.d.ts.map +1 -1
  285. package/lib/src/icons/TokenIcons.d.ts.map +1 -1
  286. package/lib/src/icons/Tokens/POLY.d.ts.map +1 -1
  287. package/lib/src/sdklegacy/config/MAINNET.d.ts.map +1 -1
  288. package/lib/src/sdklegacy/config/TESTNET.d.ts.map +1 -1
  289. package/lib/src/utils/coingecko.d.ts.map +1 -1
  290. package/lib/src/utils/sdkv2.d.ts +1 -1
  291. package/lib/src/utils/sdkv2.d.ts.map +1 -1
  292. package/lib/src/utils/wallet/index.d.ts.map +1 -1
  293. package/lib/src/views/v2/Bridge/GasSlider/index.d.ts +1 -0
  294. package/lib/src/views/v2/Bridge/GasSlider/index.d.ts.map +1 -1
  295. package/lib/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
  296. package/lib/src/views/v2/Redeem/index.d.ts.map +1 -1
  297. package/lib/{sui-wX1yJDdB.js → sui-BCJA_cYx.js} +1 -1
  298. package/lib/{sui-C6UUvjyd.mjs → sui-BJC_JOkP.mjs} +3 -3
  299. package/lib/{sui-jsmS--zo.mjs → sui-B_AxArCa.mjs} +31 -31
  300. package/lib/{sui-mpRuHBm9.js → sui-Bdmfxpd2.js} +1 -1
  301. package/lib/{swapHorizontal-BiNrGmxY.mjs → swapHorizontal-CGVqXEEp.mjs} +1 -1
  302. package/lib/{swapHorizontal-Bg8dDuE0.js → swapHorizontal-Wp81JSgX.js} +1 -1
  303. package/lib/{swapHorizontalBold-DeCMOo5R.js → swapHorizontalBold-D70amlcg.js} +1 -1
  304. package/lib/{swapHorizontalBold-CNvg6Zjx.mjs → swapHorizontalBold-DfykA661.mjs} +1 -1
  305. package/lib/{swapHorizontalMedium-DClbbhUH.js → swapHorizontalMedium-B92n1mhC.js} +1 -1
  306. package/lib/{swapHorizontalMedium-TUPMHawi.mjs → swapHorizontalMedium-C39AY5jR.mjs} +1 -1
  307. package/lib/{swapHorizontalRoundedBold-Cwu5ydTm.js → swapHorizontalRoundedBold-CWEgSWL3.js} +1 -1
  308. package/lib/{swapHorizontalRoundedBold-BAlHBaC3.mjs → swapHorizontalRoundedBold-DHWf4C2R.mjs} +1 -1
  309. package/lib/{swapVertical-DDYEDCbu.mjs → swapVertical-BpTJ-r5m.mjs} +1 -1
  310. package/lib/{swapVertical-cn4noOLO.js → swapVertical-DbS3f5xB.js} +1 -1
  311. package/lib/{telegram-BGnemuS8.mjs → telegram-CNeTqCXy.mjs} +1 -1
  312. package/lib/{telegram-sBtcJjCa.js → telegram-DK-OaZof.js} +1 -1
  313. package/lib/{three-dots-BS-tA53X.mjs → three-dots-BK0Ca5f9.mjs} +1 -1
  314. package/lib/{three-dots-Ci3M242Y.js → three-dots-CLOJZeqn.js} +1 -1
  315. package/lib/{tokens-DprimVrG.js → tokens-BVFCrwUI.js} +1 -1
  316. package/lib/{tokens-ZJvnv3ye.mjs → tokens-BtPkpuCj.mjs} +3 -3
  317. package/lib/{twitch-kde2nyWc.js → twitch-6sCGBDD_.js} +1 -1
  318. package/lib/{twitch-DwEOOcQc.mjs → twitch-RQqv2Pha.mjs} +1 -1
  319. package/lib/{twitterIcon-EX3YrhMm.js → twitterIcon-A2SY7Ljz.js} +1 -1
  320. package/lib/{twitterIcon-D-aL497o.mjs → twitterIcon-C8wIxAQv.mjs} +1 -1
  321. package/lib/{units-BVg9f9bp.js → units-BrJ4CYDZ.js} +1 -1
  322. package/lib/{units-De4Es9C-.mjs → units-CLOrp1Nk.mjs} +24 -24
  323. package/lib/{unsignedTransaction-3gDumn1W.js → unsignedTransaction-BwT180qj.js} +1 -1
  324. package/lib/{unsignedTransaction-DmrfJNQf.mjs → unsignedTransaction-DkC9OIgh.mjs} +17 -17
  325. package/lib/{verify-DPJd26j0.mjs → verify-CXS0qPBz.mjs} +1 -1
  326. package/lib/{verify-BuD5oE0Y.js → verify-DnxzVYqj.js} +1 -1
  327. package/lib/{verify-filled-DgfMnLnW.js → verify-filled-BOz9hX3w.js} +1 -1
  328. package/lib/{verify-filled-BSJMiVyN.mjs → verify-filled-DOsmzDzC.mjs} +1 -1
  329. package/lib/{w3m-modal-vqqsLuJC.mjs → w3m-modal-Cdafmb0Z.mjs} +2 -2
  330. package/lib/{w3m-modal-jDCMhVYM.js → w3m-modal-CpYUxfVT.js} +1 -1
  331. package/lib/{wallet-DlsCAJmu.js → wallet-Bc87h19O.js} +1 -1
  332. package/lib/{wallet-CiaeeygI.mjs → wallet-D3sDbpnL.mjs} +1 -1
  333. package/lib/{wallet-placeholder-DhQ6l48d.mjs → wallet-placeholder-CsEk6mnJ.mjs} +1 -1
  334. package/lib/{wallet-placeholder-CWeGWgUL.js → wallet-placeholder-D60KEgcO.js} +1 -1
  335. package/lib/{walletconnect-CHFqRNg_.mjs → walletconnect-D44C2RUp.mjs} +1 -1
  336. package/lib/{walletconnect-YkYiOGcA.js → walletconnect-isfAM6mU.js} +1 -1
  337. package/lib/{warning-circle-z__jbYAZ.mjs → warning-circle-D6V7bjdk.mjs} +1 -1
  338. package/lib/{warning-circle-BKWEaDK7.js → warning-circle-DKsp8DlH.js} +1 -1
  339. package/lib/{web3-IDpqtkwB.js → web3-DgUW0FuE.js} +1 -1
  340. package/lib/{web3-CevzYKNd.mjs → web3-L0yKkQfC.mjs} +1 -1
  341. package/lib/{x-DXPEHEVV.mjs → x-CfYfR6N2.mjs} +1 -1
  342. package/lib/{x-De5ksSKs.js → x-D1ju5P9d.js} +1 -1
  343. package/package.json +30 -28
  344. package/lib/address-CSWlEusF.js +0 -15
  345. package/lib/create-CRa9FZnZ.mjs +0 -18
  346. package/lib/solana-BHr-TCKL.js +0 -1
  347. package/lib/solana-Dhrl0nvx.mjs +0 -18
@@ -0,0 +1,15 @@
1
+ "use strict";var Am=Object.defineProperty;var wm=(n,e,t)=>e in n?Am(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var se=(n,e,t)=>wm(n,typeof e!="symbol"?e+"":e,t);var an=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xs(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Tc(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var s=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return n[r]}})}),t}var je={},ae={},oo={};oo.byteLength=xm;oo.toByteArray=Sm;oo.fromByteArray=km;var En=[],en=[],Em=typeof Uint8Array<"u"?Uint8Array:Array,ua="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var zr=0,Bm=ua.length;zr<Bm;++zr)En[zr]=ua[zr],en[ua.charCodeAt(zr)]=zr;en[45]=62;en[95]=63;function Uu(n){var e=n.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=n.indexOf("=");t===-1&&(t=e);var r=t===e?0:4-t%4;return[t,r]}function xm(n){var e=Uu(n),t=e[0],r=e[1];return(t+r)*3/4-r}function Cm(n,e,t){return(e+t)*3/4-t}function Sm(n){var e,t=Uu(n),r=t[0],s=t[1],i=new Em(Cm(n,r,s)),o=0,a=s>0?r-4:r,c;for(c=0;c<a;c+=4)e=en[n.charCodeAt(c)]<<18|en[n.charCodeAt(c+1)]<<12|en[n.charCodeAt(c+2)]<<6|en[n.charCodeAt(c+3)],i[o++]=e>>16&255,i[o++]=e>>8&255,i[o++]=e&255;return s===2&&(e=en[n.charCodeAt(c)]<<2|en[n.charCodeAt(c+1)]>>4,i[o++]=e&255),s===1&&(e=en[n.charCodeAt(c)]<<10|en[n.charCodeAt(c+1)]<<4|en[n.charCodeAt(c+2)]>>2,i[o++]=e>>8&255,i[o++]=e&255),i}function Dm(n){return En[n>>18&63]+En[n>>12&63]+En[n>>6&63]+En[n&63]}function vm(n,e,t){for(var r,s=[],i=e;i<t;i+=3)r=(n[i]<<16&16711680)+(n[i+1]<<8&65280)+(n[i+2]&255),s.push(Dm(r));return s.join("")}function km(n){for(var e,t=n.length,r=t%3,s=[],i=16383,o=0,a=t-r;o<a;o+=i)s.push(vm(n,o,o+i>a?a:o+i));return r===1?(e=n[t-1],s.push(En[e>>2]+En[e<<4&63]+"==")):r===2&&(e=(n[t-2]<<8)+n[t-1],s.push(En[e>>10]+En[e>>4&63]+En[e<<2&63]+"=")),s.join("")}var Ic={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Ic.read=function(n,e,t,r,s){var i,o,a=s*8-r-1,c=(1<<a)-1,h=c>>1,b=-7,w=t?s-1:0,D=t?-1:1,E=n[e+w];for(w+=D,i=E&(1<<-b)-1,E>>=-b,b+=a;b>0;i=i*256+n[e+w],w+=D,b-=8);for(o=i&(1<<-b)-1,i>>=-b,b+=r;b>0;o=o*256+n[e+w],w+=D,b-=8);if(i===0)i=1-h;else{if(i===c)return o?NaN:(E?-1:1)*(1/0);o=o+Math.pow(2,r),i=i-h}return(E?-1:1)*o*Math.pow(2,i-r)};Ic.write=function(n,e,t,r,s,i){var o,a,c,h=i*8-s-1,b=(1<<h)-1,w=b>>1,D=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=r?0:i-1,g=r?1:-1,S=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=b):(o=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+w>=1?e+=D/c:e+=D*Math.pow(2,1-w),e*c>=2&&(o++,c/=2),o+w>=b?(a=0,o=b):o+w>=1?(a=(e*c-1)*Math.pow(2,s),o=o+w):(a=e*Math.pow(2,w-1)*Math.pow(2,s),o=0));s>=8;n[t+E]=a&255,E+=g,a/=256,s-=8);for(o=o<<s|a,h+=s;h>0;n[t+E]=o&255,E+=g,o/=256,h-=8);n[t+E-g]|=S*128};/*!
2
+ * The buffer module from node.js, for the browser.
3
+ *
4
+ * @author Feross Aboukhadijeh <https://feross.org>
5
+ * @license MIT
6
+ */(function(n){const e=oo,t=Ic,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=a,n.SlowBuffer=N,n.INSPECT_MAX_BYTES=50;const s=2147483647;n.kMaxLength=s,a.TYPED_ARRAY_SUPPORT=i(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const A=new Uint8Array(1),d={foo:function(){return 42}};return Object.setPrototypeOf(d,Uint8Array.prototype),Object.setPrototypeOf(A,d),A.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(A){if(A>s)throw new RangeError('The value "'+A+'" is invalid for option "size"');const d=new Uint8Array(A);return Object.setPrototypeOf(d,a.prototype),d}function a(A,d,f){if(typeof A=="number"){if(typeof d=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(A)}return c(A,d,f)}a.poolSize=8192;function c(A,d,f){if(typeof A=="string")return D(A,d);if(ArrayBuffer.isView(A))return g(A);if(A==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A);if(Xt(A,ArrayBuffer)||A&&Xt(A.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Xt(A,SharedArrayBuffer)||A&&Xt(A.buffer,SharedArrayBuffer)))return S(A,d,f);if(typeof A=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const v=A.valueOf&&A.valueOf();if(v!=null&&v!==A)return a.from(v,d,f);const R=T(A);if(R)return R;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof A[Symbol.toPrimitive]=="function")return a.from(A[Symbol.toPrimitive]("string"),d,f);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A)}a.from=function(A,d,f){return c(A,d,f)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function h(A){if(typeof A!="number")throw new TypeError('"size" argument must be of type number');if(A<0)throw new RangeError('The value "'+A+'" is invalid for option "size"')}function b(A,d,f){return h(A),A<=0?o(A):d!==void 0?typeof f=="string"?o(A).fill(d,f):o(A).fill(d):o(A)}a.alloc=function(A,d,f){return b(A,d,f)};function w(A){return h(A),o(A<0?0:M(A)|0)}a.allocUnsafe=function(A){return w(A)},a.allocUnsafeSlow=function(A){return w(A)};function D(A,d){if((typeof d!="string"||d==="")&&(d="utf8"),!a.isEncoding(d))throw new TypeError("Unknown encoding: "+d);const f=_(A,d)|0;let v=o(f);const R=v.write(A,d);return R!==f&&(v=v.slice(0,R)),v}function E(A){const d=A.length<0?0:M(A.length)|0,f=o(d);for(let v=0;v<d;v+=1)f[v]=A[v]&255;return f}function g(A){if(Xt(A,Uint8Array)){const d=new Uint8Array(A);return S(d.buffer,d.byteOffset,d.byteLength)}return E(A)}function S(A,d,f){if(d<0||A.byteLength<d)throw new RangeError('"offset" is outside of buffer bounds');if(A.byteLength<d+(f||0))throw new RangeError('"length" is outside of buffer bounds');let v;return d===void 0&&f===void 0?v=new Uint8Array(A):f===void 0?v=new Uint8Array(A,d):v=new Uint8Array(A,d,f),Object.setPrototypeOf(v,a.prototype),v}function T(A){if(a.isBuffer(A)){const d=M(A.length)|0,f=o(d);return f.length===0||A.copy(f,0,0,d),f}if(A.length!==void 0)return typeof A.length!="number"||Ke(A.length)?o(0):E(A);if(A.type==="Buffer"&&Array.isArray(A.data))return E(A.data)}function M(A){if(A>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return A|0}function N(A){return+A!=A&&(A=0),a.alloc(+A)}a.isBuffer=function(d){return d!=null&&d._isBuffer===!0&&d!==a.prototype},a.compare=function(d,f){if(Xt(d,Uint8Array)&&(d=a.from(d,d.offset,d.byteLength)),Xt(f,Uint8Array)&&(f=a.from(f,f.offset,f.byteLength)),!a.isBuffer(d)||!a.isBuffer(f))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(d===f)return 0;let v=d.length,R=f.length;for(let W=0,z=Math.min(v,R);W<z;++W)if(d[W]!==f[W]){v=d[W],R=f[W];break}return v<R?-1:R<v?1:0},a.isEncoding=function(d){switch(String(d).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(d,f){if(!Array.isArray(d))throw new TypeError('"list" argument must be an Array of Buffers');if(d.length===0)return a.alloc(0);let v;if(f===void 0)for(f=0,v=0;v<d.length;++v)f+=d[v].length;const R=a.allocUnsafe(f);let W=0;for(v=0;v<d.length;++v){let z=d[v];if(Xt(z,Uint8Array))W+z.length>R.length?(a.isBuffer(z)||(z=a.from(z)),z.copy(R,W)):Uint8Array.prototype.set.call(R,z,W);else if(a.isBuffer(z))z.copy(R,W);else throw new TypeError('"list" argument must be an Array of Buffers');W+=z.length}return R};function _(A,d){if(a.isBuffer(A))return A.length;if(ArrayBuffer.isView(A)||Xt(A,ArrayBuffer))return A.byteLength;if(typeof A!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof A);const f=A.length,v=arguments.length>2&&arguments[2]===!0;if(!v&&f===0)return 0;let R=!1;for(;;)switch(d){case"ascii":case"latin1":case"binary":return f;case"utf8":case"utf-8":return Re(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f*2;case"hex":return f>>>1;case"base64":return Ne(A).length;default:if(R)return v?-1:Re(A).length;d=(""+d).toLowerCase(),R=!0}}a.byteLength=_;function U(A,d,f){let v=!1;if((d===void 0||d<0)&&(d=0),d>this.length||((f===void 0||f>this.length)&&(f=this.length),f<=0)||(f>>>=0,d>>>=0,f<=d))return"";for(A||(A="utf8");;)switch(A){case"hex":return x(this,d,f);case"utf8":case"utf-8":return l(this,d,f);case"ascii":return C(this,d,f);case"latin1":case"binary":return B(this,d,f);case"base64":return F(this,d,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,d,f);default:if(v)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),v=!0}}a.prototype._isBuffer=!0;function L(A,d,f){const v=A[d];A[d]=A[f],A[f]=v}a.prototype.swap16=function(){const d=this.length;if(d%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let f=0;f<d;f+=2)L(this,f,f+1);return this},a.prototype.swap32=function(){const d=this.length;if(d%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let f=0;f<d;f+=4)L(this,f,f+3),L(this,f+1,f+2);return this},a.prototype.swap64=function(){const d=this.length;if(d%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let f=0;f<d;f+=8)L(this,f,f+7),L(this,f+1,f+6),L(this,f+2,f+5),L(this,f+3,f+4);return this},a.prototype.toString=function(){const d=this.length;return d===0?"":arguments.length===0?l(this,0,d):U.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(d){if(!a.isBuffer(d))throw new TypeError("Argument must be a Buffer");return this===d?!0:a.compare(this,d)===0},a.prototype.inspect=function(){let d="";const f=n.INSPECT_MAX_BYTES;return d=this.toString("hex",0,f).replace(/(.{2})/g,"$1 ").trim(),this.length>f&&(d+=" ... "),"<Buffer "+d+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(d,f,v,R,W){if(Xt(d,Uint8Array)&&(d=a.from(d,d.offset,d.byteLength)),!a.isBuffer(d))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof d);if(f===void 0&&(f=0),v===void 0&&(v=d?d.length:0),R===void 0&&(R=0),W===void 0&&(W=this.length),f<0||v>d.length||R<0||W>this.length)throw new RangeError("out of range index");if(R>=W&&f>=v)return 0;if(R>=W)return-1;if(f>=v)return 1;if(f>>>=0,v>>>=0,R>>>=0,W>>>=0,this===d)return 0;let z=W-R,ge=v-f;const me=Math.min(z,ge),he=this.slice(R,W),ze=d.slice(f,v);for(let fe=0;fe<me;++fe)if(he[fe]!==ze[fe]){z=he[fe],ge=ze[fe];break}return z<ge?-1:ge<z?1:0};function H(A,d,f,v,R){if(A.length===0)return-1;if(typeof f=="string"?(v=f,f=0):f>2147483647?f=2147483647:f<-2147483648&&(f=-2147483648),f=+f,Ke(f)&&(f=R?0:A.length-1),f<0&&(f=A.length+f),f>=A.length){if(R)return-1;f=A.length-1}else if(f<0)if(R)f=0;else return-1;if(typeof d=="string"&&(d=a.from(d,v)),a.isBuffer(d))return d.length===0?-1:K(A,d,f,v,R);if(typeof d=="number")return d=d&255,typeof Uint8Array.prototype.indexOf=="function"?R?Uint8Array.prototype.indexOf.call(A,d,f):Uint8Array.prototype.lastIndexOf.call(A,d,f):K(A,[d],f,v,R);throw new TypeError("val must be string, number or Buffer")}function K(A,d,f,v,R){let W=1,z=A.length,ge=d.length;if(v!==void 0&&(v=String(v).toLowerCase(),v==="ucs2"||v==="ucs-2"||v==="utf16le"||v==="utf-16le")){if(A.length<2||d.length<2)return-1;W=2,z/=2,ge/=2,f/=2}function me(ze,fe){return W===1?ze[fe]:ze.readUInt16BE(fe*W)}let he;if(R){let ze=-1;for(he=f;he<z;he++)if(me(A,he)===me(d,ze===-1?0:he-ze)){if(ze===-1&&(ze=he),he-ze+1===ge)return ze*W}else ze!==-1&&(he-=he-ze),ze=-1}else for(f+ge>z&&(f=z-ge),he=f;he>=0;he--){let ze=!0;for(let fe=0;fe<ge;fe++)if(me(A,he+fe)!==me(d,fe)){ze=!1;break}if(ze)return he}return-1}a.prototype.includes=function(d,f,v){return this.indexOf(d,f,v)!==-1},a.prototype.indexOf=function(d,f,v){return H(this,d,f,v,!0)},a.prototype.lastIndexOf=function(d,f,v){return H(this,d,f,v,!1)};function V(A,d,f,v){f=Number(f)||0;const R=A.length-f;v?(v=Number(v),v>R&&(v=R)):v=R;const W=d.length;v>W/2&&(v=W/2);let z;for(z=0;z<v;++z){const ge=parseInt(d.substr(z*2,2),16);if(Ke(ge))return z;A[f+z]=ge}return z}function ee(A,d,f,v){return We(Re(d,A.length-f),A,f,v)}function re(A,d,f,v){return We(qe(d),A,f,v)}function $(A,d,f,v){return We(Ne(d),A,f,v)}function ie(A,d,f,v){return We(Nr(d,A.length-f),A,f,v)}a.prototype.write=function(d,f,v,R){if(f===void 0)R="utf8",v=this.length,f=0;else if(v===void 0&&typeof f=="string")R=f,v=this.length,f=0;else if(isFinite(f))f=f>>>0,isFinite(v)?(v=v>>>0,R===void 0&&(R="utf8")):(R=v,v=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const W=this.length-f;if((v===void 0||v>W)&&(v=W),d.length>0&&(v<0||f<0)||f>this.length)throw new RangeError("Attempt to write outside buffer bounds");R||(R="utf8");let z=!1;for(;;)switch(R){case"hex":return V(this,d,f,v);case"utf8":case"utf-8":return ee(this,d,f,v);case"ascii":case"latin1":case"binary":return re(this,d,f,v);case"base64":return $(this,d,f,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ie(this,d,f,v);default:if(z)throw new TypeError("Unknown encoding: "+R);R=(""+R).toLowerCase(),z=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function F(A,d,f){return d===0&&f===A.length?e.fromByteArray(A):e.fromByteArray(A.slice(d,f))}function l(A,d,f){f=Math.min(A.length,f);const v=[];let R=d;for(;R<f;){const W=A[R];let z=null,ge=W>239?4:W>223?3:W>191?2:1;if(R+ge<=f){let me,he,ze,fe;switch(ge){case 1:W<128&&(z=W);break;case 2:me=A[R+1],(me&192)===128&&(fe=(W&31)<<6|me&63,fe>127&&(z=fe));break;case 3:me=A[R+1],he=A[R+2],(me&192)===128&&(he&192)===128&&(fe=(W&15)<<12|(me&63)<<6|he&63,fe>2047&&(fe<55296||fe>57343)&&(z=fe));break;case 4:me=A[R+1],he=A[R+2],ze=A[R+3],(me&192)===128&&(he&192)===128&&(ze&192)===128&&(fe=(W&15)<<18|(me&63)<<12|(he&63)<<6|ze&63,fe>65535&&fe<1114112&&(z=fe))}}z===null?(z=65533,ge=1):z>65535&&(z-=65536,v.push(z>>>10&1023|55296),z=56320|z&1023),v.push(z),R+=ge}return p(v)}const m=4096;function p(A){const d=A.length;if(d<=m)return String.fromCharCode.apply(String,A);let f="",v=0;for(;v<d;)f+=String.fromCharCode.apply(String,A.slice(v,v+=m));return f}function C(A,d,f){let v="";f=Math.min(A.length,f);for(let R=d;R<f;++R)v+=String.fromCharCode(A[R]&127);return v}function B(A,d,f){let v="";f=Math.min(A.length,f);for(let R=d;R<f;++R)v+=String.fromCharCode(A[R]);return v}function x(A,d,f){const v=A.length;(!d||d<0)&&(d=0),(!f||f<0||f>v)&&(f=v);let R="";for(let W=d;W<f;++W)R+=Xe[A[W]];return R}function I(A,d,f){const v=A.slice(d,f);let R="";for(let W=0;W<v.length-1;W+=2)R+=String.fromCharCode(v[W]+v[W+1]*256);return R}a.prototype.slice=function(d,f){const v=this.length;d=~~d,f=f===void 0?v:~~f,d<0?(d+=v,d<0&&(d=0)):d>v&&(d=v),f<0?(f+=v,f<0&&(f=0)):f>v&&(f=v),f<d&&(f=d);const R=this.subarray(d,f);return Object.setPrototypeOf(R,a.prototype),R};function y(A,d,f){if(A%1!==0||A<0)throw new RangeError("offset is not uint");if(A+d>f)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(d,f,v){d=d>>>0,f=f>>>0,v||y(d,f,this.length);let R=this[d],W=1,z=0;for(;++z<f&&(W*=256);)R+=this[d+z]*W;return R},a.prototype.readUintBE=a.prototype.readUIntBE=function(d,f,v){d=d>>>0,f=f>>>0,v||y(d,f,this.length);let R=this[d+--f],W=1;for(;f>0&&(W*=256);)R+=this[d+--f]*W;return R},a.prototype.readUint8=a.prototype.readUInt8=function(d,f){return d=d>>>0,f||y(d,1,this.length),this[d]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(d,f){return d=d>>>0,f||y(d,2,this.length),this[d]|this[d+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(d,f){return d=d>>>0,f||y(d,2,this.length),this[d]<<8|this[d+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(d,f){return d=d>>>0,f||y(d,4,this.length),(this[d]|this[d+1]<<8|this[d+2]<<16)+this[d+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(d,f){return d=d>>>0,f||y(d,4,this.length),this[d]*16777216+(this[d+1]<<16|this[d+2]<<8|this[d+3])},a.prototype.readBigUInt64LE=ln(function(d){d=d>>>0,Pe(d,"offset");const f=this[d],v=this[d+7];(f===void 0||v===void 0)&&pe(d,this.length-8);const R=f+this[++d]*2**8+this[++d]*2**16+this[++d]*2**24,W=this[++d]+this[++d]*2**8+this[++d]*2**16+v*2**24;return BigInt(R)+(BigInt(W)<<BigInt(32))}),a.prototype.readBigUInt64BE=ln(function(d){d=d>>>0,Pe(d,"offset");const f=this[d],v=this[d+7];(f===void 0||v===void 0)&&pe(d,this.length-8);const R=f*2**24+this[++d]*2**16+this[++d]*2**8+this[++d],W=this[++d]*2**24+this[++d]*2**16+this[++d]*2**8+v;return(BigInt(R)<<BigInt(32))+BigInt(W)}),a.prototype.readIntLE=function(d,f,v){d=d>>>0,f=f>>>0,v||y(d,f,this.length);let R=this[d],W=1,z=0;for(;++z<f&&(W*=256);)R+=this[d+z]*W;return W*=128,R>=W&&(R-=Math.pow(2,8*f)),R},a.prototype.readIntBE=function(d,f,v){d=d>>>0,f=f>>>0,v||y(d,f,this.length);let R=f,W=1,z=this[d+--R];for(;R>0&&(W*=256);)z+=this[d+--R]*W;return W*=128,z>=W&&(z-=Math.pow(2,8*f)),z},a.prototype.readInt8=function(d,f){return d=d>>>0,f||y(d,1,this.length),this[d]&128?(255-this[d]+1)*-1:this[d]},a.prototype.readInt16LE=function(d,f){d=d>>>0,f||y(d,2,this.length);const v=this[d]|this[d+1]<<8;return v&32768?v|4294901760:v},a.prototype.readInt16BE=function(d,f){d=d>>>0,f||y(d,2,this.length);const v=this[d+1]|this[d]<<8;return v&32768?v|4294901760:v},a.prototype.readInt32LE=function(d,f){return d=d>>>0,f||y(d,4,this.length),this[d]|this[d+1]<<8|this[d+2]<<16|this[d+3]<<24},a.prototype.readInt32BE=function(d,f){return d=d>>>0,f||y(d,4,this.length),this[d]<<24|this[d+1]<<16|this[d+2]<<8|this[d+3]},a.prototype.readBigInt64LE=ln(function(d){d=d>>>0,Pe(d,"offset");const f=this[d],v=this[d+7];(f===void 0||v===void 0)&&pe(d,this.length-8);const R=this[d+4]+this[d+5]*2**8+this[d+6]*2**16+(v<<24);return(BigInt(R)<<BigInt(32))+BigInt(f+this[++d]*2**8+this[++d]*2**16+this[++d]*2**24)}),a.prototype.readBigInt64BE=ln(function(d){d=d>>>0,Pe(d,"offset");const f=this[d],v=this[d+7];(f===void 0||v===void 0)&&pe(d,this.length-8);const R=(f<<24)+this[++d]*2**16+this[++d]*2**8+this[++d];return(BigInt(R)<<BigInt(32))+BigInt(this[++d]*2**24+this[++d]*2**16+this[++d]*2**8+v)}),a.prototype.readFloatLE=function(d,f){return d=d>>>0,f||y(d,4,this.length),t.read(this,d,!0,23,4)},a.prototype.readFloatBE=function(d,f){return d=d>>>0,f||y(d,4,this.length),t.read(this,d,!1,23,4)},a.prototype.readDoubleLE=function(d,f){return d=d>>>0,f||y(d,8,this.length),t.read(this,d,!0,52,8)},a.prototype.readDoubleBE=function(d,f){return d=d>>>0,f||y(d,8,this.length),t.read(this,d,!1,52,8)};function u(A,d,f,v,R,W){if(!a.isBuffer(A))throw new TypeError('"buffer" argument must be a Buffer instance');if(d>R||d<W)throw new RangeError('"value" argument is out of bounds');if(f+v>A.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(d,f,v,R){if(d=+d,f=f>>>0,v=v>>>0,!R){const ge=Math.pow(2,8*v)-1;u(this,d,f,v,ge,0)}let W=1,z=0;for(this[f]=d&255;++z<v&&(W*=256);)this[f+z]=d/W&255;return f+v},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(d,f,v,R){if(d=+d,f=f>>>0,v=v>>>0,!R){const ge=Math.pow(2,8*v)-1;u(this,d,f,v,ge,0)}let W=v-1,z=1;for(this[f+W]=d&255;--W>=0&&(z*=256);)this[f+W]=d/z&255;return f+v},a.prototype.writeUint8=a.prototype.writeUInt8=function(d,f,v){return d=+d,f=f>>>0,v||u(this,d,f,1,255,0),this[f]=d&255,f+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(d,f,v){return d=+d,f=f>>>0,v||u(this,d,f,2,65535,0),this[f]=d&255,this[f+1]=d>>>8,f+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(d,f,v){return d=+d,f=f>>>0,v||u(this,d,f,2,65535,0),this[f]=d>>>8,this[f+1]=d&255,f+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(d,f,v){return d=+d,f=f>>>0,v||u(this,d,f,4,4294967295,0),this[f+3]=d>>>24,this[f+2]=d>>>16,this[f+1]=d>>>8,this[f]=d&255,f+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(d,f,v){return d=+d,f=f>>>0,v||u(this,d,f,4,4294967295,0),this[f]=d>>>24,this[f+1]=d>>>16,this[f+2]=d>>>8,this[f+3]=d&255,f+4};function k(A,d,f,v,R){be(d,v,R,A,f,7);let W=Number(d&BigInt(4294967295));A[f++]=W,W=W>>8,A[f++]=W,W=W>>8,A[f++]=W,W=W>>8,A[f++]=W;let z=Number(d>>BigInt(32)&BigInt(4294967295));return A[f++]=z,z=z>>8,A[f++]=z,z=z>>8,A[f++]=z,z=z>>8,A[f++]=z,f}function G(A,d,f,v,R){be(d,v,R,A,f,7);let W=Number(d&BigInt(4294967295));A[f+7]=W,W=W>>8,A[f+6]=W,W=W>>8,A[f+5]=W,W=W>>8,A[f+4]=W;let z=Number(d>>BigInt(32)&BigInt(4294967295));return A[f+3]=z,z=z>>8,A[f+2]=z,z=z>>8,A[f+1]=z,z=z>>8,A[f]=z,f+8}a.prototype.writeBigUInt64LE=ln(function(d,f=0){return k(this,d,f,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=ln(function(d,f=0){return G(this,d,f,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(d,f,v,R){if(d=+d,f=f>>>0,!R){const me=Math.pow(2,8*v-1);u(this,d,f,v,me-1,-me)}let W=0,z=1,ge=0;for(this[f]=d&255;++W<v&&(z*=256);)d<0&&ge===0&&this[f+W-1]!==0&&(ge=1),this[f+W]=(d/z>>0)-ge&255;return f+v},a.prototype.writeIntBE=function(d,f,v,R){if(d=+d,f=f>>>0,!R){const me=Math.pow(2,8*v-1);u(this,d,f,v,me-1,-me)}let W=v-1,z=1,ge=0;for(this[f+W]=d&255;--W>=0&&(z*=256);)d<0&&ge===0&&this[f+W+1]!==0&&(ge=1),this[f+W]=(d/z>>0)-ge&255;return f+v},a.prototype.writeInt8=function(d,f,v){return d=+d,f=f>>>0,v||u(this,d,f,1,127,-128),d<0&&(d=255+d+1),this[f]=d&255,f+1},a.prototype.writeInt16LE=function(d,f,v){return d=+d,f=f>>>0,v||u(this,d,f,2,32767,-32768),this[f]=d&255,this[f+1]=d>>>8,f+2},a.prototype.writeInt16BE=function(d,f,v){return d=+d,f=f>>>0,v||u(this,d,f,2,32767,-32768),this[f]=d>>>8,this[f+1]=d&255,f+2},a.prototype.writeInt32LE=function(d,f,v){return d=+d,f=f>>>0,v||u(this,d,f,4,2147483647,-2147483648),this[f]=d&255,this[f+1]=d>>>8,this[f+2]=d>>>16,this[f+3]=d>>>24,f+4},a.prototype.writeInt32BE=function(d,f,v){return d=+d,f=f>>>0,v||u(this,d,f,4,2147483647,-2147483648),d<0&&(d=4294967295+d+1),this[f]=d>>>24,this[f+1]=d>>>16,this[f+2]=d>>>8,this[f+3]=d&255,f+4},a.prototype.writeBigInt64LE=ln(function(d,f=0){return k(this,d,f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=ln(function(d,f=0){return G(this,d,f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Y(A,d,f,v,R,W){if(f+v>A.length)throw new RangeError("Index out of range");if(f<0)throw new RangeError("Index out of range")}function J(A,d,f,v,R){return d=+d,f=f>>>0,R||Y(A,d,f,4),t.write(A,d,f,v,23,4),f+4}a.prototype.writeFloatLE=function(d,f,v){return J(this,d,f,!0,v)},a.prototype.writeFloatBE=function(d,f,v){return J(this,d,f,!1,v)};function de(A,d,f,v,R){return d=+d,f=f>>>0,R||Y(A,d,f,8),t.write(A,d,f,v,52,8),f+8}a.prototype.writeDoubleLE=function(d,f,v){return de(this,d,f,!0,v)},a.prototype.writeDoubleBE=function(d,f,v){return de(this,d,f,!1,v)},a.prototype.copy=function(d,f,v,R){if(!a.isBuffer(d))throw new TypeError("argument should be a Buffer");if(v||(v=0),!R&&R!==0&&(R=this.length),f>=d.length&&(f=d.length),f||(f=0),R>0&&R<v&&(R=v),R===v||d.length===0||this.length===0)return 0;if(f<0)throw new RangeError("targetStart out of bounds");if(v<0||v>=this.length)throw new RangeError("Index out of range");if(R<0)throw new RangeError("sourceEnd out of bounds");R>this.length&&(R=this.length),d.length-f<R-v&&(R=d.length-f+v);const W=R-v;return this===d&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(f,v,R):Uint8Array.prototype.set.call(d,this.subarray(v,R),f),W},a.prototype.fill=function(d,f,v,R){if(typeof d=="string"){if(typeof f=="string"?(R=f,f=0,v=this.length):typeof v=="string"&&(R=v,v=this.length),R!==void 0&&typeof R!="string")throw new TypeError("encoding must be a string");if(typeof R=="string"&&!a.isEncoding(R))throw new TypeError("Unknown encoding: "+R);if(d.length===1){const z=d.charCodeAt(0);(R==="utf8"&&z<128||R==="latin1")&&(d=z)}}else typeof d=="number"?d=d&255:typeof d=="boolean"&&(d=Number(d));if(f<0||this.length<f||this.length<v)throw new RangeError("Out of range index");if(v<=f)return this;f=f>>>0,v=v===void 0?this.length:v>>>0,d||(d=0);let W;if(typeof d=="number")for(W=f;W<v;++W)this[W]=d;else{const z=a.isBuffer(d)?d:a.from(d,R),ge=z.length;if(ge===0)throw new TypeError('The value "'+d+'" is invalid for argument "value"');for(W=0;W<v-f;++W)this[W+f]=z[W%ge]}return this};const ce={};function ue(A,d,f){ce[A]=class extends f{constructor(){super(),Object.defineProperty(this,"message",{value:d.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${A}]`,this.stack,delete this.name}get code(){return A}set code(R){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:R,writable:!0})}toString(){return`${this.name} [${A}]: ${this.message}`}}}ue("ERR_BUFFER_OUT_OF_BOUNDS",function(A){return A?`${A} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ue("ERR_INVALID_ARG_TYPE",function(A,d){return`The "${A}" argument must be of type number. Received type ${typeof d}`},TypeError),ue("ERR_OUT_OF_RANGE",function(A,d,f){let v=`The value of "${A}" is out of range.`,R=f;return Number.isInteger(f)&&Math.abs(f)>2**32?R=$e(String(f)):typeof f=="bigint"&&(R=String(f),(f>BigInt(2)**BigInt(32)||f<-(BigInt(2)**BigInt(32)))&&(R=$e(R)),R+="n"),v+=` It must be ${d}. Received ${R}`,v},RangeError);function $e(A){let d="",f=A.length;const v=A[0]==="-"?1:0;for(;f>=v+4;f-=3)d=`_${A.slice(f-3,f)}${d}`;return`${A.slice(0,f)}${d}`}function Be(A,d,f){Pe(d,"offset"),(A[d]===void 0||A[d+f]===void 0)&&pe(d,A.length-(f+1))}function be(A,d,f,v,R,W){if(A>f||A<d){const z=typeof d=="bigint"?"n":"";let ge;throw d===0||d===BigInt(0)?ge=`>= 0${z} and < 2${z} ** ${(W+1)*8}${z}`:ge=`>= -(2${z} ** ${(W+1)*8-1}${z}) and < 2 ** ${(W+1)*8-1}${z}`,new ce.ERR_OUT_OF_RANGE("value",ge,A)}Be(v,R,W)}function Pe(A,d){if(typeof A!="number")throw new ce.ERR_INVALID_ARG_TYPE(d,"number",A)}function pe(A,d,f){throw Math.floor(A)!==A?(Pe(A,f),new ce.ERR_OUT_OF_RANGE("offset","an integer",A)):d<0?new ce.ERR_BUFFER_OUT_OF_BOUNDS:new ce.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${d}`,A)}const Se=/[^+/0-9A-Za-z-_]/g;function jt(A){if(A=A.split("=")[0],A=A.trim().replace(Se,""),A.length<2)return"";for(;A.length%4!==0;)A=A+"=";return A}function Re(A,d){d=d||1/0;let f;const v=A.length;let R=null;const W=[];for(let z=0;z<v;++z){if(f=A.charCodeAt(z),f>55295&&f<57344){if(!R){if(f>56319){(d-=3)>-1&&W.push(239,191,189);continue}else if(z+1===v){(d-=3)>-1&&W.push(239,191,189);continue}R=f;continue}if(f<56320){(d-=3)>-1&&W.push(239,191,189),R=f;continue}f=(R-55296<<10|f-56320)+65536}else R&&(d-=3)>-1&&W.push(239,191,189);if(R=null,f<128){if((d-=1)<0)break;W.push(f)}else if(f<2048){if((d-=2)<0)break;W.push(f>>6|192,f&63|128)}else if(f<65536){if((d-=3)<0)break;W.push(f>>12|224,f>>6&63|128,f&63|128)}else if(f<1114112){if((d-=4)<0)break;W.push(f>>18|240,f>>12&63|128,f>>6&63|128,f&63|128)}else throw new Error("Invalid code point")}return W}function qe(A){const d=[];for(let f=0;f<A.length;++f)d.push(A.charCodeAt(f)&255);return d}function Nr(A,d){let f,v,R;const W=[];for(let z=0;z<A.length&&!((d-=2)<0);++z)f=A.charCodeAt(z),v=f>>8,R=f%256,W.push(R),W.push(v);return W}function Ne(A){return e.toByteArray(jt(A))}function We(A,d,f,v){let R;for(R=0;R<v&&!(R+f>=d.length||R>=A.length);++R)d[R+f]=A[R];return R}function Xt(A,d){return A instanceof d||A!=null&&A.constructor!=null&&A.constructor.name!=null&&A.constructor.name===d.name}function Ke(A){return A!==A}const Xe=function(){const A="0123456789abcdef",d=new Array(256);for(let f=0;f<16;++f){const v=f*16;for(let R=0;R<16;++R)d[v+R]=A[f]+A[R]}return d}();function ln(A){return typeof BigInt>"u"?Ze:A}function Ze(){throw new Error("BigInt not supported")}})(ae);var _u={exports:{}},tt=_u.exports={},yn,An;function Ha(){throw new Error("setTimeout has not been defined")}function qa(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?yn=setTimeout:yn=Ha}catch{yn=Ha}try{typeof clearTimeout=="function"?An=clearTimeout:An=qa}catch{An=qa}})();function Mu(n){if(yn===setTimeout)return setTimeout(n,0);if((yn===Ha||!yn)&&setTimeout)return yn=setTimeout,setTimeout(n,0);try{return yn(n,0)}catch{try{return yn.call(null,n,0)}catch{return yn.call(this,n,0)}}}function Fm(n){if(An===clearTimeout)return clearTimeout(n);if((An===qa||!An)&&clearTimeout)return An=clearTimeout,clearTimeout(n);try{return An(n)}catch{try{return An.call(null,n)}catch{return An.call(this,n)}}}var jn=[],$r=!1,gr,wi=-1;function Tm(){!$r||!gr||($r=!1,gr.length?jn=gr.concat(jn):wi=-1,jn.length&&Ru())}function Ru(){if(!$r){var n=Mu(Tm);$r=!0;for(var e=jn.length;e;){for(gr=jn,jn=[];++wi<e;)gr&&gr[wi].run();wi=-1,e=jn.length}gr=null,$r=!1,Fm(n)}}tt.nextTick=function(n){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];jn.push(new Wu(n,e)),jn.length===1&&!$r&&Mu(Ru)};function Wu(n,e){this.fun=n,this.array=e}Wu.prototype.run=function(){this.fun.apply(null,this.array)};tt.title="browser";tt.browser=!0;tt.env={};tt.argv=[];tt.version="";tt.versions={};function Vn(){}tt.on=Vn;tt.addListener=Vn;tt.once=Vn;tt.off=Vn;tt.removeListener=Vn;tt.removeAllListeners=Vn;tt.emit=Vn;tt.prependListener=Vn;tt.prependOnceListener=Vn;tt.listeners=function(n){return[]};tt.binding=function(n){throw new Error("process.binding is not supported")};tt.cwd=function(){return"/"};tt.chdir=function(n){throw new Error("process.chdir is not supported")};tt.umask=function(){return 0};var Pu=_u.exports;(function(n){Object.defineProperty(n,Symbol.toStringTag,{value:"Module"});const e=ae,t=Pu,r=o=>o&&o.__esModule?o:{default:o},s=r(t),i=globalThis||window||void 0||self;Object.defineProperty(n,"Buffer",{enumerable:!0,get:()=>e.Buffer}),Object.defineProperty(n,"process",{enumerable:!0,get:()=>s.default}),n.global=i})(je);const Wi=n=>[...Array(n).keys()],Lu=(n,e)=>n.map(t=>t[e]),yr=n=>Wi(n[0].length).map(e=>Wi(n.length).map(t=>n[t][e])),Im=(n,e,t)=>{const r=new Set(Array.isArray(e)?e:[e]);return n.filter((s,i)=>r.has(i)!==t)};function Um(n,e=!1){if(n.length===0)throw new Error("Can't calculate median of empty array");const t=e?n:[...n].sort((o,a)=>o>a?1:o<a?-1:0),r=Math.floor(t.length/2);if(t.length%2===1)return t[r];const s=t[r-1],i=t[r];if(typeof s=="bigint"&&typeof i=="bigint")return(s+i)/2n;if(typeof s=="number"&&typeof i=="number")return(s+i)/2;throw new Error("Can't calculate median of array with mixed number and bigint")}function _m(n){return["string","number","symbol","bigint","boolean"].includes(typeof n)}const Ql=n=>n.length===2&&!Array.isArray(n[0])&&Array.isArray(n[1]),Pi=n=>n.length===0?[]:Array.isArray(n[0])?n.map(([e,t])=>Array.isArray(t)?(Ql(t)?Pi(t):t).map(r=>[e,r].flat()):[[e,t]]).flat():Ql(n)?Pi(n[1]).map(e=>[n[0],e]):n,Mm=(n,e)=>{const t=Pi(n);if(t.length===0)throw new Error("Invalid mapping: empty");const r=e===void 0?[Wi(t[0].length-1),[t[0].length-1]]:e.map(D=>typeof D=="number"?[D]:D);let s=[],i=!0;const o=(D,E)=>{const g=Array.from(new Set(D[0]).values()),S=new Map(g.map(M=>[M,[]]));for(const[M,N]of D[0].entries())S.get(N).push(M);if(D.length===1){const M=Object.fromEntries(g.map(N=>[N,S.get(N).map(_=>E[_].length===1?E[_][0]:E[_])]));if(i){for(const N of S.values())if(N.length>1)return i=!1,M;s.push(M)}return M}const T=yr(D.slice(1));return Object.fromEntries(g.map(M=>{const N=S.get(M),_=yr(N.map(L=>T[L])),U=N.map(L=>E[L]);return[M,o(_,U)]}))},a=yr(t),c=D=>{const E=a[D];if(E===void 0)throw new Error(`Invalid shape: column ${D} does not exist`);return E},[h,b]=r.map(D=>D.map(E=>c(E)));if(h.length===0)throw new Error("Invalid shape: empty key set");if(b.length===0)throw new Error("Invalid shape: empty value set");for(const D of h)for(const E of D)if(!_m(E))throw new Error(`Invalid key: ${E} in ${D}`);const w=o(h,yr(b));if(i)for(const D of s)for(const E of Object.keys(D))D[E]=D[E][0];return w};function Ee(n,e){const t=r=>{const s=(...i)=>i.reduce((o,a)=>o?o[a.toString()]??void 0:void 0,r);return Object.assign(s,{has:(...i)=>s(...i)!==void 0,get:(...i)=>s(...i),subMap:i=>t(r[i.toString()])})};return t(Mm(n,e))}function Uc(n){let e=null;return()=>(e||(e=n()),e)}function Rm(n){try{return n(),!1}catch{return!0}}function Wm(n,e,t){return n<e?e:n>t?t:n}var Pm=["int","uint","bytes","array","switch"],Ou="big",ao=6,vr=n=>typeof n=="number"||typeof n=="bigint",rs=n=>n instanceof Uint8Array,Lm=n=>vr(n)||rs(n),Ms=n=>Pm.includes(n==null?void 0:n.binary),Om=n=>Ms(n)||Array.isArray(n)&&n.every(Ms),Nm=n=>typeof(n==null?void 0:n.from)=="number",zm=n=>typeof(n==null?void 0:n.from)=="bigint",Hm=n=>Nm(n)||zm(n),ss=n=>rs(n==null?void 0:n.from),qm=n=>Hm(n)||ss(n),Nu=(n,e)=>{if(n!==e)throw new Error(`size mismatch: layout size: ${n}, data size: ${e}`);return e},Gr=n=>"layout"in n&&n.layout!==void 0,Ka=(n,e)=>"size"in n&&n.size!==void 0?Nu(n.size,e):e,ja=(n,e)=>{if(n!=e)throw new Error(`value mismatch: (constant) layout value: ${n}, data value: ${e}`)},$a=(n,e,t)=>{const r=(h,b)=>b===void 0?[0,h.length]:Array.isArray(b)?b:[b,h.length],[s,i]=r(n,t==null?void 0:t.customSlice),[o,a]=r(e,t==null?void 0:t.dataSlice),c=i-s;Nu(c,a-o);for(let h=0;h<n.length;++h)if(n[h+s]!==e[h+o])throw new Error(`binary data mismatch: layout value: ${n}, offset: ${s}, data value: ${e}, offset: ${o}`)};function zu(n,e){const t=e[n.idTag??"id"];return n.layouts.find(([r])=>(Array.isArray(r)?r[1]:r)==t)}function Hu(n){return fr(n,tn)}var tn=Symbol("staticCalc");function Km(n,e){const t=[],r=fr(n,e,t);if(r===null)throw new Error(`coding error: couldn't calculate layout size for layout ${n} with data ${e}`);return[r,t]}function ed(n,e,t){const r=s=>(t!==void 0&&t.push(s),s);switch(n.binary){case"int":case"uint":return n.size;case"bytes":{if("size"in n&&e===tn)return n.size;const s="lengthSize"in n?n.lengthSize|0:0;if(Gr(n)){const{custom:o}=n,a=fr(n.layout,o===void 0?e:typeof o.from=="function"?e!==tn?r(o.from(e)):tn:o.from,t);return a===null?"size"in n?n.size??null:null:s+Ka(n,a)}const{custom:i}=n;return rs(i)?s+i.length:ss(i)?s+i.from.length:e===tn?null:s+Ka(n,i!==void 0?r(i.from(e)).length:e.length)}case"array":{const s="length"in n?n.length:void 0;if(e===tn){if(s!==void 0){const o=fr(n.layout,tn,t);return o!==null?s*o:null}return null}let i=0;if(s!==void 0&&s!==e.length)throw new Error(`array length mismatch: layout length: ${s}, data length: ${e.length}`);"lengthSize"in n&&n.lengthSize!==void 0&&(i+=n.lengthSize);for(let o=0;o<e.length;++o){const a=fr(n.layout,e[o],t);if(a===null)return null;i+=a}return i}case"switch":{if(e!==tn){const[i,o]=zu(n,e),a=fr(o,e,t);return a!==null?n.idSize+a:null}let s=null;for(const[i,o]of n.layouts){const a=fr(o,tn,t);if(s===null)s=a;else if(a!==s)return null}return n.idSize+s}}}function fr(n,e,t){if(Ms(n))return ed(n,e,t);let r=0;for(const s of n){let i;if(e===tn)i=tn;else if(!("omit"in s)||!s.omit){if(!(s.name in e))throw new Error(`missing data for layout item: ${s.name}`);i=e[s.name]}const o=ed(s,i,t);if(o===null){if(e!==tn)throw new Error(`coding error: couldn't calculate size for layout item: ${s.name}`);return null}r+=o}return r}var fa=(n,e)=>{n.bytes.set(e,n.offset),n.offset+=e.length},td=n=>n.bytesConversions[n.position++];function kn(n,e,t){const[r,s]=Km(n,e),i={bytes:t??new Uint8Array(r),offset:0};if(Ei(n,e,i,{bytesConversions:s,position:0}),i.offset!==i.bytes.length)throw new Error(`encoded data is shorter than expected: ${i.bytes.length} > ${i.offset}`);return t?i.offset:i.bytes}var jm=2**(ao*8);function Ar(n,e,t,r=Ou,s=!1){if(!s&&n<0)throw new Error(`Value ${n} is negative but unsigned`);if(typeof n=="number"){if(!Number.isInteger(n))throw new Error(`Value ${n} is not an integer`);if(e>ao){if(n>=jm)throw new Error(`Value ${n} is too large to be safely converted into an integer`);if(s&&n<-281474976710656)throw new Error(`Value ${n} is too small to be safely converted into an integer`)}}const i=2n**BigInt(e*8-(s?1:0));if(n>=i)throw new Error(`Value ${n} is too large for ${e} bytes`);if(s&&n<-i)throw new Error(`Value ${n} is too small for ${e} bytes`);for(let o=0;o<e;++o)t.bytes[t.offset+o]=Number(BigInt(n)>>BigInt(8*(r==="big"?e-o-1:o))&0xffn);t.offset+=e}function Ei(n,e,t,r){if(Ms(n))nd(n,e,t,r);else for(const s of n)try{nd(s,e[s.name],t,r)}catch(i){throw i.message=`when serializing item '${s.name}': ${i.message}`,i}}function nd(n,e,t,r){switch(n.binary){case"int":case"uint":{const s=(()=>{var i;return vr(n.custom)?("omit"in n&&n.omit||ja(n.custom,e),n.custom):vr((i=n==null?void 0:n.custom)==null?void 0:i.from)?n.custom.from:n.custom!==void 0?n.custom.from(e):e})();Ar(s,n.size,t,n.endianness,n.binary==="int");break}case"bytes":{const s=t.offset;if("lengthSize"in n&&n.lengthSize!==void 0&&(t.offset+=n.lengthSize),Gr(n)){const{custom:i}=n;let o;i===void 0?o=e:typeof i.from!="function"?o=i.from:o=td(r),Ei(n.layout,o,t,r)}else{const{custom:i}=n;rs(i)?("omit"in n&&n.omit||$a(i,e),fa(t,i)):ss(i)?fa(t,i.from):fa(t,i!==void 0?td(r):e)}if("lengthSize"in n&&n.lengthSize!==void 0){const i=t.offset-s-n.lengthSize,o=t.offset;t.offset=s,Ar(i,n.lengthSize,t,n.lengthEndianness),t.offset=o}else Ka(n,t.offset-s);break}case"array":{if("length"in n&&n.length!==e.length)throw new Error(`array length mismatch: layout length: ${n.length}, data length: ${e.length}`);"lengthSize"in n&&n.lengthSize!==void 0&&Ar(e.length,n.lengthSize,t,n.lengthEndianness);for(let s=0;s<e.length;++s)Ei(n.layout,e[s],t,r);break}case"switch":{const[s,i]=zu(n,e),o=Array.isArray(s)?s[0]:s;Ar(o,n.idSize,t,n.idEndianness),Ei(i,e,t,r);break}}}function qu(n){const e=n.custom;if(!("cachedSerializedFrom"in e)&&(e.cachedSerializedFrom=kn(n.layout,e.from),"size"in n&&n.size!==void 0&&n.size!==e.cachedSerializedFrom.length))throw new Error("Layout specification error: custom.from does not serialize to specified size");return e.cachedSerializedFrom}function Fn(n,e,t){const r=t??!0,s={bytes:e,offset:0,end:e.length},i=Ss(n,s);if(r&&s.offset!==s.end)throw new Error(`encoded data is longer than expected: ${s.end} > ${s.offset}`);return r?i:[i,s.offset]}function Bi(n,e){const t=n.offset+e;if(t>n.end)throw new Error(`chunk is shorter than expected: ${n.end} < ${t}`);n.offset=t}function Ss(n,e){if(!Array.isArray(n))return rd(n,e);let t={};for(const r of n)try{(r.omit?{}:t)[r.name]=rd(r,e)}catch(s){throw s.message=`when deserializing item '${r.name}': ${s.message}`,s}return t}function fi(n,e,t=Ou,r=!1){let s=0n;for(let i=0;i<e;++i)s|=BigInt(n.bytes[n.offset+i])<<BigInt(8*(t==="big"?e-i-1:i));return r&&n.bytes[n.offset+(t==="big"?0:e-1)]&128&&(s-=1n<<BigInt(8*e)),Bi(n,e),e>ao?s:Number(s)}function rd(n,e){switch(n.binary){case"int":case"uint":{const t=fi(e,n.size,n.endianness,n.binary==="int"),{custom:r}=n;return vr(r)?(ja(r,t),r):vr(r==null?void 0:r.from)?(ja(r.from,t),r.to):r!==void 0?r.to(t):t}case"bytes":{const t="lengthSize"in n&&n.lengthSize!==void 0?fi(e,n.lengthSize,n.lengthEndianness):n==null?void 0:n.size;if(Gr(n)){const{custom:a}=n,c=e.offset;let h;if(t===void 0)h=Ss(n.layout,e);else{const b={...e,end:e.offset+t};if(Bi(e,t),h=Ss(n.layout,b),b.offset!==b.end)throw new Error(`read less data than expected: ${b.offset-e.offset} < ${t}`)}return a!==void 0?typeof a.from!="function"?($a(qu(n),e.bytes,{dataSlice:[c,e.offset]}),a.to):a.to(h):h}const{custom:r}=n;{let a,c;if(rs(r)?a=r:ss(r)&&(a=r.from,c=r.to),a!==void 0){const h=t??a.length,b=e.bytes.subarray(e.offset,e.offset+h);return $a(a,b),Bi(e,h),c??a}}const s=e.offset,i=t!==void 0?e.offset+t:e.end;Bi(e,i-s);const o=e.bytes.subarray(s,i);return r!==void 0?r.to(o):o}case"array":{let t=[];const{layout:r}=n,s=()=>{const o=Ss(r,e);t.push(o)};let i=null;if("length"in n&&n.length!==void 0?i=n.length:"lengthSize"in n&&n.lengthSize!==void 0&&(i=fi(e,n.lengthSize,n.lengthEndianness)),i!==null)for(let o=0;o<i;++o)s();else for(;e.offset<e.end;)s();return t}case"switch":{const t=fi(e,n.idSize,n.idEndianness),{layouts:r}=n;if(r.length===0)throw new Error("switch item has no layouts");const s=typeof r[0][0]=="number",i=r.find(([h])=>s?h===t:h[0]===t);if(i===void 0)throw new Error(`unknown id value: ${t}`);const[o,a]=i,c=Ss(a,e);return{[n.idTag??"id"]:s?t:o[1],...c}}}}function $m(n,e){return xi(n,e)}function sd(n,e){switch(n.binary){case"bytes":if(Gr(n)){const{custom:t}=n;return t===void 0||typeof t.from!="function"?xi(n.layout,t?t.from:e):e}case"int":case"uint":{const{custom:t}=n;return n!=null&&n.omit?void 0:Lm(t)?t:qm(t)?t.to:e}case"array":return Array.isArray(e)?e.map(t=>xi(n.layout,t)):void 0;case"switch":{const t=e[n.idTag??"id"],[r,s]=n.layouts.find(([i])=>(Array.isArray(i)?i[1]:i)==t);return{[n.idTag??"id"]:t,...xi(s,e)}}}}function xi(n,e){if(e=e??{},Ms(n))return sd(n,e);const t={};for(const r of n){const s=sd(r,e[r.name]??{});s!==void 0&&(t[r.name]=s)}return t}function Vm(n,e){const[t,r]=Ym(n);if(!t)throw new Error("Cannot uniquely distinguished the given layouts");return s=>{const i=r(s);return i.length===0?null:i[0]}}function Va(n){return n.reduce((e,t)=>e|BigInt(1)<<BigInt(t),BigInt(0))}function hi(n){const e=[];for(let t=0n;n>0n;n>>=1n,++t)n&1n&&e.push(Number(t));return e}function wt(n){let e=0;for(;n>0n;n>>=1n)e+=Number(n&1n);return e}var id=n=>n>0?2**(8*n)-1:1/0;function od(n,e,t){var r;switch(n.binary){case"int":case"uint":{const s=vr(n.custom)?n.custom:vr((r=n==null?void 0:n.custom)==null?void 0:r.from)?n.custom.from:null;if(s!==null&&e!==null){const i={bytes:new Uint8Array(n.size),offset:0};Ar(s,n.size,i,n.endianness,n.binary==="int"),t.push([e,i.bytes])}return[n.size,n.size]}case"bytes":{const s="lengthSize"in n?n.lengthSize|0:0;let i,o;if(Gr(n)){const{custom:c}=n;if(c!==void 0&&typeof c.from!="function")i=qu(n),o=i.length;else{const h=Hu(n.layout);h!==null&&(o=h)}}else{const{custom:c}=n;rs(c)?(i=c,o=c.length):ss(c)&&(i=c.from,o=c.from.length)}if(s>0&&e!==null){if(o!==void 0){const c={bytes:new Uint8Array(s),offset:0},h=n.lengthEndianness;Ar(o,s,c,h,!1),t.push([e,c.bytes])}e+=s}if(i!==void 0)return e!==null&&t.push([e,i]),[s+i.length,s+i.length];const a="size"in n&&n.size!==void 0?[n.size,n.size]:void 0;if(Gr(n)){const c=Ci(n.layout,e,t);return a??[s+c[0],s+c[1]]}return a??[s,id(s)]}case"array":{if("length"in n){let i=[];const o=Ci(n.layout,0,i);if(e!==null)if(o[0]!==o[1]){if(n.length>0)for(const[a,c]of i)t.push([e+a,c])}else for(let a=0;a<n.length;++a)for(const[c,h]of i)t.push([e+c+a*o[0],h]);return[n.length*o[0],n.length*o[1]]}const s=n.lengthSize|0;return[s,id(s)]}case"switch":{const s=n.layouts.map(c=>[]),{idSize:i,idEndianness:o}=n,a=n.layouts.map(([c,h],b)=>{const w=Array.isArray(c)?c[0]:c;if(e!==null){const E={bytes:new Uint8Array(i),offset:0};Ar(w,i,E,o),s[b].push([0,E.bytes])}const D=Ci(h,e!==null?i:null,s[b]);return[D[0]+i,D[1]+i]});return e!==null&&s.every(c=>c.length>0)&&(()=>{const c=Math.min(...s.map(b=>b.at(-1)[0]+b.at(-1)[1].length)),h=s.map(b=>0);for(let b=0;b<c;){let w=null,D=0;for(;D<s.length;){let E=h[D];const g=s[D],[S,T]=g[E];if(S+T.length<=b){if(++E,E===g.length)return;h[D]=E,b=g[E][0];break}const M=T[b-S];if(w===null&&(w=M),M!==w){++b;break}++D}D===s.length&&(t.push([e+b,new Uint8Array([w])]),++b)}})(),[Math.min(...a.map(([c])=>c)),Math.max(...a.map(([c,h])=>h))]}}}function Ci(n,e,t){if(!Array.isArray(n))return od(n,e,t);let r=[0,0];for(const s of n){const i=od(s,e,t);r[0]+=i[0],r[1]+=i[1],e!==null&&(e=i[0]===i[1]?e+i[0]:null)}return r}function Gm(n){const e=new Map;let t=[];const r=s=>{for(;t.length>0&&t[0][0]<s;){const i=t[0][0]+1,o=t.findIndex(([a])=>i<=a);o===-1?t=[]:t.splice(0,o),e.set(i,Va(t.map(([,a])=>a)))}};for(const[[s,i],o]of n){r(s);const a=t.findIndex(([c])=>c>i);a===-1?t.push([i,o]):t.splice(a,0,[i,o]),e.set(s,Va(t.map(([,c])=>c)))}return r(1/0),e}function Ym(n){if(n.length===0)throw new Error("Cannot discriminate empty set of layouts");const e=0n,t=(1n<<BigInt(n.length))-1n,r=n.map(()=>[]),s=n.map((_,U)=>Ci(_,0,r[U])),i=s.map((_,U)=>[_,U]).sort(([[_]],[[U]])=>_-U),o=(()=>{let _=t;const U=new Map;for(const[[L],H]of i)_^=1n<<BigInt(H),U.set(L,_);return U})(),a=Gm(i),c=n.length-Math.max(...[...a.values()].map(_=>wt(_))),h=_=>{let U=t;for(const[L,H]of o){if(_<L)break;U=H}return U},b=_=>{let U=e;for(const[L,H]of a){if(_<L)break;U=H}return U},w=Array.from({length:Math.max(...r.map(_=>_.length>0?_.at(-1)[0]+_.at(-1)[1].length:0))}).map(()=>[]);for(let _=0;_<r.length;++_)for(const[U,L]of r[_])for(let H=0;H<L.length;++H)w[U+H].push([L[H],_]);let D=[];for(const[_,U]of w.entries()){const L=h(_),H=L^Va(U.map(([,re])=>re)),K=t^L,V=new Map;for(const[re,$]of U)V.has(re)||V.set(re,e),V.set(re,V.get(re)|1n<<BigInt($));let ee=n.length-Math.max(wt(H),wt(K));for(const re of V.values()){const $=U.length-wt(re)+wt(K);ee=Math.min(ee,$)}if(ee!==0){if(ee===n.length-1)return[!0,re=>hi(re.length<=_?K:V.get(re[_])??e)];D.push([ee,_,K,V,H])}}if(c===n.length-1)return[!0,_=>hi(b(_.length))];D.sort(([_],[U])=>U-_);let E=!0;const g=new Map,S=new Map,T=(_,U)=>{g.set(_,U),S.has(wt(_))||S.set(wt(_),[]),S.get(wt(_)).push(_)},M=(_,U)=>{if(wt(_)<=1||g.has(_))return;let L=0;const H=new Map;for(const V of hi(_)){const ee=s[V][0],re=a.get(ee)&_;H.set(ee,re),L=Math.max(L,wt(re))}L=wt(_)-L;const K=[];for(const[V,ee,re,$,ie]of U){const F=new Map;let l=0;for(const[C,B]of $){const x=B&_;wt(x)>0&&(F.set(C,x),l+=wt(x))}const m=re&_;let p=F.size>0?V:0;for(const C of F.values()){const B=l-wt(C)+wt(m);p=Math.min(p,B)}if(p!==0){if(p===wt(_)-1){T(_,[ee,m,F]);return}K.push([p,ee,m,F,ie&_])}}if(L===wt(_)-1){T(_,"size");return}if(K.sort(([V],[ee])=>ee-V),K.length>0&&K[0][0]>=L){const[,V,ee,re,$]=K[0];T(_,[V,ee,re]),M(ee,K);for(const ie of re.values())M(ie|$,K.slice(1));return}if(L>0){T(_,"size");for(const V of H.values())M(V,K);return}T(_,"indistinguishable"),E=!1};M(t,D);const N=_=>{for(let U=wt(_)+1;U<n.length-2;++U)for(const L of S.get(U)??[])if((_&L)==_)return g.get(L);throw new Error("Implementation error in layout discrimination algorithm")};return[E,_=>{let U=t,L=g.get(U);for(;L!=="indistinguishable";){if(L==="size")U&=b(_.length);else{const[H,K,V]=L;if(_.length<=H)U&=K;else{const ee=_[H];for(const[re,$]of V)re!==ee&&(U^=U&$);U^=U&K}}if(wt(U)<=1)break;L=g.get(U)??N(U)}return hi(U)}]}var co=(n,e)=>({...n,binary:"bytes",...e===void 0?{}:Om(e)?{layout:e}:e instanceof Uint8Array||ss(e)||!Array.isArray(e)?{custom:e}:{layout:e[0],custom:e[1]}});function Xm(n,e){const t=Object.fromEntries(n.map(([s,i])=>[i,s])),r=Object.fromEntries(n);return{binary:"uint",size:(e==null?void 0:e.size)??1,endianness:(e==null?void 0:e.endianness)??"big",custom:{to:s=>{const i=t[s];if(i===void 0)throw new Error(`Invalid enum value: ${s}`);return i},from:s=>r[s]}}}function Zm(n,e){return{binary:"uint",size:Math.ceil(n.length/8),custom:{to:t=>{const r={};for(let s=0;s<n.length;++s)n[s]&&(r[n[s]]=(BigInt(t)&1n<<BigInt(s))!==0n);return r},from:t=>{let r=0n;for(let s=0;s<n.length;++s)n[s]&&t[n[s]]&&(r|=1n<<BigInt(s));return n.length>ao?r:Number(r)}}}}function Jm(n,e){return Number(Number(n).toFixed(e))}function Si(n,e){if(Qm(n,e),n=n.toString(),n.includes("e"))throw new Error("Scientific notation is not supported yet by Amount");const t=n.split(".");if(t.length>2)throw"Too many decimals";let[r,s]=t.length===0?["0",""]:t.length===1?[t[0],""]:t;if(s=s.padEnd(e,"0"),s.length>e){if(BigInt(s.substring(e))!==0n)throw new Error("Amount: invalid input. Decimals too low.");s=s.substring(0,e)}return{amount:BigInt(r+s).toString(),decimals:e}}function Di(n,e){if(n.decimals<=e)return n;const t=BigInt(n.decimals-e);return{amount:(wn(n)/10n**t*10n**t).toString(),decimals:n.decimals}}function ks(n,e){if(n.decimals===e)return n;if(n.amount==="0")return{amount:n.amount,decimals:e};const t=e-n.decimals;if(t>0)return{amount:n.amount+"0".repeat(t),decimals:e};if(BigInt(n.amount.substring(n.amount.length+t))===0n)return{amount:n.amount.substring(0,n.amount.length+t),decimals:e};throw new Error(`scaleAmount(${JSON.stringify(n)}, ${e}) would result in altered amount. Use truncateAmount first if you intended to truncate it.`)}function Vr(n,e){return{amount:n.toString(),decimals:e}}function wn(n){return Ku(n),BigInt(n.amount)}function _c(n,e){Ku(n);let t=n.amount.substring(0,n.amount.length-n.decimals).padStart(1,"0"),r=n.amount.substring(n.amount.length-n.decimals).padStart(n.decimals,"0");if(e!==void 0){for(;r.length>e&&r[r.length-1]==="0";)r=r.substring(0,r.length-1);r=r.padEnd(e,"0")}else r=r.replace(/0+$/,"");return r.length>0?`${t}.${r}`:t}function Fs(n){return Number(_c(n))}function ad(n,e){return _c(Vr(n,e))}function Qm(n,e){if(typeof n=="number"){if(!isFinite(n))throw new Error("Amount: invalid input. Amount must be finite");if(n<0)throw new Error("Amount: invalid input. Amount cannot be negative")}else if(!/^[0-9\.]*$/.test(n))throw new Error("Amount: invalid input. Must only contain digits.");if(!isFinite(e))throw new Error("Amount: invalid input. Decimals must be finite")}function Ku(n){if(!/^[0-9]*$/.test(n.amount))throw new Error("Amount: invalid input. Must only contain digits.");if(n.decimals<0)throw new Error("Amount: invalid input. Decimals must be >= 0");if(!isFinite(n.decimals))throw new Error("Amount: invalid input. Decimals must be a finite number.")}const Rs=(n=0,e=0,t=0)=>new Date(Date.now()+(n*60*60+e*60+t)*1e3);/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Yr(n){return n instanceof Uint8Array||ArrayBuffer.isView(n)&&n.constructor.name==="Uint8Array"}function e1(n,...e){if(!Yr(n))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(n.length))throw new Error("Uint8Array expected of length "+e+", got length="+n.length)}function ju(n,e){return Array.isArray(e)?e.length===0?!0:n?e.every(t=>typeof t=="string"):e.every(t=>Number.isSafeInteger(t)):!1}function $u(n){if(typeof n!="function")throw new Error("function expected");return!0}function kr(n,e){if(typeof e!="string")throw new Error(`${n}: string expected`);return!0}function is(n){if(!Number.isSafeInteger(n))throw new Error(`invalid integer: ${n}`)}function Li(n){if(!Array.isArray(n))throw new Error("array expected")}function Oi(n,e){if(!ju(!0,e))throw new Error(`${n}: array of strings expected`)}function Mc(n,e){if(!ju(!1,e))throw new Error(`${n}: array of numbers expected`)}function Zs(...n){const e=i=>i,t=(i,o)=>a=>i(o(a)),r=n.map(i=>i.encode).reduceRight(t,e),s=n.map(i=>i.decode).reduce(t,e);return{encode:r,decode:s}}function lo(n){const e=typeof n=="string"?n.split(""):n,t=e.length;Oi("alphabet",e);const r=new Map(e.map((s,i)=>[s,i]));return{encode:s=>(Li(s),s.map(i=>{if(!Number.isSafeInteger(i)||i<0||i>=t)throw new Error(`alphabet.encode: digit index outside alphabet "${i}". Allowed: ${n}`);return e[i]})),decode:s=>(Li(s),s.map(i=>{kr("alphabet.decode",i);const o=r.get(i);if(o===void 0)throw new Error(`Unknown letter: "${i}". Allowed: ${n}`);return o}))}}function uo(n=""){return kr("join",n),{encode:e=>(Oi("join.decode",e),e.join(n)),decode:e=>(kr("join.decode",e),e.split(n))}}function t1(n,e="="){return is(n),kr("padding",e),{encode(t){for(Oi("padding.encode",t);t.length*n%8;)t.push(e);return t},decode(t){Oi("padding.decode",t);let r=t.length;if(r*n%8)throw new Error("padding: invalid, string should have whole number of bytes");for(;r>0&&t[r-1]===e;r--)if((r-1)*n%8===0)throw new Error("padding: invalid, string has too much padding");return t.slice(0,r)}}}function cd(n,e,t){if(e<2)throw new Error(`convertRadix: invalid from=${e}, base cannot be less than 2`);if(t<2)throw new Error(`convertRadix: invalid to=${t}, base cannot be less than 2`);if(Li(n),!n.length)return[];let r=0;const s=[],i=Array.from(n,a=>{if(is(a),a<0||a>=e)throw new Error(`invalid integer: ${a}`);return a}),o=i.length;for(;;){let a=0,c=!0;for(let h=r;h<o;h++){const b=i[h],w=e*a,D=w+b;if(!Number.isSafeInteger(D)||w/e!==a||D-b!==w)throw new Error("convertRadix: carry overflow");const E=D/t;a=D%t;const g=Math.floor(E);if(i[h]=g,!Number.isSafeInteger(g)||g*t+a!==D)throw new Error("convertRadix: carry overflow");if(c)g?c=!1:r=h;else continue}if(s.push(a),c)break}for(let a=0;a<n.length-1&&n[a]===0;a++)s.push(0);return s.reverse()}const Vu=(n,e)=>e===0?n:Vu(e,n%e),Ni=(n,e)=>n+(e-Vu(n,e)),vi=(()=>{let n=[];for(let e=0;e<40;e++)n.push(2**e);return n})();function Ga(n,e,t,r){if(Li(n),e<=0||e>32)throw new Error(`convertRadix2: wrong from=${e}`);if(t<=0||t>32)throw new Error(`convertRadix2: wrong to=${t}`);if(Ni(e,t)>32)throw new Error(`convertRadix2: carry overflow from=${e} to=${t} carryBits=${Ni(e,t)}`);let s=0,i=0;const o=vi[e],a=vi[t]-1,c=[];for(const h of n){if(is(h),h>=o)throw new Error(`convertRadix2: invalid data word=${h} from=${e}`);if(s=s<<e|h,i+e>32)throw new Error(`convertRadix2: carry overflow pos=${i} from=${e}`);for(i+=e;i>=t;i-=t)c.push((s>>i-t&a)>>>0);const b=vi[i];if(b===void 0)throw new Error("invalid carry");s&=b-1}if(s=s<<t-i&a,!r&&i>=e)throw new Error("Excess padding");if(!r&&s>0)throw new Error(`Non-zero padding: ${s}`);return r&&i>0&&c.push(s>>>0),c}function n1(n){is(n);const e=2**8;return{encode:t=>{if(!Yr(t))throw new Error("radix.encode input should be Uint8Array");return cd(Array.from(t),e,n)},decode:t=>(Mc("radix.decode",t),Uint8Array.from(cd(t,n,e)))}}function Rc(n,e=!1){if(is(n),n<=0||n>32)throw new Error("radix2: bits should be in (0..32]");if(Ni(8,n)>32||Ni(n,8)>32)throw new Error("radix2: carry overflow");return{encode:t=>{if(!Yr(t))throw new Error("radix2.encode input should be Uint8Array");return Ga(Array.from(t),8,n,!e)},decode:t=>(Mc("radix2.decode",t),Uint8Array.from(Ga(t,n,8,e)))}}function ld(n){return $u(n),function(...e){try{return n.apply(null,e)}catch{}}}function r1(n,e){return is(n),$u(e),{encode(t){if(!Yr(t))throw new Error("checksum.encode: input should be Uint8Array");const r=e(t).slice(0,n),s=new Uint8Array(t.length+n);return s.set(t),s.set(r,t.length),s},decode(t){if(!Yr(t))throw new Error("checksum.decode: input should be Uint8Array");const r=t.slice(0,-n),s=t.slice(-n),i=e(r).slice(0,n);for(let o=0;o<n;o++)if(i[o]!==s[o])throw new Error("Invalid checksum");return r}}}const dd=Zs(Rc(4),lo("0123456789ABCDEF"),uo("")),s1=typeof Uint8Array.from([]).toBase64=="function"&&typeof Uint8Array.fromBase64=="function",ud=s1?{encode(n){return e1(n),n.toBase64()},decode(n){return kr("base64",n),Uint8Array.fromBase64(n,{lastChunkHandling:"strict"})}}:Zs(Rc(6),lo("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),t1(6),uo("")),i1=n=>Zs(n1(58),lo(n),uo("")),Ya=i1("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),o1=n=>Zs(r1(4,e=>n(n(e))),Ya),Xa=Zs(lo("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),uo("")),fd=[996825010,642813549,513874426,1027748829,705979059];function ws(n){const e=n>>25;let t=(n&33554431)<<5;for(let r=0;r<fd.length;r++)(e>>r&1)===1&&(t^=fd[r]);return t}function hd(n,e,t=1){const r=n.length;let s=1;for(let i=0;i<r;i++){const o=n.charCodeAt(i);if(o<33||o>126)throw new Error(`Invalid prefix (${n})`);s=ws(s)^o>>5}s=ws(s);for(let i=0;i<r;i++)s=ws(s)^n.charCodeAt(i)&31;for(let i of e)s=ws(s)^i;for(let i=0;i<6;i++)s=ws(s);return s^=t,Xa.encode(Ga([s%vi[30]],30,5,!1))}function a1(n){const e=n==="bech32"?1:734539939,t=Rc(5),r=t.decode,s=t.encode,i=ld(r);function o(w,D,E=90){kr("bech32.encode prefix",w),Yr(D)&&(D=Array.from(D)),Mc("bech32.encode",D);const g=w.length;if(g===0)throw new TypeError(`Invalid prefix length ${g}`);const S=g+7+D.length;if(E!==!1&&S>E)throw new TypeError(`Length ${S} exceeds limit ${E}`);const T=w.toLowerCase(),M=hd(T,D,e);return`${T}1${Xa.encode(D)}${M}`}function a(w,D=90){kr("bech32.decode input",w);const E=w.length;if(E<8||D!==!1&&E>D)throw new TypeError(`invalid string length: ${E} (${w}). Expected (8..${D})`);const g=w.toLowerCase();if(w!==g&&w!==w.toUpperCase())throw new Error("String must be lowercase or uppercase");const S=g.lastIndexOf("1");if(S===0||S===-1)throw new Error('Letter "1" must be present between prefix and data only');const T=g.slice(0,S),M=g.slice(S+1);if(M.length<6)throw new Error("Data must be at least 6 characters long");const N=Xa.decode(M).slice(0,-6),_=hd(T,N,e);if(!M.endsWith(_))throw new Error(`Invalid checksum in ${w}: expected "${_}"`);return{prefix:T,words:N}}const c=ld(a);function h(w){const{prefix:D,words:E}=a(w,!1);return{prefix:D,words:E,bytes:r(E)}}function b(w,D){return o(w,s(D))}return{encode:o,decode:a,encodeFromBytes:b,decodeToBytes:h,decodeUnsafe:c,fromWords:r,fromWordsUnsafe:i,toWords:s}}const Gu=a1("bech32"),Yu=(n,e)=>e.startsWith(n)?e.slice(n.length):e,c1=/^(?:0x)?[0-9a-fA-F]+$/,Tt={valid:n=>c1.test(n),decode:n=>dd.decode(Yu("0x",n).toUpperCase()),encode:(n,e=!1)=>(n=typeof n=="string"?Nt.encode(n):n,(e?"0x":"")+dd.encode(n).toLowerCase())},l1=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,fo={valid:n=>l1.test(n),decode:ud.decode,encode:n=>ud.encode(typeof n=="string"?Nt.encode(n):n)},Xu={decode:Ya.decode,encode:n=>Ya.encode(typeof n=="string"?Nt.encode(n):n)},Ts={decode:n=>(typeof n!="string"&&(n=Tt.encode(n,!0)),n===""||n==="0x"?0n:BigInt(n)),encode:(n,e=!1)=>Ts.toString(n,e),toString:(n,e=!1)=>{let t=n.toString(16);return t=t.length%2===1?t="0"+t:t,e?"0x"+t:t},toBytes:(n,e)=>{typeof n=="number"&&(n=Ts.toBigInt(n));const t=Tt.decode(Ts.toString(n));if(!e)return t;if(e<t.length)throw new Error(`Can't fit ${n} into ${e} bytes.`);return Nt.zpad(t,e)},toNumber:n=>{if(n>BigInt(Number.MAX_SAFE_INTEGER))throw new Error(`Invalid cast: ${n} exceeds MAX_SAFE_INTEGER`);return Number(n)},toBigInt:n=>{if(n>Number.MAX_SAFE_INTEGER)throw new Error(`Invalid cast: ${n} exceeds MAX_SAFE_INTEGER`);return BigInt(n)}},Nt={encode:n=>new TextEncoder().encode(n),decode:n=>new TextDecoder().decode(n),equals:(n,e)=>n.length===e.length&&n.every((t,r)=>t===e[r]),zpad:(n,e,t=!0)=>t?Nt.concat(new Uint8Array(e-n.length),n):Nt.concat(n,new Uint8Array(e-n.length)),concat:(...n)=>{const e=n.reduce((s,i)=>s+i.length,0),t=new Uint8Array(e);let r=0;return n.forEach(s=>{t.set(s,r),r+=s.length}),t}},Wc=[[1,"Solana"],[2,"Ethereum"],[3,"Terra"],[4,"Bsc"],[5,"Polygon"],[6,"Avalanche"],[7,"Oasis"],[8,"Algorand"],[9,"Aurora"],[10,"Fantom"],[11,"Karura"],[12,"Acala"],[13,"Klaytn"],[14,"Celo"],[15,"Near"],[16,"Moonbeam"],[17,"Neon"],[18,"Terra2"],[19,"Injective"],[20,"Osmosis"],[21,"Sui"],[22,"Aptos"],[23,"Arbitrum"],[24,"Optimism"],[25,"Gnosis"],[26,"Pythnet"],[28,"Xpla"],[29,"Btc"],[30,"Base"],[32,"Sei"],[34,"Scroll"],[35,"Mantle"],[36,"Blast"],[37,"Xlayer"],[38,"Linea"],[39,"Berachain"],[40,"Seievm"],[43,"Snaxchain"],[44,"Unichain"],[45,"Worldchain"],[46,"Ink"],[47,"HyperEVM"],[48,"Monad"],[50,"Mezo"],[52,"Sonic"],[3104,"Wormchain"],[4e3,"Cosmoshub"],[4001,"Evmos"],[4002,"Kujira"],[4003,"Neutron"],[4004,"Celestia"],[4005,"Stargaze"],[4006,"Seda"],[4007,"Dymension"],[4008,"Provenance"],[4009,"Noble"],[10002,"Sepolia"],[10003,"ArbitrumSepolia"],[10004,"BaseSepolia"],[10005,"OptimismSepolia"],[10006,"Holesky"],[10007,"PolygonSepolia"]],[N6,Zu]=yr(Wc),Js=Ee(Wc,[1,0]),zi=Ee(Wc),ho=n=>Js.has(n),Za=n=>zi.has(n),Qs=n=>{switch(typeof n){case"string":if(ho(n))return Js(n);break;case"number":if(Za(n))return n;break}throw Error(`Cannot convert to ChainId: ${n}`)},os=n=>{switch(typeof n){case"string":if(ho(n))return n;break;case"number":if(Za(n))return zi(n);break;case"bigint":if(Za(Number(n)))return zi.get(Number(n));break}throw Error(`Cannot convert to Chain: ${n}`)},Pc=[["Evm",["Acala","Arbitrum","Aurora","Avalanche","Base","Bsc","Celo","Ethereum","Fantom","Gnosis","Karura","Klaytn","Moonbeam","Neon","Oasis","Optimism","Polygon","Sepolia","ArbitrumSepolia","BaseSepolia","OptimismSepolia","Holesky","PolygonSepolia","Mantle","Scroll","Blast","Xlayer","Linea","Berachain","Seievm","Snaxchain","Unichain","Worldchain","Ink","HyperEVM","Monad","Mezo","Sonic"]],["Solana",["Solana","Pythnet"]],["Cosmwasm",["Cosmoshub","Evmos","Injective","Kujira","Osmosis","Sei","Terra","Terra2","Wormchain","Xpla","Dymension","Neutron","Stargaze","Celestia","Seda","Provenance","Noble"]],["Btc",["Btc"]],["Algorand",["Algorand"]],["Sui",["Sui"]],["Aptos",["Aptos"]],["Near",["Near"]]];Lu(Pc,0);const Ju=Ee(Pc),as=Ee(Pc,[1,0]),d1=[["Evm","hex"],["Solana","base58"],["Cosmwasm","bech32"],["Btc","bech32"],["Algorand","algorandAppId"],["Sui","hex"],["Aptos","hex"],["Near","sha256"]],u1=Ee(d1),cs={byAddress:(n,e)=>Object.values(n).find(t=>Qu(t.address,e)),native:n=>cs.byAddress(n,"native"),bySymbol:(n,e)=>{const t=Object.values(n).filter(r=>r.symbol===e);return t&&t.length>0?t:void 0},byKey:(n,e)=>{const t=Object.entries(n).find(([r])=>e===r);return t?t[1]:void 0}},Qu=(n,e)=>n.toLowerCase()===e.toLowerCase();var md;(function(n){n[n.Finalized=1]="Finalized",n[n.Immediate=200]="Immediate",n[n.Safe=201]="Safe"})(md||(md={}));const f1=[["Ethereum",32]];Ee(f1);const h1=[["Solana",32],["Ethereum",72],["Bsc",15],["Optimism",512],["Base",512],["Arbitrum",4096],["Blast",512],["Xlayer",300],["Scroll",300],["Mantle",512],["Worldchain",512],["Polygon",32],["Fantom",1],["Celo",1],["Moonbeam",1],["Karura",1],["Acala",1],["Oasis",1],["Avalanche",0],["Sui",0],["Algorand",0],["Aptos",0],["Klaytn",0],["Sei",0],["Near",0],["Osmosis",0],["Terra",0],["Terra2",0],["Xpla",0],["Injective",0],["Berachain",1],["Seievm",1],["Snaxchain",512],["Unichain",1024],["Ink",512],["HyperEVM",1],["Monad",1],["Mezo",1],["Sonic",1],["Cosmoshub",0],["Evmos",0],["Kujira",0],["Neutron",0],["Celestia",0],["Stargaze",0],["Dymension",0],["Provenance",0],["Noble",0],["Sepolia",72],["ArbitrumSepolia",4096],["BaseSepolia",512],["OptimismSepolia",512],["PolygonSepolia",32]],ef=Ee(h1),m1=[["Acala",12e3],["Algorand",3300],["Aptos",4e3],["Arbitrum",260],["ArbitrumSepolia",260],["Aurora",3e3],["Avalanche",2e3],["Base",2e3],["BaseSepolia",2e3],["Blast",2e3],["Bsc",3e3],["Celo",5e3],["Cosmoshub",5e3],["Ethereum",15e3],["Evmos",2e3],["Fantom",2500],["Gnosis",5e3],["Holesky",15e3],["Injective",2500],["Karura",12e3],["Klaytn",1e3],["Kujira",3e3],["Mantle",2e3],["Moonbeam",12e3],["Monad",1e3],["Near",1500],["Neon",3e4],["Oasis",6e3],["Optimism",2e3],["OptimismSepolia",2e3],["Osmosis",6e3],["Polygon",2e3],["PolygonSepolia",2e3],["Scroll",3e3],["Sei",400],["Sepolia",15e3],["Solana",400],["Sui",3e3],["Terra",6e3],["Terra2",6e3],["Unichain",1e3],["Xpla",5e3],["Xlayer",3e3],["Worldchain",2e3],["Ink",1e3],["Wormchain",5e3],["Btc",6e5],["Pythnet",400],["Dymension",5e3],["Celestia",5e3],["Neutron",5e3],["Stargaze",5e3],["Seda",7500],["Berachain",2e3],["Mezo",4e3],["Sonic",330]],tf=Ee(m1);function Lc(n){const e=ef.get(n);if(e===void 0)throw new Error("Cannot find finality for "+n);const t=tf.get(n);if(t===void 0)throw new Error("Cannot find block time for "+n);return e*t}const b1=[["Evm",18],["Solana",9],["Sui",9],["Aptos",8],["Cosmwasm",6],["Algorand",6],["Btc",8],["Near",12]],nf=Ee(b1),p1=[["Mainnet",[["Ethereum",{name:"Etherscan",baseUrl:"https://etherscan.io/",endpoints:{tx:"tx/",account:"address/"}}],["Solana",{name:"Solana Explorer",baseUrl:"https://explorer.solana.com/",endpoints:{tx:"tx/",account:"address/"}}],["Polygon",{name:"PolygonScan",baseUrl:"https://polygonscan.com/",endpoints:{tx:"tx/",account:"address/"}}],["Bsc",{name:"BscScan",baseUrl:"https://bscscan.com/",endpoints:{tx:"tx/",account:"address/"}}],["Avalanche",{name:"Snowtrace",baseUrl:"https://snowtrace.io/",endpoints:{tx:"tx/",account:"address/"}}],["Fantom",{name:"FTMscan",baseUrl:"https://ftmscan.com/",endpoints:{tx:"tx/",account:"address/"}}],["Celo",{name:"Celo Explorer",baseUrl:"https://explorer.celo.org/mainnet/",endpoints:{tx:"tx/",account:"address/"}}],["Moonbeam",{name:"Moonscan",baseUrl:"https://moonscan.io/",endpoints:{tx:"tx/",account:"address/"}}],["Sui",{name:"Sui Explorer",baseUrl:"https://explorer.sui.io/",endpoints:{tx:"txblock/",account:"address/"}}],["Aptos",{name:"Aptos Explorer",baseUrl:"https://explorer.aptoslabs.com/",endpoints:{tx:"txn/",account:"account/"}}],["Sei",{name:"Sei Explorer",baseUrl:"https://sei.explorers.guru/",endpoints:{tx:"transaction/",account:"address/"}}],["Karura",{name:"Karura Explorer",baseUrl:"https://blockscout.karura.network/",endpoints:{tx:"tx/",account:"address/"}}],["Acala",{name:"Acala Explorer",baseUrl:"https://blockscout.acala.network/",endpoints:{tx:"tx/",account:"address/"}}]]],["Testnet",[["Ethereum",{name:"Etherscan",baseUrl:"https://goerli.etherscan.io/",endpoints:{tx:"tx/",account:"address/"}}],["Polygon",{name:"PolygonScan",baseUrl:"https://mumbai.polygonscan.com/",endpoints:{tx:"tx/",account:"address/"}}],["Bsc",{name:"BscScan",baseUrl:"https://testnet.bscscan.com/",endpoints:{tx:"tx/",account:"address/"}}],["Avalanche",{name:"Snowtrace",baseUrl:"https://testnet.snowtrace.io/",endpoints:{tx:"tx/",account:"address/"}}],["Fantom",{name:"FTMscan",baseUrl:"https://testnet.ftmscan.com/",endpoints:{tx:"tx/",account:"address/"}}],["Celo",{name:"Celo Explorer",baseUrl:"https://explorer.celo.org/alfajores/",endpoints:{tx:"tx/",account:"address/"}}],["Moonbeam",{name:"Moonscan",baseUrl:"https://moonbase.moonscan.io/",endpoints:{tx:"tx/",account:"address/"}}],["Solana",{name:"Solana Explorer",baseUrl:"https://explorer.solana.com/",endpoints:{tx:"tx/",account:"address/"},networkQuery:{default:"Devnet",Testnet:"?cluster=testnet",Devnet:"?cluster=devnet"}}],["Sui",{name:"Sui Explorer",baseUrl:"https://explorer.sui.io/",endpoints:{tx:"txblock/",account:"address/"},networkQuery:{default:"Testnet",Testnet:"?network=testnet",Devnet:"?network=devnet"}}],["Aptos",{name:"Aptos Explorer",baseUrl:"https://explorer.aptoslabs.com/",endpoints:{tx:"txn/",account:"account/"},networkQuery:{default:"Testnet",Testnet:"?network=testnet",Devnet:"?network=devnet"}}],["Sei",{name:"Sei Explorer",baseUrl:"https://sei.explorers.guru/",endpoints:{tx:"transaction/",account:"address/"}}],["Karura",{name:"Karura Explorer",baseUrl:"https://blockscout.karura-testnet.aca-staging.network/",endpoints:{tx:"tx/",account:"address/"}}],["Acala",{name:"Acala Explorer",baseUrl:"https://blockscout.acala-dev.aca-dev.network/",endpoints:{tx:"tx/",account:"address/"}}]]]],g1=Ee(p1),y1=(n,e)=>n==="Devnet"?void 0:g1.get(n,e),A1=[["Mainnet",[["Ethereum","https://ethereum-rpc.publicnode.com"],["Solana","https://api.mainnet-beta.solana.com"],["Polygon","https://polygon-bor-rpc.publicnode.com"],["Bsc","https://bsc-rpc.publicnode.com"],["Avalanche","https://avalanche-c-chain-rpc.publicnode.com"],["Fantom","https://rpcapi.fantom.network"],["Celo","https://celo-rpc.publicnode.com"],["Moonbeam","https://moonbeam-rpc.publicnode.com"],["Sui","https://rpc.mainnet.sui.io"],["Aptos","https://fullnode.mainnet.aptoslabs.com/v1"],["Arbitrum","https://arb1.arbitrum.io/rpc"],["Optimism","https://mainnet.optimism.io"],["Base","https://mainnet.base.org"],["Osmosis","https://osmosis-rpc.polkachu.com"],["Cosmoshub","https://cosmos-rpc.publicnode.com:443"],["Evmos","https://evmos-rpc.polkachu.com"],["Injective","https://sentry.tm.injective.network"],["Wormchain","https://wormchain-rpc.quickapi.com"],["Xpla","https://dimension-rpc.xpla.dev"],["Sei","https://sei-rpc.polkachu.com/"],["Algorand","https://mainnet-api.algonode.cloud"],["Terra","https://terra-classic-rpc.publicnode.com"],["Terra2","https://terra-rpc.polkachu.com"],["Karura","https://eth-rpc-karura.aca-api.network"],["Acala","https://eth-rpc-acala.aca-api.network"],["Oasis","https://emerald.oasis.dev"],["Dymension","https://dymension-rpc.polkachu.com/"],["Stargaze","https://stargaze-rpc.polkachu.com/"],["Celestia","https://celestia-rpc.polkachu.com/"],["Neutron","https://neutron-rpc.polkachu.com/"],["Blast","https://rpc.blast.io"],["Provenance","https://rpc.provenance.io/"],["Noble","https://noble-rpc.polkachu.com/"],["Linea","https://rpc.linea.build"],["Scroll","https://scroll-rpc.publicnode.com"],["Xlayer","https://xlayerrpc.okx.com/"],["Gnosis","https://gnosis-rpc.publicnode.com"],["Mantle","https://rpc.mantle.xyz"],["Klaytn","https://public-en.node.kaia.io"],["Snaxchain","https://mainnet.snaxchain.io"],["Berachain","https://rpc.berachain.com"],["Unichain","https://mainnet.unichain.org"],["Worldchain","https://worldchain-mainnet.g.alchemy.com/public"],["Ink","https://rpc-qnd.inkonchain.com"],["Sonic","https://rpc.soniclabs.com"]]],["Testnet",[["Bsc","https://data-seed-prebsc-1-s3.binance.org:8545"],["Avalanche","https://api.avax-test.network/ext/bc/C/rpc"],["Fantom","https://rpc.testnet.fantom.network"],["Celo","https://alfajores-forno.celo-testnet.org"],["Solana","https://api.devnet.solana.com"],["Oasis","https://testnet.emerald.oasis.io"],["Moonbeam","https://rpc.api.moonbase.moonbeam.network"],["Sui","https://fullnode.testnet.sui.io"],["Aptos","https://fullnode.testnet.aptoslabs.com/v1"],["Sei","https://sei-testnet-rpc.polkachu.com"],["Injective","https://testnet.sentry.tm.injective.network"],["Osmosis","https://rpc.testnet.osmosis.zone"],["Cosmoshub","https://rpc.sentry-02.theta-testnet.polypore.xyz"],["Evmos","https://evmos-testnet-rpc.polkachu.com"],["Wormchain","https://gateway.testnet.xlabs.xyz/"],["Xpla","https://cube-rpc.xpla.dev"],["Sepolia","https://ethereum-sepolia.publicnode.com"],["Algorand","https://testnet-api.algonode.cloud"],["Terra","https://bombay.stakesystems.io"],["Terra2","https://terra-testnet-rpc.polkachu.com"],["ArbitrumSepolia","https://sepolia-rollup.arbitrum.io/rpc"],["OptimismSepolia","https://sepolia.optimism.io"],["BaseSepolia","https://sepolia.base.org"],["PolygonSepolia","https://rpc-amoy.polygon.technology/"],["Mantle","https://rpc.testnet.mantle.xyz"],["Karura","https://eth-rpc-karura-testnet.aca-staging.network"],["Acala","https://eth-rpc-acala-testnet.aca-staging.network"],["Blast","https://sepolia.blast.io"],["Berachain","https://bepolia.rpc.berachain.com/"],["Seievm","https://evm-rpc-testnet.sei-apis.com/"],["Linea","https://rpc.sepolia.linea.build"],["Xlayer","https://testrpc.xlayer.tech/"],["Scroll","https://scroll-sepolia-rpc.publicnode.com"],["Gnosis","https://rpc.chiadochain.net"],["Klaytn","https://public-en-kairos.node.kaia.io"],["Snaxchain","https://testnet.snaxchain.io"],["Unichain","https://sepolia.unichain.org"],["Worldchain","https://worldchain-sepolia.g.alchemy.com/public"],["Ink","https://rpc-qnd-sepolia.inkonchain.com"],["HyperEVM","https://api.hyperliquid-testnet.xyz/evm"],["Monad","https://testnet-rpc.monad.xyz"],["Noble","https://noble-testnet-rpc.polkachu.com/"],["Mezo","https://rpc.test.mezo.org"],["Sonic","https://rpc.blaze.soniclabs.com"]]],["Devnet",[["Ethereum","http://eth-devnet:8545"],["Bsc","http://eth-devnet2:8545"],["Solana","http://solana-devnet:8899"]]]],w1=Ee(A1),rf=(n,e)=>w1.get(n,e)??"",sf=[["Mainnet",[["Aptos",1n],["Algorand","mainnet-v1.0"],["Near","mainnet"],["Cosmoshub","cosmoshub-4"],["Evmos","evmos_9001-2"],["Injective","injective-1"],["Osmosis","osmosis-1"],["Sei","pacific-1"],["Terra","columbus-5"],["Terra2","phoenix-1"],["Wormchain","wormchain"],["Xpla","dimension_37-1"],["Kujira","kaiyo-1"],["Solana","5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d"],["Sui","35834a8a"],["Acala",787n],["Arbitrum",42161n],["Aurora",1313161554n],["Avalanche",43114n],["Base",8453n],["Bsc",56n],["Celo",42220n],["Ethereum",1n],["Fantom",250n],["Gnosis",100n],["Karura",686n],["Klaytn",8217n],["Moonbeam",1284n],["Neon",245022934n],["Oasis",42262n],["Optimism",10n],["Polygon",137n],["Neutron","neutron-1"],["Stargaze","stargaze-1"],["Celestia","celestia"],["Dymension","dymension_1100-1"],["Provenance","pio-mainnet-1"],["Noble","noble-1"],["Xlayer",196n],["Mantle",5000n],["Scroll",534352n],["Blast",81457n],["Linea",59144n],["Snaxchain",2192n],["Berachain",80094n],["Seievm",1329n],["Unichain",130n],["Worldchain",480n],["Ink",57073n],["Sonic",146n]]],["Testnet",[["Aptos",2n],["Algorand","testnet-v1.0"],["Near","testnet"],["Cosmoshub","theta-testnet-001"],["Evmos","evmos_9000-4"],["Injective","injective-888"],["Osmosis","osmo-test-5"],["Sei","atlantic-2"],["Terra","bombay-12"],["Terra2","pisco-1"],["Wormchain","wormchain-testnet-0"],["Xpla","cube_47-5"],["Kujira","harpoon-4"],["Solana","EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG"],["Sui","4c78adac"],["Acala",597n],["Arbitrum",421613n],["Aurora",1313161555n],["Avalanche",43113n],["Base",84531n],["Bsc",97n],["Celo",44787n],["Ethereum",5n],["Fantom",4002n],["Gnosis",10200n],["Karura",596n],["Klaytn",1001n],["Moonbeam",1287n],["Neon",245022940n],["Oasis",42261n],["Optimism",420n],["Polygon",80001n],["Sepolia",11155111n],["ArbitrumSepolia",421614n],["BaseSepolia",84532n],["OptimismSepolia",11155420n],["PolygonSepolia",80002n],["Holesky",17000n],["Neutron","pion-1"],["Celestia","mocha-4"],["Seda","seda-1-testnet"],["Noble","grand-1"],["Blast",168587773n],["Mantle",5003n],["Scroll",534351n],["Berachain",80069n],["Seievm",1328n],["Snaxchain",13001n],["Unichain",1301n],["Worldchain",4801n],["Ink",763373n],["HyperEVM",998n],["Xlayer",195n],["Linea",59141n],["Monad",10143n],["Mezo",31611n],["Sonic",57054n]]],["Devnet",[["Aptos",0n],["Algorand","sandnet-v1.0"],["Bsc",1397n],["Ethereum",1337n],["Injective","injective_devnet_fake"],["Solana","8wF6jKV3cKwyaVkWcoV9KpDqmkjvEYno9hKZrKx8TbZn"]]]],of=Ee(sf),E1=Ee(sf,[2,[0,1]]);function B1(n,e){const r=E1(e).filter(([s,i])=>as(i)===n);if(r.length!==1)throw new Error(`Platform ${n} has multiple chains with native chain id ${e}`);return r[0]}const x1=[["Mainnet","https://iris-api.circle.com/v1/attestations"],["Testnet","https://iris-api-sandbox.circle.com/v1/attestations"]],bd=Ee(x1),C1=[["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"]]],["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"]]]],Is=Ee(C1),Oc=[["Mainnet",[["Ethereum",0],["Avalanche",1],["Optimism",2],["Arbitrum",3],["Solana",5],["Base",6],["Polygon",7],["Sui",8],["Aptos",9],["Unichain",10]]],["Testnet",[["Sepolia",0],["Avalanche",1],["OptimismSepolia",2],["ArbitrumSepolia",3],["Solana",5],["BaseSepolia",6],["Polygon",7],["Sui",8],["Aptos",9],["Unichain",10]]]],af=Ee(Oc,[[0,1],2]),Ja=Ee(Oc,[[0,2],1]),[z6,H6]=yr(Oc),Ws=(n,e)=>af.has(n,e),pd=(n,e)=>Ja.has(n,e),gd=(n,e)=>Is.has(n,e),ki=(n,e)=>{switch(typeof e){case"string":if(Ws(n,e))return e;break;case"number":if(pd(n,e))return Ja(n,e);break;case"bigint":const t=Number(e);if(pd(n,t))return Ja(n,t);break}throw Error(`Cannot convert to Chain: ${e}`)},S1=[["Mainnet",[["Solana","worm2ZoG2kUd4vFXhvjh93UUH596ayRfgQ2MgjNMTth"],["Ethereum","0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B"],["Terra","terra1dq03ugtd40zu9hcgdzrsq6z2z4hwhc9tqk2uy5"],["Bsc","0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B"],["Polygon","0x7A4B5a56256163F07b2C80A7cA55aBE66c4ec4d7"],["Avalanche","0x54a8e5f9c4CbA08F9943965859F6c34eAF03E26c"],["Oasis","0xfE8cD454b4A1CA468B57D79c0cc77Ef5B6f64585"],["Algorand","842125965"],["Aurora","0xa321448d90d4e5b0A732867c18eA198e75CAC48E"],["Fantom","0x126783A6Cb203a3E35344528B26ca3a0489a1485"],["Karura","0xa321448d90d4e5b0A732867c18eA198e75CAC48E"],["Acala","0xa321448d90d4e5b0A732867c18eA198e75CAC48E"],["Klaytn","0x0C21603c4f3a6387e241c0091A7EA39E43E90bb7"],["Celo","0xa321448d90d4e5b0A732867c18eA198e75CAC48E"],["Near","contract.wormhole_crypto.near"],["Injective","inj17p9rzwnnfxcjp32un9ug7yhhzgtkhvl9l2q74d"],["Aptos","0x5bc11445584a763c1fa7ed39081f1b920954da14e04b32440cba863d03e19625"],["Sui","0xaeab97f96cf9877fee2883315d459552b2b921edc16d7ceac6eab944dd88919c"],["Moonbeam","0xC8e2b0cD52Cf01b0Ce87d389Daa3d414d4cE29f3"],["Terra2","terra12mrnzvhx3rpej6843uge2yyfppfyd3u9c3uq223q8sl48huz9juqffcnhp"],["Arbitrum","0xa5f208e072434bC67592E4C49C1B991BA79BCA46"],["Optimism","0xEe91C335eab126dF5fDB3797EA9d6aD93aeC9722"],["Gnosis","0xa321448d90d4e5b0A732867c18eA198e75CAC48E"],["Pythnet","H3fxXJ86ADW2PNuDDmZJg6mzTtPxkYCpNuQUTgmJ7AjU"],["Base","0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"],["Xlayer","0x194B123c5E96B9b2E49763619985790Dc241CAC0"],["Xpla","xpla1jn8qmdda5m6f6fqu9qv46rt7ajhklg40ukpqchkejcvy8x7w26cqxamv3w"],["Sei","sei1gjrrme22cyha4ht2xapn3f08zzw6z3d4uxx6fyy9zd5dyr3yxgzqqncdqn"],["Wormchain","wormhole1ufs3tlq4umljk0qfe8k5ya0x6hpavn897u2cnf9k0en9jr7qarqqaqfk2j"],["Neutron","neutron16rerygcpahqcxx5t8vjla46ym8ccn7xz7rtc6ju5ujcd36cmc7zs9zrunh"],["Blast","0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"],["Scroll","0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"],["Mantle","0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"],["Snaxchain","0xc1BA3CC4bFE724A08FbbFbF64F8db196738665f4"],["Berachain","0xCa1D5a146B03f6303baF59e5AD5615ae0b9d146D"],["Seievm","0xCa1D5a146B03f6303baF59e5AD5615ae0b9d146D"],["Unichain","0xCa1D5a146B03f6303baF59e5AD5615ae0b9d146D"],["Worldchain","0xcbcEe4e081464A15d8Ad5f58BB493954421eB506"],["Ink","0xCa1D5a146B03f6303baF59e5AD5615ae0b9d146D"]]],["Testnet",[["Solana","3u8hJUVTA4jH1wYAyUur7FFZVQ8H635K3tSHHF4ssjQ5"],["Ethereum","0x706abc4E45D419950511e474C7B9Ed348A4a716c"],["Terra","terra1pd65m0q9tl3v8znnz5f5ltsfegyzah7g42cx5v"],["Bsc","0x68605AD7b15c732a30b1BbC62BE8F2A509D74b4D"],["Polygon","0x0CBE91CF822c73C2315FB05100C2F714765d5c20"],["Avalanche","0x7bbcE28e64B3F8b84d876Ab298393c38ad7aac4C"],["Oasis","0xc1C338397ffA53a2Eb12A7038b4eeb34791F8aCb"],["Algorand","86525623"],["Aurora","0xBd07292de7b505a4E803CEe286184f7Acf908F5e"],["Fantom","0x1BB3B4119b7BA9dfad76B0545fb3F531383c3bB7"],["Karura","0x64fb09E405D2043ed7785a29E296C766D56F2056"],["Acala","0x64fb09E405D2043ed7785a29E296C766D56F2056"],["Klaytn","0x1830CC6eE66c84D2F177B94D544967c774E624cA"],["Celo","0x88505117CA88e7dd2eC6EA1E13f0948db2D50D56"],["Near","wormhole.wormhole.testnet"],["Injective","inj1xx3aupmgv3ce537c0yce8zzd3sz567syuyedpg"],["Osmosis","osmo1hggkxr0hpw83f8vuft7ruvmmamsxmwk2hzz6nytdkzyup9krt0dq27sgyx"],["Aptos","0x5bc11445584a763c1fa7ed39081f1b920954da14e04b32440cba863d03e19625"],["Sui","0x31358d198147da50db32eda2562951d53973a0c0ad5ed738e9b17d88b213d790"],["Moonbeam","0xa5B7D85a8f27dd7907dc8FdC21FA5657D5E2F901"],["Neon","0x268557122Ffd64c85750d630b716471118F323c8"],["Terra2","terra19nv3xr5lrmmr7egvrk2kqgw4kcn43xrtd5g0mpgwwvhetusk4k7s66jyv0"],["Arbitrum","0xC7A204bDBFe983FCD8d8E61D02b475D4073fF97e"],["Optimism","0x6b9C8671cdDC8dEab9c719bB87cBd3e782bA6a35"],["Gnosis","0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd"],["Pythnet","EUrRARh92Cdc54xrDn6qzaqjA77NRrCcfbr8kPwoTL4z"],["Xpla","xpla1upkjn4mthr0047kahvn0llqx4qpqfn75lnph4jpxfn8walmm8mqsanyy35"],["Base","0x23908A62110e21C04F3A4e011d24F901F911744A"],["Sei","sei1nna9mzp274djrgzhzkac2gvm3j27l402s4xzr08chq57pjsupqnqaj0d5s"],["Sepolia","0x4a8bc80Ed5a4067f1CCf107057b8270E0cC11A78"],["Wormchain","wormhole16jzpxp0e8550c9aht6q9svcux30vtyyyyxv5w2l2djjra46580wsazcjwp"],["ArbitrumSepolia","0x6b9C8671cdDC8dEab9c719bB87cBd3e782bA6a35"],["BaseSepolia","0x79A1027a6A159502049F10906D333EC57E95F083"],["OptimismSepolia","0x31377888146f3253211EFEf5c676D41ECe7D58Fe"],["Holesky","0xa10f2eF61dE1f19f586ab8B6F2EbA89bACE63F7a"],["Neutron","neutron1enf63k37nnv9cugggpm06mg70emcnxgj9p64v2s8yx7a2yhhzk2q6xesk4"],["Mantle","0x376428e7f26D5867e69201b275553C45B09EE090"],["PolygonSepolia","0x6b9C8671cdDC8dEab9c719bB87cBd3e782bA6a35"],["Scroll","0x055F47F1250012C6B20c436570a76e52c17Af2D5"],["Blast","0x473e002D7add6fB67a4964F13bFd61280Ca46886"],["Berachain","0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd"],["Seievm","0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd"],["Snaxchain","0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd"],["Unichain","0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd"],["Worldchain","0xe5E02cD12B6FcA153b0d7fF4bF55730AE7B3C93A"],["Ink","0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd"],["HyperEVM","0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd"],["Xlayer","0xA31aa3FDb7aF7Db93d18DDA4e19F811342EDF780"],["Linea","0x79A1027a6A159502049F10906D333EC57E95F083"],["Monad","0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd"],["Mezo","0x268557122Ffd64c85750d630b716471118F323c8"]]],["Devnet",[["Solana","Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o"],["Ethereum","0xC89Ce4735882C9F0f0FE26686c53074E09B0D550"],["Terra","terra14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9ssrc8au"],["Bsc","0xC89Ce4735882C9F0f0FE26686c53074E09B0D550"],["Algorand","1004"],["Near","wormhole.test.near"],["Aptos","0xde0036a9600559e295d5f6802ef6f3f802f510366e0c23912b0655d972166017"],["Sui","0x5a5160ca3c2037f4b4051344096ef7a48ebf4400b3f385e57ea90e1628a8bde0"],["Terra2","terra14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9ssrc8au"],["Wormchain","wormhole17p9rzwnnfxcjp32un9ug7yhhzgtkhvl9jfksztgw5uh69wac2pgshdnj3k"]]]],cf=[["Mainnet",[["Solana","wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb"],["Ethereum","0x3ee18B2214AFF97000D974cf647E7C347E8fa585"],["Terra","terra10nmmwe8r3g99a9newtqa7a75xfgs2e8z87r2sf"],["Bsc","0xB6F6D86a8f9879A9c87f643768d9efc38c1Da6E7"],["Polygon","0x5a58505a96D1dbf8dF91cB21B54419FC36e93fdE"],["Avalanche","0x0e082F06FF657D94310cB8cE8B0D9a04541d8052"],["Oasis","0x5848C791e09901b40A9Ef749f2a6735b418d7564"],["Algorand","842126029"],["Aurora","0x51b5123a7b0F9b2bA265f9c4C8de7D78D52f510F"],["Fantom","0x7C9Fc5741288cDFdD83CeB07f3ea7e22618D79D2"],["Karura","0xae9d7fe007b3327AA64A32824Aaac52C42a6E624"],["Acala","0xae9d7fe007b3327AA64A32824Aaac52C42a6E624"],["Klaytn","0x5b08ac39EAED75c0439FC750d9FE7E1F9dD0193F"],["Celo","0x796Dff6D74F3E27060B71255Fe517BFb23C93eed"],["Near","contract.portalbridge.near"],["Injective","inj1ghd753shjuwexxywmgs4xz7x2q732vcnxxynfn"],["Aptos","0x576410486a2da45eee6c949c995670112ddf2fbeedab20350d506328eefc9d4f"],["Sui","0xc57508ee0d4595e5a8728974a4a93a787d38f339757230d441e895422c07aba9"],["Moonbeam","0xb1731c586ca89a23809861c6103f0b96b3f57d92"],["Terra2","terra153366q50k7t8nn7gec00hg66crnhkdggpgdtaxltaq6xrutkkz3s992fw9"],["Arbitrum","0x0b2402144Bb366A632D14B83F244D2e0e21bD39c"],["Optimism","0x1D68124e65faFC907325e3EDbF8c4d84499DAa8b"],["Base","0x8d2de8d2f73F1F4cAB472AC9A881C9b123C79627"],["Xlayer","0x5537857664B0f9eFe38C9f320F75fEf23234D904"],["Xpla","xpla137w0wfch2dfmz7jl2ap8pcmswasj8kg06ay4dtjzw7tzkn77ufxqfw7acv"],["Sei","sei1smzlm9t79kur392nu9egl8p8je9j92q4gzguewj56a05kyxxra0qy0nuf3"],["Wormchain","wormhole1466nf3zuxpya8q9emxukd7vftaf6h4psr0a07srl5zw74zh84yjq4lyjmh"],["Blast","0x24850c6f61C438823F01B7A3BF2B89B72174Fa9d"],["Scroll","0x24850c6f61C438823F01B7A3BF2B89B72174Fa9d"],["Mantle","0x24850c6f61C438823F01B7A3BF2B89B72174Fa9d"],["Snaxchain","0x8B94bfE456B48a6025b92E11Be393BAa86e68410"],["Berachain","0x3Ff72741fd67D6AD0668d93B41a09248F4700560"],["Seievm","0x3Ff72741fd67D6AD0668d93B41a09248F4700560"],["Unichain","0x3Ff72741fd67D6AD0668d93B41a09248F4700560"],["Worldchain","0xc309275443519adca74c9136b02A38eF96E3a1f6"],["Ink","0x3Ff72741fd67D6AD0668d93B41a09248F4700560"]]],["Testnet",[["Solana","DZnkkTmCiFWfYTfT41X3Rd1kDgozqzxWaHqsw6W4x2oe"],["Ethereum","0xF890982f9310df57d00f659cf4fd87e65adEd8d7"],["Terra","terra1pseddrv0yfsn76u4zxrjmtf45kdlmalswdv39a"],["Bsc","0x9dcF9D205C9De35334D646BeE44b2D2859712A09"],["Polygon","0x377D55a7928c046E18eEbb61977e714d2a76472a"],["Avalanche","0x61E44E506Ca5659E6c0bba9b678586fA2d729756"],["Oasis","0x88d8004A9BdbfD9D28090A02010C19897a29605c"],["Algorand","86525641"],["Aurora","0xD05eD3ad637b890D68a854d607eEAF11aF456fba"],["Fantom","0x599CEa2204B4FaECd584Ab1F2b6aCA137a0afbE8"],["Karura","0xe157115ef34c93145Fec2FE53706846853B07F42"],["Acala","0xe157115ef34c93145Fec2FE53706846853B07F42"],["Klaytn","0xC7A13BE098720840dEa132D860fDfa030884b09A"],["Celo","0x05ca6037eC51F8b712eD2E6Fa72219FEaE74E153"],["Near","token.wormhole.testnet"],["Injective","inj1q0e70vhrv063eah90mu97sazhywmeegp7myvnh"],["Aptos","0x576410486a2da45eee6c949c995670112ddf2fbeedab20350d506328eefc9d4f"],["Sui","0x6fb10cdb7aa299e9a4308752dadecb049ff55a892de92992a1edbd7912b3d6da"],["Moonbeam","0xbc976D4b9D57E57c3cA52e1Fd136C45FF7955A96"],["Neon","0xEe3dB83916Ccdc3593b734F7F2d16D630F39F1D0"],["Terra2","terra1c02vds4uhgtrmcw7ldlg75zumdqxr8hwf7npseuf2h58jzhpgjxsgmwkvk"],["Arbitrum","0x23908A62110e21C04F3A4e011d24F901F911744A"],["ArbitrumSepolia","0xC7A204bDBFe983FCD8d8E61D02b475D4073fF97e"],["Optimism","0xC7A204bDBFe983FCD8d8E61D02b475D4073fF97e"],["OptimismSepolia","0x99737Ec4B815d816c49A385943baf0380e75c0Ac"],["Xpla","xpla1kek6zgdaxcsu35nqfsyvs2t9vs87dqkkq6hjdgczacysjn67vt8sern93x"],["Base","0xA31aa3FDb7aF7Db93d18DDA4e19F811342EDF780"],["BaseSepolia","0x86F55A04690fd7815A3D802bD587e83eA888B239"],["Sei","sei1jv5xw094mclanxt5emammy875qelf3v62u4tl4lp5nhte3w3s9ts9w9az2"],["Sepolia","0xDB5492265f6038831E89f495670FF909aDe94bd9"],["Wormchain","wormhole1aaf9r6s7nxhysuegqrxv0wpm27ypyv4886medd3mrkrw6t4yfcnst3qpex"],["Holesky","0x76d093BbaE4529a342080546cAFEec4AcbA59EC6"],["Mantle","0x75Bfa155a9D7A3714b0861c8a8aF0C4633c45b5D"],["PolygonSepolia","0xC7A204bDBFe983FCD8d8E61D02b475D4073fF97e"],["Scroll","0x22427d90B7dA3fA4642F7025A854c7254E4e45BF"],["Blast","0x430855B4D43b8AEB9D2B9869B74d58dda79C0dB2"],["Xlayer","0xdA91a06299BBF302091B053c6B9EF86Eff0f930D"],["Berachain","0xa10f2eF61dE1f19f586ab8B6F2EbA89bACE63F7a"],["Seievm","0x23908A62110e21C04F3A4e011d24F901F911744A"],["Snaxchain","0xa10f2eF61dE1f19f586ab8B6F2EbA89bACE63F7a"],["Unichain","0xa10f2eF61dE1f19f586ab8B6F2EbA89bACE63F7a"],["Worldchain","0x430855B4D43b8AEB9D2B9869B74d58dda79C0dB2"],["Ink","0x376428e7f26D5867e69201b275553C45B09EE090"],["HyperEVM","0x4a8bc80Ed5a4067f1CCf107057b8270E0cC11A78"],["Linea","0xC7A204bDBFe983FCD8d8E61D02b475D4073fF97e"],["Monad","0xF323dcDe4d33efe83cf455F78F9F6cc656e6B659"],["Mezo","0xA31aa3FDb7aF7Db93d18DDA4e19F811342EDF780"]]],["Devnet",[["Solana","B6RHG3mfcckmrYN1UhmJzyS1XX3fZKbkeUcpJe9Sy3FE"],["Ethereum","0x0290FB167208Af455bB137780163b7B7a9a10C16"],["Terra","terra1nc5tatafv6eyq7llkr2gv50ff9e22mnf70qgjlv737ktmt4eswrquka9l6"],["Bsc","0x0290FB167208Af455bB137780163b7B7a9a10C16"],["Algorand","1006"],["Near","token.test.near"],["Aptos","0x84a5f374d29fc77e370014dce4fd6a55b58ad608de8074b0be5571701724da31"],["Sui","0xa6a3da85bbe05da5bfd953708d56f1a3a023e7fb58e5a824a3d4de3791e8f690"],["Terra2","terra1nc5tatafv6eyq7llkr2gv50ff9e22mnf70qgjlv737ktmt4eswrquka9l6"],["Wormchain","wormhole1ghd753shjuwexxywmgs4xz7x2q732vcnkm6h2pyv9s6ah3hylvrqtm7t3h"]]]],lf=[["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",""]]]],D1=[["Mainnet",[["Solana","WnFt12ZrnzZrFZkt2xsNsaNWoQribnuQ5B5FrDbwDhD"],["Ethereum","0x6FFd7EdE62328b3Af38FCD61461Bbfc52F5651fE"],["Bsc","0x5a58505a96D1dbf8dF91cB21B54419FC36e93fdE"],["Polygon","0x90BBd86a6Fe93D3bc3ed6335935447E75fAb7fCf"],["Avalanche","0xf7B6737Ca9c4e08aE573F75A97B73D7a813f5De5"],["Oasis","0x04952D522Ff217f40B5Ef3cbF659EcA7b952a6c1"],["Aurora","0x6dcC0484472523ed9Cdc017F711Bcbf909789284"],["Fantom","0xA9c7119aBDa80d4a4E0C06C8F4d8cF5893234535"],["Karura","0xb91e3638F82A1fACb28690b37e3aAE45d2c33808"],["Acala","0xb91e3638F82A1fACb28690b37e3aAE45d2c33808"],["Klaytn","0x3c3c561757BAa0b78c5C025CdEAa4ee24C1dFfEf"],["Celo","0xA6A377d75ca5c9052c9a77ED1e865Cc25Bd97bf3"],["Aptos","0x1bdffae984043833ed7fe223f7af7a3f8902d04129b14f801823e64827da7130"],["Moonbeam","0x453cfbe096c0f8d763e8c5f24b441097d577bde2"],["Arbitrum","0x3dD14D553cFD986EAC8e3bddF629d82073e188c8"],["Base","0xDA3adC6621B2677BEf9aD26598e6939CF0D92f88"],["Optimism","0xfE8cD454b4A1CA468B57D79c0cc77Ef5B6f64585"]]],["Testnet",[["Solana","2rHhojZ7hpu1zA91nvZmT8TqWWvMcKmmNBCr2mKTtMq4"],["Ethereum","0xD8E4C2DbDd2e2bd8F1336EA691dBFF6952B1a6eB"],["Bsc","0xcD16E5613EF35599dc82B24Cb45B5A93D779f1EE"],["Polygon","0x51a02d0dcb5e52F5b92bdAA38FA013C91c7309A9"],["Avalanche","0xD601BAf2EEE3C028344471684F6b27E789D9075D"],["Oasis","0xC5c25B41AB0b797571620F5204Afa116A44c0ebA"],["Aurora","0x8F399607E9BA2405D87F5f3e1B78D950b44b2e24"],["Fantom","0x63eD9318628D26BdCB15df58B53BB27231D1B227"],["Klaytn","0x94c994fC51c13101062958b567e743f1a04432dE"],["Celo","0xaCD8190F647a31E56A656748bC30F69259f245Db"],["Moonbeam","0x98A0F4B96972b32Fcb3BD03cAeB66A44a6aB9Edb"],["Neon","0x66E5BcFD45D2F3f166c567ADa663f9d2ffb292B4"],["Arbitrum","0xEe3dB83916Ccdc3593b734F7F2d16D630F39F1D0"],["Optimism","0x23908A62110e21C04F3A4e011d24F901F911744A"],["Base","0xF681d1cc5F25a3694E348e7975d7564Aa581db59"],["Sepolia","0x6a0B52ac198e4870e5F3797d5B403838a5bbFD99"],["Aptos","0x1bdffae984043833ed7fe223f7af7a3f8902d04129b14f801823e64827da7130"],["ArbitrumSepolia","0x23908A62110e21C04F3A4e011d24F901F911744A"],["BaseSepolia","0x268557122Ffd64c85750d630b716471118F323c8"],["OptimismSepolia","0x27812285fbe85BA1DF242929B906B31EE3dd1b9f"],["Holesky","0xc8941d483c45eF8FB72E4d1F9dDE089C95fF8171"],["PolygonSepolia","0x23908A62110e21C04F3A4e011d24F901F911744A"],["Mantle","0xD7D732C8Bf5eBF620EA55b5828eae20418eEF083"],["Scroll","0x47B9a1406BEe29a3001BFEB7e45aE45fFFB40c18"]]],["Devnet",[["Solana","NFTWqJR8YnRVqPDvTJrYuLrQDitTG5AScqbeghi4zSA"],["Ethereum","0x26b4afb60d6c903165150c6f0aa14f8016be4aec"],["Terra","terra1plju286nnfj3z54wgcggd4enwaa9fgf5kgrgzl"],["Bsc","0x26b4afb60d6c903165150c6f0aa14f8016be4aec"],["Aptos","0x46da3d4c569388af61f951bdd1153f4c875f90c2991f6b2d0a38e2161a40852c"]]]],v1=[["Mainnet",[["Ethereum","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Bsc","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Polygon","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Avalanche","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Fantom","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Klaytn","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Celo","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Moonbeam","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Base","0x706f82e9bb5b0813501714ab5974216704980e31"],["Arbitrum","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Optimism","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Blast","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Scroll","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Mantle","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Xlayer","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Berachain","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Ink","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Worldchain","0x1520cc9e779c56dab5866bebfb885c86840c33d3"],["Snaxchain","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"],["Unichain","0x27428DD2d3DD32A4D7f7C497eAaa23130d894911"]]],["Testnet",[["Ethereum","0x28D8F1Be96f97C1387e94A53e00eCcFb4E75175a"],["Bsc","0x80aC94316391752A193C1c47E27D382b507c93F3"],["Polygon","0x0591C25ebd0580E0d4F27A82Fc2e24E7489CB5e0"],["Avalanche","0xA3cF45939bD6260bcFe3D66bc73d60f19e49a8BB"],["Fantom","0x7B1bD7a6b4E61c2a123AC6BC2cbfC614437D0470"],["Celo","0x306B68267Deb7c5DfCDa3619E22E9Ca39C374f84"],["Seievm","0x362fca37E45fe1096b42021b543f462D49a5C8df"],["Moonbeam","0x0591C25ebd0580E0d4F27A82Fc2e24E7489CB5e0"],["Arbitrum","0xAd753479354283eEE1b86c9470c84D42f229FF43"],["Optimism","0x01A957A525a5b7A72808bA9D10c389674E459891"],["Base","0xea8029CD7FCAEFFcD1F53686430Db0Fc8ed384E1"],["Sepolia","0x7B1bD7a6b4E61c2a123AC6BC2cbfC614437D0470"],["ArbitrumSepolia","0x7B1bD7a6b4E61c2a123AC6BC2cbfC614437D0470"],["BaseSepolia","0x93BAD53DDfB6132b0aC8E37f6029163E63372cEE"],["OptimismSepolia","0x93BAD53DDfB6132b0aC8E37f6029163E63372cEE"],["Berachain","0x362fca37E45fe1096b42021b543f462D49a5C8df"],["Unichain","0x362fca37E45fe1096b42021b543f462D49a5C8df"],["Ink","0x362fca37E45fe1096b42021b543f462D49a5C8df"],["Monad","0x362fca37E45fe1096b42021b543f462D49a5C8df"]]],["Devnet",[["Ethereum","0xcC680D088586c09c3E0E099a676FA4b6e42467b4"],["Bsc","0xcC680D088586c09c3E0E099a676FA4b6e42467b4"]]]],df=[["Mainnet",[["Ethereum",{tokenMessenger:"0xbd3fa81b58ba92a82136038b25adec7066af3155",messageTransmitter:"0x0a992d191deec32afe36203ad87d7d289a738f81",wormholeRelayer:"0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2",wormhole:"0xAaDA05BD399372f0b0463744C09113c137636f6a"}],["Avalanche",{tokenMessenger:"0x6b25532e1060ce10cc3b0a99e5683b91bfde6982",messageTransmitter:"0x8186359af5f57fbb40c6b14a588d2a59c0c29880",wormholeRelayer:"0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2",wormhole:"0x09Fb06A271faFf70A651047395AaEb6265265F13"}],["Optimism",{tokenMessenger:"0x2B4069517957735bE00ceE0fadAE88a26365528f",messageTransmitter:"0x4d41f22c5a0e5c74090899e5a8fb597a8842b3e8",wormholeRelayer:"0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2",wormhole:"0x2703483B1a5a7c577e8680de9Df8Be03c6f30e3c"}],["Arbitrum",{tokenMessenger:"0x19330d10D9Cc8751218eaf51E8885D058642E08A",messageTransmitter:"0xC30362313FBBA5cf9163F0bb16a0e01f01A896ca",wormholeRelayer:"0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2",wormhole:"0x2703483B1a5a7c577e8680de9Df8Be03c6f30e3c"}],["Base",{tokenMessenger:"0x1682Ae6375C4E4A97e4B583BC394c861A46D8962",messageTransmitter:"0xAD09780d193884d503182aD4588450C416D6F9D4",wormholeRelayer:"0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2",wormhole:"0x03faBB06Fa052557143dC28eFCFc63FC12843f1D"}],["Solana",{tokenMessenger:"CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3",messageTransmitter:"CCTPmbSD7gX1bxKPAmg77w8oFzNFpaQiQUWD43TKaecd",wormholeRelayer:"",wormhole:""}],["Polygon",{tokenMessenger:"0x9daF8c91AEFAE50b9c0E69629D3F6Ca40cA3B3FE",messageTransmitter:"0xF3be9355363857F3e001be68856A2f96b4C39Ba9",wormholeRelayer:"0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2",wormhole:"0x0FF28217dCc90372345954563486528aa865cDd6"}],["Sui",{tokenMessenger:"0x2aa6c5d56376c371f88a6cc42e852824994993cb9bab8d3e6450cbe3cb32b94e",messageTransmitter:"0x08d87d37ba49e785dde270a83f8e979605b03dc552b5548f26fdf2f49bf7ed1b",wormholeRelayer:"",wormhole:""}],["Aptos",{tokenMessenger:"0x9e6702a472080ea3caaf6ba9dfaa6effad2290a9ba9adaacd5af5c618e42782d",messageTransmitter:"0x177e17751820e4b4371873ca8c30279be63bdea63b88ed0f2239c2eea10f1772",wormholeRelayer:"",wormhole:""}],["Unichain",{tokenMessenger:"0x4e744b28E787c3aD0e810eD65A24461D4ac5a762",messageTransmitter:"0x353bE9E2E38AB1D19104534e4edC21c643Df86f4",wormholeRelayer:"",wormhole:""}]]],["Testnet",[["Sepolia",{tokenMessenger:"0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5",messageTransmitter:"0x7865fAfC2db2093669d92c0F33AeEF291086BEFD",wormholeRelayer:"0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2",wormhole:"0x2703483B1a5a7c577e8680de9Df8Be03c6f30e3c"}],["Avalanche",{tokenMessenger:"0xeb08f243e5d3fcff26a9e38ae5520a669f4019d0",messageTransmitter:"0xa9fb1b3009dcb79e2fe346c16a604b8fa8ae0a79",wormholeRelayer:"0x774a70bbd03327c21460b60f25b677d9e46ab458",wormhole:"0x58f4c17449c90665891c42e14d34aae7a26a472e"}],["OptimismSepolia",{tokenMessenger:"0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5",messageTransmitter:"0x7865fAfC2db2093669d92c0F33AeEF291086BEFD",wormholeRelayer:"0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2",wormhole:"0x2703483B1a5a7c577e8680de9Df8Be03c6f30e3c"}],["ArbitrumSepolia",{tokenMessenger:"0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5",messageTransmitter:"0xaCF1ceeF35caAc005e15888dDb8A3515C41B4872",wormholeRelayer:"0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2",wormhole:"0x2703483B1a5a7c577e8680de9Df8Be03c6f30e3c"}],["Solana",{tokenMessenger:"CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3",messageTransmitter:"CCTPmbSD7gX1bxKPAmg77w8oFzNFpaQiQUWD43TKaecd",wormholeRelayer:"",wormhole:""}],["BaseSepolia",{tokenMessenger:"0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5",messageTransmitter:"0x7865fAfC2db2093669d92c0F33AeEF291086BEFD",wormholeRelayer:"0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2",wormhole:"0x2703483B1a5a7c577e8680de9Df8Be03c6f30e3c"}],["Polygon",{tokenMessenger:"0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5",messageTransmitter:"0xe09A679F56207EF33F5b9d8fb4499Ec00792eA73",wormholeRelayer:"0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2",wormhole:"0x2703483B1a5a7c577e8680de9Df8Be03c6f30e3c"}],["Sui",{tokenMessenger:"0x31cc14d80c175ae39777c0238f20594c6d4869cfab199f40b69f3319956b8beb",messageTransmitter:"0x4931e06dce648b3931f890035bd196920770e913e43e45990b383f6486fdd0a5",wormholeRelayer:"",wormhole:""}],["Aptos",{tokenMessenger:"0x5f9b937419dda90aa06c1836b7847f65bbbe3f1217567758dc2488be31a477b9",messageTransmitter:"0x081e86cebf457a0c6004f35bd648a2794698f52e0dde09a48619dcd3d4cc23d9",wormholeRelayer:"",wormhole:""}],["Unichain",{tokenMessenger:"0x8ed94B8dAd2Dc5453862ea5e316A8e71AAed9782",messageTransmitter:"0xbc498c326533d675cf571B90A2Ced265ACb7d086",wormholeRelayer:"",wormhole:""}]]]],k1=[["Mainnet",[["Wormchain","wormhole14ejqjyq8um4p3xfqj74yld5waqljf88fz25yxnma0cngspxe3les00fpjx"]]],["Testnet",[["Wormchain","wormhole1ctnjk7an90lz5wjfvr3cf6x984a8cjnv8dpmztmlpcq4xteaa2xs9pwmzk"]]]],F1=[["Mainnet",[["Sei","sei189adguawugk3e55zn63z8r9ll29xrjwca636ra7v7gxuzn98sxyqwzt47l"]]],["Testnet",[["Sei","sei1dkdwdvknx0qav5cp5kw68mkn3r99m3svkyjfvkztwh97dv2lm0ksj6xrak"]]]],T1=[["Mainnet",[["Polygon",["Ethereum","0x86E4Dc95c7FBdBf52e33D563BbDB00823894C287"]],["Optimism",["Ethereum","0xdfe97868233d1aa22e815a266982f2cf17685a27"]],["Arbitrum",["Ethereum","0x1c479675ad559dc151f6ec7ed3fbf8cee79582b6"]]]],["Testnet",[["Polygon",["Ethereum","0x2890ba17efe978480615e330ecb65333b880928e"]],["Optimism",["Ethereum","0xe6dfba0953616bacab0c9a8ecb3a9bba77fc15c0"]],["Arbitrum",["Ethereum","0x45af9ed1d03703e480ce7d328fb684bb67da5049"]]]]],uf=[["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}]]]],I1=[["Mainnet",[["Solana","87MEvHZCXE3ML5rrmh5uX1FbShHmRXXS32xJDGbQ7h5t"],["Polygon","0x09959798B95d00a3183d20FaC298E4594E599eab"],["Arbitrum","0x1293a54e160D1cd7075487898d65266081A15458"],["Optimism","0x1293a54e160D1cd7075487898d65266081A15458"],["Base","0x09959798B95d00a3183d20FaC298E4594E599eab"]]]],U1=Ee(S1),_1=Ee(cf),M1=Ee(lf),R1=Ee(D1),W1=Ee(v1),yd=Ee(k1),Ad=Ee(F1),wd=Ee(uf),Fi=Ee(I1),Qa=Ee(df);Ee(T1);const P1=Ee(cf,[0,1]),L1=Ee(lf,[0,1]),O1=Ee(df,[0,1]),N1=Ee(uf,[0,1]),Nc=[["Mainnet",[["0x58CC3AE5C097b213cE3c81979e1B9f9570746AA5","JumpCrypto"],["0xfF6CB952589BDE862c25Ef4392132fb9D4A42157","Staked"],["0x114De8460193bdf3A2fCf81f86a09765F4762fD1","Figment"],["0x107A0086b32d7A0977926A205131d8731D39cbEB","ChainodeTech"],["0x8C82B2fd82FaeD2711d59AF0F2499D16e726f6b2","Inotel"],["0x11b39756C042441BE6D8650b69b54EbE715E2343","HashQuark"],["0x54Ce5B4D348fb74B958e8966e2ec3dBd4958a7cd","Chainlayer"],["0x15e7cAF07C4e3DC8e7C469f92C8Cd88FB8005a20","xLabs"],["0x74a3bf913953D695260D88BC1aA25A4eeE363ef0","Forbole"],["0x000aC0076727b35FBea2dAc28fEE5cCB0fEA768e","StakingFund"],["0xAF45Ced136b9D9e24903464AE889F5C8a723FC14","MoonletWallet"],["0xf93124b7c738843CBB89E864c862c38cddCccF95","P2PValidator"],["0xD2CC37A4dc036a8D232b48f62cDD4731412f4890","01Node"],["0xDA798F6896A3331F64b48c12D1D57Fd9cbe70811","MCF"],["0x71AA1BE1D36CaFE3867910F99C09e347899C19C3","Everstake"],["0x8192b6E7387CCd768277c17DAb1b7a5027c0b3Cf","ChorusOne"],["0x178e21ad2E77AE06711549CFBB1f9c7a9d8096e8","Syncnode"],["0x5E1487F35515d02A92753504a8D75471b9f49EdB","Triton"],["0x6FbEBc898F403E4773E95feB15E80C9A99c8348d","StakingFacilities"]]],["Testnet",[["0x13947Bd48b18E53fdAeEe77F3473391aC727C638","Testnet guardian"]]]],[q6,K6]=Im(yr(Pi(Nc)),[1,2]);Ee(Nc,[[0,2],1]);Ee(Nc,[1,[0,2]]);const zc=5,z1=[["Mainnet",[["Ethereum","0x18084fbA666a33d37592fA2633fD49a74DD93a88"],["Solana","6DNSN2BJsaPFdFFc1zP37kkeNe4Usc1Sqkzr9C9vPWcU"],["Polygon","0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b"],["Arbitrum","0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40"],["Optimism","0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40"],["Base","0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b"]]]],H1=Ee(z1),Hr=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function q1(n){return n instanceof Uint8Array||ArrayBuffer.isView(n)&&n.constructor.name==="Uint8Array"}function Xr(n){if(!Number.isSafeInteger(n)||n<0)throw new Error("positive integer expected, got "+n)}function Tn(n,...e){if(!q1(n))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(n.length))throw new Error("Uint8Array expected of length "+e+", got length="+n.length)}function ff(n){if(typeof n!="function"||typeof n.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");Xr(n.outputLen),Xr(n.blockLen)}function Fr(n,e=!0){if(n.destroyed)throw new Error("Hash instance has been destroyed");if(e&&n.finished)throw new Error("Hash#digest() has already been called")}function Hc(n,e){Tn(n);const t=e.outputLen;if(n.length<t)throw new Error("digestInto() expects output buffer of length at least "+t)}function hf(n){return new Uint32Array(n.buffer,n.byteOffset,Math.floor(n.byteLength/4))}function $n(...n){for(let e=0;e<n.length;e++)n[e].fill(0)}function Ti(n){return new DataView(n.buffer,n.byteOffset,n.byteLength)}function mn(n,e){return n<<32-e|n>>>e}function K1(n,e){return n<<e|n>>>32-e>>>0}const mf=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function bf(n){return n<<24&4278190080|n<<8&16711680|n>>>8&65280|n>>>24&255}const j1=mf?n=>n:n=>bf(n);function $1(n){for(let e=0;e<n.length;e++)n[e]=bf(n[e]);return n}const ec=mf?n=>n:$1,pf=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",V1=Array.from({length:256},(n,e)=>e.toString(16).padStart(2,"0"));function G1(n){if(Tn(n),pf)return n.toHex();let e="";for(let t=0;t<n.length;t++)e+=V1[n[t]];return e}const Ln={_0:48,_9:57,A:65,F:70,a:97,f:102};function Ed(n){if(n>=Ln._0&&n<=Ln._9)return n-Ln._0;if(n>=Ln.A&&n<=Ln.F)return n-(Ln.A-10);if(n>=Ln.a&&n<=Ln.f)return n-(Ln.a-10)}function Y1(n){if(typeof n!="string")throw new Error("hex string expected, got "+typeof n);if(pf)return Uint8Array.fromHex(n);const e=n.length,t=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const r=new Uint8Array(t);for(let s=0,i=0;s<t;s++,i+=2){const o=Ed(n.charCodeAt(i)),a=Ed(n.charCodeAt(i+1));if(o===void 0||a===void 0){const c=n[i]+n[i+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+i)}r[s]=o*16+a}return r}function qc(n){if(typeof n!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(n))}function ls(n){return typeof n=="string"&&(n=qc(n)),Tn(n),n}function X1(n){return typeof n=="string"&&(n=qc(n)),Tn(n),n}function gf(...n){let e=0;for(let r=0;r<n.length;r++){const s=n[r];Tn(s),e+=s.length}const t=new Uint8Array(e);for(let r=0,s=0;r<n.length;r++){const i=n[r];t.set(i,s),s+=i.length}return t}function Z1(n,e){if(e!==void 0&&{}.toString.call(e)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(n,e)}let mo=class{};function ei(n){const e=r=>n().update(ls(r)).digest(),t=n();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>n(),e}function J1(n){const e=(r,s)=>n(s).update(ls(r)).digest(),t=n({});return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=r=>n(r),e}function Kc(n=32){if(Hr&&typeof Hr.getRandomValues=="function")return Hr.getRandomValues(new Uint8Array(n));if(Hr&&typeof Hr.randomBytes=="function")return Uint8Array.from(Hr.randomBytes(n));throw new Error("crypto.getRandomValues must be defined")}function Q1(n,e,t,r){if(typeof n.setBigUint64=="function")return n.setBigUint64(e,t,r);const s=BigInt(32),i=BigInt(4294967295),o=Number(t>>s&i),a=Number(t&i),c=r?4:0,h=r?0:4;n.setUint32(e+c,o,r),n.setUint32(e+h,a,r)}function eb(n,e,t){return n&e^~n&t}function tb(n,e,t){return n&e^n&t^e&t}class jc extends mo{constructor(e,t,r,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=s,this.buffer=new Uint8Array(e),this.view=Ti(this.buffer)}update(e){Fr(this),e=ls(e),Tn(e);const{view:t,buffer:r,blockLen:s}=this,i=e.length;for(let o=0;o<i;){const a=Math.min(s-this.pos,i-o);if(a===s){const c=Ti(e);for(;s<=i-o;o+=s)this.process(c,o);continue}r.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===s&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Fr(this),Hc(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:s,isLE:i}=this;let{pos:o}=this;t[o++]=128,$n(this.buffer.subarray(o)),this.padOffset>s-o&&(this.process(r,0),o=0);for(let w=o;w<s;w++)t[w]=0;Q1(r,s-8,BigInt(this.length*8),i),this.process(r,0);const a=Ti(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const h=c/4,b=this.get();if(h>b.length)throw new Error("_sha2: outputLen bigger than state");for(let w=0;w<h;w++)a.setUint32(4*w,b[w],i)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:s,finished:i,destroyed:o,pos:a}=this;return e.destroyed=o,e.finished=i,e.length=s,e.pos=a,s%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}}const Yn=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ut=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),mi=BigInt(2**32-1),Bd=BigInt(32);function yf(n,e=!1){return e?{h:Number(n&mi),l:Number(n>>Bd&mi)}:{h:Number(n>>Bd&mi)|0,l:Number(n&mi)|0}}function Af(n,e=!1){const t=n.length;let r=new Uint32Array(t),s=new Uint32Array(t);for(let i=0;i<t;i++){const{h:o,l:a}=yf(n[i],e);[r[i],s[i]]=[o,a]}return[r,s]}const xd=(n,e,t)=>n>>>t,Cd=(n,e,t)=>n<<32-t|e>>>t,dr=(n,e,t)=>n>>>t|e<<32-t,ur=(n,e,t)=>n<<32-t|e>>>t,Ds=(n,e,t)=>n<<64-t|e>>>t-32,vs=(n,e,t)=>n>>>t-32|e<<64-t,nb=(n,e)=>e,rb=(n,e)=>n,sb=(n,e,t)=>n<<t|e>>>32-t,ib=(n,e,t)=>e<<t|n>>>32-t,ob=(n,e,t)=>e<<t-32|n>>>64-t,ab=(n,e,t)=>n<<t-32|e>>>64-t;function pn(n,e,t,r){const s=(e>>>0)+(r>>>0);return{h:n+t+(s/2**32|0)|0,l:s|0}}const wf=(n,e,t)=>(n>>>0)+(e>>>0)+(t>>>0),Ef=(n,e,t,r)=>e+t+r+(n/2**32|0)|0,cb=(n,e,t,r)=>(n>>>0)+(e>>>0)+(t>>>0)+(r>>>0),lb=(n,e,t,r,s)=>e+t+r+s+(n/2**32|0)|0,db=(n,e,t,r,s)=>(n>>>0)+(e>>>0)+(t>>>0)+(r>>>0)+(s>>>0),ub=(n,e,t,r,s,i)=>e+t+r+s+i+(n/2**32|0)|0,fb=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Xn=new Uint32Array(64);class hb extends jc{constructor(e=32){super(64,e,8,!1),this.A=Yn[0]|0,this.B=Yn[1]|0,this.C=Yn[2]|0,this.D=Yn[3]|0,this.E=Yn[4]|0,this.F=Yn[5]|0,this.G=Yn[6]|0,this.H=Yn[7]|0}get(){const{A:e,B:t,C:r,D:s,E:i,F:o,G:a,H:c}=this;return[e,t,r,s,i,o,a,c]}set(e,t,r,s,i,o,a,c){this.A=e|0,this.B=t|0,this.C=r|0,this.D=s|0,this.E=i|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,t){for(let w=0;w<16;w++,t+=4)Xn[w]=e.getUint32(t,!1);for(let w=16;w<64;w++){const D=Xn[w-15],E=Xn[w-2],g=mn(D,7)^mn(D,18)^D>>>3,S=mn(E,17)^mn(E,19)^E>>>10;Xn[w]=S+Xn[w-7]+g+Xn[w-16]|0}let{A:r,B:s,C:i,D:o,E:a,F:c,G:h,H:b}=this;for(let w=0;w<64;w++){const D=mn(a,6)^mn(a,11)^mn(a,25),E=b+D+eb(a,c,h)+fb[w]+Xn[w]|0,S=(mn(r,2)^mn(r,13)^mn(r,22))+tb(r,s,i)|0;b=h,h=c,c=a,a=o+E|0,o=i,i=s,s=r,r=E+S|0}r=r+this.A|0,s=s+this.B|0,i=i+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,h=h+this.G|0,b=b+this.H|0,this.set(r,s,i,o,a,c,h,b)}roundClean(){$n(Xn)}destroy(){this.set(0,0,0,0,0,0,0,0),$n(this.buffer)}}const Bf=Af(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(n=>BigInt(n))),mb=Bf[0],bb=Bf[1],Zn=new Uint32Array(80),Jn=new Uint32Array(80);class xf extends jc{constructor(e=64){super(128,e,16,!1),this.Ah=Ut[0]|0,this.Al=Ut[1]|0,this.Bh=Ut[2]|0,this.Bl=Ut[3]|0,this.Ch=Ut[4]|0,this.Cl=Ut[5]|0,this.Dh=Ut[6]|0,this.Dl=Ut[7]|0,this.Eh=Ut[8]|0,this.El=Ut[9]|0,this.Fh=Ut[10]|0,this.Fl=Ut[11]|0,this.Gh=Ut[12]|0,this.Gl=Ut[13]|0,this.Hh=Ut[14]|0,this.Hl=Ut[15]|0}get(){const{Ah:e,Al:t,Bh:r,Bl:s,Ch:i,Cl:o,Dh:a,Dl:c,Eh:h,El:b,Fh:w,Fl:D,Gh:E,Gl:g,Hh:S,Hl:T}=this;return[e,t,r,s,i,o,a,c,h,b,w,D,E,g,S,T]}set(e,t,r,s,i,o,a,c,h,b,w,D,E,g,S,T){this.Ah=e|0,this.Al=t|0,this.Bh=r|0,this.Bl=s|0,this.Ch=i|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=h|0,this.El=b|0,this.Fh=w|0,this.Fl=D|0,this.Gh=E|0,this.Gl=g|0,this.Hh=S|0,this.Hl=T|0}process(e,t){for(let _=0;_<16;_++,t+=4)Zn[_]=e.getUint32(t),Jn[_]=e.getUint32(t+=4);for(let _=16;_<80;_++){const U=Zn[_-15]|0,L=Jn[_-15]|0,H=dr(U,L,1)^dr(U,L,8)^xd(U,L,7),K=ur(U,L,1)^ur(U,L,8)^Cd(U,L,7),V=Zn[_-2]|0,ee=Jn[_-2]|0,re=dr(V,ee,19)^Ds(V,ee,61)^xd(V,ee,6),$=ur(V,ee,19)^vs(V,ee,61)^Cd(V,ee,6),ie=cb(K,$,Jn[_-7],Jn[_-16]),F=lb(ie,H,re,Zn[_-7],Zn[_-16]);Zn[_]=F|0,Jn[_]=ie|0}let{Ah:r,Al:s,Bh:i,Bl:o,Ch:a,Cl:c,Dh:h,Dl:b,Eh:w,El:D,Fh:E,Fl:g,Gh:S,Gl:T,Hh:M,Hl:N}=this;for(let _=0;_<80;_++){const U=dr(w,D,14)^dr(w,D,18)^Ds(w,D,41),L=ur(w,D,14)^ur(w,D,18)^vs(w,D,41),H=w&E^~w&S,K=D&g^~D&T,V=db(N,L,K,bb[_],Jn[_]),ee=ub(V,M,U,H,mb[_],Zn[_]),re=V|0,$=dr(r,s,28)^Ds(r,s,34)^Ds(r,s,39),ie=ur(r,s,28)^vs(r,s,34)^vs(r,s,39),F=r&i^r&a^i&a,l=s&o^s&c^o&c;M=S|0,N=T|0,S=E|0,T=g|0,E=w|0,g=D|0,{h:w,l:D}=pn(h|0,b|0,ee|0,re|0),h=a|0,b=c|0,a=i|0,c=o|0,i=r|0,o=s|0;const m=wf(re,ie,l);r=Ef(m,ee,$,F),s=m|0}({h:r,l:s}=pn(this.Ah|0,this.Al|0,r|0,s|0)),{h:i,l:o}=pn(this.Bh|0,this.Bl|0,i|0,o|0),{h:a,l:c}=pn(this.Ch|0,this.Cl|0,a|0,c|0),{h,l:b}=pn(this.Dh|0,this.Dl|0,h|0,b|0),{h:w,l:D}=pn(this.Eh|0,this.El|0,w|0,D|0),{h:E,l:g}=pn(this.Fh|0,this.Fl|0,E|0,g|0),{h:S,l:T}=pn(this.Gh|0,this.Gl|0,S|0,T|0),{h:M,l:N}=pn(this.Hh|0,this.Hl|0,M|0,N|0),this.set(r,s,i,o,a,c,h,b,w,D,E,g,S,T,M,N)}roundClean(){$n(Zn,Jn)}destroy(){$n(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const _t=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class pb extends xf{constructor(){super(32),this.Ah=_t[0]|0,this.Al=_t[1]|0,this.Bh=_t[2]|0,this.Bl=_t[3]|0,this.Ch=_t[4]|0,this.Cl=_t[5]|0,this.Dh=_t[6]|0,this.Dl=_t[7]|0,this.Eh=_t[8]|0,this.El=_t[9]|0,this.Fh=_t[10]|0,this.Fl=_t[11]|0,this.Gh=_t[12]|0,this.Gl=_t[13]|0,this.Hh=_t[14]|0,this.Hl=_t[15]|0}}const $c=ei(()=>new hb),Vc=ei(()=>new xf),gb=ei(()=>new pb),Hi=$c,yb=BigInt(0),Es=BigInt(1),Ab=BigInt(2),wb=BigInt(7),Eb=BigInt(256),Bb=BigInt(113),Cf=[],Sf=[],Df=[];for(let n=0,e=Es,t=1,r=0;n<24;n++){[t,r]=[r,(2*t+3*r)%5],Cf.push(2*(5*r+t)),Sf.push((n+1)*(n+2)/2%64);let s=yb;for(let i=0;i<7;i++)e=(e<<Es^(e>>wb)*Bb)%Eb,e&Ab&&(s^=Es<<(Es<<BigInt(i))-Es);Df.push(s)}const vf=Af(Df,!0),xb=vf[0],Cb=vf[1],Sd=(n,e,t)=>t>32?ob(n,e,t):sb(n,e,t),Dd=(n,e,t)=>t>32?ab(n,e,t):ib(n,e,t);function Sb(n,e=24){const t=new Uint32Array(10);for(let r=24-e;r<24;r++){for(let o=0;o<10;o++)t[o]=n[o]^n[o+10]^n[o+20]^n[o+30]^n[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,h=t[c],b=t[c+1],w=Sd(h,b,1)^t[a],D=Dd(h,b,1)^t[a+1];for(let E=0;E<50;E+=10)n[o+E]^=w,n[o+E+1]^=D}let s=n[2],i=n[3];for(let o=0;o<24;o++){const a=Sf[o],c=Sd(s,i,a),h=Dd(s,i,a),b=Cf[o];s=n[b],i=n[b+1],n[b]=c,n[b+1]=h}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)t[a]=n[o+a];for(let a=0;a<10;a++)n[o+a]^=~t[(a+2)%10]&t[(a+4)%10]}n[0]^=xb[r],n[1]^=Cb[r]}$n(t)}let Db=class kf extends mo{constructor(e,t,r,s=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=s,this.rounds=i,Xr(r),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=hf(this.state)}clone(){return this._cloneInto()}keccak(){ec(this.state32),Sb(this.state32,this.rounds),ec(this.state32),this.posOut=0,this.pos=0}update(e){Fr(this),e=ls(e),Tn(e);const{blockLen:t,state:r}=this,s=e.length;for(let i=0;i<s;){const o=Math.min(t-this.pos,s-i);for(let a=0;a<o;a++)r[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:s}=this;e[r]^=t,t&128&&r===s-1&&this.keccak(),e[s-1]^=128,this.keccak()}writeInto(e){Fr(this,!1),Tn(e),this.finish();const t=this.state,{blockLen:r}=this;for(let s=0,i=e.length;s<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-s);e.set(t.subarray(this.posOut,this.posOut+o),s),this.posOut+=o,s+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Xr(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Hc(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,$n(this.state)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:s,rounds:i,enableXOF:o}=this;return e||(e=new kf(t,r,s,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=s,e.enableXOF=o,e.destroyed=this.destroyed,e}};const Ff=(n,e,t)=>ei(()=>new Db(e,n,t)),vb=Ff(6,136,256/8),Ps=Ff(1,136,256/8),kb=Vc,Fb=gb;class Tf extends mo{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,ff(e);const r=ls(t);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,i=new Uint8Array(s);i.set(r.length>s?e.create().update(r).digest():r);for(let o=0;o<i.length;o++)i[o]^=54;this.iHash.update(i),this.oHash=e.create();for(let o=0;o<i.length;o++)i[o]^=106;this.oHash.update(i),$n(i)}update(e){return Fr(this),this.iHash.update(e),this}digestInto(e){Fr(this),Tn(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:s,destroyed:i,blockLen:o,outputLen:a}=this;return e=e,e.finished=s,e.destroyed=i,e.blockLen=o,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Gc=(n,e,t)=>new Tf(n,e).update(t).digest();Gc.create=(n,e)=>new Tf(n,e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Yc=BigInt(0),qi=BigInt(1);function ti(n){return n instanceof Uint8Array||ArrayBuffer.isView(n)&&n.constructor.name==="Uint8Array"}function bo(n){if(!ti(n))throw new Error("Uint8Array expected")}function sr(n,e){if(typeof e!="boolean")throw new Error(n+" boolean expected, got "+e)}function bi(n){const e=n.toString(16);return e.length&1?"0"+e:e}function If(n){if(typeof n!="string")throw new Error("hex string expected, got "+typeof n);return n===""?Yc:BigInt("0x"+n)}const Uf=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",Tb=Array.from({length:256},(n,e)=>e.toString(16).padStart(2,"0"));function Zr(n){if(bo(n),Uf)return n.toHex();let e="";for(let t=0;t<n.length;t++)e+=Tb[n[t]];return e}const On={_0:48,_9:57,A:65,F:70,a:97,f:102};function vd(n){if(n>=On._0&&n<=On._9)return n-On._0;if(n>=On.A&&n<=On.F)return n-(On.A-10);if(n>=On.a&&n<=On.f)return n-(On.a-10)}function Ki(n){if(typeof n!="string")throw new Error("hex string expected, got "+typeof n);if(Uf)return Uint8Array.fromHex(n);const e=n.length,t=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const r=new Uint8Array(t);for(let s=0,i=0;s<t;s++,i+=2){const o=vd(n.charCodeAt(i)),a=vd(n.charCodeAt(i+1));if(o===void 0||a===void 0){const c=n[i]+n[i+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+i)}r[s]=o*16+a}return r}function ir(n){return If(Zr(n))}function Us(n){return bo(n),If(Zr(Uint8Array.from(n).reverse()))}function ni(n,e){return Ki(n.toString(16).padStart(e*2,"0"))}function ji(n,e){return ni(n,e).reverse()}function Qe(n,e,t){let r;if(typeof e=="string")try{r=Ki(e)}catch(i){throw new Error(n+" must be hex string or Uint8Array, cause: "+i)}else if(ti(e))r=Uint8Array.from(e);else throw new Error(n+" must be hex string or Uint8Array");const s=r.length;if(typeof t=="number"&&s!==t)throw new Error(n+" of length "+t+" expected, got "+s);return r}function Tr(...n){let e=0;for(let r=0;r<n.length;r++){const s=n[r];bo(s),e+=s.length}const t=new Uint8Array(e);for(let r=0,s=0;r<n.length;r++){const i=n[r];t.set(i,s),s+=i.length}return t}function Ib(n){if(typeof n!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(n))}const ha=n=>typeof n=="bigint"&&Yc<=n;function Xc(n,e,t){return ha(n)&&ha(e)&&ha(t)&&e<=n&&n<t}function un(n,e,t,r){if(!Xc(e,t,r))throw new Error("expected valid "+n+": "+t+" <= n < "+r+", got "+e)}function _f(n){let e;for(e=0;n>Yc;n>>=qi,e+=1);return e}function Ub(n,e){return n>>BigInt(e)&qi}const ri=n=>(qi<<BigInt(n))-qi,ma=n=>new Uint8Array(n),kd=n=>Uint8Array.from(n);function _b(n,e,t){if(typeof n!="number"||n<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof t!="function")throw new Error("hmacFn must be a function");let r=ma(n),s=ma(n),i=0;const o=()=>{r.fill(1),s.fill(0),i=0},a=(...w)=>t(s,r,...w),c=(w=ma(0))=>{s=a(kd([0]),w),r=a(),w.length!==0&&(s=a(kd([1]),w),r=a())},h=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let w=0;const D=[];for(;w<e;){r=a();const E=r.slice();D.push(E),w+=r.length}return Tr(...D)};return(w,D)=>{o(),c(w);let E;for(;!(E=D(h()));)c();return o(),E}}const Mb={bigint:n=>typeof n=="bigint",function:n=>typeof n=="function",boolean:n=>typeof n=="boolean",string:n=>typeof n=="string",stringOrUint8Array:n=>typeof n=="string"||ti(n),isSafeInteger:n=>Number.isSafeInteger(n),array:n=>Array.isArray(n),field:(n,e)=>e.Fp.isValid(n),hash:n=>typeof n=="function"&&Number.isSafeInteger(n.outputLen)};function ds(n,e,t={}){const r=(s,i,o)=>{const a=Mb[i];if(typeof a!="function")throw new Error("invalid validator function");const c=n[s];if(!(o&&c===void 0)&&!a(c,n))throw new Error("param "+String(s)+" is invalid. Expected "+i+", got "+c)};for(const[s,i]of Object.entries(e))r(s,i,!1);for(const[s,i]of Object.entries(t))r(s,i,!0);return n}const Rb=()=>{throw new Error("not implemented")};function Ls(n){const e=new WeakMap;return(t,...r)=>{const s=e.get(t);if(s!==void 0)return s;const i=n(t,...r);return e.set(t,i),i}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Yt=BigInt(0),It=BigInt(1),wr=BigInt(2),Wb=BigInt(3),Mf=BigInt(4),Rf=BigInt(5),Wf=BigInt(8);function He(n,e){const t=n%e;return t>=Yt?t:e+t}function Je(n,e,t){let r=n;for(;e-- >Yt;)r*=r,r%=t;return r}function tc(n,e){if(n===Yt)throw new Error("invert: expected non-zero number");if(e<=Yt)throw new Error("invert: expected positive modulus, got "+e);let t=He(n,e),r=e,s=Yt,i=It;for(;t!==Yt;){const a=r/t,c=r%t,h=s-i*a;r=t,t=c,s=i,i=h}if(r!==It)throw new Error("invert: does not exist");return He(s,e)}function Pf(n,e){const t=(n.ORDER+It)/Mf,r=n.pow(e,t);if(!n.eql(n.sqr(r),e))throw new Error("Cannot find square root");return r}function Pb(n,e){const t=(n.ORDER-Rf)/Wf,r=n.mul(e,wr),s=n.pow(r,t),i=n.mul(e,s),o=n.mul(n.mul(i,wr),s),a=n.mul(i,n.sub(o,n.ONE));if(!n.eql(n.sqr(a),e))throw new Error("Cannot find square root");return a}function Lb(n){if(n<BigInt(3))throw new Error("sqrt is not defined for small field");let e=n-It,t=0;for(;e%wr===Yt;)e/=wr,t++;let r=wr;const s=us(n);for(;nc(s,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(t===1)return Pf;let i=s.pow(r,e);const o=(e+It)/wr;return function(c,h){if(c.is0(h))return h;if(nc(c,h)!==1)throw new Error("Cannot find square root");let b=t,w=c.mul(c.ONE,i),D=c.pow(h,e),E=c.pow(h,o);for(;!c.eql(D,c.ONE);){if(c.is0(D))return c.ZERO;let g=1,S=c.sqr(D);for(;!c.eql(S,c.ONE);)if(g++,S=c.sqr(S),g===b)throw new Error("Cannot find square root");const T=It<<BigInt(b-g-1),M=c.pow(w,T);b=g,w=c.sqr(M),D=c.mul(D,w),E=c.mul(E,M)}return E}}function Ob(n){return n%Mf===Wb?Pf:n%Wf===Rf?Pb:Lb(n)}const Nb=(n,e)=>(He(n,e)&It)===It,zb=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Hb(n){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},t=zb.reduce((r,s)=>(r[s]="function",r),e);return ds(n,t)}function Lf(n,e,t){if(t<Yt)throw new Error("invalid exponent, negatives unsupported");if(t===Yt)return n.ONE;if(t===It)return e;let r=n.ONE,s=e;for(;t>Yt;)t&It&&(r=n.mul(r,s)),s=n.sqr(s),t>>=It;return r}function po(n,e,t=!1){const r=new Array(e.length).fill(t?n.ZERO:void 0),s=e.reduce((o,a,c)=>n.is0(a)?o:(r[c]=o,n.mul(o,a)),n.ONE),i=n.inv(s);return e.reduceRight((o,a,c)=>n.is0(a)?o:(r[c]=n.mul(o,r[c]),n.mul(o,a)),i),r}function nc(n,e){const t=(n.ORDER-It)/wr,r=n.pow(e,t),s=n.eql(r,n.ONE),i=n.eql(r,n.ZERO),o=n.eql(r,n.neg(n.ONE));if(!s&&!i&&!o)throw new Error("invalid Legendre symbol result");return s?1:i?0:-1}function Of(n,e){e!==void 0&&Xr(e);const t=e!==void 0?e:n.toString(2).length,r=Math.ceil(t/8);return{nBitLength:t,nByteLength:r}}function us(n,e,t=!1,r={}){if(n<=Yt)throw new Error("invalid field: expected ORDER > 0, got "+n);const{nBitLength:s,nByteLength:i}=Of(n,e);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let o;const a=Object.freeze({ORDER:n,isLE:t,BITS:s,BYTES:i,MASK:ri(s),ZERO:Yt,ONE:It,create:c=>He(c,n),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return Yt<=c&&c<n},is0:c=>c===Yt,isOdd:c=>(c&It)===It,neg:c=>He(-c,n),eql:(c,h)=>c===h,sqr:c=>He(c*c,n),add:(c,h)=>He(c+h,n),sub:(c,h)=>He(c-h,n),mul:(c,h)=>He(c*h,n),pow:(c,h)=>Lf(a,c,h),div:(c,h)=>He(c*tc(h,n),n),sqrN:c=>c*c,addN:(c,h)=>c+h,subN:(c,h)=>c-h,mulN:(c,h)=>c*h,inv:c=>tc(c,n),sqrt:r.sqrt||(c=>(o||(o=Ob(n)),o(a,c))),toBytes:c=>t?ji(c,i):ni(c,i),fromBytes:c=>{if(c.length!==i)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+c.length);return t?Us(c):ir(c)},invertBatch:c=>po(a,c),cmov:(c,h,b)=>b?h:c});return Object.freeze(a)}function Nf(n){if(typeof n!="bigint")throw new Error("field order must be bigint");const e=n.toString(2).length;return Math.ceil(e/8)}function Zc(n){const e=Nf(n);return e+Math.ceil(e/2)}function zf(n,e,t=!1){const r=n.length,s=Nf(e),i=Zc(e);if(r<16||r<i||r>1024)throw new Error("expected "+i+"-1024 bytes of input, got "+r);const o=t?Us(n):ir(n),a=He(o,e-It)+It;return t?ji(a,s):ni(a,s)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Fd=BigInt(0),rc=BigInt(1);function ba(n,e){const t=e.negate();return n?t:e}function Hf(n,e){if(!Number.isSafeInteger(n)||n<=0||n>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+n)}function pa(n,e){Hf(n,e);const t=Math.ceil(e/n)+1,r=2**(n-1),s=2**n,i=ri(n),o=BigInt(n);return{windows:t,windowSize:r,mask:i,maxNumber:s,shiftBy:o}}function Td(n,e,t){const{windowSize:r,mask:s,maxNumber:i,shiftBy:o}=t;let a=Number(n&s),c=n>>o;a>r&&(a-=i,c+=rc);const h=e*r,b=h+Math.abs(a)-1,w=a===0,D=a<0,E=e%2!==0;return{nextN:c,offset:b,isZero:w,isNeg:D,isNegF:E,offsetF:h}}function qb(n,e){if(!Array.isArray(n))throw new Error("array expected");n.forEach((t,r)=>{if(!(t instanceof e))throw new Error("invalid point at index "+r)})}function Kb(n,e){if(!Array.isArray(n))throw new Error("array of scalars expected");n.forEach((t,r)=>{if(!e.isValid(t))throw new Error("invalid scalar at index "+r)})}const ga=new WeakMap,qf=new WeakMap;function ya(n){return qf.get(n)||1}function Kf(n,e){return{constTimeNegate:ba,hasPrecomputes(t){return ya(t)!==1},unsafeLadder(t,r,s=n.ZERO){let i=t;for(;r>Fd;)r&rc&&(s=s.add(i)),i=i.double(),r>>=rc;return s},precomputeWindow(t,r){const{windows:s,windowSize:i}=pa(r,e),o=[];let a=t,c=a;for(let h=0;h<s;h++){c=a,o.push(c);for(let b=1;b<i;b++)c=c.add(a),o.push(c);a=c.double()}return o},wNAF(t,r,s){let i=n.ZERO,o=n.BASE;const a=pa(t,e);for(let c=0;c<a.windows;c++){const{nextN:h,offset:b,isZero:w,isNeg:D,isNegF:E,offsetF:g}=Td(s,c,a);s=h,w?o=o.add(ba(E,r[g])):i=i.add(ba(D,r[b]))}return{p:i,f:o}},wNAFUnsafe(t,r,s,i=n.ZERO){const o=pa(t,e);for(let a=0;a<o.windows&&s!==Fd;a++){const{nextN:c,offset:h,isZero:b,isNeg:w}=Td(s,a,o);if(s=c,!b){const D=r[h];i=i.add(w?D.negate():D)}}return i},getPrecomputes(t,r,s){let i=ga.get(r);return i||(i=this.precomputeWindow(r,t),t!==1&&ga.set(r,s(i))),i},wNAFCached(t,r,s){const i=ya(t);return this.wNAF(i,this.getPrecomputes(i,t,s),r)},wNAFCachedUnsafe(t,r,s,i){const o=ya(t);return o===1?this.unsafeLadder(t,r,i):this.wNAFUnsafe(o,this.getPrecomputes(o,t,s),r,i)},setWindowSize(t,r){Hf(r,e),qf.set(t,r),ga.delete(t)}}}function jf(n,e,t,r){qb(t,n),Kb(r,e);const s=t.length,i=r.length;if(s!==i)throw new Error("arrays of points and scalars must have equal length");const o=n.ZERO,a=_f(BigInt(s));let c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);const h=ri(c),b=new Array(Number(h)+1).fill(o),w=Math.floor((e.BITS-1)/c)*c;let D=o;for(let E=w;E>=0;E-=c){b.fill(o);for(let S=0;S<i;S++){const T=r[S],M=Number(T>>BigInt(E)&h);b[M]=b[M].add(t[S])}let g=o;for(let S=b.length-1,T=o;S>0;S--)T=T.add(b[S]),g=g.add(T);if(D=D.add(g),E!==0)for(let S=0;S<c;S++)D=D.double()}return D}function Jc(n){return Hb(n.Fp),ds(n,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Of(n.n,n.nBitLength),...n,p:n.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Id(n){n.lowS!==void 0&&sr("lowS",n.lowS),n.prehash!==void 0&&sr("prehash",n.prehash)}function jb(n){const e=Jc(n);ds(e,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:t,Fp:r,a:s}=e;if(t){if(!r.eql(s,r.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof t!="object"||typeof t.beta!="bigint"||typeof t.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...e})}class $b extends Error{constructor(e=""){super(e)}}const zn={Err:$b,_tlv:{encode:(n,e)=>{const{Err:t}=zn;if(n<0||n>256)throw new t("tlv.encode: wrong tag");if(e.length&1)throw new t("tlv.encode: unpadded data");const r=e.length/2,s=bi(r);if(s.length/2&128)throw new t("tlv.encode: long form length too big");const i=r>127?bi(s.length/2|128):"";return bi(n)+i+s+e},decode(n,e){const{Err:t}=zn;let r=0;if(n<0||n>256)throw new t("tlv.encode: wrong tag");if(e.length<2||e[r++]!==n)throw new t("tlv.decode: wrong tlv");const s=e[r++],i=!!(s&128);let o=0;if(!i)o=s;else{const c=s&127;if(!c)throw new t("tlv.decode(long): indefinite length not supported");if(c>4)throw new t("tlv.decode(long): byte length is too big");const h=e.subarray(r,r+c);if(h.length!==c)throw new t("tlv.decode: length bytes not complete");if(h[0]===0)throw new t("tlv.decode(long): zero leftmost byte");for(const b of h)o=o<<8|b;if(r+=c,o<128)throw new t("tlv.decode(long): not minimal encoding")}const a=e.subarray(r,r+o);if(a.length!==o)throw new t("tlv.decode: wrong value length");return{v:a,l:e.subarray(r+o)}}},_int:{encode(n){const{Err:e}=zn;if(n<Hn)throw new e("integer: negative integers are not allowed");let t=bi(n);if(Number.parseInt(t[0],16)&8&&(t="00"+t),t.length&1)throw new e("unexpected DER parsing assertion: unpadded hex");return t},decode(n){const{Err:e}=zn;if(n[0]&128)throw new e("invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new e("invalid signature integer: unnecessary leading zero");return ir(n)}},toSig(n){const{Err:e,_int:t,_tlv:r}=zn,s=Qe("signature",n),{v:i,l:o}=r.decode(48,s);if(o.length)throw new e("invalid signature: left bytes after parsing");const{v:a,l:c}=r.decode(2,i),{v:h,l:b}=r.decode(2,c);if(b.length)throw new e("invalid signature: left bytes after parsing");return{r:t.decode(a),s:t.decode(h)}},hexFromSig(n){const{_tlv:e,_int:t}=zn,r=e.encode(2,t.encode(n.r)),s=e.encode(2,t.encode(n.s)),i=r+s;return e.encode(48,i)}};function Aa(n,e){return Zr(ni(n,e))}const Hn=BigInt(0),Ct=BigInt(1);BigInt(2);const wa=BigInt(3),Vb=BigInt(4);function $f(n){const e=jb(n),{Fp:t}=e,r=us(e.n,e.nBitLength),s=e.toBytes||((_,U,L)=>{const H=U.toAffine();return Tr(Uint8Array.from([4]),t.toBytes(H.x),t.toBytes(H.y))}),i=e.fromBytes||(_=>{const U=_.subarray(1),L=t.fromBytes(U.subarray(0,t.BYTES)),H=t.fromBytes(U.subarray(t.BYTES,2*t.BYTES));return{x:L,y:H}});function o(_){const{a:U,b:L}=e,H=t.sqr(_),K=t.mul(H,_);return t.add(t.add(K,t.mul(_,U)),L)}function a(_,U){const L=t.sqr(U),H=o(_);return t.eql(L,H)}if(!a(e.Gx,e.Gy))throw new Error("bad curve params: generator point");const c=t.mul(t.pow(e.a,wa),Vb),h=t.mul(t.sqr(e.b),BigInt(27));if(t.is0(t.add(c,h)))throw new Error("bad curve params: a or b");function b(_){return Xc(_,Ct,e.n)}function w(_){const{allowedPrivateKeyLengths:U,nByteLength:L,wrapPrivateKey:H,n:K}=e;if(U&&typeof _!="bigint"){if(ti(_)&&(_=Zr(_)),typeof _!="string"||!U.includes(_.length))throw new Error("invalid private key");_=_.padStart(L*2,"0")}let V;try{V=typeof _=="bigint"?_:ir(Qe("private key",_,L))}catch{throw new Error("invalid private key, expected hex or "+L+" bytes, got "+typeof _)}return H&&(V=He(V,K)),un("private key",V,Ct,K),V}function D(_){if(!(_ instanceof S))throw new Error("ProjectivePoint expected")}const E=Ls((_,U)=>{const{px:L,py:H,pz:K}=_;if(t.eql(K,t.ONE))return{x:L,y:H};const V=_.is0();U==null&&(U=V?t.ONE:t.inv(K));const ee=t.mul(L,U),re=t.mul(H,U),$=t.mul(K,U);if(V)return{x:t.ZERO,y:t.ZERO};if(!t.eql($,t.ONE))throw new Error("invZ was invalid");return{x:ee,y:re}}),g=Ls(_=>{if(_.is0()){if(e.allowInfinityPoint&&!t.is0(_.py))return;throw new Error("bad point: ZERO")}const{x:U,y:L}=_.toAffine();if(!t.isValid(U)||!t.isValid(L))throw new Error("bad point: x or y not FE");if(!a(U,L))throw new Error("bad point: equation left != right");if(!_.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class S{constructor(U,L,H){if(U==null||!t.isValid(U))throw new Error("x required");if(L==null||!t.isValid(L)||t.is0(L))throw new Error("y required");if(H==null||!t.isValid(H))throw new Error("z required");this.px=U,this.py=L,this.pz=H,Object.freeze(this)}static fromAffine(U){const{x:L,y:H}=U||{};if(!U||!t.isValid(L)||!t.isValid(H))throw new Error("invalid affine point");if(U instanceof S)throw new Error("projective point not allowed");const K=V=>t.eql(V,t.ZERO);return K(L)&&K(H)?S.ZERO:new S(L,H,t.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(U){const L=po(t,U.map(H=>H.pz));return U.map((H,K)=>H.toAffine(L[K])).map(S.fromAffine)}static fromHex(U){const L=S.fromAffine(i(Qe("pointHex",U)));return L.assertValidity(),L}static fromPrivateKey(U){return S.BASE.multiply(w(U))}static msm(U,L){return jf(S,r,U,L)}_setWindowSize(U){N.setWindowSize(this,U)}assertValidity(){g(this)}hasEvenY(){const{y:U}=this.toAffine();if(t.isOdd)return!t.isOdd(U);throw new Error("Field doesn't support isOdd")}equals(U){D(U);const{px:L,py:H,pz:K}=this,{px:V,py:ee,pz:re}=U,$=t.eql(t.mul(L,re),t.mul(V,K)),ie=t.eql(t.mul(H,re),t.mul(ee,K));return $&&ie}negate(){return new S(this.px,t.neg(this.py),this.pz)}double(){const{a:U,b:L}=e,H=t.mul(L,wa),{px:K,py:V,pz:ee}=this;let re=t.ZERO,$=t.ZERO,ie=t.ZERO,F=t.mul(K,K),l=t.mul(V,V),m=t.mul(ee,ee),p=t.mul(K,V);return p=t.add(p,p),ie=t.mul(K,ee),ie=t.add(ie,ie),re=t.mul(U,ie),$=t.mul(H,m),$=t.add(re,$),re=t.sub(l,$),$=t.add(l,$),$=t.mul(re,$),re=t.mul(p,re),ie=t.mul(H,ie),m=t.mul(U,m),p=t.sub(F,m),p=t.mul(U,p),p=t.add(p,ie),ie=t.add(F,F),F=t.add(ie,F),F=t.add(F,m),F=t.mul(F,p),$=t.add($,F),m=t.mul(V,ee),m=t.add(m,m),F=t.mul(m,p),re=t.sub(re,F),ie=t.mul(m,l),ie=t.add(ie,ie),ie=t.add(ie,ie),new S(re,$,ie)}add(U){D(U);const{px:L,py:H,pz:K}=this,{px:V,py:ee,pz:re}=U;let $=t.ZERO,ie=t.ZERO,F=t.ZERO;const l=e.a,m=t.mul(e.b,wa);let p=t.mul(L,V),C=t.mul(H,ee),B=t.mul(K,re),x=t.add(L,H),I=t.add(V,ee);x=t.mul(x,I),I=t.add(p,C),x=t.sub(x,I),I=t.add(L,K);let y=t.add(V,re);return I=t.mul(I,y),y=t.add(p,B),I=t.sub(I,y),y=t.add(H,K),$=t.add(ee,re),y=t.mul(y,$),$=t.add(C,B),y=t.sub(y,$),F=t.mul(l,I),$=t.mul(m,B),F=t.add($,F),$=t.sub(C,F),F=t.add(C,F),ie=t.mul($,F),C=t.add(p,p),C=t.add(C,p),B=t.mul(l,B),I=t.mul(m,I),C=t.add(C,B),B=t.sub(p,B),B=t.mul(l,B),I=t.add(I,B),p=t.mul(C,I),ie=t.add(ie,p),p=t.mul(y,I),$=t.mul(x,$),$=t.sub($,p),p=t.mul(x,C),F=t.mul(y,F),F=t.add(F,p),new S($,ie,F)}subtract(U){return this.add(U.negate())}is0(){return this.equals(S.ZERO)}wNAF(U){return N.wNAFCached(this,U,S.normalizeZ)}multiplyUnsafe(U){const{endo:L,n:H}=e;un("scalar",U,Hn,H);const K=S.ZERO;if(U===Hn)return K;if(this.is0()||U===Ct)return this;if(!L||N.hasPrecomputes(this))return N.wNAFCachedUnsafe(this,U,S.normalizeZ);let{k1neg:V,k1:ee,k2neg:re,k2:$}=L.splitScalar(U),ie=K,F=K,l=this;for(;ee>Hn||$>Hn;)ee&Ct&&(ie=ie.add(l)),$&Ct&&(F=F.add(l)),l=l.double(),ee>>=Ct,$>>=Ct;return V&&(ie=ie.negate()),re&&(F=F.negate()),F=new S(t.mul(F.px,L.beta),F.py,F.pz),ie.add(F)}multiply(U){const{endo:L,n:H}=e;un("scalar",U,Ct,H);let K,V;if(L){const{k1neg:ee,k1:re,k2neg:$,k2:ie}=L.splitScalar(U);let{p:F,f:l}=this.wNAF(re),{p:m,f:p}=this.wNAF(ie);F=N.constTimeNegate(ee,F),m=N.constTimeNegate($,m),m=new S(t.mul(m.px,L.beta),m.py,m.pz),K=F.add(m),V=l.add(p)}else{const{p:ee,f:re}=this.wNAF(U);K=ee,V=re}return S.normalizeZ([K,V])[0]}multiplyAndAddUnsafe(U,L,H){const K=S.BASE,V=(re,$)=>$===Hn||$===Ct||!re.equals(K)?re.multiplyUnsafe($):re.multiply($),ee=V(this,L).add(V(U,H));return ee.is0()?void 0:ee}toAffine(U){return E(this,U)}isTorsionFree(){const{h:U,isTorsionFree:L}=e;if(U===Ct)return!0;if(L)return L(S,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:U,clearCofactor:L}=e;return U===Ct?this:L?L(S,this):this.multiplyUnsafe(e.h)}toRawBytes(U=!0){return sr("isCompressed",U),this.assertValidity(),s(S,this,U)}toHex(U=!0){return sr("isCompressed",U),Zr(this.toRawBytes(U))}}S.BASE=new S(e.Gx,e.Gy,t.ONE),S.ZERO=new S(t.ZERO,t.ONE,t.ZERO);const{endo:T,nBitLength:M}=e,N=Kf(S,T?Math.ceil(M/2):M);return{CURVE:e,ProjectivePoint:S,normPrivateKeyToScalar:w,weierstrassEquation:o,isWithinCurveOrder:b}}function Gb(n){const e=Jc(n);return ds(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function Vf(n){const e=Gb(n),{Fp:t,n:r,nByteLength:s,nBitLength:i}=e,o=t.BYTES+1,a=2*t.BYTES+1;function c(m){return He(m,r)}function h(m){return tc(m,r)}const{ProjectivePoint:b,normPrivateKeyToScalar:w,weierstrassEquation:D,isWithinCurveOrder:E}=$f({...e,toBytes(m,p,C){const B=p.toAffine(),x=t.toBytes(B.x),I=Tr;return sr("isCompressed",C),C?I(Uint8Array.from([p.hasEvenY()?2:3]),x):I(Uint8Array.from([4]),x,t.toBytes(B.y))},fromBytes(m){const p=m.length,C=m[0],B=m.subarray(1);if(p===o&&(C===2||C===3)){const x=ir(B);if(!Xc(x,Ct,t.ORDER))throw new Error("Point is not on curve");const I=D(x);let y;try{y=t.sqrt(I)}catch(G){const Y=G instanceof Error?": "+G.message:"";throw new Error("Point is not on curve"+Y)}const u=(y&Ct)===Ct;return(C&1)===1!==u&&(y=t.neg(y)),{x,y}}else if(p===a&&C===4){const x=t.fromBytes(B.subarray(0,t.BYTES)),I=t.fromBytes(B.subarray(t.BYTES,2*t.BYTES));return{x,y:I}}else{const x=o,I=a;throw new Error("invalid Point, expected length of "+x+", or uncompressed "+I+", got "+p)}}});function g(m){const p=r>>Ct;return m>p}function S(m){return g(m)?c(-m):m}const T=(m,p,C)=>ir(m.slice(p,C));class M{constructor(p,C,B){un("r",p,Ct,r),un("s",C,Ct,r),this.r=p,this.s=C,B!=null&&(this.recovery=B),Object.freeze(this)}static fromCompact(p){const C=s;return p=Qe("compactSignature",p,C*2),new M(T(p,0,C),T(p,C,2*C))}static fromDER(p){const{r:C,s:B}=zn.toSig(Qe("DER",p));return new M(C,B)}assertValidity(){}addRecoveryBit(p){return new M(this.r,this.s,p)}recoverPublicKey(p){const{r:C,s:B,recovery:x}=this,I=K(Qe("msgHash",p));if(x==null||![0,1,2,3].includes(x))throw new Error("recovery id invalid");const y=x===2||x===3?C+e.n:C;if(y>=t.ORDER)throw new Error("recovery id 2 or 3 invalid");const u=x&1?"03":"02",k=b.fromHex(u+Aa(y,t.BYTES)),G=h(y),Y=c(-I*G),J=c(B*G),de=b.BASE.multiplyAndAddUnsafe(k,Y,J);if(!de)throw new Error("point at infinify");return de.assertValidity(),de}hasHighS(){return g(this.s)}normalizeS(){return this.hasHighS()?new M(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return Ki(this.toDERHex())}toDERHex(){return zn.hexFromSig(this)}toCompactRawBytes(){return Ki(this.toCompactHex())}toCompactHex(){const p=s;return Aa(this.r,p)+Aa(this.s,p)}}const N={isValidPrivateKey(m){try{return w(m),!0}catch{return!1}},normPrivateKeyToScalar:w,randomPrivateKey:()=>{const m=Zc(e.n);return zf(e.randomBytes(m),e.n)},precompute(m=8,p=b.BASE){return p._setWindowSize(m),p.multiply(BigInt(3)),p}};function _(m,p=!0){return b.fromPrivateKey(m).toRawBytes(p)}function U(m){if(typeof m=="bigint")return!1;if(m instanceof b)return!0;const C=Qe("key",m).length,B=t.BYTES,x=B+1,I=2*B+1;if(!(e.allowedPrivateKeyLengths||s===x))return C===x||C===I}function L(m,p,C=!0){if(U(m)===!0)throw new Error("first arg must be private key");if(U(p)===!1)throw new Error("second arg must be public key");return b.fromHex(p).multiply(w(m)).toRawBytes(C)}const H=e.bits2int||function(m){if(m.length>8192)throw new Error("input is too large");const p=ir(m),C=m.length*8-i;return C>0?p>>BigInt(C):p},K=e.bits2int_modN||function(m){return c(H(m))},V=ri(i);function ee(m){return un("num < 2^"+i,m,Hn,V),ni(m,s)}function re(m,p,C=$){if(["recovered","canonical"].some(ue=>ue in C))throw new Error("sign() legacy options not supported");const{hash:B,randomBytes:x}=e;let{lowS:I,prehash:y,extraEntropy:u}=C;I==null&&(I=!0),m=Qe("msgHash",m),Id(C),y&&(m=Qe("prehashed msgHash",B(m)));const k=K(m),G=w(p),Y=[ee(G),ee(k)];if(u!=null&&u!==!1){const ue=u===!0?x(t.BYTES):u;Y.push(Qe("extraEntropy",ue))}const J=Tr(...Y),de=k;function ce(ue){const $e=H(ue);if(!E($e))return;const Be=h($e),be=b.BASE.multiply($e).toAffine(),Pe=c(be.x);if(Pe===Hn)return;const pe=c(Be*c(de+Pe*G));if(pe===Hn)return;let Se=(be.x===Pe?0:2)|Number(be.y&Ct),jt=pe;return I&&g(pe)&&(jt=S(pe),Se^=1),new M(Pe,jt,Se)}return{seed:J,k2sig:ce}}const $={lowS:e.lowS,prehash:!1},ie={lowS:e.lowS,prehash:!1};function F(m,p,C=$){const{seed:B,k2sig:x}=re(m,p,C),I=e;return _b(I.hash.outputLen,I.nByteLength,I.hmac)(B,x)}b.BASE._setWindowSize(8);function l(m,p,C,B=ie){var Se;const x=m;p=Qe("msgHash",p),C=Qe("publicKey",C);const{lowS:I,prehash:y,format:u}=B;if(Id(B),"strict"in B)throw new Error("options.strict was renamed to lowS");if(u!==void 0&&u!=="compact"&&u!=="der")throw new Error("format must be compact or der");const k=typeof x=="string"||ti(x),G=!k&&!u&&typeof x=="object"&&x!==null&&typeof x.r=="bigint"&&typeof x.s=="bigint";if(!k&&!G)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let Y,J;try{if(G&&(Y=new M(x.r,x.s)),k){try{u!=="compact"&&(Y=M.fromDER(x))}catch(jt){if(!(jt instanceof zn.Err))throw jt}!Y&&u!=="der"&&(Y=M.fromCompact(x))}J=b.fromHex(C)}catch{return!1}if(!Y||I&&Y.hasHighS())return!1;y&&(p=e.hash(p));const{r:de,s:ce}=Y,ue=K(p),$e=h(ce),Be=c(ue*$e),be=c(de*$e),Pe=(Se=b.BASE.multiplyAndAddUnsafe(J,Be,be))==null?void 0:Se.toAffine();return Pe?c(Pe.x)===de:!1}return{CURVE:e,getPublicKey:_,getSharedSecret:L,sign:F,verify:l,ProjectivePoint:b,Signature:M,utils:N}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Gf(n){return{hash:n,hmac:(e,...t)=>Gc(n,e,gf(...t)),randomBytes:Kc}}function Yb(n,e){const t=r=>Vf({...n,...Gf(r)});return{...t(e),create:t}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Yf=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Ud=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Xb=BigInt(0),Zb=BigInt(1),sc=BigInt(2),_d=(n,e)=>(n+e/sc)/e;function Jb(n){const e=Yf,t=BigInt(3),r=BigInt(6),s=BigInt(11),i=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),h=n*n*n%e,b=h*h*n%e,w=Je(b,t,e)*b%e,D=Je(w,t,e)*b%e,E=Je(D,sc,e)*h%e,g=Je(E,s,e)*E%e,S=Je(g,i,e)*g%e,T=Je(S,a,e)*S%e,M=Je(T,c,e)*T%e,N=Je(M,a,e)*S%e,_=Je(N,t,e)*b%e,U=Je(_,o,e)*g%e,L=Je(U,r,e)*h%e,H=Je(L,sc,e);if(!ic.eql(ic.sqr(H),n))throw new Error("Cannot find square root");return H}const ic=us(Yf,void 0,void 0,{sqrt:Jb}),er=Yb({a:Xb,b:BigInt(7),Fp:ic,n:Ud,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:n=>{const e=Ud,t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-Zb*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=t,o=BigInt("0x100000000000000000000000000000000"),a=_d(i*n,e),c=_d(-r*n,e);let h=He(n-a*t-c*s,e),b=He(-a*r-c*i,e);const w=h>o,D=b>o;if(w&&(h=e-h),D&&(b=e-b),h>o||b>o)throw new Error("splitScalar: Endomorphism failed, k="+n);return{k1neg:w,k1:h,k2neg:D,k2:b}}}},$c);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const bn=BigInt(0),zt=BigInt(1),Md=BigInt(2),Qb=BigInt(8),ep={zip215:!0};function tp(n){const e=Jc(n);return ds(n,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...e})}function np(n){const e=tp(n),{Fp:t,n:r,prehash:s,hash:i,randomBytes:o,nByteLength:a,h:c}=e,h=Md<<BigInt(a*8)-zt,b=t.create,w=us(e.n,e.nBitLength);function D(B,x){const I=t.sqr(B),y=t.sqr(x),u=t.add(t.mul(e.a,I),y),k=t.add(t.ONE,t.mul(e.d,t.mul(I,y)));return t.eql(u,k)}if(!D(e.Gx,e.Gy))throw new Error("bad curve params: generator point");const E=e.uvRatio||((B,x)=>{try{return{isValid:!0,value:t.sqrt(B*t.inv(x))}}catch{return{isValid:!1,value:bn}}}),g=e.adjustScalarBytes||(B=>B),S=e.domain||((B,x,I)=>{if(sr("phflag",I),x.length||I)throw new Error("Contexts/pre-hash are not supported");return B});function T(B,x,I=!1){const y=I?zt:bn;un("coordinate "+B,x,y,h)}function M(B){if(!(B instanceof U))throw new Error("ExtendedPoint expected")}const N=Ls((B,x)=>{const{ex:I,ey:y,ez:u}=B,k=B.is0();x==null&&(x=k?Qb:t.inv(u));const G=b(I*x),Y=b(y*x),J=b(u*x);if(k)return{x:bn,y:zt};if(J!==zt)throw new Error("invZ was invalid");return{x:G,y:Y}}),_=Ls(B=>{const{a:x,d:I}=e;if(B.is0())throw new Error("bad point: ZERO");const{ex:y,ey:u,ez:k,et:G}=B,Y=b(y*y),J=b(u*u),de=b(k*k),ce=b(de*de),ue=b(Y*x),$e=b(de*b(ue+J)),Be=b(ce+b(I*b(Y*J)));if($e!==Be)throw new Error("bad point: equation left != right (1)");const be=b(y*u),Pe=b(k*G);if(be!==Pe)throw new Error("bad point: equation left != right (2)");return!0});class U{constructor(x,I,y,u){T("x",x),T("y",I),T("z",y,!0),T("t",u),this.ex=x,this.ey=I,this.ez=y,this.et=u,Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(x){if(x instanceof U)throw new Error("extended point not allowed");const{x:I,y}=x||{};return T("x",I),T("y",y),new U(I,y,zt,b(I*y))}static normalizeZ(x){const I=po(t,x.map(y=>y.ez));return x.map((y,u)=>y.toAffine(I[u])).map(U.fromAffine)}static msm(x,I){return jf(U,w,x,I)}_setWindowSize(x){K.setWindowSize(this,x)}assertValidity(){_(this)}equals(x){M(x);const{ex:I,ey:y,ez:u}=this,{ex:k,ey:G,ez:Y}=x,J=b(I*Y),de=b(k*u),ce=b(y*Y),ue=b(G*u);return J===de&&ce===ue}is0(){return this.equals(U.ZERO)}negate(){return new U(b(-this.ex),this.ey,this.ez,b(-this.et))}double(){const{a:x}=e,{ex:I,ey:y,ez:u}=this,k=b(I*I),G=b(y*y),Y=b(Md*b(u*u)),J=b(x*k),de=I+y,ce=b(b(de*de)-k-G),ue=J+G,$e=ue-Y,Be=J-G,be=b(ce*$e),Pe=b(ue*Be),pe=b(ce*Be),Se=b($e*ue);return new U(be,Pe,Se,pe)}add(x){M(x);const{a:I,d:y}=e,{ex:u,ey:k,ez:G,et:Y}=this,{ex:J,ey:de,ez:ce,et:ue}=x,$e=b(u*J),Be=b(k*de),be=b(Y*y*ue),Pe=b(G*ce),pe=b((u+k)*(J+de)-$e-Be),Se=Pe-be,jt=Pe+be,Re=b(Be-I*$e),qe=b(pe*Se),Nr=b(jt*Re),Ne=b(pe*Re),We=b(Se*jt);return new U(qe,Nr,We,Ne)}subtract(x){return this.add(x.negate())}wNAF(x){return K.wNAFCached(this,x,U.normalizeZ)}multiply(x){const I=x;un("scalar",I,zt,r);const{p:y,f:u}=this.wNAF(I);return U.normalizeZ([y,u])[0]}multiplyUnsafe(x,I=U.ZERO){const y=x;return un("scalar",y,bn,r),y===bn?H:this.is0()||y===zt?this:K.wNAFCachedUnsafe(this,y,U.normalizeZ,I)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}isTorsionFree(){return K.unsafeLadder(this,r).is0()}toAffine(x){return N(this,x)}clearCofactor(){const{h:x}=e;return x===zt?this:this.multiplyUnsafe(x)}static fromHex(x,I=!1){const{d:y,a:u}=e,k=t.BYTES;x=Qe("pointHex",x,k),sr("zip215",I);const G=x.slice(),Y=x[k-1];G[k-1]=Y&-129;const J=Us(G),de=I?h:t.ORDER;un("pointHex.y",J,bn,de);const ce=b(J*J),ue=b(ce-zt),$e=b(y*ce-u);let{isValid:Be,value:be}=E(ue,$e);if(!Be)throw new Error("Point.fromHex: invalid y coordinate");const Pe=(be&zt)===zt,pe=(Y&128)!==0;if(!I&&be===bn&&pe)throw new Error("Point.fromHex: x=0 and x_0=1");return pe!==Pe&&(be=b(-be)),U.fromAffine({x:be,y:J})}static fromPrivateKey(x){const{scalar:I}=re(x);return L.multiply(I)}toRawBytes(){const{x,y:I}=this.toAffine(),y=ji(I,t.BYTES);return y[y.length-1]|=x&zt?128:0,y}toHex(){return Zr(this.toRawBytes())}}U.BASE=new U(e.Gx,e.Gy,zt,b(e.Gx*e.Gy)),U.ZERO=new U(bn,zt,zt,bn);const{BASE:L,ZERO:H}=U,K=Kf(U,a*8);function V(B){return He(B,r)}function ee(B){return V(Us(B))}function re(B){const x=t.BYTES;B=Qe("private key",B,x);const I=Qe("hashed private key",i(B),2*x),y=g(I.slice(0,x)),u=I.slice(x,2*x),k=ee(y);return{head:y,prefix:u,scalar:k}}function $(B){const{head:x,prefix:I,scalar:y}=re(B),u=L.multiply(y),k=u.toRawBytes();return{head:x,prefix:I,scalar:y,point:u,pointBytes:k}}function ie(B){return $(B).pointBytes}function F(B=Uint8Array.of(),...x){const I=Tr(...x);return ee(i(S(I,Qe("context",B),!!s)))}function l(B,x,I={}){B=Qe("message",B),s&&(B=s(B));const{prefix:y,scalar:u,pointBytes:k}=$(x),G=F(I.context,y,B),Y=L.multiply(G).toRawBytes(),J=F(I.context,Y,k,B),de=V(G+J*u);un("signature.s",de,bn,r);const ce=Tr(Y,ji(de,t.BYTES));return Qe("result",ce,t.BYTES*2)}const m=ep;function p(B,x,I,y=m){const{context:u,zip215:k}=y,G=t.BYTES;B=Qe("signature",B,2*G),x=Qe("message",x),I=Qe("publicKey",I,G),k!==void 0&&sr("zip215",k),s&&(x=s(x));const Y=Us(B.slice(G,2*G));let J,de,ce;try{J=U.fromHex(I,k),de=U.fromHex(B.slice(0,G),k),ce=L.multiplyUnsafe(Y)}catch{return!1}if(!k&&J.isSmallOrder())return!1;const ue=F(u,de.toRawBytes(),J.toRawBytes(),x);return de.add(J.multiplyUnsafe(ue)).subtract(ce).clearCofactor().equals(U.ZERO)}return L._setWindowSize(8),{CURVE:e,getPublicKey:ie,sign:l,verify:p,ExtendedPoint:U,utils:{getExtendedPublicKey:$,randomPrivateKey:()=>o(t.BYTES),precompute(B=8,x=U.BASE){return x._setWindowSize(B),x.multiply(BigInt(3)),x}}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Qc=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),Rd=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt(0);const rp=BigInt(1),Wd=BigInt(2);BigInt(3);const sp=BigInt(5),ip=BigInt(8);function op(n){const e=BigInt(10),t=BigInt(20),r=BigInt(40),s=BigInt(80),i=Qc,a=n*n%i*n%i,c=Je(a,Wd,i)*a%i,h=Je(c,rp,i)*n%i,b=Je(h,sp,i)*h%i,w=Je(b,e,i)*b%i,D=Je(w,t,i)*w%i,E=Je(D,r,i)*D%i,g=Je(E,s,i)*E%i,S=Je(g,s,i)*E%i,T=Je(S,e,i)*b%i;return{pow_p_5_8:Je(T,Wd,i)*n%i,b2:a}}function ap(n){return n[0]&=248,n[31]&=127,n[31]|=64,n}function cp(n,e){const t=Qc,r=He(e*e*e,t),s=He(r*r*e,t),i=op(n*s).pow_p_5_8;let o=He(n*r*i,t);const a=He(e*o*o,t),c=o,h=He(o*Rd,t),b=a===n,w=a===He(-n,t),D=a===He(-n*Rd,t);return b&&(o=c),(w||D)&&(o=h),Nb(o,t)&&(o=He(-o,t)),{isValid:b||w,value:o}}const Pd=us(Qc,void 0,!0),lp={a:Pd.create(BigInt(-1)),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:Pd,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:ip,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:Vc,randomBytes:Kc,adjustScalarBytes:ap,uvRatio:cp},_r=np(lp),dp=[{name:"appIdPrefix",binary:"bytes",custom:Nt.encode("appID"),omit:!0},{name:"appId",binary:"uint",size:8}],gn=class gn{constructor(e,t="hex"){se(this,"address");this.address=typeof e=="string"?gn.stringToUint8Array(e,t):e}toNative(e){return cr(e,this)}unwrap(){return this.address}toString(){return Tt.encode(this.address,!0)}toUint8Array(){return this.address}toUniversalAddress(){return this}equals(e){return Nt.equals(this.address,e.address)}static isValidAddress(e,t="hex"){return!Rm(()=>gn.stringToUint8Array(e,t))}static instanceof(e){return typeof e=="object"&&"constructor"in e&&e.constructor.type===gn.type}static stringToUint8Array(e,t){const r=(()=>{switch(t){case"hex":if(![40,2*this.byteSize].includes(e.length-(e.startsWith("0x")?2:0)))throw new Error(`string ${e} has invalid length for format ${t}`);return Tt.decode(e);case"base58":return Xu.decode(e);case"bech32":return Gu.decodeToBytes(e).bytes;case"algorandAppId":return Fb(kn(dp,{appId:BigInt(e)}));case"sha256":return Hi(e)}})();if(r.length>gn.byteSize)throw new Error(`string ${e} has invalid length for format ${t}`);return r.length<gn.byteSize?Nt.zpad(r,gn.byteSize):r}};se(gn,"byteSize",32),se(gn,"type","Universal");let Ot=gn;function up(n){return typeof n=="object"&&"setChain"in n}const oc=new Map;function el(n,e){oc.has(n)||oc.set(n,e)}function cr(n,e){const t=as.get(n),r=oc.get(t);if(!r)throw new Error(`No native address type registered for platform ${t}, import the platform directly or, if using sdk package, import the addresses conditional export`);try{const s=new r(e);return up(s)&&s.setChain(n),s}catch(s){const i=`Error parsing address as a native ${n} address: ${s.message}`;if(Ot.instanceof(e))throw i;return new Ot(e).toNative(n)}}function Xf(n,e){const t=as.get(n);return new Ot(e,u1.get(t))}const ac=(n,e)=>n?`${n}:${e}`:e,cc=new Map;function fp(n,e,t){const r=ac(n,e);if(cc.has(r))throw new Error(`Payload type ${r} already registered`);cc.set(r,t)}function Bt(n,e){for(const[t,r]of e)fp(n,t,r)}const Ge={binary:"uint",size:32},Zf={binary:"uint",size:2},qt=n=>({...Zf,custom:{to:e=>{if(e===0){if(!(n!=null&&n.allowNull))throw new Error("ChainId 0 is not valid for this protocol and action");return null}const t=os(e),r=(n==null?void 0:n.allowedChains)??Zu;if(!r.includes(t))throw new Error(`Chain ${t} not in allowed chains ${r}`);return t},from:e=>e==null?0:Js(e)}}),hp=n=>({...Zf,custom:{to:n,from:Js(n)}}),Jr={binary:"uint",size:4},go={binary:"uint",size:8},tl={binary:"uint",size:4},Gn=n=>({name:"payloadId",binary:"uint",size:1,custom:n,omit:!0}),yo={binary:"uint",size:8};class mp{constructor(e,t,r){se(this,"r");se(this,"s");se(this,"v");this.r=e,this.s=t,this.v=r}encode(){return kn($i,this)}static decode(e){return Fn($i,e)}}var Ld;(function(n){function e(i){return er.getPublicKey(i)}n.toPubkey=e;function t(i,o){if(o.length!=32)throw new Error("hash.length != 32");return er.sign(o,i)}n.sign=t;function r(i,o,a){const{r:c,s:h}=i;return er.verify({r:c,s:h},a,o)}n.validate=r;function s(i,o){const{r:a,s:c,v:h}=i,b=new er.Signature(a,c);return b.recovery=h,b.recoverPublicKey(o).toRawBytes()}n.recover=s})(Ld||(Ld={}));const bp=[{name:"r",binary:"uint",size:32},{name:"s",binary:"uint",size:32},{name:"v",binary:"uint",size:1}],$i={binary:"bytes",layout:bp,custom:{to:n=>new mp(n.r,n.s,n.v),from:n=>({r:n.r,s:n.s,v:n.v})}},we={binary:"bytes",size:32,custom:{to:n=>new Ot(n),from:n=>n.toUint8Array()}},pp=n=>{const e=n.findIndex(t=>t!==0);return-1<e?n.slice(e):new Uint8Array([])},Jf={to:Nt.decode,from:Nt.encode},nl=n=>({binary:"bytes",size:n,custom:{to:e=>Nt.decode(pp(e)),from:e=>Nt.zpad(Nt.encode(e),n)}});function Qf(n){const e=n.indexOf(":");return e!==-1?[n.slice(0,e),n.slice(e+1)]:[null,n]}const gp=[{name:"guardianIndex",binary:"uint",size:1},{name:"signature",...$i}],rl=[{name:"version",binary:"uint",size:1,custom:1,omit:!0},{name:"guardianSet",...tl},{name:"signatures",binary:"array",lengthSize:1,layout:gp}],sl=[{name:"timestamp",binary:"uint",size:4},{name:"nonce",binary:"uint",size:4},{name:"emitterChain",...qt()},{name:"emitterAddress",...we},{name:"sequence",...yo},{name:"consistencyLevel",binary:"uint",size:1}],yp=[...rl,...sl];function Os(n){const e=cc.get(n);if(!e)throw new Error(`No layout registered for payload type ${n}`);return e}function e0(n){return{name:"payload",binary:"bytes",...n==="Uint8Array"?{}:{layout:Os(n)}}}function lc(n){const e=[...yp,e0(n.payloadLiteral)];return kn(e,n)}function Ap(n,e){if(n==="Uint8Array")return e;const t=Os(n);return kn(t,e)}function il(n,e){const t=(()=>{if(Array.isArray(n[0]))return n.flatMap(([o,a])=>a.map(c=>ac(o,c)));if(typeof n[1]=="string")return n;const[s,i]=n;return i.map(o=>ac(s,o))})(),r=Vm(t.map(s=>Os(s)));return s=>{typeof s=="string"&&(s=Tt.decode(s));const i=r(s);return Array.isArray(i)?i.map(o=>t[o]):i!==null?t[i]:null}}function Ns(n,e){typeof e=="string"&&(e=Tt.decode(e));const[t,r]=Fn(rl,e,!1);for(let E=1;E<t.signatures.length;++E)if(t.signatures[E].guardianIndex<=t.signatures[E-1].guardianIndex)throw new Error("Guardian signatures must be in ascending order of guardian set index");const s=r,[i,o]=Fn(sl,e.subarray(s),!1),a=s+o,[c,h]=typeof n=="string"?[n,Od(n,e.subarray(a))]:Od(n,e.subarray(a)),[b,w]=Qf(c),D=Ps(e.slice(s));return{protocolName:b,payloadName:w,payloadLiteral:c,...t,...i,payload:h,hash:D}}function Od(n,e,t=0){return(()=>{if(typeof e=="string"&&(e=Tt.decode(e)),n==="Uint8Array")return e.slice(t);if(typeof n=="string")return Fn(Os(n),e.subarray(t));const r=n(e.slice(t));if(r===null)throw new Error(`Encoded data does not match any of the given payload types - ${e}`);return[r,Fn(Os(r),e.subarray(t))]})()}const wp=[["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"}]]]],Nd=Ee(wp,[0,[1,2]]),Ep=[["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"}]]]],zd=Ee(Ep,[0,[1,2]]);function Ao(n,e){if(n!=="Devnet"){if(n==="Mainnet"){if(!Nd.has(e))return;const t=Nd.get(e);return Object.fromEntries(t.map(([r,s])=>[r,{...s,chain:e,key:r}]))}if(n==="Testnet"){if(!zd.has(e))return;const t=zd.get(e);return Object.fromEntries(t.map(([r,s])=>[r,{...s,chain:e,key:r}]))}throw new Error("Unsupported network: "+n)}}function Bp(n,e){const t=Ao(n,e);return t?cs.native(t):void 0}function xp(n,e,t){const r=Ao(n,e);return r?cs.byAddress(r,t):void 0}function Cp(n,e,t){const r=Ao(n,e);return r?cs.byKey(r,t):void 0}function Sp(n,e){const t={coreBridge:U1.get(n,e),tokenBridge:_1.get(n,e),nftBridge:R1.get(n,e),relayer:W1.get(n,e),tokenBridgeRelayer:M1.get(n,e),tbtc:Fi.get(n,e)};return Qa.has(n,e)&&(t.cctp=Qa.get(n,e)),yd.has(n,e)&&(t.gateway=yd.get(n,e)),Ad.has(n,e)&&(t.translator=Ad.get(n,e)),wd.has(n,e)&&(t.portico=wd.get(n,e)),Fi.has(n,e)&&(t.tbtc=Fi.get(n,e)),t}function Lt(n){return typeof n=="string"&&n==="native"}function t0(n){return{chain:n,address:"native"}}function wo(n){return typeof n=="object"&&n.address!==void 0&&n.chain!==void 0&&ho(n.chain)}function n0(n,e){return n.chain!==e.chain?!1:Lt(n.address)&&Lt(e.address)?!0:In(n)===In(e)}function In(n){return wo(n)&&Lt(n.address)?n.address:n.address.toNative(n.chain).toString()}function Dp(n){if(Lt(n.address))throw new Error("Invalid address, cannot convert the string literal `native` to a Universal Address");return n.address.toUniversalAddress().toString()}function r0(n,e,t){let r;if(wo(t)){if(!Lt(t.address))return[!1,t];r=t.address}else r=t;if(Lt(r)){const i=Bp(n,e);if(!i)throw new Error("Invalid destination token");const o=i.wrappedKey,a=Cp(n,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 s0(n){return n.chain!==void 0&&n.txid!==void 0}function Ea(n){return Zu.map(t=>{const r=as(t);let s="";try{s=of.get(n,t)}catch{}const i=Ao(n,t),o=i?Object.values(i).find(c=>Lt(c.address)&&c.wrappedKey):void 0,a=o?i[o.wrappedKey]:void 0;return{key:t,platform:r,network:n,chainId:Qs(t),finalityThreshold:ef.get(t)??0,blockTime:tf.get(t)??0,contracts:Sp(n,t),nativeTokenDecimals:nf(r),nativeChainId:s,tokenMap:i,wrappedNative:a,explorer:y1(n,t),rpc:rf(n,t)}}).reduce((t,r)=>({...t,[r.key]:r}),{})}function vp(n){return i0(n)||ol(n)}function i0(n){return typeof n=="object"&&"chain"in n&&typeof n.chain=="function"&&"address"in n&&typeof n.address=="function"&&"sign"in n&&typeof n.sign=="function"}function ol(n){return typeof n=="object"&&"chain"in n&&typeof n.chain=="function"&&"address"in n&&typeof n.address=="function"&&"signAndSend"in n&&typeof n.signAndSend=="function"}class kp{constructor(e,t,r){se(this,"_chain");se(this,"_address");se(this,"_signer");this._chain=e,this._address=t,this._signer=r}unwrap(){return this._signer}}function Br(n){return n.sequence!==void 0&&n.emitter!==void 0&&n.chain!==void 0}function Vi(n){return n.hash!==void 0}const Hd=n=>[Gn(1),{name:"token",binary:"bytes",layout:[{name:"address",...we},{name:"amount",...Ge}]},{name:"sourceDomain",...Jr},{name:"targetDomain",...Jr},{name:"nonce",...go},{name:"caller",...we},{name:"mintRecipient",...we},co({name:"payload",lengthSize:2},n)],Fp=[Gn(1),{name:"targetRelayerFee",...Ge},{name:"toNativeTokenAmount",...Ge},{name:"targetRecipient",...we}],Tp=[["DepositWithPayload",Hd()],["TransferWithRelay",Hd(Fp)]];Bt("AutomaticCircleBridge",Tp);const o0={binary:"uint",size:4,custom:0,omit:!0},Ip=[{name:"messageBodyVersion",...o0},{name:"burnToken",...we},{name:"mintRecipient",...we},{name:"amount",...Ge},{name:"messageSender",...we}],dc=[{name:"version",...o0},{name:"sourceDomain",...Jr},{name:"destinationDomain",...Jr},{name:"nonce",...go},{name:"sender",...we},{name:"recipient",...we},{name:"destinationCaller",...we},{name:"payload",binary:"bytes",layout:Ip}],Up=[["Message",dc]];Bt("CircleBridge",Up);exports.CircleBridge=void 0;(function(n){n.isCircleAttestation=e=>e.message!==void 0,n.deserialize=e=>{const t=Fn(dc,e),r=Tt.encode(Ps(e),!0);return[t,r]},n.serialize=e=>kn(dc,e)})(exports.CircleBridge||(exports.CircleBridge={}));var qd;(function(n){const e="AutomaticCircleBridge",t=["DepositWithPayload","TransferWithRelay"];n.getTransferDiscriminator=Uc(()=>il([e,t]))})(qd||(qd={}));function _p(n){return n.amount!==void 0&&n.from!==void 0&&n.to!==void 0}const Kd={binary:"bytes",size:32,custom:{to:n=>Wi(n.byteLength).map(e=>String.fromCharCode(n[e])).join(""),from:n=>new Uint8Array(n.split("").map(e=>e.charCodeAt(0)))}},a0=[{name:"token",binary:"bytes",layout:[{name:"amount",...Ge},{name:"address",...we},{name:"chain",...qt()}]},{name:"to",binary:"bytes",layout:[{name:"address",...we},{name:"chain",...qt()}]}],c0=[Gn(1),...a0,{name:"fee",...Ge}],Eo=n=>[Gn(3),...a0,{name:"from",...we},co({name:"payload"},n)],Mp=[["AttestMeta",[Gn(2),{name:"token",binary:"bytes",layout:[{name:"address",...we},{name:"chain",...qt()}]},{name:"decimals",binary:"uint",size:1},{name:"symbol",...Kd},{name:"name",...Kd}]],["Transfer",c0],["TransferWithPayload",Eo()]];Bt("TokenBridge",Mp);const Rp=Zm(["shouldWrapNative","shouldUnwrapNative"]),Gi=[{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",...Rp}];({...we},{...Ge}),{...we},{...we},{...we},{...Ge},{...Ge},{...Ge},{...Ge};const uc=[{name:"flagSet",binary:"bytes",layout:Gi},{name:"finalTokenAddress",...we},{name:"recipientAddress",...we},{name:"cannonAssetAmount",...Ge},{name:"minAmountFinish",...Ge},{name:"relayerFee",...Ge}],Wp=[["Transfer",Eo(uc)]];Bt("PorticoBridge",Wp);exports.PorticoBridge=void 0;(function(n){n.deserializePayload=e=>Fn(uc,e),n.serializePayload=e=>kn(uc,e),n.deserializeFlagSet=e=>Fn(Gi,e),n.serializeFlagSet=e=>kn(Gi,e)})(exports.PorticoBridge||(exports.PorticoBridge={}));const l0={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",...Ge},{name:"targetChainRefundPerGasUnused",...Ge}]},jd={binary:"bytes",layout:[{name:"chain",...qt()},{name:"address",...we}]},Pp=[{name:"chain",...qt()},{name:"emitterAddress",...we},{name:"sequence",...yo}],Lp=[{name:"size",binary:"uint",size:4,custom:12,omit:!0},{name:"domain",...Jr},{name:"nonce",...go}],d0={binary:"switch",idSize:1,idTag:"keyType",layouts:[[[1,"VAA"],Pp],[[2,"CCTP"],Lp]]},u0=n=>[Gn(1),{name:"target",...jd},co({name:"payload",lengthSize:4},n),{name:"requestedReceiverValue",...Ge},{name:"extraReceiverValue",...Ge},{name:"executionInfo",...l0},{name:"refund",...jd},{name:"refundDeliveryProvider",...we},{name:"sourceDeliveryProvider",...we},{name:"senderAddress",...we},{name:"messageKeys",binary:"array",lengthSize:1,layout:d0}],Op=[["DeliveryInstruction",u0()],["RedeliveryInstruction",[Gn(2),{name:"deliveryVaaKey",binary:"bytes",layout:d0},{name:"targetChain",...qt()},{name:"newRequestedReceiverValue",...Ge},{name:"newEncodedExecutionInfo",...l0},{name:"newSourceDeliveryProvider",...we},{name:"newSenderAddress",...we}]]];Bt("Relayer",Op);const Np=[Gn(1),{name:"targetRelayerFee",...Ge},{name:"toNativeTokenAmount",...Ge},{name:"targetRecipient",...we}],zp=[["TransferWithRelay",Eo(Np)]];Bt("AutomaticTokenBridge",zp);const Hp=n=>new Error(`Token ${n} is not a wrapped asset`);var fc;(function(n){const e="TokenBridge",t=["Transfer","TransferWithPayload"],r=["AttestMeta"];[...t,...r],n.getTransferDiscriminator=Uc(()=>il([e,t]))})(fc||(fc={}));function qp(n){return n.token!==void 0&&n.amount!==void 0&&n.from!==void 0&&n.to!==void 0}const Kp=[["Add",1],["Subtract",2],["Unknown",3]],hc={binary:"bytes",size:20,custom:{to:n=>Tt.encode(n,!0),from:n=>Tt.decode(n)}},jp=[["UpgradeContract",[!1,[{name:"newContract",...we}]]],["RegisterChain",[!0,[{name:"foreignChain",...qt()},{name:"foreignAddress",...we}]]],["RecoverChainId",[!1,[{name:"evmChainId",binary:"uint",size:32},{name:"newChainId",...qt({allowedChains:Ju("Evm")})}]]],["GuardianSetUpgrade",[!0,[{name:"guardianSet",...tl},{name:"guardians",binary:"array",lengthSize:1,layout:hc}]]],["SetMessageFee",[!1,[{name:"messageFee",binary:"uint",size:32}]]],["TransferFees",[!0,[{name:"amount",binary:"uint",size:32},{name:"recipient",...we}]]],["UpdateDefaultProvider",[!1,[{name:"defaultProvider",...we}]]],["RegisterEmitterAndDomain",[!0,[{name:"emitterChain",...qt()},{name:"emitterAddress",...we},{name:"domain",binary:"uint",size:4}]]],["UpdateFinality",[!1,[{name:"finality",binary:"uint",size:1}]]]],Ba={binary:"bytes",size:32},$d=[{name:"contractAddr",...we},{name:"codeId",binary:"uint",size:8}],$p=[["StoreCode",[!1,[{name:"wasmHash",...Ba}]]],["InstantiateContract",[!1,[{name:"instantiationParamsHash",...Ba}]]],["MigrateContract",[!1,[{name:"migrationParamsHash",...Ba}]]],["AddWasmInstantiateAllowlist",[!1,$d]],["DeleteWasmInstantiateAllowlist",[!1,$d]]],Vp=(()=>{const n=s=>({binary:"bytes",size:s,custom:Jf}),e=[{name:"height",binary:"uint",size:8}],t=Hu(e),r=s=>[{name:"name",...n(s)},...e];return{binary:"bytes",custom:{to:s=>Fn(r(s.length-t),s),from:s=>kn(r(s.name.length),s)}}})(),Gp=[["ScheduleUpgrade",[!1,Vp]],["CancelUpgrade",[!0,[]]],["SetIbcComposabilityMwContract",[!1,[{name:"contractAddress",...we}]]]],Yp=[["ModifyBalance",[!1,[{name:"sequence",...yo},{name:"modifiedChain",...qt()},{name:"tokenChain",...qt()},{name:"tokenAddress",...we},{name:"kind",...Xm(Kp)},{name:"amount",...Ge},{name:"reason",...nl(32)}]]]],Xp=[["ActionUpdateChannelChain",[!1,[{name:"channelId",...nl(64)},{name:"channelChain",...qt({allowedChains:Ju("Cosmwasm")})}]]]],Zp=[["GeneralPurposeEvm",[!1,[{name:"governanceContract",...hc},{name:"targetContract",...hc},{name:"payload",binary:"bytes",lengthSize:2}]]],["GeneralPurposeSolana",[!1,[{name:"governanceContract",...we},{name:"payload",binary:"bytes"}]]]],f0=[...jp,...$p,...Gp,...Yp,...Xp,...Zp];Lu(f0,0);const Vd=Object.fromEntries(f0),Jp=[["WormholeCore","Core"],["TokenBridge","TokenBridge"],["NftBridge","NftBridge"],["Relayer","WormholeRelayer"],["CircleBridge","CircleIntegration"],["IbcBridge","IbcTranslator"],["IbcReceiver","IbcReceiver"],["GlobalAccountant","GlobalAccountant"],["GeneralPurposeGovernance","GeneralPurposeGovernance"],["WormchainGovernance","WasmdModule"],["GatewayGovernance","GatewayModule"]],Qp=Ee(Jp),eg=n=>({to:n,from:(()=>{const t=new Uint8Array(32),r=Qp(n);for(let s=1;s<=r.length;++s)t[32-s]=r.charCodeAt(r.length-s);return t})()}),tg=(n,e)=>({to:n,from:e}),ng=(n,e,t)=>[{name:"protocol",binary:"bytes",custom:eg(n)},{name:"action",binary:"uint",size:1,custom:tg(e,t)},{name:"chain",...qt({allowNull:Vd[e][0]})},{name:"actionArgs",binary:"bytes",layout:Vd[e][1]}],Ue=(n,e,t)=>[e,ng(n,e,t)],rg=[Ue("WormholeCore","UpgradeContract",1),Ue("WormholeCore","GuardianSetUpgrade",2),Ue("WormholeCore","SetMessageFee",3),Ue("WormholeCore","TransferFees",4),Ue("WormholeCore","RecoverChainId",5)],sg=[Ue("TokenBridge","RegisterChain",1),Ue("TokenBridge","UpgradeContract",2),Ue("TokenBridge","RecoverChainId",3)],ig=[Ue("NftBridge","RegisterChain",1),Ue("NftBridge","UpgradeContract",2),Ue("NftBridge","RecoverChainId",3)],og=[Ue("Relayer","RegisterChain",1),Ue("Relayer","UpgradeContract",2),Ue("Relayer","UpdateDefaultProvider",3)],ag=[Ue("CircleBridge","UpdateFinality",1),Ue("CircleBridge","RegisterEmitterAndDomain",2),Ue("CircleBridge","UpgradeContract",3)],cg=[Ue("IbcBridge","ActionUpdateChannelChain",1)],lg=[Ue("IbcReceiver","ActionUpdateChannelChain",1)],dg=[Ue("GlobalAccountant","ModifyBalance",1)],ug=[Ue("GeneralPurposeGovernance","GeneralPurposeEvm",1),Ue("GeneralPurposeGovernance","GeneralPurposeSolana",2)],fg=[Ue("WormchainGovernance","StoreCode",1),Ue("WormchainGovernance","InstantiateContract",2),Ue("WormchainGovernance","MigrateContract",3),Ue("WormchainGovernance","AddWasmInstantiateAllowlist",4),Ue("WormchainGovernance","DeleteWasmInstantiateAllowlist",5)],hg=[Ue("GatewayGovernance","ScheduleUpgrade",1),Ue("GatewayGovernance","CancelUpgrade",2),Ue("GatewayGovernance","SetIbcComposabilityMwContract",3)];Bt("WormholeCore",rg);Bt("TokenBridge",sg);Bt("NftBridge",ig);Bt("Relayer",og);Bt("CircleBridge",ag);Bt("IbcBridge",cg);Bt("IbcReceiver",lg);Bt("GlobalAccountant",dg);Bt("GeneralPurposeGovernance",ug);Bt("WormchainGovernance",fg);Bt("GatewayGovernance",hg);exports.TBTCBridge=void 0;(function(n){const e="TBTCBridge",t=["GatewayTransfer","Transfer"];[...t],n.getTransferDiscriminator=Uc(()=>il([e,t])),n.getNativeTbtcToken=r=>{const s=H1.get("Mainnet",r);if(s)return{chain:r,address:cr(r,s)}}})(exports.TBTCBridge||(exports.TBTCBridge={}));const mg=[{name:"recipient",...we}],bg=[["GatewayTransfer",Eo(mg)],["Transfer",c0]];Bt("TBTCBridge",bg);function h0(n,e){return function(){return n.apply(e,arguments)}}const{toString:pg}=Object.prototype,{getPrototypeOf:al}=Object,Bo=(n=>e=>{const t=pg.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Mn=n=>(n=n.toLowerCase(),e=>Bo(e)===n),xo=n=>e=>typeof e===n,{isArray:fs}=Array,zs=xo("undefined");function gg(n){return n!==null&&!zs(n)&&n.constructor!==null&&!zs(n.constructor)&&nn(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const m0=Mn("ArrayBuffer");function yg(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&m0(n.buffer),e}const Ag=xo("string"),nn=xo("function"),b0=xo("number"),Co=n=>n!==null&&typeof n=="object",wg=n=>n===!0||n===!1,Ii=n=>{if(Bo(n)!=="object")return!1;const e=al(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},Eg=Mn("Date"),Bg=Mn("File"),xg=Mn("Blob"),Cg=Mn("FileList"),Sg=n=>Co(n)&&nn(n.pipe),Dg=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||nn(n.append)&&((e=Bo(n))==="formdata"||e==="object"&&nn(n.toString)&&n.toString()==="[object FormData]"))},vg=Mn("URLSearchParams"),kg=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function si(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,s;if(typeof n!="object"&&(n=[n]),fs(n))for(r=0,s=n.length;r<s;r++)e.call(null,n[r],r,n);else{const i=t?Object.getOwnPropertyNames(n):Object.keys(n),o=i.length;let a;for(r=0;r<o;r++)a=i[r],e.call(null,n[a],a,n)}}function p0(n,e){e=e.toLowerCase();const t=Object.keys(n);let r=t.length,s;for(;r-- >0;)if(s=t[r],e===s.toLowerCase())return s;return null}const g0=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:je.global,y0=n=>!zs(n)&&n!==g0;function mc(){const{caseless:n}=y0(this)&&this||{},e={},t=(r,s)=>{const i=n&&p0(e,s)||s;Ii(e[i])&&Ii(r)?e[i]=mc(e[i],r):Ii(r)?e[i]=mc({},r):fs(r)?e[i]=r.slice():e[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&si(arguments[r],t);return e}const Fg=(n,e,t,{allOwnKeys:r}={})=>(si(e,(s,i)=>{t&&nn(s)?n[i]=h0(s,t):n[i]=s},{allOwnKeys:r}),n),Tg=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Ig=(n,e,t,r)=>{n.prototype=Object.create(e.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},Ug=(n,e,t,r)=>{let s,i,o;const a={};if(e=e||{},n==null)return e;do{for(s=Object.getOwnPropertyNames(n),i=s.length;i-- >0;)o=s[i],(!r||r(o,n,e))&&!a[o]&&(e[o]=n[o],a[o]=!0);n=t!==!1&&al(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},_g=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const r=n.indexOf(e,t);return r!==-1&&r===t},Mg=n=>{if(!n)return null;if(fs(n))return n;let e=n.length;if(!b0(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},Rg=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&al(Uint8Array)),Wg=(n,e)=>{const r=(n&&n[Symbol.iterator]).call(n);let s;for(;(s=r.next())&&!s.done;){const i=s.value;e.call(n,i[0],i[1])}},Pg=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},Lg=Mn("HTMLFormElement"),Og=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,s){return r.toUpperCase()+s}),Gd=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),Ng=Mn("RegExp"),A0=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};si(t,(s,i)=>{e(s,i,n)!==!1&&(r[i]=s)}),Object.defineProperties(n,r)},zg=n=>{A0(n,(e,t)=>{if(nn(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];if(nn(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},Hg=(n,e)=>{const t={},r=s=>{s.forEach(i=>{t[i]=!0})};return fs(n)?r(n):r(String(n).split(e)),t},qg=()=>{},Kg=(n,e)=>(n=+n,Number.isFinite(n)?n:e),xa="abcdefghijklmnopqrstuvwxyz",Yd="0123456789",w0={DIGIT:Yd,ALPHA:xa,ALPHA_DIGIT:xa+xa.toUpperCase()+Yd},jg=(n=16,e=w0.ALPHA_DIGIT)=>{let t="";const{length:r}=e;for(;n--;)t+=e[Math.random()*r|0];return t};function $g(n){return!!(n&&nn(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const Vg=n=>{const e=new Array(10),t=(r,s)=>{if(Co(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[s]=r;const i=fs(r)?[]:{};return si(r,(o,a)=>{const c=t(o,s+1);!zs(c)&&(i[a]=c)}),e[s]=void 0,i}}return r};return t(n,0)},Gg=Mn("AsyncFunction"),Yg=n=>n&&(Co(n)||nn(n))&&nn(n.then)&&nn(n.catch),q={isArray:fs,isArrayBuffer:m0,isBuffer:gg,isFormData:Dg,isArrayBufferView:yg,isString:Ag,isNumber:b0,isBoolean:wg,isObject:Co,isPlainObject:Ii,isUndefined:zs,isDate:Eg,isFile:Bg,isBlob:xg,isRegExp:Ng,isFunction:nn,isStream:Sg,isURLSearchParams:vg,isTypedArray:Rg,isFileList:Cg,forEach:si,merge:mc,extend:Fg,trim:kg,stripBOM:Tg,inherits:Ig,toFlatObject:Ug,kindOf:Bo,kindOfTest:Mn,endsWith:_g,toArray:Mg,forEachEntry:Wg,matchAll:Pg,isHTMLForm:Lg,hasOwnProperty:Gd,hasOwnProp:Gd,reduceDescriptors:A0,freezeMethods:zg,toObjectSet:Hg,toCamelCase:Og,noop:qg,toFiniteNumber:Kg,findKey:p0,global:g0,isContextDefined:y0,ALPHABET:w0,generateString:jg,isSpecCompliantForm:$g,toJSONObject:Vg,isAsyncFn:Gg,isThenable:Yg};function De(n,e,t,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),s&&(this.response=s)}q.inherits(De,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const E0=De.prototype,B0={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{B0[n]={value:n}});Object.defineProperties(De,B0);Object.defineProperty(E0,"isAxiosError",{value:!0});De.from=(n,e,t,r,s,i)=>{const o=Object.create(E0);return q.toFlatObject(n,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),De.call(o,n.message,e,t,r,s),o.cause=n,o.name=n.name,i&&Object.assign(o,i),o};const Xg=null;function bc(n){return q.isPlainObject(n)||q.isArray(n)}function x0(n){return q.endsWith(n,"[]")?n.slice(0,-2):n}function Xd(n,e,t){return n?n.concat(e).map(function(s,i){return s=x0(s),!t&&i?"["+s+"]":s}).join(t?".":""):e}function Zg(n){return q.isArray(n)&&!n.some(bc)}const Jg=q.toFlatObject(q,{},null,function(e){return/^is[A-Z]/.test(e)});function So(n,e,t){if(!q.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=q.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,T){return!q.isUndefined(T[S])});const r=t.metaTokens,s=t.visitor||b,i=t.dots,o=t.indexes,c=(t.Blob||typeof Blob<"u"&&Blob)&&q.isSpecCompliantForm(e);if(!q.isFunction(s))throw new TypeError("visitor must be a function");function h(g){if(g===null)return"";if(q.isDate(g))return g.toISOString();if(!c&&q.isBlob(g))throw new De("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(g)||q.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):je.Buffer.from(g):g}function b(g,S,T){let M=g;if(g&&!T&&typeof g=="object"){if(q.endsWith(S,"{}"))S=r?S:S.slice(0,-2),g=JSON.stringify(g);else if(q.isArray(g)&&Zg(g)||(q.isFileList(g)||q.endsWith(S,"[]"))&&(M=q.toArray(g)))return S=x0(S),M.forEach(function(_,U){!(q.isUndefined(_)||_===null)&&e.append(o===!0?Xd([S],U,i):o===null?S:S+"[]",h(_))}),!1}return bc(g)?!0:(e.append(Xd(T,S,i),h(g)),!1)}const w=[],D=Object.assign(Jg,{defaultVisitor:b,convertValue:h,isVisitable:bc});function E(g,S){if(!q.isUndefined(g)){if(w.indexOf(g)!==-1)throw Error("Circular reference detected in "+S.join("."));w.push(g),q.forEach(g,function(M,N){(!(q.isUndefined(M)||M===null)&&s.call(e,M,q.isString(N)?N.trim():N,S,D))===!0&&E(M,S?S.concat(N):[N])}),w.pop()}}if(!q.isObject(n))throw new TypeError("data must be an object");return E(n),e}function Zd(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function cl(n,e){this._pairs=[],n&&So(n,this,e)}const C0=cl.prototype;C0.append=function(e,t){this._pairs.push([e,t])};C0.toString=function(e){const t=e?function(r){return e.call(this,r,Zd)}:Zd;return this._pairs.map(function(s){return t(s[0])+"="+t(s[1])},"").join("&")};function Qg(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function S0(n,e,t){if(!e)return n;const r=t&&t.encode||Qg,s=t&&t.serialize;let i;if(s?i=s(e,t):i=q.isURLSearchParams(e)?e.toString():new cl(e,t).toString(r),i){const o=n.indexOf("#");o!==-1&&(n=n.slice(0,o)),n+=(n.indexOf("?")===-1?"?":"&")+i}return n}class Jd{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){q.forEach(this.handlers,function(r){r!==null&&e(r)})}}const D0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ey=typeof URLSearchParams<"u"?URLSearchParams:cl,ty=typeof FormData<"u"?FormData:null,ny=typeof Blob<"u"?Blob:null,ry=(()=>{let n;return typeof navigator<"u"&&((n=navigator.product)==="ReactNative"||n==="NativeScript"||n==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),sy=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Dn={classes:{URLSearchParams:ey,FormData:ty,Blob:ny},isStandardBrowserEnv:ry,isStandardBrowserWebWorkerEnv:sy,protocols:["http","https","file","blob","url","data"]};function iy(n,e){return So(n,new Dn.classes.URLSearchParams,Object.assign({visitor:function(t,r,s,i){return Dn.isNode&&q.isBuffer(t)?(this.append(r,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function oy(n){return q.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ay(n){const e={},t=Object.keys(n);let r;const s=t.length;let i;for(r=0;r<s;r++)i=t[r],e[i]=n[i];return e}function v0(n){function e(t,r,s,i){let o=t[i++];const a=Number.isFinite(+o),c=i>=t.length;return o=!o&&q.isArray(s)?s.length:o,c?(q.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!q.isObject(s[o]))&&(s[o]=[]),e(t,r,s[o],i)&&q.isArray(s[o])&&(s[o]=ay(s[o])),!a)}if(q.isFormData(n)&&q.isFunction(n.entries)){const t={};return q.forEachEntry(n,(r,s)=>{e(oy(r),s,t,0)}),t}return null}const cy={"Content-Type":void 0};function ly(n,e,t){if(q.isString(n))try{return(e||JSON.parse)(n),q.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(n)}const hs={transitional:D0,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",s=r.indexOf("application/json")>-1,i=q.isObject(e);if(i&&q.isHTMLForm(e)&&(e=new FormData(e)),q.isFormData(e))return s&&s?JSON.stringify(v0(e)):e;if(q.isArrayBuffer(e)||q.isBuffer(e)||q.isStream(e)||q.isFile(e)||q.isBlob(e))return e;if(q.isArrayBufferView(e))return e.buffer;if(q.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return iy(e,this.formSerializer).toString();if((a=q.isFileList(e))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return So(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||s?(t.setContentType("application/json",!1),ly(e)):e}],transformResponse:[function(e){const t=this.transitional||hs.transitional,r=t&&t.forcedJSONParsing,s=this.responseType==="json";if(e&&q.isString(e)&&(r&&!this.responseType||s)){const o=!(t&&t.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?De.from(a,De.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Dn.classes.FormData,Blob:Dn.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};q.forEach(["delete","get","head"],function(e){hs.headers[e]={}});q.forEach(["post","put","patch"],function(e){hs.headers[e]=q.merge(cy)});const dy=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),uy=n=>{const e={};let t,r,s;return n&&n.split(`
7
+ `).forEach(function(o){s=o.indexOf(":"),t=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!t||e[t]&&dy[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e},Qd=Symbol("internals");function Bs(n){return n&&String(n).trim().toLowerCase()}function Ui(n){return n===!1||n==null?n:q.isArray(n)?n.map(Ui):String(n)}function fy(n){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(n);)e[r[1]]=r[2];return e}const hy=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Ca(n,e,t,r,s){if(q.isFunction(r))return r.call(this,e,t);if(s&&(e=t),!!q.isString(e)){if(q.isString(r))return e.indexOf(r)!==-1;if(q.isRegExp(r))return r.test(e)}}function my(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function by(n,e){const t=q.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+t,{value:function(s,i,o){return this[r].call(this,e,s,i,o)},configurable:!0})})}let rn=class{constructor(e){e&&this.set(e)}set(e,t,r){const s=this;function i(a,c,h){const b=Bs(c);if(!b)throw new Error("header name must be a non-empty string");const w=q.findKey(s,b);(!w||s[w]===void 0||h===!0||h===void 0&&s[w]!==!1)&&(s[w||c]=Ui(a))}const o=(a,c)=>q.forEach(a,(h,b)=>i(h,b,c));return q.isPlainObject(e)||e instanceof this.constructor?o(e,t):q.isString(e)&&(e=e.trim())&&!hy(e)?o(uy(e),t):e!=null&&i(t,e,r),this}get(e,t){if(e=Bs(e),e){const r=q.findKey(this,e);if(r){const s=this[r];if(!t)return s;if(t===!0)return fy(s);if(q.isFunction(t))return t.call(this,s,r);if(q.isRegExp(t))return t.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Bs(e),e){const r=q.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||Ca(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let s=!1;function i(o){if(o=Bs(o),o){const a=q.findKey(r,o);a&&(!t||Ca(r,r[a],a,t))&&(delete r[a],s=!0)}}return q.isArray(e)?e.forEach(i):i(e),s}clear(e){const t=Object.keys(this);let r=t.length,s=!1;for(;r--;){const i=t[r];(!e||Ca(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){const t=this,r={};return q.forEach(this,(s,i)=>{const o=q.findKey(r,i);if(o){t[o]=Ui(s),delete t[i];return}const a=e?my(i):String(i).trim();a!==i&&delete t[i],t[a]=Ui(s),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return q.forEach(this,(r,s)=>{r!=null&&r!==!1&&(t[s]=e&&q.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
8
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[Qd]=this[Qd]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=Bs(o);r[a]||(by(s,o),r[a]=!0)}return q.isArray(e)?e.forEach(i):i(e),this}};rn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);q.freezeMethods(rn.prototype);q.freezeMethods(rn);function Sa(n,e){const t=this||hs,r=e||t,s=rn.from(r.headers);let i=r.data;return q.forEach(n,function(a){i=a.call(t,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function k0(n){return!!(n&&n.__CANCEL__)}function ii(n,e,t){De.call(this,n??"canceled",De.ERR_CANCELED,e,t),this.name="CanceledError"}q.inherits(ii,De,{__CANCEL__:!0});function py(n,e,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?n(t):e(new De("Request failed with status code "+t.status,[De.ERR_BAD_REQUEST,De.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}const gy=Dn.isStandardBrowserEnv?function(){return{write:function(t,r,s,i,o,a){const c=[];c.push(t+"="+encodeURIComponent(r)),q.isNumber(s)&&c.push("expires="+new Date(s).toGMTString()),q.isString(i)&&c.push("path="+i),q.isString(o)&&c.push("domain="+o),a===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(t){const r=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function yy(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Ay(n,e){return e?n.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):n}function F0(n,e){return n&&!yy(e)?Ay(n,e):e}const wy=Dn.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function s(i){let o=i;return e&&(t.setAttribute("href",o),o=t.href),t.setAttribute("href",o),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return r=s(window.location.href),function(o){const a=q.isString(o)?s(o):o;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function Ey(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function By(n,e){n=n||10;const t=new Array(n),r=new Array(n);let s=0,i=0,o;return e=e!==void 0?e:1e3,function(c){const h=Date.now(),b=r[i];o||(o=h),t[s]=c,r[s]=h;let w=i,D=0;for(;w!==s;)D+=t[w++],w=w%n;if(s=(s+1)%n,s===i&&(i=(i+1)%n),h-o<e)return;const E=b&&h-b;return E?Math.round(D*1e3/E):void 0}}function eu(n,e){let t=0;const r=By(50,250);return s=>{const i=s.loaded,o=s.lengthComputable?s.total:void 0,a=i-t,c=r(a),h=i<=o;t=i;const b={loaded:i,total:o,progress:o?i/o:void 0,bytes:a,rate:c||void 0,estimated:c&&o&&h?(o-i)/c:void 0,event:s};b[e?"download":"upload"]=!0,n(b)}}const xy=typeof XMLHttpRequest<"u",Cy=xy&&function(n){return new Promise(function(t,r){let s=n.data;const i=rn.from(n.headers).normalize(),o=n.responseType;let a;function c(){n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}q.isFormData(s)&&(Dn.isStandardBrowserEnv||Dn.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.setContentType("multipart/form-data;",!1));let h=new XMLHttpRequest;if(n.auth){const E=n.auth.username||"",g=n.auth.password?unescape(encodeURIComponent(n.auth.password)):"";i.set("Authorization","Basic "+btoa(E+":"+g))}const b=F0(n.baseURL,n.url);h.open(n.method.toUpperCase(),S0(b,n.params,n.paramsSerializer),!0),h.timeout=n.timeout;function w(){if(!h)return;const E=rn.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),S={data:!o||o==="text"||o==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:E,config:n,request:h};py(function(M){t(M),c()},function(M){r(M),c()},S),h=null}if("onloadend"in h?h.onloadend=w:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(w)},h.onabort=function(){h&&(r(new De("Request aborted",De.ECONNABORTED,n,h)),h=null)},h.onerror=function(){r(new De("Network Error",De.ERR_NETWORK,n,h)),h=null},h.ontimeout=function(){let g=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const S=n.transitional||D0;n.timeoutErrorMessage&&(g=n.timeoutErrorMessage),r(new De(g,S.clarifyTimeoutError?De.ETIMEDOUT:De.ECONNABORTED,n,h)),h=null},Dn.isStandardBrowserEnv){const E=(n.withCredentials||wy(b))&&n.xsrfCookieName&&gy.read(n.xsrfCookieName);E&&i.set(n.xsrfHeaderName,E)}s===void 0&&i.setContentType(null),"setRequestHeader"in h&&q.forEach(i.toJSON(),function(g,S){h.setRequestHeader(S,g)}),q.isUndefined(n.withCredentials)||(h.withCredentials=!!n.withCredentials),o&&o!=="json"&&(h.responseType=n.responseType),typeof n.onDownloadProgress=="function"&&h.addEventListener("progress",eu(n.onDownloadProgress,!0)),typeof n.onUploadProgress=="function"&&h.upload&&h.upload.addEventListener("progress",eu(n.onUploadProgress)),(n.cancelToken||n.signal)&&(a=E=>{h&&(r(!E||E.type?new ii(null,n,h):E),h.abort(),h=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const D=Ey(b);if(D&&Dn.protocols.indexOf(D)===-1){r(new De("Unsupported protocol "+D+":",De.ERR_BAD_REQUEST,n));return}h.send(s||null)})},_i={http:Xg,xhr:Cy};q.forEach(_i,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const Sy={getAdapter:n=>{n=q.isArray(n)?n:[n];const{length:e}=n;let t,r;for(let s=0;s<e&&(t=n[s],!(r=q.isString(t)?_i[t.toLowerCase()]:t));s++);if(!r)throw r===!1?new De(`Adapter ${t} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(q.hasOwnProp(_i,t)?`Adapter '${t}' is not available in the build`:`Unknown adapter '${t}'`);if(!q.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:_i};function Da(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new ii(null,n)}function tu(n){return Da(n),n.headers=rn.from(n.headers),n.data=Sa.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Sy.getAdapter(n.adapter||hs.adapter)(n).then(function(r){return Da(n),r.data=Sa.call(n,n.transformResponse,r),r.headers=rn.from(r.headers),r},function(r){return k0(r)||(Da(n),r&&r.response&&(r.response.data=Sa.call(n,n.transformResponse,r.response),r.response.headers=rn.from(r.response.headers))),Promise.reject(r)})}const nu=n=>n instanceof rn?n.toJSON():n;function Qr(n,e){e=e||{};const t={};function r(h,b,w){return q.isPlainObject(h)&&q.isPlainObject(b)?q.merge.call({caseless:w},h,b):q.isPlainObject(b)?q.merge({},b):q.isArray(b)?b.slice():b}function s(h,b,w){if(q.isUndefined(b)){if(!q.isUndefined(h))return r(void 0,h,w)}else return r(h,b,w)}function i(h,b){if(!q.isUndefined(b))return r(void 0,b)}function o(h,b){if(q.isUndefined(b)){if(!q.isUndefined(h))return r(void 0,h)}else return r(void 0,b)}function a(h,b,w){if(w in e)return r(h,b);if(w in n)return r(void 0,h)}const c={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(h,b)=>s(nu(h),nu(b),!0)};return q.forEach(Object.keys(Object.assign({},n,e)),function(b){const w=c[b]||s,D=w(n[b],e[b],b);q.isUndefined(D)&&w!==a||(t[b]=D)}),t}const T0="1.4.0",ll={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{ll[n]=function(r){return typeof r===n||"a"+(e<1?"n ":" ")+n}});const ru={};ll.transitional=function(e,t,r){function s(i,o){return"[Axios v"+T0+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(e===!1)throw new De(s(o," has been removed"+(t?" in "+t:"")),De.ERR_DEPRECATED);return t&&!ru[o]&&(ru[o]=!0,console.warn(s(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(i,o,a):!0}};function Dy(n,e,t){if(typeof n!="object")throw new De("options must be an object",De.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let s=r.length;for(;s-- >0;){const i=r[s],o=e[i];if(o){const a=n[i],c=a===void 0||o(a,i,n);if(c!==!0)throw new De("option "+i+" must be "+c,De.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new De("Unknown option "+i,De.ERR_BAD_OPTION)}}const pc={assertOptions:Dy,validators:ll},Qn=pc.validators;let xr=class{constructor(e){this.defaults=e,this.interceptors={request:new Jd,response:new Jd}}request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Qr(this.defaults,t);const{transitional:r,paramsSerializer:s,headers:i}=t;r!==void 0&&pc.assertOptions(r,{silentJSONParsing:Qn.transitional(Qn.boolean),forcedJSONParsing:Qn.transitional(Qn.boolean),clarifyTimeoutError:Qn.transitional(Qn.boolean)},!1),s!=null&&(q.isFunction(s)?t.paramsSerializer={serialize:s}:pc.assertOptions(s,{encode:Qn.function,serialize:Qn.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o;o=i&&q.merge(i.common,i[t.method]),o&&q.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),t.headers=rn.concat(o,i);const a=[];let c=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(t)===!1||(c=c&&S.synchronous,a.unshift(S.fulfilled,S.rejected))});const h=[];this.interceptors.response.forEach(function(S){h.push(S.fulfilled,S.rejected)});let b,w=0,D;if(!c){const g=[tu.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,h),D=g.length,b=Promise.resolve(t);w<D;)b=b.then(g[w++],g[w++]);return b}D=a.length;let E=t;for(w=0;w<D;){const g=a[w++],S=a[w++];try{E=g(E)}catch(T){S.call(this,T);break}}try{b=tu.call(this,E)}catch(g){return Promise.reject(g)}for(w=0,D=h.length;w<D;)b=b.then(h[w++],h[w++]);return b}getUri(e){e=Qr(this.defaults,e);const t=F0(e.baseURL,e.url);return S0(t,e.params,e.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(e){xr.prototype[e]=function(t,r){return this.request(Qr(r||{},{method:e,url:t,data:(r||{}).data}))}});q.forEach(["post","put","patch"],function(e){function t(r){return function(i,o,a){return this.request(Qr(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}xr.prototype[e]=t(),xr.prototype[e+"Form"]=t(!0)});let vy=class I0{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(i){t=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},e(function(i,o,a){r.reason||(r.reason=new ii(i,o,a),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}static source(){let e;return{token:new I0(function(s){e=s}),cancel:e}}};function ky(n){return function(t){return n.apply(null,t)}}function Fy(n){return q.isObject(n)&&n.isAxiosError===!0}const gc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(gc).forEach(([n,e])=>{gc[e]=n});function U0(n){const e=new xr(n),t=h0(xr.prototype.request,e);return q.extend(t,xr.prototype,e,{allOwnKeys:!0}),q.extend(t,e,null,{allOwnKeys:!0}),t.create=function(s){return U0(Qr(n,s))},t}const ve=U0(hs);ve.Axios=xr;ve.CanceledError=ii;ve.CancelToken=vy;ve.isCancel=k0;ve.VERSION=T0;ve.toFormData=So;ve.AxiosError=De;ve.Cancel=ve.CanceledError;ve.all=function(e){return Promise.all(e)};ve.spread=ky;ve.isAxiosError=Fy;ve.mergeConfig=Qr;ve.AxiosHeaders=rn;ve.formToJSON=n=>v0(q.isHTMLForm(n)?new FormData(n):n);ve.HttpStatusCode=gc;ve.default=ve;const{Axios:G6,AxiosError:Y6,CanceledError:X6,isCancel:Z6,CancelToken:J6,VERSION:Q6,all:eA,Cancel:tA,isAxiosError:nA,spread:rA,toFormData:sA,AxiosHeaders:iA,HttpStatusCode:oA,formToJSON:aA,mergeConfig:cA}=ve,Bn=60*1e3,_0={Mainnet:{api:"https://api.wormholescan.io",circleAPI:bd("Mainnet"),chains:Ea("Mainnet")},Testnet:{api:"https://api.testnet.wormholescan.io",circleAPI:bd("Testnet"),chains:Ea("Testnet")},Devnet:{api:"http://guardian:7071",circleAPI:"",chains:Ea("Devnet")}};function M0(n,e){return Object.fromEntries(Object.entries(_0[n].chains).filter(([t,r])=>r.platform==e))}function Ty(n,e){let t=_0[n];return e?dl(t,e):t}function Iy(n,e,t){const r=M0(n,e);return t?dl(r,t):r}function dl(n,e){n||(n={});for(const[t,r]of Object.entries(e))typeof r=="object"&&!Array.isArray(r)?n[t]=dl(n[t],r):n[t]=r;return n}const Uy=typeof je.process<"u";Uy&&je.process.env.NETWORK;async function Mr(n,e,t=Bn,r){const s=Math.floor(t/e);let i=0;return new Promise((o,a)=>{n().then(c=>{if(c!==null){o(c);return}let h=setInterval(async()=>{if(i>=s){clearInterval(h),o(null);return}const b=await n();b!==null?(clearInterval(h),o(b)):r&&console.log(`Retrying ${r}, attempt ${i}/${s} `),i++},e)})})}const _y=2e3;var su;(function(n){n.complete="complete",n.pending_confirmations="pending_confirmations"})(su||(su={}));const My=n=>({message:n.attestation,status:n.status});async function Ry(n,e){var r;const t=`${n}/${e}`;try{const s=await ve.get(t),i=My(s==null?void 0:s.data);return i.message==="PENDING"?null:i.message}catch(s){if(!s||typeof s=="object"&&(ve.isAxiosError(s)&&((r=s.response)==null?void 0:r.status)===404||"status"in s&&s.status===404))return null;throw s}}async function Wy(n,e,t){return Mr(()=>Ry(n,e),_y,t,"Circle:GetAttestation")}async function Hs(n,e,t){if(!vp(t))throw new Error("Invalid signer, not SignAndSendSigner or SignOnlySigner");return(await Py(e,async i=>ol(t)?t.signAndSend(i):n.sendWait(await t.sign(i)))).map(i=>({chain:n.chain,txid:i}))}async function Py(n,e){const t=[];let r=[];for await(const s of n)s.parallelizable?r.push(s):(r.length>0&&(t.push(...await e(r)),r=[]),t.push(...await e([s])));return r.length>0&&t.push(...await e(r)),t}exports.TransferState=void 0;(function(n){n[n.Failed=-1]="Failed",n[n.Created=0]="Created",n[n.SourceInitiated=1]="SourceInitiated",n[n.SourceFinalized=2]="SourceFinalized",n[n.InReview=3]="InReview",n[n.Attested=4]="Attested",n[n.Refunded=5]="Refunded",n[n.DestinationInitiated=6]="DestinationInitiated",n[n.DestinationQueued=7]="DestinationQueued",n[n.DestinationFinalized=8]="DestinationFinalized"})(exports.TransferState||(exports.TransferState={}));function ul(n){return n.state===exports.TransferState.SourceInitiated}function qs(n){return n.state===exports.TransferState.SourceFinalized}function iu(n){return n.state===exports.TransferState.InReview}function Ks(n){return n.state===exports.TransferState.Attested}function Ly(n){return n.state===exports.TransferState.Refunded}function fl(n){return n.state===exports.TransferState.DestinationInitiated}function Oy(n){return n.state===exports.TransferState.DestinationQueued}function Ny(n){return n.state===exports.TransferState.DestinationFinalized}function zy(n){return n.state<0}class xt{constructor(e,t,r,s){se(this,"wh");se(this,"fromChain");se(this,"toChain");se(this,"_state");se(this,"transfer");se(this,"txids",[]);se(this,"attestations");this._state=exports.TransferState.Created,this.wh=e,this.transfer=t,this.fromChain=r??e.getChain(t.from.chain),this.toChain=s??e.getChain(t.to.chain)}getTransferState(){return this._state}static async from(e,t,r=Bn,s,i){if(_p(t))return t={...t,...await xt.destinationOverrides(e.getChain(t.from.chain),e.getChain(t.to.chain),t)},new xt(e,t,s,i);let o;if(Br(t))o=await xt.fromWormholeMessageId(e,t,r);else if(s0(t))o=await xt.fromTransaction(e,t,r,s);else if(Vi(t))o=await xt.fromCircleMessage(e,t);else throw new Error("Invalid `from` parameter for CircleTransfer");return o.fromChain=s??e.getChain(o.transfer.from.chain),o.toChain=i??e.getChain(o.transfer.to.chain),await o.fetchAttestation(r),o}static async fromWormholeMessageId(e,t,r){const{chain:s,emitter:i}=t,o=await xt.getTransferVaa(e,t),a=o.payload.mintRecipient,c=ki(e.network,o.payload.targetDomain),{wormholeRelayer:h}=e.config.chains[c].contracts.cctp;let b=!1;if(h){const E=sn.chainAddress(s,h).address.toUniversalAddress();b=o.payloadName==="TransferWithRelay"&&a.equals(E)}const w={from:{chain:t.chain,address:o.payload.caller},to:{chain:c,address:a},amount:o.payload.token.amount,automatic:b},D=new xt(e,w);return D.attestations=[{id:{emitter:i,sequence:o.sequence,chain:s},attestation:o}],D._state=exports.TransferState.Attested,D}static async fromCircleMessage(e,t){const[r,s]=exports.CircleBridge.deserialize(Tt.decode(t)),{payload:i}=r,o=i.messageSender,a=i.mintRecipient,c=ki(e.network,r.sourceDomain),h=ki(e.network,r.destinationDomain),b={from:{chain:c,address:o},to:{chain:h,address:a},amount:i.amount,automatic:!1},w=new xt(e,b);return w.attestations=[{id:{hash:s},attestation:{message:r}}],w._state=exports.TransferState.SourceInitiated,w}static async fromTransaction(e,t,r,s){const{chain:i,txid:o}=t;s=s??e.getChain(i);let a=[];try{a=await s.parseTransaction(o)}catch(h){if(!(h.message.includes("no bridge messages found")||h.message.includes("not found")))throw h}let c;if(a.length>0)c=await xt.fromWormholeMessageId(e,a[0],r);else{const b=await(await s.getCircleBridge()).parseTransactionDetails(o),w={...b,automatic:!1};c=new xt(e,w),c.attestations=[{id:b.id,attestation:{message:b.message}}]}return c._state=exports.TransferState.SourceInitiated,c.txids=[t],c}async initiateTransfer(e){if(this._state!==exports.TransferState.Created)throw new Error("Invalid state transition in `start`");return this.txids=await xt.transfer(this.fromChain,this.transfer,e),this._state=exports.TransferState.SourceInitiated,this.txids.map(({txid:t})=>t)}async _fetchWormholeAttestation(e){let t=this.attestations??[];if(!t||t.length==0)throw new Error("No VAA details available");for(const r in t)t[r].attestation||(t[r].attestation=await xt.getTransferVaa(this.wh,t[r].id,e));return this.attestations=t,t.map(r=>r.id)}async _fetchCircleAttestation(e){var r,s;let t=this.attestations??[];if(!t||t.length==0){if(this.txids.length===0)throw new Error("No circle attestations or transactions to fetch");const i=this.txids[((r=this.txids)==null?void 0:r.length)-1],c=await(await this.wh.getChain(this.transfer.from.chain).getCircleBridge()).parseTransactionDetails(i.txid);t=[{id:c.id,attestation:{message:c.message}}]}for(const i in t){const o=t[i];if((s=o.attestation)!=null&&s.attestation)continue;const a=await this.wh.getCircleAttestation(o.id.hash,e);if(a===null)throw new Error("No attestation available after timeout exhausted");t[i].attestation.attestation=a}return this.attestations=t,t.map(i=>i.id)}async fetchAttestation(e){if(this._state<exports.TransferState.SourceInitiated)throw new Error("Invalid state transition in `fetchAttestation`");const t=this.transfer.automatic?(await Promise.all([this._fetchWormholeAttestation(e),this._fetchCircleAttestation(e)])).flat():await this._fetchCircleAttestation(e);if(this._state=exports.TransferState.Attested,this.attestations&&this.attestations.length>0)for(const r of this.attestations){const{attestation:s}=r;if(!exports.CircleBridge.isCircleAttestation(s))continue;await xt.isTransferComplete(this.toChain,s)&&(this._state=exports.TransferState.DestinationFinalized)}return t}async completeTransfer(e){var w;if(this._state<exports.TransferState.Attested)throw new Error("Invalid state transition in `finish`");if(this.transfer.automatic)throw this.attestations?this.attestations.find(E=>Br(E.id))?new Error("No method to redeem auto circle bridge tx (yet)"):new Error("No VAA found"):new Error("No VAA details available");if(!this.attestations)throw new Error("No Circle Attestations found");const t=this.attestations.filter(D=>Vi(D.id));if(t.length>1)throw new Error(`Expected a single circle attestation, found ${t.length}`);const{id:r,attestation:s}=t[0];if(!s)throw new Error(`No Circle Attestation for ${r.hash}`);const{message:i,attestation:o}=s;if(!o)throw new Error(`No Circle Attestation for ${r.hash}`);const a=await this.toChain.getCircleBridge(),c=sn.parseAddress(e.chain(),e.address()),h=a.redeem(c,i,o),b=await Hs(this.toChain,h,e);return(w=this.txids)==null||w.push(...b),b.map(({txid:D})=>D)}}(function(n){async function e(h,b,w){let D;return b.automatic?D=(await h.getAutomaticCircleBridge()).transfer(b.from.address,{chain:b.to.chain,address:b.to.address},b.amount,b.nativeGas):D=(await h.getCircleBridge()).transfer(b.from.address,{chain:b.to.chain,address:b.to.address},b.amount),await Hs(h,D,w)}n.transfer=e;async function*t(h,b,w=Bn,D,E){var T,M;const g=Date.now(),S=(N,_)=>Math.max(_-(Date.now()-N),0);if(D=D??h.getChain(b.from),E=E??h.getChain(b.to),ul(b)){if(b.originTxs.length===0)throw"Invalid state transition: no originating transactions";const N=b.originTxs[b.originTxs.length-1],_=await n.getTransferMessage(D,N.txid);b={...b,attestation:{id:_.id,attestation:{message:_.message}},state:exports.TransferState.SourceFinalized},yield b}if(qs(b)){if(!b.attestation)throw"Invalid state transition: no attestation id";if(Br(b.attestation.id)){let N=b.attestation.attestation?b.attestation.attestation:void 0;N||(N=await n.getTransferVaa(h,b.attestation.id,S(g,w)),b={...b,attestation:{id:b.attestation.id,attestation:N},state:exports.TransferState.Attested},yield b)}else if(Vi(b.attestation.id)){const N=await h.getCircleAttestation(b.attestation.id.hash,w),_=b.originTxs[b.originTxs.length-1],L=await(await D.getCircleBridge()).parseTransactionDetails(_.txid);N&&(b={...b,attestation:{id:b.attestation.id,attestation:{attestation:N,message:L.message}},state:exports.TransferState.Attested},yield b)}}if(Ks(b)||qs(b)){if(!b.attestation)throw"Invalid state transition";if(Br(b.attestation.id)){const N=await h.getTransactionStatus(b.attestation.id,S(g,w));if(N&&((M=(T=N.globalTx)==null?void 0:T.destinationTx)!=null&&M.txHash)){const{chainId:_,txHash:U}=N.globalTx.destinationTx;b={...b,destinationTxs:[{chain:os(_),txid:U}],state:exports.TransferState.DestinationInitiated},yield b}}}(Ks(b)||fl(b))&&(await n.isTransferComplete(E,b.attestation.attestation)&&(b={...b,state:exports.TransferState.DestinationFinalized,destinationTxs:[]}),yield b)}n.track=t;async function r(h,b,w){const D={...w};if(w.to.chain==="Solana"&&!D.automatic){const E=sn.parseAddress("Solana",Is.get(b.network,b.chain));D.to=await b.getTokenAccount(D.to.address,E)}return D}n.destinationOverrides=r;async function s(h,b,w){if(!Ws(b.network,b.chain))throw new Error(`Invalid destination chain ${b.chain} for Circle transfer`);const D=Is.get(b.network,b.chain);if(!D)throw"Invalid transfer, no USDC contract on destination";if(!Ws(h.network,h.chain))throw new Error(`Invalid source chain ${h.chain} for Circle transfer`);const E=Is.get(h.network,h.chain);if(!E)throw"Invalid transfer, no USDC contract on source";const g=sn.chainAddress(b.chain,D),S=sn.chainAddress(h.chain,E),T=(h.chain==="Polygon"?2e3*200:Lc(h.chain))+zc,M=w.automatic?Rs(0,5,0):Rs(24,0,0);if(!w.automatic)return{sourceToken:{token:S,amount:w.amount},destinationToken:{token:g,amount:w.amount},eta:T,expires:M};let N=w.amount;const _=w.nativeGas?w.nativeGas:0n;N-=_;const L=await(await h.getAutomaticCircleBridge()).getRelayerFee(b.chain);N-=L;let H=0n;return w.nativeGas&&(H=await(await b.getAutomaticCircleBridge()).nativeTokenAmount(_)),{sourceToken:{token:S,amount:w.amount},destinationToken:{token:g,amount:N},relayFee:{token:S,amount:L},destinationNativeGas:H,eta:T,expires:M}}n.quoteTransfer=s;async function i(h,b){if(!exports.CircleBridge.isCircleAttestation(b))throw new Error("Must check for completion with circle message");return await(await h.getCircleBridge()).isTransferCompleted(b.message)}n.isTransferComplete=i;async function o(h,b,w){const D=await h.getVaa(b,"AutomaticCircleBridge:TransferWithRelay",w);if(!D)throw new Error("No VAA available after timeout exhausted");return D}n.getTransferVaa=o;async function a(h,b){return await(await h.getCircleBridge()).parseTransactionDetails(b)}n.getTransferMessage=a;function c(h){var N,_;const{from:b,to:w}=h.transfer;let D={from:b.chain,to:w.chain,state:exports.TransferState.Created};const E=h.txids.filter(U=>U.chain===h.transfer.from.chain);E.length>0&&(D={...D,state:exports.TransferState.SourceInitiated,originTxs:E});const g=((N=h.attestations)==null?void 0:N.filter(U=>Br(U.id)))??[],S=((_=h.attestations)==null?void 0:_.filter(U=>Vi(U.id)))??[],T=S.length>0?S[0]:g.length>0?g[0]:void 0;T&&T.id&&(D={...D,state:exports.TransferState.SourceFinalized,attestation:T},T.attestation&&(D={...D,state:exports.TransferState.Attested,attestation:{id:T.id,attestation:T.attestation}}));const M=h.txids.filter(U=>U.chain===h.transfer.to.chain);return M.length>0&&(D={...D,state:exports.TransferState.DestinationInitiated,destinationTxs:M}),D}n.getReceipt=c})(xt||(xt={}));const Do=2e3;async function R0(n,e){var c;const{chain:t,emitter:r,sequence:s}=e,i=Qs(t),o=Yu("0x",r.toString()),a=`${n}/v1/signed_vaa/${i}/${o}/${s}`;try{const{data:{vaaBytes:h}}=await ve.get(a);return fo.decode(h)}catch(h){if(!h||typeof h=="object"&&(ve.isAxiosError(h)&&((c=h.response)==null?void 0:c.status)===404||"status"in h&&h.status===404))return null;throw h}}async function Hy(n,e,t){return await Mr(()=>R0(n,e),Do,t,"Wormholescan:GetVaaBytes")}async function qy(n,e,t){const r=await R0(n,e);return r?Ns(t,r):null}async function Ky(n,e,t,r){return await Mr(()=>qy(n,e,t),Do,r,"Wormholescan:GetVaaBytes")}async function jy(n,e){var c;const{chain:t,emitter:r,sequence:s}=e,i=Qs(t),o=r.toUniversalAddress().toString(),a=`${n}/api/v1/transactions/${i}/${o}/${s}`;try{return(await ve.get(a)).data}catch(h){if(!h||typeof h=="object"&&(ve.isAxiosError(h)&&((c=h.response)==null?void 0:c.status)===404||"status"in h&&h.status===404))return null;throw h}}async function $y(n,e,t){return await Mr(()=>jy(n,e),Do,t,"Wormholescan:GetTransactionStatus")}async function Vy(n,e){var r;const t=`${n}/api/v1/vaas?txHash=${e}`;try{const s=await ve.get(t);if(s.data.data.length>0)return s.data.data[0]}catch(s){if(!s||typeof s=="object"&&(ve.isAxiosError(s)&&((r=s.response)==null?void 0:r.status)===404||"status"in s&&s.status===404))return null;throw s}return null}async function ou(n,e,t,r){const i=await Mr(()=>Vy(n,e),Do,r,"Wormholescan:GetVaaByTxHash");return i?Ns(t,fo.decode(i.vaa)):null}async function Gy(n,e,t=50,r=0){var i;const s=`${n}/api/v1/transactions?address=${e}&pageSize=${t}&page=${r}`;try{const o=await ve.get(s);if(o.data.transactions.length>0)return o.data.transactions}catch(o){if(!o||typeof o=="object"&&(ve.isAxiosError(o)&&((i=o.response)==null?void 0:i.status)===404||"status"in o&&o.status===404))return null;throw o}return null}async function Yy(n){const e=`${n}/v1/governor/token_list`;try{const t=await ve.get(e);if(t.data&&t.data.entries.length>0)return t.data.entries.reduce((r,s)=>{const i=os(s.originChainId);return r[i]=r[i]||{},r[i][s.originAddress]=s.price,r},{})}catch{}return null}async function Xy(n){const e=`${n}/v1/governor/available_notional_by_chain`;try{const t=await ve.get(e);if(t.data&&t.data.entries.length>0)return t.data.entries.reduce((r,s)=>{const i=s.bigTransactionSize==="0"?void 0:Fs(Si(s.bigTransactionSize,2));return r[os(s.chainId)]={available:Fs(Si(s.remainingAvailableNotional,2)),limit:Fs(Si(s.notionalLimit,2)),maxSize:i},r},{})}catch{}return null}async function Zy(n,e){const{chain:t,emitter:r,sequence:s}=e,i=Qs(t),o=r.toUniversalAddress().toString(),a=`${n}/v1/governor/is_vaa_enqueued/${i}/${o}/${s}`;return(await ve.get(a)).data.isEnqueued}class At{constructor(e,t,r,s){se(this,"wh");se(this,"fromChain");se(this,"toChain");se(this,"_state");se(this,"transfer");se(this,"txids",[]);se(this,"attestations");this._state=exports.TransferState.Created,this.wh=e,this.transfer=t,this.fromChain=r??e.getChain(t.from.chain),this.toChain=s??e.getChain(t.to.chain)}getTransferState(){return this._state}static async from(e,t,r=6e3,s,i){if(qp(t))return s=s??e.getChain(t.from.chain),i=i??e.getChain(t.to.chain),At.validateTransferDetails(e,t,s,i),t={...t,...await At.destinationOverrides(s,i,t)},new At(e,t,s,i);let o;if(Br(t))o=await At.fromIdentifier(e,t,r);else if(s0(t))o=await At.fromTransaction(e,t,r,s);else throw new Error("Invalid `from` parameter for TokenTransfer");return o.fromChain=s??e.getChain(o.transfer.from.chain),o.toChain=i??e.getChain(o.transfer.to.chain),await o.fetchAttestation(r),o}static async fromIdentifier(e,t,r){const s=await At.getTransferVaa(e,t,r);if(!s)throw new Error("VAA not found");const i=s.protocolName==="AutomaticTokenBridge";let o={chain:s.emitterChain,address:s.emitterAddress},{token:a,to:c}=s.payload,h;if(a.chain===o.chain)h=await e.getTokenNativeAddress(o.chain,a.chain,a.address);else{const M=await(await(await e.getChain(o.chain)).getTokenBridge()).getWrappedAsset(a);h=cr(o.chain,M.toString())}const b=await e.getDecimals(o.chain,h),w=ks(Vr(a.amount,Math.min(b,At.MAX_DECIMALS)),b);let D=0n;i&&(D=s.payload.payload.toNativeTokenAmount,o={chain:s.emitterChain,address:s.payload.from},c={chain:s.payload.to.chain,address:s.payload.payload.targetRecipient});const E={token:a,amount:wn(w),from:o,to:c,automatic:i,nativeGas:D},g=new At(e,E);return g.attestations=[{id:t,attestation:s}],g._state=exports.TransferState.Attested,g}static async fromTransaction(e,t,r,s){s=s??e.getChain(t.chain);const i=await At.getTransferMessage(s,t.txid,r),o=await At.fromIdentifier(e,i,r);return o.txids=[t],o}async initiateTransfer(e){if(this._state!==exports.TransferState.Created)throw new Error("Invalid state transition in `initiateTransfer`");return this.txids=await At.transfer(this.fromChain,this.transfer,e),this._state=exports.TransferState.SourceInitiated,this.txids.map(({txid:t})=>t)}async fetchAttestation(e){if(this._state<exports.TransferState.SourceInitiated||this._state>exports.TransferState.Attested)throw new Error("Invalid state transition in `fetchAttestation`, expected at least `SourceInitiated`");if(!this.attestations||this.attestations.length===0){if(this.txids.length===0)throw new Error("No VAAs set and txids available to look them up");const t=this.txids[this.txids.length-1],r=await At.getTransferMessage(this.fromChain,t.txid,e);this.attestations=[{id:r}]}for(const t in this.attestations){if(this.attestations[t].attestation)continue;const r=await At.getTransferVaa(this.wh,this.attestations[t].id,e);if(!r)throw new Error("VAA not found");this.attestations[t].attestation=r}if(this._state=exports.TransferState.Attested,this.attestations.length>0){const{attestation:t}=this.attestations[0];await At.isTransferComplete(this.toChain,t)&&(this._state=exports.TransferState.DestinationFinalized)}return this.attestations.map(t=>t.id)}async completeTransfer(e){if(this._state<exports.TransferState.Attested)throw new Error("Invalid state transition, must be attested prior to calling `completeTransfer`.");if(!this.attestations)throw new Error("No VAA details available");const{attestation:t}=this.attestations[0];if(!t)throw new Error(`No VAA found for ${this.attestations[0].id.sequence}`);const r=await At.redeem(this.toChain,t,e);return this.txids.push(...r),this._state=exports.TransferState.DestinationInitiated,r.map(({txid:s})=>s)}}(function(n){n.MAX_DECIMALS=8;async function e(E,g,S){const T=cr(S.chain(),S.address()),M=wo(g.token)?g.token.address:g.token;let N;return g.automatic?N=(await E.getAutomaticTokenBridge()).transfer(T,g.to,M,g.amount,g.nativeGas):N=(await E.getTokenBridge()).transfer(T,g.to,M,g.amount,g.payload),Hs(E,N,S)}n.transfer=e;async function t(E,g,S){const T=cr(S.chain(),S.address()),M=g.protocolName==="AutomaticTokenBridge"?(await E.getAutomaticTokenBridge()).redeem(T,g):(await E.getTokenBridge()).redeem(T,g);return Hs(E,M,S)}n.redeem=t;async function*r(E,g,S=Bn,T,M){var U,L;const N=Date.now(),_=(H,K)=>Math.max(K-(Date.now()-H),0);if(T=T??E.getChain(g.from),ul(g)){if(g.originTxs.length===0)throw"Origin transactions required to fetch message id";const{txid:H}=g.originTxs[g.originTxs.length-1],K=await n.getTransferMessage(T,H,_(N,S));g={...g,state:exports.TransferState.SourceFinalized,attestation:{id:K}},yield g}if(qs(g)||iu(g)){if(!g.attestation.id)throw"Attestation id required to fetch attestation";const{id:H}=g.attestation,K=await n.getTransferVaa(E,H,_(N,S));throw K?(g={...g,attestation:{id:H,attestation:K},state:exports.TransferState.Attested},yield g):await n.isTransferEnqueued(E,H)&&(g={...g,state:exports.TransferState.InReview},yield g),new Error("Attestation not found")}if(Ks(g)||qs(g)||iu(g)){if(!g.attestation.id)throw"Attestation id required to fetch redeem tx";const{id:H}=g.attestation,K=await E.getTransactionStatus(H,_(N,S));if(K&&((L=(U=K.globalTx)==null?void 0:U.destinationTx)!=null&&L.txHash)){const{chainId:V,txHash:ee}=K.globalTx.destinationTx;g={...g,destinationTxs:[{chain:os(V),txid:ee}],state:exports.TransferState.DestinationInitiated}}yield g}if(Ks(g)||fl(g)){if(!g.attestation.attestation)throw"Signed Attestation required to check for redeem";if(g.attestation.attestation.payloadName==="AttestMeta")throw new Error("Unable to track an AttestMeta receipt");await n.isTransferComplete(M??E.getChain(g.attestation.attestation.payload.to.chain),g.attestation.attestation)&&(g={...g,state:exports.TransferState.DestinationFinalized}),yield g}yield g}n.track=r;function s(E){const{transfer:g}=E,S=g.from.chain,T=g.to.chain;let M={from:S,to:T,state:exports.TransferState.Created};const N=E.txids.filter(H=>H.chain===g.from.chain);N.length>0&&(M={...M,state:exports.TransferState.SourceInitiated,originTxs:N});const _=E.attestations&&E.attestations.length>0?E.attestations[0]:void 0,U=_&&_.id?{id:_.id,attestation:_.attestation}:void 0;U&&U.id&&(M={...M,state:exports.TransferState.SourceFinalized,attestation:{id:U.id}},U.attestation&&(M={...M,state:exports.TransferState.Attested,attestation:{id:U.id,attestation:U.attestation}}));const L=E.txids.filter(H=>H.chain===g.to.chain);return L.length>0&&(M={...M,state:exports.TransferState.DestinationFinalized,destinationTxs:L}),M}n.getReceipt=s;async function i(E,g,S){let T;const M=await E.getTokenBridge();if(Lt(S.address)){const U=await M.getWrappedNative();T={chain:S.chain,address:await M.getTokenUniversalAddress(U)}}else try{let U;Ot.instanceof(S.address)?U=await M.getWrappedAsset(S):U=S.address,T=await M.getOriginalAsset(U)}catch(U){if(!U.message.includes("not a wrapped asset"))throw U;let L;Ot.instanceof(S.address)?L=await M.getTokenNativeAddress(E.chain,S.address):L=S.address,T={chain:S.chain,address:await M.getTokenUniversalAddress(L)}}const N=await g.getTokenBridge();if(T.chain===g.chain){const U=await N.getTokenNativeAddress(T.chain,T.address),L=await N.getWrappedNative();return In({chain:g.chain,address:L})===In({chain:g.chain,address:U})?{chain:g.chain,address:"native"}:{chain:g.chain,address:U}}const _=await N.getWrappedAsset(T);return{chain:g.chain,address:_}}n.lookupDestinationToken=i;async function o(E,g){return g.protocolName==="AutomaticTokenBridge"&&(g=Ns("TokenBridge:TransferWithPayload",lc(g))),(await E.getTokenBridge()).isTransferCompleted(g)}n.isTransferComplete=o;async function a(E,g,S){const T=await sn.parseMessageFromTx(E,g,S);if(T.length!==1)throw new Error("Expected a single Wormhole Message, got: "+T.length);return T[0]}n.getTransferMessage=a;async function c(E,g,S){const T=await E.getVaa(g,fc.getTransferDiscriminator(),S);if(!T)return null;if(T.payloadName==="TransferWithPayload"){const{chain:M,address:N}=T.payload.to,{tokenBridgeRelayer:_}=E.config.chains[M].contracts,U=_?Xf(M,_):null;if(U&&N.equals(U))return Ns("AutomaticTokenBridge:TransferWithRelay",lc(T))}return T}n.getTransferVaa=c;async function h(E,g){return await E.getIsVaaEnqueued(g)}n.isTransferEnqueued=h;function b(E,g,S,T){if(g.amount===0n)throw new Error("Amount cannot be 0");if(g.from.chain===g.to.chain)throw new Error("Cannot transfer to the same chain");if(S=S??E.getChain(g.from.chain),T=T??E.getChain(g.to.chain),g.automatic){if(g.payload)throw new Error("Payload with automatic delivery is not supported");if(!S.supportsAutomaticTokenBridge())throw new Error(`Automatic Token Bridge not supported on ${g.from.chain}`);if(!T.supportsAutomaticTokenBridge())throw new Error(`Automatic Token Bridge not supported on ${g.to.chain}`);const M=g.nativeGas??0n;if(M>g.amount)throw new Error(`Native gas amount > amount (${M} > ${g.amount})`)}else{if(g.nativeGas)throw new Error("Gas Dropoff is only supported for automatic transfers");if(!S.supportsTokenBridge())throw new Error(`Token Bridge not supported on ${g.from.chain}`);if(!T.supportsTokenBridge())throw new Error(`Token Bridge not supported on ${g.to.chain}`)}}n.validateTransferDetails=b;async function w(E,g,S,T){const M=await g.getTokenBridge();let N;if(Lt(T.token.address))N=await M.getWrappedNative();else if(Ot.instanceof(T.token.address))try{N=await M.getWrappedAsset(T.token)}catch(y){if(!y.message.includes("not a wrapped asset"))throw y;N=await M.getTokenNativeAddress(g.chain,T.token.address)}else N=T.token.address;sn.tokenId(g.chain,N.toString());const _=await g.getDecimals(N),U=Vr(T.amount,_),L=Di(U,n.MAX_DECIMALS),[H,K]=await Promise.all([Yy(E.config.api),Xy(E.config.api)]),V=[];if(K!==null&&g.chain in K&&H!==null){let y;if(Lt(T.token.address))y={chain:g.chain,address:await M.getTokenUniversalAddress(N)};else try{y=await M.getOriginalAsset(T.token.address)}catch(u){if(!u.message.includes("not a wrapped asset"))throw u;y={chain:g.chain,address:await M.getTokenUniversalAddress(N)}}if(y.chain in H&&y.address.toString()in H[y.chain]){const u=K[g.chain],G=H[y.chain][y.address.toString()]*Fs(L);u.maxSize&&G>u.maxSize&&V.push({type:"GovernorLimitWarning",reason:"ExceedsLargeTransferLimit"}),G>u.available&&V.push({type:"GovernorLimitWarning",reason:"ExceedsRemainingNotional"})}}const ee=await n.lookupDestinationToken(g,S,T.token),re=await S.getDecimals(ee.address),$=ks(L,re),ie=Lc(g.chain)+zc;if(!T.automatic)return{sourceToken:{token:T.token,amount:wn(L)},destinationToken:{token:ee,amount:wn($)},warnings:V.length>0?V:void 0,eta:ie,expires:Rs(24,0,0)};const l=await(await g.getAutomaticTokenBridge()).getRelayerFee(S.chain,N),m=ks(Di(Vr(l,_),n.MAX_DECIMALS),re),p=T.nativeGas??0n,C=wn(ks(Di(Vr(p,_),n.MAX_DECIMALS),re)),B=890880n;let x=0n;if(T.nativeGas){const y=await S.getAutomaticTokenBridge(),[u,k]=await Promise.all([y.maxSwapAmount(ee.address),y.nativeTokenAmount(ee.address,C)]);if(C>u)throw new Error(`Native gas amount exceeds maximum swap amount: ${ad(C,re)}>${ad(u,re)}`);if(S.chain==="Solana"&&k<B)throw new Error(`Native gas amount must be at least ${B} lamports`);x=k}const I=wn($)-C-wn(m);if(ee.chain==="Solana"){const y=await S.getNativeWrappedTokenId();if((Lt(ee.address)||n0(ee,y))&&I<B)throw new Error(`Destination amount must be at least ${B} lamports`)}return{sourceToken:{token:T.token,amount:wn(L)},destinationToken:{token:ee,amount:I},relayFee:{token:ee,amount:wn(m)},destinationNativeGas:x,warnings:V.length>0?V:void 0,eta:ie,expires:Rs(0,5,0)}}n.quoteTransfer=w;async function D(E,g,S){const T={...S};if(S.to.chain==="Solana"&&!T.automatic){const M=await n.lookupDestinationToken(E,g,T.token);if(Lt(M.address)){const N=await g.getNativeWrappedTokenId();T.to=await g.getTokenAccount(T.to.address,N.address)}else T.to=await g.getTokenAccount(T.to.address,M.address)}if(T.to.chain==="Sei"){if(T.to.chain==="Sei"&&T.payload)throw new Error("Arbitrary payloads unsupported for Sei");T.payload=Nt.encode(JSON.stringify({basic_recipient:{recipient:fo.encode(T.to.address.toString())}}));const M=g.config.contracts.translator;if(M===void 0||M==="")throw new Error("Unexpected empty translator address");T.to=sn.chainAddress(T.to.chain,M)}return T}n.destinationOverrides=D})(At||(At={}));function Jy(n){if(n.length===0)return[];const{chain:e}=n[0];if(!n.every(t=>t.chain===e))throw new Error("Not every chain is equal");return Array.from(new Set(n.map(t=>In(t)))).map(t=>sn.tokenId(e,t))}async function Qy(n,e,t){const r=In(e),s=n.config.tokenMap?cs.byAddress(n.config.tokenMap,r):void 0,i=s?s.symbol:void 0,o=Lt(e.address)?await n.getNativeWrappedTokenId():void 0;return t=t??await n.getDecimals(e.address),{id:e,decimals:t,wrapped:o,symbol:i}}class W0{constructor(e,t){se(this,"wh");se(this,"routeConstructors");se(this,"inputTokenList");this.wh=e,this.routeConstructors=t}async supportedDestinationTokens(e,t,r){const[,s]=r0(t.network,t.chain,e),i=await Promise.all(this.routeConstructors.map(async o=>{if(!o.supportedNetworks().includes(t.network))return[];const c=o.supportedChains(t.network);if(!c.includes(t.chain)||!c.includes(r.chain))return[];try{return await o.supportedDestinationTokens(s,t,r)}catch{return[]}}));return Jy(i.flat())}async findRoutes(e){return(await Promise.all(this.routeConstructors.map(async r=>{try{const s=r.supportedNetworks().includes(this.wh.network)&&r.supportedChains(this.wh.network).includes(e.toChain.chain)&&r.supportedChains(this.wh.network).includes(e.fromChain.chain),i=In(Lt(e.destination.id.address)?e.destination.wrapped:e.destination.id),o=(await r.supportedDestinationTokens(e.source.id,e.fromChain,e.toChain)).filter(a=>In(a)===i).length>0;return s&&o}catch{return!1}})).then(r=>this.routeConstructors.filter((s,i)=>r[i]))).map(r=>new r(this.wh))}}class sn{constructor(e,t,r){se(this,"_network");se(this,"_platforms");se(this,"_chains");se(this,"config");this._network=e,this.config=Ty(e,r),this._chains=new Map,this._platforms=new Map;for(const s of t)this._platforms.set(s._platform,new s(e,this.config.chains))}get network(){return this._network}async circleTransfer(e,t,r,s,i,o){if(s&&i)throw new Error("Payload with automatic delivery is not supported");if(!Ws(this.network,t.chain)||!Ws(this.network,r.chain)||!gd(this.network,t.chain)||!gd(this.network,r.chain))throw new Error(`Network and chain not supported: ${this.network} ${t.chain} `);if(s){const h=await(await this.getChain(t.chain).getAutomaticCircleBridge()).getRelayerFee(r.chain)+(o||0n);if(e<h)throw new Error(`Amount must be > ${h} (relayerFee + nativeGas)`)}return await xt.from(this,{amount:e,from:t,to:r,automatic:s,payload:i,nativeGas:o})}async tokenTransfer(e,t,r,s,i,o,a){return await At.from(this,{token:e,amount:t,from:r,to:s,automatic:i,payload:o,nativeGas:a})}resolver(e){return new W0(this,e)}getContracts(e){var t;return(t=this.config.chains[e])==null?void 0:t.contracts}getPlatform(e){const t=this._platforms.get(e);if(!t)throw new Error(`Not able to retrieve platform ${e}. Did it get registered in the constructor?`);return t}getChain(e){const t=as(e);return this._chains.has(e)||this._chains.set(e,this.getPlatform(t).getChain(e)),this._chains.get(e)}async getWrappedAsset(e,t){const s=await this.getChain(e).getTokenBridge();return{chain:e,address:await s.getWrappedAsset(t)}}async getOriginalAsset(e){return await(await this.getChain(e.chain).getTokenBridge()).getOriginalAsset(e.address)}async getTokenUniversalAddress(e,t){return await(await this.getChain(e).getTokenBridge()).getTokenUniversalAddress(t)}async getTokenNativeAddress(e,t,r){return await(await this.getChain(e).getTokenBridge()).getTokenNativeAddress(t,r)}async getDecimals(e,t){return await this.getChain(e).getDecimals(t)}async getBalance(e,t,r){return this.getChain(e).getBalance(r,t)}async getTokenAccount(e,t){return this.getChain(e.chain).getTokenAccount(e.address,t.address)}async getVaaBytes(e,t=Bn){return await Hy(this.config.api,e,t)}async getVaa(e,t,r=Bn){return typeof e=="string"?await ou(this.config.api,e,t,r):await Ky(this.config.api,e,t,r)}async getIsVaaEnqueued(e){return await Zy(this.config.api,e)}async getCircleAttestation(e,t=Bn){return Wy(this.config.circleAPI,e,t)}async getTransactionStatus(e,t=Bn){let r;if(typeof e=="string"){const s=await ou(this.config.api,e,"Uint8Array",t);if(!s)return null;r={emitter:s.emitterAddress,chain:s.emitterChain,sequence:s.sequence}}else r=e;return await $y(this.config.api,r,t)}async getTransactionsForAddress(e,t=50,r=0){return Gy(this.config.api,e,t,r)}static parseAddress(e,t){return cr(e,t)}static canonicalAddress(e){return In(e)}static chainAddress(e,t){return{chain:e,address:sn.parseAddress(e,t)}}static tokenId(e,t){return Lt(t)?t0(e):this.chainAddress(e,t)}static async parseMessageFromTx(e,t,r=Bn){const i=await Mr(async()=>{try{const o=await e.parseTransaction(t);return o.length===0?null:o}catch(o){return console.error(o),null}},e.config.blockTime,r,"WormholeCore:ParseMessageFromTransaction");if(!i)throw new Error(`No WormholeMessageId found for ${t}`);return i}}class vo{constructor(e){se(this,"wh");this.wh=e}transferUrl(e){return`https://wormholescan.io/#/tx/${e}?network=${this.wh.network}`}}class P0 extends vo{}se(P0,"IS_AUTOMATIC",!0);function e2(n){return!!n.constructor.IS_AUTOMATIC}class yc extends vo{}se(yc,"NATIVE_GAS_DROPOFF_SUPPORTED",!1),se(yc,"IS_AUTOMATIC",!1);function t2(n){return n.complete!==void 0}class n2 extends vo{}function r2(n){return n.finalize!==void 0}var Ac={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(n,e){var t=ae,r=t.Buffer;function s(o,a){for(var c in o)a[c]=o[c]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?n.exports=t:(s(t,e),e.Buffer=i);function i(o,a,c){return r(o,a,c)}i.prototype=Object.create(r.prototype),s(r,i),i.from=function(o,a,c){if(typeof o=="number")throw new TypeError("Argument must not be a number");return r(o,a,c)},i.alloc=function(o,a,c){if(typeof o!="number")throw new TypeError("Argument must be a number");var h=r(o);return a!==void 0?typeof c=="string"?h.fill(a,c):h.fill(a):h.fill(0),h},i.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r(o)},i.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(o)}})(Ac,Ac.exports);var L0=Ac.exports,hl={exports:{}};hl.exports;(function(n){(function(e,t){function r(F,l){if(!F)throw new Error(l||"Assertion failed")}function s(F,l){F.super_=l;var m=function(){};m.prototype=l.prototype,F.prototype=new m,F.prototype.constructor=F}function i(F,l,m){if(i.isBN(F))return F;this.negative=0,this.words=null,this.length=0,this.red=null,F!==null&&((l==="le"||l==="be")&&(m=l,l=10),this._init(F||0,l||10,m||"be"))}typeof e=="object"?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=ae.Buffer}catch{}i.isBN=function(l){return l instanceof i?!0:l!==null&&typeof l=="object"&&l.constructor.wordSize===i.wordSize&&Array.isArray(l.words)},i.max=function(l,m){return l.cmp(m)>0?l:m},i.min=function(l,m){return l.cmp(m)<0?l:m},i.prototype._init=function(l,m,p){if(typeof l=="number")return this._initNumber(l,m,p);if(typeof l=="object")return this._initArray(l,m,p);m==="hex"&&(m=16),r(m===(m|0)&&m>=2&&m<=36),l=l.toString().replace(/\s+/g,"");var C=0;l[0]==="-"&&(C++,this.negative=1),C<l.length&&(m===16?this._parseHex(l,C,p):(this._parseBase(l,m,C),p==="le"&&this._initArray(this.toArray(),m,p)))},i.prototype._initNumber=function(l,m,p){l<0&&(this.negative=1,l=-l),l<67108864?(this.words=[l&67108863],this.length=1):l<4503599627370496?(this.words=[l&67108863,l/67108864&67108863],this.length=2):(r(l<9007199254740992),this.words=[l&67108863,l/67108864&67108863,1],this.length=3),p==="le"&&this._initArray(this.toArray(),m,p)},i.prototype._initArray=function(l,m,p){if(r(typeof l.length=="number"),l.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(l.length/3),this.words=new Array(this.length);for(var C=0;C<this.length;C++)this.words[C]=0;var B,x,I=0;if(p==="be")for(C=l.length-1,B=0;C>=0;C-=3)x=l[C]|l[C-1]<<8|l[C-2]<<16,this.words[B]|=x<<I&67108863,this.words[B+1]=x>>>26-I&67108863,I+=24,I>=26&&(I-=26,B++);else if(p==="le")for(C=0,B=0;C<l.length;C+=3)x=l[C]|l[C+1]<<8|l[C+2]<<16,this.words[B]|=x<<I&67108863,this.words[B+1]=x>>>26-I&67108863,I+=24,I>=26&&(I-=26,B++);return this._strip()};function a(F,l){var m=F.charCodeAt(l);if(m>=48&&m<=57)return m-48;if(m>=65&&m<=70)return m-55;if(m>=97&&m<=102)return m-87;r(!1,"Invalid character in "+F)}function c(F,l,m){var p=a(F,m);return m-1>=l&&(p|=a(F,m-1)<<4),p}i.prototype._parseHex=function(l,m,p){this.length=Math.ceil((l.length-m)/6),this.words=new Array(this.length);for(var C=0;C<this.length;C++)this.words[C]=0;var B=0,x=0,I;if(p==="be")for(C=l.length-1;C>=m;C-=2)I=c(l,m,C)<<B,this.words[x]|=I&67108863,B>=18?(B-=18,x+=1,this.words[x]|=I>>>26):B+=8;else{var y=l.length-m;for(C=y%2===0?m+1:m;C<l.length;C+=2)I=c(l,m,C)<<B,this.words[x]|=I&67108863,B>=18?(B-=18,x+=1,this.words[x]|=I>>>26):B+=8}this._strip()};function h(F,l,m,p){for(var C=0,B=0,x=Math.min(F.length,m),I=l;I<x;I++){var y=F.charCodeAt(I)-48;C*=p,y>=49?B=y-49+10:y>=17?B=y-17+10:B=y,r(y>=0&&B<p,"Invalid character"),C+=B}return C}i.prototype._parseBase=function(l,m,p){this.words=[0],this.length=1;for(var C=0,B=1;B<=67108863;B*=m)C++;C--,B=B/m|0;for(var x=l.length-p,I=x%C,y=Math.min(x,x-I)+p,u=0,k=p;k<y;k+=C)u=h(l,k,k+C,m),this.imuln(B),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(I!==0){var G=1;for(u=h(l,k,l.length,m),k=0;k<I;k++)G*=m;this.imuln(G),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},i.prototype.copy=function(l){l.words=new Array(this.length);for(var m=0;m<this.length;m++)l.words[m]=this.words[m];l.length=this.length,l.negative=this.negative,l.red=this.red};function b(F,l){F.words=l.words,F.length=l.length,F.negative=l.negative,F.red=l.red}if(i.prototype._move=function(l){b(l,this)},i.prototype.clone=function(){var l=new i(null);return this.copy(l),l},i.prototype._expand=function(l){for(;this.length<l;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=w}catch{i.prototype.inspect=w}else i.prototype.inspect=w;function w(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var D=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],E=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],g=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(l,m){l=l||10,m=m|0||1;var p;if(l===16||l==="hex"){p="";for(var C=0,B=0,x=0;x<this.length;x++){var I=this.words[x],y=((I<<C|B)&16777215).toString(16);B=I>>>24-C&16777215,C+=2,C>=26&&(C-=26,x--),B!==0||x!==this.length-1?p=D[6-y.length]+y+p:p=y+p}for(B!==0&&(p=B.toString(16)+p);p.length%m!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}if(l===(l|0)&&l>=2&&l<=36){var u=E[l],k=g[l];p="";var G=this.clone();for(G.negative=0;!G.isZero();){var Y=G.modrn(k).toString(l);G=G.idivn(k),G.isZero()?p=Y+p:p=D[u-Y.length]+Y+p}for(this.isZero()&&(p="0"+p);p.length%m!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var l=this.words[0];return this.length===2?l+=this.words[1]*67108864:this.length===3&&this.words[2]===1?l+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-l:l},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(l,m){return this.toArrayLike(o,l,m)}),i.prototype.toArray=function(l,m){return this.toArrayLike(Array,l,m)};var S=function(l,m){return l.allocUnsafe?l.allocUnsafe(m):new l(m)};i.prototype.toArrayLike=function(l,m,p){this._strip();var C=this.byteLength(),B=p||Math.max(1,C);r(C<=B,"byte array longer than desired length"),r(B>0,"Requested array length <= 0");var x=S(l,B),I=m==="le"?"LE":"BE";return this["_toArrayLike"+I](x,C),x},i.prototype._toArrayLikeLE=function(l,m){for(var p=0,C=0,B=0,x=0;B<this.length;B++){var I=this.words[B]<<x|C;l[p++]=I&255,p<l.length&&(l[p++]=I>>8&255),p<l.length&&(l[p++]=I>>16&255),x===6?(p<l.length&&(l[p++]=I>>24&255),C=0,x=0):(C=I>>>24,x+=2)}if(p<l.length)for(l[p++]=C;p<l.length;)l[p++]=0},i.prototype._toArrayLikeBE=function(l,m){for(var p=l.length-1,C=0,B=0,x=0;B<this.length;B++){var I=this.words[B]<<x|C;l[p--]=I&255,p>=0&&(l[p--]=I>>8&255),p>=0&&(l[p--]=I>>16&255),x===6?(p>=0&&(l[p--]=I>>24&255),C=0,x=0):(C=I>>>24,x+=2)}if(p>=0)for(l[p--]=C;p>=0;)l[p--]=0},Math.clz32?i.prototype._countBits=function(l){return 32-Math.clz32(l)}:i.prototype._countBits=function(l){var m=l,p=0;return m>=4096&&(p+=13,m>>>=13),m>=64&&(p+=7,m>>>=7),m>=8&&(p+=4,m>>>=4),m>=2&&(p+=2,m>>>=2),p+m},i.prototype._zeroBits=function(l){if(l===0)return 26;var m=l,p=0;return m&8191||(p+=13,m>>>=13),m&127||(p+=7,m>>>=7),m&15||(p+=4,m>>>=4),m&3||(p+=2,m>>>=2),m&1||p++,p},i.prototype.bitLength=function(){var l=this.words[this.length-1],m=this._countBits(l);return(this.length-1)*26+m};function T(F){for(var l=new Array(F.bitLength()),m=0;m<l.length;m++){var p=m/26|0,C=m%26;l[m]=F.words[p]>>>C&1}return l}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var l=0,m=0;m<this.length;m++){var p=this._zeroBits(this.words[m]);if(l+=p,p!==26)break}return l},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(l){return this.negative!==0?this.abs().inotn(l).iaddn(1):this.clone()},i.prototype.fromTwos=function(l){return this.testn(l-1)?this.notn(l).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(l){for(;this.length<l.length;)this.words[this.length++]=0;for(var m=0;m<l.length;m++)this.words[m]=this.words[m]|l.words[m];return this._strip()},i.prototype.ior=function(l){return r((this.negative|l.negative)===0),this.iuor(l)},i.prototype.or=function(l){return this.length>l.length?this.clone().ior(l):l.clone().ior(this)},i.prototype.uor=function(l){return this.length>l.length?this.clone().iuor(l):l.clone().iuor(this)},i.prototype.iuand=function(l){var m;this.length>l.length?m=l:m=this;for(var p=0;p<m.length;p++)this.words[p]=this.words[p]&l.words[p];return this.length=m.length,this._strip()},i.prototype.iand=function(l){return r((this.negative|l.negative)===0),this.iuand(l)},i.prototype.and=function(l){return this.length>l.length?this.clone().iand(l):l.clone().iand(this)},i.prototype.uand=function(l){return this.length>l.length?this.clone().iuand(l):l.clone().iuand(this)},i.prototype.iuxor=function(l){var m,p;this.length>l.length?(m=this,p=l):(m=l,p=this);for(var C=0;C<p.length;C++)this.words[C]=m.words[C]^p.words[C];if(this!==m)for(;C<m.length;C++)this.words[C]=m.words[C];return this.length=m.length,this._strip()},i.prototype.ixor=function(l){return r((this.negative|l.negative)===0),this.iuxor(l)},i.prototype.xor=function(l){return this.length>l.length?this.clone().ixor(l):l.clone().ixor(this)},i.prototype.uxor=function(l){return this.length>l.length?this.clone().iuxor(l):l.clone().iuxor(this)},i.prototype.inotn=function(l){r(typeof l=="number"&&l>=0);var m=Math.ceil(l/26)|0,p=l%26;this._expand(m),p>0&&m--;for(var C=0;C<m;C++)this.words[C]=~this.words[C]&67108863;return p>0&&(this.words[C]=~this.words[C]&67108863>>26-p),this._strip()},i.prototype.notn=function(l){return this.clone().inotn(l)},i.prototype.setn=function(l,m){r(typeof l=="number"&&l>=0);var p=l/26|0,C=l%26;return this._expand(p+1),m?this.words[p]=this.words[p]|1<<C:this.words[p]=this.words[p]&~(1<<C),this._strip()},i.prototype.iadd=function(l){var m;if(this.negative!==0&&l.negative===0)return this.negative=0,m=this.isub(l),this.negative^=1,this._normSign();if(this.negative===0&&l.negative!==0)return l.negative=0,m=this.isub(l),l.negative=1,m._normSign();var p,C;this.length>l.length?(p=this,C=l):(p=l,C=this);for(var B=0,x=0;x<C.length;x++)m=(p.words[x]|0)+(C.words[x]|0)+B,this.words[x]=m&67108863,B=m>>>26;for(;B!==0&&x<p.length;x++)m=(p.words[x]|0)+B,this.words[x]=m&67108863,B=m>>>26;if(this.length=p.length,B!==0)this.words[this.length]=B,this.length++;else if(p!==this)for(;x<p.length;x++)this.words[x]=p.words[x];return this},i.prototype.add=function(l){var m;return l.negative!==0&&this.negative===0?(l.negative=0,m=this.sub(l),l.negative^=1,m):l.negative===0&&this.negative!==0?(this.negative=0,m=l.sub(this),this.negative=1,m):this.length>l.length?this.clone().iadd(l):l.clone().iadd(this)},i.prototype.isub=function(l){if(l.negative!==0){l.negative=0;var m=this.iadd(l);return l.negative=1,m._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(l),this.negative=1,this._normSign();var p=this.cmp(l);if(p===0)return this.negative=0,this.length=1,this.words[0]=0,this;var C,B;p>0?(C=this,B=l):(C=l,B=this);for(var x=0,I=0;I<B.length;I++)m=(C.words[I]|0)-(B.words[I]|0)+x,x=m>>26,this.words[I]=m&67108863;for(;x!==0&&I<C.length;I++)m=(C.words[I]|0)+x,x=m>>26,this.words[I]=m&67108863;if(x===0&&I<C.length&&C!==this)for(;I<C.length;I++)this.words[I]=C.words[I];return this.length=Math.max(this.length,I),C!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(l){return this.clone().isub(l)};function M(F,l,m){m.negative=l.negative^F.negative;var p=F.length+l.length|0;m.length=p,p=p-1|0;var C=F.words[0]|0,B=l.words[0]|0,x=C*B,I=x&67108863,y=x/67108864|0;m.words[0]=I;for(var u=1;u<p;u++){for(var k=y>>>26,G=y&67108863,Y=Math.min(u,l.length-1),J=Math.max(0,u-F.length+1);J<=Y;J++){var de=u-J|0;C=F.words[de]|0,B=l.words[J]|0,x=C*B+G,k+=x/67108864|0,G=x&67108863}m.words[u]=G|0,y=k|0}return y!==0?m.words[u]=y|0:m.length--,m._strip()}var N=function(l,m,p){var C=l.words,B=m.words,x=p.words,I=0,y,u,k,G=C[0]|0,Y=G&8191,J=G>>>13,de=C[1]|0,ce=de&8191,ue=de>>>13,$e=C[2]|0,Be=$e&8191,be=$e>>>13,Pe=C[3]|0,pe=Pe&8191,Se=Pe>>>13,jt=C[4]|0,Re=jt&8191,qe=jt>>>13,Nr=C[5]|0,Ne=Nr&8191,We=Nr>>>13,Xt=C[6]|0,Ke=Xt&8191,Xe=Xt>>>13,ln=C[7]|0,Ze=ln&8191,A=ln>>>13,d=C[8]|0,f=d&8191,v=d>>>13,R=C[9]|0,W=R&8191,z=R>>>13,ge=B[0]|0,me=ge&8191,he=ge>>>13,ze=B[1]|0,fe=ze&8191,nt=ze>>>13,jl=B[2]|0,rt=jl&8191,st=jl>>>13,$l=B[3]|0,it=$l&8191,ot=$l>>>13,Vl=B[4]|0,at=Vl&8191,ct=Vl>>>13,Gl=B[5]|0,lt=Gl&8191,dt=Gl>>>13,Yl=B[6]|0,ut=Yl&8191,ft=Yl>>>13,Xl=B[7]|0,ht=Xl&8191,mt=Xl>>>13,Zl=B[8]|0,bt=Zl&8191,pt=Zl>>>13,Jl=B[9]|0,gt=Jl&8191,yt=Jl>>>13;p.negative=l.negative^m.negative,p.length=19,y=Math.imul(Y,me),u=Math.imul(Y,he),u=u+Math.imul(J,me)|0,k=Math.imul(J,he);var $o=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+($o>>>26)|0,$o&=67108863,y=Math.imul(ce,me),u=Math.imul(ce,he),u=u+Math.imul(ue,me)|0,k=Math.imul(ue,he),y=y+Math.imul(Y,fe)|0,u=u+Math.imul(Y,nt)|0,u=u+Math.imul(J,fe)|0,k=k+Math.imul(J,nt)|0;var Vo=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(Vo>>>26)|0,Vo&=67108863,y=Math.imul(Be,me),u=Math.imul(Be,he),u=u+Math.imul(be,me)|0,k=Math.imul(be,he),y=y+Math.imul(ce,fe)|0,u=u+Math.imul(ce,nt)|0,u=u+Math.imul(ue,fe)|0,k=k+Math.imul(ue,nt)|0,y=y+Math.imul(Y,rt)|0,u=u+Math.imul(Y,st)|0,u=u+Math.imul(J,rt)|0,k=k+Math.imul(J,st)|0;var Go=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(Go>>>26)|0,Go&=67108863,y=Math.imul(pe,me),u=Math.imul(pe,he),u=u+Math.imul(Se,me)|0,k=Math.imul(Se,he),y=y+Math.imul(Be,fe)|0,u=u+Math.imul(Be,nt)|0,u=u+Math.imul(be,fe)|0,k=k+Math.imul(be,nt)|0,y=y+Math.imul(ce,rt)|0,u=u+Math.imul(ce,st)|0,u=u+Math.imul(ue,rt)|0,k=k+Math.imul(ue,st)|0,y=y+Math.imul(Y,it)|0,u=u+Math.imul(Y,ot)|0,u=u+Math.imul(J,it)|0,k=k+Math.imul(J,ot)|0;var Yo=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(Yo>>>26)|0,Yo&=67108863,y=Math.imul(Re,me),u=Math.imul(Re,he),u=u+Math.imul(qe,me)|0,k=Math.imul(qe,he),y=y+Math.imul(pe,fe)|0,u=u+Math.imul(pe,nt)|0,u=u+Math.imul(Se,fe)|0,k=k+Math.imul(Se,nt)|0,y=y+Math.imul(Be,rt)|0,u=u+Math.imul(Be,st)|0,u=u+Math.imul(be,rt)|0,k=k+Math.imul(be,st)|0,y=y+Math.imul(ce,it)|0,u=u+Math.imul(ce,ot)|0,u=u+Math.imul(ue,it)|0,k=k+Math.imul(ue,ot)|0,y=y+Math.imul(Y,at)|0,u=u+Math.imul(Y,ct)|0,u=u+Math.imul(J,at)|0,k=k+Math.imul(J,ct)|0;var Xo=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(Xo>>>26)|0,Xo&=67108863,y=Math.imul(Ne,me),u=Math.imul(Ne,he),u=u+Math.imul(We,me)|0,k=Math.imul(We,he),y=y+Math.imul(Re,fe)|0,u=u+Math.imul(Re,nt)|0,u=u+Math.imul(qe,fe)|0,k=k+Math.imul(qe,nt)|0,y=y+Math.imul(pe,rt)|0,u=u+Math.imul(pe,st)|0,u=u+Math.imul(Se,rt)|0,k=k+Math.imul(Se,st)|0,y=y+Math.imul(Be,it)|0,u=u+Math.imul(Be,ot)|0,u=u+Math.imul(be,it)|0,k=k+Math.imul(be,ot)|0,y=y+Math.imul(ce,at)|0,u=u+Math.imul(ce,ct)|0,u=u+Math.imul(ue,at)|0,k=k+Math.imul(ue,ct)|0,y=y+Math.imul(Y,lt)|0,u=u+Math.imul(Y,dt)|0,u=u+Math.imul(J,lt)|0,k=k+Math.imul(J,dt)|0;var Zo=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(Zo>>>26)|0,Zo&=67108863,y=Math.imul(Ke,me),u=Math.imul(Ke,he),u=u+Math.imul(Xe,me)|0,k=Math.imul(Xe,he),y=y+Math.imul(Ne,fe)|0,u=u+Math.imul(Ne,nt)|0,u=u+Math.imul(We,fe)|0,k=k+Math.imul(We,nt)|0,y=y+Math.imul(Re,rt)|0,u=u+Math.imul(Re,st)|0,u=u+Math.imul(qe,rt)|0,k=k+Math.imul(qe,st)|0,y=y+Math.imul(pe,it)|0,u=u+Math.imul(pe,ot)|0,u=u+Math.imul(Se,it)|0,k=k+Math.imul(Se,ot)|0,y=y+Math.imul(Be,at)|0,u=u+Math.imul(Be,ct)|0,u=u+Math.imul(be,at)|0,k=k+Math.imul(be,ct)|0,y=y+Math.imul(ce,lt)|0,u=u+Math.imul(ce,dt)|0,u=u+Math.imul(ue,lt)|0,k=k+Math.imul(ue,dt)|0,y=y+Math.imul(Y,ut)|0,u=u+Math.imul(Y,ft)|0,u=u+Math.imul(J,ut)|0,k=k+Math.imul(J,ft)|0;var Jo=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(Jo>>>26)|0,Jo&=67108863,y=Math.imul(Ze,me),u=Math.imul(Ze,he),u=u+Math.imul(A,me)|0,k=Math.imul(A,he),y=y+Math.imul(Ke,fe)|0,u=u+Math.imul(Ke,nt)|0,u=u+Math.imul(Xe,fe)|0,k=k+Math.imul(Xe,nt)|0,y=y+Math.imul(Ne,rt)|0,u=u+Math.imul(Ne,st)|0,u=u+Math.imul(We,rt)|0,k=k+Math.imul(We,st)|0,y=y+Math.imul(Re,it)|0,u=u+Math.imul(Re,ot)|0,u=u+Math.imul(qe,it)|0,k=k+Math.imul(qe,ot)|0,y=y+Math.imul(pe,at)|0,u=u+Math.imul(pe,ct)|0,u=u+Math.imul(Se,at)|0,k=k+Math.imul(Se,ct)|0,y=y+Math.imul(Be,lt)|0,u=u+Math.imul(Be,dt)|0,u=u+Math.imul(be,lt)|0,k=k+Math.imul(be,dt)|0,y=y+Math.imul(ce,ut)|0,u=u+Math.imul(ce,ft)|0,u=u+Math.imul(ue,ut)|0,k=k+Math.imul(ue,ft)|0,y=y+Math.imul(Y,ht)|0,u=u+Math.imul(Y,mt)|0,u=u+Math.imul(J,ht)|0,k=k+Math.imul(J,mt)|0;var Qo=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(Qo>>>26)|0,Qo&=67108863,y=Math.imul(f,me),u=Math.imul(f,he),u=u+Math.imul(v,me)|0,k=Math.imul(v,he),y=y+Math.imul(Ze,fe)|0,u=u+Math.imul(Ze,nt)|0,u=u+Math.imul(A,fe)|0,k=k+Math.imul(A,nt)|0,y=y+Math.imul(Ke,rt)|0,u=u+Math.imul(Ke,st)|0,u=u+Math.imul(Xe,rt)|0,k=k+Math.imul(Xe,st)|0,y=y+Math.imul(Ne,it)|0,u=u+Math.imul(Ne,ot)|0,u=u+Math.imul(We,it)|0,k=k+Math.imul(We,ot)|0,y=y+Math.imul(Re,at)|0,u=u+Math.imul(Re,ct)|0,u=u+Math.imul(qe,at)|0,k=k+Math.imul(qe,ct)|0,y=y+Math.imul(pe,lt)|0,u=u+Math.imul(pe,dt)|0,u=u+Math.imul(Se,lt)|0,k=k+Math.imul(Se,dt)|0,y=y+Math.imul(Be,ut)|0,u=u+Math.imul(Be,ft)|0,u=u+Math.imul(be,ut)|0,k=k+Math.imul(be,ft)|0,y=y+Math.imul(ce,ht)|0,u=u+Math.imul(ce,mt)|0,u=u+Math.imul(ue,ht)|0,k=k+Math.imul(ue,mt)|0,y=y+Math.imul(Y,bt)|0,u=u+Math.imul(Y,pt)|0,u=u+Math.imul(J,bt)|0,k=k+Math.imul(J,pt)|0;var ea=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(ea>>>26)|0,ea&=67108863,y=Math.imul(W,me),u=Math.imul(W,he),u=u+Math.imul(z,me)|0,k=Math.imul(z,he),y=y+Math.imul(f,fe)|0,u=u+Math.imul(f,nt)|0,u=u+Math.imul(v,fe)|0,k=k+Math.imul(v,nt)|0,y=y+Math.imul(Ze,rt)|0,u=u+Math.imul(Ze,st)|0,u=u+Math.imul(A,rt)|0,k=k+Math.imul(A,st)|0,y=y+Math.imul(Ke,it)|0,u=u+Math.imul(Ke,ot)|0,u=u+Math.imul(Xe,it)|0,k=k+Math.imul(Xe,ot)|0,y=y+Math.imul(Ne,at)|0,u=u+Math.imul(Ne,ct)|0,u=u+Math.imul(We,at)|0,k=k+Math.imul(We,ct)|0,y=y+Math.imul(Re,lt)|0,u=u+Math.imul(Re,dt)|0,u=u+Math.imul(qe,lt)|0,k=k+Math.imul(qe,dt)|0,y=y+Math.imul(pe,ut)|0,u=u+Math.imul(pe,ft)|0,u=u+Math.imul(Se,ut)|0,k=k+Math.imul(Se,ft)|0,y=y+Math.imul(Be,ht)|0,u=u+Math.imul(Be,mt)|0,u=u+Math.imul(be,ht)|0,k=k+Math.imul(be,mt)|0,y=y+Math.imul(ce,bt)|0,u=u+Math.imul(ce,pt)|0,u=u+Math.imul(ue,bt)|0,k=k+Math.imul(ue,pt)|0,y=y+Math.imul(Y,gt)|0,u=u+Math.imul(Y,yt)|0,u=u+Math.imul(J,gt)|0,k=k+Math.imul(J,yt)|0;var ta=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(ta>>>26)|0,ta&=67108863,y=Math.imul(W,fe),u=Math.imul(W,nt),u=u+Math.imul(z,fe)|0,k=Math.imul(z,nt),y=y+Math.imul(f,rt)|0,u=u+Math.imul(f,st)|0,u=u+Math.imul(v,rt)|0,k=k+Math.imul(v,st)|0,y=y+Math.imul(Ze,it)|0,u=u+Math.imul(Ze,ot)|0,u=u+Math.imul(A,it)|0,k=k+Math.imul(A,ot)|0,y=y+Math.imul(Ke,at)|0,u=u+Math.imul(Ke,ct)|0,u=u+Math.imul(Xe,at)|0,k=k+Math.imul(Xe,ct)|0,y=y+Math.imul(Ne,lt)|0,u=u+Math.imul(Ne,dt)|0,u=u+Math.imul(We,lt)|0,k=k+Math.imul(We,dt)|0,y=y+Math.imul(Re,ut)|0,u=u+Math.imul(Re,ft)|0,u=u+Math.imul(qe,ut)|0,k=k+Math.imul(qe,ft)|0,y=y+Math.imul(pe,ht)|0,u=u+Math.imul(pe,mt)|0,u=u+Math.imul(Se,ht)|0,k=k+Math.imul(Se,mt)|0,y=y+Math.imul(Be,bt)|0,u=u+Math.imul(Be,pt)|0,u=u+Math.imul(be,bt)|0,k=k+Math.imul(be,pt)|0,y=y+Math.imul(ce,gt)|0,u=u+Math.imul(ce,yt)|0,u=u+Math.imul(ue,gt)|0,k=k+Math.imul(ue,yt)|0;var na=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(na>>>26)|0,na&=67108863,y=Math.imul(W,rt),u=Math.imul(W,st),u=u+Math.imul(z,rt)|0,k=Math.imul(z,st),y=y+Math.imul(f,it)|0,u=u+Math.imul(f,ot)|0,u=u+Math.imul(v,it)|0,k=k+Math.imul(v,ot)|0,y=y+Math.imul(Ze,at)|0,u=u+Math.imul(Ze,ct)|0,u=u+Math.imul(A,at)|0,k=k+Math.imul(A,ct)|0,y=y+Math.imul(Ke,lt)|0,u=u+Math.imul(Ke,dt)|0,u=u+Math.imul(Xe,lt)|0,k=k+Math.imul(Xe,dt)|0,y=y+Math.imul(Ne,ut)|0,u=u+Math.imul(Ne,ft)|0,u=u+Math.imul(We,ut)|0,k=k+Math.imul(We,ft)|0,y=y+Math.imul(Re,ht)|0,u=u+Math.imul(Re,mt)|0,u=u+Math.imul(qe,ht)|0,k=k+Math.imul(qe,mt)|0,y=y+Math.imul(pe,bt)|0,u=u+Math.imul(pe,pt)|0,u=u+Math.imul(Se,bt)|0,k=k+Math.imul(Se,pt)|0,y=y+Math.imul(Be,gt)|0,u=u+Math.imul(Be,yt)|0,u=u+Math.imul(be,gt)|0,k=k+Math.imul(be,yt)|0;var ra=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(ra>>>26)|0,ra&=67108863,y=Math.imul(W,it),u=Math.imul(W,ot),u=u+Math.imul(z,it)|0,k=Math.imul(z,ot),y=y+Math.imul(f,at)|0,u=u+Math.imul(f,ct)|0,u=u+Math.imul(v,at)|0,k=k+Math.imul(v,ct)|0,y=y+Math.imul(Ze,lt)|0,u=u+Math.imul(Ze,dt)|0,u=u+Math.imul(A,lt)|0,k=k+Math.imul(A,dt)|0,y=y+Math.imul(Ke,ut)|0,u=u+Math.imul(Ke,ft)|0,u=u+Math.imul(Xe,ut)|0,k=k+Math.imul(Xe,ft)|0,y=y+Math.imul(Ne,ht)|0,u=u+Math.imul(Ne,mt)|0,u=u+Math.imul(We,ht)|0,k=k+Math.imul(We,mt)|0,y=y+Math.imul(Re,bt)|0,u=u+Math.imul(Re,pt)|0,u=u+Math.imul(qe,bt)|0,k=k+Math.imul(qe,pt)|0,y=y+Math.imul(pe,gt)|0,u=u+Math.imul(pe,yt)|0,u=u+Math.imul(Se,gt)|0,k=k+Math.imul(Se,yt)|0;var sa=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(sa>>>26)|0,sa&=67108863,y=Math.imul(W,at),u=Math.imul(W,ct),u=u+Math.imul(z,at)|0,k=Math.imul(z,ct),y=y+Math.imul(f,lt)|0,u=u+Math.imul(f,dt)|0,u=u+Math.imul(v,lt)|0,k=k+Math.imul(v,dt)|0,y=y+Math.imul(Ze,ut)|0,u=u+Math.imul(Ze,ft)|0,u=u+Math.imul(A,ut)|0,k=k+Math.imul(A,ft)|0,y=y+Math.imul(Ke,ht)|0,u=u+Math.imul(Ke,mt)|0,u=u+Math.imul(Xe,ht)|0,k=k+Math.imul(Xe,mt)|0,y=y+Math.imul(Ne,bt)|0,u=u+Math.imul(Ne,pt)|0,u=u+Math.imul(We,bt)|0,k=k+Math.imul(We,pt)|0,y=y+Math.imul(Re,gt)|0,u=u+Math.imul(Re,yt)|0,u=u+Math.imul(qe,gt)|0,k=k+Math.imul(qe,yt)|0;var ia=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(ia>>>26)|0,ia&=67108863,y=Math.imul(W,lt),u=Math.imul(W,dt),u=u+Math.imul(z,lt)|0,k=Math.imul(z,dt),y=y+Math.imul(f,ut)|0,u=u+Math.imul(f,ft)|0,u=u+Math.imul(v,ut)|0,k=k+Math.imul(v,ft)|0,y=y+Math.imul(Ze,ht)|0,u=u+Math.imul(Ze,mt)|0,u=u+Math.imul(A,ht)|0,k=k+Math.imul(A,mt)|0,y=y+Math.imul(Ke,bt)|0,u=u+Math.imul(Ke,pt)|0,u=u+Math.imul(Xe,bt)|0,k=k+Math.imul(Xe,pt)|0,y=y+Math.imul(Ne,gt)|0,u=u+Math.imul(Ne,yt)|0,u=u+Math.imul(We,gt)|0,k=k+Math.imul(We,yt)|0;var oa=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(oa>>>26)|0,oa&=67108863,y=Math.imul(W,ut),u=Math.imul(W,ft),u=u+Math.imul(z,ut)|0,k=Math.imul(z,ft),y=y+Math.imul(f,ht)|0,u=u+Math.imul(f,mt)|0,u=u+Math.imul(v,ht)|0,k=k+Math.imul(v,mt)|0,y=y+Math.imul(Ze,bt)|0,u=u+Math.imul(Ze,pt)|0,u=u+Math.imul(A,bt)|0,k=k+Math.imul(A,pt)|0,y=y+Math.imul(Ke,gt)|0,u=u+Math.imul(Ke,yt)|0,u=u+Math.imul(Xe,gt)|0,k=k+Math.imul(Xe,yt)|0;var aa=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(aa>>>26)|0,aa&=67108863,y=Math.imul(W,ht),u=Math.imul(W,mt),u=u+Math.imul(z,ht)|0,k=Math.imul(z,mt),y=y+Math.imul(f,bt)|0,u=u+Math.imul(f,pt)|0,u=u+Math.imul(v,bt)|0,k=k+Math.imul(v,pt)|0,y=y+Math.imul(Ze,gt)|0,u=u+Math.imul(Ze,yt)|0,u=u+Math.imul(A,gt)|0,k=k+Math.imul(A,yt)|0;var ca=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(ca>>>26)|0,ca&=67108863,y=Math.imul(W,bt),u=Math.imul(W,pt),u=u+Math.imul(z,bt)|0,k=Math.imul(z,pt),y=y+Math.imul(f,gt)|0,u=u+Math.imul(f,yt)|0,u=u+Math.imul(v,gt)|0,k=k+Math.imul(v,yt)|0;var la=(I+y|0)+((u&8191)<<13)|0;I=(k+(u>>>13)|0)+(la>>>26)|0,la&=67108863,y=Math.imul(W,gt),u=Math.imul(W,yt),u=u+Math.imul(z,gt)|0,k=Math.imul(z,yt);var da=(I+y|0)+((u&8191)<<13)|0;return I=(k+(u>>>13)|0)+(da>>>26)|0,da&=67108863,x[0]=$o,x[1]=Vo,x[2]=Go,x[3]=Yo,x[4]=Xo,x[5]=Zo,x[6]=Jo,x[7]=Qo,x[8]=ea,x[9]=ta,x[10]=na,x[11]=ra,x[12]=sa,x[13]=ia,x[14]=oa,x[15]=aa,x[16]=ca,x[17]=la,x[18]=da,I!==0&&(x[19]=I,p.length++),p};Math.imul||(N=M);function _(F,l,m){m.negative=l.negative^F.negative,m.length=F.length+l.length;for(var p=0,C=0,B=0;B<m.length-1;B++){var x=C;C=0;for(var I=p&67108863,y=Math.min(B,l.length-1),u=Math.max(0,B-F.length+1);u<=y;u++){var k=B-u,G=F.words[k]|0,Y=l.words[u]|0,J=G*Y,de=J&67108863;x=x+(J/67108864|0)|0,de=de+I|0,I=de&67108863,x=x+(de>>>26)|0,C+=x>>>26,x&=67108863}m.words[B]=I,p=x,x=C}return p!==0?m.words[B]=p:m.length--,m._strip()}function U(F,l,m){return _(F,l,m)}i.prototype.mulTo=function(l,m){var p,C=this.length+l.length;return this.length===10&&l.length===10?p=N(this,l,m):C<63?p=M(this,l,m):C<1024?p=_(this,l,m):p=U(this,l,m),p},i.prototype.mul=function(l){var m=new i(null);return m.words=new Array(this.length+l.length),this.mulTo(l,m)},i.prototype.mulf=function(l){var m=new i(null);return m.words=new Array(this.length+l.length),U(this,l,m)},i.prototype.imul=function(l){return this.clone().mulTo(l,this)},i.prototype.imuln=function(l){var m=l<0;m&&(l=-l),r(typeof l=="number"),r(l<67108864);for(var p=0,C=0;C<this.length;C++){var B=(this.words[C]|0)*l,x=(B&67108863)+(p&67108863);p>>=26,p+=B/67108864|0,p+=x>>>26,this.words[C]=x&67108863}return p!==0&&(this.words[C]=p,this.length++),this.length=l===0?1:this.length,m?this.ineg():this},i.prototype.muln=function(l){return this.clone().imuln(l)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(l){var m=T(l);if(m.length===0)return new i(1);for(var p=this,C=0;C<m.length&&m[C]===0;C++,p=p.sqr());if(++C<m.length)for(var B=p.sqr();C<m.length;C++,B=B.sqr())m[C]!==0&&(p=p.mul(B));return p},i.prototype.iushln=function(l){r(typeof l=="number"&&l>=0);var m=l%26,p=(l-m)/26,C=67108863>>>26-m<<26-m,B;if(m!==0){var x=0;for(B=0;B<this.length;B++){var I=this.words[B]&C,y=(this.words[B]|0)-I<<m;this.words[B]=y|x,x=I>>>26-m}x&&(this.words[B]=x,this.length++)}if(p!==0){for(B=this.length-1;B>=0;B--)this.words[B+p]=this.words[B];for(B=0;B<p;B++)this.words[B]=0;this.length+=p}return this._strip()},i.prototype.ishln=function(l){return r(this.negative===0),this.iushln(l)},i.prototype.iushrn=function(l,m,p){r(typeof l=="number"&&l>=0);var C;m?C=(m-m%26)/26:C=0;var B=l%26,x=Math.min((l-B)/26,this.length),I=67108863^67108863>>>B<<B,y=p;if(C-=x,C=Math.max(0,C),y){for(var u=0;u<x;u++)y.words[u]=this.words[u];y.length=x}if(x!==0)if(this.length>x)for(this.length-=x,u=0;u<this.length;u++)this.words[u]=this.words[u+x];else this.words[0]=0,this.length=1;var k=0;for(u=this.length-1;u>=0&&(k!==0||u>=C);u--){var G=this.words[u]|0;this.words[u]=k<<26-B|G>>>B,k=G&I}return y&&k!==0&&(y.words[y.length++]=k),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(l,m,p){return r(this.negative===0),this.iushrn(l,m,p)},i.prototype.shln=function(l){return this.clone().ishln(l)},i.prototype.ushln=function(l){return this.clone().iushln(l)},i.prototype.shrn=function(l){return this.clone().ishrn(l)},i.prototype.ushrn=function(l){return this.clone().iushrn(l)},i.prototype.testn=function(l){r(typeof l=="number"&&l>=0);var m=l%26,p=(l-m)/26,C=1<<m;if(this.length<=p)return!1;var B=this.words[p];return!!(B&C)},i.prototype.imaskn=function(l){r(typeof l=="number"&&l>=0);var m=l%26,p=(l-m)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=p)return this;if(m!==0&&p++,this.length=Math.min(p,this.length),m!==0){var C=67108863^67108863>>>m<<m;this.words[this.length-1]&=C}return this._strip()},i.prototype.maskn=function(l){return this.clone().imaskn(l)},i.prototype.iaddn=function(l){return r(typeof l=="number"),r(l<67108864),l<0?this.isubn(-l):this.negative!==0?this.length===1&&(this.words[0]|0)<=l?(this.words[0]=l-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(l),this.negative=1,this):this._iaddn(l)},i.prototype._iaddn=function(l){this.words[0]+=l;for(var m=0;m<this.length&&this.words[m]>=67108864;m++)this.words[m]-=67108864,m===this.length-1?this.words[m+1]=1:this.words[m+1]++;return this.length=Math.max(this.length,m+1),this},i.prototype.isubn=function(l){if(r(typeof l=="number"),r(l<67108864),l<0)return this.iaddn(-l);if(this.negative!==0)return this.negative=0,this.iaddn(l),this.negative=1,this;if(this.words[0]-=l,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var m=0;m<this.length&&this.words[m]<0;m++)this.words[m]+=67108864,this.words[m+1]-=1;return this._strip()},i.prototype.addn=function(l){return this.clone().iaddn(l)},i.prototype.subn=function(l){return this.clone().isubn(l)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(l,m,p){var C=l.length+p,B;this._expand(C);var x,I=0;for(B=0;B<l.length;B++){x=(this.words[B+p]|0)+I;var y=(l.words[B]|0)*m;x-=y&67108863,I=(x>>26)-(y/67108864|0),this.words[B+p]=x&67108863}for(;B<this.length-p;B++)x=(this.words[B+p]|0)+I,I=x>>26,this.words[B+p]=x&67108863;if(I===0)return this._strip();for(r(I===-1),I=0,B=0;B<this.length;B++)x=-(this.words[B]|0)+I,I=x>>26,this.words[B]=x&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(l,m){var p=this.length-l.length,C=this.clone(),B=l,x=B.words[B.length-1]|0,I=this._countBits(x);p=26-I,p!==0&&(B=B.ushln(p),C.iushln(p),x=B.words[B.length-1]|0);var y=C.length-B.length,u;if(m!=="mod"){u=new i(null),u.length=y+1,u.words=new Array(u.length);for(var k=0;k<u.length;k++)u.words[k]=0}var G=C.clone()._ishlnsubmul(B,1,y);G.negative===0&&(C=G,u&&(u.words[y]=1));for(var Y=y-1;Y>=0;Y--){var J=(C.words[B.length+Y]|0)*67108864+(C.words[B.length+Y-1]|0);for(J=Math.min(J/x|0,67108863),C._ishlnsubmul(B,J,Y);C.negative!==0;)J--,C.negative=0,C._ishlnsubmul(B,1,Y),C.isZero()||(C.negative^=1);u&&(u.words[Y]=J)}return u&&u._strip(),C._strip(),m!=="div"&&p!==0&&C.iushrn(p),{div:u||null,mod:C}},i.prototype.divmod=function(l,m,p){if(r(!l.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var C,B,x;return this.negative!==0&&l.negative===0?(x=this.neg().divmod(l,m),m!=="mod"&&(C=x.div.neg()),m!=="div"&&(B=x.mod.neg(),p&&B.negative!==0&&B.iadd(l)),{div:C,mod:B}):this.negative===0&&l.negative!==0?(x=this.divmod(l.neg(),m),m!=="mod"&&(C=x.div.neg()),{div:C,mod:x.mod}):this.negative&l.negative?(x=this.neg().divmod(l.neg(),m),m!=="div"&&(B=x.mod.neg(),p&&B.negative!==0&&B.isub(l)),{div:x.div,mod:B}):l.length>this.length||this.cmp(l)<0?{div:new i(0),mod:this}:l.length===1?m==="div"?{div:this.divn(l.words[0]),mod:null}:m==="mod"?{div:null,mod:new i(this.modrn(l.words[0]))}:{div:this.divn(l.words[0]),mod:new i(this.modrn(l.words[0]))}:this._wordDiv(l,m)},i.prototype.div=function(l){return this.divmod(l,"div",!1).div},i.prototype.mod=function(l){return this.divmod(l,"mod",!1).mod},i.prototype.umod=function(l){return this.divmod(l,"mod",!0).mod},i.prototype.divRound=function(l){var m=this.divmod(l);if(m.mod.isZero())return m.div;var p=m.div.negative!==0?m.mod.isub(l):m.mod,C=l.ushrn(1),B=l.andln(1),x=p.cmp(C);return x<0||B===1&&x===0?m.div:m.div.negative!==0?m.div.isubn(1):m.div.iaddn(1)},i.prototype.modrn=function(l){var m=l<0;m&&(l=-l),r(l<=67108863);for(var p=(1<<26)%l,C=0,B=this.length-1;B>=0;B--)C=(p*C+(this.words[B]|0))%l;return m?-C:C},i.prototype.modn=function(l){return this.modrn(l)},i.prototype.idivn=function(l){var m=l<0;m&&(l=-l),r(l<=67108863);for(var p=0,C=this.length-1;C>=0;C--){var B=(this.words[C]|0)+p*67108864;this.words[C]=B/l|0,p=B%l}return this._strip(),m?this.ineg():this},i.prototype.divn=function(l){return this.clone().idivn(l)},i.prototype.egcd=function(l){r(l.negative===0),r(!l.isZero());var m=this,p=l.clone();m.negative!==0?m=m.umod(l):m=m.clone();for(var C=new i(1),B=new i(0),x=new i(0),I=new i(1),y=0;m.isEven()&&p.isEven();)m.iushrn(1),p.iushrn(1),++y;for(var u=p.clone(),k=m.clone();!m.isZero();){for(var G=0,Y=1;!(m.words[0]&Y)&&G<26;++G,Y<<=1);if(G>0)for(m.iushrn(G);G-- >0;)(C.isOdd()||B.isOdd())&&(C.iadd(u),B.isub(k)),C.iushrn(1),B.iushrn(1);for(var J=0,de=1;!(p.words[0]&de)&&J<26;++J,de<<=1);if(J>0)for(p.iushrn(J);J-- >0;)(x.isOdd()||I.isOdd())&&(x.iadd(u),I.isub(k)),x.iushrn(1),I.iushrn(1);m.cmp(p)>=0?(m.isub(p),C.isub(x),B.isub(I)):(p.isub(m),x.isub(C),I.isub(B))}return{a:x,b:I,gcd:p.iushln(y)}},i.prototype._invmp=function(l){r(l.negative===0),r(!l.isZero());var m=this,p=l.clone();m.negative!==0?m=m.umod(l):m=m.clone();for(var C=new i(1),B=new i(0),x=p.clone();m.cmpn(1)>0&&p.cmpn(1)>0;){for(var I=0,y=1;!(m.words[0]&y)&&I<26;++I,y<<=1);if(I>0)for(m.iushrn(I);I-- >0;)C.isOdd()&&C.iadd(x),C.iushrn(1);for(var u=0,k=1;!(p.words[0]&k)&&u<26;++u,k<<=1);if(u>0)for(p.iushrn(u);u-- >0;)B.isOdd()&&B.iadd(x),B.iushrn(1);m.cmp(p)>=0?(m.isub(p),C.isub(B)):(p.isub(m),B.isub(C))}var G;return m.cmpn(1)===0?G=C:G=B,G.cmpn(0)<0&&G.iadd(l),G},i.prototype.gcd=function(l){if(this.isZero())return l.abs();if(l.isZero())return this.abs();var m=this.clone(),p=l.clone();m.negative=0,p.negative=0;for(var C=0;m.isEven()&&p.isEven();C++)m.iushrn(1),p.iushrn(1);do{for(;m.isEven();)m.iushrn(1);for(;p.isEven();)p.iushrn(1);var B=m.cmp(p);if(B<0){var x=m;m=p,p=x}else if(B===0||p.cmpn(1)===0)break;m.isub(p)}while(!0);return p.iushln(C)},i.prototype.invm=function(l){return this.egcd(l).a.umod(l)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(l){return this.words[0]&l},i.prototype.bincn=function(l){r(typeof l=="number");var m=l%26,p=(l-m)/26,C=1<<m;if(this.length<=p)return this._expand(p+1),this.words[p]|=C,this;for(var B=C,x=p;B!==0&&x<this.length;x++){var I=this.words[x]|0;I+=B,B=I>>>26,I&=67108863,this.words[x]=I}return B!==0&&(this.words[x]=B,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(l){var m=l<0;if(this.negative!==0&&!m)return-1;if(this.negative===0&&m)return 1;this._strip();var p;if(this.length>1)p=1;else{m&&(l=-l),r(l<=67108863,"Number is too big");var C=this.words[0]|0;p=C===l?0:C<l?-1:1}return this.negative!==0?-p|0:p},i.prototype.cmp=function(l){if(this.negative!==0&&l.negative===0)return-1;if(this.negative===0&&l.negative!==0)return 1;var m=this.ucmp(l);return this.negative!==0?-m|0:m},i.prototype.ucmp=function(l){if(this.length>l.length)return 1;if(this.length<l.length)return-1;for(var m=0,p=this.length-1;p>=0;p--){var C=this.words[p]|0,B=l.words[p]|0;if(C!==B){C<B?m=-1:C>B&&(m=1);break}}return m},i.prototype.gtn=function(l){return this.cmpn(l)===1},i.prototype.gt=function(l){return this.cmp(l)===1},i.prototype.gten=function(l){return this.cmpn(l)>=0},i.prototype.gte=function(l){return this.cmp(l)>=0},i.prototype.ltn=function(l){return this.cmpn(l)===-1},i.prototype.lt=function(l){return this.cmp(l)===-1},i.prototype.lten=function(l){return this.cmpn(l)<=0},i.prototype.lte=function(l){return this.cmp(l)<=0},i.prototype.eqn=function(l){return this.cmpn(l)===0},i.prototype.eq=function(l){return this.cmp(l)===0},i.red=function(l){return new $(l)},i.prototype.toRed=function(l){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),l.convertTo(this)._forceRed(l)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(l){return this.red=l,this},i.prototype.forceRed=function(l){return r(!this.red,"Already a number in reduction context"),this._forceRed(l)},i.prototype.redAdd=function(l){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,l)},i.prototype.redIAdd=function(l){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l)},i.prototype.redSub=function(l){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,l)},i.prototype.redISub=function(l){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,l)},i.prototype.redShl=function(l){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,l)},i.prototype.redMul=function(l){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.mul(this,l)},i.prototype.redIMul=function(l){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.imul(this,l)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(l){return r(this.red&&!l.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l)};var L={k256:null,p224:null,p192:null,p25519:null};function H(F,l){this.name=F,this.p=new i(l,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}H.prototype._tmp=function(){var l=new i(null);return l.words=new Array(Math.ceil(this.n/13)),l},H.prototype.ireduce=function(l){var m=l,p;do this.split(m,this.tmp),m=this.imulK(m),m=m.iadd(this.tmp),p=m.bitLength();while(p>this.n);var C=p<this.n?-1:m.ucmp(this.p);return C===0?(m.words[0]=0,m.length=1):C>0?m.isub(this.p):m.strip!==void 0?m.strip():m._strip(),m},H.prototype.split=function(l,m){l.iushrn(this.n,0,m)},H.prototype.imulK=function(l){return l.imul(this.k)};function K(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(K,H),K.prototype.split=function(l,m){for(var p=4194303,C=Math.min(l.length,9),B=0;B<C;B++)m.words[B]=l.words[B];if(m.length=C,l.length<=9){l.words[0]=0,l.length=1;return}var x=l.words[9];for(m.words[m.length++]=x&p,B=10;B<l.length;B++){var I=l.words[B]|0;l.words[B-10]=(I&p)<<4|x>>>22,x=I}x>>>=22,l.words[B-10]=x,x===0&&l.length>10?l.length-=10:l.length-=9},K.prototype.imulK=function(l){l.words[l.length]=0,l.words[l.length+1]=0,l.length+=2;for(var m=0,p=0;p<l.length;p++){var C=l.words[p]|0;m+=C*977,l.words[p]=m&67108863,m=C*64+(m/67108864|0)}return l.words[l.length-1]===0&&(l.length--,l.words[l.length-1]===0&&l.length--),l};function V(){H.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}s(V,H);function ee(){H.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}s(ee,H);function re(){H.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}s(re,H),re.prototype.imulK=function(l){for(var m=0,p=0;p<l.length;p++){var C=(l.words[p]|0)*19+m,B=C&67108863;C>>>=26,l.words[p]=B,m=C}return m!==0&&(l.words[l.length++]=m),l},i._prime=function(l){if(L[l])return L[l];var m;if(l==="k256")m=new K;else if(l==="p224")m=new V;else if(l==="p192")m=new ee;else if(l==="p25519")m=new re;else throw new Error("Unknown prime "+l);return L[l]=m,m};function $(F){if(typeof F=="string"){var l=i._prime(F);this.m=l.p,this.prime=l}else r(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}$.prototype._verify1=function(l){r(l.negative===0,"red works only with positives"),r(l.red,"red works only with red numbers")},$.prototype._verify2=function(l,m){r((l.negative|m.negative)===0,"red works only with positives"),r(l.red&&l.red===m.red,"red works only with red numbers")},$.prototype.imod=function(l){return this.prime?this.prime.ireduce(l)._forceRed(this):(b(l,l.umod(this.m)._forceRed(this)),l)},$.prototype.neg=function(l){return l.isZero()?l.clone():this.m.sub(l)._forceRed(this)},$.prototype.add=function(l,m){this._verify2(l,m);var p=l.add(m);return p.cmp(this.m)>=0&&p.isub(this.m),p._forceRed(this)},$.prototype.iadd=function(l,m){this._verify2(l,m);var p=l.iadd(m);return p.cmp(this.m)>=0&&p.isub(this.m),p},$.prototype.sub=function(l,m){this._verify2(l,m);var p=l.sub(m);return p.cmpn(0)<0&&p.iadd(this.m),p._forceRed(this)},$.prototype.isub=function(l,m){this._verify2(l,m);var p=l.isub(m);return p.cmpn(0)<0&&p.iadd(this.m),p},$.prototype.shl=function(l,m){return this._verify1(l),this.imod(l.ushln(m))},$.prototype.imul=function(l,m){return this._verify2(l,m),this.imod(l.imul(m))},$.prototype.mul=function(l,m){return this._verify2(l,m),this.imod(l.mul(m))},$.prototype.isqr=function(l){return this.imul(l,l.clone())},$.prototype.sqr=function(l){return this.mul(l,l)},$.prototype.sqrt=function(l){if(l.isZero())return l.clone();var m=this.m.andln(3);if(r(m%2===1),m===3){var p=this.m.add(new i(1)).iushrn(2);return this.pow(l,p)}for(var C=this.m.subn(1),B=0;!C.isZero()&&C.andln(1)===0;)B++,C.iushrn(1);r(!C.isZero());var x=new i(1).toRed(this),I=x.redNeg(),y=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);this.pow(u,y).cmp(I)!==0;)u.redIAdd(I);for(var k=this.pow(u,C),G=this.pow(l,C.addn(1).iushrn(1)),Y=this.pow(l,C),J=B;Y.cmp(x)!==0;){for(var de=Y,ce=0;de.cmp(x)!==0;ce++)de=de.redSqr();r(ce<J);var ue=this.pow(k,new i(1).iushln(J-ce-1));G=G.redMul(ue),k=ue.redSqr(),Y=Y.redMul(k),J=ce}return G},$.prototype.invm=function(l){var m=l._invmp(this.m);return m.negative!==0?(m.negative=0,this.imod(m).redNeg()):this.imod(m)},$.prototype.pow=function(l,m){if(m.isZero())return new i(1).toRed(this);if(m.cmpn(1)===0)return l.clone();var p=4,C=new Array(1<<p);C[0]=new i(1).toRed(this),C[1]=l;for(var B=2;B<C.length;B++)C[B]=this.mul(C[B-1],l);var x=C[0],I=0,y=0,u=m.bitLength()%26;for(u===0&&(u=26),B=m.length-1;B>=0;B--){for(var k=m.words[B],G=u-1;G>=0;G--){var Y=k>>G&1;if(x!==C[0]&&(x=this.sqr(x)),Y===0&&I===0){y=0;continue}I<<=1,I|=Y,y++,!(y!==p&&(B!==0||G!==0))&&(x=this.mul(x,C[I]),y=0,I=0)}u=26}return x},$.prototype.convertTo=function(l){var m=l.umod(this.m);return m===l?m.clone():m},$.prototype.convertFrom=function(l){var m=l.clone();return m.red=null,m},i.mont=function(l){return new ie(l)};function ie(F){$.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(ie,$),ie.prototype.convertTo=function(l){return this.imod(l.ushln(this.shift))},ie.prototype.convertFrom=function(l){var m=this.imod(l.mul(this.rinv));return m.red=null,m},ie.prototype.imul=function(l,m){if(l.isZero()||m.isZero())return l.words[0]=0,l.length=1,l;var p=l.imul(m),C=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),B=p.isub(C).iushrn(this.shift),x=B;return B.cmp(this.m)>=0?x=B.isub(this.m):B.cmpn(0)<0&&(x=B.iadd(this.m)),x._forceRed(this)},ie.prototype.mul=function(l,m){if(l.isZero()||m.isZero())return new i(0)._forceRed(this);var p=l.mul(m),C=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),B=p.isub(C).iushrn(this.shift),x=B;return B.cmp(this.m)>=0?x=B.isub(this.m):B.cmpn(0)<0&&(x=B.iadd(this.m)),x._forceRed(this)},ie.prototype.invm=function(l){var m=this.imod(l._invmp(this.m).mul(this.r2));return m._forceRed(this)}})(n,an)})(hl);var ml=hl.exports;const wc=Xs(ml),O0="6.13.5";function s2(n,e,t){const r=e.split("|").map(i=>i.trim());for(let i=0;i<r.length;i++)switch(e){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof n===e)return}const s=new Error(`invalid value for type ${e}`);throw s.code="INVALID_ARGUMENT",s.argument=`value.${t}`,s.value=n,s}async function i2(n){const e=Object.keys(n);return(await Promise.all(e.map(r=>Promise.resolve(n[r])))).reduce((r,s,i)=>(r[e[i]]=s,r),{})}function Ec(n,e,t){for(let r in e){let s=e[r];const i=t?t[r]:null;i&&s2(s,i,r),Object.defineProperty(n,r,{enumerable:!0,value:s,writable:!1})}}function Kr(n){if(n==null)return"null";if(Array.isArray(n))return"[ "+n.map(Kr).join(", ")+" ]";if(n instanceof Uint8Array){const e="0123456789abcdef";let t="0x";for(let r=0;r<n.length;r++)t+=e[n[r]>>4],t+=e[n[r]&15];return t}if(typeof n=="object"&&typeof n.toJSON=="function")return Kr(n.toJSON());switch(typeof n){case"boolean":case"symbol":return n.toString();case"bigint":return BigInt(n).toString();case"number":return n.toString();case"string":return JSON.stringify(n);case"object":{const e=Object.keys(n);return e.sort(),"{ "+e.map(t=>`${Kr(t)}: ${Kr(n[t])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function N0(n,e){return n&&n.code===e}function o2(n){return N0(n,"CALL_EXCEPTION")}function z0(n,e,t){let r=n;{const i=[];if(t){if("message"in t||"code"in t||"name"in t)throw new Error(`value will overwrite populated values: ${Kr(t)}`);for(const o in t){if(o==="shortMessage")continue;const a=t[o];i.push(o+"="+Kr(a))}}i.push(`code=${e}`),i.push(`version=${O0}`),i.length&&(n+=" ("+i.join(", ")+")")}let s;switch(e){case"INVALID_ARGUMENT":s=new TypeError(n);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":s=new RangeError(n);break;default:s=new Error(n)}return Ec(s,{code:e}),t&&Object.assign(s,t),s.shortMessage==null&&Ec(s,{shortMessage:r}),s}function Un(n,e,t,r){if(!n)throw z0(e,t,r)}function tr(n,e,t,r){Un(n,e,"INVALID_ARGUMENT",{argument:t,value:r})}function a2(n,e,t){t==null&&(t=""),t&&(t=": "+t),Un(n>=e,"missing argument"+t,"MISSING_ARGUMENT",{count:n,expectedCount:e}),Un(n<=e,"too many arguments"+t,"UNEXPECTED_ARGUMENT",{count:n,expectedCount:e})}const c2=["NFD","NFC","NFKD","NFKC"].reduce((n,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"&&"é".normalize("NFD")!=="é")throw new Error("broken");n.push(e)}catch{}return n},[]);function l2(n){Un(c2.indexOf(n)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:n}})}function d2(n,e,t){if(t==null&&(t=""),n!==e){let r=t,s="new";t&&(r+=".",s+=" "+t),Un(!1,`private constructor; use ${r}from* methods`,"UNSUPPORTED_OPERATION",{operation:s})}}function H0(n,e,t){if(n instanceof Uint8Array)return t?new Uint8Array(n):n;if(typeof n=="string"&&n.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const r=new Uint8Array((n.length-2)/2);let s=2;for(let i=0;i<r.length;i++)r[i]=parseInt(n.substring(s,s+2),16),s+=2;return r}tr(!1,"invalid BytesLike value",e||"value",n)}function Rr(n,e){return H0(n,e,!1)}function u2(n,e){return H0(n,e,!0)}function bl(n,e){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||typeof e=="number"&&n.length!==2+2*e||e===!0&&n.length%2!==0)}function f2(n){return bl(n,!0)||n instanceof Uint8Array}const au="0123456789abcdef";function oi(n){const e=Rr(n);let t="0x";for(let r=0;r<e.length;r++){const s=e[r];t+=au[(s&240)>>4]+au[s&15]}return t}function h2(n){return"0x"+n.map(e=>oi(e).substring(2)).join("")}function m2(n){return bl(n,!0)?(n.length-2)/2:Rr(n).length}function b2(n,e,t){const r=Rr(n);return t!=null&&t>r.length&&Un(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:t}),oi(r.slice(e??0,t??r.length))}function q0(n,e,t){const r=Rr(n);Un(e>=r.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(r),length:e,offset:e+1});const s=new Uint8Array(e);return s.fill(0),t?s.set(r,e-r.length):s.set(r,0),oi(s)}function p2(n,e){return q0(n,e,!0)}function g2(n,e){return q0(n,e,!1)}function js(n){if(!Number.isSafeInteger(n)||n<0)throw new Error(`Wrong positive integer: ${n}`)}function pl(n,...e){if(!(n instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(n.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${n.length}`)}function y2(n){if(typeof n!="function"||typeof n.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");js(n.outputLen),js(n.blockLen)}function Bc(n,e=!0){if(n.destroyed)throw new Error("Hash instance has been destroyed");if(e&&n.finished)throw new Error("Hash#digest() has already been called")}function K0(n,e){pl(n);const t=e.outputLen;if(n.length<t)throw new Error(`digestInto() expects output buffer of length at least ${t}`)}const va=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const j0=n=>n instanceof Uint8Array,$0=n=>new Uint32Array(n.buffer,n.byteOffset,Math.floor(n.byteLength/4)),A2=n=>new DataView(n.buffer,n.byteOffset,n.byteLength),w2=(n,e)=>n<<32-e|n>>>e,E2=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!E2)throw new Error("Non little-endian hardware is not supported");const B2=async()=>{};async function x2(n,e,t){let r=Date.now();for(let s=0;s<n;s++){t(s);const i=Date.now()-r;i>=0&&i<e||(await B2(),r+=i)}}function C2(n){if(typeof n!="string")throw new Error(`utf8ToBytes expected string, got ${typeof n}`);return new Uint8Array(new TextEncoder().encode(n))}function gl(n){if(typeof n=="string"&&(n=C2(n)),!j0(n))throw new Error(`expected Uint8Array, got ${typeof n}`);return n}function S2(...n){const e=new Uint8Array(n.reduce((r,s)=>r+s.length,0));let t=0;return n.forEach(r=>{if(!j0(r))throw new Error("Uint8Array expected");e.set(r,t),t+=r.length}),e}class V0{clone(){return this._cloneInto()}}const D2={}.toString;function v2(n,e){if(e!==void 0&&D2.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(n,e)}function G0(n){const e=r=>n().update(gl(r)).digest(),t=n();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>n(),e}function k2(n=32){if(va&&typeof va.getRandomValues=="function")return va.getRandomValues(new Uint8Array(n));throw new Error("crypto.getRandomValues must be defined")}const pi=BigInt(2**32-1),xc=BigInt(32);function Y0(n,e=!1){return e?{h:Number(n&pi),l:Number(n>>xc&pi)}:{h:Number(n>>xc&pi)|0,l:Number(n&pi)|0}}function X0(n,e=!1){let t=new Uint32Array(n.length),r=new Uint32Array(n.length);for(let s=0;s<n.length;s++){const{h:i,l:o}=Y0(n[s],e);[t[s],r[s]]=[i,o]}return[t,r]}const F2=(n,e)=>BigInt(n>>>0)<<xc|BigInt(e>>>0),T2=(n,e,t)=>n>>>t,I2=(n,e,t)=>n<<32-t|e>>>t,U2=(n,e,t)=>n>>>t|e<<32-t,_2=(n,e,t)=>n<<32-t|e>>>t,M2=(n,e,t)=>n<<64-t|e>>>t-32,R2=(n,e,t)=>n>>>t-32|e<<64-t,W2=(n,e)=>e,P2=(n,e)=>n,Z0=(n,e,t)=>n<<t|e>>>32-t,J0=(n,e,t)=>e<<t|n>>>32-t,Q0=(n,e,t)=>e<<t-32|n>>>64-t,eh=(n,e,t)=>n<<t-32|e>>>64-t;function L2(n,e,t,r){const s=(e>>>0)+(r>>>0);return{h:n+t+(s/2**32|0)|0,l:s|0}}const O2=(n,e,t)=>(n>>>0)+(e>>>0)+(t>>>0),N2=(n,e,t,r)=>e+t+r+(n/2**32|0)|0,z2=(n,e,t,r)=>(n>>>0)+(e>>>0)+(t>>>0)+(r>>>0),H2=(n,e,t,r,s)=>e+t+r+s+(n/2**32|0)|0,q2=(n,e,t,r,s)=>(n>>>0)+(e>>>0)+(t>>>0)+(r>>>0)+(s>>>0),K2=(n,e,t,r,s,i)=>e+t+r+s+i+(n/2**32|0)|0,j2={fromBig:Y0,split:X0,toBig:F2,shrSH:T2,shrSL:I2,rotrSH:U2,rotrSL:_2,rotrBH:M2,rotrBL:R2,rotr32H:W2,rotr32L:P2,rotlSH:Z0,rotlSL:J0,rotlBH:Q0,rotlBL:eh,add:L2,add3L:O2,add3H:N2,add4L:z2,add4H:H2,add5H:K2,add5L:q2},[th,nh,rh]=[[],[],[]],$2=BigInt(0),xs=BigInt(1),V2=BigInt(2),G2=BigInt(7),Y2=BigInt(256),X2=BigInt(113);for(let n=0,e=xs,t=1,r=0;n<24;n++){[t,r]=[r,(2*t+3*r)%5],th.push(2*(5*r+t)),nh.push((n+1)*(n+2)/2%64);let s=$2;for(let i=0;i<7;i++)e=(e<<xs^(e>>G2)*X2)%Y2,e&V2&&(s^=xs<<(xs<<BigInt(i))-xs);rh.push(s)}const[Z2,J2]=X0(rh,!0),cu=(n,e,t)=>t>32?Q0(n,e,t):Z0(n,e,t),lu=(n,e,t)=>t>32?eh(n,e,t):J0(n,e,t);function Q2(n,e=24){const t=new Uint32Array(10);for(let r=24-e;r<24;r++){for(let o=0;o<10;o++)t[o]=n[o]^n[o+10]^n[o+20]^n[o+30]^n[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,h=t[c],b=t[c+1],w=cu(h,b,1)^t[a],D=lu(h,b,1)^t[a+1];for(let E=0;E<50;E+=10)n[o+E]^=w,n[o+E+1]^=D}let s=n[2],i=n[3];for(let o=0;o<24;o++){const a=nh[o],c=cu(s,i,a),h=lu(s,i,a),b=th[o];s=n[b],i=n[b+1],n[b]=c,n[b+1]=h}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)t[a]=n[o+a];for(let a=0;a<10;a++)n[o+a]^=~t[(a+2)%10]&t[(a+4)%10]}n[0]^=Z2[r],n[1]^=J2[r]}t.fill(0)}class yl extends V0{constructor(e,t,r,s=!1,i=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=s,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,js(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=$0(this.state)}keccak(){Q2(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){Bc(this);const{blockLen:t,state:r}=this;e=gl(e);const s=e.length;for(let i=0;i<s;){const o=Math.min(t-this.pos,s-i);for(let a=0;a<o;a++)r[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:s}=this;e[r]^=t,t&128&&r===s-1&&this.keccak(),e[s-1]^=128,this.keccak()}writeInto(e){Bc(this,!1),pl(e),this.finish();const t=this.state,{blockLen:r}=this;for(let s=0,i=e.length;s<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-s);e.set(t.subarray(this.posOut,this.posOut+o),s),this.posOut+=o,s+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return js(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(K0(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:s,rounds:i,enableXOF:o}=this;return e||(e=new yl(t,r,s,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=s,e.enableXOF=o,e.destroyed=this.destroyed,e}}const e8=(n,e,t)=>G0(()=>new yl(e,n,t)),t8=e8(1,136,256/8);let sh=!1;const ih=function(n){return t8(n)};let oh=ih;function ms(n){const e=Rr(n,"data");return oi(oh(e))}ms._=ih;ms.lock=function(){sh=!0};ms.register=function(n){if(sh)throw new TypeError("keccak256 is locked");oh=n};Object.freeze(ms);const n8=BigInt(0),r8=BigInt(36);function du(n){n=n.toLowerCase();const e=n.substring(2).split(""),t=new Uint8Array(40);for(let s=0;s<40;s++)t[s]=e[s].charCodeAt(0);const r=Rr(ms(t));for(let s=0;s<40;s+=2)r[s>>1]>>4>=8&&(e[s]=e[s].toUpperCase()),(r[s>>1]&15)>=8&&(e[s+1]=e[s+1].toUpperCase());return"0x"+e.join("")}const Al={};for(let n=0;n<10;n++)Al[String(n)]=String(n);for(let n=0;n<26;n++)Al[String.fromCharCode(65+n)]=String(10+n);const uu=15;function s8(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let e=n.split("").map(r=>Al[r]).join("");for(;e.length>=uu;){let r=e.substring(0,uu);e=parseInt(r,10)%97+e.substring(r.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}const i8=function(){const n={};for(let e=0;e<36;e++){const t="0123456789abcdefghijklmnopqrstuvwxyz"[e];n[t]=BigInt(e)}return n}();function o8(n){n=n.toLowerCase();let e=n8;for(let t=0;t<n.length;t++)e=e*r8+i8[n[t]];return e}function Cr(n){if(tr(typeof n=="string","invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/)){n.startsWith("0x")||(n="0x"+n);const e=du(n);return tr(!n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||e===n,"bad address checksum","address",n),e}if(n.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){tr(n.substring(2,4)===s8(n),"bad icap checksum","address",n);let e=o8(n.substring(4)).toString(16);for(;e.length<40;)e="0"+e;return du("0x"+e)}tr(!1,"invalid address","address",n)}function ah(n){return n&&typeof n.getAddress=="function"}function a8(n){try{return Cr(n),!0}catch{}return!1}async function ka(n,e){const t=await e;return(t==null||t==="0x0000000000000000000000000000000000000000")&&(Un(typeof n!="string","unconfigured name","UNCONFIGURED_NAME",{value:n}),tr(!1,"invalid AddressLike value; did not resolve to a value address","target",n)),Cr(t)}function c8(n,e){if(typeof n=="string")return n.match(/^0x[0-9a-f]{40}$/i)?Cr(n):(Un(e!=null,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),ka(n,e.resolveName(n)));if(ah(n))return ka(n,n.getAddress());if(n&&typeof n.then=="function")return ka(n,n);tr(!1,"unsupported addressable value","target",n)}const l8=0,d8=0n,wl="Evm",u8=(n,e)=>({...n,from:e}),f8=(n,e)=>({...n,chainId:e}),h8="0x0000000000000000000000000000000000000000",Qt=class Qt{constructor(e){se(this,"type","Native");se(this,"address");if(Qt.instanceof(e)){const t=e;this.address=t.address;return}if(typeof e=="string"){if(!Qt.isValidAddress(e))throw new Error(`Invalid EVM address, expected ${Qt.byteSize}-byte hex string but got ${e}`);this.address=Cr(e)}else if(e instanceof Uint8Array)e=this.trimUniversalAddress(e),this.address=Cr(Tt.encode(e));else if(Ot.instanceof(e)){const t=this.trimUniversalAddress(e.toUint8Array());this.address=Cr(Tt.encode(t))}else throw new Error(`Invalid EVM address ${e}`)}unwrap(){return this.address}toString(){return this.address}toNative(){return this}toUint8Array(){return Tt.decode(this.address)}toUniversalAddress(){return new Ot(this.address,"hex")}trimUniversalAddress(e){if(e.length===Qt.byteSize)return e;if(e.length<Qt.byteSize)throw new Error(`Invalid evm address, expected ${Qt.byteSize} bytes`);if(e.length!==Ot.byteSize)throw new Error(`Invalid universal address, expected ${Ot.byteSize} bytes`);if(Ts.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 a8(e)}static instanceof(e){return e.constructor.platform===Qt.platform}equals(e){return Qt.instanceof(e)?e.address===this.address:e.equals(this.toUniversalAddress())}};se(Qt,"byteSize",20),se(Qt,"platform",wl);let Yi=Qt;el(wl,Yi);var gi=L0.Buffer;function m8(n){if(n.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),t=0;t<e.length;t++)e[t]=255;for(var r=0;r<n.length;r++){var s=n.charAt(r),i=s.charCodeAt(0);if(e[i]!==255)throw new TypeError(s+" is ambiguous");e[i]=r}var o=n.length,a=n.charAt(0),c=Math.log(o)/Math.log(256),h=Math.log(256)/Math.log(o);function b(E){if((Array.isArray(E)||E instanceof Uint8Array)&&(E=gi.from(E)),!gi.isBuffer(E))throw new TypeError("Expected Buffer");if(E.length===0)return"";for(var g=0,S=0,T=0,M=E.length;T!==M&&E[T]===0;)T++,g++;for(var N=(M-T)*h+1>>>0,_=new Uint8Array(N);T!==M;){for(var U=E[T],L=0,H=N-1;(U!==0||L<S)&&H!==-1;H--,L++)U+=256*_[H]>>>0,_[H]=U%o>>>0,U=U/o>>>0;if(U!==0)throw new Error("Non-zero carry");S=L,T++}for(var K=N-S;K!==N&&_[K]===0;)K++;for(var V=a.repeat(g);K<N;++K)V+=n.charAt(_[K]);return V}function w(E){if(typeof E!="string")throw new TypeError("Expected String");if(E.length===0)return gi.alloc(0);for(var g=0,S=0,T=0;E[g]===a;)S++,g++;for(var M=(E.length-g)*c+1>>>0,N=new Uint8Array(M);g<E.length;){var _=E.charCodeAt(g);if(_>255)return;var U=e[_];if(U===255)return;for(var L=0,H=M-1;(U!==0||L<T)&&H!==-1;H--,L++)U+=o*N[H]>>>0,N[H]=U%256>>>0,U=U/256>>>0;if(U!==0)throw new Error("Non-zero carry");T=L,g++}for(var K=M-T;K!==M&&N[K]===0;)K++;var V=gi.allocUnsafe(S+(M-K));V.fill(0,0,S);for(var ee=S;K!==M;)V[ee++]=N[K++];return V}function D(E){var g=w(E);if(g)return g;throw new Error("Non-base"+o+" character")}return{encode:b,decodeUnsafe:w,decode:D}}var b8=m8,p8=b8,g8="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",ch=p8(g8);const Dt=Xs(ch);var Ft={};function qn(n,e,t){return e<=n&&n<=t}function ko(n){if(n===void 0)return{};if(n===Object(n))return n;throw TypeError("Could not convert argument to dictionary")}function y8(n){for(var e=String(n),t=e.length,r=0,s=[];r<t;){var i=e.charCodeAt(r);if(i<55296||i>57343)s.push(i);else if(56320<=i&&i<=57343)s.push(65533);else if(55296<=i&&i<=56319)if(r===t-1)s.push(65533);else{var o=n.charCodeAt(r+1);if(56320<=o&&o<=57343){var a=i&1023,c=o&1023;s.push(65536+(a<<10)+c),r+=1}else s.push(65533)}r+=1}return s}function A8(n){for(var e="",t=0;t<n.length;++t){var r=n[t];r<=65535?e+=String.fromCharCode(r):(r-=65536,e+=String.fromCharCode((r>>10)+55296,(r&1023)+56320))}return e}var Xi=-1;function El(n){this.tokens=[].slice.call(n)}El.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():Xi},prepend:function(n){if(Array.isArray(n))for(var e=n;e.length;)this.tokens.unshift(e.pop());else this.tokens.unshift(n)},push:function(n){if(Array.isArray(n))for(var e=n;e.length;)this.tokens.push(e.shift());else this.tokens.push(n)}};var es=-1;function Fa(n,e){if(n)throw TypeError("Decoder error");return e||65533}var Zi="utf-8";function Ji(n,e){if(!(this instanceof Ji))return new Ji(n,e);if(n=n!==void 0?String(n).toLowerCase():Zi,n!==Zi)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})}Ji.prototype={decode:function(e,t){var r;typeof e=="object"&&e instanceof ArrayBuffer?r=new Uint8Array(e):typeof e=="object"&&"buffer"in e&&e.buffer instanceof ArrayBuffer?r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):r=new Uint8Array(0),t=ko(t),this._streaming||(this._decoder=new w8({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!t.stream;for(var s=new El(r),i=[],o;!s.endOfStream()&&(o=this._decoder.handler(s,s.read()),o!==es);)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===es)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),A8(i)}};function Qi(n,e){if(!(this instanceof Qi))return new Qi(n,e);if(n=n!==void 0?String(n).toLowerCase():Zi,n!==Zi)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"})}Qi.prototype={encode:function(e,t){e=e?String(e):"",t=ko(t),this._streaming||(this._encoder=new E8(this._options)),this._streaming=!!t.stream;for(var r=[],s=new El(y8(e)),i;!s.endOfStream()&&(i=this._encoder.handler(s,s.read()),i!==es);)Array.isArray(i)?r.push.apply(r,i):r.push(i);if(!this._streaming){for(;i=this._encoder.handler(s,s.read()),i!==es;)Array.isArray(i)?r.push.apply(r,i):r.push(i);this._encoder=null}return new Uint8Array(r)}};function w8(n){var e=n.fatal,t=0,r=0,s=0,i=128,o=191;this.handler=function(a,c){if(c===Xi&&s!==0)return s=0,Fa(e);if(c===Xi)return es;if(s===0){if(qn(c,0,127))return c;if(qn(c,194,223))s=1,t=c-192;else if(qn(c,224,239))c===224&&(i=160),c===237&&(o=159),s=2,t=c-224;else if(qn(c,240,244))c===240&&(i=144),c===244&&(o=143),s=3,t=c-240;else return Fa(e);return t=t<<6*s,null}if(!qn(c,i,o))return t=s=r=0,i=128,o=191,a.prepend(c),Fa(e);if(i=128,o=191,r+=1,t+=c-128<<6*(s-r),r!==s)return null;var h=t;return t=s=r=0,h}}function E8(n){n.fatal,this.handler=function(e,t){if(t===Xi)return es;if(qn(t,0,127))return t;var r,s;qn(t,128,2047)?(r=1,s=192):qn(t,2048,65535)?(r=2,s=224):qn(t,65536,1114111)&&(r=3,s=240);for(var i=[(t>>6*r)+s];r>0;){var o=t>>6*(r-1);i.push(128|o&63),r-=1}return i}}const B8=Object.freeze(Object.defineProperty({__proto__:null,TextDecoder:Ji,TextEncoder:Qi},Symbol.toStringTag,{value:"Module"})),x8=Tc(B8);var C8=an&&an.__createBinding||(Object.create?function(n,e,t,r){r===void 0&&(r=t),Object.defineProperty(n,r,{enumerable:!0,get:function(){return e[t]}})}:function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]}),S8=an&&an.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),Rn=an&&an.__decorate||function(n,e,t,r){var s=arguments.length,i=s<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(s<3?o(i):s>3?o(e,t,i):o(e,t))||i);return s>3&&i&&Object.defineProperty(e,t,i),i},D8=an&&an.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)t!=="default"&&Object.hasOwnProperty.call(n,t)&&C8(e,n,t);return S8(e,n),e},lh=an&&an.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ft,"__esModule",{value:!0});var dh=Ft.deserializeUnchecked=ph=Ft.deserialize=bh=Ft.serialize=Ft.BinaryReader=Ft.BinaryWriter=Ft.BorshError=Ft.baseDecode=Ft.baseEncode=void 0;const nr=lh(ml),uh=lh(ch),v8=D8(x8),k8=typeof TextDecoder!="function"?v8.TextDecoder:TextDecoder,F8=new k8("utf-8",{fatal:!0});function T8(n){return typeof n=="string"&&(n=je.Buffer.from(n,"utf8")),uh.default.encode(je.Buffer.from(n))}Ft.baseEncode=T8;function I8(n){return je.Buffer.from(uh.default.decode(n))}Ft.baseDecode=I8;const Ta=1024;class Ht extends Error{constructor(e){super(e),this.fieldPath=[],this.originalMessage=e}addToFieldPath(e){this.fieldPath.splice(0,0,e),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}Ft.BorshError=Ht;class fh{constructor(){this.buf=je.Buffer.alloc(Ta),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=je.Buffer.concat([this.buf,je.Buffer.alloc(Ta)]))}writeU8(e){this.maybeResize(),this.buf.writeUInt8(e,this.length),this.length+=1}writeU16(e){this.maybeResize(),this.buf.writeUInt16LE(e,this.length),this.length+=2}writeU32(e){this.maybeResize(),this.buf.writeUInt32LE(e,this.length),this.length+=4}writeU64(e){this.maybeResize(),this.writeBuffer(je.Buffer.from(new nr.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(je.Buffer.from(new nr.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(je.Buffer.from(new nr.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(je.Buffer.from(new nr.default(e).toArray("le",64)))}writeBuffer(e){this.buf=je.Buffer.concat([je.Buffer.from(this.buf.subarray(0,this.length)),e,je.Buffer.alloc(Ta)]),this.length+=e.length}writeString(e){this.maybeResize();const t=je.Buffer.from(e,"utf8");this.writeU32(t.length),this.writeBuffer(t)}writeFixedArray(e){this.writeBuffer(je.Buffer.from(e))}writeArray(e,t){this.maybeResize(),this.writeU32(e.length);for(const r of e)this.maybeResize(),t(r)}toArray(){return this.buf.subarray(0,this.length)}}Ft.BinaryWriter=fh;function Wn(n,e,t){const r=t.value;t.value=function(...s){try{return r.apply(this,s)}catch(i){if(i instanceof RangeError){const o=i.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(o)>=0)throw new Ht("Reached the end of buffer when deserializing")}throw i}}}class Jt{constructor(e){this.buf=e,this.offset=0}readU8(){const e=this.buf.readUInt8(this.offset);return this.offset+=1,e}readU16(){const e=this.buf.readUInt16LE(this.offset);return this.offset+=2,e}readU32(){const e=this.buf.readUInt32LE(this.offset);return this.offset+=4,e}readU64(){const e=this.readBuffer(8);return new nr.default(e,"le")}readU128(){const e=this.readBuffer(16);return new nr.default(e,"le")}readU256(){const e=this.readBuffer(32);return new nr.default(e,"le")}readU512(){const e=this.readBuffer(64);return new nr.default(e,"le")}readBuffer(e){if(this.offset+e>this.buf.length)throw new Ht(`Expected buffer length ${e} isn't within bounds`);const t=this.buf.slice(this.offset,this.offset+e);return this.offset+=e,t}readString(){const e=this.readU32(),t=this.readBuffer(e);try{return F8.decode(t)}catch(r){throw new Ht(`Error decoding UTF-8 string: ${r}`)}}readFixedArray(e){return new Uint8Array(this.readBuffer(e))}readArray(e){const t=this.readU32(),r=Array();for(let s=0;s<t;++s)r.push(e());return r}}Rn([Wn],Jt.prototype,"readU8",null);Rn([Wn],Jt.prototype,"readU16",null);Rn([Wn],Jt.prototype,"readU32",null);Rn([Wn],Jt.prototype,"readU64",null);Rn([Wn],Jt.prototype,"readU128",null);Rn([Wn],Jt.prototype,"readU256",null);Rn([Wn],Jt.prototype,"readU512",null);Rn([Wn],Jt.prototype,"readString",null);Rn([Wn],Jt.prototype,"readFixedArray",null);Rn([Wn],Jt.prototype,"readArray",null);Ft.BinaryReader=Jt;function hh(n){return n.charAt(0).toUpperCase()+n.slice(1)}function hr(n,e,t,r,s){try{if(typeof r=="string")s[`write${hh(r)}`](t);else if(r instanceof Array)if(typeof r[0]=="number"){if(t.length!==r[0])throw new Ht(`Expecting byte array of length ${r[0]}, but got ${t.length} bytes`);s.writeFixedArray(t)}else if(r.length===2&&typeof r[1]=="number"){if(t.length!==r[1])throw new Ht(`Expecting byte array of length ${r[1]}, but got ${t.length} bytes`);for(let i=0;i<r[1];i++)hr(n,null,t[i],r[0],s)}else s.writeArray(t,i=>{hr(n,e,i,r[0],s)});else if(r.kind!==void 0)switch(r.kind){case"option":{t==null?s.writeU8(0):(s.writeU8(1),hr(n,e,t,r.type,s));break}case"map":{s.writeU32(t.size),t.forEach((i,o)=>{hr(n,e,o,r.key,s),hr(n,e,i,r.value,s)});break}default:throw new Ht(`FieldType ${r} unrecognized`)}else mh(n,t,s)}catch(i){throw i instanceof Ht&&i.addToFieldPath(e),i}}function mh(n,e,t){if(typeof e.borshSerialize=="function"){e.borshSerialize(t);return}const r=n.get(e.constructor);if(!r)throw new Ht(`Class ${e.constructor.name} is missing in schema`);if(r.kind==="struct")r.fields.map(([s,i])=>{hr(n,s,e[s],i,t)});else if(r.kind==="enum"){const s=e[r.field];for(let i=0;i<r.values.length;++i){const[o,a]=r.values[i];if(o===s){t.writeU8(i),hr(n,o,e[o],a,t);break}}}else throw new Ht(`Unexpected schema kind: ${r.kind} for ${e.constructor.name}`)}function U8(n,e,t=fh){const r=new t;return mh(n,e,r),r.toArray()}var bh=Ft.serialize=U8;function mr(n,e,t,r){try{if(typeof t=="string")return r[`read${hh(t)}`]();if(t instanceof Array){if(typeof t[0]=="number")return r.readFixedArray(t[0]);if(typeof t[1]=="number"){const s=[];for(let i=0;i<t[1];i++)s.push(mr(n,null,t[0],r));return s}else return r.readArray(()=>mr(n,e,t[0],r))}if(t.kind==="option")return r.readU8()?mr(n,e,t.type,r):void 0;if(t.kind==="map"){let s=new Map;const i=r.readU32();for(let o=0;o<i;o++){const a=mr(n,e,t.key,r),c=mr(n,e,t.value,r);s.set(a,c)}return s}return Bl(n,t,r)}catch(s){throw s instanceof Ht&&s.addToFieldPath(e),s}}function Bl(n,e,t){if(typeof e.borshDeserialize=="function")return e.borshDeserialize(t);const r=n.get(e);if(!r)throw new Ht(`Class ${e.name} is missing in schema`);if(r.kind==="struct"){const s={};for(const[i,o]of n.get(e).fields)s[i]=mr(n,i,o,t);return new e(s)}if(r.kind==="enum"){const s=t.readU8();if(s>=r.values.length)throw new Ht(`Enum index: ${s} is out of range`);const[i,o]=r.values[s],a=mr(n,i,o,t);return new e({[i]:a})}throw new Ht(`Unexpected schema kind: ${r.kind} for ${e.constructor.name}`)}function _8(n,e,t,r=Jt){const s=new r(t),i=Bl(n,e,s);if(s.offset<t.length)throw new Ht(`Unexpected ${t.length-s.offset} bytes after deserialized data`);return i}var ph=Ft.deserialize=_8;function M8(n,e,t,r=Jt){const s=new r(t);return Bl(n,e,s)}dh=Ft.deserializeUnchecked=M8;var O={};Object.defineProperty(O,"__esModule",{value:!0});exports.s16=O.s16=O.s8=O.nu64be=O.u48be=O.u40be=O.u32be=O.u24be=O.u16be=kt=O.nu64=O.u48=O.u40=exports.u32=O.u32=O.u24=exports.u16=O.u16=exports.u8=O.u8=or=O.offset=exports.greedy=O.greedy=O.Constant=O.UTF8=O.CString=O.Blob=O.Boolean=O.BitField=O.BitStructure=O.VariantLayout=O.Union=O.UnionLayoutDiscriminator=O.UnionDiscriminator=O.Structure=O.Sequence=O.DoubleBE=O.Double=O.FloatBE=O.Float=O.NearInt64BE=O.NearInt64=O.NearUInt64BE=O.NearUInt64=O.IntBE=O.Int=O.UIntBE=O.UInt=O.OffsetLayout=O.GreedyCount=O.ExternalLayout=O.bindConstructorLayout=O.nameWithProperty=O.Layout=O.uint8ArrayToBuffer=O.checkUint8Array=void 0;O.constant=O.utf8=O.cstr=exports.blob=O.blob=O.unionLayoutDiscriminator=O.union=exports.seq=O.seq=O.bits=exports.struct=O.struct=O.f64be=O.f64=O.f32be=O.f32=O.ns64be=O.s48be=O.s40be=O.s32be=O.s24be=O.s16be=exports.ns64=O.ns64=O.s48=O.s40=O.s32=O.s24=void 0;const xl=ae;function bs(n){if(!(n instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}O.checkUint8Array=bs;function Te(n){return bs(n),xl.Buffer.from(n.buffer,n.byteOffset,n.length)}O.uint8ArrayToBuffer=Te;class _e{constructor(e,t){if(!Number.isInteger(e))throw new TypeError("span must be an integer");this.span=e,this.property=t}makeDestinationObject(){return{}}getSpan(e,t){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(e){const t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}fromArray(e){}}O.Layout=_e;function Cl(n,e){return e.property?n+"["+e.property+"]":n}O.nameWithProperty=Cl;function R8(n,e){if(typeof n!="function")throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(n,"layout_"))throw new Error("Class is already bound to a layout");if(!(e&&e instanceof _e))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(e,"boundConstructor_"))throw new Error("layout is already bound to a constructor");n.layout_=e,e.boundConstructor_=n,e.makeDestinationObject=()=>new n,Object.defineProperty(n.prototype,"encode",{value(t,r){return e.encode(this,t,r)},writable:!0}),Object.defineProperty(n,"decode",{value(t,r){return e.decode(t,r)},writable:!0})}O.bindConstructorLayout=R8;class Gt extends _e{isCount(){throw new Error("ExternalLayout is abstract")}}O.ExternalLayout=Gt;class gh extends Gt{constructor(e=1,t){if(!Number.isInteger(e)||0>=e)throw new TypeError("elementSpan must be a (positive) integer");super(-1,t),this.elementSpan=e}isCount(){return!0}decode(e,t=0){bs(e);const r=e.length-t;return Math.floor(r/this.elementSpan)}encode(e,t,r){return 0}}O.GreedyCount=gh;class Sl extends Gt{constructor(e,t=0,r){if(!(e instanceof _e))throw new TypeError("layout must be a Layout");if(!Number.isInteger(t))throw new TypeError("offset must be integer or undefined");super(e.span,r||e.property),this.layout=e,this.offset=t}isCount(){return this.layout instanceof on||this.layout instanceof fn}decode(e,t=0){return this.layout.decode(e,t+this.offset)}encode(e,t,r=0){return this.layout.encode(e,t,r+this.offset)}}O.OffsetLayout=Sl;class on extends _e{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return Te(e).readUIntLE(t,this.span)}encode(e,t,r=0){return Te(t).writeUIntLE(e,r,this.span),this.span}}O.UInt=on;class fn extends _e{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return Te(e).readUIntBE(t,this.span)}encode(e,t,r=0){return Te(t).writeUIntBE(e,r,this.span),this.span}}O.UIntBE=fn;class Wr extends _e{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return Te(e).readIntLE(t,this.span)}encode(e,t,r=0){return Te(t).writeIntLE(e,r,this.span),this.span}}O.Int=Wr;class ps extends _e{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return Te(e).readIntBE(t,this.span)}encode(e,t,r=0){return Te(t).writeIntBE(e,r,this.span),this.span}}O.IntBE=ps;const Cc=Math.pow(2,32);function Fo(n){const e=Math.floor(n/Cc),t=n-e*Cc;return{hi32:e,lo32:t}}function To(n,e){return n*Cc+e}class yh extends _e{constructor(e){super(8,e)}decode(e,t=0){const r=Te(e),s=r.readUInt32LE(t),i=r.readUInt32LE(t+4);return To(i,s)}encode(e,t,r=0){const s=Fo(e),i=Te(t);return i.writeUInt32LE(s.lo32,r),i.writeUInt32LE(s.hi32,r+4),8}}O.NearUInt64=yh;class Ah extends _e{constructor(e){super(8,e)}decode(e,t=0){const r=Te(e),s=r.readUInt32BE(t),i=r.readUInt32BE(t+4);return To(s,i)}encode(e,t,r=0){const s=Fo(e),i=Te(t);return i.writeUInt32BE(s.hi32,r),i.writeUInt32BE(s.lo32,r+4),8}}O.NearUInt64BE=Ah;class wh extends _e{constructor(e){super(8,e)}decode(e,t=0){const r=Te(e),s=r.readUInt32LE(t),i=r.readInt32LE(t+4);return To(i,s)}encode(e,t,r=0){const s=Fo(e),i=Te(t);return i.writeUInt32LE(s.lo32,r),i.writeInt32LE(s.hi32,r+4),8}}O.NearInt64=wh;class Eh extends _e{constructor(e){super(8,e)}decode(e,t=0){const r=Te(e),s=r.readInt32BE(t),i=r.readUInt32BE(t+4);return To(s,i)}encode(e,t,r=0){const s=Fo(e),i=Te(t);return i.writeInt32BE(s.hi32,r),i.writeUInt32BE(s.lo32,r+4),8}}O.NearInt64BE=Eh;class Bh extends _e{constructor(e){super(4,e)}decode(e,t=0){return Te(e).readFloatLE(t)}encode(e,t,r=0){return Te(t).writeFloatLE(e,r),4}}O.Float=Bh;class xh extends _e{constructor(e){super(4,e)}decode(e,t=0){return Te(e).readFloatBE(t)}encode(e,t,r=0){return Te(t).writeFloatBE(e,r),4}}O.FloatBE=xh;class Ch extends _e{constructor(e){super(8,e)}decode(e,t=0){return Te(e).readDoubleLE(t)}encode(e,t,r=0){return Te(t).writeDoubleLE(e,r),8}}O.Double=Ch;class Sh extends _e{constructor(e){super(8,e)}decode(e,t=0){return Te(e).readDoubleBE(t)}encode(e,t,r=0){return Te(t).writeDoubleBE(e,r),8}}O.DoubleBE=Sh;class Dh extends _e{constructor(e,t,r){if(!(e instanceof _e))throw new TypeError("elementLayout must be a Layout");if(!(t instanceof Gt&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let s=-1;!(t instanceof Gt)&&0<e.span&&(s=t*e.span),super(s,r),this.elementLayout=e,this.count=t}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0,s=this.count;if(s instanceof Gt&&(s=s.decode(e,t)),0<this.elementLayout.span)r=s*this.elementLayout.span;else{let i=0;for(;i<s;)r+=this.elementLayout.getSpan(e,t+r),++i}return r}decode(e,t=0){const r=[];let s=0,i=this.count;for(i instanceof Gt&&(i=i.decode(e,t));s<i;)r.push(this.elementLayout.decode(e,t)),t+=this.elementLayout.getSpan(e,t),s+=1;return r}encode(e,t,r=0){const s=this.elementLayout,i=e.reduce((o,a)=>o+s.encode(a,t,r+o),0);return this.count instanceof Gt&&this.count.encode(e.length,t,r),i}}O.Sequence=Dh;class vh extends _e{constructor(e,t,r){if(!(Array.isArray(e)&&e.reduce((i,o)=>i&&o instanceof _e,!0)))throw new TypeError("fields must be array of Layout instances");typeof t=="boolean"&&r===void 0&&(r=t,t=void 0);for(const i of e)if(0>i.span&&i.property===void 0)throw new Error("fields cannot contain unnamed variable-length layout");let s=-1;try{s=e.reduce((i,o)=>i+o.getSpan(),0)}catch{}super(s,t),this.fields=e,this.decodePrefixes=!!r}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0;try{r=this.fields.reduce((s,i)=>{const o=i.getSpan(e,t);return t+=o,s+o},0)}catch{throw new RangeError("indeterminate span")}return r}decode(e,t=0){bs(e);const r=this.makeDestinationObject();for(const s of this.fields)if(s.property!==void 0&&(r[s.property]=s.decode(e,t)),t+=s.getSpan(e,t),this.decodePrefixes&&e.length===t)break;return r}encode(e,t,r=0){const s=r;let i=0,o=0;for(const a of this.fields){let c=a.span;if(o=0<c?c:0,a.property!==void 0){const h=e[a.property];h!==void 0&&(o=a.encode(h,t,r),0>c&&(c=a.getSpan(t,r)))}i=r,r+=c}return i+o-s}fromArray(e){const t=this.makeDestinationObject();for(const r of this.fields)r.property!==void 0&&0<e.length&&(t[r.property]=e.shift());return t}layoutFor(e){if(typeof e!="string")throw new TypeError("property must be string");for(const t of this.fields)if(t.property===e)return t}offsetOf(e){if(typeof e!="string")throw new TypeError("property must be string");let t=0;for(const r of this.fields){if(r.property===e)return t;0>r.span?t=-1:0<=t&&(t+=r.span)}}}O.Structure=vh;class Dl{constructor(e){this.property=e}decode(e,t){throw new Error("UnionDiscriminator is abstract")}encode(e,t,r){throw new Error("UnionDiscriminator is abstract")}}O.UnionDiscriminator=Dl;class eo extends Dl{constructor(e,t){if(!(e instanceof Gt&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(t||e.property||"variant"),this.layout=e}decode(e,t){return this.layout.decode(e,t)}encode(e,t,r){return this.layout.encode(e,t,r)}}O.UnionLayoutDiscriminator=eo;class vl extends _e{constructor(e,t,r){let s;if(e instanceof on||e instanceof fn)s=new eo(new Sl(e));else if(e instanceof Gt&&e.isCount())s=new eo(e);else if(e instanceof Dl)s=e;else throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(t===void 0&&(t=null),!(t===null||t instanceof _e))throw new TypeError("defaultLayout must be null or a Layout");if(t!==null){if(0>t.span)throw new Error("defaultLayout must have constant span");t.property===void 0&&(t=t.replicate("content"))}let i=-1;t&&(i=t.span,0<=i&&(e instanceof on||e instanceof fn)&&(i+=s.layout.span)),super(i,r),this.discriminator=s,this.usesPrefixDiscriminator=e instanceof on||e instanceof fn,this.defaultLayout=t,this.registry={};let o=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(a){return o(a)},this.configGetSourceVariant=function(a){o=a.bind(this)}}getSpan(e,t=0){if(0<=this.span)return this.span;const r=this.getVariant(e,t);if(!r)throw new Error("unable to determine span for unrecognized variant");return r.getSpan(e,t)}defaultGetSourceVariant(e){if(Object.prototype.hasOwnProperty.call(e,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(e,this.defaultLayout.property))return;const t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||t.property&&Object.prototype.hasOwnProperty.call(e,t.property)))return t}else for(const t in this.registry){const r=this.registry[t];if(r.property&&Object.prototype.hasOwnProperty.call(e,r.property))return r}throw new Error("unable to infer src variant")}decode(e,t=0){let r;const s=this.discriminator,i=s.decode(e,t),o=this.registry[i];if(o===void 0){const a=this.defaultLayout;let c=0;this.usesPrefixDiscriminator&&(c=s.layout.span),r=this.makeDestinationObject(),r[s.property]=i,r[a.property]=a.decode(e,t+c)}else r=o.decode(e,t);return r}encode(e,t,r=0){const s=this.getSourceVariant(e);if(s===void 0){const i=this.discriminator,o=this.defaultLayout;let a=0;return this.usesPrefixDiscriminator&&(a=i.layout.span),i.encode(e[i.property],t,r),a+o.encode(e[o.property],t,r+a)}return s.encode(e,t,r)}addVariant(e,t,r){const s=new kh(this,e,t,r);return this.registry[e]=s,s}getVariant(e,t=0){let r;return e instanceof Uint8Array?r=this.discriminator.decode(e,t):r=e,this.registry[r]}}O.Union=vl;class kh extends _e{constructor(e,t,r,s){if(!(e instanceof vl))throw new TypeError("union must be a Union");if(!Number.isInteger(t)||0>t)throw new TypeError("variant must be a (non-negative) integer");if(typeof r=="string"&&s===void 0&&(s=r,r=null),r){if(!(r instanceof _e))throw new TypeError("layout must be a Layout");if(e.defaultLayout!==null&&0<=r.span&&r.span>e.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if(typeof s!="string")throw new TypeError("variant must have a String property")}let i=e.span;0>e.span&&(i=r?r.span:0,0<=i&&e.usesPrefixDiscriminator&&(i+=e.discriminator.layout.span)),super(i,s),this.union=e,this.variant=t,this.layout=r||null}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0;this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span);let s=0;return this.layout&&(s=this.layout.getSpan(e,t+r)),r+s}decode(e,t=0){const r=this.makeDestinationObject();if(this!==this.union.getVariant(e,t))throw new Error("variant mismatch");let s=0;return this.union.usesPrefixDiscriminator&&(s=this.union.discriminator.layout.span),this.layout?r[this.property]=this.layout.decode(e,t+s):this.property?r[this.property]=!0:this.union.usesPrefixDiscriminator&&(r[this.union.discriminator.property]=this.variant),r}encode(e,t,r=0){let s=0;if(this.union.usesPrefixDiscriminator&&(s=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(e,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,r);let i=s;if(this.layout&&(this.layout.encode(e[this.property],t,r+s),i+=this.layout.getSpan(t,r+s),0<=this.union.span&&i>this.union.span))throw new Error("encoded variant overruns containing union");return i}fromArray(e){if(this.layout)return this.layout.fromArray(e)}}O.VariantLayout=kh;function qr(n){return 0>n&&(n+=4294967296),n}class kl extends _e{constructor(e,t,r){if(!(e instanceof on||e instanceof fn))throw new TypeError("word must be a UInt or UIntBE layout");if(typeof t=="string"&&r===void 0&&(r=t,t=!1),4<e.span)throw new RangeError("word cannot exceed 32 bits");super(e.span,r),this.word=e,this.msb=!!t,this.fields=[];let s=0;this._packedSetValue=function(i){return s=qr(i),this},this._packedGetValue=function(){return s}}decode(e,t=0){const r=this.makeDestinationObject(),s=this.word.decode(e,t);this._packedSetValue(s);for(const i of this.fields)i.property!==void 0&&(r[i.property]=i.decode(e));return r}encode(e,t,r=0){const s=this.word.decode(t,r);this._packedSetValue(s);for(const i of this.fields)if(i.property!==void 0){const o=e[i.property];o!==void 0&&i.encode(o)}return this.word.encode(this._packedGetValue(),t,r)}addField(e,t){const r=new Fl(this,e,t);return this.fields.push(r),r}addBoolean(e){const t=new Fh(this,e);return this.fields.push(t),t}fieldFor(e){if(typeof e!="string")throw new TypeError("property must be string");for(const t of this.fields)if(t.property===e)return t}}O.BitStructure=kl;class Fl{constructor(e,t,r){if(!(e instanceof kl))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(t)||0>=t)throw new TypeError("bits must be positive integer");const s=8*e.span,i=e.fields.reduce((o,a)=>o+a.bits,0);if(t+i>s)throw new Error("bits too long for span remainder ("+(s-i)+" of "+s+" remain)");this.container=e,this.bits=t,this.valueMask=(1<<t)-1,t===32&&(this.valueMask=4294967295),this.start=i,this.container.msb&&(this.start=s-i-t),this.wordMask=qr(this.valueMask<<this.start),this.property=r}decode(e,t){const r=this.container._packedGetValue();return qr(r&this.wordMask)>>>this.start}encode(e){if(typeof e!="number"||!Number.isInteger(e)||e!==qr(e&this.valueMask))throw new TypeError(Cl("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);const t=this.container._packedGetValue(),r=qr(e<<this.start);this.container._packedSetValue(qr(t&~this.wordMask)|r)}}O.BitField=Fl;let Fh=class extends Fl{constructor(e,t){super(e,1,t)}decode(e,t){return!!super.decode(e,t)}encode(e){typeof e=="boolean"&&(e=+e),super.encode(e)}};O.Boolean=Fh;let Th=class extends _e{constructor(e,t){if(!(e instanceof Gt&&e.isCount()||Number.isInteger(e)&&0<=e))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let r=-1;e instanceof Gt||(r=e),super(r,t),this.length=e}getSpan(e,t){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),r}decode(e,t=0){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),Te(e).slice(t,t+r)}encode(e,t,r){let s=this.length;if(this.length instanceof Gt&&(s=e.length),!(e instanceof Uint8Array&&s===e.length))throw new TypeError(Cl("Blob.encode",this)+" requires (length "+s+") Uint8Array as src");if(r+s>t.length)throw new RangeError("encoding overruns Uint8Array");const i=Te(e);return Te(t).write(i.toString("hex"),r,s,"hex"),this.length instanceof Gt&&this.length.encode(s,t,r),s}};O.Blob=Th;class Ih extends _e{constructor(e){super(-1,e)}getSpan(e,t=0){bs(e);let r=t;for(;r<e.length&&e[r]!==0;)r+=1;return 1+r-t}decode(e,t=0){const r=this.getSpan(e,t);return Te(e).slice(t,t+r-1).toString("utf-8")}encode(e,t,r=0){typeof e!="string"&&(e=String(e));const s=xl.Buffer.from(e,"utf8"),i=s.length;if(r+i>t.length)throw new RangeError("encoding overruns Buffer");const o=Te(t);return s.copy(o,r),o[r+i]=0,i+1}}O.CString=Ih;class Uh extends _e{constructor(e,t){if(typeof e=="string"&&t===void 0&&(t=e,e=void 0),e===void 0)e=-1;else if(!Number.isInteger(e))throw new TypeError("maxSpan must be an integer");super(-1,t),this.maxSpan=e}getSpan(e,t=0){return bs(e),e.length-t}decode(e,t=0){const r=this.getSpan(e,t);if(0<=this.maxSpan&&this.maxSpan<r)throw new RangeError("text length exceeds maxSpan");return Te(e).slice(t,t+r).toString("utf-8")}encode(e,t,r=0){typeof e!="string"&&(e=String(e));const s=xl.Buffer.from(e,"utf8"),i=s.length;if(0<=this.maxSpan&&this.maxSpan<i)throw new RangeError("text length exceeds maxSpan");if(r+i>t.length)throw new RangeError("encoding overruns Buffer");return s.copy(Te(t),r),i}}O.UTF8=Uh;class _h extends _e{constructor(e,t){super(0,t),this.value=e}decode(e,t){return this.value}encode(e,t,r){return 0}}O.Constant=_h;exports.greedy=O.greedy=(n,e)=>new gh(n,e);var or=O.offset=(n,e,t)=>new Sl(n,e,t);exports.u8=O.u8=n=>new on(1,n);exports.u16=O.u16=n=>new on(2,n);O.u24=n=>new on(3,n);exports.u32=O.u32=n=>new on(4,n);O.u40=n=>new on(5,n);O.u48=n=>new on(6,n);var kt=O.nu64=n=>new yh(n);O.u16be=n=>new fn(2,n);O.u24be=n=>new fn(3,n);O.u32be=n=>new fn(4,n);O.u40be=n=>new fn(5,n);O.u48be=n=>new fn(6,n);O.nu64be=n=>new Ah(n);O.s8=n=>new Wr(1,n);exports.s16=O.s16=n=>new Wr(2,n);O.s24=n=>new Wr(3,n);O.s32=n=>new Wr(4,n);O.s40=n=>new Wr(5,n);O.s48=n=>new Wr(6,n);exports.ns64=O.ns64=n=>new wh(n);O.s16be=n=>new ps(2,n);O.s24be=n=>new ps(3,n);O.s32be=n=>new ps(4,n);O.s40be=n=>new ps(5,n);O.s48be=n=>new ps(6,n);O.ns64be=n=>new Eh(n);O.f32=n=>new Bh(n);O.f32be=n=>new xh(n);O.f64=n=>new Ch(n);O.f64be=n=>new Sh(n);exports.struct=O.struct=(n,e,t)=>new vh(n,e,t);O.bits=(n,e,t)=>new kl(n,e,t);exports.seq=O.seq=(n,e,t)=>new Dh(n,e,t);O.union=(n,e,t)=>new vl(n,e,t);O.unionLayoutDiscriminator=(n,e)=>new eo(n,e);exports.blob=O.blob=(n,e)=>new Th(n,e);O.cstr=n=>new Ih(n);O.utf8=(n,e)=>new Uh(n,e);O.constant=(n,e)=>new _h(n,e);var ai={};Object.defineProperty(ai,"__esModule",{value:!0});function W8(n){{const e=je.Buffer.from(n);e.reverse();const t=e.toString("hex");return t.length===0?BigInt(0):BigInt(`0x${t}`)}}var Mh=ai.toBigIntLE=W8;function P8(n){{const e=n.toString("hex");return e.length===0?BigInt(0):BigInt(`0x${e}`)}}ai.toBigIntBE=P8;function L8(n,e){{const t=n.toString(16),r=je.Buffer.from(t.padStart(e*2,"0").slice(0,e*2),"hex");return r.reverse(),r}}var Tl=ai.toBufferLE=L8;function O8(n,e){{const t=n.toString(16);return je.Buffer.from(t.padStart(e*2,"0").slice(0,e*2),"hex")}}ai.toBufferBE=O8;class N8 extends TypeError{constructor(e,t){let r;const{message:s,explanation:i,...o}=e,{path:a}=e,c=a.length===0?s:`At path: ${a.join(".")} -- ${s}`;super(i??c),i!=null&&(this.cause=c),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function z8(n){return ci(n)&&typeof n[Symbol.iterator]=="function"}function ci(n){return typeof n=="object"&&n!=null}function to(n){return ci(n)&&!Array.isArray(n)}function hn(n){return typeof n=="symbol"?n.toString():typeof n=="string"?JSON.stringify(n):`${n}`}function H8(n){const{done:e,value:t}=n.next();return e?void 0:t}function q8(n,e,t,r){if(n===!0)return;n===!1?n={}:typeof n=="string"&&(n={message:n});const{path:s,branch:i}=e,{type:o}=t,{refinement:a,message:c=`Expected a value of type \`${o}\`${a?` with refinement \`${a}\``:""}, but received: \`${hn(r)}\``}=n;return{value:r,type:o,refinement:a,key:s[s.length-1],path:s,branch:i,...n,message:c}}function*fu(n,e,t,r){z8(n)||(n=[n]);for(const s of n){const i=q8(s,e,t,r);i&&(yield i)}}function*Il(n,e,t={}){const{path:r=[],branch:s=[n],coerce:i=!1,mask:o=!1}=t,a={path:r,branch:s,mask:o};i&&(n=e.coercer(n,a));let c="valid";for(const h of e.validator(n,a))h.explanation=t.message,c="not_valid",yield[h,void 0];for(let[h,b,w]of e.entries(n,a)){const D=Il(b,w,{path:h===void 0?r:[...r,h],branch:h===void 0?s:[...s,b],coerce:i,mask:o,message:t.message});for(const E of D)E[0]?(c=E[0].refinement!=null?"not_refined":"not_valid",yield[E[0],void 0]):i&&(b=E[1],h===void 0?n=b:n instanceof Map?n.set(h,b):n instanceof Set?n.add(b):ci(n)&&(b!==void 0||h in n)&&(n[h]=b))}if(c!=="not_valid")for(const h of e.refiner(n,a))h.explanation=t.message,c="not_refined",yield[h,void 0];c==="valid"&&(yield[void 0,n])}let Pn=class{constructor(e){const{type:t,schema:r,validator:s,refiner:i,coercer:o=c=>c,entries:a=function*(){}}=e;this.type=t,this.schema=r,this.entries=a,this.coercer=o,s?this.validator=(c,h)=>{const b=s(c,h);return fu(b,h,this,c)}:this.validator=()=>[],i?this.refiner=(c,h)=>{const b=i(c,h);return fu(b,h,this,c)}:this.refiner=()=>[]}assert(e,t){return Rh(e,this,t)}create(e,t){return Q(e,this,t)}is(e){return Wh(e,this)}mask(e,t){return K8(e,this,t)}validate(e,t={}){return li(e,this,t)}};function Rh(n,e,t){const r=li(n,e,{message:t});if(r[0])throw r[0]}function Q(n,e,t){const r=li(n,e,{coerce:!0,message:t});if(r[0])throw r[0];return r[1]}function K8(n,e,t){const r=li(n,e,{coerce:!0,mask:!0,message:t});if(r[0])throw r[0];return r[1]}function Wh(n,e){return!li(n,e)[0]}function li(n,e,t={}){const r=Il(n,e,t),s=H8(r);return s[0]?[new N8(s[0],function*(){for(const o of r)o[0]&&(yield o[0])}),void 0]:[void 0,s[1]]}function Pr(n,e){return new Pn({type:n,schema:null,validator:e})}function j8(){return Pr("any",()=>!0)}function te(n){return new Pn({type:"array",schema:n,*entries(e){if(n&&Array.isArray(e))for(const[t,r]of e.entries())yield[t,r,n]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${hn(e)}`}})}function _n(){return Pr("boolean",n=>typeof n=="boolean")}function Ul(n){return Pr("instance",e=>e instanceof n||`Expected a \`${n.name}\` instance, but received: ${hn(e)}`)}function Ve(n){const e=hn(n),t=typeof n;return new Pn({type:"literal",schema:t==="string"||t==="number"||t==="boolean"?n:null,validator(r){return r===n||`Expected the literal \`${e}\`, but received: ${hn(r)}`}})}function $8(){return Pr("never",()=>!1)}function ne(n){return new Pn({...n,validator:(e,t)=>e===null||n.validator(e,t),refiner:(e,t)=>e===null||n.refiner(e,t)})}function P(){return Pr("number",n=>typeof n=="number"&&!isNaN(n)||`Expected a number, but received: ${hn(n)}`)}function le(n){return new Pn({...n,validator:(e,t)=>e===void 0||n.validator(e,t),refiner:(e,t)=>e===void 0||n.refiner(e,t)})}function Ph(n,e){return new Pn({type:"record",schema:null,*entries(t){if(ci(t))for(const r in t){const s=t[r];yield[r,r,n],yield[r,s,e]}},validator(t){return to(t)||`Expected an object, but received: ${hn(t)}`},coercer(t){return to(t)?{...t}:t}})}function Z(){return Pr("string",n=>typeof n=="string"||`Expected a string, but received: ${hn(n)}`)}function _l(n){const e=$8();return new Pn({type:"tuple",schema:null,*entries(t){if(Array.isArray(t)){const r=Math.max(n.length,t.length);for(let s=0;s<r;s++)yield[s,t[s],n[s]||e]}},validator(t){return Array.isArray(t)||`Expected an array, but received: ${hn(t)}`},coercer(t){return Array.isArray(t)?t.slice():t}})}function j(n){const e=Object.keys(n);return new Pn({type:"type",schema:n,*entries(t){if(ci(t))for(const r of e)yield[r,t[r],n[r]]},validator(t){return to(t)||`Expected an object, but received: ${hn(t)}`},coercer(t){return to(t)?{...t}:t}})}function Kt(n){const e=n.map(t=>t.type).join(" | ");return new Pn({type:"union",schema:null,coercer(t,r){for(const s of n){const[i,o]=s.validate(t,{coerce:!0,mask:r.mask});if(!i)return o}return t},validator(t,r){const s=[];for(const i of n){const[...o]=Il(t,i,r),[a]=o;if(a[0])for(const[c]of o)c&&s.push(c);else return[]}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${hn(t)}`,...s]}})}function gs(){return Pr("unknown",()=>!0)}function di(n,e,t){return new Pn({...n,coercer:(r,s)=>Wh(r,e)?n.coercer(t(r,s),s):n.coercer(r,s)})}var yi,V8=new Uint8Array(16);function Lh(){if(!yi&&(yi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!yi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return yi(V8)}const G8=/^(?:[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 Io(n){return typeof n=="string"&&G8.test(n)}var vt=[];for(var Ia=0;Ia<256;++Ia)vt.push((Ia+256).toString(16).substr(1));function Uo(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=(vt[n[e+0]]+vt[n[e+1]]+vt[n[e+2]]+vt[n[e+3]]+"-"+vt[n[e+4]]+vt[n[e+5]]+"-"+vt[n[e+6]]+vt[n[e+7]]+"-"+vt[n[e+8]]+vt[n[e+9]]+"-"+vt[n[e+10]]+vt[n[e+11]]+vt[n[e+12]]+vt[n[e+13]]+vt[n[e+14]]+vt[n[e+15]]).toLowerCase();if(!Io(t))throw TypeError("Stringified UUID is invalid");return t}var hu,Ua,_a=0,Ma=0;function Y8(n,e,t){var r=e&&t||0,s=e||new Array(16);n=n||{};var i=n.node||hu,o=n.clockseq!==void 0?n.clockseq:Ua;if(i==null||o==null){var a=n.random||(n.rng||Lh)();i==null&&(i=hu=[a[0]|1,a[1],a[2],a[3],a[4],a[5]]),o==null&&(o=Ua=(a[6]<<8|a[7])&16383)}var c=n.msecs!==void 0?n.msecs:Date.now(),h=n.nsecs!==void 0?n.nsecs:Ma+1,b=c-_a+(h-Ma)/1e4;if(b<0&&n.clockseq===void 0&&(o=o+1&16383),(b<0||c>_a)&&n.nsecs===void 0&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");_a=c,Ma=h,Ua=o,c+=122192928e5;var w=((c&268435455)*1e4+h)%4294967296;s[r++]=w>>>24&255,s[r++]=w>>>16&255,s[r++]=w>>>8&255,s[r++]=w&255;var D=c/4294967296*1e4&268435455;s[r++]=D>>>8&255,s[r++]=D&255,s[r++]=D>>>24&15|16,s[r++]=D>>>16&255,s[r++]=o>>>8|128,s[r++]=o&255;for(var E=0;E<6;++E)s[r+E]=i[E];return e||Uo(s)}function Oh(n){if(!Io(n))throw TypeError("Invalid UUID");var e,t=new Uint8Array(16);return t[0]=(e=parseInt(n.slice(0,8),16))>>>24,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=e&255,t[4]=(e=parseInt(n.slice(9,13),16))>>>8,t[5]=e&255,t[6]=(e=parseInt(n.slice(14,18),16))>>>8,t[7]=e&255,t[8]=(e=parseInt(n.slice(19,23),16))>>>8,t[9]=e&255,t[10]=(e=parseInt(n.slice(24,36),16))/1099511627776&255,t[11]=e/4294967296&255,t[12]=e>>>24&255,t[13]=e>>>16&255,t[14]=e>>>8&255,t[15]=e&255,t}function X8(n){n=unescape(encodeURIComponent(n));for(var e=[],t=0;t<n.length;++t)e.push(n.charCodeAt(t));return e}var Z8="6ba7b810-9dad-11d1-80b4-00c04fd430c8",J8="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Nh(n,e,t){function r(s,i,o,a){if(typeof s=="string"&&(s=X8(s)),typeof i=="string"&&(i=Oh(i)),i.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var c=new Uint8Array(16+s.length);if(c.set(i),c.set(s,i.length),c=t(c),c[6]=c[6]&15|e,c[8]=c[8]&63|128,o){a=a||0;for(var h=0;h<16;++h)o[a+h]=c[h];return o}return Uo(c)}try{r.name=n}catch{}return r.DNS=Z8,r.URL=J8,r}function Q8(n){if(typeof n=="string"){var e=unescape(encodeURIComponent(n));n=new Uint8Array(e.length);for(var t=0;t<e.length;++t)n[t]=e.charCodeAt(t)}return e3(t3(n3(n),n.length*8))}function e3(n){for(var e=[],t=n.length*32,r="0123456789abcdef",s=0;s<t;s+=8){var i=n[s>>5]>>>s%32&255,o=parseInt(r.charAt(i>>>4&15)+r.charAt(i&15),16);e.push(o)}return e}function zh(n){return(n+64>>>9<<4)+14+1}function t3(n,e){n[e>>5]|=128<<e%32,n[zh(e)-1]=e;for(var t=1732584193,r=-271733879,s=-1732584194,i=271733878,o=0;o<n.length;o+=16){var a=t,c=r,h=s,b=i;t=Mt(t,r,s,i,n[o],7,-680876936),i=Mt(i,t,r,s,n[o+1],12,-389564586),s=Mt(s,i,t,r,n[o+2],17,606105819),r=Mt(r,s,i,t,n[o+3],22,-1044525330),t=Mt(t,r,s,i,n[o+4],7,-176418897),i=Mt(i,t,r,s,n[o+5],12,1200080426),s=Mt(s,i,t,r,n[o+6],17,-1473231341),r=Mt(r,s,i,t,n[o+7],22,-45705983),t=Mt(t,r,s,i,n[o+8],7,1770035416),i=Mt(i,t,r,s,n[o+9],12,-1958414417),s=Mt(s,i,t,r,n[o+10],17,-42063),r=Mt(r,s,i,t,n[o+11],22,-1990404162),t=Mt(t,r,s,i,n[o+12],7,1804603682),i=Mt(i,t,r,s,n[o+13],12,-40341101),s=Mt(s,i,t,r,n[o+14],17,-1502002290),r=Mt(r,s,i,t,n[o+15],22,1236535329),t=Rt(t,r,s,i,n[o+1],5,-165796510),i=Rt(i,t,r,s,n[o+6],9,-1069501632),s=Rt(s,i,t,r,n[o+11],14,643717713),r=Rt(r,s,i,t,n[o],20,-373897302),t=Rt(t,r,s,i,n[o+5],5,-701558691),i=Rt(i,t,r,s,n[o+10],9,38016083),s=Rt(s,i,t,r,n[o+15],14,-660478335),r=Rt(r,s,i,t,n[o+4],20,-405537848),t=Rt(t,r,s,i,n[o+9],5,568446438),i=Rt(i,t,r,s,n[o+14],9,-1019803690),s=Rt(s,i,t,r,n[o+3],14,-187363961),r=Rt(r,s,i,t,n[o+8],20,1163531501),t=Rt(t,r,s,i,n[o+13],5,-1444681467),i=Rt(i,t,r,s,n[o+2],9,-51403784),s=Rt(s,i,t,r,n[o+7],14,1735328473),r=Rt(r,s,i,t,n[o+12],20,-1926607734),t=Wt(t,r,s,i,n[o+5],4,-378558),i=Wt(i,t,r,s,n[o+8],11,-2022574463),s=Wt(s,i,t,r,n[o+11],16,1839030562),r=Wt(r,s,i,t,n[o+14],23,-35309556),t=Wt(t,r,s,i,n[o+1],4,-1530992060),i=Wt(i,t,r,s,n[o+4],11,1272893353),s=Wt(s,i,t,r,n[o+7],16,-155497632),r=Wt(r,s,i,t,n[o+10],23,-1094730640),t=Wt(t,r,s,i,n[o+13],4,681279174),i=Wt(i,t,r,s,n[o],11,-358537222),s=Wt(s,i,t,r,n[o+3],16,-722521979),r=Wt(r,s,i,t,n[o+6],23,76029189),t=Wt(t,r,s,i,n[o+9],4,-640364487),i=Wt(i,t,r,s,n[o+12],11,-421815835),s=Wt(s,i,t,r,n[o+15],16,530742520),r=Wt(r,s,i,t,n[o+2],23,-995338651),t=Pt(t,r,s,i,n[o],6,-198630844),i=Pt(i,t,r,s,n[o+7],10,1126891415),s=Pt(s,i,t,r,n[o+14],15,-1416354905),r=Pt(r,s,i,t,n[o+5],21,-57434055),t=Pt(t,r,s,i,n[o+12],6,1700485571),i=Pt(i,t,r,s,n[o+3],10,-1894986606),s=Pt(s,i,t,r,n[o+10],15,-1051523),r=Pt(r,s,i,t,n[o+1],21,-2054922799),t=Pt(t,r,s,i,n[o+8],6,1873313359),i=Pt(i,t,r,s,n[o+15],10,-30611744),s=Pt(s,i,t,r,n[o+6],15,-1560198380),r=Pt(r,s,i,t,n[o+13],21,1309151649),t=Pt(t,r,s,i,n[o+4],6,-145523070),i=Pt(i,t,r,s,n[o+11],10,-1120210379),s=Pt(s,i,t,r,n[o+2],15,718787259),r=Pt(r,s,i,t,n[o+9],21,-343485551),t=rr(t,a),r=rr(r,c),s=rr(s,h),i=rr(i,b)}return[t,r,s,i]}function n3(n){if(n.length===0)return[];for(var e=n.length*8,t=new Uint32Array(zh(e)),r=0;r<e;r+=8)t[r>>5]|=(n[r/8]&255)<<r%32;return t}function rr(n,e){var t=(n&65535)+(e&65535),r=(n>>16)+(e>>16)+(t>>16);return r<<16|t&65535}function r3(n,e){return n<<e|n>>>32-e}function _o(n,e,t,r,s,i){return rr(r3(rr(rr(e,n),rr(r,i)),s),t)}function Mt(n,e,t,r,s,i,o){return _o(e&t|~e&r,n,e,s,i,o)}function Rt(n,e,t,r,s,i,o){return _o(e&r|t&~r,n,e,s,i,o)}function Wt(n,e,t,r,s,i,o){return _o(e^t^r,n,e,s,i,o)}function Pt(n,e,t,r,s,i,o){return _o(t^(e|~r),n,e,s,i,o)}var s3=Nh("v3",48,Q8);function i3(n,e,t){n=n||{};var r=n.random||(n.rng||Lh)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){t=t||0;for(var s=0;s<16;++s)e[t+s]=r[s];return e}return Uo(r)}function o3(n,e,t,r){switch(n){case 0:return e&t^~e&r;case 1:return e^t^r;case 2:return e&t^e&r^t&r;case 3:return e^t^r}}function Ra(n,e){return n<<e|n>>>32-e}function a3(n){var e=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof n=="string"){var r=unescape(encodeURIComponent(n));n=[];for(var s=0;s<r.length;++s)n.push(r.charCodeAt(s))}else Array.isArray(n)||(n=Array.prototype.slice.call(n));n.push(128);for(var i=n.length/4+2,o=Math.ceil(i/16),a=new Array(o),c=0;c<o;++c){for(var h=new Uint32Array(16),b=0;b<16;++b)h[b]=n[c*64+b*4]<<24|n[c*64+b*4+1]<<16|n[c*64+b*4+2]<<8|n[c*64+b*4+3];a[c]=h}a[o-1][14]=(n.length-1)*8/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=(n.length-1)*8&4294967295;for(var w=0;w<o;++w){for(var D=new Uint32Array(80),E=0;E<16;++E)D[E]=a[w][E];for(var g=16;g<80;++g)D[g]=Ra(D[g-3]^D[g-8]^D[g-14]^D[g-16],1);for(var S=t[0],T=t[1],M=t[2],N=t[3],_=t[4],U=0;U<80;++U){var L=Math.floor(U/20),H=Ra(S,5)+o3(L,T,M,N)+_+e[L]+D[U]>>>0;_=N,N=M,M=Ra(T,30)>>>0,T=S,S=H}t[0]=t[0]+S>>>0,t[1]=t[1]+T>>>0,t[2]=t[2]+M>>>0,t[3]=t[3]+N>>>0,t[4]=t[4]+_>>>0}return[t[0]>>24&255,t[0]>>16&255,t[0]>>8&255,t[0]&255,t[1]>>24&255,t[1]>>16&255,t[1]>>8&255,t[1]&255,t[2]>>24&255,t[2]>>16&255,t[2]>>8&255,t[2]&255,t[3]>>24&255,t[3]>>16&255,t[3]>>8&255,t[3]&255,t[4]>>24&255,t[4]>>16&255,t[4]>>8&255,t[4]&255]}var c3=Nh("v5",80,a3);const l3="00000000-0000-0000-0000-000000000000";function d3(n){if(!Io(n))throw TypeError("Invalid UUID");return parseInt(n.substr(14,1),16)}const u3=Object.freeze(Object.defineProperty({__proto__:null,NIL:l3,parse:Oh,stringify:Uo,v1:Y8,v3:s3,v4:i3,v5:c3,validate:Io,version:d3},Symbol.toStringTag,{value:"Module"})),Hh=Tc(u3),f3=Hh.v4,h3=function(n,e,t,r){if(typeof n!="string")throw new TypeError(n+" must be a string");r=r||{};const s=typeof r.version=="number"?r.version:2;if(s!==1&&s!==2)throw new TypeError(s+" must be 1 or 2");const i={method:n};if(s===2&&(i.jsonrpc="2.0"),e){if(typeof e!="object"&&!Array.isArray(e))throw new TypeError(e+" must be an object, array or omitted");i.params=e}if(typeof t>"u"){const o=typeof r.generator=="function"?r.generator:function(){return f3()};i.id=o(i,r)}else s===2&&t===null?r.notificationIdNull&&(i.id=null):i.id=t;return i};var m3=h3;const b3=Hh.v4,p3=m3,$s=function(n,e){if(!(this instanceof $s))return new $s(n,e);e||(e={}),this.options={reviver:typeof e.reviver<"u"?e.reviver:null,replacer:typeof e.replacer<"u"?e.replacer:null,generator:typeof e.generator<"u"?e.generator:function(){return b3()},version:typeof e.version<"u"?e.version:2,notificationIdNull:typeof e.notificationIdNull=="boolean"?e.notificationIdNull:!1},this.callServer=n};var g3=$s;$s.prototype.request=function(n,e,t,r){const s=this;let i=null;const o=Array.isArray(n)&&typeof e=="function";if(this.options.version===1&&o)throw new TypeError("JSON-RPC 1.0 does not support batching");if(o||!o&&n&&typeof n=="object"&&typeof e=="function")r=e,i=n;else{typeof t=="function"&&(r=t,t=void 0);const h=typeof r=="function";try{i=p3(n,e,t,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(b){if(h)return r(b);throw b}if(!h)return i}let c;try{c=JSON.stringify(i,this.options.replacer)}catch(h){return r(h)}return this.callServer(c,function(h,b){s._parseResponse(h,b,r)}),i};$s.prototype._parseResponse=function(n,e,t){if(n){t(n);return}if(!e)return t();let r;try{r=JSON.parse(e,this.options.reviver)}catch(s){return t(s)}if(t.length===3)if(Array.isArray(r)){const s=function(o){return typeof o.error<"u"},i=function(o){return!s(o)};return t(null,r.filter(s),r.filter(i))}else return t(null,r.error,r.result);t(null,r)};const qh=Xs(g3);var Kh={exports:{}};(function(n){var e=Object.prototype.hasOwnProperty,t="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(t=!1));function s(c,h,b){this.fn=c,this.context=h,this.once=b||!1}function i(c,h,b,w,D){if(typeof b!="function")throw new TypeError("The listener must be a function");var E=new s(b,w||c,D),g=t?t+h:h;return c._events[g]?c._events[g].fn?c._events[g]=[c._events[g],E]:c._events[g].push(E):(c._events[g]=E,c._eventsCount++),c}function o(c,h){--c._eventsCount===0?c._events=new r:delete c._events[h]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var h=[],b,w;if(this._eventsCount===0)return h;for(w in b=this._events)e.call(b,w)&&h.push(t?w.slice(1):w);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(b)):h},a.prototype.listeners=function(h){var b=t?t+h:h,w=this._events[b];if(!w)return[];if(w.fn)return[w.fn];for(var D=0,E=w.length,g=new Array(E);D<E;D++)g[D]=w[D].fn;return g},a.prototype.listenerCount=function(h){var b=t?t+h:h,w=this._events[b];return w?w.fn?1:w.length:0},a.prototype.emit=function(h,b,w,D,E,g){var S=t?t+h:h;if(!this._events[S])return!1;var T=this._events[S],M=arguments.length,N,_;if(T.fn){switch(T.once&&this.removeListener(h,T.fn,void 0,!0),M){case 1:return T.fn.call(T.context),!0;case 2:return T.fn.call(T.context,b),!0;case 3:return T.fn.call(T.context,b,w),!0;case 4:return T.fn.call(T.context,b,w,D),!0;case 5:return T.fn.call(T.context,b,w,D,E),!0;case 6:return T.fn.call(T.context,b,w,D,E,g),!0}for(_=1,N=new Array(M-1);_<M;_++)N[_-1]=arguments[_];T.fn.apply(T.context,N)}else{var U=T.length,L;for(_=0;_<U;_++)switch(T[_].once&&this.removeListener(h,T[_].fn,void 0,!0),M){case 1:T[_].fn.call(T[_].context);break;case 2:T[_].fn.call(T[_].context,b);break;case 3:T[_].fn.call(T[_].context,b,w);break;case 4:T[_].fn.call(T[_].context,b,w,D);break;default:if(!N)for(L=1,N=new Array(M-1);L<M;L++)N[L-1]=arguments[L];T[_].fn.apply(T[_].context,N)}}return!0},a.prototype.on=function(h,b,w){return i(this,h,b,w,!1)},a.prototype.once=function(h,b,w){return i(this,h,b,w,!0)},a.prototype.removeListener=function(h,b,w,D){var E=t?t+h:h;if(!this._events[E])return this;if(!b)return o(this,E),this;var g=this._events[E];if(g.fn)g.fn===b&&(!D||g.once)&&(!w||g.context===w)&&o(this,E);else{for(var S=0,T=[],M=g.length;S<M;S++)(g[S].fn!==b||D&&!g[S].once||w&&g[S].context!==w)&&T.push(g[S]);T.length?this._events[E]=T.length===1?T[0]:T:o(this,E)}return this},a.prototype.removeAllListeners=function(h){var b;return h?(b=t?t+h:h,this._events[b]&&o(this,b)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=t,a.EventEmitter=a,n.exports=a})(Kh);var y3=Kh.exports;const Ml=Xs(y3);var A3=class extends Ml{constructor(e,t,r){super();se(this,"socket");this.socket=new window.WebSocket(e,r),this.socket.onopen=()=>this.emit("open"),this.socket.onmessage=s=>this.emit("message",s.data),this.socket.onerror=s=>this.emit("error",s),this.socket.onclose=s=>{this.emit("close",s.code,s.reason)}}send(e,t,r){const s=r||t;try{this.socket.send(e),s()}catch(i){s(i)}}close(e,t){this.socket.close(e,t)}addEventListener(e,t,r){this.socket.addEventListener(e,t,r)}};function w3(n,e){return new A3(n,e)}var E3=class{encode(n){return JSON.stringify(n)}decode(n){return JSON.parse(n)}},B3=class extends Ml{constructor(e,t="ws://localhost:8080",{autoconnect:r=!0,reconnect:s=!0,reconnect_interval:i=1e3,max_reconnects:o=5,...a}={},c,h){super();se(this,"address");se(this,"rpc_id");se(this,"queue");se(this,"options");se(this,"autoconnect");se(this,"ready");se(this,"reconnect");se(this,"reconnect_timer_id");se(this,"reconnect_interval");se(this,"max_reconnects");se(this,"rest_options");se(this,"current_reconnects");se(this,"generate_request_id");se(this,"socket");se(this,"webSocketFactory");se(this,"dataPack");this.webSocketFactory=e,this.queue={},this.rpc_id=0,this.address=t,this.autoconnect=r,this.ready=!1,this.reconnect=s,this.reconnect_timer_id=void 0,this.reconnect_interval=i,this.max_reconnects=o,this.rest_options=a,this.current_reconnects=0,this.generate_request_id=c||(()=>typeof this.rpc_id=="number"?++this.rpc_id:Number(this.rpc_id)+1),h?this.dataPack=h:this.dataPack=new E3,this.autoconnect&&this._connect(this.address,{autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects,...this.rest_options})}connect(){this.socket||this._connect(this.address,{autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects,...this.rest_options})}call(e,t,r,s){return!s&&typeof r=="object"&&(s=r,r=null),new Promise((i,o)=>{if(!this.ready)return o(new Error("socket not ready"));const a=this.generate_request_id(e,t),c={jsonrpc:"2.0",method:e,params:t||void 0,id:a};this.socket.send(this.dataPack.encode(c),s,h=>{if(h)return o(h);this.queue[a]={promise:[i,o]},r&&(this.queue[a].timeout=setTimeout(()=>{delete this.queue[a],o(new Error("reply timeout"))},r))})})}async login(e){const t=await this.call("rpc.login",e);if(!t)throw new Error("authentication failed");return t}async listMethods(){return await this.call("__listMethods")}notify(e,t){return new Promise((r,s)=>{if(!this.ready)return s(new Error("socket not ready"));const i={jsonrpc:"2.0",method:e,params:t};this.socket.send(this.dataPack.encode(i),o=>{if(o)return s(o);r()})})}async subscribe(e){typeof e=="string"&&(e=[e]);const t=await this.call("rpc.on",e);if(typeof e=="string"&&t[e]!=="ok")throw new Error("Failed subscribing to an event '"+e+"' with: "+t[e]);return t}async unsubscribe(e){typeof e=="string"&&(e=[e]);const t=await this.call("rpc.off",e);if(typeof e=="string"&&t[e]!=="ok")throw new Error("Failed unsubscribing from an event with: "+t);return t}close(e,t){this.socket.close(e||1e3,t)}setAutoReconnect(e){this.reconnect=e}setReconnectInterval(e){this.reconnect_interval=e}setMaxReconnects(e){this.max_reconnects=e}_connect(e,t){clearTimeout(this.reconnect_timer_id),this.socket=this.webSocketFactory(e,t),this.socket.addEventListener("open",()=>{this.ready=!0,this.emit("open"),this.current_reconnects=0}),this.socket.addEventListener("message",({data:r})=>{r instanceof ArrayBuffer&&(r=ae.Buffer.from(r).toString());try{r=this.dataPack.decode(r)}catch{return}if(r.notification&&this.listeners(r.notification).length){if(!Object.keys(r.params).length)return this.emit(r.notification);const s=[r.notification];if(r.params.constructor===Object)s.push(r.params);else for(let i=0;i<r.params.length;i++)s.push(r.params[i]);return Promise.resolve().then(()=>{this.emit.apply(this,s)})}if(!this.queue[r.id])return r.method?Promise.resolve().then(()=>{this.emit(r.method,r==null?void 0:r.params)}):void 0;"error"in r=="result"in r&&this.queue[r.id].promise[1](new Error('Server response malformed. Response must include either "result" or "error", but not both.')),this.queue[r.id].timeout&&clearTimeout(this.queue[r.id].timeout),r.error?this.queue[r.id].promise[1](r.error):this.queue[r.id].promise[0](r.result),delete this.queue[r.id]}),this.socket.addEventListener("error",r=>this.emit("error",r)),this.socket.addEventListener("close",({code:r,reason:s})=>{this.ready&&setTimeout(()=>this.emit("close",r,s),0),this.ready=!1,this.socket=void 0,r!==1e3&&(this.current_reconnects++,this.reconnect&&(this.max_reconnects>this.current_reconnects||this.max_reconnects===0)&&(this.reconnect_timer_id=setTimeout(()=>this._connect(e,t),this.reconnect_interval)))})}};const x3=_r.utils.randomPrivateKey,mu=()=>{const n=_r.utils.randomPrivateKey(),e=no(n),t=new Uint8Array(64);return t.set(n),t.set(e,32),{publicKey:e,secretKey:t}},no=_r.getPublicKey;function bu(n){try{return _r.ExtendedPoint.fromHex(n),!0}catch{return!1}}const Rl=(n,e)=>_r.sign(n,e.slice(0,32)),C3=_r.verify,Ae=n=>ae.Buffer.isBuffer(n)?n:n instanceof Uint8Array?ae.Buffer.from(n.buffer,n.byteOffset,n.byteLength):ae.Buffer.from(n);class Wl{constructor(e){Object.assign(this,e)}encode(){return ae.Buffer.from(bh(_s,this))}static decode(e){return ph(_s,this,e)}static decodeUnchecked(e){return dh(_s,this,e)}}class S3 extends Wl{constructor(e){if(super(e),this.enum="",Object.keys(e).length!==1)throw new Error("Enum can only take single value");Object.keys(e).map(t=>{this.enum=t})}}const _s=new Map;var jh;const $h=32,vn=32;function D3(n){return n._bn!==void 0}let pu=1;class X extends Wl{constructor(e){if(super({}),this._bn=void 0,D3(e))this._bn=e._bn;else{if(typeof e=="string"){const t=Dt.decode(e);if(t.length!=vn)throw new Error("Invalid public key input");this._bn=new wc(t)}else this._bn=new wc(e);if(this._bn.byteLength()>vn)throw new Error("Invalid public key input")}}static unique(){const e=new X(pu);return pu+=1,new X(e.toBuffer())}equals(e){return this._bn.eq(e._bn)}toBase58(){return Dt.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===vn)return e;const t=ae.Buffer.alloc(32);return e.copy(t,32-e.length),t}get[Symbol.toStringTag](){return`PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed(e,t,r){const s=ae.Buffer.concat([e.toBuffer(),ae.Buffer.from(t),r.toBuffer()]),i=Hi(s);return new X(i)}static createProgramAddressSync(e,t){let r=ae.Buffer.alloc(0);e.forEach(function(i){if(i.length>$h)throw new TypeError("Max seed length exceeded");r=ae.Buffer.concat([r,Ae(i)])}),r=ae.Buffer.concat([r,t.toBuffer(),ae.Buffer.from("ProgramDerivedAddress")]);const s=Hi(r);if(bu(s))throw new Error("Invalid seeds, address must fall off the curve");return new X(s)}static async createProgramAddress(e,t){return this.createProgramAddressSync(e,t)}static findProgramAddressSync(e,t){let r=255,s;for(;r!=0;){try{const i=e.concat(ae.Buffer.from([r]));s=this.createProgramAddressSync(i,t)}catch(i){if(i instanceof TypeError)throw i;r--;continue}return[s,r]}throw new Error("Unable to find a viable program address nonce")}static async findProgramAddress(e,t){return this.findProgramAddressSync(e,t)}static isOnCurve(e){const t=new X(e);return bu(t.toBytes())}}jh=X;X.default=new jh("11111111111111111111111111111111");_s.set(X,{kind:"struct",fields:[["_bn","u256"]]});class v3{constructor(e){if(this._publicKey=void 0,this._secretKey=void 0,e){const t=Ae(e);if(e.length!==64)throw new Error("bad secret key size");this._publicKey=t.slice(32,64),this._secretKey=t.slice(0,32)}else this._secretKey=Ae(x3()),this._publicKey=Ae(no(this._secretKey))}get publicKey(){return new X(this._publicKey)}get secretKey(){return ae.Buffer.concat([this._secretKey,this._publicKey],64)}}const k3=new X("BPFLoader1111111111111111111111111111111111"),ar=1232,Mo=127,Vs=64;class Ro extends Error{constructor(e){super(`Signature ${e} has expired: block height exceeded.`),this.signature=void 0,this.signature=e}}Object.defineProperty(Ro.prototype,"name",{value:"TransactionExpiredBlockheightExceededError"});class Pl extends Error{constructor(e,t){super(`Transaction was not confirmed in ${t.toFixed(2)} seconds. It is unknown if it succeeded or failed. Check signature ${e} using the Solana Explorer or CLI tools.`),this.signature=void 0,this.signature=e}}Object.defineProperty(Pl.prototype,"name",{value:"TransactionExpiredTimeoutError"});class jr extends Error{constructor(e){super(`Signature ${e} has expired: the nonce is no longer valid.`),this.signature=void 0,this.signature=e}}Object.defineProperty(jr.prototype,"name",{value:"TransactionExpiredNonceInvalidError"});class Gs{constructor(e,t){this.staticAccountKeys=void 0,this.accountKeysFromLookups=void 0,this.staticAccountKeys=e,this.accountKeysFromLookups=t}keySegments(){const e=[this.staticAccountKeys];return this.accountKeysFromLookups&&(e.push(this.accountKeysFromLookups.writable),e.push(this.accountKeysFromLookups.readonly)),e}get(e){for(const t of this.keySegments()){if(e<t.length)return t[e];e-=t.length}}get length(){return this.keySegments().flat().length}compileInstructions(e){if(this.length>256)throw new Error("Account index overflow encountered during compilation");const r=new Map;this.keySegments().flat().forEach((i,o)=>{r.set(i.toBase58(),o)});const s=i=>{const o=r.get(i.toBase58());if(o===void 0)throw new Error("Encountered an unknown instruction account key during compilation");return o};return e.map(i=>({programIdIndex:s(i.programId),accountKeyIndexes:i.keys.map(o=>s(o.pubkey)),data:i.data}))}}const xe=(n="publicKey")=>exports.blob(32,n),F3=(n="signature")=>exports.blob(64,n),Er=(n="string")=>{const e=exports.struct([exports.u32("length"),exports.u32("lengthPadding"),exports.blob(or(exports.u32(),-8),"chars")],n),t=e.decode.bind(e),r=e.encode.bind(e),s=e;return s.decode=(i,o)=>t(i,o).chars.toString(),s.encode=(i,o,a)=>{const c={chars:ae.Buffer.from(i,"utf8")};return r(c,o,a)},s.alloc=i=>exports.u32().span+exports.u32().span+ae.Buffer.from(i,"utf8").length,s},T3=(n="authorized")=>exports.struct([xe("staker"),xe("withdrawer")],n),I3=(n="lockup")=>exports.struct([exports.ns64("unixTimestamp"),exports.ns64("epoch"),xe("custodian")],n),U3=(n="voteInit")=>exports.struct([xe("nodePubkey"),xe("authorizedVoter"),xe("authorizedWithdrawer"),exports.u8("commission")],n),_3=(n="voteAuthorizeWithSeedArgs")=>exports.struct([exports.u32("voteAuthorizationType"),xe("currentAuthorityDerivedKeyOwnerPubkey"),Er("currentAuthorityDerivedKeySeed"),xe("newAuthorized")],n);function Vh(n,e){const t=s=>{if(s.span>=0)return s.span;if(typeof s.alloc=="function")return s.alloc(e[s.property]);if("count"in s&&"elementLayout"in s){const i=e[s.property];if(Array.isArray(i))return i.length*t(s.elementLayout)}else if("fields"in s)return Vh({layout:s},e[s.property]);return 0};let r=0;return n.layout.fields.forEach(s=>{r+=t(s)}),r}function $t(n){let e=0,t=0;for(;;){let r=n.shift();if(e|=(r&127)<<t*7,t+=1,!(r&128))break}return e}function Zt(n,e){let t=e;for(;;){let r=t&127;if(t>>=7,t==0){n.push(r);break}else r|=128,n.push(r)}}function Fe(n,e){if(!n)throw new Error(e||"Assertion failed")}class Wo{constructor(e,t){this.payer=void 0,this.keyMetaMap=void 0,this.payer=e,this.keyMetaMap=t}static compile(e,t){const r=new Map,s=o=>{const a=o.toBase58();let c=r.get(a);return c===void 0&&(c={isSigner:!1,isWritable:!1,isInvoked:!1},r.set(a,c)),c},i=s(t);i.isSigner=!0,i.isWritable=!0;for(const o of e){s(o.programId).isInvoked=!0;for(const a of o.keys){const c=s(a.pubkey);c.isSigner||(c.isSigner=a.isSigner),c.isWritable||(c.isWritable=a.isWritable)}}return new Wo(t,r)}getMessageComponents(){const e=[...this.keyMetaMap.entries()];Fe(e.length<=256,"Max static account keys length exceeded");const t=e.filter(([,c])=>c.isSigner&&c.isWritable),r=e.filter(([,c])=>c.isSigner&&!c.isWritable),s=e.filter(([,c])=>!c.isSigner&&c.isWritable),i=e.filter(([,c])=>!c.isSigner&&!c.isWritable),o={numRequiredSignatures:t.length+r.length,numReadonlySignedAccounts:r.length,numReadonlyUnsignedAccounts:i.length};{Fe(t.length>0,"Expected at least one writable signer key");const[c]=t[0];Fe(c===this.payer.toBase58(),"Expected first writable signer key to be the fee payer")}const a=[...t.map(([c])=>new X(c)),...r.map(([c])=>new X(c)),...s.map(([c])=>new X(c)),...i.map(([c])=>new X(c))];return[o,a]}extractTableLookup(e){const[t,r]=this.drainKeysFoundInLookupTable(e.state.addresses,o=>!o.isSigner&&!o.isInvoked&&o.isWritable),[s,i]=this.drainKeysFoundInLookupTable(e.state.addresses,o=>!o.isSigner&&!o.isInvoked&&!o.isWritable);if(!(t.length===0&&s.length===0))return[{accountKey:e.key,writableIndexes:t,readonlyIndexes:s},{writable:r,readonly:i}]}drainKeysFoundInLookupTable(e,t){const r=new Array,s=new Array;for(const[i,o]of this.keyMetaMap.entries())if(t(o)){const a=new X(i),c=e.findIndex(h=>h.equals(a));c>=0&&(Fe(c<256,"Max lookup table index exceeded"),r.push(c),s.push(a),this.keyMetaMap.delete(i))}return[r,s]}}const Gh="Reached end of buffer unexpectedly";function xn(n){if(n.length===0)throw new Error(Gh);return n.shift()}function Vt(n,...e){const[t]=e;if(e.length===2?t+(e[1]??0)>n.length:t>=n.length)throw new Error(Gh);return n.splice(...e)}class cn{constructor(e){this.header=void 0,this.accountKeys=void 0,this.recentBlockhash=void 0,this.instructions=void 0,this.indexToProgramIds=new Map,this.header=e.header,this.accountKeys=e.accountKeys.map(t=>new X(t)),this.recentBlockhash=e.recentBlockhash,this.instructions=e.instructions,this.instructions.forEach(t=>this.indexToProgramIds.set(t.programIdIndex,this.accountKeys[t.programIdIndex]))}get version(){return"legacy"}get staticAccountKeys(){return this.accountKeys}get compiledInstructions(){return this.instructions.map(e=>({programIdIndex:e.programIdIndex,accountKeyIndexes:e.accounts,data:Dt.decode(e.data)}))}get addressTableLookups(){return[]}getAccountKeys(){return new Gs(this.staticAccountKeys)}static compile(e){const t=Wo.compile(e.instructions,e.payerKey),[r,s]=t.getMessageComponents(),o=new Gs(s).compileInstructions(e.instructions).map(a=>({programIdIndex:a.programIdIndex,accounts:a.accountKeyIndexes,data:Dt.encode(a.data)}));return new cn({header:r,accountKeys:s,recentBlockhash:e.recentBlockhash,instructions:o})}isAccountSigner(e){return e<this.header.numRequiredSignatures}isAccountWritable(e){const t=this.header.numRequiredSignatures;if(e>=this.header.numRequiredSignatures){const r=e-t,i=this.accountKeys.length-t-this.header.numReadonlyUnsignedAccounts;return r<i}else{const r=t-this.header.numReadonlySignedAccounts;return e<r}}isProgramId(e){return this.indexToProgramIds.has(e)}programIds(){return[...this.indexToProgramIds.values()]}nonProgramIds(){return this.accountKeys.filter((e,t)=>!this.isProgramId(t))}serialize(){const e=this.accountKeys.length;let t=[];Zt(t,e);const r=this.instructions.map(w=>{const{accounts:D,programIdIndex:E}=w,g=Array.from(Dt.decode(w.data));let S=[];Zt(S,D.length);let T=[];return Zt(T,g.length),{programIdIndex:E,keyIndicesCount:ae.Buffer.from(S),keyIndices:D,dataLength:ae.Buffer.from(T),data:g}});let s=[];Zt(s,r.length);let i=ae.Buffer.alloc(ar);ae.Buffer.from(s).copy(i);let o=s.length;r.forEach(w=>{const E=exports.struct([exports.u8("programIdIndex"),exports.blob(w.keyIndicesCount.length,"keyIndicesCount"),exports.seq(exports.u8("keyIndex"),w.keyIndices.length,"keyIndices"),exports.blob(w.dataLength.length,"dataLength"),exports.seq(exports.u8("userdatum"),w.data.length,"data")]).encode(w,i,o);o+=E}),i=i.slice(0,o);const a=exports.struct([exports.blob(1,"numRequiredSignatures"),exports.blob(1,"numReadonlySignedAccounts"),exports.blob(1,"numReadonlyUnsignedAccounts"),exports.blob(t.length,"keyCount"),exports.seq(xe("key"),e,"keys"),xe("recentBlockhash")]),c={numRequiredSignatures:ae.Buffer.from([this.header.numRequiredSignatures]),numReadonlySignedAccounts:ae.Buffer.from([this.header.numReadonlySignedAccounts]),numReadonlyUnsignedAccounts:ae.Buffer.from([this.header.numReadonlyUnsignedAccounts]),keyCount:ae.Buffer.from(t),keys:this.accountKeys.map(w=>Ae(w.toBytes())),recentBlockhash:Dt.decode(this.recentBlockhash)};let h=ae.Buffer.alloc(2048);const b=a.encode(c,h);return i.copy(h,b),h.slice(0,b+i.length)}static from(e){let t=[...e];const r=xn(t);if(r!==(r&Mo))throw new Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");const s=xn(t),i=xn(t),o=$t(t);let a=[];for(let D=0;D<o;D++){const E=Vt(t,0,vn);a.push(new X(ae.Buffer.from(E)))}const c=Vt(t,0,vn),h=$t(t);let b=[];for(let D=0;D<h;D++){const E=xn(t),g=$t(t),S=Vt(t,0,g),T=$t(t),M=Vt(t,0,T),N=Dt.encode(ae.Buffer.from(M));b.push({programIdIndex:E,accounts:S,data:N})}const w={header:{numRequiredSignatures:r,numReadonlySignedAccounts:s,numReadonlyUnsignedAccounts:i},recentBlockhash:Dt.encode(ae.Buffer.from(c)),accountKeys:a,instructions:b};return new cn(w)}}class lr{constructor(e){this.header=void 0,this.staticAccountKeys=void 0,this.recentBlockhash=void 0,this.compiledInstructions=void 0,this.addressTableLookups=void 0,this.header=e.header,this.staticAccountKeys=e.staticAccountKeys,this.recentBlockhash=e.recentBlockhash,this.compiledInstructions=e.compiledInstructions,this.addressTableLookups=e.addressTableLookups}get version(){return 0}get numAccountKeysFromLookups(){let e=0;for(const t of this.addressTableLookups)e+=t.readonlyIndexes.length+t.writableIndexes.length;return e}getAccountKeys(e){let t;if(e&&"accountKeysFromLookups"in e&&e.accountKeysFromLookups){if(this.numAccountKeysFromLookups!=e.accountKeysFromLookups.writable.length+e.accountKeysFromLookups.readonly.length)throw new Error("Failed to get account keys because of a mismatch in the number of account keys from lookups");t=e.accountKeysFromLookups}else if(e&&"addressLookupTableAccounts"in e&&e.addressLookupTableAccounts)t=this.resolveAddressTableLookups(e.addressLookupTableAccounts);else if(this.addressTableLookups.length>0)throw new Error("Failed to get account keys because address table lookups were not resolved");return new Gs(this.staticAccountKeys,t)}isAccountSigner(e){return e<this.header.numRequiredSignatures}isAccountWritable(e){const t=this.header.numRequiredSignatures,r=this.staticAccountKeys.length;if(e>=r){const s=e-r,i=this.addressTableLookups.reduce((o,a)=>o+a.writableIndexes.length,0);return s<i}else if(e>=this.header.numRequiredSignatures){const s=e-t,o=r-t-this.header.numReadonlyUnsignedAccounts;return s<o}else{const s=t-this.header.numReadonlySignedAccounts;return e<s}}resolveAddressTableLookups(e){const t={writable:[],readonly:[]};for(const r of this.addressTableLookups){const s=e.find(i=>i.key.equals(r.accountKey));if(!s)throw new Error(`Failed to find address lookup table account for table key ${r.accountKey.toBase58()}`);for(const i of r.writableIndexes)if(i<s.state.addresses.length)t.writable.push(s.state.addresses[i]);else throw new Error(`Failed to find address for index ${i} in address lookup table ${r.accountKey.toBase58()}`);for(const i of r.readonlyIndexes)if(i<s.state.addresses.length)t.readonly.push(s.state.addresses[i]);else throw new Error(`Failed to find address for index ${i} in address lookup table ${r.accountKey.toBase58()}`)}return t}static compile(e){const t=Wo.compile(e.instructions,e.payerKey),r=new Array,s={writable:new Array,readonly:new Array},i=e.addressLookupTableAccounts||[];for(const b of i){const w=t.extractTableLookup(b);if(w!==void 0){const[D,{writable:E,readonly:g}]=w;r.push(D),s.writable.push(...E),s.readonly.push(...g)}}const[o,a]=t.getMessageComponents(),h=new Gs(a,s).compileInstructions(e.instructions);return new lr({header:o,staticAccountKeys:a,recentBlockhash:e.recentBlockhash,compiledInstructions:h,addressTableLookups:r})}serialize(){const e=Array();Zt(e,this.staticAccountKeys.length);const t=this.serializeInstructions(),r=Array();Zt(r,this.compiledInstructions.length);const s=this.serializeAddressTableLookups(),i=Array();Zt(i,this.addressTableLookups.length);const o=exports.struct([exports.u8("prefix"),exports.struct([exports.u8("numRequiredSignatures"),exports.u8("numReadonlySignedAccounts"),exports.u8("numReadonlyUnsignedAccounts")],"header"),exports.blob(e.length,"staticAccountKeysLength"),exports.seq(xe(),this.staticAccountKeys.length,"staticAccountKeys"),xe("recentBlockhash"),exports.blob(r.length,"instructionsLength"),exports.blob(t.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(b=>b.toBytes()),recentBlockhash:Dt.decode(this.recentBlockhash),instructionsLength:new Uint8Array(r),serializedInstructions:t,addressTableLookupsLength:new Uint8Array(i),serializedAddressTableLookups:s},a);return a.slice(0,h)}serializeInstructions(){let e=0;const t=new Uint8Array(ar);for(const r of this.compiledInstructions){const s=Array();Zt(s,r.accountKeyIndexes.length);const i=Array();Zt(i,r.data.length);const o=exports.struct([exports.u8("programIdIndex"),exports.blob(s.length,"encodedAccountKeyIndexesLength"),exports.seq(exports.u8(),r.accountKeyIndexes.length,"accountKeyIndexes"),exports.blob(i.length,"encodedDataLength"),exports.blob(r.data.length,"data")]);e+=o.encode({programIdIndex:r.programIdIndex,encodedAccountKeyIndexesLength:new Uint8Array(s),accountKeyIndexes:r.accountKeyIndexes,encodedDataLength:new Uint8Array(i),data:r.data},t,e)}return t.slice(0,e)}serializeAddressTableLookups(){let e=0;const t=new Uint8Array(ar);for(const r of this.addressTableLookups){const s=Array();Zt(s,r.writableIndexes.length);const i=Array();Zt(i,r.readonlyIndexes.length);const o=exports.struct([xe("accountKey"),exports.blob(s.length,"encodedWritableIndexesLength"),exports.seq(exports.u8(),r.writableIndexes.length,"writableIndexes"),exports.blob(i.length,"encodedReadonlyIndexesLength"),exports.seq(exports.u8(),r.readonlyIndexes.length,"readonlyIndexes")]);e+=o.encode({accountKey:r.accountKey.toBytes(),encodedWritableIndexesLength:new Uint8Array(s),writableIndexes:r.writableIndexes,encodedReadonlyIndexesLength:new Uint8Array(i),readonlyIndexes:r.readonlyIndexes},t,e)}return t.slice(0,e)}static deserialize(e){let t=[...e];const r=xn(t),s=r&Mo;Fe(r!==s,"Expected versioned message but received legacy message");const i=s;Fe(i===0,`Expected versioned message with version 0 but found version ${i}`);const o={numRequiredSignatures:xn(t),numReadonlySignedAccounts:xn(t),numReadonlyUnsignedAccounts:xn(t)},a=[],c=$t(t);for(let g=0;g<c;g++)a.push(new X(Vt(t,0,vn)));const h=Dt.encode(Vt(t,0,vn)),b=$t(t),w=[];for(let g=0;g<b;g++){const S=xn(t),T=$t(t),M=Vt(t,0,T),N=$t(t),_=new Uint8Array(Vt(t,0,N));w.push({programIdIndex:S,accountKeyIndexes:M,data:_})}const D=$t(t),E=[];for(let g=0;g<D;g++){const S=new X(Vt(t,0,vn)),T=$t(t),M=Vt(t,0,T),N=$t(t),_=Vt(t,0,N);E.push({accountKey:S,writableIndexes:M,readonlyIndexes:_})}return new lr({header:o,staticAccountKeys:a,recentBlockhash:h,compiledInstructions:w,addressTableLookups:E})}}const Ll={deserializeMessageVersion(n){const e=n[0],t=e&Mo;return t===e?"legacy":t},deserialize:n=>{const e=Ll.deserializeMessageVersion(n);if(e==="legacy")return cn.from(n);if(e===0)return lr.deserialize(n);throw new Error(`Transaction message version ${e} deserialization is not supported`)}};let Nn=function(n){return n[n.BLOCKHEIGHT_EXCEEDED=0]="BLOCKHEIGHT_EXCEEDED",n[n.PROCESSED=1]="PROCESSED",n[n.TIMED_OUT=2]="TIMED_OUT",n[n.NONCE_INVALID=3]="NONCE_INVALID",n}({});const M3=ae.Buffer.alloc(Vs).fill(0);class Me{constructor(e){this.keys=void 0,this.programId=void 0,this.data=ae.Buffer.alloc(0),this.programId=e.programId,this.keys=e.keys,e.data&&(this.data=e.data)}toJSON(){return{keys:this.keys.map(({pubkey:e,isSigner:t,isWritable:r})=>({pubkey:e.toJSON(),isSigner:t,isWritable:r})),programId:this.programId.toJSON(),data:[...this.data]}}}class ke{get signature(){return this.signatures.length>0?this.signatures[0].signature:null}constructor(e){if(this.signatures=[],this.feePayer=void 0,this.instructions=[],this.recentBlockhash=void 0,this.lastValidBlockHeight=void 0,this.nonceInfo=void 0,this.minNonceContextSlot=void 0,this._message=void 0,this._json=void 0,!!e)if(e.feePayer&&(this.feePayer=e.feePayer),e.signatures&&(this.signatures=e.signatures),Object.prototype.hasOwnProperty.call(e,"nonceInfo")){const{minContextSlot:t,nonceInfo:r}=e;this.minNonceContextSlot=t,this.nonceInfo=r}else if(Object.prototype.hasOwnProperty.call(e,"lastValidBlockHeight")){const{blockhash:t,lastValidBlockHeight:r}=e;this.recentBlockhash=t,this.lastValidBlockHeight=r}else{const{recentBlockhash:t,nonceInfo:r}=e;r&&(this.nonceInfo=r),this.recentBlockhash=t}}toJSON(){return{recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map(e=>e.toJSON()),signers:this.signatures.map(({publicKey:e})=>e.toJSON())}}add(...e){if(e.length===0)throw new Error("No instructions");return e.forEach(t=>{"instructions"in t?this.instructions=this.instructions.concat(t.instructions):"data"in t&&"programId"in t&&"keys"in t?this.instructions.push(t):this.instructions.push(new Me(t))}),this}compileMessage(){if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json))return this._message;let e,t;if(this.nonceInfo?(e=this.nonceInfo.nonce,this.instructions[0]!=this.nonceInfo.nonceInstruction?t=[this.nonceInfo.nonceInstruction,...this.instructions]:t=this.instructions):(e=this.recentBlockhash,t=this.instructions),!e)throw new Error("Transaction recentBlockhash required");t.length<1&&console.warn("No instructions provided");let r;if(this.feePayer)r=this.feePayer;else if(this.signatures.length>0&&this.signatures[0].publicKey)r=this.signatures[0].publicKey;else throw new Error("Transaction fee payer required");for(let S=0;S<t.length;S++)if(t[S].programId===void 0)throw new Error(`Transaction instruction index ${S} has undefined program id`);const s=[],i=[];t.forEach(S=>{S.keys.forEach(M=>{i.push({...M})});const T=S.programId.toString();s.includes(T)||s.push(T)}),s.forEach(S=>{i.push({pubkey:new X(S),isSigner:!1,isWritable:!1})});const o=[];i.forEach(S=>{const T=S.pubkey.toString(),M=o.findIndex(N=>N.pubkey.toString()===T);M>-1?(o[M].isWritable=o[M].isWritable||S.isWritable,o[M].isSigner=o[M].isSigner||S.isSigner):o.push(S)}),o.sort(function(S,T){if(S.isSigner!==T.isSigner)return S.isSigner?-1:1;if(S.isWritable!==T.isWritable)return S.isWritable?-1:1;const M={localeMatcher:"best fit",usage:"sort",sensitivity:"variant",ignorePunctuation:!1,numeric:!1,caseFirst:"lower"};return S.pubkey.toBase58().localeCompare(T.pubkey.toBase58(),"en",M)});const a=o.findIndex(S=>S.pubkey.equals(r));if(a>-1){const[S]=o.splice(a,1);S.isSigner=!0,S.isWritable=!0,o.unshift(S)}else o.unshift({pubkey:r,isSigner:!0,isWritable:!0});for(const S of this.signatures){const T=o.findIndex(M=>M.pubkey.equals(S.publicKey));if(T>-1)o[T].isSigner||(o[T].isSigner=!0,console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release."));else throw new Error(`unknown signer: ${S.publicKey.toString()}`)}let c=0,h=0,b=0;const w=[],D=[];o.forEach(({pubkey:S,isSigner:T,isWritable:M})=>{T?(w.push(S.toString()),c+=1,M||(h+=1)):(D.push(S.toString()),M||(b+=1))});const E=w.concat(D),g=t.map(S=>{const{data:T,programId:M}=S;return{programIdIndex:E.indexOf(M.toString()),accounts:S.keys.map(N=>E.indexOf(N.pubkey.toString())),data:Dt.encode(T)}});return g.forEach(S=>{Fe(S.programIdIndex>=0),S.accounts.forEach(T=>Fe(T>=0))}),new cn({header:{numRequiredSignatures:c,numReadonlySignedAccounts:h,numReadonlyUnsignedAccounts:b},accountKeys:E,recentBlockhash:e,instructions:g})}_compile(){const e=this.compileMessage(),t=e.accountKeys.slice(0,e.header.numRequiredSignatures);return this.signatures.length===t.length&&this.signatures.every((s,i)=>t[i].equals(s.publicKey))||(this.signatures=t.map(r=>({signature:null,publicKey:r}))),e}serializeMessage(){return this._compile().serialize()}async getEstimatedFee(e){return(await e.getFeeForMessage(this.compileMessage())).value}setSigners(...e){if(e.length===0)throw new Error("No signers");const t=new Set;this.signatures=e.filter(r=>{const s=r.toString();return t.has(s)?!1:(t.add(s),!0)}).map(r=>({signature:null,publicKey:r}))}sign(...e){if(e.length===0)throw new Error("No signers");const t=new Set,r=[];for(const i of e){const o=i.publicKey.toString();t.has(o)||(t.add(o),r.push(i))}this.signatures=r.map(i=>({signature:null,publicKey:i.publicKey}));const s=this._compile();this._partialSign(s,...r)}partialSign(...e){if(e.length===0)throw new Error("No signers");const t=new Set,r=[];for(const i of e){const o=i.publicKey.toString();t.has(o)||(t.add(o),r.push(i))}const s=this._compile();this._partialSign(s,...r)}_partialSign(e,...t){const r=e.serialize();t.forEach(s=>{const i=Rl(r,s.secretKey);this._addSignature(s.publicKey,Ae(i))})}addSignature(e,t){this._compile(),this._addSignature(e,t)}_addSignature(e,t){Fe(t.length===64);const r=this.signatures.findIndex(s=>e.equals(s.publicKey));if(r<0)throw new Error(`unknown signer: ${e.toString()}`);this.signatures[r].signature=ae.Buffer.from(t)}verifySignatures(e=!0){return!this._getMessageSignednessErrors(this.serializeMessage(),e)}_getMessageSignednessErrors(e,t){const r={};for(const{signature:s,publicKey:i}of this.signatures)s===null?t&&(r.missing||(r.missing=[])).push(i):C3(s,e,i.toBytes())||(r.invalid||(r.invalid=[])).push(i);return r.invalid||r.missing?r:void 0}serialize(e){const{requireAllSignatures:t,verifySignatures:r}=Object.assign({requireAllSignatures:!0,verifySignatures:!0},e),s=this.serializeMessage();if(r){const i=this._getMessageSignednessErrors(s,t);if(i){let o="Signature verification failed.";throw i.invalid&&(o+=`
9
+ Invalid signature for public key${i.invalid.length===1?"":"(s)"} [\`${i.invalid.map(a=>a.toBase58()).join("`, `")}\`].`),i.missing&&(o+=`
10
+ Missing signature for public key${i.missing.length===1?"":"(s)"} [\`${i.missing.map(a=>a.toBase58()).join("`, `")}\`].`),new Error(o)}}return this._serialize(s)}_serialize(e){const{signatures:t}=this,r=[];Zt(r,t.length);const s=r.length+t.length*64+e.length,i=ae.Buffer.alloc(s);return Fe(t.length<256),ae.Buffer.from(r).copy(i,0),t.forEach(({signature:o},a)=>{o!==null&&(Fe(o.length===64,"signature has invalid length"),ae.Buffer.from(o).copy(i,r.length+a*64))}),e.copy(i,r.length+t.length*64),Fe(i.length<=ar,`Transaction too large: ${i.length} > ${ar}`),i}get keys(){return Fe(this.instructions.length===1),this.instructions[0].keys.map(e=>e.pubkey)}get programId(){return Fe(this.instructions.length===1),this.instructions[0].programId}get data(){return Fe(this.instructions.length===1),this.instructions[0].data}static from(e){let t=[...e];const r=$t(t);let s=[];for(let i=0;i<r;i++){const o=Vt(t,0,Vs);s.push(Dt.encode(ae.Buffer.from(o)))}return ke.populate(cn.from(t),s)}static populate(e,t=[]){const r=new ke;return r.recentBlockhash=e.recentBlockhash,e.header.numRequiredSignatures>0&&(r.feePayer=e.accountKeys[0]),t.forEach((s,i)=>{const o={signature:s==Dt.encode(M3)?null:Dt.decode(s),publicKey:e.accountKeys[i]};r.signatures.push(o)}),e.instructions.forEach(s=>{const i=s.accounts.map(o=>{const a=e.accountKeys[o];return{pubkey:a,isSigner:r.signatures.some(c=>c.publicKey.toString()===a.toString())||e.isAccountSigner(o),isWritable:e.isAccountWritable(o)}});r.instructions.push(new Me({keys:i,programId:e.accountKeys[s.programIdIndex],data:Dt.decode(s.data)}))}),r._message=e,r._json=r.toJSON(),r}}class Po{constructor(e){this.payerKey=void 0,this.instructions=void 0,this.recentBlockhash=void 0,this.payerKey=e.payerKey,this.instructions=e.instructions,this.recentBlockhash=e.recentBlockhash}static decompile(e,t){const{header:r,compiledInstructions:s,recentBlockhash:i}=e,{numRequiredSignatures:o,numReadonlySignedAccounts:a,numReadonlyUnsignedAccounts:c}=r,h=o-a;Fe(h>0,"Message header is invalid");const b=e.staticAccountKeys.length-o-c;Fe(b>=0,"Message header is invalid");const w=e.getAccountKeys(t),D=w.get(0);if(D===void 0)throw new Error("Failed to decompile message because no account keys were found");const E=[];for(const g of s){const S=[];for(const M of g.accountKeyIndexes){const N=w.get(M);if(N===void 0)throw new Error(`Failed to find key for account key index ${M}`);const _=M<o;let U;_?U=M<h:M<w.staticAccountKeys.length?U=M-o<b:U=M-w.staticAccountKeys.length<w.accountKeysFromLookups.writable.length,S.push({pubkey:N,isSigner:M<r.numRequiredSignatures,isWritable:U})}const T=w.get(g.programIdIndex);if(T===void 0)throw new Error(`Failed to find program id for program id index ${g.programIdIndex}`);E.push(new Me({programId:T,data:Ae(g.data),keys:S}))}return new Po({payerKey:D,instructions:E,recentBlockhash:i})}compileToLegacyMessage(){return cn.compile({payerKey:this.payerKey,recentBlockhash:this.recentBlockhash,instructions:this.instructions})}compileToV0Message(e){return lr.compile({payerKey:this.payerKey,recentBlockhash:this.recentBlockhash,instructions:this.instructions,addressLookupTableAccounts:e})}}class Lo{get version(){return this.message.version}constructor(e,t){if(this.signatures=void 0,this.message=void 0,t!==void 0)Fe(t.length===e.header.numRequiredSignatures,"Expected signatures length to be equal to the number of required signatures"),this.signatures=t;else{const r=[];for(let s=0;s<e.header.numRequiredSignatures;s++)r.push(new Uint8Array(Vs));this.signatures=r}this.message=e}serialize(){const e=this.message.serialize(),t=Array();Zt(t,this.signatures.length);const r=exports.struct([exports.blob(t.length,"encodedSignaturesLength"),exports.seq(F3(),this.signatures.length,"signatures"),exports.blob(e.length,"serializedMessage")]),s=new Uint8Array(2048),i=r.encode({encodedSignaturesLength:new Uint8Array(t),signatures:this.signatures,serializedMessage:e},s);return s.slice(0,i)}static deserialize(e){let t=[...e];const r=[],s=$t(t);for(let o=0;o<s;o++)r.push(new Uint8Array(Vt(t,0,Vs)));const i=Ll.deserialize(new Uint8Array(t));return new Lo(i,r)}sign(e){const t=this.message.serialize(),r=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures);for(const s of e){const i=r.findIndex(o=>o.equals(s.publicKey));Fe(i>=0,`Cannot sign with non signer key ${s.publicKey.toBase58()}`),this.signatures[i]=Rl(t,s.secretKey)}}addSignature(e,t){Fe(t.byteLength===64,"Signature must be 64 bytes long");const s=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures).findIndex(i=>i.equals(e));Fe(s>=0,`Can not add signature; \`${e.toBase58()}\` is not required to sign this transaction`),this.signatures[s]=t}}const R3=160,W3=64,P3=R3/W3,Yh=1e3/P3,dn=new X("SysvarC1ock11111111111111111111111111111111"),L3=new X("SysvarEpochSchedu1e111111111111111111111111"),Xh=new X("Sysvar1nstructions1111111111111111111111111"),Mi=new X("SysvarRecentB1ockHashes11111111111111111111"),Ir=new X("SysvarRent111111111111111111111111111111111"),O3=new X("SysvarRewards111111111111111111111111111111"),N3=new X("SysvarS1otHashes111111111111111111111111111"),z3=new X("SysvarS1otHistory11111111111111111111111111"),Ri=new X("SysvarStakeHistory1111111111111111111111111");class ts extends Error{constructor({action:e,signature:t,transactionMessage:r,logs:s}){const i=s?`Logs:
11
+ ${JSON.stringify(s.slice(-10),null,2)}. `:"",o="\nCatch the `SendTransactionError` and call `getLogs()` on it for full details.";let a;switch(e){case"send":a=`Transaction ${t} resulted in an error.
12
+ ${r}. `+i+o;break;case"simulate":a=`Simulation failed.
13
+ Message: ${r}.
14
+ `+i+o;break;default:a=`Unknown action '${(c=>c)(e)}'`}super(a),this.signature=void 0,this.transactionMessage=void 0,this.transactionLogs=void 0,this.signature=t,this.transactionMessage=r,this.transactionLogs=s||void 0}get transactionError(){return{message:this.transactionMessage,logs:Array.isArray(this.transactionLogs)?this.transactionLogs:void 0}}get logs(){const e=this.transactionLogs;if(!(e!=null&&typeof e=="object"&&"then"in e))return e}async getLogs(e){return Array.isArray(this.transactionLogs)||(this.transactionLogs=new Promise((t,r)=>{e.getTransaction(this.signature).then(s=>{if(s&&s.meta&&s.meta.logMessages){const i=s.meta.logMessages;this.transactionLogs=i,t(i)}else r(new Error("Log messages not found"))}).catch(r)})),await this.transactionLogs}}const H3={JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP:-32001,JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE:-32002,JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE:-32003,JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE:-32004,JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY:-32005,JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE:-32006,JSON_RPC_SERVER_ERROR_SLOT_SKIPPED:-32007,JSON_RPC_SERVER_ERROR_NO_SNAPSHOT:-32008,JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED:-32009,JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX:-32010,JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE:-32011,JSON_RPC_SCAN_ERROR:-32012,JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH:-32013,JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET:-32014,JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION:-32015,JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED:-32016};class oe extends Error{constructor({code:e,message:t,data:r},s){super(s!=null?`${s}: ${t}`:t),this.code=void 0,this.data=void 0,this.code=e,this.data=r,this.name="SolanaJSONRPCError"}}async function Sc(n,e,t,r){const s=r&&{skipPreflight:r.skipPreflight,preflightCommitment:r.preflightCommitment||r.commitment,maxRetries:r.maxRetries,minContextSlot:r.minContextSlot},i=await n.sendTransaction(e,t,s);let o;if(e.recentBlockhash!=null&&e.lastValidBlockHeight!=null)o=(await n.confirmTransaction({abortSignal:r==null?void 0:r.abortSignal,signature:i,blockhash:e.recentBlockhash,lastValidBlockHeight:e.lastValidBlockHeight},r&&r.commitment)).value;else if(e.minNonceContextSlot!=null&&e.nonceInfo!=null){const{nonceInstruction:a}=e.nonceInfo,c=a.keys[0].pubkey;o=(await n.confirmTransaction({abortSignal:r==null?void 0:r.abortSignal,minContextSlot:e.minNonceContextSlot,nonceAccountPubkey:c,nonceValue:e.nonceInfo.nonce,signature:i},r&&r.commitment)).value}else(r==null?void 0:r.abortSignal)!=null&&console.warn("sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` or a combination of `nonceInfo` and `minNonceContextSlot` are abortable."),o=(await n.confirmTransaction(i,r&&r.commitment)).value;if(o.err)throw i!=null?new ts({action:"send",signature:i,transactionMessage:`Status: (${JSON.stringify(o)})`}):new Error(`Transaction ${i} failed (${JSON.stringify(o)})`);return i}function br(n){return new Promise(e=>setTimeout(e,n))}function Ce(n,e){const t=n.layout.span>=0?n.layout.span:Vh(n,e),r=ae.Buffer.alloc(t),s=Object.assign({instruction:n.index},e);return n.layout.encode(s,r),r}function Ie(n,e){let t;try{t=n.layout.decode(e)}catch(r){throw new Error("invalid instruction; "+r)}if(t.instruction!==n.index)throw new Error(`invalid instruction; instruction index mismatch ${t.instruction} != ${n.index}`);return t}const Zh=kt("lamportsPerSignature"),Jh=exports.struct([exports.u32("version"),exports.u32("state"),xe("authorizedPubkey"),xe("nonce"),exports.struct([Zh],"feeCalculator")]),Dc=Jh.span;class Oo{constructor(e){this.authorizedPubkey=void 0,this.nonce=void 0,this.feeCalculator=void 0,this.authorizedPubkey=e.authorizedPubkey,this.nonce=e.nonce,this.feeCalculator=e.feeCalculator}static fromAccountData(e){const t=Jh.decode(Ae(e),0);return new Oo({authorizedPubkey:new X(t.authorizedPubkey),nonce:new X(t.nonce).toString(),feeCalculator:t.feeCalculator})}}const q3=n=>{const e=n.decode.bind(n),t=n.encode.bind(n);return{decode:e,encode:t}},K3=n=>e=>{const t=exports.blob(n,e),{encode:r,decode:s}=q3(t),i=t;return i.decode=(o,a)=>{const c=s(o,a);return Mh(ae.Buffer.from(c))},i.encode=(o,a,c)=>{const h=Tl(o,n);return r(h,a,c)},i},ns=K3(8);class j3{constructor(){}static decodeInstructionType(e){this.checkProgramId(e.programId);const r=exports.u32("instruction").decode(e.data);let s;for(const[i,o]of Object.entries(Oe))if(o.index==r){s=i;break}if(!s)throw new Error("Instruction type incorrect; not a SystemInstruction");return s}static decodeCreateAccount(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{lamports:t,space:r,programId:s}=Ie(Oe.Create,e.data);return{fromPubkey:e.keys[0].pubkey,newAccountPubkey:e.keys[1].pubkey,lamports:t,space:r,programId:new X(s)}}static decodeTransfer(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{lamports:t}=Ie(Oe.Transfer,e.data);return{fromPubkey:e.keys[0].pubkey,toPubkey:e.keys[1].pubkey,lamports:t}}static decodeTransferWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{lamports:t,seed:r,programId:s}=Ie(Oe.TransferWithSeed,e.data);return{fromPubkey:e.keys[0].pubkey,basePubkey:e.keys[1].pubkey,toPubkey:e.keys[2].pubkey,lamports:t,seed:r,programId:new X(s)}}static decodeAllocate(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{space:t}=Ie(Oe.Allocate,e.data);return{accountPubkey:e.keys[0].pubkey,space:t}}static decodeAllocateWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{base:t,seed:r,space:s,programId:i}=Ie(Oe.AllocateWithSeed,e.data);return{accountPubkey:e.keys[0].pubkey,basePubkey:new X(t),seed:r,space:s,programId:new X(i)}}static decodeAssign(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{programId:t}=Ie(Oe.Assign,e.data);return{accountPubkey:e.keys[0].pubkey,programId:new X(t)}}static decodeAssignWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{base:t,seed:r,programId:s}=Ie(Oe.AssignWithSeed,e.data);return{accountPubkey:e.keys[0].pubkey,basePubkey:new X(t),seed:r,programId:new X(s)}}static decodeCreateWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{base:t,seed:r,lamports:s,space:i,programId:o}=Ie(Oe.CreateWithSeed,e.data);return{fromPubkey:e.keys[0].pubkey,newAccountPubkey:e.keys[1].pubkey,basePubkey:new X(t),seed:r,lamports:s,space:i,programId:new X(o)}}static decodeNonceInitialize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{authorized:t}=Ie(Oe.InitializeNonceAccount,e.data);return{noncePubkey:e.keys[0].pubkey,authorizedPubkey:new X(t)}}static decodeNonceAdvance(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),Ie(Oe.AdvanceNonceAccount,e.data),{noncePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey}}static decodeNonceWithdraw(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,5);const{lamports:t}=Ie(Oe.WithdrawNonceAccount,e.data);return{noncePubkey:e.keys[0].pubkey,toPubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey,lamports:t}}static decodeNonceAuthorize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{authorized:t}=Ie(Oe.AuthorizeNonceAccount,e.data);return{noncePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[1].pubkey,newAuthorizedPubkey:new X(t)}}static checkProgramId(e){if(!e.equals(Et.programId))throw new Error("invalid instruction; programId is not SystemProgram")}static checkKeyLength(e,t){if(e.length<t)throw new Error(`invalid instruction; found ${e.length} keys, expected at least ${t}`)}}const Oe=Object.freeze({Create:{index:0,layout:exports.struct([exports.u32("instruction"),exports.ns64("lamports"),exports.ns64("space"),xe("programId")])},Assign:{index:1,layout:exports.struct([exports.u32("instruction"),xe("programId")])},Transfer:{index:2,layout:exports.struct([exports.u32("instruction"),ns("lamports")])},CreateWithSeed:{index:3,layout:exports.struct([exports.u32("instruction"),xe("base"),Er("seed"),exports.ns64("lamports"),exports.ns64("space"),xe("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"),xe("authorized")])},AuthorizeNonceAccount:{index:7,layout:exports.struct([exports.u32("instruction"),xe("authorized")])},Allocate:{index:8,layout:exports.struct([exports.u32("instruction"),exports.ns64("space")])},AllocateWithSeed:{index:9,layout:exports.struct([exports.u32("instruction"),xe("base"),Er("seed"),exports.ns64("space"),xe("programId")])},AssignWithSeed:{index:10,layout:exports.struct([exports.u32("instruction"),xe("base"),Er("seed"),xe("programId")])},TransferWithSeed:{index:11,layout:exports.struct([exports.u32("instruction"),ns("lamports"),Er("seed"),xe("programId")])},UpgradeNonceAccount:{index:12,layout:exports.struct([exports.u32("instruction")])}});class Et{constructor(){}static createAccount(e){const t=Oe.Create,r=Ce(t,{lamports:e.lamports,space:e.space,programId:Ae(e.programId.toBuffer())});return new Me({keys:[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.newAccountPubkey,isSigner:!0,isWritable:!0}],programId:this.programId,data:r})}static transfer(e){let t,r;if("basePubkey"in e){const s=Oe.TransferWithSeed;t=Ce(s,{lamports:BigInt(e.lamports),seed:e.seed,programId:Ae(e.programId.toBuffer())}),r=[{pubkey:e.fromPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0}]}else{const s=Oe.Transfer;t=Ce(s,{lamports:BigInt(e.lamports)}),r=[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0}]}return new Me({keys:r,programId:this.programId,data:t})}static assign(e){let t,r;if("basePubkey"in e){const s=Oe.AssignWithSeed;t=Ce(s,{base:Ae(e.basePubkey.toBuffer()),seed:e.seed,programId:Ae(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]}else{const s=Oe.Assign;t=Ce(s,{programId:Ae(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]}return new Me({keys:r,programId:this.programId,data:t})}static createAccountWithSeed(e){const t=Oe.CreateWithSeed,r=Ce(t,{base:Ae(e.basePubkey.toBuffer()),seed:e.seed,lamports:e.lamports,space:e.space,programId:Ae(e.programId.toBuffer())});let s=[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.newAccountPubkey,isSigner:!1,isWritable:!0}];return e.basePubkey.equals(e.fromPubkey)||s.push({pubkey:e.basePubkey,isSigner:!0,isWritable:!1}),new Me({keys:s,programId:this.programId,data:r})}static createNonceAccount(e){const t=new ke;"basePubkey"in e&&"seed"in e?t.add(Et.createAccountWithSeed({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,basePubkey:e.basePubkey,seed:e.seed,lamports:e.lamports,space:Dc,programId:this.programId})):t.add(Et.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,lamports:e.lamports,space:Dc,programId:this.programId}));const r={noncePubkey:e.noncePubkey,authorizedPubkey:e.authorizedPubkey};return t.add(this.nonceInitialize(r)),t}static nonceInitialize(e){const t=Oe.InitializeNonceAccount,r=Ce(t,{authorized:Ae(e.authorizedPubkey.toBuffer())}),s={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:Mi,isSigner:!1,isWritable:!1},{pubkey:Ir,isSigner:!1,isWritable:!1}],programId:this.programId,data:r};return new Me(s)}static nonceAdvance(e){const t=Oe.AdvanceNonceAccount,r=Ce(t),s={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:Mi,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:r};return new Me(s)}static nonceWithdraw(e){const t=Oe.WithdrawNonceAccount,r=Ce(t,{lamports:e.lamports});return new Me({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0},{pubkey:Mi,isSigner:!1,isWritable:!1},{pubkey:Ir,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:r})}static nonceAuthorize(e){const t=Oe.AuthorizeNonceAccount,r=Ce(t,{authorized:Ae(e.newAuthorizedPubkey.toBuffer())});return new Me({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:r})}static allocate(e){let t,r;if("basePubkey"in e){const s=Oe.AllocateWithSeed;t=Ce(s,{base:Ae(e.basePubkey.toBuffer()),seed:e.seed,space:e.space,programId:Ae(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]}else{const s=Oe.Allocate;t=Ce(s,{space:e.space}),r=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]}return new Me({keys:r,programId:this.programId,data:t})}}Et.programId=new X("11111111111111111111111111111111");const $3=ar-300;class Ur{constructor(){}static getMinNumSignatures(e){return 2*(Math.ceil(e/Ur.chunkSize)+1+1)}static async load(e,t,r,s,i){{const w=await e.getMinimumBalanceForRentExemption(i.length),D=await e.getAccountInfo(r.publicKey,"confirmed");let E=null;if(D!==null){if(D.executable)return console.error("Program load failed, account is already executable"),!1;D.data.length!==i.length&&(E=E||new ke,E.add(Et.allocate({accountPubkey:r.publicKey,space:i.length}))),D.owner.equals(s)||(E=E||new ke,E.add(Et.assign({accountPubkey:r.publicKey,programId:s}))),D.lamports<w&&(E=E||new ke,E.add(Et.transfer({fromPubkey:t.publicKey,toPubkey:r.publicKey,lamports:w-D.lamports})))}else E=new ke().add(Et.createAccount({fromPubkey:t.publicKey,newAccountPubkey:r.publicKey,lamports:w>0?w:1,space:i.length,programId:s}));E!==null&&await Sc(e,E,[t,r],{commitment:"confirmed"})}const o=exports.struct([exports.u32("instruction"),exports.u32("offset"),exports.u32("bytesLength"),exports.u32("bytesLengthPadding"),exports.seq(exports.u8("byte"),or(exports.u32(),-8),"bytes")]),a=Ur.chunkSize;let c=0,h=i,b=[];for(;h.length>0;){const w=h.slice(0,a),D=ae.Buffer.alloc(a+16);o.encode({instruction:0,offset:c,bytes:w,bytesLength:0,bytesLengthPadding:0},D);const E=new ke().add({keys:[{pubkey:r.publicKey,isSigner:!0,isWritable:!0}],programId:s,data:D});b.push(Sc(e,E,[t,r],{commitment:"confirmed"})),e._rpcEndpoint.includes("solana.com")&&await br(1e3/4),c+=a,h=h.slice(a)}await Promise.all(b);{const w=exports.struct([exports.u32("instruction")]),D=ae.Buffer.alloc(w.span);w.encode({instruction:1},D);const E=new ke().add({keys:[{pubkey:r.publicKey,isSigner:!0,isWritable:!0},{pubkey:Ir,isSigner:!1,isWritable:!1}],programId:s,data:D}),g="processed",S=await e.sendTransaction(E,[t,r],{preflightCommitment:g}),{context:T,value:M}=await e.confirmTransaction({signature:S,lastValidBlockHeight:E.lastValidBlockHeight,blockhash:E.recentBlockhash},g);if(M.err)throw new Error(`Transaction ${S} failed (${JSON.stringify(M)})`);for(;;){try{if(await e.getSlot({commitment:g})>T.slot)break}catch{}await new Promise(N=>setTimeout(N,Math.round(Yh/2)))}}return!0}}Ur.chunkSize=$3;const V3=new X("BPFLoader2111111111111111111111111111111111");class G3{static getMinNumSignatures(e){return Ur.getMinNumSignatures(e)}static load(e,t,r,s,i){return Ur.load(e,t,r,i,s)}}function Y3(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Wa,gu;function X3(){if(gu)return Wa;gu=1;var n=Object.prototype.toString,e=Object.keys||function(r){var s=[];for(var i in r)s.push(i);return s};function t(r,s){var i,o,a,c,h,b,w;if(r===!0)return"true";if(r===!1)return"false";switch(typeof r){case"object":if(r===null)return null;if(r.toJSON&&typeof r.toJSON=="function")return t(r.toJSON(),s);if(w=n.call(r),w==="[object Array]"){for(a="[",o=r.length-1,i=0;i<o;i++)a+=t(r[i],!0)+",";return o>-1&&(a+=t(r[i],!0)),a+"]"}else if(w==="[object Object]"){for(c=e(r).sort(),o=c.length,a="",i=0;i<o;)h=c[i],b=t(r[h],!1),b!==void 0&&(a&&(a+=","),a+=JSON.stringify(h)+":"+b),i++;return"{"+a+"}"}else return JSON.stringify(r);case"function":case"undefined":return s?null:void 0;case"string":return JSON.stringify(r);default:return isFinite(r)?r:null}}return Wa=function(r){var s=t(r,!1);if(s!==void 0)return""+s},Wa}var Z3=X3(),yu=Y3(Z3);const Cs=32;function Pa(n){let e=0;for(;n>1;)n/=2,e++;return e}function J3(n){return n===0?1:(n--,n|=n>>1,n|=n>>2,n|=n>>4,n|=n>>8,n|=n>>16,n|=n>>32,n+1)}class Qh{constructor(e,t,r,s,i){this.slotsPerEpoch=void 0,this.leaderScheduleSlotOffset=void 0,this.warmup=void 0,this.firstNormalEpoch=void 0,this.firstNormalSlot=void 0,this.slotsPerEpoch=e,this.leaderScheduleSlotOffset=t,this.warmup=r,this.firstNormalEpoch=s,this.firstNormalSlot=i}getEpoch(e){return this.getEpochAndSlotIndex(e)[0]}getEpochAndSlotIndex(e){if(e<this.firstNormalSlot){const t=Pa(J3(e+Cs+1))-Pa(Cs)-1,r=this.getSlotsInEpoch(t),s=e-(r-Cs);return[t,s]}else{const t=e-this.firstNormalSlot,r=Math.floor(t/this.slotsPerEpoch),s=this.firstNormalEpoch+r,i=t%this.slotsPerEpoch;return[s,i]}}getFirstSlotInEpoch(e){return e<=this.firstNormalEpoch?(Math.pow(2,e)-1)*Cs:(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+Pa(Cs)):this.slotsPerEpoch}}var Q3=globalThis.fetch;class e4 extends B3{constructor(e,t,r){const s=i=>{const o=w3(i,{autoconnect:!0,max_reconnects:5,reconnect:!0,reconnect_interval:1e3,...t});return"socket"in o?this.underlyingSocket=o.socket:this.underlyingSocket=o,o};super(s,e,t,r),this.underlyingSocket=void 0}call(...e){var r;const t=(r=this.underlyingSocket)==null?void 0:r.readyState;return t===1?super.call(...e):Promise.reject(new Error("Tried to call a JSON-RPC method `"+e[0]+"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was "+t+")"))}notify(...e){var r;const t=(r=this.underlyingSocket)==null?void 0:r.readyState;return t===1?super.notify(...e):Promise.reject(new Error("Tried to send a JSON-RPC notification `"+e[0]+"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was "+t+")"))}}function t4(n,e){let t;try{t=n.layout.decode(e)}catch(r){throw new Error("invalid instruction; "+r)}if(t.typeIndex!==n.index)throw new Error(`invalid account data; account type mismatch ${t.typeIndex} != ${n.index}`);return t}const Au=56;class ro{constructor(e){this.key=void 0,this.state=void 0,this.key=e.key,this.state=e.state}isActive(){const e=BigInt("0xffffffffffffffff");return this.state.deactivationSlot===e}static deserialize(e){const t=t4(n4,e),r=e.length-Au;Fe(r>=0,"lookup table is invalid"),Fe(r%32===0,"lookup table is invalid");const s=r/32,{addresses:i}=exports.struct([exports.seq(xe(),s,"addresses")]).decode(e.slice(Au));return{deactivationSlot:t.deactivationSlot,lastExtendedSlot:t.lastExtendedSlot,lastExtendedSlotStartIndex:t.lastExtendedStartIndex,authority:t.authority.length!==0?new X(t.authority[0]):void 0,addresses:i.map(o=>new X(o))}}}const n4={index:1,layout:exports.struct([exports.u32("typeIndex"),ns("deactivationSlot"),kt("lastExtendedSlot"),exports.u8("lastExtendedStartIndex"),exports.u8(),exports.seq(xe(),or(exports.u8(),-1),"authority")])},r4=/^[^:]+:\/\/([^:[]+|\[[^\]]+\])(:\d+)?(.*)/i;function s4(n){const e=n.match(r4);if(e==null)throw TypeError(`Failed to validate endpoint URL \`${n}\``);const[t,r,s,i]=e,o=n.startsWith("https:")?"wss:":"ws:",a=s==null?null:parseInt(s.slice(1),10),c=a==null?"":`:${a+1}`;return`${o}//${r}${c}${i}`}const Ye=di(Ul(X),Z(),n=>new X(n)),em=_l([Z(),Ve("base64")]),Ol=di(Ul(ae.Buffer),em,n=>ae.Buffer.from(n[0],"base64")),tm=30*1e3;function i4(n){if(/^https?:/.test(n)===!1)throw new TypeError("Endpoint URL must start with `http:` or `https:`.");return n}function Le(n){let e,t;if(typeof n=="string")e=n;else if(n){const{commitment:r,...s}=n;e=r,t=s}return{commitment:e,config:t}}function wu(n){return n.map(e=>"memcmp"in e?{...e,memcmp:{...e.memcmp,encoding:e.memcmp.encoding??"base58"}}:e)}function nm(n){return Kt([j({jsonrpc:Ve("2.0"),id:Z(),result:n}),j({jsonrpc:Ve("2.0"),id:Z(),error:j({code:gs(),message:Z(),data:le(j8())})})])}const o4=nm(gs());function ye(n){return di(nm(n),o4,e=>"error"in e?e:{...e,result:Q(e.result,n)})}function et(n){return ye(j({context:j({slot:P()}),value:n}))}function No(n){return j({context:j({slot:P()}),value:n})}function La(n,e){return n===0?new lr({header:e.header,staticAccountKeys:e.accountKeys.map(t=>new X(t)),recentBlockhash:e.recentBlockhash,compiledInstructions:e.instructions.map(t=>({programIdIndex:t.programIdIndex,accountKeyIndexes:t.accounts,data:Dt.decode(t.data)})),addressTableLookups:e.addressTableLookups}):new cn(e)}const a4=j({foundation:P(),foundationTerm:P(),initial:P(),taper:P(),terminal:P()}),c4=ye(te(ne(j({epoch:P(),effectiveSlot:P(),amount:P(),postBalance:P(),commission:le(ne(P()))})))),l4=te(j({slot:P(),prioritizationFee:P()})),d4=j({total:P(),validator:P(),foundation:P(),epoch:P()}),u4=j({epoch:P(),slotIndex:P(),slotsInEpoch:P(),absoluteSlot:P(),blockHeight:le(P()),transactionCount:le(P())}),f4=j({slotsPerEpoch:P(),leaderScheduleSlotOffset:P(),warmup:_n(),firstNormalEpoch:P(),firstNormalSlot:P()}),h4=Ph(Z(),te(P())),Lr=ne(Kt([j({}),Z()])),m4=j({err:Lr}),b4=Ve("receivedSignature"),p4=j({"solana-core":Z(),"feature-set":le(P())}),g4=j({program:Z(),programId:Ye,parsed:gs()}),y4=j({programId:Ye,accounts:te(Ye),data:Z()}),Eu=et(j({err:ne(Kt([j({}),Z()])),logs:ne(te(Z())),accounts:le(ne(te(ne(j({executable:_n(),owner:Z(),lamports:P(),data:te(Z()),rentEpoch:le(P())}))))),unitsConsumed:le(P()),returnData:le(ne(j({programId:Z(),data:_l([Z(),Ve("base64")])}))),innerInstructions:le(ne(te(j({index:P(),instructions:te(Kt([g4,y4]))}))))})),A4=et(j({byIdentity:Ph(Z(),te(P())),range:j({firstSlot:P(),lastSlot:P()})}));function w4(n,e,t,r,s,i){const o=t||Q3;let a;i!=null&&console.warn("You have supplied an `httpAgent` when creating a `Connection` in a browser environment.It has been ignored; `httpAgent` is only used in Node environments.");let c;return r&&(c=async(b,w)=>{const D=await new Promise((E,g)=>{try{r(b,w,(S,T)=>E([S,T]))}catch(S){g(S)}});return await o(...D)}),new qh(async(b,w)=>{const D={method:"POST",body:b,agent:a,headers:Object.assign({"Content-Type":"application/json"},e||{},w6)};try{let E=5,g,S=500;for(;c?g=await c(n,D):g=await o(n,D),!(g.status!==429||s===!0||(E-=1,E===0));)console.error(`Server responded with ${g.status} ${g.statusText}. Retrying after ${S}ms delay...`),await br(S),S*=2;const T=await g.text();g.ok?w(null,T):w(new Error(`${g.status} ${g.statusText}: ${T}`))}catch(E){E instanceof Error&&w(E)}},{})}function E4(n){return(e,t)=>new Promise((r,s)=>{n.request(e,t,(i,o)=>{if(i){s(i);return}r(o)})})}function B4(n){return e=>new Promise((t,r)=>{e.length===0&&t([]);const s=e.map(i=>n.request(i.methodName,i.args));n.request(s,(i,o)=>{if(i){r(i);return}t(o)})})}const x4=ye(a4),C4=ye(d4),S4=ye(l4),D4=ye(u4),v4=ye(f4),k4=ye(h4),F4=ye(P()),T4=et(j({total:P(),circulating:P(),nonCirculating:P(),nonCirculatingAccounts:te(Ye)})),vc=j({amount:Z(),uiAmount:ne(P()),decimals:P(),uiAmountString:le(Z())}),I4=et(te(j({address:Ye,amount:Z(),uiAmount:ne(P()),decimals:P(),uiAmountString:le(Z())}))),U4=et(te(j({pubkey:Ye,account:j({executable:_n(),owner:Ye,lamports:P(),data:Ol,rentEpoch:P()})}))),kc=j({program:Z(),parsed:gs(),space:P()}),_4=et(te(j({pubkey:Ye,account:j({executable:_n(),owner:Ye,lamports:P(),data:kc,rentEpoch:P()})}))),M4=et(te(j({lamports:P(),address:Ye}))),Ys=j({executable:_n(),owner:Ye,lamports:P(),data:Ol,rentEpoch:P()}),R4=j({pubkey:Ye,account:Ys}),W4=di(Kt([Ul(ae.Buffer),kc]),Kt([em,kc]),n=>Array.isArray(n)?Q(n,Ol):n),Fc=j({executable:_n(),owner:Ye,lamports:P(),data:W4,rentEpoch:P()}),P4=j({pubkey:Ye,account:Fc}),L4=j({state:Kt([Ve("active"),Ve("inactive"),Ve("activating"),Ve("deactivating")]),active:P(),inactive:P()}),O4=ye(te(j({signature:Z(),slot:P(),err:Lr,memo:ne(Z()),blockTime:le(ne(P()))}))),N4=ye(te(j({signature:Z(),slot:P(),err:Lr,memo:ne(Z()),blockTime:le(ne(P()))}))),z4=j({subscription:P(),result:No(Ys)}),H4=j({pubkey:Ye,account:Ys}),q4=j({subscription:P(),result:No(H4)}),K4=j({parent:P(),slot:P(),root:P()}),j4=j({subscription:P(),result:K4}),$4=Kt([j({type:Kt([Ve("firstShredReceived"),Ve("completed"),Ve("optimisticConfirmation"),Ve("root")]),slot:P(),timestamp:P()}),j({type:Ve("createdBank"),parent:P(),slot:P(),timestamp:P()}),j({type:Ve("frozen"),slot:P(),timestamp:P(),stats:j({numTransactionEntries:P(),numSuccessfulTransactions:P(),numFailedTransactions:P(),maxTransactionsPerEntry:P()})}),j({type:Ve("dead"),slot:P(),timestamp:P(),err:Z()})]),V4=j({subscription:P(),result:$4}),G4=j({subscription:P(),result:No(Kt([m4,b4]))}),Y4=j({subscription:P(),result:P()}),X4=j({pubkey:Z(),gossip:ne(Z()),tpu:ne(Z()),rpc:ne(Z()),version:ne(Z())}),Bu=j({votePubkey:Z(),nodePubkey:Z(),activatedStake:P(),epochVoteAccount:_n(),epochCredits:te(_l([P(),P(),P()])),commission:P(),lastVote:P(),rootSlot:ne(P())}),Z4=ye(j({current:te(Bu),delinquent:te(Bu)})),J4=Kt([Ve("processed"),Ve("confirmed"),Ve("finalized")]),Q4=j({slot:P(),confirmations:ne(P()),err:Lr,confirmationStatus:le(J4)}),e6=et(te(ne(Q4))),t6=ye(P()),rm=j({accountKey:Ye,writableIndexes:te(P()),readonlyIndexes:te(P())}),Nl=j({signatures:te(Z()),message:j({accountKeys:te(Z()),header:j({numRequiredSignatures:P(),numReadonlySignedAccounts:P(),numReadonlyUnsignedAccounts:P()}),instructions:te(j({accounts:te(P()),data:Z(),programIdIndex:P()})),recentBlockhash:Z(),addressTableLookups:le(te(rm))})}),sm=j({pubkey:Ye,signer:_n(),writable:_n(),source:le(Kt([Ve("transaction"),Ve("lookupTable")]))}),im=j({accountKeys:te(sm),signatures:te(Z())}),om=j({parsed:gs(),program:Z(),programId:Ye}),am=j({accounts:te(Ye),data:Z(),programId:Ye}),n6=Kt([am,om]),r6=Kt([j({parsed:gs(),program:Z(),programId:Z()}),j({accounts:te(Z()),data:Z(),programId:Z()})]),cm=di(n6,r6,n=>"accounts"in n?Q(n,am):Q(n,om)),lm=j({signatures:te(Z()),message:j({accountKeys:te(sm),instructions:te(cm),recentBlockhash:Z(),addressTableLookups:le(ne(te(rm)))})}),so=j({accountIndex:P(),mint:Z(),owner:le(Z()),programId:le(Z()),uiTokenAmount:vc}),dm=j({writable:te(Ye),readonly:te(Ye)}),zo=j({err:Lr,fee:P(),innerInstructions:le(ne(te(j({index:P(),instructions:te(j({accounts:te(P()),data:Z(),programIdIndex:P()}))})))),preBalances:te(P()),postBalances:te(P()),logMessages:le(ne(te(Z()))),preTokenBalances:le(ne(te(so))),postTokenBalances:le(ne(te(so))),loadedAddresses:le(dm),computeUnitsConsumed:le(P())}),zl=j({err:Lr,fee:P(),innerInstructions:le(ne(te(j({index:P(),instructions:te(cm)})))),preBalances:te(P()),postBalances:te(P()),logMessages:le(ne(te(Z()))),preTokenBalances:le(ne(te(so))),postTokenBalances:le(ne(te(so))),loadedAddresses:le(dm),computeUnitsConsumed:le(P())}),ys=Kt([Ve(0),Ve("legacy")]),Or=j({pubkey:Z(),lamports:P(),postBalance:ne(P()),rewardType:ne(Z()),commission:le(ne(P()))}),s6=ye(ne(j({blockhash:Z(),previousBlockhash:Z(),parentSlot:P(),transactions:te(j({transaction:Nl,meta:ne(zo),version:le(ys)})),rewards:le(te(Or)),blockTime:ne(P()),blockHeight:ne(P())}))),i6=ye(ne(j({blockhash:Z(),previousBlockhash:Z(),parentSlot:P(),rewards:le(te(Or)),blockTime:ne(P()),blockHeight:ne(P())}))),o6=ye(ne(j({blockhash:Z(),previousBlockhash:Z(),parentSlot:P(),transactions:te(j({transaction:im,meta:ne(zo),version:le(ys)})),rewards:le(te(Or)),blockTime:ne(P()),blockHeight:ne(P())}))),a6=ye(ne(j({blockhash:Z(),previousBlockhash:Z(),parentSlot:P(),transactions:te(j({transaction:lm,meta:ne(zl),version:le(ys)})),rewards:le(te(Or)),blockTime:ne(P()),blockHeight:ne(P())}))),c6=ye(ne(j({blockhash:Z(),previousBlockhash:Z(),parentSlot:P(),transactions:te(j({transaction:im,meta:ne(zl),version:le(ys)})),rewards:le(te(Or)),blockTime:ne(P()),blockHeight:ne(P())}))),l6=ye(ne(j({blockhash:Z(),previousBlockhash:Z(),parentSlot:P(),rewards:le(te(Or)),blockTime:ne(P()),blockHeight:ne(P())}))),d6=ye(ne(j({blockhash:Z(),previousBlockhash:Z(),parentSlot:P(),transactions:te(j({transaction:Nl,meta:ne(zo)})),rewards:le(te(Or)),blockTime:ne(P())}))),xu=ye(ne(j({blockhash:Z(),previousBlockhash:Z(),parentSlot:P(),signatures:te(Z()),blockTime:ne(P())}))),Oa=ye(ne(j({slot:P(),meta:ne(zo),blockTime:le(ne(P())),transaction:Nl,version:le(ys)}))),Ai=ye(ne(j({slot:P(),transaction:lm,meta:ne(zl),blockTime:le(ne(P())),version:le(ys)}))),u6=et(j({blockhash:Z(),lastValidBlockHeight:P()})),f6=et(_n()),h6=j({slot:P(),numTransactions:P(),numSlots:P(),samplePeriodSecs:P()}),m6=ye(te(h6)),b6=et(ne(j({feeCalculator:j({lamportsPerSignature:P()})}))),p6=ye(Z()),g6=ye(Z()),y6=j({err:Lr,logs:te(Z()),signature:Z()}),A6=j({result:No(y6),subscription:P()}),w6={"solana-client":"js/1.0.0-maintenance"};class um{constructor(e,t){this._commitment=void 0,this._confirmTransactionInitialTimeout=void 0,this._rpcEndpoint=void 0,this._rpcWsEndpoint=void 0,this._rpcClient=void 0,this._rpcRequest=void 0,this._rpcBatchRequest=void 0,this._rpcWebSocket=void 0,this._rpcWebSocketConnected=!1,this._rpcWebSocketHeartbeat=null,this._rpcWebSocketIdleTimeout=null,this._rpcWebSocketGeneration=0,this._disableBlockhashCaching=!1,this._pollingBlockhash=!1,this._blockhashInfo={latestBlockhash:null,lastFetch:0,transactionSignatures:[],simulatedSignatures:[]},this._nextClientSubscriptionId=0,this._subscriptionDisposeFunctionsByClientSubscriptionId={},this._subscriptionHashByClientSubscriptionId={},this._subscriptionStateChangeCallbacksByHash={},this._subscriptionCallbacksByServerSubscriptionId={},this._subscriptionsByHash={},this._subscriptionsAutoDisposedByRpc=new Set,this.getBlockHeight=(()=>{const h={};return async b=>{const{commitment:w,config:D}=Le(b),E=this._buildArgs([],w,void 0,D),g=yu(E);return h[g]=h[g]??(async()=>{try{const S=await this._rpcRequest("getBlockHeight",E),T=Q(S,ye(P()));if("error"in T)throw new oe(T.error,"failed to get block height information");return T.result}finally{delete h[g]}})(),await h[g]}})();let r,s,i,o,a,c;t&&typeof t=="string"?this._commitment=t:t&&(this._commitment=t.commitment,this._confirmTransactionInitialTimeout=t.confirmTransactionInitialTimeout,r=t.wsEndpoint,s=t.httpHeaders,i=t.fetch,o=t.fetchMiddleware,a=t.disableRetryOnRateLimit,c=t.httpAgent),this._rpcEndpoint=i4(e),this._rpcWsEndpoint=r||s4(e),this._rpcClient=w4(e,s,i,o,a,c),this._rpcRequest=E4(this._rpcClient),this._rpcBatchRequest=B4(this._rpcClient),this._rpcWebSocket=new e4(this._rpcWsEndpoint,{autoconnect:!1,max_reconnects:1/0}),this._rpcWebSocket.on("open",this._wsOnOpen.bind(this)),this._rpcWebSocket.on("error",this._wsOnError.bind(this)),this._rpcWebSocket.on("close",this._wsOnClose.bind(this)),this._rpcWebSocket.on("accountNotification",this._wsOnAccountNotification.bind(this)),this._rpcWebSocket.on("programNotification",this._wsOnProgramAccountNotification.bind(this)),this._rpcWebSocket.on("slotNotification",this._wsOnSlotNotification.bind(this)),this._rpcWebSocket.on("slotsUpdatesNotification",this._wsOnSlotUpdatesNotification.bind(this)),this._rpcWebSocket.on("signatureNotification",this._wsOnSignatureNotification.bind(this)),this._rpcWebSocket.on("rootNotification",this._wsOnRootNotification.bind(this)),this._rpcWebSocket.on("logsNotification",this._wsOnLogsNotification.bind(this))}get commitment(){return this._commitment}get rpcEndpoint(){return this._rpcEndpoint}async getBalanceAndContext(e,t){const{commitment:r,config:s}=Le(t),i=this._buildArgs([e.toBase58()],r,void 0,s),o=await this._rpcRequest("getBalance",i),a=Q(o,et(P()));if("error"in a)throw new oe(a.error,`failed to get balance for ${e.toBase58()}`);return a.result}async getBalance(e,t){return await this.getBalanceAndContext(e,t).then(r=>r.value).catch(r=>{throw new Error("failed to get balance of account "+e.toBase58()+": "+r)})}async getBlockTime(e){const t=await this._rpcRequest("getBlockTime",[e]),r=Q(t,ye(ne(P())));if("error"in r)throw new oe(r.error,`failed to get block time for slot ${e}`);return r.result}async getMinimumLedgerSlot(){const e=await this._rpcRequest("minimumLedgerSlot",[]),t=Q(e,ye(P()));if("error"in t)throw new oe(t.error,"failed to get minimum ledger slot");return t.result}async getFirstAvailableBlock(){const e=await this._rpcRequest("getFirstAvailableBlock",[]),t=Q(e,F4);if("error"in t)throw new oe(t.error,"failed to get first available block");return t.result}async getSupply(e){let t={};typeof e=="string"?t={commitment:e}:e?t={...e,commitment:e&&e.commitment||this.commitment}:t={commitment:this.commitment};const r=await this._rpcRequest("getSupply",[t]),s=Q(r,T4);if("error"in s)throw new oe(s.error,"failed to get supply");return s.result}async getTokenSupply(e,t){const r=this._buildArgs([e.toBase58()],t),s=await this._rpcRequest("getTokenSupply",r),i=Q(s,et(vc));if("error"in i)throw new oe(i.error,"failed to get token supply");return i.result}async getTokenAccountBalance(e,t){const r=this._buildArgs([e.toBase58()],t),s=await this._rpcRequest("getTokenAccountBalance",r),i=Q(s,et(vc));if("error"in i)throw new oe(i.error,"failed to get token account balance");return i.result}async getTokenAccountsByOwner(e,t,r){const{commitment:s,config:i}=Le(r);let o=[e.toBase58()];"mint"in t?o.push({mint:t.mint.toBase58()}):o.push({programId:t.programId.toBase58()});const a=this._buildArgs(o,s,"base64",i),c=await this._rpcRequest("getTokenAccountsByOwner",a),h=Q(c,U4);if("error"in h)throw new oe(h.error,`failed to get token accounts owned by account ${e.toBase58()}`);return h.result}async getParsedTokenAccountsByOwner(e,t,r){let s=[e.toBase58()];"mint"in t?s.push({mint:t.mint.toBase58()}):s.push({programId:t.programId.toBase58()});const i=this._buildArgs(s,r,"jsonParsed"),o=await this._rpcRequest("getTokenAccountsByOwner",i),a=Q(o,_4);if("error"in a)throw new oe(a.error,`failed to get token accounts owned by account ${e.toBase58()}`);return a.result}async getLargestAccounts(e){const t={...e,commitment:e&&e.commitment||this.commitment},r=t.filter||t.commitment?[t]:[],s=await this._rpcRequest("getLargestAccounts",r),i=Q(s,M4);if("error"in i)throw new oe(i.error,"failed to get largest accounts");return i.result}async getTokenLargestAccounts(e,t){const r=this._buildArgs([e.toBase58()],t),s=await this._rpcRequest("getTokenLargestAccounts",r),i=Q(s,I4);if("error"in i)throw new oe(i.error,"failed to get token largest accounts");return i.result}async getAccountInfoAndContext(e,t){const{commitment:r,config:s}=Le(t),i=this._buildArgs([e.toBase58()],r,"base64",s),o=await this._rpcRequest("getAccountInfo",i),a=Q(o,et(ne(Ys)));if("error"in a)throw new oe(a.error,`failed to get info about account ${e.toBase58()}`);return a.result}async getParsedAccountInfo(e,t){const{commitment:r,config:s}=Le(t),i=this._buildArgs([e.toBase58()],r,"jsonParsed",s),o=await this._rpcRequest("getAccountInfo",i),a=Q(o,et(ne(Fc)));if("error"in a)throw new oe(a.error,`failed to get info about account ${e.toBase58()}`);return a.result}async getAccountInfo(e,t){try{return(await this.getAccountInfoAndContext(e,t)).value}catch(r){throw new Error("failed to get info about account "+e.toBase58()+": "+r)}}async getMultipleParsedAccounts(e,t){const{commitment:r,config:s}=Le(t),i=e.map(h=>h.toBase58()),o=this._buildArgs([i],r,"jsonParsed",s),a=await this._rpcRequest("getMultipleAccounts",o),c=Q(a,et(te(ne(Fc))));if("error"in c)throw new oe(c.error,`failed to get info for accounts ${i}`);return c.result}async getMultipleAccountsInfoAndContext(e,t){const{commitment:r,config:s}=Le(t),i=e.map(h=>h.toBase58()),o=this._buildArgs([i],r,"base64",s),a=await this._rpcRequest("getMultipleAccounts",o),c=Q(a,et(te(ne(Ys))));if("error"in c)throw new oe(c.error,`failed to get info for accounts ${i}`);return c.result}async getMultipleAccountsInfo(e,t){return(await this.getMultipleAccountsInfoAndContext(e,t)).value}async getStakeActivation(e,t,r){const{commitment:s,config:i}=Le(t),o=this._buildArgs([e.toBase58()],s,void 0,{...i,epoch:r??(i==null?void 0:i.epoch)}),a=await this._rpcRequest("getStakeActivation",o),c=Q(a,ye(L4));if("error"in c)throw new oe(c.error,`failed to get Stake Activation ${e.toBase58()}`);return c.result}async getProgramAccounts(e,t){const{commitment:r,config:s}=Le(t),{encoding:i,...o}=s||{},a=this._buildArgs([e.toBase58()],r,i||"base64",{...o,...o.filters?{filters:wu(o.filters)}:null}),c=await this._rpcRequest("getProgramAccounts",a),h=te(R4),b=o.withContext===!0?Q(c,et(h)):Q(c,ye(h));if("error"in b)throw new oe(b.error,`failed to get accounts owned by program ${e.toBase58()}`);return b.result}async getParsedProgramAccounts(e,t){const{commitment:r,config:s}=Le(t),i=this._buildArgs([e.toBase58()],r,"jsonParsed",s),o=await this._rpcRequest("getProgramAccounts",i),a=Q(o,ye(te(P4)));if("error"in a)throw new oe(a.error,`failed to get accounts owned by program ${e.toBase58()}`);return a.result}async confirmTransaction(e,t){var i;let r;if(typeof e=="string")r=e;else{const o=e;if((i=o.abortSignal)!=null&&i.aborted)return Promise.reject(o.abortSignal.reason);r=o.signature}let s;try{s=Dt.decode(r)}catch{throw new Error("signature must be base58 encoded: "+r)}return Fe(s.length===64,"signature has invalid length"),typeof e=="string"?await this.confirmTransactionUsingLegacyTimeoutStrategy({commitment:t||this.commitment,signature:r}):"lastValidBlockHeight"in e?await this.confirmTransactionUsingBlockHeightExceedanceStrategy({commitment:t||this.commitment,strategy:e}):await this.confirmTransactionUsingDurableNonceStrategy({commitment:t||this.commitment,strategy:e})}getCancellationPromise(e){return new Promise((t,r)=>{e!=null&&(e.aborted?r(e.reason):e.addEventListener("abort",()=>{r(e.reason)}))})}getTransactionConfirmationPromise({commitment:e,signature:t}){let r,s,i=!1;const o=new Promise((c,h)=>{try{r=this.onSignature(t,(w,D)=>{r=void 0;const E={context:D,value:w};c({__type:Nn.PROCESSED,response:E})},e);const b=new Promise(w=>{r==null?w():s=this._onSubscriptionStateChange(r,D=>{D==="subscribed"&&w()})});(async()=>{if(await b,i)return;const w=await this.getSignatureStatus(t);if(i||w==null)return;const{context:D,value:E}=w;if(E!=null)if(E!=null&&E.err)h(E.err);else{switch(e){case"confirmed":case"single":case"singleGossip":{if(E.confirmationStatus==="processed")return;break}case"finalized":case"max":case"root":{if(E.confirmationStatus==="processed"||E.confirmationStatus==="confirmed")return;break}case"processed":case"recent":}i=!0,c({__type:Nn.PROCESSED,response:{context:D,value:E}})}})()}catch(b){h(b)}});return{abortConfirmation:()=>{s&&(s(),s=void 0),r!=null&&(this.removeSignatureListener(r),r=void 0)},confirmationPromise:o}}async confirmTransactionUsingBlockHeightExceedanceStrategy({commitment:e,strategy:{abortSignal:t,lastValidBlockHeight:r,signature:s}}){let i=!1;const o=new Promise(w=>{const D=async()=>{try{return await this.getBlockHeight(e)}catch{return-1}};(async()=>{let E=await D();if(!i){for(;E<=r;)if(await br(1e3),i||(E=await D(),i))return;w({__type:Nn.BLOCKHEIGHT_EXCEEDED})}})()}),{abortConfirmation:a,confirmationPromise:c}=this.getTransactionConfirmationPromise({commitment:e,signature:s}),h=this.getCancellationPromise(t);let b;try{const w=await Promise.race([h,c,o]);if(w.__type===Nn.PROCESSED)b=w.response;else throw new Ro(s)}finally{i=!0,a()}return b}async confirmTransactionUsingDurableNonceStrategy({commitment:e,strategy:{abortSignal:t,minContextSlot:r,nonceAccountPubkey:s,nonceValue:i,signature:o}}){let a=!1;const c=new Promise(E=>{let g=i,S=null;const T=async()=>{try{const{context:M,value:N}=await this.getNonceAndContext(s,{commitment:e,minContextSlot:r});return S=M.slot,N==null?void 0:N.nonce}catch{return g}};(async()=>{if(g=await T(),!a)for(;;){if(i!==g){E({__type:Nn.NONCE_INVALID,slotInWhichNonceDidAdvance:S});return}if(await br(2e3),a||(g=await T(),a))return}})()}),{abortConfirmation:h,confirmationPromise:b}=this.getTransactionConfirmationPromise({commitment:e,signature:o}),w=this.getCancellationPromise(t);let D;try{const E=await Promise.race([w,b,c]);if(E.__type===Nn.PROCESSED)D=E.response;else{let g;for(;;){const S=await this.getSignatureStatus(o);if(S==null)break;if(S.context.slot<(E.slotInWhichNonceDidAdvance??r)){await br(400);continue}g=S;break}if(g!=null&&g.value){const S=e||"finalized",{confirmationStatus:T}=g.value;switch(S){case"processed":case"recent":if(T!=="processed"&&T!=="confirmed"&&T!=="finalized")throw new jr(o);break;case"confirmed":case"single":case"singleGossip":if(T!=="confirmed"&&T!=="finalized")throw new jr(o);break;case"finalized":case"max":case"root":if(T!=="finalized")throw new jr(o);break;default:}D={context:g.context,value:{err:g.value.err}}}else throw new jr(o)}}finally{a=!0,h()}return D}async confirmTransactionUsingLegacyTimeoutStrategy({commitment:e,signature:t}){let r;const s=new Promise(c=>{let h=this._confirmTransactionInitialTimeout||6e4;switch(e){case"processed":case"recent":case"single":case"confirmed":case"singleGossip":{h=this._confirmTransactionInitialTimeout||3e4;break}}r=setTimeout(()=>c({__type:Nn.TIMED_OUT,timeoutMs:h}),h)}),{abortConfirmation:i,confirmationPromise:o}=this.getTransactionConfirmationPromise({commitment:e,signature:t});let a;try{const c=await Promise.race([o,s]);if(c.__type===Nn.PROCESSED)a=c.response;else throw new Pl(t,c.timeoutMs/1e3)}finally{clearTimeout(r),i()}return a}async getClusterNodes(){const e=await this._rpcRequest("getClusterNodes",[]),t=Q(e,ye(te(X4)));if("error"in t)throw new oe(t.error,"failed to get cluster nodes");return t.result}async getVoteAccounts(e){const t=this._buildArgs([],e),r=await this._rpcRequest("getVoteAccounts",t),s=Q(r,Z4);if("error"in s)throw new oe(s.error,"failed to get vote accounts");return s.result}async getSlot(e){const{commitment:t,config:r}=Le(e),s=this._buildArgs([],t,void 0,r),i=await this._rpcRequest("getSlot",s),o=Q(i,ye(P()));if("error"in o)throw new oe(o.error,"failed to get slot");return o.result}async getSlotLeader(e){const{commitment:t,config:r}=Le(e),s=this._buildArgs([],t,void 0,r),i=await this._rpcRequest("getSlotLeader",s),o=Q(i,ye(Z()));if("error"in o)throw new oe(o.error,"failed to get slot leader");return o.result}async getSlotLeaders(e,t){const r=[e,t],s=await this._rpcRequest("getSlotLeaders",r),i=Q(s,ye(te(Ye)));if("error"in i)throw new oe(i.error,"failed to get slot leaders");return i.result}async getSignatureStatus(e,t){const{context:r,value:s}=await this.getSignatureStatuses([e],t);Fe(s.length===1);const i=s[0];return{context:r,value:i}}async getSignatureStatuses(e,t){const r=[e];t&&r.push(t);const s=await this._rpcRequest("getSignatureStatuses",r),i=Q(s,e6);if("error"in i)throw new oe(i.error,"failed to get signature status");return i.result}async getTransactionCount(e){const{commitment:t,config:r}=Le(e),s=this._buildArgs([],t,void 0,r),i=await this._rpcRequest("getTransactionCount",s),o=Q(i,ye(P()));if("error"in o)throw new oe(o.error,"failed to get transaction count");return o.result}async getTotalSupply(e){return(await this.getSupply({commitment:e,excludeNonCirculatingAccountsList:!0})).value.total}async getInflationGovernor(e){const t=this._buildArgs([],e),r=await this._rpcRequest("getInflationGovernor",t),s=Q(r,x4);if("error"in s)throw new oe(s.error,"failed to get inflation");return s.result}async getInflationReward(e,t,r){const{commitment:s,config:i}=Le(r),o=this._buildArgs([e.map(h=>h.toBase58())],s,void 0,{...i,epoch:t??(i==null?void 0:i.epoch)}),a=await this._rpcRequest("getInflationReward",o),c=Q(a,c4);if("error"in c)throw new oe(c.error,"failed to get inflation reward");return c.result}async getInflationRate(){const e=await this._rpcRequest("getInflationRate",[]),t=Q(e,C4);if("error"in t)throw new oe(t.error,"failed to get inflation rate");return t.result}async getEpochInfo(e){const{commitment:t,config:r}=Le(e),s=this._buildArgs([],t,void 0,r),i=await this._rpcRequest("getEpochInfo",s),o=Q(i,D4);if("error"in o)throw new oe(o.error,"failed to get epoch info");return o.result}async getEpochSchedule(){const e=await this._rpcRequest("getEpochSchedule",[]),t=Q(e,v4);if("error"in t)throw new oe(t.error,"failed to get epoch schedule");const r=t.result;return new Qh(r.slotsPerEpoch,r.leaderScheduleSlotOffset,r.warmup,r.firstNormalEpoch,r.firstNormalSlot)}async getLeaderSchedule(){const e=await this._rpcRequest("getLeaderSchedule",[]),t=Q(e,k4);if("error"in t)throw new oe(t.error,"failed to get leader schedule");return t.result}async getMinimumBalanceForRentExemption(e,t){const r=this._buildArgs([e],t),s=await this._rpcRequest("getMinimumBalanceForRentExemption",r),i=Q(s,t6);return"error"in i?(console.warn("Unable to fetch minimum balance for rent exemption"),0):i.result}async getRecentBlockhashAndContext(e){const{context:t,value:{blockhash:r}}=await this.getLatestBlockhashAndContext(e);return{context:t,value:{blockhash:r,feeCalculator:{get lamportsPerSignature(){throw new Error("The capability to fetch `lamportsPerSignature` using the `getRecentBlockhash` API is no longer offered by the network. Use the `getFeeForMessage` API to obtain the fee for a given message.")},toJSON(){return{}}}}}}async getRecentPerformanceSamples(e){const t=await this._rpcRequest("getRecentPerformanceSamples",e?[e]:[]),r=Q(t,m6);if("error"in r)throw new oe(r.error,"failed to get recent performance samples");return r.result}async getFeeCalculatorForBlockhash(e,t){const r=this._buildArgs([e],t),s=await this._rpcRequest("getFeeCalculatorForBlockhash",r),i=Q(s,b6);if("error"in i)throw new oe(i.error,"failed to get fee calculator");const{context:o,value:a}=i.result;return{context:o,value:a!==null?a.feeCalculator:null}}async getFeeForMessage(e,t){const r=Ae(e.serialize()).toString("base64"),s=this._buildArgs([r],t),i=await this._rpcRequest("getFeeForMessage",s),o=Q(i,et(ne(P())));if("error"in o)throw new oe(o.error,"failed to get fee for message");if(o.result===null)throw new Error("invalid blockhash");return o.result}async getRecentPrioritizationFees(e){var o;const t=(o=e==null?void 0:e.lockedWritableAccounts)==null?void 0:o.map(a=>a.toBase58()),r=t!=null&&t.length?[t]:[],s=await this._rpcRequest("getRecentPrioritizationFees",r),i=Q(s,S4);if("error"in i)throw new oe(i.error,"failed to get recent prioritization fees");return i.result}async getRecentBlockhash(e){try{return(await this.getRecentBlockhashAndContext(e)).value}catch(t){throw new Error("failed to get recent blockhash: "+t)}}async getLatestBlockhash(e){try{return(await this.getLatestBlockhashAndContext(e)).value}catch(t){throw new Error("failed to get recent blockhash: "+t)}}async getLatestBlockhashAndContext(e){const{commitment:t,config:r}=Le(e),s=this._buildArgs([],t,void 0,r),i=await this._rpcRequest("getLatestBlockhash",s),o=Q(i,u6);if("error"in o)throw new oe(o.error,"failed to get latest blockhash");return o.result}async isBlockhashValid(e,t){const{commitment:r,config:s}=Le(t),i=this._buildArgs([e],r,void 0,s),o=await this._rpcRequest("isBlockhashValid",i),a=Q(o,f6);if("error"in a)throw new oe(a.error,"failed to determine if the blockhash `"+e+"`is valid");return a.result}async getVersion(){const e=await this._rpcRequest("getVersion",[]),t=Q(e,ye(p4));if("error"in t)throw new oe(t.error,"failed to get version");return t.result}async getGenesisHash(){const e=await this._rpcRequest("getGenesisHash",[]),t=Q(e,ye(Z()));if("error"in t)throw new oe(t.error,"failed to get genesis hash");return t.result}async getBlock(e,t){const{commitment:r,config:s}=Le(t),i=this._buildArgsAtLeastConfirmed([e],r,void 0,s),o=await this._rpcRequest("getBlock",i);try{switch(s==null?void 0:s.transactionDetails){case"accounts":{const a=Q(o,o6);if("error"in a)throw a.error;return a.result}case"none":{const a=Q(o,i6);if("error"in a)throw a.error;return a.result}default:{const a=Q(o,s6);if("error"in a)throw a.error;const{result:c}=a;return c?{...c,transactions:c.transactions.map(({transaction:h,meta:b,version:w})=>({meta:b,transaction:{...h,message:La(w,h.message)},version:w}))}:null}}}catch(a){throw new oe(a,"failed to get confirmed block")}}async getParsedBlock(e,t){const{commitment:r,config:s}=Le(t),i=this._buildArgsAtLeastConfirmed([e],r,"jsonParsed",s),o=await this._rpcRequest("getBlock",i);try{switch(s==null?void 0:s.transactionDetails){case"accounts":{const a=Q(o,c6);if("error"in a)throw a.error;return a.result}case"none":{const a=Q(o,l6);if("error"in a)throw a.error;return a.result}default:{const a=Q(o,a6);if("error"in a)throw a.error;return a.result}}}catch(a){throw new oe(a,"failed to get block")}}async getBlockProduction(e){let t,r;if(typeof e=="string")r=e;else if(e){const{commitment:a,...c}=e;r=a,t=c}const s=this._buildArgs([],r,"base64",t),i=await this._rpcRequest("getBlockProduction",s),o=Q(i,A4);if("error"in o)throw new oe(o.error,"failed to get block production information");return o.result}async getTransaction(e,t){const{commitment:r,config:s}=Le(t),i=this._buildArgsAtLeastConfirmed([e],r,void 0,s),o=await this._rpcRequest("getTransaction",i),a=Q(o,Oa);if("error"in a)throw new oe(a.error,"failed to get transaction");const c=a.result;return c&&{...c,transaction:{...c.transaction,message:La(c.version,c.transaction.message)}}}async getParsedTransaction(e,t){const{commitment:r,config:s}=Le(t),i=this._buildArgsAtLeastConfirmed([e],r,"jsonParsed",s),o=await this._rpcRequest("getTransaction",i),a=Q(o,Ai);if("error"in a)throw new oe(a.error,"failed to get transaction");return a.result}async getParsedTransactions(e,t){const{commitment:r,config:s}=Le(t),i=e.map(c=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([c],r,"jsonParsed",s)}));return(await this._rpcBatchRequest(i)).map(c=>{const h=Q(c,Ai);if("error"in h)throw new oe(h.error,"failed to get transactions");return h.result})}async getTransactions(e,t){const{commitment:r,config:s}=Le(t),i=e.map(c=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([c],r,void 0,s)}));return(await this._rpcBatchRequest(i)).map(c=>{const h=Q(c,Oa);if("error"in h)throw new oe(h.error,"failed to get transactions");const b=h.result;return b&&{...b,transaction:{...b.transaction,message:La(b.version,b.transaction.message)}}})}async getConfirmedBlock(e,t){const r=this._buildArgsAtLeastConfirmed([e],t),s=await this._rpcRequest("getBlock",r),i=Q(s,d6);if("error"in i)throw new oe(i.error,"failed to get confirmed block");const o=i.result;if(!o)throw new Error("Confirmed block "+e+" not found");const a={...o,transactions:o.transactions.map(({transaction:c,meta:h})=>{const b=new cn(c.message);return{meta:h,transaction:{...c,message:b}}})};return{...a,transactions:a.transactions.map(({transaction:c,meta:h})=>({meta:h,transaction:ke.populate(c.message,c.signatures)}))}}async getBlocks(e,t,r){const s=this._buildArgsAtLeastConfirmed(t!==void 0?[e,t]:[e],r),i=await this._rpcRequest("getBlocks",s),o=Q(i,ye(te(P())));if("error"in o)throw new oe(o.error,"failed to get blocks");return o.result}async getBlockSignatures(e,t){const r=this._buildArgsAtLeastConfirmed([e],t,void 0,{transactionDetails:"signatures",rewards:!1}),s=await this._rpcRequest("getBlock",r),i=Q(s,xu);if("error"in i)throw new oe(i.error,"failed to get block");const o=i.result;if(!o)throw new Error("Block "+e+" not found");return o}async getConfirmedBlockSignatures(e,t){const r=this._buildArgsAtLeastConfirmed([e],t,void 0,{transactionDetails:"signatures",rewards:!1}),s=await this._rpcRequest("getBlock",r),i=Q(s,xu);if("error"in i)throw new oe(i.error,"failed to get confirmed block");const o=i.result;if(!o)throw new Error("Confirmed block "+e+" not found");return o}async getConfirmedTransaction(e,t){const r=this._buildArgsAtLeastConfirmed([e],t),s=await this._rpcRequest("getTransaction",r),i=Q(s,Oa);if("error"in i)throw new oe(i.error,"failed to get transaction");const o=i.result;if(!o)return o;const a=new cn(o.transaction.message),c=o.transaction.signatures;return{...o,transaction:ke.populate(a,c)}}async getParsedConfirmedTransaction(e,t){const r=this._buildArgsAtLeastConfirmed([e],t,"jsonParsed"),s=await this._rpcRequest("getTransaction",r),i=Q(s,Ai);if("error"in i)throw new oe(i.error,"failed to get confirmed transaction");return i.result}async getParsedConfirmedTransactions(e,t){const r=e.map(o=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([o],t,"jsonParsed")}));return(await this._rpcBatchRequest(r)).map(o=>{const a=Q(o,Ai);if("error"in a)throw new oe(a.error,"failed to get confirmed transactions");return a.result})}async getConfirmedSignaturesForAddress(e,t,r){let s={},i=await this.getFirstAvailableBlock();for(;!("until"in s)&&(t--,!(t<=0||t<i));)try{const c=await this.getConfirmedBlockSignatures(t,"finalized");c.signatures.length>0&&(s.until=c.signatures[c.signatures.length-1].toString())}catch(c){if(c instanceof Error&&c.message.includes("skipped"))continue;throw c}let o=await this.getSlot("finalized");for(;!("before"in s)&&(r++,!(r>o));)try{const c=await this.getConfirmedBlockSignatures(r);c.signatures.length>0&&(s.before=c.signatures[c.signatures.length-1].toString())}catch(c){if(c instanceof Error&&c.message.includes("skipped"))continue;throw c}return(await this.getConfirmedSignaturesForAddress2(e,s)).map(c=>c.signature)}async getConfirmedSignaturesForAddress2(e,t,r){const s=this._buildArgsAtLeastConfirmed([e.toBase58()],r,void 0,t),i=await this._rpcRequest("getConfirmedSignaturesForAddress2",s),o=Q(i,O4);if("error"in o)throw new oe(o.error,"failed to get confirmed signatures for address");return o.result}async getSignaturesForAddress(e,t,r){const s=this._buildArgsAtLeastConfirmed([e.toBase58()],r,void 0,t),i=await this._rpcRequest("getSignaturesForAddress",s),o=Q(i,N4);if("error"in o)throw new oe(o.error,"failed to get signatures for address");return o.result}async getAddressLookupTable(e,t){const{context:r,value:s}=await this.getAccountInfoAndContext(e,t);let i=null;return s!==null&&(i=new ro({key:e,state:ro.deserialize(s.data)})),{context:r,value:i}}async getNonceAndContext(e,t){const{context:r,value:s}=await this.getAccountInfoAndContext(e,t);let i=null;return s!==null&&(i=Oo.fromAccountData(s.data)),{context:r,value:i}}async getNonce(e,t){return await this.getNonceAndContext(e,t).then(r=>r.value).catch(r=>{throw new Error("failed to get nonce for account "+e.toBase58()+": "+r)})}async requestAirdrop(e,t){const r=await this._rpcRequest("requestAirdrop",[e.toBase58(),t]),s=Q(r,p6);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>=tm;if(this._blockhashInfo.latestBlockhash!==null&&!r)return this._blockhashInfo.latestBlockhash}return await this._pollNewBlockhash()}async _pollNewBlockhash(){this._pollingBlockhash=!0;try{const e=Date.now(),t=this._blockhashInfo.latestBlockhash,r=t?t.blockhash:null;for(let s=0;s<50;s++){const i=await this.getLatestBlockhash("finalized");if(r!==i.blockhash)return this._blockhashInfo={latestBlockhash:i,lastFetch:Date.now(),transactionSignatures:[],simulatedSignatures:[]},i;await br(Yh/2)}throw new Error(`Unable to obtain a new blockhash after ${Date.now()-e}ms`)}finally{this._pollingBlockhash=!1}}async getStakeMinimumDelegation(e){const{commitment:t,config:r}=Le(e),s=this._buildArgs([],t,"base64",r),i=await this._rpcRequest("getStakeMinimumDelegation",s),o=Q(i,et(P()));if("error"in o)throw new oe(o.error,"failed to get stake minimum delegation");return o.result}async simulateTransaction(e,t,r){if("message"in e){const S=e.serialize(),T=ae.Buffer.from(S).toString("base64");if(Array.isArray(t)||r!==void 0)throw new Error("Invalid arguments");const M=t||{};M.encoding="base64","commitment"in M||(M.commitment=this.commitment),t&&typeof t=="object"&&"innerInstructions"in t&&(M.innerInstructions=t.innerInstructions);const N=[T,M],_=await this._rpcRequest("simulateTransaction",N),U=Q(_,Eu);if("error"in U)throw new Error("failed to simulate transaction: "+U.error.message);return U.result}let s;if(e instanceof ke){let g=e;s=new ke,s.feePayer=g.feePayer,s.instructions=e.instructions,s.nonceInfo=g.nonceInfo,s.signatures=g.signatures}else s=ke.populate(e),s._message=s._json=void 0;if(t!==void 0&&!Array.isArray(t))throw new Error("Invalid arguments");const i=t;if(s.nonceInfo&&i)s.sign(...i);else{let g=this._disableBlockhashCaching;for(;;){const S=await this._blockhashWithExpiryBlockHeight(g);if(s.lastValidBlockHeight=S.lastValidBlockHeight,s.recentBlockhash=S.blockhash,!i)break;if(s.sign(...i),!s.signature)throw new Error("!signature");const T=s.signature.toString("base64");if(!this._blockhashInfo.simulatedSignatures.includes(T)&&!this._blockhashInfo.transactionSignatures.includes(T)){this._blockhashInfo.simulatedSignatures.push(T);break}else g=!0}}const o=s._compile(),a=o.serialize(),h=s._serialize(a).toString("base64"),b={encoding:"base64",commitment:this.commitment};if(r){const g=(Array.isArray(r)?r:o.nonProgramIds()).map(S=>S.toBase58());b.accounts={encoding:"base64",addresses:g}}i&&(b.sigVerify=!0),t&&typeof t=="object"&&"innerInstructions"in t&&(b.innerInstructions=t.innerInstructions);const w=[h,b],D=await this._rpcRequest("simulateTransaction",w),E=Q(D,Eu);if("error"in E){let g;if("data"in E.error&&(g=E.error.data.logs,g&&Array.isArray(g))){const S=`
15
+ `,T=S+g.join(S);console.error(E.error.message,T)}throw new ts({action:"simulate",signature:"",transactionMessage:E.error.message,logs:g})}return E.result}async sendTransaction(e,t,r){if("version"in e){if(t&&Array.isArray(t))throw new Error("Invalid arguments");const o=e.serialize();return await this.sendRawTransaction(o,t)}if(t===void 0||!Array.isArray(t))throw new Error("Invalid arguments");const s=t;if(e.nonceInfo)e.sign(...s);else{let o=this._disableBlockhashCaching;for(;;){const a=await this._blockhashWithExpiryBlockHeight(o);if(e.lastValidBlockHeight=a.lastValidBlockHeight,e.recentBlockhash=a.blockhash,e.sign(...s),!e.signature)throw new Error("!signature");const c=e.signature.toString("base64");if(this._blockhashInfo.transactionSignatures.includes(c))o=!0;else{this._blockhashInfo.transactionSignatures.push(c);break}}}const i=e.serialize();return await this.sendRawTransaction(i,r)}async sendRawTransaction(e,t){const r=Ae(e).toString("base64");return await this.sendEncodedTransaction(r,t)}async sendEncodedTransaction(e,t){const r={encoding:"base64"},s=t&&t.skipPreflight,i=s===!0?"processed":t&&t.preflightCommitment||this.commitment;t&&t.maxRetries!=null&&(r.maxRetries=t.maxRetries),t&&t.minContextSlot!=null&&(r.minContextSlot=t.minContextSlot),s&&(r.skipPreflight=s),i&&(r.preflightCommitment=i);const o=[e,r],a=await this._rpcRequest("sendTransaction",o),c=Q(a,g6);if("error"in c){let h;throw"data"in c.error&&(h=c.error.data.logs),new ts({action:s?"send":"simulate",signature:"",transactionMessage:c.error.message,logs:h})}return c.result}_wsOnOpen(){this._rpcWebSocketConnected=!0,this._rpcWebSocketHeartbeat=setInterval(()=>{(async()=>{try{await this._rpcWebSocket.notify("ping")}catch{}})()},5e3),this._updateSubscriptions()}_wsOnError(e){this._rpcWebSocketConnected=!1,console.error("ws error:",e.message)}_wsOnClose(e){if(this._rpcWebSocketConnected=!1,this._rpcWebSocketGeneration=(this._rpcWebSocketGeneration+1)%Number.MAX_SAFE_INTEGER,this._rpcWebSocketIdleTimeout&&(clearTimeout(this._rpcWebSocketIdleTimeout),this._rpcWebSocketIdleTimeout=null),this._rpcWebSocketHeartbeat&&(clearInterval(this._rpcWebSocketHeartbeat),this._rpcWebSocketHeartbeat=null),e===1e3){this._updateSubscriptions();return}this._subscriptionCallbacksByServerSubscriptionId={},Object.entries(this._subscriptionsByHash).forEach(([t,r])=>{this._setSubscription(t,{...r,state:"pending"})})}_setSubscription(e,t){var s;const r=(s=this._subscriptionsByHash[e])==null?void 0:s.state;if(this._subscriptionsByHash[e]=t,r!==t.state){const i=this._subscriptionStateChangeCallbacksByHash[e];i&&i.forEach(o=>{try{o(t.state)}catch{}})}}_onSubscriptionStateChange(e,t){var i;const r=this._subscriptionHashByClientSubscriptionId[e];if(r==null)return()=>{};const s=(i=this._subscriptionStateChangeCallbacksByHash)[r]||(i[r]=new Set);return s.add(t),()=>{s.delete(t),s.size===0&&delete this._subscriptionStateChangeCallbacksByHash[r]}}async _updateSubscriptions(){if(Object.keys(this._subscriptionsByHash).length===0){this._rpcWebSocketConnected&&(this._rpcWebSocketConnected=!1,this._rpcWebSocketIdleTimeout=setTimeout(()=>{this._rpcWebSocketIdleTimeout=null;try{this._rpcWebSocket.close()}catch(r){r instanceof Error&&console.log(`Error when closing socket connection: ${r.message}`)}},500));return}if(this._rpcWebSocketIdleTimeout!==null&&(clearTimeout(this._rpcWebSocketIdleTimeout),this._rpcWebSocketIdleTimeout=null,this._rpcWebSocketConnected=!0),!this._rpcWebSocketConnected){this._rpcWebSocket.connect();return}const e=this._rpcWebSocketGeneration,t=()=>e===this._rpcWebSocketGeneration;await Promise.all(Object.keys(this._subscriptionsByHash).map(async r=>{const s=this._subscriptionsByHash[r];if(s!==void 0)switch(s.state){case"pending":case"unsubscribed":if(s.callbacks.size===0){delete this._subscriptionsByHash[r],s.state==="unsubscribed"&&delete this._subscriptionCallbacksByServerSubscriptionId[s.serverSubscriptionId],await this._updateSubscriptions();return}await(async()=>{const{args:i,method:o}=s;try{this._setSubscription(r,{...s,state:"subscribing"});const a=await this._rpcWebSocket.call(o,i);this._setSubscription(r,{...s,serverSubscriptionId:a,state:"subscribed"}),this._subscriptionCallbacksByServerSubscriptionId[a]=s.callbacks,await this._updateSubscriptions()}catch(a){if(console.error(`Received ${a instanceof Error?"":"JSON-RPC "}error calling \`${o}\``,{args:i,error:a}),!t())return;this._setSubscription(r,{...s,state:"pending"}),await this._updateSubscriptions()}})();break;case"subscribed":s.callbacks.size===0&&await(async()=>{const{serverSubscriptionId:i,unsubscribeMethod:o}=s;if(this._subscriptionsAutoDisposedByRpc.has(i))this._subscriptionsAutoDisposedByRpc.delete(i);else{this._setSubscription(r,{...s,state:"unsubscribing"}),this._setSubscription(r,{...s,state:"unsubscribing"});try{await this._rpcWebSocket.call(o,[i])}catch(a){if(a instanceof Error&&console.error(`${o} error:`,a.message),!t())return;this._setSubscription(r,{...s,state:"subscribed"}),await this._updateSubscriptions();return}}this._setSubscription(r,{...s,state:"unsubscribed"}),await this._updateSubscriptions()})();break}}))}_handleServerNotification(e,t){const r=this._subscriptionCallbacksByServerSubscriptionId[e];r!==void 0&&r.forEach(s=>{try{s(...t)}catch(i){console.error(i)}})}_wsOnAccountNotification(e){const{result:t,subscription:r}=Q(e,z4);this._handleServerNotification(r,[t.value,t.context])}_makeSubscription(e,t){const r=this._nextClientSubscriptionId++,s=yu([e.method,t]),i=this._subscriptionsByHash[s];return i===void 0?this._subscriptionsByHash[s]={...e,args:t,callbacks:new Set([e.callback]),state:"pending"}:i.callbacks.add(e.callback),this._subscriptionHashByClientSubscriptionId[r]=s,this._subscriptionDisposeFunctionsByClientSubscriptionId[r]=async()=>{delete this._subscriptionDisposeFunctionsByClientSubscriptionId[r],delete this._subscriptionHashByClientSubscriptionId[r];const o=this._subscriptionsByHash[s];Fe(o!==void 0,`Could not find a \`Subscription\` when tearing down client subscription #${r}`),o.callbacks.delete(e.callback),await this._updateSubscriptions()},this._updateSubscriptions(),r}onAccountChange(e,t,r){const{commitment:s,config:i}=Le(r),o=this._buildArgs([e.toBase58()],s||this._commitment||"finalized","base64",i);return this._makeSubscription({callback:t,method:"accountSubscribe",unsubscribeMethod:"accountUnsubscribe"},o)}async removeAccountChangeListener(e){await this._unsubscribeClientSubscription(e,"account change")}_wsOnProgramAccountNotification(e){const{result:t,subscription:r}=Q(e,q4);this._handleServerNotification(r,[{accountId:t.value.pubkey,accountInfo:t.value.account},t.context])}onProgramAccountChange(e,t,r,s){const{commitment:i,config:o}=Le(r),a=this._buildArgs([e.toBase58()],i||this._commitment||"finalized","base64",o||(s?{filters:wu(s)}:void 0));return this._makeSubscription({callback:t,method:"programSubscribe",unsubscribeMethod:"programUnsubscribe"},a)}async removeProgramAccountChangeListener(e){await this._unsubscribeClientSubscription(e,"program account change")}onLogs(e,t,r){const s=this._buildArgs([typeof e=="object"?{mentions:[e.toString()]}:e],r||this._commitment||"finalized");return this._makeSubscription({callback:t,method:"logsSubscribe",unsubscribeMethod:"logsUnsubscribe"},s)}async removeOnLogsListener(e){await this._unsubscribeClientSubscription(e,"logs")}_wsOnLogsNotification(e){const{result:t,subscription:r}=Q(e,A6);this._handleServerNotification(r,[t.value,t.context])}_wsOnSlotNotification(e){const{result:t,subscription:r}=Q(e,j4);this._handleServerNotification(r,[t])}onSlotChange(e){return this._makeSubscription({callback:e,method:"slotSubscribe",unsubscribeMethod:"slotUnsubscribe"},[])}async removeSlotChangeListener(e){await this._unsubscribeClientSubscription(e,"slot change")}_wsOnSlotUpdatesNotification(e){const{result:t,subscription:r}=Q(e,V4);this._handleServerNotification(r,[t])}onSlotUpdate(e){return this._makeSubscription({callback:e,method:"slotsUpdatesSubscribe",unsubscribeMethod:"slotsUpdatesUnsubscribe"},[])}async removeSlotUpdateListener(e){await this._unsubscribeClientSubscription(e,"slot update")}async _unsubscribeClientSubscription(e,t){const r=this._subscriptionDisposeFunctionsByClientSubscriptionId[e];r?await r():console.warn(`Ignored unsubscribe request because an active subscription with id \`${e}\` for '${t}' events could not be found.`)}_buildArgs(e,t,r,s){const i=t||this._commitment;if(i||r||s){let o={};r&&(o.encoding=r),i&&(o.commitment=i),s&&(o=Object.assign(o,s)),e.push(o)}return e}_buildArgsAtLeastConfirmed(e,t,r,s){const i=t||this._commitment;if(i&&!["confirmed","finalized"].includes(i))throw new Error("Using Connection with default commitment: `"+this._commitment+"`, but method requires at least `confirmed`");return this._buildArgs(e,t,r,s)}_wsOnSignatureNotification(e){const{result:t,subscription:r}=Q(e,G4);t.value!=="receivedSignature"&&this._subscriptionsAutoDisposedByRpc.add(r),this._handleServerNotification(r,t.value==="receivedSignature"?[{type:"received"},t.context]:[{type:"status",result:t.value},t.context])}onSignature(e,t,r){const s=this._buildArgs([e],r||this._commitment||"finalized"),i=this._makeSubscription({callback:(o,a)=>{if(o.type==="status"){t(o.result,a);try{this.removeSignatureListener(i)}catch{}}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},s);return i}onSignatureWithOptions(e,t,r){const{commitment:s,...i}={...r,commitment:r&&r.commitment||this._commitment||"finalized"},o=this._buildArgs([e],s,void 0,i),a=this._makeSubscription({callback:(c,h)=>{t(c,h);try{this.removeSignatureListener(a)}catch{}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},o);return a}async removeSignatureListener(e){await this._unsubscribeClientSubscription(e,"signature result")}_wsOnRootNotification(e){const{result:t,subscription:r}=Q(e,Y4);this._handleServerNotification(r,[t])}onRootChange(e){return this._makeSubscription({callback:e,method:"rootSubscribe",unsubscribeMethod:"rootUnsubscribe"},[])}async removeRootChangeListener(e){await this._unsubscribeClientSubscription(e,"root change")}}class Sr{constructor(e){this._keypair=void 0,this._keypair=e??mu()}static generate(){return new Sr(mu())}static fromSecretKey(e,t){if(e.byteLength!==64)throw new Error("bad secret key size");const r=e.slice(32,64);if(!t||!t.skipValidation){const s=e.slice(0,32),i=no(s);for(let o=0;o<32;o++)if(r[o]!==i[o])throw new Error("provided secretKey is invalid")}return new Sr({publicKey:r,secretKey:e})}static fromSeed(e){const t=no(e),r=new Uint8Array(64);return r.set(e),r.set(t,32),new Sr({publicKey:t,secretKey:r})}get publicKey(){return new X(this._keypair.publicKey)}get secretKey(){return new Uint8Array(this._keypair.secretKey)}}const Kn=Object.freeze({CreateLookupTable:{index:0,layout:exports.struct([exports.u32("instruction"),ns("recentSlot"),exports.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:exports.struct([exports.u32("instruction")])},ExtendLookupTable:{index:2,layout:exports.struct([exports.u32("instruction"),ns(),exports.seq(xe(),or(exports.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:exports.struct([exports.u32("instruction")])},CloseLookupTable:{index:4,layout:exports.struct([exports.u32("instruction")])}});class E6{constructor(){}static decodeInstructionType(e){this.checkProgramId(e.programId);const r=exports.u32("instruction").decode(e.data);let s;for(const[i,o]of Object.entries(Kn))if(o.index==r){s=i;break}if(!s)throw new Error("Invalid Instruction. Should be a LookupTable Instruction");return s}static decodeCreateLookupTable(e){this.checkProgramId(e.programId),this.checkKeysLength(e.keys,4);const{recentSlot:t}=Ie(Kn.CreateLookupTable,e.data);return{authority:e.keys[1].pubkey,payer:e.keys[2].pubkey,recentSlot:Number(t)}}static decodeExtendLookupTable(e){if(this.checkProgramId(e.programId),e.keys.length<2)throw new Error(`invalid instruction; found ${e.keys.length} keys, expected at least 2`);const{addresses:t}=Ie(Kn.ExtendLookupTable,e.data);return{lookupTable:e.keys[0].pubkey,authority:e.keys[1].pubkey,payer:e.keys.length>2?e.keys[2].pubkey:void 0,addresses:t.map(r=>new X(r))}}static decodeCloseLookupTable(e){return this.checkProgramId(e.programId),this.checkKeysLength(e.keys,3),{lookupTable:e.keys[0].pubkey,authority:e.keys[1].pubkey,recipient:e.keys[2].pubkey}}static decodeFreezeLookupTable(e){return this.checkProgramId(e.programId),this.checkKeysLength(e.keys,2),{lookupTable:e.keys[0].pubkey,authority:e.keys[1].pubkey}}static decodeDeactivateLookupTable(e){return this.checkProgramId(e.programId),this.checkKeysLength(e.keys,2),{lookupTable:e.keys[0].pubkey,authority:e.keys[1].pubkey}}static checkProgramId(e){if(!e.equals(Ho.programId))throw new Error("invalid instruction; programId is not AddressLookupTable Program")}static checkKeysLength(e,t){if(e.length<t)throw new Error(`invalid instruction; found ${e.length} keys, expected at least ${t}`)}}class Ho{constructor(){}static createLookupTable(e){const[t,r]=X.findProgramAddressSync([e.authority.toBuffer(),Tl(BigInt(e.recentSlot),8)],this.programId),s=Kn.CreateLookupTable,i=Ce(s,{recentSlot:BigInt(e.recentSlot),bumpSeed:r}),o=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1},{pubkey:e.payer,isSigner:!0,isWritable:!0},{pubkey:Et.programId,isSigner:!1,isWritable:!1}];return[new Me({programId:this.programId,keys:o,data:i}),t]}static freezeLookupTable(e){const t=Kn.FreezeLookupTable,r=Ce(t),s=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return new Me({programId:this.programId,keys:s,data:r})}static extendLookupTable(e){const t=Kn.ExtendLookupTable,r=Ce(t,{addresses:e.addresses.map(i=>i.toBytes())}),s=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return e.payer&&s.push({pubkey:e.payer,isSigner:!0,isWritable:!0},{pubkey:Et.programId,isSigner:!1,isWritable:!1}),new Me({programId:this.programId,keys:s,data:r})}static deactivateLookupTable(e){const t=Kn.DeactivateLookupTable,r=Ce(t),s=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return new Me({programId:this.programId,keys:s,data:r})}static closeLookupTable(e){const t=Kn.CloseLookupTable,r=Ce(t),s=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1},{pubkey:e.recipient,isSigner:!1,isWritable:!0}];return new Me({programId:this.programId,keys:s,data:r})}}Ho.programId=new X("AddressLookupTab1e1111111111111111111111111");class B6{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(Cn))if(o.index==r){s=i;break}if(!s)throw new Error("Instruction type incorrect; not a ComputeBudgetInstruction");return s}static decodeRequestUnits(e){this.checkProgramId(e.programId);const{units:t,additionalFee:r}=Ie(Cn.RequestUnits,e.data);return{units:t,additionalFee:r}}static decodeRequestHeapFrame(e){this.checkProgramId(e.programId);const{bytes:t}=Ie(Cn.RequestHeapFrame,e.data);return{bytes:t}}static decodeSetComputeUnitLimit(e){this.checkProgramId(e.programId);const{units:t}=Ie(Cn.SetComputeUnitLimit,e.data);return{units:t}}static decodeSetComputeUnitPrice(e){this.checkProgramId(e.programId);const{microLamports:t}=Ie(Cn.SetComputeUnitPrice,e.data);return{microLamports:t}}static checkProgramId(e){if(!e.equals(qo.programId))throw new Error("invalid instruction; programId is not ComputeBudgetProgram")}}const Cn=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"),ns("microLamports")])}});class qo{constructor(){}static requestUnits(e){const t=Cn.RequestUnits,r=Ce(t,e);return new Me({keys:[],programId:this.programId,data:r})}static requestHeapFrame(e){const t=Cn.RequestHeapFrame,r=Ce(t,e);return new Me({keys:[],programId:this.programId,data:r})}static setComputeUnitLimit(e){const t=Cn.SetComputeUnitLimit,r=Ce(t,e);return new Me({keys:[],programId:this.programId,data:r})}static setComputeUnitPrice(e){const t=Cn.SetComputeUnitPrice,r=Ce(t,{microLamports:BigInt(e.microLamports)});return new Me({keys:[],programId:this.programId,data:r})}}qo.programId=new X("ComputeBudget111111111111111111111111111111");const Cu=64,Su=32,Du=64,vu=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 Ko{constructor(){}static createInstructionWithPublicKey(e){const{publicKey:t,message:r,signature:s,instructionIndex:i}=e;Fe(t.length===Su,`Public Key must be ${Su} bytes but received ${t.length} bytes`),Fe(s.length===Du,`Signature must be ${Du} bytes but received ${s.length} bytes`);const o=vu.span,a=o+t.length,c=a+s.length,h=1,b=ae.Buffer.alloc(c+r.length),w=i??65535;return vu.encode({numSignatures:h,padding:0,signatureOffset:a,signatureInstructionIndex:w,publicKeyOffset:o,publicKeyInstructionIndex:w,messageDataOffset:c,messageDataSize:r.length,messageInstructionIndex:w},b),b.fill(t,o),b.fill(s,a),b.fill(r,c),new Me({keys:[],programId:Ko.programId,data:b})}static createInstructionWithPrivateKey(e){const{privateKey:t,message:r,instructionIndex:s}=e;Fe(t.length===Cu,`Private key must be ${Cu} bytes but received ${t.length} bytes`);try{const i=Sr.fromSecretKey(t),o=i.publicKey.toBytes(),a=Rl(r,i.secretKey);return this.createInstructionWithPublicKey({publicKey:o,message:r,signature:a,instructionIndex:s})}catch(i){throw new Error(`Error creating instruction; ${i}`)}}}Ko.programId=new X("Ed25519SigVerify111111111111111111111111111");const x6=(n,e)=>{const t=er.sign(n,e);return[t.toCompactRawBytes(),t.recovery]};er.utils.isValidPrivateKey;const C6=er.getPublicKey,ku=32,Na=20,Fu=64,S6=11,za=exports.struct([exports.u8("numSignatures"),exports.u16("signatureOffset"),exports.u8("signatureInstructionIndex"),exports.u16("ethAddressOffset"),exports.u8("ethAddressInstructionIndex"),exports.u16("messageDataOffset"),exports.u16("messageDataSize"),exports.u8("messageInstructionIndex"),exports.blob(20,"ethAddress"),exports.blob(64,"signature"),exports.u8("recoveryId")]);class Dr{constructor(){}static publicKeyToEthAddress(e){Fe(e.length===Fu,`Public key must be ${Fu} bytes but received ${e.length} bytes`);try{return ae.Buffer.from(Ps(Ae(e))).slice(-Na)}catch(t){throw new Error(`Error constructing Ethereum address: ${t}`)}}static createInstructionWithPublicKey(e){const{publicKey:t,message:r,signature:s,recoveryId:i,instructionIndex:o}=e;return Dr.createInstructionWithEthAddress({ethAddress:Dr.publicKeyToEthAddress(t),message:r,signature:s,recoveryId:i,instructionIndex:o})}static createInstructionWithEthAddress(e){const{ethAddress:t,message:r,signature:s,recoveryId:i,instructionIndex:o=0}=e;let a;typeof t=="string"?t.startsWith("0x")?a=ae.Buffer.from(t.substr(2),"hex"):a=ae.Buffer.from(t,"hex"):a=t,Fe(a.length===Na,`Address must be ${Na} bytes but received ${a.length} bytes`);const c=1+S6,h=c,b=c+a.length,w=b+s.length+1,D=1,E=ae.Buffer.alloc(za.span+r.length);return za.encode({numSignatures:D,signatureOffset:b,signatureInstructionIndex:o,ethAddressOffset:h,ethAddressInstructionIndex:o,messageDataOffset:w,messageDataSize:r.length,messageInstructionIndex:o,signature:Ae(s),ethAddress:Ae(a),recoveryId:i},E),E.fill(Ae(r),za.span),new Me({keys:[],programId:Dr.programId,data:E})}static createInstructionWithPrivateKey(e){const{privateKey:t,message:r,instructionIndex:s}=e;Fe(t.length===ku,`Private key must be ${ku} bytes but received ${t.length} bytes`);try{const i=Ae(t),o=C6(i,!1).slice(1),a=ae.Buffer.from(Ps(Ae(r))),[c,h]=x6(a,i);return this.createInstructionWithPublicKey({publicKey:o,message:r,signature:c,recoveryId:h,instructionIndex:s})}catch(i){throw new Error(`Error creating instruction; ${i}`)}}}Dr.programId=new X("KeccakSecp256k11111111111111111111111111111");var fm;const hm=new X("StakeConfig11111111111111111111111111111111");class mm{constructor(e,t){this.staker=void 0,this.withdrawer=void 0,this.staker=e,this.withdrawer=t}}class ui{constructor(e,t,r){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=e,this.epoch=t,this.custodian=r}}fm=ui;ui.default=new fm(0,0,X.default);class D6{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(St))if(o.index==r){s=i;break}if(!s)throw new Error("Instruction type incorrect; not a StakeInstruction");return s}static decodeInitialize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{authorized:t,lockup:r}=Ie(St.Initialize,e.data);return{stakePubkey:e.keys[0].pubkey,authorized:new mm(new X(t.staker),new X(t.withdrawer)),lockup:new ui(r.unixTimestamp,r.epoch,new X(r.custodian))}}static decodeDelegate(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,6),Ie(St.Delegate,e.data),{stakePubkey:e.keys[0].pubkey,votePubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[5].pubkey}}static decodeAuthorize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{newAuthorized:t,stakeAuthorizationType:r}=Ie(St.Authorize,e.data),s={stakePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey,newAuthorizedPubkey:new X(t),stakeAuthorizationType:{index:r}};return e.keys.length>3&&(s.custodianPubkey=e.keys[3].pubkey),s}static decodeAuthorizeWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{newAuthorized:t,stakeAuthorizationType:r,authoritySeed:s,authorityOwner:i}=Ie(St.AuthorizeWithSeed,e.data),o={stakePubkey:e.keys[0].pubkey,authorityBase:e.keys[1].pubkey,authoritySeed:s,authorityOwner:new X(i),newAuthorizedPubkey:new X(t),stakeAuthorizationType:{index:r}};return e.keys.length>3&&(o.custodianPubkey=e.keys[3].pubkey),o}static decodeSplit(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{lamports:t}=Ie(St.Split,e.data);return{stakePubkey:e.keys[0].pubkey,splitStakePubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[2].pubkey,lamports:t}}static decodeMerge(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),Ie(St.Merge,e.data),{stakePubkey:e.keys[0].pubkey,sourceStakePubKey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey}}static decodeWithdraw(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,5);const{lamports:t}=Ie(St.Withdraw,e.data),r={stakePubkey:e.keys[0].pubkey,toPubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey,lamports:t};return e.keys.length>5&&(r.custodianPubkey=e.keys[5].pubkey),r}static decodeDeactivate(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),Ie(St.Deactivate,e.data),{stakePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey}}static checkProgramId(e){if(!e.equals(jo.programId))throw new Error("invalid instruction; programId is not StakeProgram")}static checkKeyLength(e,t){if(e.length<t)throw new Error(`invalid instruction; found ${e.length} keys, expected at least ${t}`)}}const St=Object.freeze({Initialize:{index:0,layout:exports.struct([exports.u32("instruction"),T3(),I3()])},Authorize:{index:1,layout:exports.struct([exports.u32("instruction"),xe("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"),xe("newAuthorized"),exports.u32("stakeAuthorizationType"),Er("authoritySeed"),xe("authorityOwner")])}}),v6=Object.freeze({Staker:{index:0},Withdrawer:{index:1}});class jo{constructor(){}static initialize(e){const{stakePubkey:t,authorized:r,lockup:s}=e,i=s||ui.default,o=St.Initialize,a=Ce(o,{authorized:{staker:Ae(r.staker.toBuffer()),withdrawer:Ae(r.withdrawer.toBuffer())},lockup:{unixTimestamp:i.unixTimestamp,epoch:i.epoch,custodian:Ae(i.custodian.toBuffer())}}),c={keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:Ir,isSigner:!1,isWritable:!1}],programId:this.programId,data:a};return new Me(c)}static createAccountWithSeed(e){const t=new ke;t.add(Et.createAccountWithSeed({fromPubkey:e.fromPubkey,newAccountPubkey:e.stakePubkey,basePubkey:e.basePubkey,seed:e.seed,lamports:e.lamports,space:this.space,programId:this.programId}));const{stakePubkey:r,authorized:s,lockup:i}=e;return t.add(this.initialize({stakePubkey:r,authorized:s,lockup:i}))}static createAccount(e){const t=new ke;t.add(Et.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.stakePubkey,lamports:e.lamports,space:this.space,programId:this.programId}));const{stakePubkey:r,authorized:s,lockup:i}=e;return t.add(this.initialize({stakePubkey:r,authorized:s,lockup:i}))}static delegate(e){const{stakePubkey:t,authorizedPubkey:r,votePubkey:s}=e,i=St.Delegate,o=Ce(i);return new ke().add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!1},{pubkey:dn,isSigner:!1,isWritable:!1},{pubkey:Ri,isSigner:!1,isWritable:!1},{pubkey:hm,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:o})}static authorize(e){const{stakePubkey:t,authorizedPubkey:r,newAuthorizedPubkey:s,stakeAuthorizationType:i,custodianPubkey:o}=e,a=St.Authorize,c=Ce(a,{newAuthorized:Ae(s.toBuffer()),stakeAuthorizationType:i.index}),h=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:dn,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}];return o&&h.push({pubkey:o,isSigner:!0,isWritable:!1}),new ke().add({keys:h,programId:this.programId,data:c})}static authorizeWithSeed(e){const{stakePubkey:t,authorityBase:r,authoritySeed:s,authorityOwner:i,newAuthorizedPubkey:o,stakeAuthorizationType:a,custodianPubkey:c}=e,h=St.AuthorizeWithSeed,b=Ce(h,{newAuthorized:Ae(o.toBuffer()),stakeAuthorizationType:a.index,authoritySeed:s,authorityOwner:Ae(i.toBuffer())}),w=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1},{pubkey:dn,isSigner:!1,isWritable:!1}];return c&&w.push({pubkey:c,isSigner:!0,isWritable:!1}),new ke().add({keys:w,programId:this.programId,data:b})}static splitInstruction(e){const{stakePubkey:t,authorizedPubkey:r,splitStakePubkey:s,lamports:i}=e,o=St.Split,a=Ce(o,{lamports:i});return new Me({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:a})}static split(e,t){const r=new ke;return r.add(Et.createAccount({fromPubkey:e.authorizedPubkey,newAccountPubkey:e.splitStakePubkey,lamports:t,space:this.space,programId:this.programId})),r.add(this.splitInstruction(e))}static splitWithSeed(e,t){const{stakePubkey:r,authorizedPubkey:s,splitStakePubkey:i,basePubkey:o,seed:a,lamports:c}=e,h=new ke;return h.add(Et.allocate({accountPubkey:i,basePubkey:o,seed:a,space:this.space,programId:this.programId})),t&&t>0&&h.add(Et.transfer({fromPubkey:e.authorizedPubkey,toPubkey:i,lamports:t})),h.add(this.splitInstruction({stakePubkey:r,authorizedPubkey:s,splitStakePubkey:i,lamports:c}))}static merge(e){const{stakePubkey:t,sourceStakePubKey:r,authorizedPubkey:s}=e,i=St.Merge,o=Ce(i);return new ke().add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:dn,isSigner:!1,isWritable:!1},{pubkey:Ri,isSigner:!1,isWritable:!1},{pubkey:s,isSigner:!0,isWritable:!1}],programId:this.programId,data:o})}static withdraw(e){const{stakePubkey:t,authorizedPubkey:r,toPubkey:s,lamports:i,custodianPubkey:o}=e,a=St.Withdraw,c=Ce(a,{lamports:i}),h=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:dn,isSigner:!1,isWritable:!1},{pubkey:Ri,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return o&&h.push({pubkey:o,isSigner:!0,isWritable:!1}),new ke().add({keys:h,programId:this.programId,data:c})}static deactivate(e){const{stakePubkey:t,authorizedPubkey:r}=e,s=St.Deactivate,i=Ce(s);return new ke().add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:dn,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:i})}}jo.programId=new X("Stake11111111111111111111111111111111111111");jo.space=200;class bm{constructor(e,t,r,s){this.nodePubkey=void 0,this.authorizedVoter=void 0,this.authorizedWithdrawer=void 0,this.commission=void 0,this.nodePubkey=e,this.authorizedVoter=t,this.authorizedWithdrawer=r,this.commission=s}}class k6{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(Sn))if(o.index==r){s=i;break}if(!s)throw new Error("Instruction type incorrect; not a VoteInstruction");return s}static decodeInitializeAccount(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,4);const{voteInit:t}=Ie(Sn.InitializeAccount,e.data);return{votePubkey:e.keys[0].pubkey,nodePubkey:e.keys[3].pubkey,voteInit:new bm(new X(t.nodePubkey),new X(t.authorizedVoter),new X(t.authorizedWithdrawer),t.commission)}}static decodeAuthorize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{newAuthorized:t,voteAuthorizationType:r}=Ie(Sn.Authorize,e.data);return{votePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey,newAuthorizedPubkey:new X(t),voteAuthorizationType:{index:r}}}static decodeAuthorizeWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{voteAuthorizeWithSeedArgs:{currentAuthorityDerivedKeyOwnerPubkey:t,currentAuthorityDerivedKeySeed:r,newAuthorized:s,voteAuthorizationType:i}}=Ie(Sn.AuthorizeWithSeed,e.data);return{currentAuthorityDerivedKeyBasePubkey:e.keys[2].pubkey,currentAuthorityDerivedKeyOwnerPubkey:new X(t),currentAuthorityDerivedKeySeed:r,newAuthorizedPubkey:new X(s),voteAuthorizationType:{index:i},votePubkey:e.keys[0].pubkey}}static decodeWithdraw(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{lamports:t}=Ie(Sn.Withdraw,e.data);return{votePubkey:e.keys[0].pubkey,authorizedWithdrawerPubkey:e.keys[2].pubkey,lamports:t,toPubkey:e.keys[1].pubkey}}static checkProgramId(e){if(!e.equals(As.programId))throw new Error("invalid instruction; programId is not VoteProgram")}static checkKeyLength(e,t){if(e.length<t)throw new Error(`invalid instruction; found ${e.length} keys, expected at least ${t}`)}}const Sn=Object.freeze({InitializeAccount:{index:0,layout:exports.struct([exports.u32("instruction"),U3()])},Authorize:{index:1,layout:exports.struct([exports.u32("instruction"),xe("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"),_3()])}}),F6=Object.freeze({Voter:{index:0},Withdrawer:{index:1}});class As{constructor(){}static initializeAccount(e){const{votePubkey:t,nodePubkey:r,voteInit:s}=e,i=Sn.InitializeAccount,o=Ce(i,{voteInit:{nodePubkey:Ae(s.nodePubkey.toBuffer()),authorizedVoter:Ae(s.authorizedVoter.toBuffer()),authorizedWithdrawer:Ae(s.authorizedWithdrawer.toBuffer()),commission:s.commission}}),a={keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:Ir,isSigner:!1,isWritable:!1},{pubkey:dn,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:o};return new Me(a)}static createAccount(e){const t=new ke;return t.add(Et.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.votePubkey,lamports:e.lamports,space:this.space,programId:this.programId})),t.add(this.initializeAccount({votePubkey:e.votePubkey,nodePubkey:e.voteInit.nodePubkey,voteInit:e.voteInit}))}static authorize(e){const{votePubkey:t,authorizedPubkey:r,newAuthorizedPubkey:s,voteAuthorizationType:i}=e,o=Sn.Authorize,a=Ce(o,{newAuthorized:Ae(s.toBuffer()),voteAuthorizationType:i.index}),c=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:dn,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return new ke().add({keys:c,programId:this.programId,data:a})}static authorizeWithSeed(e){const{currentAuthorityDerivedKeyBasePubkey:t,currentAuthorityDerivedKeyOwnerPubkey:r,currentAuthorityDerivedKeySeed:s,newAuthorizedPubkey:i,voteAuthorizationType:o,votePubkey:a}=e,c=Sn.AuthorizeWithSeed,h=Ce(c,{voteAuthorizeWithSeedArgs:{currentAuthorityDerivedKeyOwnerPubkey:Ae(r.toBuffer()),currentAuthorityDerivedKeySeed:s,newAuthorized:Ae(i.toBuffer()),voteAuthorizationType:o.index}}),b=[{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:dn,isSigner:!1,isWritable:!1},{pubkey:t,isSigner:!0,isWritable:!1}];return new ke().add({keys:b,programId:this.programId,data:h})}static withdraw(e){const{votePubkey:t,authorizedWithdrawerPubkey:r,lamports:s,toPubkey:i}=e,o=Sn.Withdraw,a=Ce(o,{lamports:s}),c=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}];return new ke().add({keys:c,programId:this.programId,data:a})}static safeWithdraw(e,t,r){if(e.lamports>t-r)throw new Error("Withdraw will leave vote account with insufficient funds.");return As.withdraw(e)}static updateValidatorIdentity(e){const{votePubkey:t,authorizedWithdrawerPubkey:r,nodePubkey:s}=e,i=Sn.UpdateValidatorIdentity,o=Ce(i),a=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!0,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return new ke().add({keys:a,programId:this.programId,data:o})}}As.programId=new X("Vote111111111111111111111111111111111111111");As.space=3762;const pm=new X("Va1idator1nfo111111111111111111111111111111"),T6=j({name:Z(),website:le(Z()),details:le(Z()),iconUrl:le(Z()),keybaseUsername:le(Z())});class Hl{constructor(e,t){this.key=void 0,this.info=void 0,this.key=e,this.info=t}static fromConfigData(e){let t=[...e];if($t(t)!==2)return null;const s=[];for(let i=0;i<2;i++){const o=new X(Vt(t,0,vn)),a=xn(t)===1;s.push({publicKey:o,isSigner:a})}if(s[0].publicKey.equals(pm)&&s[1].isSigner){const i=Er().decode(ae.Buffer.from(t)),o=JSON.parse(i);return Rh(o,T6),new Hl(s[1].publicKey,o)}return null}}const I6=new X("Vote111111111111111111111111111111111111111"),U6=exports.struct([xe("nodePubkey"),xe("authorizedWithdrawer"),exports.u8("commission"),kt(),exports.seq(exports.struct([kt("slot"),exports.u32("confirmationCount")]),or(exports.u32(),-8),"votes"),exports.u8("rootSlotValid"),kt("rootSlot"),kt(),exports.seq(exports.struct([kt("epoch"),xe("authorizedVoter")]),or(exports.u32(),-8),"authorizedVoters"),exports.struct([exports.seq(exports.struct([xe("authorizedPubkey"),kt("epochOfLastAuthorizedSwitch"),kt("targetEpoch")]),32,"buf"),kt("idx"),exports.u8("isEmpty")],"priorVoters"),kt(),exports.seq(exports.struct([kt("epoch"),kt("credits"),kt("prevCredits")]),or(exports.u32(),-8),"epochCredits"),exports.struct([kt("slot"),kt("timestamp")],"lastTimestamp")]);class ql{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=U6.decode(Ae(e),4);let s=r.rootSlot;return r.rootSlotValid||(s=null),new ql({nodePubkey:new X(r.nodePubkey),authorizedWithdrawer:new X(r.authorizedWithdrawer),commission:r.commission,votes:r.votes,rootSlot:s,authorizedVoters:r.authorizedVoters.map(_6),priorVoters:M6(r.priorVoters),epochCredits:r.epochCredits,lastTimestamp:r.lastTimestamp})}}function _6({authorizedVoter:n,epoch:e}){return{epoch:e,authorizedVoter:new X(n)}}function Tu({authorizedPubkey:n,epochOfLastAuthorizedSwitch:e,targetEpoch:t}){return{authorizedPubkey:new X(n),epochOfLastAuthorizedSwitch:e,targetEpoch:t}}function M6({buf:n,idx:e,isEmpty:t}){return t?[]:[...n.slice(e+1).map(Tu),...n.slice(0,e).map(Tu)]}const Iu={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 gm(n,e){const t=e===!1?"http":"https";if(!n)return Iu[t].devnet;const r=Iu[t][n];if(!r)throw new Error(`Unknown ${t} cluster: ${n}`);return r}async function R6(n,e,t,r){let s,i;t&&Object.prototype.hasOwnProperty.call(t,"lastValidBlockHeight")||t&&Object.prototype.hasOwnProperty.call(t,"nonceValue")?(s=t,i=r):i=t;const o=i&&{skipPreflight:i.skipPreflight,preflightCommitment:i.preflightCommitment||i.commitment,minContextSlot:i.minContextSlot},a=await n.sendRawTransaction(e,o),c=i&&i.commitment,b=(await(s?n.confirmTransaction(s,c):n.confirmTransaction(a,c))).value;if(b.err)throw a!=null?new ts({action:o!=null&&o.skipPreflight?"send":"simulate",signature:a,transactionMessage:`Status: (${JSON.stringify(b)})`}):new Error(`Raw transaction ${a} failed (${JSON.stringify(b)})`);return a}const ym=1e9,W6=Object.freeze(Object.defineProperty({__proto__:null,Account:v3,AddressLookupTableAccount:ro,AddressLookupTableInstruction:E6,AddressLookupTableProgram:Ho,Authorized:mm,BLOCKHASH_CACHE_TIMEOUT_MS:tm,BPF_LOADER_DEPRECATED_PROGRAM_ID:k3,BPF_LOADER_PROGRAM_ID:V3,BpfLoader:G3,COMPUTE_BUDGET_INSTRUCTION_LAYOUTS:Cn,ComputeBudgetInstruction:B6,ComputeBudgetProgram:qo,Connection:um,Ed25519Program:Ko,Enum:S3,EpochSchedule:Qh,FeeCalculatorLayout:Zh,Keypair:Sr,LAMPORTS_PER_SOL:ym,LOOKUP_TABLE_INSTRUCTION_LAYOUTS:Kn,Loader:Ur,Lockup:ui,MAX_SEED_LENGTH:$h,Message:cn,MessageAccountKeys:Gs,MessageV0:lr,NONCE_ACCOUNT_LENGTH:Dc,NonceAccount:Oo,PACKET_DATA_SIZE:ar,PUBLIC_KEY_LENGTH:vn,PublicKey:X,SIGNATURE_LENGTH_IN_BYTES:Vs,SOLANA_SCHEMA:_s,STAKE_CONFIG_ID:hm,STAKE_INSTRUCTION_LAYOUTS:St,SYSTEM_INSTRUCTION_LAYOUTS:Oe,SYSVAR_CLOCK_PUBKEY:dn,SYSVAR_EPOCH_SCHEDULE_PUBKEY:L3,SYSVAR_INSTRUCTIONS_PUBKEY:Xh,SYSVAR_RECENT_BLOCKHASHES_PUBKEY:Mi,SYSVAR_RENT_PUBKEY:Ir,SYSVAR_REWARDS_PUBKEY:O3,SYSVAR_SLOT_HASHES_PUBKEY:N3,SYSVAR_SLOT_HISTORY_PUBKEY:z3,SYSVAR_STAKE_HISTORY_PUBKEY:Ri,Secp256k1Program:Dr,SendTransactionError:ts,SolanaJSONRPCError:oe,SolanaJSONRPCErrorCode:H3,StakeAuthorizationLayout:v6,StakeInstruction:D6,StakeProgram:jo,Struct:Wl,SystemInstruction:j3,SystemProgram:Et,Transaction:ke,TransactionExpiredBlockheightExceededError:Ro,TransactionExpiredNonceInvalidError:jr,TransactionExpiredTimeoutError:Pl,TransactionInstruction:Me,TransactionMessage:Po,TransactionStatus:Nn,VALIDATOR_INFO_KEY:pm,VERSION_PREFIX_MASK:Mo,VOTE_PROGRAM_ID:I6,ValidatorInfo:Hl,VersionedMessage:Ll,VersionedTransaction:Lo,VoteAccount:ql,VoteAuthorizationLayout:F6,VoteInit:bm,VoteInstruction:k6,VoteProgram:As,clusterApiUrl:gm,sendAndConfirmRawTransaction:R6,sendAndConfirmTransaction:Sc},Symbol.toStringTag,{value:"Module"})),Kl="Solana",P6="11111111111111111111111111111111",pr=class pr{constructor(e){se(this,"type","Native");se(this,"address");pr.instanceof(e)?this.address=e.address:Ot.instanceof(e)?this.address=new X(e.toUint8Array()):typeof e=="string"&&Tt.valid(e)?this.address=new X(Tt.decode(e)):this.address=new X(e)}unwrap(){return this.address}toString(){return this.address.toBase58()}toUint8Array(){return new Uint8Array(this.address.toBytes())}toNative(){return this}toUniversalAddress(){return new Ot(this.toUint8Array())}static instanceof(e){return e.constructor.platform===pr.platform}equals(e){return pr.instanceof(e)?e.unwrap().equals(this.unwrap()):this.toUniversalAddress().equals(e)}};se(pr,"byteSize",32),se(pr,"platform",Kl);let io=pr;el(Kl,io);exports.AddressLookupTableAccount=ro;exports.AddressLookupTableProgram=Ho;exports.AutomaticRoute=P0;exports.BN=wc;exports.CircleTransfer=xt;exports.ComputeBudgetProgram=qo;exports.Connection=um;exports.DEFAULT_TASK_TIMEOUT=Bn;exports.ErrNotWrapped=Hp;exports.EventEmitter=Ml;exports.EvmAddress=Yi;exports.EvmZeroAddress=h8;exports.Field=us;exports.FinalizableRoute=n2;exports.FpInvertBatch=po;exports.FpLegendre=nc;exports.FpPow=Lf;exports.Hash=V0;exports.Hash$1=mo;exports.HashMD=jc;exports.Keypair=Sr;exports.LAMPORTS_PER_SOL=ym;exports.ManualRoute=yc;exports.Message=cn;exports.MessageV0=lr;exports.PlatformNativeSigner=kp;exports.PublicKey=X;exports.Route=vo;exports.RouteResolver=W0;exports.RpcClient=qh;exports.SYSVAR_CLOCK_PUBKEY=dn;exports.SYSVAR_INSTRUCTIONS_PUBKEY=Xh;exports.SYSVAR_RENT_PUBKEY=Ir;exports.Secp256k1Program=Dr;exports.SendTransactionError=ts;exports.SolanaAddress=io;exports.SolanaZeroAddress=P6;exports.SystemProgram=Et;exports.TokenTransfer=At;exports.Transaction=ke;exports.TransactionExpiredBlockheightExceededError=Ro;exports.TransactionInstruction=Me;exports.TransactionMessage=Po;exports.UniversalAddress=Ot;exports.VersionedTransaction=Lo;exports.Wormhole=sn;exports._platform=wl;exports._platform$1=Kl;exports.abytes=Tn;exports.abytes$1=bo;exports.add=pn;exports.add3H=Ef;exports.add3L=wf;exports.addChainId=f8;exports.addFixedValues=$m;exports.addFrom=u8;exports.aexists=Fr;exports.ahash=ff;exports.amountItem=Ge;exports.anumber=Xr;exports.aoutput=Hc;exports.applyChainsConfigConfigOverrides=Iy;exports.assert=Un;exports.assertArgument=tr;exports.assertArgumentCount=a2;exports.assertNormalize=l2;exports.assertPrivate=d2;exports.asyncLoop=x2;exports.axios=ve;exports.b58=Xu;exports.b64=fo;exports.bech32=Gu;exports.bignum=Ts;exports.bitGet=Ub;exports.bitLen=_f;exports.bitMask=ri;exports.bnExports=ml;exports.bound=Wm;exports.browserExports=Pu;exports.bs58=Dt;exports.bufferPolyfill=ae;exports.bytes=Nt;exports.bytes$1=pl;exports.bytesToHex=G1;exports.bytesToNumberBE=ir;exports.canonicalAddress=In;exports.chainIdToChain=zi;exports.chainItem=qt;exports.chainToChainId=Js;exports.chainToPlatform=as;exports.checkOpts=v2;exports.checkOpts$1=Z1;exports.circleChainId=af;exports.circleContractChains=O1;exports.circleContracts=Qa;exports.circleDomainItem=Jr;exports.circleNonceItem=go;exports.clean=$n;exports.clusterApiUrl=gm;exports.commonjsGlobal=an;exports.concat=h2;exports.concatBytes=S2;exports.concatBytes$1=Tr;exports.concatBytes$2=gf;exports.constMap=Ee;exports.createBase58check=o1;exports.createHasher=ei;exports.createOptHasher=J1;exports.createView=A2;exports.createView$1=Ti;exports.customizableBytes=co;exports.dataLength=m2;exports.dataSlice=b2;exports.decomposeLiteral=Qf;exports.defineProperties=Ec;exports.deliveryInstructionLayout=u0;exports.denoise=Jm;exports.deserialize=Ns;exports.deserialize$1=Fn;exports.display=_c;exports.dist=je;exports.ed25519=_r;exports.ensureBytes=Qe;exports.envelopeLayout=sl;exports.estimateFinalityTime=Lc;exports.exists=Bc;exports.expiration=Rs;exports.filters=cs;exports.fixedChainItem=hp;exports.fixedLengthStringItem=nl;exports.fromBaseUnits=Vr;exports.fromBig=yf;exports.getAddress=Cr;exports.getAugmentedNamespace=Tc;exports.getBytes=Rr;exports.getBytesCopy=u2;exports.getDefaultExportFromCjs=Xs;exports.getHash=Gf;exports.getMinHashLength=Zc;exports.getTokenByAddress=xp;exports.getTokenDetails=Qy;exports.guardianAttestationEta=zc;exports.guardianSetItem=tl;exports.hash=y2;exports.headerLayout=rl;exports.hex=Tt;exports.hexToBytes=Y1;exports.hexlify=oi;exports.hmac=Gc;exports.index_browser_esm=W6;exports.isAddressable=ah;exports.isAttested=Ks;exports.isAutomatic=e2;exports.isBytesLike=f2;exports.isCallException=o2;exports.isChain=ho;exports.isCompleted=Ny;exports.isDestinationQueued=Oy;exports.isEqualCaseInsensitive=Qu;exports.isError=N0;exports.isFailed=zy;exports.isFinalizable=r2;exports.isHexString=bl;exports.isManual=t2;exports.isNative=Lt;exports.isRedeemed=fl;exports.isRefunded=Ly;exports.isSameToken=n0;exports.isSignAndSendSigner=ol;exports.isSignOnlySigner=i0;exports.isSourceFinalized=qs;exports.isSourceInitiated=ul;exports.isTokenId=wo;exports.isWormholeMessageId=Br;exports.kdfInputToBytes=X1;exports.keccak256=ms;exports.keccak_256=Ps;exports.makeError=z0;exports.mapHashToField=zf;exports.median=Um;exports.memoized=Ls;exports.mod=He;exports.nativeDecimals=nf;exports.nativeTokenId=t0;exports.networkChainToNativeChainId=of;exports.networkPlatformConfigs=M0;exports.notImplemented=Rb;exports.number=js;exports.output=K0;exports.parse=Si;exports.payloadIdItem=Gn;exports.payloadLiteralToPayloadItemLayout=e0;exports.platformNativeChainIdToNetworkChain=B1;exports.porticoContractChains=N1;exports.randomBytes=k2;exports.randomBytes$1=Kc;exports.registerNative=el;exports.registerPayloadTypes=Bt;exports.resolveAddress=c8;exports.resolveProperties=i2;exports.resolveWrappedToken=r0;exports.retry=Mr;exports.rotl=K1;exports.rotr=w2;exports.rotr32H=nb;exports.rotr32L=rb;exports.rotrBH=Ds;exports.rotrBL=vs;exports.rotrSH=dr;exports.rotrSL=ur;exports.rpcAddress=rf;exports.safeBufferExports=L0;exports.scale=ks;exports.secp256k1=er;exports.sequenceItem=yo;exports.serialize=lc;exports.serialize$1=kn;exports.serializePayload=Ap;exports.sha256=$c;exports.sha256$1=Hi;exports.sha3_256=vb;exports.sha512=kb;exports.sha512$1=Vc;exports.signSendWait=Hs;exports.signatureItem=$i;exports.stringConversion=Jf;exports.swap32IfBE=ec;exports.swap8IfBE=j1;exports.tbtc=Fi;exports.toBigIntLE_1=Mh;exports.toBufferLE_1=Tl;exports.toBytes=gl;exports.toBytes$1=ls;exports.toChain=os;exports.toChainId=Qs;exports.toCircleChain=ki;exports.toNative=cr;exports.toUniversal=Xf;exports.tokenBridgeChains=P1;exports.tokenBridgeRelayerChains=L1;exports.truncate=Di;exports.u32$1=$0;exports.u32$2=hf;exports.u64=j2;exports.units=wn;exports.universalAddress=Dp;exports.universalAddressItem=we;exports.unusedArbiterFee=d8;exports.unusedNonce=l8;exports.usdcContract=Is;exports.utf8ToBytes=Ib;exports.utf8ToBytes$1=qc;exports.validateObject=ds;exports.version=O0;exports.weierstrass=Vf;exports.weierstrassPoints=$f;exports.whole=Fs;exports.wrapConstructor=G0;exports.zeroPadBytes=g2;exports.zeroPadValue=p2;