Blockchain.com · Schema

TxInput

A single Bitcoin transaction input.

CryptocurrencyBitcoinBlockchain DataExchangeMarket DataTradingPaymentsPublic APIs

Properties

Name Type Description
sequence integer Sequence number.
witness string SegWit witness data.
script string Input script (scriptSig) as hex.
prev_out object A single Bitcoin transaction output (a UTXO before it is spent).
View JSON Schema on GitHub

JSON Schema

data-api-tx-input-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/blockchain/refs/heads/main/json-schema/data-api-tx-input-schema.json",
  "title": "TxInput",
  "description": "A single Bitcoin transaction input.",
  "type": "object",
  "properties": {
    "sequence": {
      "type": "integer",
      "format": "int64",
      "description": "Sequence number.",
      "example": 1
    },
    "witness": {
      "type": "string",
      "description": "SegWit witness data."
    },
    "script": {
      "type": "string",
      "description": "Input script (scriptSig) as hex."
    },
    "prev_out": {
      "type": "object",
      "description": "A single Bitcoin transaction output (a UTXO before it is spent).",
      "properties": {
        "type": {
          "type": "integer",
          "description": "Output type indicator.",
          "example": 1
        },
        "spent": {
          "type": "boolean",
          "description": "True if the output has been spent.",
          "example": true
        },
        "value": {
          "type": "integer",
          "format": "int64",
          "description": "Value in Satoshi.",
          "example": 100000
        },
        "spending_outpoints": {
          "type": "array",
          "description": "Outpoints that spent this output (when spent).",
          "items": {
            "type": "object",
            "properties": {
              "tx_index": {
                "type": "integer",
                "format": "int64"
              },
              "n": {
                "type": "integer"
              }
            }
          }
        },
        "n": {
          "type": "integer",
          "description": "Output index within the transaction.",
          "example": 1
        },
        "tx_index": {
          "type": "integer",
          "format": "int64",
          "description": "Internal transaction index.",
          "example": 1
        },
        "script": {
          "type": "string",
          "description": "Output script (scriptPubKey) as hex."
        },
        "addr": {
          "type": "string",
          "description": "Destination address (when derivable)."
        }
      }
    }
  }
}