decodescript

Decodes a hex-encoded script and provides detailed information about it.

Path parameters

apiKeystringRequiredDefaults to docs-demo

Request

This endpoint expects an object.
hexstringstringRequiredformat: "^[a-fA-F0-9]+$"

The hex-encoded script.

Response

Decoded script information.
asmstring or null
The script public key in assembly form.
descstring or null
Output descriptor for the script.
addressstring or null

The derived Bitcoin address (if applicable).

typestring or null

Output type (e.g., nonstandard, pubkeyhash, scripthash, witness_v0_keyhash).

p2shstring or null
P2SH address wrapping this script, if applicable.