Problem
The RegistrationValidator does not recognize registrations as a valid field. It gets flagged as:
- REG-040:
registrations: Unknown field not defined in ERC-8004 spec
But registrations is defined in the ERC-8004 spec as an optional array field.
Impact
- 9,072 false REG-040 warnings for
registrations field alone
Spec Definition
From ERC-8004:
"registrations": [
{
"agentId": 22,
"agentRegistry": "{namespace}:{chainId}:{identityRegistry}"
}
]
Each registration object contains:
agentId (number): ERC-721 token ID
agentRegistry (string): Format {namespace}:{chainId}:{identityRegistry} (e.g., eip155:1:0x8004...)
Required Changes
In RegistrationValidator.mjs:
- Add
registrations to KNOWN_SPEC_FIELDS array
- Add
#validateRegistrations() method that validates:
- Field is an array
- Each entry has
agentId (number) and agentRegistry (string)
agentRegistry format matches {namespace}:{chainId}:{address} pattern
- Call
#validateRegistrations() from validate()
Current KNOWN_SPEC_FIELDS:
const KNOWN_SPEC_FIELDS = [
'type', 'name', 'description', 'image', 'services',
'x402Support', 'active', 'supportedTrust'
]
Should be:
const KNOWN_SPEC_FIELDS = [
'type', 'name', 'description', 'image', 'services',
'x402Support', 'active', 'registrations', 'supportedTrust'
]
Validation Data
Validated against ~69,000 Dune-downloaded on-chain registration events.
Problem
The
RegistrationValidatordoes not recognizeregistrationsas a valid field. It gets flagged as:registrations: Unknown field not defined in ERC-8004 specBut
registrationsis defined in the ERC-8004 spec as an optional array field.Impact
registrationsfield aloneSpec Definition
From ERC-8004:
Each registration object contains:
agentId(number): ERC-721 token IDagentRegistry(string): Format{namespace}:{chainId}:{identityRegistry}(e.g.,eip155:1:0x8004...)Required Changes
In
RegistrationValidator.mjs:registrationstoKNOWN_SPEC_FIELDSarray#validateRegistrations()method that validates:agentId(number) andagentRegistry(string)agentRegistryformat matches{namespace}:{chainId}:{address}pattern#validateRegistrations()fromvalidate()Current
KNOWN_SPEC_FIELDS:Should be:
Validation Data
Validated against ~69,000 Dune-downloaded on-chain registration events.