2018-02-26 18:58:02 +09:00
@model LightningNodeViewModel
2018-02-26 00:48:12 +09:00
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData["Title"] = "Add lightning node (Experimental)";
ViewData.AddActivePage(BTCPayServer.Views.Stores.StoreNavPages.Index);
}
<h4>@ViewData["Title"]</h4>
2018-05-08 17:57:53 +09:00
<partial name="_StatusMessage" for="StatusMessage" />
2018-02-26 16:13:10 +09:00
2018-02-26 00:48:12 +09:00
<div class="row">
2018-07-11 19:23:23 +09:00
<div class="col-md-10">
2018-02-26 00:48:12 +09:00
<form method="post">
<div class="form-group">
2018-07-11 19:23:23 +09:00
<p>This connection string encapsulates the necessary information BTCPay needs to connect to your lightning node, we currently support:</p>
<ul>
<li><code>clightning</code> via TCP or unix domain socket connection</li>
<li><code>lightning charge</code> via HTTPS</li>
<li><code>lnd</code> via the REST proxy</li>
</ul>
<table class="table table-sm table-responsive-md">
<thead>
<tr>
<th>Examples</th>
</tr>
</thead>
<tbody>
<tr>
<th class="small"><b>type=</b>clightning;<b>server=</b>unix://root/.lightning/lightning-rpc</th>
</tr>
<tr>
<th class="small"><b>type=</b>clightning;<b>server=</b>tcp://1.1.1.1:27743/</th>
</tr>
<tr>
<th class="small"><b>type=</b>lnd-rest;<b>server=</b>http://mylnd:8080/;<b>macaroonfilepath=</b>/root/.lnd/admin.macaroon;<b>allowinsecure=</b>true</th>
</tr>
<tr>
<th class="small"><b>type=</b>lnd-rest;<b>server=</b>https://mylnd:8080/;<b>macaroon=</b>abef263adfe...</th>
</tr>
<tr>
<th class="small"><b>type=</b>lnd-rest;<b>server=</b>https://mylnd:8080/;<b>macaroon=</b>abef263adfe...;<b>certthumbprint=</b>abef263adfe...</th>
</tr>
<tr>
<th class="small"><b>type=</b>charge;<b>server=</b>https://charge:8080/;<b>api-token=</b>myapitoken...</th>
</tr>
</tbody>
</table>
<p>Note that the <code>certthumbprint</code> to connect to your LND node can be obtained through this command line:</p>
<p><pre><code>openssl x509 -noout -fingerprint -sha256 -inform pem -in /root/.lnd/tls.cert</code></pre></p>
<p>You can omit <code>certthumprint</code> if you the certificate is trusted by your machine</p>
<p>You can set <code>allowinsecure</code> to <code>true</code> if your LND REST server is using HTTP or HTTPS with an untrusted certificate which you don't know the <code>certthumprint</code></p>
2018-02-26 00:48:12 +09:00
</div>
<div class="form-group">
2018-07-01 15:45:08 +09:00
<label asp-for="ConnectionString"></label>
<input id="lightningurl" asp-for="ConnectionString" class="form-control" />
<span asp-validation-for="ConnectionString" class="text-danger"></span>
2018-02-26 18:58:02 +09:00
@if(Model.InternalLightningNode != null)
{
<p class="form-text text-muted">
You can use the internal lightning node by <a href="#" onclick="$('#lightningurl').val('@Model.InternalLightningNode'); return false;">clicking here</a>
</p>
}
2018-02-26 00:48:12 +09:00
</div>
2018-04-08 00:08:15 -05:00
<button name="command" type="submit" value="save" class="btn btn-primary">Submit</button>
2018-04-08 00:25:00 -05:00
<button name="command" type="submit" value="test" class="btn btn-secondary">Test connection</button>
2018-02-26 00:48:12 +09:00
</form>
</div>
</div>
@section Scripts {
@await Html.PartialAsync("_ValidationScriptsPartial")
}