Commit Graph

8 Commits

Author SHA1 Message Date
Esteban Ordano
f7f7d147c6 Add change features 2014-12-16 22:39:25 -03:00
Manuel Araoz
49192a1ed7 style change to BufferUtil 2014-12-16 13:33:57 -03:00
Esteban Ordano
de4d2884c7 Modify Transaction to use Multisig
* Allow `Script#add` to add a Script causing concatenation of opcodes
* Add `Script#equals` to compare scripts
* Add `Script#fromAddress`
* Drop `_payTo` methods
* Add `Script.buildP2SHMultisigIn`

Greatly simplifying the internal transaction object
2014-12-15 18:19:54 -03:00
Esteban Ordano
af43228daf Add PublicKeyHashInput and ScriptHashInput.
Remove `_outpoints`, `_utxos` from Transaction, as that info
can be efficiently retrieved from the inputs
2014-12-15 18:19:39 -03:00
Braydon Fuller
ad4bc9324f Transaction: Use Script toString for transaction JSON output 2014-12-13 14:54:07 -05:00
Braydon Fuller
b544b0594d Added test to check that Transaction fromJSON could initialize from toJSON, and fixed a bug. 2014-12-13 14:54:07 -05:00
Braydon Fuller
002eb3dcf5 Transaction: Added toObject method and changed toJSON to return a string 2014-12-12 19:03:14 -05:00
Esteban Ordano
ef49dda0fd Move input to subfolder before refactor
Gonna inherit from it on two subclasses: "P2SH Input" and "P2PKH Input"

They'll have a `addSignature` method, to deal with new signatures,
a `clearSignatures`, in case the outputs change and the signatures get
invalidated, `countMissingSignatures`, and a reference to the UTXO
they'll be spending, so all logic regarding "p2sh mapping" gets to
be in here and the Transaction class is not polluted.
2014-12-11 09:18:20 -03:00