Tauri commands
The #[tauri::command] functions in src/commands.rs, which the JS package calls
with invoke('plugin:keyring-store|<name>', args). You normally use the JavaScript API
instead; this list is for calling commands directly. From Rust, see Rust backend.
Arguments are sent in camelCase; the State parameter is injected by Tauri and not listed. PathBuf and
BytesDto arguments take a JS string (a BytesDto also takes a byte array). Every keyring call runs on a
blocking thread, so an OS prompt never stalls the async runtime.
| Command | Description |
|---|---|
get_passwords | Reads UTF-8 secrets by raw account; None for a missing one, in input order (max 256). |
set_passwords | Writes { account, secret } pairs (max 256); every account is checked before the first write. |
delete_passwords | Deletes accounts (max 256); a missing account is not an error. |
password_exists | true if the account holds a non-empty (after trim) secret. |
export_passwords_plain | Returns the secrets of accounts as a plaintext backup (format version 1). Secrets reach the webview in the clear. |
import_passwords_plain | Restores a plaintext backup. The whole backup is validated (version, max 256 rows, account rules) before the first write. |
export_passwords_encrypted | Returns the secrets of accounts encrypted with passphrase (Argon2id + ChaCha20-Poly1305). |
import_passwords_encrypted | Decrypts a backup from export_passwords_encrypted and restores it like import_passwords_plain. |
ping | Echoes payload.value back (diagnostics). |
initialize | Registers session snapshot_path for this process. |
destroy | Forgets the session snapshot_path. Stored entries are not touched. |
save | Writes nothing (entries are stored immediately); fails if the session is not loaded, like Stronghold. |
create_client | Checks that the session is loaded; clients need no creation in the OS store. |
load_client | Checks that the session is loaded; clients need no creation in the OS store. |
get_store_record | Reads a store record of a session client; None if missing. |
save_store_record | Writes a store record of a session client; returns the previous bytes, or None. |
remove_store_record | Deletes a store record; returns its previous bytes, or None. |
save_secret | Writes a vault record (Base64 text in the OS store). |
remove_secret | Deletes a vault record; a missing record is not an error. |
execute_procedure | Runs a SLIP10 / BIP39 / Ed25519 procedure on vault records. Returns only public data: a chain |
Commands
get_passwords
Reads UTF-8 secrets by raw account; None for a missing one, in input order (max 256).
invoke('plugin:keyring-store|get_passwords', { accounts })
| Argument (JS) | Rust parameter | Type |
|---|---|---|
accounts | accounts | Vec<String> |
Returns Vec<Option<String>>. Rust: async fn. Permission: keyring-store:allow-get-passwords.
set_passwords
Writes { account, secret } pairs (max 256); every account is checked before the first write.
invoke('plugin:keyring-store|set_passwords', { entries })
| Argument (JS) | Rust parameter | Type |
|---|---|---|
entries | entries | Vec<PasswordEntryDto> |
Returns (). Rust: async fn. Permission: keyring-store:allow-set-passwords.
delete_passwords
Deletes accounts (max 256); a missing account is not an error.
invoke('plugin:keyring-store|delete_passwords', { accounts })
| Argument (JS) | Rust parameter | Type |
|---|---|---|
accounts | accounts | Vec<String> |
Returns (). Rust: async fn. Permission: keyring-store:allow-delete-passwords.
password_exists
true if the account holds a non-empty (after trim) secret.
invoke('plugin:keyring-store|password_exists', { account })
| Argument (JS) | Rust parameter | Type |
|---|---|---|
account | account | String |
Returns bool. Rust: async fn. Permission: keyring-store:allow-password-exists.
export_passwords_plain
Returns the secrets of accounts as a plaintext backup (format version 1). Secrets reach the webview in the clear.
invoke('plugin:keyring-store|export_passwords_plain', { accounts })
| Argument (JS) | Rust parameter | Type |
|---|---|---|
accounts | accounts | Vec<String> |
Returns PasswordBackupPlainDto. Rust: async fn. Permission: keyring-store:allow-export-passwords-plain.
import_passwords_plain
Restores a plaintext backup. The whole backup is validated (version, max 256 rows, account rules) before the first write.
invoke('plugin:keyring-store|import_passwords_plain', { backup })
| Argument (JS) | Rust parameter | Type |
|---|---|---|
backup | backup | PasswordBackupPlainDto |
Returns (). Rust: async fn. Permission: keyring-store:allow-import-passwords-plain.
export_passwords_encrypted
Returns the secrets of accounts encrypted with passphrase (Argon2id + ChaCha20-Poly1305).
invoke('plugin:keyring-store|export_passwords_encrypted', { accounts, passphrase })
| Argument (JS) | Rust parameter | Type |
|---|---|---|
accounts | accounts | Vec<String> |
passphrase | passphrase | String |
Returns PasswordBackupEncryptedDto. Rust: async fn. Permission: keyring-store:allow-export-passwords-encrypted.
import_passwords_encrypted
Decrypts a backup from export_passwords_encrypted and restores it like import_passwords_plain.
invoke('plugin:keyring-store|import_passwords_encrypted', { backup, passphrase })
| Argument (JS) | Rust parameter | Type |
|---|---|---|
backup | backup | PasswordBackupEncryptedDto |
passphrase | passphrase | String |
Returns (). Rust: async fn. Permission: keyring-store:allow-import-passwords-encrypted.
ping
Echoes payload.value back (diagnostics).
invoke('plugin:keyring-store|ping', { payload })
| Argument (JS) | Rust parameter | Type |
|---|---|---|
payload | payload | PingRequest |
Returns PingResponse. Rust: async fn. Permission: keyring-store:allow-ping.
initialize
Registers session snapshot_path for this process.
The password is accepted for Stronghold API parity only and is not verified (any password opens any session): secrets are protected by the OS store, so it is wiped immediately and never stored or compared.
invoke('plugin:keyring-store|initialize', { snapshotPath, password })
| Argument (JS) | Rust parameter | Type |
|---|---|---|
snapshotPath | snapshot_path | PathBuf |
password | password | String |
Returns (). Rust: async fn. Permission: keyring-store:allow-initialize.
destroy
Forgets the session snapshot_path. Stored entries are not touched.
invoke('plugin:keyring-store|destroy', { snapshotPath })
| Argument (JS) | Rust parameter | Type |
|---|---|---|
snapshotPath | snapshot_path | PathBuf |
Returns (). Rust: async fn. Permission: keyring-store:allow-destroy.
save
Writes nothing (entries are stored immediately); fails if the session is not loaded, like Stronghold.
invoke('plugin:keyring-store|save', { snapshotPath })
| Argument (JS) | Rust parameter | Type |
|---|---|---|
snapshotPath | snapshot_path | PathBuf |
Returns (). Rust: async fn. Permission: keyring-store:allow-save.
create_client
Checks that the session is loaded; clients need no creation in the OS store.
invoke('plugin:keyring-store|create_client', { snapshotPath, client })
| Argument (JS) | Rust parameter | Type |
|---|---|---|
snapshotPath | snapshot_path | PathBuf |
client | client | BytesDto |
Returns (). Rust: async fn. Permission: keyring-store:allow-create-client.
load_client
Checks that the session is loaded; clients need no creation in the OS store.
invoke('plugin:keyring-store|load_client', { snapshotPath, client })
| Argument (JS) | Rust parameter | Type |
|---|---|---|
snapshotPath | snapshot_path | PathBuf |
client | client | BytesDto |
Returns (). Rust: async fn. Permission: keyring-store:allow-load-client.
get_store_record
Reads a store record of a session client; None if missing.
invoke('plugin:keyring-store|get_store_record', { snapshotPath, client, key })
| Argument (JS) | Rust parameter | Type |
|---|---|---|
snapshotPath | snapshot_path | PathBuf |
client | client | BytesDto |
key | key | BytesDto |
Returns Option<Vec<u8>>. Rust: async fn. Permission: keyring-store:allow-get-store-record.
save_store_record
Writes a store record of a session client; returns the previous bytes, or None.
lifetime is accepted for Stronghold parity and ignored: OS stores have no expiry.
invoke('plugin:keyring-store|save_store_record', { snapshotPath, client, key, value, lifetime })
| Argument (JS) | Rust parameter | Type |
|---|---|---|
snapshotPath | snapshot_path | PathBuf |
client | client | BytesDto |
key | key | BytesDto |
value | value | Vec<u8> |
lifetime | lifetime | Option<DurationDto> |
Returns Option<Vec<u8>>. Rust: async fn. Permission: keyring-store:allow-save-store-record.
remove_store_record
Deletes a store record; returns its previous bytes, or None.
invoke('plugin:keyring-store|remove_store_record', { snapshotPath, client, key })
| Argument (JS) | Rust parameter | Type |
|---|---|---|
snapshotPath | snapshot_path | PathBuf |
client | client | BytesDto |
key | key | BytesDto |
Returns Option<Vec<u8>>. Rust: async fn. Permission: keyring-store:allow-remove-store-record.
save_secret
Writes a vault record (Base64 text in the OS store).
invoke('plugin:keyring-store|save_secret', { snapshotPath, client, vault, recordPath, secret })
| Argument (JS) | Rust parameter | Type |
|---|---|---|
snapshotPath | snapshot_path | PathBuf |
client | client | BytesDto |
vault | vault | BytesDto |
recordPath | record_path | BytesDto |
secret | secret | Vec<u8> |
Returns (). Rust: async fn. Permission: keyring-store:allow-save-secret.
remove_secret
Deletes a vault record; a missing record is not an error.
invoke('plugin:keyring-store|remove_secret', { snapshotPath, client, vault, recordPath })
| Argument (JS) | Rust parameter | Type |
|---|---|---|
snapshotPath | snapshot_path | PathBuf |
client | client | BytesDto |
vault | vault | BytesDto |
recordPath | record_path | BytesDto |
Returns (). Rust: async fn. Permission: keyring-store:allow-remove-secret.
execute_procedure
Runs a SLIP10 / BIP39 / Ed25519 procedure on vault records. Returns only public data: a chain code, a public key, a signature, the new mnemonic or nothing; private keys stay in the store.
invoke('plugin:keyring-store|execute_procedure', { snapshotPath, client, procedure })
| Argument (JS) | Rust parameter | Type |
|---|---|---|
snapshotPath | snapshot_path | PathBuf |
client | client | BytesDto |
procedure | procedure | ProcedureDto |
Returns Vec<u8>. Rust: async fn. Permission: keyring-store:allow-execute-procedure. Compiled with cfg(feature = "crypto"); otherwise the command rejects with a crypto error.