Manuel Araoz
b3be9461cf
tx_valid tests passing!
2014-12-16 18:47:58 -03:00
Esteban Ordano
d4b8c4adc6
Remove globals
2014-12-16 17:30:43 -03:00
Esteban Ordano
ed9a9f6da9
Fix wrong jsdocs
2014-12-16 17:21:41 -03:00
Manuel Araoz
4fcc048311
script interpreting working
2014-12-16 13:33:57 -03:00
Manuel Araoz
49192a1ed7
style change to BufferUtil
2014-12-16 13:33:57 -03:00
Manuel Araoz
ddd11e908c
all script_valid tests passing!
2014-12-16 13:33:56 -03:00
Manuel Araoz
0ddec23c02
fix some more tests
2014-12-16 13:33:56 -03:00
Manuel Araoz
a761ac91c2
some more passing tests
2014-12-16 13:33:56 -03:00
Manuel Araoz
73874ae873
import Sighash
2014-12-16 13:33:56 -03:00
Manuel Araoz
9aa6152f25
trying to fix OP_CHECKSIG script evaluation
2014-12-16 13:33:56 -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
1535805f1c
Add PublicKeyHashInput class
2014-12-15 18:19:39 -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
Manuel Aráoz
264a239e5a
Merge pull request #737 from braydonf/bug/to-object
...
Transaction: `toJSON` / `fromJSON` tests
2014-12-15 17:06:08 -03:00
Braydon Fuller
b13c4fb0c9
Added inspect prototype G5
2014-12-14 15:13:01 -05:00
Braydon Fuller
6f6d568661
Transaction: toNumber/fromNumber to set satoshis
2014-12-13 15:10:51 -05: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
f43c2f9aa3
Fixed bug, toObject should use other object's toObject
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
Esteban Ordano
0c28bc1786
Split buildPKH arguments, add Copy constructor on publickey
2014-12-10 12:46:21 -03:00
Esteban Ordano
5c974a8ef2
Refactor transaction to match new API
...
* Refactor transaction into a different subfolder
* Added a lot of tests for sighash and transaction serialization (from
reddit's and Ryan X. Charles' `fullnode`)
* Drop "only" from sighash tests and consolidate logs
2014-12-10 12:44:30 -03:00