x402 Lotto
Access lottery data and services via x402 payment protocol, including listing lotteries, fetching jackpots, purchasing tickets, and checking results.
x402 Lotto
API client for x402.lotto — lottery services via the x402 payment protocol.
Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/lotteries | GET | List lotteries |
/api/jackpot/:name | GET | Current jackpot |
/api/tickets | POST | Purchase ticket |
/api/tickets/:id | GET | Ticket status |
/api/results/:name | GET | Draw results |
Usage
import { wrapFetchWithPayment, decryptKey } from '@x402/evm';
const wallet = decryptKey(process.env.KEY);
const fetch = wrapFetchWithPayment(wallet);
const res = await fetch('https://x402.lotto/api/jackpot/eurojackpot');
Payment
Uses x402 protocol — EIP-712 off-chain signing, no gas fees. USDC on Base (8453).
Install
clawhub install x402-lotto
Related skills
- Downloads
- 949All time
- Security audit
- Review
- Last updated
- 6mo ago
- Current version
- v1.0.3
- License
- MIT-0
