Skip to main content

Chain-Abstracted Token Swaps

Trade and transfer tokens across multiple blockchains without ever thinking about which chain you’re on. Powered by OneBalance API and Privy embedded wallets.

Real-time Quotes
Gasless Transactions
Cross-chain Transfers

Get started in minutes

Follow these steps to start swapping and transferring tokens across chains

1

Clone and install dependencies

Get the project set up on your local machine
git clone https://github.com/dzimiks/onebalance-chain-abstracted-swap
cd onebalance-chain-abstracted-swap
pnpm install
2

Configure environment variables

Create a .env file with your API credentials
NEXT_PUBLIC_API_URL=https://be.onebalance.io
NEXT_PUBLIC_API_KEY=your_onebalance_api_key
NEXT_PUBLIC_PRIVY_APP_ID=your_privy_app_id
You’ll need API keys from OneBalance and Privy to run the application.
3

Start the development server

Run the app locally
pnpm dev
The application will be available at http://localhost:3000
4

Connect your wallet and start swapping

Log in with social authentication (no wallet required) and start trading tokens across chains. Privy automatically creates an embedded wallet for seamless onboarding.

Explore by topic

Learn about the core features and capabilities

Chain-abstracted swaps

Trade tokens across blockchains without network switching

Cross-chain transfers

Send tokens to any address on supported networks

Portfolio tracking

View aggregated balances across all chains

Transaction history

Track all swaps and transfers in one place

Ready to start building?

Follow the quickstart guide to get your chain-abstracted swap application running in minutes.

Get Started

Build docs developers (and LLMs) love