01
Agent signs locally
Ed25519 on the device. Spend caps before anything is sent.
General protocol translator
WireSwitch translates between payment protocols so an agent can pay a merchant that doesn't speak the same language. Sign locally. Hop once. We settle the rail you name.
AP2 and x402 in. Stripe and x402 out. One hosted hop.
01
Ed25519 on the device. Spend caps before anything is sent.
02
ingressProtocol and egressProtocol on one POST to /v1/translate.
03
Stripe PaymentIntent or Coinbase x402. Same hop, same signed envelope.
Issued key required. Do not omit gatewayUrl in production. apiKey is Authorization: Bearer.
wireswitch@1.1.1
ts
import { WireSwitch } from "wireswitch";
const client = new WireSwitch(process.env.WALLET_PRIVATE_KEY!, {
circuitBreaker: {
maxPerTransactionUSD: 50,
maxPerHourUSD: 500,
},
gatewayUrl: "https://wireswitch.io/v1/translate",
apiKey: process.env.WIRESWITCH_API_KEY!,
});
const result = await client.routePayment({
ingressProtocol: "GOOGLE_AP2",
egressProtocol: "STRIPE_ACP",
amount: 19.99,
recipientMerchantId: "merchant_123",
});https://wireswitch.io/v1/translate
Name ingress and egress. Velocity and replay live on the engine, not in this UI.
STRIPE_ACP is the PaymentIntent rail (alias STRIPE_PI), not ACP checkout_sessions. Unknown pairs return 422. x402 settle uses a facilitator; Stripe live take-rate needs Connect acct_.