FfiXmtpClientInterface

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract suspend fun addressesFromInboxId(refreshFromNetwork: Boolean, inboxIds: List<String>): List<FfiInboxState>
Link copied to clipboard
abstract suspend fun addWallet(newWalletAddress: String): FfiSignatureRequest

Adds a wallet address to the existing client

Link copied to clipboard
abstract suspend fun applySignatureRequest(signatureRequest: FfiSignatureRequest)
Link copied to clipboard
abstract suspend fun backupMetadata(path: String, key: ByteArray): FfiBackupMetadata

Load the metadata for a backup 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 backupToFile(path: String, opts: FfiBackupOptions, key: ByteArray)

Backup your application to file for later restoration.

Link copied to clipboard
abstract suspend fun canMessage(accountAddresses: List<String>): Map<String, Boolean>
Link copied to clipboard
abstract fun conversation(conversationId: ByteArray): FfiConversation
Link copied to clipboard
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(address: String): 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 importFromFile(path: String, key: ByteArray)

Import a previous backup

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 revokeInstallations(installationIds: List<ByteArray>): FfiSignatureRequest
Link copied to clipboard
abstract suspend fun revokeWallet(walletAddress: String): FfiSignatureRequest

Revokes or removes an identity from the existing client

Link copied to clipboard
abstract suspend fun sendSyncRequest(kind: FfiDeviceSyncKind)

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 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.