Btc Tx Inspect
by Preflight in Onchain & crypto
Call before signing or broadcasting a Bitcoin transaction. Decodes a raw transaction hex or a PSBT and returns inputs, outputs, script types, addresses, vsize, fee rate when derivable, and objective signals such as RBF, dust outputs, non-standard sighash flags and unsigned inputs. Parses only the bytes you send: no network access. Describes the transaction; never advises whether to sign it.
https://preflight402.com/v1/btc/tx-inspect- Price
- $0.1
- per call in USDC
- Uptime
- 100%
- last 30 days
- Response time
- 664 ms
- 1.0 s slowest 5%
- Last check
- Passed
- 2 h ago, next any minute now
Reliability
Status and outage history · Atom feed · Watch with other listings
How to call it
POST https://preflight402.com/v1/btc/tx-inspect
Each call costs $0.1 in USDC on Base, paid with the request over x402.
Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.
Example request
From the listing.
POST https://preflight402.com/v1/btc/tx-inspect
content-type: application/json
{
"raw": "0100000001c997a5e56e104102fa209c6a852dd90660a20b2d9c352423edce25857fcd3704000000004847304402204e45e16932b8af514961a1d3a1a25fdf3f4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd12909d831cc56cbbac4622082221a8768d1d0901ffffffff0200ca9a3b00000000434104ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84cac00286bee0000000043410411db93e1dcdb8a016b49840f8c53bc1eb68a382e97b1482ecad7b148a6909a5cb2e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a3ac00000000"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
network | string | No | One of: mainnet, testnet. Default: "mainnet". |
psbt | string | No | |
raw | string | No |
Example response
The provider's example. We can't check it without paying.
Example response, 45 lines
{
"fee_rate_sat_vb": 10,
"fee_sats": 1410,
"inputs": [
{
"address": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4",
"has_final_script": false,
"partial_sigs": 0,
"prev_txid": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"prev_vout": 1,
"script_sig": "",
"sequence": 4294967293,
"witness": [],
"witness_utxo_value_sats": 50000
}
],
"kind": "psbt",
"locktime": 0,
"outputs": [
{
"address": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4",
"script_pubkey": "0014751e76e8199196d454941c45d1b3a323f1433bd6",
"script_type": "p2wpkh",
"value_sats": 12000
},
{
"script_pubkey": "5120cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd",
"script_type": "p2tr",
"value_sats": 330
}
],
"signals": [
"rbf_enabled",
"dust_output",
"unsigned_inputs"
],
"thresholds": {
"dust_output_sat": 546,
"high_fee_rate_sat_vb": 100
},
"txid": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"version": 2,
"vsize": 141,
"weight": 561
}Call it from code
The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.1.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://preflight402.com/v1/btc/tx-inspect' \
-H 'content-type: application/json' \
--data-raw '{"raw":"0100000001c997a5e56e104102fa209c6a852dd90660a20b2d9c352423edce25857fcd3704000000004847304402204e45e16932b8af514961a1d3a1a25fdf3f4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd12909d831cc56cbbac4622082221a8768d1d0901ffffffff0200ca9a3b00000000434104ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84cac00286bee0000000043410411db93e1dcdb8a016b49840f8c53bc1eb68a382e97b1482ecad7b148a6909a5cb2e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a3ac00000000"}'
# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://preflight402.com/v1/btc/tx-inspect' \
-H 'content-type: application/json' \
--data-raw '{"raw":"0100000001c997a5e56e104102fa209c6a852dd90660a20b2d9c352423edce25857fcd3704000000004847304402204e45e16932b8af514961a1d3a1a25fdf3f4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd12909d831cc56cbbac4622082221a8768d1d0901ffffffff0200ca9a3b00000000434104ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84cac00286bee0000000043410411db93e1dcdb8a016b49840f8c53bc1eb68a382e97b1482ecad7b148a6909a5cb2e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a3ac00000000"}' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decodeJavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
// Pays at most $0.1 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.1" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.1 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fpreflight402.com%2Fv1%2Fbtc%2Ftx-inspect&method=POST
const res = await pay("https://preflight402.com/v1/btc/tx-inspect", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"raw": "0100000001c997a5e56e104102fa209c6a852dd90660a20b2d9c352423edce25857fcd3704000000004847304402204e45e16932b8af514961a1d3a1a25fdf3f4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd12909d831cc56cbbac4622082221a8768d1d0901ffffffff0200ca9a3b00000000434104ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84cac00286bee0000000043410411db93e1dcdb8a016b49840f8c53bc1eb68a382e97b1482ecad7b148a6909a5cb2e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a3ac00000000"
}),
});
console.log(res.status, await res.text());Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
# Pays at most $0.1 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.1"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.post(
"https://preflight402.com/v1/btc/tx-inspect",
json={
"raw": "0100000001c997a5e56e104102fa209c6a852dd90660a20b2d9c352423edce25857fcd3704000000004847304402204e45e16932b8af514961a1d3a1a25fdf3f4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd12909d831cc56cbbac4622082221a8768d1d0901ffffffff0200ca9a3b00000000434104ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84cac00286bee0000000043410411db93e1dcdb8a016b49840f8c53bc1eb68a382e97b1482ecad7b148a6909a5cb2e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a3ac00000000",
},
)
print(res.status_code, res.text)Security scan
No findings
We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 2 h ago | Passed | 402 | 738 ms | $0.1 |
| 7 h ago | Passed | 402 | 664 ms | $0.1 |
| 11 h ago | Passed | 402 | 871 ms | $0.1 |
| 16 h ago | Passed | 402 | 883 ms | $0.1 |
| 21 h ago | Passed | 402 | 573 ms | $0.1 |
Show 10 older checks
| 25 h ago | Passed | 402 | 586 ms | $0.1 |
| 30 h ago | Passed | 402 | 629 ms | $0.1 |
| 33 h ago | Passed | 402 | 791 ms | $0.1 |
| 38 h ago | Passed | 402 | 733 ms | $0.1 |
| 42 h ago | Passed | 402 | 796 ms | $0.1 |
| 46 h ago | Passed | 402 | 484 ms | $0.1 |
| 2 days ago | Passed | 402 | 1.3 s | $0.1 |
| 2 days ago | Passed | 402 | 1.0 s | $0.1 |
| 2 days ago | Passed | 402 | 800 ms | $0.1 |
| 3 days ago | Passed | 402 | 610 ms | $0.1 |