MLSConversationRepository
Functions
Link copied to clipboard
abstract suspend fun addMemberToMLSGroup(mlsContext: MlsCoreCryptoContext, groupID: GroupID, userIdList: List<UserId>, cipherSuite: CipherSuite, allowPartialMemberList: Boolean = false): Either<CoreFailure, MLSAdditionResult>
Link copied to clipboard
Link copied to clipboard
abstract suspend fun commitPendingProposals(mlsContext: MlsCoreCryptoContext, groupID: GroupID): Either<CoreFailure, Unit>
Link copied to clipboard
abstract suspend fun decryptMessage(mlsContext: MlsCoreCryptoContext, message: ByteArray, groupID: GroupID): Either<CoreFailure, List<DecryptedMessageBundle>>
Link copied to clipboard
abstract suspend fun encryptMessage(mlsContext: MlsCoreCryptoContext, groupID: GroupID, content: ByteArray): Either<CoreFailure, ByteArray>
Link copied to clipboard
abstract suspend fun encryptTargetedMessage(mlsContext: MlsCoreCryptoContext, groupID: GroupID, recipient: CryptoQualifiedClientId, content: ByteArray, transient: Boolean): Either<CoreFailure, ByteArray>
Link copied to clipboard
abstract suspend fun encryptTransientMessage(mlsContext: MlsCoreCryptoContext, groupID: GroupID, content: ByteArray): Either<CoreFailure, ByteArray>
Link copied to clipboard
abstract suspend fun establishMLSGroup(mlsContext: MlsCoreCryptoContext, groupID: GroupID, members: List<UserId>, publicKeys: MLSPublicKeys? = null, allowSkippingUsersWithoutKeyPackages: Boolean = false): Either<CoreFailure, MLSAdditionResult>
Establishes an MLS (Messaging Layer Security) group with the specified group ID and members.
Link copied to clipboard
abstract suspend fun establishMLSSubConversationGroup(mlsContext: MlsCoreCryptoContext, groupID: GroupID, parentId: ConversationId): Either<CoreFailure, Unit>
Link copied to clipboard
abstract suspend fun getClientIdentity(mlsContext: MlsCoreCryptoContext, clientId: ClientId): Either<CoreFailure, WireIdentity?>
Link copied to clipboard
abstract suspend fun getLocalGroupEpoch(mlsContext: MlsCoreCryptoContext, groupID: GroupID): Either<CoreFailure, ULong>
Link copied to clipboard
abstract suspend fun getMembersIdentities(mlsClient: MLSClient, conversationId: ConversationId, userIds: List<UserId>): Either<CoreFailure, Map<UserId, List<WireIdentity>>>
Link copied to clipboard
abstract suspend fun getMLSGroupsRequiringKeyingMaterialUpdate(threshold: Duration): Either<CoreFailure, List<GroupID>>
Link copied to clipboard
abstract suspend fun getUserIdentity(mlsContext: MlsCoreCryptoContext, userId: UserId): Either<CoreFailure, List<WireIdentity>>
Link copied to clipboard
abstract suspend fun hasEstablishedMLSGroup(mlsContext: MlsCoreCryptoContext, groupID: GroupID): Either<MLSFailure, Boolean>
Link copied to clipboard
abstract suspend fun hasWrongExternalSender(mlsContext: MlsCoreCryptoContext, groupID: GroupID, cipherSuite: CipherSuite): Either<CoreFailure, Boolean>
Whether the external sender of groupID, a group hosted on the self backend, is not the self backend's removal key, so every proposal the backend sends to the group fails its signature check.
Link copied to clipboard
abstract suspend fun isLocalGroupEpochStale(mlsContext: MlsCoreCryptoContext, groupID: GroupID, currentRemoteEpoch: ULong): Either<CoreFailure, Boolean>
Determines whether the known group epoch is stale (outdated), when compared to the provided epoch.
Link copied to clipboard
abstract suspend fun joinGroupByExternalCommit(mlsContext: MlsCoreCryptoContext, groupID: GroupID, groupInfo: ByteArray): Either<CoreFailure, Unit>
Link copied to clipboard
abstract suspend fun leaveGroup(mlsContext: MlsCoreCryptoContext, groupID: GroupID): Either<CoreFailure, Unit>
Link copied to clipboard
abstract suspend fun migrateConversationCredential(mlsContext: MlsCoreCryptoContext, credentialRef: CryptoCredentialRef, groupID: GroupID)
Migrate groupID when it still uses another credential.
Link copied to clipboard
Link copied to clipboard
abstract suspend fun prepareX509KeyPackages(mlsContext: MlsCoreCryptoContext, credentialRef: CryptoCredentialRef): PreparedX509KeyPackages
Generate a replacement set of key packages for an installed credential.
Link copied to clipboard
abstract suspend fun removeClientsFromMLSGroup(mlsContext: MlsCoreCryptoContext, groupID: GroupID, clientIdList: List<QualifiedClientID>): Either<CoreFailure, Unit>
Link copied to clipboard
abstract suspend fun removeMembersFromMLSGroup(mlsContext: MlsCoreCryptoContext, groupID: GroupID, userIdList: List<UserId>): Either<CoreFailure, Unit>
Link copied to clipboard
abstract suspend fun replaceX509KeyPackages(clientId: ClientId, preparedKeyPackages: PreparedX509KeyPackages): Either<E2EIFailure, Unit>
Replace backend key packages. This must run outside a Core Crypto transaction.
Link copied to clipboard
Link copied to clipboard
abstract suspend fun updateGroupIdAndState(conversationId: ConversationId, newGroupId: GroupID, newEpoch: Long, groupState: ConversationEntity.GroupState = ConversationEntity.GroupState.PENDING_JOIN): Either<CoreFailure, Unit>
Link copied to clipboard
abstract suspend fun updateKeyingMaterial(mlsContext: MlsCoreCryptoContext, groupID: GroupID): Either<CoreFailure, Unit>