@pufferfinance/puffer-sdk 1.2.1 → 1.2.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.
@@ -1,7 +1,7 @@
1
- var ui = Object.defineProperty;
2
- var ci = (e, t, n) => t in e ? ui(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var L = (e, t, n) => ci(e, typeof t != "symbol" ? t + "" : t, n);
4
- const di = "1.0.0";
1
+ var ci = Object.defineProperty;
2
+ var di = (e, t, n) => t in e ? ci(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var j = (e, t, n) => di(e, typeof t != "symbol" ? t + "" : t, n);
4
+ const li = "1.0.0";
5
5
  let ne = class $n extends Error {
6
6
  constructor(t, n = {}) {
7
7
  var i;
@@ -11,7 +11,7 @@ let ne = class $n extends Error {
11
11
  ...n.metaMessages ? [...n.metaMessages, ""] : [],
12
12
  ...a ? [`Docs: https://abitype.dev${a}`] : [],
13
13
  ...r ? [`Details: ${r}`] : [],
14
- `Version: abitype@${di}`
14
+ `Version: abitype@${li}`
15
15
  ].join(`
16
16
  `);
17
17
  super(s), Object.defineProperty(this, "details", {
@@ -73,58 +73,58 @@ function ct(e) {
73
73
  }
74
74
  return t;
75
75
  }
76
- function li(e) {
76
+ function pi(e) {
77
77
  return e.type === "function" ? `function ${e.name}(${ct(e.inputs)})${e.stateMutability && e.stateMutability !== "nonpayable" ? ` ${e.stateMutability}` : ""}${e.outputs.length ? ` returns (${ct(e.outputs)})` : ""}` : e.type === "event" ? `event ${e.name}(${ct(e.inputs)})` : e.type === "error" ? `error ${e.name}(${ct(e.inputs)})` : e.type === "constructor" ? `constructor(${ct(e.inputs)})${e.stateMutability === "payable" ? " payable" : ""}` : e.type === "fallback" ? "fallback()" : "receive() external payable";
78
78
  }
79
79
  const Ia = /^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
80
- function pi(e) {
80
+ function yi(e) {
81
81
  return Ia.test(e);
82
82
  }
83
- function yi(e) {
83
+ function fi(e) {
84
84
  return ke(Ia, e);
85
85
  }
86
86
  const Ma = /^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
87
- function fi(e) {
87
+ function mi(e) {
88
88
  return Ma.test(e);
89
89
  }
90
- function mi(e) {
90
+ function bi(e) {
91
91
  return ke(Ma, e);
92
92
  }
93
93
  const Sa = /^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;
94
- function bi(e) {
94
+ function hi(e) {
95
95
  return Sa.test(e);
96
96
  }
97
- function hi(e) {
97
+ function gi(e) {
98
98
  return ke(Sa, e);
99
99
  }
100
100
  const Ba = /^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;
101
101
  function $a(e) {
102
102
  return Ba.test(e);
103
103
  }
104
- function gi(e) {
104
+ function wi(e) {
105
105
  return ke(Ba, e);
106
106
  }
107
107
  const ka = /^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;
108
- function wi(e) {
108
+ function Ti(e) {
109
109
  return ka.test(e);
110
110
  }
111
- function Ti(e) {
111
+ function vi(e) {
112
112
  return ke(ka, e);
113
113
  }
114
- const vi = /^fallback\(\)$/;
115
- function xi(e) {
116
- return vi.test(e);
114
+ const xi = /^fallback\(\)$/;
115
+ function Ei(e) {
116
+ return xi.test(e);
117
117
  }
118
- const Ei = /^receive\(\) external payable$/;
119
- function Pi(e) {
120
- return Ei.test(e);
118
+ const Pi = /^receive\(\) external payable$/;
119
+ function Ci(e) {
120
+ return Pi.test(e);
121
121
  }
122
- const Ci = /* @__PURE__ */ new Set(["indexed"]), On = /* @__PURE__ */ new Set([
122
+ const Ai = /* @__PURE__ */ new Set(["indexed"]), On = /* @__PURE__ */ new Set([
123
123
  "calldata",
124
124
  "memory",
125
125
  "storage"
126
126
  ]);
127
- class Ai extends ne {
127
+ class Ii extends ne {
128
128
  constructor({ type: t }) {
129
129
  super("Unknown type.", {
130
130
  metaMessages: [
@@ -138,7 +138,7 @@ class Ai extends ne {
138
138
  });
139
139
  }
140
140
  }
141
- class Ii extends ne {
141
+ class Mi extends ne {
142
142
  constructor({ type: t }) {
143
143
  super("Unknown type.", {
144
144
  metaMessages: [`Type "${t}" is not a valid ABI type.`]
@@ -150,7 +150,7 @@ class Ii extends ne {
150
150
  });
151
151
  }
152
152
  }
153
- class Mi extends ne {
153
+ class Si extends ne {
154
154
  constructor({ param: t }) {
155
155
  super("Invalid ABI parameter.", {
156
156
  details: t
@@ -162,7 +162,7 @@ class Mi extends ne {
162
162
  });
163
163
  }
164
164
  }
165
- class Si extends ne {
165
+ class Bi extends ne {
166
166
  constructor({ param: t, name: n }) {
167
167
  super("Invalid ABI parameter.", {
168
168
  details: t,
@@ -177,7 +177,7 @@ class Si extends ne {
177
177
  });
178
178
  }
179
179
  }
180
- class Bi extends ne {
180
+ class $i extends ne {
181
181
  constructor({ param: t, type: n, modifier: r }) {
182
182
  super("Invalid ABI parameter.", {
183
183
  details: t,
@@ -192,7 +192,7 @@ class Bi extends ne {
192
192
  });
193
193
  }
194
194
  }
195
- class $i extends ne {
195
+ class ki extends ne {
196
196
  constructor({ param: t, type: n, modifier: r }) {
197
197
  super("Invalid ABI parameter.", {
198
198
  details: t,
@@ -208,7 +208,7 @@ class $i extends ne {
208
208
  });
209
209
  }
210
210
  }
211
- class ki extends ne {
211
+ class Oi extends ne {
212
212
  constructor({ abiParameter: t }) {
213
213
  super("Invalid ABI parameter.", {
214
214
  details: JSON.stringify(t, null, 2),
@@ -233,7 +233,7 @@ class pt extends ne {
233
233
  });
234
234
  }
235
235
  }
236
- class Oi extends ne {
236
+ class Ri extends ne {
237
237
  constructor({ signature: t }) {
238
238
  super("Unknown signature.", {
239
239
  details: t
@@ -245,7 +245,7 @@ class Oi extends ne {
245
245
  });
246
246
  }
247
247
  }
248
- class Ri extends ne {
248
+ class Fi extends ne {
249
249
  constructor({ signature: t }) {
250
250
  super("Invalid struct signature.", {
251
251
  details: t,
@@ -258,7 +258,7 @@ class Ri extends ne {
258
258
  });
259
259
  }
260
260
  }
261
- class Fi extends ne {
261
+ class Ni extends ne {
262
262
  constructor({ type: t }) {
263
263
  super("Circular reference detected.", {
264
264
  metaMessages: [`Struct "${t}" is a circular reference.`]
@@ -270,7 +270,7 @@ class Fi extends ne {
270
270
  });
271
271
  }
272
272
  }
273
- class Ni extends ne {
273
+ class Di extends ne {
274
274
  constructor({ current: t, depth: n }) {
275
275
  super("Unbalanced parentheses.", {
276
276
  metaMessages: [
@@ -285,7 +285,7 @@ class Ni extends ne {
285
285
  });
286
286
  }
287
287
  }
288
- function Di(e, t) {
288
+ function Ui(e, t) {
289
289
  return t ? `${t}:${e}` : e;
290
290
  }
291
291
  const wn = /* @__PURE__ */ new Map([
@@ -342,9 +342,9 @@ const wn = /* @__PURE__ */ new Map([
342
342
  { type: "uint256", name: "tokenId", indexed: !0 }
343
343
  ]
344
344
  ]);
345
- function Ui(e, t = {}) {
346
- if (bi(e)) {
347
- const n = hi(e);
345
+ function Hi(e, t = {}) {
346
+ if (hi(e)) {
347
+ const n = gi(e);
348
348
  if (!n)
349
349
  throw new pt({ signature: e, type: "function" });
350
350
  const r = ie(n.parameters), a = [], s = r.length;
@@ -372,21 +372,21 @@ function Ui(e, t = {}) {
372
372
  outputs: i
373
373
  };
374
374
  }
375
- if (fi(e)) {
376
- const n = mi(e);
375
+ if (mi(e)) {
376
+ const n = bi(e);
377
377
  if (!n)
378
378
  throw new pt({ signature: e, type: "event" });
379
379
  const r = ie(n.parameters), a = [], s = r.length;
380
380
  for (let i = 0; i < s; i++)
381
381
  a.push(Ne(r[i], {
382
- modifiers: Ci,
382
+ modifiers: Ai,
383
383
  structs: t,
384
384
  type: "event"
385
385
  }));
386
386
  return { name: n.name, type: "event", inputs: a };
387
387
  }
388
- if (pi(e)) {
389
- const n = yi(e);
388
+ if (yi(e)) {
389
+ const n = fi(e);
390
390
  if (!n)
391
391
  throw new pt({ signature: e, type: "error" });
392
392
  const r = ie(n.parameters), a = [], s = r.length;
@@ -394,8 +394,8 @@ function Ui(e, t = {}) {
394
394
  a.push(Ne(r[i], { structs: t, type: "error" }));
395
395
  return { name: n.name, type: "error", inputs: a };
396
396
  }
397
- if (wi(e)) {
398
- const n = Ti(e);
397
+ if (Ti(e)) {
398
+ const n = vi(e);
399
399
  if (!n)
400
400
  throw new pt({ signature: e, type: "constructor" });
401
401
  const r = ie(n.parameters), a = [], s = r.length;
@@ -407,26 +407,26 @@ function Ui(e, t = {}) {
407
407
  inputs: a
408
408
  };
409
409
  }
410
- if (xi(e))
410
+ if (Ei(e))
411
411
  return { type: "fallback" };
412
- if (Pi(e))
412
+ if (Ci(e))
413
413
  return {
414
414
  type: "receive",
415
415
  stateMutability: "payable"
416
416
  };
417
- throw new Oi({ signature: e });
417
+ throw new Ri({ signature: e });
418
418
  }
419
- const ji = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/, Li = /^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/, Hi = /^u?int$/;
419
+ const ji = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/, Li = /^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/, zi = /^u?int$/;
420
420
  function Ne(e, t) {
421
421
  var d, p;
422
- const n = Di(e, t == null ? void 0 : t.type);
422
+ const n = Ui(e, t == null ? void 0 : t.type);
423
423
  if (wn.has(n))
424
424
  return wn.get(n);
425
425
  const r = Aa.test(e), a = ke(r ? Li : ji, e);
426
426
  if (!a)
427
- throw new Mi({ param: e });
428
- if (a.name && _i(a.name))
429
- throw new Si({ param: e, name: a.name });
427
+ throw new Si({ param: e });
428
+ if (a.name && qi(a.name))
429
+ throw new Bi({ param: e, name: a.name });
430
430
  const s = a.name ? { name: a.name } : {}, i = a.modifier === "indexed" ? { indexed: !0 } : {}, o = (t == null ? void 0 : t.structs) ?? {};
431
431
  let u, c = {};
432
432
  if (r) {
@@ -437,19 +437,19 @@ function Ne(e, t) {
437
437
  c = { components: f };
438
438
  } else if (a.type in o)
439
439
  u = "tuple", c = { components: o[a.type] };
440
- else if (Hi.test(a.type))
440
+ else if (zi.test(a.type))
441
441
  u = `${a.type}256`;
442
442
  else if (u = a.type, (t == null ? void 0 : t.type) !== "struct" && !Oa(u))
443
- throw new Ii({ type: u });
443
+ throw new Mi({ type: u });
444
444
  if (a.modifier) {
445
445
  if (!((p = (d = t == null ? void 0 : t.modifiers) == null ? void 0 : d.has) != null && p.call(d, a.modifier)))
446
- throw new Bi({
446
+ throw new $i({
447
447
  param: e,
448
448
  type: t == null ? void 0 : t.type,
449
449
  modifier: a.modifier
450
450
  });
451
- if (On.has(a.modifier) && !qi(u, !!a.array))
452
- throw new $i({
451
+ if (On.has(a.modifier) && !Gi(u, !!a.array))
452
+ throw new ki({
453
453
  param: e,
454
454
  type: t == null ? void 0 : t.type,
455
455
  modifier: a.modifier
@@ -481,26 +481,26 @@ function ie(e, t = [], n = "", r = 0) {
481
481
  if (n === "")
482
482
  return t;
483
483
  if (r !== 0)
484
- throw new Ni({ current: n, depth: r });
484
+ throw new Di({ current: n, depth: r });
485
485
  return t.push(n.trim()), t;
486
486
  }
487
487
  function Oa(e) {
488
488
  return e === "address" || e === "bool" || e === "function" || e === "string" || Pa.test(e) || Ca.test(e);
489
489
  }
490
- const zi = /^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;
491
- function _i(e) {
492
- return e === "address" || e === "bool" || e === "function" || e === "string" || e === "tuple" || Pa.test(e) || Ca.test(e) || zi.test(e);
490
+ const _i = /^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;
491
+ function qi(e) {
492
+ return e === "address" || e === "bool" || e === "function" || e === "string" || e === "tuple" || Pa.test(e) || Ca.test(e) || _i.test(e);
493
493
  }
494
- function qi(e, t) {
494
+ function Gi(e, t) {
495
495
  return t || e === "bytes" || e === "string" || e === "tuple";
496
496
  }
497
- function Gi(e) {
497
+ function Wi(e) {
498
498
  const t = {}, n = e.length;
499
499
  for (let i = 0; i < n; i++) {
500
500
  const o = e[i];
501
501
  if (!$a(o))
502
502
  continue;
503
- const u = gi(o);
503
+ const u = wi(o);
504
504
  if (!u)
505
505
  throw new pt({ signature: o, type: "struct" });
506
506
  const c = u.properties.split(";"), l = [], d = c.length;
@@ -514,7 +514,7 @@ function Gi(e) {
514
514
  l.push(y);
515
515
  }
516
516
  if (!l.length)
517
- throw new Ri({ signature: o });
517
+ throw new Fi({ signature: o });
518
518
  t[u.name] = l;
519
519
  }
520
520
  const r = {}, a = Object.entries(t), s = a.length;
@@ -524,7 +524,7 @@ function Gi(e) {
524
524
  }
525
525
  return r;
526
526
  }
527
- const Wi = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;
527
+ const Vi = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;
528
528
  function Ra(e, t, n = /* @__PURE__ */ new Set()) {
529
529
  const r = [], a = e.length;
530
530
  for (let s = 0; s < a; s++) {
@@ -532,13 +532,13 @@ function Ra(e, t, n = /* @__PURE__ */ new Set()) {
532
532
  if (Aa.test(i.type))
533
533
  r.push(i);
534
534
  else {
535
- const u = ke(Wi, i.type);
535
+ const u = ke(Vi, i.type);
536
536
  if (!(u != null && u.type))
537
- throw new ki({ abiParameter: i });
537
+ throw new Oi({ abiParameter: i });
538
538
  const { array: c, type: l } = u;
539
539
  if (l in t) {
540
540
  if (n.has(l))
541
- throw new Fi({ type: l });
541
+ throw new Ni({ type: l });
542
542
  r.push({
543
543
  ...i,
544
544
  type: `tuple${c ?? ""}`,
@@ -547,16 +547,16 @@ function Ra(e, t, n = /* @__PURE__ */ new Set()) {
547
547
  } else if (Oa(l))
548
548
  r.push(i);
549
549
  else
550
- throw new Ai({ type: l });
550
+ throw new Ii({ type: l });
551
551
  }
552
552
  }
553
553
  return r;
554
554
  }
555
- function Vi(e) {
556
- const t = Gi(e), n = [], r = e.length;
555
+ function Zi(e) {
556
+ const t = Wi(e), n = [], r = e.length;
557
557
  for (let a = 0; a < r; a++) {
558
558
  const s = e[a];
559
- $a(s) || n.push(Ui(s, t));
559
+ $a(s) || n.push(Hi(s, t));
560
560
  }
561
561
  return n;
562
562
  }
@@ -568,22 +568,22 @@ function S(e, t, n) {
568
568
  }
569
569
  function he(e, { includeName: t = !1 } = {}) {
570
570
  if (e.type !== "function" && e.type !== "event" && e.type !== "error")
571
- throw new co(e.type);
571
+ throw new lo(e.type);
572
572
  return `${e.name}(${Xt(e.inputs, { includeName: t })})`;
573
573
  }
574
574
  function Xt(e, { includeName: t = !1 } = {}) {
575
- return e ? e.map((n) => Zi(n, { includeName: t })).join(t ? ", " : ",") : "";
575
+ return e ? e.map((n) => Ki(n, { includeName: t })).join(t ? ", " : ",") : "";
576
576
  }
577
- function Zi(e, { includeName: t }) {
577
+ function Ki(e, { includeName: t }) {
578
578
  return e.type.startsWith("tuple") ? `(${Xt(e.components, { includeName: t })})${e.type.slice(5)}` : e.type + (t && e.name ? ` ${e.name}` : "");
579
579
  }
580
580
  function de(e, { strict: t = !0 } = {}) {
581
581
  return !e || typeof e != "string" ? !1 : t ? /^0x[0-9a-fA-F]*$/.test(e) : e.startsWith("0x");
582
582
  }
583
- function H(e) {
583
+ function L(e) {
584
584
  return de(e, { strict: !1 }) ? Math.ceil((e.length - 2) / 2) : e.length;
585
585
  }
586
- const Ki = "2.14.0", Yi = (e) => e, rr = (e) => e, Ji = () => `viem@${Ki}`;
586
+ const Yi = "2.14.0", Ji = (e) => e, rr = (e) => e, Xi = () => `viem@${Yi}`;
587
587
  class v extends Error {
588
588
  constructor(t, n = {}) {
589
589
  var s;
@@ -616,7 +616,7 @@ class v extends Error {
616
616
  enumerable: !0,
617
617
  configurable: !0,
618
618
  writable: !0,
619
- value: Ji()
619
+ value: Xi()
620
620
  });
621
621
  const r = n.cause instanceof v ? n.cause.details : (s = n.cause) != null && s.message ? n.cause.message : n.details, a = n.cause instanceof v && n.cause.docsPath || n.docsPath;
622
622
  this.message = [
@@ -638,7 +638,7 @@ class v extends Error {
638
638
  function Fa(e, t) {
639
639
  return t != null && t(e) ? e : e && typeof e == "object" && "cause" in e ? Fa(e.cause, t) : t ? null : e;
640
640
  }
641
- class Xi extends v {
641
+ class Qi extends v {
642
642
  constructor({ docsPath: t }) {
643
643
  super([
644
644
  "A constructor was not found on the ABI.",
@@ -711,7 +711,7 @@ class Qt extends v {
711
711
  });
712
712
  }
713
713
  }
714
- class Qi extends v {
714
+ class eo extends v {
715
715
  constructor({ expectedLength: t, givenLength: n, type: r }) {
716
716
  super([
717
717
  `ABI encoding array length mismatch for type ${r}.`,
@@ -726,9 +726,9 @@ class Qi extends v {
726
726
  });
727
727
  }
728
728
  }
729
- class eo extends v {
729
+ class to extends v {
730
730
  constructor({ expectedSize: t, value: n }) {
731
- super(`Size of bytes "${n}" (bytes${H(n)}) does not match expected size (bytes${t}).`), Object.defineProperty(this, "name", {
731
+ super(`Size of bytes "${n}" (bytes${L(n)}) does not match expected size (bytes${t}).`), Object.defineProperty(this, "name", {
732
732
  enumerable: !0,
733
733
  configurable: !0,
734
734
  writable: !0,
@@ -736,7 +736,7 @@ class eo extends v {
736
736
  });
737
737
  }
738
738
  }
739
- class to extends v {
739
+ class no extends v {
740
740
  constructor({ expectedLength: t, givenLength: n }) {
741
741
  super([
742
742
  "ABI encoding params/values length mismatch.",
@@ -773,7 +773,7 @@ class Da extends v {
773
773
  }), this.signature = t;
774
774
  }
775
775
  }
776
- class no extends v {
776
+ class ro extends v {
777
777
  constructor({ docsPath: t }) {
778
778
  super("Cannot extract event signature from empty topics.", {
779
779
  docsPath: t
@@ -818,7 +818,7 @@ class Wr extends v {
818
818
  });
819
819
  }
820
820
  }
821
- class Wt extends v {
821
+ class Gt extends v {
822
822
  constructor(t, { docsPath: n } = {}) {
823
823
  super([
824
824
  `Function ${t ? `"${t}" ` : ""}not found on ABI.`,
@@ -834,7 +834,7 @@ class Wt extends v {
834
834
  });
835
835
  }
836
836
  }
837
- class ro extends v {
837
+ class ao extends v {
838
838
  constructor(t, { docsPath: n }) {
839
839
  super([
840
840
  `Function "${t}" does not contain any \`outputs\` on ABI.`,
@@ -851,7 +851,7 @@ class ro extends v {
851
851
  });
852
852
  }
853
853
  }
854
- class ao extends v {
854
+ class so extends v {
855
855
  constructor(t, n) {
856
856
  super("Found ambiguous types in overloaded ABI items.", {
857
857
  metaMessages: [
@@ -869,7 +869,7 @@ class ao extends v {
869
869
  });
870
870
  }
871
871
  }
872
- class so extends v {
872
+ class io extends v {
873
873
  constructor({ expectedSize: t, givenSize: n }) {
874
874
  super(`Expected bytes${t}, got bytes${n}.`), Object.defineProperty(this, "name", {
875
875
  enumerable: !0,
@@ -935,7 +935,7 @@ class en extends v {
935
935
  }), this.abiItem = t;
936
936
  }
937
937
  }
938
- class io extends v {
938
+ class oo extends v {
939
939
  constructor(t, { docsPath: n }) {
940
940
  super([
941
941
  `Type "${t}" is not a valid encoding type.`,
@@ -949,7 +949,7 @@ class io extends v {
949
949
  });
950
950
  }
951
951
  }
952
- class oo extends v {
952
+ class uo extends v {
953
953
  constructor(t, { docsPath: n }) {
954
954
  super([
955
955
  `Type "${t}" is not a valid decoding type.`,
@@ -963,7 +963,7 @@ class oo extends v {
963
963
  });
964
964
  }
965
965
  }
966
- class uo extends v {
966
+ class co extends v {
967
967
  constructor(t) {
968
968
  super([`Value "${t}" is not a valid array.`].join(`
969
969
  `)), Object.defineProperty(this, "name", {
@@ -974,7 +974,7 @@ class uo extends v {
974
974
  });
975
975
  }
976
976
  }
977
- class co extends v {
977
+ class lo extends v {
978
978
  constructor(t) {
979
979
  super([
980
980
  `"${t}" is not a valid definition type.`,
@@ -988,7 +988,7 @@ class co extends v {
988
988
  });
989
989
  }
990
990
  }
991
- class lo extends v {
991
+ class po extends v {
992
992
  constructor(t) {
993
993
  super(`Filter type "${t}" is not supported.`), Object.defineProperty(this, "name", {
994
994
  enumerable: !0,
@@ -998,7 +998,7 @@ class lo extends v {
998
998
  });
999
999
  }
1000
1000
  }
1001
- class ja extends v {
1001
+ class Ha extends v {
1002
1002
  constructor({ offset: t, position: n, size: r }) {
1003
1003
  super(`Slice ${n === "start" ? "starting" : "ending"} at offset "${t}" is out-of-bounds (size: ${r}).`), Object.defineProperty(this, "name", {
1004
1004
  enumerable: !0,
@@ -1008,7 +1008,7 @@ class ja extends v {
1008
1008
  });
1009
1009
  }
1010
1010
  }
1011
- class La extends v {
1011
+ class ja extends v {
1012
1012
  constructor({ size: t, targetSize: n, type: r }) {
1013
1013
  super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`), Object.defineProperty(this, "name", {
1014
1014
  enumerable: !0,
@@ -1029,25 +1029,25 @@ class Vr extends v {
1029
1029
  }
1030
1030
  }
1031
1031
  function rt(e, { dir: t, size: n = 32 } = {}) {
1032
- return typeof e == "string" ? te(e, { dir: t, size: n }) : po(e, { dir: t, size: n });
1032
+ return typeof e == "string" ? te(e, { dir: t, size: n }) : yo(e, { dir: t, size: n });
1033
1033
  }
1034
1034
  function te(e, { dir: t, size: n = 32 } = {}) {
1035
1035
  if (n === null)
1036
1036
  return e;
1037
1037
  const r = e.replace("0x", "");
1038
1038
  if (r.length > n * 2)
1039
- throw new La({
1039
+ throw new ja({
1040
1040
  size: Math.ceil(r.length / 2),
1041
1041
  targetSize: n,
1042
1042
  type: "hex"
1043
1043
  });
1044
1044
  return `0x${r[t === "right" ? "padEnd" : "padStart"](n * 2, "0")}`;
1045
1045
  }
1046
- function po(e, { dir: t, size: n = 32 } = {}) {
1046
+ function yo(e, { dir: t, size: n = 32 } = {}) {
1047
1047
  if (n === null)
1048
1048
  return e;
1049
1049
  if (e.length > n)
1050
- throw new La({
1050
+ throw new ja({
1051
1051
  size: e.length,
1052
1052
  targetSize: n,
1053
1053
  type: "bytes"
@@ -1059,7 +1059,7 @@ function po(e, { dir: t, size: n = 32 } = {}) {
1059
1059
  }
1060
1060
  return r;
1061
1061
  }
1062
- class yo extends v {
1062
+ class fo extends v {
1063
1063
  constructor({ max: t, min: n, signed: r, size: a, value: s }) {
1064
1064
  super(`Number "${s}" is not in safe ${a ? `${a * 8}-bit ${r ? "signed" : "unsigned"} ` : ""}integer range ${t ? `(${n} to ${t})` : `(above ${n})`}`), Object.defineProperty(this, "name", {
1065
1065
  enumerable: !0,
@@ -1069,7 +1069,7 @@ class yo extends v {
1069
1069
  });
1070
1070
  }
1071
1071
  }
1072
- class fo extends v {
1072
+ class mo extends v {
1073
1073
  constructor(t) {
1074
1074
  super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`), Object.defineProperty(this, "name", {
1075
1075
  enumerable: !0,
@@ -1079,7 +1079,7 @@ class fo extends v {
1079
1079
  });
1080
1080
  }
1081
1081
  }
1082
- class mo extends v {
1082
+ class bo extends v {
1083
1083
  constructor({ givenSize: t, maxSize: n }) {
1084
1084
  super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`), Object.defineProperty(this, "name", {
1085
1085
  enumerable: !0,
@@ -1096,9 +1096,9 @@ function tn(e, { dir: t = "left" } = {}) {
1096
1096
  return n = t === "left" ? n.slice(r) : n.slice(0, n.length - r), typeof e == "string" ? (n.length === 1 && t === "right" && (n = `${n}0`), `0x${n.length % 2 === 1 ? `0${n}` : n}`) : n;
1097
1097
  }
1098
1098
  function pe(e, { size: t }) {
1099
- if (H(e) > t)
1100
- throw new mo({
1101
- givenSize: H(e),
1099
+ if (L(e) > t)
1100
+ throw new bo({
1101
+ givenSize: L(e),
1102
1102
  maxSize: t
1103
1103
  });
1104
1104
  }
@@ -1114,18 +1114,18 @@ function Ye(e, t = {}) {
1114
1114
  function Ae(e, t = {}) {
1115
1115
  return Number(Ye(e, t));
1116
1116
  }
1117
- const bo = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
1117
+ const ho = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
1118
1118
  function Oe(e, t = {}) {
1119
- return typeof e == "number" || typeof e == "bigint" ? O(e, t) : typeof e == "string" ? ar(e, t) : typeof e == "boolean" ? Ha(e, t) : q(e, t);
1119
+ return typeof e == "number" || typeof e == "bigint" ? O(e, t) : typeof e == "string" ? ar(e, t) : typeof e == "boolean" ? La(e, t) : q(e, t);
1120
1120
  }
1121
- function Ha(e, t = {}) {
1121
+ function La(e, t = {}) {
1122
1122
  const n = `0x${Number(e)}`;
1123
1123
  return typeof t.size == "number" ? (pe(n, { size: t.size }), rt(n, { size: t.size })) : n;
1124
1124
  }
1125
1125
  function q(e, t = {}) {
1126
1126
  let n = "";
1127
1127
  for (let a = 0; a < e.length; a++)
1128
- n += bo[e[a]];
1128
+ n += ho[e[a]];
1129
1129
  const r = `0x${n}`;
1130
1130
  return typeof t.size == "number" ? (pe(r, { size: t.size }), rt(r, { dir: "right", size: t.size })) : r;
1131
1131
  }
@@ -1136,7 +1136,7 @@ function O(e, t = {}) {
1136
1136
  const i = typeof s == "bigint" && n ? -s - 1n : 0;
1137
1137
  if (s && a > s || a < i) {
1138
1138
  const u = typeof e == "bigint" ? "n" : "";
1139
- throw new yo({
1139
+ throw new fo({
1140
1140
  max: s ? `${s}${u}` : void 0,
1141
1141
  min: `${i}${u}`,
1142
1142
  signed: n,
@@ -1147,16 +1147,16 @@ function O(e, t = {}) {
1147
1147
  const o = `0x${(n && a < 0 ? (1n << BigInt(r * 8)) + BigInt(a) : a).toString(16)}`;
1148
1148
  return r ? rt(o, { size: r }) : o;
1149
1149
  }
1150
- const ho = /* @__PURE__ */ new TextEncoder();
1150
+ const go = /* @__PURE__ */ new TextEncoder();
1151
1151
  function ar(e, t = {}) {
1152
- const n = ho.encode(e);
1152
+ const n = go.encode(e);
1153
1153
  return q(n, t);
1154
1154
  }
1155
- const go = /* @__PURE__ */ new TextEncoder();
1155
+ const wo = /* @__PURE__ */ new TextEncoder();
1156
1156
  function Ie(e, t = {}) {
1157
- return typeof e == "number" || typeof e == "bigint" ? To(e, t) : typeof e == "boolean" ? wo(e, t) : de(e) ? He(e, t) : me(e, t);
1157
+ return typeof e == "number" || typeof e == "bigint" ? vo(e, t) : typeof e == "boolean" ? To(e, t) : de(e) ? Le(e, t) : me(e, t);
1158
1158
  }
1159
- function wo(e, t = {}) {
1159
+ function To(e, t = {}) {
1160
1160
  const n = new Uint8Array(1);
1161
1161
  return n[0] = Number(e), typeof t.size == "number" ? (pe(n, { size: t.size }), rt(n, { size: t.size })) : n;
1162
1162
  }
@@ -1176,7 +1176,7 @@ function Zr(e) {
1176
1176
  if (e >= ye.a && e <= ye.f)
1177
1177
  return e - (ye.a - 10);
1178
1178
  }
1179
- function He(e, t = {}) {
1179
+ function Le(e, t = {}) {
1180
1180
  let n = e;
1181
1181
  t.size && (pe(n, { size: t.size }), n = rt(n, { dir: "right", size: t.size }));
1182
1182
  let r = n.slice(2);
@@ -1190,15 +1190,15 @@ function He(e, t = {}) {
1190
1190
  }
1191
1191
  return s;
1192
1192
  }
1193
- function To(e, t) {
1193
+ function vo(e, t) {
1194
1194
  const n = O(e, t);
1195
- return He(n);
1195
+ return Le(n);
1196
1196
  }
1197
1197
  function me(e, t = {}) {
1198
- const n = go.encode(e);
1198
+ const n = wo.encode(e);
1199
1199
  return typeof t.size == "number" ? (pe(n, { size: t.size }), rt(n, { dir: "right", size: t.size })) : n;
1200
1200
  }
1201
- function Vt(e) {
1201
+ function Wt(e) {
1202
1202
  if (!Number.isSafeInteger(e) || e < 0)
1203
1203
  throw new Error(`Wrong positive integer: ${e}`);
1204
1204
  }
@@ -1208,10 +1208,10 @@ function sr(e, ...t) {
1208
1208
  if (t.length > 0 && !t.includes(e.length))
1209
1209
  throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`);
1210
1210
  }
1211
- function vo(e) {
1211
+ function xo(e) {
1212
1212
  if (typeof e != "function" || typeof e.create != "function")
1213
1213
  throw new Error("Hash should be wrapped by utils.wrapConstructor");
1214
- Vt(e.outputLen), Vt(e.blockLen);
1214
+ Wt(e.outputLen), Wt(e.blockLen);
1215
1215
  }
1216
1216
  function Je(e, t = !0) {
1217
1217
  if (e.destroyed)
@@ -1225,34 +1225,34 @@ function za(e, t) {
1225
1225
  if (e.length < n)
1226
1226
  throw new Error(`digestInto() expects output buffer of length at least ${n}`);
1227
1227
  }
1228
- const Ht = /* @__PURE__ */ BigInt(2 ** 32 - 1), Kr = /* @__PURE__ */ BigInt(32);
1229
- function xo(e, t = !1) {
1230
- return t ? { h: Number(e & Ht), l: Number(e >> Kr & Ht) } : { h: Number(e >> Kr & Ht) | 0, l: Number(e & Ht) | 0 };
1231
- }
1228
+ const jt = /* @__PURE__ */ BigInt(2 ** 32 - 1), Kr = /* @__PURE__ */ BigInt(32);
1232
1229
  function Eo(e, t = !1) {
1230
+ return t ? { h: Number(e & jt), l: Number(e >> Kr & jt) } : { h: Number(e >> Kr & jt) | 0, l: Number(e & jt) | 0 };
1231
+ }
1232
+ function Po(e, t = !1) {
1233
1233
  let n = new Uint32Array(e.length), r = new Uint32Array(e.length);
1234
1234
  for (let a = 0; a < e.length; a++) {
1235
- const { h: s, l: i } = xo(e[a], t);
1235
+ const { h: s, l: i } = Eo(e[a], t);
1236
1236
  [n[a], r[a]] = [s, i];
1237
1237
  }
1238
1238
  return [n, r];
1239
1239
  }
1240
- const Po = (e, t, n) => e << n | t >>> 32 - n, Co = (e, t, n) => t << n | e >>> 32 - n, Ao = (e, t, n) => t << n - 32 | e >>> 64 - n, Io = (e, t, n) => e << n - 32 | t >>> 64 - n, Tn = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
1240
+ const Co = (e, t, n) => e << n | t >>> 32 - n, Ao = (e, t, n) => t << n | e >>> 32 - n, Io = (e, t, n) => t << n - 32 | e >>> 64 - n, Mo = (e, t, n) => e << n - 32 | t >>> 64 - n, Tn = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
1241
1241
  /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
1242
- const _a = (e) => e instanceof Uint8Array, Mo = (e) => new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4)), vn = (e) => new DataView(e.buffer, e.byteOffset, e.byteLength), ue = (e, t) => e << 32 - t | e >>> t, So = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
1243
- if (!So)
1242
+ const _a = (e) => e instanceof Uint8Array, So = (e) => new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4)), vn = (e) => new DataView(e.buffer, e.byteOffset, e.byteLength), ue = (e, t) => e << 32 - t | e >>> t, Bo = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
1243
+ if (!Bo)
1244
1244
  throw new Error("Non little-endian hardware is not supported");
1245
- function Bo(e) {
1245
+ function $o(e) {
1246
1246
  if (typeof e != "string")
1247
1247
  throw new Error(`utf8ToBytes expected string, got ${typeof e}`);
1248
1248
  return new Uint8Array(new TextEncoder().encode(e));
1249
1249
  }
1250
1250
  function nn(e) {
1251
- if (typeof e == "string" && (e = Bo(e)), !_a(e))
1251
+ if (typeof e == "string" && (e = $o(e)), !_a(e))
1252
1252
  throw new Error(`expected Uint8Array, got ${typeof e}`);
1253
1253
  return e;
1254
1254
  }
1255
- function $o(...e) {
1255
+ function ko(...e) {
1256
1256
  const t = new Uint8Array(e.reduce((r, a) => r + a.length, 0));
1257
1257
  let n = 0;
1258
1258
  return e.forEach((r) => {
@@ -1271,20 +1271,20 @@ function qa(e) {
1271
1271
  const t = (r) => e().update(nn(r)).digest(), n = e();
1272
1272
  return t.outputLen = n.outputLen, t.blockLen = n.blockLen, t.create = () => e(), t;
1273
1273
  }
1274
- function ko(e = 32) {
1274
+ function Oo(e = 32) {
1275
1275
  if (Tn && typeof Tn.getRandomValues == "function")
1276
1276
  return Tn.getRandomValues(new Uint8Array(e));
1277
1277
  throw new Error("crypto.getRandomValues must be defined");
1278
1278
  }
1279
- const [Ga, Wa, Va] = [[], [], []], Oo = /* @__PURE__ */ BigInt(0), dt = /* @__PURE__ */ BigInt(1), Ro = /* @__PURE__ */ BigInt(2), Fo = /* @__PURE__ */ BigInt(7), No = /* @__PURE__ */ BigInt(256), Do = /* @__PURE__ */ BigInt(113);
1279
+ const [Ga, Wa, Va] = [[], [], []], Ro = /* @__PURE__ */ BigInt(0), dt = /* @__PURE__ */ BigInt(1), Fo = /* @__PURE__ */ BigInt(2), No = /* @__PURE__ */ BigInt(7), Do = /* @__PURE__ */ BigInt(256), Uo = /* @__PURE__ */ BigInt(113);
1280
1280
  for (let e = 0, t = dt, n = 1, r = 0; e < 24; e++) {
1281
1281
  [n, r] = [r, (2 * n + 3 * r) % 5], Ga.push(2 * (5 * r + n)), Wa.push((e + 1) * (e + 2) / 2 % 64);
1282
- let a = Oo;
1282
+ let a = Ro;
1283
1283
  for (let s = 0; s < 7; s++)
1284
- t = (t << dt ^ (t >> Fo) * Do) % No, t & Ro && (a ^= dt << (dt << /* @__PURE__ */ BigInt(s)) - dt);
1284
+ t = (t << dt ^ (t >> No) * Uo) % Do, t & Fo && (a ^= dt << (dt << /* @__PURE__ */ BigInt(s)) - dt);
1285
1285
  Va.push(a);
1286
1286
  }
1287
- const [Uo, jo] = /* @__PURE__ */ Eo(Va, !0), Yr = (e, t, n) => n > 32 ? Ao(e, t, n) : Po(e, t, n), Jr = (e, t, n) => n > 32 ? Io(e, t, n) : Co(e, t, n);
1287
+ const [Ho, jo] = /* @__PURE__ */ Po(Va, !0), Yr = (e, t, n) => n > 32 ? Io(e, t, n) : Co(e, t, n), Jr = (e, t, n) => n > 32 ? Mo(e, t, n) : Ao(e, t, n);
1288
1288
  function Lo(e, t = 24) {
1289
1289
  const n = new Uint32Array(10);
1290
1290
  for (let r = 24 - t; r < 24; r++) {
@@ -1306,16 +1306,16 @@ function Lo(e, t = 24) {
1306
1306
  for (let o = 0; o < 10; o++)
1307
1307
  e[i + o] ^= ~n[(o + 2) % 10] & n[(o + 4) % 10];
1308
1308
  }
1309
- e[0] ^= Uo[r], e[1] ^= jo[r];
1309
+ e[0] ^= Ho[r], e[1] ^= jo[r];
1310
1310
  }
1311
1311
  n.fill(0);
1312
1312
  }
1313
1313
  class or extends ir {
1314
1314
  // NOTE: we accept arguments in bytes instead of bits here.
1315
1315
  constructor(t, n, r, a = !1, s = 24) {
1316
- if (super(), this.blockLen = t, this.suffix = n, this.outputLen = r, this.enableXOF = a, this.rounds = s, this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, Vt(r), 0 >= this.blockLen || this.blockLen >= 200)
1316
+ if (super(), this.blockLen = t, this.suffix = n, this.outputLen = r, this.enableXOF = a, this.rounds = s, this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, Wt(r), 0 >= this.blockLen || this.blockLen >= 200)
1317
1317
  throw new Error("Sha3 supports only keccak-f1600 function");
1318
- this.state = new Uint8Array(200), this.state32 = Mo(this.state);
1318
+ this.state = new Uint8Array(200), this.state32 = So(this.state);
1319
1319
  }
1320
1320
  keccak() {
1321
1321
  Lo(this.state32, this.rounds), this.posOut = 0, this.pos = 0;
@@ -1356,7 +1356,7 @@ class or extends ir {
1356
1356
  return this.writeInto(t);
1357
1357
  }
1358
1358
  xof(t) {
1359
- return Vt(t), this.xofInto(new Uint8Array(t));
1359
+ return Wt(t), this.xofInto(new Uint8Array(t));
1360
1360
  }
1361
1361
  digestInto(t) {
1362
1362
  if (za(t, this), this.finished)
@@ -1374,16 +1374,16 @@ class or extends ir {
1374
1374
  return t || (t = new or(n, r, a, i, s)), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = s, t.suffix = r, t.outputLen = a, t.enableXOF = i, t.destroyed = this.destroyed, t;
1375
1375
  }
1376
1376
  }
1377
- const Ho = (e, t, n) => qa(() => new or(t, e, n)), zo = /* @__PURE__ */ Ho(1, 136, 256 / 8);
1377
+ const zo = (e, t, n) => qa(() => new or(t, e, n)), _o = /* @__PURE__ */ zo(1, 136, 256 / 8);
1378
1378
  function Z(e, t) {
1379
- const n = t || "hex", r = zo(de(e, { strict: !1 }) ? Ie(e) : e);
1379
+ const n = t || "hex", r = _o(de(e, { strict: !1 }) ? Ie(e) : e);
1380
1380
  return n === "bytes" ? r : Oe(r);
1381
1381
  }
1382
- const _o = (e) => Z(Ie(e));
1383
- function qo(e) {
1384
- return _o(e);
1385
- }
1382
+ const qo = (e) => Z(Ie(e));
1386
1383
  function Go(e) {
1384
+ return qo(e);
1385
+ }
1386
+ function Wo(e) {
1387
1387
  let t = !0, n = "", r = 0, a = "", s = !1;
1388
1388
  for (let i = 0; i < e.length; i++) {
1389
1389
  const o = e[i];
@@ -1408,12 +1408,12 @@ function Go(e) {
1408
1408
  throw new v("Unable to normalize signature.");
1409
1409
  return a;
1410
1410
  }
1411
- const Wo = (e) => {
1412
- const t = typeof e == "string" ? e : li(e);
1413
- return Go(t);
1411
+ const Vo = (e) => {
1412
+ const t = typeof e == "string" ? e : pi(e);
1413
+ return Wo(t);
1414
1414
  };
1415
1415
  function Za(e) {
1416
- return qo(Wo(e));
1416
+ return Go(Vo(e));
1417
1417
  }
1418
1418
  const ur = Za;
1419
1419
  class Me extends v {
@@ -1454,23 +1454,23 @@ function rn(e, t) {
1454
1454
  const s = `0x${a.join("")}`;
1455
1455
  return xn.set(`${e}.${t}`, s), s;
1456
1456
  }
1457
- function Vo(e, t) {
1457
+ function Zo(e, t) {
1458
1458
  if (!oe(e, { strict: !1 }))
1459
1459
  throw new Me({ address: e });
1460
1460
  return rn(e, t);
1461
1461
  }
1462
- const Zo = /^0x[a-fA-F0-9]{40}$/, En = /* @__PURE__ */ new Ka(8192);
1462
+ const Ko = /^0x[a-fA-F0-9]{40}$/, En = /* @__PURE__ */ new Ka(8192);
1463
1463
  function oe(e, t) {
1464
1464
  const { strict: n = !0 } = t ?? {}, r = `${e}.${n}`;
1465
1465
  if (En.has(r))
1466
1466
  return En.get(r);
1467
- const a = Zo.test(e) ? e.toLowerCase() === e ? !0 : n ? rn(e) === e : !0 : !1;
1467
+ const a = Ko.test(e) ? e.toLowerCase() === e ? !0 : n ? rn(e) === e : !0 : !1;
1468
1468
  return En.set(r, a), a;
1469
1469
  }
1470
1470
  function ge(e) {
1471
- return typeof e[0] == "string" ? cr(e) : Ko(e);
1471
+ return typeof e[0] == "string" ? cr(e) : Yo(e);
1472
1472
  }
1473
- function Ko(e) {
1473
+ function Yo(e) {
1474
1474
  let t = 0;
1475
1475
  for (const a of e)
1476
1476
  t += a.length;
@@ -1483,27 +1483,27 @@ function Ko(e) {
1483
1483
  function cr(e) {
1484
1484
  return `0x${e.reduce((t, n) => t + n.replace("0x", ""), "")}`;
1485
1485
  }
1486
- function Zt(e, t, n, { strict: r } = {}) {
1487
- return de(e, { strict: !1 }) ? Yo(e, t, n, {
1486
+ function Vt(e, t, n, { strict: r } = {}) {
1487
+ return de(e, { strict: !1 }) ? Jo(e, t, n, {
1488
1488
  strict: r
1489
1489
  }) : Xa(e, t, n, {
1490
1490
  strict: r
1491
1491
  });
1492
1492
  }
1493
1493
  function Ya(e, t) {
1494
- if (typeof t == "number" && t > 0 && t > H(e) - 1)
1495
- throw new ja({
1494
+ if (typeof t == "number" && t > 0 && t > L(e) - 1)
1495
+ throw new Ha({
1496
1496
  offset: t,
1497
1497
  position: "start",
1498
- size: H(e)
1498
+ size: L(e)
1499
1499
  });
1500
1500
  }
1501
1501
  function Ja(e, t, n) {
1502
- if (typeof t == "number" && typeof n == "number" && H(e) !== n - t)
1503
- throw new ja({
1502
+ if (typeof t == "number" && typeof n == "number" && L(e) !== n - t)
1503
+ throw new Ha({
1504
1504
  offset: n,
1505
1505
  position: "end",
1506
- size: H(e)
1506
+ size: L(e)
1507
1507
  });
1508
1508
  }
1509
1509
  function Xa(e, t, n, { strict: r } = {}) {
@@ -1511,24 +1511,24 @@ function Xa(e, t, n, { strict: r } = {}) {
1511
1511
  const a = e.slice(t, n);
1512
1512
  return r && Ja(a, t, n), a;
1513
1513
  }
1514
- function Yo(e, t, n, { strict: r } = {}) {
1514
+ function Jo(e, t, n, { strict: r } = {}) {
1515
1515
  Ya(e, t);
1516
1516
  const a = `0x${e.replace("0x", "").slice((t ?? 0) * 2, (n ?? e.length) * 2)}`;
1517
1517
  return r && Ja(a, t, n), a;
1518
1518
  }
1519
- function kt(e, t) {
1519
+ function $t(e, t) {
1520
1520
  if (e.length !== t.length)
1521
- throw new to({
1521
+ throw new no({
1522
1522
  expectedLength: e.length,
1523
1523
  givenLength: t.length
1524
1524
  });
1525
- const n = Jo({
1525
+ const n = Xo({
1526
1526
  params: e,
1527
1527
  values: t
1528
1528
  }), r = lr(n);
1529
1529
  return r.length === 0 ? "0x" : r;
1530
1530
  }
1531
- function Jo({ params: e, values: t }) {
1531
+ function Xo({ params: e, values: t }) {
1532
1532
  const n = [];
1533
1533
  for (let r = 0; r < e.length; r++)
1534
1534
  n.push(dr({ param: e[r], value: t[r] }));
@@ -1538,25 +1538,25 @@ function dr({ param: e, value: t }) {
1538
1538
  const n = pr(e.type);
1539
1539
  if (n) {
1540
1540
  const [r, a] = n;
1541
- return Qo(t, { length: r, param: { ...e, type: a } });
1541
+ return eu(t, { length: r, param: { ...e, type: a } });
1542
1542
  }
1543
1543
  if (e.type === "tuple")
1544
- return au(t, {
1544
+ return su(t, {
1545
1545
  param: e
1546
1546
  });
1547
1547
  if (e.type === "address")
1548
- return Xo(t);
1548
+ return Qo(t);
1549
1549
  if (e.type === "bool")
1550
- return tu(t);
1550
+ return nu(t);
1551
1551
  if (e.type.startsWith("uint") || e.type.startsWith("int")) {
1552
1552
  const r = e.type.startsWith("int");
1553
- return nu(t, { signed: r });
1553
+ return ru(t, { signed: r });
1554
1554
  }
1555
1555
  if (e.type.startsWith("bytes"))
1556
- return eu(t, { param: e });
1556
+ return tu(t, { param: e });
1557
1557
  if (e.type === "string")
1558
- return ru(t);
1559
- throw new io(e.type, {
1558
+ return au(t);
1559
+ throw new oo(e.type, {
1560
1560
  docsPath: "/docs/contract/encodeAbiParameters"
1561
1561
  });
1562
1562
  }
@@ -1564,27 +1564,27 @@ function lr(e) {
1564
1564
  let t = 0;
1565
1565
  for (let s = 0; s < e.length; s++) {
1566
1566
  const { dynamic: i, encoded: o } = e[s];
1567
- i ? t += 32 : t += H(o);
1567
+ i ? t += 32 : t += L(o);
1568
1568
  }
1569
1569
  const n = [], r = [];
1570
1570
  let a = 0;
1571
1571
  for (let s = 0; s < e.length; s++) {
1572
1572
  const { dynamic: i, encoded: o } = e[s];
1573
- i ? (n.push(O(t + a, { size: 32 })), r.push(o), a += H(o)) : n.push(o);
1573
+ i ? (n.push(O(t + a, { size: 32 })), r.push(o), a += L(o)) : n.push(o);
1574
1574
  }
1575
1575
  return ge([...n, ...r]);
1576
1576
  }
1577
- function Xo(e) {
1577
+ function Qo(e) {
1578
1578
  if (!oe(e))
1579
1579
  throw new Me({ address: e });
1580
1580
  return { dynamic: !1, encoded: te(e.toLowerCase()) };
1581
1581
  }
1582
- function Qo(e, { length: t, param: n }) {
1582
+ function eu(e, { length: t, param: n }) {
1583
1583
  const r = t === null;
1584
1584
  if (!Array.isArray(e))
1585
- throw new uo(e);
1585
+ throw new co(e);
1586
1586
  if (!r && e.length !== t)
1587
- throw new Qi({
1587
+ throw new eo({
1588
1588
  expectedLength: t,
1589
1589
  givenLength: e.length,
1590
1590
  type: `${n.type}[${t}]`
@@ -1612,8 +1612,8 @@ function Qo(e, { length: t, param: n }) {
1612
1612
  encoded: ge(s.map(({ encoded: i }) => i))
1613
1613
  };
1614
1614
  }
1615
- function eu(e, { param: t }) {
1616
- const [, n] = t.type.split("bytes"), r = H(e);
1615
+ function tu(e, { param: t }) {
1616
+ const [, n] = t.type.split("bytes"), r = L(e);
1617
1617
  if (!n) {
1618
1618
  let a = e;
1619
1619
  return r % 32 !== 0 && (a = te(a, {
@@ -1625,18 +1625,18 @@ function eu(e, { param: t }) {
1625
1625
  };
1626
1626
  }
1627
1627
  if (r !== Number.parseInt(n))
1628
- throw new eo({
1628
+ throw new to({
1629
1629
  expectedSize: Number.parseInt(n),
1630
1630
  value: e
1631
1631
  });
1632
1632
  return { dynamic: !1, encoded: te(e, { dir: "right" }) };
1633
1633
  }
1634
- function tu(e) {
1634
+ function nu(e) {
1635
1635
  if (typeof e != "boolean")
1636
1636
  throw new v(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);
1637
- return { dynamic: !1, encoded: te(Ha(e)) };
1637
+ return { dynamic: !1, encoded: te(La(e)) };
1638
1638
  }
1639
- function nu(e, { signed: t }) {
1639
+ function ru(e, { signed: t }) {
1640
1640
  return {
1641
1641
  dynamic: !1,
1642
1642
  encoded: O(e, {
@@ -1645,21 +1645,21 @@ function nu(e, { signed: t }) {
1645
1645
  })
1646
1646
  };
1647
1647
  }
1648
- function ru(e) {
1649
- const t = ar(e), n = Math.ceil(H(t) / 32), r = [];
1648
+ function au(e) {
1649
+ const t = ar(e), n = Math.ceil(L(t) / 32), r = [];
1650
1650
  for (let a = 0; a < n; a++)
1651
- r.push(te(Zt(t, a * 32, (a + 1) * 32), {
1651
+ r.push(te(Vt(t, a * 32, (a + 1) * 32), {
1652
1652
  dir: "right"
1653
1653
  }));
1654
1654
  return {
1655
1655
  dynamic: !0,
1656
1656
  encoded: ge([
1657
- te(O(H(t), { size: 32 })),
1657
+ te(O(L(t), { size: 32 })),
1658
1658
  ...r
1659
1659
  ])
1660
1660
  };
1661
1661
  }
1662
- function au(e, { param: t }) {
1662
+ function su(e, { param: t }) {
1663
1663
  let n = !1;
1664
1664
  const r = [];
1665
1665
  for (let a = 0; a < t.components.length; a++) {
@@ -1681,8 +1681,8 @@ function pr(e) {
1681
1681
  [t[2] ? Number(t[2]) : null, t[1]]
1682
1682
  ) : void 0;
1683
1683
  }
1684
- const yr = (e) => Zt(Za(e), 0, 4);
1685
- function Ot(e) {
1684
+ const yr = (e) => Vt(Za(e), 0, 4);
1685
+ function kt(e) {
1686
1686
  const { abi: t, args: n = [], name: r } = e, a = de(r, { strict: !1 }), s = t.filter((o) => a ? o.type === "function" ? yr(o) === r : o.type === "event" ? ur(o) === r : !1 : "name" in o && o.name === r);
1687
1687
  if (s.length === 0)
1688
1688
  return;
@@ -1706,7 +1706,7 @@ function Ot(e) {
1706
1706
  if (i && "inputs" in i && i.inputs) {
1707
1707
  const c = Qa(o.inputs, i.inputs, n);
1708
1708
  if (c)
1709
- throw new ao({
1709
+ throw new so({
1710
1710
  abiItem: o,
1711
1711
  type: c[0]
1712
1712
  }, {
@@ -1749,12 +1749,12 @@ function Qa(e, t, n) {
1749
1749
  }
1750
1750
  }
1751
1751
  const Xr = "/docs/contract/encodeEventTopics";
1752
- function Rt(e) {
1752
+ function Ot(e) {
1753
1753
  var u;
1754
1754
  const { abi: t, eventName: n, args: r } = e;
1755
1755
  let a = t[0];
1756
1756
  if (n) {
1757
- const c = Ot({ abi: t, name: n });
1757
+ const c = kt({ abi: t, name: n });
1758
1758
  if (!c)
1759
1759
  throw new Wr(n, { docsPath: Xr });
1760
1760
  a = c;
@@ -1773,8 +1773,8 @@ function Qr({ param: e, value: t }) {
1773
1773
  if (e.type === "string" || e.type === "bytes")
1774
1774
  return Z(Ie(t));
1775
1775
  if (e.type === "tuple" || e.type.match(/^(.*)\[(\d+)?\]$/))
1776
- throw new lo(e.type);
1777
- return kt([e], [t]);
1776
+ throw new po(e.type);
1777
+ return $t([e], [t]);
1778
1778
  }
1779
1779
  function an(e, { method: t }) {
1780
1780
  var r, a;
@@ -1786,7 +1786,7 @@ function an(e, { method: t }) {
1786
1786
  async function fr(e, t) {
1787
1787
  const { address: n, abi: r, args: a, eventName: s, fromBlock: i, strict: o, toBlock: u } = t, c = an(e, {
1788
1788
  method: "eth_newFilter"
1789
- }), l = s ? Rt({
1789
+ }), l = s ? Ot({
1790
1790
  abi: r,
1791
1791
  args: a,
1792
1792
  eventName: s
@@ -1815,21 +1815,21 @@ function re(e) {
1815
1815
  return typeof e == "string" ? { address: e, type: "json-rpc" } : e;
1816
1816
  }
1817
1817
  const ea = "/docs/contract/encodeFunctionData";
1818
- function su(e) {
1818
+ function iu(e) {
1819
1819
  const { abi: t, args: n, functionName: r } = e;
1820
1820
  let a = t[0];
1821
1821
  if (r) {
1822
- const s = Ot({
1822
+ const s = kt({
1823
1823
  abi: t,
1824
1824
  args: n,
1825
1825
  name: r
1826
1826
  });
1827
1827
  if (!s)
1828
- throw new Wt(r, { docsPath: ea });
1828
+ throw new Gt(r, { docsPath: ea });
1829
1829
  a = s;
1830
1830
  }
1831
1831
  if (a.type !== "function")
1832
- throw new Wt(void 0, { docsPath: ea });
1832
+ throw new Gt(void 0, { docsPath: ea });
1833
1833
  return {
1834
1834
  abi: [a],
1835
1835
  functionName: yr(he(a))
@@ -1838,8 +1838,8 @@ function su(e) {
1838
1838
  function Re(e) {
1839
1839
  const { args: t } = e, { abi: n, functionName: r } = (() => {
1840
1840
  var o;
1841
- return e.abi.length === 1 && ((o = e.functionName) != null && o.startsWith("0x")) ? e : su(e);
1842
- })(), a = n[0], s = r, i = "inputs" in a && a.inputs ? kt(a.inputs, t ?? []) : void 0;
1841
+ return e.abi.length === 1 && ((o = e.functionName) != null && o.startsWith("0x")) ? e : iu(e);
1842
+ })(), a = n[0], s = r, i = "inputs" in a && a.inputs ? $t(a.inputs, t ?? []) : void 0;
1843
1843
  return cr([s, i ?? "0x"]);
1844
1844
  }
1845
1845
  const es = {
@@ -1852,7 +1852,7 @@ const es = {
1852
1852
  50: "Array index is out of bounds.",
1853
1853
  65: "Allocated too much memory or created an array which is too large.",
1854
1854
  81: "Attempted to call a zero-initialized variable of internal function type."
1855
- }, iu = {
1855
+ }, ou = {
1856
1856
  inputs: [
1857
1857
  {
1858
1858
  name: "message",
@@ -1861,7 +1861,7 @@ const es = {
1861
1861
  ],
1862
1862
  name: "Error",
1863
1863
  type: "error"
1864
- }, ou = {
1864
+ }, uu = {
1865
1865
  inputs: [
1866
1866
  {
1867
1867
  name: "reason",
@@ -1891,7 +1891,7 @@ class ts extends v {
1891
1891
  });
1892
1892
  }
1893
1893
  }
1894
- class uu extends v {
1894
+ class cu extends v {
1895
1895
  constructor({ count: t, limit: n }) {
1896
1896
  super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`), Object.defineProperty(this, "name", {
1897
1897
  enumerable: !0,
@@ -1901,7 +1901,7 @@ class uu extends v {
1901
1901
  });
1902
1902
  }
1903
1903
  }
1904
- const cu = {
1904
+ const du = {
1905
1905
  bytes: new Uint8Array(),
1906
1906
  dataView: new DataView(new ArrayBuffer(0)),
1907
1907
  position: 0,
@@ -1910,7 +1910,7 @@ const cu = {
1910
1910
  recursiveReadLimit: Number.POSITIVE_INFINITY,
1911
1911
  assertReadLimit() {
1912
1912
  if (this.recursiveReadCount >= this.recursiveReadLimit)
1913
- throw new uu({
1913
+ throw new cu({
1914
1914
  count: this.recursiveReadCount + 1,
1915
1915
  limit: this.recursiveReadLimit
1916
1916
  });
@@ -2024,18 +2024,18 @@ const cu = {
2024
2024
  }
2025
2025
  };
2026
2026
  function ns(e, { recursiveReadLimit: t = 8192 } = {}) {
2027
- const n = Object.create(cu);
2027
+ const n = Object.create(du);
2028
2028
  return n.bytes = e, n.dataView = new DataView(e.buffer, e.byteOffset, e.byteLength), n.positionReadCount = /* @__PURE__ */ new Map(), n.recursiveReadLimit = t, n;
2029
2029
  }
2030
- function du(e, t = {}) {
2030
+ function lu(e, t = {}) {
2031
2031
  typeof t.size < "u" && pe(e, { size: t.size });
2032
2032
  const n = q(e, t);
2033
2033
  return Ye(n, t);
2034
2034
  }
2035
- function lu(e, t = {}) {
2035
+ function pu(e, t = {}) {
2036
2036
  let n = e;
2037
2037
  if (typeof t.size < "u" && (pe(n, { size: t.size }), n = tn(n)), n.length > 1 || n[0] > 1)
2038
- throw new fo(n);
2038
+ throw new mo(n);
2039
2039
  return !!n[0];
2040
2040
  }
2041
2041
  function be(e, t = {}) {
@@ -2043,19 +2043,19 @@ function be(e, t = {}) {
2043
2043
  const n = q(e, t);
2044
2044
  return Ae(n, t);
2045
2045
  }
2046
- function pu(e, t = {}) {
2046
+ function yu(e, t = {}) {
2047
2047
  let n = e;
2048
2048
  return typeof t.size < "u" && (pe(n, { size: t.size }), n = tn(n, { dir: "right" })), new TextDecoder().decode(n);
2049
2049
  }
2050
2050
  function sn(e, t) {
2051
- const n = typeof t == "string" ? He(t) : t, r = ns(n);
2052
- if (H(n) === 0 && e.length > 0)
2051
+ const n = typeof t == "string" ? Le(t) : t, r = ns(n);
2052
+ if (L(n) === 0 && e.length > 0)
2053
2053
  throw new Qt();
2054
- if (H(t) && H(t) < 32)
2054
+ if (L(t) && L(t) < 32)
2055
2055
  throw new Na({
2056
2056
  data: typeof t == "string" ? t : q(t),
2057
2057
  params: e,
2058
- size: H(t)
2058
+ size: L(t)
2059
2059
  });
2060
2060
  let a = 0;
2061
2061
  const s = [];
@@ -2073,30 +2073,30 @@ function Ke(e, t, { staticPosition: n }) {
2073
2073
  const r = pr(t.type);
2074
2074
  if (r) {
2075
2075
  const [a, s] = r;
2076
- return fu(e, { ...t, type: s }, { length: a, staticPosition: n });
2076
+ return mu(e, { ...t, type: s }, { length: a, staticPosition: n });
2077
2077
  }
2078
2078
  if (t.type === "tuple")
2079
- return gu(e, t, { staticPosition: n });
2079
+ return wu(e, t, { staticPosition: n });
2080
2080
  if (t.type === "address")
2081
- return yu(e);
2081
+ return fu(e);
2082
2082
  if (t.type === "bool")
2083
- return mu(e);
2083
+ return bu(e);
2084
2084
  if (t.type.startsWith("bytes"))
2085
- return bu(e, t, { staticPosition: n });
2085
+ return hu(e, t, { staticPosition: n });
2086
2086
  if (t.type.startsWith("uint") || t.type.startsWith("int"))
2087
- return hu(e, t);
2087
+ return gu(e, t);
2088
2088
  if (t.type === "string")
2089
- return wu(e, { staticPosition: n });
2090
- throw new oo(t.type, {
2089
+ return Tu(e, { staticPosition: n });
2090
+ throw new uo(t.type, {
2091
2091
  docsPath: "/docs/contract/decodeAbiParameters"
2092
2092
  });
2093
2093
  }
2094
2094
  const na = 32, Fn = 32;
2095
- function yu(e) {
2095
+ function fu(e) {
2096
2096
  const t = e.readBytes(32);
2097
2097
  return [rn(q(Xa(t, -20))), 32];
2098
2098
  }
2099
- function fu(e, t, { length: n, staticPosition: r }) {
2099
+ function mu(e, t, { length: n, staticPosition: r }) {
2100
2100
  if (!n) {
2101
2101
  const i = be(e.readBytes(Fn)), o = r + i, u = o + na;
2102
2102
  e.setPosition(o);
@@ -2133,10 +2133,10 @@ function fu(e, t, { length: n, staticPosition: r }) {
2133
2133
  }
2134
2134
  return [s, a];
2135
2135
  }
2136
- function mu(e) {
2137
- return [lu(e.readBytes(32), { size: 32 }), 32];
2136
+ function bu(e) {
2137
+ return [pu(e.readBytes(32), { size: 32 }), 32];
2138
2138
  }
2139
- function bu(e, t, { staticPosition: n }) {
2139
+ function hu(e, t, { staticPosition: n }) {
2140
2140
  const [r, a] = t.type.split("bytes");
2141
2141
  if (!a) {
2142
2142
  const i = be(e.readBytes(32));
@@ -2149,14 +2149,14 @@ function bu(e, t, { staticPosition: n }) {
2149
2149
  }
2150
2150
  return [q(e.readBytes(Number.parseInt(a), 32)), 32];
2151
2151
  }
2152
- function hu(e, t) {
2152
+ function gu(e, t) {
2153
2153
  const n = t.type.startsWith("int"), r = Number.parseInt(t.type.split("int")[1] || "256"), a = e.readBytes(32);
2154
2154
  return [
2155
- r > 48 ? du(a, { signed: n }) : be(a, { signed: n }),
2155
+ r > 48 ? lu(a, { signed: n }) : be(a, { signed: n }),
2156
2156
  32
2157
2157
  ];
2158
2158
  }
2159
- function gu(e, t, { staticPosition: n }) {
2159
+ function wu(e, t, { staticPosition: n }) {
2160
2160
  const r = t.components.length === 0 || t.components.some(({ name: i }) => !i), a = r ? [] : {};
2161
2161
  let s = 0;
2162
2162
  if (mt(t)) {
@@ -2179,13 +2179,13 @@ function gu(e, t, { staticPosition: n }) {
2179
2179
  }
2180
2180
  return [a, s];
2181
2181
  }
2182
- function wu(e, { staticPosition: t }) {
2182
+ function Tu(e, { staticPosition: t }) {
2183
2183
  const n = be(e.readBytes(32)), r = t + n;
2184
2184
  e.setPosition(r);
2185
2185
  const a = be(e.readBytes(32));
2186
2186
  if (a === 0)
2187
2187
  return e.setPosition(t + 32), ["", 32];
2188
- const s = e.readBytes(a, 32), i = pu(tn(s));
2188
+ const s = e.readBytes(a, 32), i = yu(tn(s));
2189
2189
  return e.setPosition(t + 32), [i, 32];
2190
2190
  }
2191
2191
  function mt(e) {
@@ -2198,18 +2198,18 @@ function mt(e) {
2198
2198
  const n = pr(e.type);
2199
2199
  return !!(n && mt({ ...e, type: n[1] }));
2200
2200
  }
2201
- function Tu(e) {
2202
- const { abi: t, data: n } = e, r = Zt(n, 0, 4);
2201
+ function vu(e) {
2202
+ const { abi: t, data: n } = e, r = Vt(n, 0, 4);
2203
2203
  if (r === "0x")
2204
2204
  throw new Qt();
2205
- const s = [...t || [], iu, ou].find((i) => i.type === "error" && r === yr(he(i)));
2205
+ const s = [...t || [], ou, uu].find((i) => i.type === "error" && r === yr(he(i)));
2206
2206
  if (!s)
2207
2207
  throw new Da(r, {
2208
2208
  docsPath: "/docs/contract/decodeErrorResult"
2209
2209
  });
2210
2210
  return {
2211
2211
  abiItem: s,
2212
- args: "inputs" in s && s.inputs && s.inputs.length > 0 ? sn(s.inputs, Zt(n, 4)) : void 0,
2212
+ args: "inputs" in s && s.inputs && s.inputs.length > 0 ? sn(s.inputs, Vt(n, 4)) : void 0,
2213
2213
  errorName: s.name
2214
2214
  };
2215
2215
  }
@@ -2218,10 +2218,10 @@ function rs({ abiItem: e, args: t, includeFunctionName: n = !0, includeName: r =
2218
2218
  if ("name" in e && "inputs" in e && e.inputs)
2219
2219
  return `${n ? e.name : ""}(${e.inputs.map((a, s) => `${r && a.name ? `${a.name}: ` : ""}${typeof t[s] == "object" ? W(t[s]) : t[s]}`).join(", ")})`;
2220
2220
  }
2221
- const vu = {
2221
+ const xu = {
2222
2222
  gwei: 9,
2223
2223
  wei: 18
2224
- }, xu = {
2224
+ }, Eu = {
2225
2225
  ether: -9,
2226
2226
  wei: 9
2227
2227
  };
@@ -2236,12 +2236,12 @@ function as(e, t) {
2236
2236
  return s = s.replace(/(0+)$/, ""), `${r ? "-" : ""}${a || "0"}${s ? `.${s}` : ""}`;
2237
2237
  }
2238
2238
  function mr(e, t = "wei") {
2239
- return as(e, vu[t]);
2239
+ return as(e, xu[t]);
2240
2240
  }
2241
2241
  function K(e, t = "wei") {
2242
- return as(e, xu[t]);
2242
+ return as(e, Eu[t]);
2243
2243
  }
2244
- class Eu extends v {
2244
+ class Pu extends v {
2245
2245
  constructor({ address: t }) {
2246
2246
  super(`State for account "${t}" is set multiple times.`), Object.defineProperty(this, "name", {
2247
2247
  enumerable: !0,
@@ -2251,7 +2251,7 @@ class Eu extends v {
2251
2251
  });
2252
2252
  }
2253
2253
  }
2254
- class Pu extends v {
2254
+ class Cu extends v {
2255
2255
  constructor() {
2256
2256
  super("state and stateDiff are set on the same account."), Object.defineProperty(this, "name", {
2257
2257
  enumerable: !0,
@@ -2265,7 +2265,7 @@ function ra(e) {
2265
2265
  return e.reduce((t, { slot: n, value: r }) => `${t} ${n}: ${r}
2266
2266
  `, "");
2267
2267
  }
2268
- function Cu(e) {
2268
+ function Au(e) {
2269
2269
  return e.reduce((t, { address: n, ...r }) => {
2270
2270
  let a = `${t} ${n}:
2271
2271
  `;
@@ -2278,12 +2278,12 @@ function Cu(e) {
2278
2278
  }, ` State Override:
2279
2279
  `).slice(0, -1);
2280
2280
  }
2281
- function Ft(e) {
2281
+ function Rt(e) {
2282
2282
  const t = Object.entries(e).map(([r, a]) => a === void 0 || a === !1 ? null : [r, a]).filter(Boolean), n = t.reduce((r, [a]) => Math.max(r, a.length), 0);
2283
2283
  return t.map(([r, a]) => ` ${`${r}:`.padEnd(n + 1)} ${a}`).join(`
2284
2284
  `);
2285
2285
  }
2286
- class Au extends v {
2286
+ class Iu extends v {
2287
2287
  constructor() {
2288
2288
  super([
2289
2289
  "Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.",
@@ -2297,13 +2297,13 @@ class Au extends v {
2297
2297
  });
2298
2298
  }
2299
2299
  }
2300
- class Iu extends v {
2300
+ class Mu extends v {
2301
2301
  constructor({ transaction: t }) {
2302
2302
  super("Cannot infer a transaction type from provided transaction.", {
2303
2303
  metaMessages: [
2304
2304
  "Provided Transaction:",
2305
2305
  "{",
2306
- Ft(t),
2306
+ Rt(t),
2307
2307
  "}",
2308
2308
  "",
2309
2309
  "To infer the type, either provide:",
@@ -2321,10 +2321,10 @@ class Iu extends v {
2321
2321
  });
2322
2322
  }
2323
2323
  }
2324
- class Mu extends v {
2324
+ class Su extends v {
2325
2325
  constructor(t, { account: n, docsPath: r, chain: a, data: s, gas: i, gasPrice: o, maxFeePerGas: u, maxPriorityFeePerGas: c, nonce: l, to: d, value: p }) {
2326
2326
  var f;
2327
- const m = Ft({
2327
+ const m = Rt({
2328
2328
  chain: a && `${a == null ? void 0 : a.name} (id: ${a == null ? void 0 : a.id})`,
2329
2329
  from: n == null ? void 0 : n.address,
2330
2330
  to: d,
@@ -2392,7 +2392,7 @@ class os extends v {
2392
2392
  constructor(t, { account: n, docsPath: r, chain: a, data: s, gas: i, gasPrice: o, maxFeePerGas: u, maxPriorityFeePerGas: c, nonce: l, to: d, value: p, stateOverride: m }) {
2393
2393
  var b;
2394
2394
  const f = n ? re(n) : void 0;
2395
- let y = Ft({
2395
+ let y = Rt({
2396
2396
  from: f == null ? void 0 : f.address,
2397
2397
  to: d,
2398
2398
  value: typeof p < "u" && `${mr(p)} ${((b = a == null ? void 0 : a.nativeCurrency) == null ? void 0 : b.symbol) || "ETH"}`,
@@ -2404,7 +2404,7 @@ class os extends v {
2404
2404
  nonce: l
2405
2405
  });
2406
2406
  m && (y += `
2407
- ${Cu(m)}`), super(t.shortMessage, {
2407
+ ${Au(m)}`), super(t.shortMessage, {
2408
2408
  cause: t,
2409
2409
  docsPath: r,
2410
2410
  metaMessages: [
@@ -2425,15 +2425,15 @@ ${Cu(m)}`), super(t.shortMessage, {
2425
2425
  }), this.cause = t;
2426
2426
  }
2427
2427
  }
2428
- class Su extends v {
2428
+ class Bu extends v {
2429
2429
  constructor(t, { abi: n, args: r, contractAddress: a, docsPath: s, functionName: i, sender: o }) {
2430
- const u = Ot({ abi: n, args: r, name: i }), c = u ? rs({
2430
+ const u = kt({ abi: n, args: r, name: i }), c = u ? rs({
2431
2431
  abiItem: u,
2432
2432
  args: r,
2433
2433
  includeFunctionName: !1,
2434
2434
  includeName: !1
2435
- }) : void 0, l = u ? he(u, { includeName: !0 }) : void 0, d = Ft({
2436
- address: a && Yi(a),
2435
+ }) : void 0, l = u ? he(u, { includeName: !0 }) : void 0, d = Rt({
2436
+ address: a && Ji(a),
2437
2437
  function: l,
2438
2438
  args: c && c !== "()" && `${[...Array((i == null ? void 0 : i.length) ?? 0).keys()].map(() => " ").join("")}${c}`,
2439
2439
  sender: o
@@ -2494,7 +2494,7 @@ class Nn extends v {
2494
2494
  let s, i, o, u;
2495
2495
  if (n && n !== "0x")
2496
2496
  try {
2497
- i = Tu({ abi: t, data: n });
2497
+ i = vu({ abi: t, data: n });
2498
2498
  const { abiItem: l, errorName: d, args: p } = i;
2499
2499
  if (d === "Error")
2500
2500
  u = p[0];
@@ -2552,7 +2552,7 @@ class Nn extends v {
2552
2552
  }), this.data = i, this.reason = u, this.signature = c;
2553
2553
  }
2554
2554
  }
2555
- class Bu extends v {
2555
+ class $u extends v {
2556
2556
  constructor({ functionName: t }) {
2557
2557
  super(`The contract function "${t}" returned no data ("0x").`, {
2558
2558
  metaMessages: [
@@ -2569,7 +2569,7 @@ class Bu extends v {
2569
2569
  });
2570
2570
  }
2571
2571
  }
2572
- class $u extends v {
2572
+ class ku extends v {
2573
2573
  constructor({ factory: t }) {
2574
2574
  super(`Deployment for counterfactual contract call failed for factory "${t}".`, {
2575
2575
  metaMessages: [
@@ -2674,7 +2674,7 @@ class sa extends v {
2674
2674
  });
2675
2675
  }
2676
2676
  }
2677
- const ku = -1;
2677
+ const Ou = -1;
2678
2678
  class Y extends v {
2679
2679
  constructor(t, { code: n, docsPath: r, metaMessages: a, shortMessage: s }) {
2680
2680
  super(s, {
@@ -2691,7 +2691,7 @@ class Y extends v {
2691
2691
  configurable: !0,
2692
2692
  writable: !0,
2693
2693
  value: void 0
2694
- }), this.name = t.name, this.code = t instanceof us ? t.code : n ?? ku;
2694
+ }), this.name = t.name, this.code = t instanceof us ? t.code : n ?? Ou;
2695
2695
  }
2696
2696
  }
2697
2697
  class at extends Y {
@@ -2945,10 +2945,10 @@ Object.defineProperty(Et, "code", {
2945
2945
  writable: !0,
2946
2946
  value: -32006
2947
2947
  });
2948
- class je extends at {
2948
+ class He extends at {
2949
2949
  constructor(t) {
2950
2950
  super(t, {
2951
- code: je.code,
2951
+ code: He.code,
2952
2952
  shortMessage: "User rejected the request."
2953
2953
  }), Object.defineProperty(this, "name", {
2954
2954
  enumerable: !0,
@@ -2958,7 +2958,7 @@ class je extends at {
2958
2958
  });
2959
2959
  }
2960
2960
  }
2961
- Object.defineProperty(je, "code", {
2961
+ Object.defineProperty(He, "code", {
2962
2962
  enumerable: !0,
2963
2963
  configurable: !0,
2964
2964
  writable: !0,
@@ -3059,7 +3059,7 @@ Object.defineProperty(Mt, "code", {
3059
3059
  writable: !0,
3060
3060
  value: 4902
3061
3061
  });
3062
- class Ou extends Y {
3062
+ class Ru extends Y {
3063
3063
  constructor(t) {
3064
3064
  super(t, {
3065
3065
  shortMessage: "An unknown RPC error occurred."
@@ -3071,15 +3071,15 @@ class Ou extends Y {
3071
3071
  });
3072
3072
  }
3073
3073
  }
3074
- const Ru = 3;
3074
+ const Fu = 3;
3075
3075
  function St(e, { abi: t, address: n, args: r, docsPath: a, functionName: s, sender: i }) {
3076
- const { code: o, data: u, message: c, shortMessage: l } = e instanceof br ? e : e instanceof v ? e.walk((p) => "data" in p) || e.walk() : {}, d = e instanceof Qt ? new Bu({ functionName: s }) : [Ru, ze.code].includes(o) && (u || c || l) ? new Nn({
3076
+ const { code: o, data: u, message: c, shortMessage: l } = e instanceof br ? e : e instanceof v ? e.walk((p) => "data" in p) || e.walk() : {}, d = e instanceof Qt ? new $u({ functionName: s }) : [Fu, ze.code].includes(o) && (u || c || l) ? new Nn({
3077
3077
  abi: t,
3078
3078
  data: typeof u == "object" ? u.data : u,
3079
3079
  functionName: s,
3080
3080
  message: l ?? c
3081
3081
  }) : e;
3082
- return new Su(d, {
3082
+ return new Bu(d, {
3083
3083
  abi: t,
3084
3084
  args: r,
3085
3085
  contractAddress: n,
@@ -3088,10 +3088,10 @@ function St(e, { abi: t, address: n, args: r, docsPath: a, functionName: s, send
3088
3088
  sender: i
3089
3089
  });
3090
3090
  }
3091
- class Fu extends v {
3091
+ class Nu extends v {
3092
3092
  constructor(t, { account: n, docsPath: r, chain: a, data: s, gas: i, gasPrice: o, maxFeePerGas: u, maxPriorityFeePerGas: c, nonce: l, to: d, value: p }) {
3093
3093
  var f;
3094
- const m = Ft({
3094
+ const m = Rt({
3095
3095
  from: n == null ? void 0 : n.address,
3096
3096
  to: d,
3097
3097
  value: typeof p < "u" && `${mr(p)} ${((f = a == null ? void 0 : a.nativeCurrency) == null ? void 0 : f.symbol) || "ETH"}`,
@@ -3149,7 +3149,7 @@ Object.defineProperty(Ze, "nodeMessage", {
3149
3149
  writable: !0,
3150
3150
  value: /execution reverted/
3151
3151
  });
3152
- class Kt extends v {
3152
+ class Zt extends v {
3153
3153
  constructor({ cause: t, maxFeePerGas: n } = {}) {
3154
3154
  super(`The fee cap (\`maxFeePerGas\`${n ? ` = ${K(n)} gwei` : ""}) cannot be higher than the maximum allowed value (2^256-1).`, {
3155
3155
  cause: t
@@ -3161,7 +3161,7 @@ class Kt extends v {
3161
3161
  });
3162
3162
  }
3163
3163
  }
3164
- Object.defineProperty(Kt, "nodeMessage", {
3164
+ Object.defineProperty(Zt, "nodeMessage", {
3165
3165
  enumerable: !0,
3166
3166
  configurable: !0,
3167
3167
  writable: !0,
@@ -3201,7 +3201,7 @@ Object.defineProperty(Un, "nodeMessage", {
3201
3201
  writable: !0,
3202
3202
  value: /nonce too high/
3203
3203
  });
3204
- class jn extends v {
3204
+ class Hn extends v {
3205
3205
  constructor({ cause: t, nonce: n } = {}) {
3206
3206
  super([
3207
3207
  `Nonce provided for the transaction ${n ? `(${n}) ` : ""}is lower than the current nonce of the account.`,
@@ -3215,13 +3215,13 @@ class jn extends v {
3215
3215
  });
3216
3216
  }
3217
3217
  }
3218
- Object.defineProperty(jn, "nodeMessage", {
3218
+ Object.defineProperty(Hn, "nodeMessage", {
3219
3219
  enumerable: !0,
3220
3220
  configurable: !0,
3221
3221
  writable: !0,
3222
3222
  value: /nonce too low|transaction already imported|already known/
3223
3223
  });
3224
- class Ln extends v {
3224
+ class jn extends v {
3225
3225
  constructor({ cause: t, nonce: n } = {}) {
3226
3226
  super(`Nonce provided for the transaction ${n ? `(${n}) ` : ""}exceeds the maximum allowed nonce.`, { cause: t }), Object.defineProperty(this, "name", {
3227
3227
  enumerable: !0,
@@ -3231,13 +3231,13 @@ class Ln extends v {
3231
3231
  });
3232
3232
  }
3233
3233
  }
3234
- Object.defineProperty(Ln, "nodeMessage", {
3234
+ Object.defineProperty(jn, "nodeMessage", {
3235
3235
  enumerable: !0,
3236
3236
  configurable: !0,
3237
3237
  writable: !0,
3238
3238
  value: /nonce has max value/
3239
3239
  });
3240
- class Hn extends v {
3240
+ class Ln extends v {
3241
3241
  constructor({ cause: t } = {}) {
3242
3242
  super([
3243
3243
  "The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."
@@ -3262,7 +3262,7 @@ class Hn extends v {
3262
3262
  });
3263
3263
  }
3264
3264
  }
3265
- Object.defineProperty(Hn, "nodeMessage", {
3265
+ Object.defineProperty(Ln, "nodeMessage", {
3266
3266
  enumerable: !0,
3267
3267
  configurable: !0,
3268
3268
  writable: !0,
@@ -3322,7 +3322,7 @@ Object.defineProperty(qn, "nodeMessage", {
3322
3322
  writable: !0,
3323
3323
  value: /transaction type not valid/
3324
3324
  });
3325
- class Yt extends v {
3325
+ class Kt extends v {
3326
3326
  constructor({ cause: t, maxPriorityFeePerGas: n, maxFeePerGas: r } = {}) {
3327
3327
  super([
3328
3328
  `The provided tip (\`maxPriorityFeePerGas\`${n ? ` = ${K(n)} gwei` : ""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r ? ` = ${K(r)} gwei` : ""}).`
@@ -3337,7 +3337,7 @@ class Yt extends v {
3337
3337
  });
3338
3338
  }
3339
3339
  }
3340
- Object.defineProperty(Yt, "nodeMessage", {
3340
+ Object.defineProperty(Kt, "nodeMessage", {
3341
3341
  enumerable: !0,
3342
3342
  configurable: !0,
3343
3343
  writable: !0,
@@ -3363,13 +3363,13 @@ function hr(e, t) {
3363
3363
  }) : Ze.nodeMessage.test(n) ? new Ze({
3364
3364
  cause: e,
3365
3365
  message: e.details
3366
- }) : Kt.nodeMessage.test(n) ? new Kt({
3366
+ }) : Zt.nodeMessage.test(n) ? new Zt({
3367
3367
  cause: e,
3368
3368
  maxFeePerGas: t == null ? void 0 : t.maxFeePerGas
3369
3369
  }) : Dn.nodeMessage.test(n) ? new Dn({
3370
3370
  cause: e,
3371
3371
  maxFeePerGas: t == null ? void 0 : t.maxFeePerGas
3372
- }) : Un.nodeMessage.test(n) ? new Un({ cause: e, nonce: t == null ? void 0 : t.nonce }) : jn.nodeMessage.test(n) ? new jn({ cause: e, nonce: t == null ? void 0 : t.nonce }) : Ln.nodeMessage.test(n) ? new Ln({ cause: e, nonce: t == null ? void 0 : t.nonce }) : Hn.nodeMessage.test(n) ? new Hn({ cause: e }) : zn.nodeMessage.test(n) ? new zn({ cause: e, gas: t == null ? void 0 : t.gas }) : _n.nodeMessage.test(n) ? new _n({ cause: e, gas: t == null ? void 0 : t.gas }) : qn.nodeMessage.test(n) ? new qn({ cause: e }) : Yt.nodeMessage.test(n) ? new Yt({
3372
+ }) : Un.nodeMessage.test(n) ? new Un({ cause: e, nonce: t == null ? void 0 : t.nonce }) : Hn.nodeMessage.test(n) ? new Hn({ cause: e, nonce: t == null ? void 0 : t.nonce }) : jn.nodeMessage.test(n) ? new jn({ cause: e, nonce: t == null ? void 0 : t.nonce }) : Ln.nodeMessage.test(n) ? new Ln({ cause: e }) : zn.nodeMessage.test(n) ? new zn({ cause: e, gas: t == null ? void 0 : t.gas }) : _n.nodeMessage.test(n) ? new _n({ cause: e, gas: t == null ? void 0 : t.gas }) : qn.nodeMessage.test(n) ? new qn({ cause: e }) : Kt.nodeMessage.test(n) ? new Kt({
3373
3373
  cause: e,
3374
3374
  maxFeePerGas: t == null ? void 0 : t.maxFeePerGas,
3375
3375
  maxPriorityFeePerGas: t == null ? void 0 : t.maxPriorityFeePerGas
@@ -3377,12 +3377,12 @@ function hr(e, t) {
3377
3377
  cause: e
3378
3378
  });
3379
3379
  }
3380
- function Nu(e, { docsPath: t, ...n }) {
3380
+ function Du(e, { docsPath: t, ...n }) {
3381
3381
  const r = (() => {
3382
3382
  const a = hr(e, n);
3383
3383
  return a instanceof on ? e : a;
3384
3384
  })();
3385
- return new Fu(r, {
3385
+ return new Nu(r, {
3386
3386
  docsPath: t,
3387
3387
  ...n
3388
3388
  });
@@ -3399,7 +3399,7 @@ function gr(e, { format: t }) {
3399
3399
  const a = t(e || {});
3400
3400
  return r(a), n;
3401
3401
  }
3402
- const Du = {
3402
+ const Uu = {
3403
3403
  legacy: "0x0",
3404
3404
  eip2930: "0x1",
3405
3405
  eip1559: "0x2",
@@ -3407,7 +3407,7 @@ const Du = {
3407
3407
  };
3408
3408
  function un(e) {
3409
3409
  const t = {};
3410
- return typeof e.accessList < "u" && (t.accessList = e.accessList), typeof e.blobVersionedHashes < "u" && (t.blobVersionedHashes = e.blobVersionedHashes), typeof e.blobs < "u" && (typeof e.blobs[0] != "string" ? t.blobs = e.blobs.map((n) => q(n)) : t.blobs = e.blobs), typeof e.data < "u" && (t.data = e.data), typeof e.from < "u" && (t.from = e.from), typeof e.gas < "u" && (t.gas = O(e.gas)), typeof e.gasPrice < "u" && (t.gasPrice = O(e.gasPrice)), typeof e.maxFeePerBlobGas < "u" && (t.maxFeePerBlobGas = O(e.maxFeePerBlobGas)), typeof e.maxFeePerGas < "u" && (t.maxFeePerGas = O(e.maxFeePerGas)), typeof e.maxPriorityFeePerGas < "u" && (t.maxPriorityFeePerGas = O(e.maxPriorityFeePerGas)), typeof e.nonce < "u" && (t.nonce = O(e.nonce)), typeof e.to < "u" && (t.to = e.to), typeof e.type < "u" && (t.type = Du[e.type]), typeof e.value < "u" && (t.value = O(e.value)), t;
3410
+ return typeof e.accessList < "u" && (t.accessList = e.accessList), typeof e.blobVersionedHashes < "u" && (t.blobVersionedHashes = e.blobVersionedHashes), typeof e.blobs < "u" && (typeof e.blobs[0] != "string" ? t.blobs = e.blobs.map((n) => q(n)) : t.blobs = e.blobs), typeof e.data < "u" && (t.data = e.data), typeof e.from < "u" && (t.from = e.from), typeof e.gas < "u" && (t.gas = O(e.gas)), typeof e.gasPrice < "u" && (t.gasPrice = O(e.gasPrice)), typeof e.maxFeePerBlobGas < "u" && (t.maxFeePerBlobGas = O(e.maxFeePerBlobGas)), typeof e.maxFeePerGas < "u" && (t.maxFeePerGas = O(e.maxFeePerGas)), typeof e.maxPriorityFeePerGas < "u" && (t.maxPriorityFeePerGas = O(e.maxPriorityFeePerGas)), typeof e.nonce < "u" && (t.nonce = O(e.nonce)), typeof e.to < "u" && (t.to = e.to), typeof e.type < "u" && (t.type = Uu[e.type]), typeof e.value < "u" && (t.value = O(e.value)), t;
3411
3411
  }
3412
3412
  function ia(e) {
3413
3413
  if (!(!e || e.length === 0))
@@ -3427,11 +3427,11 @@ function ia(e) {
3427
3427
  return t[n] = r, t;
3428
3428
  }, {});
3429
3429
  }
3430
- function Uu(e) {
3430
+ function Hu(e) {
3431
3431
  const { balance: t, nonce: n, state: r, stateDiff: a, code: s } = e, i = {};
3432
3432
  if (s !== void 0 && (i.code = s), t !== void 0 && (i.balance = O(t)), n !== void 0 && (i.nonce = O(n)), r !== void 0 && (i.state = ia(r)), a !== void 0) {
3433
3433
  if (i.state)
3434
- throw new Pu();
3434
+ throw new Cu();
3435
3435
  i.stateDiff = ia(a);
3436
3436
  }
3437
3437
  return i;
@@ -3444,23 +3444,23 @@ function cs(e) {
3444
3444
  if (!oe(n, { strict: !1 }))
3445
3445
  throw new Me({ address: n });
3446
3446
  if (t[n])
3447
- throw new Eu({ address: n });
3448
- t[n] = Uu(r);
3447
+ throw new Pu({ address: n });
3448
+ t[n] = Hu(r);
3449
3449
  }
3450
3450
  return t;
3451
3451
  }
3452
- function Nt(e) {
3452
+ function Ft(e) {
3453
3453
  const { account: t, gasPrice: n, maxFeePerGas: r, maxPriorityFeePerGas: a, to: s } = e, i = t ? re(t) : void 0;
3454
3454
  if (i && !oe(i.address))
3455
3455
  throw new Me({ address: i.address });
3456
3456
  if (s && !oe(s))
3457
3457
  throw new Me({ address: s });
3458
3458
  if (typeof n < "u" && (typeof r < "u" || typeof a < "u"))
3459
- throw new Au();
3459
+ throw new Iu();
3460
3460
  if (r && r > 2n ** 256n - 1n)
3461
- throw new Kt({ maxFeePerGas: r });
3461
+ throw new Zt({ maxFeePerGas: r });
3462
3462
  if (a && r && a > r)
3463
- throw new Yt({ maxFeePerGas: r, maxPriorityFeePerGas: a });
3463
+ throw new Kt({ maxFeePerGas: r, maxPriorityFeePerGas: a });
3464
3464
  }
3465
3465
  class ju extends v {
3466
3466
  constructor() {
@@ -3582,7 +3582,7 @@ async function Tr(e) {
3582
3582
  });
3583
3583
  return BigInt(t);
3584
3584
  }
3585
- async function Hu(e, t) {
3585
+ async function zu(e, t) {
3586
3586
  return fs(e, t);
3587
3587
  }
3588
3588
  async function fs(e, t) {
@@ -3614,7 +3614,7 @@ async function fs(e, t) {
3614
3614
  return l < 0n ? 0n : l;
3615
3615
  }
3616
3616
  }
3617
- async function zu(e, t) {
3617
+ async function _u(e, t) {
3618
3618
  return Gn(e, t);
3619
3619
  }
3620
3620
  async function Gn(e, t) {
@@ -3666,26 +3666,26 @@ async function ms(e, { address: t, blockTag: n = "latest", blockNumber: r }) {
3666
3666
  return Ae(a);
3667
3667
  }
3668
3668
  function bs(e) {
3669
- const { kzg: t } = e, n = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), r = typeof e.blobs[0] == "string" ? e.blobs.map((s) => He(s)) : e.blobs, a = [];
3669
+ const { kzg: t } = e, n = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), r = typeof e.blobs[0] == "string" ? e.blobs.map((s) => Le(s)) : e.blobs, a = [];
3670
3670
  for (const s of r)
3671
3671
  a.push(Uint8Array.from(t.blobToKzgCommitment(s)));
3672
3672
  return n === "bytes" ? a : a.map((s) => q(s));
3673
3673
  }
3674
3674
  function hs(e) {
3675
- const { kzg: t } = e, n = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), r = typeof e.blobs[0] == "string" ? e.blobs.map((i) => He(i)) : e.blobs, a = typeof e.commitments[0] == "string" ? e.commitments.map((i) => He(i)) : e.commitments, s = [];
3675
+ const { kzg: t } = e, n = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), r = typeof e.blobs[0] == "string" ? e.blobs.map((i) => Le(i)) : e.blobs, a = typeof e.commitments[0] == "string" ? e.commitments.map((i) => Le(i)) : e.commitments, s = [];
3676
3676
  for (let i = 0; i < r.length; i++) {
3677
3677
  const o = r[i], u = a[i];
3678
3678
  s.push(Uint8Array.from(t.computeBlobKzgProof(o, u)));
3679
3679
  }
3680
3680
  return n === "bytes" ? s : s.map((i) => q(i));
3681
3681
  }
3682
- function _u(e, t, n, r) {
3682
+ function qu(e, t, n, r) {
3683
3683
  if (typeof e.setBigUint64 == "function")
3684
3684
  return e.setBigUint64(t, n, r);
3685
3685
  const a = BigInt(32), s = BigInt(4294967295), i = Number(n >> a & s), o = Number(n & s), u = r ? 4 : 0, c = r ? 0 : 4;
3686
3686
  e.setUint32(t + u, i, r), e.setUint32(t + c, o, r);
3687
3687
  }
3688
- class qu extends ir {
3688
+ class Gu extends ir {
3689
3689
  constructor(t, n, r, a) {
3690
3690
  super(), this.blockLen = t, this.outputLen = n, this.padOffset = r, this.isLE = a, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(t), this.view = vn(this.buffer);
3691
3691
  }
@@ -3713,7 +3713,7 @@ class qu extends ir {
3713
3713
  n[i++] = 128, this.buffer.subarray(i).fill(0), this.padOffset > a - i && (this.process(r, 0), i = 0);
3714
3714
  for (let d = i; d < a; d++)
3715
3715
  n[d] = 0;
3716
- _u(r, a - 8, BigInt(this.length * 8), s), this.process(r, 0);
3716
+ qu(r, a - 8, BigInt(this.length * 8), s), this.process(r, 0);
3717
3717
  const o = vn(t), u = this.outputLen;
3718
3718
  if (u % 4)
3719
3719
  throw new Error("_sha2: outputLen should be aligned to 32bit");
@@ -3735,7 +3735,7 @@ class qu extends ir {
3735
3735
  return t.length = a, t.pos = o, t.finished = s, t.destroyed = i, a % n && t.buffer.set(r), t;
3736
3736
  }
3737
3737
  }
3738
- const Gu = (e, t, n) => e & t ^ ~e & n, Wu = (e, t, n) => e & t ^ e & n ^ t & n, Vu = /* @__PURE__ */ new Uint32Array([
3738
+ const Wu = (e, t, n) => e & t ^ ~e & n, Vu = (e, t, n) => e & t ^ e & n ^ t & n, Zu = /* @__PURE__ */ new Uint32Array([
3739
3739
  1116352408,
3740
3740
  1899447441,
3741
3741
  3049323471,
@@ -3810,7 +3810,7 @@ const Gu = (e, t, n) => e & t ^ ~e & n, Wu = (e, t, n) => e & t ^ e & n ^ t & n,
3810
3810
  528734635,
3811
3811
  1541459225
3812
3812
  ]), Pe = /* @__PURE__ */ new Uint32Array(64);
3813
- class Zu extends qu {
3813
+ class Ku extends Gu {
3814
3814
  constructor() {
3815
3815
  super(64, 32, 8, !1), this.A = Ee[0] | 0, this.B = Ee[1] | 0, this.C = Ee[2] | 0, this.D = Ee[3] | 0, this.E = Ee[4] | 0, this.F = Ee[5] | 0, this.G = Ee[6] | 0, this.H = Ee[7] | 0;
3816
3816
  }
@@ -3831,7 +3831,7 @@ class Zu extends qu {
3831
3831
  }
3832
3832
  let { A: r, B: a, C: s, D: i, E: o, F: u, G: c, H: l } = this;
3833
3833
  for (let d = 0; d < 64; d++) {
3834
- const p = ue(o, 6) ^ ue(o, 11) ^ ue(o, 25), m = l + p + Gu(o, u, c) + Vu[d] + Pe[d] | 0, y = (ue(r, 2) ^ ue(r, 13) ^ ue(r, 22)) + Wu(r, a, s) | 0;
3834
+ const p = ue(o, 6) ^ ue(o, 11) ^ ue(o, 25), m = l + p + Wu(o, u, c) + Zu[d] + Pe[d] | 0, y = (ue(r, 2) ^ ue(r, 13) ^ ue(r, 22)) + Vu(r, a, s) | 0;
3835
3835
  l = c, c = u, u = o, o = i + m | 0, i = s, s = a, a = r, r = m + y | 0;
3836
3836
  }
3837
3837
  r = r + this.A | 0, a = a + this.B | 0, s = s + this.C | 0, i = i + this.D | 0, o = o + this.E | 0, u = u + this.F | 0, c = c + this.G | 0, l = l + this.H | 0, this.set(r, a, s, i, o, u, c, l);
@@ -3843,18 +3843,18 @@ class Zu extends qu {
3843
3843
  this.set(0, 0, 0, 0, 0, 0, 0, 0), this.buffer.fill(0);
3844
3844
  }
3845
3845
  }
3846
- const gs = /* @__PURE__ */ qa(() => new Zu());
3847
- function Ku(e, t) {
3846
+ const gs = /* @__PURE__ */ qa(() => new Ku());
3847
+ function Yu(e, t) {
3848
3848
  return gs(de(e, { strict: !1 }) ? Ie(e) : e);
3849
3849
  }
3850
- function Yu(e) {
3851
- const { commitment: t, version: n = 1 } = e, r = e.to ?? (typeof t == "string" ? "hex" : "bytes"), a = Ku(t);
3850
+ function Ju(e) {
3851
+ const { commitment: t, version: n = 1 } = e, r = e.to ?? (typeof t == "string" ? "hex" : "bytes"), a = Yu(t);
3852
3852
  return a.set([n], 0), r === "bytes" ? a : q(a);
3853
3853
  }
3854
- function Ju(e) {
3854
+ function Xu(e) {
3855
3855
  const { commitments: t, version: n } = e, r = e.to ?? (typeof t[0] == "string" ? "hex" : "bytes"), a = [];
3856
3856
  for (const s of t)
3857
- a.push(Yu({
3857
+ a.push(Ju({
3858
3858
  commitment: s,
3859
3859
  to: r,
3860
3860
  version: n
@@ -3864,7 +3864,7 @@ function Ju(e) {
3864
3864
  const oa = 6, ws = 32, vr = 4096, Ts = ws * vr, ua = Ts * oa - // terminator byte (0x80).
3865
3865
  1 - // zero byte (0x00) appended to each field element.
3866
3866
  1 * vr * oa;
3867
- class Xu extends v {
3867
+ class Qu extends v {
3868
3868
  constructor({ maxSize: t, size: n }) {
3869
3869
  super("Blob size is too large.", {
3870
3870
  metaMessages: [`Max: ${t} bytes`, `Given: ${n} bytes`]
@@ -3876,7 +3876,7 @@ class Xu extends v {
3876
3876
  });
3877
3877
  }
3878
3878
  }
3879
- class Qu extends v {
3879
+ class ec extends v {
3880
3880
  constructor() {
3881
3881
  super("Blob data must not be empty."), Object.defineProperty(this, "name", {
3882
3882
  enumerable: !0,
@@ -3886,12 +3886,12 @@ class Qu extends v {
3886
3886
  });
3887
3887
  }
3888
3888
  }
3889
- function ec(e) {
3890
- const t = e.to ?? (typeof e.data == "string" ? "hex" : "bytes"), n = typeof e.data == "string" ? He(e.data) : e.data, r = H(n);
3889
+ function tc(e) {
3890
+ const t = e.to ?? (typeof e.data == "string" ? "hex" : "bytes"), n = typeof e.data == "string" ? Le(e.data) : e.data, r = L(n);
3891
3891
  if (!r)
3892
- throw new Qu();
3892
+ throw new ec();
3893
3893
  if (r > ua)
3894
- throw new Xu({
3894
+ throw new Qu({
3895
3895
  maxSize: ua,
3896
3896
  size: r
3897
3897
  });
@@ -3912,8 +3912,8 @@ function ec(e) {
3912
3912
  }
3913
3913
  return t === "bytes" ? a.map((o) => o.bytes) : a.map((o) => q(o.bytes));
3914
3914
  }
3915
- function tc(e) {
3916
- const { data: t, kzg: n, to: r } = e, a = e.blobs ?? ec({ data: t, to: r }), s = e.commitments ?? bs({ blobs: a, kzg: n, to: r }), i = e.proofs ?? hs({ blobs: a, commitments: s, kzg: n, to: r }), o = [];
3915
+ function nc(e) {
3916
+ const { data: t, kzg: n, to: r } = e, a = e.blobs ?? tc({ data: t, to: r }), s = e.commitments ?? bs({ blobs: a, kzg: n, to: r }), i = e.proofs ?? hs({ blobs: a, commitments: s, kzg: n, to: r }), o = [];
3917
3917
  for (let u = 0; u < a.length; u++)
3918
3918
  o.push({
3919
3919
  blob: a[u],
@@ -3922,7 +3922,7 @@ function tc(e) {
3922
3922
  });
3923
3923
  return o;
3924
3924
  }
3925
- function nc(e) {
3925
+ function rc(e) {
3926
3926
  if (e.type)
3927
3927
  return e.type;
3928
3928
  if (typeof e.blobs < "u" || typeof e.blobVersionedHashes < "u" || typeof e.maxFeePerBlobGas < "u" || typeof e.sidecars < "u")
@@ -3931,9 +3931,9 @@ function nc(e) {
3931
3931
  return "eip1559";
3932
3932
  if (typeof e.gasPrice < "u")
3933
3933
  return typeof e.accessList < "u" ? "eip2930" : "legacy";
3934
- throw new Iu({ transaction: e });
3934
+ throw new Mu({ transaction: e });
3935
3935
  }
3936
- async function Dt(e) {
3936
+ async function Nt(e) {
3937
3937
  const t = await e.request({
3938
3938
  method: "eth_chainId"
3939
3939
  });
@@ -3956,14 +3956,14 @@ async function cn(e, t) {
3956
3956
  if ((c.includes("blobVersionedHashes") || c.includes("sidecars")) && r && o) {
3957
3957
  const y = bs({ blobs: r, kzg: o });
3958
3958
  if (c.includes("blobVersionedHashes")) {
3959
- const b = Ju({
3959
+ const b = Xu({
3960
3960
  commitments: y,
3961
3961
  to: "hex"
3962
3962
  });
3963
3963
  p.blobVersionedHashes = b;
3964
3964
  }
3965
3965
  if (c.includes("sidecars")) {
3966
- const b = hs({ blobs: r, commitments: y, kzg: o }), h = tc({
3966
+ const b = hs({ blobs: r, commitments: y, kzg: o }), h = nc({
3967
3967
  blobs: r,
3968
3968
  commitments: y,
3969
3969
  proofs: b,
@@ -3972,12 +3972,12 @@ async function cn(e, t) {
3972
3972
  p.sidecars = h;
3973
3973
  }
3974
3974
  }
3975
- if (c.includes("chainId") && (a ? p.chainId = a.id : typeof s < "u" ? p.chainId = s : p.chainId = await S(e, Dt, "getChainId")({})), c.includes("nonce") && typeof u > "u" && d && (p.nonce = await S(e, ms, "getTransactionCount")({
3975
+ if (c.includes("chainId") && (a ? p.chainId = a.id : typeof s < "u" ? p.chainId = s : p.chainId = await S(e, Nt, "getChainId")({})), c.includes("nonce") && typeof u > "u" && d && (p.nonce = await S(e, ms, "getTransactionCount")({
3976
3976
  address: d.address,
3977
3977
  blockTag: "pending"
3978
3978
  })), (c.includes("fees") || c.includes("type")) && typeof l > "u")
3979
3979
  try {
3980
- p.type = nc(p);
3980
+ p.type = rc(p);
3981
3981
  } catch {
3982
3982
  const y = await f();
3983
3983
  p.type = typeof (y == null ? void 0 : y.baseFeePerGas) == "bigint" ? "eip1559" : "legacy";
@@ -4010,7 +4010,7 @@ async function cn(e, t) {
4010
4010
  return c.includes("gas") && typeof i > "u" && (p.gas = await S(e, xr, "estimateGas")({
4011
4011
  ...p,
4012
4012
  account: d ? { address: d.address, type: "json-rpc" } : void 0
4013
- })), Nt(p), delete p.parameters, p;
4013
+ })), Ft(p), delete p.parameters, p;
4014
4014
  }
4015
4015
  async function xr(e, t) {
4016
4016
  var a, s, i;
@@ -4024,7 +4024,7 @@ async function xr(e, t) {
4024
4024
  (r == null ? void 0 : r.type) === "local" ? void 0 : ["blobVersionedHashes"]
4025
4025
  )
4026
4026
  }), E = (l ? O(l) : void 0) || d, M = cs(P);
4027
- Nt(t);
4027
+ Ft(t);
4028
4028
  const B = (i = (s = (a = e.chain) == null ? void 0 : a.formatters) == null ? void 0 : s.transactionRequest) == null ? void 0 : i.format, N = (B || un)({
4029
4029
  // Pick out extra data that might exist on the chain's transaction request type.
4030
4030
  ...gr(T, { format: B }),
@@ -4047,7 +4047,7 @@ async function xr(e, t) {
4047
4047
  });
4048
4048
  return BigInt(F);
4049
4049
  } catch (o) {
4050
- throw Nu(o, {
4050
+ throw Du(o, {
4051
4051
  ...t,
4052
4052
  account: r,
4053
4053
  chain: e.chain
@@ -4082,7 +4082,7 @@ const ca = "/docs/contract/decodeEventLog";
4082
4082
  function Er(e) {
4083
4083
  const { abi: t, data: n, strict: r, topics: a } = e, s = r ?? !0, [i, ...o] = a;
4084
4084
  if (!i)
4085
- throw new no({ docsPath: ca });
4085
+ throw new ro({ docsPath: ca });
4086
4086
  const u = t.find((y) => y.type === "event" && i === ur(he(y)));
4087
4087
  if (!(u && "name" in u) || u.type !== "event")
4088
4088
  throw new Ua(i, { docsPath: ca });
@@ -4096,7 +4096,7 @@ function Er(e) {
4096
4096
  abiItem: u,
4097
4097
  param: b
4098
4098
  });
4099
- p[d ? y : b.name || y] = rc({ param: b, value: h });
4099
+ p[d ? y : b.name || y] = ac({ param: b, value: h });
4100
4100
  }
4101
4101
  const f = l.filter((y) => !("indexed" in y && y.indexed));
4102
4102
  if (f.length > 0) {
@@ -4115,7 +4115,7 @@ function Er(e) {
4115
4115
  abiItem: u,
4116
4116
  data: n,
4117
4117
  params: f,
4118
- size: H(n)
4118
+ size: L(n)
4119
4119
  }) : y;
4120
4120
  }
4121
4121
  else if (s)
@@ -4131,7 +4131,7 @@ function Er(e) {
4131
4131
  args: Object.values(p).length > 0 ? p : void 0
4132
4132
  };
4133
4133
  }
4134
- function rc({ param: e, value: t }) {
4134
+ function ac({ param: e, value: t }) {
4135
4135
  return e.type === "string" || e.type === "bytes" || e.type === "tuple" || e.type.match(/^(.*)\[(\d+)?\]$/) ? t : (sn([e], t) || [])[0];
4136
4136
  }
4137
4137
  function Pr({ abi: e, eventName: t, logs: n, strict: r = !0 }) {
@@ -4172,7 +4172,7 @@ async function Cr(e, { address: t, blockHash: n, fromBlock: r, toBlock: a, event
4172
4172
  const c = u ?? !1, l = i ?? (s ? [s] : void 0);
4173
4173
  let d = [];
4174
4174
  l && (d = [
4175
- l.flatMap((f) => Rt({
4175
+ l.flatMap((f) => Ot({
4176
4176
  abi: [f],
4177
4177
  eventName: f.name,
4178
4178
  args: o
@@ -4201,7 +4201,7 @@ async function Cr(e, { address: t, blockHash: n, fromBlock: r, toBlock: a, event
4201
4201
  }) : m;
4202
4202
  }
4203
4203
  async function Ar(e, t) {
4204
- const { abi: n, address: r, args: a, blockHash: s, eventName: i, fromBlock: o, toBlock: u, strict: c } = t, l = i ? Ot({ abi: n, name: i }) : void 0, d = l ? void 0 : n.filter((p) => p.type === "event");
4204
+ const { abi: n, address: r, args: a, blockHash: s, eventName: i, fromBlock: o, toBlock: u, strict: c } = t, l = i ? kt({ abi: n, name: i }) : void 0, d = l ? void 0 : n.filter((p) => p.type === "event");
4205
4205
  return S(e, Cr, "getLogs")({
4206
4206
  address: r,
4207
4207
  args: a,
@@ -4218,15 +4218,15 @@ function st(e) {
4218
4218
  const { abi: t, args: n, functionName: r, data: a } = e;
4219
4219
  let s = t[0];
4220
4220
  if (r) {
4221
- const o = Ot({ abi: t, args: n, name: r });
4221
+ const o = kt({ abi: t, args: n, name: r });
4222
4222
  if (!o)
4223
- throw new Wt(r, { docsPath: Pn });
4223
+ throw new Gt(r, { docsPath: Pn });
4224
4224
  s = o;
4225
4225
  }
4226
4226
  if (s.type !== "function")
4227
- throw new Wt(void 0, { docsPath: Pn });
4227
+ throw new Gt(void 0, { docsPath: Pn });
4228
4228
  if (!s.outputs)
4229
- throw new ro(s.name, { docsPath: Pn });
4229
+ throw new ao(s.name, { docsPath: Pn });
4230
4230
  const i = sn(s.outputs, a);
4231
4231
  if (i && i.length > 1)
4232
4232
  return i;
@@ -4350,7 +4350,7 @@ const Wn = [
4350
4350
  { name: "address", type: "address" }
4351
4351
  ]
4352
4352
  }
4353
- ], ac = [
4353
+ ], sc = [
4354
4354
  ...Es,
4355
4355
  {
4356
4356
  name: "reverse",
@@ -4408,7 +4408,7 @@ const Wn = [
4408
4408
  ],
4409
4409
  outputs: [{ name: "", type: "bytes" }]
4410
4410
  }
4411
- ], sc = [
4411
+ ], ic = [
4412
4412
  {
4413
4413
  inputs: [
4414
4414
  {
@@ -4430,7 +4430,7 @@ const Wn = [
4430
4430
  stateMutability: "nonpayable",
4431
4431
  type: "constructor"
4432
4432
  }
4433
- ], ic = "0x82ad56cb", oc = "0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe", uc = "0x60806040523480156200001157600080fd5b50604051620007003803806200070083398101604081905262000034916200056f565b6000620000438484846200004f565b9050806000526001601ff35b600080846001600160a01b0316803b806020016040519081016040528181526000908060200190933c90507f6492649264926492649264926492649264926492649264926492649264926492620000a68462000451565b036200021f57600060608085806020019051810190620000c79190620005ce565b8651929550909350915060000362000192576000836001600160a01b031683604051620000f5919062000643565b6000604051808303816000865af19150503d806000811462000134576040519150601f19603f3d011682016040523d82523d6000602084013e62000139565b606091505b5050905080620001905760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b505b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90620001c4908b90869060040162000661565b602060405180830381865afa158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020891906200069d565b6001600160e01b031916149450505050506200044a565b805115620002b157604051630b135d3f60e11b808252906001600160a01b03871690631626ba7e9062000259908890889060040162000661565b602060405180830381865afa15801562000277573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029d91906200069d565b6001600160e01b031916149150506200044a565b8251604114620003195760405162461bcd60e51b815260206004820152603a6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e677468000000000000606482015260840162000187565b620003236200046b565b506020830151604080850151855186939260009185919081106200034b576200034b620006c9565b016020015160f81c9050601b81148015906200036b57508060ff16601c14155b15620003cf5760405162461bcd60e51b815260206004820152603b6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c75650000000000606482015260840162000187565b6040805160008152602081018083528a905260ff83169181019190915260608101849052608081018390526001600160a01b038a169060019060a0016020604051602081039080840390855afa1580156200042e573d6000803e3d6000fd5b505050602060405103516001600160a01b031614955050505050505b9392505050565b60006020825110156200046357600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200049f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004d5578181015183820152602001620004bb565b50506000910152565b600082601f830112620004f057600080fd5b81516001600160401b03808211156200050d576200050d620004a2565b604051601f8301601f19908116603f01168101908282118183101715620005385762000538620004a2565b816040528381528660208588010111156200055257600080fd5b62000565846020830160208901620004b8565b9695505050505050565b6000806000606084860312156200058557600080fd5b8351620005928162000489565b6020850151604086015191945092506001600160401b03811115620005b657600080fd5b620005c486828701620004de565b9150509250925092565b600080600060608486031215620005e457600080fd5b8351620005f18162000489565b60208501519093506001600160401b03808211156200060f57600080fd5b6200061d87838801620004de565b935060408601519150808211156200063457600080fd5b50620005c486828701620004de565b6000825162000657818460208701620004b8565b9190910192915050565b828152604060208201526000825180604084015262000688816060850160208701620004b8565b601f01601f1916919091016060019392505050565b600060208284031215620006b057600080fd5b81516001600160e01b0319811681146200044a57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572";
4433
+ ], oc = "0x82ad56cb", uc = "0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe", cc = "0x60806040523480156200001157600080fd5b50604051620007003803806200070083398101604081905262000034916200056f565b6000620000438484846200004f565b9050806000526001601ff35b600080846001600160a01b0316803b806020016040519081016040528181526000908060200190933c90507f6492649264926492649264926492649264926492649264926492649264926492620000a68462000451565b036200021f57600060608085806020019051810190620000c79190620005ce565b8651929550909350915060000362000192576000836001600160a01b031683604051620000f5919062000643565b6000604051808303816000865af19150503d806000811462000134576040519150601f19603f3d011682016040523d82523d6000602084013e62000139565b606091505b5050905080620001905760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b505b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90620001c4908b90869060040162000661565b602060405180830381865afa158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020891906200069d565b6001600160e01b031916149450505050506200044a565b805115620002b157604051630b135d3f60e11b808252906001600160a01b03871690631626ba7e9062000259908890889060040162000661565b602060405180830381865afa15801562000277573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029d91906200069d565b6001600160e01b031916149150506200044a565b8251604114620003195760405162461bcd60e51b815260206004820152603a6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e677468000000000000606482015260840162000187565b620003236200046b565b506020830151604080850151855186939260009185919081106200034b576200034b620006c9565b016020015160f81c9050601b81148015906200036b57508060ff16601c14155b15620003cf5760405162461bcd60e51b815260206004820152603b6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c75650000000000606482015260840162000187565b6040805160008152602081018083528a905260ff83169181019190915260608101849052608081018390526001600160a01b038a169060019060a0016020604051602081039080840390855afa1580156200042e573d6000803e3d6000fd5b505050602060405103516001600160a01b031614955050505050505b9392505050565b60006020825110156200046357600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200049f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004d5578181015183820152602001620004bb565b50506000910152565b600082601f830112620004f057600080fd5b81516001600160401b03808211156200050d576200050d620004a2565b604051601f8301601f19908116603f01168101908282118183101715620005385762000538620004a2565b816040528381528660208588010111156200055257600080fd5b62000565846020830160208901620004b8565b9695505050505050565b6000806000606084860312156200058557600080fd5b8351620005928162000489565b6020850151604086015191945092506001600160401b03811115620005b657600080fd5b620005c486828701620004de565b9150509250925092565b600080600060608486031215620005e457600080fd5b8351620005f18162000489565b60208501519093506001600160401b03808211156200060f57600080fd5b6200061d87838801620004de565b935060408601519150808211156200063457600080fd5b50620005c486828701620004de565b6000825162000657818460208701620004b8565b9190910192915050565b828152604060208201526000825180604084015262000688816060850160208701620004b8565b601f01601f1916919091016060019392505050565b600060208284031215620006b057600080fd5b81516001600160e01b0319811681146200044a57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572";
4434
4434
  class Vn extends v {
4435
4435
  constructor({ blockNumber: t, chain: n, contract: r }) {
4436
4436
  super(`Chain "${n.name}" does not support contract "${r.name}".`, {
@@ -4450,7 +4450,7 @@ class Vn extends v {
4450
4450
  });
4451
4451
  }
4452
4452
  }
4453
- class cc extends v {
4453
+ class dc extends v {
4454
4454
  constructor({ chain: t, currentChainId: n }) {
4455
4455
  super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`, {
4456
4456
  metaMessages: [
@@ -4465,7 +4465,7 @@ class cc extends v {
4465
4465
  });
4466
4466
  }
4467
4467
  }
4468
- class dc extends v {
4468
+ class lc extends v {
4469
4469
  constructor() {
4470
4470
  super([
4471
4471
  "No chain was provided to the request.",
@@ -4496,12 +4496,12 @@ function Ir(e) {
4496
4496
  return r;
4497
4497
  const a = t.find((i) => "type" in i && i.type === "constructor");
4498
4498
  if (!a)
4499
- throw new Xi({ docsPath: Cn });
4499
+ throw new Qi({ docsPath: Cn });
4500
4500
  if (!("inputs" in a))
4501
4501
  throw new Gr({ docsPath: Cn });
4502
4502
  if (!a.inputs || a.inputs.length === 0)
4503
4503
  throw new Gr({ docsPath: Cn });
4504
- const s = kt(a.inputs, n);
4504
+ const s = $t(a.inputs, n);
4505
4505
  return cr([r, s]);
4506
4506
  }
4507
4507
  function it({ blockNumber: e, chain: t, contract: n }) {
@@ -4523,7 +4523,7 @@ function it({ blockNumber: e, chain: t, contract: n }) {
4523
4523
  });
4524
4524
  return r.address;
4525
4525
  }
4526
- function lc(e, { docsPath: t, ...n }) {
4526
+ function pc(e, { docsPath: t, ...n }) {
4527
4527
  const r = (() => {
4528
4528
  const a = hr(e, n);
4529
4529
  return a instanceof on ? e : a;
@@ -4566,9 +4566,9 @@ function As({ fn: e, id: t, shouldSplitBatch: n, wait: r = 0, sort: a }) {
4566
4566
  }
4567
4567
  async function dn(e, t) {
4568
4568
  var E, M, B, $;
4569
- const { account: n = e.account, batch: r = !!((E = e.batch) != null && E.multicall), blockNumber: a, blockTag: s = "latest", accessList: i, blobs: o, data: u, factory: c, factoryData: l, gas: d, gasPrice: p, maxFeePerBlobGas: m, maxFeePerGas: f, maxPriorityFeePerGas: y, nonce: b, to: h, value: g, stateOverride: w, ...x } = t, P = n ? re(n) : void 0, T = c && l && h && u, C = T ? fc({ data: u, factory: c, factoryData: l, to: h }) : u;
4569
+ const { account: n = e.account, batch: r = !!((E = e.batch) != null && E.multicall), blockNumber: a, blockTag: s = "latest", accessList: i, blobs: o, data: u, factory: c, factoryData: l, gas: d, gasPrice: p, maxFeePerBlobGas: m, maxFeePerGas: f, maxPriorityFeePerGas: y, nonce: b, to: h, value: g, stateOverride: w, ...x } = t, P = n ? re(n) : void 0, T = c && l && h && u, C = T ? mc({ data: u, factory: c, factoryData: l, to: h }) : u;
4570
4570
  try {
4571
- Nt(t);
4571
+ Ft(t);
4572
4572
  const F = (a ? O(a) : void 0) || s, G = cs(w), A = ($ = (B = (M = e.chain) == null ? void 0 : M.formatters) == null ? void 0 : B.transactionRequest) == null ? void 0 : $.format, R = (A || un)({
4573
4573
  // Pick out extra data that might exist on the chain's transaction request type.
4574
4574
  ...gr(x, { format: A }),
@@ -4585,9 +4585,9 @@ async function dn(e, t) {
4585
4585
  to: T ? void 0 : h,
4586
4586
  value: g
4587
4587
  });
4588
- if (r && pc({ request: R }) && !G)
4588
+ if (r && yc({ request: R }) && !G)
4589
4589
  try {
4590
- return await yc(e, {
4590
+ return await fc(e, {
4591
4591
  ...R,
4592
4592
  blockNumber: a,
4593
4593
  blockTag: s
@@ -4606,21 +4606,21 @@ async function dn(e, t) {
4606
4606
  });
4607
4607
  return U === "0x" ? { data: void 0 } : { data: U };
4608
4608
  } catch (N) {
4609
- const F = mc(N), { offchainLookup: G, offchainLookupSignature: A } = await import("./ccip-D9sqjqG8.js");
4609
+ const F = bc(N), { offchainLookup: G, offchainLookupSignature: A } = await import("./ccip-DRvnT9Rr.js");
4610
4610
  if (e.ccipRead !== !1 && (F == null ? void 0 : F.slice(0, 10)) === A && h)
4611
4611
  return { data: await G(e, { data: F, to: h }) };
4612
- throw T && (F == null ? void 0 : F.slice(0, 10)) === "0x101bb98d" ? new $u({ factory: c }) : lc(N, {
4612
+ throw T && (F == null ? void 0 : F.slice(0, 10)) === "0x101bb98d" ? new ku({ factory: c }) : pc(N, {
4613
4613
  ...t,
4614
4614
  account: P,
4615
4615
  chain: e.chain
4616
4616
  });
4617
4617
  }
4618
4618
  }
4619
- function pc({ request: e }) {
4619
+ function yc({ request: e }) {
4620
4620
  const { data: t, to: n, ...r } = e;
4621
- return !(!t || t.startsWith(ic) || !n || Object.values(r).filter((a) => typeof a < "u").length > 0);
4621
+ return !(!t || t.startsWith(oc) || !n || Object.values(r).filter((a) => typeof a < "u").length > 0);
4622
4622
  }
4623
- async function yc(e, t) {
4623
+ async function fc(e, t) {
4624
4624
  var y;
4625
4625
  const { batchSize: n = 1024, wait: r = 0 } = typeof ((y = e.batch) == null ? void 0 : y.multicall) == "object" ? e.batch.multicall : {}, { blockNumber: a, blockTag: s = "latest", data: i, multicallAddress: o, to: u } = t;
4626
4626
  let c = o;
@@ -4670,18 +4670,18 @@ async function yc(e, t) {
4670
4670
  throw new br({ data: m });
4671
4671
  return m === "0x" ? { data: void 0 } : { data: m };
4672
4672
  }
4673
- function fc(e) {
4673
+ function mc(e) {
4674
4674
  const { data: t, factory: n, factoryData: r, to: a } = e;
4675
4675
  return Ir({
4676
- abi: Vi([
4676
+ abi: Zi([
4677
4677
  "error CounterfactualDeployFailed(bytes)",
4678
4678
  "constructor(address, bytes, address, bytes)"
4679
4679
  ]),
4680
- bytecode: oc,
4680
+ bytecode: uc,
4681
4681
  args: [a, t, n, r]
4682
4682
  });
4683
4683
  }
4684
- function mc(e) {
4684
+ function bc(e) {
4685
4685
  var n;
4686
4686
  if (!(e instanceof v))
4687
4687
  return;
@@ -4755,9 +4755,9 @@ async function Is(e, t) {
4755
4755
  }
4756
4756
  }
4757
4757
  const In = /* @__PURE__ */ new Map(), pa = /* @__PURE__ */ new Map();
4758
- let bc = 0;
4758
+ let hc = 0;
4759
4759
  function $e(e, t, n) {
4760
- const r = ++bc, a = () => In.get(e) || [], s = () => {
4760
+ const r = ++hc, a = () => In.get(e) || [], s = () => {
4761
4761
  const l = a();
4762
4762
  In.set(e, l.filter((d) => d.id !== r));
4763
4763
  }, i = () => {
@@ -4781,30 +4781,30 @@ function $e(e, t, n) {
4781
4781
  const c = n(u);
4782
4782
  return typeof c == "function" && pa.set(e, c), i;
4783
4783
  }
4784
- async function Jt(e) {
4784
+ async function Yt(e) {
4785
4785
  return new Promise((t) => setTimeout(t, e));
4786
4786
  }
4787
- function Ut(e, { emitOnBegin: t, initialWaitTime: n, interval: r }) {
4787
+ function Dt(e, { emitOnBegin: t, initialWaitTime: n, interval: r }) {
4788
4788
  let a = !0;
4789
4789
  const s = () => a = !1;
4790
4790
  return (async () => {
4791
4791
  let o;
4792
4792
  t && (o = await e({ unpoll: s }));
4793
4793
  const u = await (n == null ? void 0 : n(o)) ?? r;
4794
- await Jt(u);
4794
+ await Yt(u);
4795
4795
  const c = async () => {
4796
- a && (await e({ unpoll: s }), await Jt(r), c());
4796
+ a && (await e({ unpoll: s }), await Yt(r), c());
4797
4797
  };
4798
4798
  c();
4799
4799
  })(), s;
4800
4800
  }
4801
- const hc = /* @__PURE__ */ new Map(), gc = /* @__PURE__ */ new Map();
4802
- function wc(e) {
4801
+ const gc = /* @__PURE__ */ new Map(), wc = /* @__PURE__ */ new Map();
4802
+ function Tc(e) {
4803
4803
  const t = (a, s) => ({
4804
4804
  clear: () => s.delete(a),
4805
4805
  get: () => s.get(a),
4806
4806
  set: (i) => s.set(a, i)
4807
- }), n = t(e, hc), r = t(e, gc);
4807
+ }), n = t(e, gc), r = t(e, wc);
4808
4808
  return {
4809
4809
  clear: () => {
4810
4810
  n.clear(), r.clear();
@@ -4813,8 +4813,8 @@ function wc(e) {
4813
4813
  response: r
4814
4814
  };
4815
4815
  }
4816
- async function Tc(e, { cacheKey: t, cacheTime: n = Number.POSITIVE_INFINITY }) {
4817
- const r = wc(t), a = r.response.get();
4816
+ async function vc(e, { cacheKey: t, cacheTime: n = Number.POSITIVE_INFINITY }) {
4817
+ const r = Tc(t), a = r.response.get();
4818
4818
  if (a && n > 0 && (/* @__PURE__ */ new Date()).getTime() - a.created.getTime() < n)
4819
4819
  return a.data;
4820
4820
  let s = r.promise.get();
@@ -4826,11 +4826,11 @@ async function Tc(e, { cacheKey: t, cacheTime: n = Number.POSITIVE_INFINITY }) {
4826
4826
  r.promise.clear();
4827
4827
  }
4828
4828
  }
4829
- const vc = (e) => `blockNumber.${e}`;
4830
- async function jt(e, { cacheTime: t = e.cacheTime } = {}) {
4831
- const n = await Tc(() => e.request({
4829
+ const xc = (e) => `blockNumber.${e}`;
4830
+ async function Ut(e, { cacheTime: t = e.cacheTime } = {}) {
4831
+ const n = await vc(() => e.request({
4832
4832
  method: "eth_blockNumber"
4833
- }), { cacheKey: vc(e.uid), cacheTime: t });
4833
+ }), { cacheKey: xc(e.uid), cacheTime: t });
4834
4834
  return BigInt(n);
4835
4835
  }
4836
4836
  async function ln(e, { filter: t }) {
@@ -4871,7 +4871,7 @@ function Ms(e, t) {
4871
4871
  let w;
4872
4872
  o !== void 0 && (w = o - 1n);
4873
4873
  let x, P = !1;
4874
- const T = Ut(async () => {
4874
+ const T = Dt(async () => {
4875
4875
  var C;
4876
4876
  if (!P) {
4877
4877
  try {
@@ -4893,7 +4893,7 @@ function Ms(e, t) {
4893
4893
  if (x)
4894
4894
  E = await S(e, ln, "getFilterChanges")({ filter: x });
4895
4895
  else {
4896
- const M = await S(e, jt, "getBlockNumber")({});
4896
+ const M = await S(e, Ut, "getBlockNumber")({});
4897
4897
  w && w !== M ? E = await S(e, Ar, "getContractEvents")({
4898
4898
  abi: n,
4899
4899
  address: r,
@@ -4942,7 +4942,7 @@ function Ms(e, t) {
4942
4942
  return E ? E.value : e.transport;
4943
4943
  }
4944
4944
  return e.transport;
4945
- })(), T = i ? Rt({
4945
+ })(), T = i ? Ot({
4946
4946
  abi: n,
4947
4947
  eventName: i,
4948
4948
  args: a
@@ -5009,16 +5009,16 @@ class yn extends v {
5009
5009
  }
5010
5010
  function Ss({ chain: e, currentChainId: t }) {
5011
5011
  if (!e)
5012
- throw new dc();
5012
+ throw new lc();
5013
5013
  if (t !== e.id)
5014
- throw new cc({ chain: e, currentChainId: t });
5014
+ throw new dc({ chain: e, currentChainId: t });
5015
5015
  }
5016
- function xc(e, { docsPath: t, ...n }) {
5016
+ function Ec(e, { docsPath: t, ...n }) {
5017
5017
  const r = (() => {
5018
5018
  const a = hr(e, n);
5019
5019
  return a instanceof on ? e : a;
5020
5020
  })();
5021
- return new Mu(r, {
5021
+ return new Su(r, {
5022
5022
  docsPath: t,
5023
5023
  ...n
5024
5024
  });
@@ -5038,9 +5038,9 @@ async function Sr(e, t) {
5038
5038
  });
5039
5039
  const b = re(n);
5040
5040
  try {
5041
- Nt(t);
5041
+ Ft(t);
5042
5042
  let P;
5043
- if (r !== null && (P = await S(e, Dt, "getChainId")({}), Ss({
5043
+ if (r !== null && (P = await S(e, Nt, "getChainId")({}), Ss({
5044
5044
  currentChainId: P,
5045
5045
  chain: r
5046
5046
  })), b.type === "local") {
@@ -5089,7 +5089,7 @@ async function Sr(e, t) {
5089
5089
  params: [E]
5090
5090
  }, { retryCount: 0 });
5091
5091
  } catch (P) {
5092
- throw xc(P, {
5092
+ throw Ec(P, {
5093
5093
  ...t,
5094
5094
  account: b,
5095
5095
  chain: t.chain || void 0
@@ -5117,7 +5117,7 @@ function ot({ abi: e, address: t, client: n }) {
5117
5117
  return i && (c && (u.read = new Proxy({}, {
5118
5118
  get(p, m) {
5119
5119
  return (...f) => {
5120
- const { args: y, options: b } = zt(f);
5120
+ const { args: y, options: b } = Lt(f);
5121
5121
  return S(a, le, "readContract")({
5122
5122
  abi: e,
5123
5123
  address: t,
@@ -5130,7 +5130,7 @@ function ot({ abi: e, address: t, client: n }) {
5130
5130
  })), l && (u.simulate = new Proxy({}, {
5131
5131
  get(p, m) {
5132
5132
  return (...f) => {
5133
- const { args: y, options: b } = zt(f);
5133
+ const { args: y, options: b } = Lt(f);
5134
5134
  return S(a, Is, "simulateContract")({
5135
5135
  abi: e,
5136
5136
  address: t,
@@ -5182,7 +5182,7 @@ function ot({ abi: e, address: t, client: n }) {
5182
5182
  }))), o && l && (u.write = new Proxy({}, {
5183
5183
  get(p, m) {
5184
5184
  return (...f) => {
5185
- const { args: y, options: b } = zt(f);
5185
+ const { args: y, options: b } = Lt(f);
5186
5186
  return S(s, Bs, "writeContract")({
5187
5187
  abi: e,
5188
5188
  address: t,
@@ -5195,7 +5195,7 @@ function ot({ abi: e, address: t, client: n }) {
5195
5195
  })), (i || o) && l && (u.estimateGas = new Proxy({}, {
5196
5196
  get(p, m) {
5197
5197
  return (...f) => {
5198
- const { args: y, options: b } = zt(f);
5198
+ const { args: y, options: b } = Lt(f);
5199
5199
  return S(a ?? s, xs, "estimateContractGas")({
5200
5200
  abi: e,
5201
5201
  address: t,
@@ -5208,7 +5208,7 @@ function ot({ abi: e, address: t, client: n }) {
5208
5208
  }
5209
5209
  })), u.address = t, u.abi = e, u;
5210
5210
  }
5211
- function zt(e) {
5211
+ function Lt(e) {
5212
5212
  const t = e.length && Array.isArray(e[0]), n = t ? e[0] : [], r = (t ? e[1] : e[0]) ?? {};
5213
5213
  return { args: n, options: r };
5214
5214
  }
@@ -5218,7 +5218,7 @@ function Mn(e, t) {
5218
5218
  const r = n ? e[0] : void 0, a = (n ? e[1] : e[0]) ?? {};
5219
5219
  return { args: r, options: a };
5220
5220
  }
5221
- class Ec extends v {
5221
+ class Pc extends v {
5222
5222
  constructor({ address: t }) {
5223
5223
  super(`No EIP-712 domain found on contract "${t}".`, {
5224
5224
  metaMessages: [
@@ -5235,11 +5235,11 @@ class Ec extends v {
5235
5235
  });
5236
5236
  }
5237
5237
  }
5238
- async function Pc(e, t) {
5238
+ async function Cc(e, t) {
5239
5239
  const { address: n, factory: r, factoryData: a } = t;
5240
5240
  try {
5241
5241
  const [s, i, o, u, c, l, d] = await S(e, le, "readContract")({
5242
- abi: Cc,
5242
+ abi: Ac,
5243
5243
  address: n,
5244
5244
  functionName: "eip712Domain",
5245
5245
  factory: r,
@@ -5258,10 +5258,10 @@ async function Pc(e, t) {
5258
5258
  };
5259
5259
  } catch (s) {
5260
5260
  const i = s;
5261
- throw i.name === "ContractFunctionExecutionError" && i.cause.name === "ContractFunctionZeroDataError" ? new Ec({ address: n }) : i;
5261
+ throw i.name === "ContractFunctionExecutionError" && i.cause.name === "ContractFunctionZeroDataError" ? new Pc({ address: n }) : i;
5262
5262
  }
5263
5263
  }
5264
- const Cc = [
5264
+ const Ac = [
5265
5265
  {
5266
5266
  inputs: [],
5267
5267
  name: "eip712Domain",
@@ -5278,7 +5278,7 @@ const Cc = [
5278
5278
  type: "function"
5279
5279
  }
5280
5280
  ];
5281
- async function Ac(e, { chain: t }) {
5281
+ async function Ic(e, { chain: t }) {
5282
5282
  const { id: n, name: r, nativeCurrency: a, rpcUrls: s, blockExplorers: i } = t;
5283
5283
  await e.request({
5284
5284
  method: "wallet_addEthereumChain",
@@ -5294,14 +5294,14 @@ async function Ac(e, { chain: t }) {
5294
5294
  }, { retryCount: 0 });
5295
5295
  }
5296
5296
  const Zn = 256;
5297
- let _t = Zn, qt;
5298
- function Ic(e = 11) {
5299
- if (!qt || _t + e > Zn * 2) {
5300
- qt = "", _t = 0;
5297
+ let zt = Zn, _t;
5298
+ function Mc(e = 11) {
5299
+ if (!_t || zt + e > Zn * 2) {
5300
+ _t = "", zt = 0;
5301
5301
  for (let t = 0; t < Zn; t++)
5302
- qt += (256 + Math.random() * 256 | 0).toString(16).substring(1);
5302
+ _t += (256 + Math.random() * 256 | 0).toString(16).substring(1);
5303
5303
  }
5304
- return qt.substring(_t, _t++ + e);
5304
+ return _t.substring(zt, zt++ + e);
5305
5305
  }
5306
5306
  function $s(e) {
5307
5307
  const { batch: t, cacheTime: n = e.pollingInterval ?? 4e3, ccipRead: r, key: a = "base", name: s = "Base Client", pollingInterval: i = 4e3, type: o = "base" } = e, u = e.chain, c = e.account ? re(e.account) : void 0, { config: l, request: d, value: p } = e.transport({
@@ -5319,7 +5319,7 @@ function $s(e) {
5319
5319
  request: d,
5320
5320
  transport: m,
5321
5321
  type: o,
5322
- uid: Ic()
5322
+ uid: Mc()
5323
5323
  };
5324
5324
  function y(b) {
5325
5325
  return (h) => {
@@ -5337,7 +5337,7 @@ function Kn(e, { delay: t = 100, retryCount: n = 2, shouldRetry: r = () => !0 }
5337
5337
  const i = async ({ count: o = 0 } = {}) => {
5338
5338
  const u = async ({ error: c }) => {
5339
5339
  const l = typeof t == "function" ? t({ count: o, error: c }) : t;
5340
- l && await Jt(l), i({ count: o + 1 });
5340
+ l && await Yt(l), i({ count: o + 1 });
5341
5341
  };
5342
5342
  try {
5343
5343
  const c = await e();
@@ -5351,7 +5351,7 @@ function Kn(e, { delay: t = 100, retryCount: n = 2, shouldRetry: r = () => !0 }
5351
5351
  i();
5352
5352
  });
5353
5353
  }
5354
- function Mc(e, t = {}) {
5354
+ function Sc(e, t = {}) {
5355
5355
  return async (n, r = {}) => {
5356
5356
  const { retryDelay: a = 150, retryCount: s = 3 } = {
5357
5357
  ...t,
@@ -5387,8 +5387,8 @@ function Mc(e, t = {}) {
5387
5387
  throw new Qe(o);
5388
5388
  case Et.code:
5389
5389
  throw new Et(o);
5390
- case je.code:
5391
- throw new je(o);
5390
+ case He.code:
5391
+ throw new He(o);
5392
5392
  case Pt.code:
5393
5393
  throw new Pt(o);
5394
5394
  case Ct.code:
@@ -5400,9 +5400,9 @@ function Mc(e, t = {}) {
5400
5400
  case Mt.code:
5401
5401
  throw new Mt(o);
5402
5402
  case 5e3:
5403
- throw new je(o);
5403
+ throw new He(o);
5404
5404
  default:
5405
- throw i instanceof v ? i : new Ou(o);
5405
+ throw i instanceof v ? i : new Ru(o);
5406
5406
  }
5407
5407
  }
5408
5408
  }, {
@@ -5416,21 +5416,21 @@ function Mc(e, t = {}) {
5416
5416
  return ~~(1 << i) * a;
5417
5417
  },
5418
5418
  retryCount: s,
5419
- shouldRetry: ({ error: i }) => Sc(i)
5419
+ shouldRetry: ({ error: i }) => Bc(i)
5420
5420
  });
5421
5421
  };
5422
5422
  }
5423
- function Sc(e) {
5423
+ function Bc(e) {
5424
5424
  return "code" in e && typeof e.code == "number" ? e.code === -1 || e.code === Qe.code || e.code === ze.code : e instanceof yt && e.status ? e.status === 403 || e.status === 408 || e.status === 413 || e.status === 429 || e.status === 500 || e.status === 502 || e.status === 503 || e.status === 504 : !0;
5425
5425
  }
5426
5426
  function Br({ key: e, name: t, request: n, retryCount: r = 3, retryDelay: a = 150, timeout: s, type: i }, o) {
5427
5427
  return {
5428
5428
  config: { key: e, name: t, request: n, retryCount: r, retryDelay: a, timeout: s, type: i },
5429
- request: Mc(n, { retryCount: r, retryDelay: a }),
5429
+ request: Sc(n, { retryCount: r, retryDelay: a }),
5430
5430
  value: o
5431
5431
  };
5432
5432
  }
5433
- function Bc(e, t = {}) {
5433
+ function $c(e, t = {}) {
5434
5434
  const { key: n = "custom", name: r = "Custom Provider", retryDelay: a } = t;
5435
5435
  return ({ retryCount: s }) => Br({
5436
5436
  key: n,
@@ -5441,7 +5441,7 @@ function Bc(e, t = {}) {
5441
5441
  type: "custom"
5442
5442
  });
5443
5443
  }
5444
- function $c(e, t = {}) {
5444
+ function kc(e, t = {}) {
5445
5445
  const { key: n = "fallback", name: r = "Fallback", rank: a = !1, retryCount: s, retryDelay: i } = t;
5446
5446
  return ({ chain: o, pollingInterval: u = 4e3, timeout: c, ...l }) => {
5447
5447
  let d = e, p = () => {
@@ -5476,7 +5476,7 @@ function $c(e, t = {}) {
5476
5476
  params: y,
5477
5477
  transport: g,
5478
5478
  status: "error"
5479
- }), kc(w) || h === d.length - 1)
5479
+ }), Oc(w) || h === d.length - 1)
5480
5480
  throw w;
5481
5481
  return b(h + 1);
5482
5482
  }
@@ -5492,7 +5492,7 @@ function $c(e, t = {}) {
5492
5492
  });
5493
5493
  if (a) {
5494
5494
  const f = typeof a == "object" ? a : {};
5495
- Oc({
5495
+ Rc({
5496
5496
  chain: o,
5497
5497
  interval: f.interval ?? u,
5498
5498
  onTransports: (y) => d = y,
@@ -5505,10 +5505,10 @@ function $c(e, t = {}) {
5505
5505
  return m;
5506
5506
  };
5507
5507
  }
5508
- function kc(e) {
5509
- return "code" in e && typeof e.code == "number" && (e.code === Xe.code || e.code === je.code || e.code === 5e3);
5508
+ function Oc(e) {
5509
+ return "code" in e && typeof e.code == "number" && (e.code === Xe.code || e.code === He.code || e.code === 5e3);
5510
5510
  }
5511
- function Oc({ chain: e, interval: t = 4e3, onTransports: n, sampleCount: r = 10, timeout: a = 1e3, transports: s, weights: i = {} }) {
5511
+ function Rc({ chain: e, interval: t = 4e3, onTransports: n, sampleCount: r = 10, timeout: a = 1e3, transports: s, weights: i = {} }) {
5512
5512
  const { stability: o = 0.7, latency: u = 0.3 } = i, c = [], l = async () => {
5513
5513
  const d = await Promise.all(s.map(async (f) => {
5514
5514
  const y = f({ chain: e, retryCount: 0, timeout: a }), b = Date.now();
@@ -5530,18 +5530,18 @@ function Oc({ chain: e, interval: t = 4e3, onTransports: n, sampleCount: r = 10,
5530
5530
  y
5531
5531
  ];
5532
5532
  }).sort((f, y) => y[0] - f[0]);
5533
- n(m.map(([, f]) => s[f])), await Jt(t), l();
5533
+ n(m.map(([, f]) => s[f])), await Yt(t), l();
5534
5534
  };
5535
5535
  l();
5536
5536
  }
5537
- class Rc extends v {
5537
+ class Fc extends v {
5538
5538
  constructor() {
5539
5539
  super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.", {
5540
5540
  docsPath: "/docs/clients/intro"
5541
5541
  });
5542
5542
  }
5543
5543
  }
5544
- function Fc(e, { errorInstance: t = new Error("timed out"), timeout: n, signal: r }) {
5544
+ function Nc(e, { errorInstance: t = new Error("timed out"), timeout: n, signal: r }) {
5545
5545
  return new Promise((a, s) => {
5546
5546
  (async () => {
5547
5547
  let i;
@@ -5558,7 +5558,7 @@ function Fc(e, { errorInstance: t = new Error("timed out"), timeout: n, signal:
5558
5558
  })();
5559
5559
  });
5560
5560
  }
5561
- function Nc() {
5561
+ function Dc() {
5562
5562
  return {
5563
5563
  current: 0,
5564
5564
  take() {
@@ -5569,8 +5569,8 @@ function Nc() {
5569
5569
  }
5570
5570
  };
5571
5571
  }
5572
- const ya = /* @__PURE__ */ Nc();
5573
- function Dc(e, t = {}) {
5572
+ const ya = /* @__PURE__ */ Dc();
5573
+ function Uc(e, t = {}) {
5574
5574
  return {
5575
5575
  async request(n) {
5576
5576
  var d;
@@ -5579,7 +5579,7 @@ function Dc(e, t = {}) {
5579
5579
  ...n.fetchOptions ?? {}
5580
5580
  }, { headers: u, method: c, signal: l } = o;
5581
5581
  try {
5582
- const p = await Fc(async ({ signal: f }) => {
5582
+ const p = await Nc(async ({ signal: f }) => {
5583
5583
  const y = {
5584
5584
  ...o,
5585
5585
  body: Array.isArray(r) ? W(r.map((g) => ({
@@ -5630,8 +5630,8 @@ function Yn(e, t = {}) {
5630
5630
  return ({ chain: c, retryCount: l, timeout: d }) => {
5631
5631
  const { batchSize: p = 1e3, wait: m = 0 } = typeof n == "object" ? n : {}, f = t.retryCount ?? l, y = d ?? t.timeout ?? 1e4, b = e || (c == null ? void 0 : c.rpcUrls.default.http[0]);
5632
5632
  if (!b)
5633
- throw new Rc();
5634
- const h = Dc(b, {
5633
+ throw new Fc();
5634
+ const h = Uc(b, {
5635
5635
  fetchOptions: r,
5636
5636
  onRequest: i,
5637
5637
  onResponse: o,
@@ -5687,7 +5687,7 @@ function ks(e) {
5687
5687
  const t = `0x${e.slice(1, 65)}`;
5688
5688
  return de(t) ? t : null;
5689
5689
  }
5690
- function Gt(e) {
5690
+ function qt(e) {
5691
5691
  let t = new Uint8Array(32).fill(0);
5692
5692
  if (!e)
5693
5693
  return q(t);
@@ -5698,7 +5698,7 @@ function Gt(e) {
5698
5698
  }
5699
5699
  return q(t);
5700
5700
  }
5701
- function Uc(e) {
5701
+ function Hc(e) {
5702
5702
  return `[${e.slice(2)}]`;
5703
5703
  }
5704
5704
  function jc(e) {
@@ -5714,7 +5714,7 @@ function fn(e) {
5714
5714
  const a = t.split(".");
5715
5715
  for (let s = 0; s < a.length; s++) {
5716
5716
  let i = me(a[s]);
5717
- i.byteLength > 255 && (i = me(Uc(jc(a[s])))), n[r] = i.length, n.set(i, r + 1), r += i.length + 1;
5717
+ i.byteLength > 255 && (i = me(Hc(jc(a[s])))), n[r] = i.length, n.set(i, r + 1), r += i.length + 1;
5718
5718
  }
5719
5719
  return n.byteLength !== r + 1 ? n.slice(0, r + 1) : n;
5720
5720
  }
@@ -5733,7 +5733,7 @@ async function Lc(e, { blockNumber: t, blockTag: n, coinType: r, name: a, gatewa
5733
5733
  const c = Re({
5734
5734
  abi: la,
5735
5735
  functionName: "addr",
5736
- ...r != null ? { args: [Gt(a), BigInt(r)] } : { args: [Gt(a)] }
5736
+ ...r != null ? { args: [qt(a), BigInt(r)] } : { args: [qt(a)] }
5737
5737
  }), l = {
5738
5738
  address: u,
5739
5739
  abi: Ps,
@@ -5749,7 +5749,7 @@ async function Lc(e, { blockNumber: t, blockTag: n, coinType: r, name: a, gatewa
5749
5749
  return null;
5750
5750
  const m = st({
5751
5751
  abi: la,
5752
- args: r != null ? [Gt(a), BigInt(r)] : void 0,
5752
+ args: r != null ? [qt(a), BigInt(r)] : void 0,
5753
5753
  functionName: "addr",
5754
5754
  data: p[0]
5755
5755
  });
@@ -5762,7 +5762,7 @@ async function Lc(e, { blockNumber: t, blockTag: n, coinType: r, name: a, gatewa
5762
5762
  throw c;
5763
5763
  }
5764
5764
  }
5765
- class Hc extends v {
5765
+ class zc extends v {
5766
5766
  constructor({ data: t }) {
5767
5767
  super("Unable to extract image from metadata. The metadata may be malformed or invalid.", {
5768
5768
  metaMessages: [
@@ -5798,7 +5798,7 @@ class kr extends v {
5798
5798
  });
5799
5799
  }
5800
5800
  }
5801
- class zc extends v {
5801
+ class _c extends v {
5802
5802
  constructor({ namespace: t }) {
5803
5803
  super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`), Object.defineProperty(this, "name", {
5804
5804
  enumerable: !0,
@@ -5808,8 +5808,8 @@ class zc extends v {
5808
5808
  });
5809
5809
  }
5810
5810
  }
5811
- const _c = /(?<protocol>https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/, qc = /^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/, Gc = /^data:([a-zA-Z\-/+]*);base64,([^"].*)/, Wc = /^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;
5812
- async function Vc(e) {
5811
+ const qc = /(?<protocol>https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/, Gc = /^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/, Wc = /^data:([a-zA-Z\-/+]*);base64,([^"].*)/, Vc = /^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;
5812
+ async function Zc(e) {
5813
5813
  try {
5814
5814
  const t = await fetch(e, { method: "HEAD" });
5815
5815
  if (t.status === 200) {
@@ -5832,10 +5832,10 @@ function fa(e, t) {
5832
5832
  return e ? e.endsWith("/") ? e.slice(0, -1) : e : t;
5833
5833
  }
5834
5834
  function Os({ uri: e, gatewayUrls: t }) {
5835
- const n = Gc.test(e);
5835
+ const n = Wc.test(e);
5836
5836
  if (n)
5837
5837
  return { uri: e, isOnChain: !0, isEncoded: n };
5838
- const r = fa(t == null ? void 0 : t.ipfs, "https://ipfs.io"), a = fa(t == null ? void 0 : t.arweave, "https://arweave.net"), s = e.match(_c), { protocol: i, subpath: o, target: u, subtarget: c = "" } = (s == null ? void 0 : s.groups) || {}, l = i === "ipns:/" || o === "ipns/", d = i === "ipfs:/" || o === "ipfs/" || qc.test(e);
5838
+ const r = fa(t == null ? void 0 : t.ipfs, "https://ipfs.io"), a = fa(t == null ? void 0 : t.arweave, "https://arweave.net"), s = e.match(qc), { protocol: i, subpath: o, target: u, subtarget: c = "" } = (s == null ? void 0 : s.groups) || {}, l = i === "ipns:/" || o === "ipns/", d = i === "ipfs:/" || o === "ipfs/" || Gc.test(e);
5839
5839
  if (e.startsWith("http") && !l && !d) {
5840
5840
  let m = e;
5841
5841
  return t != null && t.arweave && (m = e.replace(/https:\/\/arweave.net/g, t == null ? void 0 : t.arweave)), { uri: m, isOnChain: !1, isEncoded: !1 };
@@ -5852,7 +5852,7 @@ function Os({ uri: e, gatewayUrls: t }) {
5852
5852
  isOnChain: !1,
5853
5853
  isEncoded: !1
5854
5854
  };
5855
- let p = e.replace(Wc, "");
5855
+ let p = e.replace(Vc, "");
5856
5856
  if (p.startsWith("<svg") && (p = `data:image/svg+xml;base64,${btoa(p)}`), p.startsWith("data:") || p.startsWith("{"))
5857
5857
  return {
5858
5858
  uri: p,
@@ -5863,10 +5863,10 @@ function Os({ uri: e, gatewayUrls: t }) {
5863
5863
  }
5864
5864
  function Rs(e) {
5865
5865
  if (typeof e != "object" || !("image" in e) && !("image_url" in e) && !("image_data" in e))
5866
- throw new Hc({ data: e });
5866
+ throw new zc({ data: e });
5867
5867
  return e.image || e.image_url || e.image_data;
5868
5868
  }
5869
- async function Zc({ gatewayUrls: e, uri: t }) {
5869
+ async function Kc({ gatewayUrls: e, uri: t }) {
5870
5870
  try {
5871
5871
  const n = await fetch(t).then((a) => a.json());
5872
5872
  return await Or({
@@ -5879,11 +5879,11 @@ async function Zc({ gatewayUrls: e, uri: t }) {
5879
5879
  }
5880
5880
  async function Or({ gatewayUrls: e, uri: t }) {
5881
5881
  const { uri: n, isOnChain: r } = Os({ uri: t, gatewayUrls: e });
5882
- if (r || await Vc(n))
5882
+ if (r || await Zc(n))
5883
5883
  return n;
5884
5884
  throw new kr({ uri: t });
5885
5885
  }
5886
- function Kc(e) {
5886
+ function Yc(e) {
5887
5887
  let t = e;
5888
5888
  t.startsWith("did:nft:") && (t = t.replace("did:nft:", "").replace(/_/g, "/"));
5889
5889
  const [n, r, a] = t.split("/"), [s, i] = n.split(":"), [o, u] = r.split(":");
@@ -5906,7 +5906,7 @@ function Kc(e) {
5906
5906
  tokenID: a
5907
5907
  };
5908
5908
  }
5909
- async function Yc(e, { nft: t }) {
5909
+ async function Jc(e, { nft: t }) {
5910
5910
  if (t.namespace === "erc721")
5911
5911
  return le(e, {
5912
5912
  address: t.contractAddress,
@@ -5937,13 +5937,13 @@ async function Yc(e, { nft: t }) {
5937
5937
  functionName: "uri",
5938
5938
  args: [BigInt(t.tokenID)]
5939
5939
  });
5940
- throw new zc({ namespace: t.namespace });
5941
- }
5942
- async function Jc(e, { gatewayUrls: t, record: n }) {
5943
- return /eip155:/i.test(n) ? Xc(e, { gatewayUrls: t, record: n }) : Or({ uri: n, gatewayUrls: t });
5940
+ throw new _c({ namespace: t.namespace });
5944
5941
  }
5945
5942
  async function Xc(e, { gatewayUrls: t, record: n }) {
5946
- const r = Kc(n), a = await Yc(e, { nft: r }), { uri: s, isOnChain: i, isEncoded: o } = Os({ uri: a, gatewayUrls: t });
5943
+ return /eip155:/i.test(n) ? Qc(e, { gatewayUrls: t, record: n }) : Or({ uri: n, gatewayUrls: t });
5944
+ }
5945
+ async function Qc(e, { gatewayUrls: t, record: n }) {
5946
+ const r = Yc(n), a = await Jc(e, { nft: r }), { uri: s, isOnChain: i, isEncoded: o } = Os({ uri: a, gatewayUrls: t });
5947
5947
  if (i && (s.includes("data:application/json;base64,") || s.startsWith("{"))) {
5948
5948
  const c = o ? (
5949
5949
  // if it is encoded, decode it
@@ -5955,7 +5955,7 @@ async function Xc(e, { gatewayUrls: t, record: n }) {
5955
5955
  return Or({ uri: Rs(l), gatewayUrls: t });
5956
5956
  }
5957
5957
  let u = r.tokenID;
5958
- return r.namespace === "erc1155" && (u = u.replace("0x", "").padStart(64, "0")), Zc({
5958
+ return r.namespace === "erc1155" && (u = u.replace("0x", "").padStart(64, "0")), Kc({
5959
5959
  gatewayUrls: t,
5960
5960
  uri: s.replace(/(?:0x)?{id}/, u)
5961
5961
  });
@@ -5981,7 +5981,7 @@ async function Fs(e, { blockNumber: t, blockTag: n, name: r, key: a, gatewayUrls
5981
5981
  Re({
5982
5982
  abi: da,
5983
5983
  functionName: "text",
5984
- args: [Gt(r), a]
5984
+ args: [qt(r), a]
5985
5985
  })
5986
5986
  ],
5987
5987
  blockNumber: t,
@@ -6006,7 +6006,7 @@ async function Fs(e, { blockNumber: t, blockTag: n, name: r, key: a, gatewayUrls
6006
6006
  throw c;
6007
6007
  }
6008
6008
  }
6009
- async function Qc(e, { blockNumber: t, blockTag: n, assetGatewayUrls: r, name: a, gatewayUrls: s, strict: i, universalResolverAddress: o }) {
6009
+ async function ed(e, { blockNumber: t, blockTag: n, assetGatewayUrls: r, name: a, gatewayUrls: s, strict: i, universalResolverAddress: o }) {
6010
6010
  const u = await S(e, Fs, "getEnsText")({
6011
6011
  blockNumber: t,
6012
6012
  blockTag: n,
@@ -6019,7 +6019,7 @@ async function Qc(e, { blockNumber: t, blockTag: n, assetGatewayUrls: r, name: a
6019
6019
  if (!u)
6020
6020
  return null;
6021
6021
  try {
6022
- return await Jc(e, {
6022
+ return await Xc(e, {
6023
6023
  record: u,
6024
6024
  gatewayUrls: r
6025
6025
  });
@@ -6027,7 +6027,7 @@ async function Qc(e, { blockNumber: t, blockTag: n, assetGatewayUrls: r, name: a
6027
6027
  return null;
6028
6028
  }
6029
6029
  }
6030
- async function ed(e, { address: t, blockNumber: n, blockTag: r, gatewayUrls: a, strict: s, universalResolverAddress: i }) {
6030
+ async function td(e, { address: t, blockNumber: n, blockTag: r, gatewayUrls: a, strict: s, universalResolverAddress: i }) {
6031
6031
  let o = i;
6032
6032
  if (!o) {
6033
6033
  if (!e.chain)
@@ -6042,7 +6042,7 @@ async function ed(e, { address: t, blockNumber: n, blockTag: r, gatewayUrls: a,
6042
6042
  try {
6043
6043
  const c = {
6044
6044
  address: o,
6045
- abi: ac,
6045
+ abi: sc,
6046
6046
  functionName: "reverse",
6047
6047
  args: [Oe(fn(u))],
6048
6048
  blockNumber: n,
@@ -6060,7 +6060,7 @@ async function ed(e, { address: t, blockNumber: n, blockTag: r, gatewayUrls: a,
6060
6060
  throw c;
6061
6061
  }
6062
6062
  }
6063
- async function td(e, { blockNumber: t, blockTag: n, name: r, universalResolverAddress: a }) {
6063
+ async function nd(e, { blockNumber: t, blockTag: n, name: r, universalResolverAddress: a }) {
6064
6064
  let s = a;
6065
6065
  if (!s) {
6066
6066
  if (!e.chain)
@@ -6089,7 +6089,7 @@ async function td(e, { blockNumber: t, blockTag: n, name: r, universalResolverAd
6089
6089
  });
6090
6090
  return i;
6091
6091
  }
6092
- async function nd(e) {
6092
+ async function rd(e) {
6093
6093
  const t = an(e, {
6094
6094
  method: "eth_newBlockFilter"
6095
6095
  }), n = await e.request({
@@ -6103,7 +6103,7 @@ async function Ns(e, { address: t, args: n, event: r, events: a, fromBlock: s, s
6103
6103
  });
6104
6104
  let l = [];
6105
6105
  u && (l = [
6106
- u.flatMap((p) => Rt({
6106
+ u.flatMap((p) => Ot({
6107
6107
  abi: [p],
6108
6108
  eventName: p.name,
6109
6109
  args: n
@@ -6140,20 +6140,20 @@ async function Ds(e) {
6140
6140
  });
6141
6141
  return { id: n, request: t(n), type: "transaction" };
6142
6142
  }
6143
- async function rd(e, { address: t, blockNumber: n, blockTag: r = "latest" }) {
6143
+ async function ad(e, { address: t, blockNumber: n, blockTag: r = "latest" }) {
6144
6144
  const a = n ? O(n) : void 0, s = await e.request({
6145
6145
  method: "eth_getBalance",
6146
6146
  params: [t, a || r]
6147
6147
  });
6148
6148
  return BigInt(s);
6149
6149
  }
6150
- async function ad(e) {
6150
+ async function sd(e) {
6151
6151
  const t = await e.request({
6152
6152
  method: "eth_blobBaseFee"
6153
6153
  });
6154
6154
  return BigInt(t);
6155
6155
  }
6156
- async function sd(e, { blockHash: t, blockNumber: n, blockTag: r = "latest" } = {}) {
6156
+ async function id(e, { blockHash: t, blockNumber: n, blockTag: r = "latest" } = {}) {
6157
6157
  const a = n !== void 0 ? O(n) : void 0;
6158
6158
  let s;
6159
6159
  return t ? s = await e.request({
@@ -6164,7 +6164,7 @@ async function sd(e, { blockHash: t, blockNumber: n, blockTag: r = "latest" } =
6164
6164
  params: [a || r]
6165
6165
  }), Ae(s);
6166
6166
  }
6167
- async function id(e, { address: t, blockNumber: n, blockTag: r = "latest" }) {
6167
+ async function od(e, { address: t, blockNumber: n, blockTag: r = "latest" }) {
6168
6168
  const a = n !== void 0 ? O(n) : void 0, s = await e.request({
6169
6169
  method: "eth_getCode",
6170
6170
  params: [t, a || r]
@@ -6172,7 +6172,7 @@ async function id(e, { address: t, blockNumber: n, blockTag: r = "latest" }) {
6172
6172
  if (s !== "0x")
6173
6173
  return s;
6174
6174
  }
6175
- function od(e) {
6175
+ function ud(e) {
6176
6176
  var t;
6177
6177
  return {
6178
6178
  baseFeePerGas: e.baseFeePerGas.map((n) => BigInt(n)),
@@ -6181,7 +6181,7 @@ function od(e) {
6181
6181
  reward: (t = e.reward) == null ? void 0 : t.map((n) => n.map((r) => BigInt(r)))
6182
6182
  };
6183
6183
  }
6184
- async function ud(e, { blockCount: t, blockNumber: n, blockTag: r = "latest", rewardPercentiles: a }) {
6184
+ async function cd(e, { blockCount: t, blockNumber: n, blockTag: r = "latest", rewardPercentiles: a }) {
6185
6185
  const s = n ? O(n) : void 0, i = await e.request({
6186
6186
  method: "eth_feeHistory",
6187
6187
  params: [
@@ -6190,9 +6190,9 @@ async function ud(e, { blockCount: t, blockNumber: n, blockTag: r = "latest", re
6190
6190
  a
6191
6191
  ]
6192
6192
  });
6193
- return od(i);
6193
+ return ud(i);
6194
6194
  }
6195
- async function cd(e, { filter: t }) {
6195
+ async function dd(e, { filter: t }) {
6196
6196
  const n = t.strict ?? !1, a = (await t.request({
6197
6197
  method: "eth_getFilterLogs",
6198
6198
  params: [t.id]
@@ -6203,7 +6203,7 @@ async function cd(e, { filter: t }) {
6203
6203
  strict: n
6204
6204
  }) : a;
6205
6205
  }
6206
- function dd(e, t) {
6206
+ function ld(e, t) {
6207
6207
  if (!oe(e, { strict: !1 }))
6208
6208
  throw new Me({ address: e });
6209
6209
  if (!oe(t, { strict: !1 }))
@@ -6218,8 +6218,8 @@ function Us(e) {
6218
6218
  ...e
6219
6219
  };
6220
6220
  }
6221
- const ld = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/, pd = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;
6222
- function yd(e) {
6221
+ const pd = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/, yd = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;
6222
+ function fd(e) {
6223
6223
  const { domain: t = {}, message: n, primaryType: r } = e, a = {
6224
6224
  EIP712Domain: qs({ domain: t }),
6225
6225
  ...e.types
@@ -6231,32 +6231,32 @@ function yd(e) {
6231
6231
  types: a
6232
6232
  });
6233
6233
  const s = ["0x1901"];
6234
- return t && s.push(fd({
6234
+ return t && s.push(md({
6235
6235
  domain: t,
6236
6236
  types: a
6237
- })), r !== "EIP712Domain" && s.push(js({
6237
+ })), r !== "EIP712Domain" && s.push(Hs({
6238
6238
  data: n,
6239
6239
  primaryType: r,
6240
6240
  types: a
6241
6241
  })), Z(ge(s));
6242
6242
  }
6243
- function fd({ domain: e, types: t }) {
6244
- return js({
6243
+ function md({ domain: e, types: t }) {
6244
+ return Hs({
6245
6245
  data: e,
6246
6246
  primaryType: "EIP712Domain",
6247
6247
  types: t
6248
6248
  });
6249
6249
  }
6250
- function js({ data: e, primaryType: t, types: n }) {
6251
- const r = Ls({
6250
+ function Hs({ data: e, primaryType: t, types: n }) {
6251
+ const r = js({
6252
6252
  data: e,
6253
6253
  primaryType: t,
6254
6254
  types: n
6255
6255
  });
6256
6256
  return Z(r);
6257
6257
  }
6258
- function Ls({ data: e, primaryType: t, types: n }) {
6259
- const r = [{ type: "bytes32" }], a = [md({ primaryType: t, types: n })];
6258
+ function js({ data: e, primaryType: t, types: n }) {
6259
+ const r = [{ type: "bytes32" }], a = [bd({ primaryType: t, types: n })];
6260
6260
  for (const s of n[t]) {
6261
6261
  const [i, o] = zs({
6262
6262
  types: n,
@@ -6266,35 +6266,35 @@ function Ls({ data: e, primaryType: t, types: n }) {
6266
6266
  });
6267
6267
  r.push(i), a.push(o);
6268
6268
  }
6269
- return kt(r, a);
6269
+ return $t(r, a);
6270
6270
  }
6271
- function md({ primaryType: e, types: t }) {
6272
- const n = Oe(bd({ primaryType: e, types: t }));
6271
+ function bd({ primaryType: e, types: t }) {
6272
+ const n = Oe(hd({ primaryType: e, types: t }));
6273
6273
  return Z(n);
6274
6274
  }
6275
- function bd({ primaryType: e, types: t }) {
6275
+ function hd({ primaryType: e, types: t }) {
6276
6276
  let n = "";
6277
- const r = Hs({ primaryType: e, types: t });
6277
+ const r = Ls({ primaryType: e, types: t });
6278
6278
  r.delete(e);
6279
6279
  const a = [e, ...Array.from(r).sort()];
6280
6280
  for (const s of a)
6281
6281
  n += `${s}(${t[s].map(({ name: i, type: o }) => `${o} ${i}`).join(",")})`;
6282
6282
  return n;
6283
6283
  }
6284
- function Hs({ primaryType: e, types: t }, n = /* @__PURE__ */ new Set()) {
6284
+ function Ls({ primaryType: e, types: t }, n = /* @__PURE__ */ new Set()) {
6285
6285
  const r = e.match(/^\w*/u), a = r == null ? void 0 : r[0];
6286
6286
  if (n.has(a) || t[a] === void 0)
6287
6287
  return n;
6288
6288
  n.add(a);
6289
6289
  for (const s of t[a])
6290
- Hs({ primaryType: s.type, types: t }, n);
6290
+ Ls({ primaryType: s.type, types: t }, n);
6291
6291
  return n;
6292
6292
  }
6293
6293
  function zs({ types: e, name: t, type: n, value: r }) {
6294
6294
  if (e[n] !== void 0)
6295
6295
  return [
6296
6296
  { type: "bytes32" },
6297
- Z(Ls({ data: r, primaryType: n, types: e }))
6297
+ Z(js({ data: r, primaryType: n, types: e }))
6298
6298
  ];
6299
6299
  if (n === "bytes")
6300
6300
  return r = `0x${(r.length % 2 ? "0" : "") + r.slice(2)}`, [{ type: "bytes32" }, Z(r)];
@@ -6309,12 +6309,12 @@ function zs({ types: e, name: t, type: n, value: r }) {
6309
6309
  }));
6310
6310
  return [
6311
6311
  { type: "bytes32" },
6312
- Z(kt(s.map(([i]) => i), s.map(([, i]) => i)))
6312
+ Z($t(s.map(([i]) => i), s.map(([, i]) => i)))
6313
6313
  ];
6314
6314
  }
6315
6315
  return [{ type: n }, r];
6316
6316
  }
6317
- function hd(e) {
6317
+ function gd(e) {
6318
6318
  const { domain: t, message: n, primaryType: r, types: a } = e, s = (u, c) => {
6319
6319
  const l = { ...c };
6320
6320
  for (const d of u) {
@@ -6331,7 +6331,7 @@ function hd(e) {
6331
6331
  function _s(e) {
6332
6332
  const { domain: t, message: n, primaryType: r, types: a } = e, s = (i, o) => {
6333
6333
  for (const u of i) {
6334
- const { name: c, type: l } = u, d = o[c], p = l.match(pd);
6334
+ const { name: c, type: l } = u, d = o[c], p = l.match(yd);
6335
6335
  if (p && (typeof d == "number" || typeof d == "bigint")) {
6336
6336
  const [y, b, h] = p;
6337
6337
  O(d, {
@@ -6341,13 +6341,13 @@ function _s(e) {
6341
6341
  }
6342
6342
  if (l === "address" && typeof d == "string" && !oe(d))
6343
6343
  throw new Me({ address: d });
6344
- const m = l.match(ld);
6344
+ const m = l.match(pd);
6345
6345
  if (m) {
6346
6346
  const [y, b] = m;
6347
- if (b && H(d) !== Number.parseInt(b))
6348
- throw new so({
6347
+ if (b && L(d) !== Number.parseInt(b))
6348
+ throw new io({
6349
6349
  expectedSize: Number.parseInt(b),
6350
- givenSize: H(d)
6350
+ givenSize: L(d)
6351
6351
  });
6352
6352
  }
6353
6353
  const f = a[l];
@@ -6371,11 +6371,11 @@ function qs({ domain: e }) {
6371
6371
  (e == null ? void 0 : e.salt) && { name: "salt", type: "bytes32" }
6372
6372
  ].filter(Boolean);
6373
6373
  }
6374
- const gd = {
6374
+ const wd = {
6375
6375
  "0x0": "reverted",
6376
6376
  "0x1": "success"
6377
6377
  };
6378
- function wd(e) {
6378
+ function Td(e) {
6379
6379
  const t = {
6380
6380
  ...e,
6381
6381
  blockNumber: e.blockNumber ? BigInt(e.blockNumber) : null,
@@ -6386,39 +6386,39 @@ function wd(e) {
6386
6386
  logs: e.logs ? e.logs.map((n) => Be(n)) : null,
6387
6387
  to: e.to ? e.to : null,
6388
6388
  transactionIndex: e.transactionIndex ? Ae(e.transactionIndex) : null,
6389
- status: e.status ? gd[e.status] : null,
6389
+ status: e.status ? wd[e.status] : null,
6390
6390
  type: e.type ? ls[e.type] || e.type : null
6391
6391
  };
6392
6392
  return e.blobGasPrice && (t.blobGasPrice = BigInt(e.blobGasPrice)), e.blobGasUsed && (t.blobGasUsed = BigInt(e.blobGasUsed)), t;
6393
6393
  }
6394
- const Td = `Ethereum Signed Message:
6394
+ const vd = `Ethereum Signed Message:
6395
6395
  `;
6396
6396
  function Gs(e, t) {
6397
- const n = typeof e == "string" ? me(e) : e.raw instanceof Uint8Array ? e.raw : Ie(e.raw), r = me(`${Td}${n.length}`);
6397
+ const n = typeof e == "string" ? me(e) : e.raw instanceof Uint8Array ? e.raw : Ie(e.raw), r = me(`${vd}${n.length}`);
6398
6398
  return Z(ge([r, n]), t);
6399
6399
  }
6400
- function vd(e) {
6400
+ function xd(e) {
6401
6401
  return e.map((t) => ({
6402
6402
  ...t,
6403
6403
  value: BigInt(t.value)
6404
6404
  }));
6405
6405
  }
6406
- function xd(e) {
6406
+ function Ed(e) {
6407
6407
  return {
6408
6408
  ...e,
6409
6409
  balance: e.balance ? BigInt(e.balance) : void 0,
6410
6410
  nonce: e.nonce ? Ae(e.nonce) : void 0,
6411
- storageProof: e.storageProof ? vd(e.storageProof) : void 0
6411
+ storageProof: e.storageProof ? xd(e.storageProof) : void 0
6412
6412
  };
6413
6413
  }
6414
- async function Ed(e, { address: t, blockNumber: n, blockTag: r, storageKeys: a }) {
6414
+ async function Pd(e, { address: t, blockNumber: n, blockTag: r, storageKeys: a }) {
6415
6415
  const s = r ?? "latest", i = n !== void 0 ? O(n) : void 0, o = await e.request({
6416
6416
  method: "eth_getProof",
6417
6417
  params: [t, a, i || s]
6418
6418
  });
6419
- return xd(o);
6419
+ return Ed(o);
6420
6420
  }
6421
- async function Pd(e, { address: t, blockNumber: n, blockTag: r = "latest", slot: a }) {
6421
+ async function Cd(e, { address: t, blockNumber: n, blockTag: r = "latest", slot: a }) {
6422
6422
  const s = n !== void 0 ? O(n) : void 0;
6423
6423
  return await e.request({
6424
6424
  method: "eth_getStorageAt",
@@ -6448,9 +6448,9 @@ async function Rr(e, { blockHash: t, blockNumber: n, blockTag: r, hash: a, index
6448
6448
  });
6449
6449
  return (((p = (d = (l = e.chain) == null ? void 0 : l.formatters) == null ? void 0 : d.transaction) == null ? void 0 : p.format) || ps)(u);
6450
6450
  }
6451
- async function Cd(e, { hash: t, transactionReceipt: n }) {
6451
+ async function Ad(e, { hash: t, transactionReceipt: n }) {
6452
6452
  const [r, a] = await Promise.all([
6453
- S(e, jt, "getBlockNumber")({}),
6453
+ S(e, Ut, "getBlockNumber")({}),
6454
6454
  t ? S(e, Rr, "getBlockNumber")({ hash: t }) : void 0
6455
6455
  ]), s = (n == null ? void 0 : n.blockNumber) || (a == null ? void 0 : a.blockNumber);
6456
6456
  return s ? r - s + 1n : 0n;
@@ -6463,9 +6463,9 @@ async function Jn(e, { hash: t }) {
6463
6463
  });
6464
6464
  if (!n)
6465
6465
  throw new is({ hash: t });
6466
- return (((i = (s = (a = e.chain) == null ? void 0 : a.formatters) == null ? void 0 : s.transactionReceipt) == null ? void 0 : i.format) || wd)(n);
6466
+ return (((i = (s = (a = e.chain) == null ? void 0 : a.formatters) == null ? void 0 : s.transactionReceipt) == null ? void 0 : i.format) || Td)(n);
6467
6467
  }
6468
- async function Ad(e, t) {
6468
+ async function Id(e, t) {
6469
6469
  var b;
6470
6470
  const { allowFailure: n = !0, batchSize: r, blockNumber: a, blockTag: s, multicallAddress: i, stateOverride: o } = t, u = t.contracts, c = r ?? (typeof ((b = e.batch) == null ? void 0 : b.multicall) == "object" && e.batch.multicall.batchSize || 1024);
6471
6471
  let l = i;
@@ -6571,13 +6571,13 @@ async function Ad(e, t) {
6571
6571
  return y;
6572
6572
  }
6573
6573
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
6574
- const Ws = BigInt(0), mn = BigInt(1), Id = BigInt(2), bn = (e) => e instanceof Uint8Array, Md = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
6574
+ const Ws = BigInt(0), mn = BigInt(1), Md = BigInt(2), bn = (e) => e instanceof Uint8Array, Sd = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
6575
6575
  function et(e) {
6576
6576
  if (!bn(e))
6577
6577
  throw new Error("Uint8Array expected");
6578
6578
  let t = "";
6579
6579
  for (let n = 0; n < e.length; n++)
6580
- t += Md[e[n]];
6580
+ t += Sd[e[n]];
6581
6581
  return t;
6582
6582
  }
6583
6583
  function Vs(e) {
@@ -6604,7 +6604,7 @@ function tt(e) {
6604
6604
  }
6605
6605
  return n;
6606
6606
  }
6607
- function Le(e) {
6607
+ function je(e) {
6608
6608
  return Fr(et(e));
6609
6609
  }
6610
6610
  function Nr(e) {
@@ -6618,7 +6618,7 @@ function nt(e, t) {
6618
6618
  function Dr(e, t) {
6619
6619
  return nt(e, t).reverse();
6620
6620
  }
6621
- function Sd(e) {
6621
+ function Bd(e) {
6622
6622
  return tt(Vs(e));
6623
6623
  }
6624
6624
  function se(e, t, n) {
@@ -6655,21 +6655,21 @@ function Zs(e, t) {
6655
6655
  return !1;
6656
6656
  return !0;
6657
6657
  }
6658
- function Bd(e) {
6658
+ function $d(e) {
6659
6659
  if (typeof e != "string")
6660
6660
  throw new Error(`utf8ToBytes expected string, got ${typeof e}`);
6661
6661
  return new Uint8Array(new TextEncoder().encode(e));
6662
6662
  }
6663
- function $d(e) {
6663
+ function kd(e) {
6664
6664
  let t;
6665
6665
  for (t = 0; e > Ws; e >>= mn, t += 1)
6666
6666
  ;
6667
6667
  return t;
6668
6668
  }
6669
- function kd(e, t) {
6669
+ function Od(e, t) {
6670
6670
  return e >> BigInt(t) & mn;
6671
6671
  }
6672
- const Od = (e, t, n) => e | (n ? mn : Ws) << BigInt(t), Ur = (e) => (Id << BigInt(e - 1)) - mn, Sn = (e) => new Uint8Array(e), ma = (e) => Uint8Array.from(e);
6672
+ const Rd = (e, t, n) => e | (n ? mn : Ws) << BigInt(t), Ur = (e) => (Md << BigInt(e - 1)) - mn, Sn = (e) => new Uint8Array(e), ma = (e) => Uint8Array.from(e);
6673
6673
  function Ks(e, t, n) {
6674
6674
  if (typeof e != "number" || e < 2)
6675
6675
  throw new Error("hashLen must be a number");
@@ -6702,7 +6702,7 @@ function Ks(e, t, n) {
6702
6702
  return i(), m;
6703
6703
  };
6704
6704
  }
6705
- const Rd = {
6705
+ const Fd = {
6706
6706
  bigint: (e) => typeof e == "bigint",
6707
6707
  function: (e) => typeof e == "function",
6708
6708
  boolean: (e) => typeof e == "boolean",
@@ -6713,9 +6713,9 @@ const Rd = {
6713
6713
  field: (e, t) => t.Fp.isValid(e),
6714
6714
  hash: (e) => typeof e == "function" && Number.isSafeInteger(e.outputLen)
6715
6715
  };
6716
- function Lt(e, t, n = {}) {
6716
+ function Ht(e, t, n = {}) {
6717
6717
  const r = (a, s, i) => {
6718
- const o = Rd[s];
6718
+ const o = Fd[s];
6719
6719
  if (typeof o != "function")
6720
6720
  throw new Error(`Invalid validator "${s}", expected function`);
6721
6721
  const u = e[a];
@@ -6728,14 +6728,14 @@ function Lt(e, t, n = {}) {
6728
6728
  r(a, s, !0);
6729
6729
  return e;
6730
6730
  }
6731
- const Fd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6731
+ const Nd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6732
6732
  __proto__: null,
6733
- bitGet: kd,
6734
- bitLen: $d,
6733
+ bitGet: Od,
6734
+ bitLen: kd,
6735
6735
  bitMask: Ur,
6736
- bitSet: Od,
6736
+ bitSet: Rd,
6737
6737
  bytesToHex: et,
6738
- bytesToNumberBE: Le,
6738
+ bytesToNumberBE: je,
6739
6739
  bytesToNumberLE: Nr,
6740
6740
  concatBytes: Bt,
6741
6741
  createHmacDrbg: Ks,
@@ -6746,30 +6746,30 @@ const Fd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6746
6746
  numberToBytesBE: nt,
6747
6747
  numberToBytesLE: Dr,
6748
6748
  numberToHexUnpadded: Vs,
6749
- numberToVarBytesBE: Sd,
6750
- utf8ToBytes: Bd,
6751
- validateObject: Lt
6749
+ numberToVarBytesBE: Bd,
6750
+ utf8ToBytes: $d,
6751
+ validateObject: Ht
6752
6752
  }, Symbol.toStringTag, { value: "Module" }));
6753
- function Nd(e, t) {
6753
+ function Dd(e, t) {
6754
6754
  const n = de(e) ? Ie(e) : e, r = de(t) ? Ie(t) : t;
6755
6755
  return Zs(n, r);
6756
6756
  }
6757
6757
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
6758
- const _ = BigInt(0), j = BigInt(1), De = BigInt(2), Dd = BigInt(3), Xn = BigInt(4), ba = BigInt(5), ha = BigInt(8);
6758
+ const _ = BigInt(0), H = BigInt(1), De = BigInt(2), Ud = BigInt(3), Xn = BigInt(4), ba = BigInt(5), ha = BigInt(8);
6759
6759
  BigInt(9);
6760
6760
  BigInt(16);
6761
6761
  function V(e, t) {
6762
6762
  const n = e % t;
6763
6763
  return n >= _ ? n : t + n;
6764
6764
  }
6765
- function Ud(e, t, n) {
6765
+ function Hd(e, t, n) {
6766
6766
  if (n <= _ || t < _)
6767
6767
  throw new Error("Expected power/modulo > 0");
6768
- if (n === j)
6768
+ if (n === H)
6769
6769
  return _;
6770
- let r = j;
6770
+ let r = H;
6771
6771
  for (; t > _; )
6772
- t & j && (r = r * e % n), e = e * e % n, t >>= j;
6772
+ t & H && (r = r * e % n), e = e * e % n, t >>= H;
6773
6773
  return r;
6774
6774
  }
6775
6775
  function Q(e, t, n) {
@@ -6781,24 +6781,24 @@ function Q(e, t, n) {
6781
6781
  function Qn(e, t) {
6782
6782
  if (e === _ || t <= _)
6783
6783
  throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);
6784
- let n = V(e, t), r = t, a = _, s = j;
6784
+ let n = V(e, t), r = t, a = _, s = H;
6785
6785
  for (; n !== _; ) {
6786
6786
  const o = r / n, u = r % n, c = a - s * o;
6787
6787
  r = n, n = u, a = s, s = c;
6788
6788
  }
6789
- if (r !== j)
6789
+ if (r !== H)
6790
6790
  throw new Error("invert: does not exist");
6791
6791
  return V(a, t);
6792
6792
  }
6793
6793
  function jd(e) {
6794
- const t = (e - j) / De;
6794
+ const t = (e - H) / De;
6795
6795
  let n, r, a;
6796
- for (n = e - j, r = 0; n % De === _; n /= De, r++)
6796
+ for (n = e - H, r = 0; n % De === _; n /= De, r++)
6797
6797
  ;
6798
- for (a = De; a < e && Ud(a, t, e) !== e - j; a++)
6798
+ for (a = De; a < e && Hd(a, t, e) !== e - H; a++)
6799
6799
  ;
6800
6800
  if (r === 1) {
6801
- const i = (e + j) / Xn;
6801
+ const i = (e + H) / Xn;
6802
6802
  return function(u, c) {
6803
6803
  const l = u.pow(c, i);
6804
6804
  if (!u.eql(u.sqr(l), c))
@@ -6806,7 +6806,7 @@ function jd(e) {
6806
6806
  return l;
6807
6807
  };
6808
6808
  }
6809
- const s = (n + j) / De;
6809
+ const s = (n + H) / De;
6810
6810
  return function(o, u) {
6811
6811
  if (o.pow(u, t) === o.neg(o.ONE))
6812
6812
  throw new Error("Cannot find square root");
@@ -6817,15 +6817,15 @@ function jd(e) {
6817
6817
  let m = 1;
6818
6818
  for (let y = o.sqr(p); m < c && !o.eql(y, o.ONE); m++)
6819
6819
  y = o.sqr(y);
6820
- const f = o.pow(l, j << BigInt(c - m - 1));
6820
+ const f = o.pow(l, H << BigInt(c - m - 1));
6821
6821
  l = o.sqr(f), d = o.mul(d, f), p = o.mul(p, l), c = m;
6822
6822
  }
6823
6823
  return d;
6824
6824
  };
6825
6825
  }
6826
6826
  function Ld(e) {
6827
- if (e % Xn === Dd) {
6828
- const t = (e + j) / Xn;
6827
+ if (e % Xn === Ud) {
6828
+ const t = (e + H) / Xn;
6829
6829
  return function(r, a) {
6830
6830
  const s = r.pow(a, t);
6831
6831
  if (!r.eql(r.sqr(s), a))
@@ -6844,7 +6844,7 @@ function Ld(e) {
6844
6844
  }
6845
6845
  return jd(e);
6846
6846
  }
6847
- const Hd = [
6847
+ const zd = [
6848
6848
  "create",
6849
6849
  "isValid",
6850
6850
  "is0",
@@ -6863,28 +6863,28 @@ const Hd = [
6863
6863
  "mulN",
6864
6864
  "sqrN"
6865
6865
  ];
6866
- function zd(e) {
6866
+ function _d(e) {
6867
6867
  const t = {
6868
6868
  ORDER: "bigint",
6869
6869
  MASK: "bigint",
6870
6870
  BYTES: "isSafeInteger",
6871
6871
  BITS: "isSafeInteger"
6872
- }, n = Hd.reduce((r, a) => (r[a] = "function", r), t);
6873
- return Lt(e, n);
6872
+ }, n = zd.reduce((r, a) => (r[a] = "function", r), t);
6873
+ return Ht(e, n);
6874
6874
  }
6875
- function _d(e, t, n) {
6875
+ function qd(e, t, n) {
6876
6876
  if (n < _)
6877
6877
  throw new Error("Expected power > 0");
6878
6878
  if (n === _)
6879
6879
  return e.ONE;
6880
- if (n === j)
6880
+ if (n === H)
6881
6881
  return t;
6882
6882
  let r = e.ONE, a = t;
6883
6883
  for (; n > _; )
6884
- n & j && (r = e.mul(r, a)), a = e.sqr(a), n >>= j;
6884
+ n & H && (r = e.mul(r, a)), a = e.sqr(a), n >>= H;
6885
6885
  return r;
6886
6886
  }
6887
- function qd(e, t) {
6887
+ function Gd(e, t) {
6888
6888
  const n = new Array(t.length), r = t.reduce((s, i, o) => e.is0(i) ? s : (n[o] = s, e.mul(s, i)), e.ONE), a = e.inv(r);
6889
6889
  return t.reduceRight((s, i, o) => e.is0(i) ? s : (n[o] = e.mul(s, n[o]), e.mul(s, i)), a), n;
6890
6890
  }
@@ -6892,7 +6892,7 @@ function Ys(e, t) {
6892
6892
  const n = t !== void 0 ? t : e.toString(2).length, r = Math.ceil(n / 8);
6893
6893
  return { nBitLength: n, nByteLength: r };
6894
6894
  }
6895
- function Gd(e, t, n = !1, r = {}) {
6895
+ function Wd(e, t, n = !1, r = {}) {
6896
6896
  if (e <= _)
6897
6897
  throw new Error(`Expected Field ORDER > 0, got ${e}`);
6898
6898
  const { nBitLength: a, nByteLength: s } = Ys(e, t);
@@ -6904,7 +6904,7 @@ function Gd(e, t, n = !1, r = {}) {
6904
6904
  BYTES: s,
6905
6905
  MASK: Ur(a),
6906
6906
  ZERO: _,
6907
- ONE: j,
6907
+ ONE: H,
6908
6908
  create: (u) => V(u, e),
6909
6909
  isValid: (u) => {
6910
6910
  if (typeof u != "bigint")
@@ -6912,14 +6912,14 @@ function Gd(e, t, n = !1, r = {}) {
6912
6912
  return _ <= u && u < e;
6913
6913
  },
6914
6914
  is0: (u) => u === _,
6915
- isOdd: (u) => (u & j) === j,
6915
+ isOdd: (u) => (u & H) === H,
6916
6916
  neg: (u) => V(-u, e),
6917
6917
  eql: (u, c) => u === c,
6918
6918
  sqr: (u) => V(u * u, e),
6919
6919
  add: (u, c) => V(u + c, e),
6920
6920
  sub: (u, c) => V(u - c, e),
6921
6921
  mul: (u, c) => V(u * c, e),
6922
- pow: (u, c) => _d(o, u, c),
6922
+ pow: (u, c) => qd(o, u, c),
6923
6923
  div: (u, c) => V(u * Qn(c, e), e),
6924
6924
  // Same as above, but doesn't normalize
6925
6925
  sqrN: (u) => u * u,
@@ -6928,7 +6928,7 @@ function Gd(e, t, n = !1, r = {}) {
6928
6928
  mulN: (u, c) => u * c,
6929
6929
  inv: (u) => Qn(u, e),
6930
6930
  sqrt: r.sqrt || ((u) => i(o, u)),
6931
- invertBatch: (u) => qd(o, u),
6931
+ invertBatch: (u) => Gd(o, u),
6932
6932
  // TODO: do we really need constant cmov?
6933
6933
  // We don't have const-time bigints anyway, so probably will be not very useful
6934
6934
  cmov: (u, c, l) => l ? c : u,
@@ -6936,7 +6936,7 @@ function Gd(e, t, n = !1, r = {}) {
6936
6936
  fromBytes: (u) => {
6937
6937
  if (u.length !== s)
6938
6938
  throw new Error(`Fp.fromBytes: expected ${s}, got ${u.length}`);
6939
- return n ? Nr(u) : Le(u);
6939
+ return n ? Nr(u) : je(u);
6940
6940
  }
6941
6941
  });
6942
6942
  return Object.freeze(o);
@@ -6951,16 +6951,16 @@ function Xs(e) {
6951
6951
  const t = Js(e);
6952
6952
  return t + Math.ceil(t / 2);
6953
6953
  }
6954
- function Wd(e, t, n = !1) {
6954
+ function Vd(e, t, n = !1) {
6955
6955
  const r = e.length, a = Js(t), s = Xs(t);
6956
6956
  if (r < 16 || r < s || r > 1024)
6957
6957
  throw new Error(`expected ${s}-1024 bytes of input, got ${r}`);
6958
- const i = n ? Le(e) : Nr(e), o = V(i, t - j) + j;
6958
+ const i = n ? je(e) : Nr(e), o = V(i, t - H) + H;
6959
6959
  return n ? Dr(o, a) : nt(o, a);
6960
6960
  }
6961
6961
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
6962
- const Vd = BigInt(0), Bn = BigInt(1);
6963
- function Zd(e, t) {
6962
+ const Zd = BigInt(0), Bn = BigInt(1);
6963
+ function Kd(e, t) {
6964
6964
  const n = (a, s) => {
6965
6965
  const i = s.negate();
6966
6966
  return a ? i : s;
@@ -6973,7 +6973,7 @@ function Zd(e, t) {
6973
6973
  // non-const time multiplication ladder
6974
6974
  unsafeLadder(a, s) {
6975
6975
  let i = e.ZERO, o = a;
6976
- for (; s > Vd; )
6976
+ for (; s > Zd; )
6977
6977
  s & Bn && (i = i.add(o)), o = o.double(), s >>= Bn;
6978
6978
  return i;
6979
6979
  },
@@ -7026,7 +7026,7 @@ function Zd(e, t) {
7026
7026
  };
7027
7027
  }
7028
7028
  function Qs(e) {
7029
- return zd(e.Fp), Lt(e, {
7029
+ return _d(e.Fp), Ht(e, {
7030
7030
  n: "bigint",
7031
7031
  h: "bigint",
7032
7032
  Gx: "field",
@@ -7041,9 +7041,9 @@ function Qs(e) {
7041
7041
  });
7042
7042
  }
7043
7043
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
7044
- function Kd(e) {
7044
+ function Yd(e) {
7045
7045
  const t = Qs(e);
7046
- Lt(t, {
7046
+ Ht(t, {
7047
7047
  a: "field",
7048
7048
  b: "field"
7049
7049
  }, {
@@ -7064,7 +7064,7 @@ function Kd(e) {
7064
7064
  }
7065
7065
  return Object.freeze({ ...t });
7066
7066
  }
7067
- const { bytesToNumberBE: Yd, hexToBytes: Jd } = Fd, Ue = {
7067
+ const { bytesToNumberBE: Jd, hexToBytes: Xd } = Nd, Ue = {
7068
7068
  // asn.1 DER encoding utils
7069
7069
  Err: class extends Error {
7070
7070
  constructor(t = "") {
@@ -7082,10 +7082,10 @@ const { bytesToNumberBE: Yd, hexToBytes: Jd } = Fd, Ue = {
7082
7082
  throw new t("Invalid signature integer: negative");
7083
7083
  if (r[0] === 0 && !(r[1] & 128))
7084
7084
  throw new t("Invalid signature integer: unnecessary leading zero");
7085
- return { d: Yd(r), l: e.subarray(n + 2) };
7085
+ return { d: Jd(r), l: e.subarray(n + 2) };
7086
7086
  },
7087
7087
  toSig(e) {
7088
- const { Err: t } = Ue, n = typeof e == "string" ? Jd(e) : e;
7088
+ const { Err: t } = Ue, n = typeof e == "string" ? Xd(e) : e;
7089
7089
  if (!(n instanceof Uint8Array))
7090
7090
  throw new Error("ui8a expected");
7091
7091
  let r = n.length;
@@ -7109,8 +7109,8 @@ const { bytesToNumberBE: Yd, hexToBytes: Jd } = Fd, Ue = {
7109
7109
  BigInt(2);
7110
7110
  const ga = BigInt(3);
7111
7111
  BigInt(4);
7112
- function Xd(e) {
7113
- const t = Kd(e), { Fp: n } = t, r = t.toBytes || ((f, y, b) => {
7112
+ function Qd(e) {
7113
+ const t = Yd(e), { Fp: n } = t, r = t.toBytes || ((f, y, b) => {
7114
7114
  const h = y.toAffine();
7115
7115
  return Bt(Uint8Array.from([4]), n.toBytes(h.x), n.toBytes(h.y));
7116
7116
  }), a = t.fromBytes || ((f) => {
@@ -7139,7 +7139,7 @@ function Xd(e) {
7139
7139
  }
7140
7140
  let w;
7141
7141
  try {
7142
- w = typeof f == "bigint" ? f : Le(se("private key", f, b));
7142
+ w = typeof f == "bigint" ? f : je(se("private key", f, b));
7143
7143
  } catch {
7144
7144
  throw new Error(`private key must be ${b} bytes, hex or bigint, not ${typeof f}`);
7145
7145
  }
@@ -7358,7 +7358,7 @@ function Xd(e) {
7358
7358
  }
7359
7359
  }
7360
7360
  d.BASE = new d(t.Gx, t.Gy, n.ONE), d.ZERO = new d(n.ZERO, n.ONE, n.ZERO);
7361
- const p = t.nBitLength, m = Zd(d, t.endo ? Math.ceil(p / 2) : p);
7361
+ const p = t.nBitLength, m = Kd(d, t.endo ? Math.ceil(p / 2) : p);
7362
7362
  return {
7363
7363
  CURVE: t,
7364
7364
  ProjectivePoint: d,
@@ -7367,9 +7367,9 @@ function Xd(e) {
7367
7367
  isWithinCurveOrder: i
7368
7368
  };
7369
7369
  }
7370
- function Qd(e) {
7370
+ function el(e) {
7371
7371
  const t = Qs(e);
7372
- return Lt(t, {
7372
+ return Ht(t, {
7373
7373
  hash: "hash",
7374
7374
  hmac: "function",
7375
7375
  randomBytes: "function"
@@ -7379,8 +7379,8 @@ function Qd(e) {
7379
7379
  lowS: "boolean"
7380
7380
  }), Object.freeze({ lowS: !0, ...t });
7381
7381
  }
7382
- function el(e) {
7383
- const t = Qd(e), { Fp: n, n: r } = t, a = n.BYTES + 1, s = 2 * n.BYTES + 1;
7382
+ function tl(e) {
7383
+ const t = el(e), { Fp: n, n: r } = t, a = n.BYTES + 1, s = 2 * n.BYTES + 1;
7384
7384
  function i(A) {
7385
7385
  return fe < A && A < n.ORDER;
7386
7386
  }
@@ -7390,7 +7390,7 @@ function el(e) {
7390
7390
  function u(A) {
7391
7391
  return Qn(A, r);
7392
7392
  }
7393
- const { ProjectivePoint: c, normPrivateKeyToScalar: l, weierstrassEquation: d, isWithinCurveOrder: p } = Xd({
7393
+ const { ProjectivePoint: c, normPrivateKeyToScalar: l, weierstrassEquation: d, isWithinCurveOrder: p } = Qd({
7394
7394
  ...t,
7395
7395
  toBytes(A, I, R) {
7396
7396
  const U = I.toAffine(), D = n.toBytes(U.x), z = Bt;
@@ -7399,7 +7399,7 @@ function el(e) {
7399
7399
  fromBytes(A) {
7400
7400
  const I = A.length, R = A[0], U = A.subarray(1);
7401
7401
  if (I === a && (R === 2 || R === 3)) {
7402
- const D = Le(U);
7402
+ const D = je(U);
7403
7403
  if (!i(D))
7404
7404
  throw new Error("Point is not on curve");
7405
7405
  const z = d(D);
@@ -7420,7 +7420,7 @@ function el(e) {
7420
7420
  function y(A) {
7421
7421
  return f(A) ? o(-A) : A;
7422
7422
  }
7423
- const b = (A, I, R) => Le(A.slice(I, R));
7423
+ const b = (A, I, R) => je(A.slice(I, R));
7424
7424
  class h {
7425
7425
  constructor(I, R, U) {
7426
7426
  this.r = I, this.s = R, this.recovery = U, this.assertValidity();
@@ -7494,7 +7494,7 @@ function el(e) {
7494
7494
  */
7495
7495
  randomPrivateKey: () => {
7496
7496
  const A = Xs(t.n);
7497
- return Wd(t.randomBytes(A), t.n);
7497
+ return Vd(t.randomBytes(A), t.n);
7498
7498
  },
7499
7499
  /**
7500
7500
  * Creates precompute table for an arbitrary EC point. Makes point "cached".
@@ -7523,7 +7523,7 @@ function el(e) {
7523
7523
  return c.fromHex(I).multiply(l(A)).toRawBytes(R);
7524
7524
  }
7525
7525
  const T = t.bits2int || function(A) {
7526
- const I = Le(A), R = A.length * 8 - t.nBitLength;
7526
+ const I = je(A), R = A.length * 8 - t.nBitLength;
7527
7527
  return R > 0 ? I >> BigInt(R) : I;
7528
7528
  }, C = t.bits2int_modN || function(A) {
7529
7529
  return o(T(A));
@@ -7551,10 +7551,10 @@ function el(e) {
7551
7551
  const Ge = T(Fe);
7552
7552
  if (!p(Ge))
7553
7553
  return;
7554
- const Hr = u(Ge), We = c.BASE.multiply(Ge).toAffine(), ae = o(We.x);
7554
+ const Lr = u(Ge), We = c.BASE.multiply(Ge).toAffine(), ae = o(We.x);
7555
7555
  if (ae === fe)
7556
7556
  return;
7557
- const Ve = o(Hr * o(xe + ae * ve));
7557
+ const Ve = o(Lr * o(xe + ae * ve));
7558
7558
  if (Ve === fe)
7559
7559
  return;
7560
7560
  let zr = (We.x === ae ? 0 : 2) | Number(We.y & ee), _r = Ve;
@@ -7614,7 +7614,7 @@ function el(e) {
7614
7614
  }
7615
7615
  class ei extends ir {
7616
7616
  constructor(t, n) {
7617
- super(), this.finished = !1, this.destroyed = !1, vo(t);
7617
+ super(), this.finished = !1, this.destroyed = !1, xo(t);
7618
7618
  const r = nn(n);
7619
7619
  if (this.iHash = t.create(), typeof this.iHash.update != "function")
7620
7620
  throw new Error("Expected instance of class which extends utils.Hash");
@@ -7650,26 +7650,26 @@ class ei extends ir {
7650
7650
  const ti = (e, t, n) => new ei(e, t).update(n).digest();
7651
7651
  ti.create = (e, t) => new ei(e, t);
7652
7652
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
7653
- function tl(e) {
7653
+ function nl(e) {
7654
7654
  return {
7655
7655
  hash: e,
7656
- hmac: (t, ...n) => ti(e, t, $o(...n)),
7657
- randomBytes: ko
7656
+ hmac: (t, ...n) => ti(e, t, ko(...n)),
7657
+ randomBytes: Oo
7658
7658
  };
7659
7659
  }
7660
- function nl(e, t) {
7661
- const n = (r) => el({ ...e, ...tl(r) });
7660
+ function rl(e, t) {
7661
+ const n = (r) => tl({ ...e, ...nl(r) });
7662
7662
  return Object.freeze({ ...n(t), create: n });
7663
7663
  }
7664
7664
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
7665
- const ni = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"), wa = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"), rl = BigInt(1), er = BigInt(2), Ta = (e, t) => (e + t / er) / t;
7666
- function al(e) {
7665
+ const ni = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"), wa = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"), al = BigInt(1), er = BigInt(2), Ta = (e, t) => (e + t / er) / t;
7666
+ function sl(e) {
7667
7667
  const t = ni, n = BigInt(3), r = BigInt(6), a = BigInt(11), s = BigInt(22), i = BigInt(23), o = BigInt(44), u = BigInt(88), c = e * e * e % t, l = c * c * e % t, d = Q(l, n, t) * l % t, p = Q(d, n, t) * l % t, m = Q(p, er, t) * c % t, f = Q(m, a, t) * m % t, y = Q(f, s, t) * f % t, b = Q(y, o, t) * y % t, h = Q(b, u, t) * b % t, g = Q(h, o, t) * y % t, w = Q(g, n, t) * l % t, x = Q(w, i, t) * f % t, P = Q(x, r, t) * c % t, T = Q(P, er, t);
7668
7668
  if (!tr.eql(tr.sqr(T), e))
7669
7669
  throw new Error("Cannot find square root");
7670
7670
  return T;
7671
7671
  }
7672
- const tr = Gd(ni, void 0, void 0, { sqrt: al }), jr = nl({
7672
+ const tr = Wd(ni, void 0, void 0, { sqrt: sl }), Hr = rl({
7673
7673
  a: BigInt(0),
7674
7674
  b: BigInt(7),
7675
7675
  Fp: tr,
@@ -7688,7 +7688,7 @@ const tr = Gd(ni, void 0, void 0, { sqrt: al }), jr = nl({
7688
7688
  endo: {
7689
7689
  beta: BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),
7690
7690
  splitScalar: (e) => {
7691
- const t = wa, n = BigInt("0x3086d221a7d46bcde86c90e49284eb15"), r = -rl * BigInt("0xe4437ed6010e88286f547fa90abfe4c3"), a = BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"), s = n, i = BigInt("0x100000000000000000000000000000000"), o = Ta(s * e, t), u = Ta(-r * e, t);
7691
+ const t = wa, n = BigInt("0x3086d221a7d46bcde86c90e49284eb15"), r = -al * BigInt("0xe4437ed6010e88286f547fa90abfe4c3"), a = BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"), s = n, i = BigInt("0x100000000000000000000000000000000"), o = Ta(s * e, t), u = Ta(-r * e, t);
7692
7692
  let c = V(e - o * n - u * a, t), l = V(-o * r - u * s, t);
7693
7693
  const d = c > i, p = l > i;
7694
7694
  if (d && (c = t - c), p && (l = t - l), c > i || l > i)
@@ -7698,8 +7698,8 @@ const tr = Gd(ni, void 0, void 0, { sqrt: al }), jr = nl({
7698
7698
  }
7699
7699
  }, gs);
7700
7700
  BigInt(0);
7701
- jr.ProjectivePoint;
7702
- function sl({ r: e, s: t, v: n, yParity: r }) {
7701
+ Hr.ProjectivePoint;
7702
+ function il({ r: e, s: t, v: n, yParity: r }) {
7703
7703
  const a = (() => {
7704
7704
  if (r === 0 || r === 1)
7705
7705
  return r;
@@ -7707,38 +7707,38 @@ function sl({ r: e, s: t, v: n, yParity: r }) {
7707
7707
  return n % 2n === 0n ? 1 : 0;
7708
7708
  throw new Error("Invalid `v` or `yParity` value");
7709
7709
  })();
7710
- return `0x${new jr.Signature(Ye(e), Ye(t)).toCompactHex()}${a === 0 ? "1b" : "1c"}`;
7710
+ return `0x${new Hr.Signature(Ye(e), Ye(t)).toCompactHex()}${a === 0 ? "1b" : "1c"}`;
7711
7711
  }
7712
- async function Lr(e, { address: t, hash: n, signature: r, ...a }) {
7713
- const s = de(r) ? r : typeof r == "object" && "r" in r && "s" in r ? sl(r) : q(r);
7712
+ async function jr(e, { address: t, hash: n, signature: r, ...a }) {
7713
+ const s = de(r) ? r : typeof r == "object" && "r" in r && "s" in r ? il(r) : q(r);
7714
7714
  try {
7715
7715
  const { data: i } = await S(e, dn, "call")({
7716
7716
  data: Ir({
7717
- abi: sc,
7717
+ abi: ic,
7718
7718
  args: [t, n, s],
7719
- bytecode: uc
7719
+ bytecode: cc
7720
7720
  }),
7721
7721
  ...a
7722
7722
  });
7723
- return Nd(i ?? "0x0", "0x1");
7723
+ return Dd(i ?? "0x0", "0x1");
7724
7724
  } catch (i) {
7725
7725
  if (i instanceof os)
7726
7726
  return !1;
7727
7727
  throw i;
7728
7728
  }
7729
7729
  }
7730
- async function il(e, { address: t, message: n, signature: r, ...a }) {
7730
+ async function ol(e, { address: t, message: n, signature: r, ...a }) {
7731
7731
  const s = Gs(n);
7732
- return Lr(e, {
7732
+ return jr(e, {
7733
7733
  address: t,
7734
7734
  hash: s,
7735
7735
  signature: r,
7736
7736
  ...a
7737
7737
  });
7738
7738
  }
7739
- async function ol(e, t) {
7740
- const { address: n, signature: r, message: a, primaryType: s, types: i, domain: o, ...u } = t, c = yd({ message: a, primaryType: s, types: i, domain: o });
7741
- return Lr(e, {
7739
+ async function ul(e, t) {
7740
+ const { address: n, signature: r, message: a, primaryType: s, types: i, domain: o, ...u } = t, c = fd({ message: a, primaryType: s, types: i, domain: o });
7741
+ return jr(e, {
7742
7742
  address: n,
7743
7743
  hash: c,
7744
7744
  signature: r,
@@ -7756,10 +7756,10 @@ function ri(e, { emitOnBegin: t = !1, emitMissed: n = !1, onBlockNumber: r, onEr
7756
7756
  n,
7757
7757
  i
7758
7758
  ]);
7759
- return $e(d, { onBlockNumber: r, onError: a }, (p) => Ut(async () => {
7759
+ return $e(d, { onBlockNumber: r, onError: a }, (p) => Dt(async () => {
7760
7760
  var m;
7761
7761
  try {
7762
- const f = await S(e, jt, "getBlockNumber")({ cacheTime: 0 });
7762
+ const f = await S(e, Ut, "getBlockNumber")({ cacheTime: 0 });
7763
7763
  if (u) {
7764
7764
  if (f === u)
7765
7765
  return;
@@ -7814,7 +7814,7 @@ function ri(e, { emitOnBegin: t = !1, emitMissed: n = !1, onBlockNumber: r, onEr
7814
7814
  });
7815
7815
  })();
7816
7816
  }
7817
- async function ul(e, {
7817
+ async function cl(e, {
7818
7818
  confirmations: t = 1,
7819
7819
  hash: n,
7820
7820
  onReplaced: r,
@@ -7902,7 +7902,7 @@ async function ul(e, {
7902
7902
  });
7903
7903
  });
7904
7904
  }
7905
- function cl(e, { blockTag: t = "latest", emitMissed: n = !1, emitOnBegin: r = !1, onBlock: a, onError: s, includeTransactions: i, poll: o, pollingInterval: u = e.pollingInterval }) {
7905
+ function dl(e, { blockTag: t = "latest", emitMissed: n = !1, emitOnBegin: r = !1, onBlock: a, onError: s, includeTransactions: i, poll: o, pollingInterval: u = e.pollingInterval }) {
7906
7906
  const c = typeof o < "u" ? o : !(e.transport.type === "webSocket" || e.transport.type === "fallback" && e.transport.transports[0].config.type === "webSocket"), l = i ?? !1;
7907
7907
  let d;
7908
7908
  return c ? (() => {
@@ -7915,7 +7915,7 @@ function cl(e, { blockTag: t = "latest", emitMissed: n = !1, emitOnBegin: r = !1
7915
7915
  l,
7916
7916
  u
7917
7917
  ]);
7918
- return $e(f, { onBlock: a, onError: s }, (y) => Ut(async () => {
7918
+ return $e(f, { onBlock: a, onError: s }, (y) => Dt(async () => {
7919
7919
  var b;
7920
7920
  try {
7921
7921
  const h = await S(e, Se, "getBlock")({
@@ -7976,7 +7976,7 @@ function cl(e, { blockTag: t = "latest", emitMissed: n = !1, emitOnBegin: r = !1
7976
7976
  })(), () => y();
7977
7977
  })();
7978
7978
  }
7979
- function dl(e, { address: t, args: n, batch: r = !0, event: a, events: s, fromBlock: i, onError: o, onLogs: u, poll: c, pollingInterval: l = e.pollingInterval, strict: d }) {
7979
+ function ll(e, { address: t, args: n, batch: r = !0, event: a, events: s, fromBlock: i, onError: o, onLogs: u, poll: c, pollingInterval: l = e.pollingInterval, strict: d }) {
7980
7980
  const p = typeof c < "u" ? c : typeof i == "bigint" ? !0 : !(e.transport.type === "webSocket" || e.transport.type === "fallback" && e.transport.transports[0].config.type === "webSocket"), m = d ?? !1;
7981
7981
  return p ? (() => {
7982
7982
  const b = W([
@@ -7993,7 +7993,7 @@ function dl(e, { address: t, args: n, batch: r = !0, event: a, events: s, fromBl
7993
7993
  let g;
7994
7994
  i !== void 0 && (g = i - 1n);
7995
7995
  let w, x = !1;
7996
- const P = Ut(async () => {
7996
+ const P = Dt(async () => {
7997
7997
  var T;
7998
7998
  if (!x) {
7999
7999
  try {
@@ -8015,7 +8015,7 @@ function dl(e, { address: t, args: n, batch: r = !0, event: a, events: s, fromBl
8015
8015
  if (w)
8016
8016
  C = await S(e, ln, "getFilterChanges")({ filter: w });
8017
8017
  else {
8018
- const E = await S(e, jt, "getBlockNumber")({});
8018
+ const E = await S(e, Ut, "getBlockNumber")({});
8019
8019
  g && g !== E ? C = await S(e, Cr, "getLogs")({
8020
8020
  address: t,
8021
8021
  args: n,
@@ -8056,7 +8056,7 @@ function dl(e, { address: t, args: n, batch: r = !0, event: a, events: s, fromBl
8056
8056
  })(), w = s ?? (a ? [a] : void 0);
8057
8057
  let x = [];
8058
8058
  w && (x = [
8059
- w.flatMap((T) => Rt({
8059
+ w.flatMap((T) => Ot({
8060
8060
  abi: [T],
8061
8061
  eventName: T.name,
8062
8062
  args: n
@@ -8102,7 +8102,7 @@ function dl(e, { address: t, args: n, batch: r = !0, event: a, events: s, fromBl
8102
8102
  })(), () => h();
8103
8103
  })();
8104
8104
  }
8105
- function ll(e, { batch: t = !0, onError: n, onTransactions: r, poll: a, pollingInterval: s = e.pollingInterval }) {
8105
+ function pl(e, { batch: t = !0, onError: n, onTransactions: r, poll: a, pollingInterval: s = e.pollingInterval }) {
8106
8106
  return (typeof a < "u" ? a : e.transport.type !== "webSocket") ? (() => {
8107
8107
  const c = W([
8108
8108
  "watchPendingTransactions",
@@ -8112,7 +8112,7 @@ function ll(e, { batch: t = !0, onError: n, onTransactions: r, poll: a, pollingI
8112
8112
  ]);
8113
8113
  return $e(c, { onTransactions: r, onError: n }, (l) => {
8114
8114
  let d;
8115
- const p = Ut(async () => {
8115
+ const p = Dt(async () => {
8116
8116
  var m;
8117
8117
  try {
8118
8118
  if (!d)
@@ -8164,9 +8164,9 @@ function ll(e, { batch: t = !0, onError: n, onTransactions: r, poll: a, pollingI
8164
8164
  })(), () => l();
8165
8165
  })();
8166
8166
  }
8167
- function pl(e) {
8167
+ function yl(e) {
8168
8168
  var d, p, m;
8169
- const { scheme: t, statement: n, ...r } = ((d = e.match(yl)) == null ? void 0 : d.groups) ?? {}, { chainId: a, expirationTime: s, issuedAt: i, notBefore: o, requestId: u, ...c } = ((p = e.match(fl)) == null ? void 0 : p.groups) ?? {}, l = (m = e.split("Resources:")[1]) == null ? void 0 : m.split(`
8169
+ const { scheme: t, statement: n, ...r } = ((d = e.match(fl)) == null ? void 0 : d.groups) ?? {}, { chainId: a, expirationTime: s, issuedAt: i, notBefore: o, requestId: u, ...c } = ((p = e.match(ml)) == null ? void 0 : p.groups) ?? {}, l = (m = e.split("Resources:")[1]) == null ? void 0 : m.split(`
8170
8170
  - `).slice(1);
8171
8171
  return {
8172
8172
  ...r,
@@ -8181,22 +8181,22 @@ function pl(e) {
8181
8181
  ...n ? { statement: n } : {}
8182
8182
  };
8183
8183
  }
8184
- const yl = /^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/, fl = /(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;
8185
- function ml(e) {
8184
+ const fl = /^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/, ml = /(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;
8185
+ function bl(e) {
8186
8186
  const { address: t, domain: n, message: r, nonce: a, scheme: s, time: i = /* @__PURE__ */ new Date() } = e;
8187
8187
  if (n && r.domain !== n || a && r.nonce !== a || s && r.scheme !== s || r.expirationTime && i >= r.expirationTime || r.notBefore && i < r.notBefore)
8188
8188
  return !1;
8189
8189
  try {
8190
- if (!r.address || t && !dd(r.address, t))
8190
+ if (!r.address || t && !ld(r.address, t))
8191
8191
  return !1;
8192
8192
  } catch {
8193
8193
  return !1;
8194
8194
  }
8195
8195
  return !0;
8196
8196
  }
8197
- async function bl(e, t) {
8198
- const { address: n, domain: r, message: a, nonce: s, scheme: i, signature: o, time: u = /* @__PURE__ */ new Date(), ...c } = t, l = pl(a);
8199
- if (!l.address || !ml({
8197
+ async function hl(e, t) {
8198
+ const { address: n, domain: r, message: a, nonce: s, scheme: i, signature: o, time: u = /* @__PURE__ */ new Date(), ...c } = t, l = yl(a);
8199
+ if (!l.address || !bl({
8200
8200
  address: n,
8201
8201
  domain: r,
8202
8202
  message: l,
@@ -8206,64 +8206,64 @@ async function bl(e, t) {
8206
8206
  }))
8207
8207
  return !1;
8208
8208
  const p = Gs(a);
8209
- return Lr(e, {
8209
+ return jr(e, {
8210
8210
  address: l.address,
8211
8211
  hash: p,
8212
8212
  signature: o,
8213
8213
  ...c
8214
8214
  });
8215
8215
  }
8216
- function hl(e) {
8216
+ function gl(e) {
8217
8217
  return {
8218
8218
  call: (t) => dn(e, t),
8219
- createBlockFilter: () => nd(e),
8219
+ createBlockFilter: () => rd(e),
8220
8220
  createContractEventFilter: (t) => fr(e, t),
8221
8221
  createEventFilter: (t) => Ns(e, t),
8222
8222
  createPendingTransactionFilter: () => Ds(e),
8223
8223
  estimateContractGas: (t) => xs(e, t),
8224
8224
  estimateGas: (t) => xr(e, t),
8225
- getBalance: (t) => rd(e, t),
8226
- getBlobBaseFee: () => ad(e),
8225
+ getBalance: (t) => ad(e, t),
8226
+ getBlobBaseFee: () => sd(e),
8227
8227
  getBlock: (t) => Se(e, t),
8228
- getBlockNumber: (t) => jt(e, t),
8229
- getBlockTransactionCount: (t) => sd(e, t),
8230
- getBytecode: (t) => id(e, t),
8231
- getChainId: () => Dt(e),
8228
+ getBlockNumber: (t) => Ut(e, t),
8229
+ getBlockTransactionCount: (t) => id(e, t),
8230
+ getBytecode: (t) => od(e, t),
8231
+ getChainId: () => Nt(e),
8232
8232
  getContractEvents: (t) => Ar(e, t),
8233
- getEip712Domain: (t) => Pc(e, t),
8233
+ getEip712Domain: (t) => Cc(e, t),
8234
8234
  getEnsAddress: (t) => Lc(e, t),
8235
- getEnsAvatar: (t) => Qc(e, t),
8236
- getEnsName: (t) => ed(e, t),
8237
- getEnsResolver: (t) => td(e, t),
8235
+ getEnsAvatar: (t) => ed(e, t),
8236
+ getEnsName: (t) => td(e, t),
8237
+ getEnsResolver: (t) => nd(e, t),
8238
8238
  getEnsText: (t) => Fs(e, t),
8239
- getFeeHistory: (t) => ud(e, t),
8240
- estimateFeesPerGas: (t) => zu(e, t),
8239
+ getFeeHistory: (t) => cd(e, t),
8240
+ estimateFeesPerGas: (t) => _u(e, t),
8241
8241
  getFilterChanges: (t) => ln(e, t),
8242
- getFilterLogs: (t) => cd(e, t),
8242
+ getFilterLogs: (t) => dd(e, t),
8243
8243
  getGasPrice: () => Tr(e),
8244
8244
  getLogs: (t) => Cr(e, t),
8245
- getProof: (t) => Ed(e, t),
8246
- estimateMaxPriorityFeePerGas: (t) => Hu(e, t),
8247
- getStorageAt: (t) => Pd(e, t),
8245
+ getProof: (t) => Pd(e, t),
8246
+ estimateMaxPriorityFeePerGas: (t) => zu(e, t),
8247
+ getStorageAt: (t) => Cd(e, t),
8248
8248
  getTransaction: (t) => Rr(e, t),
8249
- getTransactionConfirmations: (t) => Cd(e, t),
8249
+ getTransactionConfirmations: (t) => Ad(e, t),
8250
8250
  getTransactionCount: (t) => ms(e, t),
8251
8251
  getTransactionReceipt: (t) => Jn(e, t),
8252
- multicall: (t) => Ad(e, t),
8252
+ multicall: (t) => Id(e, t),
8253
8253
  prepareTransactionRequest: (t) => cn(e, t),
8254
8254
  readContract: (t) => le(e, t),
8255
8255
  sendRawTransaction: (t) => Mr(e, t),
8256
8256
  simulateContract: (t) => Is(e, t),
8257
- verifyMessage: (t) => il(e, t),
8258
- verifySiweMessage: (t) => bl(e, t),
8259
- verifyTypedData: (t) => ol(e, t),
8257
+ verifyMessage: (t) => ol(e, t),
8258
+ verifySiweMessage: (t) => hl(e, t),
8259
+ verifyTypedData: (t) => ul(e, t),
8260
8260
  uninstallFilter: (t) => pn(e, t),
8261
- waitForTransactionReceipt: (t) => ul(e, t),
8262
- watchBlocks: (t) => cl(e, t),
8261
+ waitForTransactionReceipt: (t) => cl(e, t),
8262
+ watchBlocks: (t) => dl(e, t),
8263
8263
  watchBlockNumber: (t) => ri(e, t),
8264
8264
  watchContractEvent: (t) => Ms(e, t),
8265
- watchEvent: (t) => dl(e, t),
8266
- watchPendingTransactions: (t) => ll(e, t)
8265
+ watchEvent: (t) => ll(e, t),
8266
+ watchPendingTransactions: (t) => pl(e, t)
8267
8267
  };
8268
8268
  }
8269
8269
  function ai(e) {
@@ -8273,32 +8273,32 @@ function ai(e) {
8273
8273
  key: t,
8274
8274
  name: n,
8275
8275
  type: "publicClient"
8276
- }).extend(hl);
8276
+ }).extend(gl);
8277
8277
  }
8278
- function gl(e, t) {
8278
+ function wl(e, t) {
8279
8279
  const { abi: n, args: r, bytecode: a, ...s } = t, i = Ir({ abi: n, args: r, bytecode: a });
8280
8280
  return Sr(e, {
8281
8281
  ...s,
8282
8282
  data: i
8283
8283
  });
8284
8284
  }
8285
- async function wl(e) {
8285
+ async function Tl(e) {
8286
8286
  var n;
8287
8287
  return ((n = e.account) == null ? void 0 : n.type) === "local" ? [e.account.address] : (await e.request({ method: "eth_accounts" })).map((r) => rn(r));
8288
8288
  }
8289
- async function Tl(e) {
8289
+ async function vl(e) {
8290
8290
  return await e.request({ method: "wallet_getPermissions" });
8291
8291
  }
8292
- async function vl(e) {
8293
- return (await e.request({ method: "eth_requestAccounts" }, { retryCount: 0 })).map((n) => Vo(n));
8292
+ async function xl(e) {
8293
+ return (await e.request({ method: "eth_requestAccounts" }, { retryCount: 0 })).map((n) => Zo(n));
8294
8294
  }
8295
- async function xl(e, t) {
8295
+ async function El(e, t) {
8296
8296
  return e.request({
8297
8297
  method: "wallet_requestPermissions",
8298
8298
  params: [t]
8299
8299
  }, { retryCount: 0 });
8300
8300
  }
8301
- async function El(e, { account: t = e.account, message: n }) {
8301
+ async function Pl(e, { account: t = e.account, message: n }) {
8302
8302
  if (!t)
8303
8303
  throw new yn({
8304
8304
  docsPath: "/docs/actions/wallet/signMessage"
@@ -8312,7 +8312,7 @@ async function El(e, { account: t = e.account, message: n }) {
8312
8312
  params: [a, r.address]
8313
8313
  }, { retryCount: 0 });
8314
8314
  }
8315
- async function Pl(e, t) {
8315
+ async function Cl(e, t) {
8316
8316
  var c, l, d, p;
8317
8317
  const { account: n = e.account, chain: r = e.chain, ...a } = t;
8318
8318
  if (!n)
@@ -8320,11 +8320,11 @@ async function Pl(e, t) {
8320
8320
  docsPath: "/docs/actions/wallet/signTransaction"
8321
8321
  });
8322
8322
  const s = re(n);
8323
- Nt({
8323
+ Ft({
8324
8324
  account: s,
8325
8325
  ...t
8326
8326
  });
8327
- const i = await S(e, Dt, "getChainId")({});
8327
+ const i = await S(e, Nt, "getChainId")({});
8328
8328
  r !== null && Ss({
8329
8329
  currentChainId: i,
8330
8330
  chain: r
@@ -8344,7 +8344,7 @@ async function Pl(e, t) {
8344
8344
  ]
8345
8345
  }, { retryCount: 0 });
8346
8346
  }
8347
- async function Cl(e, t) {
8347
+ async function Al(e, t) {
8348
8348
  const { account: n = e.account, domain: r, message: a, primaryType: s } = t;
8349
8349
  if (!n)
8350
8350
  throw new yn({
@@ -8356,13 +8356,13 @@ async function Cl(e, t) {
8356
8356
  };
8357
8357
  if (_s({ domain: r, message: a, primaryType: s, types: o }), i.type === "local")
8358
8358
  return i.signTypedData({ domain: r, message: a, primaryType: s, types: o });
8359
- const u = hd({ domain: r, message: a, primaryType: s, types: o });
8359
+ const u = gd({ domain: r, message: a, primaryType: s, types: o });
8360
8360
  return e.request({
8361
8361
  method: "eth_signTypedData_v4",
8362
8362
  params: [i.address, u]
8363
8363
  }, { retryCount: 0 });
8364
8364
  }
8365
- async function Al(e, { id: t }) {
8365
+ async function Il(e, { id: t }) {
8366
8366
  await e.request({
8367
8367
  method: "wallet_switchEthereumChain",
8368
8368
  params: [
@@ -8372,29 +8372,29 @@ async function Al(e, { id: t }) {
8372
8372
  ]
8373
8373
  }, { retryCount: 0 });
8374
8374
  }
8375
- async function Il(e, t) {
8375
+ async function Ml(e, t) {
8376
8376
  return await e.request({
8377
8377
  method: "wallet_watchAsset",
8378
8378
  params: t
8379
8379
  }, { retryCount: 0 });
8380
8380
  }
8381
- function Ml(e) {
8381
+ function Sl(e) {
8382
8382
  return {
8383
- addChain: (t) => Ac(e, t),
8384
- deployContract: (t) => gl(e, t),
8385
- getAddresses: () => wl(e),
8386
- getChainId: () => Dt(e),
8387
- getPermissions: () => Tl(e),
8383
+ addChain: (t) => Ic(e, t),
8384
+ deployContract: (t) => wl(e, t),
8385
+ getAddresses: () => Tl(e),
8386
+ getChainId: () => Nt(e),
8387
+ getPermissions: () => vl(e),
8388
8388
  prepareTransactionRequest: (t) => cn(e, t),
8389
- requestAddresses: () => vl(e),
8390
- requestPermissions: (t) => xl(e, t),
8389
+ requestAddresses: () => xl(e),
8390
+ requestPermissions: (t) => El(e, t),
8391
8391
  sendRawTransaction: (t) => Mr(e, t),
8392
8392
  sendTransaction: (t) => Sr(e, t),
8393
- signMessage: (t) => El(e, t),
8394
- signTransaction: (t) => Pl(e, t),
8395
- signTypedData: (t) => Cl(e, t),
8396
- switchChain: (t) => Al(e, t),
8397
- watchAsset: (t) => Il(e, t),
8393
+ signMessage: (t) => Pl(e, t),
8394
+ signTransaction: (t) => Cl(e, t),
8395
+ signTypedData: (t) => Al(e, t),
8396
+ switchChain: (t) => Il(e, t),
8397
+ watchAsset: (t) => Ml(e, t),
8398
8398
  writeContract: (t) => Bs(e, t)
8399
8399
  };
8400
8400
  }
@@ -8406,10 +8406,10 @@ function si(e) {
8406
8406
  name: n,
8407
8407
  transport: r,
8408
8408
  type: "walletClient"
8409
- }).extend(Ml);
8409
+ }).extend(Sl);
8410
8410
  }
8411
- function Sl(e) {
8412
- const { r: t, s: n } = jr.Signature.fromCompact(e.slice(2, 130)), r = +`0x${e.slice(130)}`, [a, s] = (() => {
8411
+ function Bl(e) {
8412
+ const { r: t, s: n } = Hr.Signature.fromCompact(e.slice(2, 130)), r = +`0x${e.slice(130)}`, [a, s] = (() => {
8413
8413
  if (r === 0 || r === 1)
8414
8414
  return [void 0, r];
8415
8415
  if (r === 27)
@@ -8510,7 +8510,7 @@ const we = {
8510
8510
  PufferL2Depositor: "0x300480bf80b1ad93a9f6349623646142776e9156",
8511
8511
  PufLocker: "0x367551e0834c26e29e0a17ce3ed4dca87ff0c204"
8512
8512
  }
8513
- }, Bl = [
8513
+ }, $l = [
8514
8514
  {
8515
8515
  type: "constructor",
8516
8516
  inputs: [
@@ -10369,7 +10369,7 @@ const we = {
10369
10369
  name: "WithdrawalsAreDisabled",
10370
10370
  inputs: []
10371
10371
  }
10372
- ], $l = [
10372
+ ], kl = [
10373
10373
  {
10374
10374
  type: "constructor",
10375
10375
  inputs: [
@@ -12151,15 +12151,15 @@ const we = {
12151
12151
  name: "WithdrawalsAreDisabled",
12152
12152
  inputs: []
12153
12153
  }
12154
- ], kl = {
12154
+ ], Ol = {
12155
12155
  [k.Mainnet]: {
12156
- PufferVaultV2: Bl
12156
+ PufferVaultV2: $l
12157
12157
  },
12158
12158
  [k.Holesky]: {
12159
- PufferVaultV2: $l
12159
+ PufferVaultV2: kl
12160
12160
  }
12161
12161
  };
12162
- class Ol {
12162
+ class Rl {
12163
12163
  /**
12164
12164
  * Create the handler for the `PufferVaultV2` contract exposing
12165
12165
  * methods to interact with the contract.
@@ -12171,7 +12171,7 @@ class Ol {
12171
12171
  * interactions.
12172
12172
  */
12173
12173
  constructor(t, n, r) {
12174
- L(this, "viemChain");
12174
+ j(this, "viemChain");
12175
12175
  this.chain = t, this.walletClient = n, this.publicClient = r, this.viemChain = we[t];
12176
12176
  }
12177
12177
  /**
@@ -12183,7 +12183,7 @@ class Ol {
12183
12183
  getContract() {
12184
12184
  return ot({
12185
12185
  address: Ce[this.chain].PufferVault,
12186
- abi: kl[this.chain].PufferVaultV2,
12186
+ abi: Ol[this.chain].PufferVaultV2,
12187
12187
  client: {
12188
12188
  wallet: this.walletClient,
12189
12189
  public: this.publicClient
@@ -12271,7 +12271,7 @@ class Ol {
12271
12271
  ) };
12272
12272
  }
12273
12273
  }
12274
- const Rl = [
12274
+ const Fl = [
12275
12275
  {
12276
12276
  type: "constructor",
12277
12277
  inputs: [
@@ -12643,7 +12643,7 @@ const Rl = [
12643
12643
  }
12644
12644
  ]
12645
12645
  }
12646
- ], Fl = [
12646
+ ], Nl = [
12647
12647
  {
12648
12648
  type: "constructor",
12649
12649
  inputs: [
@@ -13298,17 +13298,17 @@ const Rl = [
13298
13298
  stateMutability: "view",
13299
13299
  type: "function"
13300
13300
  }
13301
- ], Nl = {
13301
+ ], Dl = {
13302
13302
  [k.Mainnet]: {
13303
- PufferDepositor: Rl
13303
+ PufferDepositor: Fl
13304
13304
  },
13305
13305
  [k.Holesky]: {
13306
- PufferDepositor: Fl
13306
+ PufferDepositor: Nl
13307
13307
  }
13308
- }, Dl = {
13308
+ }, Ul = {
13309
13309
  [k.Mainnet]: { PufferL2Depositor: va },
13310
13310
  [k.Holesky]: { PufferL2Depositor: va }
13311
- }, Ul = [
13311
+ }, Hl = [
13312
13312
  {
13313
13313
  type: "function",
13314
13314
  name: "DOMAIN_SEPARATOR",
@@ -13827,9 +13827,19 @@ const Rl = [
13827
13827
  }
13828
13828
  ]
13829
13829
  }
13830
- ], jl = Ul;
13831
- var $t = /* @__PURE__ */ ((e) => (e.USDT = "USDT", e.USDC = "USDC", e.DAI = "DAI", e.ETH = "ETH", e.WETH = "wETH", e.stETH = "stETH", e.wstETH = "wstETH", e.pufETH = "pufETH", e.pufUSDT = "pufUSDT", e.pufUSDC = "pufUSDC", e.pufDAI = "pufDAI", e.pufpufETH = "pufpufETH", e.pufWETH = "pufWETH", e.pufStETH = "pufStETH", e.pufWstETH = "pufWstETH", e.pufALT = "pufALT", e.pufEETH = "pufEETH", e))($t || {});
13832
- const ce = {
13830
+ ], jl = Hl;
13831
+ var Jt = /* @__PURE__ */ ((e) => (e.USDT = "USDT", e.USDC = "USDC", e.DAI = "DAI", e.ETH = "ETH", e.WETH = "WETH", e.stETH = "stETH", e.wstETH = "wstETH", e.pufETH = "pufETH", e))(Jt || {}), ui = /* @__PURE__ */ ((e) => (e.pufUSDT = "pufUSDT", e.pufUSDC = "pufUSDC", e.pufDAI = "pufDAI", e.pufpufETH = "pufpufETH", e.pufWETH = "pufWETH", e.pufStETH = "pufStETH", e.pufWstETH = "pufWstETH", e.pufALT = "pufALT", e.pufEETH = "pufEETH", e))(ui || {});
13832
+ const Jl = {
13833
+ USDT: "pufUSDT",
13834
+ USDC: "pufUSDC",
13835
+ DAI: "pufDAI",
13836
+ ETH: "pufEETH",
13837
+ WETH: "pufWETH",
13838
+ stETH: "pufStETH",
13839
+ wstETH: "pufWstETH",
13840
+ pufETH: "pufpufETH"
13841
+ /* pufpufETH */
13842
+ }, ce = {
13833
13843
  USDT: {
13834
13844
  [k.Mainnet]: "0xdac17f958d2ee523a2206206994597c13d831ec7",
13835
13845
  [k.Holesky]: "0xd5bef2c64f418fd460319521d37862327122e3bc"
@@ -13844,7 +13854,7 @@ const ce = {
13844
13854
  },
13845
13855
  ETH: {},
13846
13856
  // WETH does not support permit signatures (ERC20Permit).
13847
- wETH: {
13857
+ WETH: {
13848
13858
  [k.Mainnet]: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
13849
13859
  [k.Holesky]: "0x35B1167b4D37931540F4e5189004d1756d1381B0"
13850
13860
  },
@@ -13906,7 +13916,7 @@ const ce = {
13906
13916
  DAI: "1",
13907
13917
  ETH: "",
13908
13918
  // WETH does not support permit signatures (ERC20Permit).
13909
- wETH: "",
13919
+ WETH: "",
13910
13920
  stETH: "2",
13911
13921
  // Puffer Quest v1 uses version 1 for wstETH.
13912
13922
  wstETH: "1",
@@ -13921,7 +13931,7 @@ const ce = {
13921
13931
  pufWstETH: "1",
13922
13932
  pufALT: "1",
13923
13933
  pufpufETH: "1"
13924
- }, Hl = () => Math.floor(Date.now() / 1e3);
13934
+ }, zl = () => Math.floor(Date.now() / 1e3);
13925
13935
  class hn {
13926
13936
  /**
13927
13937
  * Create the handler for processing tokens.
@@ -13933,9 +13943,9 @@ class hn {
13933
13943
  * interactions.
13934
13944
  */
13935
13945
  constructor(t, n, r) {
13936
- L(this, "viemChain");
13937
- L(this, "token");
13938
- this.chain = t, this.walletClient = n, this.publicClient = r, this.viemChain = we[t], this.token = $t.ETH;
13946
+ j(this, "viemChain");
13947
+ j(this, "token");
13948
+ this.chain = t, this.walletClient = n, this.publicClient = r, this.viemChain = we[t], this.token = Jt.ETH;
13939
13949
  }
13940
13950
  /**
13941
13951
  * Set the token to use for executing transactions on the contract.
@@ -13966,7 +13976,7 @@ class hn {
13966
13976
  * Process and get permit signature for the given token to perform
13967
13977
  * transactions through the `PufferDepositor` contract.
13968
13978
  *
13969
- * @param ownerAddress Address of the token awner.
13979
+ * @param ownerAddress Address of the token owner.
13970
13980
  * @param spenderAddress Address of the spender who needs the permit.
13971
13981
  * @param value Value of the transaction.
13972
13982
  * @returns Permit signature in the form `{ r, s, v?, yParity }`.
@@ -13985,7 +13995,7 @@ class hn {
13985
13995
  { name: "nonce", type: "uint256" },
13986
13996
  { name: "deadline", type: "uint256" }
13987
13997
  ]
13988
- }, c = BigInt(Hl() + 60 * 60 * 2), l = await this.walletClient.signTypedData({
13998
+ }, c = BigInt(zl() + 60 * 60 * 2), l = await this.walletClient.signTypedData({
13989
13999
  account: t,
13990
14000
  domain: o,
13991
14001
  types: u,
@@ -13998,7 +14008,7 @@ class hn {
13998
14008
  deadline: c
13999
14009
  }
14000
14010
  });
14001
- return { ...Sl(l), deadline: c };
14011
+ return { ...Bl(l), deadline: c };
14002
14012
  }
14003
14013
  getPermitVersion(t) {
14004
14014
  return Ll[t];
@@ -14018,7 +14028,7 @@ class hn {
14018
14028
  });
14019
14029
  }
14020
14030
  }
14021
- class zl {
14031
+ class _l {
14022
14032
  /**
14023
14033
  * Create the handler for the `PufferDepositor` contract exposing
14024
14034
  * methods to interact with the contract.
@@ -14030,8 +14040,8 @@ class zl {
14030
14040
  * interactions.
14031
14041
  */
14032
14042
  constructor(t, n, r) {
14033
- L(this, "viemChain");
14034
- L(this, "erc20PermitHandler");
14043
+ j(this, "viemChain");
14044
+ j(this, "erc20PermitHandler");
14035
14045
  this.chain = t, this.walletClient = n, this.publicClient = r, this.viemChain = we[t], this.erc20PermitHandler = new hn(
14036
14046
  t,
14037
14047
  n,
@@ -14047,7 +14057,7 @@ class zl {
14047
14057
  getContract() {
14048
14058
  return ot({
14049
14059
  address: Ce[this.chain].PufferDepositor,
14050
- abi: Nl[this.chain].PufferDepositor,
14060
+ abi: Dl[this.chain].PufferDepositor,
14051
14061
  client: {
14052
14062
  wallet: this.walletClient,
14053
14063
  public: this.publicClient
@@ -14068,7 +14078,7 @@ class zl {
14068
14078
  * transaction.
14069
14079
  */
14070
14080
  async depositStETH(t, n) {
14071
- const { r, s: a, v: s, yParity: i, deadline: o } = await this.erc20PermitHandler.withToken($t.stETH).getPermitSignature(
14081
+ const { r, s: a, v: s, yParity: i, deadline: o } = await this.erc20PermitHandler.withToken(Jt.stETH).getPermitSignature(
14072
14082
  t,
14073
14083
  Ce[this.chain].PufferDepositor,
14074
14084
  n
@@ -14101,7 +14111,7 @@ class zl {
14101
14111
  * transaction.
14102
14112
  */
14103
14113
  async depositWstETH(t, n) {
14104
- const { r, s: a, v: s, yParity: i, deadline: o } = await this.erc20PermitHandler.withToken($t.wstETH).getPermitSignature(
14114
+ const { r, s: a, v: s, yParity: i, deadline: o } = await this.erc20PermitHandler.withToken(Jt.wstETH).getPermitSignature(
14105
14115
  t,
14106
14116
  Ce[this.chain].PufferDepositor,
14107
14117
  n
@@ -15002,11 +15012,11 @@ const xa = [
15002
15012
  name: "Unauthorized",
15003
15013
  inputs: []
15004
15014
  }
15005
- ], _l = {
15015
+ ], ql = {
15006
15016
  [k.Mainnet]: { PufToken: xa },
15007
15017
  [k.Holesky]: { PufToken: xa }
15008
15018
  };
15009
- class ql {
15019
+ class Gl {
15010
15020
  /**
15011
15021
  * Create the handler for the `PufToken` contract exposing methods to
15012
15022
  * interact with the contract.
@@ -15018,9 +15028,9 @@ class ql {
15018
15028
  * interactions.
15019
15029
  */
15020
15030
  constructor(t, n, r) {
15021
- L(this, "viemChain");
15022
- L(this, "pufToken");
15023
- this.chain = t, this.walletClient = n, this.publicClient = r, this.pufToken = $t.pufWETH, this.viemChain = we[t];
15031
+ j(this, "viemChain");
15032
+ j(this, "pufToken");
15033
+ this.chain = t, this.walletClient = n, this.publicClient = r, this.pufToken = ui.pufWETH, this.viemChain = we[t];
15024
15034
  }
15025
15035
  /**
15026
15036
  * Set the PufToken to use for executing transactions on the contract.
@@ -15040,7 +15050,7 @@ class ql {
15040
15050
  getContract() {
15041
15051
  return ot({
15042
15052
  address: ce[this.pufToken][this.chain],
15043
- abi: _l[this.chain].PufToken,
15053
+ abi: ql[this.chain].PufToken,
15044
15054
  client: {
15045
15055
  wallet: this.walletClient,
15046
15056
  public: this.publicClient
@@ -15175,7 +15185,7 @@ class ql {
15175
15185
  });
15176
15186
  }
15177
15187
  }
15178
- class Gl {
15188
+ class Wl {
15179
15189
  /**
15180
15190
  * Create the handler for the `PufferL2Depositor` contract exposing
15181
15191
  * methods to interact with the contract.
@@ -15187,8 +15197,8 @@ class Gl {
15187
15197
  * interactions.
15188
15198
  */
15189
15199
  constructor(t, n, r) {
15190
- L(this, "viemChain");
15191
- L(this, "erc20PermitHandler");
15200
+ j(this, "viemChain");
15201
+ j(this, "erc20PermitHandler");
15192
15202
  this.chain = t, this.walletClient = n, this.publicClient = r, this.viemChain = we[t], this.erc20PermitHandler = new hn(
15193
15203
  t,
15194
15204
  n,
@@ -15204,7 +15214,7 @@ class Gl {
15204
15214
  getContract() {
15205
15215
  return ot({
15206
15216
  address: Ce[this.chain].PufferL2Depositor,
15207
- abi: Dl[this.chain].PufferL2Depositor,
15217
+ abi: Ul[this.chain].PufferL2Depositor,
15208
15218
  client: {
15209
15219
  wallet: this.walletClient,
15210
15220
  public: this.publicClient
@@ -15648,11 +15658,11 @@ const Ea = [
15648
15658
  stateMutability: "nonpayable",
15649
15659
  type: "function"
15650
15660
  }
15651
- ], Wl = {
15661
+ ], Vl = {
15652
15662
  [k.Mainnet]: { PufLocker: Ea },
15653
15663
  [k.Holesky]: { PufLocker: Ea }
15654
15664
  };
15655
- class Vl {
15665
+ class Zl {
15656
15666
  /**
15657
15667
  * Create the handler for the `PufLocker` contract exposing methods to
15658
15668
  * interact with the contract.
@@ -15664,8 +15674,8 @@ class Vl {
15664
15674
  * interactions.
15665
15675
  */
15666
15676
  constructor(t, n, r) {
15667
- L(this, "viemChain");
15668
- L(this, "erc20PermitHandler");
15677
+ j(this, "viemChain");
15678
+ j(this, "erc20PermitHandler");
15669
15679
  this.chain = t, this.walletClient = n, this.publicClient = r, this.viemChain = we[t], this.erc20PermitHandler = new hn(
15670
15680
  t,
15671
15681
  n,
@@ -15681,7 +15691,7 @@ class Vl {
15681
15691
  getContract() {
15682
15692
  return ot({
15683
15693
  address: Ce[this.chain].PufLocker,
15684
- abi: Wl[this.chain].PufLocker,
15694
+ abi: Vl[this.chain].PufLocker,
15685
15695
  client: {
15686
15696
  wallet: this.walletClient,
15687
15697
  public: this.publicClient
@@ -15826,7 +15836,7 @@ class Vl {
15826
15836
  }) };
15827
15837
  }
15828
15838
  }
15829
- class Yl {
15839
+ class Xl {
15830
15840
  /**
15831
15841
  * Create the Puffer Client.
15832
15842
  *
@@ -15837,21 +15847,21 @@ class Yl {
15837
15847
  * interactions.
15838
15848
  */
15839
15849
  constructor(t, n, r) {
15840
- L(this, "walletClient");
15841
- L(this, "publicClient");
15850
+ j(this, "walletClient");
15851
+ j(this, "publicClient");
15842
15852
  // Contract Handlers
15843
15853
  /** Handler for the `ERC20Permit` contract. */
15844
- L(this, "erc20Permit");
15854
+ j(this, "erc20Permit");
15845
15855
  /** Handler for the `PufferVaultV2` contract. */
15846
- L(this, "vault");
15856
+ j(this, "vault");
15847
15857
  /** Handler for the `PufferDepositor` contract. */
15848
- L(this, "depositor");
15858
+ j(this, "depositor");
15849
15859
  /** Handler for the `PufferL2Depositor` contract. */
15850
- L(this, "l2Depositor");
15860
+ j(this, "l2Depositor");
15851
15861
  /** Handler for the `PufToken` contract. */
15852
- L(this, "pufToken");
15862
+ j(this, "pufToken");
15853
15863
  /** Handler for the `PufLocker` contract. */
15854
- L(this, "pufLocker");
15864
+ j(this, "pufLocker");
15855
15865
  const a = we[t];
15856
15866
  this.walletClient = n ?? si({
15857
15867
  chain: a,
@@ -15863,23 +15873,23 @@ class Yl {
15863
15873
  t,
15864
15874
  this.walletClient,
15865
15875
  this.publicClient
15866
- ), this.vault = new Ol(
15876
+ ), this.vault = new Rl(
15867
15877
  t,
15868
15878
  this.walletClient,
15869
15879
  this.publicClient
15870
- ), this.depositor = new zl(
15880
+ ), this.depositor = new _l(
15871
15881
  t,
15872
15882
  this.walletClient,
15873
15883
  this.publicClient
15874
- ), this.pufToken = new ql(
15884
+ ), this.pufToken = new Gl(
15875
15885
  t,
15876
15886
  this.walletClient,
15877
15887
  this.publicClient
15878
- ), this.l2Depositor = new Gl(
15888
+ ), this.l2Depositor = new Wl(
15879
15889
  t,
15880
15890
  this.walletClient,
15881
15891
  this.publicClient
15882
- ), this.pufLocker = new Vl(
15892
+ ), this.pufLocker = new Zl(
15883
15893
  t,
15884
15894
  this.walletClient,
15885
15895
  this.publicClient
@@ -15922,27 +15932,29 @@ class nr {
15922
15932
  });
15923
15933
  }
15924
15934
  static extractTransportConfig(t) {
15925
- return "rpcUrls" in t ? $c(t.rpcUrls.map((n) => Yn(n))) : Bc(t.provider, t.config);
15935
+ return "rpcUrls" in t ? kc(t.rpcUrls.map((n) => Yn(n))) : $c(t.provider, t.config);
15926
15936
  }
15927
15937
  }
15928
15938
  export {
15929
15939
  v as B,
15930
15940
  k as C,
15931
15941
  yt as H,
15932
- Yl as P,
15933
- $t as T,
15942
+ Xl as P,
15943
+ Jt as T,
15934
15944
  we as V,
15935
15945
  ge as a,
15936
15946
  de as b,
15937
15947
  dn as c,
15938
- Tu as d,
15939
- kt as e,
15948
+ vu as d,
15949
+ $t as e,
15940
15950
  nr as f,
15941
15951
  rr as g,
15942
- ce as h,
15943
- dd as i,
15944
- Ll as j,
15945
- Ce as k,
15952
+ ui as h,
15953
+ ld as i,
15954
+ Jl as j,
15955
+ ce as k,
15956
+ Ll as l,
15957
+ Ce as m,
15946
15958
  W as s
15947
15959
  };
15948
- //# sourceMappingURL=main-DXvt8xU1.js.map
15960
+ //# sourceMappingURL=main-DKOXyfBM.js.map