Getting Started
You can get started by creating a new project or adding thirdweb to an existing project.
Install the thirdweb package in your project
Create a new project using the thirdweb CLI
You can create Node.js, Express and other types of projects using the CLI.
The SDK can be instantiated as read only by passing a chain or read/write by passing a chain and a wallet.
API Key
You will require an API key to use thirdweb's infrastructure services with the SDK. If you haven't created a key yet you can do so for free from the thirdweb dashboard.
- For Client side applications use your
clientId
when instantiating the SDK. - For Server side applications use your
secretKey
when instantiating the SDK.
This can be used for reading data from the blockchain and does not require a wallet.
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:
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.