Skip to content
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

[BUG] Signing algorithm IDs do not match those in Cadence #1851

Closed
jribbink opened this issue Feb 27, 2024 · 1 comment
Closed

[BUG] Signing algorithm IDs do not match those in Cadence #1851

jribbink opened this issue Feb 27, 2024 · 1 comment
Labels
Bug Something isn't working

Comments

@jribbink
Copy link
Contributor

jribbink commented Feb 27, 2024

Currently, signing algorithm IDs do not match those known to the cadence runtime (SignatureAlgorithm enum from Crypto stdlib). This is not a "bug" per se, as is actually by design to match flow-go. However, it can be very misleading for developers looking to upgrade to Cadence 1.0

These would ideally match because of users attempting to upgrade their code to Cadence 1.0 & mistakenly assuming these constants match 1:1 with those in the Cadence runtime. Because of the requirement to upgrade to the new Key Management API, many users will likely attempt to convert their code in a way that leverages the key ID constants exported by this library.

However, this would be difficult to change due to backward compability risks & would probably require a major version change.

There has been discussion in onflow/flow-go#3318 surrounding this issue, and these specific key IDs known to @onflow/util-encode-key historically existed because key-encoding was apart of flow-go, so the @onflow/util-encode-key utility had to match. However, it may be time to deprecate this library because this Key Management API is as well being deprecated and simply include these constants as apart of FCL-JS, if necessary.

@jribbink jribbink added the Bug Something isn't working label Feb 27, 2024
@jribbink jribbink changed the title [BUG] Signing algorithm IDs do not match those known to Cadence [BUG] Signing algorithm IDs do not match those in Cadence Feb 27, 2024
@jribbink jribbink reopened this Feb 27, 2024
@jribbink
Copy link
Contributor Author

jribbink commented Apr 2, 2024

This has been replaced by an entry in @onflow/types & the util-encode-key package can be deprecated with cadence v1.0.0

@jribbink jribbink closed this as completed Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

1 participant