@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.
Files changed (267) hide show
  1. package/dist/esm/index.native.js +15 -13
  2. package/dist/esm/index.native10.js +1 -1
  3. package/dist/esm/index.native11.js +1 -1
  4. package/dist/esm/index.native12.js +1 -1
  5. package/dist/esm/index.native122.js +1 -1
  6. package/dist/esm/index.native123.js +1 -1
  7. package/dist/esm/index.native125.js +6 -6
  8. package/dist/esm/index.native13.js +1 -1
  9. package/dist/esm/index.native14.js +1 -1
  10. package/dist/esm/index.native155.js +1 -1
  11. package/dist/esm/index.native16.js +1 -1
  12. package/dist/esm/index.native162.js +20 -4
  13. package/dist/esm/index.native163.js +10 -21
  14. package/dist/esm/index.native164.js +19 -9
  15. package/dist/esm/index.native165.js +89 -15
  16. package/dist/esm/index.native166.js +19 -92
  17. package/dist/esm/index.native167.js +115 -18
  18. package/dist/esm/index.native168.js +5 -118
  19. package/dist/esm/index.native17.js +1 -1
  20. package/dist/esm/index.native172.js +38 -7
  21. package/dist/esm/index.native174.js +67 -375
  22. package/dist/esm/index.native175.js +34 -835
  23. package/dist/esm/index.native176.js +20 -38
  24. package/dist/esm/index.native177.js +8 -2
  25. package/dist/esm/index.native178.js +2 -70
  26. package/dist/esm/index.native179.js +373 -30
  27. package/dist/esm/index.native18.js +1 -1
  28. package/dist/esm/index.native180.js +835 -20
  29. package/dist/esm/index.native182.js +18 -2
  30. package/dist/esm/index.native183.js +28 -109
  31. package/dist/esm/index.native184.js +8 -2
  32. package/dist/esm/index.native185.js +11 -18
  33. package/dist/esm/index.native186.js +13 -28
  34. package/dist/esm/index.native187.js +10 -8
  35. package/dist/esm/index.native188.js +17 -11
  36. package/dist/esm/index.native189.js +80 -12
  37. package/dist/esm/index.native19.js +1 -1
  38. package/dist/esm/index.native190.js +2 -10
  39. package/dist/esm/index.native191.js +108 -16
  40. package/dist/esm/index.native192.js +2 -81
  41. package/dist/esm/index.native194.js +2 -2
  42. package/dist/esm/index.native195.js +2 -2
  43. package/dist/esm/index.native196.js +2 -2
  44. package/dist/esm/index.native20.js +1 -1
  45. package/dist/esm/index.native21.js +1 -1
  46. package/dist/esm/index.native22.js +1 -1
  47. package/dist/esm/index.native23.js +1 -1
  48. package/dist/esm/index.native24.js +1 -1
  49. package/dist/esm/index.native25.js +1 -1
  50. package/dist/esm/index.native26.js +1 -1
  51. package/dist/esm/index.native28.js +1 -1
  52. package/dist/esm/index.native29.js +1 -1
  53. package/dist/esm/index.native3.js +1 -1
  54. package/dist/esm/index.native30.js +1 -1
  55. package/dist/esm/index.native31.js +1 -1
  56. package/dist/esm/index.native32.js +1 -1
  57. package/dist/esm/index.native33.js +1 -1
  58. package/dist/esm/index.native37.js +1 -1
  59. package/dist/esm/index.native39.js +1 -1
  60. package/dist/esm/index.native4.js +1 -1
  61. package/dist/esm/index.native46.js +27 -31
  62. package/dist/esm/index.native47.js +31 -27
  63. package/dist/esm/index.native49.js +1 -1
  64. package/dist/esm/index.native5.js +1 -1
  65. package/dist/esm/index.native50.js +1 -1
  66. package/dist/esm/index.native60.js +1 -1
  67. package/dist/esm/index.native69.js +3 -3
  68. package/dist/esm/index.native72.js +1 -1
  69. package/dist/esm/index.native73.js +1 -1
  70. package/dist/esm/index.native74.js +1 -1
  71. package/dist/esm/index.native78.js +377 -2
  72. package/dist/esm/index.native79.js +29 -2
  73. package/dist/esm/index.native80.js +26 -374
  74. package/dist/esm/index.native81.js +2 -29
  75. package/dist/esm/index.native82.js +2 -29
  76. package/dist/esm/index.native9.js +1 -1
  77. package/dist/esm/index.web.js +9 -7
  78. package/dist/esm/index.web10.js +2 -2
  79. package/dist/esm/index.web11.js +2 -2
  80. package/dist/esm/index.web12.js +2 -2
  81. package/dist/esm/index.web13.js +1 -1
  82. package/dist/esm/index.web15.js +1 -1
  83. package/dist/esm/index.web154.js +1 -1
  84. package/dist/esm/index.web16.js +1 -1
  85. package/dist/esm/index.web17.js +1 -1
  86. package/dist/esm/index.web171.js +38 -7
  87. package/dist/esm/index.web173.js +67 -375
  88. package/dist/esm/index.web174.js +34 -835
  89. package/dist/esm/index.web175.js +20 -38
  90. package/dist/esm/index.web176.js +8 -2
  91. package/dist/esm/index.web177.js +2 -70
  92. package/dist/esm/index.web178.js +373 -30
  93. package/dist/esm/index.web179.js +835 -20
  94. package/dist/esm/index.web18.js +1 -1
  95. package/dist/esm/index.web19.js +1 -1
  96. package/dist/esm/index.web193.js +2 -2
  97. package/dist/esm/index.web194.js +2 -2
  98. package/dist/esm/index.web195.js +2 -2
  99. package/dist/esm/index.web20.js +2 -2
  100. package/dist/esm/index.web21.js +2 -2
  101. package/dist/esm/index.web22.js +2 -2
  102. package/dist/esm/index.web23.js +2 -2
  103. package/dist/esm/index.web24.js +2 -2
  104. package/dist/esm/index.web25.js +2 -2
  105. package/dist/esm/index.web27.js +1 -1
  106. package/dist/esm/index.web28.js +2 -2
  107. package/dist/esm/index.web29.js +2 -2
  108. package/dist/esm/index.web3.js +1 -1
  109. package/dist/esm/index.web30.js +3 -3
  110. package/dist/esm/index.web31.js +2 -2
  111. package/dist/esm/index.web32.js +2 -2
  112. package/dist/esm/index.web36.js +1 -1
  113. package/dist/esm/index.web38.js +2 -2
  114. package/dist/esm/index.web47.js +1 -1
  115. package/dist/esm/index.web48.js +27 -31
  116. package/dist/esm/index.web49.js +32 -3
  117. package/dist/esm/index.web5.js +1 -1
  118. package/dist/esm/index.web50.js +3 -9
  119. package/dist/esm/index.web51.js +8 -64
  120. package/dist/esm/index.web52.js +47 -70
  121. package/dist/esm/index.web53.js +87 -23
  122. package/dist/esm/index.web54.js +23 -17
  123. package/dist/esm/index.web55.js +16 -26
  124. package/dist/esm/index.web62.js +1 -1
  125. package/dist/esm/index.web70.js +1 -1
  126. package/dist/esm/index.web8.js +1 -1
  127. package/dist/esm/index.web9.js +7 -7
  128. package/dist/native/index.native.js +15 -13
  129. package/dist/native/index.native10.js +1 -1
  130. package/dist/native/index.native11.js +1 -1
  131. package/dist/native/index.native12.js +1 -1
  132. package/dist/native/index.native122.js +1 -1
  133. package/dist/native/index.native123.js +1 -1
  134. package/dist/native/index.native125.js +6 -6
  135. package/dist/native/index.native13.js +1 -1
  136. package/dist/native/index.native14.js +1 -1
  137. package/dist/native/index.native155.js +1 -1
  138. package/dist/native/index.native16.js +1 -1
  139. package/dist/native/index.native162.js +20 -4
  140. package/dist/native/index.native163.js +10 -21
  141. package/dist/native/index.native164.js +19 -9
  142. package/dist/native/index.native165.js +89 -15
  143. package/dist/native/index.native166.js +19 -92
  144. package/dist/native/index.native167.js +115 -18
  145. package/dist/native/index.native168.js +5 -118
  146. package/dist/native/index.native17.js +1 -1
  147. package/dist/native/index.native172.js +38 -7
  148. package/dist/native/index.native174.js +67 -375
  149. package/dist/native/index.native175.js +34 -835
  150. package/dist/native/index.native176.js +20 -38
  151. package/dist/native/index.native177.js +8 -2
  152. package/dist/native/index.native178.js +2 -70
  153. package/dist/native/index.native179.js +373 -30
  154. package/dist/native/index.native18.js +1 -1
  155. package/dist/native/index.native180.js +835 -20
  156. package/dist/native/index.native182.js +18 -2
  157. package/dist/native/index.native183.js +28 -109
  158. package/dist/native/index.native184.js +8 -2
  159. package/dist/native/index.native185.js +11 -18
  160. package/dist/native/index.native186.js +13 -28
  161. package/dist/native/index.native187.js +10 -8
  162. package/dist/native/index.native188.js +17 -11
  163. package/dist/native/index.native189.js +80 -12
  164. package/dist/native/index.native19.js +1 -1
  165. package/dist/native/index.native190.js +2 -10
  166. package/dist/native/index.native191.js +108 -16
  167. package/dist/native/index.native192.js +2 -81
  168. package/dist/native/index.native194.js +2 -2
  169. package/dist/native/index.native195.js +2 -2
  170. package/dist/native/index.native196.js +2 -2
  171. package/dist/native/index.native20.js +1 -1
  172. package/dist/native/index.native21.js +1 -1
  173. package/dist/native/index.native22.js +1 -1
  174. package/dist/native/index.native23.js +1 -1
  175. package/dist/native/index.native24.js +1 -1
  176. package/dist/native/index.native25.js +1 -1
  177. package/dist/native/index.native26.js +1 -1
  178. package/dist/native/index.native28.js +1 -1
  179. package/dist/native/index.native29.js +1 -1
  180. package/dist/native/index.native3.js +1 -1
  181. package/dist/native/index.native30.js +1 -1
  182. package/dist/native/index.native31.js +1 -1
  183. package/dist/native/index.native32.js +1 -1
  184. package/dist/native/index.native33.js +1 -1
  185. package/dist/native/index.native37.js +1 -1
  186. package/dist/native/index.native39.js +1 -1
  187. package/dist/native/index.native4.js +1 -1
  188. package/dist/native/index.native46.js +27 -31
  189. package/dist/native/index.native47.js +31 -27
  190. package/dist/native/index.native49.js +1 -1
  191. package/dist/native/index.native5.js +1 -1
  192. package/dist/native/index.native50.js +1 -1
  193. package/dist/native/index.native60.js +1 -1
  194. package/dist/native/index.native69.js +3 -3
  195. package/dist/native/index.native72.js +1 -1
  196. package/dist/native/index.native73.js +1 -1
  197. package/dist/native/index.native74.js +1 -1
  198. package/dist/native/index.native78.js +377 -2
  199. package/dist/native/index.native79.js +29 -2
  200. package/dist/native/index.native80.js +26 -374
  201. package/dist/native/index.native81.js +2 -29
  202. package/dist/native/index.native82.js +2 -29
  203. package/dist/native/index.native9.js +1 -1
  204. package/dist/native-types/index.d.ts +1 -0
  205. package/dist/native-types/index.native.d.ts +1 -0
  206. package/dist/native-types/index.web.d.ts +1 -0
  207. package/dist/native-types/version.d.ts +1 -1
  208. package/dist/types/index.d.ts +1 -0
  209. package/dist/types/index.native.d.ts +1 -0
  210. package/dist/types/index.web.d.ts +1 -0
  211. package/dist/types/version.d.ts +1 -1
  212. package/dist/web/index.web.js +9 -7
  213. package/dist/web/index.web10.js +2 -2
  214. package/dist/web/index.web11.js +2 -2
  215. package/dist/web/index.web12.js +2 -2
  216. package/dist/web/index.web13.js +1 -1
  217. package/dist/web/index.web15.js +1 -1
  218. package/dist/web/index.web154.js +1 -1
  219. package/dist/web/index.web16.js +1 -1
  220. package/dist/web/index.web17.js +1 -1
  221. package/dist/web/index.web171.js +38 -7
  222. package/dist/web/index.web173.js +67 -375
  223. package/dist/web/index.web174.js +34 -835
  224. package/dist/web/index.web175.js +20 -38
  225. package/dist/web/index.web176.js +8 -2
  226. package/dist/web/index.web177.js +2 -70
  227. package/dist/web/index.web178.js +373 -30
  228. package/dist/web/index.web179.js +835 -20
  229. package/dist/web/index.web18.js +1 -1
  230. package/dist/web/index.web19.js +1 -1
  231. package/dist/web/index.web193.js +2 -2
  232. package/dist/web/index.web194.js +2 -2
  233. package/dist/web/index.web195.js +2 -2
  234. package/dist/web/index.web20.js +2 -2
  235. package/dist/web/index.web21.js +2 -2
  236. package/dist/web/index.web22.js +2 -2
  237. package/dist/web/index.web23.js +2 -2
  238. package/dist/web/index.web24.js +2 -2
  239. package/dist/web/index.web25.js +2 -2
  240. package/dist/web/index.web27.js +1 -1
  241. package/dist/web/index.web28.js +2 -2
  242. package/dist/web/index.web29.js +2 -2
  243. package/dist/web/index.web3.js +1 -1
  244. package/dist/web/index.web30.js +3 -3
  245. package/dist/web/index.web31.js +2 -2
  246. package/dist/web/index.web32.js +2 -2
  247. package/dist/web/index.web36.js +1 -1
  248. package/dist/web/index.web38.js +2 -2
  249. package/dist/web/index.web47.js +1 -1
  250. package/dist/web/index.web48.js +27 -31
  251. package/dist/web/index.web49.js +32 -3
  252. package/dist/web/index.web5.js +1 -1
  253. package/dist/web/index.web50.js +3 -9
  254. package/dist/web/index.web51.js +8 -64
  255. package/dist/web/index.web52.js +47 -70
  256. package/dist/web/index.web53.js +87 -23
  257. package/dist/web/index.web54.js +23 -17
  258. package/dist/web/index.web55.js +16 -26
  259. package/dist/web/index.web62.js +1 -1
  260. package/dist/web/index.web70.js +1 -1
  261. package/dist/web/index.web8.js +1 -1
  262. package/dist/web/index.web9.js +7 -7
  263. package/dist/web-types/index.d.ts +1 -0
  264. package/dist/web-types/index.native.d.ts +1 -0
  265. package/dist/web-types/index.web.d.ts +1 -0
  266. package/dist/web-types/version.d.ts +1 -1
  267. package/package.json +2 -2
@@ -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 y, isSignedIn as C, 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";
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 xr } from "./index.native18.js";
19
- import { linkOAuth as ur } from "./index.native19.js";
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 yr } from "./index.native24.js";
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 lo, ModuleResolutionError as xo, ValidationError as uo } from "./index.native42.js";
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
- lo as MfaError,
67
- xo as ModuleResolutionError,
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
- uo as ValidationError,
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
- y as initialize,
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
- C as isSignedIn,
98
+ y as isSignedIn,
97
99
  Sr as linkApple,
98
- xr as linkEmail,
100
+ lr as linkEmail,
99
101
  pr as linkGoogle,
100
- ur as linkOAuth,
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
- yr as sendEvmEoaUsdc,
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.native47.js";
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.native47.js";
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.native47.js";
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.native183.js";
1
+ import { __require as e } from "./index.native191.js";
2
2
  e();
@@ -1,4 +1,4 @@
1
- import { getVersion as n } from "./index.native162.js";
1
+ import { getVersion as n } from "./index.native168.js";
2
2
  class s extends Error {
3
3
  constructor(r, e = {}) {
4
4
  const a = (() => {
@@ -1,11 +1,11 @@
1
- import { encode as d } from "./index.native163.js";
2
- import y from "./index.native164.js";
3
- import b from "./index.native165.js";
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.native166.js";
7
- import H from "./index.native167.js";
8
- import P from "./index.native168.js";
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.native47.js";
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.native47.js";
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());
@@ -1,5 +1,5 @@
1
1
  import { getDefaultExportFromCjs as r } from "./index.native170.js";
2
- import { __require as o } from "./index.native176.js";
2
+ import { __require as o } from "./index.native172.js";
3
3
  var t = o();
4
4
  const a = /* @__PURE__ */ r(t);
5
5
  export {
@@ -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.native47.js";
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 { version as r } from "./index.native182.js";
2
- function e() {
3
- return r;
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
- e as getVersion
21
+ i as decode,
22
+ p as encode
7
23
  };
@@ -1,23 +1,12 @@
1
- import { encoder as t, decoder as o } from "./index.native126.js";
2
- import { encodeBase64 as c, decodeBase64 as a } from "./index.native185.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, "_");
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
- i as decode,
22
- p as encode
11
+ y as default
23
12
  };
@@ -1,12 +1,22 @@
1
- import n from "./index.native186.js";
2
- import s from "./index.native187.js";
3
- import a from "./index.native188.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);
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
- y as default
21
+ a as default
12
22
  };
@@ -1,22 +1,96 @@
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;
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
- for (const n of r) {
13
- if (e.has(n))
14
- return !1;
15
- e.add(n);
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
- a as default
95
+ d as default
22
96
  };
@@ -1,96 +1,23 @@
1
- import { withAlg as n } from "./index.native189.js";
2
- import c from "./index.native190.js";
3
- import { isJWK as p, isSecretJWK as a, isPublicJWK as y, isPrivateJWK as f } from "./index.native191.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;
16
- }
17
- if (e.use !== i)
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
- 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;
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
- d as default
22
+ w as default
96
23
  };