| title | Installation |
|---|
import CloudBanner from '/snippets/cloud-banner.mdx'
import WagmiImplementation from '/snippets/appkit/javascript/wagmi/about/implementation.mdx'
import Ethers5Implementation from '/snippets/appkit/javascript/ethers5/implementation.mdx'
import EthersImplementation from '/snippets/appkit/javascript/ethers/about/implementation.mdx'
import SolanaImplementation from '/snippets/appkit/javascript/solana/about/implementation.mdx' import SolanaPrograms from '/snippets/appkit/javascript/solana/about/programs.mdx'
import BitcoinImplementation from '/snippets/appkit/javascript/bitcoin/about/implementation.mdx'
import TonImplementation from '/snippets/appkit/javascript/ton/about/implementation.mdx'
import TronImplementation from '/snippets/appkit/javascript/tron/about/implementation.mdx'
import CoreImplementation from '/snippets/appkit/javascript/core/about/implementation.mdx'
AppKit provides seamless integration with multiple blockchain ecosystems. It supports Wagmi and Ethers v6 on Ethereum, @solana/web3.js on Solana, as well as Bitcoin, TON, TRON and other networks.
We recommend using [Vite](https://vitejs.dev/guide/#scaffolding-your-first-vite-project) to get started with AppKit JavaScript.Try installing AppKit Skills to get AI-assisted guidance. Your AI coding assistant can help you set up, build, and debug your AppKit integration.
To install AppKit Skills, run the following command in your terminal:
npx skills add https://github.com/reown-com/skills --skill appkit --agent '*'After installation, you can ask your AI assistant for help with AppKit setup, implementation, and troubleshooting.
AppKit is only compatible with wagmi 2.x. Ensure you are using a compatible version (e.g., `wagmi@2.18.0`).npm install @reown/appkit @reown/appkit-adapter-wagmi wagmi@2.18.0 viemyarn add @reown/appkit @reown/appkit-adapter-wagmi wagmi@2.18.0 viembun add @reown/appkit @reown/appkit-adapter-wagmi wagmi@2.18.0 viempnpm add @reown/appkit @reown/appkit-adapter-wagmi wagmi@2.18.0 viemnpm install @reown/appkit @reown/appkit-adapter-ethers5 ethers@5.7.2yarn add @reown/appkit @reown/appkit-adapter-ethers5 ethers@5.7.2bun add @reown/appkit @reown/appkit-adapter-ethers5 ethers@5.7.2pnpm add @reown/appkit @reown/appkit-adapter-ethers5 ethers@5.7.2npm install @reown/appkit @reown/appkit-adapter-ethers ethersyarn add @reown/appkit @reown/appkit-adapter-ethers ethersbun add @reown/appkit @reown/appkit-adapter-ethers etherspnpm add @reown/appkit @reown/appkit-adapter-ethers ethersnpm install @reown/appkit @reown/appkit-adapter-solanayarn add @reown/appkit @reown/appkit-adapter-solanabun add @reown/appkit @reown/appkit-adapter-solanapnpm add @reown/appkit @reown/appkit-adapter-solananpm install @reown/appkit @reown/appkit-adapter-bitcoinyarn add @reown/appkit @reown/appkit-adapter-bitcoinbun add @reown/appkit @reown/appkit-adapter-bitcoinpnpm add @reown/appkit @reown/appkit-adapter-bitcoinnpm install @reown/appkit @reown/appkit-adapter-tonyarn add @reown/appkit @reown/appkit-adapter-tonbun add @reown/appkit @reown/appkit-adapter-tonpnpm add @reown/appkit @reown/appkit-adapter-tonnpm install @reown/appkit @reown/appkit-adapter-tronyarn add @reown/appkit @reown/appkit-adapter-tronbun add @reown/appkit @reown/appkit-adapter-tronpnpm add @reown/appkit @reown/appkit-adapter-tronnpm install @reown/appkit @reown/appkit-universal-connector @reown/appkit-common ethersyarn add @reown/appkit @reown/appkit-universal-connector @reown/appkit-common ethersbun add @reown/appkit @reown/appkit-universal-connector @reown/appkit-common etherspnpm add @reown/appkit @reown/appkit-universal-connector @reown/appkit-common ethersCreate a new project on Reown Dashboard and obtain a new project ID.
Check the JavaScript wagmi example Check the JavaScript ethers example MetaMask does not currently support WalletConnect connections on Solana. The MetaMask team is working on adding this feature. In the meantime, we recommend using other wallets that support Solana. You can find the complete list of supported wallets on [WalletGuide](https://walletguide.walletconnect.network/). Check the JavaScript Solana example Check the JavaScript Bitcoin example Check the JavaScript TON example Check the JavaScript AppKit Core example for Sui and StacksTo open AppKit you can use our web component or build your own button with AppKit actions.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>HTML AppKit Example</title>
</head>
<body>
<appkit-button />
<script type="module" src="main.js"></script>
</body>
</html>You can trigger the modal by calling the open function from the modal instance.
const modal = createAppKit({
adapters: [wagmiAdapter],
networks: [mainnet, arbitrum],
projectId
})
modal.open()To open AppKit Core you need to call the connect function from the Universal Connector.
<script>
let session = null
async function handleConnect() {
// universalConnector is the universal connector instance from the implementation section
if (!universalConnector) {
return
}
const { session: providerSession } = await universalConnector.connect()
session = providerSession
}
async function handleDisconnect() {
if (!universalConnector) {
return
}
await universalConnector.disconnect()
session = null
}
document.getElementById('open-connect-modal').addEventListener('click', handleConnect)
document.getElementById('disconnect').addEventListener('click', handleDisconnect)
</script>
<div>
<button id="open-connect-modal">Open AppKit Core</button>
<button id="disconnect">Disconnect</button>
</div>npm install @wagmi/coreyarn add @wagmi/corebun a @wagmi/corepnpm add @wagmi/coreWagmi actions can help us interact with wallets and smart contracts:
For this use case, we need to import the wagmiConfigfrom our AppKit WagmiAdapter configuration.
import { readContract } from '@wagmi/core'
import { USDTAbi } from '../abi/USDTAbi'
const USDTAddress = '0x...'
const data = readContract(wagmiConfig, {
address: USDTAddress,
abi: USDTAbi,
functionName: 'totalSupply',
args: []
})Read more about Wagmi actions for smart contract interaction here.
Ethers can help us interact with wallets and smart contracts:
import { BrowserProvider, Contract, parseEther } from 'ethers'
const provider = await modal.subscribeProviders(state => {
return state['eip155']
})
const addressFrom = await modal.subscribeAccount(state => {
return state
})
if (!provider) throw Error('No provider found')
if (!addressFrom) throw Error('No address found')
function sendTransaction() {
const tx = {
from: addressFrom,
to: '0x...', // any address
value: parseEther('0.0001')
}
const ethersProvider = new BrowserProvider(provider)
const signer = await ethersProvider.getSigner()
const tx = await signer.sendTransaction(tx)
console.log('transaction:', tx)
}If you are starting from scratch, you can use the following methods to set up your project with Reown AppKit.
AppKit Skills provide AI-powered assistance for building with Reown AppKit. Once installed, your AI coding assistant can help you set up, build, and debug your AppKit integration.To install AppKit Skills, run the following command in your terminal:
npx skills add https://github.com/reown-com/skills --skill appkit --agent '*'After installation, you can ask your AI assistant for help with AppKit setup, implementation, and troubleshooting.
Reown offers a dedicated CLI to set up a minimal version of AppKit in the easiest and quickest way possible.To do this, please run the command below.
npx @reown/appkit-cliAfter running the command, you will be prompted to confirm the installation of the CLI. Upon your confirmation, the CLI will request the following details:
- Project Name: Enter the name for your project.
- Framework: Select your preferred framework or library. Currently, you have three options: React, Next.js, and Vue.
- Network-Specific libraries: Choose whether you want to install Wagmi, Ethers, Solana, or Multichain (EVM + Solana).
After providing the project name and selecting your preferences, the CLI will install a minimal example of AppKit with your preferred blockchain library. The example will be pre-configured with a projectId that will only work on localhost.
To fully configure your project, please obtain a projectId from the Reown Dashboard and update your project accordingly.
Refer to this section for more information.