@coinbase/cdp-core 0.0.122 → 0.0.123
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.web10.js +66 -65
- package/dist/esm/index.web104.js +1 -1
- package/dist/esm/index.web113.js +3 -3
- package/dist/esm/index.web116.js +2 -2
- package/dist/esm/index.web120.js +3 -3
- package/dist/esm/index.web122.js +6 -6
- package/dist/esm/index.web134.js +13 -373
- package/dist/esm/index.web135.js +22 -28
- package/dist/esm/index.web136.js +50 -28
- package/dist/esm/index.web137.js +379 -2
- package/dist/esm/index.web138.js +28 -65
- package/dist/esm/index.web139.js +28 -364
- package/dist/esm/index.web140.js +2 -19
- package/dist/esm/index.web141.js +63 -20
- package/dist/esm/index.web142.js +351 -37
- package/dist/esm/index.web143.js +944 -4
- package/dist/esm/index.web144.js +2 -945
- package/dist/esm/index.web145.js +50 -2
- package/dist/esm/index.web146.js +26 -49
- package/dist/esm/index.web147.js +54 -26
- package/dist/esm/index.web148.js +11 -5
- package/dist/esm/index.web149.js +2 -48
- package/dist/esm/index.web150.js +44 -54
- package/dist/esm/index.web151.js +13 -10
- package/dist/esm/index.web152.js +13 -2
- package/dist/esm/index.web153.js +12 -45
- package/dist/esm/index.web154.js +5 -14
- package/dist/esm/index.web155.js +47 -14
- package/dist/esm/index.web156.js +4 -18
- package/dist/esm/index.web157.js +28 -7
- package/dist/esm/index.web158.js +7 -3
- package/dist/esm/index.web159.js +3 -28
- package/dist/esm/index.web160.js +28 -8
- package/dist/esm/index.web161.js +8 -7
- package/dist/esm/index.web162.js +7 -80
- package/dist/esm/index.web163.js +71 -19
- package/dist/esm/index.web164.js +28 -3
- package/dist/esm/index.web165.js +3 -15
- package/dist/esm/index.web166.js +15 -4
- package/dist/esm/index.web167.js +4 -14
- package/dist/esm/index.web168.js +14 -19
- package/dist/esm/index.web169.js +15 -57
- package/dist/esm/index.web170.js +60 -16
- package/dist/esm/index.web171.js +17 -23
- package/dist/esm/index.web172.js +23 -8
- package/dist/esm/index.web173.js +8 -42
- package/dist/esm/index.web174.js +42 -7
- package/dist/esm/index.web175.js +7 -20
- package/dist/esm/index.web176.js +18 -10
- package/dist/esm/index.web177.js +4 -11
- package/dist/esm/index.web198.js +1 -1
- package/dist/esm/index.web2.js +2 -2
- package/dist/esm/index.web200.js +1 -1
- package/dist/esm/index.web201.js +2 -2
- package/dist/esm/index.web209.js +2 -2
- package/dist/esm/index.web217.js +20 -108
- package/dist/esm/index.web218.js +10 -2
- package/dist/esm/index.web219.js +20 -2
- package/dist/esm/index.web220.js +93 -20
- package/dist/esm/index.web221.js +20 -9
- package/dist/esm/index.web222.js +114 -16
- package/dist/esm/index.web223.js +99 -89
- package/dist/esm/index.web224.js +78 -20
- package/dist/esm/index.web225.js +79 -118
- package/dist/esm/index.web226.js +106 -101
- package/dist/esm/index.web227.js +2 -79
- package/dist/esm/index.web228.js +2 -79
- package/dist/esm/index.web231.js +1 -1
- package/dist/esm/index.web238.js +1 -1
- package/dist/esm/index.web244.js +3 -17
- package/dist/esm/index.web245.js +18 -28
- package/dist/esm/index.web246.js +26 -6
- package/dist/esm/index.web247.js +6 -9
- package/dist/esm/index.web248.js +11 -13
- package/dist/esm/index.web249.js +11 -8
- package/dist/esm/index.web250.js +7 -14
- package/dist/esm/index.web251.js +16 -80
- package/dist/esm/index.web252.js +81 -2
- package/dist/esm/index.web253.js +2 -4
- package/dist/esm/index.web89.js +46 -48
- package/dist/esm/index.web9.js +1 -1
- package/dist/native/index.native101.js +1 -1
- package/dist/native/index.native11.js +1 -1
- package/dist/native/index.native110.js +3 -3
- package/dist/native/index.native113.js +2 -2
- package/dist/native/index.native117.js +3 -3
- package/dist/native/index.native118.js +6 -6
- package/dist/native/index.native12.js +62 -61
- package/dist/native/index.native129.js +12 -12
- package/dist/native/index.native130.js +2 -2
- package/dist/native/index.native131.js +373 -13
- package/dist/native/index.native132.js +2 -25
- package/dist/native/index.native133.js +63 -48
- package/dist/native/index.native134.js +177 -189
- package/dist/native/index.native135.js +31 -2
- package/dist/native/index.native136.js +28 -65
- package/dist/native/index.native137.js +12 -360
- package/dist/native/index.native138.js +22 -28
- package/dist/native/index.native139.js +50 -28
- package/dist/native/index.native140.js +11 -943
- package/dist/native/index.native141.js +12 -2
- package/dist/native/index.native142.js +4 -49
- package/dist/native/index.native143.js +944 -26
- package/dist/native/index.native144.js +2 -5
- package/dist/native/index.native145.js +45 -43
- package/dist/native/index.native146.js +26 -12
- package/dist/native/index.native147.js +5 -12
- package/dist/native/index.native148.js +48 -36
- package/dist/native/index.native149.js +35 -67
- package/dist/native/index.native150.js +67 -4
- package/dist/native/index.native151.js +13 -54
- package/dist/native/index.native152.js +27 -10
- package/dist/native/index.native153.js +8 -2
- package/dist/native/index.native154.js +4 -45
- package/dist/native/index.native155.js +27 -13
- package/dist/native/index.native156.js +9 -2
- package/dist/native/index.native157.js +8 -2
- package/dist/native/index.native158.js +79 -13
- package/dist/native/index.native159.js +26 -54
- package/dist/native/index.native160.js +3 -6
- package/dist/native/index.native161.js +14 -21
- package/dist/native/index.native162.js +4 -17
- package/dist/native/index.native163.js +13 -45
- package/dist/native/index.native164.js +19 -3
- package/dist/native/index.native165.js +60 -3
- package/dist/native/index.native166.js +17 -34
- package/dist/native/index.native167.js +21 -10
- package/dist/native/index.native168.js +8 -4
- package/dist/native/index.native169.js +40 -27
- package/dist/native/index.native170.js +7 -6
- package/dist/native/index.native171.js +19 -31
- package/dist/native/index.native172.js +52 -10
- package/dist/native/index.native173.js +10 -55
- package/dist/native/index.native174.js +2 -43
- package/dist/native/index.native175.js +43 -126
- package/dist/native/index.native176.js +13 -104
- package/dist/native/index.native177.js +13 -6
- package/dist/native/index.native178.js +56 -3
- package/dist/native/index.native179.js +6 -78
- package/dist/native/index.native180.js +22 -2
- package/dist/native/index.native181.js +18 -2
- package/dist/native/index.native182.js +40 -32
- package/dist/native/index.native183.js +3 -6
- package/dist/native/index.native184.js +3 -34
- package/dist/native/index.native185.js +34 -14
- package/dist/native/index.native186.js +9 -31
- package/dist/native/index.native187.js +4 -18
- package/dist/native/index.native188.js +28 -8
- package/dist/native/index.native189.js +6 -10
- package/dist/native/index.native190.js +32 -11
- package/dist/native/index.native191.js +12 -13
- package/dist/native/index.native192.js +55 -5
- package/dist/native/index.native193.js +43 -5
- package/dist/native/index.native194.js +127 -10
- package/dist/native/index.native195.js +104 -13
- package/dist/native/index.native196.js +6 -27
- package/dist/native/index.native197.js +3 -8
- package/dist/native/index.native198.js +78 -3
- package/dist/native/index.native199.js +2 -28
- package/dist/native/index.native2.js +2 -2
- package/dist/native/index.native200.js +2 -9
- package/dist/native/index.native201.js +37 -7
- package/dist/native/index.native202.js +6 -79
- package/dist/native/index.native203.js +32 -25
- package/dist/native/index.native204.js +14 -3
- package/dist/native/index.native205.js +34 -14
- package/dist/native/index.native206.js +18 -4
- package/dist/native/index.native207.js +8 -13
- package/dist/native/index.native208.js +9 -18
- package/dist/native/index.native209.js +11 -60
- package/dist/native/index.native210.js +13 -17
- package/dist/native/index.native211.js +5 -23
- package/dist/native/index.native212.js +5 -9
- package/dist/native/index.native213.js +10 -41
- package/dist/native/index.native214.js +2 -8
- package/dist/native/index.native215.js +2 -21
- package/dist/native/index.native222.js +7 -20
- package/dist/native/index.native223.js +2 -10
- package/dist/native/index.native224.js +361 -20
- package/dist/native/index.native225.js +852 -93
- package/dist/native/index.native226.js +39 -21
- package/dist/native/index.native227.js +2 -118
- package/dist/native/index.native228.js +67 -36
- package/dist/native/index.native229.js +35 -2
- package/dist/native/index.native230.js +14 -69
- package/dist/native/index.native231.js +20 -34
- package/dist/native/index.native232.js +10 -15
- package/dist/native/index.native233.js +20 -8
- package/dist/native/index.native234.js +94 -2
- package/dist/native/index.native235.js +21 -361
- package/dist/native/index.native236.js +118 -853
- package/dist/native/index.native237.js +40 -14
- package/dist/native/index.native238.js +21 -2
- package/dist/native/index.native239.js +2 -20
- package/dist/native/index.native240.js +18 -31
- package/dist/native/index.native241.js +32 -6
- package/dist/native/index.native242.js +6 -3
- package/dist/native/index.native243.js +2 -47
- package/dist/native/index.native244.js +2 -2
- package/dist/native/index.native245.js +2 -2
- package/dist/native/index.native246.js +4 -2
- package/dist/native/index.native248.js +1 -1
- package/dist/native/index.native250.js +1 -1
- package/dist/native/index.native253.js +1 -1
- package/dist/native/index.native254.js +1 -1
- package/dist/native/index.native256.js +14 -78
- package/dist/native/index.native257.js +78 -14
- package/dist/native/index.native3.js +1 -1
- package/dist/native/index.native87.js +46 -48
- package/dist/native-types/auth/authManager.d.ts +6 -2
- package/dist/native-types/auth/createAuthManager.d.ts +5 -1
- package/dist/native-types/version.d.ts +1 -1
- package/dist/types/auth/authManager.d.ts +6 -2
- package/dist/types/auth/createAuthManager.d.ts +5 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/web/index.web10.js +66 -65
- package/dist/web/index.web104.js +1 -1
- package/dist/web/index.web113.js +3 -3
- package/dist/web/index.web116.js +2 -2
- package/dist/web/index.web120.js +3 -3
- package/dist/web/index.web122.js +6 -6
- package/dist/web/index.web134.js +13 -373
- package/dist/web/index.web135.js +22 -28
- package/dist/web/index.web136.js +50 -28
- package/dist/web/index.web137.js +379 -2
- package/dist/web/index.web138.js +28 -65
- package/dist/web/index.web139.js +28 -364
- package/dist/web/index.web140.js +2 -19
- package/dist/web/index.web141.js +63 -20
- package/dist/web/index.web142.js +351 -37
- package/dist/web/index.web143.js +944 -4
- package/dist/web/index.web144.js +2 -945
- package/dist/web/index.web145.js +50 -2
- package/dist/web/index.web146.js +26 -49
- package/dist/web/index.web147.js +54 -26
- package/dist/web/index.web148.js +11 -5
- package/dist/web/index.web149.js +2 -48
- package/dist/web/index.web150.js +44 -54
- package/dist/web/index.web151.js +13 -10
- package/dist/web/index.web152.js +13 -2
- package/dist/web/index.web153.js +12 -45
- package/dist/web/index.web154.js +5 -14
- package/dist/web/index.web155.js +47 -14
- package/dist/web/index.web156.js +4 -18
- package/dist/web/index.web157.js +28 -7
- package/dist/web/index.web158.js +7 -3
- package/dist/web/index.web159.js +3 -28
- package/dist/web/index.web160.js +28 -8
- package/dist/web/index.web161.js +8 -7
- package/dist/web/index.web162.js +7 -80
- package/dist/web/index.web163.js +71 -19
- package/dist/web/index.web164.js +28 -3
- package/dist/web/index.web165.js +3 -15
- package/dist/web/index.web166.js +15 -4
- package/dist/web/index.web167.js +4 -14
- package/dist/web/index.web168.js +14 -19
- package/dist/web/index.web169.js +15 -57
- package/dist/web/index.web170.js +60 -16
- package/dist/web/index.web171.js +17 -23
- package/dist/web/index.web172.js +23 -8
- package/dist/web/index.web173.js +8 -42
- package/dist/web/index.web174.js +42 -7
- package/dist/web/index.web175.js +7 -20
- package/dist/web/index.web176.js +18 -10
- package/dist/web/index.web177.js +4 -11
- package/dist/web/index.web198.js +1 -1
- package/dist/web/index.web2.js +2 -2
- package/dist/web/index.web200.js +1 -1
- package/dist/web/index.web201.js +2 -2
- package/dist/web/index.web209.js +2 -2
- package/dist/web/index.web217.js +20 -108
- package/dist/web/index.web218.js +10 -2
- package/dist/web/index.web219.js +20 -2
- package/dist/web/index.web220.js +93 -20
- package/dist/web/index.web221.js +20 -9
- package/dist/web/index.web222.js +114 -16
- package/dist/web/index.web223.js +99 -89
- package/dist/web/index.web224.js +78 -20
- package/dist/web/index.web225.js +79 -118
- package/dist/web/index.web226.js +106 -101
- package/dist/web/index.web227.js +2 -79
- package/dist/web/index.web228.js +2 -79
- package/dist/web/index.web231.js +1 -1
- package/dist/web/index.web238.js +1 -1
- package/dist/web/index.web244.js +3 -17
- package/dist/web/index.web245.js +18 -28
- package/dist/web/index.web246.js +26 -6
- package/dist/web/index.web247.js +6 -9
- package/dist/web/index.web248.js +11 -13
- package/dist/web/index.web249.js +11 -8
- package/dist/web/index.web250.js +7 -14
- package/dist/web/index.web251.js +16 -80
- package/dist/web/index.web252.js +81 -2
- package/dist/web/index.web253.js +2 -4
- package/dist/web/index.web89.js +46 -48
- package/dist/web/index.web9.js +1 -1
- package/dist/web-types/auth/authManager.d.ts +6 -2
- package/dist/web-types/auth/createAuthManager.d.ts +5 -1
- package/dist/web-types/version.d.ts +1 -1
- package/package.json +2 -2
package/dist/esm/index.web251.js
CHANGED
|
@@ -1,83 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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 };
|
|
1
|
+
import n from "./index.web151.js";
|
|
2
|
+
function r(t) {
|
|
3
|
+
return n(t) && typeof t.kty == "string";
|
|
4
|
+
}
|
|
5
|
+
function o(t) {
|
|
6
|
+
return t.kty !== "oct" && typeof t.d == "string";
|
|
7
|
+
}
|
|
8
|
+
function e(t) {
|
|
9
|
+
return t.kty !== "oct" && typeof t.d > "u";
|
|
10
|
+
}
|
|
11
|
+
function c(t) {
|
|
12
|
+
return t.kty === "oct" && typeof t.k == "string";
|
|
74
13
|
}
|
|
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
|
-
};
|
|
81
14
|
export {
|
|
82
|
-
|
|
15
|
+
r as isJWK,
|
|
16
|
+
o as isPrivateJWK,
|
|
17
|
+
e as isPublicJWK,
|
|
18
|
+
c as isSecretJWK
|
|
83
19
|
};
|
package/dist/esm/index.web252.js
CHANGED
|
@@ -1,4 +1,83 @@
|
|
|
1
|
-
|
|
1
|
+
import { JOSENotSupported as s } from "./index.web135.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 };
|
|
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
|
+
};
|
|
2
81
|
export {
|
|
3
|
-
|
|
82
|
+
i as default
|
|
4
83
|
};
|
package/dist/esm/index.web253.js
CHANGED
package/dist/esm/index.web89.js
CHANGED
|
@@ -13,24 +13,24 @@ const l = 60 * 1e3, R = {
|
|
|
13
13
|
baseDelayMs: 1e3,
|
|
14
14
|
maxDelayMs: 1e4
|
|
15
15
|
};
|
|
16
|
-
function g(
|
|
17
|
-
const n = e * Math.pow(2,
|
|
18
|
-
return Math.min(n + o,
|
|
16
|
+
function g(r, e, t) {
|
|
17
|
+
const n = e * Math.pow(2, r), o = Math.random() * 0.3 * n;
|
|
18
|
+
return Math.min(n + o, t);
|
|
19
19
|
}
|
|
20
|
-
function A(
|
|
21
|
-
return new Promise((e) => setTimeout(e,
|
|
20
|
+
function A(r) {
|
|
21
|
+
return new Promise((e) => setTimeout(e, r));
|
|
22
22
|
}
|
|
23
|
-
function E(
|
|
24
|
-
if (
|
|
23
|
+
function E(r) {
|
|
24
|
+
if (r instanceof TypeError && r.message.includes("fetch"))
|
|
25
25
|
return !0;
|
|
26
|
-
if (
|
|
27
|
-
if (
|
|
26
|
+
if (r instanceof y) {
|
|
27
|
+
if (r.statusCode >= 500 && r.statusCode < 600 || r.statusCode === 408 || r.statusCode === 429)
|
|
28
28
|
return !0;
|
|
29
|
-
if (
|
|
29
|
+
if (r.statusCode === 401)
|
|
30
30
|
return !1;
|
|
31
31
|
}
|
|
32
|
-
if (
|
|
33
|
-
const e =
|
|
32
|
+
if (r instanceof Error) {
|
|
33
|
+
const e = r.message.toLowerCase();
|
|
34
34
|
if (e.includes("network") || e.includes("timeout") || e.includes("econnrefused") || e.includes("enotfound") || e.includes("socket"))
|
|
35
35
|
return !0;
|
|
36
36
|
}
|
|
@@ -48,9 +48,11 @@ class j {
|
|
|
48
48
|
* Initializes the token manager.
|
|
49
49
|
*
|
|
50
50
|
* @param projectId - The project ID.
|
|
51
|
+
* @param options - Options that control initial session refresh behavior.
|
|
52
|
+
* @param options.deferInitialization - Whether to defer the initial session refresh until ensureInitialized is called.
|
|
51
53
|
*/
|
|
52
|
-
constructor(e) {
|
|
53
|
-
this.projectId = e, this.initPromise = this._doInitialize();
|
|
54
|
+
constructor(e, t = {}) {
|
|
55
|
+
this.projectId = e, t.deferInitialization || (this.initPromise = this._doInitialize());
|
|
54
56
|
}
|
|
55
57
|
/**
|
|
56
58
|
* Gets the current user, or null if there is no user signed in.
|
|
@@ -139,12 +141,12 @@ class j {
|
|
|
139
141
|
if (!await this.isSignedIn())
|
|
140
142
|
throw new Error("Cannot get X-Wallet-Auth header if the user is not signed in");
|
|
141
143
|
this.shouldRefreshWalletSecret() && await this.refreshWalletSecret();
|
|
142
|
-
const
|
|
143
|
-
uris: [
|
|
144
|
+
const t = `${e.requestMethod} ${e.requestHost}${e.requestPath}`, n = Math.floor(Date.now() / 1e3), o = c(), a = {
|
|
145
|
+
uris: [t]
|
|
144
146
|
};
|
|
145
147
|
if (e.requestData && Object.keys(e.requestData).length > 0) {
|
|
146
|
-
const
|
|
147
|
-
a.reqHash = await o.hash(new TextEncoder().encode(JSON.stringify(
|
|
148
|
+
const s = p(e.requestData);
|
|
149
|
+
a.reqHash = await o.hash(new TextEncoder().encode(JSON.stringify(s)));
|
|
148
150
|
}
|
|
149
151
|
return await new _(a).setProtectedHeader({ alg: "ES256", typ: "JWT" }).setIssuedAt(n).setNotBefore(n).setJti(o.generateRandomId()).sign(this.walletSecret.keyPair.privateKey);
|
|
150
152
|
}
|
|
@@ -162,7 +164,7 @@ class j {
|
|
|
162
164
|
* @param authState - The authentication state.
|
|
163
165
|
*/
|
|
164
166
|
async setAuthState(e) {
|
|
165
|
-
this.authState = e, i.endUserIdentifier = e.user.userId, this.authStateChangeCallbacks.forEach((
|
|
167
|
+
this.authState = e, i.endUserIdentifier = e.user.userId, this.authStateChangeCallbacks.forEach((t) => t(this.authState?.user ?? null)), this.scheduleTokenRefresh();
|
|
166
168
|
}
|
|
167
169
|
/**
|
|
168
170
|
* Clears the authentication state.
|
|
@@ -172,14 +174,10 @@ class j {
|
|
|
172
174
|
}
|
|
173
175
|
/**
|
|
174
176
|
* Ensures the AuthManager is initialized before proceeding.
|
|
175
|
-
*
|
|
177
|
+
* Starts deferred initialization when necessary, otherwise waits for initialization already in progress.
|
|
176
178
|
*/
|
|
177
179
|
async ensureInitialized() {
|
|
178
|
-
|
|
179
|
-
await this.initPromise;
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
throw new Error("AuthManager not initialized");
|
|
180
|
+
this.initPromise ??= this._doInitialize(), await this.initPromise;
|
|
183
181
|
}
|
|
184
182
|
/**
|
|
185
183
|
* Internal async initialization logic.
|
|
@@ -210,19 +208,19 @@ class j {
|
|
|
210
208
|
* @returns The new access token.
|
|
211
209
|
*/
|
|
212
210
|
async refreshAccessToken(e = "on_demand") {
|
|
213
|
-
const { maxRetries:
|
|
211
|
+
const { maxRetries: t, baseDelayMs: n, maxDelayMs: o } = R;
|
|
214
212
|
i.sendSessionRefreshEvent({
|
|
215
213
|
name: "refresh_token_start",
|
|
216
214
|
trigger: e
|
|
217
215
|
});
|
|
218
|
-
for (let a = 0; a <=
|
|
216
|
+
for (let a = 0; a <= t; a++)
|
|
219
217
|
try {
|
|
220
|
-
const
|
|
218
|
+
const s = await d(this.projectId, {
|
|
221
219
|
grantType: "refresh_token"
|
|
222
220
|
}), h = k(
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
221
|
+
s.accessToken,
|
|
222
|
+
s.validUntil,
|
|
223
|
+
s.endUser
|
|
226
224
|
);
|
|
227
225
|
await this.setAuthState(h), i.sendSessionRefreshEvent({
|
|
228
226
|
name: "refresh_token_success",
|
|
@@ -230,15 +228,15 @@ class j {
|
|
|
230
228
|
attempt: a
|
|
231
229
|
});
|
|
232
230
|
return;
|
|
233
|
-
} catch (
|
|
234
|
-
const h =
|
|
235
|
-
if (m(
|
|
236
|
-
if (S(
|
|
231
|
+
} catch (s) {
|
|
232
|
+
const h = s instanceof Error ? s.message : String(s);
|
|
233
|
+
if (m(s)) {
|
|
234
|
+
if (S(s)) {
|
|
237
235
|
i.sendSessionRefreshEvent({
|
|
238
236
|
name: "refresh_token_skipped_transient",
|
|
239
237
|
trigger: e,
|
|
240
238
|
attempt: a,
|
|
241
|
-
read_outcome:
|
|
239
|
+
read_outcome: s.outcome,
|
|
242
240
|
error_message: h
|
|
243
241
|
});
|
|
244
242
|
return;
|
|
@@ -248,12 +246,12 @@ class j {
|
|
|
248
246
|
trigger: e,
|
|
249
247
|
attempt: a,
|
|
250
248
|
error_type: "non_transient",
|
|
251
|
-
read_outcome:
|
|
249
|
+
read_outcome: s.outcome,
|
|
252
250
|
error_message: h
|
|
253
251
|
}), await this.signOut();
|
|
254
252
|
return;
|
|
255
253
|
}
|
|
256
|
-
if (!E(
|
|
254
|
+
if (!E(s)) {
|
|
257
255
|
i.sendSessionRefreshEvent({
|
|
258
256
|
name: "refresh_token_failure",
|
|
259
257
|
trigger: e,
|
|
@@ -263,7 +261,7 @@ class j {
|
|
|
263
261
|
}), await this.signOut();
|
|
264
262
|
return;
|
|
265
263
|
}
|
|
266
|
-
if (a ===
|
|
264
|
+
if (a === t) {
|
|
267
265
|
i.sendSessionRefreshEvent({
|
|
268
266
|
name: "refresh_token_exhausted",
|
|
269
267
|
trigger: e,
|
|
@@ -291,13 +289,13 @@ class j {
|
|
|
291
289
|
scheduleTokenRefresh() {
|
|
292
290
|
if (this.cancelTokenRefresh(), !this.authState)
|
|
293
291
|
return;
|
|
294
|
-
const
|
|
295
|
-
|
|
292
|
+
const t = this.authState.expiresAt - l - Date.now();
|
|
293
|
+
t <= 0 || (i.sendSessionRefreshEvent({
|
|
296
294
|
name: "refresh_token_scheduled",
|
|
297
|
-
time_until_refresh_ms:
|
|
295
|
+
time_until_refresh_ms: t
|
|
298
296
|
}), this.refreshTimeout = setTimeout(async () => {
|
|
299
297
|
await this.refreshAccessToken("scheduled"), this.scheduleTokenRefresh();
|
|
300
|
-
},
|
|
298
|
+
}, t));
|
|
301
299
|
}
|
|
302
300
|
/**
|
|
303
301
|
* Cancels any scheduled token refresh.
|
|
@@ -334,20 +332,20 @@ class j {
|
|
|
334
332
|
* Internal wallet secret refresh logic.
|
|
335
333
|
*/
|
|
336
334
|
async _doRefreshWalletSecret() {
|
|
337
|
-
const e = c(),
|
|
338
|
-
this.walletSecret = { walletSecretId:
|
|
335
|
+
const e = c(), t = this.walletSecret?.walletSecretId ?? e.generateRandomId(), n = this.walletSecret?.keyPair ?? await e.createKeyPair(), o = this.authState.expiresAt, a = new Date(o).toISOString();
|
|
336
|
+
this.walletSecret = { walletSecretId: t, keyPair: n, expiresAt: o };
|
|
339
337
|
try {
|
|
340
338
|
await w(
|
|
341
339
|
this.authState.user.userId,
|
|
342
340
|
{
|
|
343
|
-
walletSecretId:
|
|
341
|
+
walletSecretId: t,
|
|
344
342
|
publicKey: n.publicKeyBase64,
|
|
345
343
|
validUntil: a
|
|
346
344
|
},
|
|
347
345
|
{ projectID: this.projectId }
|
|
348
346
|
);
|
|
349
|
-
} catch (
|
|
350
|
-
throw this.walletSecret = null,
|
|
347
|
+
} catch (s) {
|
|
348
|
+
throw this.walletSecret = null, s;
|
|
351
349
|
}
|
|
352
350
|
}
|
|
353
351
|
}
|
package/dist/esm/index.web9.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CompactSign as i } from "./index.
|
|
2
|
-
import { JWTInvalid as r } from "./index.
|
|
3
|
-
import { JWTClaimsBuilder as n } from "./index.
|
|
1
|
+
import { CompactSign as i } from "./index.native137.js";
|
|
2
|
+
import { JWTInvalid as r } from "./index.native138.js";
|
|
3
|
+
import { JWTClaimsBuilder as n } from "./index.native139.js";
|
|
4
4
|
class d {
|
|
5
5
|
#s;
|
|
6
6
|
#t;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InvalidAddressError as s } from "./index.
|
|
2
|
-
import { isAddress as a } from "./index.
|
|
1
|
+
import { InvalidAddressError as s } from "./index.native140.js";
|
|
2
|
+
import { isAddress as a } from "./index.native141.js";
|
|
3
3
|
function r(n) {
|
|
4
4
|
if (typeof n == "string") {
|
|
5
5
|
if (!a(n, { strict: !1 }))
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DisconnectedError as l, from as d } from "./index.
|
|
1
|
+
import { DisconnectedError as l, from as d } from "./index.native131.js";
|
|
2
2
|
import { validateRequest as h, EIP1193ProviderError as m, STANDARD_ERROR_CODES as _ } from "./index.native93.js";
|
|
3
|
-
import { createEOAHandlers as p } from "./index.
|
|
4
|
-
import { createSmartAccountHandlers as g } from "./index.
|
|
3
|
+
import { createEOAHandlers as p } from "./index.native135.js";
|
|
4
|
+
import { createSmartAccountHandlers as g } from "./index.native136.js";
|
|
5
5
|
import "viem";
|
|
6
6
|
import "zustand";
|
|
7
7
|
import "@coinbase/cdp-api-client";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { AuthManager as
|
|
2
|
-
import { CustomAuthManager as
|
|
1
|
+
import { AuthManager as o } from "./index.native87.js";
|
|
2
|
+
import { CustomAuthManager as n } from "./index.native125.js";
|
|
3
3
|
import "@coinbase/cdp-api-client";
|
|
4
4
|
import "viem";
|
|
5
|
-
import { getConfig as
|
|
6
|
-
function
|
|
7
|
-
return
|
|
5
|
+
import { getConfig as e } from "./index.native76.js";
|
|
6
|
+
function c(t, r = {}) {
|
|
7
|
+
return e().customAuth?.getJwt ? new n(t, r) : new o(t, r);
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
c as createAuthManager
|
|
11
11
|
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { configureCdpApiClient as C, setAuthManager as M,
|
|
2
|
-
import { Analytics as
|
|
1
|
+
import { setCookieDomain as p, configureCdpApiClient as C, setAuthManager as M, getProjectConfig as S, APIError as m, getMfaConfig as v } from "@coinbase/cdp-api-client";
|
|
2
|
+
import { Analytics as f } from "./index.native2.js";
|
|
3
3
|
import "./index.native3.js";
|
|
4
|
-
import { createAuthManager as
|
|
5
|
-
import { OAuthManager as
|
|
4
|
+
import { createAuthManager as w } from "./index.native118.js";
|
|
5
|
+
import { OAuthManager as y } from "./index.native119.js";
|
|
6
6
|
import { MockAuthManager as P } from "./index.native120.js";
|
|
7
7
|
import { MockOAuthManager as _ } from "./index.native121.js";
|
|
8
8
|
import { getAttestationModule as O } from "./index.native95.js";
|
|
9
9
|
import { getPlatformServices as h } from "./index.native10.js";
|
|
10
|
-
import { getConfig as
|
|
10
|
+
import { getConfig as a, setCoreAuthManager as I, setCoreOAuthManager as k, setMfaConfig as A, setProjectConfig as b, getCoreAuthManager as E, setConfig as R } from "./index.native76.js";
|
|
11
11
|
import "viem";
|
|
12
12
|
const V = async (t) => {
|
|
13
13
|
if (!t.projectId)
|
|
14
14
|
throw new Error("Project ID is required");
|
|
15
|
-
t.disableAnalytics === void 0 || t.disableAnalytics === !1 ? (
|
|
16
|
-
let
|
|
15
|
+
t.disableAnalytics === void 0 || t.disableAnalytics === !1 ? (f.developerIdentifier = t.projectId, f.isUsingMocks = t.useMock === !0, f.isProduction = !t.basePath || t.basePath === "https://api.cdp.coinbase.com/platform") : f.enabled = !1;
|
|
16
|
+
let o;
|
|
17
17
|
try {
|
|
18
|
-
|
|
18
|
+
o = a().projectId !== t.projectId;
|
|
19
19
|
} catch {
|
|
20
|
-
|
|
20
|
+
o = !0;
|
|
21
21
|
}
|
|
22
|
-
if (
|
|
23
|
-
I(new P(
|
|
24
|
-
projectId:
|
|
22
|
+
if (o && p(null), R(t), a().useMock) {
|
|
23
|
+
I(new P(a().projectId)), k(new _()), A({
|
|
24
|
+
projectId: a().projectId,
|
|
25
25
|
enabled: !1,
|
|
26
26
|
totpConfig: { enabled: !1 },
|
|
27
27
|
smsConfig: { enabled: !1 },
|
|
@@ -31,94 +31,95 @@ const V = async (t) => {
|
|
|
31
31
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
32
32
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
33
33
|
}), b({
|
|
34
|
-
projectId:
|
|
34
|
+
projectId: a().projectId,
|
|
35
35
|
name: "Mock Project",
|
|
36
36
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
37
37
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
38
38
|
});
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
|
-
let
|
|
41
|
+
let n, d = !1, c = !1;
|
|
42
42
|
try {
|
|
43
43
|
const e = h();
|
|
44
|
-
e.secureStorage ? (
|
|
44
|
+
e.secureStorage ? (d = !0, c = !0, n = {
|
|
45
45
|
getRefreshToken: () => e.secureStorage.getItem("cdp_refresh_token"),
|
|
46
46
|
getRefreshTokenWithOutcome: () => j(e.secureStorage),
|
|
47
|
-
setRefreshToken: (
|
|
47
|
+
setRefreshToken: (s) => e.secureStorage.setItem("cdp_refresh_token", s),
|
|
48
48
|
removeRefreshToken: () => e.secureStorage.removeItem("cdp_refresh_token")
|
|
49
|
-
}) :
|
|
49
|
+
}) : n = {
|
|
50
50
|
getRefreshToken: () => e.storage.getItem("cdp_refresh_token"),
|
|
51
51
|
getRefreshTokenWithOutcome: () => j(e.storage),
|
|
52
|
-
setRefreshToken: (
|
|
52
|
+
setRefreshToken: (s) => e.storage.setItem("cdp_refresh_token", s),
|
|
53
53
|
removeRefreshToken: () => e.storage.removeItem("cdp_refresh_token")
|
|
54
54
|
};
|
|
55
55
|
} catch {
|
|
56
|
-
|
|
56
|
+
f.sendSessionRefreshEvent({
|
|
57
57
|
name: "refresh_token_storage_not_initialized"
|
|
58
|
-
}),
|
|
58
|
+
}), n = void 0;
|
|
59
59
|
}
|
|
60
|
-
let r,
|
|
60
|
+
let r, l, g;
|
|
61
61
|
try {
|
|
62
62
|
const e = h();
|
|
63
|
-
|
|
63
|
+
g = e.deviceInfo?.getPlatform?.(), e.attestation && (r = e.attestation, l = e.deviceInfo?.getAppBundleId?.());
|
|
64
64
|
} catch {
|
|
65
65
|
r = void 0;
|
|
66
66
|
}
|
|
67
67
|
if (C({
|
|
68
|
-
debugging:
|
|
69
|
-
basePath:
|
|
70
|
-
refreshTokenStorage:
|
|
71
|
-
retryTokenReads:
|
|
72
|
-
failClosedOnMissingToken:
|
|
73
|
-
platform:
|
|
68
|
+
debugging: a().debugging,
|
|
69
|
+
basePath: a().basePath,
|
|
70
|
+
refreshTokenStorage: n,
|
|
71
|
+
retryTokenReads: d,
|
|
72
|
+
failClosedOnMissingToken: c,
|
|
73
|
+
platform: g,
|
|
74
74
|
appAttestation: r && {
|
|
75
75
|
isEnabled: () => r.isEnabled,
|
|
76
|
-
appIdentifier:
|
|
76
|
+
appIdentifier: l,
|
|
77
77
|
generateAssertion: r.generateAssertion.bind(r)
|
|
78
78
|
}
|
|
79
|
-
}),
|
|
80
|
-
const e = new
|
|
81
|
-
|
|
82
|
-
const n = y(i().projectId);
|
|
83
|
-
I(n), M(n);
|
|
79
|
+
}), o) {
|
|
80
|
+
const e = new y();
|
|
81
|
+
k(e);
|
|
84
82
|
}
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
if (o) {
|
|
84
|
+
const e = w(a().projectId, {
|
|
85
|
+
deferInitialization: !0
|
|
86
|
+
});
|
|
87
|
+
I(e), M(e);
|
|
88
|
+
}
|
|
89
|
+
let i = null;
|
|
90
|
+
try {
|
|
91
|
+
i = await S(t.projectId);
|
|
92
|
+
} catch (e) {
|
|
93
|
+
(!(e instanceof m) || e.statusCode !== 404) && console.warn("Failed to get project config", e);
|
|
94
|
+
}
|
|
95
|
+
i && (b(i), p(i.activeCookieDomain ?? null));
|
|
96
|
+
const [, u] = await Promise.allSettled([
|
|
97
|
+
E().ensureInitialized(),
|
|
87
98
|
(async () => {
|
|
88
99
|
try {
|
|
89
100
|
return await v(t.projectId);
|
|
90
101
|
} catch (e) {
|
|
91
102
|
return (!(e instanceof m) || e.statusCode !== 404) && console.warn("Failed to get MFA config", e), null;
|
|
92
103
|
}
|
|
93
|
-
})(),
|
|
94
|
-
(async () => {
|
|
95
|
-
try {
|
|
96
|
-
return await S(t.projectId);
|
|
97
|
-
} catch (e) {
|
|
98
|
-
return (!(e instanceof m) || e.statusCode !== 404) && console.warn("Failed to get project config", e), null;
|
|
99
|
-
}
|
|
100
104
|
})()
|
|
101
105
|
]);
|
|
102
|
-
if (
|
|
103
|
-
const e =
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
);
|
|
113
|
-
}));
|
|
114
|
-
}
|
|
106
|
+
if (u.status === "fulfilled" && u.value && A(u.value), i && i.appAttestation && r && l) {
|
|
107
|
+
const e = T(i.appAttestation, l);
|
|
108
|
+
e !== null && (O() || console.warn(
|
|
109
|
+
"[Attestation] Project config has attestation enabled for this app, but no attestation provider is registered. Install @coinbase/cdp-app-attest and add `import '@coinbase/cdp-app-attest'` to your app's entry point."
|
|
110
|
+
), r.isEnabled = !0, r.cloudProjectNumber = e.cloudProjectNumber, r.initialize().catch((s) => {
|
|
111
|
+
console.error(
|
|
112
|
+
"[Attestation] Background initialization failed:",
|
|
113
|
+
s instanceof Error ? s.message : String(s)
|
|
114
|
+
);
|
|
115
|
+
}));
|
|
115
116
|
}
|
|
116
117
|
}, j = async (t) => {
|
|
117
|
-
const { value:
|
|
118
|
-
return { token:
|
|
119
|
-
}, T = (t,
|
|
120
|
-
const
|
|
121
|
-
return
|
|
118
|
+
const { value: o, outcome: n, errorMessage: d } = await t.getItemWithOutcome("cdp_refresh_token");
|
|
119
|
+
return { token: o, outcome: n, errorMessage: d };
|
|
120
|
+
}, T = (t, o) => {
|
|
121
|
+
const n = t.android?.find((c) => c.identifier === o);
|
|
122
|
+
return n ? { cloudProjectNumber: n.googleProjectNumber } : t.ios?.find((c) => c.identifier === o) ? {} : null;
|
|
122
123
|
};
|
|
123
124
|
export {
|
|
124
125
|
V as initialize
|