Skip to content

Commit 56d9244

Browse files
committed
RPC: Document "asm" and "hex" fields for scripts
1 parent 2cdd4df commit 56d9244

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

src/rpc/blockchain.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -617,9 +617,9 @@ const RPCResult getblock_vin{
617617
{RPCResult::Type::STR_AMOUNT, "value", "The value in " + CURRENCY_UNIT},
618618
{RPCResult::Type::OBJ, "scriptPubKey", "",
619619
{
620-
{RPCResult::Type::STR, "asm", "The asm"},
620+
{RPCResult::Type::STR, "asm", "Disassembly of the public key script"},
621621
{RPCResult::Type::STR, "desc", "Inferred descriptor for the output"},
622-
{RPCResult::Type::STR_HEX, "hex", "The hex"},
622+
{RPCResult::Type::STR_HEX, "hex", "The raw public key script bytes, hex-encoded"},
623623
{RPCResult::Type::STR, "address", /*optional=*/true, "The Bitcoin address (only if a well-defined address exists)"},
624624
{RPCResult::Type::STR, "type", "The type (one of: " + GetAllOutputTypes() + ")"},
625625
}},
@@ -1016,9 +1016,9 @@ static RPCHelpMan gettxout()
10161016
{RPCResult::Type::NUM, "confirmations", "The number of confirmations"},
10171017
{RPCResult::Type::STR_AMOUNT, "value", "The transaction value in " + CURRENCY_UNIT},
10181018
{RPCResult::Type::OBJ, "scriptPubKey", "", {
1019-
{RPCResult::Type::STR, "asm", "The asm"},
1019+
{RPCResult::Type::STR, "asm", "Disassembly of the public key script"},
10201020
{RPCResult::Type::STR, "desc", "Inferred descriptor for the output"},
1021-
{RPCResult::Type::STR_HEX, "hex", "The hex"},
1021+
{RPCResult::Type::STR_HEX, "hex", "The raw public key script bytes, hex-encoded"},
10221022
{RPCResult::Type::STR, "type", "The type, eg pubkeyhash"},
10231023
{RPCResult::Type::STR, "address", /*optional=*/true, "The Bitcoin address (only if a well-defined address exists)"},
10241024
}},

src/rpc/rawtransaction.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ static std::vector<RPCResult> DecodeTxDoc(const std::string& txid_field_doc)
9696
{RPCResult::Type::NUM, "vout", /*optional=*/true, "The output number (if not coinbase transaction)"},
9797
{RPCResult::Type::OBJ, "scriptSig", /*optional=*/true, "The script (if not coinbase transaction)",
9898
{
99-
{RPCResult::Type::STR, "asm", "asm"},
100-
{RPCResult::Type::STR_HEX, "hex", "hex"},
99+
{RPCResult::Type::STR, "asm", "Disassembly of the signature script"},
100+
{RPCResult::Type::STR_HEX, "hex", "The raw signature script bytes, hex-encoded"},
101101
}},
102102
{RPCResult::Type::ARR, "txinwitness", /*optional=*/true, "",
103103
{
@@ -114,9 +114,9 @@ static std::vector<RPCResult> DecodeTxDoc(const std::string& txid_field_doc)
114114
{RPCResult::Type::NUM, "n", "index"},
115115
{RPCResult::Type::OBJ, "scriptPubKey", "",
116116
{
117-
{RPCResult::Type::STR, "asm", "the asm"},
117+
{RPCResult::Type::STR, "asm", "Disassembly of the public key script"},
118118
{RPCResult::Type::STR, "desc", "Inferred descriptor for the output"},
119-
{RPCResult::Type::STR_HEX, "hex", "the hex"},
119+
{RPCResult::Type::STR_HEX, "hex", "The raw public key script bytes, hex-encoded"},
120120
{RPCResult::Type::STR, "type", "The type, eg 'pubkeyhash'"},
121121
{RPCResult::Type::STR, "address", /*optional=*/true, "The Bitcoin address (only if a well-defined address exists)"},
122122
}},
@@ -692,9 +692,9 @@ const RPCResult decodepsbt_inputs{
692692
{RPCResult::Type::NUM, "amount", "The value in " + CURRENCY_UNIT},
693693
{RPCResult::Type::OBJ, "scriptPubKey", "",
694694
{
695-
{RPCResult::Type::STR, "asm", "The asm"},
695+
{RPCResult::Type::STR, "asm", "Disassembly of the public key script"},
696696
{RPCResult::Type::STR, "desc", "Inferred descriptor for the output"},
697-
{RPCResult::Type::STR_HEX, "hex", "The hex"},
697+
{RPCResult::Type::STR_HEX, "hex", "The raw public key script bytes, hex-encoded"},
698698
{RPCResult::Type::STR, "type", "The type, eg 'pubkeyhash'"},
699699
{RPCResult::Type::STR, "address", /*optional=*/true, "The Bitcoin address (only if a well-defined address exists)"},
700700
}},
@@ -706,14 +706,14 @@ const RPCResult decodepsbt_inputs{
706706
{RPCResult::Type::STR, "sighash", /*optional=*/true, "The sighash type to be used"},
707707
{RPCResult::Type::OBJ, "redeem_script", /*optional=*/true, "",
708708
{
709-
{RPCResult::Type::STR, "asm", "The asm"},
710-
{RPCResult::Type::STR_HEX, "hex", "The hex"},
709+
{RPCResult::Type::STR, "asm", "Disassembly of the redeem script"},
710+
{RPCResult::Type::STR_HEX, "hex", "The raw redeem script bytes, hex-encoded"},
711711
{RPCResult::Type::STR, "type", "The type, eg 'pubkeyhash'"},
712712
}},
713713
{RPCResult::Type::OBJ, "witness_script", /*optional=*/true, "",
714714
{
715-
{RPCResult::Type::STR, "asm", "The asm"},
716-
{RPCResult::Type::STR_HEX, "hex", "The hex"},
715+
{RPCResult::Type::STR, "asm", "Disassembly of the witness script"},
716+
{RPCResult::Type::STR_HEX, "hex", "The raw witness script bytes, hex-encoded"},
717717
{RPCResult::Type::STR, "type", "The type, eg 'pubkeyhash'"},
718718
}},
719719
{RPCResult::Type::ARR, "bip32_derivs", /*optional=*/true, "",
@@ -727,8 +727,8 @@ const RPCResult decodepsbt_inputs{
727727
}},
728728
{RPCResult::Type::OBJ, "final_scriptSig", /*optional=*/true, "",
729729
{
730-
{RPCResult::Type::STR, "asm", "The asm"},
731-
{RPCResult::Type::STR_HEX, "hex", "The hex"},
730+
{RPCResult::Type::STR, "asm", "Disassembly of the final signature script"},
731+
{RPCResult::Type::STR_HEX, "hex", "The raw final signature script bytes, hex-encoded"},
732732
}},
733733
{RPCResult::Type::ARR, "final_scriptwitness", /*optional=*/true, "",
734734
{
@@ -812,14 +812,14 @@ const RPCResult decodepsbt_outputs{
812812
{
813813
{RPCResult::Type::OBJ, "redeem_script", /*optional=*/true, "",
814814
{
815-
{RPCResult::Type::STR, "asm", "The asm"},
816-
{RPCResult::Type::STR_HEX, "hex", "The hex"},
815+
{RPCResult::Type::STR, "asm", "Disassembly of the redeem script"},
816+
{RPCResult::Type::STR_HEX, "hex", "The raw redeem script bytes, hex-encoded"},
817817
{RPCResult::Type::STR, "type", "The type, eg 'pubkeyhash'"},
818818
}},
819819
{RPCResult::Type::OBJ, "witness_script", /*optional=*/true, "",
820820
{
821-
{RPCResult::Type::STR, "asm", "The asm"},
822-
{RPCResult::Type::STR_HEX, "hex", "The hex"},
821+
{RPCResult::Type::STR, "asm", "Disassembly of the witness script"},
822+
{RPCResult::Type::STR_HEX, "hex", "The raw witness script bytes, hex-encoded"},
823823
{RPCResult::Type::STR, "type", "The type, eg 'pubkeyhash'"},
824824
}},
825825
{RPCResult::Type::ARR, "bip32_derivs", /*optional=*/true, "",

0 commit comments

Comments
 (0)