---
title: "Check a Solana transaction before signing: ALLOW, WARN or BLOCK with balance changes (x402)"
method: POST
path: "/v1/tx-guard"
---

# Check a Solana transaction before signing: ALLOW, WARN or BLOCK with balance changes (x402)

`POST /v1/tx-guard`

## Request

- Base URL: `https://getrugshield.com` (the document declares no server; this is the origin it was published from)
- URL: `https://getrugshield.com/v1/tx-guard`
- Auth: none declared

Check an unsigned Solana transaction before signing. Send its base64 serialization; malformed input is rejected before payment. We simulate it on mainnet and return ALLOW, WARN or BLOCK with SOL and token balance changes and reasons, including dangerous approvals, owner changes, excessive outflows and redirected swaps. Solana only. The published sample is synthetic and only shows an HTTP 402 quote; replace it with a current unsigned transaction before paying.

## Headers

- `Idempotency-Key` string
- `X-RugShield-Job-ID` string

## Request body

- object
  - `transaction` string, required: Unsigned Solana transaction (legacy or v0), base64-encoded.
  - `signer` string: Base58 wallet that will sign; defaults to the transaction's fee payer.
  - `intent` object: Optional: what the signer expects this transaction to do.
    - `max_sol_out` number: Most SOL the signer may lose.
    - `expected_mints_in` string[]: Token mints the signer expects to receive.
    - `allowed_recipients` string[]: Addresses allowed to receive the signer's funds.

## Response `200`

Completed paid result with a recoverable job ID; the server confirmed settlement before sending.

- object
  - `verdict` 'ALLOW' | 'WARN' | 'BLOCK', required
  - `reasons` object[], required
    - `check` string, required
    - `severity` string, required
    - `detail` string, required
  - `simulation` object: Absent when the transaction cannot be decoded or verified.
    - `ok` boolean, required
    - `error` unknown, required
    - `units_consumed` integer, nullable, required
    - `slot` integer, nullable, required
  - `balance_changes` object[]
    - `account` string, required
    - `mint` string, required
    - `delta` number: SOL amount, for the SOL row.
    - `delta_raw` integer: Token atomic units, for token rows.
  - `tokens_received` object[]
    - `mint` string, required
    - `checks` object, nullable, required
    - `risk` string, nullable, required
    - `risk_is_advisory` boolean, required
  - `latency_ms` integer, required
  - `guard_version` string, required
  - `job_id` string, required
  - `status_url` string, required
  - `charged` true, required
  - `recovery` object, required
    - `status_url` string, required
    - `retry_with_original_proof` boolean, required
    - `job_id_header` string, required

## Other responses

- `402`: Payment Required: x402 challenge with the exact USDC price and accepted payment networks
- `409`: Original proof/key/job handle conflicts or settlement outcome needs manual review; no new payment is attempted.
- `502`: No usable result; payment is not settled.
- `503`: Processing, ready for a signed retry, or queue busy. No settlement occurred; Retry-After is a polling interval, not a completion deadline.

---

[API](https://skmtc.dev/getrugshield/apis/rugshield-parallel-solana-risk-api.md) · [All operations](https://skmtc.dev/getrugshield/apis/rugshield-parallel-solana-risk-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getrugshield/apis/rugshield-parallel-solana-risk-api/revisions/5395ade4e1f8?raw)
