Installation
Every backend is its own Go module, so your build and your module graph contain only the backends you import:go/<module>/v2.0.0 (for example
go/signers/memory/v2.0.0). Every module requires Go 1.25.0, except gcpkms,
which requires Go 1.25.8 because of the floor set by google.golang.org/api.
Ledger is Rust-only and has no Go module.
solana-go v2 and v1 Transactions
The modules are built ongithub.com/solana-foundation/solana-go/v2
v2.0.0 and take its *solana.Transaction. Legacy, v0, and v1
(solana.MessageVersionV1) transactions are supported, except by Fireblocks
with UseProgramCall: true, which accepts legacy and v0 only.
Basic Usage
Every signer implements the basecore.SolanaSigner interface
(Pubkey, SignMessage, IsAvailable). Methods take a context.Context and
block. Each backend also implements exactly one capability interface:
core.TransactionSigner:SignTransactionsigns your transaction as given.core.ModifyingSigner:ModifyAndSignTransactionlets the provider rewrite the transaction, then signs it.core.SendingSigner:SignAndSendTransactionhas the provider sign and broadcast it.
Config struct and a New constructor:
SignTransaction and ModifyAndSignTransaction return a
core.SignedTransaction (EncodedTransaction, Signature, Completeness).
Remote HTTP backends accept an optional HTTPClient and HTTPClientConfig
(timeouts). The default client enforces HTTPS; supplying your own bypasses that,
and you own its security posture.
Signer Capabilities
A backend that cannot sign a transaction carries noSignTransaction method at
all, so capability is a compile-time fact for concrete types and a type
assertion for a core.SolanaSigner:
| Backend | Capability | SignMessage |
|---|---|---|
| memory, vault, privy, turnkey, awskms, gcpkms, fireblocks, dfns, para, openfort | TransactionSigner | Yes |
| cdp | TransactionSigner | UTF-8 payloads only |
| utila | TransactionSigner | Fails with CodeSigningFailed |
fordefi black box (fordefi.BlackBoxSigner) | TransactionSigner | Yes |
fordefi native manual (fordefi.NativeManualSigner) | ModifyingSigner | Yes |
fordefi native auto (fordefi.NativeAutoSigner) | SendingSigner | Yes |
| crossmint | SendingSigner | Fails with CodeSigningFailed |
Initialization
There is no separateInit step. Privy, Fireblocks, Dfns, Crossmint, Para,
Openfort, and Utila resolve the wallet address inside New, which is why their
constructors take a context.Context. Always build signers through New: a
zero-value Crossmint, Para, or Utila signer fails with CodeNotInitialized
rather than signing for the zero address.
Sign and Send with Any Signer
core.SignAndSendTransaction gets a transaction onchain whatever the signer’s
shape. A SendingSigner broadcasts through its provider and ignores the send
function; every other shape signs and your function broadcasts the base64
result, which for a ModifyingSigner is the transaction its provider rewrote.
Core has no RPC dependency:
Batch Signing
Batch signing is provided as free helpers, concurrent with an optional per-request stagger for rate-limited APIs:core.SignTransactions takes a core.TransactionSigner, so the
broadcast-managed signers (Crossmint, Fordefi native auto) and Fordefi native
manual cannot be batched through it; call them one transaction at a time. A
signer whose calls create provider-side work (Fireblocks with UseProgramCall)
reports it through core.BatchServerSideEffects, and the batch then runs
sequentially.
Backend Configuration
Memory
Provide exactly one ofPrivateKey (raw bytes), PrivateKeyString (base58 or a
[1,2,...] byte array) or PrivateKeyPath (Solana CLI keypair file):
HashiCorp Vault
vault server -dev fails with a configuration error. For local development
only, pass your own HTTPClient. A client you supply skips the HTTPS check and
the redirect policy, so refuse redirects yourself:
AWS KMS
GCP KMS
Privy
Turnkey
Fireblocks
CDP (Coinbase Developer Platform)
SignMessage accepts UTF-8 payloads only.
Crossmint
Crossmint is sending-only: its API executes every approved transaction server-side, so*crossmint.Signer has SignAndSendTransaction and no
SignTransaction. Your transaction is never modified; the returned signature
identifies the transaction Crossmint landed, which may differ from yours if
Crossmint sponsors gas.
Dfns
Openfort
Para
Utila
Utila signs transactions only;SignMessage fails, and you broadcast the signed
transaction yourself.
Fordefi
Fordefi comes as three signer types, fixed at construction byConfig.Chain and
Config.PushMode. All three sign messages:
| Config | Type | Entry point |
|---|---|---|
Chain unset | *fordefi.BlackBoxSigner | SignTransaction |
Chain set, PushMode unset or PushModeAuto | *fordefi.NativeAutoSigner | SignAndSendTransaction |
Chain set, PushMode: PushModeManual | *fordefi.NativeManualSigner | ModifyAndSignTransaction |
fordefi.New dispatches on the config and returns a core.SolanaSigner;
fordefi.NewBlackBox, fordefi.NewNativeAuto, and fordefi.NewNativeManual
return the concrete type and reject the other modes’ configs. API requests are
authenticated with an ECDSA P-256 request signature: provide exactly one of
PrivateKeyPEM, or a RequestSigner to keep that key in a KMS/HSM.
Native auto mode: Fordefi may replace the blockhash and fees, then signs and
broadcasts. It accepts only an unsigned transaction whose sole required signer
is the vault.
PushMode: fordefi.PushModeManual. Fordefi rewrites
the message (recent blockhash, Compute Budget fee instructions) and signs it
without broadcasting. ModifyAndSignTransaction replaces tx with the
transaction Fordefi signed: always continue from it. Fordefi must be the fee
payer and must sign before any other required signer, since the rewrite voids
existing signatures. The rewrite is not diffed, so inspect the result before
broadcasting.
Chain unset. Fordefi signs your exact message bytes
and does not broadcast. Use this with a Fordefi black box vault.
Why There Is No Umbrella Package
Rust has aSigner enum and TypeScript has createKeychainSigner; Go
deliberately has neither. Go does not dead-code-eliminate across a runtime
dispatch switch, so an umbrella would force every backend’s vendor SDK (AWS, GCP,
and the rest) into every consumer’s build. Importing the backend package you
need is the selector. To pick a backend at runtime, write the switch in your own
code over just the backends you support, and hold the result as a
core.SolanaSigner.
Error Handling
Every error is a*core.SignerError with a stable Code (CodeConfigError,
CodeHTTPError, CodeRemoteAPIError, CodeSigningFailed,
CodeNotInitialized, CodeBroadcastUnconfirmed, and others). Error() returns
only a fixed message per code, never key material or raw provider responses.
Match with errors.As, errors.Is(err, &core.SignerError{Code: ...}), or
core.CodeOf(err).
On Crossmint and Fordefi native auto mode, a failure does not mean nothing
landed. When the provider may have accepted the transaction, the code is
core.CodeBroadcastUnconfirmed ("SIGNER_BROADCAST_UNCONFIRMED").
ProviderTxID is set when the create was accepted, and 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.
core.SignAndSendTransaction also reports this code when your send function
fails, with the fee-payer signature in TransactionSignature. Fireblocks
PROGRAM_CALL is sign-only and sends no key; it reports this code only when a
poll shows Fireblocks broadcast anyway.
Adding Custom Signers
Implementcore.SolanaSigner plus exactly one capability interface, and add no
method your backend cannot honor: callers detect capability by type assertion.
See the Adding Signers guide to integrate
additional key management services.