Bootstrap V1

This commit is contained in:
Christien Rioux 2025-05-06 13:19:30 -04:00
parent 387e297a7b
commit dad05e672b
58 changed files with 2891 additions and 1048 deletions

View file

@ -9,6 +9,7 @@ Future<VeilidConfig> getDefaultVeilidConfig({
required bool isWeb,
required String programName,
String bootstrap = '',
String? bootstrapKeys,
String namespace = '',
String deviceEncryptionKeyPassword = '',
String? newDeviceEncryptionKeyPassword,
@ -40,10 +41,15 @@ Future<VeilidConfig> getDefaultVeilidConfig({
newDeviceEncryptionKeyPassword: newDeviceEncryptionKeyPassword,
),
network: defaultConfig.network.copyWith(
networkKeyPassword: networkKeyPassword,
routingTable: defaultConfig.network.routingTable.copyWith(
bootstrap: bootstrap.isNotEmpty
? bootstrap.split(',')
: defaultConfig.network.routingTable.bootstrap),
dht: defaultConfig.network.dht.copyWith()));
networkKeyPassword: networkKeyPassword,
routingTable: defaultConfig.network.routingTable.copyWith(
bootstrap: bootstrap.isNotEmpty
? bootstrap.split(',')
: defaultConfig.network.routingTable.bootstrap,
bootstrapKeys: bootstrapKeys != null
? bootstrapKeys.isNotEmpty
? bootstrapKeys.split(',').map(TypedKey.fromString).toList()
: []
: defaultConfig.network.routingTable.bootstrapKeys),
));
}