pub fn with_static_client_async<F, Fut, T>(f: F) -> PromiseExpand description
Asynchronously executes a closure with the static RpcWasmClient, returning
the result as a JavaScript Promise.
This is the primary way to interact with the static RPC client from exported async functions.
§Parameters
f: A closure that receives theArc<RpcWasmClient>and returns aFutureresolving toResult<T, String>, whereT: Into<JsValue>.
§Returns
A JS Promise that resolves to T or rejects with an error string.
§Errors
If the static client has not been initialized via init_static_client(),
the promise will reject with "RPC client not initialized".