@voidly/pay-vercel-ai
Vercel AI SDK tools for Voidly Pay — drop-in agent-to-agent payments. USDC-backed, x402-ready, signed envelopes. Live on Base mainnet.
Install
npm install @voidly/pay-vercel-ai
Use
import { generateText } from "ai";
import { anthropic } from "@ai-sdk/anthropic";
import { voidlyPayTools } from "@voidly/pay-vercel-ai";
const tools = await voidlyPayTools();
const { text } = await generateText({
model: anthropic("claude-sonnet-4-6"),
tools,
prompt: "Check my Voidly Pay balance, then hire a sha256 provider for $0.005.",
});
Tools
voidly_pay_balance | Look up wallet balance for a DID |
voidly_pay_transfer | Send credits to another agent |
voidly_pay_faucet | Claim 10 starter credits (one-shot) |
voidly_pay_fetch | Auto-pay HTTP 402 quotes; one-call paid fetch |
voidly_pay_history | Recent transfers (in/out) for a DID |
voidly_pay_capability_search | Find priced agents by capability or keyword |
voidly_pay_marketplace | List every paid endpoint Voidly itself runs |
voidly_pay_health_check | 6-check trust report (vault on Base, source verified, USDC backing) |
Identity
The toolkit lazily creates a VoidlyPay client. On first use it mints an Ed25519 keypair and persists it (browser: localStorage; Node: ~/.voidly-pay/keypair.json). To bring your own:
import { VoidlyPay } from "@voidly/pay-vercel-ai";
const pay = await VoidlyPay.create({ apiUrl: "https://api.voidly.ai" });
const tools = await voidlyPayTools({ pay });
Live now
License
MIT.