Commit graph

1200 commits

Author SHA1 Message Date
Daniel Cousens
f89ef93d1e rm empty file 2018-09-17 10:38:18 +10:00
JP Richardson
09b2475117
remove superfluous package.json file in payments/ 2018-09-16 01:17:04 -05:00
junderw
24d541d0ed
Fix default assignment of validate key for payments
Fixes problems with p2ms experienced in issue below.

Related: #1194
2018-08-28 14:21:18 +09:00
Jonathan Underwood
20551fd380
Merge pull request #1153 from bitcoinjs/paybetter
Increased coverage for payments
2018-08-23 13:47:07 +09:00
Daniel Cousens
55207e5742 tests/payments/p2pk*: add signature mismatch tests 2018-07-27 20:48:32 +10:00
Daniel Cousens
3ed77c4820 payments: cleanup 2018-07-27 20:48:28 +10:00
Daniel Cousens
54ec449a75 payments/p2sh: try not to rely on o. in validation 2018-07-27 20:31:30 +10:00
Daniel Cousens
cf9a35f59b payments: more const 2018-07-27 20:31:30 +10:00
Daniel Cousens
85b1b92b6d tests/ECPair: test fromPublic/fromPrivate in isolation 2018-07-26 18:05:39 +10:00
Daniel Cousens
079d83d887 txbuilder: note consensus issue 2018-07-23 10:41:01 +10:00
Daniel Cousens
de0259a820 tests/integration/payments: enable failing P2SH(P2WSH(P2WPKH)) tests 2018-07-20 17:30:29 +10:00
Daniel Cousens
74756ed597 TransactionBuilder: fix P2WPKH not using a P2PKH signScript for P2WPKH 2018-07-17 22:33:32 +10:00
Daniel Cousens
14d9636b6e testing/p2wsh: add missing test case coverage 2018-07-17 15:35:08 +10:00
Daniel Cousens
5481bde49c templates: rm unused nulldata code 2018-07-14 20:49:01 +10:00
Daniel Cousens
de90fea0ac payments: rename p2data to embed 2018-07-14 20:49:01 +10:00
Daniel Cousens
44c13665c8 payments: add p2data 2018-07-14 20:49:01 +10:00
Daniel Cousens
7104bb412e tests/payments: add missing tests 2018-07-14 20:45:30 +10:00
Daniel Cousens
0d9619aeed payments/p2wpkh: fix exception messages 2018-07-14 20:14:15 +10:00
Daniel Cousens
35e0956ed9 payments/p2ms: add const to p2ms 2018-07-14 20:14:13 +10:00
Daniel Cousens
a9090dc0cc templates: rm dead code 2018-07-03 23:00:00 +10:00
Daniel Cousens
0d0f1d0847 payments: rm dependence on address export 2018-07-03 22:07:08 +10:00
Daniel Cousens
6cacea6f31 rm templates export, rename to classify 2018-07-03 22:07:08 +10:00
Daniel Cousens
400be7114b use payments in TxBuilder 2018-06-27 17:39:55 +10:00
Daniel Cousens
1fba0c62a5 tests: add missing context information to Sighash V1 description 2018-06-27 17:38:27 +10:00
Daniel Cousens
47e5a0e179 witnessScriptHash: fix null decompile leading to errors -- TODO: add test 2018-06-27 17:38:27 +10:00
Daniel Cousens
38efc35fdf payments: dont always require output data 2018-06-27 13:40:20 +10:00
Daniel Cousens
6c957533d6 index: expose payments 2018-06-26 21:24:08 +10:00
Daniel Cousens
f9a739e1db add payments p2ms, p2pk, p2pkh, p2sh, p2wpkh, p2wsh 2018-06-26 21:24:08 +10:00
Daniel Cousens
a5db0a4e44 sed -i 's/ var / const /', with const->let fixes 2018-06-25 18:26:23 +10:00
Daniel Cousens
91b8823aa8 sed -i 's/^var /const /' 2018-06-25 16:25:46 +10:00
Daniel Cousens
93b1ae4303 sed -i 's/^let /const /' 2018-06-25 16:24:37 +10:00
Daniel Cousens
e50679d2c3
Merge pull request #1094 from bitcoinjs/canon
script isCanonical* refactor/renames
2018-06-21 12:45:21 +10:00
Daniel Cousens
7592a6bcc2 script: rename isCanonicalSignature to isCanonicalScriptSignature 2018-06-05 17:26:52 +10:00
Daniel Cousens
d934e543d8 rm Litecoin 2018-06-05 17:22:39 +10:00
Daniel Cousens
726e4c53b6 script: use ecc.isPoint for canonical public keys 2018-06-05 17:15:53 +10:00
Daniel Cousens
2fe220517f transition ECPair to properties over getters 2018-05-30 15:52:03 +10:00
Daniel Cousens
fba0699dd3 rm ecdsa, add new ECPair using secp256k1 2018-05-30 15:52:03 +10:00
Daniel Cousens
c2a5d9dc1a rm getAddress 2018-05-30 11:09:07 +10:00
Daniel Cousens
4aaf295cd5 fix standard 11 issues 2018-05-29 11:37:03 +10:00
Daniel Cousens
581f57ff6f script/tx: decompile returns maybe chunks 2018-05-22 18:50:00 +10:00
Daniel Cousens
6c4977983d ECPair/script_signature: switch to 64-byte RS buffers only 2018-05-22 16:59:05 +10:00
Daniel Cousens
884f3fd57d rm HDNode, use bip32 module 2018-05-22 13:46:45 +10:00
Daniel Cousens
087b49ea23
Merge pull request #459 from bitcoinjs/nocompact
Remove explicit DER/Compact decoding
2018-05-15 09:58:14 +10:00
Daniel Cousens
402d4f6d6a
Merge pull request #1041 from bitcoinjs/nulldata
Change nulldata to return Array
2018-05-15 02:24:58 +10:00
Daniel Cousens
90a73e195e use safe-buffer 2018-05-15 02:18:50 +10:00
Daniel Cousens
c16847434c add toRSBuffer for less breaking changes 2018-05-15 02:18:50 +10:00
Daniel Cousens
c58ada362e rm ECSignature, add script.signature instead 2018-05-15 02:18:50 +10:00
Wesley Smith
c3c98709e2 fixes adding version field to transaction instance 2018-05-06 22:40:27 -07:00
Daniel Cousens
024c541d7e
Merge branch 'master' into __tx 2018-04-30 10:43:44 +10:00
Daniel Cousens
6b3c41a06c
Merge pull request #1035 from bitcoinjs/buremove
Remove bufferutils
2018-04-30 10:41:27 +10:00
Daniel Cousens
41885bfab2 nulldata: change data to array 2018-04-14 01:59:56 +10:00
Daniel Cousens
5af87c0c49 privatise internals for TxBuilder 2018-04-14 01:31:02 +10:00
Daniel Cousens
3bfdacafa2 change TransactionBuilder to default to version 2 2018-04-14 01:18:31 +10:00
Daniel Cousens
549b36bf1a rm deprecated bufferutils 2018-04-14 01:15:22 +10:00
Dabura667
413495b101
Merge pull request #987 from bitcoinjs/tests
Reject any uncompressed keys in P2WSH and P2WPKH (as per BIP143)
2018-01-17 23:00:55 +09:00
Daniel Cousens
00bbab1a93 txb: fix redeemScript/witnessScript is undefined when throwing
unsupported
2018-01-17 14:57:24 +11:00
Daniel Cousens
7be698b5a1 txb: add fixes for P2SH(P2WSH(...)) and P2WSH(...) in BIP143 compliance 2018-01-17 14:49:19 +11:00
Daniel Cousens
39a681d2d3 tests: add failing test for #981 2018-01-17 14:48:56 +11:00
Daniel Cousens
098188dd3a tests: add independent error message for missing witnessScript 2018-01-17 14:25:06 +11:00
Dabura667
64d9f72f77
Update comment
fixes #979
2018-01-10 23:54:38 +09:00
Daniel Cousens
8d688c39a6 enforce decodeStack receives a stack array 2017-11-30 15:34:30 +11:00
Melvillian
f4caa54d9e
increase max feerate sanity check from 1000 to 2500 2017-11-22 10:48:20 -08:00
Daniel Cousens
a868d27407 TxBuilder: add support for RSBuffer type keyPairs and .publicKey 2017-10-19 13:41:57 +11:00
Daniel Cousens
b94da10e6c ECSignature: add toRSBuffer/fromRSBuffer 2017-10-19 13:41:35 +11:00
Daniel Cousens
e0b227e4ef s/checkP2shInput/checkP2SHInput 2017-10-19 10:52:21 +11:00
Daniel Cousens
1157856ab0 Merge pull request #911 from bitcoinjs/segwittests
Add tests for scripts.witness*.input and fixes
2017-09-28 00:03:11 +10:00
Daniel Cousens
41378f9648 txbuilder: apply input.value before prepareInput 2017-09-27 10:00:36 +10:00
Daniel Cousens
8c217a7ba7 witnessScriptHash: fixed implementation 2017-09-27 08:30:31 +10:00
Daniel Cousens
f4a83f8aed address/txbuilder: require templates to prevent undefined exports 2017-09-27 07:08:19 +10:00
Daniel Cousens
b6a6b0a50a Merge pull request #908 from bitcoinjs/txbfix
TxBuilder: fix canSign returning true for missing witness value
2017-09-26 20:02:55 +10:00
Daniel Cousens
eb6eac67b0 txbuilder: fix canSign returning true for missing witness value 2017-09-26 18:49:14 +10:00
Daniel Cousens
bae91395ef rm bscript circular dependencies 2017-09-26 14:25:30 +10:00
Daniel Cousens
8f01e4273c match scriptHash types 1 for 1, ignore classify order 2017-09-22 12:15:10 +10:00
Thomas Kerin
da49e389c4 multisig.input.encodestack - replace OP_0 (permitted by partialSignature) with EMPTY_BUFFER 2017-09-15 19:08:55 +10:00
Thomas Kerin
105a82762c buildstack - don't return op_0 2017-09-15 19:08:55 +10:00
junderw
6e5742d86d Fix txb.__overMaximumFees for segwit 2017-09-15 12:31:35 +10:00
Daniel Cousens
9503e64bde TransactionBuilder: collect witnessValue as input.value, and match it 2017-09-06 20:59:10 +10:00
junderw
1495384862 Add witness is true to signing 2017-09-06 20:46:20 +10:00
Daniel Cousens
e7c59c4b8b script: use asMinimalOP for ASM/decompile 2017-08-24 12:28:50 +10:00
Daniel Cousens
152eed57a0 templates/pubkey: only canonical pubkeys to encode 2017-08-23 17:26:06 +10:00
Daniel Cousens
3ba17a1479 TxBuilder: restrict uncompressed keyPairs for P2WPK and P2WSH 2017-08-23 17:26:06 +10:00
Daniel Cousens
3ffac6cd39 add witnessPubKeyHash compressed policy 2017-08-23 17:26:06 +10:00
Daniel Cousens
5057d8d1ba tests/txb: add P2WSH(multisig), incomplete fixture 2017-08-23 16:07:28 +10:00
Daniel Cousens
0157f18510 txbuilder: refactor branches for readability 2017-08-23 16:07:28 +10:00
Daniel Cousens
b1272a1200 add Bech32 support to toOutputScript/fromOutputScript 2017-08-21 11:17:30 +10:00
Daniel Cousens
d1052e4996 add from/toBech32 2017-08-21 11:17:30 +10:00
Thomas Kerin
798ec3512c set p2sh=true only if redeemScriptType is set 2017-08-09 15:11:05 +10:00
Thomas Kerin
0b1c3bfbd9 Should be able to deal with incomplete P2SH/P2WSH inputs when allowIncomplete is set 2017-08-09 15:11:05 +10:00
Alex Melville
eae2c57e73 remove errant argument to buildInput in __build 2017-07-21 12:12:29 +10:00
Daniel Cousens
1d6b978aff txb: do not classify blank input scripts as nonstandard 2017-07-14 14:16:52 +10:00
Karel Bilek
c96bb93841 Add weight / vsize
Weight / virtual size according to BIP141
2017-06-21 01:38:05 +10:00
Daniel Cousens
fe0ad81472 package: use safe-buffer 2017-05-23 18:39:53 +10:00
Daniel Cousens
f1ab151c31 tests: use safe-buffers throughout 2017-05-23 18:39:53 +10:00
Daniel Cousens
aeb0312d63 use safe-buffers throughout impl 2017-05-23 18:39:53 +10:00
Daniel Cousens
78b2d34af6 networks: changed P2SH to 0x32 2017-05-10 10:25:29 +10:00
Loshan T
2228d285a4 Update Litecoin P2SH 2017-05-10 10:25:29 +10:00
Daniel Cousens
ab1fc4c9a4 reduce bufferutils usage 2017-04-19 17:42:05 +10:00
Daniel Cousens
cdb518686f txbuilder: remove unused y var 2017-04-18 14:34:54 +10:00
Daniel Cousens
6c220c4b58 templates: add missing allowComplete pass through 2017-04-18 14:34:54 +10:00
Daniel Cousens
91ff39d95a ecpair/hdnode: fix network variable shadowing 2017-04-18 14:34:54 +10:00