x0oo11235oo0x / typescript-sdk

Home Page:https://docs.thirdweb.com/typescript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Thirdweb SDK

Looking for version 1 (legacy)? Click here.

Installation

Install the latest version of the SDK with npm:

npm install @thirdweb-dev/sdk ethers

or with yarn:

yarn add @thirdweb-dev/sdk ethers

Quick start

  1. Deploy & customize your contracts
  • Using your thirdweb dashboard (recommended)
  • Using the SDK directly (for advanced use cases)
  1. 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);

Api Reference & code examples

Get in touch

About

https://docs.thirdweb.com/typescript

License:Apache License 2.0


Languages

Language:TypeScript 98.6%Language:JavaScript 1.3%Language:Shell 0.0%Language:Makefile 0.0%