Overview
The repository includes three example applications in the examples/ directory:- Web Example — Svelte + Vite, with three wallet connection methods (Cartridge, Privy, private key) and panels for every SDK module.
- Mobile Example — React Native + Expo, mirroring the web example across eight feature tabs.
- Server Example — Express backend providing Privy wallet operations and a paymaster proxy for the other two.
file:../.. and file:../../packages/native), so a change to src/ is picked up on the next build.
- Web App
- Mobile App
- Server
The web example is a Svelte + Vite app demonstrating wallet integration in the browser. Its panels are organised by SDK module, one directory per feature under The app will be available at Or start them separately — Vite on 5173, Express on 3001:Then point the app at the server with SDK setup in Connecting with Privy:Executing a Transaction:
examples/web/src/features/.Features
- ✅ Three wallet connection methods:
- Cartridge Controller (social login / passkey)
- Privy (server-managed keys)
- Private Key (local signing)
- ✅ Account deployment and status checking, across account presets (OpenZeppelin, Argent, Braavos, and others)
- ✅ Balances, transfers, staking, and yield
- ✅ Swaps and DCA (AVNU and Ekubo)
- ✅ Lending (Vesu)
- ✅ Bridging from Ethereum and Solana, and withdrawals out of Starknet
- ✅ Privacy — both the STRK20 pool and Tongo
Getting Started
http://localhost:5173 (or the port Vite assigns). npm install also builds the SDK from the repo root, since the example depends on it as starkzap: file:../...Running with Privy Server
Privy and the paymaster proxy both come from the server example. Run both at once fromexamples/web:VITE_PRIVY_SERVER_URL in examples/web/.env.Bridge Setup (Web Example)
The web example can also demonstrate bridge flows from Ethereum/Solana into Starknet, as well as withdrawals out of Starknet.Set optional environment variables inexamples/web/.env:Layerswap keys are environment-scoped. The web example also reads
VITE_LAYERSWAP_API_KEY_MAINNET / VITE_LAYERSWAP_API_KEY_TESTNET (falling back to VITE_LAYERSWAP_API_KEY), plus an optional VITE_LAYERSWAP_BASE_URL override.examples/web/src/main.ts:Key Code Snippets
Connecting with Cartridge:Common Patterns
Error Handling
All examples include proper error handling:Loading States
Examples demonstrate loading state management:Transaction Tracking
All examples show how to track transaction status:Next Steps
- Explore the example code in the
examples/directory - Adapt the patterns to your own application
- Check the API Reference for detailed method documentation
- Review the Troubleshooting guide if you encounter issues