Privy-style interactive demo for @cavos/kit. Customize the embedded login modal live (background, accent, corner radius, logo, providers), then sign in to create a real device-signer wallet on Solana devnet — no install, no seed phrase.
cp .env.example .env.local # fill NEXT_PUBLIC_CAVOS_APP_ID
npm install
npm run devOpen http://localhost:3000.
| Var | Purpose |
|---|---|
NEXT_PUBLIC_CAVOS_APP_ID |
Cavos app id — activates the gasless relayer + branding. Register at cavos.xyz. |
NEXT_PUBLIC_SOLANA_DEVNET_RPC_URL |
Devnet RPC (Alchemy/Helius). Public devnet fails from the browser. |
STELLAR_TREASURY_SECRET |
Server-only testnet treasury secret for "Receive a USDC payment". |
NEXT_PUBLIC_STELLAR_USDC |
CODE:ISSUER the demo pays and Reserve charges in. Defaults to Circle testnet USDC. |
STELLAR_CLAIMABLE_AMOUNT |
USDC per claimable balance (default 25). Must exceed the activate ceiling (5). |
A fresh Stellar address can come to life two ways, and the Balance panel offers both side by side — but only while the account does not exist:
- Get devnet XLM — Friendbot creates the account with 10,000 XLM. One-way, plain-XLM path: it is only shown in the
unfundedstate because Friendbot only creates accounts (it 400s on existing ones), and taking it means that address skips Reserve entirely. - Receive a USDC payment → Activate account — the demo treasury pays a claimable balance to the address (no account needed), then one signature through Cavos Reserve creates the account, opens the USDC trustline, and claims the balance. Reserves and fees are paid out of the claimed USDC, so the account holds 0 XLM by design.
- Generate a keypair in Stellar Lab and fund it via Friendbot.
- Open a trustline from the treasury to the chosen USDC issuer.
- Fund it with USDC from the Cavos issuer (
GCKUFD5K…, see Reserve/v1/tokens), or from https://faucet.circle.com for Circle's testnet USDC (USDC:GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5) — setNEXT_PUBLIC_STELLAR_USDCaccordingly. Testnet USDC cannot be bought on the DEX; there is no XLM→USDC path. - Put the secret in
.env.localasSTELLAR_TREASURY_SECRET(neverNEXT_PUBLIC_).
Each unclaimed claimable locks 25 USDC + 0.5 XLM of treasury reserve. A Reserve-created account has no Cavos on-chain envelope, so it only unlocks on the browser that created it.
This demo uses @cavos/[email protected]: multi-chain session, Cavos vault, lazy deploy, and the modal's inline render mode plus backgroundColor / radius / appLogo theming.