Consider using WebCrypto Subtle API instead of Node.js specific crypto API. It's used only for createHash here, which we can replace with crypto.subtle.digest.
The subtle crypto API is available in Node globalThis since v20.
This change (along with some more) will help us with Web Monetization extension, where we have to polyfill node:crypto module. See interledger/open-payments-node#7 and interledger/open-payments-node#4.
Consider using WebCrypto Subtle API instead of Node.js specific
cryptoAPI. It's used only forcreateHashhere, which we can replace withcrypto.subtle.digest.The subtle crypto API is available in Node globalThis since v20.
This change (along with some more) will help us with Web Monetization extension, where we have to polyfill
node:cryptomodule. See interledger/open-payments-node#7 and interledger/open-payments-node#4.