@gardenfi/core 0.2.0-beta.72 → 0.2.0-beta.73
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.cjs +1 -1
- package/dist/index.js +15 -14
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +55 -41
- package/dist/index100.cjs +1 -0
- package/dist/index100.js +37 -0
- package/dist/index101.cjs +1 -0
- package/dist/index101.js +369 -0
- package/dist/index102.cjs +1 -0
- package/dist/index102.js +23 -0
- package/dist/index103.cjs +1 -0
- package/dist/index103.js +58 -0
- package/dist/index104.cjs +1 -0
- package/dist/index104.js +5 -0
- package/dist/index105.cjs +1 -0
- package/dist/index105.js +51 -0
- package/dist/index106.cjs +1 -0
- package/dist/index106.js +28 -0
- package/dist/index107.cjs +1 -0
- package/dist/index107.js +4 -0
- package/dist/index108.cjs +1 -0
- package/dist/index108.js +4 -0
- package/dist/index109.cjs +1 -0
- package/dist/index109.js +64 -0
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +2 -2
- package/dist/index110.cjs +1 -0
- package/dist/index110.js +37 -0
- package/dist/index111.cjs +1 -0
- package/dist/index111.js +7 -0
- package/dist/index112.cjs +1 -0
- package/dist/index112.js +4 -0
- package/dist/index113.cjs +1 -0
- package/dist/index113.js +60 -0
- package/dist/index114.cjs +1 -0
- package/dist/index114.js +4 -0
- package/dist/index115.cjs +1 -0
- package/dist/index115.js +42 -0
- package/dist/index116.cjs +1 -0
- package/dist/index116.js +45 -0
- package/dist/index117.cjs +1 -0
- package/dist/index117.js +20 -0
- package/dist/index118.cjs +1 -0
- package/dist/index118.js +111 -0
- package/dist/index119.cjs +1 -0
- package/dist/index119.js +23 -0
- package/dist/index120.cjs +1 -0
- package/dist/index120.js +228 -0
- package/dist/index121.cjs +1 -0
- package/dist/index121.js +6 -0
- package/dist/index122.cjs +1 -0
- package/dist/index122.js +160 -0
- package/dist/index123.cjs +1 -0
- package/dist/index123.js +4 -0
- package/dist/index124.cjs +1 -0
- package/dist/index124.js +75 -0
- package/dist/index125.cjs +1 -0
- package/dist/index125.js +107 -0
- package/dist/index126.cjs +1 -0
- package/dist/index126.js +15 -0
- package/dist/index127.cjs +1 -0
- package/dist/index127.js +35 -0
- package/dist/index128.cjs +1 -0
- package/dist/index128.js +4 -0
- package/dist/index129.cjs +1 -0
- package/dist/index129.js +32 -0
- package/dist/index130.cjs +1 -0
- package/dist/index130.js +21 -0
- package/dist/index131.cjs +1 -0
- package/dist/index131.js +4 -0
- package/dist/index132.cjs +1 -0
- package/dist/index132.js +358 -0
- package/dist/index133.cjs +1 -0
- package/dist/index133.js +241 -0
- package/dist/index134.cjs +1 -0
- package/dist/index134.js +70 -0
- package/dist/index135.cjs +1 -0
- package/dist/index135.js +64 -0
- package/dist/index136.cjs +1 -0
- package/dist/index136.js +14 -0
- package/dist/index137.cjs +1 -0
- package/dist/index137.js +47 -0
- package/dist/index138.cjs +1 -0
- package/dist/index138.js +65 -0
- package/dist/index139.cjs +1 -0
- package/dist/index139.js +228 -0
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +2 -2
- package/dist/index140.cjs +1 -0
- package/dist/index140.js +5 -0
- package/dist/index141.cjs +1 -0
- package/dist/index141.js +171 -0
- package/dist/index142.cjs +1 -0
- package/dist/index142.js +30 -0
- package/dist/index143.cjs +1 -0
- package/dist/index143.js +23 -0
- package/dist/index144.cjs +1 -0
- package/dist/index144.js +72 -0
- package/dist/index145.cjs +1 -0
- package/dist/index145.js +130 -0
- package/dist/index146.cjs +1 -0
- package/dist/index146.js +9 -0
- package/dist/index147.cjs +1 -0
- package/dist/index147.js +4 -0
- package/dist/index148.cjs +1 -0
- package/dist/index148.js +28 -0
- package/dist/index149.cjs +1 -0
- package/dist/index149.js +4 -0
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +30 -136
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +25 -2
- package/dist/index18.cjs +1 -3
- package/dist/index18.js +29 -26
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +32 -17
- package/dist/index20.cjs +1 -2
- package/dist/index20.js +53 -25
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +6 -38
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +9 -199
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +138 -2
- package/dist/index24.js +2 -2
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +13 -2
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +36 -27
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +41 -14
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +26 -173
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +15 -22
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +24 -2
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +25 -34
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +54 -8
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +28 -2
- package/dist/index34.cjs +3 -6
- package/dist/index34.js +30 -949
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +17 -4
- package/dist/index36.cjs +2 -1
- package/dist/index36.js +23 -18
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +38 -29
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +197 -60
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +2 -33
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +2 -87
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +2 -49
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +12 -25
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +12 -2
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +4 -2
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +45 -19
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +38 -30
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +165 -360
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +13 -21
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +3 -54
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +17 -3
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +9 -70
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +175 -2
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +21 -57
- package/dist/index54.js +2 -2
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +34 -39
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +9 -43
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +34 -17
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +50 -103
- package/dist/index59.cjs +2 -1
- package/dist/index59.js +58 -19
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +3 -225
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +128 -4
- package/dist/index62.cjs +2 -1
- package/dist/index62.js +37 -152
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +9 -2
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +11 -13
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +12 -2
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +13 -32
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +7 -2
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +17 -355
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +75 -235
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +14 -67
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +17 -60
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +6 -11
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +20 -43
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +13 -62
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +2 -226
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +2 -3
- package/dist/index77.cjs +2 -1
- package/dist/index77.js +32 -166
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +5 -27
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +18 -19
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +30 -68
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +2 -128
- package/dist/index82.cjs +6 -1
- package/dist/index82.js +949 -9
- package/dist/index83.cjs +1 -1
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +61 -25
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +33 -2
- package/dist/index86.cjs +1 -0
- package/dist/index86.js +89 -0
- package/dist/index87.cjs +1 -0
- package/dist/index87.js +15 -0
- package/dist/index88.cjs +1 -0
- package/dist/index88.js +9 -0
- package/dist/index89.cjs +1 -0
- package/dist/index89.js +115 -0
- package/dist/index90.cjs +1 -0
- package/dist/index90.js +9 -0
- package/dist/index91.cjs +1 -0
- package/dist/index91.js +35 -0
- package/dist/index92.cjs +1 -0
- package/dist/index92.js +4 -0
- package/dist/index93.cjs +1 -0
- package/dist/index93.js +40 -0
- package/dist/index94.cjs +1 -0
- package/dist/index94.js +31 -0
- package/dist/index95.cjs +1 -0
- package/dist/index95.js +23 -0
- package/dist/index96.cjs +1 -0
- package/dist/index96.js +9 -0
- package/dist/index97.cjs +1 -0
- package/dist/index97.js +7 -0
- package/dist/index98.cjs +1 -0
- package/dist/index98.js +13 -0
- package/dist/index99.cjs +1 -0
- package/dist/index99.js +22 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/lib/utils.d.ts +3 -1
- package/package.json +1 -1
package/dist/index58.js
CHANGED
|
@@ -1,111 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
961987163,
|
|
10
|
-
1508970993,
|
|
11
|
-
2453635748,
|
|
12
|
-
2870763221,
|
|
13
|
-
3624381080,
|
|
14
|
-
310598401,
|
|
15
|
-
607225278,
|
|
16
|
-
1426881987,
|
|
17
|
-
1925078388,
|
|
18
|
-
2162078206,
|
|
19
|
-
2614888103,
|
|
20
|
-
3248222580,
|
|
21
|
-
3835390401,
|
|
22
|
-
4022224774,
|
|
23
|
-
264347078,
|
|
24
|
-
604807628,
|
|
25
|
-
770255983,
|
|
26
|
-
1249150122,
|
|
27
|
-
1555081692,
|
|
28
|
-
1996064986,
|
|
29
|
-
2554220882,
|
|
30
|
-
2821834349,
|
|
31
|
-
2952996808,
|
|
32
|
-
3210313671,
|
|
33
|
-
3336571891,
|
|
34
|
-
3584528711,
|
|
35
|
-
113926993,
|
|
36
|
-
338241895,
|
|
37
|
-
666307205,
|
|
38
|
-
773529912,
|
|
39
|
-
1294757372,
|
|
40
|
-
1396182291,
|
|
41
|
-
1695183700,
|
|
42
|
-
1986661051,
|
|
43
|
-
2177026350,
|
|
44
|
-
2456956037,
|
|
45
|
-
2730485921,
|
|
46
|
-
2820302411,
|
|
47
|
-
3259730800,
|
|
48
|
-
3345764771,
|
|
49
|
-
3516065817,
|
|
50
|
-
3600352804,
|
|
51
|
-
4094571909,
|
|
52
|
-
275423344,
|
|
53
|
-
430227734,
|
|
54
|
-
506948616,
|
|
55
|
-
659060556,
|
|
56
|
-
883997877,
|
|
57
|
-
958139571,
|
|
58
|
-
1322822218,
|
|
59
|
-
1537002063,
|
|
60
|
-
1747873779,
|
|
61
|
-
1955562222,
|
|
62
|
-
2024104815,
|
|
63
|
-
2227730452,
|
|
64
|
-
2361852424,
|
|
65
|
-
2428436474,
|
|
66
|
-
2756734187,
|
|
67
|
-
3204031479,
|
|
68
|
-
3329325298
|
|
69
|
-
], p = new Array(64);
|
|
70
|
-
function x() {
|
|
71
|
-
this.init(), this._w = p, f.call(this, 64, 56);
|
|
1
|
+
import { BaseError as g } from "./index59.js";
|
|
2
|
+
import { isHex as x } from "./index60.js";
|
|
3
|
+
import { pad as s } from "./index57.js";
|
|
4
|
+
import { assertSize as u } from "./index30.js";
|
|
5
|
+
import { numberToHex as h } from "./index45.js";
|
|
6
|
+
const A = /* @__PURE__ */ new TextEncoder();
|
|
7
|
+
function F(e, n = {}) {
|
|
8
|
+
return typeof e == "number" || typeof e == "bigint" ? T(e, n) : typeof e == "boolean" ? B(e, n) : x(e) ? y(e, n) : l(e, n);
|
|
72
9
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
return
|
|
76
|
-
};
|
|
77
|
-
function b(t, r, s) {
|
|
78
|
-
return s ^ t & (r ^ s);
|
|
79
|
-
}
|
|
80
|
-
function w(t, r, s) {
|
|
81
|
-
return t & r | s & (t | r);
|
|
10
|
+
function B(e, n = {}) {
|
|
11
|
+
const r = new Uint8Array(1);
|
|
12
|
+
return r[0] = Number(e), typeof n.size == "number" ? (u(r, { size: n.size }), s(r, { size: n.size })) : r;
|
|
82
13
|
}
|
|
83
|
-
|
|
84
|
-
|
|
14
|
+
const t = {
|
|
15
|
+
zero: 48,
|
|
16
|
+
nine: 57,
|
|
17
|
+
A: 65,
|
|
18
|
+
F: 70,
|
|
19
|
+
a: 97,
|
|
20
|
+
f: 102
|
|
21
|
+
};
|
|
22
|
+
function m(e) {
|
|
23
|
+
if (e >= t.zero && e <= t.nine)
|
|
24
|
+
return e - t.zero;
|
|
25
|
+
if (e >= t.A && e <= t.F)
|
|
26
|
+
return e - (t.A - 10);
|
|
27
|
+
if (e >= t.a && e <= t.f)
|
|
28
|
+
return e - (t.a - 10);
|
|
85
29
|
}
|
|
86
|
-
function
|
|
87
|
-
|
|
30
|
+
function y(e, n = {}) {
|
|
31
|
+
let r = e;
|
|
32
|
+
n.size && (u(r, { size: n.size }), r = s(r, { dir: "right", size: n.size }));
|
|
33
|
+
let i = r.slice(2);
|
|
34
|
+
i.length % 2 && (i = `0${i}`);
|
|
35
|
+
const z = i.length / 2, d = new Uint8Array(z);
|
|
36
|
+
for (let f = 0, o = 0; f < z; f++) {
|
|
37
|
+
const b = m(i.charCodeAt(o++)), c = m(i.charCodeAt(o++));
|
|
38
|
+
if (b === void 0 || c === void 0)
|
|
39
|
+
throw new g(`Invalid byte sequence ("${i[o - 2]}${i[o - 1]}" in "${i}").`);
|
|
40
|
+
d[f] = b * 16 + c;
|
|
41
|
+
}
|
|
42
|
+
return d;
|
|
88
43
|
}
|
|
89
|
-
function
|
|
90
|
-
|
|
44
|
+
function T(e, n) {
|
|
45
|
+
const r = h(e, n);
|
|
46
|
+
return y(r);
|
|
91
47
|
}
|
|
92
|
-
function l(
|
|
93
|
-
|
|
48
|
+
function l(e, n = {}) {
|
|
49
|
+
const r = A.encode(e);
|
|
50
|
+
return typeof n.size == "number" ? (u(r, { size: n.size }), s(r, { dir: "right", size: n.size })) : r;
|
|
94
51
|
}
|
|
95
|
-
x.prototype._update = function(t) {
|
|
96
|
-
for (var r = this._w, s = this._a | 0, a = this._b | 0, B = this._c | 0, e = this._d | 0, h = this._e | 0, _ = this._f | 0, n = this._g | 0, A = this._h | 0, i = 0; i < 16; ++i) r[i] = t.readInt32BE(i * 4);
|
|
97
|
-
for (; i < 64; ++i) r[i] = l(r[i - 2]) + r[i - 7] + I(r[i - 15]) + r[i - 16] | 0;
|
|
98
|
-
for (var C = 0; C < 64; ++C) {
|
|
99
|
-
var E = A + g(h) + b(h, _, n) + m[C] + r[C] | 0, o = d(s) + w(s, a, B) | 0;
|
|
100
|
-
A = n, n = _, _ = h, h = e + E | 0, e = B, B = a, a = s, s = E + o | 0;
|
|
101
|
-
}
|
|
102
|
-
this._a = s + this._a | 0, this._b = a + this._b | 0, this._c = B + this._c | 0, this._d = e + this._d | 0, this._e = h + this._e | 0, this._f = _ + this._f | 0, this._g = n + this._g | 0, this._h = A + this._h | 0;
|
|
103
|
-
};
|
|
104
|
-
x.prototype._hash = function() {
|
|
105
|
-
var t = D.allocUnsafe(32);
|
|
106
|
-
return t.writeInt32BE(this._a, 0), t.writeInt32BE(this._b, 4), t.writeInt32BE(this._c, 8), t.writeInt32BE(this._d, 12), t.writeInt32BE(this._e, 16), t.writeInt32BE(this._f, 20), t.writeInt32BE(this._g, 24), t.writeInt32BE(this._h, 28), t;
|
|
107
|
-
};
|
|
108
|
-
var K = x;
|
|
109
52
|
export {
|
|
110
|
-
|
|
53
|
+
B as boolToBytes,
|
|
54
|
+
y as hexToBytes,
|
|
55
|
+
T as numberToBytes,
|
|
56
|
+
l as stringToBytes,
|
|
57
|
+
F as toBytes
|
|
111
58
|
};
|
package/dist/index59.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index76.cjs");let i={getDocsUrl:({docsBaseUrl:s,docsPath:t="",docsSlug:e})=>t?`${s??"https://viem.sh"}${t}${e?`#${e}`:""}`:void 0,version:`viem@${l.version}`};class r extends Error{constructor(t,e={}){var o;const u=(()=>{var c;return e.cause instanceof r?e.cause.details:(c=e.cause)!=null&&c.message?e.cause.message:e.details})(),a=e.cause instanceof r&&e.cause.docsPath||e.docsPath,n=(o=i.getDocsUrl)==null?void 0:o.call(i,{...e,docsPath:a}),b=[t||"An error occurred.","",...e.metaMessages?[...e.metaMessages,""]:[],...n?[`Docs: ${n}`]:[],...u?[`Details: ${u}`]:[],...i.version?[`Version: ${i.version}`]:[]].join(`
|
|
2
|
+
`);super(b,e.cause?{cause:e.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=u,this.docsPath=a,this.metaMessages=e.metaMessages,this.name=e.name??this.name,this.shortMessage=t,this.version=l.version}walk(t){return d(this,t)}}function d(s,t){return t!=null&&t(s)?s:s&&typeof s=="object"&&"cause"in s?d(s.cause,t):t?null:s}exports.BaseError=r;
|
package/dist/index59.js
CHANGED
|
@@ -1,23 +1,62 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var n = _, x = e, l = f, c = o.Buffer, d = new Array(160);
|
|
6
|
-
function t() {
|
|
7
|
-
this.init(), this._w = d, l.call(this, 128, 112);
|
|
8
|
-
}
|
|
9
|
-
n(t, x);
|
|
10
|
-
t.prototype.init = function() {
|
|
11
|
-
return this._ah = 3418070365, this._bh = 1654270250, this._ch = 2438529370, this._dh = 355462360, this._eh = 1731405415, this._fh = 2394180231, this._gh = 3675008525, this._hh = 1203062813, this._al = 3238371032, this._bl = 914150663, this._cl = 812702999, this._dl = 4144912697, this._el = 4290775857, this._fl = 1750603025, this._gl = 1694076839, this._hl = 3204075428, this;
|
|
1
|
+
import { version as l } from "./index76.js";
|
|
2
|
+
let i = {
|
|
3
|
+
getDocsUrl: ({ docsBaseUrl: s, docsPath: t = "", docsSlug: e }) => t ? `${s ?? "https://viem.sh"}${t}${e ? `#${e}` : ""}` : void 0,
|
|
4
|
+
version: `viem@${l}`
|
|
12
5
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
class r extends Error {
|
|
7
|
+
constructor(t, e = {}) {
|
|
8
|
+
var o;
|
|
9
|
+
const u = (() => {
|
|
10
|
+
var c;
|
|
11
|
+
return e.cause instanceof r ? e.cause.details : (c = e.cause) != null && c.message ? e.cause.message : e.details;
|
|
12
|
+
})(), a = e.cause instanceof r && e.cause.docsPath || e.docsPath, n = (o = i.getDocsUrl) == null ? void 0 : o.call(i, { ...e, docsPath: a }), b = [
|
|
13
|
+
t || "An error occurred.",
|
|
14
|
+
"",
|
|
15
|
+
...e.metaMessages ? [...e.metaMessages, ""] : [],
|
|
16
|
+
...n ? [`Docs: ${n}`] : [],
|
|
17
|
+
...u ? [`Details: ${u}`] : [],
|
|
18
|
+
...i.version ? [`Version: ${i.version}`] : []
|
|
19
|
+
].join(`
|
|
20
|
+
`);
|
|
21
|
+
super(b, e.cause ? { cause: e.cause } : void 0), Object.defineProperty(this, "details", {
|
|
22
|
+
enumerable: !0,
|
|
23
|
+
configurable: !0,
|
|
24
|
+
writable: !0,
|
|
25
|
+
value: void 0
|
|
26
|
+
}), Object.defineProperty(this, "docsPath", {
|
|
27
|
+
enumerable: !0,
|
|
28
|
+
configurable: !0,
|
|
29
|
+
writable: !0,
|
|
30
|
+
value: void 0
|
|
31
|
+
}), Object.defineProperty(this, "metaMessages", {
|
|
32
|
+
enumerable: !0,
|
|
33
|
+
configurable: !0,
|
|
34
|
+
writable: !0,
|
|
35
|
+
value: void 0
|
|
36
|
+
}), Object.defineProperty(this, "shortMessage", {
|
|
37
|
+
enumerable: !0,
|
|
38
|
+
configurable: !0,
|
|
39
|
+
writable: !0,
|
|
40
|
+
value: void 0
|
|
41
|
+
}), Object.defineProperty(this, "version", {
|
|
42
|
+
enumerable: !0,
|
|
43
|
+
configurable: !0,
|
|
44
|
+
writable: !0,
|
|
45
|
+
value: void 0
|
|
46
|
+
}), Object.defineProperty(this, "name", {
|
|
47
|
+
enumerable: !0,
|
|
48
|
+
configurable: !0,
|
|
49
|
+
writable: !0,
|
|
50
|
+
value: "BaseError"
|
|
51
|
+
}), this.details = u, this.docsPath = a, this.metaMessages = e.metaMessages, this.name = e.name ?? this.name, this.shortMessage = t, this.version = l;
|
|
17
52
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
53
|
+
walk(t) {
|
|
54
|
+
return d(this, t);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function d(s, t) {
|
|
58
|
+
return t != null && t(s) ? s : s && typeof s == "object" && "cause" in s ? d(s.cause, t) : t ? null : s;
|
|
59
|
+
}
|
|
21
60
|
export {
|
|
22
|
-
|
|
61
|
+
r as BaseError
|
|
23
62
|
};
|
package/dist/index60.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function r(t,{strict:e=!0}={}){return!t||typeof t!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")}exports.isHex=r;
|
package/dist/index60.js
CHANGED
|
@@ -1,228 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { s as h0 } from "./index31.js";
|
|
4
|
-
var e0 = a0, O = x0, c0 = h0.Buffer, F = [
|
|
5
|
-
1116352408,
|
|
6
|
-
3609767458,
|
|
7
|
-
1899447441,
|
|
8
|
-
602891725,
|
|
9
|
-
3049323471,
|
|
10
|
-
3964484399,
|
|
11
|
-
3921009573,
|
|
12
|
-
2173295548,
|
|
13
|
-
961987163,
|
|
14
|
-
4081628472,
|
|
15
|
-
1508970993,
|
|
16
|
-
3053834265,
|
|
17
|
-
2453635748,
|
|
18
|
-
2937671579,
|
|
19
|
-
2870763221,
|
|
20
|
-
3664609560,
|
|
21
|
-
3624381080,
|
|
22
|
-
2734883394,
|
|
23
|
-
310598401,
|
|
24
|
-
1164996542,
|
|
25
|
-
607225278,
|
|
26
|
-
1323610764,
|
|
27
|
-
1426881987,
|
|
28
|
-
3590304994,
|
|
29
|
-
1925078388,
|
|
30
|
-
4068182383,
|
|
31
|
-
2162078206,
|
|
32
|
-
991336113,
|
|
33
|
-
2614888103,
|
|
34
|
-
633803317,
|
|
35
|
-
3248222580,
|
|
36
|
-
3479774868,
|
|
37
|
-
3835390401,
|
|
38
|
-
2666613458,
|
|
39
|
-
4022224774,
|
|
40
|
-
944711139,
|
|
41
|
-
264347078,
|
|
42
|
-
2341262773,
|
|
43
|
-
604807628,
|
|
44
|
-
2007800933,
|
|
45
|
-
770255983,
|
|
46
|
-
1495990901,
|
|
47
|
-
1249150122,
|
|
48
|
-
1856431235,
|
|
49
|
-
1555081692,
|
|
50
|
-
3175218132,
|
|
51
|
-
1996064986,
|
|
52
|
-
2198950837,
|
|
53
|
-
2554220882,
|
|
54
|
-
3999719339,
|
|
55
|
-
2821834349,
|
|
56
|
-
766784016,
|
|
57
|
-
2952996808,
|
|
58
|
-
2566594879,
|
|
59
|
-
3210313671,
|
|
60
|
-
3203337956,
|
|
61
|
-
3336571891,
|
|
62
|
-
1034457026,
|
|
63
|
-
3584528711,
|
|
64
|
-
2466948901,
|
|
65
|
-
113926993,
|
|
66
|
-
3758326383,
|
|
67
|
-
338241895,
|
|
68
|
-
168717936,
|
|
69
|
-
666307205,
|
|
70
|
-
1188179964,
|
|
71
|
-
773529912,
|
|
72
|
-
1546045734,
|
|
73
|
-
1294757372,
|
|
74
|
-
1522805485,
|
|
75
|
-
1396182291,
|
|
76
|
-
2643833823,
|
|
77
|
-
1695183700,
|
|
78
|
-
2343527390,
|
|
79
|
-
1986661051,
|
|
80
|
-
1014477480,
|
|
81
|
-
2177026350,
|
|
82
|
-
1206759142,
|
|
83
|
-
2456956037,
|
|
84
|
-
344077627,
|
|
85
|
-
2730485921,
|
|
86
|
-
1290863460,
|
|
87
|
-
2820302411,
|
|
88
|
-
3158454273,
|
|
89
|
-
3259730800,
|
|
90
|
-
3505952657,
|
|
91
|
-
3345764771,
|
|
92
|
-
106217008,
|
|
93
|
-
3516065817,
|
|
94
|
-
3606008344,
|
|
95
|
-
3600352804,
|
|
96
|
-
1432725776,
|
|
97
|
-
4094571909,
|
|
98
|
-
1467031594,
|
|
99
|
-
275423344,
|
|
100
|
-
851169720,
|
|
101
|
-
430227734,
|
|
102
|
-
3100823752,
|
|
103
|
-
506948616,
|
|
104
|
-
1363258195,
|
|
105
|
-
659060556,
|
|
106
|
-
3750685593,
|
|
107
|
-
883997877,
|
|
108
|
-
3785050280,
|
|
109
|
-
958139571,
|
|
110
|
-
3318307427,
|
|
111
|
-
1322822218,
|
|
112
|
-
3812723403,
|
|
113
|
-
1537002063,
|
|
114
|
-
2003034995,
|
|
115
|
-
1747873779,
|
|
116
|
-
3602036899,
|
|
117
|
-
1955562222,
|
|
118
|
-
1575990012,
|
|
119
|
-
2024104815,
|
|
120
|
-
1125592928,
|
|
121
|
-
2227730452,
|
|
122
|
-
2716904306,
|
|
123
|
-
2361852424,
|
|
124
|
-
442776044,
|
|
125
|
-
2428436474,
|
|
126
|
-
593698344,
|
|
127
|
-
2756734187,
|
|
128
|
-
3733110249,
|
|
129
|
-
3204031479,
|
|
130
|
-
2999351573,
|
|
131
|
-
3329325298,
|
|
132
|
-
3815920427,
|
|
133
|
-
3391569614,
|
|
134
|
-
3928383900,
|
|
135
|
-
3515267271,
|
|
136
|
-
566280711,
|
|
137
|
-
3940187606,
|
|
138
|
-
3454069534,
|
|
139
|
-
4118630271,
|
|
140
|
-
4000239992,
|
|
141
|
-
116418474,
|
|
142
|
-
1914138554,
|
|
143
|
-
174292421,
|
|
144
|
-
2731055270,
|
|
145
|
-
289380356,
|
|
146
|
-
3203993006,
|
|
147
|
-
460393269,
|
|
148
|
-
320620315,
|
|
149
|
-
685471733,
|
|
150
|
-
587496836,
|
|
151
|
-
852142971,
|
|
152
|
-
1086792851,
|
|
153
|
-
1017036298,
|
|
154
|
-
365543100,
|
|
155
|
-
1126000580,
|
|
156
|
-
2618297676,
|
|
157
|
-
1288033470,
|
|
158
|
-
3409855158,
|
|
159
|
-
1501505948,
|
|
160
|
-
4234509866,
|
|
161
|
-
1607167915,
|
|
162
|
-
987167468,
|
|
163
|
-
1816402316,
|
|
164
|
-
1246189591
|
|
165
|
-
], f0 = new Array(160);
|
|
166
|
-
function E() {
|
|
167
|
-
this.init(), this._w = f0, O.call(this, 128, 112);
|
|
1
|
+
function e(t, { strict: r = !0 } = {}) {
|
|
2
|
+
return !t || typeof t != "string" ? !1 : r ? /^0x[0-9a-fA-F]*$/.test(t) : t.startsWith("0x");
|
|
168
3
|
}
|
|
169
|
-
e0(E, O);
|
|
170
|
-
E.prototype.init = function() {
|
|
171
|
-
return this._ah = 1779033703, this._bh = 3144134277, this._ch = 1013904242, this._dh = 2773480762, this._eh = 1359893119, this._fh = 2600822924, this._gh = 528734635, this._hh = 1541459225, this._al = 4089235720, this._bl = 2227873595, this._cl = 4271175723, this._dl = 1595750129, this._el = 2917565137, this._fl = 725511199, this._gl = 4215389547, this._hl = 327033209, this;
|
|
172
|
-
};
|
|
173
|
-
function J(x, a, c) {
|
|
174
|
-
return c ^ x & (a ^ c);
|
|
175
|
-
}
|
|
176
|
-
function K(x, a, c) {
|
|
177
|
-
return x & a | c & (x | a);
|
|
178
|
-
}
|
|
179
|
-
function L(x, a) {
|
|
180
|
-
return (x >>> 28 | a << 4) ^ (a >>> 2 | x << 30) ^ (a >>> 7 | x << 25);
|
|
181
|
-
}
|
|
182
|
-
function N(x, a) {
|
|
183
|
-
return (x >>> 14 | a << 18) ^ (x >>> 18 | a << 14) ^ (a >>> 9 | x << 23);
|
|
184
|
-
}
|
|
185
|
-
function t0(x, a) {
|
|
186
|
-
return (x >>> 1 | a << 31) ^ (x >>> 8 | a << 24) ^ x >>> 7;
|
|
187
|
-
}
|
|
188
|
-
function b0(x, a) {
|
|
189
|
-
return (x >>> 1 | a << 31) ^ (x >>> 8 | a << 24) ^ (x >>> 7 | a << 25);
|
|
190
|
-
}
|
|
191
|
-
function s0(x, a) {
|
|
192
|
-
return (x >>> 19 | a << 13) ^ (a >>> 29 | x << 3) ^ x >>> 6;
|
|
193
|
-
}
|
|
194
|
-
function r0(x, a) {
|
|
195
|
-
return (x >>> 19 | a << 13) ^ (a >>> 29 | x << 3) ^ (x >>> 6 | a << 26);
|
|
196
|
-
}
|
|
197
|
-
function e(x, a) {
|
|
198
|
-
return x >>> 0 < a >>> 0 ? 1 : 0;
|
|
199
|
-
}
|
|
200
|
-
E.prototype._update = function(x) {
|
|
201
|
-
for (var a = this._w, c = this._ah | 0, d = this._bh | 0, _ = this._ch | 0, G = this._dh | 0, v = this._eh | 0, I = this._fh | 0, y = this._gh | 0, C = this._hh | 0, b = this._al | 0, o = this._bl | 0, u = this._cl | 0, l = this._dl | 0, s = this._el | 0, g = this._fl | 0, p = this._gl | 0, m = this._hl | 0, h = 0; h < 32; h += 2)
|
|
202
|
-
a[h] = x.readInt32BE(h * 4), a[h + 1] = x.readInt32BE(h * 4 + 4);
|
|
203
|
-
for (; h < 160; h += 2) {
|
|
204
|
-
var B = a[h - 30], w = a[h - 15 * 2 + 1], P = t0(B, w), H = b0(w, B);
|
|
205
|
-
B = a[h - 2 * 2], w = a[h - 2 * 2 + 1];
|
|
206
|
-
var Q = s0(B, w), A = r0(w, B), R = a[h - 7 * 2], T = a[h - 7 * 2 + 1], V = a[h - 16 * 2], S = a[h - 16 * 2 + 1], t = H + T | 0, i = P + R + e(t, H) | 0;
|
|
207
|
-
t = t + A | 0, i = i + Q + e(t, A) | 0, t = t + S | 0, i = i + V + e(t, S) | 0, a[h] = i, a[h + 1] = t;
|
|
208
|
-
}
|
|
209
|
-
for (var n = 0; n < 160; n += 2) {
|
|
210
|
-
i = a[n], t = a[n + 1];
|
|
211
|
-
var X = K(c, d, _), Y = K(b, o, u), Z = L(c, b), U = L(b, c), $ = N(v, s), z = N(s, v), M = F[n], k = F[n + 1], j = J(v, I, y), q = J(s, g, p), f = m + z | 0, r = C + $ + e(f, m) | 0;
|
|
212
|
-
f = f + q | 0, r = r + j + e(f, q) | 0, f = f + k | 0, r = r + M + e(f, k) | 0, f = f + t | 0, r = r + i + e(f, t) | 0;
|
|
213
|
-
var D = U + Y | 0, W = Z + X + e(D, U) | 0;
|
|
214
|
-
C = y, m = p, y = I, p = g, I = v, g = s, s = l + f | 0, v = G + r + e(s, l) | 0, G = _, l = u, _ = d, u = o, d = c, o = b, b = f + D | 0, c = r + W + e(b, f) | 0;
|
|
215
|
-
}
|
|
216
|
-
this._al = this._al + b | 0, this._bl = this._bl + o | 0, this._cl = this._cl + u | 0, this._dl = this._dl + l | 0, this._el = this._el + s | 0, this._fl = this._fl + g | 0, this._gl = this._gl + p | 0, this._hl = this._hl + m | 0, this._ah = this._ah + c + e(this._al, b) | 0, this._bh = this._bh + d + e(this._bl, o) | 0, this._ch = this._ch + _ + e(this._cl, u) | 0, this._dh = this._dh + G + e(this._dl, l) | 0, this._eh = this._eh + v + e(this._el, s) | 0, this._fh = this._fh + I + e(this._fl, g) | 0, this._gh = this._gh + y + e(this._gl, p) | 0, this._hh = this._hh + C + e(this._hl, m) | 0;
|
|
217
|
-
};
|
|
218
|
-
E.prototype._hash = function() {
|
|
219
|
-
var x = c0.allocUnsafe(64);
|
|
220
|
-
function a(c, d, _) {
|
|
221
|
-
x.writeInt32BE(c, _), x.writeInt32BE(d, _ + 4);
|
|
222
|
-
}
|
|
223
|
-
return a(this._ah, this._al, 0), a(this._bh, this._bl, 8), a(this._ch, this._cl, 16), a(this._dh, this._dl, 24), a(this._eh, this._el, 32), a(this._fh, this._fl, 40), a(this._gh, this._gl, 48), a(this._hh, this._hl, 56), x;
|
|
224
|
-
};
|
|
225
|
-
var v0 = E;
|
|
226
4
|
export {
|
|
227
|
-
|
|
5
|
+
e as isHex
|
|
228
6
|
};
|
package/dist/index61.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index95.cjs"),e={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new o.RecursiveReadLimitExceededError({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new o.PositionOutOfBoundsError({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new o.NegativeOffsetError({offset:t});const i=this.position-t;this.assertPosition(i),this.position=i},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new o.NegativeOffsetError({offset:t});const i=this.position+t;this.assertPosition(i),this.position=i},inspectByte(t){const i=t??this.position;return this.assertPosition(i),this.bytes[i]},inspectBytes(t,i){const s=i??this.position;return this.assertPosition(s+t-1),this.bytes.subarray(s,s+t)},inspectUint8(t){const i=t??this.position;return this.assertPosition(i),this.bytes[i]},inspectUint16(t){const i=t??this.position;return this.assertPosition(i+1),this.dataView.getUint16(i)},inspectUint24(t){const i=t??this.position;return this.assertPosition(i+2),(this.dataView.getUint16(i)<<8)+this.dataView.getUint8(i+2)},inspectUint32(t){const i=t??this.position;return this.assertPosition(i+3),this.dataView.getUint32(i)},pushByte(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushBytes(t){this.assertPosition(this.position+t.length-1),this.bytes.set(t,this.position),this.position+=t.length},pushUint8(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushUint16(t){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,t),this.position+=2},pushUint24(t){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,t>>8),this.dataView.setUint8(this.position+2,t&255),this.position+=3},pushUint32(t){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,t),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const t=this.inspectByte();return this.position++,t},readBytes(t,i){this.assertReadLimit(),this._touch();const s=this.inspectBytes(t);return this.position+=i??t,s},readUint8(){this.assertReadLimit(),this._touch();const t=this.inspectUint8();return this.position+=1,t},readUint16(){this.assertReadLimit(),this._touch();const t=this.inspectUint16();return this.position+=2,t},readUint24(){this.assertReadLimit(),this._touch();const t=this.inspectUint24();return this.position+=3,t},readUint32(){this.assertReadLimit(),this._touch();const t=this.inspectUint32();return this.position+=4,t},get remaining(){return this.bytes.length-this.position},setPosition(t){const i=this.position;return this.assertPosition(t),this.position=t,()=>this.position=i},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}};function n(t,{recursiveReadLimit:i=8192}={}){const s=Object.create(e);return s.bytes=t,s.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength),s.positionReadCount=new Map,s.recursiveReadLimit=i,s}exports.createCursor=n;
|
package/dist/index61.js
CHANGED
|
@@ -1,6 +1,130 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { RecursiveReadLimitExceededError as e, PositionOutOfBoundsError as n, NegativeOffsetError as o } from "./index95.js";
|
|
2
|
+
const h = {
|
|
3
|
+
bytes: new Uint8Array(),
|
|
4
|
+
dataView: new DataView(new ArrayBuffer(0)),
|
|
5
|
+
position: 0,
|
|
6
|
+
positionReadCount: /* @__PURE__ */ new Map(),
|
|
7
|
+
recursiveReadCount: 0,
|
|
8
|
+
recursiveReadLimit: Number.POSITIVE_INFINITY,
|
|
9
|
+
assertReadLimit() {
|
|
10
|
+
if (this.recursiveReadCount >= this.recursiveReadLimit)
|
|
11
|
+
throw new e({
|
|
12
|
+
count: this.recursiveReadCount + 1,
|
|
13
|
+
limit: this.recursiveReadLimit
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
assertPosition(t) {
|
|
17
|
+
if (t < 0 || t > this.bytes.length - 1)
|
|
18
|
+
throw new n({
|
|
19
|
+
length: this.bytes.length,
|
|
20
|
+
position: t
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
decrementPosition(t) {
|
|
24
|
+
if (t < 0)
|
|
25
|
+
throw new o({ offset: t });
|
|
26
|
+
const i = this.position - t;
|
|
27
|
+
this.assertPosition(i), this.position = i;
|
|
28
|
+
},
|
|
29
|
+
getReadCount(t) {
|
|
30
|
+
return this.positionReadCount.get(t || this.position) || 0;
|
|
31
|
+
},
|
|
32
|
+
incrementPosition(t) {
|
|
33
|
+
if (t < 0)
|
|
34
|
+
throw new o({ offset: t });
|
|
35
|
+
const i = this.position + t;
|
|
36
|
+
this.assertPosition(i), this.position = i;
|
|
37
|
+
},
|
|
38
|
+
inspectByte(t) {
|
|
39
|
+
const i = t ?? this.position;
|
|
40
|
+
return this.assertPosition(i), this.bytes[i];
|
|
41
|
+
},
|
|
42
|
+
inspectBytes(t, i) {
|
|
43
|
+
const s = i ?? this.position;
|
|
44
|
+
return this.assertPosition(s + t - 1), this.bytes.subarray(s, s + t);
|
|
45
|
+
},
|
|
46
|
+
inspectUint8(t) {
|
|
47
|
+
const i = t ?? this.position;
|
|
48
|
+
return this.assertPosition(i), this.bytes[i];
|
|
49
|
+
},
|
|
50
|
+
inspectUint16(t) {
|
|
51
|
+
const i = t ?? this.position;
|
|
52
|
+
return this.assertPosition(i + 1), this.dataView.getUint16(i);
|
|
53
|
+
},
|
|
54
|
+
inspectUint24(t) {
|
|
55
|
+
const i = t ?? this.position;
|
|
56
|
+
return this.assertPosition(i + 2), (this.dataView.getUint16(i) << 8) + this.dataView.getUint8(i + 2);
|
|
57
|
+
},
|
|
58
|
+
inspectUint32(t) {
|
|
59
|
+
const i = t ?? this.position;
|
|
60
|
+
return this.assertPosition(i + 3), this.dataView.getUint32(i);
|
|
61
|
+
},
|
|
62
|
+
pushByte(t) {
|
|
63
|
+
this.assertPosition(this.position), this.bytes[this.position] = t, this.position++;
|
|
64
|
+
},
|
|
65
|
+
pushBytes(t) {
|
|
66
|
+
this.assertPosition(this.position + t.length - 1), this.bytes.set(t, this.position), this.position += t.length;
|
|
67
|
+
},
|
|
68
|
+
pushUint8(t) {
|
|
69
|
+
this.assertPosition(this.position), this.bytes[this.position] = t, this.position++;
|
|
70
|
+
},
|
|
71
|
+
pushUint16(t) {
|
|
72
|
+
this.assertPosition(this.position + 1), this.dataView.setUint16(this.position, t), this.position += 2;
|
|
73
|
+
},
|
|
74
|
+
pushUint24(t) {
|
|
75
|
+
this.assertPosition(this.position + 2), this.dataView.setUint16(this.position, t >> 8), this.dataView.setUint8(this.position + 2, t & 255), this.position += 3;
|
|
76
|
+
},
|
|
77
|
+
pushUint32(t) {
|
|
78
|
+
this.assertPosition(this.position + 3), this.dataView.setUint32(this.position, t), this.position += 4;
|
|
79
|
+
},
|
|
80
|
+
readByte() {
|
|
81
|
+
this.assertReadLimit(), this._touch();
|
|
82
|
+
const t = this.inspectByte();
|
|
83
|
+
return this.position++, t;
|
|
84
|
+
},
|
|
85
|
+
readBytes(t, i) {
|
|
86
|
+
this.assertReadLimit(), this._touch();
|
|
87
|
+
const s = this.inspectBytes(t);
|
|
88
|
+
return this.position += i ?? t, s;
|
|
89
|
+
},
|
|
90
|
+
readUint8() {
|
|
91
|
+
this.assertReadLimit(), this._touch();
|
|
92
|
+
const t = this.inspectUint8();
|
|
93
|
+
return this.position += 1, t;
|
|
94
|
+
},
|
|
95
|
+
readUint16() {
|
|
96
|
+
this.assertReadLimit(), this._touch();
|
|
97
|
+
const t = this.inspectUint16();
|
|
98
|
+
return this.position += 2, t;
|
|
99
|
+
},
|
|
100
|
+
readUint24() {
|
|
101
|
+
this.assertReadLimit(), this._touch();
|
|
102
|
+
const t = this.inspectUint24();
|
|
103
|
+
return this.position += 3, t;
|
|
104
|
+
},
|
|
105
|
+
readUint32() {
|
|
106
|
+
this.assertReadLimit(), this._touch();
|
|
107
|
+
const t = this.inspectUint32();
|
|
108
|
+
return this.position += 4, t;
|
|
109
|
+
},
|
|
110
|
+
get remaining() {
|
|
111
|
+
return this.bytes.length - this.position;
|
|
112
|
+
},
|
|
113
|
+
setPosition(t) {
|
|
114
|
+
const i = this.position;
|
|
115
|
+
return this.assertPosition(t), this.position = t, () => this.position = i;
|
|
116
|
+
},
|
|
117
|
+
_touch() {
|
|
118
|
+
if (this.recursiveReadLimit === Number.POSITIVE_INFINITY)
|
|
119
|
+
return;
|
|
120
|
+
const t = this.getReadCount();
|
|
121
|
+
this.positionReadCount.set(this.position, t + 1), t > 0 && this.recursiveReadCount++;
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
function a(t, { recursiveReadLimit: i = 8192 } = {}) {
|
|
125
|
+
const s = Object.create(h);
|
|
126
|
+
return s.bytes = t, s.dataView = new DataView(t.buffer, t.byteOffset, t.byteLength), s.positionReadCount = /* @__PURE__ */ new Map(), s.recursiveReadLimit = i, s;
|
|
127
|
+
}
|
|
4
128
|
export {
|
|
5
|
-
|
|
129
|
+
a as createCursor
|
|
6
130
|
};
|
package/dist/index62.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index59.cjs");function i(n){const r=Object.entries(n).map(([a,e])=>e===void 0||e===!1?null:[a,e]).filter(Boolean),o=r.reduce((a,[e])=>Math.max(a,e.length),0);return r.map(([a,e])=>` ${`${a}:`.padEnd(o+1)} ${e}`).join(`
|
|
2
|
+
`)}class s extends t.BaseError{constructor({v:r}){super(`Invalid \`v\` value "${r}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class c extends t.BaseError{constructor({transaction:r}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",i(r),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class l extends t.BaseError{constructor({storageKey:r}){super(`Size for storage key "${r}" is invalid. Expected 32 bytes. Got ${Math.floor((r.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}exports.InvalidLegacyVError=s;exports.InvalidSerializableTransactionError=c;exports.InvalidStorageKeySizeError=l;exports.prettyPrint=i;
|