Skip to content

feat: implement ERC-8004 reputation and fix EVM domain discovery#1186

Open
Ashutosh0x wants to merge 2 commits intocoinbase:mainfrom
Ashutosh0x:feat/reputation-erc-8004
Open

feat: implement ERC-8004 reputation and fix EVM domain discovery#1186
Ashutosh0x wants to merge 2 commits intocoinbase:mainfrom
Ashutosh0x:feat/reputation-erc-8004

Conversation

@Ashutosh0x
Copy link

Overview

This PR implements the ERC-8004 Trustless Agents reputation extension for the x402 protocol and fixes critical signature verification issues on EVM.

Key Changes

1. ERC-8004 Reputation Extension (@x402/extensions)

  • Identity Primitives: Implemented AgentIdentity (CAIP-10) and ReputationInfo schemas using Zod.
  • SATI Integration: Added FeedbackFileSchema supporting CAIP-220 Task References. This enables agents to link their reputation directly to payment transaction hashes, creating a verifiable proof-of-service.
  • Automation Tool: Created feedbackTool.ts which automatically extracts payment data from an x402 settlement to generate standardized reputation signals.
  • Bidirectional Support: Included client-side helpers for agents to provide their own identity in payment payloads.

2. EVM Domain Discovery (@x402/evm)

  • Dynamic Discovery: Implemented Automatic EIP-712 Domain Discovery in the EVM facilitator. It now dynamically fetches token names and versions from the contract if they are missing or misconfigured.
  • Robustness: This directly fixes the "invalid signature" issues seen with production tokens like USDC on Base Sepolia where on-chain domain parameters might vary.
  • Smart Wallet Support: Addressed considerations for contract-based wallets (e.g., Coinbase Smart Wallet) by providing better error handling and documentation for switching to Permit2.

3. Spec & Documentation

  • EVM Scheme Spec: Updated specs/schemes/exact/scheme_exact_evm.md with warnings about EIP-3009/EOA limitations and recommendations for Permit2.
  • Extensions README: Added comprehensive API references for the new reputation extension.

Verification Results

  • @x402/extensions: 210/210 tests passed (including new reputation/feedback tests).
  • @x402/evm: 165/165 tests passed (including new domain discovery logic).
  • Build: Successfully built core and extensions packages to verify type safety.
  • Changeset: Added minor version changeset for both packages.

This commit adds the ERC-8004 Trustless Agents reputation extension to @x402/extensions, including automated feedback generation and CAIP-220 support. It also enhances @x402/evm with automatic EIP-712 domain discovery to resolve signature verification failures for EIP-3009 tokens like USDC.
@vercel
Copy link

vercel bot commented Feb 14, 2026

@Ashutosh0x is attempting to deploy a commit to the Coinbase Team on Vercel.

A member of the Team first needs to authorize it.

@cb-heimdall
Copy link

cb-heimdall commented Feb 14, 2026

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

@github-actions github-actions bot added specs Spec changes or additions typescript sdk Changes to core v2 packages labels Feb 14, 2026
@Ashutosh0x
Copy link
Author

Hi maintainers! I've implemented the ERC-8004 reputation extension and a dynamic EIP-712 domain discovery fix for the EVM facilitator (addressing the USDC 'USD Coin' naming mismatch on Base).

All 375+ unit tests passed locally across @x402/extensions and @x402/evm. Could you please approve the CI workflows so we can verify the builds?

(Note: I'll be adding a verified commit shortly to resolve the signature requirement). Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sdk Changes to core v2 packages specs Spec changes or additions typescript

Development

Successfully merging this pull request may close these issues.

2 participants