Client

A client is the entry point to the thirdweb SDK. It is required for all other actions.

Create a client

For "client-side" usage

import { createThirdwebClient } from "thirdweb";
const client = createThirdwebClient({
clientId: "<your_client_id>",
});

For "server-side" usage

import { createThirdwebClient } from "thirdweb";
const client = createThirdwebClient({
secretKey: "<your_secret_key>",
});

You will need to pass this client to other methods in the SDK. This will allow you to

  • get performant RPC to all chains
  • download/upload to IPFS
  • access Account Abstraction infrastructure (bundler, paymaster)
  • access other thirdweb services