-
Notifications
You must be signed in to change notification settings - Fork 46
/
package.json
148 lines (148 loc) · 6.79 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
{
"name": "boltz-backend",
"version": "3.8.0",
"description": "Backend of Boltz",
"main": "dist/lib/Boltz.js",
"scripts": {
"postinstall": "node parseGitCommit.js",
"proto": "node protos.js",
"compile": "npm run compile:rust && npm run compile:typescript",
"compile:release": "npm run compile:rust:release && npm run compile:typescript",
"compile:typescript": "node parseGitCommit.js && npm run swagger && tsc && cross-os postcompile",
"compile:rust": "cd boltzr && cargo build",
"compile:rust:release": "cd boltzr && cargo build --release",
"swagger": "node swagger.js",
"swagger:ui": "docker run --rm -p 8082:8080 -e SWAGGER_JSON=/boltz-backend/swagger-spec.json -v .:/boltz-backend swaggerapi/swagger-ui",
"compile:watch": "tsc -w",
"start": "node bin/boltzd",
"dev": "npm run compile && npm run start",
"lint": "eslint --max-warnings 0 .",
"prettier": "npx prettier docs '{lib,test}/**/*.ts' bin",
"prettier:write": "npm run prettier -- --write",
"prettier:check": "npm run prettier -- --check",
"db:start": "docker run --name boltz-db --rm -v ~/.boltz/db:/var/lib/postgresql/data -e PGDATA=/var/lib/postgresql/data/pgdata -e POSTGRES_DB=boltz -e POSTGRES_USER=boltz -e POSTGRES_PASSWORD=boltz -d -p 5432:5432 postgres:14-alpine && npm run db:setup",
"db:setup": "docker exec boltz-db sh -c \"sleep 5 && psql -U boltz -tc \\\"SELECT 1 FROM pg_database WHERE datname = 'boltz_test'\\\" | grep -q 1 || psql -U boltz -c \\\"CREATE DATABASE boltz_test\\\"\"",
"db:stop": "docker stop boltz-db",
"docker:build": "docker build . -t boltz/backend:latest -f ./docker/boltz/Dockerfile",
"docker:regtest": "./docker/regtest/startRegtest.sh",
"docker:solidity": "docker run -d --name anvil -p 8545:8545 ghcr.io/foundry-rs/foundry:nightly-95015894110734539c53ffad97cd64ca116fce5e \"anvil --host 0.0.0.0 --chain-id 33\"",
"docker:solidity:deploy": "cd node_modules/boltz-core && cp -R ../@openzeppelin node_modules/ && npm run deploy:solidity",
"docker:solidity:fund": "./bin/boltz-ethereum send 100000000000 && ./bin/boltz-ethereum send 1000000000 --token",
"docker:start": "npm run docker:regtest && npm run docker:solidity && npm run docker:solidity:deploy && npm run docker:solidity:fund",
"docker:python:install": "docker exec regtest bash /root/poetry-install.sh",
"docker:cln:hold": "cd hold && cargo build && cp target/debug/hold ../docker/regtest/data/cln/plugins && docker exec regtest lightning-cli plugin start /root/.lightning/plugins/hold && docker exec regtest chmod -R 777 /root/.lightning/regtest/hold",
"docker:cln:mpay": "docker exec regtest lightning-cli plugin start /root/mpay.sh",
"docker:cln:plugins": "npm run docker:cln:hold && npm run docker:cln:mpay",
"docker:stop": "docker kill regtest && docker rm regtest && docker kill anvil && docker rm anvil",
"test": "npm run test:unit && npm run docker:start && npm run test:int && npm run docker:stop",
"test:nodocker": "npm run test:unit && npm run test:int",
"test:unit": "GRPC_NODE_VERBOSITY=NONE jest test/unit",
"test:unit:coverage": "jest test/unit --coverage",
"test:int": "jest test/integration --runInBand --testTimeout 10000",
"changelog": "git-cliff -o CHANGELOG.md",
"prepublishOnly": "npm run compile && rm -f dist/package.json",
"python:install": "cd tools && poetry install",
"python:proto": "cd tools && poetry run python -m grpc_tools.protoc -I plugins/mpay/protos --python_out=plugins/mpay/protos --pyi_out=plugins/mpay/protos --grpc_python_out=plugins/mpay/protos plugins/mpay/protos/mpay.proto",
"python:lint": "cd tools && poetry run ruff check . ../docker",
"python:format": "cd tools && poetry run ruff format . ../docker",
"python:test": "cd tools && poetry run pytest"
},
"bin": {
"boltzd": "./bin/boltzd",
"boltz-cli": "./bin/boltz-cli"
},
"cross-os": {
"postcompile": {
"linux": "cp package.json dist && cp -R lib/api/static dist/lib/api/static && cp swagger-spec.json dist/lib/api/static && rsync -am --include '*/' --include '*.js*' --exclude '*' lib/proto/ dist/lib/proto",
"darwin": "cp package.json dist && cp -R lib/api/static dist/lib/api/static && cp swagger-spec.json dist/lib/api/static && cp -R lib/proto/ dist/lib/proto/"
}
},
"license": "AGPL-3.0",
"repository": {
"type": "git",
"url": "git+https://github.com/BoltzExchange/boltz-backend"
},
"files": [
"bin",
"LICENSE",
"README.md",
"dist/**/!(tsconfig.tsbuildinfo)"
],
"engines": {
"node": ">=18.18.0"
},
"dependencies": {
"@grpc/grpc-js": "^1.12.2",
"@iarna/toml": "^2.2.5",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/exporter-trace-otlp-grpc": "^0.54.0",
"@opentelemetry/instrumentation-express": "^0.44.0",
"@opentelemetry/instrumentation-grpc": "^0.54.0",
"@opentelemetry/instrumentation-http": "^0.54.0",
"@opentelemetry/instrumentation-pg": "^0.47.0",
"@opentelemetry/instrumentation-winston": "^0.41.0",
"@opentelemetry/sdk-node": "^0.54.0",
"@pyroscope/nodejs": "^0.4.1",
"@vulpemventures/secp256k1-zkp": "^3.2.1",
"async-lock": "^1.4.1",
"axios": "^1.7.7",
"bip32": "^4.0.0",
"bip39": "^3.1.0",
"bitcoinjs-lib": "^6.1.6",
"bolt11": "^1.4.1",
"boltz-core": "^2.1.3",
"colors": "^1.4.0",
"cors": "^2.8.5",
"csv-parse": "^5.5.6",
"ecpair": "^2.1.0",
"ethers": "^6.13.4",
"express": "^4.21.1",
"google-protobuf": "^3.21.4",
"ip-address": "^10.0.1",
"liquidjs-lib": "^6.0.2-liquid.36",
"node-forge": "^1.3.1",
"node-schedule": "^2.1.1",
"otplib": "^12.0.1",
"pg": "^8.13.1",
"pg-hstore": "^2.3.4",
"prom-client": "^15.1.3",
"sequelize": "^6.37.5",
"slip77": "^0.2.0",
"tiny-secp256k1": "^2.2.3",
"winston": "^3.16.0",
"winston-loki": "^6.1.3",
"yargs": "^17.7.2",
"zeromq": "^6.1.1"
},
"devDependencies": {
"@boltz/bitcoin-ops": "^2.0.0",
"@eslint/js": "^9.14.0",
"@openzeppelin/contracts": "^5.1.0",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/async-lock": "^1.4.2",
"@types/cors": "^2.8.17",
"@types/express": "^5.0.0",
"@types/jest": "^29.5.14",
"@types/node-forge": "^1.3.11",
"@types/node-schedule": "^2.1.7",
"@types/pg": "^8.11.10",
"@types/yargs": "^17.0.33",
"cross-os": "^1.5.0",
"eslint": "^9.14.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^28.8.3",
"eslint-plugin-n": "^17.12.0",
"eslint-plugin-node": "^11.1.0",
"git-cliff": "^2.6.1",
"globals": "^15.11.0",
"grpc_tools_node_protoc_ts": "^5.3.3",
"grpc-tools": "^1.12.4",
"jest": "^29.7.0",
"prettier": "^3.3.3",
"sqlite3": "^5.1.7",
"swagger-jsdoc": "^6.2.8",
"ts-jest": "^29.2.5",
"typescript": "^5.6.3",
"typescript-eslint": "^8.12.2"
}
}