@raycashxyz/mpp-pay
v0.1.1
Published
CLI for making paid API requests via the Machine Payments Protocol
Downloads
170
Readme
@raycashxyz/mpp-pay
CLI for making paid API requests via the Machine Payments Protocol with Raycash private payments.
Install
npm install -g @raycashxyz/mpp-payOr use directly with npx:
npx @raycashxyz/mpp-pay <url>Usage
# Create a signing wallet (first time only — no ETH needed)
mpp-pay --create-wallet
# Make a paid request
mpp-pay "https://your-api.com/endpoint"
# POST with body
mpp-pay "https://your-api.com/endpoint" --method POST --body '{"input":"hello"}'
# Check wallet
mpp-pay --walletHow It Works
- You request a paid endpoint → gets
402 Payment Required mpp-payreads the payment challenge, creates a channel (first time), signs a voucher- Retries with payment → returns the response
- If the channel needs funding, shows the address to send tokens to
The wallet is a local signing key (~/.mpp-wallet.json). It never needs gas or on-chain transactions — it only signs payment vouchers off-chain.
License
MIT
