# Solana Transaction Preview & Pre-Sign Safety Check

> Solana Transaction Preview & Pre-Sign Safety Check is a paid API for AI agents from solana-x402-microtools-mainnet.valecity.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-28).

Simulates a Solana transaction before signing to surface SOL/SPL balance changes, programs invoked, fee estimates, red flags, and an optional intent-matching verdict (clear/caution/avoid)

## Facts

- Endpoint: POST https://solana-x402-microtools-mainnet.valecity.workers.dev/api/tx-preview?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-28
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/solana-transaction-preview-pre-sign-safety-check-e7487f4f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yKd75aaV2MiZ_8F_Nx7Pm

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 solana-transaction-preview-pre-sign-safety-check-e7487f4f -d '<json body>'
```

Example prompt: Before I sign this transaction, simulate it for my wallet 7xKp...AbC2 and check if it matches my intent to swap 0.002 SOL for USDC — flag any red flags like authority changes or unexpected balance losses, and give me a clear/caution/avoid verdict.

## When to prefer this

Choose this endpoint when you need to validate a Solana transaction before signing, especially in agent-driven DeFi workflows where the agent constructs or receives transactions on behalf of a user. It is uniquely suited for intent-matching (confirming the transaction does what the user said), red flag detection (authority changes, token approvals, SOL drain), and xStocks tokenized equity verification. Prefer it over generic RPC simulation when you need a human-readable safety verdict and balance-change summary rather than raw simulation logs.

## Known failure modes

- Transaction exceeds 1232 bytes — serialization rejected
- Invalid base64/base58 encoding causes parse failure
- Address lookup tables unresolvable on mainnet — simulation aborted
- Simulation failure itself flagged as a red flag in the response
- Unknown or unrecognized programs listed but not blocking
- Intent string format not recognized — no penalty, intent_match not returned
- Missing or invalid wallet address defaults to fee payer detection
- Payment not received (x402) — 402 response, endpoint not called

## How this service works

Solana transaction preview BEFORE signing: simulate an unsigned or signed legacy/v0 transaction (address lookup tables resolved) and get SOL and SPL/Token-2022 balance changes for your wallet, programs invoked (known/unknown), fee estimate and red flags (token approvals, authority/owner changes, close-to-other, wallet reassign, >90% SOL loss, simulation failure). JSON body. Optional Pre-Sign Brief (schema 1.0): pass intent (e.g. 'swap 0.002 SOL for USDC', 'send 0.001 SOL to <address>') and/or context {type, ticker, mint}; get verdict clear|caution|avoid with reasons, intent_match, verified xStocks tokenized-equity check, priority-fee market hint (micro-lamports/CU) and a sha256 brief_hash.

## Output

Returns simulated SOL and SPL/Token-2022 balance changes for the specified wallet, a list of programs invoked (labeled known or unknown), estimated transaction fee, and red flags such as token approvals, authority/owner changes, close-to-other instructions, wallet reassignment, or >90% SOL loss. With optional intent and context fields, also returns a verdict of clear/caution/avoid with reasons, intent_match boolean, xStocks mint verification status, priority-fee market hint in micro-lamports/CU, and a sha256 brief_hash for audit.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "intent": {
   "type": "string",
   "maxLength": 200,
   "description": "Optional plain intent, checked against the simulated effects. Supported: 'send <amt> <SOL|symbol|mint> to <address>', 'swap|sell <amt> <asset> for <asset>', 'buy <amt> <asset> for <asset>', 'approve ...', 'close ...'. Other wording: not checked, no penalty."
  },
  "wallet": {
   "type": "string",
   "description": "Optional: your wallet address, to highlight its balance changes (defaults to the fee payer)"
  },
  "context": {
   "type": "object",
   "properties": {
    "mint": {
     "type": "string",
     "description": "Claimed mint address"
    },
    "type": {
     "enum": [
      "memecoin",
      "tokenized_equity"
     ],
     "type": "string"
    },
    "ticker": {
     "type": "string",
     "maxLength": 12,
     "description": "Claimed ticker, e.g. NVDAx"
    }
   },
   "description": "Optional claims about the asset; tokenized-equity claims are checked against an allowlist of verified xStocks mints",
   "additionalProperties": false
  },
  "encoding": {
   "enum": [
    "base64",
    "base58"
   ],
   "type": "string",
   "description": "Optional; auto-detected if omitted"
  },
  "transaction": {
   "type": "string",
   "maxLength": 2200,
   "description": "Serialized Solana transaction (legacy or v0), signed or UNSIGNED (all-zero signature slots), max 1232 bytes, base64 or base58"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/solana-transaction-preview-pre-sign-safety-check-e7487f4f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from solana-x402-microtools-mainnet.valecity.workers.dev](https://www.zero.xyz/host/solana-x402-microtools-mainnet.valecity.workers.dev/llms.txt)
