@gardenfi/utils 2.1.3-beta.1 → 2.1.3-beta.10
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/index104.cjs +1 -1
- package/dist/index104.js +1 -1
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +71 -42
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +2 -2
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +1 -1
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +1 -1
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +1 -1
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +1 -1
- package/dist/index125.cjs +1 -1
- package/dist/index125.js +1 -1
- package/dist/index166.cjs +1 -1
- package/dist/index166.js +36 -34
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +15 -18
- package/dist/index222.cjs +1 -1
- package/dist/index222.js +2 -2
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +43 -43
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +3 -113
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +1 -1
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +1 -1
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +2 -2
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +3 -3
- package/dist/index246.cjs +1 -1
- package/dist/index246.js +3 -3
- package/dist/index247.cjs +1 -2
- package/dist/index247.js +13 -24
- package/dist/index248.cjs +1 -1
- package/dist/index248.js +15 -13
- package/dist/index249.cjs +2 -1
- package/dist/index249.js +23 -14
- package/dist/index266.cjs +1 -1
- package/dist/index266.js +1 -1
- package/dist/index277.cjs +1 -1
- package/dist/index277.js +103 -16
- package/dist/index278.cjs +1 -1
- package/dist/index278.js +13 -220
- package/dist/index279.cjs +1 -1
- package/dist/index279.js +214 -6
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +2 -2
- package/dist/index280.cjs +1 -1
- package/dist/index280.js +7 -7
- package/dist/index281.cjs +1 -1
- package/dist/index281.js +7 -27
- package/dist/index282.cjs +1 -1
- package/dist/index282.js +26 -34
- package/dist/index283.cjs +1 -1
- package/dist/index283.js +13 -12
- package/dist/index284.cjs +1 -1
- package/dist/index284.js +89 -51
- package/dist/index285.cjs +1 -1
- package/dist/index285.js +3 -67
- package/dist/index286.cjs +1 -1
- package/dist/index286.js +140 -3
- package/dist/index287.cjs +1 -1
- package/dist/index287.js +143 -128
- package/dist/index288.cjs +1 -1
- package/dist/index288.js +9 -155
- package/dist/index289.cjs +1 -1
- package/dist/index289.js +111 -7
- package/dist/index290.cjs +2 -1
- package/dist/index290.js +116 -95
- package/dist/index291.cjs +1 -2
- package/dist/index291.js +8 -131
- package/dist/index292.cjs +1 -1
- package/dist/index292.js +19 -40
- package/dist/index293.cjs +1 -1
- package/dist/index293.js +43 -2
- package/dist/index294.cjs +1 -1
- package/dist/index294.js +74 -202
- package/dist/index295.cjs +1 -1
- package/dist/index295.js +2 -69
- package/dist/index296.cjs +1 -1
- package/dist/index296.js +68 -11
- package/dist/index297.cjs +1 -1
- package/dist/index297.js +656 -18
- package/dist/index298.cjs +1 -1
- package/dist/index298.js +197 -633
- package/dist/index299.cjs +1 -1
- package/dist/index299.js +78 -73
- package/dist/index300.cjs +2 -2
- package/dist/index300.js +7 -7
- package/dist/index302.cjs +1 -1
- package/dist/index302.js +1 -1
- package/dist/index303.cjs +1 -1
- package/dist/index303.js +2 -2
- package/dist/index305.cjs +1 -1
- package/dist/index305.js +1 -1
- package/dist/index307.cjs +1 -1
- package/dist/index307.js +2 -2
- package/dist/index308.cjs +1 -1
- package/dist/index308.js +1 -1
- package/dist/index310.cjs +1 -1
- package/dist/index310.js +1 -1
- package/dist/index311.cjs +1 -1
- package/dist/index311.js +5 -105
- package/dist/index312.cjs +1 -1
- package/dist/index312.js +2 -5
- package/dist/index313.cjs +1 -1
- package/dist/index313.js +22 -2
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +1 -1
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +40 -21
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +24 -24
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +98 -97
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +1 -1
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +53 -51
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +44 -42
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +15 -15
- package/package.json +1 -1
- package/dist/index314.cjs +0 -1
- package/dist/index314.js +0 -22
- package/dist/index315.cjs +0 -1
- package/dist/index315.js +0 -74
- package/dist/index316.cjs +0 -1
- package/dist/index316.js +0 -24
package/dist/index225.js
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
let o = M;
|
|
1
|
+
import { split as L, rotlSH as T, rotlSL as S, rotlBH as m, rotlBL as F } from "./index283.js";
|
|
2
|
+
import { createHasher as X, Hash as E, anumber as d, u32 as U, swap32IfBE as I, aexists as x, toBytes as P, abytes as k, aoutput as M, clean as y } from "./index284.js";
|
|
3
|
+
const R = BigInt(0), f = BigInt(1), j = BigInt(2), q = BigInt(7), v = BigInt(256), z = BigInt(113), _ = [], g = [], B = [];
|
|
4
|
+
for (let n = 0, t = f, s = 1, i = 0; n < 24; n++) {
|
|
5
|
+
[s, i] = [i, (2 * s + 3 * i) % 5], _.push(2 * (5 * i + s)), g.push((n + 1) * (n + 2) / 2 % 64);
|
|
6
|
+
let o = R;
|
|
8
7
|
for (let r = 0; r < 7; r++)
|
|
9
|
-
t = (t << f ^ (t >>
|
|
10
|
-
|
|
8
|
+
t = (t << f ^ (t >> q) * z) % v, t & j && (o ^= f << (f << /* @__PURE__ */ BigInt(r)) - f);
|
|
9
|
+
B.push(o);
|
|
11
10
|
}
|
|
12
|
-
const
|
|
13
|
-
function
|
|
11
|
+
const A = L(B, !0), C = A[0], D = A[1], O = (n, t, s) => s > 32 ? m(n, t, s) : T(n, t, s), w = (n, t, s) => s > 32 ? F(n, t, s) : S(n, t, s);
|
|
12
|
+
function G(n, t = 24) {
|
|
14
13
|
const s = new Uint32Array(10);
|
|
15
|
-
for (let
|
|
14
|
+
for (let i = 24 - t; i < 24; i++) {
|
|
16
15
|
for (let e = 0; e < 10; e++)
|
|
17
|
-
s[e] =
|
|
16
|
+
s[e] = n[e] ^ n[e + 10] ^ n[e + 20] ^ n[e + 30] ^ n[e + 40];
|
|
18
17
|
for (let e = 0; e < 10; e += 2) {
|
|
19
|
-
const h = (e + 8) % 10, l = (e + 2) % 10, u = s[l], c = s[l + 1],
|
|
18
|
+
const h = (e + 8) % 10, l = (e + 2) % 10, u = s[l], c = s[l + 1], b = O(u, c, 1) ^ s[h], H = w(u, c, 1) ^ s[h + 1];
|
|
20
19
|
for (let a = 0; a < 50; a += 10)
|
|
21
|
-
|
|
20
|
+
n[e + a] ^= b, n[e + a + 1] ^= H;
|
|
22
21
|
}
|
|
23
|
-
let o =
|
|
22
|
+
let o = n[2], r = n[3];
|
|
24
23
|
for (let e = 0; e < 24; e++) {
|
|
25
|
-
const h =
|
|
26
|
-
o =
|
|
24
|
+
const h = g[e], l = O(o, r, h), u = w(o, r, h), c = _[e];
|
|
25
|
+
o = n[c], r = n[c + 1], n[c] = l, n[c + 1] = u;
|
|
27
26
|
}
|
|
28
27
|
for (let e = 0; e < 50; e += 10) {
|
|
29
28
|
for (let h = 0; h < 10; h++)
|
|
30
|
-
s[h] =
|
|
29
|
+
s[h] = n[e + h];
|
|
31
30
|
for (let h = 0; h < 10; h++)
|
|
32
|
-
|
|
31
|
+
n[e + h] ^= ~s[(h + 2) % 10] & s[(h + 4) % 10];
|
|
33
32
|
}
|
|
34
|
-
|
|
33
|
+
n[0] ^= C[i], n[1] ^= D[i];
|
|
35
34
|
}
|
|
36
|
-
s
|
|
35
|
+
y(s);
|
|
37
36
|
}
|
|
38
37
|
class p extends E {
|
|
39
38
|
// NOTE: we accept arguments in bytes instead of bits here.
|
|
40
|
-
constructor(t, s,
|
|
41
|
-
if (super(), this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, this.enableXOF = !1, this.blockLen = t, this.suffix = s, this.outputLen =
|
|
42
|
-
throw new Error("
|
|
39
|
+
constructor(t, s, i, o = !1, r = 24) {
|
|
40
|
+
if (super(), this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, this.enableXOF = !1, this.blockLen = t, this.suffix = s, this.outputLen = i, this.enableXOF = o, this.rounds = r, d(i), !(0 < t && t < 200))
|
|
41
|
+
throw new Error("only keccak-f1600 function is supported");
|
|
43
42
|
this.state = new Uint8Array(200), this.state32 = U(this.state);
|
|
44
43
|
}
|
|
44
|
+
clone() {
|
|
45
|
+
return this._cloneInto();
|
|
46
|
+
}
|
|
45
47
|
keccak() {
|
|
46
|
-
|
|
48
|
+
I(this.state32), G(this.state32, this.rounds), I(this.state32), this.posOut = 0, this.pos = 0;
|
|
47
49
|
}
|
|
48
50
|
update(t) {
|
|
49
|
-
|
|
50
|
-
const { blockLen: s, state:
|
|
51
|
-
t = P(t);
|
|
52
|
-
const o = t.length;
|
|
51
|
+
x(this), t = P(t), k(t);
|
|
52
|
+
const { blockLen: s, state: i } = this, o = t.length;
|
|
53
53
|
for (let r = 0; r < o; ) {
|
|
54
54
|
const e = Math.min(s - this.pos, o - r);
|
|
55
55
|
for (let h = 0; h < e; h++)
|
|
56
|
-
|
|
56
|
+
i[this.pos++] ^= t[r++];
|
|
57
57
|
this.pos === s && this.keccak();
|
|
58
58
|
}
|
|
59
59
|
return this;
|
|
@@ -62,15 +62,15 @@ class p extends E {
|
|
|
62
62
|
if (this.finished)
|
|
63
63
|
return;
|
|
64
64
|
this.finished = !0;
|
|
65
|
-
const { state: t, suffix: s, pos:
|
|
66
|
-
t[
|
|
65
|
+
const { state: t, suffix: s, pos: i, blockLen: o } = this;
|
|
66
|
+
t[i] ^= s, s & 128 && i === o - 1 && this.keccak(), t[o - 1] ^= 128, this.keccak();
|
|
67
67
|
}
|
|
68
68
|
writeInto(t) {
|
|
69
|
-
|
|
70
|
-
const s = this.state, { blockLen:
|
|
69
|
+
x(this, !1), k(t), this.finish();
|
|
70
|
+
const s = this.state, { blockLen: i } = this;
|
|
71
71
|
for (let o = 0, r = t.length; o < r; ) {
|
|
72
|
-
this.posOut >=
|
|
73
|
-
const e = Math.min(
|
|
72
|
+
this.posOut >= i && this.keccak();
|
|
73
|
+
const e = Math.min(i - this.posOut, r - o);
|
|
74
74
|
t.set(s.subarray(this.posOut, this.posOut + e), o), this.posOut += e, o += e;
|
|
75
75
|
}
|
|
76
76
|
return t;
|
|
@@ -84,7 +84,7 @@ class p extends E {
|
|
|
84
84
|
return d(t), this.xofInto(new Uint8Array(t));
|
|
85
85
|
}
|
|
86
86
|
digestInto(t) {
|
|
87
|
-
if (
|
|
87
|
+
if (M(t, this), this.finished)
|
|
88
88
|
throw new Error("digest() was already called");
|
|
89
89
|
return this.writeInto(t), this.destroy(), t;
|
|
90
90
|
}
|
|
@@ -92,16 +92,16 @@ class p extends E {
|
|
|
92
92
|
return this.digestInto(new Uint8Array(this.outputLen));
|
|
93
93
|
}
|
|
94
94
|
destroy() {
|
|
95
|
-
this.destroyed = !0, this.state
|
|
95
|
+
this.destroyed = !0, y(this.state);
|
|
96
96
|
}
|
|
97
97
|
_cloneInto(t) {
|
|
98
|
-
const { blockLen: s, suffix:
|
|
99
|
-
return t || (t = new p(s,
|
|
98
|
+
const { blockLen: s, suffix: i, outputLen: o, rounds: r, enableXOF: e } = this;
|
|
99
|
+
return t || (t = new p(s, i, o, e, r)), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = r, t.suffix = i, t.outputLen = o, t.enableXOF = e, t.destroyed = this.destroyed, t;
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
const
|
|
102
|
+
const J = (n, t, s) => X(() => new p(t, n, s)), Q = J(1, 136, 256 / 8);
|
|
103
103
|
export {
|
|
104
104
|
p as Keccak,
|
|
105
|
-
|
|
105
|
+
G as keccakP,
|
|
106
106
|
Q as keccak_256
|
|
107
107
|
};
|
package/dist/index226.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index277.cjs"),s=e.sha256;exports.sha256=s;
|
package/dist/index226.js
CHANGED
|
@@ -1,115 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
const g = /* @__PURE__ */ new Uint32Array([
|
|
4
|
-
1116352408,
|
|
5
|
-
1899447441,
|
|
6
|
-
3049323471,
|
|
7
|
-
3921009573,
|
|
8
|
-
961987163,
|
|
9
|
-
1508970993,
|
|
10
|
-
2453635748,
|
|
11
|
-
2870763221,
|
|
12
|
-
3624381080,
|
|
13
|
-
310598401,
|
|
14
|
-
607225278,
|
|
15
|
-
1426881987,
|
|
16
|
-
1925078388,
|
|
17
|
-
2162078206,
|
|
18
|
-
2614888103,
|
|
19
|
-
3248222580,
|
|
20
|
-
3835390401,
|
|
21
|
-
4022224774,
|
|
22
|
-
264347078,
|
|
23
|
-
604807628,
|
|
24
|
-
770255983,
|
|
25
|
-
1249150122,
|
|
26
|
-
1555081692,
|
|
27
|
-
1996064986,
|
|
28
|
-
2554220882,
|
|
29
|
-
2821834349,
|
|
30
|
-
2952996808,
|
|
31
|
-
3210313671,
|
|
32
|
-
3336571891,
|
|
33
|
-
3584528711,
|
|
34
|
-
113926993,
|
|
35
|
-
338241895,
|
|
36
|
-
666307205,
|
|
37
|
-
773529912,
|
|
38
|
-
1294757372,
|
|
39
|
-
1396182291,
|
|
40
|
-
1695183700,
|
|
41
|
-
1986661051,
|
|
42
|
-
2177026350,
|
|
43
|
-
2456956037,
|
|
44
|
-
2730485921,
|
|
45
|
-
2820302411,
|
|
46
|
-
3259730800,
|
|
47
|
-
3345764771,
|
|
48
|
-
3516065817,
|
|
49
|
-
3600352804,
|
|
50
|
-
4094571909,
|
|
51
|
-
275423344,
|
|
52
|
-
430227734,
|
|
53
|
-
506948616,
|
|
54
|
-
659060556,
|
|
55
|
-
883997877,
|
|
56
|
-
958139571,
|
|
57
|
-
1322822218,
|
|
58
|
-
1537002063,
|
|
59
|
-
1747873779,
|
|
60
|
-
1955562222,
|
|
61
|
-
2024104815,
|
|
62
|
-
2227730452,
|
|
63
|
-
2361852424,
|
|
64
|
-
2428436474,
|
|
65
|
-
2756734187,
|
|
66
|
-
3204031479,
|
|
67
|
-
3329325298
|
|
68
|
-
]), b = /* @__PURE__ */ new Uint32Array([
|
|
69
|
-
1779033703,
|
|
70
|
-
3144134277,
|
|
71
|
-
1013904242,
|
|
72
|
-
2773480762,
|
|
73
|
-
1359893119,
|
|
74
|
-
2600822924,
|
|
75
|
-
528734635,
|
|
76
|
-
1541459225
|
|
77
|
-
]), h = /* @__PURE__ */ new Uint32Array(64);
|
|
78
|
-
class w extends m {
|
|
79
|
-
constructor(o = 32) {
|
|
80
|
-
super(64, o, 8, !1), this.A = b[0] | 0, this.B = b[1] | 0, this.C = b[2] | 0, this.D = b[3] | 0, this.E = b[4] | 0, this.F = b[5] | 0, this.G = b[6] | 0, this.H = b[7] | 0;
|
|
81
|
-
}
|
|
82
|
-
get() {
|
|
83
|
-
const { A: o, B: r, C: t, D: s, E: a, F: f, G: c, H: e } = this;
|
|
84
|
-
return [o, r, t, s, a, f, c, e];
|
|
85
|
-
}
|
|
86
|
-
// prettier-ignore
|
|
87
|
-
set(o, r, t, s, a, f, c, e) {
|
|
88
|
-
this.A = o | 0, this.B = r | 0, this.C = t | 0, this.D = s | 0, this.E = a | 0, this.F = f | 0, this.G = c | 0, this.H = e | 0;
|
|
89
|
-
}
|
|
90
|
-
process(o, r) {
|
|
91
|
-
for (let x = 0; x < 16; x++, r += 4)
|
|
92
|
-
h[x] = o.getUint32(r, !1);
|
|
93
|
-
for (let x = 16; x < 64; x++) {
|
|
94
|
-
const A = h[x - 15], d = h[x - 2], C = i(A, 7) ^ i(A, 18) ^ A >>> 3, H = i(d, 17) ^ i(d, 19) ^ d >>> 10;
|
|
95
|
-
h[x] = H + h[x - 7] + C + h[x - 16] | 0;
|
|
96
|
-
}
|
|
97
|
-
let { A: t, B: s, C: a, D: f, E: c, F: e, G: n, H: l } = this;
|
|
98
|
-
for (let x = 0; x < 64; x++) {
|
|
99
|
-
const A = i(c, 6) ^ i(c, 11) ^ i(c, 25), d = l + A + p(c, e, n) + g[x] + h[x] | 0, H = (i(t, 2) ^ i(t, 13) ^ i(t, 22)) + u(t, s, a) | 0;
|
|
100
|
-
l = n, n = e, e = c, c = f + d | 0, f = a, a = s, s = t, t = d + H | 0;
|
|
101
|
-
}
|
|
102
|
-
t = t + this.A | 0, s = s + this.B | 0, a = a + this.C | 0, f = f + this.D | 0, c = c + this.E | 0, e = e + this.F | 0, n = n + this.G | 0, l = l + this.H | 0, this.set(t, s, a, f, c, e, n, l);
|
|
103
|
-
}
|
|
104
|
-
roundClean() {
|
|
105
|
-
h.fill(0);
|
|
106
|
-
}
|
|
107
|
-
destroy() {
|
|
108
|
-
this.set(0, 0, 0, 0, 0, 0, 0, 0), this.buffer.fill(0);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
const G = /* @__PURE__ */ D(() => new w());
|
|
1
|
+
import { sha256 as s } from "./index277.js";
|
|
2
|
+
const o = s;
|
|
112
3
|
export {
|
|
113
|
-
|
|
114
|
-
G as sha256
|
|
4
|
+
o as sha256
|
|
115
5
|
};
|
package/dist/index231.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index149.cjs"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index149.cjs"),a=require("./index285.cjs"),c=require("./index148.cjs");function h(i){const r=i.replace(/^\.|\.$/gm,"");if(r.length===0)return new Uint8Array(1);const e=new Uint8Array(l.stringToBytes(r).byteLength+2);let t=0;const o=r.split(".");for(let s=0;s<o.length;s++){let n=l.stringToBytes(o[s]);n.byteLength>255&&(n=l.stringToBytes(a.encodeLabelhash(c.labelhash(o[s])))),e[t]=n.length,e.set(n,t+1),t+=n.length+1}return e.byteLength!==t+1?e.slice(0,t+1):e}exports.packetToBytes=h;
|
package/dist/index231.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { stringToBytes as i } from "./index149.js";
|
|
2
|
-
import { encodeLabelhash as h } from "./
|
|
2
|
+
import { encodeLabelhash as h } from "./index285.js";
|
|
3
3
|
import { labelhash as f } from "./index148.js";
|
|
4
4
|
function y(s) {
|
|
5
5
|
const o = s.replace(/^\.|\.$/gm, "");
|
package/dist/index232.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index286.cjs");async function f(i,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?l(i,{gatewayUrls:t,record:r}):e.parseAvatarUri({uri:r,gatewayUrls:t})}async function l(i,{gatewayUrls:t,record:r}){const n=e.parseNftUri(r),o=await e.getNftTokenUri(i,{nft:n}),{uri:a,isOnChain:c,isEncoded:p}=e.resolveAvatarUri({uri:o,gatewayUrls:t});if(c&&(a.includes("data:application/json;base64,")||a.startsWith("{"))){const u=p?atob(a.replace("data:application/json;base64,","")):a,d=JSON.parse(u);return e.parseAvatarUri({uri:e.getJsonImage(d),gatewayUrls:t})}let s=n.tokenID;return n.namespace==="erc1155"&&(s=s.replace("0x","").padStart(64,"0")),e.getMetadataAvatarUri({gatewayUrls:t,uri:a.replace(/(?:0x)?{id}/,s)})}exports.parseAvatarRecord=f;
|
package/dist/index232.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parseAvatarUri as o, parseNftUri as f, getNftTokenUri as v, resolveAvatarUri as l, getJsonImage as A, getMetadataAvatarUri as N } from "./
|
|
1
|
+
import { parseAvatarUri as o, parseNftUri as f, getNftTokenUri as v, resolveAvatarUri as l, getJsonImage as A, getMetadataAvatarUri as N } from "./index286.js";
|
|
2
2
|
async function b(r, { gatewayUrls: t, record: e }) {
|
|
3
3
|
return /eip155:/i.test(e) ? U(r, { gatewayUrls: t, record: e }) : o({ uri: e, gatewayUrls: t });
|
|
4
4
|
}
|
package/dist/index233.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index287.cjs"),a=require("./index288.cjs");function i(t){return{...typeof t.baseFeePerGas=="bigint"&&{baseFeePerGas:e.fromNumber(t.baseFeePerGas)},...typeof t.blobBaseFee=="bigint"&&{blobBaseFee:e.fromNumber(t.blobBaseFee)},...typeof t.feeRecipient=="string"&&{feeRecipient:t.feeRecipient},...typeof t.gasLimit=="bigint"&&{gasLimit:e.fromNumber(t.gasLimit)},...typeof t.number=="bigint"&&{number:e.fromNumber(t.number)},...typeof t.prevRandao=="bigint"&&{prevRandao:e.fromNumber(t.prevRandao)},...typeof t.time=="bigint"&&{time:e.fromNumber(t.time)},...t.withdrawals&&{withdrawals:t.withdrawals.map(a.toRpc)}}}exports.toRpc=i;
|
package/dist/index233.js
CHANGED
package/dist/index245.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index289.cjs"),i=require("./index290.cjs"),u=require("./index287.cjs");function s(e,o){var n;const{bytecode:r,args:t}=o;return u.concat(r,(n=e.inputs)!=null&&n.length&&(t!=null&&t.length)?i.encode(e.inputs,t):"0x")}function d(e){return c.from(e)}exports.encode=s;exports.from=d;
|
package/dist/index245.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { from as m } from "./
|
|
2
|
-
import { encode as c } from "./
|
|
3
|
-
import { concat as f } from "./
|
|
1
|
+
import { from as m } from "./index289.js";
|
|
2
|
+
import { encode as c } from "./index290.js";
|
|
3
|
+
import { concat as f } from "./index287.js";
|
|
4
4
|
function d(o, t) {
|
|
5
5
|
var e;
|
|
6
6
|
const { bytecode: r, args: n } = t;
|
package/dist/index246.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index289.cjs"),s=require("./index290.cjs"),m=require("./index287.cjs");function d(e,...t){const{overloads:r}=e,o=r?u([e,...r],e.name,{args:t[0]}):e,c=f(o),i=t.length>0?s.encode(o.inputs,t[0]):void 0;return i?m.concat(c,i):c}function l(e,t={}){return n.from(e,t)}function u(e,t,r){const o=n.fromAbi(e,t,r);if(o.type!=="function")throw new n.NotFoundError({name:t,type:"function"});return o}function f(e){return n.getSelector(e)}exports.encodeData=d;exports.from=l;exports.fromAbi=u;exports.getSelector=f;
|
package/dist/index246.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { from as c, fromAbi as m, NotFoundError as i, getSelector as s } from "./
|
|
2
|
-
import { encode as u } from "./
|
|
3
|
-
import { concat as d } from "./
|
|
1
|
+
import { from as c, fromAbi as m, NotFoundError as i, getSelector as s } from "./index289.js";
|
|
2
|
+
import { encode as u } from "./index290.js";
|
|
3
|
+
import { concat as d } from "./index287.js";
|
|
4
4
|
function S(o, ...t) {
|
|
5
5
|
const { overloads: r } = o, e = r ? p([o, ...r], o.name, {
|
|
6
6
|
args: t[0]
|
package/dist/index247.cjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
`),{docsPath:o,docsSlug:"account",name:"AccountNotFoundError"})}}class u extends t.BaseError{constructor({docsPath:o,metaMessages:e,type:n}){super(`Account type "${n}" is not supported.`,{docsPath:o,metaMessages:e,name:"AccountTypeNotSupportedError"})}}exports.AccountNotFoundError=c;exports.AccountTypeNotSupportedError=u;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index143.cjs"),i=require("./index135.cjs"),s=require("./index244.cjs");function u(r,{docsPath:o,...e}){const t=(()=>{const n=s.getNodeError(r,e);return n instanceof c.UnknownNodeError?r:n})();return new i.TransactionExecutionError(t,{docsPath:o,...e})}exports.getTransactionError=u;
|
package/dist/index247.js
CHANGED
|
@@ -1,27 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
class s extends t {
|
|
16
|
-
constructor({ docsPath: o, metaMessages: c, type: r }) {
|
|
17
|
-
super(`Account type "${r}" is not supported.`, {
|
|
18
|
-
docsPath: o,
|
|
19
|
-
metaMessages: c,
|
|
20
|
-
name: "AccountTypeNotSupportedError"
|
|
21
|
-
});
|
|
22
|
-
}
|
|
1
|
+
import { UnknownNodeError as c } from "./index143.js";
|
|
2
|
+
import { TransactionExecutionError as i } from "./index135.js";
|
|
3
|
+
import { getNodeError as u } from "./index244.js";
|
|
4
|
+
function s(r, { docsPath: t, ...o }) {
|
|
5
|
+
const e = (() => {
|
|
6
|
+
const n = u(r, o);
|
|
7
|
+
return n instanceof c ? r : n;
|
|
8
|
+
})();
|
|
9
|
+
return new i(e, {
|
|
10
|
+
docsPath: t,
|
|
11
|
+
...o
|
|
12
|
+
});
|
|
23
13
|
}
|
|
24
14
|
export {
|
|
25
|
-
|
|
26
|
-
s as AccountTypeNotSupportedError
|
|
15
|
+
s as getTransactionError
|
|
27
16
|
};
|
package/dist/index248.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index182.cjs");function a(e){return e.map(n=>({...n,value:BigInt(n.value)}))}function r(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?t.hexToNumber(e.nonce):void 0,storageProof:e.storageProof?a(e.storageProof):void 0}}exports.formatProof=r;
|
package/dist/index248.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { hexToNumber as a } from "./index182.js";
|
|
2
|
+
function t(e) {
|
|
3
|
+
return e.map((n) => ({
|
|
4
|
+
...n,
|
|
5
|
+
value: BigInt(n.value)
|
|
6
|
+
}));
|
|
7
|
+
}
|
|
8
|
+
function o(e) {
|
|
9
|
+
return {
|
|
10
|
+
...e,
|
|
11
|
+
balance: e.balance ? BigInt(e.balance) : void 0,
|
|
12
|
+
nonce: e.nonce ? a(e.nonce) : void 0,
|
|
13
|
+
storageProof: e.storageProof ? t(e.storageProof) : void 0
|
|
14
|
+
};
|
|
13
15
|
}
|
|
14
16
|
export {
|
|
15
|
-
|
|
17
|
+
o as formatProof
|
|
16
18
|
};
|
package/dist/index249.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index38.cjs");class c extends t.BaseError{constructor({docsPath:o}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
|
|
2
|
+
`),{docsPath:o,docsSlug:"account",name:"AccountNotFoundError"})}}class u extends t.BaseError{constructor({docsPath:o,metaMessages:e,type:n}){super(`Account type "${n}" is not supported.`,{docsPath:o,metaMessages:e,name:"AccountTypeNotSupportedError"})}}exports.AccountNotFoundError=c;exports.AccountTypeNotSupportedError=u;
|
package/dist/index249.js
CHANGED
|
@@ -1,18 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { BaseError as t } from "./index38.js";
|
|
2
|
+
class u extends t {
|
|
3
|
+
constructor({ docsPath: o } = {}) {
|
|
4
|
+
super([
|
|
5
|
+
"Could not find an Account to execute with this Action.",
|
|
6
|
+
"Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."
|
|
7
|
+
].join(`
|
|
8
|
+
`), {
|
|
9
|
+
docsPath: o,
|
|
10
|
+
docsSlug: "account",
|
|
11
|
+
name: "AccountNotFoundError"
|
|
12
|
+
});
|
|
13
|
+
}
|
|
7
14
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
class s extends t {
|
|
16
|
+
constructor({ docsPath: o, metaMessages: c, type: r }) {
|
|
17
|
+
super(`Account type "${r}" is not supported.`, {
|
|
18
|
+
docsPath: o,
|
|
19
|
+
metaMessages: c,
|
|
20
|
+
name: "AccountTypeNotSupportedError"
|
|
21
|
+
});
|
|
22
|
+
}
|
|
15
23
|
}
|
|
16
24
|
export {
|
|
17
|
-
|
|
25
|
+
u as AccountNotFoundError,
|
|
26
|
+
s as AccountTypeNotSupportedError
|
|
18
27
|
};
|
package/dist/index266.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index263.cjs"),A=require("./index268.cjs"),g=require("./index269.cjs"),d=require("./index270.cjs"),q=require("./index271.cjs"),h=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index263.cjs"),A=require("./index268.cjs"),g=require("./index269.cjs"),d=require("./index270.cjs"),q=require("./index271.cjs"),h=require("./index296.cjs"),o=require("./index264.cjs");function z(e,t={}){if(o.isFunctionSignature(e))return E(e,t);if(o.isEventSignature(e))return P(e,t);if(o.isErrorSignature(e))return M(e,t);if(o.isConstructorSignature(e))return I(e,t);if(o.isFallbackSignature(e))return R(e);if(o.isReceiveSignature(e))return{type:"receive",stateMutability:"payable"};throw new d.UnknownSignatureError({signature:e})}function E(e,t={}){const n=o.execFunctionSignature(e);if(!n)throw new d.InvalidSignatureError({signature:e,type:"function"});const a=u(n.parameters),r=[],c=a.length;for(let s=0;s<c;s++)r.push(m(a[s],{modifiers:o.functionModifiers,structs:t,type:"function"}));const i=[];if(n.returns){const s=u(n.returns),l=s.length;for(let f=0;f<l;f++)i.push(m(s[f],{modifiers:o.functionModifiers,structs:t,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:r,outputs:i}}function P(e,t={}){const n=o.execEventSignature(e);if(!n)throw new d.InvalidSignatureError({signature:e,type:"event"});const a=u(n.parameters),r=[],c=a.length;for(let i=0;i<c;i++)r.push(m(a[i],{modifiers:o.eventModifiers,structs:t,type:"event"}));return{name:n.name,type:"event",inputs:r}}function M(e,t={}){const n=o.execErrorSignature(e);if(!n)throw new d.InvalidSignatureError({signature:e,type:"error"});const a=u(n.parameters),r=[],c=a.length;for(let i=0;i<c;i++)r.push(m(a[i],{structs:t,type:"error"}));return{name:n.name,type:"error",inputs:r}}function I(e,t={}){const n=o.execConstructorSignature(e);if(!n)throw new d.InvalidSignatureError({signature:e,type:"constructor"});const a=u(n.parameters),r=[],c=a.length;for(let i=0;i<c;i++)r.push(m(a[i],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:r}}function R(e){const t=o.execFallbackSignature(e);if(!t)throw new d.InvalidSignatureError({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}const _=/^(?<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$_]*))?$/,$=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,K=/^u?int$/;function m(e,t){var p,w;const n=h.getParameterCacheKey(e,t==null?void 0:t.type,t==null?void 0:t.structs);if(h.parameterCache.has(n))return h.parameterCache.get(n);const a=y.isTupleRegex.test(e),r=y.execTyped(a?$:_,e);if(!r)throw new g.InvalidParameterError({param:e});if(r.name&&F(r.name))throw new g.SolidityProtectedKeywordError({param:e,name:r.name});const c=r.name?{name:r.name}:{},i=r.modifier==="indexed"?{indexed:!0}:{},s=(t==null?void 0:t.structs)??{};let l,f={};if(a){l="tuple";const v=u(r.type),x=[],k=v.length;for(let b=0;b<k;b++)x.push(m(v[b],{structs:s}));f={components:x}}else if(r.type in s)l="tuple",f={components:s[r.type]};else if(K.test(r.type))l=`${r.type}256`;else if(l=r.type,(t==null?void 0:t.type)!=="struct"&&!C(l))throw new A.UnknownSolidityTypeError({type:l});if(r.modifier){if(!((w=(p=t==null?void 0:t.modifiers)==null?void 0:p.has)!=null&&w.call(p,r.modifier)))throw new g.InvalidModifierError({param:e,type:t==null?void 0:t.type,modifier:r.modifier});if(o.functionModifiers.has(r.modifier)&&!T(l,!!r.array))throw new g.InvalidFunctionModifierError({param:e,type:t==null?void 0:t.type,modifier:r.modifier})}const S={type:`${l}${r.array??""}`,...c,...i,...f};return h.parameterCache.set(n,S),S}function u(e,t=[],n="",a=0){const r=e.trim().length;for(let c=0;c<r;c++){const i=e[c],s=e.slice(c+1);switch(i){case",":return a===0?u(s,[...t,n.trim()]):u(s,t,`${n}${i}`,a);case"(":return u(s,t,`${n}${i}`,a+1);case")":return u(s,t,`${n}${i}`,a-1);default:return u(s,t,`${n}${i}`,a)}}if(n==="")return t;if(a!==0)throw new q.InvalidParenthesisError({current:n,depth:a});return t.push(n.trim()),t}function C(e){return e==="address"||e==="bool"||e==="function"||e==="string"||y.bytesRegex.test(e)||y.integerRegex.test(e)}const Z=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function F(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||y.bytesRegex.test(e)||y.integerRegex.test(e)||Z.test(e)}function T(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}exports.isSolidityKeyword=F;exports.isSolidityType=C;exports.isValidDataLocation=T;exports.parseAbiParameter=m;exports.parseConstructorSignature=I;exports.parseErrorSignature=M;exports.parseEventSignature=P;exports.parseFallbackSignature=R;exports.parseFunctionSignature=E;exports.parseSignature=z;exports.splitParameters=u;
|
package/dist/index266.js
CHANGED
|
@@ -3,7 +3,7 @@ import { UnknownSolidityTypeError as M } from "./index268.js";
|
|
|
3
3
|
import { InvalidParameterError as R, SolidityProtectedKeywordError as k, InvalidModifierError as z, InvalidFunctionModifierError as A } from "./index269.js";
|
|
4
4
|
import { UnknownSignatureError as F, InvalidSignatureError as m } from "./index270.js";
|
|
5
5
|
import { InvalidParenthesisError as T } from "./index271.js";
|
|
6
|
-
import { getParameterCacheKey as _, parameterCache as p } from "./
|
|
6
|
+
import { getParameterCacheKey as _, parameterCache as p } from "./index296.js";
|
|
7
7
|
import { isFunctionSignature as C, isEventSignature as I, isErrorSignature as Z, isConstructorSignature as K, isFallbackSignature as L, isReceiveSignature as U, functionModifiers as h, execFunctionSignature as W, execEventSignature as D, eventModifiers as V, execErrorSignature as j, execConstructorSignature as q, execFallbackSignature as B } from "./index264.js";
|
|
8
8
|
function le(e, t = {}) {
|
|
9
9
|
if (C(e))
|
package/dist/index277.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index294.cjs"),x=require("./index284.cjs"),_=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),f=new Uint32Array(64);class u extends e.HashMD{constructor(o=32){super(64,o,8,!1),this.A=e.SHA256_IV[0]|0,this.B=e.SHA256_IV[1]|0,this.C=e.SHA256_IV[2]|0,this.D=e.SHA256_IV[3]|0,this.E=e.SHA256_IV[4]|0,this.F=e.SHA256_IV[5]|0,this.G=e.SHA256_IV[6]|0,this.H=e.SHA256_IV[7]|0}get(){const{A:o,B:h,C:s,D:a,E:r,F:b,G:c,H:i}=this;return[o,h,s,a,r,b,c,i]}set(o,h,s,a,r,b,c,i){this.A=o|0,this.B=h|0,this.C=s|0,this.D=a|0,this.E=r|0,this.F=b|0,this.G=c|0,this.H=i|0}process(o,h){for(let t=0;t<16;t++,h+=4)f[t]=o.getUint32(h,!1);for(let t=16;t<64;t++){const H=f[t-15],d=f[t-2],S=x.rotr(H,7)^x.rotr(H,18)^H>>>3,l=x.rotr(d,17)^x.rotr(d,19)^d>>>10;f[t]=l+f[t-7]+S+f[t-16]|0}let{A:s,B:a,C:r,D:b,E:c,F:i,G:n,H:A}=this;for(let t=0;t<64;t++){const H=x.rotr(c,6)^x.rotr(c,11)^x.rotr(c,25),d=A+H+e.Chi(c,i,n)+_[t]+f[t]|0,l=(x.rotr(s,2)^x.rotr(s,13)^x.rotr(s,22))+e.Maj(s,a,r)|0;A=n,n=i,i=c,c=b+d|0,b=r,r=a,a=s,s=d+l|0}s=s+this.A|0,a=a+this.B|0,r=r+this.C|0,b=b+this.D|0,c=c+this.E|0,i=i+this.F|0,n=n+this.G|0,A=A+this.H|0,this.set(s,a,r,b,c,i,n,A)}roundClean(){x.clean(f)}destroy(){this.set(0,0,0,0,0,0,0,0),x.clean(this.buffer)}}const I=x.createHasher(()=>new u);exports.SHA256=u;exports.sha256=I;
|