@metamask/utils 8.4.0 → 8.5.0

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 (346) hide show
  1. package/CHANGELOG.md +14 -1
  2. package/dist/assert.cjs +127 -0
  3. package/dist/assert.cjs.map +1 -0
  4. package/dist/{types/assert.d.ts → assert.d.cts} +3 -3
  5. package/dist/assert.d.cts.map +1 -0
  6. package/dist/assert.d.mts +61 -0
  7. package/dist/assert.d.mts.map +1 -0
  8. package/dist/assert.mjs +119 -15
  9. package/dist/assert.mjs.map +1 -1
  10. package/dist/base64.cjs +34 -0
  11. package/dist/base64.cjs.map +1 -0
  12. package/dist/{types/base64.d.ts → base64.d.cts} +3 -3
  13. package/dist/base64.d.cts.map +1 -0
  14. package/dist/base64.d.mts +25 -0
  15. package/dist/base64.d.mts.map +1 -0
  16. package/dist/base64.mjs +28 -9
  17. package/dist/base64.mjs.map +1 -1
  18. package/dist/bytes.cjs +400 -0
  19. package/dist/{chunk-QEPVHEP7.js.map → bytes.cjs.map} +1 -1
  20. package/dist/{types/bytes.d.ts → bytes.d.cts} +3 -3
  21. package/dist/bytes.d.cts.map +1 -0
  22. package/dist/bytes.d.mts +183 -0
  23. package/dist/bytes.d.mts.map +1 -0
  24. package/dist/bytes.mjs +379 -42
  25. package/dist/bytes.mjs.map +1 -1
  26. package/dist/caip-types.cjs +151 -0
  27. package/dist/caip-types.cjs.map +1 -0
  28. package/dist/{types/caip-types.d.ts → caip-types.d.cts} +12 -12
  29. package/dist/caip-types.d.cts.map +1 -0
  30. package/dist/caip-types.d.mts +114 -0
  31. package/dist/caip-types.d.mts.map +1 -0
  32. package/dist/caip-types.mjs +139 -43
  33. package/dist/caip-types.mjs.map +1 -1
  34. package/dist/checksum.cjs +7 -0
  35. package/dist/checksum.cjs.map +1 -0
  36. package/dist/checksum.d.cts +2 -0
  37. package/dist/checksum.d.cts.map +1 -0
  38. package/dist/checksum.d.mts +2 -0
  39. package/dist/checksum.d.mts.map +1 -0
  40. package/dist/checksum.mjs +3 -11
  41. package/dist/checksum.mjs.map +1 -1
  42. package/dist/coercers.cjs +162 -0
  43. package/dist/coercers.cjs.map +1 -0
  44. package/dist/{types/coercers.d.ts → coercers.d.cts} +7 -7
  45. package/dist/coercers.d.cts.map +1 -0
  46. package/dist/coercers.d.mts +97 -0
  47. package/dist/coercers.d.mts.map +1 -0
  48. package/dist/coercers.mjs +154 -17
  49. package/dist/coercers.mjs.map +1 -1
  50. package/dist/collections.cjs +109 -0
  51. package/dist/collections.cjs.map +1 -0
  52. package/dist/{types/collections.d.ts → collections.d.cts} +1 -1
  53. package/dist/collections.d.cts.map +1 -0
  54. package/dist/collections.d.mts +39 -0
  55. package/dist/collections.d.mts.map +1 -0
  56. package/dist/collections.mjs +103 -8
  57. package/dist/collections.mjs.map +1 -1
  58. package/dist/encryption-types.cjs +3 -0
  59. package/dist/encryption-types.cjs.map +1 -0
  60. package/dist/{types/encryption-types.d.ts → encryption-types.d.cts} +2 -2
  61. package/dist/encryption-types.d.cts.map +1 -0
  62. package/dist/encryption-types.d.mts +7 -0
  63. package/dist/encryption-types.d.mts.map +1 -0
  64. package/dist/encryption-types.mjs +1 -1
  65. package/dist/encryption-types.mjs.map +1 -1
  66. package/dist/errors.cjs +111 -0
  67. package/dist/errors.cjs.map +1 -0
  68. package/dist/{types/errors.d.ts → errors.d.cts} +1 -1
  69. package/dist/errors.d.cts.map +1 -0
  70. package/dist/errors.d.mts +58 -0
  71. package/dist/errors.d.mts.map +1 -0
  72. package/dist/errors.mjs +102 -16
  73. package/dist/errors.mjs.map +1 -1
  74. package/dist/fs.cjs +248 -0
  75. package/dist/fs.cjs.map +1 -0
  76. package/dist/{types/fs.d.ts → fs.d.cts} +3 -3
  77. package/dist/fs.d.cts.map +1 -0
  78. package/dist/fs.d.mts +133 -0
  79. package/dist/fs.d.mts.map +1 -0
  80. package/dist/fs.mjs +209 -25
  81. package/dist/fs.mjs.map +1 -1
  82. package/dist/hex.cjs +134 -0
  83. package/dist/hex.cjs.map +1 -0
  84. package/dist/{types/hex.d.ts → hex.d.cts} +3 -3
  85. package/dist/hex.d.cts.map +1 -0
  86. package/dist/hex.d.mts +77 -0
  87. package/dist/hex.d.mts.map +1 -0
  88. package/dist/hex.mjs +121 -34
  89. package/dist/hex.mjs.map +1 -1
  90. package/dist/index.cjs +37 -0
  91. package/dist/index.cjs.map +1 -0
  92. package/dist/index.d.cts +21 -0
  93. package/dist/index.d.cts.map +1 -0
  94. package/dist/index.d.mts +21 -0
  95. package/dist/index.d.mts.map +1 -0
  96. package/dist/index.mjs +20 -296
  97. package/dist/index.mjs.map +1 -1
  98. package/dist/json.cjs +413 -0
  99. package/dist/json.cjs.map +1 -0
  100. package/dist/{types/json.d.ts → json.d.cts} +21 -22
  101. package/dist/json.d.cts.map +1 -0
  102. package/dist/json.d.mts +383 -0
  103. package/dist/json.d.mts.map +1 -0
  104. package/dist/json.mjs +389 -74
  105. package/dist/json.mjs.map +1 -1
  106. package/dist/keyring.cjs +3 -0
  107. package/dist/keyring.cjs.map +1 -0
  108. package/dist/{types/keyring.d.ts → keyring.d.cts} +7 -7
  109. package/dist/keyring.d.cts.map +1 -0
  110. package/dist/keyring.d.mts +224 -0
  111. package/dist/keyring.d.mts.map +1 -0
  112. package/dist/keyring.mjs +1 -1
  113. package/dist/keyring.mjs.map +1 -1
  114. package/dist/logging.cjs +43 -0
  115. package/dist/logging.cjs.map +1 -0
  116. package/dist/{types/logging.d.ts → logging.d.cts} +2 -2
  117. package/dist/logging.d.cts.map +1 -0
  118. package/dist/logging.d.mts +30 -0
  119. package/dist/logging.d.mts.map +1 -0
  120. package/dist/logging.mjs +34 -9
  121. package/dist/logging.mjs.map +1 -1
  122. package/dist/misc.cjs +149 -0
  123. package/dist/misc.cjs.map +1 -0
  124. package/dist/{types/misc.d.ts → misc.d.cts} +6 -6
  125. package/dist/misc.d.cts.map +1 -0
  126. package/dist/misc.d.mts +119 -0
  127. package/dist/misc.d.mts.map +1 -0
  128. package/dist/misc.mjs +136 -27
  129. package/dist/misc.mjs.map +1 -1
  130. package/dist/node.cjs +19 -0
  131. package/dist/node.cjs.map +1 -0
  132. package/dist/node.d.cts +3 -0
  133. package/dist/node.d.cts.map +1 -0
  134. package/dist/node.d.mts +3 -0
  135. package/dist/node.d.mts.map +1 -0
  136. package/dist/node.mjs +2 -316
  137. package/dist/node.mjs.map +1 -1
  138. package/dist/number.cjs +102 -0
  139. package/dist/number.cjs.map +1 -0
  140. package/dist/{types/number.d.ts → number.d.cts} +1 -1
  141. package/dist/number.d.cts.map +1 -0
  142. package/dist/number.d.mts +73 -0
  143. package/dist/number.d.mts.map +1 -0
  144. package/dist/number.mjs +93 -16
  145. package/dist/number.mjs.map +1 -1
  146. package/dist/opaque.cjs +3 -0
  147. package/dist/opaque.cjs.map +1 -0
  148. package/dist/opaque.d.cts +6 -0
  149. package/dist/opaque.d.cts.map +1 -0
  150. package/dist/opaque.d.mts +6 -0
  151. package/dist/opaque.d.mts.map +1 -0
  152. package/dist/opaque.mjs +1 -1
  153. package/dist/opaque.mjs.map +1 -1
  154. package/dist/promise.cjs +40 -0
  155. package/dist/promise.cjs.map +1 -0
  156. package/dist/{types/promise.d.ts → promise.d.cts} +2 -2
  157. package/dist/promise.d.cts.map +1 -0
  158. package/dist/promise.d.mts +45 -0
  159. package/dist/promise.d.mts.map +1 -0
  160. package/dist/promise.mjs +35 -7
  161. package/dist/promise.mjs.map +1 -1
  162. package/dist/time.cjs +67 -0
  163. package/dist/time.cjs.map +1 -0
  164. package/dist/{types/time.d.ts → time.d.cts} +1 -1
  165. package/dist/time.d.cts.map +1 -0
  166. package/dist/time.d.mts +49 -0
  167. package/dist/time.d.mts.map +1 -0
  168. package/dist/time.mjs +60 -10
  169. package/dist/time.mjs.map +1 -1
  170. package/dist/transaction-types.cjs +3 -0
  171. package/dist/transaction-types.cjs.map +1 -0
  172. package/dist/{types/transaction-types.d.ts → transaction-types.d.cts} +11 -11
  173. package/dist/transaction-types.d.cts.map +1 -0
  174. package/dist/transaction-types.d.mts +117 -0
  175. package/dist/transaction-types.d.mts.map +1 -0
  176. package/dist/transaction-types.mjs +1 -1
  177. package/dist/transaction-types.mjs.map +1 -1
  178. package/dist/versions.cjs +95 -0
  179. package/dist/versions.cjs.map +1 -0
  180. package/dist/{types/versions.d.ts → versions.d.cts} +5 -5
  181. package/dist/versions.d.cts.map +1 -0
  182. package/dist/versions.d.mts +101 -0
  183. package/dist/versions.d.mts.map +1 -0
  184. package/dist/versions.mjs +85 -26
  185. package/dist/versions.mjs.map +1 -1
  186. package/package.json +26 -17
  187. package/dist/assert.js +0 -16
  188. package/dist/assert.js.map +0 -1
  189. package/dist/base64.js +0 -11
  190. package/dist/base64.js.map +0 -1
  191. package/dist/bytes.js +0 -43
  192. package/dist/bytes.js.map +0 -1
  193. package/dist/caip-types.js +0 -44
  194. package/dist/caip-types.js.map +0 -1
  195. package/dist/checksum.js +0 -12
  196. package/dist/checksum.js.map +0 -1
  197. package/dist/chunk-2LBGT4GH.js +0 -15
  198. package/dist/chunk-2LBGT4GH.js.map +0 -1
  199. package/dist/chunk-3W5G4CYI.js +0 -25
  200. package/dist/chunk-3W5G4CYI.js.map +0 -1
  201. package/dist/chunk-4D6XQBHA.js +0 -69
  202. package/dist/chunk-4D6XQBHA.js.map +0 -1
  203. package/dist/chunk-4RMX5YWE.js +0 -34
  204. package/dist/chunk-4RMX5YWE.js.map +0 -1
  205. package/dist/chunk-5AVWINSB.js +0 -1
  206. package/dist/chunk-5AVWINSB.js.map +0 -1
  207. package/dist/chunk-622IOGVI.mjs +0 -1
  208. package/dist/chunk-622IOGVI.mjs.map +0 -1
  209. package/dist/chunk-6C35XQOF.mjs +0 -257
  210. package/dist/chunk-6C35XQOF.mjs.map +0 -1
  211. package/dist/chunk-6NZW4WK4.js +0 -35
  212. package/dist/chunk-6NZW4WK4.js.map +0 -1
  213. package/dist/chunk-6ZDHSOUV.js +0 -59
  214. package/dist/chunk-6ZDHSOUV.js.map +0 -1
  215. package/dist/chunk-74DGVJVE.mjs +0 -59
  216. package/dist/chunk-74DGVJVE.mjs.map +0 -1
  217. package/dist/chunk-AY6FDCBT.mjs +0 -1
  218. package/dist/chunk-AY6FDCBT.mjs.map +0 -1
  219. package/dist/chunk-C6HGFEYL.js +0 -23
  220. package/dist/chunk-C6HGFEYL.js.map +0 -1
  221. package/dist/chunk-DHVKFDHQ.js +0 -95
  222. package/dist/chunk-DHVKFDHQ.js.map +0 -1
  223. package/dist/chunk-DYRKZQMK.mjs +0 -122
  224. package/dist/chunk-DYRKZQMK.mjs.map +0 -1
  225. package/dist/chunk-E4C7EW4R.js +0 -16
  226. package/dist/chunk-E4C7EW4R.js.map +0 -1
  227. package/dist/chunk-EQMZL4XU.js +0 -1
  228. package/dist/chunk-EQMZL4XU.js.map +0 -1
  229. package/dist/chunk-GZS3IQBZ.mjs +0 -16
  230. package/dist/chunk-GZS3IQBZ.mjs.map +0 -1
  231. package/dist/chunk-H4YFDLB7.mjs +0 -70
  232. package/dist/chunk-H4YFDLB7.mjs.map +0 -1
  233. package/dist/chunk-I575FZFH.mjs +0 -1
  234. package/dist/chunk-I575FZFH.mjs.map +0 -1
  235. package/dist/chunk-IZC266HS.js +0 -55
  236. package/dist/chunk-IZC266HS.js.map +0 -1
  237. package/dist/chunk-JPAL7Q5S.mjs +0 -90
  238. package/dist/chunk-JPAL7Q5S.mjs.map +0 -1
  239. package/dist/chunk-LC2CRSWD.js +0 -1
  240. package/dist/chunk-LC2CRSWD.js.map +0 -1
  241. package/dist/chunk-NQMRFZHB.mjs +0 -35
  242. package/dist/chunk-NQMRFZHB.mjs.map +0 -1
  243. package/dist/chunk-O3EIM33O.mjs +0 -95
  244. package/dist/chunk-O3EIM33O.mjs.map +0 -1
  245. package/dist/chunk-OLLG4H35.js +0 -257
  246. package/dist/chunk-OLLG4H35.js.map +0 -1
  247. package/dist/chunk-OUZ3LSLX.mjs +0 -94
  248. package/dist/chunk-OUZ3LSLX.mjs.map +0 -1
  249. package/dist/chunk-QEPVHEP7.js +0 -273
  250. package/dist/chunk-QVEKZRZ2.js +0 -70
  251. package/dist/chunk-QVEKZRZ2.js.map +0 -1
  252. package/dist/chunk-RIRDOQPX.mjs +0 -15
  253. package/dist/chunk-RIRDOQPX.mjs.map +0 -1
  254. package/dist/chunk-RKRGAFXY.js +0 -1
  255. package/dist/chunk-RKRGAFXY.js.map +0 -1
  256. package/dist/chunk-RNEXSCNP.js +0 -122
  257. package/dist/chunk-RNEXSCNP.js.map +0 -1
  258. package/dist/chunk-ROQSKDP5.mjs +0 -69
  259. package/dist/chunk-ROQSKDP5.mjs.map +0 -1
  260. package/dist/chunk-RRYOWRCV.mjs +0 -1
  261. package/dist/chunk-RRYOWRCV.mjs.map +0 -1
  262. package/dist/chunk-S3UHBN2Z.mjs +0 -44
  263. package/dist/chunk-S3UHBN2Z.mjs.map +0 -1
  264. package/dist/chunk-THNLGEXV.mjs +0 -34
  265. package/dist/chunk-THNLGEXV.mjs.map +0 -1
  266. package/dist/chunk-UOTVU7OQ.js +0 -1
  267. package/dist/chunk-UOTVU7OQ.js.map +0 -1
  268. package/dist/chunk-VA2DRBDE.mjs +0 -273
  269. package/dist/chunk-VA2DRBDE.mjs.map +0 -1
  270. package/dist/chunk-VFXTVNXN.js +0 -44
  271. package/dist/chunk-VFXTVNXN.js.map +0 -1
  272. package/dist/chunk-W5XI7ERF.mjs +0 -23
  273. package/dist/chunk-W5XI7ERF.mjs.map +0 -1
  274. package/dist/chunk-WA4DHIND.mjs +0 -1
  275. package/dist/chunk-WA4DHIND.mjs.map +0 -1
  276. package/dist/chunk-X66SUIEF.mjs +0 -25
  277. package/dist/chunk-X66SUIEF.mjs.map +0 -1
  278. package/dist/chunk-XYGUOY6N.mjs +0 -55
  279. package/dist/chunk-XYGUOY6N.mjs.map +0 -1
  280. package/dist/chunk-YWAID473.js +0 -94
  281. package/dist/chunk-YWAID473.js.map +0 -1
  282. package/dist/chunk-Z2RGWDD7.js +0 -90
  283. package/dist/chunk-Z2RGWDD7.js.map +0 -1
  284. package/dist/coercers.js +0 -18
  285. package/dist/coercers.js.map +0 -1
  286. package/dist/collections.js +0 -10
  287. package/dist/collections.js.map +0 -1
  288. package/dist/encryption-types.js +0 -2
  289. package/dist/encryption-types.js.map +0 -1
  290. package/dist/errors.js +0 -17
  291. package/dist/errors.js.map +0 -1
  292. package/dist/fs.js +0 -26
  293. package/dist/fs.js.map +0 -1
  294. package/dist/hex.js +0 -35
  295. package/dist/hex.js.map +0 -1
  296. package/dist/index.js +0 -297
  297. package/dist/index.js.map +0 -1
  298. package/dist/json.js +0 -75
  299. package/dist/json.js.map +0 -1
  300. package/dist/keyring.js +0 -2
  301. package/dist/keyring.js.map +0 -1
  302. package/dist/logging.js +0 -10
  303. package/dist/logging.js.map +0 -1
  304. package/dist/misc.js +0 -28
  305. package/dist/misc.js.map +0 -1
  306. package/dist/node.js +0 -317
  307. package/dist/node.js.map +0 -1
  308. package/dist/number.js +0 -18
  309. package/dist/number.js.map +0 -1
  310. package/dist/opaque.js +0 -2
  311. package/dist/opaque.js.map +0 -1
  312. package/dist/promise.js +0 -8
  313. package/dist/promise.js.map +0 -1
  314. package/dist/time.js +0 -12
  315. package/dist/time.js.map +0 -1
  316. package/dist/transaction-types.js +0 -2
  317. package/dist/transaction-types.js.map +0 -1
  318. package/dist/types/assert.d.ts.map +0 -1
  319. package/dist/types/base64.d.ts.map +0 -1
  320. package/dist/types/bytes.d.ts.map +0 -1
  321. package/dist/types/caip-types.d.ts.map +0 -1
  322. package/dist/types/checksum.d.ts +0 -2
  323. package/dist/types/checksum.d.ts.map +0 -1
  324. package/dist/types/coercers.d.ts.map +0 -1
  325. package/dist/types/collections.d.ts.map +0 -1
  326. package/dist/types/encryption-types.d.ts.map +0 -1
  327. package/dist/types/errors.d.ts.map +0 -1
  328. package/dist/types/fs.d.ts.map +0 -1
  329. package/dist/types/hex.d.ts.map +0 -1
  330. package/dist/types/index.d.ts +0 -21
  331. package/dist/types/index.d.ts.map +0 -1
  332. package/dist/types/json.d.ts.map +0 -1
  333. package/dist/types/keyring.d.ts.map +0 -1
  334. package/dist/types/logging.d.ts.map +0 -1
  335. package/dist/types/misc.d.ts.map +0 -1
  336. package/dist/types/node.d.ts +0 -3
  337. package/dist/types/node.d.ts.map +0 -1
  338. package/dist/types/number.d.ts.map +0 -1
  339. package/dist/types/opaque.d.ts +0 -6
  340. package/dist/types/opaque.d.ts.map +0 -1
  341. package/dist/types/promise.d.ts.map +0 -1
  342. package/dist/types/time.d.ts.map +0 -1
  343. package/dist/types/transaction-types.d.ts.map +0 -1
  344. package/dist/types/versions.d.ts.map +0 -1
  345. package/dist/versions.js +0 -27
  346. package/dist/versions.js.map +0 -1
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Common duration constants, in milliseconds.
3
+ */
4
+ export declare enum Duration {
5
+ /**
6
+ * A millisecond.
7
+ */
8
+ Millisecond = 1,
9
+ /**
10
+ * A second, in milliseconds.
11
+ */
12
+ Second = 1000,
13
+ /**
14
+ * A minute, in milliseconds.
15
+ */
16
+ Minute = 60000,
17
+ /**
18
+ * An hour, in milliseconds.
19
+ */
20
+ Hour = 3600000,
21
+ /**
22
+ * A day, in milliseconds.
23
+ */
24
+ Day = 86400000,
25
+ /**
26
+ * A week, in milliseconds.
27
+ */
28
+ Week = 604800000,
29
+ /**
30
+ * A year, in milliseconds.
31
+ */
32
+ Year = 31536000000
33
+ }
34
+ /**
35
+ * Calculates the millisecond value of the specified number of units of time.
36
+ *
37
+ * @param count - The number of units of time.
38
+ * @param duration - The unit of time to count.
39
+ * @returns The count multiplied by the specified duration.
40
+ */
41
+ export declare function inMilliseconds(count: number, duration: Duration): number;
42
+ /**
43
+ * Gets the milliseconds since a particular Unix epoch timestamp.
44
+ *
45
+ * @param timestamp - A Unix millisecond timestamp.
46
+ * @returns The number of milliseconds elapsed since the specified timestamp.
47
+ */
48
+ export declare function timeSince(timestamp: number): number;
49
+ //# sourceMappingURL=time.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time.d.mts","sourceRoot":"","sources":["../src/time.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,QAAQ;IAClB;;OAEG;IACH,WAAW,IAAI;IAEf;;OAEG;IACH,MAAM,OAAO;IAEb;;OAEG;IACH,MAAM,QAAS;IAEf;;OAEG;IACH,IAAI,UAAY;IAEhB;;OAEG;IACH,GAAG,WAAa;IAEhB;;OAEG;IACH,IAAI,YAAc;IAElB;;OAEG;IACH,IAAI,cAAiB;CACtB;AAaD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAGxE;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAGnD"}
package/dist/time.mjs CHANGED
@@ -1,12 +1,62 @@
1
- import {
2
- Duration,
3
- inMilliseconds,
4
- timeSince
5
- } from "./chunk-THNLGEXV.mjs";
6
- import "./chunk-X66SUIEF.mjs";
7
- export {
8
- Duration,
9
- inMilliseconds,
10
- timeSince
1
+ /**
2
+ * Common duration constants, in milliseconds.
3
+ */
4
+ export var Duration;
5
+ (function (Duration) {
6
+ /**
7
+ * A millisecond.
8
+ */
9
+ Duration[Duration["Millisecond"] = 1] = "Millisecond";
10
+ /**
11
+ * A second, in milliseconds.
12
+ */
13
+ Duration[Duration["Second"] = 1000] = "Second";
14
+ /**
15
+ * A minute, in milliseconds.
16
+ */
17
+ Duration[Duration["Minute"] = 60000] = "Minute";
18
+ /**
19
+ * An hour, in milliseconds.
20
+ */
21
+ Duration[Duration["Hour"] = 3600000] = "Hour";
22
+ /**
23
+ * A day, in milliseconds.
24
+ */
25
+ Duration[Duration["Day"] = 86400000] = "Day";
26
+ /**
27
+ * A week, in milliseconds.
28
+ */
29
+ Duration[Duration["Week"] = 604800000] = "Week";
30
+ /**
31
+ * A year, in milliseconds.
32
+ */
33
+ Duration[Duration["Year"] = 31536000000] = "Year";
34
+ })(Duration = Duration || (Duration = {}));
35
+ const isNonNegativeInteger = (number) => Number.isInteger(number) && number >= 0;
36
+ const assertIsNonNegativeInteger = (number, name) => {
37
+ if (!isNonNegativeInteger(number)) {
38
+ throw new Error(`"${name}" must be a non-negative integer. Received: "${number}".`);
39
+ }
11
40
  };
41
+ /**
42
+ * Calculates the millisecond value of the specified number of units of time.
43
+ *
44
+ * @param count - The number of units of time.
45
+ * @param duration - The unit of time to count.
46
+ * @returns The count multiplied by the specified duration.
47
+ */
48
+ export function inMilliseconds(count, duration) {
49
+ assertIsNonNegativeInteger(count, 'count');
50
+ return count * duration;
51
+ }
52
+ /**
53
+ * Gets the milliseconds since a particular Unix epoch timestamp.
54
+ *
55
+ * @param timestamp - A Unix millisecond timestamp.
56
+ * @returns The number of milliseconds elapsed since the specified timestamp.
57
+ */
58
+ export function timeSince(timestamp) {
59
+ assertIsNonNegativeInteger(timestamp, 'timestamp');
60
+ return Date.now() - timestamp;
61
+ }
12
62
  //# sourceMappingURL=time.mjs.map
package/dist/time.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"time.mjs","sourceRoot":"","sources":["../src/time.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,QAmCX;AAnCD,WAAY,QAAQ;IAClB;;OAEG;IACH,qDAAe,CAAA;IAEf;;OAEG;IACH,8CAAa,CAAA;IAEb;;OAEG;IACH,+CAAe,CAAA;IAEf;;OAEG;IACH,6CAAgB,CAAA;IAEhB;;OAEG;IACH,4CAAgB,CAAA;IAEhB;;OAEG;IACH,+CAAkB,CAAA;IAElB;;OAEG;IACH,iDAAqB,CAAA;AACvB,CAAC,EAnCW,QAAQ,GAAR,QAAQ,KAAR,QAAQ,QAmCnB;AAED,MAAM,oBAAoB,GAAG,CAAC,MAAc,EAAE,EAAE,CAC9C,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC;AAE1C,MAAM,0BAA0B,GAAG,CAAC,MAAc,EAAE,IAAY,EAAE,EAAE;IAClE,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE;QACjC,MAAM,IAAI,KAAK,CACb,IAAI,IAAI,gDAAgD,MAAM,IAAI,CACnE,CAAC;KACH;AACH,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,KAAa,EAAE,QAAkB;IAC9D,0BAA0B,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC3C,OAAO,KAAK,GAAG,QAAQ,CAAC;AAC1B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,SAAiB;IACzC,0BAA0B,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;IACnD,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;AAChC,CAAC","sourcesContent":["/**\n * Common duration constants, in milliseconds.\n */\nexport enum Duration {\n /**\n * A millisecond.\n */\n Millisecond = 1,\n\n /**\n * A second, in milliseconds.\n */\n Second = 1000, // Millisecond * 1000\n\n /**\n * A minute, in milliseconds.\n */\n Minute = 60_000, // Second * 60\n\n /**\n * An hour, in milliseconds.\n */\n Hour = 3_600_000, // Minute * 60\n\n /**\n * A day, in milliseconds.\n */\n Day = 86_400_000, // Hour * 24\n\n /**\n * A week, in milliseconds.\n */\n Week = 604_800_000, // Day * 7\n\n /**\n * A year, in milliseconds.\n */\n Year = 31_536_000_000, // Day * 365\n}\n\nconst isNonNegativeInteger = (number: number) =>\n Number.isInteger(number) && number >= 0;\n\nconst assertIsNonNegativeInteger = (number: number, name: string) => {\n if (!isNonNegativeInteger(number)) {\n throw new Error(\n `\"${name}\" must be a non-negative integer. Received: \"${number}\".`,\n );\n }\n};\n\n/**\n * Calculates the millisecond value of the specified number of units of time.\n *\n * @param count - The number of units of time.\n * @param duration - The unit of time to count.\n * @returns The count multiplied by the specified duration.\n */\nexport function inMilliseconds(count: number, duration: Duration): number {\n assertIsNonNegativeInteger(count, 'count');\n return count * duration;\n}\n\n/**\n * Gets the milliseconds since a particular Unix epoch timestamp.\n *\n * @param timestamp - A Unix millisecond timestamp.\n * @returns The number of milliseconds elapsed since the specified timestamp.\n */\nexport function timeSince(timestamp: number): number {\n assertIsNonNegativeInteger(timestamp, 'timestamp');\n return Date.now() - timestamp;\n}\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=transaction-types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transaction-types.cjs","sourceRoot":"","sources":["../src/transaction-types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Bytes } from './bytes';\nimport type { Hex } from './hex';\n\nexport type Transaction =\n | LegacyTransaction\n | EIP2930Transaction\n | EIP1559Transaction;\n\nexport type SignedTransaction = Transaction & Signature;\n\nexport type Signature = {\n /**\n * EC signature parameter\n * 32 bytes long sequence.\n */\n r: Bytes;\n\n /**\n * EC signature parameter\n * Signature proof.\n * 32 bytes long sequence\n */\n s: Bytes;\n\n /**\n * Recovery identifier. It can be either 0x1b or 0x1c\n * 1 byte long sequence\n */\n yParity: Bytes;\n};\n\n/**\n * Base Ethereum Transaction\n */\nexport type BaseTransaction = {\n /**\n * Sequentially incrementing counter which indicates the transaction\n * number from the account\n */\n nonce: Bytes;\n\n /**\n * The address of the sender, that will be signing the transaction\n */\n from: Hex | Uint8Array;\n\n /**\n * The receiving address.\n * If an externally-owned account, the transaction will transfer value.\n * If a contract account, the transaction will execute the contract code.\n */\n to: Hex | Uint8Array;\n\n /**\n * The amount of Ether sent.\n */\n value: Bytes;\n\n /**\n * Maximum amount of gas units that this transaction can consume.\n */\n gasLimit: Bytes;\n\n /**\n * Arbitrary data.\n */\n data?: Bytes;\n};\n\n/**\n * Typed Ethereum Transaction\n */\nexport type TypedTransaction = BaseTransaction & {\n /**\n * Transaction type.\n */\n type: number;\n};\n\n/**\n * Ethereum Legacy Transaction\n * Reference: https://ethereum.org/en/developers/docs/transactions/\n */\nexport type LegacyTransaction = BaseTransaction & {\n /**\n * Transaction's gas price.\n */\n gasPrice: Bytes | null;\n};\n\n/**\n * EIP-2930 Transaction: Optional Access Lists\n * Reference: https://eips.ethereum.org/EIPS/eip-2930\n */\nexport type EIP2930Transaction = TypedTransaction & {\n /**\n * Transaction type.\n */\n type: 1;\n\n /**\n * Transaction chain ID\n */\n chainId: Bytes;\n\n /**\n * List of addresses and storage keys that the transaction plans to access\n */\n accessList:\n | { address: Hex; storageKeys: Hex[] }[]\n | { address: Uint8Array; storageKeys: Uint8Array[] }[];\n};\n\n/**\n * EIP-1559 Transaction: Fee market change for ETH 1.0 chain (Type-2)\n *\n * Reference: https://eips.ethereum.org/EIPS/eip-1559\n */\nexport type EIP1559Transaction = TypedTransaction & {\n /**\n * Transaction type.\n */\n type: 2;\n\n /**\n * Maximum fee to give to the miner\n */\n maxPriorityFeePerGas: Bytes;\n\n /**\n * Maximum total fee\n */\n maxFeePerGas: Bytes;\n};\n"]}
@@ -1,8 +1,8 @@
1
- import type { Bytes } from './bytes';
2
- import type { Hex } from './hex';
3
- export declare type Transaction = LegacyTransaction | EIP2930Transaction | EIP1559Transaction;
4
- export declare type SignedTransaction = Transaction & Signature;
5
- export declare type Signature = {
1
+ import type { Bytes } from "./bytes.cjs";
2
+ import type { Hex } from "./hex.cjs";
3
+ export type Transaction = LegacyTransaction | EIP2930Transaction | EIP1559Transaction;
4
+ export type SignedTransaction = Transaction & Signature;
5
+ export type Signature = {
6
6
  /**
7
7
  * EC signature parameter
8
8
  * 32 bytes long sequence.
@@ -23,7 +23,7 @@ export declare type Signature = {
23
23
  /**
24
24
  * Base Ethereum Transaction
25
25
  */
26
- export declare type BaseTransaction = {
26
+ export type BaseTransaction = {
27
27
  /**
28
28
  * Sequentially incrementing counter which indicates the transaction
29
29
  * number from the account
@@ -55,7 +55,7 @@ export declare type BaseTransaction = {
55
55
  /**
56
56
  * Typed Ethereum Transaction
57
57
  */
58
- export declare type TypedTransaction = BaseTransaction & {
58
+ export type TypedTransaction = BaseTransaction & {
59
59
  /**
60
60
  * Transaction type.
61
61
  */
@@ -65,7 +65,7 @@ export declare type TypedTransaction = BaseTransaction & {
65
65
  * Ethereum Legacy Transaction
66
66
  * Reference: https://ethereum.org/en/developers/docs/transactions/
67
67
  */
68
- export declare type LegacyTransaction = BaseTransaction & {
68
+ export type LegacyTransaction = BaseTransaction & {
69
69
  /**
70
70
  * Transaction's gas price.
71
71
  */
@@ -75,7 +75,7 @@ export declare type LegacyTransaction = BaseTransaction & {
75
75
  * EIP-2930 Transaction: Optional Access Lists
76
76
  * Reference: https://eips.ethereum.org/EIPS/eip-2930
77
77
  */
78
- export declare type EIP2930Transaction = TypedTransaction & {
78
+ export type EIP2930Transaction = TypedTransaction & {
79
79
  /**
80
80
  * Transaction type.
81
81
  */
@@ -100,7 +100,7 @@ export declare type EIP2930Transaction = TypedTransaction & {
100
100
  *
101
101
  * Reference: https://eips.ethereum.org/EIPS/eip-1559
102
102
  */
103
- export declare type EIP1559Transaction = TypedTransaction & {
103
+ export type EIP1559Transaction = TypedTransaction & {
104
104
  /**
105
105
  * Transaction type.
106
106
  */
@@ -114,4 +114,4 @@ export declare type EIP1559Transaction = TypedTransaction & {
114
114
  */
115
115
  maxFeePerGas: Bytes;
116
116
  };
117
- //# sourceMappingURL=transaction-types.d.ts.map
117
+ //# sourceMappingURL=transaction-types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transaction-types.d.cts","sourceRoot":"","sources":["../src/transaction-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,oBAAgB;AACrC,OAAO,KAAK,EAAE,GAAG,EAAE,kBAAc;AAEjC,MAAM,MAAM,WAAW,GACnB,iBAAiB,GACjB,kBAAkB,GAClB,kBAAkB,CAAC;AAEvB,MAAM,MAAM,iBAAiB,GAA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C;IAER;;OAEG;IACH,oBAAoB,EAAE,KAAK,CAAC;IAE5B;;OAEG;IACH,YAAY,EAAE,KAAK,CAAC;CACrB,CAAC"}
@@ -0,0 +1,117 @@
1
+ import type { Bytes } from "./bytes.mjs";
2
+ import type { Hex } from "./hex.mjs";
3
+ export type Transaction = LegacyTransaction | EIP2930Transaction | EIP1559Transaction;
4
+ export type SignedTransaction = Transaction & Signature;
5
+ export type Signature = {
6
+ /**
7
+ * EC signature parameter
8
+ * 32 bytes long sequence.
9
+ */
10
+ r: Bytes;
11
+ /**
12
+ * EC signature parameter
13
+ * Signature proof.
14
+ * 32 bytes long sequence
15
+ */
16
+ s: Bytes;
17
+ /**
18
+ * Recovery identifier. It can be either 0x1b or 0x1c
19
+ * 1 byte long sequence
20
+ */
21
+ yParity: Bytes;
22
+ };
23
+ /**
24
+ * Base Ethereum Transaction
25
+ */
26
+ export type BaseTransaction = {
27
+ /**
28
+ * Sequentially incrementing counter which indicates the transaction
29
+ * number from the account
30
+ */
31
+ nonce: Bytes;
32
+ /**
33
+ * The address of the sender, that will be signing the transaction
34
+ */
35
+ from: Hex | Uint8Array;
36
+ /**
37
+ * The receiving address.
38
+ * If an externally-owned account, the transaction will transfer value.
39
+ * If a contract account, the transaction will execute the contract code.
40
+ */
41
+ to: Hex | Uint8Array;
42
+ /**
43
+ * The amount of Ether sent.
44
+ */
45
+ value: Bytes;
46
+ /**
47
+ * Maximum amount of gas units that this transaction can consume.
48
+ */
49
+ gasLimit: Bytes;
50
+ /**
51
+ * Arbitrary data.
52
+ */
53
+ data?: Bytes;
54
+ };
55
+ /**
56
+ * Typed Ethereum Transaction
57
+ */
58
+ export type TypedTransaction = BaseTransaction & {
59
+ /**
60
+ * Transaction type.
61
+ */
62
+ type: number;
63
+ };
64
+ /**
65
+ * Ethereum Legacy Transaction
66
+ * Reference: https://ethereum.org/en/developers/docs/transactions/
67
+ */
68
+ export type LegacyTransaction = BaseTransaction & {
69
+ /**
70
+ * Transaction's gas price.
71
+ */
72
+ gasPrice: Bytes | null;
73
+ };
74
+ /**
75
+ * EIP-2930 Transaction: Optional Access Lists
76
+ * Reference: https://eips.ethereum.org/EIPS/eip-2930
77
+ */
78
+ export type EIP2930Transaction = TypedTransaction & {
79
+ /**
80
+ * Transaction type.
81
+ */
82
+ type: 1;
83
+ /**
84
+ * Transaction chain ID
85
+ */
86
+ chainId: Bytes;
87
+ /**
88
+ * List of addresses and storage keys that the transaction plans to access
89
+ */
90
+ accessList: {
91
+ address: Hex;
92
+ storageKeys: Hex[];
93
+ }[] | {
94
+ address: Uint8Array;
95
+ storageKeys: Uint8Array[];
96
+ }[];
97
+ };
98
+ /**
99
+ * EIP-1559 Transaction: Fee market change for ETH 1.0 chain (Type-2)
100
+ *
101
+ * Reference: https://eips.ethereum.org/EIPS/eip-1559
102
+ */
103
+ export type EIP1559Transaction = TypedTransaction & {
104
+ /**
105
+ * Transaction type.
106
+ */
107
+ type: 2;
108
+ /**
109
+ * Maximum fee to give to the miner
110
+ */
111
+ maxPriorityFeePerGas: Bytes;
112
+ /**
113
+ * Maximum total fee
114
+ */
115
+ maxFeePerGas: Bytes;
116
+ };
117
+ //# sourceMappingURL=transaction-types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transaction-types.d.mts","sourceRoot":"","sources":["../src/transaction-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,oBAAgB;AACrC,OAAO,KAAK,EAAE,GAAG,EAAE,kBAAc;AAEjC,MAAM,MAAM,WAAW,GACnB,iBAAiB,GACjB,kBAAkB,GAClB,kBAAkB,CAAC;AAEvB,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,SAAS,CAAC;AAExD,MAAM,MAAM,SAAS,GAAG;IACtB;;;OAGG;IACH,CAAC,EAAE,KAAK,CAAC;IAET;;;;OAIG;IACH,CAAC,EAAE,KAAK,CAAC;IAET;;;OAGG;IACH,OAAO,EAAE,KAAK,CAAC;CAChB,CAAC;AAEF;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1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"transaction-types.mjs","sourceRoot":"","sources":["../src/transaction-types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Bytes } from './bytes';\nimport type { Hex } from './hex';\n\nexport type Transaction =\n | LegacyTransaction\n | EIP2930Transaction\n | EIP1559Transaction;\n\nexport type SignedTransaction = Transaction & Signature;\n\nexport type Signature = {\n /**\n * EC signature parameter\n * 32 bytes long sequence.\n */\n r: Bytes;\n\n /**\n * EC signature parameter\n * Signature proof.\n * 32 bytes long sequence\n */\n s: Bytes;\n\n /**\n * Recovery identifier. It can be either 0x1b or 0x1c\n * 1 byte long sequence\n */\n yParity: Bytes;\n};\n\n/**\n * Base Ethereum Transaction\n */\nexport type BaseTransaction = {\n /**\n * Sequentially incrementing counter which indicates the transaction\n * number from the account\n */\n nonce: Bytes;\n\n /**\n * The address of the sender, that will be signing the transaction\n */\n from: Hex | Uint8Array;\n\n /**\n * The receiving address.\n * If an externally-owned account, the transaction will transfer value.\n * If a contract account, the transaction will execute the contract code.\n */\n to: Hex | Uint8Array;\n\n /**\n * The amount of Ether sent.\n */\n value: Bytes;\n\n /**\n * Maximum amount of gas units that this transaction can consume.\n */\n gasLimit: Bytes;\n\n /**\n * Arbitrary data.\n */\n data?: Bytes;\n};\n\n/**\n * Typed Ethereum Transaction\n */\nexport type TypedTransaction = BaseTransaction & {\n /**\n * Transaction type.\n */\n type: number;\n};\n\n/**\n * Ethereum Legacy Transaction\n * Reference: https://ethereum.org/en/developers/docs/transactions/\n */\nexport type LegacyTransaction = BaseTransaction & {\n /**\n * Transaction's gas price.\n */\n gasPrice: Bytes | null;\n};\n\n/**\n * EIP-2930 Transaction: Optional Access Lists\n * Reference: https://eips.ethereum.org/EIPS/eip-2930\n */\nexport type EIP2930Transaction = TypedTransaction & {\n /**\n * Transaction type.\n */\n type: 1;\n\n /**\n * Transaction chain ID\n */\n chainId: Bytes;\n\n /**\n * List of addresses and storage keys that the transaction plans to access\n */\n accessList:\n | { address: Hex; storageKeys: Hex[] }[]\n | { address: Uint8Array; storageKeys: Uint8Array[] }[];\n};\n\n/**\n * EIP-1559 Transaction: Fee market change for ETH 1.0 chain (Type-2)\n *\n * Reference: https://eips.ethereum.org/EIPS/eip-1559\n */\nexport type EIP1559Transaction = TypedTransaction & {\n /**\n * Transaction type.\n */\n type: 2;\n\n /**\n * Maximum fee to give to the miner\n */\n maxPriorityFeePerGas: Bytes;\n\n /**\n * Maximum total fee\n */\n maxFeePerGas: Bytes;\n};\n"]}
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.satisfiesVersionRange = exports.gtRange = exports.gtVersion = exports.assertIsSemVerRange = exports.assertIsSemVerVersion = exports.isValidSemVerRange = exports.isValidSemVerVersion = exports.VersionRangeStruct = exports.VersionStruct = void 0;
4
+ const superstruct_1 = require("@metamask/superstruct");
5
+ const semver_1 = require("semver");
6
+ const assert_1 = require("./assert.cjs");
7
+ /**
8
+ * A struct for validating a version string.
9
+ */
10
+ exports.VersionStruct = (0, superstruct_1.refine)((0, superstruct_1.string)(), 'Version', (value) => {
11
+ if ((0, semver_1.valid)(value) === null) {
12
+ return `Expected SemVer version, got "${value}"`;
13
+ }
14
+ return true;
15
+ });
16
+ exports.VersionRangeStruct = (0, superstruct_1.refine)((0, superstruct_1.string)(), 'Version range', (value) => {
17
+ if ((0, semver_1.validRange)(value) === null) {
18
+ return `Expected SemVer range, got "${value}"`;
19
+ }
20
+ return true;
21
+ });
22
+ /**
23
+ * Checks whether a SemVer version is valid.
24
+ *
25
+ * @param version - A potential version.
26
+ * @returns `true` if the version is valid, and `false` otherwise.
27
+ */
28
+ function isValidSemVerVersion(version) {
29
+ return (0, superstruct_1.is)(version, exports.VersionStruct);
30
+ }
31
+ exports.isValidSemVerVersion = isValidSemVerVersion;
32
+ /**
33
+ * Checks whether a SemVer version range is valid.
34
+ *
35
+ * @param versionRange - A potential version range.
36
+ * @returns `true` if the version range is valid, and `false` otherwise.
37
+ */
38
+ function isValidSemVerRange(versionRange) {
39
+ return (0, superstruct_1.is)(versionRange, exports.VersionRangeStruct);
40
+ }
41
+ exports.isValidSemVerRange = isValidSemVerRange;
42
+ /**
43
+ * Asserts that a value is a valid concrete SemVer version.
44
+ *
45
+ * @param version - A potential SemVer concrete version.
46
+ */
47
+ function assertIsSemVerVersion(version) {
48
+ (0, assert_1.assertStruct)(version, exports.VersionStruct);
49
+ }
50
+ exports.assertIsSemVerVersion = assertIsSemVerVersion;
51
+ /**
52
+ * Asserts that a value is a valid SemVer range.
53
+ *
54
+ * @param range - A potential SemVer range.
55
+ */
56
+ function assertIsSemVerRange(range) {
57
+ (0, assert_1.assertStruct)(range, exports.VersionRangeStruct);
58
+ }
59
+ exports.assertIsSemVerRange = assertIsSemVerRange;
60
+ /**
61
+ * Checks whether a SemVer version is greater than another.
62
+ *
63
+ * @param version1 - The left-hand version.
64
+ * @param version2 - The right-hand version.
65
+ * @returns `version1 > version2`.
66
+ */
67
+ function gtVersion(version1, version2) {
68
+ return (0, semver_1.gt)(version1, version2);
69
+ }
70
+ exports.gtVersion = gtVersion;
71
+ /**
72
+ * Checks whether a SemVer version is greater than all possibilities in a range.
73
+ *
74
+ * @param version - A SemvVer version.
75
+ * @param range - The range to check against.
76
+ * @returns `version > range`.
77
+ */
78
+ function gtRange(version, range) {
79
+ return (0, semver_1.gtr)(version, range);
80
+ }
81
+ exports.gtRange = gtRange;
82
+ /**
83
+ * Returns whether a SemVer version satisfies a SemVer range.
84
+ *
85
+ * @param version - The SemVer version to check.
86
+ * @param versionRange - The SemVer version range to check against.
87
+ * @returns Whether the version satisfied the version range.
88
+ */
89
+ function satisfiesVersionRange(version, versionRange) {
90
+ return (0, semver_1.satisfies)(version, versionRange, {
91
+ includePrerelease: true,
92
+ });
93
+ }
94
+ exports.satisfiesVersionRange = satisfiesVersionRange;
95
+ //# sourceMappingURL=versions.cjs.map
@@ -0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QAAuB,EACvB,QAAuB;IAEvB,OAAO,IAAA,WAAQ,EAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACtC,CAAC;AALD,8BAKC;AAED;;;;;;GAMG;AACH,SAAgB,OAAO,CAAC,OAAsB,EAAE,KAAkB;IAChE,OAAO,IAAA,YAAS,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AACnC,CAAC;AAFD,0BAEC;AAED;;;;;;GAMG;AACH,SAAgB,qBAAqB,CACnC,OAAsB,EACtB,YAAyB;IAEzB,OAAO,IAAA,kBAAe,EAAC,OAAO,EAAE,YAAY,EAAE;QAC5C,iBAAiB,EAAE,IAAI;KACxB,CAAC,CAAC;AACL,CAAC;AAPD,sDAOC","sourcesContent":["import type { Struct } from '@metamask/superstruct';\nimport { is, refine, string } from '@metamask/superstruct';\nimport {\n gt as gtSemver,\n gtr as gtrSemver,\n satisfies as satisfiesSemver,\n valid as validSemVerVersion,\n validRange as validSemVerRange,\n} from 'semver';\n\nimport { assertStruct } from './assert';\nimport type { Opaque } from './opaque';\n\n/**\n * {@link https://codemix.com/opaque-types-in-javascript/ Opaque} type for SemVer ranges.\n *\n * @example Use {@link assertIsSemVerRange} and {@link isValidSemVerRange} to cast to proper type.\n * ```typescript\n * const unsafeRange: string = dataFromUser();\n * assertIsSemVerRange(unsafeRange);\n * unsafeRange\n * // ^? SemVerRange\n * ```\n * @example If you know what you're doing and want to side-step type safety, casting from a string works correctly.\n * ```typescript\n * const unsafeRange: string = dataFromUser();\n * unsafeRange as SemVerRange;\n * // ^? SemVerRange\n * ```\n * @see {@link assertIsSemVerRange}\n * @see {@link isValidSemVerRange}\n */\nexport type SemVerRange = Opaque<string, typeof semVerRange>;\ndeclare const semVerRange: unique symbol;\n\n/**\n * {@link https://codemix.com/opaque-types-in-javascript/ Opaque} type for singular SemVer version.\n *\n * @example Use {@link assertIsSemVerVersion} and {@link isValidSemVerVersion} to cast to proper type.\n * ```typescript\n * const unsafeVersion: string = dataFromUser();\n * assertIsSemVerVersion(unsafeRange);\n * unsafeVersion\n * // ^? SemVerVersion\n * ```\n * @example If you know what you're doing and want to side-step type safety, casting from a string works correctly.\n * ```typescript\n * const unsafeVersion: string = dataFromUser();\n * unsafeRange as SemVerVersion;\n * // ^? SemVerVersion\n * ```\n * @see {@link assertIsSemVerVersion}\n * @see {@link isValidSemVerVersion}\n */\nexport type SemVerVersion = Opaque<string, typeof semVerVersion>;\ndeclare const semVerVersion: unique symbol;\n\n/**\n * A struct for validating a version string.\n */\nexport const VersionStruct = refine<SemVerVersion, null>(\n string() as unknown as Struct<SemVerVersion, null>,\n 'Version',\n (value) => {\n if (validSemVerVersion(value) === null) {\n return `Expected SemVer version, got \"${value}\"`;\n }\n return true;\n },\n);\n\nexport const VersionRangeStruct = refine<SemVerRange, null>(\n string() as unknown as Struct<SemVerRange, null>,\n 'Version range',\n (value) => {\n if (validSemVerRange(value) === null) {\n return `Expected SemVer range, got \"${value}\"`;\n }\n return true;\n },\n);\n\n/**\n * Checks whether a SemVer version is valid.\n *\n * @param version - A potential version.\n * @returns `true` if the version is valid, and `false` otherwise.\n */\nexport function isValidSemVerVersion(\n version: unknown,\n): version is SemVerVersion {\n return is(version, VersionStruct);\n}\n\n/**\n * Checks whether a SemVer version range is valid.\n *\n * @param versionRange - A potential version range.\n * @returns `true` if the version range is valid, and `false` otherwise.\n */\nexport function isValidSemVerRange(\n versionRange: unknown,\n): versionRange is SemVerRange {\n return is(versionRange, VersionRangeStruct);\n}\n\n/**\n * Asserts that a value is a valid concrete SemVer version.\n *\n * @param version - A potential SemVer concrete version.\n */\nexport function assertIsSemVerVersion(\n version: unknown,\n): asserts version is SemVerVersion {\n assertStruct(version, VersionStruct);\n}\n\n/**\n * Asserts that a value is a valid SemVer range.\n *\n * @param range - A potential SemVer range.\n */\nexport function assertIsSemVerRange(\n range: unknown,\n): asserts range is SemVerRange {\n assertStruct(range, VersionRangeStruct);\n}\n\n/**\n * Checks whether a SemVer version is greater than another.\n *\n * @param version1 - The left-hand version.\n * @param version2 - The right-hand version.\n * @returns `version1 > version2`.\n */\nexport function gtVersion(\n version1: SemVerVersion,\n version2: SemVerVersion,\n): boolean {\n return gtSemver(version1, version2);\n}\n\n/**\n * Checks whether a SemVer version is greater than all possibilities in a range.\n *\n * @param version - A SemvVer version.\n * @param range - The range to check against.\n * @returns `version > range`.\n */\nexport function gtRange(version: SemVerVersion, range: SemVerRange): boolean {\n return gtrSemver(version, range);\n}\n\n/**\n * Returns whether a SemVer version satisfies a SemVer range.\n *\n * @param version - The SemVer version to check.\n * @param versionRange - The SemVer version range to check against.\n * @returns Whether the version satisfied the version range.\n */\nexport function satisfiesVersionRange(\n version: SemVerVersion,\n versionRange: SemVerRange,\n): boolean {\n return satisfiesSemver(version, versionRange, {\n includePrerelease: true,\n });\n}\n"]}
@@ -1,5 +1,5 @@
1
- import type { Struct } from 'superstruct';
2
- import type { Opaque } from './opaque';
1
+ import type { Struct } from "@metamask/superstruct";
2
+ import type { Opaque } from "./opaque.cjs";
3
3
  /**
4
4
  * {@link https://codemix.com/opaque-types-in-javascript/ Opaque} type for SemVer ranges.
5
5
  *
@@ -19,7 +19,7 @@ import type { Opaque } from './opaque';
19
19
  * @see {@link assertIsSemVerRange}
20
20
  * @see {@link isValidSemVerRange}
21
21
  */
22
- export declare type SemVerRange = Opaque<string, typeof semVerRange>;
22
+ export type SemVerRange = Opaque<string, typeof semVerRange>;
23
23
  declare const semVerRange: unique symbol;
24
24
  /**
25
25
  * {@link https://codemix.com/opaque-types-in-javascript/ Opaque} type for singular SemVer version.
@@ -40,7 +40,7 @@ declare const semVerRange: unique symbol;
40
40
  * @see {@link assertIsSemVerVersion}
41
41
  * @see {@link isValidSemVerVersion}
42
42
  */
43
- export declare type SemVerVersion = Opaque<string, typeof semVerVersion>;
43
+ export type SemVerVersion = Opaque<string, typeof semVerVersion>;
44
44
  declare const semVerVersion: unique symbol;
45
45
  /**
46
46
  * A struct for validating a version string.
@@ -98,4 +98,4 @@ export declare function gtRange(version: SemVerVersion, range: SemVerRange): boo
98
98
  */
99
99
  export declare function satisfiesVersionRange(version: SemVerVersion, versionRange: SemVerRange): boolean;
100
100
  export {};
101
- //# sourceMappingURL=versions.d.ts.map
101
+ //# sourceMappingURL=versions.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"versions.d.cts","sourceRoot":"","sources":["../src/versions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,8BAA8B;AAWpD,OAAO,KAAK,EAAE,MAAM,EAAE,qBAAiB;AAEvC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,WAAW,CAAC,CAAC;AAC7D,OAAO,CAAC,MAAM,WAAW,EAAE,OAAO,MAAM,CAAC;AAEzC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,aAAa,CAAC,CAAC;AACjE,OAAO,CAAC,MAAM,aAAa,EAAE,OAAO,MAAM,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,aAAa,6BASzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,2BAS9B,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,GACf,OAAO,IAAI,aAAa,CAE1B;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,OAAO,GACpB,YAAY,IAAI,WAAW,CAE7B;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,OAAO,IAAI,aAAa,CAElC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,KAAK,IAAI,WAAW,CAE9B;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,aAAa,GACtB,OAAO,CAET;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAE3E;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,aAAa,EACtB,YAAY,EAAE,WAAW,GACxB,OAAO,CAIT"}
@@ -0,0 +1,101 @@
1
+ import type { Struct } from "@metamask/superstruct";
2
+ import type { Opaque } from "./opaque.mjs";
3
+ /**
4
+ * {@link https://codemix.com/opaque-types-in-javascript/ Opaque} type for SemVer ranges.
5
+ *
6
+ * @example Use {@link assertIsSemVerRange} and {@link isValidSemVerRange} to cast to proper type.
7
+ * ```typescript
8
+ * const unsafeRange: string = dataFromUser();
9
+ * assertIsSemVerRange(unsafeRange);
10
+ * unsafeRange
11
+ * // ^? SemVerRange
12
+ * ```
13
+ * @example If you know what you're doing and want to side-step type safety, casting from a string works correctly.
14
+ * ```typescript
15
+ * const unsafeRange: string = dataFromUser();
16
+ * unsafeRange as SemVerRange;
17
+ * // ^? SemVerRange
18
+ * ```
19
+ * @see {@link assertIsSemVerRange}
20
+ * @see {@link isValidSemVerRange}
21
+ */
22
+ export type SemVerRange = Opaque<string, typeof semVerRange>;
23
+ declare const semVerRange: unique symbol;
24
+ /**
25
+ * {@link https://codemix.com/opaque-types-in-javascript/ Opaque} type for singular SemVer version.
26
+ *
27
+ * @example Use {@link assertIsSemVerVersion} and {@link isValidSemVerVersion} to cast to proper type.
28
+ * ```typescript
29
+ * const unsafeVersion: string = dataFromUser();
30
+ * assertIsSemVerVersion(unsafeRange);
31
+ * unsafeVersion
32
+ * // ^? SemVerVersion
33
+ * ```
34
+ * @example If you know what you're doing and want to side-step type safety, casting from a string works correctly.
35
+ * ```typescript
36
+ * const unsafeVersion: string = dataFromUser();
37
+ * unsafeRange as SemVerVersion;
38
+ * // ^? SemVerVersion
39
+ * ```
40
+ * @see {@link assertIsSemVerVersion}
41
+ * @see {@link isValidSemVerVersion}
42
+ */
43
+ export type SemVerVersion = Opaque<string, typeof semVerVersion>;
44
+ declare const semVerVersion: unique symbol;
45
+ /**
46
+ * A struct for validating a version string.
47
+ */
48
+ export declare const VersionStruct: Struct<SemVerVersion, null>;
49
+ export declare const VersionRangeStruct: Struct<SemVerRange, null>;
50
+ /**
51
+ * Checks whether a SemVer version is valid.
52
+ *
53
+ * @param version - A potential version.
54
+ * @returns `true` if the version is valid, and `false` otherwise.
55
+ */
56
+ export declare function isValidSemVerVersion(version: unknown): version is SemVerVersion;
57
+ /**
58
+ * Checks whether a SemVer version range is valid.
59
+ *
60
+ * @param versionRange - A potential version range.
61
+ * @returns `true` if the version range is valid, and `false` otherwise.
62
+ */
63
+ export declare function isValidSemVerRange(versionRange: unknown): versionRange is SemVerRange;
64
+ /**
65
+ * Asserts that a value is a valid concrete SemVer version.
66
+ *
67
+ * @param version - A potential SemVer concrete version.
68
+ */
69
+ export declare function assertIsSemVerVersion(version: unknown): asserts version is SemVerVersion;
70
+ /**
71
+ * Asserts that a value is a valid SemVer range.
72
+ *
73
+ * @param range - A potential SemVer range.
74
+ */
75
+ export declare function assertIsSemVerRange(range: unknown): asserts range is SemVerRange;
76
+ /**
77
+ * Checks whether a SemVer version is greater than another.
78
+ *
79
+ * @param version1 - The left-hand version.
80
+ * @param version2 - The right-hand version.
81
+ * @returns `version1 > version2`.
82
+ */
83
+ export declare function gtVersion(version1: SemVerVersion, version2: SemVerVersion): boolean;
84
+ /**
85
+ * Checks whether a SemVer version is greater than all possibilities in a range.
86
+ *
87
+ * @param version - A SemvVer version.
88
+ * @param range - The range to check against.
89
+ * @returns `version > range`.
90
+ */
91
+ export declare function gtRange(version: SemVerVersion, range: SemVerRange): boolean;
92
+ /**
93
+ * Returns whether a SemVer version satisfies a SemVer range.
94
+ *
95
+ * @param version - The SemVer version to check.
96
+ * @param versionRange - The SemVer version range to check against.
97
+ * @returns Whether the version satisfied the version range.
98
+ */
99
+ export declare function satisfiesVersionRange(version: SemVerVersion, versionRange: SemVerRange): boolean;
100
+ export {};
101
+ //# sourceMappingURL=versions.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"versions.d.mts","sourceRoot":"","sources":["../src/versions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,8BAA8B;AAWpD,OAAO,KAAK,EAAE,MAAM,EAAE,qBAAiB;AAEvC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,WAAW,CAAC,CAAC;AAC7D,OAAO,CAAC,MAAM,WAAW,EAAE,OAAO,MAAM,CAAC;AAEzC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,aAAa,CAAC,CAAC;AACjE,OAAO,CAAC,MAAM,aAAa,EAAE,OAAO,MAAM,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,aAAa,6BASzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,2BAS9B,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,GACf,OAAO,IAAI,aAAa,CAE1B;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,OAAO,GACpB,YAAY,IAAI,WAAW,CAE7B;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,OAAO,IAAI,aAAa,CAElC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,KAAK,IAAI,WAAW,CAE9B;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,aAAa,GACtB,OAAO,CAET;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK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