diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index cfd22758a0..b083ab782f 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1039,7 +1039,7 @@ static RPCHelpMan gettxout() {RPCResult::Type::STR, "asm", "Disassembly of the public key script"}, {RPCResult::Type::STR, "desc", "Inferred descriptor for the output"}, {RPCResult::Type::STR_HEX, "hex", "The raw public key script bytes, hex-encoded"}, - {RPCResult::Type::STR, "type", "The type, eg pubkeyhash"}, + {RPCResult::Type::STR, "type", "The type (one of: " + GetAllOutputTypes() + ")"}, {RPCResult::Type::STR, "address", /*optional=*/true, "The Bitcoin address (only if a well-defined address exists)"}, }}, {RPCResult::Type::BOOL, "coinbase", "Coinbase or not"}, diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index b30b0bbfeb..c9d63d6a63 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -517,9 +517,9 @@ static RPCHelpMan decodescript() { {RPCResult::Type::STR, "asm", "String representation of the script public key"}, {RPCResult::Type::STR_HEX, "hex", "Hex string of the script public key"}, - {RPCResult::Type::STR, "type", "The type of the script public key (e.g. witness_v0_keyhash or witness_v0_scripthash)"}, {RPCResult::Type::STR, "address", /*optional=*/true, "The Bitcoin address (only if a well-defined address exists)"}, {RPCResult::Type::STR, "desc", "Inferred descriptor for the script"}, + {RPCResult::Type::STR, "type", "The type of the script public key (one of: " + GetAllOutputTypes() + ")"}, {RPCResult::Type::STR, "p2sh-segwit", "address of the P2SH script wrapping this witness redeem script"}, }}, }, @@ -830,10 +830,10 @@ const RPCResult decodepsbt_inputs{ {RPCResult::Type::OBJ, "scriptPubKey", "", { {RPCResult::Type::STR, "asm", "Disassembly of the public key script"}, - {RPCResult::Type::STR, "desc", "Inferred descriptor for the output"}, + {RPCResult::Type::STR, "desc", "Inferred descriptor for the script"}, {RPCResult::Type::STR_HEX, "hex", "The raw public key script bytes, hex-encoded"}, - {RPCResult::Type::STR, "type", "The type, eg 'pubkeyhash'"}, {RPCResult::Type::STR, "address", /*optional=*/true, "The Bitcoin address (only if a well-defined address exists)"}, + {RPCResult::Type::STR, "type", "The type (one of: " + GetAllOutputTypes() + ")"}, }}, }}, {RPCResult::Type::OBJ_DYN, "partial_signatures", /*optional=*/true, "", @@ -845,13 +845,13 @@ const RPCResult decodepsbt_inputs{ { {RPCResult::Type::STR, "asm", "Disassembly of the redeem script"}, {RPCResult::Type::STR_HEX, "hex", "The raw redeem script bytes, hex-encoded"}, - {RPCResult::Type::STR, "type", "The type, eg 'pubkeyhash'"}, + {RPCResult::Type::STR, "type", "The type (one of: " + GetAllOutputTypes() + ")"}, }}, {RPCResult::Type::OBJ, "witness_script", /*optional=*/true, "", { {RPCResult::Type::STR, "asm", "Disassembly of the witness script"}, {RPCResult::Type::STR_HEX, "hex", "The raw witness script bytes, hex-encoded"}, - {RPCResult::Type::STR, "type", "The type, eg 'pubkeyhash'"}, + {RPCResult::Type::STR, "type", "The type (one of: " + GetAllOutputTypes() + ")"}, }}, {RPCResult::Type::ARR, "bip32_derivs", /*optional=*/true, "", { @@ -951,13 +951,13 @@ const RPCResult decodepsbt_outputs{ { {RPCResult::Type::STR, "asm", "Disassembly of the redeem script"}, {RPCResult::Type::STR_HEX, "hex", "The raw redeem script bytes, hex-encoded"}, - {RPCResult::Type::STR, "type", "The type, eg 'pubkeyhash'"}, + {RPCResult::Type::STR, "type", "The type (one of: " + GetAllOutputTypes() + ")"}, }}, {RPCResult::Type::OBJ, "witness_script", /*optional=*/true, "", { {RPCResult::Type::STR, "asm", "Disassembly of the witness script"}, {RPCResult::Type::STR_HEX, "hex", "The raw witness script bytes, hex-encoded"}, - {RPCResult::Type::STR, "type", "The type, eg 'pubkeyhash'"}, + {RPCResult::Type::STR, "type", "The type (one of: " + GetAllOutputTypes() + ")"}, }}, {RPCResult::Type::ARR, "bip32_derivs", /*optional=*/true, "", {