Skip to content

decodescript JSON-RPC command

decodescript "hexstring"

Decode a hex-encoded script.


1. "hexstring"    (string, required) the hex-encoded script


  "asm":"asm",   (string) Script public key
  "type":"type", (string) The output type
  "reqSigs": n,    (numeric) The required signatures
  "addresses": [   (json array of string)
     "address"     (string) Bitcoin Cash address
  "p2sh","address" (string) address of P2SH script wrapping this redeem script (not returned if the script is already a P2SH).


> bitcoin-cli decodescript "hexstring"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "decodescript", "params": ["hexstring"] }' -H 'content-type: text/plain;'

Bitcoin Cash Node Daemon version v27.0.1-7ef8bf2

Documentation on reflects the current master branch in Git, and may include API changes that are not yet present in the latest release.