Installation
JavaScript
AppKit has support for Wagmi and Ethers v6 on Ethereum, @solana/web3.js on Solana and Bitcoin. 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 Cloud at https://cloud.reown.com and obtain a new project ID.
Implementation
wagmi Example
Check the Javascript wagmi example
For a quick integration, you can use the 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 transport
In 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.
wagmi Example
Check the Javascript wagmi example
For a quick integration, you can use the 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 transport
In 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.
In your main.js
file set up the following configuration.
Make sure that the url
from the metadata
matches your domain and subdomain. This will later be used by the Verify API to tell wallets if your application has been verified or not.
ethers Example
Check the Javascript ethers example
In your main.js
file set up the following configuration.
Make sure that the url
from the metadata
matches your domain and subdomain. This will later be used by the Verify API to tell wallets if your application has been verified or not.
Solana Example
Check the Javascript Solana example
AppKit Solana is built on top of the AppKit library and provides a set of components and actions to easily connect Solana wallets with your application.
On top of your app set up the following configuration.
Bitcoin Example
Check the Javascript Bitcoin example
AppKit Bitcoin is built on top of the AppKit library and provides a set of components and actions to easily connect Bitcoin wallets with your decentralized application.
On top of your app set up the following configuration.
Bitcoin Provider Interface
Parameters
Responses
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 <appkit-button>
component.
Web components are global html elements that don’t require importing.
Learn more about the AppKit web components here
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 <appkit-button>
component.
Web components are global html elements that don’t require importing.
Learn more about the AppKit web components here
To open AppKit you can use our web component or build your own button with AppKit actions.
Learn more about the AppKit web components here
Web components are global html elements that don’t require importing.
Learn more about the AppKit web components here
Web components are global html elements that don’t require importing.
You can trigger the modal by calling the open
function from a modal instance returned by createAppKit
.
Let’s first add two html button elements into our index.html
file:
Following with our main.js
file, we can now add the needed logic to open the modal:
Learn more about the AppKit actions here
To open AppKit you can use our web component or build your own button with AppKit actions.
Learn more about the AppKit web components here
Web components are global html elements that don’t require importing.
Learn more about the AppKit web components here
Web components are global html elements that don’t require importing.
You can trigger the modal by calling the open
function from a modal instance returned by createAppKit
.
Let’s first add two html button elements into our index.html
file:
Following with our main.js
file, we can now add the needed logic to open the modal:
Learn more about the AppKit actions here
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 <appkit-button>
component.
Web components are global html elements that don’t require importing.
Learn more about the AppKit web components here
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 <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 wagmiConfig
from our AppKit WagmiAdapter configuration.
Read more about Wagmi actions for smart contract interaction here.
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 wagmiConfig
from our AppKit WagmiAdapter configuration.
Read more about Wagmi actions for smart contract interaction here.
Ethers can help us interact with wallets and smart contracts:
@Solana/web3.js library allows for seamless interaction with wallets and smart contracts on the Solana blockchain.
For a practical example of how it works, you can refer to our lab dApp.
Was this page helpful?