Closed tcharding closed 1 week ago
Moved from rust-bitcoin to rust-secp. The rust-secp signing methods, which are all agnostic to what they are signing, should take an Into<Message>
.
I took a quick look at the rust-bitcoin signing methods (Psbt::sign
was the only one that jumped out at me) and they sign specific things and should presumably take specific types.
A consequence of this is that the signing methods will require ownership of msg, whereas prior message could be passed as a ref. Is that OK?
Good catch. Yes, I think this is fine. Messages are 32-byte objects which is small enough that we want to pass them by value anyway.
We should maybe encourage implementors in the docs to make sure that their Into<Message>
types are also Copy
.
See https://github.com/rust-bitcoin/rust-bitcoin/issues/2821#issuecomment-2143050338