Solana · open-source library

Bulkhead sits between an autonomous trader and the chain. Every transaction is checked against limits you set, written to an audit log, and stoppable with one call.

Read the documentationplaceholderView on GitHubplaceholder

$ npm install [YOUR-PACKAGE-NAME]

agent-wallet.ts
// illustrative API
const wallet = new GuardedWallet(keypair, {
  maxPerTrade:    "50 USDC",
  maxPerDay:      "500 USDC",
  maxSlippageBps: 100,
  allowPrograms:  [JUPITER],
  allowMints:     [USDC, SOL],
});

// the agent or bot signs through the guard
await wallet.send(tx);  // throws LimitExceeded

wallet.halt();          // panic: nothing signs
  1. Decides

    Your agent or bot

    An LLM agent, a script, a strategy. It never holds an unrestricted key.

  2. Checks

    Bulkhead

    Limits, audit log and halt switch, applied before anything is signed.

  3. Settles

    Solana

    Only transactions that pass every check reach the network.

01 · Limits

Limits the trader cannot talk its way past

Rules live in code, outside the model and outside the strategy. A prompt injection or a runaway loop hits the same wall.

  • Size

    Cap the notional of any single trade and the total spend per hour or day.

  • Venue and asset

    Allowlist the programs it may call and the mints it may hold. Everything else is refused.

  • Execution quality

    Reject trades above a slippage or price-impact ceiling before they are signed.

  • Rate

    Limit transactions per minute so a loop cannot drain the wallet in fees.

02 · Audit log

Every decision on the record

Each request is logged with the rule that allowed or refused it, so you can replay what the trader tried to do and why it was stopped.

audit.log · sampleACTIVEHALTED
12:04:11  ALLOW  swap 20 USDC → SOL     within limits
12:04:42  ALLOW  swap 35 USDC → SOL     within limits
12:05:03  DENY   swap 900 USDC → SOL    maxPerTrade
12:05:09  DENY   transfer → unknown     allowPrograms
12:05:10  DENY   swap 40 USDC → BONK    allowMints
12:05:14  HALT   operator               all signing stopped
12:05:15  DENY   swap 10 USDC → SOL     halted

03 · Panic button

One call stops everything

Halt from code, a CLI or your own dashboard. Signing stops immediately and stays stopped until an operator resumes it.

Try it: press and watch the sample log.

Built for agents. Just as useful without one.

  • LLM agents

    A model can be wrong, confused or manipulated. Hand it a wallet whose worst case you chose in advance, and expose only guarded actions as tools.

  • Trading bots

    No LLM required. Deterministic bots have bugs, bad feeds and fat-finger configs too. The same limits, log and halt switch apply to any code that signs.

A familiar idea

Market access controls, brought on-chain

In traditional finance, no algorithm sends orders straight to an exchange. A broker's market access layer checks each one first: order size, credit, restricted instruments, a kill switch.

Bulkhead is that layer for a Solana wallet. Pre-trade checks, a record of every decision, and a way to pull the plug, whoever or whatever is doing the trading.

Set the limits before it trades

Read the documentationplaceholderView on GitHubplaceholder
bulkhead · [YOUR LICENSE]Software controls reduce risk; they do not remove it.

The wallet and the toolkit

The smart wallet with controls is a separate, existing product. It is not part of the toolkit: the toolkit only links to it.

The toolkit does not trade live: backtest and paper trading execute trades in simulation, and post-trade analysis examines trades already made.