@gardenfi/core 2.3.2 → 2.3.3

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.
@@ -1,8 +1,8 @@
1
- import { SupportedAssets as If, ArbitrumLocalnet as Yy, EthereumLocalnet as Zy, isEVM as Xy, isEvmNativeToken as Jy, isSolanaNativeToken as Qy, Orderbook as em, isMainnet as ws, getTimeLock as tm, isBitcoin as Ko, getBlockchainType as Yo, BlockchainType as dt } from "@gardenfi/orderbook";
2
- import { Network as Br, Environment as Yt, Ok as ie, Err as H, Url as mt, Fetcher as Ie, EventBroker as dp, trim0x as Wt, with0x as ot, checkAllowanceAndApprove as rm, waitForTransactionReceipt as nm, sleep as Ms, hexToU32Array as Xs, DigestKey as kf, Siwe as Bf } from "@gardenfi/utils";
1
+ import { SupportedAssets as If, ArbitrumLocalnet as Yy, EthereumLocalnet as Zy, isEVM as Xy, isEvmNativeToken as Jy, isSolanaNativeToken as Qy, Orderbook as em, isMainnet as ws, getTimeLock as tm, isBitcoin as Ko, getBlockchainType as Yo, BlockchainType as lt } from "@gardenfi/orderbook";
2
+ import { Network as Br, Environment as Yt, Ok as ie, Err as H, Url as gt, Fetcher as Ie, EventBroker as dp, trim0x as Wt, with0x as at, checkAllowanceAndApprove as rm, waitForTransactionReceipt as nm, sleep as Ms, hexToU32Array as Xs, DigestKey as kf, Siwe as Bf } from "@gardenfi/utils";
3
3
  import * as Of from "varuint-bitcoin";
4
4
  import im from "varuint-bitcoin";
5
- import * as bt from "tiny-secp256k1";
5
+ import * as wt from "tiny-secp256k1";
6
6
  import * as le from "bitcoinjs-lib";
7
7
  import { crypto as sm, Transaction as Dt, script as Kr, payments as Gt, address as xi, networks as Zo, Psbt as Cf, initEccLib as om } from "bitcoinjs-lib";
8
8
  import am from "bignumber.js";
@@ -14,7 +14,7 @@ import { BIP32Factory as lm } from "bip32";
14
14
  import { web3 as Yr, BN as Ff, Program as yp } from "@coral-xyz/anchor";
15
15
  var Ee = /* @__PURE__ */ ((e) => (e.Idle = "Idle", e.Initiate = "Initiate", e.Redeem = "Redeem", e.Refund = "Refund", e))(Ee || {});
16
16
  const pm = "1.0.8";
17
- let ct = class Cc extends Error {
17
+ let ut = class Cc extends Error {
18
18
  constructor(t, r = {}) {
19
19
  var o;
20
20
  const n = r.cause instanceof Cc ? r.cause.details : (o = r.cause) != null && o.message ? r.cause.message : r.details, i = r.cause instanceof Cc && r.cause.docsPath || r.docsPath, s = [
@@ -140,7 +140,7 @@ const Tm = /* @__PURE__ */ new Set(["indexed"]), Nc = /* @__PURE__ */ new Set([
140
140
  "memory",
141
141
  "storage"
142
142
  ]);
143
- class Im extends ct {
143
+ class Im extends ut {
144
144
  constructor({ signature: t }) {
145
145
  super("Failed to parse ABI item.", {
146
146
  details: `parseAbiItem(${JSON.stringify(t, null, 2)})`,
@@ -153,7 +153,7 @@ class Im extends ct {
153
153
  });
154
154
  }
155
155
  }
156
- class km extends ct {
156
+ class km extends ut {
157
157
  constructor({ type: t }) {
158
158
  super("Unknown type.", {
159
159
  metaMessages: [
@@ -167,7 +167,7 @@ class km extends ct {
167
167
  });
168
168
  }
169
169
  }
170
- class Bm extends ct {
170
+ class Bm extends ut {
171
171
  constructor({ type: t }) {
172
172
  super("Unknown type.", {
173
173
  metaMessages: [`Type "${t}" is not a valid ABI type.`]
@@ -179,7 +179,7 @@ class Bm extends ct {
179
179
  });
180
180
  }
181
181
  }
182
- class Om extends ct {
182
+ class Om extends ut {
183
183
  constructor({ param: t }) {
184
184
  super("Invalid ABI parameter.", {
185
185
  details: t
@@ -191,7 +191,7 @@ class Om extends ct {
191
191
  });
192
192
  }
193
193
  }
194
- class Cm extends ct {
194
+ class Cm extends ut {
195
195
  constructor({ param: t, name: r }) {
196
196
  super("Invalid ABI parameter.", {
197
197
  details: t,
@@ -206,7 +206,7 @@ class Cm extends ct {
206
206
  });
207
207
  }
208
208
  }
209
- class Rm extends ct {
209
+ class Rm extends ut {
210
210
  constructor({ param: t, type: r, modifier: n }) {
211
211
  super("Invalid ABI parameter.", {
212
212
  details: t,
@@ -221,7 +221,7 @@ class Rm extends ct {
221
221
  });
222
222
  }
223
223
  }
224
- class Nm extends ct {
224
+ class Nm extends ut {
225
225
  constructor({ param: t, type: r, modifier: n }) {
226
226
  super("Invalid ABI parameter.", {
227
227
  details: t,
@@ -237,7 +237,7 @@ class Nm extends ct {
237
237
  });
238
238
  }
239
239
  }
240
- class Fm extends ct {
240
+ class Fm extends ut {
241
241
  constructor({ abiParameter: t }) {
242
242
  super("Invalid ABI parameter.", {
243
243
  details: JSON.stringify(t, null, 2),
@@ -250,7 +250,7 @@ class Fm extends ct {
250
250
  });
251
251
  }
252
252
  }
253
- class Qn extends ct {
253
+ class Qn extends ut {
254
254
  constructor({ signature: t, type: r }) {
255
255
  super(`Invalid ${r} signature.`, {
256
256
  details: t
@@ -262,7 +262,7 @@ class Qn extends ct {
262
262
  });
263
263
  }
264
264
  }
265
- class $m extends ct {
265
+ class $m extends ut {
266
266
  constructor({ signature: t }) {
267
267
  super("Unknown signature.", {
268
268
  details: t
@@ -274,7 +274,7 @@ class $m extends ct {
274
274
  });
275
275
  }
276
276
  }
277
- class Um extends ct {
277
+ class Um extends ut {
278
278
  constructor({ signature: t }) {
279
279
  super("Invalid struct signature.", {
280
280
  details: t,
@@ -287,7 +287,7 @@ class Um extends ct {
287
287
  });
288
288
  }
289
289
  }
290
- class Hm extends ct {
290
+ class Hm extends ut {
291
291
  constructor({ type: t }) {
292
292
  super("Circular reference detected.", {
293
293
  metaMessages: [`Struct "${t}" is a circular reference.`]
@@ -299,7 +299,7 @@ class Hm extends ct {
299
299
  });
300
300
  }
301
301
  }
302
- class Lm extends ct {
302
+ class Lm extends ut {
303
303
  constructor({ current: t, depth: r }) {
304
304
  super("Unbalanced parentheses.", {
305
305
  metaMessages: [
@@ -1090,7 +1090,7 @@ let mg = class extends D {
1090
1090
  super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`, { name: "SizeOverflowError" });
1091
1091
  }
1092
1092
  };
1093
- function wt(e, { dir: t = "left" } = {}) {
1093
+ function vt(e, { dir: t = "left" } = {}) {
1094
1094
  let r = typeof e == "string" ? e.replace("0x", "") : e, n = 0;
1095
1095
  for (let i = 0; i < r.length - 1 && r[t === "left" ? i : r.length - i - 1].toString() === "0"; i++)
1096
1096
  n++;
@@ -1114,13 +1114,13 @@ function $e(e, t = {}) {
1114
1114
  }
1115
1115
  function gg(e, t = {}) {
1116
1116
  let r = e;
1117
- if (t.size && (Ot(r, { size: t.size }), r = wt(r)), wt(r) === "0x00")
1117
+ if (t.size && (Ot(r, { size: t.size }), r = vt(r)), vt(r) === "0x00")
1118
1118
  return !1;
1119
- if (wt(r) === "0x01")
1119
+ if (vt(r) === "0x01")
1120
1120
  return !0;
1121
1121
  throw new yg(r);
1122
1122
  }
1123
- function Et(e, t = {}) {
1123
+ function At(e, t = {}) {
1124
1124
  return Number($e(e, t));
1125
1125
  }
1126
1126
  const bg = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
@@ -1543,7 +1543,7 @@ function Fe(e, t) {
1543
1543
  const i = Zg.test(e) ? e.toLowerCase() === e ? !0 : r ? ss(e) === e : !0 : !1;
1544
1544
  return ea.set(n, i), i;
1545
1545
  }
1546
- function At(e) {
1546
+ function xt(e) {
1547
1547
  return typeof e[0] == "string" ? Ct(e) : Xg(e);
1548
1548
  }
1549
1549
  function Xg(e) {
@@ -1652,7 +1652,7 @@ function Pu(e) {
1652
1652
  const { dynamic: o, encoded: a } = e[s];
1653
1653
  o ? (r.push(K(t + i, { size: 32 })), n.push(a), i += _e(a)) : r.push(a);
1654
1654
  }
1655
- return At([...r, ...n]);
1655
+ return xt([...r, ...n]);
1656
1656
  }
1657
1657
  function eb(e) {
1658
1658
  if (!Fe(e))
@@ -1681,7 +1681,7 @@ function tb(e, { length: t, param: r }) {
1681
1681
  const a = K(s.length, { size: 32 });
1682
1682
  return {
1683
1683
  dynamic: !0,
1684
- encoded: s.length > 0 ? At([a, o]) : a
1684
+ encoded: s.length > 0 ? xt([a, o]) : a
1685
1685
  };
1686
1686
  }
1687
1687
  if (i)
@@ -1689,7 +1689,7 @@ function tb(e, { length: t, param: r }) {
1689
1689
  }
1690
1690
  return {
1691
1691
  dynamic: !1,
1692
- encoded: At(s.map(({ encoded: o }) => o))
1692
+ encoded: xt(s.map(({ encoded: o }) => o))
1693
1693
  };
1694
1694
  }
1695
1695
  function rb(e, { param: t }) {
@@ -1701,7 +1701,7 @@ function rb(e, { param: t }) {
1701
1701
  size: Math.ceil((e.length - 2) / 2 / 32) * 32
1702
1702
  })), {
1703
1703
  dynamic: !0,
1704
- encoded: At([Or(K(n, { size: 32 })), i])
1704
+ encoded: xt([Or(K(n, { size: 32 })), i])
1705
1705
  };
1706
1706
  }
1707
1707
  if (n !== Number.parseInt(r))
@@ -1744,7 +1744,7 @@ function sb(e) {
1744
1744
  }));
1745
1745
  return {
1746
1746
  dynamic: !0,
1747
- encoded: At([
1747
+ encoded: xt([
1748
1748
  Or(K(_e(t), { size: 32 })),
1749
1749
  ...n
1750
1750
  ])
@@ -1762,7 +1762,7 @@ function ob(e, { param: t }) {
1762
1762
  }
1763
1763
  return {
1764
1764
  dynamic: r,
1765
- encoded: r ? Pu(n) : At(n.map(({ encoded: i }) => i))
1765
+ encoded: r ? Pu(n) : xt(n.map(({ encoded: i }) => i))
1766
1766
  };
1767
1767
  }
1768
1768
  function Tu(e) {
@@ -1926,7 +1926,7 @@ function ab(e) {
1926
1926
  functionName: os(It(i))
1927
1927
  };
1928
1928
  }
1929
- function _t(e) {
1929
+ function St(e) {
1930
1930
  const { args: t } = e, { abi: r, functionName: n } = (() => {
1931
1931
  var a;
1932
1932
  return e.abi.length === 1 && ((a = e.functionName) != null && a.startsWith("0x")) ? e : ab(e);
@@ -2112,18 +2112,18 @@ function db(e, t = {}) {
2112
2112
  }
2113
2113
  function lb(e, t = {}) {
2114
2114
  let r = e;
2115
- if (typeof t.size < "u" && (Ot(r, { size: t.size }), r = wt(r)), r.length > 1 || r[0] > 1)
2115
+ if (typeof t.size < "u" && (Ot(r, { size: t.size }), r = vt(r)), r.length > 1 || r[0] > 1)
2116
2116
  throw new hg(r);
2117
2117
  return !!r[0];
2118
2118
  }
2119
2119
  function dr(e, t = {}) {
2120
2120
  typeof t.size < "u" && Ot(e, { size: t.size });
2121
2121
  const r = Oe(e, t);
2122
- return Et(r, t);
2122
+ return At(r, t);
2123
2123
  }
2124
2124
  function pb(e, t = {}) {
2125
2125
  let r = e;
2126
- return typeof t.size < "u" && (Ot(r, { size: t.size }), r = wt(r, { dir: "right" })), new TextDecoder().decode(r);
2126
+ return typeof t.size < "u" && (Ot(r, { size: t.size }), r = vt(r, { dir: "right" })), new TextDecoder().decode(r);
2127
2127
  }
2128
2128
  function cs(e, t) {
2129
2129
  const r = typeof t == "string" ? kt(t) : t, n = ku(r);
@@ -2263,7 +2263,7 @@ function vb(e, { staticPosition: t }) {
2263
2263
  const i = dr(e.readBytes(32));
2264
2264
  if (i === 0)
2265
2265
  return e.setPosition(t + 32), ["", 32];
2266
- const s = e.readBytes(i, 32), o = pb(wt(s));
2266
+ const s = e.readBytes(i, 32), o = pb(vt(s));
2267
2267
  return e.setPosition(t + 32), [o, 32];
2268
2268
  }
2269
2269
  function $i(e) {
@@ -2726,7 +2726,7 @@ class it extends D {
2726
2726
  }), this.name = s || t.name, this.code = t instanceof Cu ? t.code : r ?? Ub;
2727
2727
  }
2728
2728
  }
2729
- class ut extends it {
2729
+ class ft extends it {
2730
2730
  constructor(t, r) {
2731
2731
  super(t, r), Object.defineProperty(this, "data", {
2732
2732
  enumerable: !0,
@@ -2929,7 +2929,7 @@ Object.defineProperty(qi, "code", {
2929
2929
  writable: !0,
2930
2930
  value: -32006
2931
2931
  });
2932
- class Nn extends ut {
2932
+ class Nn extends ft {
2933
2933
  constructor(t) {
2934
2934
  super(t, {
2935
2935
  code: Nn.code,
@@ -2944,7 +2944,7 @@ Object.defineProperty(Nn, "code", {
2944
2944
  writable: !0,
2945
2945
  value: 4001
2946
2946
  });
2947
- class Gi extends ut {
2947
+ class Gi extends ft {
2948
2948
  constructor(t) {
2949
2949
  super(t, {
2950
2950
  code: Gi.code,
@@ -2959,7 +2959,7 @@ Object.defineProperty(Gi, "code", {
2959
2959
  writable: !0,
2960
2960
  value: 4100
2961
2961
  });
2962
- class Vi extends ut {
2962
+ class Vi extends ft {
2963
2963
  constructor(t, { method: r } = {}) {
2964
2964
  super(t, {
2965
2965
  code: Vi.code,
@@ -2974,7 +2974,7 @@ Object.defineProperty(Vi, "code", {
2974
2974
  writable: !0,
2975
2975
  value: 4200
2976
2976
  });
2977
- class Wi extends ut {
2977
+ class Wi extends ft {
2978
2978
  constructor(t) {
2979
2979
  super(t, {
2980
2980
  code: Wi.code,
@@ -2989,7 +2989,7 @@ Object.defineProperty(Wi, "code", {
2989
2989
  writable: !0,
2990
2990
  value: 4900
2991
2991
  });
2992
- class Ki extends ut {
2992
+ class Ki extends ft {
2993
2993
  constructor(t) {
2994
2994
  super(t, {
2995
2995
  code: Ki.code,
@@ -3004,7 +3004,7 @@ Object.defineProperty(Ki, "code", {
3004
3004
  writable: !0,
3005
3005
  value: 4901
3006
3006
  });
3007
- class Yi extends ut {
3007
+ class Yi extends ft {
3008
3008
  constructor(t) {
3009
3009
  super(t, {
3010
3010
  code: Yi.code,
@@ -3019,7 +3019,7 @@ Object.defineProperty(Yi, "code", {
3019
3019
  writable: !0,
3020
3020
  value: 4902
3021
3021
  });
3022
- class zn extends ut {
3022
+ class zn extends ft {
3023
3023
  constructor(t) {
3024
3024
  super(t, {
3025
3025
  code: zn.code,
@@ -3034,7 +3034,7 @@ Object.defineProperty(zn, "code", {
3034
3034
  writable: !0,
3035
3035
  value: 5700
3036
3036
  });
3037
- class Zi extends ut {
3037
+ class Zi extends ft {
3038
3038
  constructor(t) {
3039
3039
  super(t, {
3040
3040
  code: Zi.code,
@@ -3049,7 +3049,7 @@ Object.defineProperty(Zi, "code", {
3049
3049
  writable: !0,
3050
3050
  value: 5710
3051
3051
  });
3052
- class Xi extends ut {
3052
+ class Xi extends ft {
3053
3053
  constructor(t) {
3054
3054
  super(t, {
3055
3055
  code: Xi.code,
@@ -3064,7 +3064,7 @@ Object.defineProperty(Xi, "code", {
3064
3064
  writable: !0,
3065
3065
  value: 5720
3066
3066
  });
3067
- class Ji extends ut {
3067
+ class Ji extends ft {
3068
3068
  constructor(t) {
3069
3069
  super(t, {
3070
3070
  code: Ji.code,
@@ -3079,7 +3079,7 @@ Object.defineProperty(Ji, "code", {
3079
3079
  writable: !0,
3080
3080
  value: 5730
3081
3081
  });
3082
- class Qi extends ut {
3082
+ class Qi extends ft {
3083
3083
  constructor(t) {
3084
3084
  super(t, {
3085
3085
  code: Qi.code,
@@ -3094,7 +3094,7 @@ Object.defineProperty(Qi, "code", {
3094
3094
  writable: !0,
3095
3095
  value: 5740
3096
3096
  });
3097
- class es extends ut {
3097
+ class es extends ft {
3098
3098
  constructor(t) {
3099
3099
  super(t, {
3100
3100
  code: es.code,
@@ -3109,7 +3109,7 @@ Object.defineProperty(es, "code", {
3109
3109
  writable: !0,
3110
3110
  value: 5750
3111
3111
  });
3112
- class qn extends ut {
3112
+ class qn extends ft {
3113
3113
  constructor(t) {
3114
3114
  super(t, {
3115
3115
  code: qn.code,
@@ -3163,7 +3163,7 @@ async function Db({ hash: e, signature: t }) {
3163
3163
  const o = Zt(t) ? t : De(t);
3164
3164
  if (_e(o) !== 65)
3165
3165
  throw new Error("invalid signature length");
3166
- const a = Et(`0x${o.slice(130)}`), c = td(a);
3166
+ const a = At(`0x${o.slice(130)}`), c = td(a);
3167
3167
  return n.Signature.fromCompact(o.substring(2, 130)).addRecoveryBit(c);
3168
3168
  })().recoverPublicKey(r.substring(2)).toHex(!1)}`;
3169
3169
  }
@@ -3620,13 +3620,13 @@ function vo(e) {
3620
3620
  ...e,
3621
3621
  blockHash: e.blockHash ? e.blockHash : null,
3622
3622
  blockNumber: e.blockNumber ? BigInt(e.blockNumber) : null,
3623
- chainId: e.chainId ? Et(e.chainId) : void 0,
3623
+ chainId: e.chainId ? At(e.chainId) : void 0,
3624
3624
  gas: e.gas ? BigInt(e.gas) : void 0,
3625
3625
  gasPrice: e.gasPrice ? BigInt(e.gasPrice) : void 0,
3626
3626
  maxFeePerBlobGas: e.maxFeePerBlobGas ? BigInt(e.maxFeePerBlobGas) : void 0,
3627
3627
  maxFeePerGas: e.maxFeePerGas ? BigInt(e.maxFeePerGas) : void 0,
3628
3628
  maxPriorityFeePerGas: e.maxPriorityFeePerGas ? BigInt(e.maxPriorityFeePerGas) : void 0,
3629
- nonce: e.nonce ? Et(e.nonce) : void 0,
3629
+ nonce: e.nonce ? At(e.nonce) : void 0,
3630
3630
  to: e.to ? e.to : null,
3631
3631
  transactionIndex: e.transactionIndex ? Number(e.transactionIndex) : null,
3632
3632
  type: e.type ? ph[e.type] : void 0,
@@ -3788,7 +3788,7 @@ async function Hu(e, { address: t, blockTag: r = "latest", blockNumber: n }) {
3788
3788
  }, {
3789
3789
  dedupe: !!n
3790
3790
  });
3791
- return Et(i);
3791
+ return At(i);
3792
3792
  }
3793
3793
  function Lu(e) {
3794
3794
  const { kzg: t } = e, r = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), n = typeof e.blobs[0] == "string" ? e.blobs.map((s) => kt(s)) : e.blobs, i = [];
@@ -4101,7 +4101,7 @@ async function ni(e) {
4101
4101
  const t = await e.request({
4102
4102
  method: "eth_chainId"
4103
4103
  }, { dedupe: !0 });
4104
- return Et(t);
4104
+ return At(t);
4105
4105
  }
4106
4106
  const Ph = [
4107
4107
  "blobVersionedHashes",
@@ -4278,7 +4278,7 @@ async function zu(e, t) {
4278
4278
  }
4279
4279
  }
4280
4280
  async function Ih(e, t) {
4281
- const { abi: r, address: n, args: i, functionName: s, dataSuffix: o, ...a } = t, c = _t({
4281
+ const { abi: r, address: n, args: i, functionName: s, dataSuffix: o, ...a } = t, c = St({
4282
4282
  abi: r,
4283
4283
  args: i,
4284
4284
  functionName: s
@@ -4527,7 +4527,7 @@ function Yu(e, t) {
4527
4527
  function Oh(e, t) {
4528
4528
  return Yu(e, t).reverse();
4529
4529
  }
4530
- function ht(e, t, r) {
4530
+ function yt(e, t, r) {
4531
4531
  let n;
4532
4532
  if (typeof t == "string")
4533
4533
  try {
@@ -4729,26 +4729,26 @@ function Iw(e, t = {}) {
4729
4729
  return i;
4730
4730
  }
4731
4731
  function Xu(e, t) {
4732
- if (xt(e) > t)
4732
+ if (_t(e) > t)
4733
4733
  throw new zw({
4734
- givenSize: xt(e),
4734
+ givenSize: _t(e),
4735
4735
  maxSize: t
4736
4736
  });
4737
4737
  }
4738
4738
  function kw(e, t) {
4739
- if (typeof t == "number" && t > 0 && t > xt(e) - 1)
4739
+ if (typeof t == "number" && t > 0 && t > _t(e) - 1)
4740
4740
  throw new Uh({
4741
4741
  offset: t,
4742
4742
  position: "start",
4743
- size: xt(e)
4743
+ size: _t(e)
4744
4744
  });
4745
4745
  }
4746
4746
  function Bw(e, t, r) {
4747
- if (typeof t == "number" && typeof r == "number" && xt(e) !== r - t)
4747
+ if (typeof t == "number" && typeof r == "number" && _t(e) !== r - t)
4748
4748
  throw new Uh({
4749
4749
  offset: r,
4750
4750
  position: "end",
4751
- size: xt(e)
4751
+ size: _t(e)
4752
4752
  });
4753
4753
  }
4754
4754
  function Rh(e, t = {}) {
@@ -4874,7 +4874,7 @@ function Qu(e, t, r, n = {}) {
4874
4874
  const s = `0x${e.replace("0x", "").slice((t ?? 0) * 2, (r ?? e.length) * 2)}`;
4875
4875
  return i && Bw(s, t, r), s;
4876
4876
  }
4877
- function xt(e) {
4877
+ function _t(e) {
4878
4878
  return Math.ceil((e.length - 2) / 2);
4879
4879
  }
4880
4880
  function jw(e, t = {}) {
@@ -5442,7 +5442,7 @@ async function To(e, t) {
5442
5442
  });
5443
5443
  return Z === "0x" ? { data: void 0 } : { data: Z };
5444
5444
  } catch (J) {
5445
- const M = r1(J), { offchainLookup: k, offchainLookupSignature: q } = await import("./ccip-BEaoEhEE.js");
5445
+ const M = r1(J), { offchainLookup: k, offchainLookupSignature: q } = await import("./ccip-BOasyyJL.js");
5446
5446
  if (e.ccipRead !== !1 && (M == null ? void 0 : M.slice(0, 10)) === q && x)
5447
5447
  return { data: await k(e, { data: M, to: x }) };
5448
5448
  throw O && (M == null ? void 0 : M.slice(0, 10)) === "0x101bb98d" ? new $b({ factory: y }) : zh(J, {
@@ -5480,7 +5480,7 @@ async function Qw(e, t) {
5480
5480
  allowFailure: !0,
5481
5481
  callData: x.data,
5482
5482
  target: x.to
5483
- })), S = _t({
5483
+ })), S = St({
5484
5484
  abi: Zc,
5485
5485
  args: [A],
5486
5486
  functionName: "aggregate3"
@@ -5530,7 +5530,7 @@ function r1(e) {
5530
5530
  return typeof (t == null ? void 0 : t.data) == "object" ? (r = t.data) == null ? void 0 : r.data : t.data;
5531
5531
  }
5532
5532
  async function Jt(e, t) {
5533
- const { abi: r, address: n, args: i, functionName: s, ...o } = t, a = _t({
5533
+ const { abi: r, address: n, args: i, functionName: s, ...o } = t, a = St({
5534
5534
  abi: r,
5535
5535
  args: i,
5536
5536
  functionName: s
@@ -5558,7 +5558,7 @@ async function Jt(e, t) {
5558
5558
  }
5559
5559
  }
5560
5560
  async function Gh(e, t) {
5561
- const { abi: r, address: n, args: i, dataSuffix: s, functionName: o, ...a } = t, c = a.account ? ke(a.account) : e.account, f = _t({ abi: r, args: i, functionName: o });
5561
+ const { abi: r, address: n, args: i, dataSuffix: s, functionName: o, ...a } = t, c = a.account ? ke(a.account) : e.account, f = St({ abi: r, args: i, functionName: o });
5562
5562
  try {
5563
5563
  const { data: u } = await ee(e, To, "call")({
5564
5564
  batch: !1,
@@ -6000,7 +6000,7 @@ async function Yh(e, t) {
6000
6000
  throw new yn({
6001
6001
  docsPath: "/docs/contract/writeContract"
6002
6002
  });
6003
- const f = n ? ke(n) : null, u = _t({
6003
+ const f = n ? ke(n) : null, u = St({
6004
6004
  abi: r,
6005
6005
  args: s,
6006
6006
  functionName: a
@@ -6147,7 +6147,7 @@ function Xh(e) {
6147
6147
  gasUsed: e.gasUsed ? BigInt(e.gasUsed) : null,
6148
6148
  logs: e.logs ? e.logs.map((r) => pr(r)) : null,
6149
6149
  to: e.to ? e.to : null,
6150
- transactionIndex: e.transactionIndex ? Et(e.transactionIndex) : null,
6150
+ transactionIndex: e.transactionIndex ? At(e.transactionIndex) : null,
6151
6151
  status: e.status ? Zh[e.status] : null,
6152
6152
  type: e.type ? ph[e.type] || e.type : null
6153
6153
  };
@@ -6158,13 +6158,13 @@ const u1 = /* @__PURE__ */ Ru("transactionReceipt", Xh), Jh = "0x579257925792579
6158
6158
  });
6159
6159
  async function f1(e, t) {
6160
6160
  const { account: r = e.account, capabilities: n, chain: i = e.chain, experimental_fallback: s, experimental_fallbackDelay: o = 32, forceAtomic: a = !1, id: c, version: f = "2.0.0" } = t, u = r ? ke(r) : null, d = t.calls.map((y) => {
6161
- const p = y, g = p.abi ? _t({
6161
+ const p = y, g = p.abi ? St({
6162
6162
  abi: p.abi,
6163
6163
  functionName: p.functionName,
6164
6164
  args: p.args
6165
6165
  }) : p.data;
6166
6166
  return {
6167
- data: p.dataSuffix && g ? At([g, p.dataSuffix]) : g,
6167
+ data: p.dataSuffix && g ? xt([g, p.dataSuffix]) : g,
6168
6168
  to: p.to,
6169
6169
  value: p.value ? K(p.value) : void 0
6170
6170
  };
@@ -6216,7 +6216,7 @@ async function f1(e, t) {
6216
6216
  throw b[0].reason;
6217
6217
  const E = b.map((A) => A.status === "fulfilled" ? A.value : Qh);
6218
6218
  return {
6219
- id: At([
6219
+ id: xt([
6220
6220
  ...E,
6221
6221
  K(i.id, { size: 32 }),
6222
6222
  Jh
@@ -6233,13 +6233,13 @@ async function f1(e, t) {
6233
6233
  async function e0(e, t) {
6234
6234
  async function r(u) {
6235
6235
  if (u.endsWith(Jh.slice(2))) {
6236
- const y = wt(Qs(u, -64, -32)), p = Qs(u, 0, -64).slice(2).match(/.{1,64}/g), g = await Promise.all(p.map((E) => Qh.slice(2) !== E ? e.request({
6236
+ const y = vt(Qs(u, -64, -32)), p = Qs(u, 0, -64).slice(2).match(/.{1,64}/g), g = await Promise.all(p.map((E) => Qh.slice(2) !== E ? e.request({
6237
6237
  method: "eth_getTransactionReceipt",
6238
6238
  params: [`0x${E}`]
6239
6239
  }, { dedupe: !0 }) : void 0)), b = g.some((E) => E === null) ? 100 : g.every((E) => (E == null ? void 0 : E.status) === "0x1") ? 200 : g.every((E) => (E == null ? void 0 : E.status) === "0x0") ? 500 : 600;
6240
6240
  return {
6241
6241
  atomic: !1,
6242
- chainId: Et(y),
6242
+ chainId: At(y),
6243
6243
  receipts: g.filter(Boolean),
6244
6244
  status: b,
6245
6245
  version: "2.0.0"
@@ -6258,7 +6258,7 @@ async function e0(e, t) {
6258
6258
  ...a,
6259
6259
  atomic: n,
6260
6260
  // @ts-expect-error: for backwards compatibility
6261
- chainId: i ? Et(i) : void 0,
6261
+ chainId: i ? At(i) : void 0,
6262
6262
  receipts: (s == null ? void 0 : s.map((u) => ({
6263
6263
  ...u,
6264
6264
  blockNumber: $e(u.blockNumber),
@@ -6754,7 +6754,7 @@ function zs(e) {
6754
6754
  const r = e.split(".");
6755
6755
  for (let n = r.length - 1; n >= 0; n -= 1) {
6756
6756
  const i = s0(r[n]), s = i ? ti(i) : Me(Zr(r[n]), "bytes");
6757
- t = Me(At([t, s]), "bytes");
6757
+ t = Me(xt([t, s]), "bytes");
6758
6758
  }
6759
6759
  return Oe(t);
6760
6760
  }
@@ -6793,7 +6793,7 @@ async function P1(e, t) {
6793
6793
  if (u && !u.some((d) => s.endsWith(d)))
6794
6794
  return null;
6795
6795
  try {
6796
- const d = _t({
6796
+ const d = St({
6797
6797
  abi: pd,
6798
6798
  functionName: "addr",
6799
6799
  ...i != null ? { args: [zs(s), BigInt(i)] } : { args: [zs(s)] }
@@ -6817,7 +6817,7 @@ async function P1(e, t) {
6817
6817
  functionName: "addr",
6818
6818
  data: g[0]
6819
6819
  });
6820
- return b === "0x" || wt(b) === "0x00" ? null : b;
6820
+ return b === "0x" || vt(b) === "0x00" ? null : b;
6821
6821
  } catch (d) {
6822
6822
  if (a)
6823
6823
  throw d;
@@ -7028,7 +7028,7 @@ async function c0(e, t) {
7028
7028
  functionName: "resolve",
7029
7029
  args: [
7030
7030
  De(Oo(s)),
7031
- _t({
7031
+ St({
7032
7032
  abi: ld,
7033
7033
  functionName: "text",
7034
7034
  args: [zs(s), i]
@@ -7238,7 +7238,7 @@ async function q1(e, { blockHash: t, blockNumber: r, blockTag: n = "latest" } =
7238
7238
  }, { dedupe: !0 }) : s = await e.request({
7239
7239
  method: "eth_getBlockTransactionCountByNumber",
7240
7240
  params: [i || n]
7241
- }, { dedupe: !!i }), Et(s);
7241
+ }, { dedupe: !!i }), At(s);
7242
7242
  }
7243
7243
  async function vd(e, { address: t, blockNumber: r, blockTag: n = "latest" }) {
7244
7244
  const i = r !== void 0 ? K(r) : void 0, s = await e.request({
@@ -7335,7 +7335,7 @@ async function Z1(e, { filter: t }) {
7335
7335
  strict: r
7336
7336
  }) : i;
7337
7337
  }
7338
- function St(e) {
7338
+ function st(e) {
7339
7339
  return {
7340
7340
  formatters: void 0,
7341
7341
  fees: void 0,
@@ -7385,7 +7385,7 @@ function e2(e) {
7385
7385
  data: r,
7386
7386
  primaryType: n,
7387
7387
  types: i
7388
- })), Me(At(s));
7388
+ })), Me(xt(s));
7389
7389
  }
7390
7390
  function t2({ domain: e, types: t }) {
7391
7391
  return l0({
@@ -7549,7 +7549,7 @@ function a2(e) {
7549
7549
  if (t.length === 0)
7550
7550
  throw new xh();
7551
7551
  for (const r of t) {
7552
- const n = _e(r), i = Et(rn(r, 0, 1));
7552
+ const n = _e(r), i = At(rn(r, 0, 1));
7553
7553
  if (n !== 32)
7554
7554
  throw new hw({ hash: r, size: n });
7555
7555
  if (i !== Ah)
@@ -7735,7 +7735,7 @@ function y2(e, t) {
7735
7735
  if (t.v !== p)
7736
7736
  throw new Ib({ v: t.v });
7737
7737
  return p;
7738
- })(), d = wt(t.r), y = wt(t.s);
7738
+ })(), d = vt(t.r), y = vt(t.s);
7739
7739
  f = [
7740
7740
  ...f,
7741
7741
  K(u),
@@ -7758,7 +7758,7 @@ function ls(e, t) {
7758
7758
  return [];
7759
7759
  if (typeof n > "u" && typeof i > "u")
7760
7760
  return [];
7761
- const s = wt(r.r), o = wt(r.s);
7761
+ const s = vt(r.r), o = vt(r.s);
7762
7762
  return [typeof i == "number" ? i ? K(1) : "0x" : n === 0n ? "0x" : n === 1n ? K(1) : n === 27n ? "0x" : K(1), s === "0x00" ? "0x" : s, o === "0x00" ? "0x" : o];
7763
7763
  }
7764
7764
  function m2(e) {
@@ -7865,7 +7865,7 @@ const x2 = /* @__PURE__ */ lo(() => new x0()), _2 = x0, S2 = x2, P2 = /* @__PURE
7865
7865
  `;
7866
7866
  function I2(e) {
7867
7867
  const t = typeof e == "string" ? Mn(e) : typeof e.raw == "string" ? e.raw : Oe(e.raw), r = Mn(`${T2}${_e(t)}`);
7868
- return At([r, t]);
7868
+ return xt([r, t]);
7869
7869
  }
7870
7870
  function _0(e, t) {
7871
7871
  return Me(I2(e), t);
@@ -7891,7 +7891,7 @@ function C2(e) {
7891
7891
  return {
7892
7892
  ...e,
7893
7893
  balance: e.balance ? BigInt(e.balance) : void 0,
7894
- nonce: e.nonce ? Et(e.nonce) : void 0,
7894
+ nonce: e.nonce ? At(e.nonce) : void 0,
7895
7895
  storageProof: e.storageProof ? O2(e.storageProof) : void 0
7896
7896
  };
7897
7897
  }
@@ -7967,7 +7967,7 @@ async function $2(e, t) {
7967
7967
  for (let S = 0; S < f.length; S++) {
7968
7968
  const { abi: w, address: x, args: P, functionName: T } = f[S];
7969
7969
  try {
7970
- const C = _t({ abi: w, args: P, functionName: T });
7970
+ const C = St({ abi: w, args: P, functionName: T });
7971
7971
  g += (C.length - 2) / 2, // Check if batching is enabled.
7972
7972
  u > 0 && // Check if the current size of the batch exceeds the size limit.
7973
7973
  g > u && // Check if the current chunk is not already empty.
@@ -8062,9 +8062,9 @@ async function nu(e, t) {
8062
8062
  const c = [];
8063
8063
  for (const y of i) {
8064
8064
  const p = y.blockOverrides ? Hh(y.blockOverrides) : void 0, g = y.calls.map((E) => {
8065
- const A = E, S = A.account ? ke(A.account) : void 0, w = A.abi ? _t(A) : A.data, x = {
8065
+ const A = E, S = A.account ? ke(A.account) : void 0, w = A.abi ? St(A) : A.data, x = {
8066
8066
  ...A,
8067
- data: A.dataSuffix ? At([w || "0x", A.dataSuffix]) : w,
8067
+ data: A.dataSuffix ? xt([w || "0x", A.dataSuffix]) : w,
8068
8068
  from: A.from ?? (S == null ? void 0 : S.address)
8069
8069
  };
8070
8070
  return pn(x), ri(x);
@@ -8427,13 +8427,13 @@ function ff(e) {
8427
8427
  let t = 0;
8428
8428
  for (let s = 0; s < e.length; s++) {
8429
8429
  const { dynamic: o, encoded: a } = e[s];
8430
- o ? t += 32 : t += xt(a);
8430
+ o ? t += 32 : t += _t(a);
8431
8431
  }
8432
8432
  const r = [], n = [];
8433
8433
  let i = 0;
8434
8434
  for (let s = 0; s < e.length; s++) {
8435
8435
  const { dynamic: o, encoded: a } = e[s];
8436
- o ? (r.push(Xe(t + i, { size: 32 })), n.push(a), i += xt(a)) : r.push(a);
8436
+ o ? (r.push(Xe(t + i, { size: 32 })), n.push(a), i += _t(a)) : r.push(a);
8437
8437
  }
8438
8438
  return Xt(...r, ...n);
8439
8439
  }
@@ -8482,7 +8482,7 @@ function Z2(e, t) {
8482
8482
  };
8483
8483
  }
8484
8484
  function X2(e, { type: t }) {
8485
- const [, r] = t.split("bytes"), n = xt(e);
8485
+ const [, r] = t.split("bytes"), n = _t(e);
8486
8486
  if (!r) {
8487
8487
  let i = e;
8488
8488
  return n % 32 !== 0 && (i = un(i, Math.ceil((e.length - 2) / 2 / 32) * 32)), {
@@ -8523,12 +8523,12 @@ function Q2(e, { signed: t, size: r }) {
8523
8523
  };
8524
8524
  }
8525
8525
  function ev(e) {
8526
- const t = Ju(e), r = Math.ceil(xt(t) / 32), n = [];
8526
+ const t = Ju(e), r = Math.ceil(_t(t) / 32), n = [];
8527
8527
  for (let i = 0; i < r; i++)
8528
8528
  n.push(un(Qu(t, i * 32, (i + 1) * 32)));
8529
8529
  return {
8530
8530
  dynamic: !0,
8531
- encoded: Xt(un(Xe(xt(t), { size: 32 })), ...n)
8531
+ encoded: Xt(un(Xe(_t(t), { size: 32 })), ...n)
8532
8532
  };
8533
8533
  }
8534
8534
  function tv(e, t) {
@@ -8635,7 +8635,7 @@ class nv extends we {
8635
8635
  }
8636
8636
  class C0 extends we {
8637
8637
  constructor({ expectedSize: t, value: r }) {
8638
- super(`Size of bytes "${r}" (bytes${xt(r)}) does not match expected size (bytes${t}).`), Object.defineProperty(this, "name", {
8638
+ super(`Size of bytes "${r}" (bytes${_t(r)}) does not match expected size (bytes${t}).`), Object.defineProperty(this, "name", {
8639
8639
  enumerable: !0,
8640
8640
  configurable: !0,
8641
8641
  writable: !0,
@@ -8721,7 +8721,7 @@ async function lv(e, t) {
8721
8721
  const { accessList: k } = await u0(e, {
8722
8722
  account: f.address,
8723
8723
  ...M,
8724
- data: M.abi ? _t(M) : M.data
8724
+ data: M.abi ? St(M) : M.data
8725
8725
  });
8726
8726
  return k.map(({ address: q, storageKeys: W }) => W.length > 0 ? q : null);
8727
8727
  })).then((M) => M.flat().filter(Boolean)) : [], y = await nu(e, {
@@ -8913,11 +8913,11 @@ const $0 = (e, t, r) => new F0(e, t).update(r).digest();
8913
8913
  $0.create = (e, t) => new F0(e, t);
8914
8914
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
8915
8915
  const rt = BigInt(0), Qe = BigInt(1), Vr = /* @__PURE__ */ BigInt(2), pv = /* @__PURE__ */ BigInt(3), U0 = /* @__PURE__ */ BigInt(4), H0 = /* @__PURE__ */ BigInt(5), L0 = /* @__PURE__ */ BigInt(8);
8916
- function gt(e, t) {
8916
+ function bt(e, t) {
8917
8917
  const r = e % t;
8918
8918
  return r >= rt ? r : t + r;
8919
8919
  }
8920
- function lt(e, t, r) {
8920
+ function pt(e, t, r) {
8921
8921
  let n = e;
8922
8922
  for (; t-- > rt; )
8923
8923
  n *= n, n %= r;
@@ -8928,14 +8928,14 @@ function xd(e, t) {
8928
8928
  throw new Error("invert: expected non-zero number");
8929
8929
  if (t <= rt)
8930
8930
  throw new Error("invert: expected positive modulus, got " + t);
8931
- let r = gt(e, t), n = t, i = rt, s = Qe;
8931
+ let r = bt(e, t), n = t, i = rt, s = Qe;
8932
8932
  for (; r !== rt; ) {
8933
8933
  const a = n / r, c = n % r, f = i - s * a;
8934
8934
  n = r, r = c, i = s, s = f;
8935
8935
  }
8936
8936
  if (n !== Qe)
8937
8937
  throw new Error("invert: does not exist");
8938
- return gt(i, t);
8938
+ return bt(i, t);
8939
8939
  }
8940
8940
  function M0(e, t) {
8941
8941
  const r = (e.ORDER + Qe) / U0, n = e.pow(t, r);
@@ -9064,7 +9064,7 @@ function No(e, t, r = !1, n = {}) {
9064
9064
  MASK: _o(o),
9065
9065
  ZERO: rt,
9066
9066
  ONE: Qe,
9067
- create: (u) => gt(u, e),
9067
+ create: (u) => bt(u, e),
9068
9068
  isValid: (u) => {
9069
9069
  if (typeof u != "bigint")
9070
9070
  throw new Error("invalid field element: expected bigint, got " + typeof u);
@@ -9074,14 +9074,14 @@ function No(e, t, r = !1, n = {}) {
9074
9074
  // is valid and invertible
9075
9075
  isValidNot0: (u) => !f.is0(u) && f.isValid(u),
9076
9076
  isOdd: (u) => (u & Qe) === Qe,
9077
- neg: (u) => gt(-u, e),
9077
+ neg: (u) => bt(-u, e),
9078
9078
  eql: (u, d) => u === d,
9079
- sqr: (u) => gt(u * u, e),
9080
- add: (u, d) => gt(u + d, e),
9081
- sub: (u, d) => gt(u - d, e),
9082
- mul: (u, d) => gt(u * d, e),
9079
+ sqr: (u) => bt(u * u, e),
9080
+ add: (u, d) => bt(u + d, e),
9081
+ sub: (u, d) => bt(u - d, e),
9082
+ mul: (u, d) => bt(u * d, e),
9083
9083
  pow: (u, d) => wv(f, u, d),
9084
- div: (u, d) => gt(u * xd(d, e), e),
9084
+ div: (u, d) => bt(u * xd(d, e), e),
9085
9085
  // Same as above, but doesn't normalize
9086
9086
  sqrN: (u) => u * u,
9087
9087
  addN: (u, d) => u + d,
@@ -9117,7 +9117,7 @@ function Ev(e, t, r = !1) {
9117
9117
  const n = e.length, i = j0(t), s = z0(t);
9118
9118
  if (n < 16 || n < s || n > 1024)
9119
9119
  throw new Error("expected " + s + "-1024 bytes of input, got " + n);
9120
- const o = r ? Bh(e) : xo(e), a = gt(o, t - Qe) + Qe;
9120
+ const o = r ? Bh(e) : xo(e), a = bt(o, t - Qe) + Qe;
9121
9121
  return r ? Oh(a, i) : Yu(a, i);
9122
9122
  }
9123
9123
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
@@ -9398,7 +9398,7 @@ const cr = {
9398
9398
  }
9399
9399
  },
9400
9400
  toSig(e) {
9401
- const { Err: t, _int: r, _tlv: n } = cr, i = ht("signature", e), { v: s, l: o } = n.decode(48, i);
9401
+ const { Err: t, _int: r, _tlv: n } = cr, i = yt("signature", e), { v: s, l: o } = n.decode(48, i);
9402
9402
  if (o.length)
9403
9403
  throw new t("invalid signature: left bytes after parsing");
9404
9404
  const { v: a, l: c } = n.decode(2, s), { v: f, l: u } = n.decode(2, c);
@@ -9425,7 +9425,7 @@ function V0(e, t, r) {
9425
9425
  if (typeof s == "bigint")
9426
9426
  o = s;
9427
9427
  else {
9428
- let a = ht("private key", s);
9428
+ let a = yt("private key", s);
9429
9429
  if (t) {
9430
9430
  if (!t.includes(a.length * 2))
9431
9431
  throw new Error("invalid private key");
@@ -9574,7 +9574,7 @@ function Rv(e, t = {}) {
9574
9574
  }
9575
9575
  /** Converts hash string or Uint8Array to Point. */
9576
9576
  static fromHex(_) {
9577
- const F = P.fromAffine(d(ht("pointHex", _)));
9577
+ const F = P.fromAffine(d(yt("pointHex", _)));
9578
9578
  return F.assertValidity(), F;
9579
9579
  }
9580
9580
  /** Multiplies generator point by privateKey. */
@@ -9764,13 +9764,13 @@ function Nv(e, t, r = {}) {
9764
9764
  }
9765
9765
  // pair (bytes of r, bytes of s)
9766
9766
  static fromCompact($) {
9767
- const j = o.BYTES, V = ht("compactSignature", $, j * 2);
9767
+ const j = o.BYTES, V = yt("compactSignature", $, j * 2);
9768
9768
  return new y(o.fromBytes(V.subarray(0, j)), o.fromBytes(V.subarray(j, j * 2)));
9769
9769
  }
9770
9770
  // DER encoded ECDSA signature
9771
9771
  // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script
9772
9772
  static fromDER($) {
9773
- const { r: j, s: V } = cr.toSig(ht("DER", $));
9773
+ const { r: j, s: V } = cr.toSig(yt("DER", $));
9774
9774
  return new y(j, V);
9775
9775
  }
9776
9776
  /**
@@ -9792,7 +9792,7 @@ function Nv(e, t, r = {}) {
9792
9792
  const M = X === 2 || X === 3 ? V + a : V;
9793
9793
  if (!s.isValid(M))
9794
9794
  throw new Error("recovery id 2 or 3 invalid");
9795
- const k = s.toBytes(M), q = e.fromHex(qr(W0((X & 1) === 0), k)), W = o.inv(M), I = w(ht("msgHash", $)), R = o.create(-I * W), U = o.create(Y * W), Z = e.BASE.multiplyUnsafe(R).add(q.multiplyUnsafe(U));
9795
+ const k = s.toBytes(M), q = e.fromHex(qr(W0((X & 1) === 0), k)), W = o.inv(M), I = w(yt("msgHash", $)), R = o.create(-I * W), U = o.create(Y * W), Z = e.BASE.multiplyUnsafe(R).add(q.multiplyUnsafe(U));
9796
9796
  if (Z.is0())
9797
9797
  throw new Error("point at infinify");
9798
9798
  return Z.assertValidity(), Z;
@@ -9855,7 +9855,7 @@ function Nv(e, t, r = {}) {
9855
9855
  return !1;
9856
9856
  if (O instanceof e)
9857
9857
  return !0;
9858
- const j = ht("key", O).length, V = s.BYTES, Y = V + 1, X = 2 * V + 1;
9858
+ const j = yt("key", O).length, V = s.BYTES, Y = V + 1, X = 2 * V + 1;
9859
9859
  if (!(r.allowedPrivateKeyLengths || o.BYTES === Y))
9860
9860
  return j === Y || j === X;
9861
9861
  }
@@ -9882,11 +9882,11 @@ function Nv(e, t, r = {}) {
9882
9882
  throw new Error("sign() legacy options not supported");
9883
9883
  const { hash: V } = t;
9884
9884
  let { lowS: Y, prehash: X, extraEntropy: J } = j;
9885
- Y == null && (Y = !0), O = ht("msgHash", O), Id(j), X && (O = ht("prehashed msgHash", V(O)));
9885
+ Y == null && (Y = !0), O = yt("msgHash", O), Id(j), X && (O = yt("prehashed msgHash", V(O)));
9886
9886
  const M = w(O), k = p($), q = [P(k), P(M)];
9887
9887
  if (J != null && J !== !1) {
9888
9888
  const U = J === !0 ? n(s.BYTES) : J;
9889
- q.push(ht("extraEntropy", U));
9889
+ q.push(yt("extraEntropy", U));
9890
9890
  }
9891
9891
  const W = qr(...q), I = M;
9892
9892
  function R(U) {
@@ -9912,7 +9912,7 @@ function Nv(e, t, r = {}) {
9912
9912
  e.BASE.precompute(8);
9913
9913
  function F(O, $, j, V = L) {
9914
9914
  const Y = O;
9915
- $ = ht("msgHash", $), j = ht("publicKey", j), Id(V);
9915
+ $ = yt("msgHash", $), j = yt("publicKey", j), Id(V);
9916
9916
  const { lowS: X, prehash: J, format: M } = V;
9917
9917
  if ("strict" in V)
9918
9918
  throw new Error("options.strict was renamed to lowS");
@@ -10019,7 +10019,7 @@ const to = {
10019
10019
  BigInt(0);
10020
10020
  const Mv = BigInt(1), uu = BigInt(2), kd = (e, t) => (e + t / uu) / t;
10021
10021
  function Dv(e) {
10022
- const t = to.p, r = BigInt(3), n = BigInt(6), i = BigInt(11), s = BigInt(22), o = BigInt(23), a = BigInt(44), c = BigInt(88), f = e * e * e % t, u = f * f * e % t, d = lt(u, r, t) * u % t, y = lt(d, r, t) * u % t, p = lt(y, uu, t) * f % t, g = lt(p, i, t) * p % t, b = lt(g, s, t) * g % t, E = lt(b, a, t) * b % t, A = lt(E, c, t) * E % t, S = lt(A, a, t) * b % t, w = lt(S, r, t) * u % t, x = lt(w, o, t) * g % t, P = lt(x, n, t) * f % t, T = lt(P, uu, t);
10022
+ const t = to.p, r = BigInt(3), n = BigInt(6), i = BigInt(11), s = BigInt(22), o = BigInt(23), a = BigInt(44), c = BigInt(88), f = e * e * e % t, u = f * f * e % t, d = pt(u, r, t) * u % t, y = pt(d, r, t) * u % t, p = pt(y, uu, t) * f % t, g = pt(p, i, t) * p % t, b = pt(g, s, t) * g % t, E = pt(b, a, t) * b % t, A = pt(E, c, t) * E % t, S = pt(A, a, t) * b % t, w = pt(S, r, t) * u % t, x = pt(w, o, t) * g % t, P = pt(x, n, t) * f % t, T = pt(P, uu, t);
10023
10023
  if (!fu.eql(fu.sqr(T), e))
10024
10024
  throw new Error("Cannot find square root");
10025
10025
  return T;
@@ -10034,7 +10034,7 @@ const fu = No(to.p, void 0, void 0, { sqrt: Dv }), K0 = Lv({
10034
10034
  beta: BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),
10035
10035
  splitScalar: (e) => {
10036
10036
  const t = to.n, r = BigInt("0x3086d221a7d46bcde86c90e49284eb15"), n = -Mv * BigInt("0xe4437ed6010e88286f547fa90abfe4c3"), i = BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"), s = r, o = BigInt("0x100000000000000000000000000000000"), a = kd(s * e, t), c = kd(-n * e, t);
10037
- let f = gt(e - a * r - c * i, t), u = gt(-a * n - c * s, t);
10037
+ let f = bt(e - a * r - c * i, t), u = bt(-a * n - c * s, t);
10038
10038
  const d = f > o, y = u > o;
10039
10039
  if (d && (f = t - f), y && (u = t - u), f > o || u > o)
10040
10040
  throw new Error("splitScalar: Endomorphism failed, k=" + e);
@@ -10065,7 +10065,7 @@ async function df(e, t) {
10065
10065
  try {
10066
10066
  const g = a ? {
10067
10067
  to: a,
10068
- data: _t({
10068
+ data: St({
10069
10069
  abi: hd,
10070
10070
  functionName: "isValidSig",
10071
10071
  args: [r, s, u]
@@ -10917,7 +10917,7 @@ const ma = {
10917
10917
  chain: If.mainnet.base_cbBTC.chain,
10918
10918
  asset: If.mainnet.base_cbBTC.atomicSwapAddress
10919
10919
  };
10920
- var Fn = /* @__PURE__ */ ((e) => (e.SLOW = "SLOW", e.MEDIUM = "MEDIUM", e.FAST = "FAST", e))(Fn || {}), vt = /* @__PURE__ */ ((e) => (e.Mainnet = "Mainnet", e.Testnet = "Testnet", e.Regtest = "Regtest", e))(vt || {}), qs = /* @__PURE__ */ ((e) => (e.ALL = "ALL", e.IN = "IN", e.OUT = "OUT", e))(qs || {});
10920
+ var Fn = /* @__PURE__ */ ((e) => (e.SLOW = "SLOW", e.MEDIUM = "MEDIUM", e.FAST = "FAST", e))(Fn || {}), Et = /* @__PURE__ */ ((e) => (e.Mainnet = "Mainnet", e.Testnet = "Testnet", e.Regtest = "Regtest", e))(Et || {}), qs = /* @__PURE__ */ ((e) => (e.ALL = "ALL", e.IN = "IN", e.OUT = "OUT", e))(qs || {});
10921
10921
  const wE = {
10922
10922
  SLOW: "economyFee",
10923
10923
  MEDIUM: "hourFee",
@@ -10957,16 +10957,16 @@ const Dr = (e) => e.length === 64 ? e : e.slice(2), xE = (e) => {
10957
10957
  if (!e) return !1;
10958
10958
  try {
10959
10959
  const t = Buffer.from(e, "hex");
10960
- return bt.isPoint(t);
10960
+ return wt.isPoint(t);
10961
10961
  } catch {
10962
10962
  return !1;
10963
10963
  }
10964
10964
  }, Rd = (e, t, r, n) => e + ":" + t.toLowerCase() + "::" + r + ":" + n.toLowerCase();
10965
- function o5(e, t) {
10965
+ function c5(e, t) {
10966
10966
  if (!e) return !1;
10967
10967
  const r = t === Yt.MAINNET ? le.networks.bitcoin : t === Yt.TESTNET ? le.networks.testnet : le.networks.regtest;
10968
10968
  if (!r) return !1;
10969
- le.initEccLib(bt);
10969
+ le.initEccLib(wt);
10970
10970
  try {
10971
10971
  return le.address.toOutputScript(e, r), !0;
10972
10972
  } catch {
@@ -10976,11 +10976,11 @@ function o5(e, t) {
10976
10976
  const _E = (e) => {
10977
10977
  switch (e) {
10978
10978
  case Yt.MAINNET:
10979
- return vt.Mainnet;
10979
+ return Et.Mainnet;
10980
10980
  case Yt.TESTNET:
10981
- return vt.Testnet;
10981
+ return Et.Testnet;
10982
10982
  case Yt.LOCALNET:
10983
- return vt.Regtest;
10983
+ return Et.Regtest;
10984
10984
  default:
10985
10985
  throw new Error(`Invalid bitcoin network ${e}`);
10986
10986
  }
@@ -11055,7 +11055,7 @@ const X0 = (e, t, r) => {
11055
11055
  if (t > r) return Ae.Expired;
11056
11056
  }
11057
11057
  return e.initiate_tx_hash ? Number(e.initiate_block_number) ? Ae.Initiated : Ae.InitiateDetected : Ae.Idle;
11058
- }, a5 = (e, t, r) => {
11058
+ }, u5 = (e, t, r) => {
11059
11059
  const n = X0(
11060
11060
  e,
11061
11061
  t,
@@ -11078,7 +11078,7 @@ const X0 = (e, t, r) => {
11078
11078
  }, no = (e, t = 0) => {
11079
11079
  const r = Date.now(), n = e * 1e3 + t * 36e5;
11080
11080
  return r >= n;
11081
- }, c5 = (e) => e.filter((t) => !TE(t)), TE = (e) => {
11081
+ }, f5 = (e) => e.filter((t) => !TE(t)), TE = (e) => {
11082
11082
  const { source_swap: t, create_order: r } = e, { initiate_tx_hash: n, initiate_block_number: i } = t, { deadline: s } = r.additional_data;
11083
11083
  return n && Number(i) ? !1 : n && !Number(i) ? no(Number(s), 12) : n ? !1 : no(Number(s), 1);
11084
11084
  }, IE = Buffer.from(
@@ -11094,13 +11094,13 @@ const X0 = (e, t, r) => {
11094
11094
  failedToCreateInternalPubkey: "failed to create internal pubkey"
11095
11095
  };
11096
11096
  function CE() {
11097
- const e = sm.sha256(Buffer.from("GardenHTLC", "utf-8")), t = bt.pointMultiply(
11097
+ const e = sm.sha256(Buffer.from("GardenHTLC", "utf-8")), t = wt.pointMultiply(
11098
11098
  Buffer.concat([Buffer.from("04", "hex"), BE]),
11099
11099
  e
11100
11100
  );
11101
11101
  if (!t)
11102
11102
  throw new Error($d.failedToCreateInternalPubkey);
11103
- const r = bt.pointAdd(OE, t);
11103
+ const r = wt.pointAdd(OE, t);
11104
11104
  if (!r) throw new Error($d.failedToCreateInternalPubkey);
11105
11105
  return du(Buffer.from(r));
11106
11106
  }
@@ -11128,11 +11128,11 @@ var xe = {}, ze = {}, mn = {}, Fo = {};
11128
11128
  Fo.byteLength = FE;
11129
11129
  Fo.toByteArray = UE;
11130
11130
  Fo.fromByteArray = ME;
11131
- var Vt = [], yt = [], RE = typeof Uint8Array < "u" ? Uint8Array : Array, ga = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
11131
+ var Vt = [], mt = [], RE = typeof Uint8Array < "u" ? Uint8Array : Array, ga = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
11132
11132
  for (var xn = 0, NE = ga.length; xn < NE; ++xn)
11133
- Vt[xn] = ga[xn], yt[ga.charCodeAt(xn)] = xn;
11134
- yt[45] = 62;
11135
- yt[95] = 63;
11133
+ Vt[xn] = ga[xn], mt[ga.charCodeAt(xn)] = xn;
11134
+ mt[45] = 62;
11135
+ mt[95] = 63;
11136
11136
  function ey(e) {
11137
11137
  var t = e.length;
11138
11138
  if (t % 4 > 0)
@@ -11152,8 +11152,8 @@ function $E(e, t, r) {
11152
11152
  function UE(e) {
11153
11153
  var t, r = ey(e), n = r[0], i = r[1], s = new RE($E(e, n, i)), o = 0, a = i > 0 ? n - 4 : n, c;
11154
11154
  for (c = 0; c < a; c += 4)
11155
- t = yt[e.charCodeAt(c)] << 18 | yt[e.charCodeAt(c + 1)] << 12 | yt[e.charCodeAt(c + 2)] << 6 | yt[e.charCodeAt(c + 3)], s[o++] = t >> 16 & 255, s[o++] = t >> 8 & 255, s[o++] = t & 255;
11156
- return i === 2 && (t = yt[e.charCodeAt(c)] << 2 | yt[e.charCodeAt(c + 1)] >> 4, s[o++] = t & 255), i === 1 && (t = yt[e.charCodeAt(c)] << 10 | yt[e.charCodeAt(c + 1)] << 4 | yt[e.charCodeAt(c + 2)] >> 2, s[o++] = t >> 8 & 255, s[o++] = t & 255), s;
11155
+ t = mt[e.charCodeAt(c)] << 18 | mt[e.charCodeAt(c + 1)] << 12 | mt[e.charCodeAt(c + 2)] << 6 | mt[e.charCodeAt(c + 3)], s[o++] = t >> 16 & 255, s[o++] = t >> 8 & 255, s[o++] = t & 255;
11156
+ return i === 2 && (t = mt[e.charCodeAt(c)] << 2 | mt[e.charCodeAt(c + 1)] >> 4, s[o++] = t & 255), i === 1 && (t = mt[e.charCodeAt(c)] << 10 | mt[e.charCodeAt(c + 1)] << 4 | mt[e.charCodeAt(c + 2)] >> 2, s[o++] = t >> 8 & 255, s[o++] = t & 255), s;
11157
11157
  }
11158
11158
  function HE(e) {
11159
11159
  return Vt[e >> 18 & 63] + Vt[e >> 12 & 63] + Vt[e >> 6 & 63] + Vt[e & 63];
@@ -12036,9 +12036,9 @@ lf.write = function(e, t, r, n, i, s) {
12036
12036
  m
12037
12037
  );
12038
12038
  }
12039
- const st = /[^+/0-9A-Za-z-_]/g;
12039
+ const ot = /[^+/0-9A-Za-z-_]/g;
12040
12040
  function Ce(m) {
12041
- if (m = m.split("=")[0], m = m.trim().replace(st, ""), m.length < 2) return "";
12041
+ if (m = m.split("=")[0], m = m.trim().replace(ot, ""), m.length < 2) return "";
12042
12042
  for (; m.length % 4 !== 0; )
12043
12043
  m = m + "=";
12044
12044
  return m;
@@ -13994,7 +13994,7 @@ var jr = {}, Dd;
13994
13994
  function g6() {
13995
13995
  if (Dd) return jr;
13996
13996
  Dd = 1, Object.defineProperty(jr, "__esModule", { value: !0 }), jr.encode = jr.decode = void 0;
13997
- const e = lr, t = ft(), r = ze, { typeforce: n } = r, i = Buffer.alloc(1, 0);
13997
+ const e = lr, t = dt(), r = ze, { typeforce: n } = r, i = Buffer.alloc(1, 0);
13998
13998
  function s(f) {
13999
13999
  let u = 0;
14000
14000
  for (; f[u] === 0; ) ++u;
@@ -14030,7 +14030,7 @@ function g6() {
14030
14030
  return jr.encode = c, jr;
14031
14031
  }
14032
14032
  var jd;
14033
- function ft() {
14033
+ function dt() {
14034
14034
  return jd || (jd = 1, function(e) {
14035
14035
  Object.defineProperty(e, "__esModule", { value: !0 }), e.signature = e.number = e.isCanonicalScriptSignature = e.isDefinedHashType = e.isCanonicalPubKey = e.toStack = e.fromASM = e.toASM = e.decompile = e.compile = e.countNonPushOnlyOPs = e.isPushOnly = e.OPS = void 0;
14036
14036
  const t = lr, r = fn;
@@ -14150,7 +14150,7 @@ function ft() {
14150
14150
  }
14151
14151
  Object.defineProperty(hs, "__esModule", { value: !0 });
14152
14152
  hs.Transaction = void 0;
14153
- const Be = He, Ve = Lr, zd = ft(), b6 = ft(), ue = ze, { typeforce: Ht } = ue;
14153
+ const Be = He, Ve = Lr, zd = dt(), b6 = dt(), ue = ze, { typeforce: Ht } = ue;
14154
14154
  function jt(e) {
14155
14155
  const t = e.length;
14156
14156
  return Be.varuint.encodingLength(t) + t;
@@ -14543,9 +14543,9 @@ je.testnet = {
14543
14543
  scriptHash: 196,
14544
14544
  wif: 239
14545
14545
  };
14546
- var at = {};
14547
- Object.defineProperty(at, "__esModule", { value: !0 });
14548
- at.value = at.prop = void 0;
14546
+ var ct = {};
14547
+ Object.defineProperty(ct, "__esModule", { value: !0 });
14548
+ ct.value = ct.prop = void 0;
14549
14549
  function _6(e, t, r) {
14550
14550
  Object.defineProperty(e, t, {
14551
14551
  configurable: !0,
@@ -14564,15 +14564,15 @@ function _6(e, t, r) {
14564
14564
  }
14565
14565
  });
14566
14566
  }
14567
- at.prop = _6;
14567
+ ct.prop = _6;
14568
14568
  function S6(e) {
14569
14569
  let t;
14570
14570
  return () => (t !== void 0 || (t = e()), t);
14571
14571
  }
14572
- at.value = S6;
14572
+ ct.value = S6;
14573
14573
  Object.defineProperty(Uo, "__esModule", { value: !0 });
14574
14574
  Uo.p2data = void 0;
14575
- const P6 = je, Gs = ft(), Lt = ze, Gd = at, Vd = Gs.OPS;
14575
+ const P6 = je, Gs = dt(), Lt = ze, Gd = ct, Vd = Gs.OPS;
14576
14576
  function T6(e, t) {
14577
14577
  if (!e.data && !e.output) throw new TypeError("Not enough data");
14578
14578
  t = Object.assign({ validate: !0 }, t || {}), (0, Lt.typeforce)(
@@ -14606,7 +14606,7 @@ Uo.p2data = T6;
14606
14606
  var Ho = {};
14607
14607
  Object.defineProperty(Ho, "__esModule", { value: !0 });
14608
14608
  Ho.p2ms = void 0;
14609
- const I6 = je, Pn = ft(), Te = ze, _r = at, Tn = Pn.OPS, Os = Tn.OP_RESERVED;
14609
+ const I6 = je, Pn = dt(), Te = ze, _r = ct, Tn = Pn.OPS, Os = Tn.OP_RESERVED;
14610
14610
  function k6(e, t) {
14611
14611
  if (!e.input && !e.output && !(e.pubkeys && e.m !== void 0) && !e.signatures)
14612
14612
  throw new TypeError("Not enough data");
@@ -14710,7 +14710,7 @@ Ho.p2ms = k6;
14710
14710
  var Lo = {};
14711
14711
  Object.defineProperty(Lo, "__esModule", { value: !0 });
14712
14712
  Lo.p2pk = void 0;
14713
- const B6 = je, In = ft(), Pt = ze, _n = at, Wd = In.OPS;
14713
+ const B6 = je, In = dt(), Pt = ze, _n = ct, Wd = In.OPS;
14714
14714
  function O6(e, t) {
14715
14715
  if (!e.input && !e.output && !e.pubkey && !e.input && !e.signature)
14716
14716
  throw new TypeError("Not enough data");
@@ -14865,7 +14865,7 @@ function L6(e) {
14865
14865
  var wf = H6(L6);
14866
14866
  Object.defineProperty(Mo, "__esModule", { value: !0 });
14867
14867
  Mo.p2pkh = void 0;
14868
- const Sa = Lr, M6 = je, kn = ft(), We = ze, ir = at, Yd = wf, Sr = kn.OPS;
14868
+ const Sa = Lr, M6 = je, kn = dt(), We = ze, ir = ct, Yd = wf, Sr = kn.OPS;
14869
14869
  function D6(e, t) {
14870
14870
  if (!e.address && !e.hash && !e.output && !e.pubkey && !e.input)
14871
14871
  throw new TypeError("Not enough data");
@@ -14963,7 +14963,7 @@ Mo.p2pkh = D6;
14963
14963
  var Do = {};
14964
14964
  Object.defineProperty(Do, "__esModule", { value: !0 });
14965
14965
  Do.p2sh = void 0;
14966
- const Zd = Lr, j6 = je, zt = ft(), ge = ze, Mt = at, Xd = wf, li = zt.OPS;
14966
+ const Zd = Lr, j6 = je, zt = dt(), ge = ze, Mt = ct, Xd = wf, li = zt.OPS;
14967
14967
  function z6(e, t) {
14968
14968
  if (!e.address && !e.hash && !e.output && !e.redeem && !e.input)
14969
14969
  throw new TypeError("Not enough data");
@@ -15239,7 +15239,7 @@ mr.bech32 = Sy("bech32");
15239
15239
  mr.bech32m = Sy("bech32m");
15240
15240
  Object.defineProperty(jo, "__esModule", { value: !0 });
15241
15241
  jo.p2wpkh = void 0;
15242
- const Pa = Lr, W6 = je, Vs = ft(), Re = ze, Pr = at, Cs = mr, Qd = Vs.OPS, K6 = Buffer.alloc(0);
15242
+ const Pa = Lr, W6 = je, Vs = dt(), Re = ze, Pr = ct, Cs = mr, Qd = Vs.OPS, K6 = Buffer.alloc(0);
15243
15243
  function Y6(e, t) {
15244
15244
  if (!e.address && !e.hash && !e.output && !e.pubkey && !e.witness)
15245
15245
  throw new TypeError("Not enough data");
@@ -15341,7 +15341,7 @@ jo.p2wpkh = Y6;
15341
15341
  var zo = {};
15342
15342
  Object.defineProperty(zo, "__esModule", { value: !0 });
15343
15343
  zo.p2wsh = void 0;
15344
- const el = Lr, Z6 = je, ar = ft(), me = ze, sr = at, Rs = mr, tl = ar.OPS, Ta = Buffer.alloc(0);
15344
+ const el = Lr, Z6 = je, ar = dt(), me = ze, sr = ct, Rs = mr, tl = ar.OPS, Ta = Buffer.alloc(0);
15345
15345
  function Ns(e) {
15346
15346
  return !!(Buffer.isBuffer(e) && e.length === 65 && e[0] === 4 && (0, me.isPoint)(e));
15347
15347
  }
@@ -15497,36 +15497,36 @@ function Q6() {
15497
15497
  dn.getEccLib = Q6;
15498
15498
  const or = (e) => Buffer.from(e, "hex");
15499
15499
  function eA(e) {
15500
- pt(typeof e.isXOnlyPoint == "function"), pt(
15500
+ ht(typeof e.isXOnlyPoint == "function"), ht(
15501
15501
  e.isXOnlyPoint(
15502
15502
  or("79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798")
15503
15503
  )
15504
- ), pt(
15504
+ ), ht(
15505
15505
  e.isXOnlyPoint(
15506
15506
  or("fffffffffffffffffffffffffffffffffffffffffffffffffffffffeeffffc2e")
15507
15507
  )
15508
- ), pt(
15508
+ ), ht(
15509
15509
  e.isXOnlyPoint(
15510
15510
  or("f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9")
15511
15511
  )
15512
- ), pt(
15512
+ ), ht(
15513
15513
  e.isXOnlyPoint(
15514
15514
  or("0000000000000000000000000000000000000000000000000000000000000001")
15515
15515
  )
15516
- ), pt(
15516
+ ), ht(
15517
15517
  !e.isXOnlyPoint(
15518
15518
  or("0000000000000000000000000000000000000000000000000000000000000000")
15519
15519
  )
15520
- ), pt(
15520
+ ), ht(
15521
15521
  !e.isXOnlyPoint(
15522
15522
  or("fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f")
15523
15523
  )
15524
- ), pt(typeof e.xOnlyPointAddTweak == "function"), tA.forEach((t) => {
15524
+ ), ht(typeof e.xOnlyPointAddTweak == "function"), tA.forEach((t) => {
15525
15525
  const r = e.xOnlyPointAddTweak(or(t.pubkey), or(t.tweak));
15526
- t.result === null ? pt(r === null) : (pt(r !== null), pt(r.parity === t.parity), pt(Buffer.from(r.xOnlyPubkey).equals(or(t.result))));
15526
+ t.result === null ? ht(r === null) : (ht(r !== null), ht(r.parity === t.parity), ht(Buffer.from(r.xOnlyPubkey).equals(or(t.result))));
15527
15527
  });
15528
15528
  }
15529
- function pt(e) {
15529
+ function ht(e) {
15530
15530
  if (!e) throw new Error("ecc library invalid");
15531
15531
  }
15532
15532
  const tA = [
@@ -15631,7 +15631,7 @@ var Ke = {}, rl;
15631
15631
  function rA() {
15632
15632
  if (rl) return Ke;
15633
15633
  rl = 1, Object.defineProperty(Ke, "__esModule", { value: !0 }), Ke.toOutputScript = Ke.fromOutputScript = Ke.toBech32 = Ke.toBase58Check = Ke.fromBech32 = Ke.fromBase58Check = void 0;
15634
- const e = je, t = Af(), r = ft(), n = ze, i = mr, s = wf, o = 40, a = 2, c = 16, f = 2, u = 80, d = "WARNING: Sending to a future segwit version address can lead to loss of funds. End users MUST be warned carefully in the GUI and asked if they wish to proceed with caution. Wallets should verify the segwit version from the output of fromBech32, then decide when it is safe to use which version of segwit.";
15634
+ const e = je, t = Af(), r = dt(), n = ze, i = mr, s = wf, o = 40, a = 2, c = 16, f = 2, u = 80, d = "WARNING: Sending to a future segwit version address can lead to loss of funds. End users MUST be warned carefully in the GUI and asked if they wish to proceed with caution. Wallets should verify the segwit version from the output of fromBech32, then decide when it is safe to use which version of segwit.";
15635
15635
  function y(w, x) {
15636
15636
  const P = w.slice(2);
15637
15637
  if (P.length < a || P.length > o)
@@ -15754,7 +15754,7 @@ var nl;
15754
15754
  function nA() {
15755
15755
  if (nl) return pi;
15756
15756
  nl = 1, Object.defineProperty(pi, "__esModule", { value: !0 }), pi.p2tr = void 0;
15757
- const e = mn, t = je, r = ft(), n = ze, i = dn, s = Ef, o = at, a = mr, c = rA(), f = r.OPS, u = 1, d = 80;
15757
+ const e = mn, t = je, r = dt(), n = ze, i = dn, s = Ef, o = ct, a = mr, c = rA(), f = r.OPS, u = 1, d = 80;
15758
15758
  function y(p, g) {
15759
15759
  if (!p.address && !p.output && !p.pubkey && !p.internalPubkey && !(p.witness && p.witness.length > 1))
15760
15760
  throw new TypeError("Not enough data");
@@ -16019,7 +16019,7 @@ function Af() {
16019
16019
  }
16020
16020
  Object.defineProperty(ye, "__esModule", { value: !0 });
16021
16021
  ye.signatureBlocksAction = ye.checkInputForSig = ye.pubkeyInScript = ye.pubkeyPositionInScript = ye.witnessStackToScriptWitness = ye.isP2TR = ye.isP2SHScript = ye.isP2WSHScript = ye.isP2WPKH = ye.isP2PKH = ye.isP2PK = ye.isP2MS = void 0;
16022
- const sl = ys, Bi = ft(), Fs = hs, iA = Lr, gn = Af();
16022
+ const sl = ys, Bi = dt(), Fs = hs, iA = Lr, gn = Af();
16023
16023
  function bn(e) {
16024
16024
  return (t) => {
16025
16025
  try {
@@ -16330,7 +16330,7 @@ const Ye = {
16330
16330
  controlBlockGenerationFailed: "failed to generate control block",
16331
16331
  invalidLeaf: "invalid leaf"
16332
16332
  }, $s = 192;
16333
- le.initEccLib(bt);
16333
+ le.initEccLib(wt);
16334
16334
  class Oi {
16335
16335
  /**
16336
16336
  * Note: redeemerAddress and initiatorAddress should be x-only public key without 02 or 03 prefix
@@ -16543,7 +16543,7 @@ class Oi {
16543
16543
  o,
16544
16544
  a
16545
16545
  );
16546
- if (!bt.verifySchnorr(
16546
+ if (!wt.verifySchnorr(
16547
16547
  y,
16548
16548
  Buffer.from(this.redeemerPubkey, "hex"),
16549
16549
  Buffer.from(t[d].sig, "hex")
@@ -16839,7 +16839,7 @@ class FA {
16839
16839
  }
16840
16840
  class $A {
16841
16841
  constructor(t, r) {
16842
- this.url = new mt(t).endpoint("blocknumbers").endpoint(r);
16842
+ this.url = new gt(t).endpoint("blocknumbers").endpoint(r);
16843
16843
  }
16844
16844
  async fetchBlockNumbers() {
16845
16845
  try {
@@ -16852,7 +16852,7 @@ class $A {
16852
16852
  }
16853
16853
  class UA {
16854
16854
  constructor(t) {
16855
- this.quoteUrl = new mt(t);
16855
+ this.quoteUrl = new gt(t);
16856
16856
  }
16857
16857
  async getQuoteFromAssets({
16858
16858
  fromAsset: t,
@@ -16994,7 +16994,7 @@ class oo extends dp {
16994
16994
  async generateSecret(t) {
16995
16995
  const r = await this.signMessage(t);
16996
16996
  if (!r.ok) return H(r.error);
16997
- const n = bi(ot(r.val)), i = bi(n);
16997
+ const n = bi(at(r.val)), i = bi(n);
16998
16998
  return ie({ secret: n, secretHash: i });
16999
16999
  }
17000
17000
  async signMessage(t) {
@@ -17003,7 +17003,7 @@ class oo extends dp {
17003
17003
  if (!f.ok) return H(f.error);
17004
17004
  this.digestKey = f.val;
17005
17005
  }
17006
- const r = Ds(bt), n = "Garden.fi" + t.toString(), i = Buffer.from(n, "utf8"), s = bi(i), o = Buffer.from(Wt(this.digestKey), "hex");
17006
+ const r = Ds(wt), n = "Garden.fi" + t.toString(), i = Buffer.from(n, "utf8"), s = bi(i), o = Buffer.from(Wt(this.digestKey), "hex");
17007
17007
  if (o.length !== 32)
17008
17008
  return H("Invalid private key length. Expected 32 bytes.");
17009
17009
  const c = r.fromPrivateKey(o).sign(Buffer.from(Wt(s), "hex"));
@@ -17483,7 +17483,7 @@ const Kn = {
17483
17483
  contracts: HA,
17484
17484
  formatters: LA,
17485
17485
  serializers: DA
17486
- }, GA = /* @__PURE__ */ St({
17486
+ }, GA = /* @__PURE__ */ st({
17487
17487
  id: 42161,
17488
17488
  name: "Arbitrum One",
17489
17489
  nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
@@ -17505,7 +17505,7 @@ const Kn = {
17505
17505
  blockCreated: 7654707
17506
17506
  }
17507
17507
  }
17508
- }), VA = /* @__PURE__ */ St({
17508
+ }), VA = /* @__PURE__ */ st({
17509
17509
  id: 421614,
17510
17510
  name: "Arbitrum Sepolia",
17511
17511
  nativeCurrency: {
@@ -17532,7 +17532,7 @@ const Kn = {
17532
17532
  }
17533
17533
  },
17534
17534
  testnet: !0
17535
- }), yi = 1, WA = /* @__PURE__ */ St({
17535
+ }), yi = 1, WA = /* @__PURE__ */ st({
17536
17536
  ...Kn,
17537
17537
  id: 8453,
17538
17538
  name: "Base",
@@ -17579,7 +17579,7 @@ const Kn = {
17579
17579
  }
17580
17580
  },
17581
17581
  sourceId: yi
17582
- }), mi = 11155111, KA = /* @__PURE__ */ St({
17582
+ }), mi = 11155111, KA = /* @__PURE__ */ st({
17583
17583
  ...Kn,
17584
17584
  id: 84532,
17585
17585
  network: "base-sepolia",
@@ -17628,7 +17628,7 @@ const Kn = {
17628
17628
  },
17629
17629
  testnet: !0,
17630
17630
  sourceId: mi
17631
- }), YA = /* @__PURE__ */ St({
17631
+ }), YA = /* @__PURE__ */ st({
17632
17632
  id: 80094,
17633
17633
  name: "Berachain",
17634
17634
  nativeCurrency: {
@@ -17661,7 +17661,7 @@ const Kn = {
17661
17661
  },
17662
17662
  ensTlds: [".bera"],
17663
17663
  testnet: !1
17664
- }), ZA = /* @__PURE__ */ St({
17664
+ }), ZA = /* @__PURE__ */ st({
17665
17665
  id: 80084,
17666
17666
  name: "Berachain bArtio",
17667
17667
  nativeCurrency: {
@@ -17694,7 +17694,56 @@ const Kn = {
17694
17694
  }
17695
17695
  },
17696
17696
  testnet: !0
17697
- }), XA = /* @__PURE__ */ St({
17697
+ }), XA = /* @__PURE__ */ st({
17698
+ id: 56,
17699
+ name: "BNB Smart Chain",
17700
+ nativeCurrency: {
17701
+ decimals: 18,
17702
+ name: "BNB",
17703
+ symbol: "BNB"
17704
+ },
17705
+ rpcUrls: {
17706
+ default: { http: ["https://56.rpc.thirdweb.com"] }
17707
+ },
17708
+ blockExplorers: {
17709
+ default: {
17710
+ name: "BscScan",
17711
+ url: "https://bscscan.com",
17712
+ apiUrl: "https://api.bscscan.com/api"
17713
+ }
17714
+ },
17715
+ contracts: {
17716
+ multicall3: {
17717
+ address: "0xca11bde05977b3631167028862be2a173976ca11",
17718
+ blockCreated: 15921452
17719
+ }
17720
+ }
17721
+ }), JA = /* @__PURE__ */ st({
17722
+ id: 97,
17723
+ name: "BNB Smart Chain Testnet",
17724
+ nativeCurrency: {
17725
+ decimals: 18,
17726
+ name: "BNB",
17727
+ symbol: "tBNB"
17728
+ },
17729
+ rpcUrls: {
17730
+ default: { http: ["https://data-seed-prebsc-1-s1.bnbchain.org:8545"] }
17731
+ },
17732
+ blockExplorers: {
17733
+ default: {
17734
+ name: "BscScan",
17735
+ url: "https://testnet.bscscan.com",
17736
+ apiUrl: "https://api-testnet.bscscan.com/api"
17737
+ }
17738
+ },
17739
+ contracts: {
17740
+ multicall3: {
17741
+ address: "0xca11bde05977b3631167028862be2a173976ca11",
17742
+ blockCreated: 17422483
17743
+ }
17744
+ },
17745
+ testnet: !0
17746
+ }), QA = /* @__PURE__ */ st({
17698
17747
  id: 5115,
17699
17748
  name: "Citrea Testnet",
17700
17749
  nativeCurrency: { name: "cBTC", symbol: "cBTC", decimals: 18 },
@@ -17711,7 +17760,7 @@ const Kn = {
17711
17760
  }
17712
17761
  },
17713
17762
  testnet: !0
17714
- }), JA = 1, QA = /* @__PURE__ */ St({
17763
+ }), ex = 1, tx = /* @__PURE__ */ st({
17715
17764
  id: 21e6,
17716
17765
  name: "Corn",
17717
17766
  nativeCurrency: {
@@ -17735,8 +17784,8 @@ const Kn = {
17735
17784
  blockCreated: 3228
17736
17785
  }
17737
17786
  },
17738
- sourceId: JA
17739
- }), ex = /* @__PURE__ */ St({
17787
+ sourceId: ex
17788
+ }), rx = /* @__PURE__ */ st({
17740
17789
  id: 1,
17741
17790
  name: "Ethereum",
17742
17791
  nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
@@ -17765,7 +17814,7 @@ const Kn = {
17765
17814
  blockCreated: 14353601
17766
17815
  }
17767
17816
  }
17768
- }), tx = /* @__PURE__ */ St({
17817
+ }), nx = /* @__PURE__ */ st({
17769
17818
  id: 10143,
17770
17819
  name: "Monad Testnet",
17771
17820
  nativeCurrency: {
@@ -17791,7 +17840,7 @@ const Kn = {
17791
17840
  }
17792
17841
  },
17793
17842
  testnet: !0
17794
- }), rx = /* @__PURE__ */ St({
17843
+ }), ix = /* @__PURE__ */ st({
17795
17844
  id: 11155111,
17796
17845
  name: "Sepolia",
17797
17846
  nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
@@ -17819,7 +17868,7 @@ const Kn = {
17819
17868
  }
17820
17869
  },
17821
17870
  testnet: !0
17822
- }), Us = 1, nx = /* @__PURE__ */ St({
17871
+ }), Us = 1, sx = /* @__PURE__ */ st({
17823
17872
  ...Kn,
17824
17873
  id: 130,
17825
17874
  name: "Unichain",
@@ -17859,14 +17908,14 @@ const Kn = {
17859
17908
  }
17860
17909
  },
17861
17910
  sourceId: Us
17862
- }), ix = {
17863
- ...rx,
17911
+ }), ox = {
17912
+ ...ix,
17864
17913
  rpcUrls: {
17865
17914
  default: {
17866
17915
  http: ["https://ethereum-sepolia-rpc.publicnode.com"]
17867
17916
  }
17868
17917
  }
17869
- }, sx = {
17918
+ }, ax = {
17870
17919
  id: 3637,
17871
17920
  name: "Botanix",
17872
17921
  nativeCurrency: {
@@ -17885,7 +17934,7 @@ const Kn = {
17885
17934
  http: ["https://rpc.botanixlabs.com/"]
17886
17935
  }
17887
17936
  }
17888
- }, ox = {
17937
+ }, cx = {
17889
17938
  id: 998,
17890
17939
  name: "Hyperliquid EVM Testnet",
17891
17940
  nativeCurrency: {
@@ -17904,7 +17953,7 @@ const Kn = {
17904
17953
  http: ["https://rpc.hyperliquid-testnet.xyz/evm"]
17905
17954
  }
17906
17955
  }
17907
- }, ax = {
17956
+ }, ux = {
17908
17957
  id: 999,
17909
17958
  name: "HyperEVM",
17910
17959
  nativeCurrency: {
@@ -17924,24 +17973,26 @@ const Kn = {
17924
17973
  }
17925
17974
  }
17926
17975
  }, ky = {
17927
- ethereum: ex,
17976
+ ethereum: rx,
17928
17977
  arbitrum: GA,
17929
- ethereum_sepolia: ix,
17978
+ ethereum_sepolia: ox,
17930
17979
  arbitrum_sepolia: VA,
17931
17980
  ethereum_localnet: Zy,
17932
17981
  arbitrum_localnet: Yy,
17933
17982
  base_sepolia: KA,
17934
17983
  base: WA,
17935
17984
  bera_testnet: ZA,
17936
- citrea_testnet: XA,
17985
+ citrea_testnet: QA,
17937
17986
  bera: YA,
17938
- monad_testnet: tx,
17939
- hyperliquid_testnet: ox,
17940
- hyperliquid: ax,
17941
- unichain: nx,
17942
- corn: QA,
17943
- botanix: sx
17944
- }, cx = async (e, t) => {
17987
+ monad_testnet: nx,
17988
+ hyperliquid_testnet: cx,
17989
+ hyperliquid: ux,
17990
+ unichain: sx,
17991
+ corn: tx,
17992
+ botanix: ax,
17993
+ bnbchain: XA,
17994
+ bnbchain_testnet: JA
17995
+ }, fx = async (e, t) => {
17945
17996
  var i, s, o;
17946
17997
  const r = ky[e], n = await t.getChainId();
17947
17998
  if (r)
@@ -17959,7 +18010,7 @@ const Kn = {
17959
18010
  walletClient: a
17960
18011
  });
17961
18012
  } catch (a) {
17962
- if (ux(a))
18013
+ if (dx(a))
17963
18014
  if (a.code === 4902)
17964
18015
  try {
17965
18016
  await t.addChain({ chain: r });
@@ -17992,7 +18043,7 @@ const Kn = {
17992
18043
  }
17993
18044
  else
17994
18045
  return H("Chain not supported");
17995
- }, ux = (e) => typeof e == "object" && e != null && ("code" in e || "message" in e || "body" in e), fx = [
18046
+ }, dx = (e) => typeof e == "object" && e != null && ("code" in e || "message" in e || "body" in e), lx = [
17996
18047
  {
17997
18048
  inputs: [
17998
18049
  {
@@ -18389,9 +18440,9 @@ const Kn = {
18389
18440
  type: "function"
18390
18441
  }
18391
18442
  ];
18392
- class dx {
18443
+ class px {
18393
18444
  constructor(t, r, n) {
18394
- this.url = new mt("/relayer", t), this.auth = n, this.wallet = r;
18445
+ this.url = new gt("/relayer", t), this.auth = n, this.wallet = r;
18395
18446
  }
18396
18447
  get htlcActorAddress() {
18397
18448
  if (!this.wallet.account) throw new Error("No account found");
@@ -18403,7 +18454,7 @@ class dx {
18403
18454
  return H("Account address and order initiator mismatch");
18404
18455
  if (!Xy(t.source_swap.chain))
18405
18456
  return H("Source chain is not an EVM chain");
18406
- const r = await cx(
18457
+ const r = await fx(
18407
18458
  t.source_swap.chain,
18408
18459
  this.wallet
18409
18460
  );
@@ -18412,7 +18463,7 @@ class dx {
18412
18463
  const { create_order: n, source_swap: i } = t;
18413
18464
  if (!i.amount || !i.redeemer || !n.timelock || !n.secret_hash)
18414
18465
  return H("Invalid order");
18415
- const s = ot(n.secret_hash), o = BigInt(n.timelock), a = ot(i.redeemer), c = BigInt(i.amount), f = await this.getTokenAddress(t.source_swap.asset);
18466
+ const s = at(n.secret_hash), o = BigInt(n.timelock), a = at(i.redeemer), c = BigInt(i.amount), f = await this.getTokenAddress(t.source_swap.asset);
18416
18467
  return f.ok ? Jy(t.source_swap.chain, f.val) ? this._initiateOnNativeHTLC(
18417
18468
  s,
18418
18469
  o,
@@ -18432,7 +18483,7 @@ class dx {
18432
18483
  async getTokenAddress(t) {
18433
18484
  try {
18434
18485
  const n = await aa({
18435
- address: ot(t),
18486
+ address: at(t),
18436
18487
  abi: ol,
18437
18488
  client: this.wallet
18438
18489
  }).read.token();
@@ -18445,8 +18496,8 @@ class dx {
18445
18496
  if (!this.wallet.account) return H("No account found");
18446
18497
  try {
18447
18498
  const a = await aa({
18448
- address: ot(s),
18449
- abi: fx,
18499
+ address: at(s),
18500
+ abi: lx,
18450
18501
  client: this.wallet
18451
18502
  }).write.initiate(
18452
18503
  [i, r, n, t],
@@ -18467,7 +18518,7 @@ class dx {
18467
18518
  const c = await this.auth.getAuthHeaders();
18468
18519
  if (!c.ok) return H(c.error);
18469
18520
  const f = aa({
18470
- address: ot(s),
18521
+ address: at(s),
18471
18522
  abi: ol,
18472
18523
  client: this.wallet
18473
18524
  }), u = await rm(
@@ -19681,7 +19732,7 @@ const By = [
19681
19732
  }
19682
19733
  ]
19683
19734
  }
19684
- ], lx = async (e, t, r, n, i) => {
19735
+ ], hx = async (e, t, r, n, i) => {
19685
19736
  try {
19686
19737
  const s = await Ys(
19687
19738
  e.address,
@@ -19694,9 +19745,9 @@ const By = [
19694
19745
  return ie("Allowance already approved");
19695
19746
  const a = _i.uint256(BigInt(n)), c = await e.execute([
19696
19747
  {
19697
- contractAddress: ot(t),
19748
+ contractAddress: at(t),
19698
19749
  entrypoint: "approve",
19699
- calldata: [ot(r), a.low, a.high]
19750
+ calldata: [at(r), a.low, a.high]
19700
19751
  }
19701
19752
  ]);
19702
19753
  await i.waitForTransaction(
@@ -19742,11 +19793,11 @@ const By = [
19742
19793
  try {
19743
19794
  const s = await new wu(
19744
19795
  By,
19745
- ot(t),
19796
+ at(t),
19746
19797
  n
19747
19798
  ).call("allowance", [
19748
- ot(e),
19749
- ot(r)
19799
+ at(e),
19800
+ at(r)
19750
19801
  ]);
19751
19802
  return ie(BigInt((s == null ? void 0 : s.toString()) || "0"));
19752
19803
  } catch (i) {
@@ -19754,7 +19805,7 @@ const By = [
19754
19805
  `Failed to check allowance: ${i instanceof Error ? i.message : String(i)}`
19755
19806
  );
19756
19807
  }
19757
- }, px = async (e, t, r, n, i) => {
19808
+ }, yx = async (e, t, r, n, i) => {
19758
19809
  const s = await Ys(
19759
19810
  e,
19760
19811
  t,
@@ -20015,7 +20066,7 @@ const By = [
20015
20066
  }
20016
20067
  ]
20017
20068
  }
20018
- ], hx = {
20069
+ ], mx = {
20019
20070
  StarknetDomain: [
20020
20071
  { name: "name", type: "shortstring" },
20021
20072
  { name: "version", type: "shortstring" },
@@ -20029,9 +20080,9 @@ const By = [
20029
20080
  { name: "secretHash", type: "u128*" }
20030
20081
  ]
20031
20082
  };
20032
- class yx {
20083
+ class gx {
20033
20084
  constructor(t, r, n, i) {
20034
- this.url = t instanceof mt ? t : new mt(t), this.account = r, this.starknetProvider = new pp({
20085
+ this.url = t instanceof gt ? t : new gt(t), this.account = r, this.starknetProvider = new pp({
20035
20086
  nodeUrl: i || ro[n].nodeUrl
20036
20087
  }), this.chainId = ro[n].chainId;
20037
20088
  }
@@ -20049,7 +20100,7 @@ class yx {
20049
20100
  Oy,
20050
20101
  t.source_swap.asset,
20051
20102
  this.account
20052
- ), a = await (o == null ? void 0 : o.token()), c = hp.toHex(a), f = await px(
20103
+ ), a = await (o == null ? void 0 : o.token()), c = hp.toHex(a), f = await yx(
20053
20104
  this.account.address,
20054
20105
  c,
20055
20106
  n.asset,
@@ -20065,11 +20116,11 @@ class yx {
20065
20116
  const { create_order: n, source_swap: i } = r, { redeemer: s, amount: o } = i, { secret_hash: a, timelock: c } = n, f = i.asset;
20066
20117
  try {
20067
20118
  const u = _i.uint256(BigInt(o)), d = {
20068
- contractAddress: ot(t),
20119
+ contractAddress: at(t),
20069
20120
  entrypoint: "approve",
20070
20121
  calldata: [f, u.low, u.high]
20071
20122
  }, y = _i.uint256(o), p = {
20072
- contractAddress: ot(f),
20123
+ contractAddress: at(f),
20073
20124
  entrypoint: "initiate",
20074
20125
  calldata: [
20075
20126
  s,
@@ -20096,7 +20147,7 @@ class yx {
20096
20147
  revision: cm.ACTIVE
20097
20148
  },
20098
20149
  primaryType: "Initiate",
20099
- types: hx,
20150
+ types: mx,
20100
20151
  message: {
20101
20152
  redeemer: i,
20102
20153
  amount: _i.uint256(s),
@@ -20154,13 +20205,13 @@ class yx {
20154
20205
  return H("Refund is taken care of by the relayer");
20155
20206
  }
20156
20207
  }
20157
- const mx = (e) => e.map((t) => t), gx = (e) => {
20158
- if (e === vt.Testnet)
20159
- return bx;
20160
- if (e === vt.Mainnet)
20161
- return wx;
20208
+ const bx = (e) => e.map((t) => t), wx = (e) => {
20209
+ if (e === Et.Testnet)
20210
+ return vx;
20211
+ if (e === Et.Mainnet)
20212
+ return Ex;
20162
20213
  throw new Error("Invalid network");
20163
- }, bx = ["https://mempool.space/testnet4/api"], wx = [
20214
+ }, vx = ["https://mempool.space/testnet4/api"], Ex = [
20164
20215
  "https://mempool.space/api",
20165
20216
  "https://blockstream.info/api"
20166
20217
  ], zr = {
@@ -20178,9 +20229,9 @@ const mx = (e) => e.map((t) => t), gx = (e) => {
20178
20229
  INVALID_PUBKEY: "invalid public key",
20179
20230
  ORDER_NOT_EXPIRED: "you cannot refund before your transaction expires"
20180
20231
  }, al = (e) => e.sort((t, r) => t.status.confirmed != r.status.confirmed ? t.status.confirmed ? -1 : 1 : r.value - t.value);
20181
- class vx {
20232
+ class Ax {
20182
20233
  constructor(t, r) {
20183
- this.cacheTimeout = 2e3, this.utxosCache = /* @__PURE__ */ new Map(), this.APIs = r ? mx([r]) : gx(t), this.network = t;
20234
+ this.cacheTimeout = 2e3, this.utxosCache = /* @__PURE__ */ new Map(), this.APIs = r ? bx([r]) : wx(t), this.network = t;
20184
20235
  }
20185
20236
  /**
20186
20237
  * Gets the output index of the UTXO
@@ -20306,7 +20357,7 @@ class vx {
20306
20357
  * @returns {Promise<FeeRates>}
20307
20358
  */
20308
20359
  async getFeeRates() {
20309
- if (this.network === vt.Regtest)
20360
+ if (this.network === Et.Regtest)
20310
20361
  return {
20311
20362
  fastestFee: 8,
20312
20363
  halfHourFee: 7,
@@ -20315,7 +20366,7 @@ class vx {
20315
20366
  minimumFee: 2
20316
20367
  };
20317
20368
  let t = "";
20318
- this.network === vt.Testnet && (t = "testnet4/");
20369
+ this.network === Et.Testnet && (t = "testnet4/");
20319
20370
  const r = `https://mempool.space/${t}api/v1/fees/recommended`, n = `https://blockstream.info/${t}api/fee-estimates`, i = await Ie.getWithFallback([r, n], {
20320
20371
  signal: AbortSignal.timeout(5e3)
20321
20372
  });
@@ -20449,7 +20500,7 @@ class en {
20449
20500
  return new en(i, s);
20450
20501
  }
20451
20502
  }
20452
- const Ex = (e, t, r = !1) => {
20503
+ const xx = (e, t, r = !1) => {
20453
20504
  const n = (o) => {
20454
20505
  try {
20455
20506
  o = xi.fromBech32(o).data.toString("hex");
@@ -20496,7 +20547,7 @@ const Ex = (e, t, r = !1) => {
20496
20547
  P2TR: "p2tr"
20497
20548
  };
20498
20549
  var Cy = /* @__PURE__ */ ((e) => (e[e.Bitcoin = 0] = "Bitcoin", e[e.EVM = 1] = "EVM", e))(Cy || {});
20499
- class Ax {
20550
+ class _x {
20500
20551
  addSignatureSegwitV0(t = Zs.ALL) {
20501
20552
  return new en("segwitV0", t);
20502
20553
  }
@@ -20590,11 +20641,11 @@ class Ax {
20590
20641
  async newSwap(t) {
20591
20642
  if (t.secretHash = Wt(t.secretHash), t.secretHash.length !== 64)
20592
20643
  throw new Error(Ai.INVALID_SECRET_HASH);
20593
- const { script: r, address: n } = Ex(
20644
+ const { script: r, address: n } = xx(
20594
20645
  t,
20595
20646
  await this.getNetwork()
20596
20647
  );
20597
- return new xx(this, {
20648
+ return new Sx(this, {
20598
20649
  ...t,
20599
20650
  redeemScript: r,
20600
20651
  scriptAddress: n
@@ -20622,7 +20673,7 @@ class Ax {
20622
20673
  throw new Error("Unsupported script type");
20623
20674
  }
20624
20675
  }
20625
- class xx {
20676
+ class Sx {
20626
20677
  /**
20627
20678
  * @constructor
20628
20679
  * @param {IBitcoinWallet} wallet
@@ -20723,34 +20774,34 @@ class xx {
20723
20774
  }
20724
20775
  }
20725
20776
  }
20726
- const ka = (e, t, r, n) => `m/${e}'/${t === vt.Mainnet ? 0 : 1}'/${r}'/0/${n ?? 0}`, Ry = {
20777
+ const ka = (e, t, r, n) => `m/${e}'/${t === Et.Mainnet ? 0 : 1}'/${r}'/0/${n ?? 0}`, Ry = {
20727
20778
  bip44: (e, t, r) => ka("44", e, r ?? 0, t),
20728
20779
  bip49: (e, t, r) => ka("49", e, r ?? 0, t),
20729
20780
  bip84: (e, t, r) => ka("84", e, r ?? 0, t)
20730
20781
  };
20731
20782
  function Ba(e) {
20732
- if (e === vt.Mainnet)
20783
+ if (e === Et.Mainnet)
20733
20784
  return Zo.bitcoin;
20734
- if (e === vt.Testnet)
20785
+ if (e === Et.Testnet)
20735
20786
  return Zo.testnet;
20736
- if (e === vt.Regtest)
20787
+ if (e === Et.Regtest)
20737
20788
  return Zo.regtest;
20738
20789
  throw new Error("Invalid network");
20739
20790
  }
20740
- function _x(e, t, r) {
20791
+ function Px(e, t, r) {
20741
20792
  if (!fm(e))
20742
20793
  throw new Error("Invalid mnemonic");
20743
- const n = (r == null ? void 0 : r.path) ?? Ry.bip44(t, (r == null ? void 0 : r.index) ?? 0), i = lm(bt).fromSeed(dm(e));
20744
- return Sx(i, n);
20794
+ const n = (r == null ? void 0 : r.path) ?? Ry.bip44(t, (r == null ? void 0 : r.index) ?? 0), i = lm(wt).fromSeed(dm(e));
20795
+ return Tx(i, n);
20745
20796
  }
20746
- const Sx = (e, t) => {
20797
+ const Tx = (e, t) => {
20747
20798
  const r = e.derivePath(t).privateKey;
20748
20799
  if (!r)
20749
20800
  throw new Error("Unable to derive private key from mnemonic");
20750
20801
  return r.toString("hex");
20751
20802
  };
20752
- om(bt);
20753
- class Cn extends Ax {
20803
+ om(wt);
20804
+ class Cn extends _x {
20754
20805
  /**
20755
20806
  * @constructor
20756
20807
  * @param {BitcoinWalletOpts} opts
@@ -20759,7 +20810,7 @@ class Cn extends Ax {
20759
20810
  * @param {number} opts.pkIndex - The address_index as per BIP44
20760
20811
  */
20761
20812
  constructor({ privateKey: t, provider: r, pkPath: n, pkType: i }) {
20762
- const s = Ds(bt), o = Ba(r.getNetwork()), a = Buffer.from(t, "hex");
20813
+ const s = Ds(wt), o = Ba(r.getNetwork()), a = Buffer.from(t, "hex");
20763
20814
  if (a.length === 0)
20764
20815
  throw new Error("invalid private key");
20765
20816
  super(), this.minAmt = 1e3, this.path = n || "", this.pkType = i, this.signer = s.fromPrivateKey(a, {
@@ -20772,7 +20823,7 @@ class Cn extends Ax {
20772
20823
  * else use multi-key wallet's `fromMnemonic`
20773
20824
  */
20774
20825
  static fromMnemonic(t, r, n) {
20775
- const i = Ry.bip84(r.getNetwork(), n == null ? void 0 : n.index), s = _x(t, r.getNetwork(), {
20826
+ const i = Ry.bip84(r.getNetwork(), n == null ? void 0 : n.index), s = Px(t, r.getNetwork(), {
20776
20827
  path: i
20777
20828
  });
20778
20829
  return new Cn({
@@ -20802,7 +20853,7 @@ class Cn extends Ax {
20802
20853
  * Creates a random Bitcoin wallet
20803
20854
  */
20804
20855
  static createRandom(t) {
20805
- const r = Ds(bt), n = Ba(t.getNetwork()), i = r.makeRandom({ network: n });
20856
+ const r = Ds(wt), n = Ba(t.getNetwork()), i = r.makeRandom({ network: n });
20806
20857
  if (!i.privateKey) throw new Error("Failed to create random key");
20807
20858
  return new Cn({
20808
20859
  privateKey: i.privateKey.toString("hex"),
@@ -20812,7 +20863,7 @@ class Cn extends Ax {
20812
20863
  });
20813
20864
  }
20814
20865
  static fromWIF(t, r, n) {
20815
- const i = Ds(bt), s = Ba(r.getNetwork()), o = i.fromWIF(t, s);
20866
+ const i = Ds(wt), s = Ba(r.getNetwork()), o = i.fromWIF(t, s);
20816
20867
  if (!o.privateKey)
20817
20868
  throw new Error("Invalid WIF");
20818
20869
  return Cn.fromPrivateKey(
@@ -21036,12 +21087,12 @@ class Cn extends Ax {
21036
21087
  return this.signer.signSchnorr(t);
21037
21088
  }
21038
21089
  }
21039
- const Px = "2bag6xpshpvPe7SJ9nSDLHpxqhEAoHPGpEkjNSv7gxoF", Tx = {
21090
+ const Ix = "2bag6xpshpvPe7SJ9nSDLHpxqhEAoHPGpEkjNSv7gxoF", kx = {
21040
21091
  name: "solana_native_swaps",
21041
21092
  version: "0.3.0",
21042
21093
  spec: "0.1.0",
21043
21094
  description: "Created with Anchor"
21044
- }, Ix = [
21095
+ }, Bx = [
21045
21096
  {
21046
21097
  name: "initiate",
21047
21098
  discriminator: [
@@ -21221,7 +21272,7 @@ const Px = "2bag6xpshpvPe7SJ9nSDLHpxqhEAoHPGpEkjNSv7gxoF", Tx = {
21221
21272
  ],
21222
21273
  args: []
21223
21274
  }
21224
- ], kx = [
21275
+ ], Ox = [
21225
21276
  {
21226
21277
  name: "SwapAccount",
21227
21278
  discriminator: [
@@ -21235,7 +21286,7 @@ const Px = "2bag6xpshpvPe7SJ9nSDLHpxqhEAoHPGpEkjNSv7gxoF", Tx = {
21235
21286
  182
21236
21287
  ]
21237
21288
  }
21238
- ], Bx = [
21289
+ ], Cx = [
21239
21290
  {
21240
21291
  name: "Initiated",
21241
21292
  discriminator: [
@@ -21288,7 +21339,7 @@ const Px = "2bag6xpshpvPe7SJ9nSDLHpxqhEAoHPGpEkjNSv7gxoF", Tx = {
21288
21339
  99
21289
21340
  ]
21290
21341
  }
21291
- ], Ox = [
21342
+ ], Rx = [
21292
21343
  {
21293
21344
  code: 6e3,
21294
21345
  name: "InvalidInitiator",
@@ -21309,7 +21360,7 @@ const Px = "2bag6xpshpvPe7SJ9nSDLHpxqhEAoHPGpEkjNSv7gxoF", Tx = {
21309
21360
  name: "RefundBeforeExpiry",
21310
21361
  msg: "Attempt to perform a refund before expiry time"
21311
21362
  }
21312
- ], Cx = [
21363
+ ], Nx = [
21313
21364
  {
21314
21365
  name: "Initiated",
21315
21366
  type: {
@@ -21440,38 +21491,38 @@ const Px = "2bag6xpshpvPe7SJ9nSDLHpxqhEAoHPGpEkjNSv7gxoF", Tx = {
21440
21491
  }
21441
21492
  }
21442
21493
  ], gu = {
21443
- address: Px,
21444
- metadata: Tx,
21445
- instructions: Ix,
21446
- accounts: kx,
21447
- events: Bx,
21448
- errors: Ox,
21449
- types: Cx
21494
+ address: Ix,
21495
+ metadata: kx,
21496
+ instructions: Bx,
21497
+ accounts: Ox,
21498
+ events: Cx,
21499
+ errors: Rx,
21500
+ types: Nx
21450
21501
  };
21451
21502
  var fr = {}, Yn = {};
21452
21503
  Object.defineProperty(Yn, "__esModule", { value: !0 });
21453
21504
  Yn.decode = Yn.encode = void 0;
21454
21505
  const ul = mn;
21455
- function Rx(e) {
21506
+ function Fx(e) {
21456
21507
  return e.reduce((t, r) => t + r.toString(16).padStart(2, "0"), "0x");
21457
21508
  }
21458
- Yn.encode = Rx;
21459
- function Nx(e) {
21509
+ Yn.encode = Fx;
21510
+ function $x(e) {
21460
21511
  e.indexOf("0x") === 0 && (e = e.substr(2)), e.length % 2 === 1 && (e = "0" + e);
21461
21512
  let t = e.match(/.{2}/g);
21462
21513
  return t === null ? ul.Buffer.from([]) : ul.Buffer.from(t.map((r) => parseInt(r, 16)));
21463
21514
  }
21464
- Yn.decode = Nx;
21515
+ Yn.decode = $x;
21465
21516
  var Zn = {}, Nr = {}, Oa;
21466
21517
  Object.defineProperty(Nr, "__esModule", { value: !0 });
21467
21518
  Nr.isVersionedTransaction = Nr.chunks = Nr.isBrowser = void 0;
21468
21519
  Nr.isBrowser = process.env.ANCHOR_BROWSER || typeof window < "u" && !(!((Oa = window.process) === null || Oa === void 0) && Oa.hasOwnProperty("type"));
21469
- function Fx(e, t) {
21520
+ function Ux(e, t) {
21470
21521
  return Array.apply(0, new Array(Math.ceil(e.length / t))).map((r, n) => e.slice(n * t, (n + 1) * t));
21471
21522
  }
21472
- Nr.chunks = Fx;
21473
- const $x = (e) => "version" in e;
21474
- Nr.isVersionedTransaction = $x;
21523
+ Nr.chunks = Ux;
21524
+ const Hx = (e) => "version" in e;
21525
+ Nr.isVersionedTransaction = Hx;
21475
21526
  var Ca = {}, Ra = {}, Na, fl;
21476
21527
  function Ny() {
21477
21528
  return fl || (fl = 1, Na = function() {
@@ -21516,19 +21567,19 @@ function Fy() {
21516
21567
  return ll || (ll = 1, $a = Object), $a;
21517
21568
  }
21518
21569
  var Ua, pl;
21519
- function Ux() {
21570
+ function Lx() {
21520
21571
  return pl || (pl = 1, Ua = Error), Ua;
21521
21572
  }
21522
21573
  var Ha, hl;
21523
- function Hx() {
21574
+ function Mx() {
21524
21575
  return hl || (hl = 1, Ha = EvalError), Ha;
21525
21576
  }
21526
21577
  var La, yl;
21527
- function Lx() {
21578
+ function Dx() {
21528
21579
  return yl || (yl = 1, La = RangeError), La;
21529
21580
  }
21530
21581
  var Ma, ml;
21531
- function Mx() {
21582
+ function jx() {
21532
21583
  return ml || (ml = 1, Ma = ReferenceError), Ma;
21533
21584
  }
21534
21585
  var Da, gl;
@@ -21540,57 +21591,57 @@ function ms() {
21540
21591
  return bl || (bl = 1, ja = TypeError), ja;
21541
21592
  }
21542
21593
  var za, wl;
21543
- function Dx() {
21594
+ function zx() {
21544
21595
  return wl || (wl = 1, za = URIError), za;
21545
21596
  }
21546
21597
  var qa, vl;
21547
- function jx() {
21598
+ function qx() {
21548
21599
  return vl || (vl = 1, qa = Math.abs), qa;
21549
21600
  }
21550
21601
  var Ga, El;
21551
- function zx() {
21602
+ function Gx() {
21552
21603
  return El || (El = 1, Ga = Math.floor), Ga;
21553
21604
  }
21554
21605
  var Va, Al;
21555
- function qx() {
21606
+ function Vx() {
21556
21607
  return Al || (Al = 1, Va = Math.max), Va;
21557
21608
  }
21558
21609
  var Wa, xl;
21559
- function Gx() {
21610
+ function Wx() {
21560
21611
  return xl || (xl = 1, Wa = Math.min), Wa;
21561
21612
  }
21562
21613
  var Ka, _l;
21563
- function Vx() {
21614
+ function Kx() {
21564
21615
  return _l || (_l = 1, Ka = Math.pow), Ka;
21565
21616
  }
21566
21617
  var Ya, Sl;
21567
- function Wx() {
21618
+ function Yx() {
21568
21619
  return Sl || (Sl = 1, Ya = Math.round), Ya;
21569
21620
  }
21570
21621
  var Za, Pl;
21571
- function Kx() {
21622
+ function Zx() {
21572
21623
  return Pl || (Pl = 1, Za = Number.isNaN || function(t) {
21573
21624
  return t !== t;
21574
21625
  }), Za;
21575
21626
  }
21576
21627
  var Xa, Tl;
21577
- function Yx() {
21628
+ function Xx() {
21578
21629
  if (Tl) return Xa;
21579
21630
  Tl = 1;
21580
- var e = Kx();
21631
+ var e = Zx();
21581
21632
  return Xa = function(r) {
21582
21633
  return e(r) || r === 0 ? r : r < 0 ? -1 : 1;
21583
21634
  }, Xa;
21584
21635
  }
21585
21636
  var Ja, Il;
21586
- function Zx() {
21637
+ function Jx() {
21587
21638
  return Il || (Il = 1, Ja = Object.getOwnPropertyDescriptor), Ja;
21588
21639
  }
21589
21640
  var Qa, kl;
21590
21641
  function oi() {
21591
21642
  if (kl) return Qa;
21592
21643
  kl = 1;
21593
- var e = Zx();
21644
+ var e = Jx();
21594
21645
  if (e)
21595
21646
  try {
21596
21647
  e([], "length");
@@ -21613,7 +21664,7 @@ function Vo() {
21613
21664
  return ec = e, ec;
21614
21665
  }
21615
21666
  var tc, Ol;
21616
- function Xx() {
21667
+ function Qx() {
21617
21668
  if (Ol) return tc;
21618
21669
  Ol = 1;
21619
21670
  var e = typeof Symbol < "u" && Symbol, t = Ny();
@@ -21633,7 +21684,7 @@ function Hy() {
21633
21684
  return nc = e.getPrototypeOf || null, nc;
21634
21685
  }
21635
21686
  var ic, Nl;
21636
- function Jx() {
21687
+ function e_() {
21637
21688
  if (Nl) return ic;
21638
21689
  Nl = 1;
21639
21690
  var e = "Function.prototype.bind called on incompatible ", t = Object.prototype.toString, r = Math.max, n = "[object Function]", i = function(c, f) {
@@ -21681,7 +21732,7 @@ var sc, Fl;
21681
21732
  function gs() {
21682
21733
  if (Fl) return sc;
21683
21734
  Fl = 1;
21684
- var e = Jx();
21735
+ var e = e_();
21685
21736
  return sc = Function.prototype.bind || e, sc;
21686
21737
  }
21687
21738
  var oc, $l;
@@ -21693,14 +21744,14 @@ function Sf() {
21693
21744
  return Ul || (Ul = 1, ac = Function.prototype.apply), ac;
21694
21745
  }
21695
21746
  var cc, Hl;
21696
- function Qx() {
21747
+ function t_() {
21697
21748
  return Hl || (Hl = 1, cc = typeof Reflect < "u" && Reflect && Reflect.apply), cc;
21698
21749
  }
21699
21750
  var uc, Ll;
21700
21751
  function Ly() {
21701
21752
  if (Ll) return uc;
21702
21753
  Ll = 1;
21703
- var e = gs(), t = Sf(), r = _f(), n = Qx();
21754
+ var e = gs(), t = Sf(), r = _f(), n = t_();
21704
21755
  return uc = n || e.call(r, t), uc;
21705
21756
  }
21706
21757
  var fc, Ml;
@@ -21715,7 +21766,7 @@ function Pf() {
21715
21766
  }, fc;
21716
21767
  }
21717
21768
  var dc, Dl;
21718
- function e_() {
21769
+ function r_() {
21719
21770
  if (Dl) return dc;
21720
21771
  Dl = 1;
21721
21772
  var e = Pf(), t = oi(), r;
@@ -21742,7 +21793,7 @@ var lc, jl;
21742
21793
  function Tf() {
21743
21794
  if (jl) return lc;
21744
21795
  jl = 1;
21745
- var e = Uy(), t = Hy(), r = e_();
21796
+ var e = Uy(), t = Hy(), r = r_();
21746
21797
  return lc = e ? function(i) {
21747
21798
  return e(i);
21748
21799
  } : t ? function(i) {
@@ -21764,7 +21815,7 @@ var hc, ql;
21764
21815
  function Dy() {
21765
21816
  if (ql) return hc;
21766
21817
  ql = 1;
21767
- var e, t = Fy(), r = Ux(), n = Hx(), i = Lx(), s = Mx(), o = $y(), a = ms(), c = Dx(), f = jx(), u = zx(), d = qx(), y = Gx(), p = Vx(), g = Wx(), b = Yx(), E = Function, A = function(re) {
21818
+ var e, t = Fy(), r = Lx(), n = Mx(), i = Dx(), s = jx(), o = $y(), a = ms(), c = zx(), f = qx(), u = Gx(), d = Vx(), y = Wx(), p = Kx(), g = Yx(), b = Xx(), E = Function, A = function(re) {
21768
21819
  try {
21769
21820
  return E('"use strict"; return (' + re + ").constructor;")();
21770
21821
  } catch {
@@ -21781,7 +21832,7 @@ function Dy() {
21781
21832
  return x;
21782
21833
  }
21783
21834
  }
21784
- }() : x, T = Xx()(), C = Tf(), L = Hy(), _ = Uy(), F = Sf(), O = _f(), $ = {}, j = typeof Uint8Array > "u" || !C ? e : C(Uint8Array), V = {
21835
+ }() : x, T = Qx()(), C = Tf(), L = Hy(), _ = Uy(), F = Sf(), O = _f(), $ = {}, j = typeof Uint8Array > "u" || !C ? e : C(Uint8Array), V = {
21785
21836
  __proto__: null,
21786
21837
  "%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
21787
21838
  "%Array%": Array,
@@ -21948,8 +21999,8 @@ function Dy() {
21948
21999
  if (de === "%" && oe !== "%")
21949
22000
  throw new o("invalid intrinsic syntax, expected opening `%`");
21950
22001
  var pe = [];
21951
- return I(te, Z, function(ve, st, Ce, Rt) {
21952
- pe[pe.length] = Ce ? I(Rt, Q, "$1") : st || ve;
22002
+ return I(te, Z, function(ve, ot, Ce, Rt) {
22003
+ pe[pe.length] = Ce ? I(Rt, Q, "$1") : ot || ve;
21953
22004
  }), pe;
21954
22005
  }, ne = function(te, oe) {
21955
22006
  var de = te, pe;
@@ -21972,14 +22023,14 @@ function Dy() {
21972
22023
  throw new a('"allowMissing" argument must be a boolean');
21973
22024
  if (U(/^%?[^%]*%?$/, te) === null)
21974
22025
  throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
21975
- var de = se(te), pe = de.length > 0 ? de[0] : "", ve = ne("%" + pe + "%", oe), st = ve.name, Ce = ve.value, Rt = !1, Mr = ve.alias;
22026
+ var de = se(te), pe = de.length > 0 ? de[0] : "", ve = ne("%" + pe + "%", oe), ot = ve.name, Ce = ve.value, Rt = !1, Mr = ve.alias;
21976
22027
  Mr && (pe = Mr[0], W(de, q([0, 1], Mr)));
21977
22028
  for (var G = 1, Nt = !0; G < de.length; G += 1) {
21978
22029
  var qe = de[G], Ge = R(qe, 0, 1), br = R(qe, -1);
21979
22030
  if ((Ge === '"' || Ge === "'" || Ge === "`" || br === '"' || br === "'" || br === "`") && Ge !== br)
21980
22031
  throw new o("property names with quotes must have matching quotes");
21981
- if ((qe === "constructor" || !Nt) && (Rt = !0), pe += "." + qe, st = "%" + pe + "%", k(V, st))
21982
- Ce = V[st];
22032
+ if ((qe === "constructor" || !Nt) && (Rt = !0), pe += "." + qe, ot = "%" + pe + "%", k(V, ot))
22033
+ Ce = V[ot];
21983
22034
  else if (Ce != null) {
21984
22035
  if (!(qe in Ce)) {
21985
22036
  if (!oe)
@@ -21991,7 +22042,7 @@ function Dy() {
21991
22042
  Nt = !!wn, Nt && "get" in wn && !("originalValue" in wn.get) ? Ce = wn.get : Ce = Ce[qe];
21992
22043
  } else
21993
22044
  Nt = k(Ce, qe), Ce = Ce[qe];
21994
- Nt && !Rt && (V[st] = Ce);
22045
+ Nt && !Rt && (V[ot] = Ce);
21995
22046
  }
21996
22047
  }
21997
22048
  return Ce;
@@ -22014,7 +22065,7 @@ function bs() {
22014
22065
  }, yc;
22015
22066
  }
22016
22067
  var mc, Vl;
22017
- function t_() {
22068
+ function n_() {
22018
22069
  if (Vl) return mc;
22019
22070
  Vl = 1;
22020
22071
  var e = Go()(), t = bs(), r = t("Object.prototype.toString"), n = function(a) {
@@ -22027,7 +22078,7 @@ function t_() {
22027
22078
  return n.isLegacyArguments = i, mc = s ? n : i, mc;
22028
22079
  }
22029
22080
  var gc, Wl;
22030
- function r_() {
22081
+ function i_() {
22031
22082
  if (Wl) return gc;
22032
22083
  Wl = 1;
22033
22084
  var e = bs(), t = Go()(), r = My(), n = oi(), i;
@@ -22071,10 +22122,10 @@ function r_() {
22071
22122
  return gc = i, gc;
22072
22123
  }
22073
22124
  var bc, Kl;
22074
- function n_() {
22125
+ function s_() {
22075
22126
  if (Kl) return bc;
22076
22127
  Kl = 1;
22077
- var e = bs(), t = r_(), r = e("RegExp.prototype.exec"), n = ms();
22128
+ var e = bs(), t = i_(), r = e("RegExp.prototype.exec"), n = ms();
22078
22129
  return bc = function(s) {
22079
22130
  if (!t(s))
22080
22131
  throw new n("`regex` must be a RegExp");
@@ -22084,10 +22135,10 @@ function n_() {
22084
22135
  }, bc;
22085
22136
  }
22086
22137
  var wc, Yl;
22087
- function i_() {
22138
+ function o_() {
22088
22139
  if (Yl) return wc;
22089
22140
  Yl = 1;
22090
- var e = bs(), t = n_(), r = t(/^\s*(?:function)?\*/), n = Go()(), i = Tf(), s = e("Object.prototype.toString"), o = e("Function.prototype.toString"), a = function() {
22141
+ var e = bs(), t = s_(), r = t(/^\s*(?:function)?\*/), n = Go()(), i = Tf(), s = e("Object.prototype.toString"), o = e("Function.prototype.toString"), a = function() {
22091
22142
  if (!n)
22092
22143
  return !1;
22093
22144
  try {
@@ -22117,7 +22168,7 @@ function i_() {
22117
22168
  }, wc;
22118
22169
  }
22119
22170
  var vc, Zl;
22120
- function s_() {
22171
+ function a_() {
22121
22172
  if (Zl) return vc;
22122
22173
  Zl = 1;
22123
22174
  var e = Function.prototype.toString, t = typeof Reflect == "object" && Reflect !== null && Reflect.apply, r, n;
@@ -22189,10 +22240,10 @@ function s_() {
22189
22240
  }, vc;
22190
22241
  }
22191
22242
  var Ec, Xl;
22192
- function o_() {
22243
+ function c_() {
22193
22244
  if (Xl) return Ec;
22194
22245
  Xl = 1;
22195
- var e = s_(), t = Object.prototype.toString, r = Object.prototype.hasOwnProperty, n = function(c, f, u) {
22246
+ var e = a_(), t = Object.prototype.toString, r = Object.prototype.hasOwnProperty, n = function(c, f, u) {
22196
22247
  for (var d = 0, y = c.length; d < y; d++)
22197
22248
  r.call(c, d) && (u == null ? f(c[d], d, c) : f.call(u, c[d], d, c));
22198
22249
  }, i = function(c, f, u) {
@@ -22213,7 +22264,7 @@ function o_() {
22213
22264
  }, Ec;
22214
22265
  }
22215
22266
  var Ac, Jl;
22216
- function a_() {
22267
+ function u_() {
22217
22268
  return Jl || (Jl = 1, Ac = [
22218
22269
  "Float16Array",
22219
22270
  "Float32Array",
@@ -22230,10 +22281,10 @@ function a_() {
22230
22281
  ]), Ac;
22231
22282
  }
22232
22283
  var xc, Ql;
22233
- function c_() {
22284
+ function f_() {
22234
22285
  if (Ql) return xc;
22235
22286
  Ql = 1;
22236
- var e = a_(), t = typeof globalThis > "u" ? Qt : globalThis;
22287
+ var e = u_(), t = typeof globalThis > "u" ? Qt : globalThis;
22237
22288
  return xc = function() {
22238
22289
  for (var n = [], i = 0; i < e.length; i++)
22239
22290
  typeof t[e[i]] == "function" && (n[n.length] = e[i]);
@@ -22241,7 +22292,7 @@ function c_() {
22241
22292
  }, xc;
22242
22293
  }
22243
22294
  var _c = { exports: {} }, Sc, ep;
22244
- function u_() {
22295
+ function d_() {
22245
22296
  if (ep) return Sc;
22246
22297
  ep = 1;
22247
22298
  var e = Vo(), t = $y(), r = ms(), n = oi();
@@ -22273,7 +22324,7 @@ function u_() {
22273
22324
  }, Sc;
22274
22325
  }
22275
22326
  var Pc, tp;
22276
- function f_() {
22327
+ function l_() {
22277
22328
  if (tp) return Pc;
22278
22329
  tp = 1;
22279
22330
  var e = Vo(), t = function() {
@@ -22290,10 +22341,10 @@ function f_() {
22290
22341
  }, Pc = t, Pc;
22291
22342
  }
22292
22343
  var Tc, rp;
22293
- function d_() {
22344
+ function p_() {
22294
22345
  if (rp) return Tc;
22295
22346
  rp = 1;
22296
- var e = Dy(), t = u_(), r = f_()(), n = oi(), i = ms(), s = e("%Math.floor%");
22347
+ var e = Dy(), t = d_(), r = l_()(), n = oi(), i = ms(), s = e("%Math.floor%");
22297
22348
  return Tc = function(a, c) {
22298
22349
  if (typeof a != "function")
22299
22350
  throw new i("`fn` is not a function");
@@ -22320,7 +22371,7 @@ function d_() {
22320
22371
  }, Tc;
22321
22372
  }
22322
22373
  var Ic, np;
22323
- function l_() {
22374
+ function h_() {
22324
22375
  if (np) return Ic;
22325
22376
  np = 1;
22326
22377
  var e = gs(), t = Sf(), r = Ly();
@@ -22329,9 +22380,9 @@ function l_() {
22329
22380
  }, Ic;
22330
22381
  }
22331
22382
  var ip;
22332
- function p_() {
22383
+ function y_() {
22333
22384
  return ip || (ip = 1, function(e) {
22334
- var t = d_(), r = Vo(), n = Pf(), i = l_();
22385
+ var t = p_(), r = Vo(), n = Pf(), i = h_();
22335
22386
  e.exports = function(o) {
22336
22387
  var a = n(arguments), c = o.length - (arguments.length - 1);
22337
22388
  return t(
@@ -22346,7 +22397,7 @@ var kc, sp;
22346
22397
  function jy() {
22347
22398
  if (sp) return kc;
22348
22399
  sp = 1;
22349
- var e = o_(), t = c_(), r = p_(), n = bs(), i = oi(), s = Tf(), o = n("Object.prototype.toString"), a = Go()(), c = typeof globalThis > "u" ? Qt : globalThis, f = t(), u = n("String.prototype.slice"), d = n("Array.prototype.indexOf", !0) || function(E, A) {
22400
+ var e = c_(), t = f_(), r = y_(), n = bs(), i = oi(), s = Tf(), o = n("Object.prototype.toString"), a = Go()(), c = typeof globalThis > "u" ? Qt : globalThis, f = t(), u = n("String.prototype.slice"), d = n("Array.prototype.indexOf", !0) || function(E, A) {
22350
22401
  for (var S = 0; S < E.length; S += 1)
22351
22402
  if (E[S] === A)
22352
22403
  return S;
@@ -22413,7 +22464,7 @@ function jy() {
22413
22464
  }, kc;
22414
22465
  }
22415
22466
  var Bc, op;
22416
- function h_() {
22467
+ function m_() {
22417
22468
  if (op) return Bc;
22418
22469
  op = 1;
22419
22470
  var e = jy();
@@ -22422,9 +22473,9 @@ function h_() {
22422
22473
  }, Bc;
22423
22474
  }
22424
22475
  var ap;
22425
- function y_() {
22476
+ function g_() {
22426
22477
  return ap || (ap = 1, function(e) {
22427
- var t = t_(), r = i_(), n = jy(), i = h_();
22478
+ var t = n_(), r = o_(), n = jy(), i = m_();
22428
22479
  function s(G) {
22429
22480
  return G.call.bind(G);
22430
22481
  }
@@ -22583,16 +22634,16 @@ function y_() {
22583
22634
  return g(G, d);
22584
22635
  }
22585
22636
  e.isBooleanObject = ve;
22586
- function st(G) {
22637
+ function ot(G) {
22587
22638
  return o && g(G, y);
22588
22639
  }
22589
- e.isBigIntObject = st;
22640
+ e.isBigIntObject = ot;
22590
22641
  function Ce(G) {
22591
22642
  return a && g(G, p);
22592
22643
  }
22593
22644
  e.isSymbolObject = Ce;
22594
22645
  function Rt(G) {
22595
- return de(G) || pe(G) || ve(G) || st(G) || Ce(G);
22646
+ return de(G) || pe(G) || ve(G) || ot(G) || Ce(G);
22596
22647
  }
22597
22648
  e.isBoxedPrimitive = Rt;
22598
22649
  function Mr(G) {
@@ -22609,13 +22660,13 @@ function y_() {
22609
22660
  }(Ra)), Ra;
22610
22661
  }
22611
22662
  var Oc, cp;
22612
- function m_() {
22663
+ function b_() {
22613
22664
  return cp || (cp = 1, Oc = function(t) {
22614
22665
  return t && typeof t == "object" && typeof t.copy == "function" && typeof t.fill == "function" && typeof t.readUInt8 == "function";
22615
22666
  }), Oc;
22616
22667
  }
22617
22668
  var Hs = { exports: {} }, up;
22618
- function g_() {
22669
+ function w_() {
22619
22670
  return up || (up = 1, typeof Object.create == "function" ? Hs.exports = function(t, r) {
22620
22671
  r && (t.super_ = r, t.prototype = Object.create(r.prototype, {
22621
22672
  constructor: {
@@ -22785,8 +22836,8 @@ function zy() {
22785
22836
  return L(R) ? I.stylize(RegExp.prototype.toString.call(R), "regexp") : I.stylize("[Object]", "special");
22786
22837
  I.seen.push(R);
22787
22838
  var ve;
22788
- return oe ? ve = p(I, R, U, ne, se) : ve = se.map(function(st) {
22789
- return g(I, R, U, ne, st, oe);
22839
+ return oe ? ve = p(I, R, U, ne, se) : ve = se.map(function(ot) {
22840
+ return g(I, R, U, ne, ot, oe);
22790
22841
  }), I.seen.pop(), b(ve, te, de);
22791
22842
  }
22792
22843
  function d(I, R) {
@@ -22855,7 +22906,7 @@ function zy() {
22855
22906
  `) + " " + I.join(`,
22856
22907
  `) + " " + U[1] : U[0] + R + " " + I.join(", ") + " " + U[1];
22857
22908
  }
22858
- e.types = y_();
22909
+ e.types = g_();
22859
22910
  function E(I) {
22860
22911
  return Array.isArray(I);
22861
22912
  }
@@ -22912,7 +22963,7 @@ function zy() {
22912
22963
  return I === null || typeof I == "boolean" || typeof I == "number" || typeof I == "string" || typeof I == "symbol" || // ES6 symbol
22913
22964
  typeof I > "u";
22914
22965
  }
22915
- e.isPrimitive = j, e.isBuffer = m_();
22966
+ e.isPrimitive = j, e.isBuffer = b_();
22916
22967
  function V(I) {
22917
22968
  return Object.prototype.toString.call(I);
22918
22969
  }
@@ -22943,7 +22994,7 @@ function zy() {
22943
22994
  }
22944
22995
  e.log = function() {
22945
22996
  console.log("%s - %s", J(), e.format.apply(e, arguments));
22946
- }, e.inherits = g_(), e._extend = function(I, R) {
22997
+ }, e.inherits = w_(), e._extend = function(I, R) {
22947
22998
  if (!R || !_(R)) return I;
22948
22999
  for (var U = Object.keys(R), Z = U.length; Z--; )
22949
23000
  I[U[Z]] = R[U[Z]];
@@ -23031,14 +23082,14 @@ function zy() {
23031
23082
  Object.defineProperty(Zn, "__esModule", { value: !0 });
23032
23083
  Zn.encode = Zn.decode = void 0;
23033
23084
  const qy = Nr;
23034
- function b_(e) {
23085
+ function v_(e) {
23035
23086
  return (qy.isBrowser ? new TextDecoder("utf-8") : new (zy()).TextDecoder("utf-8")).decode(e);
23036
23087
  }
23037
- Zn.decode = b_;
23038
- function w_(e) {
23088
+ Zn.decode = v_;
23089
+ function E_(e) {
23039
23090
  return (qy.isBrowser ? new TextEncoder() : new (zy()).TextEncoder("utf-8")).encode(e);
23040
23091
  }
23041
- Zn.encode = w_;
23092
+ Zn.encode = E_;
23042
23093
  var Xn = {}, bu = { exports: {} };
23043
23094
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
23044
23095
  (function(e, t) {
@@ -23070,8 +23121,8 @@ var Xn = {}, bu = { exports: {} };
23070
23121
  return r.SlowBuffer(o);
23071
23122
  };
23072
23123
  })(bu, bu.exports);
23073
- var v_ = bu.exports, Ls = v_.Buffer;
23074
- function E_(e) {
23124
+ var A_ = bu.exports, Ls = A_.Buffer;
23125
+ function x_(e) {
23075
23126
  if (e.length >= 255)
23076
23127
  throw new TypeError("Alphabet too long");
23077
23128
  for (var t = new Uint8Array(256), r = 0; r < t.length; r++)
@@ -23143,33 +23194,33 @@ function E_(e) {
23143
23194
  decode: y
23144
23195
  };
23145
23196
  }
23146
- var A_ = E_, x_ = A_, __ = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", S_ = x_(__), P_ = Qt && Qt.__importDefault || function(e) {
23197
+ var __ = x_, S_ = __, P_ = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", T_ = S_(P_), I_ = Qt && Qt.__importDefault || function(e) {
23147
23198
  return e && e.__esModule ? e : { default: e };
23148
23199
  };
23149
23200
  Object.defineProperty(Xn, "__esModule", { value: !0 });
23150
23201
  Xn.decode = Xn.encode = void 0;
23151
- const Gy = P_(S_);
23152
- function T_(e) {
23202
+ const Gy = I_(T_);
23203
+ function k_(e) {
23153
23204
  return Gy.default.encode(e);
23154
23205
  }
23155
- Xn.encode = T_;
23156
- function I_(e) {
23206
+ Xn.encode = k_;
23207
+ function B_(e) {
23157
23208
  return Gy.default.decode(e);
23158
23209
  }
23159
- Xn.decode = I_;
23210
+ Xn.decode = B_;
23160
23211
  var Jn = {};
23161
23212
  Object.defineProperty(Jn, "__esModule", { value: !0 });
23162
23213
  Jn.decode = Jn.encode = void 0;
23163
- const k_ = mn;
23164
- function B_(e) {
23214
+ const O_ = mn;
23215
+ function C_(e) {
23165
23216
  return e.toString("base64");
23166
23217
  }
23167
- Jn.encode = B_;
23168
- function O_(e) {
23169
- return k_.Buffer.from(e, "base64");
23218
+ Jn.encode = C_;
23219
+ function R_(e) {
23220
+ return O_.Buffer.from(e, "base64");
23170
23221
  }
23171
- Jn.decode = O_;
23172
- var C_ = Qt && Qt.__createBinding || (Object.create ? function(e, t, r, n) {
23222
+ Jn.decode = R_;
23223
+ var N_ = Qt && Qt.__createBinding || (Object.create ? function(e, t, r, n) {
23173
23224
  n === void 0 && (n = r);
23174
23225
  var i = Object.getOwnPropertyDescriptor(t, r);
23175
23226
  (!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = { enumerable: !0, get: function() {
@@ -23177,15 +23228,15 @@ var C_ = Qt && Qt.__createBinding || (Object.create ? function(e, t, r, n) {
23177
23228
  } }), Object.defineProperty(e, n, i);
23178
23229
  } : function(e, t, r, n) {
23179
23230
  n === void 0 && (n = r), e[n] = t[r];
23180
- }), R_ = Qt && Qt.__setModuleDefault || (Object.create ? function(e, t) {
23231
+ }), F_ = Qt && Qt.__setModuleDefault || (Object.create ? function(e, t) {
23181
23232
  Object.defineProperty(e, "default", { enumerable: !0, value: t });
23182
23233
  } : function(e, t) {
23183
23234
  e.default = t;
23184
23235
  }), Wo = Qt && Qt.__importStar || function(e) {
23185
23236
  if (e && e.__esModule) return e;
23186
23237
  var t = {};
23187
- if (e != null) for (var r in e) r !== "default" && Object.prototype.hasOwnProperty.call(e, r) && C_(t, e, r);
23188
- return R_(t, e), t;
23238
+ if (e != null) for (var r in e) r !== "default" && Object.prototype.hasOwnProperty.call(e, r) && N_(t, e, r);
23239
+ return F_(t, e), t;
23189
23240
  };
23190
23241
  Object.defineProperty(fr, "__esModule", { value: !0 });
23191
23242
  fr.base64 = fr.bs58 = fr.utf8 = ao = fr.hex = void 0;
@@ -23259,7 +23310,7 @@ function Vy(e) {
23259
23310
  );
23260
23311
  return t;
23261
23312
  }
23262
- class N_ {
23313
+ class $_ {
23263
23314
  /**
23264
23315
  * Creates a new instance of SolanaRelay.
23265
23316
  * @param {AnchorProvider} provider - An abstraction of RPC connection and a Wallet
@@ -23447,8 +23498,8 @@ class Wy extends dp {
23447
23498
  this._digestKey = s.val;
23448
23499
  } else
23449
23500
  this._digestKey = t.digestKey;
23450
- this._quote = t.quote ?? new UA(this._api.quote), this._auth = t.auth ?? Bf.fromDigestKey(new mt(this._api.auth), this._digestKey), this._orderbook = t.orderbook ?? new em(new mt(this._api.orderbook)), this._evmHTLC = t.htlc.evm, this._starknetHTLC = t.htlc.starknet, this._solanaHTLC = t.htlc.solana, this._secretManager = t.secretManager ?? oo.fromDigestKey(this._digestKey.digestKey), this.orderExecutorCache = new NA(), this._blockNumberFetcher = t.blockNumberFetcher ?? new $A(this._api.info, this.environment);
23451
- const i = new vx(_E(this.environment));
23501
+ this._quote = t.quote ?? new UA(this._api.quote), this._auth = t.auth ?? Bf.fromDigestKey(new gt(this._api.auth), this._digestKey), this._orderbook = t.orderbook ?? new em(new gt(this._api.orderbook)), this._evmHTLC = t.htlc.evm, this._starknetHTLC = t.htlc.starknet, this._solanaHTLC = t.htlc.solana, this._secretManager = t.secretManager ?? oo.fromDigestKey(this._digestKey.digestKey), this.orderExecutorCache = new NA(), this._blockNumberFetcher = t.blockNumberFetcher ?? new $A(this._api.info, this.environment);
23502
+ const i = new Ax(_E(this.environment));
23452
23503
  this._btcWallet = Cn.fromPrivateKey(
23453
23504
  this._digestKey.digestKey,
23454
23505
  i
@@ -23468,19 +23519,19 @@ class Wy extends dp {
23468
23519
  "API not found, invalid environment " + t.environment
23469
23520
  );
23470
23521
  const i = {
23471
- evm: t.wallets.evm ? new dx(
23522
+ evm: t.wallets.evm ? new px(
23472
23523
  n.evmRelay,
23473
23524
  t.wallets.evm,
23474
- Bf.fromDigestKey(new mt(n.auth), r)
23525
+ Bf.fromDigestKey(new gt(n.auth), r)
23475
23526
  ) : void 0,
23476
- starknet: t.wallets.starknet ? new yx(
23527
+ starknet: t.wallets.starknet ? new gx(
23477
23528
  n.starknetRelay,
23478
23529
  t.wallets.starknet,
23479
23530
  t.environment === Yt.MAINNET ? Br.MAINNET : Br.TESTNET
23480
23531
  ) : void 0,
23481
- solana: t.wallets.solana ? new N_(
23532
+ solana: t.wallets.solana ? new $_(
23482
23533
  t.wallets.solana,
23483
- new mt(n.solanaRelay),
23534
+ new gt(n.solanaRelay),
23484
23535
  t.environment === Yt.MAINNET ? Bd.mainnet : Bd.testnet,
23485
23536
  t.solanaProgramAddress ? t.solanaProgramAddress : bE.mainnet
23486
23537
  ) : void 0
@@ -23604,15 +23655,15 @@ class Wy extends dp {
23604
23655
  async getAddresses(t) {
23605
23656
  var n;
23606
23657
  switch (Yo(t)) {
23607
- case dt.EVM:
23658
+ case lt.EVM:
23608
23659
  return this._evmHTLC ? ie(this._evmHTLC.htlcActorAddress) : H("Please provide evmHTLC when initializing garden");
23609
- case dt.Bitcoin: {
23660
+ case lt.Bitcoin: {
23610
23661
  const i = await ((n = this._btcWallet) == null ? void 0 : n.getPublicKey());
23611
23662
  return !i || !xE(i) ? H("Invalid btc public key") : ie(Dr(i));
23612
23663
  }
23613
- case dt.Solana:
23664
+ case lt.Solana:
23614
23665
  return this._solanaHTLC ? ie(this._solanaHTLC.htlcActorAddress) : H("Please provide solanaHTLC when initializing garden");
23615
- case dt.Starknet:
23666
+ case lt.Starknet:
23616
23667
  return this._starknetHTLC ? ie(this._starknetHTLC.htlcActorAddress) : H("Please provide starknetHTLC when initializing garden");
23617
23668
  default:
23618
23669
  return H("Unsupported chain");
@@ -23665,11 +23716,11 @@ class Wy extends dp {
23665
23716
  return;
23666
23717
  }
23667
23718
  switch (Yo(s.destination_swap.chain)) {
23668
- case dt.EVM: {
23719
+ case lt.EVM: {
23669
23720
  await this.evmRedeem(s, a.val.secret);
23670
23721
  break;
23671
23722
  }
23672
- case dt.Bitcoin: {
23723
+ case lt.Bitcoin: {
23673
23724
  const c = this.btcWallet;
23674
23725
  if (!c) {
23675
23726
  this.emit("error", s, "BTC wallet not found");
@@ -23678,11 +23729,11 @@ class Wy extends dp {
23678
23729
  await this.btcRedeem(c, s, a.val.secret);
23679
23730
  break;
23680
23731
  }
23681
- case dt.Starknet: {
23732
+ case lt.Starknet: {
23682
23733
  await this.starknetRedeem(s, a.val.secret);
23683
23734
  break;
23684
23735
  }
23685
- case dt.Solana:
23736
+ case lt.Solana:
23686
23737
  await this.solRedeem(s, a.val.secret);
23687
23738
  break;
23688
23739
  default:
@@ -23696,7 +23747,7 @@ class Wy extends dp {
23696
23747
  }
23697
23748
  case Ee.Refund: {
23698
23749
  switch (Yo(s.source_swap.chain)) {
23699
- case dt.Solana: {
23750
+ case lt.Solana: {
23700
23751
  this.emit(
23701
23752
  "error",
23702
23753
  s,
@@ -23704,7 +23755,7 @@ class Wy extends dp {
23704
23755
  );
23705
23756
  break;
23706
23757
  }
23707
- case dt.EVM: {
23758
+ case lt.EVM: {
23708
23759
  this.emit(
23709
23760
  "error",
23710
23761
  s,
@@ -23712,7 +23763,7 @@ class Wy extends dp {
23712
23763
  );
23713
23764
  break;
23714
23765
  }
23715
- case dt.Bitcoin: {
23766
+ case lt.Bitcoin: {
23716
23767
  const a = this.btcWallet;
23717
23768
  if (!a) {
23718
23769
  this.emit("error", s, "BTC wallet not found");
@@ -23721,7 +23772,7 @@ class Wy extends dp {
23721
23772
  await this.btcRefund(a, s);
23722
23773
  break;
23723
23774
  }
23724
- case dt.Starknet: {
23775
+ case lt.Starknet: {
23725
23776
  this.emit(
23726
23777
  "error",
23727
23778
  s,
@@ -23952,7 +24003,7 @@ class Wy extends dp {
23952
24003
  return;
23953
24004
  }
23954
24005
  const a = await Ie.post(
23955
- new mt(this._api.orderbook).endpoint(
24006
+ new gt(this._api.orderbook).endpoint(
23956
24007
  "relayer/bitcoin/instant-refund-hash"
23957
24008
  ),
23958
24009
  {
@@ -23973,7 +24024,7 @@ class Wy extends dp {
23973
24024
  );
23974
24025
  return;
23975
24026
  }
23976
- const c = await i.generateInstantRefundSACPWithHash(a.result), f = new mt(this._api.orderbook).endpoint(
24027
+ const c = await i.generateInstantRefundSACPWithHash(a.result), f = new gt(this._api.orderbook).endpoint(
23977
24028
  "relayer/bitcoin/instant-refund"
23978
24029
  );
23979
24030
  (await Ie.post(f, {
@@ -24020,7 +24071,7 @@ class Wy extends dp {
24020
24071
  async broadcastRedeemTx(t, r) {
24021
24072
  try {
24022
24073
  if (!this._api) return H("API not found");
24023
- const n = new mt(this._api.evmRelay).endpoint("/bitcoin/redeem "), i = await this._auth.getAuthHeaders(), o = await (await fetch(n, {
24074
+ const n = new gt(this._api.evmRelay).endpoint("/bitcoin/redeem "), i = await this._auth.getAuthHeaders(), o = await (await fetch(n, {
24024
24075
  method: "POST",
24025
24076
  headers: {
24026
24077
  "Content-Type": "application/json",
@@ -24037,7 +24088,7 @@ class Wy extends dp {
24037
24088
  }
24038
24089
  }
24039
24090
  }
24040
- class f5 {
24091
+ class l5 {
24041
24092
  constructor(t, r, n) {
24042
24093
  this.callData = new Rf(By), this.account = t, this.starknetProvider = new pp({
24043
24094
  nodeUrl: r || (n ? ro[n].nodeUrl : ro.mainnet.nodeUrl)
@@ -24062,7 +24113,7 @@ class f5 {
24062
24113
  throw new Error("Token address retrieval failed");
24063
24114
  const i = hp.toHex(n), s = _i.uint256(BigInt(t.source_swap.amount));
24064
24115
  try {
24065
- const a = await lx(
24116
+ const a = await hx(
24066
24117
  this.account,
24067
24118
  i,
24068
24119
  t.source_swap.asset,
@@ -24134,7 +24185,7 @@ class f5 {
24134
24185
  }
24135
24186
  }
24136
24187
  }
24137
- class d5 {
24188
+ class p5 {
24138
24189
  /**
24139
24190
  * Creates a new instance of SolanaHTLC.
24140
24191
  * @param {AnchorProvider} provider - Solana Provider (abstraction of RPC connection and a Wallet)
@@ -24254,52 +24305,52 @@ class d5 {
24254
24305
  export {
24255
24306
  Rd as A,
24256
24307
  D as B,
24257
- o5 as C,
24308
+ c5 as C,
24258
24309
  Dr as D,
24259
- dx as E,
24310
+ px as E,
24260
24311
  Cd as F,
24261
24312
  Wy as G,
24262
24313
  Si as H,
24263
24314
  ky as I,
24264
- cx as J,
24265
- ox as K,
24266
- ax as L,
24267
- sx as M,
24268
- vt as N,
24315
+ fx as J,
24316
+ cx as K,
24317
+ ux as L,
24318
+ ax as M,
24319
+ Et as N,
24269
24320
  Ee as O,
24270
24321
  X0 as P,
24271
24322
  UA as Q,
24272
- vx as R,
24273
- yx as S,
24323
+ Ax as R,
24324
+ gx as S,
24274
24325
  Cn as T,
24275
24326
  ma as U,
24276
24327
  ro as V,
24277
24328
  Bd as W,
24278
24329
  bE as X,
24279
24330
  A1 as a,
24280
- At as b,
24331
+ xt as b,
24281
24332
  To as c,
24282
24333
  Eb as d,
24283
24334
  Hr as e,
24284
24335
  Zt as f,
24285
24336
  Ou as g,
24286
- f5 as h,
24337
+ l5 as h,
24287
24338
  Ao as i,
24288
- N_ as j,
24289
- d5 as k,
24339
+ $_ as j,
24340
+ p5 as k,
24290
24341
  nf as l,
24291
24342
  $A as m,
24292
24343
  fe as n,
24293
24344
  Ae as o,
24294
- a5 as p,
24345
+ u5 as p,
24295
24346
  Fd as q,
24296
24347
  no as r,
24297
24348
  Ne as s,
24298
24349
  TE as t,
24299
- c5 as u,
24350
+ f5 as u,
24300
24351
  J0 as v,
24301
24352
  oo as w,
24302
- lx as x,
24303
- px as y,
24353
+ hx as x,
24354
+ yx as y,
24304
24355
  Ys as z
24305
24356
  };