Documentation ¶
Index ¶
- Constants
- Variables
- func AddTimeoutToRequestToJoinClock(clock uint64) (uint64, error)
- func CalculateRequestID(publicKey string, communityID types.HexBytes) types.HexBytes
- func ChatID(communityID, channelID string) string
- func CollectibleAddressesFromPreParsedPermissionsData(...) map[walletcommon.ChainID]map[gethcommon.Address]struct{}
- func CommunityDescriptionTokenOwnerChainID(description *protobuf.CommunityDescription) uint64
- func ExtractTokenCriteria(permissions []*CommunityTokenPermission) (erc20TokenCriteria map[uint64]map[string]*protobuf.TokenCriteria, ...)
- func HasTokenOwnership(description *protobuf.CommunityDescription) bool
- func PreParsePermissionsData(permissions map[string]*CommunityTokenPermission) (map[protobuf.CommunityTokenPermission_Type]*PreParsedCommunityPermissionsData, ...)
- func RolesAuthorizedToPerformEvent(senderRoles []protobuf.CommunityMember_Roles, ...) bool
- func SetMaxNbMembers(maxNb int)
- func SetMaxNbPendingRequestedMembers(maxNb int)
- func SetValidateInterval(duration time.Duration)
- func ToLinkPreveiwThumbnail(image images.IdentityImage) (*common.LinkPreviewThumbnail, error)
- func UnwrapCommunityDescriptionMessage(payload []byte) (*ecdsa.PublicKey, *protobuf.CommunityDescription, error)
- func ValidateCommunityDescription(desc *protobuf.CommunityDescription) error
- type AccountChainIDsCombination
- type ArchiveFileManager
- func (m *ArchiveFileManager) CreateHistoryArchiveTorrentFromDB(communityID types.HexBytes, topics []types.TopicType, startDate time.Time, ...) ([]string, error)
- func (m *ArchiveFileManager) CreateHistoryArchiveTorrentFromMessages(communityID types.HexBytes, messages []*types.Message, ...) ([]string, error)
- func (m *ArchiveFileManager) ExtractMessagesFromHistoryArchive(communityID types.HexBytes, archiveID string) ([]*protobuf.WakuMessage, error)
- func (m *ArchiveFileManager) GetHistoryArchiveMagnetlink(communityID types.HexBytes) (string, error)
- func (m *ArchiveFileManager) GetMessageArchiveIDsToImport(communityID types.HexBytes) ([]string, error)
- func (m *ArchiveFileManager) LoadHistoryArchiveIndexFromFile(myKey *ecdsa.PrivateKey, communityID types.HexBytes) (*protobuf.WakuMessageArchiveIndex, error)
- func (m *ArchiveFileManager) SaveMessageArchiveID(communityID types.HexBytes, hash string) error
- func (m *ArchiveFileManager) SetMessageArchiveIDImported(communityID types.HexBytes, hash string, imported bool) error
- type ArchiveFileService
- type ArchiveManager
- func (m *ArchiveManager) AddHistoryArchiveDownloadTask(communityID string, task *HistoryArchiveDownloadTask)
- func (m *ArchiveManager) CreateAndSeedHistoryArchive(communityID types.HexBytes, topics []types.TopicType, startDate time.Time, ...) error
- func (m *ArchiveManager) DownloadHistoryArchivesByMagnetlink(communityID types.HexBytes, magnetlink string, cancelTask chan struct{}) (*HistoryArchiveDownloadTaskInfo, error)
- func (m *ArchiveManager) GetCommunityChatsFilters(communityID types.HexBytes) ([]*transport.Filter, error)
- func (m *ArchiveManager) GetCommunityChatsTopics(communityID types.HexBytes) ([]types.TopicType, error)
- func (m *ArchiveManager) GetHistoryArchiveDownloadTask(communityID string) *HistoryArchiveDownloadTask
- func (m *ArchiveManager) GetHistoryArchivePartitionStartTimestamp(communityID types.HexBytes) (uint64, error)
- func (m *ArchiveManager) IsReady() bool
- func (m *ArchiveManager) IsSeedingHistoryArchiveTorrent(communityID types.HexBytes) bool
- func (m *ArchiveManager) SeedHistoryArchiveTorrent(communityID types.HexBytes) error
- func (m *ArchiveManager) SetOnline(online bool)
- func (m *ArchiveManager) SetTorrentConfig(config *params.TorrentConfig)
- func (m *ArchiveManager) StartHistoryArchiveTasksInterval(community *Community, interval time.Duration)
- func (m *ArchiveManager) StartTorrentClient() error
- func (m *ArchiveManager) Stop() error
- func (m *ArchiveManager) StopHistoryArchiveTasksInterval(communityID types.HexBytes)
- func (m *ArchiveManager) TorrentFileExists(communityID string) bool
- func (m *ArchiveManager) UnseedHistoryArchiveTorrent(communityID types.HexBytes)
- type ArchiveManagerConfig
- type ArchiveService
- type AssetContractData
- type BalancesByChain
- type ByRoleDesc
- type CheckAllChannelsPermissionsResponse
- type CheckChannelPermissionsResponse
- type CheckChannelViewAndPostPermissionsResult
- type CheckChannelViewOnlyPermissionsResult
- type CheckPermissionToJoinResponse
- type CheckPermissionsResponse
- type CollectibleContractData
- type CollectiblesByChain
- type CollectiblesManager
- type CollectiblesOwners
- type Community
- func (o *Community) AddCommunityTokensMetadata(token *protobuf.CommunityTokenMetadata) (*protobuf.CommunityDescription, error)
- func (o *Community) AddMember(publicKey *ecdsa.PublicKey, roles []protobuf.CommunityMember_Roles, ...) (*CommunityChanges, error)
- func (o *Community) AddMemberToChat(chatID string, publicKey *ecdsa.PublicKey, ...) (*CommunityChanges, error)
- func (o *Community) AddRequestToJoin(request *RequestToJoin)
- func (o *Community) AddRoleToMember(pk *ecdsa.PublicKey, role protobuf.CommunityMember_Roles) (*protobuf.CommunityDescription, error)deprecated
- func (o *Community) AdminSettings() *protobuf.CommunityAdminSettings
- func (o *Community) AllowsAllMembersToPinMessage() bool
- func (o *Community) AutoAccept() bool
- func (o *Community) BanUserFromCommunity(pk *ecdsa.PublicKey, communityBanInfo *protobuf.CommunityBanInfo) (*protobuf.CommunityDescription, error)
- func (o *Community) BuildGrant(key *ecdsa.PublicKey, chatID string) ([]byte, error)
- func (o *Community) CanDeleteMessageForEveryone(pk *ecdsa.PublicKey) bool
- func (o *Community) CanManageUsers(pk *ecdsa.PublicKey) bool
- func (o *Community) CanManageUsersPublicKeys() ([]*ecdsa.PublicKey, error)
- func (o *Community) CanMemberIdentityPost(chatID string, messageType protobuf.ApplicationMetadataMessage_Type) (bool, error)
- func (o *Community) CanPost(pk *ecdsa.PublicKey, chatID string, ...) (bool, error)
- func (o *Community) CanRequestAccess(pk *ecdsa.PublicKey) bool
- func (o *Community) CanView(pk *ecdsa.PublicKey, chatID string) bool
- func (o *Community) Categories() map[string]*protobuf.CommunityCategory
- func (o *Community) ChannelEncrypted(channelID string) bool
- func (o *Community) ChannelTokenPermissionsByType(channelID string, permissionType protobuf.CommunityTokenPermission_Type) []*CommunityTokenPermission
- func (o *Community) ChatID(channelID string) string
- func (o *Community) ChatIDs() (chatIDs []string)
- func (o *Community) Chats() map[string]*protobuf.CommunityChat
- func (o *Community) ChatsByCategoryID(categoryID string) []string
- func (o *Community) Clock() uint64
- func (o *Community) Color() string
- func (o *Community) CommunityChatsIDs() []string
- func (o *Community) CommunityShard() CommunityShard
- func (o *Community) CommunityTokensMetadata() []*protobuf.CommunityTokenMetadata
- func (o *Community) ControlNode() *ecdsa.PublicKey
- func (o *Community) CreateCategory(categoryID string, categoryName string, chatIDs []string) (*CommunityChanges, error)
- func (o *Community) CreateChat(chatID string, chat *protobuf.CommunityChat) (*CommunityChanges, error)
- func (o *Community) CreateDeepCopy() *Community
- func (o *Community) DeclineRequestToJoin(dbRequest *RequestToJoin) (adminEventCreated bool, err error)
- func (o *Community) DeleteCategory(categoryID string) (*CommunityChanges, error)
- func (o *Community) DeleteChat(chatID string) (*CommunityChanges, error)
- func (o *Community) DeleteTokenPermission(permissionID string) (*CommunityChanges, error)
- func (o *Community) Description() *protobuf.CommunityDescription
- func (o *Community) DescriptionProtocolMessage() []byte
- func (o *Community) DescriptionText() string
- func (o *Community) Edit(description *protobuf.CommunityDescription)
- func (o *Community) EditCategory(categoryID string, categoryName string, chatIDs []string) (*CommunityChanges, error)
- func (o *Community) EditChat(chatID string, chat *protobuf.CommunityChat) (*CommunityChanges, error)
- func (o *Community) EditPermissionAccess(permissionAccess protobuf.CommunityPermissions_Access)
- func (o *Community) Encrypted() bool
- func (o *Community) EncryptedDescription() (*protobuf.CommunityDescription, error)
- func (o *Community) GetChat(chatID string) (*protobuf.CommunityChat, error)
- func (o *Community) GetFilteredPrivilegedMembers(skipMembers map[string]struct{}) map[protobuf.CommunityMember_Roles][]*ecdsa.PublicKey
- func (o *Community) GetMember(pk *ecdsa.PublicKey) *protobuf.CommunityMember
- func (o *Community) GetMemberPubkeys() []*ecdsa.PublicKey
- func (o *Community) GetPrivilegedMembers() []*ecdsa.PublicKey
- func (o *Community) GetTokenMasterMembers() []*ecdsa.PublicKey
- func (o *Community) HasMember(pk *ecdsa.PublicKey) bool
- func (o *Community) HasMissingEncryptionKey(channelID string) bool
- func (o *Community) HasPermissionToSendCommunityEvents() bool
- func (o *Community) HasTokenPermissions() bool
- func (o *Community) ID() types.HexBytes
- func (o *Community) IDString() string
- func (o *Community) Identity() *protobuf.ChatIdentity
- func (o *Community) Images() map[string]*protobuf.IdentityImage
- func (o *Community) IntroMessage() string
- func (o *Community) IsAdmin() bool
- func (o *Community) IsBanned(pk *ecdsa.PublicKey) bool
- func (o *Community) IsControlNode() bool
- func (o *Community) IsMemberAdmin(publicKey *ecdsa.PublicKey) bool
- func (o *Community) IsMemberInChat(pk *ecdsa.PublicKey, chatID string) bool
- func (o *Community) IsMemberLikelyInChat(chatID string) bool
- func (o *Community) IsMemberOwner(publicKey *ecdsa.PublicKey) bool
- func (o *Community) IsMemberTokenMaster(publicKey *ecdsa.PublicKey) bool
- func (o *Community) IsOwner() bool
- func (o *Community) IsPrivilegedMember(publicKey *ecdsa.PublicKey) bool
- func (o *Community) IsTokenMaster() bool
- func (o *Community) Join()
- func (o *Community) Joined() bool
- func (o *Community) JoinedAt() int64
- func (o *Community) LastOpenedAt() int64
- func (o *Community) Leave()
- func (o *Community) MagnetlinkMessageChannelID() string
- func (o *Community) ManualAccept() bool
- func (o *Community) MarshalJSON() ([]byte, error)
- func (o *Community) MarshalPublicAPIJSON() ([]byte, error)
- func (o *Community) MarshaledDescription() ([]byte, error)
- func (o *Community) MemberCanManageToken(member *ecdsa.PublicKey, token *community_token.CommunityToken) bool
- func (o *Community) MemberIdentity() *ecdsa.PublicKey
- func (o *Community) MemberRole(pubKey *ecdsa.PublicKey) protobuf.CommunityMember_Roles
- func (o *Community) MemberUpdateChannelID() string
- func (o *Community) Members() map[string]*protobuf.CommunityMember
- func (o *Community) MembersCount() int
- func (o *Community) MuteTill() time.Time
- func (o *Community) Muted() bool
- func (o *Community) Name() string
- func (o *Community) OutroMessage() string
- func (o *Community) PendingAndBannedMembers() map[string]CommunityMemberState
- func (o *Community) Permissions() *protobuf.CommunityPermissions
- func (o *Community) PopulateChannelsWithAllMembers()
- func (o *Community) PopulateChatWithAllMembers(chatID string) (*CommunityChanges, error)
- func (o *Community) PrivateKey() *ecdsa.PrivateKey
- func (o *Community) PublicKey() *ecdsa.PublicKey
- func (o *Community) PubsubTopic() string
- func (o *Community) PubsubTopicKey() string
- func (o *Community) PubsubTopicPrivateKey() *ecdsa.PrivateKey
- func (o *Community) RemoveAllUsersFromOrg() *CommunityChanges
- func (o *Community) RemoveMembersFromOrg(membersToRemove []string) *CommunityChanges
- func (o *Community) RemoveOurselvesFromOrg(pk *ecdsa.PublicKey)
- func (o *Community) RemoveRoleFromMember(pk *ecdsa.PublicKey, role protobuf.CommunityMember_Roles) (*protobuf.CommunityDescription, error)
- func (o *Community) RemoveUserFromChat(pk *ecdsa.PublicKey, chatID string) (*protobuf.CommunityDescription, error)
- func (o *Community) RemoveUserFromOrg(pk *ecdsa.PublicKey) (*protobuf.CommunityDescription, error)
- func (o *Community) ReorderCategories(categoryID string, newPosition int) (*CommunityChanges, error)
- func (o *Community) ReorderChat(categoryID string, chatID string, newPosition int) (*CommunityChanges, error)
- func (o *Community) RequestedToJoinAt() uint64
- func (o *Community) RequestsToJoin() []*RequestToJoin
- func (o *Community) SerializedID() (string, error)
- func (o *Community) SetActiveMembersCount(activeMembersCount uint64) (updated bool, err error)
- func (o *Community) SetPubsubTopicPrivateKey(privKey *ecdsa.PrivateKey)
- func (o *Community) SetResendAccountsClock(clock uint64)
- func (o *Community) SetRoleToMember(pk *ecdsa.PublicKey, role protobuf.CommunityMember_Roles) (*protobuf.CommunityDescription, error)
- func (o *Community) Shard() *shard.Shard
- func (o *Community) SortCategoryChats(changes *CommunityChanges, categoryID string)
- func (o *Community) Spectate()
- func (o *Community) Spectated() bool
- func (o *Community) StatusUpdatesChannelID() string
- func (o *Community) Tags() []CommunityTag
- func (o *Community) TagsIndices() []uint32
- func (o *Community) TagsRaw() []string
- func (o *Community) ToAddTokenMetadataCommunityEvent(tokenMetadata *protobuf.CommunityTokenMetadata) *CommunityEvent
- func (o *Community) ToBanCommunityMemberCommunityEvent(pubkey string) *CommunityEvent
- func (o *Community) ToCommunityEditCommunityEvent(description *protobuf.CommunityDescription) *CommunityEvent
- func (o *Community) ToCommunityRequestToJoinAcceptCommunityEvent(member string, request *protobuf.CommunityRequestToJoin) *CommunityEvent
- func (o *Community) ToCommunityRequestToJoinRejectCommunityEvent(member string, request *protobuf.CommunityRequestToJoin) *CommunityEvent
- func (o *Community) ToCommunityTokenPermissionChangeCommunityEvent(permission *protobuf.CommunityTokenPermission) *CommunityEvent
- func (o *Community) ToCommunityTokenPermissionDeleteCommunityEvent(permission *protobuf.CommunityTokenPermission) *CommunityEvent
- func (o *Community) ToCreateCategoryCommunityEvent(categoryID string, categoryName string, channelsIds []string) *CommunityEvent
- func (o *Community) ToCreateChannelCommunityEvent(channelID string, channel *protobuf.CommunityChat) *CommunityEvent
- func (o *Community) ToDeleteAllMemberMessagesEvent(pubkey string) *CommunityEvent
- func (o *Community) ToDeleteCategoryCommunityEvent(categoryID string) *CommunityEvent
- func (o *Community) ToDeleteChannelCommunityEvent(channelID string) *CommunityEvent
- func (o *Community) ToEditCategoryCommunityEvent(categoryID string, categoryName string, channelsIds []string) *CommunityEvent
- func (o *Community) ToEditChannelCommunityEvent(channelID string, channel *protobuf.CommunityChat) *CommunityEvent
- func (o *Community) ToKickCommunityMemberCommunityEvent(pubkey string) *CommunityEvent
- func (o *Community) ToProtocolMessageBytes() ([]byte, error)
- func (o *Community) ToReorderCategoryCommunityEvent(categoryID string, position int) *CommunityEvent
- func (o *Community) ToReorderChannelCommunityEvent(categoryID string, channelID string, position int) *CommunityEvent
- func (c *Community) ToStatusLinkPreview() (*common.StatusCommunityLinkPreview, error)
- func (o *Community) ToSyncInstallationCommunityProtobuf(clock uint64, communitySettings *CommunitySettings, ...) (*protobuf.SyncInstallationCommunity, error)
- func (o *Community) ToUnbanCommunityMemberCommunityEvent(pubkey string) *CommunityEvent
- func (o *Community) TokenPermissionByID(ID string) *CommunityTokenPermission
- func (o *Community) TokenPermissions() map[string]*CommunityTokenPermission
- func (o *Community) TokenPermissionsByType(permissionType protobuf.CommunityTokenPermission_Type) []*CommunityTokenPermission
- func (o *Community) UnbanUserFromCommunity(pk *ecdsa.PublicKey) (*protobuf.CommunityDescription, error)
- func (o *Community) UncompressedIDString() string
- func (o *Community) UpdateChatFirstMessageTimestamp(chatID string, timestamp uint32) (*CommunityChanges, error)
- func (o *Community) UpdateCommunityDescription(description *protobuf.CommunityDescription, rawMessage []byte, ...) (*CommunityChanges, error)
- func (o *Community) UpdateLastOpenedAt(timestamp int64)
- func (o *Community) UpdateMemberLastUpdateClock(publicKey string, clock uint64)
- func (o *Community) UpsertCommunityTokensMetadata(token *protobuf.CommunityTokenMetadata) (bool, error)
- func (o *Community) UpsertTokenPermission(tokenPermission *protobuf.CommunityTokenPermission) (*CommunityChanges, error)
- func (o *Community) ValidateEditSharedAddresses(signer string, request *protobuf.CommunityEditSharedAddresses) error
- func (o *Community) ValidateEvent(event *CommunityEvent, signer *ecdsa.PublicKey) error
- func (o *Community) ValidateRequestToJoin(signer *ecdsa.PublicKey, request *protobuf.CommunityRequestToJoin) error
- func (o *Community) Verified() bool
- func (o *Community) VerifyGrantSignature(data []byte) (*protobuf.Grant, error)
- type CommunityAdminSettings
- type CommunityCategory
- type CommunityChanges
- func (c *CommunityChanges) HasMemberLeft(identity string) bool
- func (c *CommunityChanges) HasNewMember(identity string) bool
- func (c *CommunityChanges) IsMemberBanned(identity string) bool
- func (c *CommunityChanges) IsMemberUnbanned(identity string) bool
- func (c *CommunityChanges) Merge(other *CommunityChanges)
- type CommunityChat
- type CommunityChatChanges
- type CommunityEvent
- type CommunityEventsMessage
- type CommunityLock
- type CommunityMemberState
- type CommunityPrivateDataFailedToDecrypt
- type CommunityPrivilegedMemberSyncMessage
- type CommunityRecord
- type CommunityRecordBundle
- type CommunityResponse
- type CommunitySettings
- type CommunityShard
- type CommunityTag
- type CommunityTokenPermission
- type CommunityTokensServiceInterface
- type CommunityWithChannelIDs
- type Config
- type CuratedCommunities
- type DecryptCommunityResponse
- type DefaultPermissionChecker
- func (p *DefaultPermissionChecker) CheckCachedPermissions(permissionsParsedData *PreParsedCommunityPermissionsData, ...) (*CheckPermissionsResponse, error)
- func (p *DefaultPermissionChecker) CheckPermissionToJoin(community *Community, addresses []gethcommon.Address) (*CheckPermissionToJoinResponse, error)
- func (p *DefaultPermissionChecker) CheckPermissions(permissionsParsedData *PreParsedCommunityPermissionsData, ...) (*CheckPermissionsResponse, error)
- func (p *DefaultPermissionChecker) CheckPermissionsWithPreFetchedData(permissionsParsedData *PreParsedCommunityPermissionsData, ...) (*CheckPermissionsResponse, error)
- func (p *DefaultPermissionChecker) MergeValidCombinations(left, right []*AccountChainIDsCombination) []*AccountChainIDsCombination
- type DefaultTokenManager
- func (m *DefaultTokenManager) FindOrCreateTokenByAddress(ctx context.Context, chainID uint64, address gethcommon.Address) *token.Token
- func (m *DefaultTokenManager) GetAllChainIDs() ([]uint64, error)
- func (m *DefaultTokenManager) GetBalancesByChain(ctx context.Context, accounts, tokenAddresses []gethcommon.Address, ...) (BalancesByChain, error)
- func (m *DefaultTokenManager) GetCachedBalancesByChain(ctx context.Context, accounts, tokenAddresses []gethcommon.Address, ...) (BalancesByChain, error)
- type DescriptionEncryptor
- type EncodedArchiveData
- type EncryptionKeyAction
- type EncryptionKeyActionType
- type EncryptionKeyActions
- type EncryptionKeysRequestRecord
- type EventsData
- type EventsRecord
- type HighestRoleResponse
- type HistoryArchiveDownloadTask
- type HistoryArchiveDownloadTaskInfo
- type KeyDistributor
- type KnownCommunitiesResponse
- type Manager
- func (m *Manager) AcceptRequestToJoin(dbRequest *RequestToJoin) (*Community, error)
- func (m *Manager) AcceptedPendingRequestsToJoinForCommunity(id types.HexBytes) ([]*RequestToJoin, error)
- func (m *Manager) AcceptedRequestsToJoinForCommunity(id types.HexBytes) ([]*RequestToJoin, error)
- func (m *Manager) AddCommunityToken(token *community_token.CommunityToken, clock uint64) (*Community, error)
- func (m *Manager) AddMemberOwnerToCommunity(communityID types.HexBytes, pk *ecdsa.PublicKey) (*Community, error)
- func (m *Manager) AddRoleToMember(request *requests.AddRoleToMember) (*Community, error)
- func (m *Manager) All() ([]*Community, error)
- func (m *Manager) AllNonApprovedCommunitiesRequestsToJoin() ([]*RequestToJoin, error)
- func (m *Manager) BanUserFromCommunity(request *requests.BanUserFromCommunity) (*Community, error)
- func (m *Manager) CanPost(pk *ecdsa.PublicKey, communityID string, chatID string, ...) (bool, error)
- func (m *Manager) CancelRequestToJoin(request *requests.CancelRequestToJoinCommunity) (*RequestToJoin, *Community, error)
- func (m *Manager) CanceledRequestsToJoinForCommunity(id types.HexBytes) ([]*RequestToJoin, error)
- func (m *Manager) CanceledRequestsToJoinForUser(pk *ecdsa.PublicKey) ([]*RequestToJoin, error)
- func (m *Manager) CheckAllChannelsPermissions(communityID types.HexBytes, addresses []gethcommon.Address) (*CheckAllChannelsPermissionsResponse, error)
- func (m *Manager) CheckChannelPermissions(communityID types.HexBytes, chatID string, addresses []gethcommon.Address) (*CheckChannelPermissionsResponse, error)
- func (m *Manager) CheckPermissionToJoin(id []byte, addresses []gethcommon.Address) (*CheckPermissionToJoinResponse, error)
- func (m *Manager) CommunitiesToValidate() (map[string][]communityToValidate, error)
- func (m *Manager) CommunitySettingsExist(id types.HexBytes) (bool, error)
- func (m *Manager) CommunityUpdateLastOpenedAt(communityID types.HexBytes, timestamp int64) (*Community, error)
- func (m *Manager) Controlled() ([]*Community, error)
- func (m *Manager) CreateCategory(request *requests.CreateCommunityCategory, publish bool) (*Community, *CommunityChanges, error)
- func (m *Manager) CreateChat(communityID types.HexBytes, chat *protobuf.CommunityChat, publish bool, ...) (*CommunityChanges, error)
- func (m *Manager) CreateCommunity(request *requests.CreateCommunity, publish bool) (*Community, error)
- func (m *Manager) CreateCommunityTokenDeploymentSignature(ctx context.Context, chainID uint64, addressFrom string, communityID string) ([]byte, error)
- func (m *Manager) CreateCommunityTokenPermission(request *requests.CreateCommunityTokenPermission) (*Community, *CommunityChanges, error)
- func (m *Manager) CreateRequestToJoin(request *requests.RequestToJoinCommunity, ...) *RequestToJoin
- func (m *Manager) DeclineRequestToJoin(dbRequest *RequestToJoin) (*Community, error)
- func (m *Manager) DeclinedPendingRequestsToJoinForCommunity(id types.HexBytes) ([]*RequestToJoin, error)
- func (m *Manager) DeclinedRequestsToJoinForCommunity(id types.HexBytes) ([]*RequestToJoin, error)
- func (m *Manager) DeleteCategory(request *requests.DeleteCommunityCategory) (*Community, *CommunityChanges, error)
- func (m *Manager) DeleteChat(communityID types.HexBytes, chatID string) (*Community, *CommunityChanges, error)
- func (m *Manager) DeleteCommunity(id types.HexBytes) error
- func (m *Manager) DeleteCommunitySettings(id types.HexBytes) error
- func (m *Manager) DeleteCommunityShard(communityID types.HexBytes) error
- func (m *Manager) DeleteCommunityTokenPermission(request *requests.DeleteCommunityTokenPermission) (*Community, *CommunityChanges, error)
- func (m *Manager) DeletePendingRequestToJoin(request *RequestToJoin) error
- func (m *Manager) DeletedCommunities() ([]*Community, error)
- func (m *Manager) DetermineChannelsForHRKeysRequest() ([]*CommunityWithChannelIDs, error)
- func (m *Manager) EditCategory(request *requests.EditCommunityCategory) (*Community, *CommunityChanges, error)
- func (m *Manager) EditChat(communityID types.HexBytes, chatID string, chat *protobuf.CommunityChat) (*Community, *CommunityChanges, error)
- func (m *Manager) EditChatFirstMessageTimestamp(communityID types.HexBytes, chatID string, timestamp uint32) (*Community, *CommunityChanges, error)
- func (m *Manager) EditCommunity(request *requests.EditCommunity) (*Community, error)
- func (m *Manager) EditCommunityTokenPermission(request *requests.EditCommunityTokenPermission) (*Community, *CommunityChanges, error)
- func (m *Manager) ExportCommunity(id types.HexBytes) (*ecdsa.PrivateKey, error)
- func (m *Manager) FetchCommunityToken(community *Community, tokenMetadata *protobuf.CommunityTokenMetadata, ...) (*community_token.CommunityToken, error)
- func (m *Manager) ForceMembersReevaluation(communityID types.HexBytes) error
- func (m *Manager) GenerateRequestsToJoinForAutoApprovalOnNewOwnership(communityID types.HexBytes, kickedMembers map[string]*protobuf.CommunityMember) ([]*RequestToJoin, error)
- func (m *Manager) GetAllCommunityTokens() ([]*community_token.CommunityToken, error)
- func (m *Manager) GetByID(id []byte) (*Community, error)
- func (m *Manager) GetByIDString(idString string) (*Community, error)
- func (m *Manager) GetCheckChannelPermissionResponses(communityID types.HexBytes) (*CheckAllChannelsPermissionsResponse, error)
- func (m *Manager) GetCollectiblesManager() CollectiblesManager
- func (m *Manager) GetCommunitiesSettings() ([]CommunitySettings, error)
- func (m *Manager) GetCommunityGrant(communityID string) ([]byte, uint64, error)
- func (m *Manager) GetCommunityRequestToJoinClock(pk *ecdsa.PublicKey, communityID string) (uint64, error)
- func (m *Manager) GetCommunityRequestToJoinWithRevealedAddresses(pubKey string, communityID types.HexBytes) (*RequestToJoin, error)
- func (m *Manager) GetCommunityRequestsToJoinWithRevealedAddresses(communityID types.HexBytes) ([]*RequestToJoin, error)
- func (m *Manager) GetCommunitySettingsByID(id types.HexBytes) (*CommunitySettings, error)
- func (m *Manager) GetCommunityShard(communityID types.HexBytes) (*shard.Shard, error)
- func (m *Manager) GetCommunityToken(communityID string, chainID int, address string) (*community_token.CommunityToken, error)
- func (m *Manager) GetCommunityTokenByChainAndAddress(chainID int, address string) (*community_token.CommunityToken, error)
- func (m *Manager) GetCommunityTokens(communityID string) ([]*community_token.CommunityToken, error)
- func (m *Manager) GetCuratedCommunities() (*CuratedCommunities, error)
- func (m *Manager) GetLastSeenMagnetlink(communityID types.HexBytes) (string, error)
- func (m *Manager) GetLatestWakuMessageTimestamp(topics []types.TopicType) (uint64, error)
- func (m *Manager) GetMagnetlinkMessageClock(communityID types.HexBytes) (uint64, error)
- func (m *Manager) GetOwnedCommunitiesChatIDs() (map[string]bool, error)
- func (m *Manager) GetOwnedERC721Tokens(walletAddresses []gethcommon.Address, ...) (CollectiblesByChain, error)
- func (m *Manager) GetPermissionedBalances(ctx context.Context, communityID types.HexBytes, ...) (map[gethcommon.Address][]PermissionedBalance, error)
- func (m *Manager) GetPersistence() *Persistence
- func (m *Manager) GetRequestToJoin(ID types.HexBytes) (*RequestToJoin, error)
- func (m *Manager) GetRequestToJoinByPkAndCommunityID(pk *ecdsa.PublicKey, communityID []byte) (*RequestToJoin, error)
- func (m *Manager) GetRevealedAddresses(communityID types.HexBytes, memberPk string) ([]*protobuf.RevealedAccount, error)
- func (m *Manager) GetStoredDescriptionForCommunities(communityIDs []string) (*KnownCommunitiesResponse, error)
- func (m *Manager) GetSyncControlNode(id types.HexBytes) (*protobuf.SyncCommunityControlNode, error)
- func (m *Manager) GetSyncedRawCommunity(id []byte) (*RawCommunityRow, error)
- func (m *Manager) HandleCommunityCancelRequestToJoin(signer *ecdsa.PublicKey, request *protobuf.CommunityCancelRequestToJoin) (*RequestToJoin, error)
- func (m *Manager) HandleCommunityDescriptionMessage(signer *ecdsa.PublicKey, description *protobuf.CommunityDescription, ...) (*CommunityResponse, error)
- func (m *Manager) HandleCommunityEditSharedAddresses(signer *ecdsa.PublicKey, request *protobuf.CommunityEditSharedAddresses) error
- func (m *Manager) HandleCommunityEventsMessage(signer *ecdsa.PublicKey, message *protobuf.CommunityEventsMessage) (*CommunityResponse, error)
- func (m *Manager) HandleCommunityGrant(community *Community, grant []byte, clock uint64) (uint64, error)
- func (m *Manager) HandleCommunityRequestToJoin(signer *ecdsa.PublicKey, receiver *ecdsa.PublicKey, ...) (*Community, *RequestToJoin, error)
- func (m *Manager) HandleCommunityRequestToJoinResponse(signer *ecdsa.PublicKey, request *protobuf.CommunityRequestToJoinResponse) (*RequestToJoin, error)
- func (m *Manager) HandleCommunityRequestToLeave(signer *ecdsa.PublicKey, proto *protobuf.CommunityRequestToLeave) error
- func (m *Manager) HandleEditSharedAddressesPrivilegedUserSyncMessage(message *protobuf.CommunityPrivilegedUserSyncMessage, community *Community) error
- func (m *Manager) HandleRequestToJoinPrivilegedUserSyncMessage(message *protobuf.CommunityPrivilegedUserSyncMessage, community *Community) ([]*RequestToJoin, error)
- func (m *Manager) HandleSyncAllRequestToJoinForNewPrivilegedMember(message *protobuf.CommunityPrivilegedUserSyncMessage, community *Community) ([]*RequestToJoin, error)
- func (m *Manager) HandleSyncCommunitySettings(syncCommunitySettings *protobuf.SyncCommunitySettings) (*CommunitySettings, error)
- func (m *Manager) ImageToBase64(uri string) string
- func (m *Manager) ImportCommunity(key *ecdsa.PrivateKey, clock uint64) (*Community, error)
- func (m *Manager) IsChannelEncrypted(communityID string, chatID string) (bool, error)
- func (m *Manager) IsEncrypted(communityID string) (bool, error)
- func (m *Manager) JoinCommunity(id types.HexBytes, forceJoin bool) (*Community, error)
- func (m *Manager) Joined() ([]*Community, error)
- func (m *Manager) JoinedAndPendingCommunitiesWithRequests() ([]*Community, error)
- func (m *Manager) KickedOutOfCommunity(id types.HexBytes, spectateMode bool) (*Community, error)
- func (m *Manager) LeaveCommunity(id types.HexBytes) (*Community, error)
- func (m *Manager) MuteCommunityTill(communityID []byte, muteTill time.Time) error
- func (m *Manager) NewHashRatchetKeys(keys []*encryption.HashRatchetInfo) error
- func (m *Manager) PendingRequestsToJoin() ([]*RequestToJoin, error)
- func (m *Manager) PendingRequestsToJoinForCommunity(id types.HexBytes) ([]*RequestToJoin, error)
- func (m *Manager) PendingRequestsToJoinForUser(pk *ecdsa.PublicKey) ([]*RequestToJoin, error)
- func (m *Manager) PromoteSelfToControlNode(community *Community, clock uint64) (*CommunityChanges, error)
- func (m *Manager) Queue(signer *ecdsa.PublicKey, community *Community, clock uint64, payload []byte) error
- func (m *Manager) ReevaluateMembers(communityID types.HexBytes) (*Community, map[protobuf.CommunityMember_Roles][]*ecdsa.PublicKey, error)
- func (m *Manager) RemoveCommunityToken(chainID int, contractAddress string) error
- func (m *Manager) RemovePrivateKey(id types.HexBytes) (*Community, error)
- func (m *Manager) RemoveRequestToJoinRevealedAddresses(requestID types.HexBytes) error
- func (m *Manager) RemoveRoleFromMember(request *requests.RemoveRoleFromMember) (*Community, error)
- func (m *Manager) RemoveUserFromCommunity(id types.HexBytes, pk *ecdsa.PublicKey) (*Community, error)
- func (m *Manager) RemoveUsersWithoutRevealedAccounts(community *Community, clock uint64) (*CommunityChanges, error)
- func (m *Manager) ReorderCategories(request *requests.ReorderCommunityCategories) (*Community, *CommunityChanges, error)
- func (m *Manager) ReorderChat(request *requests.ReorderCommunityChat) (*Community, *CommunityChanges, error)
- func (m *Manager) RequestsToJoinForCommunityAwaitingAddresses(id types.HexBytes) ([]*RequestToJoin, error)
- func (m *Manager) SafeGetSignerPubKey(chainID uint64, communityID string) (string, error)
- func (m *Manager) SaveCommunity(community *Community) error
- func (m *Manager) SaveCommunitySettings(settings CommunitySettings) error
- func (m *Manager) SaveCommunityShard(communityID types.HexBytes, shard *shard.Shard, clock uint64) error
- func (m *Manager) SaveCommunityToken(token *community_token.CommunityToken, croppedImage *images.CroppedImage) (*community_token.CommunityToken, error)
- func (m *Manager) SaveRequestToJoin(request *RequestToJoin) error
- func (m *Manager) SaveRequestToJoinAndCommunity(requestToJoin *RequestToJoin, community *Community) (*Community, *RequestToJoin, error)
- func (m *Manager) SaveRequestToJoinRevealedAddresses(requestID types.HexBytes, revealedAccounts []*protobuf.RevealedAccount) error
- func (m *Manager) SaveSyncControlNode(id types.HexBytes, syncControlNode *protobuf.SyncCommunityControlNode) error
- func (m *Manager) ScheduleMembersReevaluation(communityID types.HexBytes) error
- func (m *Manager) SetCommunityActiveMembersCount(communityID string, activeMembersCount uint64) error
- func (m *Manager) SetCuratedCommunities(communities *CuratedCommunities) error
- func (m *Manager) SetMediaServer(mediaServer server.MediaServerInterface)
- func (m *Manager) SetMuted(id types.HexBytes, muted bool) error
- func (m *Manager) SetPrivateKey(id []byte, privKey *ecdsa.PrivateKey) error
- func (m *Manager) SetShard(communityID types.HexBytes, shard *shard.Shard) (*Community, error)
- func (m *Manager) SetSyncClock(id []byte, clock uint64) error
- func (m *Manager) SetSyncControlNode(id types.HexBytes, syncControlNode *protobuf.SyncCommunityControlNode) error
- func (m *Manager) ShareRequestsToJoinWithPrivilegedMembers(community *Community, ...) error
- func (m *Manager) ShouldHandleSyncCommunity(community *protobuf.SyncInstallationCommunity) (bool, error)
- func (m *Manager) ShouldHandleSyncCommunitySettings(communitySettings *protobuf.SyncCommunitySettings) (bool, error)
- func (m *Manager) SpectateCommunity(id types.HexBytes) (*Community, error)
- func (m *Manager) Spectated() ([]*Community, error)
- func (m *Manager) Start() error
- func (m *Manager) StartMembersReevaluationLoop(communityID types.HexBytes, reevaluateOnStart bool)
- func (m *Manager) Stop() error
- func (m *Manager) StoreWakuMessage(message *types.Message) error
- func (m *Manager) StoreWakuMessages(messages []*types.Message) error
- func (m *Manager) Subscribe() chan *Subscription
- func (m *Manager) UnbanUserFromCommunity(request *requests.UnbanUserFromCommunity) (*Community, error)
- func (m *Manager) UpdateClockInRequestToJoin(id types.HexBytes, clock uint64) error
- func (m *Manager) UpdateCommunityDescriptionMagnetlinkMessageClock(communityID types.HexBytes, clock uint64) error
- func (m *Manager) UpdateCommunitySettings(settings CommunitySettings) error
- func (m *Manager) UpdateCommunityTokenAddress(chainID int, oldContractAddress string, newContractAddress string) error
- func (m *Manager) UpdateCommunityTokenState(chainID int, contractAddress string, deployState community_token.DeployState) error
- func (m *Manager) UpdateCommunityTokenSupply(chainID int, contractAddress string, supply *bigint.BigInt) error
- func (m *Manager) UpdateEncryptionKeysRequests(communityID types.HexBytes, channelIDs []string) error
- func (m *Manager) UpdateLastSeenMagnetlink(communityID types.HexBytes, magnetlinkURI string) error
- func (m *Manager) UpdateMagnetlinkMessageClock(communityID types.HexBytes, clock uint64) error
- func (m *Manager) UpdatePubsubTopicPrivateKey(topic string, privKey *ecdsa.PrivateKey) error
- func (m *Manager) UpdateShard(community *Community, shard *shard.Shard, clock uint64) error
- func (m *Manager) ValidateCommunityByID(communityID types.HexBytes) (*CommunityResponse, error)
- func (m *Manager) ValidateCommunityPrivilegedUserSyncMessage(message *protobuf.CommunityPrivilegedUserSyncMessage) error
- type ManagerOption
- func WithAccountManager(accountsManager account.Manager) ManagerOption
- func WithAllowForcingCommunityMembersReevaluation(enabled bool) ManagerOption
- func WithCollectiblesManager(collectiblesManager CollectiblesManager) ManagerOption
- func WithCommunityTokensService(communityTokensService CommunityTokensServiceInterface) ManagerOption
- func WithPermissionChecker(permissionChecker PermissionChecker) ManagerOption
- func WithTokenManager(tokenManager TokenManager) ManagerOption
- func WithWalletConfig(walletConfig *params.WalletConfig) ManagerOption
- type OwnerVerifier
- type PermissionChecker
- type PermissionTokenCriteriaResult
- type PermissionedBalance
- type Persistence
- func (p *Persistence) AcceptedPendingRequestsToJoinForCommunity(id []byte) ([]*RequestToJoin, error)
- func (p *Persistence) AcceptedRequestsToJoinForCommunity(id []byte) ([]*RequestToJoin, error)
- func (p *Persistence) AddCommunityToken(token *token.CommunityToken) error
- func (p *Persistence) AllCommunities(memberIdentity *ecdsa.PublicKey) ([]*Community, error)
- func (p *Persistence) AllNonApprovedCommunitiesRequestsToJoin() ([]*RequestToJoin, error)
- func (p *Persistence) CanceledRequestsToJoinForCommunity(id []byte) ([]*RequestToJoin, error)
- func (p *Persistence) CanceledRequestsToJoinForUser(pk string) ([]*RequestToJoin, error)
- func (p *Persistence) CommunitiesWithPrivateKey(memberIdentity *ecdsa.PublicKey) ([]*Community, error)
- func (p *Persistence) CommunitySettingsExist(communityID types.HexBytes) (bool, error)
- func (p *Persistence) DeclinedPendingRequestsToJoinForCommunity(id []byte) ([]*RequestToJoin, error)
- func (p *Persistence) DeclinedRequestsToJoinForCommunity(id []byte) ([]*RequestToJoin, error)
- func (p *Persistence) DeleteCommunitiesToValidateByCommunityID(communityID []byte) error
- func (p *Persistence) DeleteCommunity(id types.HexBytes) error
- func (p *Persistence) DeleteCommunityEvents(id types.HexBytes) error
- func (p *Persistence) DeleteCommunitySettings(communityID types.HexBytes) error
- func (p *Persistence) DeleteCommunityShard(communityID types.HexBytes) error
- func (p *Persistence) DeleteCommunityToValidate(communityID []byte, clock uint64) error
- func (p *Persistence) DeletePendingRequestToJoin(id []byte) error
- func (p *Persistence) DeletedCommunities(memberIdentity *ecdsa.PublicKey) (comms []*Community, err error)
- func (p *Persistence) GetAllCommunityTokens() ([]*token.CommunityToken, error)
- func (p *Persistence) GetAppliedCommunityEvents(communityID types.HexBytes) (map[string]uint64, error)
- func (p *Persistence) GetByID(memberIdentity *ecdsa.PublicKey, id []byte) (*Community, error)
- func (p *Persistence) GetCheckChannelPermissionResponses(communityID string) (map[string]*CheckChannelPermissionsResponse, error)
- func (p *Persistence) GetCommunitiesSettings() ([]CommunitySettings, error)
- func (p *Persistence) GetCommunityChatIDs(communityID types.HexBytes) ([]string, error)
- func (p *Persistence) GetCommunityGrant(communityID string) ([]byte, uint64, error)
- func (p *Persistence) GetCommunityRequestToJoinWithRevealedAddresses(pubKey string, communityID []byte) (*RequestToJoin, error)
- func (p *Persistence) GetCommunityRequestsToJoinRevealedAddresses(communityID []byte) (map[string][]*protobuf.RevealedAccount, error)
- func (p *Persistence) GetCommunityRequestsToJoinWithRevealedAddresses(communityID []byte) ([]*RequestToJoin, error)
- func (p *Persistence) GetCommunitySettingsByID(communityID types.HexBytes) (*CommunitySettings, error)
- func (p *Persistence) GetCommunityShard(communityID types.HexBytes) (*shard.Shard, error)
- func (p *Persistence) GetCommunityToken(communityID string, chainID int, address string) (*token.CommunityToken, error)
- func (p *Persistence) GetCommunityTokenByChainAndAddress(chainID int, address string) (*token.CommunityToken, error)
- func (p *Persistence) GetCommunityTokens(communityID string) ([]*token.CommunityToken, error)
- func (p *Persistence) GetCuratedCommunities() (*CuratedCommunities, error)
- func (p *Persistence) GetDecryptedCommunityDescription(communityID []byte, clock uint64) (*protobuf.CommunityDescription, error)
- func (p *Persistence) GetDownloadedMessageArchiveIDs(communityID types.HexBytes) ([]string, error)
- func (p *Persistence) GetEncryptionKeyRequests(communityID []byte, channelIDs map[string]struct{}) (map[string]*EncryptionKeysRequestRecord, error)
- func (p *Persistence) GetLastMessageArchiveEndDate(communityID types.HexBytes) (uint64, error)
- func (p *Persistence) GetLastSeenMagnetlink(communityID types.HexBytes) (string, error)
- func (p *Persistence) GetLatestWakuMessageTimestamp(topics []types.TopicType) (uint64, error)
- func (p *Persistence) GetMagnetlinkMessageClock(communityID types.HexBytes) (uint64, error)
- func (p *Persistence) GetMessageArchiveIDsToImport(communityID types.HexBytes) ([]string, error)
- func (p *Persistence) GetNumberOfPendingRequestsToJoin(communityID types.HexBytes) (int, error)
- func (p *Persistence) GetOldestWakuMessageTimestamp(topics []types.TopicType) (uint64, error)
- func (p *Persistence) GetPermissionTokenCriteriaResult(permissionID string, communityID string, chatID string) (*PermissionTokenCriteriaResult, error)
- func (p *Persistence) GetRequestToJoin(id []byte) (*RequestToJoin, error)
- func (p *Persistence) GetRequestToJoinByPk(pk string, communityID []byte, state RequestToJoinState) (*RequestToJoin, error)
- func (p *Persistence) GetRequestToJoinByPkAndCommunityID(pk string, communityID []byte) (*RequestToJoin, error)
- func (p *Persistence) GetRequestToJoinClockByPkAndCommunityID(pk string, communityID types.HexBytes) (uint64, error)
- func (p *Persistence) GetRequestToJoinRevealedAddresses(requestID []byte) ([]*protobuf.RevealedAccount, error)
- func (p *Persistence) GetSyncControlNode(communityID types.HexBytes) (*protobuf.SyncCommunityControlNode, error)
- func (p *Persistence) GetWakuMessagesByFilterTopic(topics []types.TopicType, from uint64, to uint64) ([]types.Message, error)
- func (p *Persistence) HasCommunityArchiveInfo(communityID types.HexBytes) (exists bool, err error)
- func (p *Persistence) HasCommunityToken(communityID string, address string, chainID int) (bool, error)
- func (p *Persistence) HasMessageArchiveID(communityID types.HexBytes, hash string) (exists bool, err error)
- func (p *Persistence) HasPendingRequestsToJoinForUserAndCommunity(userPk string, communityID []byte) (bool, error)
- func (p *Persistence) InvalidateDecryptedCommunityCacheForKeys(keys []*encryption.HashRatchetInfo) error
- func (p *Persistence) JoinedAndPendingCommunitiesWithRequests(memberIdentity *ecdsa.PublicKey) (comms []*Community, err error)
- func (p *Persistence) JoinedCommunities(memberIdentity *ecdsa.PublicKey) ([]*Community, error)
- func (p *Persistence) MuteCommunityTill(communityID []byte, mutedTill time.Time) error
- func (p *Persistence) PendingRequestsToJoin() ([]*RequestToJoin, error)
- func (p *Persistence) PendingRequestsToJoinForCommunity(id []byte) ([]*RequestToJoin, error)
- func (p *Persistence) RemoveCommunityGrant(communityID string) error
- func (p *Persistence) RemoveCommunityToken(chainID int, contractAddress string) error
- func (p *Persistence) RemoveRequestToJoinRevealedAddresses(requestID []byte) error
- func (p *Persistence) RequestsToJoinForCommunityAwaitingAddresses(id []byte) ([]*RequestToJoin, error)
- func (p *Persistence) RequestsToJoinForCommunityWithState(id []byte, state RequestToJoinState) ([]*RequestToJoin, error)
- func (p *Persistence) RequestsToJoinForUserByState(pk string, state RequestToJoinState) ([]*RequestToJoin, error)
- func (p *Persistence) SaveCheckChannelPermissionResponse(communityID string, chatID string, response *CheckChannelPermissionsResponse) error
- func (p *Persistence) SaveCommunity(community *Community) error
- func (p *Persistence) SaveCommunityArchiveInfo(communityID types.HexBytes, clock uint64, lastArchiveEndDate uint64) error
- func (p *Persistence) SaveCommunityEvents(community *Community) error
- func (p *Persistence) SaveCommunityGrant(communityID string, grant []byte, clock uint64) error
- func (p *Persistence) SaveCommunitySettings(communitySettings CommunitySettings) error
- func (p *Persistence) SaveCommunityShard(communityID types.HexBytes, shard *shard.Shard, clock uint64) error
- func (p *Persistence) SaveCommunityToValidate(c communityToValidate) error
- func (p *Persistence) SaveDecryptedCommunityDescription(communityID []byte, missingKeys []*CommunityPrivateDataFailedToDecrypt, ...) error
- func (p *Persistence) SaveLastMessageArchiveEndDate(communityID types.HexBytes, endDate uint64) error
- func (p *Persistence) SaveMessageArchiveID(communityID types.HexBytes, hash string) error
- func (p *Persistence) SaveRequestToJoin(request *RequestToJoin) (err error)
- func (p *Persistence) SaveRequestToJoinRevealedAddresses(requestID types.HexBytes, revealedAccounts []*protobuf.RevealedAccount) (err error)
- func (p *Persistence) SaveRequestToLeave(request *RequestToLeave) error
- func (p *Persistence) SaveRequestsToJoin(requests []*RequestToJoin) (err error)
- func (p *Persistence) SaveSyncControlNode(communityID types.HexBytes, clock uint64, installationID string) error
- func (p *Persistence) SaveWakuMessage(message *types.Message) error
- func (p *Persistence) SaveWakuMessages(messages []*types.Message) (err error)
- func (p *Persistence) SetCuratedCommunities(communities *CuratedCommunities) error
- func (p *Persistence) SetMessageArchiveIDImported(communityID types.HexBytes, hash string, imported bool) error
- func (p *Persistence) SetMuted(communityID []byte, muted bool) error
- func (p *Persistence) SetPrivateKey(id []byte, privKey *ecdsa.PrivateKey) error
- func (p *Persistence) SetRequestToJoinState(pk string, communityID []byte, state RequestToJoinState) error
- func (p *Persistence) SetSyncClock(id []byte, clock uint64) error
- func (p *Persistence) ShouldHandleSyncCommunity(community *protobuf.SyncInstallationCommunity) (bool, error)
- func (p *Persistence) ShouldHandleSyncCommunitySettings(settings *protobuf.SyncCommunitySettings) (bool, error)
- func (p *Persistence) SpectatedCommunities(memberIdentity *ecdsa.PublicKey) ([]*Community, error)
- func (p *Persistence) UpdateAndPruneEncryptionKeyRequests(communityID types.HexBytes, channelIDs []string, requestedAt int64) error
- func (p *Persistence) UpdateClockInRequestToJoin(id []byte, clock uint64) error
- func (p *Persistence) UpdateCommunitySettings(communitySettings CommunitySettings) error
- func (p *Persistence) UpdateCommunityTokenAddress(chainID int, oldContractAddress string, newContractAddress string) error
- func (p *Persistence) UpdateCommunityTokenState(chainID int, contractAddress string, deployState token.DeployState) error
- func (p *Persistence) UpdateCommunityTokenSupply(chainID int, contractAddress string, supply *bigint.BigInt) error
- func (p *Persistence) UpdateLastMessageArchiveEndDate(communityID types.HexBytes, endDate uint64) error
- func (p *Persistence) UpdateLastOpenedAt(communityID types.HexBytes, timestamp int64) error
- func (p *Persistence) UpdateLastSeenMagnetlink(communityID types.HexBytes, magnetlinkURI string) error
- func (p *Persistence) UpdateMagnetlinkMessageClock(communityID types.HexBytes, clock uint64) error
- func (p *Persistence) UpsertAppliedCommunityEvents(communityID types.HexBytes, processedEvents map[string]uint64) error
- type PreParsedCommunityPermissionsData
- type PreParsedPermissionsData
- type Publisher
- type RawCommunityRow
- type RequestToJoin
- func (r *RequestToJoin) CalculateID()
- func (r *RequestToJoin) Empty() bool
- func (r *RequestToJoin) InitFromSyncProtobuf(proto *protobuf.SyncCommunityRequestsToJoin)
- func (r *RequestToJoin) ShouldRetainDeclined(clock uint64) (bool, error)
- func (r *RequestToJoin) ToCommunityRequestToJoinProtobuf() *protobuf.CommunityRequestToJoin
- func (r *RequestToJoin) ToSyncProtobuf() *protobuf.SyncCommunityRequestsToJoin
- type RequestToJoinRecord
- type RequestToJoinState
- type RequestToLeave
- type Subscription
- type TokenManager
- type TokenPermissionState
- type TokenRequirementResponse
Constants ¶
const OR = " OR "
Variables ¶
var ( ErrTorrentTimedout = errors.New("torrent has timed out") ErrCommunityRequestAlreadyRejected = errors.New("that user was already rejected from the community") ErrInvalidClock = errors.New("invalid clock to cancel request to join") )
errors
var ErrAlreadyJoined = errors.New("already joined")
var ErrAlreadyMember = errors.New("already a member")
var ErrBannedMemberNotFound = errors.New("banned member not found")
var ErrCannotBanOwnerOrAdmin = errors.New("not allowed to ban admin or owner")
var ErrCannotRemoveOwnerOrAdmin = errors.New("not allowed to remove admin or owner")
var ErrCantRequestAccess = errors.New("can't request access")
var ErrCategoryAlreadyExists = errors.New("category already exists")
var ErrCategoryNotFound = errors.New("category not found")
var ErrChatAlreadyAssigned = errors.New("chat already assigned to a category")
var ErrChatAlreadyExists = errors.New("chat already exists")
var ErrChatNotFound = errors.New("chat not found")
var ErrGrantExpired = errors.New("expired grant")
var ErrGrantMemberPublicKeyIsDifferent = errors.New("grant member public key is different")
var ErrGrantOlder = errors.New("received grant older than the current one")
var ErrInvalidCommunityDescription = errors.New("invalid community description")
var ErrInvalidCommunityDescriptionCategoryNoID = errors.New("invalid community category id")
var ErrInvalidCommunityDescriptionCategoryNoName = errors.New("invalid community category name")
var ErrInvalidCommunityDescriptionChatIdentity = errors.New("invalid community chat name, missing")
var ErrInvalidCommunityDescriptionClockOutdated = errors.New("invalid community description outdated clock")
var ErrInvalidCommunityDescriptionDuplicatedName = errors.New("invalid community chat name, duplicated")
var ErrInvalidCommunityDescriptionMemberInChatButNotInOrg = errors.New("invalid community description member in chat but not in org")
var ErrInvalidCommunityDescriptionNoChatPermissions = errors.New("invalid community description no chat permissions")
var ErrInvalidCommunityDescriptionNoOrgPermissions = errors.New("invalid community description no org permissions")
var ErrInvalidCommunityDescriptionUnknownChatAccess = errors.New("invalid community description unknown chat access")
var ErrInvalidCommunityDescriptionUnknownChatCategory = errors.New("invalid community category in chat")
var ErrInvalidCommunityDescriptionUnknownOrgAccess = errors.New("invalid community description unknown org access")
var ErrInvalidCommunityEventClock = errors.New("clock for admin event message is outdated")
var ErrInvalidCommunityTags = errors.New("invalid community tags")
var ErrInvalidGrant = errors.New("invalid grant")
var ErrInvalidManageTokensPermission = errors.New("no privileges to manage tokens")
var ErrInvalidMessage = errors.New("invalid community description message")
var ErrMemberNotFound = errors.New("member not found")
var ErrMemberWalletAlreadyExists = errors.New("member wallet already exists")
var ErrMemberWalletNotFound = errors.New("member wallet not found")
var ErrNoChangeInPosition = errors.New("no change in category position")
var ErrNoFreeSpaceForHistoryArchives = errors.New("history archive: No free space for downloading history archives")
var ErrNoPermissionToJoin = errors.New("member has no permission to join")
var ErrNoRevealedAccountsSignature = errors.New("revealed accounts without the signature")
var ErrNotAdmin = errors.New("no admin privileges for this community")
var ErrNotAuthorized = errors.New("not authorized")
var ErrNotControlNode = errors.New("not a control node")
var ErrNotEnoughPermissions = errors.New("not enough permissions for this community")
var ErrNotOwner = errors.New("no owner privileges for this community")
var ErrOldRequestToJoin = errors.New("old request to join")
var ErrOldRequestToLeave = errors.New("old request to leave")
var ErrOldShardInfo = errors.New("old shard info")
var ErrOrgAlreadyJoined = errors.New("community already joined")
var ErrOrgNotFound = errors.New("community not found")
var ErrPermissionToJoinNotSatisfied = errors.New("permission to join not satisfied")
var ErrRevealedAccountsAbsent = errors.New("revealed accounts is absent")
var ErrTokenPermissionAlreadyExists = errors.New("token permission already exists")
var ErrTokenPermissionNotFound = errors.New("token permission not found")
var GrantExpirationTime = 168 * time.Hour
GrantExpirationTime interval of 7 days
Functions ¶
func AddTimeoutToRequestToJoinClock ¶ added in v0.146.4
func CalculateRequestID ¶ added in v0.106.3
func CollectibleAddressesFromPreParsedPermissionsData ¶ added in v0.179.29
func CollectibleAddressesFromPreParsedPermissionsData(communityPermissions map[protobuf.CommunityTokenPermission_Type]*PreParsedCommunityPermissionsData, channelPermissions map[string]*PreParsedCommunityPermissionsData) map[walletcommon.ChainID]map[gethcommon.Address]struct{}
func CommunityDescriptionTokenOwnerChainID ¶ added in v0.171.1
func CommunityDescriptionTokenOwnerChainID(description *protobuf.CommunityDescription) uint64
func ExtractTokenCriteria ¶ added in v0.158.0
func ExtractTokenCriteria(permissions []*CommunityTokenPermission) (erc20TokenCriteria map[uint64]map[string]*protobuf.TokenCriteria, erc721TokenCriteria map[uint64]map[string]*protobuf.TokenCriteria, ensTokenCriteria []string)
func HasTokenOwnership ¶ added in v0.171.1
func HasTokenOwnership(description *protobuf.CommunityDescription) bool
func PreParsePermissionsData ¶ added in v0.179.20
func PreParsePermissionsData(permissions map[string]*CommunityTokenPermission) (map[protobuf.CommunityTokenPermission_Type]*PreParsedCommunityPermissionsData, map[string]*PreParsedCommunityPermissionsData)
func RolesAuthorizedToPerformEvent ¶ added in v0.163.4
func RolesAuthorizedToPerformEvent(senderRoles []protobuf.CommunityMember_Roles, memberRoles []protobuf.CommunityMember_Roles, event *CommunityEvent) bool
func SetMaxNbMembers ¶ added in v0.179.12
func SetMaxNbMembers(maxNb int)
func SetMaxNbPendingRequestedMembers ¶ added in v0.179.12
func SetMaxNbPendingRequestedMembers(maxNb int)
func SetValidateInterval ¶ added in v0.171.1
Used for testing only
func ToLinkPreveiwThumbnail ¶ added in v0.171.34
func ToLinkPreveiwThumbnail(image images.IdentityImage) (*common.LinkPreviewThumbnail, error)
func UnwrapCommunityDescriptionMessage ¶ added in v0.171.6
func ValidateCommunityDescription ¶
func ValidateCommunityDescription(desc *protobuf.CommunityDescription) error
Types ¶
type AccountChainIDsCombination ¶ added in v0.158.0
type AccountChainIDsCombination struct { Address gethcommon.Address `json:"address"` ChainIDs []uint64 `json:"chainIds"` }
type ArchiveFileManager ¶ added in v0.179.29
type ArchiveFileManager struct {
// contains filtered or unexported fields
}
func NewArchiveFileManager ¶ added in v0.179.29
func NewArchiveFileManager(amc *ArchiveManagerConfig) *ArchiveFileManager
func (*ArchiveFileManager) CreateHistoryArchiveTorrentFromDB ¶ added in v0.179.29
func (*ArchiveFileManager) CreateHistoryArchiveTorrentFromMessages ¶ added in v0.179.29
func (*ArchiveFileManager) ExtractMessagesFromHistoryArchive ¶ added in v0.179.29
func (m *ArchiveFileManager) ExtractMessagesFromHistoryArchive(communityID types.HexBytes, archiveID string) ([]*protobuf.WakuMessage, error)
func (*ArchiveFileManager) GetHistoryArchiveMagnetlink ¶ added in v0.179.29
func (m *ArchiveFileManager) GetHistoryArchiveMagnetlink(communityID types.HexBytes) (string, error)
func (*ArchiveFileManager) GetMessageArchiveIDsToImport ¶ added in v0.179.29
func (m *ArchiveFileManager) GetMessageArchiveIDsToImport(communityID types.HexBytes) ([]string, error)
func (*ArchiveFileManager) LoadHistoryArchiveIndexFromFile ¶ added in v0.179.29
func (m *ArchiveFileManager) LoadHistoryArchiveIndexFromFile(myKey *ecdsa.PrivateKey, communityID types.HexBytes) (*protobuf.WakuMessageArchiveIndex, error)
func (*ArchiveFileManager) SaveMessageArchiveID ¶ added in v0.179.29
func (m *ArchiveFileManager) SaveMessageArchiveID(communityID types.HexBytes, hash string) error
func (*ArchiveFileManager) SetMessageArchiveIDImported ¶ added in v0.179.29
type ArchiveFileService ¶ added in v0.179.29
type ArchiveFileService interface { CreateHistoryArchiveTorrentFromMessages(communityID types.HexBytes, messages []*types.Message, topics []types.TopicType, startDate time.Time, endDate time.Time, partition time.Duration, encrypt bool) ([]string, error) CreateHistoryArchiveTorrentFromDB(communityID types.HexBytes, topics []types.TopicType, startDate time.Time, endDate time.Time, partition time.Duration, encrypt bool) ([]string, error) SaveMessageArchiveID(communityID types.HexBytes, hash string) error GetMessageArchiveIDsToImport(communityID types.HexBytes) ([]string, error) SetMessageArchiveIDImported(communityID types.HexBytes, hash string, imported bool) error ExtractMessagesFromHistoryArchive(communityID types.HexBytes, archiveID string) ([]*protobuf.WakuMessage, error) GetHistoryArchiveMagnetlink(communityID types.HexBytes) (string, error) LoadHistoryArchiveIndexFromFile(myKey *ecdsa.PrivateKey, communityID types.HexBytes) (*protobuf.WakuMessageArchiveIndex, error) }
type ArchiveManager ¶ added in v0.179.29
type ArchiveManager struct { *ArchiveFileManager // contains filtered or unexported fields }
func NewArchiveManager ¶ added in v0.179.29
func NewArchiveManager(amc *ArchiveManagerConfig) *ArchiveManager
NewArchiveManager this function is only built and called when the "disable_torrent" build tag is not set In this case this version of NewArchiveManager will return the full Desktop ArchiveManager ensuring that the build command will import and build the torrent deps for the Desktop OSes. NOTE: It is intentional that this file contains the identical function name as in "manager_archive_nop.go"
func (*ArchiveManager) AddHistoryArchiveDownloadTask ¶ added in v0.179.29
func (m *ArchiveManager) AddHistoryArchiveDownloadTask(communityID string, task *HistoryArchiveDownloadTask)
func (*ArchiveManager) CreateAndSeedHistoryArchive ¶ added in v0.179.29
func (*ArchiveManager) DownloadHistoryArchivesByMagnetlink ¶ added in v0.179.29
func (m *ArchiveManager) DownloadHistoryArchivesByMagnetlink(communityID types.HexBytes, magnetlink string, cancelTask chan struct{}) (*HistoryArchiveDownloadTaskInfo, error)
func (*ArchiveManager) GetCommunityChatsFilters ¶ added in v0.179.29
func (*ArchiveManager) GetCommunityChatsTopics ¶ added in v0.179.29
func (*ArchiveManager) GetHistoryArchiveDownloadTask ¶ added in v0.179.29
func (m *ArchiveManager) GetHistoryArchiveDownloadTask(communityID string) *HistoryArchiveDownloadTask
func (*ArchiveManager) GetHistoryArchivePartitionStartTimestamp ¶ added in v0.179.29
func (m *ArchiveManager) GetHistoryArchivePartitionStartTimestamp(communityID types.HexBytes) (uint64, error)
func (*ArchiveManager) IsReady ¶ added in v0.179.29
func (m *ArchiveManager) IsReady() bool
func (*ArchiveManager) IsSeedingHistoryArchiveTorrent ¶ added in v0.179.29
func (m *ArchiveManager) IsSeedingHistoryArchiveTorrent(communityID types.HexBytes) bool
func (*ArchiveManager) SeedHistoryArchiveTorrent ¶ added in v0.179.29
func (m *ArchiveManager) SeedHistoryArchiveTorrent(communityID types.HexBytes) error
func (*ArchiveManager) SetOnline ¶ added in v0.179.29
func (m *ArchiveManager) SetOnline(online bool)
func (*ArchiveManager) SetTorrentConfig ¶ added in v0.179.29
func (m *ArchiveManager) SetTorrentConfig(config *params.TorrentConfig)
func (*ArchiveManager) StartHistoryArchiveTasksInterval ¶ added in v0.179.29
func (m *ArchiveManager) StartHistoryArchiveTasksInterval(community *Community, interval time.Duration)
func (*ArchiveManager) StartTorrentClient ¶ added in v0.179.29
func (m *ArchiveManager) StartTorrentClient() error
func (*ArchiveManager) Stop ¶ added in v0.179.29
func (m *ArchiveManager) Stop() error
func (*ArchiveManager) StopHistoryArchiveTasksInterval ¶ added in v0.179.29
func (m *ArchiveManager) StopHistoryArchiveTasksInterval(communityID types.HexBytes)
func (*ArchiveManager) TorrentFileExists ¶ added in v0.179.29
func (m *ArchiveManager) TorrentFileExists(communityID string) bool
func (*ArchiveManager) UnseedHistoryArchiveTorrent ¶ added in v0.179.29
func (m *ArchiveManager) UnseedHistoryArchiveTorrent(communityID types.HexBytes)
type ArchiveManagerConfig ¶ added in v0.179.29
type ArchiveManagerConfig struct { TorrentConfig *params.TorrentConfig Logger *zap.Logger Persistence *Persistence Transport *transport.Transport Identity *ecdsa.PrivateKey Encryptor *encryption.Protocol Publisher Publisher }
type ArchiveService ¶ added in v0.179.29
type ArchiveService interface { ArchiveFileService SetOnline(bool) SetTorrentConfig(*params.TorrentConfig) StartTorrentClient() error Stop() error IsReady() bool GetCommunityChatsFilters(communityID types.HexBytes) ([]*transport.Filter, error) GetCommunityChatsTopics(communityID types.HexBytes) ([]types.TopicType, error) GetHistoryArchivePartitionStartTimestamp(communityID types.HexBytes) (uint64, error) CreateAndSeedHistoryArchive(communityID types.HexBytes, topics []types.TopicType, startDate time.Time, endDate time.Time, partition time.Duration, encrypt bool) error StartHistoryArchiveTasksInterval(community *Community, interval time.Duration) StopHistoryArchiveTasksInterval(communityID types.HexBytes) SeedHistoryArchiveTorrent(communityID types.HexBytes) error UnseedHistoryArchiveTorrent(communityID types.HexBytes) IsSeedingHistoryArchiveTorrent(communityID types.HexBytes) bool GetHistoryArchiveDownloadTask(communityID string) *HistoryArchiveDownloadTask AddHistoryArchiveDownloadTask(communityID string, task *HistoryArchiveDownloadTask) DownloadHistoryArchivesByMagnetlink(communityID types.HexBytes, magnetlink string, cancelTask chan struct{}) (*HistoryArchiveDownloadTaskInfo, error) TorrentFileExists(communityID string) bool }
type AssetContractData ¶ added in v0.179.19
type BalancesByChain ¶ added in v0.158.0
type BalancesByChain = map[uint64]map[gethcommon.Address]map[gethcommon.Address]*hexutil.Big
type ByRoleDesc ¶ added in v0.174.5
type ByRoleDesc []*HighestRoleResponse
func (ByRoleDesc) Len ¶ added in v0.174.5
func (a ByRoleDesc) Len() int
func (ByRoleDesc) Less ¶ added in v0.174.5
func (a ByRoleDesc) Less(i, j int) bool
func (ByRoleDesc) Swap ¶ added in v0.174.5
func (a ByRoleDesc) Swap(i, j int)
type CheckAllChannelsPermissionsResponse ¶ added in v0.159.2
type CheckAllChannelsPermissionsResponse struct {
Channels map[string]*CheckChannelPermissionsResponse `json:"channels"`
}
type CheckChannelPermissionsResponse ¶ added in v0.159.2
type CheckChannelPermissionsResponse struct { ViewOnlyPermissions *CheckChannelViewOnlyPermissionsResult `json:"viewOnlyPermissions"` ViewAndPostPermissions *CheckChannelViewAndPostPermissionsResult `json:"viewAndPostPermissions"` }
type CheckChannelViewAndPostPermissionsResult ¶ added in v0.159.2
type CheckChannelViewAndPostPermissionsResult struct { Satisfied bool `json:"satisfied"` Permissions map[string]*PermissionTokenCriteriaResult `json:"permissions"` }
type CheckChannelViewOnlyPermissionsResult ¶ added in v0.159.2
type CheckChannelViewOnlyPermissionsResult struct { Satisfied bool `json:"satisfied"` Permissions map[string]*PermissionTokenCriteriaResult `json:"permissions"` }
type CheckPermissionToJoinResponse ¶ added in v0.151.13
type CheckPermissionToJoinResponse = CheckPermissionsResponse
type CheckPermissionsResponse ¶ added in v0.159.2
type CheckPermissionsResponse struct { Satisfied bool `json:"satisfied"` Permissions map[string]*PermissionTokenCriteriaResult `json:"permissions"` ValidCombinations []*AccountChainIDsCombination `json:"validCombinations"` NetworksNotSupported bool `json:"networksNotSupported"` }
func (*CheckPermissionsResponse) MarshalJSON ¶ added in v0.174.5
func (c *CheckPermissionsResponse) MarshalJSON() ([]byte, error)
type CollectibleContractData ¶ added in v0.179.19
type CollectiblesByChain ¶ added in v0.158.0
type CollectiblesByChain = map[uint64]map[gethcommon.Address]thirdparty.TokenBalancesPerContractAddress
type CollectiblesManager ¶ added in v0.162.5
type CollectiblesManager interface { FetchBalancesByOwnerAndContractAddress(ctx context.Context, chainID walletcommon.ChainID, ownerAddress gethcommon.Address, contractAddresses []gethcommon.Address) (thirdparty.TokenBalancesPerContractAddress, error) FetchCachedBalancesByOwnerAndContractAddress(ctx context.Context, chainID walletcommon.ChainID, ownerAddress gethcommon.Address, contractAddresses []gethcommon.Address) (thirdparty.TokenBalancesPerContractAddress, error) GetCollectibleOwnership(id thirdparty.CollectibleUniqueID) ([]thirdparty.AccountBalance, error) FetchCollectibleOwnersByContractAddress(ctx context.Context, chainID walletcommon.ChainID, contractAddress gethcommon.Address) (*thirdparty.CollectibleContractOwnership, error) }
type CollectiblesOwners ¶ added in v0.179.29
type CollectiblesOwners = map[walletcommon.ChainID]map[gethcommon.Address]*thirdparty.CollectibleContractOwnership
type Community ¶
type Community struct {
// contains filtered or unexported fields
}
func New ¶
func New(config Config, timesource common.TimeSource, encryptor DescriptionEncryptor, mediaServer server.MediaServerInterface) (*Community, error)
func (*Community) AddCommunityTokensMetadata ¶ added in v0.137.2
func (o *Community) AddCommunityTokensMetadata(token *protobuf.CommunityTokenMetadata) (*protobuf.CommunityDescription, error)
func (*Community) AddMember ¶ added in v0.103.2
func (o *Community) AddMember(publicKey *ecdsa.PublicKey, roles []protobuf.CommunityMember_Roles, lastUpdateClock uint64) (*CommunityChanges, error)
func (*Community) AddMemberToChat ¶ added in v0.162.9
func (o *Community) AddMemberToChat(chatID string, publicKey *ecdsa.PublicKey, roles []protobuf.CommunityMember_Roles, channelRole protobuf.CommunityMember_ChannelRole) (*CommunityChanges, error)
func (*Community) AddRequestToJoin ¶ added in v0.83.8
func (o *Community) AddRequestToJoin(request *RequestToJoin)
func (*Community) AddRoleToMember
deprecated
added in
v0.115.5
func (o *Community) AddRoleToMember(pk *ecdsa.PublicKey, role protobuf.CommunityMember_Roles) (*protobuf.CommunityDescription, error)
Deprecated: roles are mutually exclusive, use SetRoleToMember instead.
func (*Community) AdminSettings ¶ added in v0.158.0
func (o *Community) AdminSettings() *protobuf.CommunityAdminSettings
func (*Community) AllowsAllMembersToPinMessage ¶ added in v0.100.0
func (*Community) AutoAccept ¶ added in v0.171.6
func (*Community) BanUserFromCommunity ¶ added in v0.73.9
func (o *Community) BanUserFromCommunity(pk *ecdsa.PublicKey, communityBanInfo *protobuf.CommunityBanInfo) (*protobuf.CommunityDescription, error)
func (*Community) BuildGrant ¶ added in v0.103.2
func (*Community) CanDeleteMessageForEveryone ¶ added in v0.115.5
func (*Community) CanManageUsers ¶ added in v0.72.0
func (*Community) CanManageUsersPublicKeys ¶ added in v0.74.2
func (*Community) CanMemberIdentityPost ¶ added in v0.94.12
func (*Community) CanRequestAccess ¶ added in v0.72.0
func (*Community) Categories ¶ added in v0.79.3
func (o *Community) Categories() map[string]*protobuf.CommunityCategory
func (*Community) ChannelEncrypted ¶ added in v0.171.8
func (*Community) ChannelTokenPermissionsByType ¶ added in v0.159.2
func (o *Community) ChannelTokenPermissionsByType(channelID string, permissionType protobuf.CommunityTokenPermission_Type) []*CommunityTokenPermission
func (*Community) ChatsByCategoryID ¶ added in v0.102.6
func (*Community) CommunityChatsIDs ¶ added in v0.162.5
func (*Community) CommunityShard ¶ added in v0.171.35
func (o *Community) CommunityShard() CommunityShard
func (*Community) CommunityTokensMetadata ¶ added in v0.137.2
func (o *Community) CommunityTokensMetadata() []*protobuf.CommunityTokenMetadata
func (*Community) ControlNode ¶ added in v0.171.1
func (*Community) CreateCategory ¶ added in v0.79.3
func (*Community) CreateChat ¶
func (o *Community) CreateChat(chatID string, chat *protobuf.CommunityChat) (*CommunityChanges, error)
func (*Community) CreateDeepCopy ¶ added in v0.162.13
func (*Community) DeclineRequestToJoin ¶
func (o *Community) DeclineRequestToJoin(dbRequest *RequestToJoin) (adminEventCreated bool, err error)
func (*Community) DeleteCategory ¶ added in v0.79.3
func (o *Community) DeleteCategory(categoryID string) (*CommunityChanges, error)
func (*Community) DeleteChat ¶
func (o *Community) DeleteChat(chatID string) (*CommunityChanges, error)
func (*Community) DeleteTokenPermission ¶ added in v0.136.0
func (o *Community) DeleteTokenPermission(permissionID string) (*CommunityChanges, error)
func (*Community) Description ¶ added in v0.76.3
func (o *Community) Description() *protobuf.CommunityDescription
func (*Community) DescriptionProtocolMessage ¶ added in v0.172.1
func (*Community) DescriptionText ¶ added in v0.83.8
func (*Community) Edit ¶ added in v0.79.0
func (o *Community) Edit(description *protobuf.CommunityDescription)
func (*Community) EditCategory ¶ added in v0.79.3
func (*Community) EditChat ¶ added in v0.79.8
func (o *Community) EditChat(chatID string, chat *protobuf.CommunityChat) (*CommunityChanges, error)
func (*Community) EditPermissionAccess ¶ added in v0.179.12
func (o *Community) EditPermissionAccess(permissionAccess protobuf.CommunityPermissions_Access)
func (*Community) EncryptedDescription ¶ added in v0.177.1
func (o *Community) EncryptedDescription() (*protobuf.CommunityDescription, error)
func (*Community) GetChat ¶ added in v0.176.7
func (o *Community) GetChat(chatID string) (*protobuf.CommunityChat, error)
func (*Community) GetFilteredPrivilegedMembers ¶ added in v0.167.2
func (*Community) GetMember ¶ added in v0.161.4
func (o *Community) GetMember(pk *ecdsa.PublicKey) *protobuf.CommunityMember
func (*Community) GetMemberPubkeys ¶ added in v0.102.2
func (*Community) GetPrivilegedMembers ¶ added in v0.162.13
func (*Community) GetTokenMasterMembers ¶ added in v0.181.35
func (*Community) HasMissingEncryptionKey ¶ added in v0.182.36
func (*Community) HasPermissionToSendCommunityEvents ¶ added in v0.162.13
func (*Community) HasTokenPermissions ¶ added in v0.141.1
func (*Community) Identity ¶ added in v0.158.0
func (o *Community) Identity() *protobuf.ChatIdentity
func (*Community) Images ¶ added in v0.101.1
func (o *Community) Images() map[string]*protobuf.IdentityImage
func (*Community) IntroMessage ¶ added in v0.100.1
func (*Community) IsControlNode ¶ added in v0.162.9
We treat control node as an owner with community key
func (*Community) IsMemberAdmin ¶ added in v0.74.2
func (*Community) IsMemberInChat ¶
func (*Community) IsMemberLikelyInChat ¶ added in v0.181.33
Uses bloom filter members list to estimate presence in the channel. False positive rate is 0.1%.
func (*Community) IsMemberOwner ¶ added in v0.158.0
func (*Community) IsMemberTokenMaster ¶ added in v0.162.13
func (*Community) IsPrivilegedMember ¶ added in v0.162.13
func (*Community) IsTokenMaster ¶ added in v0.162.15
func (*Community) LastOpenedAt ¶ added in v0.172.8
func (*Community) MagnetlinkMessageChannelID ¶ added in v0.96.2
func (*Community) ManualAccept ¶ added in v0.171.6
func (*Community) MarshalJSON ¶
func (*Community) MarshalPublicAPIJSON ¶ added in v0.86.2
func (*Community) MarshaledDescription ¶
func (*Community) MemberCanManageToken ¶ added in v0.163.14
func (o *Community) MemberCanManageToken(member *ecdsa.PublicKey, token *community_token.CommunityToken) bool
func (*Community) MemberIdentity ¶ added in v0.94.12
func (*Community) MemberRole ¶ added in v0.158.0
func (o *Community) MemberRole(pubKey *ecdsa.PublicKey) protobuf.CommunityMember_Roles
func (*Community) MemberUpdateChannelID ¶ added in v0.103.3
func (*Community) Members ¶ added in v0.140.0
func (o *Community) Members() map[string]*protobuf.CommunityMember
func (*Community) MembersCount ¶ added in v0.76.3
func (*Community) OutroMessage ¶ added in v0.100.1
func (*Community) PendingAndBannedMembers ¶ added in v0.168.1
func (o *Community) PendingAndBannedMembers() map[string]CommunityMemberState
func (*Community) Permissions ¶ added in v0.158.0
func (o *Community) Permissions() *protobuf.CommunityPermissions
func (*Community) PopulateChannelsWithAllMembers ¶ added in v0.179.20
func (o *Community) PopulateChannelsWithAllMembers()
func (*Community) PopulateChatWithAllMembers ¶ added in v0.162.13
func (o *Community) PopulateChatWithAllMembers(chatID string) (*CommunityChanges, error)
func (*Community) PrivateKey ¶
func (o *Community) PrivateKey() *ecdsa.PrivateKey
func (*Community) PubsubTopic ¶ added in v0.166.1
func (*Community) PubsubTopicKey ¶ added in v0.171.10
func (*Community) PubsubTopicPrivateKey ¶ added in v0.171.10
func (o *Community) PubsubTopicPrivateKey() *ecdsa.PrivateKey
func (*Community) RemoveAllUsersFromOrg ¶ added in v0.171.8
func (o *Community) RemoveAllUsersFromOrg() *CommunityChanges
func (*Community) RemoveMembersFromOrg ¶ added in v0.181.34
func (o *Community) RemoveMembersFromOrg(membersToRemove []string) *CommunityChanges
func (*Community) RemoveOurselvesFromOrg ¶ added in v0.110.2
func (*Community) RemoveRoleFromMember ¶ added in v0.115.5
func (o *Community) RemoveRoleFromMember(pk *ecdsa.PublicKey, role protobuf.CommunityMember_Roles) (*protobuf.CommunityDescription, error)
func (*Community) RemoveUserFromChat ¶
func (*Community) RemoveUserFromOrg ¶
func (*Community) ReorderCategories ¶ added in v0.79.3
func (o *Community) ReorderCategories(categoryID string, newPosition int) (*CommunityChanges, error)
func (*Community) ReorderChat ¶ added in v0.79.3
func (*Community) RequestedToJoinAt ¶ added in v0.72.0
func (*Community) RequestsToJoin ¶ added in v0.83.8
func (o *Community) RequestsToJoin() []*RequestToJoin
func (*Community) SerializedID ¶ added in v0.171.12
func (*Community) SetActiveMembersCount ¶ added in v0.142.1
func (*Community) SetPubsubTopicPrivateKey ¶ added in v0.171.10
func (o *Community) SetPubsubTopicPrivateKey(privKey *ecdsa.PrivateKey)
func (*Community) SetResendAccountsClock ¶ added in v0.181.34
func (*Community) SetRoleToMember ¶ added in v0.179.22
func (o *Community) SetRoleToMember(pk *ecdsa.PublicKey, role protobuf.CommunityMember_Roles) (*protobuf.CommunityDescription, error)
func (*Community) SortCategoryChats ¶ added in v0.79.3
func (o *Community) SortCategoryChats(changes *CommunityChanges, categoryID string)
func (*Community) StatusUpdatesChannelID ¶ added in v0.83.2
func (*Community) Tags ¶ added in v0.102.5
func (o *Community) Tags() []CommunityTag
func (*Community) TagsIndices ¶ added in v0.161.2
func (*Community) ToAddTokenMetadataCommunityEvent ¶ added in v0.162.15
func (o *Community) ToAddTokenMetadataCommunityEvent(tokenMetadata *protobuf.CommunityTokenMetadata) *CommunityEvent
func (*Community) ToBanCommunityMemberCommunityEvent ¶ added in v0.162.5
func (o *Community) ToBanCommunityMemberCommunityEvent(pubkey string) *CommunityEvent
func (*Community) ToCommunityEditCommunityEvent ¶ added in v0.162.5
func (o *Community) ToCommunityEditCommunityEvent(description *protobuf.CommunityDescription) *CommunityEvent
func (*Community) ToCommunityRequestToJoinAcceptCommunityEvent ¶ added in v0.162.5
func (o *Community) ToCommunityRequestToJoinAcceptCommunityEvent(member string, request *protobuf.CommunityRequestToJoin) *CommunityEvent
func (*Community) ToCommunityRequestToJoinRejectCommunityEvent ¶ added in v0.162.5
func (o *Community) ToCommunityRequestToJoinRejectCommunityEvent(member string, request *protobuf.CommunityRequestToJoin) *CommunityEvent
func (*Community) ToCommunityTokenPermissionChangeCommunityEvent ¶ added in v0.162.5
func (o *Community) ToCommunityTokenPermissionChangeCommunityEvent(permission *protobuf.CommunityTokenPermission) *CommunityEvent
func (*Community) ToCommunityTokenPermissionDeleteCommunityEvent ¶ added in v0.162.5
func (o *Community) ToCommunityTokenPermissionDeleteCommunityEvent(permission *protobuf.CommunityTokenPermission) *CommunityEvent
func (*Community) ToCreateCategoryCommunityEvent ¶ added in v0.162.5
func (o *Community) ToCreateCategoryCommunityEvent(categoryID string, categoryName string, channelsIds []string) *CommunityEvent
func (*Community) ToCreateChannelCommunityEvent ¶ added in v0.162.5
func (o *Community) ToCreateChannelCommunityEvent(channelID string, channel *protobuf.CommunityChat) *CommunityEvent
func (*Community) ToDeleteAllMemberMessagesEvent ¶ added in v0.176.3
func (o *Community) ToDeleteAllMemberMessagesEvent(pubkey string) *CommunityEvent
func (*Community) ToDeleteCategoryCommunityEvent ¶ added in v0.162.5
func (o *Community) ToDeleteCategoryCommunityEvent(categoryID string) *CommunityEvent
func (*Community) ToDeleteChannelCommunityEvent ¶ added in v0.162.5
func (o *Community) ToDeleteChannelCommunityEvent(channelID string) *CommunityEvent
func (*Community) ToEditCategoryCommunityEvent ¶ added in v0.162.5
func (o *Community) ToEditCategoryCommunityEvent(categoryID string, categoryName string, channelsIds []string) *CommunityEvent
func (*Community) ToEditChannelCommunityEvent ¶ added in v0.162.5
func (o *Community) ToEditChannelCommunityEvent(channelID string, channel *protobuf.CommunityChat) *CommunityEvent
func (*Community) ToKickCommunityMemberCommunityEvent ¶ added in v0.162.5
func (o *Community) ToKickCommunityMemberCommunityEvent(pubkey string) *CommunityEvent
func (*Community) ToProtocolMessageBytes ¶ added in v0.162.14
ToProtocolMessageBytes returns the community in a wrapped & signed protocol message
func (*Community) ToReorderCategoryCommunityEvent ¶ added in v0.162.5
func (o *Community) ToReorderCategoryCommunityEvent(categoryID string, position int) *CommunityEvent
func (*Community) ToReorderChannelCommunityEvent ¶ added in v0.162.5
func (o *Community) ToReorderChannelCommunityEvent(categoryID string, channelID string, position int) *CommunityEvent
func (*Community) ToStatusLinkPreview ¶ added in v0.171.34
func (c *Community) ToStatusLinkPreview() (*common.StatusCommunityLinkPreview, error)
func (*Community) ToSyncInstallationCommunityProtobuf ¶ added in v0.163.14
func (o *Community) ToSyncInstallationCommunityProtobuf(clock uint64, communitySettings *CommunitySettings, syncControlNode *protobuf.SyncCommunityControlNode) (*protobuf.SyncInstallationCommunity, error)
func (*Community) ToUnbanCommunityMemberCommunityEvent ¶ added in v0.162.5
func (o *Community) ToUnbanCommunityMemberCommunityEvent(pubkey string) *CommunityEvent
func (*Community) TokenPermissionByID ¶ added in v0.166.1
func (o *Community) TokenPermissionByID(ID string) *CommunityTokenPermission
func (*Community) TokenPermissions ¶ added in v0.139.1
func (o *Community) TokenPermissions() map[string]*CommunityTokenPermission
func (*Community) TokenPermissionsByType ¶ added in v0.139.1
func (o *Community) TokenPermissionsByType(permissionType protobuf.CommunityTokenPermission_Type) []*CommunityTokenPermission
func (*Community) UnbanUserFromCommunity ¶ added in v0.102.6
func (*Community) UncompressedIDString ¶ added in v0.171.12
func (*Community) UpdateChatFirstMessageTimestamp ¶ added in v0.109.1
func (o *Community) UpdateChatFirstMessageTimestamp(chatID string, timestamp uint32) (*CommunityChanges, error)
func (*Community) UpdateCommunityDescription ¶ added in v0.72.0
func (o *Community) UpdateCommunityDescription(description *protobuf.CommunityDescription, rawMessage []byte, newControlNode *ecdsa.PublicKey) (*CommunityChanges, error)
UpdateCommunityDescription will update the community to the new community description and return a list of changes
func (*Community) UpdateLastOpenedAt ¶ added in v0.172.8
func (*Community) UpdateMemberLastUpdateClock ¶ added in v0.181.35
func (*Community) UpsertCommunityTokensMetadata ¶ added in v0.179.22
func (o *Community) UpsertCommunityTokensMetadata(token *protobuf.CommunityTokenMetadata) (bool, error)
func (*Community) UpsertTokenPermission ¶ added in v0.166.1
func (o *Community) UpsertTokenPermission(tokenPermission *protobuf.CommunityTokenPermission) (*CommunityChanges, error)
func (*Community) ValidateEditSharedAddresses ¶ added in v0.161.4
func (o *Community) ValidateEditSharedAddresses(signer string, request *protobuf.CommunityEditSharedAddresses) error
ValidateRequestToJoin validates a request, checks that the right permissions are applied
func (*Community) ValidateEvent ¶ added in v0.163.4
func (o *Community) ValidateEvent(event *CommunityEvent, signer *ecdsa.PublicKey) error
func (*Community) ValidateRequestToJoin ¶ added in v0.72.0
func (o *Community) ValidateRequestToJoin(signer *ecdsa.PublicKey, request *protobuf.CommunityRequestToJoin) error
ValidateRequestToJoin validates a request, checks that the right permissions are applied
type CommunityAdminSettings ¶ added in v0.100.0
type CommunityAdminSettings struct {
PinMessageAllMembersEnabled bool `json:"pinMessageAllMembersEnabled"`
}
type CommunityCategory ¶ added in v0.79.3
type CommunityChanges ¶
type CommunityChanges struct { Community *Community `json:"community"` ControlNodeChanged *ecdsa.PublicKey `json:"controlNodeChanged"` MembersAdded map[string]*protobuf.CommunityMember `json:"membersAdded"` MembersRemoved map[string]*protobuf.CommunityMember `json:"membersRemoved"` MembersBanned map[string]bool `json:"membersBanned"` MembersUnbanned map[string]bool `json:"membersUnbanned"` TokenPermissionsAdded map[string]*CommunityTokenPermission `json:"tokenPermissionsAdded"` TokenPermissionsModified map[string]*CommunityTokenPermission `json:"tokenPermissionsModified"` TokenPermissionsRemoved map[string]*CommunityTokenPermission `json:"tokenPermissionsRemoved"` ChatsRemoved map[string]*protobuf.CommunityChat `json:"chatsRemoved"` ChatsAdded map[string]*protobuf.CommunityChat `json:"chatsAdded"` ChatsModified map[string]*CommunityChatChanges `json:"chatsModified"` CategoriesRemoved []string `json:"categoriesRemoved"` CategoriesAdded map[string]*protobuf.CommunityCategory `json:"categoriesAdded"` CategoriesModified map[string]*protobuf.CommunityCategory `json:"categoriesModified"` MemberWalletsRemoved []string `json:"memberWalletsRemoved"` MemberWalletsAdded map[string][]*protobuf.RevealedAccount `json:"memberWalletsAdded"` // ShouldMemberJoin indicates whether the user should join this community // automatically ShouldMemberJoin bool `json:"memberAdded"` // MemberKicked indicates whether the user has been kicked out MemberKicked bool `json:"memberRemoved"` // MemberSoftKicked indicates whether the user has been kicked out due to lack of specific data // No kick AC notification will be generated and member will join automatically // as soon as he provides missing data MemberSoftKicked bool `json:"memberSoftRemoved"` }
func EmptyCommunityChanges ¶ added in v0.162.3
func EmptyCommunityChanges() *CommunityChanges
func EvaluateCommunityChanges ¶ added in v0.162.3
func EvaluateCommunityChanges(origin, modified *Community) *CommunityChanges
func (*CommunityChanges) HasMemberLeft ¶ added in v0.72.0
func (c *CommunityChanges) HasMemberLeft(identity string) bool
func (*CommunityChanges) HasNewMember ¶ added in v0.72.0
func (c *CommunityChanges) HasNewMember(identity string) bool
func (*CommunityChanges) IsMemberBanned ¶ added in v0.175.3
func (c *CommunityChanges) IsMemberBanned(identity string) bool
func (*CommunityChanges) IsMemberUnbanned ¶ added in v0.175.3
func (c *CommunityChanges) IsMemberUnbanned(identity string) bool
func (*CommunityChanges) Merge ¶ added in v0.179.29
func (c *CommunityChanges) Merge(other *CommunityChanges)
type CommunityChat ¶ added in v0.72.0
type CommunityChat struct { ID string `json:"id"` Name string `json:"name"` Color string `json:"color"` Emoji string `json:"emoji"` Description string `json:"description"` Members map[string]*protobuf.CommunityMember `json:"members"` Permissions *protobuf.CommunityPermissions `json:"permissions"` CanPost bool `json:"canPost"` CanView bool `json:"canView"` CanPostReactions bool `json:"canPostReactions"` ViewersCanPostReactions bool `json:"viewersCanPostReactions"` Position int `json:"position"` CategoryID string `json:"categoryID"` TokenGated bool `json:"tokenGated"` HideIfPermissionsNotMet bool `json:"hideIfPermissionsNotMet"` MissingEncryptionKey bool `json:"missingEncryptionKey"` }
type CommunityChatChanges ¶
type CommunityChatChanges struct { ChatModified *protobuf.CommunityChat MembersAdded map[string]*protobuf.CommunityMember MembersRemoved map[string]*protobuf.CommunityMember CategoryModified string PositionModified int FirstMessageTimestampModified uint32 }
type CommunityEvent ¶ added in v0.162.5
type CommunityEvent struct { CommunityEventClock uint64 `json:"communityEventClock"` Type protobuf.CommunityEvent_EventType `json:"type"` CommunityConfig *protobuf.CommunityConfig `json:"communityConfig,omitempty"` TokenPermission *protobuf.CommunityTokenPermission `json:"tokenPermissions,omitempty"` CategoryData *protobuf.CategoryData `json:"categoryData,omitempty"` ChannelData *protobuf.ChannelData `json:"channelData,omitempty"` MemberToAction string `json:"memberToAction,omitempty"` RequestToJoin *protobuf.CommunityRequestToJoin `json:"requestToJoin,omitempty"` TokenMetadata *protobuf.CommunityTokenMetadata `json:"tokenMetadata,omitempty"` Payload []byte `json:"payload"` Signature []byte `json:"signature"` }
func (*CommunityEvent) EventTypeID ¶ added in v0.175.3
func (e *CommunityEvent) EventTypeID() string
EventTypeID constructs a unique identifier for an event and its associated target.
func (*CommunityEvent) RecoverSigner ¶ added in v0.163.5
func (e *CommunityEvent) RecoverSigner() (*ecdsa.PublicKey, error)
func (*CommunityEvent) Sign ¶ added in v0.163.5
func (e *CommunityEvent) Sign(pk *ecdsa.PrivateKey) error
func (*CommunityEvent) ToProtobuf ¶ added in v0.162.5
func (e *CommunityEvent) ToProtobuf() *protobuf.CommunityEvent
func (*CommunityEvent) Validate ¶ added in v0.175.3
func (e *CommunityEvent) Validate() error
type CommunityEventsMessage ¶ added in v0.162.5
type CommunityEventsMessage struct { CommunityID []byte `json:"communityId"` EventsBaseCommunityDescription []byte `json:"eventsBaseCommunityDescription"` Events []CommunityEvent `json:"events,omitempty"` }
func CommunityEventsMessageFromProtobuf ¶ added in v0.162.5
func CommunityEventsMessageFromProtobuf(msg *protobuf.CommunityEventsMessage) (*CommunityEventsMessage, error)
func (*CommunityEventsMessage) Marshal ¶ added in v0.162.5
func (m *CommunityEventsMessage) Marshal() ([]byte, error)
func (*CommunityEventsMessage) ToProtobuf ¶ added in v0.162.5
func (m *CommunityEventsMessage) ToProtobuf() *protobuf.CommunityEventsMessage
type CommunityLock ¶ added in v0.175.3
type CommunityLock struct {
// contains filtered or unexported fields
}
func NewCommunityLock ¶ added in v0.175.3
func NewCommunityLock(logger *zap.Logger) *CommunityLock
func (*CommunityLock) Init ¶ added in v0.175.3
func (c *CommunityLock) Init()
func (*CommunityLock) Lock ¶ added in v0.175.3
func (c *CommunityLock) Lock(communityID types.HexBytes)
func (*CommunityLock) Unlock ¶ added in v0.175.3
func (c *CommunityLock) Unlock(communityID types.HexBytes)
type CommunityMemberState ¶ added in v0.168.1
type CommunityMemberState uint8
const ( CommunityMemberBanned CommunityMemberState = iota CommunityMemberBanPending CommunityMemberUnbanPending CommunityMemberKickPending CommunityMemberBanWithAllMessagesDelete )
type CommunityPrivateDataFailedToDecrypt ¶ added in v0.174.0
type CommunityPrivilegedMemberSyncMessage ¶ added in v0.167.2
type CommunityPrivilegedMemberSyncMessage struct { Receivers []*ecdsa.PublicKey CommunityPrivilegedUserSyncMessage *protobuf.CommunityPrivilegedUserSyncMessage }
type CommunityRecord ¶ added in v0.171.27
type CommunityRecord struct {
// contains filtered or unexported fields
}
type CommunityRecordBundle ¶ added in v0.171.27
type CommunityRecordBundle struct {
// contains filtered or unexported fields
}
type CommunityResponse ¶ added in v0.72.0
type CommunityResponse struct { Community *Community `json:"community"` Changes *CommunityChanges `json:"changes"` RequestsToJoin []*RequestToJoin `json:"requestsToJoin"` FailedToDecrypt []*CommunityPrivateDataFailedToDecrypt `json:"-"` }
type CommunitySettings ¶ added in v0.96.4
type CommunityShard ¶ added in v0.170.0
type CommunityTag ¶ added in v0.102.5
type CommunityTokenPermission ¶ added in v0.166.1
type CommunityTokenPermission struct { *protobuf.CommunityTokenPermission State TokenPermissionState `json:"state,omitempty"` }
func NewCommunityTokenPermission ¶ added in v0.166.1
func NewCommunityTokenPermission(base *protobuf.CommunityTokenPermission) *CommunityTokenPermission
func TokenPermissionsByType ¶ added in v0.162.9
func TokenPermissionsByType(permissions map[string]*CommunityTokenPermission, permissionType protobuf.CommunityTokenPermission_Type) []*CommunityTokenPermission
func (*CommunityTokenPermission) ChatIdsAsMap ¶ added in v0.179.29
func (p *CommunityTokenPermission) ChatIdsAsMap() map[string]struct{}
func (*CommunityTokenPermission) Equals ¶ added in v0.166.1
func (p *CommunityTokenPermission) Equals(other *CommunityTokenPermission) bool
func (*CommunityTokenPermission) HasChat ¶ added in v0.179.29
func (p *CommunityTokenPermission) HasChat(chatId string) bool
type CommunityTokensServiceInterface ¶ added in v0.179.19
type CommunityTokensServiceInterface interface { GetCollectibleContractData(chainID uint64, contractAddress string) (*CollectibleContractData, error) SetSignerPubKey(ctx context.Context, chainID uint64, contractAddress string, txArgs transactions.SendTxArgs, password string, newSignerPubKey string) (string, error) GetAssetContractData(chainID uint64, contractAddress string) (*AssetContractData, error) SafeGetSignerPubKey(ctx context.Context, chainID uint64, communityID string) (string, error) DeploymentSignatureDigest(chainID uint64, addressFrom string, communityID string) ([]byte, error) ProcessCommunityTokenAction(message *protobuf.CommunityTokenAction) error }
type CommunityWithChannelIDs ¶ added in v0.182.36
type Config ¶
type Config struct { PrivateKey *ecdsa.PrivateKey ControlNode *ecdsa.PublicKey ControlDevice bool // whether this device is control node CommunityDescription *protobuf.CommunityDescription CommunityDescriptionProtocolMessage []byte // community in a wrapped & signed (by owner) protocol message ID *ecdsa.PublicKey Joined bool JoinedAt int64 Requested bool Verified bool Spectated bool Muted bool MuteTill time.Time Logger *zap.Logger RequestedToJoinAt uint64 RequestsToJoin []*RequestToJoin MemberIdentity *ecdsa.PrivateKey EventsData *EventsData Shard *shard.Shard PubsubTopicPrivateKey *ecdsa.PrivateKey LastOpenedAt int64 }
type CuratedCommunities ¶ added in v0.171.21
type DecryptCommunityResponse ¶ added in v0.174.0
type DecryptCommunityResponse struct { Decrypted bool Description *protobuf.CommunityDescription KeyID []byte GroupID []byte }
type DefaultPermissionChecker ¶ added in v0.171.5
type DefaultPermissionChecker struct {
// contains filtered or unexported fields
}
func (*DefaultPermissionChecker) CheckCachedPermissions ¶ added in v0.180.31
func (p *DefaultPermissionChecker) CheckCachedPermissions(permissionsParsedData *PreParsedCommunityPermissionsData, accountsAndChainIDs []*AccountChainIDsCombination, shortcircuit bool) (*CheckPermissionsResponse, error)
func (*DefaultPermissionChecker) CheckPermissionToJoin ¶ added in v0.171.5
func (p *DefaultPermissionChecker) CheckPermissionToJoin(community *Community, addresses []gethcommon.Address) (*CheckPermissionToJoinResponse, error)
func (*DefaultPermissionChecker) CheckPermissions ¶ added in v0.171.5
func (p *DefaultPermissionChecker) CheckPermissions(permissionsParsedData *PreParsedCommunityPermissionsData, accountsAndChainIDs []*AccountChainIDsCombination, shortcircuit bool) (*CheckPermissionsResponse, error)
CheckPermissions will retrieve balances and check whether the user has permission to join the community, if shortcircuit is true, it will stop as soon as we know the answer
func (*DefaultPermissionChecker) CheckPermissionsWithPreFetchedData ¶ added in v0.179.29
func (p *DefaultPermissionChecker) CheckPermissionsWithPreFetchedData(permissionsParsedData *PreParsedCommunityPermissionsData, accountsAndChainIDs []*AccountChainIDsCombination, shortcircuit bool, collectiblesOwners CollectiblesOwners) (*CheckPermissionsResponse, error)
Same as CheckPermissions but relies on already provided collectibles owners
func (*DefaultPermissionChecker) MergeValidCombinations ¶ added in v0.174.5
func (p *DefaultPermissionChecker) MergeValidCombinations(left, right []*AccountChainIDsCombination) []*AccountChainIDsCombination
merge valid combinations w/o duplicates
type DefaultTokenManager ¶ added in v0.151.13
type DefaultTokenManager struct {
// contains filtered or unexported fields
}
func NewDefaultTokenManager ¶ added in v0.151.13
func NewDefaultTokenManager(tm *token.Manager, nm network.ManagerInterface) *DefaultTokenManager
func (*DefaultTokenManager) FindOrCreateTokenByAddress ¶ added in v0.166.9
func (m *DefaultTokenManager) FindOrCreateTokenByAddress(ctx context.Context, chainID uint64, address gethcommon.Address) *token.Token
func (*DefaultTokenManager) GetAllChainIDs ¶ added in v0.158.0
func (m *DefaultTokenManager) GetAllChainIDs() ([]uint64, error)
func (*DefaultTokenManager) GetBalancesByChain ¶ added in v0.151.13
func (m *DefaultTokenManager) GetBalancesByChain(ctx context.Context, accounts, tokenAddresses []gethcommon.Address, chainIDs []uint64) (BalancesByChain, error)
func (*DefaultTokenManager) GetCachedBalancesByChain ¶ added in v0.180.31
func (m *DefaultTokenManager) GetCachedBalancesByChain(ctx context.Context, accounts, tokenAddresses []gethcommon.Address, chainIDs []uint64) (BalancesByChain, error)
type DescriptionEncryptor ¶ added in v0.171.39
type DescriptionEncryptor interface {
// contains filtered or unexported methods
}
type EncodedArchiveData ¶ added in v0.98.1
type EncodedArchiveData struct {
// contains filtered or unexported fields
}
type EncryptionKeyAction ¶ added in v0.162.9
type EncryptionKeyAction struct { ActionType EncryptionKeyActionType Members map[string]*protobuf.CommunityMember RemovedMembers map[string]*protobuf.CommunityMember }
type EncryptionKeyActionType ¶ added in v0.162.9
type EncryptionKeyActionType int
const ( EncryptionKeyNone EncryptionKeyActionType = iota EncryptionKeyAdd EncryptionKeyRemove EncryptionKeyRekey EncryptionKeySendToMembers )
type EncryptionKeyActions ¶ added in v0.162.9
type EncryptionKeyActions struct { // community-level encryption key action CommunityKeyAction EncryptionKeyAction // channel-level encryption key actions ChannelKeysActions map[string]EncryptionKeyAction // key is: chatID }
func EvaluateCommunityEncryptionKeyActions ¶ added in v0.162.9
func EvaluateCommunityEncryptionKeyActions(origin, modified *Community) *EncryptionKeyActions
type EncryptionKeysRequestRecord ¶ added in v0.182.36
type EncryptionKeysRequestRecord struct {
// contains filtered or unexported fields
}
type EventsData ¶ added in v0.162.5
type EventsData struct { EventsBaseCommunityDescription []byte Events []CommunityEvent }
type EventsRecord ¶ added in v0.171.27
type EventsRecord struct {
// contains filtered or unexported fields
}
type HighestRoleResponse ¶ added in v0.174.5
type HighestRoleResponse struct { Role protobuf.CommunityTokenPermission_Type `json:"type"` Satisfied bool `json:"satisfied"` Criteria []*PermissionTokenCriteriaResult `json:"criteria"` }
type HistoryArchiveDownloadTask ¶ added in v0.117.1
type HistoryArchiveDownloadTask struct { CancelChan chan struct{} Waiter sync.WaitGroup Cancelled bool // contains filtered or unexported fields }
func (*HistoryArchiveDownloadTask) Cancel ¶ added in v0.117.1
func (t *HistoryArchiveDownloadTask) Cancel()
func (*HistoryArchiveDownloadTask) IsCancelled ¶ added in v0.125.1
func (t *HistoryArchiveDownloadTask) IsCancelled() bool
type HistoryArchiveDownloadTaskInfo ¶ added in v0.117.1
type KeyDistributor ¶ added in v0.171.39
type KeyDistributor interface { Generate(community *Community, keyActions *EncryptionKeyActions) error Distribute(community *Community, keyActions *EncryptionKeyActions) error }
type KnownCommunitiesResponse ¶ added in v0.100.1
type Manager ¶
type Manager struct { RekeyInterval time.Duration PermissionChecker PermissionChecker // contains filtered or unexported fields }
func NewManager ¶
func NewManager( identity *ecdsa.PrivateKey, installationID string, db *sql.DB, encryptor *encryption.Protocol, logger *zap.Logger, ensverifier *ens.Verifier, ownerVerifier OwnerVerifier, transport *transport.Transport, timesource common.TimeSource, keyDistributor KeyDistributor, mediaServer server.MediaServerInterface, opts ...ManagerOption, ) (*Manager, error)
func (*Manager) AcceptRequestToJoin ¶ added in v0.72.0
func (m *Manager) AcceptRequestToJoin(dbRequest *RequestToJoin) (*Community, error)
func (*Manager) AcceptedPendingRequestsToJoinForCommunity ¶ added in v0.163.4
func (m *Manager) AcceptedPendingRequestsToJoinForCommunity(id types.HexBytes) ([]*RequestToJoin, error)
func (*Manager) AcceptedRequestsToJoinForCommunity ¶ added in v0.158.0
func (m *Manager) AcceptedRequestsToJoinForCommunity(id types.HexBytes) ([]*RequestToJoin, error)
func (*Manager) AddCommunityToken ¶ added in v0.133.2
func (m *Manager) AddCommunityToken(token *community_token.CommunityToken, clock uint64) (*Community, error)
func (*Manager) AddMemberOwnerToCommunity ¶ added in v0.115.6
func (*Manager) AddRoleToMember ¶ added in v0.115.5
func (m *Manager) AddRoleToMember(request *requests.AddRoleToMember) (*Community, error)
func (*Manager) AllNonApprovedCommunitiesRequestsToJoin ¶ added in v0.171.30
func (m *Manager) AllNonApprovedCommunitiesRequestsToJoin() ([]*RequestToJoin, error)
func (*Manager) BanUserFromCommunity ¶ added in v0.73.9
func (m *Manager) BanUserFromCommunity(request *requests.BanUserFromCommunity) (*Community, error)
func (*Manager) CancelRequestToJoin ¶ added in v0.114.1
func (m *Manager) CancelRequestToJoin(request *requests.CancelRequestToJoinCommunity) (*RequestToJoin, *Community, error)
func (*Manager) CanceledRequestsToJoinForCommunity ¶ added in v0.114.1
func (m *Manager) CanceledRequestsToJoinForCommunity(id types.HexBytes) ([]*RequestToJoin, error)
func (*Manager) CanceledRequestsToJoinForUser ¶ added in v0.114.1
func (m *Manager) CanceledRequestsToJoinForUser(pk *ecdsa.PublicKey) ([]*RequestToJoin, error)
func (*Manager) CheckAllChannelsPermissions ¶ added in v0.159.2
func (m *Manager) CheckAllChannelsPermissions(communityID types.HexBytes, addresses []gethcommon.Address) (*CheckAllChannelsPermissionsResponse, error)
func (*Manager) CheckChannelPermissions ¶ added in v0.159.2
func (m *Manager) CheckChannelPermissions(communityID types.HexBytes, chatID string, addresses []gethcommon.Address) (*CheckChannelPermissionsResponse, error)
func (*Manager) CheckPermissionToJoin ¶ added in v0.151.13
func (m *Manager) CheckPermissionToJoin(id []byte, addresses []gethcommon.Address) (*CheckPermissionToJoinResponse, error)
func (*Manager) CommunitiesToValidate ¶ added in v0.171.1
Only for testing
func (*Manager) CommunitySettingsExist ¶ added in v0.96.4
func (*Manager) CommunityUpdateLastOpenedAt ¶ added in v0.172.8
func (*Manager) Controlled ¶ added in v0.171.5
func (*Manager) CreateCategory ¶ added in v0.79.3
func (m *Manager) CreateCategory(request *requests.CreateCommunityCategory, publish bool) (*Community, *CommunityChanges, error)
func (*Manager) CreateChat ¶
func (m *Manager) CreateChat(communityID types.HexBytes, chat *protobuf.CommunityChat, publish bool, thirdPartyID string) (*CommunityChanges, error)
func (*Manager) CreateCommunity ¶
func (m *Manager) CreateCommunity(request *requests.CreateCommunity, publish bool) (*Community, error)
CreateCommunity takes a description, generates an ID for it, saves it and return it
func (*Manager) CreateCommunityTokenDeploymentSignature ¶ added in v0.168.1
func (*Manager) CreateCommunityTokenPermission ¶ added in v0.136.0
func (m *Manager) CreateCommunityTokenPermission(request *requests.CreateCommunityTokenPermission) (*Community, *CommunityChanges, error)
func (*Manager) CreateRequestToJoin ¶ added in v0.162.3
func (m *Manager) CreateRequestToJoin(request *requests.RequestToJoinCommunity, customizationColor multiaccountscommon.CustomizationColor) *RequestToJoin
func (*Manager) DeclineRequestToJoin ¶ added in v0.72.0
func (m *Manager) DeclineRequestToJoin(dbRequest *RequestToJoin) (*Community, error)
func (*Manager) DeclinedPendingRequestsToJoinForCommunity ¶ added in v0.163.4
func (m *Manager) DeclinedPendingRequestsToJoinForCommunity(id types.HexBytes) ([]*RequestToJoin, error)
func (*Manager) DeclinedRequestsToJoinForCommunity ¶ added in v0.106.1
func (m *Manager) DeclinedRequestsToJoinForCommunity(id types.HexBytes) ([]*RequestToJoin, error)
func (*Manager) DeleteCategory ¶ added in v0.79.3
func (m *Manager) DeleteCategory(request *requests.DeleteCommunityCategory) (*Community, *CommunityChanges, error)
func (*Manager) DeleteChat ¶ added in v0.83.8
func (*Manager) DeleteCommunity ¶ added in v0.114.1
func (*Manager) DeleteCommunitySettings ¶ added in v0.96.4
func (*Manager) DeleteCommunityShard ¶ added in v0.171.39
func (*Manager) DeleteCommunityTokenPermission ¶ added in v0.136.0
func (m *Manager) DeleteCommunityTokenPermission(request *requests.DeleteCommunityTokenPermission) (*Community, *CommunityChanges, error)
func (*Manager) DeletePendingRequestToJoin ¶ added in v0.146.4
func (m *Manager) DeletePendingRequestToJoin(request *RequestToJoin) error
func (*Manager) DeletedCommunities ¶ added in v0.98.3
func (*Manager) DetermineChannelsForHRKeysRequest ¶ added in v0.182.36
func (m *Manager) DetermineChannelsForHRKeysRequest() ([]*CommunityWithChannelIDs, error)
DetermineChannelsForHRKeysRequest identifies channels in a community that should ask for encryption keys based on their current state and past request records, as determined by exponential backoff.
func (*Manager) EditCategory ¶ added in v0.79.3
func (m *Manager) EditCategory(request *requests.EditCommunityCategory) (*Community, *CommunityChanges, error)
func (*Manager) EditChat ¶ added in v0.79.8
func (m *Manager) EditChat(communityID types.HexBytes, chatID string, chat *protobuf.CommunityChat) (*Community, *CommunityChanges, error)
func (*Manager) EditChatFirstMessageTimestamp ¶ added in v0.109.1
func (*Manager) EditCommunity ¶ added in v0.79.0
func (m *Manager) EditCommunity(request *requests.EditCommunity) (*Community, error)
EditCommunity takes a description, updates the community with the description, saves it and returns it
func (*Manager) EditCommunityTokenPermission ¶ added in v0.136.0
func (m *Manager) EditCommunityTokenPermission(request *requests.EditCommunityTokenPermission) (*Community, *CommunityChanges, error)
func (*Manager) ExportCommunity ¶
func (*Manager) FetchCommunityToken ¶ added in v0.167.5
func (m *Manager) FetchCommunityToken(community *Community, tokenMetadata *protobuf.CommunityTokenMetadata, chainID uint64, contractAddress string) (*community_token.CommunityToken, error)
func (*Manager) ForceMembersReevaluation ¶ added in v0.179.16
func (*Manager) GenerateRequestsToJoinForAutoApprovalOnNewOwnership ¶ added in v0.171.8
func (m *Manager) GenerateRequestsToJoinForAutoApprovalOnNewOwnership(communityID types.HexBytes, kickedMembers map[string]*protobuf.CommunityMember) ([]*RequestToJoin, error)
func (*Manager) GetAllCommunityTokens ¶ added in v0.148.4
func (m *Manager) GetAllCommunityTokens() ([]*community_token.CommunityToken, error)
func (*Manager) GetByIDString ¶
func (*Manager) GetCheckChannelPermissionResponses ¶ added in v0.159.7
func (m *Manager) GetCheckChannelPermissionResponses(communityID types.HexBytes) (*CheckAllChannelsPermissionsResponse, error)
func (*Manager) GetCollectiblesManager ¶ added in v0.175.3
func (m *Manager) GetCollectiblesManager() CollectiblesManager
TODO: add collectiblesManager to messenger intance
func (*Manager) GetCommunitiesSettings ¶ added in v0.96.4
func (m *Manager) GetCommunitiesSettings() ([]CommunitySettings, error)
func (*Manager) GetCommunityGrant ¶ added in v0.174.8
func (*Manager) GetCommunityRequestToJoinClock ¶ added in v0.171.25
func (*Manager) GetCommunityRequestToJoinWithRevealedAddresses ¶ added in v0.171.8
func (*Manager) GetCommunityRequestsToJoinWithRevealedAddresses ¶ added in v0.167.2
func (m *Manager) GetCommunityRequestsToJoinWithRevealedAddresses(communityID types.HexBytes) ([]*RequestToJoin, error)
func (*Manager) GetCommunitySettingsByID ¶ added in v0.96.4
func (m *Manager) GetCommunitySettingsByID(id types.HexBytes) (*CommunitySettings, error)
func (*Manager) GetCommunityShard ¶ added in v0.171.39
func (*Manager) GetCommunityToken ¶ added in v0.163.14
func (m *Manager) GetCommunityToken(communityID string, chainID int, address string) (*community_token.CommunityToken, error)
func (*Manager) GetCommunityTokenByChainAndAddress ¶ added in v0.179.19
func (m *Manager) GetCommunityTokenByChainAndAddress(chainID int, address string) (*community_token.CommunityToken, error)
func (*Manager) GetCommunityTokens ¶ added in v0.133.2
func (m *Manager) GetCommunityTokens(communityID string) ([]*community_token.CommunityToken, error)
func (*Manager) GetCuratedCommunities ¶ added in v0.171.21
func (m *Manager) GetCuratedCommunities() (*CuratedCommunities, error)
func (*Manager) GetLastSeenMagnetlink ¶ added in v0.117.3
func (*Manager) GetLatestWakuMessageTimestamp ¶ added in v0.98.1
func (*Manager) GetMagnetlinkMessageClock ¶ added in v0.98.1
func (*Manager) GetOwnedCommunitiesChatIDs ¶ added in v0.171.1
func (*Manager) GetOwnedERC721Tokens ¶ added in v0.158.0
func (m *Manager) GetOwnedERC721Tokens(walletAddresses []gethcommon.Address, tokenRequirements map[uint64]map[string]*protobuf.TokenCriteria, chainIDs []uint64) (CollectiblesByChain, error)
func (*Manager) GetPermissionedBalances ¶ added in v0.174.3
func (m *Manager) GetPermissionedBalances( ctx context.Context, communityID types.HexBytes, accountAddresses []gethcommon.Address, ) (map[gethcommon.Address][]PermissionedBalance, error)
GetPermissionedBalances returns balances indexed by account address.
It assumes balances in different chains with the same symbol can be summed. It also assumes the criteria's decimals field is the same across different criteria when they refer to the same asset (by symbol).
func (*Manager) GetPersistence ¶ added in v0.179.29
func (m *Manager) GetPersistence() *Persistence
GetPersistence returns the instantiated *Persistence used by the Manager
func (*Manager) GetRequestToJoin ¶ added in v0.103.2
func (m *Manager) GetRequestToJoin(ID types.HexBytes) (*RequestToJoin, error)
func (*Manager) GetRequestToJoinByPkAndCommunityID ¶ added in v0.171.30
func (*Manager) GetRevealedAddresses ¶ added in v0.163.4
func (*Manager) GetStoredDescriptionForCommunities ¶ added in v0.100.1
func (m *Manager) GetStoredDescriptionForCommunities(communityIDs []string) (*KnownCommunitiesResponse, error)
func (*Manager) GetSyncControlNode ¶ added in v0.171.5
func (*Manager) GetSyncedRawCommunity ¶ added in v0.83.8
func (m *Manager) GetSyncedRawCommunity(id []byte) (*RawCommunityRow, error)
func (*Manager) HandleCommunityCancelRequestToJoin ¶ added in v0.114.1
func (m *Manager) HandleCommunityCancelRequestToJoin(signer *ecdsa.PublicKey, request *protobuf.CommunityCancelRequestToJoin) (*RequestToJoin, error)
func (*Manager) HandleCommunityDescriptionMessage ¶
func (*Manager) HandleCommunityEditSharedAddresses ¶ added in v0.161.4
func (*Manager) HandleCommunityEventsMessage ¶ added in v0.162.5
func (m *Manager) HandleCommunityEventsMessage(signer *ecdsa.PublicKey, message *protobuf.CommunityEventsMessage) (*CommunityResponse, error)
func (*Manager) HandleCommunityGrant ¶ added in v0.179.5
func (*Manager) HandleCommunityRequestToJoin ¶ added in v0.72.0
func (m *Manager) HandleCommunityRequestToJoin(signer *ecdsa.PublicKey, receiver *ecdsa.PublicKey, request *protobuf.CommunityRequestToJoin) (*Community, *RequestToJoin, error)
func (*Manager) HandleCommunityRequestToJoinResponse ¶ added in v0.103.2
func (m *Manager) HandleCommunityRequestToJoinResponse(signer *ecdsa.PublicKey, request *protobuf.CommunityRequestToJoinResponse) (*RequestToJoin, error)
func (*Manager) HandleCommunityRequestToLeave ¶ added in v0.106.3
func (*Manager) HandleEditSharedAddressesPrivilegedUserSyncMessage ¶ added in v0.181.35
func (m *Manager) HandleEditSharedAddressesPrivilegedUserSyncMessage(message *protobuf.CommunityPrivilegedUserSyncMessage, community *Community) error
func (*Manager) HandleRequestToJoinPrivilegedUserSyncMessage ¶ added in v0.163.14
func (m *Manager) HandleRequestToJoinPrivilegedUserSyncMessage(message *protobuf.CommunityPrivilegedUserSyncMessage, community *Community) ([]*RequestToJoin, error)
func (*Manager) HandleSyncAllRequestToJoinForNewPrivilegedMember ¶ added in v0.167.2
func (m *Manager) HandleSyncAllRequestToJoinForNewPrivilegedMember(message *protobuf.CommunityPrivilegedUserSyncMessage, community *Community) ([]*RequestToJoin, error)
func (*Manager) HandleSyncCommunitySettings ¶ added in v0.102.2
func (m *Manager) HandleSyncCommunitySettings(syncCommunitySettings *protobuf.SyncCommunitySettings) (*CommunitySettings, error)
func (*Manager) ImageToBase64 ¶ added in v0.139.1
func (*Manager) ImportCommunity ¶
func (*Manager) IsChannelEncrypted ¶ added in v0.162.13
func (*Manager) IsEncrypted ¶ added in v0.102.2
func (*Manager) JoinCommunity ¶
func (*Manager) JoinedAndPendingCommunitiesWithRequests ¶ added in v0.83.8
func (*Manager) KickedOutOfCommunity ¶ added in v0.171.8
Same as LeaveCommunity, but we have an option to stay spectating
func (*Manager) LeaveCommunity ¶
func (*Manager) MuteCommunityTill ¶ added in v0.162.5
func (*Manager) NewHashRatchetKeys ¶ added in v0.176.9
func (m *Manager) NewHashRatchetKeys(keys []*encryption.HashRatchetInfo) error
func (*Manager) PendingRequestsToJoin ¶ added in v0.146.4
func (m *Manager) PendingRequestsToJoin() ([]*RequestToJoin, error)
func (*Manager) PendingRequestsToJoinForCommunity ¶ added in v0.72.0
func (m *Manager) PendingRequestsToJoinForCommunity(id types.HexBytes) ([]*RequestToJoin, error)
func (*Manager) PendingRequestsToJoinForUser ¶ added in v0.72.0
func (m *Manager) PendingRequestsToJoinForUser(pk *ecdsa.PublicKey) ([]*RequestToJoin, error)
func (*Manager) PromoteSelfToControlNode ¶ added in v0.171.3
func (m *Manager) PromoteSelfToControlNode(community *Community, clock uint64) (*CommunityChanges, error)
func (*Manager) ReevaluateMembers ¶ added in v0.162.13
func (m *Manager) ReevaluateMembers(communityID types.HexBytes) (*Community, map[protobuf.CommunityMember_Roles][]*ecdsa.PublicKey, error)
use it only for testing purposes
func (*Manager) RemoveCommunityToken ¶ added in v0.162.13
func (*Manager) RemovePrivateKey ¶ added in v0.162.9
func (*Manager) RemoveRequestToJoinRevealedAddresses ¶ added in v0.166.3
func (*Manager) RemoveRoleFromMember ¶ added in v0.115.5
func (m *Manager) RemoveRoleFromMember(request *requests.RemoveRoleFromMember) (*Community, error)
func (*Manager) RemoveUserFromCommunity ¶
func (*Manager) RemoveUsersWithoutRevealedAccounts ¶ added in v0.181.34
func (m *Manager) RemoveUsersWithoutRevealedAccounts(community *Community, clock uint64) (*CommunityChanges, error)
func (*Manager) ReorderCategories ¶ added in v0.79.3
func (m *Manager) ReorderCategories(request *requests.ReorderCommunityCategories) (*Community, *CommunityChanges, error)
func (*Manager) ReorderChat ¶ added in v0.79.3
func (m *Manager) ReorderChat(request *requests.ReorderCommunityChat) (*Community, *CommunityChanges, error)
func (*Manager) RequestsToJoinForCommunityAwaitingAddresses ¶ added in v0.171.8
func (m *Manager) RequestsToJoinForCommunityAwaitingAddresses(id types.HexBytes) ([]*RequestToJoin, error)
func (*Manager) SafeGetSignerPubKey ¶ added in v0.171.8
func (*Manager) SaveCommunity ¶ added in v0.167.5
func (*Manager) SaveCommunitySettings ¶ added in v0.96.4
func (m *Manager) SaveCommunitySettings(settings CommunitySettings) error
func (*Manager) SaveCommunityShard ¶ added in v0.171.39
func (*Manager) SaveCommunityToken ¶ added in v0.162.13
func (m *Manager) SaveCommunityToken(token *community_token.CommunityToken, croppedImage *images.CroppedImage) (*community_token.CommunityToken, error)
func (*Manager) SaveRequestToJoin ¶ added in v0.83.8
func (m *Manager) SaveRequestToJoin(request *RequestToJoin) error
func (*Manager) SaveRequestToJoinAndCommunity ¶ added in v0.162.3
func (m *Manager) SaveRequestToJoinAndCommunity(requestToJoin *RequestToJoin, community *Community) (*Community, *RequestToJoin, error)
func (*Manager) SaveRequestToJoinRevealedAddresses ¶ added in v0.166.3
func (*Manager) SaveSyncControlNode ¶ added in v0.171.5
func (*Manager) ScheduleMembersReevaluation ¶ added in v0.176.7
func (*Manager) SetCommunityActiveMembersCount ¶ added in v0.142.1
func (*Manager) SetCuratedCommunities ¶ added in v0.171.21
func (m *Manager) SetCuratedCommunities(communities *CuratedCommunities) error
func (*Manager) SetMediaServer ¶ added in v0.182.35
func (m *Manager) SetMediaServer(mediaServer server.MediaServerInterface)
func (*Manager) SetPrivateKey ¶ added in v0.83.8
func (m *Manager) SetPrivateKey(id []byte, privKey *ecdsa.PrivateKey) error
func (*Manager) SetSyncClock ¶ added in v0.83.8
func (*Manager) SetSyncControlNode ¶ added in v0.171.5
func (*Manager) ShareRequestsToJoinWithPrivilegedMembers ¶ added in v0.181.35
func (*Manager) ShouldHandleSyncCommunity ¶ added in v0.83.8
func (m *Manager) ShouldHandleSyncCommunity(community *protobuf.SyncInstallationCommunity) (bool, error)
func (*Manager) ShouldHandleSyncCommunitySettings ¶ added in v0.102.2
func (m *Manager) ShouldHandleSyncCommunitySettings(communitySettings *protobuf.SyncCommunitySettings) (bool, error)
func (*Manager) SpectateCommunity ¶ added in v0.111.5
func (*Manager) StartMembersReevaluationLoop ¶ added in v0.179.15
func (*Manager) StoreWakuMessage ¶ added in v0.97.4
func (*Manager) StoreWakuMessages ¶ added in v0.114.1
func (*Manager) Subscribe ¶
func (m *Manager) Subscribe() chan *Subscription
func (*Manager) UnbanUserFromCommunity ¶ added in v0.102.6
func (m *Manager) UnbanUserFromCommunity(request *requests.UnbanUserFromCommunity) (*Community, error)
func (*Manager) UpdateClockInRequestToJoin ¶ added in v0.146.4
func (*Manager) UpdateCommunityDescriptionMagnetlinkMessageClock ¶ added in v0.98.1
func (*Manager) UpdateCommunitySettings ¶ added in v0.96.4
func (m *Manager) UpdateCommunitySettings(settings CommunitySettings) error
func (*Manager) UpdateCommunityTokenAddress ¶ added in v0.163.14
func (*Manager) UpdateCommunityTokenState ¶ added in v0.133.2
func (m *Manager) UpdateCommunityTokenState(chainID int, contractAddress string, deployState community_token.DeployState) error
func (*Manager) UpdateCommunityTokenSupply ¶ added in v0.158.0
func (*Manager) UpdateEncryptionKeysRequests ¶ added in v0.182.36
func (*Manager) UpdateLastSeenMagnetlink ¶ added in v0.117.3
func (*Manager) UpdateMagnetlinkMessageClock ¶ added in v0.98.1
func (*Manager) UpdatePubsubTopicPrivateKey ¶ added in v0.171.10
func (m *Manager) UpdatePubsubTopicPrivateKey(topic string, privKey *ecdsa.PrivateKey) error
func (*Manager) UpdateShard ¶ added in v0.170.0
func (*Manager) ValidateCommunityByID ¶ added in v0.172.1
func (m *Manager) ValidateCommunityByID(communityID types.HexBytes) (*CommunityResponse, error)
func (*Manager) ValidateCommunityPrivilegedUserSyncMessage ¶ added in v0.163.14
func (m *Manager) ValidateCommunityPrivilegedUserSyncMessage(message *protobuf.CommunityPrivilegedUserSyncMessage) error
type ManagerOption ¶ added in v0.139.1
type ManagerOption func(*managerOptions)
func WithAccountManager ¶ added in v0.139.1
func WithAccountManager(accountsManager account.Manager) ManagerOption
func WithAllowForcingCommunityMembersReevaluation ¶ added in v0.179.16
func WithAllowForcingCommunityMembersReevaluation(enabled bool) ManagerOption
func WithCollectiblesManager ¶ added in v0.162.5
func WithCollectiblesManager(collectiblesManager CollectiblesManager) ManagerOption
func WithCommunityTokensService ¶ added in v0.166.1
func WithCommunityTokensService(communityTokensService CommunityTokensServiceInterface) ManagerOption
func WithPermissionChecker ¶ added in v0.171.5
func WithPermissionChecker(permissionChecker PermissionChecker) ManagerOption
func WithTokenManager ¶ added in v0.140.0
func WithTokenManager(tokenManager TokenManager) ManagerOption
func WithWalletConfig ¶ added in v0.142.2
func WithWalletConfig(walletConfig *params.WalletConfig) ManagerOption
type OwnerVerifier ¶ added in v0.171.1
type PermissionChecker ¶ added in v0.171.5
type PermissionChecker interface { CheckPermissionToJoin(*Community, []gethcommon.Address) (*CheckPermissionToJoinResponse, error) CheckPermissions(permissionsParsedData *PreParsedCommunityPermissionsData, accountsAndChainIDs []*AccountChainIDsCombination, shortcircuit bool) (*CheckPermissionsResponse, error) CheckPermissionsWithPreFetchedData(permissionsParsedData *PreParsedCommunityPermissionsData, accountsAndChainIDs []*AccountChainIDsCombination, shortcircuit bool, collectiblesOwners CollectiblesOwners) (*CheckPermissionsResponse, error) }
type PermissionTokenCriteriaResult ¶ added in v0.159.2
type PermissionTokenCriteriaResult struct { Role protobuf.CommunityTokenPermission_Type `json:"roles"` TokenRequirements []TokenRequirementResponse `json:"tokenRequirement"` Criteria []bool `json:"criteria"` ID string `json:"id"` }
type PermissionedBalance ¶ added in v0.174.3
type Persistence ¶
type Persistence struct {
// contains filtered or unexported fields
}
func (*Persistence) AcceptedPendingRequestsToJoinForCommunity ¶ added in v0.163.4
func (p *Persistence) AcceptedPendingRequestsToJoinForCommunity(id []byte) ([]*RequestToJoin, error)
func (*Persistence) AcceptedRequestsToJoinForCommunity ¶ added in v0.158.0
func (p *Persistence) AcceptedRequestsToJoinForCommunity(id []byte) ([]*RequestToJoin, error)
func (*Persistence) AddCommunityToken ¶ added in v0.133.2
func (p *Persistence) AddCommunityToken(token *token.CommunityToken) error
func (*Persistence) AllCommunities ¶
func (p *Persistence) AllCommunities(memberIdentity *ecdsa.PublicKey) ([]*Community, error)
func (*Persistence) AllNonApprovedCommunitiesRequestsToJoin ¶ added in v0.171.28
func (p *Persistence) AllNonApprovedCommunitiesRequestsToJoin() ([]*RequestToJoin, error)
func (*Persistence) CanceledRequestsToJoinForCommunity ¶ added in v0.114.1
func (p *Persistence) CanceledRequestsToJoinForCommunity(id []byte) ([]*RequestToJoin, error)
func (*Persistence) CanceledRequestsToJoinForUser ¶ added in v0.114.1
func (p *Persistence) CanceledRequestsToJoinForUser(pk string) ([]*RequestToJoin, error)
func (*Persistence) CommunitiesWithPrivateKey ¶ added in v0.162.14
func (p *Persistence) CommunitiesWithPrivateKey(memberIdentity *ecdsa.PublicKey) ([]*Community, error)
func (*Persistence) CommunitySettingsExist ¶ added in v0.96.4
func (p *Persistence) CommunitySettingsExist(communityID types.HexBytes) (bool, error)
func (*Persistence) DeclinedPendingRequestsToJoinForCommunity ¶ added in v0.163.4
func (p *Persistence) DeclinedPendingRequestsToJoinForCommunity(id []byte) ([]*RequestToJoin, error)
func (*Persistence) DeclinedRequestsToJoinForCommunity ¶ added in v0.106.1
func (p *Persistence) DeclinedRequestsToJoinForCommunity(id []byte) ([]*RequestToJoin, error)
func (*Persistence) DeleteCommunitiesToValidateByCommunityID ¶ added in v0.171.1
func (p *Persistence) DeleteCommunitiesToValidateByCommunityID(communityID []byte) error
func (*Persistence) DeleteCommunity ¶ added in v0.114.1
func (p *Persistence) DeleteCommunity(id types.HexBytes) error
func (*Persistence) DeleteCommunityEvents ¶ added in v0.162.5
func (p *Persistence) DeleteCommunityEvents(id types.HexBytes) error
func (*Persistence) DeleteCommunitySettings ¶ added in v0.96.4
func (p *Persistence) DeleteCommunitySettings(communityID types.HexBytes) error
func (*Persistence) DeleteCommunityShard ¶ added in v0.171.39
func (p *Persistence) DeleteCommunityShard(communityID types.HexBytes) error
func (*Persistence) DeleteCommunityToValidate ¶ added in v0.171.8
func (p *Persistence) DeleteCommunityToValidate(communityID []byte, clock uint64) error
func (*Persistence) DeletePendingRequestToJoin ¶ added in v0.146.4
func (p *Persistence) DeletePendingRequestToJoin(id []byte) error
func (*Persistence) DeletedCommunities ¶ added in v0.98.3
func (p *Persistence) DeletedCommunities(memberIdentity *ecdsa.PublicKey) (comms []*Community, err error)
func (*Persistence) GetAllCommunityTokens ¶ added in v0.148.4
func (p *Persistence) GetAllCommunityTokens() ([]*token.CommunityToken, error)
func (*Persistence) GetAppliedCommunityEvents ¶ added in v0.175.3
func (*Persistence) GetCheckChannelPermissionResponses ¶ added in v0.159.7
func (p *Persistence) GetCheckChannelPermissionResponses(communityID string) (map[string]*CheckChannelPermissionsResponse, error)
func (*Persistence) GetCommunitiesSettings ¶ added in v0.96.4
func (p *Persistence) GetCommunitiesSettings() ([]CommunitySettings, error)
func (*Persistence) GetCommunityChatIDs ¶ added in v0.98.1
func (p *Persistence) GetCommunityChatIDs(communityID types.HexBytes) ([]string, error)
func (*Persistence) GetCommunityGrant ¶ added in v0.174.8
func (p *Persistence) GetCommunityGrant(communityID string) ([]byte, uint64, error)
func (*Persistence) GetCommunityRequestToJoinWithRevealedAddresses ¶ added in v0.171.8
func (p *Persistence) GetCommunityRequestToJoinWithRevealedAddresses(pubKey string, communityID []byte) (*RequestToJoin, error)
func (*Persistence) GetCommunityRequestsToJoinRevealedAddresses ¶ added in v0.179.20
func (p *Persistence) GetCommunityRequestsToJoinRevealedAddresses(communityID []byte) (map[string][]*protobuf.RevealedAccount, error)
func (*Persistence) GetCommunityRequestsToJoinWithRevealedAddresses ¶ added in v0.167.2
func (p *Persistence) GetCommunityRequestsToJoinWithRevealedAddresses(communityID []byte) ([]*RequestToJoin, error)
func (*Persistence) GetCommunitySettingsByID ¶ added in v0.96.4
func (p *Persistence) GetCommunitySettingsByID(communityID types.HexBytes) (*CommunitySettings, error)
func (*Persistence) GetCommunityShard ¶ added in v0.171.39
if data will not be found, will return sql.ErrNoRows. Must be handled on the caller side
func (*Persistence) GetCommunityToken ¶ added in v0.162.13
func (p *Persistence) GetCommunityToken(communityID string, chainID int, address string) (*token.CommunityToken, error)
func (*Persistence) GetCommunityTokenByChainAndAddress ¶ added in v0.179.19
func (p *Persistence) GetCommunityTokenByChainAndAddress(chainID int, address string) (*token.CommunityToken, error)
func (*Persistence) GetCommunityTokens ¶ added in v0.133.2
func (p *Persistence) GetCommunityTokens(communityID string) ([]*token.CommunityToken, error)
func (*Persistence) GetCuratedCommunities ¶ added in v0.171.21
func (p *Persistence) GetCuratedCommunities() (*CuratedCommunities, error)
func (*Persistence) GetDecryptedCommunityDescription ¶ added in v0.176.9
func (p *Persistence) GetDecryptedCommunityDescription(communityID []byte, clock uint64) (*protobuf.CommunityDescription, error)
func (*Persistence) GetDownloadedMessageArchiveIDs ¶ added in v0.117.1
func (p *Persistence) GetDownloadedMessageArchiveIDs(communityID types.HexBytes) ([]string, error)
func (*Persistence) GetEncryptionKeyRequests ¶ added in v0.182.36
func (p *Persistence) GetEncryptionKeyRequests(communityID []byte, channelIDs map[string]struct{}) (map[string]*EncryptionKeysRequestRecord, error)
func (*Persistence) GetLastMessageArchiveEndDate ¶ added in v0.98.1
func (p *Persistence) GetLastMessageArchiveEndDate(communityID types.HexBytes) (uint64, error)
func (*Persistence) GetLastSeenMagnetlink ¶ added in v0.117.3
func (p *Persistence) GetLastSeenMagnetlink(communityID types.HexBytes) (string, error)
func (*Persistence) GetLatestWakuMessageTimestamp ¶ added in v0.98.1
func (p *Persistence) GetLatestWakuMessageTimestamp(topics []types.TopicType) (uint64, error)
func (*Persistence) GetMagnetlinkMessageClock ¶ added in v0.98.1
func (p *Persistence) GetMagnetlinkMessageClock(communityID types.HexBytes) (uint64, error)
func (*Persistence) GetMessageArchiveIDsToImport ¶ added in v0.117.1
func (p *Persistence) GetMessageArchiveIDsToImport(communityID types.HexBytes) ([]string, error)
func (*Persistence) GetNumberOfPendingRequestsToJoin ¶ added in v0.179.12
func (p *Persistence) GetNumberOfPendingRequestsToJoin(communityID types.HexBytes) (int, error)
func (*Persistence) GetOldestWakuMessageTimestamp ¶ added in v0.98.1
func (p *Persistence) GetOldestWakuMessageTimestamp(topics []types.TopicType) (uint64, error)
func (*Persistence) GetPermissionTokenCriteriaResult ¶ added in v0.159.7
func (p *Persistence) GetPermissionTokenCriteriaResult(permissionID string, communityID string, chatID string) (*PermissionTokenCriteriaResult, error)
func (*Persistence) GetRequestToJoin ¶ added in v0.72.0
func (p *Persistence) GetRequestToJoin(id []byte) (*RequestToJoin, error)
func (*Persistence) GetRequestToJoinByPk ¶ added in v0.114.1
func (p *Persistence) GetRequestToJoinByPk(pk string, communityID []byte, state RequestToJoinState) (*RequestToJoin, error)
func (*Persistence) GetRequestToJoinByPkAndCommunityID ¶ added in v0.129.3
func (p *Persistence) GetRequestToJoinByPkAndCommunityID(pk string, communityID []byte) (*RequestToJoin, error)
func (*Persistence) GetRequestToJoinClockByPkAndCommunityID ¶ added in v0.179.22
func (*Persistence) GetRequestToJoinRevealedAddresses ¶ added in v0.139.1
func (p *Persistence) GetRequestToJoinRevealedAddresses(requestID []byte) ([]*protobuf.RevealedAccount, error)
func (*Persistence) GetSyncControlNode ¶ added in v0.171.5
func (p *Persistence) GetSyncControlNode(communityID types.HexBytes) (*protobuf.SyncCommunityControlNode, error)
func (*Persistence) GetWakuMessagesByFilterTopic ¶ added in v0.98.1
func (*Persistence) HasCommunityArchiveInfo ¶ added in v0.100.0
func (p *Persistence) HasCommunityArchiveInfo(communityID types.HexBytes) (exists bool, err error)
func (*Persistence) HasCommunityToken ¶ added in v0.163.4
func (*Persistence) HasMessageArchiveID ¶ added in v0.100.0
func (*Persistence) HasPendingRequestsToJoinForUserAndCommunity ¶ added in v0.72.0
func (p *Persistence) HasPendingRequestsToJoinForUserAndCommunity(userPk string, communityID []byte) (bool, error)
func (*Persistence) InvalidateDecryptedCommunityCacheForKeys ¶ added in v0.176.9
func (p *Persistence) InvalidateDecryptedCommunityCacheForKeys(keys []*encryption.HashRatchetInfo) error
func (*Persistence) JoinedAndPendingCommunitiesWithRequests ¶ added in v0.83.8
func (p *Persistence) JoinedAndPendingCommunitiesWithRequests(memberIdentity *ecdsa.PublicKey) (comms []*Community, err error)
func (*Persistence) JoinedCommunities ¶
func (p *Persistence) JoinedCommunities(memberIdentity *ecdsa.PublicKey) ([]*Community, error)
func (*Persistence) MuteCommunityTill ¶ added in v0.162.5
func (p *Persistence) MuteCommunityTill(communityID []byte, mutedTill time.Time) error
func (*Persistence) PendingRequestsToJoin ¶ added in v0.146.4
func (p *Persistence) PendingRequestsToJoin() ([]*RequestToJoin, error)
func (*Persistence) PendingRequestsToJoinForCommunity ¶ added in v0.72.0
func (p *Persistence) PendingRequestsToJoinForCommunity(id []byte) ([]*RequestToJoin, error)
func (*Persistence) RemoveCommunityGrant ¶ added in v0.174.8
func (p *Persistence) RemoveCommunityGrant(communityID string) error
func (*Persistence) RemoveCommunityToken ¶ added in v0.162.13
func (p *Persistence) RemoveCommunityToken(chainID int, contractAddress string) error
func (*Persistence) RemoveRequestToJoinRevealedAddresses ¶ added in v0.163.4
func (p *Persistence) RemoveRequestToJoinRevealedAddresses(requestID []byte) error
func (*Persistence) RequestsToJoinForCommunityAwaitingAddresses ¶ added in v0.171.8
func (p *Persistence) RequestsToJoinForCommunityAwaitingAddresses(id []byte) ([]*RequestToJoin, error)
func (*Persistence) RequestsToJoinForCommunityWithState ¶ added in v0.106.1
func (p *Persistence) RequestsToJoinForCommunityWithState(id []byte, state RequestToJoinState) ([]*RequestToJoin, error)
func (*Persistence) RequestsToJoinForUserByState ¶ added in v0.171.8
func (p *Persistence) RequestsToJoinForUserByState(pk string, state RequestToJoinState) ([]*RequestToJoin, error)
func (*Persistence) SaveCheckChannelPermissionResponse ¶ added in v0.159.7
func (p *Persistence) SaveCheckChannelPermissionResponse(communityID string, chatID string, response *CheckChannelPermissionsResponse) error
func (*Persistence) SaveCommunity ¶
func (p *Persistence) SaveCommunity(community *Community) error
func (*Persistence) SaveCommunityArchiveInfo ¶ added in v0.100.0
func (*Persistence) SaveCommunityEvents ¶ added in v0.162.5
func (p *Persistence) SaveCommunityEvents(community *Community) error
func (*Persistence) SaveCommunityGrant ¶ added in v0.174.8
func (p *Persistence) SaveCommunityGrant(communityID string, grant []byte, clock uint64) error
func (*Persistence) SaveCommunitySettings ¶ added in v0.96.4
func (p *Persistence) SaveCommunitySettings(communitySettings CommunitySettings) error
func (*Persistence) SaveCommunityShard ¶ added in v0.171.39
func (*Persistence) SaveCommunityToValidate ¶ added in v0.171.1
func (p *Persistence) SaveCommunityToValidate(c communityToValidate) error
func (*Persistence) SaveDecryptedCommunityDescription ¶ added in v0.176.9
func (p *Persistence) SaveDecryptedCommunityDescription(communityID []byte, missingKeys []*CommunityPrivateDataFailedToDecrypt, description *protobuf.CommunityDescription) error
func (*Persistence) SaveLastMessageArchiveEndDate ¶ added in v0.98.1
func (p *Persistence) SaveLastMessageArchiveEndDate(communityID types.HexBytes, endDate uint64) error
func (*Persistence) SaveMessageArchiveID ¶ added in v0.100.0
func (p *Persistence) SaveMessageArchiveID(communityID types.HexBytes, hash string) error
func (*Persistence) SaveRequestToJoin ¶ added in v0.72.0
func (p *Persistence) SaveRequestToJoin(request *RequestToJoin) (err error)
func (*Persistence) SaveRequestToJoinRevealedAddresses ¶ added in v0.139.1
func (p *Persistence) SaveRequestToJoinRevealedAddresses(requestID types.HexBytes, revealedAccounts []*protobuf.RevealedAccount) (err error)
func (*Persistence) SaveRequestToLeave ¶ added in v0.106.3
func (p *Persistence) SaveRequestToLeave(request *RequestToLeave) error
func (*Persistence) SaveRequestsToJoin ¶ added in v0.171.8
func (p *Persistence) SaveRequestsToJoin(requests []*RequestToJoin) (err error)
func (*Persistence) SaveSyncControlNode ¶ added in v0.171.5
func (*Persistence) SaveWakuMessage ¶ added in v0.97.4
func (p *Persistence) SaveWakuMessage(message *types.Message) error
func (*Persistence) SaveWakuMessages ¶ added in v0.111.5
func (p *Persistence) SaveWakuMessages(messages []*types.Message) (err error)
func (*Persistence) SetCuratedCommunities ¶ added in v0.171.21
func (p *Persistence) SetCuratedCommunities(communities *CuratedCommunities) error
func (*Persistence) SetMessageArchiveIDImported ¶ added in v0.117.1
func (*Persistence) SetMuted ¶ added in v0.81.0
func (p *Persistence) SetMuted(communityID []byte, muted bool) error
func (*Persistence) SetPrivateKey ¶ added in v0.83.8
func (p *Persistence) SetPrivateKey(id []byte, privKey *ecdsa.PrivateKey) error
func (*Persistence) SetRequestToJoinState ¶ added in v0.72.0
func (p *Persistence) SetRequestToJoinState(pk string, communityID []byte, state RequestToJoinState) error
func (*Persistence) SetSyncClock ¶ added in v0.83.8
func (p *Persistence) SetSyncClock(id []byte, clock uint64) error
func (*Persistence) ShouldHandleSyncCommunity ¶ added in v0.83.8
func (p *Persistence) ShouldHandleSyncCommunity(community *protobuf.SyncInstallationCommunity) (bool, error)
func (*Persistence) ShouldHandleSyncCommunitySettings ¶ added in v0.102.2
func (p *Persistence) ShouldHandleSyncCommunitySettings(settings *protobuf.SyncCommunitySettings) (bool, error)
func (*Persistence) SpectatedCommunities ¶ added in v0.111.5
func (p *Persistence) SpectatedCommunities(memberIdentity *ecdsa.PublicKey) ([]*Community, error)
func (*Persistence) UpdateAndPruneEncryptionKeyRequests ¶ added in v0.182.36
func (*Persistence) UpdateClockInRequestToJoin ¶ added in v0.146.4
func (p *Persistence) UpdateClockInRequestToJoin(id []byte, clock uint64) error
UpdateClockInRequestToJoin method is used for testing
func (*Persistence) UpdateCommunitySettings ¶ added in v0.96.4
func (p *Persistence) UpdateCommunitySettings(communitySettings CommunitySettings) error
func (*Persistence) UpdateCommunityTokenAddress ¶ added in v0.163.14
func (p *Persistence) UpdateCommunityTokenAddress(chainID int, oldContractAddress string, newContractAddress string) error
func (*Persistence) UpdateCommunityTokenState ¶ added in v0.133.2
func (p *Persistence) UpdateCommunityTokenState(chainID int, contractAddress string, deployState token.DeployState) error
func (*Persistence) UpdateCommunityTokenSupply ¶ added in v0.158.0
func (*Persistence) UpdateLastMessageArchiveEndDate ¶ added in v0.98.1
func (p *Persistence) UpdateLastMessageArchiveEndDate(communityID types.HexBytes, endDate uint64) error
func (*Persistence) UpdateLastOpenedAt ¶ added in v0.172.8
func (p *Persistence) UpdateLastOpenedAt(communityID types.HexBytes, timestamp int64) error
func (*Persistence) UpdateLastSeenMagnetlink ¶ added in v0.117.3
func (p *Persistence) UpdateLastSeenMagnetlink(communityID types.HexBytes, magnetlinkURI string) error
func (*Persistence) UpdateMagnetlinkMessageClock ¶ added in v0.98.1
func (p *Persistence) UpdateMagnetlinkMessageClock(communityID types.HexBytes, clock uint64) error
func (*Persistence) UpsertAppliedCommunityEvents ¶ added in v0.175.3
type PreParsedCommunityPermissionsData ¶ added in v0.179.20
type PreParsedCommunityPermissionsData struct { *PreParsedPermissionsData Permissions []*CommunityTokenPermission }
type PreParsedPermissionsData ¶ added in v0.179.20
type PreParsedPermissionsData struct { Erc721TokenRequirements map[uint64]map[string]*protobuf.TokenCriteria Erc20TokenAddresses []gethcommon.Address Erc20ChainIDsMap map[uint64]bool Erc721ChainIDsMap map[uint64]bool }
type Publisher ¶ added in v0.179.29
type Publisher interface {
// contains filtered or unexported methods
}
type RawCommunityRow ¶ added in v0.97.4
type RequestToJoin ¶ added in v0.72.0
type RequestToJoin struct { ID types.HexBytes `json:"id"` PublicKey string `json:"publicKey"` Clock uint64 `json:"clock"` ENSName string `json:"ensName,omitempty"` ChatID string `json:"chatId"` CommunityID types.HexBytes `json:"communityId"` State RequestToJoinState `json:"state"` Our bool `json:"our"` Deleted bool `json:"deleted"` RevealedAccounts []*protobuf.RevealedAccount `json:"revealedAccounts,omitempty"` CustomizationColor multiaccountscommon.CustomizationColor `json:"customizationColor,omitempty"` }
func (*RequestToJoin) CalculateID ¶ added in v0.72.0
func (r *RequestToJoin) CalculateID()
func (*RequestToJoin) Empty ¶ added in v0.83.8
func (r *RequestToJoin) Empty() bool
func (*RequestToJoin) InitFromSyncProtobuf ¶ added in v0.83.8
func (r *RequestToJoin) InitFromSyncProtobuf(proto *protobuf.SyncCommunityRequestsToJoin)
func (*RequestToJoin) ShouldRetainDeclined ¶ added in v0.171.3
func (r *RequestToJoin) ShouldRetainDeclined(clock uint64) (bool, error)
func (*RequestToJoin) ToCommunityRequestToJoinProtobuf ¶ added in v0.158.0
func (r *RequestToJoin) ToCommunityRequestToJoinProtobuf() *protobuf.CommunityRequestToJoin
func (*RequestToJoin) ToSyncProtobuf ¶ added in v0.83.8
func (r *RequestToJoin) ToSyncProtobuf() *protobuf.SyncCommunityRequestsToJoin
type RequestToJoinRecord ¶ added in v0.171.27
type RequestToJoinRecord struct {
// contains filtered or unexported fields
}
type RequestToJoinState ¶ added in v0.83.8
type RequestToJoinState uint
const ( RequestToJoinStatePending RequestToJoinState = iota + 1 RequestToJoinStateDeclined RequestToJoinStateAccepted RequestToJoinStateCanceled RequestToJoinStateAcceptedPending RequestToJoinStateDeclinedPending RequestToJoinStateAwaitingAddresses )
type RequestToLeave ¶ added in v0.106.3
type RequestToLeave struct { ID types.HexBytes `json:"id"` PublicKey string `json:"publicKey"` Clock uint64 `json:"clock"` CommunityID types.HexBytes `json:"communityId"` }
func NewRequestToLeave ¶ added in v0.106.3
func NewRequestToLeave(publicKey string, protobuf *protobuf.CommunityRequestToLeave) *RequestToLeave
type Subscription ¶
type Subscription struct { Community *Community CreatingHistoryArchivesSignal *signal.CreatingHistoryArchivesSignal HistoryArchivesCreatedSignal *signal.HistoryArchivesCreatedSignal NoHistoryArchivesCreatedSignal *signal.NoHistoryArchivesCreatedSignal HistoryArchivesSeedingSignal *signal.HistoryArchivesSeedingSignal HistoryArchivesUnseededSignal *signal.HistoryArchivesUnseededSignal HistoryArchiveDownloadedSignal *signal.HistoryArchiveDownloadedSignal DownloadingHistoryArchivesStartedSignal *signal.DownloadingHistoryArchivesStartedSignal DownloadingHistoryArchivesFinishedSignal *signal.DownloadingHistoryArchivesFinishedSignal ImportingHistoryArchiveMessagesSignal *signal.ImportingHistoryArchiveMessagesSignal CommunityEventsMessage *CommunityEventsMessage AcceptedRequestsToJoin []types.HexBytes RejectedRequestsToJoin []types.HexBytes CommunityPrivilegedMemberSyncMessage *CommunityPrivilegedMemberSyncMessage TokenCommunityValidated *CommunityResponse }
type TokenManager ¶ added in v0.151.13
type TokenManager interface { GetBalancesByChain(ctx context.Context, accounts, tokens []gethcommon.Address, chainIDs []uint64) (BalancesByChain, error) GetCachedBalancesByChain(ctx context.Context, accounts, tokenAddresses []gethcommon.Address, chainIDs []uint64) (BalancesByChain, error) FindOrCreateTokenByAddress(ctx context.Context, chainID uint64, address gethcommon.Address) *token.Token GetAllChainIDs() ([]uint64, error) }
type TokenPermissionState ¶ added in v0.166.1
type TokenPermissionState uint8
const ( TokenPermissionApproved TokenPermissionState = iota TokenPermissionAdditionPending TokenPermissionUpdatePending TokenPermissionRemovalPending )
type TokenRequirementResponse ¶ added in v0.174.5
type TokenRequirementResponse struct { Satisfied bool `json:"satisfied"` TokenCriteria *protobuf.TokenCriteria `json:"criteria"` }
Source Files ¶
- adaptors.go
- check_permissions_response.go
- community.go
- community_bloom_filter.go
- community_categories.go
- community_changes.go
- community_description_encryption.go
- community_encryption_key_action.go
- community_event.go
- community_event_message.go
- community_events_factory.go
- community_events_processing.go
- community_token_permission.go
- communnity_privileged_member_sync_msg.go
- errors.go
- manager.go
- manager_archive.go
- manager_archive_file.go
- permission_checker.go
- permissioned_balances.go
- persistence.go
- persistence_mapping.go
- persistence_test_helpers.go
- request_to_join.go
- request_to_leave.go
- roles_authorization.go
- utils.go
- validator.go