Getting Started
You can get started by creating a new project or adding thirdweb to an existing project.
Existing Projects
Install the thirdweb package in your project
New Projects
Create a new project using the thirdweb CLI
You can create Node.js, Express and other types of projects using the CLI.
Initialize the SDK
The SDK can be instantiated as read only by passing a chain or read/write by passing a chain and a wallet.
Read only SDK
This can be used for reading data from the blockchain and does not require a wallet.
Read/Write SDK
This can be used for reading and writing data to the blockchain and requires a connected wallet.
Can be instantiated from different wallet types:
Here's a typical example of instantiating the SDK from a private key:
Using the SDK
With the SDK instantiated, you can now deploy smart contracts, interact with them, and much more.
To connect to your contract, use the SDK's getContract method and the call method to read/write data.
Functions are called automatically from the wallet you instantiated the SDK with.