Docs · 01
Quickstart
Ask for a wallet's balances privately, in five lines.
Install
npm i https://mumrpc.vercel.app/sdk/mum-rpc-0.1.0.tgz
The package is served by this site (ES module, TypeScript types and the WebAssembly client). On a page with no build step, import it directly: import { createPrivateRpc } from "https://mumrpc.vercel.app/sdk/index.js".
Look up a wallet
import { createPrivateRpc } from "mum-rpc";
const rpc = await createPrivateRpc("https://rpcprivate-server-production.up.railway.app");
const balances = await rpc.getBalances("<wallet address>");
// { sol: "1.5", lamports: "1500000000",
// tokens: [{ symbol: "USDC", mint: "EPjF…", amount: "12.3", raw: "12300000" }] }
// or null if the wallet holds none of the tracked tokenscreatePrivateRpc downloads the server layout, generates fresh keys in the page and uploads their public half once (1.6 MB). Each lookup then sends 16 KB and receives 84 KB.
Sessions
Lookups made with the same rpc object share one key, so the server can tell they come from the same session (not what they ask). Call rpc.reset() or create a new client to start an unlinkable session.
Bundlers
The client is 233 KB of WebAssembly. If your bundler doesn’t serve it next to the JS, copy wasm/rpcprivate_bg.wasm to your public folder and pass { wasm: "/rpcprivate_bg.wasm" } as the second argument.