forked from bitauth/libauth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
208 lines (208 loc) · 9.97 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
{
"name": "@bitauth/libauth",
"version": "1.19.1",
"description": "ultra-lightweight library for Bitcoin, Bitcoin Cash, and Bitauth",
"main": "build/main/index.js",
"typings": "build/module/index.d.ts",
"module": "build/module/index.js",
"repository": "https://github.com/bitauth/libauth",
"homepage": "https://libauth.org/",
"license": "MIT",
"keywords": [
"authentication",
"bitauth",
"Bitcoin Cash",
"Bitcoin",
"cryptocurrency",
"wasm",
"crypto",
"sha256",
"ripemd160",
"secp256k1",
"sha1",
"sha512",
"HMAC",
"wallet",
"blockchain",
"typescript",
"webassembly",
"BCH",
"BTC"
],
"scripts": {
"info": "npm-scripts-info",
"compile:secp256k1": "docker build -f wasm/docker/secp256k1.Dockerfile . -t libauth-secp256k1 && docker run -it --mount type=bind,src=$(pwd)/src/lib,dst=/libauth/out,consistency=delegated libauth-secp256k1",
"compile:hashes": "docker build -f wasm/docker/hashes.Dockerfile . -t libauth-hashes && docker run -it --mount type=bind,src=$(pwd)/src/lib,dst=/libauth/out,consistency=delegated libauth-hashes",
"build": "run-s clean && run-p build:*",
"build:main": "tsc -p tsconfig.json",
"build:module": "tsc -p config/tsconfig.module.json",
"build:wasm": "run-p copy:wasm:secp256k1 copy:wasm:sha1 copy:wasm:sha256 copy:wasm:sha512 copy:wasm:ripemd160",
"copy:wasm:secp256k1": "cpy src/lib/bin/secp256k1/secp256k1.wasm build/main/lib/bin/secp256k1 && cpy src/lib/bin/secp256k1/secp256k1.wasm build/module/lib/bin/secp256k1",
"copy:wasm:sha1": "cpy src/lib/bin/sha1/sha1.wasm build/main/lib/bin/sha1 && cpy src/lib/bin/sha1/sha1.wasm build/module/lib/bin/sha1",
"copy:wasm:sha256": "cpy src/lib/bin/sha256/sha256.wasm build/main/lib/bin/sha256 && cpy src/lib/bin/sha256/sha256.wasm build/module/lib/bin/sha256",
"copy:wasm:sha512": "cpy src/lib/bin/sha512/sha512.wasm build/main/lib/bin/sha512 && cpy src/lib/bin/sha512/sha512.wasm build/module/lib/bin/sha512",
"copy:wasm:ripemd160": "cpy src/lib/bin/ripemd160/ripemd160.wasm build/main/lib/bin/ripemd160 && cpy src/lib/bin/ripemd160/ripemd160.wasm build/module/lib/bin/ripemd160",
"compile:debug:secp256k1": "docker run -it libauth-secp256k1 bash",
"compile:debug:hashes": "docker run -it libauth-hashes bash",
"fix": "run-s fix:*",
"fix:prettier": "prettier \"src/**/*.ts\" --write",
"fix:lint": "eslint . --ext .ts --fix",
"test": "run-s build test:*",
"test:deps": "node -e \"if(Object.keys(require('./package.json').dependencies).length > 0) { console.error('Dependencies are not allowed.'); process.exit(1); }\"",
"test:lint": "eslint . --ext .ts",
"test:prettier": "prettier \"src/**/*.ts\" --list-different",
"test:spelling": "cspell \"{README.md,.github/*.md,src/**/*.ts}\"",
"test:unit": "nyc --silent ava",
"test:unit:fast": "nyc --silent ava --match='!*[fast-check]*' --match='!*[crypto]*' --match='!*[script_tests]*' --match='!*[signing-serialization tests]*' --match='!*[BCH compiler]*' --match='!*[BCH VM]*'",
"test:unit:fast-check": "nyc --silent ava --match='*[fast-check]*",
"test:unit:script_tests": "nyc --silent ava --match='*[script_tests]*' --verbose --serial",
"bench": "run-s build bench:browser-deps bench:test",
"bench:test": "ava --config .ava.bench.config.js --serial --timeout=2m",
"bench:browser-deps": "browserify node_modules/chuhai/index.js --standalone chuhai -o build/bench/chuhai.js && browserify node_modules/hash.js/lib/hash.js --standalone hash -o build/bench/hash.js",
"watch": "run-s clean build:main build:wasm && yarn build:main -- -w",
"watch:module": "run-s clean build:main build:wasm && yarn build:module -- -w",
"watch:single": "echo 'Usage: yarn watch:single --match=\"*pattern*\"' && ava -v --watch",
"watch:test": "yarn test:unit:fast -- --watch -v",
"watch:test-slow": "yarn test:unit -- --watch -v",
"cov": "run-s build test:unit cov:html cov:lcov && open-cli coverage/index.html",
"cov:html": "nyc report --reporter=html",
"cov:lcov": "nyc report --reporter=lcov",
"cov:send": "run-s cov:lcov && codecov",
"cov:check": "nyc report && nyc check-coverage --lines 85 --functions 80 --branches 65",
"doc": "run-s doc:html && open-cli build/docs/index.html",
"doc:logo": "cpy assets/libauth.svg build/docs",
"doc:cname": "node -e \"console.log('libauth.org')\" > build/docs/CNAME",
"doc:html": "typedoc src/index.ts --target ES6 --mode file --excludeNotExported --out build/docs",
"doc:json": "typedoc src/index.ts --target ES6 --mode file --excludeNotExported --json build/docs/typedoc.json",
"doc:next": "run-s build doc:extract doc:generate",
"doc:extract": "api-extractor run --local --typescript-compiler-folder node_modules/typescript",
"doc:generate": "api-documenter markdown -i temp -o docs/markdown",
"doc:check-api": "api-extractor run --typescript-compiler-folder node_modules/typescript",
"doc:publish": "gh-pages -m \"[ci skip] Updates\" -d build/docs",
"doc:generate-json-schema": "ts-json-schema-generator --path 'src/lib/template/template-types.ts' --type 'AuthenticationTemplate' > src/lib/template/bitauth-authentication-template.schema.json",
"doc:generate-templates": "node 'build/main/lib/transaction/fixtures/generate-templates.spec.helper.js' 'p2pkh' > src/lib/transaction/fixtures/templates/p2pkh.json && node 'build/main/lib/transaction/fixtures/generate-templates.spec.helper.js' '2-of-3' > src/lib/transaction/fixtures/templates/2-of-3.json && node 'build/main/lib/transaction/fixtures/generate-templates.spec.helper.js' '2-of-2-recoverable' > src/lib/transaction/fixtures/templates/2-of-2-recoverable.json && node 'build/main/lib/transaction/fixtures/generate-templates.spec.helper.js' '1-of-8-tree' > src/lib/transaction/fixtures/templates/1-of-8-tree.json && node 'build/main/lib/transaction/fixtures/generate-templates.spec.helper.js' 'sig-of-sig' > src/lib/transaction/fixtures/templates/sig-of-sig.json && node 'build/main/lib/transaction/fixtures/generate-templates.spec.helper.js' 'cash-channels' > src/lib/transaction/fixtures/templates/cash-channels.json && prettier 'src/lib/transaction/fixtures/templates/*.json' --write",
"version": "standard-version",
"reset": "git clean -dfx && git reset --hard && yarn",
"clean": "trash build test",
"prepare-release": "run-s reset test cov:check doc:html doc:logo doc:cname version doc:publish"
},
"scripts-info": {
"info": "Display information about the package scripts",
"build": "Clean and rebuild the project",
"fix": "Try to automatically fix any linting problems",
"test": "Lint and unit test the project",
"bench": "Build the project and run the benchmarks",
"watch": "Watch and rebuild the project on save, then rerun relevant tests",
"watch:with-crypto": "Like 'watch', but also including tests for the crypto APIs",
"cov": "Rebuild, run tests, then create and open the coverage report",
"doc": "Generate HTML API documentation and open it in a browser",
"doc:json": "Generate API documentation in typedoc JSON format",
"compile": "Compile the WebAssembly binaries and integrate them into src",
"compile:debug:secp256k1": "Run the compile:secp256k1 Docker container in interactive mode",
"compile:inspect:secp256k1": "Format the compile:secp256k1 output for easier review",
"version": "Bump package.json version, update CHANGELOG.md, tag release",
"reset": "Delete all untracked files and reset the repo to the last commit",
"prepare-release": "One-step: clean, build, test, publish docs, and prep a release"
},
"engines": {
"node": ">=8.9"
},
"dependencies": {},
"devDependencies": {
"@ava/typescript": "^1.1.1",
"@bitjson/npm-scripts-info": "^1.0.0",
"@istanbuljs/nyc-config-typescript": "^1.0.1",
"@microsoft/api-documenter": "^7.8.22",
"@microsoft/api-extractor": "^7.9.3",
"@rollup/plugin-alias": "^3.1.1",
"@rollup/plugin-commonjs": "^14.0.0",
"@rollup/plugin-node-resolve": "^8.4.0",
"@types/browserify": "^12.0.33",
"@types/elliptic": "^6.4.12",
"@types/express": "^4.17.7",
"@types/puppeteer": "^3.0.1",
"@typescript-eslint/parser": "^3.8.0",
"asmcrypto.js": "^2.3.2",
"ava": "^3.11.1",
"ava-fast-check": "^2.0.0",
"bcrypto": "^5.2.0",
"bitcore-lib-cash": "^8.22.0",
"browserify": "16.5.1",
"chuhai": "^1.2.0",
"codecov": "^3.7.2",
"cpy-cli": "^3.1.1",
"cspell": "^4.0.63",
"cz-conventional-changelog": "^3.2.0",
"elliptic": "^6.5.3",
"eslint": "^7.6.0",
"eslint-config-bitauth": "^2.0.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-functional": "^3.0.1",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-tsdoc": "^0.2.6",
"express": "^4.17.1",
"fast-check": "^2.1.0",
"gh-pages": "^3.1.0",
"hash.js": "^1.1.5",
"npm-run-all": "^4.1.5",
"nyc": "^15.1.0",
"open-cli": "^6.0.1",
"prettier": "^2.0.5",
"puppeteer": "^5.2.1",
"rollup": "^2.23.1",
"secp256k1": "^4.0.2",
"source-map-support": "^0.5.19",
"standard-version": "^8.0.2",
"trash-cli": "^3.1.0",
"ts-json-schema-generator": "^0.70.2",
"ts-node": "^8.10.2",
"typedoc": "^0.17.8",
"typescript": "^3.9.7"
},
"files": [
"build/main",
"build/module",
"!**/*.spec.*",
"!**/*.json",
"CHANGELOG.md",
"LICENSE",
"README.md",
"SECURITY.md"
],
"ava": {
"failFast": true,
"timeout": "20s",
"typescript": {
"rewritePaths": {
"src/": "build/main/"
}
},
"files": [
"!build/module/**"
]
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
},
"greenkeeper": {
"ignore": [
"@types/node"
]
},
"prettier": {
"singleQuote": true
},
"nyc": {
"extends": "@istanbuljs/nyc-config-typescript",
"exclude": [
"**/*.bench.js",
"**/*.spec.js",
"**/*.spec.helper.js",
"**/*.spec.debug.js"
]
},
"sideEffects": false
}