aurora-rs / stellar-base-rs

Low level Stellar types for Rust.
https://docs.rs/stellar-base
Apache License 2.0
8 stars 6 forks source link

Agnostic crypto backend #4

Closed trevor-crypto closed 2 years ago

trevor-crypto commented 2 years ago

I would like to use this library but not have to rely on sodiumoxide for key generation and signing.

My proposal is to put KeyPair behind a feature flag and keep it as a default feature. Then create a Signer trait that can be implemented by a user of this library. KeyPair will implement this trait.

I have to fork and do this regardless, but if someone has an idea or desired implementation strategy, please let me know and I will follow that path so the changes can be merged upstream.

fracek commented 2 years ago

That sounds good to me. If you send a PR I will review it and update the crate.