@coinbase/cdp-core 0.0.42 → 0.0.44

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 +108 -111
  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 +9 -19
  114. package/dist/esm/index.native98.js +75 -90
  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 +93 -9
  119. package/dist/esm/index.web101.js +20 -78
  120. package/dist/esm/index.web102.js +118 -5
  121. package/dist/esm/index.web103.js +10 -18
  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 +108 -111
  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 +77 -18
  227. package/dist/esm/index.web97.js +20 -93
  228. package/dist/esm/index.web98.js +9 -20
  229. package/dist/esm/index.web99.js +16 -114
  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 +108 -111
  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 +9 -19
  342. package/dist/native/index.native98.js +75 -90
  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 +93 -9
  365. package/dist/web/index.web101.js +20 -78
  366. package/dist/web/index.web102.js +118 -5
  367. package/dist/web/index.web103.js +10 -18
  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 +108 -111
  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 +77 -18
  473. package/dist/web/index.web97.js +20 -93
  474. package/dist/web/index.web98.js +9 -20
  475. package/dist/web/index.web99.js +16 -114
  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,18 +1,18 @@
1
- import { b as d } from "./index.native13.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";
1
+ import { b as m } from "./index.native14.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
4
  import l from "bs58";
5
- import { AuthManager as $ } from "./index.native7.js";
6
- import { toAuthState as g } from "./index.native14.js";
7
- import { withAuth as u } from "./index.native15.js";
8
- import { MockAuthManager as V } from "./index.native16.js";
9
- import { mockUser as f } from "./index.native17.js";
10
- import { getPlatformServices as I, getPlatformCrypto as S } from "./index.native5.js";
11
- import { isChainSupportedForCDPSends as q } from "./index.native18.js";
12
- import { getConfig as s, setCoreAuthManager as h, getCoreAuthManager as c, setConfig as G } from "./index.native19.js";
5
+ import { AuthManager as F } 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 $ } from "./index.native17.js";
9
+ import { mockUser as h } from "./index.native18.js";
10
+ import { getPlatformServices as R, getPlatformCrypto as k } from "./index.native5.js";
11
+ import { isChainSupportedForCDPSends as V } from "./index.native19.js";
12
+ import { getConfig as s, setCoreAuthManager as w, getCoreAuthManager as c, setConfig as q } from "./index.native20.js";
13
13
  import "viem";
14
- import { serializeTransaction as A } from "./index.native20.js";
15
- const ue = async (e) => {
14
+ import { serializeTransaction as A } from "./index.native21.js";
15
+ const de = async (e) => {
16
16
  if (!e.projectId)
17
17
  throw new Error("Project ID is required");
18
18
  let t;
@@ -21,45 +21,52 @@ const ue = async (e) => {
21
21
  } catch {
22
22
  t = !0;
23
23
  }
24
- if (G(e), s().useMock) {
25
- h(new V(s().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 n = I();
30
+ const n = R();
31
31
  r = n.secureStorage ? {
32
32
  getRefreshToken: () => n.secureStorage.getItem("cdp_refresh_token"),
33
33
  setRefreshToken: (a) => n.secureStorage.setItem("cdp_refresh_token", a),
34
34
  removeRefreshToken: () => n.secureStorage.removeItem("cdp_refresh_token")
35
- } : void 0;
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({
46
+ if (E({
40
47
  debugging: s().debugging,
41
48
  basePath: s().basePath,
42
49
  refreshTokenStorage: r
43
50
  }), t) {
44
- const n = new $(s().projectId);
45
- h(n), T(n);
51
+ const n = new F(s().projectId);
52
+ w(n), U(n);
46
53
  }
47
54
  await c().ensureInitialized();
48
- }, de = async (e) => v({
55
+ }, me = async (e) => S({
49
56
  email: e.email,
50
57
  type: "email"
51
- }), me = async (e) => v({
58
+ }), ge = async (e) => S({
52
59
  phoneNumber: e.phoneNumber,
53
60
  type: "sms"
54
- }), ge = async (e) => k(
61
+ }), pe = async (e) => v(
55
62
  e,
56
63
  "Mock email OTP verified",
57
- (t, r) => K(t, r)
58
- ), ye = async (e) => k(
64
+ (t, r) => j(t, r)
65
+ ), fe = async (e) => v(
59
66
  e,
60
67
  "Mock SMS OTP verified",
61
- (t, r) => x(t, r)
62
- ), pe = async () => c().getUser(), le = async () => c().isSignedIn(), fe = async () => {
68
+ (t, r) => K(t, r)
69
+ ), ye = async () => c().getUser(), le = async () => c().isSignedIn(), he = async () => {
63
70
  if (s().useMock) {
64
71
  await c().signOut();
65
72
  return;
@@ -67,28 +74,18 @@ const ue = async (e) => {
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 = I();
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
- }, he = async () => c().getToken(), we = (e) => {
77
+ }, we = async () => c().getToken(), Ie = (e) => {
81
78
  c().addAuthStateChangeCallback(e);
82
- }, Ie = async (e) => s().useMock ? { signature: "0x0" } : u(e, c(), async ({ user: t, walletSecretId: r }) => ({
79
+ }, ke = async (e) => s().useMock ? { signature: "0x0" } : u(e, c(), async ({ user: t, walletSecretId: r }) => ({
83
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
- })), Se = async (e) => s().useMock ? { signedTransaction: "0x0" } : u(e, c(), async ({ user: t, walletSecretId: r }) => {
85
+ })), Ae = async (e) => s().useMock ? { signedTransaction: "0x0" } : u(e, c(), async ({ user: t, walletSecretId: r }) => {
89
86
  const n = A(e.transaction);
90
87
  return {
91
- signedTransaction: (await b(
88
+ signedTransaction: (await x(
92
89
  s().projectId,
93
90
  t.userId,
94
91
  {
@@ -98,8 +95,8 @@ const ue = async (e) => {
98
95
  }
99
96
  )).signedTransaction
100
97
  };
101
- }), Ae = async (e) => s().useMock ? { signedTransaction: "mock-signed-transaction" } : u(e, c(), async ({ user: t, walletSecretId: r }) => ({
102
- signedTransaction: (await C(
98
+ }), Se = async (e) => s().useMock ? { signedTransaction: "mock-signed-transaction" } : u(e, c(), async ({ user: t, walletSecretId: r }) => ({
99
+ signedTransaction: (await b(
103
100
  s().projectId,
104
101
  t.userId,
105
102
  {
@@ -109,13 +106,13 @@ const ue = async (e) => {
109
106
  }
110
107
  )).signedTransaction
111
108
  })), ve = async (e) => {
112
- if (!q(e.network))
109
+ if (!V(e.network))
113
110
  throw new Error(`Chain ${e.network} is not supported by the CDP Apis`);
114
111
  if (s().useMock)
115
112
  return { transactionHash: "0x0" };
116
113
  const t = A(e.transaction);
117
114
  return u(e, c(), async ({ user: r, walletSecretId: n }) => ({
118
- transactionHash: (await W(
115
+ transactionHash: (await C(
119
116
  s().projectId,
120
117
  r.userId,
121
118
  {
@@ -126,8 +123,8 @@ const ue = async (e) => {
126
123
  }
127
124
  )).transactionHash
128
125
  }));
129
- }, ke = async (e) => s().useMock ? { transactionSignature: "mock-signature" } : u(e, c(), async ({ user: t, walletSecretId: r }) => ({
130
- transactionSignature: (await H(
126
+ }, Ee = async (e) => s().useMock ? { transactionSignature: "mock-signature" } : u(e, c(), async ({ user: t, walletSecretId: r }) => ({
127
+ transactionSignature: (await W(
131
128
  s().projectId,
132
129
  t.userId,
133
130
  {
@@ -137,14 +134,14 @@ const ue = async (e) => {
137
134
  network: e.network
138
135
  }
139
136
  )).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, {
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
- })), Ue = async (e) => s().useMock ? { signature: "mockSignature" } : u(e, c(), async ({ user: t, walletSecretId: r }) => ({
147
- signature: (await D(
143
+ })), Te = async (e) => s().useMock ? { signature: "mockSignature" } : u(e, c(), async ({ user: t, walletSecretId: r }) => ({
144
+ signature: (await _(
148
145
  s().projectId,
149
146
  t.userId,
150
147
  {
@@ -153,16 +150,16 @@ const ue = async (e) => {
153
150
  walletSecretId: r
154
151
  }
155
152
  )).signature
156
- })), Te = async (e) => s().useMock ? { signature: "0x0" } : u(e, c(), async ({ user: t, walletSecretId: r }) => ({
157
- signature: (await _(s().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
- })), Me = async (e) => s().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(
162
+ userOperationHash: (await D(
166
163
  s().projectId,
167
164
  t.userId,
168
165
  e.evmSmartAccount,
@@ -178,7 +175,7 @@ const ue = async (e) => {
178
175
  paymasterUrl: e.paymasterUrl
179
176
  }
180
177
  )).userOpHash
181
- })), Pe = async (e) => s().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 ue = async (e) => {
191
188
  status: "complete",
192
189
  transactionHash: "0x9876543210987654321098765432109876543210987654321098765432109876",
193
190
  receipts: []
194
- } : u(e, c(), async ({ user: t }) => await z(
191
+ } : u(e, c(), async ({ user: t }) => await N(
195
192
  s().projectId,
196
193
  t.userId,
197
194
  e.evmSmartAccount,
198
195
  e.userOperationHash
199
- )), je = async (e) => {
196
+ )), Ke = async (e) => {
200
197
  if (s().useMock)
201
198
  return {
202
- privateKey: d.Buffer.from("mock-private-key").toString("hex")
199
+ privateKey: m.Buffer.from("mock-private-key").toString("hex")
203
200
  };
204
- const t = S(), r = await t.createExportKeyPair();
201
+ const t = k(), r = await t.createExportKeyPair();
205
202
  return u(e, c(), async ({ user: n, walletSecretId: a }) => {
206
- const o = await F(s().projectId, n.userId, {
203
+ const o = await L(s().projectId, n.userId, {
207
204
  address: e.evmAccount,
208
205
  walletSecretId: a,
209
206
  exportEncryptionKey: r.publicKeyBase64
@@ -212,33 +209,33 @@ const ue = async (e) => {
212
209
  o.encryptedPrivateKey
213
210
  );
214
211
  return {
215
- privateKey: d.Buffer.from(i).toString("hex")
212
+ privateKey: m.Buffer.from(i).toString("hex")
216
213
  };
217
214
  });
218
- }, Ke = async (e) => {
215
+ }, Oe = async (e) => {
219
216
  if (s().useMock) {
220
- const n = d.Buffer.from("mock-private-key").subarray(0, 32), a = d.Buffer.alloc(32);
217
+ const n = m.Buffer.from("mock-private-key").subarray(0, 32), a = m.Buffer.alloc(32);
221
218
  n.copy(a);
222
- const o = p.fromSeed(a), i = d.Buffer.concat([o.secretKey.subarray(0, 32), o.publicKey.toBytes()]);
219
+ const o = y.fromSeed(a), i = m.Buffer.concat([o.secretKey.subarray(0, 32), o.publicKey.toBytes()]);
223
220
  return {
224
221
  privateKey: l.encode(i)
225
222
  };
226
223
  }
227
- const t = S(), r = await t.createExportKeyPair();
224
+ const t = k(), r = await t.createExportKeyPair();
228
225
  return u(e, c(), async ({ user: n, walletSecretId: a }) => {
229
- const o = await L(s().projectId, n.userId, {
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
- ), m = p.fromSeed(new Uint8Array(i)), E = d.Buffer.concat([m.secretKey.subarray(0, 32), m.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: l.encode(E)
235
+ privateKey: l.encode(p)
239
236
  };
240
237
  });
241
- }, v = async (e) => {
238
+ }, S = async (e) => {
242
239
  if (s().useMock)
243
240
  return {
244
241
  message: "Mock sign in initiated",
@@ -246,20 +243,20 @@ const ue = async (e) => {
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(s().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
- }, k = async (e, t, r) => {
251
+ }, v = async (e, t, r) => {
255
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,
259
- user: f
256
+ user: h
260
257
  }), {
261
258
  message: t,
262
- user: f,
259
+ user: h,
263
260
  isNewUser: !1
264
261
  };
265
262
  if (await c().isSignedIn())
@@ -275,34 +272,34 @@ const ue = async (e) => {
275
272
  );
276
273
  await c().setAuthState(o);
277
274
  const i = s();
278
- i.ethereum?.createOnLogin && (o = await w(
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 w(a, o, "eoa"));
283
- const m = await c().getUser();
279
+ )), i.solana?.createOnLogin && (o = await G(a, o)), !i.ethereum?.createOnLogin && !i.solana?.createOnLogin && (o = await I(a, o, "eoa"));
280
+ const d = await c().getUser();
284
281
  return {
285
282
  message: a.message,
286
- user: m,
283
+ user: d,
287
284
  isNewUser: a.isNewEndUser
288
285
  };
289
- }, w = async (e, t, r) => {
286
+ }, I = async (e, t, r) => {
290
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(s().projectId, t.user.userId, {
291
+ let o = await M(s().projectId, t.user.userId, {
295
292
  walletSecretId: a
296
- });
297
- if (r === "smart") {
298
- const [i] = o.evmAccounts;
299
- o = await y(
293
+ }), i = !1;
294
+ const d = s().ethereum;
295
+ if (d?.createOnLogin === "smart" && (i = d.enableSpendPermissions ?? !1), r === "smart") {
296
+ const [p] = o.evmAccounts;
297
+ o = await f(
300
298
  s().projectId,
301
299
  t.user.userId,
302
300
  {
303
- owner: i,
304
- enableSpendPermissions: !1
305
- // Defaulting to false until the feature is ready.
301
+ owner: p,
302
+ enableSpendPermissions: i
306
303
  }
307
304
  );
308
305
  }
@@ -312,7 +309,7 @@ const ue = async (e) => {
312
309
  }
313
310
  if (r === "smart" && (!n.user.evmSmartAccounts || n.user.evmSmartAccounts.length === 0))
314
311
  try {
315
- const [a] = n.user.evmAccounts, o = await y(
312
+ const [a] = n.user.evmAccounts, o = await f(
316
313
  s().projectId,
317
314
  n.user.userId,
318
315
  {
@@ -326,11 +323,11 @@ const ue = async (e) => {
326
323
  throw new Error(`Failed to create EVM Smart Account: ${a}`);
327
324
  }
328
325
  return n;
329
- }, J = async (e, t) => {
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 n = await c().getWalletSecretId(), a = await j(
330
+ const n = await c().getWalletSecretId(), a = await P(
334
331
  s().projectId,
335
332
  t.user.userId,
336
333
  {
@@ -344,26 +341,26 @@ const ue = async (e) => {
344
341
  return r;
345
342
  };
346
343
  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,
344
+ Ke as exportEvmAccount,
345
+ Oe as exportSolanaAccount,
346
+ we as getAccessToken,
347
+ ye as getCurrentUser,
348
+ je as getUserOperation,
349
+ de as initialize,
353
350
  le as isSignedIn,
354
- we as onAuthStateChange,
351
+ Ie as onAuthStateChange,
355
352
  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,
368
- ye as verifySmsOTP
353
+ Ee as sendSolanaTransaction,
354
+ Pe as sendUserOperation,
355
+ ke as signEvmHash,
356
+ Ue as signEvmMessage,
357
+ Ae as signEvmTransaction,
358
+ Me as signEvmTypedData,
359
+ me as signInWithEmail,
360
+ ge as signInWithSms,
361
+ he as signOut,
362
+ Te as signSolanaMessage,
363
+ Se as signSolanaTransaction,
364
+ pe as verifyEmailOTP,
365
+ fe as verifySmsOTP
369
366
  };
@@ -1,58 +1,30 @@
1
- import { version as o } from "./index.native88.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.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"
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
  };