@wormhole-foundation/wormhole-connect 0.3.19-beta.1-development → 0.3.19-beta.4-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 (119) hide show
  1. package/dist/assets/{ccip-CC5KdnX-.js → ccip-fCzlhBBT.js} +1 -1
  2. package/dist/assets/cosmos-CZk6ggNU.js +37 -0
  3. package/dist/assets/{cosmwasm-D6dc3HhR.js → cosmwasm-BRgXJAEm.js} +3 -3
  4. package/dist/assets/{ens-validation.es6-JeiZhPFM.js → ens-validation.es6-CEldkK56.js} +1 -1
  5. package/dist/assets/{evm-scnxy1Tm.js → evm-zyz5dAmi.js} +4 -4
  6. package/dist/assets/{index-CfFB0O_w.js → index-2haya2pd.js} +1 -1
  7. package/dist/assets/{index-DdlsdoUO.js → index-BSZP2fsz.js} +1 -1
  8. package/dist/assets/{index-CYsDCGyL.js → index-BUfxN-fw.js} +1 -1
  9. package/dist/assets/{index-CZGBtcJ2.js → index-Cjisu-Ym.js} +1 -1
  10. package/dist/assets/index-CoAwWRVw.js +3 -0
  11. package/dist/assets/{index-DcrZhJuV.js → index-DYCDjsFo.js} +2 -2
  12. package/dist/assets/{index.es-CkKy_bC0.js → index.es-LrzWWyFt.js} +2 -2
  13. package/dist/assets/{solana-DJERwdo1.js → solana-ClUmAbQX.js} +2 -2
  14. package/dist/assets/{solanaEmbed.esm-CYzxDEiX.js → solanaEmbed.esm-BpCHncZo.js} +1 -1
  15. package/dist/assets/{unsignedTransaction-Bbs3hbtB.js → unsignedTransaction-C5QlrOSq.js} +1 -1
  16. package/dist/main.js +11 -11
  17. package/dist/src/components/ManualAddressInput.d.ts.map +1 -1
  18. package/dist/src/components/TokensModal.d.ts.map +1 -1
  19. package/dist/src/telemetry/types.d.ts +1 -0
  20. package/dist/src/telemetry/types.d.ts.map +1 -1
  21. package/dist/src/views/Bridge/Send.d.ts.map +1 -1
  22. package/lib/{algorand-Cn2ASQM8.mjs → algorand-BNtk5Zlz.mjs} +4 -4
  23. package/lib/{algorand-BEj3eMlU.js → algorand-BOA88Yi9.js} +1 -1
  24. package/lib/{aptos-C5usxwjg.js → aptos-09IlHhtG.js} +1 -1
  25. package/lib/{aptos-CgcrUUs6.js → aptos-2Xg1Y_0j.js} +2 -2
  26. package/lib/{aptos-r2dqWkwd.mjs → aptos-DsuCT57P.mjs} +4 -4
  27. package/lib/{aptos-B4K8HU4y.mjs → aptos-ofb4q2o1.mjs} +1 -1
  28. package/lib/{browser-CqNEk73A.mjs → browser-5rNYk7ew.mjs} +2 -2
  29. package/lib/{browser-9qSlzcs1.js → browser-CMlhlM7_.js} +1 -1
  30. package/lib/{ccip-DiTkor0v.js → ccip-BnSw75yc.js} +1 -1
  31. package/lib/{ccip-Cg8GiGjJ.mjs → ccip-rZCaMFot.mjs} +1 -1
  32. package/lib/{chain-CNimQoal.mjs → chain-BZjg2BoT.mjs} +1 -1
  33. package/lib/{chain-BS9tnRQF.js → chain-NLYiTi92.js} +1 -1
  34. package/lib/{cosmos-DAYdruCU.js → cosmos-DeEa4QWd.js} +1 -1
  35. package/lib/{cosmos-kdBLlX5J.mjs → cosmos-IWVkyjMV.mjs} +3 -3
  36. package/lib/{cosmwasm-t4y0gzD9.js → cosmwasm-BFtZD1Ru.js} +2 -2
  37. package/lib/{cosmwasm-BdmGrQe2.mjs → cosmwasm-CGR89px_.mjs} +6 -6
  38. package/lib/{create-BC4-6NQa.js → create-Bpjnlpg_.js} +1 -1
  39. package/lib/{create-Bh45gqri.mjs → create-PB82rGuQ.mjs} +1 -1
  40. package/lib/{ens-validation.es6-B5lcZ1z0.js → ens-validation.es6-BY6Eu6az.js} +1 -1
  41. package/lib/{ens-validation.es6-BBk1nSK3.mjs → ens-validation.es6-D6AE2QT0.mjs} +2 -2
  42. package/lib/{evm-BdLUkbt8.mjs → evm-DB1-WEEt.mjs} +6 -6
  43. package/lib/{evm-ByfaloPB.js → evm-DY9ovr2c.js} +2 -2
  44. package/lib/{evm-CI9jvgpD.mjs → evm-FMLhTUS9.mjs} +6 -6
  45. package/lib/{evm-Cplwt-Uu.js → evm-aLUoXBeT.js} +4 -4
  46. package/lib/{index-CeYAnGJU.js → index-6GqC5Hzz.js} +1 -1
  47. package/lib/{index-ClpF6w41.mjs → index-95lzn8zO.mjs} +5 -5
  48. package/lib/{index-DkHNYEwj.js → index-9SUIf5nS.js} +1 -1
  49. package/lib/{index-RHlQCTsY.js → index-B2IuVewp.js} +1 -1
  50. package/lib/{index-DonnLcua.mjs → index-B2JrUboW.mjs} +6 -6
  51. package/lib/{index-D10P63La.mjs → index-BAMSsTuN.mjs} +4 -4
  52. package/lib/{index-_ey36AjY.mjs → index-BEQsB526.mjs} +2 -2
  53. package/lib/{index-BTJEpkGu.mjs → index-BEjdY6hm.mjs} +5 -5
  54. package/lib/{index-CiNv_vqX.js → index-BG24T1GX.js} +1 -1
  55. package/lib/{index-CLqwNevH.mjs → index-BI-a425p.mjs} +1 -1
  56. package/lib/{index-CZM1nqSC.js → index-BQqBYm1C.js} +1 -1
  57. package/lib/{index-L-oyxcKw.mjs → index-BSpDXKq1.mjs} +4 -4
  58. package/lib/{index-BAfpfiMg.mjs → index-BULQb7l7.mjs} +4 -4
  59. package/lib/{index-DKqdtMJw.mjs → index-Bdzevkwx.mjs} +3 -3
  60. package/lib/{index-DVzNMQU2.mjs → index-BqGrE5rX.mjs} +4 -4
  61. package/lib/{index-BskUJ6-F.js → index-BwTYRqte.js} +1 -1
  62. package/lib/{index-DjJSdBO_.mjs → index-C1JlVOwd.mjs} +77 -63
  63. package/lib/{index-tFdU3m1V.js → index-C7pm5tV-.js} +1 -1
  64. package/lib/{index-DJoVr9ew.mjs → index-CFc6ua8j.mjs} +4 -4
  65. package/lib/{index-D05MUiKM.js → index-COcHH6cV.js} +1 -1
  66. package/lib/{index-dgxqH4Al.mjs → index-CPg2DDGG.mjs} +4 -4
  67. package/lib/{index-v5JYqN5T.js → index-CaF25_vp.js} +1 -1
  68. package/lib/{index-Vqfiz4gq.js → index-CefRPGIJ.js} +1 -1
  69. package/lib/{index-Cms5l5e9.mjs → index-CfOBXKOA.mjs} +2 -2
  70. package/lib/{index-D2283Eib.js → index-Clclaa8l.js} +1 -1
  71. package/lib/{index-6SYLbVVC.mjs → index-Cn3ZByEn.mjs} +5 -5
  72. package/lib/{index-DHNJ7dTI.mjs → index-CswKQSoP.mjs} +3 -3
  73. package/lib/{index-DULgLsXD.mjs → index-Cu-QZ2Yi.mjs} +4 -4
  74. package/lib/{index-DuPl6mJy.mjs → index-CxU-Gb5y.mjs} +4 -4
  75. package/lib/{index-D4polzlG.mjs → index-D0taDsGK.mjs} +4 -4
  76. package/lib/{index-DTYdWw1E.js → index-D1vD1x9T.js} +1 -1
  77. package/lib/{index-B11tXNbe.mjs → index-DHsWcdrI.mjs} +1 -1
  78. package/lib/{index-W5vGD3Jp.js → index-DIhwpM7p.js} +1 -1
  79. package/lib/{index-CyoAaX76.js → index-DRhnM5uA.js} +1 -1
  80. package/lib/{index-CitMOybO.js → index-D_ETBz6p.js} +1 -1
  81. package/lib/{index-Bjg2w3Jp.mjs → index-Df-PgrLd.mjs} +2 -2
  82. package/lib/{index-Cpfo_13K.js → index-DfYc88fY.js} +5 -5
  83. package/lib/{index-DWqHObYQ.js → index-Dph4RybI.js} +1 -1
  84. package/lib/{index-JCeZURsa.mjs → index-Dvg604_r.mjs} +3 -3
  85. package/lib/{index-LbkpxbxU.js → index-DzVxkotY.js} +1 -1
  86. package/lib/{index-DO9Aqf4O.js → index-LMP2SXjR.js} +1 -1
  87. package/lib/{index-D3leTI6y.js → index-M0F8WpQR.js} +1 -1
  88. package/lib/{index-BdZfdhLf.js → index-Na_--gcE.js} +1 -1
  89. package/lib/{index-DC95G-Xg.js → index-aCI_DUM-.js} +1 -1
  90. package/lib/{index-Cc-SRhQH.mjs → index-afsYF03s.mjs} +4 -4
  91. package/lib/{index--XOWHvs8.js → index-tMk2zWGF.js} +1 -1
  92. package/lib/{index.es-CE_sbvG3.mjs → index.es-DqS4HLZw.mjs} +4 -4
  93. package/lib/{index.es-D641bRIm.js → index.es-uerP6wyE.js} +2 -2
  94. package/lib/index.js +1 -1
  95. package/lib/index.mjs +1 -1
  96. package/lib/{libsodium-wrappers-DLsfT6wH.mjs → libsodium-wrappers-B78L643V.mjs} +1 -1
  97. package/lib/{libsodium-wrappers-Dv4avoYQ.js → libsodium-wrappers-DP3-RcK9.js} +1 -1
  98. package/lib/{sei-DSmG2Vzd.mjs → sei-CvQ5fq9U.mjs} +2 -2
  99. package/lib/{sei-BgefK64I.js → sei-D8YL8hcu.js} +1 -1
  100. package/lib/{solana--NAZIp_H.mjs → solana-DIKpxJ66.mjs} +3 -3
  101. package/lib/{solana-D-xykBVb.js → solana-PbyA60e9.js} +1 -1
  102. package/lib/{solana-cDD0Ny2l.js → solana-Q02Qu6Us.js} +2 -2
  103. package/lib/{solana-DGHdzU4Y.mjs → solana-eqcW3EUS.mjs} +6 -6
  104. package/lib/{solanaEmbed.esm-CvJOxxKf.mjs → solanaEmbed.esm-B35xqpi9.mjs} +2 -2
  105. package/lib/{solanaEmbed.esm-SQGeqX2v.js → solanaEmbed.esm-DAJICEjv.js} +1 -1
  106. package/lib/src/components/ManualAddressInput.d.ts.map +1 -1
  107. package/lib/src/components/TokensModal.d.ts.map +1 -1
  108. package/lib/src/telemetry/types.d.ts +1 -0
  109. package/lib/src/telemetry/types.d.ts.map +1 -1
  110. package/lib/src/views/Bridge/Send.d.ts.map +1 -1
  111. package/lib/{sui-CabK_MAW.mjs → sui-CmBrrkS9.mjs} +1 -1
  112. package/lib/{sui-CitobCk-.js → sui-Cz7TcwK6.js} +1 -1
  113. package/lib/{sui-CnL17qoE.mjs → sui-DWSLoSDK.mjs} +4 -4
  114. package/lib/{sui-Bn1nWU88.js → sui-YcpSM6BX.js} +2 -2
  115. package/lib/{unsignedTransaction-wkSutsdc.js → unsignedTransaction-CuG8xbiM.js} +1 -1
  116. package/lib/{unsignedTransaction-Bl6mVw94.mjs → unsignedTransaction-Dgrq3Lq3.mjs} +2 -2
  117. package/package.json +1 -1
  118. package/dist/assets/cosmos-CKUC0334.js +0 -37
  119. package/dist/assets/index-DTubKMVE.js +0 -3
@@ -307723,7 +307723,7 @@ const sortTokens = (e, Re) => {
307723
307723
  return e;
307724
307724
  }
307725
307725
  };
307726
- var define_import_meta_env_default$3 = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1, REACT_APP_CONNECT_VERSION: "0.3.19-beta.1-development" };
307726
+ var define_import_meta_env_default$3 = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1, REACT_APP_CONNECT_VERSION: "0.3.19-beta.4-development" };
307727
307727
  const {
307728
307728
  REACT_APP_ETHEREUM_RPC,
307729
307729
  REACT_APP_SOLANA_RPC,
@@ -308761,7 +308761,7 @@ const {
308761
308761
  icon: Icon.USDT,
308762
308762
  tokenId: {
308763
308763
  chain: "avalanche",
308764
- address: "0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7"
308764
+ address: "0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7"
308765
308765
  },
308766
308766
  coinGeckoId: "tether",
308767
308767
  color: "#ffffff",
@@ -311304,7 +311304,7 @@ const {
311304
311304
  }
311305
311305
  }
311306
311306
  };
311307
- var define_import_meta_env_default$2 = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1, REACT_APP_CONNECT_VERSION: "0.3.19-beta.1-development" };
311307
+ var define_import_meta_env_default$2 = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1, REACT_APP_CONNECT_VERSION: "0.3.19-beta.4-development" };
311308
311308
  const {
311309
311309
  REACT_APP_GOERLI_RPC,
311310
311310
  REACT_APP_SEPOLIA_RPC,
@@ -313750,7 +313750,7 @@ const {
313750
313750
  }
313751
313751
  }
313752
313752
  };
313753
- var define_import_meta_env_default$1 = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1, REACT_APP_CONNECT_VERSION: "0.3.19-beta.1-development" };
313753
+ var define_import_meta_env_default$1 = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1, REACT_APP_CONNECT_VERSION: "0.3.19-beta.4-development" };
313754
313754
  const {
313755
313755
  REACT_APP_ETHEREUM_DEVNET_RPC,
313756
313756
  REACT_APP_OSMOSIS_DEVNET_RPC,
@@ -313870,7 +313870,7 @@ const {
313870
313870
  index: 0,
313871
313871
  keys: ["0x13947Bd48b18E53fdAeEe77F3473391aC727C638"]
313872
313872
  }
313873
- }, WORMSCAN = "https://wormholescan.io/#/", AVAILABLE_MARKETS_URL = "https://portalbridge.com/docs/faqs/liquid-markets/", CONNECT_VERSION = "0.3.19-beta.1-development";
313873
+ }, WORMSCAN = "https://wormholescan.io/#/", AVAILABLE_MARKETS_URL = "https://portalbridge.com/docs/faqs/liquid-markets/", CONNECT_VERSION = "0.3.19-beta.4-development";
313874
313874
  function wrapEventHandler(e) {
313875
313875
  return function(Re) {
313876
313876
  var Qe;
@@ -328008,7 +328008,7 @@ class SDKConverter {
328008
328008
  );
328009
328009
  }
328010
328010
  }
328011
- var define_import_meta_env_default = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1, REACT_APP_CONNECT_VERSION: "0.3.19-beta.1-development" };
328011
+ var define_import_meta_env_default = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1, REACT_APP_CONNECT_VERSION: "0.3.19-beta.4-development" };
328012
328012
  function buildConfig(e) {
328013
328013
  var ht, $n;
328014
328014
  const Re = ((e == null ? void 0 : e.network) || (e == null ? void 0 : e.env) || // TODO remove; deprecated
@@ -328374,7 +328374,7 @@ const walletConnection = {
328374
328374
  if (Fe.getNetworkInfo().chainId !== e) {
328375
328375
  if (Qe.context === Context.ETH)
328376
328376
  try {
328377
- const { switchChain: We } = await import("./evm-CI9jvgpD.mjs").then((Ze) => Ze.f);
328377
+ const { switchChain: We } = await import("./evm-FMLhTUS9.mjs").then((Ze) => Ze.f);
328378
328378
  await We(Fe, e);
328379
328379
  } catch (We) {
328380
328380
  if (We instanceof NotSupported)
@@ -328382,7 +328382,7 @@ const walletConnection = {
328382
328382
  throw We;
328383
328383
  }
328384
328384
  if (Qe.context === Context.COSMOS) {
328385
- const { switchChain: We } = await import("./cosmos-kdBLlX5J.mjs");
328385
+ const { switchChain: We } = await import("./cosmos-IWVkyjMV.mjs");
328386
328386
  await We(Fe, e);
328387
328387
  }
328388
328388
  return Fe.getAddress();
@@ -328391,7 +328391,7 @@ const walletConnection = {
328391
328391
  const Re = walletConnection[e];
328392
328392
  Re && await Re.disconnect();
328393
328393
  }, watchAsset = async (e, Re) => {
328394
- const Fe = walletConnection[Re], { watchAsset: Qe } = await import("./evm-CI9jvgpD.mjs").then((qe) => qe.f);
328394
+ const Fe = walletConnection[Re], { watchAsset: Qe } = await import("./evm-FMLhTUS9.mjs").then((qe) => qe.f);
328395
328395
  await Qe(e, Fe);
328396
328396
  }, signAndSendTransaction = async (e, Re, Fe, Qe = {}) => {
328397
328397
  const qe = config$1.chains[e], We = walletConnection[Fe];
@@ -328401,23 +328401,23 @@ const walletConnection = {
328401
328401
  case Context.ETH:
328402
328402
  return Re.transactionHash;
328403
328403
  case Context.SOLANA: {
328404
- const { signAndSendTransaction: Ze } = await import("./solana--NAZIp_H.mjs");
328404
+ const { signAndSendTransaction: Ze } = await import("./solana-DIKpxJ66.mjs");
328405
328405
  return (await Ze(Re, We, Qe)).id;
328406
328406
  }
328407
328407
  case Context.SUI: {
328408
- const { signAndSendTransaction: Ze } = await import("./sui-CabK_MAW.mjs");
328408
+ const { signAndSendTransaction: Ze } = await import("./sui-CmBrrkS9.mjs");
328409
328409
  return (await Ze(Re, We)).id;
328410
328410
  }
328411
328411
  case Context.APTOS: {
328412
- const { signAndSendTransaction: Ze } = await import("./aptos-B4K8HU4y.mjs");
328412
+ const { signAndSendTransaction: Ze } = await import("./aptos-ofb4q2o1.mjs");
328413
328413
  return (await Ze(Re, We)).id;
328414
328414
  }
328415
328415
  case Context.SEI: {
328416
- const { signAndSendTransaction: Ze } = await import("./sei-DSmG2Vzd.mjs");
328416
+ const { signAndSendTransaction: Ze } = await import("./sei-CvQ5fq9U.mjs");
328417
328417
  return (await Ze(Re, We)).id;
328418
328418
  }
328419
328419
  case Context.COSMOS: {
328420
- const { signAndSendTransaction: Ze } = await import("./cosmos-kdBLlX5J.mjs");
328420
+ const { signAndSendTransaction: Ze } = await import("./cosmos-IWVkyjMV.mjs");
328421
328421
  return (await Ze(Re, We)).id;
328422
328422
  }
328423
328423
  default:
@@ -328450,39 +328450,39 @@ const walletConnection = {
328450
328450
  if (e === void 0)
328451
328451
  return [];
328452
328452
  if (e.context === Context.ETH) {
328453
- const { wallets: Re } = await import("./evm-CI9jvgpD.mjs").then((Fe) => Fe.f);
328453
+ const { wallets: Re } = await import("./evm-FMLhTUS9.mjs").then((Fe) => Fe.f);
328454
328454
  return Object.values(mapWallets(Re, Context.ETH));
328455
328455
  } else if (e.context === Context.SOLANA) {
328456
- const { fetchOptions: Re } = await import("./solana--NAZIp_H.mjs"), Fe = Re();
328456
+ const { fetchOptions: Re } = await import("./solana-DIKpxJ66.mjs"), Fe = Re();
328457
328457
  return Object.values(mapWallets(Fe, Context.SOLANA));
328458
328458
  } else if (e.context === Context.SUI) {
328459
- const Fe = await (await import("./sui-CabK_MAW.mjs")).fetchOptions();
328459
+ const Fe = await (await import("./sui-CmBrrkS9.mjs")).fetchOptions();
328460
328460
  return Object.values(mapWallets(Fe, Context.SUI));
328461
328461
  } else if (e.context === Context.APTOS) {
328462
- const Fe = (await import("./aptos-B4K8HU4y.mjs")).fetchOptions();
328462
+ const Fe = (await import("./aptos-ofb4q2o1.mjs")).fetchOptions();
328463
328463
  return Object.values(mapWallets(Fe, Context.APTOS));
328464
328464
  } else if (e.context === Context.SEI) {
328465
- const Fe = await (await import("./sei-DSmG2Vzd.mjs")).fetchOptions();
328465
+ const Fe = await (await import("./sei-CvQ5fq9U.mjs")).fetchOptions();
328466
328466
  return Object.values(mapWallets(Fe, Context.SEI));
328467
328467
  } else if (e.context === Context.COSMOS)
328468
328468
  if (e.id === CHAIN_ID_EVMOS$1) {
328469
328469
  const {
328470
328470
  wallets: { cosmosEvm: Re }
328471
- } = await import("./cosmos-kdBLlX5J.mjs");
328471
+ } = await import("./cosmos-IWVkyjMV.mjs");
328472
328472
  return Object.values(
328473
328473
  mapWallets(Re, Context.COSMOS, ["OKX Wallet"])
328474
328474
  );
328475
328475
  } else if (e.id === CHAIN_ID_INJECTIVE$1) {
328476
328476
  const {
328477
328477
  wallets: { cosmosEvm: Re }
328478
- } = await import("./cosmos-kdBLlX5J.mjs");
328478
+ } = await import("./cosmos-IWVkyjMV.mjs");
328479
328479
  return Object.values(
328480
328480
  mapWallets(Re, Context.COSMOS, ["OKX Wallet"])
328481
328481
  );
328482
328482
  } else {
328483
328483
  const {
328484
328484
  wallets: { cosmos: Re }
328485
- } = await import("./cosmos-kdBLlX5J.mjs");
328485
+ } = await import("./cosmos-IWVkyjMV.mjs");
328486
328486
  return Object.values(mapWallets(Re, Context.COSMOS));
328487
328487
  }
328488
328488
  return [];
@@ -347398,7 +347398,7 @@ const getMessageSolana = async (e) => {
347398
347398
  relayerFee: Ar || "",
347399
347399
  relayingType: Ar ? NttRelayingType.Special : NttRelayingType.Manual
347400
347400
  };
347401
- }, evm = async () => (await import("./evm-BdLUkbt8.mjs").then((e) => e.f)).default, solana = async () => (await import("./solana-DGHdzU4Y.mjs").then((e) => e.s)).default, aptos = async () => (await import("./aptos-r2dqWkwd.mjs").then((e) => e.e)).default, sui = async () => (await import("./sui-CnL17qoE.mjs").then((e) => e.s)).default, cosmwasm = async () => (await import("./cosmwasm-BdmGrQe2.mjs").then((e) => e.a3)).default, algorand = async () => (await import("./algorand-Cn2ASQM8.mjs").then((e) => e.b)).default;
347401
+ }, evm = async () => (await import("./evm-DB1-WEEt.mjs").then((e) => e.f)).default, solana = async () => (await import("./solana-eqcW3EUS.mjs").then((e) => e.s)).default, aptos = async () => (await import("./aptos-DsuCT57P.mjs").then((e) => e.e)).default, sui = async () => (await import("./sui-DWSLoSDK.mjs").then((e) => e.s)).default, cosmwasm = async () => (await import("./cosmwasm-CGR89px_.mjs").then((e) => e.a3)).default, algorand = async () => (await import("./algorand-BNtk5Zlz.mjs").then((e) => e.b)).default;
347402
347402
  class SDKv2Route extends RouteAbstract {
347403
347403
  constructor(Fe, Qe, qe) {
347404
347404
  super();
@@ -383273,6 +383273,7 @@ function Send(e) {
383273
383273
  toToken: getTokenDetails(ht),
383274
383274
  fromChain: Ze,
383275
383275
  toChain: Xe,
383276
+ amount: Number($n),
383276
383277
  USDAmount: jn({ token: Dt, amount: $n })
383277
383278
  };
383278
383279
  if (config$1.validateTransfer)
@@ -383385,7 +383386,9 @@ function Send(e) {
383385
383386
  $r(
383386
383387
  yr.currentAddress.toLowerCase() === yr.address.toLowerCase()
383387
383388
  );
383388
- }, [yr]);
383389
+ }, [yr]), useEffect(() => {
383390
+ Or("");
383391
+ }, [Zn.address, Zn.name, e.valid]);
383389
383392
  const Pr = useMemo(() => {
383390
383393
  if (!Jn)
383391
383394
  return !1;
@@ -384101,48 +384104,48 @@ function ExplorerLink$1({
384101
384104
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: qe.dropdownItem, onClick: We, children: Qe });
384102
384105
  }
384103
384106
  function ConnectWallet(e) {
384104
- const { disabled: Re = !1, type: Fe } = e, { classes: Qe } = useStyles$y({ disabled: Re }), qe = useTheme$1(), We = useDispatch(), Ze = useMediaQuery(qe.breakpoints.down("sm")), Xe = useSelector((Un) => Un.wallet[Fe]), { manualAddressTarget: Dt } = useSelector(
384105
- (Un) => Un.transferInput
384106
- ), ht = useCallback(
384107
- (Un) => {
384108
- Re || (Un && Un.close(), Dt && We(setManualAddressTarget(!1)), We(setWalletModal(Fe)));
384109
- },
384110
- [Re, Dt]
384111
- ), $n = (Un) => {
384112
- copyTextToClipboard(Xe.address), Un.close();
384113
- }, Jn = () => {
384114
- We(disconnectWallet(Fe)), We(setManualAddressTarget(!1));
384115
- };
384116
- if (Xe && Xe.address)
384117
- return /* @__PURE__ */ jsxRuntimeExports.jsx(PopupState, { variant: "popover", popupId: "demo-popup-popover", children: (Un) => {
384118
- const { onClick: Gn, ...Fn } = bindTrigger(Un), Hn = (Wn) => {
384119
- Re || Gn(Wn);
384107
+ const { disabled: Re = !1, type: Fe, side: Qe } = e, { classes: qe } = useStyles$y({ disabled: Re }), We = useTheme$1(), Ze = useDispatch(), Xe = useMediaQuery(We.breakpoints.down("sm")), Dt = useSelector((Gn) => Gn.wallet[Fe]), { manualAddressTarget: ht } = useSelector(
384108
+ (Gn) => Gn.transferInput
384109
+ ), $n = useCallback(
384110
+ (Gn) => {
384111
+ Re || (Gn && Gn.close(), Qe === "destination" && ht && Ze(setManualAddressTarget(!1)), Ze(setWalletModal(Fe)));
384112
+ },
384113
+ [Re, ht]
384114
+ ), Jn = (Gn) => {
384115
+ copyTextToClipboard(Dt.address), Gn.close();
384116
+ }, Un = () => {
384117
+ Ze(disconnectWallet(Fe)), Qe === "destination" && Ze(setManualAddressTarget(!1));
384118
+ };
384119
+ if (Dt && Dt.address)
384120
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(PopupState, { variant: "popover", popupId: "demo-popup-popover", children: (Gn) => {
384121
+ const { onClick: Fn, ...Hn } = bindTrigger(Gn), Wn = (yr) => {
384122
+ Re || Fn(yr);
384120
384123
  };
384121
384124
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
384122
384125
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
384123
384126
  "div",
384124
384127
  {
384125
- className: Qe.connectWallet,
384126
- onClick: Hn,
384127
- ...Fn,
384128
+ className: qe.connectWallet,
384129
+ onClick: Wn,
384130
+ ...Hn,
384128
384131
  children: [
384129
384132
  /* @__PURE__ */ jsxRuntimeExports.jsx(
384130
384133
  WalletIcon,
384131
384134
  {
384132
- name: Xe.name,
384133
- icon: Xe.icon,
384135
+ name: Dt.name,
384136
+ icon: Dt.icon,
384134
384137
  height: 24
384135
384138
  }
384136
384139
  ),
384137
- displayWalletAddress(Xe.type, Xe.address),
384138
- !Re && /* @__PURE__ */ jsxRuntimeExports.jsx(DownIcon, { className: Qe.down })
384140
+ displayWalletAddress(Dt.type, Dt.address),
384141
+ !Re && /* @__PURE__ */ jsxRuntimeExports.jsx(DownIcon, { className: qe.down })
384139
384142
  ]
384140
384143
  }
384141
384144
  ),
384142
384145
  /* @__PURE__ */ jsxRuntimeExports.jsx(
384143
384146
  Popover,
384144
384147
  {
384145
- ...bindPopover(Un),
384148
+ ...bindPopover(Gn),
384146
384149
  sx: { marginTop: 1 },
384147
384150
  anchorOrigin: {
384148
384151
  vertical: "bottom",
@@ -384152,19 +384155,19 @@ function ConnectWallet(e) {
384152
384155
  vertical: "top",
384153
384156
  horizontal: "right"
384154
384157
  },
384155
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(ScopedCssBaseline, { enableColorScheme: !0, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: Qe.dropdown, children: [
384158
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(ScopedCssBaseline, { enableColorScheme: !0, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: qe.dropdown, children: [
384156
384159
  /* @__PURE__ */ jsxRuntimeExports.jsx(
384157
384160
  "div",
384158
384161
  {
384159
- className: Qe.dropdownItem,
384160
- onClick: () => $n(Un),
384162
+ className: qe.dropdownItem,
384163
+ onClick: () => Jn(Gn),
384161
384164
  children: "Copy address"
384162
384165
  }
384163
384166
  ),
384164
384167
  config$1.explorer ? /* @__PURE__ */ jsxRuntimeExports.jsx(
384165
384168
  ExplorerLink$1,
384166
384169
  {
384167
- address: Xe.address,
384170
+ address: Dt.address,
384168
384171
  href: config$1.explorer.href,
384169
384172
  target: config$1.explorer.target,
384170
384173
  label: config$1.explorer.label
@@ -384173,16 +384176,16 @@ function ConnectWallet(e) {
384173
384176
  /* @__PURE__ */ jsxRuntimeExports.jsx(
384174
384177
  "div",
384175
384178
  {
384176
- className: Qe.dropdownItem,
384177
- onClick: () => ht(Un),
384179
+ className: qe.dropdownItem,
384180
+ onClick: () => $n(Gn),
384178
384181
  children: "Change wallet"
384179
384182
  }
384180
384183
  ),
384181
384184
  /* @__PURE__ */ jsxRuntimeExports.jsx(
384182
384185
  "div",
384183
384186
  {
384184
- className: Qe.dropdownItem,
384185
- onClick: Jn,
384187
+ className: qe.dropdownItem,
384188
+ onClick: Un,
384186
384189
  children: "Disconnect"
384187
384190
  }
384188
384191
  )
@@ -384192,19 +384195,19 @@ function ConnectWallet(e) {
384192
384195
  ] });
384193
384196
  } });
384194
384197
  {
384195
- const Un = /* @__PURE__ */ jsxRuntimeExports.jsxs(
384198
+ const Gn = /* @__PURE__ */ jsxRuntimeExports.jsxs(
384196
384199
  "div",
384197
384200
  {
384198
- className: Qe.connectWallet,
384199
- onClick: () => ht(),
384201
+ className: qe.connectWallet,
384202
+ onClick: () => $n(),
384200
384203
  "data-testid": `${e.side}-section-connect-wallet-button`,
384201
384204
  children: [
384202
384205
  /* @__PURE__ */ jsxRuntimeExports.jsx(WalletIcon$1, {}),
384203
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: Ze ? "Connect" : "Connect wallet" })
384206
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: Xe ? "Connect" : "Connect wallet" })
384204
384207
  ]
384205
384208
  }
384206
384209
  );
384207
- return Re ? /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Please select a network first", children: Un }) : Un;
384210
+ return Re ? /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Please select a network first", children: Gn }) : Gn;
384208
384211
  }
384209
384212
  }
384210
384213
  const useStyles$x = makeStyles()((e) => ({
@@ -385056,7 +385059,16 @@ function TokensModal(e) {
385056
385059
  qn.replace("&targetChain={:targetChain}", ""),
385057
385060
  jn
385058
385061
  );
385059
- }, Ar = useMemo(() => ht ? Xe.filter((Cr) => Cr.symbol.toLowerCase().includes(ht) || Cr.tokenId && Cr.tokenId.address.toLowerCase().includes(ht)) : Xe, [Xe, ht]), $r = () => {
385062
+ }, Ar = useMemo(() => ht ? Xe.filter((Cr) => {
385063
+ var qn, vr, xr;
385064
+ return [
385065
+ Cr.symbol.toLowerCase(),
385066
+ (xr = (vr = (qn = Cr.tokenId) == null ? void 0 : qn.address) == null ? void 0 : vr.toLowerCase) == null ? void 0 : xr.call(vr),
385067
+ ...Object.values(Cr.foreignAssets || {}).map(
385068
+ (Ir) => Ir.address.toLowerCase()
385069
+ )
385070
+ ].filter(Boolean).some((Ir) => Ir == null ? void 0 : Ir.includes(ht));
385071
+ }) : Xe, [Xe, ht]), $r = () => {
385060
385072
  setTimeout(() => $n(""), 500), e.onClose();
385061
385073
  }, Yn = (Cr) => {
385062
385074
  e.onSelect(Cr), $r();
@@ -390364,7 +390376,9 @@ const ManualAddressInput = (e) => {
390364
390376
  const [Re, Fe] = useState(""), Qe = async () => Fe(await navigator.clipboard.readText()), qe = (Ze) => {
390365
390377
  Fe(Ze.target.value);
390366
390378
  }, We = () => {
390367
- e.handleManualConnect(Re);
390379
+ let Ze = Re;
390380
+ const Xe = /(.*):0x/;
390381
+ Xe.test(Ze) && (Ze = Ze.replace(Xe, "0x")), e.handleManualConnect(Ze);
390368
390382
  };
390369
390383
  return /* @__PURE__ */ jsxRuntimeExports.jsx(FormGroup, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { display: "flex", flexDirection: "column", gap: 1, children: [
390370
390384
  /* @__PURE__ */ jsxRuntimeExports.jsxs(FormControl, { variant: "outlined", children: [
@@ -1 +1 @@
1
- "use strict";var D=Object.defineProperty;var H=(o,e,t)=>e in o?D(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var p=(o,e,t)=>(H(o,typeof e!="symbol"?e+"":e,t),t);const n=require("./index-Cpfo_13K.js"),l=require("./algorand-BEj3eMlU.js"),z=require("./create-BC4-6NQa.js"),$=require("./chain-BS9tnRQF.js");class K{constructor(e,t,r,s,i=!1){p(this,"transaction");p(this,"network");p(this,"chain");p(this,"description");p(this,"parallelizable");this.transaction=e,this.network=t,this.chain=r,this.description=s,this.parallelizable=i}}const V=1002e3,U=15,L=127,C=8,N=L*C,F=L*U,O=C*F,y={_limit:127,encodingLength:o=>{let e=0;for(;o>=128;e++)o>>=7;return e+1},encode:(o,e,t)=>{if(typeof o=="bigint"&&(o=l.safeBigIntToNumber(o)),o<0)throw new RangeError("value must be unsigned");const r=y.encodingLength(o);if(e=e||new ArrayBuffer(r),t=t||0,e.byteLength<t+r)throw new RangeError("the buffer is too small to encode the number at the offset");const s=new Uint8Array(e,t);let i=0;for(;y._limit<o;)s[i++]=o&y._limit|128,o>>=7;return s[i]=Number(o),s},decode:(o,e=0)=>{let t=0,r=0,s;do{if(s=o[e+r],s===void 0)throw new RangeError("offset out of range");t+=(s&y._limit)<<r*7,r++}while(128<=s);return t}},u={forMessageId:(o,e)=>{const t=n.decodeAddress(n.getApplicationAddress(o)).publicKey,r=e.emitter.toUniversalAddress().toUint8Array(),s=n.bignum.toBytes(BigInt(n.toChainId(e.chain)),2),i=n.bytes.concat(s,r);return u.fromData({appId:o,appAddress:t,idx:e.sequence/BigInt(O),address:i})},forWrappedAsset:(o,e)=>{if(n.isNative(e.address))throw new Error("native asset cannot be a wrapped asset");const t=n.decodeAddress(n.getApplicationAddress(o)).publicKey;return u.fromData({appId:o,appAddress:t,idx:BigInt(n.toChainId(e.chain)),address:e.address.toUniversalAddress().toUint8Array()})},forNativeAsset:(o,e)=>{const t=n.decodeAddress(n.getApplicationAddress(o)).publicKey;return u.fromData({appId:o,appAddress:t,idx:e,address:n.bytes.encode("native")})},forGuardianSet:(o,e)=>{const t=n.decodeAddress(n.getApplicationAddress(o)).publicKey;return u.fromData({appId:o,appAddress:t,idx:BigInt(e),address:n.bytes.encode("guardian")})},forEmitter:(o,e)=>{const t=n.decodeAddress(n.getApplicationAddress(o)).publicKey;return u.fromData({appId:o,appAddress:t,idx:0n,address:e})},_encode:o=>typeof o=="bigint"?[n.hex.encode(y.encode(o))]:[n.hex.encode(y.encode(o.length)),n.hex.encode(o)],fromData:o=>{const e=["0620010181",...u._encode(o.idx),"4880",...u._encode(o.address),"483110810612443119221244311881",...u._encode(o.appId),"1244312080",...u._encode(o.appAddress),"124431018100124431093203124431153203124422"],t=n.hex.decode(e.join(""));return new n.LogicSigAccount(t)},decodeLocalState:async(o,e,t)=>{let r;try{const a=await o.accountApplicationInformation(t,l.safeBigIntToNumber(e)).do();r=n.AccountApplicationResponse.from_obj_for_encoding(a).appLocalState}catch{return new Uint8Array}const s=n.b64.encode("meta");let i=new Map;for(const a of r.keyValue){if(a.key===s)continue;const g=n.b64.decode(a.key)[0],A=n.b64.decode(a.value.bytes);i.set(g,A)}const d=[];for(let a=0;a<U;a++)i.has(a)&&d.push(i.get(a));return n.bytes.concat(...d)},checkBitsSet:async(o,e,t,r)=>{let s=!1,i;const d=await o.accountInformation(t).do(),g=n.Account.from_obj_for_encoding(d).appsLocalState;if(g&&g.forEach(m=>{BigInt(m.id)===e&&(i=m.keyValue)}),(i==null?void 0:i.length)===0)return s;const A=BigInt(O),h=BigInt(8),b=r/A*A,x=l.safeBigIntToNumber(r-b),w=Math.floor(x/N),I=Math.floor((x-w*N)/8),_=n.b64.encode(n.bignum.toBytes(w,1));return i==null||i.forEach(m=>{if(m.key===_){const k=n.dist.Buffer.from(m.value.bytes,"base64"),S=1<<l.safeBigIntToNumber(r%h);s=(k[I]&S)!=0;return}}),s},storageAccountExists:async(o,e,t)=>{try{const r=await o.accountApplicationInformation(e,l.safeBigIntToNumber(t)).do();return Object.keys(r).length>0}catch{}return!1}},c=class c{constructor(e,t,r,s){p(this,"network");p(this,"chain");p(this,"connection");p(this,"contracts");p(this,"chainId");p(this,"coreAppId");p(this,"coreAppAddress");p(this,"tokenBridgeAppId");p(this,"tokenBridgeAppAddress");if(this.network=e,this.chain=t,this.connection=r,this.contracts=s,this.chainId=n.toChainId(t),!s.coreBridge)throw new Error(`Core contract address for chain ${t} not found`);const i=BigInt(s.coreBridge);if(this.coreAppId=i,this.coreAppAddress=n.getApplicationAddress(i),!s.tokenBridge)throw new Error(`TokenBridge contract address for chain ${t} not found`);const d=BigInt(s.tokenBridge);this.tokenBridgeAppId=d,this.tokenBridgeAppAddress=n.getApplicationAddress(d)}getGuardianSet(e){throw new Error("Method not implemented.")}async*verifyMessage(e,t,r){const s=new l.AlgorandAddress(e).toString(),i=await c.submitVAAHeader(this.connection,this.coreAppId,r??this.coreAppId,t,s);for(const d of i.txs)yield this.createUnsignedTx(d,"Core.verifyMessage")}static async fromRpc(e,t){const[r,s]=await l.AlgorandPlatform.chainFromRpc(e),i=t[s];if(i.network!==r)throw new Error(`Network mismatch: ${i.network} !== ${r}`);return new c(r,s,e,i.contracts)}async*publishMessage(e,t){const r=new l.AlgorandAddress(e),s=r.toString(),i=await this.connection.getTransactionParams().do(),d=u.forEmitter(this.coreAppId,r.toUint8Array()),{accounts:a,txs:g}=await c.maybeCreateStorageTx(this.connection,s,this.coreAppId,d,i);for(const h of g)yield this.createUnsignedTx(h,"Core.publishMessage",!0);const A=n.makeApplicationCallTxnFromObject({from:s,appIndex:l.safeBigIntToNumber(this.coreAppId),appArgs:[c.publishMessage,t,n.bignum.toBytes(0n,8)],accounts:a,onComplete:n.OnApplicationComplete.NoOpOC,suggestedParams:i});yield this.createUnsignedTx({tx:A},"Core.publishMessage",!0)}async getMessageFee(){var s;const e=await this.connection.getApplicationByID(l.safeBigIntToNumber(this.coreAppId)).do(),r=(s=n.Application.from_obj_for_encoding(e).params.globalState)==null?void 0:s.find(i=>i.key===c.feeKey);return r?BigInt(r.value.uint):0n}async getGuardianSetIndex(){throw new Error("Not implemented")}async parseTransaction(e){const t=await this.connection.pendingTransactionInformation(e).do(),r=n.PendingTransactionResponse.from_obj_for_encoding(t);return this.parseTx(r).map(s=>({chain:s.emitterChain,emitter:s.emitterAddress,sequence:s.sequence}))}async parseMessages(e){const t=await this.connection.pendingTransactionInformation(e).do(),r=n.PendingTransactionResponse.from_obj_for_encoding(t);return this.parseTx(r)}parseTx(e){const t=[];if(e.innerTxns&&e.innerTxns.length>0&&t.push(...e.innerTxns.flatMap(g=>this.parseTx(g))),BigInt(e.txn.txn.apid??0)!==this.coreAppId||!e.logs||e.logs.length===0)return t;const r=e.txn.txn.apaa??[];if(r.length!==3||!n.bytes.equals(new Uint8Array(r[0]),c.publishMessage))return t;const s=n.bignum.decode(e.logs[0]),i=new l.AlgorandAddress(e.txn.txn.snd).toUniversalAddress(),d=new Uint8Array(r[1]),a=n.bignum.decode(r[2]);return t.push(z.createVAA("Uint8Array",{emitterChain:this.chain,emitterAddress:i,sequence:s,guardianSet:0,timestamp:0,consistencyLevel:0,nonce:Number(a),payload:d,signatures:[]})),t}static async maybeCreateStorageTx(e,t,r,s,i){const d=n.getApplicationAddress(r),a=s.address(),g=[];if(await u.storageAccountExists(e,a,r))return{accounts:[a],txs:g};i=i??await e.getTransactionParams().do();const A=n.makePaymentTxnWithSuggestedParamsFromObject({from:t,to:a,amount:V,suggestedParams:i});A.fee=A.fee*2,g.push({tx:A});const h=n.makeApplicationOptInTxnFromObject({from:a,appIndex:l.safeBigIntToNumber(r),rekeyTo:d,suggestedParams:i});return h.fee=0,g.push({tx:h,signer:{address:s.address(),signTxn:b=>Promise.resolve(n.signLogicSigTransaction(b,s).blob)}}),{accounts:[a],txs:g}}static async submitVAAHeader(e,t,r,s,i,d){d=d??await e.getTransactionParams().do();let a=[];const g=u.forMessageId(r,{chain:s.emitterChain,sequence:s.sequence,emitter:s.emitterAddress}),{accounts:A,txs:h}=await c.maybeCreateStorageTx(e,i,r,g,d);a.push(...h);const b=u.forGuardianSet(t,s.guardianSet),{accounts:[x],txs:w}=await c.maybeCreateStorageTx(e,i,t,b,d);a.push(...w);let I=[...A,x];const _=await u.decodeLocalState(e,t,x),m=n.keccak_256(s.hash),k=s.signatures.length,S=Math.ceil(k/c.MAX_SIGS_PER_TXN),E=20,v=new n.LogicSigAccount(c.ALGO_VERIFY);for(let R=0;R<S;R++){const G=R*c.MAX_SIGS_PER_TXN,B=s.signatures.slice(G,G+c.MAX_SIGS_PER_TXN),Y=B.length*E,X=new Uint8Array(Y);for(let f=0;f<B.length;f++){const j=B[f],q=_.slice(j.guardianIndex*E+1,(j.guardianIndex+1)*E+1);X.set(q,f*20)}const P=n.makeApplicationCallTxnFromObject({appArgs:[c.verifySigs,n.bytes.concat(...B.map(f=>n.bytes.concat(new Uint8Array([f.guardianIndex]),f.signature.encode()))),X,m],accounts:I,appIndex:l.safeBigIntToNumber(t),from:c.ALGO_VERIFY_HASH,onComplete:n.OnApplicationComplete.NoOpOC,suggestedParams:d});P.fee=0,a.push({tx:P,signer:{address:v.address(),signTxn:f=>Promise.resolve(n.signLogicSigTransaction(f,v).blob)}})}const M=n.makeApplicationCallTxnFromObject({appArgs:[c.verifyVaa,n.serialize(s)],accounts:I,appIndex:l.safeBigIntToNumber(t),from:i,onComplete:n.OnApplicationComplete.NoOpOC,suggestedParams:d});return M.fee=M.fee*(2+S),a.push({tx:M}),{accounts:I,txs:a}}createUnsignedTx(e,t,r=!0){return new K(e,this.network,this.chain,t,r)}};p(c,"MAX_SIGS_PER_TXN",6),p(c,"ALGO_VERIFY_HASH","EZATROXX2HISIRZDRGXW4LRQ46Z6IUJYYIHU3PJGP7P5IQDPKVX42N767A"),p(c,"ALGO_VERIFY",new Uint8Array([6,32,4,1,0,32,20,38,1,0,49,32,50,3,18,68,49,1,35,18,68,49,16,129,6,18,68,54,26,1,54,26,3,54,26,2,136,0,3,68,34,67,53,2,53,1,53,0,40,53,240,40,53,241,52,0,21,53,5,35,53,3,35,53,4,52,3,52,5,12,65,0,68,52,1,52,0,52,3,129,65,8,34,88,23,52,0,52,3,34,8,36,88,52,0,52,3,129,33,8,36,88,7,0,53,241,53,240,52,2,52,4,37,88,52,240,52,241,80,2,87,12,20,18,68,52,3,129,66,8,53,3,52,4,37,8,53,4,66,255,180,34,137])),p(c,"feeKey",n.b64.encode("MessageFee")),p(c,"verifyVaa",n.bytes.encode("verifyVAA")),p(c,"verifySigs",n.bytes.encode("verifySigs")),p(c,"publishMessage",n.bytes.encode("publishMessage"));let T=c;$.registerProtocol("Algorand","WormholeCore",T);const Z=Object.freeze(Object.defineProperty({__proto__:null,AlgorandWormholeCore:T,BITS_PER_BYTE:C,BITS_PER_KEY:N,MAX_BITS:O,MAX_BYTES:F,MAX_BYTES_PER_KEY:L,MAX_KEYS:U,SEED_AMT:V,StorageLogicSig:u,varint:y},Symbol.toStringTag,{value:"Module"}));exports.AlgorandUnsignedTransaction=K;exports.AlgorandWormholeCore=T;exports.StorageLogicSig=u;exports.index=Z;
1
+ "use strict";var D=Object.defineProperty;var H=(o,e,t)=>e in o?D(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var p=(o,e,t)=>(H(o,typeof e!="symbol"?e+"":e,t),t);const n=require("./index-DfYc88fY.js"),l=require("./algorand-BOA88Yi9.js"),z=require("./create-Bpjnlpg_.js"),$=require("./chain-NLYiTi92.js");class K{constructor(e,t,r,s,i=!1){p(this,"transaction");p(this,"network");p(this,"chain");p(this,"description");p(this,"parallelizable");this.transaction=e,this.network=t,this.chain=r,this.description=s,this.parallelizable=i}}const V=1002e3,U=15,L=127,C=8,N=L*C,F=L*U,O=C*F,y={_limit:127,encodingLength:o=>{let e=0;for(;o>=128;e++)o>>=7;return e+1},encode:(o,e,t)=>{if(typeof o=="bigint"&&(o=l.safeBigIntToNumber(o)),o<0)throw new RangeError("value must be unsigned");const r=y.encodingLength(o);if(e=e||new ArrayBuffer(r),t=t||0,e.byteLength<t+r)throw new RangeError("the buffer is too small to encode the number at the offset");const s=new Uint8Array(e,t);let i=0;for(;y._limit<o;)s[i++]=o&y._limit|128,o>>=7;return s[i]=Number(o),s},decode:(o,e=0)=>{let t=0,r=0,s;do{if(s=o[e+r],s===void 0)throw new RangeError("offset out of range");t+=(s&y._limit)<<r*7,r++}while(128<=s);return t}},u={forMessageId:(o,e)=>{const t=n.decodeAddress(n.getApplicationAddress(o)).publicKey,r=e.emitter.toUniversalAddress().toUint8Array(),s=n.bignum.toBytes(BigInt(n.toChainId(e.chain)),2),i=n.bytes.concat(s,r);return u.fromData({appId:o,appAddress:t,idx:e.sequence/BigInt(O),address:i})},forWrappedAsset:(o,e)=>{if(n.isNative(e.address))throw new Error("native asset cannot be a wrapped asset");const t=n.decodeAddress(n.getApplicationAddress(o)).publicKey;return u.fromData({appId:o,appAddress:t,idx:BigInt(n.toChainId(e.chain)),address:e.address.toUniversalAddress().toUint8Array()})},forNativeAsset:(o,e)=>{const t=n.decodeAddress(n.getApplicationAddress(o)).publicKey;return u.fromData({appId:o,appAddress:t,idx:e,address:n.bytes.encode("native")})},forGuardianSet:(o,e)=>{const t=n.decodeAddress(n.getApplicationAddress(o)).publicKey;return u.fromData({appId:o,appAddress:t,idx:BigInt(e),address:n.bytes.encode("guardian")})},forEmitter:(o,e)=>{const t=n.decodeAddress(n.getApplicationAddress(o)).publicKey;return u.fromData({appId:o,appAddress:t,idx:0n,address:e})},_encode:o=>typeof o=="bigint"?[n.hex.encode(y.encode(o))]:[n.hex.encode(y.encode(o.length)),n.hex.encode(o)],fromData:o=>{const e=["0620010181",...u._encode(o.idx),"4880",...u._encode(o.address),"483110810612443119221244311881",...u._encode(o.appId),"1244312080",...u._encode(o.appAddress),"124431018100124431093203124431153203124422"],t=n.hex.decode(e.join(""));return new n.LogicSigAccount(t)},decodeLocalState:async(o,e,t)=>{let r;try{const a=await o.accountApplicationInformation(t,l.safeBigIntToNumber(e)).do();r=n.AccountApplicationResponse.from_obj_for_encoding(a).appLocalState}catch{return new Uint8Array}const s=n.b64.encode("meta");let i=new Map;for(const a of r.keyValue){if(a.key===s)continue;const g=n.b64.decode(a.key)[0],A=n.b64.decode(a.value.bytes);i.set(g,A)}const d=[];for(let a=0;a<U;a++)i.has(a)&&d.push(i.get(a));return n.bytes.concat(...d)},checkBitsSet:async(o,e,t,r)=>{let s=!1,i;const d=await o.accountInformation(t).do(),g=n.Account.from_obj_for_encoding(d).appsLocalState;if(g&&g.forEach(m=>{BigInt(m.id)===e&&(i=m.keyValue)}),(i==null?void 0:i.length)===0)return s;const A=BigInt(O),h=BigInt(8),b=r/A*A,x=l.safeBigIntToNumber(r-b),w=Math.floor(x/N),I=Math.floor((x-w*N)/8),_=n.b64.encode(n.bignum.toBytes(w,1));return i==null||i.forEach(m=>{if(m.key===_){const k=n.dist.Buffer.from(m.value.bytes,"base64"),S=1<<l.safeBigIntToNumber(r%h);s=(k[I]&S)!=0;return}}),s},storageAccountExists:async(o,e,t)=>{try{const r=await o.accountApplicationInformation(e,l.safeBigIntToNumber(t)).do();return Object.keys(r).length>0}catch{}return!1}},c=class c{constructor(e,t,r,s){p(this,"network");p(this,"chain");p(this,"connection");p(this,"contracts");p(this,"chainId");p(this,"coreAppId");p(this,"coreAppAddress");p(this,"tokenBridgeAppId");p(this,"tokenBridgeAppAddress");if(this.network=e,this.chain=t,this.connection=r,this.contracts=s,this.chainId=n.toChainId(t),!s.coreBridge)throw new Error(`Core contract address for chain ${t} not found`);const i=BigInt(s.coreBridge);if(this.coreAppId=i,this.coreAppAddress=n.getApplicationAddress(i),!s.tokenBridge)throw new Error(`TokenBridge contract address for chain ${t} not found`);const d=BigInt(s.tokenBridge);this.tokenBridgeAppId=d,this.tokenBridgeAppAddress=n.getApplicationAddress(d)}getGuardianSet(e){throw new Error("Method not implemented.")}async*verifyMessage(e,t,r){const s=new l.AlgorandAddress(e).toString(),i=await c.submitVAAHeader(this.connection,this.coreAppId,r??this.coreAppId,t,s);for(const d of i.txs)yield this.createUnsignedTx(d,"Core.verifyMessage")}static async fromRpc(e,t){const[r,s]=await l.AlgorandPlatform.chainFromRpc(e),i=t[s];if(i.network!==r)throw new Error(`Network mismatch: ${i.network} !== ${r}`);return new c(r,s,e,i.contracts)}async*publishMessage(e,t){const r=new l.AlgorandAddress(e),s=r.toString(),i=await this.connection.getTransactionParams().do(),d=u.forEmitter(this.coreAppId,r.toUint8Array()),{accounts:a,txs:g}=await c.maybeCreateStorageTx(this.connection,s,this.coreAppId,d,i);for(const h of g)yield this.createUnsignedTx(h,"Core.publishMessage",!0);const A=n.makeApplicationCallTxnFromObject({from:s,appIndex:l.safeBigIntToNumber(this.coreAppId),appArgs:[c.publishMessage,t,n.bignum.toBytes(0n,8)],accounts:a,onComplete:n.OnApplicationComplete.NoOpOC,suggestedParams:i});yield this.createUnsignedTx({tx:A},"Core.publishMessage",!0)}async getMessageFee(){var s;const e=await this.connection.getApplicationByID(l.safeBigIntToNumber(this.coreAppId)).do(),r=(s=n.Application.from_obj_for_encoding(e).params.globalState)==null?void 0:s.find(i=>i.key===c.feeKey);return r?BigInt(r.value.uint):0n}async getGuardianSetIndex(){throw new Error("Not implemented")}async parseTransaction(e){const t=await this.connection.pendingTransactionInformation(e).do(),r=n.PendingTransactionResponse.from_obj_for_encoding(t);return this.parseTx(r).map(s=>({chain:s.emitterChain,emitter:s.emitterAddress,sequence:s.sequence}))}async parseMessages(e){const t=await this.connection.pendingTransactionInformation(e).do(),r=n.PendingTransactionResponse.from_obj_for_encoding(t);return this.parseTx(r)}parseTx(e){const t=[];if(e.innerTxns&&e.innerTxns.length>0&&t.push(...e.innerTxns.flatMap(g=>this.parseTx(g))),BigInt(e.txn.txn.apid??0)!==this.coreAppId||!e.logs||e.logs.length===0)return t;const r=e.txn.txn.apaa??[];if(r.length!==3||!n.bytes.equals(new Uint8Array(r[0]),c.publishMessage))return t;const s=n.bignum.decode(e.logs[0]),i=new l.AlgorandAddress(e.txn.txn.snd).toUniversalAddress(),d=new Uint8Array(r[1]),a=n.bignum.decode(r[2]);return t.push(z.createVAA("Uint8Array",{emitterChain:this.chain,emitterAddress:i,sequence:s,guardianSet:0,timestamp:0,consistencyLevel:0,nonce:Number(a),payload:d,signatures:[]})),t}static async maybeCreateStorageTx(e,t,r,s,i){const d=n.getApplicationAddress(r),a=s.address(),g=[];if(await u.storageAccountExists(e,a,r))return{accounts:[a],txs:g};i=i??await e.getTransactionParams().do();const A=n.makePaymentTxnWithSuggestedParamsFromObject({from:t,to:a,amount:V,suggestedParams:i});A.fee=A.fee*2,g.push({tx:A});const h=n.makeApplicationOptInTxnFromObject({from:a,appIndex:l.safeBigIntToNumber(r),rekeyTo:d,suggestedParams:i});return h.fee=0,g.push({tx:h,signer:{address:s.address(),signTxn:b=>Promise.resolve(n.signLogicSigTransaction(b,s).blob)}}),{accounts:[a],txs:g}}static async submitVAAHeader(e,t,r,s,i,d){d=d??await e.getTransactionParams().do();let a=[];const g=u.forMessageId(r,{chain:s.emitterChain,sequence:s.sequence,emitter:s.emitterAddress}),{accounts:A,txs:h}=await c.maybeCreateStorageTx(e,i,r,g,d);a.push(...h);const b=u.forGuardianSet(t,s.guardianSet),{accounts:[x],txs:w}=await c.maybeCreateStorageTx(e,i,t,b,d);a.push(...w);let I=[...A,x];const _=await u.decodeLocalState(e,t,x),m=n.keccak_256(s.hash),k=s.signatures.length,S=Math.ceil(k/c.MAX_SIGS_PER_TXN),E=20,v=new n.LogicSigAccount(c.ALGO_VERIFY);for(let R=0;R<S;R++){const G=R*c.MAX_SIGS_PER_TXN,B=s.signatures.slice(G,G+c.MAX_SIGS_PER_TXN),Y=B.length*E,X=new Uint8Array(Y);for(let f=0;f<B.length;f++){const j=B[f],q=_.slice(j.guardianIndex*E+1,(j.guardianIndex+1)*E+1);X.set(q,f*20)}const P=n.makeApplicationCallTxnFromObject({appArgs:[c.verifySigs,n.bytes.concat(...B.map(f=>n.bytes.concat(new Uint8Array([f.guardianIndex]),f.signature.encode()))),X,m],accounts:I,appIndex:l.safeBigIntToNumber(t),from:c.ALGO_VERIFY_HASH,onComplete:n.OnApplicationComplete.NoOpOC,suggestedParams:d});P.fee=0,a.push({tx:P,signer:{address:v.address(),signTxn:f=>Promise.resolve(n.signLogicSigTransaction(f,v).blob)}})}const M=n.makeApplicationCallTxnFromObject({appArgs:[c.verifyVaa,n.serialize(s)],accounts:I,appIndex:l.safeBigIntToNumber(t),from:i,onComplete:n.OnApplicationComplete.NoOpOC,suggestedParams:d});return M.fee=M.fee*(2+S),a.push({tx:M}),{accounts:I,txs:a}}createUnsignedTx(e,t,r=!0){return new K(e,this.network,this.chain,t,r)}};p(c,"MAX_SIGS_PER_TXN",6),p(c,"ALGO_VERIFY_HASH","EZATROXX2HISIRZDRGXW4LRQ46Z6IUJYYIHU3PJGP7P5IQDPKVX42N767A"),p(c,"ALGO_VERIFY",new Uint8Array([6,32,4,1,0,32,20,38,1,0,49,32,50,3,18,68,49,1,35,18,68,49,16,129,6,18,68,54,26,1,54,26,3,54,26,2,136,0,3,68,34,67,53,2,53,1,53,0,40,53,240,40,53,241,52,0,21,53,5,35,53,3,35,53,4,52,3,52,5,12,65,0,68,52,1,52,0,52,3,129,65,8,34,88,23,52,0,52,3,34,8,36,88,52,0,52,3,129,33,8,36,88,7,0,53,241,53,240,52,2,52,4,37,88,52,240,52,241,80,2,87,12,20,18,68,52,3,129,66,8,53,3,52,4,37,8,53,4,66,255,180,34,137])),p(c,"feeKey",n.b64.encode("MessageFee")),p(c,"verifyVaa",n.bytes.encode("verifyVAA")),p(c,"verifySigs",n.bytes.encode("verifySigs")),p(c,"publishMessage",n.bytes.encode("publishMessage"));let T=c;$.registerProtocol("Algorand","WormholeCore",T);const Z=Object.freeze(Object.defineProperty({__proto__:null,AlgorandWormholeCore:T,BITS_PER_BYTE:C,BITS_PER_KEY:N,MAX_BITS:O,MAX_BYTES:F,MAX_BYTES_PER_KEY:L,MAX_KEYS:U,SEED_AMT:V,StorageLogicSig:u,varint:y},Symbol.toStringTag,{value:"Module"}));exports.AlgorandUnsignedTransaction=K;exports.AlgorandWormholeCore=T;exports.StorageLogicSig=u;exports.index=Z;
@@ -1,11 +1,11 @@
1
1
  var lr = Object.defineProperty;
2
2
  var fr = (t, e, n) => e in t ? lr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var B = (t, e, n) => (fr(t, typeof e != "symbol" ? e + "" : e, n), n);
4
- import { d as L, g as lt, a as hr, n as gr, b as Ie, c as mr, e as be, f as Ae, h as pr, i as yr, B as wr, j as ft, k as Sr, S as kr, l as br, m as Ar } from "./index-Cc-SRhQH.mjs";
5
- import { n as I, aH as V, aI as g, aJ as S, aK as j, aL as P, aM as fe, aN as Re, aO as ne, aP as Bn, aQ as re, a2 as X, aF as O, aG as Xt, aR as Xe, aS as Mr, aT as Tr, aU as Br, aV as Cr, aW as Ir, c9 as ce, d as A, ca as ke, cb as W, cc as Qt, cd as vr, bp as x, aC as Er, au as Cn, ce as In, c5 as kt, c6 as Pr, az as xe, bO as Mt, b5 as Rr } from "./index-DjJSdBO_.mjs";
4
+ import { d as L, g as lt, a as hr, n as gr, b as Ie, c as mr, e as be, f as Ae, h as pr, i as yr, B as wr, j as ft, k as Sr, S as kr, l as br, m as Ar } from "./index-afsYF03s.mjs";
5
+ import { n as I, aH as V, aI as g, aJ as S, aK as j, aL as P, aM as fe, aN as Re, aO as ne, aP as Bn, aQ as re, a2 as X, aF as O, aG as Xt, aR as Xe, aS as Mr, aT as Tr, aU as Br, aV as Cr, aW as Ir, c9 as ce, d as A, ca as ke, cb as W, cc as Qt, cd as vr, bp as x, aC as Er, au as Cn, ce as In, c5 as kt, c6 as Pr, az as xe, bO as Mt, b5 as Rr } from "./index-C1JlVOwd.mjs";
6
6
  import { c as xr } from "./index-DpFNxVts.mjs";
7
- import { S as qe, a as q, b as vn, _ as En } from "./solana-DGHdzU4Y.mjs";
8
- import { r as Pn } from "./chain-CNimQoal.mjs";
7
+ import { S as qe, a as q, b as vn, _ as En } from "./solana-eqcW3EUS.mjs";
8
+ import { r as Pn } from "./chain-BZjg2BoT.mjs";
9
9
  class Wr extends TypeError {
10
10
  constructor(e, n) {
11
11
  let r;
@@ -1 +1 @@
1
- "use strict";var u=Object.defineProperty;var w=(i,e,r)=>e in i?u(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r;var c=(i,e,r)=>(w(i,typeof e!="symbol"?e+"":e,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./cosmwasm-t4y0gzD9.js"),l=require("./create-BC4-6NQa.js"),h=require("./index-Cpfo_13K.js"),g=require("./chain-BS9tnRQF.js");class o{constructor(e,r,s,t){c(this,"network");c(this,"chain");c(this,"rpc");c(this,"contracts");c(this,"coreAddress");this.network=e,this.chain=r,this.rpc=s,this.contracts=t;const n=this.contracts.coreBridge;if(!n)throw new Error(`Wormhole Token Bridge contract for domain ${r} not found`);this.coreAddress=n}getGuardianSet(e){throw new Error("Method not implemented.")}getGuardianSetIndex(){throw new Error("Method not implemented.")}getMessageFee(){throw new Error("Method not implemented.")}static async fromRpc(e,r){const[s,t]=await m.CosmwasmPlatform.chainFromRpc(e),n=r[t];if(n.network!==s)throw new Error(`Network mismatch: ${n.network} != ${s}`);return new o(s,t,e,n.contracts)}async*publishMessage(e,r,s,t){throw new Error("Method not implemented.")}async*verifyMessage(e,r){throw new Error("Not implemented.")}async parseTransaction(e){const r=await this.rpc.getTx(e);if(!r)throw new Error("No transaction found for txid: "+e);return[o.parseWormholeMessageId(this.chain,this.coreAddress,r)]}async parseMessages(e){const r=await this.rpc.getTx(e);if(!r)throw new Error("No transaction found for txid: "+e);return[o.parseWormholeMessage(this.chain,this.coreAddress,r)]}static parseWormholeMessage(e,r,s){const t=s.events.filter(a=>a.type==="wasm"&&a.attributes[0].key==="_contract_address"&&a.attributes[0].value===r);if(t.length===0)throw new Error("No wormhole message found in tx");t.length>1&&console.error(`Expected single message, found ${t.length}`);const[n]=t,d=Object.fromEntries(n.attributes.map(a=>[a.key.split(".")[1],a.value]));return l.createVAA("Uint8Array",{emitterChain:e,emitterAddress:new h.UniversalAddress(h.hex.decode(d.sender)),sequence:BigInt(d.sequence),guardianSet:0,timestamp:Number(d.block_time),consistencyLevel:0,nonce:Number(d.nonce),signatures:[],payload:h.hex.decode(d.message)})}static parseWormholeMessageId(e,r,s){const t=o.parseWormholeMessage(e,r,s);return{chain:t.emitterChain,emitter:t.emitterAddress,sequence:t.sequence}}}g.registerProtocol(m._platform,"WormholeCore",o);exports.CosmwasmWormholeCore=o;
1
+ "use strict";var u=Object.defineProperty;var w=(i,e,r)=>e in i?u(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r;var c=(i,e,r)=>(w(i,typeof e!="symbol"?e+"":e,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./cosmwasm-BFtZD1Ru.js"),l=require("./create-Bpjnlpg_.js"),h=require("./index-DfYc88fY.js"),g=require("./chain-NLYiTi92.js");class o{constructor(e,r,s,t){c(this,"network");c(this,"chain");c(this,"rpc");c(this,"contracts");c(this,"coreAddress");this.network=e,this.chain=r,this.rpc=s,this.contracts=t;const n=this.contracts.coreBridge;if(!n)throw new Error(`Wormhole Token Bridge contract for domain ${r} not found`);this.coreAddress=n}getGuardianSet(e){throw new Error("Method not implemented.")}getGuardianSetIndex(){throw new Error("Method not implemented.")}getMessageFee(){throw new Error("Method not implemented.")}static async fromRpc(e,r){const[s,t]=await m.CosmwasmPlatform.chainFromRpc(e),n=r[t];if(n.network!==s)throw new Error(`Network mismatch: ${n.network} != ${s}`);return new o(s,t,e,n.contracts)}async*publishMessage(e,r,s,t){throw new Error("Method not implemented.")}async*verifyMessage(e,r){throw new Error("Not implemented.")}async parseTransaction(e){const r=await this.rpc.getTx(e);if(!r)throw new Error("No transaction found for txid: "+e);return[o.parseWormholeMessageId(this.chain,this.coreAddress,r)]}async parseMessages(e){const r=await this.rpc.getTx(e);if(!r)throw new Error("No transaction found for txid: "+e);return[o.parseWormholeMessage(this.chain,this.coreAddress,r)]}static parseWormholeMessage(e,r,s){const t=s.events.filter(a=>a.type==="wasm"&&a.attributes[0].key==="_contract_address"&&a.attributes[0].value===r);if(t.length===0)throw new Error("No wormhole message found in tx");t.length>1&&console.error(`Expected single message, found ${t.length}`);const[n]=t,d=Object.fromEntries(n.attributes.map(a=>[a.key.split(".")[1],a.value]));return l.createVAA("Uint8Array",{emitterChain:e,emitterAddress:new h.UniversalAddress(h.hex.decode(d.sender)),sequence:BigInt(d.sequence),guardianSet:0,timestamp:Number(d.block_time),consistencyLevel:0,nonce:Number(d.nonce),signatures:[],payload:h.hex.decode(d.message)})}static parseWormholeMessageId(e,r,s){const t=o.parseWormholeMessage(e,r,s);return{chain:t.emitterChain,emitter:t.emitterAddress,sequence:t.sequence}}}g.registerProtocol(m._platform,"WormholeCore",o);exports.CosmwasmWormholeCore=o;
@@ -17,10 +17,10 @@ var f1 = (a, e, t, n) => ({
17
17
  return u(a, e, n);
18
18
  }
19
19
  }), N = (a, e, t) => (F6(a, e, "access private method"), t);
20
- import { a as D1 } from "./index-DVzNMQU2.mjs";
21
- import { by as V1, c5 as b1, bp as Z0, c6 as Fe, au as Le, az as E6, c7 as $e, b_ as m6, bO as W1 } from "./index-DjJSdBO_.mjs";
22
- import { E as L0, d as De, a as Q, u as c1, e as c6, b as s0, c as H1, _ as G1 } from "./evm-BdLUkbt8.mjs";
23
- import { r as z1 } from "./chain-CNimQoal.mjs";
20
+ import { a as D1 } from "./index-BqGrE5rX.mjs";
21
+ import { by as V1, c5 as b1, bp as Z0, c6 as Fe, au as Le, az as E6, c7 as $e, b_ as m6, bO as W1 } from "./index-C1JlVOwd.mjs";
22
+ import { E as L0, d as De, a as Q, u as c1, e as c6, b as s0, c as H1, _ as G1 } from "./evm-DB1-WEEt.mjs";
23
+ import { r as z1 } from "./chain-BZjg2BoT.mjs";
24
24
  class Z6 {
25
25
  constructor(e, t, n, r) {
26
26
  o(this, "network");