Getting Started
You can get started by creating a new project or adding thirdweb to an existing project.
You can quickly create a new project with the thirdweb CLI
or clone the the Next.js or Vite starter repo:
Install the thirdweb packages in your project
- At the root of your application, wrap your app with a - ThirdwebProvidercomponent. This keeps state around like the active wallet and chain.
- Head to the thirdweb dashboard, create your account (or sign in), and click Settings to reach the api keys page. - Create an API key with - localhostincluded in the allowed domains. Securely store your secret key and copy your client id for use in the next step.- Create a - .envfile and add your client ID there. Then create a- client.tsfile with the following content:- You only need to define the client once. Exporting the client vartiable will allow you to use anywhere in your app. 
- There are two ways to connect users to your app: - The prebuilt ConnectButtonorConnectEmbedcomponents.
- Your own custom button.
 - In this guide, we'll use the prebuilt - ConnectButtoncomponent.- The - ConnectButtonand- ConnectEmbedcomponents come with built-in support for 350+ of wallets, 2000+ chains, fiat on-ramping, crypto swapping, transaction tracking, and more.- You can also build your own custom button using the - useConnecthook.
- The prebuilt 
- Once the user has connected their wallet, you can get the wallet address, balance, and other details. 
- You can read contract state with the - useReadContracthook. This works with any contract call. Simply specify the solidity function signature to get a type safe API for your contract.- Using Extensions you can do powerful queries like getting all the owned NFTs of a specific address, and generate performant typesafe functions for your contract. 
- You can execute transactions with the - useSendTransactionhook. Prepare a transaction with the- prepareContractCallfunction and pass it to the- sendTransactionfunction.- Using Extensions you can do more complex transactions like a claim, batch mint, and more. These will handle all the preprocessing needed before calling the contract. 
You know have all the basics to build your own app with thirdweb. You can also check out the full thirdweb SDK reference to learn more about the different hooks and functions available.