Add traditional address support
MODIFY
HiddenWallet.Daemon/Models/ReceiveResponse.cs
HiddenWallet.Daemon/Models/ReceiveResponse.cs
@@ -9,6 +9,7 @@ namespace HiddenWallet.Daemon.Models
{
public ReceiveResponse() => Success = true;
public string[] Addresses { get; set; }
+ public string TraditionalAddress { get; set; }
public string ExtPubKey { get; set; }
}
}

MODIFY
HiddenWallet.Daemon/Wrappers/WalletWrapper.cs
HiddenWallet.Daemon/Wrappers/WalletWrapper.cs
@@ -197,6 +197,9 @@ namespace HiddenWallet.Daemon.Wrappers
if (ub[i] != null) _receiveResponseBob.Addresses[i] = ub[i].GetDestinationAddress(network).ToString();
else _receiveResponseBob.Addresses[i] = "";
}
+
+ _receiveResponseAlice.TraditionalAddress = (await _walletJob.GetUnusedScriptPubKeysAsync(AddressType.Pay2PublicKeyHash, AliceAccount, HdPathType.Receive)).FirstOrDefault().GetDestinationAddress(network).ToString();
+ _receiveResponseBob.TraditionalAddress = (await _walletJob.GetUnusedScriptPubKeysAsync(AddressType.Pay2PublicKeyHash, BobAccount, HdPathType.Receive)).FirstOrDefault().GetDestinationAddress(network).ToString();
}
private void _walletJob_StateChanged(object sender, EventArgs e)
{

MODIFY
HiddenWallet.Gui/app/html/wallet-content.html
HiddenWallet.Gui/app/html/wallet-content.html
<div id="receive-content">
<label>Unused Receive Addresses:</label>
<ul id="receive-addresses" class="list-group"></ul>
+ <label>[Advanced] Traditional Address:</label>
+ <ul class="list-group">
+ <li id="traditional-address" class="list-group-item" style="word-wrap:break-word"></li>
+ </ul>
<label>[Advanced] Extended Public Key:</label>
<ul class="list-group">
<li id="extpubkey" class="list-group-item" style="word-wrap:break-word"></li>

MODIFY
HiddenWallet.Gui/app/js/wallet-phase.ts
HiddenWallet.Gui/app/js/wallet-phase.ts
@@ -107,6 +107,7 @@ function updateWalletContent() {
let extPubKey: HTMLElement = document.getElementById("extpubkey");
let recAddresses: HTMLElement = document.getElementById("receive-addresses");
+ let tradAddress: HTMLElement = document.getElementById("traditional-address");
let resp: any = httpGetWallet("receive/alice");
@@ -120,6 +121,8 @@ function updateWalletContent() {
recAddresses.appendChild(node);
}
+ tradAddress.innerText = resp.TraditionalAddress;
+
extPubKey.innerText = resp.ExtPubKey;
}
else if (menuId === "history-active") {
@@ -167,6 +170,7 @@ function updateWalletContent() {
content.innerHTML = recContent.outerHTML;
let extPubKey: HTMLElement = document.getElementById("extpubkey");
let recAddresses: HTMLElement = document.getElementById("receive-addresses");
+ let tradAddress: HTMLElement = document.getElementById("traditional-address");
let resp: any = httpGetWallet("receive/bob");
let i: number = 0
@@ -180,6 +184,8 @@ function updateWalletContent() {
recAddresses.appendChild(node);
}
+ tradAddress.innerText = resp.TraditionalAddress;
+
extPubKey.innerText = resp.ExtPubKey;
}
else if (menuId === "history-active") {

Add traditional address support