-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Proper native use of rusty kaspa wasm #1
Comments
this looks something that might be worth looking into https://www.npmjs.com/package/node-libs-react-native when I tried to previously install the wasm js packages into this react native app, I was hoping to use the browser-based wallet package it has. But when trying to run the wasm js packages in react native, the wasm code for node (instead of the browser) would try to run. It errors on certain code where it expects node-based-packages to be available (ie "path", "assert"). This package could potentially help with this. |
Additional possible solutions:
|
after talking with @aspectron (https://github.com/aspectron), i have learned that both the old golang kaspa js package and the new rust kaspa js package import a web assembly file. after learning this, I can conclude that the main issue here is that both the old and new packages are not compatible with react native. this means that the most plausible solution right now is to implement a webview that is able to import this kaspa pacakge (with web assembly file) and communicate back to the react native app. def huge effort for this. will add more updates as they come. |
With the release of rusty kaspa comes its compiled wasm library for node and for web.
Within a React Native mobile app, I am not able to natively use rusty kaspa wasm js pacakge. So that leaves us with a few options:
Currently, the best and easiest solution is option 1 which is to use a node express server, so that is what we are currently using. Note that no user or wallet data is stored on the server. Each time a user's app makes a POST request to the Server API, it will include your encrypted seed and your password, make a connection to a Kaspa node, perform the necessary function, and then close the connection.
We would like to move away from using the express server solution, so hopefully in the future, we can figure out a better solution.
The text was updated successfully, but these errors were encountered: