-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Help needed in React Native Integration #1927
Comments
import {Buffer} from 'buffer';
import 'react-native-get-random-values';
global.crypto.getRandomValues;
global.Buffer = Buffer;
/**
* @format
*/
import './global.js';
import { AppRegistry } from 'react-native';
import App from './App';
AppRegistry.registerComponent(appName, () => App); I don't think fs error coming from this library |
And u can refer this if cipher-base error happens if u install |
if u install |
And u probably need to install |
Thanks @ChrisCho-H . Yes this fixes the issue for me. By the way created a template repo for integrating |
https://www.npmjs.com/package/@bitcoin-js/tiny-secp256k1-asmjs Released asmjs version of tiny-secp256k1. Also, |
It is working fine. |
@divyangkhatri happy to help 😊 |
Hi, I'm trying to integrate
[email protected]
in react-native project. The errors I'm facing are pretty much understandable. For eg:ReferenceError: Property 'Buffer' doesn't exist, js engine: hermes
. ORfs cannot be found in node modules
etc.It seems some core node modules are not available in react-native. Possible solutions I tried:
rn-nodeify
and shimming the libraries not present in react native (Problem: some modules likereact-native-udp uses compile method in it's gradle file which is deprecated.
)react-native-bitcoinjs-lib
orrn-bitcoinjs-lib
(Problem: They require rn-nodeify which recurs the previous problem)Please let me know if it's possible to suggest a workaround because the client needs this library only. Thanks a lot in advance.
The text was updated successfully, but these errors were encountered: