Tenant

One tenant's handle (decision record 0090): built from the API key and the server's name, it fetches the server's service document once to learn where the services are, and signs users up and in. Nothing above it sees a host or a port. Named Tenant on these heads (see the crate documentation); the same object is Tacenta in Rust and TypeScript.

Constructors

Link copied to clipboard
constructor(pointer: Pointer)
constructor(noPointer: NoPointer)

This constructor can be used to instantiate a fake object. Only used for tests. Any attempt to actually use an object constructed this way will fail as there is no connected Rust object.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun destroy()
Link copied to clipboard
open override fun isWebsocket(): Boolean

Whether the services are reached over the WebSocket carriage.

Link copied to clipboard
open suspend override fun signIn(username: String, password: String, device: UByte): Client

Sign a user in with a fresh device identity, on device 1 unless another is given; a connected client. Save Client.exportState and resume with signInWithState.

Link copied to clipboard
open suspend override fun signInWithState(username: String, password: String, state: ByteArray, device: UByte): Client

Sign in resuming persisted state (identity and live sessions) from Client.exportState.

Link copied to clipboard
open suspend override fun signInWithStateSealed(username: String, password: String, state: ByteArray, store: SecureStore, device: UByte): Client

Sign in resuming sealed state from Client.exportStateSealed with store attached: the rollback-resistant path (decision 0078, anchor B). A forged or older-than-latest-send state is refused.

Link copied to clipboard
open suspend override fun signUp(username: String, password: String)

Create a user in this tenant.

Link copied to clipboard
fun uniffiClonePointer(): Pointer
Link copied to clipboard
open override fun websocket(): Tenant

The same tenant, reaching the services over the document's WebSocket carriage instead of their ports. Fails if the document offers none.