@wormhole-foundation/wormhole-connect 4.2.0-beta.0-development → 5.0.0

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 (73) hide show
  1. package/dist/main.mjs +73 -73
  2. package/dist/src/telemetry/types.d.ts +2 -1
  3. package/dist/src/telemetry/types.d.ts.map +1 -1
  4. package/dist/src/utils/errors.d.ts +1 -0
  5. package/dist/src/utils/errors.d.ts.map +1 -1
  6. package/lib/{aptos-DcdKyekw.js → aptos-BnjZOhUE.js} +1 -1
  7. package/lib/{aptos-B1Gf2eCD.mjs → aptos-fTiHvXXE.mjs} +2 -2
  8. package/lib/{basic-DnhL0oWa.mjs → basic-BqusrmRE.mjs} +2 -2
  9. package/lib/{basic-C6VXQ7m-.js → basic-BrW22Cj9.js} +1 -1
  10. package/lib/{basic-CFbslwLM.mjs → basic-CK5Bsf0B.mjs} +2 -2
  11. package/lib/{basic-BS7Z1PMG.js → basic-ChOmeQQk.js} +1 -1
  12. package/lib/constants-C1w_RyOP.js +1 -0
  13. package/lib/{constants-CTJ_-E0d.mjs → constants-DcDpDarO.mjs} +5 -5
  14. package/lib/{core-DT6TBPQP.mjs → core-DQ-6Q1F1.mjs} +5 -5
  15. package/lib/{core-RRp0K__1.js → core-FA2gBc-s.js} +3 -3
  16. package/lib/{evm-DlOCiplA.mjs → evm-BJ4Lx-r9.mjs} +3 -3
  17. package/lib/{evm-BwCfQIyJ.js → evm-BTgO_HRP.js} +2 -2
  18. package/lib/{evm-BxF9XPn4.mjs → evm-C-vXMfGr.mjs} +3 -3
  19. package/lib/{evm-C3B8jHD7.js → evm-qxndAh3z.js} +1 -1
  20. package/lib/hosted.js +1 -1
  21. package/lib/hosted.mjs +1 -1
  22. package/lib/{hypercore-DbqOAqKF.js → hypercore-D7kZiwbe.js} +1 -1
  23. package/lib/{hypercore-H7pw_pN4.mjs → hypercore-DKqayfki.mjs} +9 -9
  24. package/lib/{index-mikg85u5.js → index-3Zg1AdoI.js} +1 -1
  25. package/lib/{index-BuEKhdrW.mjs → index-B1URQBlH.mjs} +1 -1
  26. package/lib/{index-pn6NZmOS.js → index-B7b8sctd.js} +1 -1
  27. package/lib/{index-CsLyPoC6.mjs → index-BVciucyT.mjs} +1 -1
  28. package/lib/{index-BNpkgexR.js → index-BfzaCmg7.js} +1 -1
  29. package/lib/{index-DVm_f5E1.js → index-C-F8_8dY.js} +1 -1
  30. package/lib/{index-BmP0jPVN.mjs → index-C6MalNd5.mjs} +9 -9
  31. package/lib/{index-BbE02hdW.js → index-Cb_8WAm1.js} +8 -8
  32. package/lib/{index-BnKf2rOm.mjs → index-CgqBQ88K.mjs} +178 -175
  33. package/lib/{index-BtU67kjy.mjs → index-CowAVUcg.mjs} +1 -1
  34. package/lib/{index-CGqJokTg.mjs → index-DcFL403C.mjs} +1 -1
  35. package/lib/{index-DAJZN12d.js → index-Oxm0y6-t.js} +1 -1
  36. package/lib/{index-t_koRpGi.js → index-XjDX4fWv.js} +1 -1
  37. package/lib/{index-NAUBlFLG.mjs → index-mNO1mk2F.mjs} +1 -1
  38. package/lib/{index.es-B3FwsRfN.js → index.es-B9kBDkCQ.js} +3 -3
  39. package/lib/{index.es-ClIr5Gv-.js → index.es-BZRO-bNH.js} +1 -1
  40. package/lib/{index.es-CYyuSfPG.mjs → index.es-CF3YY88z.mjs} +3 -3
  41. package/lib/{index.es-3KAM8l3G.mjs → index.es-CaAL5X4E.mjs} +2 -2
  42. package/lib/index.js +2 -2
  43. package/lib/index.mjs +16 -15
  44. package/lib/lifi.js +1 -1
  45. package/lib/lifi.mjs +2 -2
  46. package/lib/mayan.js +1 -1
  47. package/lib/mayan.mjs +2 -2
  48. package/lib/{secp256k1-BZFiBDHQ.mjs → secp256k1-1o6o1kFy.mjs} +1 -1
  49. package/lib/{secp256k1-D3i7kc2M.mjs → secp256k1-BjlnTj1_.mjs} +1 -1
  50. package/lib/{secp256k1-B2G0zB-5.js → secp256k1-CeYT4ndf.js} +1 -1
  51. package/lib/{secp256k1-Cteng3v9.mjs → secp256k1-Cw_BiEuN.mjs} +1 -1
  52. package/lib/{secp256k1-CxjctkO3.js → secp256k1-D5cKS6q_.js} +1 -1
  53. package/lib/{secp256k1-Bz-QjKBU.js → secp256k1-_QlJc7sK.js} +1 -1
  54. package/lib/{solana-BE2DAanS.js → solana-DvHFhri3.js} +4 -4
  55. package/lib/{solana-Df231Yni.mjs → solana-TgPr9kpk.mjs} +8 -8
  56. package/lib/{solanaEmbed.esm-B9WG-Afi.mjs → solanaEmbed.esm-Bh1-aAL4.mjs} +2 -2
  57. package/lib/{solanaEmbed.esm-BqcrHrhl.js → solanaEmbed.esm-C8TjRcIV.js} +1 -1
  58. package/lib/src/telemetry/types.d.ts +2 -1
  59. package/lib/src/telemetry/types.d.ts.map +1 -1
  60. package/lib/src/utils/errors.d.ts +1 -0
  61. package/lib/src/utils/errors.d.ts.map +1 -1
  62. package/lib/{sui-B9tYcgyb.mjs → sui-CoWRa3vr.mjs} +2 -2
  63. package/lib/{sui-BVwNcgQT.js → sui-DwFrGd2Y.js} +1 -1
  64. package/lib/{tokenHelpers-DITWDel1.js → tokenHelpers-CeTyb4rG.js} +1 -1
  65. package/lib/{tokenHelpers-C53sepsl.mjs → tokenHelpers-VYjmKUxj.mjs} +1 -1
  66. package/lib/{tokens-CO0YQ3R2.mjs → tokens-D6uJqrsR.mjs} +1 -1
  67. package/lib/{tokens-CiSHS7oi.js → tokens-mXZqt-qL.js} +1 -1
  68. package/lib/{w3m-modal-SlcSCSnx.mjs → w3m-modal-BEe8ji9_.mjs} +2 -2
  69. package/lib/{w3m-modal-5v-rsnN8.mjs → w3m-modal-D3eqrCT1.mjs} +2 -2
  70. package/lib/{w3m-modal-B0Lu-6W8.js → w3m-modal-Duc13ei7.js} +1 -1
  71. package/lib/{w3m-modal-B2xHxAWg.js → w3m-modal-f_sUVzPx.js} +1 -1
  72. package/package.json +1 -1
  73. package/lib/constants-BCFTvlgh.js +0 -1
@@ -107,9 +107,9 @@ const A = {
107
107
  getSigner: x,
108
108
  protocols: {
109
109
  WormholeCore: () => import("./index-CrWTw0Se.mjs"),
110
- TokenBridge: () => import("./index-BmP0jPVN.mjs"),
111
- PorticoBridge: () => import("./index-BuEKhdrW.mjs"),
112
- CircleBridge: () => import("./index-NAUBlFLG.mjs"),
110
+ TokenBridge: () => import("./index-C6MalNd5.mjs"),
111
+ PorticoBridge: () => import("./index-B1URQBlH.mjs"),
112
+ CircleBridge: () => import("./index-mNO1mk2F.mjs"),
113
113
  TBTCBridge: () => import("./index-Ba1zbu3Q.mjs")
114
114
  },
115
115
  getChain: (n, s, e) => new P(s, new g(n, y(n, C, {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./platform-DCcL7jHP.js"),p=require("./wallet-a0_jwP8j.js");class d extends t.AbstractSigner{signer;#e;#s;constructor(e){super(e.provider),t.defineProperties(this,{signer:e}),this.#e=null,this.#s=0}async getAddress(){return this.signer.getAddress()}connect(e){return new d(this.signer.connect(e))}async getNonce(e){if(e==="pending"){this.#e==null&&(this.#e=super.getNonce("pending"));const s=this.#s;return await this.#e+s}return super.getNonce(e)}increment(){this.#s++}reset(){this.#s=0,this.#e=null}async sendTransaction(e){const s=this.getNonce("pending");return this.increment(),e=await this.signer.populateTransaction(e),e.nonce=await s,await this.signer.sendTransaction(e)}signTransaction(e){return this.signer.signTransaction(e)}signMessage(e){return this.signer.signMessage(e)}signTypedData(e,s,i){return this.signer.signTypedData(e,s,i)}}async function f(r,e,s){const i=typeof e=="string"?new p.Wallet(e,r):e,n=s?.chain??(await t.EvmPlatform.chainFromRpc(r))[1],o=new d(i);if(o.provider===null)try{o.connect(r)}catch(a){console.error("Cannot connect to network for signer",a)}return new P(n,await i.getAddress(),o,s)}class P extends t.PlatformNativeSigner{opts;constructor(e,s,i,n){super(e,s,i),this.opts=n}chain(){return this._chain}address(){return this._address}async sign(e){const s=this.chain(),i=[];let n=500000n,o=100000000000n,a=1500000000n,g=100000000n;if(this.opts?.overrides===void 0&&s!=="Celo"){const c=await this._signer.provider.getFeeData();o=c.gasPrice??o,a=c.maxFeePerGas??a,g=c.maxPriorityFeePerGas??g}this.opts?.gasLimit!==void 0&&(n=this.opts.gasLimit),this.opts?.maxGasLimit!==void 0&&(n=n>this.opts?.maxGasLimit?this.opts?.maxGasLimit:n);const h={gasLimit:n,maxFeePerGas:a,maxPriorityFeePerGas:g};for(const c of e){const{transaction:l,description:m}=c;this.opts?.debug&&console.log(`Signing: ${m} for ${this.address()}`);const u={...l,...h,from:this.address(),nonce:await this._signer.getNonce(),...this.opts?.overrides};i.push(await this._signer.signTransaction(u))}return i}}const v={Address:t.EvmAddress,Platform:t.EvmPlatform,getSigner:f,protocols:{WormholeCore:()=>Promise.resolve().then(()=>require("./index-BTjUHY0e.js")),TokenBridge:()=>Promise.resolve().then(()=>require("./index-DAJZN12d.js")),PorticoBridge:()=>Promise.resolve().then(()=>require("./index-pn6NZmOS.js")),CircleBridge:()=>Promise.resolve().then(()=>require("./index-mikg85u5.js")),TBTCBridge:()=>Promise.resolve().then(()=>require("./index-1T4sIL8n.js"))},getChain:(r,e,s)=>new t.EvmChain(e,new t.EvmPlatform(r,t.applyChainsConfigConfigOverrides(r,t._platform,{[e]:s})))};exports.default=v;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./platform-DCcL7jHP.js"),p=require("./wallet-a0_jwP8j.js");class d extends t.AbstractSigner{signer;#e;#s;constructor(e){super(e.provider),t.defineProperties(this,{signer:e}),this.#e=null,this.#s=0}async getAddress(){return this.signer.getAddress()}connect(e){return new d(this.signer.connect(e))}async getNonce(e){if(e==="pending"){this.#e==null&&(this.#e=super.getNonce("pending"));const s=this.#s;return await this.#e+s}return super.getNonce(e)}increment(){this.#s++}reset(){this.#s=0,this.#e=null}async sendTransaction(e){const s=this.getNonce("pending");return this.increment(),e=await this.signer.populateTransaction(e),e.nonce=await s,await this.signer.sendTransaction(e)}signTransaction(e){return this.signer.signTransaction(e)}signMessage(e){return this.signer.signMessage(e)}signTypedData(e,s,i){return this.signer.signTypedData(e,s,i)}}async function f(r,e,s){const i=typeof e=="string"?new p.Wallet(e,r):e,n=s?.chain??(await t.EvmPlatform.chainFromRpc(r))[1],o=new d(i);if(o.provider===null)try{o.connect(r)}catch(a){console.error("Cannot connect to network for signer",a)}return new P(n,await i.getAddress(),o,s)}class P extends t.PlatformNativeSigner{opts;constructor(e,s,i,n){super(e,s,i),this.opts=n}chain(){return this._chain}address(){return this._address}async sign(e){const s=this.chain(),i=[];let n=500000n,o=100000000000n,a=1500000000n,g=100000000n;if(this.opts?.overrides===void 0&&s!=="Celo"){const c=await this._signer.provider.getFeeData();o=c.gasPrice??o,a=c.maxFeePerGas??a,g=c.maxPriorityFeePerGas??g}this.opts?.gasLimit!==void 0&&(n=this.opts.gasLimit),this.opts?.maxGasLimit!==void 0&&(n=n>this.opts?.maxGasLimit?this.opts?.maxGasLimit:n);const h={gasLimit:n,maxFeePerGas:a,maxPriorityFeePerGas:g};for(const c of e){const{transaction:l,description:m}=c;this.opts?.debug&&console.log(`Signing: ${m} for ${this.address()}`);const u={...l,...h,from:this.address(),nonce:await this._signer.getNonce(),...this.opts?.overrides};i.push(await this._signer.signTransaction(u))}return i}}const v={Address:t.EvmAddress,Platform:t.EvmPlatform,getSigner:f,protocols:{WormholeCore:()=>Promise.resolve().then(()=>require("./index-BTjUHY0e.js")),TokenBridge:()=>Promise.resolve().then(()=>require("./index-Oxm0y6-t.js")),PorticoBridge:()=>Promise.resolve().then(()=>require("./index-B7b8sctd.js")),CircleBridge:()=>Promise.resolve().then(()=>require("./index-3Zg1AdoI.js")),TBTCBridge:()=>Promise.resolve().then(()=>require("./index-1T4sIL8n.js"))},getChain:(r,e,s)=>new t.EvmChain(e,new t.EvmPlatform(r,t.applyChainsConfigConfigOverrides(r,t._platform,{[e]:s})))};exports.default=v;
package/lib/hosted.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./constants-BCFTvlgh.js");function d(o,e={}){window.__CONNECT_CONFIG=e.config,window.__CONNECT_THEME=e.theme;const n=document.createElement("div");n.id="wormhole-connect";const c=e.version??s.CONNECT_VERSION,i=e.cdnBaseUrl??`https://cdn.jsdelivr.net/npm/@wormhole-foundation/wormhole-connect@${c}`,t=document.createElement("script");t.setAttribute("src",`${i}/dist/main.js`),t.setAttribute("type","module"),o.appendChild(n),o.appendChild(t)}exports.wormholeConnectHosted=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./constants-C1w_RyOP.js");function d(o,e={}){window.__CONNECT_CONFIG=e.config,window.__CONNECT_THEME=e.theme;const n=document.createElement("div");n.id="wormhole-connect";const c=e.version??s.CONNECT_VERSION,i=e.cdnBaseUrl??`https://cdn.jsdelivr.net/npm/@wormhole-foundation/wormhole-connect@${c}`,t=document.createElement("script");t.setAttribute("src",`${i}/dist/main.js`),t.setAttribute("type","module"),o.appendChild(n),o.appendChild(t)}exports.wormholeConnectHosted=d;
package/lib/hosted.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { C as d } from "./constants-CTJ_-E0d.mjs";
1
+ import { C as d } from "./constants-DcDpDarO.mjs";
2
2
  function r(o, t = {}) {
3
3
  window.__CONNECT_CONFIG = t.config, window.__CONNECT_THEME = t.theme;
4
4
  const n = document.createElement("div");