mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 22:04:21 +01:00
Add production Greenlight credentials example
This commit is contained in:
@@ -6,6 +6,7 @@ mod list_payments;
|
||||
mod lnurl_auth;
|
||||
mod lnurl_pay;
|
||||
mod lnurl_withdraw;
|
||||
mod production;
|
||||
mod receive_onchain;
|
||||
mod receive_payment;
|
||||
mod send_onchain;
|
||||
|
||||
23
snippets/rust/src/production.rs
Normal file
23
snippets/rust/src/production.rs
Normal file
@@ -0,0 +1,23 @@
|
||||
use anyhow::Result;
|
||||
use breez_sdk_core::*;
|
||||
|
||||
|
||||
fn production_node_config() -> Result<NodeConfig> {
|
||||
// ANCHOR: moving-to-production
|
||||
// Read your Greenlight credentials from secure storage
|
||||
let device_key: Vec<u8> = vec![];
|
||||
let device_cert: Vec<u8> = vec![];
|
||||
let greenlight_credentials = GreenlightCredentials {
|
||||
device_key,
|
||||
device_cert,
|
||||
};
|
||||
|
||||
let node_config = NodeConfig::Greenlight {
|
||||
config: GreenlightNodeConfig {
|
||||
partner_credentials: Some(greenlight_credentials),
|
||||
invite_code: None,
|
||||
},
|
||||
};
|
||||
// ANCHOR_END: moving-to-production
|
||||
Ok(node_config)
|
||||
}
|
||||
Reference in New Issue
Block a user