-
Notifications
You must be signed in to change notification settings - Fork 280
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
feat: Create keys from owned array values #781
feat: Create keys from owned array values #781
Conversation
a0c356c
to
9b66c2a
Compare
Deprecation of a method is a candidate for the changelog. |
Update TupleVisitor{32,33} to pass its owned byte array to the parsing function instead of a mere byte slice. This gives us more flexibility inside the parsing function.
Construct KeyPair directly from [u8; 32]. Deprecate KeyPair::from_seckey_slice and replace all of its calls with the new method.
9b66c2a
to
e7eea32
Compare
Fixed formatting |
Do we have serde regression tests here? I'm pretty nervous that the first commit changes the serialization format. |
This PR leaves the serialization format unchanged. The changes in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK e7eea32
I'm convinced this doesn't change serialization and whatever problems there are were there already.
I updated the other key constructors to take owned array values. I updated the PR title and added an entry to the changelog for a breaking change. @Kixunil I didn't see your approval until now; sorry. |
The lint failure is real, not sure about WASM. |
WASM we can ignore. We should probably just drop the CI job entirely until they fix my 18-month-old issue about wasm-pack not working at all in CI setups. |
Oh, crap. Side note: |
I updated the constructors to take owned array values of the form [u8; LEN] instead of taking array references of the form &[u8; LEN]. This makes the constructors more canonical. Already in this commit, I could remove a bunch of calls to `&` or `*`. Because this is a breaking change, I added an entry to the changelog.
8bd7f30
to
59cf7bd
Compare
WASM is already broken on In any case, I resolved the clippy lint. |
Thanks! I would appreciate that, though bear in mind that I will never test it locally until they fix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 59cf7bd
Just FYI, deprecation is not a breaking change (yet), only removal is. Still, the changelog note is warranted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 59cf7bd; successfully ran local tests; nice! the old function signatures were super weird. and the docs were wrong lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 59cf7bd
Construct KeyPair directly from [u8; 32]. I can change the parameter to &[u8; 32] depending on the discussion in #780.