English | 简体中文
⚠️ Disclaimer: This software is provided "as is", without warranty of any kind, and has not been audited by a third party. You are solely responsible for your keys and funds — start with small amounts. Please report security issues privately as described in SECURITY.md, not as public issues.
Install it on a phone that never goes online (e.g. a Pixel running GrapheneOS). Solflare on your online phone treats it as a Keystone hardware wallet; the two phones talk only through QR codes.
Online phone (Solflare) Offline phone (ColdSol)
│ ① scan pairing code ◄────────────── shows crypto-multi-accounts (public keys only)
│ ② start a transaction, shows
│ sol-sign-request ───────────────► scan → parse → you review every item
│ → fingerprint / screen-lock PIN → sign
│ ③ scan sol-signature ◄───────────── shows signature QR
│ ④ broadcast
- Download
coldsol-<version>.apkfrom GitHub Releases and verify it on your computer (see "Verifying the APK" below). Copy it to the offline phone over USB (file-transfer mode), open it in the Files app and install. You can also build it yourself (see "Building from source"). - After installing, you can confirm in GrapheneOS's app info that the app has no Network permission (the manifest never requests
INTERNET). - The offline phone must have a screen-lock PIN/password, otherwise wallets cannot be saved.
⚠️ Never disable the screen lock or set it to "None" afterwards: Android immediately and permanently invalidates every Keystore key that requires authentication, so the encrypted seed can no longer be decrypted and you will have to re-import your mnemonic. Changing the PIN/password itself (while keeping a lock) is fine.
Every release lists the APK's SHA-256 and the signing certificate fingerprint. Check both before installing:
sha256sum coldsol-<version>.apk
apksigner verify --print-certs coldsol-<version>.apk # apksigner ships with Android SDK build-toolsThe Signer #1 certificate SHA-256 digest line printed by apksigner must be:
26dd3d080030c830e907ae9e2a96574cd3dadd40dc980e2e68fbe65a51859061
Every release is signed with this same certificate. Do not install an APK with a different fingerprint: only an APK signed with the same certificate can upgrade the app, and only such an APK can access the wallet data already on the phone.
- Import an existing mnemonic (12/24 words, optional BIP39 passphrase), or generate a new 24-word mnemonic (you must write it down; 3 words are then spot-checked).
- Choose a derivation path:
m/44'/501'/n'/0': default for Phantom / Solflare / Backpack (recommended)m/44'/501'/n': older Solflare and othersm/44'/501': single address
- The address of account 1 is shown. Compare it with the address in your existing wallet and only save if they match.
- Saving requires your fingerprint or screen-lock PIN. The seed is encrypted with an AES-256 key held in the secure element (StrongBox / Titan M2 on Pixel).
The UI follows AirGap Vault: three tabs at the bottom — Wallets / Scan / Settings. Tap a wallet to see its accounts; tap an account to show its receive-address QR (the online phone can scan it to cross-check the address). A wallet's name, derivation path, unlock method and deletion live behind the gear icon on the wallet page.
The + on the Wallets tab imports or generates additional mnemonics (including different BIP39 passphrases). Each wallet has its own name, derivation path, PIN setting and encryption key. The same mnemonic + passphrase cannot be imported twice.
You never need to switch wallets to sign: Solflare's request carries the master fingerprint and ColdSol routes it to the right wallet, or tells you clearly when no wallet on this phone matches.
When upgrading from 0.1.0, the existing wallet automatically becomes "Wallet 1" with its encrypted data untouched.
- Solflare → Add wallet → Connect hardware wallet → Keystone.
- ColdSol Wallets tab → tap the wallet → "Sync to Solflare", and let Solflare scan the animated QR code.
- Select the accounts you want in Solflare (10 per wallet). Connect each wallet separately; Solflare shows them as different Keystone devices.
- Start a transfer in Solflare; it displays an animated QR code.
- Open ColdSol's Scan tab.
- Review: the top of the page shows "send how much → to whom" in large type, and whether the recipient was verified offline (✓). Per-instruction details follow. Red cards mean high risk (unknown program, Approve, SetAuthority, Assign, unconfirmable recipient, …) and need an extra confirmation checkbox before you can sign.
- Addresses are shown in groups of 4 with the first and last groups highlighted. Check the whole address, not just the start and end — that habit is exactly what address-poisoning attacks exploit.
- Recipient history: for every recipient wallet whose address is known exactly, the card says "never signed a transfer to this address" or "signed N transfers before". A first-time recipient whose first and last 3 characters match one of your accounts or a previous recipient but which is different is flagged red as likely address poisoning and needs the explicit acknowledgement before signing. The history (addresses and counts only) can be cleared in Settings.
- SPL tokens are sent to the recipient's token account, not their wallet address. If the transaction itself proves who owns that token account (e.g. it contains an instruction creating it), or the address book already has a record, the recipient's wallet address is shown with ✓. Otherwise enter the recipient's wallet address in the card to check it; after signing it is saved to the address book so you won't need to enter it again next time.
- Tap "Authenticate and sign" → PIN (or fingerprint) → scan the signature QR with Solflare → broadcast. The screen goes to full brightness while the QR is shown; if it won't scan, tap the QR to slow the animation down.
The review page is compact: one screen shows "send how much → to whom", the recipient check status and every risk warning, with Reject / Sign pinned to the bottom. Per-instruction details are under "Show all details" (expanded automatically when there is a red item).
Typing a long password eats most of that window. You can unlock first and then start the transaction, moving password entry before the clock starts:
- ColdSol Scan tab → Pre-unlock (pick the wallet if you have several) → enter the password.
- Start the transfer in Solflare, scan, review, tap "Sign (pre-unlocked)" — the signature QR appears immediately.
The unlocked seed lives only in memory and is wiped as soon as any of these happens: one transaction is signed, 3 minutes pass, you tap "Lock", the screen turns off, or you leave the app. The screen stays on while unlocked. Risk-confirmation rules are unchanged.
Solflare's native staking (staking SOL with a chosen validator) is parsed instruction by instruction:
| Operation | Display |
|---|---|
| Create stake account (including with-seed) + initialize | Summary shows "send N SOL → your new stake account ✓" and verifies offline that the withdraw authority belongs to this wallet; red if it belongs to someone else |
| Delegate | Shows the validator vote account — check it against the validator chosen in Solflare |
| Deactivate / Split / Merge / Move stake | Shown normally; a split's new account is recognized as inheriting the original account's authorities. Red when more than rent (0.003 SOL) is deposited into a split destination |
| Withdraw | Shows amount and recipient; yellow if the recipient is not an account of this wallet |
| Authorize | When the new authority is not this wallet: red for withdraw authority, yellow for stake authority |
| Lockup | Initialization shows the lockup expiry and custodian; red if the custodian is not this wallet |
| SetLockup | Decodes the new expiry, epoch and custodian; red if the custodian changes to someone else, or the lockup is extended while the custodian is not this wallet |
StakeTest uses real transactions generated by @solana/web3.js's StakeProgram (tools/interop/stake_fixtures.js).
| Measure | Details |
|---|---|
| No network permission | The manifest does not request INTERNET; the OS makes any network connection impossible |
| Seed encryption | AES-256-GCM with a non-exportable key in Android Keystore (StrongBox preferred) |
| Authentication on every use | Keys require authentication on every use (timeout = 0); every signature needs a PIN/biometric |
| PIN-only mode (default) | Can be set to accept only the screen-lock PIN and not fingerprints, so nobody can force your finger onto the sensor. Switching re-encrypts with a new key (two slots, so cancelling midway never loses the seed) |
| Offline recipient verification | Derives ATAs (PDAs) offline to prove a token account belongs to the displayed wallet; detects decoy transactions that "create an ATA for A but actually pay B"; red when the recipient is in a lookup table |
| Deletion requires authentication | Deleting a wallet requires authentication |
| Cached public keys | Before every signature the fingerprint and account public keys shown and used for the review are re-derived from the seed; on a mismatch the cache is rebuilt and the request refused |
| Address book | Only stores "token account → wallet" mappings proven by PDA derivation, re-derived before every use, so tampered entries are never treated as verified. Can be cleared in Settings |
| Dependency verification | gradle/verification-metadata.xml pins the SHA-256 of every dependency and the Gradle wrapper distribution hash is pinned; core libraries were checked against Maven Central's published checksums |
| Mnemonic never stored | Only the encrypted 64-byte seed is stored; the mnemonic itself never touches disk |
| Screenshot protection | Global FLAG_SECURE: no screenshots, no screen recording, no thumbnail in Recents |
| No backups | allowBackup=false; cloud-backup and device-transfer rules exclude all data |
| Pre-signing checks | Master fingerprint must match; path must be a synced account; this account must be a signer of the transaction; transactions are parsed strictly (trailing bytes are rejected); anything that cannot be parsed as a transaction is refused — no blind signing |
| Keyboard | The mnemonic field uses a password-type keyboard with suggestions and learning disabled |
- SPL token transfers: if the transaction does not create the ATA and the recipient is not an account of this wallet, the offline side cannot know the recipient's wallet automatically; you must enter the recipient's address manually to check it (a yellow warning is shown). The legacy
Transferinstruction does not include the mint, so this check is not possible for it. - In v0 transactions that use address lookup tables (ALTs), some accounts cannot be resolved offline and are labeled "lookup table #n"; a recipient inside a lookup table is shown red.
- The mnemonic and BIP39 passphrase exist in memory as strings while being typed and cannot be actively wiped (they wait for garbage collection). Seed byte arrays and private keys are zeroed immediately after use.
- Built-in token names are limited to USDC, USDT, wSOL, PYUSD, JUP and BONK; other tokens show their mint address — check it yourself.
- Native staking (Stake program) is fully parsed; see "Staking" above. Liquid staking (Marinade, Jito, Sanctum, …) and swaps are not specifically parsed: they can be signed but show up as "unknown program call" (red, high risk).
- The full flow has been tested on an Android 15 emulator (see "Emulator tests"), but real camera scanning and the StrongBox chip can only be verified on real hardware. Test with a small amount first.
0.2.1 fixed the issues found in a self-review; each has a regression test (AuditFixesTest):
| # | Issue | Fix |
|---|---|---|
| 1 | Transaction formats unknown to the parser (e.g. v1) could be disguised as a "message" for the user to sign | Refuse to sign "message" data that contains this account's public key (except the standard off-chain message format) |
| 2 | Priority-fee unit price above 2^63 overflowed to a negative number, understating the fee | Computed as unsigned big integers throughout |
| 3 | Create Account (which sends SOL) was merely informational; unparsed System and Token instructions were only yellow | Create Account goes into the "send" summary and is yellow; all other unparsed instructions are red |
| 4 | Seed file writes were not fsync'd; a power loss could leave the wallet unopenable | fsync the new file, rename, fsync the directory, and only then delete the old key |
| 5 | Durable-nonce transactions never expire once signed, with no warning | Explicit warning shown |
| 6 | Unicode bidi control and zero-width characters in memos, origins and messages could spoof displayed content | Escaped on display; messages containing them are shown only as hex |
Regression tests in AuditRound2Test:
| # | Issue | Fix |
|---|---|---|
| 1 | Allocate on your own wallet account was only informational, but it permanently locks the SOL in that account |
Red when the target is an account of this wallet |
| 2 | Closing a wSOL token account sends all its SOL to the destination; it was only yellow and the description was inaccurate | Red and included in the "send" summary when the destination is not this wallet; no warning when refunding to yourself |
| 3 | Initializing a nonce account with someone else as authority lets them withdraw its SOL | Yellow warning |
| 4 | The address book remembered every token account created in a transaction, so the online side could make a stranger's wallet show ✓ later | Only the recipient account actually paid is remembered |
| 5 | Path indices above 32 bits in the QR were truncated | Rejected |
| 6 | Other apps could draw overlays on the review page to trick you into tapping "Sign" | Overlays are blocked (Android 12+) |
| 7 | Non-create ATA program instructions (RecoverNested) were labeled "create token account" | Treated as unparsed and shown red |
| 8 | Risk acknowledgements and manual recipient checks on the review page were not bound to a specific request | Isolated per request |
Regression tests in AuditRound3Test:
| # | Issue | Fix |
|---|---|---|
| 1 | When the recipient token account's owner could not be proven, it was only yellow and could be signed without checking — exactly how a compromised online side swaps the recipient | You must either enter the recipient's wallet address and have it match, or tick "confirmed by other means", before signing; SOL sent to new accounts of unknown ownership is handled the same way |
| 2 | Plain SOL transfers also showed "✓ verified offline", which only meant the address was unambiguous, not that the recipient was correct | Recipient status is now: own account ✓ / ownership proven offline ✓ / address unambiguous (check every character) / cannot be determined |
| 3 | An out-of-range lockup timestamp made the whole request fail to parse | Any parse error in one instruction only marks that instruction red; out-of-range timestamps are shown raw |
| 4 | A stake lockup whose custodian is someone else was only yellow (funds frozen until expiry) | Red |
| 5 | A split's new stake account showed "verified", but the withdraw authority it inherits is not visible offline | Changed to "address unambiguous" with a note to confirm the source stake account is yours |
| 6 | A power loss while switching unlock methods, before settings were written, left the UI out of sync with the actual key | On startup, the key's real authentication type is read from Keystore and corrected |
| 7 | While generating a mnemonic, toggling dark mode / font size recreated the page and produced a new mnemonic | These configuration changes no longer recreate the Activity |
| 8 | Initialize token account (InitializeAccount2/3) did not show the owner | Shown |
Other improvements: Keystore key generation/reads moved off the main thread; scanner analysis resolution raised to 720p; wallet list cached so it isn't re-parsed on every recomposition.
Regression tests in AuditRound4Test:
| # | Issue | Fix |
|---|---|---|
| 1 | An attacker could create a stake account with "stake authority = you, withdraw authority = attacker" and get you to deposit a large amount of SOL into its split destination: the new account inherits the attacker's withdraw authority and the funds are taken. It used to be green with no confirmation | Depositing more than 0.003 SOL into a split destination via create-account or transfer is red, with the recipient shown as unconfirmable |
| 2 | SetLockup was shown only as hex and yellow: it can lock an existing stake account until year 9999 with the attacker as custodian, for ransom |
Decodes expiry, epoch and custodian; red if the custodian changes to someone else, or the lockup is extended while the custodian is not this wallet |
| 3 | Yellow instructions without a description (e.g. Burn) were invisible on the compact review page: instruction titles aren't listed when the transaction has a transfer, and details are collapsed by default | Every yellow and red instruction now appears in the risk warnings; every non-green instruction has a description |
| 4 | Burn was only yellow and not in the summary | Red, shown in the summary as "send N → burn (gone forever)"; BurnChecked amounts use the mint's decimals |
| 5 | Handing a nonce account's authority to someone else was only yellow | Red when the new authority is not this wallet |
| 6 | When deleting a wallet, any key-read error (including transient ones) skipped authentication | Authentication is skipped only when the seed file or key genuinely does not exist, or the key was invalidated by the system |
| 7 | Master fingerprints above 32 bits in a request were truncated instead of rejected | Rejected |
| 8 | Addresses in a request that were not 32-byte public keys were ignored | Base58 strings are also accepted, and must match the signing account or the request is rejected |
| 9 | The "is on curve" check used when deriving PDAs differed from Solana's (small-order points) and could in theory derive a wrong address (probability ~2⁻²⁵⁰) | Implemented per Solana's (curve25519-dalek) rules |
0.5.2: transactions that freeze assets (a lockup with someone else as custodian, Allocate on your own wallet account) are flagged in red as "freezes assets" in the summary instead of "no assets sent"; highlighted values in the details use the card's risk color.
Process note: keep the release.jks signing key off networked machines. Anyone who obtains it can sign an "upgrade" that installs over ColdSol and inherits access to the wallet data. Keep release.jks and keystore.properties on an offline encrypted drive, plug it in only to build, and verify the APK's SHA-256 before every upgrade.
Requires JDK 17 and the Android SDK (platform 35, build-tools 35).
./gradlew testDebugUnitTest # unit tests
./gradlew assembleRelease # needs keystore.properties + release.jksWithout keystore.properties, assembleRelease produces an unsigned APK; sign it with your own key (it will then be a different app identity from the official releases and cannot upgrade them).
The signing key is release.jks / keystore.properties (both in .gitignore). Back them up: future upgrades must be signed with the same key, otherwise users have to uninstall and reinstall (which deletes the encrypted seed and requires re-importing the mnemonic).
- Recipient verification: ATA derivation matches web3.js, decoy ATAs, forged ATAs, transfers to your own accounts, manual checks, recipients in lookup tables
- Official BIP39 test vectors, SLIP-0010 ed25519 vectors, RFC 8032 ed25519 signature vectors
- Solana addresses cross-checked against an independent Python implementation (
abandon … about→HAgk14JpMQLgt6rVgv7cBQFJWFto5Dqxi472uT3DKpqk) - Master fingerprint
73c5da0a(matches the public BIP32 vector) - Signing flow: animated UR round trip, SOL transfer, USDC TransferChecked, unknown programs, various refusal cases, message signing
tools/interop/interop.js loads @keystonehq/sol-keyring (used by Solflare) together with @keystonehq/bc-ur-registry(-sol), @ngraveio/bc-ur and @solana/web3.js, and runs the full flow: sol-keyring syncs accounts → web3.js builds legacy and v0 transactions → sol-keyring creates sign requests → ColdSol (InteropTest) signs → sol-keyring checks the requestId → signatures are verified.
node tools/interop/interop.js <node_modules dir> <sol-keyring/dist/sol-keyring.cjs.development.js> <exchange dir> <this project dir>Scripts in tools/emulator/ drive the debug build on an Android 15 emulator (the debug build does not set FLAG_SECURE and accepts QR content injected via am start --esa ur_parts … instead of the camera). Verified:
- Importing a mnemonic (including autocomplete while typing), generating 24 words with spot-check, PIN-protected encrypted save, home-screen address
- Decoding the animated pairing code from screenshots →
sol-keyringsyncs the master fingerprint and 10 accounts - Injecting SOL / USDC / decoy sign requests generated by sol-keyring → review page, manual recipient check (match / mismatch), risk-acknowledgement gating, PIN signing → decoding the signature QR from a screenshot → valid ed25519 signature
- Switching between "PIN only / allow fingerprint" (seed re-encrypted into the other slot still signs), wallet deletion requires authentication
Formats are taken from the Keystone 3 firmware source (GuiGetSolflareData, generate_crypto_multi_accounts_sync_ur, solana_sign_tx) and @keystonehq/bc-ur-registry-sol:
crypto-multi-accounts(tag 1103):{1: master fingerprint u32, 2: [crypto-hdkey…], 3: "keystone 3"}crypto-hdkey(tag 303):{2: false, 3: ed25519 public key (32 bytes), 6: crypto-keypath, 9: "SOL-n"}sol-sign-request:{1: uuid (tag 37), 2: sign data, 3: crypto-keypath (tag 304), 4?: address, 5?: origin, 6: 1=transaction 2=message}sol-signature:{1: uuid (tag 37), 2: 64-byte signature}- The sign data is the serialized Solana message, signed directly with ed25519
GNU General Public License v3.0. You may use, modify and redistribute it freely; modified versions you distribute must be released under the same license with source code.
This project is not affiliated with the Solana Foundation, Solflare or Keystone. Their names are used only to describe compatibility.