ClientInterface

interface ClientInterface

Inheritors

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun appVersion(): String?
Link copied to clipboard
abstract fun archives(): Archives
Link copied to clipboard
abstract fun attachments(): Attachments
Link copied to clipboard
abstract suspend fun availableHandles(name: String): List<String>

The handles for name that no inbox holds, the name itself first. name is a handle as a user typed it; its ASCII capitals become lowercase. A name with a code checks only that handle. A name without a code checks itself and 100 random codes in one lookup. Text outside the handle grammar fails with InvalidArgument, before any request. The SDK applies no other rule, so a claim of a returned handle can still fail with HandleNotAllowed. An unregistered client can call it.

Link copied to clipboard
abstract suspend fun canMessage(identities: List<PublicIdentity>): Map<String, Boolean>

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
abstract suspend fun catchUpToLive(timeoutMs: ULong?): CatchUpSummary
Link copied to clipboard
abstract suspend fun changeRecoveryIdentifier(signer: Signer, identity: PublicIdentity)
Link copied to clipboard
abstract suspend fun claimHandle(handle: String)

Claim handle for this inbox, signed by this installation's key. It becomes the inbox's current handle, including when the inbox claimed it before. Fails with HandleTaken, HandleNotAllowed, HandleTooSoon, or HandleLimitReached, none of them retryable, and with InvalidArgument for text outside the handle grammar.

Link copied to clipboard
abstract fun clientKey(): ULong

Host runtimes use this key to find the owner of a lifted message.

Link copied to clipboard
Link copied to clipboard
abstract suspend fun decodeContent(encoded: EncodedContent): MessageContent
Link copied to clipboard
abstract fun diagnostics(): Diagnostics
Link copied to clipboard
abstract suspend fun disableNotifications()
Link copied to clipboard
Link copied to clipboard
abstract suspend fun end()
Link copied to clipboard
abstract suspend fun events(filter: EventFilter): EventReader
Link copied to clipboard
abstract fun identity(): PublicIdentity
Link copied to clipboard
abstract fun inboxId(): InboxId
Link copied to clipboard
abstract suspend fun inboxIdFor(identity: PublicIdentity): InboxId?

The inbox of an account or a handle, or None. A handle resolves only when the inbox the backend names holds it in its own identity log, and an old handle of an inbox still resolves to it. This never derives an inbox ID from a handle.

Link copied to clipboard
abstract suspend fun inboxState(refreshFromNetwork: Boolean): InboxState
Link copied to clipboard
abstract suspend fun inboxStates(ids: List<InboxId>, refreshFromNetwork: Boolean): List<InboxState>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun isInMemory(): Boolean
Link copied to clipboard
abstract suspend fun isRegistered(): Boolean
Link copied to clipboard
Link copied to clipboard
abstract suspend fun latestInboxUpdatesCount(ids: List<InboxId>, refreshFromNetwork: Boolean): Map<String, ULong>
Link copied to clipboard
abstract fun libxmtpVersion(): String
Link copied to clipboard
Link copied to clipboard
abstract fun options(): ClientOptions

The options this client was built with, without its secrets: the static credential, the credential source, and the storage encryption key are None. Any holder of the client can read these options, and the browser worker copies them to the page.

Link copied to clipboard
abstract suspend fun ownInboxUpdatesCount(refreshFromNetwork: Boolean): ULong
Link copied to clipboard
abstract fun preferences(): Preferences
Link copied to clipboard
Link copied to clipboard
abstract suspend fun register()
Link copied to clipboard
abstract suspend fun removeAccount(recoverySigner: Signer, identity: PublicIdentity)
Link copied to clipboard
abstract suspend fun revokeAllOtherInstallations(signer: Signer)
Link copied to clipboard
abstract suspend fun revokeInstallations(signer: Signer, ids: List<InstallationId>)
Link copied to clipboard
Link copied to clipboard
abstract suspend fun setCredential(credential: Credential)
Link copied to clipboard
abstract suspend fun signWithInstallationKey(text: String): ByteArray
Link copied to clipboard
abstract suspend fun startListener(filter: EventFilter, listener: EventListener): ListenerId
Link copied to clipboard
abstract suspend fun stopListener(id: ListenerId)
Link copied to clipboard
abstract fun storage(): Storage
Link copied to clipboard
abstract fun storagePath(): String?
Link copied to clipboard
Link copied to clipboard
abstract suspend fun unsafeAddAccount(signer: Signer, allowInboxReassign: Boolean)
Link copied to clipboard
abstract suspend fun unsafeAddAccountSignatureRequest(identity: PublicIdentity, allowInboxReassign: Boolean): SignatureRequest
Link copied to clipboard
abstract suspend fun unsafeApplySignatureRequest(request: SignatureRequest)
Link copied to clipboard
abstract suspend fun verifySignedWithInstallationKey(text: String, signature: ByteArray): Boolean