FfiXmtpClientInterface

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract suspend fun addIdentity(newIdentity: FfiIdentifier): FfiSignatureRequest

Adds a wallet address to the existing client

Link copied to clipboard
abstract suspend fun addressesFromInboxId(refreshFromNetwork: Boolean, inboxIds: List<String>): List<FfiInboxState>
Link copied to clipboard
abstract suspend fun applySignatureRequest(signatureRequest: FfiSignatureRequest)
Link copied to clipboard
abstract suspend fun archiveMetadata(path: String, key: ByteArray): FfiBackupMetadata

Load the metadata for an archive to see what it contains. Reads only the metadata without loading the entire file, so this function is quick.

Link copied to clipboard
abstract suspend fun canMessage(accountIdentifiers: List<FfiIdentifier>): Map<FfiIdentifier, Boolean>
Link copied to clipboard
abstract suspend fun changeRecoveryIdentifier(newRecoveryIdentifier: FfiIdentifier): FfiSignatureRequest
Link copied to clipboard
abstract fun conversation(conversationId: ByteArray): FfiConversation
Link copied to clipboard
Link copied to clipboard
abstract suspend fun createArchive(path: String, opts: FfiArchiveOptions, key: ByteArray)

Archive application elements to file for later restoration.

Link copied to clipboard
abstract suspend fun dbReconnect()
Link copied to clipboard
abstract fun dmConversation(targetInboxId: String): FfiConversation
Link copied to clipboard
abstract suspend fun findInboxId(identifier: FfiIdentifier): String?
Link copied to clipboard
abstract suspend fun getConsentState(entityType: FfiConsentEntityType, entity: String): FfiConsentState
Link copied to clipboard
abstract suspend fun getLatestInboxState(inboxId: String): FfiInboxState
Link copied to clipboard
abstract suspend fun importArchive(path: String, key: ByteArray)

Import a previous archive

Link copied to clipboard
abstract fun inboxId(): String
Link copied to clipboard
abstract suspend fun inboxState(refreshFromNetwork: Boolean): FfiInboxState
Link copied to clipboard
abstract fun installationId(): ByteArray
Link copied to clipboard
abstract fun message(messageId: ByteArray): FfiMessage
Link copied to clipboard
abstract suspend fun registerIdentity(signatureRequest: FfiSignatureRequest)
Link copied to clipboard
abstract fun releaseDbConnection()
Link copied to clipboard
Link copied to clipboard
abstract suspend fun revokeIdentity(identifier: FfiIdentifier): FfiSignatureRequest

Revokes or removes an identity from the existing client

Link copied to clipboard
abstract suspend fun revokeInstallations(installationIds: List<ByteArray>): FfiSignatureRequest
Link copied to clipboard
abstract suspend fun sendSyncRequest()

Manually trigger a device sync request to sync records from another active device on this account.

Link copied to clipboard
abstract suspend fun setConsentStates(records: List<FfiConsent>)
Link copied to clipboard
Link copied to clipboard

A utility function to sign a piece of text with this installation's private key.

Link copied to clipboard
abstract suspend fun syncPreferences(): ULong
Link copied to clipboard
abstract fun verifySignedWithInstallationKey(signatureText: String, signatureBytes: ByteArray)

A utility function to easily verify that a piece of text was signed by this installation.

Link copied to clipboard
abstract fun verifySignedWithPublicKey(signatureText: String, signatureBytes: ByteArray, publicKey: ByteArray)

A utility function to easily verify that a string has been signed by another libXmtp installation. Only works for verifying libXmtp public context signatures.