Skip to content

Commit 1900336

Browse files
committed
Merge bitcoin/bitcoin#30524: doc: rpc: Use "output script" consistently (2/2)
fa5755b doc: rpc: Use "output script" consistently (2/2) (MarcoFalke) Pull request description: Small follow-up to bitcoin/bitcoin#30408 to fixup the RPCs that were forgotten. ACKs for top commit: theStack: lgtm ACK fa5755b Tree-SHA512: f1fc0aabb59017da216d6fe0f08a2274336d04db332ad6ce3d9608cd6f03667be1c76423f24a489ac8e7d536011a129dca752ab64b4621b7bc1d4d53f68602e4
2 parents 40c11ac + fa5755b commit 1900336

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

src/rpc/blockchain.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2160,14 +2160,14 @@ static const auto scan_result_status_some = RPCResult{
21602160

21612161
static RPCHelpMan scantxoutset()
21622162
{
2163-
// scriptPubKey corresponding to mainnet address 12cbQLTFMXRnSzktFkuoG3eHoMeFtpTu3S
2163+
// raw() descriptor corresponding to mainnet address 12cbQLTFMXRnSzktFkuoG3eHoMeFtpTu3S
21642164
const std::string EXAMPLE_DESCRIPTOR_RAW = "raw(76a91411b366edfc0a8b66feebae5c2e25a7b6a5d1cf3188ac)#fm24fxxy";
21652165

21662166
return RPCHelpMan{"scantxoutset",
21672167
"\nScans the unspent transaction output set for entries that match certain output descriptors.\n"
21682168
"Examples of output descriptors are:\n"
2169-
" addr(<address>) Outputs whose scriptPubKey corresponds to the specified address (does not include P2PK)\n"
2170-
" raw(<hex script>) Outputs whose scriptPubKey equals the specified hex scripts\n"
2169+
" addr(<address>) Outputs whose output script corresponds to the specified address (does not include P2PK)\n"
2170+
" raw(<hex script>) Outputs whose output script equals the specified hex-encoded bytes\n"
21712171
" combo(<pubkey>) P2PK, P2PKH, P2WPKH, and P2SH-P2WPKH outputs for the given pubkey\n"
21722172
" pkh(<pubkey>) P2PKH outputs for the given pubkey\n"
21732173
" sh(multi(<n>,<pubkey>,<pubkey>,...)) P2SH-multisig outputs for the given threshold and pubkeys\n"
@@ -2196,8 +2196,8 @@ static RPCHelpMan scantxoutset()
21962196
{
21972197
{RPCResult::Type::STR_HEX, "txid", "The transaction id"},
21982198
{RPCResult::Type::NUM, "vout", "The vout value"},
2199-
{RPCResult::Type::STR_HEX, "scriptPubKey", "The script key"},
2200-
{RPCResult::Type::STR, "desc", "A specialized descriptor for the matched scriptPubKey"},
2199+
{RPCResult::Type::STR_HEX, "scriptPubKey", "The output script"},
2200+
{RPCResult::Type::STR, "desc", "A specialized descriptor for the matched output script"},
22012201
{RPCResult::Type::STR_AMOUNT, "amount", "The total amount in " + CURRENCY_UNIT + " of the unspent output"},
22022202
{RPCResult::Type::BOOL, "coinbase", "Whether this is a coinbase output"},
22032203
{RPCResult::Type::NUM, "height", "Height of the unspent transaction output"},

src/rpc/output_script.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static RPCHelpMan validateaddress()
3838
{
3939
{RPCResult::Type::BOOL, "isvalid", "If the address is valid or not"},
4040
{RPCResult::Type::STR, "address", /*optional=*/true, "The bitcoin address validated"},
41-
{RPCResult::Type::STR_HEX, "scriptPubKey", /*optional=*/true, "The hex-encoded scriptPubKey generated by the address"},
41+
{RPCResult::Type::STR_HEX, "scriptPubKey", /*optional=*/true, "The hex-encoded output script generated by the address"},
4242
{RPCResult::Type::BOOL, "isscript", /*optional=*/true, "If the key is a script"},
4343
{RPCResult::Type::BOOL, "iswitness", /*optional=*/true, "If the address is a witness address"},
4444
{RPCResult::Type::NUM, "witness_version", /*optional=*/true, "The version number of the witness program"},
@@ -217,7 +217,7 @@ static RPCHelpMan deriveaddresses()
217217
" pkh(<pubkey>) P2PKH outputs for the given pubkey\n"
218218
" wpkh(<pubkey>) Native segwit P2PKH outputs for the given pubkey\n"
219219
" sh(multi(<n>,<pubkey>,<pubkey>,...)) P2SH-multisig outputs for the given threshold and pubkeys\n"
220-
" raw(<hex script>) Outputs whose scriptPubKey equals the specified hex scripts\n"
220+
" raw(<hex script>) Outputs whose output script equals the specified hex-encoded bytes\n"
221221
" tr(<pubkey>,multi_a(<n>,<pubkey>,<pubkey>,...)) P2TR-multisig outputs for the given threshold and pubkeys\n"
222222
"\nIn the above, <pubkey> either refers to a fixed public key in hexadecimal notation, or to an xpub/xprv optionally followed by one\n"
223223
"or more path elements separated by \"/\", where \"h\" represents a hardened child key.\n"

src/rpc/rawtransaction.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ static RPCHelpMan signrawtransactionwithkey()
737737
{
738738
{"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The transaction id"},
739739
{"vout", RPCArg::Type::NUM, RPCArg::Optional::NO, "The output number"},
740-
{"scriptPubKey", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "script key"},
740+
{"scriptPubKey", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "output script"},
741741
{"redeemScript", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED, "(required for P2SH) redeem script"},
742742
{"witnessScript", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED, "(required for P2WSH or P2SH-P2WSH) witness script"},
743743
{"amount", RPCArg::Type::AMOUNT, RPCArg::Optional::OMITTED, "(required for Segwit inputs) the amount spent"},
@@ -1840,8 +1840,8 @@ static RPCHelpMan analyzepsbt()
18401840
{
18411841
{RPCResult::Type::STR_HEX, "keyid", "Public key ID, hash160 of the public key, of a public key whose signature is missing"},
18421842
}},
1843-
{RPCResult::Type::STR_HEX, "redeemscript", /*optional=*/true, "Hash160 of the redeemScript that is missing"},
1844-
{RPCResult::Type::STR_HEX, "witnessscript", /*optional=*/true, "SHA256 of the witnessScript that is missing"},
1843+
{RPCResult::Type::STR_HEX, "redeemscript", /*optional=*/true, "Hash160 of the redeem script that is missing"},
1844+
{RPCResult::Type::STR_HEX, "witnessscript", /*optional=*/true, "SHA256 of the witness script that is missing"},
18451845
}},
18461846
{RPCResult::Type::STR, "next", /*optional=*/true, "Role of the next person that this input needs to go to"},
18471847
}},

src/wallet/rpc/addresses.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ RPCHelpMan getaddressinfo()
529529
RPCResult::Type::OBJ, "", "",
530530
{
531531
{RPCResult::Type::STR, "address", "The bitcoin address validated."},
532-
{RPCResult::Type::STR_HEX, "scriptPubKey", "The hex-encoded scriptPubKey generated by the address."},
532+
{RPCResult::Type::STR_HEX, "scriptPubKey", "The hex-encoded output script generated by the address."},
533533
{RPCResult::Type::BOOL, "ismine", "If the address is yours."},
534534
{RPCResult::Type::BOOL, "iswatchonly", "If the address is watchonly."},
535535
{RPCResult::Type::BOOL, "solvable", "If we know how to spend coins sent to this address, ignoring the possible lack of private keys."},

src/wallet/rpc/coins.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -530,19 +530,19 @@ RPCHelpMan listunspent()
530530
{RPCResult::Type::NUM, "vout", "the vout value"},
531531
{RPCResult::Type::STR, "address", /*optional=*/true, "the bitcoin address"},
532532
{RPCResult::Type::STR, "label", /*optional=*/true, "The associated label, or \"\" for the default label"},
533-
{RPCResult::Type::STR, "scriptPubKey", "the script key"},
533+
{RPCResult::Type::STR, "scriptPubKey", "the output script"},
534534
{RPCResult::Type::STR_AMOUNT, "amount", "the transaction output amount in " + CURRENCY_UNIT},
535535
{RPCResult::Type::NUM, "confirmations", "The number of confirmations"},
536536
{RPCResult::Type::NUM, "ancestorcount", /*optional=*/true, "The number of in-mempool ancestor transactions, including this one (if transaction is in the mempool)"},
537537
{RPCResult::Type::NUM, "ancestorsize", /*optional=*/true, "The virtual transaction size of in-mempool ancestors, including this one (if transaction is in the mempool)"},
538538
{RPCResult::Type::STR_AMOUNT, "ancestorfees", /*optional=*/true, "The total fees of in-mempool ancestors (including this one) with fee deltas used for mining priority in " + CURRENCY_ATOM + " (if transaction is in the mempool)"},
539-
{RPCResult::Type::STR_HEX, "redeemScript", /*optional=*/true, "The redeemScript if scriptPubKey is P2SH"},
540-
{RPCResult::Type::STR, "witnessScript", /*optional=*/true, "witnessScript if the scriptPubKey is P2WSH or P2SH-P2WSH"},
539+
{RPCResult::Type::STR_HEX, "redeemScript", /*optional=*/true, "The redeem script if the output script is P2SH"},
540+
{RPCResult::Type::STR, "witnessScript", /*optional=*/true, "witness script if the output script is P2WSH or P2SH-P2WSH"},
541541
{RPCResult::Type::BOOL, "spendable", "Whether we have the private keys to spend this output"},
542542
{RPCResult::Type::BOOL, "solvable", "Whether we know how to spend this output, ignoring the lack of keys"},
543543
{RPCResult::Type::BOOL, "reused", /*optional=*/true, "(only present if avoid_reuse is set) Whether this output is reused/dirty (sent to an address that was previously spent from)"},
544544
{RPCResult::Type::STR, "desc", /*optional=*/true, "(only when solvable) A descriptor for spending this output"},
545-
{RPCResult::Type::ARR, "parent_descs", /*optional=*/false, "List of parent descriptors for the scriptPubKey of this coin.", {
545+
{RPCResult::Type::ARR, "parent_descs", /*optional=*/false, "List of parent descriptors for the output script of this coin.", {
546546
{RPCResult::Type::STR, "desc", "The descriptor string."},
547547
}},
548548
{RPCResult::Type::BOOL, "safe", "Whether this output is considered safe to spend. Unconfirmed transactions\n"

src/wallet/rpc/spend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ RPCHelpMan signrawtransactionwithwallet()
882882
{
883883
{"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The transaction id"},
884884
{"vout", RPCArg::Type::NUM, RPCArg::Optional::NO, "The output number"},
885-
{"scriptPubKey", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "script key"},
885+
{"scriptPubKey", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The output script"},
886886
{"redeemScript", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED, "(required for P2SH) redeem script"},
887887
{"witnessScript", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED, "(required for P2WSH or P2SH-P2WSH) witness script"},
888888
{"amount", RPCArg::Type::AMOUNT, RPCArg::Optional::OMITTED, "(required for Segwit inputs) the amount spent"},

src/wallet/rpc/transactions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ static std::vector<RPCResult> TransactionDescriptionString()
431431
{RPCResult::Type::STR, "comment", /*optional=*/true, "If a comment is associated with the transaction, only present if not empty."},
432432
{RPCResult::Type::STR, "bip125-replaceable", "(\"yes|no|unknown\") Whether this transaction signals BIP125 replaceability or has an unconfirmed ancestor signaling BIP125 replaceability.\n"
433433
"May be unknown for unconfirmed transactions not in the mempool because their unconfirmed ancestors are unknown."},
434-
{RPCResult::Type::ARR, "parent_descs", /*optional=*/true, "Only if 'category' is 'received'. List of parent descriptors for the scriptPubKey of this coin.", {
434+
{RPCResult::Type::ARR, "parent_descs", /*optional=*/true, "Only if 'category' is 'received'. List of parent descriptors for the output script of this coin.", {
435435
{RPCResult::Type::STR, "desc", "The descriptor string."},
436436
}},
437437
};
@@ -729,7 +729,7 @@ RPCHelpMan gettransaction()
729729
{RPCResult::Type::STR_AMOUNT, "fee", /*optional=*/true, "The amount of the fee in " + CURRENCY_UNIT + ". This is negative and only available for the \n"
730730
"'send' category of transactions."},
731731
{RPCResult::Type::BOOL, "abandoned", "'true' if the transaction has been abandoned (inputs are respendable)."},
732-
{RPCResult::Type::ARR, "parent_descs", /*optional=*/true, "Only if 'category' is 'received'. List of parent descriptors for the scriptPubKey of this coin.", {
732+
{RPCResult::Type::ARR, "parent_descs", /*optional=*/true, "Only if 'category' is 'received'. List of parent descriptors for the output script of this coin.", {
733733
{RPCResult::Type::STR, "desc", "The descriptor string."},
734734
}},
735735
}},

src/wallet/rpc/wallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static RPCHelpMan getwalletinfo()
6868
{RPCResult::Type::NUM, "duration", "elapsed seconds since scan start"},
6969
{RPCResult::Type::NUM, "progress", "scanning progress percentage [0.0, 1.0]"},
7070
}, /*skip_type_check=*/true},
71-
{RPCResult::Type::BOOL, "descriptors", "whether this wallet uses descriptors for scriptPubKey management"},
71+
{RPCResult::Type::BOOL, "descriptors", "whether this wallet uses descriptors for output script management"},
7272
{RPCResult::Type::BOOL, "external_signer", "whether this wallet is configured to use an external signer such as a hardware wallet"},
7373
{RPCResult::Type::BOOL, "blank", "Whether this wallet intentionally does not contain any keys, scripts, or descriptors"},
7474
{RPCResult::Type::NUM_TIME, "birthtime", /*optional=*/true, "The start time for blocks scanning. It could be modified by (re)importing any descriptor with an earlier timestamp."},

0 commit comments

Comments
 (0)