Skip to content

Conversation

@joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Nov 26, 2025

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

thirdweb@5.114.0

Minor Changes

  • #8457 35aaf24 Thanks @joaquim-verges! - Add "upto" payment scheme option for x402 verify and settle

    const paymentArgs = {
      resourceUrl: "https://api.example.com/premium-content",
      method: "GET",
      paymentData,
      payTo: "0x1234567890123456789012345678901234567890",
      network: arbitrum,
      scheme: "upto", // enables dynamic pricing
      price: "$0.10", // max payable amount
      facilitator: thirdwebFacilitator,
    };
    
    // First verify the payment is valid for the max amount
    const verifyResult = await verifyPayment(paymentArgs);
    
    if (verifyResult.status !== 200) {
      return Response.json(verifyResult.responseBody, {
        status: verifyResult.status,
        headers: verifyResult.responseHeaders,
      });
    }
    
    // Do the expensive work that requires payment
    const { tokensUsed } = await doExpensiveWork();
    const pricePerTokenUsed = 0.00001;
    
    // Now settle the payment based on actual usage
    const settleResult = await settlePayment({
      ...paymentArgs,
      price: tokensUsed * pricePerTokenUsed, // adjust final price based on usage
    });

@thirdweb-dev/nebula@0.2.95

Patch Changes

  • Updated dependencies [35aaf24]:
    • thirdweb@5.114.0

@thirdweb-dev/wagmi-adapter@0.2.192

wagmi-inapp@0.0.37

Patch Changes

  • Updated dependencies [35aaf24]:
    • thirdweb@5.114.0
    • @thirdweb-dev/wagmi-adapter@0.2.192

PR-Codex overview

This PR focuses on updating version numbers across multiple packages and adding new changelog entries, including a minor feature for a payment scheme in the thirdweb package.

Detailed summary

  • Deleted the file .changeset/chilly-taxis-search.md.
  • Updated version in packages/thirdweb/package.json from 5.113.0 to 5.114.0.
  • Updated version in apps/wagmi-demo/package.json from 0.0.36 to 0.0.37.
  • Updated version in packages/nebula/package.json from 0.2.94 to 0.2.95.
  • Updated version in packages/wagmi-adapter/package.json from 0.2.191 to 0.2.192.
  • Added changelog entries for packages/nebula (0.2.95), apps/wagmi-demo (0.0.37), and packages/thirdweb (5.114.0).
  • Introduced a new payment scheme option in thirdweb with example code for dynamic pricing.

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

Summary by CodeRabbit

  • New Features

    • Introduced "upto" payment scheme for dynamic pricing in payment verification and settlement workflows.
  • Chores

    • Released updated versions: thirdweb 5.114.0, wagmi-adapter 0.2.192, nebula 0.2.95, and wagmi-demo 0.0.37 with corresponding dependency updates.

✏️ Tip: You can customize this high-level summary in your review settings.

@joaquim-verges joaquim-verges requested review from a team as code owners November 26, 2025 00:51
@vercel
Copy link

vercel bot commented Nov 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs-v2 Ready Ready Preview Comment Nov 26, 2025 1:03am
nebula Ready Ready Preview Comment Nov 26, 2025 1:03am
thirdweb_playground Ready Ready Preview Comment Nov 26, 2025 1:03am
thirdweb-www Ready Ready Preview Comment Nov 26, 2025 1:03am
wallet-ui Ready Ready Preview Comment Nov 26, 2025 1:03am

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 26, 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.

@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Nov 26, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 26, 2025

Walkthrough

Package version increments and corresponding changelog updates across multiple packages (wagmi-demo 0.0.37, nebula 0.2.95, thirdweb 5.114.0, wagmi-adapter 0.2.192). The thirdweb changelog documents a new "upto" payment scheme for x402 verify/settle flow. A related changeset documentation file is deleted as part of the release process.

Changes

Cohort / File(s) Change Summary
Deleted changeset documentation
.changeset/chilly-taxis-search.md
Removed changeset describing the addition of "upto" payment scheme option for x402 verify and settle flow with TypeScript usage example
wagmi-demo release 0.0.37
apps/wagmi-demo/package.json, apps/wagmi-demo/CHANGELOG.md
Version bumped from 0.0.36 to 0.0.37; changelog entry added documenting dependency updates (thirdweb@5.114.0, @thirdweb-dev/wagmi-adapter@0.2.192)
nebula release 0.2.95
packages/nebula/package.json, packages/nebula/CHANGELOG.md
Version bumped from 0.2.94 to 0.2.95; changelog entry added documenting thirdweb@5.114.0 dependency update
thirdweb release 5.114.0
packages/thirdweb/package.json, packages/thirdweb/CHANGELOG.md
Version bumped from 5.113.0 to 5.114.0; changelog documents minor change introducing "upto" payment scheme path for x402 verify and settle with usage example
wagmi-adapter release 0.2.192
packages/wagmi-adapter/package.json, packages/wagmi-adapter/CHANGELOG.md
Version bumped from 0.2.191 to 0.2.192; changelog entry added for new version

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • All changes are version number increments and changelog documentation updates
  • No functional code logic alterations or structural changes
  • Straightforward version bump pattern repeated across multiple files

Suggested labels

packages, SDK

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Version Packages' is vague and generic; it does not convey the specific changes being released or the packages being versioned. Consider a more descriptive title such as 'Release: thirdweb@5.114.0, nebula@0.2.95, wagmi-adapter@0.2.192, wagmi-inapp@0.0.37' or 'Release packages with upto payment scheme feature' to clearly indicate what is being released.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description is comprehensive and follows the Changesets release format, detailing all package releases, versions, changelog entries, and the new upto payment scheme feature with code examples.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch changeset-release/main

Comment @coderabbitai help to get the list of available commands and usage tips.

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: 0

🧹 Nitpick comments (5)
packages/thirdweb/CHANGELOG.md (5)

10-19: Clarify price type/units for the max verification amount.

You set price: "$0.10" in verify, but later pass a number to settlePayment. If both are supported, call it out; otherwise, keep the type consistent and specify currency/units (e.g., USD cents or token base units) to avoid confusion. Consider renaming the comment to “max amount” to reinforce the cap semantics.


33-39: Avoid floating‑point money math in the example.

Using 0.00001 risks precision drift. Prefer integer minor units (e.g., cents, wei) or a decimal library. Example:

-  const { tokensUsed } = await doExpensiveWork();
-  const pricePerTokenUsed = 0.00001;
+  const { tokensUsed } = await doExpensiveWork();
+  // work in minor units to avoid float errors
+  const pricePerTokenUsedMicros = 10n; // 0.000010 in "micro‑units"
+  const finalPriceMicros = BigInt(tokensUsed) * pricePerTokenUsedMicros;

Then convert to the expected price format before calling settlePayment.


24-29: Broaden the success check.

status === 200 is brittle; prefer accepting any 2xx or an ok boolean if available:

-  if (verifyResult.status !== 200) {
+  if (!(verifyResult.status >= 200 && verifyResult.status < 300)) {

This keeps the snippet correct if the API returns 201/204, etc.


9-19: Add minimal imports to make the snippet self‑contained.

Readers will copy/paste this. Suggest adding (or a comment noting) needed imports:

import { arbitrum } from "thirdweb/chains";
import { verifyPayment, settlePayment } from "thirdweb/payments"; // adjust path if different

If using Fetch API Response, note the runtime (e.g., Next.js/edge).


35-39: State the cap invariant explicitly.

Add a one‑liner that settlePayment must not exceed the previously verified max when using scheme: "upto", and that the backend should enforce/validate this. Helps prevent misuse.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 35aaf24 and 6783b77.

📒 Files selected for processing (9)
  • .changeset/chilly-taxis-search.md (0 hunks)
  • apps/wagmi-demo/CHANGELOG.md (1 hunks)
  • apps/wagmi-demo/package.json (1 hunks)
  • packages/nebula/CHANGELOG.md (1 hunks)
  • packages/nebula/package.json (1 hunks)
  • packages/thirdweb/CHANGELOG.md (1 hunks)
  • packages/thirdweb/package.json (1 hunks)
  • packages/wagmi-adapter/CHANGELOG.md (1 hunks)
  • packages/wagmi-adapter/package.json (1 hunks)
💤 Files with no reviewable changes (1)
  • .changeset/chilly-taxis-search.md
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{js,jsx,ts,tsx,json}

📄 CodeRabbit inference engine (AGENTS.md)

Biome governs formatting and linting; its rules live in biome.json. Run pnpm fix & pnpm lint before committing, ensure there are no linting errors

Files:

  • packages/nebula/package.json
  • apps/wagmi-demo/package.json
  • packages/thirdweb/package.json
  • packages/wagmi-adapter/package.json
packages/thirdweb/package.json

📄 CodeRabbit inference engine (CLAUDE.md)

Track bundle budgets via package.json#size-limit

Files:

  • packages/thirdweb/package.json
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-24T22:45:01.202Z
Learning: Applies to packages/**/.changeset/*.md : Each change in packages/* should contain a changeset for the appropriate package with the appropriate version bump: patch for changes that don't impact the public API, minor for any new/modified public API
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:43:43.644Z
Learning: Run `pnpm changeset` after making changes in `packages/*` for semantic versioning
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-24T22:45:01.202Z
Learning: Surface breaking changes prominently in PR descriptions
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:43:43.644Z
Learning: Surface breaking changes prominently in PR descriptions
📚 Learning: 2025-11-24T22:45:01.202Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-24T22:45:01.202Z
Learning: Applies to packages/**/.changeset/*.md : Each change in packages/* should contain a changeset for the appropriate package with the appropriate version bump: patch for changes that don't impact the public API, minor for any new/modified public API

Applied to files:

  • packages/nebula/CHANGELOG.md
  • apps/wagmi-demo/CHANGELOG.md
  • packages/wagmi-adapter/CHANGELOG.md
  • packages/thirdweb/CHANGELOG.md
📚 Learning: 2025-11-24T22:43:43.644Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:43:43.644Z
Learning: Use `patch` version bump for changes that don't impact the public API

Applied to files:

  • packages/nebula/CHANGELOG.md
  • apps/wagmi-demo/CHANGELOG.md
  • packages/thirdweb/package.json
📚 Learning: 2025-11-24T22:45:01.202Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-24T22:45:01.202Z
Learning: Applies to packages/thirdweb/src/exports/**/*.{ts,tsx} : Export everything in packages/thirdweb via the exports/ directory, grouped by feature. Every public symbol must have comprehensive TSDoc including at least one example block that compiles and one custom annotation (beta, internal, experimental, etc.)

Applied to files:

  • packages/nebula/package.json
  • packages/thirdweb/package.json
  • packages/wagmi-adapter/package.json
📚 Learning: 2025-11-24T22:43:43.644Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:43:43.644Z
Learning: Applies to packages/thirdweb/src/exports/**/*.{ts,tsx} : Export everything via `exports/` directory, grouped by feature in SDK development

Applied to files:

  • packages/nebula/package.json
  • packages/thirdweb/package.json
  • packages/wagmi-adapter/package.json
📚 Learning: 2025-11-24T22:43:43.644Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:43:43.644Z
Learning: Run `pnpm changeset` after making changes in `packages/*` for semantic versioning

Applied to files:

  • apps/wagmi-demo/package.json
⏰ 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). (8)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Unit Tests
  • GitHub Check: Lint Packages
  • GitHub Check: Build Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (7)
packages/nebula/package.json (1)

60-60: Version bump correct for patch release.

The patch version increment (0.2.94 → 0.2.95) properly reflects a dependency-only update with no API changes, aligning with the updated thirdweb dependency documented in the changelog.

packages/thirdweb/package.json (1)

433-433: Minor version bump appropriate for new payment scheme feature.

The version increment (5.113.0 → 5.114.0) correctly reflects the new "upto" payment scheme option added for x402 verify/settle flows, which represents a public API addition warranting a minor version bump.

packages/wagmi-adapter/package.json (1)

59-59: Patch version bump correct for dependency-only release.

The version increment (0.2.191 → 0.2.192) properly reflects a dependency update with no direct API changes to the adapter itself.

packages/wagmi-adapter/CHANGELOG.md (1)

3-4: Changelog entry properly formatted as empty release.

The version header is correctly placed with no documented changes, consistent with the PR objectives indicating no changelog entries for this patch release. This pattern aligns with standard Changesets automation for dependency-only updates.

packages/nebula/CHANGELOG.md (1)

3-9: Changelog entry properly formatted with dependency update documented.

The patch release entry correctly documents the thirdweb@5.114.0 dependency update with commit reference, following the established changelog format throughout the file.

apps/wagmi-demo/CHANGELOG.md (1)

3-9: Changelog entry properly documents all dependency updates.

The patch release correctly lists both updated dependencies (thirdweb@5.114.0 and @thirdweb-dev/wagmi-adapter@0.2.192) with commit reference, following the established format in the changelog.

apps/wagmi-demo/package.json (1)

4-4: Patch version bump appropriate for dependency updates.

The version increment (0.0.36 → 0.0.37) correctly reflects dependency updates to both thirdweb and wagmi-adapter without direct API changes to the demo app itself.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2025

size-limit report 📦

Path Size
@thirdweb-dev/nexus (esm) 104.88 KB (0%)
@thirdweb-dev/nexus (cjs) 316.6 KB (0%)

@joaquim-verges joaquim-verges merged commit 3ac8cba into main Nov 26, 2025
20 of 21 checks passed
@joaquim-verges joaquim-verges deleted the changeset-release/main branch November 26, 2025 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants