Skip to main content

Getting Started

To get started using the Contract SDK to interact with contracts, there are two options:

  1. Create a new project with the CLI which automatically sets up the relevant package(s).
  2. Add to an existing project by installing the relevant package(s).

1. Create a New Project​

To create a new project, use the thirdweb create command to setup a front-end or scripting project and install the required dependencies:

npx thirdweb create --next

2. Add to an Existing Project​

To add to an existing project, install the relevant package(s) and import into the desired files. For example, to install the React and TypeScript SDKs, run the following command:

npm i @thirdweb-dev/react @thirdweb-dev/sdk

Then, you can import the relevant hooks and functions, e.g. the useContract hook, which you need to install from the React SDK:

import { useContract } from "@thirdweb-dev/react";

For more information on how to get started using each of the SDKs, see the full references.

Full Reference​

How and what can be done with the SDKs depends on the required language. The same base set of functionality is included but consult the full references: