@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,563 @@
1
+ # noble-hashes
2
+
3
+ Audited & minimal JS implementation of hash functions, MACs and KDFs.
4
+
5
+ - 🔒 [**Audited**](#security) by an independent security firm
6
+ - 🔻 Tree-shakeable: unused code is excluded from your builds
7
+ - 🏎 Fast: hand-optimized for caveats of JS engines
8
+ - 🔍 Reliable: chained / sliding window / DoS / ACVP tests and fuzzing
9
+ - 🔁 No unrolled loops: makes it easier to verify and reduces source code size up to 5x
10
+ - 🦘 Includes SHA, RIPEMD, BLAKE, HMAC, HKDF, PBKDF, Scrypt, Argon2
11
+ - 🥈 Optional, friendly wrapper over native WebCrypto
12
+ - 🪶 22KB (gzipped) for everything, 2.4KB for single-hash build
13
+
14
+ Use [awasm-noble](https://github.com/paulmillr/awasm-noble) if you need an even faster (WASM) alternative.
15
+ Check out [Upgrading](#upgrading) for information about upgrading from previous versions.
16
+ Take a glance at [GitHub Discussions](https://github.com/paulmillr/noble-hashes/discussions) for questions and support.
17
+
18
+ The library's initial development was funded by [Ethereum Foundation](https://ethereum.org/).
19
+
20
+ ### This library belongs to _noble_ cryptography
21
+
22
+ > **noble cryptography** — high-security, easily auditable set of contained cryptographic libraries and tools.
23
+
24
+ - Zero or minimal dependencies
25
+ - Highly readable TypeScript / JS code
26
+ - PGP-signed releases and transparent NPM builds
27
+ - All libraries:
28
+ [ciphers](https://github.com/paulmillr/noble-ciphers),
29
+ [curves](https://github.com/paulmillr/noble-curves),
30
+ [hashes](https://github.com/paulmillr/noble-hashes),
31
+ [post-quantum](https://github.com/paulmillr/noble-post-quantum),
32
+ 5kb [secp256k1](https://github.com/paulmillr/noble-secp256k1) /
33
+ [ed25519](https://github.com/paulmillr/noble-ed25519)
34
+ - [Check out the homepage](https://paulmillr.com/noble/)
35
+ for reading resources, documentation, and apps built with noble
36
+
37
+ ## Usage
38
+
39
+ > `npm install @noble/hashes`
40
+
41
+ > `deno add jsr:@noble/hashes`
42
+
43
+ We support all major platforms and runtimes.
44
+ For React Native, you may need a [polyfill for getRandomValues](https://github.com/LinusU/react-native-get-random-values).
45
+ A standalone file [noble-hashes.js](https://github.com/paulmillr/noble-hashes/releases) is also available.
46
+
47
+ ```js
48
+ // import * from '@noble/hashes'; // Error: use sub-imports, to ensure small app size
49
+ import { sha256 as noble_sha256 } from '@noble/hashes/sha2.js';
50
+ const hash = noble_sha256(Uint8Array.from([0xca, 0xfe, 0x01, 0x23]));
51
+
52
+ // Available modules
53
+ import { sha256, sha384, sha512, sha224, sha512_224, sha512_256 } from '@noble/hashes/sha2.js';
54
+ import {
55
+ sha3_256, sha3_512,
56
+ keccak_256, keccak_512,
57
+ shake128, shake256,
58
+ } from '@noble/hashes/sha3.js';
59
+ import {
60
+ cshake256, turboshake256, kmac256, tuplehash256,
61
+ kt128, kt256, keccakprg,
62
+ } from '@noble/hashes/sha3-addons.js';
63
+ import { blake3 } from '@noble/hashes/blake3.js';
64
+ import { blake2b, blake2s } from '@noble/hashes/blake2.js';
65
+ import { blake256, blake512 } from '@noble/hashes/blake1.js';
66
+ import { sha1, md5, ripemd160 } from '@noble/hashes/legacy.js';
67
+ import { hmac } from '@noble/hashes/hmac.js';
68
+ import { hkdf } from '@noble/hashes/hkdf.js';
69
+ import { pbkdf2, pbkdf2Async } from '@noble/hashes/pbkdf2.js';
70
+ import { scrypt, scryptAsync } from '@noble/hashes/scrypt.js';
71
+ import { argon2d, argon2i, argon2id } from '@noble/hashes/argon2.js';
72
+ import * as webcrypto from '@noble/hashes/webcrypto.js';
73
+ // const { sha256, sha384, sha512, hmac, hkdf, pbkdf2 } = webcrypto;
74
+ import * as utils from '@noble/hashes/utils.js';
75
+ const { bytesToHex, concatBytes, equalBytes, hexToBytes } = utils;
76
+ ```
77
+
78
+ - [sha2: sha256, sha384, sha512](#sha2-sha256-sha384-sha512-and-others)
79
+ - [sha3: FIPS, SHAKE, Keccak](#sha3-fips-shake-keccak)
80
+ - [sha3-addons: cSHAKE, KMAC, KT128, TurboSHAKE](#sha3-addons-cshake-kmac-kt128-turboshake)
81
+ - [blake1, blake2, blake3](#blake1-blake2-blake3)
82
+ - [legacy: sha1, md5, ripemd160](#legacy-sha1-md5-ripemd160)
83
+ - MACs: [hmac](#hmac) | [kmac](#sha3-addons-cshake-kmac-kt128-turboshake) | [blake3 key mode](#blake1-blake2-blake3)
84
+ - KDFs: [hkdf](#hkdf) | [pbkdf2](#pbkdf2) | [scrypt](#scrypt) | [argon2](#argon2)
85
+ - [webcrypto: friendly wrapper](#webcrypto-friendly-wrapper)
86
+ - [utils](#utils)
87
+ - [Security](#security) | [Speed](#speed) | [Contributing & testing](#contributing--testing) | [License](#license)
88
+
89
+ ### Implementations
90
+
91
+ Hash functions:
92
+
93
+ - `sha256()`: receive & return `Uint8Array`
94
+ - `sha256.create().update(a).update(b).digest()`: support partial updates
95
+ - `blake3.create({ context: 'e', dkLen: 32 })`: can have options
96
+ - support little-endian architecture; also experimentally big-endian
97
+ - can hash up to 4GB per chunk, with any amount of chunks
98
+
99
+ #### sha2: sha256, sha384, sha512 and others
100
+
101
+ ```typescript
102
+ import { sha224, sha256, sha384, sha512, sha512_224, sha512_256 } from '@noble/hashes/sha2.js';
103
+ const res = sha256(Uint8Array.from([0xbc])); // basic
104
+ for (let hash of [sha256, sha384, sha512, sha224, sha512_224, sha512_256]) {
105
+ const arr = Uint8Array.from([0x10, 0x20, 0x30]);
106
+ const a = hash(arr);
107
+ const b = hash.create().update(arr).digest();
108
+ }
109
+ ```
110
+
111
+ Check out [RFC 4634](https://datatracker.ietf.org/doc/html/rfc4634) and
112
+ [the paper on truncated SHA512/256](https://eprint.iacr.org/2010/548.pdf).
113
+
114
+ #### sha3: FIPS, SHAKE, Keccak
115
+
116
+ ```typescript
117
+ import {
118
+ sha3_224, sha3_256, sha3_384, sha3_512,
119
+ keccak_224, keccak_256, keccak_384, keccak_512,
120
+ shake128, shake256,
121
+ } from '@noble/hashes/sha3.js';
122
+ for (let hash of [
123
+ sha3_224, sha3_256, sha3_384, sha3_512,
124
+ keccak_224, keccak_256, keccak_384, keccak_512,
125
+ ]) {
126
+ const arr = Uint8Array.from([0x10, 0x20, 0x30]);
127
+ const a = hash(arr);
128
+ const b = hash.create().update(arr).digest();
129
+ }
130
+ const shka = shake128(Uint8Array.from([0x10]), { dkLen: 512 });
131
+ const shkb = shake256(Uint8Array.from([0x30]), { dkLen: 512 });
132
+ ```
133
+
134
+ Check out [FIPS-202](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf),
135
+ [Website](https://keccak.team/keccak.html).
136
+
137
+ Check out [the differences between SHA-3 and Keccak](https://crypto.stackexchange.com/questions/15727/what-are-the-key-differences-between-the-draft-sha-3-standard-and-the-keccak-sub)
138
+
139
+ #### sha3-addons: cSHAKE, KMAC, K12, TurboSHAKE
140
+
141
+ ```typescript
142
+ import {
143
+ cshake128, cshake256, kt128, kt256,
144
+ keccakprg, kmac128, kmac256,
145
+ parallelhash256, tuplehash256,
146
+ turboshake128, turboshake256,
147
+ } from '@noble/hashes/sha3-addons.js';
148
+ const data = Uint8Array.from([0x10, 0x20, 0x30]);
149
+ const personalization = new TextEncoder().encode('def');
150
+ const ec1 = cshake128(data, { personalization });
151
+ const ec2 = cshake256(data, { personalization });
152
+ const et1 = turboshake128(data);
153
+ const et2 = turboshake256(data, { D: 0x05 });
154
+ // tuplehash(['ab', 'c']) !== tuplehash(['a', 'bc']) !== tuplehash([data])
155
+ const et3 = tuplehash256([new TextEncoder().encode('ab'), new TextEncoder().encode('c')]);
156
+ // Not parallel in JS (similar to blake3 / kt128), added for compat
157
+ const ep1 = parallelhash256(data, { blockLen: 8 });
158
+ const kk = Uint8Array.from([0xca]);
159
+ const ek10 = kmac128(kk, data);
160
+ const ek11 = kmac256(kk, data);
161
+ const ek12 = kt128(data); // kangarootwelve 128-bit
162
+ const ek13 = kt256(data); // kangarootwelve 256-bit
163
+ // pseudo-random generator, first argument is capacity. XKCP recommends 254 bits capacity for 128-bit security strength.
164
+ // * with a capacity of 254 bits.
165
+ const p = keccakprg(254);
166
+ p.addEntropy(Uint8Array.from([1, 2, 3]));
167
+ const rand1b = p.randomBytes(32);
168
+ ```
169
+
170
+ - cSHAKE, KMAC, TupleHash, ParallelHash + XOF are available, matching
171
+ [NIST SP 800-185](https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-185.pdf)
172
+ - Reduced-round Keccak KT128 (KangarooTwelve 🦘, K12) and TurboSHAKE are available, matching
173
+ [RFC 9861](https://datatracker.ietf.org/doc/rfc9861/).
174
+ - [KeccakPRG](https://keccak.team/files/CSF-0.1.pdf): pseudo-random generator based on Keccak
175
+
176
+ #### blake1, blake2, blake3
177
+
178
+ ```typescript
179
+ import { blake224, blake256, blake384, blake512 } from '@noble/hashes/blake1.js';
180
+ import { blake2b, blake2s } from '@noble/hashes/blake2.js';
181
+ import { blake3 } from '@noble/hashes/blake3.js';
182
+
183
+ for (let hash of [blake224, blake256, blake384, blake512, blake2b, blake2s, blake3]) {
184
+ const arr = Uint8Array.from([0x10, 0x20, 0x30]);
185
+ const a = hash(arr);
186
+ const b = hash.create().update(arr).digest();
187
+ }
188
+
189
+ // blake2 advanced usage
190
+ const ab = Uint8Array.from([0x01]);
191
+ const txt = new TextEncoder();
192
+ blake2s(ab);
193
+ blake2s(ab, { key: new Uint8Array(32) });
194
+ blake2s(ab, { personalization: txt.encode('pers1234') });
195
+ blake2s(ab, { salt: txt.encode('salt1234') });
196
+ blake2b(ab);
197
+ blake2b(ab, { key: new Uint8Array(64) });
198
+ blake2b(ab, { personalization: txt.encode('pers1234pers1234') });
199
+ blake2b(ab, { salt: txt.encode('salt1234salt1234') });
200
+
201
+ // blake3 advanced usage
202
+ blake3(ab);
203
+ blake3(ab, { dkLen: 256 });
204
+ blake3(ab, { key: new Uint8Array(32) });
205
+ blake3(ab, { context: txt.encode('application-name') });
206
+ ```
207
+
208
+ - Blake1 is legacy hash, one of SHA3 proposals. It is rarely used anywhere. See [pdf](https://www.aumasson.jp/blake/blake.pdf).
209
+ - Blake2 is popular fast hash. blake2b focuses on 64-bit platforms while blake2s is for 8-bit to 32-bit ones. See [RFC 7693](https://datatracker.ietf.org/doc/html/rfc7693), [Website](https://www.blake2.net)
210
+ - Blake3 is faster, reduced-round blake2. See [Website & specs](https://blake3.io)
211
+
212
+ #### legacy: sha1, md5, ripemd160
213
+
214
+ SHA1 (RFC 3174), MD5 (RFC 1321) and RIPEMD160 (RFC 2286) legacy, weak hash functions.
215
+ Don't use them in a new protocol. What "weak" means:
216
+
217
+ - Collisions can be made with 2^18 effort in MD5, 2^60 in SHA1, 2^80 in RIPEMD160.
218
+ - No practical pre-image attacks (only theoretical, 2^123.4)
219
+ - HMAC seems kinda ok: https://datatracker.ietf.org/doc/html/rfc6151
220
+
221
+ ```typescript
222
+ import { md5, ripemd160, sha1 } from '@noble/hashes/legacy.js';
223
+ for (let hash of [md5, ripemd160, sha1]) {
224
+ const arr = Uint8Array.from([0x10, 0x20, 0x30]);
225
+ const a = hash(arr);
226
+ const b = hash.create().update(arr).digest();
227
+ }
228
+ ```
229
+
230
+ #### hmac
231
+
232
+ ```typescript
233
+ import { hmac } from '@noble/hashes/hmac.js';
234
+ import { sha256 } from '@noble/hashes/sha2.js';
235
+ const key = new Uint8Array(32).fill(1);
236
+ const msg = new Uint8Array(32).fill(2);
237
+ const mac1 = hmac(sha256, key, msg);
238
+ const mac2 = hmac.create(sha256, key).update(msg).digest();
239
+ ```
240
+
241
+ Conforms to [RFC 2104](https://datatracker.ietf.org/doc/html/rfc2104).
242
+
243
+ #### hkdf
244
+
245
+ ```typescript
246
+ import { hkdf } from '@noble/hashes/hkdf.js';
247
+ import { randomBytes } from '@noble/hashes/utils.js';
248
+ import { sha256 } from '@noble/hashes/sha2.js';
249
+ const inputKey = randomBytes(32);
250
+ const salt = randomBytes(32);
251
+ const info = new TextEncoder().encode('application-key');
252
+ const hk1 = hkdf(sha256, inputKey, salt, info, 32);
253
+
254
+ // == same as
255
+ import { extract, expand } from '@noble/hashes/hkdf.js';
256
+ const prk = extract(sha256, inputKey, salt);
257
+ const hk2 = expand(sha256, prk, info, 32);
258
+ ```
259
+
260
+ Conforms to [RFC 5869](https://datatracker.ietf.org/doc/html/rfc5869).
261
+
262
+ #### pbkdf2
263
+
264
+ ```typescript
265
+ import { pbkdf2, pbkdf2Async } from '@noble/hashes/pbkdf2.js';
266
+ import { sha256 } from '@noble/hashes/sha2.js';
267
+ const pbkey1 = pbkdf2(sha256, 'password', 'salt', { c: 524288, dkLen: 32 });
268
+ const pbkey2 = await pbkdf2Async(sha256, 'password', 'salt', { c: 524288, dkLen: 32 });
269
+ const pbkey3 = await pbkdf2Async(sha256, Uint8Array.from([1, 2, 3]), Uint8Array.from([4, 5, 6]), {
270
+ c: 524288,
271
+ dkLen: 32,
272
+ });
273
+ ```
274
+
275
+ Conforms to [RFC 2898](https://datatracker.ietf.org/doc/html/rfc2898).
276
+
277
+ #### scrypt
278
+
279
+ ```typescript
280
+ import { scrypt, scryptAsync } from '@noble/hashes/scrypt.js';
281
+ const scr1 = scrypt('password', 'salt', { N: 2 ** 16, r: 8, p: 1, dkLen: 32 });
282
+ const scr2 = await scryptAsync('password', 'salt', { N: 2 ** 16, r: 8, p: 1, dkLen: 32 });
283
+ const scr3 = await scryptAsync(Uint8Array.from([1, 2, 3]), Uint8Array.from([4, 5, 6]), {
284
+ N: 2 ** 17,
285
+ r: 8,
286
+ p: 1,
287
+ dkLen: 32,
288
+ onProgress(percentage) {
289
+ console.log('progress', percentage);
290
+ },
291
+ maxmem: 2 ** 32 + 128 * 8 * 1, // N * r * p * 128 + (128*r*p)
292
+ });
293
+ ```
294
+
295
+ Conforms to [RFC 7914](https://datatracker.ietf.org/doc/html/rfc7914),
296
+ [Website](https://www.tarsnap.com/scrypt.html)
297
+
298
+ - `N, r, p` are work factors. It is common to only adjust N, while keeping `r: 8, p: 1`.
299
+ See [the blog post](https://blog.filippo.io/the-scrypt-parameters/).
300
+ JS doesn't support parallelization, making increasing `p` meaningless.
301
+ - `dkLen` is the length of output bytes e.g. `32` or `64`
302
+ - `onProgress` can be used with async version of the function to report progress to a user.
303
+ - `maxmem` prevents DoS and is limited to `1GB + 1KB` (`2**30 + 2**10`), but can be adjusted using formula: `N * r * p * 128 + (128 * r * p)`
304
+
305
+ Time it takes to derive Scrypt key under different values of N (2\*\*N) on Apple M4 (mobile phones can be 1x-4x slower):
306
+
307
+ | N pow | Time | RAM |
308
+ | ----- | ---- | ----- |
309
+ | 16 | 0.1s | 64MB |
310
+ | 17 | 0.2s | 128MB |
311
+ | 18 | 0.4s | 256MB |
312
+ | 19 | 0.8s | 512MB |
313
+ | 20 | 1.5s | 1GB |
314
+ | 21 | 3.1s | 2GB |
315
+ | 22 | 6.2s | 4GB |
316
+ | 23 | 13s | 8GB |
317
+ | 24 | 27s | 16GB |
318
+
319
+ > [!NOTE]
320
+ > We support N larger than `2**20` where available, however,
321
+ > not all JS engines support >= 2GB ArrayBuffer-s.
322
+ > When using such N, you'll need to manually adjust `maxmem`, using formula above.
323
+ > Other JS implementations don't support large N-s.
324
+
325
+ #### argon2
326
+
327
+ ```ts
328
+ import { argon2d, argon2i, argon2id } from '@noble/hashes/argon2.js';
329
+ const arg1 = argon2id('password', 'saltsalt', { t: 2, m: 65536, p: 1, maxmem: 2 ** 32 - 1 });
330
+ ```
331
+
332
+ Argon2 [RFC 9106](https://datatracker.ietf.org/doc/html/rfc9106) implementation.
333
+
334
+ > [!WARNING]
335
+ > Argon2 can't be fast in JS, because there is no fast Uint64Array.
336
+ > It is suggested to use [Scrypt](#scrypt) instead.
337
+ > Being 5x slower than native code means brute-forcing attackers have bigger advantage.
338
+
339
+ #### webcrypto: friendly wrapper
340
+
341
+ ```js
342
+ import { sha256, sha384, sha512, hmac, hkdf, pbkdf2 } from '@noble/hashes/webcrypto.js';
343
+ import { randomBytes } from '@noble/hashes/utils.js';
344
+ const whash = await sha256(Uint8Array.from([0xca, 0xfe, 0x01, 0x23]));
345
+
346
+ const key = new Uint8Array(32).fill(1);
347
+ const msg = new Uint8Array(32).fill(2);
348
+ const wmac = await hmac(sha256, key, msg);
349
+
350
+ const inputKey = randomBytes(32);
351
+ const salt = randomBytes(32);
352
+ const info = new TextEncoder().encode('application-key');
353
+ const hk1 = await hkdf(sha256, inputKey, salt, info, 32);
354
+
355
+ const pbkey1 = await pbkdf2(sha256, 'password', 'salt', { c: 524288, dkLen: 32 });
356
+ ```
357
+
358
+ Sometimes people want to use built-in `crypto.subtle` instead of pure JS implementation.
359
+ However, it has terrible API.
360
+
361
+ We simplify access to built-ins with API which mirrors noble-hashes.
362
+ The overhead is minimal - just 30+ lines of code, which verify input correctness.
363
+
364
+ > [!NOTE]
365
+ > Webcrypto methods are always async.
366
+
367
+ #### utils
368
+
369
+ ```typescript
370
+ import { bytesToHex as toHex, randomBytes } from '@noble/hashes/utils.js';
371
+ console.log(toHex(randomBytes(32)));
372
+ ```
373
+
374
+ - `bytesToHex` will convert `Uint8Array` to a hex string
375
+ - `randomBytes(bytes)` will produce cryptographically secure random `Uint8Array` of length `bytes`
376
+
377
+ ## Security
378
+
379
+ The library has been audited:
380
+
381
+ - at version 2.2.0, in Apr 2026, by ourselves (self-audited)
382
+ - Scope: everything
383
+ - [Changes since audit](https://github.com/paulmillr/noble-hashes/compare/2.2.0..main)
384
+ - at version 1.0.0, in Jan 2022, independently, by [Cure53](https://cure53.de)
385
+ - PDFs: [website](https://cure53.de/pentest-report_hashing-libs.pdf), [in-repo](./audit/2022-01-05-cure53-audit-nbl2.pdf)
386
+ - Scope: everything, besides `blake3`, `sha3-addons`, `sha1` and `argon2`, which have not been audited
387
+ - The audit has been funded by [Ethereum Foundation](https://ethereum.org/en/) with help of [Nomic Labs](https://nomiclabs.io)
388
+
389
+ It is tested against property-based, cross-library and Wycheproof vectors,
390
+ and is being fuzzed in [the separate repo](https://github.com/paulmillr/fuzzing).
391
+
392
+ If you see anything unusual: investigate and report.
393
+
394
+ ### Constant-timeness
395
+
396
+ We're targetting algorithmic constant time. _JIT-compiler_ and _Garbage Collector_ make "constant time"
397
+ extremely hard to achieve [timing attack](https://en.wikipedia.org/wiki/Timing_attack) resistance
398
+ in a scripting language. Which means _any other JS library can't have
399
+ constant-timeness_. Even statically typed Rust, a language without GC,
400
+ [makes it harder to achieve constant-time](https://www.chosenplaintext.ca/open-source/rust-timing-shield/security)
401
+ for some cases. If your goal is absolute security, don't use any JS lib — including bindings to native ones.
402
+ Use low-level libraries & languages.
403
+
404
+ ### Memory dumping
405
+
406
+ The library shares state buffers between hash
407
+ function calls. The buffers are zeroed-out after each call. However, if an attacker
408
+ can read application memory, you are doomed in any case:
409
+
410
+ - At some point, input will be a string and strings are immutable in JS:
411
+ there is no way to overwrite them with zeros. For example: deriving
412
+ key from `scrypt(password, salt)` where password and salt are strings
413
+ - Input from a file will stay in file buffers
414
+ - Input / output will be re-used multiple times in application which means it could stay in memory
415
+ - `await anything()` will always write all internal variables (including numbers)
416
+ to memory. With async functions / Promises there are no guarantees when the code
417
+ chunk would be executed. Which means attacker can have plenty of time to read data from memory
418
+ - There is no way to guarantee anything about zeroing sensitive data without
419
+ complex tests-suite which will dump process memory and verify that there is
420
+ no sensitive data left. For JS it means testing all browsers (incl. mobile),
421
+ which is complex. And of course it will be useless without using the same
422
+ test-suite in the actual application that consumes the library
423
+
424
+ ### Supply chain security
425
+
426
+ - **Commits** are signed with PGP keys to prevent forgery. Be sure to verify the commit signatures
427
+ - **Releases** are made transparently through token-less GitHub CI and Trusted Publishing. Be sure to verify the [provenance logs](https://docs.npmjs.com/generating-provenance-statements) for authenticity.
428
+ - **Rare releasing** is practiced to minimize the need for re-audits by end-users.
429
+ - **Dependencies** are minimized and strictly pinned to reduce supply-chain risk.
430
+ - We use as few dependencies as possible.
431
+ - Version ranges are locked, and changes are checked with npm-diff.
432
+ - **Dev dependencies** are excluded from end-user installs; they’re only used for development and build steps.
433
+
434
+ For this package, there are 0 dependencies; and a few dev dependencies:
435
+
436
+ - jsbt contains helpers for building, benchmarking & testing secure JS apps. It is developed by the same author
437
+ - prettier, fast-check and typescript are used for code quality / test generation / ts compilation
438
+
439
+ ### Randomness
440
+
441
+ We rely on the built-in
442
+ [`crypto.getRandomValues`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues),
443
+ which is considered a cryptographically secure PRNG.
444
+
445
+ Browsers have had weaknesses in the past - and could again - but implementing a userspace CSPRNG is even worse, as there’s no reliable userspace source of high-quality entropy.
446
+
447
+ ### Quantum computers
448
+
449
+ Cryptographically relevant quantum computer, if built, will allow to
450
+ utilize Grover's algorithm to break hashes in 2^n/2 operations, instead of 2^n.
451
+
452
+ This means SHA256 should be replaced with SHA512, SHA3-256 with SHA3-512, SHAKE128 with SHAKE256 etc.
453
+
454
+ Australian ASD prohibits SHA256 and similar hashes [after 2030](https://www.cyber.gov.au/resources-business-and-government/essential-cyber-security/ism/cyber-security-guidelines/guidelines-cryptography).
455
+
456
+ ## Upgrading
457
+
458
+ Supported node.js versions:
459
+
460
+ - v2: v20.19+ (ESM-only)
461
+ - v1: v14.21+ (ESM & CJS)
462
+
463
+ v2.0 changelog:
464
+
465
+ - The package is now ESM-only. ESM can finally be loaded from common.js on node v20.19+
466
+ - `.js` extension must be used for all modules
467
+ - Old: `@noble/hashes/sha3`
468
+ - New: `@noble/hashes/sha3.js`
469
+ - This simplifies working in browsers natively without transpilers
470
+ - Only allow Uint8Array as hash inputs, prohibit `string`
471
+ - Strict validation checks improve security
472
+ - To replicate previous behavior, use `utils.utf8ToBytes`
473
+ - Rename / remove some modules for consistency. Previously, sha384 resided in sha512, which was weird
474
+ - `sha256`, `sha512` => `sha2.js` (consistent with `sha3.js`)
475
+ - `blake2b`, `blake2s` => `blake2.js` (consistent with `blake3.js`, `blake1.js`)
476
+ - `ripemd160`, `sha1`, `md5` => `legacy.js` (all low-security hashes are there)
477
+ - `_assert` => `utils.js`
478
+ - `crypto` internal module got removed: use built-in WebCrypto instead
479
+ - Improve typescript types & option autocomplete
480
+ - Bump compilation target from es2020 to es2022
481
+
482
+ ## Contributing & testing
483
+
484
+ `test/misc` directory contains implementations of loop unrolling and md5.
485
+
486
+ - `npm install && npm run build && npm test` will build the code and run tests.
487
+ - `npm run lint` / `npm run format` will run linter / fix linter issues.
488
+ - `npm run bench` will run benchmarks
489
+ - `npm run build:release` will build single file
490
+ - There is **additional** 20-min DoS test `npm run test:dos` and 2-hour multicore test `npm run test:slow`.
491
+ See [our approach to testing](./test/README.md)
492
+
493
+ Some hashes are outside of scope of the library:
494
+ - [Pedersen in micro-zk-proofs](https://github.com/paulmillr/micro-zk-proofs/blob/1ed5ce1253583b2e540eef7f3477fb52bf5344ff/src/pedersen.ts)
495
+ - [Poseidon in noble-curves](https://github.com/paulmillr/noble-curves/blob/3d124dd3ecec8b6634cc0b2ba1c183aded5304f9/src/abstract/poseidon.ts)
496
+ - [Poly1305 & GHash in noble-ciphers](https://github.com/paulmillr/noble-ciphers)
497
+
498
+ See [paulmillr.com/noble](https://paulmillr.com/noble/) for useful resources, articles, documentation and demos related to the library.
499
+
500
+ ## Speed
501
+
502
+ ```sh
503
+ npm run bench
504
+ ```
505
+
506
+ Benchmarks measured on Apple M4. If you need truly exemplar performance, switch to [awasm-noble](https://github.com/paulmillr/awasm-noble).
507
+
508
+ ```
509
+ # 32B
510
+ sha256 x 2,016,129 ops/sec @ 496ns/op
511
+ sha512 x 740,740 ops/sec @ 1μs/op
512
+ sha3_256 x 287,686 ops/sec @ 3μs/op
513
+ sha3_512 x 288,267 ops/sec @ 3μs/op
514
+ k12 x 476,190 ops/sec @ 2μs/op
515
+ blake2b x 410,340 ops/sec @ 2μs/op
516
+ blake2s x 942,507 ops/sec @ 1μs/op
517
+ blake3 x 1,006,036 ops/sec @ 994ns/op
518
+ ripemd160 x 1,410,437 ops/sec @ 709ns/op
519
+ md5 x 1,663,893 ops/sec @ 601ns/op
520
+ sha1 x 1,589,825 ops/sec @ 629ns/op
521
+
522
+ # 1MB
523
+ sha256 x 331 ops/sec @ 3ms/op
524
+ sha512 x 128 ops/sec @ 7ms/op
525
+ sha3_256 x 39 ops/sec @ 25ms/op
526
+ sha3_512 x 21 ops/sec @ 46ms/op
527
+ kt128 x 91 ops/sec @ 10ms/op
528
+ kt256 x 75 ops/sec @ 13ms/op
529
+ turboshake128 x 93 ops/sec @ 10ms/op
530
+ blake256 x 57 ops/sec @ 17ms/op
531
+ blake2b x 61 ops/sec @ 16ms/op
532
+ blake2s x 78 ops/sec @ 12ms/op
533
+ blake3 x 95 ops/sec @ 10ms/op
534
+ ripemd160 x 177 ops/sec @ 5ms/op
535
+ md5 x 250 ops/sec @ 3ms/op
536
+ sha1 x 416 ops/sec @ 2ms/op
537
+
538
+ # MAC
539
+ hmac(sha256) x 599,880 ops/sec @ 1μs/op
540
+ hmac(sha512) x 197,122 ops/sec @ 5μs/op
541
+ kmac256 x 87,981 ops/sec @ 11μs/op
542
+ blake3(key) x 796,812 ops/sec @ 1μs/op
543
+
544
+ # KDF
545
+ hkdf(sha256) x 259,942 ops/sec @ 3μs/op
546
+ blake3(context) x 424,808 ops/sec @ 2μs/op
547
+ pbkdf2(sha256, c: 2 ** 18) x 5 ops/sec @ 197ms/op
548
+ pbkdf2(sha512, c: 2 ** 18) x 1 ops/sec @ 630ms/op
549
+ scrypt(n: 2 ** 18, r: 8, p: 1) x 2 ops/sec @ 400ms/op
550
+ argon2id(t: 1, m: 256MB) 2881ms
551
+ ```
552
+
553
+ The library could be 3x faster by utilizing loop unrolling. It isn't used because
554
+ unrolling a) would increase bundle size b) make lib un-readable c) current perf is "fast enough"
555
+ for most use-cases.
556
+
557
+ ## License
558
+
559
+ The MIT License (MIT)
560
+
561
+ Copyright (c) 2022 Paul Miller [(https://paulmillr.com)](https://paulmillr.com)
562
+
563
+ See LICENSE file.
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Internal helpers for blake hash.
3
+ * @module
4
+ */
5
+ import { type TRet } from './utils.ts';
6
+ /**
7
+ * Internal blake permutation table.
8
+ * Rows `0..9` serve BLAKE2s, rows `0..11` serve BLAKE2b with `10..11 = 0..1`, and Blake1 also
9
+ * reuses the later rows shown below. Blake1 expands rounds `10..15` as `SIGMA[i % 10]`, so rows
10
+ * `10..15` intentionally repeat rows `0..5` for the 14-round (256) and 16-round (512) variants.
11
+ */
12
+ export declare const BSIGMA: TRet<Uint8Array>;
13
+ export type Num4 = {
14
+ a: number;
15
+ b: number;
16
+ c: number;
17
+ d: number;
18
+ };
19
+ export declare function G1s(a: number, b: number, c: number, d: number, x: number): Num4;
20
+ export declare function G2s(a: number, b: number, c: number, d: number, x: number): Num4;
21
+ //# sourceMappingURL=_blake.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_blake.d.ts","sourceRoot":"","sources":["src/_blake.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAQ,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;GAKG;AAEH,eAAO,MAAM,MAAM,EAAE,IAAI,CAAC,UAAU,CAkBlC,CAAC;AAGH,MAAM,MAAM,IAAI,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;CAAE,CAAC;AAKnE,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAM/E;AAKD,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAM/E"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Internal helpers for blake hash.
3
+ * @module
4
+ */
5
+ import { rotr } from "./utils.js";
6
+ /**
7
+ * Internal blake permutation table.
8
+ * Rows `0..9` serve BLAKE2s, rows `0..11` serve BLAKE2b with `10..11 = 0..1`, and Blake1 also
9
+ * reuses the later rows shown below. Blake1 expands rounds `10..15` as `SIGMA[i % 10]`, so rows
10
+ * `10..15` intentionally repeat rows `0..5` for the 14-round (256) and 16-round (512) variants.
11
+ */
12
+ // prettier-ignore
13
+ export const BSIGMA = /* @__PURE__ */ Uint8Array.from([
14
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
15
+ 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3,
16
+ 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4,
17
+ 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8,
18
+ 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13,
19
+ 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9,
20
+ 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11,
21
+ 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10,
22
+ 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5,
23
+ 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0,
24
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
25
+ 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3,
26
+ // Blake1, unused in others
27
+ 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4,
28
+ 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8,
29
+ 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13,
30
+ 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9,
31
+ ]);
32
+ // 32-bit / BLAKE2s first half of G, with the fixed `(16, 12)` rotation pair.
33
+ // Parameter `x` is the RFC 7693 first-half message word, or Blake1's pre-mixed
34
+ // `m[sigma[r][2i]] ^ u[sigma[r][2i+1]]` addend in the 32-bit path.
35
+ export function G1s(a, b, c, d, x) {
36
+ a = (a + b + x) | 0;
37
+ d = rotr(d ^ a, 16);
38
+ c = (c + d) | 0;
39
+ b = rotr(b ^ c, 12);
40
+ return { a, b, c, d };
41
+ }
42
+ // 32-bit / BLAKE2s second half of G.
43
+ // Parameter `x` is the RFC 7693 second-half (`y`) message word, or Blake1's pre-mixed
44
+ // `m[sigma[r][2i + 1]] ^ u[sigma[r][2i]]` addend in the 32-bit path.
45
+ export function G2s(a, b, c, d, x) {
46
+ a = (a + b + x) | 0;
47
+ d = rotr(d ^ a, 8);
48
+ c = (c + d) | 0;
49
+ b = rotr(b ^ c, 7);
50
+ return { a, b, c, d };
51
+ }
52
+ //# sourceMappingURL=_blake.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_blake.js","sourceRoot":"","sources":["src/_blake.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,IAAI,EAAa,MAAM,YAAY,CAAC;AAE7C;;;;;GAKG;AACH,kBAAkB;AAClB,MAAM,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