Skip to content

[SDK] Add service key functionality for API requests #6819

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

Merged

Conversation

joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Apr 23, 2025


PR-Codex overview

This PR introduces a new functionality to manage a serviceKey in the thirdweb package, allowing it to be set and retrieved. This key is then utilized in the getClientFetch function to set a custom header for API requests.

Detailed summary

  • Added setServiceKey and getServiceKey functions in packages/thirdweb/src/utils/domains.ts to manage serviceKey.
  • Updated packages/thirdweb/src/exports/utils.ts to export setServiceKey.
  • Modified packages/thirdweb/src/utils/fetch.ts to include serviceKey in headers if set.

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

Copy link

vercel bot commented Apr 23, 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 Apr 23, 2025 3:46am
login ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2025 3:46am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2025 3:46am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2025 3:46am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2025 3:46am

Copy link

changeset-bot bot commented Apr 23, 2025

🦋 Changeset detected

Latest commit: cf4f834

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
thirdweb Patch
@thirdweb-dev/wagmi-adapter Patch

Not sure what this means? Click here to learn what changesets are.

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

@joaquim-verges joaquim-verges marked this pull request as ready for review April 23, 2025 03:07
@joaquim-verges joaquim-verges requested review from a team as code owners April 23, 2025 03:07
@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Apr 23, 2025
Copy link
Member Author


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
Contributor

github-actions bot commented Apr 23, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 50.8 KB (+0.14% 🔺) 1.1 s (+0.14% 🔺) 243 ms (+93.69% 🔺) 1.3 s
thirdweb (cjs) 138.95 KB (+0.12% 🔺) 2.8 s (+0.12% 🔺) 372 ms (+40.8% 🔺) 3.2 s
thirdweb (minimal + tree-shaking) 5.63 KB (+0.46% 🔺) 113 ms (+0.46% 🔺) 89 ms (+670.41% 🔺) 202 ms
thirdweb/chains (tree-shaking) 514 B (0%) 11 ms (0%) 33 ms (+1069.9% 🔺) 43 ms
thirdweb/react (minimal + tree-shaking) 19.45 KB (+0.22% 🔺) 389 ms (+0.22% 🔺) 77 ms (+222.84% 🔺) 466 ms

@joaquim-verges joaquim-verges merged commit 8b4b873 into main Apr 23, 2025
11 checks passed
@joaquim-verges joaquim-verges deleted the _SDK_Add_service_key_functionality_for_API_requests branch April 23, 2025 04:03
@joaquim-verges joaquim-verges mentioned this pull request Apr 23, 2025
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