# Solana IDL Instruction Decoder

> Solana IDL Instruction Decoder is a paid API for AI agents from signalharness.ai, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-13).

Decodes a raw Solana transaction instruction into human-readable arguments and account metadata using a caller-supplied IDL

## Facts

- Endpoint: POST https://signalharness.ai/api/agent/services/solana_idl_instruction_decode/invoke
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/solana-idl-instruction-decoder-ed67ff31
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_plh6yAaCsBVudz2m62rm7

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-idl-instruction-decoder-ed67ff31 -d '<json body>'
```

Example prompt: Can you decode this raw Solana instruction for me using the IDL I'm supplying? Here's the JSON with the IDL and raw instruction bytes — tell me the instruction name, its arguments, and which accounts it touches.

## When to prefer this

Choose this endpoint when you have a raw Solana instruction and a corresponding IDL and need to decode the instruction into named arguments and accounts without running a full Solana node or RPC call. It's especially useful for Anchor programs where discriminators are well-defined. Prefer this over general-purpose RPC decoding when you want a structured JSON result with argument mapping and account labeling, and are willing to supply the IDL yourself.

## Known failure modes

- IDL does not match the instruction — returns matched:false with unmatched_data_hex
- Malformed or invalid JSON in request_json — likely 4xx or parsing error
- Unsupported primitive types in the IDL — warnings issued, partial decode returned
- Instruction discriminator not found in supplied IDL — instruction_name is null
- Payment failure or insufficient USDC balance — 402 Payment Required

## How this service works

Explore 330 pay-per-call x402 API services and 27 agent-native digital products, with Base USDC pricing, secure Polar checkout, and free discovery.

## Output

Returns a JSON analysis containing the matched instruction name (or null if unmatched), decoded arguments, account list, discriminator bytes, unmatched data in hex, the analyzed network (Solana), evidence scope, and any accuracy warnings. Also includes a receipt with payment metadata and a SHA-256 hash of the result.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "request_json": {
   "type": "string",
   "maxLength": 65536,
   "minLength": 2
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "replay": false,
  "result": {
   "warnings": [
    "Accuracy depends entirely on the supplied IDL and supported primitive types."
   ],
   "service_id": "solana_idl_instruction_decode",
   "analysis_json": "{\"accounts\":[],\"arguments\":{},\"discriminator\":[],\"instruction_name\":null,\"matched\":false,\"unmatched_data_hex\":\"0x\"}",
   "evidence_scope": "caller_supplied_data",
   "analyzed_network": "solana"
  },
  "status": "succeeded",
  "receipt": {
   "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
   "usage": [],
   "status": "succeeded",
   "network": "eip155:8453",
   "artifacts": [],
   "endedAtMs": 0,
   "latencyMs": 0,
   "paymentId": "example-payment",
   "receiptId": "example-receipt",
   "requestId": "example-request",
   "serviceId": "solana_idl_instruction_decode",
   "executionId": "example-execution",
   "startedAtMs": 0,
   "amountAtomic": "20000",
   "resultSha256": "bd524863b10b2b5aa17d897f5392623fcbeed8c86506ef5a60c5afc62a87f9f6",
   "serviceVersion": "1.0.0",
   "settlementReference": "0x0000000000000000000000000000000000000000000000000000000000000000"
  },
  "artifacts": [],
  "requestId": "example-request",
  "executionId": "example-execution"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/solana-idl-instruction-decoder-ed67ff31/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from signalharness.ai](https://www.zero.xyz/host/signalharness.ai/llms.txt)
