Context
Follow-up for #12 and merged PR #13.
#12 now uses the Heima mainnet CredentialAudit ABI that is actually deployed and emitting today as the acceptance target:
- Contract:
0x63c4545ac01c77cc74044f25b8edea3880224577
- Chain ID:
212013
- Live event path:
AuditAppended(bytes32,bytes32,bytes32,uint8,uint256,bytes32)
- Production API host used for verification:
https://explorer-api.heima.network
PR #13 merged useful base support for live AuditAppended rows, but production validation still shows acceptance gaps. This issue tracks the remaining work needed to close the live-ABI AgentKeys audit path end to end.
Production validation snapshot
Verified on 2026-05-26 against production:
GET https://explorer-api.heima.network/agentkeys/audit/<operator>?limit=50 returns 200 with live AuditAppended rows.
- Returned rows are current live ABI rows with
event_name="AuditAppended" and op_kind=0.
- Returned rows currently have
envelope_available=false, hash_verified=false, and envelope_fetch_error="agentkeys audit envelope not found".
GET https://explorer-api.heima.network/agentkeys/audit/<operator>?limit=5&op_kind=0 returns 200 but events=[], even though unfiltered rows have op_kind=0.
GET https://explorer-api.heima.network/agentkeys/audit/root/0x32301a0bd7c9c1d064f0d3891c78ad00a6d9fa758ebb14a1a0ff64eb4f4ca3aa returns 404 {"error":"not_found"}.
GET https://audit.litentry.org/v1/audit/envelope/<live_hash> returns HTTP 404 for sampled live hashes.
- Heima RPC over the captured range has 13 current
AuditAppended(...) logs and 0 AuditAppendedV2 / AuditRootAppendedV2 logs.
Sample operator:
0x941cb1c3260518bbf40eac7d02663517fc7cff304d9b03e80d2cc54126c6bef2
Sample actor:
0x82a0609ae28527453e7c7654ec11d57f1b66a442e39a2ec5e3b3f76178c87268
Sample live hashes returning worker 404:
0xdb927ad4467c02867819a1379c7c0b9a35103452c789badeae6e531b5d2f8e1c
0x3d67f9734a38829d9e2289cd9551caa7f50ba66bd521981fb8504be4ab23a223
Required fixes
- Fix
op_kind filtering for the current live ABI. ?op_kind=0 must return the same CredStore rows that appear in the unfiltered live-ABI response.
- Implement the current deployed root/batch event path for
/agentkeys/audit/root/<merkle_root>. The handler must not be V2-topic-only when live acceptance is based on the deployed current ABI.
- Keep the chain-only row behavior for worker 404s, but make the response explicit and stable:
envelope_available=false, hash_verified=false, raw chain identity, op_kind, sequence/index key, block/log/tx fields.
- If the worker later serves a live hash, verify
keccak256(canonical_cbor_bytes) == envelope_hash and return envelope_available=true, hash_verified=true, and typed body fields.
- Add production-oriented regression coverage for current
AuditAppended(...) logs, including op_kind filtering, pagination/cursor behavior, and chain-only worker-404 rows.
- Add regression coverage for the current root/batch path once the deployed event shape is implemented.
Acceptance checklist
References
Context
Follow-up for #12 and merged PR #13.
#12 now uses the Heima mainnet
CredentialAuditABI that is actually deployed and emitting today as the acceptance target:0x63c4545ac01c77cc74044f25b8edea3880224577212013AuditAppended(bytes32,bytes32,bytes32,uint8,uint256,bytes32)https://explorer-api.heima.networkPR #13 merged useful base support for live
AuditAppendedrows, but production validation still shows acceptance gaps. This issue tracks the remaining work needed to close the live-ABI AgentKeys audit path end to end.Production validation snapshot
Verified on 2026-05-26 against production:
GET https://explorer-api.heima.network/agentkeys/audit/<operator>?limit=50returns 200 with liveAuditAppendedrows.event_name="AuditAppended"andop_kind=0.envelope_available=false,hash_verified=false, andenvelope_fetch_error="agentkeys audit envelope not found".GET https://explorer-api.heima.network/agentkeys/audit/<operator>?limit=5&op_kind=0returns 200 butevents=[], even though unfiltered rows haveop_kind=0.GET https://explorer-api.heima.network/agentkeys/audit/root/0x32301a0bd7c9c1d064f0d3891c78ad00a6d9fa758ebb14a1a0ff64eb4f4ca3aareturns404 {"error":"not_found"}.GET https://audit.litentry.org/v1/audit/envelope/<live_hash>returns HTTP 404 for sampled live hashes.AuditAppended(...)logs and 0AuditAppendedV2/AuditRootAppendedV2logs.Sample operator:
0x941cb1c3260518bbf40eac7d02663517fc7cff304d9b03e80d2cc54126c6bef2Sample actor:
0x82a0609ae28527453e7c7654ec11d57f1b66a442e39a2ec5e3b3f76178c87268Sample live hashes returning worker 404:
0xdb927ad4467c02867819a1379c7c0b9a35103452c789badeae6e531b5d2f8e1c0x3d67f9734a38829d9e2289cd9551caa7f50ba66bd521981fb8504be4ab23a223Required fixes
op_kindfiltering for the current live ABI.?op_kind=0must return the sameCredStorerows that appear in the unfiltered live-ABI response./agentkeys/audit/root/<merkle_root>. The handler must not be V2-topic-only when live acceptance is based on the deployed current ABI.envelope_available=false,hash_verified=false, raw chain identity,op_kind, sequence/index key, block/log/tx fields.keccak256(canonical_cbor_bytes) == envelope_hashand returnenvelope_available=true,hash_verified=true, and typed body fields.AuditAppended(...)logs, includingop_kindfiltering, pagination/cursor behavior, and chain-only worker-404 rows.Acceptance checklist
GET /agentkeys/audit/<operator_omni>?limit=50returns non-empty liveAuditAppendedrows on production.GET /agentkeys/audit/<operator_omni>?op_kind=0&limit=5returns non-empty rows matchingop_kind=0.GET /agentkeys/audit/<operator_omni>?actor_omni=<actor>&limit=5returns matching actor-filtered rows.GET /agentkeys/audit/root/<known_root>returns root metadata and associated row/leaf data for the current deployed root/batch path.GET /agentkeys/audit/envelope/<live_hash>returns either canonical CBOR with verified hash, or a documented 404 response while the row API still preserves the chain-only event.op_kindfilter, root path, and envelope path.References