From 3875f218e385a46e522e312ccb6e9406deb2cd74 Mon Sep 17 00:00:00 2001 From: Ross Savage Date: Tue, 5 Dec 2023 09:49:00 +0100 Subject: [PATCH] Add more linkable titles to the docs --- src/guide/connecting_lsp.md | 9 +++++++-- src/guide/getting_started.md | 2 ++ src/guide/install.md | 2 +- src/guide/receive_onchain.md | 6 ++++++ src/guide/send_onchain.md | 4 +++- 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/guide/connecting_lsp.md b/src/guide/connecting_lsp.md index e6e123cc..2c8491e5 100644 --- a/src/guide/connecting_lsp.md +++ b/src/guide/connecting_lsp.md @@ -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: @@ -68,6 +70,8 @@ Based on the API key provided to the Breez SDK, a default LSP is selected for yo +## Listing available LSPs + In order to list all available LSPs you may connect to, you may do the following: @@ -136,6 +140,8 @@ In order to list all available LSPs you may connect to, you may do the following +## Switching to another LSP + When you have selected an LSP you may then connect to it: @@ -204,8 +210,7 @@ When you have selected an LSP you may then connect to it: - -## 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. diff --git a/src/guide/getting_started.md b/src/guide/getting_started.md index 423fdbca..8b5f79c9 100644 --- a/src/guide/getting_started.md +++ b/src/guide/getting_started.md @@ -107,6 +107,8 @@ Now you are ready to interact with the SDK. +## Getting the Node State + At any point we can fetch our balance from the Greenlight node: diff --git a/src/guide/install.md b/src/guide/install.md index db90f4ab..a491490b 100644 --- a/src/guide/install.md +++ b/src/guide/install.md @@ -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 diff --git a/src/guide/receive_onchain.md b/src/guide/receive_onchain.md index 50843a17..47092f18 100644 --- a/src/guide/receive_onchain.md +++ b/src/guide/receive_onchain.md @@ -72,6 +72,8 @@ In order to receive funds you first have to be connected to an [LSP](connecting_ +## 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: @@ -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: @@ -214,6 +218,8 @@ In order to execute a refund, you need to supply an on-chain address to where th +## Refund a Swap + Once you have a refundable swap in hand, use the following code to execute a refund: diff --git a/src/guide/send_onchain.md b/src/guide/send_onchain.md index a6a06643..82b49030 100644 --- a/src/guide/send_onchain.md +++ b/src/guide/send_onchain.md @@ -212,7 +212,7 @@ In case you want to drain your channels you need to know the maximum sendable am -## 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: