1#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct RecoverableEcdsaSignature {
5 #[prost(bytes = "vec", tag = "1")]
7 pub bytes: ::prost::alloc::vec::Vec<u8>,
8}
9impl ::prost::Name for RecoverableEcdsaSignature {
10 const NAME: &'static str = "RecoverableEcdsaSignature";
11 const PACKAGE: &'static str = "xmtp.identity.associations";
12 fn full_name() -> ::prost::alloc::string::String {
13 "xmtp.identity.associations.RecoverableEcdsaSignature".into()
14 }
15 fn type_url() -> ::prost::alloc::string::String {
16 "/xmtp.identity.associations.RecoverableEcdsaSignature".into()
17 }
18}
19#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
21pub struct RecoverableEd25519Signature {
22 #[prost(bytes = "vec", tag = "1")]
24 pub bytes: ::prost::alloc::vec::Vec<u8>,
25 #[prost(bytes = "vec", tag = "2")]
27 pub public_key: ::prost::alloc::vec::Vec<u8>,
28}
29impl ::prost::Name for RecoverableEd25519Signature {
30 const NAME: &'static str = "RecoverableEd25519Signature";
31 const PACKAGE: &'static str = "xmtp.identity.associations";
32 fn full_name() -> ::prost::alloc::string::String {
33 "xmtp.identity.associations.RecoverableEd25519Signature".into()
34 }
35 fn type_url() -> ::prost::alloc::string::String {
36 "/xmtp.identity.associations.RecoverableEd25519Signature".into()
37 }
38}
39#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
41pub struct SmartContractWalletSignature {
42 #[prost(string, tag = "1")]
45 pub account_id: ::prost::alloc::string::String,
46 #[prost(uint64, tag = "2")]
48 pub block_number: u64,
49 #[prost(bytes = "vec", tag = "3")]
51 pub signature: ::prost::alloc::vec::Vec<u8>,
52}
53impl ::prost::Name for SmartContractWalletSignature {
54 const NAME: &'static str = "SmartContractWalletSignature";
55 const PACKAGE: &'static str = "xmtp.identity.associations";
56 fn full_name() -> ::prost::alloc::string::String {
57 "xmtp.identity.associations.SmartContractWalletSignature".into()
58 }
59 fn type_url() -> ::prost::alloc::string::String {
60 "/xmtp.identity.associations.SmartContractWalletSignature".into()
61 }
62}
63#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
65pub struct RecoverablePasskeySignature {
66 #[prost(bytes = "vec", tag = "1")]
67 pub public_key: ::prost::alloc::vec::Vec<u8>,
68 #[prost(bytes = "vec", tag = "2")]
69 pub signature: ::prost::alloc::vec::Vec<u8>,
70 #[prost(bytes = "vec", tag = "3")]
71 pub authenticator_data: ::prost::alloc::vec::Vec<u8>,
72 #[prost(bytes = "vec", tag = "4")]
73 pub client_data_json: ::prost::alloc::vec::Vec<u8>,
74}
75impl ::prost::Name for RecoverablePasskeySignature {
76 const NAME: &'static str = "RecoverablePasskeySignature";
77 const PACKAGE: &'static str = "xmtp.identity.associations";
78 fn full_name() -> ::prost::alloc::string::String {
79 "xmtp.identity.associations.RecoverablePasskeySignature".into()
80 }
81 fn type_url() -> ::prost::alloc::string::String {
82 "/xmtp.identity.associations.RecoverablePasskeySignature".into()
83 }
84}
85#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
92pub struct LegacyDelegatedSignature {
93 #[prost(message, optional, tag = "1")]
94 pub delegated_key: ::core::option::Option<
95 super::super::message_contents::SignedPublicKey,
96 >,
97 #[prost(message, optional, tag = "2")]
98 pub signature: ::core::option::Option<RecoverableEcdsaSignature>,
99}
100impl ::prost::Name for LegacyDelegatedSignature {
101 const NAME: &'static str = "LegacyDelegatedSignature";
102 const PACKAGE: &'static str = "xmtp.identity.associations";
103 fn full_name() -> ::prost::alloc::string::String {
104 "xmtp.identity.associations.LegacyDelegatedSignature".into()
105 }
106 fn type_url() -> ::prost::alloc::string::String {
107 "/xmtp.identity.associations.LegacyDelegatedSignature".into()
108 }
109}
110#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
112pub struct Signature {
113 #[prost(oneof = "signature::Signature", tags = "1, 2, 3, 4, 5")]
120 pub signature: ::core::option::Option<signature::Signature>,
121}
122pub mod signature {
124 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
131 pub enum Signature {
132 #[prost(message, tag = "1")]
133 Erc191(super::RecoverableEcdsaSignature),
134 #[prost(message, tag = "2")]
135 Erc6492(super::SmartContractWalletSignature),
136 #[prost(message, tag = "3")]
137 InstallationKey(super::RecoverableEd25519Signature),
138 #[prost(message, tag = "4")]
139 DelegatedErc191(super::LegacyDelegatedSignature),
140 #[prost(message, tag = "5")]
141 Passkey(super::RecoverablePasskeySignature),
142 }
143}
144impl ::prost::Name for Signature {
145 const NAME: &'static str = "Signature";
146 const PACKAGE: &'static str = "xmtp.identity.associations";
147 fn full_name() -> ::prost::alloc::string::String {
148 "xmtp.identity.associations.Signature".into()
149 }
150 fn type_url() -> ::prost::alloc::string::String {
151 "/xmtp.identity.associations.Signature".into()
152 }
153}
154#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
156pub struct MemberIdentifier {
157 #[prost(oneof = "member_identifier::Kind", tags = "1, 2, 3")]
158 pub kind: ::core::option::Option<member_identifier::Kind>,
159}
160pub mod member_identifier {
162 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
163 pub enum Kind {
164 #[prost(string, tag = "1")]
165 EthereumAddress(::prost::alloc::string::String),
166 #[prost(bytes, tag = "2")]
167 InstallationPublicKey(::prost::alloc::vec::Vec<u8>),
168 #[prost(message, tag = "3")]
169 Passkey(super::Passkey),
170 }
171}
172impl ::prost::Name for MemberIdentifier {
173 const NAME: &'static str = "MemberIdentifier";
174 const PACKAGE: &'static str = "xmtp.identity.associations";
175 fn full_name() -> ::prost::alloc::string::String {
176 "xmtp.identity.associations.MemberIdentifier".into()
177 }
178 fn type_url() -> ::prost::alloc::string::String {
179 "/xmtp.identity.associations.MemberIdentifier".into()
180 }
181}
182#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
184pub struct Passkey {
185 #[prost(bytes = "vec", tag = "1")]
186 pub key: ::prost::alloc::vec::Vec<u8>,
187 #[prost(string, optional, tag = "2")]
188 pub relying_party: ::core::option::Option<::prost::alloc::string::String>,
189}
190impl ::prost::Name for Passkey {
191 const NAME: &'static str = "Passkey";
192 const PACKAGE: &'static str = "xmtp.identity.associations";
193 fn full_name() -> ::prost::alloc::string::String {
194 "xmtp.identity.associations.Passkey".into()
195 }
196 fn type_url() -> ::prost::alloc::string::String {
197 "/xmtp.identity.associations.Passkey".into()
198 }
199}
200#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
202pub struct Member {
203 #[prost(message, optional, tag = "1")]
204 pub identifier: ::core::option::Option<MemberIdentifier>,
205 #[prost(message, optional, tag = "2")]
206 pub added_by_entity: ::core::option::Option<MemberIdentifier>,
207 #[prost(uint64, optional, tag = "3")]
208 pub client_timestamp_ns: ::core::option::Option<u64>,
209 #[prost(uint64, optional, tag = "4")]
210 pub added_on_chain_id: ::core::option::Option<u64>,
211}
212impl ::prost::Name for Member {
213 const NAME: &'static str = "Member";
214 const PACKAGE: &'static str = "xmtp.identity.associations";
215 fn full_name() -> ::prost::alloc::string::String {
216 "xmtp.identity.associations.Member".into()
217 }
218 fn type_url() -> ::prost::alloc::string::String {
219 "/xmtp.identity.associations.Member".into()
220 }
221}
222#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
227pub struct CreateInbox {
228 #[prost(string, tag = "1")]
229 pub initial_identifier: ::prost::alloc::string::String,
230 #[prost(uint64, tag = "2")]
231 pub nonce: u64,
232 #[prost(message, optional, tag = "3")]
234 pub initial_identifier_signature: ::core::option::Option<Signature>,
235 #[prost(enumeration = "IdentifierKind", tag = "4")]
236 pub initial_identifier_kind: i32,
237 #[prost(string, optional, tag = "5")]
239 pub relying_party: ::core::option::Option<::prost::alloc::string::String>,
240}
241impl ::prost::Name for CreateInbox {
242 const NAME: &'static str = "CreateInbox";
243 const PACKAGE: &'static str = "xmtp.identity.associations";
244 fn full_name() -> ::prost::alloc::string::String {
245 "xmtp.identity.associations.CreateInbox".into()
246 }
247 fn type_url() -> ::prost::alloc::string::String {
248 "/xmtp.identity.associations.CreateInbox".into()
249 }
250}
251#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
256pub struct AddAssociation {
257 #[prost(message, optional, tag = "1")]
258 pub new_member_identifier: ::core::option::Option<MemberIdentifier>,
259 #[prost(message, optional, tag = "2")]
260 pub existing_member_signature: ::core::option::Option<Signature>,
261 #[prost(message, optional, tag = "3")]
262 pub new_member_signature: ::core::option::Option<Signature>,
263 #[prost(string, optional, tag = "4")]
265 pub relying_party: ::core::option::Option<::prost::alloc::string::String>,
266}
267impl ::prost::Name for AddAssociation {
268 const NAME: &'static str = "AddAssociation";
269 const PACKAGE: &'static str = "xmtp.identity.associations";
270 fn full_name() -> ::prost::alloc::string::String {
271 "xmtp.identity.associations.AddAssociation".into()
272 }
273 fn type_url() -> ::prost::alloc::string::String {
274 "/xmtp.identity.associations.AddAssociation".into()
275 }
276}
277#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
279pub struct RevokeAssociation {
280 #[prost(message, optional, tag = "1")]
281 pub member_to_revoke: ::core::option::Option<MemberIdentifier>,
282 #[prost(message, optional, tag = "2")]
283 pub recovery_identifier_signature: ::core::option::Option<Signature>,
284}
285impl ::prost::Name for RevokeAssociation {
286 const NAME: &'static str = "RevokeAssociation";
287 const PACKAGE: &'static str = "xmtp.identity.associations";
288 fn full_name() -> ::prost::alloc::string::String {
289 "xmtp.identity.associations.RevokeAssociation".into()
290 }
291 fn type_url() -> ::prost::alloc::string::String {
292 "/xmtp.identity.associations.RevokeAssociation".into()
293 }
294}
295#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
299pub struct ChangeRecoveryAddress {
300 #[prost(string, tag = "1")]
301 pub new_recovery_identifier: ::prost::alloc::string::String,
302 #[prost(message, optional, tag = "2")]
303 pub existing_recovery_identifier_signature: ::core::option::Option<Signature>,
304 #[prost(enumeration = "IdentifierKind", tag = "3")]
305 pub new_recovery_identifier_kind: i32,
306 #[prost(string, optional, tag = "4")]
308 pub relying_party: ::core::option::Option<::prost::alloc::string::String>,
309}
310impl ::prost::Name for ChangeRecoveryAddress {
311 const NAME: &'static str = "ChangeRecoveryAddress";
312 const PACKAGE: &'static str = "xmtp.identity.associations";
313 fn full_name() -> ::prost::alloc::string::String {
314 "xmtp.identity.associations.ChangeRecoveryAddress".into()
315 }
316 fn type_url() -> ::prost::alloc::string::String {
317 "/xmtp.identity.associations.ChangeRecoveryAddress".into()
318 }
319}
320#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
322pub struct IdentityAction {
323 #[prost(oneof = "identity_action::Kind", tags = "1, 2, 3, 4")]
324 pub kind: ::core::option::Option<identity_action::Kind>,
325}
326pub mod identity_action {
328 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
329 pub enum Kind {
330 #[prost(message, tag = "1")]
331 CreateInbox(super::CreateInbox),
332 #[prost(message, tag = "2")]
333 Add(super::AddAssociation),
334 #[prost(message, tag = "3")]
335 Revoke(super::RevokeAssociation),
336 #[prost(message, tag = "4")]
337 ChangeRecoveryAddress(super::ChangeRecoveryAddress),
338 }
339}
340impl ::prost::Name for IdentityAction {
341 const NAME: &'static str = "IdentityAction";
342 const PACKAGE: &'static str = "xmtp.identity.associations";
343 fn full_name() -> ::prost::alloc::string::String {
344 "xmtp.identity.associations.IdentityAction".into()
345 }
346 fn type_url() -> ::prost::alloc::string::String {
347 "/xmtp.identity.associations.IdentityAction".into()
348 }
349}
350#[derive(Clone, PartialEq, ::prost::Message)]
359pub struct IdentityUpdate {
360 #[prost(message, repeated, tag = "1")]
361 pub actions: ::prost::alloc::vec::Vec<IdentityAction>,
362 #[prost(uint64, tag = "2")]
363 pub client_timestamp_ns: u64,
364 #[prost(string, tag = "3")]
365 pub inbox_id: ::prost::alloc::string::String,
366}
367impl ::prost::Name for IdentityUpdate {
368 const NAME: &'static str = "IdentityUpdate";
369 const PACKAGE: &'static str = "xmtp.identity.associations";
370 fn full_name() -> ::prost::alloc::string::String {
371 "xmtp.identity.associations.IdentityUpdate".into()
372 }
373 fn type_url() -> ::prost::alloc::string::String {
374 "/xmtp.identity.associations.IdentityUpdate".into()
375 }
376}
377#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
379pub struct MemberMap {
380 #[prost(message, optional, tag = "1")]
381 pub key: ::core::option::Option<MemberIdentifier>,
382 #[prost(message, optional, tag = "2")]
383 pub value: ::core::option::Option<Member>,
384}
385impl ::prost::Name for MemberMap {
386 const NAME: &'static str = "MemberMap";
387 const PACKAGE: &'static str = "xmtp.identity.associations";
388 fn full_name() -> ::prost::alloc::string::String {
389 "xmtp.identity.associations.MemberMap".into()
390 }
391 fn type_url() -> ::prost::alloc::string::String {
392 "/xmtp.identity.associations.MemberMap".into()
393 }
394}
395#[derive(Clone, PartialEq, ::prost::Message)]
397pub struct AssociationState {
398 #[prost(string, tag = "1")]
399 pub inbox_id: ::prost::alloc::string::String,
400 #[prost(message, repeated, tag = "2")]
401 pub members: ::prost::alloc::vec::Vec<MemberMap>,
402 #[prost(string, tag = "3")]
403 pub recovery_identifier: ::prost::alloc::string::String,
404 #[prost(bytes = "vec", repeated, tag = "4")]
405 pub seen_signatures: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
406 #[prost(enumeration = "IdentifierKind", tag = "5")]
407 pub recovery_identifier_kind: i32,
408 #[prost(string, optional, tag = "6")]
410 pub relying_party: ::core::option::Option<::prost::alloc::string::String>,
411}
412impl ::prost::Name for AssociationState {
413 const NAME: &'static str = "AssociationState";
414 const PACKAGE: &'static str = "xmtp.identity.associations";
415 fn full_name() -> ::prost::alloc::string::String {
416 "xmtp.identity.associations.AssociationState".into()
417 }
418 fn type_url() -> ::prost::alloc::string::String {
419 "/xmtp.identity.associations.AssociationState".into()
420 }
421}
422#[derive(Clone, PartialEq, ::prost::Message)]
424pub struct AssociationStateDiff {
425 #[prost(message, repeated, tag = "1")]
426 pub new_members: ::prost::alloc::vec::Vec<MemberIdentifier>,
427 #[prost(message, repeated, tag = "2")]
428 pub removed_members: ::prost::alloc::vec::Vec<MemberIdentifier>,
429}
430impl ::prost::Name for AssociationStateDiff {
431 const NAME: &'static str = "AssociationStateDiff";
432 const PACKAGE: &'static str = "xmtp.identity.associations";
433 fn full_name() -> ::prost::alloc::string::String {
434 "xmtp.identity.associations.AssociationStateDiff".into()
435 }
436 fn type_url() -> ::prost::alloc::string::String {
437 "/xmtp.identity.associations.AssociationStateDiff".into()
438 }
439}
440#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
442#[repr(i32)]
443pub enum IdentifierKind {
444 Unspecified = 0,
446 Ethereum = 1,
447 Passkey = 2,
448}
449impl IdentifierKind {
450 pub fn as_str_name(&self) -> &'static str {
455 match self {
456 Self::Unspecified => "IDENTIFIER_KIND_UNSPECIFIED",
457 Self::Ethereum => "IDENTIFIER_KIND_ETHEREUM",
458 Self::Passkey => "IDENTIFIER_KIND_PASSKEY",
459 }
460 }
461 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
463 match value {
464 "IDENTIFIER_KIND_UNSPECIFIED" => Some(Self::Unspecified),
465 "IDENTIFIER_KIND_ETHEREUM" => Some(Self::Ethereum),
466 "IDENTIFIER_KIND_PASSKEY" => Some(Self::Passkey),
467 _ => None,
468 }
469 }
470}