@pufferfinance/puffer-sdk 1.2.0 → 1.2.1

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.
@@ -2,7 +2,7 @@ var ui = Object.defineProperty;
2
2
  var ci = (e, t, n) => t in e ? ui(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var L = (e, t, n) => ci(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  const di = "1.0.0";
5
- let te = class $n extends Error {
5
+ let ne = class $n extends Error {
6
6
  constructor(t, n = {}) {
7
7
  var i;
8
8
  const r = n.cause instanceof $n ? n.cause.details : (i = n.cause) != null && i.message ? n.cause.message : n.details, a = n.cause instanceof $n && n.cause.docsPath || n.docsPath, s = [
@@ -64,7 +64,7 @@ function kn(e) {
64
64
  }
65
65
  return "indexed" in e && e.indexed && (t = `${t} indexed`), e.name ? `${t} ${e.name}` : t;
66
66
  }
67
- function dt(e) {
67
+ function ct(e) {
68
68
  let t = "";
69
69
  const n = e.length;
70
70
  for (let r = 0; r < n; r++) {
@@ -74,7 +74,7 @@ function dt(e) {
74
74
  return t;
75
75
  }
76
76
  function li(e) {
77
- return e.type === "function" ? `function ${e.name}(${dt(e.inputs)})${e.stateMutability && e.stateMutability !== "nonpayable" ? ` ${e.stateMutability}` : ""}${e.outputs.length ? ` returns (${dt(e.outputs)})` : ""}` : e.type === "event" ? `event ${e.name}(${dt(e.inputs)})` : e.type === "error" ? `error ${e.name}(${dt(e.inputs)})` : e.type === "constructor" ? `constructor(${dt(e.inputs)})${e.stateMutability === "payable" ? " payable" : ""}` : e.type === "fallback" ? "fallback()" : "receive() external payable";
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
80
  function pi(e) {
@@ -124,7 +124,7 @@ const Ci = /* @__PURE__ */ new Set(["indexed"]), On = /* @__PURE__ */ new Set([
124
124
  "memory",
125
125
  "storage"
126
126
  ]);
127
- class Ai extends te {
127
+ class Ai extends ne {
128
128
  constructor({ type: t }) {
129
129
  super("Unknown type.", {
130
130
  metaMessages: [
@@ -138,7 +138,7 @@ class Ai extends te {
138
138
  });
139
139
  }
140
140
  }
141
- class Ii extends te {
141
+ class Ii 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 te {
150
150
  });
151
151
  }
152
152
  }
153
- class Mi extends te {
153
+ class Mi extends ne {
154
154
  constructor({ param: t }) {
155
155
  super("Invalid ABI parameter.", {
156
156
  details: t
@@ -162,7 +162,7 @@ class Mi extends te {
162
162
  });
163
163
  }
164
164
  }
165
- class Si extends te {
165
+ class Si 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 te {
177
177
  });
178
178
  }
179
179
  }
180
- class Bi extends te {
180
+ class Bi 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 te {
192
192
  });
193
193
  }
194
194
  }
195
- class $i extends te {
195
+ class $i 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 te {
208
208
  });
209
209
  }
210
210
  }
211
- class ki extends te {
211
+ class ki extends ne {
212
212
  constructor({ abiParameter: t }) {
213
213
  super("Invalid ABI parameter.", {
214
214
  details: JSON.stringify(t, null, 2),
@@ -221,7 +221,7 @@ class ki extends te {
221
221
  });
222
222
  }
223
223
  }
224
- class yt extends te {
224
+ class pt extends ne {
225
225
  constructor({ signature: t, type: n }) {
226
226
  super(`Invalid ${n} signature.`, {
227
227
  details: t
@@ -233,7 +233,7 @@ class yt extends te {
233
233
  });
234
234
  }
235
235
  }
236
- class Oi extends te {
236
+ class Oi extends ne {
237
237
  constructor({ signature: t }) {
238
238
  super("Unknown signature.", {
239
239
  details: t
@@ -245,7 +245,7 @@ class Oi extends te {
245
245
  });
246
246
  }
247
247
  }
248
- class Ri extends te {
248
+ class Ri extends ne {
249
249
  constructor({ signature: t }) {
250
250
  super("Invalid struct signature.", {
251
251
  details: t,
@@ -258,7 +258,7 @@ class Ri extends te {
258
258
  });
259
259
  }
260
260
  }
261
- class Fi extends te {
261
+ class Fi 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 te {
270
270
  });
271
271
  }
272
272
  }
273
- class Ni extends te {
273
+ class Ni extends ne {
274
274
  constructor({ current: t, depth: n }) {
275
275
  super("Unbalanced parentheses.", {
276
276
  metaMessages: [
@@ -342,12 +342,12 @@ const wn = /* @__PURE__ */ new Map([
342
342
  { type: "uint256", name: "tokenId", indexed: !0 }
343
343
  ]
344
344
  ]);
345
- function ji(e, t = {}) {
345
+ function Ui(e, t = {}) {
346
346
  if (bi(e)) {
347
347
  const n = hi(e);
348
348
  if (!n)
349
- throw new yt({ signature: e, type: "function" });
350
- const r = se(n.parameters), a = [], s = r.length;
349
+ throw new pt({ signature: e, type: "function" });
350
+ const r = ie(n.parameters), a = [], s = r.length;
351
351
  for (let o = 0; o < s; o++)
352
352
  a.push(Ne(r[o], {
353
353
  modifiers: On,
@@ -356,7 +356,7 @@ function ji(e, t = {}) {
356
356
  }));
357
357
  const i = [];
358
358
  if (n.returns) {
359
- const o = se(n.returns), u = o.length;
359
+ const o = ie(n.returns), u = o.length;
360
360
  for (let c = 0; c < u; c++)
361
361
  i.push(Ne(o[c], {
362
362
  modifiers: On,
@@ -375,8 +375,8 @@ function ji(e, t = {}) {
375
375
  if (fi(e)) {
376
376
  const n = mi(e);
377
377
  if (!n)
378
- throw new yt({ signature: e, type: "event" });
379
- const r = se(n.parameters), a = [], s = r.length;
378
+ throw new pt({ signature: e, type: "event" });
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
382
  modifiers: Ci,
@@ -388,8 +388,8 @@ function ji(e, t = {}) {
388
388
  if (pi(e)) {
389
389
  const n = yi(e);
390
390
  if (!n)
391
- throw new yt({ signature: e, type: "error" });
392
- const r = se(n.parameters), a = [], s = r.length;
391
+ throw new pt({ signature: e, type: "error" });
392
+ const r = ie(n.parameters), a = [], s = r.length;
393
393
  for (let i = 0; i < s; i++)
394
394
  a.push(Ne(r[i], { structs: t, type: "error" }));
395
395
  return { name: n.name, type: "error", inputs: a };
@@ -397,8 +397,8 @@ function ji(e, t = {}) {
397
397
  if (wi(e)) {
398
398
  const n = Ti(e);
399
399
  if (!n)
400
- throw new yt({ signature: e, type: "constructor" });
401
- const r = se(n.parameters), a = [], s = r.length;
400
+ throw new pt({ signature: e, type: "constructor" });
401
+ const r = ie(n.parameters), a = [], s = r.length;
402
402
  for (let i = 0; i < s; i++)
403
403
  a.push(Ne(r[i], { structs: t, type: "constructor" }));
404
404
  return {
@@ -416,13 +416,13 @@ function ji(e, t = {}) {
416
416
  };
417
417
  throw new Oi({ signature: e });
418
418
  }
419
- const Ui = /^(?<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$_]*))?$/, Hi = /^u?int$/;
420
420
  function Ne(e, t) {
421
421
  var d, p;
422
422
  const n = Di(e, t == null ? void 0 : t.type);
423
423
  if (wn.has(n))
424
424
  return wn.get(n);
425
- const r = Aa.test(e), a = ke(r ? Li : Ui, e);
425
+ const r = Aa.test(e), a = ke(r ? Li : ji, e);
426
426
  if (!a)
427
427
  throw new Mi({ param: e });
428
428
  if (a.name && _i(a.name))
@@ -431,7 +431,7 @@ function Ne(e, t) {
431
431
  let u, c = {};
432
432
  if (r) {
433
433
  u = "tuple";
434
- const m = se(a.type), f = [], y = m.length;
434
+ const m = ie(a.type), f = [], y = m.length;
435
435
  for (let b = 0; b < y; b++)
436
436
  f.push(Ne(m[b], { structs: o }));
437
437
  c = { components: f };
@@ -463,19 +463,19 @@ function Ne(e, t) {
463
463
  };
464
464
  return wn.set(n, l), l;
465
465
  }
466
- function se(e, t = [], n = "", r = 0) {
466
+ function ie(e, t = [], n = "", r = 0) {
467
467
  const a = e.trim().length;
468
468
  for (let s = 0; s < a; s++) {
469
469
  const i = e[s], o = e.slice(s + 1);
470
470
  switch (i) {
471
471
  case ",":
472
- return r === 0 ? se(o, [...t, n.trim()]) : se(o, t, `${n}${i}`, r);
472
+ return r === 0 ? ie(o, [...t, n.trim()]) : ie(o, t, `${n}${i}`, r);
473
473
  case "(":
474
- return se(o, t, `${n}${i}`, r + 1);
474
+ return ie(o, t, `${n}${i}`, r + 1);
475
475
  case ")":
476
- return se(o, t, `${n}${i}`, r - 1);
476
+ return ie(o, t, `${n}${i}`, r - 1);
477
477
  default:
478
- return se(o, t, `${n}${i}`, r);
478
+ return ie(o, t, `${n}${i}`, r);
479
479
  }
480
480
  }
481
481
  if (n === "")
@@ -502,7 +502,7 @@ function Gi(e) {
502
502
  continue;
503
503
  const u = gi(o);
504
504
  if (!u)
505
- throw new yt({ signature: o, type: "struct" });
505
+ throw new pt({ signature: o, type: "struct" });
506
506
  const c = u.properties.split(";"), l = [], d = c.length;
507
507
  for (let p = 0; p < d; p++) {
508
508
  const f = c[p].trim();
@@ -556,7 +556,7 @@ function Vi(e) {
556
556
  const t = Gi(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(ji(s, t));
559
+ $a(s) || n.push(Ui(s, t));
560
560
  }
561
561
  return n;
562
562
  }
@@ -577,11 +577,11 @@ function Xt(e, { includeName: t = !1 } = {}) {
577
577
  function Zi(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
- function ce(e, { strict: t = !0 } = {}) {
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
583
  function H(e) {
584
- return ce(e, { strict: !1 }) ? Math.ceil((e.length - 2) / 2) : e.length;
584
+ return de(e, { strict: !1 }) ? Math.ceil((e.length - 2) / 2) : e.length;
585
585
  }
586
586
  const Ki = "2.14.0", Yi = (e) => e, rr = (e) => e, Ji = () => `viem@${Ki}`;
587
587
  class v extends Error {
@@ -785,7 +785,7 @@ class no extends v {
785
785
  });
786
786
  }
787
787
  }
788
- class ja extends v {
788
+ class Ua extends v {
789
789
  constructor(t, { docsPath: n }) {
790
790
  super([
791
791
  `Encoded event signature "${t}" not found on ABI.`,
@@ -879,7 +879,7 @@ class so extends v {
879
879
  });
880
880
  }
881
881
  }
882
- class mt extends v {
882
+ class ft extends v {
883
883
  constructor({ abiItem: t, data: n, params: r, size: a }) {
884
884
  super([
885
885
  `Data size of ${a} bytes is too small for non-indexed event parameters.`
@@ -998,7 +998,7 @@ class lo extends v {
998
998
  });
999
999
  }
1000
1000
  }
1001
- class Ua extends v {
1001
+ class ja 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,
@@ -1028,10 +1028,10 @@ class Vr extends v {
1028
1028
  });
1029
1029
  }
1030
1030
  }
1031
- function at(e, { dir: t, size: n = 32 } = {}) {
1032
- return typeof e == "string" ? ue(e, { dir: t, size: n }) : po(e, { dir: t, size: n });
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 });
1033
1033
  }
1034
- function ue(e, { dir: t, size: n = 32 } = {}) {
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", "");
@@ -1095,7 +1095,7 @@ function tn(e, { dir: t = "left" } = {}) {
1095
1095
  r++;
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
- function le(e, { size: t }) {
1098
+ function pe(e, { size: t }) {
1099
1099
  if (H(e) > t)
1100
1100
  throw new mo({
1101
1101
  givenSize: H(e),
@@ -1104,7 +1104,7 @@ function le(e, { size: t }) {
1104
1104
  }
1105
1105
  function Ye(e, t = {}) {
1106
1106
  const { signed: n } = t;
1107
- t.size && le(e, { size: t.size });
1107
+ t.size && pe(e, { size: t.size });
1108
1108
  const r = BigInt(e);
1109
1109
  if (!n)
1110
1110
  return r;
@@ -1116,20 +1116,20 @@ function Ae(e, t = {}) {
1116
1116
  }
1117
1117
  const bo = /* @__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" ? k(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" ? Ha(e, t) : q(e, t);
1120
1120
  }
1121
1121
  function Ha(e, t = {}) {
1122
1122
  const n = `0x${Number(e)}`;
1123
- return typeof t.size == "number" ? (le(n, { size: t.size }), at(n, { size: t.size })) : n;
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
1128
  n += bo[e[a]];
1129
1129
  const r = `0x${n}`;
1130
- return typeof t.size == "number" ? (le(r, { size: t.size }), at(r, { dir: "right", size: t.size })) : r;
1130
+ return typeof t.size == "number" ? (pe(r, { size: t.size }), rt(r, { dir: "right", size: t.size })) : r;
1131
1131
  }
1132
- function k(e, t = {}) {
1132
+ function O(e, t = {}) {
1133
1133
  const { signed: n, size: r } = t, a = BigInt(e);
1134
1134
  let s;
1135
1135
  r ? n ? s = (1n << BigInt(r) * 8n - 1n) - 1n : s = 2n ** (BigInt(r) * 8n) - 1n : typeof e == "number" && (s = BigInt(Number.MAX_SAFE_INTEGER));
@@ -1145,7 +1145,7 @@ function k(e, t = {}) {
1145
1145
  });
1146
1146
  }
1147
1147
  const o = `0x${(n && a < 0 ? (1n << BigInt(r * 8)) + BigInt(a) : a).toString(16)}`;
1148
- return r ? at(o, { size: r }) : o;
1148
+ return r ? rt(o, { size: r }) : o;
1149
1149
  }
1150
1150
  const ho = /* @__PURE__ */ new TextEncoder();
1151
1151
  function ar(e, t = {}) {
@@ -1154,13 +1154,13 @@ function ar(e, t = {}) {
1154
1154
  }
1155
1155
  const go = /* @__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) : ce(e) ? He(e, t) : me(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);
1158
1158
  }
1159
1159
  function wo(e, t = {}) {
1160
1160
  const n = new Uint8Array(1);
1161
- return n[0] = Number(e), typeof t.size == "number" ? (le(n, { size: t.size }), at(n, { size: t.size })) : n;
1161
+ return n[0] = Number(e), typeof t.size == "number" ? (pe(n, { size: t.size }), rt(n, { size: t.size })) : n;
1162
1162
  }
1163
- const pe = {
1163
+ const ye = {
1164
1164
  zero: 48,
1165
1165
  nine: 57,
1166
1166
  A: 65,
@@ -1169,16 +1169,16 @@ const pe = {
1169
1169
  f: 102
1170
1170
  };
1171
1171
  function Zr(e) {
1172
- if (e >= pe.zero && e <= pe.nine)
1173
- return e - pe.zero;
1174
- if (e >= pe.A && e <= pe.F)
1175
- return e - (pe.A - 10);
1176
- if (e >= pe.a && e <= pe.f)
1177
- return e - (pe.a - 10);
1172
+ if (e >= ye.zero && e <= ye.nine)
1173
+ return e - ye.zero;
1174
+ if (e >= ye.A && e <= ye.F)
1175
+ return e - (ye.A - 10);
1176
+ if (e >= ye.a && e <= ye.f)
1177
+ return e - (ye.a - 10);
1178
1178
  }
1179
1179
  function He(e, t = {}) {
1180
1180
  let n = e;
1181
- t.size && (le(n, { size: t.size }), n = at(n, { dir: "right", size: t.size }));
1181
+ t.size && (pe(n, { size: t.size }), n = rt(n, { dir: "right", size: t.size }));
1182
1182
  let r = n.slice(2);
1183
1183
  r.length % 2 && (r = `0${r}`);
1184
1184
  const a = r.length / 2, s = new Uint8Array(a);
@@ -1191,12 +1191,12 @@ function He(e, t = {}) {
1191
1191
  return s;
1192
1192
  }
1193
1193
  function To(e, t) {
1194
- const n = k(e, t);
1194
+ const n = O(e, t);
1195
1195
  return He(n);
1196
1196
  }
1197
1197
  function me(e, t = {}) {
1198
1198
  const n = go.encode(e);
1199
- return typeof t.size == "number" ? (le(n, { size: t.size }), at(n, { dir: "right", size: t.size })) : n;
1199
+ return typeof t.size == "number" ? (pe(n, { size: t.size }), rt(n, { dir: "right", size: t.size })) : n;
1200
1200
  }
1201
1201
  function Vt(e) {
1202
1202
  if (!Number.isSafeInteger(e) || e < 0)
@@ -1239,7 +1239,7 @@ function Eo(e, t = !1) {
1239
1239
  }
1240
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;
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), oe = (e, t) => e << 32 - t | e >>> t, So = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
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
1243
  if (!So)
1244
1244
  throw new Error("Non little-endian hardware is not supported");
1245
1245
  function Bo(e) {
@@ -1276,15 +1276,15 @@ function ko(e = 32) {
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), lt = /* @__PURE__ */ BigInt(1), Ro = /* @__PURE__ */ BigInt(2), Fo = /* @__PURE__ */ BigInt(7), No = /* @__PURE__ */ BigInt(256), Do = /* @__PURE__ */ BigInt(113);
1280
- for (let e = 0, t = lt, n = 1, r = 0; e < 24; e++) {
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);
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
1282
  let a = Oo;
1283
1283
  for (let s = 0; s < 7; s++)
1284
- t = (t << lt ^ (t >> Fo) * Do) % No, t & Ro && (a ^= lt << (lt << /* @__PURE__ */ BigInt(s)) - lt);
1284
+ t = (t << dt ^ (t >> Fo) * Do) % No, t & Ro && (a ^= dt << (dt << /* @__PURE__ */ BigInt(s)) - dt);
1285
1285
  Va.push(a);
1286
1286
  }
1287
- const [jo, Uo] = /* @__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 [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);
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,7 +1306,7 @@ 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] ^= jo[r], e[1] ^= Uo[r];
1309
+ e[0] ^= Uo[r], e[1] ^= jo[r];
1310
1310
  }
1311
1311
  n.fill(0);
1312
1312
  }
@@ -1376,7 +1376,7 @@ class or extends ir {
1376
1376
  }
1377
1377
  const Ho = (e, t, n) => qa(() => new or(t, e, n)), zo = /* @__PURE__ */ Ho(1, 136, 256 / 8);
1378
1378
  function Z(e, t) {
1379
- const n = t || "hex", r = zo(ce(e, { strict: !1 }) ? Ie(e) : e);
1379
+ const n = t || "hex", r = zo(de(e, { strict: !1 }) ? Ie(e) : e);
1380
1380
  return n === "bytes" ? r : Oe(r);
1381
1381
  }
1382
1382
  const _o = (e) => Z(Ie(e));
@@ -1455,12 +1455,12 @@ function rn(e, t) {
1455
1455
  return xn.set(`${e}.${t}`, s), s;
1456
1456
  }
1457
1457
  function Vo(e, t) {
1458
- if (!ie(e, { strict: !1 }))
1458
+ if (!oe(e, { strict: !1 }))
1459
1459
  throw new Me({ address: e });
1460
1460
  return rn(e, t);
1461
1461
  }
1462
1462
  const Zo = /^0x[a-fA-F0-9]{40}$/, En = /* @__PURE__ */ new Ka(8192);
1463
- function ie(e, t) {
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);
@@ -1484,7 +1484,7 @@ function cr(e) {
1484
1484
  return `0x${e.reduce((t, n) => t + n.replace("0x", ""), "")}`;
1485
1485
  }
1486
1486
  function Zt(e, t, n, { strict: r } = {}) {
1487
- return ce(e, { strict: !1 }) ? Yo(e, t, n, {
1487
+ return de(e, { strict: !1 }) ? Yo(e, t, n, {
1488
1488
  strict: r
1489
1489
  }) : Xa(e, t, n, {
1490
1490
  strict: r
@@ -1492,7 +1492,7 @@ function Zt(e, t, n, { strict: r } = {}) {
1492
1492
  }
1493
1493
  function Ya(e, t) {
1494
1494
  if (typeof t == "number" && t > 0 && t > H(e) - 1)
1495
- throw new Ua({
1495
+ throw new ja({
1496
1496
  offset: t,
1497
1497
  position: "start",
1498
1498
  size: H(e)
@@ -1500,7 +1500,7 @@ function Ya(e, t) {
1500
1500
  }
1501
1501
  function Ja(e, t, n) {
1502
1502
  if (typeof t == "number" && typeof n == "number" && H(e) !== n - t)
1503
- throw new Ua({
1503
+ throw new ja({
1504
1504
  offset: n,
1505
1505
  position: "end",
1506
1506
  size: H(e)
@@ -1570,14 +1570,14 @@ function lr(e) {
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(k(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 += H(o)) : n.push(o);
1574
1574
  }
1575
1575
  return ge([...n, ...r]);
1576
1576
  }
1577
1577
  function Xo(e) {
1578
- if (!ie(e))
1578
+ if (!oe(e))
1579
1579
  throw new Me({ address: e });
1580
- return { dynamic: !1, encoded: ue(e.toLowerCase()) };
1580
+ return { dynamic: !1, encoded: te(e.toLowerCase()) };
1581
1581
  }
1582
1582
  function Qo(e, { length: t, param: n }) {
1583
1583
  const r = t === null;
@@ -1598,7 +1598,7 @@ function Qo(e, { length: t, param: n }) {
1598
1598
  if (r || a) {
1599
1599
  const i = lr(s);
1600
1600
  if (r) {
1601
- const o = k(s.length, { size: 32 });
1601
+ const o = O(s.length, { size: 32 });
1602
1602
  return {
1603
1603
  dynamic: !0,
1604
1604
  encoded: s.length > 0 ? ge([o, i]) : o
@@ -1616,12 +1616,12 @@ function eu(e, { param: t }) {
1616
1616
  const [, n] = t.type.split("bytes"), r = H(e);
1617
1617
  if (!n) {
1618
1618
  let a = e;
1619
- return r % 32 !== 0 && (a = ue(a, {
1619
+ return r % 32 !== 0 && (a = te(a, {
1620
1620
  dir: "right",
1621
1621
  size: Math.ceil((e.length - 2) / 2 / 32) * 32
1622
1622
  })), {
1623
1623
  dynamic: !0,
1624
- encoded: ge([ue(k(r, { size: 32 })), a])
1624
+ encoded: ge([te(O(r, { size: 32 })), a])
1625
1625
  };
1626
1626
  }
1627
1627
  if (r !== Number.parseInt(n))
@@ -1629,17 +1629,17 @@ function eu(e, { param: t }) {
1629
1629
  expectedSize: Number.parseInt(n),
1630
1630
  value: e
1631
1631
  });
1632
- return { dynamic: !1, encoded: ue(e, { dir: "right" }) };
1632
+ return { dynamic: !1, encoded: te(e, { dir: "right" }) };
1633
1633
  }
1634
1634
  function tu(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: ue(Ha(e)) };
1637
+ return { dynamic: !1, encoded: te(Ha(e)) };
1638
1638
  }
1639
1639
  function nu(e, { signed: t }) {
1640
1640
  return {
1641
1641
  dynamic: !1,
1642
- encoded: k(e, {
1642
+ encoded: O(e, {
1643
1643
  size: 32,
1644
1644
  signed: t
1645
1645
  })
@@ -1648,13 +1648,13 @@ function nu(e, { signed: t }) {
1648
1648
  function ru(e) {
1649
1649
  const t = ar(e), n = Math.ceil(H(t) / 32), r = [];
1650
1650
  for (let a = 0; a < n; a++)
1651
- r.push(ue(Zt(t, a * 32, (a + 1) * 32), {
1651
+ r.push(te(Zt(t, a * 32, (a + 1) * 32), {
1652
1652
  dir: "right"
1653
1653
  }));
1654
1654
  return {
1655
1655
  dynamic: !0,
1656
1656
  encoded: ge([
1657
- ue(k(H(t), { size: 32 })),
1657
+ te(O(H(t), { size: 32 })),
1658
1658
  ...r
1659
1659
  ])
1660
1660
  };
@@ -1683,7 +1683,7 @@ function pr(e) {
1683
1683
  }
1684
1684
  const yr = (e) => Zt(Za(e), 0, 4);
1685
1685
  function Ot(e) {
1686
- const { abi: t, args: n = [], name: r } = e, a = ce(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);
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;
1689
1689
  if (s.length === 1)
@@ -1723,7 +1723,7 @@ function Rn(e, t) {
1723
1723
  const n = typeof e, r = t.type;
1724
1724
  switch (r) {
1725
1725
  case "address":
1726
- return ie(e, { strict: !1 });
1726
+ return oe(e, { strict: !1 });
1727
1727
  case "bool":
1728
1728
  return n === "boolean";
1729
1729
  case "function":
@@ -1744,7 +1744,7 @@ function Qa(e, t, n) {
1744
1744
  if (a.type === "tuple" && s.type === "tuple" && "components" in a && "components" in s)
1745
1745
  return Qa(a.components, s.components, n[r]);
1746
1746
  const i = [a.type, s.type];
1747
- if (i.includes("address") && i.includes("bytes20") ? !0 : i.includes("address") && i.includes("string") ? ie(n[r], { strict: !1 }) : i.includes("address") && i.includes("bytes") ? ie(n[r], { strict: !1 }) : !1)
1747
+ if (i.includes("address") && i.includes("bytes20") ? !0 : i.includes("address") && i.includes("string") ? oe(n[r], { strict: !1 }) : i.includes("address") && i.includes("bytes") ? oe(n[r], { strict: !1 }) : !1)
1748
1748
  return i;
1749
1749
  }
1750
1750
  }
@@ -1795,8 +1795,8 @@ async function fr(e, t) {
1795
1795
  params: [
1796
1796
  {
1797
1797
  address: n,
1798
- fromBlock: typeof i == "bigint" ? k(i) : i,
1799
- toBlock: typeof u == "bigint" ? k(u) : u,
1798
+ fromBlock: typeof i == "bigint" ? O(i) : i,
1799
+ toBlock: typeof u == "bigint" ? O(u) : u,
1800
1800
  topics: l
1801
1801
  }
1802
1802
  ]
@@ -1811,7 +1811,7 @@ async function fr(e, t) {
1811
1811
  type: "event"
1812
1812
  };
1813
1813
  }
1814
- function ne(e) {
1814
+ function re(e) {
1815
1815
  return typeof e == "string" ? { address: e, type: "json-rpc" } : e;
1816
1816
  }
1817
1817
  const ea = "/docs/contract/encodeFunctionData";
@@ -2028,24 +2028,24 @@ function ns(e, { recursiveReadLimit: t = 8192 } = {}) {
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
2030
  function du(e, t = {}) {
2031
- typeof t.size < "u" && le(e, { size: t.size });
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
2035
  function lu(e, t = {}) {
2036
2036
  let n = e;
2037
- if (typeof t.size < "u" && (le(n, { size: t.size }), n = tn(n)), n.length > 1 || n[0] > 1)
2037
+ if (typeof t.size < "u" && (pe(n, { size: t.size }), n = tn(n)), n.length > 1 || n[0] > 1)
2038
2038
  throw new fo(n);
2039
2039
  return !!n[0];
2040
2040
  }
2041
2041
  function be(e, t = {}) {
2042
- typeof t.size < "u" && le(e, { size: t.size });
2042
+ typeof t.size < "u" && pe(e, { size: t.size });
2043
2043
  const n = q(e, t);
2044
2044
  return Ae(n, t);
2045
2045
  }
2046
2046
  function pu(e, t = {}) {
2047
2047
  let n = e;
2048
- return typeof t.size < "u" && (le(n, { size: t.size }), n = tn(n, { dir: "right" })), new TextDecoder().decode(n);
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
2051
  const n = typeof t == "string" ? He(t) : t, r = ns(n);
@@ -2100,7 +2100,7 @@ function fu(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);
2103
- const c = be(e.readBytes(na)), l = bt(t);
2103
+ const c = be(e.readBytes(na)), l = mt(t);
2104
2104
  let d = 0;
2105
2105
  const p = [];
2106
2106
  for (let m = 0; m < c; ++m) {
@@ -2112,7 +2112,7 @@ function fu(e, t, { length: n, staticPosition: r }) {
2112
2112
  }
2113
2113
  return e.setPosition(r + 32), [p, 32];
2114
2114
  }
2115
- if (bt(t)) {
2115
+ if (mt(t)) {
2116
2116
  const i = be(e.readBytes(Fn)), o = r + i, u = [];
2117
2117
  for (let c = 0; c < n; ++c) {
2118
2118
  e.setPosition(o + c * 32);
@@ -2159,7 +2159,7 @@ function hu(e, t) {
2159
2159
  function gu(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
- if (bt(t)) {
2162
+ if (mt(t)) {
2163
2163
  const i = be(e.readBytes(Fn)), o = n + i;
2164
2164
  for (let u = 0; u < t.components.length; ++u) {
2165
2165
  const c = t.components[u];
@@ -2188,15 +2188,15 @@ function wu(e, { staticPosition: t }) {
2188
2188
  const s = e.readBytes(a, 32), i = pu(tn(s));
2189
2189
  return e.setPosition(t + 32), [i, 32];
2190
2190
  }
2191
- function bt(e) {
2191
+ function mt(e) {
2192
2192
  var r;
2193
2193
  const { type: t } = e;
2194
2194
  if (t === "string" || t === "bytes" || t.endsWith("[]"))
2195
2195
  return !0;
2196
2196
  if (t === "tuple")
2197
- return (r = e.components) == null ? void 0 : r.some(bt);
2197
+ return (r = e.components) == null ? void 0 : r.some(mt);
2198
2198
  const n = pr(e.type);
2199
- return !!(n && bt({ ...e, type: n[1] }));
2199
+ return !!(n && mt({ ...e, type: n[1] }));
2200
2200
  }
2201
2201
  function Tu(e) {
2202
2202
  const { abi: t, data: n } = e, r = Zt(n, 0, 4);
@@ -2391,7 +2391,7 @@ class aa extends v {
2391
2391
  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
- const f = n ? ne(n) : void 0;
2394
+ const f = n ? re(n) : void 0;
2395
2395
  let y = Ft({
2396
2396
  from: f == null ? void 0 : f.address,
2397
2397
  to: d,
@@ -2605,7 +2605,7 @@ class br extends v {
2605
2605
  }), this.data = t;
2606
2606
  }
2607
2607
  }
2608
- class ft extends v {
2608
+ class yt extends v {
2609
2609
  constructor({ body: t, details: n, headers: r, status: a, url: s }) {
2610
2610
  super("HTTP request failed.", {
2611
2611
  details: n,
@@ -2694,7 +2694,7 @@ class Y extends v {
2694
2694
  }), this.name = t.name, this.code = t instanceof us ? t.code : n ?? ku;
2695
2695
  }
2696
2696
  }
2697
- class st extends Y {
2697
+ class at extends Y {
2698
2698
  constructor(t, n) {
2699
2699
  super(t, n), Object.defineProperty(this, "name", {
2700
2700
  enumerable: !0,
@@ -2709,10 +2709,10 @@ class st extends Y {
2709
2709
  }), this.data = n.data;
2710
2710
  }
2711
2711
  }
2712
- class ht extends Y {
2712
+ class bt extends Y {
2713
2713
  constructor(t) {
2714
2714
  super(t, {
2715
- code: ht.code,
2715
+ code: bt.code,
2716
2716
  shortMessage: "Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."
2717
2717
  }), Object.defineProperty(this, "name", {
2718
2718
  enumerable: !0,
@@ -2722,16 +2722,16 @@ class ht extends Y {
2722
2722
  });
2723
2723
  }
2724
2724
  }
2725
- Object.defineProperty(ht, "code", {
2725
+ Object.defineProperty(bt, "code", {
2726
2726
  enumerable: !0,
2727
2727
  configurable: !0,
2728
2728
  writable: !0,
2729
2729
  value: -32700
2730
2730
  });
2731
- class gt extends Y {
2731
+ class ht extends Y {
2732
2732
  constructor(t) {
2733
2733
  super(t, {
2734
- code: gt.code,
2734
+ code: ht.code,
2735
2735
  shortMessage: "JSON is not a valid request object."
2736
2736
  }), Object.defineProperty(this, "name", {
2737
2737
  enumerable: !0,
@@ -2741,16 +2741,16 @@ class gt extends Y {
2741
2741
  });
2742
2742
  }
2743
2743
  }
2744
- Object.defineProperty(gt, "code", {
2744
+ Object.defineProperty(ht, "code", {
2745
2745
  enumerable: !0,
2746
2746
  configurable: !0,
2747
2747
  writable: !0,
2748
2748
  value: -32600
2749
2749
  });
2750
- class wt extends Y {
2750
+ class gt extends Y {
2751
2751
  constructor(t) {
2752
2752
  super(t, {
2753
- code: wt.code,
2753
+ code: gt.code,
2754
2754
  shortMessage: "The method does not exist / is not available."
2755
2755
  }), Object.defineProperty(this, "name", {
2756
2756
  enumerable: !0,
@@ -2760,16 +2760,16 @@ class wt extends Y {
2760
2760
  });
2761
2761
  }
2762
2762
  }
2763
- Object.defineProperty(wt, "code", {
2763
+ Object.defineProperty(gt, "code", {
2764
2764
  enumerable: !0,
2765
2765
  configurable: !0,
2766
2766
  writable: !0,
2767
2767
  value: -32601
2768
2768
  });
2769
- class Tt extends Y {
2769
+ class wt extends Y {
2770
2770
  constructor(t) {
2771
2771
  super(t, {
2772
- code: Tt.code,
2772
+ code: wt.code,
2773
2773
  shortMessage: [
2774
2774
  "Invalid parameters were provided to the RPC method.",
2775
2775
  "Double check you have provided the correct parameters."
@@ -2783,7 +2783,7 @@ class Tt extends Y {
2783
2783
  });
2784
2784
  }
2785
2785
  }
2786
- Object.defineProperty(Tt, "code", {
2786
+ Object.defineProperty(wt, "code", {
2787
2787
  enumerable: !0,
2788
2788
  configurable: !0,
2789
2789
  writable: !0,
@@ -2831,10 +2831,10 @@ Object.defineProperty(_e, "code", {
2831
2831
  writable: !0,
2832
2832
  value: -32e3
2833
2833
  });
2834
- class vt extends Y {
2834
+ class Tt extends Y {
2835
2835
  constructor(t) {
2836
2836
  super(t, {
2837
- code: vt.code,
2837
+ code: Tt.code,
2838
2838
  shortMessage: "Requested resource not found."
2839
2839
  }), Object.defineProperty(this, "name", {
2840
2840
  enumerable: !0,
@@ -2844,16 +2844,16 @@ class vt extends Y {
2844
2844
  });
2845
2845
  }
2846
2846
  }
2847
- Object.defineProperty(vt, "code", {
2847
+ Object.defineProperty(Tt, "code", {
2848
2848
  enumerable: !0,
2849
2849
  configurable: !0,
2850
2850
  writable: !0,
2851
2851
  value: -32001
2852
2852
  });
2853
- class xt extends Y {
2853
+ class vt extends Y {
2854
2854
  constructor(t) {
2855
2855
  super(t, {
2856
- code: xt.code,
2856
+ code: vt.code,
2857
2857
  shortMessage: "Requested resource not available."
2858
2858
  }), Object.defineProperty(this, "name", {
2859
2859
  enumerable: !0,
@@ -2863,7 +2863,7 @@ class xt extends Y {
2863
2863
  });
2864
2864
  }
2865
2865
  }
2866
- Object.defineProperty(xt, "code", {
2866
+ Object.defineProperty(vt, "code", {
2867
2867
  enumerable: !0,
2868
2868
  configurable: !0,
2869
2869
  writable: !0,
@@ -2888,10 +2888,10 @@ Object.defineProperty(Xe, "code", {
2888
2888
  writable: !0,
2889
2889
  value: -32003
2890
2890
  });
2891
- class Et extends Y {
2891
+ class xt extends Y {
2892
2892
  constructor(t) {
2893
2893
  super(t, {
2894
- code: Et.code,
2894
+ code: xt.code,
2895
2895
  shortMessage: "Method is not implemented."
2896
2896
  }), Object.defineProperty(this, "name", {
2897
2897
  enumerable: !0,
@@ -2901,7 +2901,7 @@ class Et extends Y {
2901
2901
  });
2902
2902
  }
2903
2903
  }
2904
- Object.defineProperty(Et, "code", {
2904
+ Object.defineProperty(xt, "code", {
2905
2905
  enumerable: !0,
2906
2906
  configurable: !0,
2907
2907
  writable: !0,
@@ -2926,10 +2926,10 @@ Object.defineProperty(Qe, "code", {
2926
2926
  writable: !0,
2927
2927
  value: -32005
2928
2928
  });
2929
- class Pt extends Y {
2929
+ class Et extends Y {
2930
2930
  constructor(t) {
2931
2931
  super(t, {
2932
- code: Pt.code,
2932
+ code: Et.code,
2933
2933
  shortMessage: "Version of JSON-RPC protocol is not supported."
2934
2934
  }), Object.defineProperty(this, "name", {
2935
2935
  enumerable: !0,
@@ -2939,16 +2939,16 @@ class Pt extends Y {
2939
2939
  });
2940
2940
  }
2941
2941
  }
2942
- Object.defineProperty(Pt, "code", {
2942
+ Object.defineProperty(Et, "code", {
2943
2943
  enumerable: !0,
2944
2944
  configurable: !0,
2945
2945
  writable: !0,
2946
2946
  value: -32006
2947
2947
  });
2948
- class Ue extends st {
2948
+ class je extends at {
2949
2949
  constructor(t) {
2950
2950
  super(t, {
2951
- code: Ue.code,
2951
+ code: je.code,
2952
2952
  shortMessage: "User rejected the request."
2953
2953
  }), Object.defineProperty(this, "name", {
2954
2954
  enumerable: !0,
@@ -2958,16 +2958,16 @@ class Ue extends st {
2958
2958
  });
2959
2959
  }
2960
2960
  }
2961
- Object.defineProperty(Ue, "code", {
2961
+ Object.defineProperty(je, "code", {
2962
2962
  enumerable: !0,
2963
2963
  configurable: !0,
2964
2964
  writable: !0,
2965
2965
  value: 4001
2966
2966
  });
2967
- class Ct extends st {
2967
+ class Pt extends at {
2968
2968
  constructor(t) {
2969
2969
  super(t, {
2970
- code: Ct.code,
2970
+ code: Pt.code,
2971
2971
  shortMessage: "The requested method and/or account has not been authorized by the user."
2972
2972
  }), Object.defineProperty(this, "name", {
2973
2973
  enumerable: !0,
@@ -2977,16 +2977,16 @@ class Ct extends st {
2977
2977
  });
2978
2978
  }
2979
2979
  }
2980
- Object.defineProperty(Ct, "code", {
2980
+ Object.defineProperty(Pt, "code", {
2981
2981
  enumerable: !0,
2982
2982
  configurable: !0,
2983
2983
  writable: !0,
2984
2984
  value: 4100
2985
2985
  });
2986
- class At extends st {
2986
+ class Ct extends at {
2987
2987
  constructor(t) {
2988
2988
  super(t, {
2989
- code: At.code,
2989
+ code: Ct.code,
2990
2990
  shortMessage: "The Provider does not support the requested method."
2991
2991
  }), Object.defineProperty(this, "name", {
2992
2992
  enumerable: !0,
@@ -2996,16 +2996,16 @@ class At extends st {
2996
2996
  });
2997
2997
  }
2998
2998
  }
2999
- Object.defineProperty(At, "code", {
2999
+ Object.defineProperty(Ct, "code", {
3000
3000
  enumerable: !0,
3001
3001
  configurable: !0,
3002
3002
  writable: !0,
3003
3003
  value: 4200
3004
3004
  });
3005
- class It extends st {
3005
+ class At extends at {
3006
3006
  constructor(t) {
3007
3007
  super(t, {
3008
- code: It.code,
3008
+ code: At.code,
3009
3009
  shortMessage: "The Provider is disconnected from all chains."
3010
3010
  }), Object.defineProperty(this, "name", {
3011
3011
  enumerable: !0,
@@ -3015,16 +3015,16 @@ class It extends st {
3015
3015
  });
3016
3016
  }
3017
3017
  }
3018
- Object.defineProperty(It, "code", {
3018
+ Object.defineProperty(At, "code", {
3019
3019
  enumerable: !0,
3020
3020
  configurable: !0,
3021
3021
  writable: !0,
3022
3022
  value: 4900
3023
3023
  });
3024
- class Mt extends st {
3024
+ class It extends at {
3025
3025
  constructor(t) {
3026
3026
  super(t, {
3027
- code: Mt.code,
3027
+ code: It.code,
3028
3028
  shortMessage: "The Provider is not connected to the requested chain."
3029
3029
  }), Object.defineProperty(this, "name", {
3030
3030
  enumerable: !0,
@@ -3034,16 +3034,16 @@ class Mt extends st {
3034
3034
  });
3035
3035
  }
3036
3036
  }
3037
- Object.defineProperty(Mt, "code", {
3037
+ Object.defineProperty(It, "code", {
3038
3038
  enumerable: !0,
3039
3039
  configurable: !0,
3040
3040
  writable: !0,
3041
3041
  value: 4901
3042
3042
  });
3043
- class St extends st {
3043
+ class Mt extends at {
3044
3044
  constructor(t) {
3045
3045
  super(t, {
3046
- code: St.code,
3046
+ code: Mt.code,
3047
3047
  shortMessage: "An error occurred when attempting to switch chain."
3048
3048
  }), Object.defineProperty(this, "name", {
3049
3049
  enumerable: !0,
@@ -3053,7 +3053,7 @@ class St extends st {
3053
3053
  });
3054
3054
  }
3055
3055
  }
3056
- Object.defineProperty(St, "code", {
3056
+ Object.defineProperty(Mt, "code", {
3057
3057
  enumerable: !0,
3058
3058
  configurable: !0,
3059
3059
  writable: !0,
@@ -3072,7 +3072,7 @@ class Ou extends Y {
3072
3072
  }
3073
3073
  }
3074
3074
  const Ru = 3;
3075
- function Bt(e, { abi: t, address: n, args: r, docsPath: a, functionName: s, sender: i }) {
3075
+ function St(e, { abi: t, address: n, args: r, docsPath: a, functionName: s, sender: i }) {
3076
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({
3077
3077
  abi: t,
3078
3078
  data: typeof u == "object" ? u.data : u,
@@ -3185,7 +3185,7 @@ Object.defineProperty(Dn, "nodeMessage", {
3185
3185
  writable: !0,
3186
3186
  value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/
3187
3187
  });
3188
- class jn extends v {
3188
+ class Un extends v {
3189
3189
  constructor({ cause: t, nonce: n } = {}) {
3190
3190
  super(`Nonce provided for the transaction ${n ? `(${n}) ` : ""}is higher than the next one expected.`, { cause: t }), Object.defineProperty(this, "name", {
3191
3191
  enumerable: !0,
@@ -3195,13 +3195,13 @@ class jn extends v {
3195
3195
  });
3196
3196
  }
3197
3197
  }
3198
- Object.defineProperty(jn, "nodeMessage", {
3198
+ Object.defineProperty(Un, "nodeMessage", {
3199
3199
  enumerable: !0,
3200
3200
  configurable: !0,
3201
3201
  writable: !0,
3202
3202
  value: /nonce too high/
3203
3203
  });
3204
- class Un extends v {
3204
+ class jn 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,7 +3215,7 @@ class Un extends v {
3215
3215
  });
3216
3216
  }
3217
3217
  }
3218
- Object.defineProperty(Un, "nodeMessage", {
3218
+ Object.defineProperty(jn, "nodeMessage", {
3219
3219
  enumerable: !0,
3220
3220
  configurable: !0,
3221
3221
  writable: !0,
@@ -3369,7 +3369,7 @@ function hr(e, t) {
3369
3369
  }) : Dn.nodeMessage.test(n) ? new Dn({
3370
3370
  cause: e,
3371
3371
  maxFeePerGas: t == null ? void 0 : t.maxFeePerGas
3372
- }) : jn.nodeMessage.test(n) ? new jn({ cause: e, nonce: t == null ? void 0 : t.nonce }) : Un.nodeMessage.test(n) ? new Un({ 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 }) : 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({
3373
3373
  cause: e,
3374
3374
  maxFeePerGas: t == null ? void 0 : t.maxFeePerGas,
3375
3375
  maxPriorityFeePerGas: t == null ? void 0 : t.maxPriorityFeePerGas
@@ -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 = k(e.gas)), typeof e.gasPrice < "u" && (t.gasPrice = k(e.gasPrice)), typeof e.maxFeePerBlobGas < "u" && (t.maxFeePerBlobGas = k(e.maxFeePerBlobGas)), typeof e.maxFeePerGas < "u" && (t.maxFeePerGas = k(e.maxFeePerGas)), typeof e.maxPriorityFeePerGas < "u" && (t.maxPriorityFeePerGas = k(e.maxPriorityFeePerGas)), typeof e.nonce < "u" && (t.nonce = k(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 = k(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 = Du[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,9 +3427,9 @@ function ia(e) {
3427
3427
  return t[n] = r, t;
3428
3428
  }, {});
3429
3429
  }
3430
- function ju(e) {
3430
+ function Uu(e) {
3431
3431
  const { balance: t, nonce: n, state: r, stateDiff: a, code: s } = e, i = {};
3432
- if (s !== void 0 && (i.code = s), t !== void 0 && (i.balance = k(t)), n !== void 0 && (i.nonce = k(n)), r !== void 0 && (i.state = ia(r)), a !== void 0) {
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
3434
  throw new Pu();
3435
3435
  i.stateDiff = ia(a);
@@ -3441,19 +3441,19 @@ function cs(e) {
3441
3441
  return;
3442
3442
  const t = {};
3443
3443
  for (const { address: n, ...r } of e) {
3444
- if (!ie(n, { strict: !1 }))
3444
+ if (!oe(n, { strict: !1 }))
3445
3445
  throw new Me({ address: n });
3446
3446
  if (t[n])
3447
3447
  throw new Eu({ address: n });
3448
- t[n] = ju(r);
3448
+ t[n] = Uu(r);
3449
3449
  }
3450
3450
  return t;
3451
3451
  }
3452
3452
  function Nt(e) {
3453
- const { account: t, gasPrice: n, maxFeePerGas: r, maxPriorityFeePerGas: a, to: s } = e, i = t ? ne(t) : void 0;
3454
- if (i && !ie(i.address))
3453
+ const { account: t, gasPrice: n, maxFeePerGas: r, maxPriorityFeePerGas: a, to: s } = e, i = t ? re(t) : void 0;
3454
+ if (i && !oe(i.address))
3455
3455
  throw new Me({ address: i.address });
3456
- if (s && !ie(s))
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
3459
  throw new Au();
@@ -3462,7 +3462,7 @@ function Nt(e) {
3462
3462
  if (a && r && a > r)
3463
3463
  throw new Yt({ maxFeePerGas: r, maxPriorityFeePerGas: a });
3464
3464
  }
3465
- class Uu extends v {
3465
+ class ju extends v {
3466
3466
  constructor() {
3467
3467
  super("`baseFeeMultiplier` must be greater than 1."), Object.defineProperty(this, "name", {
3468
3468
  enumerable: !0,
@@ -3564,7 +3564,7 @@ function ys(e) {
3564
3564
  }
3565
3565
  async function Se(e, { blockHash: t, blockNumber: n, blockTag: r, includeTransactions: a } = {}) {
3566
3566
  var l, d, p;
3567
- const s = r ?? "latest", i = a ?? !1, o = n !== void 0 ? k(n) : void 0;
3567
+ const s = r ?? "latest", i = a ?? !1, o = n !== void 0 ? O(n) : void 0;
3568
3568
  let u = null;
3569
3569
  if (t ? u = await e.request({
3570
3570
  method: "eth_getBlockByHash",
@@ -3628,7 +3628,7 @@ async function Gn(e, t) {
3628
3628
  }) : ((y = r == null ? void 0 : r.fees) == null ? void 0 : y.baseFeeMultiplier) ?? 1.2;
3629
3629
  })();
3630
3630
  if (i < 1)
3631
- throw new Uu();
3631
+ throw new ju();
3632
3632
  const u = 10 ** (((p = i.toString().split(".")[1]) == null ? void 0 : p.length) ?? 0), c = (f) => f * BigInt(Math.ceil(i * u)) / BigInt(u), l = n || await S(e, Se, "getBlock")({});
3633
3633
  if (typeof ((m = r == null ? void 0 : r.fees) == null ? void 0 : m.estimateFeesPerGas) == "function") {
3634
3634
  const f = await r.fees.estimateFeesPerGas({
@@ -3661,7 +3661,7 @@ async function Gn(e, t) {
3661
3661
  async function ms(e, { address: t, blockTag: n = "latest", blockNumber: r }) {
3662
3662
  const a = await e.request({
3663
3663
  method: "eth_getTransactionCount",
3664
- params: [t, r ? k(r) : n]
3664
+ params: [t, r ? O(r) : n]
3665
3665
  });
3666
3666
  return Ae(a);
3667
3667
  }
@@ -3826,12 +3826,12 @@ class Zu extends qu {
3826
3826
  for (let d = 0; d < 16; d++, n += 4)
3827
3827
  Pe[d] = t.getUint32(n, !1);
3828
3828
  for (let d = 16; d < 64; d++) {
3829
- const p = Pe[d - 15], m = Pe[d - 2], f = oe(p, 7) ^ oe(p, 18) ^ p >>> 3, y = oe(m, 17) ^ oe(m, 19) ^ m >>> 10;
3829
+ const p = Pe[d - 15], m = Pe[d - 2], f = ue(p, 7) ^ ue(p, 18) ^ p >>> 3, y = ue(m, 17) ^ ue(m, 19) ^ m >>> 10;
3830
3830
  Pe[d] = y + Pe[d - 7] + f + Pe[d - 16] | 0;
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 = oe(o, 6) ^ oe(o, 11) ^ oe(o, 25), m = l + p + Gu(o, u, c) + Vu[d] + Pe[d] | 0, y = (oe(r, 2) ^ oe(r, 13) ^ oe(r, 22)) + Wu(r, a, s) | 0;
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;
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);
@@ -3845,7 +3845,7 @@ class Zu extends qu {
3845
3845
  }
3846
3846
  const gs = /* @__PURE__ */ qa(() => new Zu());
3847
3847
  function Ku(e, t) {
3848
- return gs(ce(e, { strict: !1 }) ? Ie(e) : e);
3848
+ return gs(de(e, { strict: !1 }) ? Ie(e) : e);
3849
3849
  }
3850
3850
  function Yu(e) {
3851
3851
  const { commitment: t, version: n = 1 } = e, r = e.to ?? (typeof t == "string" ? "hex" : "bytes"), a = Ku(t);
@@ -3948,7 +3948,7 @@ const vs = [
3948
3948
  "type"
3949
3949
  ];
3950
3950
  async function cn(e, t) {
3951
- const { account: n = e.account, blobs: r, chain: a, chainId: s, gas: i, kzg: o, nonce: u, parameters: c = vs, type: l } = t, d = n ? ne(n) : void 0, p = { ...t, ...d ? { from: d == null ? void 0 : d.address } : {} };
3951
+ const { account: n = e.account, blobs: r, chain: a, chainId: s, gas: i, kzg: o, nonce: u, parameters: c = vs, type: l } = t, d = n ? re(n) : void 0, p = { ...t, ...d ? { from: d == null ? void 0 : d.address } : {} };
3952
3952
  let m;
3953
3953
  async function f() {
3954
3954
  return m || (m = await S(e, Se, "getBlock")({ blockTag: "latest" }), m);
@@ -4014,7 +4014,7 @@ async function cn(e, t) {
4014
4014
  }
4015
4015
  async function xr(e, t) {
4016
4016
  var a, s, i;
4017
- const n = t.account ?? e.account, r = n ? ne(n) : void 0;
4017
+ const n = t.account ?? e.account, r = n ? re(n) : void 0;
4018
4018
  try {
4019
4019
  const { accessList: o, blobs: u, blobVersionedHashes: c, blockNumber: l, blockTag: d, data: p, gas: m, gasPrice: f, maxFeePerBlobGas: y, maxFeePerGas: b, maxPriorityFeePerGas: h, nonce: g, to: w, value: x, stateOverride: P, ...T } = await cn(e, {
4020
4020
  ...t,
@@ -4023,7 +4023,7 @@ async function xr(e, t) {
4023
4023
  // to compute them.
4024
4024
  (r == null ? void 0 : r.type) === "local" ? void 0 : ["blobVersionedHashes"]
4025
4025
  )
4026
- }), E = (l ? k(l) : void 0) || d, M = cs(P);
4026
+ }), E = (l ? O(l) : void 0) || d, M = cs(P);
4027
4027
  Nt(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.
@@ -4067,8 +4067,8 @@ async function xs(e, t) {
4067
4067
  ...i
4068
4068
  });
4069
4069
  } catch (u) {
4070
- const c = i.account ? ne(i.account) : void 0;
4071
- throw Bt(u, {
4070
+ const c = i.account ? re(i.account) : void 0;
4071
+ throw St(u, {
4072
4072
  abi: n,
4073
4073
  address: r,
4074
4074
  args: a,
@@ -4085,7 +4085,7 @@ function Er(e) {
4085
4085
  throw new no({ 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
- throw new ja(i, { docsPath: ca });
4088
+ throw new Ua(i, { docsPath: ca });
4089
4089
  const { name: c, inputs: l } = u, d = l == null ? void 0 : l.some((y) => !("name" in y && y.name));
4090
4090
  let p = d ? [] : {};
4091
4091
  const m = l.filter((y) => "indexed" in y && y.indexed);
@@ -4111,7 +4111,7 @@ function Er(e) {
4111
4111
  p[f[b].name] = y[b];
4112
4112
  } catch (y) {
4113
4113
  if (s)
4114
- throw y instanceof Na || y instanceof ts ? new mt({
4114
+ throw y instanceof Na || y instanceof ts ? new ft({
4115
4115
  abiItem: u,
4116
4116
  data: n,
4117
4117
  params: f,
@@ -4119,7 +4119,7 @@ function Er(e) {
4119
4119
  }) : y;
4120
4120
  }
4121
4121
  else if (s)
4122
- throw new mt({
4122
+ throw new ft({
4123
4123
  abiItem: u,
4124
4124
  data: "0x",
4125
4125
  params: f,
@@ -4146,9 +4146,9 @@ function Pr({ abi: e, eventName: t, logs: n, strict: r = !0 }) {
4146
4146
  return t && !t.includes(i.eventName) ? null : { ...i, ...a };
4147
4147
  } catch (i) {
4148
4148
  let o, u;
4149
- if (i instanceof ja)
4149
+ if (i instanceof Ua)
4150
4150
  return null;
4151
- if (i instanceof mt || i instanceof en) {
4151
+ if (i instanceof ft || i instanceof en) {
4152
4152
  if (r)
4153
4153
  return null;
4154
4154
  o = i.abiItem.name, u = (s = i.abiItem.inputs) == null ? void 0 : s.some((c) => !("name" in c && c.name));
@@ -4188,8 +4188,8 @@ async function Cr(e, { address: t, blockHash: n, fromBlock: r, toBlock: a, event
4188
4188
  {
4189
4189
  address: t,
4190
4190
  topics: d,
4191
- fromBlock: typeof r == "bigint" ? k(r) : r,
4192
- toBlock: typeof a == "bigint" ? k(a) : a
4191
+ fromBlock: typeof r == "bigint" ? O(r) : r,
4192
+ toBlock: typeof a == "bigint" ? O(a) : a
4193
4193
  }
4194
4194
  ]
4195
4195
  });
@@ -4214,7 +4214,7 @@ async function Ar(e, t) {
4214
4214
  });
4215
4215
  }
4216
4216
  const Pn = "/docs/contract/decodeFunctionResult";
4217
- function it(e) {
4217
+ 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) {
@@ -4504,7 +4504,7 @@ function Ir(e) {
4504
4504
  const s = kt(a.inputs, n);
4505
4505
  return cr([r, s]);
4506
4506
  }
4507
- function ot({ blockNumber: e, chain: t, contract: n }) {
4507
+ function it({ blockNumber: e, chain: t, contract: n }) {
4508
4508
  var a;
4509
4509
  const r = (a = t == null ? void 0 : t.contracts) == null ? void 0 : a[n];
4510
4510
  if (!r)
@@ -4566,10 +4566,10 @@ 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 ? ne(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 ? fc({ data: u, factory: c, factoryData: l, to: h }) : u;
4570
4570
  try {
4571
4571
  Nt(t);
4572
- const F = (a ? k(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)({
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 }),
4575
4575
  from: P == null ? void 0 : P.address,
@@ -4596,7 +4596,7 @@ async function dn(e, t) {
4596
4596
  if (!(D instanceof Cs) && !(D instanceof Vn))
4597
4597
  throw D;
4598
4598
  }
4599
- const j = await e.request({
4599
+ const U = await e.request({
4600
4600
  method: "eth_call",
4601
4601
  params: G ? [
4602
4602
  R,
@@ -4604,9 +4604,9 @@ async function dn(e, t) {
4604
4604
  G
4605
4605
  ] : [R, F]
4606
4606
  });
4607
- return j === "0x" ? { data: void 0 } : { data: j };
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-CzWPognK.js");
4609
+ const F = mc(N), { offchainLookup: G, offchainLookupSignature: A } = await import("./ccip-D9sqjqG8.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
4612
  throw T && (F == null ? void 0 : F.slice(0, 10)) === "0x101bb98d" ? new $u({ factory: c }) : lc(N, {
@@ -4627,13 +4627,13 @@ async function yc(e, t) {
4627
4627
  if (!c) {
4628
4628
  if (!e.chain)
4629
4629
  throw new Cs();
4630
- c = ot({
4630
+ c = it({
4631
4631
  blockNumber: a,
4632
4632
  chain: e.chain,
4633
4633
  contract: "multicall3"
4634
4634
  });
4635
4635
  }
4636
- const d = (a ? k(a) : void 0) || s, { schedule: p } = As({
4636
+ const d = (a ? O(a) : void 0) || s, { schedule: p } = As({
4637
4637
  id: `${e.uid}.${d}`,
4638
4638
  wait: r,
4639
4639
  shouldSplitBatch(b) {
@@ -4658,7 +4658,7 @@ async function yc(e, t) {
4658
4658
  d
4659
4659
  ]
4660
4660
  });
4661
- return it({
4661
+ return st({
4662
4662
  abi: Wn,
4663
4663
  args: [h],
4664
4664
  functionName: "aggregate3",
@@ -4688,7 +4688,7 @@ function mc(e) {
4688
4688
  const t = e.walk();
4689
4689
  return typeof (t == null ? void 0 : t.data) == "object" ? (n = t.data) == null ? void 0 : n.data : t.data;
4690
4690
  }
4691
- async function de(e, t) {
4691
+ async function le(e, t) {
4692
4692
  const { abi: n, address: r, args: a, functionName: s, ...i } = t, o = Re({
4693
4693
  abi: n,
4694
4694
  args: a,
@@ -4700,14 +4700,14 @@ async function de(e, t) {
4700
4700
  data: o,
4701
4701
  to: r
4702
4702
  });
4703
- return it({
4703
+ return st({
4704
4704
  abi: n,
4705
4705
  args: a,
4706
4706
  functionName: s,
4707
4707
  data: u || "0x"
4708
4708
  });
4709
4709
  } catch (u) {
4710
- throw Bt(u, {
4710
+ throw St(u, {
4711
4711
  abi: n,
4712
4712
  address: r,
4713
4713
  args: a,
@@ -4717,7 +4717,7 @@ async function de(e, t) {
4717
4717
  }
4718
4718
  }
4719
4719
  async function Is(e, t) {
4720
- const { abi: n, address: r, args: a, dataSuffix: s, functionName: i, ...o } = t, u = o.account ? ne(o.account) : e.account, c = Re({ abi: n, args: a, functionName: i });
4720
+ const { abi: n, address: r, args: a, dataSuffix: s, functionName: i, ...o } = t, u = o.account ? re(o.account) : e.account, c = Re({ abi: n, args: a, functionName: i });
4721
4721
  try {
4722
4722
  const { data: l } = await S(e, dn, "call")({
4723
4723
  batch: !1,
@@ -4725,7 +4725,7 @@ async function Is(e, t) {
4725
4725
  to: r,
4726
4726
  ...o,
4727
4727
  account: u
4728
- }), d = it({
4728
+ }), d = st({
4729
4729
  abi: n,
4730
4730
  args: a,
4731
4731
  functionName: i,
@@ -4744,7 +4744,7 @@ async function Is(e, t) {
4744
4744
  }
4745
4745
  };
4746
4746
  } catch (l) {
4747
- throw Bt(l, {
4747
+ throw St(l, {
4748
4748
  abi: n,
4749
4749
  address: r,
4750
4750
  args: a,
@@ -4784,7 +4784,7 @@ function $e(e, t, n) {
4784
4784
  async function Jt(e) {
4785
4785
  return new Promise((t) => setTimeout(t, e));
4786
4786
  }
4787
- function jt(e, { emitOnBegin: t, initialWaitTime: n, interval: r }) {
4787
+ function Ut(e, { emitOnBegin: t, initialWaitTime: n, interval: r }) {
4788
4788
  let a = !0;
4789
4789
  const s = () => a = !1;
4790
4790
  return (async () => {
@@ -4827,7 +4827,7 @@ async function Tc(e, { cacheKey: t, cacheTime: n = Number.POSITIVE_INFINITY }) {
4827
4827
  }
4828
4828
  }
4829
4829
  const vc = (e) => `blockNumber.${e}`;
4830
- async function Ut(e, { cacheTime: t = e.cacheTime } = {}) {
4830
+ async function jt(e, { cacheTime: t = e.cacheTime } = {}) {
4831
4831
  const n = await Tc(() => e.request({
4832
4832
  method: "eth_blockNumber"
4833
4833
  }), { cacheKey: vc(e.uid), cacheTime: 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 = jt(async () => {
4874
+ const T = Ut(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, Ut, "getBlockNumber")({});
4896
+ const M = await S(e, jt, "getBlockNumber")({});
4897
4897
  w && w !== M ? E = await S(e, Ar, "getContractEvents")({
4898
4898
  abi: n,
4899
4899
  address: r,
@@ -4966,7 +4966,7 @@ function Ms(e, t) {
4966
4966
  x.onLogs([F]);
4967
4967
  } catch ($) {
4968
4968
  let N, F;
4969
- if ($ instanceof mt || $ instanceof en) {
4969
+ if ($ instanceof ft || $ instanceof en) {
4970
4970
  if (p)
4971
4971
  return;
4972
4972
  N = $.abiItem.name, F = (B = $.abiItem.inputs) == null ? void 0 : B.some((A) => !("name" in A && A.name));
@@ -5036,7 +5036,7 @@ async function Sr(e, t) {
5036
5036
  throw new yn({
5037
5037
  docsPath: "/docs/actions/wallet/sendTransaction"
5038
5038
  });
5039
- const b = ne(n);
5039
+ const b = re(n);
5040
5040
  try {
5041
5041
  Nt(t);
5042
5042
  let P;
@@ -5108,7 +5108,7 @@ async function Bs(e, t) {
5108
5108
  ...o
5109
5109
  });
5110
5110
  }
5111
- function ut({ abi: e, address: t, client: n }) {
5111
+ function ot({ abi: e, address: t, client: n }) {
5112
5112
  const r = n, [a, s] = r ? "public" in r && "wallet" in r ? [r.public, r.wallet] : "public" in r ? [r.public, void 0] : "wallet" in r ? [void 0, r.wallet] : [r, r] : [void 0, void 0], i = a != null, o = s != null, u = {};
5113
5113
  let c = !1, l = !1, d = !1;
5114
5114
  for (const p of e)
@@ -5118,7 +5118,7 @@ function ut({ abi: e, address: t, client: n }) {
5118
5118
  get(p, m) {
5119
5119
  return (...f) => {
5120
5120
  const { args: y, options: b } = zt(f);
5121
- return S(a, de, "readContract")({
5121
+ return S(a, le, "readContract")({
5122
5122
  abi: e,
5123
5123
  address: t,
5124
5124
  functionName: m,
@@ -5238,7 +5238,7 @@ class Ec extends v {
5238
5238
  async function Pc(e, t) {
5239
5239
  const { address: n, factory: r, factoryData: a } = t;
5240
5240
  try {
5241
- const [s, i, o, u, c, l, d] = await S(e, de, "readContract")({
5241
+ const [s, i, o, u, c, l, d] = await S(e, le, "readContract")({
5242
5242
  abi: Cc,
5243
5243
  address: n,
5244
5244
  functionName: "eip712Domain",
@@ -5284,7 +5284,7 @@ async function Ac(e, { chain: t }) {
5284
5284
  method: "wallet_addEthereumChain",
5285
5285
  params: [
5286
5286
  {
5287
- chainId: k(n),
5287
+ chainId: O(n),
5288
5288
  chainName: r,
5289
5289
  nativeCurrency: a,
5290
5290
  rpcUrls: s.default.http,
@@ -5304,7 +5304,7 @@ function Ic(e = 11) {
5304
5304
  return qt.substring(_t, _t++ + e);
5305
5305
  }
5306
5306
  function $s(e) {
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 ? ne(e.account) : void 0, { config: l, request: d, value: p } = e.transport({
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({
5308
5308
  chain: u,
5309
5309
  pollingInterval: i
5310
5310
  }), m = { ...l, ...p }, f = {
@@ -5363,32 +5363,34 @@ function Mc(e, t = {}) {
5363
5363
  } catch (i) {
5364
5364
  const o = i;
5365
5365
  switch (o.code) {
5366
+ case bt.code:
5367
+ throw new bt(o);
5366
5368
  case ht.code:
5367
5369
  throw new ht(o);
5368
5370
  case gt.code:
5369
5371
  throw new gt(o);
5370
5372
  case wt.code:
5371
5373
  throw new wt(o);
5372
- case Tt.code:
5373
- throw new Tt(o);
5374
5374
  case ze.code:
5375
5375
  throw new ze(o);
5376
5376
  case _e.code:
5377
5377
  throw new _e(o);
5378
+ case Tt.code:
5379
+ throw new Tt(o);
5378
5380
  case vt.code:
5379
5381
  throw new vt(o);
5380
- case xt.code:
5381
- throw new xt(o);
5382
5382
  case Xe.code:
5383
5383
  throw new Xe(o);
5384
- case Et.code:
5385
- throw new Et(o);
5384
+ case xt.code:
5385
+ throw new xt(o);
5386
5386
  case Qe.code:
5387
5387
  throw new Qe(o);
5388
+ case Et.code:
5389
+ throw new Et(o);
5390
+ case je.code:
5391
+ throw new je(o);
5388
5392
  case Pt.code:
5389
5393
  throw new Pt(o);
5390
- case Ue.code:
5391
- throw new Ue(o);
5392
5394
  case Ct.code:
5393
5395
  throw new Ct(o);
5394
5396
  case At.code:
@@ -5397,10 +5399,8 @@ function Mc(e, t = {}) {
5397
5399
  throw new It(o);
5398
5400
  case Mt.code:
5399
5401
  throw new Mt(o);
5400
- case St.code:
5401
- throw new St(o);
5402
5402
  case 5e3:
5403
- throw new Ue(o);
5403
+ throw new je(o);
5404
5404
  default:
5405
5405
  throw i instanceof v ? i : new Ou(o);
5406
5406
  }
@@ -5408,7 +5408,7 @@ function Mc(e, t = {}) {
5408
5408
  }, {
5409
5409
  delay: ({ count: i, error: o }) => {
5410
5410
  var u;
5411
- if (o && o instanceof ft) {
5411
+ if (o && o instanceof yt) {
5412
5412
  const c = (u = o == null ? void 0 : o.headers) == null ? void 0 : u.get("Retry-After");
5413
5413
  if (c != null && c.match(/\d/))
5414
5414
  return Number.parseInt(c) * 1e3;
@@ -5421,7 +5421,7 @@ function Mc(e, t = {}) {
5421
5421
  };
5422
5422
  }
5423
5423
  function Sc(e) {
5424
- return "code" in e && typeof e.code == "number" ? e.code === -1 || e.code === Qe.code || e.code === ze.code : e instanceof ft && 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;
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 {
@@ -5506,7 +5506,7 @@ function $c(e, t = {}) {
5506
5506
  };
5507
5507
  }
5508
5508
  function kc(e) {
5509
- return "code" in e && typeof e.code == "number" && (e.code === Xe.code || e.code === Ue.code || e.code === 5e3);
5509
+ return "code" in e && typeof e.code == "number" && (e.code === Xe.code || e.code === je.code || e.code === 5e3);
5510
5510
  }
5511
5511
  function Oc({ 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 () => {
@@ -5607,7 +5607,7 @@ function Dc(e, t = {}) {
5607
5607
  s && await s(p);
5608
5608
  let m;
5609
5609
  if ((d = p.headers.get("Content-Type")) != null && d.startsWith("application/json") ? m = await p.json() : (m = await p.text(), m = JSON.parse(m || "{}")), !p.ok)
5610
- throw new ft({
5610
+ throw new yt({
5611
5611
  body: r,
5612
5612
  details: W(m.error) || p.statusText,
5613
5613
  headers: p.headers,
@@ -5616,7 +5616,7 @@ function Dc(e, t = {}) {
5616
5616
  });
5617
5617
  return m;
5618
5618
  } catch (p) {
5619
- throw p instanceof ft || p instanceof sa ? p : new ft({
5619
+ throw p instanceof yt || p instanceof sa ? p : new yt({
5620
5620
  body: r,
5621
5621
  details: p.message,
5622
5622
  url: e
@@ -5685,7 +5685,7 @@ function ks(e) {
5685
5685
  if (e.length !== 66 || e.indexOf("[") !== 0 || e.indexOf("]") !== 65)
5686
5686
  return null;
5687
5687
  const t = `0x${e.slice(1, 65)}`;
5688
- return ce(t) ? t : null;
5688
+ return de(t) ? t : null;
5689
5689
  }
5690
5690
  function Gt(e) {
5691
5691
  let t = new Uint8Array(32).fill(0);
@@ -5698,10 +5698,10 @@ function Gt(e) {
5698
5698
  }
5699
5699
  return q(t);
5700
5700
  }
5701
- function jc(e) {
5701
+ function Uc(e) {
5702
5702
  return `[${e.slice(2)}]`;
5703
5703
  }
5704
- function Uc(e) {
5704
+ function jc(e) {
5705
5705
  const t = new Uint8Array(32).fill(0);
5706
5706
  return e ? ks(e) || Z(me(e)) : q(t);
5707
5707
  }
@@ -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(jc(Uc(a[s])))), n[r] = i.length, n.set(i, r + 1), r += i.length + 1;
5717
+ i.byteLength > 255 && (i = me(Uc(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
  }
@@ -5723,7 +5723,7 @@ async function Lc(e, { blockNumber: t, blockTag: n, coinType: r, name: a, gatewa
5723
5723
  if (!u) {
5724
5724
  if (!e.chain)
5725
5725
  throw new Error("client chain not configured. universalResolverAddress is required.");
5726
- u = ot({
5726
+ u = it({
5727
5727
  blockNumber: t,
5728
5728
  chain: e.chain,
5729
5729
  contract: "ensUniversalResolver"
@@ -5741,13 +5741,13 @@ async function Lc(e, { blockNumber: t, blockTag: n, coinType: r, name: a, gatewa
5741
5741
  args: [Oe(fn(a)), c],
5742
5742
  blockNumber: t,
5743
5743
  blockTag: n
5744
- }, d = S(e, de, "readContract"), p = s ? await d({
5744
+ }, d = S(e, le, "readContract"), p = s ? await d({
5745
5745
  ...l,
5746
5746
  args: [...l.args, s]
5747
5747
  }) : await d(l);
5748
5748
  if (p[0] === "0x")
5749
5749
  return null;
5750
- const m = it({
5750
+ const m = st({
5751
5751
  abi: la,
5752
5752
  args: r != null ? [Gt(a), BigInt(r)] : void 0,
5753
5753
  functionName: "addr",
@@ -5778,7 +5778,7 @@ class Hc extends v {
5778
5778
  });
5779
5779
  }
5780
5780
  }
5781
- class pt extends v {
5781
+ class lt extends v {
5782
5782
  constructor({ reason: t }) {
5783
5783
  super(`ENS NFT avatar URI is invalid. ${t}`), Object.defineProperty(this, "name", {
5784
5784
  enumerable: !0,
@@ -5888,17 +5888,17 @@ function Kc(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(":");
5890
5890
  if (!s || s.toLowerCase() !== "eip155")
5891
- throw new pt({ reason: "Only EIP-155 supported" });
5891
+ throw new lt({ reason: "Only EIP-155 supported" });
5892
5892
  if (!i)
5893
- throw new pt({ reason: "Chain ID not found" });
5893
+ throw new lt({ reason: "Chain ID not found" });
5894
5894
  if (!u)
5895
- throw new pt({
5895
+ throw new lt({
5896
5896
  reason: "Contract address not found"
5897
5897
  });
5898
5898
  if (!a)
5899
- throw new pt({ reason: "Token ID not found" });
5899
+ throw new lt({ reason: "Token ID not found" });
5900
5900
  if (!o)
5901
- throw new pt({ reason: "ERC namespace not found" });
5901
+ throw new lt({ reason: "ERC namespace not found" });
5902
5902
  return {
5903
5903
  chainID: Number.parseInt(i),
5904
5904
  namespace: o.toLowerCase(),
@@ -5908,7 +5908,7 @@ function Kc(e) {
5908
5908
  }
5909
5909
  async function Yc(e, { nft: t }) {
5910
5910
  if (t.namespace === "erc721")
5911
- return de(e, {
5911
+ return le(e, {
5912
5912
  address: t.contractAddress,
5913
5913
  abi: [
5914
5914
  {
@@ -5923,7 +5923,7 @@ async function Yc(e, { nft: t }) {
5923
5923
  args: [BigInt(t.tokenID)]
5924
5924
  });
5925
5925
  if (t.namespace === "erc1155")
5926
- return de(e, {
5926
+ return le(e, {
5927
5927
  address: t.contractAddress,
5928
5928
  abi: [
5929
5929
  {
@@ -5965,7 +5965,7 @@ async function Fs(e, { blockNumber: t, blockTag: n, name: r, key: a, gatewayUrls
5965
5965
  if (!u) {
5966
5966
  if (!e.chain)
5967
5967
  throw new Error("client chain not configured. universalResolverAddress is required.");
5968
- u = ot({
5968
+ u = it({
5969
5969
  blockNumber: t,
5970
5970
  chain: e.chain,
5971
5971
  contract: "ensUniversalResolver"
@@ -5986,13 +5986,13 @@ async function Fs(e, { blockNumber: t, blockTag: n, name: r, key: a, gatewayUrls
5986
5986
  ],
5987
5987
  blockNumber: t,
5988
5988
  blockTag: n
5989
- }, l = S(e, de, "readContract"), d = s ? await l({
5989
+ }, l = S(e, le, "readContract"), d = s ? await l({
5990
5990
  ...c,
5991
5991
  args: [...c.args, s]
5992
5992
  }) : await l(c);
5993
5993
  if (d[0] === "0x")
5994
5994
  return null;
5995
- const p = it({
5995
+ const p = st({
5996
5996
  abi: da,
5997
5997
  functionName: "text",
5998
5998
  data: d[0]
@@ -6032,7 +6032,7 @@ async function ed(e, { address: t, blockNumber: n, blockTag: r, gatewayUrls: a,
6032
6032
  if (!o) {
6033
6033
  if (!e.chain)
6034
6034
  throw new Error("client chain not configured. universalResolverAddress is required.");
6035
- o = ot({
6035
+ o = it({
6036
6036
  blockNumber: n,
6037
6037
  chain: e.chain,
6038
6038
  contract: "ensUniversalResolver"
@@ -6047,7 +6047,7 @@ async function ed(e, { address: t, blockNumber: n, blockTag: r, gatewayUrls: a,
6047
6047
  args: [Oe(fn(u))],
6048
6048
  blockNumber: n,
6049
6049
  blockTag: r
6050
- }, l = S(e, de, "readContract"), [d, p] = a ? await l({
6050
+ }, l = S(e, le, "readContract"), [d, p] = a ? await l({
6051
6051
  ...c,
6052
6052
  args: [...c.args, a]
6053
6053
  }) : await l(c);
@@ -6065,13 +6065,13 @@ async function td(e, { blockNumber: t, blockTag: n, name: r, universalResolverAd
6065
6065
  if (!s) {
6066
6066
  if (!e.chain)
6067
6067
  throw new Error("client chain not configured. universalResolverAddress is required.");
6068
- s = ot({
6068
+ s = it({
6069
6069
  blockNumber: t,
6070
6070
  chain: e.chain,
6071
6071
  contract: "ensUniversalResolver"
6072
6072
  });
6073
6073
  }
6074
- const [i] = await S(e, de, "readContract")({
6074
+ const [i] = await S(e, le, "readContract")({
6075
6075
  address: s,
6076
6076
  abi: [
6077
6077
  {
@@ -6114,8 +6114,8 @@ async function Ns(e, { address: t, args: n, event: r, events: a, fromBlock: s, s
6114
6114
  params: [
6115
6115
  {
6116
6116
  address: t,
6117
- fromBlock: typeof s == "bigint" ? k(s) : s,
6118
- toBlock: typeof o == "bigint" ? k(o) : o,
6117
+ fromBlock: typeof s == "bigint" ? O(s) : s,
6118
+ toBlock: typeof o == "bigint" ? O(o) : o,
6119
6119
  ...l.length ? { topics: l } : {}
6120
6120
  }
6121
6121
  ]
@@ -6141,7 +6141,7 @@ async function Ds(e) {
6141
6141
  return { id: n, request: t(n), type: "transaction" };
6142
6142
  }
6143
6143
  async function rd(e, { address: t, blockNumber: n, blockTag: r = "latest" }) {
6144
- const a = n ? k(n) : void 0, s = await e.request({
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
  });
@@ -6154,7 +6154,7 @@ async function ad(e) {
6154
6154
  return BigInt(t);
6155
6155
  }
6156
6156
  async function sd(e, { blockHash: t, blockNumber: n, blockTag: r = "latest" } = {}) {
6157
- const a = n !== void 0 ? k(n) : void 0;
6157
+ const a = n !== void 0 ? O(n) : void 0;
6158
6158
  let s;
6159
6159
  return t ? s = await e.request({
6160
6160
  method: "eth_getBlockTransactionCountByHash",
@@ -6165,7 +6165,7 @@ async function sd(e, { blockHash: t, blockNumber: n, blockTag: r = "latest" } =
6165
6165
  }), Ae(s);
6166
6166
  }
6167
6167
  async function id(e, { address: t, blockNumber: n, blockTag: r = "latest" }) {
6168
- const a = n !== void 0 ? k(n) : void 0, s = await e.request({
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]
6171
6171
  });
@@ -6182,10 +6182,10 @@ function od(e) {
6182
6182
  };
6183
6183
  }
6184
6184
  async function ud(e, { blockCount: t, blockNumber: n, blockTag: r = "latest", rewardPercentiles: a }) {
6185
- const s = n ? k(n) : void 0, i = await e.request({
6185
+ const s = n ? O(n) : void 0, i = await e.request({
6186
6186
  method: "eth_feeHistory",
6187
6187
  params: [
6188
- k(t),
6188
+ O(t),
6189
6189
  s || r,
6190
6190
  a
6191
6191
  ]
@@ -6204,13 +6204,13 @@ async function cd(e, { filter: t }) {
6204
6204
  }) : a;
6205
6205
  }
6206
6206
  function dd(e, t) {
6207
- if (!ie(e, { strict: !1 }))
6207
+ if (!oe(e, { strict: !1 }))
6208
6208
  throw new Me({ address: e });
6209
- if (!ie(t, { strict: !1 }))
6209
+ if (!oe(t, { strict: !1 }))
6210
6210
  throw new Me({ address: t });
6211
6211
  return e.toLowerCase() === t.toLowerCase();
6212
6212
  }
6213
- function js(e) {
6213
+ function Us(e) {
6214
6214
  return {
6215
6215
  formatters: void 0,
6216
6216
  fees: void 0,
@@ -6234,20 +6234,20 @@ function yd(e) {
6234
6234
  return t && s.push(fd({
6235
6235
  domain: t,
6236
6236
  types: a
6237
- })), r !== "EIP712Domain" && s.push(Us({
6237
+ })), r !== "EIP712Domain" && s.push(js({
6238
6238
  data: n,
6239
6239
  primaryType: r,
6240
6240
  types: a
6241
6241
  })), Z(ge(s));
6242
6242
  }
6243
6243
  function fd({ domain: e, types: t }) {
6244
- return Us({
6244
+ return js({
6245
6245
  data: e,
6246
6246
  primaryType: "EIP712Domain",
6247
6247
  types: t
6248
6248
  });
6249
6249
  }
6250
- function Us({ data: e, primaryType: t, types: n }) {
6250
+ function js({ data: e, primaryType: t, types: n }) {
6251
6251
  const r = Ls({
6252
6252
  data: e,
6253
6253
  primaryType: t,
@@ -6334,12 +6334,12 @@ function _s(e) {
6334
6334
  const { name: c, type: l } = u, d = o[c], p = l.match(pd);
6335
6335
  if (p && (typeof d == "number" || typeof d == "bigint")) {
6336
6336
  const [y, b, h] = p;
6337
- k(d, {
6337
+ O(d, {
6338
6338
  signed: b === "int",
6339
6339
  size: Number.parseInt(h) / 8
6340
6340
  });
6341
6341
  }
6342
- if (l === "address" && typeof d == "string" && !ie(d))
6342
+ if (l === "address" && typeof d == "string" && !oe(d))
6343
6343
  throw new Me({ address: d });
6344
6344
  const m = l.match(ld);
6345
6345
  if (m) {
@@ -6412,14 +6412,14 @@ function xd(e) {
6412
6412
  };
6413
6413
  }
6414
6414
  async function Ed(e, { address: t, blockNumber: n, blockTag: r, storageKeys: a }) {
6415
- const s = r ?? "latest", i = n !== void 0 ? k(n) : void 0, o = await e.request({
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
6419
  return xd(o);
6420
6420
  }
6421
6421
  async function Pd(e, { address: t, blockNumber: n, blockTag: r = "latest", slot: a }) {
6422
- const s = n !== void 0 ? k(n) : void 0;
6422
+ const s = n !== void 0 ? O(n) : void 0;
6423
6423
  return await e.request({
6424
6424
  method: "eth_getStorageAt",
6425
6425
  params: [t, a, s || r]
@@ -6427,17 +6427,17 @@ async function Pd(e, { address: t, blockNumber: n, blockTag: r = "latest", slot:
6427
6427
  }
6428
6428
  async function Rr(e, { blockHash: t, blockNumber: n, blockTag: r, hash: a, index: s }) {
6429
6429
  var l, d, p;
6430
- const i = r || "latest", o = n !== void 0 ? k(n) : void 0;
6430
+ const i = r || "latest", o = n !== void 0 ? O(n) : void 0;
6431
6431
  let u = null;
6432
6432
  if (a ? u = await e.request({
6433
6433
  method: "eth_getTransactionByHash",
6434
6434
  params: [a]
6435
6435
  }) : t ? u = await e.request({
6436
6436
  method: "eth_getTransactionByBlockHashAndIndex",
6437
- params: [t, k(s)]
6437
+ params: [t, O(s)]
6438
6438
  }) : (o || i) && (u = await e.request({
6439
6439
  method: "eth_getTransactionByBlockNumberAndIndex",
6440
- params: [o || i, k(s)]
6440
+ params: [o || i, O(s)]
6441
6441
  })), !u)
6442
6442
  throw new ss({
6443
6443
  blockHash: t,
@@ -6450,7 +6450,7 @@ async function Rr(e, { blockHash: t, blockNumber: n, blockTag: r, hash: a, index
6450
6450
  }
6451
6451
  async function Cd(e, { hash: t, transactionReceipt: n }) {
6452
6452
  const [r, a] = await Promise.all([
6453
- S(e, Ut, "getBlockNumber")({}),
6453
+ S(e, jt, "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;
@@ -6472,7 +6472,7 @@ async function Ad(e, t) {
6472
6472
  if (!l) {
6473
6473
  if (!e.chain)
6474
6474
  throw new Error("client chain not configured. multicallAddress is required.");
6475
- l = ot({
6475
+ l = it({
6476
6476
  blockNumber: a,
6477
6477
  chain: e.chain,
6478
6478
  contract: "multicall3"
@@ -6496,7 +6496,7 @@ async function Ad(e, t) {
6496
6496
  }
6497
6497
  ];
6498
6498
  } catch (T) {
6499
- const C = Bt(T, {
6499
+ const C = St(T, {
6500
6500
  abi: g,
6501
6501
  address: w,
6502
6502
  args: x,
@@ -6515,7 +6515,7 @@ async function Ad(e, t) {
6515
6515
  ];
6516
6516
  }
6517
6517
  }
6518
- const f = await Promise.allSettled(d.map((h) => S(e, de, "readContract")({
6518
+ const f = await Promise.allSettled(d.map((h) => S(e, le, "readContract")({
6519
6519
  abi: Wn,
6520
6520
  address: l,
6521
6521
  args: [h],
@@ -6545,7 +6545,7 @@ async function Ad(e, t) {
6545
6545
  throw new Qt();
6546
6546
  if (!T)
6547
6547
  throw new br({ data: P });
6548
- const N = it({
6548
+ const N = st({
6549
6549
  abi: E,
6550
6550
  args: $,
6551
6551
  data: P,
@@ -6553,7 +6553,7 @@ async function Ad(e, t) {
6553
6553
  });
6554
6554
  y.push(n ? { result: N, status: "success" } : N);
6555
6555
  } catch (N) {
6556
- const F = Bt(N, {
6556
+ const F = St(N, {
6557
6557
  abi: E,
6558
6558
  address: M,
6559
6559
  args: $,
@@ -6621,7 +6621,7 @@ function Dr(e, t) {
6621
6621
  function Sd(e) {
6622
6622
  return tt(Vs(e));
6623
6623
  }
6624
- function ae(e, t, n) {
6624
+ function se(e, t, n) {
6625
6625
  let r;
6626
6626
  if (typeof t == "string")
6627
6627
  try {
@@ -6638,7 +6638,7 @@ function ae(e, t, n) {
6638
6638
  throw new Error(`${e} expected ${n} bytes, got ${a}`);
6639
6639
  return r;
6640
6640
  }
6641
- function $t(...e) {
6641
+ function Bt(...e) {
6642
6642
  const t = new Uint8Array(e.reduce((r, a) => r + a.length, 0));
6643
6643
  let n = 0;
6644
6644
  return e.forEach((r) => {
@@ -6669,7 +6669,7 @@ function $d(e) {
6669
6669
  function kd(e, t) {
6670
6670
  return e >> BigInt(t) & mn;
6671
6671
  }
6672
- const Od = (e, t, n) => e | (n ? mn : Ws) << BigInt(t), jr = (e) => (Id << BigInt(e - 1)) - mn, Sn = (e) => new Uint8Array(e), ma = (e) => Uint8Array.from(e);
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);
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");
@@ -6692,7 +6692,7 @@ function Ks(e, t, n) {
6692
6692
  const m = r.slice();
6693
6693
  p.push(m), d += r.length;
6694
6694
  }
6695
- return $t(...p);
6695
+ return Bt(...p);
6696
6696
  };
6697
6697
  return (d, p) => {
6698
6698
  i(), u(d);
@@ -6732,14 +6732,14 @@ const Fd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6732
6732
  __proto__: null,
6733
6733
  bitGet: kd,
6734
6734
  bitLen: $d,
6735
- bitMask: jr,
6735
+ bitMask: Ur,
6736
6736
  bitSet: Od,
6737
6737
  bytesToHex: et,
6738
6738
  bytesToNumberBE: Le,
6739
6739
  bytesToNumberLE: Nr,
6740
- concatBytes: $t,
6740
+ concatBytes: Bt,
6741
6741
  createHmacDrbg: Ks,
6742
- ensureBytes: ae,
6742
+ ensureBytes: se,
6743
6743
  equalBytes: Zs,
6744
6744
  hexToBytes: tt,
6745
6745
  hexToNumber: Fr,
@@ -6751,25 +6751,25 @@ const Fd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6751
6751
  validateObject: Lt
6752
6752
  }, Symbol.toStringTag, { value: "Module" }));
6753
6753
  function Nd(e, t) {
6754
- const n = ce(e) ? Ie(e) : e, r = ce(t) ? Ie(t) : t;
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), U = BigInt(1), De = BigInt(2), Dd = BigInt(3), Xn = BigInt(4), ba = BigInt(5), ha = BigInt(8);
6758
+ const _ = BigInt(0), j = BigInt(1), De = BigInt(2), Dd = 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 jd(e, t, n) {
6765
+ function Ud(e, t, n) {
6766
6766
  if (n <= _ || t < _)
6767
6767
  throw new Error("Expected power/modulo > 0");
6768
- if (n === U)
6768
+ if (n === j)
6769
6769
  return _;
6770
- let r = U;
6770
+ let r = j;
6771
6771
  for (; t > _; )
6772
- t & U && (r = r * e % n), e = e * e % n, t >>= U;
6772
+ t & j && (r = r * e % n), e = e * e % n, t >>= j;
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 = U;
6784
+ let n = V(e, t), r = t, a = _, s = j;
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 !== U)
6789
+ if (r !== j)
6790
6790
  throw new Error("invert: does not exist");
6791
6791
  return V(a, t);
6792
6792
  }
6793
- function Ud(e) {
6794
- const t = (e - U) / De;
6793
+ function jd(e) {
6794
+ const t = (e - j) / De;
6795
6795
  let n, r, a;
6796
- for (n = e - U, r = 0; n % De === _; n /= De, r++)
6796
+ for (n = e - j, r = 0; n % De === _; n /= De, r++)
6797
6797
  ;
6798
- for (a = De; a < e && jd(a, t, e) !== e - U; a++)
6798
+ for (a = De; a < e && Ud(a, t, e) !== e - j; a++)
6799
6799
  ;
6800
6800
  if (r === 1) {
6801
- const i = (e + U) / Xn;
6801
+ const i = (e + j) / 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 Ud(e) {
6806
6806
  return l;
6807
6807
  };
6808
6808
  }
6809
- const s = (n + U) / De;
6809
+ const s = (n + j) / 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,7 +6817,7 @@ function Ud(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, U << BigInt(c - m - 1));
6820
+ const f = o.pow(l, j << 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;
@@ -6825,7 +6825,7 @@ function Ud(e) {
6825
6825
  }
6826
6826
  function Ld(e) {
6827
6827
  if (e % Xn === Dd) {
6828
- const t = (e + U) / Xn;
6828
+ const t = (e + j) / Xn;
6829
6829
  return function(r, a) {
6830
6830
  const s = r.pow(a, t);
6831
6831
  if (!r.eql(r.sqr(s), a))
@@ -6842,7 +6842,7 @@ function Ld(e) {
6842
6842
  return c;
6843
6843
  };
6844
6844
  }
6845
- return Ud(e);
6845
+ return jd(e);
6846
6846
  }
6847
6847
  const Hd = [
6848
6848
  "create",
@@ -6877,11 +6877,11 @@ function _d(e, t, n) {
6877
6877
  throw new Error("Expected power > 0");
6878
6878
  if (n === _)
6879
6879
  return e.ONE;
6880
- if (n === U)
6880
+ if (n === j)
6881
6881
  return t;
6882
6882
  let r = e.ONE, a = t;
6883
6883
  for (; n > _; )
6884
- n & U && (r = e.mul(r, a)), a = e.sqr(a), n >>= U;
6884
+ n & j && (r = e.mul(r, a)), a = e.sqr(a), n >>= j;
6885
6885
  return r;
6886
6886
  }
6887
6887
  function qd(e, t) {
@@ -6902,9 +6902,9 @@ function Gd(e, t, n = !1, r = {}) {
6902
6902
  ORDER: e,
6903
6903
  BITS: a,
6904
6904
  BYTES: s,
6905
- MASK: jr(a),
6905
+ MASK: Ur(a),
6906
6906
  ZERO: _,
6907
- ONE: U,
6907
+ ONE: j,
6908
6908
  create: (u) => V(u, e),
6909
6909
  isValid: (u) => {
6910
6910
  if (typeof u != "bigint")
@@ -6912,7 +6912,7 @@ function Gd(e, t, n = !1, r = {}) {
6912
6912
  return _ <= u && u < e;
6913
6913
  },
6914
6914
  is0: (u) => u === _,
6915
- isOdd: (u) => (u & U) === U,
6915
+ isOdd: (u) => (u & j) === j,
6916
6916
  neg: (u) => V(-u, e),
6917
6917
  eql: (u, c) => u === c,
6918
6918
  sqr: (u) => V(u * u, e),
@@ -6955,7 +6955,7 @@ function Wd(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 - U) + U;
6958
+ const i = n ? Le(e) : Nr(e), o = V(i, t - j) + j;
6959
6959
  return n ? Dr(o, a) : nt(o, a);
6960
6960
  }
6961
6961
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
@@ -7064,7 +7064,7 @@ function Kd(e) {
7064
7064
  }
7065
7065
  return Object.freeze({ ...t });
7066
7066
  }
7067
- const { bytesToNumberBE: Yd, hexToBytes: Jd } = Fd, je = {
7067
+ const { bytesToNumberBE: Yd, hexToBytes: Jd } = Fd, Ue = {
7068
7068
  // asn.1 DER encoding utils
7069
7069
  Err: class extends Error {
7070
7070
  constructor(t = "") {
@@ -7072,7 +7072,7 @@ const { bytesToNumberBE: Yd, hexToBytes: Jd } = Fd, je = {
7072
7072
  }
7073
7073
  },
7074
7074
  _parseInt(e) {
7075
- const { Err: t } = je;
7075
+ const { Err: t } = Ue;
7076
7076
  if (e.length < 2 || e[0] !== 2)
7077
7077
  throw new t("Invalid signature integer tag");
7078
7078
  const n = e[1], r = e.subarray(2, n + 2);
@@ -7085,7 +7085,7 @@ const { bytesToNumberBE: Yd, hexToBytes: Jd } = Fd, je = {
7085
7085
  return { d: Yd(r), l: e.subarray(n + 2) };
7086
7086
  },
7087
7087
  toSig(e) {
7088
- const { Err: t } = je, n = typeof e == "string" ? Jd(e) : e;
7088
+ const { Err: t } = Ue, n = typeof e == "string" ? Jd(e) : e;
7089
7089
  if (!(n instanceof Uint8Array))
7090
7090
  throw new Error("ui8a expected");
7091
7091
  let r = n.length;
@@ -7093,7 +7093,7 @@ const { bytesToNumberBE: Yd, hexToBytes: Jd } = Fd, je = {
7093
7093
  throw new t("Invalid signature tag");
7094
7094
  if (n[1] !== r - 2)
7095
7095
  throw new t("Invalid signature: incorrect length");
7096
- const { d: a, l: s } = je._parseInt(n.subarray(2)), { d: i, l: o } = je._parseInt(s);
7096
+ const { d: a, l: s } = Ue._parseInt(n.subarray(2)), { d: i, l: o } = Ue._parseInt(s);
7097
7097
  if (o.length)
7098
7098
  throw new t("Invalid signature: left bytes after parsing");
7099
7099
  return { r: a, s: i };
@@ -7105,14 +7105,14 @@ const { bytesToNumberBE: Yd, hexToBytes: Jd } = Fd, je = {
7105
7105
  }, r = t(n(e.s)), a = t(n(e.r)), s = r.length / 2, i = a.length / 2, o = n(s), u = n(i);
7106
7106
  return `30${n(i + s + 4)}02${u}${a}02${o}${r}`;
7107
7107
  }
7108
- }, ye = BigInt(0), ee = BigInt(1);
7108
+ }, fe = BigInt(0), ee = BigInt(1);
7109
7109
  BigInt(2);
7110
7110
  const ga = BigInt(3);
7111
7111
  BigInt(4);
7112
7112
  function Xd(e) {
7113
7113
  const t = Kd(e), { Fp: n } = t, r = t.toBytes || ((f, y, b) => {
7114
7114
  const h = y.toAffine();
7115
- return $t(Uint8Array.from([4]), n.toBytes(h.x), n.toBytes(h.y));
7115
+ return Bt(Uint8Array.from([4]), n.toBytes(h.x), n.toBytes(h.y));
7116
7116
  }), a = t.fromBytes || ((f) => {
7117
7117
  const y = f.subarray(1), b = n.fromBytes(y.subarray(0, n.BYTES)), h = n.fromBytes(y.subarray(n.BYTES, 2 * n.BYTES));
7118
7118
  return { x: b, y: h };
@@ -7124,7 +7124,7 @@ function Xd(e) {
7124
7124
  if (!n.eql(n.sqr(t.Gy), s(t.Gx)))
7125
7125
  throw new Error("bad generator point: equation left != right");
7126
7126
  function i(f) {
7127
- return typeof f == "bigint" && ye < f && f < t.n;
7127
+ return typeof f == "bigint" && fe < f && f < t.n;
7128
7128
  }
7129
7129
  function o(f) {
7130
7130
  if (!i(f))
@@ -7139,7 +7139,7 @@ function Xd(e) {
7139
7139
  }
7140
7140
  let w;
7141
7141
  try {
7142
- w = typeof f == "bigint" ? f : Le(ae("private key", f, b));
7142
+ w = typeof f == "bigint" ? f : Le(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
  }
@@ -7191,7 +7191,7 @@ function Xd(e) {
7191
7191
  * @param hex short/long ECDSA hex
7192
7192
  */
7193
7193
  static fromHex(y) {
7194
- const b = d.fromAffine(a(ae("pointHex", y)));
7194
+ const b = d.fromAffine(a(se("pointHex", y)));
7195
7195
  return b.assertValidity(), b;
7196
7196
  }
7197
7197
  // Multiplies generator point by privateKey.
@@ -7280,7 +7280,7 @@ function Xd(e) {
7280
7280
  */
7281
7281
  multiplyUnsafe(y) {
7282
7282
  const b = d.ZERO;
7283
- if (y === ye)
7283
+ if (y === fe)
7284
7284
  return b;
7285
7285
  if (o(y), y === ee)
7286
7286
  return this;
@@ -7288,7 +7288,7 @@ function Xd(e) {
7288
7288
  if (!h)
7289
7289
  return m.unsafeLadder(this, y);
7290
7290
  let { k1neg: g, k1: w, k2neg: x, k2: P } = h.splitScalar(y), T = b, C = b, E = this;
7291
- for (; w > ye || P > ye; )
7291
+ for (; w > fe || P > fe; )
7292
7292
  w & ee && (T = T.add(E)), P & ee && (C = C.add(E)), E = E.double(), w >>= ee, P >>= ee;
7293
7293
  return g && (T = T.negate()), x && (C = C.negate()), C = new d(n.mul(C.px, h.beta), C.py, C.pz), T.add(C);
7294
7294
  }
@@ -7322,7 +7322,7 @@ function Xd(e) {
7322
7322
  * @returns non-zero affine point
7323
7323
  */
7324
7324
  multiplyAndAddUnsafe(y, b, h) {
7325
- const g = d.BASE, w = (P, T) => T === ye || T === ee || !P.equals(g) ? P.multiplyUnsafe(T) : P.multiply(T), x = w(this, b).add(w(y, h));
7325
+ const g = d.BASE, w = (P, T) => T === fe || T === ee || !P.equals(g) ? P.multiplyUnsafe(T) : P.multiply(T), x = w(this, b).add(w(y, h));
7326
7326
  return x.is0() ? void 0 : x;
7327
7327
  }
7328
7328
  // Converts Projective point to affine (x, y) coordinates.
@@ -7382,7 +7382,7 @@ function Qd(e) {
7382
7382
  function el(e) {
7383
7383
  const t = Qd(e), { Fp: n, n: r } = t, a = n.BYTES + 1, s = 2 * n.BYTES + 1;
7384
7384
  function i(A) {
7385
- return ye < A && A < n.ORDER;
7385
+ return fe < A && A < n.ORDER;
7386
7386
  }
7387
7387
  function o(A) {
7388
7388
  return V(A, r);
@@ -7393,13 +7393,13 @@ function el(e) {
7393
7393
  const { ProjectivePoint: c, normPrivateKeyToScalar: l, weierstrassEquation: d, isWithinCurveOrder: p } = Xd({
7394
7394
  ...t,
7395
7395
  toBytes(A, I, R) {
7396
- const j = I.toAffine(), D = n.toBytes(j.x), z = $t;
7397
- return R ? z(Uint8Array.from([I.hasEvenY() ? 2 : 3]), D) : z(Uint8Array.from([4]), D, n.toBytes(j.y));
7396
+ const U = I.toAffine(), D = n.toBytes(U.x), z = Bt;
7397
+ return R ? z(Uint8Array.from([I.hasEvenY() ? 2 : 3]), D) : z(Uint8Array.from([4]), D, n.toBytes(U.y));
7398
7398
  },
7399
7399
  fromBytes(A) {
7400
- const I = A.length, R = A[0], j = A.subarray(1);
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(j);
7402
+ const D = Le(U);
7403
7403
  if (!i(D))
7404
7404
  throw new Error("Point is not on curve");
7405
7405
  const z = d(D);
@@ -7407,7 +7407,7 @@ function el(e) {
7407
7407
  const X = (J & ee) === ee;
7408
7408
  return (R & 1) === 1 !== X && (J = n.neg(J)), { x: D, y: J };
7409
7409
  } else if (I === s && R === 4) {
7410
- const D = n.fromBytes(j.subarray(0, n.BYTES)), z = n.fromBytes(j.subarray(n.BYTES, 2 * n.BYTES));
7410
+ const D = n.fromBytes(U.subarray(0, n.BYTES)), z = n.fromBytes(U.subarray(n.BYTES, 2 * n.BYTES));
7411
7411
  return { x: D, y: z };
7412
7412
  } else
7413
7413
  throw new Error(`Point of length ${I} was invalid. Expected ${a} compressed bytes or ${s} uncompressed bytes`);
@@ -7422,19 +7422,19 @@ function el(e) {
7422
7422
  }
7423
7423
  const b = (A, I, R) => Le(A.slice(I, R));
7424
7424
  class h {
7425
- constructor(I, R, j) {
7426
- this.r = I, this.s = R, this.recovery = j, this.assertValidity();
7425
+ constructor(I, R, U) {
7426
+ this.r = I, this.s = R, this.recovery = U, this.assertValidity();
7427
7427
  }
7428
7428
  // pair (bytes of r, bytes of s)
7429
7429
  static fromCompact(I) {
7430
7430
  const R = t.nByteLength;
7431
- return I = ae("compactSignature", I, R * 2), new h(b(I, 0, R), b(I, R, 2 * R));
7431
+ return I = se("compactSignature", I, R * 2), new h(b(I, 0, R), b(I, R, 2 * R));
7432
7432
  }
7433
7433
  // DER encoded ECDSA signature
7434
7434
  // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script
7435
7435
  static fromDER(I) {
7436
- const { r: R, s: j } = je.toSig(ae("DER", I));
7437
- return new h(R, j);
7436
+ const { r: R, s: U } = Ue.toSig(se("DER", I));
7437
+ return new h(R, U);
7438
7438
  }
7439
7439
  assertValidity() {
7440
7440
  if (!p(this.r))
@@ -7446,13 +7446,13 @@ function el(e) {
7446
7446
  return new h(this.r, this.s, I);
7447
7447
  }
7448
7448
  recoverPublicKey(I) {
7449
- const { r: R, s: j, recovery: D } = this, z = C(ae("msgHash", I));
7449
+ const { r: R, s: U, recovery: D } = this, z = C(se("msgHash", I));
7450
7450
  if (D == null || ![0, 1, 2, 3].includes(D))
7451
7451
  throw new Error("recovery id invalid");
7452
7452
  const J = D === 2 || D === 3 ? R + t.n : R;
7453
7453
  if (J >= n.ORDER)
7454
7454
  throw new Error("recovery id 2 or 3 invalid");
7455
- const X = D & 1 ? "03" : "02", Te = c.fromHex(X + m(J)), ve = u(J), qe = o(-z * ve), ct = o(j * ve), xe = c.BASE.multiplyAndAddUnsafe(Te, qe, ct);
7455
+ const X = D & 1 ? "03" : "02", Te = c.fromHex(X + m(J)), ve = u(J), qe = o(-z * ve), ut = o(U * ve), xe = c.BASE.multiplyAndAddUnsafe(Te, qe, ut);
7456
7456
  if (!xe)
7457
7457
  throw new Error("point at infinify");
7458
7458
  return xe.assertValidity(), xe;
@@ -7469,7 +7469,7 @@ function el(e) {
7469
7469
  return tt(this.toDERHex());
7470
7470
  }
7471
7471
  toDERHex() {
7472
- return je.hexFromSig({ r: this.r, s: this.s });
7472
+ return Ue.hexFromSig({ r: this.r, s: this.s });
7473
7473
  }
7474
7474
  // padded bytes of r, then padded bytes of s
7475
7475
  toCompactRawBytes() {
@@ -7512,8 +7512,8 @@ function el(e) {
7512
7512
  return c.fromPrivateKey(A).toRawBytes(I);
7513
7513
  }
7514
7514
  function x(A) {
7515
- const I = A instanceof Uint8Array, R = typeof A == "string", j = (I || R) && A.length;
7516
- return I ? j === a || j === s : R ? j === 2 * a || j === 2 * s : A instanceof c;
7515
+ const I = A instanceof Uint8Array, R = typeof A == "string", U = (I || R) && A.length;
7516
+ return I ? U === a || U === s : R ? U === 2 * a || U === 2 * s : A instanceof c;
7517
7517
  }
7518
7518
  function P(A, I, R = !0) {
7519
7519
  if (x(A))
@@ -7527,78 +7527,78 @@ function el(e) {
7527
7527
  return R > 0 ? I >> BigInt(R) : I;
7528
7528
  }, C = t.bits2int_modN || function(A) {
7529
7529
  return o(T(A));
7530
- }, E = jr(t.nBitLength);
7530
+ }, E = Ur(t.nBitLength);
7531
7531
  function M(A) {
7532
7532
  if (typeof A != "bigint")
7533
7533
  throw new Error("bigint expected");
7534
- if (!(ye <= A && A < E))
7534
+ if (!(fe <= A && A < E))
7535
7535
  throw new Error(`bigint expected < 2^${t.nBitLength}`);
7536
7536
  return nt(A, t.nByteLength);
7537
7537
  }
7538
7538
  function B(A, I, R = $) {
7539
7539
  if (["recovered", "canonical"].some((Fe) => Fe in R))
7540
7540
  throw new Error("sign() legacy options not supported");
7541
- const { hash: j, randomBytes: D } = t;
7541
+ const { hash: U, randomBytes: D } = t;
7542
7542
  let { lowS: z, prehash: J, extraEntropy: X } = R;
7543
- z == null && (z = !0), A = ae("msgHash", A), J && (A = ae("prehashed msgHash", j(A)));
7543
+ z == null && (z = !0), A = se("msgHash", A), J && (A = se("prehashed msgHash", U(A)));
7544
7544
  const Te = C(A), ve = l(I), qe = [M(ve), M(Te)];
7545
7545
  if (X != null) {
7546
7546
  const Fe = X === !0 ? D(n.BYTES) : X;
7547
- qe.push(ae("extraEntropy", Fe));
7547
+ qe.push(se("extraEntropy", Fe));
7548
7548
  }
7549
- const ct = $t(...qe), xe = Te;
7549
+ const ut = Bt(...qe), xe = Te;
7550
7550
  function gn(Fe) {
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(), re = o(We.x);
7555
- if (re === ye)
7554
+ const Hr = u(Ge), We = c.BASE.multiply(Ge).toAffine(), ae = o(We.x);
7555
+ if (ae === fe)
7556
7556
  return;
7557
- const Ve = o(Hr * o(xe + re * ve));
7558
- if (Ve === ye)
7557
+ const Ve = o(Hr * o(xe + ae * ve));
7558
+ if (Ve === fe)
7559
7559
  return;
7560
- let zr = (We.x === re ? 0 : 2) | Number(We.y & ee), _r = Ve;
7561
- return z && f(Ve) && (_r = y(Ve), zr ^= 1), new h(re, _r, zr);
7560
+ let zr = (We.x === ae ? 0 : 2) | Number(We.y & ee), _r = Ve;
7561
+ return z && f(Ve) && (_r = y(Ve), zr ^= 1), new h(ae, _r, zr);
7562
7562
  }
7563
- return { seed: ct, k2sig: gn };
7563
+ return { seed: ut, k2sig: gn };
7564
7564
  }
7565
7565
  const $ = { lowS: t.lowS, prehash: !1 }, N = { lowS: t.lowS, prehash: !1 };
7566
7566
  function F(A, I, R = $) {
7567
- const { seed: j, k2sig: D } = B(A, I, R), z = t;
7568
- return Ks(z.hash.outputLen, z.nByteLength, z.hmac)(j, D);
7567
+ const { seed: U, k2sig: D } = B(A, I, R), z = t;
7568
+ return Ks(z.hash.outputLen, z.nByteLength, z.hmac)(U, D);
7569
7569
  }
7570
7570
  c.BASE._setWindowSize(8);
7571
- function G(A, I, R, j = N) {
7571
+ function G(A, I, R, U = N) {
7572
7572
  var We;
7573
7573
  const D = A;
7574
- if (I = ae("msgHash", I), R = ae("publicKey", R), "strict" in j)
7574
+ if (I = se("msgHash", I), R = se("publicKey", R), "strict" in U)
7575
7575
  throw new Error("options.strict was renamed to lowS");
7576
- const { lowS: z, prehash: J } = j;
7576
+ const { lowS: z, prehash: J } = U;
7577
7577
  let X, Te;
7578
7578
  try {
7579
7579
  if (typeof D == "string" || D instanceof Uint8Array)
7580
7580
  try {
7581
7581
  X = h.fromDER(D);
7582
- } catch (re) {
7583
- if (!(re instanceof je.Err))
7584
- throw re;
7582
+ } catch (ae) {
7583
+ if (!(ae instanceof Ue.Err))
7584
+ throw ae;
7585
7585
  X = h.fromCompact(D);
7586
7586
  }
7587
7587
  else if (typeof D == "object" && typeof D.r == "bigint" && typeof D.s == "bigint") {
7588
- const { r: re, s: Ve } = D;
7589
- X = new h(re, Ve);
7588
+ const { r: ae, s: Ve } = D;
7589
+ X = new h(ae, Ve);
7590
7590
  } else
7591
7591
  throw new Error("PARSE");
7592
7592
  Te = c.fromHex(R);
7593
- } catch (re) {
7594
- if (re.message === "PARSE")
7593
+ } catch (ae) {
7594
+ if (ae.message === "PARSE")
7595
7595
  throw new Error("signature must be Signature instance, Uint8Array or hex string");
7596
7596
  return !1;
7597
7597
  }
7598
7598
  if (z && X.hasHighS())
7599
7599
  return !1;
7600
7600
  J && (I = t.hash(I));
7601
- const { r: ve, s: qe } = X, ct = C(I), xe = u(qe), gn = o(ct * xe), Fe = o(ve * xe), Ge = (We = c.BASE.multiplyAndAddUnsafe(Te, gn, Fe)) == null ? void 0 : We.toAffine();
7601
+ const { r: ve, s: qe } = X, ut = C(I), xe = u(qe), gn = o(ut * xe), Fe = o(ve * xe), Ge = (We = c.BASE.multiplyAndAddUnsafe(Te, gn, Fe)) == null ? void 0 : We.toAffine();
7602
7602
  return Ge ? o(Ge.x) === ve : !1;
7603
7603
  }
7604
7604
  return {
@@ -7669,7 +7669,7 @@ function al(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 }), Ur = nl({
7672
+ const tr = Gd(ni, void 0, void 0, { sqrt: al }), jr = nl({
7673
7673
  a: BigInt(0),
7674
7674
  b: BigInt(7),
7675
7675
  Fp: tr,
@@ -7698,7 +7698,7 @@ const tr = Gd(ni, void 0, void 0, { sqrt: al }), Ur = nl({
7698
7698
  }
7699
7699
  }, gs);
7700
7700
  BigInt(0);
7701
- Ur.ProjectivePoint;
7701
+ jr.ProjectivePoint;
7702
7702
  function sl({ r: e, s: t, v: n, yParity: r }) {
7703
7703
  const a = (() => {
7704
7704
  if (r === 0 || r === 1)
@@ -7707,10 +7707,10 @@ 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 Ur.Signature(Ye(e), Ye(t)).toCompactHex()}${a === 0 ? "1b" : "1c"}`;
7710
+ return `0x${new jr.Signature(Ye(e), Ye(t)).toCompactHex()}${a === 0 ? "1b" : "1c"}`;
7711
7711
  }
7712
7712
  async function Lr(e, { address: t, hash: n, signature: r, ...a }) {
7713
- const s = ce(r) ? r : typeof r == "object" && "r" in r && "s" in r ? sl(r) : q(r);
7713
+ const s = de(r) ? r : typeof r == "object" && "r" in r && "s" in r ? sl(r) : q(r);
7714
7714
  try {
7715
7715
  const { data: i } = await S(e, dn, "call")({
7716
7716
  data: Ir({
@@ -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) => jt(async () => {
7759
+ return $e(d, { onBlockNumber: r, onError: a }, (p) => Ut(async () => {
7760
7760
  var m;
7761
7761
  try {
7762
- const f = await S(e, Ut, "getBlockNumber")({ cacheTime: 0 });
7762
+ const f = await S(e, jt, "getBlockNumber")({ cacheTime: 0 });
7763
7763
  if (u) {
7764
7764
  if (f === u)
7765
7765
  return;
@@ -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) => jt(async () => {
7918
+ return $e(f, { onBlock: a, onError: s }, (y) => Ut(async () => {
7919
7919
  var b;
7920
7920
  try {
7921
7921
  const h = await S(e, Se, "getBlock")({
@@ -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 = jt(async () => {
7996
+ const P = Ut(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, Ut, "getBlockNumber")({});
8018
+ const E = await S(e, jt, "getBlockNumber")({});
8019
8019
  g && g !== E ? C = await S(e, Cr, "getLogs")({
8020
8020
  address: t,
8021
8021
  args: n,
@@ -8079,7 +8079,7 @@ function dl(e, { address: t, args: n, batch: r = !0, event: a, events: s, fromBl
8079
8079
  u([$]);
8080
8080
  } catch (M) {
8081
8081
  let B, $;
8082
- if (M instanceof mt || M instanceof en) {
8082
+ if (M instanceof ft || M instanceof en) {
8083
8083
  if (d)
8084
8084
  return;
8085
8085
  B = M.abiItem.name, $ = (E = M.abiItem.inputs) == null ? void 0 : E.some((F) => !("name" in F && F.name));
@@ -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 = jt(async () => {
8115
+ const p = Ut(async () => {
8116
8116
  var m;
8117
8117
  try {
8118
8118
  if (!d)
@@ -8225,7 +8225,7 @@ function hl(e) {
8225
8225
  getBalance: (t) => rd(e, t),
8226
8226
  getBlobBaseFee: () => ad(e),
8227
8227
  getBlock: (t) => Se(e, t),
8228
- getBlockNumber: (t) => Ut(e, t),
8228
+ getBlockNumber: (t) => jt(e, t),
8229
8229
  getBlockTransactionCount: (t) => sd(e, t),
8230
8230
  getBytecode: (t) => id(e, t),
8231
8231
  getChainId: () => Dt(e),
@@ -8251,7 +8251,7 @@ function hl(e) {
8251
8251
  getTransactionReceipt: (t) => Jn(e, t),
8252
8252
  multicall: (t) => Ad(e, t),
8253
8253
  prepareTransactionRequest: (t) => cn(e, t),
8254
- readContract: (t) => de(e, t),
8254
+ readContract: (t) => le(e, t),
8255
8255
  sendRawTransaction: (t) => Mr(e, t),
8256
8256
  simulateContract: (t) => Is(e, t),
8257
8257
  verifyMessage: (t) => il(e, t),
@@ -8303,7 +8303,7 @@ async function El(e, { account: t = e.account, message: n }) {
8303
8303
  throw new yn({
8304
8304
  docsPath: "/docs/actions/wallet/signMessage"
8305
8305
  });
8306
- const r = ne(t);
8306
+ const r = re(t);
8307
8307
  if (r.type === "local")
8308
8308
  return r.signMessage({ message: n });
8309
8309
  const a = typeof n == "string" ? ar(n) : n.raw instanceof Uint8Array ? Oe(n.raw) : n.raw;
@@ -8319,7 +8319,7 @@ async function Pl(e, t) {
8319
8319
  throw new yn({
8320
8320
  docsPath: "/docs/actions/wallet/signTransaction"
8321
8321
  });
8322
- const s = ne(n);
8322
+ const s = re(n);
8323
8323
  Nt({
8324
8324
  account: s,
8325
8325
  ...t
@@ -8338,7 +8338,7 @@ async function Pl(e, t) {
8338
8338
  params: [
8339
8339
  {
8340
8340
  ...u(a),
8341
- chainId: k(i),
8341
+ chainId: O(i),
8342
8342
  from: s.address
8343
8343
  }
8344
8344
  ]
@@ -8350,7 +8350,7 @@ async function Cl(e, t) {
8350
8350
  throw new yn({
8351
8351
  docsPath: "/docs/actions/wallet/signTypedData"
8352
8352
  });
8353
- const i = ne(n), o = {
8353
+ const i = re(n), o = {
8354
8354
  EIP712Domain: qs({ domain: r }),
8355
8355
  ...t.types
8356
8356
  };
@@ -8367,7 +8367,7 @@ async function Al(e, { id: t }) {
8367
8367
  method: "wallet_switchEthereumChain",
8368
8368
  params: [
8369
8369
  {
8370
- chainId: k(t)
8370
+ chainId: O(t)
8371
8371
  }
8372
8372
  ]
8373
8373
  }, { retryCount: 0 });
@@ -8409,7 +8409,7 @@ function si(e) {
8409
8409
  }).extend(Ml);
8410
8410
  }
8411
8411
  function Sl(e) {
8412
- const { r: t, s: n } = Ur.Signature.fromCompact(e.slice(2, 130)), r = +`0x${e.slice(130)}`, [a, s] = (() => {
8412
+ const { r: t, s: n } = jr.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)
@@ -8419,17 +8419,17 @@ function Sl(e) {
8419
8419
  throw new Error("Invalid yParityOrV value");
8420
8420
  })();
8421
8421
  return typeof a < "u" ? {
8422
- r: k(t, { size: 32 }),
8423
- s: k(n, { size: 32 }),
8422
+ r: O(t, { size: 32 }),
8423
+ s: O(n, { size: 32 }),
8424
8424
  v: a,
8425
8425
  yParity: s
8426
8426
  } : {
8427
- r: k(t, { size: 32 }),
8428
- s: k(n, { size: 32 }),
8427
+ r: O(t, { size: 32 }),
8428
+ s: O(n, { size: 32 }),
8429
8429
  yParity: s
8430
8430
  };
8431
8431
  }
8432
- const ii = /* @__PURE__ */ js({
8432
+ const ii = /* @__PURE__ */ Us({
8433
8433
  id: 17e3,
8434
8434
  name: "Holesky",
8435
8435
  nativeCurrency: { name: "Holesky Ether", symbol: "ETH", decimals: 18 },
@@ -8459,7 +8459,7 @@ const ii = /* @__PURE__ */ js({
8459
8459
  }
8460
8460
  },
8461
8461
  testnet: !0
8462
- }), oi = /* @__PURE__ */ js({
8462
+ }), oi = /* @__PURE__ */ Us({
8463
8463
  id: 1,
8464
8464
  name: "Ethereum",
8465
8465
  nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
@@ -8489,12 +8489,12 @@ const ii = /* @__PURE__ */ js({
8489
8489
  }
8490
8490
  }
8491
8491
  });
8492
- var O = ((e) => (e[e.Mainnet = oi.id] = "Mainnet", e[e.Holesky = ii.id] = "Holesky", e))(O || {});
8492
+ var k = ((e) => (e[e.Mainnet = oi.id] = "Mainnet", e[e.Holesky = ii.id] = "Holesky", e))(k || {});
8493
8493
  const we = {
8494
- [O.Mainnet]: oi,
8495
- [O.Holesky]: ii
8494
+ [k.Mainnet]: oi,
8495
+ [k.Holesky]: ii
8496
8496
  }, Ce = {
8497
- [O.Mainnet]: {
8497
+ [k.Mainnet]: {
8498
8498
  PufferVault: "0xD9A442856C234a39a81a089C06451EBAa4306a72",
8499
8499
  PufferDepositor: "0x4aa799c5dfc01ee7d790e3bf1a7c2257ce1dceff",
8500
8500
  // TODO: Update the addresses once the contracts are deployed on chain.
@@ -8502,13 +8502,13 @@ const we = {
8502
8502
  PufferL2Depositor: "0x0000000000000000000000000000000000000000",
8503
8503
  PufLocker: "0x0000000000000000000000000000000000000000"
8504
8504
  },
8505
- [O.Holesky]: {
8505
+ [k.Holesky]: {
8506
8506
  PufferVault: "0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9",
8507
8507
  PufferDepositor: "0x824AC05aeb86A0aD770b8acDe0906d2d4a6c4A8c",
8508
8508
  // TODO: Update the addresses once the contracts are deployed on chain.
8509
8509
  // See https://dev.azure.com/pufferfi/Frontend/_workitems/edit/1797.
8510
- PufferL2Depositor: "0x03D8bE7CaAD9A95cef9800249eC663Aa28A2F776",
8511
- PufLocker: "0x3fc7a526de9fc3c5e3a28f33d24d4401a6a7b65d"
8510
+ PufferL2Depositor: "0x300480bf80b1ad93a9f6349623646142776e9156",
8511
+ PufLocker: "0x367551e0834c26e29e0a17ce3ed4dca87ff0c204"
8512
8512
  }
8513
8513
  }, Bl = [
8514
8514
  {
@@ -12152,10 +12152,10 @@ const we = {
12152
12152
  inputs: []
12153
12153
  }
12154
12154
  ], kl = {
12155
- [O.Mainnet]: {
12155
+ [k.Mainnet]: {
12156
12156
  PufferVaultV2: Bl
12157
12157
  },
12158
- [O.Holesky]: {
12158
+ [k.Holesky]: {
12159
12159
  PufferVaultV2: $l
12160
12160
  }
12161
12161
  };
@@ -12181,7 +12181,7 @@ class Ol {
12181
12181
  * @returns The viem contract.
12182
12182
  */
12183
12183
  getContract() {
12184
- return ut({
12184
+ return ot({
12185
12185
  address: Ce[this.chain].PufferVault,
12186
12186
  abi: kl[this.chain].PufferVaultV2,
12187
12187
  client: {
@@ -13299,16 +13299,16 @@ const Rl = [
13299
13299
  type: "function"
13300
13300
  }
13301
13301
  ], Nl = {
13302
- [O.Mainnet]: {
13302
+ [k.Mainnet]: {
13303
13303
  PufferDepositor: Rl
13304
13304
  },
13305
- [O.Holesky]: {
13305
+ [k.Holesky]: {
13306
13306
  PufferDepositor: Fl
13307
13307
  }
13308
13308
  }, Dl = {
13309
- [O.Mainnet]: { PufferL2Depositor: va },
13310
- [O.Holesky]: { PufferL2Depositor: va }
13311
- }, jl = [
13309
+ [k.Mainnet]: { PufferL2Depositor: va },
13310
+ [k.Holesky]: { PufferL2Depositor: va }
13311
+ }, Ul = [
13312
13312
  {
13313
13313
  type: "function",
13314
13314
  name: "DOMAIN_SEPARATOR",
@@ -13827,71 +13827,101 @@ const Rl = [
13827
13827
  }
13828
13828
  ]
13829
13829
  }
13830
- ], Ul = jl;
13831
- var rt = /* @__PURE__ */ ((e) => (e.USDC = "USDC", e.DAI = "DAI", e.ETH = "ETH", e.WETH = "wETH", e.stETH = "stETH", e.wstETH = "wstETH", e.pufETH = "pufETH", 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))(rt || {});
13832
- const fe = {
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 = {
13833
+ USDT: {
13834
+ [k.Mainnet]: "0xdac17f958d2ee523a2206206994597c13d831ec7",
13835
+ [k.Holesky]: "0xd5bef2c64f418fd460319521d37862327122e3bc"
13836
+ },
13833
13837
  USDC: {
13834
- [O.Mainnet]: "0x0000000000000000000000000000000000000000",
13835
- [O.Holesky]: "0x64Cc0de0429bcb87e875905a0c313ec88f6d1d3E"
13838
+ [k.Mainnet]: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
13839
+ [k.Holesky]: "0x64Cc0de0429bcb87e875905a0c313ec88f6d1d3E"
13836
13840
  },
13837
13841
  DAI: {
13838
- [O.Mainnet]: "0x0000000000000000000000000000000000000000",
13839
- [O.Holesky]: "0x4478905505ddfb7eA1c8A9f46eAEC3695cE542ac"
13842
+ [k.Mainnet]: "0x6b175474e89094c44da98b954eedeac495271d0f",
13843
+ [k.Holesky]: "0x4478905505ddfb7eA1c8A9f46eAEC3695cE542ac"
13840
13844
  },
13841
13845
  ETH: {},
13842
- // Does not support permit signatures (ERC20Permit).
13846
+ // WETH does not support permit signatures (ERC20Permit).
13843
13847
  wETH: {
13844
- [O.Mainnet]: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
13845
- [O.Holesky]: "0x94373a4919b3240d86ea41593d5eba789fef3848"
13848
+ [k.Mainnet]: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
13849
+ [k.Holesky]: "0x35B1167b4D37931540F4e5189004d1756d1381B0"
13846
13850
  },
13847
13851
  stETH: {
13848
- [O.Mainnet]: "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
13849
- [O.Holesky]: "0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034"
13852
+ [k.Mainnet]: "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
13853
+ [k.Holesky]: "0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034"
13850
13854
  },
13851
13855
  wstETH: {
13852
- [O.Mainnet]: "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",
13853
- [O.Holesky]: "0x8d09a4502Cc8Cf1547aD300E066060D043f6982D"
13856
+ [k.Mainnet]: "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",
13857
+ [k.Holesky]: "0x8d09a4502Cc8Cf1547aD300E066060D043f6982D"
13854
13858
  },
13855
13859
  pufETH: {
13856
- [O.Mainnet]: "0xd9a442856c234a39a81a089c06451ebaa4306a72",
13857
- [O.Holesky]: "0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9"
13860
+ [k.Mainnet]: "0xd9a442856c234a39a81a089c06451ebaa4306a72",
13861
+ [k.Holesky]: "0x9196830bb4c05504e0a8475a0ad566aceeb6bec9"
13858
13862
  },
13859
13863
  // TODO: Update the addresses once the contracts are deployed on chain.
13860
13864
  // See https://dev.azure.com/pufferfi/Frontend/_workitems/edit/1797.
13861
13865
  // Wrapped PufTokens.
13866
+ pufUSDT: {
13867
+ [k.Mainnet]: "0x0000000000000000000000000000000000000000",
13868
+ [k.Holesky]: "0x61e7C87c387178D6e0aE6c04748b7FF753fC9b81"
13869
+ },
13862
13870
  pufUSDC: {
13863
- [O.Mainnet]: "0x0000000000000000000000000000000000000000",
13864
- [O.Holesky]: "0x6D900a9f5784A2cA0004B5c3D3e08D7A9cE4A1b3"
13871
+ [k.Mainnet]: "0x0000000000000000000000000000000000000000",
13872
+ [k.Holesky]: "0xC4731029b6F4fEd5930A56F0FFa3E8Ae688f9dA8"
13865
13873
  },
13866
13874
  pufDAI: {
13867
- [O.Mainnet]: "0x0000000000000000000000000000000000000000",
13868
- [O.Holesky]: "0x3aDeeC5151FA881e76A3F42256CD78052372b362"
13875
+ [k.Mainnet]: "0x0000000000000000000000000000000000000000",
13876
+ [k.Holesky]: "0xcA1C3DBC6Ea41f018B8d91C3AbE6FacDBDd4F63e"
13869
13877
  },
13870
- pufpufETH: {
13871
- [O.Mainnet]: "0x0000000000000000000000000000000000000000",
13872
- [O.Holesky]: "0x083b6321F213C993B81a54BF4D6Cb38e175EFE68"
13878
+ pufEETH: {
13879
+ [k.Mainnet]: "0x0000000000000000000000000000000000000000",
13880
+ [k.Holesky]: "0x0000000000000000000000000000000000000000"
13873
13881
  },
13874
13882
  pufWETH: {
13875
- [O.Mainnet]: "0x0000000000000000000000000000000000000000",
13876
- [O.Holesky]: "0xfcF6c4e0387A523b73691D5604e5a6dA1607C8A0"
13883
+ [k.Mainnet]: "0x0000000000000000000000000000000000000000",
13884
+ [k.Holesky]: "0x2207119500757bDD269F98d86Dca6356535b876E"
13877
13885
  },
13878
13886
  pufStETH: {
13879
- [O.Mainnet]: "0x0000000000000000000000000000000000000000",
13880
- [O.Holesky]: "0x0000000000000000000000000000000000000000"
13887
+ [k.Mainnet]: "0x0000000000000000000000000000000000000000",
13888
+ [k.Holesky]: "0x0000000000000000000000000000000000000000"
13881
13889
  },
13882
13890
  pufWstETH: {
13883
- [O.Mainnet]: "0x0000000000000000000000000000000000000000",
13884
- [O.Holesky]: "0x0000000000000000000000000000000000000000"
13891
+ [k.Mainnet]: "0x0000000000000000000000000000000000000000",
13892
+ [k.Holesky]: "0x0000000000000000000000000000000000000000"
13885
13893
  },
13886
13894
  pufALT: {
13887
- [O.Mainnet]: "0x0000000000000000000000000000000000000000",
13888
- [O.Holesky]: "0x0000000000000000000000000000000000000000"
13895
+ [k.Mainnet]: "0x0000000000000000000000000000000000000000",
13896
+ [k.Holesky]: "0x0000000000000000000000000000000000000000"
13889
13897
  },
13890
- pufEETH: {
13891
- [O.Mainnet]: "0x0000000000000000000000000000000000000000",
13892
- [O.Holesky]: "0x0000000000000000000000000000000000000000"
13893
- }
13894
- }, Ll = () => Math.floor(Date.now() / 1e3);
13898
+ pufpufETH: {
13899
+ [k.Mainnet]: "0x0000000000000000000000000000000000000000",
13900
+ [k.Holesky]: "0xECa244cBBe52A68EB6c4fdC266c2c50D568bcd22"
13901
+ }
13902
+ }, Ll = {
13903
+ USDT: "2",
13904
+ // USDC does not support permit signatures (ERC20Permit).
13905
+ USDC: "2",
13906
+ DAI: "1",
13907
+ ETH: "",
13908
+ // WETH does not support permit signatures (ERC20Permit).
13909
+ wETH: "",
13910
+ stETH: "2",
13911
+ // Puffer Quest v1 uses version 1 for wstETH.
13912
+ wstETH: "1",
13913
+ pufETH: "1",
13914
+ // Wrapped PufTokens
13915
+ pufUSDT: "1",
13916
+ pufUSDC: "1",
13917
+ pufDAI: "1",
13918
+ pufEETH: "1",
13919
+ pufWETH: "1",
13920
+ pufStETH: "1",
13921
+ pufWstETH: "1",
13922
+ pufALT: "1",
13923
+ pufpufETH: "1"
13924
+ }, Hl = () => Math.floor(Date.now() / 1e3);
13895
13925
  class hn {
13896
13926
  /**
13897
13927
  * Create the handler for processing tokens.
@@ -13905,7 +13935,7 @@ class hn {
13905
13935
  constructor(t, n, r) {
13906
13936
  L(this, "viemChain");
13907
13937
  L(this, "token");
13908
- this.chain = t, this.walletClient = n, this.publicClient = r, this.viemChain = we[t], this.token = rt.ETH;
13938
+ this.chain = t, this.walletClient = n, this.publicClient = r, this.viemChain = we[t], this.token = $t.ETH;
13909
13939
  }
13910
13940
  /**
13911
13941
  * Set the token to use for executing transactions on the contract.
@@ -13923,9 +13953,9 @@ class hn {
13923
13953
  * @returns The viem contract.
13924
13954
  */
13925
13955
  getContract() {
13926
- return ut({
13927
- address: fe[this.token][this.chain],
13928
- abi: Ul,
13956
+ return ot({
13957
+ address: ce[this.token][this.chain],
13958
+ abi: jl,
13929
13959
  client: {
13930
13960
  wallet: this.walletClient,
13931
13961
  public: this.publicClient
@@ -13946,7 +13976,7 @@ class hn {
13946
13976
  name: await a.read.name(),
13947
13977
  version: this.getPermitVersion(this.token),
13948
13978
  chainId: this.chain,
13949
- verifyingContract: fe[this.token][this.chain]
13979
+ verifyingContract: ce[this.token][this.chain]
13950
13980
  }, u = {
13951
13981
  Permit: [
13952
13982
  { name: "owner", type: "address" },
@@ -13955,7 +13985,7 @@ class hn {
13955
13985
  { name: "nonce", type: "uint256" },
13956
13986
  { name: "deadline", type: "uint256" }
13957
13987
  ]
13958
- }, c = BigInt(Ll() + 60 * 60 * 2), l = await this.walletClient.signTypedData({
13988
+ }, c = BigInt(Hl() + 60 * 60 * 2), l = await this.walletClient.signTypedData({
13959
13989
  account: t,
13960
13990
  domain: o,
13961
13991
  types: u,
@@ -13971,7 +14001,7 @@ class hn {
13971
14001
  return { ...Sl(l), deadline: c };
13972
14002
  }
13973
14003
  getPermitVersion(t) {
13974
- return t === rt.stETH ? "2" : "1";
14004
+ return Ll[t];
13975
14005
  }
13976
14006
  /**
13977
14007
  * Approve transaction for the spender to spend the owner's tokens.
@@ -13988,7 +14018,7 @@ class hn {
13988
14018
  });
13989
14019
  }
13990
14020
  }
13991
- class Hl {
14021
+ class zl {
13992
14022
  /**
13993
14023
  * Create the handler for the `PufferDepositor` contract exposing
13994
14024
  * methods to interact with the contract.
@@ -14015,7 +14045,7 @@ class Hl {
14015
14045
  * @returns The viem contract.
14016
14046
  */
14017
14047
  getContract() {
14018
- return ut({
14048
+ return ot({
14019
14049
  address: Ce[this.chain].PufferDepositor,
14020
14050
  abi: Nl[this.chain].PufferDepositor,
14021
14051
  client: {
@@ -14038,7 +14068,7 @@ class Hl {
14038
14068
  * transaction.
14039
14069
  */
14040
14070
  async depositStETH(t, n) {
14041
- const { r, s: a, v: s, yParity: i, deadline: o } = await this.erc20PermitHandler.withToken(rt.stETH).getPermitSignature(
14071
+ const { r, s: a, v: s, yParity: i, deadline: o } = await this.erc20PermitHandler.withToken($t.stETH).getPermitSignature(
14042
14072
  t,
14043
14073
  Ce[this.chain].PufferDepositor,
14044
14074
  n
@@ -14071,7 +14101,7 @@ class Hl {
14071
14101
  * transaction.
14072
14102
  */
14073
14103
  async depositWstETH(t, n) {
14074
- const { r, s: a, v: s, yParity: i, deadline: o } = await this.erc20PermitHandler.withToken(rt.wstETH).getPermitSignature(
14104
+ const { r, s: a, v: s, yParity: i, deadline: o } = await this.erc20PermitHandler.withToken($t.wstETH).getPermitSignature(
14075
14105
  t,
14076
14106
  Ce[this.chain].PufferDepositor,
14077
14107
  n
@@ -14972,11 +15002,11 @@ const xa = [
14972
15002
  name: "Unauthorized",
14973
15003
  inputs: []
14974
15004
  }
14975
- ], zl = {
14976
- [O.Mainnet]: { PufToken: xa },
14977
- [O.Holesky]: { PufToken: xa }
15005
+ ], _l = {
15006
+ [k.Mainnet]: { PufToken: xa },
15007
+ [k.Holesky]: { PufToken: xa }
14978
15008
  };
14979
- class _l {
15009
+ class ql {
14980
15010
  /**
14981
15011
  * Create the handler for the `PufToken` contract exposing methods to
14982
15012
  * interact with the contract.
@@ -14990,7 +15020,7 @@ class _l {
14990
15020
  constructor(t, n, r) {
14991
15021
  L(this, "viemChain");
14992
15022
  L(this, "pufToken");
14993
- this.chain = t, this.walletClient = n, this.publicClient = r, this.pufToken = rt.pufWETH, this.viemChain = we[t];
15023
+ this.chain = t, this.walletClient = n, this.publicClient = r, this.pufToken = $t.pufWETH, this.viemChain = we[t];
14994
15024
  }
14995
15025
  /**
14996
15026
  * Set the PufToken to use for executing transactions on the contract.
@@ -15008,9 +15038,9 @@ class _l {
15008
15038
  * @returns The viem contract.
15009
15039
  */
15010
15040
  getContract() {
15011
- return ut({
15012
- address: fe[this.pufToken][this.chain],
15013
- abi: zl[this.chain].PufToken,
15041
+ return ot({
15042
+ address: ce[this.pufToken][this.chain],
15043
+ abi: _l[this.chain].PufToken,
15014
15044
  client: {
15015
15045
  wallet: this.walletClient,
15016
15046
  public: this.publicClient
@@ -15145,7 +15175,7 @@ class _l {
15145
15175
  });
15146
15176
  }
15147
15177
  }
15148
- class ql {
15178
+ class Gl {
15149
15179
  /**
15150
15180
  * Create the handler for the `PufferL2Depositor` contract exposing
15151
15181
  * methods to interact with the contract.
@@ -15172,7 +15202,7 @@ class ql {
15172
15202
  * @returns The viem contract.
15173
15203
  */
15174
15204
  getContract() {
15175
- return ut({
15205
+ return ot({
15176
15206
  address: Ce[this.chain].PufferL2Depositor,
15177
15207
  abi: Dl[this.chain].PufferL2Depositor,
15178
15208
  client: {
@@ -15183,8 +15213,8 @@ class ql {
15183
15213
  }
15184
15214
  /**
15185
15215
  * Deposit the given token which is pre-approved using
15186
- * `token.approve()` in exchange for pufETH. This doesn't make the
15187
- * transaction but returns two methods namely `transact` and
15216
+ * `Token.approve()` in exchange for wrapped PufToken. This doesn't
15217
+ * make the transaction but returns two methods namely `transact` and
15188
15218
  * `estimate`.
15189
15219
  *
15190
15220
  * @param token Token to deposit.
@@ -15196,15 +15226,15 @@ class ql {
15196
15226
  * `estimate: () => Promise<bigint>` - Gas estimate of the
15197
15227
  * transaction.
15198
15228
  */
15199
- depositAfterApproval(t, n, r) {
15229
+ depositPreApproved(t, n, r) {
15200
15230
  const a = [
15201
- fe[t][this.chain],
15231
+ ce[t][this.chain],
15202
15232
  n,
15203
- // Only `amount` is needed if `token.approve()` is already called.
15233
+ // Only `amount` is needed if `Token.approve()` is already called.
15204
15234
  // So using mock values for other properties.
15205
15235
  {
15206
- r: ue("0x", { size: 32 }),
15207
- s: ue("0x", { size: 32 }),
15236
+ r: te("0x", { size: 32 }),
15237
+ s: te("0x", { size: 32 }),
15208
15238
  v: 0,
15209
15239
  deadline: 0n,
15210
15240
  amount: r
@@ -15219,13 +15249,13 @@ class ql {
15219
15249
  }) };
15220
15250
  }
15221
15251
  /**
15222
- * Deposit the given token in exchange for pufETH. This doesn't make
15223
- * the transaction but returns two methods namely `transact` and
15224
- * `estimate`.
15252
+ * Deposit the given token in exchange for the wrapped PufToken. This
15253
+ * doesn't make the transaction but returns two methods namely
15254
+ * `transact` and `estimate`.
15225
15255
  *
15226
15256
  * Note that not all token contracts support permit signatures (e.g.
15227
15257
  * USDC). If a token's contract doesn't support permit signatures, use
15228
- * `Token.approve()` and call `depositAfterApproval()` instead.
15258
+ * `Token.approve()` and call `this.depositPreApproved()` instead.
15229
15259
  *
15230
15260
  * @param token Token to deposit.
15231
15261
  * @param walletAddress Wallet address to take the token from.
@@ -15249,7 +15279,7 @@ class ql {
15249
15279
  deadline: c,
15250
15280
  amount: r
15251
15281
  }, d = [
15252
- fe[t][this.chain],
15282
+ ce[t][this.chain],
15253
15283
  n,
15254
15284
  l,
15255
15285
  a
@@ -15618,11 +15648,11 @@ const Ea = [
15618
15648
  stateMutability: "nonpayable",
15619
15649
  type: "function"
15620
15650
  }
15621
- ], Gl = {
15622
- [O.Mainnet]: { PufLocker: Ea },
15623
- [O.Holesky]: { PufLocker: Ea }
15651
+ ], Wl = {
15652
+ [k.Mainnet]: { PufLocker: Ea },
15653
+ [k.Holesky]: { PufLocker: Ea }
15624
15654
  };
15625
- class Wl {
15655
+ class Vl {
15626
15656
  /**
15627
15657
  * Create the handler for the `PufLocker` contract exposing methods to
15628
15658
  * interact with the contract.
@@ -15649,9 +15679,9 @@ class Wl {
15649
15679
  * @returns The viem contract.
15650
15680
  */
15651
15681
  getContract() {
15652
- return ut({
15682
+ return ot({
15653
15683
  address: Ce[this.chain].PufLocker,
15654
- abi: Gl[this.chain].PufLocker,
15684
+ abi: Wl[this.chain].PufLocker,
15655
15685
  client: {
15656
15686
  wallet: this.walletClient,
15657
15687
  public: this.publicClient
@@ -15667,7 +15697,7 @@ class Wl {
15667
15697
  */
15668
15698
  getAllDeposits(t, n) {
15669
15699
  return this.getContract().read.getAllDeposits([
15670
- fe[t][this.chain],
15700
+ ce[t][this.chain],
15671
15701
  n
15672
15702
  ]);
15673
15703
  }
@@ -15683,7 +15713,7 @@ class Wl {
15683
15713
  getDeposits(t, n, r, a) {
15684
15714
  return this.getContract().read.getDeposits([
15685
15715
  n,
15686
- fe[t][this.chain],
15716
+ ce[t][this.chain],
15687
15717
  r,
15688
15718
  a
15689
15719
  ]);
@@ -15698,13 +15728,56 @@ class Wl {
15698
15728
  return this.getContract().read.getLockPeriods();
15699
15729
  }
15700
15730
  /**
15701
- * Deposit the given PufToken into the locker.
15731
+ * Deposit the given pre-approved PufToken into the locker. A token
15732
+ * can be pre-approved using `Token.approve()`, This doesn't make the
15733
+ * transaction but returns two methods namely `transact` and
15734
+ * `estimate`.
15735
+ *
15736
+ * @param pufToken PufToken to deposit.
15737
+ * @param walletAddress Wallet address of the depositor.
15738
+ * @param value Amount of the deposit.
15739
+ * @param lockPeriod The period for the deposit in seconds.
15740
+ * @returns `transact: () => Promise<Address>` - Used to make the
15741
+ * transaction.
15742
+ *
15743
+ * `estimate: () => Promise<bigint>` - Gas estimate of the
15744
+ * transaction.
15745
+ */
15746
+ async depositPreApproved(t, n, r, a) {
15747
+ const s = [
15748
+ ce[t][this.chain],
15749
+ a,
15750
+ // Only `amount` is needed if `Token.approve()` is already called.
15751
+ // So using mock values for other properties.
15752
+ {
15753
+ r: te("0x", { size: 32 }),
15754
+ s: te("0x", { size: 32 }),
15755
+ v: 0,
15756
+ deadline: 0n,
15757
+ amount: r
15758
+ }
15759
+ ];
15760
+ return { transact: () => this.getContract().write.deposit(s, {
15761
+ account: n,
15762
+ chain: this.viemChain
15763
+ }), estimate: () => this.getContract().estimateGas.deposit(s, {
15764
+ account: n
15765
+ }) };
15766
+ }
15767
+ /**
15768
+ * Deposit the given PufToken into the locker. This doesn't make the
15769
+ * transaction but returns two methods namely `transact` and
15770
+ * `estimate`.
15702
15771
  *
15703
15772
  * @param pufToken PufToken to deposit.
15704
15773
  * @param walletAddress Wallet address of the depositor.
15705
15774
  * @param value Amount of the deposit.
15706
15775
  * @param lockPeriod The period for the deposit in seconds.
15707
- * @returns The transaction hash of the deposit.
15776
+ * @returns `transact: () => Promise<Address>` - Used to make the
15777
+ * transaction.
15778
+ *
15779
+ * `estimate: () => Promise<bigint>` - Gas estimate of the
15780
+ * transaction.
15708
15781
  */
15709
15782
  async deposit(t, n, r, a) {
15710
15783
  const { r: s, s: i, v: o, yParity: u, deadline: c } = await this.erc20PermitHandler.withToken(t).getPermitSignature(
@@ -15718,7 +15791,7 @@ class Wl {
15718
15791
  deadline: c,
15719
15792
  amount: r
15720
15793
  }, d = [
15721
- fe[t][this.chain],
15794
+ ce[t][this.chain],
15722
15795
  a,
15723
15796
  l
15724
15797
  ];
@@ -15741,7 +15814,7 @@ class Wl {
15741
15814
  */
15742
15815
  withdraw(t, n, r, a) {
15743
15816
  const s = [
15744
- fe[t][this.chain],
15817
+ ce[t][this.chain],
15745
15818
  a,
15746
15819
  r
15747
15820
  ];
@@ -15753,7 +15826,7 @@ class Wl {
15753
15826
  }) };
15754
15827
  }
15755
15828
  }
15756
- class Kl {
15829
+ class Yl {
15757
15830
  /**
15758
15831
  * Create the Puffer Client.
15759
15832
  *
@@ -15794,19 +15867,19 @@ class Kl {
15794
15867
  t,
15795
15868
  this.walletClient,
15796
15869
  this.publicClient
15797
- ), this.depositor = new Hl(
15870
+ ), this.depositor = new zl(
15798
15871
  t,
15799
15872
  this.walletClient,
15800
15873
  this.publicClient
15801
- ), this.pufToken = new _l(
15874
+ ), this.pufToken = new ql(
15802
15875
  t,
15803
15876
  this.walletClient,
15804
15877
  this.publicClient
15805
- ), this.l2Depositor = new ql(
15878
+ ), this.l2Depositor = new Gl(
15806
15879
  t,
15807
15880
  this.walletClient,
15808
15881
  this.publicClient
15809
- ), this.pufLocker = new Wl(
15882
+ ), this.pufLocker = new Vl(
15810
15883
  t,
15811
15884
  this.walletClient,
15812
15885
  this.publicClient
@@ -15854,21 +15927,22 @@ class nr {
15854
15927
  }
15855
15928
  export {
15856
15929
  v as B,
15857
- O as C,
15858
- ft as H,
15859
- Kl as P,
15860
- rt as T,
15930
+ k as C,
15931
+ yt as H,
15932
+ Yl as P,
15933
+ $t as T,
15861
15934
  we as V,
15862
15935
  ge as a,
15863
- ce as b,
15936
+ de as b,
15864
15937
  dn as c,
15865
15938
  Tu as d,
15866
15939
  kt as e,
15867
15940
  nr as f,
15868
15941
  rr as g,
15869
- fe as h,
15942
+ ce as h,
15870
15943
  dd as i,
15871
- Ce as j,
15944
+ Ll as j,
15945
+ Ce as k,
15872
15946
  W as s
15873
15947
  };
15874
- //# sourceMappingURL=main-Cl9ZFxdC.js.map
15948
+ //# sourceMappingURL=main-DXvt8xU1.js.map