Bitcoin Forum
May 10, 2024, 12:55:49 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Parsing your transactions using bitcointools  (Read 8428 times)
Brre (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 0


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

Hi,

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?
1715302549
Hero Member
*
Offline Offline

Posts: 1715302549

View Profile Personal Message (Offline)

Ignore
1715302549
Reply with quote  #2

1715302549
Report to moderator
1715302549
Hero Member
*
Offline Offline

Posts: 1715302549

View Profile Personal Message (Offline)

Ignore
1715302549
Reply with quote  #2

1715302549
Report to moderator
1715302549
Hero Member
*
Offline Offline

Posts: 1715302549

View Profile Personal Message (Offline)

Ignore
1715302549
Reply with quote  #2

1715302549
Report to moderator
Remember that Bitcoin is still beta software. Don't put all of your money into BTC!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715302549
Hero Member
*
Offline Offline

Posts: 1715302549

View Profile Personal Message (Offline)

Ignore
1715302549
Reply with quote  #2

1715302549
Report to moderator
1715302549
Hero Member
*
Offline Offline

Posts: 1715302549

View Profile Personal Message (Offline)

Ignore
1715302549
Reply with quote  #2

1715302549
Report to moderator
1715302549
Hero Member
*
Offline Offline

Posts: 1715302549

View Profile Personal Message (Offline)

Ignore
1715302549
Reply with quote  #2

1715302549
Report to moderator
Gavin Andresen
Legendary
*
Offline Offline

Activity: 1652
Merit: 2216


Chief Scientist


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

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:
Code:
gavin$ dbdump.py --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:
Code:
gavin$ dbdump.py --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]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!