I want to understand Bitcoin data structure. So i try to understand a raw transaction in json format. When i checked the blockchain.info API documentation, i see that input structure is defined for transactions like this:
"prev_out":
{
"hash":"a3e2bcc9a5f776112497a32b05f4b9e5b2405ed9",
"value":"100000000",
"tx_index":"12554260",
"n":"2"
},
"script":"76a914641ad5051edd97029a003fe9efb29359fcee409d88ac"
But when I query a transaction from blockchain.info, it seems differently:
"prev_out":
{
"spent":true,
"tx_index":8845778,
"type":0,
"addr":"1CfD77hupeUvFwBPxZ2fA8iyWmVwQY22oh",
"value":10212000000,
"n":1,
"script":"76a9147fe34b97aeff4ab754770be5c8f12e2e95332fd488ac"
}
Is there any document that clearly explains these data fields?
My current wonders:
- What is the spent field?
- There is no hash field at queried transaction, there must be i think?
- What is type field?
- Which fields are signed? The signature is generated by which fields hash?