Manuel Araoz
b37a8d2f32
new version of extend
2015-01-13 20:18:28 -03:00
Manuel Araoz
f2eeb7664e
fix extend
2015-01-13 20:11:40 -03:00
Manuel Araoz
149b7fafed
new error system with no code generation
2015-01-13 19:02:16 -03:00
Esteban Ordano
0f73c3f7a3
Throw error if dust amount is detected
2015-01-08 18:02:59 -03:00
Esteban Ordano
dbf47ef78f
transaction: better errors for signature methods
...
Closes #868
2014-12-31 02:10:51 -03:00
Yemel Jardi
e7839d9ba2
Add from/to Fiat methods to Unit class
2014-12-25 19:04:03 -03:00
Manuel Aráoz
b69997711b
Merge pull request #823 from eordano/review/jsdoc-unit
...
Review Unit class
2014-12-19 15:27:55 -03:00
Esteban Ordano
a379876e0b
Delete lint errors from autogenerated file
2014-12-19 14:21:48 -03:00
Esteban Ordano
be599e5a1b
Review Unit class
...
* Add 100% code coverage
* Add custom error code
* Linted source and test
* More descriptive test messages
2014-12-19 13:18:22 -03:00
Esteban Ordano
9a73338c91
Add tests for changes to Transaction interface
2014-12-18 20:38:19 -03:00
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`
2014-12-18 14:09:44 -03:00
Esteban Ordano
d4b8c4adc6
Remove globals
2014-12-16 17:30:43 -03:00
Esteban Ordano
1b19255fd1
Fix #756 : Preconditions Invalid Argument
2014-12-16 13:52:25 -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
Esteban Ordano
0c28bc1786
Split buildPKH arguments, add Copy constructor on publickey
2014-12-10 12:46:21 -03:00
Esteban Ordano
ea17a6ace1
Add a preconditions module, and refactor errors
...
100% code coverage for the preconditions module.
Usage:
```
$.checkState(something === anotherthing, 'Expected something to be
anotherthing');
$.checkArgument(something < 100, 'something', 'must be less than 100');
$.checkArgumentType(something, PrivateKey, 'something'); // The third
argument is a helper to mention the name of the argument
$.checkArgumentType(something, PrivateKey); // but it's optional (will
show up as "(unknown argument)")
```
2014-12-10 11:56:38 -03:00
Esteban Ordano
d29d8d267d
Add message to stack
2014-12-03 11:49:33 -03:00
Esteban Ordano
121b9fc090
Fixes issues with errors
2014-12-03 10:06:44 -03:00
Esteban Ordano
13fd2592fc
Add autogenerated errors
2014-11-30 09:47:44 -03:00