2019-05-25 04:45:36 +02:00
@model DerivationSchemeViewModel
2018-01-08 14:45:09 +01:00
@{
Layout = "../Shared/_NavLayout.cshtml";
2018-08-22 13:56:55 +02:00
ViewData.SetActivePageAndTitle(StoreNavPages.Index, $"{Model.CryptoCode} Derivation scheme");
2018-01-08 14:45:09 +01:00
}
2019-05-25 05:53:03 +02:00
@section HeadScripts {
<style type="text/css">
.hw-fields {
display: none;
}
</style>
}
2018-05-08 10:57:53 +02:00
<partial name="_StatusMessage" for="StatusMessage" />
2018-01-08 14:45:09 +01:00
<div class="row">
<div class="col-md-6">
<div asp-validation-summary="All" class="text-danger"></div>
</div>
</div>
<div class="row">
2018-02-12 19:27:36 +01:00
<div class="col-md-8">
2019-05-25 05:53:03 +02:00
@if (!Model.Confirmation)
{
<partial name="AddDerivationSchemes_HardwareWalletDialogs" model="@Model" />
}
2018-01-08 14:45:09 +01:00
<form method="post">
2019-05-25 05:53:03 +02:00
<input id="Config" asp-for="Config" type="hidden" />
2018-12-04 13:22:27 +01:00
@if (!Model.Confirmation)
2018-03-18 06:15:23 +01:00
{
2019-05-25 05:53:03 +02:00
<input id="CryptoCurrency" asp-for="CryptoCode" type="hidden" />
<input id="DerivationSchemeFormat" asp-for="DerivationSchemeFormat" type="hidden" />
<input id="AccountKey" asp-for="AccountKey" type="hidden" />
2018-03-18 06:15:23 +01:00
<div class="form-group">
<h5>Derivation Scheme</h5>
<span>The DerivationScheme represents the destination of the funds received by your invoice. It is generated by your wallet software. Please, verify that you are generating the right addresses by clicking on 'Check ExtPubKey'</span>
</div>
<div class="form-group">
<label asp-for="DerivationScheme"></label>
2019-05-25 04:45:36 +02:00
<input asp-for="DerivationScheme" class="form-control store-derivation-scheme" />
2018-03-18 06:15:23 +01:00
<span asp-validation-for="DerivationScheme" class="text-danger"></span>
2019-05-25 05:53:03 +02:00
2019-05-25 04:45:36 +02:00
<div class="dropdown mt-2 text-right">
<div class="btn-group">
2019-05-25 05:53:03 +02:00
<button class="btn btn-link dropdown-toggle" type="button" id="hardwarewlletimportdropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Import from hardware device
</button>
2019-05-25 04:45:36 +02:00
<div class="dropdown-menu dropdown-menu-right w-100" aria-labelledby="hardwarewlletimportdropdown">
<button class="dropdown-item" type="button" data-toggle="modal" data-target="#coldcardimport">Coldcard</button>
2019-05-25 05:53:03 +02:00
<button class="dropdown-item check-for-ledger" data-toggle="modal" data-target="#ledgerimport" type="button">Ledger Wallet</button>
2019-05-25 04:45:36 +02:00
@* <button class="dropdown-item check-for-trezor" type="button" data-toggle="modal" data-target="#trezorimport">Trezor</button> *@
2019-01-28 09:07:01 +01:00
</div>
2019-05-25 05:53:03 +02:00
</div>
2019-05-25 04:45:36 +02:00
</div>
2018-03-18 06:15:23 +01:00
</div>
<div class="form-group">
<span>BTCPay format memo</span>
2018-04-08 07:06:47 +02:00
<table class="table table-sm table-responsive-md">
2018-04-06 06:20:12 +02:00
<thead>
2018-03-18 06:15:23 +01:00
<tr>
<th>Address type</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td>P2WPKH</td>
2019-01-31 09:00:15 +01:00
<td>xpub...</td>
2018-03-18 06:15:23 +01:00
</tr>
<tr>
<td>P2SH-P2WPKH</td>
2019-01-31 09:00:15 +01:00
<td>xpub...-[p2sh]</td>
2018-03-18 06:15:23 +01:00
</tr>
<tr>
<td>P2PKH</td>
2019-01-31 09:00:15 +01:00
<td>xpub...-[legacy]</td>
2018-03-18 06:15:23 +01:00
</tr>
<tr>
<td>Multi-sig P2WSH</td>
2019-01-31 09:00:15 +01:00
<td>2-of-xpub1...-xpub2...</td>
2018-03-18 06:15:23 +01:00
</tr>
<tr>
<td>Multi-sig P2SH-P2WSH</td>
2019-01-31 09:00:15 +01:00
<td>2-of-xpub1...-xpub2...-[p2sh]</td>
2018-03-18 06:15:23 +01:00
</tr>
<tr>
<td>Multi-sig P2SH</td>
2019-01-31 09:00:15 +01:00
<td>2-of-xpub1...-xpub2...-[legacy]</td>
2018-03-18 06:15:23 +01:00
</tr>
</tbody>
</table>
</div>
2019-05-25 05:53:03 +02:00
<div class="form-group hw-fields">
<h5>Additional pairing information</h5>
</div>
<div class="form-group hw-fields">
<label asp-for="Source"></label>
<input asp-for="Source" class="form-control" readonly />
</div>
<div class="form-group hw-fields">
<label asp-for="RootFingerprint"></label>
<input asp-for="RootFingerprint" class="form-control" readonly />
</div>
<div class="form-group hw-fields">
<label asp-for="KeyPath"></label>
<input asp-for="KeyPath" class="form-control" readonly />
</div>
2018-07-30 17:26:49 +02:00
<div class="form-group">
<label asp-for="Enabled"></label>
<input asp-for="Enabled" type="checkbox" class="form-check" />
2018-07-27 13:37:16 +02:00
</div>
2019-05-12 10:13:26 +02:00
<button name="command" type="submit" class="btn btn-primary" value="save" id="Continue">Continue</button>
2018-03-18 06:15:23 +01:00
}
else
2018-02-07 13:59:16 +01:00
{
2018-03-18 06:15:23 +01:00
<div class="form-group">
2018-03-20 18:48:11 +01:00
<h5>Confirm the addresses (@Model.CryptoCode)</h5>
<span>Please check that your @Model.CryptoCode wallet is generating the same addresses as below.</span>
2018-03-18 06:15:23 +01:00
</div>
2019-05-25 05:53:03 +02:00
<input asp-for="Confirmation" type="hidden" />
2018-03-18 06:15:23 +01:00
<input type="hidden" asp-for="DerivationScheme" />
2018-07-27 13:37:16 +02:00
<input type="hidden" asp-for="Enabled" />
2018-03-18 06:15:23 +01:00
<div class="form-group">
2018-04-08 07:06:47 +02:00
<table class="table table-sm table-responsive-md">
2018-04-06 06:20:12 +02:00
<thead>
2018-03-18 06:15:23 +01:00
<tr>
<th>Key path</th>
<th>Address</th>
</tr>
</thead>
<tbody>
2018-12-04 13:22:27 +01:00
@foreach (var sample in Model.AddressSamples)
2018-03-18 06:15:23 +01:00
{
<tr>
<td>@sample.KeyPath</td>
<td>@sample.Address</td>
</tr>
}
</tbody>
</table>
</div>
2018-03-24 12:40:26 +01:00
<div class="form-group">
<h5>Wrong addresses?</h5>
<span>Help us to find the correct settings by telling us the first address of your wallet</span>
</div>
<div class="form-group">
<label asp-for="HintAddress"></label>
<input asp-for="HintAddress" class="form-control" />
<span asp-validation-for="HintAddress" class="text-danger"></span>
</div>
2019-05-12 10:13:26 +02:00
<button name="command" type="submit" class="btn btn-primary" value="save" id="Confirm">Confirm</button>
2018-03-18 06:15:23 +01:00
}
2018-01-08 14:45:09 +01:00
</form>
</div>
</div>
@section Scripts {
@await Html.PartialAsync("_ValidationScriptsPartial")
2019-05-25 05:53:03 +02:00
<script src="~/js/ledgerwebsocket.js" type="text/javascript" defer="defer"></script>
<script src="~/js/StoreAddDerivationScheme.js" type="text/javascript" defer="defer"></script>
<script src="~/vendor/trezor/trezor.js-umd.min.js" defer="defer"></script>
<script src="~/js/trezor/trezor-client.js" type="text/javascript" defer="defer"></script>
<script src="~/js/trezor/trezor-add-derivation-scheme.js" type="text/javascript" defer="defer"></script>
2019-05-25 04:45:36 +02:00
<script>
window.coinName = "@Model.Network.DisplayName.ToLowerInvariant()";
</script>
2018-01-08 14:45:09 +01:00
}