@coinbase/cdp-core 0.0.80 → 0.0.81
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.native12.js +1 -1
- package/dist/esm/index.native122.js +1 -1
- package/dist/esm/index.native123.js +1 -1
- package/dist/esm/index.native125.js +6 -6
- package/dist/esm/index.native13.js +1 -1
- package/dist/esm/index.native14.js +1 -1
- package/dist/esm/index.native155.js +1 -1
- package/dist/esm/index.native16.js +1 -1
- package/dist/esm/index.native162.js +20 -4
- package/dist/esm/index.native163.js +10 -21
- package/dist/esm/index.native164.js +19 -9
- package/dist/esm/index.native165.js +89 -15
- package/dist/esm/index.native166.js +19 -92
- package/dist/esm/index.native167.js +115 -18
- package/dist/esm/index.native168.js +5 -118
- package/dist/esm/index.native17.js +1 -1
- package/dist/esm/index.native172.js +38 -7
- package/dist/esm/index.native174.js +67 -375
- package/dist/esm/index.native175.js +34 -835
- package/dist/esm/index.native176.js +20 -38
- package/dist/esm/index.native177.js +8 -2
- package/dist/esm/index.native178.js +2 -70
- package/dist/esm/index.native179.js +373 -30
- package/dist/esm/index.native18.js +1 -1
- package/dist/esm/index.native180.js +835 -20
- package/dist/esm/index.native182.js +18 -2
- package/dist/esm/index.native183.js +28 -109
- package/dist/esm/index.native184.js +8 -2
- package/dist/esm/index.native185.js +11 -18
- package/dist/esm/index.native186.js +13 -28
- package/dist/esm/index.native187.js +10 -8
- package/dist/esm/index.native188.js +17 -11
- package/dist/esm/index.native189.js +80 -12
- package/dist/esm/index.native19.js +1 -1
- package/dist/esm/index.native190.js +2 -10
- package/dist/esm/index.native191.js +108 -16
- package/dist/esm/index.native192.js +2 -81
- package/dist/esm/index.native194.js +2 -2
- package/dist/esm/index.native195.js +2 -2
- package/dist/esm/index.native196.js +2 -2
- 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.native3.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.native69.js +3 -3
- package/dist/esm/index.native72.js +1 -1
- package/dist/esm/index.native73.js +1 -1
- package/dist/esm/index.native74.js +1 -1
- package/dist/esm/index.native78.js +377 -2
- package/dist/esm/index.native79.js +29 -2
- package/dist/esm/index.native80.js +26 -374
- package/dist/esm/index.native81.js +2 -29
- package/dist/esm/index.native82.js +2 -29
- 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.web11.js +2 -2
- package/dist/esm/index.web12.js +2 -2
- package/dist/esm/index.web13.js +1 -1
- package/dist/esm/index.web15.js +1 -1
- package/dist/esm/index.web154.js +1 -1
- package/dist/esm/index.web16.js +1 -1
- package/dist/esm/index.web17.js +1 -1
- package/dist/esm/index.web171.js +38 -7
- package/dist/esm/index.web173.js +67 -375
- package/dist/esm/index.web174.js +34 -835
- package/dist/esm/index.web175.js +20 -38
- package/dist/esm/index.web176.js +8 -2
- package/dist/esm/index.web177.js +2 -70
- package/dist/esm/index.web178.js +373 -30
- package/dist/esm/index.web179.js +835 -20
- package/dist/esm/index.web18.js +1 -1
- package/dist/esm/index.web19.js +1 -1
- package/dist/esm/index.web193.js +2 -2
- package/dist/esm/index.web194.js +2 -2
- package/dist/esm/index.web195.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.web62.js +1 -1
- package/dist/esm/index.web70.js +1 -1
- package/dist/esm/index.web8.js +1 -1
- package/dist/esm/index.web9.js +7 -7
- 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.native12.js +1 -1
- package/dist/native/index.native122.js +1 -1
- package/dist/native/index.native123.js +1 -1
- package/dist/native/index.native125.js +6 -6
- package/dist/native/index.native13.js +1 -1
- package/dist/native/index.native14.js +1 -1
- package/dist/native/index.native155.js +1 -1
- package/dist/native/index.native16.js +1 -1
- package/dist/native/index.native162.js +20 -4
- package/dist/native/index.native163.js +10 -21
- package/dist/native/index.native164.js +19 -9
- package/dist/native/index.native165.js +89 -15
- package/dist/native/index.native166.js +19 -92
- package/dist/native/index.native167.js +115 -18
- package/dist/native/index.native168.js +5 -118
- package/dist/native/index.native17.js +1 -1
- package/dist/native/index.native172.js +38 -7
- package/dist/native/index.native174.js +67 -375
- package/dist/native/index.native175.js +34 -835
- package/dist/native/index.native176.js +20 -38
- package/dist/native/index.native177.js +8 -2
- package/dist/native/index.native178.js +2 -70
- package/dist/native/index.native179.js +373 -30
- package/dist/native/index.native18.js +1 -1
- package/dist/native/index.native180.js +835 -20
- package/dist/native/index.native182.js +18 -2
- package/dist/native/index.native183.js +28 -109
- package/dist/native/index.native184.js +8 -2
- package/dist/native/index.native185.js +11 -18
- package/dist/native/index.native186.js +13 -28
- package/dist/native/index.native187.js +10 -8
- package/dist/native/index.native188.js +17 -11
- package/dist/native/index.native189.js +80 -12
- package/dist/native/index.native19.js +1 -1
- package/dist/native/index.native190.js +2 -10
- package/dist/native/index.native191.js +108 -16
- package/dist/native/index.native192.js +2 -81
- package/dist/native/index.native194.js +2 -2
- package/dist/native/index.native195.js +2 -2
- package/dist/native/index.native196.js +2 -2
- 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.native3.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.native69.js +3 -3
- package/dist/native/index.native72.js +1 -1
- package/dist/native/index.native73.js +1 -1
- package/dist/native/index.native74.js +1 -1
- package/dist/native/index.native78.js +377 -2
- package/dist/native/index.native79.js +29 -2
- package/dist/native/index.native80.js +26 -374
- package/dist/native/index.native81.js +2 -29
- package/dist/native/index.native82.js +2 -29
- 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.web11.js +2 -2
- package/dist/web/index.web12.js +2 -2
- package/dist/web/index.web13.js +1 -1
- package/dist/web/index.web15.js +1 -1
- package/dist/web/index.web154.js +1 -1
- package/dist/web/index.web16.js +1 -1
- package/dist/web/index.web17.js +1 -1
- package/dist/web/index.web171.js +38 -7
- package/dist/web/index.web173.js +67 -375
- package/dist/web/index.web174.js +34 -835
- package/dist/web/index.web175.js +20 -38
- package/dist/web/index.web176.js +8 -2
- package/dist/web/index.web177.js +2 -70
- package/dist/web/index.web178.js +373 -30
- package/dist/web/index.web179.js +835 -20
- package/dist/web/index.web18.js +1 -1
- package/dist/web/index.web19.js +1 -1
- package/dist/web/index.web193.js +2 -2
- package/dist/web/index.web194.js +2 -2
- package/dist/web/index.web195.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.web62.js +1 -1
- package/dist/web/index.web70.js +1 -1
- package/dist/web/index.web8.js +1 -1
- package/dist/web/index.web9.js +7 -7
- 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.native.js
CHANGED
|
@@ -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 }) => {
|
|
@@ -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
|
{
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { __require as e } from "./index.
|
|
1
|
+
import { __require as e } from "./index.native191.js";
|
|
2
2
|
e();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { encode as d } from "./index.
|
|
2
|
-
import y from "./index.
|
|
3
|
-
import b from "./index.
|
|
1
|
+
import { encode as d } from "./index.native162.js";
|
|
2
|
+
import y from "./index.native163.js";
|
|
3
|
+
import b from "./index.native164.js";
|
|
4
4
|
import { JWSInvalid as r } from "./index.native76.js";
|
|
5
5
|
import { encoder as s, concat as u, decoder as h } from "./index.native126.js";
|
|
6
|
-
import g from "./index.
|
|
7
|
-
import H from "./index.
|
|
8
|
-
import P from "./index.
|
|
6
|
+
import g from "./index.native165.js";
|
|
7
|
+
import H from "./index.native166.js";
|
|
8
|
+
import P from "./index.native167.js";
|
|
9
9
|
class x {
|
|
10
10
|
#r;
|
|
11
11
|
#e;
|
|
@@ -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,7 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { encoder as t, decoder as o } from "./index.native126.js";
|
|
2
|
+
import { encodeBase64 as c, decodeBase64 as a } from "./index.native182.js";
|
|
3
|
+
function i(r) {
|
|
4
|
+
if (Uint8Array.fromBase64)
|
|
5
|
+
return Uint8Array.fromBase64(typeof r == "string" ? r : o.decode(r), {
|
|
6
|
+
alphabet: "base64url"
|
|
7
|
+
});
|
|
8
|
+
let e = r;
|
|
9
|
+
e instanceof Uint8Array && (e = o.decode(e)), e = e.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
|
|
10
|
+
try {
|
|
11
|
+
return a(e);
|
|
12
|
+
} catch {
|
|
13
|
+
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function p(r) {
|
|
17
|
+
let e = r;
|
|
18
|
+
return typeof e == "string" && (e = t.encode(e)), Uint8Array.prototype.toBase64 ? e.toBase64({ alphabet: "base64url", omitPadding: !0 }) : c(e).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
4
19
|
}
|
|
5
20
|
export {
|
|
6
|
-
|
|
21
|
+
i as decode,
|
|
22
|
+
p as encode
|
|
7
23
|
};
|
|
@@ -1,23 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
try {
|
|
11
|
-
return a(e);
|
|
12
|
-
} catch {
|
|
13
|
-
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
function p(r) {
|
|
17
|
-
let e = r;
|
|
18
|
-
return typeof e == "string" && (e = t.encode(e)), Uint8Array.prototype.toBase64 ? e.toBase64({ alphabet: "base64url", omitPadding: !0 }) : c(e).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
19
|
-
}
|
|
1
|
+
import n from "./index.native183.js";
|
|
2
|
+
import s from "./index.native184.js";
|
|
3
|
+
import a from "./index.native185.js";
|
|
4
|
+
const y = async (t, o, e) => {
|
|
5
|
+
const r = await a(t, o, "sign");
|
|
6
|
+
s(t, r);
|
|
7
|
+
const i = await crypto.subtle.sign(n(t, r.algorithm), r, e);
|
|
8
|
+
return new Uint8Array(i);
|
|
9
|
+
};
|
|
20
10
|
export {
|
|
21
|
-
|
|
22
|
-
p as encode
|
|
11
|
+
y as default
|
|
23
12
|
};
|
|
@@ -1,12 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
s
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
const a = (...o) => {
|
|
2
|
+
const t = o.filter(Boolean);
|
|
3
|
+
if (t.length === 0 || t.length === 1)
|
|
4
|
+
return !0;
|
|
5
|
+
let e;
|
|
6
|
+
for (const s of t) {
|
|
7
|
+
const r = Object.keys(s);
|
|
8
|
+
if (!e || e.size === 0) {
|
|
9
|
+
e = new Set(r);
|
|
10
|
+
continue;
|
|
11
|
+
}
|
|
12
|
+
for (const n of r) {
|
|
13
|
+
if (e.has(n))
|
|
14
|
+
return !1;
|
|
15
|
+
e.add(n);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return !0;
|
|
9
19
|
};
|
|
10
20
|
export {
|
|
11
|
-
|
|
21
|
+
a as default
|
|
12
22
|
};
|
|
@@ -1,22 +1,96 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { withAlg as n } from "./index.native186.js";
|
|
2
|
+
import c from "./index.native187.js";
|
|
3
|
+
import { isJWK as p, isSecretJWK as a, isPublicJWK as y, isPrivateJWK as f } from "./index.native188.js";
|
|
4
|
+
const s = (r) => r?.[Symbol.toStringTag], o = (r, e, t) => {
|
|
5
|
+
if (e.use !== void 0) {
|
|
6
|
+
let i;
|
|
7
|
+
switch (t) {
|
|
8
|
+
case "sign":
|
|
9
|
+
case "verify":
|
|
10
|
+
i = "sig";
|
|
11
|
+
break;
|
|
12
|
+
case "encrypt":
|
|
13
|
+
case "decrypt":
|
|
14
|
+
i = "enc";
|
|
15
|
+
break;
|
|
11
16
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
if (e.use !== i)
|
|
18
|
+
throw new TypeError(`Invalid key for this operation, its "use" must be "${i}" when present`);
|
|
19
|
+
}
|
|
20
|
+
if (e.alg !== void 0 && e.alg !== r)
|
|
21
|
+
throw new TypeError(`Invalid key for this operation, its "alg" must be "${r}" when present`);
|
|
22
|
+
if (Array.isArray(e.key_ops)) {
|
|
23
|
+
let i;
|
|
24
|
+
switch (!0) {
|
|
25
|
+
case t === "sign":
|
|
26
|
+
case r === "dir":
|
|
27
|
+
case r.includes("CBC-HS"):
|
|
28
|
+
i = t;
|
|
29
|
+
break;
|
|
30
|
+
case r.startsWith("PBES2"):
|
|
31
|
+
i = "deriveBits";
|
|
32
|
+
break;
|
|
33
|
+
case /^A\d{3}(?:GCM)?(?:KW)?$/.test(r):
|
|
34
|
+
!r.includes("GCM") && r.endsWith("KW") ? i = "unwrapKey" : i = t;
|
|
35
|
+
break;
|
|
36
|
+
case t === "encrypt":
|
|
37
|
+
i = "wrapKey";
|
|
38
|
+
break;
|
|
39
|
+
case t === "decrypt":
|
|
40
|
+
i = r.startsWith("RSA") ? "unwrapKey" : "deriveBits";
|
|
41
|
+
break;
|
|
16
42
|
}
|
|
43
|
+
if (i && e.key_ops?.includes?.(i) === !1)
|
|
44
|
+
throw new TypeError(`Invalid key for this operation, its "key_ops" must include "${i}" when present`);
|
|
17
45
|
}
|
|
18
46
|
return !0;
|
|
47
|
+
}, h = (r, e, t) => {
|
|
48
|
+
if (!(e instanceof Uint8Array)) {
|
|
49
|
+
if (p(e)) {
|
|
50
|
+
if (a(e) && o(r, e, t))
|
|
51
|
+
return;
|
|
52
|
+
throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present');
|
|
53
|
+
}
|
|
54
|
+
if (!c(e))
|
|
55
|
+
throw new TypeError(n(r, e, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array"));
|
|
56
|
+
if (e.type !== "secret")
|
|
57
|
+
throw new TypeError(`${s(e)} instances for symmetric algorithms must be of type "secret"`);
|
|
58
|
+
}
|
|
59
|
+
}, m = (r, e, t) => {
|
|
60
|
+
if (p(e))
|
|
61
|
+
switch (t) {
|
|
62
|
+
case "decrypt":
|
|
63
|
+
case "sign":
|
|
64
|
+
if (f(e) && o(r, e, t))
|
|
65
|
+
return;
|
|
66
|
+
throw new TypeError("JSON Web Key for this operation be a private JWK");
|
|
67
|
+
case "encrypt":
|
|
68
|
+
case "verify":
|
|
69
|
+
if (y(e) && o(r, e, t))
|
|
70
|
+
return;
|
|
71
|
+
throw new TypeError("JSON Web Key for this operation be a public JWK");
|
|
72
|
+
}
|
|
73
|
+
if (!c(e))
|
|
74
|
+
throw new TypeError(n(r, e, "CryptoKey", "KeyObject", "JSON Web Key"));
|
|
75
|
+
if (e.type === "secret")
|
|
76
|
+
throw new TypeError(`${s(e)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
77
|
+
if (e.type === "public")
|
|
78
|
+
switch (t) {
|
|
79
|
+
case "sign":
|
|
80
|
+
throw new TypeError(`${s(e)} instances for asymmetric algorithm signing must be of type "private"`);
|
|
81
|
+
case "decrypt":
|
|
82
|
+
throw new TypeError(`${s(e)} instances for asymmetric algorithm decryption must be of type "private"`);
|
|
83
|
+
}
|
|
84
|
+
if (e.type === "private")
|
|
85
|
+
switch (t) {
|
|
86
|
+
case "verify":
|
|
87
|
+
throw new TypeError(`${s(e)} instances for asymmetric algorithm verifying must be of type "public"`);
|
|
88
|
+
case "encrypt":
|
|
89
|
+
throw new TypeError(`${s(e)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
90
|
+
}
|
|
91
|
+
}, d = (r, e, t) => {
|
|
92
|
+
r.startsWith("HS") || r === "dir" || r.startsWith("PBES2") || /^A(?:128|192|256)(?:GCM)?(?:KW)?$/.test(r) || /^A(?:128|192|256)CBC-HS(?:256|384|512)$/.test(r) ? h(r, e, t) : m(r, e, t);
|
|
19
93
|
};
|
|
20
94
|
export {
|
|
21
|
-
|
|
95
|
+
d as default
|
|
22
96
|
};
|
|
@@ -1,96 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (e.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
throw new TypeError(`Invalid key for this operation, its "use" must be "${i}" when present`);
|
|
1
|
+
import { JOSENotSupported as f } from "./index.native76.js";
|
|
2
|
+
const w = (n, r, a, e, s) => {
|
|
3
|
+
if (s.crit !== void 0 && e?.crit === void 0)
|
|
4
|
+
throw new n('"crit" (Critical) Header Parameter MUST be integrity protected');
|
|
5
|
+
if (!e || e.crit === void 0)
|
|
6
|
+
return /* @__PURE__ */ new Set();
|
|
7
|
+
if (!Array.isArray(e.crit) || e.crit.length === 0 || e.crit.some((i) => typeof i != "string" || i.length === 0))
|
|
8
|
+
throw new n('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');
|
|
9
|
+
let t;
|
|
10
|
+
a !== void 0 ? t = new Map([...Object.entries(a), ...r.entries()]) : t = r;
|
|
11
|
+
for (const i of e.crit) {
|
|
12
|
+
if (!t.has(i))
|
|
13
|
+
throw new f(`Extension Header Parameter "${i}" is not recognized`);
|
|
14
|
+
if (s[i] === void 0)
|
|
15
|
+
throw new n(`Extension Header Parameter "${i}" is missing`);
|
|
16
|
+
if (t.get(i) && e[i] === void 0)
|
|
17
|
+
throw new n(`Extension Header Parameter "${i}" MUST be integrity protected`);
|
|
19
18
|
}
|
|
20
|
-
|
|
21
|
-
throw new TypeError(`Invalid key for this operation, its "alg" must be "${r}" when present`);
|
|
22
|
-
if (Array.isArray(e.key_ops)) {
|
|
23
|
-
let i;
|
|
24
|
-
switch (!0) {
|
|
25
|
-
case t === "sign":
|
|
26
|
-
case r === "dir":
|
|
27
|
-
case r.includes("CBC-HS"):
|
|
28
|
-
i = t;
|
|
29
|
-
break;
|
|
30
|
-
case r.startsWith("PBES2"):
|
|
31
|
-
i = "deriveBits";
|
|
32
|
-
break;
|
|
33
|
-
case /^A\d{3}(?:GCM)?(?:KW)?$/.test(r):
|
|
34
|
-
!r.includes("GCM") && r.endsWith("KW") ? i = "unwrapKey" : i = t;
|
|
35
|
-
break;
|
|
36
|
-
case t === "encrypt":
|
|
37
|
-
i = "wrapKey";
|
|
38
|
-
break;
|
|
39
|
-
case t === "decrypt":
|
|
40
|
-
i = r.startsWith("RSA") ? "unwrapKey" : "deriveBits";
|
|
41
|
-
break;
|
|
42
|
-
}
|
|
43
|
-
if (i && e.key_ops?.includes?.(i) === !1)
|
|
44
|
-
throw new TypeError(`Invalid key for this operation, its "key_ops" must include "${i}" when present`);
|
|
45
|
-
}
|
|
46
|
-
return !0;
|
|
47
|
-
}, h = (r, e, t) => {
|
|
48
|
-
if (!(e instanceof Uint8Array)) {
|
|
49
|
-
if (p(e)) {
|
|
50
|
-
if (a(e) && o(r, e, t))
|
|
51
|
-
return;
|
|
52
|
-
throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present');
|
|
53
|
-
}
|
|
54
|
-
if (!c(e))
|
|
55
|
-
throw new TypeError(n(r, e, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array"));
|
|
56
|
-
if (e.type !== "secret")
|
|
57
|
-
throw new TypeError(`${s(e)} instances for symmetric algorithms must be of type "secret"`);
|
|
58
|
-
}
|
|
59
|
-
}, m = (r, e, t) => {
|
|
60
|
-
if (p(e))
|
|
61
|
-
switch (t) {
|
|
62
|
-
case "decrypt":
|
|
63
|
-
case "sign":
|
|
64
|
-
if (f(e) && o(r, e, t))
|
|
65
|
-
return;
|
|
66
|
-
throw new TypeError("JSON Web Key for this operation be a private JWK");
|
|
67
|
-
case "encrypt":
|
|
68
|
-
case "verify":
|
|
69
|
-
if (y(e) && o(r, e, t))
|
|
70
|
-
return;
|
|
71
|
-
throw new TypeError("JSON Web Key for this operation be a public JWK");
|
|
72
|
-
}
|
|
73
|
-
if (!c(e))
|
|
74
|
-
throw new TypeError(n(r, e, "CryptoKey", "KeyObject", "JSON Web Key"));
|
|
75
|
-
if (e.type === "secret")
|
|
76
|
-
throw new TypeError(`${s(e)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
77
|
-
if (e.type === "public")
|
|
78
|
-
switch (t) {
|
|
79
|
-
case "sign":
|
|
80
|
-
throw new TypeError(`${s(e)} instances for asymmetric algorithm signing must be of type "private"`);
|
|
81
|
-
case "decrypt":
|
|
82
|
-
throw new TypeError(`${s(e)} instances for asymmetric algorithm decryption must be of type "private"`);
|
|
83
|
-
}
|
|
84
|
-
if (e.type === "private")
|
|
85
|
-
switch (t) {
|
|
86
|
-
case "verify":
|
|
87
|
-
throw new TypeError(`${s(e)} instances for asymmetric algorithm verifying must be of type "public"`);
|
|
88
|
-
case "encrypt":
|
|
89
|
-
throw new TypeError(`${s(e)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
90
|
-
}
|
|
91
|
-
}, d = (r, e, t) => {
|
|
92
|
-
r.startsWith("HS") || r === "dir" || r.startsWith("PBES2") || /^A(?:128|192|256)(?:GCM)?(?:KW)?$/.test(r) || /^A(?:128|192|256)CBC-HS(?:256|384|512)$/.test(r) ? h(r, e, t) : m(r, e, t);
|
|
19
|
+
return new Set(e.crit);
|
|
93
20
|
};
|
|
94
21
|
export {
|
|
95
|
-
|
|
22
|
+
w as default
|
|
96
23
|
};
|