Skip to content

Instantly share code, notes, and snippets.

@moeadham
Created April 9, 2014 01:28
Show Gist options
  • Save moeadham/10217078 to your computer and use it in GitHub Desktop.
Save moeadham/10217078 to your computer and use it in GitHub Desktop.
Bitcoinjs-lib Wallet WIF error
var Wallet = require('./src/wallet.js');
var i = 0;
for(i = 0; i<5000; i++){
generateAddresses(function(pub,priv){
if(priv[0] == '5'){
console.log('ERROR');
console.log(pub);
console.log(priv);
}
});
}
function generateAddresses(cb) {
var wallet = new Wallet();
wallet.newMasterKey();
pub = wallet.generateAddress();
//console.log(pub);
//console.log(wallet);
var priv = wallet.getPrivateKeyForAddress(pub);
priv = priv.toWif();
cb(pub, priv);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment