Commit graph

89 commits

Author SHA1 Message Date
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
Daniel Cousens
53595784e1 ECSignature: fixes for canonical signatures 2014-06-20 15:52:04 +10:00
Daniel Cousens
ebe670475e network: moves tests to fixtures 2014-06-18 17:28:28 +10:00
Daniel Cousens
8eaf44881a Transaction: improve hash length checking + tests 2014-06-17 20:18:39 +10:00
Daniel Cousens
6ea89eeaae Transaction: data driven tests 2014-06-17 11:55:43 +10:00
Daniel Cousens
626f8fb220 ECSignature: add tests for scriptSignature 2014-06-16 15:47:41 +10:00
Daniel Cousens
eb3d9a25f7 ecdsa: moved all signature encoding to ECSignature 2014-06-16 15:47:41 +10:00
Daniel Cousens
576d5dfa3f Scripts: move test data to fixtures 2014-06-15 00:40:28 +10:00
Daniel Cousens
4f8040f8d4 ecdsa: add invalid test fixtures for recoverPubKey 2014-06-15 00:40:21 +10:00
Daniel Cousens
38a2475bf5 scripts: adds example multisig inputScript 2014-06-14 01:01:11 +10:00
Daniel Cousens
b68b1d5da4 Script: fixes pubKeyInput and adds a test 2014-06-14 00:39:25 +10:00
Daniel Cousens
7e5af52cd1 Transaction: mass rename from SPK/SS to Input/Output
I think it is important we maintain some reasoning that an Input script
is actually a script signature, but in the end, these names are more
coherent and understandable when reasoning with our code.  So I think
its OK we break tradition with bitcoind.
2014-06-13 11:36:31 +10:00
Daniel Cousens
be29f50457 Address: fix consistent casing 2014-06-13 10:52:07 +10:00
Daniel Cousens
4ce9015f3b use ecurve instead of custom ec 2014-06-10 17:58:13 +10:00
Daniel Cousens
f20ffec8b3 tests: always use for, it testing style 2014-06-07 19:46:06 +10:00
Daniel Cousens
61b4216afb script: fix capitalization in test fixture 2014-06-07 19:34:09 +10:00
Daniel Cousens
eb3a6bcb31 all: rename D to d as per SEC convention 2014-06-07 18:24:16 +10:00
Kyle Drake
9b5dfbd865 Merge pull request #206 from dcousens/base58rework
Base58 Check rework
2014-06-04 16:54:18 -07:00
Daniel Cousens
8433d73d06 convert: use Buffers and add more tests 2014-06-04 15:46:40 +10:00
Daniel Cousens
d39662e375 Base58check: no longer encodes version separately 2014-06-04 15:23:37 +10:00
Wei Lu
63e6cf987f Merge pull request #203 from dcousens/hdwallettests
HDWallet tests and strict constructor
2014-06-04 13:05:15 +08:00
Daniel Cousens
64e307b13f HDWallet: rename to HDNode 2014-06-03 17:08:42 +10:00
Daniel Cousens
99bb69bf20 HDWallet: moves hardened info to test data more explicitly 2014-06-03 16:12:36 +10:00
Wei Lu
c76d3cef37 Merge pull request #202 from dcousens/ecneg
ECKey -D test and light cleanup
2014-06-03 13:38:25 +08:00
Daniel Cousens
938c43649d HDWallet: remove unnecessary Base58 context on fromBuffer tests 2014-06-01 16:48:41 +10:00
Daniel Cousens
260705a24a HDWallet: consistent test data ordering
Also adds network parameter for later moving the network specific tests
to be data driven.
2014-06-01 16:42:01 +10:00
Daniel Cousens
0e61f41a52 HDWallet: fix test data descriptions 2014-06-01 16:41:44 +10:00
Daniel Cousens
e8e862f632 HDWallet: adds PubKey validation 2014-05-31 20:40:57 +10:00
Daniel Cousens
759aeb9abc HDWallet: remove repeated assertion 2014-05-31 20:40:57 +10:00
Daniel Cousens
c0006c299f HDWallet: use new constructor 2014-05-31 20:40:57 +10:00
Daniel Cousens
58dd86bda1 HDWallet: moves fromBuffer tests to data driven style 2014-05-31 15:44:06 +10:00
Daniel Cousens
2b2081bed9 base58check: buffers only, remove explicit 0
Undefined is treated as zero if it ever gets to this point anyway, so no
value is added by having this default param here.

A test fixture to verify this behaviour is added.
2014-05-31 15:05:33 +10:00
Daniel Cousens
978f0c5406 ECKey: adds test to ensure throws on negative D 2014-05-31 15:05:33 +10:00
Daniel Cousens
5b7873d05b bufferutils: test fixture filename copies parent 2014-05-31 14:24:43 +10:00
Daniel Cousens
b9bdf21cbe bufferutils: use verifuint for 64 bit integers
Taken from browserify-buffer.

Also adds a few more tests to assert this is working correctly from both
read and write perspectives.
The assertion in for writePushDataInt in the 32 bit case was
unnecessary as that is handled by buffer.writeUInt32LE anyway.
2014-05-31 14:24:43 +10:00
Daniel Cousens
80da2ed2d5 HDWallet: add fromBase58 exception checks 2014-05-30 19:01:03 +10:00
Daniel Cousens
bda1a8321c bufferutils: unrolls tests and adds more 16 bit test fixtures 2014-05-29 16:26:15 +10:00
Daniel Cousens
d18f2dba00 bufferutils: add PUSHDATA implementation 2014-05-29 16:06:19 +10:00
Daniel Cousens
36a1d579f8 coretests: reverse inputs for simplicity of testing
To save on us building a hash map with which to check the inputs,
instead I just ensure that the order of the inputs is the same as it is
in the serialized transaction.
2014-05-29 16:06:19 +10:00