@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
@@ -1,26 +1,90 @@
1
+ import { verifyOAuth as i } from "./index.web9.js";
2
+ import { getPlatformOAuth as h } from "./index.web4.js";
1
3
  import "@coinbase/cdp-api-client";
2
- const e = (t) => ({
3
- userId: t.userId,
4
- // Deprecated fields - keep for backward compatibility
5
- evmAccounts: t.evmAccounts?.map((c) => c) ?? [],
6
- evmSmartAccounts: t.evmSmartAccounts?.map((c) => c) ?? [],
7
- solanaAccounts: t.solanaAccounts?.map((c) => c) ?? [],
8
- // New account object fields
9
- evmAccountObjects: t.evmAccountObjects,
10
- evmSmartAccountObjects: t.evmSmartAccountObjects,
11
- solanaAccountObjects: t.solanaAccountObjects,
12
- authenticationMethods: t.authenticationMethods.reduce((c, a) => (c[a.type] = a, c), {}),
13
- mfaMethods: t.mfaMethods,
14
- lastAuthenticatedAt: t.lastAuthenticatedAt
15
- }), s = (t, c, a) => {
16
- const o = new Date(c).getTime();
17
- return {
18
- accessToken: t,
19
- expiresAt: o,
20
- user: e(a)
21
- };
22
- };
4
+ import "viem";
5
+ class A {
6
+ oauthFlowState = null;
7
+ oauthStateChangeCallbacks = [];
8
+ /**
9
+ * Adds a callback to be called when the OAuth state changes.
10
+ *
11
+ * @param callback - The function to call when the OAuth state changes.
12
+ */
13
+ async addOAuthStateChangeCallback(t) {
14
+ this.oauthStateChangeCallbacks.push(t), t(this.oauthFlowState);
15
+ }
16
+ /**
17
+ * Sets the OAuth flow state.
18
+ *
19
+ * @param oauthFlowState - The OAuth flow state.
20
+ */
21
+ async setOAuthFlowState(t) {
22
+ this.oauthFlowState = t, this.oauthStateChangeCallbacks.forEach((a) => a(this.oauthFlowState));
23
+ }
24
+ /**
25
+ * Clears the OAuth flow state.
26
+ */
27
+ async clearOAuthFlowState() {
28
+ this.oauthFlowState = null, this.oauthStateChangeCallbacks.forEach((t) => t(null));
29
+ }
30
+ /**
31
+ * Gets the OAuth flow state.
32
+ *
33
+ * @returns The OAuth flow state.
34
+ */
35
+ async getOAuthFlowState() {
36
+ return this.oauthFlowState;
37
+ }
38
+ /**
39
+ * Handles the OAuth code.
40
+ *
41
+ * @param url - The URL to handle.
42
+ * @returns A promise that resolves when the OAuth code is handled.
43
+ * @throws An error if the URL is required and not provided.
44
+ */
45
+ async handleOAuthCode(t) {
46
+ try {
47
+ const a = await h().getOAuthParams(t);
48
+ if (await h().cleanupOAuthParams(), !a)
49
+ return;
50
+ const { providerType: e, code: r, flowId: o, error: s, errorDescription: u } = a;
51
+ if (s || u) {
52
+ await this.setOAuthFlowState({
53
+ providerType: e,
54
+ status: "error",
55
+ errorDescription: s ?? u,
56
+ code: r,
57
+ flowId: o,
58
+ error: s
59
+ });
60
+ return;
61
+ }
62
+ if (!r || !e || !o)
63
+ return;
64
+ await this.setOAuthFlowState({
65
+ providerType: e,
66
+ status: "pending",
67
+ code: r,
68
+ flowId: o
69
+ }), await i({
70
+ code: r,
71
+ providerType: e,
72
+ flowId: o
73
+ }), await this.setOAuthFlowState({
74
+ providerType: e,
75
+ status: "success",
76
+ code: r,
77
+ flowId: o
78
+ });
79
+ } catch (a) {
80
+ const e = a instanceof Error ? a.message : "Unknown error";
81
+ await h().cleanupOAuthParams(), await this.setOAuthFlowState({
82
+ status: "error",
83
+ errorDescription: e
84
+ });
85
+ }
86
+ }
87
+ }
23
88
  export {
24
- s as toAuthState,
25
- e as toAuthStateUser
89
+ A as OAuthManager
26
90
  };
@@ -1,20 +1,26 @@
1
1
  import "@coinbase/cdp-api-client";
2
- import "viem";
3
- const u = async (c) => await c.isSignedIn();
4
- async function A(c, a, r) {
5
- if (!await u(a))
6
- throw new Error("User not signed in");
7
- const t = a.getUser();
8
- if ("evmAccount" in c && !(t.evmAccounts?.find((n) => n === c.evmAccount) || t.evmAccountObjects?.find((n) => n.address === c.evmAccount)))
9
- throw new Error("EVM account not found");
10
- if ("evmSmartAccount" in c && !(t.evmSmartAccounts?.find((n) => n === c.evmSmartAccount) || t.evmSmartAccountObjects?.find((n) => n.address === c.evmSmartAccount)))
11
- throw new Error("EVM Smart Account not found");
12
- if ("solanaAccount" in c && !(t.solanaAccounts?.find((n) => n === c.solanaAccount) || t.solanaAccountObjects?.find((n) => n.address === c.solanaAccount)))
13
- throw new Error("Solana account not found");
14
- const e = await a.getWalletSecretId();
15
- return r({ ...c, user: t, walletSecretId: e });
16
- }
2
+ const e = (t) => ({
3
+ userId: t.userId,
4
+ // Deprecated fields - keep for backward compatibility
5
+ evmAccounts: t.evmAccounts?.map((c) => c) ?? [],
6
+ evmSmartAccounts: t.evmSmartAccounts?.map((c) => c) ?? [],
7
+ solanaAccounts: t.solanaAccounts?.map((c) => c) ?? [],
8
+ // New account object fields
9
+ evmAccountObjects: t.evmAccountObjects,
10
+ evmSmartAccountObjects: t.evmSmartAccountObjects,
11
+ solanaAccountObjects: t.solanaAccountObjects,
12
+ authenticationMethods: t.authenticationMethods.reduce((c, a) => (c[a.type] = a, c), {}),
13
+ mfaMethods: t.mfaMethods,
14
+ lastAuthenticatedAt: t.lastAuthenticatedAt
15
+ }), s = (t, c, a) => {
16
+ const o = new Date(c).getTime();
17
+ return {
18
+ accessToken: t,
19
+ expiresAt: o,
20
+ user: e(a)
21
+ };
22
+ };
17
23
  export {
18
- u as isSignedIn,
19
- A as withAuth
24
+ s as toAuthState,
25
+ e as toAuthStateUser
20
26
  };
@@ -1,30 +1,20 @@
1
1
  import "@coinbase/cdp-api-client";
2
2
  import "viem";
3
- let r = null, n = null, e = null;
4
- const a = (t) => {
5
- r = t;
6
- }, g = () => {
7
- if (!r)
8
- throw new Error("SDK not initialized");
9
- return r;
10
- }, l = (t) => {
11
- n = t;
12
- }, u = () => {
13
- if (!n)
14
- throw new Error("SDK not initialized");
15
- return n;
16
- }, h = (t) => {
17
- e = t;
18
- }, s = () => {
19
- if (!e)
20
- throw new Error("SDK not initialized");
21
- return e;
22
- };
3
+ const u = async (c) => await c.isSignedIn();
4
+ async function A(c, a, r) {
5
+ if (!await u(a))
6
+ throw new Error("User not signed in");
7
+ const t = a.getUser();
8
+ if ("evmAccount" in c && !(t.evmAccounts?.find((n) => n === c.evmAccount) || t.evmAccountObjects?.find((n) => n.address === c.evmAccount)))
9
+ throw new Error("EVM account not found");
10
+ if ("evmSmartAccount" in c && !(t.evmSmartAccounts?.find((n) => n === c.evmSmartAccount) || t.evmSmartAccountObjects?.find((n) => n.address === c.evmSmartAccount)))
11
+ throw new Error("EVM Smart Account not found");
12
+ if ("solanaAccount" in c && !(t.solanaAccounts?.find((n) => n === c.solanaAccount) || t.solanaAccountObjects?.find((n) => n.address === c.solanaAccount)))
13
+ throw new Error("Solana account not found");
14
+ const e = await a.getWalletSecretId();
15
+ return r({ ...c, user: t, walletSecretId: e });
16
+ }
23
17
  export {
24
- g as getConfig,
25
- u as getCoreAuthManager,
26
- s as getCoreOAuthManager,
27
- a as setConfig,
28
- l as setCoreAuthManager,
29
- h as setCoreOAuthManager
18
+ u as isSignedIn,
19
+ A as withAuth
30
20
  };
@@ -1,7 +1,7 @@
1
1
  import { getTransactionEncoder as u, getTransactionDecoder as f, address as g } from "@solana/kit";
2
2
  import { getCurrentUserSync as l } from "./index.web13.js";
3
3
  import { signSolanaTransaction as m } from "./index.web9.js";
4
- import { encodeBase64 as T, decodeBase64 as h } from "./index.web48.js";
4
+ import { encodeBase64 as T, decodeBase64 as h } from "./index.web49.js";
5
5
  function E(n) {
6
6
  const o = l();
7
7
  if (!o || !o.solanaAccountObjects?.length)
@@ -1,7 +1,7 @@
1
1
  import { Analytics as E } from "./index.web2.js";
2
2
  import "./index.web3.js";
3
3
  import { VERSION as r } from "./index.web8.js";
4
- import "./index.web49.js";
4
+ import "./index.web50.js";
5
5
  import { APIError as c, ErrorType as P, HttpErrorType as U, OAuth2ProviderType as F, SendEvmTransactionWithEndUserAccountBodyNetwork as I, SendSolanaTransactionWithEndUserAccountBodyNetwork as d } from "@coinbase/cdp-api-client";
6
6
  import "@solana/web3.js";
7
7
  import "bs58";
@@ -1,4 +1,4 @@
1
- const o = "0.0.80";
1
+ const o = "0.0.81";
2
2
  export {
3
3
  o as VERSION
4
4
  };
@@ -1,17 +1,17 @@
1
- import { b as l } from "./index.web49.js";
1
+ import { b as l } from "./index.web50.js";
2
2
  import { configureCdpApiClient as b, setAuthManager as j, authenticateUserWithCustomAuth as P, initiateAuthentication as x, createEndUserEvmAccount as K, createEndUserEvmSmartAccount as E, createEndUserSolanaAccount as W, verifyEmailAuthentication as H, verifySmsAuthentication as R, verifyOAuthCode as B, signEvmHashWithEndUserAccount as D, signEvmTransactionWithEndUserAccount as N, signSolanaTransactionWithEndUserAccount as F, sendEvmTransactionWithEndUserAccount as J, sendSolanaTransactionWithEndUserAccount as L, signEvmMessageWithEndUserAccount as z, signSolanaMessageWithEndUserAccount as $, signEvmTypedDataWithEndUserAccount as V, sendUserOperationWithEndUserAccount as q, getUserOperationWithEndUserAccount as G, exportEndUserEvmAccount as Q, exportEndUserSolanaAccount as X } from "@coinbase/cdp-api-client";
3
3
  import { Analytics as c } from "./index.web2.js";
4
4
  import "./index.web3.js";
5
5
  import { Keypair as S } from "@solana/web3.js";
6
6
  import I from "bs58";
7
- import { createAuthManager as Y } from "./index.web50.js";
8
- import { CUSTOM_AUTH_REFRESH_BUFFER_MS as Z } from "./index.web51.js";
9
- import { OAuthManager as ee } from "./index.web52.js";
10
- import { toAuthState as h } from "./index.web53.js";
11
- import { withAuth as d } from "./index.web54.js";
7
+ import { createAuthManager as Y } from "./index.web51.js";
8
+ import { CUSTOM_AUTH_REFRESH_BUFFER_MS as Z } from "./index.web52.js";
9
+ import { OAuthManager as ee } from "./index.web53.js";
10
+ import { toAuthState as h } from "./index.web54.js";
11
+ import { withAuth as d } from "./index.web55.js";
12
12
  import { CustomAuthError as y } from "./index.web39.js";
13
13
  import { withMfa as m } from "./index.web36.js";
14
- import { getConfig as a, setCoreAuthManager as _, setCoreOAuthManager as U, getCoreAuthManager as o, getCoreOAuthManager as te, setConfig as ne } from "./index.web55.js";
14
+ import { getConfig as a, setCoreAuthManager as _, setCoreOAuthManager as U, getCoreAuthManager as o, getCoreOAuthManager as te, setConfig as ne } from "./index.web48.js";
15
15
  import { MockAuthManager as re } from "./index.web56.js";
16
16
  import { MockOAuthManager as se } from "./index.web57.js";
17
17
  import { mockUser as w } from "./index.web58.js";
@@ -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
  };