@wormhole-foundation/wormhole-connect 1.1.8-beta.2-development → 1.1.8

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 (94) hide show
  1. package/dist/assets/{ccip-B5VfDKOr.js → ccip-atE20ZEL.js} +1 -1
  2. package/dist/assets/{evm-CkbZddI4.js → evm-DiRlPnyB.js} +4 -4
  3. package/dist/assets/{index-BVl4T3LK.js → index-C6qclzFA.js} +1 -1
  4. package/dist/assets/index-CKe5Sopa.js +2 -0
  5. package/dist/assets/{index-CPZCe6ys.js → index-DOuohql9.js} +1 -1
  6. package/dist/assets/{index.es-D_CMbICm.js → index.es-BxGbRBbk.js} +2 -2
  7. package/dist/main.js +3 -3
  8. package/lib/{algorand-tXcNTbqw.js → algorand-BvtlkYvW.js} +1 -1
  9. package/lib/{algorand-DgpF_mXd.mjs → algorand-DUcbNcTT.mjs} +5 -5
  10. package/lib/{aptos-CTr4u3up.mjs → aptos-B4rlOyU6.mjs} +3 -3
  11. package/lib/{aptos-Cbmld6H3.js → aptos-BhgRAjHC.js} +2 -2
  12. package/lib/{aptos-CR0OcDBV.js → aptos-DhzeFi4o.js} +1 -1
  13. package/lib/{aptos-M_shWERr.mjs → aptos-nQowjIcb.mjs} +1 -1
  14. package/lib/{ccip-DaRd1xyq.js → ccip-BGUsNrsA.js} +1 -1
  15. package/lib/{ccip-C0KpO3UY.mjs → ccip-jzRXPLFO.mjs} +1 -1
  16. package/lib/{cosmwasm-u__X419O.js → cosmwasm-CGeqw6cI.js} +4 -4
  17. package/lib/{cosmwasm-BrumI-4g.mjs → cosmwasm-DrywDSkp.mjs} +10 -10
  18. package/lib/{events-B3M_mwnv.js → events-COjha8bx.js} +1 -1
  19. package/lib/{events-CpI6THlG.mjs → events-DuoZYNKO.mjs} +1 -1
  20. package/lib/{evm-Blf-_XHQ.js → evm-BBDClE2g.js} +4 -4
  21. package/lib/{evm-DTv3ll5g.mjs → evm-BuIItcEA.mjs} +12 -12
  22. package/lib/{evm-CcAiiNiN.mjs → evm-CEj34i-Y.mjs} +7 -7
  23. package/lib/{evm-B8QV0WMy.js → evm-CYnUn08H.js} +1 -1
  24. package/lib/{index-BWadlVxP.js → index-8IabBseN.js} +1 -1
  25. package/lib/{index-C24awnH1.mjs → index-A72nDBhY.mjs} +11 -11
  26. package/lib/{index-BLT1iLJO.js → index-B-LwhonE.js} +1 -1
  27. package/lib/{index-D_WLQWCk.js → index-B2JFHCjY.js} +1 -1
  28. package/lib/{index-CrvMtWJk.js → index-B6AFQ_fB.js} +1 -1
  29. package/lib/{index-lNjLQ3Ln.mjs → index-BISC0EuN.mjs} +9 -9
  30. package/lib/{index-NVVfqKqy.js → index-BIVNmWjC.js} +1 -1
  31. package/lib/{index-nvF_Vnsk.mjs → index-BJuAlURA.mjs} +3 -3
  32. package/lib/{index-Hj_44yP6.js → index-BJvQdk3o.js} +92 -92
  33. package/lib/{index-sqvrX5as.js → index-BTncL8og.js} +1 -1
  34. package/lib/{index-Br2oG_eT.mjs → index-BXkKxPSN.mjs} +2 -2
  35. package/lib/{index-BeR2pFP_.mjs → index-Bbhbkgfa.mjs} +2 -2
  36. package/lib/{index-DGUuTzq5.mjs → index-BeJsTgpu.mjs} +10 -10
  37. package/lib/{index-CH4v9fdl.mjs → index-Bh9u5bZu.mjs} +15 -15
  38. package/lib/{index-MAW-S7qJ.js → index-Bi4OJr6O.js} +1 -1
  39. package/lib/index-BsHKXTKU.js +1 -0
  40. package/lib/{index-CwrUNk7R.js → index-BuGRcK_Q.js} +1 -1
  41. package/lib/{index-CuqXZa2Q.mjs → index-CJEjOaWr.mjs} +1 -1
  42. package/lib/{index-BVEhvlmw.mjs → index-CRv6XxH6.mjs} +16 -16
  43. package/lib/{index-Dsp18Ki0.js → index-CTHiXye2.js} +1 -1
  44. package/lib/{index-iMGGdz1P.js → index-CWM3H2LC.js} +1 -1
  45. package/lib/{index-B9I8wNfR.js → index-CXIAreWV.js} +1 -1
  46. package/lib/{index-BVvayeum.mjs → index-CdExxm-8.mjs} +2 -2
  47. package/lib/{index-5iQ5GTSu.mjs → index-Cdpg2Kj3.mjs} +2 -2
  48. package/lib/{index-EFO4LCUD.mjs → index-CjexIr7B.mjs} +12 -12
  49. package/lib/{index-BPyIEVyq.js → index-Cyjyg63s.js} +1 -1
  50. package/lib/{index-DIeGmRzd.js → index-D5tJ7kz1.js} +1 -1
  51. package/lib/{index-DhvaqGhk.mjs → index-D7uCV0-2.mjs} +55 -55
  52. package/lib/{index-DSQmXjdq.mjs → index-D9fbH3oE.mjs} +35 -35
  53. package/lib/{index-B0-xPGuQ.mjs → index-D9h0sJ3x.mjs} +76 -76
  54. package/lib/{index-CaA38viB.js → index-DEi8dfu-.js} +1 -1
  55. package/lib/{index-BRV3iD_7.mjs → index-DKptU_Hc.mjs} +4 -4
  56. package/lib/{index-aB_fp0rM.mjs → index-Dc5wV51P.mjs} +20462 -20465
  57. package/lib/{index-CPe7WKSz.mjs → index-DcurocLc.mjs} +2 -2
  58. package/lib/{index-DZohPEoL.mjs → index-DdeuHj0J.mjs} +7 -7
  59. package/lib/{index-DcH-LW3u.js → index-DgbQ-dwi.js} +1 -1
  60. package/lib/{index-CU3bs1UO.js → index-DlnKgVH2.js} +1 -1
  61. package/lib/{index-CX4xrmvB.js → index-Ds_oSleh.js} +1 -1
  62. package/lib/{index-Dj9uX8Yq.mjs → index-HLOU4jOA.mjs} +2 -2
  63. package/lib/{index-QVDg02xQ.js → index-NNKFqYq6.js} +1 -1
  64. package/lib/{index-DXxIHcif.js → index-a5wU3oUB.js} +1 -1
  65. package/lib/{index-5Nsx5Sww.mjs → index-qoWS15WJ.mjs} +4 -4
  66. package/lib/{index-DaqgMXh5.mjs → index-uAstvLd8.mjs} +2 -2
  67. package/lib/{index-w19NhRI8.js → index-vjvft509.js} +1 -1
  68. package/lib/{index.es-8dGbttwj.js → index.es-ex5QzFoQ.js} +2 -2
  69. package/lib/{index.es-4k95rbkL.mjs → index.es-tj48a6VI.mjs} +5 -5
  70. package/lib/index.js +1 -1
  71. package/lib/index.mjs +2 -2
  72. package/lib/{keccak-BVl93H2h.mjs → keccak-CVFfUSfU.mjs} +1 -1
  73. package/lib/{keccak-DxPHQOs9.js → keccak-CzODwJ6V.js} +1 -1
  74. package/lib/{pbkdf2-C4tGHSl-.js → pbkdf2-DLmVRSHA.js} +1 -1
  75. package/lib/{pbkdf2-CrsCYTQU.mjs → pbkdf2-GUTNazYD.mjs} +1 -1
  76. package/lib/{signer-Du2DF25K.mjs → signer-Cqs1I7RB.mjs} +1 -1
  77. package/lib/{signer-BcAkKtkv.js → signer-rbcgQjZj.js} +1 -1
  78. package/lib/{solana-DS0mdgC1.mjs → solana-7ZFkKRtX.mjs} +4 -4
  79. package/lib/solana-BYPpXpJs.js +1 -0
  80. package/lib/solana-CcjhlsWI.mjs +16 -0
  81. package/lib/{solana-B2noqxW_.js → solana-DoqT3pca.js} +1 -1
  82. package/lib/{solanaEmbed.esm-Cr2BGkxp.js → solanaEmbed.esm-Bkti_f5v.js} +1 -1
  83. package/lib/{solanaEmbed.esm-B9HRNUtr.mjs → solanaEmbed.esm-LdO_IpPZ.mjs} +3 -3
  84. package/lib/{sui-CnGk4aWJ.mjs → sui-BffnXOND.mjs} +10 -10
  85. package/lib/{sui-CsizbSts.mjs → sui-Ch7mNd_P.mjs} +4 -4
  86. package/lib/{sui-Q9BM2cCK.js → sui-Df7REI6I.js} +2 -2
  87. package/lib/{sui-C7SxJ54B.js → sui-DfRirJoo.js} +1 -1
  88. package/lib/{unsignedTransaction-Cd7qXgBL.mjs → unsignedTransaction-CsCwFMvo.mjs} +4 -4
  89. package/lib/{unsignedTransaction-DDxT_548.js → unsignedTransaction-CvjJdjtG.js} +1 -1
  90. package/package.json +1 -1
  91. package/dist/assets/index-C_hywdem.js +0 -2
  92. package/lib/index-YmHc4VtK.js +0 -1
  93. package/lib/solana-CFMBUeJY.js +0 -1
  94. package/lib/solana-lSSqSdUq.mjs +0 -16
@@ -13,7 +13,7 @@ var E = (s, n, e, t) => ({
13
13
  return h(s, n, t);
14
14
  }
15
15
  });
16
- import { A as O, d as W, W as b, E as f, P as $, a as M, b as Q, c as R, _ as j } from "./index-aB_fp0rM.mjs";
16
+ import { A as O, d as W, W as b, E as f, P as $, a as M, b as R, c as j, _ as q } from "./index-Dc5wV51P.mjs";
17
17
  var a, c;
18
18
  const w = class w extends O {
19
19
  /**
@@ -73,7 +73,7 @@ const w = class w extends O {
73
73
  };
74
74
  a = new WeakMap(), c = new WeakMap();
75
75
  let P = w;
76
- async function q(s, n, e) {
76
+ async function z(s, n, e) {
77
77
  const t = typeof n == "string" ? new b(n, s) : n, r = (e == null ? void 0 : e.chain) ?? (await f.chainFromRpc(s))[1], i = new P(t);
78
78
  if (i.provider === null)
79
79
  try {
@@ -81,9 +81,9 @@ async function q(s, n, e) {
81
81
  } catch (g) {
82
82
  console.error("Cannot connect to network for signer", g);
83
83
  }
84
- return new z(r, await t.getAddress(), i, e);
84
+ return new H(r, await t.getAddress(), i, e);
85
85
  }
86
- class z extends $ {
86
+ class H extends $ {
87
87
  constructor(e, t, r, i) {
88
88
  super(e, t, r);
89
89
  l(this, "opts");
@@ -121,20 +121,20 @@ class z extends $ {
121
121
  return r;
122
122
  }
123
123
  }
124
- const J = {
124
+ const K = {
125
125
  Address: M,
126
126
  Platform: f,
127
- getSigner: q,
127
+ getSigner: z,
128
128
  protocols: {
129
- WormholeCore: () => import("./index-aB_fp0rM.mjs").then((s) => s.dQ),
130
- TokenBridge: () => import("./index-DZohPEoL.mjs"),
131
- PorticoBridge: () => import("./index-BVEhvlmw.mjs"),
132
- CircleBridge: () => import("./index-CH4v9fdl.mjs")
129
+ WormholeCore: () => import("./index-Dc5wV51P.mjs").then((s) => s.dP),
130
+ TokenBridge: () => import("./index-DdeuHj0J.mjs"),
131
+ PorticoBridge: () => import("./index-CRv6XxH6.mjs"),
132
+ CircleBridge: () => import("./index-Bh9u5bZu.mjs")
133
133
  },
134
- getChain: (s, n, e) => new Q(n, new f(s, R(s, j, {
134
+ getChain: (s, n, e) => new R(n, new f(s, j(s, q, {
135
135
  [n]: e
136
136
  })))
137
137
  };
138
138
  export {
139
- J as default
139
+ K as default
140
140
  };
@@ -3,9 +3,9 @@ var ps = (e) => {
3
3
  };
4
4
  var hs = (e, t, n) => t.has(e) || ps("Cannot " + n);
5
5
  var Tn = (e, t, n) => (hs(e, t, "read from private field"), n ? n.call(e) : t.get(e)), ms = (e, t, n) => t.has(e) ? ps("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), gs = (e, t, n, r) => (hs(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n);
6
- import { aL as Eo, aM as bs, h as Rn, aN as jo, aO as Co, aP as ko, aQ as fs, aR as To, aS as ue, aT as vo, aU as tn, aV as zo, aW as So, aX as Lo, aY as Oo, aZ as Po, a_ as Bo, a$ as Uo, ak as Qo, b0 as lt, b1 as Go } from "./index-aB_fp0rM.mjs";
6
+ import { aK as Eo, aL as bs, h as Rn, aM as jo, aN as Co, aO as ko, aP as fs, aQ as To, aR as ue, aS as vo, aT as tn, aU as zo, aV as So, aW as Lo, aX as Oo, aY as Po, aZ as Bo, a_ as Uo, ak as Qo, a$ as lt, b0 as Go } from "./index-Dc5wV51P.mjs";
7
7
  import * as ea from "react";
8
- import "./index-CuqXZa2Q.mjs";
8
+ import "./index-CJEjOaWr.mjs";
9
9
  function Yo(e, t) {
10
10
  for (var n = 0; n < t.length; n++) {
11
11
  const r = t[n];
@@ -4332,7 +4332,7 @@ async function wn(e, t) {
4332
4332
  });
4333
4333
  return Ie === "0x" ? { data: void 0 } : { data: Ie };
4334
4334
  } catch (I) {
4335
- const N = Al(I), { offchainLookup: D, offchainLookupSignature: O } = await import("./ccip-C0KpO3UY.mjs");
4335
+ const N = Al(I), { offchainLookup: D, offchainLookupSignature: O } = await import("./ccip-jzRXPLFO.mjs");
4336
4336
  if ((N == null ? void 0 : N.slice(0, 10)) === O && m)
4337
4337
  return { data: await D(e, { data: N, to: m }) };
4338
4338
  throw Ml(I, {
@@ -11723,7 +11723,7 @@ var ts = (e, t, n) => {
11723
11723
  throw TypeError("Cannot add the same private member more than once");
11724
11724
  t instanceof WeakSet ? t.add(e) : t.set(e, n);
11725
11725
  }, Rt = (e, t, n, r) => (ts(e, t, "write to private field"), t.set(e, n), n), u4 = (e, t, n) => (ts(e, t, "access private method"), n);
11726
- const d4 = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, REACT_APP_CONNECT_GIT_HASH: "283faaa6a5a9df65f6b8a53ce98da47843a89fd2", REACT_APP_CONNECT_VERSION: "1.1.8-beta.2-development", SSR: !1 }, p4 = (e) => (t, n, r) => {
11726
+ const d4 = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, REACT_APP_CONNECT_GIT_HASH: "283faaa6a5a9df65f6b8a53ce98da47843a89fd2", REACT_APP_CONNECT_VERSION: "1.1.8", SSR: !1 }, p4 = (e) => (t, n, r) => {
11727
11727
  const s = r.subscribe;
11728
11728
  return r.subscribe = (o, i, c) => {
11729
11729
  let l = o;
@@ -11990,7 +11990,7 @@ const Dt = (e) => (t) => {
11990
11990
  }, a.skipHydration || p(), m || h;
11991
11991
  }, f4 = (e, t) => "getStorage" in t || "serialize" in t || "deserialize" in t ? ((d4 ? "production" : void 0) !== "production" && console.warn(
11992
11992
  "[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."
11993
- ), g4(e, t)) : b4(e, t), M4 = f4, y4 = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, REACT_APP_CONNECT_GIT_HASH: "283faaa6a5a9df65f6b8a53ce98da47843a89fd2", REACT_APP_CONNECT_VERSION: "1.1.8-beta.2-development", SSR: !1 }, Us = (e) => {
11993
+ ), g4(e, t)) : b4(e, t), M4 = f4, y4 = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, REACT_APP_CONNECT_GIT_HASH: "283faaa6a5a9df65f6b8a53ce98da47843a89fd2", REACT_APP_CONNECT_VERSION: "1.1.8", SSR: !1 }, Us = (e) => {
11994
11994
  let t;
11995
11995
  const n = /* @__PURE__ */ new Set(), r = (u, d) => {
11996
11996
  const h = typeof u == "function" ? u(t) : u;
@@ -13937,7 +13937,7 @@ var _3 = Object.defineProperty, $3 = function(e, t, n) {
13937
13937
  case 0:
13938
13938
  return !tt(i, rt) || a || o ? (u = !((c = i.options) === null || c === void 0) && c.infuraId ? {} : i.chains.reduce(function(m, p) {
13939
13939
  return Js(Jt({}, m), Mo({}, p.id, p.rpcUrls.default.http[0]));
13940
- }, {}), [4, import("./index-BeR2pFP_.mjs")]) : [3, 2];
13940
+ }, {}), [4, import("./index-Bbhbkgfa.mjs")]) : [3, 2];
13941
13941
  case 1:
13942
13942
  d = h.sent().default, Yn(i, rt, new d(Js(Jt({}, i.options), { chainId: a, rpc: Jt({}, u, (l = i.options) === null || l === void 0 ? void 0 : l.rpc) }))), h.label = 2;
13943
13943
  case 2:
@@ -14328,7 +14328,7 @@ fr = async function() {
14328
14328
  };
14329
14329
  os = /* @__PURE__ */ new WeakSet();
14330
14330
  xo = async function() {
14331
- const { EthereumProvider: e } = await import("./index.es-4k95rbkL.mjs"), t = this.chains.map(({ id: n }) => n);
14331
+ const { EthereumProvider: e } = await import("./index.es-tj48a6VI.mjs"), t = this.chains.map(({ id: n }) => n);
14332
14332
  if (t.length) {
14333
14333
  const {
14334
14334
  projectId: n,
@@ -1 +1 @@
1
- "use strict";var D=Object.defineProperty;var E=n=>{throw TypeError(n)};var L=(n,s,e)=>s in n?D(n,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[s]=e;var f=(n,s,e)=>L(n,typeof s!="symbol"?s+"":s,e),G=(n,s,e)=>s.has(n)||E("Cannot "+e);var l=(n,s,e)=>(G(n,s,"read from private field"),e?e.call(n):s.get(n)),p=(n,s,e)=>s.has(n)?E("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(n):s.set(n,e),c=(n,s,e,t)=>(G(n,s,"write to private field"),t?t.call(n,e):s.set(n,e),e);var A=(n,s,e,t)=>({set _(a){c(n,s,a,e)},get _(){return l(n,s,t)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-Hj_44yP6.js");var o,g;const v=class v extends r.AbstractSigner{constructor(e){super(e.provider);f(this,"signer");p(this,o);p(this,g);r.defineProperties(this,{signer:e}),c(this,o,null),c(this,g,0)}async getAddress(){return this.signer.getAddress()}connect(e){return new v(this.signer.connect(e))}async getNonce(e){if(e==="pending"){l(this,o)==null&&c(this,o,super.getNonce("pending"));const t=l(this,g);return await l(this,o)+t}return super.getNonce(e)}increment(){A(this,g)._++}reset(){c(this,g,0),c(this,o,null)}async sendTransaction(e){const t=this.getNonce("pending");return this.increment(),e=await this.signer.populateTransaction(e),e.nonce=await t,await this.signer.sendTransaction(e)}signTransaction(e){return this.signer.signTransaction(e)}signMessage(e){return this.signer.signMessage(e)}signTypedData(e,t,a){return this.signer.signTypedData(e,t,a)}};o=new WeakMap,g=new WeakMap;let P=v;async function O(n,s,e){const t=typeof s=="string"?new r.Wallet(s,n):s,a=(e==null?void 0:e.chain)??(await r.EvmPlatform.chainFromRpc(n))[1],i=new P(t);if(i.provider===null)try{i.connect(n)}catch(d){console.error("Cannot connect to network for signer",d)}return new b(a,await t.getAddress(),i,e)}class b extends r.PlatformNativeSigner{constructor(e,t,a,i){super(e,t,a);f(this,"opts");this.opts=i}chain(){return this._chain}address(){return this._address}async sign(e){var w,y,x,C,S,T;const t=this.chain(),a=[];let i=500000n,d=100000000000n,m=1500000000n,u=100000000n;if(((w=this.opts)==null?void 0:w.overrides)===void 0&&t!=="Celo"){const h=await this._signer.provider.getFeeData();d=h.gasPrice??d,m=h.maxFeePerGas??m,u=h.maxPriorityFeePerGas??u}((y=this.opts)==null?void 0:y.maxGasLimit)!==void 0&&(i=i>((x=this.opts)==null?void 0:x.maxGasLimit)?(C=this.opts)==null?void 0:C.maxGasLimit:i);const F=t==="Oasis"?{gasLimit:i,gasPrice:d,type:0}:{gasLimit:i,maxFeePerGas:m,maxPriorityFeePerGas:u};for(const h of e){const{transaction:N,description:q}=h;(S=this.opts)!=null&&S.debug&&console.log(`Signing: ${q} for ${this.address()}`);const _={...N,...F,from:this.address(),nonce:await this._signer.getNonce(),...(T=this.opts)==null?void 0:T.overrides};a.push(await this._signer.signTransaction(_))}return a}}const B={Address:r.EvmAddress,Platform:r.EvmPlatform,getSigner:O,protocols:{WormholeCore:()=>Promise.resolve().then(()=>require("./index-Hj_44yP6.js")).then(n=>n.index$1),TokenBridge:()=>Promise.resolve().then(()=>require("./index-BLT1iLJO.js")),PorticoBridge:()=>Promise.resolve().then(()=>require("./index-CrvMtWJk.js")),CircleBridge:()=>Promise.resolve().then(()=>require("./index-DXxIHcif.js"))},getChain:(n,s,e)=>new r.EvmChain(s,new r.EvmPlatform(n,r.applyChainsConfigConfigOverrides(n,r._platform,{[s]:e})))};exports.default=B;
1
+ "use strict";var D=Object.defineProperty;var E=n=>{throw TypeError(n)};var L=(n,s,e)=>s in n?D(n,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[s]=e;var f=(n,s,e)=>L(n,typeof s!="symbol"?s+"":s,e),G=(n,s,e)=>s.has(n)||E("Cannot "+e);var l=(n,s,e)=>(G(n,s,"read from private field"),e?e.call(n):s.get(n)),p=(n,s,e)=>s.has(n)?E("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(n):s.set(n,e),c=(n,s,e,t)=>(G(n,s,"write to private field"),t?t.call(n,e):s.set(n,e),e);var A=(n,s,e,t)=>({set _(a){c(n,s,a,e)},get _(){return l(n,s,t)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-BJvQdk3o.js");var o,g;const v=class v extends r.AbstractSigner{constructor(e){super(e.provider);f(this,"signer");p(this,o);p(this,g);r.defineProperties(this,{signer:e}),c(this,o,null),c(this,g,0)}async getAddress(){return this.signer.getAddress()}connect(e){return new v(this.signer.connect(e))}async getNonce(e){if(e==="pending"){l(this,o)==null&&c(this,o,super.getNonce("pending"));const t=l(this,g);return await l(this,o)+t}return super.getNonce(e)}increment(){A(this,g)._++}reset(){c(this,g,0),c(this,o,null)}async sendTransaction(e){const t=this.getNonce("pending");return this.increment(),e=await this.signer.populateTransaction(e),e.nonce=await t,await this.signer.sendTransaction(e)}signTransaction(e){return this.signer.signTransaction(e)}signMessage(e){return this.signer.signMessage(e)}signTypedData(e,t,a){return this.signer.signTypedData(e,t,a)}};o=new WeakMap,g=new WeakMap;let P=v;async function O(n,s,e){const t=typeof s=="string"?new r.Wallet(s,n):s,a=(e==null?void 0:e.chain)??(await r.EvmPlatform.chainFromRpc(n))[1],i=new P(t);if(i.provider===null)try{i.connect(n)}catch(d){console.error("Cannot connect to network for signer",d)}return new b(a,await t.getAddress(),i,e)}class b extends r.PlatformNativeSigner{constructor(e,t,a,i){super(e,t,a);f(this,"opts");this.opts=i}chain(){return this._chain}address(){return this._address}async sign(e){var w,y,x,C,S,T;const t=this.chain(),a=[];let i=500000n,d=100000000000n,m=1500000000n,u=100000000n;if(((w=this.opts)==null?void 0:w.overrides)===void 0&&t!=="Celo"){const h=await this._signer.provider.getFeeData();d=h.gasPrice??d,m=h.maxFeePerGas??m,u=h.maxPriorityFeePerGas??u}((y=this.opts)==null?void 0:y.maxGasLimit)!==void 0&&(i=i>((x=this.opts)==null?void 0:x.maxGasLimit)?(C=this.opts)==null?void 0:C.maxGasLimit:i);const F=t==="Oasis"?{gasLimit:i,gasPrice:d,type:0}:{gasLimit:i,maxFeePerGas:m,maxPriorityFeePerGas:u};for(const h of e){const{transaction:N,description:q}=h;(S=this.opts)!=null&&S.debug&&console.log(`Signing: ${q} for ${this.address()}`);const _={...N,...F,from:this.address(),nonce:await this._signer.getNonce(),...(T=this.opts)==null?void 0:T.overrides};a.push(await this._signer.signTransaction(_))}return a}}const B={Address:r.EvmAddress,Platform:r.EvmPlatform,getSigner:O,protocols:{WormholeCore:()=>Promise.resolve().then(()=>require("./index-BJvQdk3o.js")).then(n=>n.index$1),TokenBridge:()=>Promise.resolve().then(()=>require("./index-B-LwhonE.js")),PorticoBridge:()=>Promise.resolve().then(()=>require("./index-B6AFQ_fB.js")),CircleBridge:()=>Promise.resolve().then(()=>require("./index-a5wU3oUB.js"))},getChain:(n,s,e)=>new r.EvmChain(s,new r.EvmPlatform(n,r.applyChainsConfigConfigOverrides(n,r._platform,{[s]:e})))};exports.default=B;