@coinbase/cdp-core 0.0.72 → 0.0.73

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 (328) hide show
  1. package/dist/esm/index.native100.js +34 -5
  2. package/dist/esm/index.native101.js +9 -5
  3. package/dist/esm/index.native102.js +10 -10
  4. package/dist/esm/index.native103.js +11 -376
  5. package/dist/esm/index.native104.js +16 -2
  6. package/dist/esm/index.native105.js +17 -64
  7. package/dist/esm/index.native106.js +5 -364
  8. package/dist/esm/index.native107.js +5 -17
  9. package/dist/esm/index.native108.js +10 -22
  10. package/dist/esm/index.native109.js +13 -47
  11. package/dist/esm/index.native110.js +22 -28
  12. package/dist/esm/index.native111.js +50 -28
  13. package/dist/esm/index.native112.js +5 -2
  14. package/dist/esm/index.native113.js +2 -21
  15. package/dist/esm/index.native114.js +5 -5
  16. package/dist/esm/index.native115.js +15 -44
  17. package/dist/esm/index.native116.js +7 -19
  18. package/dist/esm/index.native117.js +3 -79
  19. package/dist/esm/index.native118.js +18 -102
  20. package/dist/esm/index.native119.js +8 -32
  21. package/dist/esm/index.native120.js +7 -6
  22. package/dist/esm/index.native121.js +71 -3
  23. package/dist/esm/index.native122.js +17 -53
  24. package/dist/esm/index.native123.js +3 -10
  25. package/dist/esm/index.native124.js +5 -2
  26. package/dist/esm/index.native125.js +5 -45
  27. package/dist/esm/index.native126.js +4 -13
  28. package/dist/esm/index.native127.js +19 -4
  29. package/dist/esm/index.native128.js +52 -4
  30. package/dist/esm/index.native129.js +17 -18
  31. package/dist/esm/index.native130.js +23 -7
  32. package/dist/esm/index.native131.js +8 -3
  33. package/dist/esm/index.native132.js +29 -19
  34. package/dist/esm/index.native133.js +7 -8
  35. package/dist/esm/index.native134.js +20 -7
  36. package/dist/esm/index.native135.js +5 -72
  37. package/dist/esm/index.native136.js +44 -15
  38. package/dist/esm/index.native137.js +20 -3
  39. package/dist/esm/index.native138.js +19 -4
  40. package/dist/esm/index.native139.js +79 -4
  41. package/dist/esm/index.native140.js +103 -4
  42. package/dist/esm/index.native141.js +6 -19
  43. package/dist/esm/index.native142.js +30 -50
  44. package/dist/esm/index.native143.js +54 -17
  45. package/dist/esm/index.native144.js +10 -23
  46. package/dist/esm/index.native145.js +2 -9
  47. package/dist/esm/index.native146.js +44 -33
  48. package/dist/esm/index.native147.js +13 -7
  49. package/dist/esm/index.native148.js +2 -21
  50. package/dist/esm/index.native149.js +107 -37
  51. package/dist/esm/index.native151.js +3 -69
  52. package/dist/esm/index.native152.js +7 -34
  53. package/dist/esm/index.native153.js +2 -21
  54. package/dist/esm/index.native154.js +377 -7
  55. package/dist/esm/index.native155.js +836 -2
  56. package/dist/esm/index.native156.js +35 -374
  57. package/dist/esm/index.native157.js +2 -836
  58. package/dist/esm/index.native158.js +68 -77
  59. package/dist/esm/index.native159.js +35 -5
  60. package/dist/esm/index.native160.js +19 -19
  61. package/dist/esm/index.native161.js +47 -10
  62. package/dist/esm/index.native162.js +77 -18
  63. package/dist/esm/index.native163.js +5 -94
  64. package/dist/esm/index.native164.js +20 -20
  65. package/dist/esm/index.native165.js +9 -117
  66. package/dist/esm/index.native166.js +20 -2
  67. package/dist/esm/index.native167.js +89 -104
  68. package/dist/esm/index.native168.js +21 -2
  69. package/dist/esm/index.native169.js +118 -2
  70. package/dist/esm/index.native170.js +15 -2
  71. package/dist/esm/index.native171.js +2 -2
  72. package/dist/esm/index.native172.js +2 -47
  73. package/dist/esm/index.native173.js +2 -15
  74. package/dist/esm/index.native175.js +1 -1
  75. package/dist/esm/index.native180.js +1 -1
  76. package/dist/esm/index.native181.js +1 -1
  77. package/dist/esm/index.native2.js +2 -2
  78. package/dist/esm/index.native3.js +1 -1
  79. package/dist/esm/index.native30.js +40 -36
  80. package/dist/esm/index.native46.js +12 -12
  81. package/dist/esm/index.native50.js +3 -3
  82. package/dist/esm/index.native53.js +2 -2
  83. package/dist/esm/index.native57.js +3 -3
  84. package/dist/esm/index.native60.js +1 -1
  85. package/dist/esm/index.native61.js +1 -1
  86. package/dist/esm/index.native62.js +377 -2
  87. package/dist/esm/index.native63.js +2 -4
  88. package/dist/esm/index.native64.js +64 -16
  89. package/dist/esm/index.native65.js +364 -45
  90. package/dist/esm/index.native66.js +28 -13
  91. package/dist/esm/index.native67.js +28 -55
  92. package/dist/esm/index.native68.js +2 -7
  93. package/dist/esm/index.native69.js +2 -22
  94. package/dist/esm/index.native70.js +17 -11
  95. package/dist/esm/index.native71.js +45 -3
  96. package/dist/esm/index.native72.js +13 -3
  97. package/dist/esm/index.native73.js +52 -31
  98. package/dist/esm/index.native74.js +6 -12
  99. package/dist/esm/index.native75.js +21 -4
  100. package/dist/esm/index.native76.js +11 -28
  101. package/dist/esm/index.native77.js +3 -6
  102. package/dist/esm/index.native78.js +3 -42
  103. package/dist/esm/index.native79.js +33 -54
  104. package/dist/esm/index.native80.js +11 -126
  105. package/dist/esm/index.native81.js +4 -23
  106. package/dist/esm/index.native82.js +27 -11
  107. package/dist/esm/index.native83.js +6 -104
  108. package/dist/esm/index.native84.js +42 -6
  109. package/dist/esm/index.native85.js +56 -3
  110. package/dist/esm/index.native86.js +127 -14
  111. package/dist/esm/index.native87.js +21 -32
  112. package/dist/esm/index.native88.js +10 -76
  113. package/dist/esm/index.native89.js +105 -2
  114. package/dist/esm/index.native9.js +1 -1
  115. package/dist/esm/index.native90.js +7 -2
  116. package/dist/esm/index.native91.js +3 -13
  117. package/dist/esm/index.native92.js +14 -37
  118. package/dist/esm/index.native93.js +33 -5
  119. package/dist/esm/index.native94.js +76 -32
  120. package/dist/esm/index.native95.js +2 -9
  121. package/dist/esm/index.native96.js +2 -11
  122. package/dist/esm/index.native97.js +12 -11
  123. package/dist/esm/index.native98.js +36 -12
  124. package/dist/esm/index.native99.js +5 -17
  125. package/dist/esm/index.web105.js +1 -1
  126. package/dist/esm/index.web106.js +1 -1
  127. package/dist/esm/index.web111.js +54 -4
  128. package/dist/esm/index.web112.js +10 -54
  129. package/dist/esm/index.web113.js +2 -11
  130. package/dist/esm/index.web114.js +45 -2
  131. package/dist/esm/index.web115.js +13 -44
  132. package/dist/esm/index.web116.js +4 -13
  133. package/dist/esm/index.web122.js +12 -16
  134. package/dist/esm/index.web134.js +15 -15
  135. package/dist/esm/index.web145.js +32 -6
  136. package/dist/esm/index.web146.js +6 -32
  137. package/dist/esm/index.web147.js +21 -2
  138. package/dist/esm/index.web148.js +10 -109
  139. package/dist/esm/index.web149.js +20 -2
  140. package/dist/esm/index.web150.js +93 -20
  141. package/dist/esm/index.web151.js +20 -9
  142. package/dist/esm/index.web152.js +114 -16
  143. package/dist/esm/index.web153.js +2 -94
  144. package/dist/esm/index.web154.js +109 -21
  145. package/dist/esm/index.web155.js +2 -118
  146. package/dist/esm/index.web167.js +1 -1
  147. package/dist/esm/index.web170.js +1 -1
  148. package/dist/esm/index.web175.js +1 -1
  149. package/dist/esm/index.web176.js +1 -1
  150. package/dist/esm/index.web29.js +40 -36
  151. package/dist/esm/index.web49.js +3 -3
  152. package/dist/esm/index.web56.js +3 -3
  153. package/dist/esm/index.web63.js +13 -373
  154. package/dist/esm/index.web64.js +22 -28
  155. package/dist/esm/index.web65.js +50 -28
  156. package/dist/esm/index.web66.js +373 -13
  157. package/dist/esm/index.web67.js +2 -25
  158. package/dist/esm/index.web68.js +63 -48
  159. package/dist/esm/index.web69.js +367 -2
  160. package/dist/esm/index.web70.js +28 -65
  161. package/dist/esm/index.web71.js +28 -364
  162. package/dist/esm/index.web8.js +1 -1
  163. package/dist/native/index.native100.js +34 -5
  164. package/dist/native/index.native101.js +9 -5
  165. package/dist/native/index.native102.js +10 -10
  166. package/dist/native/index.native103.js +11 -376
  167. package/dist/native/index.native104.js +16 -2
  168. package/dist/native/index.native105.js +17 -64
  169. package/dist/native/index.native106.js +5 -364
  170. package/dist/native/index.native107.js +5 -17
  171. package/dist/native/index.native108.js +10 -22
  172. package/dist/native/index.native109.js +13 -47
  173. package/dist/native/index.native110.js +22 -28
  174. package/dist/native/index.native111.js +50 -28
  175. package/dist/native/index.native112.js +5 -2
  176. package/dist/native/index.native113.js +2 -21
  177. package/dist/native/index.native114.js +5 -5
  178. package/dist/native/index.native115.js +15 -44
  179. package/dist/native/index.native116.js +7 -19
  180. package/dist/native/index.native117.js +3 -79
  181. package/dist/native/index.native118.js +18 -102
  182. package/dist/native/index.native119.js +8 -32
  183. package/dist/native/index.native120.js +7 -6
  184. package/dist/native/index.native121.js +71 -3
  185. package/dist/native/index.native122.js +17 -53
  186. package/dist/native/index.native123.js +3 -10
  187. package/dist/native/index.native124.js +5 -2
  188. package/dist/native/index.native125.js +5 -45
  189. package/dist/native/index.native126.js +4 -13
  190. package/dist/native/index.native127.js +19 -4
  191. package/dist/native/index.native128.js +52 -4
  192. package/dist/native/index.native129.js +17 -18
  193. package/dist/native/index.native130.js +23 -7
  194. package/dist/native/index.native131.js +8 -3
  195. package/dist/native/index.native132.js +29 -19
  196. package/dist/native/index.native133.js +7 -8
  197. package/dist/native/index.native134.js +20 -7
  198. package/dist/native/index.native135.js +5 -72
  199. package/dist/native/index.native136.js +44 -15
  200. package/dist/native/index.native137.js +20 -3
  201. package/dist/native/index.native138.js +19 -4
  202. package/dist/native/index.native139.js +79 -4
  203. package/dist/native/index.native140.js +103 -4
  204. package/dist/native/index.native141.js +6 -19
  205. package/dist/native/index.native142.js +30 -50
  206. package/dist/native/index.native143.js +54 -17
  207. package/dist/native/index.native144.js +10 -23
  208. package/dist/native/index.native145.js +2 -9
  209. package/dist/native/index.native146.js +44 -33
  210. package/dist/native/index.native147.js +13 -7
  211. package/dist/native/index.native148.js +2 -21
  212. package/dist/native/index.native149.js +107 -37
  213. package/dist/native/index.native151.js +3 -69
  214. package/dist/native/index.native152.js +7 -34
  215. package/dist/native/index.native153.js +2 -21
  216. package/dist/native/index.native154.js +377 -7
  217. package/dist/native/index.native155.js +836 -2
  218. package/dist/native/index.native156.js +35 -374
  219. package/dist/native/index.native157.js +2 -836
  220. package/dist/native/index.native158.js +68 -77
  221. package/dist/native/index.native159.js +35 -5
  222. package/dist/native/index.native160.js +19 -19
  223. package/dist/native/index.native161.js +47 -10
  224. package/dist/native/index.native162.js +77 -18
  225. package/dist/native/index.native163.js +5 -94
  226. package/dist/native/index.native164.js +20 -20
  227. package/dist/native/index.native165.js +9 -117
  228. package/dist/native/index.native166.js +20 -2
  229. package/dist/native/index.native167.js +89 -104
  230. package/dist/native/index.native168.js +21 -2
  231. package/dist/native/index.native169.js +118 -2
  232. package/dist/native/index.native170.js +15 -2
  233. package/dist/native/index.native171.js +2 -2
  234. package/dist/native/index.native172.js +2 -47
  235. package/dist/native/index.native173.js +2 -15
  236. package/dist/native/index.native175.js +1 -1
  237. package/dist/native/index.native180.js +1 -1
  238. package/dist/native/index.native181.js +1 -1
  239. package/dist/native/index.native2.js +2 -2
  240. package/dist/native/index.native3.js +1 -1
  241. package/dist/native/index.native30.js +40 -36
  242. package/dist/native/index.native46.js +12 -12
  243. package/dist/native/index.native50.js +3 -3
  244. package/dist/native/index.native53.js +2 -2
  245. package/dist/native/index.native57.js +3 -3
  246. package/dist/native/index.native60.js +1 -1
  247. package/dist/native/index.native61.js +1 -1
  248. package/dist/native/index.native62.js +377 -2
  249. package/dist/native/index.native63.js +2 -4
  250. package/dist/native/index.native64.js +64 -16
  251. package/dist/native/index.native65.js +364 -45
  252. package/dist/native/index.native66.js +28 -13
  253. package/dist/native/index.native67.js +28 -55
  254. package/dist/native/index.native68.js +2 -7
  255. package/dist/native/index.native69.js +2 -22
  256. package/dist/native/index.native70.js +17 -11
  257. package/dist/native/index.native71.js +45 -3
  258. package/dist/native/index.native72.js +13 -3
  259. package/dist/native/index.native73.js +52 -31
  260. package/dist/native/index.native74.js +6 -12
  261. package/dist/native/index.native75.js +21 -4
  262. package/dist/native/index.native76.js +11 -28
  263. package/dist/native/index.native77.js +3 -6
  264. package/dist/native/index.native78.js +3 -42
  265. package/dist/native/index.native79.js +33 -54
  266. package/dist/native/index.native80.js +11 -126
  267. package/dist/native/index.native81.js +4 -23
  268. package/dist/native/index.native82.js +27 -11
  269. package/dist/native/index.native83.js +6 -104
  270. package/dist/native/index.native84.js +42 -6
  271. package/dist/native/index.native85.js +56 -3
  272. package/dist/native/index.native86.js +127 -14
  273. package/dist/native/index.native87.js +21 -32
  274. package/dist/native/index.native88.js +10 -76
  275. package/dist/native/index.native89.js +105 -2
  276. package/dist/native/index.native9.js +1 -1
  277. package/dist/native/index.native90.js +7 -2
  278. package/dist/native/index.native91.js +3 -13
  279. package/dist/native/index.native92.js +14 -37
  280. package/dist/native/index.native93.js +33 -5
  281. package/dist/native/index.native94.js +76 -32
  282. package/dist/native/index.native95.js +2 -9
  283. package/dist/native/index.native96.js +2 -11
  284. package/dist/native/index.native97.js +12 -11
  285. package/dist/native/index.native98.js +36 -12
  286. package/dist/native/index.native99.js +5 -17
  287. package/dist/native-types/version.d.ts +1 -1
  288. package/dist/types/version.d.ts +1 -1
  289. package/dist/web/index.web105.js +1 -1
  290. package/dist/web/index.web106.js +1 -1
  291. package/dist/web/index.web111.js +54 -4
  292. package/dist/web/index.web112.js +10 -54
  293. package/dist/web/index.web113.js +2 -11
  294. package/dist/web/index.web114.js +45 -2
  295. package/dist/web/index.web115.js +13 -44
  296. package/dist/web/index.web116.js +4 -13
  297. package/dist/web/index.web122.js +12 -16
  298. package/dist/web/index.web134.js +15 -15
  299. package/dist/web/index.web145.js +32 -6
  300. package/dist/web/index.web146.js +6 -32
  301. package/dist/web/index.web147.js +21 -2
  302. package/dist/web/index.web148.js +10 -109
  303. package/dist/web/index.web149.js +20 -2
  304. package/dist/web/index.web150.js +93 -20
  305. package/dist/web/index.web151.js +20 -9
  306. package/dist/web/index.web152.js +114 -16
  307. package/dist/web/index.web153.js +2 -94
  308. package/dist/web/index.web154.js +109 -21
  309. package/dist/web/index.web155.js +2 -118
  310. package/dist/web/index.web167.js +1 -1
  311. package/dist/web/index.web170.js +1 -1
  312. package/dist/web/index.web175.js +1 -1
  313. package/dist/web/index.web176.js +1 -1
  314. package/dist/web/index.web29.js +40 -36
  315. package/dist/web/index.web49.js +3 -3
  316. package/dist/web/index.web56.js +3 -3
  317. package/dist/web/index.web63.js +13 -373
  318. package/dist/web/index.web64.js +22 -28
  319. package/dist/web/index.web65.js +50 -28
  320. package/dist/web/index.web66.js +373 -13
  321. package/dist/web/index.web67.js +2 -25
  322. package/dist/web/index.web68.js +63 -48
  323. package/dist/web/index.web69.js +367 -2
  324. package/dist/web/index.web70.js +28 -65
  325. package/dist/web/index.web71.js +28 -364
  326. package/dist/web/index.web8.js +1 -1
  327. package/dist/web-types/version.d.ts +1 -1
  328. package/package.json +2 -2
@@ -1,21 +1,21 @@
1
- import { hashTypedData as c, serializeErc6492Signature as i, encodeFunctionData as u, pad as m, getTypesForEIP712Domain as d } from "viem";
2
- import { getCurrentUserSync as g } from "./index.native14.js";
3
- import { signEvmHash as A, signEvmTypedData as l, signEvmTransaction as f, signEvmMessage as h } from "./index.native10.js";
1
+ import { hashTypedData as i, serializeErc6492Signature as u, encodeFunctionData as m, pad as g, getTypesForEIP712Domain as A, hashMessage as d } from "viem";
2
+ import { getCurrentUserSync as h } from "./index.native14.js";
3
+ import { signEvmHash as o, signEvmTypedData as l, signEvmTransaction as f, signEvmMessage as y } from "./index.native10.js";
4
4
  import "@coinbase/cdp-api-client";
5
- import { COINBASE_SMART_WALLET_FACTORY_ADDRESS as y, COINBASE_SMART_WALLET_FACTORY_ABI as p } from "./index.native51.js";
6
- import { signAndWrapTypedDataForSmartAccount as v } from "./index.native52.js";
5
+ import { COINBASE_SMART_WALLET_FACTORY_ADDRESS as p, COINBASE_SMART_WALLET_FACTORY_ABI as v } from "./index.native51.js";
6
+ import { signAndWrapTypedDataForSmartAccount as E } from "./index.native52.js";
7
7
  import { toAccount as T } from "./index.native53.js";
8
- function b(r) {
9
- const n = g();
10
- if (!n || !n.evmAccountObjects?.length && !n.evmSmartAccountObjects?.length)
8
+ function _(n) {
9
+ const r = h();
10
+ if (!r || !r.evmAccountObjects?.length && !r.evmSmartAccountObjects?.length)
11
11
  throw new Error(
12
12
  "No accounts found - user must be authenticated and have at least one EVM account or smart account"
13
13
  );
14
- const s = n.evmAccountObjects?.some((e) => e.address === r) ?? !1, o = n.evmSmartAccountObjects?.some((e) => e.address === r) ?? !1;
15
- if (!s && !o)
16
- throw new Error(`Cannot sign for address ${r} - not authorized for this account`);
14
+ const c = r.evmAccountObjects?.some((e) => e.address === n) ?? !1, s = r.evmSmartAccountObjects?.some((e) => e.address === n) ?? !1;
15
+ if (!c && !s)
16
+ throw new Error(`Cannot sign for address ${n} - not authorized for this account`);
17
17
  return T({
18
- address: r,
18
+ address: n,
19
19
  /**
20
20
  * Signs a message using CDP's message signing functionality.
21
21
  * Supports string messages, hex strings, and byte arrays.
@@ -27,15 +27,19 @@ function b(r) {
27
27
  async signMessage({ message: e }) {
28
28
  let t;
29
29
  if (typeof e == "string")
30
- t = e;
31
- else if ("raw" in e)
32
- typeof e.raw == "string" ? t = e.raw : t = new TextDecoder().decode(e.raw);
33
- else
30
+ t = (await y({
31
+ evmAccount: n,
32
+ message: e
33
+ })).signature;
34
+ else if ("raw" in e) {
35
+ const a = d(e);
36
+ t = (await o({
37
+ evmAccount: n,
38
+ hash: a
39
+ })).signature;
40
+ } else
34
41
  throw new Error("Unsupported message format");
35
- return (await h({
36
- evmAccount: r,
37
- message: t
38
- })).signature;
42
+ return t;
39
43
  },
40
44
  /**
41
45
  * Signs a transaction using CDP's transaction signing functionality.
@@ -54,7 +58,7 @@ function b(r) {
54
58
  chainId: e.chainId ?? 1
55
59
  };
56
60
  return e.gasPrice !== void 0 ? (t.maxFeePerGas = e.gasPrice, t.maxPriorityFeePerGas = e.gasPrice) : (t.maxFeePerGas = e.maxFeePerGas, t.maxPriorityFeePerGas = e.maxPriorityFeePerGas), (await f({
57
- evmAccount: r,
61
+ evmAccount: n,
58
62
  transaction: t
59
63
  })).signedTransaction;
60
64
  },
@@ -67,19 +71,19 @@ function b(r) {
67
71
  * @returns The signature as a hex string
68
72
  */
69
73
  async signTypedData(e) {
70
- if (o) {
71
- const t = await v({
72
- smartAccount: r,
73
- ownerAddress: n.evmAccountObjects?.[0]?.address,
74
- hash: c(e),
74
+ if (s) {
75
+ const t = await E({
76
+ smartAccount: n,
77
+ ownerAddress: r.evmAccountObjects?.[0]?.address,
78
+ hash: i(e),
75
79
  chainId: Number(e.domain.chainId)
76
80
  });
77
- return i({
78
- address: y,
79
- data: u({
80
- abi: p,
81
+ return u({
82
+ address: p,
83
+ data: m({
84
+ abi: v,
81
85
  functionName: "createAccount",
82
- args: [[m(n.evmAccountObjects?.[0]?.address)], 0n]
86
+ args: [[g(r.evmAccountObjects?.[0]?.address)], 0n]
83
87
  }),
84
88
  signature: t.signature
85
89
  });
@@ -87,7 +91,7 @@ function b(r) {
87
91
  const t = {
88
92
  domain: e.domain,
89
93
  types: {
90
- EIP712Domain: d({
94
+ EIP712Domain: A({
91
95
  domain: e.domain
92
96
  }),
93
97
  ...e.types
@@ -96,7 +100,7 @@ function b(r) {
96
100
  message: e.message
97
101
  };
98
102
  return (await l({
99
- evmAccount: r,
103
+ evmAccount: n,
100
104
  typedData: t
101
105
  })).signature;
102
106
  }
@@ -108,13 +112,13 @@ function b(r) {
108
112
  * @returns The signature as a hex string
109
113
  */
110
114
  async sign(e) {
111
- return (await A({
112
- evmAccount: r,
115
+ return (await o({
116
+ evmAccount: n,
113
117
  hash: e.hash
114
118
  })).signature;
115
119
  }
116
120
  });
117
121
  }
118
122
  export {
119
- b as toViemAccount
123
+ _ as toViemAccount
120
124
  };
@@ -1,15 +1,15 @@
1
- import { serializeAuthorizationList as v } from "./index.native64.js";
2
- import { blobsToCommitments as H } from "./index.native95.js";
3
- import { blobsToProofs as V } from "./index.native96.js";
4
- import { commitmentsToVersionedHashes as k } from "./index.native97.js";
5
- import { toBlobSidecars as B } from "./index.native98.js";
6
- import { concatHex as T } from "./index.native71.js";
7
- import { trim as F } from "./index.native77.js";
8
- import { numberToHex as s, bytesToHex as S } from "./index.native65.js";
9
- import { toRlp as b } from "./index.native78.js";
10
- import { assertTransactionEIP1559 as _, assertTransactionEIP2930 as C, assertTransactionEIP4844 as R, assertTransactionEIP7702 as Y, assertTransactionLegacy as j } from "./index.native88.js";
11
- import { getTransactionType as q } from "./index.native86.js";
12
- import { serializeAccessList as h } from "./index.native99.js";
1
+ import { serializeAuthorizationList as v } from "./index.native70.js";
2
+ import { blobsToCommitments as H } from "./index.native101.js";
3
+ import { blobsToProofs as V } from "./index.native102.js";
4
+ import { commitmentsToVersionedHashes as k } from "./index.native103.js";
5
+ import { toBlobSidecars as B } from "./index.native104.js";
6
+ import { concatHex as T } from "./index.native77.js";
7
+ import { trim as F } from "./index.native83.js";
8
+ import { numberToHex as s, bytesToHex as S } from "./index.native71.js";
9
+ import { toRlp as b } from "./index.native84.js";
10
+ import { assertTransactionEIP1559 as _, assertTransactionEIP2930 as C, assertTransactionEIP4844 as R, assertTransactionEIP7702 as Y, assertTransactionLegacy as j } from "./index.native94.js";
11
+ import { getTransactionType as q } from "./index.native92.js";
12
+ import { serializeAccessList as h } from "./index.native105.js";
13
13
  function re(e, t) {
14
14
  const i = q(e);
15
15
  return i === "eip1559" ? J(e, t) : i === "eip2930" ? K(e, t) : i === "eip4844" ? D(e, t) : i === "eip7702" ? w(e, t) : M(e);
@@ -1,6 +1,6 @@
1
- import { CompactSign as i } from "./index.native107.js";
2
- import { JWTInvalid as r } from "./index.native108.js";
3
- import { JWTClaimsBuilder as n } from "./index.native109.js";
1
+ import { CompactSign as i } from "./index.native109.js";
2
+ import { JWTInvalid as r } from "./index.native110.js";
3
+ import { JWTClaimsBuilder as n } from "./index.native111.js";
4
4
  class d {
5
5
  #s;
6
6
  #t;
@@ -1,5 +1,5 @@
1
- import { InvalidAddressError as s } from "./index.native91.js";
2
- import { isAddress as a } from "./index.native70.js";
1
+ import { InvalidAddressError as s } from "./index.native97.js";
2
+ import { isAddress as a } from "./index.native76.js";
3
3
  function r(n) {
4
4
  if (typeof n == "string") {
5
5
  if (!a(n, { strict: !1 }))
@@ -1,7 +1,7 @@
1
- import { DisconnectedError as l, from as d } from "./index.native103.js";
1
+ import { DisconnectedError as l, from as d } from "./index.native62.js";
2
2
  import { validateRequest as h, EIP1193ProviderError as m, STANDARD_ERROR_CODES as _ } from "./index.native33.js";
3
- import { createEOAHandlers as p } from "./index.native110.js";
4
- import { createSmartAccountHandlers as g } from "./index.native111.js";
3
+ import { createEOAHandlers as p } from "./index.native66.js";
4
+ import { createSmartAccountHandlers as g } from "./index.native67.js";
5
5
  import "viem";
6
6
  import "zustand";
7
7
  import "@coinbase/cdp-api-client";
@@ -1,4 +1,4 @@
1
- import { __exports as F } from "./index.native62.js";
1
+ import { __exports as F } from "./index.native68.js";
2
2
  var A;
3
3
  function _() {
4
4
  if (A) return F;
@@ -1,4 +1,4 @@
1
- import { __exports as n } from "./index.native63.js";
1
+ import { __exports as n } from "./index.native69.js";
2
2
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
3
3
  var d;
4
4
  function q() {
@@ -1,4 +1,379 @@
1
- var s = {};
1
+ import "./index.native63.js";
2
+ import { BaseError as P } from "./index.native64.js";
3
+ import { parse as y, parseError as j, InternalError as g } from "./index.native65.js";
4
+ class u extends Error {
5
+ constructor(e, t) {
6
+ super(t), Object.defineProperty(this, "name", {
7
+ enumerable: !0,
8
+ configurable: !0,
9
+ writable: !0,
10
+ value: "ProviderRpcError"
11
+ }), Object.defineProperty(this, "code", {
12
+ enumerable: !0,
13
+ configurable: !0,
14
+ writable: !0,
15
+ value: void 0
16
+ }), Object.defineProperty(this, "details", {
17
+ enumerable: !0,
18
+ configurable: !0,
19
+ writable: !0,
20
+ value: void 0
21
+ }), this.code = e, this.details = t;
22
+ }
23
+ }
24
+ class n extends u {
25
+ constructor({ message: e = "The user rejected the request." } = {}) {
26
+ super(4001, e), Object.defineProperty(this, "code", {
27
+ enumerable: !0,
28
+ configurable: !0,
29
+ writable: !0,
30
+ value: 4001
31
+ }), Object.defineProperty(this, "name", {
32
+ enumerable: !0,
33
+ configurable: !0,
34
+ writable: !0,
35
+ value: "Provider.UserRejectedRequestError"
36
+ });
37
+ }
38
+ }
39
+ Object.defineProperty(n, "code", {
40
+ enumerable: !0,
41
+ configurable: !0,
42
+ writable: !0,
43
+ value: 4001
44
+ });
45
+ class a extends u {
46
+ constructor({ message: e = "The requested method and/or account has not been authorized by the user." } = {}) {
47
+ super(4100, e), Object.defineProperty(this, "code", {
48
+ enumerable: !0,
49
+ configurable: !0,
50
+ writable: !0,
51
+ value: 4100
52
+ }), Object.defineProperty(this, "name", {
53
+ enumerable: !0,
54
+ configurable: !0,
55
+ writable: !0,
56
+ value: "Provider.UnauthorizedError"
57
+ });
58
+ }
59
+ }
60
+ Object.defineProperty(a, "code", {
61
+ enumerable: !0,
62
+ configurable: !0,
63
+ writable: !0,
64
+ value: 4100
65
+ });
66
+ class i extends u {
67
+ constructor({ message: e = "The provider does not support the requested method." } = {}) {
68
+ super(4200, e), Object.defineProperty(this, "code", {
69
+ enumerable: !0,
70
+ configurable: !0,
71
+ writable: !0,
72
+ value: 4200
73
+ }), Object.defineProperty(this, "name", {
74
+ enumerable: !0,
75
+ configurable: !0,
76
+ writable: !0,
77
+ value: "Provider.UnsupportedMethodError"
78
+ });
79
+ }
80
+ }
81
+ Object.defineProperty(i, "code", {
82
+ enumerable: !0,
83
+ configurable: !0,
84
+ writable: !0,
85
+ value: 4200
86
+ });
87
+ class c extends u {
88
+ constructor({ message: e = "The provider is disconnected from all chains." } = {}) {
89
+ super(4900, e), Object.defineProperty(this, "code", {
90
+ enumerable: !0,
91
+ configurable: !0,
92
+ writable: !0,
93
+ value: 4900
94
+ }), Object.defineProperty(this, "name", {
95
+ enumerable: !0,
96
+ configurable: !0,
97
+ writable: !0,
98
+ value: "Provider.DisconnectedError"
99
+ });
100
+ }
101
+ }
102
+ Object.defineProperty(c, "code", {
103
+ enumerable: !0,
104
+ configurable: !0,
105
+ writable: !0,
106
+ value: 4900
107
+ });
108
+ class l extends u {
109
+ constructor({ message: e = "The provider is not connected to the requested chain." } = {}) {
110
+ super(4901, e), Object.defineProperty(this, "code", {
111
+ enumerable: !0,
112
+ configurable: !0,
113
+ writable: !0,
114
+ value: 4901
115
+ }), Object.defineProperty(this, "name", {
116
+ enumerable: !0,
117
+ configurable: !0,
118
+ writable: !0,
119
+ value: "Provider.ChainDisconnectedError"
120
+ });
121
+ }
122
+ }
123
+ Object.defineProperty(l, "code", {
124
+ enumerable: !0,
125
+ configurable: !0,
126
+ writable: !0,
127
+ value: 4901
128
+ });
129
+ class d extends u {
130
+ constructor({ message: e = "An error occurred when attempting to switch chain." } = {}) {
131
+ super(4902, e), Object.defineProperty(this, "code", {
132
+ enumerable: !0,
133
+ configurable: !0,
134
+ writable: !0,
135
+ value: 4902
136
+ }), Object.defineProperty(this, "name", {
137
+ enumerable: !0,
138
+ configurable: !0,
139
+ writable: !0,
140
+ value: "Provider.SwitchChainError"
141
+ });
142
+ }
143
+ }
144
+ Object.defineProperty(d, "code", {
145
+ enumerable: !0,
146
+ configurable: !0,
147
+ writable: !0,
148
+ value: 4902
149
+ });
150
+ class b extends u {
151
+ constructor({ message: e = "This Wallet does not support a capability that was not marked as optional." } = {}) {
152
+ super(5700, e), Object.defineProperty(this, "code", {
153
+ enumerable: !0,
154
+ configurable: !0,
155
+ writable: !0,
156
+ value: 5700
157
+ }), Object.defineProperty(this, "name", {
158
+ enumerable: !0,
159
+ configurable: !0,
160
+ writable: !0,
161
+ value: "Provider.UnsupportedNonOptionalCapabilityError"
162
+ });
163
+ }
164
+ }
165
+ Object.defineProperty(b, "code", {
166
+ enumerable: !0,
167
+ configurable: !0,
168
+ writable: !0,
169
+ value: 5700
170
+ });
171
+ class s extends u {
172
+ constructor({ message: e = "This Wallet does not support the requested chain ID." } = {}) {
173
+ super(5710, e), Object.defineProperty(this, "code", {
174
+ enumerable: !0,
175
+ configurable: !0,
176
+ writable: !0,
177
+ value: 5710
178
+ }), Object.defineProperty(this, "name", {
179
+ enumerable: !0,
180
+ configurable: !0,
181
+ writable: !0,
182
+ value: "Provider.UnsupportedChainIdError"
183
+ });
184
+ }
185
+ }
186
+ Object.defineProperty(s, "code", {
187
+ enumerable: !0,
188
+ configurable: !0,
189
+ writable: !0,
190
+ value: 5710
191
+ });
192
+ class f extends u {
193
+ constructor({ message: e = "There is already a bundle submitted with this ID." } = {}) {
194
+ super(5720, e), Object.defineProperty(this, "code", {
195
+ enumerable: !0,
196
+ configurable: !0,
197
+ writable: !0,
198
+ value: 5720
199
+ }), Object.defineProperty(this, "name", {
200
+ enumerable: !0,
201
+ configurable: !0,
202
+ writable: !0,
203
+ value: "Provider.DuplicateIdError"
204
+ });
205
+ }
206
+ }
207
+ Object.defineProperty(f, "code", {
208
+ enumerable: !0,
209
+ configurable: !0,
210
+ writable: !0,
211
+ value: 5720
212
+ });
213
+ class p extends u {
214
+ constructor({ message: e = "This bundle id is unknown / has not been submitted." } = {}) {
215
+ super(5730, e), Object.defineProperty(this, "code", {
216
+ enumerable: !0,
217
+ configurable: !0,
218
+ writable: !0,
219
+ value: 5730
220
+ }), Object.defineProperty(this, "name", {
221
+ enumerable: !0,
222
+ configurable: !0,
223
+ writable: !0,
224
+ value: "Provider.UnknownBundleIdError"
225
+ });
226
+ }
227
+ }
228
+ Object.defineProperty(p, "code", {
229
+ enumerable: !0,
230
+ configurable: !0,
231
+ writable: !0,
232
+ value: 5730
233
+ });
234
+ class h extends u {
235
+ constructor({ message: e = "The call bundle is too large for the Wallet to process." } = {}) {
236
+ super(5740, e), Object.defineProperty(this, "code", {
237
+ enumerable: !0,
238
+ configurable: !0,
239
+ writable: !0,
240
+ value: 5740
241
+ }), Object.defineProperty(this, "name", {
242
+ enumerable: !0,
243
+ configurable: !0,
244
+ writable: !0,
245
+ value: "Provider.BundleTooLargeError"
246
+ });
247
+ }
248
+ }
249
+ Object.defineProperty(h, "code", {
250
+ enumerable: !0,
251
+ configurable: !0,
252
+ writable: !0,
253
+ value: 5740
254
+ });
255
+ class m extends u {
256
+ constructor({ message: e = "The Wallet can support atomicity after an upgrade, but the user rejected the upgrade." } = {}) {
257
+ super(5750, e), Object.defineProperty(this, "code", {
258
+ enumerable: !0,
259
+ configurable: !0,
260
+ writable: !0,
261
+ value: 5750
262
+ }), Object.defineProperty(this, "name", {
263
+ enumerable: !0,
264
+ configurable: !0,
265
+ writable: !0,
266
+ value: "Provider.AtomicReadyWalletRejectedUpgradeError"
267
+ });
268
+ }
269
+ }
270
+ Object.defineProperty(m, "code", {
271
+ enumerable: !0,
272
+ configurable: !0,
273
+ writable: !0,
274
+ value: 5750
275
+ });
276
+ class w extends u {
277
+ constructor({ message: e = "The wallet does not support atomic execution but the request requires it." } = {}) {
278
+ super(5760, e), Object.defineProperty(this, "code", {
279
+ enumerable: !0,
280
+ configurable: !0,
281
+ writable: !0,
282
+ value: 5760
283
+ }), Object.defineProperty(this, "name", {
284
+ enumerable: !0,
285
+ configurable: !0,
286
+ writable: !0,
287
+ value: "Provider.AtomicityNotSupportedError"
288
+ });
289
+ }
290
+ }
291
+ Object.defineProperty(w, "code", {
292
+ enumerable: !0,
293
+ configurable: !0,
294
+ writable: !0,
295
+ value: 5760
296
+ });
297
+ function q(r, e = {}) {
298
+ const { includeEvents: t = !0 } = e;
299
+ if (!r)
300
+ throw new E();
301
+ return {
302
+ ...t ? {
303
+ on: r.on?.bind(r),
304
+ removeListener: r.removeListener?.bind(r)
305
+ } : {},
306
+ async request(v) {
307
+ try {
308
+ const o = await r.request(v);
309
+ return o && typeof o == "object" && "jsonrpc" in o ? y(o) : o;
310
+ } catch (o) {
311
+ throw O(o);
312
+ }
313
+ }
314
+ };
315
+ }
316
+ function O(r) {
317
+ const e = j(r);
318
+ if (e instanceof g) {
319
+ if (!e.data)
320
+ return e;
321
+ const { code: t } = e.data;
322
+ if (t === c.code)
323
+ return new c(e);
324
+ if (t === l.code)
325
+ return new l(e);
326
+ if (t === n.code)
327
+ return new n(e);
328
+ if (t === a.code)
329
+ return new a(e);
330
+ if (t === i.code)
331
+ return new i(e);
332
+ if (t === d.code)
333
+ return new d(e);
334
+ if (t === m.code)
335
+ return new m(e);
336
+ if (t === w.code)
337
+ return new w(e);
338
+ if (t === h.code)
339
+ return new h(e);
340
+ if (t === p.code)
341
+ return new p(e);
342
+ if (t === f.code)
343
+ return new f(e);
344
+ if (t === s.code)
345
+ return new s(e);
346
+ if (t === b.code)
347
+ return new b(e);
348
+ }
349
+ return e;
350
+ }
351
+ class E extends P {
352
+ constructor() {
353
+ super("`provider` is undefined."), Object.defineProperty(this, "name", {
354
+ enumerable: !0,
355
+ configurable: !0,
356
+ writable: !0,
357
+ value: "Provider.IsUndefinedError"
358
+ });
359
+ }
360
+ }
2
361
  export {
3
- s as __exports
362
+ m as AtomicReadyWalletRejectedUpgradeError,
363
+ w as AtomicityNotSupportedError,
364
+ h as BundleTooLargeError,
365
+ l as ChainDisconnectedError,
366
+ c as DisconnectedError,
367
+ f as DuplicateIdError,
368
+ E as IsUndefinedError,
369
+ u as ProviderRpcError,
370
+ d as SwitchChainError,
371
+ a as UnauthorizedError,
372
+ p as UnknownBundleIdError,
373
+ s as UnsupportedChainIdError,
374
+ i as UnsupportedMethodError,
375
+ b as UnsupportedNonOptionalCapabilityError,
376
+ n as UserRejectedRequestError,
377
+ q as from,
378
+ O as parseError
4
379
  };
@@ -1,4 +1,2 @@
1
- var e = {};
2
- export {
3
- e as __exports
4
- };
1
+ import { __require as e } from "./index.native149.js";
2
+ e();
@@ -1,20 +1,68 @@
1
- import { toHex as i } from "./index.native65.js";
2
- import { toYParitySignatureArray as c } from "./index.native46.js";
3
- function f(r) {
4
- if (!r || r.length === 0)
5
- return [];
6
- const t = [];
7
- for (const o of r) {
8
- const { chainId: n, nonce: e, ...s } = o, a = o.address;
9
- t.push([
10
- n ? i(n) : "0x",
11
- a,
12
- e ? i(e) : "0x",
13
- ...c({}, s)
14
- ]);
1
+ import { getVersion as n } from "./index.native112.js";
2
+ class s extends Error {
3
+ constructor(r, e = {}) {
4
+ const a = (() => {
5
+ if (e.cause instanceof s) {
6
+ if (e.cause.details)
7
+ return e.cause.details;
8
+ if (e.cause.shortMessage)
9
+ return e.cause.shortMessage;
10
+ }
11
+ return e.cause && "details" in e.cause && typeof e.cause.details == "string" ? e.cause.details : e.cause?.message ? e.cause.message : e.details;
12
+ })(), u = e.cause instanceof s && e.cause.docsPath || e.docsPath, c = `https://oxlib.sh${u ?? ""}`, l = [
13
+ r || "An error occurred.",
14
+ ...e.metaMessages ? ["", ...e.metaMessages] : [],
15
+ ...a || u ? [
16
+ "",
17
+ a ? `Details: ${a}` : void 0,
18
+ u ? `See: ${c}` : void 0
19
+ ] : []
20
+ ].filter((d) => typeof d == "string").join(`
21
+ `);
22
+ super(l, e.cause ? { cause: e.cause } : void 0), Object.defineProperty(this, "details", {
23
+ enumerable: !0,
24
+ configurable: !0,
25
+ writable: !0,
26
+ value: void 0
27
+ }), Object.defineProperty(this, "docs", {
28
+ enumerable: !0,
29
+ configurable: !0,
30
+ writable: !0,
31
+ value: void 0
32
+ }), Object.defineProperty(this, "docsPath", {
33
+ enumerable: !0,
34
+ configurable: !0,
35
+ writable: !0,
36
+ value: void 0
37
+ }), Object.defineProperty(this, "shortMessage", {
38
+ enumerable: !0,
39
+ configurable: !0,
40
+ writable: !0,
41
+ value: void 0
42
+ }), Object.defineProperty(this, "cause", {
43
+ enumerable: !0,
44
+ configurable: !0,
45
+ writable: !0,
46
+ value: void 0
47
+ }), Object.defineProperty(this, "name", {
48
+ enumerable: !0,
49
+ configurable: !0,
50
+ writable: !0,
51
+ value: "BaseError"
52
+ }), Object.defineProperty(this, "version", {
53
+ enumerable: !0,
54
+ configurable: !0,
55
+ writable: !0,
56
+ value: `ox@${n()}`
57
+ }), this.cause = e.cause, this.details = a, this.docs = c, this.docsPath = u, this.shortMessage = r;
15
58
  }
16
- return t;
59
+ walk(r) {
60
+ return i(this, r);
61
+ }
62
+ }
63
+ function i(t, r) {
64
+ return r?.(t) ? t : t && typeof t == "object" && "cause" in t && t.cause ? i(t.cause, r) : r ? null : t;
17
65
  }
18
66
  export {
19
- f as serializeAuthorizationList
67
+ s as BaseError
20
68
  };