---
title: "RPC: klavffi"
description: "13 entries."
canonical: "https://klav.everdoc.dev/stable/reference/rpc/klav_ffi"
channel: "stable"
---

# RPC: klav_ffi

> OmarAlex24/klav · channel `stable` · v0.15.1 @ [`034e81b52d1b`](https://github.com/OmarAlex24/klav/tree/034e81b52d1b693c65ff95181cd555c6734bc8e8) · 2026-12-04 · generated by Everdoc from source (no LLM).

13 entries.

<a id="rpc-klav_ffi-checkinvite"></a>

## `klav_ffi.checkInvite`

Whether `invite` can be used by `email` on `server` now (`POST /v1/auth/invite/check`, ADR 0048 §1.3): fails with [`KlavError::InviteInvalid`] otherwise. «Continue» runs it before the master password. Not a reservation: [`KlavCore::sign_up`] checks again.

- Kind: rpc
- Workspace: [klav-ffi](../../architecture/klav-ffi.md)
- Source: [crates/klav-ffi/src/lib.rs:225](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-ffi/src/lib.rs#L225)
- Handlers: 1 · Callers: 5
- Method: `checkInvite` · transport uniffi
- Used at: [apps/ios/Mac/Setup/AccountSheet.swift:46](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Mac/Setup/AccountSheet.swift#L46), [apps/ios/Mac/Setup/AccountSheet.swift:227](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Mac/Setup/AccountSheet.swift#L227), [apps/ios/Mac/Setup/AccountSheet.swift:255](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Mac/Setup/AccountSheet.swift#L255), [apps/ios/Mac/Setup/AccountSheet.swift:296](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Mac/Setup/AccountSheet.swift#L296), [apps/ios/Mac/Setup/AccountSheet.swift:316](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Mac/Setup/AccountSheet.swift#L316)

<a id="rpc-klav_ffi-composedatabaseurl"></a>

## `klav_ffi.composeDatabaseUrl`

Composes a database connection URL exactly as `klav-core` does (ADR 0054 §3); `None` when the parts cannot form one. The composed string can hold the password and is secret.

- Kind: rpc
- Workspace: [klav-ffi](../../architecture/klav-ffi.md)
- Source: [crates/klav-ffi/src/lib.rs:139](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-ffi/src/lib.rs#L139)
- Handlers: 1 · Callers: 1
- Method: `composeDatabaseUrl` · transport uniffi
- Used at: [apps/ios/Shared/App/ItemDraft.swift:197](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Shared/App/ItemDraft.swift#L197)

<a id="rpc-klav_ffi-coreversion"></a>

## `klav_ffi.coreVersion`

Version of `klav-core` this library is built against.

- Kind: rpc
- Workspace: [klav-ffi](../../architecture/klav-ffi.md)
- Source: [crates/klav-ffi/src/lib.rs:107](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-ffi/src/lib.rs#L107)
- Handlers: 1 · Callers: 0
- Method: `coreVersion` · transport uniffi

<a id="rpc-klav_ffi-defaultserver"></a>

## `klav_ffi.defaultServer`

The server the app signs in to unless the person opens «Use my own server» (ADR 0028 §2); `None` when `KLAV_NO_DEFAULT_SERVER` is set (the tests).

- Kind: rpc
- Workspace: [klav-ffi](../../architecture/klav-ffi.md)
- Source: [crates/klav-ffi/src/lib.rs:156](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-ffi/src/lib.rs#L156)
- Handlers: 1 · Callers: 4
- Method: `defaultServer` · transport uniffi
- Used at: [apps/ios/Klav/SignInView.swift:15](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Klav/SignInView.swift#L15), [apps/ios/Klav/SignInView.swift:28](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Klav/SignInView.swift#L28), [apps/ios/Mac/Setup/AccountSheet.swift:70](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Mac/Setup/AccountSheet.swift#L70), [apps/ios/Mac/Setup/AccountSheet.swift:103](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Mac/Setup/AccountSheet.swift#L103)

<a id="rpc-klav_ffi-generate"></a>

## `klav_ffi.generate`

A password from the generator (ADR 0022 §1), following the bundled rules of `host` when the type is `smart`.

- Kind: rpc
- Workspace: [klav-ffi](../../architecture/klav-ffi.md)
- Source: [crates/klav-ffi/src/lib.rs:249](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-ffi/src/lib.rs#L249)
- Handlers: 1 · Callers: 2
- Method: `generate` · transport uniffi
- Used at: [apps/ios/Klav/Generator.swift:226](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Klav/Generator.swift#L226), [apps/ios/Mac/Generator.swift:191](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Mac/Generator.swift#L191)

<a id="rpc-klav_ffi-generatepassword"></a>

## `klav_ffi.generatePassword`

A random password (`length` characters; letters and digits, plus symbols when `symbols`).

- Kind: rpc
- Workspace: [klav-ffi](../../architecture/klav-ffi.md)
- Source: [crates/klav-ffi/src/lib.rs:235](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-ffi/src/lib.rs#L235)
- Handlers: 1 · Callers: 0
- Method: `generatePassword` · transport uniffi

<a id="rpc-klav_ffi-parsedatabaseurl"></a>

## `klav_ffi.parseDatabaseUrl`

Parses a database connection URL exactly as `klav-core` does (ADR 0054 §3): Postgres, MySQL, Redis, MongoDB and the other engines `klav-core` knows, with percent-decoded user info and path. `None` when the raw text is not one of those URLs. The result holds its password, if any; Swift keeps it only while the paste editor shows it.

- Kind: rpc
- Workspace: [klav-ffi](../../architecture/klav-ffi.md)
- Source: [crates/klav-ffi/src/lib.rs:130](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-ffi/src/lib.rs#L130)
- Handlers: 1 · Callers: 2
- Method: `parseDatabaseUrl` · transport uniffi
- Used at: [apps/ios/Shared/App/DatabaseRequestWords.swift:16](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Shared/App/DatabaseRequestWords.swift#L16), [apps/ios/Shared/App/ItemDraft.swift:156](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Shared/App/ItemDraft.swift#L156)

<a id="rpc-klav_ffi-proxypresets"></a>

## `klav_ffi.proxyPresets`

The presets of `klav proxy grant --preset`, byte for byte (ADR 0036 §7).

- Kind: rpc
- Workspace: [klav-ffi](../../architecture/klav-ffi.md)
- Source: [crates/klav-ffi/src/proxy_grant.rs:151](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-ffi/src/proxy_grant.rs#L151)
- Handlers: 1 · Callers: 1
- Method: `proxyPresets` · transport uniffi
- Used at: [apps/ios/Mac/Development/ShareCredential.swift:531](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Mac/Development/ShareCredential.swift#L531)

<a id="rpc-klav_ffi-registrationmode"></a>

## `klav_ffi.registrationMode`

How `server` takes new accounts (`GET /v1/health`, ADR 0048 §1.2), for «Create your account» before anything is asked: the «Invite code» field follows it, also with «Use my own server». Blocks: call it off the main thread.

- Kind: rpc
- Workspace: [klav-ffi](../../architecture/klav-ffi.md)
- Source: [crates/klav-ffi/src/lib.rs:215](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-ffi/src/lib.rs#L215)
- Handlers: 1 · Callers: 2
- Method: `registrationMode` · transport uniffi
- Used at: [apps/ios/Mac/Setup/AccountSheet.swift:42](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Mac/Setup/AccountSheet.swift#L42), [apps/ios/Mac/Setup/AccountSheet.swift:284](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Mac/Setup/AccountSheet.swift#L284)

<a id="rpc-klav_ffi-serverfrominput"></a>

## `klav_ffi.serverFromInput`

The server a person typed in «Use my own server»: `https://` added when missing; `klav.dev`, `api.klav.dev` and old URLs of klav.dev mean the default (ADR 0028 §3).

- Kind: rpc
- Workspace: [klav-ffi](../../architecture/klav-ffi.md)
- Source: [crates/klav-ffi/src/lib.rs:164](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-ffi/src/lib.rs#L164)
- Handlers: 1 · Callers: 3
- Method: `serverFromInput` · transport uniffi
- Used at: [apps/ios/Klav/AppModel.swift:1308](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Klav/AppModel.swift#L1308), [apps/ios/Klav/SignInView.swift:29](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Klav/SignInView.swift#L29), [apps/ios/Mac/Setup/AccountSheet.swift:104](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Mac/Setup/AccountSheet.swift#L104)

<a id="rpc-klav_ffi-servername"></a>

## `klav_ffi.serverName`

How the interface names a server: «klav.dev» for the default, else its host.

- Kind: rpc
- Workspace: [klav-ffi](../../architecture/klav-ffi.md)
- Source: [crates/klav-ffi/src/lib.rs:171](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-ffi/src/lib.rs#L171)
- Handlers: 1 · Callers: 2
- Method: `serverName` · transport uniffi
- Used at: [apps/ios/Klav/SettingsView.swift:42](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Klav/SettingsView.swift#L42), [apps/ios/Klav/SignInView.swift:152](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Klav/SignInView.swift#L152)

<a id="rpc-klav_ffi-servicehost"></a>

## `klav_ffi.serviceHost`

The host an iOS service identifier stands for: a URL (`https://…`) or a bare domain (`github.com`). Only `https` (or `http` on this device) qualifies, as in the browser extension (ADR 0017 §5).

- Kind: rpc
- Workspace: [klav-ffi](../../architecture/klav-ffi.md)
- Source: [crates/klav-ffi/src/lib.rs:297](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-ffi/src/lib.rs#L297)
- Handlers: 1 · Callers: 2
- Method: `serviceHost` · transport uniffi
- Used at: [apps/ios/Credentials/CredentialModel.swift:115](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Credentials/CredentialModel.swift#L115), [apps/ios/Credentials/CredentialModel.swift:296](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Credentials/CredentialModel.swift#L296)

<a id="rpc-klav_ffi-siterelation"></a>

## `klav_ffi.siteRelation`

How the site `host` relates to a login's `urls` (ADR 0025 §3); `None` when the login is not for it at all.

- Kind: rpc
- Workspace: [klav-ffi](../../architecture/klav-ffi.md)
- Source: [crates/klav-ffi/src/lib.rs:312](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-ffi/src/lib.rs#L312)
- Handlers: 1 · Callers: 1
- Method: `siteRelation` · transport uniffi
- Used at: [apps/ios/Klav/AppModel.swift:768](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/apps/ios/Klav/AppModel.swift#L768)
