mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-19 06:44:19 +01:00
Mark rust code blocks as no_run
This commit is contained in:
@@ -12,13 +12,13 @@ The Breez SDK provides the following services:
|
||||
Connecting to a node requires a seed (your master key) and credentials. The seed is a bip39 mnemonic and the credentials are retrieved by registering a new node or recovering an existing one.
|
||||
|
||||
## Registering a new node
|
||||
```rust
|
||||
```rust,no_run
|
||||
let seed = <your seed>;
|
||||
let credentials = BreezServices::register_node(Network::Bitcoin, seed).await?;
|
||||
```
|
||||
|
||||
## Recovering an existing node
|
||||
```rust
|
||||
```rust,no_run
|
||||
let seed = <your seed>;
|
||||
let credentials = BreezServices::register_node(Network::Bitcoin, seed).await?;
|
||||
```
|
||||
@@ -27,7 +27,7 @@ Once the credentials are retrieved they should be saved in a secured storage.
|
||||
The next step is to initialize the SDK and start the node:
|
||||
|
||||
## Initializing the SDK
|
||||
```rust
|
||||
```rust,no_run
|
||||
// Create the default config
|
||||
let config = BreezServices::default_config(EnvironmentType::Production)
|
||||
|
||||
@@ -48,7 +48,7 @@ BreezServices::start(rt(), &sdk).await?;
|
||||
|
||||
At any point we can fetch our balance from the Greenlight node:
|
||||
|
||||
```rust
|
||||
```rust,no_run
|
||||
if let Some(node_state) = sdk.node_info()? {
|
||||
let balance_ln = node_state.channels_balance_msat;
|
||||
let balance_onchain = node_state.onchain_balance_msat;
|
||||
|
||||
Reference in New Issue
Block a user