2

if you follow this link, you will see a specific bitcoin address. If you look closely at the prev_out field, it is not an outpoint structure. Inside of the protocol specification under transactions, you can find the outpoint structure.

The outpoint structure is:

Field Size Description  Data type   Comments
32  hash    char[32]    The hash of the referenced transaction.
4   index   uint32_t    The index of the specific output in the transaction. The first output is 0, etc.

Where as prev_out in the above query is structure as:

prev_out:{"spent":true,"tx_index":50341289,"type":0,"addr":"15e2tHrbiUd4RxnBmHKYorMysyKtk1ohXF","value":2000000,"n":0,"script":"76a91432e17777e35dedafd578ffd90fa21ea8835dd50e88ac"}

Why is this different? What am I misunderstanding? Is blockchain.info not following the Bitcoin protocol for transactions on their json messages?

1 Answer 1

3

Why is this different?

Blockchain.info has an API that provides the same data, but not necessarily formatted in the exact same way. When bitcoin nodes talk to each other, they must use the protocol as specified in the link you gave, but the Blockchain.info API is just a utility for getting some data about the contents of the block chain.

Is blockchain.info not following the Bitcoin protocol for transactions on their json messages?

In their API, technically, no. I'm sure they have more than a few nodes running, though, which do follow the bitcoin protocol. Their API can call upon these nodes and a few database to return the JSON with the requested info.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.