thirdweb

担任 thirdweb 专家,thirdweb 是完整的 Web3 开发平台,提供 SDK、预构建智能合约、钱包基础设施和支付解决方案。帮助开发者使用 thirdweb 的 React 钩子、部署合约(ERC-20、ERC-721、ERC-1155、市场)、嵌入式钱包、法币到加密的入口及多链支持,从原型到生产构建 dApp,无需深度区块链专业知识。

仓库最近推送
GitHub Stars
219
Forks
38
Issues / PRs
1

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "thirdweb":https://skillpi.com/zh/skills/deepskill-d7dac07eb8721dbc545cff3a60097a4f23ee8c96a700e766a47902e8c61cff73。安装前核对上游来源和版本:https://github.com/TerminalSkills/skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

担任 thirdweb 专家,thirdweb 是完整的 Web3 开发平台,提供 SDK、预构建智能合约、钱包基础设施和支付解决方案。帮助开发者使用 thirdweb 的 React 钩子、部署合约(ERC-20、ERC-721、ERC-1155、市场)、嵌入式钱包、法币到加密的入口及多链支持,从原型到生产构建 dApp,无需深度区块链专业知识。

0 下载

介绍来源: third_party · TerminalSkills · 1.0.0 参考来源

SkillPi 解读

实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: thirdweb
description: >-
  You are an expert in thirdweb, the complete web3 development platform that
  provides SDKs, pre-built smart contracts, wallet infrastructure, and payment
  solutions. You help developers build dApps using thirdweb's React hooks,
  contract deployment (ERC-20, ERC-721, ERC-1155, marketplace), embedded
  wallets, fiat-to-crypto onramps, and multi-chain support — from prototype to
  production without deep blockchain expertise.
license: Apache-2.0
compatibility: ''
metadata:
  author: terminal-skills
  version: 1.0.0
  category: Blockchain & Web3
  tags:
    - web3
    - sdk
    - smart-contracts
    - nft
    - wallet
    - multi-chain
    - typescript

thirdweb — Full-Stack Web3 Development Platform

You are an expert in thirdweb, the complete web3 development platform that provides SDKs, pre-built smart contracts, wallet infrastructure, and payment solutions. You help developers build dApps using thirdweb's React hooks, contract deployment (ERC-20, ERC-721, ERC-1155, marketplace), embedded wallets, fiat-to-crypto onramps, and multi-chain support — from prototype to production without deep blockchain expertise.

Core Capabilities

React SDK

// src/app/providers.tsx — thirdweb setup
import { ThirdwebProvider } from "thirdweb/react";
import { createThirdwebClient } from "thirdweb";

const client = createThirdwebClient({
  clientId: process.env.NEXT_PUBLIC_THIRDWEB_CLIENT_ID!,
});

export function Providers({ children }: { children: React.ReactNode }) {
  return <ThirdwebProvider>{children}</ThirdwebProvider>;
}
// src/components/ConnectWallet.tsx
import { ConnectButton } from "thirdweb/react";
import { createWallet, inAppWallet } from "thirdweb/wallets";

const wallets = [
  inAppWallet({                           // Email/social login (no extension)
    auth: { options: ["email", "google", "apple"] },
  }),
  createWallet("io.metamask"),
  createWallet("com.coinbase.wallet"),
  createWallet("io.rabby"),
];

export function ConnectWallet() {
  return (
    <ConnectButton
      client={client}
      wallets={wallets}
      theme="dark"
      connectModal={{ size: "compact" }}
    />
  );
}

Smart Contract Interaction

// src/components/NFTMint.tsx
import { useReadContract, useSendTransaction } from "thirdweb/react";
import { getContract, prepareContractCall } from "thirdweb";
import { ethereum } from "thirdweb/chains";

const nftContract = getContract({
  client,
  chain: ethereum,
  address: "0x...",
});

export function NFTMint() {
  // Read contract data
  const { data: totalSupply } = useReadContract({
    contract: nftContract,
    method: "function totalSupply() view returns (uint256)",
  });

  const { data: price } = useReadContract({
    contract: nftContract,
    method: "function mintPrice() view returns (uint256)",
  });

  // Write transaction
  const { mutate: sendTx, isPending } = useSendTransaction();

  function handleMint() {
    const tx = prepareContractCall({
      contract: nftContract,
      method: "function mint(uint256 quantity)",
      params: [1n],
      value: price,
    });
    sendTx(tx);
  }

  return (
    <div>
      <p>Minted: {totalSupply?.toString()} / 10,000</p>
      <button onClick={handleMint} disabled={isPending}>
        {isPending ? "Minting..." : `Mint (${formatEther(price || 0n)} ETH)`}
      </button>
    </div>
  );
}

Deploy Contracts (No Solidity Required)

// scripts/deploy.ts — Deploy pre-built contracts
import { deployPublishedContract } from "thirdweb/deploys";

// Deploy ERC-721 NFT collection
const nftAddress = await deployPublishedContract({
  client,
  chain: ethereum,
  account: wallet,
  contractId: "NFTCollection",
  contractParams: {
    name: "My Collection",
    symbol: "MC",
    royaltyBps: 500n,                     // 5% royalties
    royaltyRecipient: wallet.address,
  },
});

// Deploy ERC-20 token
const tokenAddress = await deployPublishedContract({
  client,
  chain: ethereum,
  account: wallet,
  contractId: "TokenERC20",
  contractParams: {
    name: "My Token",
    symbol: "MTK",
    initialSupply: parseEther("1000000"),
  },
});

// Deploy marketplace
const marketplaceAddress = await deployPublishedContract({
  client,
  chain: ethereum,
  account: wallet,
  contractId: "Marketplace",
  contractParams: { platformFeeBps: 250n },  // 2.5% fee
});

Engine (Backend API)

// thirdweb Engine — managed backend for web3
// Self-hosted or cloud: handles wallets, transactions, webhooks

// Mint NFT via REST API (no frontend wallet needed)
const response = await fetch(`${ENGINE_URL}/contract/${chain}/${address}/erc721/mint-to`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${ENGINE_ACCESS_TOKEN}`,
    "Content-Type": "application/json",
    "x-backend-wallet-address": BACKEND_WALLET,
  },
  body: JSON.stringify({
    receiver: userAddress,
    metadata: { name: "NFT #1", image: "ipfs://...", attributes: [] },
  }),
});

Installation

npx thirdweb create app                   # Scaffold new app
npm install thirdweb                      # Add to existing project
npx thirdweb deploy                       # Deploy custom contracts
npx thirdweb publish                      # Publish to thirdweb registry

Best Practices

  1. In-app wallets for onboarding — Use email/social login wallets; users don't need MetaMask to start
  2. Pre-built contracts — Deploy ERC-20, ERC-721, ERC-1155, marketplace without writing Solidity
  3. React hooks — useReadContract for reads, useSendTransaction for writes; type-safe from ABI
  4. Engine for backends — Use thirdweb Engine for server-side minting, gasless transactions, and webhooks
  5. Multi-chain — Same code works across Ethereum, Polygon, Base, Arbitrum, Solana — just change the chain
  6. Pay for onramps — Integrate fiat-to-crypto payments; users buy with credit card, receive tokens
  7. IPFS storage — Use thirdweb Storage for decentralized file hosting (NFT metadata, images)
  8. Account abstraction — Enable gasless transactions with ERC-4337; sponsor gas for better UX

当前收录版本

1.0.0

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值95/100

亮点

  • 提供完整的 Web3 开发平台能力,涵盖 React SDK、智能合约部署、钱包基础设施、多链支持等
  • 面向开发者构建 dApp,具有明确的高频刚需价值,显著提升 Web3 开发效率
触发精准95/100

亮点

  • description 清晰描述了 thirdweb 平台的核心能力与适用场景
  • 触发词完整覆盖 Web3、SDK、智能合约、NFT、钱包、多链等关键词,边界清晰
结构规范95/100

亮点

  • 文档结构清晰,包含 Core Capabilities、Installation、Best Practices 等章节
  • 有端到端代码示例,frontmatter 完整,单文件未超过 500 行
执行可靠95/100

亮点

  • 工具来源明确(thirdweb 官方 SDK 和 CLI),参数正确
  • 覆盖了主要使用场景,无不可逆操作,整体执行流程可靠
证据可验 (前四项均值)95/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。