@coinbase/cdp-core 0.0.80 → 0.0.82
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.native.js +15 -13
- package/dist/esm/index.native10.js +1 -1
- package/dist/esm/index.native11.js +1 -1
- package/dist/esm/index.native116.js +1 -1
- package/dist/esm/index.native117.js +1 -1
- package/dist/esm/index.native12.js +1 -1
- package/dist/esm/index.native13.js +1 -1
- package/dist/esm/index.native14.js +1 -1
- package/dist/esm/index.native16.js +1 -1
- package/dist/esm/index.native160.js +6 -32
- package/dist/esm/index.native161.js +32 -6
- package/dist/esm/index.native17.js +1 -1
- package/dist/esm/index.native18.js +1 -1
- package/dist/esm/index.native19.js +1 -1
- package/dist/esm/index.native20.js +1 -1
- package/dist/esm/index.native21.js +1 -1
- package/dist/esm/index.native22.js +1 -1
- package/dist/esm/index.native23.js +1 -1
- package/dist/esm/index.native24.js +1 -1
- package/dist/esm/index.native25.js +1 -1
- package/dist/esm/index.native26.js +1 -1
- package/dist/esm/index.native28.js +1 -1
- package/dist/esm/index.native29.js +1 -1
- package/dist/esm/index.native30.js +1 -1
- package/dist/esm/index.native31.js +1 -1
- package/dist/esm/index.native32.js +1 -1
- package/dist/esm/index.native33.js +1 -1
- package/dist/esm/index.native37.js +1 -1
- package/dist/esm/index.native39.js +1 -1
- package/dist/esm/index.native4.js +1 -1
- package/dist/esm/index.native46.js +27 -31
- package/dist/esm/index.native47.js +31 -27
- package/dist/esm/index.native49.js +1 -1
- package/dist/esm/index.native5.js +1 -1
- package/dist/esm/index.native50.js +1 -1
- package/dist/esm/index.native60.js +1 -1
- package/dist/esm/index.native74.js +1 -1
- package/dist/esm/index.native9.js +1 -1
- package/dist/esm/index.web.js +9 -7
- package/dist/esm/index.web10.js +2 -2
- package/dist/esm/index.web100.js +6 -127
- package/dist/esm/index.web101.js +40 -21
- package/dist/esm/index.web102.js +53 -10
- package/dist/esm/index.web103.js +125 -102
- package/dist/esm/index.web104.js +23 -6
- package/dist/esm/index.web105.js +13 -3
- package/dist/esm/index.web106.js +104 -14
- package/dist/esm/index.web107.js +6 -34
- package/dist/esm/index.web108.js +3 -79
- package/dist/esm/index.web109.js +15 -2
- package/dist/esm/index.web11.js +2 -2
- package/dist/esm/index.web110.js +35 -2
- package/dist/esm/index.web111.js +77 -11
- package/dist/esm/index.web112.js +2 -38
- package/dist/esm/index.web113.js +2 -7
- package/dist/esm/index.web114.js +10 -32
- package/dist/esm/index.web115.js +37 -8
- package/dist/esm/index.web116.js +5 -9
- package/dist/esm/index.web117.js +34 -11
- package/dist/esm/index.web118.js +8 -13
- package/dist/esm/index.web119.js +9 -17
- package/dist/esm/index.web12.js +2 -2
- package/dist/esm/index.web120.js +11 -5
- package/dist/esm/index.web121.js +14 -5
- package/dist/esm/index.web122.js +18 -10
- package/dist/esm/index.web123.js +8 -2
- package/dist/esm/index.web124.js +5 -66
- package/dist/esm/index.web125.js +10 -364
- package/dist/esm/index.web13.js +1 -1
- package/dist/esm/index.web131.js +5 -2
- package/dist/esm/index.web132.js +18 -4
- package/dist/esm/index.web133.js +7 -18
- package/dist/esm/index.web134.js +3 -7
- package/dist/esm/index.web135.js +19 -3
- package/dist/esm/index.web136.js +8 -19
- package/dist/esm/index.web137.js +7 -8
- package/dist/esm/index.web138.js +71 -7
- package/dist/esm/index.web139.js +17 -70
- package/dist/esm/index.web140.js +3 -18
- package/dist/esm/index.web141.js +4 -3
- package/dist/esm/index.web142.js +4 -4
- package/dist/esm/index.web143.js +4 -4
- package/dist/esm/index.web144.js +19 -4
- package/dist/esm/index.web145.js +48 -15
- package/dist/esm/index.web146.js +17 -52
- package/dist/esm/index.web147.js +23 -17
- package/dist/esm/index.web148.js +8 -23
- package/dist/esm/index.web149.js +33 -8
- package/dist/esm/index.web15.js +1 -1
- package/dist/esm/index.web150.js +7 -33
- package/dist/esm/index.web151.js +20 -7
- package/dist/esm/index.web152.js +4 -20
- package/dist/esm/index.web153.js +5 -21
- package/dist/esm/index.web154.js +48 -5
- package/dist/esm/index.web155.js +2 -48
- package/dist/esm/index.web156.js +18 -17
- package/dist/esm/index.web157.js +20 -80
- package/dist/esm/index.web158.js +79 -103
- package/dist/esm/index.web159.js +101 -30
- package/dist/esm/index.web16.js +1 -1
- package/dist/esm/index.web160.js +32 -6
- package/dist/esm/index.web161.js +6 -4
- package/dist/esm/index.web162.js +1 -1
- package/dist/esm/index.web169.js +2 -4
- package/dist/esm/index.web17.js +1 -1
- package/dist/esm/index.web170.js +108 -46
- package/dist/esm/index.web171.js +2 -8
- package/dist/esm/index.web172.js +4 -2
- package/dist/esm/index.web173.js +35 -374
- package/dist/esm/index.web174.js +2 -836
- package/dist/esm/index.web175.js +67 -36
- package/dist/esm/index.web176.js +35 -2
- package/dist/esm/index.web177.js +20 -69
- package/dist/esm/index.web178.js +7 -34
- package/dist/esm/index.web179.js +2 -21
- package/dist/esm/index.web18.js +1 -1
- package/dist/esm/index.web180.js +378 -5
- package/dist/esm/index.web181.js +836 -2
- package/dist/esm/index.web182.js +46 -108
- package/dist/esm/index.web183.js +5 -2
- package/dist/esm/index.web19.js +1 -1
- package/dist/esm/index.web192.js +2 -15
- package/dist/esm/index.web195.js +15 -2
- package/dist/esm/index.web2.js +2 -2
- package/dist/esm/index.web20.js +2 -2
- package/dist/esm/index.web21.js +2 -2
- package/dist/esm/index.web22.js +2 -2
- package/dist/esm/index.web23.js +2 -2
- package/dist/esm/index.web24.js +2 -2
- package/dist/esm/index.web25.js +2 -2
- package/dist/esm/index.web27.js +1 -1
- package/dist/esm/index.web28.js +2 -2
- package/dist/esm/index.web29.js +2 -2
- package/dist/esm/index.web3.js +1 -1
- package/dist/esm/index.web30.js +3 -3
- package/dist/esm/index.web31.js +2 -2
- package/dist/esm/index.web32.js +2 -2
- package/dist/esm/index.web36.js +1 -1
- package/dist/esm/index.web38.js +2 -2
- package/dist/esm/index.web47.js +1 -1
- package/dist/esm/index.web48.js +27 -31
- package/dist/esm/index.web49.js +32 -3
- package/dist/esm/index.web5.js +1 -1
- package/dist/esm/index.web50.js +3 -9
- package/dist/esm/index.web51.js +8 -64
- package/dist/esm/index.web52.js +47 -70
- package/dist/esm/index.web53.js +87 -23
- package/dist/esm/index.web54.js +23 -17
- package/dist/esm/index.web55.js +16 -26
- package/dist/esm/index.web60.js +12 -12
- package/dist/esm/index.web62.js +1 -1
- package/dist/esm/index.web67.js +2 -2
- package/dist/esm/index.web70.js +1 -1
- package/dist/esm/index.web74.js +1 -1
- package/dist/esm/index.web75.js +1 -1
- package/dist/esm/index.web79.js +3 -3
- package/dist/esm/index.web8.js +1 -1
- package/dist/esm/index.web80.js +12 -12
- package/dist/esm/index.web81.js +12 -12
- package/dist/esm/index.web82.js +2 -4
- package/dist/esm/index.web83.js +66 -2
- package/dist/esm/index.web84.js +364 -17
- package/dist/esm/index.web85.js +2 -46
- package/dist/esm/index.web86.js +2 -14
- package/dist/esm/index.web87.js +16 -54
- package/dist/esm/index.web88.js +45 -6
- package/dist/esm/index.web89.js +13 -21
- package/dist/esm/index.web9.js +7 -7
- package/dist/esm/index.web90.js +55 -11
- package/dist/esm/index.web91.js +6 -3
- package/dist/esm/index.web92.js +21 -3
- package/dist/esm/index.web93.js +11 -34
- package/dist/esm/index.web94.js +3 -12
- package/dist/esm/index.web95.js +3 -4
- package/dist/esm/index.web96.js +31 -25
- package/dist/esm/index.web97.js +12 -6
- package/dist/esm/index.web98.js +4 -42
- package/dist/esm/index.web99.js +27 -54
- package/dist/native/index.native.js +15 -13
- package/dist/native/index.native10.js +1 -1
- package/dist/native/index.native11.js +1 -1
- package/dist/native/index.native116.js +1 -1
- package/dist/native/index.native117.js +1 -1
- package/dist/native/index.native12.js +1 -1
- package/dist/native/index.native13.js +1 -1
- package/dist/native/index.native14.js +1 -1
- package/dist/native/index.native16.js +1 -1
- package/dist/native/index.native160.js +6 -32
- package/dist/native/index.native161.js +32 -6
- package/dist/native/index.native17.js +1 -1
- package/dist/native/index.native18.js +1 -1
- package/dist/native/index.native19.js +1 -1
- package/dist/native/index.native20.js +1 -1
- package/dist/native/index.native21.js +1 -1
- package/dist/native/index.native22.js +1 -1
- package/dist/native/index.native23.js +1 -1
- package/dist/native/index.native24.js +1 -1
- package/dist/native/index.native25.js +1 -1
- package/dist/native/index.native26.js +1 -1
- package/dist/native/index.native28.js +1 -1
- package/dist/native/index.native29.js +1 -1
- package/dist/native/index.native30.js +1 -1
- package/dist/native/index.native31.js +1 -1
- package/dist/native/index.native32.js +1 -1
- package/dist/native/index.native33.js +1 -1
- package/dist/native/index.native37.js +1 -1
- package/dist/native/index.native39.js +1 -1
- package/dist/native/index.native4.js +1 -1
- package/dist/native/index.native46.js +27 -31
- package/dist/native/index.native47.js +31 -27
- package/dist/native/index.native49.js +1 -1
- package/dist/native/index.native5.js +1 -1
- package/dist/native/index.native50.js +1 -1
- package/dist/native/index.native60.js +1 -1
- package/dist/native/index.native74.js +1 -1
- package/dist/native/index.native9.js +1 -1
- package/dist/native-types/index.d.ts +1 -0
- package/dist/native-types/index.native.d.ts +1 -0
- package/dist/native-types/index.web.d.ts +1 -0
- package/dist/native-types/version.d.ts +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.native.d.ts +1 -0
- package/dist/types/index.web.d.ts +1 -0
- package/dist/types/version.d.ts +1 -1
- package/dist/web/index.web.js +9 -7
- package/dist/web/index.web10.js +2 -2
- package/dist/web/index.web100.js +6 -127
- package/dist/web/index.web101.js +40 -21
- package/dist/web/index.web102.js +53 -10
- package/dist/web/index.web103.js +125 -102
- package/dist/web/index.web104.js +23 -6
- package/dist/web/index.web105.js +13 -3
- package/dist/web/index.web106.js +104 -14
- package/dist/web/index.web107.js +6 -34
- package/dist/web/index.web108.js +3 -79
- package/dist/web/index.web109.js +15 -2
- package/dist/web/index.web11.js +2 -2
- package/dist/web/index.web110.js +35 -2
- package/dist/web/index.web111.js +77 -11
- package/dist/web/index.web112.js +2 -38
- package/dist/web/index.web113.js +2 -7
- package/dist/web/index.web114.js +10 -32
- package/dist/web/index.web115.js +37 -8
- package/dist/web/index.web116.js +5 -9
- package/dist/web/index.web117.js +34 -11
- package/dist/web/index.web118.js +8 -13
- package/dist/web/index.web119.js +9 -17
- package/dist/web/index.web12.js +2 -2
- package/dist/web/index.web120.js +11 -5
- package/dist/web/index.web121.js +14 -5
- package/dist/web/index.web122.js +18 -10
- package/dist/web/index.web123.js +8 -2
- package/dist/web/index.web124.js +5 -66
- package/dist/web/index.web125.js +10 -364
- package/dist/web/index.web13.js +1 -1
- package/dist/web/index.web131.js +5 -2
- package/dist/web/index.web132.js +18 -4
- package/dist/web/index.web133.js +7 -18
- package/dist/web/index.web134.js +3 -7
- package/dist/web/index.web135.js +19 -3
- package/dist/web/index.web136.js +8 -19
- package/dist/web/index.web137.js +7 -8
- package/dist/web/index.web138.js +71 -7
- package/dist/web/index.web139.js +17 -70
- package/dist/web/index.web140.js +3 -18
- package/dist/web/index.web141.js +4 -3
- package/dist/web/index.web142.js +4 -4
- package/dist/web/index.web143.js +4 -4
- package/dist/web/index.web144.js +19 -4
- package/dist/web/index.web145.js +48 -15
- package/dist/web/index.web146.js +17 -52
- package/dist/web/index.web147.js +23 -17
- package/dist/web/index.web148.js +8 -23
- package/dist/web/index.web149.js +33 -8
- package/dist/web/index.web15.js +1 -1
- package/dist/web/index.web150.js +7 -33
- package/dist/web/index.web151.js +20 -7
- package/dist/web/index.web152.js +4 -20
- package/dist/web/index.web153.js +5 -21
- package/dist/web/index.web154.js +48 -5
- package/dist/web/index.web155.js +2 -48
- package/dist/web/index.web156.js +18 -17
- package/dist/web/index.web157.js +20 -80
- package/dist/web/index.web158.js +79 -103
- package/dist/web/index.web159.js +101 -30
- package/dist/web/index.web16.js +1 -1
- package/dist/web/index.web160.js +32 -6
- package/dist/web/index.web161.js +6 -4
- package/dist/web/index.web162.js +1 -1
- package/dist/web/index.web169.js +2 -4
- package/dist/web/index.web17.js +1 -1
- package/dist/web/index.web170.js +108 -46
- package/dist/web/index.web171.js +2 -8
- package/dist/web/index.web172.js +4 -2
- package/dist/web/index.web173.js +35 -374
- package/dist/web/index.web174.js +2 -836
- package/dist/web/index.web175.js +67 -36
- package/dist/web/index.web176.js +35 -2
- package/dist/web/index.web177.js +20 -69
- package/dist/web/index.web178.js +7 -34
- package/dist/web/index.web179.js +2 -21
- package/dist/web/index.web18.js +1 -1
- package/dist/web/index.web180.js +378 -5
- package/dist/web/index.web181.js +836 -2
- package/dist/web/index.web182.js +46 -108
- package/dist/web/index.web183.js +5 -2
- package/dist/web/index.web19.js +1 -1
- package/dist/web/index.web192.js +2 -15
- package/dist/web/index.web195.js +15 -2
- package/dist/web/index.web2.js +2 -2
- package/dist/web/index.web20.js +2 -2
- package/dist/web/index.web21.js +2 -2
- package/dist/web/index.web22.js +2 -2
- package/dist/web/index.web23.js +2 -2
- package/dist/web/index.web24.js +2 -2
- package/dist/web/index.web25.js +2 -2
- package/dist/web/index.web27.js +1 -1
- package/dist/web/index.web28.js +2 -2
- package/dist/web/index.web29.js +2 -2
- package/dist/web/index.web3.js +1 -1
- package/dist/web/index.web30.js +3 -3
- package/dist/web/index.web31.js +2 -2
- package/dist/web/index.web32.js +2 -2
- package/dist/web/index.web36.js +1 -1
- package/dist/web/index.web38.js +2 -2
- package/dist/web/index.web47.js +1 -1
- package/dist/web/index.web48.js +27 -31
- package/dist/web/index.web49.js +32 -3
- package/dist/web/index.web5.js +1 -1
- package/dist/web/index.web50.js +3 -9
- package/dist/web/index.web51.js +8 -64
- package/dist/web/index.web52.js +47 -70
- package/dist/web/index.web53.js +87 -23
- package/dist/web/index.web54.js +23 -17
- package/dist/web/index.web55.js +16 -26
- package/dist/web/index.web60.js +12 -12
- package/dist/web/index.web62.js +1 -1
- package/dist/web/index.web67.js +2 -2
- package/dist/web/index.web70.js +1 -1
- package/dist/web/index.web74.js +1 -1
- package/dist/web/index.web75.js +1 -1
- package/dist/web/index.web79.js +3 -3
- package/dist/web/index.web8.js +1 -1
- package/dist/web/index.web80.js +12 -12
- package/dist/web/index.web81.js +12 -12
- package/dist/web/index.web82.js +2 -4
- package/dist/web/index.web83.js +66 -2
- package/dist/web/index.web84.js +364 -17
- package/dist/web/index.web85.js +2 -46
- package/dist/web/index.web86.js +2 -14
- package/dist/web/index.web87.js +16 -54
- package/dist/web/index.web88.js +45 -6
- package/dist/web/index.web89.js +13 -21
- package/dist/web/index.web9.js +7 -7
- package/dist/web/index.web90.js +55 -11
- package/dist/web/index.web91.js +6 -3
- package/dist/web/index.web92.js +21 -3
- package/dist/web/index.web93.js +11 -34
- package/dist/web/index.web94.js +3 -12
- package/dist/web/index.web95.js +3 -4
- package/dist/web/index.web96.js +31 -25
- package/dist/web/index.web97.js +12 -6
- package/dist/web/index.web98.js +4 -42
- package/dist/web/index.web99.js +27 -54
- package/dist/web-types/index.d.ts +1 -0
- package/dist/web-types/index.native.d.ts +1 -0
- package/dist/web-types/index.web.d.ts +1 -0
- package/dist/web-types/version.d.ts +1 -1
- package/package.json +2 -2
package/dist/esm/index.web90.js
CHANGED
|
@@ -1,14 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { BaseError as g } from "./index.web102.js";
|
|
2
|
+
import { isHex as x } from "./index.web95.js";
|
|
3
|
+
import { pad as s } from "./index.web96.js";
|
|
4
|
+
import { assertSize as u } from "./index.web104.js";
|
|
5
|
+
import { numberToHex as h } from "./index.web88.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);
|
|
9
|
+
}
|
|
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;
|
|
13
|
+
}
|
|
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);
|
|
29
|
+
}
|
|
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;
|
|
43
|
+
}
|
|
44
|
+
function T(e, n) {
|
|
45
|
+
const r = h(e, n);
|
|
46
|
+
return y(r);
|
|
47
|
+
}
|
|
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;
|
|
10
51
|
}
|
|
11
52
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
53
|
+
B as boolToBytes,
|
|
54
|
+
y as hexToBytes,
|
|
55
|
+
T as numberToBytes,
|
|
56
|
+
l as stringToBytes,
|
|
57
|
+
F as toBytes
|
|
14
58
|
};
|
package/dist/esm/index.web91.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { keccak_256 as o } from "./index.web106.js";
|
|
2
|
+
import { isHex as r } from "./index.web95.js";
|
|
3
|
+
import { toBytes as c } from "./index.web90.js";
|
|
4
|
+
function k(t, e) {
|
|
5
|
+
return o(r(t, { strict: !1 }) ? c(t) : t);
|
|
3
6
|
}
|
|
4
7
|
export {
|
|
5
|
-
|
|
8
|
+
k as keccak256
|
|
6
9
|
};
|
package/dist/esm/index.web92.js
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
class r extends Map {
|
|
2
|
+
constructor(e) {
|
|
3
|
+
super(), Object.defineProperty(this, "maxSize", {
|
|
4
|
+
enumerable: !0,
|
|
5
|
+
configurable: !0,
|
|
6
|
+
writable: !0,
|
|
7
|
+
value: void 0
|
|
8
|
+
}), this.maxSize = e;
|
|
9
|
+
}
|
|
10
|
+
get(e) {
|
|
11
|
+
const t = super.get(e);
|
|
12
|
+
return super.has(e) && t !== void 0 && (this.delete(e), super.set(e, t)), t;
|
|
13
|
+
}
|
|
14
|
+
set(e, t) {
|
|
15
|
+
if (super.set(e, t), this.maxSize && this.size > this.maxSize) {
|
|
16
|
+
const s = this.keys().next().value;
|
|
17
|
+
s && this.delete(s);
|
|
18
|
+
}
|
|
19
|
+
return this;
|
|
20
|
+
}
|
|
3
21
|
}
|
|
4
22
|
export {
|
|
5
|
-
|
|
23
|
+
r as LruMap
|
|
6
24
|
};
|
package/dist/esm/index.web93.js
CHANGED
|
@@ -1,37 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
if (
|
|
7
|
-
return
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
throw new d({
|
|
11
|
-
size: Math.ceil(e.length / 2),
|
|
12
|
-
targetSize: t,
|
|
13
|
-
type: "hex"
|
|
14
|
-
});
|
|
15
|
-
return `0x${e[r === "right" ? "padEnd" : "padStart"](t * 2, "0")}`;
|
|
16
|
-
}
|
|
17
|
-
function i(n, { dir: r, size: t = 32 } = {}) {
|
|
18
|
-
if (t === null)
|
|
19
|
-
return n;
|
|
20
|
-
if (n.length > t)
|
|
21
|
-
throw new d({
|
|
22
|
-
size: n.length,
|
|
23
|
-
targetSize: t,
|
|
24
|
-
type: "bytes"
|
|
25
|
-
});
|
|
26
|
-
const e = new Uint8Array(t);
|
|
27
|
-
for (let a = 0; a < t; a++) {
|
|
28
|
-
const o = r === "right";
|
|
29
|
-
e[o ? a : t - a - 1] = n[o ? a : n.length - a - 1];
|
|
30
|
-
}
|
|
31
|
-
return e;
|
|
1
|
+
import { LruMap as u } from "./index.web92.js";
|
|
2
|
+
import { checksumAddress as c } from "./index.web89.js";
|
|
3
|
+
const i = /^0x[a-fA-F0-9]{40}$/, r = /* @__PURE__ */ new u(8192);
|
|
4
|
+
function h(t, s) {
|
|
5
|
+
const { strict: n = !0 } = s ?? {}, e = `${t}.${n}`;
|
|
6
|
+
if (r.has(e))
|
|
7
|
+
return r.get(e);
|
|
8
|
+
const o = i.test(t) ? t.toLowerCase() === t ? !0 : n ? c(t) === t : !0 : !1;
|
|
9
|
+
return r.set(e, o), o;
|
|
32
10
|
}
|
|
33
11
|
export {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
p as padHex
|
|
12
|
+
h as isAddress,
|
|
13
|
+
r as isAddressCache
|
|
37
14
|
};
|
package/dist/esm/index.web94.js
CHANGED
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
constructor({ offset: r, position: s, size: e }) {
|
|
4
|
-
super(`Slice ${s === "start" ? "starting" : "ending"} at offset "${r}" is out-of-bounds (size: ${e}).`, { name: "SliceOffsetOutOfBoundsError" });
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
class n extends o {
|
|
8
|
-
constructor({ size: r, targetSize: s, type: e }) {
|
|
9
|
-
super(`${e.charAt(0).toUpperCase()}${e.slice(1).toLowerCase()} size (${r}) exceeds padding size (${s}).`, { name: "SizeExceedsPaddingSizeError" });
|
|
10
|
-
}
|
|
1
|
+
function n(e) {
|
|
2
|
+
return `0x${e.reduce((c, r) => c + r.replace("0x", ""), "")}`;
|
|
11
3
|
}
|
|
12
4
|
export {
|
|
13
|
-
n as
|
|
14
|
-
d as SliceOffsetOutOfBoundsError
|
|
5
|
+
n as concatHex
|
|
15
6
|
};
|
package/dist/esm/index.web95.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return r(t, { strict: !1 }) ? Math.ceil((t.length - 2) / 2) : t.length;
|
|
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");
|
|
4
3
|
}
|
|
5
4
|
export {
|
|
6
|
-
|
|
5
|
+
e as isHex
|
|
7
6
|
};
|
package/dist/esm/index.web96.js
CHANGED
|
@@ -1,31 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
function O(e, f, i, { strict: o } = {}) {
|
|
5
|
-
return c(e, { strict: !1 }) ? l(e, f, i, {
|
|
6
|
-
strict: o
|
|
7
|
-
}) : u(e, f, i, {
|
|
8
|
-
strict: o
|
|
9
|
-
});
|
|
1
|
+
import { SizeExceedsPaddingSizeError as d } from "./index.web97.js";
|
|
2
|
+
function f(n, { dir: r, size: t = 32 } = {}) {
|
|
3
|
+
return typeof n == "string" ? p(n, { dir: r, size: t }) : i(n, { dir: r, size: t });
|
|
10
4
|
}
|
|
11
|
-
function
|
|
12
|
-
if (
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
function p(n, { dir: r, size: t = 32 } = {}) {
|
|
6
|
+
if (t === null)
|
|
7
|
+
return n;
|
|
8
|
+
const e = n.replace("0x", "");
|
|
9
|
+
if (e.length > t * 2)
|
|
10
|
+
throw new d({
|
|
11
|
+
size: Math.ceil(e.length / 2),
|
|
12
|
+
targetSize: t,
|
|
13
|
+
type: "hex"
|
|
17
14
|
});
|
|
15
|
+
return `0x${e[r === "right" ? "padEnd" : "padStart"](t * 2, "0")}`;
|
|
18
16
|
}
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
function i(n, { dir: r, size: t = 32 } = {}) {
|
|
18
|
+
if (t === null)
|
|
19
|
+
return n;
|
|
20
|
+
if (n.length > t)
|
|
21
|
+
throw new d({
|
|
22
|
+
size: n.length,
|
|
23
|
+
targetSize: t,
|
|
24
|
+
type: "bytes"
|
|
25
|
+
});
|
|
26
|
+
const e = new Uint8Array(t);
|
|
27
|
+
for (let a = 0; a < t; a++) {
|
|
28
|
+
const o = r === "right";
|
|
29
|
+
e[o ? a : t - a - 1] = n[o ? a : n.length - a - 1];
|
|
30
|
+
}
|
|
31
|
+
return e;
|
|
26
32
|
}
|
|
27
33
|
export {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
34
|
+
f as pad,
|
|
35
|
+
i as padBytes,
|
|
36
|
+
p as padHex
|
|
31
37
|
};
|
package/dist/esm/index.web97.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { BaseError as o } from "./index.web102.js";
|
|
2
|
+
class d extends o {
|
|
3
|
+
constructor({ offset: r, position: s, size: e }) {
|
|
4
|
+
super(`Slice ${s === "start" ? "starting" : "ending"} at offset "${r}" is out-of-bounds (size: ${e}).`, { name: "SliceOffsetOutOfBoundsError" });
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
class n extends o {
|
|
8
|
+
constructor({ size: r, targetSize: s, type: e }) {
|
|
9
|
+
super(`${e.charAt(0).toUpperCase()}${e.slice(1).toLowerCase()} size (${r}) exceeds padding size (${s}).`, { name: "SizeExceedsPaddingSizeError" });
|
|
10
|
+
}
|
|
6
11
|
}
|
|
7
12
|
export {
|
|
8
|
-
|
|
13
|
+
n as SizeExceedsPaddingSizeError,
|
|
14
|
+
d as SliceOffsetOutOfBoundsError
|
|
9
15
|
};
|
package/dist/esm/index.web98.js
CHANGED
|
@@ -1,45 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { bytesToHex as u } from "./index.web85.js";
|
|
5
|
-
function m(n, e = "hex") {
|
|
6
|
-
const i = s(n), h = r(new Uint8Array(i.length));
|
|
7
|
-
return i.encode(h), e === "hex" ? u(h.bytes) : h.bytes;
|
|
8
|
-
}
|
|
9
|
-
function s(n) {
|
|
10
|
-
return Array.isArray(n) ? p(n.map((e) => s(e))) : y(n);
|
|
11
|
-
}
|
|
12
|
-
function p(n) {
|
|
13
|
-
const e = n.reduce((t, f) => t + f.length, 0), i = o(e);
|
|
14
|
-
return {
|
|
15
|
-
length: e <= 55 ? 1 + e : 1 + i + e,
|
|
16
|
-
encode(t) {
|
|
17
|
-
e <= 55 ? t.pushByte(192 + e) : (t.pushByte(247 + i), i === 1 ? t.pushUint8(e) : i === 2 ? t.pushUint16(e) : i === 3 ? t.pushUint24(e) : t.pushUint32(e));
|
|
18
|
-
for (const { encode: f } of n)
|
|
19
|
-
f(t);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
function y(n) {
|
|
24
|
-
const e = typeof n == "string" ? g(n) : n, i = o(e.length);
|
|
25
|
-
return {
|
|
26
|
-
length: e.length === 1 && e[0] < 128 ? 1 : e.length <= 55 ? 1 + e.length : 1 + i + e.length,
|
|
27
|
-
encode(t) {
|
|
28
|
-
e.length === 1 && e[0] < 128 ? t.pushBytes(e) : e.length <= 55 ? (t.pushByte(128 + e.length), t.pushBytes(e)) : (t.pushByte(183 + i), i === 1 ? t.pushUint8(e.length) : i === 2 ? t.pushUint16(e.length) : i === 3 ? t.pushUint24(e.length) : t.pushUint32(e.length), t.pushBytes(e));
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
function o(n) {
|
|
33
|
-
if (n < 2 ** 8)
|
|
34
|
-
return 1;
|
|
35
|
-
if (n < 2 ** 16)
|
|
36
|
-
return 2;
|
|
37
|
-
if (n < 2 ** 24)
|
|
38
|
-
return 3;
|
|
39
|
-
if (n < 2 ** 32)
|
|
40
|
-
return 4;
|
|
41
|
-
throw new l("Length is too large.");
|
|
1
|
+
import { isHex as r } from "./index.web95.js";
|
|
2
|
+
function i(t) {
|
|
3
|
+
return r(t, { strict: !1 }) ? Math.ceil((t.length - 2) / 2) : t.length;
|
|
42
4
|
}
|
|
43
5
|
export {
|
|
44
|
-
|
|
6
|
+
i as size
|
|
45
7
|
};
|
package/dist/esm/index.web99.js
CHANGED
|
@@ -1,58 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}), Object.defineProperty(this, "docsPath", {
|
|
23
|
-
enumerable: !0,
|
|
24
|
-
configurable: !0,
|
|
25
|
-
writable: !0,
|
|
26
|
-
value: void 0
|
|
27
|
-
}), Object.defineProperty(this, "metaMessages", {
|
|
28
|
-
enumerable: !0,
|
|
29
|
-
configurable: !0,
|
|
30
|
-
writable: !0,
|
|
31
|
-
value: void 0
|
|
32
|
-
}), Object.defineProperty(this, "shortMessage", {
|
|
33
|
-
enumerable: !0,
|
|
34
|
-
configurable: !0,
|
|
35
|
-
writable: !0,
|
|
36
|
-
value: void 0
|
|
37
|
-
}), Object.defineProperty(this, "version", {
|
|
38
|
-
enumerable: !0,
|
|
39
|
-
configurable: !0,
|
|
40
|
-
writable: !0,
|
|
41
|
-
value: void 0
|
|
42
|
-
}), Object.defineProperty(this, "name", {
|
|
43
|
-
enumerable: !0,
|
|
44
|
-
configurable: !0,
|
|
45
|
-
writable: !0,
|
|
46
|
-
value: "BaseError"
|
|
47
|
-
}), this.details = i, this.docsPath = n, this.metaMessages = e.metaMessages, this.name = e.name ?? this.name, this.shortMessage = t, this.version = o;
|
|
48
|
-
}
|
|
49
|
-
walk(t) {
|
|
50
|
-
return c(this, t);
|
|
51
|
-
}
|
|
1
|
+
import { SliceOffsetOutOfBoundsError as n } from "./index.web97.js";
|
|
2
|
+
import { isHex as c } from "./index.web95.js";
|
|
3
|
+
import { size as s } from "./index.web98.js";
|
|
4
|
+
function O(e, f, i, { strict: o } = {}) {
|
|
5
|
+
return c(e, { strict: !1 }) ? l(e, f, i, {
|
|
6
|
+
strict: o
|
|
7
|
+
}) : u(e, f, i, {
|
|
8
|
+
strict: o
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function t(e, f, i) {
|
|
12
|
+
if (s(e) !== i - f)
|
|
13
|
+
throw new n({
|
|
14
|
+
offset: i,
|
|
15
|
+
position: "end",
|
|
16
|
+
size: s(e)
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function u(e, f, i, { strict: o } = {}) {
|
|
20
|
+
const r = e.slice(f, i);
|
|
21
|
+
return o && t(r, f, i), r;
|
|
52
22
|
}
|
|
53
|
-
function
|
|
54
|
-
|
|
23
|
+
function l(e, f, i, { strict: o } = {}) {
|
|
24
|
+
const r = `0x${e.replace("0x", "").slice(f * 2, i * 2)}`;
|
|
25
|
+
return o && t(r, f, i), r;
|
|
55
26
|
}
|
|
56
27
|
export {
|
|
57
|
-
|
|
28
|
+
O as slice,
|
|
29
|
+
u as sliceBytes,
|
|
30
|
+
l as sliceHex
|
|
58
31
|
};
|
|
@@ -6,7 +6,7 @@ import { nativeSecureStorage as t } from "./index.native6.js";
|
|
|
6
6
|
import { nativeStorage as n } from "./index.native7.js";
|
|
7
7
|
import { setPlatformServices as i } from "./index.native8.js";
|
|
8
8
|
import { VERSION as a } from "./index.native9.js";
|
|
9
|
-
import { authenticateWithJWT as A, exportEvmAccount as h, exportSolanaAccount as v, getAccessToken as T, getAccessTokenExpiration as M, getCurrentUser as O, getUserOperation as P, initialize as
|
|
9
|
+
import { authenticateWithJWT as A, exportEvmAccount as h, exportSolanaAccount as v, getAccessToken as T, getAccessTokenExpiration as M, getCurrentUser as O, getUserOperation as P, initialize as C, isSignedIn as y, onAuthStateChange as I, onOAuthStateChange as k, sendEvmTransaction as U, sendSolanaTransaction as R, sendUserOperation as W, signEvmHash as N, signEvmMessage as V, signEvmTransaction as D, signEvmTypedData as _, signInWithEmail as b, signInWithOAuth as F, signInWithSms as w, signOut as B, signSolanaMessage as H, signSolanaTransaction as q, verifyEmailOTP as z, verifyOAuth as G, verifySmsOTP as J } from "./index.native10.js";
|
|
10
10
|
import { createSpendPermission as X } from "./index.native11.js";
|
|
11
11
|
import { listSpendPermissions as K } from "./index.native12.js";
|
|
12
12
|
import { APIError as Y, ErrorType as Z, HttpErrorType as $, OAuth2ProviderType as rr, SendEvmTransactionWithEndUserAccountBodyNetwork as or, SendSolanaTransactionWithEndUserAccountBodyNetwork as er } from "@coinbase/cdp-api-client";
|
|
@@ -15,13 +15,13 @@ import { getCurrentUserSync as ar } from "./index.native14.js";
|
|
|
15
15
|
import { fetchWithX402 as sr } from "./index.native15.js";
|
|
16
16
|
import { linkGoogle as pr } from "./index.native16.js";
|
|
17
17
|
import { linkSms as Er } from "./index.native17.js";
|
|
18
|
-
import { linkEmail as
|
|
19
|
-
import { linkOAuth as
|
|
18
|
+
import { linkEmail as lr } from "./index.native18.js";
|
|
19
|
+
import { linkOAuth as gr } from "./index.native19.js";
|
|
20
20
|
import { linkApple as Sr } from "./index.native20.js";
|
|
21
21
|
import { createEvmEoaAccount as hr } from "./index.native21.js";
|
|
22
22
|
import { createEvmSmartAccount as Tr } from "./index.native22.js";
|
|
23
23
|
import { createSolanaAccount as Or } from "./index.native23.js";
|
|
24
|
-
import { sendEvmEoaUsdc as
|
|
24
|
+
import { sendEvmEoaUsdc as Cr } from "./index.native24.js";
|
|
25
25
|
import { sendEvmSmartAccountUsdc as Ir } from "./index.native25.js";
|
|
26
26
|
import { sendSolanaUsdc as Ur } from "./index.native26.js";
|
|
27
27
|
import { sendUsdc as Wr } from "./index.native27.js";
|
|
@@ -39,12 +39,13 @@ import { MFA_PROTECTED_ACTIONS as oo, MFA_PROTECTED_FUNCTIONS as eo, isMfaProtec
|
|
|
39
39
|
import { AuthManager as io } from "./index.native39.js";
|
|
40
40
|
import { CustomAuthError as mo } from "./index.native40.js";
|
|
41
41
|
import { toViemAccount as fo } from "./index.native41.js";
|
|
42
|
-
import { InputValidationError as co, InternalError as Eo, MfaError as
|
|
42
|
+
import { InputValidationError as co, InternalError as Eo, MfaError as xo, ModuleResolutionError as lo, ValidationError as go } from "./index.native42.js";
|
|
43
43
|
import { validatePhoneNumber as So } from "./index.native43.js";
|
|
44
44
|
import { createCDPEmbeddedWallet as ho } from "./index.native44.js";
|
|
45
45
|
import { EIP1193ProviderError as To, STANDARD_ERROR_CODES as Mo } from "./index.native45.js";
|
|
46
46
|
import "viem";
|
|
47
47
|
import "zustand";
|
|
48
|
+
import { getConfig as Po } from "./index.native46.js";
|
|
48
49
|
r.registerPackageVersion("core", a);
|
|
49
50
|
i({
|
|
50
51
|
crypto: o,
|
|
@@ -63,13 +64,13 @@ export {
|
|
|
63
64
|
Eo as InternalError,
|
|
64
65
|
oo as MFA_PROTECTED_ACTIONS,
|
|
65
66
|
eo as MFA_PROTECTED_FUNCTIONS,
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
xo as MfaError,
|
|
68
|
+
lo as ModuleResolutionError,
|
|
68
69
|
rr as OAuth2ProviderType,
|
|
69
70
|
Mo as STANDARD_ERROR_CODES,
|
|
70
71
|
or as SendEvmTransactionWithEndUserAccountBodyNetwork,
|
|
71
72
|
er as SendSolanaTransactionWithEndUserAccountBodyNetwork,
|
|
72
|
-
|
|
73
|
+
go as ValidationError,
|
|
73
74
|
A as authenticateWithJWT,
|
|
74
75
|
Lr as cancelMfaVerification,
|
|
75
76
|
ho as createCDPEmbeddedWallet,
|
|
@@ -82,22 +83,23 @@ export {
|
|
|
82
83
|
sr as fetchWithX402,
|
|
83
84
|
T as getAccessToken,
|
|
84
85
|
M as getAccessTokenExpiration,
|
|
86
|
+
Po as getConfig,
|
|
85
87
|
O as getCurrentUser,
|
|
86
88
|
ar as getCurrentUserSync,
|
|
87
89
|
Qr as getEnrolledMfaMethods,
|
|
88
90
|
Vr as getMfaConfig,
|
|
89
91
|
P as getUserOperation,
|
|
90
|
-
|
|
92
|
+
C as initialize,
|
|
91
93
|
Fr as initiateMfaEnrollment,
|
|
92
94
|
qr as initiateMfaVerification,
|
|
93
95
|
Yr as isEnrolledInMfa,
|
|
94
96
|
to as isMfaProtectedAction,
|
|
95
97
|
$r as isMfaRequired,
|
|
96
|
-
|
|
98
|
+
y as isSignedIn,
|
|
97
99
|
Sr as linkApple,
|
|
98
|
-
|
|
100
|
+
lr as linkEmail,
|
|
99
101
|
pr as linkGoogle,
|
|
100
|
-
|
|
102
|
+
gr as linkOAuth,
|
|
101
103
|
Er as linkSms,
|
|
102
104
|
K as listSpendPermissions,
|
|
103
105
|
I as onAuthStateChange,
|
|
@@ -105,7 +107,7 @@ export {
|
|
|
105
107
|
_r as recordMfaEnrollmentPrompted,
|
|
106
108
|
jr as registerMfaListener,
|
|
107
109
|
nr as revokeSpendPermission,
|
|
108
|
-
|
|
110
|
+
Cr as sendEvmEoaUsdc,
|
|
109
111
|
Ir as sendEvmSmartAccountUsdc,
|
|
110
112
|
U as sendEvmTransaction,
|
|
111
113
|
R as sendSolanaTransaction,
|
|
@@ -11,7 +11,7 @@ import { toAuthState as h } from "./index.native52.js";
|
|
|
11
11
|
import { withAuth as d } from "./index.native53.js";
|
|
12
12
|
import { CustomAuthError as y } from "./index.native40.js";
|
|
13
13
|
import { withMfa as m } from "./index.native37.js";
|
|
14
|
-
import { getConfig as a, setCoreAuthManager as _, setCoreOAuthManager as U, getCoreAuthManager as o, getCoreOAuthManager as te, setConfig as ne } from "./index.
|
|
14
|
+
import { getConfig as a, setCoreAuthManager as _, setCoreOAuthManager as U, getCoreAuthManager as o, getCoreOAuthManager as te, setConfig as ne } from "./index.native46.js";
|
|
15
15
|
import { MockAuthManager as re } from "./index.native54.js";
|
|
16
16
|
import { MockOAuthManager as se } from "./index.native55.js";
|
|
17
17
|
import { mockUser as w } from "./index.native56.js";
|
|
@@ -3,7 +3,7 @@ import { Analytics as o } from "./index.native2.js";
|
|
|
3
3
|
import "./index.native3.js";
|
|
4
4
|
import { withAuth as i } from "./index.native53.js";
|
|
5
5
|
import { toSpendPermission as m } from "./index.native59.js";
|
|
6
|
-
import { getConfig as t, getCoreAuthManager as c } from "./index.
|
|
6
|
+
import { getConfig as t, getCoreAuthManager as c } from "./index.native46.js";
|
|
7
7
|
const h = async (e) => (o.sendActionCallEvent({ name: "create_spend_permission" }), t().useMock ? {
|
|
8
8
|
userOperationHash: "0x1234567890123456789012345678901234567890123456789012345678901234"
|
|
9
9
|
} : i(e, c(), async ({ user: n, walletSecretId: s }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { commitmentToVersionedHash as i } from "./index.
|
|
1
|
+
import { commitmentToVersionedHash as i } from "./index.native160.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)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { blobsToCommitments as f } from "./index.native114.js";
|
|
2
2
|
import { blobsToProofs as l } from "./index.native115.js";
|
|
3
|
-
import { toBlobs as p } from "./index.
|
|
3
|
+
import { toBlobs as p } from "./index.native161.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++)
|
|
@@ -2,7 +2,7 @@ import { listSpendPermissionsWithEndUserAccount as a } from "@coinbase/cdp-api-c
|
|
|
2
2
|
import { Analytics as i } from "./index.native2.js";
|
|
3
3
|
import "./index.native3.js";
|
|
4
4
|
import { withAuth as o } from "./index.native53.js";
|
|
5
|
-
import { getConfig as r, getCoreAuthManager as m } from "./index.
|
|
5
|
+
import { getConfig as r, getCoreAuthManager as m } from "./index.native46.js";
|
|
6
6
|
const k = async (e) => (i.sendActionCallEvent({ name: "list_spend_permissions" }), r().useMock ? {
|
|
7
7
|
spendPermissions: [
|
|
8
8
|
{
|
|
@@ -2,7 +2,7 @@ import { revokeSpendPermissionWithEndUserAccount as a } from "@coinbase/cdp-api-
|
|
|
2
2
|
import { Analytics as n } from "./index.native2.js";
|
|
3
3
|
import "./index.native3.js";
|
|
4
4
|
import { withAuth as o } from "./index.native53.js";
|
|
5
|
-
import { getConfig as r, getCoreAuthManager as m } from "./index.
|
|
5
|
+
import { getConfig as r, getCoreAuthManager as m } from "./index.native46.js";
|
|
6
6
|
const f = async (e) => (n.sendActionCallEvent({ name: "revoke_spend_permission" }), r().useMock ? {
|
|
7
7
|
userOperationHash: "0x1234567890123456789012345678901234567890123456789012345678901234"
|
|
8
8
|
} : o(e, m(), async ({ user: s, walletSecretId: t }) => ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Analytics as r } from "./index.native2.js";
|
|
2
2
|
import "./index.native3.js";
|
|
3
|
-
import { getCoreAuthManager as t } from "./index.
|
|
3
|
+
import { getCoreAuthManager as t } from "./index.native46.js";
|
|
4
4
|
import "@coinbase/cdp-api-client";
|
|
5
5
|
import "viem";
|
|
6
6
|
const s = () => (r.sendActionCallEvent({ name: "get_current_user_sync" }), t().getUser());
|
|
@@ -2,7 +2,7 @@ import { initiateAuthentication as o } from "@coinbase/cdp-api-client";
|
|
|
2
2
|
import { Analytics as e } from "./index.native2.js";
|
|
3
3
|
import "./index.native3.js";
|
|
4
4
|
import { getPlatformOAuth as i } from "./index.native8.js";
|
|
5
|
-
import { getCoreAuthManager as n, getConfig as r } from "./index.
|
|
5
|
+
import { getCoreAuthManager as n, getConfig as r } from "./index.native46.js";
|
|
6
6
|
async function u() {
|
|
7
7
|
if (e.sendActionCallEvent({ name: "link_google" }), !await n().isSignedIn())
|
|
8
8
|
throw new Error("User must be signed in to link a Google account");
|
|
@@ -1,35 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { bytesToHex as d } from "./index.native84.js";
|
|
7
|
-
function S(e) {
|
|
8
|
-
const m = e.to ?? (typeof e.data == "string" ? "hex" : "bytes"), i = typeof e.data == "string" ? x(e.data) : e.data, o = u(i);
|
|
9
|
-
if (!o)
|
|
10
|
-
throw new c();
|
|
11
|
-
if (o > y)
|
|
12
|
-
throw new h({
|
|
13
|
-
maxSize: y,
|
|
14
|
-
size: o
|
|
15
|
-
});
|
|
16
|
-
const s = [];
|
|
17
|
-
let n = !0, r = 0;
|
|
18
|
-
for (; n; ) {
|
|
19
|
-
const t = B(new Uint8Array(a));
|
|
20
|
-
let l = 0;
|
|
21
|
-
for (; l < f; ) {
|
|
22
|
-
const b = i.slice(r, r + (p - 1));
|
|
23
|
-
if (t.pushByte(0), t.pushBytes(b), b.length < 31) {
|
|
24
|
-
t.pushByte(128), n = !1;
|
|
25
|
-
break;
|
|
26
|
-
}
|
|
27
|
-
l++, r += 31;
|
|
28
|
-
}
|
|
29
|
-
s.push(t);
|
|
30
|
-
}
|
|
31
|
-
return m === "bytes" ? s.map((t) => t.bytes) : s.map((t) => d(t.bytes));
|
|
1
|
+
import { bytesToHex as i } from "./index.native84.js";
|
|
2
|
+
import { sha256 as m } from "./index.native103.js";
|
|
3
|
+
function f(t) {
|
|
4
|
+
const { commitment: e, version: s = 1 } = t, n = t.to ?? (typeof e == "string" ? "hex" : "bytes"), o = m(e);
|
|
5
|
+
return o.set([s], 0), n === "bytes" ? o : i(o);
|
|
32
6
|
}
|
|
33
7
|
export {
|
|
34
|
-
|
|
8
|
+
f as commitmentToVersionedHash
|
|
35
9
|
};
|