fix type in config

This commit is contained in:
John Smith 2023-07-02 11:31:53 -04:00
parent 82e87042a4
commit 77c068cd19
2 changed files with 8 additions and 6 deletions

View File

@ -645,8 +645,8 @@ class VeilidConfigRPC {
////////////
class VeilidConfigRoutingTable {
List<PublicKey> nodeId;
List<PublicKey> nodeIdSecret;
List<TypedKey> nodeId;
List<TypedSecret> nodeIdSecret;
List<String> bootstrap;
int limitOverAttached;
int limitFullyAttached;
@ -679,10 +679,10 @@ class VeilidConfigRoutingTable {
}
VeilidConfigRoutingTable.fromJson(dynamic json)
: nodeId = List<PublicKey>.from(
json['node_id'].map((j) => PublicKey.fromJson(j))),
nodeIdSecret = List<PublicKey>.from(
json['node_id_secret'].map((j) => PublicKey.fromJson(j))),
: nodeId = List<TypedKey>.from(
json['node_id'].map((j) => TypedKey.fromJson(j))),
nodeIdSecret = List<TypedSecret>.from(
json['node_id_secret'].map((j) => TypedSecret.fromJson(j))),
bootstrap = List<String>.from(json['bootstrap'].map((j) => j)),
limitOverAttached = json['limit_over_attached'],
limitFullyAttached = json['limit_fully_attached'],

View File

@ -132,6 +132,8 @@ typedef SharedSecret = CryptoKey;
typedef CryptoKeyDistance = CryptoKey;
typedef TypedKey = Typed<CryptoKey>;
typedef TypedSecret = Typed<SecretKey>;
typedef TypedSignature = Typed<Signature>;
//////////////////////////////////////