API client for x402.lotto — lottery services via the x402 payment protocol.
EndpointMethodDescription/api/lotteriesGETList lotteries/api/jackpot/:nameGETCurrent jackpot/api/ticketsPOSTPurchase ticket/api/tickets/:idGETTicket status/api/results/:nameGETDraw results
javascript
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');
Uses x402 protocol — EIP-712 off-chain signing, no gas fees. USDC on Base (8453).
bash
clawhub install x402-lotto