@coinbase/cdp-core 0.0.112 → 0.0.114

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 (413) hide show
  1. package/dist/esm/index.web107.js +3 -3
  2. package/dist/esm/index.web110.js +2 -2
  3. package/dist/esm/index.web126.js +11 -11
  4. package/dist/esm/index.web127.js +3 -3
  5. package/dist/esm/index.web128.js +12 -12
  6. package/dist/esm/index.web129.js +12 -12
  7. package/dist/esm/index.web130.js +2 -19
  8. package/dist/esm/index.web131.js +63 -20
  9. package/dist/esm/index.web132.js +351 -37
  10. package/dist/esm/index.web133.js +19 -2
  11. package/dist/esm/index.web134.js +20 -63
  12. package/dist/esm/index.web135.js +37 -351
  13. package/dist/esm/index.web136.js +11 -943
  14. package/dist/esm/index.web137.js +12 -2
  15. package/dist/esm/index.web138.js +944 -49
  16. package/dist/esm/index.web139.js +2 -27
  17. package/dist/esm/index.web140.js +45 -50
  18. package/dist/esm/index.web141.js +26 -10
  19. package/dist/esm/index.web142.js +15 -2
  20. package/dist/esm/index.web143.js +28 -44
  21. package/dist/esm/index.web144.js +7 -13
  22. package/dist/esm/index.web145.js +3 -12
  23. package/dist/esm/index.web146.js +28 -11
  24. package/dist/esm/index.web147.js +8 -4
  25. package/dist/esm/index.web148.js +8 -5
  26. package/dist/esm/index.web149.js +78 -45
  27. package/dist/esm/index.web150.js +18 -4
  28. package/dist/esm/index.web151.js +3 -28
  29. package/dist/esm/index.web152.js +15 -7
  30. package/dist/esm/index.web153.js +4 -3
  31. package/dist/esm/index.web154.js +5 -19
  32. package/dist/esm/index.web155.js +19 -8
  33. package/dist/esm/index.web156.js +61 -7
  34. package/dist/esm/index.web157.js +16 -79
  35. package/dist/esm/index.web158.js +19 -24
  36. package/dist/esm/index.web159.js +8 -3
  37. package/dist/esm/index.web160.js +33 -6
  38. package/dist/esm/index.web161.js +7 -4
  39. package/dist/esm/index.web162.js +20 -14
  40. package/dist/esm/index.web163.js +5 -20
  41. package/dist/esm/index.web164.js +42 -56
  42. package/dist/esm/index.web165.js +4 -17
  43. package/dist/esm/index.web166.js +53 -22
  44. package/dist/esm/index.web167.js +10 -8
  45. package/dist/esm/index.web168.js +2 -43
  46. package/dist/esm/index.web169.js +45 -8
  47. package/dist/esm/index.web170.js +13 -20
  48. package/dist/esm/index.web171.js +104 -2
  49. package/dist/esm/index.web172.js +79 -2
  50. package/dist/esm/index.web173.js +78 -13
  51. package/dist/esm/index.web174.js +20 -54
  52. package/dist/esm/index.web175.js +32 -6
  53. package/dist/esm/index.web176.js +10 -19
  54. package/dist/esm/index.web177.js +4 -17
  55. package/dist/esm/index.web178.js +49 -39
  56. package/dist/esm/index.web179.js +55 -3
  57. package/dist/esm/index.web181.js +1 -1
  58. package/dist/esm/index.web182.js +43 -10
  59. package/dist/esm/index.web183.js +13 -4
  60. package/dist/esm/index.web184.js +6 -28
  61. package/dist/esm/index.web185.js +104 -6
  62. package/dist/esm/index.web186.js +17 -32
  63. package/dist/esm/index.web187.js +8 -12
  64. package/dist/esm/index.web188.js +9 -54
  65. package/dist/esm/index.web189.js +11 -42
  66. package/dist/esm/index.web190.js +13 -127
  67. package/dist/esm/index.web191.js +3 -104
  68. package/dist/esm/index.web192.js +6 -6
  69. package/dist/esm/index.web193.js +43 -3
  70. package/dist/esm/index.web194.js +11 -11
  71. package/dist/esm/index.web195.js +15 -2
  72. package/dist/esm/index.web196.js +19 -2
  73. package/dist/esm/index.web197.js +9 -34
  74. package/dist/esm/index.web198.js +28 -6
  75. package/dist/esm/index.web199.js +126 -33
  76. package/dist/esm/index.web2.js +2 -2
  77. package/dist/esm/index.web200.js +6 -14
  78. package/dist/esm/index.web201.js +3 -35
  79. package/dist/esm/index.web202.js +2 -19
  80. package/dist/esm/index.web203.js +2 -9
  81. package/dist/esm/index.web204.js +36 -9
  82. package/dist/esm/index.web205.js +6 -11
  83. package/dist/esm/index.web206.js +33 -12
  84. package/dist/esm/index.web207.js +34 -5
  85. package/dist/esm/index.web208.js +6 -5
  86. package/dist/esm/index.web209.js +5 -11
  87. package/dist/esm/index.web210.js +10 -20
  88. package/dist/esm/index.web211.js +2 -10
  89. package/dist/esm/index.web212.js +2 -20
  90. package/dist/esm/index.web213.js +2 -94
  91. package/dist/esm/index.web214.js +109 -21
  92. package/dist/esm/index.web215.js +2 -118
  93. package/dist/esm/index.web216.js +43 -100
  94. package/dist/esm/index.web217.js +7 -78
  95. package/dist/esm/index.web218.js +2 -79
  96. package/dist/esm/index.web219.js +361 -2
  97. package/dist/esm/index.web220.js +849 -105
  98. package/dist/esm/index.web221.js +39 -2
  99. package/dist/esm/index.web222.js +2 -8
  100. package/dist/esm/index.web223.js +70 -2
  101. package/dist/esm/index.web224.js +30 -364
  102. package/dist/esm/index.web225.js +14 -826
  103. package/dist/esm/index.web226.js +20 -38
  104. package/dist/esm/index.web227.js +10 -2
  105. package/dist/esm/index.web228.js +20 -70
  106. package/dist/esm/index.web229.js +93 -34
  107. package/dist/esm/index.web230.js +20 -14
  108. package/dist/esm/index.web231.js +115 -18
  109. package/dist/esm/index.web232.js +20 -2
  110. package/dist/esm/index.web233.js +2 -20
  111. package/dist/esm/index.web234.js +6 -32
  112. package/dist/esm/index.web235.js +32 -6
  113. package/dist/esm/index.web236.js +14 -40
  114. package/dist/esm/index.web238.js +2 -18
  115. package/dist/esm/index.web239.js +2 -28
  116. package/dist/esm/index.web240.js +2 -8
  117. package/dist/esm/index.web241.js +18 -11
  118. package/dist/esm/index.web242.js +28 -13
  119. package/dist/esm/index.web243.js +8 -10
  120. package/dist/esm/index.web244.js +11 -17
  121. package/dist/esm/index.web245.js +12 -80
  122. package/dist/esm/index.web246.js +10 -2
  123. package/dist/esm/index.web247.js +17 -2
  124. package/dist/esm/index.web248.js +81 -2
  125. package/dist/esm/index.web250.js +14 -78
  126. package/dist/esm/index.web251.js +78 -14
  127. package/dist/esm/index.web3.js +1 -1
  128. package/dist/esm/index.web36.js +8 -7
  129. package/dist/esm/index.web53.js +40 -35
  130. package/dist/esm/index.web69.js +52 -48
  131. package/dist/esm/index.web87.js +21 -21
  132. package/dist/esm/index.web9.js +1 -1
  133. package/dist/esm/index.web91.js +55 -49
  134. package/dist/esm/index.web97.js +19 -11
  135. package/dist/esm/index.web99.js +1 -1
  136. package/dist/native/index.native101.js +1 -1
  137. package/dist/native/index.native109.js +3 -3
  138. package/dist/native/index.native11.js +1 -1
  139. package/dist/native/index.native112.js +2 -2
  140. package/dist/native/index.native116.js +1 -1
  141. package/dist/native/index.native128.js +12 -12
  142. package/dist/native/index.native129.js +16 -89
  143. package/dist/native/index.native130.js +21 -15
  144. package/dist/native/index.native131.js +49 -21
  145. package/dist/native/index.native132.js +363 -37
  146. package/dist/native/index.native133.js +2 -379
  147. package/dist/native/index.native134.js +68 -2
  148. package/dist/native/index.native135.js +336 -37
  149. package/dist/native/index.native136.js +87 -362
  150. package/dist/native/index.native137.js +12 -12
  151. package/dist/native/index.native138.js +12 -12
  152. package/dist/native/index.native139.js +944 -54
  153. package/dist/native/index.native140.js +2 -11
  154. package/dist/native/index.native141.js +50 -2
  155. package/dist/native/index.native142.js +27 -45
  156. package/dist/native/index.native143.js +54 -13
  157. package/dist/native/index.native144.js +10 -4
  158. package/dist/native/index.native145.js +2 -945
  159. package/dist/native/index.native146.js +45 -2
  160. package/dist/native/index.native147.js +13 -49
  161. package/dist/native/index.native148.js +4 -26
  162. package/dist/native/index.native149.js +5 -35
  163. package/dist/native/index.native150.js +40 -60
  164. package/dist/native/index.native151.js +35 -13
  165. package/dist/native/index.native152.js +67 -11
  166. package/dist/native/index.native153.js +14 -5
  167. package/dist/native/index.native154.js +24 -44
  168. package/dist/native/index.native155.js +7 -13
  169. package/dist/native/index.native156.js +3 -55
  170. package/dist/native/index.native157.js +27 -6
  171. package/dist/native/index.native158.js +8 -21
  172. package/dist/native/index.native159.js +7 -17
  173. package/dist/native/index.native160.js +78 -44
  174. package/dist/native/index.native161.js +27 -3
  175. package/dist/native/index.native162.js +3 -3
  176. package/dist/native/index.native163.js +14 -34
  177. package/dist/native/index.native164.js +4 -12
  178. package/dist/native/index.native165.js +13 -4
  179. package/dist/native/index.native166.js +18 -27
  180. package/dist/native/index.native167.js +60 -6
  181. package/dist/native/index.native168.js +17 -32
  182. package/dist/native/index.native169.js +21 -10
  183. package/dist/native/index.native170.js +8 -55
  184. package/dist/native/index.native171.js +40 -41
  185. package/dist/native/index.native172.js +7 -127
  186. package/dist/native/index.native173.js +19 -103
  187. package/dist/native/index.native174.js +12 -6
  188. package/dist/native/index.native175.js +12 -3
  189. package/dist/native/index.native176.js +13 -78
  190. package/dist/native/index.native177.js +56 -2
  191. package/dist/native/index.native178.js +7 -2
  192. package/dist/native/index.native179.js +18 -34
  193. package/dist/native/index.native180.js +16 -5
  194. package/dist/native/index.native181.js +42 -31
  195. package/dist/native/index.native182.js +3 -14
  196. package/dist/native/index.native183.js +3 -34
  197. package/dist/native/index.native184.js +33 -17
  198. package/dist/native/index.native185.js +12 -8
  199. package/dist/native/index.native186.js +4 -10
  200. package/dist/native/index.native187.js +28 -11
  201. package/dist/native/index.native188.js +6 -13
  202. package/dist/native/index.native189.js +32 -5
  203. package/dist/native/index.native190.js +13 -5
  204. package/dist/native/index.native191.js +55 -10
  205. package/dist/native/index.native192.js +43 -2
  206. package/dist/native/index.native193.js +128 -2
  207. package/dist/native/index.native194.js +104 -13
  208. package/dist/native/index.native195.js +6 -27
  209. package/dist/native/index.native196.js +3 -8
  210. package/dist/native/index.native197.js +78 -3
  211. package/dist/native/index.native198.js +2 -28
  212. package/dist/native/index.native199.js +2 -9
  213. package/dist/native/index.native2.js +2 -2
  214. package/dist/native/index.native200.js +37 -7
  215. package/dist/native/index.native201.js +6 -79
  216. package/dist/native/index.native202.js +32 -25
  217. package/dist/native/index.native203.js +14 -3
  218. package/dist/native/index.native204.js +34 -14
  219. package/dist/native/index.native205.js +18 -4
  220. package/dist/native/index.native206.js +8 -13
  221. package/dist/native/index.native207.js +9 -18
  222. package/dist/native/index.native208.js +11 -60
  223. package/dist/native/index.native209.js +13 -17
  224. package/dist/native/index.native210.js +5 -23
  225. package/dist/native/index.native211.js +5 -9
  226. package/dist/native/index.native212.js +10 -41
  227. package/dist/native/index.native213.js +2 -8
  228. package/dist/native/index.native214.js +2 -21
  229. package/dist/native/index.native215.js +2 -2
  230. package/dist/native/index.native216.js +3 -3
  231. package/dist/native/index.native218.js +3 -3
  232. package/dist/native/index.native219.js +1 -1
  233. package/dist/native/index.native220.js +3 -3
  234. package/dist/native/index.native224.js +38 -103
  235. package/dist/native/index.native225.js +2 -79
  236. package/dist/native/index.native226.js +69 -78
  237. package/dist/native/index.native227.js +34 -7
  238. package/dist/native/index.native228.js +15 -2
  239. package/dist/native/index.native229.js +7 -368
  240. package/dist/native/index.native230.js +2 -827
  241. package/dist/native/index.native231.js +357 -35
  242. package/dist/native/index.native232.js +853 -2
  243. package/dist/native/index.native233.js +103 -69
  244. package/dist/native/index.native234.js +76 -32
  245. package/dist/native/index.native235.js +78 -14
  246. package/dist/native/index.native236.js +1 -1
  247. package/dist/native/index.native239.js +5 -5
  248. package/dist/native/index.native240.js +2 -2
  249. package/dist/native/index.native241.js +45 -16
  250. package/dist/native/index.native242.js +18 -28
  251. package/dist/native/index.native243.js +26 -6
  252. package/dist/native/index.native244.js +6 -9
  253. package/dist/native/index.native245.js +11 -13
  254. package/dist/native/index.native246.js +11 -8
  255. package/dist/native/index.native247.js +7 -14
  256. package/dist/native/index.native248.js +16 -80
  257. package/dist/native/index.native249.js +80 -3
  258. package/dist/native/index.native250.js +2 -47
  259. package/dist/native/index.native253.js +4 -2
  260. package/dist/native/index.native256.js +1 -1
  261. package/dist/native/index.native3.js +1 -1
  262. package/dist/native/index.native38.js +8 -7
  263. package/dist/native/index.native55.js +40 -35
  264. package/dist/native/index.native71.js +52 -48
  265. package/dist/native/index.native86.js +1 -1
  266. package/dist/native/index.native89.js +23 -23
  267. package/dist/native/index.native93.js +55 -49
  268. package/dist/native/index.native99.js +19 -11
  269. package/dist/native-types/actions/sendUserOperation.d.ts +1 -0
  270. package/dist/native-types/types.d.ts +4 -2
  271. package/dist/native-types/version.d.ts +1 -1
  272. package/dist/types/actions/sendUserOperation.d.ts +1 -0
  273. package/dist/types/types.d.ts +4 -2
  274. package/dist/types/version.d.ts +1 -1
  275. package/dist/web/index.web107.js +3 -3
  276. package/dist/web/index.web110.js +2 -2
  277. package/dist/web/index.web126.js +11 -11
  278. package/dist/web/index.web127.js +3 -3
  279. package/dist/web/index.web128.js +12 -12
  280. package/dist/web/index.web129.js +12 -12
  281. package/dist/web/index.web130.js +2 -19
  282. package/dist/web/index.web131.js +63 -20
  283. package/dist/web/index.web132.js +351 -37
  284. package/dist/web/index.web133.js +19 -2
  285. package/dist/web/index.web134.js +20 -63
  286. package/dist/web/index.web135.js +37 -351
  287. package/dist/web/index.web136.js +11 -943
  288. package/dist/web/index.web137.js +12 -2
  289. package/dist/web/index.web138.js +944 -49
  290. package/dist/web/index.web139.js +2 -27
  291. package/dist/web/index.web140.js +45 -50
  292. package/dist/web/index.web141.js +26 -10
  293. package/dist/web/index.web142.js +15 -2
  294. package/dist/web/index.web143.js +28 -44
  295. package/dist/web/index.web144.js +7 -13
  296. package/dist/web/index.web145.js +3 -12
  297. package/dist/web/index.web146.js +28 -11
  298. package/dist/web/index.web147.js +8 -4
  299. package/dist/web/index.web148.js +8 -5
  300. package/dist/web/index.web149.js +78 -45
  301. package/dist/web/index.web150.js +18 -4
  302. package/dist/web/index.web151.js +3 -28
  303. package/dist/web/index.web152.js +15 -7
  304. package/dist/web/index.web153.js +4 -3
  305. package/dist/web/index.web154.js +5 -19
  306. package/dist/web/index.web155.js +19 -8
  307. package/dist/web/index.web156.js +61 -7
  308. package/dist/web/index.web157.js +16 -79
  309. package/dist/web/index.web158.js +19 -24
  310. package/dist/web/index.web159.js +8 -3
  311. package/dist/web/index.web160.js +33 -6
  312. package/dist/web/index.web161.js +7 -4
  313. package/dist/web/index.web162.js +20 -14
  314. package/dist/web/index.web163.js +5 -20
  315. package/dist/web/index.web164.js +42 -56
  316. package/dist/web/index.web165.js +4 -17
  317. package/dist/web/index.web166.js +53 -22
  318. package/dist/web/index.web167.js +10 -8
  319. package/dist/web/index.web168.js +2 -43
  320. package/dist/web/index.web169.js +45 -8
  321. package/dist/web/index.web170.js +13 -20
  322. package/dist/web/index.web171.js +104 -2
  323. package/dist/web/index.web172.js +79 -2
  324. package/dist/web/index.web173.js +78 -13
  325. package/dist/web/index.web174.js +20 -54
  326. package/dist/web/index.web175.js +32 -6
  327. package/dist/web/index.web176.js +10 -19
  328. package/dist/web/index.web177.js +4 -17
  329. package/dist/web/index.web178.js +49 -39
  330. package/dist/web/index.web179.js +55 -3
  331. package/dist/web/index.web181.js +1 -1
  332. package/dist/web/index.web182.js +43 -10
  333. package/dist/web/index.web183.js +13 -4
  334. package/dist/web/index.web184.js +6 -28
  335. package/dist/web/index.web185.js +104 -6
  336. package/dist/web/index.web186.js +17 -32
  337. package/dist/web/index.web187.js +8 -12
  338. package/dist/web/index.web188.js +9 -54
  339. package/dist/web/index.web189.js +11 -42
  340. package/dist/web/index.web190.js +13 -127
  341. package/dist/web/index.web191.js +3 -104
  342. package/dist/web/index.web192.js +6 -6
  343. package/dist/web/index.web193.js +43 -3
  344. package/dist/web/index.web194.js +11 -11
  345. package/dist/web/index.web195.js +15 -2
  346. package/dist/web/index.web196.js +19 -2
  347. package/dist/web/index.web197.js +9 -34
  348. package/dist/web/index.web198.js +28 -6
  349. package/dist/web/index.web199.js +126 -33
  350. package/dist/web/index.web2.js +2 -2
  351. package/dist/web/index.web200.js +6 -14
  352. package/dist/web/index.web201.js +3 -35
  353. package/dist/web/index.web202.js +2 -19
  354. package/dist/web/index.web203.js +2 -9
  355. package/dist/web/index.web204.js +36 -9
  356. package/dist/web/index.web205.js +6 -11
  357. package/dist/web/index.web206.js +33 -12
  358. package/dist/web/index.web207.js +34 -5
  359. package/dist/web/index.web208.js +6 -5
  360. package/dist/web/index.web209.js +5 -11
  361. package/dist/web/index.web210.js +10 -20
  362. package/dist/web/index.web211.js +2 -10
  363. package/dist/web/index.web212.js +2 -20
  364. package/dist/web/index.web213.js +2 -94
  365. package/dist/web/index.web214.js +109 -21
  366. package/dist/web/index.web215.js +2 -118
  367. package/dist/web/index.web216.js +43 -100
  368. package/dist/web/index.web217.js +7 -78
  369. package/dist/web/index.web218.js +2 -79
  370. package/dist/web/index.web219.js +361 -2
  371. package/dist/web/index.web220.js +849 -105
  372. package/dist/web/index.web221.js +39 -2
  373. package/dist/web/index.web222.js +2 -8
  374. package/dist/web/index.web223.js +70 -2
  375. package/dist/web/index.web224.js +30 -364
  376. package/dist/web/index.web225.js +14 -826
  377. package/dist/web/index.web226.js +20 -38
  378. package/dist/web/index.web227.js +10 -2
  379. package/dist/web/index.web228.js +20 -70
  380. package/dist/web/index.web229.js +93 -34
  381. package/dist/web/index.web230.js +20 -14
  382. package/dist/web/index.web231.js +115 -18
  383. package/dist/web/index.web232.js +20 -2
  384. package/dist/web/index.web233.js +2 -20
  385. package/dist/web/index.web234.js +6 -32
  386. package/dist/web/index.web235.js +32 -6
  387. package/dist/web/index.web236.js +14 -40
  388. package/dist/web/index.web238.js +2 -18
  389. package/dist/web/index.web239.js +2 -28
  390. package/dist/web/index.web240.js +2 -8
  391. package/dist/web/index.web241.js +18 -11
  392. package/dist/web/index.web242.js +28 -13
  393. package/dist/web/index.web243.js +8 -10
  394. package/dist/web/index.web244.js +11 -17
  395. package/dist/web/index.web245.js +12 -80
  396. package/dist/web/index.web246.js +10 -2
  397. package/dist/web/index.web247.js +17 -2
  398. package/dist/web/index.web248.js +81 -2
  399. package/dist/web/index.web250.js +14 -78
  400. package/dist/web/index.web251.js +78 -14
  401. package/dist/web/index.web3.js +1 -1
  402. package/dist/web/index.web36.js +8 -7
  403. package/dist/web/index.web53.js +40 -35
  404. package/dist/web/index.web69.js +52 -48
  405. package/dist/web/index.web87.js +21 -21
  406. package/dist/web/index.web9.js +1 -1
  407. package/dist/web/index.web91.js +55 -49
  408. package/dist/web/index.web97.js +19 -11
  409. package/dist/web/index.web99.js +1 -1
  410. package/dist/web-types/actions/sendUserOperation.d.ts +1 -0
  411. package/dist/web-types/types.d.ts +4 -2
  412. package/dist/web-types/version.d.ts +1 -1
  413. package/package.json +2 -2
@@ -1,17 +1,81 @@
1
- import { SizeExceedsPaddingSizeError as a } from "./index.web236.js";
2
- function o(r, i = {}) {
3
- const { dir: n, size: e = 32 } = i;
4
- if (e === 0)
5
- return r;
6
- const t = r.replace("0x", "");
7
- if (t.length > e * 2)
8
- throw new a({
9
- size: Math.ceil(t.length / 2),
10
- targetSize: e,
11
- type: "Hex"
12
- });
13
- return `0x${t[n === "right" ? "padEnd" : "padStart"](e * 2, "0")}`;
1
+ function r(t, e = "algorithm.name") {
2
+ return new TypeError(`CryptoKey does not support this operation, its ${e} must be ${t}`);
3
+ }
4
+ function o(t, e) {
5
+ return t.name === e;
6
+ }
7
+ function c(t) {
8
+ return parseInt(t.name.slice(4), 10);
9
+ }
10
+ function h(t) {
11
+ switch (t) {
12
+ case "ES256":
13
+ return "P-256";
14
+ case "ES384":
15
+ return "P-384";
16
+ case "ES512":
17
+ return "P-521";
18
+ default:
19
+ throw new Error("unreachable");
20
+ }
21
+ }
22
+ function i(t, e) {
23
+ if (!t.usages.includes(e))
24
+ throw new TypeError(`CryptoKey does not support this operation, its usages must include ${e}.`);
25
+ }
26
+ function u(t, e, n) {
27
+ switch (e) {
28
+ case "HS256":
29
+ case "HS384":
30
+ case "HS512": {
31
+ if (!o(t.algorithm, "HMAC"))
32
+ throw r("HMAC");
33
+ const a = parseInt(e.slice(2), 10);
34
+ if (c(t.algorithm.hash) !== a)
35
+ throw r(`SHA-${a}`, "algorithm.hash");
36
+ break;
37
+ }
38
+ case "RS256":
39
+ case "RS384":
40
+ case "RS512": {
41
+ if (!o(t.algorithm, "RSASSA-PKCS1-v1_5"))
42
+ throw r("RSASSA-PKCS1-v1_5");
43
+ const a = parseInt(e.slice(2), 10);
44
+ if (c(t.algorithm.hash) !== a)
45
+ throw r(`SHA-${a}`, "algorithm.hash");
46
+ break;
47
+ }
48
+ case "PS256":
49
+ case "PS384":
50
+ case "PS512": {
51
+ if (!o(t.algorithm, "RSA-PSS"))
52
+ throw r("RSA-PSS");
53
+ const a = parseInt(e.slice(2), 10);
54
+ if (c(t.algorithm.hash) !== a)
55
+ throw r(`SHA-${a}`, "algorithm.hash");
56
+ break;
57
+ }
58
+ case "Ed25519":
59
+ case "EdDSA": {
60
+ if (!o(t.algorithm, "Ed25519"))
61
+ throw r("Ed25519");
62
+ break;
63
+ }
64
+ case "ES256":
65
+ case "ES384":
66
+ case "ES512": {
67
+ if (!o(t.algorithm, "ECDSA"))
68
+ throw r("ECDSA");
69
+ const a = h(e);
70
+ if (t.algorithm.namedCurve !== a)
71
+ throw r(a, "algorithm.namedCurve");
72
+ break;
73
+ }
74
+ default:
75
+ throw new TypeError("CryptoKey does not support this operation");
76
+ }
77
+ i(t, n);
14
78
  }
15
79
  export {
16
- o as pad
80
+ u as checkSigCryptoKey
17
81
  };
@@ -1,2 +1,2 @@
1
- import { __require as r } from "./index.web222.js";
1
+ import { __require as r } from "./index.web217.js";
2
2
  r();
@@ -1,10 +1,10 @@
1
- import { sendUserOperationWithEndUserAccount as m } from "@coinbase/cdp-api-client";
1
+ import { sendUserOperationWithEndUserAccount as o } from "@coinbase/cdp-api-client";
2
2
  import { Analytics as s } from "./index.web2.js";
3
3
  import "./index.web3.js";
4
4
  import { withAuth as n } from "./index.web97.js";
5
- import { getConfig as t, getCoreAuthManager as i } from "./index.web74.js";
5
+ import { getConfig as t, getCoreAuthManager as p } from "./index.web74.js";
6
6
  import "viem";
7
- import { withMfa as p } from "./index.web82.js";
7
+ import { withMfa as i } from "./index.web82.js";
8
8
  import "jose";
9
9
  import "./index.web98.js";
10
10
  import "./index.web99.js";
@@ -13,9 +13,9 @@ import "bs58";
13
13
  import "./index.web93.js";
14
14
  const v = async (r) => (s.sendActionCallEvent({ name: "send_user_operation" }), t().useMock ? {
15
15
  userOperationHash: "0x1234567890123456789012345678901234567890123456789012345678901234"
16
- } : p(
17
- () => n(r, i(), async ({ user: a, walletSecretId: o }) => ({
18
- userOperationHash: (await m(
16
+ } : i(
17
+ () => n(r, p(), async ({ user: a, walletSecretId: m }) => ({
18
+ userOperationHash: (await o(
19
19
  a.userId,
20
20
  r.evmSmartAccount,
21
21
  {
@@ -25,9 +25,10 @@ const v = async (r) => (s.sendActionCallEvent({ name: "send_user_operation" }),
25
25
  value: String(e.value ?? 0n),
26
26
  data: e.data ?? "0x"
27
27
  })),
28
- walletSecretId: o,
28
+ walletSecretId: m,
29
29
  useCdpPaymaster: r.useCdpPaymaster ?? !1,
30
30
  paymasterUrl: r.paymasterUrl,
31
+ paymasterContext: r.paymasterContext,
31
32
  dataSuffix: r.dataSuffix
32
33
  },
33
34
  { projectID: t().projectId },
@@ -1,61 +1,66 @@
1
- import { APIError as w, createEndUserEvmSmartAccount as A } from "@coinbase/cdp-api-client";
2
- import { Analytics as h } from "./index.web2.js";
1
+ import { APIError as A, createEndUserEvmSmartAccount as h } from "@coinbase/cdp-api-client";
2
+ import { Analytics as f } from "./index.web2.js";
3
3
  import "./index.web3.js";
4
- import { toAuthStateUser as f } from "./index.web101.js";
5
- import { InternalError as l } from "./index.web88.js";
6
- import { createEvmEoaAccount as S } from "./index.web52.js";
7
- import { validateUserAuthState as E } from "./index.web102.js";
8
- import { getCoreAuthManager as g, getConfig as p } from "./index.web74.js";
9
- async function I(e) {
10
- h.sendActionCallEvent({ name: "create_evm_smart_account" });
11
- const n = g(), { user: t, authState: d } = E(
12
- n.getUser(),
13
- n.getAuthState()
4
+ import { toAuthStateUser as l } from "./index.web101.js";
5
+ import { InternalError as S } from "./index.web88.js";
6
+ import { createEvmEoaAccount as E } from "./index.web52.js";
7
+ import { validateUserAuthState as g } from "./index.web102.js";
8
+ import { getCoreAuthManager as p, getConfig as v } from "./index.web74.js";
9
+ async function M(r) {
10
+ f.sendActionCallEvent({ name: "create_evm_smart_account" });
11
+ const o = p(), { user: t, authState: d } = g(
12
+ o.getUser(),
13
+ o.getAuthState()
14
14
  );
15
- let a;
16
- if (e?.owner) {
17
- if (!t.evmAccountObjects?.some((o) => o.address === e.owner))
18
- throw new Error(`Owner address ${e.owner} does not belong to the current user`);
15
+ let n;
16
+ if (r?.owner) {
17
+ const e = r.owner.toLowerCase();
18
+ if (!t.evmAccountObjects?.some(
19
+ (a) => a.address.toLowerCase() === e
20
+ ))
21
+ throw new Error(`Owner address ${r.owner} does not belong to the current user`);
19
22
  const m = t.evmSmartAccountObjects?.find(
20
- (o) => o.ownerAddresses.includes(e.owner)
23
+ (a) => a.ownerAddresses.some(
24
+ (w) => w.toLowerCase() === e
25
+ )
21
26
  );
22
27
  if (m)
23
28
  throw new Error(
24
- `Owner address ${e.owner} already controls smart account ${m.address}`
29
+ `Owner address ${r.owner} already controls smart account ${m.address}`
25
30
  );
26
- a = e.owner;
31
+ n = r.owner;
27
32
  } else
28
33
  try {
29
- a = await S();
30
- } catch (r) {
31
- throw r instanceof w && r.errorType === "account_limit_exceeded" ? new Error(
34
+ n = await E();
35
+ } catch (e) {
36
+ throw e instanceof A && e.errorType === "account_limit_exceeded" ? new Error(
32
37
  "Cannot create smart account: Maximum number of EOA accounts (10) reached. Please provide an existing EOA address using the 'owner' parameter."
33
- ) : r;
38
+ ) : e;
34
39
  }
35
- const u = await A(
40
+ const i = await h(
36
41
  t.userId,
37
42
  {
38
- owner: a,
39
- enableSpendPermissions: e?.enableSpendPermissions ?? !1
43
+ owner: n,
44
+ enableSpendPermissions: r?.enableSpendPermissions ?? !1
40
45
  },
41
- { projectID: p().projectId },
42
- e?.idempotencyKey
43
- ), s = f(u);
44
- await n.setAuthState({
46
+ { projectID: v().projectId },
47
+ r?.idempotencyKey
48
+ ), s = l(i);
49
+ await o.setAuthState({
45
50
  ...d,
46
51
  user: s
47
52
  });
48
- const i = new Set(
49
- t.evmSmartAccountObjects?.map((r) => r.address) || []
53
+ const u = new Set(
54
+ t.evmSmartAccountObjects?.map((e) => e.address) || []
50
55
  ), c = s.evmSmartAccountObjects?.find(
51
- (r) => !i.has(r.address)
56
+ (e) => !u.has(e.address)
52
57
  )?.address;
53
58
  if (!c)
54
- throw new l(
59
+ throw new S(
55
60
  "EVM Smart Account was not created. Check the network log for more details."
56
61
  );
57
62
  return c;
58
63
  }
59
64
  export {
60
- I as createEvmSmartAccount
65
+ M as createEvmSmartAccount
61
66
  };
@@ -2,50 +2,52 @@ import { Analytics as m } from "./index.web2.js";
2
2
  import "./index.web3.js";
3
3
  import { getCurrentUserSync as u } from "./index.web44.js";
4
4
  import { sendEvmEoaUsdc as l } from "./index.web66.js";
5
- import { sendEvmSmartAccountUsdc as f } from "./index.web67.js";
6
- import { sendSolanaUsdc as w } from "./index.web68.js";
7
- const C = async (t) => {
5
+ import { sendEvmSmartAccountUsdc as w } from "./index.web67.js";
6
+ import { sendSolanaUsdc as f } from "./index.web68.js";
7
+ const $ = async (t) => {
8
8
  m.sendActionCallEvent({ name: "send_usdc" });
9
- const { to: a, amount: o } = t, r = u();
9
+ const { to: o, amount: a } = t, r = u();
10
10
  if (!r)
11
11
  throw new Error("User must be authenticated to send USDC");
12
- const e = "from" in t && t.from ? t.from : v(r), n = t.network, { fromIsSolana: s } = E(e, a);
13
- return A(n, s), y(r, e, s), s ? {
12
+ const e = "from" in t && t.from ? t.from : v(r), s = t.network, { fromIsSolana: n } = E(e, o);
13
+ return A(s, n), y(r, e, n), n ? {
14
14
  type: "solana",
15
- transactionSignature: (await w({
15
+ transactionSignature: (await f({
16
16
  solanaAccount: e,
17
- to: a,
18
- amount: o,
19
- network: n,
17
+ to: o,
18
+ amount: a,
19
+ network: s,
20
20
  createRecipientAta: "createRecipientAta" in t ? t.createRecipientAta : void 0,
21
21
  idempotencyKey: t.idempotencyKey
22
22
  })).transactionSignature,
23
23
  from: e,
24
- network: n
25
- } : r.evmAccountObjects?.some((c) => c.address === e) ? {
24
+ network: s
25
+ } : r.evmAccountObjects?.some(
26
+ (c) => c.address.toLowerCase() === e.toLowerCase()
27
+ ) ? {
26
28
  type: "evm-eoa",
27
29
  transactionHash: (await l({
28
30
  evmAccount: e,
29
- to: a,
30
- amount: o,
31
- network: n,
31
+ to: o,
32
+ amount: a,
33
+ network: s,
32
34
  idempotencyKey: t.idempotencyKey
33
35
  })).transactionHash,
34
36
  from: e,
35
- network: n
37
+ network: s
36
38
  } : {
37
39
  type: "evm-smart",
38
- userOpHash: (await f({
40
+ userOpHash: (await w({
39
41
  evmSmartAccount: e,
40
- to: a,
41
- amount: o,
42
- network: n,
42
+ to: o,
43
+ amount: a,
44
+ network: s,
43
45
  useCdpPaymaster: "useCdpPaymaster" in t ? t.useCdpPaymaster : void 0,
44
46
  paymasterUrl: "paymasterUrl" in t ? t.paymasterUrl : void 0,
45
47
  idempotencyKey: t.idempotencyKey
46
48
  })).userOpHash,
47
49
  from: e,
48
- network: n
50
+ network: s
49
51
  };
50
52
  };
51
53
  function i(t) {
@@ -58,26 +60,26 @@ function h(t) {
58
60
  return t === "solana" || t === "solana-devnet";
59
61
  }
60
62
  function v(t) {
61
- const a = t.solanaAccountObjects?.length || 0, o = t.evmSmartAccountObjects?.length || 0, r = t.evmAccountObjects?.length || 0, e = o > 0 || r > 0, n = a > 0;
62
- if (!e && !n)
63
+ const o = t.solanaAccountObjects?.length || 0, a = t.evmSmartAccountObjects?.length || 0, r = t.evmAccountObjects?.length || 0, e = a > 0 || r > 0, s = o > 0;
64
+ if (!e && !s)
63
65
  throw new Error(
64
66
  "No accounts available. User must have at least one Solana, EVM Smart Account, or EVM Account."
65
67
  );
66
- if (e && n)
68
+ if (e && s)
67
69
  throw new Error(
68
70
  "Multiple account types detected (EVM and Solana). Please specify 'from' address to select which account to send from."
69
71
  );
70
72
  if (e) {
71
- if (o === 1 && r === 1)
73
+ if (a === 1 && r === 1)
72
74
  return t.evmSmartAccountObjects[0].address;
73
- if (r === 1 && o === 0)
75
+ if (r === 1 && a === 0)
74
76
  return t.evmAccountObjects[0].address;
75
77
  throw new Error(
76
78
  "Multiple EVM accounts available. Please specify 'from' address to select which account to send from."
77
79
  );
78
80
  }
79
- if (n) {
80
- if (a === 1)
81
+ if (s) {
82
+ if (o === 1)
81
83
  return t.solanaAccountObjects[0].address;
82
84
  throw new Error(
83
85
  "Multiple Solana accounts available. Please specify 'from' address to select which account to send from."
@@ -85,35 +87,37 @@ function v(t) {
85
87
  }
86
88
  throw new Error("Unable to auto-select account");
87
89
  }
88
- function E(t, a) {
89
- const o = i(t), r = d(t), e = i(a), n = d(a);
90
- if (!o && !r)
90
+ function E(t, o) {
91
+ const a = i(t), r = d(t), e = i(o), s = d(o);
92
+ if (!a && !r)
91
93
  throw new Error(`Invalid 'from' address format: ${t}`);
92
- if (!e && !n)
93
- throw new Error(`Invalid 'to' address format: ${a}`);
94
- if (o !== e)
94
+ if (!e && !s)
95
+ throw new Error(`Invalid 'to' address format: ${o}`);
96
+ if (a !== e)
95
97
  throw new Error(
96
- `Address type mismatch: 'from' is ${o ? "Solana" : "EVM"} but 'to' is ${e ? "Solana" : "EVM"}`
98
+ `Address type mismatch: 'from' is ${a ? "Solana" : "EVM"} but 'to' is ${e ? "Solana" : "EVM"}`
97
99
  );
98
- return { fromIsSolana: o, fromIsEvm: r };
100
+ return { fromIsSolana: a, fromIsEvm: r };
99
101
  }
100
- function A(t, a) {
101
- const o = h(t);
102
- if (a && !o)
102
+ function A(t, o) {
103
+ const a = h(t);
104
+ if (o && !a)
103
105
  throw new Error(`Network mismatch: Solana address provided but network is ${t}`);
104
- if (!a && o)
106
+ if (!o && a)
105
107
  throw new Error(`Network mismatch: EVM address provided but network is ${t}`);
106
108
  }
107
- function y(t, a, o) {
108
- if (o) {
109
- if (!t.solanaAccountObjects?.some((e) => e.address === a))
110
- throw new Error(`User does not own Solana account: ${a}`);
109
+ function y(t, o, a) {
110
+ if (a) {
111
+ if (!t.solanaAccountObjects?.some((e) => e.address === o))
112
+ throw new Error(`User does not own Solana account: ${o}`);
111
113
  } else {
112
- const r = t.evmAccountObjects?.some((n) => n.address === a), e = t.evmSmartAccountObjects?.some((n) => n.address === a);
113
- if (!r && !e)
114
- throw new Error(`User does not own EVM account: ${a}`);
114
+ const r = o.toLowerCase(), e = t.evmAccountObjects?.some((n) => n.address.toLowerCase() === r), s = t.evmSmartAccountObjects?.some(
115
+ (n) => n.address.toLowerCase() === r
116
+ );
117
+ if (!e && !s)
118
+ throw new Error(`User does not own EVM account: ${o}`);
115
119
  }
116
120
  }
117
121
  export {
118
- C as sendUsdc
122
+ $ as sendUsdc
119
123
  };
@@ -1,29 +1,29 @@
1
- import { hashTypedData as c, serializeErc6492Signature as m, encodeFunctionData as u, pad as g, getTypesForEIP712Domain as p, hashMessage as A } from "viem";
2
- import { getCurrentUserSync as d } from "./index.web44.js";
1
+ import { hashTypedData as m, serializeErc6492Signature as u, encodeFunctionData as g, pad as d, getTypesForEIP712Domain as p, hashMessage as A } from "viem";
2
+ import { getCurrentUserSync as l } from "./index.web44.js";
3
3
  import "@coinbase/cdp-api-client";
4
4
  import "./index.web2.js";
5
5
  import "./index.web3.js";
6
6
  import "jose";
7
7
  import "./index.web98.js";
8
- import { signEvmHash as s } from "./index.web28.js";
8
+ import { signEvmHash as i } from "./index.web28.js";
9
9
  import { signEvmTransaction as h } from "./index.web29.js";
10
- import { signEvmMessage as l } from "./index.web30.js";
11
- import { signEvmTypedData as f } from "./index.web31.js";
10
+ import { signEvmMessage as f } from "./index.web30.js";
11
+ import { signEvmTypedData as y } from "./index.web31.js";
12
12
  import "./index.web93.js";
13
13
  import "./index.web99.js";
14
14
  import "@solana/web3.js";
15
15
  import "bs58";
16
- import { COINBASE_SMART_WALLET_FACTORY_ADDRESS as y, COINBASE_SMART_WALLET_FACTORY_ABI as v } from "./index.web108.js";
16
+ import { COINBASE_SMART_WALLET_FACTORY_ADDRESS as v, COINBASE_SMART_WALLET_FACTORY_ABI as w } from "./index.web108.js";
17
17
  import { signAndWrapTypedDataForSmartAccount as E } from "./index.web109.js";
18
18
  import { toAccount as T } from "./index.web110.js";
19
- function W(r) {
20
- const o = d();
19
+ function U(r) {
20
+ const o = l();
21
21
  if (!o || !o.evmAccountObjects?.length && !o.evmSmartAccountObjects?.length)
22
22
  throw new Error(
23
23
  "No accounts found - user must be authenticated and have at least one EVM account or smart account"
24
24
  );
25
- const i = o.evmAccountObjects?.some((e) => e.address === r) ?? !1, a = o.evmSmartAccountObjects?.some((e) => e.address === r) ?? !1;
26
- if (!i && !a)
25
+ const s = r.toLowerCase(), c = o.evmAccountObjects?.some((e) => e.address.toLowerCase() === s) ?? !1, a = o.evmSmartAccountObjects?.some((e) => e.address.toLowerCase() === s) ?? !1;
26
+ if (!c && !a)
27
27
  throw new Error(`Cannot sign for address ${r} - not authorized for this account`);
28
28
  return T({
29
29
  address: r,
@@ -38,13 +38,13 @@ function W(r) {
38
38
  async signMessage({ message: e }) {
39
39
  let t;
40
40
  if (typeof e == "string")
41
- t = (await l({
41
+ t = (await f({
42
42
  evmAccount: r,
43
43
  message: e
44
44
  })).signature;
45
45
  else if ("raw" in e) {
46
46
  const n = A(e);
47
- t = (await s({
47
+ t = (await i({
48
48
  evmAccount: r,
49
49
  hash: n
50
50
  })).signature;
@@ -86,15 +86,15 @@ function W(r) {
86
86
  const t = await E({
87
87
  smartAccount: r,
88
88
  ownerAddress: o.evmAccountObjects?.[0]?.address,
89
- hash: c(e),
89
+ hash: m(e),
90
90
  chainId: Number(e.domain.chainId)
91
91
  });
92
- return m({
93
- address: y,
94
- data: u({
95
- abi: v,
92
+ return u({
93
+ address: v,
94
+ data: g({
95
+ abi: w,
96
96
  functionName: "createAccount",
97
- args: [[g(o.evmAccountObjects?.[0]?.address)], 0n]
97
+ args: [[d(o.evmAccountObjects?.[0]?.address)], 0n]
98
98
  }),
99
99
  signature: t.signature
100
100
  });
@@ -110,7 +110,7 @@ function W(r) {
110
110
  primaryType: e.primaryType,
111
111
  message: e.message
112
112
  };
113
- return (await f({
113
+ return (await y({
114
114
  evmAccount: r,
115
115
  typedData: t
116
116
  })).signature;
@@ -123,7 +123,7 @@ function W(r) {
123
123
  * @returns The signature as a hex string
124
124
  */
125
125
  async sign(e) {
126
- return (await s({
126
+ return (await i({
127
127
  evmAccount: r,
128
128
  hash: e.hash
129
129
  })).signature;
@@ -131,5 +131,5 @@ function W(r) {
131
131
  });
132
132
  }
133
133
  export {
134
- W as toViemAccount
134
+ U as toViemAccount
135
135
  };
@@ -1,4 +1,4 @@
1
- const o = "0.0.112";
1
+ const o = "0.0.114";
2
2
  export {
3
3
  o as VERSION
4
4
  };