btcpayserver/BTCPayServer/Views/Stores/ImportWallet/Xpub.cshtml
Dennis Reimann e1ea7200cf
Fix FAQ links
Once more (and for the last time ;)) those linsk changed in btcpayserver/btcpayserver-doc#967
2021-10-04 13:42:31 +02:00

132 lines
4.5 KiB
Plaintext

@model WalletSetupViewModel
@addTagHelper *, BundlerMinifier.TagHelpers
@{
Layout = "_LayoutWalletSetup";
ViewData.SetActivePageAndTitle(StoreNavPages.Wallet, "Enter your extended public key", Context.GetStoreData().StoreName);
}
@section Navbar {
<a asp-controller="Stores" asp-action="ImportWallet" asp-route-storeId="@Model.StoreId" asp-route-cryptoCode="@Model.CryptoCode" asp-route-method="">
<vc:icon symbol="back" />
</a>
}
<header class="text-center">
<h1>@ViewData["Title"]</h1>
<p class="lead text-secondary mt-3">
This key, also called "xpub", is used to generate individual destination addresses for your invoices.
<a href="https://docs.btcpayserver.org/FAQ/Wallet/#what-is-a-derivation-scheme" target="_blank" rel="noreferrer noopener">
<span class="fa fa-question-circle-o text-secondary" title="More information..."></span>
</a>
</p>
</header>
<form method="post" class="my-5">
<input asp-for="Config" type="hidden" />
<input asp-for="CryptoCode" type="hidden" />
<input asp-for="DerivationSchemeFormat" type="hidden" />
<input asp-for="AccountKey" type="hidden" />
<div class="form-group">
<label asp-for="DerivationScheme" class="form-label">Extended public key</label>
<textarea asp-for="DerivationScheme" class="form-control store-derivation-scheme font-monospace py-2" rows="2"></textarea>
<span asp-validation-for="DerivationScheme" class="text-danger"></span>
</div>
<button name="command" type="submit" class="btn btn-primary" value="save" id="Continue">Continue</button>
</form>
<style>
#AddressTypes .additional { display: none; }
#AddressTypes.expanded .additional { display: table-row; }
</style>
<table id="AddressTypes" class="table">
<thead>
<tr>
<th class="w-175px">Address type</th>
<th>Example</th>
</tr>
</thead>
<tbody>
@if (Model.SupportSegwit)
{
<tr>
<td rowspan="4">P2WPKH</td>
<td class="font-monospace">xpub…</td>
</tr>
<tr>
<td class="font-monospace">zpub…</td>
</tr>
<tr>
<td class="font-monospace">wpkh(xpub…/0/*)</td>
</tr>
<tr>
<td class="font-monospace">wpkh([…/84'/0'/0']xpub…/0/*)</td>
</tr>
<tr>
<td rowspan="4">P2SH-P2WPKH</td>
<td class="font-monospace">xpub…-[p2sh]</td>
</tr>
<tr>
<td class="font-monospace">ypub…</td>
</tr>
<tr>
<td class="font-monospace">sh(wpkh(xpub…/0/*)</td>
</tr>
<tr>
<td class="font-monospace">sh(wpkh([…/49'/0'/0']xpub…/0/*)</td>
</tr>
}
<tr>
<td rowspan="3">P2PKH</td>
<td class="font-monospace">xpub…-[legacy]</td>
</tr>
<tr>
<td class="font-monospace">pkh([…/44'/0'/0']xpub…/0/*)</td>
</tr>
<tr>
<td class="font-monospace">pkh(xpub…/0/*)</td>
</tr>
@if (Model.SupportTaproot && Model.IsTaprootActivated)
{
<tr>
<td rowspan="1">P2TR</td>
<td class="font-monospace">xpub…-[taproot]</td>
</tr>
}
<tr class="additional">
<td class="text-nowrap" rowspan="2">Multi-sig P2WSH</td>
<td class="font-monospace">2-of-xpub1…-xpub2…</td>
</tr>
<tr class="additional">
<td class="font-monospace">wsh(multi(2,<br>[…/48'/0'/0'/2']xpub…/0/*,<br>[…/48'/0'/0'/2']xpub…/0/*))</td>
</tr>
<tr class="additional">
<td class="text-nowrap" rowspan="2">Multi-sig P2SH-P2WSH</td>
<td class="font-monospace">2-of-xpub1…-xpub2…-[p2sh]</td>
</tr>
<tr class="additional">
<td class="font-monospace">sh(wsh(multi(2,<br>[…/48'/0'/0'/1']xpub…/0/*,<br>[…/48'/0'/0'/1']xpub…/0/*)))</td>
</tr>
<tr class="additional">
<td class="text-nowrap" rowspan="2">Multi-sig P2SH</td>
<td class="font-monospace">2-of-xpub1…-xpub2…-[legacy]</td>
</tr>
<tr class="additional">
<td class="font-monospace">sh(multi(2,<br>[…/45'/0]xpub…/0/*,<br>[…/45'/0]xpub…/0/*))</td>
</tr>
</tbody>
</table>
<a id="ToggleAdditional" href="#additional">Show multi-sig examples</a>
@section PageFootContent {
<partial name="_ValidationScriptsPartial" />
<script>
document.getElementById('ToggleAdditional').addEventListener("click", function(e) {
e.preventDefault();
document.getElementById('AddressTypes').classList.toggle('expanded');
});
</script>
}