From 0ba1fb6a6e53838c0e51b60657129d2d4df1591f Mon Sep 17 00:00:00 2001 From: pointbiz Date: Mon, 28 Nov 2011 20:22:12 -0400 Subject: [PATCH] v1.3 testnet edition feature added. Update to isMiniFormat function. --- bitaddress.org.html | 6180 ++++++++++++++++++++++--------------------- 1 file changed, 3115 insertions(+), 3065 deletions(-) diff --git a/bitaddress.org.html b/bitaddress.org.html index ecb3be1..585275f 100644 --- a/bitaddress.org.html +++ b/bitaddress.org.html @@ -2,29 +2,52 @@ - bitaddress.org - - - + + - - + + - - + + - - - - + + + + + this.length++; + } + }; + })(); + - + // Prepend zero byte to prevent interpretation as negative integer + return BigInteger.fromByteArrayUnsigned(valueBuffer); + }, + formatValue: function (valueBuffer) { + var value = this.valueToBigInt(valueBuffer).toString(); + var integerPart = value.length > 8 ? value.substr(0, value.length - 8) : '0'; + var decimalPart = value.length > 8 ? value.substr(value.length - 8) : value; + while (decimalPart.length < 8) decimalPart = "0" + decimalPart; + decimalPart = decimalPart.replace(/0*$/, ''); + while (decimalPart.length < 2) decimalPart += "0"; + return integerPart + "." + decimalPart; + }, + parseValue: function (valueString) { + var valueComp = valueString.split('.'); + var integralPart = valueComp[0]; + var fractionalPart = valueComp[1] || "0"; + while (fractionalPart.length < 8) fractionalPart += "0"; + fractionalPart = fractionalPart.replace(/^0+/g, ''); + var value = BigInteger.valueOf(parseInt(integralPart)); + value = value.multiply(BigInteger.valueOf(100000000)); + value = value.add(BigInteger.valueOf(parseInt(fractionalPart))); + return value; + }, + sha256ripe160: function (data) { + return Crypto.RIPEMD160(Crypto.SHA256(data, { asBytes: true }), { asBytes: true }); + } + }; + - + -
- +
+
JavaScript Client-Side Bitcoin Wallet Generator
+
+ TESTNET EDITION ACTIVATED +
+ - +
-
+
@@ -3954,7 +3984,7 @@
-
+
Start index: Rows to generate: @@ -3966,7 +3996,7 @@
-
+
@@ -4026,324 +4056,324 @@
-
- +
+ - - + + - + getQueryString: function() { + var result = {}, queryString = location.search.substring(1), re = /([^&=]+)=([^&]*)/g, m; + + while (m = re.exec(queryString)) { + result[decodeURIComponent(m[1])] = decodeURIComponent(m[2]); + } + + return result; + } + } + + + + // testnet, check if testnet edition should be activated + if (ninja.getQueryString()["testnet"] == "true" || ninja.getQueryString()["testnet"] == "1") { + document.getElementById("testnet").style.display = "block"; + Bitcoin.Address.networkVersion = 0x6f; // testnet + } + + // if users does not move mouse after random amount of time then generate the key anyway. + setTimeout(ninja.wallets.singlewallet.forceGenerate, ninja.seedLimit * 20); + \ No newline at end of file