Documentation

blockchain_entry

Fetches a block or transaction given its hash string. The server determines whether the hash refers to a block header or a transaction as stored in its index.

Endpoint

POST https://storage.lineage.to/blockchain_entry

Headers

HeaderTypeDescription
x-cache-idstringIdempotency / cache key. Must match the documented pattern (32 lowercase hex characters, e.g. ^[a-z0-9]{32}$). The response id matches this value.

Request body

A single hash string (JSON string value, not an object wrapper).

"<hex-or-encoded-hash>"

Example

curl -sS -X POST "https://storage.lineage.to/blockchain_entry" \
  -H "Content-Type: application/json" \
  -H "x-cache-id: 0123456789abcdef0123456789abcdef" \
  -d '"<hash>"'

Responses

200 on success, 400 if the hash is unknown or malformed. content shape depends on whether a block or transaction was returned. Your build may not include a type discriminator; treat the examples as orientation and confirm against the node.

Envelope fields (typical)

  • id — idempotency id (matches x-cache-id).
  • status — one of Success, Error, or Pending.
  • reason — human-readable detail; especially useful for errors.
  • route — logical route name for the call.
  • content — payload; shape depends on the operation.

Example success payload (block)

{
  "id": "0123456789abcdef0123456789abcdef",
  "status": "Success",
  "reason": "Entry found",
  "route": "blockchain_entry",
  "content": {
    "type": "block",
    "height": 100,
    "block_hash": "<hex>",
    "tx_ids": [ "<tx-id>" ],
    "header": {}
  }
}

Example success payload (transaction)

{
  "id": "0123456789abcdef0123456789abcdef",
  "status": "Success",
  "reason": "Entry found",
  "route": "blockchain_entry",
  "content": {
    "type": "transaction",
    "tx_hash": "<hex>",
    "inputs": [
      { "previous_out": { "t_hash": "<hex>", "n": 0 }, "script_signature": {} }
    ],
    "outputs": [
      { "value": { "Token": 0 }, "locktime": 0, "script_public_key": "<script>" }
    ],
    "version": 1
  }
}

Example error envelope (typical 400)

{
  "id": null,
  "status": "Error",
  "reason": "Bad Request",
  "route": null,
  "content": null
}