CoreCryptoClient

class CoreCryptoClient(cc: <Error class: unknown class>)

A high-level wrapper around a CoreCrypto client as emitted by Uniffi.

This wrapper should be largely transparent to end users. It exists to improve the callback interfaces: .transaction(...), .registerFooObserver(...), etc.

Constructors

Link copied to clipboard
constructor(cc: <Error class: unknown class>)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun close()

Closes this CoreCrypto instance and deallocates all loaded resources.

Link copied to clipboard
suspend fun isHistorySharingEnabled(id: <Error class: unknown class>): Boolean

See CoreCryptoContext.isHistorySharingEnabled

Link copied to clipboard
suspend fun provideTransport(transport: <Error class: unknown class>)

Provide an implementation of the MlsTransport interface. See MlsTransport.

Link copied to clipboard
suspend fun registerEpochObserver(scope: CoroutineScope, epochObserver: <Error class: unknown class>)

Register an Epoch Observer which will be notified every time a conversation's epoch changes.

Link copied to clipboard
suspend fun registerHistoryObserver(scope: CoroutineScope, historyObserver: <Error class: unknown class>)

Register a History Observer which will be notified every time a new history client is created.

Link copied to clipboard
suspend fun <R> transaction(block: suspend (<Error class: unknown class>) -> R): R

Starts a NonCancellable transaction in Core Crypto. If the callback succeeds, it will be committed, otherwise, every operation performed with the context will be discarded.