Commit Graph

1208 Commits

Author SHA1 Message Date
mecampbellsoup
3c6a476875 Submodule secp256k1 instead of copying files 2018-03-20 21:03:40 -04:00
Chris Stewart
92d0ee28e8 Merge pull request #120 from Christewart/pm47_secp256k1
Pm47 secp256k1
2018-03-20 17:46:31 -04:00
Chris Stewart
9ddbf087a7 integrating secp256k1's java api enhancements
Adding missing secp256k1 files
2018-03-19 13:02:07 -05:00
Chris Stewart
bd2271db63 Merge pull request #113 from Christewart/tx_builder
Tx builder
2018-03-13 11:48:46 -05:00
Chris Stewart
79f92a4802 Uncommenting tx_invalid.json test cases 2018-03-13 10:57:42 -05:00
Chris Stewart
b88acaab94 Adding fuzz test to coverage hard to reach branches on TxBuilder 2018-03-12 16:39:45 -05:00
Chris Stewart
5ab1a33aa2 removing old code, adding a few missing cases in TxBuilder 2018-03-12 13:04:53 -05:00
Chris Stewart
4fdd7b95ae Moving implementation down to 'BitcoinTxBuilder', this allows us to create other TxBuilders for different networks like bcash or litecoin 2018-03-10 17:12:50 -06:00
Chris Stewart
3507ca6557 adding TxBuilderError.{OutputBelowDustThreshold, UnknownError 2018-03-09 12:40:52 -06:00
Chris Stewart
5d02e70eda Adding TxBuilderError.{WrongWitness, WrongRedeemScript, WrongPublicKey} for the case where we have a pre-image that does not hash to the right commitment in the spk 2018-03-09 10:09:18 -06:00
Chris Stewart
9a36ef92f2 Fixing nits
another nit
2018-03-08 14:49:00 -06:00
Chris Stewart
85fc99b1d6 Refactoring TxBuilder to use FeeUnit 2018-03-08 12:30:52 -06:00
Chris Stewart
2f521b69c3 Adding TxBuilderError.IncompatibleLockTimes -- we can only spend locktime outputs of the same type in a single tx 2018-03-08 10:59:17 -06:00
Chris Stewart
6e0c3548b6 Adding isRBFEnabled param to TxBuilder.sign, adding TxBuilderError.HighFee & TxBuilderError.LowFee 2018-03-07 15:11:58 -06:00
Chris Stewart
8711e1794a Refactoring TxBuilder to use a 'Signer' abstraction, this means we do not need to have access to the private key in memory -- only a function of type 'Seq[Byte] => ECDigitalSignature'. This makes TxBuilder work with hardware wallets 2018-03-07 15:11:58 -06:00
Chris Stewart
bed82d5e65 Adding code to deduct network fee from creditingOutputs, adding sanityChecks 2018-03-07 15:11:58 -06:00
Chris Stewart
128bb8d890 Successfully signing nested CLTV/CSV spks inside of p2wsh/p2sh with tx builder 2018-03-07 15:11:58 -06:00
Chris Stewart
a01dba3654 Successfully generating signatures for raw LockTimeScriptPubKey's 2018-03-07 15:11:58 -06:00
Chris Stewart
bb04220709 Signing basic P2WSH types (p2pk,p2pkh,multisig) 2018-03-07 15:11:58 -06:00
Chris Stewart
72571fd573 Rebasing onto work that separates WitnessScriptPubKeyV0 & ScriptWitness 2018-03-07 15:11:58 -06:00
Chris Stewart
ccc27b97bd successfully signing p2wpkh spk types 2018-03-07 15:11:58 -06:00
Chris Stewart
fe03a35018 Added handling of p2sh outputs in TxBuilder -- no support for p2sh(segwit) outputs yet 2018-03-07 15:11:58 -06:00
Chris Stewart
29510ad638 Refactoring signing abstraction into a 'Signer' class 2018-03-07 15:11:58 -06:00
Chris Stewart
b601d81299 successfully spending n p2pkh outputs in a single transaction 2018-03-07 15:11:58 -06:00
Chris Stewart
6bb2a7edf0 Successfully spending a p2pkh spk with TxBuilder 2018-03-07 15:11:58 -06:00
Chris Stewart
7d1f87bf6f Adding abilility to create TransactionWitness from a Seq[Option[ScriptWitness]], adding checks to determine if a ScriptWitness is a P2WPKHWitnessV0 or a P2WSHWitnessV0 2018-03-07 15:11:58 -06:00
Chris Stewart
d1d47980de Merge pull request #117 from Christewart/api_sign_hardware_wallet
Adding TransactionSignatureCreator.createSig API that allows for pass…
2018-03-07 14:13:18 -06:00
Chris Stewart
5c2a66d7c7 Fixing vsize calculation in Transactions 2018-03-07 13:37:51 -06:00
Chris Stewart
035b058e06 Adding test for sign: Seq[Byte] => Future[ECDigitalSignature] 2018-03-07 09:50:37 -06:00
Chris Stewart
44b9129584 Adding TransactionSignatureCreator.createSig that takes a sign function that returns Future[ECDigitalSignature] 2018-03-05 18:51:46 -06:00
Chris Stewart
71cf537475 Removing public key parameter in TransactionSignatureCreator.createSig 2018-03-05 14:11:14 -06:00
Chris Stewart
156dfb5d9d Adding TransactionSignatureCreator.createSig API that allows for passing in a 'sign' function that is an abstraction of the signing process, useful for hardware wallets 2018-03-05 12:23:21 -06:00
Chris Stewart
65f0f9419c Merge pull request #116 from Christewart/txsigcomponent_refactor
renaming TxSigComponent companion object to 'BaseTxSigComponent'
2018-03-04 11:41:36 -06:00
Chris Stewart
879c5fb8b9 renaming TxSigComponent companion object to 'BaseTxSigComponent' 2018-03-04 10:52:27 -06:00
Chris Stewart
006be15e33 Merge pull request #115 from Christewart/no_r_reusage
Adding invariant that says our signature scheme should NOT reuse r values
2018-03-02 12:08:44 -06:00
Chris Stewart
3636a5c47b Adding invariant that says our signature scheme should reuse r values 2018-03-02 09:07:42 -06:00
Chris Stewart
832909ea9d Merge pull request #114 from Christewart/segwit_other_consensus_changes
Segwit other consensus changes
2018-02-28 10:20:11 -06:00
Chris Stewart
5a5d81b17b implementing new sigops limit & block weight function for BIP141
Refactoring block weight calculating to Block trait

Moving 'weight' calculation into Transaction abstract class

Adding a few more comments, renaming virtualTxSize -> vsize
2018-02-28 09:51:54 -06:00
Chris Stewart
700fe2c568 Merge pull request #112 from Christewart/witspk_separation
Witspk separation
2018-02-18 17:07:31 -06:00
Chris Stewart
ca167cdeaf Breaking 'ScriptWitness' into two ADTs 'P2WPKHWitnessV0,P2WSHWitnessV0' and breaking 'WitnessScriptPubKeyV0' into two ADTs 'P2WPKHWitnessSPKV0, P2WSHWitnessSPKV0'
Adding abilility to create TransactionWitness from a Seq[Option[ScriptWitness]], adding checks to determine if a ScriptWitness is a P2WPKHWitnessV0 or a P2WSHWitnessV0

Deprecating some Transaction constructors that are dangerous

removing usages of deprecated Transaction constructors in bitcoin-s-core codebase

fixing nits
2018-02-18 16:19:28 -06:00
Chris Stewart
368826ccbf Merge pull request #110 from Christewart/address_refactor
Address refactor
2018-02-08 07:03:21 -06:00
Chris Stewart
041c67fbd9 Refactoring NetworkParameters/ChainParams and BitcoinAddress code to be more flexible
fixing nits, changing traits to abstract classes
2018-02-07 14:03:44 -06:00
Chris Stewart
7c7f4e5cc9 Merge pull request #109 from Christewart/master
Update README.md
2018-01-31 15:41:47 -06:00
Chris Stewart
f465b79590 Update README.md 2018-01-31 15:17:58 -06:00
Chris Stewart
2df52bf4cc Merge pull request #108 from Christewart/features_for_rpc_client
Add 'toBigDecimal' method to CurrencyUnit api
2018-01-24 10:59:41 -06:00
Chris Stewart
9f9751e102 Add 'toBigDecimal' method to CurrencyUnit api
removing no tests in assembly
2018-01-23 15:03:39 -06:00
Chris Stewart
ad686d4e97 Merge pull request #107 from Christewart/file_name_to_long_bug
fix file name to long on encrypted directories
2018-01-22 10:44:46 -06:00
Chris Stewart
bedfacffb5 fix file name to long on encrypted directories 2018-01-22 10:15:12 -06:00
Chris Stewart
8e89bd270b Merge pull request #106 from Christewart/master
updating license
2018-01-18 11:03:12 -06:00
Chris Stewart
8f9ca8ac45 updating license
Add word developers
2018-01-17 17:15:18 -06:00