@coinbase/cdp-core 0.0.57 → 0.0.58
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/esm/index.native103.js +1 -1
- package/dist/esm/index.native115.js +1 -1
- package/dist/esm/index.native127.js +2 -2
- package/dist/esm/index.native131.js +1 -1
- package/dist/esm/index.native140.js +74 -42
- package/dist/esm/index.native141.js +3 -78
- package/dist/esm/index.native142.js +46 -3
- package/dist/esm/index.native146.js +7 -38
- package/dist/esm/index.native148.js +375 -67
- package/dist/esm/index.native149.js +832 -34
- package/dist/esm/index.native150.js +38 -20
- package/dist/esm/index.native151.js +2 -8
- package/dist/esm/index.native152.js +70 -2
- package/dist/esm/index.native153.js +30 -373
- package/dist/esm/index.native154.js +20 -832
- package/dist/esm/index.native164.js +1 -1
- package/dist/esm/index.native165.js +2 -2
- package/dist/esm/index.native166.js +2 -2
- package/dist/esm/index.native167.js +2 -2
- package/dist/esm/index.native25.js +1 -1
- package/dist/esm/index.native47.js +1 -1
- package/dist/esm/index.web100.js +4 -2
- package/dist/esm/index.web101.js +19 -44
- package/dist/esm/index.web102.js +8 -13
- package/dist/esm/index.web103.js +8 -2
- package/dist/esm/index.web104.js +71 -4
- package/dist/esm/index.web105.js +12 -12
- package/dist/esm/index.web106.js +3 -7
- package/dist/esm/index.web107.js +4 -3
- package/dist/esm/index.web108.js +4 -19
- package/dist/esm/index.web109.js +4 -8
- package/dist/esm/index.web110.js +19 -7
- package/dist/esm/index.web111.js +47 -66
- package/dist/esm/index.web112.js +17 -18
- package/dist/esm/index.web113.js +20 -3
- package/dist/esm/index.web114.js +8 -4
- package/dist/esm/index.web115.js +30 -4
- package/dist/esm/index.web116.js +7 -4
- package/dist/esm/index.web117.js +11 -10
- package/dist/esm/index.web118.js +4 -52
- package/dist/esm/index.web119.js +54 -17
- package/dist/esm/index.web120.js +10 -20
- package/dist/esm/index.web121.js +2 -9
- package/dist/esm/index.web122.js +44 -30
- package/dist/esm/index.web123.js +13 -7
- package/dist/esm/index.web124.js +2 -21
- package/dist/esm/index.web126.js +1 -1
- package/dist/esm/index.web130.js +1 -1
- package/dist/esm/index.web131.js +6 -32
- package/dist/esm/index.web132.js +32 -6
- package/dist/esm/index.web133.js +2 -79
- package/dist/esm/index.web134.js +109 -2
- package/dist/esm/index.web135.js +2 -109
- package/dist/esm/index.web136.js +79 -2
- package/dist/esm/index.web137.js +46 -3
- package/dist/esm/index.web138.js +3 -20
- package/dist/esm/index.web139.js +21 -10
- package/dist/esm/index.web140.js +9 -19
- package/dist/esm/index.web141.js +15 -89
- package/dist/esm/index.web142.js +92 -19
- package/dist/esm/index.web143.js +18 -115
- package/dist/esm/index.web144.js +115 -44
- package/dist/esm/index.web155.js +14 -17
- package/dist/esm/index.web156.js +18 -28
- package/dist/esm/index.web157.js +26 -6
- package/dist/esm/index.web158.js +6 -9
- package/dist/esm/index.web159.js +11 -13
- package/dist/esm/index.web160.js +11 -8
- package/dist/esm/index.web161.js +7 -14
- package/dist/esm/index.web162.js +16 -80
- package/dist/esm/index.web163.js +80 -14
- package/dist/esm/index.web46.js +1 -1
- package/dist/esm/index.web48.js +12 -12
- package/dist/esm/index.web49.js +12 -12
- package/dist/esm/index.web50.js +1 -1
- package/dist/esm/index.web51.js +1 -1
- package/dist/esm/index.web53.js +1 -1
- package/dist/esm/index.web55.js +4 -4
- package/dist/esm/index.web73.js +1 -1
- package/dist/esm/index.web91.js +1 -1
- package/dist/esm/index.web92.js +1 -1
- package/dist/esm/index.web97.js +4 -4
- package/dist/esm/index.web98.js +17 -53
- package/dist/esm/index.web99.js +7 -10
- package/dist/native/index.native103.js +1 -1
- package/dist/native/index.native115.js +1 -1
- package/dist/native/index.native127.js +2 -2
- package/dist/native/index.native131.js +1 -1
- package/dist/native/index.native140.js +74 -42
- package/dist/native/index.native141.js +3 -78
- package/dist/native/index.native142.js +46 -3
- package/dist/native/index.native146.js +7 -38
- package/dist/native/index.native148.js +375 -67
- package/dist/native/index.native149.js +832 -34
- package/dist/native/index.native150.js +38 -20
- package/dist/native/index.native151.js +2 -8
- package/dist/native/index.native152.js +70 -2
- package/dist/native/index.native153.js +30 -373
- package/dist/native/index.native154.js +20 -832
- package/dist/native/index.native164.js +1 -1
- package/dist/native/index.native165.js +2 -2
- package/dist/native/index.native166.js +2 -2
- package/dist/native/index.native167.js +2 -2
- package/dist/native/index.native25.js +1 -1
- package/dist/native/index.native47.js +1 -1
- package/dist/native-types/version.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/web/index.web100.js +4 -2
- package/dist/web/index.web101.js +19 -44
- package/dist/web/index.web102.js +8 -13
- package/dist/web/index.web103.js +8 -2
- package/dist/web/index.web104.js +71 -4
- package/dist/web/index.web105.js +12 -12
- package/dist/web/index.web106.js +3 -7
- package/dist/web/index.web107.js +4 -3
- package/dist/web/index.web108.js +4 -19
- package/dist/web/index.web109.js +4 -8
- package/dist/web/index.web110.js +19 -7
- package/dist/web/index.web111.js +47 -66
- package/dist/web/index.web112.js +17 -18
- package/dist/web/index.web113.js +20 -3
- package/dist/web/index.web114.js +8 -4
- package/dist/web/index.web115.js +30 -4
- package/dist/web/index.web116.js +7 -4
- package/dist/web/index.web117.js +11 -10
- package/dist/web/index.web118.js +4 -52
- package/dist/web/index.web119.js +54 -17
- package/dist/web/index.web120.js +10 -20
- package/dist/web/index.web121.js +2 -9
- package/dist/web/index.web122.js +44 -30
- package/dist/web/index.web123.js +13 -7
- package/dist/web/index.web124.js +2 -21
- package/dist/web/index.web126.js +1 -1
- package/dist/web/index.web130.js +1 -1
- package/dist/web/index.web131.js +6 -32
- package/dist/web/index.web132.js +32 -6
- package/dist/web/index.web133.js +2 -79
- package/dist/web/index.web134.js +109 -2
- package/dist/web/index.web135.js +2 -109
- package/dist/web/index.web136.js +79 -2
- package/dist/web/index.web137.js +46 -3
- package/dist/web/index.web138.js +3 -20
- package/dist/web/index.web139.js +21 -10
- package/dist/web/index.web140.js +9 -19
- package/dist/web/index.web141.js +15 -89
- package/dist/web/index.web142.js +92 -19
- package/dist/web/index.web143.js +18 -115
- package/dist/web/index.web144.js +115 -44
- package/dist/web/index.web155.js +14 -17
- package/dist/web/index.web156.js +18 -28
- package/dist/web/index.web157.js +26 -6
- package/dist/web/index.web158.js +6 -9
- package/dist/web/index.web159.js +11 -13
- package/dist/web/index.web160.js +11 -8
- package/dist/web/index.web161.js +7 -14
- package/dist/web/index.web162.js +16 -80
- package/dist/web/index.web163.js +80 -14
- package/dist/web/index.web46.js +1 -1
- package/dist/web/index.web48.js +12 -12
- package/dist/web/index.web49.js +12 -12
- package/dist/web/index.web50.js +1 -1
- package/dist/web/index.web51.js +1 -1
- package/dist/web/index.web53.js +1 -1
- package/dist/web/index.web55.js +4 -4
- package/dist/web/index.web73.js +1 -1
- package/dist/web/index.web91.js +1 -1
- package/dist/web/index.web92.js +1 -1
- package/dist/web/index.web97.js +4 -4
- package/dist/web/index.web98.js +17 -53
- package/dist/web/index.web99.js +7 -10
- package/dist/web-types/version.d.ts +1 -1
- package/package.json +2 -2
package/dist/esm/index.web163.js
CHANGED
|
@@ -1,17 +1,83 @@
|
|
|
1
|
-
import {
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { JOSENotSupported as s } from "./index.web54.js";
|
|
2
|
+
function n(e) {
|
|
3
|
+
let a, r;
|
|
4
|
+
switch (e.kty) {
|
|
5
|
+
case "RSA": {
|
|
6
|
+
switch (e.alg) {
|
|
7
|
+
case "PS256":
|
|
8
|
+
case "PS384":
|
|
9
|
+
case "PS512":
|
|
10
|
+
a = { name: "RSA-PSS", hash: `SHA-${e.alg.slice(-3)}` }, r = e.d ? ["sign"] : ["verify"];
|
|
11
|
+
break;
|
|
12
|
+
case "RS256":
|
|
13
|
+
case "RS384":
|
|
14
|
+
case "RS512":
|
|
15
|
+
a = { name: "RSASSA-PKCS1-v1_5", hash: `SHA-${e.alg.slice(-3)}` }, r = e.d ? ["sign"] : ["verify"];
|
|
16
|
+
break;
|
|
17
|
+
case "RSA-OAEP":
|
|
18
|
+
case "RSA-OAEP-256":
|
|
19
|
+
case "RSA-OAEP-384":
|
|
20
|
+
case "RSA-OAEP-512":
|
|
21
|
+
a = {
|
|
22
|
+
name: "RSA-OAEP",
|
|
23
|
+
hash: `SHA-${parseInt(e.alg.slice(-3), 10) || 1}`
|
|
24
|
+
}, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
|
|
25
|
+
break;
|
|
26
|
+
default:
|
|
27
|
+
throw new s('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
28
|
+
}
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
case "EC": {
|
|
32
|
+
switch (e.alg) {
|
|
33
|
+
case "ES256":
|
|
34
|
+
a = { name: "ECDSA", namedCurve: "P-256" }, r = e.d ? ["sign"] : ["verify"];
|
|
35
|
+
break;
|
|
36
|
+
case "ES384":
|
|
37
|
+
a = { name: "ECDSA", namedCurve: "P-384" }, r = e.d ? ["sign"] : ["verify"];
|
|
38
|
+
break;
|
|
39
|
+
case "ES512":
|
|
40
|
+
a = { name: "ECDSA", namedCurve: "P-521" }, r = e.d ? ["sign"] : ["verify"];
|
|
41
|
+
break;
|
|
42
|
+
case "ECDH-ES":
|
|
43
|
+
case "ECDH-ES+A128KW":
|
|
44
|
+
case "ECDH-ES+A192KW":
|
|
45
|
+
case "ECDH-ES+A256KW":
|
|
46
|
+
a = { name: "ECDH", namedCurve: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
47
|
+
break;
|
|
48
|
+
default:
|
|
49
|
+
throw new s('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
50
|
+
}
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
case "OKP": {
|
|
54
|
+
switch (e.alg) {
|
|
55
|
+
case "Ed25519":
|
|
56
|
+
case "EdDSA":
|
|
57
|
+
a = { name: "Ed25519" }, r = e.d ? ["sign"] : ["verify"];
|
|
58
|
+
break;
|
|
59
|
+
case "ECDH-ES":
|
|
60
|
+
case "ECDH-ES+A128KW":
|
|
61
|
+
case "ECDH-ES+A192KW":
|
|
62
|
+
case "ECDH-ES+A256KW":
|
|
63
|
+
a = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
64
|
+
break;
|
|
65
|
+
default:
|
|
66
|
+
throw new s('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
67
|
+
}
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
default:
|
|
71
|
+
throw new s('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
|
|
72
|
+
}
|
|
73
|
+
return { algorithm: a, keyUsages: r };
|
|
14
74
|
}
|
|
75
|
+
const i = async (e) => {
|
|
76
|
+
if (!e.alg)
|
|
77
|
+
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
78
|
+
const { algorithm: a, keyUsages: r } = n(e), t = { ...e };
|
|
79
|
+
return delete t.alg, delete t.use, crypto.subtle.importKey("jwk", t, a, e.ext ?? !e.d, e.key_ops ?? r);
|
|
80
|
+
};
|
|
15
81
|
export {
|
|
16
|
-
|
|
82
|
+
i as default
|
|
17
83
|
};
|
package/dist/esm/index.web46.js
CHANGED
package/dist/esm/index.web48.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { handleAccounts as t } from "./index.
|
|
2
|
-
import { handleEthSign as e } from "./index.
|
|
3
|
-
import { handleGetCallsStatus as a } from "./index.
|
|
4
|
-
import { handleGetCapabilities as n } from "./index.
|
|
5
|
-
import { handlePersonalSign as o } from "./index.
|
|
6
|
-
import { handleRequestAccounts as r } from "./index.
|
|
7
|
-
import { handleSendCalls as i } from "./index.
|
|
8
|
-
import { handleSendTransaction as l } from "./index.
|
|
9
|
-
import { handleSignTypedData as h } from "./index.
|
|
10
|
-
import { handleChainId as s } from "./index.
|
|
11
|
-
import { handleDisconnect as m } from "./index.
|
|
12
|
-
import { handleSwitchEthereumChain as d } from "./index.
|
|
1
|
+
import { handleAccounts as t } from "./index.web97.js";
|
|
2
|
+
import { handleEthSign as e } from "./index.web98.js";
|
|
3
|
+
import { handleGetCallsStatus as a } from "./index.web99.js";
|
|
4
|
+
import { handleGetCapabilities as n } from "./index.web100.js";
|
|
5
|
+
import { handlePersonalSign as o } from "./index.web101.js";
|
|
6
|
+
import { handleRequestAccounts as r } from "./index.web102.js";
|
|
7
|
+
import { handleSendCalls as i } from "./index.web103.js";
|
|
8
|
+
import { handleSendTransaction as l } from "./index.web104.js";
|
|
9
|
+
import { handleSignTypedData as h } from "./index.web105.js";
|
|
10
|
+
import { handleChainId as s } from "./index.web106.js";
|
|
11
|
+
import { handleDisconnect as m } from "./index.web107.js";
|
|
12
|
+
import { handleSwitchEthereumChain as d } from "./index.web108.js";
|
|
13
13
|
function D() {
|
|
14
14
|
return {
|
|
15
15
|
eth_accounts: t,
|
package/dist/esm/index.web49.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { handleChainId as t } from "./index.
|
|
2
|
-
import { handleDisconnect as e } from "./index.
|
|
3
|
-
import { handleSwitchEthereumChain as a } from "./index.
|
|
4
|
-
import { handleAccounts as n } from "./index.
|
|
5
|
-
import { handleEthSign as o } from "./index.
|
|
6
|
-
import { handleGetCallsStatus as r } from "./index.
|
|
7
|
-
import { handleGetCapabilities as i } from "./index.
|
|
8
|
-
import { handlePersonalSign as l } from "./index.
|
|
9
|
-
import { handleRequestAccounts as h } from "./index.
|
|
10
|
-
import { handleSendCalls as m } from "./index.
|
|
11
|
-
import { handleSendTransaction as s } from "./index.
|
|
12
|
-
import { handleSignTypedData as d } from "./index.
|
|
1
|
+
import { handleChainId as t } from "./index.web106.js";
|
|
2
|
+
import { handleDisconnect as e } from "./index.web107.js";
|
|
3
|
+
import { handleSwitchEthereumChain as a } from "./index.web108.js";
|
|
4
|
+
import { handleAccounts as n } from "./index.web109.js";
|
|
5
|
+
import { handleEthSign as o } from "./index.web110.js";
|
|
6
|
+
import { handleGetCallsStatus as r } from "./index.web111.js";
|
|
7
|
+
import { handleGetCapabilities as i } from "./index.web112.js";
|
|
8
|
+
import { handlePersonalSign as l } from "./index.web113.js";
|
|
9
|
+
import { handleRequestAccounts as h } from "./index.web114.js";
|
|
10
|
+
import { handleSendCalls as m } from "./index.web115.js";
|
|
11
|
+
import { handleSendTransaction as s } from "./index.web116.js";
|
|
12
|
+
import { handleSignTypedData as d } from "./index.web117.js";
|
|
13
13
|
function E() {
|
|
14
14
|
return {
|
|
15
15
|
eth_accounts: n,
|
package/dist/esm/index.web50.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { __require as e } from "./index.
|
|
1
|
+
import { __require as e } from "./index.web134.js";
|
|
2
2
|
e();
|
package/dist/esm/index.web51.js
CHANGED
package/dist/esm/index.web53.js
CHANGED
package/dist/esm/index.web55.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { encoder as n } from "./index.
|
|
2
|
-
import e from "./index.
|
|
3
|
-
import i from "./index.
|
|
4
|
-
import o from "./index.
|
|
1
|
+
import { encoder as n } from "./index.web120.js";
|
|
2
|
+
import e from "./index.web121.js";
|
|
3
|
+
import i from "./index.web122.js";
|
|
4
|
+
import o from "./index.web123.js";
|
|
5
5
|
function s(r, t) {
|
|
6
6
|
if (!Number.isFinite(t))
|
|
7
7
|
throw new TypeError(`Invalid ${r} input`);
|
package/dist/esm/index.web73.js
CHANGED
package/dist/esm/index.web91.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { commitmentToVersionedHash as i } from "./index.
|
|
1
|
+
import { commitmentToVersionedHash as i } from "./index.web131.js";
|
|
2
2
|
function r(o) {
|
|
3
3
|
const { commitments: t, version: n } = o, e = o.to ?? (typeof t[0] == "string" ? "hex" : "bytes"), s = [];
|
|
4
4
|
for (const m of t)
|
package/dist/esm/index.web92.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { blobsToCommitments as f } from "./index.web89.js";
|
|
2
2
|
import { blobsToProofs as l } from "./index.web90.js";
|
|
3
|
-
import { toBlobs as p } from "./index.
|
|
3
|
+
import { toBlobs as p } from "./index.web132.js";
|
|
4
4
|
function k(t) {
|
|
5
5
|
const { data: i, kzg: n, to: m } = t, s = t.blobs ?? p({ data: i, to: m }), b = t.commitments ?? f({ blobs: s, kzg: n, to: m }), r = t.proofs ?? l({ blobs: s, commitments: b, kzg: n, to: m }), c = [];
|
|
6
6
|
for (let o = 0; o < s.length; o++)
|
package/dist/esm/index.web97.js
CHANGED
package/dist/esm/index.web98.js
CHANGED
|
@@ -1,57 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
setProtectedHeader(e) {
|
|
19
|
-
if (this.#e)
|
|
20
|
-
throw new TypeError("setProtectedHeader can only be called once");
|
|
21
|
-
return this.#e = e, this;
|
|
22
|
-
}
|
|
23
|
-
setUnprotectedHeader(e) {
|
|
24
|
-
if (this.#t)
|
|
25
|
-
throw new TypeError("setUnprotectedHeader can only be called once");
|
|
26
|
-
return this.#t = e, this;
|
|
27
|
-
}
|
|
28
|
-
async sign(e, l) {
|
|
29
|
-
if (!this.#e && !this.#t)
|
|
30
|
-
throw new r("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");
|
|
31
|
-
if (!b(this.#e, this.#t))
|
|
32
|
-
throw new r("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
|
|
33
|
-
const c = {
|
|
34
|
-
...this.#e,
|
|
35
|
-
...this.#t
|
|
36
|
-
}, p = H(r, /* @__PURE__ */ new Map([["b64", !0]]), l?.crit, this.#e, c);
|
|
37
|
-
let o = !0;
|
|
38
|
-
if (p.has("b64") && (o = this.#e.b64, typeof o != "boolean"))
|
|
39
|
-
throw new r('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
|
|
40
|
-
const { alg: t } = c;
|
|
41
|
-
if (typeof t != "string" || !t)
|
|
42
|
-
throw new r('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
|
43
|
-
g(t, e, "sign");
|
|
44
|
-
let i = this.#r;
|
|
45
|
-
o && (i = s.encode(d(i)));
|
|
46
|
-
let n;
|
|
47
|
-
this.#e ? n = s.encode(d(JSON.stringify(this.#e))) : n = s.encode("");
|
|
48
|
-
const f = u(n, s.encode("."), i), m = await P(e, t), w = await y(t, m, f), a = {
|
|
49
|
-
signature: d(w),
|
|
50
|
-
payload: ""
|
|
51
|
-
};
|
|
52
|
-
return o && (a.payload = h.decode(i)), this.#t && (a.header = this.#t), this.#e && (a.protected = h.decode(n)), a;
|
|
1
|
+
import { signEvmHash as o } from "./index.web6.js";
|
|
2
|
+
import { validateUserOwnsEOA as a, EIP1193ProviderError as i, STANDARD_ERROR_CODES as s } from "./index.web19.js";
|
|
3
|
+
async function h(t) {
|
|
4
|
+
const [n, e] = t;
|
|
5
|
+
await a(e);
|
|
6
|
+
try {
|
|
7
|
+
const { signature: r } = await o({
|
|
8
|
+
evmAccount: e,
|
|
9
|
+
hash: n
|
|
10
|
+
});
|
|
11
|
+
return r;
|
|
12
|
+
} catch (r) {
|
|
13
|
+
throw new i(
|
|
14
|
+
s.provider.userRejectedRequest,
|
|
15
|
+
r instanceof Error ? r.message : "Signing failed"
|
|
16
|
+
);
|
|
53
17
|
}
|
|
54
18
|
}
|
|
55
19
|
export {
|
|
56
|
-
|
|
20
|
+
h as handleEthSign
|
|
57
21
|
};
|
package/dist/esm/index.web99.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return t;
|
|
1
|
+
import { EIP1193ProviderError as t, STANDARD_ERROR_CODES as r } from "./index.web19.js";
|
|
2
|
+
async function a(o, e) {
|
|
3
|
+
throw new t(
|
|
4
|
+
r.provider.unsupportedMethod,
|
|
5
|
+
"wallet_getCallsStatus is not supported with EOAs"
|
|
6
|
+
);
|
|
8
7
|
}
|
|
9
8
|
export {
|
|
10
|
-
|
|
11
|
-
s as decoder,
|
|
12
|
-
d as encoder
|
|
9
|
+
a as handleGetCallsStatus
|
|
13
10
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getDefaultExportFromCjs as r } from "./index.
|
|
2
|
-
import { __require as o } from "./index.
|
|
1
|
+
import { getDefaultExportFromCjs as r } from "./index.native141.js";
|
|
2
|
+
import { __require as o } from "./index.native150.js";
|
|
3
3
|
var t = o();
|
|
4
4
|
const a = /* @__PURE__ */ r(t);
|
|
5
5
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HashMD as D, SHA256_IV as b, Chi as g, Maj as p } from "./index.
|
|
1
|
+
import { HashMD as D, SHA256_IV as b, Chi as g, Maj as p } from "./index.native140.js";
|
|
2
2
|
import { createHasher as u, clean as C, rotr as i } from "./index.native130.js";
|
|
3
3
|
const B = /* @__PURE__ */ Uint32Array.from([
|
|
4
4
|
1116352408,
|
|
@@ -1,49 +1,81 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const u = typeof n == "bigint" && r ? -n - 1n : 0;
|
|
8
|
-
if (n && o > n || o < u) {
|
|
9
|
-
const s = typeof t == "bigint" ? "n" : "";
|
|
10
|
-
throw new d({
|
|
11
|
-
max: n ? `${n}${s}` : void 0,
|
|
12
|
-
min: `${u}${s}`,
|
|
13
|
-
signed: r,
|
|
14
|
-
size: e,
|
|
15
|
-
value: `${t}${s}`
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
const a = `0x${(r && o < 0 ? (1n << BigInt(e * 8)) + BigInt(o) : o).toString(16)}`;
|
|
19
|
-
return e ? c(a, e) : a;
|
|
1
|
+
import { Hash as g, createView as l, aexists as b, toBytes as a, abytes as d, aoutput as x, clean as w } from "./index.native130.js";
|
|
2
|
+
function y(o, t, s, n) {
|
|
3
|
+
if (typeof o.setBigUint64 == "function")
|
|
4
|
+
return o.setBigUint64(t, s, n);
|
|
5
|
+
const i = BigInt(32), h = BigInt(4294967295), e = Number(s >> i & h), r = Number(s & h), c = n ? 4 : 0, u = n ? 0 : 4;
|
|
6
|
+
o.setUint32(t + c, e, n), o.setUint32(t + u, r, n);
|
|
20
7
|
}
|
|
21
|
-
function
|
|
22
|
-
return
|
|
8
|
+
function U(o, t, s) {
|
|
9
|
+
return o & t ^ ~o & s;
|
|
23
10
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
super(`Number \`${n}\` is not in safe${o ? ` ${o * 8}-bit` : ""}${e ? " signed" : " unsigned"} integer range ${i ? `(\`${r}\` to \`${i}\`)` : `(above \`${r}\`)`}`), Object.defineProperty(this, "name", {
|
|
27
|
-
enumerable: !0,
|
|
28
|
-
configurable: !0,
|
|
29
|
-
writable: !0,
|
|
30
|
-
value: "Hex.IntegerOutOfRangeError"
|
|
31
|
-
});
|
|
32
|
-
}
|
|
11
|
+
function _(o, t, s) {
|
|
12
|
+
return o & t ^ o & s ^ t & s;
|
|
33
13
|
}
|
|
34
|
-
class
|
|
35
|
-
constructor(
|
|
36
|
-
super(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
14
|
+
class m extends g {
|
|
15
|
+
constructor(t, s, n, i) {
|
|
16
|
+
super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = t, this.outputLen = s, this.padOffset = n, this.isLE = i, this.buffer = new Uint8Array(t), this.view = l(this.buffer);
|
|
17
|
+
}
|
|
18
|
+
update(t) {
|
|
19
|
+
b(this), t = a(t), d(t);
|
|
20
|
+
const { view: s, buffer: n, blockLen: i } = this, h = t.length;
|
|
21
|
+
for (let e = 0; e < h; ) {
|
|
22
|
+
const r = Math.min(i - this.pos, h - e);
|
|
23
|
+
if (r === i) {
|
|
24
|
+
const c = l(t);
|
|
25
|
+
for (; i <= h - e; e += i)
|
|
26
|
+
this.process(c, e);
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
n.set(t.subarray(e, e + r), this.pos), this.pos += r, e += r, this.pos === i && (this.process(s, 0), this.pos = 0);
|
|
30
|
+
}
|
|
31
|
+
return this.length += t.length, this.roundClean(), this;
|
|
32
|
+
}
|
|
33
|
+
digestInto(t) {
|
|
34
|
+
b(this), x(t, this), this.finished = !0;
|
|
35
|
+
const { buffer: s, view: n, blockLen: i, isLE: h } = this;
|
|
36
|
+
let { pos: e } = this;
|
|
37
|
+
s[e++] = 128, w(this.buffer.subarray(e)), this.padOffset > i - e && (this.process(n, 0), e = 0);
|
|
38
|
+
for (let f = e; f < i; f++)
|
|
39
|
+
s[f] = 0;
|
|
40
|
+
y(n, i - 8, BigInt(this.length * 8), h), this.process(n, 0);
|
|
41
|
+
const r = l(t), c = this.outputLen;
|
|
42
|
+
if (c % 4)
|
|
43
|
+
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
44
|
+
const u = c / 4, p = this.get();
|
|
45
|
+
if (u > p.length)
|
|
46
|
+
throw new Error("_sha2: outputLen bigger than state");
|
|
47
|
+
for (let f = 0; f < u; f++)
|
|
48
|
+
r.setUint32(4 * f, p[f], h);
|
|
49
|
+
}
|
|
50
|
+
digest() {
|
|
51
|
+
const { buffer: t, outputLen: s } = this;
|
|
52
|
+
this.digestInto(t);
|
|
53
|
+
const n = t.slice(0, s);
|
|
54
|
+
return this.destroy(), n;
|
|
55
|
+
}
|
|
56
|
+
_cloneInto(t) {
|
|
57
|
+
t || (t = new this.constructor()), t.set(...this.get());
|
|
58
|
+
const { blockLen: s, buffer: n, length: i, finished: h, destroyed: e, pos: r } = this;
|
|
59
|
+
return t.destroyed = e, t.finished = h, t.length = i, t.pos = r, i % s && t.buffer.set(n), t;
|
|
60
|
+
}
|
|
61
|
+
clone() {
|
|
62
|
+
return this._cloneInto();
|
|
42
63
|
}
|
|
43
64
|
}
|
|
65
|
+
const B = /* @__PURE__ */ Uint32Array.from([
|
|
66
|
+
1779033703,
|
|
67
|
+
3144134277,
|
|
68
|
+
1013904242,
|
|
69
|
+
2773480762,
|
|
70
|
+
1359893119,
|
|
71
|
+
2600822924,
|
|
72
|
+
528734635,
|
|
73
|
+
1541459225
|
|
74
|
+
]);
|
|
44
75
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
76
|
+
U as Chi,
|
|
77
|
+
m as HashMD,
|
|
78
|
+
_ as Maj,
|
|
79
|
+
B as SHA256_IV,
|
|
80
|
+
y as setBigUint64
|
|
49
81
|
};
|
|
@@ -1,81 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (typeof o.setBigUint64 == "function")
|
|
4
|
-
return o.setBigUint64(t, s, n);
|
|
5
|
-
const i = BigInt(32), h = BigInt(4294967295), e = Number(s >> i & h), r = Number(s & h), c = n ? 4 : 0, u = n ? 0 : 4;
|
|
6
|
-
o.setUint32(t + c, e, n), o.setUint32(t + u, r, n);
|
|
1
|
+
function e(t) {
|
|
2
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
7
3
|
}
|
|
8
|
-
function U(o, t, s) {
|
|
9
|
-
return o & t ^ ~o & s;
|
|
10
|
-
}
|
|
11
|
-
function _(o, t, s) {
|
|
12
|
-
return o & t ^ o & s ^ t & s;
|
|
13
|
-
}
|
|
14
|
-
class m extends g {
|
|
15
|
-
constructor(t, s, n, i) {
|
|
16
|
-
super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = t, this.outputLen = s, this.padOffset = n, this.isLE = i, this.buffer = new Uint8Array(t), this.view = l(this.buffer);
|
|
17
|
-
}
|
|
18
|
-
update(t) {
|
|
19
|
-
b(this), t = a(t), d(t);
|
|
20
|
-
const { view: s, buffer: n, blockLen: i } = this, h = t.length;
|
|
21
|
-
for (let e = 0; e < h; ) {
|
|
22
|
-
const r = Math.min(i - this.pos, h - e);
|
|
23
|
-
if (r === i) {
|
|
24
|
-
const c = l(t);
|
|
25
|
-
for (; i <= h - e; e += i)
|
|
26
|
-
this.process(c, e);
|
|
27
|
-
continue;
|
|
28
|
-
}
|
|
29
|
-
n.set(t.subarray(e, e + r), this.pos), this.pos += r, e += r, this.pos === i && (this.process(s, 0), this.pos = 0);
|
|
30
|
-
}
|
|
31
|
-
return this.length += t.length, this.roundClean(), this;
|
|
32
|
-
}
|
|
33
|
-
digestInto(t) {
|
|
34
|
-
b(this), x(t, this), this.finished = !0;
|
|
35
|
-
const { buffer: s, view: n, blockLen: i, isLE: h } = this;
|
|
36
|
-
let { pos: e } = this;
|
|
37
|
-
s[e++] = 128, w(this.buffer.subarray(e)), this.padOffset > i - e && (this.process(n, 0), e = 0);
|
|
38
|
-
for (let f = e; f < i; f++)
|
|
39
|
-
s[f] = 0;
|
|
40
|
-
y(n, i - 8, BigInt(this.length * 8), h), this.process(n, 0);
|
|
41
|
-
const r = l(t), c = this.outputLen;
|
|
42
|
-
if (c % 4)
|
|
43
|
-
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
44
|
-
const u = c / 4, p = this.get();
|
|
45
|
-
if (u > p.length)
|
|
46
|
-
throw new Error("_sha2: outputLen bigger than state");
|
|
47
|
-
for (let f = 0; f < u; f++)
|
|
48
|
-
r.setUint32(4 * f, p[f], h);
|
|
49
|
-
}
|
|
50
|
-
digest() {
|
|
51
|
-
const { buffer: t, outputLen: s } = this;
|
|
52
|
-
this.digestInto(t);
|
|
53
|
-
const n = t.slice(0, s);
|
|
54
|
-
return this.destroy(), n;
|
|
55
|
-
}
|
|
56
|
-
_cloneInto(t) {
|
|
57
|
-
t || (t = new this.constructor()), t.set(...this.get());
|
|
58
|
-
const { blockLen: s, buffer: n, length: i, finished: h, destroyed: e, pos: r } = this;
|
|
59
|
-
return t.destroyed = e, t.finished = h, t.length = i, t.pos = r, i % s && t.buffer.set(n), t;
|
|
60
|
-
}
|
|
61
|
-
clone() {
|
|
62
|
-
return this._cloneInto();
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
const B = /* @__PURE__ */ Uint32Array.from([
|
|
66
|
-
1779033703,
|
|
67
|
-
3144134277,
|
|
68
|
-
1013904242,
|
|
69
|
-
2773480762,
|
|
70
|
-
1359893119,
|
|
71
|
-
2600822924,
|
|
72
|
-
528734635,
|
|
73
|
-
1541459225
|
|
74
|
-
]);
|
|
75
4
|
export {
|
|
76
|
-
|
|
77
|
-
m as HashMD,
|
|
78
|
-
_ as Maj,
|
|
79
|
-
B as SHA256_IV,
|
|
80
|
-
y as setBigUint64
|
|
5
|
+
e as getDefaultExportFromCjs
|
|
81
6
|
};
|
|
@@ -1,6 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { BaseError as f } from "./index.native55.js";
|
|
2
|
+
import { pad as g } from "./index.native164.js";
|
|
3
|
+
function m(t, i = {}) {
|
|
4
|
+
const { signed: r, size: e } = i, o = BigInt(t);
|
|
5
|
+
let n;
|
|
6
|
+
e ? r ? n = (1n << BigInt(e) * 8n - 1n) - 1n : n = 2n ** (BigInt(e) * 8n) - 1n : typeof t == "number" && (n = BigInt(Number.MAX_SAFE_INTEGER));
|
|
7
|
+
const u = typeof n == "bigint" && r ? -n - 1n : 0;
|
|
8
|
+
if (n && o > n || o < u) {
|
|
9
|
+
const s = typeof t == "bigint" ? "n" : "";
|
|
10
|
+
throw new d({
|
|
11
|
+
max: n ? `${n}${s}` : void 0,
|
|
12
|
+
min: `${u}${s}`,
|
|
13
|
+
signed: r,
|
|
14
|
+
size: e,
|
|
15
|
+
value: `${t}${s}`
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
const a = `0x${(r && o < 0 ? (1n << BigInt(e * 8)) + BigInt(o) : o).toString(16)}`;
|
|
19
|
+
return e ? c(a, e) : a;
|
|
20
|
+
}
|
|
21
|
+
function c(t, i) {
|
|
22
|
+
return g(t, { dir: "left", size: i });
|
|
23
|
+
}
|
|
24
|
+
class d extends f {
|
|
25
|
+
constructor({ max: i, min: r, signed: e, size: o, value: n }) {
|
|
26
|
+
super(`Number \`${n}\` is not in safe${o ? ` ${o * 8}-bit` : ""}${e ? " signed" : " unsigned"} integer range ${i ? `(\`${r}\` to \`${i}\`)` : `(above \`${r}\`)`}`), Object.defineProperty(this, "name", {
|
|
27
|
+
enumerable: !0,
|
|
28
|
+
configurable: !0,
|
|
29
|
+
writable: !0,
|
|
30
|
+
value: "Hex.IntegerOutOfRangeError"
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
class p extends f {
|
|
35
|
+
constructor({ size: i, targetSize: r, type: e }) {
|
|
36
|
+
super(`${e.charAt(0).toUpperCase()}${e.slice(1).toLowerCase()} size (\`${i}\`) exceeds padding size (\`${r}\`).`), Object.defineProperty(this, "name", {
|
|
37
|
+
enumerable: !0,
|
|
38
|
+
configurable: !0,
|
|
39
|
+
writable: !0,
|
|
40
|
+
value: "Hex.SizeExceedsPaddingSizeError"
|
|
41
|
+
});
|
|
42
|
+
}
|
|
3
43
|
}
|
|
4
44
|
export {
|
|
5
|
-
|
|
45
|
+
d as IntegerOutOfRangeError,
|
|
46
|
+
p as SizeExceedsPaddingSizeError,
|
|
47
|
+
m as fromNumber,
|
|
48
|
+
c as padLeft
|
|
6
49
|
};
|