Skip to content
Merged
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

npm run check-obfuscation
npm run check:obfuscation
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

npm run husky-checks
npm run husky:checks
6,004 changes: 3,899 additions & 2,105 deletions package-lock.json

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,18 @@
"packages/*"
],
"scripts": {
"build": "turbo run build",
"build:node": "docker build -t bitcoin-computer-node .",
"check:obfuscation": "./scripts/check-obfuscation.sh",
"clean": "find . -name 'node_modules' -type d -prune -exec rm -rf {} \\;",
"check-obfuscation": "./scripts/check-obfuscation.sh",
"husky-checks": "./scripts/husky-checks.sh",
"prepare": "husky install",
"prepublishOnly": "./scripts/check-obfuscation.sh && npm run test",
"build-all-packages": "turbo run build --concurrency=1",
"types": "npm run types --if-present --workspaces",
"format": "npm run format --if-present --workspaces",
"husky:checks": "./scripts/husky-checks.sh",
"lint": "npm run lint --if-present --workspaces",
"lint:fix": "npm run lint --if-present --workspaces -- --fix",
"test": "npm run test --if-present --workspaces"
"prepare": "husky install",
"prepublishOnly": "./scripts/check-obfuscation.sh && npm run test",
"test": "npm run test --if-present --workspaces",
"types": "npm run types --if-present --workspaces"
},
"dependencies": {
"@endo/static-module-record": "^1.0.4",
Expand Down
8 changes: 4 additions & 4 deletions packages/TBC20/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
"build:turbo": "turbo run build",
"build:watch": "tsc -w -p tsconfig.release.json",
"clean": "rimraf coverage build tmp",
"clean-logs": "rm -f *.log 2> /dev/null",
"clean:logs": "rm -f *.log 2> /dev/null",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,scss,md}\"",
"lint": "eslint src test --ext .ts,.tsx",
"lint:fix": "eslint src test --ext .ts,.tsx --fix",
"prebuild": "npm run lint",
"start": "node build/src/main.js",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,scss,md}\"",
"types": "tsc --noEmit",
"test": "mocha --config .mocharc.json",
"test-and-show": "npm run test 2>&1 | tee TBC20-test.log && open TBC20-test.log"
"test:show": "npm run test 2>&1 | tee TBC20-test.log && open TBC20-test.log",
"types": "tsc --noEmit"
},
"author": "Clemens Ley <clemens@bitcoincomputer.io>",
"license": "Apache-2.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/TBC721/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
"build:turbo": "turbo run build",
"build:watch": "tsc -w -p tsconfig.release.json",
"clean": "rimraf coverage build tmp",
"clean-logs": "rm -f *.log 2> /dev/null",
"clean:logs": "rm -f *.log 2> /dev/null",
"deploy": "npx tsx src/deploy.ts",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,scss,md}\"",
"lint": "eslint --fix . --ext .ts,.tsx --ignore-pattern build/",
"prebuild": "npm run lint",
"start": "node build/src/main.js",
"test": "mocha --config .mocharc.json",
"test-and-show": "npm run test 2>&1 | tee tbc721-test.log && open tbc721-test.log",
"types": "tsc --noEmit",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,scss,md}\""
"test:show": "npm run test 2>&1 | tee tbc721-test.log && open tbc721-test.log",
"types": "tsc --noEmit"
},
"files": [
"build"
Expand Down
10 changes: 5 additions & 5 deletions packages/chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
"version": "0.23.0-beta.0",
"type": "module",
"scripts": {
"dev": "vite",
"start": "vite",
"build": "tsc -b && vite build",
"build:turbo": "turbo run build",
"deploy": "node --loader ts-node/esm scripts/deploy.ts",
"dev": "vite",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,scss,md}\"",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"preview": "vite preview",
"start": "vite",
"test": "vitest run",
"test:dev": "vitest",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,scss,md}\"",
"deploy": "node --loader ts-node/esm scripts/deploy.ts"
"test:dev": "vitest"
},
"dependencies": {
"@bitcoin-computer/components": "^0.23.0-beta.0",
Expand Down
14 changes: 7 additions & 7 deletions packages/chess-app-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"type": "module",
"private": true,
"scripts": {
"start:dev": "nodemon --exec npm run start -- --ext ts",
"start": "node --loader ts-node/esm.mjs -r tsconfig-paths/register src/app.ts",
"build:docker": "docker build -t chess-app-server .",
"create:migration": "migrate create",
"lint": "tslint -p tsconfig.json --fix",
"migrate": "migrate up",
"rollback": "migrate down",
"create-migration": "migrate create",
"lint": "tslint -p tsconfig.json --fix",
"start-postgres": "docker-compose up postgres",
"up": "docker-compose up",
"build:docker": "docker build -t chess-app-server ."
"start": "node --loader ts-node/esm.mjs -r tsconfig-paths/register src/app.ts",
"start:dev": "nodemon --exec npm run start -- --ext ts",
"start:postgres": "docker-compose up postgres",
"up": "docker-compose up"
},
"dependencies": {
"@types/cors": "^2.8.17",
Expand Down
12 changes: 6 additions & 6 deletions packages/chess-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
"version": "0.23.0-beta.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"build:contract": "tsc --project tsconfig.build.json && mv ./build-contract/chess-module.js ./src/contracts/chess.mjs && rm -rf build-contract",
"deploy": "npm run build:contract && node --loader ts-node/esm ./scripts/deploy.ts",
"dev": "vite",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,scss,md}\"",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"preview": "vite preview",
"test": "vitest run",
"start": "vite",
"test:dev": "vitest",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,scss,md}\"",
"deploy": "npm run build:contract && node --loader ts-node/esm ./scripts/deploy.ts",
"build:contract": "tsc --project tsconfig.build.json && mv ./build-contract/chess-module.js ./src/contracts/chess.mjs && rm -rf build-contract"
"test": "vitest run",
"test:dev": "vitest"
},
"dependencies": {
"@bitcoin-computer/components": "^0.23.0-beta.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"main": "built/index.js",
"types": "built/index.d.ts",
"scripts": {
"tsc-compile": "rm -rf built/* && tsc",
"build": "npm run tsc-compile",
"build": "npm run tsc:compile",
"build:turbo": "turbo run build",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,scss,md}\"",
"lint": "eslint --fix . --ext .ts,.tsx --ignore-pattern built/",
"lint:fix": "eslint src --fix",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,scss,md}\"",
"tsc:compile": "rm -rf built/* && tsc",
"types": "tsc --noEmit"
},
"author": "",
Expand Down
12 changes: 8 additions & 4 deletions packages/docs/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ In regtest mode, you can fund a wallet with the following commands.

```sh
# Fund Litecoin regtest wallet
npm run fund-ltc -- <address_1> ... <address_n>
npm run fund:ltc -- <address_1> ... <address_n>

# Fund Bitcoin regtest wallet
npm run fund-btc -- <address_1> ... <address_n>
npm run fund:btc -- <address_1> ... <address_n>
```

</font>
Expand Down Expand Up @@ -175,6 +175,8 @@ POSTGRES_PASSWORD='bcn'
POSTGRES_DB='bcn'
POSTGRES_HOST='db'
POSTGRES_PORT='5432'
POSTGRES_MAX_CONNECTIONS='20'
POSTGRES_IDLE_TIMEOUT_MILLIS='3000'

# Bitcoin Node Settings
BITCOIN_IMAGE='litecoinproject/litecoin-core:0.21'
Expand All @@ -200,6 +202,8 @@ BCN_PORT='1031'
BCN_ENV=dev
BCN_ZMQ_URL='tcp://node:28332'
BCN_ZMQ_PORT='28332'
# Height of the block at which the zmq connection should start
BCN_ZMQ_ACTIVATION_HEIGHT=1

# Url of the Bitcoin Computer Node, defaults to localhost
BCN_URL='http://127.0.0.1:1031'
Expand Down Expand Up @@ -246,7 +250,7 @@ BCN_OFFCHAIN_PROTOCOL=

</font>

### Configure Parallelism
<!-- ### Configure Parallelism

By default the synchronization runs in parallel and uses all cores of your machine. You can use the `-cpus` flag to limit the number of cores used.

Expand All @@ -268,7 +272,7 @@ The following table shows the times and costs for syncing to a Litecoin node on
| 4 | 16GB | 10h 30m | $110 |
| 8 | 32GB | 7h 15m | $240 |
| 16 | 32GB | 4h 45m | $440 |

-->
## Versioning

If you run your own node, make sure to use the same versions of Lib and Node.
Expand Down
8 changes: 4 additions & 4 deletions packages/explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
"version": "0.23.0-beta.0",
"type": "module",
"scripts": {
"dev": "vite",
"start": "vite",
"build": "tsc -b && vite build",
"build:turbo": "turbo run build",
"dev": "vite",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,scss,md}\"",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"preview": "vite preview",
"test:dev": "vitest",
"start": "vite",
"test": "vitest run",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,scss,md}\""
"test:dev": "vitest"
},
"dependencies": {
"@bitcoin-computer/components": "^0.23.0-beta.0",
Expand Down
5 changes: 3 additions & 2 deletions packages/lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@
"type": "module",
"runkitExampleFilename": "example/bitcoin-computer-lib.js",
"scripts": {
"clean-logs": "rm -f *.log 2> /dev/null",
"clean": "npm run clean:logs",
"clean:logs": "rm -f *.log 2> /dev/null",
"prepublishOnly": "../../scripts/check-obfuscation.sh",
"publish-lib": "npm publish",
"test": "mocha --require ts-node/register 'test/**/*.ts'",
"test-and-show": "npm run test 2>&1 | tee lib-test.log && open lib-test.log"
"test:show": "npm run test 2>&1 | tee lib-test.log && open lib-test.log"
},
"dependencies": {
"@babel/parser": "^7.23.9",
Expand Down
14 changes: 7 additions & 7 deletions packages/nakamotojs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,30 @@
"scripts": {
"audit": "better-npm-audit audit -l high",
"build": "npm run clean && tsc -p ./tsconfig.json && npm run formatjs",
"build:turbo": "turbo run build",
"build:tests": "npm run clean:jstests && tsc -p ./test/tsconfig.json",
"build:turbo": "turbo run build",
"clean": "rimraf src",
"clean:jstests": "rimraf 'test/**/!(ts-node-register)*.js'",
"coverage-report": "npm run build && npm run nobuild:coverage-report",
"coverage-html": "npm run build && npm run nobuild:coverage-html",
"coverage": "npm run build && npm run nobuild:coverage",
"coverage:html": "npm run build && npm run nobuild:coverage:html",
"coverage:report": "npm run build && npm run nobuild:coverage:report",
"format": "npm run prettier -- --write",
"formatjs": "npm run prettierjs -- --write",
"format:ci": "npm run prettier -- --check && npm run prettierjs -- --check",
"formatjs": "npm run prettierjs -- --write",
"gitdiff:ci": "npm run build && git diff --exit-code",
"integration": "npm run build && npm run nobuild:integration",
"lint": "eslint ts_src/** src/**/*.js",
"lint:tests": "eslint test/**/*.spec.ts",
"mocha:ts": "mocha --recursive --require test/ts-node-register",
"nobuild:coverage-report": "nyc report --reporter=lcov",
"nobuild:coverage-html": "nyc report --reporter=html",
"nobuild:coverage": "npm run build:tests && nyc --check-coverage --branches 80 --functions 80 --lines 80 mocha && npm run clean:jstests",
"nobuild:coverage:html": "nyc report --reporter=html",
"nobuild:coverage:report": "nyc report --reporter=lcov",
"nobuild:integration": "npm run mocha:ts -- --timeout 50000 'test/integration/*.ts'",
"nobuild:unit": "npm run mocha:ts -- 'test/*.ts'",
"prettier": "prettier \"ts_src/**/*.ts\" \"test/**/*.ts\" --ignore-path ./.prettierignore --write",
"prettierjs": "prettier \"src/**/*.js\" --ignore-path ./.prettierignore",
"test": "npm run build && npm run format:ci && npm run lint && npm run nobuild:coverage",
"test-unit-and-show": "npm run test 2>&1 | tee nakamotojs-test.log && open nakamotojs-test.log",
"test:unit:show": "npm run test 2>&1 | tee nakamotojs-test.log && open nakamotojs-test.log",
"unit": "npm run build && npm run nobuild:unit"
},
"repository": {
Expand Down
10 changes: 5 additions & 5 deletions packages/nft/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
"version": "0.23.0-beta.0",
"type": "module",
"scripts": {
"dev": "vite",
"start": "vite",
"build": "tsc -b && vite build",
"build:turbo": "turbo run build",
"deploy": "node --experimental-modules scripts/deploy.mjs",
"dev": "vite",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,scss,md}\"",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"preview": "vite preview",
"start": "vite",
"test": "vitest run",
"test:dev": "vitest",
"deploy": "node --experimental-modules scripts/deploy.mjs",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,scss,md}\""
"test:dev": "vitest"
},
"dependencies": {
"@bitcoin-computer/TBC721": "^0.23.0-beta.0",
Expand Down
8 changes: 6 additions & 2 deletions packages/node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ In regtest mode, you can fund a wallet with the following commands.

```sh
# Fund Litecoin regtest wallet
npm run fund-ltc -- <address_1> ... <address_n>
npm run fund ltc <address_1> ... <address_n>

# Fund Bitcoin regtest wallet
npm run fund-btc -- <address_1> ... <address_n>
npm run fund btc <address_1> ... <address_n>
```

</font>
Expand Down Expand Up @@ -195,6 +195,8 @@ POSTGRES_PASSWORD='bcn'
POSTGRES_DB='bcn'
POSTGRES_HOST='db'
POSTGRES_PORT='5432'
POSTGRES_MAX_CONNECTIONS='20'
POSTGRES_IDLE_TIMEOUT_MILLIS='3000'

# Bitcoin Node Settings
BITCOIN_IMAGE='litecoinproject/litecoin-core:0.21'
Expand All @@ -220,6 +222,8 @@ BCN_PORT='1031'
BCN_ENV=dev
BCN_ZMQ_URL='tcp://node:28332'
BCN_ZMQ_PORT='28332'
# Height of the block at which the zmq connection should start
BCN_ZMQ_ACTIVATION_HEIGHT=1

# Url of the Bitcoin Computer Node, defaults to localhost
BCN_URL='http://127.0.0.1:1031'
Expand Down
21 changes: 10 additions & 11 deletions packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,20 @@
},
"scripts": {
"build": "cd ../../ && npm run build:node",
"clean-logs": "rm -f *.log 2> /dev/null",
"delete-blockchain-data": "rm -rf chain-setup/*/*/*-data",
"down": "node --loader ts-node/esm ./scripts/down.ts",
"fund-ltc": "node --loader ts-node/esm ./scripts/fund.ts ltc",
"fund-btc": "node --loader ts-node/esm ./scripts/fund.ts btc",
"fund-pepe": "node --loader ts-node/esm ./scripts/fund.ts pepe",
"clean": "npm run clean:logs",
"clean:logs": "rm -f *.log 2> /dev/null",
"delete:blockchain:data": "rm -rf chain-setup/*/*/*-data",
"down": "node --loader ts-node/esm ./scripts/down.ts",
"fund": "node --loader ts-node/esm ./scripts/fund.ts",
"lint": "eslint",
"lint:fix": "eslint --fix",
"reset": "yes | ./scripts/reset.sh",
"setup": "./scripts/setup.py",
"start": "node dist/bcn.es.mjs",
"sync": "node dist/bcn.sync.es.mjs",
"setup": "./scripts/setup.py",
"reset": "yes | ./scripts/reset.sh",
"test": "mocha --config .mocharc.json ",
"test-and-show": "npm run test 2>&1 | tee node-test.log && open node-test.log",
"up": "node --loader ts-node/esm ./scripts/up.ts"
"test": "mocha --config .mocharc.json",
"test:show": "npm run test 2>&1 | tee node-test.log && open node-test.log",
"up": "node --loader ts-node/esm ./scripts/up.ts"
},
"dependencies": {
"@babel/core": "^7.23.9",
Expand Down
7 changes: 4 additions & 3 deletions packages/nodejs-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
"scripts": {
"build": "tsc -p tsconfig.release.json",
"build:turbo": "turbo run build",
"clean-logs": "rm -f *.log 2> /dev/null",
"clean": "npm run clean:logs",
"clean:logs": "rm -f *.log 2> /dev/null",
"lint": "eslint --fix . --ext .ts,.tsx",
"prebuild": "npm run lint",
"start": "node build/src/main.js",
"test": "mocha --config .mocharc.json",
"test-and-show": "npm run test 2>&1 | tee nodejs-template.log && open nodejs-template.log",
"test": "mocha --config .mocharc.json",
"test:show": "npm run test 2>&1 | tee nodejs-template.log && open nodejs-template.log",
"types": "tsc --noEmit"
},
"type": "module",
Expand Down
Loading