x402 icon indicating copy to clipboard operation
x402 copied to clipboard

v2: Clean up paywall

Open apmcdermott opened this issue 1 month ago • 1 comments

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.ts and build.ts in 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 getPaywallHtml export from the package

Coinbase Onramp Removal

  • Removed cdpClientKey and sessionTokenEndpoint from PaywallConfig across TypeScript, Python, and Go
  • Deleted useOnrampSessionToken hook and utils.ts containing generateOnrampSessionToken
  • Removed "Buy USDC" button from EvmPaywall component
  • 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.html template 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

apmcdermott avatar Dec 02 '25 23:12 apmcdermott

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

Project Deployment Preview Comments Updated (UTC)
x402 Ready Ready Preview Comment Dec 3, 2025 6:40pm

vercel[bot] avatar Dec 02 '25 23:12 vercel[bot]