Skip to content

Conversation

@jnsdls
Copy link
Member

@jnsdls jnsdls commented Oct 29, 2025

[SDK] Feature: Update Nexus package to use wallet secret instead of client

Notes for the reviewer

This PR updates the Nexus package to use wallet secret and address directly instead of requiring a ThirdwebClient. Key changes:

  • Changed facilitator() to createFacilitator() with simplified parameters
  • Updated authentication to use Bearer token with wallet secret
  • Changed the default base URL to https://nexus-api.thirdweb.com
  • Removed the requirement for serverWalletAddress and vaultAccessToken
  • Updated documentation examples to reflect the new API

How to test

Test the new createFacilitator() function with wallet secret and address to ensure it properly authenticates with the Nexus API.


PR-Codex overview

This PR primarily refactors the payment facilitator logic in the nexus package, updating function imports, modifying type definitions, and enhancing the payment verification process.

Detailed summary

  • Removed sign.ts and fetchWithPayment.ts files.
  • Updated package.json to remove thirdweb dependency.
  • Changed network type in PaymentArgs from FacilitatorNetwork | Chain to FacilitatorNetwork.
  • Refactored imports in nexus.ts, including renaming facilitator to createFacilitator.
  • Updated usage examples in verify-payment.ts and settle-payment.ts to reflect new createFacilitator structure.
  • Adjusted networkToChainId function to accept only string type.
  • Added new utility functions stringify and toUnits in utils.ts.
  • Updated createFacilitator to use new authentication headers structure.

The following files were skipped due to too many changes: pnpm-lock.yaml

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

@vercel vercel bot temporarily deployed to Preview – docs-v2 October 29, 2025 21:27 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 29, 2025 21:27 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 29, 2025 21:27 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula October 29, 2025 21:27 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www October 29, 2025 21:27 Inactive
@changeset-bot
Copy link

changeset-bot bot commented Oct 29, 2025

⚠️ No Changeset found

Latest commit: 7a26b06

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

@vercel
Copy link

vercel bot commented Oct 29, 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 Oct 29, 2025 10:29pm
nebula Ready Ready Preview Comment Oct 29, 2025 10:29pm
thirdweb_playground Ready Ready Preview Comment Oct 29, 2025 10:29pm
thirdweb-www Ready Ready Preview Comment Oct 29, 2025 10:29pm
wallet-ui Ready Ready Preview Comment Oct 29, 2025 10:29pm

@jnsdls jnsdls marked this pull request as ready for review October 29, 2025 21:27
Copy link
Member Author

jnsdls commented Oct 29, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 29, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 10-29-update_to_use_nexus_keys_instead

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

@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.90%. Comparing base (dfa35f6) to head (7a26b06).

Additional details and impacted files
@@                                      Coverage Diff                                      @@
##           10-29-initial_port_of_thirdweb_x402_into_thirdweb-dev_nexus_    #8337   +/-   ##
=============================================================================================
  Coverage                                                         54.89%   54.90%           
=============================================================================================
  Files                                                               920      920           
  Lines                                                             60715    60715           
  Branches                                                           4129     4136    +7     
=============================================================================================
+ Hits                                                              33331    33336    +5     
+ Misses                                                            27282    27278    -4     
+ Partials                                                            102      101    -1     
Flag Coverage Δ
packages 54.90% <ø> (+<0.01%) ⬆️
see 3 files with indirect coverage changes
🚀 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.

@jnsdls jnsdls force-pushed the 10-29-update_to_use_nexus_keys_instead branch from aaf8561 to ee32d43 Compare October 29, 2025 21:29
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 29, 2025 21:29 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www October 29, 2025 21:29 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 29, 2025 21:29 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 29, 2025 21:29 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula October 29, 2025 21:29 Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Oct 29, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 64.52 KB (-0.06% 🔽) 1.3 s (-0.06% 🔽) 364 ms (+153.42% 🔺) 1.7 s
thirdweb (cjs) 366.9 KB (+0.2% 🔺) 7.4 s (+0.2% 🔺) 1.4 s (+13.1% 🔺) 8.8 s
thirdweb (minimal + tree-shaking) 5.73 KB (0%) 115 ms (0%) 201 ms (+3630.66% 🔺) 316 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 113 ms (+3748.3% 🔺) 124 ms
thirdweb/react (minimal + tree-shaking) 19.09 KB (0%) 382 ms (0%) 139 ms (+2178.09% 🔺) 521 ms

@jnsdls jnsdls force-pushed the 10-29-update_to_use_nexus_keys_instead branch from ee32d43 to a0e160f Compare October 29, 2025 21:39
@vercel vercel bot temporarily deployed to Preview – nebula October 29, 2025 21:39 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 29, 2025 21:39 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 29, 2025 21:39 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 29, 2025 21:39 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www October 29, 2025 21:39 Inactive
@jnsdls jnsdls force-pushed the 10-29-update_to_use_nexus_keys_instead branch from a0e160f to 6b211a8 Compare October 29, 2025 22:09
@vercel vercel bot temporarily deployed to Preview – nebula October 29, 2025 22:09 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 29, 2025 22:09 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 29, 2025 22:09 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 29, 2025 22:09 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www October 29, 2025 22:09 Inactive
@jnsdls jnsdls force-pushed the 10-29-update_to_use_nexus_keys_instead branch from 6b211a8 to 1c10f56 Compare October 29, 2025 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants