RPC methods are being proxied, which makes usage difficult. In the index.d.ts file, export is specified, but the generated index.js exports a Proxy. This also causes a "not found" error, similar to the example. RPC methods should be moved outside the proxy.
|
export default new Proxy(Entrypoint, classProxyHooks); |
lib.rs:
#[wasm_bindgen]
pub async fn greet()
build/index.d.ts:
export function greet(): void;
demo.ts:
import {greet} from "./build/index.js" //throw error not found greet