Commit Graph

50 Commits

Author SHA1 Message Date
Ruben de Vries b655659812 `Script.classify` should first check output types before checking input types. 2016-07-05 12:32:24 +02:00
adam b582c2a4fc correcting test opcode length error 2015-10-13 12:41:05 +01:00
adam f0640a42f7 fixing incorrect check of signature validity 2015-09-17 15:19:05 +01:00
Patrick Nagurny 7c6df33ab7 Merge pull request #1301 from braydonf/pubkey
Added support for signing publickey inputs.
2015-07-30 10:21:44 -04:00
Patrick Nagurny a8b78a2f3f Merge pull request #1295 from braydonf/script-asm
Add script methods `fromASM()` and `toASM()`
2015-07-30 10:17:41 -04:00
Patrick Nagurny 6ac7ad9da1 Merge pull request #1293 from braydonf/script-data-encoding
Added encoding type for buildDataOut
2015-07-30 10:14:31 -04:00
Braydon Fuller eb077eb3df Added support for signing publickey inputs. 2015-07-27 15:16:58 -04:00
Patrick Nagurny edfbcb6dd5 Merge pull request #1291 from braydonf/optimize-script
Optimized performance of script.isPublicKeyHashIn(). Fixes #1289
2015-07-07 13:06:54 -04:00
Braydon Fuller 55d8c4156a Add tests for script.toASM() and new method script.fromASM() 2015-07-06 20:24:15 -04:00
Braydon Fuller b81a64e8cf Added script.toASM method 2015-07-06 19:50:10 -04:00
Braydon Fuller 3ad484fff0 Added encoding type for buildDataOut 2015-07-06 19:14:48 -04:00
Braydon Fuller 7e23109f9b Added more tests around script.isPublicKeyHashIn 2015-07-06 13:12:20 -04:00
Esteban Ordano 4280b993e0 Add CLTV (BIP65) support 2015-07-01 18:46:54 -07:00
Gregg Zigler b6d44f4622 camelCase variable names 2015-06-25 17:53:50 -04:00
Gregg Zigler 77645c7f03 remove skipped tests since equalivant boolean tests already exist 2015-06-24 14:44:27 -04:00
Gregg Zigler 183ffab02b match bitcore style standards, rename arg, set default to true 2015-06-24 14:18:55 -04:00
Gregg Zigler a4b8c06a2d get-signature-count needed to measure txs with many inputs or outputs 2015-06-24 13:30:25 -04:00
Braydon Fuller 7723dd302a Added test case for an empty OP_RETURN for script.getData() Fixes #1237 2015-05-18 10:39:15 -04:00
Braydon Fuller d8e90685f4 Fixed script.isPublicKeyHashIn bug with variable length signatures.
- DER encoded signatures have a max length of 72 bytes, however a minimum size isn't defined.
- R and S values can have arbitrary lengths
- For more information: https://github.com/bitcoin/bips/blob/master/bip-0062.mediawiki#der-encoding
2015-05-08 22:09:42 -04:00
Manuel Araoz a018a23b6b fix bug in recognizing p2sh input scripts 2015-04-30 03:24:15 -03:00
Manuel Araoz bbd48f868d remove comment 2015-04-29 19:47:35 -03:00
Manuel Araoz db6234b500 remove duplicate code, increase coverage 2015-04-29 19:45:41 -03:00
Manuel Araoz d556a0c33d fix regressions 2015-04-29 18:55:42 -03:00
Manuel Araoz dfc075e5d1 fix block parsing problem 2015-04-29 17:29:33 -03:00
Manuel Araoz 270413a655 add simpler test that fails 2015-04-29 15:54:41 -03:00
Manuel Araoz ee6f8d35ef increase script test coverage 2015-04-22 14:32:10 -03:00
Kirill Fomichev 116024a7cb fix Script.isPublicKeyHashOut 2015-03-29 20:55:13 +03:00
Manuel Araoz ef7eafbb0c increase test coverage and fix some bugs 2015-03-18 18:58:41 -03:00
Manuel Araoz 3619c7c9e2 fix problematic cases 2015-03-18 17:40:26 -03:00
Manuel Araoz a9328d76ff add extra test 2015-03-18 17:22:32 -03:00
Manuel Araoz 62ea45a524 refactor Address<->Script relation 2015-03-18 16:54:16 -03:00
Manuel Aráoz e2ff93b714 Merge pull request #1083 from eordano/feature/multisigchecks
Transaction: Check that threshold is less than amount of signatures
2015-02-18 12:01:58 -03:00
eordano 1a5780e35e Script/Address: Add check for valid number of threshold needed 2015-02-18 11:53:22 -03:00
eordano 0bbde0c9de Script: Update max length for standard opreturn to 80 2015-02-18 10:46:47 -03:00
Esteban Ordano 73a973359b Fix invocations to binary operations called on numbers 2015-02-05 17:28:45 -03:00
Esteban Ordano 03f794b4a3 Add shorthand method toHex to Script 2015-02-03 17:35:44 -03:00
Esteban Ordano cfecfa2d8d Merge pull request #904 from braydonf/bug/safari-address
Fixed bugs in Safari and IE. Closes #837 and #784
2015-01-07 09:27:07 -05:00
Braydon Fuller bce28cd227 Fixed bug in IE11 that would cause MAX_MONEY verification test to fail. 2015-01-06 12:00:28 -05:00
Yemel Jardi d369154162 Script: remember network when creating from address or pubkey 2015-01-06 10:28:48 -03:00
Yemel Jardi 9deec5e1c2 Use defaultNetwork in Script.toAddress 2015-01-02 15:38:28 -03:00
Esteban Ordano ffca4cfb6f Fixes Script test case for coverage and style 2014-12-30 15:34:30 -03:00
Esteban Ordano d688222769 Add toAddress(network) functionality to scripts 2014-12-30 15:23:09 -03:00
Esteban Ordano dc92bdd474 Add getData functionality to script 2014-12-30 14:30:36 -03:00
Manuel Araoz fb57a60666 fix all tests 2014-12-19 18:53:21 -03:00
Manuel Araoz 6c518f1f45 refactoring interpreter 2014-12-19 18:28:52 -03:00
Manuel Araoz 370f69df88 refactor BN and ECDSA 2014-12-19 17:23:53 -03:00
Esteban Ordano 99db72ba90 Add `uncheckedAddInput` function
* For internal usage: for example, testing Script.Interpreter
2014-12-19 10:30:20 -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
Manuel Araoz 3d7b0c7474 standardize test files 2014-12-17 19:11:20 -03:00
Manuel Araoz 3dd86446e0 add Interpreter docs and refactor a bit 2014-12-17 17:25:00 -03:00