Agent-safe signing · The default

Coldstar vs a private key in .env

This is the real incumbent. Solana Agent Kit, ElizaOS, and GOAT all start the same way: a base58 secret in SOLANA_PRIVATE_KEY, decoded with Keypair.fromSecretKey, held in the agent's process. It works in ten minutes. It also means one prompt injection, one leaked log, or one bad dependency is the whole wallet.

Last reviewed 2026-09-04 · Facts link to first-party sources below · Corrections welcome

Pick a private key in .env if

  • It is a devnet key and nothing of value is behind it.
  • You are prototyping and will replace it before mainnet.
  • You have deliberately capped the balance to what you can afford to lose today.

Pick Coldstar if

  • The agent touches real funds.
  • The agent reads anything an attacker can write: web pages, emails, tool outputs, other agents.
  • You want the blast radius of a compromised agent to be a policy, not a balance.

Use both when

Keep the .env key for devnet. On mainnet the agent gets a Coldstar session key bounded by policy, and the root stays on the drive.

Side by side

Coldstara private key in .env
Who holds the root keyYou. The cold root lives encrypted on your own USB drive. No vendor holds a key, a share, or an account.The agent process. Whatever runs the model holds the full secret; so does anything that can read its memory, environment, or logs.
Where the key livesOn your machine. The air-gapped root signs a bounded policy envelope; a disposable session key signs routine transactions inside it.An environment variable, a .env file, a secrets manager, a container image layer. Solana's cookbook warns never to embed it client-side or commit it, and points production users to a key-management backend.
Policy enginePer-transaction limit, daily cap, program allowlist, recipient allowlist and blocklist, escalate-above threshold. Evaluated locally, first match wins, before any signature exists.None. Any transaction the agent builds, it can sign.
Out-of-policy transactionsESCALATE to a human over air-gapped QR, or REJECT. No signature is produced for a rejected transaction.There is no such thing; every transaction is in policy.
Cold / offline rootYes — the root key never touches a networked machine.No. The key is on an online host by definition.
Agent integrationFramework-agnostic: the agent proposes an unsigned transaction, the signer decides. CLI signer today; MCP server in progress.Universal: Solana Agent Kit's KeypairWallet, ElizaOS's Solana plugin, GOAT's examples all read SOLANA_PRIVATE_KEY.
Solana supportSolana mainnet. Core is chain-agnostic; EVM signing exists.Yes.
Source & self-hostingOpen source (MIT), self-hosted. No API key, no SaaS dependency, nothing to go down.Free; it is the Solana SDK.
PricingFree software plus a ~$10 drive.Free.
MaturityBeta — the signing core and policy engine are in scope for the planned independent audit.It is how most agents run today, and how most agent wallets get drained.

Every framework author knows this is the weak point. Solana Agent Kit's wallet interface, AgentKit's wallet providers, and ElizaOS's plugin structure all exist so you can swap the raw key for a signer. Coldstar is one of the signers you can swap in.

Where each one wins

Where a private key in .env wins

  • Zero setup. Copy a string, run the agent.
  • Zero latency and no extra process.
  • Every tutorial assumes it.

Where Coldstar wins

  • Bounded blast radius. A hijacked agent can spend up to the per-transaction limit and daily cap, to allowlisted programs and recipients, and nothing else.
  • No root on the host. The root is encrypted on a drive, offline; the agent holds a disposable session key.
  • Escalation. Anything over the threshold waits for a human over air-gapped QR; a blocklisted recipient gets no signature at all.

What you are actually trusting

An agent with a raw key is trusting every input it reads. A malicious string in a web page, a tool result, or another agent's message can instruct it to send everything to an attacker, and the key in its process will oblige. Logs, crash dumps, and container layers can leak the key without any injection at all. Solana's own cookbook tells developers not to ship this to production.

Coldstar turns the agent into a proposer. It builds transactions and hands them to the signer; the signer evaluates a fixed rule list, first match wins: blocklist, program allowlist, escalate threshold, per-transaction limit, recipient allowlist, daily cap. Allowed transactions are signed by a disposable session key that the cold root authorised offline. Rejected transactions never get a signature. Over-threshold transactions wait for a human.

Coldstar is beta and pre-audit. It is still categorically safer than a root key in an environment variable, because the failure mode changes from "lose everything" to "lose at most the policy".

Using a private key in .env and Coldstar together

Every major Solana agent framework has a wallet abstraction. Implement it with a Coldstar session key and the rest of your agent code does not change.

Frequently asked questions

My agent only reads trusted sources. Isn't a raw key fine?

Trusted sources get compromised, dependencies get hijacked, and logs get shipped to third parties. Policy is cheap insurance against the day your assumption fails.

Will a policy signer slow my agent down?

Routine transactions are signed by the session key on the same host, so latency is a local policy check. Only over-threshold transactions wait for a human.

Which frameworks default to a raw key?

Solana Agent Kit (SOLANA_PRIVATE_KEY into KeypairWallet), ElizaOS's Solana plugin (SOLANA_PRIVATE_KEY, with a fallback that generates and stores a key if none is set), and GOAT SDK's examples (SOLANA_PRIVATE_KEY). All three also let you plug in an external signer.

What does Coldstar do when an injected agent tries to drain the wallet?

The recipient is not on the allowlist, or the amount exceeds the limit, or the daily cap is hit. The policy returns REJECT or ESCALATE. No signature exists for a rejected transaction.

Try Coldstar in two minutes

Open source, MIT. macOS, Linux, Windows — and on the Solana Seeker dApp Store.

pip install coldstar

Related comparisons

Sources

  1. Solana cookbook: restore a keypair (handling warning)
  2. web3.js Keypair.fromSecretKey
  3. Solana Agent Kit README (SOLANA_PRIVATE_KEY, KeypairWallet)
  4. ElizaOS Solana wallet plugin (env.example, keypairUtils)
  5. GOAT SDK Solana example (Keypair.fromSecretKey from env)

Third-party facts were checked against the vendor's own pages on the date above. Pricing and feature sets change; if something here is out of date, tell us and we will fix it.