TypeScript SDK
A type-safe library to interact with any EVM-compatible blockchain in both Node.js and the browser.
Connect to user's wallets, interact with smart contracts, sign messages, and utilize common standards such as tokens, NFTs, marketplaces; all with built-in RPC URLs, IPFS gateways, and more.
TypeScript SDK is open-source. View and contribute to its source code on GitHub.
Check out the getting started guide to learn how to use the SDK in less than 2 minutes.
Get started with the TypeScript SDK
The TypeScript SDK provides a type-safe interface to interact with your smart contracts, wallets, and the blockchain.
It can interact with any contract on any EVM-compatible blockchain, without having to specify ABIs, RPC URLs, or IPFS gateways.
It also simplifies interacting with standard contracts using the Extensions Framework. Standards and common contract patterns are detected by the SDK and unlocks a convenient, high level API which does the heavy lifting for you.
For example, if your smart contract implements the standard ERC721
interface, you can list all NFTs in the contract in one line with contract.erc721.getAll()
method. This will handle querying supply, downloading metadata and owners for each token, and returning a list of type safe NFT objects.
This saves a lot of time and effort, as you don't have to manually implement these common functions yourself.
To get started, create an instance of the ThirdwebSDK class to connect to your smart contract and start interacting with it's functions and extensions.