Commit Graph

56 Commits

Author SHA1 Message Date
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
Braydon Fuller ad9dd2a41f Check that the public key is valid for outputs. 2015-07-14 09:58:05 -04:00
Braydon Fuller 9f4b1a2c26 Speed up isPublicKeyOut 2015-07-13 18:51:52 -04:00
Braydon Fuller d9047eebf0 Detect if scriptSig (input) or scriptPubKey (output) is previously known. 2015-07-09 11:30:20 -04:00
Braydon Fuller 6d86c99314 Seperate getAddressInfo for input or output only use. 2015-07-08 16:43:49 -04:00
Braydon Fuller e8446d4537 Removed double network call 2015-07-08 15:29:54 -04:00
Braydon Fuller ef26931645 Use late definition to resolve circular dependency. 2015-07-08 15:11:06 -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
Braydon Fuller 770e0e3a7f Full public key validation isn't necessary. 2015-07-06 12:52:11 -04:00
Braydon Fuller febbcc6a6e Check pubkeyBuf before pubkeyBuf.length 2015-07-06 10:26:18 -04:00
Braydon Fuller e5e783fbf9 Optimized performance of script.isPublicKeyHashIn() 2015-07-02 19:26:39 -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 db6234b500 remove duplicate code, increase coverage 2015-04-29 19:45:41 -03:00
Manuel Araoz fe17f20a97 remove console.log 2015-04-29 18:57:17 -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 2cccf20c9d improve docs to show signatures type 2015-04-22 14:33:09 -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 e0b1ca0e10 move some script logic from Address to Script 2015-03-18 17:59:09 -03:00
Manuel Araoz 3619c7c9e2 fix problematic cases 2015-03-18 17:40:26 -03:00
Manuel Araoz 62ea45a524 refactor Address<->Script relation 2015-03-18 16:54:16 -03:00
eordano 575993967c Standardize optional parameters to Closure syntax 2015-02-24 15:31:13 -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
Manuel Araoz c664f211d2 add BufferReader.readVarLengthBuffer 2015-02-04 13:04:55 -03:00
Esteban Ordano 03f794b4a3 Add shorthand method toHex to Script 2015-02-03 17:35:44 -03:00
Esteban Ordano 26e688ae06 Add .toScriptHashOut() to scripts
- Also sort gulpfile dependencies
2015-01-09 16:09:36 -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
Yemel Jardi d369154162 Script: remember network when creating from address or pubkey 2015-01-06 10:28:48 -03:00
Braydon Fuller ff4a6f549d Fixed bugs in IE11 2015-01-05 23:27:20 -05:00
Yemel Jardi 9deec5e1c2 Use defaultNetwork in Script.toAddress 2015-01-02 15:38:28 -03:00
Esteban Ordano f74c7f3929 Simplify script to address method 2014-12-30 16:23:17 -03:00
Esteban Ordano ffca4cfb6f Fixes Script test case for coverage and style 2014-12-30 15:34:30 -03:00
Esteban Ordano c1a1571535 Fix JSDoc for script 2014-12-30 15:27:05 -03:00