x402-stacks
Installation
SKILL.md
x402-stacks SDK
Overview
x402-stacks enables automatic HTTP-level payments for APIs using STX or sBTC tokens on Stacks blockchain. Two client paths: server/CLI (axios interceptor with private key) and frontend/browser (wallet extension signing via @stacks/connect). Server protects endpoints with Express middleware.
Core principle: HTTP 402 Payment Required becomes a working protocol.
Installation
# Server/CLI
npm i x402-stacks
# Frontend (Browser) — additional deps
npm i x402-stacks @stacks/connect @stacks/transactions axios