A request about the agentWallet events, from two drafts that rebuild an agent’s wallet history from the registry’s logs, made together with @garyyang-finchip (ERC-8434).
ERC-8004 names MetadataSet for agentWallet at registration, and says that a transfer clears the wallet. It does not say that setAgentWallet, unsetAgentWallet or the clearing on a transfer emit the event. The reference registry emits MetadataSet(agentId, "agentWallet", ...) in all three cases, and both drafts depend on it.
Agent Income Statements (ERC-TBA: Agent Income Statements) counts what an agent’s agentWallet received, in windows it cuts at every wallet change. A registry that changes the wallet silently makes a reader count payments to the wrong address for a window, or miss a wallet that was set and unset inside one.
ERC-8434 Agent Identity (AID) (ERC-8434: Agent Identity (AID)), in its author’s words: AID binds an address to an ERC-8004 agent and gives that address authority over the agent only while ownerOf(agentId) or getAgentWallet(agentId) equals the address. Because the relation can change with no AID transaction, AID resolvers reconstruct the authority intervals of an address from the registry’s own history: Transfer for ownership and MetadataSet(agentId, "agentWallet", ...) for the wallet, with a transfer taken to clear the wallet. Evidence keyed by agentId (reputation, validation, the registration file) counts for an address only inside one of its intervals. If a wallet change does not emit MetadataSet, the interval is extended past the point where the relation ended, and whoever held the agent in that gap inherits the address’s attribution, or the reverse. The reference deployment on Sepolia rebuilt its intervals from exactly these events, and ERC-8434 now states the dependence as a requirement on any bound registry and has its resolver void an agent’s intervals when the live owner or wallet is not explained by the events. A MUST in ERC-8004 would let every reader rely on the registry alone.
Proposed text, for the agentWallet section:
The registry MUST emit
MetadataSet(agentId, "agentWallet", ...)wheneveragentWalletchanges: onsetAgentWallet, onunsetAgentWallet, and when a transfer of the agent clears it. The clearing on a transfer is a change of the wallet for this purpose.
As far as both drafts are concerned, these three cases are the complete set. The last sentence is there because the clearing on a transfer is the case an implementer is most likely to omit.