You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FixesEmurgo#9
Due to how wasm_bindgen works direct enums were not allowed so the rust
values of enums are NOT what their value when converted to `Label`. This
rust value was used in the `crv` field of the `Ed25519Key` builder by
accident.
@alessandrokonrad thanks for noticing this in the CIP-30 discussion. I just put up a fix for this #10 - it was me doing the same thing I thought might be happening in the JS code, but it was in the rust details of Ed25519Key.
I think the ideal solution for these enums would be if we could fix wasm_bindgen to allow arbitrary/negative enum values, but I originally wasn't sure how hard it would be to do that or how long it would take to get that merged/etc. It's possible that if rustwasm/wasm-bindgen#2631 ever gets done that it would resolve this too, depending how they implement that.
The
CurveType
enum returns 5 forEd25519
as well as the the simplified builder::EdDSA25519Key class.This is my result:
{1: 1, 3: -8, -1: 5, -2: h'D058ED6FA27CA8FA454F1BAF2AAC58EDB774531DD2813E7BC91600D3CA8F0D4B'}
The text was updated successfully, but these errors were encountered: