Skip to content
Commit c84cfb19 authored by Andrew Poelstra's avatar Andrew Poelstra
Browse files

[BREAKING CHANGE] Make PK::from_secret_key() return a Result; change from_ffi...

[BREAKING CHANGE] Make PK::from_secret_key() return a Result; change from_ffi functions to From impls

If you try to call PublicKey::from_secret() key with an incapable context it will
now return an error. Before it would pass through to the underlying library which
would terminate the process, something we strive to never expose.

Also change the from_ffi functions on various types to impl's of From to be more
Rustic. We cannot change the from_slice functions because they have error returns.

Also add a Secp256k1::without_caps() function which creates a capability-less
context. I find myself using this in so many places downstream that it seems
appropriate.
parent b7d2b594
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment