Bitcoin Forum
December 07, 2016, 12:51:55 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
   Home   Help Search Donate Login Register  
Pages: [1]
Author Topic: Parsing your transactions using bitcointools  (Read 1417 times)
Offline Offline

Activity: 14

View Profile
July 22, 2010, 03:11:23 PM


I am trying to parse the transactions using bitcointools:

I get the following when i parse the wallet:

'TxIn: prev(82df...6428:1), is this the previous transaction? So how do you compute the net transaction value then, do you have to go back the whole chain?
Hero Member
Offline Offline

Posts: 1481115115

View Profile Personal Message (Offline)

Reply with quote  #2

Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Gavin Andresen
Offline Offline

Activity: 1652

Chief Scientist

View Profile WWW
July 23, 2010, 02:25:44 AM

TxIn: prev(82df...6428:1) means the second TxOut of transaction 82df...something...6428  (it abbreviates the full 256-bit transaction hash and starts counting at zero).

To see that transaction:
gavin$ --transaction=82df...6428
1 tx in, 2 out
['TxIn: prev(bfb0...cd16:1) pubkey: 17muZqKMEFqzefsqYhR9vqBjz1jNVcDcbh sig: 71:3044...0201 65:0480...af42']
['TxOut: value: 0.05 pubkey: 1GVgigFDZ9pPLyYwxboEoaSDMDbsBQPVMx Script: DUP HASH160 20:a9f6...9268 EQUALVERIFY CHECKSIG', 'TxOut: value: 66.07 pubkey: 1LsvDRhoMmH5YeZDAxaP5rqwNTp3xFCF3Q Script: DUP HASH160 20:da0b...a345 EQUALVERIFY CHECKSIG']
This looks like bitnickels coins coming out of the Bitcoin Faucet.  The transaction before THAT is:
gavin$ --transaction=bfb0...cd16
1 tx in, 2 out
['TxIn: prev(b1dd...5cd9:1) pubkey: 1MQNsNwRHTu7MWPgFRGRRZfo58jU3RGxJv sig: 73:3046...8501 65:041b...6624']
['TxOut: value: 0.05 pubkey: 1GVgigFDZ9pPLyYwxboEoaSDMDbsBQPVMx Script: DUP HASH160 20:a9f6...9268 EQUALVERIFY CHECKSIG', 'TxOut: value: 66.12 pubkey: 17muZqKMEFqzefsqYhR9vqBjz1jNVcDcbh Script: DUP HASH160 20:4a4e...e0c3 EQUALVERIFY CHECKSIG']

To compute the net transaction value, just add up the values of all the TxOuts; they have to equal the sum of all the TxIns (well, unless there are transaction fees).  So for that first transaction, 66.07+0.05 = 66.12 (which is, indeed, bfb0...cd16:1)

How often do you get the chance to work on a potentially world-changing project?
Pages: [1]
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!