Commit Graph

8 Commits

Author SHA1 Message Date
Tobin Harding 47411ce73d Fix typo in documentation
Docs reference a function name but there is a typo.

'grund' -> 'grind'.
2022-01-19 15:22:37 +11:00
Tobin Harding c7a8bbb772 Use the new recover_ecdsa in bench function
We recently deprecated `recover` in favour of `recover_ecdsa` but missed
one call site in benches.
2022-01-14 13:19:36 +11:00
Tobin Harding 72f5e0441e Do not use deprecated functions
Recently we deprecated a bunch of methods/functions. We are still
calling them in test code. Found by Clippy.

Use the shiny new methods/functions instead of the deprecated ones.
2022-01-12 18:56:08 +11:00
Tobin Harding 69f44d9301 Manually implement Debug for SerializedSignature
Currently we have an implementation of `Debug` (also used by `Display`)
for `Signature` that first converts the sig to a `SerializedSignature`
then prints it as hex.

We would like to have an implementation of `Debug` for
`SerializedSignature`, this cannot be derived because of the `data: [u8;
field]`. We can manually implement `Debug` for `SerializedSignature`
exactly as it is currently done for `Signature` and call this new
implementation from `Signature::fmt()`.

This code path is already tested in `lib.rs` in the test function
`signature_display`.
2022-01-07 10:42:34 +11:00
Tobin Harding 0ad414a982 Remove unneeded return statements
Clippy emits a few warnings:

 warning: unneeded `return` statement

As suggested, remove the unneeded return statements.
2022-01-07 10:18:49 +11:00
Martin Habovstiak 1bf05523f0 Documented features
This documents the Cargo features making sure docs.rs shows warning for
feature-gated items. They are also explicitly spelled out in the crate
documentation.
2022-01-04 16:55:01 +01:00
Thomas Eizinger ce4427747d
Move ECDSA functionality into ECDSA module 2021-11-11 13:43:50 +11:00
Thomas Eizinger c47ead9967
Move `Signature` and `SerializedSignature` to new `ecdsa` module
With the introduction of Schnorr signatures, exporting a `Signature`
type without any further qualification is ambiguous. To minimize the
ambiguity, the `ecdsa` module is public which should encourage users
to refer to its types as `ecdsa::Signature` and `ecdsa::SerializedSignature`.

To reduce ambiguity in the APIs on `Secp256k1`, we deprecate several
fucntions and introduce new variants that explicitly mention the use of
the ECDSA signature algorithm.

Due to the move of `Signature` and `SerializedSignature` to a new module,
this patch is a breaking change. The impact is minimal though and fixing the
compile errors encourages a qualified naming of the type.
2021-11-11 13:43:48 +11:00