API reference

Tauri commands

Every Tauri command of the plugin with its arguments, generated from src/commands.rs.

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.

CommandDescription
get_passwordsReads UTF-8 secrets by raw account; None for a missing one, in input order (max 256).
set_passwordsWrites { account, secret } pairs (max 256); every account is checked before the first write.
delete_passwordsDeletes accounts (max 256); a missing account is not an error.
password_existstrue if the account holds a non-empty (after trim) secret.
export_passwords_plainReturns the secrets of accounts as a plaintext backup (format version 1). Secrets reach the webview in the clear.
import_passwords_plainRestores a plaintext backup. The whole backup is validated (version, max 256 rows, account rules) before the first write.
export_passwords_encryptedReturns the secrets of accounts encrypted with passphrase (Argon2id + ChaCha20-Poly1305).
import_passwords_encryptedDecrypts a backup from export_passwords_encrypted and restores it like import_passwords_plain.
pingEchoes payload.value back (diagnostics).
initializeRegisters session snapshot_path for this process.
destroyForgets the session snapshot_path. Stored entries are not touched.
saveWrites nothing (entries are stored immediately); fails if the session is not loaded, like Stronghold.
create_clientChecks that the session is loaded; clients need no creation in the OS store.
load_clientChecks that the session is loaded; clients need no creation in the OS store.
get_store_recordReads a store record of a session client; None if missing.
save_store_recordWrites a store record of a session client; returns the previous bytes, or None.
remove_store_recordDeletes a store record; returns its previous bytes, or None.
save_secretWrites a vault record (Base64 text in the OS store).
remove_secretDeletes a vault record; a missing record is not an error.
execute_procedureRuns 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 parameterType
accountsaccountsVec<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 parameterType
entriesentriesVec<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 parameterType
accountsaccountsVec<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 parameterType
accountaccountString

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 parameterType
accountsaccountsVec<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 parameterType
backupbackupPasswordBackupPlainDto

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 parameterType
accountsaccountsVec<String>
passphrasepassphraseString

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 parameterType
backupbackupPasswordBackupEncryptedDto
passphrasepassphraseString

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 parameterType
payloadpayloadPingRequest

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 parameterType
snapshotPathsnapshot_pathPathBuf
passwordpasswordString

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 parameterType
snapshotPathsnapshot_pathPathBuf

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 parameterType
snapshotPathsnapshot_pathPathBuf

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 parameterType
snapshotPathsnapshot_pathPathBuf
clientclientBytesDto

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 parameterType
snapshotPathsnapshot_pathPathBuf
clientclientBytesDto

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 parameterType
snapshotPathsnapshot_pathPathBuf
clientclientBytesDto
keykeyBytesDto

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 parameterType
snapshotPathsnapshot_pathPathBuf
clientclientBytesDto
keykeyBytesDto
valuevalueVec<u8>
lifetimelifetimeOption<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 parameterType
snapshotPathsnapshot_pathPathBuf
clientclientBytesDto
keykeyBytesDto

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 parameterType
snapshotPathsnapshot_pathPathBuf
clientclientBytesDto
vaultvaultBytesDto
recordPathrecord_pathBytesDto
secretsecretVec<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 parameterType
snapshotPathsnapshot_pathPathBuf
clientclientBytesDto
vaultvaultBytesDto
recordPathrecord_pathBytesDto

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 parameterType
snapshotPathsnapshot_pathPathBuf
clientclientBytesDto
procedureprocedureProcedureDto

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.