Closed Desttro closed 1 year ago
The Cloudflare Workers doesn't support the Node Crypto API (which is what this library uses). Instead it relies on the Web Crypto API.
I'm surprised that you found your example to work since I can't find any reference stating that Web Crypto contains the X509Certificate
class (or any other way of working with X509 certificates for that matter).
So after further testing, I came across a bug - the solution is not functional. Everything starts and pretends to work. But when a function like decodeTransaction
is to be executed it throws an error.
Are you planning to add support for Web Crypto API?
I will try to find a solution - I will share it.
That makes sense. It throws an error because crypto.X509Certificate
is undefined. 😊
I don't have any plans of adding support for Web Crypto. I'd prefer not to add any dependencies that are unnecessary for the majority of users of this library (those running Node.js). If you can come up with a solution I'm happy to take a look.
hi, @agisboye ,First of all, thank you for providing such a great plugin. However, there are increasingly more JavaScript runtime environments available today, such as Deno, Bun, and Cloudflare Workers, they may not necessarily support all the APIs of Node.js. Therefore, I would still appreciate it if you could support these platforms if you have the time. Thank you.
Hi @saviourdog,
Thanks for using the library! I unfortunately don't have the time to add support for every new runtime that pops up. If you want to propose a solution for supporting other runtimes, I'd be happy to have a discussion around it.
I use a library with Cloudflare Workers:
when I run the application through the wrangler, it returns an error:
When I make the following changes, everything works as it should: