Getting started with the SDK
This guide will help you get started with the Circles SDK. It shows how to use the Circles SDK with MetaMask.
Prerequisites
Metamask Plugin installed in browser
Setup Gnosis Chain (Mainnet) and/or Chiado Chain (Testnet). Check out Gnosis Chain docs here.
Install packages for CirclesSDK
If you have all prerequisites in place, start by installing the Circles SDK package and ethers v6 in your project using npm.
1. Add imports
Then, import the necessary interfaces from the Circles SDK and Ethers.
2. Add CirclesConfig
for SDK
CirclesConfig
for SDKCirclesConfig
defines the configuration settings needed to set up the SDK. You provide an object that follows this structure when initializing the SDK.
Circles is available on Gnosis Chain and Chiado Testnet. You need to specify the correct contract addresses and service endpoints for each environment.
The Gnosis Chain mainnet is the production chain for Circles.
3. Setup Provider and Signer
To setup provider and signer, we would utilize the Circles Adapter that is built to support transactions via ethers. Once you have already imported the BrowserProviderContractRunner
, you would need to initialize it.
3. Initialize the Circles SDK
To initialize the CirclesSDK, we will pass on the CirclesConfig
and Adapter
to SDK instance.
Once you have successfully created a SDK instance, you are all set to use Circles in your dApp. Let's learn more about the Circles SDK features and how you can use them on the next pages.\
Choose which Avatar would you like to build on
Last updated