@wormhole-foundation/wormhole-connect 3.0.1-beta.6-development → 3.0.1-beta.7-development

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (298) hide show
  1. package/dist/assets/{evm-CP2QogPh.js → evm-Daw1hnd1.js} +1 -1
  2. package/dist/assets/{tokens-p0GcG7JT.js → tokens-CD1l6Xjr.js} +13 -13
  3. package/dist/main.js +81 -81
  4. package/dist/src/AppRouter.d.ts.map +1 -1
  5. package/dist/src/components/AssetBadge.d.ts.map +1 -1
  6. package/dist/src/components/ConfigurablePageHeader.d.ts +4 -0
  7. package/dist/src/components/ConfigurablePageHeader.d.ts.map +1 -0
  8. package/dist/src/components/SampleApp/index.d.ts.map +1 -1
  9. package/dist/src/components/v3/AlertBanner.d.ts +14 -0
  10. package/dist/src/components/v3/AlertBanner.d.ts.map +1 -0
  11. package/dist/src/components/v3/Button.d.ts +22 -0
  12. package/dist/src/components/v3/Button.d.ts.map +1 -0
  13. package/dist/src/config/ui.d.ts +1 -1
  14. package/dist/src/config/ui.d.ts.map +1 -1
  15. package/dist/src/hooks/useAmountValidation.d.ts +2 -2
  16. package/dist/src/hooks/useAmountValidation.d.ts.map +1 -1
  17. package/dist/src/icons/Clock.d.ts +5 -0
  18. package/dist/src/icons/Clock.d.ts.map +1 -0
  19. package/dist/src/icons/SwapVertical.d.ts +5 -0
  20. package/dist/src/icons/SwapVertical.d.ts.map +1 -0
  21. package/dist/src/icons/TokenIcons.d.ts +1 -1
  22. package/dist/src/icons/TokenIcons.d.ts.map +1 -1
  23. package/dist/src/theme.d.ts +10 -3
  24. package/dist/src/theme.d.ts.map +1 -1
  25. package/dist/src/views/v3/Bridge/AmountInput/index.d.ts +21 -0
  26. package/dist/src/views/v3/Bridge/AmountInput/index.d.ts.map +1 -0
  27. package/dist/src/views/v3/Bridge/AmountValidationError.d.ts +11 -0
  28. package/dist/src/views/v3/Bridge/AmountValidationError.d.ts.map +1 -0
  29. package/dist/src/views/v3/Bridge/AssetPicker/ChainList.d.ts +16 -0
  30. package/dist/src/views/v3/Bridge/AssetPicker/ChainList.d.ts.map +1 -0
  31. package/dist/src/views/v3/Bridge/AssetPicker/PickerBottomSheet.d.ts +31 -0
  32. package/dist/src/views/v3/Bridge/AssetPicker/PickerBottomSheet.d.ts.map +1 -0
  33. package/dist/src/views/v3/Bridge/AssetPicker/PickerModal.d.ts +32 -0
  34. package/dist/src/views/v3/Bridge/AssetPicker/PickerModal.d.ts.map +1 -0
  35. package/dist/src/views/v3/Bridge/AssetPicker/SearchableList/SearchInput.d.ts +11 -0
  36. package/dist/src/views/v3/Bridge/AssetPicker/SearchableList/SearchInput.d.ts.map +1 -0
  37. package/dist/src/views/v3/Bridge/AssetPicker/SearchableList/index.d.ts +20 -0
  38. package/dist/src/views/v3/Bridge/AssetPicker/SearchableList/index.d.ts.map +1 -0
  39. package/dist/src/views/v3/Bridge/AssetPicker/TokenItem.d.ts +16 -0
  40. package/dist/src/views/v3/Bridge/AssetPicker/TokenItem.d.ts.map +1 -0
  41. package/dist/src/views/v3/Bridge/AssetPicker/TokenList.d.ts +24 -0
  42. package/dist/src/views/v3/Bridge/AssetPicker/TokenList.d.ts.map +1 -0
  43. package/dist/src/views/v3/Bridge/AssetPicker/index.d.ts +32 -0
  44. package/dist/src/views/v3/Bridge/AssetPicker/index.d.ts.map +1 -0
  45. package/dist/src/views/v3/Bridge/GasSlider/index.d.ts +11 -0
  46. package/dist/src/views/v3/Bridge/GasSlider/index.d.ts.map +1 -0
  47. package/dist/src/views/v3/Bridge/Routes/RouteBadge.d.ts +9 -0
  48. package/dist/src/views/v3/Bridge/Routes/RouteBadge.d.ts.map +1 -0
  49. package/dist/src/views/v3/Bridge/Routes/RoutesBottomSheet.d.ts +26 -0
  50. package/dist/src/views/v3/Bridge/Routes/RoutesBottomSheet.d.ts.map +1 -0
  51. package/dist/src/views/v3/Bridge/Routes/RoutesList.d.ts +20 -0
  52. package/dist/src/views/v3/Bridge/Routes/RoutesList.d.ts.map +1 -0
  53. package/dist/src/views/v3/Bridge/Routes/RoutesModal.d.ts +25 -0
  54. package/dist/src/views/v3/Bridge/Routes/RoutesModal.d.ts.map +1 -0
  55. package/dist/src/views/v3/Bridge/Routes/SingleRoute.d.ts +17 -0
  56. package/dist/src/views/v3/Bridge/Routes/SingleRoute.d.ts.map +1 -0
  57. package/dist/src/views/v3/Bridge/Routes/index.d.ts +13 -0
  58. package/dist/src/views/v3/Bridge/Routes/index.d.ts.map +1 -0
  59. package/dist/src/views/v3/Bridge/SwapInputs/index.d.ts +5 -0
  60. package/dist/src/views/v3/Bridge/SwapInputs/index.d.ts.map +1 -0
  61. package/dist/src/views/v3/Bridge/WalletConnector/Controller.d.ts +8 -0
  62. package/dist/src/views/v3/Bridge/WalletConnector/Controller.d.ts.map +1 -0
  63. package/dist/src/views/v3/Bridge/WalletConnector/ExplorerLink.d.ts +10 -0
  64. package/dist/src/views/v3/Bridge/WalletConnector/ExplorerLink.d.ts.map +1 -0
  65. package/dist/src/views/v3/Bridge/WalletConnector/Sidebar.d.ts +11 -0
  66. package/dist/src/views/v3/Bridge/WalletConnector/Sidebar.d.ts.map +1 -0
  67. package/dist/src/views/v3/Bridge/WalletConnector/index.d.ts +11 -0
  68. package/dist/src/views/v3/Bridge/WalletConnector/index.d.ts.map +1 -0
  69. package/dist/src/views/v3/Bridge/index.d.ts +5 -0
  70. package/dist/src/views/v3/Bridge/index.d.ts.map +1 -0
  71. package/dist/src/views/v3/Redeem/TransactionDetails/index.d.ts +4 -0
  72. package/dist/src/views/v3/Redeem/TransactionDetails/index.d.ts.map +1 -0
  73. package/dist/src/views/v3/Redeem/index.d.ts +5 -0
  74. package/dist/src/views/v3/Redeem/index.d.ts.map +1 -0
  75. package/dist/src/views/v3/TxHistory/Item/index.d.ts +8 -0
  76. package/dist/src/views/v3/TxHistory/Item/index.d.ts.map +1 -0
  77. package/dist/src/views/v3/TxHistory/Widget/Item.d.ts +9 -0
  78. package/dist/src/views/v3/TxHistory/Widget/Item.d.ts.map +1 -0
  79. package/dist/src/views/v3/TxHistory/Widget/index.d.ts +6 -0
  80. package/dist/src/views/v3/TxHistory/Widget/index.d.ts.map +1 -0
  81. package/dist/src/views/v3/TxHistory/index.d.ts +4 -0
  82. package/dist/src/views/v3/TxHistory/index.d.ts.map +1 -0
  83. package/lib/{account-DtI49BC9.mjs → account-BXlWsVcD.mjs} +1 -1
  84. package/lib/{account-BNVdeY3i.js → account-D3Whnyky.js} +1 -1
  85. package/lib/address-B2sdpJNe.js +1 -0
  86. package/lib/{address-DHjpQ41W.js → address-CFAt6HNS.js} +1 -1
  87. package/lib/{address-C4qO2bMD.mjs → address-CZArADcj.mjs} +1 -1
  88. package/lib/{address-BJhcbdG9.mjs → address-DPWm1fbw.mjs} +212 -205
  89. package/lib/{address-XxuWo72f.js → address-DpQlJQKV.js} +7 -7
  90. package/lib/{address-QpeLv2yn.mjs → address-YYxpimx3.mjs} +277 -276
  91. package/lib/{aptos-BPPwy9CZ.js → aptos-BQFrxLpU.js} +1 -1
  92. package/lib/{aptos-b3ytowip.js → aptos-C6eC7BKq.js} +2 -2
  93. package/lib/{aptos-C8FBg3S2.mjs → aptos-DNhNK-_f.mjs} +7 -7
  94. package/lib/{aptos-ButqYPXo.mjs → aptos-YbewU4Io.mjs} +3 -3
  95. package/lib/{basic-YNjcoRfK.js → basic-BH3rU0o2.js} +1 -1
  96. package/lib/{basic-BDC-Dz2c.mjs → basic-CVEIWCYi.mjs} +2 -2
  97. package/lib/{basic-B5VNsnap.mjs → basic-D3Mgm4Qb.mjs} +2 -2
  98. package/lib/{basic-BR_WJgiZ.js → basic-kfvhCLeC.js} +1 -1
  99. package/lib/{blake2b-5ZGBTE8v.mjs → blake2b-BFJ9US29.mjs} +7 -7
  100. package/lib/{blake2b-BJ4wVK7V.js → blake2b-aUiblHhG.js} +1 -1
  101. package/lib/{browser-ponyfill-C53najnL.js → browser-ponyfill-BeX4lPJd.js} +1 -1
  102. package/lib/{browser-ponyfill-CuZzL5JS.mjs → browser-ponyfill-Cn2t1qf7.mjs} +1 -1
  103. package/lib/{chain-B7MIR9_r.mjs → chain-D5okRkwk.mjs} +1 -1
  104. package/lib/{chain-CSpjwyBt.js → chain-Dme8n2tA.js} +1 -1
  105. package/lib/{chunk-KJH4KKG6-qC3BvugF.mjs → chunk-KJH4KKG6-DTOJZuhY.mjs} +144 -144
  106. package/lib/{chunk-KJH4KKG6-B9iq51o1.js → chunk-KJH4KKG6-HfCF1Kt-.js} +1 -1
  107. package/lib/{constants-DWhraRof.mjs → constants-BHQAYN6w.mjs} +3 -3
  108. package/lib/{constants-BA7a60_u.js → constants-BsKTcZQ3.js} +1 -1
  109. package/lib/{contract-D4Vzf62E.mjs → contract-CjL0DzEO.mjs} +39 -39
  110. package/lib/{contract-CQnkFb54.js → contract-DPL0fm8A.js} +1 -1
  111. package/lib/{core-DY8-r2Jo.mjs → core-C67jLszg.mjs} +7 -7
  112. package/lib/{core-DzA-Itto.js → core-DmZlgGHj.js} +3 -3
  113. package/lib/{create-CtvZoy0X.mjs → create-BlfwwO0_.mjs} +3 -3
  114. package/lib/{create-DCJBhyHG.js → create-CovWyutZ.js} +1 -1
  115. package/lib/{evm-BvQ1H4_y.js → evm-BWTWGvAv.js} +2 -2
  116. package/lib/{evm-Dn0xYGMV.mjs → evm-BohuNM6V.mjs} +9 -9
  117. package/lib/{evm-CrfP3Qfk.js → evm-CqywsvEZ.js} +2 -2
  118. package/lib/{evm-BfefVZFh.mjs → evm-M0ImOGaN.mjs} +7 -7
  119. package/lib/executor.js +1 -1
  120. package/lib/executor.mjs +46 -46
  121. package/lib/hosted.js +1 -1
  122. package/lib/hosted.mjs +1 -1
  123. package/lib/{index-CnCmR4Uj.js → index-2CmAUr-U.js} +1 -1
  124. package/lib/{index-DF2WGKez.js → index-85b_tiAE.js} +1 -1
  125. package/lib/{index-Ct88Toxl.mjs → index-95FB4Qgc.mjs} +3 -3
  126. package/lib/{index-lN-puZih.js → index-B7ho7Pb6.js} +1 -1
  127. package/lib/{index-DbPhljz1.mjs → index-BAUIp5vX.mjs} +15 -15
  128. package/lib/{index-DQp_O8iB.mjs → index-BCZtiDee.mjs} +4 -4
  129. package/lib/{index-BiS8vv7E.mjs → index-BGq4wC4S.mjs} +1 -1
  130. package/lib/{index-CBHIr2qc.mjs → index-BQuPDPUZ.mjs} +14 -14
  131. package/lib/{index-C1NzL1cw.mjs → index-BSj3tfTR.mjs} +3 -3
  132. package/lib/{index-CbVRI3aO.mjs → index-BV1jWLbR.mjs} +40 -40
  133. package/lib/{index-CXwf1C77.mjs → index-BXk8QNCQ.mjs} +6 -6
  134. package/lib/{index-DwX86vgy.mjs → index-BcAk5RDV.mjs} +31 -31
  135. package/lib/{index-BarjntIo.mjs → index-BgOkhLJ5.mjs} +4 -4
  136. package/lib/{index-BjbPJ-9w.js → index-BkPAiliF.js} +1 -1
  137. package/lib/{index-DLilRB-O.js → index-Bn-q9qez.js} +1 -1
  138. package/lib/{index-3pNz5RJC.js → index-Bt7K1A1Q.js} +1 -1
  139. package/lib/{index-BrjiGZLN.mjs → index-C-NwpT7M.mjs} +4 -4
  140. package/lib/{index-B2oGf_0Z.js → index-C7dcnZ_Y.js} +1 -1
  141. package/lib/{index-BuxGl_Bi.js → index-C9Mdci2_.js} +1 -1
  142. package/lib/index-CBBfcDND.js +335 -0
  143. package/lib/{index-BGsoGuxr.js → index-CGjibiRn.js} +1 -1
  144. package/lib/{index-Yra08X_i.js → index-CJ_ewe88.js} +1 -1
  145. package/lib/{index-CS1x3lLl.mjs → index-CMyIX4q3.mjs} +1 -1
  146. package/lib/{index-C6plXYir.mjs → index-CPq5TByt.mjs} +31052 -27169
  147. package/lib/{index-Czoo2lwG.mjs → index-Cd2G9Q0O.mjs} +2 -2
  148. package/lib/{index-iXUxUBar.js → index-D8YqkJyN.js} +1 -1
  149. package/lib/{index-BG9uNreI.js → index-DMtTF3lo.js} +1 -1
  150. package/lib/{index-DrcGXX5n.mjs → index-DRZtHRGC.mjs} +5 -5
  151. package/lib/{index-BZsgCHbh.js → index-DSFtUxH1.js} +1 -1
  152. package/lib/{index-B9Jj-myq.mjs → index-DYspQsyV.mjs} +4 -4
  153. package/lib/{index-BPdR4VSR.mjs → index-Difh_8Uq.mjs} +35 -35
  154. package/lib/{index-D2-kSqKC.mjs → index-Dl11esS0.mjs} +12 -12
  155. package/lib/{index-Dg1FDsF7.js → index-DlZQ535U.js} +1 -1
  156. package/lib/{index-DPZNqrkJ.mjs → index-DnaDROoD.mjs} +3 -3
  157. package/lib/{index-C6deIq6M.js → index-DocFg1hF.js} +1 -1
  158. package/lib/{index-BHv9flJb.js → index-DpEQBLtA.js} +1 -1
  159. package/lib/{index-OjOZm9KZ.mjs → index-DpSdWR-Q.mjs} +19 -19
  160. package/lib/{index-DCIXsPdt.js → index-DzxRHhWq.js} +1 -1
  161. package/lib/{index-BYNs7o4U.js → index-LMdITOCB.js} +1 -1
  162. package/lib/{index-C3JpIduu.js → index-cT-KFIxA.js} +1 -1
  163. package/lib/{index-TWJ3iDnH.js → index-k6e49slq.js} +1 -1
  164. package/lib/{index-t4mLpVUg.mjs → index-uuu1viWa.mjs} +1 -1
  165. package/lib/{index.es-CGmlPDhv.js → index.es-BYFwv7lT.js} +1 -1
  166. package/lib/{index.es-Cv23C4D_.mjs → index.es-BhhigIOQ.mjs} +3 -3
  167. package/lib/{index.es-C-nP3Wu4.mjs → index.es-DGqzeimm.mjs} +5 -5
  168. package/lib/{index.es-DOcp1QIZ.js → index.es-Fc3_m80E.js} +3 -3
  169. package/lib/index.js +1 -1
  170. package/lib/index.mjs +2 -2
  171. package/lib/mayan.js +9 -2
  172. package/lib/mayan.mjs +21900 -18117
  173. package/lib/{mint-DDRe5tvc.js → mint-C2AsTCD2.js} +1 -1
  174. package/lib/{mint-CwWYApOB.mjs → mint-CLB7p3ZL.mjs} +2 -2
  175. package/lib/ntt.js +1 -1
  176. package/lib/ntt.mjs +2370 -2323
  177. package/lib/{platform-Cdz3d-G9.js → platform-Cl1b31bn.js} +1 -1
  178. package/lib/{platform-C2My6P6V.js → platform-DV62YjSS.js} +1 -1
  179. package/lib/{platform-CkZe-n0U.js → platform-Dw5tN12f.js} +1 -1
  180. package/lib/{platform-B0QvkHbE.mjs → platform-bCY3DvqI.mjs} +14 -14
  181. package/lib/{platform-lg76WojY.mjs → platform-mkzPOtcO.mjs} +42 -21
  182. package/lib/{platform-IW8iV_CA.mjs → platform-pX0KL6zm.mjs} +6 -6
  183. package/lib/{provider-jsonrpc-Bd_Ha8XL.js → provider-jsonrpc-B0bAKP-a.js} +1 -1
  184. package/lib/{provider-jsonrpc-BXNY8lbA.mjs → provider-jsonrpc-DwKu1fjn.mjs} +120 -120
  185. package/lib/{secp256k1-BaYwfoJI.js → secp256k1-1EcPGQYM.js} +1 -1
  186. package/lib/{secp256k1-etdIygIN.mjs → secp256k1-6Zr6y_zm.mjs} +1 -1
  187. package/lib/{secp256k1-D3q9LbdQ.js → secp256k1-7IiVcfA7.js} +1 -1
  188. package/lib/{secp256k1-luy_3ZLQ.mjs → secp256k1-BeZAjIBs.mjs} +1 -1
  189. package/lib/{secp256k1-Cplgnjin.mjs → secp256k1-DXI-6Erh.mjs} +1 -1
  190. package/lib/{secp256k1-CuaGNRQC.js → secp256k1-Y38qxq0y.js} +1 -1
  191. package/lib/{signer-DKbAIeFy.mjs → signer-CzGPDOMI.mjs} +20 -20
  192. package/lib/{signer-BrSuBAB7.js → signer-D6-3r3Sp.js} +1 -1
  193. package/lib/{solana-BnirZbTQ.js → solana-Da7iWCux.js} +4 -4
  194. package/lib/solana-mjJtTggS.js +1 -0
  195. package/lib/{solana-DR8_Oms-.mjs → solana-os3Osxo6.mjs} +10 -10
  196. package/lib/solana-vo_l-zLm.mjs +18 -0
  197. package/lib/{solanaEmbed.esm-fUPiKqY3.mjs → solanaEmbed.esm-BBnVqCsz.mjs} +2 -2
  198. package/lib/{solanaEmbed.esm-BKWwcEou.js → solanaEmbed.esm-RhVD6vLR.js} +1 -1
  199. package/lib/src/AppRouter.d.ts.map +1 -1
  200. package/lib/src/components/AssetBadge.d.ts.map +1 -1
  201. package/lib/src/components/ConfigurablePageHeader.d.ts +4 -0
  202. package/lib/src/components/ConfigurablePageHeader.d.ts.map +1 -0
  203. package/lib/src/components/SampleApp/index.d.ts.map +1 -1
  204. package/lib/src/components/v3/AlertBanner.d.ts +14 -0
  205. package/lib/src/components/v3/AlertBanner.d.ts.map +1 -0
  206. package/lib/src/components/v3/Button.d.ts +22 -0
  207. package/lib/src/components/v3/Button.d.ts.map +1 -0
  208. package/lib/src/config/ui.d.ts +1 -1
  209. package/lib/src/config/ui.d.ts.map +1 -1
  210. package/lib/src/hooks/useAmountValidation.d.ts +2 -2
  211. package/lib/src/hooks/useAmountValidation.d.ts.map +1 -1
  212. package/lib/src/icons/Clock.d.ts +5 -0
  213. package/lib/src/icons/Clock.d.ts.map +1 -0
  214. package/lib/src/icons/SwapVertical.d.ts +5 -0
  215. package/lib/src/icons/SwapVertical.d.ts.map +1 -0
  216. package/lib/src/icons/TokenIcons.d.ts +1 -1
  217. package/lib/src/icons/TokenIcons.d.ts.map +1 -1
  218. package/lib/src/theme.d.ts +10 -3
  219. package/lib/src/theme.d.ts.map +1 -1
  220. package/lib/src/views/v3/Bridge/AmountInput/index.d.ts +21 -0
  221. package/lib/src/views/v3/Bridge/AmountInput/index.d.ts.map +1 -0
  222. package/lib/src/views/v3/Bridge/AmountValidationError.d.ts +11 -0
  223. package/lib/src/views/v3/Bridge/AmountValidationError.d.ts.map +1 -0
  224. package/lib/src/views/v3/Bridge/AssetPicker/ChainList.d.ts +16 -0
  225. package/lib/src/views/v3/Bridge/AssetPicker/ChainList.d.ts.map +1 -0
  226. package/lib/src/views/v3/Bridge/AssetPicker/PickerBottomSheet.d.ts +31 -0
  227. package/lib/src/views/v3/Bridge/AssetPicker/PickerBottomSheet.d.ts.map +1 -0
  228. package/lib/src/views/v3/Bridge/AssetPicker/PickerModal.d.ts +32 -0
  229. package/lib/src/views/v3/Bridge/AssetPicker/PickerModal.d.ts.map +1 -0
  230. package/lib/src/views/v3/Bridge/AssetPicker/SearchableList/SearchInput.d.ts +11 -0
  231. package/lib/src/views/v3/Bridge/AssetPicker/SearchableList/SearchInput.d.ts.map +1 -0
  232. package/lib/src/views/v3/Bridge/AssetPicker/SearchableList/index.d.ts +20 -0
  233. package/lib/src/views/v3/Bridge/AssetPicker/SearchableList/index.d.ts.map +1 -0
  234. package/lib/src/views/v3/Bridge/AssetPicker/TokenItem.d.ts +16 -0
  235. package/lib/src/views/v3/Bridge/AssetPicker/TokenItem.d.ts.map +1 -0
  236. package/lib/src/views/v3/Bridge/AssetPicker/TokenList.d.ts +24 -0
  237. package/lib/src/views/v3/Bridge/AssetPicker/TokenList.d.ts.map +1 -0
  238. package/lib/src/views/v3/Bridge/AssetPicker/index.d.ts +32 -0
  239. package/lib/src/views/v3/Bridge/AssetPicker/index.d.ts.map +1 -0
  240. package/lib/src/views/v3/Bridge/GasSlider/index.d.ts +11 -0
  241. package/lib/src/views/v3/Bridge/GasSlider/index.d.ts.map +1 -0
  242. package/lib/src/views/v3/Bridge/Routes/RouteBadge.d.ts +9 -0
  243. package/lib/src/views/v3/Bridge/Routes/RouteBadge.d.ts.map +1 -0
  244. package/lib/src/views/v3/Bridge/Routes/RoutesBottomSheet.d.ts +26 -0
  245. package/lib/src/views/v3/Bridge/Routes/RoutesBottomSheet.d.ts.map +1 -0
  246. package/lib/src/views/v3/Bridge/Routes/RoutesList.d.ts +20 -0
  247. package/lib/src/views/v3/Bridge/Routes/RoutesList.d.ts.map +1 -0
  248. package/lib/src/views/v3/Bridge/Routes/RoutesModal.d.ts +25 -0
  249. package/lib/src/views/v3/Bridge/Routes/RoutesModal.d.ts.map +1 -0
  250. package/lib/src/views/v3/Bridge/Routes/SingleRoute.d.ts +17 -0
  251. package/lib/src/views/v3/Bridge/Routes/SingleRoute.d.ts.map +1 -0
  252. package/lib/src/views/v3/Bridge/Routes/index.d.ts +13 -0
  253. package/lib/src/views/v3/Bridge/Routes/index.d.ts.map +1 -0
  254. package/lib/src/views/v3/Bridge/SwapInputs/index.d.ts +5 -0
  255. package/lib/src/views/v3/Bridge/SwapInputs/index.d.ts.map +1 -0
  256. package/lib/src/views/v3/Bridge/WalletConnector/Controller.d.ts +8 -0
  257. package/lib/src/views/v3/Bridge/WalletConnector/Controller.d.ts.map +1 -0
  258. package/lib/src/views/v3/Bridge/WalletConnector/ExplorerLink.d.ts +10 -0
  259. package/lib/src/views/v3/Bridge/WalletConnector/ExplorerLink.d.ts.map +1 -0
  260. package/lib/src/views/v3/Bridge/WalletConnector/Sidebar.d.ts +11 -0
  261. package/lib/src/views/v3/Bridge/WalletConnector/Sidebar.d.ts.map +1 -0
  262. package/lib/src/views/v3/Bridge/WalletConnector/index.d.ts +11 -0
  263. package/lib/src/views/v3/Bridge/WalletConnector/index.d.ts.map +1 -0
  264. package/lib/src/views/v3/Bridge/index.d.ts +5 -0
  265. package/lib/src/views/v3/Bridge/index.d.ts.map +1 -0
  266. package/lib/src/views/v3/Redeem/TransactionDetails/index.d.ts +4 -0
  267. package/lib/src/views/v3/Redeem/TransactionDetails/index.d.ts.map +1 -0
  268. package/lib/src/views/v3/Redeem/index.d.ts +5 -0
  269. package/lib/src/views/v3/Redeem/index.d.ts.map +1 -0
  270. package/lib/src/views/v3/TxHistory/Item/index.d.ts +8 -0
  271. package/lib/src/views/v3/TxHistory/Item/index.d.ts.map +1 -0
  272. package/lib/src/views/v3/TxHistory/Widget/Item.d.ts +9 -0
  273. package/lib/src/views/v3/TxHistory/Widget/Item.d.ts.map +1 -0
  274. package/lib/src/views/v3/TxHistory/Widget/index.d.ts +6 -0
  275. package/lib/src/views/v3/TxHistory/Widget/index.d.ts.map +1 -0
  276. package/lib/src/views/v3/TxHistory/index.d.ts +4 -0
  277. package/lib/src/views/v3/TxHistory/index.d.ts.map +1 -0
  278. package/lib/{sui-BTGAAvA9.js → sui-BCWT_MP3.js} +1 -1
  279. package/lib/{sui-BBqJwRM0.mjs → sui-CFKprzku.mjs} +3 -3
  280. package/lib/{sui-DTftSE5y.js → sui-CO5gTC2j.js} +1 -1
  281. package/lib/{sui-DAYuRjfB.mjs → sui-rzSF8U-3.mjs} +33 -33
  282. package/lib/{tokens-tq3iPasz.js → tokens-D2BbVV4x.js} +1 -1
  283. package/lib/{tokens-Bdu7ORRI.mjs → tokens-D74pLzp3.mjs} +3 -3
  284. package/lib/{units-Brhe0Yro.mjs → units-BGcsq4mJ.mjs} +24 -24
  285. package/lib/{units-CMwYFpwc.js → units-CFxZtEkH.js} +1 -1
  286. package/lib/{unsignedTransaction-Brbbx5Uc.mjs → unsignedTransaction-BHbKxuLa.mjs} +14 -14
  287. package/lib/{unsignedTransaction-q5Fk1S0o.js → unsignedTransaction-D14ic9We.js} +1 -1
  288. package/lib/{w3m-modal-BfRfCY9F.js → w3m-modal-253PNp3t.js} +1 -1
  289. package/lib/{w3m-modal-CtPzALaO.mjs → w3m-modal-BXoUHiVS.mjs} +2 -2
  290. package/lib/{w3m-modal-BhCXAHBR.js → w3m-modal-Dr98fjep.js} +1 -1
  291. package/lib/{w3m-modal-Dbhbe_NS.mjs → w3m-modal-vJ0TMybJ.mjs} +2 -2
  292. package/lib/{web3-Atnj-SZ3.mjs → web3-C7dEQmtr.mjs} +6 -6
  293. package/lib/{web3-DinKgkT9.js → web3-Co7tl8ed.js} +1 -1
  294. package/package.json +32 -33
  295. package/lib/address-BWzhA9di.js +0 -1
  296. package/lib/index-BjP-grbs.js +0 -299
  297. package/lib/solana-D_QkC8QG.mjs +0 -18
  298. package/lib/solana-pu7cIYt0.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wormhole-foundation/wormhole-connect",
3
- "version": "3.0.1-beta.6-development",
3
+ "version": "3.0.1-beta.7-development",
4
4
  "repository": "github:wormhole-foundation/wormhole-connect",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.mjs",
@@ -45,7 +45,7 @@
45
45
  "@ledgerhq/hw-transport": "6.27.1",
46
46
  "@ledgerhq/hw-transport-webhid": "6.27.1",
47
47
  "@ledgerhq/logs": "6.12.0",
48
- "@mayanfinance/wormhole-sdk-route": "1.16.0",
48
+ "@mayanfinance/wormhole-sdk-route": "1.19.0",
49
49
  "@metaplex-foundation/mpl-token-metadata": "3.4.0",
50
50
  "@metaplex-foundation/umi": "0.9.2",
51
51
  "@metaplex-foundation/umi-bundle-defaults": "0.9.2",
@@ -55,17 +55,17 @@
55
55
  "@solana/spl-token": "0.4.0",
56
56
  "@solana/wallet-adapter-wallets": "0.19.32",
57
57
  "@solana/web3.js": "1.98.0",
58
- "@wormhole-foundation/sdk": "3.0.0",
59
- "@wormhole-foundation/sdk-definitions": "3.0.0",
60
- "@wormhole-foundation/sdk-definitions-ntt": "1.0.1",
61
- "@wormhole-foundation/sdk-evm-ntt": "1.0.1",
62
- "@wormhole-foundation/sdk-icons": "^1.0.1",
63
- "@wormhole-foundation/sdk-route-ntt": "1.0.1",
64
- "@wormhole-foundation/sdk-solana-ntt": "1.0.1",
58
+ "@wormhole-foundation/sdk": "3.0.1",
59
+ "@wormhole-foundation/sdk-definitions": "3.0.1",
60
+ "@wormhole-foundation/sdk-definitions-ntt": "1.0.4",
61
+ "@wormhole-foundation/sdk-evm-ntt": "1.0.4",
62
+ "@wormhole-foundation/sdk-icons": "^1.0.4",
63
+ "@wormhole-foundation/sdk-route-ntt": "1.0.4",
64
+ "@wormhole-foundation/sdk-solana-ntt": "1.0.4",
65
65
  "@wormhole-labs/cctp-executor-route": "0.11.0",
66
66
  "@wormhole-labs/wallet-aggregator-aptos": "1.3.0",
67
67
  "@wormhole-labs/wallet-aggregator-core": "0.0.1",
68
- "@wormhole-labs/wallet-aggregator-evm": "0.3.1",
68
+ "@wormhole-labs/wallet-aggregator-evm": "0.4.0",
69
69
  "@wormhole-labs/wallet-aggregator-solana": "0.0.1",
70
70
  "@wormhole-labs/wallet-aggregator-sui": "0.0.1",
71
71
  "axios": "1.4.0",
@@ -199,39 +199,39 @@
199
199
  "axios": "1.4.0"
200
200
  },
201
201
  "@mayanfinance/wormhole-sdk-route": {
202
- "@wormhole-foundation/sdk-connect": "3.0.0",
203
- "@wormhole-foundation/sdk-evm": "3.0.0",
204
- "@wormhole-foundation/sdk-solana": "3.0.0",
205
- "@wormhole-foundation/sdk-sui": "3.0.0"
202
+ "@wormhole-foundation/sdk-connect": "3.0.1",
203
+ "@wormhole-foundation/sdk-evm": "3.0.1",
204
+ "@wormhole-foundation/sdk-solana": "3.0.1",
205
+ "@wormhole-foundation/sdk-sui": "3.0.1"
206
206
  },
207
207
  "@wormhole-foundation/sdk-definitions-ntt": {
208
- "@wormhole-foundation/sdk-base": "3.0.0",
209
- "@wormhole-foundation/sdk-definitions": "3.0.0"
208
+ "@wormhole-foundation/sdk-base": "3.0.1",
209
+ "@wormhole-foundation/sdk-definitions": "3.0.1"
210
210
  },
211
211
  "@wormhole-foundation/sdk-evm-ntt": {
212
- "@wormhole-foundation/sdk-base": "3.0.0",
213
- "@wormhole-foundation/sdk-definitions": "3.0.0",
214
- "@wormhole-foundation/sdk-evm": "3.0.0",
215
- "@wormhole-foundation/sdk-evm-core": "3.0.0"
212
+ "@wormhole-foundation/sdk-base": "3.0.1",
213
+ "@wormhole-foundation/sdk-definitions": "3.0.1",
214
+ "@wormhole-foundation/sdk-evm": "3.0.1",
215
+ "@wormhole-foundation/sdk-evm-core": "3.0.1"
216
216
  },
217
217
  "@wormhole-foundation/sdk-route-ntt": {
218
- "@wormhole-foundation/sdk-connect": "3.0.0",
218
+ "@wormhole-foundation/sdk-connect": "3.0.1",
219
219
  "axios": "1.4.0"
220
220
  },
221
221
  "@wormhole-foundation/sdk-solana-ntt": {
222
- "@wormhole-foundation/sdk-base": "3.0.0",
223
- "@wormhole-foundation/sdk-definitions": "3.0.0",
224
- "@wormhole-foundation/sdk-solana": "3.0.0",
225
- "@wormhole-foundation/sdk-solana-core": "3.0.0"
222
+ "@wormhole-foundation/sdk-base": "3.0.1",
223
+ "@wormhole-foundation/sdk-definitions": "3.0.1",
224
+ "@wormhole-foundation/sdk-solana": "3.0.1",
225
+ "@wormhole-foundation/sdk-solana-core": "3.0.1"
226
226
  },
227
227
  "@wormhole-labs/cctp-executor-route": {
228
- "@wormhole-foundation/sdk-aptos": "3.0.0",
229
- "@wormhole-foundation/sdk-connect": "3.0.0",
230
- "@wormhole-foundation/sdk-evm": "3.0.0",
231
- "@wormhole-foundation/sdk-solana": "3.0.0",
232
- "@wormhole-foundation/sdk-solana-cctp": "3.0.0",
233
- "@wormhole-foundation/sdk-sui": "3.0.0",
234
- "@wormhole-foundation/sdk-sui-cctp": "3.0.0"
228
+ "@wormhole-foundation/sdk-aptos": "3.0.1",
229
+ "@wormhole-foundation/sdk-connect": "3.0.1",
230
+ "@wormhole-foundation/sdk-evm": "3.0.1",
231
+ "@wormhole-foundation/sdk-solana": "3.0.1",
232
+ "@wormhole-foundation/sdk-solana-cctp": "3.0.1",
233
+ "@wormhole-foundation/sdk-sui": "3.0.1",
234
+ "@wormhole-foundation/sdk-sui-cctp": "3.0.1"
235
235
  },
236
236
  "@wormhole-foundation/wormhole-connect": {
237
237
  "aptos": "1.5.2"
@@ -285,4 +285,3 @@
285
285
  }
286
286
  }
287
287
  }
288
-
@@ -1 +0,0 @@
1
- "use strict";var Q=Object.defineProperty;var L=(l,t,e)=>t in l?Q(l,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[t]=e;var f=(l,t,e)=>L(l,typeof t!="symbol"?t+"":t,e);const a=require("./address-XxuWo72f.js");class E{constructor(t,e,n,i,s){f(this,"source");f(this,"destination");f(this,"fromChain");f(this,"toChain");f(this,"recipient");this.fromChain=t,this.toChain=e,this.source=n,this.destination=i,this.recipient=s}parseAmount(t){return a.parse(t,this.source.decimals)}amountFromBaseUnits(t){return a.fromBaseUnits(t,this.source.decimals)}async displayQuote(t,e,n){let i={success:!0,sourceToken:{token:t.sourceToken.token,amount:a.fromBaseUnits(t.sourceToken.amount,this.source.decimals)},destinationToken:{token:t.destinationToken.token,amount:a.fromBaseUnits(t.destinationToken.amount,this.destination.decimals)},params:e};if(t.relayFee){const o=await(t.relayFee.token.chain===this.fromChain.chain?this.fromChain:this.toChain).getDecimals(t.relayFee.token.address);i.relayFee={token:t.relayFee.token,amount:a.fromBaseUnits(t.relayFee.amount,o)}}if(t.destinationNativeGas){const s=await this.toChain.getDecimals("native");i.destinationNativeGas=a.fromBaseUnits(t.destinationNativeGas,s)}return t.warnings&&t.warnings.length>0&&(i.warnings=[...t.warnings]),i.eta=t.eta,i.expires=t.expires,n&&(i.details=n),i}static async create(t,e,n,i){n=n??t.getChain(e.source.chain),i=i??t.getChain(e.destination.chain);const s=await a.getTokenDetails(n,e.source,e.sourceDecimals),o=await a.getTokenDetails(i,e.destination,e.destinationDecimals);return new E(n,i,s,o,e.recipient)}}async function W(l,t,e,n=120*1e3,i=console.log){const s=Date.now();i("Checking transfer state...");for await(t of l.track(t,120*1e3))i("Current Transfer State: ",a.TransferState[t.state]);if(a.isCompleted(t))return t;if(a.isManual(l)&&a.isAttested(t)&&e){i("Completing transfer...");const r=await l.complete(e,t);i("Completed transfer with txids: ",r)}if(a.isFinalizable(l)&&a.isRedeemed(t)&&e){i("Finalizing transfer...");const r=await l.finalize(e,t);i("Finalized transfer with txids: ",r)}const o=n-(Date.now()-s);return o>0?(i("Transfer not complete, trying again in a 2000ms..."),await new Promise(c=>setTimeout(c,2e3)),W(l,t,e,o)):t}class S extends a.AutomaticRoute{static supportedNetworks(){return["Mainnet","Testnet"]}static supportedChains(t){return a.tokenBridgeRelayerChains.has(t)?a.tokenBridgeRelayerChains.get(t):[]}static async supportedDestinationTokens(t,e,n){try{if(!a.isNative(t)&&!await(await e.getAutomaticTokenBridge()).isRegisteredToken(t.address))return[];const i=await a.TokenTransfer.lookupDestinationToken(e,n,t);return await(await n.getAutomaticTokenBridge()).isRegisteredToken(i.address)?[i]:[]}catch{return[]}}getDefaultOptions(){return{nativeGas:0}}async validate(t,e){try{const n=e.options??this.getDefaultOptions();if(n.nativeGas&&(n.nativeGas>1||n.nativeGas<0))throw new Error("Native gas must be between 0.0 and 1.0 (0% and 100%)");const{destination:i}=t;a.isNative(i.id.address)&&n.nativeGas===0&&(n.nativeGas=0);const s={...e,options:n};return{valid:!0,params:{...s,normalizedParams:await this.normalizeTransferParams(t,s)}}}catch(n){return{valid:!1,params:e,error:n}}}async normalizeTransferParams(t,e){const n=t.parseAmount(e.amount),i=a.isNative(t.source.id.address)?await t.fromChain.getNativeWrappedTokenId():t.source.id,o=await(await t.fromChain.getAutomaticTokenBridge()).getRelayerFee(t.toChain.chain,i.address),r=o*105n/100n;if(a.units(n)<r)throw new a.MinAmountError(a.fromBaseUnits(r,n.decimals));const c=a.units(n)-o;let d=a.fromBaseUnits(0n,t.source.decimals);if(e.options&&e.options.nativeGas>0){let m=await(await t.toChain.getAutomaticTokenBridge()).maxSwapAmount(t.destination.id.address);const T=a.truncate(a.fromBaseUnits(c,n.decimals),a.TokenTransfer.MAX_DECIMALS),h=await t.toChain.getDecimals(t.destination.id.address),g=a.units(a.scale(T,h));g<m&&(m=g);const C=1e4,z=BigInt(Math.floor(e.options.nativeGas*C)),v=m*z/BigInt(C),F=a.fromBaseUnits(v,t.destination.decimals);d=a.scale(a.truncate(F,a.TokenTransfer.MAX_DECIMALS),t.source.decimals),a.units(d)>c&&(d=a.fromBaseUnits(c,t.source.decimals))}return{fee:a.fromBaseUnits(o,t.source.decimals),amount:n,nativeGasAmount:d}}async quote(t,e){const n=await t.fromChain.getAutomaticTokenBridge();if(a.isTokenId(t.source.id)&&!await n.isRegisteredToken(t.source.id.address))return{success:!1,error:new Error("Source token is not registered")};try{let i=await a.TokenTransfer.quoteTransfer(this.wh,t.fromChain,t.toChain,{protocol:"AutomaticTokenBridge",amount:a.units(e.normalizedParams.amount),token:t.source.id,nativeGas:a.units(e.normalizedParams.nativeGasAmount)});return t.displayQuote(i,e)}catch(i){return{success:!1,error:i}}}async initiate(t,e,n,i){const{params:s}=n,o=this.toTransferDetails(t,s,a.Wormhole.chainAddress(e.chain(),e.address()),i),r=await a.TokenTransfer.transfer(t.fromChain,o,e);return{from:o.from.chain,to:o.to.chain,state:a.TransferState.SourceInitiated,originTxs:r}}async*track(t,e){try{yield*a.TokenTransfer.track(this.wh,t,e)}catch(n){throw n}}toTransferDetails(t,e,n,i){return{from:n,to:i,protocol:"AutomaticTokenBridge",amount:a.units(e.normalizedParams.amount),token:t.source.id,nativeGas:a.units(e.normalizedParams.nativeGasAmount)}}}f(S,"NATIVE_GAS_DROPOFF_SUPPORTED",!0),f(S,"meta",{name:"AutomaticTokenBridge"});function H(l={}){class t extends A{}return f(t,"config",l),t}class A extends a.AutomaticRoute{constructor(){super(...arguments);f(this,"staticConfig",this.constructor.config)}static supportedNetworks(){return["Mainnet","Testnet"]}static supportedChains(e){return a.tokenBridgeChains(e)}static async supportedDestinationTokens(e,n,i){try{return[await a.TokenTransfer.lookupDestinationToken(n,i,e)]}catch{return[]}}getDefaultOptions(){return{nativeGas:0}}async validate(e,n){const i=a.parse(n.amount,e.source.decimals),s=n.options??this.getDefaultOptions();if(s.nativeGas&&(s.nativeGas>1||s.nativeGas<0))throw new Error("Native gas must be between 0.0 and 1.0 (0% and 100%)");return{valid:!0,params:{amount:n.amount,normalizedParams:{amount:i},options:s}}}async quote(e,n){var i,s,o,r,c,d,u,m,T;try{let h;const g=await e.toChain.getExecutorTokenBridge();let{gasLimit:C,msgValue:z}=await g.estimateMsgValueAndGasLimit(e.destination.id,e.recipient);if(((i=this.staticConfig.referrerFee)==null?void 0:i.referrerFeeDbps)!==void 0&&(h=this.staticConfig.referrerFee.referrerFeeDbps),(s=this.staticConfig.referrerFee)!=null&&s.tokenFeeOverrides){const w=a.canonicalAddress(e.source.id),k=(r=(o=this.staticConfig.referrerFee.tokenFeeOverrides[this.wh.network])==null?void 0:o[e.fromChain.chain])==null?void 0:r[w];k!==void 0&&(h=k)}if(this.staticConfig.tokenOverrides){const w=a.canonicalAddress(e.destination.id),k=(d=(c=this.staticConfig.tokenOverrides[this.wh.network])==null?void 0:c[e.destination.id.chain])==null?void 0:d[w];(k==null?void 0:k.gasLimit)!==void 0&&(C=k.gasLimit)}let v;if(h!==void 0&&h>0n){const w=(T=(m=(u=this.staticConfig.referrerFee)==null?void 0:u.referrerAddresses)==null?void 0:m[this.wh.network])==null?void 0:T[e.fromChain.chain];if(!w)throw new Error(`No referrer address configured for network ${this.wh.network} and chain ${e.fromChain.chain}`);v=a.Wormhole.chainAddress(e.fromChain.chain,w)}const F=h!==void 0&&v!==void 0?{feeDbps:h,referrer:v}:void 0;let M;if(n.options.nativeGas!==void 0){const w=await a.TokenTransfer.getExecutorGasDropOffLimit(this.wh,e.toChain);M=w>0n?BigInt(Math.round(n.options.nativeGas*100))*w/100n:0n}const U=await a.TokenTransfer.quoteTransfer(this.wh,e.fromChain,e.toChain,{token:e.source.id,amount:a.units(n.normalizedParams.amount),protocol:"ExecutorTokenBridge",nativeGas:M,msgValue:z,gasLimit:C,referrerFee:F});return e.displayQuote(U,n,U.details)}catch(h){return{success:!1,error:h}}}async initiate(e,n,i,s){const{fromChain:o,toChain:r}=e,{params:c}=i,d=await a.TokenTransfer.destinationOverrides(o,r,this.toTransferDetails(e,c,a.Wormhole.chainAddress(n.chain(),n.address()),s,i)),u=await a.TokenTransfer.transfer(o,d,n);let m=0;return(async()=>{for(;m<20;){try{const[h]=await this.wh.getExecutorTxStatus(u.at(-1).txid,o.chain);if(h)break}catch{}m++,await new Promise(h=>setTimeout(h,2e3))}})(),{from:d.from.chain,to:d.to.chain,state:a.TransferState.SourceInitiated,originTxs:u}}async complete(e,n){if(!a.isAttested(n)&&!a.isFailed(n))throw new Error("The source must be finalized in order to complete the transfer");if(!n.attestation)throw new Error("The receipt must have an attestation to complete the transfer");const i=this.wh.getChain(n.to),s=await i.getExecutorTokenBridge(),o=a.toNative(e.chain(),e.address()),r=s.redeem(o,n.attestation.attestation),c=await a.signSendWait(i,r,e);return{...n,state:a.TransferState.DestinationInitiated,attestation:n.attestation,destinationTxs:c}}async resume(e){const n=await a.TokenTransfer.from(this.wh,e,1e4);if(n.transfer.protocol!=="ExecutorTokenBridge")throw new Error("Can only resume ExecutorTokenBridge transfers");return a.TokenTransfer.getReceipt(n)}async*track(e,n){for await(const i of a.TokenTransfer.track(this.wh,e,n))yield i}toTransferDetails(e,n,i,s,o){if(!o.details)throw new Error("Missing quote details");return{from:i,to:s,token:e.source.id,amount:a.units(n.normalizedParams.amount),protocol:"ExecutorTokenBridge",executorQuote:o.details.executorQuote,referrerFee:o.details.referrerFee}}}f(A,"IS_EXECUTOR_ROUTE",!0),f(A,"NATIVE_GAS_DROPOFF_SUPPORTED",!0),f(A,"config",{}),f(A,"meta",{name:"TokenBridgeExecutorRoute"});class G extends a.ManualRoute{static supportedNetworks(){return["Mainnet","Testnet"]}static supportedChains(t){return a.tokenBridgeChains(t)}static async supportedDestinationTokens(t,e,n){try{return[await a.TokenTransfer.lookupDestinationToken(e,n,t)]}catch{return[]}}getDefaultOptions(){return{payload:void 0}}async validate(t,e){const n=a.parse(e.amount,t.source.decimals);return{valid:!0,params:{amount:e.amount,normalizedParams:{amount:n},options:{}}}}async quote(t,e){try{return t.displayQuote(await a.TokenTransfer.quoteTransfer(this.wh,t.fromChain,t.toChain,{token:t.source.id,amount:a.units(e.normalizedParams.amount),protocol:"TokenBridge",...e.options}),e)}catch(n){return{success:!1,error:n}}}async initiate(t,e,n,i){const{params:s}=n,o=await a.TokenTransfer.destinationOverrides(t.fromChain,t.toChain,this.toTransferDetails(t,s,a.Wormhole.chainAddress(e.chain(),e.address()),i)),r=await a.TokenTransfer.transfer(t.fromChain,o,e);return{from:o.from.chain,to:o.to.chain,state:a.TransferState.SourceInitiated,originTxs:r}}async complete(t,e){if(!a.isAttested(e))throw new Error("The source must be finalized in order to complete the transfer");const n=this.wh.getChain(e.to),i=await a.TokenTransfer.redeem(n,e.attestation.attestation,t);return{...e,state:a.TransferState.DestinationInitiated,destinationTxs:i}}async resume(t){const e=await a.TokenTransfer.from(this.wh,t,1e4);if(e.transfer.protocol!=="TokenBridge")throw new Error("Transfer is not a TokenBridge transfer");return a.TokenTransfer.getReceipt(e)}async*track(t,e){yield*a.TokenTransfer.track(this.wh,t,e)}toTransferDetails(t,e,n,i){return{from:n,to:i,protocol:"TokenBridge",token:t.source.id,amount:a.units(e.normalizedParams.amount),...e.options}}}f(G,"meta",{name:"ManualTokenBridge"});const R=15n,_=100n,B=10000n,y=class y extends a.AutomaticRoute{static supportedNetworks(){return["Mainnet"]}static supportedChains(t){return a.porticoContractChains.has(t)?a.porticoContractChains.get(t):[]}static async supportedDestinationTokens(t,e,n){const[,i]=a.resolveWrappedToken(e.network,e.chain,t),s=a.canonicalAddress(i),o=await e.getPorticoBridge();if(!o.supportedTokens().some(m=>a.canonicalAddress(m.token)===s))return[];try{const m=await o.getTransferrableToken(s);await a.TokenTransfer.lookupDestinationToken(e,n,m)}catch{return[]}const c=(await n.getPorticoBridge()).supportedTokens(),{tokenMap:d}=n.config,u=o.getTokenGroup(s);return c.filter(m=>(m.group===u||m.group==="ETH"&&u==="WETH"||m.group==="WETH"&&u==="ETH")&&(!d||a.filters.byAddress(d,a.canonicalAddress(m.token)))).map(m=>m.token)}getDefaultOptions(){return{}}async validate(t,e){try{if(!y.supportedChains(t.fromChain.network).includes(t.fromChain.chain)||!y.supportedChains(t.toChain.network).includes(t.toChain.chain))throw new Error("Protocol not supported");const{fromChain:n,toChain:i,source:s,destination:o}=t,{network:r}=n,[,c]=a.resolveWrappedToken(r,n.chain,s.id),[,d]=a.resolveWrappedToken(r,i.chain,o.id),u=await n.getPorticoBridge(),m=await i.getPorticoBridge(),T=await u.getTransferrableToken(a.canonicalAddress(c)),h=await m.getTransferrableToken(a.canonicalAddress(d));return{valid:!0,params:{amount:e.amount,options:e.options??this.getDefaultOptions(),normalizedParams:{amount:t.parseAmount(e.amount),canonicalSourceToken:T,canonicalDestinationToken:h,sourceToken:c,destinationToken:d}}}}catch(n){return{valid:!1,error:n,params:e}}}async quote(t,e){try{const n=await this.fetchSwapQuote(t,e),i=Math.max(t.source.decimals,t.destination.decimals),s=a.units(a.scale(e.normalizedParams.amount,i));if(a.units(a.scale(a.fromBaseUnits(n.minAmountFinish,t.destination.decimals),i))<s-s*_/B)throw new Error("Slippage too high");const c=await(await t.toChain.getPorticoBridge()).quoteRelay(e.normalizedParams.canonicalDestinationToken.address,e.normalizedParams.destinationToken.address),d={swapAmounts:n,relayerFee:c},u=d.swapAmounts.minAmountFinish-c;return u<0n?{success:!1,error:new Error(`Amount too low for slippage and fee, would result in negative destination amount (${u})`)}:await t.displayQuote({sourceToken:{token:e.normalizedParams.sourceToken,amount:a.units(e.normalizedParams.amount)},destinationToken:{token:e.normalizedParams.destinationToken,amount:d.swapAmounts.minAmountFinish-c},relayFee:{token:e.normalizedParams.destinationToken,amount:c},eta:a.estimateFinalityTime(t.fromChain.chain),expires:a.expiration(0,5,0)},e,d)}catch(n){return{success:!1,error:n}}}async initiate(t,e,n,i){const{params:s,details:o}=n,r=t.source.id.address,c=t.destination.id,d=await t.fromChain.getPorticoBridge(),u=d.getTokenGroup(r.toString()),T=(await t.toChain.getPorticoBridge()).getPorticoAddress(u),h=d.transfer(a.Wormhole.parseAddress(e.chain(),e.address()),i,r,a.units(s.normalizedParams.amount),c,T,o);return{originTxs:await a.signSendWait(t.fromChain,h,e),state:a.TransferState.SourceInitiated,from:t.fromChain.chain,to:t.toChain.chain}}async*track(t,e){if(a.isSourceInitiated(t)||a.isSourceFinalized(t)){const{txid:n}=t.originTxs[t.originTxs.length-1],i=await this.wh.getVaa(n,"PorticoBridge:Transfer",e);if(!i)throw new Error("No VAA found for transaction: "+n);const s={chain:i.emitterChain,emitter:i.emitterAddress,sequence:i.sequence};t={...t,state:a.TransferState.Attested,attestation:{id:s,attestation:i}},yield t}a.isAttested(t)&&await(await this.wh.getChain(t.to).getPorticoBridge()).isTransferCompleted(t.attestation.attestation)&&(t={...t,state:a.TransferState.DestinationFinalized},yield t),yield t}async complete(t,e){if(!a.isAttested(e))throw new Error("Source must be attested");const n=await this.wh.getChain(e.to),i=await n.getPorticoBridge(),s=a.Wormhole.chainAddress(t.chain(),t.address()),o=i.redeem(s.address,e.attestation.attestation);return await a.signSendWait(n,o,t)}async fetchSwapQuote(t,e){const n=await t.fromChain.getPorticoBridge(),i=a.units(e.normalizedParams.amount),s=n.getTokenGroup(a.canonicalAddress(e.normalizedParams.sourceToken)),o=await n.quoteSwap(e.normalizedParams.sourceToken.address,e.normalizedParams.canonicalSourceToken.address,s,i),r=o*R/B;if(r>=o)throw new Error("Start slippage too high");const c=await t.toChain.getPorticoBridge(),d=o-r,u=await c.quoteSwap(e.normalizedParams.canonicalDestinationToken.address,e.normalizedParams.destinationToken.address,s,d),m=u*R/B;if(m>=u)throw new Error("Finish slippage too high");const T=u-m;return{minAmountStart:d,minAmountFinish:T}}};f(y,"NATIVE_GAS_DROPOFF_SUPPORTED",!1),f(y,"meta",{name:"AutomaticPortico"});let b=y;class O extends a.ManualRoute{static supportedNetworks(){return["Mainnet","Testnet"]}static supportedChains(t){return a.circleContractChains.has(t)?a.circleContractChains.get(t):[]}static async supportedDestinationTokens(t,e,n){const i=a.usdcContract.get(e.network,e.chain);if(!i)return[];if(!a.isSameToken(t,a.Wormhole.tokenId(e.chain,i)))return[];const{network:s,chain:o}=n;return a.usdcContract.has(s,o)?[a.Wormhole.chainAddress(o,a.usdcContract.get(s,o))]:[]}getDefaultOptions(){return{payload:void 0}}async validate(t,e){return{valid:!0,params:{normalizedParams:{amount:t.parseAmount(e.amount)},options:e.options??this.getDefaultOptions(),...e}}}async quote(t,e){try{return t.displayQuote(await a.CircleTransfer.quoteTransfer(t.fromChain,t.toChain,{automatic:!1,amount:a.units(e.normalizedParams.amount),...e.options}),e)}catch(n){return{success:!1,error:n}}}async initiate(t,e,n,i){const{params:s}=n,o=await a.CircleTransfer.destinationOverrides(t.fromChain,t.toChain,this.toTransferDetails(s,a.Wormhole.chainAddress(e.chain(),e.address()),i)),r=await a.CircleTransfer.transfer(t.fromChain,o,e),c=await a.CircleTransfer.getTransferMessage(t.fromChain,r[r.length-1].txid);return{from:o.from.chain,to:o.to.chain,state:a.TransferState.SourceFinalized,originTxs:r,attestation:{id:c.id,attestation:{message:c.message}}}}async complete(t,e){if(!a.isAttested(e))throw new Error("The source must be finalized in order to complete the transfer");const{id:n,attestation:i}=e.attestation;if(a.CircleBridge.isCircleAttestation(i)){const{message:s,attestation:o}=i;if(!o)throw new Error(`No Circle attestation for ${n}`);const r=this.wh.getChain(e.to),c=await r.getCircleBridge(),d=a.Wormhole.parseAddress(t.chain(),t.address()),u=c.redeem(d,s,o),m=await a.signSendWait(r,u,t);return{...e,state:a.TransferState.DestinationInitiated,destinationTxs:m}}else return e}async resume(t){const e=await a.CircleTransfer.from(this.wh,t,1e4);return a.CircleTransfer.getReceipt(e)}async*track(t,e){yield*a.CircleTransfer.track(this.wh,t,e)}toTransferDetails(t,e,n){return{from:e,to:n,amount:a.units(t.normalizedParams.amount),automatic:!1,...t.options}}}f(O,"meta",{name:"ManualCCTP",provider:"Circle"});class x extends a.AutomaticRoute{static supportedNetworks(){return["Mainnet","Testnet"]}static supportedChains(t){return a.circleContractChains.has(t)?a.circleContractChains.get(t).filter(n=>{var i;return(i=a.circleContracts.get(t,n))==null?void 0:i.wormholeRelayer}):[]}static async supportedDestinationTokens(t,e,n){const i=a.usdcContract.get(e.network,e.chain);if(!i)return[];if(!a.isSameToken(t,a.Wormhole.tokenId(e.chain,i)))return[];const{network:s,chain:o}=n;return a.usdcContract.has(s,o)?[a.Wormhole.chainAddress(o,a.usdcContract.get(s,o))]:[]}getDefaultOptions(){return{nativeGas:0}}async validate(t,e){try{const n=e.options??this.getDefaultOptions();return{valid:!0,params:{normalizedParams:await this.normalizeTransferParams(t,e),options:n,...e}}}catch(n){return{valid:!1,params:e,error:n}}}async quote(t,e){try{return t.displayQuote(await a.CircleTransfer.quoteTransfer(t.fromChain,t.toChain,{automatic:!0,amount:a.units(e.normalizedParams.amount),nativeGas:a.units(e.normalizedParams.nativeGasAmount)}),e)}catch(n){return{success:!1,error:n}}}async normalizeTransferParams(t,e){const n=t.parseAmount(e.amount),s=await(await t.fromChain.getAutomaticCircleBridge()).getRelayerFee(t.toChain.chain),o=s*105n/100n;if(a.units(n)<o)throw new a.MinAmountError(a.fromBaseUnits(o,n.decimals));const r=a.units(n)-s,d=(e.options??this.getDefaultOptions()).nativeGas??0;if(d>1||d<0)throw new Error("Native gas must be between 0.0 and 1.0 (0% and 100%)");let u=0n;if(d>0){let T=await(await t.toChain.getAutomaticCircleBridge()).maxSwapAmount();r<T&&(T=r);const h=1e4,g=BigInt(Math.floor(d*h));u=T*g/BigInt(h),u===r&&u>0n&&(u-=1n)}return{fee:t.amountFromBaseUnits(s),amount:n,nativeGasAmount:t.amountFromBaseUnits(u)}}toTransferDetails(t,e,n){return{from:e,to:n,amount:a.units(t.normalizedParams.amount),automatic:!0,nativeGas:a.units(t.normalizedParams.nativeGasAmount)}}async initiate(t,e,n,i){const{params:s}=n;let o=this.toTransferDetails(s,a.Wormhole.chainAddress(e.chain(),e.address()),i),r=await a.CircleTransfer.transfer(t.fromChain,o,e);const c=await a.CircleTransfer.getTransferMessage(t.fromChain,r[r.length-1].txid);return{from:o.from.chain,to:o.to.chain,state:a.TransferState.SourceFinalized,originTxs:r,attestation:{id:c.id,attestation:{message:c.message}}}}async*track(t,e){yield*a.CircleTransfer.track(this.wh,t,e)}}f(x,"NATIVE_GAS_DROPOFF_SUPPORTED",!0),f(x,"meta",{name:"AutomaticCCTP",provider:"Circle"});class N extends a.ManualRoute{static supportedNetworks(){return["Mainnet"]}static supportedChains(t){return a.tokenBridgeChains(t)}static async supportedDestinationTokens(t,e,n){if(!await this.isSourceTokenSupported(t,e))return[];const i=a.TBTCBridge.getNativeTbtcToken(n.chain);if(i)return[i];const s=await n.getTokenBridge(),o=a.TBTCBridge.getNativeTbtcToken("Ethereum");try{const r=await s.getWrappedAsset(o);return[a.Wormhole.tokenId(n.chain,r.toString())]}catch(r){if(r.message.includes("not a wrapped asset"))return[];throw r}}getDefaultOptions(){return{}}async validate(t,e){return{valid:!0,params:{normalizedParams:{amount:t.parseAmount(e.amount)},options:e.options??this.getDefaultOptions(),...e}}}async quote(t,e){const n=a.estimateFinalityTime(t.fromChain.chain)+a.guardianAttestationEta;return{success:!0,params:e,sourceToken:{token:t.source.id,amount:e.normalizedParams.amount},destinationToken:{token:t.destination.id,amount:e.normalizedParams.amount},eta:n,expires:a.expiration(24,0,0)}}async initiate(t,e,n,i){const s=a.units(n.params.normalizedParams.amount),o=t.fromChain.chain==="Ethereum",r=a.TBTCBridge.getNativeTbtcToken(t.fromChain.chain),c=r&&a.isSameToken(n.sourceToken.token,r);if(c&&!o)return await this.transferNative(t,e,i,s);if(!c&&o)throw new Error("Only tbtc can be transferred on Ethereum");if(!c){const u=await(await t.fromChain.getTokenBridge()).getOriginalAsset(n.sourceToken.token.address),m=a.TBTCBridge.getNativeTbtcToken("Ethereum");if(!a.isSameToken(u,m))throw new Error("Can only transfer wrapped tbtc")}return await this.transferWrapped(t,e,i,s)}async transferNative(t,e,n,i){const s=a.Wormhole.parseAddress(e.chain(),e.address()),r=(await t.fromChain.getTBTCBridge()).transfer(s,n,i);return{originTxs:await a.signSendWait(t.fromChain,r,e),state:a.TransferState.SourceInitiated,from:t.fromChain.chain,to:t.toChain.chain}}async transferWrapped(t,e,n,i){const s=a.Wormhole.parseAddress(e.chain(),e.address()),o=a.tbtc.get(t.fromChain.network,n.chain),r=await t.fromChain.getTokenBridge();let c;return o?c=r.transfer(s,a.Wormhole.chainAddress(t.toChain.chain,o),t.source.id.address,i,n.address.toUniversalAddress().toUint8Array()):c=r.transfer(s,n,t.source.id.address,i),{originTxs:await a.signSendWait(t.fromChain,c,e),state:a.TransferState.SourceInitiated,from:t.fromChain.chain,to:t.toChain.chain}}async complete(t,e){if(!a.isAttested(e))throw new Error("The source must be finalized in order to complete the transfer");const n=a.Wormhole.parseAddress(t.chain(),t.address()),i=e.attestation.attestation,s=this.wh.getChain(e.to);let o;if(i.payloadLiteral==="TBTCBridge:GatewayTransfer")o=(await s.getTBTCBridge()).redeem(n,i);else{const c=await s.getTokenBridge(),d=a.serialize$1(i),u=a.deserialize("TokenBridge:Transfer",d);o=c.redeem(n,u)}const r=await a.signSendWait(s,o,t);return{...e,state:a.TransferState.DestinationInitiated,destinationTxs:r}}async resume(t){const e=await this.wh.getVaa(t.txid,a.TBTCBridge.getTransferDiscriminator());if(!e)throw new Error("No VAA found for transaction: "+t);const n=a.TBTCBridge.getNativeTbtcToken("Ethereum"),{chain:i,address:s}=e.payload.token;if(!a.isSameToken(n,{chain:i,address:s}))throw new Error("Can only resume tbtc transfers");return{originTxs:[t],state:a.TransferState.Attested,from:e.emitterChain,to:e.payload.to.chain,attestation:{id:{chain:e.emitterChain,emitter:e.emitterAddress,sequence:e.sequence},attestation:e}}}async*track(t,e){if(a.isSourceInitiated(t)||a.isSourceFinalized(t)){const{txid:n}=t.originTxs[t.originTxs.length-1],i=await this.wh.getVaa(n,a.TBTCBridge.getTransferDiscriminator(),e);if(!i)throw new Error("No VAA found for transaction: "+n);const s={chain:i.emitterChain,emitter:i.emitterAddress,sequence:i.sequence};t={...t,state:a.TransferState.Attested,attestation:{id:s,attestation:i}},yield t}a.isAttested(t)&&await(await this.wh.getChain(t.to).getTokenBridge()).isTransferCompleted(t.attestation.attestation)&&(t={...t,state:a.TransferState.DestinationFinalized},yield t),yield t}static async isSourceTokenSupported(t,e){if(a.isNative(t.address))return!1;const n=a.TBTCBridge.getNativeTbtcToken(e.chain);if(n&&a.isSameToken(t,n))return!0;const i=await e.getTokenBridge();try{const s=await i.getOriginalAsset(t.address);return a.isSameToken(s,a.TBTCBridge.getNativeTbtcToken("Ethereum"))}catch(s){if(s.message.includes("not a wrapped asset"))return!1;throw s}}}f(N,"meta",{name:"ManualTBTC"});const X=Object.freeze(Object.defineProperty({__proto__:null,AutomaticCCTPRoute:x,AutomaticPorticoRoute:b,AutomaticRoute:a.AutomaticRoute,AutomaticTokenBridgeRoute:S,BPS_PER_HUNDRED_PERCENT:B,CCTPRoute:O,ExecutorTokenBridgeRoute:A,FinalizableRoute:a.FinalizableRoute,MAX_SLIPPAGE_BPS:_,ManualRoute:a.ManualRoute,MinAmountError:a.MinAmountError,RelayFailedError:a.RelayFailedError,Route:a.Route,RouteResolver:a.RouteResolver,RouteTransferRequest:E,SLIPPAGE_BPS:R,TBTCRoute:N,TokenBridgeRoute:G,UnavailableError:a.UnavailableError,checkAndCompleteTransfer:W,executorTokenBridgeRoute:H,isAutomatic:a.isAutomatic,isFinalizable:a.isFinalizable,isManual:a.isManual},Symbol.toStringTag,{value:"Module"})),j="0x1::aptos_coin::AptosCoin",P="::",I="Aptos",V=l=>/^(0x)?[0-9a-fA-F]+::\w+::\w+$/.test(l),J=l=>l.split(P)[0];function K(l){return l.length%2!==0||l.length<66?(l=l.startsWith("0x")?l.slice(2):l,"0x"+l.padStart(64,"0")):l}const p=class p{constructor(t){f(this,"type","Native");f(this,"address");f(this,"module");if(p.instanceof(t))this.address=t.address,this.module=t.module;else if(a.UniversalAddress.instanceof(t))this.address=t.toUint8Array();else if(typeof t=="string"){if(V(t)){const e=t.split(P);this.module=e.slice(1).join(P),t=e[0]}if(t=K(t),!a.hex.valid(t))throw new Error("Invalid Aptos address: "+t);this.address=a.hex.decode(t)}else this.address=t}unwrap(){const t=a.hex.encode(this.address).replace(/^0+/,""),e=this.module?P+this.module:"";return`0x${t}${e}`}toString(){return this.unwrap()}toNative(){return this}toUint8Array(){return this.address}toUniversalAddress(){return new a.UniversalAddress(this.toUint8Array())}static instanceof(t){return t.constructor.platform===p.platform}equals(t){return p.instanceof(t)?t.unwrap()===this.unwrap():this.toUniversalAddress().equals(t)}};f(p,"byteSize",32),f(p,"platform",I);let D=p;a.registerNative(I,D);exports.APTOS_COIN=j;exports.APTOS_SEPARATOR=P;exports.AptosAddress=D;exports.AutomaticCCTPRoute=x;exports.AutomaticPorticoRoute=b;exports.AutomaticTokenBridgeRoute=S;exports.CCTPRoute=O;exports.RouteTransferRequest=E;exports.TBTCRoute=N;exports.TokenBridgeRoute=G;exports._platform=I;exports.coalesceModuleAddress=J;exports.isValidAptosType=V;exports.routes=X;