1
0
mirror of https://github.com/bitcoinbook/bitcoinbook synced 2024-12-23 23:18:42 +00:00

Format decoded transaction json

This commit is contained in:
Elias Rodrigues 2016-12-17 15:14:35 -02:00 committed by GitHub
parent 8c4eaf1b6c
commit 079ac0a2bd

View File

@ -90,10 +90,13 @@ Now, lets look at the corresponding transaction that Bob uses to spend this o
.Decoded transaction showing a P2PKH output being spent with a signature
----
[...]
“Vin” : [
"txid": "0627052b6f28912f2703066a912ea577f2ce4da4caa5a5fbd8a57286c345c2f2",
"vout": 0,
"scriptSig": “<Bobs scriptSig>”,
"vin": [
{
"txid": "0627052b6f28912f2703066a912ea577f2ce4da4caa5a5fbd8a57286c345c2f2",
"vout": 0,
"scriptSig": "<Bobs scriptSig>",
...
}
]
[...]
----
@ -103,10 +106,13 @@ However, to spend the segregated witness output, the transaction has no signatur
.Decoded transaction showing a P2WPKH output being spent with separate witness data
----
[...]
“Vin” : [
"txid": "0627052b6f28912f2703066a912ea577f2ce4da4caa5a5fbd8a57286c345c2f2",
"vout": 0,
"scriptSig": “”,
"vin": [
{
"txid": "0627052b6f28912f2703066a912ea577f2ce4da4caa5a5fbd8a57286c345c2f2",
"vout": 0,
"scriptSig": "",
...
}
]
[...]
“witness”: “<Bobs witness data>”
@ -139,10 +145,13 @@ The P2SH script above references the hash of a _redeem script_ that defines a 2-
.Decoded transaction showing a P2SH output being spent
----
[...]
“Vin” : [
"txid": "abcdef12345...",
"vout": 0,
"scriptSig": “<SigA> <SigB> <2 PubA PubB PubC PubD PubE 5 CHECKMULTISIG>”,
"vin": [
{
"txid": "abcdef12345...",
"vout": 0,
"scriptSig": "<SigA> <SigB> <2 PubA PubB PubC PubD PubE 5 CHECKMULTISIG>",
...
}
]
----
@ -166,10 +175,13 @@ Mohammed's company can spend outputs the Pay-to-Witness-Script-Hash output by pr
.Decoded transaction showing a P2WSH output being spent with separate witness data
----
[...]
“Vin” : [
"txid": "abcdef12345...",
"vout": 0,
"scriptSig": “”,
"vin": [
{
"txid": "abcdef12345...",
"vout": 0,
"scriptSig": "",
...
}
]
[...]
“witness”: “<SigA> <SigB> <2 PubA PubB PubC PubD PubE 5 CHECKMULTISIG>”