Update bitaddress.org.html

Generate vanity pattern for single wallet, paper wallet and bulk wallet.
This commit is contained in:
Jpja 2015-01-15 09:12:43 +02:00
parent ca3e489d37
commit a636e98532

View file

@ -19,11 +19,11 @@
do { do {
var key = new Bitcoin.ECKey(false); var key = new Bitcoin.ECKey(false);
var bitcoinAddress = key.getBitcoinAddress(); var bitcoinAddress = key.getBitcoinAddress();
} while (bitcoinAddress.substring(0,vanitylength) != vanitypattern) } while (bitcoinAddress.substring(0,vanitypattern.length) != vanitypattern)
- for Bulk Wallet: - for Bulk Wallet:
do { do {
var key = new Bitcoin.ECKey(false); var key = new Bitcoin.ECKey(false);
} while (key.getBitcoinAddress().substring(0,vanitylength) != vanitypattern) } while (key.getBitcoinAddress().substring(0,vanitypattern.length) != vanitypattern)
Notice of Copyrights and Licenses: Notice of Copyrights and Licenses:
*********************************** ***********************************
@ -9041,8 +9041,10 @@ ninja.wallets.singlewallet = {
// generate bitcoin address and private key and update information in the HTML // generate bitcoin address and private key and update information in the HTML
generateNewAddressAndKey: function () { generateNewAddressAndKey: function () {
try { try {
var key = new Bitcoin.ECKey(false); do {
var bitcoinAddress = key.getBitcoinAddress(); var key = new Bitcoin.ECKey(false);
var bitcoinAddress = key.getBitcoinAddress();
} while (bitcoinAddress.substring(0,vanitypattern.length) != vanitypattern
var privateKeyWif = key.getBitcoinWalletImportFormat(); var privateKeyWif = key.getBitcoinWalletImportFormat();
document.getElementById("btcaddress").innerHTML = bitcoinAddress; document.getElementById("btcaddress").innerHTML = bitcoinAddress;
document.getElementById("btcprivwif").innerHTML = privateKeyWif; document.getElementById("btcprivwif").innerHTML = privateKeyWif;
@ -9172,8 +9174,10 @@ ninja.wallets.paperwallet = {
}); });
} }
else { else {
var key = new Bitcoin.ECKey(false); do {
var bitcoinAddress = key.getBitcoinAddress(); var key = new Bitcoin.ECKey(false);
var bitcoinAddress = key.getBitcoinAddress();
} while (bitcoinAddress.substring(0,vanitypattern.length) != vanitypattern
var privateKeyWif = key.getBitcoinWalletImportFormat(); var privateKeyWif = key.getBitcoinWalletImportFormat();
if (ninja.wallets.paperwallet.useArtisticWallet) { if (ninja.wallets.paperwallet.useArtisticWallet) {
ninja.wallets.paperwallet.showArtisticWallet(idPostFix, bitcoinAddress, privateKeyWif); ninja.wallets.paperwallet.showArtisticWallet(idPostFix, bitcoinAddress, privateKeyWif);
@ -9349,7 +9353,9 @@ ninja.wallets.bulkwallet = {
var bulkWallet = ninja.wallets.bulkwallet; var bulkWallet = ninja.wallets.bulkwallet;
if (bulkWallet.csvRowsRemaining > 0) { if (bulkWallet.csvRowsRemaining > 0) {
bulkWallet.csvRowsRemaining--; bulkWallet.csvRowsRemaining--;
var key = new Bitcoin.ECKey(false); do {
var key = new Bitcoin.ECKey(false);
} while (key.getBitcoinAddress().substring(0,vanitypattern.length) != vanitypattern)
key.setCompressed(bulkWallet.compressedAddrs); key.setCompressed(bulkWallet.compressedAddrs);
bulkWallet.csv.push((bulkWallet.csvRowLimit - bulkWallet.csvRowsRemaining + bulkWallet.csvStartIndex) bulkWallet.csv.push((bulkWallet.csvRowLimit - bulkWallet.csvRowsRemaining + bulkWallet.csvStartIndex)