Looking for version 1 (legacy)? Click here.
Install the latest version of the SDK with npm
:
npm install @thirdweb-dev/sdk@nightly ethers
or with yarn
:
yarn add @thirdweb-dev/sdk@nightly ethers
- Deploy & customize your contracts
- Using your thirdweb dashboard (recommended)
- Using the SDK directly (for advanced use cases)
- Interact with your contracts from your own code using the thirdweb SDK
import { ThirdwebSDK } from "@thirdweb-dev/sdk";
// instantiate the SDK with a read only RPC url or a Signer to perform transactions
const sdk = new ThirdwebSDK("your_rpc_url_or_signer");
// access your deployed contracts
const nftDrop = sdk.getNFTDrop("0x...");
const marketplace = sdk.getMarketplace("0x...");
// Read from your contract
const listings = await marketplace.getAllListings();
// Perform transactions (requires a signer)
await marketplace.buyoutDirectListing(listingId, quantityDesired);