mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 13:54:20 +01:00
Add production Greenlight credentials example
This commit is contained in:
@@ -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()
|
||||
|
||||
13
snippets/python/src/production.py
Normal file
13
snippets/python/src/production.py
Normal 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
|
||||
Reference in New Issue
Block a user