@gardenfi/utils 2.5.3-beta.7 → 2.5.3-beta.9
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/index100.cjs +1 -1
- package/dist/index100.js +8 -3
- package/dist/index101.cjs +4 -1
- package/dist/index101.js +194 -26
- package/dist/index102.cjs +3 -2
- package/dist/index102.js +446 -19
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +27 -9
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +161 -8
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +21 -10
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +127 -11
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +37 -12
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +6 -14
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +27 -4
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +55 -6
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +43 -16
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +190 -12
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +4 -7
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +64 -7
- package/dist/index115.cjs +1 -1
- package/dist/index115.js +17 -18
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +3 -8
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +15 -20
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +23 -17
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +11 -40
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +18 -21
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +32 -78
- package/dist/index122.cjs +1 -1
- package/dist/index122.js +3 -12
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +18 -58
- package/dist/index124.cjs +1 -1
- package/dist/index124.js +26 -12
- package/dist/index125.cjs +1 -1
- package/dist/index125.js +36 -8
- package/dist/index126.cjs +1 -1
- package/dist/index126.js +8 -20
- package/dist/index127.cjs +1 -1
- package/dist/index127.js +10 -6
- package/dist/index128.cjs +1 -1
- package/dist/index128.js +22 -32
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +27 -31
- package/dist/index130.cjs +1 -1
- package/dist/index130.js +3 -9
- package/dist/index131.cjs +1 -1
- package/dist/index131.js +65 -50
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +9 -19
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +21 -106
- package/dist/index134.cjs +1 -1
- package/dist/index134.js +8 -68
- package/dist/index135.cjs +1 -1
- package/dist/index135.js +9 -8
- package/dist/index136.cjs +1 -1
- package/dist/index136.js +11 -71
- package/dist/index137.cjs +1 -2
- package/dist/index137.js +7 -3
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +7 -9
- package/dist/index139.cjs +1 -1
- package/dist/index139.js +13 -13
- package/dist/index140.cjs +1 -1
- package/dist/index140.js +32 -4
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +5 -13
- package/dist/index142.cjs +1 -1
- package/dist/index142.js +38 -2
- package/dist/index143.cjs +1 -1
- package/dist/index143.js +107 -27
- package/dist/index144.cjs +1 -1
- package/dist/index144.js +170 -20
- package/dist/index145.cjs +1 -1
- package/dist/index145.js +49 -5
- package/dist/index146.cjs +1 -1
- package/dist/index146.js +32 -5
- package/dist/index147.cjs +1 -1
- package/dist/index147.js +7 -5
- package/dist/index148.cjs +1 -9
- package/dist/index148.js +8 -35
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +21 -3
- package/dist/index150.cjs +1 -1
- package/dist/index150.js +21 -16
- package/dist/index151.cjs +1 -1
- package/dist/index151.js +40 -18
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +22 -35
- package/dist/index153.cjs +1 -1
- package/dist/index153.js +21 -8
- package/dist/index154.cjs +1 -4
- package/dist/index154.js +51 -194
- package/dist/index155.cjs +1 -1
- package/dist/index155.js +11 -27
- package/dist/index156.cjs +1 -1
- package/dist/index156.js +24 -161
- package/dist/index157.cjs +1 -1
- package/dist/index157.js +23 -126
- package/dist/index158.cjs +1 -1
- package/dist/index158.js +102 -25
- package/dist/index159.cjs +1 -1
- package/dist/index159.js +3 -56
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +5 -191
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +32 -4
- package/dist/index162.cjs +1 -1
- package/dist/index162.js +3 -20
- package/dist/index163.cjs +1 -1
- package/dist/index163.js +18 -3
- package/dist/index164.cjs +1 -1
- package/dist/index164.js +5 -16
- package/dist/index165.cjs +1 -1
- package/dist/index165.js +8 -11
- package/dist/index166.cjs +1 -1
- package/dist/index166.js +100 -31
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +81 -3
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +5 -27
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +6 -8
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +27 -25
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +34 -28
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +13 -3
- package/dist/index173.cjs +1 -1
- package/dist/index173.js +19 -6
- package/dist/index174.cjs +1 -1
- package/dist/index174.js +78 -6
- package/dist/index175.cjs +1 -1
- package/dist/index175.js +2 -33
- package/dist/index176.cjs +1 -1
- package/dist/index176.js +15 -5
- package/dist/index177.cjs +1 -1
- package/dist/index177.js +17 -36
- package/dist/index178.cjs +1 -1
- package/dist/index178.js +167 -45
- package/dist/index179.cjs +1 -1
- package/dist/index179.js +17 -32
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +8 -8
- package/dist/index180.cjs +1 -1
- package/dist/index180.js +10 -8
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +27 -39
- package/dist/index182.cjs +1 -1
- package/dist/index182.js +2 -52
- package/dist/index183.cjs +1 -1
- package/dist/index183.js +13 -104
- package/dist/index184.cjs +1 -1
- package/dist/index184.js +13 -3
- package/dist/index185.cjs +1 -1
- package/dist/index185.js +47 -5
- package/dist/index186.cjs +1 -1
- package/dist/index186.js +11 -3
- package/dist/index187.cjs +1 -1
- package/dist/index187.js +7 -17
- package/dist/index188.cjs +1 -1
- package/dist/index188.js +66 -5
- package/dist/index189.cjs +1 -1
- package/dist/index189.js +46 -8
- package/dist/index190.cjs +1 -1
- package/dist/index190.js +35 -101
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +17 -5
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +6 -6
- package/dist/index193.cjs +1 -1
- package/dist/index193.js +9 -27
- package/dist/index194.cjs +1 -1
- package/dist/index194.js +13 -34
- package/dist/index195.cjs +1 -1
- package/dist/index195.js +8 -13
- package/dist/index196.cjs +1 -1
- package/dist/index196.js +35 -78
- package/dist/index197.cjs +1 -1
- package/dist/index197.js +17 -2
- package/dist/index198.cjs +1 -1
- package/dist/index198.js +14 -18
- package/dist/index199.cjs +1 -1
- package/dist/index199.js +6 -171
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +2 -2
- package/dist/index200.cjs +2 -1
- package/dist/index200.js +23 -16
- package/dist/index201.cjs +1 -1
- package/dist/index201.js +13 -10
- package/dist/index202.cjs +1 -1
- package/dist/index202.js +2 -2
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +5 -5
- package/dist/index205.cjs +1 -1
- package/dist/index205.js +1 -1
- package/dist/index206.cjs +1 -1
- package/dist/index206.js +2 -2
- package/dist/index207.cjs +1 -1
- package/dist/index207.js +1 -1
- package/dist/index208.cjs +1 -1
- package/dist/index208.js +5 -5
- package/dist/index209.cjs +2 -1
- package/dist/index209.js +34 -39
- package/dist/index210.cjs +1 -1
- package/dist/index210.js +2 -10
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +5 -24
- package/dist/index212.cjs +1 -2
- package/dist/index212.js +9 -40
- package/dist/index213.cjs +1 -1
- package/dist/index213.js +20 -2
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +8 -5
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +65 -9
- package/dist/index216.cjs +1 -1
- package/dist/index216.js +63 -17
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +188 -8
- package/dist/index218.cjs +1 -1
- package/dist/index218.js +28 -66
- package/dist/index219.cjs +1 -1
- package/dist/index219.js +72 -61
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +3 -3
- package/dist/index220.cjs +1 -1
- package/dist/index220.js +35 -183
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +9 -21
- package/dist/index222.cjs +1 -1
- package/dist/index222.js +7 -70
- package/dist/index223.cjs +1 -1
- package/dist/index223.js +11 -40
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +12 -16
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +18 -12
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +108 -11
- package/dist/index227.cjs +1 -1
- package/dist/index227.js +102 -11
- package/dist/index228.cjs +1 -1
- package/dist/index228.js +6 -19
- package/dist/index229.cjs +1 -1
- package/dist/index229.js +7 -109
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +2 -2
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +24 -101
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +16 -6
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +215 -7
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +24 -26
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +45 -15
- package/dist/index235.cjs +1 -1
- package/dist/index235.js +8 -213
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +1 -1
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +1 -1
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +1 -1
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +5 -5
- package/dist/index241.cjs +1 -2
- package/dist/index241.js +68 -66
- package/dist/index242.cjs +2 -1
- package/dist/index242.js +66 -14
- package/dist/index243.cjs +1 -1
- package/dist/index243.js +14 -68
- package/dist/index244.cjs +1 -1
- package/dist/index244.js +1 -1
- package/dist/index246.cjs +1 -1
- package/dist/index246.js +1 -1
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +1 -1
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +1 -1
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +7 -171
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +30 -110
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +29 -30
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +16 -3
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +34 -2
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +45 -4
- package/dist/index35.cjs +1 -2
- package/dist/index35.js +151 -59
- package/dist/index36.cjs +1 -2
- package/dist/index36.js +31 -50
- package/dist/index37.cjs +1 -3
- package/dist/index37.js +53 -210
- package/dist/index38.cjs +2 -1
- package/dist/index38.js +58 -22
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +13 -18
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +37 -10
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +15 -20
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +8 -45
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +19 -12
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +2 -13
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +45 -24
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +31 -27
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +3 -47
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +9 -19
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +50 -11
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +7 -31
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +16 -36
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +10 -7
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +5 -29
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +14 -22
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +3 -7
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +25 -65
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +107 -44
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +4 -23
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +6 -37
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +88 -17
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +6 -6
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +125 -9
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +6 -12
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +21 -109
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +16 -22
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +40 -7
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +20 -20
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +11 -8
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +6 -31
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +19 -7
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +106 -16
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +63 -68
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +9 -35
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +28 -16
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +69 -63
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +4 -12
- package/dist/index77.cjs +2 -1
- package/dist/index77.js +3 -15
- package/dist/index78.cjs +1 -3
- package/dist/index78.js +9 -96
- package/dist/index79.cjs +20 -1
- package/dist/index79.js +326 -24
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +13 -33
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +4 -44
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +12 -6
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +2 -152
- package/dist/index84.cjs +1 -20
- package/dist/index84.js +6 -325
- package/dist/index85.cjs +2 -3
- package/dist/index85.js +41 -438
- package/dist/index86.cjs +3 -1
- package/dist/index86.js +209 -58
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +31 -37
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +21 -15
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +6 -2
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +72 -15
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +5 -10
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +5 -125
- package/dist/index93.cjs +9 -1
- package/dist/index93.js +35 -5
- package/dist/index94.cjs +3 -1
- package/dist/index94.js +94 -20
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +3 -46
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +16 -36
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +20 -6
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +33 -86
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +22 -13
- package/package.json +1 -1
package/dist/index220.js
CHANGED
|
@@ -1,191 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return H(e, t);
|
|
13
|
-
if (Z(e))
|
|
14
|
-
return J(e, t);
|
|
15
|
-
if (K(e))
|
|
16
|
-
return N(e, t);
|
|
17
|
-
if (L(e))
|
|
18
|
-
return O(e);
|
|
19
|
-
if (U(e))
|
|
20
|
-
return {
|
|
21
|
-
type: "receive",
|
|
22
|
-
stateMutability: "payable"
|
|
23
|
-
};
|
|
24
|
-
throw new F({ signature: e });
|
|
25
|
-
}
|
|
26
|
-
function G(e, t = {}) {
|
|
27
|
-
const n = W(e);
|
|
28
|
-
if (!n)
|
|
29
|
-
throw new m({ signature: e, type: "function" });
|
|
30
|
-
const a = u(n.parameters), r = [], c = a.length;
|
|
31
|
-
for (let o = 0; o < c; o++)
|
|
32
|
-
r.push(l(a[o], {
|
|
33
|
-
modifiers: h,
|
|
34
|
-
structs: t,
|
|
35
|
-
type: "function"
|
|
36
|
-
}));
|
|
37
|
-
const i = [];
|
|
38
|
-
if (n.returns) {
|
|
39
|
-
const o = u(n.returns), s = o.length;
|
|
40
|
-
for (let f = 0; f < s; f++)
|
|
41
|
-
i.push(l(o[f], {
|
|
42
|
-
modifiers: h,
|
|
43
|
-
structs: t,
|
|
44
|
-
type: "function"
|
|
45
|
-
}));
|
|
1
|
+
import { BaseError as r } from "./index209.js";
|
|
2
|
+
class u extends r {
|
|
3
|
+
constructor({ signature: e, type: n }) {
|
|
4
|
+
super(`Invalid ${n} signature.`, {
|
|
5
|
+
details: e
|
|
6
|
+
}), Object.defineProperty(this, "name", {
|
|
7
|
+
enumerable: !0,
|
|
8
|
+
configurable: !0,
|
|
9
|
+
writable: !0,
|
|
10
|
+
value: "InvalidSignatureError"
|
|
11
|
+
});
|
|
46
12
|
}
|
|
47
|
-
return {
|
|
48
|
-
name: n.name,
|
|
49
|
-
type: "function",
|
|
50
|
-
stateMutability: n.stateMutability ?? "nonpayable",
|
|
51
|
-
inputs: r,
|
|
52
|
-
outputs: i
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
function H(e, t = {}) {
|
|
56
|
-
const n = D(e);
|
|
57
|
-
if (!n)
|
|
58
|
-
throw new m({ signature: e, type: "event" });
|
|
59
|
-
const a = u(n.parameters), r = [], c = a.length;
|
|
60
|
-
for (let i = 0; i < c; i++)
|
|
61
|
-
r.push(l(a[i], {
|
|
62
|
-
modifiers: V,
|
|
63
|
-
structs: t,
|
|
64
|
-
type: "event"
|
|
65
|
-
}));
|
|
66
|
-
return { name: n.name, type: "event", inputs: r };
|
|
67
|
-
}
|
|
68
|
-
function J(e, t = {}) {
|
|
69
|
-
const n = j(e);
|
|
70
|
-
if (!n)
|
|
71
|
-
throw new m({ signature: e, type: "error" });
|
|
72
|
-
const a = u(n.parameters), r = [], c = a.length;
|
|
73
|
-
for (let i = 0; i < c; i++)
|
|
74
|
-
r.push(l(a[i], { structs: t, type: "error" }));
|
|
75
|
-
return { name: n.name, type: "error", inputs: r };
|
|
76
|
-
}
|
|
77
|
-
function N(e, t = {}) {
|
|
78
|
-
const n = q(e);
|
|
79
|
-
if (!n)
|
|
80
|
-
throw new m({ signature: e, type: "constructor" });
|
|
81
|
-
const a = u(n.parameters), r = [], c = a.length;
|
|
82
|
-
for (let i = 0; i < c; i++)
|
|
83
|
-
r.push(l(a[i], { structs: t, type: "constructor" }));
|
|
84
|
-
return {
|
|
85
|
-
type: "constructor",
|
|
86
|
-
stateMutability: n.stateMutability ?? "nonpayable",
|
|
87
|
-
inputs: r
|
|
88
|
-
};
|
|
89
13
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
function l(e, t) {
|
|
101
|
-
var y, b;
|
|
102
|
-
const n = _(e, t == null ? void 0 : t.type, t == null ? void 0 : t.structs);
|
|
103
|
-
if (p.has(n))
|
|
104
|
-
return p.get(n);
|
|
105
|
-
const a = P.test(e), r = E(a ? X : Q, e);
|
|
106
|
-
if (!r)
|
|
107
|
-
throw new R({ param: e });
|
|
108
|
-
if (r.name && re(r.name))
|
|
109
|
-
throw new k({ param: e, name: r.name });
|
|
110
|
-
const c = r.name ? { name: r.name } : {}, i = r.modifier === "indexed" ? { indexed: !0 } : {}, o = (t == null ? void 0 : t.structs) ?? {};
|
|
111
|
-
let s, f = {};
|
|
112
|
-
if (a) {
|
|
113
|
-
s = "tuple";
|
|
114
|
-
const w = u(r.type), S = [], v = w.length;
|
|
115
|
-
for (let d = 0; d < v; d++)
|
|
116
|
-
S.push(l(w[d], { structs: o }));
|
|
117
|
-
f = { components: S };
|
|
118
|
-
} else if (r.type in o)
|
|
119
|
-
s = "tuple", f = { components: o[r.type] };
|
|
120
|
-
else if (Y.test(r.type))
|
|
121
|
-
s = `${r.type}256`;
|
|
122
|
-
else if (r.type === "address payable")
|
|
123
|
-
s = "address";
|
|
124
|
-
else if (s = r.type, (t == null ? void 0 : t.type) !== "struct" && !ee(s))
|
|
125
|
-
throw new M({ type: s });
|
|
126
|
-
if (r.modifier) {
|
|
127
|
-
if (!((b = (y = t == null ? void 0 : t.modifiers) == null ? void 0 : y.has) != null && b.call(y, r.modifier)))
|
|
128
|
-
throw new z({
|
|
129
|
-
param: e,
|
|
130
|
-
type: t == null ? void 0 : t.type,
|
|
131
|
-
modifier: r.modifier
|
|
132
|
-
});
|
|
133
|
-
if (h.has(r.modifier) && !ne(s, !!r.array))
|
|
134
|
-
throw new A({
|
|
135
|
-
param: e,
|
|
136
|
-
type: t == null ? void 0 : t.type,
|
|
137
|
-
modifier: r.modifier
|
|
138
|
-
});
|
|
14
|
+
class i extends r {
|
|
15
|
+
constructor({ signature: e }) {
|
|
16
|
+
super("Unknown signature.", {
|
|
17
|
+
details: e
|
|
18
|
+
}), Object.defineProperty(this, "name", {
|
|
19
|
+
enumerable: !0,
|
|
20
|
+
configurable: !0,
|
|
21
|
+
writable: !0,
|
|
22
|
+
value: "UnknownSignatureError"
|
|
23
|
+
});
|
|
139
24
|
}
|
|
140
|
-
const g = {
|
|
141
|
-
type: `${s}${r.array ?? ""}`,
|
|
142
|
-
...c,
|
|
143
|
-
...i,
|
|
144
|
-
...f
|
|
145
|
-
};
|
|
146
|
-
return p.set(n, g), g;
|
|
147
25
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
default:
|
|
160
|
-
return u(o, t, `${n}${i}`, a);
|
|
161
|
-
}
|
|
26
|
+
class s extends r {
|
|
27
|
+
constructor({ signature: e }) {
|
|
28
|
+
super("Invalid struct signature.", {
|
|
29
|
+
details: e,
|
|
30
|
+
metaMessages: ["No properties exist."]
|
|
31
|
+
}), Object.defineProperty(this, "name", {
|
|
32
|
+
enumerable: !0,
|
|
33
|
+
configurable: !0,
|
|
34
|
+
writable: !0,
|
|
35
|
+
value: "InvalidStructSignatureError"
|
|
36
|
+
});
|
|
162
37
|
}
|
|
163
|
-
if (n === "")
|
|
164
|
-
return t;
|
|
165
|
-
if (a !== 0)
|
|
166
|
-
throw new T({ current: n, depth: a });
|
|
167
|
-
return t.push(n.trim()), t;
|
|
168
|
-
}
|
|
169
|
-
function ee(e) {
|
|
170
|
-
return e === "address" || e === "bool" || e === "function" || e === "string" || x.test(e) || $.test(e);
|
|
171
|
-
}
|
|
172
|
-
const te = /^(?: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)$/;
|
|
173
|
-
function re(e) {
|
|
174
|
-
return e === "address" || e === "bool" || e === "function" || e === "string" || e === "tuple" || x.test(e) || $.test(e) || te.test(e);
|
|
175
|
-
}
|
|
176
|
-
function ne(e, t) {
|
|
177
|
-
return t || e === "bytes" || e === "string" || e === "tuple";
|
|
178
38
|
}
|
|
179
39
|
export {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
l as parseAbiParameter,
|
|
184
|
-
N as parseConstructorSignature,
|
|
185
|
-
J as parseErrorSignature,
|
|
186
|
-
H as parseEventSignature,
|
|
187
|
-
O as parseFallbackSignature,
|
|
188
|
-
G as parseFunctionSignature,
|
|
189
|
-
le as parseSignature,
|
|
190
|
-
u as splitParameters
|
|
40
|
+
u as InvalidSignatureError,
|
|
41
|
+
s as InvalidStructSignatureError,
|
|
42
|
+
i as UnknownSignatureError
|
|
191
43
|
};
|
package/dist/index221.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 s=require("./index209.cjs");class t extends s.BaseError{constructor({current:r,depth:e}){super("Unbalanced parentheses.",{metaMessages:[`"${r.trim()}" has too many ${e>0?"opening":"closing"} parentheses.`],details:`Depth "${e}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}exports.InvalidParenthesisError=t;
|
package/dist/index221.js
CHANGED
|
@@ -1,31 +1,19 @@
|
|
|
1
|
-
import { BaseError as
|
|
2
|
-
class
|
|
3
|
-
constructor({
|
|
4
|
-
super("
|
|
1
|
+
import { BaseError as s } from "./index209.js";
|
|
2
|
+
class n extends s {
|
|
3
|
+
constructor({ current: r, depth: e }) {
|
|
4
|
+
super("Unbalanced parentheses.", {
|
|
5
5
|
metaMessages: [
|
|
6
|
-
`
|
|
7
|
-
]
|
|
6
|
+
`"${r.trim()}" has too many ${e > 0 ? "opening" : "closing"} parentheses.`
|
|
7
|
+
],
|
|
8
|
+
details: `Depth "${e}"`
|
|
8
9
|
}), Object.defineProperty(this, "name", {
|
|
9
10
|
enumerable: !0,
|
|
10
11
|
configurable: !0,
|
|
11
12
|
writable: !0,
|
|
12
|
-
value: "
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
class a extends r {
|
|
17
|
-
constructor({ type: e }) {
|
|
18
|
-
super("Unknown type.", {
|
|
19
|
-
metaMessages: [`Type "${e}" is not a valid ABI type.`]
|
|
20
|
-
}), Object.defineProperty(this, "name", {
|
|
21
|
-
enumerable: !0,
|
|
22
|
-
configurable: !0,
|
|
23
|
-
writable: !0,
|
|
24
|
-
value: "UnknownSolidityTypeError"
|
|
13
|
+
value: "InvalidParenthesisError"
|
|
25
14
|
});
|
|
26
15
|
}
|
|
27
16
|
}
|
|
28
17
|
export {
|
|
29
|
-
|
|
30
|
-
o as UnknownTypeError
|
|
18
|
+
n as InvalidParenthesisError
|
|
31
19
|
};
|
package/dist/index222.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 r=require("./index209.cjs");class t extends r.BaseError{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}exports.CircularReferenceError=t;
|
package/dist/index222.js
CHANGED
|
@@ -1,79 +1,16 @@
|
|
|
1
|
-
import { BaseError as
|
|
2
|
-
class
|
|
3
|
-
constructor({
|
|
4
|
-
super("
|
|
5
|
-
|
|
1
|
+
import { BaseError as r } from "./index209.js";
|
|
2
|
+
class a extends r {
|
|
3
|
+
constructor({ type: e }) {
|
|
4
|
+
super("Circular reference detected.", {
|
|
5
|
+
metaMessages: [`Struct "${e}" is a circular reference.`]
|
|
6
6
|
}), Object.defineProperty(this, "name", {
|
|
7
7
|
enumerable: !0,
|
|
8
8
|
configurable: !0,
|
|
9
9
|
writable: !0,
|
|
10
|
-
value: "
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
class s extends t {
|
|
15
|
-
constructor({ param: e, name: r }) {
|
|
16
|
-
super("Invalid ABI parameter.", {
|
|
17
|
-
details: e,
|
|
18
|
-
metaMessages: [
|
|
19
|
-
`"${r}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`
|
|
20
|
-
]
|
|
21
|
-
}), Object.defineProperty(this, "name", {
|
|
22
|
-
enumerable: !0,
|
|
23
|
-
configurable: !0,
|
|
24
|
-
writable: !0,
|
|
25
|
-
value: "SolidityProtectedKeywordError"
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
class l extends t {
|
|
30
|
-
constructor({ param: e, type: r, modifier: i }) {
|
|
31
|
-
super("Invalid ABI parameter.", {
|
|
32
|
-
details: e,
|
|
33
|
-
metaMessages: [
|
|
34
|
-
`Modifier "${i}" not allowed${r ? ` in "${r}" type` : ""}.`
|
|
35
|
-
]
|
|
36
|
-
}), Object.defineProperty(this, "name", {
|
|
37
|
-
enumerable: !0,
|
|
38
|
-
configurable: !0,
|
|
39
|
-
writable: !0,
|
|
40
|
-
value: "InvalidModifierError"
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
class d extends t {
|
|
45
|
-
constructor({ param: e, type: r, modifier: i }) {
|
|
46
|
-
super("Invalid ABI parameter.", {
|
|
47
|
-
details: e,
|
|
48
|
-
metaMessages: [
|
|
49
|
-
`Modifier "${i}" not allowed${r ? ` in "${r}" type` : ""}.`,
|
|
50
|
-
`Data location can only be specified for array, struct, or mapping types, but "${i}" was given.`
|
|
51
|
-
]
|
|
52
|
-
}), Object.defineProperty(this, "name", {
|
|
53
|
-
enumerable: !0,
|
|
54
|
-
configurable: !0,
|
|
55
|
-
writable: !0,
|
|
56
|
-
value: "InvalidFunctionModifierError"
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
class u extends t {
|
|
61
|
-
constructor({ abiParameter: e }) {
|
|
62
|
-
super("Invalid ABI parameter.", {
|
|
63
|
-
details: JSON.stringify(e, null, 2),
|
|
64
|
-
metaMessages: ["ABI parameter type is invalid."]
|
|
65
|
-
}), Object.defineProperty(this, "name", {
|
|
66
|
-
enumerable: !0,
|
|
67
|
-
configurable: !0,
|
|
68
|
-
writable: !0,
|
|
69
|
-
value: "InvalidAbiTypeParameterError"
|
|
10
|
+
value: "CircularReferenceError"
|
|
70
11
|
});
|
|
71
12
|
}
|
|
72
13
|
}
|
|
73
14
|
export {
|
|
74
|
-
|
|
75
|
-
d as InvalidFunctionModifierError,
|
|
76
|
-
l as InvalidModifierError,
|
|
77
|
-
n as InvalidParameterError,
|
|
78
|
-
s as SolidityProtectedKeywordError
|
|
15
|
+
a as CircularReferenceError
|
|
79
16
|
};
|
package/dist/index223.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 o=require("./index133.cjs"),t=new o.LruMap(8192);function i(r,{enabled:n=!0,id:e}){if(!n||!e)return r();if(t.get(e))return t.get(e);const u=r().finally(()=>t.delete(e));return t.set(e,u),u}exports.promiseCache=t;exports.withDedupe=i;
|
package/dist/index223.js
CHANGED
|
@@ -1,43 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
value: "InvalidSignatureError"
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
class i extends r {
|
|
15
|
-
constructor({ signature: e }) {
|
|
16
|
-
super("Unknown signature.", {
|
|
17
|
-
details: e
|
|
18
|
-
}), Object.defineProperty(this, "name", {
|
|
19
|
-
enumerable: !0,
|
|
20
|
-
configurable: !0,
|
|
21
|
-
writable: !0,
|
|
22
|
-
value: "UnknownSignatureError"
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
class s extends r {
|
|
27
|
-
constructor({ signature: e }) {
|
|
28
|
-
super("Invalid struct signature.", {
|
|
29
|
-
details: e,
|
|
30
|
-
metaMessages: ["No properties exist."]
|
|
31
|
-
}), Object.defineProperty(this, "name", {
|
|
32
|
-
enumerable: !0,
|
|
33
|
-
configurable: !0,
|
|
34
|
-
writable: !0,
|
|
35
|
-
value: "InvalidStructSignatureError"
|
|
36
|
-
});
|
|
37
|
-
}
|
|
1
|
+
import { LruMap as u } from "./index133.js";
|
|
2
|
+
const t = /* @__PURE__ */ new u(8192);
|
|
3
|
+
function s(r, { enabled: o = !0, id: e }) {
|
|
4
|
+
if (!o || !e)
|
|
5
|
+
return r();
|
|
6
|
+
if (t.get(e))
|
|
7
|
+
return t.get(e);
|
|
8
|
+
const n = r().finally(() => t.delete(e));
|
|
9
|
+
return t.set(e, n), n;
|
|
38
10
|
}
|
|
39
11
|
export {
|
|
40
|
-
|
|
41
|
-
s as
|
|
42
|
-
i as UnknownSignatureError
|
|
12
|
+
t as promiseCache,
|
|
13
|
+
s as withDedupe
|
|
43
14
|
};
|
package/dist/index224.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 e(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const t=e();exports.idCache=t;
|
package/dist/index224.js
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
configurable: !0,
|
|
12
|
-
writable: !0,
|
|
13
|
-
value: "InvalidParenthesisError"
|
|
14
|
-
});
|
|
15
|
-
}
|
|
1
|
+
function r() {
|
|
2
|
+
return {
|
|
3
|
+
current: 0,
|
|
4
|
+
take() {
|
|
5
|
+
return this.current++;
|
|
6
|
+
},
|
|
7
|
+
reset() {
|
|
8
|
+
this.current = 0;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
16
11
|
}
|
|
12
|
+
const t = /* @__PURE__ */ r();
|
|
17
13
|
export {
|
|
18
|
-
|
|
14
|
+
t as idCache
|
|
19
15
|
};
|
package/dist/index225.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 l=BigInt(2**32-1),c=BigInt(32);function u(t,o=!1){return o?{h:Number(t&l),l:Number(t>>c&l)}:{h:Number(t>>c&l)|0,l:Number(t&l)|0}}function B(t,o=!1){const r=t.length;let n=new Uint32Array(r),i=new Uint32Array(r);for(let e=0;e<r;e++){const{h:f,l:s}=u(t[e],o);[n[e],i[e]]=[f,s]}return[n,i]}const g=(t,o,r)=>t<<r|o>>>32-r,m=(t,o,r)=>o<<r|t>>>32-r,S=(t,o,r)=>o<<r-32|t>>>64-r,a=(t,o,r)=>t<<r-32|o>>>64-r;exports.fromBig=u;exports.rotlBH=S;exports.rotlBL=a;exports.rotlSH=g;exports.rotlSL=m;exports.split=B;
|
package/dist/index225.js
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
});
|
|
1
|
+
const o = /* @__PURE__ */ BigInt(4294967295), i = /* @__PURE__ */ BigInt(32);
|
|
2
|
+
function s(t, r = !1) {
|
|
3
|
+
return r ? { h: Number(t & o), l: Number(t >> i & o) } : { h: Number(t >> i & o) | 0, l: Number(t & o) | 0 };
|
|
4
|
+
}
|
|
5
|
+
function h(t, r = !1) {
|
|
6
|
+
const n = t.length;
|
|
7
|
+
let l = new Uint32Array(n), c = new Uint32Array(n);
|
|
8
|
+
for (let e = 0; e < n; e++) {
|
|
9
|
+
const { h: u, l: f } = s(t[e], r);
|
|
10
|
+
[l[e], c[e]] = [u, f];
|
|
12
11
|
}
|
|
12
|
+
return [l, c];
|
|
13
13
|
}
|
|
14
|
+
const m = (t, r, n) => t << n | r >>> 32 - n, A = (t, r, n) => r << n | t >>> 32 - n, B = (t, r, n) => r << n - 32 | t >>> 64 - n, a = (t, r, n) => t << n - 32 | r >>> 64 - n;
|
|
14
15
|
export {
|
|
15
|
-
|
|
16
|
+
s as fromBig,
|
|
17
|
+
B as rotlBH,
|
|
18
|
+
a as rotlBL,
|
|
19
|
+
m as rotlSH,
|
|
20
|
+
A as rotlSL,
|
|
21
|
+
h as split
|
|
16
22
|
};
|
package/dist/index226.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index238.cjs");/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function s(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function u(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function f(t,...e){if(!s(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function h(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");u(t.outputLen),u(t.blockLen)}function g(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function b(t,e){f(t);const r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function d(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function m(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function B(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function x(t,e){return t<<32-e|t>>>e}const a=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function y(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}function p(t){for(let e=0;e<t.length;e++)t[e]=y(t[e]);return t}const E=a?t=>t:p;function l(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function w(t){return typeof t=="string"&&(t=l(t)),f(t),t}function A(...t){let e=0;for(let n=0;n<t.length;n++){const i=t[n];f(i),e+=i.length}const r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){const c=t[n];r.set(c,i),i+=c.length}return r}class U{}function L(t){const e=n=>t().update(w(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function H(t=32){if(o.crypto&&typeof o.crypto.getRandomValues=="function")return o.crypto.getRandomValues(new Uint8Array(t));if(o.crypto&&typeof o.crypto.randomBytes=="function")return Uint8Array.from(o.crypto.randomBytes(t));throw new Error("crypto.getRandomValues must be defined")}exports.Hash=U;exports.abytes=f;exports.aexists=g;exports.ahash=h;exports.anumber=u;exports.aoutput=b;exports.byteSwap=y;exports.byteSwap32=p;exports.clean=m;exports.concatBytes=A;exports.createHasher=L;exports.createView=B;exports.isBytes=s;exports.isLE=a;exports.randomBytes=H;exports.rotr=x;exports.swap32IfBE=E;exports.toBytes=w;exports.u32=d;exports.utf8ToBytes=l;
|
package/dist/index226.js
CHANGED
|
@@ -1,14 +1,111 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
function s(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { crypto as o } from "./index238.js";
|
|
2
|
+
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
3
|
+
function s(e) {
|
|
4
|
+
return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array";
|
|
5
|
+
}
|
|
6
|
+
function c(e) {
|
|
7
|
+
if (!Number.isSafeInteger(e) || e < 0)
|
|
8
|
+
throw new Error("positive integer expected, got " + e);
|
|
9
|
+
}
|
|
10
|
+
function i(e, ...t) {
|
|
11
|
+
if (!s(e))
|
|
12
|
+
throw new Error("Uint8Array expected");
|
|
13
|
+
if (t.length > 0 && !t.includes(e.length))
|
|
14
|
+
throw new Error("Uint8Array expected of length " + t + ", got length=" + e.length);
|
|
15
|
+
}
|
|
16
|
+
function g(e) {
|
|
17
|
+
if (typeof e != "function" || typeof e.create != "function")
|
|
18
|
+
throw new Error("Hash should be wrapped by utils.createHasher");
|
|
19
|
+
c(e.outputLen), c(e.blockLen);
|
|
20
|
+
}
|
|
21
|
+
function d(e, t = !0) {
|
|
22
|
+
if (e.destroyed)
|
|
23
|
+
throw new Error("Hash instance has been destroyed");
|
|
24
|
+
if (t && e.finished)
|
|
25
|
+
throw new Error("Hash#digest() has already been called");
|
|
26
|
+
}
|
|
27
|
+
function b(e, t) {
|
|
28
|
+
i(e);
|
|
29
|
+
const r = t.outputLen;
|
|
30
|
+
if (e.length < r)
|
|
31
|
+
throw new Error("digestInto() expects output buffer of length at least " + r);
|
|
32
|
+
}
|
|
33
|
+
function m(e) {
|
|
34
|
+
return new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4));
|
|
35
|
+
}
|
|
36
|
+
function x(...e) {
|
|
37
|
+
for (let t = 0; t < e.length; t++)
|
|
38
|
+
e[t].fill(0);
|
|
39
|
+
}
|
|
40
|
+
function A(e) {
|
|
41
|
+
return new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
42
|
+
}
|
|
43
|
+
function E(e, t) {
|
|
44
|
+
return e << 32 - t | e >>> t;
|
|
45
|
+
}
|
|
46
|
+
const a = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
47
|
+
function l(e) {
|
|
48
|
+
return e << 24 & 4278190080 | e << 8 & 16711680 | e >>> 8 & 65280 | e >>> 24 & 255;
|
|
49
|
+
}
|
|
50
|
+
function y(e) {
|
|
51
|
+
for (let t = 0; t < e.length; t++)
|
|
52
|
+
e[t] = l(e[t]);
|
|
53
|
+
return e;
|
|
54
|
+
}
|
|
55
|
+
const U = a ? (e) => e : y;
|
|
56
|
+
function p(e) {
|
|
57
|
+
if (typeof e != "string")
|
|
58
|
+
throw new Error("string expected");
|
|
59
|
+
return new Uint8Array(new TextEncoder().encode(e));
|
|
60
|
+
}
|
|
61
|
+
function w(e) {
|
|
62
|
+
return typeof e == "string" && (e = p(e)), i(e), e;
|
|
63
|
+
}
|
|
64
|
+
function B(...e) {
|
|
65
|
+
let t = 0;
|
|
66
|
+
for (let n = 0; n < e.length; n++) {
|
|
67
|
+
const f = e[n];
|
|
68
|
+
i(f), t += f.length;
|
|
69
|
+
}
|
|
70
|
+
const r = new Uint8Array(t);
|
|
71
|
+
for (let n = 0, f = 0; n < e.length; n++) {
|
|
72
|
+
const u = e[n];
|
|
73
|
+
r.set(u, f), f += u.length;
|
|
74
|
+
}
|
|
75
|
+
return r;
|
|
76
|
+
}
|
|
77
|
+
class L {
|
|
78
|
+
}
|
|
79
|
+
function H(e) {
|
|
80
|
+
const t = (n) => e().update(w(n)).digest(), r = e();
|
|
81
|
+
return t.outputLen = r.outputLen, t.blockLen = r.blockLen, t.create = () => e(), t;
|
|
82
|
+
}
|
|
83
|
+
function V(e = 32) {
|
|
84
|
+
if (o && typeof o.getRandomValues == "function")
|
|
85
|
+
return o.getRandomValues(new Uint8Array(e));
|
|
86
|
+
if (o && typeof o.randomBytes == "function")
|
|
87
|
+
return Uint8Array.from(o.randomBytes(e));
|
|
88
|
+
throw new Error("crypto.getRandomValues must be defined");
|
|
10
89
|
}
|
|
11
90
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
91
|
+
L as Hash,
|
|
92
|
+
i as abytes,
|
|
93
|
+
d as aexists,
|
|
94
|
+
g as ahash,
|
|
95
|
+
c as anumber,
|
|
96
|
+
b as aoutput,
|
|
97
|
+
l as byteSwap,
|
|
98
|
+
y as byteSwap32,
|
|
99
|
+
x as clean,
|
|
100
|
+
B as concatBytes,
|
|
101
|
+
H as createHasher,
|
|
102
|
+
A as createView,
|
|
103
|
+
s as isBytes,
|
|
104
|
+
a as isLE,
|
|
105
|
+
V as randomBytes,
|
|
106
|
+
E as rotr,
|
|
107
|
+
U as swap32IfBE,
|
|
108
|
+
w as toBytes,
|
|
109
|
+
m as u32,
|
|
110
|
+
p as utf8ToBytes
|
|
14
111
|
};
|
package/dist/index227.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index237.cjs"),x=require("./index226.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;
|