A minimal reference wallet integration built on @realmint/sdk:
list tokenized RWAs, quote, buy, and sell — non-custodial, the
user's injected wallet signs. React + Vite + viem.
npm install
VITE_BASE=/ npm run devOpen the app, paste a Realmint API key, click Load assets, Connect wallet, then Quote / Buy / Sell. (Get a key from the Realmint team.)
Exercises the SDK against the live API — list + score + a quote:
REALMINT_API_KEY=rk_live_... npm run smokeimport { RealmintClient, signerFromEip1193 } from "@realmint/sdk";
const client = new RealmintClient({ apiKey });
// list
const assets = await client.listAssets({ roots: true });
// buy — create → prepare → sign UserOp → submit → execute → poll
const sign = signerFromEip1193(window.ethereum, userAddress);
const bought = await client.buy(
{ asset_id: "paxg", source_token: "USDC", amount_in: 25, agent_wallet: userAddress },
sign,
);
// sell an EVM asset — zero signatures
await client.sellEvm({ asset_id: "paxg", source_token: "USDC", amount_in: 0.01, agent_wallet: userAddress });Fund a user over x402 with fundWithX402, and sell Solana assets with
sellSolana — see the SDK README
and the API docs.
Pushing to main builds and deploys to GitHub Pages
(.github/workflows/pages.yml). The API key is entered in the UI, so no secret
is baked into the bundle.