Package-level declarations

Types

Link copied to clipboard
class ApiStats(apiStats: FfiApiStats)
Link copied to clipboard
data class AppDataChange(val groupId: String, val oldValue: String?, val newValue: String?)

A change to a group's opaque appData, as observed after it was applied.

Link copied to clipboard

Notified when a processed message changed a group's appData.

Link copied to clipboard
data class AuthConfiguration(val enabled: Boolean, val keys: List<SigningKeyDescription>, val audiences: List<String>, val issuers: List<String>, val requiredScopes: List<String>)

What a client must present to be admitted. An app acts on enabled and requiredScopes; the rest is published for operator tooling.

Link copied to clipboard
typealias AuthRequiredException = FfiException.AuthRequired

The deployment requires a credential and none was configured (CFG-062).

Link copied to clipboard
typealias BackendMismatchException = FfiException.BackendMismatch

This database is bound to one deployment and a different one answered (CFG-051).

Link copied to clipboard
data class CatchUpSummary(val messages: Long, val conversations: Long, val completed: Boolean, val failed: Long)

Counts the messages and conversations stored by Client.catchUpToLive. failed counts processing failures. completed is false if processing fails or the run does not reach its targets before the timeout.

Link copied to clipboard
typealias ChainNotAcceptedException = FfiException.ChainNotAccepted

The deployment does not verify wallet signatures on that chain (CFG-069, CFG-070).

Link copied to clipboard
typealias CipherText = CiphertextOuterClass.Ciphertext
Link copied to clipboard
class Client(libXMTPClient: FfiXmtpClient, val dbPath: String, val installationId: String, val inboxId: InboxId, val environment: String, val publicIdentity: PublicIdentity)
Link copied to clipboard
data class ClientOptions(val api: ClientOptions.Api, val preAuthenticateToInboxCallback: PreEventCallback? = null, val appContext: Context, val dbEncryptionKey: ByteArray, val dbDirectory: String? = null, val deviceSyncEnabled: Boolean = true, val forkRecoveryOptions: ForkRecoveryOptions? = null, val dbPoolOptions: DbPoolOptions? = null, val waitForRegistrationVisible: VisibilityConfirmationOptions? = null, val unstableChangeCallbacks: UnstableChangeCallbacks? = null)
Link copied to clipboard
typealias ClientVersionTooOldException = FfiException.ClientVersionTooOld

The deployment requires a newer libxmtp than this build (CFG-060, CFG-061).

Link copied to clipboard
data class CodecRegistry(val codecs: MutableMap<String, ContentCodec<*>> = mutableMapOf())
Link copied to clipboard
typealias ConfigurationInvalidException = FfiException.ConfigurationInvalid

The deployment published a configuration this client cannot use (CFG-044).

Link copied to clipboard
typealias ConfigurationUnavailableException = FfiException.ConfigurationUnavailable

The deployment did not serve its configuration, or it could not be stored (CFG-041).

Link copied to clipboard
data class ConsentRecord(val value: String, val entryType: EntryType, val consentType: ConsentState)
Link copied to clipboard
Link copied to clipboard
sealed class Conversation
Link copied to clipboard
data class Conversations(var client: Client, ffiConversations: FfiConversations, ffiClient: FfiXmtpClient)
Link copied to clipboard
class Crypto
Link copied to clipboard
data class DbPoolOptions(val maxPoolSize: UInt? = null, val minPoolSize: UInt? = null)
Link copied to clipboard
Link copied to clipboard
typealias DeliveryCursor = FfiDeliveryCursor
Link copied to clipboard
class Dm(val client: Client, libXMTPGroup: FfiConversation, ffiLastMessage: FfiMessage? = null, ffiIsCommitLogForked: Boolean? = null)
Link copied to clipboard
Link copied to clipboard
data class ForkRecoveryOptions(val enableRecoveryRequests: ForkRecoveryPolicy, val groupsToRequestRecovery: List<String>, val disableRecoveryResponses: Boolean? = null, val workerIntervalNs: ULong? = null)
Link copied to clipboard
class Group(val client: Client, libXMTPGroup: FfiConversation, ffiLastMessage: FfiMessage? = null, ffiIsCommitLogForked: Boolean? = null)
Link copied to clipboard
data class GroupSyncSummary(val numEligible: ULong, val numSynced: ULong)
Link copied to clipboard
class IdentityStats(identityStats: FfiIdentityStats)
Link copied to clipboard
typealias InboxId = String
Link copied to clipboard
object KeyUtil
Link copied to clipboard
data class LimitsConfiguration(val maxEnvelopeBytes: Long, val maxRequestBytes: Long, val maxResponseBytes: Long, val maxPublishTopics: Long, val maxQueryTopics: Long, val maxQueryLimit: Long, val defaultQueryLimit: Long, val maxNewestMetadataTopics: Long, val maxNewestFullTopics: Long, val maxUpdateAdds: Long, val maxUpdateRemoves: Long, val maxStreamTopics: Long, val maxStaticTopics: Long, val maxLookupIdentifiers: Long, val maxScwSignatures: Long, val maxIdentityEntries: Long, val maxUpdateFramesPerSecond: UInt, val maxUpdateBurst: UInt, val maxPingFramesPerSecond: UInt, val maxPingBurst: UInt)

Request shapes the deployment accepts. The client chunks its own work to these values; an app reads them to size its batches.

Link copied to clipboard
typealias MessageCatchUpSnapshot = FfiMessageCatchUpSnapshot
Link copied to clipboard
data class MessageHistorySnapshot(val messages: List<DecodedMessage>, val cursor: DeliveryCursor)
Link copied to clipboard
typealias MessageMetadata = FfiMessageMetadata
Link copied to clipboard

A sequential reader. Close it when finished. Reading a cursor does not acknowledge a message.

Link copied to clipboard
data class MessageVisibilityOptions(val shouldPush: Boolean, val idempotencyKey: String? = null)
Link copied to clipboard
data class MlsConfiguration(val maxGroupMembers: Long, val maxInstallationsPerInbox: Long, val commitLogEnabled: Boolean?)

Advisory group shapes. The deployment publishes them; the client enforces them.

Link copied to clipboard
sealed class NotificationChannel

Delivery channel for this installation.

Link copied to clipboard
class NotificationConfig(val channel: NotificationChannel, val consentStates: List<ConsentState> = listOf(ConsentState.ALLOWED), val includeWelcomes: Boolean = true, val includeSyncGroups: Boolean = false, val includeCommits: Boolean = false)

Notification delivery and conversation rules.

Link copied to clipboard

A notification failure with a stable error code.

Link copied to clipboard

Reset to the configured consent rules with Default.

Link copied to clipboard
sealed class NotificationState

Local notification state. Reading it makes no backend request.

Link copied to clipboard
typealias PreEventCallback = suspend () -> Unit
Link copied to clipboard
Link copied to clipboard
data class PrivatePreferences(var client: Client, ffiClient: FfiXmtpClient)
Link copied to clipboard
typealias ProcessType = FfiProcessType
Link copied to clipboard
data class RetentionConfiguration(val groupMessageSeconds: Long, val welcomeSeconds: Long, val keyPackageSeconds: Long)

How long the deployment keeps each payload kind, in seconds.

Link copied to clipboard
data class SendOptions(var compression: EncodedContentCompression? = null, var contentType: Content.ContentTypeId? = null, var ephemeral: Boolean = false, var idempotencyKey: String? = null)
Link copied to clipboard
data class ServerConfiguration(val identifier: String, val serverVersion: String, val minLibxmtpVersion: String, val auth: AuthConfiguration, val retention: RetentionConfiguration, val limits: LimitsConfiguration, val mls: MlsConfiguration, val smartContractWalletChains: List<String>)

One immutable snapshot of what a deployment published about itself (spec 006 §5.2).

Link copied to clipboard
data class SignedData(val rawData: ByteArray, val publicKey: ByteArray? = null, val authenticatorData: ByteArray? = null, val clientDataJson: ByteArray? = null)
Link copied to clipboard
Link copied to clipboard
interface SigningKey
Link copied to clipboard
data class SigningKeyDescription(val kid: String, val alg: String)

Public identity of one accepted signing key. Never the key itself.

Link copied to clipboard
typealias StreamBarrierCause = FfiStreamBarrierCause
Link copied to clipboard
typealias StreamBarrierCauseKind = FfiStreamBarrierCauseKind
Link copied to clipboard
typealias StreamBarrierFailure = FfiStreamBarrierFailure
Link copied to clipboard
typealias StreamBarrierReason = FfiStreamBarrierReason
Link copied to clipboard
typealias StreamBarrierTopic = FfiStreamBarrierTopic
Link copied to clipboard
typealias StreamFailureDetails = FfiStreamFailureDetails
Link copied to clipboard
typealias StreamFailureKind = FfiStreamFailureKind
Link copied to clipboard
sealed class Topic
Link copied to clipboard

Opt-in marker for pre-release ("unstable") APIs. The API shape may still change and, in some cases, the effect is one-way and irreversible. Call sites must acknowledge with @OptIn(UnstableApi::class); when an API graduates the marker is dropped from it and — once the marker itself is removed — the opt-in fails to compile, forcing a migration to the stable form.

Link copied to clipboard
data class UnstableChangeCallbacks(val appData: AppDataChangeHandler? = null)

Unstable: the set of group-change callbacks to register on a client.

Link copied to clipboard
class UnstableGroup(libXMTPGroup: FfiConversation)

Pre-release ("unstable") surface for a Group, reached through group.unstable.

Link copied to clipboard
class Util
Link copied to clipboard
data class VisibilityConfirmationOptions(val timeoutMs: ULong? = null)
Link copied to clipboard
class XMTPDebugInformation(ffiClient: FfiXmtpClient)
Link copied to clipboard
class XMTPException(message: String, exception: Exception? = null) : Exception

Properties

Link copied to clipboard

Structured barrier, publish-confirmation, or catch-up failure details. A null target means target capture failed. Zero is a captured empty target. Cursors and counts retain their full unsigned 64-bit values.

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun validateInboxId(inboxId: InboxId)
Link copied to clipboard
fun validateInboxIds(inboxIds: List<InboxId>)