Prerequisites
- Node.js, Bun, or pnpm installed
- A SKALE Chain endpoint (SKALE Base or SKALE Base Sepolia)
- Understanding of MPP protocol
- USDC.e or eUSDC tokens for testing
Overview
The MPP SDK provides multiple payment strategies:- Standard transfers – Simple token transfers on SKALE Base
- Gasless payments – Users pay without holding gas tokens (EIP-3009/EIP-2612)
- Encrypted amounts – Hide transaction amounts using threshold encryption
- Confidential tokens – Native privacy with eUSDC on chains with Programmable Privacy
Environment Setup
Create a.env file:
Basic Payment Example
Step 1: Install Dependencies
Step 2: Create Payment Method
Step 3: Process Payment
Encrypted Payments
Hide transaction amounts onchain using threshold encryption:Gasless + Encrypted Payments
Combine both features for maximum UX and privacy:Confidential Token Payments
Use native confidential tokens (eUSDC) on SKALE Base Sepolia for full privacy:Server-Side Integration
For backend payment processing:Webhook Integration
Handle payment confirmations:Payment Verification
Verify payments onchain:Testing
Test payments on testnet before mainnet:Error Handling
Common errors and solutions:Best Practices
Choose the right strategy:
- Standard: Fastest, lowest overhead
- Gasless: Best UX for new users
- Encrypted: Privacy for sensitive amounts
- Confidential: Maximum privacy (chains with Programmable Privacy only)
