bitcoinjs-lib
Advanced tools
Comparing version 6.1.6 to 7.0.0-rc.0
{ | ||
"name": "bitcoinjs-lib", | ||
"version": "6.1.6", | ||
"version": "7.0.0-rc.0", | ||
"description": "Client-side Bitcoin JavaScript library", | ||
"main": "./src/index.js", | ||
"types": "./src/index.d.ts", | ||
"type": "module", | ||
"main": "./src/cjs/index.cjs", | ||
"module": "./src/esm/index.js", | ||
"types": "./src/cjs/index.d.ts", | ||
"exports": { | ||
".": { | ||
"require": "./src/cjs/index.cjs", | ||
"import": "./src/esm/index.js", | ||
"types": "./src/cjs/index.d.ts" | ||
}, | ||
"./src/*": { | ||
"require": "./src/cjs/*.cjs", | ||
"types": "./src/cjs/*.d.ts", | ||
"import": "./src/esm/*.js" | ||
} | ||
}, | ||
"engines": { | ||
"node": ">=8.0.0" | ||
"node": ">=18.0.0" | ||
}, | ||
@@ -19,6 +33,5 @@ "keywords": [ | ||
"audit": "better-npm-audit audit -l high", | ||
"build": "npm run clean && tsc -p ./tsconfig.json && npm run formatjs", | ||
"build:tests": "npm run clean:jstests && tsc -p ./test/tsconfig.json", | ||
"build": "npm run clean && tsc -p ./tsconfig.json && tsc -p ./tsconfig.cjs.json && npm run formatjs", | ||
"postbuild": "find src/cjs -type f -name \"*.js\" -exec bash -c 'mv \"$0\" \"${0%.js}.cjs\"' {} \\; && chmod +x ./fixup.cjs && node fixup.cjs", | ||
"clean": "rimraf src", | ||
"clean:jstests": "rimraf 'test/**/!(ts-node-register)*.js'", | ||
"coverage-report": "npm run build && npm run nobuild:coverage-report", | ||
@@ -35,6 +48,6 @@ "coverage-html": "npm run build && npm run nobuild:coverage-html", | ||
"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 85 --functions 90 --lines 90 mocha && npm run clean:jstests", | ||
"mocha:ts": "mocha --recursive", | ||
"nobuild:coverage-report": "c8 report --reporter=lcov", | ||
"nobuild:coverage-html": "c8 report --reporter=html", | ||
"nobuild:coverage": "c8 --check-coverage --branches 85 --functions 90 --lines 90 npm run nobuild:unit", | ||
"nobuild:integration": "npm run mocha:ts -- --timeout 50000 'test/integration/*.ts'", | ||
@@ -57,32 +70,37 @@ "nobuild:unit": "npm run mocha:ts -- 'test/*.ts'", | ||
"bech32": "^2.0.0", | ||
"bip174": "^2.1.1", | ||
"bs58check": "^3.0.1", | ||
"typeforce": "^1.11.3", | ||
"varuint-bitcoin": "^1.1.2" | ||
"bip174": "^3.0.0-rc.0", | ||
"bs58check": "^4.0.0", | ||
"uint8array-tools": "^0.0.9", | ||
"valibot": "^0.38.0", | ||
"varuint-bitcoin": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
"bitcoinjs-lib": ".", | ||
"@eslint/eslintrc": "^3.1.0", | ||
"@eslint/js": "^9.9.1", | ||
"@types/bs58": "^4.0.0", | ||
"@types/bs58check": "^2.1.0", | ||
"@types/mocha": "^5.2.7", | ||
"@types/node": "^16.11.7", | ||
"@types/node": "^18.7.14", | ||
"@types/proxyquire": "^1.3.28", | ||
"@types/randombytes": "^2.0.0", | ||
"@typescript-eslint/eslint-plugin": "^5.45.0", | ||
"@typescript-eslint/parser": "^5.45.0", | ||
"@typescript-eslint/eslint-plugin": "^8.2.0", | ||
"@typescript-eslint/parser": "^8.2.0", | ||
"better-npm-audit": "^3.7.3", | ||
"bip32": "^4.0.0", | ||
"bip32": "^5.0.0-rc.0", | ||
"bip39": "^3.1.0", | ||
"bip65": "^1.0.1", | ||
"bip68": "^1.0.3", | ||
"bs58": "^4.0.0", | ||
"bs58": "^6.0.0", | ||
"dhttp": "^3.0.0", | ||
"ecpair": "^2.0.1", | ||
"eslint": "^8.29.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"ecpair": "^3.0.0-rc.0", | ||
"eslint": "^9.9.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-prettier": "^5.2.1", | ||
"globals": "^15.9.0", | ||
"hoodwink": "^2.0.0", | ||
"minimaldata": "^1.0.2", | ||
"mocha": "^10.0.0", | ||
"nyc": "^15.1.0", | ||
"prettier": "^2.8.0", | ||
"mocha": "^10.6.0", | ||
"c8": "^10.1.2", | ||
"prettier": "^3.0.0", | ||
"proxyquire": "^2.0.1", | ||
@@ -93,7 +111,7 @@ "randombytes": "^2.1.0", | ||
"tiny-secp256k1": "^2.2.0", | ||
"ts-node": "^8.3.0", | ||
"typedoc": "^0.25.1", | ||
"typescript": "^4.4.4" | ||
"tsx": "^4.17.0", | ||
"typedoc": "^0.26.6", | ||
"typescript": "^5.0.4" | ||
}, | ||
"license": "MIT" | ||
} |
@@ -1,2 +0,7 @@ | ||
# BitcoinJS (bitcoinjs-lib) | ||
<img src="./logo/Bitcoin.js-transparent.png" alt="BitcoinJS kawaii logo" width="50%" /> | ||
(Logo by [@sawaratsuki1004](https://x.com/sawaratsuki1004)) | ||
([LICENSE for the logo is on SAWARATSUKI Github repo](https://github.com/SAWARATSUKI/KawaiiLogos/blob/main/README_EN.md)) | ||
[![Github CI](https://github.com/bitcoinjs/bitcoinjs-lib/actions/workflows/main_ci.yml/badge.svg)](https://github.com/bitcoinjs/bitcoinjs-lib/actions/workflows/main_ci.yml) [![NPM](https://img.shields.io/npm/v/bitcoinjs-lib.svg)](https://www.npmjs.org/package/bitcoinjs-lib) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier) | ||
@@ -96,3 +101,3 @@ | ||
$ npm install bitcoinjs-lib browserify | ||
$ npx browserify --standalone bitcoin - -o bitcoinjs-lib.js <<<"module.exports = require('bitcoinjs-lib');" | ||
$ npx browserify --standalone bitcoin -o bitcoinjs-lib.js <<< "module.exports = require('bitcoinjs-lib');" | ||
``` | ||
@@ -106,2 +111,12 @@ | ||
#### Using Taproot: | ||
When utilizing Taproot features with bitcoinjs-lib, you may need to include an additional ECC (Elliptic Curve Cryptography) library. The commonly used `tiny-secp256k1` library, however, might lead to compatibility issues due to its reliance on WASM (WebAssembly). The following alternatives may be used instead, though they may be significantly slower for high volume of signing and pubkey deriving operations. | ||
#### Alternatives for ECC Library: | ||
1. `@bitcoinjs-lib/tiny-secp256k1-asmjs` | ||
A version of `tiny-secp256k1` compiled to ASM.js directly from the WASM version, potentially better supported in browsers. This is the slowest option. | ||
2. `@bitcoinerlab/secp256k1` | ||
Another alternative library for ECC functionality. This requires access to the global `BigInt` primitive. | ||
For advantages and detailed comparison of these libraries, visit: [tiny-secp256k1 GitHub page](https://github.com/bitcoinjs/tiny-secp256k1). | ||
**NOTE**: We use Node Maintenance LTS features, if you need strict ES5, use [`--transform babelify`](https://github.com/babel/babelify) in conjunction with your `browserify` step (using an [`es2015`](https://babeljs.io/docs/plugins/preset-es2015/) preset). | ||
@@ -121,2 +136,5 @@ | ||
- [Taproot Key Spend](https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/taproot.spec.ts) | ||
- [Create (and broadcast via 3PBP) a taproot script-path spend Transaction - OP_CHECKSIG](https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/taproot.spec.ts) | ||
- [Create (and broadcast via 3PBP) a taproot script-path spend Transaction - OP_CHECKSEQUENCEVERIFY](https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/taproot.spec.ts) | ||
- [Create (and broadcast via 3PBP) a taproot script-path spend Transaction - OP_CHECKSIGADD (3-of-3)](https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/taproot.spec.ts) | ||
- [Generate a random address](https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/addresses.spec.ts) | ||
@@ -123,0 +141,0 @@ - [Import an address via WIF](https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/addresses.spec.ts) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
506033
93
14478
210
Yes
7
36
2
1
+ Addeduint8array-tools@^0.0.9
+ Addedvalibot@^0.38.0
+ Addedbase-x@5.0.0(transitive)
+ Addedbip174@3.0.0-rc.1(transitive)
+ Addedbs58@6.0.0(transitive)
+ Addedbs58check@4.0.0(transitive)
+ Addeduint8array-tools@0.0.80.0.9(transitive)
+ Addedvalibot@0.38.0(transitive)
+ Addedvaruint-bitcoin@2.0.0(transitive)
- Removedtypeforce@^1.11.3
- Removedbase-x@4.0.0(transitive)
- Removedbip174@2.1.1(transitive)
- Removedbs58@5.0.0(transitive)
- Removedbs58check@3.0.1(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedtypeforce@1.18.0(transitive)
- Removedvaruint-bitcoin@1.1.2(transitive)
Updatedbip174@^3.0.0-rc.0
Updatedbs58check@^4.0.0
Updatedvaruint-bitcoin@^2.0.0