Leon4gr45 commited on
Commit
9ae09a4
·
verified ·
1 Parent(s): f64cc11

Upload folder using huggingface_hub (part 23)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +4 -0
  2. node_modules/@nestjs/swagger/package.json +126 -0
  3. node_modules/@nestjs/swagger/plugin.js +10 -0
  4. node_modules/@nestjs/swagger/tsconfig.build.json +22 -0
  5. node_modules/@nestjs/swagger/vitest.config.mts +10 -0
  6. node_modules/@nestjs/swagger/vitest.e2e.config.mts +10 -0
  7. node_modules/@nestjs/testing/LICENSE +22 -0
  8. node_modules/@nestjs/testing/Readme.md +150 -0
  9. node_modules/@nestjs/testing/index.d.ts +4 -0
  10. node_modules/@nestjs/testing/index.js +13 -0
  11. node_modules/@nestjs/testing/interfaces/index.d.ts +3 -0
  12. node_modules/@nestjs/testing/interfaces/index.js +6 -0
  13. node_modules/@nestjs/testing/interfaces/mock-factory.d.ts +2 -0
  14. node_modules/@nestjs/testing/interfaces/mock-factory.js +2 -0
  15. node_modules/@nestjs/testing/interfaces/override-by-factory-options.interface.d.ts +7 -0
  16. node_modules/@nestjs/testing/interfaces/override-by-factory-options.interface.js +2 -0
  17. node_modules/@nestjs/testing/interfaces/override-by.interface.d.ts +10 -0
  18. node_modules/@nestjs/testing/interfaces/override-by.interface.js +2 -0
  19. node_modules/@nestjs/testing/interfaces/override-module.interface.d.ts +8 -0
  20. node_modules/@nestjs/testing/interfaces/override-module.interface.js +2 -0
  21. node_modules/@nestjs/testing/package.json +38 -0
  22. node_modules/@nestjs/testing/services/testing-logger.service.d.ts +12 -0
  23. node_modules/@nestjs/testing/services/testing-logger.service.js +20 -0
  24. node_modules/@nestjs/testing/test.d.ts +6 -0
  25. node_modules/@nestjs/testing/test.js +12 -0
  26. node_modules/@nestjs/testing/testing-injector.d.ts +23 -0
  27. node_modules/@nestjs/testing/testing-injector.js +64 -0
  28. node_modules/@nestjs/testing/testing-instance-loader.d.ts +7 -0
  29. node_modules/@nestjs/testing/testing-instance-loader.js +12 -0
  30. node_modules/@nestjs/testing/testing-module.builder.d.ts +42 -0
  31. node_modules/@nestjs/testing/testing-module.builder.js +131 -0
  32. node_modules/@nestjs/testing/testing-module.d.ts +22 -0
  33. node_modules/@nestjs/testing/testing-module.js +56 -0
  34. node_modules/@nestjs/testing/tsconfig.build.json +32 -0
  35. node_modules/@noble/hashes/LICENSE +21 -0
  36. node_modules/@noble/hashes/README.md +521 -0
  37. node_modules/@noble/hashes/_assert.d.ts +17 -0
  38. node_modules/@noble/hashes/_assert.d.ts.map +1 -0
  39. node_modules/@noble/hashes/_assert.js +18 -0
  40. node_modules/@noble/hashes/_assert.js.map +1 -0
  41. node_modules/@noble/hashes/_blake.d.ts +14 -0
  42. node_modules/@noble/hashes/_blake.d.ts.map +1 -0
  43. node_modules/@noble/hashes/_blake.js +50 -0
  44. node_modules/@noble/hashes/_blake.js.map +1 -0
  45. node_modules/@noble/hashes/_md.d.ts +51 -0
  46. node_modules/@noble/hashes/_md.d.ts.map +1 -0
  47. node_modules/@noble/hashes/_md.js +162 -0
  48. node_modules/@noble/hashes/_md.js.map +1 -0
  49. node_modules/@noble/hashes/_u64.d.ts +55 -0
  50. node_modules/@noble/hashes/_u64.d.ts.map +1 -0
.gitattributes CHANGED
@@ -37,3 +37,7 @@ node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-128-white/open-sa
37
  node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-128-black/open-sans-128-black.png filter=lfs diff=lfs merge=lfs -text
38
  node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-128-white/open-sans-128-white.png filter=lfs diff=lfs merge=lfs -text
39
  node_modules/@jimp/plugin-threshold/src/__image_snapshots__/index-test-ts-src-index-test-ts-threshold-defines-default-threshold-for-lighter-backgrounds-1-snap.png filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
37
  node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-128-black/open-sans-128-black.png filter=lfs diff=lfs merge=lfs -text
38
  node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-128-white/open-sans-128-white.png filter=lfs diff=lfs merge=lfs -text
39
  node_modules/@jimp/plugin-threshold/src/__image_snapshots__/index-test-ts-src-index-test-ts-threshold-defines-default-threshold-for-lighter-backgrounds-1-snap.png filter=lfs diff=lfs merge=lfs -text
40
+ node_modules/@rolldown/binding-linux-x64-gnu/rolldown-binding.linux-x64-gnu.node filter=lfs diff=lfs merge=lfs -text
41
+ node_modules/@rolldown/binding-linux-x64-musl/rolldown-binding.linux-x64-musl.node filter=lfs diff=lfs merge=lfs -text
42
+ node_modules/@rollup/rollup-linux-x64-gnu/rollup.linux-x64-gnu.node filter=lfs diff=lfs merge=lfs -text
43
+ node_modules/@rollup/rollup-linux-x64-musl/rollup.linux-x64-musl.node filter=lfs diff=lfs merge=lfs -text
node_modules/@nestjs/swagger/package.json ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "@nestjs/swagger",
3
+ "version": "11.4.5",
4
+ "description": "Nest - modern, fast, powerful node.js web framework (@swagger)",
5
+ "author": "Kamil Mysliwiec",
6
+ "license": "MIT",
7
+ "repository": "https://github.com/nestjs/swagger",
8
+ "main": "dist/index.js",
9
+ "types": "dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js",
14
+ "require": "./dist/index.js",
15
+ "default": "./dist/index.js"
16
+ },
17
+ "./plugin": {
18
+ "types": "./dist/plugin/index.d.ts",
19
+ "import": "./dist/plugin/index.js",
20
+ "require": "./dist/plugin/index.js",
21
+ "default": "./dist/plugin/index.js"
22
+ },
23
+ "./package.json": "./package.json"
24
+ },
25
+ "scripts": {
26
+ "build": "tsc -p tsconfig.build.json",
27
+ "format": "prettier \"lib/**/*.ts\" --write",
28
+ "lint": "oxlint lib/",
29
+ "prepublish:next": "npm run build",
30
+ "publish:next": "npm publish --access public --tag next",
31
+ "prepublish:npm": "npm run build",
32
+ "publish:npm": "npm publish --access public",
33
+ "prepare": "npm run build",
34
+ "test": "vitest run",
35
+ "test:dev": "vitest",
36
+ "test:e2e": "vitest run --config vitest.e2e.config.mts",
37
+ "prerelease": "npm run build",
38
+ "release": "release-it",
39
+ "---manual-tests---": "",
40
+ "start": "nest start",
41
+ "start:dev": "nest start --watch",
42
+ "start:debug": "nest start --watch --debug"
43
+ },
44
+ "dependencies": {
45
+ "@microsoft/tsdoc": "0.16.0",
46
+ "@nestjs/mapped-types": "2.1.1",
47
+ "js-yaml": "4.3.0",
48
+ "lodash": "4.18.1",
49
+ "path-to-regexp": "8.4.2",
50
+ "swagger-ui-dist": "5.32.8"
51
+ },
52
+ "devDependencies": {
53
+ "@commitlint/cli": "21.1.0",
54
+ "@commitlint/config-angular": "21.1.0",
55
+ "@fastify/compress": "^9.0.0",
56
+ "@fastify/static": "9.1.3",
57
+ "@nestjs/common": "11.1.27",
58
+ "@nestjs/core": "11.1.27",
59
+ "@nestjs/platform-express": "11.1.27",
60
+ "@nestjs/platform-fastify": "11.1.27",
61
+ "@types/js-yaml": "4.0.9",
62
+ "@types/lodash": "4.17.24",
63
+ "@types/node": "24.13.2",
64
+ "class-transformer": "0.5.1",
65
+ "class-validator": "0.15.1",
66
+ "express": "5.2.1",
67
+ "fastify": "5.9.0",
68
+ "husky": "9.1.7",
69
+ "lerna-changelog": "2.2.0",
70
+ "lint-staged": "17.0.8",
71
+ "openapi-types": "12.1.3",
72
+ "oxlint": "^1.59.0",
73
+ "prettier": "3.9.4",
74
+ "prettier-v2": "npm:prettier@2.8.8",
75
+ "reflect-metadata": "0.2.2",
76
+ "release-it": "20.2.1",
77
+ "rxjs": "7.8.2",
78
+ "supertest": "7.2.2",
79
+ "swagger-parser": "10.0.3",
80
+ "typescript": "6.0.3",
81
+ "vite": "^8.0.8",
82
+ "vitest": "4.1.9"
83
+ },
84
+ "peerDependencies": {
85
+ "@fastify/static": "^8.0.0 || ^9.0.0",
86
+ "@nestjs/common": "^11.0.1",
87
+ "@nestjs/core": "^11.0.1",
88
+ "class-transformer": "*",
89
+ "class-validator": "*",
90
+ "reflect-metadata": "^0.1.12 || ^0.2.0"
91
+ },
92
+ "peerDependenciesMeta": {
93
+ "@fastify/static": {
94
+ "optional": true
95
+ },
96
+ "class-transformer": {
97
+ "optional": true
98
+ },
99
+ "class-validator": {
100
+ "optional": true
101
+ }
102
+ },
103
+ "lint-staged": {
104
+ "*.ts": [
105
+ "prettier --write",
106
+ "git add -f"
107
+ ]
108
+ },
109
+ "husky": {
110
+ "hooks": {
111
+ "pre-commit": "lint-staged",
112
+ "commit-msg": "commitlint -c .commitlintrc.json -E HUSKY_GIT_PARAMS"
113
+ }
114
+ },
115
+ "changelog": {
116
+ "labels": {
117
+ "feature": "Features",
118
+ "bug": "Bug fixes",
119
+ "enhancement": "Enhancements",
120
+ "docs": "Docs",
121
+ "dependencies": "Dependencies",
122
+ "type: code style": "Code style tweaks",
123
+ "breaking change": "Breaking changes"
124
+ }
125
+ }
126
+ }
node_modules/@nestjs/swagger/plugin.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+ function __export(m) {
3
+ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4
+ }
5
+ exports.__esModule = true;
6
+ const plugin = require('./dist/plugin');
7
+ __export(plugin);
8
+
9
+ /** Compatibility with ts-patch/ttypescript */
10
+ exports.default = (program, options) => plugin.before(options, program);
node_modules/@nestjs/swagger/tsconfig.build.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "module": "commonjs",
5
+ "declaration": true,
6
+ "noImplicitAny": false,
7
+ "removeComments": true,
8
+ "noLib": false,
9
+ "emitDecoratorMetadata": true,
10
+ "experimentalDecorators": true,
11
+ "target": "es6",
12
+ "sourceMap": false,
13
+ "outDir": "./dist",
14
+ "rootDir": "./lib",
15
+ "skipLibCheck": true,
16
+ "strictNullChecks": false
17
+ },
18
+ "include": [
19
+ "lib/**/*"
20
+ ],
21
+ "exclude": ["node_modules", "test", "dist", "**/*spec.ts", "e2e"]
22
+ }
node_modules/@nestjs/swagger/vitest.config.mts ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import { defineConfig } from 'vitest/config';
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ globals: true,
6
+ root: './test',
7
+ environment: 'node',
8
+ include: ['**/*.spec.ts'],
9
+ },
10
+ });
node_modules/@nestjs/swagger/vitest.e2e.config.mts ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import { defineConfig } from 'vitest/config';
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ globals: true,
6
+ root: './e2e',
7
+ environment: 'node',
8
+ include: ['**/*.e2e-spec.ts'],
9
+ },
10
+ });
node_modules/@nestjs/testing/LICENSE ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (The MIT License)
2
+
3
+ Copyright (c) 2017-present Kamil Mysliwiec <https://kamilmysliwiec.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ 'Software'), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
node_modules/@nestjs/testing/Readme.md ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <p align="center">
2
+ <a href="https://nestjs.com/" target="_blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
3
+ </p>
4
+
5
+ [circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
6
+ [circleci-url]: https://circleci.com/gh/nestjs/nest
7
+
8
+ <p align="center">A progressive <a href="https://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
9
+ <p align="center">
10
+ <a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
11
+ <a href="https://github.com/nestjs/nest/blob/master/LICENSE" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
12
+ <a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
13
+ <a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
14
+ <a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
15
+ <a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
16
+ <a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
17
+ <a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
18
+ <a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
19
+ <a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
20
+ </p>
21
+ <!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
22
+ [![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
23
+
24
+ ## Description
25
+
26
+ Nest is a framework for building efficient, scalable <a href="https://nodejs.org" target="_blank">Node.js</a> server-side applications. It uses modern JavaScript, is built with <a href="https://www.typescriptlang.org" target="_blank">TypeScript</a> (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).
27
+
28
+ <p>Under the hood, Nest makes use of <a href="https://expressjs.com/" target="_blank">Express</a>, but also provides compatibility with a wide range of other libraries, like <a href="https://github.com/fastify/fastify" target="_blank">Fastify</a>, allowing for easy use of the myriad of third-party plugins which are available.</p>
29
+
30
+ ## Philosophy
31
+
32
+ <p>In recent years, thanks to Node.js, JavaScript has become the “lingua franca” of the web for both front-end and back-end applications, giving rise to awesome projects like <a href="https://angular.dev/" target="_blank">Angular</a>, <a href="https://react.dev/" target="_blank">React</a>, and <a href="https://vuejs.org/" target="_blank">Vue</a>, which improve developer productivity and enable the construction of fast, testable, and extensible frontend applications. However, on the server-side, while there are a lot of superb libraries, helpers, and tools for Node, none of them effectively solve the main problem - the architecture.</p>
33
+ <p>Nest aims to provide an application architecture out of the box which allows for effortless creation of highly testable, scalable, and loosely coupled and easily maintainable applications. The architecture is heavily inspired by Angular.</p>
34
+
35
+ ## Getting started
36
+
37
+ - To check out the [guide](https://docs.nestjs.com), visit [docs.nestjs.com](https://docs.nestjs.com). :books:
38
+ - 要查看中文 [指南](readme_zh.md), 请访问 [docs.nestjs.cn](https://docs.nestjs.cn). :books:
39
+ - [가이드](readme_kr.md) 문서는 [docs.nestjs.com](https://docs.nestjs.com)에서 확인하실 수 있습니다. :books:
40
+ - [ガイド](readme_jp.md)は [docs.nestjs.com](https://docs.nestjs.com)でご確認ください。 :books:
41
+
42
+ ## Questions
43
+
44
+ For questions and support please use the official [Discord channel](https://discord.gg/G7Qnnhy). The issue list of this repo is **exclusively** for bug reports and feature requests.
45
+
46
+ ## Issues
47
+
48
+ Please make sure to read the [Issue Reporting Checklist](https://github.com/nestjs/nest/blob/master/CONTRIBUTING.md#-submitting-an-issue) before opening an issue. Issues not conforming to the guidelines may be closed immediately.
49
+
50
+ ## Consulting
51
+
52
+ With official support, you can get expert help straight from the Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://enterprise.nestjs.com).
53
+
54
+ ## Support
55
+
56
+ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support from the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
57
+
58
+ #### Principal Sponsors
59
+
60
+ <table style="text-align:center;">
61
+ <tr>
62
+ <td><a href="https://trilon.io" target="_blank"><img src="https://nestjs.com/img/trilon.svg" width="200" valign="middle" /></a></td>
63
+ <td><a href="https://microsoft.com/" target="_blank"><img src="https://nestjs.com/img/logos/microsoft-logo.png" width="180" valign="middle" /></a></td>
64
+ <td><a href="https://mojam.co" target="_blank"><img src="https://nestjs.com/img/logos/mojam-logo.png" width="80" valign="middle" /></a></td>
65
+ <td><a href="https://valor-software.com/" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="170" valign="middle" /></a></td>
66
+ <td><a href="https://serpapi.com/" target="_blank"><img src="https://nestjs.com/img/logos/serpapi-logo.png" width="150" valign="middle" /></a></td>
67
+ </tr>
68
+ </table>
69
+
70
+ #### Gold Sponsors
71
+
72
+ <table style="text-align:center;">
73
+ <tr>
74
+ <td><a href="https://www.redhat.com" target="_blank"><img src="https://nestjs.com/img/logos/red-hat-logo.svg" width="200" valign="middle" /></a></td>
75
+ <td><a href="https://github.com/Sanofi-IADC" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/sanofi.png" width="180" valign="middle" /></a></td>
76
+ <td><a href="https://nx.dev" target="_blank"><img src="https://nestjs.com/img/logos/nx-logo.png" height="45" valign="middle" /></a></td>
77
+ <td><a href="https://intrinsic.ventures/" target="_blank"><img src="https://nestjs.com/img/logos/intrinisic-logo.png" width="210" valign="middle" /></a></td>
78
+ <td><a href="https://jetbrains.com/" target="_blank"><img src="https://nestjs.com/img/logos/jetbrains-logo.svg" width="90" valign="middle" /></a></td>
79
+ </tr>
80
+ <tr>
81
+ <td><a href="https://snyk.co/nestjs" target="_blank"><img src="https://nestjs.com/img/logos/snyk-logo-black.png" width="185" valign="middle" /></a></td>
82
+ <td><a href="https://www.movavi.com/imovie-for-windows.html" target="_blank"><img src="https://nestjs.com/img/logos/movavi-logo.svg" width="105" valign="middle" /></a></td>
83
+ </tr>
84
+ </table>
85
+
86
+ #### Silver Sponsors
87
+
88
+ <table style="text-align:center;">
89
+ <tr>
90
+ <td><a href="https://www.mercedes-benz.com/" target="_blank"><img src="https://nestjs.com/img/logos/mercedes-logo.png" width="100" valign="middle" /></a></td>
91
+ <td><a href="https://www.dinii.jp/" target="_blank"><img src="https://nestjs.com/img/logos/dinii-logo.png" width="65" valign="middle" /></a></td>
92
+ <td><a href="https://handsontable.com/docs/react-data-grid/?utm_source=NestJS_GH&utm_medium=sponsorship&utm_campaign=library_sponsorship_2024" target="_blank"><img src="https://nestjs.com/img/logos/handsontable-dark-logo.svg#2" width="150" valign="middle" /></a></td>
93
+ <td align="center" valign="middle"><a href="https://www.itflashcards.com/" target="_blank"><img src="https://nestjs.com/img/logos/it_flashcards-logo.png" width="170" valign="middle" /></a></td>
94
+ <td align="center" valign="middle"><a href="https://arcjet.com/?ref=nestjs" target="_blank"><img src="https://nestjs.com/img/logos/arcjet-logo.svg" width="170" valign="middle" /></a></td>
95
+ <td align="center" valign="middle"><a href="https://crawljobs.com" target="_blank"><img src="https://nestjs.com/img/logos/crawljobs-logo.svg" width="130" valign="middle" /></a></td>
96
+ </tr><tr>
97
+ <td align="center" valign="middle"><a href="https://pandektes.com" target="_blank"><img src="https://nestjs.com/img/logos/pandektes-logo.png" width="65" valign="middle" /></a></td>
98
+ <td align="center" valign="middle"><a href="https://www.fintechcrafts.com/" target="_blank"><img src="https://nestjs.com/img/logos/fintechcrafts-logo.svg" width="65" valign="middle" /></a></td>
99
+ <td align="center" valign="middle"><a href="https://talordata.com/?campaignid=Ya5Xpw2gmhyee6Tg&utm_source=nestjs&utm_term=nestjs" target="_blank"><img src="https://images.opencollective.com/elowen/9ccac7f/avatar/512.png" width="65" valign="middle" /></a></td>
100
+ <td align="center" valign="middle"><a href="https://www.rapidproxy.io/?ref=nestjs" target="_blank"><img src="https://nestjs.com/img/logos/rapid-logo.svg" width="120" valign="middle" /></a></td>
101
+ </tr>
102
+ </table>
103
+
104
+ #### Sponsors
105
+
106
+ <table>
107
+ <tr>
108
+ <td align="center" valign="middle"><a href="https://www.swingdev.io" target="_blank"><img src="https://nestjs.com/img/logos/swingdev-logo.svg#1" width="110" valign="middle" /></a></td>
109
+ <td align="center" valign="middle"><a href="https://www.novologic.com/" target="_blank"><img src="https://nestjs.com/img/logos/novologic.png" width="110" valign="middle" /></a></td>
110
+ <td align="center" valign="middle"><a href="https://mantro.net/" target="_blank"><img src="https://nestjs.com/img/logos/mantro-logo.svg" width="95" valign="middle" /></a></td>
111
+ <td align="center" valign="middle"><a href="https://triplebyte.com/" target="_blank"><img src="https://nestjs.com/img/logos/triplebyte.png" width="107" valign="middle" /></a></td>
112
+ <td align="center" valign="middle"><a href="https://nearpod.com/" target="_blank"><img src="https://nestjs.com/img/logos/nearpod-logo.svg" width="100" valign="middle" /></a></td>
113
+ <td align="center" valign="middle"><a href="https://genuinebee.com/" target="_blank"><img src="https://nestjs.com/img/logos/genuinebee.svg" width="97" valign="middle" /></a></td>
114
+ </tr>
115
+ <tr>
116
+ <td align="center" valign="middle"><a href="https://vpn-review.com/vpn-for-torrenting" target="_blank"><img src="https://nestjs.com/img/logos/vpn-review-logo.png" width="85" valign="middle" /></a></td>
117
+ <td align="center" valign="middle"><a href="https://lambda-it.ch/" target="_blank"><img src="https://nestjs.com/img/logos/lambda-it-logo.svg" width="115" valign="middle" /></a></td>
118
+ <td align="center" valign="middle"><a href="https://rocketech.it/cases/?utm_source=google&utm_medium=badge&utm_campaign=nestjs" target="_blank"><img src="https://nestjs.com/img/logos/rocketech-logo.svg" width="110" valign="middle" /></a></td>
119
+ <td align="center" valign="middle"><a href="https://www.anonymistic.com/" target="_blank"><img src="https://nestjs.com/img/logos/anonymistic-logo.png" width="125" valign="middle" /></a></td>
120
+ <td align="center" valign="middle"><a href="https://www.naologic.com/" target="_blank"><img src="https://nestjs.com/img/logos/naologic-logo.svg" width="125" valign="middle" /></a></td>
121
+ <td align="center" valign="middle"><a href="https://triplecore.io" target="_blank"><img src="https://nestjs.com/img/logos/triplecore-logo.svg" width="50" valign="middle" /></a></td>
122
+ </tr>
123
+ <tr>
124
+ <td align="center" valign="middle"><a href="https://polygon-software.ch/" target="_blank"><img src="https://nestjs.com/img/logos/polygon-logo.svg" width="120" valign="middle" /></a></td>
125
+ <td align="center" valign="middle"><a href="https://boringowl.io/" target="_blank"><img src="https://nestjs.com/img/logos/boringowl-logo.svg" width="120" valign="middle" /></a></td>
126
+ <td align="center" valign="middle"><a href="https://nordbot.app/" target="_blank"><img src="https://nestjs.com/img/logos/nordbot-logo.png" width="120" valign="middle" /></a></td>
127
+ <td align="center" valign="middle"><a href="https://doppio.sh/" target="_blank"><img src="https://nestjs.com/img/logos/dopiosh-logo.png" width="50" valign="middle" /></a></td>
128
+ <td align="center" valign="middle"><a href="https://www.hingehealth.com/" target="_blank"><img src="https://nestjs.com/img/logos/hinge-health-logo.svg" width="100" valign="middle" /></a></td>
129
+ <td align="center" valign="middle"><a href="https://www.tripoffice.com/" target="_blank"><img src="https://nestjs.com/img/logos/tripoffice-logo.png" width="140" valign="middle" /></a></td>
130
+ </tr>
131
+ <tr>
132
+ <td align="center" valign="middle"><a href="https://solcellsforetag.se/" target="_blank"><img src="https://nestjs.com/img/logos/solcellsforetag-logo.svg" width="140" valign="middle" /></a></td>
133
+ <td align="center" valign="middle"><a href="https://www.route4me.com/" target="_blank"><img src="https://nestjs.com/img/logos/route4me-logo.svg" width="100" valign="middle" /></a></td>
134
+ <td align="center" valign="middle"><a href="https://memory2.co/" target="_blank"><img src="https://images.opencollective.com/memory-squared/bbe37f5/avatar/256.png?height=50" width="50" valign="middle" /></a></td>
135
+ </tr>
136
+ </table>
137
+
138
+ ## Backers
139
+
140
+ <a href="https://opencollective.com/nest" target="_blank"><img src="https://opencollective.com/nest/backers.svg?width=1000"></a>
141
+
142
+ ## Stay in touch
143
+
144
+ - Author - [Kamil Myśliwiec](https://x.com/kammysliwiec)
145
+ - Website - [https://nestjs.com](https://nestjs.com/)
146
+ - X - [@nestframework](https://x.com/nestframework)
147
+
148
+ ## License
149
+
150
+ Nest is [MIT licensed](LICENSE).
node_modules/@nestjs/testing/index.d.ts ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ export * from './interfaces';
2
+ export * from './test';
3
+ export * from './testing-module';
4
+ export * from './testing-module.builder';
node_modules/@nestjs/testing/index.js ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ /*
3
+ * Nest @testing
4
+ * Copyright(c) 2017 - 2025 Kamil Mysliwiec
5
+ * https://nestjs.com
6
+ * MIT Licensed
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ const tslib_1 = require("tslib");
10
+ tslib_1.__exportStar(require("./interfaces"), exports);
11
+ tslib_1.__exportStar(require("./test"), exports);
12
+ tslib_1.__exportStar(require("./testing-module"), exports);
13
+ tslib_1.__exportStar(require("./testing-module.builder"), exports);
node_modules/@nestjs/testing/interfaces/index.d.ts ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ export * from './mock-factory';
2
+ export * from './override-by-factory-options.interface';
3
+ export * from './override-by.interface';
node_modules/@nestjs/testing/interfaces/index.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./mock-factory"), exports);
5
+ tslib_1.__exportStar(require("./override-by-factory-options.interface"), exports);
6
+ tslib_1.__exportStar(require("./override-by.interface"), exports);
node_modules/@nestjs/testing/interfaces/mock-factory.d.ts ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ import { InjectionToken } from '@nestjs/common';
2
+ export type MockFactory = (token?: InjectionToken) => any;
node_modules/@nestjs/testing/interfaces/mock-factory.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
node_modules/@nestjs/testing/interfaces/override-by-factory-options.interface.d.ts ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @publicApi
3
+ */
4
+ export interface OverrideByFactoryOptions {
5
+ factory: (...args: any[]) => any;
6
+ inject?: any[];
7
+ }
node_modules/@nestjs/testing/interfaces/override-by-factory-options.interface.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
node_modules/@nestjs/testing/interfaces/override-by.interface.d.ts ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import { TestingModuleBuilder } from '../testing-module.builder';
2
+ import { OverrideByFactoryOptions } from './override-by-factory-options.interface';
3
+ /**
4
+ * @publicApi
5
+ */
6
+ export interface OverrideBy {
7
+ useValue: (value: any) => TestingModuleBuilder;
8
+ useFactory: (options: OverrideByFactoryOptions) => TestingModuleBuilder;
9
+ useClass: (metatype: any) => TestingModuleBuilder;
10
+ }
node_modules/@nestjs/testing/interfaces/override-by.interface.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
node_modules/@nestjs/testing/interfaces/override-module.interface.d.ts ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ import { ModuleDefinition } from '@nestjs/core/interfaces/module-definition.interface';
2
+ import { TestingModuleBuilder } from '../testing-module.builder';
3
+ /**
4
+ * @publicApi
5
+ */
6
+ export interface OverrideModule {
7
+ useModule: (newModule: ModuleDefinition) => TestingModuleBuilder;
8
+ }
node_modules/@nestjs/testing/interfaces/override-module.interface.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
node_modules/@nestjs/testing/package.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "@nestjs/testing",
3
+ "version": "11.1.27",
4
+ "description": "Nest - modern, fast, powerful node.js web framework (@testing)",
5
+ "author": "Kamil Mysliwiec",
6
+ "license": "MIT",
7
+ "homepage": "https://nestjs.com",
8
+ "funding": {
9
+ "type": "opencollective",
10
+ "url": "https://opencollective.com/nest"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/nestjs/nest.git",
15
+ "directory": "packages/testing"
16
+ },
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "dependencies": {
21
+ "tslib": "2.8.1"
22
+ },
23
+ "peerDependencies": {
24
+ "@nestjs/common": "^11.0.0",
25
+ "@nestjs/core": "^11.0.0",
26
+ "@nestjs/microservices": "^11.0.0",
27
+ "@nestjs/platform-express": "^11.0.0"
28
+ },
29
+ "peerDependenciesMeta": {
30
+ "@nestjs/microservices": {
31
+ "optional": true
32
+ },
33
+ "@nestjs/platform-express": {
34
+ "optional": true
35
+ }
36
+ },
37
+ "gitHead": "660a1249e32e7701cdd7e5ccb20b7f695e721bce"
38
+ }
node_modules/@nestjs/testing/services/testing-logger.service.d.ts ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { ConsoleLogger } from '@nestjs/common';
2
+ /**
3
+ * @publicApi
4
+ */
5
+ export declare class TestingLogger extends ConsoleLogger {
6
+ constructor();
7
+ log(message: string): void;
8
+ warn(message: string): void;
9
+ debug(message: string): void;
10
+ verbose(message: string): void;
11
+ error(message: string, ...optionalParams: any[]): void;
12
+ }
node_modules/@nestjs/testing/services/testing-logger.service.js ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TestingLogger = void 0;
4
+ const common_1 = require("@nestjs/common");
5
+ /**
6
+ * @publicApi
7
+ */
8
+ class TestingLogger extends common_1.ConsoleLogger {
9
+ constructor() {
10
+ super('Testing');
11
+ }
12
+ log(message) { }
13
+ warn(message) { }
14
+ debug(message) { }
15
+ verbose(message) { }
16
+ error(message, ...optionalParams) {
17
+ return super.error(message, ...optionalParams);
18
+ }
19
+ }
20
+ exports.TestingLogger = TestingLogger;
node_modules/@nestjs/testing/test.d.ts ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ import { ModuleMetadata } from '@nestjs/common/interfaces/modules/module-metadata.interface';
2
+ import { TestingModuleBuilder, TestingModuleOptions } from './testing-module.builder';
3
+ export declare class Test {
4
+ private static readonly metadataScanner;
5
+ static createTestingModule(metadata: ModuleMetadata, options?: TestingModuleOptions): TestingModuleBuilder;
6
+ }
node_modules/@nestjs/testing/test.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Test = void 0;
4
+ const metadata_scanner_1 = require("@nestjs/core/metadata-scanner");
5
+ const testing_module_builder_1 = require("./testing-module.builder");
6
+ class Test {
7
+ static createTestingModule(metadata, options) {
8
+ return new testing_module_builder_1.TestingModuleBuilder(this.metadataScanner, metadata, options);
9
+ }
10
+ }
11
+ exports.Test = Test;
12
+ Test.metadataScanner = new metadata_scanner_1.MetadataScanner();
node_modules/@nestjs/testing/testing-injector.d.ts ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { NestContainer } from '@nestjs/core';
2
+ import { Injector, InjectorDependencyContext } from '@nestjs/core/injector/injector';
3
+ import { ContextId, InstanceWrapper } from '@nestjs/core/injector/instance-wrapper';
4
+ import { Module } from '@nestjs/core/injector/module';
5
+ import { MockFactory } from './interfaces';
6
+ interface ResolutionContext {
7
+ contextId: ContextId;
8
+ inquirer?: InstanceWrapper;
9
+ effectiveInquirerId?: string;
10
+ }
11
+ /**
12
+ * @publicApi
13
+ */
14
+ export declare class TestingInjector extends Injector {
15
+ protected mocker?: MockFactory;
16
+ protected container: NestContainer;
17
+ setMocker(mocker: MockFactory): void;
18
+ setContainer(container: NestContainer): void;
19
+ resolveComponentWrapper<T>(moduleRef: Module, name: any, dependencyContext: InjectorDependencyContext, wrapper: InstanceWrapper<T>, resolutionContext?: ResolutionContext, keyOrIndex?: string | number): Promise<InstanceWrapper>;
20
+ resolveComponentHost<T>(moduleRef: Module, instanceWrapper: InstanceWrapper<T>, resolutionContext?: ResolutionContext): Promise<InstanceWrapper>;
21
+ private mockWrapper;
22
+ }
23
+ export {};
node_modules/@nestjs/testing/testing-injector.js ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TestingInjector = void 0;
4
+ const constants_1 = require("@nestjs/core/injector/constants");
5
+ const injector_1 = require("@nestjs/core/injector/injector");
6
+ const instance_wrapper_1 = require("@nestjs/core/injector/instance-wrapper");
7
+ /**
8
+ * @publicApi
9
+ */
10
+ class TestingInjector extends injector_1.Injector {
11
+ setMocker(mocker) {
12
+ this.mocker = mocker;
13
+ }
14
+ setContainer(container) {
15
+ this.container = container;
16
+ }
17
+ async resolveComponentWrapper(moduleRef, name, dependencyContext, wrapper, resolutionContext = { contextId: constants_1.STATIC_CONTEXT }, keyOrIndex) {
18
+ try {
19
+ const existingProviderWrapper = await super.resolveComponentWrapper(moduleRef, name, dependencyContext, wrapper, resolutionContext, keyOrIndex);
20
+ return existingProviderWrapper;
21
+ }
22
+ catch (err) {
23
+ return this.mockWrapper(err, moduleRef, name, wrapper);
24
+ }
25
+ }
26
+ async resolveComponentHost(moduleRef, instanceWrapper, resolutionContext = { contextId: constants_1.STATIC_CONTEXT }) {
27
+ try {
28
+ const existingProviderWrapper = await super.resolveComponentHost(moduleRef, instanceWrapper, resolutionContext);
29
+ return existingProviderWrapper;
30
+ }
31
+ catch (err) {
32
+ return this.mockWrapper(err, moduleRef, instanceWrapper.name, instanceWrapper);
33
+ }
34
+ }
35
+ async mockWrapper(err, moduleRef, name, wrapper) {
36
+ if (!this.mocker) {
37
+ throw err;
38
+ }
39
+ const mockedInstance = this.mocker(name);
40
+ if (!mockedInstance) {
41
+ throw err;
42
+ }
43
+ const newWrapper = new instance_wrapper_1.InstanceWrapper({
44
+ name,
45
+ isAlias: false,
46
+ scope: wrapper.scope,
47
+ instance: mockedInstance,
48
+ isResolved: true,
49
+ host: moduleRef,
50
+ metatype: wrapper.metatype,
51
+ });
52
+ const internalCoreModule = this.container.getInternalCoreModuleRef();
53
+ if (!internalCoreModule) {
54
+ throw new Error('Expected to have internal core module reference at this point.');
55
+ }
56
+ internalCoreModule.addCustomProvider({
57
+ provide: name,
58
+ useValue: mockedInstance,
59
+ }, internalCoreModule.providers);
60
+ internalCoreModule.addExportedProviderOrModule(name);
61
+ return newWrapper;
62
+ }
63
+ }
64
+ exports.TestingInjector = TestingInjector;
node_modules/@nestjs/testing/testing-instance-loader.d.ts ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ import { InstanceLoader } from '@nestjs/core/injector/instance-loader';
2
+ import { Module } from '@nestjs/core/injector/module';
3
+ import { MockFactory } from './interfaces';
4
+ import { TestingInjector } from './testing-injector';
5
+ export declare class TestingInstanceLoader extends InstanceLoader<TestingInjector> {
6
+ createInstancesOfDependencies(modules?: Map<string, Module>, mocker?: MockFactory): Promise<void>;
7
+ }
node_modules/@nestjs/testing/testing-instance-loader.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TestingInstanceLoader = void 0;
4
+ const instance_loader_1 = require("@nestjs/core/injector/instance-loader");
5
+ class TestingInstanceLoader extends instance_loader_1.InstanceLoader {
6
+ async createInstancesOfDependencies(modules = this.container.getModules(), mocker) {
7
+ this.injector.setContainer(this.container);
8
+ mocker && this.injector.setMocker(mocker);
9
+ await super.createInstancesOfDependencies();
10
+ }
11
+ }
12
+ exports.TestingInstanceLoader = TestingInstanceLoader;
node_modules/@nestjs/testing/testing-module.builder.d.ts ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { LoggerService, ModuleMetadata } from '@nestjs/common';
2
+ import { NestApplicationContextOptions } from '@nestjs/common/interfaces/nest-application-context-options.interface';
3
+ import { ModuleDefinition } from '@nestjs/core/interfaces/module-definition.interface';
4
+ import { MetadataScanner } from '@nestjs/core/metadata-scanner';
5
+ import { MockFactory, OverrideBy } from './interfaces';
6
+ import { OverrideModule } from './interfaces/override-module.interface';
7
+ import { TestingModule } from './testing-module';
8
+ /**
9
+ * @publicApi
10
+ */
11
+ export type TestingModuleOptions = Pick<NestApplicationContextOptions, 'moduleIdGeneratorAlgorithm'>;
12
+ /**
13
+ * @publicApi
14
+ */
15
+ export declare class TestingModuleBuilder {
16
+ private readonly metadataScanner;
17
+ private readonly applicationConfig;
18
+ private readonly container;
19
+ private readonly overloadsMap;
20
+ private readonly moduleOverloadsMap;
21
+ private readonly module;
22
+ private testingLogger;
23
+ private mocker?;
24
+ constructor(metadataScanner: MetadataScanner, metadata: ModuleMetadata, options?: TestingModuleOptions);
25
+ setLogger(testingLogger: LoggerService): this;
26
+ overridePipe<T = any>(typeOrToken: T): OverrideBy;
27
+ useMocker(mocker: MockFactory): TestingModuleBuilder;
28
+ overrideFilter<T = any>(typeOrToken: T): OverrideBy;
29
+ overrideGuard<T = any>(typeOrToken: T): OverrideBy;
30
+ overrideInterceptor<T = any>(typeOrToken: T): OverrideBy;
31
+ overrideProvider<T = any>(typeOrToken: T): OverrideBy;
32
+ overrideModule(moduleToOverride: ModuleDefinition): OverrideModule;
33
+ compile(options?: Pick<NestApplicationContextOptions, 'snapshot' | 'preview'>): Promise<TestingModule>;
34
+ private override;
35
+ private createOverrideByBuilder;
36
+ private applyOverloadsMap;
37
+ private getModuleOverloads;
38
+ private getRootModule;
39
+ private createInstancesOfDependencies;
40
+ private createModule;
41
+ private applyLogger;
42
+ }
node_modules/@nestjs/testing/testing-module.builder.js ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TestingModuleBuilder = void 0;
4
+ const common_1 = require("@nestjs/common");
5
+ const application_config_1 = require("@nestjs/core/application-config");
6
+ const container_1 = require("@nestjs/core/injector/container");
7
+ const graph_inspector_1 = require("@nestjs/core/inspector/graph-inspector");
8
+ const noop_graph_inspector_1 = require("@nestjs/core/inspector/noop-graph-inspector");
9
+ const uuid_factory_1 = require("@nestjs/core/inspector/uuid-factory");
10
+ const scanner_1 = require("@nestjs/core/scanner");
11
+ const testing_logger_service_1 = require("./services/testing-logger.service");
12
+ const testing_injector_1 = require("./testing-injector");
13
+ const testing_instance_loader_1 = require("./testing-instance-loader");
14
+ const testing_module_1 = require("./testing-module");
15
+ /**
16
+ * @publicApi
17
+ */
18
+ class TestingModuleBuilder {
19
+ constructor(metadataScanner, metadata, options) {
20
+ this.metadataScanner = metadataScanner;
21
+ this.applicationConfig = new application_config_1.ApplicationConfig();
22
+ this.overloadsMap = new Map();
23
+ this.moduleOverloadsMap = new Map();
24
+ this.container = new container_1.NestContainer(this.applicationConfig, options);
25
+ this.module = this.createModule(metadata);
26
+ }
27
+ setLogger(testingLogger) {
28
+ this.testingLogger = testingLogger;
29
+ return this;
30
+ }
31
+ overridePipe(typeOrToken) {
32
+ return this.override(typeOrToken, false);
33
+ }
34
+ useMocker(mocker) {
35
+ this.mocker = mocker;
36
+ return this;
37
+ }
38
+ overrideFilter(typeOrToken) {
39
+ return this.override(typeOrToken, false);
40
+ }
41
+ overrideGuard(typeOrToken) {
42
+ return this.override(typeOrToken, false);
43
+ }
44
+ overrideInterceptor(typeOrToken) {
45
+ return this.override(typeOrToken, false);
46
+ }
47
+ overrideProvider(typeOrToken) {
48
+ return this.override(typeOrToken, true);
49
+ }
50
+ overrideModule(moduleToOverride) {
51
+ return {
52
+ useModule: newModule => {
53
+ this.moduleOverloadsMap.set(moduleToOverride, newModule);
54
+ return this;
55
+ },
56
+ };
57
+ }
58
+ async compile(options = {}) {
59
+ this.applyLogger();
60
+ let graphInspector;
61
+ if (options?.snapshot) {
62
+ graphInspector = new graph_inspector_1.GraphInspector(this.container);
63
+ uuid_factory_1.UuidFactory.mode = uuid_factory_1.UuidFactoryMode.Deterministic;
64
+ }
65
+ else {
66
+ graphInspector = noop_graph_inspector_1.NoopGraphInspector;
67
+ uuid_factory_1.UuidFactory.mode = uuid_factory_1.UuidFactoryMode.Random;
68
+ }
69
+ const scanner = new scanner_1.DependenciesScanner(this.container, this.metadataScanner, graphInspector, this.applicationConfig);
70
+ await scanner.scan(this.module, {
71
+ overrides: this.getModuleOverloads(),
72
+ });
73
+ this.applyOverloadsMap();
74
+ await this.createInstancesOfDependencies(graphInspector, options);
75
+ scanner.applyApplicationProviders();
76
+ const root = this.getRootModule();
77
+ return new testing_module_1.TestingModule(this.container, graphInspector, root, this.applicationConfig);
78
+ }
79
+ override(typeOrToken, isProvider) {
80
+ const addOverload = (options) => {
81
+ this.overloadsMap.set(typeOrToken, {
82
+ ...options,
83
+ isProvider,
84
+ });
85
+ return this;
86
+ };
87
+ return this.createOverrideByBuilder(addOverload);
88
+ }
89
+ createOverrideByBuilder(add) {
90
+ return {
91
+ useValue: value => add({ useValue: value }),
92
+ useFactory: (options) => add({ ...options, useFactory: options.factory }),
93
+ useClass: metatype => add({ useClass: metatype }),
94
+ };
95
+ }
96
+ applyOverloadsMap() {
97
+ const overloads = [...this.overloadsMap.entries()];
98
+ overloads.forEach(([item, options]) => {
99
+ this.container.replace(item, options);
100
+ });
101
+ }
102
+ getModuleOverloads() {
103
+ const overloads = [...this.moduleOverloadsMap.entries()];
104
+ return overloads.map(([moduleToReplace, newModule]) => ({
105
+ moduleToReplace,
106
+ newModule,
107
+ }));
108
+ }
109
+ getRootModule() {
110
+ const modules = this.container.getModules().values();
111
+ return modules.next().value;
112
+ }
113
+ async createInstancesOfDependencies(graphInspector, options) {
114
+ const injector = new testing_injector_1.TestingInjector({
115
+ preview: options?.preview ?? false,
116
+ snapshot: options?.snapshot ?? false,
117
+ });
118
+ const instanceLoader = new testing_instance_loader_1.TestingInstanceLoader(this.container, injector, graphInspector);
119
+ await instanceLoader.createInstancesOfDependencies(this.container.getModules(), this.mocker);
120
+ }
121
+ createModule(metadata) {
122
+ class RootTestModule {
123
+ }
124
+ (0, common_1.Module)(metadata)(RootTestModule);
125
+ return RootTestModule;
126
+ }
127
+ applyLogger() {
128
+ common_1.Logger.overrideLogger(this.testingLogger || new testing_logger_service_1.TestingLogger());
129
+ }
130
+ }
131
+ exports.TestingModuleBuilder = TestingModuleBuilder;
node_modules/@nestjs/testing/testing-module.d.ts ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { HttpServer, INestApplication, INestMicroservice, NestApplicationOptions, Type } from '@nestjs/common';
2
+ import { NestMicroserviceOptions } from '@nestjs/common/interfaces/microservices/nest-microservice-options.interface';
3
+ import { AbstractHttpAdapter, NestApplicationContext } from '@nestjs/core';
4
+ import { ApplicationConfig } from '@nestjs/core/application-config';
5
+ import { NestContainer } from '@nestjs/core/injector/container';
6
+ import { Module } from '@nestjs/core/injector/module';
7
+ import { GraphInspector } from '@nestjs/core/inspector/graph-inspector';
8
+ /**
9
+ * @publicApi
10
+ */
11
+ export declare class TestingModule extends NestApplicationContext {
12
+ private readonly applicationConfig;
13
+ protected readonly graphInspector: GraphInspector;
14
+ constructor(container: NestContainer, graphInspector: GraphInspector, contextModule: Module, applicationConfig: ApplicationConfig, scope?: Type<any>[]);
15
+ private isHttpServer;
16
+ createNestApplication<T extends INestApplication = INestApplication>(httpAdapter: HttpServer | AbstractHttpAdapter, options?: NestApplicationOptions): T;
17
+ createNestApplication<T extends INestApplication = INestApplication>(options?: NestApplicationOptions): T;
18
+ createNestMicroservice<T extends object>(options: NestMicroserviceOptions & T): INestMicroservice;
19
+ private createHttpAdapter;
20
+ private applyLogger;
21
+ private createAdapterProxy;
22
+ }
node_modules/@nestjs/testing/testing-module.js ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TestingModule = void 0;
4
+ const common_1 = require("@nestjs/common");
5
+ const load_package_util_1 = require("@nestjs/common/utils/load-package.util");
6
+ const shared_utils_1 = require("@nestjs/common/utils/shared.utils");
7
+ const core_1 = require("@nestjs/core");
8
+ /**
9
+ * @publicApi
10
+ */
11
+ class TestingModule extends core_1.NestApplicationContext {
12
+ constructor(container, graphInspector, contextModule, applicationConfig, scope = []) {
13
+ const options = {};
14
+ super(container, options, contextModule, scope);
15
+ this.applicationConfig = applicationConfig;
16
+ this.graphInspector = graphInspector;
17
+ }
18
+ isHttpServer(serverOrOptions) {
19
+ return !!(serverOrOptions && serverOrOptions.patch);
20
+ }
21
+ createNestApplication(serverOrOptions, options) {
22
+ const [httpAdapter, appOptions] = this.isHttpServer(serverOrOptions)
23
+ ? [serverOrOptions, options]
24
+ : [this.createHttpAdapter(), serverOrOptions];
25
+ this.applyLogger(appOptions);
26
+ this.container.setHttpAdapter(httpAdapter);
27
+ const instance = new core_1.NestApplication(this.container, httpAdapter, this.applicationConfig, this.graphInspector, appOptions);
28
+ return this.createAdapterProxy(instance, httpAdapter);
29
+ }
30
+ createNestMicroservice(options) {
31
+ const { NestMicroservice } = (0, load_package_util_1.loadPackage)('@nestjs/microservices', 'TestingModule', () => require('@nestjs/microservices'));
32
+ this.applyLogger(options);
33
+ return new NestMicroservice(this.container, options, this.graphInspector, this.applicationConfig);
34
+ }
35
+ createHttpAdapter(httpServer) {
36
+ const { ExpressAdapter } = (0, load_package_util_1.loadPackage)('@nestjs/platform-express', 'NestFactory', () => require('@nestjs/platform-express'));
37
+ return new ExpressAdapter(httpServer);
38
+ }
39
+ applyLogger(options) {
40
+ if (!options || (0, shared_utils_1.isUndefined)(options.logger)) {
41
+ return;
42
+ }
43
+ common_1.Logger.overrideLogger(options.logger);
44
+ }
45
+ createAdapterProxy(app, adapter) {
46
+ return new Proxy(app, {
47
+ get: (receiver, prop) => {
48
+ if (!(prop in receiver) && prop in adapter) {
49
+ return adapter[prop];
50
+ }
51
+ return receiver[prop];
52
+ },
53
+ });
54
+ }
55
+ }
56
+ exports.TestingModule = TestingModule;
node_modules/@nestjs/testing/tsconfig.build.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "extends": "../tsconfig.build.json",
3
+ "compilerOptions": {
4
+ "outDir": ".",
5
+ "rootDir": ".",
6
+ "paths": {
7
+ "@nestjs/common": ["../common"],
8
+ "@nestjs/common/*": ["../common/*"],
9
+ "@nestjs/core": ["../core"],
10
+ "@nestjs/core/*": ["../core/*"],
11
+ "@nestjs/microservices": ["../microservices"],
12
+ "@nestjs/microservices/*": ["../microservices/*"],
13
+ "@nestjs/platform-express": ["../platform-express"],
14
+ "@nestjs/platform-express/*": ["../platform-express/*"]
15
+ }
16
+ },
17
+ "exclude": ["node_modules", "dist", "test/**/*", "*.spec.ts"],
18
+ "references": [
19
+ {
20
+ "path": "../common/tsconfig.build.json"
21
+ },
22
+ {
23
+ "path": "../core/tsconfig.build.json"
24
+ },
25
+ {
26
+ "path": "../microservices/tsconfig.build.json"
27
+ },
28
+ {
29
+ "path": "../platform-express/tsconfig.build.json"
30
+ }
31
+ ]
32
+ }
node_modules/@noble/hashes/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Paul Miller (https://paulmillr.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the “Software”), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR O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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 tests and fuzzing ensure correctness
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 & KangarooTwelve
11
+ - 🪶 48KB for everything, 4.8KB (2.36KB gzipped) for single-hash build
12
+
13
+ Take a glance at [GitHub Discussions](https://github.com/paulmillr/noble-hashes/discussions) for questions and support.
14
+ The library's initial development was funded by [Ethereum Foundation](https://ethereum.org/).
15
+
16
+ ### This library belongs to _noble_ cryptography
17
+
18
+ > **noble cryptography** — high-security, easily auditable set of contained cryptographic libraries and tools.
19
+
20
+ - Zero or minimal dependencies
21
+ - Highly readable TypeScript / JS code
22
+ - PGP-signed releases and transparent NPM builds
23
+ - All libraries:
24
+ [ciphers](https://github.com/paulmillr/noble-ciphers),
25
+ [curves](https://github.com/paulmillr/noble-curves),
26
+ [hashes](https://github.com/paulmillr/noble-hashes),
27
+ [post-quantum](https://github.com/paulmillr/noble-post-quantum),
28
+ 4kb [secp256k1](https://github.com/paulmillr/noble-secp256k1) /
29
+ [ed25519](https://github.com/paulmillr/noble-ed25519)
30
+ - [Check out homepage](https://paulmillr.com/noble/)
31
+ for reading resources, documentation and apps built with noble
32
+
33
+ ## Usage
34
+
35
+ > `npm install @noble/hashes`
36
+
37
+ > `deno add jsr:@noble/hashes`
38
+
39
+ > `deno doc jsr:@noble/hashes` # command-line documentation
40
+
41
+ We support all major platforms and runtimes.
42
+ For React Native, you may need a [polyfill for getRandomValues](https://github.com/LinusU/react-native-get-random-values).
43
+ A standalone file [noble-hashes.js](https://github.com/paulmillr/noble-hashes/releases) is also available.
44
+
45
+ ```js
46
+ // import * from '@noble/hashes'; // Error: use sub-imports, to ensure small app size
47
+ import { sha256 } from '@noble/hashes/sha2.js'; // ESM & Common.js
48
+ sha256(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])); // returns Uint8Array
49
+
50
+ // Available modules
51
+ import { sha256, sha384, sha512, sha224, sha512_224, sha512_256 } from '@noble/hashes/sha2.js';
52
+ import { sha3_256, sha3_512, keccak_256, keccak_512, shake128, shake256 } from '@noble/hashes/sha3.js';
53
+ import { cshake256, turboshake256, kmac256, tuplehash256, k12, m14, keccakprg } from '@noble/hashes/sha3-addons.js';
54
+ import { blake3 } from '@noble/hashes/blake3.js';
55
+ import { blake2b, blake2s } from '@noble/hashes/blake2.js';
56
+ import { blake256, blake512 } from '@noble/hashes/blake1.js';
57
+ import { sha1, md5, ripemd160 } from '@noble/hashes/legacy.js';
58
+ import { hmac } from '@noble/hashes/hmac.js';
59
+ import { hkdf } from '@noble/hashes/hkdf.js';
60
+ import { pbkdf2, pbkdf2Async } from '@noble/hashes/pbkdf2.js';
61
+ import { scrypt, scryptAsync } from '@noble/hashes/scrypt.js';
62
+ import { argon2d, argon2i, argon2id } from '@noble/hashes/argon2.js';
63
+ import * as utils from '@noble/hashes/utils'; // bytesToHex, bytesToUtf8, concatBytes...
64
+ ```
65
+
66
+ - [sha2: sha256, sha384, sha512](#sha2-sha256-sha384-sha512-and-others)
67
+ - [sha3: FIPS, SHAKE, Keccak](#sha3-fips-shake-keccak)
68
+ - [sha3-addons: cSHAKE, KMAC, K12, M14, TurboSHAKE](#sha3-addons-cshake-kmac-k12-m14-turboshake)
69
+ - [blake, blake2, blake3](#blake-blake2-blake3) | [legacy: sha1, md5, ripemd160](#legacy-sha1-md5-ripemd160)
70
+ - MACs: [hmac](#hmac) | [sha3-addons kmac](#sha3-addons-cshake-kmac-k12-m14-turboshake) | [blake3 key mode](#blake2b-blake2s-blake3)
71
+ - KDFs: [hkdf](#hkdf) | [pbkdf2](#pbkdf2) | [scrypt](#scrypt) | [argon2](#argon2)
72
+ - [utils](#utils)
73
+ - [Security](#security) | [Speed](#speed) | [Contributing & testing](#contributing--testing) | [License](#license)
74
+
75
+ ### Implementations
76
+
77
+ Hash functions:
78
+
79
+ - `sha256()`: receive & return `Uint8Array`
80
+ - `sha256.create().update(a).update(b).digest()`: support partial updates
81
+ - `blake3.create({ context: 'e', dkLen: 32 })`: sometimes have options
82
+ - support little-endian architecture; also experimentally big-endian
83
+ - can hash up to 4GB per chunk, with any amount of chunks
84
+
85
+ #### sha2: sha256, sha384, sha512 and others
86
+
87
+ ```typescript
88
+ import { sha224, sha256, sha384, sha512, sha512_224, sha512_256 } from '@noble/hashes/sha2.js';
89
+ const res = sha256(Uint8Array.from([0xbc])); // basic
90
+ for (let hash of [sha256, sha384, sha512, sha224, sha512_224, sha512_256]) {
91
+ const arr = Uint8Array.from([0x10, 0x20, 0x30]);
92
+ const a = hash(arr);
93
+ const b = hash.create().update(arr).digest();
94
+ }
95
+ ```
96
+
97
+ See [RFC 4634](https://datatracker.ietf.org/doc/html/rfc4634) and
98
+ [the paper on truncated SHA512/256](https://eprint.iacr.org/2010/548.pdf).
99
+
100
+ #### sha3: FIPS, SHAKE, Keccak
101
+
102
+ ```typescript
103
+ import {
104
+ keccak_224, keccak_256, keccak_384, keccak_512,
105
+ sha3_224, sha3_256, sha3_384, sha3_512,
106
+ shake128, shake256,
107
+ } from '@noble/hashes/sha3.js';
108
+ for (let hash of [
109
+ sha3_224, sha3_256, sha3_384, sha3_512,
110
+ keccak_224, keccak_256, keccak_384, keccak_512,
111
+ ]) {
112
+ const arr = Uint8Array.from([0x10, 0x20, 0x30]);
113
+ const a = hash(arr);
114
+ const b = hash.create().update(arr).digest();
115
+ }
116
+ const shka = shake128(Uint8Array.from([0x10]), { dkLen: 512 });
117
+ const shkb = shake256(Uint8Array.from([0x30]), { dkLen: 512 });
118
+ ```
119
+
120
+ See [FIPS-202](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf),
121
+ [Website](https://keccak.team/keccak.html).
122
+
123
+ 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)
124
+
125
+ #### sha3-addons: cSHAKE, KMAC, K12, M14, TurboSHAKE
126
+
127
+ ```typescript
128
+ import {
129
+ cshake128, cshake256,
130
+ k12,
131
+ keccakprg,
132
+ kmac128, kmac256,
133
+ m14,
134
+ parallelhash256,
135
+ tuplehash256,
136
+ turboshake128, turboshake256
137
+ } from '@noble/hashes/sha3-addons.js';
138
+ const data = Uint8Array.from([0x10, 0x20, 0x30]);
139
+ const ec1 = cshake128(data, { personalization: 'def' });
140
+ const ec2 = cshake256(data, { personalization: 'def' });
141
+ const et1 = turboshake128(data);
142
+ const et2 = turboshake256(data, { D: 0x05 });
143
+ // tuplehash(['ab', 'c']) !== tuplehash(['a', 'bc']) !== tuplehash([data])
144
+ const et3 = tuplehash256([utf8ToBytes('ab'), utf8ToBytes('c')]);
145
+ // Not parallel in JS (similar to blake3 / k12), added for compat
146
+ const ep1 = parallelhash256(data, { blockLen: 8 });
147
+ const kk = Uint8Array.from([0xca]);
148
+ const ek10 = kmac128(kk, data);
149
+ const ek11 = kmac256(kk, data);
150
+ const ek12 = k12(data);
151
+ const ek13 = m14(data);
152
+ // pseudo-random generator, first argument is capacity. XKCP recommends 254 bits capacity for 128-bit security strength.
153
+ // * with a capacity of 254 bits.
154
+ const p = keccakprg(254);
155
+ p.feed('test');
156
+ const rand1b = p.fetch(1);
157
+ ```
158
+
159
+ - Full [NIST SP 800-185](https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-185.pdf):
160
+ cSHAKE, KMAC, TupleHash, ParallelHash + XOF variants
161
+ - [Reduced-round Keccak](https://datatracker.ietf.org/doc/draft-irtf-cfrg-kangarootwelve/):
162
+ - 🦘 K12 aka KangarooTwelve
163
+ - M14 aka MarsupilamiFourteen
164
+ - TurboSHAKE
165
+ - [KeccakPRG](https://keccak.team/files/CSF-0.1.pdf): Pseudo-random generator based on Keccak
166
+
167
+ #### blake, blake2, blake3
168
+
169
+ ```typescript
170
+ import { blake224, blake256, blake384, blake512 } from '@noble/hashes/blake1.js';
171
+ import { blake2b, blake2s } from '@noble/hashes/blake2.js';
172
+ import { blake3 } from '@noble/hashes/blake3.js';
173
+
174
+ for (let hash of [
175
+ blake224, blake256, blake384, blake512,
176
+ blake2b, blake2s, blake3
177
+ ]) {
178
+ const arr = Uint8Array.from([0x10, 0x20, 0x30]);
179
+ const a = hash(arr);
180
+ const b = hash.create().update(arr).digest();
181
+ }
182
+
183
+ // blake2 advanced usage
184
+ const ab = Uint8Array.from([0x01]);
185
+ blake2s(ab);
186
+ blake2s(ab, { key: new Uint8Array(32) });
187
+ blake2s(ab, { personalization: 'pers1234' });
188
+ blake2s(ab, { salt: 'salt1234' });
189
+ blake2b(ab);
190
+ blake2b(ab, { key: new Uint8Array(64) });
191
+ blake2b(ab, { personalization: 'pers1234pers1234' });
192
+ blake2b(ab, { salt: 'salt1234salt1234' });
193
+
194
+ // blake3 advanced usage
195
+ blake3(ab);
196
+ blake3(ab, { dkLen: 256 });
197
+ blake3(ab, { key: new Uint8Array(32) });
198
+ blake3(ab, { context: 'application-name' });
199
+ ```
200
+
201
+ - Blake1 is legacy hash, one of SHA3 proposals. It is rarely used anywhere. See [pdf](https://www.aumasson.jp/blake/blake.pdf).
202
+ - 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)
203
+ - Blake3 is faster, reduced-round blake2. See [Website & specs](https://blake3.io)
204
+
205
+ #### legacy: sha1, md5, ripemd160
206
+
207
+ SHA1 (RFC 3174), MD5 (RFC 1321) and RIPEMD160 (RFC 2286) legacy, weak hash functions.
208
+ Don't use them in a new protocol. What "weak" means:
209
+
210
+ - Collisions can be made with 2^18 effort in MD5, 2^60 in SHA1, 2^80 in RIPEMD160.
211
+ - No practical pre-image attacks (only theoretical, 2^123.4)
212
+ - HMAC seems kinda ok: https://datatracker.ietf.org/doc/html/rfc6151
213
+
214
+ ```typescript
215
+ import { md5, ripemd160, sha1 } from '@noble/hashes/legacy.js';
216
+ for (let hash of [md5, ripemd160, sha1]) {
217
+ const arr = Uint8Array.from([0x10, 0x20, 0x30]);
218
+ const a = hash(arr);
219
+ const b = hash.create().update(arr).digest();
220
+ }
221
+ ```
222
+
223
+ #### hmac
224
+
225
+ ```typescript
226
+ import { hmac } from '@noble/hashes/hmac.js';
227
+ import { sha256 } from '@noble/hashes/sha2.js';
228
+ const key = new Uint8Array(32).fill(1);
229
+ const msg = new Uint8Array(32).fill(2);
230
+ const mac1 = hmac(sha256, key, msg);
231
+ const mac2 = hmac.create(sha256, key).update(msg).digest();
232
+ ```
233
+
234
+ Matches [RFC 2104](https://datatracker.ietf.org/doc/html/rfc2104).
235
+
236
+ #### hkdf
237
+
238
+ ```typescript
239
+ import { hkdf } from '@noble/hashes/hkdf.js';
240
+ import { randomBytes } from '@noble/hashes/utils.js';
241
+ import { sha256 } from '@noble/hashes/sha2.js';
242
+ const inputKey = randomBytes(32);
243
+ const salt = randomBytes(32);
244
+ const info = 'application-key';
245
+ const hk1 = hkdf(sha256, inputKey, salt, info, 32);
246
+
247
+ // == same as
248
+ import { extract, expand } from '@noble/hashes/hkdf.js';
249
+ import { sha256 } from '@noble/hashes/sha2.js';
250
+ const prk = extract(sha256, inputKey, salt);
251
+ const hk2 = expand(sha256, prk, info, 32);
252
+ ```
253
+
254
+ Matches [RFC 5869](https://datatracker.ietf.org/doc/html/rfc5869).
255
+
256
+ #### pbkdf2
257
+
258
+ ```typescript
259
+ import { pbkdf2, pbkdf2Async } from '@noble/hashes/pbkdf2.js';
260
+ import { sha256 } from '@noble/hashes/sha2.js';
261
+ const pbkey1 = pbkdf2(sha256, 'password', 'salt', { c: 32, dkLen: 32 });
262
+ const pbkey2 = await pbkdf2Async(sha256, 'password', 'salt', { c: 32, dkLen: 32 });
263
+ const pbkey3 = await pbkdf2Async(sha256, Uint8Array.from([1, 2, 3]), Uint8Array.from([4, 5, 6]), {
264
+ c: 32,
265
+ dkLen: 32,
266
+ });
267
+ ```
268
+
269
+ Matches [RFC 2898](https://datatracker.ietf.org/doc/html/rfc2898).
270
+
271
+ #### scrypt
272
+
273
+ ```typescript
274
+ import { scrypt, scryptAsync } from '@noble/hashes/scrypt.js';
275
+ const scr1 = scrypt('password', 'salt', { N: 2 ** 16, r: 8, p: 1, dkLen: 32 });
276
+ const scr2 = await scryptAsync('password', 'salt', { N: 2 ** 16, r: 8, p: 1, dkLen: 32 });
277
+ const scr3 = await scryptAsync(Uint8Array.from([1, 2, 3]), Uint8Array.from([4, 5, 6]), {
278
+ N: 2 ** 17,
279
+ r: 8,
280
+ p: 1,
281
+ dkLen: 32,
282
+ onProgress(percentage) {
283
+ console.log('progress', percentage);
284
+ },
285
+ maxmem: 2 ** 32 + 128 * 8 * 1, // N * r * p * 128 + (128*r*p)
286
+ });
287
+ ```
288
+
289
+ Conforms to [RFC 7914](https://datatracker.ietf.org/doc/html/rfc7914),
290
+ [Website](https://www.tarsnap.com/scrypt.html)
291
+
292
+ - `N, r, p` are work factors. To understand them, see [the blog post](https://blog.filippo.io/the-scrypt-parameters/).
293
+ `r: 8, p: 1` are common. JS doesn't support parallelization, making increasing p meaningless.
294
+ - `dkLen` is the length of output bytes e.g. `32` or `64`
295
+ - `onProgress` can be used with async version of the function to report progress to a user.
296
+ - `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)`
297
+
298
+ Time it takes to derive Scrypt key under different values of N (2\*\*N) on Apple M4 (mobile phones can be 1x-4x slower):
299
+
300
+ | N pow | Time | RAM |
301
+ | ----- | ---- | ----- |
302
+ | 16 | 0.1s | 64MB |
303
+ | 17 | 0.2s | 128MB |
304
+ | 18 | 0.4s | 256MB |
305
+ | 19 | 0.8s | 512MB |
306
+ | 20 | 1.5s | 1GB |
307
+ | 21 | 3.1s | 2GB |
308
+ | 22 | 6.2s | 4GB |
309
+ | 23 | 13s | 8GB |
310
+ | 24 | 27s | 16GB |
311
+
312
+ > [!NOTE]
313
+ > We support N larger than `2**20` where available, however,
314
+ > not all JS engines support >= 2GB ArrayBuffer-s.
315
+ > When using such N, you'll need to manually adjust `maxmem`, using formula above.
316
+ > Other JS implementations don't support large N-s.
317
+
318
+ #### argon2
319
+
320
+ ```ts
321
+ import { argon2d, argon2i, argon2id } from '@noble/hashes/argon2.js';
322
+ const arg1 = argon2id('password', 'saltsalt', { t: 2, m: 65536, p: 1, maxmem: 2 ** 32 - 1 });
323
+ ```
324
+
325
+ Argon2 [RFC 9106](https://datatracker.ietf.org/doc/html/rfc9106) implementation.
326
+
327
+ > [!WARNING]
328
+ > Argon2 can't be fast in JS, because there is no fast Uint64Array.
329
+ > It is suggested to use [Scrypt](#scrypt) instead.
330
+ > Being 5x slower than native code means brute-forcing attackers have bigger advantage.
331
+
332
+ #### utils
333
+
334
+ ```typescript
335
+ import { bytesToHex as toHex, randomBytes } from '@noble/hashes/utils';
336
+ console.log(toHex(randomBytes(32)));
337
+ ```
338
+
339
+ - `bytesToHex` will convert `Uint8Array` to a hex string
340
+ - `randomBytes(bytes)` will produce cryptographically secure random `Uint8Array` of length `bytes`
341
+
342
+ ## Security
343
+
344
+ The library has been independently audited:
345
+
346
+ - at version 1.0.0, in Jan 2022, by [Cure53](https://cure53.de)
347
+ - PDFs: [website](https://cure53.de/pentest-report_hashing-libs.pdf), [in-repo](./audit/2022-01-05-cure53-audit-nbl2.pdf)
348
+ - [Changes since audit](https://github.com/paulmillr/noble-hashes/compare/1.0.0..main).
349
+ - Scope: everything, besides `blake3`, `sha3-addons`, `sha1` and `argon2`, which have not been audited
350
+ - The audit has been funded by [Ethereum Foundation](https://ethereum.org/en/) with help of [Nomic Labs](https://nomiclabs.io)
351
+
352
+ It is tested against property-based, cross-library and Wycheproof vectors,
353
+ and is being fuzzed in [the separate repo](https://github.com/paulmillr/fuzzing).
354
+
355
+ If you see anything unusual: investigate and report.
356
+
357
+ ### Constant-timeness
358
+
359
+ We're targetting algorithmic constant time. _JIT-compiler_ and _Garbage Collector_ make "constant time"
360
+ extremely hard to achieve [timing attack](https://en.wikipedia.org/wiki/Timing_attack) resistance
361
+ in a scripting language. Which means _any other JS library can't have
362
+ constant-timeness_. Even statically typed Rust, a language without GC,
363
+ [makes it harder to achieve constant-time](https://www.chosenplaintext.ca/open-source/rust-timing-shield/security)
364
+ for some cases. If your goal is absolute security, don't use any JS lib — including bindings to native ones.
365
+ Use low-level libraries & languages.
366
+
367
+ ### Memory dumping
368
+
369
+ The library shares state buffers between hash
370
+ function calls. The buffers are zeroed-out after each call. However, if an attacker
371
+ can read application memory, you are doomed in any case:
372
+
373
+ - At some point, input will be a string and strings are immutable in JS:
374
+ there is no way to overwrite them with zeros. For example: deriving
375
+ key from `scrypt(password, salt)` where password and salt are strings
376
+ - Input from a file will stay in file buffers
377
+ - Input / output will be re-used multiple times in application which means it could stay in memory
378
+ - `await anything()` will always write all internal variables (including numbers)
379
+ to memory. With async functions / Promises there are no guarantees when the code
380
+ chunk would be executed. Which means attacker can have plenty of time to read data from memory
381
+ - There is no way to guarantee anything about zeroing sensitive data without
382
+ complex tests-suite which will dump process memory and verify that there is
383
+ no sensitive data left. For JS it means testing all browsers (incl. mobile),
384
+ which is complex. And of course it will be useless without using the same
385
+ test-suite in the actual application that consumes the library
386
+
387
+ ### Supply chain security
388
+
389
+ - **Commits** are signed with PGP keys, to prevent forgery. Make sure to verify commit signatures
390
+ - **Releases** are transparent and built on GitHub CI. Make sure to verify [provenance](https://docs.npmjs.com/generating-provenance-statements) logs
391
+ - Use GitHub CLI to verify single-file builds:
392
+ `gh attestation verify --owner paulmillr noble-hashes.js`
393
+ - **Rare releasing** is followed to ensure less re-audit need for end-users
394
+ - **Dependencies** are minimized and locked-down: any dependency could get hacked and users will be downloading malware with every install.
395
+ - We make sure to use as few dependencies as possible
396
+ - Automatic dep updates are prevented by locking-down version ranges; diffs are checked with `npm-diff`
397
+ - **Dev Dependencies** are disabled for end-users; they are only used to develop / build the source code
398
+
399
+ For this package, there are 0 dependencies; and a few dev dependencies:
400
+
401
+ - micro-bmark, micro-should and jsbt are used for benchmarking / testing / build tooling and developed by the same author
402
+ - prettier, fast-check and typescript are used for code quality / test generation / ts compilation. It's hard to audit their source code thoroughly and fully because of their size
403
+
404
+ ### Randomness
405
+
406
+ We're deferring to built-in
407
+ [crypto.getRandomValues](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues)
408
+ which is considered cryptographically secure (CSPRNG).
409
+
410
+ In the past, browsers had bugs that made it weak: it may happen again.
411
+ Implementing a userspace CSPRNG to get resilient to the weakness
412
+ is even worse: there is no reliable userspace source of quality entropy.
413
+
414
+ ### Quantum computers
415
+
416
+ Cryptographically relevant quantum computer, if built, will allow to
417
+ utilize Grover's algorithm to break hashes in 2^n/2 operations, instead of 2^n.
418
+
419
+ This means SHA256 should be replaced with SHA512, SHA3-256 with SHA3-512, SHAKE128 with SHAKE256 etc.
420
+
421
+ 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).
422
+
423
+ ## Speed
424
+
425
+ ```sh
426
+ npm run bench:install && npm run bench
427
+ ```
428
+
429
+ Benchmarks measured on Apple M4.
430
+
431
+ ```
432
+ # 32B
433
+ sha256 x 1,968,503 ops/sec @ 508ns/op
434
+ sha512 x 740,740 ops/sec @ 1μs/op
435
+ sha3_256 x 287,686 ops/sec @ 3μs/op
436
+ sha3_512 x 288,267 ops/sec @ 3μs/op
437
+ k12 x 476,190 ops/sec @ 2μs/op
438
+ m14 x 423,190 ops/sec @ 2μs/op
439
+ blake2b x 464,252 ops/sec @ 2μs/op
440
+ blake2s x 766,871 ops/sec @ 1μs/op
441
+ blake3 x 879,507 ops/sec @ 1μs/op
442
+
443
+ # 1MB
444
+ sha256 x 331 ops/sec @ 3ms/op
445
+ sha512 x 129 ops/sec @ 7ms/op
446
+ sha3_256 x 38 ops/sec @ 25ms/op
447
+ sha3_512 x 20 ops/sec @ 47ms/op
448
+ k12 x 88 ops/sec @ 11ms/op
449
+ m14 x 62 ops/sec @ 15ms/op
450
+ blake2b x 69 ops/sec @ 14ms/op
451
+ blake2s x 57 ops/sec @ 17ms/op
452
+ blake3 x 72 ops/sec @ 13ms/op
453
+
454
+ # MAC
455
+ hmac(sha256) x 599,880 ops/sec @ 1μs/op
456
+ hmac(sha512) x 197,122 ops/sec @ 5μs/op
457
+ kmac256 x 87,981 ops/sec @ 11μs/op
458
+ blake3(key) x 796,812 ops/sec @ 1μs/op
459
+
460
+ # KDF
461
+ hkdf(sha256) x 259,942 ops/sec @ 3μs/op
462
+ blake3(context) x 424,808 ops/sec @ 2μs/op
463
+ pbkdf2(sha256, c: 2 ** 18) x 5 ops/sec @ 197ms/op
464
+ pbkdf2(sha512, c: 2 ** 18) x 1 ops/sec @ 630ms/op
465
+ scrypt(n: 2 ** 18, r: 8, p: 1) x 2 ops/sec @ 400ms/op
466
+ argon2id(t: 1, m: 256MB) 2881ms
467
+ ```
468
+
469
+ Compare to native node.js implementation that uses C bindings instead of pure-js code:
470
+
471
+ ```
472
+ # native (node) 32B
473
+ sha256 x 2,267,573 ops/sec
474
+ sha512 x 983,284 ops/sec
475
+ sha3_256 x 1,522,070 ops/sec
476
+ blake2b x 1,512,859 ops/sec
477
+ blake2s x 1,821,493 ops/sec
478
+ hmac(sha256) x 1,085,776 ops/sec
479
+ hkdf(sha256) x 312,109 ops/sec
480
+ # native (node) KDF
481
+ pbkdf2(sha256, c: 2 ** 18) x 5 ops/sec @ 197ms/op
482
+ pbkdf2(sha512, c: 2 ** 18) x 1 ops/sec @ 630ms/op
483
+ scrypt(n: 2 ** 18, r: 8, p: 1) x 2 ops/sec @ 378ms/op
484
+ ```
485
+
486
+ It is possible to [make this library 4x+ faster](./benchmark/README.md) by
487
+ _doing code generation of full loop unrolls_. We've decided against it. Reasons:
488
+
489
+ - the library must be auditable, with minimum amount of code, and zero dependencies
490
+ - most method invocations with the lib are going to be something like hashing 32b to 64kb of data
491
+ - hashing big inputs is 10x faster with low-level languages, which means you should probably pick 'em instead
492
+
493
+ The current performance is good enough when compared to other projects; SHA256 takes only 900 nanoseconds to run.
494
+
495
+ ## Contributing & testing
496
+
497
+ `test/misc` directory contains implementations of loop unrolling and md5.
498
+
499
+ - `npm install && npm run build && npm test` will build the code and run tests.
500
+ - `npm run lint` / `npm run format` will run linter / fix linter issues.
501
+ - `npm run bench` will run benchmarks, which may need their deps first (`npm run bench:install`)
502
+ - `npm run build:release` will build single file
503
+ - There is **additional** 20-min DoS test `npm run test:dos` and 2-hour "big" multicore test `npm run test:big`.
504
+ See [our approach to testing](./test/README.md)
505
+
506
+ Additional resources:
507
+
508
+ - NTT hashes are outside of scope of the library. You can view some of them in different repos:
509
+ - [Pedersen in micro-zk-proofs](https://github.com/paulmillr/micro-zk-proofs/blob/1ed5ce1253583b2e540eef7f3477fb52bf5344ff/src/pedersen.ts)
510
+ - [Poseidon in noble-curves](https://github.com/paulmillr/noble-curves/blob/3d124dd3ecec8b6634cc0b2ba1c183aded5304f9/src/abstract/poseidon.ts)
511
+ - Check out [guidelines](https://github.com/paulmillr/guidelines) for coding practices
512
+ - See [paulmillr.com/noble](https://paulmillr.com/noble/) for useful resources, articles, documentation and demos
513
+ related to the library.
514
+
515
+ ## License
516
+
517
+ The MIT License (MIT)
518
+
519
+ Copyright (c) 2022 Paul Miller [(https://paulmillr.com)](https://paulmillr.com)
520
+
521
+ See LICENSE file.
node_modules/@noble/hashes/_assert.d.ts ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Internal assertion helpers.
3
+ * @module
4
+ * @deprecated
5
+ */
6
+ import { abytes as ab, aexists as ae, anumber as an, aoutput as ao, type IHash as H } from './utils.ts';
7
+ /** @deprecated Use import from `noble/hashes/utils` module */
8
+ export declare const abytes: typeof ab;
9
+ /** @deprecated Use import from `noble/hashes/utils` module */
10
+ export declare const aexists: typeof ae;
11
+ /** @deprecated Use import from `noble/hashes/utils` module */
12
+ export declare const anumber: typeof an;
13
+ /** @deprecated Use import from `noble/hashes/utils` module */
14
+ export declare const aoutput: typeof ao;
15
+ /** @deprecated Use import from `noble/hashes/utils` module */
16
+ export type Hash = H;
17
+ //# sourceMappingURL=_assert.d.ts.map
node_modules/@noble/hashes/_assert.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"_assert.d.ts","sourceRoot":"","sources":["src/_assert.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,MAAM,IAAI,EAAE,EACZ,OAAO,IAAI,EAAE,EACb,OAAO,IAAI,EAAE,EACb,OAAO,IAAI,EAAE,EACb,KAAK,KAAK,IAAI,CAAC,EAChB,MAAM,YAAY,CAAC;AACpB,8DAA8D;AAC9D,eAAO,MAAM,MAAM,EAAE,OAAO,EAAO,CAAC;AACpC,8DAA8D;AAC9D,eAAO,MAAM,OAAO,EAAE,OAAO,EAAO,CAAC;AACrC,8DAA8D;AAC9D,eAAO,MAAM,OAAO,EAAE,OAAO,EAAO,CAAC;AACrC,8DAA8D;AAC9D,eAAO,MAAM,OAAO,EAAE,OAAO,EAAO,CAAC;AACrC,8DAA8D;AAC9D,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC"}
node_modules/@noble/hashes/_assert.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.aoutput = exports.anumber = exports.aexists = exports.abytes = void 0;
4
+ /**
5
+ * Internal assertion helpers.
6
+ * @module
7
+ * @deprecated
8
+ */
9
+ const utils_ts_1 = require("./utils.js");
10
+ /** @deprecated Use import from `noble/hashes/utils` module */
11
+ exports.abytes = utils_ts_1.abytes;
12
+ /** @deprecated Use import from `noble/hashes/utils` module */
13
+ exports.aexists = utils_ts_1.aexists;
14
+ /** @deprecated Use import from `noble/hashes/utils` module */
15
+ exports.anumber = utils_ts_1.anumber;
16
+ /** @deprecated Use import from `noble/hashes/utils` module */
17
+ exports.aoutput = utils_ts_1.aoutput;
18
+ //# sourceMappingURL=_assert.js.map
node_modules/@noble/hashes/_assert.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"_assert.js","sourceRoot":"","sources":["src/_assert.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,yCAMoB;AACpB,8DAA8D;AACjD,QAAA,MAAM,GAAc,iBAAE,CAAC;AACpC,8DAA8D;AACjD,QAAA,OAAO,GAAc,kBAAE,CAAC;AACrC,8DAA8D;AACjD,QAAA,OAAO,GAAc,kBAAE,CAAC;AACrC,8DAA8D;AACjD,QAAA,OAAO,GAAc,kBAAE,CAAC"}
node_modules/@noble/hashes/_blake.d.ts ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Internal blake variable.
3
+ * For BLAKE2b, the two extra permutations for rounds 10 and 11 are SIGMA[10..11] = SIGMA[0..1].
4
+ */
5
+ export declare const BSIGMA: Uint8Array;
6
+ export type Num4 = {
7
+ a: number;
8
+ b: number;
9
+ c: number;
10
+ d: number;
11
+ };
12
+ export declare function G1s(a: number, b: number, c: number, d: number, x: number): Num4;
13
+ export declare function G2s(a: number, b: number, c: number, d: number, x: number): Num4;
14
+ //# sourceMappingURL=_blake.d.ts.map
node_modules/@noble/hashes/_blake.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"_blake.d.ts","sourceRoot":"","sources":["src/_blake.ts"],"names":[],"mappings":"AAMA;;;GAGG;AAEH,eAAO,MAAM,MAAM,EAAE,UAkBnB,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;AAGnE,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;AAED,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"}
node_modules/@noble/hashes/_blake.js ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BSIGMA = void 0;
4
+ exports.G1s = G1s;
5
+ exports.G2s = G2s;
6
+ /**
7
+ * Internal helpers for blake hash.
8
+ * @module
9
+ */
10
+ const utils_ts_1 = require("./utils.js");
11
+ /**
12
+ * Internal blake variable.
13
+ * For BLAKE2b, the two extra permutations for rounds 10 and 11 are SIGMA[10..11] = SIGMA[0..1].
14
+ */
15
+ // prettier-ignore
16
+ exports.BSIGMA = Uint8Array.from([
17
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
18
+ 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3,
19
+ 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4,
20
+ 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8,
21
+ 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13,
22
+ 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9,
23
+ 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11,
24
+ 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10,
25
+ 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5,
26
+ 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0,
27
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
28
+ 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3,
29
+ // Blake1, unused in others
30
+ 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4,
31
+ 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8,
32
+ 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13,
33
+ 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9,
34
+ ]);
35
+ // Mixing function G splitted in two halfs
36
+ function G1s(a, b, c, d, x) {
37
+ a = (a + b + x) | 0;
38
+ d = (0, utils_ts_1.rotr)(d ^ a, 16);
39
+ c = (c + d) | 0;
40
+ b = (0, utils_ts_1.rotr)(b ^ c, 12);
41
+ return { a, b, c, d };
42
+ }
43
+ function G2s(a, b, c, d, x) {
44
+ a = (a + b + x) | 0;
45
+ d = (0, utils_ts_1.rotr)(d ^ a, 8);
46
+ c = (c + d) | 0;
47
+ b = (0, utils_ts_1.rotr)(b ^ c, 7);
48
+ return { a, b, c, d };
49
+ }
50
+ //# sourceMappingURL=_blake.js.map
node_modules/@noble/hashes/_blake.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"_blake.js","sourceRoot":"","sources":["src/_blake.ts"],"names":[],"mappings":";;;AAmCA,kBAMC;AAED,kBAMC;AAjDD;;;GAGG;AACH,yCAAkC;AAElC;;;GAGG;AACH,kBAAkB;AACL,QAAA,MAAM,GAA+B,UAAU,CAAC,IAAI,CAAC;IAChE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;IACpD,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;IACpD,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;IACpD,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;IACpD,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE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EAAE,EAAE,CAAC,CAAC;IACpB,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAChB,CAAC,GAAG,IAAA,eAAI,EAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;IACpB,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AACxB,CAAC;AAED,SAAgB,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,CAAS;IACvE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IACpB,CAAC,GAAG,IAAA,eAAI,EAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IACnB,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAChB,CAAC,GAAG,IAAA,eAAI,EAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IACnB,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AACxB,CAAC"}
node_modules/@noble/hashes/_md.d.ts ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Internal Merkle-Damgard hash utils.
3
+ * @module
4
+ */
5
+ import { type Input, Hash } from './utils.ts';
6
+ /** Polyfill for Safari 14. https://caniuse.com/mdn-javascript_builtins_dataview_setbiguint64 */
7
+ export declare function setBigUint64(view: DataView, byteOffset: number, value: bigint, isLE: boolean): void;
8
+ /** Choice: a ? b : c */
9
+ export declare function Chi(a: number, b: number, c: number): number;
10
+ /** Majority function, true if any two inputs is true. */
11
+ export declare function Maj(a: number, b: number, c: number): number;
12
+ /**
13
+ * Merkle-Damgard hash construction base class.
14
+ * Could be used to create MD5, RIPEMD, SHA1, SHA2.
15
+ */
16
+ export declare abstract class HashMD<T extends HashMD<T>> extends Hash<T> {
17
+ protected abstract process(buf: DataView, offset: number): void;
18
+ protected abstract get(): number[];
19
+ protected abstract set(...args: number[]): void;
20
+ abstract destroy(): void;
21
+ protected abstract roundClean(): void;
22
+ readonly blockLen: number;
23
+ readonly outputLen: number;
24
+ readonly padOffset: number;
25
+ readonly isLE: boolean;
26
+ protected buffer: Uint8Array;
27
+ protected view: DataView;
28
+ protected finished: boolean;
29
+ protected length: number;
30
+ protected pos: number;
31
+ protected destroyed: boolean;
32
+ constructor(blockLen: number, outputLen: number, padOffset: number, isLE: boolean);
33
+ update(data: Input): this;
34
+ digestInto(out: Uint8Array): void;
35
+ digest(): Uint8Array;
36
+ _cloneInto(to?: T): T;
37
+ clone(): T;
38
+ }
39
+ /**
40
+ * Initial SHA-2 state: fractional parts of square roots of first 16 primes 2..53.
41
+ * Check out `test/misc/sha2-gen-iv.js` for recomputation guide.
42
+ */
43
+ /** Initial SHA256 state. Bits 0..32 of frac part of sqrt of primes 2..19 */
44
+ export declare const SHA256_IV: Uint32Array;
45
+ /** Initial SHA224 state. Bits 32..64 of frac part of sqrt of primes 23..53 */
46
+ export declare const SHA224_IV: Uint32Array;
47
+ /** Initial SHA384 state. Bits 0..64 of frac part of sqrt of primes 23..53 */
48
+ export declare const SHA384_IV: Uint32Array;
49
+ /** Initial SHA512 state. Bits 0..64 of frac part of sqrt of primes 2..19 */
50
+ export declare const SHA512_IV: Uint32Array;
51
+ //# sourceMappingURL=_md.d.ts.map
node_modules/@noble/hashes/_md.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"_md.d.ts","sourceRoot":"","sources":["src/_md.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,KAAK,KAAK,EAAE,IAAI,EAAwD,MAAM,YAAY,CAAC;AAEpG,gGAAgG;AAChG,wBAAgB,YAAY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AS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO;IASjF,MAAM,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI;IA0BzB,UAAU,CAAC,GAAG,EAAE,UAAU,GAAG,IAAI;IAkCjC,MAAM,IAAI,UAAU;IAOpB,UAAU,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC;IAWrB,KAAK,IAAI,CAAC;CAGX;AAED;;;GAGG;AAEH,4EAA4E;AAC5E,eAAO,MAAM,SAAS,EAAE,WAEtB,CAAC;AAEH,8EAA8E;AAC9E,eAAO,MAAM,SAAS,EAAE,WAEtB,CAAC;AAEH,6EAA6E;AAC7E,eAAO,MAAM,SAAS,EAAE,WAGtB,CAAC;AAEH,4EAA4E;AAC5E,eAAO,MAAM,SAAS,EAAE,WAGtB,CAAC"}
node_modules/@noble/hashes/_md.js ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SHA512_IV = exports.SHA384_IV = exports.SHA224_IV = exports.SHA256_IV = exports.HashMD = void 0;
4
+ exports.setBigUint64 = setBigUint64;
5
+ exports.Chi = Chi;
6
+ exports.Maj = Maj;
7
+ /**
8
+ * Internal Merkle-Damgard hash utils.
9
+ * @module
10
+ */
11
+ const utils_ts_1 = require("./utils.js");
12
+ /** Polyfill for Safari 14. https://caniuse.com/mdn-javascript_builtins_dataview_setbiguint64 */
13
+ function setBigUint64(view, byteOffset, value, isLE) {
14
+ if (typeof view.setBigUint64 === 'function')
15
+ return view.setBigUint64(byteOffset, value, isLE);
16
+ const _32n = BigInt(32);
17
+ const _u32_max = BigInt(0xffffffff);
18
+ const wh = Number((value >> _32n) & _u32_max);
19
+ const wl = Number(value & _u32_max);
20
+ const h = isLE ? 4 : 0;
21
+ const l = isLE ? 0 : 4;
22
+ view.setUint32(byteOffset + h, wh, isLE);
23
+ view.setUint32(byteOffset + l, wl, isLE);
24
+ }
25
+ /** Choice: a ? b : c */
26
+ function Chi(a, b, c) {
27
+ return (a & b) ^ (~a & c);
28
+ }
29
+ /** Majority function, true if any two inputs is true. */
30
+ function Maj(a, b, c) {
31
+ return (a & b) ^ (a & c) ^ (b & c);
32
+ }
33
+ /**
34
+ * Merkle-Damgard hash construction base class.
35
+ * Could be used to create MD5, RIPEMD, SHA1, SHA2.
36
+ */
37
+ class HashMD extends utils_ts_1.Hash {
38
+ constructor(blockLen, outputLen, padOffset, isLE) {
39
+ super();
40
+ this.finished = false;
41
+ this.length = 0;
42
+ this.pos = 0;
43
+ this.destroyed = false;
44
+ this.blockLen = blockLen;
45
+ this.outputLen = outputLen;
46
+ this.padOffset = padOffset;
47
+ this.isLE = isLE;
48
+ this.buffer = new Uint8Array(blockLen);
49
+ this.view = (0, utils_ts_1.createView)(this.buffer);
50
+ }
51
+ update(data) {
52
+ (0, utils_ts_1.aexists)(this);
53
+ data = (0, utils_ts_1.toBytes)(data);
54
+ (0, utils_ts_1.abytes)(data);
55
+ const { view, buffer, blockLen } = this;
56
+ const len = data.length;
57
+ for (let pos = 0; pos < len;) {
58
+ const take = Math.min(blockLen - this.pos, len - pos);
59
+ // Fast path: we have at least one block in input, cast it to view and process
60
+ if (take === blockLen) {
61
+ const dataView = (0, utils_ts_1.createView)(data);
62
+ for (; blockLen <= len - pos; pos += blockLen)
63
+ this.process(dataView, pos);
64
+ continue;
65
+ }
66
+ buffer.set(data.subarray(pos, pos + take), this.pos);
67
+ this.pos += take;
68
+ pos += take;
69
+ if (this.pos === blockLen) {
70
+ this.process(view, 0);
71
+ this.pos = 0;
72
+ }
73
+ }
74
+ this.length += data.length;
75
+ this.roundClean();
76
+ return this;
77
+ }
78
+ digestInto(out) {
79
+ (0, utils_ts_1.aexists)(this);
80
+ (0, utils_ts_1.aoutput)(out, this);
81
+ this.finished = true;
82
+ // Padding
83
+ // We can avoid allocation of buffer for padding completely if it
84
+ // was previously not allocated here. But it won't change performance.
85
+ const { buffer, view, blockLen, isLE } = this;
86
+ let { pos } = this;
87
+ // append the bit '1' to the message
88
+ buffer[pos++] = 0b10000000;
89
+ (0, utils_ts_1.clean)(this.buffer.subarray(pos));
90
+ // we have less than padOffset left in buffer, so we cannot put length in
91
+ // current block, need process it and pad again
92
+ if (this.padOffset > blockLen - pos) {
93
+ this.process(view, 0);
94
+ pos = 0;
95
+ }
96
+ // Pad until full block byte with zeros
97
+ for (let i = pos; i < blockLen; i++)
98
+ buffer[i] = 0;
99
+ // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that
100
+ // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.
101
+ // So we just write lowest 64 bits of that value.
102
+ setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);
103
+ this.process(view, 0);
104
+ const oview = (0, utils_ts_1.createView)(out);
105
+ const len = this.outputLen;
106
+ // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT
107
+ if (len % 4)
108
+ throw new Error('_sha2: outputLen should be aligned to 32bit');
109
+ const outLen = len / 4;
110
+ const state = this.get();
111
+ if (outLen > state.length)
112
+ throw new Error('_sha2: outputLen bigger than state');
113
+ for (let i = 0; i < outLen; i++)
114
+ oview.setUint32(4 * i, state[i], isLE);
115
+ }
116
+ digest() {
117
+ const { buffer, outputLen } = this;
118
+ this.digestInto(buffer);
119
+ const res = buffer.slice(0, outputLen);
120
+ this.destroy();
121
+ return res;
122
+ }
123
+ _cloneInto(to) {
124
+ to || (to = new this.constructor());
125
+ to.set(...this.get());
126
+ const { blockLen, buffer, length, finished, destroyed, pos } = this;
127
+ to.destroyed = destroyed;
128
+ to.finished = finished;
129
+ to.length = length;
130
+ to.pos = pos;
131
+ if (length % blockLen)
132
+ to.buffer.set(buffer);
133
+ return to;
134
+ }
135
+ clone() {
136
+ return this._cloneInto();
137
+ }
138
+ }
139
+ exports.HashMD = HashMD;
140
+ /**
141
+ * Initial SHA-2 state: fractional parts of square roots of first 16 primes 2..53.
142
+ * Check out `test/misc/sha2-gen-iv.js` for recomputation guide.
143
+ */
144
+ /** Initial SHA256 state. Bits 0..32 of frac part of sqrt of primes 2..19 */
145
+ exports.SHA256_IV = Uint32Array.from([
146
+ 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19,
147
+ ]);
148
+ /** Initial SHA224 state. Bits 32..64 of frac part of sqrt of primes 23..53 */
149
+ exports.SHA224_IV = Uint32Array.from([
150
+ 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4,
151
+ ]);
152
+ /** Initial SHA384 state. Bits 0..64 of frac part of sqrt of primes 23..53 */
153
+ exports.SHA384_IV = Uint32Array.from([
154
+ 0xcbbb9d5d, 0xc1059ed8, 0x629a292a, 0x367cd507, 0x9159015a, 0x3070dd17, 0x152fecd8, 0xf70e5939,
155
+ 0x67332667, 0xffc00b31, 0x8eb44a87, 0x68581511, 0xdb0c2e0d, 0x64f98fa7, 0x47b5481d, 0xbefa4fa4,
156
+ ]);
157
+ /** Initial SHA512 state. Bits 0..64 of frac part of sqrt of primes 2..19 */
158
+ exports.SHA512_IV = Uint32Array.from([
159
+ 0x6a09e667, 0xf3bcc908, 0xbb67ae85, 0x84caa73b, 0x3c6ef372, 0xfe94f82b, 0xa54ff53a, 0x5f1d36f1,
160
+ 0x510e527f, 0xade682d1, 0x9b05688c, 0x2b3e6c1f, 0x1f83d9ab, 0xfb41bd6b, 0x5be0cd19, 0x137e2179,
161
+ ]);
162
+ //# sourceMappingURL=_md.js.map
node_modules/@noble/hashes/_md.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"_md.js","sourceRoot":"","sources":["src/_md.ts"],"names":[],"mappings":";;;AAOA,oCAeC;AAGD,kBAEC;AAGD,kBAEC;AAhCD;;;GAGG;AACH,yCAAoG;AAEpG,gGAAgG;AAChG,SAAgB,YAAY,CAC1B,IAAc,EACd,UAAkB,EAClB,KAAa,EACb,IAAa;IAEb,IAAI,OAAO,IAAI,CAAC,YAAY,KAAK,UAAU;QAAE,OAAO,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAC/F,MAAM,IAAI,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;IACxB,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IACpC,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;IAC9C,MAAM,EAAE,GAAG,MAAM,CAAC,KAAK,GAAG,QAAQ,CAAC,CAAC;IACpC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACvB,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACvB,IAAI,CAAC,SAAS,CAAC,UAAU,GAAG,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;IACzC,IAAI,CAAC,SAAS,CAAC,UAAU,GAAG,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;AAC3C,CAAC;AAED,wBAAwB;AACxB,SAAgB,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS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AEH,8EAA8E;AACjE,QAAA,SAAS,GAAgC,WAAW,CAAC,IAAI,CAAC;IACrE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;CAC/F,CAAC,CAAC;AAEH,6EAA6E;AAChE,QAAA,SAAS,GAAgC,WAAW,CAAC,IAAI,CAAC;IACrE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9F,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;CAC/F,CAAC,CAAC;AAEH,4EAA4E;AAC/D,QAAA,SAAS,GAAgC,WAAW,CAAC,IAAI,CAAC;IACrE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9F,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;CAC/F,CAAC,CAAC"}
node_modules/@noble/hashes/_u64.d.ts ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ declare function fromBig(n: bigint, le?: boolean): {
2
+ h: number;
3
+ l: number;
4
+ };
5
+ declare function split(lst: bigint[], le?: boolean): Uint32Array[];
6
+ declare const toBig: (h: number, l: number) => bigint;
7
+ declare const shrSH: (h: number, _l: number, s: number) => number;
8
+ declare const shrSL: (h: number, l: number, s: number) => number;
9
+ declare const rotrSH: (h: number, l: number, s: number) => number;
10
+ declare const rotrSL: (h: number, l: number, s: number) => number;
11
+ declare const rotrBH: (h: number, l: number, s: number) => number;
12
+ declare const rotrBL: (h: number, l: number, s: number) => number;
13
+ declare const rotr32H: (_h: number, l: number) => number;
14
+ declare const rotr32L: (h: number, _l: number) => number;
15
+ declare const rotlSH: (h: number, l: number, s: number) => number;
16
+ declare const rotlSL: (h: number, l: number, s: number) => number;
17
+ declare const rotlBH: (h: number, l: number, s: number) => number;
18
+ declare const rotlBL: (h: number, l: number, s: number) => number;
19
+ declare function add(Ah: number, Al: number, Bh: number, Bl: number): {
20
+ h: number;
21
+ l: number;
22
+ };
23
+ declare const add3L: (Al: number, Bl: number, Cl: number) => number;
24
+ declare const add3H: (low: number, Ah: number, Bh: number, Ch: number) => number;
25
+ declare const add4L: (Al: number, Bl: number, Cl: number, Dl: number) => number;
26
+ declare const add4H: (low: number, Ah: number, Bh: number, Ch: number, Dh: number) => number;
27
+ declare const add5L: (Al: number, Bl: number, Cl: number, Dl: number, El: number) => number;
28
+ declare const add5H: (low: number, Ah: number, Bh: number, Ch: number, Dh: number, Eh: number) => number;
29
+ export { add, add3H, add3L, add4H, add4L, add5H, add5L, fromBig, rotlBH, rotlBL, rotlSH, rotlSL, rotr32H, rotr32L, rotrBH, rotrBL, rotrSH, rotrSL, shrSH, shrSL, split, toBig };
30
+ declare const u64: {
31
+ fromBig: typeof fromBig;
32
+ split: typeof split;
33
+ toBig: (h: number, l: number) => bigint;
34
+ shrSH: (h: number, _l: number, s: number) => number;
35
+ shrSL: (h: number, l: number, s: number) => number;
36
+ rotrSH: (h: number, l: number, s: number) => number;
37
+ rotrSL: (h: number, l: number, s: number) => number;
38
+ rotrBH: (h: number, l: number, s: number) => number;
39
+ rotrBL: (h: number, l: number, s: number) => number;
40
+ rotr32H: (_h: number, l: number) => number;
41
+ rotr32L: (h: number, _l: number) => number;
42
+ rotlSH: (h: number, l: number, s: number) => number;
43
+ rotlSL: (h: number, l: number, s: number) => number;
44
+ rotlBH: (h: number, l: number, s: number) => number;
45
+ rotlBL: (h: number, l: number, s: number) => number;
46
+ add: typeof add;
47
+ add3L: (Al: number, Bl: number, Cl: number) => number;
48
+ add3H: (low: number, Ah: number, Bh: number, Ch: number) => number;
49
+ add4L: (Al: number, Bl: number, Cl: number, Dl: number) => number;
50
+ add4H: (low: number, Ah: number, Bh: number, Ch: number, Dh: number) => number;
51
+ add5H: (low: number, Ah: number, Bh: number, Ch: number, Dh: number, Eh: number) => number;
52
+ add5L: (Al: number, Bl: number, Cl: number, Dl: number, El: number) => number;
53
+ };
54
+ export default u64;
55
+ //# sourceMappingURL=_u64.d.ts.map
node_modules/@noble/hashes/_u64.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"_u64.d.ts","sourceRoot":"","sources":["src/_u64.ts"],"names":[],"mappings":"AAQA,iBAAS,OAAO,CACd,CAAC,EAAE,MAAM,EACT,EAAE,UAAQ,GACT;IACD,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAGA;AAED,iBAAS,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,UAAQ,GAAG,WAAW,EAAE,CASvD;AAED,QAAA,MAAM,KAAK,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,MAAqD,CAAC;AAE5F,QAAA,MAAM,KAAK,GAAI,GAAG,MAAM,EAAE,IAAI,MAAM,EAAE,GAAG,MAAM,KAAG,MAAiB,CAAC;AACpE,QAAA,MAAM,KAAK,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,MAAqC,CAAC;AAEvF,QAAA,MAAM,MAAM,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,MAAqC,CAAC;AACxF,QAAA,MAAM,MAAM,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,MAAqC,CAAC;AAExF,QAAA,MAAM,MAAM,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,MAA4C,CAA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