Commit graph

128 commits

Author SHA1 Message Date
Thomas Kerin
3ad31571b6 P2WSH initial commit, tests pass with new logic 2017-02-07 12:40:49 +11:00
Thomas Kerin
b6ae10b2f1 buildStack, and make tests pass 2017-02-07 12:40:49 +11:00
Daniel Cousens
a793166eb8 wip 2017-02-07 12:40:49 +11:00
Daniel Cousens
14f9218389 package: bump bs58check, drop node 0.12 2016-12-22 08:21:18 +11:00
Daniel Cousens
33c72e49c4 package/*: use bitcoin-ops, pushdata-bitcoin packages 2016-12-18 10:38:43 +00:00
Daniel Cousens
5824a84fd5 transaction_builder: keep a mapping from prevTxOut to vin 2016-12-15 11:45:59 +11:00
Daniel Cousens
aeeee4f3ec TransactionBuilder: move ABSURD_FEE to a constructor parameter 2016-11-12 12:53:53 +01:00
Daniel Cousens
61be897429 TransactionBuilder: move ABSURD_FEERATE to static constant 2016-11-12 12:53:53 +01:00
Daniel Cousens
62389ed247 TransactionBuilder: change to ABSURD_FEERATE, not ABSURD_FEE 2016-11-12 12:53:53 +01:00
Daniel Cousens
e835f1fe95 TransactionBuilder: add fee safety 2016-11-12 12:53:53 +01:00
Thomas Kerin
b5e46c2931 Replace script type strings with constants 2016-11-04 12:21:26 +11:00
Daniel Cousens
d9fa39a2cc scripts: extract all scripts to encode/decode/check style 2016-11-04 07:23:02 +11:00
Thomas Kerin
27b48e8aa2 Add methods to decode information from output scripts 2016-11-02 10:58:45 +11:00
Daniel Cousens
3de754a9a2 TransactionBuilder: remove hashTypes inconsistency issues, resolves #642 2016-10-13 00:55:19 +11:00
Daniel Cousens
9dcf4d4b8b TransactionBuilder: add note why fixMultisigOrder is separate 2016-10-13 00:55:19 +11:00
Daniel Cousens
7059b177eb TransactionBuilder: re-order in order of usage 2016-10-13 00:55:19 +11:00
Daniel Cousens
6056e7913e TransactionBuilder: fixMultisigOrder only works if a redeemScript exists 2016-10-13 00:55:19 +11:00
Daniel Cousens
1ff64d207e TransactionBuilder: flatten prepareInput P2SH detection 2016-10-13 00:55:19 +11:00
Daniel Cousens
a58c959099 TransactionBuilder: localize fixMultisigOrder assumptions 2016-10-13 00:55:19 +11:00
Daniel Cousens
0e2480523a TransactionBuilder: expandInput, consistent variable names 2016-10-13 00:55:19 +11:00
Daniel Cousens
f3cc71a75f TransactionBuilder: simplify buildInput logic 2016-10-13 00:55:19 +11:00
Daniel Cousens
090b8177d1 TransactionBuilder: flatten inconsistency checks 2016-10-13 00:55:19 +11:00
Daniel Cousens
f7b2fdfe60 TransactionBuilder: avoid input mutation until after exception possibility 2016-10-09 22:04:32 +11:00
Daniel Cousens
17377381c4 TransactionBuilder: if prevOutScript is defined, but not signable, try 1 last time 2016-10-09 22:04:32 +11:00
Daniel Cousens
fd40232147 package: remove buffer-compare/buffer-equals 2016-10-06 21:31:10 +11:00
Daniel Cousens
1aab317dad TransactionBuilder: extract internal signature invalidation functions for individual testing 2016-09-28 16:47:58 +10:00
Daniel Cousens
ccde09fdc3 TransactionBuilder: move fixMultisigOrder back to free function 2016-09-28 15:27:14 +10:00
Daniel Cousens
402e871d40 TransactionBuilder: move sign bulk to prepareInput 2016-09-28 15:23:52 +10:00
Daniel Cousens
d3ccbb6277 TransactionBuilder: rename index to vout internally 2016-09-28 01:23:37 +10:00
Daniel Cousens
9e5aac8bac TransactionBuilder: fix duplicate txOut detection 2016-09-28 01:23:37 +10:00
Daniel Cousens
b3fd50ffd6 TransactionBuilder: refactor extractInput/extractFromOutput 2016-09-28 00:50:46 +10:00
Daniel Cousens
6826aa312d TransactionBuilder: less exits 2016-09-27 22:39:38 +10:00
Daniel Cousens
83b2bb5d6a TransactionBuilder: avoid extra getPublicKeyBuffer calls 2016-09-27 22:39:38 +10:00
Daniel Cousens
302b4f0796 TransactionBuilder: signatureScript is only defined once 2016-09-27 16:31:09 +10:00
Daniel Cousens
fbcc23fa14 TransactionBuilder: avoid unnecessary cache object 2016-09-27 15:42:14 +10:00
Daniel Cousens
49c6ebe3a0 TransactionBuilder: reword error for correctness 2016-09-27 15:42:11 +10:00
Daniel Cousens
61718cdbaa txb: remove unused variables 2016-09-26 15:34:43 +10:00
Daniel Cousens
6faeae397f TxBuilder: add setVersion 2016-06-22 14:57:33 +10:00
JP Richardson
ac8ae8f0ed opcodes: add json extension to fix Webpack JSON loader 2016-06-08 17:00:37 -05:00
Daniel Cousens
9db67bb3b1 Cleanup for #540 (#551)
* Txbuilder: early exit as soon as possible

* Txbuilder: prefer function declaration over variable

* TxBuilder: extract extractFromOutputScript

* TxBuilder: extract buildFromInputData
2016-04-08 12:23:32 +10:00
Kirill Fomichev
bc9a95e0ae Use buffer-reverse instead [].reverse.call 2016-03-10 07:57:30 +03:00
Ruben de Vries
7aaae4c001 Refactoring extractInput and __build to enable nested scripts (P2SH[ P2PKH / multsig ]).
This is preperation for the segwit support which will have `P2SH[ P2WSH[ P2PKH / multsig ] ]` scripts
2016-02-15 14:12:04 +01:00
Daniel Cousens
6c0745adce TxBuilder: add setLockTime 2016-01-28 00:55:44 +11:00
Daniel Cousens
540a6643ac txbuilder: clarify SIGHASH invalidation logic in addInput/addOutput 2015-11-26 12:46:55 +11:00
Daniel Cousens
881a23f9d5 txbuilder: rename tx.outs.length to nOutputs 2015-11-26 12:07:32 +11:00
Kirill Fomichev
5de6818fcb Fix TransactionBuilder.addOutput 2015-11-24 08:18:16 +03:00
Daniel Cousens
0b4c67406f use [].reverse over prototype 2015-09-27 23:49:29 +10:00
Daniel Cousens
5c1c4589c0 remove use of buffer-reverse 2015-09-27 23:30:06 +10:00
Daniel Cousens
731a31ecba use buffer-reverse 2015-09-25 17:49:05 +10:00
Daniel Cousens
28372f0cd7 use buffer-equals 2015-09-25 17:49:05 +10:00