Prerequisites
- Node.js, Bun, or pnpm installed
- SKALE chain with Programmable Privacy access (SKALE Base Sepolia)
- eUSDC tokens for testing
- Understanding of confidential tokens vs standard tokens
Overview
Confidential token features:- Native privacy – Amounts hidden by default at the token level
- Optional encryption – Add threshold encryption for extra security
- Gasless support – EIP-3009 for gas-free UX
- Chains with Programmable Privacy only – Requires a privacy-enabled chain
Environment Setup
Create a.env file:
Confidential Token Payment
Basic confidential payment with eUSDC:Gasless Confidential Payments
Combine gasless UX with full privacy:Maximum Privacy (All Features)
Enable all privacy layers:Server Integration
Backend processing for confidential payments:Payment Verification
Verifying confidential transactions:Testing on SKALE Base Sepolia
SKALE Base Sepolia supports confidential tokens for testing:Comparing Payment Types
| Feature | Standard | Gasless | Encrypted | Confidential |
|---|---|---|---|---|
| Chain | SKALE Base | SKALE Base | SKALE Base | SKALE Base Sepolia |
| Token | USDC.e | USDC.e | USDC.e | eUSDC |
| Gas token | CREDIT required | Not needed | CREDIT required | Not needed (gasless) |
| Amount visible | ✓ | ✓ | Hidden | Hidden |
| Native privacy | - | - | - | ✓ |
Error Handling
Best Practices
When to use confidential tokens:
- Maximum privacy requirements
- Sensitive transaction amounts
- Chains with Programmable Privacy available
- Users comfortable with eUSDC
