@coinbase/cdp-core 0.0.43 → 0.0.45

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