Skip to content
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

Reliance on discontinued crypto-js requires node/browser pollyfill #3

Closed
adamc-texthelp opened this issue Apr 4, 2024 · 2 comments
Closed

Comments

@adamc-texthelp
Copy link

This is more of an inquiry/suggestion on the use of the crypto-js library.

crypto-js is discontinued and versions 4+ of crypto-js rely on using the native node / browser library crypto for some functionality .
https://github.com/brix/crypto-js/blob/develop/README.md#400

This means people using this library need to decide on either polyfilling with the node api module or relying on browser support. This is difficult to check as I'm not entirely sure what functions of crypto are required for crypto-js usage so it's hard to gauge browser support.

Could you provide insight on what you recommend for iink-ts usage of crypto-js and If possible would removing the crypto-js dependency be viable in future?

@leJsboureau
Copy link
Collaborator

leJsboureau commented Apr 8, 2024

Cyrpto-js is only used to encrypt the "hmac" header in batch or respond to the ack message when the hmac is activated with the key used.
You can see how we implemented the library here: crypto.ts
You can see where we use it here:

You are right, the library is no longer maintained. This will disappear in the next version in favor of the native Crypto module.

@leJsboureau
Copy link
Collaborator

New version (1.0.5) with removal of crypto-js dependency.
Thank you for your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants