JavaScript
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 and other networks. AppKit Core with Universal Provider library, enable compatibility across any blockchain protocol. Choose one of these to get started.We recommend using
Vite to get
started with AppKit JavaScript.
Installation
Cloud Configuration
Create a new project on Reown Dashboard at https://dashboard.reown.com and obtain a new project ID.Implementation
wagmi Example
Check the JavaScript wagmi example
createAppKit
function with a unified configuration. This automatically applies the predefined configurations for different adapters like Wagmi, Ethers, or Solana, so you no longer need to manually configure each one individually. Simply pass the common parameters such as projectId
, chains
, metadata
, etc., and the function will handle the adapter-specific configurations under the hood.This includes WalletConnect, Coinbase and Injected connectors, and the Blockchain API as a transportIn your main.js
file set up the following configuration.Importing networks
Reown AppKit use Viem networks under the hood, which provide a wide variety of networks for EVM chains. You can find all the networks supported by Viem within the@reown/appkit/networks
path.Looking to add a custom network? Check out the custom networks section.
Trigger the modal
To open AppKit you can use our web component or build your own button with AppKit actions.
In this example we are going to use the Learn more about the AppKit web components here
<appkit-button>
component.Web components are global html elements that don’t require importing.Blockchain Interaction
You need to install @wagmi/core to interact with smart contracts:Wagmi actions can help us interact with wallets and smart contracts:For this use case, we need to import the Read more about Wagmi actions for smart contract interaction here.
wagmiConfig
from our AppKit WagmiAdapter configuration.