BridgeKitty is a cross-chain swap aggregator. Pick a token on one chain, pick where you want it to land, and BridgeKitty fetches quotes from five routing providers — LI.FI, Squid Router, deBridge, Relay, and Across — and shows you the best one. No account, no sign-up. Connect your wallet and swap.
This repo is the demo frontend. It talks directly to the BridgeKitty backend at https://api.bridgekitty.persistence.one/api/v1 — no local proxy needed. The full integration spec is in bridgekitty-backend/docs/integration_bridgekitty.md.
Where it runs
| Environment | URL |
|---|---|
| Production | bridgekitty.persistence.one |
| Demo | bridgekittydemo.vercel.app |
| Local dev | http://localhost:5173 |
| BridgeKitty API | https://api.bridgekitty.persistence.one/api/v1 |
Two components: a React frontend and the BridgeKitty backend (operated by Persistence). No middle proxy.
┌─────────────────┐ POST /quote ┌──────────────────────────┐
│ Frontend │ ─────────────────────▶ │ BridgeKitty backend │
│ (React+Vite) │ POST /execute │ │
│ │ GET /status/:id │ api.bridgekitty. │
│ bridgekittydemo │ POST /wallets │ persistence.one │
│ .vercel.app │ POST /swaps │ │
│ │ GET /stats │ Aggregates 5 providers: │
└─────────────────┘ │ LI.FI · Squid · deBridge│
│ │ Relay · Across │
│ user's wallet signs tx directly └──────────────────────────┘
▼
┌───────────┐
│ Wallet │
│ (MetaMask │
│ /Privy) │
└───────────┘
The frontend (frontend/) handles wallet auth (Privy), draft state, balance reads (Alchemy + public RPC fallbacks), and the swap UI. Every API call goes straight to the BridgeKitty backend.
The backend lives in a separate repo and is operated by Persistence. It provides aggregated quotes, builds executable transactions, polls bridge status, and persists swap/wallet/stats records — all integrators (this demo, the MCP server, anyone else) share the same routing engine and stats pool.
- You connect a wallet (any EVM wallet via Privy). The frontend registers it with
POST /wallets. - You pick a source chain + token, a destination chain + token, and an amount.
- The frontend calls
POST /quote— one HTTP round-trip — and receives all eligible provider quotes ranked by your preference (cheapest by default). - You click "Bridge now" on the quote you want. The frontend calls
POST /executewith thequoteIdto get the unsigned transaction. - Defence-in-depth: the frontend scans the calldata to verify the recipient is your wallet (the backend already does this, but two layers is fine).
- Your wallet signs and broadcasts the transaction. The backend never sees a private key.
- The frontend records the swap with
POST /swaps(which also upserts to transaction history) and pollsGET /status/:trackingIduntil the bridge completes. - Funds land on the destination chain. The receipt is queryable via
GET /transactions?userAddress=....
Cross-chain swaps usually settle in 30 seconds to a few minutes depending on the route.
| Chain | Chain ID | Native asset |
|---|---|---|
| Ethereum | 1 | ETH |
| Base | 8453 | ETH |
| BNB Chain | 56 | BNB |
| Polygon | 137 | POL |
| Monad | 143 | MON |
The BridgeKitty backend supports many more chains; this demo's UI is limited to the five above. Token list lives in frontend/src/lib/chains.ts.
You need Node 18+. No backend, no database, no paid API keys are required.
git clone https://github.com/<your-fork>/bridgekittydemo.git
cd bridgekittydemo/frontend
npm installcp .env.production.example .envThe default VITE_BRIDGEKITTY_API_BASE_URL points at production (https://api.bridgekitty.persistence.one/api/v1). Optionally set VITE_PRIVY_APP_ID for real wallet auth — without it a demo wallet handles development.
npm run dev
# → http://localhost:5173These are not required for the app to function:
| Variable | What it gives you | Where to get it |
|---|---|---|
VITE_PRIVY_APP_ID |
Real wallet auth (MetaMask, WalletConnect, embedded wallets) | dashboard.privy.io — free tier is fine |
VITE_ALCHEMY_API_KEY |
Faster, more reliable balance reads on ETH/Base/Polygon | alchemy.com — free tier is fine |
| Variable | Required | Default | What it does |
|---|---|---|---|
VITE_BRIDGEKITTY_API_BASE_URL |
no | https://api.bridgekitty.persistence.one/api/v1 |
BridgeKitty backend base URL. Override only if running against a staging environment. |
VITE_PRIVY_APP_ID |
no | (empty) | Privy app ID for wallet auth. Without it, the app uses a demo-wallet fallback. |
VITE_ALCHEMY_API_KEY |
no | (empty) | Alchemy API key for balance reads. Without it, the app falls back to public RPCs. |
The frontend talks to the BridgeKitty backend at https://api.bridgekitty.persistence.one/api/v1. Full docs live in the backend repo: bridgekitty-backend/docs/integration_bridgekitty.md.
| Method | Path | What it does |
|---|---|---|
GET |
/health |
Liveness probe |
GET |
/chains |
List supported chains |
GET |
/tokens?chainId=X |
Token list for one chain |
POST |
/wallets |
Register/upsert a wallet |
POST |
/quote |
Get all-provider quotes for a swap |
POST |
/execute |
Build the unsigned transaction for a quoteId (idempotent) |
POST |
/swaps |
Record a swap (also upserts transaction history when txHash is present) |
GET |
/swaps?userAddress=&limit= |
Swap records for a wallet |
POST |
/transactions |
Record a signed-and-broadcast transaction |
GET |
/transactions?userAddress=&limit= |
Transaction history for a wallet |
GET |
/status/:trackingId |
Poll a bridge/swap until it completes |
GET |
/stats?period=7d|15d|30d|all |
Cumulative protocol analytics across all integrators |
bridgekittydemo/
├── README.md ← you are here
└── frontend/ Web app (bridgekittydemo.vercel.app)
├── .env.production.example Annotated env template
├── public/ Static assets, provider logos
└── src/
├── components/ React views (Swap, Agent, Stats, Landing)
├── hooks/ useSwapQuotes, useSwapExecution, etc.
├── services/ quoteService, balanceService, priceService
├── lib/ chains.ts (token registry), swap utilities
├── App.tsx Root + view orchestration
├── constants.ts LIVE_PROVIDERS, DEBOUNCE_MS, refresh intervals
├── types.ts Shared TS types
└── index.css Design system
No email, phone number, or personal data collected. The only things stored are your wallet address (already public on-chain) and swap records associated with it. Blockchain transactions are permanent and visible to anyone.
bridgekitty.persistence.one · Built by Persistence