mirror of
https://github.com/bitcoinbook/bitcoinbook
synced 2024-12-24 15:38:08 +00:00
Format decoded transaction json
This commit is contained in:
parent
8c4eaf1b6c
commit
079ac0a2bd
@ -90,10 +90,13 @@ Now, let’s look at the corresponding transaction that Bob uses to spend this o
|
||||
.Decoded transaction showing a P2PKH output being spent with a signature
|
||||
----
|
||||
[...]
|
||||
“Vin” : [
|
||||
"vin": [
|
||||
{
|
||||
"txid": "0627052b6f28912f2703066a912ea577f2ce4da4caa5a5fbd8a57286c345c2f2",
|
||||
"vout": 0,
|
||||
"scriptSig": “<Bob’s scriptSig>”,
|
||||
"scriptSig": "<Bob’s 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” : [
|
||||
"vin": [
|
||||
{
|
||||
"txid": "0627052b6f28912f2703066a912ea577f2ce4da4caa5a5fbd8a57286c345c2f2",
|
||||
"vout": 0,
|
||||
"scriptSig": “”,
|
||||
"scriptSig": "",
|
||||
...
|
||||
}
|
||||
]
|
||||
[...]
|
||||
“witness”: “<Bob’s 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” : [
|
||||
"vin": [
|
||||
{
|
||||
"txid": "abcdef12345...",
|
||||
"vout": 0,
|
||||
"scriptSig": “<SigA> <SigB> <2 PubA PubB PubC PubD PubE 5 CHECKMULTISIG>”,
|
||||
"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” : [
|
||||
"vin": [
|
||||
{
|
||||
"txid": "abcdef12345...",
|
||||
"vout": 0,
|
||||
"scriptSig": “”,
|
||||
"scriptSig": "",
|
||||
...
|
||||
}
|
||||
]
|
||||
[...]
|
||||
“witness”: “<SigA> <SigB> <2 PubA PubB PubC PubD PubE 5 CHECKMULTISIG>”
|
||||
|
Loading…
Reference in New Issue
Block a user