Skip to content
Lean Key
Guides

Extension guide

Installing the Lean Key browser extension, the two owner modes, clear signing, the journal, auto-lock, the backup check and reset.

The Lean Key extension keeps the post-quantum half of your vaults: the 24-word seed and the journal of what each one-time key has signed. It registers as a Wallet Standard wallet, so the Lean Key site and any Solana dApp can find it. Version 0.1.0 is built with WXT from one code base for every browser.

Install

Download the build for your browser from /extension, which lists each file's size and sha256.

FileBrowsersNotes
leankey-0.1.0-chrome.zipChrome, Brave, Arc, OperaUnzip, open the browser's extensions page, turn on Developer mode, Load unpacked.
leankey-0.1.0-edge.zipMicrosoft EdgeSame steps in Edge.
leankey-0.1.0-firefox.zipFirefox 140 or newer (Manifest V3)This build is not signed by Mozilla. Load it as a temporary add-on from about:debugging; Firefox removes temporary add-ons when it restarts.
leankey-0.1.0-safari-xcode.zipSafari on macOSAn Xcode project generated with Apple's converter. Open it, sign it with your own team, and run it.
leankey-0.1.0-sources.zipThe source archive.

The extension is not in any browser store yet.

Setting up

Clicking the toolbar icon on a fresh install shows Set up Lean Key, which opens a full tab. The steps:

CreateRestore
1. Create: 24 new words1. Restore: type your 24 words
2. Owner: choose the owner mode2. Owner: choose the owner mode
3. Back up: write the words on paper3. Password
4. Verify: enter three of the words
5. Password
  • The verify step asks for the words at three random positions. A wrong answer is refused; Show words again goes back.
  • Restore accepts exactly 24 words from the BIP-39 English list; the checksum is verified when the seed is decoded.
  • The password must be at least 8 characters. It encrypts the seed (and the hot account, if any) with scrypt and AES-256-GCM; see Key derivation and backup.

One device per seed. If you restore a seed that is still in use in another browser or in the CLI, you now have two signers with two separate journals. Read Recovery and safety before doing this. The restore screen says so in red above the field, and Settings repeats it next to the backup words, but the extension cannot know whether another copy is still signing, so it does not stop you.

Owner modes

During setup you choose who holds the Ed25519 key of your vaults.

Option in setupModeWhat the extension holds
My wallet (recommended)external ownerOnly the post-quantum seed. Phantom, Solflare, Backpack or a Ledger is the vault owner and signs every transaction.
A hot account in this extensionbuilt-in ownerThe seed and a new Ed25519 account, both encrypted with your password.
Import a secret keybuilt-in ownerThe seed and an existing Solana secret key (base58 or a JSON array).

External owner gives two independent signers: an attacker needs your wallet and your extension. The site at /app builds the transactions: it asks the extension for the WOTS+ half (twokey:signIntent) and your wallet for the Ed25519 signature. Opening a vault works the same way: the extension supplies only the hash of key #0 (twokey:openVault) and your wallet signs InitVault.

Built-in owner keeps both keys in one browser profile. The WOTS+ requirement still holds, so a broken Ed25519 key alone cannot move funds, but anything that compromises that profile while unlocked, or the encrypted storage plus your password, gets both keys. The hot account has no word backup: the 24 words restore only the post-quantum seed. Back its key up from Settings → Built-in account key and keep that backup apart from the words. Without it, losing the browser profile means those vaults cannot be withdrawn from, ever.

The popup

The popup is 360 × 600; the same screens also run in a full tab.

  • Vaults. Each vault on the selected network with its balance, its current key number, whether it is closed, and its mode (external owner or built-in owner). In built-in mode, Open a vault opens the next free vault number for the hot account, and Sync adds the hot account's vaults found on chain.
  • Vault detail. Address, balance, the withdrawable part and the part kept as rent, the current one-time key number, token holdings, a deposit QR code, a pending intent if there is one, and the vault's history from the chain (opened, deposits, sends with key numbers, closes, refused transactions).
  • Withdraw (built-in owner): form, then Review, then Sign with both keys and send, then the result with slot, key #k → #k+1, compute units and the transaction signature. External-owner vaults link to /app instead.
  • Hot account (built-in owner): balance, tokens, receive address and QR code, and Send for SOL or SPL tokens. The USD value comes from CoinGecko when the display currency is USD.
  • Sites. Connected sites, each with Revoke.
  • Settings. Network, custom RPC, auto-lock, display currency, backup, reset.

Clear signing

Every request from a web page that signs anything opens a separate approval window (400 × 660) showing the requesting origin, as reported by the browser rather than by the page. Nothing is signed until you press Approve; closing the window rejects the request. A site must be connected (approved once) before it can request signatures, vaults or pending intents; until then only status, connect and disconnect are answered.

RequestWhat the window shows
ConnectWhat the site will see: the hot account's address, if any, and the vaults the extension knows on the selected network. It never sees a seed or a key.
Sign a one-time intent"Sign with one-time key #k": action, asset (SOL or the mint), amount (for a close, "everything above rent" with the current figure), destination, vault, the owner who signs next, and key #k → #k+1. A warning if the vault has moved to another key since the request was made, or if the mint has a transfer hook.
Create a vaultThe owner address that will be the vault's Ed25519 owner, the vault number and the network. Nothing is signed.
Sign a transactionEach instruction by program name (System Program, Token Program, Token-2022, Associated Token Account, Compute Budget, Memo, Jupiter Aggregator v6, Orca Whirlpools, Raydium AMM v4, Lean Key) with a one-line description, then a simulation: success or the error, the hot account's SOL change and the compute units. Unknown programs are flagged, and so are token delegate approvals and address lookup tables.
Sign a messageThe message as text, or as hex if it is not printable.

For an intent, the window shows the decoded request and, before you answer, checks it against the chain with a placeholder signature: every check except the hash signature must pass, and it shows the vault's and the recipient's SOL before and after as the intent implies, whether a recipient token account will be created, the owner's balance for the fee, and a warning if this key already signed another intent. No key is used for this. After you approve, the extension runs the safe send order: a simulation with a placeholder signature must stop at exactly BadSignature before the one-time key is used; then it signs, records the intent, and simulates again with the real signature. If anything fails before signing, no key is used.

Wallet Standard features

The page-side wallet holds no keys; every call is a message through the content script to the background service worker.

FeaturePurpose
standard:connect, standard:disconnect, standard:eventsConnection and account changes.
solana:signTransaction, solana:signAndSendTransaction, solana:signMessageThe hot account, for any dApp. Legacy and version 0 transactions.
twokey:statusWhether the extension is set up, unlocked and connected to this site, and its network.
twokey:getVaultsThe vaults the extension knows on a network.
twokey:openVaultThe first key hash and the InitVault instruction for an owner and vault number.
twokey:signIntentThe WOTS+ half of a withdrawal: the intent, the signature, the next key hash and the instructions, after preflight and simulation.
twokey:pendingIntentThe intent a vault's current key already signed, if it has not landed.
twokey:checkVaultsFor a list of vault addresses: whether each one's current key hash comes from this seed. A vault of your owner with another seed's key is a look-alike; the site marks it. Matching vaults are added to the extension's list.

Chains: solana:mainnet, solana:devnet, solana:localnet. The extension's end-to-end test (Playwright, Chromium) finds these 11 features from a test dApp.

The journal and pending intents

The extension records every intent it signs, keyed by vault and key index, in its local storage, before the signature leaves the background worker. After a built-in withdrawal lands, its entry is marked settled. An entry only counts as pending while its key index is still the vault's current one on chain.

If the current key of a vault already signed an intent that has not landed, the vault screen shows Pending intent for key #k with the action, amount and destination, and the Withdraw buttons are hidden. In built-in mode, Retry opens the withdrawal form for that action with the amount filled in, and the destination too except for token withdrawals (where the intent names a token account and the form asks for the recipient's wallet). Only a request that rebuilds exactly the signed intent is accepted, and it goes out with a fresh blockhash. In external mode, the site does the same through twokey:pendingIntent and twokey:signIntent; asking to sign any other intent for that key is refused. See Concepts for why.

Auto-lock

  • While unlocked, the decrypted seed (and hot account) are kept in the extension's session storage, which only extension pages can reach.
  • The lock time is 5, 15 (default) or 60 minutes, set in Settings, and every use of a key extends it.
  • A background alarm checks every minute and drops the decrypted secrets when the time has passed. Lock in the header does it at once.
  • A request from a site while locked opens the approval window with a password field first.

Settings

SettingDetail
Networkmainnet (default), devnet or localnet. Networks where Lean Key is not deployed are marked "(not deployed)". On mainnet the screen says: unaudited beta, keep at most the recommended limit in a vault.
Custom RPCPer network. The browser asks you to allow the extension to reach that host. Built-in hosts: api.devnet.solana.com, api.mainnet-beta.solana.com, 127.0.0.1:8899 and localhost:8899.
Auto-lock5, 15 or 60 minutes.
Display currencyUSD (fetches the SOL price from CoinGecko) or SOL only (no CoinGecko requests).
BackupEnter the password to show the 24 words. The note under them states the one-device rule.
ResetType RESET and enter the password.

Reset

Reset erases the extension's local storage in this browser: the encrypted seed, the hot account, the journal, the vault list, the connected sites and the settings. It then locks.

  • Your vaults are not affected on chain. To use them again you need the 24 words, and for built-in vaults the hot account's key, which reset deletes.
  • The journal is gone too. If a key had signed an intent that never landed, a new install will not know. See Recovery and safety.

Permissions and data

PermissionWhy
storageThe encrypted keystore, the journal, settings, the vault list, connected sites.
alarmsThe auto-lock check.
Host access to the RPC hosts aboveReading the chain and sending transactions. Other hosts only when you add a custom RPC.
api.coingecko.comThe SOL price, only when the display currency is USD.
Content script on all sitesMakes the wallet visible to dApps. It relays messages and never holds keys.

Extension pages run under the content security policy script-src 'self'; object-src 'self'; base-uri 'none'; frame-ancestors 'none'. Keys are used only in the background service worker; the page and the content script never receive them.

Connect a wallet

Your wallet signs as the owner (Key A). Lean Key adds the post-quantum key (Key B).

Wallets

Any wallet that supports the Solana Wallet Standard appears under Installed. Lean Key never asks for your seed phrase on this site.