1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
/// Basic key/value pair used to store header data.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Header {
    #[prost(string, tag="1")]
    pub name: std::string::String,
    #[prost(string, tag="2")]
    pub value: std::string::String,
}
/// ProfileEntry is an individual piece of structured data provided by wallet
/// authors.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProfileEntry {
    /// Kind is a hint to wallets as to what type of data to deserialize from the
    /// `body` field.
    #[prost(string, tag="1")]
    pub kind: std::string::String,
    /// The `headers` are metadata that may be useful to an application.
    #[prost(message, repeated, tag="2")]
    pub headers: ::std::vec::Vec<Header>,
    /// The body of the `ProfileEntry`.
    #[prost(bytes, tag="3")]
    pub body: std::vec::Vec<u8>,
}
/// A profile attached to an address.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Profile {
    /// Timestamp allows servers to determine which profile is the most
    /// recent. Given in unix time milliseconds.
    #[prost(int64, tag="1")]
    pub timestamp: i64,
    /// Time to live tells us how long this profile should exist before being
    /// considered invalid. Given in unix time milliseconds.
    #[prost(int64, tag="2")]
    pub ttl: i64,
    /// User specified data to be interpreted by applications.
    #[prost(message, repeated, tag="3")]
    pub entries: ::std::vec::Vec<ProfileEntry>,
}
/// Entry is an individual piece of structured data.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PayloadEntry {
    /// Informs the wallet what to do with this payload.
    #[prost(string, tag="1")]
    pub kind: std::string::String,
    /// The `headers` provide some extra metadata about the field that
    /// may be relevant to the wallet.
    #[prost(message, repeated, tag="2")]
    pub headers: ::std::vec::Vec<Header>,
    /// The body of the `PayloadEntry`.
    #[prost(bytes, tag="3")]
    pub body: std::vec::Vec<u8>,
}
/// Payload is the user-specified data section of the message that is
/// encrypted by the shared secret.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Payload {
    /// A timestamp provided by sender.
    #[prost(int64, tag="1")]
    pub timestamp: i64,
    /// User specified data to be interpreted by applications.
    #[prost(message, repeated, tag="2")]
    pub entries: ::std::vec::Vec<PayloadEntry>,
}
/// A stamp transaction paired with a list of vouts identifying to stamp outputs.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StampOutpoints {
    /// A serialized stamp transaction.
    #[prost(bytes, tag="1")]
    pub stamp_tx: std::vec::Vec<u8>,
    /// The specified outputs of the stamp transaction.
    #[prost(uint32, repeated, tag="2")]
    pub vouts: ::std::vec::Vec<u32>,
}
/// Represents a stamp. This is used within Message in order to attach value.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Stamp {
    /// The stamp type.
    #[prost(enumeration="stamp::StampType", tag="1")]
    pub stamp_type: i32,
    /// A collection of stamp outpoints.
    #[prost(message, repeated, tag="2")]
    pub stamp_outpoints: ::std::vec::Vec<StampOutpoints>,
}
pub mod stamp {
    /// Represents the stamp type.
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum StampType {
        /// Indicates no stamp information is attached.
        None = 0,
        /// Indicates that the stamp outputs are redeemable as HD derivations from a
        /// master private key `d + SHA-256(payload)`.
        MessageCommitment = 1,
    }
}
/// The primary message used in communication over the relay protocol.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Message {
    /// The source public key.
    #[prost(bytes, tag="1")]
    pub source_public_key: std::vec::Vec<u8>,
    /// The destinations public key.
    #[prost(bytes, tag="2")]
    pub destination_public_key: std::vec::Vec<u8>,
    /// Maleable server time.
    #[prost(int64, tag="3")]
    pub received_time: i64,
    /// The SHA-256 digest of the payload.
    #[prost(bytes, tag="4")]
    pub payload_digest: std::vec::Vec<u8>,
    /// The stamp attached to the message.
    #[prost(message, optional, tag="5")]
    pub stamp: ::std::option::Option<Stamp>,
    /// The encryption scheme used on the serialized `Payload` to produce the
    /// `payload` field.
    #[prost(enumeration="message::EncryptionScheme", tag="6")]
    pub scheme: i32,
    /// The `salt` is used to salt both the `payload_hmac` and the encryption key.
    #[prost(bytes, tag="7")]
    pub salt: std::vec::Vec<u8>,
    /// The HMAC of the `payload`, specifically `HMAC(HMAC(sdG, salt),
    /// payload_digest)`.
    #[prost(bytes, tag="8")]
    pub payload_hmac: std::vec::Vec<u8>,
    /// The size, in bytes, of the `payload`.
    #[prost(uint64, tag="9")]
    pub payload_size: u64,
    /// The encrypted `payload`.
    #[prost(bytes, tag="100")]
    pub payload: std::vec::Vec<u8>,
}
pub mod message {
    /// Represents an encryption scheme.
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum EncryptionScheme {
        /// Indicates the `payload` is unencrypted.
        None = 0,
        /// Indicates the `payload` is encrypted using AES and the Ephemeral
        /// Diffie-Hellman style protocol key exchange, specifically `HMAC(sdG,
        /// salt)`.
        EphemeralDh = 1,
    }
}
/// Collection of messages. Pushed from client to server via HTTP.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MessageSet {
    #[prost(message, repeated, tag="1")]
    pub messages: ::std::vec::Vec<Message>,
}
/// An error associated with the validation and insertion of a message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PushError {
    /// Status code of the error.
    #[prost(uint32, tag="1")]
    pub status_code: u32,
    /// Textual information of the error.
    #[prost(string, tag="2")]
    pub error_text: std::string::String,
}
/// A collection of errors yeilded when pushing message to the server.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PushErrors {
    /// A map of errors, keyed by the index of the failed message.
    #[prost(map="int32, message", tag="1")]
    pub errors: ::std::collections::HashMap<i32, PushError>,
}
/// A page of messages. Pulled from server via HTTP.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MessagePage {
    /// Collection of messages.
    #[prost(message, repeated, tag="1")]
    pub messages: ::std::vec::Vec<Message>,
    /// The received time of the earliest message in the page.
    #[prost(int64, tag="2")]
    pub start_time: i64,
    /// The received time of the latest message in the page.
    #[prost(int64, tag="3")]
    pub end_time: i64,
    /// The payload digest of the earliest message in the page.
    #[prost(bytes, tag="4")]
    pub start_digest: std::vec::Vec<u8>,
    /// The payload digest of the latest message in the page.
    #[prost(bytes, tag="5")]
    pub end_digest: std::vec::Vec<u8>,
}
/// A page of payloads. Pulled from server via HTTP.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PayloadPage {
    /// Collection of payloads.
    #[prost(bytes, repeated, tag="1")]
    pub payloads: ::std::vec::Vec<std::vec::Vec<u8>>,
    /// The received time of the earliest payload in the page.
    #[prost(int64, tag="2")]
    pub start_time: i64,
    /// The received time of the latest payload in the page.
    #[prost(int64, tag="3")]
    pub end_time: i64,
    /// The payload digest of the earliest payload in the page.
    #[prost(bytes, tag="4")]
    pub start_digest: std::vec::Vec<u8>,
    /// The payload digest of the latest payload in the page.
    #[prost(bytes, tag="5")]
    pub end_digest: std::vec::Vec<u8>,
}