Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wif

Package Overview
Dependencies
Maintainers
1
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 2.0.0 to 2.0.1

22

index.js

@@ -29,6 +29,2 @@ var bs58check = require('bs58check')

function decode (string, version) {
return decodeRaw(bs58check.decode(string), version)
}
function encodeRaw (version, privateKey, compressed) {

@@ -47,10 +43,16 @@ var result = new Buffer(compressed ? 34 : 33)

function decode (string, version) {
return decodeRaw(bs58check.decode(string), version)
}
function encode (version, privateKey, compressed) {
if (typeof version !== 'number') {
compressed = version.compressed
privateKey = version.privateKey
version = version.version
}
if (typeof version === 'number') return bs58check.encode(encodeRaw(version, privateKey, compressed))
return bs58check.encode(encodeRaw(version, privateKey, compressed))
return bs58check.encode(
encodeRaw(
version.version,
version.privateKey,
version.compressed
)
)
}

@@ -57,0 +59,0 @@

{
"name": "wif",
"version": "2.0.0",
"version": "2.0.1",
"description": "Bitcoin Wallet Import Format (WIF) encoding module",

@@ -5,0 +5,0 @@ "author": "Daniel Cousens",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc