Manuel Araoz
b92fd915eb
increase coverage for Input and Output, fix some bugs
10 years ago
Esteban Ordano
cca1e2148c
Improve test coverage on multisig
10 years ago
Esteban Ordano
605be801af
Add Signature subclass for Transaction Signatures
10 years ago
Manuel Araoz
aa1158097d
fix bug in change calculation
10 years ago
Esteban Ordano
78189f61d9
Rewrite of Transaction doc
10 years ago
Esteban Ordano
4781c4328f
Better error message on unsupported input types
10 years ago
Manuel Araoz
c664f211d2
add BufferReader.readVarLengthBuffer
10 years ago
Esteban Ordano
ff82ccec71
Return undefined instead of a null signature
10 years ago
Esteban Ordano
dc6ff32290
Make serialization roundtrip recover info about inputs
10 years ago
Yemel Jardi
e57d02c03c
Use define immutable helper
10 years ago
Esteban Ordano
9a73338c91
Add tests for changes to Transaction interface
10 years ago
Esteban Ordano
e5631b1a69
Modify transaction interface
* Add checks when serializing
* Add default _estimateSize to generic inputs
* Fix multisig size estimation
* Change _addOutput to addOutput
* Add addInput and using that internally
* Split `getFee` out from `_updateChangeOutput`
10 years ago
Esteban Ordano
a352937566
Fix transaction order
10 years ago
Manuel Araoz
84deec297a
add tx_invalid tests
10 years ago
Esteban Ordano
f7f7d147c6
Add change features
10 years ago
Esteban Ordano
ce8927690f
Add count for missing signatures
10 years ago
Esteban Ordano
d4b8c4adc6
Remove globals
10 years ago
Esteban Ordano
ed9a9f6da9
Fix wrong jsdocs
10 years ago
Manuel Araoz
49192a1ed7
style change to BufferUtil
10 years ago
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
10 years ago
Esteban Ordano
1535805f1c
Add PublicKeyHashInput class
10 years ago
Esteban Ordano
af43228daf
Add `PublicKeyHashInput` and `ScriptHashInput`.
Remove `_outpoints`, `_utxos` from Transaction, as that info
can be efficiently retrieved from the inputs
10 years ago
Braydon Fuller
ad4bc9324f
Transaction: Use Script toString for transaction JSON output
10 years ago
Braydon Fuller
b544b0594d
Added test to check that Transaction fromJSON could initialize from toJSON, and fixed a bug.
10 years ago
Braydon Fuller
002eb3dcf5
Transaction: Added toObject method and changed toJSON to return a string
10 years ago
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.
10 years ago