@coinbase/cdp-core 0.0.70 → 0.0.71

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 (410) hide show
  1. package/README.md +86 -29
  2. package/dist/esm/index.native10.js +69 -67
  3. package/dist/esm/index.native106.js +1 -1
  4. package/dist/esm/index.native107.js +1 -1
  5. package/dist/esm/index.native112.js +1 -1
  6. package/dist/esm/index.native113.js +7 -7
  7. package/dist/esm/index.native119.js +3 -3
  8. package/dist/esm/index.native124.js +8 -8
  9. package/dist/esm/index.native131.js +4 -4
  10. package/dist/esm/index.native133.js +4 -4
  11. package/dist/esm/index.native136.js +7 -7
  12. package/dist/esm/index.native140.js +2 -2
  13. package/dist/esm/index.native145.js +1 -1
  14. package/dist/esm/index.native146.js +6 -32
  15. package/dist/esm/index.native147.js +32 -6
  16. package/dist/esm/index.native148.js +2 -79
  17. package/dist/esm/index.native149.js +108 -3
  18. package/dist/esm/index.native15.js +18 -18
  19. package/dist/esm/index.native150.js +2 -2
  20. package/dist/esm/index.native151.js +20 -108
  21. package/dist/esm/index.native152.js +10 -2
  22. package/dist/esm/index.native153.js +19 -20
  23. package/dist/esm/index.native154.js +93 -9
  24. package/dist/esm/index.native155.js +19 -18
  25. package/dist/esm/index.native156.js +105 -81
  26. package/dist/esm/index.native157.js +78 -20
  27. package/dist/esm/index.native158.js +4 -118
  28. package/dist/esm/index.native159.js +7 -38
  29. package/dist/esm/index.native161.js +375 -67
  30. package/dist/esm/index.native162.js +835 -34
  31. package/dist/esm/index.native163.js +38 -20
  32. package/dist/esm/index.native164.js +2 -8
  33. package/dist/esm/index.native165.js +70 -2
  34. package/dist/esm/index.native166.js +30 -373
  35. package/dist/esm/index.native167.js +20 -832
  36. package/dist/esm/index.native168.js +1 -1
  37. package/dist/esm/index.native171.js +1 -1
  38. package/dist/esm/index.native177.js +1 -1
  39. package/dist/esm/index.native179.js +2 -2
  40. package/dist/esm/index.native180.js +2 -2
  41. package/dist/esm/index.native181.js +2 -2
  42. package/dist/esm/index.native21.js +17 -18
  43. package/dist/esm/index.native22.js +26 -23
  44. package/dist/esm/index.native23.js +18 -17
  45. package/dist/esm/index.native3.js +1 -1
  46. package/dist/esm/index.native30.js +24 -24
  47. package/dist/esm/index.native33.js +1 -1
  48. package/dist/esm/index.native40.js +19 -14
  49. package/dist/esm/index.native44.js +13 -0
  50. package/dist/esm/index.native48.js +7 -7
  51. package/dist/esm/index.native49.js +8 -30
  52. package/dist/esm/index.native50.js +3 -3
  53. package/dist/esm/index.native57.js +2 -2
  54. package/dist/esm/index.native64.js +3 -3
  55. package/dist/esm/index.native65.js +2 -31
  56. package/dist/esm/index.native66.js +65 -28
  57. package/dist/esm/index.native67.js +367 -2
  58. package/dist/esm/index.native68.js +14 -63
  59. package/dist/esm/index.native69.js +18 -360
  60. package/dist/esm/index.native70.js +47 -13
  61. package/dist/esm/index.native71.js +28 -22
  62. package/dist/esm/index.native72.js +28 -50
  63. package/dist/esm/index.native9.js +1 -1
  64. package/dist/esm/index.web100.js +38 -5
  65. package/dist/esm/index.web101.js +6 -10
  66. package/dist/esm/index.web102.js +32 -14
  67. package/dist/esm/index.web103.js +8 -22
  68. package/dist/esm/index.web104.js +10 -50
  69. package/dist/esm/index.web105.js +11 -376
  70. package/dist/esm/index.web106.js +13 -28
  71. package/dist/esm/index.web107.js +18 -28
  72. package/dist/esm/index.web108.js +8 -2
  73. package/dist/esm/index.web109.js +5 -66
  74. package/dist/esm/index.web110.js +10 -364
  75. package/dist/esm/index.web111.js +55 -2
  76. package/dist/esm/index.web112.js +10 -20
  77. package/dist/esm/index.web113.js +2 -5
  78. package/dist/esm/index.web114.js +44 -47
  79. package/dist/esm/index.web115.js +13 -19
  80. package/dist/esm/index.web116.js +4 -79
  81. package/dist/esm/index.web117.js +2 -104
  82. package/dist/esm/index.web118.js +4 -32
  83. package/dist/esm/index.web119.js +18 -6
  84. package/dist/esm/index.web120.js +7 -54
  85. package/dist/esm/index.web121.js +3 -10
  86. package/dist/esm/index.web122.js +24 -2
  87. package/dist/esm/index.web123.js +9 -45
  88. package/dist/esm/index.web124.js +7 -13
  89. package/dist/esm/index.web125.js +71 -4
  90. package/dist/esm/index.web126.js +18 -3
  91. package/dist/esm/index.web127.js +3 -4
  92. package/dist/esm/index.web128.js +4 -18
  93. package/dist/esm/index.web129.js +4 -7
  94. package/dist/esm/index.web130.js +4 -3
  95. package/dist/esm/index.web131.js +15 -19
  96. package/dist/esm/index.web132.js +52 -8
  97. package/dist/esm/index.web133.js +16 -6
  98. package/dist/esm/index.web134.js +21 -69
  99. package/dist/esm/index.web135.js +8 -18
  100. package/dist/esm/index.web136.js +30 -3
  101. package/dist/esm/index.web137.js +7 -4
  102. package/dist/esm/index.web138.js +20 -4
  103. package/dist/esm/index.web139.js +5 -5
  104. package/dist/esm/index.web14.js +18 -18
  105. package/dist/esm/index.web140.js +44 -16
  106. package/dist/esm/index.web141.js +15 -47
  107. package/dist/esm/index.web142.js +19 -17
  108. package/dist/esm/index.web143.js +79 -23
  109. package/dist/esm/index.web144.js +103 -8
  110. package/dist/esm/index.web145.js +31 -29
  111. package/dist/esm/index.web146.js +6 -7
  112. package/dist/esm/index.web147.js +18 -18
  113. package/dist/esm/index.web148.js +10 -39
  114. package/dist/esm/index.web149.js +20 -2
  115. package/dist/esm/index.web150.js +94 -70
  116. package/dist/esm/index.web151.js +21 -35
  117. package/dist/esm/index.web152.js +116 -19
  118. package/dist/esm/index.web153.js +2 -8
  119. package/dist/esm/index.web154.js +109 -2
  120. package/dist/esm/index.web155.js +2 -378
  121. package/dist/esm/index.web156.js +78 -832
  122. package/dist/esm/index.web157.js +3 -78
  123. package/dist/esm/index.web158.js +39 -5
  124. package/dist/esm/index.web159.js +2 -21
  125. package/dist/esm/index.web160.js +70 -10
  126. package/dist/esm/index.web161.js +34 -19
  127. package/dist/esm/index.web162.js +19 -92
  128. package/dist/esm/index.web163.js +8 -21
  129. package/dist/esm/index.web164.js +2 -118
  130. package/dist/esm/index.web165.js +378 -2
  131. package/dist/esm/index.web166.js +836 -2
  132. package/dist/esm/index.web167.js +47 -2
  133. package/dist/esm/index.web168.js +5 -2
  134. package/dist/esm/index.web169.js +17 -108
  135. package/dist/esm/index.web170.js +28 -2
  136. package/dist/esm/index.web171.js +7 -46
  137. package/dist/esm/index.web172.js +11 -15
  138. package/dist/esm/index.web173.js +11 -16
  139. package/dist/esm/index.web174.js +10 -28
  140. package/dist/esm/index.web175.js +17 -8
  141. package/dist/esm/index.web176.js +79 -9
  142. package/dist/esm/index.web177.js +14 -12
  143. package/dist/esm/index.web178.js +2 -10
  144. package/dist/esm/index.web179.js +2 -17
  145. package/dist/esm/index.web180.js +2 -81
  146. package/dist/esm/index.web2.js +2 -2
  147. package/dist/esm/index.web20.js +17 -18
  148. package/dist/esm/index.web21.js +26 -23
  149. package/dist/esm/index.web22.js +18 -17
  150. package/dist/esm/index.web29.js +24 -24
  151. package/dist/esm/index.web3.js +1 -1
  152. package/dist/esm/index.web32.js +1 -1
  153. package/dist/esm/index.web38.js +19 -14
  154. package/dist/esm/index.web42.js +13 -0
  155. package/dist/esm/index.web45.js +12 -12
  156. package/dist/esm/index.web47.js +7 -7
  157. package/dist/esm/index.web48.js +8 -30
  158. package/dist/esm/index.web49.js +3 -3
  159. package/dist/esm/index.web52.js +2 -2
  160. package/dist/esm/index.web56.js +3 -3
  161. package/dist/esm/index.web63.js +15 -16
  162. package/dist/esm/index.web64.js +19 -42
  163. package/dist/esm/index.web65.js +50 -13
  164. package/dist/esm/index.web66.js +376 -55
  165. package/dist/esm/index.web67.js +28 -6
  166. package/dist/esm/index.web68.js +28 -21
  167. package/dist/esm/index.web69.js +2 -14
  168. package/dist/esm/index.web70.js +65 -3
  169. package/dist/esm/index.web71.js +364 -3
  170. package/dist/esm/index.web72.js +16 -33
  171. package/dist/esm/index.web73.js +43 -10
  172. package/dist/esm/index.web74.js +13 -4
  173. package/dist/esm/index.web75.js +52 -25
  174. package/dist/esm/index.web76.js +6 -6
  175. package/dist/esm/index.web77.js +20 -41
  176. package/dist/esm/index.web78.js +11 -55
  177. package/dist/esm/index.web79.js +3 -127
  178. package/dist/esm/index.web8.js +1 -1
  179. package/dist/esm/index.web80.js +3 -23
  180. package/dist/esm/index.web81.js +32 -10
  181. package/dist/esm/index.web82.js +9 -101
  182. package/dist/esm/index.web83.js +4 -6
  183. package/dist/esm/index.web84.js +29 -3
  184. package/dist/esm/index.web85.js +6 -14
  185. package/dist/esm/index.web86.js +40 -32
  186. package/dist/esm/index.web87.js +53 -76
  187. package/dist/esm/index.web88.js +128 -2
  188. package/dist/esm/index.web89.js +24 -2
  189. package/dist/esm/index.web9.js +69 -67
  190. package/dist/esm/index.web90.js +11 -11
  191. package/dist/esm/index.web91.js +99 -32
  192. package/dist/esm/index.web92.js +6 -6
  193. package/dist/esm/index.web93.js +3 -35
  194. package/dist/esm/index.web94.js +14 -8
  195. package/dist/esm/index.web95.js +33 -9
  196. package/dist/esm/index.web96.js +78 -11
  197. package/dist/esm/index.web97.js +2 -14
  198. package/dist/esm/index.web98.js +2 -19
  199. package/dist/esm/index.web99.js +12 -5
  200. package/dist/native/index.native10.js +69 -67
  201. package/dist/native/index.native106.js +1 -1
  202. package/dist/native/index.native107.js +1 -1
  203. package/dist/native/index.native112.js +1 -1
  204. package/dist/native/index.native113.js +7 -7
  205. package/dist/native/index.native119.js +3 -3
  206. package/dist/native/index.native124.js +8 -8
  207. package/dist/native/index.native131.js +4 -4
  208. package/dist/native/index.native133.js +4 -4
  209. package/dist/native/index.native136.js +7 -7
  210. package/dist/native/index.native140.js +2 -2
  211. package/dist/native/index.native145.js +1 -1
  212. package/dist/native/index.native146.js +6 -32
  213. package/dist/native/index.native147.js +32 -6
  214. package/dist/native/index.native148.js +2 -79
  215. package/dist/native/index.native149.js +108 -3
  216. package/dist/native/index.native15.js +18 -18
  217. package/dist/native/index.native150.js +2 -2
  218. package/dist/native/index.native151.js +20 -108
  219. package/dist/native/index.native152.js +10 -2
  220. package/dist/native/index.native153.js +19 -20
  221. package/dist/native/index.native154.js +93 -9
  222. package/dist/native/index.native155.js +19 -18
  223. package/dist/native/index.native156.js +105 -81
  224. package/dist/native/index.native157.js +78 -20
  225. package/dist/native/index.native158.js +4 -118
  226. package/dist/native/index.native159.js +7 -38
  227. package/dist/native/index.native161.js +375 -67
  228. package/dist/native/index.native162.js +835 -34
  229. package/dist/native/index.native163.js +38 -20
  230. package/dist/native/index.native164.js +2 -8
  231. package/dist/native/index.native165.js +70 -2
  232. package/dist/native/index.native166.js +30 -373
  233. package/dist/native/index.native167.js +20 -832
  234. package/dist/native/index.native168.js +1 -1
  235. package/dist/native/index.native171.js +1 -1
  236. package/dist/native/index.native177.js +1 -1
  237. package/dist/native/index.native179.js +2 -2
  238. package/dist/native/index.native180.js +2 -2
  239. package/dist/native/index.native181.js +2 -2
  240. package/dist/native/index.native21.js +17 -18
  241. package/dist/native/index.native22.js +26 -23
  242. package/dist/native/index.native23.js +18 -17
  243. package/dist/native/index.native3.js +1 -1
  244. package/dist/native/index.native30.js +24 -24
  245. package/dist/native/index.native33.js +1 -1
  246. package/dist/native/index.native40.js +19 -14
  247. package/dist/native/index.native44.js +13 -0
  248. package/dist/native/index.native48.js +7 -7
  249. package/dist/native/index.native49.js +8 -30
  250. package/dist/native/index.native50.js +3 -3
  251. package/dist/native/index.native57.js +2 -2
  252. package/dist/native/index.native64.js +3 -3
  253. package/dist/native/index.native65.js +2 -31
  254. package/dist/native/index.native66.js +65 -28
  255. package/dist/native/index.native67.js +367 -2
  256. package/dist/native/index.native68.js +14 -63
  257. package/dist/native/index.native69.js +18 -360
  258. package/dist/native/index.native70.js +47 -13
  259. package/dist/native/index.native71.js +28 -22
  260. package/dist/native/index.native72.js +28 -50
  261. package/dist/native/index.native9.js +1 -1
  262. package/dist/native-types/auth/toAuthState.d.ts +4 -1
  263. package/dist/native-types/shared/validators.d.ts +0 -4
  264. package/dist/native-types/types.d.ts +5 -2
  265. package/dist/native-types/version.d.ts +1 -1
  266. package/dist/types/auth/toAuthState.d.ts +4 -1
  267. package/dist/types/shared/validators.d.ts +0 -4
  268. package/dist/types/types.d.ts +5 -2
  269. package/dist/types/version.d.ts +1 -1
  270. package/dist/web/index.web100.js +38 -5
  271. package/dist/web/index.web101.js +6 -10
  272. package/dist/web/index.web102.js +32 -14
  273. package/dist/web/index.web103.js +8 -22
  274. package/dist/web/index.web104.js +10 -50
  275. package/dist/web/index.web105.js +11 -376
  276. package/dist/web/index.web106.js +13 -28
  277. package/dist/web/index.web107.js +18 -28
  278. package/dist/web/index.web108.js +8 -2
  279. package/dist/web/index.web109.js +5 -66
  280. package/dist/web/index.web110.js +10 -364
  281. package/dist/web/index.web111.js +55 -2
  282. package/dist/web/index.web112.js +10 -20
  283. package/dist/web/index.web113.js +2 -5
  284. package/dist/web/index.web114.js +44 -47
  285. package/dist/web/index.web115.js +13 -19
  286. package/dist/web/index.web116.js +4 -79
  287. package/dist/web/index.web117.js +2 -104
  288. package/dist/web/index.web118.js +4 -32
  289. package/dist/web/index.web119.js +18 -6
  290. package/dist/web/index.web120.js +7 -54
  291. package/dist/web/index.web121.js +3 -10
  292. package/dist/web/index.web122.js +24 -2
  293. package/dist/web/index.web123.js +9 -45
  294. package/dist/web/index.web124.js +7 -13
  295. package/dist/web/index.web125.js +71 -4
  296. package/dist/web/index.web126.js +18 -3
  297. package/dist/web/index.web127.js +3 -4
  298. package/dist/web/index.web128.js +4 -18
  299. package/dist/web/index.web129.js +4 -7
  300. package/dist/web/index.web130.js +4 -3
  301. package/dist/web/index.web131.js +15 -19
  302. package/dist/web/index.web132.js +52 -8
  303. package/dist/web/index.web133.js +16 -6
  304. package/dist/web/index.web134.js +21 -69
  305. package/dist/web/index.web135.js +8 -18
  306. package/dist/web/index.web136.js +30 -3
  307. package/dist/web/index.web137.js +7 -4
  308. package/dist/web/index.web138.js +20 -4
  309. package/dist/web/index.web139.js +5 -5
  310. package/dist/web/index.web14.js +18 -18
  311. package/dist/web/index.web140.js +44 -16
  312. package/dist/web/index.web141.js +15 -47
  313. package/dist/web/index.web142.js +19 -17
  314. package/dist/web/index.web143.js +79 -23
  315. package/dist/web/index.web144.js +103 -8
  316. package/dist/web/index.web145.js +31 -29
  317. package/dist/web/index.web146.js +6 -7
  318. package/dist/web/index.web147.js +18 -18
  319. package/dist/web/index.web148.js +10 -39
  320. package/dist/web/index.web149.js +20 -2
  321. package/dist/web/index.web150.js +94 -70
  322. package/dist/web/index.web151.js +21 -35
  323. package/dist/web/index.web152.js +116 -19
  324. package/dist/web/index.web153.js +2 -8
  325. package/dist/web/index.web154.js +109 -2
  326. package/dist/web/index.web155.js +2 -378
  327. package/dist/web/index.web156.js +78 -832
  328. package/dist/web/index.web157.js +3 -78
  329. package/dist/web/index.web158.js +39 -5
  330. package/dist/web/index.web159.js +2 -21
  331. package/dist/web/index.web160.js +70 -10
  332. package/dist/web/index.web161.js +34 -19
  333. package/dist/web/index.web162.js +19 -92
  334. package/dist/web/index.web163.js +8 -21
  335. package/dist/web/index.web164.js +2 -118
  336. package/dist/web/index.web165.js +378 -2
  337. package/dist/web/index.web166.js +836 -2
  338. package/dist/web/index.web167.js +47 -2
  339. package/dist/web/index.web168.js +5 -2
  340. package/dist/web/index.web169.js +17 -108
  341. package/dist/web/index.web170.js +28 -2
  342. package/dist/web/index.web171.js +7 -46
  343. package/dist/web/index.web172.js +11 -15
  344. package/dist/web/index.web173.js +11 -16
  345. package/dist/web/index.web174.js +10 -28
  346. package/dist/web/index.web175.js +17 -8
  347. package/dist/web/index.web176.js +79 -9
  348. package/dist/web/index.web177.js +14 -12
  349. package/dist/web/index.web178.js +2 -10
  350. package/dist/web/index.web179.js +2 -17
  351. package/dist/web/index.web180.js +2 -81
  352. package/dist/web/index.web2.js +2 -2
  353. package/dist/web/index.web20.js +17 -18
  354. package/dist/web/index.web21.js +26 -23
  355. package/dist/web/index.web22.js +18 -17
  356. package/dist/web/index.web29.js +24 -24
  357. package/dist/web/index.web3.js +1 -1
  358. package/dist/web/index.web32.js +1 -1
  359. package/dist/web/index.web38.js +19 -14
  360. package/dist/web/index.web42.js +13 -0
  361. package/dist/web/index.web45.js +12 -12
  362. package/dist/web/index.web47.js +7 -7
  363. package/dist/web/index.web48.js +8 -30
  364. package/dist/web/index.web49.js +3 -3
  365. package/dist/web/index.web52.js +2 -2
  366. package/dist/web/index.web56.js +3 -3
  367. package/dist/web/index.web63.js +15 -16
  368. package/dist/web/index.web64.js +19 -42
  369. package/dist/web/index.web65.js +50 -13
  370. package/dist/web/index.web66.js +376 -55
  371. package/dist/web/index.web67.js +28 -6
  372. package/dist/web/index.web68.js +28 -21
  373. package/dist/web/index.web69.js +2 -14
  374. package/dist/web/index.web70.js +65 -3
  375. package/dist/web/index.web71.js +364 -3
  376. package/dist/web/index.web72.js +16 -33
  377. package/dist/web/index.web73.js +43 -10
  378. package/dist/web/index.web74.js +13 -4
  379. package/dist/web/index.web75.js +52 -25
  380. package/dist/web/index.web76.js +6 -6
  381. package/dist/web/index.web77.js +20 -41
  382. package/dist/web/index.web78.js +11 -55
  383. package/dist/web/index.web79.js +3 -127
  384. package/dist/web/index.web8.js +1 -1
  385. package/dist/web/index.web80.js +3 -23
  386. package/dist/web/index.web81.js +32 -10
  387. package/dist/web/index.web82.js +9 -101
  388. package/dist/web/index.web83.js +4 -6
  389. package/dist/web/index.web84.js +29 -3
  390. package/dist/web/index.web85.js +6 -14
  391. package/dist/web/index.web86.js +40 -32
  392. package/dist/web/index.web87.js +53 -76
  393. package/dist/web/index.web88.js +128 -2
  394. package/dist/web/index.web89.js +24 -2
  395. package/dist/web/index.web9.js +69 -67
  396. package/dist/web/index.web90.js +11 -11
  397. package/dist/web/index.web91.js +99 -32
  398. package/dist/web/index.web92.js +6 -6
  399. package/dist/web/index.web93.js +3 -35
  400. package/dist/web/index.web94.js +14 -8
  401. package/dist/web/index.web95.js +33 -9
  402. package/dist/web/index.web96.js +78 -11
  403. package/dist/web/index.web97.js +2 -14
  404. package/dist/web/index.web98.js +2 -19
  405. package/dist/web/index.web99.js +12 -5
  406. package/dist/web-types/auth/toAuthState.d.ts +4 -1
  407. package/dist/web-types/shared/validators.d.ts +0 -4
  408. package/dist/web-types/types.d.ts +5 -2
  409. package/dist/web-types/version.d.ts +1 -1
  410. package/package.json +2 -2
@@ -1,15 +1,15 @@
1
- import { BaseError as r } from "./index.web78.js";
2
- class d extends r {
3
- constructor({ address: s }) {
4
- super(`Address "${s}" is invalid.`, {
5
- metaMessages: [
6
- "- Address must be a hex value of 20 bytes (40 hex characters).",
7
- "- Address must match its checksum counterpart."
8
- ],
9
- name: "InvalidAddressError"
10
- });
1
+ import { BaseError as t } from "./index.web87.js";
2
+ class $ extends t {
3
+ constructor({ max: e, min: r, signed: s, size: n, value: a }) {
4
+ super(`Number "${a}" is not in safe ${n ? `${n * 8}-bit ${s ? "signed" : "unsigned"} ` : ""}integer range ${e ? `(${r} to ${e})` : `(above ${r})`}`, { name: "IntegerOutOfRangeError" });
5
+ }
6
+ }
7
+ class c extends t {
8
+ constructor({ givenSize: e, maxSize: r }) {
9
+ super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`, { name: "SizeOverflowError" });
11
10
  }
12
11
  }
13
12
  export {
14
- d as InvalidAddressError
13
+ $ as IntegerOutOfRangeError,
14
+ c as SizeOverflowError
15
15
  };
@@ -1,40 +1,107 @@
1
- import { versionedHashVersionKzg as a } from "./index.web88.js";
2
- import { BaseError as s } from "./index.web78.js";
3
- class t extends s {
4
- constructor({ maxSize: e, size: r }) {
5
- super("Blob size is too large.", {
6
- metaMessages: [`Max: ${e} bytes`, `Given: ${r} bytes`],
7
- name: "BlobSizeTooLargeError"
8
- });
9
- }
1
+ import { split as L, rotlSH as T, rotlSL as S, rotlBH as m, rotlBL as F } from "./index.web142.js";
2
+ import { createHasher as X, Hash as E, anumber as d, u32 as U, swap32IfBE as I, aexists as x, toBytes as P, abytes as k, aoutput as M, clean as y } from "./index.web143.js";
3
+ const R = BigInt(0), f = BigInt(1), j = BigInt(2), q = BigInt(7), v = BigInt(256), z = BigInt(113), _ = [], g = [], B = [];
4
+ for (let n = 0, t = f, s = 1, i = 0; n < 24; n++) {
5
+ [s, i] = [i, (2 * s + 3 * i) % 5], _.push(2 * (5 * i + s)), g.push((n + 1) * (n + 2) / 2 % 64);
6
+ let o = R;
7
+ for (let r = 0; r < 7; r++)
8
+ t = (t << f ^ (t >> q) * z) % v, t & j && (o ^= f << (f << /* @__PURE__ */ BigInt(r)) - f);
9
+ B.push(o);
10
10
  }
11
- class d extends s {
12
- constructor() {
13
- super("Blob data must not be empty.", { name: "EmptyBlobError" });
11
+ const A = L(B, !0), C = A[0], D = A[1], O = (n, t, s) => s > 32 ? m(n, t, s) : T(n, t, s), w = (n, t, s) => s > 32 ? F(n, t, s) : S(n, t, s);
12
+ function G(n, t = 24) {
13
+ const s = new Uint32Array(10);
14
+ for (let i = 24 - t; i < 24; i++) {
15
+ for (let e = 0; e < 10; e++)
16
+ s[e] = n[e] ^ n[e + 10] ^ n[e + 20] ^ n[e + 30] ^ n[e + 40];
17
+ for (let e = 0; e < 10; e += 2) {
18
+ const h = (e + 8) % 10, l = (e + 2) % 10, u = s[l], c = s[l + 1], b = O(u, c, 1) ^ s[h], H = w(u, c, 1) ^ s[h + 1];
19
+ for (let a = 0; a < 50; a += 10)
20
+ n[e + a] ^= b, n[e + a + 1] ^= H;
21
+ }
22
+ let o = n[2], r = n[3];
23
+ for (let e = 0; e < 24; e++) {
24
+ const h = g[e], l = O(o, r, h), u = w(o, r, h), c = _[e];
25
+ o = n[c], r = n[c + 1], n[c] = l, n[c + 1] = u;
26
+ }
27
+ for (let e = 0; e < 50; e += 10) {
28
+ for (let h = 0; h < 10; h++)
29
+ s[h] = n[e + h];
30
+ for (let h = 0; h < 10; h++)
31
+ n[e + h] ^= ~s[(h + 2) % 10] & s[(h + 4) % 10];
32
+ }
33
+ n[0] ^= C[i], n[1] ^= D[i];
14
34
  }
35
+ y(s);
15
36
  }
16
- class l extends s {
17
- constructor({ hash: e, size: r }) {
18
- super(`Versioned hash "${e}" size is invalid.`, {
19
- metaMessages: ["Expected: 32", `Received: ${r}`],
20
- name: "InvalidVersionedHashSizeError"
21
- });
37
+ class p extends E {
38
+ // NOTE: we accept arguments in bytes instead of bits here.
39
+ constructor(t, s, i, o = !1, r = 24) {
40
+ if (super(), this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, this.enableXOF = !1, this.blockLen = t, this.suffix = s, this.outputLen = i, this.enableXOF = o, this.rounds = r, d(i), !(0 < t && t < 200))
41
+ throw new Error("only keccak-f1600 function is supported");
42
+ this.state = new Uint8Array(200), this.state32 = U(this.state);
22
43
  }
23
- }
24
- class c extends s {
25
- constructor({ hash: e, version: r }) {
26
- super(`Versioned hash "${e}" version is invalid.`, {
27
- metaMessages: [
28
- `Expected: ${a}`,
29
- `Received: ${r}`
30
- ],
31
- name: "InvalidVersionedHashVersionError"
32
- });
44
+ clone() {
45
+ return this._cloneInto();
46
+ }
47
+ keccak() {
48
+ I(this.state32), G(this.state32, this.rounds), I(this.state32), this.posOut = 0, this.pos = 0;
49
+ }
50
+ update(t) {
51
+ x(this), t = P(t), k(t);
52
+ const { blockLen: s, state: i } = this, o = t.length;
53
+ for (let r = 0; r < o; ) {
54
+ const e = Math.min(s - this.pos, o - r);
55
+ for (let h = 0; h < e; h++)
56
+ i[this.pos++] ^= t[r++];
57
+ this.pos === s && this.keccak();
58
+ }
59
+ return this;
60
+ }
61
+ finish() {
62
+ if (this.finished)
63
+ return;
64
+ this.finished = !0;
65
+ const { state: t, suffix: s, pos: i, blockLen: o } = this;
66
+ t[i] ^= s, (s & 128) !== 0 && i === o - 1 && this.keccak(), t[o - 1] ^= 128, this.keccak();
67
+ }
68
+ writeInto(t) {
69
+ x(this, !1), k(t), this.finish();
70
+ const s = this.state, { blockLen: i } = this;
71
+ for (let o = 0, r = t.length; o < r; ) {
72
+ this.posOut >= i && this.keccak();
73
+ const e = Math.min(i - this.posOut, r - o);
74
+ t.set(s.subarray(this.posOut, this.posOut + e), o), this.posOut += e, o += e;
75
+ }
76
+ return t;
77
+ }
78
+ xofInto(t) {
79
+ if (!this.enableXOF)
80
+ throw new Error("XOF is not possible for this instance");
81
+ return this.writeInto(t);
82
+ }
83
+ xof(t) {
84
+ return d(t), this.xofInto(new Uint8Array(t));
85
+ }
86
+ digestInto(t) {
87
+ if (M(t, this), this.finished)
88
+ throw new Error("digest() was already called");
89
+ return this.writeInto(t), this.destroy(), t;
90
+ }
91
+ digest() {
92
+ return this.digestInto(new Uint8Array(this.outputLen));
93
+ }
94
+ destroy() {
95
+ this.destroyed = !0, y(this.state);
96
+ }
97
+ _cloneInto(t) {
98
+ const { blockLen: s, suffix: i, outputLen: o, rounds: r, enableXOF: e } = this;
99
+ return t || (t = new p(s, i, o, e, r)), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = r, t.suffix = i, t.outputLen = o, t.enableXOF = e, t.destroyed = this.destroyed, t;
33
100
  }
34
101
  }
102
+ const J = (n, t, s) => X(() => new p(t, n, s)), Q = J(1, 136, 256 / 8);
35
103
  export {
36
- t as BlobSizeTooLargeError,
37
- d as EmptyBlobError,
38
- l as InvalidVersionedHashSizeError,
39
- c as InvalidVersionedHashVersionError
104
+ p as Keccak,
105
+ G as keccakP,
106
+ Q as keccak_256
40
107
  };
@@ -1,9 +1,9 @@
1
- import { BaseError as i } from "./index.web78.js";
2
- class o extends i {
3
- constructor({ chainId: r }) {
4
- super(typeof r == "number" ? `Chain ID "${r}" is invalid.` : "Chain ID is invalid.", { name: "InvalidChainIdError" });
5
- }
1
+ import { sha256 as o } from "./index.web93.js";
2
+ import { isHex as s } from "./index.web80.js";
3
+ import { toBytes as r } from "./index.web75.js";
4
+ function p(t, i) {
5
+ return o(s(t, { strict: !1 }) ? r(t) : t);
6
6
  }
7
7
  export {
8
- o as InvalidChainIdError
8
+ p as sha256
9
9
  };
@@ -1,37 +1,5 @@
1
- import { formatGwei as a } from "./index.web99.js";
2
- import { BaseError as o } from "./index.web78.js";
3
- class n extends o {
4
- constructor({ cause: r, maxFeePerGas: e } = {}) {
5
- super(`The fee cap (\`maxFeePerGas\`${e ? ` = ${a(e)} gwei` : ""}) cannot be higher than the maximum allowed value (2^256-1).`, {
6
- cause: r,
7
- name: "FeeCapTooHighError"
8
- });
9
- }
10
- }
11
- Object.defineProperty(n, "nodeMessage", {
12
- enumerable: !0,
13
- configurable: !0,
14
- writable: !0,
15
- value: /max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/
16
- });
17
- class h extends o {
18
- constructor({ cause: r, maxPriorityFeePerGas: e, maxFeePerGas: t } = {}) {
19
- super([
20
- `The provided tip (\`maxPriorityFeePerGas\`${e ? ` = ${a(e)} gwei` : ""}) cannot be higher than the fee cap (\`maxFeePerGas\`${t ? ` = ${a(t)} gwei` : ""}).`
21
- ].join(`
22
- `), {
23
- cause: r,
24
- name: "TipAboveFeeCapError"
25
- });
26
- }
27
- }
28
- Object.defineProperty(h, "nodeMessage", {
29
- enumerable: !0,
30
- configurable: !0,
31
- writable: !0,
32
- value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/
33
- });
1
+ import { sha256 as s } from "./index.web144.js";
2
+ const o = s;
34
3
  export {
35
- n as FeeCapTooHighError,
36
- h as TipAboveFeeCapError
4
+ o as sha256
37
5
  };
@@ -1,11 +1,17 @@
1
- import { hexToBytes as i } from "./index.web66.js";
2
- import { bytesToHex as f } from "./index.web64.js";
3
- function y(o) {
4
- const { kzg: s } = o, n = o.to ?? (typeof o.blobs[0] == "string" ? "hex" : "bytes"), m = typeof o.blobs[0] == "string" ? o.blobs.map((t) => i(t)) : o.blobs, b = [];
5
- for (const t of m)
6
- b.push(Uint8Array.from(s.blobToKzgCommitment(t)));
7
- return n === "bytes" ? b : b.map((t) => f(t));
1
+ import { InvalidSerializableTransactionError as f } from "./index.web95.js";
2
+ function d(e) {
3
+ if (e.type)
4
+ return e.type;
5
+ if (typeof e.authorizationList < "u")
6
+ return "eip7702";
7
+ if (typeof e.blobs < "u" || typeof e.blobVersionedHashes < "u" || typeof e.maxFeePerBlobGas < "u" || typeof e.sidecars < "u")
8
+ return "eip4844";
9
+ if (typeof e.maxFeePerGas < "u" || typeof e.maxPriorityFeePerGas < "u")
10
+ return "eip1559";
11
+ if (typeof e.gasPrice < "u")
12
+ return typeof e.accessList < "u" ? "eip2930" : "legacy";
13
+ throw new f({ transaction: e });
8
14
  }
9
15
  export {
10
- y as blobsToCommitments
16
+ d as getTransactionType
11
17
  };
@@ -1,13 +1,37 @@
1
- import { hexToBytes as b } from "./index.web66.js";
2
- import { bytesToHex as y } from "./index.web64.js";
3
- function h(t) {
4
- const { kzg: m } = t, c = t.to ?? (typeof t.blobs[0] == "string" ? "hex" : "bytes"), s = typeof t.blobs[0] == "string" ? t.blobs.map((o) => b(o)) : t.blobs, i = typeof t.commitments[0] == "string" ? t.commitments.map((o) => b(o)) : t.commitments, n = [];
5
- for (let o = 0; o < s.length; o++) {
6
- const f = s[o], l = i[o];
7
- n.push(Uint8Array.from(m.computeBlobKzgProof(f, l)));
1
+ import { BaseError as t } from "./index.web87.js";
2
+ function o(n) {
3
+ const r = Object.entries(n).map(([a, e]) => e === void 0 || e === !1 ? null : [a, e]).filter(Boolean), i = r.reduce((a, [e]) => Math.max(a, e.length), 0);
4
+ return r.map(([a, e]) => ` ${`${a}:`.padEnd(i + 1)} ${e}`).join(`
5
+ `);
6
+ }
7
+ class c extends t {
8
+ constructor({ transaction: r }) {
9
+ super("Cannot infer a transaction type from provided transaction.", {
10
+ metaMessages: [
11
+ "Provided Transaction:",
12
+ "{",
13
+ o(r),
14
+ "}",
15
+ "",
16
+ "To infer the type, either provide:",
17
+ "- a `type` to the Transaction, or",
18
+ "- an EIP-1559 Transaction with `maxFeePerGas`, or",
19
+ "- an EIP-2930 Transaction with `gasPrice` & `accessList`, or",
20
+ "- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or",
21
+ "- an EIP-7702 Transaction with `authorizationList`, or",
22
+ "- a Legacy Transaction with `gasPrice`"
23
+ ],
24
+ name: "InvalidSerializableTransactionError"
25
+ });
26
+ }
27
+ }
28
+ class d extends t {
29
+ constructor({ storageKey: r }) {
30
+ super(`Size for storage key "${r}" is invalid. Expected 32 bytes. Got ${Math.floor((r.length - 2) / 2)} bytes.`, { name: "InvalidStorageKeySizeError" });
8
31
  }
9
- return c === "bytes" ? n : n.map((o) => y(o));
10
32
  }
11
33
  export {
12
- h as blobsToProofs
34
+ c as InvalidSerializableTransactionError,
35
+ d as InvalidStorageKeySizeError,
36
+ o as prettyPrint
13
37
  };
@@ -1,14 +1,81 @@
1
- import { commitmentToVersionedHash as i } from "./index.web119.js";
2
- function r(o) {
3
- const { commitments: t, version: n } = o, e = o.to ?? (typeof t[0] == "string" ? "hex" : "bytes"), s = [];
4
- for (const m of t)
5
- s.push(i({
6
- commitment: m,
7
- to: e,
8
- version: n
9
- }));
10
- return s;
1
+ import { versionedHashVersionKzg as c } from "./index.web97.js";
2
+ import { maxUint256 as m } from "./index.web98.js";
3
+ import { InvalidAddressError as s } from "./index.web99.js";
4
+ import { BaseError as h } from "./index.web87.js";
5
+ import { EmptyBlobError as P, InvalidVersionedHashSizeError as p, InvalidVersionedHashVersionError as x } from "./index.web100.js";
6
+ import { InvalidChainIdError as n } from "./index.web101.js";
7
+ import { FeeCapTooHighError as w, TipAboveFeeCapError as E } from "./index.web102.js";
8
+ import { isAddress as f } from "./index.web78.js";
9
+ import { size as F } from "./index.web83.js";
10
+ import { slice as I } from "./index.web84.js";
11
+ import { hexToNumber as G } from "./index.web89.js";
12
+ function C(t) {
13
+ const { authorizationList: e } = t;
14
+ if (e)
15
+ for (const o of e) {
16
+ const { chainId: r } = o, i = o.address;
17
+ if (!f(i))
18
+ throw new s({ address: i });
19
+ if (r < 0)
20
+ throw new n({ chainId: r });
21
+ }
22
+ d(t);
23
+ }
24
+ function L(t) {
25
+ const { blobVersionedHashes: e } = t;
26
+ if (e) {
27
+ if (e.length === 0)
28
+ throw new P();
29
+ for (const o of e) {
30
+ const r = F(o), i = G(I(o, 0, 1));
31
+ if (r !== 32)
32
+ throw new p({ hash: o, size: r });
33
+ if (i !== c)
34
+ throw new x({
35
+ hash: o,
36
+ version: i
37
+ });
38
+ }
39
+ }
40
+ d(t);
41
+ }
42
+ function d(t) {
43
+ const { chainId: e, maxPriorityFeePerGas: o, maxFeePerGas: r, to: i } = t;
44
+ if (e <= 0)
45
+ throw new n({ chainId: e });
46
+ if (i && !f(i))
47
+ throw new s({ address: i });
48
+ if (r && r > m)
49
+ throw new w({ maxFeePerGas: r });
50
+ if (o && r && o > r)
51
+ throw new E({ maxFeePerGas: r, maxPriorityFeePerGas: o });
52
+ }
53
+ function B(t) {
54
+ const { chainId: e, maxPriorityFeePerGas: o, gasPrice: r, maxFeePerGas: i, to: a } = t;
55
+ if (e <= 0)
56
+ throw new n({ chainId: e });
57
+ if (a && !f(a))
58
+ throw new s({ address: a });
59
+ if (o || i)
60
+ throw new h("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");
61
+ if (r && r > m)
62
+ throw new w({ maxFeePerGas: r });
63
+ }
64
+ function K(t) {
65
+ const { chainId: e, maxPriorityFeePerGas: o, gasPrice: r, maxFeePerGas: i, to: a } = t;
66
+ if (a && !f(a))
67
+ throw new s({ address: a });
68
+ if (typeof e < "u" && e <= 0)
69
+ throw new n({ chainId: e });
70
+ if (o || i)
71
+ throw new h("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");
72
+ if (r && r > m)
73
+ throw new w({ maxFeePerGas: r });
11
74
  }
12
75
  export {
13
- r as commitmentsToVersionedHashes
76
+ d as assertTransactionEIP1559,
77
+ B as assertTransactionEIP2930,
78
+ L as assertTransactionEIP4844,
79
+ C as assertTransactionEIP7702,
80
+ K as assertTransactionLegacy
14
81
  };
@@ -1,16 +1,4 @@
1
- import { blobsToCommitments as f } from "./index.web94.js";
2
- import { blobsToProofs as l } from "./index.web95.js";
3
- import { toBlobs as p } from "./index.web118.js";
4
- function k(t) {
5
- const { data: i, kzg: n, to: m } = t, s = t.blobs ?? p({ data: i, to: m }), b = t.commitments ?? f({ blobs: s, kzg: n, to: m }), r = t.proofs ?? l({ blobs: s, commitments: b, kzg: n, to: m }), c = [];
6
- for (let o = 0; o < s.length; o++)
7
- c.push({
8
- blob: s[o],
9
- commitment: b[o],
10
- proof: r[o]
11
- });
12
- return c;
13
- }
1
+ const e = 1;
14
2
  export {
15
- k as toBlobSidecars
3
+ e as versionedHashVersionKzg
16
4
  };
@@ -1,21 +1,4 @@
1
- import { InvalidAddressError as s } from "./index.web90.js";
2
- import { InvalidStorageKeySizeError as l } from "./index.web86.js";
3
- import { isAddress as f } from "./index.web69.js";
4
- function a(r) {
5
- if (!r || r.length === 0)
6
- return [];
7
- const n = [];
8
- for (let o = 0; o < r.length; o++) {
9
- const { address: i, storageKeys: e } = r[o];
10
- for (let t = 0; t < e.length; t++)
11
- if (e[t].length - 2 !== 64)
12
- throw new l({ storageKey: e[t] });
13
- if (!f(i, { strict: !1 }))
14
- throw new s({ address: i });
15
- n.push([i, e]);
16
- }
17
- return n;
18
- }
1
+ const n = 2n ** 256n - 1n;
19
2
  export {
20
- a as serializeAccessList
3
+ n as maxUint256
21
4
  };
@@ -1,8 +1,15 @@
1
- import { gweiUnits as i } from "./index.web100.js";
2
- import { formatUnits as o } from "./index.web101.js";
3
- function f(r, t = "wei") {
4
- return o(r, i[t]);
1
+ import { BaseError as r } from "./index.web87.js";
2
+ class d extends r {
3
+ constructor({ address: s }) {
4
+ super(`Address "${s}" is invalid.`, {
5
+ metaMessages: [
6
+ "- Address must be a hex value of 20 bytes (40 hex characters).",
7
+ "- Address must match its checksum counterpart."
8
+ ],
9
+ name: "InvalidAddressError"
10
+ });
11
+ }
5
12
  }
6
13
  export {
7
- f as formatGwei
14
+ d as InvalidAddressError
8
15
  };
@@ -1,4 +1,4 @@
1
- import { EndUser, MFAMethods } from '@coinbase/cdp-api-client';
1
+ import { EndUser, EndUserEvmAccount, EndUserEvmSmartAccount, EndUserSolanaAccount, MFAMethods } from '@coinbase/cdp-api-client';
2
2
  import { AuthState } from './types.js';
3
3
  import { AuthenticationMethods } from '../types.js';
4
4
  export declare const toAuthStateUser: (endUser: EndUser) => {
@@ -6,6 +6,9 @@ export declare const toAuthStateUser: (endUser: EndUser) => {
6
6
  evmAccounts: `0x${string}`[];
7
7
  evmSmartAccounts: `0x${string}`[];
8
8
  solanaAccounts: string[];
9
+ evmAccountObjects: EndUserEvmAccount[] | undefined;
10
+ evmSmartAccountObjects: EndUserEvmSmartAccount[] | undefined;
11
+ solanaAccountObjects: EndUserSolanaAccount[] | undefined;
9
12
  authenticationMethods: AuthenticationMethods;
10
13
  mfaMethods: MFAMethods | undefined;
11
14
  };
@@ -1,9 +1,5 @@
1
1
  import { AuthState } from '../auth/types.js';
2
2
  import { User } from '../types.js';
3
- export declare function validateUserCanCreateAccount(user: User | null, authState: AuthState | null, accountType: "eoa" | "smart" | "solana"): {
4
- user: User;
5
- authState: AuthState;
6
- };
7
3
  export declare function validateUserAuthState(user: User | null, authState: AuthState | null): {
8
4
  user: User;
9
5
  authState: AuthState;
@@ -1,6 +1,6 @@
1
- import { SendEvmTransactionWithEndUserAccountBodyNetwork, SendSolanaTransactionWithEndUserAccountBodyNetwork, APIError, APIErrorType, ErrorType, HttpErrorType, EvmUserOperation, OAuth2ProviderType, OAuth2Authentication, MFAMethods } from '@coinbase/cdp-api-client';
1
+ import { SendEvmTransactionWithEndUserAccountBodyNetwork, SendSolanaTransactionWithEndUserAccountBodyNetwork, APIError, APIErrorType, ErrorType, HttpErrorType, EvmUserOperation, OAuth2ProviderType, OAuth2Authentication, MFAMethods, EndUserEvmAccount, EndUserSolanaAccount, EndUserEvmSmartAccount } from '@coinbase/cdp-api-client';
2
2
  import { TransactionSerializableEIP1559 } from 'viem';
3
- export { APIError, type APIErrorType, ErrorType, HttpErrorType, SendEvmTransactionWithEndUserAccountBodyNetwork, SendSolanaTransactionWithEndUserAccountBodyNetwork, OAuth2ProviderType, };
3
+ export { APIError, type APIErrorType, ErrorType, HttpErrorType, SendEvmTransactionWithEndUserAccountBodyNetwork, SendSolanaTransactionWithEndUserAccountBodyNetwork, OAuth2ProviderType, type EndUserEvmAccount, type EndUserSolanaAccount, type EndUserEvmSmartAccount, };
4
4
  export declare class CustomAuthError extends Error {
5
5
  constructor(message: string);
6
6
  }
@@ -51,6 +51,9 @@ export type User = {
51
51
  evmAccounts?: EvmAddress[];
52
52
  evmSmartAccounts?: EvmAddress[];
53
53
  solanaAccounts?: SolanaAddress[];
54
+ evmAccountObjects?: EndUserEvmAccount[];
55
+ evmSmartAccountObjects?: EndUserEvmSmartAccount[];
56
+ solanaAccountObjects?: EndUserSolanaAccount[];
54
57
  mfaMethods?: MFAMethods;
55
58
  };
56
59
  export type EmailAuthentication = {
@@ -1 +1 @@
1
- export declare const VERSION = "0.0.70";
1
+ export declare const VERSION = "0.0.71";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cdp-core",
3
- "version": "0.0.70",
3
+ "version": "0.0.71",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist/**",
@@ -29,7 +29,7 @@
29
29
  "ox": "0.8.1",
30
30
  "viem": "^2.33.0",
31
31
  "zustand": "^5.0.6",
32
- "@coinbase/cdp-api-client": "^0.0.70"
32
+ "@coinbase/cdp-api-client": "^0.0.71"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "@react-native-async-storage/async-storage": "^2.0.0",