2019-11-29 21:24:52 +01:00
@using NBitcoin
@model NBXplorer.Models.GenerateWalletRequest
<div class="modal fade" id="nbxplorergeneratewallet" tabindex="-1" role="dialog" aria-labelledby="nbxplorergeneratewallet" aria-hidden="true">
<div class="modal-dialog" role="document">
2019-12-04 14:17:22 +01:00
<form class="modal-content" form method="post" asp-action="GenerateNBXWallet" enctype="multipart/form-data">
2019-11-29 21:24:52 +01:00
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Generate a wallet with a seed</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
2019-12-04 14:17:22 +01:00
<p>You may generate a wallet with a seed and import the xpub it into BTCPay. You can optionally also tell NBX to import the keys to the node wallet to be able to view & spend received funds from it.</p>
2019-11-29 21:24:52 +01:00
2019-12-04 14:17:22 +01:00
<div class="form-group">
<label asp-for="ExistingMnemonic">Existing Seed</label>
<input type="text" asp-for="ExistingMnemonic" class="form-control"/>
<span asp-validation-for="ExistingMnemonic" class="text-danger"></span>
<p class="text-black-50">You can choose to import an existing mnemonic seed phrase. If you leave blank, we will generate one for you.</p>
</div>
<div class="form-group">
<label asp-for="ScriptPubKeyType">Address type</label>
<select class="form-control" asp-for="ScriptPubKeyType">
<option value="@ScriptPubKeyType.Segwit">Segwit (Recommended, cheapest transaction fee)</option>
<option value="@ScriptPubKeyType.SegwitP2SH">Segwit wrapped (less cheap but compatible with old wallets)</option>
<option value="@ScriptPubKeyType.Legacy">Legacy (Not recommended)</option>
</select>
<span asp-validation-for="ScriptPubKeyType" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="AccountNumber">Account</label>
<select asp-for="AccountNumber" class="form-control">
@for (int i = 0; i < 20; i++)
{
<option value="@i">@i</option>
}
</select>
<span asp-validation-for="AccountNumber" class="text-danger"></span>
2019-11-29 21:24:52 +01:00
</div>
2019-12-04 14:17:22 +01:00
<div class="form-group">
<input type="checkbox" class="form-check-inline" asp-for="SavePrivateKeys"/>
<label asp-for="SavePrivateKeys">Save private keys</label>
<span asp-validation-for="SavePrivateKeys" class="text-danger"></span>
<p class="text-black-50">If checked, each private key associated with an address generated will be stored as metadata in NBXplorer.</p>
</div>
<div class="form-group">
<input type="checkbox" class="form-check-inline" asp-for="ImportKeysToRPC"/>
<label asp-for="ImportKeysToRPC">Import keys to RPC</label>
<span asp-validation-for="ImportKeysToRPC" class="text-danger"></span>
<p class="text-black-50">If checked, each address generated will be imported into the node wallet so that you can view your balance through your node. When this is enabled alongside <code>Save private keys</code>, you're also able to use the node wallet to spend (this works pretty well in conjunction with apps such as FullyNoded).</p>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
2019-12-05 18:56:40 +01:00
<button type="submit" class="btn btn-primary" id="btn-generate">Generate</button>
2019-12-04 14:17:22 +01:00
</div>
2019-11-29 21:24:52 +01:00
</form>
</div>
</div>