Added ScriptPubKeyDoc function
doc: Fixup getrawtransaction RPC docs #26734
pull dougEfresh wants to merge 1 commits into bitcoin:master from dougEfresh:doc-getrawtransaction changing 1 files +18 −22-
dougEfresh commented at 10:49 PM on December 20, 2022: contributor
-
doc: Refactor/Format getrawtransaction RPC docs and add ScriptPubKeyDoc function 97115de183
-
DrahtBot commented at 10:49 PM on December 20, 2022: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
Type Reviewers ACK MarcoFalke, kristapsk If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
- DrahtBot added the label Docs on Dec 20, 2022
- maflcko renamed this:
doc: Refactor/Format getrawtransaction RPC docs
doc: Fixup getrawtransaction RPC docs
on Dec 21, 2022 -
maflcko commented at 7:51 AM on December 21, 2022: member
Thanks,
ACK 97115de1839c69d63cae6ea772c17905739bf0ae
- kristapsk approved
-
kristapsk commented at 7:57 AM on December 21, 2022: contributor
cr utACK 97115de1839c69d63cae6ea772c17905739bf0ae
- fanquake merged this on Dec 21, 2022
- fanquake closed this on Dec 21, 2022
-
maflcko commented at 9:48 AM on December 21, 2022: member
Rendered diff:
diff --git a/decoderawtransaction b/decoderawtransaction index 05a49fe..7600def 100644 --- a/decoderawtransaction +++ b/decoderawtransaction @@ -45,8 +45,8 @@ Result: "asm" : "str", (string) Disassembly of the public key script "desc" : "str", (string) Inferred descriptor for the output "hex" : "hex", (string) The raw public key script bytes, hex-encoded - "type" : "str", (string) The type, eg 'pubkeyhash' - "address" : "str" (string, optional) The Bitcoin address (only if a well-defined address exists) + "address" : "str", (string, optional) The Bitcoin address (only if a well-defined address exists) + "type" : "str" (string) The type (one of: nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_scripthash, witness_v0_keyhash, witness_v1_taproot, witness_unknown) } }, ... diff --git a/getrawtransaction b/getrawtransaction index 462f051..6750205 100644 --- a/getrawtransaction +++ b/getrawtransaction @@ -8,8 +8,8 @@ the specified block is available and the transaction is in that block. Hint: Use gettransaction for wallet transactions. If verbosity is 0 or omitted, returns the serialized transaction as a hex-encoded string. -If verbosity is 1, returns a JSON Object with information about transaction. -If verbosity is 2, returns a JSON Object with information about transaction, including fee and prevout information. +If verbosity is 1, returns a JSON Object with information about the transaction. +If verbosity is 2, returns a JSON Object with information about the transaction, including fee and prevout information. Arguments: 1. txid (string, required) The transaction id @@ -59,8 +59,8 @@ Result (if verbosity is set to 1): "asm" : "str", (string) Disassembly of the public key script "desc" : "str", (string) Inferred descriptor for the output "hex" : "hex", (string) The raw public key script bytes, hex-encoded - "type" : "str", (string) The type, eg 'pubkeyhash' - "address" : "str" (string, optional) The Bitcoin address (only if a well-defined address exists) + "address" : "str", (string, optional) The Bitcoin address (only if a well-defined address exists) + "type" : "str" (string) The type (one of: nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_scripthash, witness_v0_keyhash, witness_v1_taproot, witness_unknown) } }, ... @@ -72,9 +72,9 @@ Result (for verbosity = 2): ..., Same output as verbosity = 1 "fee" : n, (numeric, optional) transaction fee in BTC, omitted if block undo data is not available "vin" : [ (json array) - { (json object, optional) utxo being spent, omitted if block undo data is not available + { (json object) utxo being spent, omitted if block undo data is not available ..., Same output as verbosity = 1 - "prevout" : { (json object) Only if undo information is available) + "prevout" : { (json object, optional) Only if undo information is available) "generated" : true|false, (boolean) Coinbase or not "height" : n, (numeric) The height of the prevout "value" : n, (numeric) The value in BTC - sidhujag referenced this in commit 9da8148313 on Dec 21, 2022
-
in src/rpc/rawtransaction.cpp:215 in 97115de183
208 | @@ -206,25 +209,18 @@ static RPCHelpMan getrawtransaction() 209 | RPCResult::Type::OBJ, "", "", 210 | { 211 | {RPCResult::Type::ELISION, "", "Same output as verbosity = 1"}, 212 | - {RPCResult::Type::NUM, "fee", /* optional */ true, "transaction fee in " + CURRENCY_UNIT + ", omitted if block undo data is not available"}, 213 | + {RPCResult::Type::NUM, "fee", /*optional=*/true, "transaction fee in " + CURRENCY_UNIT + ", omitted if block undo data is not available"}, 214 | {RPCResult::Type::ARR, "vin", "", 215 | { 216 | - {RPCResult::Type::OBJ, "", /* optional */ true, "utxo being spent, omitted if block undo data is not available", 217 | + {RPCResult::Type::OBJ, "", "utxo being spent, omitted if block undo data is not available",
maflcko commented at 5:28 PM on December 23, 2022:Sorry for missing this earlier, but I think the ", omitted ..." part will need to be removed as well?
dougEfresh commented at 7:14 PM on January 25, 2023:bitcoin locked this on Jan 25, 2024ContributorsLabels
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 18:13 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 18:13 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me