Skip to content

Commit

Permalink
Compose AddressOrInstallationId, avoid dup codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
insipx committed Dec 7, 2023
1 parent dde129b commit 2ec84a7
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions proto/mls/database/intents.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,29 @@ message SendMessageData {
V1 v1 = 1;
}
}
// Wrapper around a list af EVM Account Addresses
// Wrapper around a list af repeated EVM Account Addresses
message AccountAddresses {
repeated string account_addresses = 1;
}

// Wrapper around a list of Installation IDs
// Wrapper around a list of repeated Installation IDs
message InstallationIds {
repeated bytes installation_ids = 1;
}

// One of an EVM account address or Installation ID
message AddressOrInstallationId {
oneof address_or_installation_id {
AccountAddresses account_addresses = 1;
InstallationIds installation_ids = 2;
}
}

// The data required to add members to a group
message AddMembersData {
// V1 of AddMembersPublishData
message V1 {
oneof address_or_installation_id {
AccountAddresses account_addresses = 1;
InstallationIds installation_ids = 2;
}
AddressOrInstallationId address_or_installation_id = 1;
}

oneof version {
Expand All @@ -47,10 +52,7 @@ message AddMembersData {
message RemoveMembersData {
// V1 of RemoveMembersPublishData
message V1 {
oneof address_or_installation_id {
AccountAddresses account_addresses = 1;
InstallationIds installation_ids = 2;
}
AddressOrInstallationId address_or_installation_id = 1;
}

oneof version {
Expand Down

0 comments on commit 2ec84a7

Please sign in to comment.