Esteban Ordano
8d68e9cb02
Use satoshisBN internally
10 years ago
Esteban Ordano
bdeac4e67d
Add inspect method to output
10 years ago
Esteban Ordano
0f73c3f7a3
Throw error if dust amount is detected
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
Esteban Ordano
d053599fd2
Improve test coverage
10 years ago
Esteban Ordano
fe86abc093
Add `change` when serializing transaction
10 years ago
Yemel Jardi
e57d02c03c
Use define immutable helper
10 years ago
Braydon Fuller
bce28cd227
Fixed bug in IE11 that would cause MAX_MONEY verification test to fail.
10 years ago
Esteban Ordano
7cf826249b
Add jsdocs and documentation to UnspenOutput and Insight
10 years ago
Esteban Ordano
11975bc0df
Rename UTXO to Transaction.UnspentOutput
10 years ago
Esteban Ordano
476f009b4d
Add Insight and UTXO class
10 years ago
Esteban Ordano
dbf47ef78f
transaction: better errors for signature methods
Closes #868
10 years ago
Manuel Araoz
fb57a60666
fix all tests
10 years ago
Manuel Araoz
370f69df88
refactor BN and ECDSA
10 years ago
Esteban Ordano
99db72ba90
Add `uncheckedAddInput` function
* For internal usage: for example, testing Script.Interpreter
10 years ago
Esteban Ordano
9a73338c91
Add tests for changes to Transaction interface
10 years ago
Braydon Fuller
6d42e01718
Fix formatting issue with examples
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
24dc84d614
Dont lose sighash when signing with multiple keys
10 years ago
Esteban Ordano
a352937566
Fix transaction order
10 years ago
Esteban Ordano
6be0c047b7
Update index for the documentation
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
Manuel Araoz
b3be9461cf
tx_valid tests passing!
10 years ago
Esteban Ordano
d4b8c4adc6
Remove globals
10 years ago
Esteban Ordano
ed9a9f6da9
Fix wrong jsdocs
10 years ago
Manuel Araoz
4fcc048311
script interpreting working
10 years ago
Manuel Araoz
49192a1ed7
style change to BufferUtil
10 years ago
Manuel Araoz
ddd11e908c
all script_valid tests passing!
10 years ago
Manuel Araoz
0ddec23c02
fix some more tests
10 years ago
Manuel Araoz
a761ac91c2
some more passing tests
10 years ago
Manuel Araoz
73874ae873
import Sighash
10 years ago
Manuel Araoz
9aa6152f25
trying to fix OP_CHECKSIG script evaluation
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
b13c4fb0c9
Added inspect prototype G5
10 years ago
Braydon Fuller
6f6d568661
Transaction: toNumber/fromNumber to set satoshis
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
f43c2f9aa3
Fixed bug, toObject should use other object's toObject
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
Esteban Ordano
0c28bc1786
Split buildPKH arguments, add Copy constructor on publickey
10 years ago
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
10 years ago