Commit Graph

2232 Commits

Author SHA1 Message Date
Andrew Poelstra 406160a386 transaction: add txid() function that does the right thing for segwit/nonsegwit
With Segwit transactions `bitcoin_hash()` is no longer sufficient to get a txid.
2017-12-09 19:52:09 +00:00
Andrew Poelstra 49d39a0796
Merge pull request #33 from apoelstra/sha2-encoder
util: add Sha256dEncoder to allow streaming data into a hash
2017-12-07 14:12:25 +00:00
Andrew Poelstra c691d0e382 util: add Sha256dEncoder to allow streaming data into a hash
This is needed to for a sane BIP143 implementation. Should be exactly equivalent to
serializing data into a vector then hashing that vector for all types.
2017-12-06 16:50:47 +00:00
Andrew Poelstra fc7c50ab8e
Merge pull request #32 from apoelstra/script-p2wsh
script: add `to_p2wsh()` and `is_p2swsh()` functions
2017-12-06 15:47:19 +00:00
Andrew Poelstra e5f109221e script: add `to_p2wsh()` and `is_p2swsh()` functions to allow easy segwit output computation 2017-12-06 15:39:37 +00:00
Andrew Poelstra c341e21dc6
remove unnecessary `mut` that nightly rustc has learned to detect 2017-10-06 19:56:50 +00:00
Andrew Poelstra 46439710d9
script: add `is_p2pkh()` function 2017-10-06 19:15:30 +00:00
Andrew Poelstra 8f7bd858fb
update byteorder to 1.1 from 0.3 2017-07-28 16:19:44 +00:00
Andrew Poelstra cdff7f15c3 Merge pull request #29 from alekseysidorov/update-deps
Fix vulnerabilities which found by `cargo audit`.
2017-07-28 16:17:59 +00:00
Aleksei Sidorov 2be08ccbae Bump version 2017-07-28 17:36:43 +03:00
Aleksei Sidorov bcd0d0480d Fix vulnerabilities which found by `cargo audit`. 2017-07-28 13:34:07 +03:00
Andrew Poelstra 2e7be81ea4 add unit test for overflow panic 2017-06-07 16:09:40 +00:00
Andrew Poelstra 287d285214 Merge pull request #25 from neosilky/panic-fix
Sanity checks for vector length
2017-06-07 16:07:53 +00:00
Daniel Lockyer 3cf1ccf8f8 Add fuzzing code 2017-06-07 09:19:25 +01:00
Daniel Lockyer a74efe6f8c Sanity checks for vector length 2017-06-05 18:06:30 +01:00
Andrew Poelstra 9a0aeb8646
Some README updates 2017-05-08 16:05:47 +00:00
Andrew Poelstra c4cc2a6949 Merge pull request #22 from chritchens/master
Add Cargo.lock to gitignore
2017-04-25 20:14:19 +00:00
Christian Nyumbayire f9efe3ecd9 Add Cargo.lock to gitignore 2017-04-25 03:12:37 +02:00
Andrew Poelstra cdb452f79f Sanity-check vector length when deserializing 2017-04-17 00:54:38 +00:00
Andrew Poelstra 4b73c3223c Merge pull request #18 from rotwatsb/GetAddr
Add GetAddr message
2016-10-12 11:26:48 +00:00
Steve Bradley f7fed8339d Add GetAddr message 2016-10-10 11:14:12 -04:00
Andrew Poelstra fd37023312 Increase secp version; transitive version bump
Cleans up dependency graph.
2016-10-10 13:22:30 +00:00
Andrew Poelstra 02718be82f Remove unused `num_cpus` dep 2016-10-10 13:09:40 +00:00
Andrew Poelstra e3c793f702 uint: bugfix in trailing_zeroes() 2016-08-26 16:20:26 +00:00
Andrew Poelstra af10b153be segwit: add transaction/block serialization support for BIP141/BIP144; bump to 0.8
Do not yet support new sighash type
2016-08-24 16:24:55 +00:00
Andrew Poelstra 19e3adce86 Merge pull request #14 from serprex/master
Replace time with std::time
2016-07-18 14:58:45 +00:00
Demur Rumed 5dda3e2602 Replace time with std::time 2016-07-17 04:02:57 +00:00
Andrew Poelstra 93f103bdb5 script: fix broken push_int in script::Builder 2016-07-14 15:15:34 +00:00
Andrew Poelstra 9d2826d5d1 bip32: error API cleanups 2016-06-24 19:45:42 +00:00
Andrew Poelstra f7d4ae8265 bip32: add accessor for the tweak used in public key derivation 2016-06-24 19:25:47 +00:00
Andrew Poelstra 14af175a11 Resurrect BIP32 support 2016-06-24 19:15:57 +00:00
Andrew Poelstra 698a23e32d script: fix Debug impl bugs in Script, PUSHDATA1 not displayed correctly 2016-06-24 00:20:49 +00:00
Andrew Poelstra 1e47019221 cargo-clippy cleanups 2016-06-21 14:35:27 +00:00
Andrew Poelstra 1dbd1c28dc Implement stdlib Error trait for util::Error type 2016-06-20 01:25:54 +00:00
Andrew Poelstra 50b3e90912 Rename Transaction::scripthash to Transaction::signature_hash
Yes, this is a major release because I misspelled the name of a function :)
2016-06-13 21:25:47 +00:00
Andrew Poelstra 38b2cacf35 Add support for computing transaction sighashes, which is needed for signing 2016-06-12 18:25:23 +00:00
Andrew Poelstra 220775015e [BREAKING CHANGE] [v0.5 -> v0.6] Move nasty script stuff into a feature-gated module 2016-06-12 00:36:46 +00:00
Andrew Poelstra 46681bbcac contracthash: expose key tweak in new function
Needed for applications where the tweak and the secret key material are on different
devices (and the one with the secret material does not want to know how to compute
the tweak itself).
2016-06-10 18:36:15 +00:00
Andrew Poelstra 6ccd157775 Add `into_vec` method to Script 2016-06-02 23:47:29 +00:00
Andrew Poelstra 35832e3da0 Remove some unused trait imports 2016-05-27 18:36:42 +00:00
Andrew Poelstra 30904b67a7 Derive Eq and friends for script::Instruction 2016-05-04 14:03:58 +00:00
Andrew Poelstra 96b4b050fd Serialize Sha256Hash without allocations 2016-05-03 20:16:30 +00:00
Andrew Poelstra f906c2fddd Add `first_push_as_number` function to contracthash templates
This is a bit of a hack to let users of the contracthash API to determine
how many sigs are required when signing a multisig contract.
2016-03-29 17:24:34 +00:00
Andrew Poelstra dce0cc65d2 Remove openssl dependency which trojanned itself in 2016-03-08 23:25:09 +00:00
Andrew Poelstra f18157e774 Minor code changes for new rustc/clippy. No effects. Update minor version number 2016-02-18 19:44:29 +00:00
Andrew Poelstra 5f308887c9 Fix test added for serde transaction roundtrip 2016-02-18 18:02:04 +00:00
Andrew Poelstra 92c3b2459c script: fix macro for future rustc changes 2016-02-18 17:56:51 +00:00
Andrew Poelstra b88d04f0bc Add serde impls for all Transaction types
Bump version number; introduce rust-jsonrpc dependency
2016-02-10 03:37:24 +00:00
Andrew Poelstra 56b7e7d3f4 Add ntxid support 2015-12-21 11:07:37 -06:00
Andrew Poelstra 16f5878a03 Add a bunch of Ord/PartialOrd impls for stuff 2015-12-20 15:38:02 -06:00