@coinbase/cdp-core 0.0.95 → 0.0.96

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 (679) hide show
  1. package/dist/esm/index.native.js +19 -17
  2. package/dist/esm/index.native100.js +110 -41
  3. package/dist/esm/index.native101.js +66 -25
  4. package/dist/esm/index.native102.js +23 -38
  5. package/dist/esm/index.native103.js +41 -46
  6. package/dist/esm/index.native104.js +40 -14
  7. package/dist/esm/index.native105.js +18 -62
  8. package/dist/esm/index.native106.js +62 -150
  9. package/dist/esm/index.native107.js +149 -86
  10. package/dist/esm/index.native108.js +373 -13
  11. package/dist/esm/index.native109.js +2 -25
  12. package/dist/esm/index.native11.js +1 -1
  13. package/dist/esm/index.native110.js +63 -48
  14. package/dist/esm/index.native111.js +177 -189
  15. package/dist/esm/index.native112.js +12 -12
  16. package/dist/esm/index.native113.js +12 -12
  17. package/dist/esm/index.native114.js +92 -2
  18. package/dist/esm/index.native115.js +14 -63
  19. package/dist/esm/index.native116.js +18 -360
  20. package/dist/esm/index.native117.js +50 -950
  21. package/dist/esm/index.native118.js +951 -2
  22. package/dist/esm/index.native119.js +2 -50
  23. package/dist/esm/index.native12.js +29 -26
  24. package/dist/esm/index.native120.js +49 -27
  25. package/dist/esm/index.native121.js +27 -54
  26. package/dist/esm/index.native122.js +12 -10
  27. package/dist/esm/index.native123.js +12 -2
  28. package/dist/esm/index.native124.js +5 -45
  29. package/dist/esm/index.native125.js +54 -13
  30. package/dist/esm/index.native126.js +11 -5
  31. package/dist/esm/index.native127.js +2 -48
  32. package/dist/esm/index.native128.js +44 -34
  33. package/dist/esm/index.native129.js +12 -66
  34. package/dist/esm/index.native13.js +1 -1
  35. package/dist/esm/index.native130.js +14 -2
  36. package/dist/esm/index.native131.js +28 -2
  37. package/dist/esm/index.native132.js +7 -12
  38. package/dist/esm/index.native133.js +3 -11
  39. package/dist/esm/index.native134.js +27 -4
  40. package/dist/esm/index.native135.js +8 -17
  41. package/dist/esm/index.native136.js +7 -45
  42. package/dist/esm/index.native137.js +79 -13
  43. package/dist/esm/index.native138.js +26 -54
  44. package/dist/esm/index.native139.js +3 -6
  45. package/dist/esm/index.native14.js +1 -1
  46. package/dist/esm/index.native140.js +14 -21
  47. package/dist/esm/index.native141.js +4 -3
  48. package/dist/esm/index.native142.js +13 -3
  49. package/dist/esm/index.native143.js +17 -32
  50. package/dist/esm/index.native144.js +57 -9
  51. package/dist/esm/index.native145.js +17 -4
  52. package/dist/esm/index.native146.js +21 -26
  53. package/dist/esm/index.native147.js +8 -6
  54. package/dist/esm/index.native148.js +40 -41
  55. package/dist/esm/index.native149.js +7 -55
  56. package/dist/esm/index.native15.js +1 -1
  57. package/dist/esm/index.native150.js +19 -126
  58. package/dist/esm/index.native151.js +35 -24
  59. package/dist/esm/index.native152.js +65 -10
  60. package/dist/esm/index.native153.js +5 -105
  61. package/dist/esm/index.native154.js +47 -6
  62. package/dist/esm/index.native155.js +2 -3
  63. package/dist/esm/index.native156.js +2 -15
  64. package/dist/esm/index.native157.js +13 -34
  65. package/dist/esm/index.native158.js +51 -74
  66. package/dist/esm/index.native159.js +7 -2
  67. package/dist/esm/index.native16.js +1 -1
  68. package/dist/esm/index.native160.js +22 -2
  69. package/dist/esm/index.native161.js +16 -36
  70. package/dist/esm/index.native162.js +44 -5
  71. package/dist/esm/index.native163.js +3 -34
  72. package/dist/esm/index.native164.js +3 -8
  73. package/dist/esm/index.native165.js +33 -9
  74. package/dist/esm/index.native166.js +12 -11
  75. package/dist/esm/index.native167.js +4 -13
  76. package/dist/esm/index.native168.js +28 -18
  77. package/dist/esm/index.native169.js +6 -5
  78. package/dist/esm/index.native17.js +1 -1
  79. package/dist/esm/index.native170.js +33 -5
  80. package/dist/esm/index.native171.js +12 -10
  81. package/dist/esm/index.native172.js +53 -18
  82. package/dist/esm/index.native173.js +43 -10
  83. package/dist/esm/index.native174.js +126 -18
  84. package/dist/esm/index.native175.js +99 -88
  85. package/dist/esm/index.native176.js +7 -21
  86. package/dist/esm/index.native177.js +3 -118
  87. package/dist/esm/index.native178.js +78 -13
  88. package/dist/esm/index.native179.js +2 -28
  89. package/dist/esm/index.native18.js +1 -1
  90. package/dist/esm/index.native180.js +2 -8
  91. package/dist/esm/index.native181.js +37 -3
  92. package/dist/esm/index.native182.js +5 -26
  93. package/dist/esm/index.native183.js +34 -8
  94. package/dist/esm/index.native184.js +14 -7
  95. package/dist/esm/index.native185.js +33 -78
  96. package/dist/esm/index.native186.js +17 -26
  97. package/dist/esm/index.native187.js +8 -3
  98. package/dist/esm/index.native188.js +10 -14
  99. package/dist/esm/index.native189.js +11 -4
  100. package/dist/esm/index.native19.js +4 -4
  101. package/dist/esm/index.native190.js +13 -13
  102. package/dist/esm/index.native191.js +5 -19
  103. package/dist/esm/index.native192.js +5 -61
  104. package/dist/esm/index.native193.js +10 -17
  105. package/dist/esm/index.native194.js +102 -22
  106. package/dist/esm/index.native195.js +78 -8
  107. package/dist/esm/index.native196.js +79 -41
  108. package/dist/esm/index.native197.js +2 -8
  109. package/dist/esm/index.native198.js +108 -20
  110. package/dist/esm/index.native199.js +2 -8
  111. package/dist/esm/index.native2.js +2 -2
  112. package/dist/esm/index.native20.js +5 -5
  113. package/dist/esm/index.native200.js +21 -2
  114. package/dist/esm/index.native201.js +10 -378
  115. package/dist/esm/index.native202.js +20 -836
  116. package/dist/esm/index.native203.js +94 -39
  117. package/dist/esm/index.native204.js +21 -2
  118. package/dist/esm/index.native205.js +117 -69
  119. package/dist/esm/index.native206.js +7 -34
  120. package/dist/esm/index.native207.js +2 -21
  121. package/dist/esm/index.native208.js +369 -95
  122. package/dist/esm/index.native209.js +835 -78
  123. package/dist/esm/index.native210.js +38 -79
  124. package/dist/esm/index.native211.js +2 -2
  125. package/dist/esm/index.native212.js +68 -107
  126. package/dist/esm/index.native213.js +35 -2
  127. package/dist/esm/index.native214.js +21 -2
  128. package/dist/esm/index.native215.js +40 -14
  129. package/dist/esm/index.native216.js +18 -17
  130. package/dist/esm/index.native217.js +2 -33
  131. package/dist/esm/index.native218.js +19 -6
  132. package/dist/esm/index.native219.js +33 -2
  133. package/dist/esm/index.native220.js +7 -2
  134. package/dist/esm/index.native221.js +4 -2
  135. package/dist/esm/index.native223.js +1 -1
  136. package/dist/esm/index.native225.js +1 -1
  137. package/dist/esm/index.native228.js +1 -1
  138. package/dist/esm/index.native229.js +1 -1
  139. package/dist/esm/index.native230.js +2 -4
  140. package/dist/esm/index.native231.js +2 -47
  141. package/dist/esm/index.native232.js +2 -5
  142. package/dist/esm/index.native233.js +5 -79
  143. package/dist/esm/index.native234.js +1 -1
  144. package/dist/esm/index.native235.js +81 -0
  145. package/dist/esm/index.native28.js +2 -2
  146. package/dist/esm/index.native29.js +3 -3
  147. package/dist/esm/index.native3.js +1 -1
  148. package/dist/esm/index.native30.js +2 -2
  149. package/dist/esm/index.native31.js +2 -2
  150. package/dist/esm/index.native32.js +2 -2
  151. package/dist/esm/index.native33.js +2 -2
  152. package/dist/esm/index.native34.js +4 -4
  153. package/dist/esm/index.native35.js +2 -2
  154. package/dist/esm/index.native36.js +2 -2
  155. package/dist/esm/index.native37.js +1 -1
  156. package/dist/esm/index.native38.js +3 -3
  157. package/dist/esm/index.native39.js +3 -3
  158. package/dist/esm/index.native4.js +74 -97
  159. package/dist/esm/index.native40.js +2 -2
  160. package/dist/esm/index.native41.js +1 -1
  161. package/dist/esm/index.native42.js +1 -1
  162. package/dist/esm/index.native48.js +2 -2
  163. package/dist/esm/index.native5.js +1 -1
  164. package/dist/esm/index.native50.js +2 -2
  165. package/dist/esm/index.native51.js +2 -2
  166. package/dist/esm/index.native52.js +2 -2
  167. package/dist/esm/index.native53.js +1 -1
  168. package/dist/esm/index.native55.js +2 -2
  169. package/dist/esm/index.native56.js +1 -1
  170. package/dist/esm/index.native57.js +1 -1
  171. package/dist/esm/index.native58.js +1 -1
  172. package/dist/esm/index.native63.js +2 -2
  173. package/dist/esm/index.native64.js +2 -2
  174. package/dist/esm/index.native65.js +4 -4
  175. package/dist/esm/index.native66.js +1 -1
  176. package/dist/esm/index.native67.js +1 -1
  177. package/dist/esm/index.native72.js +2 -2
  178. package/dist/esm/index.native73.js +3 -3
  179. package/dist/esm/index.native75.js +5 -5
  180. package/dist/esm/index.native78.js +5 -5
  181. package/dist/esm/index.native79.js +2 -2
  182. package/dist/esm/index.native80.js +3 -3
  183. package/dist/esm/index.native81.js +7 -30
  184. package/dist/esm/index.native82.js +31 -17
  185. package/dist/esm/index.native83.js +17 -43
  186. package/dist/esm/index.native84.js +44 -42
  187. package/dist/esm/index.native85.js +42 -3
  188. package/dist/esm/index.native86.js +3 -24
  189. package/dist/esm/index.native87.js +24 -9
  190. package/dist/esm/index.native88.js +9 -29
  191. package/dist/esm/index.native89.js +28 -40
  192. package/dist/esm/index.native90.js +41 -49
  193. package/dist/esm/index.native91.js +47 -79
  194. package/dist/esm/index.native92.js +78 -23
  195. package/dist/esm/index.native93.js +22 -156
  196. package/dist/esm/index.native94.js +157 -45
  197. package/dist/esm/index.native95.js +48 -20
  198. package/dist/esm/index.native96.js +18 -71
  199. package/dist/esm/index.native97.js +71 -7
  200. package/dist/esm/index.native98.js +6 -92
  201. package/dist/esm/index.native99.js +73 -115
  202. package/dist/esm/index.web106.js +12 -12
  203. package/dist/esm/index.web107.js +373 -13
  204. package/dist/esm/index.web108.js +28 -22
  205. package/dist/esm/index.web109.js +28 -50
  206. package/dist/esm/index.web110.js +2 -379
  207. package/dist/esm/index.web111.js +68 -2
  208. package/dist/esm/index.web112.js +336 -37
  209. package/dist/esm/index.web113.js +12 -360
  210. package/dist/esm/index.web114.js +22 -28
  211. package/dist/esm/index.web115.js +50 -28
  212. package/dist/esm/index.web116.js +4 -950
  213. package/dist/esm/index.web117.js +951 -2
  214. package/dist/esm/index.web118.js +2 -50
  215. package/dist/esm/index.web119.js +49 -27
  216. package/dist/esm/index.web120.js +27 -54
  217. package/dist/esm/index.web121.js +14 -10
  218. package/dist/esm/index.web122.js +29 -2
  219. package/dist/esm/index.web123.js +8 -45
  220. package/dist/esm/index.web124.js +3 -13
  221. package/dist/esm/index.web125.js +29 -5
  222. package/dist/esm/index.web126.js +8 -47
  223. package/dist/esm/index.web127.js +8 -2
  224. package/dist/esm/index.web128.js +81 -2
  225. package/dist/esm/index.web129.js +26 -10
  226. package/dist/esm/index.web130.js +3 -11
  227. package/dist/esm/index.web131.js +15 -4
  228. package/dist/esm/index.web132.js +4 -17
  229. package/dist/esm/index.web133.js +14 -45
  230. package/dist/esm/index.web134.js +19 -13
  231. package/dist/esm/index.web135.js +58 -52
  232. package/dist/esm/index.web136.js +17 -6
  233. package/dist/esm/index.web137.js +22 -20
  234. package/dist/esm/index.web138.js +8 -3
  235. package/dist/esm/index.web139.js +42 -3
  236. package/dist/esm/index.web140.js +7 -34
  237. package/dist/esm/index.web141.js +19 -11
  238. package/dist/esm/index.web142.js +12 -4
  239. package/dist/esm/index.web143.js +11 -28
  240. package/dist/esm/index.web144.js +5 -7
  241. package/dist/esm/index.web145.js +43 -38
  242. package/dist/esm/index.web146.js +52 -53
  243. package/dist/esm/index.web147.js +10 -127
  244. package/dist/esm/index.web148.js +2 -24
  245. package/dist/esm/index.web149.js +44 -12
  246. package/dist/esm/index.web150.js +13 -104
  247. package/dist/esm/index.web151.js +13 -6
  248. package/dist/esm/index.web152.js +56 -3
  249. package/dist/esm/index.web153.js +6 -14
  250. package/dist/esm/index.web154.js +19 -32
  251. package/dist/esm/index.web155.js +16 -77
  252. package/dist/esm/index.web156.js +46 -2
  253. package/dist/esm/index.web157.js +4 -2
  254. package/dist/esm/index.web158.js +3 -37
  255. package/dist/esm/index.web159.js +33 -5
  256. package/dist/esm/index.web160.js +9 -31
  257. package/dist/esm/index.web161.js +4 -8
  258. package/dist/esm/index.web162.js +28 -10
  259. package/dist/esm/index.web163.js +6 -11
  260. package/dist/esm/index.web164.js +31 -12
  261. package/dist/esm/index.web165.js +11 -17
  262. package/dist/esm/index.web166.js +55 -5
  263. package/dist/esm/index.web167.js +43 -5
  264. package/dist/esm/index.web168.js +127 -10
  265. package/dist/esm/index.web169.js +102 -18
  266. package/dist/esm/index.web170.js +7 -10
  267. package/dist/esm/index.web171.js +3 -20
  268. package/dist/esm/index.web172.js +76 -91
  269. package/dist/esm/index.web173.js +2 -21
  270. package/dist/esm/index.web174.js +2 -118
  271. package/dist/esm/index.web175.js +37 -14
  272. package/dist/esm/index.web176.js +5 -27
  273. package/dist/esm/index.web177.js +34 -7
  274. package/dist/esm/index.web178.js +14 -3
  275. package/dist/esm/index.web179.js +32 -26
  276. package/dist/esm/index.web180.js +18 -8
  277. package/dist/esm/index.web181.js +8 -7
  278. package/dist/esm/index.web182.js +10 -80
  279. package/dist/esm/index.web183.js +11 -28
  280. package/dist/esm/index.web184.js +13 -3
  281. package/dist/esm/index.web185.js +5 -15
  282. package/dist/esm/index.web186.js +5 -5
  283. package/dist/esm/index.web187.js +10 -14
  284. package/dist/esm/index.web188.js +2 -20
  285. package/dist/esm/index.web189.js +2 -62
  286. package/dist/esm/index.web190.js +2 -18
  287. package/dist/esm/index.web191.js +108 -23
  288. package/dist/esm/index.web192.js +2 -9
  289. package/dist/esm/index.web193.js +102 -41
  290. package/dist/esm/index.web194.js +78 -7
  291. package/dist/esm/index.web195.js +79 -20
  292. package/dist/esm/index.web196.js +38 -7
  293. package/dist/esm/index.web198.js +67 -375
  294. package/dist/esm/index.web199.js +34 -835
  295. package/dist/esm/index.web2.js +2 -2
  296. package/dist/esm/index.web200.js +20 -38
  297. package/dist/esm/index.web201.js +8 -2
  298. package/dist/esm/index.web202.js +2 -70
  299. package/dist/esm/index.web203.js +373 -30
  300. package/dist/esm/index.web204.js +835 -20
  301. package/dist/esm/index.web205.js +19 -102
  302. package/dist/esm/index.web206.js +10 -79
  303. package/dist/esm/index.web207.js +20 -80
  304. package/dist/esm/index.web208.js +94 -2
  305. package/dist/esm/index.web209.js +21 -109
  306. package/dist/esm/index.web210.js +118 -2
  307. package/dist/esm/index.web211.js +47 -2
  308. package/dist/esm/index.web212.js +1 -1
  309. package/dist/esm/index.web213.js +2 -20
  310. package/dist/esm/index.web214.js +18 -31
  311. package/dist/esm/index.web215.js +32 -6
  312. package/dist/esm/index.web216.js +7 -2
  313. package/dist/esm/index.web217.js +2 -2
  314. package/dist/esm/index.web218.js +2 -2
  315. package/dist/esm/index.web219.js +2 -18
  316. package/dist/esm/index.web220.js +4 -28
  317. package/dist/esm/index.web221.js +18 -8
  318. package/dist/esm/index.web222.js +26 -9
  319. package/dist/esm/index.web223.js +8 -13
  320. package/dist/esm/index.web224.js +11 -10
  321. package/dist/esm/index.web225.js +11 -15
  322. package/dist/esm/index.web226.js +9 -80
  323. package/dist/esm/index.web227.js +15 -2
  324. package/dist/esm/index.web228.js +79 -45
  325. package/dist/esm/index.web230.js +14 -78
  326. package/dist/esm/index.web231.js +78 -14
  327. package/dist/esm/index.web3.js +1 -1
  328. package/dist/esm/index.web8.js +1 -1
  329. package/dist/esm/index.web85.js +1 -1
  330. package/dist/esm/index.web89.js +3 -3
  331. package/dist/esm/index.web9.js +18 -16
  332. package/dist/esm/index.web92.js +2 -2
  333. package/dist/esm/index.web96.js +3 -3
  334. package/dist/native/index.native.js +19 -17
  335. package/dist/native/index.native100.js +110 -41
  336. package/dist/native/index.native101.js +66 -25
  337. package/dist/native/index.native102.js +23 -38
  338. package/dist/native/index.native103.js +41 -46
  339. package/dist/native/index.native104.js +40 -14
  340. package/dist/native/index.native105.js +18 -62
  341. package/dist/native/index.native106.js +62 -150
  342. package/dist/native/index.native107.js +149 -86
  343. package/dist/native/index.native108.js +373 -13
  344. package/dist/native/index.native109.js +2 -25
  345. package/dist/native/index.native11.js +1 -1
  346. package/dist/native/index.native110.js +63 -48
  347. package/dist/native/index.native111.js +177 -189
  348. package/dist/native/index.native112.js +12 -12
  349. package/dist/native/index.native113.js +12 -12
  350. package/dist/native/index.native114.js +92 -2
  351. package/dist/native/index.native115.js +14 -63
  352. package/dist/native/index.native116.js +18 -360
  353. package/dist/native/index.native117.js +50 -950
  354. package/dist/native/index.native118.js +951 -2
  355. package/dist/native/index.native119.js +2 -50
  356. package/dist/native/index.native12.js +29 -26
  357. package/dist/native/index.native120.js +49 -27
  358. package/dist/native/index.native121.js +27 -54
  359. package/dist/native/index.native122.js +12 -10
  360. package/dist/native/index.native123.js +12 -2
  361. package/dist/native/index.native124.js +5 -45
  362. package/dist/native/index.native125.js +54 -13
  363. package/dist/native/index.native126.js +11 -5
  364. package/dist/native/index.native127.js +2 -48
  365. package/dist/native/index.native128.js +44 -34
  366. package/dist/native/index.native129.js +12 -66
  367. package/dist/native/index.native13.js +1 -1
  368. package/dist/native/index.native130.js +14 -2
  369. package/dist/native/index.native131.js +28 -2
  370. package/dist/native/index.native132.js +7 -12
  371. package/dist/native/index.native133.js +3 -11
  372. package/dist/native/index.native134.js +27 -4
  373. package/dist/native/index.native135.js +8 -17
  374. package/dist/native/index.native136.js +7 -45
  375. package/dist/native/index.native137.js +79 -13
  376. package/dist/native/index.native138.js +26 -54
  377. package/dist/native/index.native139.js +3 -6
  378. package/dist/native/index.native14.js +1 -1
  379. package/dist/native/index.native140.js +14 -21
  380. package/dist/native/index.native141.js +4 -3
  381. package/dist/native/index.native142.js +13 -3
  382. package/dist/native/index.native143.js +17 -32
  383. package/dist/native/index.native144.js +57 -9
  384. package/dist/native/index.native145.js +17 -4
  385. package/dist/native/index.native146.js +21 -26
  386. package/dist/native/index.native147.js +8 -6
  387. package/dist/native/index.native148.js +40 -41
  388. package/dist/native/index.native149.js +7 -55
  389. package/dist/native/index.native15.js +1 -1
  390. package/dist/native/index.native150.js +19 -126
  391. package/dist/native/index.native151.js +35 -24
  392. package/dist/native/index.native152.js +65 -10
  393. package/dist/native/index.native153.js +5 -105
  394. package/dist/native/index.native154.js +47 -6
  395. package/dist/native/index.native155.js +2 -3
  396. package/dist/native/index.native156.js +2 -15
  397. package/dist/native/index.native157.js +13 -34
  398. package/dist/native/index.native158.js +51 -74
  399. package/dist/native/index.native159.js +7 -2
  400. package/dist/native/index.native16.js +1 -1
  401. package/dist/native/index.native160.js +22 -2
  402. package/dist/native/index.native161.js +16 -36
  403. package/dist/native/index.native162.js +44 -5
  404. package/dist/native/index.native163.js +3 -34
  405. package/dist/native/index.native164.js +3 -8
  406. package/dist/native/index.native165.js +33 -9
  407. package/dist/native/index.native166.js +12 -11
  408. package/dist/native/index.native167.js +4 -13
  409. package/dist/native/index.native168.js +28 -18
  410. package/dist/native/index.native169.js +6 -5
  411. package/dist/native/index.native17.js +1 -1
  412. package/dist/native/index.native170.js +33 -5
  413. package/dist/native/index.native171.js +12 -10
  414. package/dist/native/index.native172.js +53 -18
  415. package/dist/native/index.native173.js +43 -10
  416. package/dist/native/index.native174.js +126 -18
  417. package/dist/native/index.native175.js +99 -88
  418. package/dist/native/index.native176.js +7 -21
  419. package/dist/native/index.native177.js +3 -118
  420. package/dist/native/index.native178.js +78 -13
  421. package/dist/native/index.native179.js +2 -28
  422. package/dist/native/index.native18.js +1 -1
  423. package/dist/native/index.native180.js +2 -8
  424. package/dist/native/index.native181.js +37 -3
  425. package/dist/native/index.native182.js +5 -26
  426. package/dist/native/index.native183.js +34 -8
  427. package/dist/native/index.native184.js +14 -7
  428. package/dist/native/index.native185.js +33 -78
  429. package/dist/native/index.native186.js +17 -26
  430. package/dist/native/index.native187.js +8 -3
  431. package/dist/native/index.native188.js +10 -14
  432. package/dist/native/index.native189.js +11 -4
  433. package/dist/native/index.native19.js +4 -4
  434. package/dist/native/index.native190.js +13 -13
  435. package/dist/native/index.native191.js +5 -19
  436. package/dist/native/index.native192.js +5 -61
  437. package/dist/native/index.native193.js +10 -17
  438. package/dist/native/index.native194.js +102 -22
  439. package/dist/native/index.native195.js +78 -8
  440. package/dist/native/index.native196.js +79 -41
  441. package/dist/native/index.native197.js +2 -8
  442. package/dist/native/index.native198.js +108 -20
  443. package/dist/native/index.native199.js +2 -8
  444. package/dist/native/index.native2.js +2 -2
  445. package/dist/native/index.native20.js +5 -5
  446. package/dist/native/index.native200.js +21 -2
  447. package/dist/native/index.native201.js +10 -378
  448. package/dist/native/index.native202.js +20 -836
  449. package/dist/native/index.native203.js +94 -39
  450. package/dist/native/index.native204.js +21 -2
  451. package/dist/native/index.native205.js +117 -69
  452. package/dist/native/index.native206.js +7 -34
  453. package/dist/native/index.native207.js +2 -21
  454. package/dist/native/index.native208.js +369 -95
  455. package/dist/native/index.native209.js +835 -78
  456. package/dist/native/index.native210.js +38 -79
  457. package/dist/native/index.native211.js +2 -2
  458. package/dist/native/index.native212.js +68 -107
  459. package/dist/native/index.native213.js +35 -2
  460. package/dist/native/index.native214.js +21 -2
  461. package/dist/native/index.native215.js +40 -14
  462. package/dist/native/index.native216.js +18 -17
  463. package/dist/native/index.native217.js +2 -33
  464. package/dist/native/index.native218.js +19 -6
  465. package/dist/native/index.native219.js +33 -2
  466. package/dist/native/index.native220.js +7 -2
  467. package/dist/native/index.native221.js +4 -2
  468. package/dist/native/index.native223.js +1 -1
  469. package/dist/native/index.native225.js +1 -1
  470. package/dist/native/index.native228.js +1 -1
  471. package/dist/native/index.native229.js +1 -1
  472. package/dist/native/index.native230.js +2 -4
  473. package/dist/native/index.native231.js +2 -47
  474. package/dist/native/index.native232.js +2 -5
  475. package/dist/native/index.native233.js +5 -79
  476. package/dist/native/index.native234.js +1 -1
  477. package/dist/native/index.native235.js +81 -0
  478. package/dist/native/index.native28.js +2 -2
  479. package/dist/native/index.native29.js +3 -3
  480. package/dist/native/index.native3.js +1 -1
  481. package/dist/native/index.native30.js +2 -2
  482. package/dist/native/index.native31.js +2 -2
  483. package/dist/native/index.native32.js +2 -2
  484. package/dist/native/index.native33.js +2 -2
  485. package/dist/native/index.native34.js +4 -4
  486. package/dist/native/index.native35.js +2 -2
  487. package/dist/native/index.native36.js +2 -2
  488. package/dist/native/index.native37.js +1 -1
  489. package/dist/native/index.native38.js +3 -3
  490. package/dist/native/index.native39.js +3 -3
  491. package/dist/native/index.native4.js +74 -97
  492. package/dist/native/index.native40.js +2 -2
  493. package/dist/native/index.native41.js +1 -1
  494. package/dist/native/index.native42.js +1 -1
  495. package/dist/native/index.native48.js +2 -2
  496. package/dist/native/index.native5.js +1 -1
  497. package/dist/native/index.native50.js +2 -2
  498. package/dist/native/index.native51.js +2 -2
  499. package/dist/native/index.native52.js +2 -2
  500. package/dist/native/index.native53.js +1 -1
  501. package/dist/native/index.native55.js +2 -2
  502. package/dist/native/index.native56.js +1 -1
  503. package/dist/native/index.native57.js +1 -1
  504. package/dist/native/index.native58.js +1 -1
  505. package/dist/native/index.native63.js +2 -2
  506. package/dist/native/index.native64.js +2 -2
  507. package/dist/native/index.native65.js +4 -4
  508. package/dist/native/index.native66.js +1 -1
  509. package/dist/native/index.native67.js +1 -1
  510. package/dist/native/index.native72.js +2 -2
  511. package/dist/native/index.native73.js +3 -3
  512. package/dist/native/index.native75.js +5 -5
  513. package/dist/native/index.native78.js +5 -5
  514. package/dist/native/index.native79.js +2 -2
  515. package/dist/native/index.native80.js +3 -3
  516. package/dist/native/index.native81.js +7 -30
  517. package/dist/native/index.native82.js +31 -17
  518. package/dist/native/index.native83.js +17 -43
  519. package/dist/native/index.native84.js +44 -42
  520. package/dist/native/index.native85.js +42 -3
  521. package/dist/native/index.native86.js +3 -24
  522. package/dist/native/index.native87.js +24 -9
  523. package/dist/native/index.native88.js +9 -29
  524. package/dist/native/index.native89.js +28 -40
  525. package/dist/native/index.native90.js +41 -49
  526. package/dist/native/index.native91.js +47 -79
  527. package/dist/native/index.native92.js +78 -23
  528. package/dist/native/index.native93.js +22 -156
  529. package/dist/native/index.native94.js +157 -45
  530. package/dist/native/index.native95.js +48 -20
  531. package/dist/native/index.native96.js +18 -71
  532. package/dist/native/index.native97.js +71 -7
  533. package/dist/native/index.native98.js +6 -92
  534. package/dist/native/index.native99.js +73 -115
  535. package/dist/native-types/index.native.d.ts +1 -0
  536. package/dist/native-types/platform/native/attestationRegistry.d.ts +28 -0
  537. package/dist/native-types/platform/types.d.ts +0 -1
  538. package/dist/native-types/version.d.ts +1 -1
  539. package/dist/types/index.native.d.ts +1 -0
  540. package/dist/types/platform/native/attestationRegistry.d.ts +28 -0
  541. package/dist/types/platform/types.d.ts +0 -1
  542. package/dist/types/version.d.ts +1 -1
  543. package/dist/web/index.web106.js +12 -12
  544. package/dist/web/index.web107.js +373 -13
  545. package/dist/web/index.web108.js +28 -22
  546. package/dist/web/index.web109.js +28 -50
  547. package/dist/web/index.web110.js +2 -379
  548. package/dist/web/index.web111.js +68 -2
  549. package/dist/web/index.web112.js +336 -37
  550. package/dist/web/index.web113.js +12 -360
  551. package/dist/web/index.web114.js +22 -28
  552. package/dist/web/index.web115.js +50 -28
  553. package/dist/web/index.web116.js +4 -950
  554. package/dist/web/index.web117.js +951 -2
  555. package/dist/web/index.web118.js +2 -50
  556. package/dist/web/index.web119.js +49 -27
  557. package/dist/web/index.web120.js +27 -54
  558. package/dist/web/index.web121.js +14 -10
  559. package/dist/web/index.web122.js +29 -2
  560. package/dist/web/index.web123.js +8 -45
  561. package/dist/web/index.web124.js +3 -13
  562. package/dist/web/index.web125.js +29 -5
  563. package/dist/web/index.web126.js +8 -47
  564. package/dist/web/index.web127.js +8 -2
  565. package/dist/web/index.web128.js +81 -2
  566. package/dist/web/index.web129.js +26 -10
  567. package/dist/web/index.web130.js +3 -11
  568. package/dist/web/index.web131.js +15 -4
  569. package/dist/web/index.web132.js +4 -17
  570. package/dist/web/index.web133.js +14 -45
  571. package/dist/web/index.web134.js +19 -13
  572. package/dist/web/index.web135.js +58 -52
  573. package/dist/web/index.web136.js +17 -6
  574. package/dist/web/index.web137.js +22 -20
  575. package/dist/web/index.web138.js +8 -3
  576. package/dist/web/index.web139.js +42 -3
  577. package/dist/web/index.web140.js +7 -34
  578. package/dist/web/index.web141.js +19 -11
  579. package/dist/web/index.web142.js +12 -4
  580. package/dist/web/index.web143.js +11 -28
  581. package/dist/web/index.web144.js +5 -7
  582. package/dist/web/index.web145.js +43 -38
  583. package/dist/web/index.web146.js +52 -53
  584. package/dist/web/index.web147.js +10 -127
  585. package/dist/web/index.web148.js +2 -24
  586. package/dist/web/index.web149.js +44 -12
  587. package/dist/web/index.web150.js +13 -104
  588. package/dist/web/index.web151.js +13 -6
  589. package/dist/web/index.web152.js +56 -3
  590. package/dist/web/index.web153.js +6 -14
  591. package/dist/web/index.web154.js +19 -32
  592. package/dist/web/index.web155.js +16 -77
  593. package/dist/web/index.web156.js +46 -2
  594. package/dist/web/index.web157.js +4 -2
  595. package/dist/web/index.web158.js +3 -37
  596. package/dist/web/index.web159.js +33 -5
  597. package/dist/web/index.web160.js +9 -31
  598. package/dist/web/index.web161.js +4 -8
  599. package/dist/web/index.web162.js +28 -10
  600. package/dist/web/index.web163.js +6 -11
  601. package/dist/web/index.web164.js +31 -12
  602. package/dist/web/index.web165.js +11 -17
  603. package/dist/web/index.web166.js +55 -5
  604. package/dist/web/index.web167.js +43 -5
  605. package/dist/web/index.web168.js +127 -10
  606. package/dist/web/index.web169.js +102 -18
  607. package/dist/web/index.web170.js +7 -10
  608. package/dist/web/index.web171.js +3 -20
  609. package/dist/web/index.web172.js +76 -91
  610. package/dist/web/index.web173.js +2 -21
  611. package/dist/web/index.web174.js +2 -118
  612. package/dist/web/index.web175.js +37 -14
  613. package/dist/web/index.web176.js +5 -27
  614. package/dist/web/index.web177.js +34 -7
  615. package/dist/web/index.web178.js +14 -3
  616. package/dist/web/index.web179.js +32 -26
  617. package/dist/web/index.web180.js +18 -8
  618. package/dist/web/index.web181.js +8 -7
  619. package/dist/web/index.web182.js +10 -80
  620. package/dist/web/index.web183.js +11 -28
  621. package/dist/web/index.web184.js +13 -3
  622. package/dist/web/index.web185.js +5 -15
  623. package/dist/web/index.web186.js +5 -5
  624. package/dist/web/index.web187.js +10 -14
  625. package/dist/web/index.web188.js +2 -20
  626. package/dist/web/index.web189.js +2 -62
  627. package/dist/web/index.web190.js +2 -18
  628. package/dist/web/index.web191.js +108 -23
  629. package/dist/web/index.web192.js +2 -9
  630. package/dist/web/index.web193.js +102 -41
  631. package/dist/web/index.web194.js +78 -7
  632. package/dist/web/index.web195.js +79 -20
  633. package/dist/web/index.web196.js +38 -7
  634. package/dist/web/index.web198.js +67 -375
  635. package/dist/web/index.web199.js +34 -835
  636. package/dist/web/index.web2.js +2 -2
  637. package/dist/web/index.web200.js +20 -38
  638. package/dist/web/index.web201.js +8 -2
  639. package/dist/web/index.web202.js +2 -70
  640. package/dist/web/index.web203.js +373 -30
  641. package/dist/web/index.web204.js +835 -20
  642. package/dist/web/index.web205.js +19 -102
  643. package/dist/web/index.web206.js +10 -79
  644. package/dist/web/index.web207.js +20 -80
  645. package/dist/web/index.web208.js +94 -2
  646. package/dist/web/index.web209.js +21 -109
  647. package/dist/web/index.web210.js +118 -2
  648. package/dist/web/index.web211.js +47 -2
  649. package/dist/web/index.web212.js +1 -1
  650. package/dist/web/index.web213.js +2 -20
  651. package/dist/web/index.web214.js +18 -31
  652. package/dist/web/index.web215.js +32 -6
  653. package/dist/web/index.web216.js +7 -2
  654. package/dist/web/index.web217.js +2 -2
  655. package/dist/web/index.web218.js +2 -2
  656. package/dist/web/index.web219.js +2 -18
  657. package/dist/web/index.web220.js +4 -28
  658. package/dist/web/index.web221.js +18 -8
  659. package/dist/web/index.web222.js +26 -9
  660. package/dist/web/index.web223.js +8 -13
  661. package/dist/web/index.web224.js +11 -10
  662. package/dist/web/index.web225.js +11 -15
  663. package/dist/web/index.web226.js +9 -80
  664. package/dist/web/index.web227.js +15 -2
  665. package/dist/web/index.web228.js +79 -45
  666. package/dist/web/index.web230.js +14 -78
  667. package/dist/web/index.web231.js +78 -14
  668. package/dist/web/index.web3.js +1 -1
  669. package/dist/web/index.web8.js +1 -1
  670. package/dist/web/index.web85.js +1 -1
  671. package/dist/web/index.web89.js +3 -3
  672. package/dist/web/index.web9.js +18 -16
  673. package/dist/web/index.web92.js +2 -2
  674. package/dist/web/index.web96.js +3 -3
  675. package/dist/web-types/index.native.d.ts +1 -0
  676. package/dist/web-types/platform/native/attestationRegistry.d.ts +28 -0
  677. package/dist/web-types/platform/types.d.ts +0 -1
  678. package/dist/web-types/version.d.ts +1 -1
  679. package/package.json +6 -10
@@ -1,70 +1,139 @@
1
1
  import "@coinbase/cdp-api-client";
2
2
  import "viem";
3
- import "./index.native2.js";
4
- import "./index.native3.js";
5
- import "jose";
6
- import { getPlatformOAuth as a } from "./index.native10.js";
7
- import "./index.native84.js";
8
- import { verifyOAuth as e } from "./index.native18.js";
9
- import "./index.native85.js";
10
- import "@solana/web3.js";
11
- import "bs58";
12
- class S {
13
- oauthFlowState = null;
14
- oauthStateChangeCallbacks = [];
3
+ import { mockUser as e } from "./index.native89.js";
4
+ class n {
5
+ authState = null;
6
+ authStateChangeCallback = null;
15
7
  /**
16
- * Initializes the mock OAuth manager.
8
+ * Initializes the mock auth manager.
9
+ *
10
+ * @param _projectId - The project ID (unused in mock implementation).
11
+ */
12
+ constructor(t) {
13
+ }
14
+ /**
15
+ * Awaitable method whose promise only resolves when the auth manager is ready to be used.
16
+ *
17
+ * @returns A promise that resolves when the auth manager is ready to be used.
17
18
  */
18
- constructor() {
19
- this.handleOAuthCode();
19
+ async ensureInitialized() {
20
+ return Promise.resolve();
20
21
  }
21
22
  /**
22
23
  * Gets the current user, or null if there is no user signed in.
23
24
  *
24
25
  * @returns The current mock user if signed in, null otherwise.
25
26
  */
26
- async getOAuthFlowState() {
27
- return this.oauthFlowState ?? null;
27
+ getUser() {
28
+ return this.authState?.user ?? null;
28
29
  }
29
30
  /**
30
- * Sets the OAuth flow state.
31
+ * Returns whether the user is signed in - i.e., whether there is an unexpired
32
+ * access token and user.
31
33
  *
32
- * @param oauthFlowState - The OAuth flow state to set.
34
+ * @returns True if the mock user is signed in and token is not expired, false otherwise.
33
35
  */
34
- async setOAuthFlowState(t) {
35
- this.oauthFlowState = t, this.oauthStateChangeCallbacks.forEach((o) => o(this.oauthFlowState));
36
+ async isSignedIn() {
37
+ return this.authState ? Promise.resolve(this.authState.expiresAt > Date.now()) : Promise.resolve(!1);
36
38
  }
37
39
  /**
38
- * Adds a callback to be called when the OAuth state changes.
40
+ * Signs out the user, clearing all authentication state.
41
+ * In the mock implementation, this simply clears the local auth state.
42
+ */
43
+ async signOut() {
44
+ await this.clearAuthState();
45
+ }
46
+ /**
47
+ * Sets a callback to be called when the auth state changes.
48
+ * The callback is immediately called with the current auth state.
39
49
  *
40
- * @param callback - The function to call when the OAuth state changes.
50
+ * @param callback - The function to call when the auth state changes.
51
+ * Will be called with the current user or null.
41
52
  */
42
- async addOAuthStateChangeCallback(t) {
43
- this.oauthStateChangeCallbacks.push(t), t(this.oauthFlowState);
53
+ addAuthStateChangeCallback(t) {
54
+ this.authStateChangeCallback = t, t(this.authState?.user ?? null);
44
55
  }
45
56
  /**
46
- * Clears the OAuth flow state.
57
+ * Gets the access token. For mock, this always returns a valid token if signed in.
58
+ * If the current token is expired, it will be refreshed automatically.
59
+ *
60
+ * @param options - The options for getting the token.
61
+ * @param options.forceRefresh - Whether to force a refresh of the token.
62
+ * @returns The mock access token if signed in, null otherwise.
63
+ */
64
+ async getToken(t) {
65
+ return this.authState ? ((t?.forceRefresh || this.authState.expiresAt <= Date.now()) && await this.refreshToken(), this.authState?.accessToken ?? null) : null;
66
+ }
67
+ /**
68
+ * Gets the expiration time of the access token, or null if the user is not signed in.
69
+ *
70
+ * @returns The expiration time of the access token.
71
+ */
72
+ async getTokenExpiration() {
73
+ return this.authState?.expiresAt ?? null;
74
+ }
75
+ /**
76
+ * Gets the currentlly registered wallet secret ID.
77
+ *
78
+ * @returns The wallet secret ID.
47
79
  */
48
- async clearOAuthFlowState() {
49
- this.oauthFlowState = null, this.oauthStateChangeCallbacks.forEach((t) => t(null));
80
+ async getWalletSecretId() {
81
+ return "mock-wallet-secret-id";
50
82
  }
51
83
  /**
52
- * Awaitable method whose promise only resolves when the OAuth manager is ready to be used.
84
+ * Gets the X-Wallet-Auth header value.
85
+ *
86
+ * @param _options - The options for the request.
87
+ * @param _options.requestMethod - The HTTP method of the request.
88
+ * @param _options.requestHost - The host of the request.
89
+ * @param _options.requestPath - The path of the request.
90
+ * @param _options.requestData - The data of the request.
91
+ * @returns The X-Wallet-Auth header value.
92
+ */
93
+ async getXWalletAuth(t) {
94
+ if (!this.authState)
95
+ throw new Error("User not signed in");
96
+ return "x-wallet-auth";
97
+ }
98
+ /**
99
+ * Gets the authentication state.
100
+ *
101
+ * @returns The authentication state.
102
+ */
103
+ getAuthState() {
104
+ return this.authState;
105
+ }
106
+ /**
107
+ * Sets the authentication state.
108
+ * This will trigger the auth state change callback if one is registered.
109
+ *
110
+ * @param authState - The new authentication state to set.
111
+ */
112
+ async setAuthState(t) {
113
+ this.authState = t, this.authStateChangeCallback && this.authStateChangeCallback(this.authState?.user ?? null);
114
+ }
115
+ /**
116
+ * Clears the authentication state.
117
+ * This will trigger the auth state change callback if one is registered.
118
+ */
119
+ async clearAuthState() {
120
+ this.authState = null, this.authStateChangeCallback && this.authStateChangeCallback(null);
121
+ }
122
+ /**
123
+ * Refreshes the mock token.
124
+ * Only refreshes if there is an existing auth state (user is signed in).
125
+ * Sets a new mock token with a 24-hour expiration.
126
+ *
127
+ * @private
53
128
  */
54
- async handleOAuthCode() {
55
- await a()?.cleanupOAuthParams(), await this.setOAuthFlowState({
56
- providerType: "google",
57
- status: "pending",
58
- code: "mock-oauth-code",
59
- flowId: "mock-flow-id"
60
- }), await e({ code: "mock-oauth-code", providerType: "google", flowId: "mock-flow-id" }), await this.setOAuthFlowState({
61
- providerType: "google",
62
- status: "success",
63
- code: "mock-oauth-code",
64
- flowId: "mock-flow-id"
129
+ async refreshToken() {
130
+ this.authState && await this.setAuthState({
131
+ accessToken: "mock-access-token",
132
+ expiresAt: Date.now() + 1e3 * 60 * 60 * 24,
133
+ user: e
65
134
  });
66
135
  }
67
136
  }
68
137
  export {
69
- S as MockOAuthManager
138
+ n as MockAuthManager
70
139
  };
@@ -1,29 +1,70 @@
1
- import { initiateAuthentication as n } from "@coinbase/cdp-api-client";
2
- import { getConfig as t, getCoreAuthManager as o } from "./index.native62.js";
3
- const f = async (e, r) => {
4
- if (t().useMock)
5
- return "redirectUrl" in e ? {
6
- authUrl: "mock-auth-url",
1
+ import "@coinbase/cdp-api-client";
2
+ import "viem";
3
+ import "./index.native2.js";
4
+ import "./index.native3.js";
5
+ import "jose";
6
+ import { getPlatformOAuth as a } from "./index.native10.js";
7
+ import "./index.native85.js";
8
+ import { verifyOAuth as e } from "./index.native18.js";
9
+ import "./index.native86.js";
10
+ import "@solana/web3.js";
11
+ import "bs58";
12
+ class S {
13
+ oauthFlowState = null;
14
+ oauthStateChangeCallbacks = [];
15
+ /**
16
+ * Initializes the mock OAuth manager.
17
+ */
18
+ constructor() {
19
+ this.handleOAuthCode();
20
+ }
21
+ /**
22
+ * Gets the current user, or null if there is no user signed in.
23
+ *
24
+ * @returns The current mock user if signed in, null otherwise.
25
+ */
26
+ async getOAuthFlowState() {
27
+ return this.oauthFlowState ?? null;
28
+ }
29
+ /**
30
+ * Sets the OAuth flow state.
31
+ *
32
+ * @param oauthFlowState - The OAuth flow state to set.
33
+ */
34
+ async setOAuthFlowState(t) {
35
+ this.oauthFlowState = t, this.oauthStateChangeCallbacks.forEach((o) => o(this.oauthFlowState));
36
+ }
37
+ /**
38
+ * Adds a callback to be called when the OAuth state changes.
39
+ *
40
+ * @param callback - The function to call when the OAuth state changes.
41
+ */
42
+ async addOAuthStateChangeCallback(t) {
43
+ this.oauthStateChangeCallbacks.push(t), t(this.oauthFlowState);
44
+ }
45
+ /**
46
+ * Clears the OAuth flow state.
47
+ */
48
+ async clearOAuthFlowState() {
49
+ this.oauthFlowState = null, this.oauthStateChangeCallbacks.forEach((t) => t(null));
50
+ }
51
+ /**
52
+ * Awaitable method whose promise only resolves when the OAuth manager is ready to be used.
53
+ */
54
+ async handleOAuthCode() {
55
+ await a()?.cleanupOAuthParams(), await this.setOAuthFlowState({
56
+ providerType: "google",
57
+ status: "pending",
58
+ code: "mock-oauth-code",
7
59
  flowId: "mock-flow-id"
8
- } : {
9
- message: "Mock sign in initiated",
60
+ }), await e({ code: "mock-oauth-code", providerType: "google", flowId: "mock-flow-id" }), await this.setOAuthFlowState({
61
+ providerType: "google",
62
+ status: "success",
63
+ code: "mock-oauth-code",
10
64
  flowId: "mock-flow-id"
11
- };
12
- if (await o().isSignedIn())
13
- throw new Error("User is already authenticated. Please sign out first.");
14
- const i = await n(
15
- t().projectId,
16
- e,
17
- r
18
- );
19
- return "authUrl" in i ? {
20
- flowId: i.flowId,
21
- authUrl: i.authUrl
22
- } : {
23
- flowId: i.flowId,
24
- message: "message" in i ? i.message : ""
25
- };
26
- };
65
+ });
66
+ }
67
+ }
27
68
  export {
28
- f as initiateSignIn
69
+ S as MockOAuthManager
29
70
  };
@@ -1,44 +1,29 @@
1
- import { createEvmAccountIfNeeded as u } from "./index.native103.js";
2
- import { createSolanaAccountIfNeeded as f } from "./index.native104.js";
3
- import { toAuthState as g } from "./index.native86.js";
4
- import { mockUser as n } from "./index.native88.js";
5
- import { getConfig as s, getCoreAuthManager as o } from "./index.native62.js";
6
- const h = async (r, c, i) => {
7
- if (s().useMock)
8
- return await o().setAuthState({
9
- accessToken: "mock-access-token",
10
- expiresAt: Date.now() + 1e3 * 60 * 60 * 24,
11
- user: n
12
- }), {
13
- message: c,
14
- user: n,
15
- isNewUser: !1
1
+ import { initiateAuthentication as n } from "@coinbase/cdp-api-client";
2
+ import { getConfig as t, getCoreAuthManager as o } from "./index.native62.js";
3
+ const f = async (e, r) => {
4
+ if (t().useMock)
5
+ return "redirectUrl" in e ? {
6
+ authUrl: "mock-auth-url",
7
+ flowId: "mock-flow-id"
8
+ } : {
9
+ message: "Mock sign in initiated",
10
+ flowId: "mock-flow-id"
16
11
  };
17
- const e = await i(s().projectId, r, r.idempotencyKey);
18
- let t = g(
19
- e.accessToken,
20
- e.validUntil,
21
- e.endUser
12
+ if (await o().isSignedIn())
13
+ throw new Error("User is already authenticated. Please sign out first.");
14
+ const i = await n(
15
+ t().projectId,
16
+ e,
17
+ r
22
18
  );
23
- await o().setAuthState(t);
24
- const a = s();
25
- a.ethereum?.createOnLogin && (t = await u(
26
- t,
27
- e.accessToken,
28
- e.validUntil,
29
- a.ethereum.createOnLogin
30
- )), a.solana?.createOnLogin && (t = await f(
31
- t,
32
- e.accessToken,
33
- e.validUntil
34
- ));
35
- const m = o().getUser();
36
- return {
37
- message: e.message,
38
- user: m,
39
- isNewUser: e.isNewEndUser
19
+ return "authUrl" in i ? {
20
+ flowId: i.flowId,
21
+ authUrl: i.authUrl
22
+ } : {
23
+ flowId: i.flowId,
24
+ message: "message" in i ? i.message : ""
40
25
  };
41
26
  };
42
27
  export {
43
- h as verifyOTP
28
+ f as initiateSignIn
44
29
  };
@@ -1,49 +1,44 @@
1
- import { createEndUserEvmAccount as w, createEndUserEvmSmartAccount as A } from "@coinbase/cdp-api-client";
2
- import { toAuthState as f } from "./index.native86.js";
3
- import { getCoreAuthManager as s, getConfig as o } from "./index.native62.js";
4
- const p = async (r, n, a, u) => {
5
- let e = r;
6
- if (!r.user.evmAccountObjects || r.user.evmAccountObjects.length === 0)
7
- try {
8
- const t = await s().getWalletSecretId();
9
- let c = await w(o().projectId, r.user.userId, {
10
- walletSecretId: t
11
- }), m = !1;
12
- const d = o().ethereum;
13
- if (d?.createOnLogin === "smart" && (m = d.enableSpendPermissions ?? !1), u === "smart") {
14
- const i = c.evmAccountObjects?.[0]?.address;
15
- if (!i)
16
- throw new Error("No EVM account found to use as owner for smart account");
17
- c = await A(
18
- o().projectId,
19
- r.user.userId,
20
- {
21
- owner: i,
22
- enableSpendPermissions: m
23
- }
24
- );
25
- }
26
- e = f(n, a, c), await s().setAuthState(e);
27
- } catch (t) {
28
- throw new Error(`Failed to create EVM account: ${t}`);
29
- }
30
- if (u === "smart" && (!e.user.evmSmartAccountObjects || e.user.evmSmartAccountObjects.length === 0))
31
- try {
32
- const t = e.user.evmAccountObjects[0]?.address, c = await A(
33
- o().projectId,
34
- e.user.userId,
35
- {
36
- owner: t,
37
- enableSpendPermissions: !1
38
- // Defaulting to false until the feature is ready.
39
- }
40
- );
41
- e = f(n, a, c), await s().setAuthState(e);
42
- } catch (t) {
43
- throw new Error(`Failed to create EVM Smart Account: ${t}`);
44
- }
45
- return e;
1
+ import { createEvmAccountIfNeeded as u } from "./index.native104.js";
2
+ import { createSolanaAccountIfNeeded as f } from "./index.native105.js";
3
+ import { toAuthState as g } from "./index.native87.js";
4
+ import { mockUser as n } from "./index.native89.js";
5
+ import { getConfig as s, getCoreAuthManager as o } from "./index.native62.js";
6
+ const h = async (r, c, i) => {
7
+ if (s().useMock)
8
+ return await o().setAuthState({
9
+ accessToken: "mock-access-token",
10
+ expiresAt: Date.now() + 1e3 * 60 * 60 * 24,
11
+ user: n
12
+ }), {
13
+ message: c,
14
+ user: n,
15
+ isNewUser: !1
16
+ };
17
+ const e = await i(s().projectId, r, r.idempotencyKey);
18
+ let t = g(
19
+ e.accessToken,
20
+ e.validUntil,
21
+ e.endUser
22
+ );
23
+ await o().setAuthState(t);
24
+ const a = s();
25
+ a.ethereum?.createOnLogin && (t = await u(
26
+ t,
27
+ e.accessToken,
28
+ e.validUntil,
29
+ a.ethereum.createOnLogin
30
+ )), a.solana?.createOnLogin && (t = await f(
31
+ t,
32
+ e.accessToken,
33
+ e.validUntil
34
+ ));
35
+ const m = o().getUser();
36
+ return {
37
+ message: e.message,
38
+ user: m,
39
+ isNewUser: e.isNewEndUser
40
+ };
46
41
  };
47
42
  export {
48
- p as createEvmAccountIfNeeded
43
+ h as verifyOTP
49
44
  };
@@ -1,23 +1,49 @@
1
- import { createEndUserSolanaAccount as s } from "@coinbase/cdp-api-client";
2
- import { toAuthState as l } from "./index.native86.js";
3
- import { getCoreAuthManager as o, getConfig as u } from "./index.native62.js";
4
- const f = async (e, a, c) => {
5
- let t = e;
6
- if (!e.user.solanaAccountObjects || e.user.solanaAccountObjects.length === 0)
1
+ import { createEndUserEvmAccount as w, createEndUserEvmSmartAccount as A } from "@coinbase/cdp-api-client";
2
+ import { toAuthState as f } from "./index.native87.js";
3
+ import { getCoreAuthManager as s, getConfig as o } from "./index.native62.js";
4
+ const p = async (r, n, a, u) => {
5
+ let e = r;
6
+ if (!r.user.evmAccountObjects || r.user.evmAccountObjects.length === 0)
7
7
  try {
8
- const r = await o().getWalletSecretId(), n = await s(
9
- u().projectId,
8
+ const t = await s().getWalletSecretId();
9
+ let c = await w(o().projectId, r.user.userId, {
10
+ walletSecretId: t
11
+ }), m = !1;
12
+ const d = o().ethereum;
13
+ if (d?.createOnLogin === "smart" && (m = d.enableSpendPermissions ?? !1), u === "smart") {
14
+ const i = c.evmAccountObjects?.[0]?.address;
15
+ if (!i)
16
+ throw new Error("No EVM account found to use as owner for smart account");
17
+ c = await A(
18
+ o().projectId,
19
+ r.user.userId,
20
+ {
21
+ owner: i,
22
+ enableSpendPermissions: m
23
+ }
24
+ );
25
+ }
26
+ e = f(n, a, c), await s().setAuthState(e);
27
+ } catch (t) {
28
+ throw new Error(`Failed to create EVM account: ${t}`);
29
+ }
30
+ if (u === "smart" && (!e.user.evmSmartAccountObjects || e.user.evmSmartAccountObjects.length === 0))
31
+ try {
32
+ const t = e.user.evmAccountObjects[0]?.address, c = await A(
33
+ o().projectId,
10
34
  e.user.userId,
11
35
  {
12
- walletSecretId: r
36
+ owner: t,
37
+ enableSpendPermissions: !1
38
+ // Defaulting to false until the feature is ready.
13
39
  }
14
40
  );
15
- t = l(a, c, n), await o().setAuthState(t);
16
- } catch (r) {
17
- throw new Error(`Failed to create Solana account: ${r}`);
41
+ e = f(n, a, c), await s().setAuthState(e);
42
+ } catch (t) {
43
+ throw new Error(`Failed to create EVM Smart Account: ${t}`);
18
44
  }
19
- return t;
45
+ return e;
20
46
  };
21
47
  export {
22
- f as createSolanaAccountIfNeeded
48
+ p as createEvmAccountIfNeeded
23
49
  };
@@ -1,67 +1,23 @@
1
- import { AuthManager as a } from "./index.native73.js";
2
- import { getConfig as o } from "./index.native62.js";
3
- import { CustomAuthError as s } from "./index.native74.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;
1
+ import { createEndUserSolanaAccount as s } from "@coinbase/cdp-api-client";
2
+ import { toAuthState as l } from "./index.native87.js";
3
+ import { getCoreAuthManager as o, getConfig as u } from "./index.native62.js";
4
+ const f = async (e, a, c) => {
5
+ let t = e;
6
+ if (!e.user.solanaAccountObjects || e.user.solanaAccountObjects.length === 0)
24
7
  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"
8
+ const r = await o().getWalletSecretId(), n = await s(
9
+ u().projectId,
10
+ e.user.userId,
11
+ {
12
+ walletSecretId: r
13
+ }
30
14
  );
31
- return console.error(r), await this.clearAuthState(), null;
15
+ t = l(a, c, n), await o().setAuthState(t);
16
+ } catch (r) {
17
+ throw new Error(`Failed to create Solana account: ${r}`);
32
18
  }
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
- }
63
- }
19
+ return t;
20
+ };
64
21
  export {
65
- n as CUSTOM_AUTH_REFRESH_BUFFER_MS,
66
- l as CustomAuthManager
22
+ f as createSolanaAccountIfNeeded
67
23
  };