Commit Graph

181 Commits

Author SHA1 Message Date
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
Andrew Poelstra dba71d9253 [BREAKING CHANGE] Minor library updates
Breaking changes are:
    opcode::All::from_u8 is now From<u8>
    script::Builder::from_vec is now From<Vec<u8>>
    script::Script::from_vec is now From<Vec<u8>>
2015-10-14 09:14:09 -05:00
Andrew Poelstra eeb4655886 More updates for RFC 1214 2015-09-20 16:44:05 -05:00
Andrew Poelstra edb6d7b17b Bump version to 0.2 for all the changes of the last two days 2015-09-20 16:40:46 -05:00
Andrew Poelstra 00421970a1 Fix for serde changes 2015-09-20 13:10:20 -05:00
Andrew Poelstra 835c8befae Fix versions in Cargo.toml to try and fix Travis builds 2015-09-20 12:37:47 -05:00
Andrew Poelstra 2320f099c1 Remove broken wallet components
This was a fairly small change and gets all unit tests to pass.
2015-09-19 13:39:39 -05:00
Andrew Poelstra 0389eb1c52 Move secp256k1 lib from sipa's (long expired) repo to the bitcoin one 2015-05-20 13:14:21 -05:00
Andrew Poelstra b21acd440e Get compiling for secp256k1 changes 2015-04-13 22:40:32 -05:00
Andrew Poelstra 17e27ec09f *** IT COMPILES ON RUSTC NIGHTLY ***
Many unit test failures, but this is progress.
2015-04-10 20:55:59 -05:00
Andrew Poelstra 5350207ff3 Remove hamcrest; add rust-serde (not compiling right now) 2015-04-09 23:23:53 -05:00
Andrew Poelstra e5a3e84c41 Checkpoint commit (nope, not yet to small commit sizes :))
This is mostly fixing compile errors in `cargo test`. We are down
to 3 in `cargo build` and 14 in `cargo test`, at least for this
round.
2015-04-08 17:23:45 -05:00
Andrew Poelstra 08a20f8764 Checkpoint commit
Work is stalled on some other library work (to give better lifetime
requirements on `eventual::Future` and avoid some unsafety), so
committing here.

There are only three errors left in this round :)

Also all the indenting is done, so there should be no more massive
rewrite commits. Depending how invasive the lifetime-error fixes
are, I may even be able to do sanely sized commits from here on.
2015-04-07 17:52:58 -05:00
Andrew Poelstra 160f2f9ea6 Drop ThinVec, many other changes toward updating for librustc 2015-04-04 22:13:19 -05:00
Andrew Poelstra a62a7d736c Several more changes for librustc changes 2015-04-04 13:08:49 -05:00
Andrew Poelstra f1aed644c6 More misc cleanup for rustc changes 2015-03-26 14:21:48 -05:00
Andrew Poelstra 0bf5809674 Add time crate 2015-03-26 11:53:49 -05:00
Andrew Poelstra 719f616218 Some more renames for librustc changes 2015-03-26 10:44:49 -05:00
Andrew Poelstra 2101e4a56d Rename bitcoin-secp256k1-rs to secp256k1 2015-03-26 10:08:36 -05:00
Andrew Poelstra e29fdb90c8 fix for upstream 2014-08-18 18:04:32 -07:00
Jerzy Kozera 3d940a85fe Use apoelstra's secp256k1
dpc's version doesn't contain secp256k1:🔑:PublicKey which is used in blockdata/script.rs
2014-08-12 04:52:33 +02:00
Andrew Poelstra e01e9ad3be Implement CHECKSIG and CHECKSIGVERIFY
Still need the multisig ops, and p2sh
2014-08-10 13:51:05 -07:00
Andrew Poelstra 426e1fc556 Change name to `bitcoin` in Cargo.toml (copying convention from toml-rs and color-rs) 2014-07-18 12:07:10 -07:00
Andrew Poelstra c9ad7c0b58 Initial commit, move into Cargo 2014-07-18 06:56:17 -07:00