# RugShield Solana Tx Guard

> RugShield Solana Tx Guard is a paid API for AI agents from getrugshield.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-13).

Pre-sign Solana transaction safety check that simulates the transaction on mainnet and returns ALLOW, WARN, or BLOCK with exact balance changes and attack type reasons

## Facts

- Endpoint: POST https://getrugshield.com/v1/tx-guard?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/rugshield-solana-tx-guard-35636457
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZBvDIY_QPBwfGFyhWtDr_

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability rugshield-solana-tx-guard-35636457 -d '<json body>'
```

Example prompt: Before I sign this Solana transaction, run it through RugShield's tx-guard and tell me if it's safe — here's the base64 unsigned tx, my signer wallet is 7xKf...mN2, and I expect no more than 0.05 SOL to leave my wallet.

## When to prefer this

Use this endpoint when you need a pre-sign safety verdict on a specific Solana transaction and want to know the exact balance changes that will occur, especially when wallet drainer attacks, unlimited approvals, owner reassignment, or swap redirection are a concern. Prefer this over generic token risk checks when you already have a constructed unsigned transaction and need a binary go/no-go decision before the user signs. Best suited for AI wallet agents, DeFi frontends, and autonomous Solana agents that submit transactions on behalf of users.

## Known failure modes

- Malformed or invalid base64 transaction returns an error response
- Transaction not on Solana mainnet may not simulate correctly
- Very complex transactions with many accounts could exceed the p95 1.0s latency
- If the signer field is omitted the fee payer is assumed, which may produce incorrect balance attribution
- Rare legitimate transactions may be false-blocked (0.13% rate per stated benchmarks)
- Network or RPC simulation failures may return an error instead of a verdict

## How this service works

RugShield aggregates Solana risk checks: one API call runs independent advisors in parallel, plus our own code-based flags. Pay in USDC via x402.

## Output

A JSON object containing a verdict field (ALLOW, WARN, or BLOCK), a reasons array listing specific attack types detected (e.g. OWNER_REASSIGN, unlimited approval, SOL outflow above intent), a balance_changes array showing exact SOL and token deltas, and a latency_ms field. On attack detection the verdict is BLOCK with reasons; safe transactions return ALLOW with balance changes shown.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "intent": {
   "type": "object",
   "description": "optional: max_sol_out, expected_mints_in, allowed_recipients"
  },
  "signer": {
   "type": "string",
   "description": "wallet that will sign; defaults to the fee payer"
  },
  "transaction": {
   "type": "string",
   "description": "Your real unsigned Solana transaction serialized as base64; invalid input is rejected before payment"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "reasons": [],
  "verdict": "ALLOW",
  "latency_ms": 640,
  "simulation": {
   "ok": true,
   "slot": null,
   "error": null,
   "units_consumed": null
  },
  "guard_version": "0.1.1",
  "balance_changes": [],
  "tokens_received": []
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/rugshield-solana-tx-guard-35636457/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from getrugshield.com](https://www.zero.xyz/host/getrugshield.com/llms.txt)
