I am trying to pass a public key to a anchor rpc method but think I am not generating it correctly in Javascript, I tried padding it with and without quotes but to no avail. anchor test gives me a TypeError: key.toBuffer is not a function IF I pad it. IF I do not pad it then I get the
Tag: rust
Borsh JS and Borsh Rust slightly different serialized output
I am trying to send borsh serialized data from JS to rust application. However, when serialising data in javascript AND rust (to compare the outputs), I am getting 4 extra bytes in rust serialised output. Here is the code: Borsh JS code Borsh Rust Code Comparing outputs of both Borsh JS Borsh Rust There are extra 4 bytes (1, 0,
Hanging promise canceled
I’m trying to set Cloudflare’s workers to track the circulation of some ERC20 tokens as an exercise to learn web3 and wasm. Thought it could be simple enough, but about 90% of the time so far has been trying to solve this elusive error I look for additional information online, but it seems my error is from a different type(?).
Loading module was blocked because of a disallowed MIME type (“application/wasm”)
I serve a static file server (through HTTP), which contains data generated by wasm-pack. Using the examples from the rustwasm book, I added this code to my index HTML page: However, on Firefox, I get the error message as indicated in the title: module from “http://localhost:8000/pkg/fstree_web_bg.wasm” was blocked because of a disallowed MIME type (“application/wasm”). I suspected HTTPS issues or