Identity (Ethers v5 / React)
Follow below steps to integrate the Identity flow into your dapp!
Install the javascript/react SDK
yarn install @gooddollar/web3sdk-v2Register and verify a new wallet address
import { ClaimSDK } from "@gooddollar/web3sdk-v2"
const sdk = new ClaimSDK(web3provider, "production" | "production-celo")const firstName = "John"
const callbackUrl = "https://mywebsite.com/redirectBackAfterFV" // for native mobile this should be a deeplink
const popupMode = false
const chainId = 42220 // or 122 for fuse.
try {
const link = await sdk.generateFVLink(firstName,callbackUrl,popupMode, chainId)
if(popupMode)
window.open(link)
else window.location = link
}
catch(e) {
console.log("User didn't sign his identifier")
}Options
Callback Params
Query the status of a wallet address
Delete an identity record and unregister a wallet
React hooks
Win Rewards: Building something on GoodDollar!
Last updated
Was this helpful?