paritytech / subxt

Interact with Substrate based nodes in Rust or WebAssembly
Other
408 stars 244 forks source link

Implemented `sign_prehashed` for `ecdsa::Keypair` and `eth::Keypair` #1598

Closed muraca closed 4 months ago

muraca commented 4 months ago

Some people might find this useful 😄

cc @niklasad1 @jsdw thanks ❤️

muraca commented 4 months ago

Thank you! Out of interest, is this something you found yourself wanting?

That is correct - and it's something that is often found in other similar libraries, including ethers

muraca commented 4 months ago

I'm thinking it's probably worth adding the same to the ecdsa impl for consistency (internally both sign_prehashed fns would end up being identical but hey ho)

You could call self.0.sign_prehashed instead of duplicating

jsdw commented 4 months ago

You could call self.0.sign_prehashed instead of duplicating

Yup, true! Are you up for adding that also?

muraca commented 4 months ago

You could call self.0.sign_prehashed instead of duplicating

Yup, true! Are you up for adding that also?

Sure, I'll do it later today

muraca commented 4 months ago

Sorry for this mess, I'm having a few issues with rust analyzer. I'll reboot my laptop and try again

jsdw commented 4 months ago

No worries, and thank yoU! Looking good to me now!