Install the Nexus SDK packages and dependencies in your project.
In this guide you will install @avail-project/nexus-core and its peer dependencies into an existing project. By the end, your project will be ready for SDK initialization in the next step.
Prerequisites
Before you begin, make sure you have:
A JavaScript or TypeScript project — the SDK works with any framework or runtime (React, Node.js, vanilla JS, etc.)
Node.js 18+ or Bun with a package manager (npm 9+, pnpm, yarn, or bun)
An EIP-1193 compatible wallet provider to sign transactions (e.g. MetaMask via window.ethereum, or a library like wagmi)
Wallet provider
The SDK needs an EIP-1193 provider to send transactions. In a browser you can use window.ethereum directly. Wallet libraries like wagmi or RainbowKit are optional — they just make it easier to manage wallet connections in React apps.
Step 1 — Install the core package
Run one of the following commands to add the Nexus SDK to your project:
pnpmadd@avail-project/nexus-core
What gets installed
The @avail-project/nexus-core package provides:
createNexusClient — the factory function for creating a Nexus client and performing cross-chain operations
Bridge methods — bridge(), bridgeAndTransfer(), bridgeAndExecute() for moving tokens across chains
Swap methods — swapWithExactIn(), swapWithExactOut() for cross-chain token swaps
Balance methods — getBalancesForBridge() and getBalancesForSwap() for multi-chain token balances
Typed progress events — an onEvent callback with a discriminated union (status, plan_preview, plan_confirmed, plan_progress) for tracking transaction progress
Type exports — NexusClient, BridgeResult, EthereumProvider, and more
Step 2 — Verify the installation
Confirm the package was installed by importing and creating a client: