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:
21
snippets/dart_snippets/lib/production.dart
Normal file
21
snippets/dart_snippets/lib/production.dart
Normal file
@@ -0,0 +1,21 @@
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:breez_sdk/breez_sdk.dart';
|
||||
import 'package:breez_sdk/bridge_generated.dart';
|
||||
|
||||
NodeConfig productionNodeConfig() {
|
||||
// ANCHOR: moving-to-production
|
||||
// Read your Greenlight credentials from secure storage
|
||||
Uint8List deviceKey = Uint8List();
|
||||
Uint8List deviceCert = Uint8List();
|
||||
GreenlightCredentials greenlightCredentials = GreenlightCredentials(deviceKey, deviceCert);
|
||||
|
||||
NodeConfig nodeConfig = NodeConfig.greenlight(
|
||||
config: GreenlightNodeConfig(
|
||||
partnerCredentials: greenlightCredentials,
|
||||
inviteCode: null,
|
||||
),
|
||||
);
|
||||
// ANCHOR_END: moving-to-production
|
||||
return nodeConfig
|
||||
}
|
||||
Reference in New Issue
Block a user