@agentpay88/client
v0.1.0
Published
AgentPay client — fetch wrapper that auto-pays 402 Payment Required responses
Maintainers
Readme
@agentpay/client
Fetch wrapper that auto-detects 402 Payment Required responses, pays via x402, and retries.
Install
npm install @agentpay/clientUsage
import { createAgentPayClient } from "@agentpay/client";
const client = createAgentPayClient({
callerWallet: "0xYourWalletAddress",
signPayment: async (requirements) => mySignX402(requirements),
});
const res = await client.fetch("https://api.example.com/protected-endpoint");