BIT
ETH
THO
COS
AVA
BSC
433
Weekly Downloads
21+
Supported Chains

Build Anywhere.
Connect Everything.

The most comprehensive cross-chain development toolkit. Support for 20+ blockchains with unified APIs that make cross-chain development as simple as single-chain development.

Powering real cross-chain projects

AsgardexASGARDEX
Leap Wallet
SwapperSwapper
LendsLends
CacaoSwapCacaoSwap
and more...

Cross-Chain Development, Simplified

Building multi-chain applications means juggling dozens of different APIs, standards, and complexities. XChainJS provides unified patterns and tools to make cross-chain development manageable.

Blockchain Fragmentation is Killing Innovation

Different APIs - Every blockchain has its own client library and methods

Inconsistent Standards - Transaction formats, fee calculations, and error handling vary wildly

Maintenance Nightmare - Updates to 20+ different libraries, each with breaking changes

Developer Frustration - Months of integration work for each new chain

The Result?

Most projects only support 2-3 blockchains, missing out on 90% of the market. Development takes 10x longer than it should, and bugs are everywhere.

Before: Traditional Approach
// Managing multiple blockchains the hard way
const bitcoinClient = new BitcoinClient(config1)
const ethereumClient = new EthereumClient(config2)
const cosmosClient = new CosmosClient(config3)
const avalancheClient = new AvalancheClient(config4)

// Different APIs for each chain
const btcBalance = await bitcoinClient.getBalance(address)
const ethBalance = await ethereumClient.balanceOf(address)
const atomBalance = await cosmosClient.queryBalance(address)
const avaxBalance = await avalancheClient.getAccountBalance(address)

// Different transaction formats
const btcTx = await bitcoinClient.sendTransaction({
  to: recipient,
  amount: amount,
  fee: calculateBtcFee()
})

const ethTx = await ethereumClient.transfer({
  recipient: recipient,
  value: amount,
  gasPrice: await ethereumClient.getGasPrice()
})

// ...and 18 more chains with different APIs
// 100+ lines of repetitive, error-prone code
100+ linesComplex & Error-prone

Explore the Blockchain Universe

Interactive map of all supported blockchains. Click any chain to see live examples and implementation details.

BTC

Bitcoin

$8.2B24h Volume
ETH

Ethereum

$12.4B24h Volume
RUNE

THORChain

$45M24h Volume
ATOM

Cosmos

$180M24h Volume
AVAX

Avalanche

$320M24h Volume
ARB

Arbitrum

$890M24h Volume
MATIC

Polygon

$650M24h Volume
BNB

BNB Chain

$1.2B24h Volume
CACAO

MAYAChain

$12M24h Volume
TRX

TRON

$450M24h Volume
21+
Supported Chains
128
GitHub Stars
46
NPM Dependents
433
Weekly Downloads

Try XChainJS in 30 Seconds

Interactive code playground with real examples. No setup required - just click and see XChainJS in action.

Code Editor

example.js
import { Client as BtcClient, defaultBTCParams } from '@xchainjs/xchain-bitcoin'
import { Client as EthClient, defaultEthParams } from '@xchainjs/xchain-ethereum'
import { Network } from '@xchainjs/xchain-client'
import { Wallet } from '@xchainjs/xchain-wallet'
import { assetToString, baseToAsset } from '@xchainjs/xchain-util'

// Initialize wallet with multiple chain clients
const wallet = new Wallet({
  BTC: new BtcClient({ ...defaultBTCParams, network: Network.Mainnet }),
  ETH: new EthClient({ ...defaultEthParams, network: Network.Mainnet })
})

// Get all balances across all chains
const allBalances = await wallet.getBalances()

// Get balance for specific chain
const ethBalances = await wallet.getBalance('ETH')

// Format and display
console.table(
  ethBalances.map((balance) => ({
    Asset: assetToString(balance.asset),
    Amount: baseToAsset(balance.amount).amount().toString()
  }))
)

Output

$node example.js
✅ Balance Results:
┌─────────┬─────────────────────┬─────────┐
│ (index) │        Asset        │ Amount  │
├─────────┼─────────────────────┼─────────┤
│    0    │     'ETH.ETH'       │ '1.25'  │
│    1    │ 'ETH.USDT-0xdAC1..' │ '100.50'│
└─────────┴─────────────────────┴─────────┘

From Idea to Production in 3 Steps

1

Try Examples

Experiment with code samples in our interactive playground

2

Install & Build

Add XChainJS to your project and start building

3

Ship to Users

Deploy your cross-chain application with confidence

Ready to build the future?

Powering Real Projects

These projects have already integrated XChainJS to build cross-chain applications. Join the growing ecosystem of developers building the multi-chain future.

Projects Using XChainJS

Asgardex

ASGARDEX

Cross-chain DEX interface

Leap Wallet

Multi-chain wallet

Swapper

Swapper

Cross-chain aggregator

Lends

Lends

Lending protocol

CacaoSwap

CacaoSwap

MAYAChain DEX

LeoDex

Trading platform

🔧

Developer Tools

Comprehensive TypeScript SDK with full type safety and excellent IDE support.

📚

Documentation

Detailed guides, examples, and API documentation to get you started quickly.

👥

Community

Active Discord and Telegram communities for support and collaboration.

128
GitHub Stars
108
GitHub Forks
46
NPM Dependents
433
Weekly Downloads

Ready to Build?

Start building cross-chain applications with XChainJS. From simple balance checks to complex DeFi protocols.

Built for Developers, by Developers

XChainJS was born from the frustration of building cross-chain applications. We've abstracted away the complexity so you can focus on what matters - building amazing user experiences.

TypeScript Native

Full type safety and excellent IDE support out of the box

Comprehensive Testing

100% test coverage ensures reliability in production

Active Community

Join 10K+ developers building the future of DeFi

Developer Metrics

433
Weekly Downloads
128
GitHub Stars
46
Dependents
21+
Supported Chains

Latest Release

v2.1.0Released 2 days ago

• Added Radix chain support
• Improved error handling
• 15% performance boost

Ready to Build the Multi-Chain Future?

Join thousands of developers already building with XChainJS. From simple swaps to complex DeFi protocols - we've got you covered.

Powering real cross-chain projects

AsgardexASGARDEX
Leap Wallet
SwapperSwapper
LendsLends