Add production Greenlight credentials example

This commit is contained in:
Ross Savage
2023-11-29 15:15:29 +01:00
parent cd8f2bb57a
commit 1d9b3f1408
11 changed files with 237 additions and 1 deletions

View File

@@ -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;

View 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)
}