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

@@ -14,6 +14,8 @@ from src.fiat_currencies import list_supported_fiat_currencies, get_current_rate
from src.lnurl_auth import auth
from src.lnurl_pay import pay
from src.lnurl_withdraw import withdraw
from src.production import production_node_config
from src.service_status import health_check_status, report_payment_failure
import tempfile
import os
@@ -80,7 +82,12 @@ def main():
# lnurl withdraw
withdraw(sdk_services)
# moving to production
production_node_config()
# service status
health_check_status(sdk_services)
report_payment_failure(sdk_services)
# use temp_dir, and remove when done:
temp_dir.cleanup()

View File

@@ -0,0 +1,13 @@
import breez_sdk
def production_node_config():
# ANCHOR: moving-to-production
# Read your Greenlight credentials from secure storage
deviceKey = []
deviceCert = []
greenlightCredentials = breez_sdk.GreenlightCredentials(deviceKey, deviceCert)
node_config = breez_sdk.NodeConfig.GREENLIGHT(
breez_sdk.GreenlightNodeConfig(greenlightCredentials, None))
# ANCHOR_END: moving-to-production
return node_config