btcpayserver/BTCPayServer/Views/UIStores/ImportWallet/Xpub.cshtml
d11n 0f8da123b8
UI: Move section navigation to sidebar (#5744)
* UI: Move section navigation to sidebar

* Scroll active nav link into view

* Move CTAs to top right

* Server Settings: Make Policies first page

* Responsive table fixes

* Spacing fixes

* Add breadcrumb samples

* store settings fixes

* payment request fixes

* updates pull payment title

* adds invoice detail fix

* updates server settings breadcrumbs + copy fix

* Don't open Server Settings on Plugins page

* Add breadcrumbs to pull payment views

* adds breadcrumbs to account

* server and store breadcrumb fixes

* fixes access tokens

* Fix payment processor breadcrumbs

* fixes webhook 404

* Final touches

* Fix test

* Add breadcrumb for email rules page

* Design system updates

---------

Co-authored-by: dstrukt <gfxdsign@gmail.com>
2024-06-19 15:23:10 +02:00

124 lines
4.4 KiB
Text

@model WalletSetupViewModel
@{
Layout = "_LayoutWalletSetup";
ViewData.SetActivePage(StoreNavPages.OnchainSettings, "Enter your extended public key", $"{Context.GetStoreData().Id}-{Model.CryptoCode}");
}
@section Navbar {
<a asp-controller="UIStores" 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" title="More information...">
<vc:icon symbol="info"/>
</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)
{
<tr>
<td rowspan="1">P2TR</td>
<td class="font-monospace">xpub…-[taproot]</td>
</tr>
}
</tbody>
<tbody id="MultiSigExamples" class="collapse">
<tr>
<td class="text-nowrap" rowspan="2">Multi-sig P2WSH</td>
<td class="font-monospace">2-of-xpub1…-xpub2…</td>
</tr>
<tr>
<td class="font-monospace">wsh(multi(2,<br>[…/48'/0'/0'/2']xpub…/0/*,<br>[…/48'/0'/0'/2']xpub…/0/*))</td>
</tr>
<tr>
<td class="text-nowrap" rowspan="2">Multi-sig P2SH-P2WSH</td>
<td class="font-monospace">2-of-xpub1…-xpub2…-[p2sh]</td>
</tr>
<tr>
<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>
<td class="text-nowrap" rowspan="2">Multi-sig P2SH</td>
<td class="font-monospace">2-of-xpub1…-xpub2…-[legacy]</td>
</tr>
<tr>
<td class="font-monospace">sh(multi(2,<br>[…/45'/0]xpub…/0/*,<br>[…/45'/0]xpub…/0/*))</td>
</tr>
</tbody>
</table>
<button class="d-inline-flex align-items-center btn btn-link text-primary fw-semibold p-0" type="button" id="ToggleAdditional" data-bs-toggle="collapse" data-bs-target="#MultiSigExamples" aria-expanded="false" aria-controls="MultiSigExamples">
<vc:icon symbol="caret-down"/>
<span class="ms-1">Show multi-sig examples</span>
</button>