Package-level declarations

Types

Link copied to clipboard
data class Action(var id: String, var label: String, var imageUrl: String?, var style: ActionStyle?, var expiresAt: Timestamp?)
Link copied to clipboard
data class Actions(var id: String, var description: String, var actions: List<Action>, var expiresAt: Timestamp?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Keep the shared transport in step with the process lifecycle. Set enabled before the first Android client factory call to opt out. The observer owns no client and lives for the process.

Link copied to clipboard
data class ApiStats(var publish: ULong, var query: ULong, var queryNewest: ULong, var subscribe: ULong, var subscribeStatic: ULong)
Link copied to clipboard
data class ApplicationComponentDefinition(var componentId: UShort, var name: String, var componentType: MetadataComponentType, var permissions: ComponentPermissions, var inGroups: Boolean, var inDms: Boolean)

A field that a backend offers apps. A new conversation registers it when in_groups or in_dms selects the conversation kind.

Link copied to clipboard
Link copied to clipboard
data class ArchiveMetadata(var backupVersion: UShort, var elements: List<ArchiveElement>, var exportedAt: Timestamp, var start: Timestamp?, var end: Timestamp?)
Link copied to clipboard
data class ArchiveOptions(var start: Timestamp? = null, var end: Timestamp? = null, var elements: List<ArchiveElement>? = null, var excludeDisappearingMessages: Boolean = false)
Link copied to clipboard
data class ArchiveRestored(var complete: Boolean)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class Attachment(var filename: String?, var mimeType: String, var content: ByteArray)
Link copied to clipboard
Link copied to clipboard
data class AttachmentFailed(var attachmentKey: String, var url: String, var contentDigest: String, var cause: String)

The attachment a failed transfer reports, with its failure cause.

Link copied to clipboard
data class AttachmentFailure(var cause: AttachmentFailureCause, var credentialKind: CredentialFailureKind?, var retryable: Boolean, var missingScope: Boolean, var httpStatus: UShort?)

The failure of an attachment operation. A thrown XmtpError.Attachment and a Failed pending status carry the same record.

Link copied to clipboard

Why an attachment operation failed. Each value is one ATCH failure cause.

Link copied to clipboard
data class AttachmentOptions(var maxDownloadBytes: ULong? = null, var maxPendingAgeSeconds: ULong? = null, var allowPrivateNetwork: Boolean = false)

Limits for attachment downloads and for pending uploads.

Link copied to clipboard
data class AttachmentRef(var attachmentKey: String, var url: String, var contentDigest: String)

The attachment an attachment.* event reports.

Link copied to clipboard

The attachments of one client. The paths it returns name files under the client's attachments directory; in the browser they name OPFS entries.

Link copied to clipboard
data class AttachmentsConfiguration(var baseUrl: String, var maxUploadBytes: ULong, var retentionSeconds: ULong)

The attachment service a deployment offers.

Link copied to clipboard

The attachments of one client. The paths it returns name files under the client's attachments directory; in the browser they name OPFS entries.

Link copied to clipboard
sealed class AttachmentSource

The data of a new attachment. The SDK copies it into its own storage at create, so later changes to the source do not change the attachment.

Link copied to clipboard
data class AuthConfiguration(var enabled: Boolean, var keys: List<SigningKeyDescription>, var audiences: List<String>, var issuers: List<String>, var requiredScopes: List<String>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class BackendOptions(var url: String = "", var appVersion: String? = null, var credentials: CredentialSource? = null, var credential: Credential? = null) : Disposable
Link copied to clipboard
sealed class BackendSource : Disposable

Use connection options or an existing backend connection.

Link copied to clipboard
data class CatchUpSummary(var messages: ULong, var conversations: ULong, var failed: ULong, var completed: Boolean)
Link copied to clipboard
Link copied to clipboard
sealed class ClientEvent
Link copied to clipboard
data class ClientHandlers(var preAuthenticate: PreAuthenticate? = null) : Disposable
Link copied to clipboard
interface ClientInterface
Link copied to clipboard
data class ClientOptions(var backend: BackendSource? = null, var storage: StorageOptions, var deviceSync: Boolean = true, var allowOffline: Boolean = false, var registration: RegistrationOptions = RegistrationOptions(), var forkRecovery: ForkRecoveryOptions? = null, var workers: WorkerOptions? = null, var handlers: ClientHandlers? = null, var attachments: AttachmentOptions? = null) : Disposable
Link copied to clipboard
Link copied to clipboard
data class ClientRejectedByServer(var cause: RejectionCause, var minLibxmtpVersion: String?)
Link copied to clipboard
sealed class ComponentMutation

A write to one field. A map or set delta applies atomically: inserting a present key, or updating or deleting an absent key, rejects the whole write.

Link copied to clipboard
data class ComponentPermissions(var insert: MetadataPolicy, var update: MetadataPolicy, var delete: MetadataPolicy)

A field's insert, update and delete policies.

Link copied to clipboard
Link copied to clipboard

Transport state for one subscription reader.

Link copied to clipboard
data class ConnectionStateChanged(var previous: ConnectionState, var current: ConnectionState)
Link copied to clipboard
data class ConsentChanged(var entityKind: ConsentEntityKind, var entity: String, var state: EventConsentState)
Link copied to clipboard
sealed class ConsentEntity
Link copied to clipboard
Link copied to clipboard
data class ConsentRecord(var entity: ConsentEntity, var state: ConsentState)
Link copied to clipboard
Link copied to clipboard
interface ContentCodec<T : Any>

A content codec with a typed value (Ref Public surface, Host codecs). The send helpers run its steps before the send: encode, then fallback when the envelope has none, then shouldPush when the send has no explicit shouldPush option and the type is not a catalogue type. A step that throws fails the send with XmtpException.CodecEncodeFailed, and the SDK makes no publish attempt.

Link copied to clipboard
data class ContentTypeId(var authorityId: String, var typeId: String, var versionMajor: UInt, var versionMinor: UInt)
Link copied to clipboard
sealed class Conversation : Disposable
Link copied to clipboard
data class ConversationDebugInfo(var epoch: ULong, var maybeForked: Boolean, var forkDetails: String, var isCommitLogForked: Boolean?, var localCommitLog: String, var remoteCommitLog: String, var cursor: List<ULong>)
Link copied to clipboard
Link copied to clipboard
data class ConversationJoined(var groupId: ByteArray, var conversationType: EventConversationType, var origin: JoinOrigin, var adderInboxId: InboxId?)
Link copied to clipboard
Link copied to clipboard
data class ConversationMessageReaderOptions(var from: String? = null)

Exclusive replay position for a named conversation.

Link copied to clipboard
data class ConversationMessageStreamOptions(val from: String? = null, val onClose: (SDKStreamCloseReason) -> Unit? = null, val onConnectionStateChange: (ConnectionState?, ConnectionState) -> Unit? = null)
Link copied to clipboard
Link copied to clipboard
data class ConversationPaused(var groupId: ByteArray, var floor: String)
Link copied to clipboard

A pull reader for new stored conversations.

Link copied to clipboard

A pull reader for new stored conversations.

Link copied to clipboard
data class ConversationReaderOptions(var kind: ConversationKind? = null, var consentStates: List<ConsentState>? = null)
Link copied to clipboard
data class ConversationRemoved(var groupId: ByteArray, var cause: RemovalCause)
Link copied to clipboard
Link copied to clipboard
data class ConversationState(var isActive: Boolean, var consentState: ConsentState, var pausedForVersion: String?, var isDisappearingEnabled: Boolean, var disappearingSettings: DisappearingSettings?, var notificationsEnabled: Boolean, var commitLogForkStatus: CommitLogForkStatus)
Link copied to clipboard
data class ConversationStreamOptions(val conversationKind: ConversationKind? = null, val consentStates: List<ConsentState>? = null, val onClose: (SDKStreamCloseReason) -> Unit? = null, val onConnectionStateChange: (ConnectionState?, ConnectionState) -> Unit? = null)
Link copied to clipboard
data class CreateDmOptions(var disappearing: DisappearingSettings? = null)
Link copied to clipboard
data class CreateGroupOptions(var permissions: GroupPermissionMode? = null, var name: String? = null, var imageUrl: String? = null, var description: String? = null, var disappearing: DisappearingSettings? = null, var appData: String? = null)
Link copied to clipboard
data class Credential(var name: String?, var value: String, var expiresAtSeconds: Long)
Link copied to clipboard
Link copied to clipboard

Which credential step failed, for the Credential cause.

Link copied to clipboard
Link copied to clipboard
sealed class DeletedBy
Link copied to clipboard
data class DeletedMessage(var deletedBy: DeletedBy)
Link copied to clipboard
data class DeleteMessageContent(var messageId: MessageId)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class DisappearingSettings(var from: Timestamp, var retentionNs: Long)
Link copied to clipboard
interface Disposable
Link copied to clipboard
Link copied to clipboard
interface DmInterface
Link copied to clipboard
data class DownloadedAttachment(var path: String, var mimeType: String?, var filename: String?)

A verified attachment in the attachments directory.

Link copied to clipboard
data class EncodedContent(var type: ContentTypeId, var parameters: Map<String, String> = mapOf(), var fallback: String? = null, var content: ByteArray)

Content at this boundary is uncompressed. Send options control wire compression.

Link copied to clipboard
data class EncryptedEncodedContent(var ciphertext: ByteArray, var keys: EncryptionKeys)
Link copied to clipboard
data class EncryptionKeys(var secret: ByteArray, var salt: ByteArray, var nonce: ByteArray, var digest: String, var length: ULong)
Link copied to clipboard

The kind of a façade failure.

Link copied to clipboard
data class ErrorDetails(var code: String, var category: ErrorCategory, var retryable: Boolean, var message: String, var streamFailure: StreamFailureDetails? = null)

Stable information carried by each error variant.

Link copied to clipboard
Link copied to clipboard
data class EventContentTypeId(var authorityId: String, var typeId: String, var versionMajor: UInt)
Link copied to clipboard
data class EventFilter(var kinds: List<EventKind>, var groupIds: List<ByteArray>? = null, var contentTypes: List<EventContentTypeId>? = null, var referencesOwnMessages: Boolean = false)
Link copied to clipboard
Link copied to clipboard
interface EventListener
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
typealias FfiConverterTypeConversationId = FfiConverterString
Link copied to clipboard
typealias FfiConverterTypeInboxId = FfiConverterString
Link copied to clipboard
typealias FfiConverterTypeInstallationId = FfiConverterString
Link copied to clipboard
typealias FfiConverterTypeListenerId = FfiConverterULong
Link copied to clipboard
typealias FfiConverterTypeMessageId = FfiConverterString
Link copied to clipboard
sealed class FieldKey

A map or set key.

Link copied to clipboard
sealed class FieldValue

A scalar value or map value.

Link copied to clipboard
data class ForkRecoveryOptions(var policy: ForkRecoveryPolicy, var groups: List<ConversationId> = listOf(), var disableResponses: Boolean = false, var workerIntervalNs: ULong? = null)
Link copied to clipboard
Link copied to clipboard
interface GroupInterface
Link copied to clipboard
data class GroupMembershipCapabilities(var contextExtensions: List<MlsExtensionType>, var members: List<InboxCapabilities>)
Link copied to clipboard
sealed class GroupPermissionMode
Link copied to clipboard
data class GroupPermissions(var policyType: GroupPolicyType, var policySet: PermissionPolicySet)
Link copied to clipboard
Link copied to clipboard
data class GroupRef(var groupId: ByteArray)
Link copied to clipboard
data class GroupState(var common: ConversationState, var name: String, var imageUrl: String, var description: String, var appData: String, var membershipState: MembershipState, var admins: List<InboxId>, var superAdmins: List<InboxId>, var permissions: GroupPermissions)
Link copied to clipboard
data class GroupSyncSummary(var eligible: ULong, var synced: ULong)
Link copied to clipboard
data class GroupUpdated(var initiatedByInboxId: InboxId, var addedInboxes: List<InboxId>, var removedInboxes: List<InboxId>, var leftInboxes: List<InboxId>, var metadataFieldChanges: List<MetadataFieldChange>, var addedAdminInboxes: List<InboxId>, var removedAdminInboxes: List<InboxId>, var addedSuperAdminInboxes: List<InboxId>, var removedSuperAdminInboxes: List<InboxId>)
Link copied to clipboard
Link copied to clipboard
data class HandleChanged(var inboxId: InboxId, var handle: String)

The current handle of an inbox changed: the client stored a newer association state for the inbox whose display handle differs.

Link copied to clipboard
data class HandlesConfiguration(var minNameLength: UInt)

Handle settings the deployment applies when it admits a claim. They are for apps, for example to check a name as a user types it. The SDK never fails an operation or omits a handle because of them: the backend's answer when it admits a claim decides.

Link copied to clipboard
data class HmacKey(var key: ByteArray, var epoch: Long)
Link copied to clipboard
Link copied to clipboard
data class IdentityRegistered(var inboxId: InboxId, var installationKey: ByteArray)
Link copied to clipboard
data class IdentityStats(var getInboxIds: ULong, var verifySmartContractWalletSignatures: ULong)
Link copied to clipboard
data class InboxCapabilities(var inboxId: InboxId, var installations: List<InstallationCapabilities>)
Link copied to clipboard
typealias InboxId = String
Link copied to clipboard
data class InboxState(var inboxId: InboxId, var identities: List<PublicIdentity>, var installations: List<Installation>, var recoveryIdentity: PublicIdentity, var creationSignatureKind: SignatureKind?, var handle: String?, var otherHandles: List<String>)
Link copied to clipboard
data class Installation(var id: InstallationId, var createdAt: Timestamp?)
Link copied to clipboard
data class InstallationCapabilities(var installationId: InstallationId, var isOwn: Boolean, var supportedExtensions: List<MlsExtensionType>, var capabilitiesKnown: Boolean)
Link copied to clipboard
Link copied to clipboard
data class InstallationRef(var installationKey: ByteArray)
Link copied to clipboard
data class InstallationRevoked(var installationKey: ByteArray, var isThisInstallation: Boolean)
Link copied to clipboard
data class Intent(var id: String, var actionId: String, var metadataJson: String?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class KeyPackageLifetime(var notBefore: ULong, var notAfter: ULong)
Link copied to clipboard
data class KeyPackageStatus(var lifetime: KeyPackageLifetime?, var validationError: String?)
Link copied to clipboard
data class Lagged(var discarded: ULong)
Link copied to clipboard
data class LeaveRequest(var authenticatedNote: ByteArray?)
Link copied to clipboard
Link copied to clipboard
data class LimitsConfiguration(var maxEnvelopeBytes: ULong, var maxRequestBytes: ULong, var maxResponseBytes: ULong, var maxPublishTopics: ULong, var maxQueryTopics: ULong, var maxQueryLimit: ULong, var defaultQueryLimit: ULong, var maxNewestMetadataTopics: ULong, var maxNewestFullTopics: ULong, var maxUpdateAdds: ULong, var maxUpdateRemoves: ULong, var maxStreamTopics: ULong, var maxStaticTopics: ULong, var maxLookupIdentifiers: ULong, var maxScwSignatures: ULong, var maxIdentityEntries: ULong, var maxUpdateFramesPerSecond: UInt, var maxUpdateBurst: UInt, var maxPingFramesPerSecond: UInt, var maxPingBurst: UInt)
Link copied to clipboard
data class ListConversationsOptions(var kind: ConversationKind? = null, var consentStates: List<ConsentState>? = null, var createdAfter: Timestamp? = null, var createdBefore: Timestamp? = null, var lastActivityAfter: Timestamp? = null, var lastActivityBefore: Timestamp? = null, var limit: UInt? = null, var orderBy: ConversationOrder? = null, var includeDuplicateDms: Boolean = false)
Link copied to clipboard
Link copied to clipboard
typealias ListenerId = ULong
Link copied to clipboard
data class ListMessagesOptions(var limit: UInt? = null, var sentBefore: Timestamp? = null, var sentAfter: Timestamp? = null, var insertedBefore: Timestamp? = null, var insertedAfter: Timestamp? = null, var direction: MessageOrder? = null, var sortBy: MessageSortBy? = null, var deliveryStatus: DeliveryStatus? = null, var kind: MessageKind? = null, var contentTypes: List<ContentTypeId>? = null, var excludeContentTypes: List<ContentTypeId>? = null, var excludeSenderInboxIds: List<InboxId>? = null)
Link copied to clipboard
data class LocalAttachment(var path: String, var createdAt: Timestamp)

A plaintext attachment file this client keeps.

Link copied to clipboard

An exportable Ethereum signing key. Only explicit export methods reveal its private key.

Link copied to clipboard

An exportable Ethereum signing key. Only explicit export methods reveal its private key.

Link copied to clipboard
Link copied to clipboard
data class LockoutChanged(var change: LockoutChange)
Link copied to clipboard
data class LoggingOptions(var level: LogLevel? = null, var structured: Boolean = false, var performance: Boolean = false, var otel: OtelOptions? = null, var resourceAttributes: Map<String, String> = mapOf())
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class LogRecord(var level: LogLevel, var target: String, var message: String, var fields: Map<String, String>, var timestamp: Timestamp, var droppedRecords: ULong)
Link copied to clipboard
Link copied to clipboard
interface LogSink
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class MapEntry(var key: FieldKey, var value: FieldValue)
Link copied to clipboard
sealed class MapMutation

One key change to a map field.

Link copied to clipboard
Link copied to clipboard
data class Member(var inboxId: InboxId, var identities: List<PublicIdentity>, var permissionLevel: PermissionLevel, var consentState: ConsentState, var handle: String?, var otherHandles: List<String>)
Link copied to clipboard
data class MembershipChanged(var groupId: ByteArray, var addedInboxIds: List<InboxId>, var removedInboxIds: List<InboxId>)
Link copied to clipboard
data class MembershipResult(var added: List<InboxId>, var removed: List<InboxId>, var failedInstallationIds: List<InstallationId>)
Link copied to clipboard
Link copied to clipboard

A received or stored message. MessageFields holds its fields and equality.

Link copied to clipboard
sealed class MessageBody
Link copied to clipboard
sealed class MessageContent
Link copied to clipboard
data class MessageData(var id: MessageId, var clientKey: ULong, var deliveryCursor: String? = null, var conversationId: ConversationId, var topic: String, var senderInboxId: InboxId, var sentAt: Timestamp, var insertedAt: Timestamp, var expiresAt: Timestamp?, var kind: MessageKind, var deliveryStatus: DeliveryStatus, var rawBytes: ByteArray, var contentType: ContentTypeId?, var fallback: String?, var encoded: EncodedContent?, var content: MessageContent, var replyCount: ULong, var reactions: List<ReactionMessage>, var inReplyTo: ReplyParent?)

A message value contains records and enums only.

Link copied to clipboard
data class MessageDeleted(var groupId: ByteArray, var messageId: ByteArray, var cause: DeletionCause)
Link copied to clipboard
abstract class MessageFields

The fields of a received message, and value equality over all of its data. Message adds its decoded content and actions.

Link copied to clipboard
data class MessageHistoryPage(var messages: List<Message>, var firstPosition: MessageHistoryPosition?, var lastPosition: MessageHistoryPosition?, var hasMore: Boolean, var skippedCount: UInt)

A chronological Published page and the raw prefix it consumed. First and last positions follow the requested output direction. Empty messages can still have consumed positions and more history.

Link copied to clipboard
data class MessageHistoryPosition(var sentAt: Timestamp, var deliveryCursor: String)

A sent-time boundary with a committed database-local delivery position. Keep the cursor opaque. A retained boundary remains valid after deletion. A whole-database restore or another database rejects the cursor.

Link copied to clipboard
data class MessageHistorySnapshot(var messages: List<Message>, var cursor: String)

Retained messages and their replay boundary from one database snapshot.

Link copied to clipboard
typealias MessageId = String
Link copied to clipboard
Link copied to clipboard
data class MessageMetadataEntry(var sequenceId: ULong, var createdAt: Timestamp)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class MessageReaderOptions(var conversationKind: ConversationKind? = null, var consentStates: List<ConsentState>? = null, var from: String? = null)

Fixed selection and replay position for an all-conversation message reader.

Link copied to clipboard
data class MessageReceived(var groupId: ByteArray, var messageId: ByteArray, var contentType: EventContentTypeId?, var senderInboxId: InboxId)
Link copied to clipboard
data class MessageRecoveryPage(var messages: List<Message>, var firstPosition: MessageRecoveryPosition?, var lastPosition: MessageRecoveryPosition?, var hasMore: Boolean, var skippedCount: UInt)

A chronological pending page and the raw prefix it consumed.

Link copied to clipboard
data class MessageRecoveryPosition(var sentAt: Timestamp, var messageCursor: String)

A sent-time boundary with an opaque database-local raw message key. The boundary remains valid after deletion or publication of the row.

Link copied to clipboard
data class MessageRef(var groupId: ByteArray, var messageId: ByteArray)
Link copied to clipboard
Link copied to clipboard
data class MessageStatusChanged(var groupId: ByteArray, var messageId: ByteArray, var previous: EventMessageStatus, var current: EventMessageStatus)
Link copied to clipboard
data class MessageStreamOptions(val conversationKind: ConversationKind? = null, val consentStates: List<ConsentState>? = null, val from: String? = null, val onClose: (SDKStreamCloseReason) -> Unit? = null, val onConnectionStateChange: (ConnectionState?, ConnectionState) -> Unit? = null)
Link copied to clipboard
sealed class MetadataBasePolicy
Link copied to clipboard
data class MetadataChanged(var groupId: ByteArray, var changed: List<String>)
Link copied to clipboard

The shape of a field's value.

Link copied to clipboard
data class MetadataFieldChange(var fieldName: String, var oldValue: String?, var newValue: String?)
Link copied to clipboard
data class MetadataFieldDescriptor(var field: MetadataFieldRef, var componentType: MetadataComponentType, var permissions: ComponentPermissions, var isUserField: Boolean)

A field of a conversation, with its committed type and policies.

Link copied to clipboard
Link copied to clipboard
data class MetadataFieldRef(var componentId: UShort, var name: String?)

Names a metadata field: its component ID and, when one exists, its well-known or backend catalogue name.

Link copied to clipboard
data class MetadataFieldValue(var field: MetadataFieldRef, var value: MetadataValue?)

A field and its value. The value is absent when the conversation holds none.

Link copied to clipboard

The type of a map or set key.

Link copied to clipboard
sealed class MetadataPolicy

A member policy for inserting, updating or deleting a field.

Link copied to clipboard

The type of a scalar field or of a map value.

Link copied to clipboard
sealed class MetadataValue

A field value.

Link copied to clipboard
data class MigrationReport(var archivePath: String, var groupCount: ULong, var messageCount: ULong, var consentCount: ULong)

Counts records in the completed archive, before import deduplication.

Link copied to clipboard
data class MlsConfiguration(var maxGroupMembers: ULong, var maxInstallationsPerInbox: ULong, var commitLogEnabled: Boolean?)
Link copied to clipboard
sealed class MlsExtensionType
Link copied to clipboard
data class MultiRemoteAttachment(var attachments: List<RemoteAttachment>)
Link copied to clipboard
sealed class NotificationChannel
Link copied to clipboard
data class NotificationConfig(var channel: NotificationChannel, var consentStates: List<ConsentState>? = null, var includeWelcomes: Boolean? = null, var includeSyncGroups: Boolean? = null, var includeCommits: Boolean? = null)
Link copied to clipboard
data class NotificationsFailed(var cause: String)
Link copied to clipboard
sealed class NotificationState
Link copied to clipboard
data class OtelOptions(var endpoint: String, var serviceName: String, var sampleRatio: Double = 1.0)
Link copied to clipboard

A staged attachment and its upload.

Link copied to clipboard

A staged attachment and its upload.

Link copied to clipboard

The upload state of a pending attachment, read from the database.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class PermissionPolicySet(var addMember: PermissionPolicy, var removeMember: PermissionPolicy, var addAdmin: PermissionPolicy, var removeAdmin: PermissionPolicy, var updateName: PermissionPolicy, var updateDescription: PermissionPolicy, var updateImage: PermissionPolicy, var updateDisappearing: PermissionPolicy, var updateAppData: PermissionPolicy)
Link copied to clipboard
interface PreAuthenticate
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class PrepareMigrationArchiveArgs(var databasePath: String, var databaseKey: ByteArray? = null, var archiveKey: ByteArray, var outputPath: String)

Closed legacy storage and a separate output path. Keep both keys private.

Link copied to clipboard
data class PublicIdentity(var identifier: String, var kind: PublicIdentityKind)
Link copied to clipboard
data class Reaction(var content: String, var action: ReactionAction, var schema: ReactionSchema)
Link copied to clipboard
Link copied to clipboard
data class ReactionMessage(var id: MessageId, var senderInboxId: InboxId, var sentAt: Timestamp, var deliveryStatus: DeliveryStatus, var reaction: Reaction)
Link copied to clipboard
Link copied to clipboard
data class ReactionV2Content(var reference: MessageId, var referenceInboxId: InboxId? = null, var reaction: Reaction)
Link copied to clipboard
Link copied to clipboard
data class RegistrationOptions(var auto: Boolean = true, var nonce: ULong? = null)
Link copied to clipboard
Link copied to clipboard
data class RemoteAttachment(var url: String, var contentDigest: String, var secret: ByteArray, var salt: ByteArray, var nonce: ByteArray, var scheme: String, var contentLength: UInt?, var filename: String?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class ReplyContent(var reference: MessageId, var referenceInboxId: InboxId? = null, var content: EncodedContent)
Link copied to clipboard
data class ReplyParent(var id: MessageId, var senderInboxId: InboxId, var sentAt: Timestamp, var kind: MessageKind, var deliveryStatus: DeliveryStatus, var rawBytes: ByteArray, var contentType: ContentTypeId?, var fallback: String?, var encoded: EncodedContent?, var content: MessageBody)
Link copied to clipboard
data class RetentionConfiguration(var groupMessageSeconds: ULong, var welcomeSeconds: ULong, var keyPackageSeconds: ULong)
Link copied to clipboard
class SDKClient

The host client resolves storage and owns the weak message lookup entry. Generated forwarders in ClientForwarding.kt expose the other Client methods and the Client statics. The generated Client stays private to the runtime.

Link copied to clipboard
object SDKForeign

Turn every host failure into the error declared by its foreign trait.

Link copied to clipboard
sealed class SDKMessageContent
Link copied to clipboard
sealed class SDKReplyContent
Link copied to clipboard
sealed interface SDKStreamCloseReason
Link copied to clipboard
data class SendOptions(var shouldPush: Boolean? = null, var optimistic: Boolean = false, var idempotencyKey: String? = null, var compression: Compression? = null)
Link copied to clipboard
data class ServerConfiguration(var identifier: String, var serverVersion: String, var minLibxmtpVersion: String, var auth: AuthConfiguration, var retention: RetentionConfiguration, var limits: LimitsConfiguration, var mls: MlsConfiguration, var handles: HandlesConfiguration, var smartContractWalletChains: List<String>, var attachments: AttachmentsConfiguration?, var applicationComponents: List<ApplicationComponentDefinition>)
Link copied to clipboard
sealed class SetMutation

One key change to a set field.

Link copied to clipboard
sealed class Signature
Link copied to clipboard
Link copied to clipboard

A request for an identity update. The caller adds signatures before applying it.

Link copied to clipboard

A request for an identity update. The caller adds signatures before applying it.

Link copied to clipboard
interface Signer
Link copied to clipboard
sealed class SignerException : Exception
Link copied to clipboard
Link copied to clipboard
sealed class SignerKind
Link copied to clipboard
data class SigningKeyDescription(var kid: String, var alg: String)
Link copied to clipboard
data class SigningRequest(var text: String)
Link copied to clipboard
sealed class StandardContent

A standard value that can be encoded without a client.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed class StorageLocation
Link copied to clipboard
data class StorageOptions(var location: StorageLocation, var label: String? = null, var encryptionKey: ByteArray? = null, var pool: StoragePoolOptions? = null, var singleConnection: Boolean = false)
Link copied to clipboard
data class StoragePoolOptions(var min: UInt? = null, var max: UInt? = null)
Link copied to clipboard
data class StreamBarrierCause(var kind: StreamBarrierCauseKind, var code: String?, var message: String, var retryable: Boolean)

Safe cause fields. Use the kind and code for control flow.

Link copied to clipboard

The typed cause of one unfinished topic obligation.

Link copied to clipboard
data class StreamBarrierFailure(var reason: StreamBarrierReason, var unfinished: List<StreamBarrierTopic>)

Every unfinished topic from one failed barrier.

Link copied to clipboard

Why a barrier stopped waiting. Pending work remains stored.

Link copied to clipboard
data class StreamBarrierTopic(var topic: ByteArray, var scopeGeneration: ULong? = null, var target: ULong?, var received: ULong, var processed: ULong, var unresolvedWelcomes: List<ULong>, var inactive: Boolean, var cause: StreamBarrierCause?)

One fixed topic obligation and its stored processing progress.

Link copied to clipboard
data class StreamFailureDetails(var kind: StreamFailureKind, var code: String, var message: String, var retryable: Boolean, var intentId: Int?, var publishedIntentIds: List<Int>, var summary: StreamFailureSummary?, var barriers: List<StreamBarrierFailure>)

Typed details from the core error, including all sibling barriers.

Link copied to clipboard

The operation with unfinished fixed processing obligations.

Link copied to clipboard
data class StreamFailureSummary(var messages: ULong, var conversations: ULong, var failed: ULong, var completed: Boolean)

Catch-up progress that remains committed after an incomplete result.

Link copied to clipboard
Link copied to clipboard
data class Timestamp(val ns: Long)
Link copied to clipboard
data class TransactionMetadata(var transactionType: String, var currency: String, var amount: Double, var decimals: UInt, var fromAddress: String, var toAddress: String)
Link copied to clipboard
data class TransactionReference(var namespace: String?, var networkId: String, var reference: String, var metadata: TransactionMetadata?)
Link copied to clipboard
data class UserFieldUpdate(var field: MetadataFieldRef, var value: FieldValue?)

Sets the caller's own value of a user field, or clears it when value is absent.

Link copied to clipboard
data class UserFieldValue(var field: MetadataFieldRef, var value: FieldValue)

One inbox's value of a user field.

Link copied to clipboard
data class WalletCall(var to: String?, var data: String?, var value: String?, var gas: String?, var metadata: WalletCallMetadata?)
Link copied to clipboard
data class WalletCallMetadata(var description: String, var transactionType: String, var extra: Map<String, String>)
Link copied to clipboard
data class WalletSendCalls(var version: String, var chainId: String, var from: String, var calls: List<WalletCall>, var capabilities: Map<String, String>?)
Link copied to clipboard

A public well-known metadata field.

Link copied to clipboard
data class WorkerInterval(var kind: WorkerKind, var intervalNs: ULong?, var jitterNs: ULong?, var enabled: Boolean?)
Link copied to clipboard
Link copied to clipboard
data class WorkerOptions(var defaultIntervalNs: ULong? = null, var intervals: List<WorkerInterval> = listOf())
Link copied to clipboard
sealed class XmtpException : Exception

Errors returned by the SDK façade.

Functions

Link copied to clipboard
fun SDKClient.Companion.activatePersistentLibXMTPLogWriter(context: Context, logLevel: LogLevel, rotationSchedule: LogRotation, maxFiles: UInt, processType: LogProcessType = LogProcessType.MAIN)

Write native logs in the app's files directory.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun SDKClient.Companion.build(context: Context, identity: PublicIdentity, options: ClientOptions, inboxId: InboxId? = null, codecs: List<ContentCodec<*>> = emptyList()): SDKClient

Open an existing identity with the same Android storage and lifecycle rules.

Link copied to clipboard
Link copied to clipboard

Returns one entry per core identity. Keys use ethereum:<core text>, passkey:<lowercase core hex>, or handle:<canonical handle>. A handle is available when the backend names an inbox for it.

Link copied to clipboard

The catalogue push value. Unknown custom content types default to push.

Link copied to clipboard
suspend fun SDKClient.catchUpToLive(timeoutMs: ULong?): CatchUpSummary
Link copied to clipboard
Link copied to clipboard
suspend fun SDKClient.claimHandle(handle: String)
Link copied to clipboard

Try to stop the file writer and return the number of files deleted.

Link copied to clipboard
Link copied to clipboard
suspend fun SDKClient.Companion.create(context: Context, signer: Signer, options: ClientOptions, codecs: List<ContentCodec<*>> = emptyList()): SDKClient

Create a client with Android default storage and process lifecycle control.

Link copied to clipboard
Link copied to clipboard
suspend fun Conversations.createDm(peer: PublicIdentity, options: CreateDmOptions? = null): Dm
Link copied to clipboard
suspend fun Conversations.createGroup(members: List<PublicIdentity>, options: CreateGroupOptions? = null): Group
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Read a content envelope and apply the shared decompression limits.

Link copied to clipboard
Link copied to clipboard
suspend fun decryptBytes(ciphertext: ByteArray, keys: EncryptionKeys): ByteArray
Link copied to clipboard
Link copied to clipboard
suspend fun decryptFile(input: String, output: String, keys: EncryptionKeys)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Serialize a content envelope with the shared wire format.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun encryptFile(input: String, output: String): EncryptionKeys
Link copied to clipboard
fun enterDebugWriter(directory: String, rotation: LogRotation, maxFiles: UInt, level: LogLevel, processType: LogProcessType)
Link copied to clipboard
suspend fun SDKClient.events(filter: EventFilter): Flow<ClientEvent>

Read one event only when the flow collector requests it.

Link copied to clipboard
Link copied to clipboard
suspend fun flushTelemetry()
Link copied to clipboard
fun generateInboxId(identity: PublicIdentity, nonce: ULong? = null): InboxId

Calculate an inbox ID from a public identity and a nonce. An omitted nonce is 0, as in client creation. This operation does not use a backend or storage.

Link copied to clipboard

Generate an exportable local key without a backend or client database.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Keep the retained hexadecimal conversion, including an odd first digit.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun inboxIdForWithBackend(backend: BackendSource, identity: PublicIdentity): InboxId

The inbox of an account or a handle. An account with no live inbox gets the inbox ID it would create with nonce 0. A handle never derives an inbox ID: it resolves only when the inbox the backend names holds it in its own identity log, and fails with IdentityNotFound otherwise. An old handle of an inbox still resolves to it.

Link copied to clipboard
suspend fun SDKClient.inboxState(refreshFromNetwork: Boolean): InboxState
Link copied to clipboard
suspend fun SDKClient.inboxStates(ids: List<InboxId>, refreshFromNetwork: Boolean): List<InboxState>
Link copied to clipboard
Link copied to clipboard
suspend fun initLogging(options: LoggingOptions)
Link copied to clipboard
Link copied to clipboard
suspend fun SDKClient.Companion.isAddressAuthorized(inboxId: InboxId, address: String, backend: BackendSource): Boolean
Link copied to clipboard
suspend fun isAddressAuthorizedWithBackend(backend: BackendSource, inboxId: InboxId, address: String): Boolean
Link copied to clipboard

True when content_type is an XMTP catalogue content type. A catalogue type keeps its catalogue push default; a host content codec's push hook applies only to other types.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun isInstallationAuthorizedWithBackend(backend: BackendSource, inboxId: InboxId, installationId: InstallationId): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun latestInboxUpdatesCount(inboxIds: List<InboxId>, backend: BackendSource): Map<String, ULong>

Read inbox update counts without opening a client or local storage.

Link copied to clipboard
suspend fun SDKClient.latestInboxUpdatesCount(ids: List<InboxId>, refreshFromNetwork: Boolean): Map<String, ULong>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun Conversation.messages(options: ListMessagesOptions? = null): List<Message>
Link copied to clipboard
Link copied to clipboard

The ref of a well-known field, named with its protocol name.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun SDKClient.ownInboxUpdatesCount(refreshFromNetwork: Boolean): ULong
Link copied to clipboard
Link copied to clipboard
suspend fun Conversation.prepareMessage(encoded: EncodedContent, options: SendOptions? = null): MessageId
suspend fun <T : Any> Conversation.prepareMessage(codec: ContentCodec<T>, value: T, options: SendOptions? = null): MessageId
suspend fun <T : Any> Dm.prepareMessage(codec: ContentCodec<T>, value: T, options: SendOptions? = null): MessageId
suspend fun <T : Any> Group.prepareMessage(codec: ContentCodec<T>, value: T, options: SendOptions? = null): MessageId
Link copied to clipboard

Prepare an archive without creating a client. Close the legacy SDK first. Source bytes stay unchanged. Import the completed archive into the correct inbox.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun SDKClient.register()
Link copied to clipboard

Project an app-hosted encrypted attachment with the shared content URL rule.

Link copied to clipboard
suspend fun SDKClient.removeAccount(recoverySigner: Signer, identity: PublicIdentity)
Link copied to clipboard
suspend fun Group.removeMembers(members: List<PublicIdentity>)
Link copied to clipboard
suspend fun resumeStreams()

Resume shared process streams from their durable progress.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun revokeInstallationsWithBackend(backend: BackendSource, signer: Signer, inboxId: InboxId, ids: List<InstallationId>)
Link copied to clipboard
Link copied to clipboard
suspend fun Conversation.send(encoded: EncodedContent, options: SendOptions? = null): MessageId
suspend fun <T : Any> Conversation.send(codec: ContentCodec<T>, value: T, options: SendOptions? = null): MessageId
suspend fun <T : Any> Dm.send(codec: ContentCodec<T>, value: T, options: SendOptions? = null): MessageId
suspend fun <T : Any> Group.send(codec: ContentCodec<T>, value: T, options: SendOptions? = null): MessageId
Link copied to clipboard
suspend fun Conversation.sendActions(actions: Actions, options: SendOptions? = null): MessageId
Link copied to clipboard
suspend fun Conversation.sendAttachment(attachment: Attachment, options: SendOptions? = null): MessageId
Link copied to clipboard
suspend fun Conversation.sendIntent(intent: Intent, options: SendOptions? = null): MessageId
Link copied to clipboard
suspend fun Conversation.sendMarkdown(markdown: String, options: SendOptions? = null): MessageId
Link copied to clipboard
Link copied to clipboard
suspend fun Conversation.sendReaction(reference: MessageId, referenceInboxId: InboxId?, reaction: Reaction, options: SendOptions? = null): MessageId
Link copied to clipboard
suspend fun Conversation.sendReadReceipt(options: SendOptions? = null): MessageId
Link copied to clipboard
suspend fun Conversation.sendRemoteAttachment(attachment: RemoteAttachment, options: SendOptions? = null): MessageId
Link copied to clipboard
suspend fun Conversation.sendReply(reference: MessageId, referenceInboxId: InboxId?, content: EncodedContent, options: SendOptions? = null): MessageId
Link copied to clipboard
suspend fun Conversation.sendText(text: String, options: SendOptions? = null): MessageId
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun SDKClient.setCredential(credential: Credential)
Link copied to clipboard
suspend fun setLogSink(sink: LogSink?)

Install or clear the optional asynchronous app sink.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun SDKClient.startListener(filter: EventFilter, onEvent: suspend (ClientEvent) -> Unit): ListenerId
Link copied to clipboard
Link copied to clipboard
fun StorageOptions(context: Context, label: String? = null, encryptionKey: ByteArray? = null, pool: StoragePoolOptions? = null, singleConnection: Boolean = false): StorageOptions

Resolve Android default storage from the app's internal files directory.

Link copied to clipboard
Link copied to clipboard
fun Conversations.stream(options: ConversationStreamOptions = ConversationStreamOptions()): Flow<Conversation>

This cold Flow holds its client. Each collection opens a conversation reader.

Link copied to clipboard
fun Conversations.streamAllMessages(options: MessageStreamOptions = MessageStreamOptions()): Flow<Message>

This cold Flow holds its client before and between collections. Each collection opens a reader. With direct sequential collection, the next read acknowledges the previous message after the collector returns. A buffer or asynchronous operator can let acknowledgement start before downstream work finishes. Cancellation cannot undo an acknowledgement that has started.

Link copied to clipboard
fun Conversation.streamMessages(options: ConversationMessageStreamOptions = ConversationMessageStreamOptions()): Flow<Message>
fun Dm.streamMessages(options: ConversationMessageStreamOptions = ConversationMessageStreamOptions()): Flow<Message>
fun Group.streamMessages(options: ConversationMessageStreamOptions = ConversationMessageStreamOptions()): Flow<Message>

This cold Flow holds its client before and between collections. Each collection opens a reader. With direct sequential collection, the next read acknowledges the previous message after the collector returns. A buffer or asynchronous operator can let acknowledgement start before downstream work finishes. Cancellation cannot undo an acknowledgement that has started.

Link copied to clipboard
suspend fun suspendStreams()

Suspend shared process streams and keep their durable progress.

Link copied to clipboard
suspend fun Conversation.sync()
Link copied to clipboard

Return lowercase hexadecimal text without a prefix.

Link copied to clipboard
Link copied to clipboard
suspend fun SDKClient.unsafeAddAccount(signer: Signer, allowInboxReassign: Boolean)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun validateInboxId(inboxId: InboxId)

Reject the retained forbidden prefix. Native operations validate the full ID.

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

Apply the retained prefix check to each inbox ID.

Link copied to clipboard
Link copied to clipboard
suspend fun verifySignedWithPublicKey(text: String, signature: ByteArray, publicKey: ByteArray): Boolean
Link copied to clipboard