Skip to content

Conversation

dougEfresh
Copy link
Contributor

Added ScriptPubKeyDoc function

@DrahtBot
Copy link
Contributor

DrahtBot commented Dec 20, 2022

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

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 DrahtBot added the Docs label Dec 20, 2022
@maflcko maflcko changed the title doc: Refactor/Format getrawtransaction RPC docs doc: Fixup getrawtransaction RPC docs Dec 21, 2022
@maflcko
Copy link
Member

maflcko commented Dec 21, 2022

Thanks,

ACK 97115de

Copy link
Contributor

@kristapsk kristapsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cr utACK 97115de

@fanquake fanquake merged commit dd7d82b into bitcoin:master Dec 21, 2022
@maflcko
Copy link
Member

maflcko commented Dec 21, 2022

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 pushed a commit to syscoin/syscoin that referenced this pull request Dec 21, 2022
{RPCResult::Type::ARR, "vin", "",
{
{RPCResult::Type::OBJ, "", /* optional */ true, "utxo being spent, omitted if block undo data is not available",
{RPCResult::Type::OBJ, "", "utxo being spent, omitted if block undo data is not available",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for missing this earlier, but I think the ", omitted ..." part will need to be removed as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bitcoin bitcoin locked and limited conversation to collaborators Jan 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants