x402pp-gateway

Independent verification and SLA dispute resolution service

X402Gateway

The Gateway provides third-party verification of receipts and helps resolve SLA disputes.

Initialize Gateway
import { X402Gateway } from 'x402pp-gateway';
import { Connection } from '@solana/web3.js';

const gateway = new X402Gateway({
  connection: new Connection('https://api.devnet.solana.com')
});

Verify Receipt

const verification = await gateway.verifyReceipt(receipt);

console.log(verification);
// {
//   valid: true,
//   errors: [],
//   warnings: [],
//   slaCompliant: true,
//   onChainVerified: false
// }

Resolve SLA Dispute

const resolution = await gateway.resolveSLADispute(
  session,
  receipts  // All receipts for this session
);

console.log(resolution);
// {
//   resolution: 'agent_favor' | 'provider_favor' | 'split',
//   refundAmount: number,
//   reasoning: string[],
//   evidence: any[]
// }
X (Twitter)