syntax = "proto3";

message Peer {
  // Multiaddrs we know about
  repeated Address addresses = 1;

  // The protocols the peer supports
  repeated string protocols = 2;

  // Any peer metadata
  repeated Metadata metadata = 3;

  // The public key of the peer
  optional bytes pub_key = 4;

  // The most recently received signed PeerRecord
  optional bytes peer_record_envelope = 5;
}

// Address represents a single multiaddr
message Address {
  bytes multiaddr = 1;

  // Flag to indicate if the address comes from a certified source
  optional bool isCertified = 2;
}

message Metadata {
  string key = 1;
  bytes value = 2;
}
