@coinbase/cdp-core 0.0.119 → 0.0.120

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 (366) hide show
  1. package/dist/esm/index.web10.js +52 -51
  2. package/dist/esm/index.web110.js +2 -2
  3. package/dist/esm/index.web114.js +2 -2
  4. package/dist/esm/index.web126.js +12 -12
  5. package/dist/esm/index.web127.js +1 -1
  6. package/dist/esm/index.web129.js +4 -4
  7. package/dist/esm/index.web130.js +3 -3
  8. package/dist/esm/index.web131.js +31 -2
  9. package/dist/esm/index.web132.js +28 -65
  10. package/dist/esm/index.web133.js +2 -367
  11. package/dist/esm/index.web134.js +65 -28
  12. package/dist/esm/index.web135.js +364 -28
  13. package/dist/esm/index.web138.js +1 -1
  14. package/dist/esm/index.web139.js +1 -1
  15. package/dist/esm/index.web140.js +5 -13
  16. package/dist/esm/index.web141.js +47 -11
  17. package/dist/esm/index.web142.js +11 -53
  18. package/dist/esm/index.web143.js +11 -10
  19. package/dist/esm/index.web144.js +55 -2
  20. package/dist/esm/index.web145.js +11 -45
  21. package/dist/esm/index.web146.js +2 -14
  22. package/dist/esm/index.web147.js +45 -5
  23. package/dist/esm/index.web148.js +14 -5
  24. package/dist/esm/index.web149.js +4 -47
  25. package/dist/esm/index.web150.js +2 -14
  26. package/dist/esm/index.web151.js +2 -56
  27. package/dist/esm/index.web152.js +14 -6
  28. package/dist/esm/index.web153.js +27 -20
  29. package/dist/esm/index.web154.js +7 -17
  30. package/dist/esm/index.web155.js +3 -45
  31. package/dist/esm/index.web156.js +28 -3
  32. package/dist/esm/index.web157.js +8 -3
  33. package/dist/esm/index.web158.js +7 -34
  34. package/dist/esm/index.web159.js +79 -11
  35. package/dist/esm/index.web160.js +28 -4
  36. package/dist/esm/index.web161.js +3 -28
  37. package/dist/esm/index.web162.js +15 -6
  38. package/dist/esm/index.web163.js +4 -32
  39. package/dist/esm/index.web164.js +14 -12
  40. package/dist/esm/index.web165.js +18 -54
  41. package/dist/esm/index.web166.js +57 -38
  42. package/dist/esm/index.web167.js +17 -127
  43. package/dist/esm/index.web168.js +21 -102
  44. package/dist/esm/index.web169.js +8 -6
  45. package/dist/esm/index.web170.js +43 -3
  46. package/dist/esm/index.web171.js +7 -78
  47. package/dist/esm/index.web172.js +21 -2
  48. package/dist/esm/index.web173.js +14 -2
  49. package/dist/esm/index.web174.js +51 -33
  50. package/dist/esm/index.web175.js +6 -6
  51. package/dist/esm/index.web176.js +19 -32
  52. package/dist/esm/index.web177.js +17 -14
  53. package/dist/esm/index.web178.js +41 -30
  54. package/dist/esm/index.web179.js +3 -18
  55. package/dist/esm/index.web180.js +3 -8
  56. package/dist/esm/index.web181.js +33 -9
  57. package/dist/esm/index.web182.js +12 -11
  58. package/dist/esm/index.web183.js +4 -13
  59. package/dist/esm/index.web184.js +28 -5
  60. package/dist/esm/index.web185.js +7 -5
  61. package/dist/esm/index.web186.js +32 -10
  62. package/dist/esm/index.web187.js +13 -2
  63. package/dist/esm/index.web188.js +56 -2
  64. package/dist/esm/index.web189.js +42 -14
  65. package/dist/esm/index.web190.js +126 -27
  66. package/dist/esm/index.web191.js +104 -7
  67. package/dist/esm/index.web192.js +6 -3
  68. package/dist/esm/index.web193.js +3 -29
  69. package/dist/esm/index.web194.js +78 -8
  70. package/dist/esm/index.web195.js +2 -8
  71. package/dist/esm/index.web196.js +2 -81
  72. package/dist/esm/index.web197.js +35 -26
  73. package/dist/esm/index.web198.js +6 -3
  74. package/dist/esm/index.web199.js +34 -15
  75. package/dist/esm/index.web2.js +2 -2
  76. package/dist/esm/index.web200.js +14 -4
  77. package/dist/esm/index.web201.js +34 -14
  78. package/dist/esm/index.web202.js +17 -18
  79. package/dist/esm/index.web203.js +8 -61
  80. package/dist/esm/index.web204.js +10 -17
  81. package/dist/esm/index.web205.js +11 -23
  82. package/dist/esm/index.web206.js +13 -8
  83. package/dist/esm/index.web207.js +5 -42
  84. package/dist/esm/index.web208.js +5 -8
  85. package/dist/esm/index.web209.js +10 -20
  86. package/dist/esm/index.web210.js +7 -103
  87. package/dist/esm/index.web211.js +2 -79
  88. package/dist/esm/index.web212.js +360 -78
  89. package/dist/esm/index.web213.js +852 -20
  90. package/dist/esm/index.web214.js +39 -10
  91. package/dist/esm/index.web215.js +2 -20
  92. package/dist/esm/index.web216.js +70 -94
  93. package/dist/esm/index.web217.js +35 -21
  94. package/dist/esm/index.web218.js +13 -116
  95. package/dist/esm/index.web219.js +101 -106
  96. package/dist/esm/index.web220.js +79 -2
  97. package/dist/esm/index.web221.js +79 -2
  98. package/dist/esm/index.web222.js +17 -17
  99. package/dist/esm/index.web223.js +10 -2
  100. package/dist/esm/index.web224.js +19 -19
  101. package/dist/esm/index.web225.js +91 -30
  102. package/dist/esm/index.web226.js +21 -7
  103. package/dist/esm/index.web227.js +117 -38
  104. package/dist/esm/index.web228.js +2 -2
  105. package/dist/esm/index.web229.js +107 -68
  106. package/dist/esm/index.web230.js +2 -35
  107. package/dist/esm/index.web231.js +18 -12
  108. package/dist/esm/index.web232.js +2 -8
  109. package/dist/esm/index.web233.js +20 -2
  110. package/dist/esm/index.web234.js +28 -356
  111. package/dist/esm/index.web235.js +6 -852
  112. package/dist/esm/index.web236.js +3 -46
  113. package/dist/esm/index.web237.js +46 -3
  114. package/dist/esm/index.web238.js +2 -18
  115. package/dist/esm/index.web239.js +2 -28
  116. package/dist/esm/index.web240.js +2 -8
  117. package/dist/esm/index.web241.js +18 -11
  118. package/dist/esm/index.web242.js +28 -13
  119. package/dist/esm/index.web243.js +8 -10
  120. package/dist/esm/index.web244.js +11 -17
  121. package/dist/esm/index.web245.js +12 -80
  122. package/dist/esm/index.web246.js +10 -2
  123. package/dist/esm/index.web247.js +17 -2
  124. package/dist/esm/index.web248.js +81 -2
  125. package/dist/esm/index.web251.js +1 -1
  126. package/dist/esm/index.web3.js +1 -1
  127. package/dist/esm/index.web85.js +85 -64
  128. package/dist/esm/index.web9.js +1 -1
  129. package/dist/native/index.native109.js +3 -3
  130. package/dist/native/index.native11.js +1 -1
  131. package/dist/native/index.native112.js +2 -2
  132. package/dist/native/index.native116.js +2 -2
  133. package/dist/native/index.native12.js +51 -50
  134. package/dist/native/index.native128.js +12 -12
  135. package/dist/native/index.native131.js +1 -1
  136. package/dist/native/index.native133.js +2 -2
  137. package/dist/native/index.native134.js +16 -28
  138. package/dist/native/index.native135.js +22 -28
  139. package/dist/native/index.native136.js +47 -13
  140. package/dist/native/index.native137.js +28 -22
  141. package/dist/native/index.native138.js +28 -50
  142. package/dist/native/index.native141.js +1 -1
  143. package/dist/native/index.native142.js +1 -1
  144. package/dist/native/index.native143.js +5 -5
  145. package/dist/native/index.native144.js +11 -46
  146. package/dist/native/index.native145.js +11 -4
  147. package/dist/native/index.native146.js +5 -13
  148. package/dist/native/index.native147.js +47 -11
  149. package/dist/native/index.native148.js +36 -55
  150. package/dist/native/index.native149.js +67 -10
  151. package/dist/native/index.native150.js +55 -2
  152. package/dist/native/index.native151.js +11 -45
  153. package/dist/native/index.native152.js +2 -14
  154. package/dist/native/index.native153.js +45 -2
  155. package/dist/native/index.native154.js +14 -2
  156. package/dist/native/index.native155.js +14 -36
  157. package/dist/native/index.native156.js +49 -61
  158. package/dist/native/index.native157.js +6 -13
  159. package/dist/native/index.native158.js +20 -26
  160. package/dist/native/index.native159.js +17 -7
  161. package/dist/native/index.native160.js +45 -3
  162. package/dist/native/index.native161.js +3 -27
  163. package/dist/native/index.native162.js +3 -8
  164. package/dist/native/index.native163.js +34 -7
  165. package/dist/native/index.native164.js +11 -78
  166. package/dist/native/index.native165.js +4 -27
  167. package/dist/native/index.native166.js +28 -3
  168. package/dist/native/index.native167.js +6 -14
  169. package/dist/native/index.native168.js +32 -4
  170. package/dist/native/index.native169.js +12 -13
  171. package/dist/native/index.native170.js +54 -18
  172. package/dist/native/index.native171.js +38 -56
  173. package/dist/native/index.native172.js +127 -17
  174. package/dist/native/index.native173.js +102 -21
  175. package/dist/native/index.native174.js +6 -8
  176. package/dist/native/index.native175.js +3 -42
  177. package/dist/native/index.native176.js +78 -7
  178. package/dist/native/index.native177.js +2 -21
  179. package/dist/native/index.native178.js +2 -14
  180. package/dist/native/index.native179.js +33 -51
  181. package/dist/native/index.native180.js +6 -6
  182. package/dist/native/index.native181.js +32 -19
  183. package/dist/native/index.native182.js +14 -17
  184. package/dist/native/index.native183.js +30 -41
  185. package/dist/native/index.native184.js +18 -3
  186. package/dist/native/index.native185.js +8 -3
  187. package/dist/native/index.native186.js +9 -33
  188. package/dist/native/index.native187.js +11 -12
  189. package/dist/native/index.native188.js +13 -4
  190. package/dist/native/index.native189.js +5 -28
  191. package/dist/native/index.native190.js +5 -7
  192. package/dist/native/index.native191.js +10 -32
  193. package/dist/native/index.native192.js +2 -13
  194. package/dist/native/index.native193.js +2 -56
  195. package/dist/native/index.native194.js +13 -42
  196. package/dist/native/index.native195.js +26 -126
  197. package/dist/native/index.native196.js +7 -104
  198. package/dist/native/index.native197.js +3 -6
  199. package/dist/native/index.native198.js +28 -3
  200. package/dist/native/index.native199.js +8 -78
  201. package/dist/native/index.native2.js +2 -2
  202. package/dist/native/index.native200.js +8 -2
  203. package/dist/native/index.native201.js +80 -2
  204. package/dist/native/index.native202.js +25 -35
  205. package/dist/native/index.native203.js +3 -6
  206. package/dist/native/index.native204.js +14 -34
  207. package/dist/native/index.native205.js +4 -14
  208. package/dist/native/index.native206.js +13 -34
  209. package/dist/native/index.native207.js +18 -17
  210. package/dist/native/index.native208.js +60 -8
  211. package/dist/native/index.native209.js +17 -10
  212. package/dist/native/index.native210.js +23 -11
  213. package/dist/native/index.native211.js +8 -13
  214. package/dist/native/index.native212.js +41 -5
  215. package/dist/native/index.native213.js +8 -5
  216. package/dist/native/index.native214.js +20 -10
  217. package/dist/native/index.native221.js +1 -1
  218. package/dist/native/index.native225.js +1 -1
  219. package/dist/native/index.native229.js +1 -1
  220. package/dist/native/index.native234.js +1 -1
  221. package/dist/native/index.native235.js +1 -1
  222. package/dist/native/index.native236.js +1 -1
  223. package/dist/native/index.native239.js +5 -5
  224. package/dist/native/index.native240.js +2 -2
  225. package/dist/native/index.native241.js +3 -46
  226. package/dist/native/index.native242.js +46 -3
  227. package/dist/native/index.native243.js +2 -2
  228. package/dist/native/index.native244.js +2 -2
  229. package/dist/native/index.native245.js +2 -2
  230. package/dist/native/index.native247.js +1 -1
  231. package/dist/native/index.native252.js +1 -1
  232. package/dist/native/index.native253.js +1 -1
  233. package/dist/native/index.native256.js +1 -1
  234. package/dist/native/index.native87.js +85 -64
  235. package/dist/native-types/version.d.ts +1 -1
  236. package/dist/types/version.d.ts +1 -1
  237. package/dist/web/index.web10.js +52 -51
  238. package/dist/web/index.web110.js +2 -2
  239. package/dist/web/index.web114.js +2 -2
  240. package/dist/web/index.web126.js +12 -12
  241. package/dist/web/index.web127.js +1 -1
  242. package/dist/web/index.web129.js +4 -4
  243. package/dist/web/index.web130.js +3 -3
  244. package/dist/web/index.web131.js +31 -2
  245. package/dist/web/index.web132.js +28 -65
  246. package/dist/web/index.web133.js +2 -367
  247. package/dist/web/index.web134.js +65 -28
  248. package/dist/web/index.web135.js +364 -28
  249. package/dist/web/index.web138.js +1 -1
  250. package/dist/web/index.web139.js +1 -1
  251. package/dist/web/index.web140.js +5 -13
  252. package/dist/web/index.web141.js +47 -11
  253. package/dist/web/index.web142.js +11 -53
  254. package/dist/web/index.web143.js +11 -10
  255. package/dist/web/index.web144.js +55 -2
  256. package/dist/web/index.web145.js +11 -45
  257. package/dist/web/index.web146.js +2 -14
  258. package/dist/web/index.web147.js +45 -5
  259. package/dist/web/index.web148.js +14 -5
  260. package/dist/web/index.web149.js +4 -47
  261. package/dist/web/index.web150.js +2 -14
  262. package/dist/web/index.web151.js +2 -56
  263. package/dist/web/index.web152.js +14 -6
  264. package/dist/web/index.web153.js +27 -20
  265. package/dist/web/index.web154.js +7 -17
  266. package/dist/web/index.web155.js +3 -45
  267. package/dist/web/index.web156.js +28 -3
  268. package/dist/web/index.web157.js +8 -3
  269. package/dist/web/index.web158.js +7 -34
  270. package/dist/web/index.web159.js +79 -11
  271. package/dist/web/index.web160.js +28 -4
  272. package/dist/web/index.web161.js +3 -28
  273. package/dist/web/index.web162.js +15 -6
  274. package/dist/web/index.web163.js +4 -32
  275. package/dist/web/index.web164.js +14 -12
  276. package/dist/web/index.web165.js +18 -54
  277. package/dist/web/index.web166.js +57 -38
  278. package/dist/web/index.web167.js +17 -127
  279. package/dist/web/index.web168.js +21 -102
  280. package/dist/web/index.web169.js +8 -6
  281. package/dist/web/index.web170.js +43 -3
  282. package/dist/web/index.web171.js +7 -78
  283. package/dist/web/index.web172.js +21 -2
  284. package/dist/web/index.web173.js +14 -2
  285. package/dist/web/index.web174.js +51 -33
  286. package/dist/web/index.web175.js +6 -6
  287. package/dist/web/index.web176.js +19 -32
  288. package/dist/web/index.web177.js +17 -14
  289. package/dist/web/index.web178.js +41 -30
  290. package/dist/web/index.web179.js +3 -18
  291. package/dist/web/index.web180.js +3 -8
  292. package/dist/web/index.web181.js +33 -9
  293. package/dist/web/index.web182.js +12 -11
  294. package/dist/web/index.web183.js +4 -13
  295. package/dist/web/index.web184.js +28 -5
  296. package/dist/web/index.web185.js +7 -5
  297. package/dist/web/index.web186.js +32 -10
  298. package/dist/web/index.web187.js +13 -2
  299. package/dist/web/index.web188.js +56 -2
  300. package/dist/web/index.web189.js +42 -14
  301. package/dist/web/index.web190.js +126 -27
  302. package/dist/web/index.web191.js +104 -7
  303. package/dist/web/index.web192.js +6 -3
  304. package/dist/web/index.web193.js +3 -29
  305. package/dist/web/index.web194.js +78 -8
  306. package/dist/web/index.web195.js +2 -8
  307. package/dist/web/index.web196.js +2 -81
  308. package/dist/web/index.web197.js +35 -26
  309. package/dist/web/index.web198.js +6 -3
  310. package/dist/web/index.web199.js +34 -15
  311. package/dist/web/index.web2.js +2 -2
  312. package/dist/web/index.web200.js +14 -4
  313. package/dist/web/index.web201.js +34 -14
  314. package/dist/web/index.web202.js +17 -18
  315. package/dist/web/index.web203.js +8 -61
  316. package/dist/web/index.web204.js +10 -17
  317. package/dist/web/index.web205.js +11 -23
  318. package/dist/web/index.web206.js +13 -8
  319. package/dist/web/index.web207.js +5 -42
  320. package/dist/web/index.web208.js +5 -8
  321. package/dist/web/index.web209.js +10 -20
  322. package/dist/web/index.web210.js +7 -103
  323. package/dist/web/index.web211.js +2 -79
  324. package/dist/web/index.web212.js +360 -78
  325. package/dist/web/index.web213.js +852 -20
  326. package/dist/web/index.web214.js +39 -10
  327. package/dist/web/index.web215.js +2 -20
  328. package/dist/web/index.web216.js +70 -94
  329. package/dist/web/index.web217.js +35 -21
  330. package/dist/web/index.web218.js +13 -116
  331. package/dist/web/index.web219.js +101 -106
  332. package/dist/web/index.web220.js +79 -2
  333. package/dist/web/index.web221.js +79 -2
  334. package/dist/web/index.web222.js +17 -17
  335. package/dist/web/index.web223.js +10 -2
  336. package/dist/web/index.web224.js +19 -19
  337. package/dist/web/index.web225.js +91 -30
  338. package/dist/web/index.web226.js +21 -7
  339. package/dist/web/index.web227.js +117 -38
  340. package/dist/web/index.web228.js +2 -2
  341. package/dist/web/index.web229.js +107 -68
  342. package/dist/web/index.web230.js +2 -35
  343. package/dist/web/index.web231.js +18 -12
  344. package/dist/web/index.web232.js +2 -8
  345. package/dist/web/index.web233.js +20 -2
  346. package/dist/web/index.web234.js +28 -356
  347. package/dist/web/index.web235.js +6 -852
  348. package/dist/web/index.web236.js +3 -46
  349. package/dist/web/index.web237.js +46 -3
  350. package/dist/web/index.web238.js +2 -18
  351. package/dist/web/index.web239.js +2 -28
  352. package/dist/web/index.web240.js +2 -8
  353. package/dist/web/index.web241.js +18 -11
  354. package/dist/web/index.web242.js +28 -13
  355. package/dist/web/index.web243.js +8 -10
  356. package/dist/web/index.web244.js +11 -17
  357. package/dist/web/index.web245.js +12 -80
  358. package/dist/web/index.web246.js +10 -2
  359. package/dist/web/index.web247.js +17 -2
  360. package/dist/web/index.web248.js +81 -2
  361. package/dist/web/index.web251.js +1 -1
  362. package/dist/web/index.web3.js +1 -1
  363. package/dist/web/index.web85.js +85 -64
  364. package/dist/web/index.web9.js +1 -1
  365. package/dist/web-types/version.d.ts +1 -1
  366. package/package.json +3 -3
@@ -1,42 +1,42 @@
1
- import { logOutEndUser as f, refreshAccessToken as d, registerTemporaryWalletSecret as S, APIError as m } from "@coinbase/cdp-api-client";
2
- import { Analytics as h } from "./index.web2.js";
1
+ import { logOutEndUser as f, refreshAccessToken as d, isRefreshTokenUnavailableError as m, isTransientTokenReadError as S, registerTemporaryWalletSecret as w, APIError as y } from "@coinbase/cdp-api-client";
2
+ import { Analytics as i } from "./index.web2.js";
3
3
  import "./index.web3.js";
4
4
  import "jose";
5
- import { SignJWT as w } from "./index.web107.js";
6
- import { toAuthState as y } from "./index.web101.js";
5
+ import { SignJWT as _ } from "./index.web107.js";
6
+ import { toAuthState as k } from "./index.web101.js";
7
7
  import "viem";
8
8
  import { getPlatformCrypto as c } from "./index.web5.js";
9
9
  import { sortKeys as p } from "./index.web98.js";
10
- import { getCoreOAuthManager as g } from "./index.web74.js";
11
- const l = 60 * 1e3, k = {
10
+ import { getCoreOAuthManager as T } from "./index.web74.js";
11
+ const l = 60 * 1e3, R = {
12
12
  maxRetries: 3,
13
13
  baseDelayMs: 1e3,
14
14
  maxDelayMs: 1e4
15
15
  };
16
- function T(t, e, s) {
17
- const n = e * Math.pow(2, t), i = Math.random() * 0.3 * n;
18
- return Math.min(n + i, s);
16
+ function g(s, e, r) {
17
+ const n = e * Math.pow(2, s), o = Math.random() * 0.3 * n;
18
+ return Math.min(n + o, r);
19
19
  }
20
- function R(t) {
21
- return new Promise((e) => setTimeout(e, t));
20
+ function A(s) {
21
+ return new Promise((e) => setTimeout(e, s));
22
22
  }
23
- function _(t) {
24
- if (t instanceof TypeError && t.message.includes("fetch"))
23
+ function E(s) {
24
+ if (s instanceof TypeError && s.message.includes("fetch"))
25
25
  return !0;
26
- if (t instanceof m) {
27
- if (t.statusCode >= 500 && t.statusCode < 600 || t.statusCode === 408 || t.statusCode === 429)
26
+ if (s instanceof y) {
27
+ if (s.statusCode >= 500 && s.statusCode < 600 || s.statusCode === 408 || s.statusCode === 429)
28
28
  return !0;
29
- if (t.statusCode === 401)
29
+ if (s.statusCode === 401)
30
30
  return !1;
31
31
  }
32
- if (t instanceof Error) {
33
- const e = t.message.toLowerCase();
32
+ if (s instanceof Error) {
33
+ const e = s.message.toLowerCase();
34
34
  if (e.includes("network") || e.includes("timeout") || e.includes("econnrefused") || e.includes("enotfound") || e.includes("socket"))
35
35
  return !0;
36
36
  }
37
37
  return !1;
38
38
  }
39
- class v {
39
+ class j {
40
40
  projectId;
41
41
  authState = null;
42
42
  walletSecret = null;
@@ -139,14 +139,14 @@ class v {
139
139
  if (!await this.isSignedIn())
140
140
  throw new Error("Cannot get X-Wallet-Auth header if the user is not signed in");
141
141
  this.shouldRefreshWalletSecret() && await this.refreshWalletSecret();
142
- const s = `${e.requestMethod} ${e.requestHost}${e.requestPath}`, n = Math.floor(Date.now() / 1e3), i = c(), r = {
143
- uris: [s]
142
+ const r = `${e.requestMethod} ${e.requestHost}${e.requestPath}`, n = Math.floor(Date.now() / 1e3), o = c(), a = {
143
+ uris: [r]
144
144
  };
145
145
  if (e.requestData && Object.keys(e.requestData).length > 0) {
146
- const a = p(e.requestData);
147
- r.reqHash = await i.hash(new TextEncoder().encode(JSON.stringify(a)));
146
+ const t = p(e.requestData);
147
+ a.reqHash = await o.hash(new TextEncoder().encode(JSON.stringify(t)));
148
148
  }
149
- return await new w(r).setProtectedHeader({ alg: "ES256", typ: "JWT" }).setIssuedAt(n).setNotBefore(n).setJti(i.generateRandomId()).sign(this.walletSecret.keyPair.privateKey);
149
+ return await new _(a).setProtectedHeader({ alg: "ES256", typ: "JWT" }).setIssuedAt(n).setNotBefore(n).setJti(o.generateRandomId()).sign(this.walletSecret.keyPair.privateKey);
150
150
  }
151
151
  /**
152
152
  * Gets the authentication state.
@@ -162,13 +162,13 @@ class v {
162
162
  * @param authState - The authentication state.
163
163
  */
164
164
  async setAuthState(e) {
165
- this.authState = e, h.endUserIdentifier = e.user.userId, this.authStateChangeCallbacks.forEach((s) => s(this.authState?.user ?? null)), this.scheduleTokenRefresh();
165
+ this.authState = e, i.endUserIdentifier = e.user.userId, this.authStateChangeCallbacks.forEach((r) => r(this.authState?.user ?? null)), this.scheduleTokenRefresh();
166
166
  }
167
167
  /**
168
168
  * Clears the authentication state.
169
169
  */
170
170
  async clearAuthState() {
171
- this.authState = null, this.walletSecret = null, h.endUserIdentifier = "", this.cancelTokenRefresh(), this.authStateChangeCallbacks.forEach((e) => e(null));
171
+ this.authState = null, this.walletSecret = null, i.endUserIdentifier = "", this.cancelTokenRefresh(), this.authStateChangeCallbacks.forEach((e) => e(null));
172
172
  }
173
173
  /**
174
174
  * Ensures the AuthManager is initialized before proceeding.
@@ -186,7 +186,7 @@ class v {
186
186
  */
187
187
  async _doInitialize() {
188
188
  try {
189
- await this.refreshAccessToken("init"), await g().handleOAuthCode();
189
+ await this.refreshAccessToken("init"), await T().handleOAuthCode();
190
190
  } catch (e) {
191
191
  console.warn("Failed to refresh access token during initialization:", e);
192
192
  }
@@ -210,57 +210,78 @@ class v {
210
210
  * @returns The new access token.
211
211
  */
212
212
  async refreshAccessToken(e = "on_demand") {
213
- const { maxRetries: s, baseDelayMs: n, maxDelayMs: i } = k;
214
- h.sendSessionRefreshEvent({
213
+ const { maxRetries: r, baseDelayMs: n, maxDelayMs: o } = R;
214
+ i.sendSessionRefreshEvent({
215
215
  name: "refresh_token_start",
216
216
  trigger: e
217
217
  });
218
- for (let r = 0; r <= s; r++)
218
+ for (let a = 0; a <= r; a++)
219
219
  try {
220
- const a = await d(this.projectId, {
220
+ const t = await d(this.projectId, {
221
221
  grantType: "refresh_token"
222
- }), o = y(
223
- a.accessToken,
224
- a.validUntil,
225
- a.endUser
222
+ }), h = k(
223
+ t.accessToken,
224
+ t.validUntil,
225
+ t.endUser
226
226
  );
227
- await this.setAuthState(o), h.sendSessionRefreshEvent({
227
+ await this.setAuthState(h), i.sendSessionRefreshEvent({
228
228
  name: "refresh_token_success",
229
229
  trigger: e,
230
- attempt: r
230
+ attempt: a
231
231
  });
232
232
  return;
233
- } catch (a) {
234
- const o = a instanceof Error ? a.message : String(a);
235
- if (!_(a)) {
236
- h.sendSessionRefreshEvent({
233
+ } catch (t) {
234
+ const h = t instanceof Error ? t.message : String(t);
235
+ if (m(t)) {
236
+ if (S(t)) {
237
+ i.sendSessionRefreshEvent({
238
+ name: "refresh_token_skipped_transient",
239
+ trigger: e,
240
+ attempt: a,
241
+ read_outcome: t.outcome,
242
+ error_message: h
243
+ });
244
+ return;
245
+ }
246
+ i.sendSessionRefreshEvent({
237
247
  name: "refresh_token_failure",
238
248
  trigger: e,
239
- attempt: r,
249
+ attempt: a,
240
250
  error_type: "non_transient",
241
- error_message: o
251
+ read_outcome: t.outcome,
252
+ error_message: h
242
253
  }), await this.signOut();
243
254
  return;
244
255
  }
245
- if (r === s) {
246
- h.sendSessionRefreshEvent({
256
+ if (!E(t)) {
257
+ i.sendSessionRefreshEvent({
258
+ name: "refresh_token_failure",
259
+ trigger: e,
260
+ attempt: a,
261
+ error_type: "non_transient",
262
+ error_message: h
263
+ }), await this.signOut();
264
+ return;
265
+ }
266
+ if (a === r) {
267
+ i.sendSessionRefreshEvent({
247
268
  name: "refresh_token_exhausted",
248
269
  trigger: e,
249
- attempt: r,
270
+ attempt: a,
250
271
  error_type: "transient",
251
- error_message: o
272
+ error_message: h
252
273
  });
253
274
  return;
254
275
  }
255
- h.sendSessionRefreshEvent({
276
+ i.sendSessionRefreshEvent({
256
277
  name: "refresh_token_retry",
257
278
  trigger: e,
258
- attempt: r,
279
+ attempt: a,
259
280
  error_type: "transient",
260
- error_message: o
281
+ error_message: h
261
282
  });
262
- const u = T(r, n, i);
263
- await R(u);
283
+ const u = g(a, n, o);
284
+ await A(u);
264
285
  }
265
286
  }
266
287
  /**
@@ -270,13 +291,13 @@ class v {
270
291
  scheduleTokenRefresh() {
271
292
  if (this.cancelTokenRefresh(), !this.authState)
272
293
  return;
273
- const s = this.authState.expiresAt - l - Date.now();
274
- s <= 0 || (h.sendSessionRefreshEvent({
294
+ const r = this.authState.expiresAt - l - Date.now();
295
+ r <= 0 || (i.sendSessionRefreshEvent({
275
296
  name: "refresh_token_scheduled",
276
- time_until_refresh_ms: s
297
+ time_until_refresh_ms: r
277
298
  }), this.refreshTimeout = setTimeout(async () => {
278
299
  await this.refreshAccessToken("scheduled"), this.scheduleTokenRefresh();
279
- }, s));
300
+ }, r));
280
301
  }
281
302
  /**
282
303
  * Cancels any scheduled token refresh.
@@ -313,23 +334,23 @@ class v {
313
334
  * Internal wallet secret refresh logic.
314
335
  */
315
336
  async _doRefreshWalletSecret() {
316
- const e = c(), s = this.walletSecret?.walletSecretId ?? e.generateRandomId(), n = this.walletSecret?.keyPair ?? await e.createKeyPair(), i = this.authState.expiresAt, r = new Date(i).toISOString();
317
- this.walletSecret = { walletSecretId: s, keyPair: n, expiresAt: i };
337
+ const e = c(), r = this.walletSecret?.walletSecretId ?? e.generateRandomId(), n = this.walletSecret?.keyPair ?? await e.createKeyPair(), o = this.authState.expiresAt, a = new Date(o).toISOString();
338
+ this.walletSecret = { walletSecretId: r, keyPair: n, expiresAt: o };
318
339
  try {
319
- await S(
340
+ await w(
320
341
  this.authState.user.userId,
321
342
  {
322
- walletSecretId: s,
343
+ walletSecretId: r,
323
344
  publicKey: n.publicKeyBase64,
324
- validUntil: r
345
+ validUntil: a
325
346
  },
326
347
  { projectID: this.projectId }
327
348
  );
328
- } catch (a) {
329
- throw this.walletSecret = null, a;
349
+ } catch (t) {
350
+ throw this.walletSecret = null, t;
330
351
  }
331
352
  }
332
353
  }
333
354
  export {
334
- v as AuthManager
355
+ j as AuthManager
335
356
  };
@@ -1,4 +1,4 @@
1
- const o = "0.0.119";
1
+ const o = "0.0.120";
2
2
  export {
3
3
  o as VERSION
4
4
  };
@@ -1,6 +1,6 @@
1
- import { CompactSign as i } from "./index.native136.js";
2
- import { JWTInvalid as r } from "./index.native137.js";
3
- import { JWTClaimsBuilder as n } from "./index.native138.js";
1
+ import { CompactSign as i } from "./index.native134.js";
2
+ import { JWTInvalid as r } from "./index.native135.js";
3
+ import { JWTClaimsBuilder as n } from "./index.native136.js";
4
4
  class d {
5
5
  #s;
6
6
  #t;
@@ -1,4 +1,4 @@
1
- const o = "0.0.119";
1
+ const o = "0.0.120";
2
2
  export {
3
3
  o as VERSION
4
4
  };
@@ -1,5 +1,5 @@
1
- import { InvalidAddressError as s } from "./index.native146.js";
2
- import { isAddress as a } from "./index.native147.js";
1
+ import { InvalidAddressError as s } from "./index.native144.js";
2
+ import { isAddress as a } from "./index.native145.js";
3
3
  function r(n) {
4
4
  if (typeof n == "string") {
5
5
  if (!a(n, { strict: !1 }))
@@ -1,7 +1,7 @@
1
1
  import { DisconnectedError as l, from as d } from "./index.native129.js";
2
2
  import { validateRequest as h, EIP1193ProviderError as m, STANDARD_ERROR_CODES as _ } from "./index.native93.js";
3
- import { createEOAHandlers as p } from "./index.native134.js";
4
- import { createSmartAccountHandlers as g } from "./index.native135.js";
3
+ import { createEOAHandlers as p } from "./index.native137.js";
4
+ import { createSmartAccountHandlers as g } from "./index.native138.js";
5
5
  import "viem";
6
6
  import "zustand";
7
7
  import "@coinbase/cdp-api-client";
@@ -1,26 +1,26 @@
1
- import { configureCdpApiClient as j, setAuthManager as v, getMfaConfig as C, APIError as g, getProjectConfig as M } from "@coinbase/cdp-api-client";
2
- import { Analytics as c } from "./index.native2.js";
1
+ import { configureCdpApiClient as C, setAuthManager as M, getMfaConfig as v, APIError as m, getProjectConfig as S } from "@coinbase/cdp-api-client";
2
+ import { Analytics as d } from "./index.native2.js";
3
3
  import "./index.native3.js";
4
- import { createAuthManager as S } from "./index.native117.js";
5
- import { OAuthManager as y } from "./index.native118.js";
6
- import { MockAuthManager as w } from "./index.native119.js";
7
- import { MockOAuthManager as P } from "./index.native120.js";
8
- import { getAttestationModule as _ } from "./index.native95.js";
9
- import { getPlatformServices as m } from "./index.native10.js";
10
- import { getConfig as i, setCoreAuthManager as h, setCoreOAuthManager as I, setMfaConfig as A, setProjectConfig as k, getCoreAuthManager as O, setConfig as R } from "./index.native76.js";
4
+ import { createAuthManager as y } from "./index.native117.js";
5
+ import { OAuthManager as w } from "./index.native118.js";
6
+ import { MockAuthManager as P } from "./index.native119.js";
7
+ import { MockOAuthManager as _ } from "./index.native120.js";
8
+ import { getAttestationModule as O } from "./index.native95.js";
9
+ import { getPlatformServices as h } from "./index.native10.js";
10
+ import { getConfig as i, setCoreAuthManager as I, setCoreOAuthManager as A, setMfaConfig as k, setProjectConfig as b, getCoreAuthManager as R, setConfig as E } from "./index.native76.js";
11
11
  import "viem";
12
- const U = async (t) => {
12
+ const V = async (t) => {
13
13
  if (!t.projectId)
14
14
  throw new Error("Project ID is required");
15
- t.disableAnalytics === void 0 || t.disableAnalytics === !1 ? (c.developerIdentifier = t.projectId, c.isUsingMocks = t.useMock === !0, c.isProduction = !t.basePath || t.basePath === "https://api.cdp.coinbase.com/platform") : c.enabled = !1;
15
+ t.disableAnalytics === void 0 || t.disableAnalytics === !1 ? (d.developerIdentifier = t.projectId, d.isUsingMocks = t.useMock === !0, d.isProduction = !t.basePath || t.basePath === "https://api.cdp.coinbase.com/platform") : d.enabled = !1;
16
16
  let a;
17
17
  try {
18
18
  a = i().projectId !== t.projectId;
19
19
  } catch {
20
20
  a = !0;
21
21
  }
22
- if (R(t), i().useMock) {
23
- h(new w(i().projectId)), I(new P()), A({
22
+ if (E(t), i().useMock) {
23
+ I(new P(i().projectId)), A(new _()), k({
24
24
  projectId: i().projectId,
25
25
  enabled: !1,
26
26
  totpConfig: { enabled: !1 },
@@ -30,7 +30,7 @@ const U = async (t) => {
30
30
  requireVerificationOnLogin: !1,
31
31
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
32
32
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
33
- }), k({
33
+ }), b({
34
34
  projectId: i().projectId,
35
35
  name: "Mock Project",
36
36
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
@@ -38,87 +38,88 @@ const U = async (t) => {
38
38
  });
39
39
  return;
40
40
  }
41
- let o, s = !1;
41
+ let o, c = !1, s = !1;
42
42
  try {
43
- const e = m();
44
- e.secureStorage ? (s = !0, o = {
43
+ const e = h();
44
+ e.secureStorage ? (c = !0, s = !0, o = {
45
45
  getRefreshToken: () => e.secureStorage.getItem("cdp_refresh_token"),
46
- getRefreshTokenWithOutcome: () => b(e.secureStorage),
46
+ getRefreshTokenWithOutcome: () => j(e.secureStorage),
47
47
  setRefreshToken: (n) => e.secureStorage.setItem("cdp_refresh_token", n),
48
48
  removeRefreshToken: () => e.secureStorage.removeItem("cdp_refresh_token")
49
49
  }) : o = {
50
50
  getRefreshToken: () => e.storage.getItem("cdp_refresh_token"),
51
- getRefreshTokenWithOutcome: () => b(e.storage),
51
+ getRefreshTokenWithOutcome: () => j(e.storage),
52
52
  setRefreshToken: (n) => e.storage.setItem("cdp_refresh_token", n),
53
53
  removeRefreshToken: () => e.storage.removeItem("cdp_refresh_token")
54
54
  };
55
55
  } catch {
56
- c.sendSessionRefreshEvent({
56
+ d.sendSessionRefreshEvent({
57
57
  name: "refresh_token_storage_not_initialized"
58
58
  }), o = void 0;
59
59
  }
60
- let r, d, p;
60
+ let r, f, p;
61
61
  try {
62
- const e = m();
63
- p = e.deviceInfo?.getPlatform?.(), e.attestation && (r = e.attestation, d = e.deviceInfo?.getAppBundleId?.());
62
+ const e = h();
63
+ p = e.deviceInfo?.getPlatform?.(), e.attestation && (r = e.attestation, f = e.deviceInfo?.getAppBundleId?.());
64
64
  } catch {
65
65
  r = void 0;
66
66
  }
67
- if (j({
67
+ if (C({
68
68
  debugging: i().debugging,
69
69
  basePath: i().basePath,
70
70
  refreshTokenStorage: o,
71
- retryTokenReads: s,
71
+ retryTokenReads: c,
72
+ failClosedOnMissingToken: s,
72
73
  platform: p,
73
74
  appAttestation: r && {
74
75
  isEnabled: () => r.isEnabled,
75
- appIdentifier: d,
76
+ appIdentifier: f,
76
77
  generateAssertion: r.generateAssertion.bind(r)
77
78
  }
78
79
  }), a) {
79
- const e = new y();
80
- I(e);
81
- const n = S(i().projectId);
82
- h(n), v(n);
80
+ const e = new w();
81
+ A(e);
82
+ const n = y(i().projectId);
83
+ I(n), M(n);
83
84
  }
84
- const [, f, l] = await Promise.allSettled([
85
- O().ensureInitialized(),
85
+ const [, l, u] = await Promise.allSettled([
86
+ R().ensureInitialized(),
86
87
  (async () => {
87
88
  try {
88
- return await C(t.projectId);
89
+ return await v(t.projectId);
89
90
  } catch (e) {
90
- return (!(e instanceof g) || e.statusCode !== 404) && console.warn("Failed to get MFA config", e), null;
91
+ return (!(e instanceof m) || e.statusCode !== 404) && console.warn("Failed to get MFA config", e), null;
91
92
  }
92
93
  })(),
93
94
  (async () => {
94
95
  try {
95
- return await M(t.projectId);
96
+ return await S(t.projectId);
96
97
  } catch (e) {
97
- return (!(e instanceof g) || e.statusCode !== 404) && console.warn("Failed to get project config", e), null;
98
+ return (!(e instanceof m) || e.statusCode !== 404) && console.warn("Failed to get project config", e), null;
98
99
  }
99
100
  })()
100
101
  ]);
101
- if (f.status === "fulfilled" && f.value && A(f.value), l.status === "fulfilled" && l.value) {
102
- const e = l.value;
103
- if (k(e), e.appAttestation && r && d) {
104
- const n = E(e.appAttestation, d);
105
- n !== null && (_() || console.warn(
102
+ if (l.status === "fulfilled" && l.value && k(l.value), u.status === "fulfilled" && u.value) {
103
+ const e = u.value;
104
+ if (b(e), e.appAttestation && r && f) {
105
+ const n = T(e.appAttestation, f);
106
+ n !== null && (O() || console.warn(
106
107
  "[Attestation] Project config has attestation enabled for this app, but no attestation provider is registered. Install @coinbase/cdp-app-attest and add `import '@coinbase/cdp-app-attest'` to your app's entry point."
107
- ), r.isEnabled = !0, r.cloudProjectNumber = n.cloudProjectNumber, r.initialize().catch((u) => {
108
+ ), r.isEnabled = !0, r.cloudProjectNumber = n.cloudProjectNumber, r.initialize().catch((g) => {
108
109
  console.error(
109
110
  "[Attestation] Background initialization failed:",
110
- u instanceof Error ? u.message : String(u)
111
+ g instanceof Error ? g.message : String(g)
111
112
  );
112
113
  }));
113
114
  }
114
115
  }
115
- }, b = async (t) => {
116
- const { value: a, outcome: o, errorMessage: s } = await t.getItemWithOutcome("cdp_refresh_token");
117
- return { token: a, outcome: o, errorMessage: s };
118
- }, E = (t, a) => {
119
- const o = t.android?.find((r) => r.identifier === a);
120
- return o ? { cloudProjectNumber: o.googleProjectNumber } : t.ios?.find((r) => r.identifier === a) ? {} : null;
116
+ }, j = async (t) => {
117
+ const { value: a, outcome: o, errorMessage: c } = await t.getItemWithOutcome("cdp_refresh_token");
118
+ return { token: a, outcome: o, errorMessage: c };
119
+ }, T = (t, a) => {
120
+ const o = t.android?.find((s) => s.identifier === a);
121
+ return o ? { cloudProjectNumber: o.googleProjectNumber } : t.ios?.find((s) => s.identifier === a) ? {} : null;
121
122
  };
122
123
  export {
123
- U as initialize
124
+ V as initialize
124
125
  };
@@ -1,15 +1,15 @@
1
- import { serializeAuthorizationList as v } from "./index.native182.js";
2
- import { blobsToCommitments as H } from "./index.native208.js";
3
- import { blobsToProofs as V } from "./index.native209.js";
4
- import { commitmentsToVersionedHashes as k } from "./index.native210.js";
5
- import { toBlobSidecars as B } from "./index.native211.js";
6
- import { concatHex as T } from "./index.native184.js";
7
- import { trim as F } from "./index.native190.js";
8
- import { numberToHex as s, bytesToHex as S } from "./index.native183.js";
9
- import { toRlp as b } from "./index.native194.js";
10
- import { assertTransactionEIP1559 as _, assertTransactionEIP2930 as C, assertTransactionEIP4844 as R, assertTransactionEIP7702 as Y, assertTransactionLegacy as j } from "./index.native199.js";
11
- import { getTransactionType as q } from "./index.native205.js";
12
- import { serializeAccessList as h } from "./index.native207.js";
1
+ import { serializeAuthorizationList as v } from "./index.native159.js";
2
+ import { blobsToCommitments as H } from "./index.native185.js";
3
+ import { blobsToProofs as V } from "./index.native186.js";
4
+ import { commitmentsToVersionedHashes as k } from "./index.native187.js";
5
+ import { toBlobSidecars as B } from "./index.native188.js";
6
+ import { concatHex as T } from "./index.native161.js";
7
+ import { trim as F } from "./index.native167.js";
8
+ import { numberToHex as s, bytesToHex as S } from "./index.native160.js";
9
+ import { toRlp as b } from "./index.native171.js";
10
+ import { assertTransactionEIP1559 as _, assertTransactionEIP2930 as C, assertTransactionEIP4844 as R, assertTransactionEIP7702 as Y, assertTransactionLegacy as j } from "./index.native176.js";
11
+ import { getTransactionType as q } from "./index.native182.js";
12
+ import { serializeAccessList as h } from "./index.native184.js";
13
13
  function re(e, t) {
14
14
  const i = q(e);
15
15
  return i === "eip1559" ? J(e, t) : i === "eip2930" ? K(e, t) : i === "eip4844" ? D(e, t) : i === "eip7702" ? w(e, t) : M(e);
@@ -1,4 +1,4 @@
1
- import { getVersion as n } from "./index.native145.js";
1
+ import { getVersion as n } from "./index.native143.js";
2
2
  class s extends Error {
3
3
  constructor(r, e = {}) {
4
4
  const a = (() => {
@@ -9,8 +9,8 @@ import { getConfig as S } from "./index.native76.js";
9
9
  import { getAccessToken as A } from "./index.native26.js";
10
10
  import { getAccessTokenExpiration as j } from "./index.native27.js";
11
11
  import { ensureMfaVerified as y } from "./index.native85.js";
12
- import { DEFAULT_SECURE_IFRAME_BASE_PATH as w, SECURE_IFRAME_KEY_EXPORT_EVENT_TYPE as n, DEFAULT_SECURE_IFRAME_THEME as k } from "./index.native155.js";
13
- import { validateSecureIframeEnvironment as g, createIframe as x, calculateSecureIframeHeight as U, buildKeyExportIframeUrl as L, getSecureIframeOrigin as v, isSecureIframeKeyExportMessage as R, sendSecureIframeMessage as l } from "./index.native156.js";
12
+ import { DEFAULT_SECURE_IFRAME_BASE_PATH as w, SECURE_IFRAME_KEY_EXPORT_EVENT_TYPE as n, DEFAULT_SECURE_IFRAME_THEME as k } from "./index.native148.js";
13
+ import { validateSecureIframeEnvironment as g, createIframe as x, calculateSecureIframeHeight as U, buildKeyExportIframeUrl as L, getSecureIframeOrigin as v, isSecureIframeKeyExportMessage as R, sendSecureIframeMessage as l } from "./index.native149.js";
14
14
  import "./index.native101.js";
15
15
  import "@solana/web3.js";
16
16
  import "bs58";
@@ -1,31 +1,19 @@
1
- import { handleAccounts as t } from "./index.native157.js";
2
- import { handleEthSign as e } from "./index.native158.js";
3
- import { handleGetCallsStatus as a } from "./index.native159.js";
4
- import { handleGetCapabilities as n } from "./index.native160.js";
5
- import { handlePersonalSign as o } from "./index.native161.js";
6
- import { handleRequestAccounts as r } from "./index.native162.js";
7
- import { handleSendCalls as i } from "./index.native163.js";
8
- import { handleSendTransaction as l } from "./index.native164.js";
9
- import { handleSignTypedData as h } from "./index.native165.js";
10
- import { handleChainId as s } from "./index.native166.js";
11
- import { handleDisconnect as m } from "./index.native167.js";
12
- import { handleSwitchEthereumChain as d } from "./index.native168.js";
13
- function D() {
14
- return {
15
- eth_accounts: t,
16
- eth_requestAccounts: r,
17
- personal_sign: o,
18
- eth_sendTransaction: l,
19
- eth_signTypedData_v4: h,
20
- wallet_disconnect: m,
21
- wallet_switchEthereumChain: d,
22
- eth_sign: e,
23
- eth_chainId: s,
24
- wallet_sendCalls: i,
25
- wallet_getCallsStatus: a,
26
- wallet_getCapabilities: n
27
- };
1
+ import { FlattenedSign as n } from "./index.native150.js";
2
+ class o {
3
+ #e;
4
+ constructor(e) {
5
+ this.#e = new n(e);
6
+ }
7
+ setProtectedHeader(e) {
8
+ return this.#e.setProtectedHeader(e), this;
9
+ }
10
+ async sign(e, r) {
11
+ const t = await this.#e.sign(e, r);
12
+ if (t.payload === void 0)
13
+ throw new TypeError("use the flattened module for creating JWS with b64: false");
14
+ return `${t.protected}.${t.payload}.${t.signature}`;
15
+ }
28
16
  }
29
17
  export {
30
- D as createEOAHandlers
18
+ o as CompactSign
31
19
  };
@@ -1,31 +1,25 @@
1
- import { handleChainId as t } from "./index.native166.js";
2
- import { handleDisconnect as e } from "./index.native167.js";
3
- import { handleSwitchEthereumChain as a } from "./index.native168.js";
4
- import { handleAccounts as n } from "./index.native169.js";
5
- import { handleEthSign as o } from "./index.native170.js";
6
- import { handleGetCallsStatus as r } from "./index.native171.js";
7
- import { handleGetCapabilities as i } from "./index.native172.js";
8
- import { handlePersonalSign as l } from "./index.native173.js";
9
- import { handleRequestAccounts as h } from "./index.native174.js";
10
- import { handleSendCalls as m } from "./index.native175.js";
11
- import { handleSendTransaction as s } from "./index.native176.js";
12
- import { handleSignTypedData as d } from "./index.native177.js";
13
- function E() {
14
- return {
15
- eth_accounts: n,
16
- eth_requestAccounts: h,
17
- personal_sign: l,
18
- eth_sendTransaction: s,
19
- eth_signTypedData_v4: d,
20
- wallet_disconnect: e,
21
- wallet_switchEthereumChain: a,
22
- eth_sign: o,
23
- eth_chainId: t,
24
- wallet_sendCalls: m,
25
- wallet_getCallsStatus: r,
26
- wallet_getCapabilities: i
27
- };
1
+ class c extends Error {
2
+ static code = "ERR_JOSE_GENERIC";
3
+ code = "ERR_JOSE_GENERIC";
4
+ constructor(s, e) {
5
+ super(s, e), this.name = this.constructor.name, Error.captureStackTrace?.(this, this.constructor);
6
+ }
7
+ }
8
+ class E extends c {
9
+ static code = "ERR_JOSE_NOT_SUPPORTED";
10
+ code = "ERR_JOSE_NOT_SUPPORTED";
11
+ }
12
+ class o extends c {
13
+ static code = "ERR_JWS_INVALID";
14
+ code = "ERR_JWS_INVALID";
15
+ }
16
+ class r extends c {
17
+ static code = "ERR_JWT_INVALID";
18
+ code = "ERR_JWT_INVALID";
28
19
  }
29
20
  export {
30
- E as createSmartAccountHandlers
21
+ c as JOSEError,
22
+ E as JOSENotSupported,
23
+ o as JWSInvalid,
24
+ r as JWTInvalid
31
25
  };