Skip to main content
OneBalance now supports Solana blockchain, enabling you to aggregate balances and assets from both Solana and EVM chains into unified operations. Use your SOL, USDC, or other Solana assets alongside EVM tokens for optimized cross-chain transactions.

What You Can Do

Abstract Bridging & Funding

Use EVM balances to buy tokens and pay fees on Solana, and vice versa - no manual bridging required

Optimized Routing

Automatically find the best liquidity and lowest fees across Solana and EVM ecosystems

EVM Contract Calls

Execute smart contract functions on EVM chains using combined EVM and Solana balance funding

Solana Contract Calls

Execute programs on Solana using combined balances (coming soon)

Key Differences from EVM

v3 API Endpoints Required

Solana operations require the v3 API endpoints which support multiple accounts:
// v1 (EVM only) - Single account object
{
  "from": {
    "account": { "sessionAddress": "0x...", ... }
  }
}

// v3 (Cross-chain) - Accounts array
{
  "from": {
    "accounts": [
      { "type": "role-based", "sessionAddress": "0x...", ... },
      { "type": "solana", "accountAddress": "J5CC..." }
    ]
  }
}

Solana Account Structure

Solana accounts are simpler than EVM smart accounts:
{
  "type": "solana",
  "accountAddress": "J5CCzBULFax899tcirb6wMbenQUd8whbaetG7EfSick5"
}
Solana uses base58-encoded addresses and doesn’t require session/admin addresses like EVM smart accounts.

Different Signing Process

Solana transactions use a different signing mechanism than EVM:
import { MessageV0, VersionedTransaction } from '@solana/web3.js';
import bs58 from 'bs58';

async function signSolanaOperation(dataToSign: string, wallet: any) {
  // 1. Convert base64 data to Message
  const message = MessageV0.deserialize(Buffer.from(dataToSign, 'base64'));
  
  // 2. Create versioned transaction
  const transaction = new VersionedTransaction(message);
  
  // 3. Sign with wallet
  const signedTx = await wallet.signTransaction(transaction);
  
  // 4. Extract signature in base58 format
  return bs58.encode(Buffer.from(signedTx.signatures[signedTx.signatures.length - 1]));
}

Prerequisites

Before integrating Solana with OneBalance:
API Key Configuration: Custom API keys need Solana explicitly enabled. Contact support@onebalance.io or use the public test key 42bb629272001ee1163ca0dbbbc07bcbb0ef57a57baf16c4b1d4672db4562c11 for development.

Integration Steps

1

Update to v3 endpoints

Switch from v1 to v3 endpoints to support Solana accounts:
2

Add Solana wallet support

Integrate Solana wallet providers like Phantom, Solflare, or others in your frontend.
3

Handle cross-chain account structure

Update your code to use the accounts array format to support both EVM and Solana accounts.
4

Implement Solana signing

Add Solana-specific transaction signing using @solana/web3.js and bs58 libraries.
5

Test operations

Test your integration with the API

Account Setup Patterns

You can configure accounts in different ways based on your needs:

Single Account Operations

// Solana-only operation
const quote = await fetch('/api/v3/quote', {
  method: 'POST',
  body: JSON.stringify({
    from: {
      accounts: [{
        type: "solana",
        accountAddress: "J5CCzBULFax899tcirb6wMbenQUd8whbaetG7EfSick5"
      }],
      asset: { assetId: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/slip44:501" },
      amount: "10000000" // 0.01 SOL
    },
    to: {
      asset: { assetId: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/token:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" }
    }
  })
});

Cross-Chain Operations

// Cross-chain: Solana → EVM
const quote = await fetch('/api/v3/quote', {
  method: 'POST', 
  body: JSON.stringify({
    from: {
      accounts: [{
        type: "solana",
        accountAddress: "J5CCzBULFax899tcirb6wMbenQUd8whbaetG7EfSick5"
      }],
      asset: { assetId: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/slip44:501" },
      amount: "10000000"
    },
    to: {
      asset: { assetId: "eip155:42161/erc20:0xaf88d065e77c8C2239327C5EDb3A432268e5831" },
      account: "eip155:42161:0x895Cf62399bF1F8b88195E741b64278b41EB7F09"
    }
  })
});

Unified Balance Operations

// Use aggregated balances from both EVM and Solana accounts
const quote = await fetch('/api/v3/quote', {
  method: 'POST',
  body: JSON.stringify({
    from: {
      accounts: [
        // Your EVM smart account
        {
          type: "kernel-v3.1-ecdsa",
          accountAddress: "0xd4f5A60c9b500f875ADf757BC3027A4424079E05",
          deploymentType: "ERC4337",
          signerAddress: "0x9b747cC14A5672a7166b4eccdc92d7F4003f8081"
        },
        // Your Solana account
        {
          type: "solana",
          accountAddress: "J5CCzBULFax899tcirb6wMbenQUd8whbaetG7EfSick5"
        }
      ],
      asset: { assetId: "ob:usdc" }, // Aggregated USDC across all chains
      amount: "10000000"
    },
    to: {
      asset: { assetId: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/slip44:501" }
    }
  })
});

Next Steps

For questions or support with Solana integration, use the Intercom chat widget in the bottom right corner for instant help, join our Discord, or reach out via support.
I