-
Notifications
You must be signed in to change notification settings - Fork 125
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
support wasm #48
base: master
Are you sure you want to change the base?
support wasm #48
Conversation
@alanpoon thanks for this PR. As you're introducing breaking changes we won't be able to merge this before we made sure all our downstream projects can be easily migrated. We haven't even introduced semver so far. |
@alanpoon i wanted to use your branch to extend it to the current implementation. I'm now made it compile but stuck with your example //Rust node_module
#[wasm_bindgen]
pub async fn k(url:String)->String{
let mut api:Api<Pair> = Api::new(format!("ws://{}", url)).await;
// get some plain storage value
let result_str = api.get_storage("Balances", "TotalIssuance", None).await.unwrap();
let result = hexstr_to_u256(result_str).unwrap();
result
} Do you have a working full example of it? |
You can look at this https://github.com/alanpoon/belanja_app/tree/developer -webpack.config https://github.com/alanpoon/belanja_app/blob/developer/webpack.config.js |
Breaking changes:
In javascript: