// Copyright 2022 The Tari Project
// SPDX-License-Identifier: BSD-3-Clause

syntax = "proto3";

import "google/protobuf/timestamp.proto";

package tari.comms.identity;

message PeerIdentityMsg {
    repeated bytes addresses = 1;
    uint32 features = 2;
    // Note: not part of the signature
    repeated bytes supported_protocols = 3;
    // Note: not part of the signature
    string user_agent = 4;
    // Signature that signs the peer identity
    IdentitySignature identity_signature = 5;
}

message IdentitySignature {
    uint32 version = 1;
    bytes signature = 2;
    bytes public_nonce = 3;
    // The EPOCH timestamp used in the identity signature challenge
    int64 updated_at = 4;
}
