A Next.js application showcasing integration between OneBalance and Privy for seamless chain-abstracted transactions and user authentication.
This demo demonstrates:
- User authentication via Privy (email, social, or wallet)
- Smart account prediction and creation with OneBalance
- Cross-chain asset transfers and swaps
- Aggregated balance view across multiple chains
- Next.js 15 with App Router
- TypeScript
- Privy for authentication
- OneBalance for smart accounts and cross-chain transactions
- TailwindCSS for styling
-
Clone the repository
-
Install dependencies:
pnpm install
-
Create a
.envfile with the following variables:NEXT_PUBLIC_PRIVY_APP_ID=your-privy-app-id NEXT_PUBLIC_ONEBALANCE_API_KEY=your-onebalance-api-key -
Run the development server:
pnpm dev
-
Open http://localhost:3000 to view the application
- Authentication: Login with email, social accounts, or connect an existing wallet
- Smart Accounts: Each user gets a OneBalance smart account that works across multiple chains
- Asset Management: View and manage assets across different blockchains
- Transfers & Swaps: Perform cross-chain transfers and asset swaps with optimized routing
