mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 05:44:20 +01:00
Merge pull request #107 from breez/savage-node-info-title
Add more linkable titles
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
# Connecting to an LSP
|
||||
|
||||
## Getting the current LSP Information
|
||||
|
||||
Based on the API key provided to the Breez SDK, a default LSP is selected for your node to provide liquidity to it. To get the information about the selected LSP you can do the following:
|
||||
|
||||
<custom-tabs category="lang">
|
||||
@@ -68,6 +70,8 @@ Based on the API key provided to the Breez SDK, a default LSP is selected for yo
|
||||
</section>
|
||||
</custom-tabs>
|
||||
|
||||
## Listing available LSPs
|
||||
|
||||
In order to list all available LSPs you may connect to, you may do the following:
|
||||
|
||||
<custom-tabs category="lang">
|
||||
@@ -136,6 +140,8 @@ In order to list all available LSPs you may connect to, you may do the following
|
||||
</section>
|
||||
</custom-tabs>
|
||||
|
||||
## Switching to another LSP
|
||||
|
||||
When you have selected an LSP you may then connect to it:
|
||||
|
||||
<custom-tabs category="lang">
|
||||
@@ -204,8 +210,7 @@ When you have selected an LSP you may then connect to it:
|
||||
</section>
|
||||
</custom-tabs>
|
||||
|
||||
|
||||
## Channel Opening Fees
|
||||
# Channel Opening Fees
|
||||
|
||||
Some Breez SDK operations[^1] may need opening a new channel with the LSP. The SDK supports the LSP2 dynamic fees spec[^2],
|
||||
which describes how these channel opening fees are handled.
|
||||
|
||||
@@ -107,6 +107,8 @@ Now you are ready to interact with the SDK.
|
||||
</section>
|
||||
</custom-tabs>
|
||||
|
||||
## Getting the Node State
|
||||
|
||||
At any point we can fetch our balance from the Greenlight node:
|
||||
|
||||
<custom-tabs category="lang">
|
||||
|
||||
@@ -93,7 +93,7 @@ Check https://github.com/breez/breez-sdk/releases for the latest version.
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
breez-sdk-core = { git = "https://github.com/breez/breez-sdk", tag = "0.2.7" }
|
||||
breez-sdk-core = { git = "https://github.com/breez/breez-sdk", tag = "0.2.10" }
|
||||
```
|
||||
|
||||
## Flutter/Dart
|
||||
|
||||
@@ -72,6 +72,8 @@ In order to receive funds you first have to be connected to an [LSP](connecting_
|
||||
</section>
|
||||
</custom-tabs>
|
||||
|
||||
## Get the in-progress Swap
|
||||
|
||||
Once you've sent the funds to the above address, the SDK will monitor this address for unspent confirmed outputs and use a trustless submarine swap to receive these into your Lightning node. You can always monitor the status of the current in-progress swap using the following code:
|
||||
|
||||
<custom-tabs category="lang">
|
||||
@@ -146,6 +148,8 @@ The process of receiving funds via an on-chain address is trustless and uses a s
|
||||
1. Either by a preimage that is exposed when the Lightning payment is completed - this is the positive case where the swap was successful.
|
||||
2. Or by your node when the swap didn't complete within a certain timeout - this is the negative case where your node will execute a refund.
|
||||
|
||||
## List refundable Swaps
|
||||
|
||||
In order to execute a refund, you need to supply an on-chain address to where the refunded amount will be sent. The following code will retrieve the refundable swaps:
|
||||
|
||||
<custom-tabs category="lang">
|
||||
@@ -214,6 +218,8 @@ In order to execute a refund, you need to supply an on-chain address to where th
|
||||
</section>
|
||||
</custom-tabs>
|
||||
|
||||
## Refund a Swap
|
||||
|
||||
Once you have a refundable swap in hand, use the following code to execute a refund:
|
||||
|
||||
<custom-tabs category="lang">
|
||||
|
||||
@@ -212,7 +212,7 @@ In case you want to drain your channels you need to know the maximum sendable am
|
||||
</section>
|
||||
</custom-tabs>
|
||||
|
||||
## Executing the swap
|
||||
## Executing the Swap
|
||||
|
||||
Once you decided about the amount and checked the fees are acceptable, you can start the reverse swap:
|
||||
|
||||
@@ -286,6 +286,8 @@ Starting the reverse swap will trigger a HODL invoice payment, which will only b
|
||||
This means you will see an outgoing pending payment in your list of payments, which locks those funds until the invoice
|
||||
is either settled or cancelled. This will happen automatically at the end of the reverse swap.
|
||||
|
||||
## List in-progress Swaps
|
||||
|
||||
You can check its status with:
|
||||
|
||||
<custom-tabs category="lang">
|
||||
|
||||
Reference in New Issue
Block a user