diff --git a/src/guide/buy_btc.md b/src/guide/buy_btc.md
index 713bdd5..7793e1a 100644
--- a/src/guide/buy_btc.md
+++ b/src/guide/buy_btc.md
@@ -7,10 +7,13 @@ This section of the Breez SDK documentation provides an example on purchasing Bi
Rust
-```rust
-// TODO add docs
+```rust,ignore
+let res = sdk.buy_bitcoin(
+ BuyBitcoinRequest {
+ provider: BuyBitcoinProvider::Moonpay,
+ opening_fee_params: None})
+ .await?;
```
-
Swift
@@ -23,7 +26,6 @@ do {
} catch {
// handle error
}
-
```
@@ -59,7 +61,6 @@ try {
} catch {
// Handle error
}
-
```
@@ -93,4 +94,5 @@ buyBitcoinResponse, err := sdkService.BuyBitcoin(breez_sdk.BuyBitcoinRequest{
```cs
// TODO add docs
```
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/src/guide/connecting_lsp.md b/src/guide/connecting_lsp.md
index 1dc962c..f586c65 100644
--- a/src/guide/connecting_lsp.md
+++ b/src/guide/connecting_lsp.md
@@ -3,6 +3,15 @@
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:
+Rust
+
+
+```rust,ignore
+let lsp_id = sdk.lsp_id().await?;
+let lsp_info = sdk.lsp_info().await?;
+```
+
+
Swift
@@ -107,6 +116,14 @@ catch (Exception)
When you have selected an LSP you may then connect to it.
+Rust
+
+
+```rust,ignore
+sdk.connect_lsp(lsp_id).await?;
+```
+
+
Swift
diff --git a/src/guide/payments.md b/src/guide/payments.md
index 4632179..bee62db 100644
--- a/src/guide/payments.md
+++ b/src/guide/payments.md
@@ -10,7 +10,17 @@ Breez SDK automatically connects your node to the LSP peer and you can now recei
```rust,ignore
-let invoice = sdk.receive_payment(3000, "Invoice for 3000 sats".into()).await?;
+let res = sdk.receive_payment(
+ ReceivePaymentRequest {
+ amount_sats: 3000,
+ description: "Invoice for 3000 sats".into(),
+ cltv: None,
+ expiry: None,
+ opening_fee_params: None,
+ preimage: None,
+ use_description_hash: None
+ })
+ .await?;
```
@@ -122,7 +132,7 @@ catch (Exception)
```rust,ignore
let bolt11 = "...";
-sdk.send_payment(bolt11.into(), Some(3000)).await?;
+sdk.send_payment(bolt11.into(), None).await?;
```
diff --git a/src/guide/receive_onchain.md b/src/guide/receive_onchain.md
index af582d1..b6603b4 100644
--- a/src/guide/receive_onchain.md
+++ b/src/guide/receive_onchain.md
@@ -10,10 +10,9 @@ In order to receive funds you first have to be connected to an [LSP](connecting_
```rust,ignore
-// Optional user-selected dynamic fees (see Connecting to LSP section for details)
-let opening_fee_params = None;
-
-let swap_info = sdk.receive_onchain( ReceiveOnchainRequest { opening_fee_params } ).await?;
+let swap_info = sdk.receive_onchain(
+ ReceiveOnchainRequest { opening_fee_params: None } )
+ .await?;
// Send your funds to the below bitcoin address
let address = swap_info.bitcoin_address;
diff --git a/src/guide/send_onchain.md b/src/guide/send_onchain.md
index 96f923a..d8c3f8e 100644
--- a/src/guide/send_onchain.md
+++ b/src/guide/send_onchain.md
@@ -12,7 +12,6 @@ First, fetch the current reverse swap fees:
let current_fees = sdk.fetch_reverse_swap_fees().await?;
info!("Total estimated fees for reverse swap: {}", current_fees.total_estimated_fees);
-
```
@@ -203,8 +202,9 @@ Once you checked the fees are acceptable, you can start the reverse swap:
```rust,ignore
let destination_address = String::from("bc1..");
let amount_sat = current_fees.min;
+let satPerVbyte = ;
-sdk.send_onchain(amount_sat, destination_address, current_fees.fees_hash).await?;
+sdk.send_onchain(amount_sat, destination_address, current_fees.fees_hash, satPerVbyte).await?;
```