🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

wif

Package Overview
Dependencies
Maintainers
0
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wif - npm Package Compare versions

Comparing version

to
5.0.0

src/cjs/index.cjs

37

package.json
{
"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 @@ //}