Skip to main content

Full Client

createX402r() returns a client with all action groups. No type restrictions.

Role Presets

Role presets call createX402r() internally and narrow the TypeScript types so autocomplete only shows relevant methods. All three require walletClient.
Type narrowing is a DX convenience, not a security boundary. On-chain conditions enforce access control.

Config Reference

Action Groups

Groups without their required address are undefined on the client. Use optional chaining:

Extend

Add custom action groups with .extend():

ERC-8004 plugin

The erc8004Actions plugin adds identity, reputation, and discovery action groups for on-chain agent identity and reputation:

identity.check()

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.
Returns CheckAgentResult:
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.

Next steps

Merchant Guide

Accept payments and capture funds.

Deploy Operator

Get the addresses for your client config.