@attocash/cli 0.1.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 (400) hide show
  1. package/LICENSE +28 -0
  2. package/README.md +707 -0
  3. package/dist/application/app.d.ts +138 -0
  4. package/dist/application/app.js +654 -0
  5. package/dist/application/operations.d.ts +9 -0
  6. package/dist/application/operations.js +96 -0
  7. package/dist/cli/cli.d.ts +1 -0
  8. package/dist/cli/cli.js +460 -0
  9. package/dist/cli/help.d.ts +4 -0
  10. package/dist/cli/help.js +49 -0
  11. package/dist/cli/main.d.ts +2 -0
  12. package/dist/cli/main.js +13 -0
  13. package/dist/cli/onboarding.d.ts +14 -0
  14. package/dist/cli/onboarding.js +144 -0
  15. package/dist/cli/output.d.ts +2 -0
  16. package/dist/cli/output.js +231 -0
  17. package/dist/cli/terminal.d.ts +6 -0
  18. package/dist/cli/terminal.js +92 -0
  19. package/dist/cli/update-check.d.ts +1 -0
  20. package/dist/cli/update-check.js +12 -0
  21. package/dist/cli/updates.d.ts +2 -0
  22. package/dist/cli/updates.js +98 -0
  23. package/dist/core.d.ts +14 -0
  24. package/dist/core.js +14 -0
  25. package/dist/doctor/credential-probe.d.ts +7 -0
  26. package/dist/doctor/credential-probe.js +49 -0
  27. package/dist/doctor/doctor.d.ts +4 -0
  28. package/dist/doctor/doctor.js +213 -0
  29. package/dist/doctor/keyring.d.ts +7 -0
  30. package/dist/doctor/keyring.js +150 -0
  31. package/dist/doctor/profile.d.ts +19 -0
  32. package/dist/doctor/profile.js +73 -0
  33. package/dist/doctor/types.d.ts +40 -0
  34. package/dist/doctor/types.js +1 -0
  35. package/dist/domain/amount.d.ts +6 -0
  36. package/dist/domain/amount.js +27 -0
  37. package/dist/domain/errors.d.ts +10 -0
  38. package/dist/domain/errors.js +16 -0
  39. package/dist/labels/directory.d.ts +87 -0
  40. package/dist/labels/directory.js +140 -0
  41. package/dist/labels/personal.d.ts +17 -0
  42. package/dist/labels/personal.js +56 -0
  43. package/dist/labels/presentation.d.ts +154 -0
  44. package/dist/labels/presentation.js +90 -0
  45. package/dist/network/reader.d.ts +31 -0
  46. package/dist/network/reader.js +370 -0
  47. package/dist/network/retry.d.ts +7 -0
  48. package/dist/network/retry.js +53 -0
  49. package/dist/network/work.d.ts +3 -0
  50. package/dist/network/work.js +66 -0
  51. package/dist/pricing/market.d.ts +29 -0
  52. package/dist/pricing/market.js +150 -0
  53. package/dist/pricing/terms.d.ts +6 -0
  54. package/dist/pricing/terms.js +12 -0
  55. package/dist/spending/destination.d.ts +16 -0
  56. package/dist/spending/destination.js +42 -0
  57. package/dist/spending/journal.d.ts +28 -0
  58. package/dist/spending/journal.js +69 -0
  59. package/dist/spending/ledger.d.ts +118 -0
  60. package/dist/spending/ledger.js +444 -0
  61. package/dist/spending/payments.d.ts +67 -0
  62. package/dist/spending/payments.js +424 -0
  63. package/dist/spending/pool.d.ts +13 -0
  64. package/dist/spending/pool.js +38 -0
  65. package/dist/spending/reconcile.d.ts +18 -0
  66. package/dist/spending/reconcile.js +64 -0
  67. package/dist/storage/profiles.d.ts +13 -0
  68. package/dist/storage/profiles.js +86 -0
  69. package/dist/storage/secrets.d.ts +16 -0
  70. package/dist/storage/secrets.js +104 -0
  71. package/dist/storage/state.d.ts +32 -0
  72. package/dist/storage/state.js +255 -0
  73. package/dist/wallet/auto-receive.d.ts +57 -0
  74. package/dist/wallet/auto-receive.js +140 -0
  75. package/dist/wallet/defaults.d.ts +3 -0
  76. package/dist/wallet/defaults.js +26 -0
  77. package/dist/wallet/signing.d.ts +17 -0
  78. package/dist/wallet/signing.js +128 -0
  79. package/dist/wallet/types.d.ts +65 -0
  80. package/dist/wallet/types.js +1 -0
  81. package/dist/wallet/work.d.ts +29 -0
  82. package/dist/wallet/work.js +154 -0
  83. package/dist/watches/manager.d.ts +75 -0
  84. package/dist/watches/manager.js +197 -0
  85. package/node_modules/@attocash/commons-core/Kotlin-DateTime-library-kotlinx-datetime.mjs +6678 -0
  86. package/node_modules/@attocash/commons-core/Kotlin-DateTime-library-kotlinx-datetime.mjs.map +1 -0
  87. package/node_modules/@attocash/commons-core/LICENSE +28 -0
  88. package/node_modules/@attocash/commons-core/README.md +118 -0
  89. package/node_modules/@attocash/commons-core/commons-commons-core.d.mts +1036 -0
  90. package/node_modules/@attocash/commons-core/commons-commons-core.mjs +7701 -0
  91. package/node_modules/@attocash/commons-core/commons-commons-core.mjs.map +1 -0
  92. package/node_modules/@attocash/commons-core/kotlin-kotlin-stdlib.mjs +17681 -0
  93. package/node_modules/@attocash/commons-core/kotlin-kotlin-stdlib.mjs.map +1 -0
  94. package/node_modules/@attocash/commons-core/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs +4 -0
  95. package/node_modules/@attocash/commons-core/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map +1 -0
  96. package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-bytestring.mjs +209 -0
  97. package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -0
  98. package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-core.mjs +2284 -0
  99. package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-core.mjs.map +1 -0
  100. package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-core.mjs +6042 -0
  101. package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -0
  102. package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  103. package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  104. package/node_modules/@attocash/commons-core/package.json +27 -0
  105. package/node_modules/@attocash/commons-node/LICENSE +28 -0
  106. package/node_modules/@attocash/commons-node/README.md +92 -0
  107. package/node_modules/@attocash/commons-node/commons-commons-node.d.mts +255 -0
  108. package/node_modules/@attocash/commons-node/commons-commons-node.mjs +2977 -0
  109. package/node_modules/@attocash/commons-node/commons-commons-node.mjs.map +1 -0
  110. package/node_modules/@attocash/commons-node/kotlin-logging.mjs +432 -0
  111. package/node_modules/@attocash/commons-node/kotlin-logging.mjs.map +1 -0
  112. package/node_modules/@attocash/commons-node/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  113. package/node_modules/@attocash/commons-node/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  114. package/node_modules/@attocash/commons-node/package.json +29 -0
  115. package/node_modules/@attocash/commons-node-remote/LICENSE +28 -0
  116. package/node_modules/@attocash/commons-node-remote/README.md +61 -0
  117. package/node_modules/@attocash/commons-node-remote/commons-commons-node-remote.d.mts +122 -0
  118. package/node_modules/@attocash/commons-node-remote/commons-commons-node-remote.mjs +1810 -0
  119. package/node_modules/@attocash/commons-node-remote/commons-commons-node-remote.mjs.map +1 -0
  120. package/node_modules/@attocash/commons-node-remote/kotlin-logging.mjs +432 -0
  121. package/node_modules/@attocash/commons-node-remote/kotlin-logging.mjs.map +1 -0
  122. package/node_modules/@attocash/commons-node-remote/kotlinx-browser.mjs +8 -0
  123. package/node_modules/@attocash/commons-node-remote/kotlinx-browser.mjs.map +1 -0
  124. package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json-io.mjs +4 -0
  125. package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -0
  126. package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  127. package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  128. package/node_modules/@attocash/commons-node-remote/package.json +31 -0
  129. package/node_modules/@attocash/commons-transport/LICENSE +28 -0
  130. package/node_modules/@attocash/commons-transport/README.md +5 -0
  131. package/node_modules/@attocash/commons-transport/commons-commons-transport.d.mts +64 -0
  132. package/node_modules/@attocash/commons-transport/commons-commons-transport.mjs +249 -0
  133. package/node_modules/@attocash/commons-transport/commons-commons-transport.mjs.map +1 -0
  134. package/node_modules/@attocash/commons-transport/kotlinx-atomicfu.mjs +263 -0
  135. package/node_modules/@attocash/commons-transport/kotlinx-atomicfu.mjs.map +1 -0
  136. package/node_modules/@attocash/commons-transport/kotlinx-browser.mjs +8 -0
  137. package/node_modules/@attocash/commons-transport/kotlinx-browser.mjs.map +1 -0
  138. package/node_modules/@attocash/commons-transport/kotlinx-coroutines-core.mjs +11604 -0
  139. package/node_modules/@attocash/commons-transport/kotlinx-coroutines-core.mjs.map +1 -0
  140. package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json-io.mjs +4 -0
  141. package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -0
  142. package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  143. package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  144. package/node_modules/@attocash/commons-transport/ktor-ktor-client-content-negotiation.mjs +499 -0
  145. package/node_modules/@attocash/commons-transport/ktor-ktor-client-content-negotiation.mjs.map +1 -0
  146. package/node_modules/@attocash/commons-transport/ktor-ktor-client-core.mjs +6456 -0
  147. package/node_modules/@attocash/commons-transport/ktor-ktor-client-core.mjs.map +1 -0
  148. package/node_modules/@attocash/commons-transport/ktor-ktor-events.mjs +83 -0
  149. package/node_modules/@attocash/commons-transport/ktor-ktor-events.mjs.map +1 -0
  150. package/node_modules/@attocash/commons-transport/ktor-ktor-http-cio.mjs +1714 -0
  151. package/node_modules/@attocash/commons-transport/ktor-ktor-http-cio.mjs.map +1 -0
  152. package/node_modules/@attocash/commons-transport/ktor-ktor-http.mjs +3197 -0
  153. package/node_modules/@attocash/commons-transport/ktor-ktor-http.mjs.map +1 -0
  154. package/node_modules/@attocash/commons-transport/ktor-ktor-io.mjs +2290 -0
  155. package/node_modules/@attocash/commons-transport/ktor-ktor-io.mjs.map +1 -0
  156. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx-json.mjs +46 -0
  157. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx-json.mjs.map +1 -0
  158. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx.mjs +482 -0
  159. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx.mjs.map +1 -0
  160. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization.mjs +165 -0
  161. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization.mjs.map +1 -0
  162. package/node_modules/@attocash/commons-transport/ktor-ktor-sse.mjs +4 -0
  163. package/node_modules/@attocash/commons-transport/ktor-ktor-sse.mjs.map +1 -0
  164. package/node_modules/@attocash/commons-transport/ktor-ktor-utils.mjs +3222 -0
  165. package/node_modules/@attocash/commons-transport/ktor-ktor-utils.mjs.map +1 -0
  166. package/node_modules/@attocash/commons-transport/ktor-ktor-websocket-serialization.mjs +4 -0
  167. package/node_modules/@attocash/commons-transport/ktor-ktor-websocket-serialization.mjs.map +1 -0
  168. package/node_modules/@attocash/commons-transport/ktor-ktor-websockets.mjs +1485 -0
  169. package/node_modules/@attocash/commons-transport/ktor-ktor-websockets.mjs.map +1 -0
  170. package/node_modules/@attocash/commons-transport/package.json +29 -0
  171. package/node_modules/@attocash/commons-worker/LICENSE +28 -0
  172. package/node_modules/@attocash/commons-worker/README.md +48 -0
  173. package/node_modules/@attocash/commons-worker/commons-commons-worker.d.mts +73 -0
  174. package/node_modules/@attocash/commons-worker/commons-commons-worker.mjs +702 -0
  175. package/node_modules/@attocash/commons-worker/commons-commons-worker.mjs.map +1 -0
  176. package/node_modules/@attocash/commons-worker/kotlin-logging.mjs +432 -0
  177. package/node_modules/@attocash/commons-worker/kotlin-logging.mjs.map +1 -0
  178. package/node_modules/@attocash/commons-worker/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  179. package/node_modules/@attocash/commons-worker/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  180. package/node_modules/@attocash/commons-worker/package.json +29 -0
  181. package/node_modules/@attocash/commons-worker-remote/LICENSE +28 -0
  182. package/node_modules/@attocash/commons-worker-remote/README.md +60 -0
  183. package/node_modules/@attocash/commons-worker-remote/commons-commons-worker-remote.d.mts +93 -0
  184. package/node_modules/@attocash/commons-worker-remote/commons-commons-worker-remote.mjs +289 -0
  185. package/node_modules/@attocash/commons-worker-remote/commons-commons-worker-remote.mjs.map +1 -0
  186. package/node_modules/@attocash/commons-worker-remote/kotlin-logging.mjs +432 -0
  187. package/node_modules/@attocash/commons-worker-remote/kotlin-logging.mjs.map +1 -0
  188. package/node_modules/@attocash/commons-worker-remote/kotlinx-browser.mjs +8 -0
  189. package/node_modules/@attocash/commons-worker-remote/kotlinx-browser.mjs.map +1 -0
  190. package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json-io.mjs +4 -0
  191. package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -0
  192. package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  193. package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  194. package/node_modules/@attocash/commons-worker-remote/package.json +31 -0
  195. package/node_modules/@js-joda/core/CHANGELOG.md +363 -0
  196. package/node_modules/@js-joda/core/CheatSheet.md +947 -0
  197. package/node_modules/@js-joda/core/LICENSE +34 -0
  198. package/node_modules/@js-joda/core/README.md +155 -0
  199. package/node_modules/@js-joda/core/bower.json +21 -0
  200. package/node_modules/@js-joda/core/dist/js-joda.d.ts +2452 -0
  201. package/node_modules/@js-joda/core/dist/js-joda.esm.js +13564 -0
  202. package/node_modules/@js-joda/core/dist/js-joda.flow.js +949 -0
  203. package/node_modules/@js-joda/core/dist/js-joda.js +13630 -0
  204. package/node_modules/@js-joda/core/dist/js-joda.js.map +1 -0
  205. package/node_modules/@js-joda/core/dist/js-joda.min.js +5 -0
  206. package/node_modules/@js-joda/core/package.json +76 -0
  207. package/node_modules/@js-joda/core/src/Clock.js +330 -0
  208. package/node_modules/@js-joda/core/src/DayOfWeek.js +451 -0
  209. package/node_modules/@js-joda/core/src/Duration.js +1205 -0
  210. package/node_modules/@js-joda/core/src/Enum.js +30 -0
  211. package/node_modules/@js-joda/core/src/Instant.js +1012 -0
  212. package/node_modules/@js-joda/core/src/LocalDate.js +1703 -0
  213. package/node_modules/@js-joda/core/src/LocalDateTime.js +1686 -0
  214. package/node_modules/@js-joda/core/src/LocalTime.js +1415 -0
  215. package/node_modules/@js-joda/core/src/MathUtil.js +236 -0
  216. package/node_modules/@js-joda/core/src/Month.js +600 -0
  217. package/node_modules/@js-joda/core/src/MonthDay.js +730 -0
  218. package/node_modules/@js-joda/core/src/OffsetDateTime.js +757 -0
  219. package/node_modules/@js-joda/core/src/OffsetTime.js +621 -0
  220. package/node_modules/@js-joda/core/src/Period.js +933 -0
  221. package/node_modules/@js-joda/core/src/StringUtil.js +43 -0
  222. package/node_modules/@js-joda/core/src/Year.js +1015 -0
  223. package/node_modules/@js-joda/core/src/YearConstants.js +21 -0
  224. package/node_modules/@js-joda/core/src/YearMonth.js +1096 -0
  225. package/node_modules/@js-joda/core/src/ZoneId.js +236 -0
  226. package/node_modules/@js-joda/core/src/ZoneIdFactory.js +201 -0
  227. package/node_modules/@js-joda/core/src/ZoneOffset.js +486 -0
  228. package/node_modules/@js-joda/core/src/ZoneRegion.js +72 -0
  229. package/node_modules/@js-joda/core/src/ZonedDateTime.js +2007 -0
  230. package/node_modules/@js-joda/core/src/_init.js +68 -0
  231. package/node_modules/@js-joda/core/src/assert.js +33 -0
  232. package/node_modules/@js-joda/core/src/chrono/ChronoLocalDate.js +230 -0
  233. package/node_modules/@js-joda/core/src/chrono/ChronoLocalDateTime.js +130 -0
  234. package/node_modules/@js-joda/core/src/chrono/ChronoZonedDateTime.js +194 -0
  235. package/node_modules/@js-joda/core/src/chrono/IsoChronology.js +235 -0
  236. package/node_modules/@js-joda/core/src/convert.js +83 -0
  237. package/node_modules/@js-joda/core/src/errors.js +54 -0
  238. package/node_modules/@js-joda/core/src/format/DateTimeBuilder.js +535 -0
  239. package/node_modules/@js-joda/core/src/format/DateTimeFormatter.js +728 -0
  240. package/node_modules/@js-joda/core/src/format/DateTimeFormatterBuilder.js +1545 -0
  241. package/node_modules/@js-joda/core/src/format/DateTimeParseContext.js +297 -0
  242. package/node_modules/@js-joda/core/src/format/DateTimePrintContext.js +138 -0
  243. package/node_modules/@js-joda/core/src/format/DecimalStyle.js +113 -0
  244. package/node_modules/@js-joda/core/src/format/EnumMap.js +70 -0
  245. package/node_modules/@js-joda/core/src/format/ParsePosition.js +31 -0
  246. package/node_modules/@js-joda/core/src/format/ResolverStyle.js +93 -0
  247. package/node_modules/@js-joda/core/src/format/SignStyle.js +38 -0
  248. package/node_modules/@js-joda/core/src/format/StringBuilder.js +47 -0
  249. package/node_modules/@js-joda/core/src/format/TextStyle.js +114 -0
  250. package/node_modules/@js-joda/core/src/format/parser/CharLiteralPrinterParser.js +46 -0
  251. package/node_modules/@js-joda/core/src/format/parser/CompositePrinterParser.js +89 -0
  252. package/node_modules/@js-joda/core/src/format/parser/FractionPrinterParser.js +162 -0
  253. package/node_modules/@js-joda/core/src/format/parser/NumberPrinterParser.js +367 -0
  254. package/node_modules/@js-joda/core/src/format/parser/OffsetIdPrinterParser.js +177 -0
  255. package/node_modules/@js-joda/core/src/format/parser/PadPrinterParserDecorator.js +81 -0
  256. package/node_modules/@js-joda/core/src/format/parser/SettingsParser.js +44 -0
  257. package/node_modules/@js-joda/core/src/format/parser/StringLiteralPrinterParser.js +39 -0
  258. package/node_modules/@js-joda/core/src/format/parser/ZoneIdPrinterParser.js +218 -0
  259. package/node_modules/@js-joda/core/src/js-joda.js +210 -0
  260. package/node_modules/@js-joda/core/src/license-preamble.js +3 -0
  261. package/node_modules/@js-joda/core/src/temporal/ChronoField.js +470 -0
  262. package/node_modules/@js-joda/core/src/temporal/ChronoUnit.js +310 -0
  263. package/node_modules/@js-joda/core/src/temporal/DefaultInterfaceTemporal.js +118 -0
  264. package/node_modules/@js-joda/core/src/temporal/IsoFields.js +859 -0
  265. package/node_modules/@js-joda/core/src/temporal/NativeJsTemporal.js +105 -0
  266. package/node_modules/@js-joda/core/src/temporal/Temporal.js +346 -0
  267. package/node_modules/@js-joda/core/src/temporal/TemporalAccessor.js +125 -0
  268. package/node_modules/@js-joda/core/src/temporal/TemporalAdjuster.js +92 -0
  269. package/node_modules/@js-joda/core/src/temporal/TemporalAdjusters.js +464 -0
  270. package/node_modules/@js-joda/core/src/temporal/TemporalAmount.js +166 -0
  271. package/node_modules/@js-joda/core/src/temporal/TemporalField.js +248 -0
  272. package/node_modules/@js-joda/core/src/temporal/TemporalQueries.js +223 -0
  273. package/node_modules/@js-joda/core/src/temporal/TemporalQueriesFactory.js +77 -0
  274. package/node_modules/@js-joda/core/src/temporal/TemporalQuery.js +107 -0
  275. package/node_modules/@js-joda/core/src/temporal/TemporalUnit.js +179 -0
  276. package/node_modules/@js-joda/core/src/temporal/ValueRange.js +257 -0
  277. package/node_modules/@js-joda/core/src/use.js +20 -0
  278. package/node_modules/@js-joda/core/src/zone/SystemDefaultZoneId.js +31 -0
  279. package/node_modules/@js-joda/core/src/zone/SystemDefaultZoneRules.js +162 -0
  280. package/node_modules/@js-joda/core/src/zone/ZoneOffsetTransition.js +289 -0
  281. package/node_modules/@js-joda/core/src/zone/ZoneRules.js +464 -0
  282. package/node_modules/@js-joda/core/src/zone/ZoneRulesProvider.js +36 -0
  283. package/node_modules/@noble/hashes/LICENSE +21 -0
  284. package/node_modules/@noble/hashes/README.md +563 -0
  285. package/node_modules/@noble/hashes/_blake.d.ts +21 -0
  286. package/node_modules/@noble/hashes/_blake.d.ts.map +1 -0
  287. package/node_modules/@noble/hashes/_blake.js +52 -0
  288. package/node_modules/@noble/hashes/_blake.js.map +1 -0
  289. package/node_modules/@noble/hashes/_md.d.ts +99 -0
  290. package/node_modules/@noble/hashes/_md.d.ts.map +1 -0
  291. package/node_modules/@noble/hashes/_md.js +202 -0
  292. package/node_modules/@noble/hashes/_md.js.map +1 -0
  293. package/node_modules/@noble/hashes/_u64.d.ts +63 -0
  294. package/node_modules/@noble/hashes/_u64.d.ts.map +1 -0
  295. package/node_modules/@noble/hashes/_u64.js +84 -0
  296. package/node_modules/@noble/hashes/_u64.js.map +1 -0
  297. package/node_modules/@noble/hashes/argon2.d.ts +112 -0
  298. package/node_modules/@noble/hashes/argon2.d.ts.map +1 -0
  299. package/node_modules/@noble/hashes/argon2.js +517 -0
  300. package/node_modules/@noble/hashes/argon2.js.map +1 -0
  301. package/node_modules/@noble/hashes/blake1.d.ts +156 -0
  302. package/node_modules/@noble/hashes/blake1.d.ts.map +1 -0
  303. package/node_modules/@noble/hashes/blake1.js +560 -0
  304. package/node_modules/@noble/hashes/blake1.js.map +1 -0
  305. package/node_modules/@noble/hashes/blake2.d.ts +184 -0
  306. package/node_modules/@noble/hashes/blake2.d.ts.map +1 -0
  307. package/node_modules/@noble/hashes/blake2.js +501 -0
  308. package/node_modules/@noble/hashes/blake2.js.map +1 -0
  309. package/node_modules/@noble/hashes/blake3.d.ts +68 -0
  310. package/node_modules/@noble/hashes/blake3.d.ts.map +1 -0
  311. package/node_modules/@noble/hashes/blake3.js +284 -0
  312. package/node_modules/@noble/hashes/blake3.js.map +1 -0
  313. package/node_modules/@noble/hashes/eskdf.d.ts +92 -0
  314. package/node_modules/@noble/hashes/eskdf.d.ts.map +1 -0
  315. package/node_modules/@noble/hashes/eskdf.js +218 -0
  316. package/node_modules/@noble/hashes/eskdf.js.map +1 -0
  317. package/node_modules/@noble/hashes/hkdf.d.ts +64 -0
  318. package/node_modules/@noble/hashes/hkdf.d.ts.map +1 -0
  319. package/node_modules/@noble/hashes/hkdf.js +120 -0
  320. package/node_modules/@noble/hashes/hkdf.js.map +1 -0
  321. package/node_modules/@noble/hashes/hmac.d.ts +47 -0
  322. package/node_modules/@noble/hashes/hmac.d.ts.map +1 -0
  323. package/node_modules/@noble/hashes/hmac.js +93 -0
  324. package/node_modules/@noble/hashes/hmac.js.map +1 -0
  325. package/node_modules/@noble/hashes/index.d.ts +2 -0
  326. package/node_modules/@noble/hashes/index.d.ts.map +1 -0
  327. package/node_modules/@noble/hashes/index.js +35 -0
  328. package/node_modules/@noble/hashes/index.js.map +1 -0
  329. package/node_modules/@noble/hashes/legacy.d.ts +102 -0
  330. package/node_modules/@noble/hashes/legacy.d.ts.map +1 -0
  331. package/node_modules/@noble/hashes/legacy.js +327 -0
  332. package/node_modules/@noble/hashes/legacy.js.map +1 -0
  333. package/node_modules/@noble/hashes/package.json +97 -0
  334. package/node_modules/@noble/hashes/pbkdf2.d.ts +56 -0
  335. package/node_modules/@noble/hashes/pbkdf2.d.ts.map +1 -0
  336. package/node_modules/@noble/hashes/pbkdf2.js +135 -0
  337. package/node_modules/@noble/hashes/pbkdf2.js.map +1 -0
  338. package/node_modules/@noble/hashes/scrypt.d.ts +65 -0
  339. package/node_modules/@noble/hashes/scrypt.d.ts.map +1 -0
  340. package/node_modules/@noble/hashes/scrypt.js +257 -0
  341. package/node_modules/@noble/hashes/scrypt.js.map +1 -0
  342. package/node_modules/@noble/hashes/sha2.d.ts +249 -0
  343. package/node_modules/@noble/hashes/sha2.d.ts.map +1 -0
  344. package/node_modules/@noble/hashes/sha2.js +458 -0
  345. package/node_modules/@noble/hashes/sha2.js.map +1 -0
  346. package/node_modules/@noble/hashes/sha3-addons.d.ts +461 -0
  347. package/node_modules/@noble/hashes/sha3-addons.d.ts.map +1 -0
  348. package/node_modules/@noble/hashes/sha3-addons.js +783 -0
  349. package/node_modules/@noble/hashes/sha3-addons.js.map +1 -0
  350. package/node_modules/@noble/hashes/sha3.d.ts +199 -0
  351. package/node_modules/@noble/hashes/sha3.d.ts.map +1 -0
  352. package/node_modules/@noble/hashes/sha3.js +431 -0
  353. package/node_modules/@noble/hashes/sha3.js.map +1 -0
  354. package/node_modules/@noble/hashes/src/_blake.ts +57 -0
  355. package/node_modules/@noble/hashes/src/_md.ts +222 -0
  356. package/node_modules/@noble/hashes/src/_u64.ts +117 -0
  357. package/node_modules/@noble/hashes/src/argon2.ts +667 -0
  358. package/node_modules/@noble/hashes/src/blake1.ts +614 -0
  359. package/node_modules/@noble/hashes/src/blake2.ts +582 -0
  360. package/node_modules/@noble/hashes/src/blake3.ts +317 -0
  361. package/node_modules/@noble/hashes/src/eskdf.ts +259 -0
  362. package/node_modules/@noble/hashes/src/hkdf.ts +133 -0
  363. package/node_modules/@noble/hashes/src/hmac.ts +126 -0
  364. package/node_modules/@noble/hashes/src/index.ts +33 -0
  365. package/node_modules/@noble/hashes/src/legacy.ts +339 -0
  366. package/node_modules/@noble/hashes/src/pbkdf2.ts +175 -0
  367. package/node_modules/@noble/hashes/src/scrypt.ts +315 -0
  368. package/node_modules/@noble/hashes/src/sha2.ts +530 -0
  369. package/node_modules/@noble/hashes/src/sha3-addons.ts +983 -0
  370. package/node_modules/@noble/hashes/src/sha3.ts +485 -0
  371. package/node_modules/@noble/hashes/src/utils.ts +848 -0
  372. package/node_modules/@noble/hashes/src/webcrypto.ts +239 -0
  373. package/node_modules/@noble/hashes/utils.d.ts +519 -0
  374. package/node_modules/@noble/hashes/utils.d.ts.map +1 -0
  375. package/node_modules/@noble/hashes/utils.js +578 -0
  376. package/node_modules/@noble/hashes/utils.js.map +1 -0
  377. package/node_modules/@noble/hashes/webcrypto.d.ts +120 -0
  378. package/node_modules/@noble/hashes/webcrypto.d.ts.map +1 -0
  379. package/node_modules/@noble/hashes/webcrypto.js +165 -0
  380. package/node_modules/@noble/hashes/webcrypto.js.map +1 -0
  381. package/node_modules/ws/LICENSE +20 -0
  382. package/node_modules/ws/README.md +548 -0
  383. package/node_modules/ws/browser.js +8 -0
  384. package/node_modules/ws/index.js +22 -0
  385. package/node_modules/ws/lib/buffer-util.js +131 -0
  386. package/node_modules/ws/lib/constants.js +19 -0
  387. package/node_modules/ws/lib/event-target.js +292 -0
  388. package/node_modules/ws/lib/extension.js +203 -0
  389. package/node_modules/ws/lib/limiter.js +55 -0
  390. package/node_modules/ws/lib/permessage-deflate.js +530 -0
  391. package/node_modules/ws/lib/receiver.js +743 -0
  392. package/node_modules/ws/lib/sender.js +607 -0
  393. package/node_modules/ws/lib/stream.js +161 -0
  394. package/node_modules/ws/lib/subprotocol.js +62 -0
  395. package/node_modules/ws/lib/validation.js +152 -0
  396. package/node_modules/ws/lib/websocket-server.js +562 -0
  397. package/node_modules/ws/lib/websocket.js +1407 -0
  398. package/node_modules/ws/package.json +74 -0
  399. package/node_modules/ws/wrapper.mjs +21 -0
  400. package/package.json +53 -0
@@ -0,0 +1,102 @@
1
+ /**
2
+
3
+ SHA1 (RFC 3174), MD5 (RFC 1321), and RIPEMD160 legacy, weak hash functions.
4
+ RFC 2286 only covers HMAC-RIPEMD160 wrapper material and test vectors,
5
+ not the base RIPEMD-160 compression spec.
6
+ Don't use them in a new protocol. What "weak" means:
7
+
8
+ - Collisions can be made with 2^18 effort in MD5, 2^60 in SHA1, 2^80 in RIPEMD160.
9
+ - No practical pre-image attacks (only theoretical, 2^123.4)
10
+ - HMAC seems kinda ok: https://www.rfc-editor.org/rfc/rfc6151
11
+ * @module
12
+ */
13
+ import { HashMD } from './_md.ts';
14
+ import { type CHash, type TRet } from './utils.ts';
15
+ /** Internal SHA1 legacy hash class. */
16
+ export declare class _SHA1 extends HashMD<_SHA1> {
17
+ private A;
18
+ private B;
19
+ private C;
20
+ private D;
21
+ private E;
22
+ constructor();
23
+ protected get(): [number, number, number, number, number];
24
+ protected set(A: number, B: number, C: number, D: number, E: number): void;
25
+ protected process(view: DataView, offset: number): void;
26
+ protected roundClean(): void;
27
+ destroy(): void;
28
+ }
29
+ /**
30
+ * SHA1 (RFC 3174) legacy hash function. It was cryptographically broken.
31
+ * @param msg - message bytes to hash
32
+ * @returns Digest bytes.
33
+ * @example
34
+ * Hash a message with SHA1.
35
+ * ```ts
36
+ * sha1(new Uint8Array([97, 98, 99]));
37
+ * ```
38
+ */
39
+ export declare const sha1: TRet<CHash>;
40
+ /** Internal MD5 legacy hash class. */
41
+ export declare class _MD5 extends HashMD<_MD5> {
42
+ private A;
43
+ private B;
44
+ private C;
45
+ private D;
46
+ constructor();
47
+ protected get(): [number, number, number, number];
48
+ protected set(A: number, B: number, C: number, D: number): void;
49
+ protected process(view: DataView, offset: number): void;
50
+ protected roundClean(): void;
51
+ destroy(): void;
52
+ }
53
+ /**
54
+ * MD5 (RFC 1321) legacy hash function. It was cryptographically broken.
55
+ * MD5 architecture is similar to SHA1, with some differences:
56
+ * - Reduced output length: 16 bytes (128 bit) instead of 20
57
+ * - 64 rounds, instead of 80
58
+ * - Little-endian: could be faster, but will require more code
59
+ * - Non-linear index selection: huge speed-up for unroll
60
+ * - Per round constants: more memory accesses, additional speed-up for unroll
61
+ * @param msg - message bytes to hash
62
+ * @returns Digest bytes.
63
+ * @example
64
+ * Hash a message with MD5.
65
+ * ```ts
66
+ * md5(new Uint8Array([97, 98, 99]));
67
+ * ```
68
+ */
69
+ export declare const md5: TRet<CHash>;
70
+ /**
71
+ * Internal RIPEMD-160 legacy hash class.
72
+ * RFC 2286 only adds HMAC-RIPEMD160 material, not the core hash specification.
73
+ */
74
+ export declare class _RIPEMD160 extends HashMD<_RIPEMD160> {
75
+ private h0;
76
+ private h1;
77
+ private h2;
78
+ private h3;
79
+ private h4;
80
+ constructor();
81
+ protected get(): [number, number, number, number, number];
82
+ protected set(h0: number, h1: number, h2: number, h3: number, h4: number): void;
83
+ protected process(view: DataView, offset: number): void;
84
+ protected roundClean(): void;
85
+ destroy(): void;
86
+ }
87
+ /**
88
+ * RIPEMD-160 - a legacy hash function from 1990s.
89
+ * RFC 2286 only covers HMAC-RIPEMD160 test material; the links below point
90
+ * at the base RIPEMD-160 references.
91
+ * * {@link https://homes.esat.kuleuven.be/~bosselae/ripemd160.html}
92
+ * * {@link https://homes.esat.kuleuven.be/~bosselae/ripemd160/pdf/AB-9601/AB-9601.pdf}
93
+ * @param msg - message bytes to hash
94
+ * @returns Digest bytes.
95
+ * @example
96
+ * Hash a message with RIPEMD-160.
97
+ * ```ts
98
+ * ripemd160(new Uint8Array([97, 98, 99]));
99
+ * ```
100
+ */
101
+ export declare const ripemd160: TRet<CHash>;
102
+ //# sourceMappingURL=legacy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legacy.d.ts","sourceRoot":"","sources":["src/legacy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAO,MAAM,EAAO,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,KAAK,KAAK,EAA6B,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAU9E,uCAAuC;AACvC,qBAAa,KAAM,SAAQ,MAAM,CAAC,KAAK,CAAC;IACtC,OAAO,CAAC,CAAC,CAAkB;IAC3B,OAAO,CAAC,CAAC,CAAkB;IAC3B,OAAO,CAAC,CAAC,CAAkB;IAC3B,OAAO,CAAC,CAAC,CAAkB;IAC3B,OAAO,CAAC,CAAC,CAAkB;;IAK3B,SAAS,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;IAIzD,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI;IAO1E,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAoCvD,SAAS,CAAC,UAAU,IAAI,IAAI;IAG5B,OAAO,IAAI,IAAI;CAOhB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAAmD,CAAC;AAcjF,sCAAsC;AACtC,qBAAa,IAAK,SAAQ,MAAM,CAAC,IAAI,CAAC;IACp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AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,SAAS,EAAE,IAAI,CAAC,KAAK,CAAwD,CAAC"}
@@ -0,0 +1,327 @@
1
+ /**
2
+
3
+ SHA1 (RFC 3174), MD5 (RFC 1321), and RIPEMD160 legacy, weak hash functions.
4
+ RFC 2286 only covers HMAC-RIPEMD160 wrapper material and test vectors,
5
+ not the base RIPEMD-160 compression spec.
6
+ Don't use them in a new protocol. What "weak" means:
7
+
8
+ - Collisions can be made with 2^18 effort in MD5, 2^60 in SHA1, 2^80 in RIPEMD160.
9
+ - No practical pre-image attacks (only theoretical, 2^123.4)
10
+ - HMAC seems kinda ok: https://www.rfc-editor.org/rfc/rfc6151
11
+ * @module
12
+ */
13
+ import { Chi, HashMD, Maj } from "./_md.js";
14
+ import { clean, createHasher, rotl } from "./utils.js";
15
+ /** Initial SHA-1 state from RFC 3174 §6.1. */
16
+ const SHA1_IV = /* @__PURE__ */ Uint32Array.from([
17
+ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0,
18
+ ]);
19
+ // Reusable 80-word SHA-1 message schedule buffer.
20
+ const SHA1_W = /* @__PURE__ */ new Uint32Array(80);
21
+ /** Internal SHA1 legacy hash class. */
22
+ export class _SHA1 extends HashMD {
23
+ A = SHA1_IV[0] | 0;
24
+ B = SHA1_IV[1] | 0;
25
+ C = SHA1_IV[2] | 0;
26
+ D = SHA1_IV[3] | 0;
27
+ E = SHA1_IV[4] | 0;
28
+ constructor() {
29
+ super(64, 20, 8, false);
30
+ }
31
+ get() {
32
+ const { A, B, C, D, E } = this;
33
+ return [A, B, C, D, E];
34
+ }
35
+ set(A, B, C, D, E) {
36
+ this.A = A | 0;
37
+ this.B = B | 0;
38
+ this.C = C | 0;
39
+ this.D = D | 0;
40
+ this.E = E | 0;
41
+ }
42
+ process(view, offset) {
43
+ for (let i = 0; i < 16; i++, offset += 4)
44
+ SHA1_W[i] = view.getUint32(offset, false);
45
+ for (let i = 16; i < 80; i++)
46
+ SHA1_W[i] = rotl(SHA1_W[i - 3] ^ SHA1_W[i - 8] ^ SHA1_W[i - 14] ^ SHA1_W[i - 16], 1);
47
+ // Compression function main loop, 80 rounds
48
+ let { A, B, C, D, E } = this;
49
+ for (let i = 0; i < 80; i++) {
50
+ let F, K;
51
+ if (i < 20) {
52
+ F = Chi(B, C, D);
53
+ K = 0x5a827999;
54
+ }
55
+ else if (i < 40) {
56
+ F = B ^ C ^ D;
57
+ K = 0x6ed9eba1;
58
+ }
59
+ else if (i < 60) {
60
+ F = Maj(B, C, D);
61
+ K = 0x8f1bbcdc;
62
+ }
63
+ else {
64
+ F = B ^ C ^ D;
65
+ K = 0xca62c1d6;
66
+ }
67
+ const T = (rotl(A, 5) + F + E + K + SHA1_W[i]) | 0;
68
+ E = D;
69
+ D = C;
70
+ C = rotl(B, 30);
71
+ B = A;
72
+ A = T;
73
+ }
74
+ // Add the compressed chunk to the current hash value
75
+ A = (A + this.A) | 0;
76
+ B = (B + this.B) | 0;
77
+ C = (C + this.C) | 0;
78
+ D = (D + this.D) | 0;
79
+ E = (E + this.E) | 0;
80
+ this.set(A, B, C, D, E);
81
+ }
82
+ roundClean() {
83
+ clean(SHA1_W);
84
+ }
85
+ destroy() {
86
+ // HashMD callers route post-destroy usability through `destroyed`; zeroizing alone still leaves
87
+ // update()/digest() callable on reused instances.
88
+ this.destroyed = true;
89
+ this.set(0, 0, 0, 0, 0);
90
+ clean(this.buffer);
91
+ }
92
+ }
93
+ /**
94
+ * SHA1 (RFC 3174) legacy hash function. It was cryptographically broken.
95
+ * @param msg - message bytes to hash
96
+ * @returns Digest bytes.
97
+ * @example
98
+ * Hash a message with SHA1.
99
+ * ```ts
100
+ * sha1(new Uint8Array([97, 98, 99]));
101
+ * ```
102
+ */
103
+ export const sha1 = /* @__PURE__ */ createHasher(() => new _SHA1());
104
+ /** RFC 1321 `T[i]` uses `floor(2^32 * abs(sin(i)))`; this is the shared `2^32` scale factor. */
105
+ const p32 = /* @__PURE__ */ Math.pow(2, 32);
106
+ /** RFC 1321 `T[1..64]` table. */
107
+ const K = /* @__PURE__ */ Array.from({ length: 64 }, (_, i) => Math.floor(p32 * Math.abs(Math.sin(i + 1))));
108
+ /** MD5 initial state from RFC 1321, stored as 4 u32 words. */
109
+ const MD5_IV = /* @__PURE__ */ SHA1_IV.slice(0, 4);
110
+ // Reusable 16-word MD5 message block buffer.
111
+ const MD5_W = /* @__PURE__ */ new Uint32Array(16);
112
+ /** Internal MD5 legacy hash class. */
113
+ export class _MD5 extends HashMD {
114
+ A = MD5_IV[0] | 0;
115
+ B = MD5_IV[1] | 0;
116
+ C = MD5_IV[2] | 0;
117
+ D = MD5_IV[3] | 0;
118
+ constructor() {
119
+ super(64, 16, 8, true);
120
+ }
121
+ get() {
122
+ const { A, B, C, D } = this;
123
+ return [A, B, C, D];
124
+ }
125
+ set(A, B, C, D) {
126
+ this.A = A | 0;
127
+ this.B = B | 0;
128
+ this.C = C | 0;
129
+ this.D = D | 0;
130
+ }
131
+ process(view, offset) {
132
+ for (let i = 0; i < 16; i++, offset += 4)
133
+ MD5_W[i] = view.getUint32(offset, true);
134
+ // Compression function main loop, 64 rounds
135
+ let { A, B, C, D } = this;
136
+ for (let i = 0; i < 64; i++) {
137
+ let F, g, s;
138
+ if (i < 16) {
139
+ F = Chi(B, C, D);
140
+ g = i;
141
+ s = [7, 12, 17, 22];
142
+ }
143
+ else if (i < 32) {
144
+ // RFC 1321 round 2 uses G(B,C,D) = (B & D) | (C & ~D), which is `Chi(D, B, C)`.
145
+ F = Chi(D, B, C);
146
+ g = (5 * i + 1) % 16;
147
+ s = [5, 9, 14, 20];
148
+ }
149
+ else if (i < 48) {
150
+ F = B ^ C ^ D;
151
+ g = (3 * i + 5) % 16;
152
+ s = [4, 11, 16, 23];
153
+ }
154
+ else {
155
+ F = C ^ (B | ~D);
156
+ g = (7 * i) % 16;
157
+ s = [6, 10, 15, 21];
158
+ }
159
+ F = F + A + K[i] + MD5_W[g];
160
+ A = D;
161
+ D = C;
162
+ C = B;
163
+ B = B + rotl(F, s[i % 4]);
164
+ }
165
+ // Add the compressed chunk to the current hash value
166
+ A = (A + this.A) | 0;
167
+ B = (B + this.B) | 0;
168
+ C = (C + this.C) | 0;
169
+ D = (D + this.D) | 0;
170
+ this.set(A, B, C, D);
171
+ }
172
+ roundClean() {
173
+ clean(MD5_W);
174
+ }
175
+ destroy() {
176
+ // HashMD callers route post-destroy usability through `destroyed`; zeroizing alone still leaves
177
+ // update()/digest() callable on reused instances.
178
+ this.destroyed = true;
179
+ this.set(0, 0, 0, 0);
180
+ clean(this.buffer);
181
+ }
182
+ }
183
+ /**
184
+ * MD5 (RFC 1321) legacy hash function. It was cryptographically broken.
185
+ * MD5 architecture is similar to SHA1, with some differences:
186
+ * - Reduced output length: 16 bytes (128 bit) instead of 20
187
+ * - 64 rounds, instead of 80
188
+ * - Little-endian: could be faster, but will require more code
189
+ * - Non-linear index selection: huge speed-up for unroll
190
+ * - Per round constants: more memory accesses, additional speed-up for unroll
191
+ * @param msg - message bytes to hash
192
+ * @returns Digest bytes.
193
+ * @example
194
+ * Hash a message with MD5.
195
+ * ```ts
196
+ * md5(new Uint8Array([97, 98, 99]));
197
+ * ```
198
+ */
199
+ export const md5 = /* @__PURE__ */ createHasher(() => new _MD5());
200
+ // RIPEMD-160
201
+ // Permutation repeatedly applied to derive the later RIPEMD-160 message-order tables.
202
+ const Rho160 = /* @__PURE__ */ Uint8Array.from([
203
+ 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,
204
+ ]);
205
+ const Id160 = /* @__PURE__ */ (() => Uint8Array.from(new Array(16).fill(0).map((_, i) => i)))();
206
+ const Pi160 = /* @__PURE__ */ (() => Id160.map((i) => (9 * i + 5) % 16))();
207
+ // Five left/right message-word orderings for the RIPEMD-160 dual-lane rounds.
208
+ const idxLR = /* @__PURE__ */ (() => {
209
+ const L = [Id160];
210
+ const R = [Pi160];
211
+ const res = [L, R];
212
+ for (let i = 0; i < 4; i++)
213
+ for (let j of res)
214
+ j.push(j[i].map((k) => Rho160[k]));
215
+ return res;
216
+ })();
217
+ const idxL = /* @__PURE__ */ (() => idxLR[0])();
218
+ const idxR = /* @__PURE__ */ (() => idxLR[1])();
219
+ // const [idxL, idxR] = idxLR;
220
+ // Base per-group shift table before the left/right message-order permutations are applied.
221
+ const shifts160 = /* @__PURE__ */ [
222
+ [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],
223
+ [12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7],
224
+ [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],
225
+ [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],
226
+ [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5],
227
+ ].map((i) => Uint8Array.from(i));
228
+ const shiftsL160 = /* @__PURE__ */ idxL.map((idx, i) => idx.map((j) => shifts160[i][j]));
229
+ const shiftsR160 = /* @__PURE__ */ idxR.map((idx, i) => idx.map((j) => shifts160[i][j]));
230
+ // Five left-lane additive constants for RIPEMD-160.
231
+ const Kl160 = /* @__PURE__ */ Uint32Array.from([
232
+ 0x00000000, 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xa953fd4e,
233
+ ]);
234
+ // Five right-lane additive constants for RIPEMD-160.
235
+ const Kr160 = /* @__PURE__ */ Uint32Array.from([
236
+ 0x50a28be6, 0x5c4dd124, 0x6d703ef3, 0x7a6d76e9, 0x00000000,
237
+ ]);
238
+ // Called `f()` in the spec; valid `group` values are 0..4, and out-of-range
239
+ // inputs currently fall through to the group-4 branch.
240
+ function ripemd_f(group, x, y, z) {
241
+ if (group === 0)
242
+ return x ^ y ^ z;
243
+ if (group === 1)
244
+ return (x & y) | (~x & z);
245
+ if (group === 2)
246
+ return (x | ~y) ^ z;
247
+ if (group === 3)
248
+ return (x & z) | (y & ~z);
249
+ return x ^ (y | ~z);
250
+ }
251
+ // Reusable 16-word RIPEMD-160 message block buffer.
252
+ const BUF_160 = /* @__PURE__ */ new Uint32Array(16);
253
+ /**
254
+ * Internal RIPEMD-160 legacy hash class.
255
+ * RFC 2286 only adds HMAC-RIPEMD160 material, not the core hash specification.
256
+ */
257
+ export class _RIPEMD160 extends HashMD {
258
+ h0 = 0x67452301 | 0;
259
+ h1 = 0xefcdab89 | 0;
260
+ h2 = 0x98badcfe | 0;
261
+ h3 = 0x10325476 | 0;
262
+ h4 = 0xc3d2e1f0 | 0;
263
+ constructor() {
264
+ super(64, 20, 8, true);
265
+ }
266
+ get() {
267
+ const { h0, h1, h2, h3, h4 } = this;
268
+ return [h0, h1, h2, h3, h4];
269
+ }
270
+ set(h0, h1, h2, h3, h4) {
271
+ this.h0 = h0 | 0;
272
+ this.h1 = h1 | 0;
273
+ this.h2 = h2 | 0;
274
+ this.h3 = h3 | 0;
275
+ this.h4 = h4 | 0;
276
+ }
277
+ process(view, offset) {
278
+ for (let i = 0; i < 16; i++, offset += 4)
279
+ BUF_160[i] = view.getUint32(offset, true);
280
+ // prettier-ignore
281
+ let al = this.h0 | 0, ar = al, bl = this.h1 | 0, br = bl, cl = this.h2 | 0, cr = cl, dl = this.h3 | 0, dr = dl, el = this.h4 | 0, er = el;
282
+ // Instead of iterating 0 to 80, we split it into 5 groups
283
+ // And use the groups in constants, functions, etc. Much simpler
284
+ for (let group = 0; group < 5; group++) {
285
+ const rGroup = 4 - group;
286
+ const hbl = Kl160[group], hbr = Kr160[group]; // prettier-ignore
287
+ const rl = idxL[group], rr = idxR[group]; // prettier-ignore
288
+ const sl = shiftsL160[group], sr = shiftsR160[group]; // prettier-ignore
289
+ for (let i = 0; i < 16; i++) {
290
+ const tl = (rotl(al + ripemd_f(group, bl, cl, dl) + BUF_160[rl[i]] + hbl, sl[i]) + el) | 0;
291
+ al = el, el = dl, dl = rotl(cl, 10) | 0, cl = bl, bl = tl; // prettier-ignore
292
+ }
293
+ // 2 loops are 10% faster
294
+ for (let i = 0; i < 16; i++) {
295
+ const tr = (rotl(ar + ripemd_f(rGroup, br, cr, dr) + BUF_160[rr[i]] + hbr, sr[i]) + er) | 0;
296
+ ar = er, er = dr, dr = rotl(cr, 10) | 0, cr = br, br = tr; // prettier-ignore
297
+ }
298
+ }
299
+ // Add the compressed chunk to the current hash value
300
+ // Final recombination cross-adds the left/right lane accumulators into the next h0..h4 order.
301
+ this.set((this.h1 + cl + dr) | 0, (this.h2 + dl + er) | 0, (this.h3 + el + ar) | 0, (this.h4 + al + br) | 0, (this.h0 + bl + cr) | 0);
302
+ }
303
+ roundClean() {
304
+ clean(BUF_160);
305
+ }
306
+ destroy() {
307
+ this.destroyed = true;
308
+ clean(this.buffer);
309
+ this.set(0, 0, 0, 0, 0);
310
+ }
311
+ }
312
+ /**
313
+ * RIPEMD-160 - a legacy hash function from 1990s.
314
+ * RFC 2286 only covers HMAC-RIPEMD160 test material; the links below point
315
+ * at the base RIPEMD-160 references.
316
+ * * {@link https://homes.esat.kuleuven.be/~bosselae/ripemd160.html}
317
+ * * {@link https://homes.esat.kuleuven.be/~bosselae/ripemd160/pdf/AB-9601/AB-9601.pdf}
318
+ * @param msg - message bytes to hash
319
+ * @returns Digest bytes.
320
+ * @example
321
+ * Hash a message with RIPEMD-160.
322
+ * ```ts
323
+ * ripemd160(new Uint8Array([97, 98, 99]));
324
+ * ```
325
+ */
326
+ export const ripemd160 = /* @__PURE__ */ createHasher(() => new _RIPEMD160());
327
+ //# sourceMappingURL=legacy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legacy.js","sourceRoot":"","sources":["src/legacy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAc,KAAK,EAAE,YAAY,EAAE,IAAI,EAAa,MAAM,YAAY,CAAC;A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AAI,UAAU,EAAE,CAAC,CAAC"}
@@ -0,0 +1,97 @@
1
+ {
2
+ "name": "@noble/hashes",
3
+ "version": "2.2.0",
4
+ "description": "Audited & minimal 0-dependency JS implementation of SHA, RIPEMD, BLAKE, HMAC, HKDF, PBKDF & Scrypt",
5
+ "files": [
6
+ "*.js",
7
+ "*.js.map",
8
+ "*.d.ts",
9
+ "*.d.ts.map",
10
+ "src"
11
+ ],
12
+ "devDependencies": {
13
+ "@paulmillr/jsbt": "0.5.0",
14
+ "@types/node": "25.3.0",
15
+ "fast-check": "4.2.0",
16
+ "prettier": "3.6.2",
17
+ "typescript": "6.0.2"
18
+ },
19
+ "scripts": {
20
+ "bench": "node test/benchmark/noble.ts",
21
+ "bench:compare": "MBENCH_DIMS='algorithm,buffer,library' node test/benchmark/hashes.ts",
22
+ "bench:compare-scrypt": "MBENCH_DIMS='iters,library' MBENCH_FILTER='async' node test/benchmark/scrypt.ts",
23
+ "bench:install": "cd test/benchmark; npm install",
24
+ "build": "tsc",
25
+ "build:release": "npx --no @paulmillr/jsbt esbuild test/build",
26
+ "check": "npm run check:readme && npm run check:treeshake && npm run check:jsdoc",
27
+ "check:readme": "npx --no @paulmillr/jsbt readme package.json",
28
+ "check:treeshake": "npx --no @paulmillr/jsbt treeshake package.json test/build/out-treeshake",
29
+ "check:jsdoc": "npx --no @paulmillr/jsbt tsdoc package.json",
30
+ "build:clean": "rm *.{js,js.map,d.ts,d.ts.map} 2> /dev/null",
31
+ "format": "prettier --write 'src/**/*.{js,ts}' 'test/**/*.{js,ts}'",
32
+ "test": "node test/index.ts",
33
+ "test:bun": "bun test/index.ts",
34
+ "test:deno": "deno --allow-env --allow-read test/index.ts",
35
+ "test:node20": "cd test; npx tsc; node compiled/test/index.js",
36
+ "test:dos": "node test/slow-dos.test.ts",
37
+ "test:slow": "node test/slow-big.test.ts",
38
+ "test:acvp": "node test/slow-acvp.test.ts",
39
+ "test:kdf": "node test/slow-kdf.test.ts"
40
+ },
41
+ "exports": {
42
+ ".": "./index.js",
43
+ "./_md.js": "./_md.js",
44
+ "./argon2.js": "./argon2.js",
45
+ "./blake1.js": "./blake1.js",
46
+ "./blake2.js": "./blake2.js",
47
+ "./blake3.js": "./blake3.js",
48
+ "./eskdf.js": "./eskdf.js",
49
+ "./hkdf.js": "./hkdf.js",
50
+ "./hmac.js": "./hmac.js",
51
+ "./legacy.js": "./legacy.js",
52
+ "./pbkdf2.js": "./pbkdf2.js",
53
+ "./scrypt.js": "./scrypt.js",
54
+ "./sha2.js": "./sha2.js",
55
+ "./sha3-addons.js": "./sha3-addons.js",
56
+ "./sha3.js": "./sha3.js",
57
+ "./webcrypto.js": "./webcrypto.js",
58
+ "./utils.js": "./utils.js"
59
+ },
60
+ "engines": {
61
+ "node": ">= 20.19.0"
62
+ },
63
+ "keywords": [
64
+ "sha1",
65
+ "sha2",
66
+ "sha3",
67
+ "blake",
68
+ "blake2",
69
+ "blake3",
70
+ "hmac",
71
+ "hkdf",
72
+ "pbkdf2",
73
+ "scrypt",
74
+ "sha256",
75
+ "sha512",
76
+ "keccak",
77
+ "ripemd160",
78
+ "kdf",
79
+ "hash",
80
+ "cryptography",
81
+ "security",
82
+ "noble"
83
+ ],
84
+ "homepage": "https://paulmillr.com/noble/",
85
+ "funding": "https://paulmillr.com/funding/",
86
+ "repository": {
87
+ "type": "git",
88
+ "url": "git+https://github.com/paulmillr/noble-hashes.git"
89
+ },
90
+ "type": "module",
91
+ "main": "index.js",
92
+ "module": "index.js",
93
+ "types": "index.d.ts",
94
+ "sideEffects": false,
95
+ "author": "Paul Miller (https://paulmillr.com)",
96
+ "license": "MIT"
97
+ }
@@ -0,0 +1,56 @@
1
+ import { type CHash, type KDFInput, type TArg, type TRet } from './utils.ts';
2
+ /**
3
+ * PBKDF2 options:
4
+ * * c: iterations, should probably be higher than 100_000
5
+ * * dkLen: desired length of derived key in bytes, must be `>= 1` per RFC 8018 §5.2
6
+ * * asyncTick: max time in ms for which async function can block execution
7
+ */
8
+ export type Pbkdf2Opt = {
9
+ /** Iteration count. Higher values increase CPU cost. */
10
+ c: number;
11
+ /** Desired derived key length in bytes, must be `>= 1` per RFC 8018 §5.2. */
12
+ dkLen?: number;
13
+ /** Max scheduler block time in milliseconds for the async variant. */
14
+ asyncTick?: number;
15
+ };
16
+ /**
17
+ * PBKDF2-HMAC: RFC 8018 key derivation function.
18
+ * @param hash - hash function that would be used e.g. sha256
19
+ * @param password - password from which a derived key is generated;
20
+ * JS string inputs are UTF-8 encoded first
21
+ * @param salt - cryptographic salt; JS string inputs are UTF-8 encoded first
22
+ * @param opts - PBKDF2 work factor and output settings. `dkLen`, if provided,
23
+ * must be `>= 1` per RFC 8018 §5.2. See {@link Pbkdf2Opt}.
24
+ * @returns Derived key bytes.
25
+ * @throws If the PBKDF2 iteration count or derived-key settings are invalid. {@link Error}
26
+ * @example
27
+ * PBKDF2-HMAC: RFC 2898 key derivation function.
28
+ * ```ts
29
+ * import { pbkdf2 } from '@noble/hashes/pbkdf2.js';
30
+ * import { sha256 } from '@noble/hashes/sha2.js';
31
+ * const key = pbkdf2(sha256, 'password', 'salt', { dkLen: 32, c: Math.pow(2, 18) });
32
+ * ```
33
+ */
34
+ export declare function pbkdf2(hash: TArg<CHash>, password: TArg<KDFInput>, salt: TArg<KDFInput>, opts: TArg<Pbkdf2Opt>): TRet<Uint8Array>;
35
+ /**
36
+ * PBKDF2-HMAC: RFC 8018 key derivation function. Async version.
37
+ * @param hash - hash function that would be used e.g. sha256
38
+ * @param password - password from which a derived key is generated;
39
+ * JS string inputs are UTF-8 encoded first
40
+ * @param salt - cryptographic salt; JS string inputs are UTF-8 encoded first
41
+ * @param opts - PBKDF2 work factor and output settings. `dkLen`, if provided,
42
+ * must be `>= 1` per RFC 8018 §5.2. `asyncTick` is only a local
43
+ * scheduler-yield knob for this JS wrapper, not part of RFC 8018.
44
+ * See {@link Pbkdf2Opt}.
45
+ * @returns Promise resolving to derived key bytes.
46
+ * @throws If the PBKDF2 iteration count or derived-key settings are invalid. {@link Error}
47
+ * @example
48
+ * PBKDF2-HMAC: RFC 2898 key derivation function.
49
+ * ```ts
50
+ * import { pbkdf2Async } from '@noble/hashes/pbkdf2.js';
51
+ * import { sha256 } from '@noble/hashes/sha2.js';
52
+ * const key = await pbkdf2Async(sha256, 'password', 'salt', { dkLen: 32, c: 500_000 });
53
+ * ```
54
+ */
55
+ export declare function pbkdf2Async(hash: TArg<CHash>, password: TArg<KDFInput>, salt: TArg<KDFInput>, opts: TArg<Pbkdf2Opt>): Promise<TRet<Uint8Array>>;
56
+ //# sourceMappingURL=pbkdf2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pbkdf2.d.ts","sourceRoot":"","sources":["src/pbkdf2.ts"],"names":[],"mappings":"AAMA,OAAO,EAGL,KAAK,KAAK,EAEV,KAAK,QAAQ,EACb,KAAK,IAAI,EACT,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAEpB;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,wDAAwD;IACxD,CAAC,EAAE,MAAM,CAAC;IACV,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AA+CF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,EACxB,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,EACpB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,GACpB,IAAI,CAAC,UAAU,CAAC,CAwBlB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,EACxB,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,EACpB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,GACpB,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAwB3B"}