Nutty Professor Movie

    bip38-smart

    2.0.2 • Public • Published

    bip38-smart

    Version

    A JavaScript component that adheres to the BIP38 standard to secure your crypto currency private keys. Fully compliant with Node.js and the browser (via Browserify).

    Why?

    BIP38 is a standard process to encrypt Bitcoin, SmartCash and crypto currency private keys that is imprevious to brute force attacks thus protecting the user.

    Package Info

    Usage

    Installation

    npm install --save bip38-smart
    

    API

    encrypt(buffer, compressed, passphrase[, progressCallback, scryptParams])

    var bip38 = require('bip38-smart')
    var wif = require('wif-smart')
     
    var myWifString = 'VNUeptnSW5iY8F8Drn46uKXkrSmet8a7wSTzvWRHhjjbWAaTY5AW'
    var decoded = wif.decode(myWifString)
     
    var encryptedKey = bip38.encrypt(decoded.privateKey, decoded.compressed, 'TestingOneTwoThree')
    console.log(encryptedKey)
    // => '6PYNiZZBhoCLVv67xCWXDzMVfqspgZxX3X6EXMpFpcmiqs4yH7Bw8nKuaT'aT'

    decrypt(encryptedKey, passhprase[, progressCallback, scryptParams])

    var bip38 = require('bip38-smart')
    var wif = require('wif-smart')
     
    var encryptedKey = '6PYNiZZBhoCLVv67xCWXDzMVfqspgZxX3X6EXMpFpcmiqs4yH7Bw8nKuaT'
    var decryptedKey = bip38.decrypt(encryptedKey, 'TestingOneTwoThree', function (status) {
      console.log(status.percent) // will print the precent every time current increases by 1000
    })
     
    console.log(wif.encode(0xBF, decryptedKey.privateKey, decryptedKey.compressed))
    // => 'VNUeptnSW5iY8F8Drn46uKXkrSmet8a7wSTzvWRHhjjbWAaTY5AW'

    References

    Install

    npm i bip38-smart

    DownloadsWeekly Downloads

    5

    Version

    2.0.2

    License

    none

    Unpacked Size

    13.2 kB

    Total Files

    5

    Last publish

    Collaborators

    • davidkevork