Commit graph

388 commits

Author SHA1 Message Date
Vlad Stan
b77b1a0653 add unit tests for three uncovered cases 2020-09-02 11:16:43 +03:00
Vlad Stan
ec17b06bde cover 'fromBech32(address)' throwing exception & bad 'decodeBech32.data.length' 2020-09-01 15:45:34 +03:00
Vlad Stan
62bb17b045 Separate readUInt64LE fixtures from writeUInt64LE; add two more tests: "n < 0" & "0 < n < 1" 2020-08-31 15:57:09 +03:00
junderw
25b5806cf1
Throw errors when p2wsh or p2wpkh contain uncompressed pubkeys.
This will enforce BIP143 compressed pubkey rules on an address generation level.
2020-05-21 11:11:12 +09:00
d-yokoi
3f6f5ef97a
Merge pull request #1487 from bitcoinjs/addError
Add sanity check for arguments
2019-12-11 13:41:11 +09:00
junderw
48bf08c0d3
Add weight and ability to get strippedsize 2019-11-29 15:30:23 +09:00
junderw
7ef3fe4996
Add sanity check for arguments 2019-10-01 14:54:57 +09:00
junderw
bf45f3638b
WIP: Allow nonWitnessUtxo with segwit 2019-08-23 12:52:04 +09:00
Jonathan Underwood
aca976689f
Merge pull request #1425 from lukechilds/psbt
[WIP] Add PSBT support
2019-07-19 16:01:48 +09:00
junderw
e19bc58b30
Rename methods 2019-07-19 14:53:54 +09:00
junderw
4366b621d7
Add HD signer methods 2019-07-19 11:42:45 +09:00
junderw
19a33f7da8
Add comments and remove fromTransaction 2019-07-18 14:20:44 +09:00
Luke Childs
d790288048 Test the sighashtype is checked when signing 2019-07-11 16:25:30 +07:00
Luke Childs
f25938d3ca Test signing a non-whitelisted sighashtype 2019-07-11 16:24:35 +07:00
junderw
c403757ce8
Add name attribute to Payments 2019-07-11 14:49:26 +09:00
junderw
2f1609b918
Fix: P2WPKH was signing with nonWitnessUtxo 2019-07-11 11:28:09 +09:00
junderw
8a5104c333
Add tests 2019-07-11 11:09:05 +09:00
junderw
266302a3ae
Add P2WSH-P2PK finalize vector 2019-07-11 10:21:36 +09:00
junderw
9ee115b030
assert the fee calculation is correct 2019-07-11 10:11:51 +09:00
Luke Childs
876a241e0c Test finalizeAllInputs against P2WPKH input 2019-07-10 19:23:01 +07:00
Luke Childs
7377566f98 Test finalizeAllInputs against P2SH-P2WPKH input 2019-07-10 19:22:38 +07:00
Luke Childs
f55ee32386 Test finalizeAllInputs against P2PKH input 2019-07-10 19:21:56 +07:00
Luke Childs
bc56ca0fa1 Test finalizeAllInputs against P2PK input 2019-07-10 19:21:33 +07:00
Luke Childs
ec2c14b81f Extract finalizeAllInputs test out of BIP174 test cases 2019-07-10 19:20:10 +07:00
Luke Childs
d051446275 Add P2MS test case to finalizer tests 2019-07-10 18:12:56 +07:00
Luke Childs
47b42e72f4 Refactor and cleanup getFeeRate tests 2019-07-10 18:05:56 +07:00
Luke Childs
da5adcf88f Refactor and cleanup validateSignatures tests 2019-07-10 18:05:56 +07:00
Luke Childs
0d9fa87943 Move nonWitnessUtxo cache tests out into own test 2019-07-09 16:21:08 +07:00
Luke Childs
75f5e8f03c Use Buffer notation in JSON 2019-07-09 16:21:08 +07:00
junderw
8d52ce1668
Add some tests and an input duplicate checker 2019-07-05 16:42:13 +09:00
Luke Childs
dc23b8cce0 Test fromTransaction 2019-07-04 17:00:01 +07:00
Luke Childs
e3efdbdb99 Test BIP174 extractor test cases 2019-07-04 16:24:08 +07:00
Luke Childs
35cf120c33 Add extra combiner test case 2019-07-04 16:24:08 +07:00
Luke Childs
a80155dbdb Test BIP174 finalizer test cases 2019-07-04 16:24:08 +07:00
Luke Childs
4e55ab0f20 Test BIP174 combiner test cases 2019-07-04 16:24:08 +07:00
Luke Childs
30815e9e8f Test BIP174 signer test cases 2019-07-04 16:24:08 +07:00
Luke Childs
a32d1c3eac Test BIP174 updater check test cases 2019-07-04 16:24:08 +07:00
Luke Childs
2501fc92bc Test BIP174 creator check test cases 2019-07-04 16:24:08 +07:00
Luke Childs
a876698d15 Test BIP174 signer check test cases 2019-07-03 17:47:14 +07:00
Luke Childs
54e2e55ef7 Add descriptions to valid test cases from BIP174 spec 2019-07-03 17:47:13 +07:00
Luke Childs
336c76bfda Add descriptions to invalid test cases from BIP174 spec 2019-07-03 17:47:13 +07:00
Luke Childs
2662e46987 Test BIP174 valid test cases 2019-07-03 17:47:13 +07:00
Luke Childs
1fc2e146ea Test BIP174 invalid test cases 2019-07-03 17:47:13 +07:00
Luke Childs
343297a359 Test error if UTXO doesn't exist 2019-07-02 18:34:19 +07:00
Luke Childs
b8789c5d13 Test input exists check 2019-07-02 18:29:14 +07:00
Luke Childs
658ea845b1 Test matching privkey check 2019-07-02 18:20:55 +07:00
Luke Childs
7ff40cebc4 Recreate test case PSBTs and try and sign them with the valid key 2019-07-02 18:15:30 +07:00
Luke Childs
10b3aff4fd Test redeem script witness utxo check 2019-06-28 18:15:01 +07:00
Luke Childs
3a82486fb5 Loop over PSBT tests from fixtures 2019-06-28 16:55:00 +07:00
junderw
1b39d9caf4
Make errors clearer and increase coverage 2019-06-17 13:34:20 +09:00