{
  "x402Version": 2,
  "id": 30671,
  "slug": "30671",
  "resource": "https://preflight402.com/v1/btc/tx-context",
  "description": "Call before signing a Bitcoin transaction when you need chain context for its inputs: whether each prevout exists, whether it is already spent, its value in sats and its confirmations. Resolves up to 10 inputs against a public explorer at about one request per second, so a full batch can take over 20 seconds; figures reflect chain state at checked_at. Describes on-chain facts with source links; never advises whether to sign.",
  "type": "http",
  "serviceName": "Preflight",
  "resourceType": "Travel",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0xB9Db3966C7F18283624C97E860a84CEf7f9ba607",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "100000",
      "amountUsd": 0.1,
      "maxTimeoutSeconds": 300
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "input": {
          "body": {
            "inputs": [
              {
                "txid": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b",
                "vout": 0
              }
            ]
          },
          "bodyType": "json",
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "checked_at": "2026-09-11T12:00:00Z",
            "disclaimer": "Chain state at checked_at, from a third-party explorer. Not a recommendation to sign.",
            "inputs": [
              {
                "confirmations": 912345,
                "exists": true,
                "official_url": "https://blockstream.info/tx/4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b?output:0",
                "script_pubkey": "4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac",
                "spent": false,
                "txid": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b",
                "value_sats": 5000000000,
                "vout": 0
              }
            ],
            "network": "mainnet",
            "source": "blockstream.info",
            "total_input_sats": 5000000000
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "inputs": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "txid": {
                          "pattern": "^[0-9a-f]{64}$",
                          "type": "string"
                        },
                        "vout": {
                          "maximum": 100000,
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "txid",
                        "vout"
                      ],
                      "type": "object"
                    },
                    "maxItems": 10,
                    "minItems": 1,
                    "type": "array"
                  },
                  "network": {
                    "default": "mainnet",
                    "enum": [
                      "mainnet",
                      "testnet"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "inputs"
                ],
                "type": "object"
              },
              "bodyType": {
                "enum": [
                  "json",
                  "form-data",
                  "text"
                ],
                "type": "string"
              },
              "method": {
                "enum": [
                  "POST"
                ],
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method",
              "bodyType",
              "body"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    },
    "builder-code": {
      "info": {
        "s": [
          "cdp_sdk_server"
        ]
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "properties": {
          "a": {
            "description": "App builder code",
            "pattern": "^[a-z0-9_]{1,32}$",
            "type": "string"
          },
          "s": {
            "description": "Service builder codes",
            "items": {
              "pattern": "^[a-z0-9_]{1,32}$",
              "type": "string"
            },
            "maxItems": 11,
            "type": "array"
          },
          "w": {
            "description": "Wallet builder code",
            "pattern": "^[a-z0-9_]{1,32}$",
            "type": "string"
          }
        },
        "type": "object"
      }
    },
    "eip2612GasSponsoring": {},
    "erc20ApprovalGasSponsoring": {}
  },
  "tags": [
    "bitcoin",
    "crypto",
    "blockchain",
    "inputs",
    "explorer",
    "bazaar",
    "builder-code",
    "eip2612GasSponsoring",
    "erc20ApprovalGasSponsoring"
  ],
  "sourceHost": "preflight402.com",
  "lastUpdated": "2026-09-28T08:47:40.391Z",
  "quality": {
    "calls30d": 1,
    "uniquePayers30d": 1,
    "lastCalledAt": "2026-09-28T08:47:39.934Z"
  },
  "metadata": {
    "serviceName": "Preflight",
    "extensions": {
      "bazaar": {
        "info": {
          "input": {
            "body": {
              "inputs": [
                {
                  "txid": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b",
                  "vout": 0
                }
              ]
            },
            "bodyType": "json",
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "checked_at": "2026-09-11T12:00:00Z",
              "disclaimer": "Chain state at checked_at, from a third-party explorer. Not a recommendation to sign.",
              "inputs": [
                {
                  "confirmations": 912345,
                  "exists": true,
                  "official_url": "https://blockstream.info/tx/4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b?output:0",
                  "script_pubkey": "4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac",
                  "spent": false,
                  "txid": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b",
                  "value_sats": 5000000000,
                  "vout": 0
                }
              ],
              "network": "mainnet",
              "source": "blockstream.info",
              "total_input_sats": 5000000000
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "inputs": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "txid": {
                            "pattern": "^[0-9a-f]{64}$",
                            "type": "string"
                          },
                          "vout": {
                            "maximum": 100000,
                            "minimum": 0,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "txid",
                          "vout"
                        ],
                        "type": "object"
                      },
                      "maxItems": 10,
                      "minItems": 1,
                      "type": "array"
                    },
                    "network": {
                      "default": "mainnet",
                      "enum": [
                        "mainnet",
                        "testnet"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "inputs"
                  ],
                  "type": "object"
                },
                "bodyType": {
                  "enum": [
                    "json",
                    "form-data",
                    "text"
                  ],
                  "type": "string"
                },
                "method": {
                  "enum": [
                    "POST"
                  ],
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method",
                "bodyType",
                "body"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      },
      "builder-code": {
        "info": {
          "s": [
            "cdp_sdk_server"
          ]
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "additionalProperties": false,
          "properties": {
            "a": {
              "description": "App builder code",
              "pattern": "^[a-z0-9_]{1,32}$",
              "type": "string"
            },
            "s": {
              "description": "Service builder codes",
              "items": {
                "pattern": "^[a-z0-9_]{1,32}$",
                "type": "string"
              },
              "maxItems": 11,
              "type": "array"
            },
            "w": {
              "description": "Wallet builder code",
              "pattern": "^[a-z0-9_]{1,32}$",
              "type": "string"
            }
          },
          "type": "object"
        }
      },
      "eip2612GasSponsoring": {},
      "erc20ApprovalGasSponsoring": {}
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "preflight402.com",
    "manifest_name": "preflight402.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {},
    "type": "string"
  }
}