Commit Graph

8 Commits

Author SHA1 Message Date
Ryan X. Charles 8e85eba08b pushin, pushout
Add convenience methods for adding new inputs and outputs.
2014-09-23 22:09:41 -07:00
Ryan X. Charles c07d509623 initialize transaction
In order to add convenience methods to a transaction, such as pushing new
inputs and outputs, we need to first have the notion of an initialized
transaction, which is actually not blank. An initialized transaction just has
default values for everything, such as no inputs and no outputs, and default
version and nlocktime.
2014-09-23 22:01:30 -07:00
Ryan X. Charles e984736736 allow bufs in constructors
For Transaction, Block and Blockheader. This is a convenience so if you happen
to have the buffer for one of these, you can make a new one like this:

Transaction(txbuf);

Rather than having to do this:

Transaction().fromBuffer(txbuf);
2014-09-22 13:07:39 -07:00
Ryan X. Charles aff3992ffb transaction hash and id
...the hash is the usual hash, and the id is the reverse of that, which is what
is usually graphically displayed by bitcoind.
2014-09-19 17:25:35 -07:00
Ryan X. Charles e11019a083 toJSON, fromJSON
Every object should have toJSON and fromJSON methods so you can have a reliable
way to store and retrieve objects.
2014-09-18 17:52:02 -07:00
Ryan X. Charles cf5b2f1250 varint -> vi canonical spelling 2014-09-17 16:48:23 -07:00
Ryan X. Charles 7ea66e032f add real-world tx to transaction test 2014-09-16 14:39:51 -07:00
Ryan X. Charles 5b25679e15 Transaction 2014-09-16 14:35:26 -07:00