solana-keychain
Flexible, framework-agnostic Solana transaction signing for Rust applications
⚠️ SECURITY NOTICE: This library has not been audited. Use at your own risk. Not recommended for production use with real funds without a thorough security review. The authors and contributors are not responsible for any loss of funds or damages resulting from the use of this library.
solana-keychain provides a unified interface for signing Solana transactions with multiple backend implementations. Whether you need local keypairs for development, enterprise vault integration, or managed wallet services, this library offers a consistent API across all signing methods.
Features
- Unified Interface: Single
SolanaSignertrait for all backends - Async-First: Built with
async/awaitfor modern Rust applications - Modular: Feature flags for zero-cost backend selection
- Type-Safe: Compile-time guarantees and error handling
- Minimal Dependencies: Only include what you use
Supported Backends
| Backend | Use Case | Feature Flag |
|---|---|---|
| Memory | Local keypairs, development, testing | memory (default) |
| Vault | Enterprise key management with HashiCorp Vault | vault |
| Privy | Embedded wallets with Privy infrastructure | privy |
| Turnkey | Non-custodial key management via Turnkey | turnkey |
Installation
[]
# Basic usage (memory signer only)
= "0.1"
# With Vault support
= { = "0.1", = ["vault"] }
# All backends
= { = "0.1", = ["all"] }
Quick Start
Memory Signer (Local Development)
use ;
async
Core API
All signers implement the SolanaSigner trait:
Contributing
Local Development
Adding a New Signer Backend
Interested in adding a new signer backend? Check out our guide for adding new signers.