@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
@@ -2,7 +2,7 @@ import { initiateAuthentication as e } from "@coinbase/cdp-api-client";
2
2
  import { Analytics as o } from "./index.web2.js";
3
3
  import "./index.web3.js";
4
4
  import { getPlatformOAuth as n } from "./index.web4.js";
5
- import { getCoreAuthManager as r, getConfig as a } from "./index.web55.js";
5
+ import { getCoreAuthManager as r, getConfig as a } from "./index.web48.js";
6
6
  async function g(t) {
7
7
  if (o.sendActionCallEvent({ name: "link_oauth" }), !await r().isSignedIn())
8
8
  throw new Error("User must be signed in to link an OAuth account");
@@ -2,7 +2,7 @@ import { initiateAuthentication as e } from "@coinbase/cdp-api-client";
2
2
  import { Analytics as n } from "./index.web2.js";
3
3
  import "./index.web3.js";
4
4
  import { getPlatformOAuth as i } from "./index.web4.js";
5
- import { getCoreAuthManager as r, getConfig as o } from "./index.web55.js";
5
+ import { getCoreAuthManager as r, getConfig as o } from "./index.web48.js";
6
6
  async function g() {
7
7
  if (n.sendActionCallEvent({ name: "link_apple" }), !await r().isSignedIn())
8
8
  throw new Error("User must be signed in to link an Apple account");
@@ -1,4 +1,4 @@
1
- var r = {};
1
+ var r = { exports: {} };
2
2
  export {
3
- r as __exports
3
+ r as __module
4
4
  };
@@ -1,4 +1,4 @@
1
- var e = { exports: {} };
1
+ var r = {};
2
2
  export {
3
- e as __module
3
+ r as __exports
4
4
  };
@@ -1,4 +1,4 @@
1
- var r = { exports: {} };
1
+ var e = { exports: {} };
2
2
  export {
3
- r as __module
3
+ e as __module
4
4
  };
@@ -1,10 +1,10 @@
1
1
  import { createEndUserEvmAccount as u } from "@coinbase/cdp-api-client";
2
2
  import { Analytics as i } from "./index.web2.js";
3
3
  import "./index.web3.js";
4
- import { toAuthStateUser as m } from "./index.web53.js";
4
+ import { toAuthStateUser as m } from "./index.web54.js";
5
5
  import { InternalError as A } from "./index.web41.js";
6
6
  import { validateUserAuthState as d } from "./index.web63.js";
7
- import { getCoreAuthManager as h, getConfig as f } from "./index.web55.js";
7
+ import { getCoreAuthManager as h, getConfig as f } from "./index.web48.js";
8
8
  async function U() {
9
9
  i.sendActionCallEvent({ name: "create_evm_eoa_account" });
10
10
  const t = h(), { user: e, authState: a } = d(
@@ -1,9 +1,9 @@
1
1
  import { APIError as w, createEndUserEvmSmartAccount as A } from "@coinbase/cdp-api-client";
2
2
  import { Analytics as h } from "./index.web2.js";
3
3
  import "./index.web3.js";
4
- import { toAuthStateUser as f } from "./index.web53.js";
4
+ import { toAuthStateUser as f } from "./index.web54.js";
5
5
  import { InternalError as l } from "./index.web41.js";
6
- import { getCoreAuthManager as S, getConfig as E } from "./index.web55.js";
6
+ import { getCoreAuthManager as S, getConfig as E } from "./index.web48.js";
7
7
  import { createEvmEoaAccount as g } from "./index.web20.js";
8
8
  import { validateUserAuthState as v } from "./index.web63.js";
9
9
  async function _(r) {
@@ -1,10 +1,10 @@
1
1
  import { createEndUserSolanaAccount as u } from "@coinbase/cdp-api-client";
2
2
  import { Analytics as i } from "./index.web2.js";
3
3
  import "./index.web3.js";
4
- import { toAuthStateUser as l } from "./index.web53.js";
4
+ import { toAuthStateUser as l } from "./index.web54.js";
5
5
  import { InternalError as m } from "./index.web41.js";
6
6
  import { validateUserAuthState as A } from "./index.web63.js";
7
- import { getCoreAuthManager as d, getConfig as h } from "./index.web55.js";
7
+ import { getCoreAuthManager as d, getConfig as h } from "./index.web48.js";
8
8
  async function C() {
9
9
  i.sendActionCallEvent({ name: "create_solana_account" });
10
10
  const t = d(), { user: e, authState: r } = A(
@@ -1,8 +1,8 @@
1
1
  import { sendEvmAssetWithEndUserAccount as o } from "@coinbase/cdp-api-client";
2
2
  import { Analytics as s } from "./index.web2.js";
3
3
  import "./index.web3.js";
4
- import { withAuth as c } from "./index.web54.js";
5
- import { getConfig as n, getCoreAuthManager as m } from "./index.web55.js";
4
+ import { withAuth as c } from "./index.web55.js";
5
+ import { getConfig as n, getCoreAuthManager as m } from "./index.web48.js";
6
6
  const A = async (t) => (s.sendActionCallEvent({ name: "send_evm_eoa_usdc" }), n().useMock ? {
7
7
  transactionHash: "0x0"
8
8
  } : c(t, m(), async ({ user: a, walletSecretId: e }) => {
@@ -1,8 +1,8 @@
1
1
  import { sendEvmAssetWithEndUserAccount as m } from "@coinbase/cdp-api-client";
2
2
  import { Analytics as n } from "./index.web2.js";
3
3
  import "./index.web3.js";
4
- import { withAuth as u } from "./index.web54.js";
5
- import { getConfig as t, getCoreAuthManager as c } from "./index.web55.js";
4
+ import { withAuth as u } from "./index.web55.js";
5
+ import { getConfig as t, getCoreAuthManager as c } from "./index.web48.js";
6
6
  const f = async (r) => (n.sendActionCallEvent({ name: "send_evm_smart_account_usdc" }), t().useMock ? {
7
7
  userOpHash: "0x0"
8
8
  } : u(r, c(), async ({ user: a, walletSecretId: s }) => {
@@ -1,8 +1,8 @@
1
1
  import { sendSolanaAssetWithEndUserAccount as o } from "@coinbase/cdp-api-client";
2
2
  import { Analytics as s } from "./index.web2.js";
3
3
  import "./index.web3.js";
4
- import { withAuth as c } from "./index.web54.js";
5
- import { getConfig as n, getCoreAuthManager as i } from "./index.web55.js";
4
+ import { withAuth as c } from "./index.web55.js";
5
+ import { getConfig as n, getCoreAuthManager as i } from "./index.web48.js";
6
6
  const f = async (t) => {
7
7
  s.sendActionCallEvent({ name: "send_solana_usdc" });
8
8
  const e = t.network ?? "solana";
@@ -1,7 +1,7 @@
1
1
  import { getMfaConfig as t } from "@coinbase/cdp-api-client";
2
2
  import { Analytics as n } from "./index.web2.js";
3
3
  import "./index.web3.js";
4
- import { getConfig as e } from "./index.web55.js";
4
+ import { getConfig as e } from "./index.web48.js";
5
5
  const s = async () => (n.sendActionCallEvent({ name: "get_mfa_config" }), e().useMock ? {
6
6
  projectId: e().projectId,
7
7
  enabled: !1,
@@ -1,9 +1,9 @@
1
1
  import { recordMfaEnrollmentPrompted as m } from "@coinbase/cdp-api-client";
2
2
  import { Analytics as s } from "./index.web2.js";
3
3
  import "./index.web3.js";
4
- import { withAuth as l } from "./index.web54.js";
4
+ import { withAuth as l } from "./index.web55.js";
5
5
  import { validateUserAuthState as d } from "./index.web63.js";
6
- import { getConfig as o, getCoreAuthManager as p } from "./index.web55.js";
6
+ import { getConfig as o, getCoreAuthManager as p } from "./index.web48.js";
7
7
  const g = async () => {
8
8
  if (s.sendActionCallEvent({ name: "record_mfa_enrollment_prompted" }), o().useMock)
9
9
  return {
@@ -1,9 +1,9 @@
1
1
  import { initiateMfaEnrollment2 as s } from "@coinbase/cdp-api-client";
2
2
  import { Analytics as u } from "./index.web2.js";
3
3
  import "./index.web3.js";
4
- import { withAuth as i } from "./index.web54.js";
4
+ import { withAuth as i } from "./index.web55.js";
5
5
  import { validateUserAuthState as c } from "./index.web63.js";
6
- import { getConfig as o, getCoreAuthManager as p } from "./index.web55.js";
6
+ import { getConfig as o, getCoreAuthManager as p } from "./index.web48.js";
7
7
  import { validatePhoneNumber as h } from "./index.web42.js";
8
8
  async function l(t) {
9
9
  const e = await s(
@@ -1,2 +1,2 @@
1
- import { __require as r } from "./index.web171.js";
1
+ import { __require as r } from "./index.web176.js";
2
2
  r();
@@ -1,11 +1,11 @@
1
1
  import { submitMfaEnrollment as s } from "@coinbase/cdp-api-client";
2
2
  import { Analytics as u } from "./index.web2.js";
3
3
  import "./index.web3.js";
4
- import { toAuthStateUser as i } from "./index.web53.js";
5
- import { withAuth as f } from "./index.web54.js";
4
+ import { toAuthStateUser as i } from "./index.web54.js";
5
+ import { withAuth as f } from "./index.web55.js";
6
6
  import { mockUser as l } from "./index.web58.js";
7
7
  import { validateUserAuthState as c } from "./index.web63.js";
8
- import { getConfig as o, getCoreAuthManager as h } from "./index.web55.js";
8
+ import { getConfig as o, getCoreAuthManager as h } from "./index.web48.js";
9
9
  const S = async (e) => {
10
10
  if (u.sendActionCallEvent({ name: "submit_mfa_enrollment" }), o().useMock)
11
11
  return {
@@ -1,8 +1,8 @@
1
1
  import { initiateMfaVerification as e } from "@coinbase/cdp-api-client";
2
2
  import { Analytics as r } from "./index.web2.js";
3
3
  import "./index.web3.js";
4
- import { withAuth as o } from "./index.web54.js";
5
- import { getConfig as i, getCoreAuthManager as n } from "./index.web55.js";
4
+ import { withAuth as o } from "./index.web55.js";
5
+ import { getConfig as i, getCoreAuthManager as n } from "./index.web48.js";
6
6
  const u = async (t) => {
7
7
  if (r.sendActionCallEvent({ name: "initiate_mfa_verification" }), !i().useMock)
8
8
  return o({}, n(), async ({ user: a }) => {
@@ -1,9 +1,9 @@
1
1
  import { submitMfaVerification as o } from "@coinbase/cdp-api-client";
2
2
  import { Analytics as f } from "./index.web2.js";
3
3
  import "./index.web3.js";
4
- import { withAuth as m } from "./index.web54.js";
4
+ import { withAuth as m } from "./index.web55.js";
5
5
  import { resolvePendingMfaVerification as t } from "./index.web34.js";
6
- import { getConfig as e, getCoreAuthManager as a } from "./index.web55.js";
6
+ import { getConfig as e, getCoreAuthManager as a } from "./index.web48.js";
7
7
  const g = async (i) => {
8
8
  if (f.sendActionCallEvent({ name: "submit_mfa_verification" }), e().useMock) {
9
9
  t();
@@ -1,6 +1,6 @@
1
1
  import { APIError as u, ErrorType as l } from "@coinbase/cdp-api-client";
2
2
  import { MfaError as m } from "./index.web41.js";
3
- import { getCoreAuthManager as a } from "./index.web55.js";
3
+ import { getCoreAuthManager as a } from "./index.web48.js";
4
4
  import { hasRegisteredMfaListeners as i, triggerMfaVerification as o } from "./index.web34.js";
5
5
  import { isEnrolledInMfa as M, getEnrolledMfaMethods as E } from "./index.web35.js";
6
6
  const h = 300, n = () => {
@@ -1,11 +1,11 @@
1
1
  import { logOutEndUser as u, refreshAccessToken as c, registerTemporaryWalletSecret as f } from "@coinbase/cdp-api-client";
2
2
  import "jose";
3
3
  import { SignJWT as S } from "./index.web64.js";
4
- import { toAuthState as d } from "./index.web53.js";
4
+ import { toAuthState as d } from "./index.web54.js";
5
5
  import "viem";
6
6
  import { getPlatformCrypto as l } from "./index.web4.js";
7
7
  import { sortKeys as w } from "./index.web59.js";
8
- import { getCoreOAuthManager as m } from "./index.web55.js";
8
+ import { getCoreOAuthManager as m } from "./index.web48.js";
9
9
  const h = 60 * 1e3, y = {
10
10
  maxRetries: 3,
11
11
  baseDelayMs: 1e3,
@@ -5,7 +5,7 @@ import { getAccessTokenExpiration as I, getAccessToken as S } from "./index.web9
5
5
  import { ensureMfaVerified as p } from "./index.web36.js";
6
6
  import { DEFAULT_SECURE_IFRAME_BASE_PATH as A, SECURE_IFRAME_KEY_EXPORT_EVENT_TYPE as n, DEFAULT_SECURE_IFRAME_THEME as k } from "./index.web46.js";
7
7
  import { validateSecureIframeEnvironment as y, createIframe as x, calculateSecureIframeHeight as U, buildKeyExportIframeUrl as w, getSecureIframeOrigin as v, isSecureIframeKeyExportMessage as R, sendSecureIframeMessage as u } from "./index.web45.js";
8
- import { getConfig as b } from "./index.web55.js";
8
+ import { getConfig as b } from "./index.web48.js";
9
9
  let s = null;
10
10
  const C = async () => (s || (s = S({ forceRefresh: !0 }).finally(() => {
11
11
  s = null;
@@ -1,34 +1,30 @@
1
- function a(e) {
2
- if (typeof btoa < "u")
3
- return btoa(
4
- Array.from(e).map((t) => String.fromCharCode(t)).join("")
5
- );
6
- const c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
7
- let r = "";
8
- for (let t = 0; t < e.length; t += 3) {
9
- const h = e[t], n = t + 1 < e.length ? e[t + 1] : 0, s = t + 2 < e.length ? e[t + 2] : 0, o = h << 16 | n << 8 | s;
10
- r += c.charAt(o >> 18 & 63), r += c.charAt(o >> 12 & 63), r += t + 1 < e.length ? c.charAt(o >> 6 & 63) : "=", r += t + 2 < e.length ? c.charAt(o & 63) : "=";
11
- }
1
+ import "@coinbase/cdp-api-client";
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");
12
9
  return r;
13
- }
14
- function g(e) {
15
- if (typeof atob < "u") {
16
- const n = atob(e), s = new Uint8Array(n.length);
17
- for (let o = 0; o < n.length; o++)
18
- s[o] = n.charCodeAt(o);
19
- return s;
20
- }
21
- const c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", r = {};
22
- for (let n = 0; n < c.length; n++)
23
- r[c[n]] = n;
24
- const t = e.replace(/[^A-Za-z0-9+/]/g, ""), h = [];
25
- for (let n = 0; n < t.length; n += 4) {
26
- const s = r[t[n]] || 0, o = r[t[n + 1]] || 0, l = r[t[n + 2]] || 0, f = r[t[n + 3]] || 0, i = s << 18 | o << 12 | l << 6 | f;
27
- h.push(i >> 16 & 255), n + 2 < t.length && h.push(i >> 8 & 255), n + 3 < t.length && h.push(i & 255);
28
- }
29
- return new Uint8Array(h);
30
- }
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
+ };
31
23
  export {
32
- g as decodeBase64,
33
- a as encodeBase64
24
+ g as getConfig,
25
+ u as getCoreAuthManager,
26
+ s as getCoreOAuthManager,
27
+ a as setConfig,
28
+ l as setCoreAuthManager,
29
+ h as setCoreOAuthManager
34
30
  };
@@ -1,5 +1,34 @@
1
- import { __require as r } from "./index.web72.js";
2
- var f = r();
1
+ function a(e) {
2
+ if (typeof btoa < "u")
3
+ return btoa(
4
+ Array.from(e).map((t) => String.fromCharCode(t)).join("")
5
+ );
6
+ const c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
7
+ let r = "";
8
+ for (let t = 0; t < e.length; t += 3) {
9
+ const h = e[t], n = t + 1 < e.length ? e[t + 1] : 0, s = t + 2 < e.length ? e[t + 2] : 0, o = h << 16 | n << 8 | s;
10
+ r += c.charAt(o >> 18 & 63), r += c.charAt(o >> 12 & 63), r += t + 1 < e.length ? c.charAt(o >> 6 & 63) : "=", r += t + 2 < e.length ? c.charAt(o & 63) : "=";
11
+ }
12
+ return r;
13
+ }
14
+ function g(e) {
15
+ if (typeof atob < "u") {
16
+ const n = atob(e), s = new Uint8Array(n.length);
17
+ for (let o = 0; o < n.length; o++)
18
+ s[o] = n.charCodeAt(o);
19
+ return s;
20
+ }
21
+ const c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", r = {};
22
+ for (let n = 0; n < c.length; n++)
23
+ r[c[n]] = n;
24
+ const t = e.replace(/[^A-Za-z0-9+/]/g, ""), h = [];
25
+ for (let n = 0; n < t.length; n += 4) {
26
+ const s = r[t[n]] || 0, o = r[t[n + 1]] || 0, l = r[t[n + 2]] || 0, f = r[t[n + 3]] || 0, i = s << 18 | o << 12 | l << 6 | f;
27
+ h.push(i >> 16 & 255), n + 2 < t.length && h.push(i >> 8 & 255), n + 3 < t.length && h.push(i & 255);
28
+ }
29
+ return new Uint8Array(h);
30
+ }
3
31
  export {
4
- f as b
32
+ g as decodeBase64,
33
+ a as encodeBase64
5
34
  };
@@ -1,4 +1,4 @@
1
- import { decodeBase64 as y, encodeBase64 as a } from "./index.web48.js";
1
+ import { decodeBase64 as y, encodeBase64 as a } from "./index.web49.js";
2
2
  import "@coinbase/cdp-api-client";
3
3
  import "viem";
4
4
  const p = {
@@ -1,11 +1,5 @@
1
- import { AuthManager as r } from "./index.web38.js";
2
- import { CustomAuthManager as o } from "./index.web51.js";
3
- import "@coinbase/cdp-api-client";
4
- import "viem";
5
- import { getConfig as n } from "./index.web55.js";
6
- function a(t) {
7
- return n().customAuth?.getJwt ? new o(t) : new r(t);
8
- }
1
+ import { __require as r } from "./index.web72.js";
2
+ var f = r();
9
3
  export {
10
- a as createAuthManager
4
+ f as b
11
5
  };
@@ -1,67 +1,11 @@
1
- import { AuthManager as a } from "./index.web38.js";
2
- import { getConfig as o } from "./index.web55.js";
3
- import { CustomAuthError as s } from "./index.web39.js";
4
- const n = 60 * 60 * 1e3;
5
- class l extends a {
6
- /**
7
- * Signs out the user, clearing all authentication state.
8
- * For custom auth, we only clear local state without calling the CDP logout API,
9
- * as authentication is managed by the external identity provider.
10
- */
11
- async signOut() {
12
- await this.clearAuthState();
13
- }
14
- /**
15
- * Gets the access token by calling the customAuth.getJwt callback.
16
- * Returns null if the user is not signed in.
17
- *
18
- * @returns The access token from the custom auth provider.
19
- */
20
- async getToken() {
21
- const e = o();
22
- if (!e.customAuth)
23
- return console.error("Custom auth configuration not found"), await this.clearAuthState(), null;
24
- try {
25
- const t = await e.customAuth.getJwt();
26
- return t ? (this.authState && (this.authState.accessToken = t, this.authState.expiresAt = Date.now() + n), t) : (await this.clearAuthState(), null);
27
- } catch (t) {
28
- const r = new s(
29
- t instanceof Error ? t.message : "Failed to get custom auth JWT"
30
- );
31
- return console.error(r), await this.clearAuthState(), null;
32
- }
33
- }
34
- /**
35
- * Internal async initialization logic for custom auth.
36
- * No-op for custom auth since tokens are provided via customAuth.getJwt callback.
37
- * Unlike standard CDP auth, custom auth doesn't need token refresh or OAuth handling.
38
- */
39
- async _doInitialize() {
40
- }
41
- /**
42
- * Custom auth always fetches fresh tokens, so never needs to "refresh" in the traditional sense.
43
- *
44
- * @returns Always false since custom auth doesn't use token refresh logic.
45
- */
46
- shouldRefreshToken() {
47
- return !1;
48
- }
49
- /**
50
- * Custom auth doesn't use CDP's token refresh mechanism.
51
- * Tokens are always provided fresh from the customAuth.getJwt callback.
52
- * This method should never be called, but we override it as a defensive measure.
53
- */
54
- async refreshAccessToken() {
55
- }
56
- /**
57
- * Custom auth provides fresh tokens on each request via customAuth.getJwt,
58
- * so no scheduled refresh is needed. This method is a no-op for custom auth.
59
- */
60
- scheduleTokenRefresh() {
61
- this.cancelTokenRefresh();
62
- }
1
+ import { AuthManager as r } from "./index.web38.js";
2
+ import { CustomAuthManager as o } from "./index.web52.js";
3
+ import "@coinbase/cdp-api-client";
4
+ import "viem";
5
+ import { getConfig as n } from "./index.web48.js";
6
+ function a(t) {
7
+ return n().customAuth?.getJwt ? new o(t) : new r(t);
63
8
  }
64
9
  export {
65
- n as CUSTOM_AUTH_REFRESH_BUFFER_MS,
66
- l as CustomAuthManager
10
+ a as createAuthManager
67
11
  };
@@ -1,90 +1,67 @@
1
- import { verifyOAuth as i } from "./index.web9.js";
2
- import { getPlatformOAuth as h } from "./index.web4.js";
3
- import "@coinbase/cdp-api-client";
4
- import "viem";
5
- class A {
6
- oauthFlowState = null;
7
- oauthStateChangeCallbacks = [];
1
+ import { AuthManager as a } from "./index.web38.js";
2
+ import { getConfig as o } from "./index.web48.js";
3
+ import { CustomAuthError as s } from "./index.web39.js";
4
+ const n = 60 * 60 * 1e3;
5
+ class l extends a {
8
6
  /**
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.
7
+ * Signs out the user, clearing all authentication state.
8
+ * For custom auth, we only clear local state without calling the CDP logout API,
9
+ * as authentication is managed by the external identity provider.
12
10
  */
13
- async addOAuthStateChangeCallback(t) {
14
- this.oauthStateChangeCallbacks.push(t), t(this.oauthFlowState);
11
+ async signOut() {
12
+ await this.clearAuthState();
15
13
  }
16
14
  /**
17
- * Sets the OAuth flow state.
15
+ * Gets the access token by calling the customAuth.getJwt callback.
16
+ * Returns null if the user is not signed in.
18
17
  *
19
- * @param oauthFlowState - The OAuth flow state.
18
+ * @returns The access token from the custom auth provider.
20
19
  */
21
- async setOAuthFlowState(t) {
22
- this.oauthFlowState = t, this.oauthStateChangeCallbacks.forEach((a) => a(this.oauthFlowState));
20
+ async getToken() {
21
+ const e = o();
22
+ if (!e.customAuth)
23
+ return console.error("Custom auth configuration not found"), await this.clearAuthState(), null;
24
+ try {
25
+ const t = await e.customAuth.getJwt();
26
+ return t ? (this.authState && (this.authState.accessToken = t, this.authState.expiresAt = Date.now() + n), t) : (await this.clearAuthState(), null);
27
+ } catch (t) {
28
+ const r = new s(
29
+ t instanceof Error ? t.message : "Failed to get custom auth JWT"
30
+ );
31
+ return console.error(r), await this.clearAuthState(), null;
32
+ }
23
33
  }
24
34
  /**
25
- * Clears the OAuth flow state.
35
+ * Internal async initialization logic for custom auth.
36
+ * No-op for custom auth since tokens are provided via customAuth.getJwt callback.
37
+ * Unlike standard CDP auth, custom auth doesn't need token refresh or OAuth handling.
26
38
  */
27
- async clearOAuthFlowState() {
28
- this.oauthFlowState = null, this.oauthStateChangeCallbacks.forEach((t) => t(null));
39
+ async _doInitialize() {
29
40
  }
30
41
  /**
31
- * Gets the OAuth flow state.
42
+ * Custom auth always fetches fresh tokens, so never needs to "refresh" in the traditional sense.
32
43
  *
33
- * @returns The OAuth flow state.
44
+ * @returns Always false since custom auth doesn't use token refresh logic.
34
45
  */
35
- async getOAuthFlowState() {
36
- return this.oauthFlowState;
46
+ shouldRefreshToken() {
47
+ return !1;
37
48
  }
38
49
  /**
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.
50
+ * Custom auth doesn't use CDP's token refresh mechanism.
51
+ * Tokens are always provided fresh from the customAuth.getJwt callback.
52
+ * This method should never be called, but we override it as a defensive measure.
44
53
  */
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
- }
54
+ async refreshAccessToken() {
55
+ }
56
+ /**
57
+ * Custom auth provides fresh tokens on each request via customAuth.getJwt,
58
+ * so no scheduled refresh is needed. This method is a no-op for custom auth.
59
+ */
60
+ scheduleTokenRefresh() {
61
+ this.cancelTokenRefresh();
86
62
  }
87
63
  }
88
64
  export {
89
- A as OAuthManager
65
+ n as CUSTOM_AUTH_REFRESH_BUFFER_MS,
66
+ l as CustomAuthManager
90
67
  };