thirdweb
БесплатноБез исполняемых скриптовНе проверенthirdweb is a web3 development platform: a TypeScript and React SDK for connecting wallets, reading and writing smart contracts, deploying prebuilt ERC-20…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
thirdweb
Overview
thirdweb ships one npm package, thirdweb (v5, checked against 5.122.0), with subpath exports: thirdweb (client, contracts, transactions), thirdweb/react (provider, ConnectButton, hooks, BuyWidget), thirdweb/wallets, thirdweb/chains, thirdweb/deploys, thirdweb/extensions/* (typed ERC-721, ERC-20, marketplace calls), thirdweb/storage and thirdweb/engine (server wallets). Everything needs a ThirdwebClient: a public client ID in the browser, a secret key only on a server. Create both in a project at thirdweb.com/dashboard and restrict the client ID to your domains there.
The v4 packages (@thirdweb-dev/sdk, @thirdweb-dev/react) and the old contractType/useContract API are legacy; use v5 for anything new.
Instructions
- Install:
npm install thirdweb. Put the client ID inNEXT_PUBLIC_THIRDWEB_CLIENT_ID(or your framework's public prefix) and the secret key inTHIRDWEB_SECRET_KEY, server only. - Create one client module, wrap the app in
ThirdwebProvider(it takes noclientprop), and passclientto every component and function. - Read with
useReadContract(a human-readable ABI string asmethod), write withprepareContractCallplususeSendTransaction. Values arebigint; convert withtoEther,toWei,toTokens. - Prefer the typed extension functions (
mintTo,claimTo,transfer, ...) for standard contracts instead of hand-written ABI strings. - Deploy prebuilt contracts from code with
deployERC721Contract,deployERC20Contract,deployERC1155Contract,deployMarketplaceContract(thirdweb/deploys), or deploy any published contract withdeployPublishedContract({ contractId, contractParams }). The deployer is anAccount, for exampleprivateKeyToAccount. - For backends use
Engine.serverWalletfromthirdweb: it signs through a managed server wallet, queues transactions and retries stuck ones, so no private key lives in your app. - CLI:
npx thirdweb generate <chainId>/<contractAddress>generates typed bindings locally (no key needed);deploy,publishanduploadare forwarded to@thirdweb-dev/cli@latestand exit unless you pass-k $THIRDWEB_SECRET_KEY.npx thirdweb createis deprecated and exits with an error: start from a framework template andnpm install thirdweb.
Examples
Example 1: connect button with email, social and external wallets
Request: "Add login to my Next.js app so people without MetaMask can sign in."
// src/lib/thirdweb.ts
import { createThirdwebClient } from "thirdweb";
export const client = createThirdwebClient({
clientId: process.env.NEXT_PUBLIC_THIRDWEB_CLIENT_ID!,
});
// src/app/providers.tsx
"use client";
import { ThirdwebProvider } from "thirdweb/react";
export function Providers({ children }: { children: React.ReactNode }) {
return <ThirdwebProvider>{children}</ThirdwebProvider>;
}
// src/components/Login.tsx
"use client";
import { ConnectButton } from "thirdweb/react";
import { createWallet, inAppWallet } from "thirdweb/wallets";
import { base } from "thirdweb/chains";
import { client } from "@/lib/thirdweb";
const wallets = [
inAppWallet({ auth: { options: ["email", "google", "apple"] } }),
createWallet("io.metamask"),
createWallet("com.coinbase.wallet"),
];
export function Login() {
return <ConnectButton client={client} wallets={wallets} chain={base} theme="dark" />;
}
Result: a button that opens a modal with email, Google, Apple and two browser wallets; an in-app wallet is created on first sign-in.
Example 2: read supply and mint from a component
Request: "Show how many are minted and let the user mint one."
"use client";
import { useReadContract, useSendTransaction } from "thirdweb/react";
import { getContract, prepareContractCall, toEther } from "thirdweb";
import { base } from "thirdweb/chains";
import { client } from "@/lib/thirdweb";
const nft = getContract({
client,
chain: base,
address: "0x5B2f1c7A9e4D3b8a6C0d1E2F3a4B5c6D7e8F9a0b",
});
export function MintCard() {
const { data: supply } = useReadContract({
contract: nft,
method: "function totalSupply() view returns (uint256)",
});
const { data: price } = useReadContract({
contract: nft,
method: "function mintPrice() view returns (uint256)",
});
const { mutate: send, isPending } = useSendTransaction();
function mint() {
if (price === undefined) return;
send(
prepareContractCall({
contract: nft,
method: "function mint(uint256 quantity)",
params: [1n],
value: price,
}),
);
}
return (
<button onClick={mint} disabled={isPending || price === undefined}>
{isPending ? "Minting..." : `Mint ${supply?.toString() ?? "?"} so far, ${toEther(price ?? 0n)} ETH`}
</button>
);
}
The mintPrice and mint signatures belong to your own contract; replace them with its real ABI or use the extension functions for thirdweb prebui
Установить thirdweb в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл thirdweb?
thirdweb is a web3 development platform: a TypeScript and React SDK for connecting wallets, reading and writing smart contracts, deploying prebuilt ERC-20, ERC-721, ERC-1155 and marketplace contracts, in-app (email and social login) wallets, server wallets for backend transactions, and fiat-to-crypto purchase widgets. Use it when someone asks to add a wallet connect button, mint an NFT from a backend, deploy a token without writing Solidity, or onboard users without MetaMask.
Как установить скилл thirdweb?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл thirdweb запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic