Commit graph

227 commits

Author SHA1 Message Date
Daniel Cousens
d85df4a6d6 TransactionBuilder: remove use of assert 2015-08-14 10:56:31 +10:00
Daniel Cousens
254b670427 add types 2015-08-14 10:56:30 +10:00
Daniel Cousens
7a6936674e tests: add explicit test for inconsistent network exception 2015-08-07 17:01:31 +10:00
Daniel Cousens
f47decaa2f HDNode: adopt new strict network list parameters 2015-08-07 16:36:10 +10:00
Daniel Cousens
6443e4c2b6 ECPair: support strict network syntax 2015-08-07 16:36:10 +10:00
Daniel Cousens
bdf92f73b4 HDNode: use throw over assert 2015-07-28 17:42:10 +10:00
Daniel Cousens
1a4000cc98 address: throw Invalid address instead of hash/version for fromBase58Check 2015-07-24 12:18:00 +10:00
Daniel Cousens
13f414c122 remove Address constructor 2015-07-24 12:18:00 +10:00
Daniel Cousens
e42bd133fe tests: clearer length bytes 2015-07-07 17:59:46 +10:00
Daniel Cousens
e8fd3887da ECSignature: account for SIGHASH being ignored 2015-07-07 17:47:29 +10:00
Daniel Cousens
92f9342c69 adhere more closely to BIP66 2015-07-07 17:42:01 +10:00
Daniel Cousens
2ffa041afa fixtures: ECDSA, fix r=s=-n to be accurate 2015-06-23 16:11:34 +10:00
Daniel Cousens
b5ff9db8fd fixtures: ECDSA signatures should be DER encoded if possible 2015-06-23 16:11:34 +10:00
Daniel Cousens
5b95fd6ae3 fixtures: ECDSA, fixtures were mixed decimal/hex 2015-06-23 16:11:34 +10:00
Daniel Cousens
4c030be343 ecdsa: remove unused verifyRaw 2015-04-28 16:51:20 +10:00
Daniel Cousens
4c8b0f38ea replace ECKey/ECPubKey with ECPair 2015-03-19 13:33:28 +11:00
Daniel Cousens
7559ee880d add ECPair module 2015-03-19 13:33:28 +11:00
Daniel Cousens
bd464d7cb5 networks: remove estimateFee entirely 2015-03-17 08:23:14 +11:00
Daniel Cousens
7d2e1cd3ba networks: remove exhaustive non-top 5 networks 2015-03-17 08:23:13 +11:00
Daniel Cousens
281ecdc06e networks: remove failing tests, cannot be supported anyway 2015-03-16 11:33:56 +11:00
Daniel Cousens
69eb58c783 tests: ignore txHexIncomplete, instead check scriptSig after each signature 2015-03-11 12:37:11 +11:00
Daniel Cousens
e80f4803d9 tests: refactor multisig test construction 2015-03-11 12:12:50 +11:00
Daniel Cousens
7cd60aaba3 tests: remove unnecessary script tests from TxBuilder 2015-03-11 11:33:25 +11:00
Ruben de Vries
745eace950 add tests for various PS2H multisig signing scenarios
redid P2SH multisig tests to use fixtures
2015-03-05 10:21:40 +01:00
Daniel Cousens
7a469f6620 Merge pull request #372 from bitcoinjs/op0fix
TransactionBuilder multisig OP_0 fix
2015-03-05 18:46:16 +11:00
Daniel Cousens
6a86f22e45 Merge pull request #375 from bitcoinjs/pushdatafix
Scripts, fix invalid push data int parsing
2015-03-05 18:45:23 +11:00
Daniel Cousens
837424ed16 tests: add bitcoin core block fixtures
Data from
https://github.com/bitcoin/bitcoin/blob/master/src/test/bloom_tests.cpp
2015-03-05 01:16:58 +11:00
Daniel Cousens
4333217bdd tests: add example non-standard scripthash 2015-03-04 21:30:31 +11:00
Daniel Cousens
d00ec9af29 scripts: fix isScriptHashInput classification 2015-03-04 21:00:07 +11:00
Daniel Cousens
2f100e0eae tests: add failing pushDataInt fixtures 2015-03-04 20:47:52 +11:00
Daniel Cousens
cdcbb2ccb4 tests: fix inconsistent key compression 2015-03-03 10:43:37 +11:00
Daniel Cousens
c79fecffa3 tests: add failing test for transaction builder multisig 2015-03-03 09:54:55 +11:00
Daniel Cousens
af3491822e scripts: multisigInput only uses scriptPubKey for validation, OP_0 validation not necessary 2015-03-03 09:53:57 +11:00
Wei Lu
b13271477c Merge pull request #317 from bitcoinjs/2.0.0
pre-2.0.0, deprecations
2015-03-03 01:25:51 +08:00
Daniel Cousens
3a15f0c6ba tests: add scriptHash(pubKeyHash) test fixture 2015-03-02 18:32:24 +11:00
Daniel Cousens
8d3686d046 remove deprecated functionality 2015-03-02 17:27:16 +11:00
Daniel Cousens
08cc8f8621 crypto: remove Hmac* exposure in API 2015-03-02 15:33:39 +11:00
Daniel Cousens
f87ac58df0 tests: add reverse order multisig 2-of-2 2015-02-23 11:37:33 +11:00
Daniel Cousens
1da8297f3c Merge pull request #363 from bitcoinjs/coinbase
Coinbase Transaction parsing
2015-02-23 09:10:48 +11:00
Daniel Cousens
445eb260c0 tests: add failing Coinbase transaction fixture 2015-02-19 12:51:24 +11:00
Daniel Cousens
c9826221fb scripts: catch error in Script.fromBuffer 2015-02-16 02:39:57 +11:00
Daniel Cousens
d68eb496a9 tests: use fffff... unless txHash is actually useful 2015-02-15 21:12:24 +11:00
Daniel Cousens
3a371fccec TxBuilder: remove initialized field from signature inputs 2015-02-13 13:18:28 +11:00
Daniel Cousens
d3af28e37e tests: fix TxBuilder fixtures to be consistent w/ compression 2015-02-13 13:18:28 +11:00
Daniel Cousens
1fde0a401d tests: move inconsistent hashType/redeemScript test 2015-02-13 13:18:28 +11:00
Daniel Cousens
ebbe1278a0 tests: add non-standard input fixture 2015-02-13 13:18:28 +11:00
Daniel Cousens
f0c4a76325 tests: add scriptHash(pubKey) test fixture 2015-02-13 13:18:28 +11:00
Daniel Cousens
3f53b528a8 tests: reduce setup-code duplication 2015-02-13 13:18:28 +11:00
Daniel Cousens
95911c5dde tests: consistent test data names 2015-02-13 13:18:28 +11:00
Daniel Cousens
4c9fd6010e TxBuilder: fix failing test for non-standard/multisig inputs
Instead of failing in `fromTransaction`, TxBuilder will now only fail in
`sign` if you attempt to sign a non-standard input.

Transactions with non-standard inputs can only be built with
buildIncomplete() (for now).
2015-02-13 13:18:26 +11:00
Daniel Cousens
b048627a59 tests: move TxBuilder.sign tests to fixtures 2015-02-13 13:18:00 +11:00
Daniel Cousens
396e4d4235 tests: add [failing] test for nulldata signing 2015-02-13 13:18:00 +11:00
Daniel Cousens
35fa86c1f9 tests: add [failing] raw multisig fixture for TxBuilder 2015-02-13 13:18:00 +11:00
Daniel Cousens
f8b9a5f2c3 Merge pull request #356 from bitcoinjs/htenforce
ECSignature: enforce valid hashType in toScriptSignature
2015-02-13 12:00:21 +11:00
Daniel Cousens
c35d4b46c5 scripts: add allowIncomplete for multisig scripts 2015-02-12 19:50:00 +11:00
Daniel Cousens
c9db90dc4d ECSignature: enforce valid hashType in toScriptSignature 2015-02-05 16:30:00 +11:00
Daniel Cousens
cbf8c6f932 tests: format JSON consistently 2015-01-23 16:37:10 +11:00
Daniel Cousens
a529b3fa0b TxBuilder: copy version/locktime in fromTransaction 2015-01-23 16:35:09 +11:00
Daniel Cousens
0e5c7b2a5a tests: add bip32JPs RFC6979 test vectors and tests 2015-01-05 12:31:28 +11:00
Daniel Cousens
c716367f77 tests: add test for null sequence number 2014-12-16 15:15:39 +11:00
Daniel Cousens
fc690d418b tests: rename txid to id in Transaction context 2014-12-13 09:48:31 +11:00
Daniel Cousens
ca4e64d071 tests: use ASM for fixtures, avoid JSON comparison 2014-12-13 09:41:52 +11:00
Daniel Cousens
b6017b0fae HDNode: move isPrivate logic 2014-12-01 10:46:49 +11:00
Daniel Cousens
1ac79b8327 tests: add test for non-matching network 2014-12-01 10:46:49 +11:00
Daniel Cousens
8bdfa881c9 tests: remove unused testing data 2014-12-01 10:46:48 +11:00
Daniel Cousens
311df7e406 HDNode: add optional network flag to import functions 2014-12-01 10:46:48 +11:00
Daniel Cousens
4fca3ac196 network: add failing tests for gamerscoin, viacoin and zetacoin 2014-12-01 10:46:48 +11:00
Daniel Cousens
7fbc397141 Address: use script ASM over hex 2014-11-28 14:02:50 +11:00
Daniel Cousens
4fe0b34f27 Address: no need to check other script types 2014-11-28 13:54:42 +11:00
Daniel Cousens
e4eb743cf9 scripts: expose is* classifiers 2014-11-28 13:51:45 +11:00
Daniel Cousens
c0c47f076a add block.js and tests 2014-11-28 10:35:53 +11:00
Daniel Cousens
ea66edeb5c scripts: add dataOutput convenience function 2014-10-19 12:30:21 +11:00
Daniel Cousens
5d5dcd3d73 remove unused base58 fixtures 2014-10-17 13:24:47 +11:00
Daniel Cousens
ab57630f20 tests: add non-canonical signature test 2014-10-14 16:59:27 +11:00
Daniel Cousens
f6e340f64c tests: add scriptHash redeemScript non-data fixture 2014-10-14 16:59:27 +11:00
Daniel Cousens
f9a5c47d95 tests: add OP_RETURN scripts fixture 2014-10-14 16:59:26 +11:00
Daniel Cousens
f3138dcb68 tests: test non-standard pathway for classifyInput 2014-10-14 16:59:26 +11:00
Daniel Cousens
27a99436df tests: cover all multisigOutput branchs 2014-10-14 16:59:26 +11:00
Daniel Cousens
6dc3b4cc1e tests: add unknown network HDNode version fixture 2014-10-13 17:58:25 +11:00
Daniel Cousens
10630873eb tests: add tests for ecdsa.verify 2014-10-11 13:47:32 +11:00
Daniel Cousens
c96b862530 crypto: remove cryptojs 2014-09-20 11:00:34 +10:00
Daniel Cousens
1d0fd3e9a4 TxBuilder: add more failing cases and error handling 2014-08-31 14:43:35 +10:00
Daniel Cousens
e1479b6fa5 scripts: add error for >n signatures with multisig 2014-08-30 13:13:12 +10:00
Daniel Cousens
1c744cfa5a TxBuilder: add failing test for non-zero vin inputs 2014-08-30 12:09:31 +10:00
Daniel Cousens
f9fed3c815 TxBuilder: adds fromTransaction impl. and basic tests 2014-08-18 08:54:46 +10:00
Daniel Cousens
31ea956e8e TxBuilder: add invalid nulldata case 2014-08-18 08:54:45 +10:00
Daniel Cousens
d0ac9b405a tests: add TxBuilder pubKey test fixture 2014-08-18 08:54:45 +10:00
Daniel Cousens
36b225a3df TxBuilder: use data fixtures for invalid tests 2014-08-18 08:54:45 +10:00
Daniel Cousens
bcbcd58964 TxBuilder: Initial commit and tests 2014-08-18 08:54:45 +10:00
Daniel Cousens
52689fc98b tests: adds r = s = -n ecdsa verify test case 2014-07-30 14:47:21 +10:00
Daniel Cousens
5657dcf2aa ecdsa: add improved test coverage for recoverPubKey 2014-07-29 23:45:50 +10:00
Daniel Cousens
be3ce88a3a ecdsa: enforce positive integers 2014-07-29 23:45:25 +10:00
Daniel Cousens
13c2d377e7 package: use bs58check 2014-07-02 14:37:32 +10:00
Wei Lu
d9e240bbb1 Merge pull request #224 from dcousens/classify
Script classification fixes
2014-06-29 12:05:39 -07:00
Daniel Cousens
9d2784a441 crypto: add RIPEMD160 tests 2014-06-26 19:26:21 +10:00
Daniel Cousens
759bba5c21 scripts: add falsy classifications and fix multisig 2014-06-26 16:22:29 +10:00
Daniel Cousens
13d41f67e9 Script: adds toASM/fromASM 2014-06-25 15:44:15 +10:00
Daniel Cousens
924ecfb998 scripts: add missing test data 2014-06-25 15:20:28 +10:00
Daniel Cousens
62b6a407a6 scripts: break tests down from type structure 2014-06-24 17:30:37 +10:00
Daniel Cousens
63ce1fdfb2 ECSignature: add missing tests for R,S length 2014-06-22 01:19:19 +10:00