Title: Displaying bitcoins in wallet Post by: Hal on February 10, 2011, 12:43:33 AM I have enhanced the bc_key program to print interesting information about transactions found in the wallet file.
https://github.com/halfinney/bc_key (https://github.com/halfinney/bc_key) Run it as: Code: ./bc_key EVERYTHING ~/.bitcoin/wallet.dat (substitute your own wallet.dat location on mac and windows) This dumps everything in the wallet, including keys and address book, but let's just look at transactions: Code: ./bc_key EVERYTHING ~/.bitcoin/wallet.dat | grep ^tx I'll go ahead and violate my own privacy because I want to make a point. Here's my output: Code: tx 011104eddf3afd4e1133996e3e2a9c7f16ed1f9dfa922493612bab9b8be19f0e 1.50000000 12gHtU8z4HNymJUBetcyY2MU8CYYfszq5X 2011/01/22 spent The big number is the transaction ID, suitable for plugging into blockexplorer.com (http://blockexplorer.com). Next is the bitcoin amount, your address that received the bitcoins, and the date of the transaction. Finally come the optional words change and spent. Change means this transaction produced change as a side effect of a payment you made to others, and the address shown is the change address, which is largely hidden in the client UI. Spent means that the bitcoin(s) associated with this transaction have been spent and are no longer available. There are basically three types of wallet transactions. First are payments from someone else to a wallet key. Next are payments to others which happen to exactly use up one or more available transactions, with nothing left over. These are shown as "payment" in the address field and are always marked as spent. Last are payments where there were bitcoins left over, which get returned to a new address. These are the ones which are shown as change. To see the transactions which are available for spending, filter out the spent ones with grep -v: Code: ./bc_key EVERYTHING ~/.bitcoin/wallet.dat | grep ^tx | grep -v spent\$ Code: tx cff5962c80af06506d6583710fdbde01b95e0bf4a37df27af82ee5038b241016 9.00000000 1NiihskVid2GTWEJjKDaft67aFkeCJTTaE 2011/02/06 change These are really my "bitcoins". They are what I have available to spend. The sum of the bitcoin amounts should equal my wallet balance. Any spend I make will come from one or more of these transactions. Generally, the Bitcoin client will try to combine one or more small transactions to make a payment, otherwise it will use the smallest single transaction capable of funding the payment. Although my wallet doesn't show it too clearly, it's not unusual for a single Bitcoin address to be funded by multiple transactions. But for making payments, this is basically irrelevant. Individual transactions are picked to fund payments without regard to whether some of them happen to use the same address. Title: Re: Displaying bitcoins in wallet Post by: adv on February 13, 2011, 08:58:50 AM I debianize this program (http://bitcointalk.org/index.php?topic=2207.msg48138#msg48138) (Hal version). Package named bc-key, aviable for i386 and amd64.
Short link: http://home.agalakov.spb.ru/debian/pool/main/b/bc-key/ Quote Debian repository use unstructions: http://home.agalakov.spb.ru/debian/use_this_repo.txt All additional and updates info will be write in this topic: http://bitcointalk.org/index.php?topic=2207Browesable debian repository: http://home.agalakov.spb.ru/debian/ Quick add repo: Code: deb http://home.agalakov.spb.ru/debian unstable main contrib non-free Please leave in this topic (http://bitcointalk.org/index.php?topic=2207) your feedback, suggestions and bug reports. |