The agent financial firewall · developer docs
SolMachina is the financial firewall for Solana & Base agents — the trust & decision layer they call over x402 before moving money. One call returns a decision, a risk score and the evidence — with a signed receipt you can verify offline. Pay per call in USDC. No account, no API key.
No account, no payment — via any MCP client (npx -y solmachina-x402-mcp, call solmachina_sample) or raw over our remote MCP endpoint:
curl -s -X POST https://api.solmachina.com/mcp -H "content-type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"solmachina_sample","arguments":{"endpoint":"/v1/decision"}}}'
GET https://api.solmachina.com/v1/decision?mint=<MINT>
→ HTTP 402 (USDC terms) → pay with any x402 client → retry →
{ "decision":"EXECUTE|REVIEW|REJECT", "smri":0-100, "confidence":0-1, "reason":"…", "evidence":{…} }
+ header X-SolMachina-Receipt (Ed25519, verify offline: npx solmachina-verify)
Agent Financial Firewall — send your policy and get policy.verdict = ALLOW/DENY (fail-closed) plus a signed, time-boxed authorization. Use a named preset or individual rules:
GET /v1/decision?mint=<MINT>&policy=anti-rug # conservative | bluechip | anti-rug | degen GET /v1/decision?mint=<MINT>&minSmri=80&denyMintAuthority=true&denyPermanentDelegate=true&denyTransferHook=true&maxTransferFeeBps=100
One verdict composes the full contract-level rug surface — mint/freeze authority, a permanent-delegate backdoor (can move any holder's balance), a transfer-hook (can block your sell), a transfer-fee sell-tax, holder concentration, and exit-liquidity — then returns a Proof-of-Decision authorization (granted + constraints + notAfterUtc) your executor can honor. All of it is covered by the Ed25519 receipt, verifiable offline.
Paying is risk-free — our promise to you:
A 5xx, an invalid receipt, or no usable data means no charge — a failed call is never a settled sale.
Idempotent settlement: retries and replays return the first result — one answer, one charge, ever. The live mode is published at /health, not just claimed here.
Every answer is signed and checkable offline. No account, no API key, no lock-in — walk away anytime.
Drop a decision gate into any framework — LangChain, Vercel AI SDK, CrewAI, or the SendAI Solana Agent Kit. Full copy-paste guide: SolMachina × Solana Agent Kit.
SDK — npm i solmachina-sdk. The whole firewall in three lines:
import { SolMachina } from "solmachina-sdk";
const sm = new SolMachina({ payFetch }); // payFetch = any x402 wallet
const { allowed } = await sm.guard({ mint, policy: "conservative" });
if (allowed) await wallet.send(tx); // proceed only when allowed
Your first paid decision in 2 minutes: payFetch is any x402-enabled fetch from your wallet — e.g. wrapFetchWithPayment(fetch, signer) from x402-fetch. Fund it with a little USDC on Solana or Base; a real decision costs $0.05. No wallet yet? Evaluate free first over MCP (solmachina_sample) — see the shape, then wire the wallet when you're ready.
Or as a system rule for a tool-calling agent:
// "Before any swap/buy, call solmachina_decision(mint); proceed only on EXECUTE."
Connect the whole toolset remotely (25 tools): MCP https://api.solmachina.com/mcp · registry io.github.imnotamob/solmachina-x402 · npm solmachina-x402-mcp.
SolMachina doesn't tell your agent what to trade — it decides whether the action your agent already chose satisfies its policy, and proves it. A single $0.05 decision can stop a $500–$50,000 action that breaks your rules. Three common gates (real endpoints, total cost per decision):
Autonomous token buyer scan → validate → simulate → authorize token-intel $0.05 + decision $0.05 + dex-quote $0.003 + simulate $0.01 ≈ $0.113 / decision Treasury / policy guard every outbound action checked against your policy wallet-scan $0.02 + token-risk $0.028 + decision?policy=conservative $0.05 ≈ $0.098 / decision Memecoin sniper new pair → risk → holders → exit-liquidity → verdict new-pairs $0.005 + token-risk $0.028 + token-holders $0.005 + slippage-map $0.005 + decision $0.05 ≈ $0.093 / decision
Every answer ships an Ed25519 signed receipt — so after the fact you can prove why the agent was authorized to act. Full catalog + prices: /pricing.
EXECUTE/REVIEW/REJECT + SMRI + evidence — the answer your agent actually needs.
Every paid answer ships an Ed25519 receipt verifiable offline + a transparency log.
Your ALLOW/DENY rules, fail-closed — named presets or your own thresholds.
Cites every source, says unknown over guessing. Verdict-free. Not financial advice.
| Endpoint | What it answers |
|---|---|
/v1/decision | Execute this or not? (flagship) + SMRI + firewall |
/v1/pretrade | One-call pre-trade sweep: risk + holders + liquidity + fees |
/v1/token-risk · /v1/token-holders | Mint/freeze authority, Token-2022 flags, whale map |
/v1/dex-quote · /v1/slippage-map | Best route, price impact, slippage-by-size |
/v1/wallet-scan | Counterparty wallet profile |
Full catalog + prices: /pricing · machine catalog: /.well-known/x402 · schema: /openapi.json.