Skip to main content

Module vault

Module vault 

Source

Functionsยง

check_vault_permissions
Warn if a directory has permissions more open than 0o700.
delete_wallet_file
Delete a wallet file from the vault by ID.
list_encrypted_wallets
Load all encrypted wallets from the vault. Checks directory permissions and warns if insecure. Returns wallets sorted by created_at descending (newest first).
load_wallet_by_name_or_id
Look up a wallet by exact ID first, then by name (case-sensitive). Returns an error if no wallet matches or if the name is ambiguous.
resolve_vault_path
Resolve the vault path: use explicit path if provided, otherwise default (~/.ows).
save_encrypted_wallet
Save an encrypted wallet file with strict permissions.
wallet_name_exists
Check whether a wallet with the given name already exists in the vault.
wallets_dir
Returns the wallets directory, creating it with strict permissions if necessary.