---
updatedAt: 2026-08-31T03:40:46.000Z
agentTools:
  projectIndex: https://readme.cipherowl.ai/llms.txt
---

# Get transaction scripts

Returns each output's scriptPubKey (hex, asm, type, address) and value, with OP_RETURN payloads decoded to text when printable. Bitcoin-family (UTXO) chains only.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "API ENDPOINTS",
    "description": "CipherOwl blockchain compliance and risk assessment APIs.",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://svc.cipherowl.ai"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Onchain Service",
      "description": "Query balances and transaction detail on a specific network. Balances and transactions live on one network, so these endpoints take a network (`/networks/{network}/…`, e.g. `ethereum_mainnet`), not a chain family such as `evm`."
    }
  ],
  "paths": {
    "/api/onchain/v1/networks/{network}/transactions/{txid}/scripts": {
      "get": {
        "summary": "Get transaction scripts",
        "description": "Returns each output's scriptPubKey (hex, asm, type, address) and value, with OP_RETURN payloads decoded to text when printable. Bitcoin-family (UTXO) chains only.",
        "operationId": "OnChainService_GetTransactionScripts",
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v1GetTransactionScriptsResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "network",
            "description": "Network key of a Bitcoin-family network (currently bitcoin_mainnet).",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "bitcoin_mainnet"
            }
          },
          {
            "name": "txid",
            "description": "Transaction hash (64 hex characters)",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "chain",
            "description": "Deprecated. Use `network`; this field holds the same value and is ignored\nwhen `network` is set. It will be removed in a future version.",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "bitcoin"
            }
          }
        ],
        "tags": [
          "Onchain Service"
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "OAuth 2.0 access token obtained from /oauth/token using client credentials."
      }
    },
    "schemas": {
      "v1DecodedOpReturn": {
        "type": "object",
        "properties": {
          "payloadHex": {
            "type": "string",
            "title": "All pushdata bytes concatenated, hex-encoded (always set)"
          },
          "payloadText": {
            "type": "string",
            "title": "UTF-8 text when the payload is printable; empty otherwise"
          },
          "pushes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/v1OpReturnPush"
            },
            "title": "Individual pushdata items, in script order"
          }
        },
        "title": "Decoded payload of an OP_RETURN (nulldata) output"
      },
      "v1GetTransactionScriptsResponse": {
        "type": "object",
        "properties": {
          "chain": {
            "type": "string",
            "description": "Deprecated. Same value as `network`; it will be removed in a future version."
          },
          "transaction": {
            "allOf": [
              {
                "$ref": "#/components/schemas/v1TransactionScripts"
              }
            ],
            "title": "Transaction with per-output script detail"
          },
          "network": {
            "type": "string",
            "title": "Network key of the request"
          }
        },
        "title": "Response containing script-level detail for a single transaction"
      },
      "v1OpReturnPush": {
        "type": "object",
        "properties": {
          "hex": {
            "type": "string",
            "title": "Pushdata bytes, hex-encoded"
          },
          "text": {
            "type": "string",
            "title": "UTF-8 text when this push is printable; empty otherwise"
          }
        },
        "title": "One pushdata item within an OP_RETURN script"
      },
      "v1ScriptOutput": {
        "type": "object",
        "properties": {
          "n": {
            "type": "integer",
            "format": "int64",
            "title": "Output index (vout position)"
          },
          "value": {
            "type": "string",
            "title": "Output value in the chain's smallest unit (e.g., satoshi) as string"
          },
          "scriptPubKey": {
            "allOf": [
              {
                "$ref": "#/components/schemas/v1ScriptPubKey"
              }
            ],
            "title": "The output's locking script"
          },
          "decodedOpReturn": {
            "allOf": [
              {
                "$ref": "#/components/schemas/v1DecodedOpReturn"
              }
            ],
            "title": "Decoded OP_RETURN payload; set only when script_pub_key.type is \"nulldata\""
          }
        },
        "title": "A single transaction output with its scriptPubKey detail"
      },
      "v1ScriptPubKey": {
        "type": "object",
        "properties": {
          "hex": {
            "type": "string",
            "title": "Raw scriptPubKey hex"
          },
          "asm": {
            "type": "string",
            "title": "Human-readable script disassembly"
          },
          "type": {
            "type": "string",
            "title": "Core-style script type (see message doc)"
          },
          "address": {
            "type": "string",
            "title": "Decoded address; empty for nulldata/nonstandard scripts"
          }
        },
        "description": "The type vocabulary mirrors Bitcoin Core's getrawtransaction scriptPubKey.type:\n\"nulldata\", \"pubkeyhash\", \"scripthash\", \"witness_v0_keyhash\",\n\"witness_v0_scripthash\", \"witness_v1_taproot\", \"pubkey\", \"multisig\",\n\"nonstandard\".",
        "title": "A scriptPubKey (locking script) with derived classification"
      },
      "v1TransactionScripts": {
        "type": "object",
        "properties": {
          "txid": {
            "type": "string",
            "title": "Transaction hash"
          },
          "blockHeight": {
            "type": "string",
            "format": "uint64",
            "title": "Confirming block height; 0 = unconfirmed"
          },
          "blockTime": {
            "type": "string",
            "format": "int64",
            "title": "Confirming block time as unix seconds; 0 = unconfirmed"
          },
          "confirmations": {
            "type": "integer",
            "format": "int64",
            "title": "Number of confirmations"
          },
          "outputs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/v1ScriptOutput"
            },
            "title": "All transaction outputs in vout order"
          },
          "hasOpReturn": {
            "type": "boolean",
            "title": "True when any output is an OP_RETURN (nulldata) script"
          }
        },
        "title": "A transaction's outputs with script-level detail"
      }
    }
  }
}
```