@coinbase/cdp-core 0.0.42 → 0.0.43

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 (485) hide show
  1. package/README.md +39 -0
  2. package/dist/esm/index.native.js +29 -26
  3. package/dist/esm/index.native10.js +156 -113
  4. package/dist/esm/index.native100.js +9 -117
  5. package/dist/esm/index.native101.js +19 -9
  6. package/dist/esm/index.native102.js +90 -75
  7. package/dist/esm/index.native103.js +21 -5
  8. package/dist/esm/index.native104.js +118 -18
  9. package/dist/esm/index.native105.js +5 -28
  10. package/dist/esm/index.native106.js +11 -6
  11. package/dist/esm/index.native107.js +35 -10
  12. package/dist/esm/index.native108.js +40 -11
  13. package/dist/esm/index.native109.js +16 -8
  14. package/dist/esm/index.native11.js +115 -21
  15. package/dist/esm/index.native110.js +28 -17
  16. package/dist/esm/index.native111.js +6 -79
  17. package/dist/esm/index.native112.js +9 -11
  18. package/dist/esm/index.native113.js +13 -36
  19. package/dist/esm/index.native114.js +8 -40
  20. package/dist/esm/index.native115.js +13 -75
  21. package/dist/esm/index.native116.js +83 -0
  22. package/dist/esm/index.native117.js +81 -0
  23. package/dist/esm/index.native12.js +29 -28
  24. package/dist/esm/index.native13.js +32 -3
  25. package/dist/esm/index.native14.js +3 -16
  26. package/dist/esm/index.native15.js +15 -17
  27. package/dist/esm/index.native16.js +15 -116
  28. package/dist/esm/index.native17.js +116 -12
  29. package/dist/esm/index.native18.js +15 -42
  30. package/dist/esm/index.native19.js +42 -20
  31. package/dist/esm/index.native2.js +25 -10
  32. package/dist/esm/index.native20.js +20 -172
  33. package/dist/esm/index.native21.js +170 -39
  34. package/dist/esm/index.native22.js +42 -47
  35. package/dist/esm/index.native23.js +40 -71
  36. package/dist/esm/index.native24.js +48 -25
  37. package/dist/esm/index.native25.js +65 -153
  38. package/dist/esm/index.native26.js +24 -46
  39. package/dist/esm/index.native27.js +943 -243
  40. package/dist/esm/index.native28.js +2 -56
  41. package/dist/esm/index.native29.js +49 -950
  42. package/dist/esm/index.native30.js +28 -2
  43. package/dist/esm/index.native31.js +158 -48
  44. package/dist/esm/index.native32.js +47 -27
  45. package/dist/esm/index.native33.js +247 -13
  46. package/dist/esm/index.native34.js +56 -23
  47. package/dist/esm/index.native35.js +13 -47
  48. package/dist/esm/index.native36.js +23 -2
  49. package/dist/esm/index.native37.js +51 -2
  50. package/dist/esm/index.native38.js +2 -9
  51. package/dist/esm/index.native39.js +2 -18
  52. package/dist/esm/index.native40.js +8 -45
  53. package/dist/esm/index.native41.js +17 -13
  54. package/dist/esm/index.native42.js +40 -50
  55. package/dist/esm/index.native43.js +13 -6
  56. package/dist/esm/index.native44.js +54 -20
  57. package/dist/esm/index.native45.js +6 -11
  58. package/dist/esm/index.native46.js +21 -3
  59. package/dist/esm/index.native47.js +11 -3
  60. package/dist/esm/index.native48.js +3 -34
  61. package/dist/esm/index.native49.js +3 -12
  62. package/dist/esm/index.native50.js +34 -4
  63. package/dist/esm/index.native51.js +11 -27
  64. package/dist/esm/index.native52.js +4 -6
  65. package/dist/esm/index.native53.js +28 -24
  66. package/dist/esm/index.native54.js +6 -16
  67. package/dist/esm/index.native55.js +22 -52
  68. package/dist/esm/index.native56.js +16 -23
  69. package/dist/esm/index.native57.js +53 -10
  70. package/dist/esm/index.native58.js +23 -27
  71. package/dist/esm/index.native59.js +9 -40
  72. package/dist/esm/index.native6.js +136 -136
  73. package/dist/esm/index.native60.js +26 -54
  74. package/dist/esm/index.native61.js +42 -127
  75. package/dist/esm/index.native62.js +53 -10
  76. package/dist/esm/index.native63.js +125 -102
  77. package/dist/esm/index.native64.js +12 -6
  78. package/dist/esm/index.native65.js +105 -3
  79. package/dist/esm/index.native66.js +6 -14
  80. package/dist/esm/index.native67.js +3 -43
  81. package/dist/esm/index.native68.js +14 -78
  82. package/dist/esm/index.native69.js +43 -2
  83. package/dist/esm/index.native7.js +35 -217
  84. package/dist/esm/index.native70.js +79 -2
  85. package/dist/esm/index.native71.js +2 -13
  86. package/dist/esm/index.native72.js +2 -38
  87. package/dist/esm/index.native73.js +11 -5
  88. package/dist/esm/index.native74.js +32 -29
  89. package/dist/esm/index.native75.js +6 -8
  90. package/dist/esm/index.native76.js +33 -9
  91. package/dist/esm/index.native77.js +8 -11
  92. package/dist/esm/index.native78.js +10 -13
  93. package/dist/esm/index.native79.js +11 -18
  94. package/dist/esm/index.native8.js +213 -115
  95. package/dist/esm/index.native80.js +13 -5
  96. package/dist/esm/index.native81.js +19 -5
  97. package/dist/esm/index.native82.js +5 -10
  98. package/dist/esm/index.native83.js +5 -55
  99. package/dist/esm/index.native84.js +10 -10
  100. package/dist/esm/index.native85.js +55 -2
  101. package/dist/esm/index.native86.js +11 -45
  102. package/dist/esm/index.native87.js +2 -14
  103. package/dist/esm/index.native88.js +45 -2
  104. package/dist/esm/index.native89.js +13 -20
  105. package/dist/esm/index.native9.js +115 -155
  106. package/dist/esm/index.native90.js +2 -20
  107. package/dist/esm/index.native91.js +20 -79
  108. package/dist/esm/index.native92.js +18 -102
  109. package/dist/esm/index.native93.js +79 -32
  110. package/dist/esm/index.native94.js +103 -6
  111. package/dist/esm/index.native95.js +30 -18
  112. package/dist/esm/index.native96.js +7 -10
  113. package/dist/esm/index.native97.js +77 -18
  114. package/dist/esm/index.native98.js +9 -93
  115. package/dist/esm/index.native99.js +20 -20
  116. package/dist/esm/index.web.js +26 -23
  117. package/dist/esm/index.web10.js +115 -21
  118. package/dist/esm/index.web100.js +20 -9
  119. package/dist/esm/index.web101.js +112 -73
  120. package/dist/esm/index.web102.js +10 -5
  121. package/dist/esm/index.web103.js +77 -16
  122. package/dist/esm/index.web104.js +5 -28
  123. package/dist/esm/index.web105.js +18 -8
  124. package/dist/esm/index.web106.js +26 -9
  125. package/dist/esm/index.web107.js +8 -13
  126. package/dist/esm/index.web108.js +11 -10
  127. package/dist/esm/index.web109.js +11 -15
  128. package/dist/esm/index.web11.js +29 -28
  129. package/dist/esm/index.web110.js +9 -80
  130. package/dist/esm/index.web111.js +17 -13
  131. package/dist/esm/index.web112.js +77 -32
  132. package/dist/esm/index.web113.js +12 -41
  133. package/dist/esm/index.web114.js +33 -76
  134. package/dist/esm/index.web115.js +44 -0
  135. package/dist/esm/index.web116.js +81 -0
  136. package/dist/esm/index.web12.js +32 -3
  137. package/dist/esm/index.web13.js +3 -16
  138. package/dist/esm/index.web14.js +15 -17
  139. package/dist/esm/index.web15.js +15 -116
  140. package/dist/esm/index.web16.js +116 -12
  141. package/dist/esm/index.web17.js +15 -42
  142. package/dist/esm/index.web18.js +42 -20
  143. package/dist/esm/index.web19.js +20 -172
  144. package/dist/esm/index.web20.js +170 -39
  145. package/dist/esm/index.web21.js +42 -47
  146. package/dist/esm/index.web22.js +40 -71
  147. package/dist/esm/index.web23.js +48 -25
  148. package/dist/esm/index.web24.js +65 -153
  149. package/dist/esm/index.web25.js +24 -46
  150. package/dist/esm/index.web26.js +943 -243
  151. package/dist/esm/index.web27.js +2 -56
  152. package/dist/esm/index.web28.js +49 -950
  153. package/dist/esm/index.web29.js +28 -2
  154. package/dist/esm/index.web3.js +18 -5
  155. package/dist/esm/index.web30.js +158 -48
  156. package/dist/esm/index.web31.js +47 -27
  157. package/dist/esm/index.web32.js +247 -13
  158. package/dist/esm/index.web33.js +56 -23
  159. package/dist/esm/index.web34.js +13 -47
  160. package/dist/esm/index.web35.js +23 -2
  161. package/dist/esm/index.web36.js +51 -2
  162. package/dist/esm/index.web37.js +2 -9
  163. package/dist/esm/index.web38.js +2 -18
  164. package/dist/esm/index.web39.js +8 -45
  165. package/dist/esm/index.web40.js +17 -13
  166. package/dist/esm/index.web41.js +40 -50
  167. package/dist/esm/index.web42.js +13 -6
  168. package/dist/esm/index.web43.js +54 -20
  169. package/dist/esm/index.web44.js +6 -11
  170. package/dist/esm/index.web45.js +21 -3
  171. package/dist/esm/index.web46.js +11 -3
  172. package/dist/esm/index.web47.js +3 -34
  173. package/dist/esm/index.web48.js +3 -12
  174. package/dist/esm/index.web49.js +34 -4
  175. package/dist/esm/index.web5.js +136 -136
  176. package/dist/esm/index.web50.js +11 -27
  177. package/dist/esm/index.web51.js +4 -6
  178. package/dist/esm/index.web52.js +28 -24
  179. package/dist/esm/index.web53.js +6 -16
  180. package/dist/esm/index.web54.js +22 -52
  181. package/dist/esm/index.web55.js +16 -23
  182. package/dist/esm/index.web56.js +53 -10
  183. package/dist/esm/index.web57.js +23 -27
  184. package/dist/esm/index.web58.js +9 -40
  185. package/dist/esm/index.web59.js +26 -54
  186. package/dist/esm/index.web6.js +35 -217
  187. package/dist/esm/index.web60.js +42 -127
  188. package/dist/esm/index.web61.js +53 -10
  189. package/dist/esm/index.web62.js +125 -102
  190. package/dist/esm/index.web63.js +12 -6
  191. package/dist/esm/index.web64.js +105 -3
  192. package/dist/esm/index.web65.js +6 -14
  193. package/dist/esm/index.web66.js +3 -43
  194. package/dist/esm/index.web67.js +14 -78
  195. package/dist/esm/index.web68.js +43 -2
  196. package/dist/esm/index.web69.js +79 -2
  197. package/dist/esm/index.web7.js +213 -115
  198. package/dist/esm/index.web70.js +2 -13
  199. package/dist/esm/index.web71.js +2 -38
  200. package/dist/esm/index.web72.js +11 -5
  201. package/dist/esm/index.web73.js +32 -29
  202. package/dist/esm/index.web74.js +6 -8
  203. package/dist/esm/index.web75.js +33 -9
  204. package/dist/esm/index.web76.js +8 -11
  205. package/dist/esm/index.web77.js +10 -13
  206. package/dist/esm/index.web78.js +11 -18
  207. package/dist/esm/index.web79.js +13 -5
  208. package/dist/esm/index.web8.js +115 -155
  209. package/dist/esm/index.web80.js +19 -5
  210. package/dist/esm/index.web81.js +5 -10
  211. package/dist/esm/index.web82.js +5 -55
  212. package/dist/esm/index.web83.js +10 -10
  213. package/dist/esm/index.web84.js +55 -2
  214. package/dist/esm/index.web85.js +11 -45
  215. package/dist/esm/index.web86.js +2 -14
  216. package/dist/esm/index.web87.js +45 -2
  217. package/dist/esm/index.web88.js +13 -20
  218. package/dist/esm/index.web89.js +2 -20
  219. package/dist/esm/index.web9.js +156 -113
  220. package/dist/esm/index.web90.js +20 -79
  221. package/dist/esm/index.web91.js +18 -102
  222. package/dist/esm/index.web92.js +79 -32
  223. package/dist/esm/index.web93.js +103 -6
  224. package/dist/esm/index.web94.js +30 -18
  225. package/dist/esm/index.web95.js +7 -10
  226. package/dist/esm/index.web96.js +20 -19
  227. package/dist/esm/index.web97.js +9 -93
  228. package/dist/esm/index.web98.js +18 -19
  229. package/dist/esm/index.web99.js +81 -105
  230. package/dist/native/index.native.js +29 -26
  231. package/dist/native/index.native10.js +156 -113
  232. package/dist/native/index.native100.js +9 -117
  233. package/dist/native/index.native101.js +19 -9
  234. package/dist/native/index.native102.js +90 -75
  235. package/dist/native/index.native103.js +21 -5
  236. package/dist/native/index.native104.js +118 -18
  237. package/dist/native/index.native105.js +5 -28
  238. package/dist/native/index.native106.js +11 -6
  239. package/dist/native/index.native107.js +35 -10
  240. package/dist/native/index.native108.js +40 -11
  241. package/dist/native/index.native109.js +16 -8
  242. package/dist/native/index.native11.js +115 -21
  243. package/dist/native/index.native110.js +28 -17
  244. package/dist/native/index.native111.js +6 -79
  245. package/dist/native/index.native112.js +9 -11
  246. package/dist/native/index.native113.js +13 -36
  247. package/dist/native/index.native114.js +8 -40
  248. package/dist/native/index.native115.js +13 -75
  249. package/dist/native/index.native116.js +83 -0
  250. package/dist/native/index.native117.js +81 -0
  251. package/dist/native/index.native12.js +29 -28
  252. package/dist/native/index.native13.js +32 -3
  253. package/dist/native/index.native14.js +3 -16
  254. package/dist/native/index.native15.js +15 -17
  255. package/dist/native/index.native16.js +15 -116
  256. package/dist/native/index.native17.js +116 -12
  257. package/dist/native/index.native18.js +15 -42
  258. package/dist/native/index.native19.js +42 -20
  259. package/dist/native/index.native2.js +25 -10
  260. package/dist/native/index.native20.js +20 -172
  261. package/dist/native/index.native21.js +170 -39
  262. package/dist/native/index.native22.js +42 -47
  263. package/dist/native/index.native23.js +40 -71
  264. package/dist/native/index.native24.js +48 -25
  265. package/dist/native/index.native25.js +65 -153
  266. package/dist/native/index.native26.js +24 -46
  267. package/dist/native/index.native27.js +943 -243
  268. package/dist/native/index.native28.js +2 -56
  269. package/dist/native/index.native29.js +49 -950
  270. package/dist/native/index.native30.js +28 -2
  271. package/dist/native/index.native31.js +158 -48
  272. package/dist/native/index.native32.js +47 -27
  273. package/dist/native/index.native33.js +247 -13
  274. package/dist/native/index.native34.js +56 -23
  275. package/dist/native/index.native35.js +13 -47
  276. package/dist/native/index.native36.js +23 -2
  277. package/dist/native/index.native37.js +51 -2
  278. package/dist/native/index.native38.js +2 -9
  279. package/dist/native/index.native39.js +2 -18
  280. package/dist/native/index.native40.js +8 -45
  281. package/dist/native/index.native41.js +17 -13
  282. package/dist/native/index.native42.js +40 -50
  283. package/dist/native/index.native43.js +13 -6
  284. package/dist/native/index.native44.js +54 -20
  285. package/dist/native/index.native45.js +6 -11
  286. package/dist/native/index.native46.js +21 -3
  287. package/dist/native/index.native47.js +11 -3
  288. package/dist/native/index.native48.js +3 -34
  289. package/dist/native/index.native49.js +3 -12
  290. package/dist/native/index.native50.js +34 -4
  291. package/dist/native/index.native51.js +11 -27
  292. package/dist/native/index.native52.js +4 -6
  293. package/dist/native/index.native53.js +28 -24
  294. package/dist/native/index.native54.js +6 -16
  295. package/dist/native/index.native55.js +22 -52
  296. package/dist/native/index.native56.js +16 -23
  297. package/dist/native/index.native57.js +53 -10
  298. package/dist/native/index.native58.js +23 -27
  299. package/dist/native/index.native59.js +9 -40
  300. package/dist/native/index.native6.js +136 -136
  301. package/dist/native/index.native60.js +26 -54
  302. package/dist/native/index.native61.js +42 -127
  303. package/dist/native/index.native62.js +53 -10
  304. package/dist/native/index.native63.js +125 -102
  305. package/dist/native/index.native64.js +12 -6
  306. package/dist/native/index.native65.js +105 -3
  307. package/dist/native/index.native66.js +6 -14
  308. package/dist/native/index.native67.js +3 -43
  309. package/dist/native/index.native68.js +14 -78
  310. package/dist/native/index.native69.js +43 -2
  311. package/dist/native/index.native7.js +35 -217
  312. package/dist/native/index.native70.js +79 -2
  313. package/dist/native/index.native71.js +2 -13
  314. package/dist/native/index.native72.js +2 -38
  315. package/dist/native/index.native73.js +11 -5
  316. package/dist/native/index.native74.js +32 -29
  317. package/dist/native/index.native75.js +6 -8
  318. package/dist/native/index.native76.js +33 -9
  319. package/dist/native/index.native77.js +8 -11
  320. package/dist/native/index.native78.js +10 -13
  321. package/dist/native/index.native79.js +11 -18
  322. package/dist/native/index.native8.js +213 -115
  323. package/dist/native/index.native80.js +13 -5
  324. package/dist/native/index.native81.js +19 -5
  325. package/dist/native/index.native82.js +5 -10
  326. package/dist/native/index.native83.js +5 -55
  327. package/dist/native/index.native84.js +10 -10
  328. package/dist/native/index.native85.js +55 -2
  329. package/dist/native/index.native86.js +11 -45
  330. package/dist/native/index.native87.js +2 -14
  331. package/dist/native/index.native88.js +45 -2
  332. package/dist/native/index.native89.js +13 -20
  333. package/dist/native/index.native9.js +115 -155
  334. package/dist/native/index.native90.js +2 -20
  335. package/dist/native/index.native91.js +20 -79
  336. package/dist/native/index.native92.js +18 -102
  337. package/dist/native/index.native93.js +79 -32
  338. package/dist/native/index.native94.js +103 -6
  339. package/dist/native/index.native95.js +30 -18
  340. package/dist/native/index.native96.js +7 -10
  341. package/dist/native/index.native97.js +77 -18
  342. package/dist/native/index.native98.js +9 -93
  343. package/dist/native/index.native99.js +20 -20
  344. package/dist/native-types/actions/createSpendPermission.d.ts +13 -0
  345. package/dist/native-types/errors.d.ts +3 -0
  346. package/dist/native-types/index.d.ts +2 -0
  347. package/dist/native-types/index.native.d.ts +2 -0
  348. package/dist/native-types/index.web.d.ts +2 -0
  349. package/dist/native-types/platform/types.d.ts +1 -0
  350. package/dist/native-types/spend-permissions/toSpendPermission.d.ts +3 -0
  351. package/dist/native-types/spend-permissions/types.d.ts +21 -0
  352. package/dist/native-types/types.d.ts +7 -3
  353. package/dist/types/actions/createSpendPermission.d.ts +13 -0
  354. package/dist/types/errors.d.ts +3 -0
  355. package/dist/types/index.d.ts +2 -0
  356. package/dist/types/index.native.d.ts +2 -0
  357. package/dist/types/index.web.d.ts +2 -0
  358. package/dist/types/platform/types.d.ts +1 -0
  359. package/dist/types/spend-permissions/toSpendPermission.d.ts +3 -0
  360. package/dist/types/spend-permissions/types.d.ts +21 -0
  361. package/dist/types/types.d.ts +7 -3
  362. package/dist/web/index.web.js +26 -23
  363. package/dist/web/index.web10.js +115 -21
  364. package/dist/web/index.web100.js +20 -9
  365. package/dist/web/index.web101.js +112 -73
  366. package/dist/web/index.web102.js +10 -5
  367. package/dist/web/index.web103.js +77 -16
  368. package/dist/web/index.web104.js +5 -28
  369. package/dist/web/index.web105.js +18 -8
  370. package/dist/web/index.web106.js +26 -9
  371. package/dist/web/index.web107.js +8 -13
  372. package/dist/web/index.web108.js +11 -10
  373. package/dist/web/index.web109.js +11 -15
  374. package/dist/web/index.web11.js +29 -28
  375. package/dist/web/index.web110.js +9 -80
  376. package/dist/web/index.web111.js +17 -13
  377. package/dist/web/index.web112.js +77 -32
  378. package/dist/web/index.web113.js +12 -41
  379. package/dist/web/index.web114.js +33 -76
  380. package/dist/web/index.web115.js +44 -0
  381. package/dist/web/index.web116.js +81 -0
  382. package/dist/web/index.web12.js +32 -3
  383. package/dist/web/index.web13.js +3 -16
  384. package/dist/web/index.web14.js +15 -17
  385. package/dist/web/index.web15.js +15 -116
  386. package/dist/web/index.web16.js +116 -12
  387. package/dist/web/index.web17.js +15 -42
  388. package/dist/web/index.web18.js +42 -20
  389. package/dist/web/index.web19.js +20 -172
  390. package/dist/web/index.web20.js +170 -39
  391. package/dist/web/index.web21.js +42 -47
  392. package/dist/web/index.web22.js +40 -71
  393. package/dist/web/index.web23.js +48 -25
  394. package/dist/web/index.web24.js +65 -153
  395. package/dist/web/index.web25.js +24 -46
  396. package/dist/web/index.web26.js +943 -243
  397. package/dist/web/index.web27.js +2 -56
  398. package/dist/web/index.web28.js +49 -950
  399. package/dist/web/index.web29.js +28 -2
  400. package/dist/web/index.web3.js +18 -5
  401. package/dist/web/index.web30.js +158 -48
  402. package/dist/web/index.web31.js +47 -27
  403. package/dist/web/index.web32.js +247 -13
  404. package/dist/web/index.web33.js +56 -23
  405. package/dist/web/index.web34.js +13 -47
  406. package/dist/web/index.web35.js +23 -2
  407. package/dist/web/index.web36.js +51 -2
  408. package/dist/web/index.web37.js +2 -9
  409. package/dist/web/index.web38.js +2 -18
  410. package/dist/web/index.web39.js +8 -45
  411. package/dist/web/index.web40.js +17 -13
  412. package/dist/web/index.web41.js +40 -50
  413. package/dist/web/index.web42.js +13 -6
  414. package/dist/web/index.web43.js +54 -20
  415. package/dist/web/index.web44.js +6 -11
  416. package/dist/web/index.web45.js +21 -3
  417. package/dist/web/index.web46.js +11 -3
  418. package/dist/web/index.web47.js +3 -34
  419. package/dist/web/index.web48.js +3 -12
  420. package/dist/web/index.web49.js +34 -4
  421. package/dist/web/index.web5.js +136 -136
  422. package/dist/web/index.web50.js +11 -27
  423. package/dist/web/index.web51.js +4 -6
  424. package/dist/web/index.web52.js +28 -24
  425. package/dist/web/index.web53.js +6 -16
  426. package/dist/web/index.web54.js +22 -52
  427. package/dist/web/index.web55.js +16 -23
  428. package/dist/web/index.web56.js +53 -10
  429. package/dist/web/index.web57.js +23 -27
  430. package/dist/web/index.web58.js +9 -40
  431. package/dist/web/index.web59.js +26 -54
  432. package/dist/web/index.web6.js +35 -217
  433. package/dist/web/index.web60.js +42 -127
  434. package/dist/web/index.web61.js +53 -10
  435. package/dist/web/index.web62.js +125 -102
  436. package/dist/web/index.web63.js +12 -6
  437. package/dist/web/index.web64.js +105 -3
  438. package/dist/web/index.web65.js +6 -14
  439. package/dist/web/index.web66.js +3 -43
  440. package/dist/web/index.web67.js +14 -78
  441. package/dist/web/index.web68.js +43 -2
  442. package/dist/web/index.web69.js +79 -2
  443. package/dist/web/index.web7.js +213 -115
  444. package/dist/web/index.web70.js +2 -13
  445. package/dist/web/index.web71.js +2 -38
  446. package/dist/web/index.web72.js +11 -5
  447. package/dist/web/index.web73.js +32 -29
  448. package/dist/web/index.web74.js +6 -8
  449. package/dist/web/index.web75.js +33 -9
  450. package/dist/web/index.web76.js +8 -11
  451. package/dist/web/index.web77.js +10 -13
  452. package/dist/web/index.web78.js +11 -18
  453. package/dist/web/index.web79.js +13 -5
  454. package/dist/web/index.web8.js +115 -155
  455. package/dist/web/index.web80.js +19 -5
  456. package/dist/web/index.web81.js +5 -10
  457. package/dist/web/index.web82.js +5 -55
  458. package/dist/web/index.web83.js +10 -10
  459. package/dist/web/index.web84.js +55 -2
  460. package/dist/web/index.web85.js +11 -45
  461. package/dist/web/index.web86.js +2 -14
  462. package/dist/web/index.web87.js +45 -2
  463. package/dist/web/index.web88.js +13 -20
  464. package/dist/web/index.web89.js +2 -20
  465. package/dist/web/index.web9.js +156 -113
  466. package/dist/web/index.web90.js +20 -79
  467. package/dist/web/index.web91.js +18 -102
  468. package/dist/web/index.web92.js +79 -32
  469. package/dist/web/index.web93.js +103 -6
  470. package/dist/web/index.web94.js +30 -18
  471. package/dist/web/index.web95.js +7 -10
  472. package/dist/web/index.web96.js +20 -19
  473. package/dist/web/index.web97.js +9 -93
  474. package/dist/web/index.web98.js +18 -19
  475. package/dist/web/index.web99.js +81 -105
  476. package/dist/web-types/actions/createSpendPermission.d.ts +13 -0
  477. package/dist/web-types/errors.d.ts +3 -0
  478. package/dist/web-types/index.d.ts +2 -0
  479. package/dist/web-types/index.native.d.ts +2 -0
  480. package/dist/web-types/index.web.d.ts +2 -0
  481. package/dist/web-types/platform/types.d.ts +1 -0
  482. package/dist/web-types/spend-permissions/toSpendPermission.d.ts +3 -0
  483. package/dist/web-types/spend-permissions/types.d.ts +21 -0
  484. package/dist/web-types/types.d.ts +7 -3
  485. package/package.json +4 -3
@@ -1,37 +1,6 @@
1
- import { SizeExceedsPaddingSizeError as d } from "./index.web48.js";
2
- function f(n, { dir: r, size: t = 32 } = {}) {
3
- return typeof n == "string" ? p(n, { dir: r, size: t }) : i(n, { dir: r, size: t });
4
- }
5
- function p(n, { dir: r, size: t = 32 } = {}) {
6
- if (t === null)
7
- return n;
8
- const e = n.replace("0x", "");
9
- if (e.length > t * 2)
10
- throw new d({
11
- size: Math.ceil(e.length / 2),
12
- targetSize: t,
13
- type: "hex"
14
- });
15
- return `0x${e[r === "right" ? "padEnd" : "padStart"](t * 2, "0")}`;
16
- }
17
- function i(n, { dir: r, size: t = 32 } = {}) {
18
- if (t === null)
19
- return n;
20
- if (n.length > t)
21
- throw new d({
22
- size: n.length,
23
- targetSize: t,
24
- type: "bytes"
25
- });
26
- const e = new Uint8Array(t);
27
- for (let a = 0; a < t; a++) {
28
- const o = r === "right";
29
- e[o ? a : t - a - 1] = n[o ? a : n.length - a - 1];
30
- }
31
- return e;
1
+ function n(e) {
2
+ return `0x${e.reduce((c, r) => c + r.replace("0x", ""), "")}`;
32
3
  }
33
4
  export {
34
- f as pad,
35
- i as padBytes,
36
- p as padHex
5
+ n as concatHex
37
6
  };
@@ -1,15 +1,6 @@
1
- import { BaseError as o } from "./index.web59.js";
2
- class d extends o {
3
- constructor({ offset: r, position: s, size: e }) {
4
- super(`Slice ${s === "start" ? "starting" : "ending"} at offset "${r}" is out-of-bounds (size: ${e}).`, { name: "SliceOffsetOutOfBoundsError" });
5
- }
6
- }
7
- class n extends o {
8
- constructor({ size: r, targetSize: s, type: e }) {
9
- super(`${e.charAt(0).toUpperCase()}${e.slice(1).toLowerCase()} size (${r}) exceeds padding size (${s}).`, { name: "SizeExceedsPaddingSizeError" });
10
- }
1
+ function e(t, { strict: r = !0 } = {}) {
2
+ return !t || typeof t != "string" ? !1 : r ? /^0x[0-9a-fA-F]*$/.test(t) : t.startsWith("0x");
11
3
  }
12
4
  export {
13
- n as SizeExceedsPaddingSizeError,
14
- d as SliceOffsetOutOfBoundsError
5
+ e as isHex
15
6
  };
@@ -1,7 +1,37 @@
1
- import { isHex as r } from "./index.web46.js";
2
- function i(t) {
3
- return r(t, { strict: !1 }) ? Math.ceil((t.length - 2) / 2) : t.length;
1
+ import { SizeExceedsPaddingSizeError as d } from "./index.web50.js";
2
+ function f(n, { dir: r, size: t = 32 } = {}) {
3
+ return typeof n == "string" ? p(n, { dir: r, size: t }) : i(n, { dir: r, size: t });
4
+ }
5
+ function p(n, { dir: r, size: t = 32 } = {}) {
6
+ if (t === null)
7
+ return n;
8
+ const e = n.replace("0x", "");
9
+ if (e.length > t * 2)
10
+ throw new d({
11
+ size: Math.ceil(e.length / 2),
12
+ targetSize: t,
13
+ type: "hex"
14
+ });
15
+ return `0x${e[r === "right" ? "padEnd" : "padStart"](t * 2, "0")}`;
16
+ }
17
+ function i(n, { dir: r, size: t = 32 } = {}) {
18
+ if (t === null)
19
+ return n;
20
+ if (n.length > t)
21
+ throw new d({
22
+ size: n.length,
23
+ targetSize: t,
24
+ type: "bytes"
25
+ });
26
+ const e = new Uint8Array(t);
27
+ for (let a = 0; a < t; a++) {
28
+ const o = r === "right";
29
+ e[o ? a : t - a - 1] = n[o ? a : n.length - a - 1];
30
+ }
31
+ return e;
4
32
  }
5
33
  export {
6
- i as size
34
+ f as pad,
35
+ i as padBytes,
36
+ p as padHex
7
37
  };
@@ -1,66 +1,66 @@
1
- import { b as d } from "./index.web12.js";
2
- import { configureCdpApiClient as U, setAuthManager as T, initiateAuthentication as M, createEndUserEvmAccount as P, createEndUserEvmSmartAccount as y, createEndUserSolanaAccount as j, verifyEmailAuthentication as K, verifySmsAuthentication as x, signEvmHashWithEndUserAccount as O, signEvmTransactionWithEndUserAccount as b, signSolanaTransactionWithEndUserAccount as C, sendEvmTransactionWithEndUserAccount as W, sendSolanaTransactionWithEndUserAccount as H, signEvmMessageWithEndUserAccount as B, signSolanaMessageWithEndUserAccount as D, signEvmTypedDataWithEndUserAccount as _, sendUserOperationWithEndUserAccount as N, getUserOperationWithEndUserAccount as z, exportEndUserEvmAccount as F, exportEndUserSolanaAccount as L } from "@coinbase/cdp-api-client";
3
- import { Keypair as p } from "@solana/web3.js";
4
- import l from "bs58";
5
- import { AuthManager as $ } from "./index.web6.js";
6
- import { toAuthState as g } from "./index.web13.js";
7
- import { withAuth as u } from "./index.web14.js";
8
- import { MockAuthManager as V } from "./index.web15.js";
9
- import { mockUser as f } from "./index.web16.js";
10
- import { getPlatformServices as I, getPlatformCrypto as S } from "./index.web2.js";
11
- import { isChainSupportedForCDPSends as q } from "./index.web17.js";
12
- import { getConfig as s, setCoreAuthManager as h, getCoreAuthManager as c, setConfig as G } from "./index.web18.js";
1
+ import { b as m } from "./index.web13.js";
2
+ import { configureCdpApiClient as U, setAuthManager as T, initiateAuthentication as M, createEndUserEvmAccount as P, createEndUserEvmSmartAccount as y, createEndUserSolanaAccount as j, verifyEmailAuthentication as K, verifySmsAuthentication as O, signEvmHashWithEndUserAccount as x, signEvmTransactionWithEndUserAccount as b, signSolanaTransactionWithEndUserAccount as C, sendEvmTransactionWithEndUserAccount as W, sendSolanaTransactionWithEndUserAccount as H, signEvmMessageWithEndUserAccount as B, signSolanaMessageWithEndUserAccount as D, signEvmTypedDataWithEndUserAccount as _, sendUserOperationWithEndUserAccount as N, getUserOperationWithEndUserAccount as L, exportEndUserEvmAccount as z, exportEndUserSolanaAccount as F } from "@coinbase/cdp-api-client";
3
+ import { Keypair as l } from "@solana/web3.js";
4
+ import f from "bs58";
5
+ import { AuthManager as $ } from "./index.web7.js";
6
+ import { toAuthState as g } from "./index.web14.js";
7
+ import { withAuth as u } from "./index.web15.js";
8
+ import { MockAuthManager as V } from "./index.web16.js";
9
+ import { mockUser as h } from "./index.web17.js";
10
+ import { getPlatformServices as S, getPlatformCrypto as A } from "./index.web2.js";
11
+ import { isChainSupportedForCDPSends as q } from "./index.web18.js";
12
+ import { getConfig as n, setCoreAuthManager as w, getCoreAuthManager as c, setConfig as G } from "./index.web19.js";
13
13
  import "viem";
14
- import { serializeTransaction as A } from "./index.web19.js";
15
- const ue = async (e) => {
14
+ import { serializeTransaction as v } from "./index.web20.js";
15
+ const de = async (e) => {
16
16
  if (!e.projectId)
17
17
  throw new Error("Project ID is required");
18
18
  let t;
19
19
  try {
20
- t = s().projectId !== e.projectId;
20
+ t = n().projectId !== e.projectId;
21
21
  } catch {
22
22
  t = !0;
23
23
  }
24
- if (G(e), s().useMock) {
25
- h(new V(s().projectId));
24
+ if (G(e), n().useMock) {
25
+ w(new V(n().projectId));
26
26
  return;
27
27
  }
28
28
  let r;
29
29
  try {
30
- const n = I();
31
- r = n.secureStorage ? {
32
- getRefreshToken: () => n.secureStorage.getItem("cdp_refresh_token"),
33
- setRefreshToken: (a) => n.secureStorage.setItem("cdp_refresh_token", a),
34
- removeRefreshToken: () => n.secureStorage.removeItem("cdp_refresh_token")
30
+ const s = S();
31
+ r = s.secureStorage ? {
32
+ getRefreshToken: () => s.secureStorage.getItem("cdp_refresh_token"),
33
+ setRefreshToken: (a) => s.secureStorage.setItem("cdp_refresh_token", a),
34
+ removeRefreshToken: () => s.secureStorage.removeItem("cdp_refresh_token")
35
35
  } : void 0;
36
36
  } catch {
37
37
  r = void 0;
38
38
  }
39
39
  if (U({
40
- debugging: s().debugging,
41
- basePath: s().basePath,
40
+ debugging: n().debugging,
41
+ basePath: n().basePath,
42
42
  refreshTokenStorage: r
43
43
  }), t) {
44
- const n = new $(s().projectId);
45
- h(n), T(n);
44
+ const s = new $(n().projectId);
45
+ w(s), T(s);
46
46
  }
47
47
  await c().ensureInitialized();
48
- }, de = async (e) => v({
48
+ }, me = async (e) => k({
49
49
  email: e.email,
50
50
  type: "email"
51
- }), me = async (e) => v({
51
+ }), ge = async (e) => k({
52
52
  phoneNumber: e.phoneNumber,
53
53
  type: "sms"
54
- }), ge = async (e) => k(
54
+ }), pe = async (e) => E(
55
55
  e,
56
56
  "Mock email OTP verified",
57
57
  (t, r) => K(t, r)
58
- ), ye = async (e) => k(
58
+ ), ye = async (e) => E(
59
59
  e,
60
60
  "Mock SMS OTP verified",
61
- (t, r) => x(t, r)
62
- ), pe = async () => c().getUser(), le = async () => c().isSignedIn(), fe = async () => {
63
- if (s().useMock) {
61
+ (t, r) => O(t, r)
62
+ ), le = async () => c().getUser(), fe = async () => c().isSignedIn(), he = async () => {
63
+ if (n().useMock) {
64
64
  await c().signOut();
65
65
  return;
66
66
  }
@@ -68,7 +68,7 @@ const ue = async (e) => {
68
68
  throw new Error("User not signed in");
69
69
  await c().signOut();
70
70
  try {
71
- const t = I();
71
+ const t = S();
72
72
  if (t.secureStorage)
73
73
  try {
74
74
  await t.secureStorage.removeItem("cdp_refresh_token");
@@ -77,30 +77,30 @@ const ue = async (e) => {
77
77
  }
78
78
  } catch {
79
79
  }
80
- }, he = async () => c().getToken(), we = (e) => {
80
+ }, we = async () => c().getToken(), Ie = (e) => {
81
81
  c().addAuthStateChangeCallback(e);
82
- }, Ie = async (e) => s().useMock ? { signature: "0x0" } : u(e, c(), async ({ user: t, walletSecretId: r }) => ({
83
- signature: (await O(s().projectId, t.userId, {
82
+ }, Se = async (e) => n().useMock ? { signature: "0x0" } : u(e, c(), async ({ user: t, walletSecretId: r }) => ({
83
+ signature: (await x(n().projectId, t.userId, {
84
84
  hash: e.hash,
85
85
  address: e.evmAccount,
86
86
  walletSecretId: r
87
87
  })).signature
88
- })), Se = async (e) => s().useMock ? { signedTransaction: "0x0" } : u(e, c(), async ({ user: t, walletSecretId: r }) => {
89
- const n = A(e.transaction);
88
+ })), Ae = async (e) => n().useMock ? { signedTransaction: "0x0" } : u(e, c(), async ({ user: t, walletSecretId: r }) => {
89
+ const s = v(e.transaction);
90
90
  return {
91
91
  signedTransaction: (await b(
92
- s().projectId,
92
+ n().projectId,
93
93
  t.userId,
94
94
  {
95
- transaction: n,
95
+ transaction: s,
96
96
  address: e.evmAccount,
97
97
  walletSecretId: r
98
98
  }
99
99
  )).signedTransaction
100
100
  };
101
- }), Ae = async (e) => s().useMock ? { signedTransaction: "mock-signed-transaction" } : u(e, c(), async ({ user: t, walletSecretId: r }) => ({
101
+ }), ve = async (e) => n().useMock ? { signedTransaction: "mock-signed-transaction" } : u(e, c(), async ({ user: t, walletSecretId: r }) => ({
102
102
  signedTransaction: (await C(
103
- s().projectId,
103
+ n().projectId,
104
104
  t.userId,
105
105
  {
106
106
  transaction: e.transaction,
@@ -108,27 +108,27 @@ const ue = async (e) => {
108
108
  walletSecretId: r
109
109
  }
110
110
  )).signedTransaction
111
- })), ve = async (e) => {
111
+ })), ke = async (e) => {
112
112
  if (!q(e.network))
113
113
  throw new Error(`Chain ${e.network} is not supported by the CDP Apis`);
114
- if (s().useMock)
114
+ if (n().useMock)
115
115
  return { transactionHash: "0x0" };
116
- const t = A(e.transaction);
117
- return u(e, c(), async ({ user: r, walletSecretId: n }) => ({
116
+ const t = v(e.transaction);
117
+ return u(e, c(), async ({ user: r, walletSecretId: s }) => ({
118
118
  transactionHash: (await W(
119
- s().projectId,
119
+ n().projectId,
120
120
  r.userId,
121
121
  {
122
122
  transaction: t,
123
123
  address: e.evmAccount,
124
- walletSecretId: n,
124
+ walletSecretId: s,
125
125
  network: e.network
126
126
  }
127
127
  )).transactionHash
128
128
  }));
129
- }, ke = async (e) => s().useMock ? { transactionSignature: "mock-signature" } : u(e, c(), async ({ user: t, walletSecretId: r }) => ({
129
+ }, Ee = async (e) => n().useMock ? { transactionSignature: "mock-signature" } : u(e, c(), async ({ user: t, walletSecretId: r }) => ({
130
130
  transactionSignature: (await H(
131
- s().projectId,
131
+ n().projectId,
132
132
  t.userId,
133
133
  {
134
134
  transaction: e.transaction,
@@ -137,15 +137,15 @@ const ue = async (e) => {
137
137
  network: e.network
138
138
  }
139
139
  )).transactionSignature
140
- })), Ee = async (e) => s().useMock ? { signature: "0x0" } : u(e, c(), async ({ user: t, walletSecretId: r }) => ({
141
- signature: (await B(s().projectId, t.userId, {
140
+ })), Ue = async (e) => n().useMock ? { signature: "0x0" } : u(e, c(), async ({ user: t, walletSecretId: r }) => ({
141
+ signature: (await B(n().projectId, t.userId, {
142
142
  message: e.message,
143
143
  address: e.evmAccount,
144
144
  walletSecretId: r
145
145
  })).signature
146
- })), Ue = async (e) => s().useMock ? { signature: "mockSignature" } : u(e, c(), async ({ user: t, walletSecretId: r }) => ({
146
+ })), Te = async (e) => n().useMock ? { signature: "mockSignature" } : u(e, c(), async ({ user: t, walletSecretId: r }) => ({
147
147
  signature: (await D(
148
- s().projectId,
148
+ n().projectId,
149
149
  t.userId,
150
150
  {
151
151
  message: e.message,
@@ -153,17 +153,17 @@ const ue = async (e) => {
153
153
  walletSecretId: r
154
154
  }
155
155
  )).signature
156
- })), Te = async (e) => s().useMock ? { signature: "0x0" } : u(e, c(), async ({ user: t, walletSecretId: r }) => ({
157
- signature: (await _(s().projectId, t.userId, {
156
+ })), Me = async (e) => n().useMock ? { signature: "0x0" } : u(e, c(), async ({ user: t, walletSecretId: r }) => ({
157
+ signature: (await _(n().projectId, t.userId, {
158
158
  typedData: e.typedData,
159
159
  address: e.evmAccount,
160
160
  walletSecretId: r
161
161
  })).signature
162
- })), Me = async (e) => s().useMock ? {
162
+ })), Pe = async (e) => n().useMock ? {
163
163
  userOperationHash: "0x1234567890123456789012345678901234567890123456789012345678901234"
164
164
  } : u(e, c(), async ({ user: t, walletSecretId: r }) => ({
165
165
  userOperationHash: (await N(
166
- s().projectId,
166
+ n().projectId,
167
167
  t.userId,
168
168
  e.evmSmartAccount,
169
169
  {
@@ -178,7 +178,7 @@ const ue = async (e) => {
178
178
  paymasterUrl: e.paymasterUrl
179
179
  }
180
180
  )).userOpHash
181
- })), Pe = async (e) => s().useMock ? {
181
+ })), je = async (e) => n().useMock ? {
182
182
  userOpHash: e.userOperationHash,
183
183
  network: e.network,
184
184
  calls: [
@@ -191,19 +191,19 @@ const ue = async (e) => {
191
191
  status: "complete",
192
192
  transactionHash: "0x9876543210987654321098765432109876543210987654321098765432109876",
193
193
  receipts: []
194
- } : u(e, c(), async ({ user: t }) => await z(
195
- s().projectId,
194
+ } : u(e, c(), async ({ user: t }) => await L(
195
+ n().projectId,
196
196
  t.userId,
197
197
  e.evmSmartAccount,
198
198
  e.userOperationHash
199
- )), je = async (e) => {
200
- if (s().useMock)
199
+ )), Ke = async (e) => {
200
+ if (n().useMock)
201
201
  return {
202
- privateKey: d.Buffer.from("mock-private-key").toString("hex")
202
+ privateKey: m.Buffer.from("mock-private-key").toString("hex")
203
203
  };
204
- const t = S(), r = await t.createExportKeyPair();
205
- return u(e, c(), async ({ user: n, walletSecretId: a }) => {
206
- const o = await F(s().projectId, n.userId, {
204
+ const t = A(), r = await t.createExportKeyPair();
205
+ return u(e, c(), async ({ user: s, walletSecretId: a }) => {
206
+ const o = await z(n().projectId, s.userId, {
207
207
  address: e.evmAccount,
208
208
  walletSecretId: a,
209
209
  exportEncryptionKey: r.publicKeyBase64
@@ -212,59 +212,59 @@ const ue = async (e) => {
212
212
  o.encryptedPrivateKey
213
213
  );
214
214
  return {
215
- privateKey: d.Buffer.from(i).toString("hex")
215
+ privateKey: m.Buffer.from(i).toString("hex")
216
216
  };
217
217
  });
218
- }, Ke = async (e) => {
219
- if (s().useMock) {
220
- const n = d.Buffer.from("mock-private-key").subarray(0, 32), a = d.Buffer.alloc(32);
221
- n.copy(a);
222
- const o = p.fromSeed(a), i = d.Buffer.concat([o.secretKey.subarray(0, 32), o.publicKey.toBytes()]);
218
+ }, Oe = async (e) => {
219
+ if (n().useMock) {
220
+ const s = m.Buffer.from("mock-private-key").subarray(0, 32), a = m.Buffer.alloc(32);
221
+ s.copy(a);
222
+ const o = l.fromSeed(a), i = m.Buffer.concat([o.secretKey.subarray(0, 32), o.publicKey.toBytes()]);
223
223
  return {
224
- privateKey: l.encode(i)
224
+ privateKey: f.encode(i)
225
225
  };
226
226
  }
227
- const t = S(), r = await t.createExportKeyPair();
228
- return u(e, c(), async ({ user: n, walletSecretId: a }) => {
229
- const o = await L(s().projectId, n.userId, {
227
+ const t = A(), r = await t.createExportKeyPair();
228
+ return u(e, c(), async ({ user: s, walletSecretId: a }) => {
229
+ const o = await F(n().projectId, s.userId, {
230
230
  address: e.solanaAccount,
231
231
  walletSecretId: a,
232
232
  exportEncryptionKey: r.publicKeyBase64
233
233
  }), i = await t.decryptWithPrivateKey(
234
234
  r.privateKey,
235
235
  o.encryptedPrivateKey
236
- ), m = p.fromSeed(new Uint8Array(i)), E = d.Buffer.concat([m.secretKey.subarray(0, 32), m.publicKey.toBytes()]);
236
+ ), d = l.fromSeed(new Uint8Array(i)), p = m.Buffer.concat([d.secretKey.subarray(0, 32), d.publicKey.toBytes()]);
237
237
  return {
238
- privateKey: l.encode(E)
238
+ privateKey: f.encode(p)
239
239
  };
240
240
  });
241
- }, v = async (e) => {
242
- if (s().useMock)
241
+ }, k = async (e) => {
242
+ if (n().useMock)
243
243
  return {
244
244
  message: "Mock sign in initiated",
245
245
  flowId: "mock-flow-id"
246
246
  };
247
247
  if (await c().isSignedIn())
248
248
  throw new Error("User is already authenticated. Please sign out first.");
249
- const r = await M(s().projectId, e);
249
+ const r = await M(n().projectId, e);
250
250
  return {
251
251
  flowId: r.flowId,
252
252
  message: r.message
253
253
  };
254
- }, k = async (e, t, r) => {
255
- if (s().useMock)
254
+ }, E = async (e, t, r) => {
255
+ if (n().useMock)
256
256
  return await c().setAuthState({
257
257
  accessToken: "mock-access-token",
258
258
  expiresAt: Date.now() + 1e3 * 60 * 60 * 24,
259
- user: f
259
+ user: h
260
260
  }), {
261
261
  message: t,
262
- user: f,
262
+ user: h,
263
263
  isNewUser: !1
264
264
  };
265
265
  if (await c().isSignedIn())
266
266
  throw new Error("User is already authenticated. Please sign out first.");
267
- const a = await r(s().projectId, {
267
+ const a = await r(n().projectId, {
268
268
  flowId: e.flowId,
269
269
  otp: e.otp
270
270
  });
@@ -274,96 +274,96 @@ const ue = async (e) => {
274
274
  a.endUser
275
275
  );
276
276
  await c().setAuthState(o);
277
- const i = s();
278
- i.ethereum?.createOnLogin && (o = await w(
277
+ const i = n();
278
+ i.ethereum?.createOnLogin && (o = await I(
279
279
  a,
280
280
  o,
281
281
  i.ethereum.createOnLogin
282
- )), i.solana?.createOnLogin && (o = await J(a, o)), !i.ethereum?.createOnLogin && !i.solana?.createOnLogin && (o = await w(a, o, "eoa"));
283
- const m = await c().getUser();
282
+ )), i.solana?.createOnLogin && (o = await J(a, o)), !i.ethereum?.createOnLogin && !i.solana?.createOnLogin && (o = await I(a, o, "eoa"));
283
+ const d = await c().getUser();
284
284
  return {
285
285
  message: a.message,
286
- user: m,
286
+ user: d,
287
287
  isNewUser: a.isNewEndUser
288
288
  };
289
- }, w = async (e, t, r) => {
290
- let n = t;
289
+ }, I = async (e, t, r) => {
290
+ let s = t;
291
291
  if (!t.user.evmAccounts || t.user.evmAccounts.length === 0)
292
292
  try {
293
293
  const a = await c().getWalletSecretId();
294
- let o = await P(s().projectId, t.user.userId, {
294
+ let o = await P(n().projectId, t.user.userId, {
295
295
  walletSecretId: a
296
- });
297
- if (r === "smart") {
298
- const [i] = o.evmAccounts;
296
+ }), i = !1;
297
+ const d = n().ethereum;
298
+ if (d?.createOnLogin === "smart" && (i = d.enableSpendPermissions ?? !1), r === "smart") {
299
+ const [p] = o.evmAccounts;
299
300
  o = await y(
300
- s().projectId,
301
+ n().projectId,
301
302
  t.user.userId,
302
303
  {
303
- owner: i,
304
- enableSpendPermissions: !1
305
- // Defaulting to false until the feature is ready.
304
+ owner: p,
305
+ enableSpendPermissions: i
306
306
  }
307
307
  );
308
308
  }
309
- n = g(e.accessToken, e.validUntil, o), await c().setAuthState(n);
309
+ s = g(e.accessToken, e.validUntil, o), await c().setAuthState(s);
310
310
  } catch (a) {
311
311
  throw new Error(`Failed to create EVM account: ${a}`);
312
312
  }
313
- if (r === "smart" && (!n.user.evmSmartAccounts || n.user.evmSmartAccounts.length === 0))
313
+ if (r === "smart" && (!s.user.evmSmartAccounts || s.user.evmSmartAccounts.length === 0))
314
314
  try {
315
- const [a] = n.user.evmAccounts, o = await y(
316
- s().projectId,
317
- n.user.userId,
315
+ const [a] = s.user.evmAccounts, o = await y(
316
+ n().projectId,
317
+ s.user.userId,
318
318
  {
319
319
  owner: a,
320
320
  enableSpendPermissions: !1
321
321
  // Defaulting to false until the feature is ready.
322
322
  }
323
323
  );
324
- n = g(e.accessToken, e.validUntil, o), await c().setAuthState(n);
324
+ s = g(e.accessToken, e.validUntil, o), await c().setAuthState(s);
325
325
  } catch (a) {
326
326
  throw new Error(`Failed to create EVM Smart Account: ${a}`);
327
327
  }
328
- return n;
328
+ return s;
329
329
  }, J = async (e, t) => {
330
330
  let r = t;
331
331
  if (!t.user.solanaAccounts || t.user.solanaAccounts.length === 0)
332
332
  try {
333
- const n = await c().getWalletSecretId(), a = await j(
334
- s().projectId,
333
+ const s = await c().getWalletSecretId(), a = await j(
334
+ n().projectId,
335
335
  t.user.userId,
336
336
  {
337
- walletSecretId: n
337
+ walletSecretId: s
338
338
  }
339
339
  );
340
340
  r = g(e.accessToken, e.validUntil, a), await c().setAuthState(r);
341
- } catch (n) {
342
- throw new Error(`Failed to create Solana account: ${n}`);
341
+ } catch (s) {
342
+ throw new Error(`Failed to create Solana account: ${s}`);
343
343
  }
344
344
  return r;
345
345
  };
346
346
  export {
347
- je as exportEvmAccount,
348
- Ke as exportSolanaAccount,
349
- he as getAccessToken,
350
- pe as getCurrentUser,
351
- Pe as getUserOperation,
352
- ue as initialize,
353
- le as isSignedIn,
354
- we as onAuthStateChange,
355
- ve as sendEvmTransaction,
356
- ke as sendSolanaTransaction,
357
- Me as sendUserOperation,
358
- Ie as signEvmHash,
359
- Ee as signEvmMessage,
360
- Se as signEvmTransaction,
361
- Te as signEvmTypedData,
362
- de as signInWithEmail,
363
- me as signInWithSms,
364
- fe as signOut,
365
- Ue as signSolanaMessage,
366
- Ae as signSolanaTransaction,
367
- ge as verifyEmailOTP,
347
+ Ke as exportEvmAccount,
348
+ Oe as exportSolanaAccount,
349
+ we as getAccessToken,
350
+ le as getCurrentUser,
351
+ je as getUserOperation,
352
+ de as initialize,
353
+ fe as isSignedIn,
354
+ Ie as onAuthStateChange,
355
+ ke as sendEvmTransaction,
356
+ Ee as sendSolanaTransaction,
357
+ Pe as sendUserOperation,
358
+ Se as signEvmHash,
359
+ Ue as signEvmMessage,
360
+ Ae as signEvmTransaction,
361
+ Me as signEvmTypedData,
362
+ me as signInWithEmail,
363
+ ge as signInWithSms,
364
+ he as signOut,
365
+ Te as signSolanaMessage,
366
+ ve as signSolanaTransaction,
367
+ pe as verifyEmailOTP,
368
368
  ye as verifySmsOTP
369
369
  };
@@ -1,31 +1,15 @@
1
- import { SliceOffsetOutOfBoundsError as n } from "./index.web48.js";
2
- import { isHex as c } from "./index.web46.js";
3
- import { size as s } from "./index.web49.js";
4
- function O(e, f, i, { strict: o } = {}) {
5
- return c(e, { strict: !1 }) ? l(e, f, i, {
6
- strict: o
7
- }) : u(e, f, i, {
8
- strict: o
9
- });
1
+ import { BaseError as o } from "./index.web61.js";
2
+ class d extends o {
3
+ constructor({ offset: r, position: s, size: e }) {
4
+ super(`Slice ${s === "start" ? "starting" : "ending"} at offset "${r}" is out-of-bounds (size: ${e}).`, { name: "SliceOffsetOutOfBoundsError" });
5
+ }
10
6
  }
11
- function t(e, f, i) {
12
- if (s(e) !== i - f)
13
- throw new n({
14
- offset: i,
15
- position: "end",
16
- size: s(e)
17
- });
18
- }
19
- function u(e, f, i, { strict: o } = {}) {
20
- const r = e.slice(f, i);
21
- return o && t(r, f, i), r;
22
- }
23
- function l(e, f, i, { strict: o } = {}) {
24
- const r = `0x${e.replace("0x", "").slice(f * 2, i * 2)}`;
25
- return o && t(r, f, i), r;
7
+ class n extends o {
8
+ constructor({ size: r, targetSize: s, type: e }) {
9
+ super(`${e.charAt(0).toUpperCase()}${e.slice(1).toLowerCase()} size (${r}) exceeds padding size (${s}).`, { name: "SizeExceedsPaddingSizeError" });
10
+ }
26
11
  }
27
12
  export {
28
- O as slice,
29
- u as sliceBytes,
30
- l as sliceHex
13
+ n as SizeExceedsPaddingSizeError,
14
+ d as SliceOffsetOutOfBoundsError
31
15
  };
@@ -1,9 +1,7 @@
1
- function f(e, { dir: n = "left" } = {}) {
2
- let t = typeof e == "string" ? e.replace("0x", "") : e, i = 0;
3
- for (let l = 0; l < t.length - 1 && t[n === "left" ? l : t.length - l - 1].toString() === "0"; l++)
4
- i++;
5
- return t = n === "left" ? t.slice(i) : t.slice(0, t.length - i), typeof e == "string" ? (t.length === 1 && n === "right" && (t = `${t}0`), `0x${t.length % 2 === 1 ? `0${t}` : t}`) : t;
1
+ import { isHex as r } from "./index.web48.js";
2
+ function i(t) {
3
+ return r(t, { strict: !1 }) ? Math.ceil((t.length - 2) / 2) : t.length;
6
4
  }
7
5
  export {
8
- f as trim
6
+ i as size
9
7
  };