diff --git a/index.html b/index.html
index 7000c57..58882f7 100644
--- a/index.html
+++ b/index.html
@@ -1206,7 +1206,7 @@
The path of key derivation
-
+
Path
+
+ Address format
+
+
+
@@ -1241,7 +1250,7 @@
- | Index | Address | Private Key (WIF) | Extended xPub | Extended xPrv |
+ | Index | Address | Redeem script | Private Key (WIF) | Extended xPub | Extended xPrv |
diff --git a/js/coin.js b/js/coin.js
index c84535e..db1f1b4 100644
--- a/js/coin.js
+++ b/js/coin.js
@@ -621,10 +621,20 @@
var privkey = (r.key_bytes).slice(1, 33);
var privkeyHex = Crypto.util.bytesToHex(privkey);
var pubkey = coinjs.newPubkey(privkeyHex);
+ var addr_format = $("#verifyHDaddress .derivation_addr_format").val();
+ if (addr_format == "bech32") {
+ var address = coinjs.bech32Address(pubkey);
+ } else if (addr_format == "segwit") {
+ var address = coinjs.segwitAddress(pubkey);
+ } else {
+ var address = {'address': coinjs.pubkey2address(pubkey),
+ 'redeemscript': ''};
+ }
r.keys = {'privkey':privkeyHex,
'pubkey':pubkey,
- 'address':coinjs.pubkey2address(pubkey),
+ 'address':address.address,
+ 'script':address.redeemscript,
'wif':coinjs.privkey2wif(privkeyHex)};
} else if(r.key_bytes[0] == 0x02 || r.key_bytes[0] == 0x03) {
diff --git a/js/coinbin.js b/js/coinbin.js
index b31ba5b..7b9c77a 100644
--- a/js/coinbin.js
+++ b/js/coinbin.js
@@ -1717,6 +1717,7 @@ $(document).ready(function() {
html += '';
html += '| '+i+' | ';
html += ' | ';
+ html += ' | ';
html += ' | ';
html += ' | ';
html += ' | ';