Skip to content

[Docs] Update README with comprehensive SDK package information #7738

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Jul 28, 2025


PR-Codex overview

This PR updates the README.md to enhance the documentation of the thirdweb SDK, introducing a structured overview of the core package, features, installation instructions, and adapters, while removing outdated content.

Detailed summary

  • Added a Core Package section detailing the thirdweb SDK.
  • Listed key features of the SDK.
  • Provided installation instructions for various environments (React, React Native, Backend).
  • Introduced Adapters section for additional SDK integrations.
  • Added Type safe API wrappers section for TypeScript SDKs.
  • Updated the Library Comparison table.
  • Modified the Additional Resources section for clarity.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • Documentation
    • Completely revamped the README for improved clarity and detail.
    • Added comprehensive sections for the core SDK package, adapters, and type-safe API wrappers, including installation and usage examples.
    • Updated additional resources and documentation links.
    • Removed the library comparison table.

Copy link

vercel bot commented Jul 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 28, 2025 6:57pm
nebula ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 28, 2025 6:57pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 28, 2025 6:57pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 28, 2025 6:57pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 28, 2025 6:57pm

Copy link

changeset-bot bot commented Jul 28, 2025

⚠️ No Changeset found

Latest commit: dcaf499

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented Jul 28, 2025

Walkthrough

The README.md file was thoroughly restructured and expanded. The update replaces the previous brief features list with comprehensive sections detailing the core SDK package, adapters, and type-safe API wrappers, including installation instructions, usage examples, and ecosystem package listings. The library comparison table was removed, and resource links were updated.

Changes

Cohort / File(s) Change Summary
README Overhaul
README.md
Major restructuring and expansion: added detailed package sections, installation and usage guides, removed the library comparison table, and updated resource links. No code or API changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~6 minutes

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • TEAM-0000: Entity not found: Issue - Could not find referenced Issue.
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch _Docs_Update_README_with_comprehensive_SDK_package_information

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@joaquim-verges joaquim-verges marked this pull request as ready for review July 28, 2025 18:47
Copy link
Member Author

joaquim-verges commented Jul 28, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

codecov bot commented Jul 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.22%. Comparing base (cf401be) to head (dcaf499).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7738   +/-   ##
=======================================
  Coverage   56.22%   56.22%           
=======================================
  Files         905      905           
  Lines       58880    58880           
  Branches     4134     4134           
=======================================
  Hits        33106    33106           
  Misses      25669    25669           
  Partials      105      105           
Flag Coverage Δ
packages 56.22% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
README.md (1)

68-70: Add a quick code snippet for the React Native polyfill step

The sentence tells users to “import it at app startup for polyfills” but does not show how. A one-liner prevents guesswork:

 For React Native Applications, you'll also need to install the `@thirdweb-dev/react-native-adapter` package and import it at app startup for polyfills.
+
+```typescript
+// App.tsx ─ must run before any thirdweb imports
+import "@thirdweb-dev/react-native-adapter";
+```
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cf401be and dcaf499.

📒 Files selected for processing (1)
  • README.md (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Keep documentation focused on developer experience and practical usage
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Surface breaking changes prominently in PR descriptions
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/exports/** : Export everything via `exports/` directory, grouped by feature in the SDK public API
README.md (19)

Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/exports/** : Export everything via exports/ directory, grouped by feature in the SDK public API

Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Surface breaking changes prominently in PR descriptions

Learnt from: MananTank
PR: #7356
File: apps/nebula/src/app/not-found.tsx:1-1
Timestamp: 2025-06-17T18:30:52.976Z
Learning: In the thirdweb/js project, the React namespace is available for type annotations (like React.FC) without needing to explicitly import React. This is project-specific configuration that differs from typical TypeScript/React setups.

Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/exports/** : Every public symbol must have comprehensive TSDoc with at least one @example block that compiles and custom annotation tags (@beta, @internal, @experimental)

Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Keep documentation focused on developer experience and practical usage

Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Anything that consumes hooks from @tanstack/react-query or thirdweb SDKs.

Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules

Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : Unified Wallet and Account interfaces in wallet architecture

Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : Support for in-app wallets (social/email login)

Learnt from: MananTank
PR: #7332
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/nft-drop-claim.tsx:82-90
Timestamp: 2025-06-13T13:03:41.732Z
Learning: The thirdweb contract object is serializable and can safely be used in contexts (e.g., React-Query keys) that require serializable values.

Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/wagmi-adapter/** : Wagmi ecosystem integration is in packages/wagmi-adapter/

Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/react-native-adapter/** : Mobile platform shims are in packages/react-native-adapter/

Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : Smart wallets with account abstraction

Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : When you need access to browser APIs (localStorage, window, IntersectionObserver etc.).

Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Client Components (browser): Begin files with 'use client';

Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Return typed results (e.g., Project[], User[]) – avoid any

Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{ts,tsx} : Heavy data fetching that should not ship to the client (e.g. analytics, billing).

Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to **/*.{ts,tsx} : Write idiomatic TypeScript with explicit function declarations and return types

Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard//api//*.{ts,tsx} : Return typed results (Project[], User[], …) – avoid any.

🪛 LanguageTool
README.md

[style] ~70-~70: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... it at app startup for polyfills. #### For Backend Applications ```bash npm insta...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~140-~140: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...nsight`](./packages/insight/README.md) TypeScript SDK for Insight, thirdweb's multichain ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🪛 markdownlint-cli2 (0.17.2)
README.md

20-20: Heading levels should only increment by one level at a time
Expected: h3; Actual: h4

(MD001, heading-increment)


105-105: Heading levels should only increment by one level at a time
Expected: h3; Actual: h4

(MD001, heading-increment)


123-123: Heading levels should only increment by one level at a time
Expected: h3; Actual: h4

(MD001, heading-increment)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Lint Packages
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Build Packages
  • GitHub Check: Analyze (javascript)

Comment on lines +18 to +24
## Core Package

#### [`thirdweb`](./packages/thirdweb/README.md)

The main SDK package providing all-in-one web3 functionality for Browser, Node, and Mobile applications.

```bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Fix heading-level jumps to satisfy Markdown linting and improve document hierarchy

markdownlint (MD001) flags these sections because they jump directly from an h2 (##) to an h4 (####) without an intermediate h3.
Use ### for the package names (or demote the parent headings) so levels increment by one.

-## Core Package
-#### [`thirdweb`](./packages/thirdweb/README.md)
+## Core Package
+### [`thirdweb`](./packages/thirdweb/README.md)

-## Adapters
-#### [`@thirdweb-dev/react-native-adapter`](./packages/react-native-adapter/README.md)
+## Adapters
+### [`@thirdweb-dev/react-native-adapter`](./packages/react-native-adapter/README.md)

-## Type safe API wrappers
-#### [`@thirdweb-dev/api`](./packages/api/README.md)
+## Type safe API wrappers
+### [`@thirdweb-dev/api`](./packages/api/README.md)

Apply the same change to every sub-heading under these sections.
This will silence the linter and make the outline easier to scan.

Also applies to: 103-119, 121-161

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

20-20: Heading levels should only increment by one level at a time
Expected: h3; Actual: h4

(MD001, heading-increment)

🤖 Prompt for AI Agents
In README.md around lines 18 to 24, the heading levels jump from h2 (##)
directly to h4 (####), which violates markdownlint rule MD001. Change the h4
headings for package names to h3 (###) to ensure proper incremental heading
levels. Apply the same adjustment to all sub-headings under these sections,
including lines 103-119 and 121-161, to fix the linter warnings and improve
document structure.

Comment on lines +76 to +101
```typescript
import { createThirdwebClient, Engine } from "thirdweb";

const client = createThirdwebClient({
secretKey: "YOUR_SECRET_KEY",
});

const wallet = Engine.serverWallet({
client,
address: "0x...",
});

const transaction = transfer({
contract: getContract({
client,
address: "0x...", // token contract
chain: defineChain(1),
}),
to: "0x...", // recipient
amount: "0.01", // amount in tokens
});

await wallet.enqueueTransaction({
transaction,
});
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Backend quick-start snippet omits required imports and may confuse readers

transfer, getContract, and defineChain are used but never imported, so the example will not compile if copy-pasted.

-import { createThirdwebClient, Engine } from "thirdweb";
+import {
+  createThirdwebClient,
+  Engine,
+  transfer,
+  getContract,
+  defineChain,
+} from "thirdweb";

Consider adding a short note that these helpers come from the same package to prevent friction for newcomers.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
```typescript
import { createThirdwebClient, Engine } from "thirdweb";
const client = createThirdwebClient({
secretKey: "YOUR_SECRET_KEY",
});
const wallet = Engine.serverWallet({
client,
address: "0x...",
});
const transaction = transfer({
contract: getContract({
client,
address: "0x...", // token contract
chain: defineChain(1),
}),
to: "0x...", // recipient
amount: "0.01", // amount in tokens
});
await wallet.enqueueTransaction({
transaction,
});
```
import {
createThirdwebClient,
Engine,
transfer,
getContract,
defineChain,
} from "thirdweb";
const client = createThirdwebClient({
secretKey: "YOUR_SECRET_KEY",
});
const wallet = Engine.serverWallet({
client,
address: "0x...",
});
const transaction = transfer({
contract: getContract({
client,
address: "0x...", // token contract
chain: defineChain(1),
}),
to: "0x...", // recipient
amount: "0.01", // amount in tokens
});
await wallet.enqueueTransaction({
transaction,
});
🤖 Prompt for AI Agents
In README.md between lines 76 and 101, the example code uses transfer,
getContract, and defineChain without importing them, which will cause
compilation errors. Add import statements for these functions from the
"thirdweb" package at the top of the snippet. Also, include a brief note
clarifying that these helpers come from the same package to help new users
understand where they originate.

Copy link
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 63.16 KB (0%) 1.3 s (0%) 264 ms (+64.88% 🔺) 1.6 s
thirdweb (cjs) 352.91 KB (0%) 7.1 s (0%) 1.3 s (+1.27% 🔺) 8.3 s
thirdweb (minimal + tree-shaking) 5.7 KB (0%) 114 ms (0%) 54 ms (+497.47% 🔺) 168 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 20 ms (+256.09% 🔺) 31 ms
thirdweb/react (minimal + tree-shaking) 19.24 KB (0%) 385 ms (0%) 113 ms (+428.79% 🔺) 498 ms

@joaquim-verges joaquim-verges merged commit 243749b into main Jul 29, 2025
27 checks passed
@joaquim-verges joaquim-verges deleted the _Docs_Update_README_with_comprehensive_SDK_package_information branch July 29, 2025 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant