@springmicro/auth 0.7.16 → 0.7.20
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.
- package/dist/{Index-1e31d199-CO-3sUD-.js → Index-1e31d199-BXGGyb0l.js} +48 -48
- package/dist/{Index-6078f122-CDowfR7U.js → Index-6078f122-DGZJdnAZ.js} +67 -67
- package/dist/{Web3Auth-C1gorwXx.js → Web3Auth-DG8Yz_cD.js} +5884 -5161
- package/dist/{ccip-c78d2f16-DUJGUJJo.js → ccip-c78d2f16-BfTJLflq.js} +2 -2
- package/dist/{hmac-CGR-aDxj.js → hmac-CW2mnXa8.js} +1 -1
- package/dist/{index-021f6a62-DBObZnNM.js → index-021f6a62-CxfpndDE.js} +32 -32
- package/dist/{index-40a497ea-BEwImqwN.js → index-40a497ea-BRLn4BDo.js} +3 -3
- package/dist/index-B51q7F_W.js +9742 -0
- package/dist/{index-cTAxNlZn.js → index-BXvsDp0W.js} +582 -584
- package/dist/{index-D0GY6Fny.js → index-BYJic99M.js} +1400 -1751
- package/dist/{index-DJiTRo2_.js → index-Bfb6JoQf.js} +9082 -8717
- package/dist/{index-BIEw47XG.js → index-C8R4klyg.js} +27 -27
- package/dist/{index-ClXLxv7Y.js → index-CBbDq4vF.js} +3310 -3294
- package/dist/{index-C2J9ZZ0N.js → index-DbQi7wFl.js} +26 -26
- package/dist/index-hDobpv7u.js +32 -0
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +297 -298
- package/dist/native-FDN9oNjc.js +15 -0
- package/dist/{number-9K9sKV6s.js → number-DvQcSzeP.js} +556 -335
- package/dist/parseEther-C7cmMVOE.js +24 -0
- package/dist/{sha256-JJGtJ2gn.js → sha256-C90UGNQg.js} +8 -7
- package/dist/{transactionRequest-be6a8ea9-_q5BIZxq.js → transactionRequest-be6a8ea9-CCwC71wa.js} +9 -9
- package/package.json +4 -4
- package/src/components/SignUp.tsx +19 -19
- package/src/components/forms/CaptchaController.tsx +2 -2
- package/dist/index-BLh7Sl_6.js +0 -6151
- package/dist/index-bH4yLInF.js +0 -29
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { w as
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
return t ? { h: Number(e &
|
|
1
|
+
import { i as H, t as ne, q as l, B as u, o as Ee, s as P, z as se, D as Ue, v as Oe, j as $e, d as w, n as y, f as G, g as B, e as X } from "./Web3Auth-DG8Yz_cD.js";
|
|
2
|
+
import { w as Fe, H as Ge, n as W, d as Le, e as Y, t as je, b as ze, o as Ce, s as Ae } from "./sha256-C90UGNQg.js";
|
|
3
|
+
const F = /* @__PURE__ */ BigInt(2 ** 32 - 1), J = /* @__PURE__ */ BigInt(32);
|
|
4
|
+
function He(e, t = !1) {
|
|
5
|
+
return t ? { h: Number(e & F), l: Number(e >> J & F) } : { h: Number(e >> J & F) | 0, l: Number(e & F) | 0 };
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function Ne(e, t = !1) {
|
|
8
8
|
let n = new Uint32Array(e.length), i = new Uint32Array(e.length);
|
|
9
9
|
for (let s = 0; s < e.length; s++) {
|
|
10
|
-
const { h: o, l: r } =
|
|
10
|
+
const { h: o, l: r } = He(e[s], t);
|
|
11
11
|
[n[s], i[s]] = [o, r];
|
|
12
12
|
}
|
|
13
13
|
return [n, i];
|
|
14
14
|
}
|
|
15
|
-
const
|
|
16
|
-
for (let e = 0, t =
|
|
17
|
-
[n, i] = [i, (2 * n + 3 * i) % 5],
|
|
18
|
-
let s =
|
|
15
|
+
const ke = (e, t, n) => e << n | t >>> 32 - n, Se = (e, t, n) => t << n | e >>> 32 - n, Me = (e, t, n) => t << n - 32 | e >>> 64 - n, Ve = (e, t, n) => e << n - 32 | t >>> 64 - n, [ie, re, oe] = [[], [], []], _e = /* @__PURE__ */ BigInt(0), T = /* @__PURE__ */ BigInt(1), Re = /* @__PURE__ */ BigInt(2), De = /* @__PURE__ */ BigInt(7), Ke = /* @__PURE__ */ BigInt(256), Xe = /* @__PURE__ */ BigInt(113);
|
|
16
|
+
for (let e = 0, t = T, n = 1, i = 0; e < 24; e++) {
|
|
17
|
+
[n, i] = [i, (2 * n + 3 * i) % 5], ie.push(2 * (5 * i + n)), re.push((e + 1) * (e + 2) / 2 % 64);
|
|
18
|
+
let s = _e;
|
|
19
19
|
for (let o = 0; o < 7; o++)
|
|
20
|
-
t = (t <<
|
|
21
|
-
|
|
20
|
+
t = (t << T ^ (t >> De) * Xe) % Ke, t & Re && (s ^= T << (T << /* @__PURE__ */ BigInt(o)) - T);
|
|
21
|
+
oe.push(s);
|
|
22
22
|
}
|
|
23
|
-
const [
|
|
24
|
-
function
|
|
23
|
+
const [We, Ye] = /* @__PURE__ */ Ne(oe, !0), Q = (e, t, n) => n > 32 ? Me(e, t, n) : ke(e, t, n), Z = (e, t, n) => n > 32 ? Ve(e, t, n) : Se(e, t, n);
|
|
24
|
+
function Je(e, t = 24) {
|
|
25
25
|
const n = new Uint32Array(10);
|
|
26
26
|
for (let i = 24 - t; i < 24; i++) {
|
|
27
27
|
for (let r = 0; r < 10; r++)
|
|
28
28
|
n[r] = e[r] ^ e[r + 10] ^ e[r + 20] ^ e[r + 30] ^ e[r + 40];
|
|
29
29
|
for (let r = 0; r < 10; r += 2) {
|
|
30
|
-
const a = (r + 8) % 10,
|
|
30
|
+
const a = (r + 8) % 10, c = (r + 2) % 10, f = n[c], d = n[c + 1], b = Q(f, d, 1) ^ n[a], m = Z(f, d, 1) ^ n[a + 1];
|
|
31
31
|
for (let h = 0; h < 50; h += 10)
|
|
32
|
-
e[r + h] ^= b, e[r + h + 1] ^=
|
|
32
|
+
e[r + h] ^= b, e[r + h + 1] ^= m;
|
|
33
33
|
}
|
|
34
34
|
let s = e[2], o = e[3];
|
|
35
35
|
for (let r = 0; r < 24; r++) {
|
|
36
|
-
const a =
|
|
37
|
-
s = e[d], o = e[d + 1], e[d] =
|
|
36
|
+
const a = re[r], c = Q(s, o, a), f = Z(s, o, a), d = ie[r];
|
|
37
|
+
s = e[d], o = e[d + 1], e[d] = c, e[d + 1] = f;
|
|
38
38
|
}
|
|
39
39
|
for (let r = 0; r < 50; r += 10) {
|
|
40
40
|
for (let a = 0; a < 10; a++)
|
|
@@ -42,24 +42,24 @@ function Xe(e, t = 24) {
|
|
|
42
42
|
for (let a = 0; a < 10; a++)
|
|
43
43
|
e[r + a] ^= ~n[(a + 2) % 10] & n[(a + 4) % 10];
|
|
44
44
|
}
|
|
45
|
-
e[0] ^=
|
|
45
|
+
e[0] ^= We[i], e[1] ^= Ye[i];
|
|
46
46
|
}
|
|
47
47
|
n.fill(0);
|
|
48
48
|
}
|
|
49
|
-
class
|
|
49
|
+
class N extends Ge {
|
|
50
50
|
// NOTE: we accept arguments in bytes instead of bits here.
|
|
51
51
|
constructor(t, n, i, s = !1, o = 24) {
|
|
52
|
-
if (super(), this.blockLen = t, this.suffix = n, this.outputLen = i, this.enableXOF = s, this.rounds = o, this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1,
|
|
52
|
+
if (super(), this.blockLen = t, this.suffix = n, this.outputLen = i, this.enableXOF = s, this.rounds = o, this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, W(i), 0 >= this.blockLen || this.blockLen >= 200)
|
|
53
53
|
throw new Error("Sha3 supports only keccak-f1600 function");
|
|
54
|
-
this.state = new Uint8Array(200), this.state32 =
|
|
54
|
+
this.state = new Uint8Array(200), this.state32 = Le(this.state);
|
|
55
55
|
}
|
|
56
56
|
keccak() {
|
|
57
|
-
|
|
57
|
+
Je(this.state32, this.rounds), this.posOut = 0, this.pos = 0;
|
|
58
58
|
}
|
|
59
59
|
update(t) {
|
|
60
60
|
Y(this);
|
|
61
61
|
const { blockLen: n, state: i } = this;
|
|
62
|
-
t =
|
|
62
|
+
t = je(t);
|
|
63
63
|
const s = t.length;
|
|
64
64
|
for (let o = 0; o < s; ) {
|
|
65
65
|
const r = Math.min(n - this.pos, s - o);
|
|
@@ -77,7 +77,7 @@ class H extends Fe {
|
|
|
77
77
|
t[i] ^= n, n & 128 && i === s - 1 && this.keccak(), t[s - 1] ^= 128, this.keccak();
|
|
78
78
|
}
|
|
79
79
|
writeInto(t) {
|
|
80
|
-
Y(this, !1),
|
|
80
|
+
Y(this, !1), ze(t), this.finish();
|
|
81
81
|
const n = this.state, { blockLen: i } = this;
|
|
82
82
|
for (let s = 0, o = t.length; s < o; ) {
|
|
83
83
|
this.posOut >= i && this.keccak();
|
|
@@ -92,10 +92,10 @@ class H extends Fe {
|
|
|
92
92
|
return this.writeInto(t);
|
|
93
93
|
}
|
|
94
94
|
xof(t) {
|
|
95
|
-
return
|
|
95
|
+
return W(t), this.xofInto(new Uint8Array(t));
|
|
96
96
|
}
|
|
97
97
|
digestInto(t) {
|
|
98
|
-
if (
|
|
98
|
+
if (Ce(t, this), this.finished)
|
|
99
99
|
throw new Error("digest() was already called");
|
|
100
100
|
return this.writeInto(t), this.destroy(), t;
|
|
101
101
|
}
|
|
@@ -107,15 +107,15 @@ class H extends Fe {
|
|
|
107
107
|
}
|
|
108
108
|
_cloneInto(t) {
|
|
109
109
|
const { blockLen: n, suffix: i, outputLen: s, rounds: o, enableXOF: r } = this;
|
|
110
|
-
return t || (t = new
|
|
110
|
+
return t || (t = new N(n, i, s, r, o)), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = o, t.suffix = i, t.outputLen = s, t.enableXOF = r, t.destroyed = this.destroyed, t;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
const
|
|
114
|
-
function
|
|
115
|
-
const n = t || "hex", i =
|
|
116
|
-
return n === "bytes" ? i :
|
|
113
|
+
const Qe = (e, t, n) => Fe(() => new N(t, e, n)), Ze = /* @__PURE__ */ Qe(1, 136, 256 / 8);
|
|
114
|
+
function qe(e, t) {
|
|
115
|
+
const n = t || "hex", i = Ze(H(e, { strict: !1 }) ? ne(e) : e);
|
|
116
|
+
return n === "bytes" ? i : l(i);
|
|
117
117
|
}
|
|
118
|
-
class
|
|
118
|
+
class E extends u {
|
|
119
119
|
constructor({ address: t }) {
|
|
120
120
|
super(`Address "${t}" is invalid.`, {
|
|
121
121
|
metaMessages: [
|
|
@@ -130,7 +130,7 @@ class G extends u {
|
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
class
|
|
133
|
+
class ae extends Map {
|
|
134
134
|
constructor(t) {
|
|
135
135
|
super(), Object.defineProperty(this, "maxSize", {
|
|
136
136
|
enumerable: !0,
|
|
@@ -143,28 +143,33 @@ class oe extends Map {
|
|
|
143
143
|
return super.set(t, n), this.maxSize && this.size > this.maxSize && this.delete(this.keys().next().value), this;
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
const C = /* @__PURE__ */ new
|
|
147
|
-
function
|
|
146
|
+
const C = /* @__PURE__ */ new ae(8192);
|
|
147
|
+
function ue(e, t) {
|
|
148
148
|
if (C.has(`${e}.${t}`))
|
|
149
149
|
return C.get(`${e}.${t}`);
|
|
150
|
-
const n = e.substring(2).toLowerCase(), i =
|
|
150
|
+
const n = t ? `${t}${e.toLowerCase()}` : e.substring(2).toLowerCase(), i = qe(Ee(n), "bytes"), s = (t ? n.substring(`${t}0x`.length) : n).split("");
|
|
151
151
|
for (let r = 0; r < 40; r += 2)
|
|
152
152
|
i[r >> 1] >> 4 >= 8 && s[r] && (s[r] = s[r].toUpperCase()), (i[r >> 1] & 15) >= 8 && s[r + 1] && (s[r + 1] = s[r + 1].toUpperCase());
|
|
153
153
|
const o = `0x${s.join("")}`;
|
|
154
154
|
return C.set(`${e}.${t}`, o), o;
|
|
155
155
|
}
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
function Dt(e, t) {
|
|
157
|
+
if (!U(e, { strict: !1 }))
|
|
158
|
+
throw new E({ address: e });
|
|
159
|
+
return ue(e, t);
|
|
160
|
+
}
|
|
161
|
+
const et = /^0x[a-fA-F0-9]{40}$/, A = /* @__PURE__ */ new ae(8192);
|
|
162
|
+
function U(e, t) {
|
|
158
163
|
const { strict: n = !0 } = t ?? {};
|
|
159
|
-
if (
|
|
160
|
-
return
|
|
161
|
-
const i =
|
|
162
|
-
return
|
|
164
|
+
if (A.has(e))
|
|
165
|
+
return A.get(e);
|
|
166
|
+
const i = et.test(e) ? e.toLowerCase() === e ? !0 : n ? ue(e) === e : !0 : !1;
|
|
167
|
+
return A.set(e, i), i;
|
|
163
168
|
}
|
|
164
|
-
function
|
|
165
|
-
return typeof e[0] == "string" ?
|
|
169
|
+
function Kt(e) {
|
|
170
|
+
return typeof e[0] == "string" ? L(e) : tt(e);
|
|
166
171
|
}
|
|
167
|
-
function
|
|
172
|
+
function tt(e) {
|
|
168
173
|
let t = 0;
|
|
169
174
|
for (const s of e)
|
|
170
175
|
t += s.length;
|
|
@@ -174,43 +179,43 @@ function qe(e) {
|
|
|
174
179
|
n.set(s, i), i += s.length;
|
|
175
180
|
return n;
|
|
176
181
|
}
|
|
177
|
-
function
|
|
182
|
+
function L(e) {
|
|
178
183
|
return `0x${e.reduce((t, n) => t + n.replace("0x", ""), "")}`;
|
|
179
184
|
}
|
|
180
|
-
function
|
|
181
|
-
return
|
|
185
|
+
function nt(e, t, n, { strict: i } = {}) {
|
|
186
|
+
return H(e, { strict: !1 }) ? it(e, t, n, {
|
|
182
187
|
strict: i
|
|
183
|
-
}) :
|
|
188
|
+
}) : st(e, t, n, {
|
|
184
189
|
strict: i
|
|
185
190
|
});
|
|
186
191
|
}
|
|
187
|
-
function
|
|
188
|
-
if (typeof t == "number" && t > 0 && t >
|
|
189
|
-
throw new
|
|
192
|
+
function ce(e, t) {
|
|
193
|
+
if (typeof t == "number" && t > 0 && t > P(e) - 1)
|
|
194
|
+
throw new se({
|
|
190
195
|
offset: t,
|
|
191
196
|
position: "start",
|
|
192
|
-
size:
|
|
197
|
+
size: P(e)
|
|
193
198
|
});
|
|
194
199
|
}
|
|
195
|
-
function
|
|
196
|
-
if (typeof t == "number" && typeof n == "number" &&
|
|
197
|
-
throw new
|
|
200
|
+
function le(e, t, n) {
|
|
201
|
+
if (typeof t == "number" && typeof n == "number" && P(e) !== n - t)
|
|
202
|
+
throw new se({
|
|
198
203
|
offset: n,
|
|
199
204
|
position: "end",
|
|
200
|
-
size:
|
|
205
|
+
size: P(e)
|
|
201
206
|
});
|
|
202
207
|
}
|
|
203
|
-
function
|
|
204
|
-
|
|
208
|
+
function st(e, t, n, { strict: i } = {}) {
|
|
209
|
+
ce(e, t);
|
|
205
210
|
const s = e.slice(t, n);
|
|
206
|
-
return i &&
|
|
211
|
+
return i && le(s, t, n), s;
|
|
207
212
|
}
|
|
208
|
-
function
|
|
209
|
-
|
|
213
|
+
function it(e, t, n, { strict: i } = {}) {
|
|
214
|
+
ce(e, t);
|
|
210
215
|
const s = `0x${e.replace("0x", "").slice((t ?? 0) * 2, (n ?? e.length) * 2)}`;
|
|
211
|
-
return i &&
|
|
216
|
+
return i && le(s, t, n), s;
|
|
212
217
|
}
|
|
213
|
-
class
|
|
218
|
+
class q extends u {
|
|
214
219
|
constructor({ offset: t }) {
|
|
215
220
|
super(`Offset \`${t}\` cannot be negative.`), Object.defineProperty(this, "name", {
|
|
216
221
|
enumerable: !0,
|
|
@@ -220,7 +225,7 @@ class Z extends u {
|
|
|
220
225
|
});
|
|
221
226
|
}
|
|
222
227
|
}
|
|
223
|
-
class
|
|
228
|
+
class rt extends u {
|
|
224
229
|
constructor({ length: t, position: n }) {
|
|
225
230
|
super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`), Object.defineProperty(this, "name", {
|
|
226
231
|
enumerable: !0,
|
|
@@ -230,7 +235,7 @@ class st extends u {
|
|
|
230
235
|
});
|
|
231
236
|
}
|
|
232
237
|
}
|
|
233
|
-
class
|
|
238
|
+
class ot extends u {
|
|
234
239
|
constructor({ count: t, limit: n }) {
|
|
235
240
|
super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`), Object.defineProperty(this, "name", {
|
|
236
241
|
enumerable: !0,
|
|
@@ -240,7 +245,7 @@ class it extends u {
|
|
|
240
245
|
});
|
|
241
246
|
}
|
|
242
247
|
}
|
|
243
|
-
const
|
|
248
|
+
const at = {
|
|
244
249
|
bytes: new Uint8Array(),
|
|
245
250
|
dataView: new DataView(new ArrayBuffer(0)),
|
|
246
251
|
position: 0,
|
|
@@ -249,21 +254,21 @@ const rt = {
|
|
|
249
254
|
recursiveReadLimit: Number.POSITIVE_INFINITY,
|
|
250
255
|
assertReadLimit() {
|
|
251
256
|
if (this.recursiveReadCount >= this.recursiveReadLimit)
|
|
252
|
-
throw new
|
|
257
|
+
throw new ot({
|
|
253
258
|
count: this.recursiveReadCount + 1,
|
|
254
259
|
limit: this.recursiveReadLimit
|
|
255
260
|
});
|
|
256
261
|
},
|
|
257
262
|
assertPosition(e) {
|
|
258
263
|
if (e < 0 || e > this.bytes.length - 1)
|
|
259
|
-
throw new
|
|
264
|
+
throw new rt({
|
|
260
265
|
length: this.bytes.length,
|
|
261
266
|
position: e
|
|
262
267
|
});
|
|
263
268
|
},
|
|
264
269
|
decrementPosition(e) {
|
|
265
270
|
if (e < 0)
|
|
266
|
-
throw new
|
|
271
|
+
throw new q({ offset: e });
|
|
267
272
|
const t = this.position - e;
|
|
268
273
|
this.assertPosition(t), this.position = t;
|
|
269
274
|
},
|
|
@@ -272,7 +277,7 @@ const rt = {
|
|
|
272
277
|
},
|
|
273
278
|
incrementPosition(e) {
|
|
274
279
|
if (e < 0)
|
|
275
|
-
throw new
|
|
280
|
+
throw new q({ offset: e });
|
|
276
281
|
const t = this.position + e;
|
|
277
282
|
this.assertPosition(t), this.position = t;
|
|
278
283
|
},
|
|
@@ -362,19 +367,19 @@ const rt = {
|
|
|
362
367
|
this.positionReadCount.set(this.position, e + 1), e > 0 && this.recursiveReadCount++;
|
|
363
368
|
}
|
|
364
369
|
};
|
|
365
|
-
function
|
|
366
|
-
const n = Object.create(
|
|
370
|
+
function fe(e, { recursiveReadLimit: t = 8192 } = {}) {
|
|
371
|
+
const n = Object.create(at);
|
|
367
372
|
return n.bytes = e, n.dataView = new DataView(e.buffer, e.byteOffset, e.byteLength), n.positionReadCount = /* @__PURE__ */ new Map(), n.recursiveReadLimit = t, n;
|
|
368
373
|
}
|
|
369
|
-
function
|
|
370
|
-
return
|
|
374
|
+
function x(e, t = "wei") {
|
|
375
|
+
return Ue(e, Oe[t]);
|
|
371
376
|
}
|
|
372
|
-
function
|
|
377
|
+
function de(e) {
|
|
373
378
|
const t = Object.entries(e).map(([i, s]) => s === void 0 || s === !1 ? null : [i, s]).filter(Boolean), n = t.reduce((i, [s]) => Math.max(i, s.length), 0);
|
|
374
379
|
return t.map(([i, s]) => ` ${`${i}:`.padEnd(n + 1)} ${s}`).join(`
|
|
375
380
|
`);
|
|
376
381
|
}
|
|
377
|
-
class
|
|
382
|
+
class Xt extends u {
|
|
378
383
|
constructor() {
|
|
379
384
|
super([
|
|
380
385
|
"Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.",
|
|
@@ -388,7 +393,7 @@ class Dt extends u {
|
|
|
388
393
|
});
|
|
389
394
|
}
|
|
390
395
|
}
|
|
391
|
-
class
|
|
396
|
+
class ut extends u {
|
|
392
397
|
constructor({ v: t }) {
|
|
393
398
|
super(`Invalid \`v\` value "${t}". Expected 27 or 28.`), Object.defineProperty(this, "name", {
|
|
394
399
|
enumerable: !0,
|
|
@@ -398,13 +403,13 @@ class at extends u {
|
|
|
398
403
|
});
|
|
399
404
|
}
|
|
400
405
|
}
|
|
401
|
-
class
|
|
406
|
+
class ct extends u {
|
|
402
407
|
constructor({ transaction: t }) {
|
|
403
408
|
super("Cannot infer a transaction type from provided transaction.", {
|
|
404
409
|
metaMessages: [
|
|
405
410
|
"Provided Transaction:",
|
|
406
411
|
"{",
|
|
407
|
-
|
|
412
|
+
de(t),
|
|
408
413
|
"}",
|
|
409
414
|
"",
|
|
410
415
|
"To infer the type, either provide:",
|
|
@@ -422,7 +427,48 @@ class ut extends u {
|
|
|
422
427
|
});
|
|
423
428
|
}
|
|
424
429
|
}
|
|
425
|
-
class
|
|
430
|
+
class Wt extends u {
|
|
431
|
+
constructor({ serializedType: t }) {
|
|
432
|
+
super(`Serialized transaction type "${t}" is invalid.`), Object.defineProperty(this, "name", {
|
|
433
|
+
enumerable: !0,
|
|
434
|
+
configurable: !0,
|
|
435
|
+
writable: !0,
|
|
436
|
+
value: "InvalidSerializedTransactionType"
|
|
437
|
+
}), Object.defineProperty(this, "serializedType", {
|
|
438
|
+
enumerable: !0,
|
|
439
|
+
configurable: !0,
|
|
440
|
+
writable: !0,
|
|
441
|
+
value: void 0
|
|
442
|
+
}), this.serializedType = t;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
class Yt extends u {
|
|
446
|
+
constructor({ attributes: t, serializedTransaction: n, type: i }) {
|
|
447
|
+
const s = Object.entries(t).map(([o, r]) => typeof r > "u" ? o : void 0).filter(Boolean);
|
|
448
|
+
super(`Invalid serialized transaction of type "${i}" was provided.`, {
|
|
449
|
+
metaMessages: [
|
|
450
|
+
`Serialized Transaction: "${n}"`,
|
|
451
|
+
s.length > 0 ? `Missing Attributes: ${s.join(", ")}` : ""
|
|
452
|
+
].filter(Boolean)
|
|
453
|
+
}), Object.defineProperty(this, "name", {
|
|
454
|
+
enumerable: !0,
|
|
455
|
+
configurable: !0,
|
|
456
|
+
writable: !0,
|
|
457
|
+
value: "InvalidSerializedTransactionError"
|
|
458
|
+
}), Object.defineProperty(this, "serializedTransaction", {
|
|
459
|
+
enumerable: !0,
|
|
460
|
+
configurable: !0,
|
|
461
|
+
writable: !0,
|
|
462
|
+
value: void 0
|
|
463
|
+
}), Object.defineProperty(this, "type", {
|
|
464
|
+
enumerable: !0,
|
|
465
|
+
configurable: !0,
|
|
466
|
+
writable: !0,
|
|
467
|
+
value: void 0
|
|
468
|
+
}), this.serializedTransaction = n, this.type = i;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
class lt extends u {
|
|
426
472
|
constructor({ storageKey: t }) {
|
|
427
473
|
super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length - 2) / 2)} bytes.`), Object.defineProperty(this, "name", {
|
|
428
474
|
enumerable: !0,
|
|
@@ -432,7 +478,43 @@ class ct extends u {
|
|
|
432
478
|
});
|
|
433
479
|
}
|
|
434
480
|
}
|
|
435
|
-
class
|
|
481
|
+
class Jt extends u {
|
|
482
|
+
constructor(t, { account: n, docsPath: i, chain: s, data: o, gas: r, gasPrice: a, maxFeePerGas: c, maxPriorityFeePerGas: f, nonce: d, to: b, value: m }) {
|
|
483
|
+
var O;
|
|
484
|
+
const h = de({
|
|
485
|
+
chain: s && `${s == null ? void 0 : s.name} (id: ${s == null ? void 0 : s.id})`,
|
|
486
|
+
from: n == null ? void 0 : n.address,
|
|
487
|
+
to: b,
|
|
488
|
+
value: typeof m < "u" && `${$e(m)} ${((O = s == null ? void 0 : s.nativeCurrency) == null ? void 0 : O.symbol) || "ETH"}`,
|
|
489
|
+
data: o,
|
|
490
|
+
gas: r,
|
|
491
|
+
gasPrice: typeof a < "u" && `${x(a)} gwei`,
|
|
492
|
+
maxFeePerGas: typeof c < "u" && `${x(c)} gwei`,
|
|
493
|
+
maxPriorityFeePerGas: typeof f < "u" && `${x(f)} gwei`,
|
|
494
|
+
nonce: d
|
|
495
|
+
});
|
|
496
|
+
super(t.shortMessage, {
|
|
497
|
+
cause: t,
|
|
498
|
+
docsPath: i,
|
|
499
|
+
metaMessages: [
|
|
500
|
+
...t.metaMessages ? [...t.metaMessages, " "] : [],
|
|
501
|
+
"Request Arguments:",
|
|
502
|
+
h
|
|
503
|
+
].filter(Boolean)
|
|
504
|
+
}), Object.defineProperty(this, "cause", {
|
|
505
|
+
enumerable: !0,
|
|
506
|
+
configurable: !0,
|
|
507
|
+
writable: !0,
|
|
508
|
+
value: void 0
|
|
509
|
+
}), Object.defineProperty(this, "name", {
|
|
510
|
+
enumerable: !0,
|
|
511
|
+
configurable: !0,
|
|
512
|
+
writable: !0,
|
|
513
|
+
value: "TransactionExecutionError"
|
|
514
|
+
}), this.cause = t;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
class Qt extends u {
|
|
436
518
|
constructor({ blockHash: t, blockNumber: n, blockTag: i, hash: s, index: o }) {
|
|
437
519
|
let r = "Transaction";
|
|
438
520
|
i && o !== void 0 && (r = `Transaction at block time "${i}" at index "${o}"`), t && o !== void 0 && (r = `Transaction at block hash "${t}" at index "${o}"`), n && o !== void 0 && (r = `Transaction at block number "${n}" at index "${o}"`), s && (r = `Transaction with hash "${s}"`), super(`${r} could not be found.`), Object.defineProperty(this, "name", {
|
|
@@ -443,7 +525,7 @@ class Kt extends u {
|
|
|
443
525
|
});
|
|
444
526
|
}
|
|
445
527
|
}
|
|
446
|
-
class
|
|
528
|
+
class Zt extends u {
|
|
447
529
|
constructor({ hash: t }) {
|
|
448
530
|
super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`), Object.defineProperty(this, "name", {
|
|
449
531
|
enumerable: !0,
|
|
@@ -453,7 +535,7 @@ class Xt extends u {
|
|
|
453
535
|
});
|
|
454
536
|
}
|
|
455
537
|
}
|
|
456
|
-
class
|
|
538
|
+
class qt extends u {
|
|
457
539
|
constructor({ hash: t }) {
|
|
458
540
|
super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`), Object.defineProperty(this, "name", {
|
|
459
541
|
enumerable: !0,
|
|
@@ -463,7 +545,7 @@ class Yt extends u {
|
|
|
463
545
|
});
|
|
464
546
|
}
|
|
465
547
|
}
|
|
466
|
-
class
|
|
548
|
+
class he extends u {
|
|
467
549
|
constructor({ cause: t, message: n } = {}) {
|
|
468
550
|
var s;
|
|
469
551
|
const i = (s = n == null ? void 0 : n.replace("execution reverted: ", "")) == null ? void 0 : s.replace("execution reverted", "");
|
|
@@ -477,21 +559,21 @@ class le extends u {
|
|
|
477
559
|
});
|
|
478
560
|
}
|
|
479
561
|
}
|
|
480
|
-
Object.defineProperty(
|
|
562
|
+
Object.defineProperty(he, "code", {
|
|
481
563
|
enumerable: !0,
|
|
482
564
|
configurable: !0,
|
|
483
565
|
writable: !0,
|
|
484
566
|
value: 3
|
|
485
567
|
});
|
|
486
|
-
Object.defineProperty(
|
|
568
|
+
Object.defineProperty(he, "nodeMessage", {
|
|
487
569
|
enumerable: !0,
|
|
488
570
|
configurable: !0,
|
|
489
571
|
writable: !0,
|
|
490
572
|
value: /execution reverted/
|
|
491
573
|
});
|
|
492
|
-
class
|
|
574
|
+
class j extends u {
|
|
493
575
|
constructor({ cause: t, maxFeePerGas: n } = {}) {
|
|
494
|
-
super(`The fee cap (\`maxFeePerGas\`${n ? ` = ${
|
|
576
|
+
super(`The fee cap (\`maxFeePerGas\`${n ? ` = ${x(n)} gwei` : ""}) cannot be higher than the maximum allowed value (2^256-1).`, {
|
|
495
577
|
cause: t
|
|
496
578
|
}), Object.defineProperty(this, "name", {
|
|
497
579
|
enumerable: !0,
|
|
@@ -501,15 +583,15 @@ class U extends u {
|
|
|
501
583
|
});
|
|
502
584
|
}
|
|
503
585
|
}
|
|
504
|
-
Object.defineProperty(
|
|
586
|
+
Object.defineProperty(j, "nodeMessage", {
|
|
505
587
|
enumerable: !0,
|
|
506
588
|
configurable: !0,
|
|
507
589
|
writable: !0,
|
|
508
590
|
value: /max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/
|
|
509
591
|
});
|
|
510
|
-
class
|
|
592
|
+
class ft extends u {
|
|
511
593
|
constructor({ cause: t, maxFeePerGas: n } = {}) {
|
|
512
|
-
super(`The fee cap (\`maxFeePerGas\`${n ? ` = ${
|
|
594
|
+
super(`The fee cap (\`maxFeePerGas\`${n ? ` = ${x(n)}` : ""} gwei) cannot be lower than the block base fee.`, {
|
|
513
595
|
cause: t
|
|
514
596
|
}), Object.defineProperty(this, "name", {
|
|
515
597
|
enumerable: !0,
|
|
@@ -519,13 +601,13 @@ class lt extends u {
|
|
|
519
601
|
});
|
|
520
602
|
}
|
|
521
603
|
}
|
|
522
|
-
Object.defineProperty(
|
|
604
|
+
Object.defineProperty(ft, "nodeMessage", {
|
|
523
605
|
enumerable: !0,
|
|
524
606
|
configurable: !0,
|
|
525
607
|
writable: !0,
|
|
526
608
|
value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/
|
|
527
609
|
});
|
|
528
|
-
class
|
|
610
|
+
class dt extends u {
|
|
529
611
|
constructor({ cause: t, nonce: n } = {}) {
|
|
530
612
|
super(`Nonce provided for the transaction ${n ? `(${n}) ` : ""}is higher than the next one expected.`, { cause: t }), Object.defineProperty(this, "name", {
|
|
531
613
|
enumerable: !0,
|
|
@@ -535,13 +617,13 @@ class ft extends u {
|
|
|
535
617
|
});
|
|
536
618
|
}
|
|
537
619
|
}
|
|
538
|
-
Object.defineProperty(
|
|
620
|
+
Object.defineProperty(dt, "nodeMessage", {
|
|
539
621
|
enumerable: !0,
|
|
540
622
|
configurable: !0,
|
|
541
623
|
writable: !0,
|
|
542
624
|
value: /nonce too high/
|
|
543
625
|
});
|
|
544
|
-
class
|
|
626
|
+
class ht extends u {
|
|
545
627
|
constructor({ cause: t, nonce: n } = {}) {
|
|
546
628
|
super([
|
|
547
629
|
`Nonce provided for the transaction ${n ? `(${n}) ` : ""}is lower than the current nonce of the account.`,
|
|
@@ -555,13 +637,13 @@ class dt extends u {
|
|
|
555
637
|
});
|
|
556
638
|
}
|
|
557
639
|
}
|
|
558
|
-
Object.defineProperty(
|
|
640
|
+
Object.defineProperty(ht, "nodeMessage", {
|
|
559
641
|
enumerable: !0,
|
|
560
642
|
configurable: !0,
|
|
561
643
|
writable: !0,
|
|
562
644
|
value: /nonce too low|transaction already imported|already known/
|
|
563
645
|
});
|
|
564
|
-
class
|
|
646
|
+
class bt extends u {
|
|
565
647
|
constructor({ cause: t, nonce: n } = {}) {
|
|
566
648
|
super(`Nonce provided for the transaction ${n ? `(${n}) ` : ""}exceeds the maximum allowed nonce.`, { cause: t }), Object.defineProperty(this, "name", {
|
|
567
649
|
enumerable: !0,
|
|
@@ -571,13 +653,13 @@ class ht extends u {
|
|
|
571
653
|
});
|
|
572
654
|
}
|
|
573
655
|
}
|
|
574
|
-
Object.defineProperty(
|
|
656
|
+
Object.defineProperty(bt, "nodeMessage", {
|
|
575
657
|
enumerable: !0,
|
|
576
658
|
configurable: !0,
|
|
577
659
|
writable: !0,
|
|
578
660
|
value: /nonce has max value/
|
|
579
661
|
});
|
|
580
|
-
class
|
|
662
|
+
class mt extends u {
|
|
581
663
|
constructor({ cause: t } = {}) {
|
|
582
664
|
super([
|
|
583
665
|
"The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."
|
|
@@ -602,7 +684,7 @@ class bt extends u {
|
|
|
602
684
|
});
|
|
603
685
|
}
|
|
604
686
|
}
|
|
605
|
-
Object.defineProperty(
|
|
687
|
+
Object.defineProperty(mt, "nodeMessage", {
|
|
606
688
|
enumerable: !0,
|
|
607
689
|
configurable: !0,
|
|
608
690
|
writable: !0,
|
|
@@ -626,7 +708,7 @@ Object.defineProperty(pt, "nodeMessage", {
|
|
|
626
708
|
writable: !0,
|
|
627
709
|
value: /intrinsic gas too high|gas limit reached/
|
|
628
710
|
});
|
|
629
|
-
class
|
|
711
|
+
class yt extends u {
|
|
630
712
|
constructor({ cause: t, gas: n } = {}) {
|
|
631
713
|
super(`The amount of gas ${n ? `(${n}) ` : ""}provided for the transaction is too low.`, {
|
|
632
714
|
cause: t
|
|
@@ -638,13 +720,13 @@ class mt extends u {
|
|
|
638
720
|
});
|
|
639
721
|
}
|
|
640
722
|
}
|
|
641
|
-
Object.defineProperty(
|
|
723
|
+
Object.defineProperty(yt, "nodeMessage", {
|
|
642
724
|
enumerable: !0,
|
|
643
725
|
configurable: !0,
|
|
644
726
|
writable: !0,
|
|
645
727
|
value: /intrinsic gas too low/
|
|
646
728
|
});
|
|
647
|
-
class
|
|
729
|
+
class xt extends u {
|
|
648
730
|
constructor({ cause: t }) {
|
|
649
731
|
super("The transaction type is not supported for this chain.", {
|
|
650
732
|
cause: t
|
|
@@ -656,16 +738,16 @@ class yt extends u {
|
|
|
656
738
|
});
|
|
657
739
|
}
|
|
658
740
|
}
|
|
659
|
-
Object.defineProperty(
|
|
741
|
+
Object.defineProperty(xt, "nodeMessage", {
|
|
660
742
|
enumerable: !0,
|
|
661
743
|
configurable: !0,
|
|
662
744
|
writable: !0,
|
|
663
745
|
value: /transaction type not valid/
|
|
664
746
|
});
|
|
665
|
-
class
|
|
747
|
+
class be extends u {
|
|
666
748
|
constructor({ cause: t, maxPriorityFeePerGas: n, maxFeePerGas: i } = {}) {
|
|
667
749
|
super([
|
|
668
|
-
`The provided tip (\`maxPriorityFeePerGas\`${n ? ` = ${
|
|
750
|
+
`The provided tip (\`maxPriorityFeePerGas\`${n ? ` = ${x(n)} gwei` : ""}) cannot be higher than the fee cap (\`maxFeePerGas\`${i ? ` = ${x(i)} gwei` : ""}).`
|
|
669
751
|
].join(`
|
|
670
752
|
`), {
|
|
671
753
|
cause: t
|
|
@@ -677,13 +759,13 @@ class fe extends u {
|
|
|
677
759
|
});
|
|
678
760
|
}
|
|
679
761
|
}
|
|
680
|
-
Object.defineProperty(
|
|
762
|
+
Object.defineProperty(be, "nodeMessage", {
|
|
681
763
|
enumerable: !0,
|
|
682
764
|
configurable: !0,
|
|
683
765
|
writable: !0,
|
|
684
766
|
value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/
|
|
685
767
|
});
|
|
686
|
-
class
|
|
768
|
+
class en extends u {
|
|
687
769
|
constructor({ cause: t }) {
|
|
688
770
|
super(`An error occurred while executing: ${t == null ? void 0 : t.shortMessage}`, {
|
|
689
771
|
cause: t
|
|
@@ -717,31 +799,31 @@ const gt = {
|
|
|
717
799
|
eip1559: "0x2",
|
|
718
800
|
eip4844: "0x3"
|
|
719
801
|
};
|
|
720
|
-
function
|
|
802
|
+
function wt(e) {
|
|
721
803
|
const t = {};
|
|
722
|
-
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) =>
|
|
804
|
+
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) => w(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 = y(e.gas)), typeof e.gasPrice < "u" && (t.gasPrice = y(e.gasPrice)), typeof e.maxFeePerBlobGas < "u" && (t.maxFeePerBlobGas = y(e.maxFeePerBlobGas)), typeof e.maxFeePerGas < "u" && (t.maxFeePerGas = y(e.maxFeePerGas)), typeof e.maxPriorityFeePerGas < "u" && (t.maxPriorityFeePerGas = y(e.maxPriorityFeePerGas)), typeof e.nonce < "u" && (t.nonce = y(e.nonce)), typeof e.to < "u" && (t.to = e.to), typeof e.type < "u" && (t.type = gt[e.type]), typeof e.value < "u" && (t.value = y(e.value)), t;
|
|
723
805
|
}
|
|
724
|
-
const
|
|
806
|
+
const tn = /* @__PURE__ */ z("transactionRequest", wt), me = {
|
|
725
807
|
"0x0": "legacy",
|
|
726
808
|
"0x1": "eip2930",
|
|
727
809
|
"0x2": "eip1559",
|
|
728
810
|
"0x3": "eip4844"
|
|
729
811
|
};
|
|
730
|
-
function
|
|
812
|
+
function pe(e) {
|
|
731
813
|
const t = {
|
|
732
814
|
...e,
|
|
733
815
|
blockHash: e.blockHash ? e.blockHash : null,
|
|
734
816
|
blockNumber: e.blockNumber ? BigInt(e.blockNumber) : null,
|
|
735
|
-
chainId: e.chainId ?
|
|
817
|
+
chainId: e.chainId ? G(e.chainId) : void 0,
|
|
736
818
|
gas: e.gas ? BigInt(e.gas) : void 0,
|
|
737
819
|
gasPrice: e.gasPrice ? BigInt(e.gasPrice) : void 0,
|
|
738
820
|
maxFeePerBlobGas: e.maxFeePerBlobGas ? BigInt(e.maxFeePerBlobGas) : void 0,
|
|
739
821
|
maxFeePerGas: e.maxFeePerGas ? BigInt(e.maxFeePerGas) : void 0,
|
|
740
822
|
maxPriorityFeePerGas: e.maxPriorityFeePerGas ? BigInt(e.maxPriorityFeePerGas) : void 0,
|
|
741
|
-
nonce: e.nonce ?
|
|
823
|
+
nonce: e.nonce ? G(e.nonce) : void 0,
|
|
742
824
|
to: e.to ? e.to : null,
|
|
743
825
|
transactionIndex: e.transactionIndex ? Number(e.transactionIndex) : null,
|
|
744
|
-
type: e.type ?
|
|
826
|
+
type: e.type ? me[e.type] : void 0,
|
|
745
827
|
typeHex: e.type ? e.type : void 0,
|
|
746
828
|
value: e.value ? BigInt(e.value) : void 0,
|
|
747
829
|
v: e.v ? BigInt(e.v) : void 0
|
|
@@ -759,10 +841,10 @@ function he(e) {
|
|
|
759
841
|
}
|
|
760
842
|
})(), t.type === "legacy" && (delete t.accessList, delete t.maxFeePerBlobGas, delete t.maxFeePerGas, delete t.maxPriorityFeePerGas, delete t.yParity), t.type === "eip2930" && (delete t.maxFeePerBlobGas, delete t.maxFeePerGas, delete t.maxPriorityFeePerGas), t.type === "eip1559" && delete t.maxFeePerBlobGas, t;
|
|
761
843
|
}
|
|
762
|
-
const
|
|
763
|
-
function
|
|
844
|
+
const nn = /* @__PURE__ */ z("transaction", pe);
|
|
845
|
+
function Pt(e) {
|
|
764
846
|
var n;
|
|
765
|
-
const t = (n = e.transactions) == null ? void 0 : n.map((i) => typeof i == "string" ? i :
|
|
847
|
+
const t = (n = e.transactions) == null ? void 0 : n.map((i) => typeof i == "string" ? i : pe(i));
|
|
766
848
|
return {
|
|
767
849
|
...e,
|
|
768
850
|
baseFeePerGas: e.baseFeePerGas ? BigInt(e.baseFeePerGas) : null,
|
|
@@ -781,30 +863,30 @@ function wt(e) {
|
|
|
781
863
|
totalDifficulty: e.totalDifficulty ? BigInt(e.totalDifficulty) : null
|
|
782
864
|
};
|
|
783
865
|
}
|
|
784
|
-
const
|
|
785
|
-
function
|
|
786
|
-
const { kzg: t } = e, n = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), i = typeof e.blobs[0] == "string" ? e.blobs.map((o) =>
|
|
866
|
+
const sn = /* @__PURE__ */ z("block", Pt);
|
|
867
|
+
function ye(e) {
|
|
868
|
+
const { kzg: t } = e, n = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), i = typeof e.blobs[0] == "string" ? e.blobs.map((o) => B(o)) : e.blobs, s = [];
|
|
787
869
|
for (const o of i)
|
|
788
870
|
s.push(Uint8Array.from(t.blobToKzgCommitment(o)));
|
|
789
|
-
return n === "bytes" ? s : s.map((o) =>
|
|
871
|
+
return n === "bytes" ? s : s.map((o) => w(o));
|
|
790
872
|
}
|
|
791
|
-
function
|
|
792
|
-
const { kzg: t } = e, n = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), i = typeof e.blobs[0] == "string" ? e.blobs.map((r) =>
|
|
873
|
+
function xe(e) {
|
|
874
|
+
const { kzg: t } = e, n = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), i = typeof e.blobs[0] == "string" ? e.blobs.map((r) => B(r)) : e.blobs, s = typeof e.commitments[0] == "string" ? e.commitments.map((r) => B(r)) : e.commitments, o = [];
|
|
793
875
|
for (let r = 0; r < i.length; r++) {
|
|
794
|
-
const a = i[r],
|
|
795
|
-
o.push(Uint8Array.from(t.computeBlobKzgProof(a,
|
|
876
|
+
const a = i[r], c = s[r];
|
|
877
|
+
o.push(Uint8Array.from(t.computeBlobKzgProof(a, c)));
|
|
796
878
|
}
|
|
797
|
-
return n === "bytes" ? o : o.map((r) =>
|
|
879
|
+
return n === "bytes" ? o : o.map((r) => w(r));
|
|
798
880
|
}
|
|
799
|
-
function
|
|
800
|
-
const n = t || "hex", i =
|
|
801
|
-
return n === "bytes" ? i :
|
|
881
|
+
function It(e, t) {
|
|
882
|
+
const n = t || "hex", i = Ae(H(e, { strict: !1 }) ? ne(e) : e);
|
|
883
|
+
return n === "bytes" ? i : l(i);
|
|
802
884
|
}
|
|
803
885
|
function vt(e) {
|
|
804
|
-
const { commitment: t, version: n = 1 } = e, i = e.to ?? (typeof t == "string" ? "hex" : "bytes"), s =
|
|
805
|
-
return s.set([n], 0), i === "bytes" ? s :
|
|
886
|
+
const { commitment: t, version: n = 1 } = e, i = e.to ?? (typeof t == "string" ? "hex" : "bytes"), s = It(t, "bytes");
|
|
887
|
+
return s.set([n], 0), i === "bytes" ? s : w(s);
|
|
806
888
|
}
|
|
807
|
-
function
|
|
889
|
+
function Tt(e) {
|
|
808
890
|
const { commitments: t, version: n } = e, i = e.to ?? (typeof t[0] == "string" ? "hex" : "bytes"), s = [];
|
|
809
891
|
for (const o of t)
|
|
810
892
|
s.push(vt({
|
|
@@ -814,10 +896,10 @@ function It(e) {
|
|
|
814
896
|
}));
|
|
815
897
|
return s;
|
|
816
898
|
}
|
|
817
|
-
const
|
|
899
|
+
const ee = 6, ge = 32, k = 4096, we = ge * k, te = we * ee - // terminator byte (0x80).
|
|
818
900
|
1 - // zero byte (0x00) appended to each field element.
|
|
819
|
-
1 * k *
|
|
820
|
-
class
|
|
901
|
+
1 * k * ee, Pe = 1;
|
|
902
|
+
class Bt extends u {
|
|
821
903
|
constructor({ maxSize: t, size: n }) {
|
|
822
904
|
super("Blob size is too large.", {
|
|
823
905
|
metaMessages: [`Max: ${t} bytes`, `Given: ${n} bytes`]
|
|
@@ -829,7 +911,7 @@ class Tt extends u {
|
|
|
829
911
|
});
|
|
830
912
|
}
|
|
831
913
|
}
|
|
832
|
-
class
|
|
914
|
+
class Ie extends u {
|
|
833
915
|
constructor() {
|
|
834
916
|
super("Blob data must not be empty."), Object.defineProperty(this, "name", {
|
|
835
917
|
enumerable: !0,
|
|
@@ -839,7 +921,7 @@ class xe extends u {
|
|
|
839
921
|
});
|
|
840
922
|
}
|
|
841
923
|
}
|
|
842
|
-
class
|
|
924
|
+
class Et extends u {
|
|
843
925
|
constructor({ hash: t, size: n }) {
|
|
844
926
|
super(`Versioned hash "${t}" size is invalid.`, {
|
|
845
927
|
metaMessages: ["Expected: 32", `Received: ${n}`]
|
|
@@ -851,11 +933,11 @@ class Bt extends u {
|
|
|
851
933
|
});
|
|
852
934
|
}
|
|
853
935
|
}
|
|
854
|
-
class
|
|
936
|
+
class Ut extends u {
|
|
855
937
|
constructor({ hash: t, version: n }) {
|
|
856
938
|
super(`Versioned hash "${t}" version is invalid.`, {
|
|
857
939
|
metaMessages: [
|
|
858
|
-
`Expected: ${
|
|
940
|
+
`Expected: ${Pe}`,
|
|
859
941
|
`Received: ${n}`
|
|
860
942
|
]
|
|
861
943
|
}), Object.defineProperty(this, "name", {
|
|
@@ -867,42 +949,42 @@ class Et extends u {
|
|
|
867
949
|
}
|
|
868
950
|
}
|
|
869
951
|
function Ot(e) {
|
|
870
|
-
const t = e.to ?? (typeof e.data == "string" ? "hex" : "bytes"), n = typeof e.data == "string" ?
|
|
952
|
+
const t = e.to ?? (typeof e.data == "string" ? "hex" : "bytes"), n = typeof e.data == "string" ? B(e.data) : e.data, i = P(n);
|
|
871
953
|
if (!i)
|
|
872
|
-
throw new
|
|
873
|
-
if (i >
|
|
874
|
-
throw new
|
|
875
|
-
maxSize:
|
|
954
|
+
throw new Ie();
|
|
955
|
+
if (i > te)
|
|
956
|
+
throw new Bt({
|
|
957
|
+
maxSize: te,
|
|
876
958
|
size: i
|
|
877
959
|
});
|
|
878
960
|
const s = [];
|
|
879
961
|
let o = !0, r = 0;
|
|
880
962
|
for (; o; ) {
|
|
881
|
-
const a =
|
|
882
|
-
let
|
|
883
|
-
for (;
|
|
884
|
-
const f = n.slice(r, r + (
|
|
963
|
+
const a = fe(new Uint8Array(we));
|
|
964
|
+
let c = 0;
|
|
965
|
+
for (; c < k; ) {
|
|
966
|
+
const f = n.slice(r, r + (ge - 1));
|
|
885
967
|
if (a.pushByte(0), a.pushBytes(f), f.length < 31) {
|
|
886
968
|
a.pushByte(128), o = !1;
|
|
887
969
|
break;
|
|
888
970
|
}
|
|
889
|
-
|
|
971
|
+
c++, r += 31;
|
|
890
972
|
}
|
|
891
973
|
s.push(a);
|
|
892
974
|
}
|
|
893
|
-
return t === "bytes" ? s.map((a) => a.bytes) : s.map((a) =>
|
|
975
|
+
return t === "bytes" ? s.map((a) => a.bytes) : s.map((a) => w(a.bytes));
|
|
894
976
|
}
|
|
895
|
-
function
|
|
896
|
-
const { data: t, kzg: n, to: i } = e, s = e.blobs ?? Ot({ data: t, to: i }), o = e.commitments ??
|
|
897
|
-
for (let
|
|
977
|
+
function $t(e) {
|
|
978
|
+
const { data: t, kzg: n, to: i } = e, s = e.blobs ?? Ot({ data: t, to: i }), o = e.commitments ?? ye({ blobs: s, kzg: n, to: i }), r = e.proofs ?? xe({ blobs: s, commitments: o, kzg: n, to: i }), a = [];
|
|
979
|
+
for (let c = 0; c < s.length; c++)
|
|
898
980
|
a.push({
|
|
899
|
-
blob: s[
|
|
900
|
-
commitment: o[
|
|
901
|
-
proof: r[
|
|
981
|
+
blob: s[c],
|
|
982
|
+
commitment: o[c],
|
|
983
|
+
proof: r[c]
|
|
902
984
|
});
|
|
903
985
|
return a;
|
|
904
986
|
}
|
|
905
|
-
function
|
|
987
|
+
function Ft(e) {
|
|
906
988
|
if (e.type)
|
|
907
989
|
return e.type;
|
|
908
990
|
if (typeof e.blobs < "u" || typeof e.blobVersionedHashes < "u" || typeof e.maxFeePerBlobGas < "u" || typeof e.sidecars < "u")
|
|
@@ -911,9 +993,9 @@ function Gt(e) {
|
|
|
911
993
|
return "eip1559";
|
|
912
994
|
if (typeof e.gasPrice < "u")
|
|
913
995
|
return typeof e.accessList < "u" ? "eip2930" : "legacy";
|
|
914
|
-
throw new
|
|
996
|
+
throw new ct({ transaction: e });
|
|
915
997
|
}
|
|
916
|
-
function
|
|
998
|
+
function Gt(e, { args: t, eventName: n } = {}) {
|
|
917
999
|
return {
|
|
918
1000
|
...e,
|
|
919
1001
|
blockHash: e.blockHash ? e.blockHash : null,
|
|
@@ -924,7 +1006,7 @@ function Lt(e, { args: t, eventName: n } = {}) {
|
|
|
924
1006
|
...n ? { args: t, eventName: n } : {}
|
|
925
1007
|
};
|
|
926
1008
|
}
|
|
927
|
-
class
|
|
1009
|
+
class rn extends u {
|
|
928
1010
|
constructor({ blockNumber: t, chain: n, contract: i }) {
|
|
929
1011
|
super(`Chain "${n.name}" does not support contract "${i.name}".`, {
|
|
930
1012
|
metaMessages: [
|
|
@@ -943,7 +1025,36 @@ class qt extends u {
|
|
|
943
1025
|
});
|
|
944
1026
|
}
|
|
945
1027
|
}
|
|
946
|
-
class
|
|
1028
|
+
class on extends u {
|
|
1029
|
+
constructor({ chain: t, currentChainId: n }) {
|
|
1030
|
+
super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`, {
|
|
1031
|
+
metaMessages: [
|
|
1032
|
+
`Current Chain ID: ${n}`,
|
|
1033
|
+
`Expected Chain ID: ${t.id} – ${t.name}`
|
|
1034
|
+
]
|
|
1035
|
+
}), Object.defineProperty(this, "name", {
|
|
1036
|
+
enumerable: !0,
|
|
1037
|
+
configurable: !0,
|
|
1038
|
+
writable: !0,
|
|
1039
|
+
value: "ChainMismatchError"
|
|
1040
|
+
});
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
class an extends u {
|
|
1044
|
+
constructor() {
|
|
1045
|
+
super([
|
|
1046
|
+
"No chain was provided to the request.",
|
|
1047
|
+
"Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."
|
|
1048
|
+
].join(`
|
|
1049
|
+
`)), Object.defineProperty(this, "name", {
|
|
1050
|
+
enumerable: !0,
|
|
1051
|
+
configurable: !0,
|
|
1052
|
+
writable: !0,
|
|
1053
|
+
value: "ChainNotFoundError"
|
|
1054
|
+
});
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
class un extends u {
|
|
947
1058
|
constructor() {
|
|
948
1059
|
super("No chain was provided to the Client."), Object.defineProperty(this, "name", {
|
|
949
1060
|
enumerable: !0,
|
|
@@ -953,7 +1064,7 @@ class en extends u {
|
|
|
953
1064
|
});
|
|
954
1065
|
}
|
|
955
1066
|
}
|
|
956
|
-
class
|
|
1067
|
+
class S extends u {
|
|
957
1068
|
constructor({ chainId: t }) {
|
|
958
1069
|
super(typeof t == "number" ? `Chain ID "${t}" is invalid.` : "Chain ID is invalid."), Object.defineProperty(this, "name", {
|
|
959
1070
|
enumerable: !0,
|
|
@@ -963,7 +1074,7 @@ class N extends u {
|
|
|
963
1074
|
});
|
|
964
1075
|
}
|
|
965
1076
|
}
|
|
966
|
-
function
|
|
1077
|
+
function cn(e) {
|
|
967
1078
|
return {
|
|
968
1079
|
formatters: void 0,
|
|
969
1080
|
fees: void 0,
|
|
@@ -971,15 +1082,21 @@ function tn(e) {
|
|
|
971
1082
|
...e
|
|
972
1083
|
};
|
|
973
1084
|
}
|
|
974
|
-
function
|
|
975
|
-
const n =
|
|
976
|
-
return n.encode(i), t === "hex" ?
|
|
1085
|
+
function g(e, t = "hex") {
|
|
1086
|
+
const n = ve(e), i = fe(new Uint8Array(n.length));
|
|
1087
|
+
return n.encode(i), t === "hex" ? w(i.bytes) : i.bytes;
|
|
977
1088
|
}
|
|
978
|
-
function
|
|
979
|
-
return
|
|
1089
|
+
function ln(e, t = "bytes") {
|
|
1090
|
+
return g(e, t);
|
|
980
1091
|
}
|
|
981
|
-
function
|
|
982
|
-
|
|
1092
|
+
function fn(e, t = "hex") {
|
|
1093
|
+
return g(e, t);
|
|
1094
|
+
}
|
|
1095
|
+
function ve(e) {
|
|
1096
|
+
return Array.isArray(e) ? Lt(e.map((t) => ve(t))) : jt(e);
|
|
1097
|
+
}
|
|
1098
|
+
function Lt(e) {
|
|
1099
|
+
const t = e.reduce((s, o) => s + o.length, 0), n = Te(t);
|
|
983
1100
|
return {
|
|
984
1101
|
length: t <= 55 ? 1 + t : 1 + n + t,
|
|
985
1102
|
encode(s) {
|
|
@@ -989,8 +1106,8 @@ function $t(e) {
|
|
|
989
1106
|
}
|
|
990
1107
|
};
|
|
991
1108
|
}
|
|
992
|
-
function
|
|
993
|
-
const t = typeof e == "string" ?
|
|
1109
|
+
function jt(e) {
|
|
1110
|
+
const t = typeof e == "string" ? B(e) : e, n = Te(t.length);
|
|
994
1111
|
return {
|
|
995
1112
|
length: t.length === 1 && t[0] < 128 ? 1 : t.length <= 55 ? 1 + t.length : 1 + n + t.length,
|
|
996
1113
|
encode(s) {
|
|
@@ -998,7 +1115,7 @@ function Ut(e) {
|
|
|
998
1115
|
}
|
|
999
1116
|
};
|
|
1000
1117
|
}
|
|
1001
|
-
function
|
|
1118
|
+
function Te(e) {
|
|
1002
1119
|
if (e < 2 ** 8)
|
|
1003
1120
|
return 1;
|
|
1004
1121
|
if (e < 2 ** 16)
|
|
@@ -1021,69 +1138,69 @@ function Ct(e) {
|
|
|
1021
1138
|
cumulativeGasUsed: e.cumulativeGasUsed ? BigInt(e.cumulativeGasUsed) : null,
|
|
1022
1139
|
effectiveGasPrice: e.effectiveGasPrice ? BigInt(e.effectiveGasPrice) : null,
|
|
1023
1140
|
gasUsed: e.gasUsed ? BigInt(e.gasUsed) : null,
|
|
1024
|
-
logs: e.logs ? e.logs.map((n) =>
|
|
1141
|
+
logs: e.logs ? e.logs.map((n) => Gt(n)) : null,
|
|
1025
1142
|
to: e.to ? e.to : null,
|
|
1026
|
-
transactionIndex: e.transactionIndex ?
|
|
1143
|
+
transactionIndex: e.transactionIndex ? G(e.transactionIndex) : null,
|
|
1027
1144
|
status: e.status ? zt[e.status] : null,
|
|
1028
|
-
type: e.type ?
|
|
1145
|
+
type: e.type ? me[e.type] || e.type : null
|
|
1029
1146
|
};
|
|
1030
1147
|
return e.blobGasPrice && (t.blobGasPrice = BigInt(e.blobGasPrice)), e.blobGasUsed && (t.blobGasUsed = BigInt(e.blobGasUsed)), t;
|
|
1031
1148
|
}
|
|
1032
|
-
const
|
|
1033
|
-
function
|
|
1149
|
+
const dn = /* @__PURE__ */ z("transactionReceipt", Ct);
|
|
1150
|
+
function At(e) {
|
|
1034
1151
|
const { blobVersionedHashes: t } = e;
|
|
1035
1152
|
if (t) {
|
|
1036
1153
|
if (t.length === 0)
|
|
1037
|
-
throw new
|
|
1154
|
+
throw new Ie();
|
|
1038
1155
|
for (const n of t) {
|
|
1039
|
-
const i =
|
|
1156
|
+
const i = P(n), s = G(nt(n, 0, 1));
|
|
1040
1157
|
if (i !== 32)
|
|
1041
|
-
throw new
|
|
1042
|
-
if (s !==
|
|
1043
|
-
throw new
|
|
1158
|
+
throw new Et({ hash: n, size: i });
|
|
1159
|
+
if (s !== Pe)
|
|
1160
|
+
throw new Ut({
|
|
1044
1161
|
hash: n,
|
|
1045
1162
|
version: s
|
|
1046
1163
|
});
|
|
1047
1164
|
}
|
|
1048
1165
|
}
|
|
1049
|
-
|
|
1166
|
+
Be(e);
|
|
1050
1167
|
}
|
|
1051
|
-
function
|
|
1168
|
+
function Be(e) {
|
|
1052
1169
|
const { chainId: t, maxPriorityFeePerGas: n, maxFeePerGas: i, to: s } = e;
|
|
1053
1170
|
if (t <= 0)
|
|
1054
|
-
throw new
|
|
1055
|
-
if (s && !
|
|
1056
|
-
throw new
|
|
1171
|
+
throw new S({ chainId: t });
|
|
1172
|
+
if (s && !U(s))
|
|
1173
|
+
throw new E({ address: s });
|
|
1057
1174
|
if (i && i > 2n ** 256n - 1n)
|
|
1058
|
-
throw new
|
|
1175
|
+
throw new j({ maxFeePerGas: i });
|
|
1059
1176
|
if (n && i && n > i)
|
|
1060
|
-
throw new
|
|
1177
|
+
throw new be({ maxFeePerGas: i, maxPriorityFeePerGas: n });
|
|
1061
1178
|
}
|
|
1062
|
-
function
|
|
1179
|
+
function Ht(e) {
|
|
1063
1180
|
const { chainId: t, maxPriorityFeePerGas: n, gasPrice: i, maxFeePerGas: s, to: o } = e;
|
|
1064
1181
|
if (t <= 0)
|
|
1065
|
-
throw new
|
|
1066
|
-
if (o && !
|
|
1067
|
-
throw new
|
|
1182
|
+
throw new S({ chainId: t });
|
|
1183
|
+
if (o && !U(o))
|
|
1184
|
+
throw new E({ address: o });
|
|
1068
1185
|
if (n || s)
|
|
1069
1186
|
throw new u("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");
|
|
1070
1187
|
if (i && i > 2n ** 256n - 1n)
|
|
1071
|
-
throw new
|
|
1188
|
+
throw new j({ maxFeePerGas: i });
|
|
1072
1189
|
}
|
|
1073
|
-
function
|
|
1190
|
+
function Nt(e) {
|
|
1074
1191
|
const { chainId: t, maxPriorityFeePerGas: n, gasPrice: i, maxFeePerGas: s, to: o, accessList: r } = e;
|
|
1075
|
-
if (o && !
|
|
1076
|
-
throw new
|
|
1192
|
+
if (o && !U(o))
|
|
1193
|
+
throw new E({ address: o });
|
|
1077
1194
|
if (typeof t < "u" && t <= 0)
|
|
1078
|
-
throw new
|
|
1195
|
+
throw new S({ chainId: t });
|
|
1079
1196
|
if (n || s)
|
|
1080
1197
|
throw new u("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");
|
|
1081
1198
|
if (i && i > 2n ** 256n - 1n)
|
|
1082
|
-
throw new
|
|
1199
|
+
throw new j({ maxFeePerGas: i });
|
|
1083
1200
|
if (r)
|
|
1084
1201
|
throw new u("`accessList` is not a valid Legacy Transaction attribute.");
|
|
1085
1202
|
}
|
|
1086
|
-
function
|
|
1203
|
+
function M(e) {
|
|
1087
1204
|
if (!e || e.length === 0)
|
|
1088
1205
|
return [];
|
|
1089
1206
|
const t = [];
|
|
@@ -1091,106 +1208,106 @@ function S(e) {
|
|
|
1091
1208
|
const { address: i, storageKeys: s } = e[n];
|
|
1092
1209
|
for (let o = 0; o < s.length; o++)
|
|
1093
1210
|
if (s[o].length - 2 !== 64)
|
|
1094
|
-
throw new
|
|
1095
|
-
if (!
|
|
1096
|
-
throw new
|
|
1211
|
+
throw new lt({ storageKey: s[o] });
|
|
1212
|
+
if (!U(i, { strict: !1 }))
|
|
1213
|
+
throw new E({ address: i });
|
|
1097
1214
|
t.push([i, s]);
|
|
1098
1215
|
}
|
|
1099
1216
|
return t;
|
|
1100
1217
|
}
|
|
1101
|
-
function
|
|
1102
|
-
const n =
|
|
1103
|
-
return n === "eip1559" ?
|
|
1218
|
+
function hn(e, t) {
|
|
1219
|
+
const n = Ft(e);
|
|
1220
|
+
return n === "eip1559" ? St(e, t) : n === "eip2930" ? Mt(e, t) : n === "eip4844" ? kt(e, t) : Vt(e, t);
|
|
1104
1221
|
}
|
|
1105
1222
|
function kt(e, t) {
|
|
1106
|
-
const { chainId: n, gas: i, nonce: s, to: o, value: r, maxFeePerBlobGas: a, maxFeePerGas:
|
|
1107
|
-
|
|
1108
|
-
let
|
|
1109
|
-
if (e.blobs && (typeof
|
|
1110
|
-
const
|
|
1111
|
-
blobs:
|
|
1112
|
-
kzg:
|
|
1223
|
+
const { chainId: n, gas: i, nonce: s, to: o, value: r, maxFeePerBlobGas: a, maxFeePerGas: c, maxPriorityFeePerGas: f, accessList: d, data: b } = e;
|
|
1224
|
+
At(e);
|
|
1225
|
+
let m = e.blobVersionedHashes, h = e.sidecars;
|
|
1226
|
+
if (e.blobs && (typeof m > "u" || typeof h > "u")) {
|
|
1227
|
+
const p = typeof e.blobs[0] == "string" ? e.blobs : e.blobs.map((v) => w(v)), $ = e.kzg, I = ye({
|
|
1228
|
+
blobs: p,
|
|
1229
|
+
kzg: $
|
|
1113
1230
|
});
|
|
1114
|
-
if (typeof
|
|
1115
|
-
commitments:
|
|
1231
|
+
if (typeof m > "u" && (m = Tt({
|
|
1232
|
+
commitments: I
|
|
1116
1233
|
})), typeof h > "u") {
|
|
1117
|
-
const
|
|
1118
|
-
h =
|
|
1234
|
+
const v = xe({ blobs: p, commitments: I, kzg: $ });
|
|
1235
|
+
h = $t({ blobs: p, commitments: I, proofs: v });
|
|
1119
1236
|
}
|
|
1120
1237
|
}
|
|
1121
|
-
const
|
|
1122
|
-
|
|
1123
|
-
s ?
|
|
1124
|
-
f ?
|
|
1125
|
-
|
|
1126
|
-
i ?
|
|
1238
|
+
const O = M(d), _ = [
|
|
1239
|
+
l(n),
|
|
1240
|
+
s ? l(s) : "0x",
|
|
1241
|
+
f ? l(f) : "0x",
|
|
1242
|
+
c ? l(c) : "0x",
|
|
1243
|
+
i ? l(i) : "0x",
|
|
1127
1244
|
o ?? "0x",
|
|
1128
|
-
r ?
|
|
1245
|
+
r ? l(r) : "0x",
|
|
1129
1246
|
b ?? "0x",
|
|
1130
|
-
|
|
1131
|
-
a ?
|
|
1132
|
-
|
|
1247
|
+
O,
|
|
1248
|
+
a ? l(a) : "0x",
|
|
1249
|
+
m ?? [],
|
|
1133
1250
|
...V(e, t)
|
|
1134
|
-
],
|
|
1251
|
+
], R = [], D = [], K = [];
|
|
1135
1252
|
if (h)
|
|
1136
|
-
for (let
|
|
1137
|
-
const { blob:
|
|
1138
|
-
|
|
1253
|
+
for (let p = 0; p < h.length; p++) {
|
|
1254
|
+
const { blob: $, commitment: I, proof: v } = h[p];
|
|
1255
|
+
R.push($), D.push(I), K.push(v);
|
|
1139
1256
|
}
|
|
1140
|
-
return
|
|
1257
|
+
return L([
|
|
1141
1258
|
"0x03",
|
|
1142
1259
|
// If sidecars are enabled, envelope turns into a "wrapper":
|
|
1143
|
-
|
|
1260
|
+
g(h ? [_, R, D, K] : _)
|
|
1144
1261
|
]);
|
|
1145
1262
|
}
|
|
1146
|
-
function
|
|
1147
|
-
const { chainId: n, gas: i, nonce: s, to: o, value: r, maxFeePerGas: a, maxPriorityFeePerGas:
|
|
1148
|
-
|
|
1149
|
-
const b =
|
|
1150
|
-
|
|
1151
|
-
s ?
|
|
1152
|
-
|
|
1153
|
-
a ?
|
|
1154
|
-
i ?
|
|
1263
|
+
function St(e, t) {
|
|
1264
|
+
const { chainId: n, gas: i, nonce: s, to: o, value: r, maxFeePerGas: a, maxPriorityFeePerGas: c, accessList: f, data: d } = e;
|
|
1265
|
+
Be(e);
|
|
1266
|
+
const b = M(f), m = [
|
|
1267
|
+
l(n),
|
|
1268
|
+
s ? l(s) : "0x",
|
|
1269
|
+
c ? l(c) : "0x",
|
|
1270
|
+
a ? l(a) : "0x",
|
|
1271
|
+
i ? l(i) : "0x",
|
|
1155
1272
|
o ?? "0x",
|
|
1156
|
-
r ?
|
|
1273
|
+
r ? l(r) : "0x",
|
|
1157
1274
|
d ?? "0x",
|
|
1158
1275
|
b,
|
|
1159
1276
|
...V(e, t)
|
|
1160
1277
|
];
|
|
1161
|
-
return
|
|
1278
|
+
return L([
|
|
1162
1279
|
"0x02",
|
|
1163
|
-
|
|
1280
|
+
g(m)
|
|
1164
1281
|
]);
|
|
1165
1282
|
}
|
|
1166
|
-
function
|
|
1167
|
-
const { chainId: n, gas: i, data: s, nonce: o, to: r, value: a, accessList:
|
|
1168
|
-
|
|
1169
|
-
const d =
|
|
1170
|
-
|
|
1171
|
-
o ?
|
|
1172
|
-
f ?
|
|
1173
|
-
i ?
|
|
1283
|
+
function Mt(e, t) {
|
|
1284
|
+
const { chainId: n, gas: i, data: s, nonce: o, to: r, value: a, accessList: c, gasPrice: f } = e;
|
|
1285
|
+
Ht(e);
|
|
1286
|
+
const d = M(c), b = [
|
|
1287
|
+
l(n),
|
|
1288
|
+
o ? l(o) : "0x",
|
|
1289
|
+
f ? l(f) : "0x",
|
|
1290
|
+
i ? l(i) : "0x",
|
|
1174
1291
|
r ?? "0x",
|
|
1175
|
-
a ?
|
|
1292
|
+
a ? l(a) : "0x",
|
|
1176
1293
|
s ?? "0x",
|
|
1177
1294
|
d,
|
|
1178
1295
|
...V(e, t)
|
|
1179
1296
|
];
|
|
1180
|
-
return
|
|
1297
|
+
return L([
|
|
1181
1298
|
"0x01",
|
|
1182
|
-
|
|
1299
|
+
g(b)
|
|
1183
1300
|
]);
|
|
1184
1301
|
}
|
|
1185
1302
|
function Vt(e, t) {
|
|
1186
|
-
const { chainId: n = 0, gas: i, data: s, nonce: o, to: r, value: a, gasPrice:
|
|
1187
|
-
|
|
1303
|
+
const { chainId: n = 0, gas: i, data: s, nonce: o, to: r, value: a, gasPrice: c } = e;
|
|
1304
|
+
Nt(e);
|
|
1188
1305
|
let f = [
|
|
1189
|
-
o ?
|
|
1190
|
-
|
|
1191
|
-
i ?
|
|
1306
|
+
o ? l(o) : "0x",
|
|
1307
|
+
c ? l(c) : "0x",
|
|
1308
|
+
i ? l(i) : "0x",
|
|
1192
1309
|
r ?? "0x",
|
|
1193
|
-
a ?
|
|
1310
|
+
a ? l(a) : "0x",
|
|
1194
1311
|
s ?? "0x"
|
|
1195
1312
|
];
|
|
1196
1313
|
if (t) {
|
|
@@ -1201,91 +1318,195 @@ function Vt(e, t) {
|
|
|
1201
1318
|
return BigInt(n * 2) + BigInt(35n + t.v - 27n);
|
|
1202
1319
|
const b = 27n + (t.v === 27n ? 0n : 1n);
|
|
1203
1320
|
if (t.v !== b)
|
|
1204
|
-
throw new
|
|
1321
|
+
throw new ut({ v: t.v });
|
|
1205
1322
|
return b;
|
|
1206
1323
|
})();
|
|
1207
1324
|
f = [
|
|
1208
1325
|
...f,
|
|
1209
|
-
|
|
1326
|
+
l(d),
|
|
1210
1327
|
t.r,
|
|
1211
1328
|
t.s
|
|
1212
1329
|
];
|
|
1213
1330
|
} else n > 0 && (f = [
|
|
1214
1331
|
...f,
|
|
1215
|
-
|
|
1332
|
+
l(n),
|
|
1216
1333
|
"0x",
|
|
1217
1334
|
"0x"
|
|
1218
1335
|
]);
|
|
1219
|
-
return
|
|
1336
|
+
return g(f);
|
|
1220
1337
|
}
|
|
1221
1338
|
function V(e, t) {
|
|
1222
1339
|
const { r: n, s: i, v: s, yParity: o } = t ?? e;
|
|
1223
|
-
return typeof n > "u" ? [] : typeof i > "u" ? [] : typeof s > "u" && typeof o > "u" ? [] : [typeof o == "number" ? o ?
|
|
1340
|
+
return typeof n > "u" ? [] : typeof i > "u" ? [] : typeof s > "u" && typeof o > "u" ? [] : [typeof o == "number" ? o ? l(1) : "0x" : s === 0n ? "0x" : s === 1n ? l(1) : s === 27n ? "0x" : l(1), X(n), X(i)];
|
|
1224
1341
|
}
|
|
1225
|
-
const
|
|
1342
|
+
const bn = 2n ** (8n - 1n) - 1n, mn = 2n ** (16n - 1n) - 1n, pn = 2n ** (24n - 1n) - 1n, yn = 2n ** (32n - 1n) - 1n, xn = 2n ** (40n - 1n) - 1n, gn = 2n ** (48n - 1n) - 1n, wn = 2n ** (56n - 1n) - 1n, Pn = 2n ** (64n - 1n) - 1n, In = 2n ** (72n - 1n) - 1n, vn = 2n ** (80n - 1n) - 1n, Tn = 2n ** (88n - 1n) - 1n, Bn = 2n ** (96n - 1n) - 1n, En = 2n ** (104n - 1n) - 1n, Un = 2n ** (112n - 1n) - 1n, On = 2n ** (120n - 1n) - 1n, $n = 2n ** (128n - 1n) - 1n, Fn = 2n ** (136n - 1n) - 1n, Gn = 2n ** (144n - 1n) - 1n, Ln = 2n ** (152n - 1n) - 1n, jn = 2n ** (160n - 1n) - 1n, zn = 2n ** (168n - 1n) - 1n, Cn = 2n ** (176n - 1n) - 1n, An = 2n ** (184n - 1n) - 1n, Hn = 2n ** (192n - 1n) - 1n, Nn = 2n ** (200n - 1n) - 1n, kn = 2n ** (208n - 1n) - 1n, Sn = 2n ** (216n - 1n) - 1n, Mn = 2n ** (224n - 1n) - 1n, Vn = 2n ** (232n - 1n) - 1n, _n = 2n ** (240n - 1n) - 1n, Rn = 2n ** (248n - 1n) - 1n, Dn = 2n ** (256n - 1n) - 1n, Kn = -(2n ** (8n - 1n)), Xn = -(2n ** (16n - 1n)), Wn = -(2n ** (24n - 1n)), Yn = -(2n ** (32n - 1n)), Jn = -(2n ** (40n - 1n)), Qn = -(2n ** (48n - 1n)), Zn = -(2n ** (56n - 1n)), qn = -(2n ** (64n - 1n)), es = -(2n ** (72n - 1n)), ts = -(2n ** (80n - 1n)), ns = -(2n ** (88n - 1n)), ss = -(2n ** (96n - 1n)), is = -(2n ** (104n - 1n)), rs = -(2n ** (112n - 1n)), os = -(2n ** (120n - 1n)), as = -(2n ** (128n - 1n)), us = -(2n ** (136n - 1n)), cs = -(2n ** (144n - 1n)), ls = -(2n ** (152n - 1n)), fs = -(2n ** (160n - 1n)), ds = -(2n ** (168n - 1n)), hs = -(2n ** (176n - 1n)), bs = -(2n ** (184n - 1n)), ms = -(2n ** (192n - 1n)), ps = -(2n ** (200n - 1n)), ys = -(2n ** (208n - 1n)), xs = -(2n ** (216n - 1n)), gs = -(2n ** (224n - 1n)), ws = -(2n ** (232n - 1n)), Ps = -(2n ** (240n - 1n)), Is = -(2n ** (248n - 1n)), vs = -(2n ** (256n - 1n)), Ts = 2n ** 8n - 1n, Bs = 2n ** 16n - 1n, Es = 2n ** 24n - 1n, Us = 2n ** 32n - 1n, Os = 2n ** 40n - 1n, $s = 2n ** 48n - 1n, Fs = 2n ** 56n - 1n, Gs = 2n ** 64n - 1n, Ls = 2n ** 72n - 1n, js = 2n ** 80n - 1n, zs = 2n ** 88n - 1n, Cs = 2n ** 96n - 1n, As = 2n ** 104n - 1n, Hs = 2n ** 112n - 1n, Ns = 2n ** 120n - 1n, ks = 2n ** 128n - 1n, Ss = 2n ** 136n - 1n, Ms = 2n ** 144n - 1n, Vs = 2n ** 152n - 1n, _s = 2n ** 160n - 1n, Rs = 2n ** 168n - 1n, Ds = 2n ** 176n - 1n, Ks = 2n ** 184n - 1n, Xs = 2n ** 192n - 1n, Ws = 2n ** 200n - 1n, Ys = 2n ** 208n - 1n, Js = 2n ** 216n - 1n, Qs = 2n ** 224n - 1n, Zs = 2n ** 232n - 1n, qs = 2n ** 240n - 1n, ei = 2n ** 248n - 1n, ti = 2n ** 256n - 1n;
|
|
1226
1343
|
export {
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
vt as
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1344
|
+
hn as $,
|
|
1345
|
+
un as A,
|
|
1346
|
+
an as B,
|
|
1347
|
+
rn as C,
|
|
1348
|
+
on as D,
|
|
1349
|
+
he as E,
|
|
1350
|
+
j as F,
|
|
1351
|
+
Jt as G,
|
|
1352
|
+
Dt as H,
|
|
1353
|
+
E as I,
|
|
1354
|
+
g as J,
|
|
1355
|
+
it as K,
|
|
1356
|
+
Wt as L,
|
|
1357
|
+
Yt as M,
|
|
1358
|
+
dt as N,
|
|
1359
|
+
Be as O,
|
|
1360
|
+
rt as P,
|
|
1361
|
+
Ht as Q,
|
|
1362
|
+
At as R,
|
|
1363
|
+
Nt as S,
|
|
1364
|
+
xt as T,
|
|
1365
|
+
en as U,
|
|
1366
|
+
ut as V,
|
|
1367
|
+
Qt as W,
|
|
1368
|
+
pe as X,
|
|
1369
|
+
Zt as Y,
|
|
1370
|
+
Ct as Z,
|
|
1371
|
+
qt as _,
|
|
1372
|
+
L as a,
|
|
1373
|
+
qs as a$,
|
|
1374
|
+
vt as a0,
|
|
1375
|
+
cn as a1,
|
|
1376
|
+
S as a2,
|
|
1377
|
+
ct as a3,
|
|
1378
|
+
lt as a4,
|
|
1379
|
+
ln as a5,
|
|
1380
|
+
tt as a6,
|
|
1263
1381
|
sn as a7,
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1382
|
+
nn as a8,
|
|
1383
|
+
dn as a9,
|
|
1384
|
+
gn as aA,
|
|
1385
|
+
wn as aB,
|
|
1386
|
+
Pn as aC,
|
|
1387
|
+
In as aD,
|
|
1388
|
+
bn as aE,
|
|
1389
|
+
vn as aF,
|
|
1390
|
+
Tn as aG,
|
|
1391
|
+
Bn as aH,
|
|
1392
|
+
As as aI,
|
|
1393
|
+
Hs as aJ,
|
|
1394
|
+
Ns as aK,
|
|
1395
|
+
ks as aL,
|
|
1396
|
+
Ss as aM,
|
|
1397
|
+
Ms as aN,
|
|
1398
|
+
Vs as aO,
|
|
1399
|
+
Bs as aP,
|
|
1400
|
+
_s as aQ,
|
|
1401
|
+
Rs as aR,
|
|
1402
|
+
Ds as aS,
|
|
1403
|
+
Ks as aT,
|
|
1404
|
+
Xs as aU,
|
|
1405
|
+
Ws as aV,
|
|
1406
|
+
Ys as aW,
|
|
1407
|
+
Js as aX,
|
|
1408
|
+
Qs as aY,
|
|
1409
|
+
Zs as aZ,
|
|
1410
|
+
Es as a_,
|
|
1411
|
+
tn as aa,
|
|
1412
|
+
fn as ab,
|
|
1413
|
+
En as ac,
|
|
1414
|
+
Un as ad,
|
|
1415
|
+
On as ae,
|
|
1416
|
+
$n as af,
|
|
1417
|
+
Fn as ag,
|
|
1418
|
+
Gn as ah,
|
|
1419
|
+
Ln as ai,
|
|
1420
|
+
mn as aj,
|
|
1421
|
+
jn as ak,
|
|
1422
|
+
zn as al,
|
|
1423
|
+
Cn as am,
|
|
1424
|
+
An as an,
|
|
1425
|
+
Hn as ao,
|
|
1426
|
+
Nn as ap,
|
|
1427
|
+
kn as aq,
|
|
1428
|
+
Sn as ar,
|
|
1429
|
+
Mn as as,
|
|
1430
|
+
Vn as at,
|
|
1431
|
+
pn as au,
|
|
1432
|
+
_n as av,
|
|
1433
|
+
Rn as aw,
|
|
1434
|
+
Dn as ax,
|
|
1435
|
+
yn as ay,
|
|
1436
|
+
xn as az,
|
|
1437
|
+
fe as b,
|
|
1438
|
+
ei as b0,
|
|
1439
|
+
ti as b1,
|
|
1440
|
+
Us as b2,
|
|
1441
|
+
Os as b3,
|
|
1442
|
+
$s as b4,
|
|
1443
|
+
Fs as b5,
|
|
1444
|
+
Gs as b6,
|
|
1445
|
+
Ls as b7,
|
|
1446
|
+
Ts as b8,
|
|
1447
|
+
js as b9,
|
|
1448
|
+
Qn as bA,
|
|
1449
|
+
Zn as bB,
|
|
1450
|
+
qn as bC,
|
|
1451
|
+
es as bD,
|
|
1452
|
+
Kn as bE,
|
|
1453
|
+
ts as bF,
|
|
1454
|
+
ns as bG,
|
|
1455
|
+
ss as bH,
|
|
1456
|
+
gt as bI,
|
|
1457
|
+
M as bJ,
|
|
1458
|
+
It as bK,
|
|
1459
|
+
Ot as bL,
|
|
1460
|
+
me as bM,
|
|
1461
|
+
V as bN,
|
|
1462
|
+
zs as ba,
|
|
1463
|
+
Cs as bb,
|
|
1464
|
+
is as bc,
|
|
1465
|
+
rs as bd,
|
|
1466
|
+
os as be,
|
|
1467
|
+
as as bf,
|
|
1468
|
+
us as bg,
|
|
1469
|
+
cs as bh,
|
|
1470
|
+
ls as bi,
|
|
1471
|
+
Xn as bj,
|
|
1472
|
+
fs as bk,
|
|
1473
|
+
ds as bl,
|
|
1474
|
+
hs as bm,
|
|
1475
|
+
bs as bn,
|
|
1476
|
+
ms as bo,
|
|
1477
|
+
ps as bp,
|
|
1478
|
+
ys as bq,
|
|
1479
|
+
xs as br,
|
|
1480
|
+
gs as bs,
|
|
1481
|
+
ws as bt,
|
|
1482
|
+
Wn as bu,
|
|
1483
|
+
Ps as bv,
|
|
1484
|
+
Is as bw,
|
|
1485
|
+
vs as bx,
|
|
1486
|
+
Yn as by,
|
|
1487
|
+
Jn as bz,
|
|
1488
|
+
Kt as c,
|
|
1489
|
+
ue as d,
|
|
1490
|
+
st as e,
|
|
1491
|
+
x as f,
|
|
1492
|
+
ft as g,
|
|
1493
|
+
ht as h,
|
|
1494
|
+
U as i,
|
|
1495
|
+
bt as j,
|
|
1496
|
+
qe as k,
|
|
1497
|
+
mt as l,
|
|
1277
1498
|
pt as m,
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1499
|
+
yt as n,
|
|
1500
|
+
be as o,
|
|
1501
|
+
de as p,
|
|
1502
|
+
Xt as q,
|
|
1503
|
+
Pt as r,
|
|
1504
|
+
nt as s,
|
|
1505
|
+
ye as t,
|
|
1506
|
+
Tt as u,
|
|
1507
|
+
xe as v,
|
|
1508
|
+
$t as w,
|
|
1509
|
+
Ft as x,
|
|
1510
|
+
wt as y,
|
|
1511
|
+
Gt as z
|
|
1291
1512
|
};
|