Skip to content

availproject/nexus-sdk

Repository files navigation

Nexus SDK

A powerful TypeScript SDK for cross-chain operations, token bridging, and unified balance management across multiple EVM chains.

Packages

This monorepo contains two main packages:

Headless SDK for cross-chain operations

  • No React dependencies
  • Direct chain abstraction integration
npm install @avail-project/nexus

📖 Core Documentation

React components for cross-chain transactions

  • Ready-to-use React widgets
  • Drop-in bridge, transfer, bridge-and-execute and execute components
npm install @avail-project/nexus-widgets

Widgets Documentation

Supported Networks

Mainnet Chains

Network Chain ID Native Currency Status
Ethereum 1 ETH
Optimism 10 ETH
Polygon 137 MATIC
Arbitrum 42161 ETH
Avalanche 43114 AVAX
Base 8453 ETH
Scroll 534352 ETH
Sophon 50104 SOPH
Kaia 8217 KAIA
BNB 56 BNB
HyperEVM 999 HYPE

Testnet Chains:

Network Chain ID Native Currency Status
Optimism Sepolia 11155420 ETH
Polygon Amoy 80002 MATIC
Arbitrum Sepolia 421614 ETH
Base Sepolia 84532 ETH
Sepolia 11155111 ETH
Monad Testnet 10143 MON

Supported Tokens

Token Networks
ETH All EVM chains
USDC All supported
USDT All supported

🚀 Quick Examples

Headless SDK

import { NexusSDK } from '@avail-project/nexus';

const sdk = new NexusSDK({ network: 'mainnet' });
await sdk.initialize(provider);

// Bridge tokens
const result = await sdk.bridge({
  token: 'USDC',
  amount: 100,
  chainId: 137,
});

React Widgets

import { NexusProvider, BridgeButton } from '@avail-project/nexus-widgets';

function App() {
  return (
    <NexusProvider config={{ network: 'mainnet' }}>
      <BridgeButton prefill={{ token: 'USDC', amount: '100', chainId: 137 }}>
        {({ onClick, isLoading }) => (
          <button onClick={onClick} disabled={isLoading}>
            Bridge USDC
          </button>
        )}
      </BridgeButton>
    </NexusProvider>
  );
}

Documentation

🛠️ Development

# Install dependencies
pnpm install

# Build all packages
pnpm build

# Run tests
pnpm test

License

MIT