Elichai Turkel
2d70623356
Remove deprecated Error::description impl
2020-10-08 17:11:18 +03:00
Elichai Turkel
023fae1f65
Add the dyn keyword where appropriate
2020-10-08 17:11:16 +03:00
Andrew Poelstra
05f3451b10
un-deperate contracthash during testing
...
Avoids a rust test runner bug, see https://github.com/rust-lang/rust/issues/47238
2020-09-10 16:40:31 +00:00
Andrew Poelstra
5fd91ca2d8
Merge pull request #451 from stevenroose/deprecate-contracthash
...
Deprecate the util::contracthash module
2020-09-09 17:02:19 +00:00
Elichai Turkel
a44ba2d878
Merge pull request #397 from stevenroose/script-iter
...
Improve the Instructions iterator for scripts
2020-09-09 19:06:05 +03:00
Steven Roose
1ffdce99ed
Deprecate the util::contracthash module
2020-08-06 12:24:08 +02:00
Elichai Turkel
654232a3dc
Deprecate Error::description
2020-04-13 02:15:28 +03:00
Steven Roose
fea09a0a94
Improve the Instructions iterator for scripts
...
- Rename the `iter` method to `instructions`.
- Add `instructions_minimal` for minimal-enforced iteration.
- Iterator has `Result<Instruction, Error>` as items.
2020-04-11 23:52:26 +01:00
Elichai Turkel
c19b736566
Remove the hex dependency
2020-01-20 18:50:02 +02:00
Dr Maxim Orlovsky
5ef39e34fa
Implementing (W)Pubkey/ScriptHash and BlockHash
2020-01-01 13:42:22 +01:00
Steven Roose
48f4c1989f
Rename bitcoin_hashes dependency to hashes
2019-08-16 15:52:27 +01:00
Jonas Nick
94fba3aa88
Remove unused rand dependency
2019-06-10 13:59:31 +00:00
Andrew Poelstra
dc6189dbb2
contracthash: more cleanups
2019-03-21 21:27:26 +00:00
Andrew Poelstra
01a3a9263c
contracthash: use `PublicKey` and `PrivateKey` types; minor cleanups
2019-03-21 21:27:26 +00:00
Andrew Poelstra
3700d100eb
contracthash: add fixed test vector
2019-03-21 21:27:26 +00:00
Carl Dong
99f63a8ca4
Convert codebase from util::hash to bitcoin_hashes
...
Also replace unsafe transmute with call to read_u64_into
2019-01-24 16:27:52 -05:00
Dimitris Apostolou
132ca5ea95
Fix typos
2019-01-23 14:17:29 -05:00
Carl Dong
ff5c4a1806
Bump secp to 0.12
2019-01-15 12:58:54 -05:00
Sebastian Geisler
79a88e1612
Move fuzzing code out of utils
2018-12-03 16:31:13 -08:00
Andrew Poelstra
08db6fe29f
script: let Instructions iterator enforce minimal pushes; remove `IntoIter` impl to force users to choose
2018-08-22 19:55:31 +00:00
Andrew Poelstra
94f3d4b0f9
update to secp256k1 0.10.0
2018-08-20 15:28:43 +00:00
Jean Pierre Dudey
b2594087db
Use the `?` (try) instead of the `try!` macro.
...
Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2018-08-12 12:47:31 -04:00
Jean Pierre Dudey
77c185d9ec
Fix modules documentation title.
...
Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2018-08-08 17:38:50 -04:00
Savil Srivastava
933dcaeb82
[code hygiene] remove deprecated rustc-serialize
...
Addresses #96 .
Turns out it was being used for hex encoding/decoding, so replaced that with the `hex` crate.
i chose to import the `decode` method as:
```
use hex::decode as hex_decode
```
so that it is clear to the reader what is being decoded when it is called. "decode" is such a generic sounding function name that it would get confusing otherwise.
2018-07-26 09:49:15 -07:00
Matt Corallo
6826d8f35c
Stub out Sha2 calls when fuzzing to mask all but the first byte
2018-03-21 18:44:10 -04:00
Tamas Blummer
1a87244b2b
Implement Segwit addresses
2018-03-20 18:26:51 +01:00
Andrew Poelstra
65d8df08b8
address: implement Bech32 support
2018-03-13 14:48:01 +00:00
Andrew Poelstra
ee1dfcf4a2
base58: remove Base58 traits, replace with encode/decode functions
2018-03-12 21:27:07 +00:00
Andrew Poelstra
066c49305f
update secp256k1 to latest version with minimized dependencies
2018-02-20 16:19:29 +00:00
Andrew Poelstra
1e47019221
cargo-clippy cleanups
2016-06-21 14:35:27 +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
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
f18157e774
Minor code changes for new rustc/clippy. No effects. Update minor version number
2016-02-18 19:44:29 +00: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
67c0b8fba7
More Error implementations
2015-10-25 12:55:48 -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
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
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