HomePhabricator

rpc: Clarify decodescript RPCResult doc

Description

rpc: Clarify decodescript RPCResult doc

Summary:
Mention all output types.
Remove "hex" from output.
General formatting of the output: more whitespaces

Due to backports being done out of sequential order, commit fa3caa1666a9baa856e92398a890aaddbdd98f7c (use IsValidNumArgs over hardcoded check) is not relevant for us. See D6580.

This is a backport of Core PR15616

Test Plan:

$ src/bitcoin-cli help decodescript
Result:
{
  "asm":"asm",          (string) Script public key
  "type":"type",        (string) The output type (e.g. nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata)
  "reqSigs": n,         (numeric) The required signatures
  "addresses": [        (json array of string)
     "address"          (string) bitcoin address
     ,...
  ],
  "p2sh":"str"          (string) address of P2SH script wrapping this redeem script (not returned if the script is already a P2SH).
}

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D8118

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Oct 26 2020, 08:01
PiRKCommitted on Oct 26 2020, 08:01
abc-botPushed on Oct 26 2020, 08:04
Reviewer
Restricted Owners Package
Differential Revision
D8118: rpc: Clarify decodescript RPCResult doc
Parents
rABCffbceb44e46d: add newline after -stdin*
Branches
Unknown
Tags
Unknown