{"uid":"cap_kQtDt4CPQpNZUlewHu-NS","slug":"animica-transaction-preflight-84c5d25e","name":"Animica Transaction Preflight","description":"Find out why an Animica transaction would be rejected BEFORE you broadcast it. Decodes your canonical CBOR {body, sigs} envelope, returns the normalised fields and the CANONICAL HASH you are about to sign, then asks the node whether it would admit the transaction and why not. Both calls are read-only: nothing is inserted into the mempool and nothing is broadcast. Built for people writing Animica signers, where the alternative feedback loop is broadcast-and-see. No model.","url":"https://animica.dev/x402/tx/preflight","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"raw_tx":{"type":"string","description":"the transaction as hex, 0x-prefixed or not. Animica expects canonical CBOR of {body, sigs} with strictly-increasing map keys — non-canonical key order is the most common first failure and the decoder names it explicitly."},"skip_admission":{"type":"boolean","description":"decode only, skipping the admission dry-run (default false). Useful when you are iterating on encoding and do not yet have signatures attached."}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0018","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.0018/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0018","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0018","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Jz8W66j7DI1t3n5jIJn4g","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0018","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Decodes a raw Animica CBOR transaction and performs a read-only admission dry-run against the node to reveal why it would be rejected before broadcast","exampleAgentPrompt":"Can you preflight this Animica transaction for me — here's the raw hex: 0xa50082... — I want to know the canonical hash I'm about to sign and whether the node would admit it, without actually broadcasting anything.","exampleUseCases":[{"title":"Debug rejected transaction before broadcast","prompt":"I keep getting rejections when I broadcast this Animica transaction. Can you run a preflight on this hex 0xd84f82a4... and tell me exactly why the node would reject it and what the decoded fields look like?"},{"title":"Get canonical hash for signer development","prompt":"I'm building an Animica signer and need to verify I'm signing the right canonical hash — can you decode this CBOR hex 0xa50183... with skip_admission turned on and just show me the normalised fields and hash without hitting the node?"},{"title":"Validate CBOR encoding before attaching signatures","prompt":"I've constructed an Animica transaction body but haven't attached signatures yet — can you preflight this hex 0xd81e9f... with decode-only mode to check whether my CBOR key ordering is canonical before I sign it?"}],"resultDescription":"Returns the decoded normalised transaction fields, the canonical hash that will be signed, and (unless skip_admission is true) the node's admission dry-run result including any rejection reason — all without inserting anything into the mempool or broadcasting.","failureModes":["Non-canonical CBOR key ordering causes decoder to reject with explicit naming of the encoding error","Malformed or truncated hex input returns a decode error","Invalid 0x prefix handling if hex is malformed","Node unreachable causes admission dry-run to fail even if decode succeeds","Missing required body or sigs fields in the CBOR envelope returns a structural validation error"],"whenToPreferThis":"Use this endpoint when you are developing an Animica transaction signer or encoder and need to validate correctness before broadcast — especially when debugging CBOR encoding issues like non-canonical key ordering, verifying the canonical hash before signing, or understanding node admission rules. It is the only read-only preflight check that combines both CBOR decoding and live node admission simulation in a single call without side effects.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:33:54.248Z","isFirstParty":false}