Moving to production
To move your project to production, you will have to replace the evaluation invite code with a partner certificate issued by Greenlight.
Rust
// 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,
},
};
Swift
// Read your Greenlight credentials from secure storage
let deviceKey = [UInt8]()
let deviceCert = [UInt8]()
let greenlightCredentials = GreenlightCredentials(deviceKey: deviceKey, deviceCert: deviceCert)
let nodeConfig = NodeConfig.greenlight(
config: GreenlightNodeConfig(partnerCredentials: greenlightCredentials, inviteCode: nil))
Kotlin
// Read your Greenlight credentials from secure storage
val deviceKey = emptyList<UByte>()
val deviceCert = emptyList<UByte>()
val greenlightCredentials = GreenlightCredentials(deviceKey, deviceCert)
val nodeConfig = NodeConfig.Greenlight(GreenlightNodeConfig(greenlightCredentials, null))
React Native
// Read your Greenlight credentials from secure storage
const deviceKey: number[] = []
const deviceCert: number[] = []
const greenlightCredentials: GreenlightCredentials = {
deviceKey,
deviceCert
}
const nodeConfig: NodeConfig = {
type: NodeConfigVariant.GREENLIGHT,
config: {
partnerCredentials: greenlightCredentials
}
}
Dart
// Read your Greenlight credentials from secure storage
Uint8List deviceKey = Uint8List(0);
Uint8List deviceCert = Uint8List(0);
GreenlightCredentials greenlightCredentials = GreenlightCredentials(
deviceKey: deviceKey,
deviceCert: deviceCert,
);
NodeConfig nodeConfig = NodeConfig.greenlight(
config: GreenlightNodeConfig(
partnerCredentials: greenlightCredentials,
inviteCode: null,
),
);
Python
# 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))
Go
// Read your Greenlight credentials from secure storage
deviceKey := []uint8{}
deviceCert := []uint8{}
greenlightCredentials := breez_sdk.GreenlightCredentials{
DeviceKey: deviceKey,
DeviceCert: deviceCert,
}
nodeConfig := breez_sdk.NodeConfigGreenlight{
Config: breez_sdk.GreenlightNodeConfig{
PartnerCredentials: &greenlightCredentials,
InviteCode: nil,
},
}
C#
// Read your Greenlight credentials from secure storage
var deviceKey = new List<byte>();
var deviceCert = new List<byte>();
var greenlightCredentials = new GreenlightCredentials(deviceKey, deviceCert);
var nodeConfig = new NodeConfig.Greenlight(
new GreenlightNodeConfig(greenlightCredentials, null)
);
To obtain a certificate for a production environment, please register here and make sure to notify your LSP(s).