Update README and attempt to fix whitespace.
This commit is contained in:
parent
04e07e6def
commit
e555680e1c
2 changed files with 77 additions and 82 deletions
1
README
1
README
|
@ -49,6 +49,7 @@ window.EllipticCurve BSD License
|
||||||
window.BigInteger BSD License
|
window.BigInteger BSD License
|
||||||
window.QRCode MIT License
|
window.QRCode MIT License
|
||||||
window.Bitcoin MIT License
|
window.Bitcoin MIT License
|
||||||
|
window.secrets MIT Licenses
|
||||||
|
|
||||||
The bitaddress.org software is available under The MIT License (MIT)
|
The bitaddress.org software is available under The MIT License (MIT)
|
||||||
Copyright (c) 2011-2012 bitaddress.org
|
Copyright (c) 2011-2012 bitaddress.org
|
||||||
|
|
|
@ -7477,9 +7477,6 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
ninja.wallets.splitwallet = {
|
ninja.wallets.splitwallet = {
|
||||||
open: function () {
|
open: function () {
|
||||||
/* if (document.getElementById("btcaddress").innerHTML == "") {
|
|
||||||
ninja.wallets.singlewallet.generateNewAddressAndKey();
|
|
||||||
} */
|
|
||||||
document.getElementById("splitarea").style.display = "block";
|
document.getElementById("splitarea").style.display = "block";
|
||||||
secrets.setRNG();
|
secrets.setRNG();
|
||||||
secrets.init(3);
|
secrets.init(3);
|
||||||
|
@ -7516,11 +7513,8 @@
|
||||||
|
|
||||||
var numshares = parseInt(document.getElementById('splitshares').value);
|
var numshares = parseInt(document.getElementById('splitshares').value);
|
||||||
var threshhold = parseInt(document.getElementById('splitthreshhold').value);
|
var threshhold = parseInt(document.getElementById('splitthreshhold').value);
|
||||||
//alert(numshares)
|
|
||||||
//alert(threshhold)
|
|
||||||
var shares = secrets.share(Crypto.util.bytesToHex(key.getBitcoinPrivateKeyByteArray()),
|
var shares = secrets.share(Crypto.util.bytesToHex(key.getBitcoinPrivateKeyByteArray()),
|
||||||
numshares, threshhold).map(Crypto.util.hexToBytes).map(Bitcoin.Base58.encode);
|
numshares, threshhold).map(Crypto.util.hexToBytes).map(Bitcoin.Base58.encode);
|
||||||
//alert(shares);
|
|
||||||
var output = document.createElement("div");
|
var output = document.createElement("div");
|
||||||
output.setAttribute("id", "splitoutput");
|
output.setAttribute("id", "splitoutput");
|
||||||
var m = {};
|
var m = {};
|
||||||
|
@ -7549,11 +7543,11 @@
|
||||||
|
|
||||||
// Combine shares of a private key to retrieve the key
|
// Combine shares of a private key to retrieve the key
|
||||||
combineShares: function () {
|
combineShares: function () {
|
||||||
try{
|
try {
|
||||||
var element = document.getElementById("combineoutput");
|
var element = document.getElementById("combineoutput");
|
||||||
if (element != null) element.parentNode.removeChild(element);
|
if (element != null) element.parentNode.removeChild(element);
|
||||||
|
|
||||||
var shares = document.getElementById("combineinput").value.split(/\W+/);
|
var shares = document.getElementById("combineinput").value.trim().split(/\W+/);
|
||||||
|
|
||||||
var combined = secrets.combine(shares.map(Bitcoin.Base58.decode).
|
var combined = secrets.combine(shares.map(Bitcoin.Base58.decode).
|
||||||
map(Crypto.util.bytesToHex).
|
map(Crypto.util.bytesToHex).
|
||||||
|
|
Loading…
Reference in a new issue