-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fula-sec react-native incompatibility (ReferenceError: Can't find variable: BigInt) #208
Comments
@ghorbani-m from my perspective running a cryptographic algorithm on react-native will be near impossible (after you fix this you have to fix the missing secure random generator and the list will go on) @ruffiano89 how much go-fula-sec is feasible? |
@farhoud I agree, totally we need to move the encryption layer to the gomobile (go-fula) to encrypt files on the fly while streaming the files. |
@ghorbani-m I'm totally agree with you. |
@ghorbani-m
|
For random i think you can : We are heavily depend on did from ceramic network. |
I don't need use |
@ghorbani-m |
I check out "dependencies": {
"@stablelib/x25519": "~1.0.2",
"ethers": "~5.6.4",
"did-jwt": "~5.12.4",
"dids": "3.0.0-alpha.12",
"key-did-provider-ed25519": "~1.1.0",
"key-did-resolver": "~1.4.4"
} look like they depend on bn.js for bigint. (there may usages that i can not spot.) |
@ghorbani-m |
Much appreciate if you send us error log |
This is the log
And the source of it is : And :
This suggested are hacks and we end up with unstable fotos. My suggestion for @ghorbani-m and @ruffiano89 |
I've worked more on this issue and solved the BigInt issue by To get a fast conclusion tried to install etherJs on the Fotos project directly and tried to create a Wallet same as we used in the Fula-sec ( It works and I create a wallet programmatically but there is another issue, creating a wallet in react-native is too slow and for me takes around 30s! |
Finally, I resolved the BigInt issue by rn-nodeify package. My code: import { FulaDID } from "@functionland/fula-sec"
.
.
.
const fulaDID = new FulaDID();
await fulaDID.create("password", "signiture"); Error message:
|
The reason was SolutionWe need to add |
We have an issue to use the fula-sec package in react-native projects.
The issue is that some fula-sec's dependencies use the BigInt type that react-native does not support.
There is a workaround here but it does not work for me, I guess because we used the Hermes engine.
Hermes team is working on this issue as well, and in the future probably Hermes will support BigInt.
The text was updated successfully, but these errors were encountered: