Companion

object Companion

Functions

Link copied to clipboard
suspend fun connect(config: Config): Client

Connect to a server and authenticate.

Link copied to clipboard
suspend fun connectWithState(config: Config, state: ByteArray): Client

Connect without an account, restoring a full session state saved by exportState. The no-account sibling of signInWithState.

Link copied to clipboard
suspend fun connectWithStateSealed(config: Config, state: ByteArray, store: SecureStore): Client

Restore a sealed state (from exportStateSealed) — decision 0078's anchor B, the rollback-resistant restore path. It attaches store (so per-send commits resume) and refuses a forged state, catches a state older than the latest send via the store counter, and witnesses the generation to the directory — closing EX-03 against a file-rewriter given a rollback-resistant store. The account sibling is signInWithStateSealed.

Link copied to clipboard
suspend fun signIn(config: AccountConfig, apiKey: String, password: String): Client

Sign in to an account and provision this device, returning a client operating under the account's handle. Save exportIdentity and reconnect with signInWithIdentity on later runs.

Link copied to clipboard
suspend fun signInTls(config: AccountConfig, serverName: String, apiKey: String, password: String): Client

Sign in over TLS to a server presenting serverName, trusting the public web PKI: the address layer's TLS sibling of signIn. An app uses Tenant.signIn, which finds the addresses itself.

Link copied to clipboard
suspend fun signInWithIdentity(config: AccountConfig, identity: ByteArray, apiKey: String, password: String): Client

Sign in and provision under a saved device identity (from exportIdentity), keeping the same bound key across restarts.

Link copied to clipboard
suspend fun signInWithState(config: AccountConfig, state: ByteArray, apiKey: String, password: String): Client

Sign in and restore a full session state saved by exportState.

Link copied to clipboard
suspend fun signInWithStateSealed(config: AccountConfig, state: ByteArray, store: SecureStore, apiKey: String, password: String): Client

Sign in and restore a sealed state (from exportStateSealed) — the account-path sibling of connectWithStateSealed, and the rollback-resistant sign-in path (decision 0078, anchor B). Attaches store; a forged or older-than-latest-send state is refused, and the generation is witnessed to the directory — closing EX-03 against a file-rewriter given a rollback-resistant store.