aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIan Coleman <ian@iancoleman.io>2018-02-06 09:50:29 +1100
committerIan Coleman <ian@iancoleman.io>2018-02-06 09:57:23 +1100
commit0b39e9dca79f71d898693d5cb93b6a1d1e0372f6 (patch)
tree0c23d5f9df0eb0ba724511ebb7fcb89d7c569bd2 /src
parentcc61ec30c5647b08cf11d918a6656cfc922e4586 (diff)
downloadBIP39-0b39e9dca79f71d898693d5cb93b6a1d1e0372f6.tar.gz
BIP39-0b39e9dca79f71d898693d5cb93b6a1d1e0372f6.tar.zst
BIP39-0b39e9dca79f71d898693d5cb93b6a1d1e0372f6.zip
Add BIP38 interface elements
Diffstat (limited to 'src')
-rw-r--r--src/index.html10
-rw-r--r--src/js/index.js8
2 files changed, 16 insertions, 2 deletions
diff --git a/src/index.html b/src/index.html
index 4fd9765..133a150 100644
--- a/src/index.html
+++ b/src/index.html
@@ -603,6 +603,16 @@
603 </label> 603 </label>
604 </div> 604 </div>
605 </div> 605 </div>
606 <div class="col-md-12">
607 <div class="checkbox">
608 <label>
609 <input type="checkbox" class="use-bip38">
610 <span>Encrypt private keys using BIP38 and this password:</span>
611 </label>
612 <input class="bip38-password">
613 <span>Enabling BIP38 means each key will take take several minutes to generate.</span>
614 </div>
615 </div>
606 <ul class="addresses-type nav nav-tabs" role="tablist"> 616 <ul class="addresses-type nav nav-tabs" role="tablist">
607 <li id="table-tab" class="active"> 617 <li id="table-tab" class="active">
608 <a href="#table" role="tab" data-toggle="tab">Table</a> 618 <a href="#table" role="tab" data-toggle="tab">Table</a>
diff --git a/src/js/index.js b/src/js/index.js
index 6aee5dc..3543e53 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -90,6 +90,8 @@
90 DOM.hardenedAddresses = $(".hardened-addresses"); 90 DOM.hardenedAddresses = $(".hardened-addresses");
91 DOM.useBitpayAddressesContainer = $(".use-bitpay-addresses-container"); 91 DOM.useBitpayAddressesContainer = $(".use-bitpay-addresses-container");
92 DOM.useBitpayAddresses = $(".use-bitpay-addresses"); 92 DOM.useBitpayAddresses = $(".use-bitpay-addresses");
93 DOM.useBip38 = $(".use-bip38");
94 DOM.bip38Password = $(".bip38-password");
93 DOM.addresses = $(".addresses"); 95 DOM.addresses = $(".addresses");
94 DOM.csvTab = $("#csv-tab a"); 96 DOM.csvTab = $("#csv-tab a");
95 DOM.csv = $(".csv"); 97 DOM.csv = $(".csv");
@@ -133,6 +135,8 @@
133 DOM.bip141semantics.on("change", tabChanged); 135 DOM.bip141semantics.on("change", tabChanged);
134 DOM.tab.on("shown.bs.tab", tabChanged); 136 DOM.tab.on("shown.bs.tab", tabChanged);
135 DOM.hardenedAddresses.on("change", calcForDerivationPath); 137 DOM.hardenedAddresses.on("change", calcForDerivationPath);
138 DOM.useBip38.on("change", calcForDerivationPath);
139 DOM.bip38Password.on("change", calcForDerivationPath);
136 DOM.indexToggle.on("click", toggleIndexes); 140 DOM.indexToggle.on("click", toggleIndexes);
137 DOM.addressToggle.on("click", toggleAddresses); 141 DOM.addressToggle.on("click", toggleAddresses);
138 DOM.publicKeyToggle.on("click", togglePublicKeys); 142 DOM.publicKeyToggle.on("click", togglePublicKeys);
@@ -766,8 +770,8 @@
766 var self = this; 770 var self = this;
767 this.shouldGenerate = true; 771 this.shouldGenerate = true;
768 var useHardenedAddresses = DOM.hardenedAddresses.prop("checked"); 772 var useHardenedAddresses = DOM.hardenedAddresses.prop("checked");
769 var useBip38 = false; // TODO get from DOM 773 var useBip38 = DOM.useBip38.prop("checked");
770 var bip38password = "bip38password"; // TODO get from DOM 774 var bip38password = DOM.bip38Password.val();
771 var isSegwit = segwitSelected(); 775 var isSegwit = segwitSelected();
772 var segwitAvailable = networkHasSegwit(); 776 var segwitAvailable = networkHasSegwit();
773 var isP2wpkh = p2wpkhSelected(); 777 var isP2wpkh = p2wpkhSelected();