---
title: Keychain
description: Unified Solana signing across multiple key management backends
---

**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 `SolanaSigner` trait 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](https://accretion.xyz)

### Architecture

- **Languages**: Rust + TypeScript, at full parity
- **Trait**: Unified `SolanaSigner` interface
- **Backends**: Memory, Vault, AWS KMS, GCP KMS, Privy, Turnkey, Fireblocks,
  CDP, Crossmint, Dfns, Openfort, Para, Utila, Fordefi
- **Compatibility**: `@solana/kit` and `@solana/signers` compatible (TypeScript)
  | `solana-sdk` and `solana-sdk-v3` compatible (Rust)

### Supported Backends

Backends span local development, self-hosted and cloud key management, and
managed or MPC wallet services. See
[Choosing a backend](/docs/tools/keychain/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            | ✓    | ✓          |
| Fordefi         | Fordefi MPC custody          | ✓    | ✓          |

## Quick Start

### Rust

Install the Rust crate:

```bash
cargo add solana-keychain
```

Basic usage:

```rust
use solana_keychain::{Signer, SolanaSigner};

// Create a signer from any backend
let signer = Signer::from_memory("base58_private_key")?;

// All signers share the same interface
let pubkey = signer.pubkey();
let signature = signer.sign_transaction(&mut tx).await?;
```

- [Rust Guide](/docs/tools/keychain/getting-started/rust) - Full installation
  and backend configuration
- [Crates.io](https://crates.io/crates/solana-keychain) - Rust crate

### TypeScript

Install the TypeScript package:

```bash
pnpm add @solana/keychain
```

Basic usage:

```typescript
import { createKeychainSigner } from "@solana/keychain";
import { signTransactionWithSigners } from "@solana/signers";

// Create any signer via the unified factory
const 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 transaction
const signedTx = await signTransactionWithSigners(
  [signer],
  compiledTransaction
);
```

- [TypeScript Guide](/docs/tools/keychain/getting-started/typescript) -
  `@solana/keychain` packages
- [npm Package](https://www.npmjs.com/package/@solana/keychain) - npm package

## Next steps

<Cards>
  <Card title="Rust guide" href="/docs/tools/keychain/getting-started/rust">
    Install the crate and configure each backend.
  </Card>
  <Card
    title="TypeScript guide"
    href="/docs/tools/keychain/getting-started/typescript"
  >
    Install the packages and configure each backend.
  </Card>
  <Card
    title="Choosing a backend"
    href="/docs/tools/keychain/choosing-a-backend"
  >
    Compare custody models and pick the right signing backend.
  </Card>
  <Card
    title="Production best practices"
    href="/docs/tools/keychain/production-best-practices"
  >
    Operate signing safely: hot/cold separation, rotation, monitoring.
  </Card>
  <Card
    title="Adding custom signers"
    href="/docs/tools/keychain/adding-signers"
  >
    Integrate a new key management backend.
  </Card>
</Cards>

## Source

- [GitHub Repository](https://github.com/solana-foundation/solana-keychain)
- [Release history](https://github.com/solana-foundation/solana-keychain/releases)

Built and maintained by the [Solana Foundation](https://solana.org). Licensed
under MIT.
