@coinbase/cdp-core 0.0.35 → 0.0.37

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