@coinbase/cdp-core 0.0.91 → 0.0.92

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 (335) hide show
  1. package/dist/esm/index.native104.js +1 -1
  2. package/dist/esm/index.native106.js +4 -4
  3. package/dist/esm/index.native107.js +3 -3
  4. package/dist/esm/index.native108.js +2 -31
  5. package/dist/esm/index.native109.js +65 -28
  6. package/dist/esm/index.native110.js +367 -2
  7. package/dist/esm/index.native111.js +28 -65
  8. package/dist/esm/index.native112.js +28 -364
  9. package/dist/esm/index.native117.js +11 -53
  10. package/dist/esm/index.native118.js +11 -10
  11. package/dist/esm/index.native119.js +55 -2
  12. package/dist/esm/index.native120.js +11 -45
  13. package/dist/esm/index.native121.js +2 -14
  14. package/dist/esm/index.native122.js +44 -12
  15. package/dist/esm/index.native123.js +13 -11
  16. package/dist/esm/index.native124.js +2 -2
  17. package/dist/esm/index.native130.js +1 -1
  18. package/dist/esm/index.native149.js +1 -1
  19. package/dist/esm/index.native151.js +1 -1
  20. package/dist/esm/index.native154.js +2 -2
  21. package/dist/esm/index.native162.js +1 -1
  22. package/dist/esm/index.native163.js +1 -1
  23. package/dist/esm/index.native164.js +2 -2
  24. package/dist/esm/index.native168.js +102 -19
  25. package/dist/esm/index.native169.js +79 -10
  26. package/dist/esm/index.native170.js +80 -20
  27. package/dist/esm/index.native171.js +14 -94
  28. package/dist/esm/index.native172.js +27 -20
  29. package/dist/esm/index.native173.js +8 -118
  30. package/dist/esm/index.native174.js +3 -103
  31. package/dist/esm/index.native175.js +26 -77
  32. package/dist/esm/index.native176.js +8 -79
  33. package/dist/esm/index.native177.js +7 -13
  34. package/dist/esm/index.native178.js +71 -19
  35. package/dist/esm/index.native179.js +27 -7
  36. package/dist/esm/index.native180.js +3 -3
  37. package/dist/esm/index.native181.js +6 -19
  38. package/dist/esm/index.native182.js +4 -8
  39. package/dist/esm/index.native183.js +13 -7
  40. package/dist/esm/index.native184.js +18 -78
  41. package/dist/esm/index.native185.js +47 -14
  42. package/dist/esm/index.native186.js +17 -3
  43. package/dist/esm/index.native187.js +23 -14
  44. package/dist/esm/index.native188.js +8 -4
  45. package/dist/esm/index.native189.js +33 -5
  46. package/dist/esm/index.native190.js +7 -19
  47. package/dist/esm/index.native191.js +15 -55
  48. package/dist/esm/index.native192.js +20 -17
  49. package/dist/esm/index.native193.js +10 -24
  50. package/dist/esm/index.native194.js +20 -9
  51. package/dist/esm/index.native195.js +93 -41
  52. package/dist/esm/index.native196.js +21 -8
  53. package/dist/esm/index.native197.js +117 -20
  54. package/dist/esm/index.native198.js +2 -8
  55. package/dist/esm/index.native199.js +39 -2
  56. package/dist/esm/index.native200.js +2 -378
  57. package/dist/esm/index.native201.js +69 -835
  58. package/dist/esm/index.native202.js +33 -37
  59. package/dist/esm/index.native203.js +21 -2
  60. package/dist/esm/index.native204.js +7 -69
  61. package/dist/esm/index.native205.js +2 -35
  62. package/dist/esm/index.native206.js +374 -17
  63. package/dist/esm/index.native207.js +836 -2
  64. package/dist/esm/index.native213.js +32 -6
  65. package/dist/esm/index.native214.js +6 -32
  66. package/dist/esm/index.native215.js +3 -17
  67. package/dist/esm/index.native216.js +18 -28
  68. package/dist/esm/index.native217.js +26 -6
  69. package/dist/esm/index.native218.js +6 -9
  70. package/dist/esm/index.native219.js +11 -13
  71. package/dist/esm/index.native220.js +11 -8
  72. package/dist/esm/index.native221.js +7 -14
  73. package/dist/esm/index.native222.js +16 -80
  74. package/dist/esm/index.native223.js +80 -3
  75. package/dist/esm/index.native224.js +2 -2
  76. package/dist/esm/index.native225.js +2 -2
  77. package/dist/esm/index.native226.js +2 -2
  78. package/dist/esm/index.native227.js +1 -1
  79. package/dist/esm/index.native3.js +1 -1
  80. package/dist/esm/index.native88.js +2 -2
  81. package/dist/esm/index.native9.js +1 -1
  82. package/dist/esm/index.native92.js +2 -2
  83. package/dist/esm/index.web105.js +1 -1
  84. package/dist/esm/index.web107.js +4 -4
  85. package/dist/esm/index.web108.js +3 -3
  86. package/dist/esm/index.web109.js +31 -2
  87. package/dist/esm/index.web110.js +28 -65
  88. package/dist/esm/index.web111.js +2 -367
  89. package/dist/esm/index.web112.js +65 -28
  90. package/dist/esm/index.web113.js +364 -28
  91. package/dist/esm/index.web118.js +53 -11
  92. package/dist/esm/index.web119.js +10 -11
  93. package/dist/esm/index.web120.js +2 -55
  94. package/dist/esm/index.web121.js +45 -11
  95. package/dist/esm/index.web122.js +14 -2
  96. package/dist/esm/index.web123.js +12 -44
  97. package/dist/esm/index.web124.js +11 -13
  98. package/dist/esm/index.web125.js +2 -2
  99. package/dist/esm/index.web129.js +1 -1
  100. package/dist/esm/index.web148.js +1 -1
  101. package/dist/esm/index.web150.js +1 -1
  102. package/dist/esm/index.web153.js +2 -2
  103. package/dist/esm/index.web161.js +1 -1
  104. package/dist/esm/index.web162.js +1 -1
  105. package/dist/esm/index.web163.js +2 -2
  106. package/dist/esm/index.web167.js +19 -102
  107. package/dist/esm/index.web168.js +10 -79
  108. package/dist/esm/index.web169.js +20 -80
  109. package/dist/esm/index.web170.js +94 -15
  110. package/dist/esm/index.web171.js +20 -28
  111. package/dist/esm/index.web172.js +118 -8
  112. package/dist/esm/index.web173.js +103 -3
  113. package/dist/esm/index.web174.js +77 -27
  114. package/dist/esm/index.web175.js +79 -8
  115. package/dist/esm/index.web176.js +14 -7
  116. package/dist/esm/index.web177.js +18 -70
  117. package/dist/esm/index.web178.js +7 -28
  118. package/dist/esm/index.web179.js +3 -3
  119. package/dist/esm/index.web180.js +19 -6
  120. package/dist/esm/index.web181.js +8 -4
  121. package/dist/esm/index.web182.js +7 -14
  122. package/dist/esm/index.web183.js +79 -18
  123. package/dist/esm/index.web184.js +15 -48
  124. package/dist/esm/index.web185.js +3 -17
  125. package/dist/esm/index.web186.js +15 -23
  126. package/dist/esm/index.web187.js +4 -8
  127. package/dist/esm/index.web188.js +5 -33
  128. package/dist/esm/index.web189.js +19 -7
  129. package/dist/esm/index.web190.js +57 -16
  130. package/dist/esm/index.web191.js +17 -20
  131. package/dist/esm/index.web192.js +24 -10
  132. package/dist/esm/index.web193.js +9 -20
  133. package/dist/esm/index.web194.js +42 -93
  134. package/dist/esm/index.web195.js +8 -21
  135. package/dist/esm/index.web196.js +20 -117
  136. package/dist/esm/index.web197.js +8 -2
  137. package/dist/esm/index.web198.js +2 -8
  138. package/dist/esm/index.web199.js +378 -2
  139. package/dist/esm/index.web200.js +812 -354
  140. package/dist/esm/index.web201.js +38 -835
  141. package/dist/esm/index.web202.js +2 -39
  142. package/dist/esm/index.web203.js +70 -2
  143. package/dist/esm/index.web204.js +31 -66
  144. package/dist/esm/index.web205.js +19 -33
  145. package/dist/esm/index.web206.js +2 -21
  146. package/dist/esm/index.web212.js +32 -6
  147. package/dist/esm/index.web213.js +6 -32
  148. package/dist/esm/index.web214.js +17 -3
  149. package/dist/esm/index.web215.js +28 -2
  150. package/dist/esm/index.web216.js +8 -2
  151. package/dist/esm/index.web217.js +11 -2
  152. package/dist/esm/index.web218.js +11 -16
  153. package/dist/esm/index.web219.js +10 -28
  154. package/dist/esm/index.web220.js +17 -8
  155. package/dist/esm/index.web221.js +79 -9
  156. package/dist/esm/index.web222.js +3 -12
  157. package/dist/esm/index.web223.js +2 -10
  158. package/dist/esm/index.web224.js +2 -17
  159. package/dist/esm/index.web225.js +2 -81
  160. package/dist/esm/index.web226.js +1 -1
  161. package/dist/esm/index.web3.js +1 -1
  162. package/dist/esm/index.web8.js +1 -1
  163. package/dist/esm/index.web90.js +2 -2
  164. package/dist/esm/index.web94.js +2 -2
  165. package/dist/native/index.native104.js +1 -1
  166. package/dist/native/index.native106.js +4 -4
  167. package/dist/native/index.native107.js +3 -3
  168. package/dist/native/index.native108.js +2 -31
  169. package/dist/native/index.native109.js +65 -28
  170. package/dist/native/index.native110.js +367 -2
  171. package/dist/native/index.native111.js +28 -65
  172. package/dist/native/index.native112.js +28 -364
  173. package/dist/native/index.native117.js +11 -53
  174. package/dist/native/index.native118.js +11 -10
  175. package/dist/native/index.native119.js +55 -2
  176. package/dist/native/index.native120.js +11 -45
  177. package/dist/native/index.native121.js +2 -14
  178. package/dist/native/index.native122.js +44 -12
  179. package/dist/native/index.native123.js +13 -11
  180. package/dist/native/index.native124.js +2 -2
  181. package/dist/native/index.native130.js +1 -1
  182. package/dist/native/index.native149.js +1 -1
  183. package/dist/native/index.native151.js +1 -1
  184. package/dist/native/index.native154.js +2 -2
  185. package/dist/native/index.native162.js +1 -1
  186. package/dist/native/index.native163.js +1 -1
  187. package/dist/native/index.native164.js +2 -2
  188. package/dist/native/index.native168.js +102 -19
  189. package/dist/native/index.native169.js +79 -10
  190. package/dist/native/index.native170.js +80 -20
  191. package/dist/native/index.native171.js +14 -94
  192. package/dist/native/index.native172.js +27 -20
  193. package/dist/native/index.native173.js +8 -118
  194. package/dist/native/index.native174.js +3 -103
  195. package/dist/native/index.native175.js +26 -77
  196. package/dist/native/index.native176.js +8 -79
  197. package/dist/native/index.native177.js +7 -13
  198. package/dist/native/index.native178.js +71 -19
  199. package/dist/native/index.native179.js +27 -7
  200. package/dist/native/index.native180.js +3 -3
  201. package/dist/native/index.native181.js +6 -19
  202. package/dist/native/index.native182.js +4 -8
  203. package/dist/native/index.native183.js +13 -7
  204. package/dist/native/index.native184.js +18 -78
  205. package/dist/native/index.native185.js +47 -14
  206. package/dist/native/index.native186.js +17 -3
  207. package/dist/native/index.native187.js +23 -14
  208. package/dist/native/index.native188.js +8 -4
  209. package/dist/native/index.native189.js +33 -5
  210. package/dist/native/index.native190.js +7 -19
  211. package/dist/native/index.native191.js +15 -55
  212. package/dist/native/index.native192.js +20 -17
  213. package/dist/native/index.native193.js +10 -24
  214. package/dist/native/index.native194.js +20 -9
  215. package/dist/native/index.native195.js +93 -41
  216. package/dist/native/index.native196.js +21 -8
  217. package/dist/native/index.native197.js +117 -20
  218. package/dist/native/index.native198.js +2 -8
  219. package/dist/native/index.native199.js +39 -2
  220. package/dist/native/index.native200.js +2 -378
  221. package/dist/native/index.native201.js +69 -835
  222. package/dist/native/index.native202.js +33 -37
  223. package/dist/native/index.native203.js +21 -2
  224. package/dist/native/index.native204.js +7 -69
  225. package/dist/native/index.native205.js +2 -35
  226. package/dist/native/index.native206.js +374 -17
  227. package/dist/native/index.native207.js +836 -2
  228. package/dist/native/index.native213.js +32 -6
  229. package/dist/native/index.native214.js +6 -32
  230. package/dist/native/index.native215.js +3 -17
  231. package/dist/native/index.native216.js +18 -28
  232. package/dist/native/index.native217.js +26 -6
  233. package/dist/native/index.native218.js +6 -9
  234. package/dist/native/index.native219.js +11 -13
  235. package/dist/native/index.native220.js +11 -8
  236. package/dist/native/index.native221.js +7 -14
  237. package/dist/native/index.native222.js +16 -80
  238. package/dist/native/index.native223.js +80 -3
  239. package/dist/native/index.native224.js +2 -2
  240. package/dist/native/index.native225.js +2 -2
  241. package/dist/native/index.native226.js +2 -2
  242. package/dist/native/index.native227.js +1 -1
  243. package/dist/native/index.native3.js +1 -1
  244. package/dist/native/index.native88.js +2 -2
  245. package/dist/native/index.native9.js +1 -1
  246. package/dist/native/index.native92.js +2 -2
  247. package/dist/native-types/index.d.ts +1 -0
  248. package/dist/native-types/version.d.ts +1 -1
  249. package/dist/types/index.d.ts +1 -0
  250. package/dist/types/version.d.ts +1 -1
  251. package/dist/web/index.web105.js +1 -1
  252. package/dist/web/index.web107.js +4 -4
  253. package/dist/web/index.web108.js +3 -3
  254. package/dist/web/index.web109.js +31 -2
  255. package/dist/web/index.web110.js +28 -65
  256. package/dist/web/index.web111.js +2 -367
  257. package/dist/web/index.web112.js +65 -28
  258. package/dist/web/index.web113.js +364 -28
  259. package/dist/web/index.web118.js +53 -11
  260. package/dist/web/index.web119.js +10 -11
  261. package/dist/web/index.web120.js +2 -55
  262. package/dist/web/index.web121.js +45 -11
  263. package/dist/web/index.web122.js +14 -2
  264. package/dist/web/index.web123.js +12 -44
  265. package/dist/web/index.web124.js +11 -13
  266. package/dist/web/index.web125.js +2 -2
  267. package/dist/web/index.web129.js +1 -1
  268. package/dist/web/index.web148.js +1 -1
  269. package/dist/web/index.web150.js +1 -1
  270. package/dist/web/index.web153.js +2 -2
  271. package/dist/web/index.web161.js +1 -1
  272. package/dist/web/index.web162.js +1 -1
  273. package/dist/web/index.web163.js +2 -2
  274. package/dist/web/index.web167.js +19 -102
  275. package/dist/web/index.web168.js +10 -79
  276. package/dist/web/index.web169.js +20 -80
  277. package/dist/web/index.web170.js +94 -15
  278. package/dist/web/index.web171.js +20 -28
  279. package/dist/web/index.web172.js +118 -8
  280. package/dist/web/index.web173.js +103 -3
  281. package/dist/web/index.web174.js +77 -27
  282. package/dist/web/index.web175.js +79 -8
  283. package/dist/web/index.web176.js +14 -7
  284. package/dist/web/index.web177.js +18 -70
  285. package/dist/web/index.web178.js +7 -28
  286. package/dist/web/index.web179.js +3 -3
  287. package/dist/web/index.web180.js +19 -6
  288. package/dist/web/index.web181.js +8 -4
  289. package/dist/web/index.web182.js +7 -14
  290. package/dist/web/index.web183.js +79 -18
  291. package/dist/web/index.web184.js +15 -48
  292. package/dist/web/index.web185.js +3 -17
  293. package/dist/web/index.web186.js +15 -23
  294. package/dist/web/index.web187.js +4 -8
  295. package/dist/web/index.web188.js +5 -33
  296. package/dist/web/index.web189.js +19 -7
  297. package/dist/web/index.web190.js +57 -16
  298. package/dist/web/index.web191.js +17 -20
  299. package/dist/web/index.web192.js +24 -10
  300. package/dist/web/index.web193.js +9 -20
  301. package/dist/web/index.web194.js +42 -93
  302. package/dist/web/index.web195.js +8 -21
  303. package/dist/web/index.web196.js +20 -117
  304. package/dist/web/index.web197.js +8 -2
  305. package/dist/web/index.web198.js +2 -8
  306. package/dist/web/index.web199.js +378 -2
  307. package/dist/web/index.web200.js +812 -354
  308. package/dist/web/index.web201.js +38 -835
  309. package/dist/web/index.web202.js +2 -39
  310. package/dist/web/index.web203.js +70 -2
  311. package/dist/web/index.web204.js +31 -66
  312. package/dist/web/index.web205.js +19 -33
  313. package/dist/web/index.web206.js +2 -21
  314. package/dist/web/index.web212.js +32 -6
  315. package/dist/web/index.web213.js +6 -32
  316. package/dist/web/index.web214.js +17 -3
  317. package/dist/web/index.web215.js +28 -2
  318. package/dist/web/index.web216.js +8 -2
  319. package/dist/web/index.web217.js +11 -2
  320. package/dist/web/index.web218.js +11 -16
  321. package/dist/web/index.web219.js +10 -28
  322. package/dist/web/index.web220.js +17 -8
  323. package/dist/web/index.web221.js +79 -9
  324. package/dist/web/index.web222.js +3 -12
  325. package/dist/web/index.web223.js +2 -10
  326. package/dist/web/index.web224.js +2 -17
  327. package/dist/web/index.web225.js +2 -81
  328. package/dist/web/index.web226.js +1 -1
  329. package/dist/web/index.web3.js +1 -1
  330. package/dist/web/index.web8.js +1 -1
  331. package/dist/web/index.web90.js +2 -2
  332. package/dist/web/index.web94.js +2 -2
  333. package/dist/web-types/index.d.ts +1 -0
  334. package/dist/web-types/version.d.ts +1 -1
  335. package/package.json +2 -2
@@ -1,9 +1,35 @@
1
- import { bytesToHex as i } from "./index.native132.js";
2
- import { sha256 as m } from "./index.native150.js";
3
- function f(t) {
4
- const { commitment: e, version: s = 1 } = t, n = t.to ?? (typeof e == "string" ? "hex" : "bytes"), o = m(e);
5
- return o.set([s], 0), n === "bytes" ? o : i(o);
1
+ import { maxBytesPerTransaction as y, bytesPerBlob as a, fieldElementsPerBlob as f, bytesPerFieldElement as p } from "./index.native228.js";
2
+ import { EmptyBlobError as c, BlobSizeTooLargeError as h } from "./index.native157.js";
3
+ import { createCursor as B } from "./index.native146.js";
4
+ import { size as u } from "./index.native141.js";
5
+ import { hexToBytes as x } from "./index.native134.js";
6
+ import { bytesToHex as d } from "./index.native132.js";
7
+ function S(e) {
8
+ const m = e.to ?? (typeof e.data == "string" ? "hex" : "bytes"), i = typeof e.data == "string" ? x(e.data) : e.data, o = u(i);
9
+ if (!o)
10
+ throw new c();
11
+ if (o > y)
12
+ throw new h({
13
+ maxSize: y,
14
+ size: o
15
+ });
16
+ const s = [];
17
+ let n = !0, r = 0;
18
+ for (; n; ) {
19
+ const t = B(new Uint8Array(a));
20
+ let l = 0;
21
+ for (; l < f; ) {
22
+ const b = i.slice(r, r + (p - 1));
23
+ if (t.pushByte(0), t.pushBytes(b), b.length < 31) {
24
+ t.pushByte(128), n = !1;
25
+ break;
26
+ }
27
+ l++, r += 31;
28
+ }
29
+ s.push(t);
30
+ }
31
+ return m === "bytes" ? s.map((t) => t.bytes) : s.map((t) => d(t.bytes));
6
32
  }
7
33
  export {
8
- f as commitmentToVersionedHash
34
+ S as toBlobs
9
35
  };
@@ -1,35 +1,9 @@
1
- import { maxBytesPerTransaction as y, bytesPerBlob as a, fieldElementsPerBlob as f, bytesPerFieldElement as p } from "./index.native228.js";
2
- import { EmptyBlobError as c, BlobSizeTooLargeError as h } from "./index.native157.js";
3
- import { createCursor as B } from "./index.native146.js";
4
- import { size as u } from "./index.native141.js";
5
- import { hexToBytes as x } from "./index.native134.js";
6
- import { bytesToHex as d } from "./index.native132.js";
7
- function S(e) {
8
- const m = e.to ?? (typeof e.data == "string" ? "hex" : "bytes"), i = typeof e.data == "string" ? x(e.data) : e.data, o = u(i);
9
- if (!o)
10
- throw new c();
11
- if (o > y)
12
- throw new h({
13
- maxSize: y,
14
- size: o
15
- });
16
- const s = [];
17
- let n = !0, r = 0;
18
- for (; n; ) {
19
- const t = B(new Uint8Array(a));
20
- let l = 0;
21
- for (; l < f; ) {
22
- const b = i.slice(r, r + (p - 1));
23
- if (t.pushByte(0), t.pushBytes(b), b.length < 31) {
24
- t.pushByte(128), n = !1;
25
- break;
26
- }
27
- l++, r += 31;
28
- }
29
- s.push(t);
30
- }
31
- return m === "bytes" ? s.map((t) => t.bytes) : s.map((t) => d(t.bytes));
1
+ import { bytesToHex as i } from "./index.native132.js";
2
+ import { sha256 as m } from "./index.native150.js";
3
+ function f(t) {
4
+ const { commitment: e, version: s = 1 } = t, n = t.to ?? (typeof e == "string" ? "hex" : "bytes"), o = m(e);
5
+ return o.set([s], 0), n === "bytes" ? o : i(o);
32
6
  }
33
7
  export {
34
- S as toBlobs
8
+ f as commitmentToVersionedHash
35
9
  };
@@ -1,20 +1,6 @@
1
- function o(t) {
2
- if (Uint8Array.prototype.toBase64)
3
- return t.toBase64();
4
- const e = 32768, n = [];
5
- for (let r = 0; r < t.length; r += e)
6
- n.push(String.fromCharCode.apply(null, t.subarray(r, r + e)));
7
- return btoa(n.join(""));
8
- }
9
- function a(t) {
10
- if (Uint8Array.fromBase64)
11
- return Uint8Array.fromBase64(t);
12
- const e = atob(t), n = new Uint8Array(e.length);
13
- for (let r = 0; r < e.length; r++)
14
- n[r] = e.charCodeAt(r);
15
- return n;
1
+ function e(t) {
2
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
16
3
  }
17
4
  export {
18
- a as decodeBase64,
19
- o as encodeBase64
5
+ e as getDefaultExportFromCjs
20
6
  };
@@ -1,30 +1,20 @@
1
- import { JOSENotSupported as r } from "./index.native105.js";
2
- const S = (e, s) => {
3
- const a = `SHA-${e.slice(-3)}`;
4
- switch (e) {
5
- case "HS256":
6
- case "HS384":
7
- case "HS512":
8
- return { hash: a, name: "HMAC" };
9
- case "PS256":
10
- case "PS384":
11
- case "PS512":
12
- return { hash: a, name: "RSA-PSS", saltLength: parseInt(e.slice(-3), 10) >> 3 };
13
- case "RS256":
14
- case "RS384":
15
- case "RS512":
16
- return { hash: a, name: "RSASSA-PKCS1-v1_5" };
17
- case "ES256":
18
- case "ES384":
19
- case "ES512":
20
- return { hash: a, name: "ECDSA", namedCurve: s.namedCurve };
21
- case "Ed25519":
22
- case "EdDSA":
23
- return { name: "Ed25519" };
24
- default:
25
- throw new r(`alg ${e} is not supported either by JOSE or your javascript runtime`);
26
- }
27
- };
1
+ function o(t) {
2
+ if (Uint8Array.prototype.toBase64)
3
+ return t.toBase64();
4
+ const e = 32768, n = [];
5
+ for (let r = 0; r < t.length; r += e)
6
+ n.push(String.fromCharCode.apply(null, t.subarray(r, r + e)));
7
+ return btoa(n.join(""));
8
+ }
9
+ function a(t) {
10
+ if (Uint8Array.fromBase64)
11
+ return Uint8Array.fromBase64(t);
12
+ const e = atob(t), n = new Uint8Array(e.length);
13
+ for (let r = 0; r < e.length; r++)
14
+ n[r] = e.charCodeAt(r);
15
+ return n;
16
+ }
28
17
  export {
29
- S as default
18
+ a as decodeBase64,
19
+ o as encodeBase64
30
20
  };
@@ -1,10 +1,30 @@
1
- const o = (t, r) => {
2
- if (t.startsWith("RS") || t.startsWith("PS")) {
3
- const { modulusLength: e } = r.algorithm;
4
- if (typeof e != "number" || e < 2048)
5
- throw new TypeError(`${t} requires key modulusLength to be 2048 bits or larger`);
1
+ import { JOSENotSupported as r } from "./index.native105.js";
2
+ const S = (e, s) => {
3
+ const a = `SHA-${e.slice(-3)}`;
4
+ switch (e) {
5
+ case "HS256":
6
+ case "HS384":
7
+ case "HS512":
8
+ return { hash: a, name: "HMAC" };
9
+ case "PS256":
10
+ case "PS384":
11
+ case "PS512":
12
+ return { hash: a, name: "RSA-PSS", saltLength: parseInt(e.slice(-3), 10) >> 3 };
13
+ case "RS256":
14
+ case "RS384":
15
+ case "RS512":
16
+ return { hash: a, name: "RSASSA-PKCS1-v1_5" };
17
+ case "ES256":
18
+ case "ES384":
19
+ case "ES512":
20
+ return { hash: a, name: "ECDSA", namedCurve: s.namedCurve };
21
+ case "Ed25519":
22
+ case "EdDSA":
23
+ return { name: "Ed25519" };
24
+ default:
25
+ throw new r(`alg ${e} is not supported either by JOSE or your javascript runtime`);
6
26
  }
7
27
  };
8
28
  export {
9
- o as default
29
+ S as default
10
30
  };
@@ -1,13 +1,10 @@
1
- import { checkSigCryptoKey as i } from "./index.native229.js";
2
- import o from "./index.native219.js";
3
- const s = async (t, r, e) => {
4
- if (r instanceof Uint8Array) {
5
- if (!t.startsWith("HS"))
6
- throw new TypeError(o(r, "CryptoKey", "KeyObject", "JSON Web Key"));
7
- return crypto.subtle.importKey("raw", r, { hash: `SHA-${t.slice(-3)}`, name: "HMAC" }, !1, [e]);
1
+ const o = (t, r) => {
2
+ if (t.startsWith("RS") || t.startsWith("PS")) {
3
+ const { modulusLength: e } = r.algorithm;
4
+ if (typeof e != "number" || e < 2048)
5
+ throw new TypeError(`${t} requires key modulusLength to be 2048 bits or larger`);
8
6
  }
9
- return i(r, t, e), r;
10
7
  };
11
8
  export {
12
- s as default
9
+ o as default
13
10
  };
@@ -1,15 +1,13 @@
1
- function i(n, e, ...o) {
2
- if (o = o.filter(Boolean), o.length > 2) {
3
- const f = o.pop();
4
- n += `one of type ${o.join(", ")}, or ${f}.`;
5
- } else o.length === 2 ? n += `one of type ${o[0]} or ${o[1]}.` : n += `of type ${o[0]}.`;
6
- return e == null ? n += ` Received ${e}` : typeof e == "function" && e.name ? n += ` Received function ${e.name}` : typeof e == "object" && e != null && e.constructor?.name && (n += ` Received an instance of ${e.constructor.name}`), n;
7
- }
8
- const r = (n, ...e) => i("Key must be ", n, ...e);
9
- function t(n, e, ...o) {
10
- return i(`Key for the ${n} algorithm must be `, e, ...o);
11
- }
1
+ import { checkSigCryptoKey as i } from "./index.native229.js";
2
+ import o from "./index.native220.js";
3
+ const s = async (t, r, e) => {
4
+ if (r instanceof Uint8Array) {
5
+ if (!t.startsWith("HS"))
6
+ throw new TypeError(o(r, "CryptoKey", "KeyObject", "JSON Web Key"));
7
+ return crypto.subtle.importKey("raw", r, { hash: `SHA-${t.slice(-3)}`, name: "HMAC" }, !1, [e]);
8
+ }
9
+ return i(r, t, e), r;
10
+ };
12
11
  export {
13
- r as default,
14
- t as withAlg
12
+ s as default
15
13
  };
@@ -1,12 +1,15 @@
1
- function e(t) {
2
- return t?.[Symbol.toStringTag] === "CryptoKey";
1
+ function i(n, e, ...o) {
2
+ if (o = o.filter(Boolean), o.length > 2) {
3
+ const f = o.pop();
4
+ n += `one of type ${o.join(", ")}, or ${f}.`;
5
+ } else o.length === 2 ? n += `one of type ${o[0]} or ${o[1]}.` : n += `of type ${o[0]}.`;
6
+ return e == null ? n += ` Received ${e}` : typeof e == "function" && e.name ? n += ` Received function ${e.name}` : typeof e == "object" && e != null && e.constructor?.name && (n += ` Received an instance of ${e.constructor.name}`), n;
3
7
  }
4
- function r(t) {
5
- return t?.[Symbol.toStringTag] === "KeyObject";
8
+ const r = (n, ...e) => i("Key must be ", n, ...e);
9
+ function t(n, e, ...o) {
10
+ return i(`Key for the ${n} algorithm must be `, e, ...o);
6
11
  }
7
- const n = (t) => e(t) || r(t);
8
12
  export {
9
- n as default,
10
- e as isCryptoKey,
11
- r as isKeyObject
13
+ r as default,
14
+ t as withAlg
12
15
  };
@@ -1,19 +1,12 @@
1
- import n from "./index.native121.js";
2
- function r(t) {
3
- return n(t) && typeof t.kty == "string";
4
- }
5
- function o(t) {
6
- return t.kty !== "oct" && typeof t.d == "string";
7
- }
8
1
  function e(t) {
9
- return t.kty !== "oct" && typeof t.d > "u";
2
+ return t?.[Symbol.toStringTag] === "CryptoKey";
10
3
  }
11
- function c(t) {
12
- return t.kty === "oct" && typeof t.k == "string";
4
+ function r(t) {
5
+ return t?.[Symbol.toStringTag] === "KeyObject";
13
6
  }
7
+ const n = (t) => e(t) || r(t);
14
8
  export {
15
- r as isJWK,
16
- o as isPrivateJWK,
17
- e as isPublicJWK,
18
- c as isSecretJWK
9
+ n as default,
10
+ e as isCryptoKey,
11
+ r as isKeyObject
19
12
  };
@@ -1,83 +1,19 @@
1
- import { JOSENotSupported as s } from "./index.native105.js";
2
- function n(e) {
3
- let a, r;
4
- switch (e.kty) {
5
- case "RSA": {
6
- switch (e.alg) {
7
- case "PS256":
8
- case "PS384":
9
- case "PS512":
10
- a = { name: "RSA-PSS", hash: `SHA-${e.alg.slice(-3)}` }, r = e.d ? ["sign"] : ["verify"];
11
- break;
12
- case "RS256":
13
- case "RS384":
14
- case "RS512":
15
- a = { name: "RSASSA-PKCS1-v1_5", hash: `SHA-${e.alg.slice(-3)}` }, r = e.d ? ["sign"] : ["verify"];
16
- break;
17
- case "RSA-OAEP":
18
- case "RSA-OAEP-256":
19
- case "RSA-OAEP-384":
20
- case "RSA-OAEP-512":
21
- a = {
22
- name: "RSA-OAEP",
23
- hash: `SHA-${parseInt(e.alg.slice(-3), 10) || 1}`
24
- }, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
25
- break;
26
- default:
27
- throw new s('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
28
- }
29
- break;
30
- }
31
- case "EC": {
32
- switch (e.alg) {
33
- case "ES256":
34
- a = { name: "ECDSA", namedCurve: "P-256" }, r = e.d ? ["sign"] : ["verify"];
35
- break;
36
- case "ES384":
37
- a = { name: "ECDSA", namedCurve: "P-384" }, r = e.d ? ["sign"] : ["verify"];
38
- break;
39
- case "ES512":
40
- a = { name: "ECDSA", namedCurve: "P-521" }, r = e.d ? ["sign"] : ["verify"];
41
- break;
42
- case "ECDH-ES":
43
- case "ECDH-ES+A128KW":
44
- case "ECDH-ES+A192KW":
45
- case "ECDH-ES+A256KW":
46
- a = { name: "ECDH", namedCurve: e.crv }, r = e.d ? ["deriveBits"] : [];
47
- break;
48
- default:
49
- throw new s('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
50
- }
51
- break;
52
- }
53
- case "OKP": {
54
- switch (e.alg) {
55
- case "Ed25519":
56
- case "EdDSA":
57
- a = { name: "Ed25519" }, r = e.d ? ["sign"] : ["verify"];
58
- break;
59
- case "ECDH-ES":
60
- case "ECDH-ES+A128KW":
61
- case "ECDH-ES+A192KW":
62
- case "ECDH-ES+A256KW":
63
- a = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
64
- break;
65
- default:
66
- throw new s('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
67
- }
68
- break;
69
- }
70
- default:
71
- throw new s('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
72
- }
73
- return { algorithm: a, keyUsages: r };
1
+ import n from "./index.native123.js";
2
+ function r(t) {
3
+ return n(t) && typeof t.kty == "string";
4
+ }
5
+ function o(t) {
6
+ return t.kty !== "oct" && typeof t.d == "string";
7
+ }
8
+ function e(t) {
9
+ return t.kty !== "oct" && typeof t.d > "u";
10
+ }
11
+ function c(t) {
12
+ return t.kty === "oct" && typeof t.k == "string";
74
13
  }
75
- const i = async (e) => {
76
- if (!e.alg)
77
- throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
78
- const { algorithm: a, keyUsages: r } = n(e), t = { ...e };
79
- return delete t.alg, delete t.use, crypto.subtle.importKey("jwk", t, a, e.ext ?? !e.d, e.key_ops ?? r);
80
- };
81
14
  export {
82
- i as default
15
+ r as isJWK,
16
+ o as isPrivateJWK,
17
+ e as isPublicJWK,
18
+ c as isSecretJWK
83
19
  };
@@ -1,6 +1,83 @@
1
- function e(t) {
2
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
1
+ import { JOSENotSupported as s } from "./index.native105.js";
2
+ function n(e) {
3
+ let a, r;
4
+ switch (e.kty) {
5
+ case "RSA": {
6
+ switch (e.alg) {
7
+ case "PS256":
8
+ case "PS384":
9
+ case "PS512":
10
+ a = { name: "RSA-PSS", hash: `SHA-${e.alg.slice(-3)}` }, r = e.d ? ["sign"] : ["verify"];
11
+ break;
12
+ case "RS256":
13
+ case "RS384":
14
+ case "RS512":
15
+ a = { name: "RSASSA-PKCS1-v1_5", hash: `SHA-${e.alg.slice(-3)}` }, r = e.d ? ["sign"] : ["verify"];
16
+ break;
17
+ case "RSA-OAEP":
18
+ case "RSA-OAEP-256":
19
+ case "RSA-OAEP-384":
20
+ case "RSA-OAEP-512":
21
+ a = {
22
+ name: "RSA-OAEP",
23
+ hash: `SHA-${parseInt(e.alg.slice(-3), 10) || 1}`
24
+ }, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
25
+ break;
26
+ default:
27
+ throw new s('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
28
+ }
29
+ break;
30
+ }
31
+ case "EC": {
32
+ switch (e.alg) {
33
+ case "ES256":
34
+ a = { name: "ECDSA", namedCurve: "P-256" }, r = e.d ? ["sign"] : ["verify"];
35
+ break;
36
+ case "ES384":
37
+ a = { name: "ECDSA", namedCurve: "P-384" }, r = e.d ? ["sign"] : ["verify"];
38
+ break;
39
+ case "ES512":
40
+ a = { name: "ECDSA", namedCurve: "P-521" }, r = e.d ? ["sign"] : ["verify"];
41
+ break;
42
+ case "ECDH-ES":
43
+ case "ECDH-ES+A128KW":
44
+ case "ECDH-ES+A192KW":
45
+ case "ECDH-ES+A256KW":
46
+ a = { name: "ECDH", namedCurve: e.crv }, r = e.d ? ["deriveBits"] : [];
47
+ break;
48
+ default:
49
+ throw new s('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
50
+ }
51
+ break;
52
+ }
53
+ case "OKP": {
54
+ switch (e.alg) {
55
+ case "Ed25519":
56
+ case "EdDSA":
57
+ a = { name: "Ed25519" }, r = e.d ? ["sign"] : ["verify"];
58
+ break;
59
+ case "ECDH-ES":
60
+ case "ECDH-ES+A128KW":
61
+ case "ECDH-ES+A192KW":
62
+ case "ECDH-ES+A256KW":
63
+ a = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
64
+ break;
65
+ default:
66
+ throw new s('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
67
+ }
68
+ break;
69
+ }
70
+ default:
71
+ throw new s('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
72
+ }
73
+ return { algorithm: a, keyUsages: r };
3
74
  }
75
+ const i = async (e) => {
76
+ if (!e.alg)
77
+ throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
78
+ const { algorithm: a, keyUsages: r } = n(e), t = { ...e };
79
+ return delete t.alg, delete t.use, crypto.subtle.importKey("jwk", t, a, e.ext ?? !e.d, e.key_ops ?? r);
80
+ };
4
81
  export {
5
- e as getDefaultExportFromCjs
82
+ i as default
6
83
  };
@@ -1,4 +1,4 @@
1
- var r = {};
1
+ var r = { exports: {} };
2
2
  export {
3
- r as __exports
3
+ r as __module
4
4
  };
@@ -1,4 +1,4 @@
1
- var e = { exports: {} };
1
+ var r = {};
2
2
  export {
3
- e as __module
3
+ r as __exports
4
4
  };
@@ -1,4 +1,4 @@
1
- var r = { exports: {} };
1
+ var e = { exports: {} };
2
2
  export {
3
- r as __module
3
+ e as __module
4
4
  };
@@ -1,4 +1,4 @@
1
- import { BaseError as f } from "./index.native111.js";
1
+ import { BaseError as f } from "./index.native109.js";
2
2
  import { pad as g } from "./index.native230.js";
3
3
  function m(t, i = {}) {
4
4
  const { signed: r, size: e } = i, o = BigInt(t);
@@ -1,2 +1,2 @@
1
- import { __require as r } from "./index.native198.js";
1
+ import { __require as r } from "./index.native204.js";
2
2
  r();
@@ -1,5 +1,5 @@
1
- import { InvalidAddressError as s } from "./index.native122.js";
2
- import { isAddress as a } from "./index.native123.js";
1
+ import { InvalidAddressError as s } from "./index.native117.js";
2
+ import { isAddress as a } from "./index.native118.js";
3
3
  function r(n) {
4
4
  if (typeof n == "string") {
5
5
  if (!a(n, { strict: !1 }))
@@ -1,4 +1,4 @@
1
- const o = "0.0.91";
1
+ const o = "0.0.92";
2
2
  export {
3
3
  o as VERSION
4
4
  };
@@ -1,7 +1,7 @@
1
1
  import { DisconnectedError as l, from as d } from "./index.native107.js";
2
2
  import { validateRequest as h, EIP1193ProviderError as m, STANDARD_ERROR_CODES as _ } from "./index.native75.js";
3
- import { createEOAHandlers as p } from "./index.native108.js";
4
- import { createSmartAccountHandlers as g } from "./index.native109.js";
3
+ import { createEOAHandlers as p } from "./index.native111.js";
4
+ import { createSmartAccountHandlers as g } from "./index.native112.js";
5
5
  import "viem";
6
6
  import "zustand";
7
7
  import "@coinbase/cdp-api-client";
@@ -43,3 +43,4 @@ export * from './eip1193/types.js';
43
43
  export * from './secureIframe/index.js';
44
44
  export { createEvmKeyExportIframe, createSolanaKeyExportIframe, type CreateKeyExportIframeOptions, type CreateKeyExportIframeResult, } from './actions/createKeyExportIframe.js';
45
45
  export { getConfig } from './state.js';
46
+ export { toTransactionSigner } from './solana-kit/toTransactionSigner.js';
@@ -1 +1 @@
1
- export declare const VERSION = "0.0.91";
1
+ export declare const VERSION = "0.0.92";
@@ -43,3 +43,4 @@ export * from './eip1193/types.js';
43
43
  export * from './secureIframe/index.js';
44
44
  export { createEvmKeyExportIframe, createSolanaKeyExportIframe, type CreateKeyExportIframeOptions, type CreateKeyExportIframeResult, } from './actions/createKeyExportIframe.js';
45
45
  export { getConfig } from './state.js';
46
+ export { toTransactionSigner } from './solana-kit/toTransactionSigner.js';
@@ -1 +1 @@
1
- export declare const VERSION = "0.0.91";
1
+ export declare const VERSION = "0.0.92";
@@ -1,4 +1,4 @@
1
- import { FlattenedSign as n } from "./index.web120.js";
1
+ import { FlattenedSign as n } from "./index.web118.js";
2
2
  class o {
3
3
  #e;
4
4
  constructor(e) {
@@ -1,7 +1,7 @@
1
- import { encoder as n } from "./index.web121.js";
2
- import e from "./index.web122.js";
3
- import i from "./index.web123.js";
4
- import o from "./index.web124.js";
1
+ import { encoder as n } from "./index.web119.js";
2
+ import e from "./index.web120.js";
3
+ import i from "./index.web121.js";
4
+ import o from "./index.web122.js";
5
5
  function s(r, t) {
6
6
  if (!Number.isFinite(t))
7
7
  throw new TypeError(`Invalid ${r} input`);
@@ -1,6 +1,6 @@
1
- import "./index.web109.js";
2
- import { BaseError as P } from "./index.web110.js";
3
- import { parse as y, parseError as j, InternalError as g } from "./index.web111.js";
1
+ import "./index.web111.js";
2
+ import { BaseError as P } from "./index.web112.js";
3
+ import { parse as y, parseError as j, InternalError as g } from "./index.web113.js";
4
4
  class u extends Error {
5
5
  constructor(e, t) {
6
6
  super(t), Object.defineProperty(this, "name", {
@@ -1,2 +1,31 @@
1
- import { __require as e } from "./index.web207.js";
2
- e();
1
+ import { handleAccounts as t } from "./index.web176.js";
2
+ import { handleEthSign as e } from "./index.web177.js";
3
+ import { handleGetCallsStatus as a } from "./index.web178.js";
4
+ import { handleGetCapabilities as n } from "./index.web179.js";
5
+ import { handlePersonalSign as o } from "./index.web180.js";
6
+ import { handleRequestAccounts as r } from "./index.web181.js";
7
+ import { handleSendCalls as i } from "./index.web182.js";
8
+ import { handleSendTransaction as l } from "./index.web183.js";
9
+ import { handleSignTypedData as h } from "./index.web184.js";
10
+ import { handleChainId as s } from "./index.web185.js";
11
+ import { handleDisconnect as m } from "./index.web186.js";
12
+ import { handleSwitchEthereumChain as d } from "./index.web187.js";
13
+ function D() {
14
+ return {
15
+ eth_accounts: t,
16
+ eth_requestAccounts: r,
17
+ personal_sign: o,
18
+ eth_sendTransaction: l,
19
+ eth_signTypedData_v4: h,
20
+ wallet_disconnect: m,
21
+ wallet_switchEthereumChain: d,
22
+ eth_sign: e,
23
+ eth_chainId: s,
24
+ wallet_sendCalls: i,
25
+ wallet_getCallsStatus: a,
26
+ wallet_getCapabilities: n
27
+ };
28
+ }
29
+ export {
30
+ D as createEOAHandlers
31
+ };