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

Integration with react-native #43

Open
vasilycrespo opened this issue Jan 4, 2023 · 1 comment
Open

Integration with react-native #43

vasilycrespo opened this issue Jan 4, 2023 · 1 comment

Comments

@vasilycrespo
Copy link

Hello, first of all, I just want to thank all the contributors to the library.

This report is actually not a bug or an issue, but more like looking for suggestions. I'm trying to make this library compatible with react-native, but I'm having a hard time. As far as I am concerned the library is made for the web, so there are some methods and functions not available on react-native. First of all, I had to include a few babel plugins to be able to compile my application, then The library was reporting that BigInt was not defined so I had to create a polyfill to make BigInt available, and also I had to change, the syntax of the BigInt functions using hex strings because the BigInt polyfill I implemented using another library uses a different syntax for hex values.

https://github.com/peterolson/BigInteger.js

So for example

BigInt("0X3086d221a7d46bcde86c90e49284eb15") changed to: BigInt("3086d221a7d46bcde86c90e49284eb15", 16)

After that, I had some issues with the bigint type that does not exist on react-native.

With all these changes I made the app work and I was able to call the method generateKeyPair however I got no errors there, the method just got stuck there without resolving.

So just wanted to know if someone else was able to integrate the library with a react-native app. Thanks a lot for the support.

@demattosanthony
Copy link

Were you able to make any progress on this? I too am trying to integrate with react native

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