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
Chris Stewart
edfbd96818
Merge pull request #105 from Christewart/update_script_tests
...
updating script_tests.json, tx_{in}valid.json, fixing bug with SINGLEā¦
2018-01-04 12:37:46 -06:00
Chris Stewart
fd528462cc
Uncommenting tx_valid.json file
2018-01-03 14:27:46 -06:00
Chris Stewart
7b855873be
updating script_tests.json, tx_{in}valid.json, fixing bug with SINGLE|ANYONECANPAY
2018-01-03 14:24:43 -06:00
Chris Stewart
334986faf8
Merge pull request #101 from Christewart/fix_input_output_serialization
...
Make serialization code better
2017-12-18 14:21:23 -06:00
Chris Stewart
9b57ad4ab9
Re-working serialization code
...
Cleaning up some nits, removing some superflous flipEndianness calls
rebasing on top of master, modifying BloomFilter/MerkleBlock to support new serialization code
Changing NetworkElement to abstract class, sealing a few abstract classes, adding NetworkElement to CompactSizeUInt
Fixing last nits
2017-12-18 14:00:40 -06:00
Chris Stewart
510e53c908
Merge pull request #66 from Christewart/add_merkle_block
...
Add merkle block
2017-12-08 18:17:09 -06:00
Chris Stewart
a5260b2e93
Transfering all bloom filter and merkle block files from spv-node to core
...
Fixing bug in how we extract matches on PartialMerkleTrees -- we can have two sub nodes have the same match IF we are at maxHeight
Fixing bug in test case where hashes weren't getting correct type
Modifying generators to be more flexible
Fixing bug in generator for merkle blocks with specific txs
Adding more flexibility to block header generators
Modifying merkle block generator to only include txs that are specfied
Fixing bug
Removing a bunch of logs, refactoring merkle block properties
rebasing on master, fixing some nits
2017-12-08 12:21:40 -06:00