Skip to content
Upgrading from 1.x? See the 2.0 migration guide.

​Installation

Install the umbrella package or individual signers as needed:
Requires @solana/kit 8.1 or later. v1 transactions (createTransactionMessage({ version: 1 })) are supported, except by Fireblocks with useProgramCall: true, which accepts legacy and v0 only.

​Basic Usage

Use createKeychainSigner with a discriminated config to create any backend:
Or install an individual signer package for a smaller dependency footprint:

​Using with Transaction Messages

Every backend except Crossmint and Fordefi native mode returns a SolanaTransactionSigner, which is a Kit TransactionPartialSigner and works with the @solana/signers partial-signer helpers below. Managed-broadcast backends are covered in Signer Capabilities.

​Sign and Send with Any Signer

signAndSendTransaction from @solana/keychain-core gets a transaction on chain whatever the signer’s shape. Sending signers broadcast through their provider; every other shape uses the sendTransaction you pass in (core has no RPC dependency):

​Using with a Kit Client (keychainSigner plugin)

@solana/keychain-kit-plugin installs a keychain signer directly on a Kit client, wiring it up as the payer and identity so you skip the manual pipe setup shown above:
The plugin accepts the same backend-tagged config as createKeychainSigner, except Crossmint and Fordefi native mode (chain set). Those backends rewrite the transaction server-side, so they cannot act as a client payer or identity; the plugin rejects them at compile time and at runtime. Only the backend it dispatches to is bundled (backend packages load via dynamic import()). Use keychainPayer or keychainIdentity to set just one role, and mix backends on a single client:
Already have a SolanaTransactionSigner? It is a valid Kit TransactionPartialSigner, so you can install it with @solana/kit-plugin-signer instead (npm install @solana/kit-plugin-signer):

​Cancellation and Unconfirmed Broadcasts

signTransactions, modifyAndSignTransactions, signAndSendTransactions, and signMessages all accept { abortSignal } as their second argument. Aborting stops waiting; it does not undo work a provider already accepted. On Crossmint and Fordefi native auto mode, a failure does not mean nothing landed. When the provider may have accepted the transaction, the error code is SignerErrorCode.BROADCAST_UNCONFIRMED ("SIGNER_BROADCAST_UNCONFIRMED"). context.providerTransactionId is set when the create was accepted, and context.idempotencyKey carries the key derived from the message. Resending the byte-identical transaction is safe; a rebuilt one (for example with a new blockhash) is a new transfer. providerMayHaveAccepted(error) and providerStatus(error) from @solana/keychain-core help classify the error. Reconcile with the provider before retrying.

​Backend Configuration

​Memory

Provide exactly one of keyPair, privateKey, privateKeyString, or privateKeyPath:

​HashiCorp Vault

vaultAddr must use HTTPS: a plain-HTTP address throws SIGNER_CONFIG_ERROR, even on loopback, so a local vault server -dev doesn’t work. For local development, run vault server -dev-tls instead. It serves HTTPS on 127.0.0.1:8200 with a self-signed certificate and prints the CA file path as VAULT_CACERT. Set vaultAddr to https://127.0.0.1:8200 and start Node with that CA trusted:

​AWS KMS

​GCP KMS

​Privy

​Turnkey

​Fireblocks

​CDP (Coinbase Developer Platform)

​Crossmint

Crossmint is sending-only. Its API always executes an approved transaction server-side and sponsors gas, so the signer exposes only signAndSendTransactions(): it has no signTransactions() or signMessages(), and it cannot be installed with @solana/keychain-kit-plugin. The returned signature identifies the transaction Crossmint landed.

​Dfns

​Openfort

​Para

​Utila

Utila signs transactions only; it has no signMessages().

​Fordefi

Fordefi has three signing modes, fixed at construction by chain and pushMode. Each mode exposes exactly one transaction method, and all three sign messages:
ModeConfigTypeMethod
Black boxchain unsetFordefiBlackBoxSignersignTransactions()
Native autochain set, pushMode omitted or "auto"FordefiNativeSignersignAndSendTransactions()
Native manualchain set, pushMode: "manual"FordefiNativeManualSignermodifyAndSignTransactions()
API requests are authenticated with an ECDSA P-256 request signature: supply the signing key as privateKeyPem, or keep it in a KMS/HSM by passing a requestSigner. Native auto mode (recommended for onchain use): set chain, and Fordefi signs and broadcasts the transaction itself. Because Fordefi may replace the blockhash or fees before signing, the signer is a Kit TransactionSendingSigner: use it with signAndSendTransactionMessageWithSigners, not the partial-signer flow shown above. Native auto mode accepts only an unsigned transaction whose sole required signer is the vault, and it cannot be used with @solana/keychain-kit-plugin.
Native manual mode: set chain and pushMode: "manual". Fordefi rewrites the message (recent blockhash, Compute Budget fee instructions) and signs it, but does not broadcast. modifyAndSignTransactions() returns the transaction Fordefi signed, which replaces the one you submitted: always continue from the returned transaction. Fordefi must be the fee payer and must sign before any other required signer. The rewrite is not diffed, so inspect the result before broadcasting.
Black box mode: omit chain. Fordefi signs raw bytes and does not broadcast; you assemble and submit the transaction yourself. Use this with a Fordefi black box vault.

​Signer Capabilities

@solana/keychain-core defines one interface per Kit signer shape. Each adds isAvailable(): Promise<boolean> to the matching @solana/signers interface:
  • SolanaTransactionSigner (Kit TransactionPartialSigner): returns signatures for a transaction you own.
  • SolanaModifyingSigner (Kit TransactionModifyingSigner): rewrites the transaction, signs it, and returns the new transaction without broadcasting.
  • SolanaSendingSigner (Kit TransactionSendingSigner): signs and broadcasts through its provider.
  • SolanaMessageSigner (Kit MessagePartialSigner): signs offchain messages. This is separate from the transaction shapes.
SolanaSigner is the union of the three transaction shapes. Each factory’s return type names its backend’s exact shape. When the config is only known at runtime, narrow with isSolanaTransactionSigner, isSolanaModifyingSigner, isSolanaSendingSigner, or isSolanaMessageSigner. signerCapabilities(signer) reports all four at once.
BackendShape
memory, vault, aws-kms, gcp-kms, privy, turnkey, fireblocks, cdp, dfns, para, openfort, fordefi (black box)SolanaTransactionSigner & SolanaMessageSigner
utilaSolanaTransactionSigner (no message signing)
fordefi (native manual)SolanaModifyingSigner & SolanaMessageSigner
fordefi (native auto)SolanaSendingSigner & SolanaMessageSigner
crossmintSolanaSendingSigner (no message signing)

​Building Custom Signers

Implement the capability interfaces your backend supports:
Implement only what your backend supports. Kit classifies signers by which methods exist, so never add a method that just throws. See the Adding Signers guide to integrate additional key management services.