2019-05-11 00:29:29 +09:00
|
|
|
@model WalletPSBTViewModel
|
|
|
|
@{
|
|
|
|
Layout = "../Shared/_NavLayout.cshtml";
|
|
|
|
ViewData["Title"] = "PSBT";
|
|
|
|
ViewData.SetActivePageAndTitle(WalletsNavPages.PSBT);
|
|
|
|
}
|
2019-05-12 13:13:52 +09:00
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-10 text-center">
|
|
|
|
<partial name="_StatusMessage" for="@TempData["TempDataProperty-StatusMessage"]" />
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-05-11 00:29:29 +09:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-10">
|
2019-05-12 00:05:30 +09:00
|
|
|
@if (Model.Errors != null && Model.Errors.Count != 0)
|
|
|
|
{
|
|
|
|
<div class="alert alert-danger alert-dismissible" role="alert">
|
|
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
|
|
@foreach (var error in Model.Errors)
|
|
|
|
{
|
|
|
|
<span>@error</span><br />
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
}
|
2019-05-11 00:29:29 +09:00
|
|
|
@if (!string.IsNullOrEmpty(Model.Decoded))
|
|
|
|
{
|
|
|
|
<h3>Decoded PSBT</h3>
|
2019-05-11 20:26:31 +09:00
|
|
|
<div class="form-group">
|
2019-05-12 13:13:52 +09:00
|
|
|
<form method="post" asp-action="WalletPSBT">
|
2019-05-12 00:05:30 +09:00
|
|
|
<div class="dropdown" style="margin-top:16px;">
|
|
|
|
<button class="btn btn-primary dropdown-toggle" type="button" id="SendMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
|
Sign with...
|
|
|
|
</button>
|
2019-05-11 20:26:31 +09:00
|
|
|
<input type="hidden" asp-for="PSBT" />
|
|
|
|
<div class="dropdown-menu" aria-labelledby="SendMenu">
|
|
|
|
<button name="command" type="submit" class="dropdown-item" value="ledger">... your Ledger Wallet device</button>
|
|
|
|
<button name="command" type="submit" class="dropdown-item" value="save-psbt">... a wallet supporting PSBT files</button>
|
2019-05-14 16:03:48 +00:00
|
|
|
<button name="command" type="submit" class="dropdown-item" value="seed">... an HD private key or mnemonic seed</button>
|
2019-05-11 20:26:31 +09:00
|
|
|
</div>
|
2019-05-12 15:16:40 +09:00
|
|
|
<button name="command" type="submit" class="btn btn-secondary" value="broadcast">Broadcast</button>
|
|
|
|
<button name="command" type="submit" class="btn btn-secondary" value="combine">Combine with another PSBT</button>
|
2019-05-12 00:05:30 +09:00
|
|
|
</div>
|
|
|
|
</form>
|
2019-05-11 20:26:31 +09:00
|
|
|
</div>
|
2019-05-12 14:51:24 +09:00
|
|
|
<pre><code class="json">@Model.Decoded</code></pre>
|
2019-05-11 00:29:29 +09:00
|
|
|
}
|
|
|
|
<h3>PSBT to decode</h3>
|
|
|
|
<form class="form-group" method="post" asp-action="WalletPSBT">
|
|
|
|
<div class="form-group">
|
|
|
|
<textarea class="form-control" rows="5" asp-for="PSBT"></textarea>
|
|
|
|
<span asp-validation-for="PSBT" class="text-danger"></span>
|
|
|
|
</div>
|
|
|
|
<button type="submit" class="btn btn-primary">Decode</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@section Scripts {
|
|
|
|
<link rel="stylesheet" href="~/vendor/highlightjs/default.min.css">
|
|
|
|
<script src="~/vendor/highlightjs/highlight.min.js"></script>
|
|
|
|
<script>hljs.initHighlightingOnLoad();</script>
|
|
|
|
}
|