Multichain
AppKit is now multichain. The architecture is designed to support both EVM and non-EVM blockchains. This will allow developers and projects to choose and configure multiple blockchain networks within their instance of AppKit, extending beyond just Ethereum-based (EVM) networks.
Currently, AppKit supports one non-EVM, Solana. Soon, AppKit will support Bitcoin, Polkadot, and Cosmos, allowing projects to tap into users from these different blockchain ecosystems. This will enable developers and projects to reach a broader audience and interact with multiple blockchain networks, all through a single wallet provider.
Installation
- Wagmi + Solana
- Ethers + Solana
- Ethers5 + Solana
- Basic
- npm
- Yarn
- Bun
- pnpm
npm install @reown/appkit-adapter-wagmi @reown/appkit-adapter-solana @solana/wallet-adapter-wallets
yarn add @reown/appkit-adapter-wagmi @reown/appkit-adapter-solana @solana/wallet-adapter-wallets
bun add @reown/appkit-adapter-wagmi @reown/appkit-adapter-solana @solana/wallet-adapter-wallets
pnpm add @reown/appkit-adapter-wagmi @reown/appkit-adapter-solana @solana/wallet-adapter-wallets
- npm
- Yarn
- Bun
- pnpm
npm install @reown/appkit-adapter-ethers5 @reown/appkit-adapter-solana @solana/wallet-adapter-wallets
yarn add @reown/appkit-adapter-ethers5 @reown/appkit-adapter-solana @solana/wallet-adapter-wallets
bun add @reown/appkit-adapter-ethers5 @reown/appkit-adapter-solana @solana/wallet-adapter-wallets
pnpm add @reown/appkit-adapter-ethers5 @reown/appkit-adapter-solana @solana/wallet-adapter-wallets
- npm
- Yarn
- Bun
- pnpm
npm install @reown/appkit-adapter-ethers @reown/appkit-adapter-solana @solana/wallet-adapter-wallets
yarn add @reown/appkit-adapter-ethers @reown/appkit-adapter-solana @solana/wallet-adapter-wallets
bun add @reown/appkit-adapter-ethers @reown/appkit-adapter-solana @solana/wallet-adapter-wallets
pnpm add @reown/appkit-adapter-ethers @reown/appkit-adapter-solana @solana/wallet-adapter-wallets
- npm
- Yarn
- Bun
- pnpm
npm install @reown/appkit
yarn add @reown/appkit
bun add @reown/appkit
pnpm add @reown/appkit
Integration
The AppKit instance allows you to support multiple chains by importing the respective chains, creating the respective network adapters and passing these within the createAppKit()
function.
Depending on the network adapter of your preference (Wagmi
, Ethers
, Ethers5
), the integration may vary. Let's look at what the integration will look like.
- Wagmi + Solana
- Ethers + Solana
- Ethers5 + Solana
- Basic
import { createAppKit } from '@reown/appkit'
import { SolanaAdapter } from '@reown/appkit-adapter-solana'
import { WagmiAdapter } from '@reown/appkit-adapter-wagmi'
import { solana, solanaTestnet, solanaDevnet } from '@reown/appkit/networks'
import { mainnet, arbitrum, sepolia } from '@reown/appkit/networks'
import { SolflareWalletAdapter, PhantomWalletAdapter } from '@solana/wallet-adapter-wallets'
export const networks = [solana, solanaTestnet, solanaDevnet]
// 0. Get projectId from https://cloud.reown.com
const projectId = 'YOUR_PROJECT_ID'
// 1. Create the Wagmi adapter
export const wagmiAdapter = new WagmiAdapter({
ssr: true,
projectId,
networks
})
// 2. Create Solana adapter
const solanaWeb3JsAdapter = new SolanaAdapter({
wallets: [new PhantomWalletAdapter(), new SolflareWalletAdapter()]
})
// 3. Set up the metadata - Optional
const metadata = {
name: 'AppKit',
description: 'AppKit Example',
url: 'https://example.com', // origin must match your domain & subdomain
icons: ['https://avatars.githubusercontent.com/u/179229932']
}
// 4. Create the AppKit instance
const modal = createAppKit({
adapters: [wagmiAdapter, solanaWeb3JsAdapter],
networks: [mainnet, arbitrum, sepolia, solana, solanaTestnet, solanaDevnet],
metadata: metadata,
projectId,
features: {
analytics: true,
}
})
import { createAppKit } from '@reown/appkit'
import { SolanaAdapter } from '@reown/appkit-adapter-solana'
import { EthersAdapter } from '@reown/appkit-adapter-ethers'
import { solana, solanaTestnet, solanaDevnet } from '@reown/appkit/networks'
import { mainnet, arbitrum, sepolia } from '@reown/appkit/networks'
import { SolflareWalletAdapter, PhantomWalletAdapter } from '@solana/wallet-adapter-wallets'
// 0. Create the Ethers adapter
export const ethersAdapter = new EthersAdapter()
// 1. Create Solana adapter
const solanaWeb3JsAdapter = new SolanaAdapter({
wallets: [new PhantomWalletAdapter(), new SolflareWalletAdapter()]
})
// 2. Get projectId from https://cloud.reown.com
const projectId = 'YOUR_PROJECT_ID'
// 3. Set up the metadata - Optional
const metadata = {
name: 'AppKit',
description: 'AppKit Example',
url: 'https://example.com', // origin must match your domain & subdomain
icons: ['https://avatars.githubusercontent.com/u/179229932']
}
// 4. Create the AppKit instance
const modal = createAppKit({
adapters: [ethersAdapter, solanaWeb3JsAdapter],
networks: [mainnet, arbitrum, sepolia, solana, solanaTestnet, solanaDevnet],
metadata,
projectId,
features: {
analytics: true,
}
})
import { createAppKit } from '@reown/appkit'
import { SolanaAdapter } from '@reown/appkit-adapter-solana'
import { EthersAdapter } from '@reown/appkit-adapter-ethers'
import { solana, solanaTestnet, solanaDevnet } from '@reown/appkit/networks'
import { mainnet, arbitrum, sepolia } from '@reown/appkit/networks'
import { SolflareWalletAdapter, PhantomWalletAdapter } from '@solana/wallet-adapter-wallets'
// 0. Create the Ethers adapter
export const ethersAdapter = new EthersAdapter()
// 1. Create Solana adapter
const solanaWeb3JsAdapter = new SolanaAdapter({
wallets: [new PhantomWalletAdapter(), new SolflareWalletAdapter()]
})
// 2. Get projectId from https://cloud.reown.com
const projectId = 'YOUR_PROJECT_ID'
// 3. Set up the metadata - Optional
const metadata = {
name: 'AppKit',
description: 'AppKit Example',
url: 'https://example.com', // origin must match your domain & subdomain
icons: ['https://avatars.githubusercontent.com/u/179229932']
}
// 4. Create the AppKit instance
const modal = createAppKit({
adapters: [ethersAdapter, solanaWeb3JsAdapter],
networks: [mainnet, arbitrum, sepolia, solana, solanaTestnet, solanaDevnet],
metadata,
projectId,
features: {
analytics: true,
}
})
import { createAppKit } from '@reown/appkit'
import { solana, solanaTestnet, solanaDevnet } from '@reown/appkit/networks'
import { mainnet, arbitrum, sepolia } from '@reown/appkit/networks'
// 1. Get projectId from https://cloud.reown.com
const projectId = 'YOUR_PROJECT_ID'
// 2. Set up the metadata - Optional
const metadata = {
name: 'AppKit',
description: 'AppKit Example',
url: 'https://example.com', // origin must match your domain & subdomain
icons: ['https://avatars.githubusercontent.com/u/179229932']
}
// 3. Create the AppKit instance
const modal = createAppKit({
networks: [mainnet, arbitrum, sepolia, solana, solanaTestnet, solanaDevnet],
metadata: metadata,
projectId,
features: {
analytics: true,
}
})