aboutsummaryrefslogtreecommitdiff
path: root/bip39-standalone.html
diff options
context:
space:
mode:
Diffstat (limited to 'bip39-standalone.html')
-rw-r--r--bip39-standalone.html25
1 files changed, 23 insertions, 2 deletions
diff --git a/bip39-standalone.html b/bip39-standalone.html
index bb3ea38..62bd43c 100644
--- a/bip39-standalone.html
+++ b/bip39-standalone.html
@@ -300,6 +300,12 @@
300 </th> 300 </th>
301 <th> 301 <th>
302 <div class="input-group"> 302 <div class="input-group">
303 Public Key&nbsp;&nbsp;
304 <button class="public-key-toggle">Toggle</button>
305 </div>
306 </th>
307 <th>
308 <div class="input-group">
303 Private Key&nbsp;&nbsp; 309 Private Key&nbsp;&nbsp;
304 <button class="private-key-toggle">Toggle</button> 310 <button class="private-key-toggle">Toggle</button>
305 </div> 311 </div>
@@ -442,6 +448,7 @@
442 <tr> 448 <tr>
443 <td class="index"><span></span></td> 449 <td class="index"><span></span></td>
444 <td class="address"><span></span></td> 450 <td class="address"><span></span></td>
451 <td class="pubkey"><span></span></td>
445 <td class="privkey"><span></span></td> 452 <td class="privkey"><span></span></td>
446 </tr> 453 </tr>
447 </script> 454 </script>
@@ -16172,6 +16179,7 @@ var Mnemonic = function(language) {
16172 16179
16173 var showIndex = true; 16180 var showIndex = true;
16174 var showAddress = true; 16181 var showAddress = true;
16182 var showPubKey = true;
16175 var showPrivKey = true; 16183 var showPrivKey = true;
16176 16184
16177 var phraseChangeTimeoutEvent = null; 16185 var phraseChangeTimeoutEvent = null;
@@ -16206,6 +16214,7 @@ var Mnemonic = function(language) {
16206 DOM.tab = $(".derivation-type a"); 16214 DOM.tab = $(".derivation-type a");
16207 DOM.indexToggle = $(".index-toggle"); 16215 DOM.indexToggle = $(".index-toggle");
16208 DOM.addressToggle = $(".address-toggle"); 16216 DOM.addressToggle = $(".address-toggle");
16217 DOM.publicKeyToggle = $(".public-key-toggle");
16209 DOM.privateKeyToggle = $(".private-key-toggle"); 16218 DOM.privateKeyToggle = $(".private-key-toggle");
16210 DOM.languages = $(".languages a"); 16219 DOM.languages = $(".languages a");
16211 16220
@@ -16226,6 +16235,7 @@ var Mnemonic = function(language) {
16226 DOM.hardenedAddresses.on("change", calcForDerivationPath); 16235 DOM.hardenedAddresses.on("change", calcForDerivationPath);
16227 DOM.indexToggle.on("click", toggleIndexes); 16236 DOM.indexToggle.on("click", toggleIndexes);
16228 DOM.addressToggle.on("click", toggleAddresses); 16237 DOM.addressToggle.on("click", toggleAddresses);
16238 DOM.publicKeyToggle.on("click", togglePublicKeys);
16229 DOM.privateKeyToggle.on("click", togglePrivateKeys); 16239 DOM.privateKeyToggle.on("click", togglePrivateKeys);
16230 DOM.languages.on("click", languageChanged); 16240 DOM.languages.on("click", languageChanged);
16231 disableForms(); 16241 disableForms();
@@ -16362,6 +16372,11 @@ var Mnemonic = function(language) {
16362 $("td.address span").toggleClass("invisible"); 16372 $("td.address span").toggleClass("invisible");
16363 } 16373 }
16364 16374
16375 function togglePublicKeys() {
16376 showPubKey = !showPubKey;
16377 $("td.pubkey span").toggleClass("invisible");
16378 }
16379
16365 function togglePrivateKeys() { 16380 function togglePrivateKeys() {
16366 showPrivKey = !showPrivKey; 16381 showPrivKey = !showPrivKey;
16367 $("td.privkey span").toggleClass("invisible"); 16382 $("td.privkey span").toggleClass("invisible");
@@ -16560,11 +16575,12 @@ var Mnemonic = function(language) {
16560 } 16575 }
16561 var address = key.getAddress().toString(); 16576 var address = key.getAddress().toString();
16562 var privkey = key.privKey.toWIF(network); 16577 var privkey = key.privKey.toWIF(network);
16578 var pubkey = key.pubKey.toHex();
16563 var indexText = getDerivationPath() + "/" + index; 16579 var indexText = getDerivationPath() + "/" + index;
16564 if (useHardenedAddresses) { 16580 if (useHardenedAddresses) {
16565 indexText = indexText + "'"; 16581 indexText = indexText + "'";
16566 } 16582 }
16567 addAddressToList(indexText, address, privkey); 16583 addAddressToList(indexText, address, pubkey, privkey);
16568 }, 50) 16584 }, 50)
16569 } 16585 }
16570 16586
@@ -16605,15 +16621,17 @@ var Mnemonic = function(language) {
16605 DOM.extendedPubKey.val(""); 16621 DOM.extendedPubKey.val("");
16606 } 16622 }
16607 16623
16608 function addAddressToList(indexText, address, privkey) { 16624 function addAddressToList(indexText, address, pubkey, privkey) {
16609 var row = $(addressRowTemplate.html()); 16625 var row = $(addressRowTemplate.html());
16610 // Elements 16626 // Elements
16611 var indexCell = row.find(".index span"); 16627 var indexCell = row.find(".index span");
16612 var addressCell = row.find(".address span"); 16628 var addressCell = row.find(".address span");
16629 var pubkeyCell = row.find(".pubkey span");
16613 var privkeyCell = row.find(".privkey span"); 16630 var privkeyCell = row.find(".privkey span");
16614 // Content 16631 // Content
16615 indexCell.text(indexText); 16632 indexCell.text(indexText);
16616 addressCell.text(address); 16633 addressCell.text(address);
16634 pubkeyCell.text(pubkey);
16617 privkeyCell.text(privkey); 16635 privkeyCell.text(privkey);
16618 // Visibility 16636 // Visibility
16619 if (!showIndex) { 16637 if (!showIndex) {
@@ -16622,6 +16640,9 @@ var Mnemonic = function(language) {
16622 if (!showAddress) { 16640 if (!showAddress) {
16623 addressCell.addClass("invisible"); 16641 addressCell.addClass("invisible");
16624 } 16642 }
16643 if (!showPubKey) {
16644 pubkeyCell.addClass("invisible");
16645 }
16625 if (!showPrivKey) { 16646 if (!showPrivKey) {
16626 privkeyCell.addClass("invisible"); 16647 privkeyCell.addClass("invisible");
16627 } 16648 }