@gardenfi/core 2.1.8-beta.1 → 2.1.8-beta.2

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.
@@ -654,8 +654,8 @@ function Lr(e, t) {
654
654
  let c, f = {};
655
655
  if (n) {
656
656
  c = "tuple";
657
- const p = mt(i.type), g = [], w = p.length;
658
- for (let x = 0; x < w; x++)
657
+ const p = mt(i.type), g = [], _ = p.length;
658
+ for (let x = 0; x < _; x++)
659
659
  g.push(Lr(p[x], { structs: a }));
660
660
  f = { components: g };
661
661
  } else if (i.type in a)
@@ -731,10 +731,10 @@ function a0(e) {
731
731
  const g = f[y].trim();
732
732
  if (!g)
733
733
  continue;
734
- const w = Lr(g, {
734
+ const _ = Lr(g, {
735
735
  type: "struct"
736
736
  });
737
- l.push(w);
737
+ l.push(_);
738
738
  }
739
739
  if (!l.length)
740
740
  throw new qh({ signature: a });
@@ -2280,10 +2280,10 @@ function Sp(e, t, { length: r, staticPosition: n }) {
2280
2280
  const y = [];
2281
2281
  for (let p = 0; p < f; ++p) {
2282
2282
  e.setPosition(c + (l ? p * 32 : h));
2283
- const [g, w] = an(e, t, {
2283
+ const [g, _] = an(e, t, {
2284
2284
  staticPosition: c
2285
2285
  });
2286
- h += w, y.push(g);
2286
+ h += _, y.push(g);
2287
2287
  }
2288
2288
  return e.setPosition(n + 32), [y, 32];
2289
2289
  }
@@ -2531,7 +2531,7 @@ class Gp extends N {
2531
2531
  constructor(t, { account: r, docsPath: n, chain: i, data: s, gas: o, gasPrice: a, maxFeePerGas: c, maxPriorityFeePerGas: f, nonce: l, to: h, value: y, stateOverride: p }) {
2532
2532
  var x;
2533
2533
  const g = r ? Le(r) : void 0;
2534
- let w = Ci({
2534
+ let _ = Ci({
2535
2535
  from: g == null ? void 0 : g.address,
2536
2536
  to: h,
2537
2537
  value: typeof y < "u" && `${Xa(y)} ${((x = i == null ? void 0 : i.nativeCurrency) == null ? void 0 : x.symbol) || "ETH"}`,
@@ -2542,14 +2542,14 @@ class Gp extends N {
2542
2542
  maxPriorityFeePerGas: typeof f < "u" && `${et(f)} gwei`,
2543
2543
  nonce: l
2544
2544
  });
2545
- p && (w += `
2545
+ p && (_ += `
2546
2546
  ${Up(p)}`), super(t.shortMessage, {
2547
2547
  cause: t,
2548
2548
  docsPath: n,
2549
2549
  metaMessages: [
2550
2550
  ...t.metaMessages ? [...t.metaMessages, " "] : [],
2551
2551
  "Raw Call Arguments:",
2552
- w
2552
+ _
2553
2553
  ].filter(Boolean),
2554
2554
  name: "CallExecutionError"
2555
2555
  }), Object.defineProperty(this, "cause", {
@@ -3231,7 +3231,7 @@ function Jp(e) {
3231
3231
  return Ii(`0x${t}`);
3232
3232
  }
3233
3233
  async function Qp({ hash: e, signature: t }) {
3234
- const r = yr(e) ? e : X(e), { secp256k1: n } = await import("./secp256k1-BWM_UyLx.js");
3234
+ const r = yr(e) ? e : X(e), { secp256k1: n } = await import("./secp256k1-B0Im43i_.js");
3235
3235
  return `0x${(() => {
3236
3236
  if (typeof t == "object" && "r" in t && "s" in t) {
3237
3237
  const { r: f, s: l, v: h, yParity: y } = t, p = Number(y ?? h), g = tu(p);
@@ -3808,12 +3808,12 @@ async function py(e, t) {
3808
3808
  async function nu(e, t) {
3809
3809
  var y, p;
3810
3810
  const { block: r, chain: n = e.chain, request: i, type: s = "eip1559" } = t || {}, o = await (async () => {
3811
- var g, w;
3811
+ var g, _;
3812
3812
  return typeof ((g = n == null ? void 0 : n.fees) == null ? void 0 : g.baseFeeMultiplier) == "function" ? n.fees.baseFeeMultiplier({
3813
3813
  block: r,
3814
3814
  client: e,
3815
3815
  request: i
3816
- }) : ((w = n == null ? void 0 : n.fees) == null ? void 0 : w.baseFeeMultiplier) ?? 1.2;
3816
+ }) : ((_ = n == null ? void 0 : n.fees) == null ? void 0 : _.baseFeeMultiplier) ?? 1.2;
3817
3817
  })();
3818
3818
  if (o < 1)
3819
3819
  throw new cy();
@@ -3836,9 +3836,9 @@ async function nu(e, t) {
3836
3836
  block: l,
3837
3837
  chain: n,
3838
3838
  request: i
3839
- }), w = f(l.baseFeePerGas);
3839
+ }), _ = f(l.baseFeePerGas);
3840
3840
  return {
3841
- maxFeePerGas: (i == null ? void 0 : i.maxFeePerGas) ?? w + g,
3841
+ maxFeePerGas: (i == null ? void 0 : i.maxFeePerGas) ?? _ + g,
3842
3842
  maxPriorityFeePerGas: g
3843
3843
  };
3844
3844
  }
@@ -4020,13 +4020,13 @@ let _y = class extends gy {
4020
4020
  for (let h = 0; h < 16; h++, r += 4)
4021
4021
  rr[h] = t.getUint32(r, !1);
4022
4022
  for (let h = 16; h < 64; h++) {
4023
- const y = rr[h - 15], p = rr[h - 2], g = wt(y, 7) ^ wt(y, 18) ^ y >>> 3, w = wt(p, 17) ^ wt(p, 19) ^ p >>> 10;
4024
- rr[h] = w + rr[h - 7] + g + rr[h - 16] | 0;
4023
+ const y = rr[h - 15], p = rr[h - 2], g = wt(y, 7) ^ wt(y, 18) ^ y >>> 3, _ = wt(p, 17) ^ wt(p, 19) ^ p >>> 10;
4024
+ rr[h] = _ + rr[h - 7] + g + rr[h - 16] | 0;
4025
4025
  }
4026
4026
  let { A: n, B: i, C: s, D: o, E: a, F: c, G: f, H: l } = this;
4027
4027
  for (let h = 0; h < 64; h++) {
4028
- const y = wt(a, 6) ^ wt(a, 11) ^ wt(a, 25), p = l + y + my(a, c, f) + wy[h] + rr[h] | 0, w = (wt(n, 2) ^ wt(n, 13) ^ wt(n, 22)) + by(n, i, s) | 0;
4029
- l = f, f = c, c = a, a = o + p | 0, o = s, s = i, i = n, n = p + w | 0;
4028
+ const y = wt(a, 6) ^ wt(a, 11) ^ wt(a, 25), p = l + y + my(a, c, f) + wy[h] + rr[h] | 0, _ = (wt(n, 2) ^ wt(n, 13) ^ wt(n, 22)) + by(n, i, s) | 0;
4029
+ l = f, f = c, c = a, a = o + p | 0, o = s, s = i, i = n, n = p + _ | 0;
4030
4030
  }
4031
4031
  n = n + this.A | 0, i = i + this.B | 0, s = s + this.C | 0, o = o + this.D | 0, a = a + this.E | 0, c = c + this.F | 0, f = f + this.G | 0, l = l + this.H | 0, this.set(n, i, s, o, a, c, f, l);
4032
4032
  }
@@ -4160,9 +4160,9 @@ async function ac(e, t) {
4160
4160
  async function g() {
4161
4161
  return p || (p = await se(e, As, "getBlock")({ blockTag: "latest" }), p);
4162
4162
  }
4163
- let w;
4163
+ let _;
4164
4164
  async function x() {
4165
- return w || (i ? i.id : typeof t.chainId < "u" ? t.chainId : (w = await se(e, Ri, "getChainId")({}), w));
4165
+ return _ || (i ? i.id : typeof t.chainId < "u" ? t.chainId : (_ = await se(e, Ri, "getChainId")({}), _));
4166
4166
  }
4167
4167
  if (f.includes("nonce") && typeof a > "u" && h)
4168
4168
  if (c) {
@@ -4257,7 +4257,7 @@ async function xd(e, t) {
4257
4257
  params: Pe ? [be, le ?? "latest", Pe] : le ? [be, le] : [be]
4258
4258
  });
4259
4259
  };
4260
- const { accessList: a, authorizationList: c, blobs: f, blobVersionedHashes: l, blockNumber: h, blockTag: y, data: p, gas: g, gasPrice: w, maxFeePerBlobGas: x, maxFeePerGas: k, maxPriorityFeePerGas: T, nonce: A, value: E, stateOverride: I, ...S } = await ac(e, {
4260
+ const { accessList: a, authorizationList: c, blobs: f, blobVersionedHashes: l, blockNumber: h, blockTag: y, data: p, gas: g, gasPrice: _, maxFeePerBlobGas: x, maxFeePerGas: k, maxPriorityFeePerGas: T, nonce: A, value: E, stateOverride: I, ...S } = await ac(e, {
4261
4261
  ...t,
4262
4262
  parameters: (
4263
4263
  // Some RPC Providers do not compute versioned hashes from blobs. We will need
@@ -4285,7 +4285,7 @@ async function xd(e, t) {
4285
4285
  blobVersionedHashes: l,
4286
4286
  data: p,
4287
4287
  gas: g,
4288
- gasPrice: w,
4288
+ gasPrice: _,
4289
4289
  maxFeePerBlobGas: x,
4290
4290
  maxFeePerGas: k,
4291
4291
  maxPriorityFeePerGas: T,
@@ -4356,40 +4356,40 @@ function Sd(e) {
4356
4356
  const { abi: t, data: r, strict: n, topics: i } = e, s = n ?? !0, [o, ...a] = i;
4357
4357
  if (!o)
4358
4358
  throw new p0({ docsPath: au });
4359
- const c = t.length === 1 ? t[0] : t.find((w) => w.type === "event" && o === Ns(Gt(w)));
4359
+ const c = t.length === 1 ? t[0] : t.find((_) => _.type === "event" && o === Ns(Gt(_)));
4360
4360
  if (!(c && "name" in c) || c.type !== "event")
4361
4361
  throw new Mf(o, { docsPath: au });
4362
- const { name: f, inputs: l } = c, h = l == null ? void 0 : l.some((w) => !("name" in w && w.name));
4362
+ const { name: f, inputs: l } = c, h = l == null ? void 0 : l.some((_) => !("name" in _ && _.name));
4363
4363
  let y = h ? [] : {};
4364
- const p = l.filter((w) => "indexed" in w && w.indexed);
4365
- for (let w = 0; w < p.length; w++) {
4366
- const x = p[w], k = a[w];
4364
+ const p = l.filter((_) => "indexed" in _ && _.indexed);
4365
+ for (let _ = 0; _ < p.length; _++) {
4366
+ const x = p[_], k = a[_];
4367
4367
  if (!k)
4368
4368
  throw new Ha({
4369
4369
  abiItem: c,
4370
4370
  param: x
4371
4371
  });
4372
- y[h ? w : x.name || w] = Iy({ param: x, value: k });
4372
+ y[h ? _ : x.name || _] = Iy({ param: x, value: k });
4373
4373
  }
4374
- const g = l.filter((w) => !("indexed" in w && w.indexed));
4374
+ const g = l.filter((_) => !("indexed" in _ && _.indexed));
4375
4375
  if (g.length > 0) {
4376
4376
  if (r && r !== "0x")
4377
4377
  try {
4378
- const w = $s(g, r);
4379
- if (w)
4378
+ const _ = $s(g, r);
4379
+ if (_)
4380
4380
  if (h)
4381
- y = [...y, ...w];
4381
+ y = [...y, ..._];
4382
4382
  else
4383
4383
  for (let x = 0; x < g.length; x++)
4384
- y[g[x].name] = w[x];
4385
- } catch (w) {
4384
+ y[g[x].name] = _[x];
4385
+ } catch (_) {
4386
4386
  if (s)
4387
- throw w instanceof Uf || w instanceof nd ? new vs({
4387
+ throw _ instanceof Uf || _ instanceof nd ? new vs({
4388
4388
  abiItem: c,
4389
4389
  data: r,
4390
4390
  params: g,
4391
4391
  size: ke(r)
4392
- }) : w;
4392
+ }) : _;
4393
4393
  }
4394
4394
  else if (s)
4395
4395
  throw new vs({
@@ -4480,9 +4480,9 @@ function Ai(e, { args: t, eventName: r } = {}) {
4480
4480
  async function Cy(e, { address: t, blockHash: r, fromBlock: n, toBlock: i, event: s, events: o, args: a, strict: c } = {}) {
4481
4481
  const f = c ?? !1, l = o ?? (s ? [s] : void 0);
4482
4482
  let h = [];
4483
- l && (h = [l.flatMap((w) => Ka({
4484
- abi: [w],
4485
- eventName: w.name,
4483
+ l && (h = [l.flatMap((_) => Ka({
4484
+ abi: [_],
4485
+ eventName: _.name,
4486
4486
  args: o ? void 0 : a
4487
4487
  }))], s && (h = h[0]));
4488
4488
  let y;
@@ -4764,7 +4764,7 @@ function Bd({ fn: e, id: t, shouldSplitBatch: r, wait: n = 0, sort: i }) {
4764
4764
  }
4765
4765
  async function Cd(e, t) {
4766
4766
  var R, D, j, q;
4767
- const { account: r = e.account, batch: n = !!((R = e.batch) != null && R.multicall), blockNumber: i, blockTag: s = "latest", accessList: o, blobs: a, code: c, data: f, factory: l, factoryData: h, gas: y, gasPrice: p, maxFeePerBlobGas: g, maxFeePerGas: w, maxPriorityFeePerGas: x, nonce: k, to: T, value: A, stateOverride: E, ...I } = t, S = r ? Le(r) : void 0;
4767
+ const { account: r = e.account, batch: n = !!((R = e.batch) != null && R.multicall), blockNumber: i, blockTag: s = "latest", accessList: o, blobs: a, code: c, data: f, factory: l, factoryData: h, gas: y, gasPrice: p, maxFeePerBlobGas: g, maxFeePerGas: _, maxPriorityFeePerGas: x, nonce: k, to: T, value: A, stateOverride: E, ...I } = t, S = r ? Le(r) : void 0;
4768
4768
  if (c && (l || h))
4769
4769
  throw new N("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
4770
4770
  if (c && T)
@@ -4790,7 +4790,7 @@ async function Cd(e, t) {
4790
4790
  gas: y,
4791
4791
  gasPrice: p,
4792
4792
  maxFeePerBlobGas: g,
4793
- maxFeePerGas: w,
4793
+ maxFeePerGas: _,
4794
4794
  maxPriorityFeePerGas: x,
4795
4795
  nonce: k,
4796
4796
  to: B ? void 0 : T,
@@ -4817,7 +4817,7 @@ async function Cd(e, t) {
4817
4817
  });
4818
4818
  return ue === "0x" ? { data: void 0 } : { data: ue };
4819
4819
  } catch (Y) {
4820
- const re = Gy(Y), { offchainLookup: le, offchainLookupSignature: be } = await import("./ccip-DJqhMnPV.js");
4820
+ const re = Gy(Y), { offchainLookup: le, offchainLookupSignature: be } = await import("./ccip-CvAn6Vlq.js");
4821
4821
  if (e.ccipRead !== !1 && (re == null ? void 0 : re.slice(0, 10)) === be && T)
4822
4822
  return { data: await le(e, { data: re, to: T }) };
4823
4823
  throw B && (re == null ? void 0 : re.slice(0, 10)) === "0x101bb98d" ? new Wp({ factory: l }) : My(Y, {
@@ -4832,8 +4832,8 @@ function $y({ request: e }) {
4832
4832
  return !(!t || t.startsWith(Oy) || !r || Object.values(n).filter((i) => typeof i < "u").length > 0);
4833
4833
  }
4834
4834
  async function Hy(e, t) {
4835
- var w;
4836
- const { batchSize: r = 1024, wait: n = 0 } = typeof ((w = e.batch) == null ? void 0 : w.multicall) == "object" ? e.batch.multicall : {}, { blockNumber: i, blockTag: s = "latest", data: o, multicallAddress: a, to: c } = t;
4835
+ var _;
4836
+ const { batchSize: r = 1024, wait: n = 0 } = typeof ((_ = e.batch) == null ? void 0 : _.multicall) == "object" ? e.batch.multicall : {}, { blockNumber: i, blockTag: s = "latest", data: o, multicallAddress: a, to: c } = t;
4837
4837
  let f = a;
4838
4838
  if (!f) {
4839
4839
  if (!e.chain)
@@ -4994,8 +4994,8 @@ function va(e, t, r) {
4994
4994
  var p, g;
4995
4995
  const y = i();
4996
4996
  if (y.length !== 0)
4997
- for (const w of y)
4998
- (g = (p = w.fns)[l]) == null || g.call(p, ...h);
4997
+ for (const _ of y)
4998
+ (g = (p = _.fns)[l]) == null || g.call(p, ...h);
4999
4999
  };
5000
5000
  const f = r(c);
5001
5001
  return typeof f == "function" && uu.set(e, f), o;
@@ -5256,7 +5256,7 @@ async function Fd(e, { serializedTransaction: t }) {
5256
5256
  const To = new Ms(128);
5257
5257
  async function fc(e, t) {
5258
5258
  var k, T, A, E;
5259
- const { account: r = e.account, chain: n = e.chain, accessList: i, authorizationList: s, blobs: o, data: a, gas: c, gasPrice: f, maxFeePerBlobGas: l, maxFeePerGas: h, maxPriorityFeePerGas: y, nonce: p, value: g, ...w } = t;
5259
+ const { account: r = e.account, chain: n = e.chain, accessList: i, authorizationList: s, blobs: o, data: a, gas: c, gasPrice: f, maxFeePerBlobGas: l, maxFeePerGas: h, maxPriorityFeePerGas: y, nonce: p, value: g, ..._ } = t;
5260
5260
  if (typeof r > "u")
5261
5261
  throw new wr({
5262
5262
  docsPath: "/docs/actions/wallet/sendTransaction"
@@ -5282,7 +5282,7 @@ async function fc(e, t) {
5282
5282
  }));
5283
5283
  const U = (A = (T = (k = e.chain) == null ? void 0 : k.formatters) == null ? void 0 : T.transactionRequest) == null ? void 0 : A.format, B = (U || js)({
5284
5284
  // Pick out extra data that might exist on the chain's transaction request type.
5285
- ...ec(w, { format: U }),
5285
+ ...ec(_, { format: U }),
5286
5286
  accessList: i,
5287
5287
  authorizationList: s,
5288
5288
  blobs: o,
@@ -5335,7 +5335,7 @@ async function fc(e, t) {
5335
5335
  nonceManager: x.nonceManager,
5336
5336
  parameters: [...Ed, "sidecars"],
5337
5337
  value: g,
5338
- ...w,
5338
+ ..._,
5339
5339
  to: I
5340
5340
  }), U = (E = n == null ? void 0 : n.serializers) == null ? void 0 : E.transaction, $ = await x.signTransaction(S, {
5341
5341
  serializer: U
@@ -5400,12 +5400,12 @@ function ko({ abi: e, address: t, client: r }) {
5400
5400
  return o && (f && (c.read = new Proxy({}, {
5401
5401
  get(y, p) {
5402
5402
  return (...g) => {
5403
- const { args: w, options: x } = Wi(g);
5403
+ const { args: _, options: x } = Wi(g);
5404
5404
  return se(i, zy, "readContract")({
5405
5405
  abi: e,
5406
5406
  address: t,
5407
5407
  functionName: p,
5408
- args: w,
5408
+ args: _,
5409
5409
  ...x
5410
5410
  });
5411
5411
  };
@@ -5413,12 +5413,12 @@ function ko({ abi: e, address: t, client: r }) {
5413
5413
  })), l && (c.simulate = new Proxy({}, {
5414
5414
  get(y, p) {
5415
5415
  return (...g) => {
5416
- const { args: w, options: x } = Wi(g);
5416
+ const { args: _, options: x } = Wi(g);
5417
5417
  return se(i, qy, "simulateContract")({
5418
5418
  abi: e,
5419
5419
  address: t,
5420
5420
  functionName: p,
5421
- args: w,
5421
+ args: _,
5422
5422
  ...x
5423
5423
  });
5424
5424
  };
@@ -5426,7 +5426,7 @@ function ko({ abi: e, address: t, client: r }) {
5426
5426
  })), h && (c.createEventFilter = new Proxy({}, {
5427
5427
  get(y, p) {
5428
5428
  return (...g) => {
5429
- const w = e.find((T) => T.type === "event" && T.name === p), { args: x, options: k } = Io(g, w);
5429
+ const _ = e.find((T) => T.type === "event" && T.name === p), { args: x, options: k } = Io(g, _);
5430
5430
  return se(i, rd, "createContractEventFilter")({
5431
5431
  abi: e,
5432
5432
  address: t,
@@ -5439,7 +5439,7 @@ function ko({ abi: e, address: t, client: r }) {
5439
5439
  }), c.getEvents = new Proxy({}, {
5440
5440
  get(y, p) {
5441
5441
  return (...g) => {
5442
- const w = e.find((T) => T.type === "event" && T.name === p), { args: x, options: k } = Io(g, w);
5442
+ const _ = e.find((T) => T.type === "event" && T.name === p), { args: x, options: k } = Io(g, _);
5443
5443
  return se(i, Td, "getContractEvents")({
5444
5444
  abi: e,
5445
5445
  address: t,
@@ -5452,7 +5452,7 @@ function ko({ abi: e, address: t, client: r }) {
5452
5452
  }), c.watchEvent = new Proxy({}, {
5453
5453
  get(y, p) {
5454
5454
  return (...g) => {
5455
- const w = e.find((T) => T.type === "event" && T.name === p), { args: x, options: k } = Io(g, w);
5455
+ const _ = e.find((T) => T.type === "event" && T.name === p), { args: x, options: k } = Io(g, _);
5456
5456
  return se(i, tm, "watchContractEvent")({
5457
5457
  abi: e,
5458
5458
  address: t,
@@ -5465,12 +5465,12 @@ function ko({ abi: e, address: t, client: r }) {
5465
5465
  }))), a && l && (c.write = new Proxy({}, {
5466
5466
  get(y, p) {
5467
5467
  return (...g) => {
5468
- const { args: w, options: x } = Wi(g);
5468
+ const { args: _, options: x } = Wi(g);
5469
5469
  return se(s, Ud, "writeContract")({
5470
5470
  abi: e,
5471
5471
  address: t,
5472
5472
  functionName: p,
5473
- args: w,
5473
+ args: _,
5474
5474
  ...x
5475
5475
  });
5476
5476
  };
@@ -5478,12 +5478,12 @@ function ko({ abi: e, address: t, client: r }) {
5478
5478
  })), (o || a) && l && (c.estimateGas = new Proxy({}, {
5479
5479
  get(y, p) {
5480
5480
  return (...g) => {
5481
- const { args: w, options: x } = Wi(g);
5481
+ const { args: _, options: x } = Wi(g);
5482
5482
  return se(i ?? s, ky, "estimateContractGas")({
5483
5483
  abi: e,
5484
5484
  address: t,
5485
5485
  functionName: p,
5486
- args: w,
5486
+ args: _,
5487
5487
  ...x,
5488
5488
  account: x.account ?? s.account
5489
5489
  });
@@ -5551,16 +5551,16 @@ async function im(e, t) {
5551
5551
  let l;
5552
5552
  const h = va(o, { resolve: c, reject: f }, (y) => {
5553
5553
  const p = Od(async () => {
5554
- const g = (w) => {
5555
- clearTimeout(l), p(), w(), h();
5554
+ const g = (_) => {
5555
+ clearTimeout(l), p(), _(), h();
5556
5556
  };
5557
5557
  try {
5558
- const w = await Md(e, { id: r });
5559
- if (!i(w))
5558
+ const _ = await Md(e, { id: r });
5559
+ if (!i(_))
5560
5560
  return;
5561
- g(() => y.resolve(w));
5562
- } catch (w) {
5563
- g(() => y.reject(w));
5561
+ g(() => y.resolve(_));
5562
+ } catch (_) {
5563
+ g(() => y.reject(_));
5564
5564
  }
5565
5565
  }, {
5566
5566
  interval: n,
@@ -5605,16 +5605,16 @@ function om(e) {
5605
5605
  type: a,
5606
5606
  uid: $d()
5607
5607
  };
5608
- function w(x) {
5608
+ function _(x) {
5609
5609
  return (k) => {
5610
5610
  const T = k(x);
5611
5611
  for (const E in g)
5612
5612
  delete T[E];
5613
5613
  const A = { ...x, ...T };
5614
- return Object.assign(A, { extend: w(A) });
5614
+ return Object.assign(A, { extend: _(A) });
5615
5615
  };
5616
5616
  }
5617
- return Object.assign(g, { extend: w(g) });
5617
+ return Object.assign(g, { extend: _(g) });
5618
5618
  }
5619
5619
  const Xi = /* @__PURE__ */ new Ms(8192);
5620
5620
  function am(e, { enabled: t = !0, id: r }) {
@@ -5728,9 +5728,9 @@ function um(e, t = {}) {
5728
5728
  delay: ({ count: y, error: p }) => {
5729
5729
  var g;
5730
5730
  if (p && p instanceof Jn) {
5731
- const w = (g = p == null ? void 0 : p.headers) == null ? void 0 : g.get("Retry-After");
5732
- if (w != null && w.match(/\d/))
5733
- return Number.parseInt(w) * 1e3;
5731
+ const _ = (g = p == null ? void 0 : p.headers) == null ? void 0 : g.get("Retry-After");
5732
+ if (_ != null && _.match(/\d/))
5733
+ return Number.parseInt(_) * 1e3;
5734
5734
  }
5735
5735
  return ~~(1 << y) * o;
5736
5736
  },
@@ -5818,7 +5818,7 @@ function pm(e, t = {}) {
5818
5818
  }, { headers: c, method: f, signal: l } = a;
5819
5819
  try {
5820
5820
  const y = await lm(async ({ signal: g }) => {
5821
- const w = {
5821
+ const _ = {
5822
5822
  ...a,
5823
5823
  body: Array.isArray(n) ? it(n.map((A) => ({
5824
5824
  jsonrpc: "2.0",
@@ -5835,7 +5835,7 @@ function pm(e, t = {}) {
5835
5835
  },
5836
5836
  method: f || "POST",
5837
5837
  signal: l || (o > 0 ? g : null)
5838
- }, x = new Request(e, w), k = await (i == null ? void 0 : i(x, w)) ?? { ...w, url: e };
5838
+ }, x = new Request(e, _), k = await (i == null ? void 0 : i(x, _)) ?? { ..._, url: e };
5839
5839
  return await fetch(k.url ?? e, k);
5840
5840
  }, {
5841
5841
  errorInstance: new eu({ body: n, url: e }),
@@ -5878,7 +5878,7 @@ function pm(e, t = {}) {
5878
5878
  function ym(e, t = {}) {
5879
5879
  const { batch: r, fetchOptions: n, key: i = "http", methods: s, name: o = "HTTP JSON-RPC", onFetchRequest: a, onFetchResponse: c, retryDelay: f, raw: l } = t;
5880
5880
  return ({ chain: h, retryCount: y, timeout: p }) => {
5881
- const { batchSize: g = 1e3, wait: w = 0 } = typeof r == "object" ? r : {}, x = t.retryCount ?? y, k = p ?? t.timeout ?? 1e4, T = h == null ? void 0 : h.rpcUrls.default.http[0];
5881
+ const { batchSize: g = 1e3, wait: _ = 0 } = typeof r == "object" ? r : {}, x = t.retryCount ?? y, k = p ?? t.timeout ?? 1e4, T = h == null ? void 0 : h.rpcUrls.default.http[0];
5882
5882
  if (!T)
5883
5883
  throw new dm();
5884
5884
  const A = pm(T, {
@@ -5894,7 +5894,7 @@ function ym(e, t = {}) {
5894
5894
  async request({ method: E, params: I }) {
5895
5895
  const S = { method: E, params: I }, { schedule: U } = Bd({
5896
5896
  id: T,
5897
- wait: w,
5897
+ wait: _,
5898
5898
  shouldSplitBatch(R) {
5899
5899
  return R.length > g;
5900
5900
  },
@@ -5977,7 +5977,7 @@ function _m(e) {
5977
5977
  for (const c of o) {
5978
5978
  const { name: f, type: l } = c, h = a[f], y = l.match(ed);
5979
5979
  if (y && (typeof h == "number" || typeof h == "bigint")) {
5980
- const [w, x, k] = y;
5980
+ const [_, x, k] = y;
5981
5981
  J(h, {
5982
5982
  signed: x === "int",
5983
5983
  size: Number.parseInt(k) / 8
@@ -5987,7 +5987,7 @@ function _m(e) {
5987
5987
  throw new Qe({ address: h });
5988
5988
  const p = l.match(sp);
5989
5989
  if (p) {
5990
- const [w, x] = p;
5990
+ const [_, x] = p;
5991
5991
  if (x && ke(h) !== Number.parseInt(x))
5992
5992
  throw new b0({
5993
5993
  expectedSize: Number.parseInt(x),
@@ -6147,7 +6147,7 @@ function Im(e, t) {
6147
6147
  p = _d({ blobs: A, commitments: I, proofs: S });
6148
6148
  }
6149
6149
  }
6150
- const g = qs(l), w = [
6150
+ const g = qs(l), _ = [
6151
6151
  X(r),
6152
6152
  i ? X(i) : "0x",
6153
6153
  f ? X(f) : "0x",
@@ -6169,7 +6169,7 @@ function Im(e, t) {
6169
6169
  return Xt([
6170
6170
  "0x03",
6171
6171
  // If sidecars are enabled, envelope turns into a "wrapper":
6172
- mr(p ? [w, x, k, T] : w)
6172
+ mr(p ? [_, x, k, T] : _)
6173
6173
  ]);
6174
6174
  }
6175
6175
  function Bm(e, t) {
@@ -6339,7 +6339,7 @@ Vs.crypto = void 0;
6339
6339
  Vs.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
6340
6340
  (function(e) {
6341
6341
  /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
6342
- Object.defineProperty(e, "__esModule", { value: !0 }), e.Hash = e.nextTick = e.byteSwapIfBE = e.isLE = void 0, e.isBytes = n, e.u8 = i, e.u32 = s, e.createView = o, e.rotr = a, e.rotl = c, e.byteSwap = f, e.byteSwap32 = l, e.bytesToHex = y, e.hexToBytes = w, e.asyncLoop = k, e.utf8ToBytes = T, e.toBytes = A, e.concatBytes = E, e.checkOpts = S, e.wrapConstructor = U, e.wrapConstructorWithOpts = $, e.wrapXOFConstructorWithOpts = B, e.randomBytes = V;
6342
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.Hash = e.nextTick = e.byteSwapIfBE = e.isLE = void 0, e.isBytes = n, e.u8 = i, e.u32 = s, e.createView = o, e.rotr = a, e.rotl = c, e.byteSwap = f, e.byteSwap32 = l, e.bytesToHex = y, e.hexToBytes = _, e.asyncLoop = k, e.utf8ToBytes = T, e.toBytes = A, e.concatBytes = E, e.checkOpts = S, e.wrapConstructor = U, e.wrapConstructorWithOpts = $, e.wrapXOFConstructorWithOpts = B, e.randomBytes = V;
6343
6343
  const t = Vs, r = _r;
6344
6344
  function n(R) {
6345
6345
  return R instanceof Uint8Array || ArrayBuffer.isView(R) && R.constructor.name === "Uint8Array";
@@ -6385,7 +6385,7 @@ Vs.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis
6385
6385
  if (R >= p.a && R <= p.f)
6386
6386
  return R - (p.a - 10);
6387
6387
  }
6388
- function w(R) {
6388
+ function _(R) {
6389
6389
  if (typeof R != "string")
6390
6390
  throw new Error("hex string expected, got " + typeof R);
6391
6391
  const D = R.length, j = D / 2;
@@ -6581,9 +6581,9 @@ let qd = class extends Gm.HashMD {
6581
6581
  Ji[p] = t.getUint32(r, !0);
6582
6582
  let n = this.h0 | 0, i = n, s = this.h1 | 0, o = s, a = this.h2 | 0, c = a, f = this.h3 | 0, l = f, h = this.h4 | 0, y = h;
6583
6583
  for (let p = 0; p < 5; p++) {
6584
- const g = 4 - p, w = Km[p], x = Ym[p], k = lc[p], T = hc[p], A = Vm[p], E = Wm[p];
6584
+ const g = 4 - p, _ = Km[p], x = Ym[p], k = lc[p], T = hc[p], A = Vm[p], E = Wm[p];
6585
6585
  for (let I = 0; I < 16; I++) {
6586
- const S = (0, Wn.rotl)(n + lu(p, s, a, f) + Ji[k[I]] + w, A[I]) + h | 0;
6586
+ const S = (0, Wn.rotl)(n + lu(p, s, a, f) + Ji[k[I]] + _, A[I]) + h | 0;
6587
6587
  n = h, h = f, f = (0, Wn.rotl)(a, 10) | 0, a = s, s = S;
6588
6588
  }
6589
6589
  for (let I = 0; I < 16; I++) {
@@ -6696,13 +6696,13 @@ class pc extends Co.HashMD {
6696
6696
  for (let h = 0; h < 16; h++, r += 4)
6697
6697
  ir[h] = t.getUint32(r, !1);
6698
6698
  for (let h = 16; h < 64; h++) {
6699
- const y = ir[h - 15], p = ir[h - 2], g = (0, ft.rotr)(y, 7) ^ (0, ft.rotr)(y, 18) ^ y >>> 3, w = (0, ft.rotr)(p, 17) ^ (0, ft.rotr)(p, 19) ^ p >>> 10;
6700
- ir[h] = w + ir[h - 7] + g + ir[h - 16] | 0;
6699
+ const y = ir[h - 15], p = ir[h - 2], g = (0, ft.rotr)(y, 7) ^ (0, ft.rotr)(y, 18) ^ y >>> 3, _ = (0, ft.rotr)(p, 17) ^ (0, ft.rotr)(p, 19) ^ p >>> 10;
6700
+ ir[h] = _ + ir[h - 7] + g + ir[h - 16] | 0;
6701
6701
  }
6702
6702
  let { A: n, B: i, C: s, D: o, E: a, F: c, G: f, H: l } = this;
6703
6703
  for (let h = 0; h < 64; h++) {
6704
- const y = (0, ft.rotr)(a, 6) ^ (0, ft.rotr)(a, 11) ^ (0, ft.rotr)(a, 25), p = l + y + (0, Co.Chi)(a, c, f) + Xm[h] + ir[h] | 0, w = ((0, ft.rotr)(n, 2) ^ (0, ft.rotr)(n, 13) ^ (0, ft.rotr)(n, 22)) + (0, Co.Maj)(n, i, s) | 0;
6705
- l = f, f = c, c = a, a = o + p | 0, o = s, s = i, i = n, n = p + w | 0;
6704
+ const y = (0, ft.rotr)(a, 6) ^ (0, ft.rotr)(a, 11) ^ (0, ft.rotr)(a, 25), p = l + y + (0, Co.Chi)(a, c, f) + Xm[h] + ir[h] | 0, _ = ((0, ft.rotr)(n, 2) ^ (0, ft.rotr)(n, 13) ^ (0, ft.rotr)(n, 22)) + (0, Co.Maj)(n, i, s) | 0;
6705
+ l = f, f = c, c = a, a = o + p | 0, o = s, s = i, i = n, n = p + _ | 0;
6706
6706
  }
6707
6707
  n = n + this.A | 0, i = i + this.B | 0, s = s + this.C | 0, o = o + this.D | 0, a = a + this.E | 0, c = c + this.F | 0, f = f + this.G | 0, l = l + this.H | 0, this.set(n, i, s, o, a, c, f, l);
6708
6708
  }
@@ -7233,12 +7233,12 @@ yc.read = function(e, t, r, n, i) {
7233
7233
  return (p ? -1 : 1) * o * Math.pow(2, s - n);
7234
7234
  };
7235
7235
  yc.write = function(e, t, r, n, i, s) {
7236
- var o, a, c, f = s * 8 - i - 1, l = (1 << f) - 1, h = l >> 1, y = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, p = n ? 0 : s - 1, g = n ? 1 : -1, w = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
7236
+ var o, a, c, f = s * 8 - i - 1, l = (1 << f) - 1, h = l >> 1, y = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, p = n ? 0 : s - 1, g = n ? 1 : -1, _ = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
7237
7237
  for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (a = isNaN(t) ? 1 : 0, o = l) : (o = Math.floor(Math.log(t) / Math.LN2), t * (c = Math.pow(2, -o)) < 1 && (o--, c *= 2), o + h >= 1 ? t += y / c : t += y * Math.pow(2, 1 - h), t * c >= 2 && (o++, c /= 2), o + h >= l ? (a = 0, o = l) : o + h >= 1 ? (a = (t * c - 1) * Math.pow(2, i), o = o + h) : (a = t * Math.pow(2, h - 1) * Math.pow(2, i), o = 0)); i >= 8; e[r + p] = a & 255, p += g, a /= 256, i -= 8)
7238
7238
  ;
7239
7239
  for (o = o << i | a, f += i; f > 0; e[r + p] = o & 255, p += g, o /= 256, f -= 8)
7240
7240
  ;
7241
- e[r + p - g] |= w * 128;
7241
+ e[r + p - g] |= _ * 128;
7242
7242
  };
7243
7243
  /*!
7244
7244
  * The buffer module from node.js, for the browser.
@@ -7303,7 +7303,7 @@ yc.write = function(e, t, r, n, i, s) {
7303
7303
  "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof m
7304
7304
  );
7305
7305
  if (nt(m, ArrayBuffer) || m && nt(m.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (nt(m, SharedArrayBuffer) || m && nt(m.buffer, SharedArrayBuffer)))
7306
- return w(m, u, d);
7306
+ return _(m, u, d);
7307
7307
  if (typeof m == "number")
7308
7308
  throw new TypeError(
7309
7309
  'The "value" argument must not be of type number. Received type number'
@@ -7359,11 +7359,11 @@ yc.write = function(e, t, r, n, i, s) {
7359
7359
  function g(m) {
7360
7360
  if (nt(m, Uint8Array)) {
7361
7361
  const u = new Uint8Array(m);
7362
- return w(u.buffer, u.byteOffset, u.byteLength);
7362
+ return _(u.buffer, u.byteOffset, u.byteLength);
7363
7363
  }
7364
7364
  return p(m);
7365
7365
  }
7366
- function w(m, u, d) {
7366
+ function _(m, u, d) {
7367
7367
  if (u < 0 || m.byteLength < u)
7368
7368
  throw new RangeError('"offset" is outside of buffer bounds');
7369
7369
  if (m.byteLength < u + (d || 0))
@@ -8057,7 +8057,7 @@ yc.write = function(e, t, r, n, i, s) {
8057
8057
  u = `_${m.slice(d - 3, d)}${u}`;
8058
8058
  return `${m.slice(0, d)}${u}`;
8059
8059
  }
8060
- function _(m, u, d) {
8060
+ function w(m, u, d) {
8061
8061
  M(u, "offset"), (m[u] === void 0 || m[u + d] === void 0) && z(u, m.length - (d + 1));
8062
8062
  }
8063
8063
  function v(m, u, d, b, P, L) {
@@ -8066,7 +8066,7 @@ yc.write = function(e, t, r, n, i, s) {
8066
8066
  let te;
8067
8067
  throw u === 0 || u === BigInt(0) ? te = `>= 0${F} and < 2${F} ** ${(L + 1) * 8}${F}` : te = `>= -(2${F} ** ${(L + 1) * 8 - 1}${F}) and < 2 ** ${(L + 1) * 8 - 1}${F}`, new H.ERR_OUT_OF_RANGE("value", te, m);
8068
8068
  }
8069
- _(b, P, L);
8069
+ w(b, P, L);
8070
8070
  }
8071
8071
  function M(m, u) {
8072
8072
  if (typeof m != "number")
@@ -8319,7 +8319,7 @@ function Mb() {
8319
8319
  function g(S) {
8320
8320
  return (S | 0) === S;
8321
8321
  }
8322
- function w(S) {
8322
+ function _(S) {
8323
8323
  return typeof S == "number" && S >= -l && S <= l && Math.floor(S) === S;
8324
8324
  }
8325
8325
  function x(S) {
@@ -8344,7 +8344,7 @@ function Mb() {
8344
8344
  Int8: y,
8345
8345
  Int16: p,
8346
8346
  Int32: g,
8347
- Int53: w,
8347
+ Int53: _,
8348
8348
  Range: f,
8349
8349
  StringN: c,
8350
8350
  UInt8: x,
@@ -9689,7 +9689,7 @@ function at() {
9689
9689
  function g(B) {
9690
9690
  return Buffer.isBuffer(B);
9691
9691
  }
9692
- function w(B) {
9692
+ function _(B) {
9693
9693
  return o.Array(B);
9694
9694
  }
9695
9695
  function x(B) {
@@ -9715,7 +9715,7 @@ function at() {
9715
9715
  }
9716
9716
  e.compile = k;
9717
9717
  function T(B) {
9718
- if (w(B)) return B;
9718
+ if (_(B)) return B;
9719
9719
  a(o.Buffer, B);
9720
9720
  const V = [];
9721
9721
  let R = 0;
@@ -9951,7 +9951,7 @@ class ee {
9951
9951
  ), n.length !== this.ins.length || r.length !== this.ins.length)
9952
9952
  throw new Error("Must supply prevout script and value for all inputs");
9953
9953
  const a = i === ee.SIGHASH_DEFAULT ? ee.SIGHASH_ALL : i & ee.SIGHASH_OUTPUT_MASK, f = (i & ee.SIGHASH_INPUT_MASK) === ee.SIGHASH_ANYONECANPAY, l = a === ee.SIGHASH_NONE, h = a === ee.SIGHASH_SINGLE;
9954
- let y = ur, p = ur, g = ur, w = ur, x = ur;
9954
+ let y = ur, p = ur, g = ur, _ = ur, x = ur;
9955
9955
  if (!f) {
9956
9956
  let E = Ie.BufferWriter.withCapacity(
9957
9957
  36 * this.ins.length
@@ -9966,7 +9966,7 @@ class ee {
9966
9966
  (I) => E.writeVarSlice(I)
9967
9967
  ), g = Ve.sha256(E.end()), E = Ie.BufferWriter.withCapacity(
9968
9968
  4 * this.ins.length
9969
- ), this.ins.forEach((I) => E.writeUInt32(I.sequence)), w = Ve.sha256(E.end());
9969
+ ), this.ins.forEach((I) => E.writeUInt32(I.sequence)), _ = Ve.sha256(E.end());
9970
9970
  }
9971
9971
  if (l || h) {
9972
9972
  if (h && t < this.outs.length) {
@@ -9982,7 +9982,7 @@ class ee {
9982
9982
  }), x = Ve.sha256(I.end());
9983
9983
  }
9984
9984
  const k = (s ? 2 : 0) + (o ? 1 : 0), T = 174 - (f ? 49 : 0) - (l ? 32 : 0) + (o ? 32 : 0) + (s ? 37 : 0), A = Ie.BufferWriter.withCapacity(T);
9985
- if (A.writeUInt8(i), A.writeInt32(this.version), A.writeUInt32(this.locktime), A.writeSlice(y), A.writeSlice(p), A.writeSlice(g), A.writeSlice(w), l || h || A.writeSlice(x), A.writeUInt8(k), f) {
9985
+ if (A.writeUInt8(i), A.writeInt32(this.version), A.writeUInt32(this.locktime), A.writeSlice(y), A.writeSlice(p), A.writeSlice(g), A.writeSlice(_), l || h || A.writeSlice(x), A.writeUInt8(k), f) {
9986
9986
  const E = this.ins[t];
9987
9987
  A.writeSlice(E.hash), A.writeUInt32(E.index), A.writeUInt64(n[t]), A.writeVarSlice(r[t]), A.writeUInt32(E.sequence);
9988
9988
  } else
@@ -10402,16 +10402,16 @@ function lg(e) {
10402
10402
  throw new TypeError("Expected Uint8Array");
10403
10403
  if (p.length === 0)
10404
10404
  return "";
10405
- for (var g = 0, w = 0, x = 0, k = p.length; x !== k && p[x] === 0; )
10405
+ for (var g = 0, _ = 0, x = 0, k = p.length; x !== k && p[x] === 0; )
10406
10406
  x++, g++;
10407
10407
  for (var T = (k - x) * f + 1 >>> 0, A = new Uint8Array(T); x !== k; ) {
10408
- for (var E = p[x], I = 0, S = T - 1; (E !== 0 || I < w) && S !== -1; S--, I++)
10408
+ for (var E = p[x], I = 0, S = T - 1; (E !== 0 || I < _) && S !== -1; S--, I++)
10409
10409
  E += 256 * A[S] >>> 0, A[S] = E % o >>> 0, E = E / o >>> 0;
10410
10410
  if (E !== 0)
10411
10411
  throw new Error("Non-zero carry");
10412
- w = I, x++;
10412
+ _ = I, x++;
10413
10413
  }
10414
- for (var U = T - w; U !== T && A[U] === 0; )
10414
+ for (var U = T - _; U !== T && A[U] === 0; )
10415
10415
  U++;
10416
10416
  for (var $ = a.repeat(g); U < T; ++U)
10417
10417
  $ += e.charAt(A[U]);
@@ -10422,8 +10422,8 @@ function lg(e) {
10422
10422
  throw new TypeError("Expected String");
10423
10423
  if (p.length === 0)
10424
10424
  return new Uint8Array();
10425
- for (var g = 0, w = 0, x = 0; p[g] === a; )
10426
- w++, g++;
10425
+ for (var g = 0, _ = 0, x = 0; p[g] === a; )
10426
+ _++, g++;
10427
10427
  for (var k = (p.length - g) * c + 1 >>> 0, T = new Uint8Array(k); p[g]; ) {
10428
10428
  var A = p.charCodeAt(g);
10429
10429
  if (A > 255)
@@ -10439,7 +10439,7 @@ function lg(e) {
10439
10439
  }
10440
10440
  for (var U = k - x; U !== k && T[U] === 0; )
10441
10441
  U++;
10442
- for (var $ = new Uint8Array(w + (k - U)), B = w; U !== k; )
10442
+ for (var $ = new Uint8Array(_ + (k - U)), B = _; U !== k; )
10443
10443
  $[B++] = T[U++];
10444
10444
  return $;
10445
10445
  }
@@ -10831,11 +10831,11 @@ function ll(e) {
10831
10831
  if (typeof p == "string")
10832
10832
  return p;
10833
10833
  const g = [];
10834
- for (let w = 0; w < y.length; ++w) {
10835
- const x = y.charAt(w), k = dl[x];
10834
+ for (let _ = 0; _ < y.length; ++_) {
10835
+ const x = y.charAt(_), k = dl[x];
10836
10836
  if (k === void 0)
10837
10837
  return "Unknown character " + x;
10838
- p = fn(p) ^ k, !(w + 6 >= y.length) && g.push(k);
10838
+ p = fn(p) ^ k, !(_ + 6 >= y.length) && g.push(k);
10839
10839
  }
10840
10840
  return p !== t ? "Invalid checksum for " + o : { prefix: h, words: g };
10841
10841
  }
@@ -11178,25 +11178,25 @@ var xc = {};
11178
11178
  Object.defineProperty(e, "__esModule", { value: !0 }), e.tweakKey = e.tapTweakHash = e.tapleafHash = e.findScriptPath = e.toHashTree = e.rootHashFromPath = e.MAX_TAPTREE_DEPTH = e.LEAF_VERSION_TAPSCRIPT = void 0;
11179
11179
  const t = Qt, r = $r, n = vr, i = Ne, s = ze;
11180
11180
  e.LEAF_VERSION_TAPSCRIPT = 192, e.MAX_TAPTREE_DEPTH = 128;
11181
- const o = (w) => "left" in w && "right" in w;
11182
- function a(w, x) {
11183
- if (w.length < 33)
11181
+ const o = (_) => "left" in _ && "right" in _;
11182
+ function a(_, x) {
11183
+ if (_.length < 33)
11184
11184
  throw new TypeError(
11185
- `The control-block length is too small. Got ${w.length}, expected min 33.`
11185
+ `The control-block length is too small. Got ${_.length}, expected min 33.`
11186
11186
  );
11187
- const k = (w.length - 33) / 32;
11187
+ const k = (_.length - 33) / 32;
11188
11188
  let T = x;
11189
11189
  for (let A = 0; A < k; A++) {
11190
- const E = w.slice(33 + 32 * A, 65 + 32 * A);
11190
+ const E = _.slice(33 + 32 * A, 65 + 32 * A);
11191
11191
  T.compare(E) < 0 ? T = p(T, E) : T = p(E, T);
11192
11192
  }
11193
11193
  return T;
11194
11194
  }
11195
11195
  e.rootHashFromPath = a;
11196
- function c(w) {
11197
- if ((0, s.isTapleaf)(w))
11198
- return { hash: l(w) };
11199
- const x = [c(w[0]), c(w[1])];
11196
+ function c(_) {
11197
+ if ((0, s.isTapleaf)(_))
11198
+ return { hash: l(_) };
11199
+ const x = [c(_[0]), c(_[1])];
11200
11200
  x.sort((A, E) => A.hash.compare(E.hash));
11201
11201
  const [k, T] = x;
11202
11202
  return {
@@ -11206,49 +11206,49 @@ var xc = {};
11206
11206
  };
11207
11207
  }
11208
11208
  e.toHashTree = c;
11209
- function f(w, x) {
11210
- if (o(w)) {
11211
- const k = f(w.left, x);
11212
- if (k !== void 0) return [...k, w.right.hash];
11213
- const T = f(w.right, x);
11214
- if (T !== void 0) return [...T, w.left.hash];
11215
- } else if (w.hash.equals(x))
11209
+ function f(_, x) {
11210
+ if (o(_)) {
11211
+ const k = f(_.left, x);
11212
+ if (k !== void 0) return [...k, _.right.hash];
11213
+ const T = f(_.right, x);
11214
+ if (T !== void 0) return [...T, _.left.hash];
11215
+ } else if (_.hash.equals(x))
11216
11216
  return [];
11217
11217
  }
11218
11218
  e.findScriptPath = f;
11219
- function l(w) {
11220
- const x = w.version || e.LEAF_VERSION_TAPSCRIPT;
11219
+ function l(_) {
11220
+ const x = _.version || e.LEAF_VERSION_TAPSCRIPT;
11221
11221
  return n.taggedHash(
11222
11222
  "TapLeaf",
11223
11223
  t.Buffer.concat([
11224
11224
  t.Buffer.from([x]),
11225
- g(w.output)
11225
+ g(_.output)
11226
11226
  ])
11227
11227
  );
11228
11228
  }
11229
11229
  e.tapleafHash = l;
11230
- function h(w, x) {
11230
+ function h(_, x) {
11231
11231
  return n.taggedHash(
11232
11232
  "TapTweak",
11233
- t.Buffer.concat(x ? [w, x] : [w])
11233
+ t.Buffer.concat(x ? [_, x] : [_])
11234
11234
  );
11235
11235
  }
11236
11236
  e.tapTweakHash = h;
11237
- function y(w, x) {
11238
- if (!t.Buffer.isBuffer(w) || w.length !== 32 || x && x.length !== 32) return null;
11239
- const k = h(w, x), T = (0, r.getEccLib)().xOnlyPointAddTweak(w, k);
11237
+ function y(_, x) {
11238
+ if (!t.Buffer.isBuffer(_) || _.length !== 32 || x && x.length !== 32) return null;
11239
+ const k = h(_, x), T = (0, r.getEccLib)().xOnlyPointAddTweak(_, k);
11240
11240
  return !T || T.xOnlyPubkey === null ? null : {
11241
11241
  parity: T.parity,
11242
11242
  x: t.Buffer.from(T.xOnlyPubkey)
11243
11243
  };
11244
11244
  }
11245
11245
  e.tweakKey = y;
11246
- function p(w, x) {
11247
- return n.taggedHash("TapBranch", t.Buffer.concat([w, x]));
11246
+ function p(_, x) {
11247
+ return n.taggedHash("TapBranch", t.Buffer.concat([_, x]));
11248
11248
  }
11249
- function g(w) {
11250
- const x = i.varuint.encodingLength(w.length), k = t.Buffer.allocUnsafe(x);
11251
- return i.varuint.encode(w.length, k), t.Buffer.concat([k, w]);
11249
+ function g(_) {
11250
+ const x = i.varuint.encodingLength(_.length), k = t.Buffer.allocUnsafe(x);
11251
+ return i.varuint.encode(_.length, k), t.Buffer.concat([k, _]);
11252
11252
  }
11253
11253
  })(xc);
11254
11254
  var Ke = {}, Uu;
@@ -11292,7 +11292,7 @@ function Ug() {
11292
11292
  };
11293
11293
  }
11294
11294
  Ke.fromBech32 = g;
11295
- function w(A, E) {
11295
+ function _(A, E) {
11296
11296
  (0, n.typeforce)(
11297
11297
  (0, n.tuple)(n.Hash160bit, n.UInt8),
11298
11298
  arguments
@@ -11300,7 +11300,7 @@ function Ug() {
11300
11300
  const I = Buffer.allocUnsafe(21);
11301
11301
  return I.writeUInt8(E, 0), A.copy(I, 1), s.encode(I);
11302
11302
  }
11303
- Ke.toBase58Check = w;
11303
+ Ke.toBase58Check = _;
11304
11304
  function x(A, E, I) {
11305
11305
  const S = i.bech32.toWords(A);
11306
11306
  return S.unshift(E), E === 0 ? i.bech32.encode(I, S) : i.bech32m.encode(I, S);
@@ -11412,7 +11412,7 @@ function Ng() {
11412
11412
  },
11413
11413
  p
11414
11414
  );
11415
- const w = o.value(() => (0, c.fromBech32)(p.address)), x = o.value(() => {
11415
+ const _ = o.value(() => (0, c.fromBech32)(p.address)), x = o.value(() => {
11416
11416
  if (!(!p.witness || !p.witness.length))
11417
11417
  return p.witness.length >= 2 && p.witness[p.witness.length - 1][0] === h ? p.witness.slice(0, -1) : p.witness.slice();
11418
11418
  }), k = o.value(() => {
@@ -11449,7 +11449,7 @@ function Ng() {
11449
11449
  }), o.prop(A, "pubkey", () => {
11450
11450
  if (p.pubkey) return p.pubkey;
11451
11451
  if (p.output) return p.output.slice(2);
11452
- if (p.address) return w().data;
11452
+ if (p.address) return _().data;
11453
11453
  if (A.internalPubkey) {
11454
11454
  const E = (0, s.tweakKey)(A.internalPubkey, A.hash);
11455
11455
  if (E) return E.x;
@@ -11487,13 +11487,13 @@ function Ng() {
11487
11487
  }), g.validate) {
11488
11488
  let E = e.Buffer.from([]);
11489
11489
  if (p.address) {
11490
- if (T && T.bech32 !== w().prefix)
11490
+ if (T && T.bech32 !== _().prefix)
11491
11491
  throw new TypeError("Invalid prefix or Network mismatch");
11492
- if (w().version !== l)
11492
+ if (_().version !== l)
11493
11493
  throw new TypeError("Invalid address version");
11494
- if (w().data.length !== 32)
11494
+ if (_().data.length !== 32)
11495
11495
  throw new TypeError("Invalid address data");
11496
- E = w().data;
11496
+ E = _().data;
11497
11497
  }
11498
11498
  if (p.pubkey) {
11499
11499
  if (E.length > 0 && !E.equals(p.pubkey))
@@ -12179,11 +12179,11 @@ class ei {
12179
12179
  throw new Error(
12180
12180
  Fe.invalidCounterpartySigForUTXO(t[h].utxo)
12181
12181
  );
12182
- const p = await this.signer.signSchnorr(y), g = Buffer.from(n.ins[h].hash).reverse().toString("hex"), w = t.find((x) => x.utxo === g);
12183
- if (!w)
12182
+ const p = await this.signer.signSchnorr(y), g = Buffer.from(n.ins[h].hash).reverse().toString("hex"), _ = t.find((x) => x.utxo === g);
12183
+ if (!_)
12184
12184
  throw new Error(Fe.counterPartySigNotFound(g));
12185
12185
  n.setWitness(h, [
12186
- Buffer.from(w.sig, "hex"),
12186
+ Buffer.from(_.sig, "hex"),
12187
12187
  p,
12188
12188
  this.instantRefundLeaf(),
12189
12189
  this.generateControlBlockFor(
@@ -12944,20 +12944,20 @@ var Wo, ju;
12944
12944
  function C1() {
12945
12945
  if (ju) return Wo;
12946
12946
  ju = 1;
12947
- function e(g, w) {
12947
+ function e(g, _) {
12948
12948
  var x = Object.keys(g);
12949
12949
  if (Object.getOwnPropertySymbols) {
12950
12950
  var k = Object.getOwnPropertySymbols(g);
12951
- w && (k = k.filter(function(T) {
12951
+ _ && (k = k.filter(function(T) {
12952
12952
  return Object.getOwnPropertyDescriptor(g, T).enumerable;
12953
12953
  })), x.push.apply(x, k);
12954
12954
  }
12955
12955
  return x;
12956
12956
  }
12957
12957
  function t(g) {
12958
- for (var w = 1; w < arguments.length; w++) {
12959
- var x = arguments[w] != null ? arguments[w] : {};
12960
- w % 2 ? e(Object(x), !0).forEach(function(k) {
12958
+ for (var _ = 1; _ < arguments.length; _++) {
12959
+ var x = arguments[_] != null ? arguments[_] : {};
12960
+ _ % 2 ? e(Object(x), !0).forEach(function(k) {
12961
12961
  r(g, k, x[k]);
12962
12962
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(g, Object.getOwnPropertyDescriptors(x)) : e(Object(x)).forEach(function(k) {
12963
12963
  Object.defineProperty(g, k, Object.getOwnPropertyDescriptor(x, k));
@@ -12965,39 +12965,39 @@ function C1() {
12965
12965
  }
12966
12966
  return g;
12967
12967
  }
12968
- function r(g, w, x) {
12969
- return w = o(w), w in g ? Object.defineProperty(g, w, { value: x, enumerable: !0, configurable: !0, writable: !0 }) : g[w] = x, g;
12968
+ function r(g, _, x) {
12969
+ return _ = o(_), _ in g ? Object.defineProperty(g, _, { value: x, enumerable: !0, configurable: !0, writable: !0 }) : g[_] = x, g;
12970
12970
  }
12971
- function n(g, w) {
12972
- if (!(g instanceof w))
12971
+ function n(g, _) {
12972
+ if (!(g instanceof _))
12973
12973
  throw new TypeError("Cannot call a class as a function");
12974
12974
  }
12975
- function i(g, w) {
12976
- for (var x = 0; x < w.length; x++) {
12977
- var k = w[x];
12975
+ function i(g, _) {
12976
+ for (var x = 0; x < _.length; x++) {
12977
+ var k = _[x];
12978
12978
  k.enumerable = k.enumerable || !1, k.configurable = !0, "value" in k && (k.writable = !0), Object.defineProperty(g, o(k.key), k);
12979
12979
  }
12980
12980
  }
12981
- function s(g, w, x) {
12982
- return w && i(g.prototype, w), Object.defineProperty(g, "prototype", { writable: !1 }), g;
12981
+ function s(g, _, x) {
12982
+ return _ && i(g.prototype, _), Object.defineProperty(g, "prototype", { writable: !1 }), g;
12983
12983
  }
12984
12984
  function o(g) {
12985
- var w = a(g, "string");
12986
- return typeof w == "symbol" ? w : String(w);
12985
+ var _ = a(g, "string");
12986
+ return typeof _ == "symbol" ? _ : String(_);
12987
12987
  }
12988
- function a(g, w) {
12988
+ function a(g, _) {
12989
12989
  if (typeof g != "object" || g === null) return g;
12990
12990
  var x = g[Symbol.toPrimitive];
12991
12991
  if (x !== void 0) {
12992
- var k = x.call(g, w);
12992
+ var k = x.call(g, _);
12993
12993
  if (typeof k != "object") return k;
12994
12994
  throw new TypeError("@@toPrimitive must return a primitive value.");
12995
12995
  }
12996
12996
  return String(g);
12997
12997
  }
12998
12998
  var c = Qt, f = c.Buffer, l = Tc, h = l.inspect, y = h && h.custom || "inspect";
12999
- function p(g, w, x) {
13000
- f.prototype.copy.call(g, w, x);
12999
+ function p(g, _, x) {
13000
+ f.prototype.copy.call(g, _, x);
13001
13001
  }
13002
13002
  return Wo = /* @__PURE__ */ function() {
13003
13003
  function g() {
@@ -13263,7 +13263,7 @@ function Cl() {
13263
13263
  function a(O) {
13264
13264
  return i.isBuffer(O) || O instanceof s;
13265
13265
  }
13266
- var c = kl, f = Bl, l = f.getHighWaterMark, h = Gr.codes, y = h.ERR_INVALID_ARG_TYPE, p = h.ERR_METHOD_NOT_IMPLEMENTED, g = h.ERR_MULTIPLE_CALLBACK, w = h.ERR_STREAM_CANNOT_PIPE, x = h.ERR_STREAM_DESTROYED, k = h.ERR_STREAM_NULL_VALUES, T = h.ERR_STREAM_WRITE_AFTER_END, A = h.ERR_UNKNOWN_ENCODING, E = c.errorOrDestroy;
13266
+ var c = kl, f = Bl, l = f.getHighWaterMark, h = Gr.codes, y = h.ERR_INVALID_ARG_TYPE, p = h.ERR_METHOD_NOT_IMPLEMENTED, g = h.ERR_MULTIPLE_CALLBACK, _ = h.ERR_STREAM_CANNOT_PIPE, x = h.ERR_STREAM_DESTROYED, k = h.ERR_STREAM_NULL_VALUES, T = h.ERR_STREAM_WRITE_AFTER_END, A = h.ERR_UNKNOWN_ENCODING, E = c.errorOrDestroy;
13267
13267
  Me($, n);
13268
13268
  function I() {
13269
13269
  }
@@ -13303,7 +13303,7 @@ function Cl() {
13303
13303
  this._writableState = new S(O, this, C), this.writable = !0, O && (typeof O.write == "function" && (this._write = O.write), typeof O.writev == "function" && (this._writev = O.writev), typeof O.destroy == "function" && (this._destroy = O.destroy), typeof O.final == "function" && (this._final = O.final)), n.call(this);
13304
13304
  }
13305
13305
  $.prototype.pipe = function() {
13306
- E(this, new w());
13306
+ E(this, new _());
13307
13307
  };
13308
13308
  function B(O, C) {
13309
13309
  var H = new T();
@@ -13314,8 +13314,8 @@ function Cl() {
13314
13314
  return H === null ? Q = new k() : typeof H != "string" && !C.objectMode && (Q = new y("chunk", ["string", "Buffer"], H)), Q ? (E(O, Q), process.nextTick(W, Q), !1) : !0;
13315
13315
  }
13316
13316
  $.prototype.write = function(O, C, H) {
13317
- var W = this._writableState, Q = !1, _ = !W.objectMode && a(O);
13318
- return _ && !i.isBuffer(O) && (O = o(O)), typeof C == "function" && (H = C, C = null), _ ? C = "buffer" : C || (C = W.defaultEncoding), typeof H != "function" && (H = I), W.ending ? B(this, H) : (_ || V(this, W, O, H)) && (W.pendingcb++, Q = D(this, W, _, O, C, H)), Q;
13317
+ var W = this._writableState, Q = !1, w = !W.objectMode && a(O);
13318
+ return w && !i.isBuffer(O) && (O = o(O)), typeof C == "function" && (H = C, C = null), w ? C = "buffer" : C || (C = W.defaultEncoding), typeof H != "function" && (H = I), W.ending ? B(this, H) : (w || V(this, W, O, H)) && (W.pendingcb++, Q = D(this, W, w, O, C, H)), Q;
13319
13319
  }, $.prototype.cork = function() {
13320
13320
  this._writableState.corked++;
13321
13321
  }, $.prototype.uncork = function() {
@@ -13345,7 +13345,7 @@ function Cl() {
13345
13345
  return this._writableState.highWaterMark;
13346
13346
  }
13347
13347
  });
13348
- function D(O, C, H, W, Q, _) {
13348
+ function D(O, C, H, W, Q, w) {
13349
13349
  if (!H) {
13350
13350
  var v = R(C, W, Q);
13351
13351
  W !== v && (H = !0, Q = "buffer", W = v);
@@ -13359,15 +13359,15 @@ function Cl() {
13359
13359
  chunk: W,
13360
13360
  encoding: Q,
13361
13361
  isBuf: H,
13362
- callback: _,
13362
+ callback: w,
13363
13363
  next: null
13364
13364
  }, ge ? ge.next = C.lastBufferedRequest : C.bufferedRequest = C.lastBufferedRequest, C.bufferedRequestCount += 1;
13365
13365
  } else
13366
- j(O, C, !1, M, W, Q, _);
13366
+ j(O, C, !1, M, W, Q, w);
13367
13367
  return z;
13368
13368
  }
13369
- function j(O, C, H, W, Q, _, v) {
13370
- C.writelen = W, C.writecb = v, C.writing = !0, C.sync = !0, C.destroyed ? C.onwrite(new x("write")) : H ? O._writev(Q, C.onwrite) : O._write(Q, _, C.onwrite), C.sync = !1;
13369
+ function j(O, C, H, W, Q, w, v) {
13370
+ C.writelen = W, C.writecb = v, C.writing = !0, C.sync = !0, C.destroyed ? C.onwrite(new x("write")) : H ? O._writev(Q, C.onwrite) : O._write(Q, w, C.onwrite), C.sync = !1;
13371
13371
  }
13372
13372
  function q(O, C, H, W, Q) {
13373
13373
  --C.pendingcb, H ? (process.nextTick(Q, W), process.nextTick(rt, O, C), O._writableState.errorEmitted = !0, E(O, W)) : (Q(W), O._writableState.errorEmitted = !0, E(O, W), rt(O, C));
@@ -13380,8 +13380,8 @@ function Cl() {
13380
13380
  if (typeof Q != "function") throw new g();
13381
13381
  if (Y(H), C) q(O, H, W, C, Q);
13382
13382
  else {
13383
- var _ = qe(H) || O.destroyed;
13384
- !_ && !H.corked && !H.bufferProcessing && H.bufferedRequest && Pe(O, H), W ? process.nextTick(le, O, H, _, Q) : le(O, H, _, Q);
13383
+ var w = qe(H) || O.destroyed;
13384
+ !w && !H.corked && !H.bufferProcessing && H.bufferedRequest && Pe(O, H), W ? process.nextTick(le, O, H, w, Q) : le(O, H, w, Q);
13385
13385
  }
13386
13386
  }
13387
13387
  function le(O, C, H, W) {
@@ -13394,11 +13394,11 @@ function Cl() {
13394
13394
  C.bufferProcessing = !0;
13395
13395
  var H = C.bufferedRequest;
13396
13396
  if (O._writev && H && H.next) {
13397
- var W = C.bufferedRequestCount, Q = new Array(W), _ = C.corkedRequestsFree;
13398
- _.entry = H;
13397
+ var W = C.bufferedRequestCount, Q = new Array(W), w = C.corkedRequestsFree;
13398
+ w.entry = H;
13399
13399
  for (var v = 0, M = !0; H; )
13400
13400
  Q[v] = H, H.isBuf || (M = !1), H = H.next, v += 1;
13401
- Q.allBuffers = M, j(O, C, !0, C.length, Q, "", _.finish), C.pendingcb++, C.lastBufferedRequest = null, _.next ? (C.corkedRequestsFree = _.next, _.next = null) : C.corkedRequestsFree = new e(C), C.bufferedRequestCount = 0;
13401
+ Q.allBuffers = M, j(O, C, !0, C.length, Q, "", w.finish), C.pendingcb++, C.lastBufferedRequest = null, w.next ? (C.corkedRequestsFree = w.next, w.next = null) : C.corkedRequestsFree = new e(C), C.bufferedRequestCount = 0;
13402
13402
  } else {
13403
13403
  for (; H; ) {
13404
13404
  var z = H.chunk, ge = H.encoding, Z = H.callback, oe = C.objectMode ? 1 : z.length;
@@ -13767,7 +13767,7 @@ function ow() {
13767
13767
  function g(A) {
13768
13768
  process.nextTick(p, A);
13769
13769
  }
13770
- function w(A, E) {
13770
+ function _(A, E) {
13771
13771
  return function(I, S) {
13772
13772
  A.then(function() {
13773
13773
  if (E[c]) {
@@ -13797,7 +13797,7 @@ function ow() {
13797
13797
  });
13798
13798
  var S = this[f], U;
13799
13799
  if (S)
13800
- U = new Promise(w(S, this));
13800
+ U = new Promise(_(S, this));
13801
13801
  else {
13802
13802
  var $ = this[h].read();
13803
13803
  if ($ !== null)
@@ -13870,29 +13870,29 @@ function Rl() {
13870
13870
  return v.listeners(M).length;
13871
13871
  }, r = Tl, n = Qt.Buffer, i = (typeof br < "u" ? br : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
13872
13872
  };
13873
- function s(_) {
13874
- return n.from(_);
13873
+ function s(w) {
13874
+ return n.from(w);
13875
13875
  }
13876
- function o(_) {
13877
- return n.isBuffer(_) || _ instanceof i;
13876
+ function o(w) {
13877
+ return n.isBuffer(w) || w instanceof i;
13878
13878
  }
13879
13879
  var a = Tc, c;
13880
13880
  a && a.debuglog ? c = a.debuglog("stream") : c = function() {
13881
13881
  };
13882
- var f = C1(), l = kl, h = Bl, y = h.getHighWaterMark, p = Gr.codes, g = p.ERR_INVALID_ARG_TYPE, w = p.ERR_STREAM_PUSH_AFTER_EOF, x = p.ERR_METHOD_NOT_IMPLEMENTED, k = p.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, T, A, E;
13882
+ var f = C1(), l = kl, h = Bl, y = h.getHighWaterMark, p = Gr.codes, g = p.ERR_INVALID_ARG_TYPE, _ = p.ERR_STREAM_PUSH_AFTER_EOF, x = p.ERR_METHOD_NOT_IMPLEMENTED, k = p.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, T, A, E;
13883
13883
  Me(B, r);
13884
13884
  var I = l.errorOrDestroy, S = ["error", "close", "destroy", "pause", "resume"];
13885
- function U(_, v, M) {
13886
- if (typeof _.prependListener == "function") return _.prependListener(v, M);
13887
- !_._events || !_._events[v] ? _.on(v, M) : Array.isArray(_._events[v]) ? _._events[v].unshift(M) : _._events[v] = [M, _._events[v]];
13885
+ function U(w, v, M) {
13886
+ if (typeof w.prependListener == "function") return w.prependListener(v, M);
13887
+ !w._events || !w._events[v] ? w.on(v, M) : Array.isArray(w._events[v]) ? w._events[v].unshift(M) : w._events[v] = [M, w._events[v]];
13888
13888
  }
13889
- function $(_, v, M) {
13890
- e = e || vn(), _ = _ || {}, typeof M != "boolean" && (M = v instanceof e), this.objectMode = !!_.objectMode, M && (this.objectMode = this.objectMode || !!_.readableObjectMode), this.highWaterMark = y(this, _, "readableHighWaterMark", M), this.buffer = new f(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose = _.emitClose !== !1, this.autoDestroy = !!_.autoDestroy, this.destroyed = !1, this.defaultEncoding = _.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, _.encoding && (T || (T = Bs.StringDecoder), this.decoder = new T(_.encoding), this.encoding = _.encoding);
13889
+ function $(w, v, M) {
13890
+ e = e || vn(), w = w || {}, typeof M != "boolean" && (M = v instanceof e), this.objectMode = !!w.objectMode, M && (this.objectMode = this.objectMode || !!w.readableObjectMode), this.highWaterMark = y(this, w, "readableHighWaterMark", M), this.buffer = new f(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose = w.emitClose !== !1, this.autoDestroy = !!w.autoDestroy, this.destroyed = !1, this.defaultEncoding = w.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, w.encoding && (T || (T = Bs.StringDecoder), this.decoder = new T(w.encoding), this.encoding = w.encoding);
13891
13891
  }
13892
- function B(_) {
13893
- if (e = e || vn(), !(this instanceof B)) return new B(_);
13892
+ function B(w) {
13893
+ if (e = e || vn(), !(this instanceof B)) return new B(w);
13894
13894
  var v = this instanceof e;
13895
- this._readableState = new $(_, this, v), this.readable = !0, _ && (typeof _.read == "function" && (this._read = _.read), typeof _.destroy == "function" && (this._destroy = _.destroy)), r.call(this);
13895
+ this._readableState = new $(w, this, v), this.readable = !0, w && (typeof w.read == "function" && (this._read = w.read), typeof w.destroy == "function" && (this._destroy = w.destroy)), r.call(this);
13896
13896
  }
13897
13897
  Object.defineProperty(B.prototype, "destroyed", {
13898
13898
  // making it explicit this property is not enumerable
@@ -13905,168 +13905,168 @@ function Rl() {
13905
13905
  set: function(v) {
13906
13906
  this._readableState && (this._readableState.destroyed = v);
13907
13907
  }
13908
- }), B.prototype.destroy = l.destroy, B.prototype._undestroy = l.undestroy, B.prototype._destroy = function(_, v) {
13909
- v(_);
13910
- }, B.prototype.push = function(_, v) {
13908
+ }), B.prototype.destroy = l.destroy, B.prototype._undestroy = l.undestroy, B.prototype._destroy = function(w, v) {
13909
+ v(w);
13910
+ }, B.prototype.push = function(w, v) {
13911
13911
  var M = this._readableState, z;
13912
- return M.objectMode ? z = !0 : typeof _ == "string" && (v = v || M.defaultEncoding, v !== M.encoding && (_ = n.from(_, v), v = ""), z = !0), V(this, _, v, !1, z);
13913
- }, B.prototype.unshift = function(_) {
13914
- return V(this, _, null, !0, !1);
13912
+ return M.objectMode ? z = !0 : typeof w == "string" && (v = v || M.defaultEncoding, v !== M.encoding && (w = n.from(w, v), v = ""), z = !0), V(this, w, v, !1, z);
13913
+ }, B.prototype.unshift = function(w) {
13914
+ return V(this, w, null, !0, !1);
13915
13915
  };
13916
- function V(_, v, M, z, ge) {
13916
+ function V(w, v, M, z, ge) {
13917
13917
  c("readableAddChunk", v);
13918
- var Z = _._readableState;
13918
+ var Z = w._readableState;
13919
13919
  if (v === null)
13920
- Z.reading = !1, re(_, Z);
13920
+ Z.reading = !1, re(w, Z);
13921
13921
  else {
13922
13922
  var oe;
13923
13923
  if (ge || (oe = D(Z, v)), oe)
13924
- I(_, oe);
13924
+ I(w, oe);
13925
13925
  else if (Z.objectMode || v && v.length > 0)
13926
13926
  if (typeof v != "string" && !Z.objectMode && Object.getPrototypeOf(v) !== n.prototype && (v = s(v)), z)
13927
- Z.endEmitted ? I(_, new k()) : R(_, Z, v, !0);
13927
+ Z.endEmitted ? I(w, new k()) : R(w, Z, v, !0);
13928
13928
  else if (Z.ended)
13929
- I(_, new w());
13929
+ I(w, new _());
13930
13930
  else {
13931
13931
  if (Z.destroyed)
13932
13932
  return !1;
13933
- Z.reading = !1, Z.decoder && !M ? (v = Z.decoder.write(v), Z.objectMode || v.length !== 0 ? R(_, Z, v, !1) : Pe(_, Z)) : R(_, Z, v, !1);
13933
+ Z.reading = !1, Z.decoder && !M ? (v = Z.decoder.write(v), Z.objectMode || v.length !== 0 ? R(w, Z, v, !1) : Pe(w, Z)) : R(w, Z, v, !1);
13934
13934
  }
13935
- else z || (Z.reading = !1, Pe(_, Z));
13935
+ else z || (Z.reading = !1, Pe(w, Z));
13936
13936
  }
13937
13937
  return !Z.ended && (Z.length < Z.highWaterMark || Z.length === 0);
13938
13938
  }
13939
- function R(_, v, M, z) {
13940
- v.flowing && v.length === 0 && !v.sync ? (v.awaitDrain = 0, _.emit("data", M)) : (v.length += v.objectMode ? 1 : M.length, z ? v.buffer.unshift(M) : v.buffer.push(M), v.needReadable && le(_)), Pe(_, v);
13939
+ function R(w, v, M, z) {
13940
+ v.flowing && v.length === 0 && !v.sync ? (v.awaitDrain = 0, w.emit("data", M)) : (v.length += v.objectMode ? 1 : M.length, z ? v.buffer.unshift(M) : v.buffer.push(M), v.needReadable && le(w)), Pe(w, v);
13941
13941
  }
13942
- function D(_, v) {
13942
+ function D(w, v) {
13943
13943
  var M;
13944
- return !o(v) && typeof v != "string" && v !== void 0 && !_.objectMode && (M = new g("chunk", ["string", "Buffer", "Uint8Array"], v)), M;
13944
+ return !o(v) && typeof v != "string" && v !== void 0 && !w.objectMode && (M = new g("chunk", ["string", "Buffer", "Uint8Array"], v)), M;
13945
13945
  }
13946
13946
  B.prototype.isPaused = function() {
13947
13947
  return this._readableState.flowing === !1;
13948
- }, B.prototype.setEncoding = function(_) {
13948
+ }, B.prototype.setEncoding = function(w) {
13949
13949
  T || (T = Bs.StringDecoder);
13950
- var v = new T(_);
13950
+ var v = new T(w);
13951
13951
  this._readableState.decoder = v, this._readableState.encoding = this._readableState.decoder.encoding;
13952
13952
  for (var M = this._readableState.buffer.head, z = ""; M !== null; )
13953
13953
  z += v.write(M.data), M = M.next;
13954
13954
  return this._readableState.buffer.clear(), z !== "" && this._readableState.buffer.push(z), this._readableState.length = z.length, this;
13955
13955
  };
13956
13956
  var j = 1073741824;
13957
- function q(_) {
13958
- return _ >= j ? _ = j : (_--, _ |= _ >>> 1, _ |= _ >>> 2, _ |= _ >>> 4, _ |= _ >>> 8, _ |= _ >>> 16, _++), _;
13957
+ function q(w) {
13958
+ return w >= j ? w = j : (w--, w |= w >>> 1, w |= w >>> 2, w |= w >>> 4, w |= w >>> 8, w |= w >>> 16, w++), w;
13959
13959
  }
13960
- function Y(_, v) {
13961
- return _ <= 0 || v.length === 0 && v.ended ? 0 : v.objectMode ? 1 : _ !== _ ? v.flowing && v.length ? v.buffer.head.data.length : v.length : (_ > v.highWaterMark && (v.highWaterMark = q(_)), _ <= v.length ? _ : v.ended ? v.length : (v.needReadable = !0, 0));
13960
+ function Y(w, v) {
13961
+ return w <= 0 || v.length === 0 && v.ended ? 0 : v.objectMode ? 1 : w !== w ? v.flowing && v.length ? v.buffer.head.data.length : v.length : (w > v.highWaterMark && (v.highWaterMark = q(w)), w <= v.length ? w : v.ended ? v.length : (v.needReadable = !0, 0));
13962
13962
  }
13963
- B.prototype.read = function(_) {
13964
- c("read", _), _ = parseInt(_, 10);
13965
- var v = this._readableState, M = _;
13966
- if (_ !== 0 && (v.emittedReadable = !1), _ === 0 && v.needReadable && ((v.highWaterMark !== 0 ? v.length >= v.highWaterMark : v.length > 0) || v.ended))
13963
+ B.prototype.read = function(w) {
13964
+ c("read", w), w = parseInt(w, 10);
13965
+ var v = this._readableState, M = w;
13966
+ if (w !== 0 && (v.emittedReadable = !1), w === 0 && v.needReadable && ((v.highWaterMark !== 0 ? v.length >= v.highWaterMark : v.length > 0) || v.ended))
13967
13967
  return c("read: emitReadable", v.length, v.ended), v.length === 0 && v.ended ? H(this) : le(this), null;
13968
- if (_ = Y(_, v), _ === 0 && v.ended)
13968
+ if (w = Y(w, v), w === 0 && v.ended)
13969
13969
  return v.length === 0 && H(this), null;
13970
13970
  var z = v.needReadable;
13971
- c("need readable", z), (v.length === 0 || v.length - _ < v.highWaterMark) && (z = !0, c("length less than watermark", z)), v.ended || v.reading ? (z = !1, c("reading or ended", z)) : z && (c("do read"), v.reading = !0, v.sync = !0, v.length === 0 && (v.needReadable = !0), this._read(v.highWaterMark), v.sync = !1, v.reading || (_ = Y(M, v)));
13971
+ c("need readable", z), (v.length === 0 || v.length - w < v.highWaterMark) && (z = !0, c("length less than watermark", z)), v.ended || v.reading ? (z = !1, c("reading or ended", z)) : z && (c("do read"), v.reading = !0, v.sync = !0, v.length === 0 && (v.needReadable = !0), this._read(v.highWaterMark), v.sync = !1, v.reading || (w = Y(M, v)));
13972
13972
  var ge;
13973
- return _ > 0 ? ge = C(_, v) : ge = null, ge === null ? (v.needReadable = v.length <= v.highWaterMark, _ = 0) : (v.length -= _, v.awaitDrain = 0), v.length === 0 && (v.ended || (v.needReadable = !0), M !== _ && v.ended && H(this)), ge !== null && this.emit("data", ge), ge;
13973
+ return w > 0 ? ge = C(w, v) : ge = null, ge === null ? (v.needReadable = v.length <= v.highWaterMark, w = 0) : (v.length -= w, v.awaitDrain = 0), v.length === 0 && (v.ended || (v.needReadable = !0), M !== w && v.ended && H(this)), ge !== null && this.emit("data", ge), ge;
13974
13974
  };
13975
- function re(_, v) {
13975
+ function re(w, v) {
13976
13976
  if (c("onEofChunk"), !v.ended) {
13977
13977
  if (v.decoder) {
13978
13978
  var M = v.decoder.end();
13979
13979
  M && M.length && (v.buffer.push(M), v.length += v.objectMode ? 1 : M.length);
13980
13980
  }
13981
- v.ended = !0, v.sync ? le(_) : (v.needReadable = !1, v.emittedReadable || (v.emittedReadable = !0, be(_)));
13981
+ v.ended = !0, v.sync ? le(w) : (v.needReadable = !1, v.emittedReadable || (v.emittedReadable = !0, be(w)));
13982
13982
  }
13983
13983
  }
13984
- function le(_) {
13985
- var v = _._readableState;
13986
- c("emitReadable", v.needReadable, v.emittedReadable), v.needReadable = !1, v.emittedReadable || (c("emitReadable", v.flowing), v.emittedReadable = !0, process.nextTick(be, _));
13984
+ function le(w) {
13985
+ var v = w._readableState;
13986
+ c("emitReadable", v.needReadable, v.emittedReadable), v.needReadable = !1, v.emittedReadable || (c("emitReadable", v.flowing), v.emittedReadable = !0, process.nextTick(be, w));
13987
13987
  }
13988
- function be(_) {
13989
- var v = _._readableState;
13990
- c("emitReadable_", v.destroyed, v.length, v.ended), !v.destroyed && (v.length || v.ended) && (_.emit("readable"), v.emittedReadable = !1), v.needReadable = !v.flowing && !v.ended && v.length <= v.highWaterMark, O(_);
13988
+ function be(w) {
13989
+ var v = w._readableState;
13990
+ c("emitReadable_", v.destroyed, v.length, v.ended), !v.destroyed && (v.length || v.ended) && (w.emit("readable"), v.emittedReadable = !1), v.needReadable = !v.flowing && !v.ended && v.length <= v.highWaterMark, O(w);
13991
13991
  }
13992
- function Pe(_, v) {
13993
- v.readingMore || (v.readingMore = !0, process.nextTick(qe, _, v));
13992
+ function Pe(w, v) {
13993
+ v.readingMore || (v.readingMore = !0, process.nextTick(qe, w, v));
13994
13994
  }
13995
- function qe(_, v) {
13995
+ function qe(w, v) {
13996
13996
  for (; !v.reading && !v.ended && (v.length < v.highWaterMark || v.flowing && v.length === 0); ) {
13997
13997
  var M = v.length;
13998
- if (c("maybeReadMore read 0"), _.read(0), M === v.length)
13998
+ if (c("maybeReadMore read 0"), w.read(0), M === v.length)
13999
13999
  break;
14000
14000
  }
14001
14001
  v.readingMore = !1;
14002
14002
  }
14003
- B.prototype._read = function(_) {
14003
+ B.prototype._read = function(w) {
14004
14004
  I(this, new x("_read()"));
14005
- }, B.prototype.pipe = function(_, v) {
14005
+ }, B.prototype.pipe = function(w, v) {
14006
14006
  var M = this, z = this._readableState;
14007
14007
  switch (z.pipesCount) {
14008
14008
  case 0:
14009
- z.pipes = _;
14009
+ z.pipes = w;
14010
14010
  break;
14011
14011
  case 1:
14012
- z.pipes = [z.pipes, _];
14012
+ z.pipes = [z.pipes, w];
14013
14013
  break;
14014
14014
  default:
14015
- z.pipes.push(_);
14015
+ z.pipes.push(w);
14016
14016
  break;
14017
14017
  }
14018
14018
  z.pipesCount += 1, c("pipe count=%d opts=%j", z.pipesCount, v);
14019
- var ge = (!v || v.end !== !1) && _ !== process.stdout && _ !== process.stderr, Z = ge ? er : Sr;
14020
- z.endEmitted ? process.nextTick(Z) : M.once("end", Z), _.on("unpipe", oe);
14019
+ var ge = (!v || v.end !== !1) && w !== process.stdout && w !== process.stderr, Z = ge ? er : Sr;
14020
+ z.endEmitted ? process.nextTick(Z) : M.once("end", Z), w.on("unpipe", oe);
14021
14021
  function oe(m, u) {
14022
14022
  c("onunpipe"), m === M && u && u.hasUnpiped === !1 && (u.hasUnpiped = !0, Vr());
14023
14023
  }
14024
14024
  function er() {
14025
- c("onend"), _.end();
14025
+ c("onend"), w.end();
14026
14026
  }
14027
14027
  var qr = ue(M);
14028
- _.on("drain", qr);
14028
+ w.on("drain", qr);
14029
14029
  var kn = !1;
14030
14030
  function Vr() {
14031
- c("cleanup"), _.removeListener("close", In), _.removeListener("finish", ct), _.removeListener("drain", qr), _.removeListener("error", Ar), _.removeListener("unpipe", oe), M.removeListener("end", er), M.removeListener("end", Sr), M.removeListener("data", nt), kn = !0, z.awaitDrain && (!_._writableState || _._writableState.needDrain) && qr();
14031
+ c("cleanup"), w.removeListener("close", In), w.removeListener("finish", ct), w.removeListener("drain", qr), w.removeListener("error", Ar), w.removeListener("unpipe", oe), M.removeListener("end", er), M.removeListener("end", Sr), M.removeListener("data", nt), kn = !0, z.awaitDrain && (!w._writableState || w._writableState.needDrain) && qr();
14032
14032
  }
14033
14033
  M.on("data", nt);
14034
14034
  function nt(m) {
14035
14035
  c("ondata");
14036
- var u = _.write(m);
14037
- c("dest.write", u), u === !1 && ((z.pipesCount === 1 && z.pipes === _ || z.pipesCount > 1 && Q(z.pipes, _) !== -1) && !kn && (c("false write response, pause", z.awaitDrain), z.awaitDrain++), M.pause());
14036
+ var u = w.write(m);
14037
+ c("dest.write", u), u === !1 && ((z.pipesCount === 1 && z.pipes === w || z.pipesCount > 1 && Q(z.pipes, w) !== -1) && !kn && (c("false write response, pause", z.awaitDrain), z.awaitDrain++), M.pause());
14038
14038
  }
14039
14039
  function Ar(m) {
14040
- c("onerror", m), Sr(), _.removeListener("error", Ar), t(_, "error") === 0 && I(_, m);
14040
+ c("onerror", m), Sr(), w.removeListener("error", Ar), t(w, "error") === 0 && I(w, m);
14041
14041
  }
14042
- U(_, "error", Ar);
14042
+ U(w, "error", Ar);
14043
14043
  function In() {
14044
- _.removeListener("finish", ct), Sr();
14044
+ w.removeListener("finish", ct), Sr();
14045
14045
  }
14046
- _.once("close", In);
14046
+ w.once("close", In);
14047
14047
  function ct() {
14048
- c("onfinish"), _.removeListener("close", In), Sr();
14048
+ c("onfinish"), w.removeListener("close", In), Sr();
14049
14049
  }
14050
- _.once("finish", ct);
14050
+ w.once("finish", ct);
14051
14051
  function Sr() {
14052
- c("unpipe"), M.unpipe(_);
14052
+ c("unpipe"), M.unpipe(w);
14053
14053
  }
14054
- return _.emit("pipe", M), z.flowing || (c("pipe resume"), M.resume()), _;
14054
+ return w.emit("pipe", M), z.flowing || (c("pipe resume"), M.resume()), w;
14055
14055
  };
14056
- function ue(_) {
14056
+ function ue(w) {
14057
14057
  return function() {
14058
- var M = _._readableState;
14059
- c("pipeOnDrain", M.awaitDrain), M.awaitDrain && M.awaitDrain--, M.awaitDrain === 0 && t(_, "data") && (M.flowing = !0, O(_));
14058
+ var M = w._readableState;
14059
+ c("pipeOnDrain", M.awaitDrain), M.awaitDrain && M.awaitDrain--, M.awaitDrain === 0 && t(w, "data") && (M.flowing = !0, O(w));
14060
14060
  };
14061
14061
  }
14062
- B.prototype.unpipe = function(_) {
14062
+ B.prototype.unpipe = function(w) {
14063
14063
  var v = this._readableState, M = {
14064
14064
  hasUnpiped: !1
14065
14065
  };
14066
14066
  if (v.pipesCount === 0) return this;
14067
14067
  if (v.pipesCount === 1)
14068
- return _ && _ !== v.pipes ? this : (_ || (_ = v.pipes), v.pipes = null, v.pipesCount = 0, v.flowing = !1, _ && _.emit("unpipe", this, M), this);
14069
- if (!_) {
14068
+ return w && w !== v.pipes ? this : (w || (w = v.pipes), v.pipes = null, v.pipesCount = 0, v.flowing = !1, w && w.emit("unpipe", this, M), this);
14069
+ if (!w) {
14070
14070
  var z = v.pipes, ge = v.pipesCount;
14071
14071
  v.pipes = null, v.pipesCount = 0, v.flowing = !1;
14072
14072
  for (var Z = 0; Z < ge; Z++) z[Z].emit("unpipe", this, {
@@ -14074,66 +14074,66 @@ function Rl() {
14074
14074
  });
14075
14075
  return this;
14076
14076
  }
14077
- var oe = Q(v.pipes, _);
14078
- return oe === -1 ? this : (v.pipes.splice(oe, 1), v.pipesCount -= 1, v.pipesCount === 1 && (v.pipes = v.pipes[0]), _.emit("unpipe", this, M), this);
14079
- }, B.prototype.on = function(_, v) {
14080
- var M = r.prototype.on.call(this, _, v), z = this._readableState;
14081
- return _ === "data" ? (z.readableListening = this.listenerCount("readable") > 0, z.flowing !== !1 && this.resume()) : _ === "readable" && !z.endEmitted && !z.readableListening && (z.readableListening = z.needReadable = !0, z.flowing = !1, z.emittedReadable = !1, c("on readable", z.length, z.reading), z.length ? le(this) : z.reading || process.nextTick(rt, this)), M;
14082
- }, B.prototype.addListener = B.prototype.on, B.prototype.removeListener = function(_, v) {
14083
- var M = r.prototype.removeListener.call(this, _, v);
14084
- return _ === "readable" && process.nextTick(pe, this), M;
14085
- }, B.prototype.removeAllListeners = function(_) {
14077
+ var oe = Q(v.pipes, w);
14078
+ return oe === -1 ? this : (v.pipes.splice(oe, 1), v.pipesCount -= 1, v.pipesCount === 1 && (v.pipes = v.pipes[0]), w.emit("unpipe", this, M), this);
14079
+ }, B.prototype.on = function(w, v) {
14080
+ var M = r.prototype.on.call(this, w, v), z = this._readableState;
14081
+ return w === "data" ? (z.readableListening = this.listenerCount("readable") > 0, z.flowing !== !1 && this.resume()) : w === "readable" && !z.endEmitted && !z.readableListening && (z.readableListening = z.needReadable = !0, z.flowing = !1, z.emittedReadable = !1, c("on readable", z.length, z.reading), z.length ? le(this) : z.reading || process.nextTick(rt, this)), M;
14082
+ }, B.prototype.addListener = B.prototype.on, B.prototype.removeListener = function(w, v) {
14083
+ var M = r.prototype.removeListener.call(this, w, v);
14084
+ return w === "readable" && process.nextTick(pe, this), M;
14085
+ }, B.prototype.removeAllListeners = function(w) {
14086
14086
  var v = r.prototype.removeAllListeners.apply(this, arguments);
14087
- return (_ === "readable" || _ === void 0) && process.nextTick(pe, this), v;
14087
+ return (w === "readable" || w === void 0) && process.nextTick(pe, this), v;
14088
14088
  };
14089
- function pe(_) {
14090
- var v = _._readableState;
14091
- v.readableListening = _.listenerCount("readable") > 0, v.resumeScheduled && !v.paused ? v.flowing = !0 : _.listenerCount("data") > 0 && _.resume();
14089
+ function pe(w) {
14090
+ var v = w._readableState;
14091
+ v.readableListening = w.listenerCount("readable") > 0, v.resumeScheduled && !v.paused ? v.flowing = !0 : w.listenerCount("data") > 0 && w.resume();
14092
14092
  }
14093
- function rt(_) {
14094
- c("readable nexttick read 0"), _.read(0);
14093
+ function rt(w) {
14094
+ c("readable nexttick read 0"), w.read(0);
14095
14095
  }
14096
14096
  B.prototype.resume = function() {
14097
- var _ = this._readableState;
14098
- return _.flowing || (c("resume"), _.flowing = !_.readableListening, Zt(this, _)), _.paused = !1, this;
14097
+ var w = this._readableState;
14098
+ return w.flowing || (c("resume"), w.flowing = !w.readableListening, Zt(this, w)), w.paused = !1, this;
14099
14099
  };
14100
- function Zt(_, v) {
14101
- v.resumeScheduled || (v.resumeScheduled = !0, process.nextTick(Bt, _, v));
14100
+ function Zt(w, v) {
14101
+ v.resumeScheduled || (v.resumeScheduled = !0, process.nextTick(Bt, w, v));
14102
14102
  }
14103
- function Bt(_, v) {
14104
- c("resume", v.reading), v.reading || _.read(0), v.resumeScheduled = !1, _.emit("resume"), O(_), v.flowing && !v.reading && _.read(0);
14103
+ function Bt(w, v) {
14104
+ c("resume", v.reading), v.reading || w.read(0), v.resumeScheduled = !1, w.emit("resume"), O(w), v.flowing && !v.reading && w.read(0);
14105
14105
  }
14106
14106
  B.prototype.pause = function() {
14107
14107
  return c("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (c("pause"), this._readableState.flowing = !1, this.emit("pause")), this._readableState.paused = !0, this;
14108
14108
  };
14109
- function O(_) {
14110
- var v = _._readableState;
14111
- for (c("flow", v.flowing); v.flowing && _.read() !== null; ) ;
14109
+ function O(w) {
14110
+ var v = w._readableState;
14111
+ for (c("flow", v.flowing); v.flowing && w.read() !== null; ) ;
14112
14112
  }
14113
- B.prototype.wrap = function(_) {
14113
+ B.prototype.wrap = function(w) {
14114
14114
  var v = this, M = this._readableState, z = !1;
14115
- _.on("end", function() {
14115
+ w.on("end", function() {
14116
14116
  if (c("wrapped end"), M.decoder && !M.ended) {
14117
14117
  var oe = M.decoder.end();
14118
14118
  oe && oe.length && v.push(oe);
14119
14119
  }
14120
14120
  v.push(null);
14121
- }), _.on("data", function(oe) {
14121
+ }), w.on("data", function(oe) {
14122
14122
  if (c("wrapped data"), M.decoder && (oe = M.decoder.write(oe)), !(M.objectMode && oe == null) && !(!M.objectMode && (!oe || !oe.length))) {
14123
14123
  var er = v.push(oe);
14124
- er || (z = !0, _.pause());
14124
+ er || (z = !0, w.pause());
14125
14125
  }
14126
14126
  });
14127
- for (var ge in _)
14128
- this[ge] === void 0 && typeof _[ge] == "function" && (this[ge] = /* @__PURE__ */ function(er) {
14127
+ for (var ge in w)
14128
+ this[ge] === void 0 && typeof w[ge] == "function" && (this[ge] = /* @__PURE__ */ function(er) {
14129
14129
  return function() {
14130
- return _[er].apply(_, arguments);
14130
+ return w[er].apply(w, arguments);
14131
14131
  };
14132
14132
  }(ge));
14133
14133
  for (var Z = 0; Z < S.length; Z++)
14134
- _.on(S[Z], this.emit.bind(this, S[Z]));
14134
+ w.on(S[Z], this.emit.bind(this, S[Z]));
14135
14135
  return this._read = function(oe) {
14136
- c("wrapped _read", oe), z && (z = !1, _.resume());
14136
+ c("wrapped _read", oe), z && (z = !1, w.resume());
14137
14137
  }, this;
14138
14138
  }, typeof Symbol == "function" && (B.prototype[Symbol.asyncIterator] = function() {
14139
14139
  return A === void 0 && (A = ow()), A(this);
@@ -14173,27 +14173,27 @@ function Rl() {
14173
14173
  return this._readableState.length;
14174
14174
  }
14175
14175
  });
14176
- function C(_, v) {
14176
+ function C(w, v) {
14177
14177
  if (v.length === 0) return null;
14178
14178
  var M;
14179
- return v.objectMode ? M = v.buffer.shift() : !_ || _ >= v.length ? (v.decoder ? M = v.buffer.join("") : v.buffer.length === 1 ? M = v.buffer.first() : M = v.buffer.concat(v.length), v.buffer.clear()) : M = v.buffer.consume(_, v.decoder), M;
14179
+ return v.objectMode ? M = v.buffer.shift() : !w || w >= v.length ? (v.decoder ? M = v.buffer.join("") : v.buffer.length === 1 ? M = v.buffer.first() : M = v.buffer.concat(v.length), v.buffer.clear()) : M = v.buffer.consume(w, v.decoder), M;
14180
14180
  }
14181
- function H(_) {
14182
- var v = _._readableState;
14183
- c("endReadable", v.endEmitted), v.endEmitted || (v.ended = !0, process.nextTick(W, v, _));
14181
+ function H(w) {
14182
+ var v = w._readableState;
14183
+ c("endReadable", v.endEmitted), v.endEmitted || (v.ended = !0, process.nextTick(W, v, w));
14184
14184
  }
14185
- function W(_, v) {
14186
- if (c("endReadableNT", _.endEmitted, _.length), !_.endEmitted && _.length === 0 && (_.endEmitted = !0, v.readable = !1, v.emit("end"), _.autoDestroy)) {
14185
+ function W(w, v) {
14186
+ if (c("endReadableNT", w.endEmitted, w.length), !w.endEmitted && w.length === 0 && (w.endEmitted = !0, v.readable = !1, v.emit("end"), w.autoDestroy)) {
14187
14187
  var M = v._writableState;
14188
14188
  (!M || M.autoDestroy && M.finished) && v.destroy();
14189
14189
  }
14190
14190
  }
14191
- typeof Symbol == "function" && (B.from = function(_, v) {
14192
- return E === void 0 && (E = aw()), E(B, _, v);
14191
+ typeof Symbol == "function" && (B.from = function(w, v) {
14192
+ return E === void 0 && (E = aw()), E(B, w, v);
14193
14193
  });
14194
- function Q(_, v) {
14195
- for (var M = 0, z = _.length; M < z; M++)
14196
- if (_[M] === v) return M;
14194
+ function Q(w, v) {
14195
+ for (var M = 0, z = w.length; M < z; M++)
14196
+ if (w[M] === v) return M;
14197
14197
  return -1;
14198
14198
  }
14199
14199
  return ea;
@@ -14797,8 +14797,8 @@ ao.prototype._update = function() {
14797
14797
  var p, g;
14798
14798
  y < 16 ? (p = tf(r, n, i, s, o, e[Mn[y]], jn[0], Hn[y]), g = of(a, c, f, l, h, e[$n[y]], Gn[0], Dn[y])) : y < 32 ? (p = rf(r, n, i, s, o, e[Mn[y]], jn[1], Hn[y]), g = sf(a, c, f, l, h, e[$n[y]], Gn[1], Dn[y])) : y < 48 ? (p = nf(r, n, i, s, o, e[Mn[y]], jn[2], Hn[y]), g = nf(a, c, f, l, h, e[$n[y]], Gn[2], Dn[y])) : y < 64 ? (p = sf(r, n, i, s, o, e[Mn[y]], jn[3], Hn[y]), g = rf(a, c, f, l, h, e[$n[y]], Gn[3], Dn[y])) : (p = of(r, n, i, s, o, e[Mn[y]], jn[4], Hn[y]), g = tf(a, c, f, l, h, e[$n[y]], Gn[4], Dn[y])), r = o, o = s, s = Hr(i, 10), i = n, n = p, a = h, h = l, l = Hr(f, 10), f = c, c = g;
14799
14799
  }
14800
- var w = this._b + i + l | 0;
14801
- this._b = this._c + s + h | 0, this._c = this._d + o + a | 0, this._d = this._e + r + c | 0, this._e = this._a + n + f | 0, this._a = w;
14800
+ var _ = this._b + i + l | 0;
14801
+ this._b = this._c + s + h | 0, this._c = this._d + o + a | 0, this._d = this._e + r + c | 0, this._e = this._a + n + f | 0, this._a = _;
14802
14802
  };
14803
14803
  ao.prototype._digest = function() {
14804
14804
  this._block[this._blockOffset++] = 128, this._blockOffset > 56 && (this._block.fill(0, this._blockOffset, 64), this._update(), this._blockOffset = 0), this._block.fill(0, this._blockOffset, 56), this._block.writeUInt32LE(this._length[0], 56), this._block.writeUInt32LE(this._length[1], 60), this._update();
@@ -15239,7 +15239,7 @@ function Oe(e, t) {
15239
15239
  return e >>> 0 < t >>> 0 ? 1 : 0;
15240
15240
  }
15241
15241
  Gi.prototype._update = function(e) {
15242
- for (var t = this._w, r = this._ah | 0, n = this._bh | 0, i = this._ch | 0, s = this._dh | 0, o = this._eh | 0, a = this._fh | 0, c = this._gh | 0, f = this._hh | 0, l = this._al | 0, h = this._bl | 0, y = this._cl | 0, p = this._dl | 0, g = this._el | 0, w = this._fl | 0, x = this._gl | 0, k = this._hl | 0, T = 0; T < 32; T += 2)
15242
+ for (var t = this._w, r = this._ah | 0, n = this._bh | 0, i = this._ch | 0, s = this._dh | 0, o = this._eh | 0, a = this._fh | 0, c = this._gh | 0, f = this._hh | 0, l = this._al | 0, h = this._bl | 0, y = this._cl | 0, p = this._dl | 0, g = this._el | 0, _ = this._fl | 0, x = this._gl | 0, k = this._hl | 0, T = 0; T < 32; T += 2)
15243
15243
  t[T] = e.readInt32BE(T * 4), t[T + 1] = e.readInt32BE(T * 4 + 4);
15244
15244
  for (; T < 160; T += 2) {
15245
15245
  var A = t[T - 30], E = t[T - 15 * 2 + 1], I = w2(A, E), S = _2(E, A);
@@ -15249,12 +15249,12 @@ Gi.prototype._update = function(e) {
15249
15249
  }
15250
15250
  for (var Y = 0; Y < 160; Y += 2) {
15251
15251
  q = t[Y], j = t[Y + 1];
15252
- var re = uf(r, n, i), le = uf(l, h, y), be = ff(r, l), Pe = ff(l, r), qe = df(o, g), ue = df(g, o), pe = af[Y], rt = af[Y + 1], Zt = cf(o, a, c), Bt = cf(g, w, x), O = k + ue | 0, C = f + qe + Oe(O, k) | 0;
15252
+ var re = uf(r, n, i), le = uf(l, h, y), be = ff(r, l), Pe = ff(l, r), qe = df(o, g), ue = df(g, o), pe = af[Y], rt = af[Y + 1], Zt = cf(o, a, c), Bt = cf(g, _, x), O = k + ue | 0, C = f + qe + Oe(O, k) | 0;
15253
15253
  O = O + Bt | 0, C = C + Zt + Oe(O, Bt) | 0, O = O + rt | 0, C = C + pe + Oe(O, rt) | 0, O = O + j | 0, C = C + q + Oe(O, j) | 0;
15254
15254
  var H = Pe + le | 0, W = be + re + Oe(H, Pe) | 0;
15255
- f = c, k = x, c = a, x = w, a = o, w = g, g = p + O | 0, o = s + C + Oe(g, p) | 0, s = i, p = y, i = n, y = h, n = r, h = l, l = O + H | 0, r = C + W + Oe(l, O) | 0;
15255
+ f = c, k = x, c = a, x = _, a = o, _ = g, g = p + O | 0, o = s + C + Oe(g, p) | 0, s = i, p = y, i = n, y = h, n = r, h = l, l = O + H | 0, r = C + W + Oe(l, O) | 0;
15256
15256
  }
15257
- this._al = this._al + l | 0, this._bl = this._bl + h | 0, this._cl = this._cl + y | 0, this._dl = this._dl + p | 0, this._el = this._el + g | 0, this._fl = this._fl + w | 0, this._gl = this._gl + x | 0, this._hl = this._hl + k | 0, this._ah = this._ah + r + Oe(this._al, l) | 0, this._bh = this._bh + n + Oe(this._bl, h) | 0, this._ch = this._ch + i + Oe(this._cl, y) | 0, this._dh = this._dh + s + Oe(this._dl, p) | 0, this._eh = this._eh + o + Oe(this._el, g) | 0, this._fh = this._fh + a + Oe(this._fl, w) | 0, this._gh = this._gh + c + Oe(this._gl, x) | 0, this._hh = this._hh + f + Oe(this._hl, k) | 0;
15257
+ this._al = this._al + l | 0, this._bl = this._bl + h | 0, this._cl = this._cl + y | 0, this._dl = this._dl + p | 0, this._el = this._el + g | 0, this._fl = this._fl + _ | 0, this._gl = this._gl + x | 0, this._hl = this._hl + k | 0, this._ah = this._ah + r + Oe(this._al, l) | 0, this._bh = this._bh + n + Oe(this._bl, h) | 0, this._ch = this._ch + i + Oe(this._cl, y) | 0, this._dh = this._dh + s + Oe(this._dl, p) | 0, this._eh = this._eh + o + Oe(this._el, g) | 0, this._fh = this._fh + a + Oe(this._fl, _) | 0, this._gh = this._gh + c + Oe(this._gl, x) | 0, this._hh = this._hh + f + Oe(this._hl, k) | 0;
15258
15258
  };
15259
15259
  Gi.prototype._hash = function() {
15260
15260
  var e = b2.allocUnsafe(64);
@@ -15387,16 +15387,16 @@ function D2(e) {
15387
15387
  throw new TypeError("Expected Buffer");
15388
15388
  if (p.length === 0)
15389
15389
  return "";
15390
- for (var g = 0, w = 0, x = 0, k = p.length; x !== k && p[x] === 0; )
15390
+ for (var g = 0, _ = 0, x = 0, k = p.length; x !== k && p[x] === 0; )
15391
15391
  x++, g++;
15392
15392
  for (var T = (k - x) * f + 1 >>> 0, A = new Uint8Array(T); x !== k; ) {
15393
- for (var E = p[x], I = 0, S = T - 1; (E !== 0 || I < w) && S !== -1; S--, I++)
15393
+ for (var E = p[x], I = 0, S = T - 1; (E !== 0 || I < _) && S !== -1; S--, I++)
15394
15394
  E += 256 * A[S] >>> 0, A[S] = E % o >>> 0, E = E / o >>> 0;
15395
15395
  if (E !== 0)
15396
15396
  throw new Error("Non-zero carry");
15397
- w = I, x++;
15397
+ _ = I, x++;
15398
15398
  }
15399
- for (var U = T - w; U !== T && A[U] === 0; )
15399
+ for (var U = T - _; U !== T && A[U] === 0; )
15400
15400
  U++;
15401
15401
  for (var $ = a.repeat(g); U < T; ++U)
15402
15402
  $ += e.charAt(A[U]);
@@ -15407,8 +15407,8 @@ function D2(e) {
15407
15407
  throw new TypeError("Expected String");
15408
15408
  if (p.length === 0)
15409
15409
  return is.alloc(0);
15410
- for (var g = 0, w = 0, x = 0; p[g] === a; )
15411
- w++, g++;
15410
+ for (var g = 0, _ = 0, x = 0; p[g] === a; )
15411
+ _++, g++;
15412
15412
  for (var k = (p.length - g) * c + 1 >>> 0, T = new Uint8Array(k); g < p.length; ) {
15413
15413
  var A = p.charCodeAt(g);
15414
15414
  if (A > 255)
@@ -15424,9 +15424,9 @@ function D2(e) {
15424
15424
  }
15425
15425
  for (var U = k - x; U !== k && T[U] === 0; )
15426
15426
  U++;
15427
- var $ = is.allocUnsafe(w + (k - U));
15428
- $.fill(0, 0, w);
15429
- for (var B = w; U !== k; )
15427
+ var $ = is.allocUnsafe(_ + (k - U));
15428
+ $.fill(0, 0, _);
15429
+ for (var B = _; U !== k; )
15430
15430
  $[B++] = T[U++];
15431
15431
  return $;
15432
15432
  }
@@ -17342,31 +17342,33 @@ class C_ {
17342
17342
  }
17343
17343
  }
17344
17344
  async _initiateOnErc20HTLC(t, r, n, i, s, o, a) {
17345
- var c;
17346
17345
  if (!this.wallet.account) return Se("No account found");
17347
17346
  try {
17348
- const f = await this.auth.getAuthHeaders();
17349
- if (f.error) return Se(f.error);
17350
- const l = ko({
17347
+ const c = await this.auth.getAuthHeaders();
17348
+ if (c.error) return Se(c.error);
17349
+ const f = ko({
17351
17350
  address: Qr(s),
17352
17351
  abi: pf,
17353
17352
  client: this.wallet
17354
17353
  });
17355
- console.log("wallet Id in _initiateOnErc20HTLC", (c = this.wallet.chain) == null ? void 0 : c.id);
17356
- const h = await fh(
17354
+ console.log(
17355
+ "wallet Id in _initiateOnErc20HTLC",
17356
+ await this.wallet.getChainId()
17357
+ );
17358
+ const l = await fh(
17357
17359
  Number(n),
17358
17360
  o,
17359
17361
  s,
17360
17362
  this.wallet
17361
17363
  );
17362
- if (h.error) return Se(h.error);
17363
- const y = await l.read.eip712Domain(), p = await this.wallet.signTypedData({
17364
+ if (console.log("approval.error :", l.error), l.error) return Se(l.error);
17365
+ const h = await f.read.eip712Domain(), y = await this.wallet.signTypedData({
17364
17366
  account: this.wallet.account,
17365
17367
  domain: {
17366
- name: y[1],
17367
- version: y[2],
17368
- chainId: Number(y[3]),
17369
- verifyingContract: y[4]
17368
+ name: h[1],
17369
+ version: h[2],
17370
+ chainId: Number(h[3]),
17371
+ verifyingContract: h[4]
17370
17372
  },
17371
17373
  types: {
17372
17374
  Initiate: [
@@ -17383,23 +17385,23 @@ class C_ {
17383
17385
  amount: n,
17384
17386
  secretHash: t
17385
17387
  }
17386
- }), g = {
17387
- ...f.val,
17388
+ }), p = {
17389
+ ...c.val,
17388
17390
  "Content-Type": "application/json"
17389
- }, w = await $t.post(
17391
+ }, g = await $t.post(
17390
17392
  this.url.endpoint("initiate"),
17391
17393
  {
17392
17394
  body: JSON.stringify({
17393
17395
  order_id: a,
17394
- signature: p,
17396
+ signature: y,
17395
17397
  perform_on: "Source"
17396
17398
  }),
17397
- headers: g
17399
+ headers: p
17398
17400
  }
17399
17401
  );
17400
- return w.error ? Se(w.error) : w.result ? nn(w.result) : Se("Init: No result found");
17401
- } catch (f) {
17402
- return console.log("init error :", f), Se(String(f));
17402
+ return g.error ? Se(g.error) : g.result ? nn(g.result) : Se("Init: No result found");
17403
+ } catch (c) {
17404
+ return console.log("init error :", c), Se(String(c));
17403
17405
  }
17404
17406
  }
17405
17407
  async redeem(t, r) {