File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed
Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,9 @@ pub struct ValidatorInfo {
132132 pub is_active : bool ,
133133 pub last_seen : chrono:: DateTime < chrono:: Utc > ,
134134 pub peer_id : Option < String > ,
135+ /// X25519 public key for API key encryption (hex, 32 bytes)
136+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
137+ pub x25519_pubkey : Option < String > ,
135138}
136139
137140impl ValidatorInfo {
@@ -142,6 +145,7 @@ impl ValidatorInfo {
142145 is_active : true ,
143146 last_seen : chrono:: Utc :: now ( ) ,
144147 peer_id : None ,
148+ x25519_pubkey : None ,
145149 }
146150 }
147151}
Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ pub async fn validators_handler(
9797 is_active : v. is_active ,
9898 last_seen : v. last_seen ,
9999 peer_id : v. peer_id . clone ( ) ,
100+ x25519_pubkey : v. x25519_pubkey . clone ( ) ,
100101 } )
101102 . collect ( ) ;
102103
@@ -389,6 +390,7 @@ pub async fn sync_handler(State(state): State<Arc<RpcState>>) -> Json<RpcRespons
389390 is_active : v. is_active ,
390391 last_seen : v. last_seen ,
391392 peer_id : v. peer_id . clone ( ) ,
393+ x25519_pubkey : v. x25519_pubkey . clone ( ) ,
392394 } )
393395 . collect ( ) ;
394396
Original file line number Diff line number Diff line change @@ -63,6 +63,10 @@ pub struct ValidatorResponse {
6363 pub is_active : bool ,
6464 pub last_seen : DateTime < Utc > ,
6565 pub peer_id : Option < String > ,
66+ /// X25519 public key for API key encryption (hex, 32 bytes)
67+ /// Derived from validator's sr25519 seed
68+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
69+ pub x25519_pubkey : Option < String > ,
6670}
6771
6872/// Challenge info for RPC
You can’t perform that action at this time.
0 commit comments