Solana Keychain provides a unified interface for signing Solana transactions across multiple key management backends. Develop locally with an in-memory key, then switch to enterprise key management, cloud HSMs, or managed wallet services in production — without rewriting your signing code.
Why Keychain?
- Single Interface: One
SolanaSignertrait works across all backends - Swap Backends: Change key management providers through configuration, not code
- Zero-Cost Abstraction: Feature flags include only what you need
- Audited: Security-reviewed by Accretion
Architecture
- Languages: Rust + TypeScript, at full parity
- Trait: Unified
SolanaSignerinterface - Backends: Memory, Vault, AWS KMS, GCP KMS, Privy, Turnkey, Fireblocks, CDP, Crossmint, Dfns, Openfort, Para, Utila
- Compatibility:
@solana/kitand@solana/signerscompatible (TypeScript) |solana-sdkandsolana-sdk-v3compatible (Rust)
Supported Backends
Backends span local development, self-hosted and cloud key management, and managed or MPC wallet services. See Choosing a backend to compare custody models and pick the right one.
| Backend | Use Case | Rust | TypeScript |
|---|---|---|---|
| Memory | Development, testing | ✓ | ✓ |
| HashiCorp Vault | Self-hosted key management | ✓ | ✓ |
| AWS KMS | Cloud-native (AWS) | ✓ | ✓ |
| GCP KMS | Cloud-native (GCP) | ✓ | ✓ |
| Privy | Embedded wallets | ✓ | ✓ |
| Turnkey | Non-custodial key management | ✓ | ✓ |
| Fireblocks | Institutional custody | ✓ | ✓ |
| CDP | Coinbase Developer Platform | ✓ | ✓ |
| Crossmint | Crossmint managed wallets | ✓ | ✓ |
| Dfns | Dfns wallet infrastructure | ✓ | ✓ |
| Openfort | Openfort backend wallets | ✓ | ✓ |
| Para | Para MPC wallets | ✓ | ✓ |
| Utila | Utila MPC custody | ✓ | ✓ |
Quick Start
Rust
Install the Rust crate:
cargo add solana-keychain
Basic usage:
use solana_keychain::{Signer, SolanaSigner};// Create a signer from any backendlet signer = Signer::from_memory("base58_private_key")?;// All signers share the same interfacelet pubkey = signer.pubkey();let signature = signer.sign_transaction(&mut tx).await?;
- Rust Guide - Full installation and backend configuration
- Crates.io - Rust crate
TypeScript
Install the TypeScript package:
pnpm add @solana/keychain
Basic usage:
import { createKeychainSigner } from "@solana/keychain";import { signTransactionWithSigners } from "@solana/signers";// Create any signer via the unified factoryconst signer = await createKeychainSigner({backend: "vault",vaultAddr: "https://vault.example.com:8200",vaultToken: "hvs.xxxxx",keyName: "my-solana-key",publicKey: "base58_public_key"});// Sign an already-compiled transactionconst signedTx = await signTransactionWithSigners([signer],compiledTransaction);
- TypeScript Guide -
@solana/keychainpackages - npm Package - npm package
Next steps
Rust guide
Install the crate and configure each backend.
TypeScript guide
Install the packages and configure each backend.
Choosing a backend
Compare custody models and pick the right signing backend.
Production best practices
Operate signing safely: hot/cold separation, rotation, monitoring.
Adding custom signers
Integrate a new key management backend.
Source
Built and maintained by the Solana Foundation. Licensed under MIT.
Is this page helpful?