Replace rust,no_run with rust,ignore to skip generating main() stub

This commit is contained in:
ok300
2023-08-04 14:03:32 +02:00
parent 5b1bdc99f5
commit 40f9a1cfd2
6 changed files with 12 additions and 12 deletions

View File

@@ -20,7 +20,7 @@ Breez SDK is available in several platforms. Follow the [Installing](install.md)
<section>
## Connecting
```rust,no_run
```rust,ignore
let mnemonic = Mnemonic::generate_in(Language::English, 12)?;
let seed = mnemonic.to_seed("");
let invite_code = Some("...".into());
@@ -51,7 +51,7 @@ let sdk = BreezServices::connect(
At any point we can fetch our balance from the Greenlight node:
```rust,no_run
```rust,ignore
if let Some(node_state) = sdk.node_info()? {
let balance_ln = node_state.channels_balance_msat;
let balance_onchain = node_state.onchain_balance_msat;

View File

@@ -5,7 +5,7 @@
<div slot="title">Rust</div>
<section>
```rust,no_run
```rust,ignore
// Endpoint can also be of the form:
// keyauth://domain.com/auth?key=val
let lnurl_auth_url = "lnurl1dp68gurn8ghj7mr0vdskc6r0wd6z7mrww4excttvdankjm3lw3skw0tvdankjm3xdvcn6vtp8q6n2dfsx5mrjwtrxdjnqvtzv56rzcnyv3jrxv3sxqmkyenrvv6kve3exv6nqdtyv43nqcmzvdsnvdrzx33rsenxx5unqc3cxgeqgntfgu";

View File

@@ -6,7 +6,7 @@
<div slot="title">Rust</div>
<section>
```rust,no_run
```rust,ignore
// Endpoint can also be of the form:
// lnurlp://domain.com/lnurl-pay?key=val
// lnurl1dp68gurn8ghj7mr0vdskc6r0wd6z7mrww4excttsv9un7um9wdekjmmw84jxywf5x43rvv35xgmr2enrxanr2cfcvsmnwe3jxcukvde48qukgdec89snwde3vfjxvepjxpjnjvtpxd3kvdnxx5crxwpjvyunsephsz36jf

View File

@@ -7,7 +7,7 @@
<div slot="title">Rust</div>
<section>
```rust,no_run
```rust,ignore
// Endpoint can also be of the form:
// lnurlw://domain.com/lnurl-withdraw?key=val
let lnurl_withdraw_url = "lnurl1dp68gurn8ghj7mr0vdskc6r0wd6z7mrww4exctthd96xserjv9mn7um9wdekjmmw843xxwpexdnxzen9vgunsvfexq6rvdecx93rgdmyxcuxverrvcursenpxvukzv3c8qunsdecx33nzwpnvg6ryc3hv93nzvecxgcxgwp3h33lxk";

View File

@@ -8,18 +8,18 @@
Breez SDK doesn't require you to open a channel and set up your inbound liquidity.
Breez SDK automatically connects your node to the LSP peer and you can now receive payments:
```rust,no_run
```rust,ignore
let invoice = sdk.receive_payment(3000, "Invoice for 3000 sats".into()).await?;
```
## Sending Lightning Payments
```rust,no_run
```rust,ignore
let bolt11 = "...";
sdk.send_payment(bolt11.into(), Some(3000)).await?;
```
## Sending Spontaneous Lightning Payments
```rust,no_run
```rust,ignore
let node_id = "...";
sdk.send_payment(node_id.into(), Some(3000)).await?;
```

View File

@@ -8,7 +8,7 @@ First, fetch the current reverse swap fees:
<div slot="title">Rust</div>
<section>
```rust,no_run
```rust,ignore
let current_fees = sdk.fetch_reverse_swap_fees().await?;
info!("Percentage fee for the reverse swap service: {}", current_fees.fees_percentage);
@@ -22,14 +22,14 @@ of the total costs.
Fetching the fees also tells you what is the range of amounts you can send:
```rust,no_run
```rust,ignore
info!("Minimum amount, in sats: {}", current_fees.min);
info!("Maximum amount, in sats: {}", current_fees.max);
```
Once you checked the fees are acceptable, you can start the reverse swap:
```rust,no_run
```rust,ignore
let destination_address = String::from("bc1..");
let amount_sat = current_fees.min;
@@ -42,7 +42,7 @@ is either settled or cancelled. This will happen automatically at the end of the
You can check its status with:
```rust,no_run
```rust,ignore
for rs in sdk.in_progress_reverse_swaps().await? {
info!("Reverse swap {} in progress, status is {}", rs.id, rs.status);
}