-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[preset/client] Custom hash function for persisted operations #9994
Comments
Instead of adding a nee config option we can make allow the existing hash algorithm property to be a function. Please feel free to send a PR with tests and documentation updates! |
10 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
I'd like to add more flexibility for persisted operations to allow developers to insert a custom hashing function instead of being limited to
sha1
andsha256
. This helps to avoid any issues requesting additional algorithms in the future, as well as supports additional use-cases. For example, I have a use-case in which we sign operations with a specific secret, and I'd like to re-use that for the persisted operation hash.Describe the solution you'd like
An additional configuration option allowing developers to pass in a
hashFunction
. I've put together a proof of concept here. (Also, I'm happy to create a pull request for this).Describe alternatives you've considered
Currently, I'm using this plugin which supports the use-case of generating an additional file with the operations and the hashes. For convenience, simplicity, and bundle size, I'd like to attach the hash to the operation document itself.
Is your feature request related to a problem? Please describe.
No response
The text was updated successfully, but these errors were encountered: