decodescript
Summary
Decode a hex-encoded script.
Description
Decode a hex-encoded script.
Arguments
hexstring(STR_HEX, required): the hex-encoded script
Results
value(OBJ): No description.asm(STR): Disassembly of the scriptdesc(STR): Inferred descriptor for the scripttype(STR): The output type (e.g. nonstandard, anchor, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_scripthash, witness_v0_keyhash, witness_v1_taproot, witness_v2_p2mr, witness_unknown)address(STR, optional): The qbit address (only if a well-defined address exists)p2sh(STR, optional): address of P2SH script wrapping this redeem script (not returned for types that should not be wrapped)segwit(OBJ, optional): Result of a witness output script wrapping this redeem script (not returned for types that should not be wrapped)asm(STR): Disassembly of the output scripthex(STR_HEX): The raw output script bytes, hex-encodedtype(STR): The type of the output script (e.g. witness_v0_keyhash or witness_v0_scripthash)address(STR, optional): The qbit address (only if a well-defined address exists)desc(STR): Inferred descriptor for the scriptp2sh-segwit(STR): address of the P2SH script wrapping this witness redeem script
Examples
qbit-cli decodescript "hexstring"
curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "decodescript", "params": ["hexstring"]}' -H 'content-type: application/json' http://127.0.0.1:8352/