Guides
Coming from Stronghold
How the API maps to tauri-plugin-stronghold, what behaves differently, and how to move existing data.
The JavaScript API has the same shape as
tauri-plugin-stronghold.
Most code changes only its imports and class names.
| Stronghold | This plugin |
|---|---|
Stronghold.load(path, password) | KeyringSession.load(path, password) |
Client | KeyringClient |
Store | KeyringStoreView |
Vault | KeyringVault |
Location.generic / Location.counter | the same |
vault.generateSLIP10Seed, deriveSLIP10, recoverBIP39, generateBIP39, getEd25519PublicKey, signEd25519 | the same |
-import { Stronghold } from "@tauri-apps/plugin-stronghold";
-const stronghold = await Stronghold.load(vaultPath, password);
+import { KeyringSession } from "tauri-plugin-keyring-store-api";
+const stronghold = await KeyringSession.load("/wallet/main", "");
const client = await stronghold.loadClient("main");
const store = client.getStore();
What behaves differently
| Stronghold | This plugin |
|---|---|
| A snapshot file encrypted with a key derived from the password | No file; each record is an OS keyring entry |
save() writes the snapshot | save() writes nothing (every write is immediate); it still fails if the session is not loaded |
| The password decrypts the snapshot | The password is not verified or used |
| Procedures run in the Stronghold runtime | Procedures run in the plugin's Rust code; outputs are stored in the keyring |
| Record size limited by memory | Platform limits, e.g. about 960 bytes per record on Windows |
insert(key, value, lifetime) expires records | lifetime is ignored |
Procedure results match Stronghold: no procedure returns a private key. generateBIP39 returns the new
mnemonic (as UTF-8 bytes) so the user can back it up.
Moving existing data
There is no import from a Stronghold snapshot. Read the data with Stronghold once and write it here:
- Store records:
oldStore.get(key)thenkeyringStore.insert(key, value)for every key you know. - Wallet keys: if you have the mnemonic, call
recoverBIP39into the new vault. Stronghold does not return private keys, so keys without a mnemonic cannot be copied; generate new ones.
After the move, delete the snapshot file.