Update connect() snippet

This commit is contained in:
ok300
2023-08-04 13:58:10 +02:00
parent 1addf404e9
commit 5b1bdc99f5

View File

@@ -21,14 +21,18 @@ Breez SDK is available in several platforms. Follow the [Installing](install.md)
## Connecting ## Connecting
```rust,no_run ```rust,no_run
let mnemonic = Mnemonic::generate_in(Language::English, 12)?;
let seed = mnemonic.to_seed("");
let invite_code = Some("...".into());
// Create the default config // Create the default config
let config = BreezServices::default_config( let mut config = BreezServices::default_config(
EnvironmentType::Production, EnvironmentType::Production,
"your API key".into(), "your API key".into(),
breez_sdk_core::NodeConfig::Greenlight { breez_sdk_core::NodeConfig::Greenlight {
config: GreenlightNodeConfig { config: GreenlightNodeConfig {
partner_credentials: None, partner_credentials: None,
invite_code: None, invite_code
}, },
}, },
); );