mirror of
https://gitlab.com/pezkuwichain/pezkuwi-sdk.git
synced 2026-10-31 07:59:53 +00:00
32 lines
985 B
Protocol Buffer
32 lines
985 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package authority_discovery_v3;
|
|
|
|
// First we need to serialize the addresses in order to be able to sign them.
|
|
message AuthorityRecord {
|
|
// Possibly multiple `MultiAddress`es through which the node can be reached.
|
|
repeated bytes addresses = 1;
|
|
// Information about the creation time of the record
|
|
TimestampInfo creation_time = 2;
|
|
}
|
|
|
|
message PeerSignature {
|
|
bytes signature = 1;
|
|
bytes public_key = 2;
|
|
}
|
|
|
|
// Information regarding the creation data of the record
|
|
message TimestampInfo {
|
|
// Time since UNIX_EPOCH in nanoseconds, scale encoded
|
|
bytes timestamp = 1;
|
|
}
|
|
|
|
// Then we need to serialize the authority record and signature to send them over the wire.
|
|
message SignedAuthorityRecord {
|
|
bytes record = 1;
|
|
bytes auth_signature = 2;
|
|
// Even if there are multiple `record.addresses`, all of them have the same peer id.
|
|
// Old versions are missing this field. It is optional in order to provide compatibility both ways.
|
|
PeerSignature peer_signature = 3;
|
|
}
|