create-typescript-x402-client
Installation
SKILL.md
Creating x402 HTTP Clients (Fetch and Axios)
Build HTTP clients that automatically detect 402 Payment Required responses, sign Algorand transactions, and retry requests with payment proof -- all transparently.
Prerequisites
Before using this skill, ensure:
- Node.js or browser environment with TypeScript support
- An Algorand wallet or private key for signing payment transactions
- USDC balance on the target network (testnet or mainnet) in the payer's account
Core Workflow: The 402 Payment Flow
The key insight is that wrapFetchWithPayment and wrapAxiosWithPayment intercept 402 responses, sign a transaction group, and retry the original request with the payment header -- all automatically: