x402
x402 copied to clipboard
v2: Clean up paywall
Clean up paywall package and remove Coinbase Onramp integration
Summary
This PR simplifies the paywall package by removing the unified paywall in favor of network-specific paywalls (EVM and SVM), removes the Coinbase Onramp integration, and updates the build process to generate templates for all supported languages.
Changes
Paywall Architecture
- Removed the unified
paywall.tsandbuild.tsin favor of separate EVM and SVM paywall implementations PaywallBuilder.build()now requires explicit network handlers via.withNetwork()and throws an error if none are registered- Removed legacy
getPaywallHtmlexport from the package
Coinbase Onramp Removal
- Removed
cdpClientKeyandsessionTokenEndpointfromPaywallConfigacross TypeScript, Python, and Go - Deleted
useOnrampSessionTokenhook andutils.tscontaininggenerateOnrampSessionToken - Removed "Buy USDC" button from
EvmPaywallcomponent - Removed WalletConnect connector from Providers (keeping injected and Coinbase Wallet only)
Cross-Language Template Generation
- EVM and SVM build scripts now generate templates for Python (
evm_paywall_template.py,svm_paywall_template.py) and Go (evm_paywall_template.go,svm_paywall_template.go) - Python paywall module updated to select the appropriate template based on network prefix (
solana:uses SVM, others use EVM) - Deleted the legacy combined
paywall.htmltemplate from Python
Other Improvements
- Moved Spinner component animation to CSS stylesheet
- Added margin to CTA container for better spacing
- Removed component exports (
EvmPaywall,SolanaPaywall) from network handler modules - Updated tests to remove references to deleted config options
Checklist
- [x] I have formatted and linted my code
- [x] All new and existing tests pass
- [x] My commits are signed (required for merge) -- you may need to rebase if you initially pushed unsigned commits
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| x402 | Preview | Comment | Dec 3, 2025 6:40pm |