Skip to main content

Cometh Connect

Prompt users to connect to your app with Cometh Connect.

Usage

To be able to interact with Cometh Connect, you need to create an account and get an apiKey from cometh dashboard

You also need to indicate the chain that you are working on. For now, Cometh Connect supports these networks

import { Polygon } from "@thirdweb-dev/chains";
import { ComethConnect } from "@thirdweb-dev/wallets";

const options = {
apiKey: API_KEY,
chain: Polygon,
};
const wallet = new ComethConnect(options);

wallet.connect();

Configuration

Optionally, provide a configuration object when instantiating the ComethConnect class.

clientId (recommended)

Provide clientId to use the thirdweb RPCs for given chains

You can create a client ID for your application from thirdweb dashboard.

import { Polygon } from "@thirdweb-dev/chains";
import { ComethConnect } from "@thirdweb-dev/wallets";

const options = {
apiKey: API_KEY,
chain: Polygon,
};
const wallet = new ComethConnect(
{
clientId: "YOUR_CLIENT_ID",
},
options,
);
walletAddress

Connect to an existing Cometh Connect smart wallet

This parameter allow you to connect to a user that already created a Cometh Connect smart wallet, see our docs for more info.

import { Polygon } from "@thirdweb-dev/chains";
import { ComethConnect } from "@thirdweb-dev/wallets";

const options = {
apiKey: API_KEY,
chain: Polygon,
walletAddress: walletAddress,
};
const wallet = new ComethConnect(options);

Tutorial

wallet creation

send transactions

You can go to our docs to get more info regarding advanced features (gasless transactions, recovery, multi device)

Methods

Inherits all the public methods from the AbstractClientWallet class.