Andrew Poelstra
b3644b7b6d
add constants for OP_CLTV and OP_CSV
2017-12-21 01:10:00 +00:00
Andrew Poelstra
b7ec971541
update README to reflect 0.10, bump version to republish
2017-12-13 21:20:16 +00:00
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
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
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
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
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
cdb452f79f
Sanity-check vector length when deserializing
2017-04-17 00:54:38 +00: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
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
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
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
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
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
Andrew Poelstra
e05e6d2215
[BREAKING CHANGE] Drop UtxoSet
...
This code was unmaintained, is unlikely to work on the majority of systems
(since it holds the whole utxoset in RAM, and not in a terribly efficient
manner), and has a dependency on `eventual` which has been broken for a
long time.
The library no longer compiles on nightly because of this, and without any
known usecases for `UtxoSet`, nor good ability to test it, I'm simply
removing the code.
I recommend anyone who cares about this extracts the code from the previous
commit and creates a new crate. It should be more featureful anyway, e.g.
support a backing store.
2015-12-19 20:13:59 -06:00
Andrew Poelstra
8a79710be5
Bump version to 0.4.5 for recent changes
2015-12-03 07:14:22 -06:00
Andrew Poelstra
a8ffce4904
Fix Script de/serialization (version -> 0.4.4)
2015-11-30 07:11:24 -06:00
Julius Naperkowski
51f389e0b2
Bump minor version to 0.4.3
2015-11-23 18:31:50 +01:00
Andrew Poelstra
e58f536c31
Add `Decimal` type for de/serializing values
2015-11-22 10:51:19 -06:00
Andrew Poelstra
c3c6983789
Replace serde_json with strason in tests
2015-11-22 09:46:05 -06:00
Andrew Poelstra
fa59c35e9a
Upgrade libsecp
2015-11-15 17:14:36 -06:00
Andrew Poelstra
66eb08aab5
[BREAKING CHANGE] Make `script::Builder` implement the actual Builder pattern
...
Rather than having methods taking &mut self, have them consume self
and return another Builder, so that methods can be chained.
Bump major version number.
2015-11-04 11:04:54 -06:00
Andrew Poelstra
8daf06cc1d
Update for latest libsecp: normalize signatures and use "lax DER" parsing
2015-10-26 14:39:25 -05:00
Andrew Poelstra
67c0b8fba7
More Error implementations
2015-10-25 12:55:48 -05:00
Andrew Poelstra
a69ae2c7ad
Bump minor version no
2015-10-25 10:17:23 -05:00
Andrew Poelstra
3491c5057e
Make contracthashtool check that the number of keys matches the template's requirement
...
This is easy to satisfy given that the template-to-script code takes a
slice of keys. Just do &keys[..n_keys] if you have too many keys. (If
you have too few you're SOL no matter what.) This way we can catch
likely configuration errors without putting much of a burden on users
who legitimately have more keys than the template requires.
Also add a method required_keys() to Template so that users can check
how many keys they ought to have.
2015-10-25 08:37:32 -05:00
Andrew Poelstra
8defba2fb3
Expose ability to tweak secret keys for contract hash
2015-10-14 22:50:06 -05:00
Andrew Poelstra
fdc854edd9
Remove Script() from LowerHex impl of Script
...
This is easy for downstream to add, not easy for them to remove. Plus scripts
have a pretty recognizable form and are usually obvious from context anyway.
2015-10-14 22:31:12 -05:00
Andrew Poelstra
38d2ef5d73
Add `from_script` method to Address for generating P2SH addresses
2015-10-14 22:24:09 -05:00
Andrew Poelstra
ed34bb30f1
Add support for deserializing a script into a contracthash template
...
This is something Matt's contracthashtool does, so to copy its functionality
I need to support it. And it also seems generally useful.
2015-10-14 22:01:26 -05:00
Andrew Poelstra
c1f81ea3c3
Add support for WIF private keys as well as addresses
2015-10-14 19:25:43 -05:00
Andrew Poelstra
16e2a3519b
Implement basic contract-hash support
...
Does not do stuff like validating the form of contracts, since this seems like
more of an application thing. Does not even distinguish a "nonce", just assumes
the contract has whatever uniqueness is needed baked in.
2015-10-14 15:29:19 -05:00