Comparing version 1.1.2 to 1.2.0
11
index.js
@@ -32,3 +32,3 @@ var bs58check = require('bs58check') | ||
function encode (version, d, compressed) { | ||
function encodeRaw (version, d, compressed) { | ||
var buffer = new Buffer(compressed ? 34 : 33) | ||
@@ -43,9 +43,14 @@ | ||
return bs58check.encode(buffer) | ||
return buffer | ||
} | ||
function encode (version, d, compressed) { | ||
return bs58check.encode(encodeRaw(version, d, compressed)) | ||
} | ||
module.exports = { | ||
decode: decode, | ||
decodeRaw: decodeRaw, | ||
encode: encode | ||
encode: encode, | ||
encodeRaw: encodeRaw | ||
} |
{ | ||
"name": "wif", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"description": "Bitcoin Wallet Import Format (WIF) encoding module", | ||
@@ -5,0 +5,0 @@ "author": "Daniel Cousens", |
/* global describe, it */ | ||
var assert = require('assert') | ||
var bs58check = require('bs58check') | ||
var wif = require('../') | ||
@@ -9,3 +8,3 @@ var fixtures = require('./fixtures') | ||
describe('WIF', function () { | ||
describe('encode', function () { | ||
describe('encode/encodeRaw', function () { | ||
fixtures.valid.forEach(function (f) { | ||
@@ -12,0 +11,0 @@ it('returns ' + f.WIF + ' for ' + f.d.slice(0, 20) + '... (' + f.version + ')', function () { |
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
7855
149