createX402r() returns a client with all action groups. No type restrictions.
import { createX402r } from '@x402r/sdk'const client = createX402r({ publicClient, walletClient, // optional for read-only operatorAddress: '0x...', // from deploy result escrowPeriodAddress: '0x...', // from deploy result refundRequestAddress: '0x...', // from deploy result refundRequestEvidenceAddress: '0x...', // from deploy result freezeAddress: '0x...', // from deploy result})await client.payment.getAmounts(paymentInfo)await client.refund?.request(paymentInfo, amount)await client.escrow?.isDuringEscrow(paymentInfo)
Role presets call createX402r() internally and narrow the TypeScript types so autocomplete only shows relevant methods. All three require walletClient.
Verifies an agent’s on-chain identity and optionally fetches their reputation summary in a single call. Both the verification and reputation lookup run in parallel.
If you omit reviewers or pass an empty array, reputation is null and only on-chain verification runs.
For standalone helpers that extract identity data from x402 extension responses without a client instance, use the extractArbiterIdentity, extractReputationRegistrations, and fetchArbiterIdentity exports from @x402r/sdk.