Improve Lightning Node setup examples (#4033)

* Catch connection string ToString errors

LNDhub connection string error fixed in btcpayserver/BTCPayServer.Lightning#92.

* Add Eclair bitcoin-host example

* Document LNDhub integration
This commit is contained in:
d11n 2022-09-09 16:01:20 +02:00 committed by GitHub
parent 267905b5e7
commit 3532789c35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 4 deletions

View File

@ -160,8 +160,17 @@ namespace BTCPayServer.Controllers
{
CryptoCode = paymentMethodId.CryptoCode
};
try
{
paymentMethod.SetLightningUrl(connectionString);
}
catch (Exception ex)
{
ModelState.AddModelError(nameof(vm.ConnectionString), ex.Message);
return View(vm);
}
}
switch (command)
{

View File

@ -122,11 +122,19 @@
</h2>
<div id="CustomNodeEclairContent" class="accordion-collapse collapse" aria-labelledby="CustomNodeEclairHeader" data-bs-parent="#CustomNodeSupport">
<div class="accordion-body">
<ul class="mb-0">
<ul class="pb-3">
<li>
<code><b>type=</b>eclair;<b>server=</b>https://eclair:8080/;<b>password=</b>eclairpassword...</code>
</li>
</ul>
<p class="mt-2">
Note that <code>bitcoin-host</code> and <code>bitcoin-auth</code> are optional, only useful if you want to use <code>GetDepositAddress</code> on Eclair:
</p>
<ul class="mb-0">
<li>
<code><b>type=</b>eclair;<b>server=</b>https://eclair:8080/;<b>password=</b>eclairpassword;<b>bitcoin-host=</b>bitcoin.host;<b>bitcoin-auth=</b>btcpass</code>
</li>
</ul>
</div>
</div>
</div>
@ -139,7 +147,7 @@
</h2>
<div id="CustomNodeLNDContent" class="accordion-collapse collapse" aria-labelledby="CustomNodeLNDHeader" data-bs-parent="#CustomNodeSupport">
<div class="accordion-body">
<ul class="pb-3">
<ul class="pb-2">
<li>
<code><b>type=</b>lnd-rest;<b>server=</b>https://mylnd:8080/;<b>macaroon=</b>abef263adfe...</code>
</li>
@ -147,7 +155,7 @@
<code><b>type=</b>lnd-rest;<b>server=</b>https://mylnd:8080/;<b>macaroon=</b>abef263adfe...;<b>certthumbprint=</b>abef263adfe...</code>
</li>
</ul>
<p class="mt-2">
<p>
For the macaroon options you need to provide the <code>admin.macaroon</code>.<br/>
The path to the LND data directory may vary, the following examples assume <code>/root/.lnd</code>.
</p>
@ -162,6 +170,30 @@
</div>
</div>
</div>
<div class="accordion-item">
<h2 class="accordion-header" id="CustomNodeLNDhubHeader">
<button type="button" class="accordion-button collapsed" data-bs-toggle="collapse" data-bs-target="#CustomNodeLNDhubContent" aria-controls="CustomNodeLNDhubContent" aria-expanded="false">
<span><strong>LNDhub</strong> via the REST API</span>
<vc:icon symbol="caret-down"/>
</button>
</h2>
<div id="CustomNodeLNDhubContent" class="accordion-collapse collapse" aria-labelledby="CustomNodeLNDhubHeader" data-bs-parent="#CustomNodeSupport">
<div class="accordion-body">
<ul class="pb-2">
<li>
<code><b>type=</b>lndhub;<b>server=</b>https://login:password@lndhub.io</code>
</li>
</ul>
<p class="my-2">The credentials and server address are shown as a <code>lndhub://</code> URL on the "Export/Backup" screen in BlueWallet.</p>
<p>You can also use this LNDhub-URL as the connection string and BTCPay Server converts it into the expected <code>type=lndhub</code> connection string format:</p>
<ul class="mb-0">
<li>
<code>lndhub://<b>login</b>:<b>password</b>@@<b>https://lndhub.io</b></code>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<vc:ui-extension-point location="ln-payment-method-setup-tab" model="@Model"/>