A

Animica · TX Preflight

by Animica

POSTBaseanimica:1

$0.006

per call · USD Coin on Base

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.

Endpoint

POST https://animica.dev/x402/tx/preflight

1

Calls / 30d

1

Unique payers / 30d

Aug 23

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://animica.dev/x402/tx/preflight", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "raw_tx": "0xa264626f6479a761760163676173a2656c696d69741952086570726963651a001bf5386466726f6d784030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030656e6f6e63650067636861696e496401677061796c6f6164a26174006176a362746f78403131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313164646174616066616d6f756e74016a6163636573734c69737480647369677380"
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://animica.dev/x402/tx/preflight" \
  -H "Content-Type: application/json" \
  -d '{"raw_tx":"0xa264626f6479a761760163676173a2656c696d69741952086570726963651a001bf5386466726f6d784030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030656e6f6e63650067636861696e496401677061796c6f6164a26174006176a362746f78403131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313164646174616066616d6f756e74016a6163636573734c69737480647369677380"}' \
  -H "X-PAYMENT: <signed x402 payment>"

Payment details

Pay to0x5d17c40fd6b119dc6006c4ab3c20a917fcab2acd
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase, animica:1
Schemesexact

Is this your API?

Pin it to the top of Onchain Data and the homepage with a featured placement.

Get featured →

More from Animica & similar services