syntax = "proto3"; option go_package = "./;protobuf"; import "chat_identity.proto"; import "enums.proto"; import "shard.proto"; package protobuf; message Grant { bytes community_id = 1; bytes member_id = 2; string chat_id = 3; uint64 clock = 4; uint64 expires = 5; } message CommunityMember { enum Roles { reserved 2, 3; reserved "ROLE_MANAGE_USERS", "ROLE_MODERATE_CONTENT"; ROLE_NONE = 0; ROLE_OWNER = 1; ROLE_ADMIN = 4; ROLE_TOKEN_MASTER = 5; } enum ChannelRole { // We make POSTER the first role to be the default one. // This is for backwards compatibility. Older protobufs won't have this field and will default to 0. CHANNEL_ROLE_POSTER = 0; CHANNEL_ROLE_VIEWER = 1; } repeated Roles roles = 1; repeated RevealedAccount revealed_accounts = 2 [deprecated = true]; uint64 last_update_clock = 3; ChannelRole channel_role = 4; } message CommunityTokenMetadata { map contract_addresses = 1; string description = 2; string image = 3; CommunityTokenType tokenType = 4; string symbol = 5; string name = 6; uint32 decimals = 7; string version = 8; } message CommunityTokenAction { enum ActionType { UNKNOWN_ACTION_TYPE = 0; AIRDROP = 1; BURN = 2; REMOTE_DESTRUCT = 3; } uint64 chain_id = 1; string contract_address = 2; ActionType action_type = 3; } message CommunityPermissions { enum Access { UNKNOWN_ACCESS = 0; AUTO_ACCEPT = 1; INVITATION_ONLY = 2 [deprecated = true]; MANUAL_ACCEPT = 3; } bool ens_only = 1; // https://gitlab.matrix.org/matrix-org/olm/blob/master/docs/megolm.md is a candidate for the algorithm to be used in case we want to have private communityal chats, lighter than pairwise encryption using the DR, less secure, but more efficient for large number of participants bool private = 2; Access access = 3; } message TokenCriteria { map contract_addresses = 1; CommunityTokenType type = 2; string symbol = 3; string name = 4; string amount = 5 [deprecated = true]; repeated uint64 token_ids = 6; string ens_pattern = 7; uint64 decimals = 8; string amountInWei = 9; } message CommunityTokenPermission { enum Type { UNKNOWN_TOKEN_PERMISSION = 0; BECOME_ADMIN = 1; BECOME_MEMBER = 2; CAN_VIEW_CHANNEL = 3; CAN_VIEW_AND_POST_CHANNEL = 4; BECOME_TOKEN_MASTER = 5; BECOME_TOKEN_OWNER = 6; } string id = 1; Type type = 2; repeated TokenCriteria token_criteria = 3; repeated string chat_ids = 4; bool is_private = 5; } message CommunityDescription { uint64 clock = 1; map members = 2; CommunityPermissions permissions = 3; ChatIdentity identity = 5; map chats = 6; repeated string ban_list = 7 [deprecated = true]; map categories = 8; uint64 archive_magnetlink_clock = 9; CommunityAdminSettings admin_settings = 10; string intro_message = 11; string outro_message = 12; bool encrypted = 13 [deprecated=true]; repeated string tags = 14; map token_permissions = 15; repeated CommunityTokenMetadata community_tokens_metadata = 16; uint64 active_members_count = 17; string ID = 18; mapbanned_members = 19; // request to resend revealed addresses uint64 resend_accounts_clock = 20; // key is hash ratchet key_id + seq_no map privateData = 100; } message CommunityBanInfo { bool delete_all_messages = 1; } message CommunityAdminSettings { bool pin_message_all_members_enabled = 1; } message CommunityChat { map members = 1; CommunityPermissions permissions = 2; ChatIdentity identity = 3; string category_id = 4; int32 position = 5; bool viewers_can_post_reactions = 6; bool hide_if_permissions_not_met = 7; CommunityBloomFilter members_list = 8; } message CommunityBloomFilter { bytes data = 1; uint64 m = 2; uint64 k = 3; } message CommunityCategory { string category_id = 1; string name = 2; int32 position = 3; } message RevealedAccount { string address = 1; bytes signature = 2; repeated uint64 chain_ids = 3; bool isAirdropAddress = 4; } message CommunityRequestToJoin { uint64 clock = 1; string ens_name = 2; string chat_id = 3; bytes community_id = 4; string display_name = 5; repeated RevealedAccount revealed_accounts = 6; uint32 customization_color = 7; } message CommunityEditSharedAddresses { uint64 clock = 1; bytes community_id = 2; repeated RevealedAccount revealed_accounts = 3; } message CommunityCancelRequestToJoin { uint64 clock = 1; string ens_name = 2; string chat_id = 3; bytes community_id = 4; string display_name = 5; uint32 customization_color = 6; } message CommunityUserKicked { uint64 clock = 1; bytes community_id = 2; } message CommunityRequestToJoinResponse { uint64 clock = 1; CommunityDescription community = 2; bool accepted = 3; bytes grant = 4; bytes community_id = 5; string magnet_uri = 6; bytes protected_topic_private_key = 7; Shard shard = 8; } message CommunityRequestToLeave { uint64 clock = 1; bytes community_id = 2; } message CommunityMessageArchiveMagnetlink { uint64 clock = 1; string magnet_uri = 2; } message WakuMessage { bytes sig = 1; uint64 timestamp = 2; bytes topic = 3; bytes payload = 4; bytes padding = 5; bytes hash = 6; string thirdPartyId = 7; } message WakuMessageArchiveMetadata { uint32 version = 1; uint64 from = 2; uint64 to = 3; repeated bytes contentTopic = 4; } message WakuMessageArchive { uint32 version = 1; WakuMessageArchiveMetadata metadata = 2; repeated WakuMessage messages = 3; } message WakuMessageArchiveIndexMetadata { uint32 version = 1; WakuMessageArchiveMetadata metadata = 2; uint64 offset = 3; uint64 size = 4; uint64 padding = 5; } message WakuMessageArchiveIndex { map archives = 1; } message CommunityPublicStorenodesInfo { // Signature of the payload field bytes signature = 1; // Marshaled CommunityStorenodes bytes payload = 2; } message CommunityStorenodes { uint64 clock = 1; bytes community_id = 2; repeated Storenode storenodes = 3; uint64 chain_id = 4; } message Storenode { bytes community_id = 1; string storenode_id = 2; string name = 3; string address = 4; string fleet = 5; uint32 version = 6; bool removed = 7; int64 deleted_at = 8; } message CommunityReevaluatePermissionsRequest { bytes community_id = 1; } message DeleteCommunityMemberMessage { string id = 1; string chat_id = 2; } message DeleteCommunityMemberMessages { uint64 clock = 1; bytes community_id = 2; string member_id = 3; repeated DeleteCommunityMemberMessage messages = 4; } message CommunityUpdateGrant { uint64 timestamp = 1; bytes community_id = 2; map grants = 3; } message CommunityEncryptionKeysRequest { bytes community_id = 1; } message CommunitySharedAddressesRequest { bytes community_id = 1; } message CommunitySharedAddressesResponse { bytes community_id = 1; repeated RevealedAccount revealed_accounts = 3; }