btcpayserver/BTCPayServer/Views/Stores/ImportWallet/Xpub.cshtml
d11n ed7031981b
Bootstrap v5 migration (#2490)
* Swap bootstrap asset files

* Update themes and color definitions

* Move general bootstrap customizations

* Theme updates

Theme updates

* Remove BuildBundlerMinifier

This lead to an error, because BuildBundlerMinifier and BundlerMinifier.Core seem to conflict here. Details: https://stackoverflow.com/a/61119586

* Rewplace btn-block class with w-100

* Update badge classes

* Remove old font family head variable

* Update margin classes

* Cleanups

* Update float classes

* Update text classes

* Update padding classes

* Update border classes

* UPdate dropdown classes

* Update select classes

* Update neutral custom props

* Update bootstrap and customizations

* Update ChromeDriver; disable smooth scroll

https://github.com/SeleniumHQ/selenium/issues/8295

* Improve alert messages

* Improve bootstrap customizations

* Disable reduced motion

See also 7358282f

* Update Bootstrap data attributes

* Update file inputs

* Update input groups

* Replace deprecated jumbotron class

* Update variables; re-add negative margin util classes

* Update cards

* Update form labels

* Debug alerts

* Fix aria-labelledby associations

* Dropdown-related test fixes

* Fix CanUseWebhooks test

* Test fixes

* Nav updates

* Fix nav usage in wallet send and payouts

* Update alert and modal close buttons

* Re-add backdrop properties

* Upgrade Bootstrap to v5 final

* Update screen reader classes

* Update font-weight classes

* Update monospace font classes

* Update accordians

* Update close icon usage

* Cleanup

* Update scripts and style integrations

* Update input group texts

* Update LN node setup page

* Update more form control classes

* Update inline forms

* Add js specific test

* Upgrade Vue.js

* Remove unused JS

* Upgrade Bootstrap to v5.0.1

* Try container related test updates

* Separate jQuery bundle

* Remove jQuery from LND seed backup page

* Remove unused code

* Refactor email autofill js

* Refactor camera scanner JS

* Re-add tests

* Re-add BuildBundlerMinifier

* Do not minify bundles containing Bootstrap

Details https://github.com/madskristensen/BundlerMinifier/issues/558

* Update bundles

* Cleanup JS test

* Cleanup tests involving dropdowns

* Cleanup tests involving collapses

* Cleanup locale additions in ConfigureCore

* Cleanup bundles

* Remove duplicate status message

* Cleanup formatting

* Fix missing validation scripts

* Remove unused unminified Bootstrap js files

* Fix classic theme

* Fix Casa theme

* Fix PoS validation
2021-05-19 11:39:27 +09:00

121 lines
4.2 KiB
Text

@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/FAQ-Wallet/#what-is-a-derivation-scheme" target="_blank">
<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">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 table-sm table-sm-nohover">
<thead>
<tr>
<th class="w-175px">Address type</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<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>
<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>
}