Skip to main content

How It Works

The SDK is a transaction builder — it handles all the bridge protocol complexity (validation, encoding, fee calculation) and gives you back unsigned transactions. You then sign and broadcast using whatever library you prefer. This design gives you full control over signing, gas estimation, and transaction management. Whether you’re building a frontend wallet integration or a backend service with your own key management, the SDK fits your architecture.

The Three-Step Flow

Every cross-chain transfer follows the same pattern:
1

Validate

Call bridge.validateTransfer() with your transfer parameters. The SDK checks that addresses are valid, the token is registered, amounts survive decimal normalization, and returns a ValidatedTransfer object.
2

Build

Pass the validated transfer to a chain-specific builder (like evm.buildTransfer()). You get back an unsigned transaction — a plain object with to, data, value, etc.
3

Sign & Send

Use your preferred library to sign and broadcast. The unsigned transaction format works directly with viem, ethers v6, near-kit, @near-js/*, and @solana/web3.js.
import { createBridge, ChainKind } from "@omni-bridge/core"
import { createEvmBuilder } from "@omni-bridge/evm"

// 1. Validate
const bridge = createBridge({ network: "mainnet" })
const validated = await bridge.validateTransfer({
  token: "eth:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  amount: 1000000n,
  fee: 0n,
  nativeFee: 0n,
  sender: "eth:0xYourAddress...",
  recipient: "near:alice.near",
})

// 2. Build
const evm = createEvmBuilder({ network: "mainnet", chain: ChainKind.Eth })
const tx = evm.buildTransfer(validated)

// 3. Sign & Send (using viem, ethers, or any wallet)
await walletClient.sendTransaction(tx)

Packages

Install the umbrella package for everything, or pick individual packages to minimize bundle size:
@omni-bridge
sdk → Umbrella (re-exports all)
core → Validation, types, API client
evm → Ethereum, Base, Arbitrum, Polygon, BNB
near → NEAR Protocol
solana → Solana
btc → Bitcoin, Zcash
# Install everything
npm install @omni-bridge/sdk

# Or just what you need
npm install @omni-bridge/core @omni-bridge/evm

Supported Chains

EVM Chains

Ethereum, Base, Arbitrum, Polygon, BNB Chain

NEAR

NEAR Protocol

Solana

Solana

Bitcoin

Bitcoin

Zcash

Zcash

Next Steps