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 and sha256. 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.
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!
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