Comparing version 4.0.0 to 5.0.0
{ | ||
"name": "wif", | ||
"version": "4.0.0", | ||
"version": "5.0.0", | ||
"description": "Bitcoin Wallet Import Format (WIF) decoding/encoding module", | ||
"author": "Daniel Cousens", | ||
"type": "module", | ||
"license": "MIT", | ||
@@ -27,10 +28,23 @@ "repository": { | ||
], | ||
"main": "index.js", | ||
"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" | ||
} | ||
}, | ||
"files": [ | ||
"index.js" | ||
"src" | ||
], | ||
"scripts": { | ||
"coverage-report": "nyc report --reporter=lcov", | ||
"coverage": "nyc --check-coverage --branches 90 --functions 90 npm run unit", | ||
"standard": "standard", | ||
"build": "npm run clean && tsc -p ./tsconfig.json && tsc -p ./tsconfig.cjs.json; npm run standard -- --fix", | ||
"clean": "rimraf src", | ||
"postbuild": "find src/cjs -type f -name \"*.js\" -exec bash -c 'mv \"$0\" \"${0%.js}.cjs\"' {} \\;", | ||
"gitdiff": "npm run build && git diff --exit-code", | ||
"coverage-report": "c8 report --reporter=lcov", | ||
"coverage": "c8 --check-coverage --branches 90 --functions 90 npm run unit", | ||
"standard": "ts-standard --ignore src --ignore test", | ||
"test": "npm run standard && npm run coverage", | ||
@@ -40,10 +54,13 @@ "unit": "tape test/*.js" | ||
"dependencies": { | ||
"bs58check": "^3.0.1" | ||
"bs58check": "^4.0.0" | ||
}, | ||
"devDependencies": { | ||
"nyc": "^15.0.0", | ||
"standard": "^14.3.3", | ||
"tape": "^4.13.2", | ||
"@types/node": "^20.14.2", | ||
"c8": "^10.1.2", | ||
"rimraf": "^5.0.7", | ||
"tape": "^5.3.0", | ||
"ts-standard": "^12.0.2", | ||
"typescript": "^5.4.5", | ||
"uint8array-tools": "0.0.7" | ||
} | ||
} |
@@ -13,5 +13,5 @@ # WIF | ||
``` javascript | ||
var wif = require('wif') | ||
import * as wif from "wif" | ||
var privateKey = Buffer.from('0000000000000000000000000000000000000000000000000000000000000001', 'hex') | ||
var key = wif.encode(128, privateKey, true) // for the testnet use: wif.encode(239, ... | ||
var key = wif.encode({version: 128, privateKey, compressed: true}) // for the testnet use: wif.encode(239, ... | ||
// => KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU73sVHnoWn | ||
@@ -22,3 +22,8 @@ | ||
// version: 128, | ||
// privateKey: <Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01>, | ||
// privateKey: Uint8Array(32) [ | ||
// 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
// 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
// 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
// 0, 0, 0, 0, 1 | ||
// ], | ||
// compressed: true | ||
@@ -25,0 +30,0 @@ //} |
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
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
7428
6
105
39
0
Yes
7
+ Addedbase-x@5.0.0(transitive)
+ Addedbs58@6.0.0(transitive)
+ Addedbs58check@4.0.0(transitive)
- Removedbase-x@4.0.0(transitive)
- Removedbs58@5.0.0(transitive)
- Removedbs58check@3.0.1(transitive)
Updatedbs58check@^4.0.0