Crypto at Edge
Unanswered
American Curl posted this in #help-forum
American CurlOP
I am trying to create Lemon Squeezy webhook endpoint with Nextjs https://docs.lemonsqueezy.com/help/webhooks#signing-requests but this requires Crypto package. How can I do this on edge runtime?
2 Replies
@American Curl I am trying to create Lemon Squeezy webhook endpoint with Nextjs https://docs.lemonsqueezy.com/help/webhooks#signing-requests but this requires Crypto package. How can I do this on edge runtime?
Check these edge-compatible crypto apis and use them https://nextjs.org/docs/app/api-reference/edge#crypto-apis
Northeast Congo Lion
The crypto.subtle class is there, but it is just crazy that calculating a digest is an async function. The base crytpo library baked into Node should just be exposed. Without being able to import "crypto", the only option is to use the subtle variety.