-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PublicKey de/serialization should support io::{Read,Write} traits. #76
Comments
I think this is blocked on free capability-less contexts. Labelling 0.12. |
Seems like bitcoin-core/secp256k1#553 is it |
Yep. Let's try to get 0.11.4 out and then we can start breaking things :) |
@apoelstra After talking with @sgeisler it seems that we can also just use the traits provided by |
The |
Imo implementing If we are just talking about serializing then having a serialize_der<W: io::Write>(writer: &mut W) -> io::Result<()> function seems to be the most idiomatic/rusty solution. If we don't want to support some crazy non allocating stream parsing deserialization doesn't seem like such a big problem since deserialize_der(data: &[u8]) -> DeserializeResult<Self> would suffice. The stream parsing supporting alternative could be: deserialize_der<R: io::Read>(reader: &mut R) -> DeserializeResult<Self> I can try to implement it if you want. |
@sgeisler agreed. I like the idea of serializing through |
See #81 for discussion. |
See conversation here: rust-bitcoin/rust-bitcoin#183 (comment)
The text was updated successfully, but these errors were encountered: