Skip to content

feat(trust-registry): cross-standard resolver mapping + multibase signer_keyid - #80

Merged
pratyushsood24 merged 1 commit into
mainfrom
feat/kya-followups
Jun 27, 2026
Merged

feat(trust-registry): cross-standard resolver mapping + multibase signer_keyid#80
pratyushsood24 merged 1 commit into
mainfrom
feat/kya-followups

Conversation

@pratyushsood24

Copy link
Copy Markdown
Contributor

Two post-merge follow-ups on the Pillar B open library (GLM codegen, Claude-reviewed + verified).

1. Cross-standard envelope→did:aid mapping (closes the resolver's _ => None gap)

  • New external_refs(kind, external_id, did_aid) SQLite table + register_external_ref / resolve_external_ref on TrustStore (parameterized, lazy CREATE TABLE IF NOT EXISTS, last-writer-wins remap).
  • DidAidBackend now resolves WebBotAuthKey / Ap2Issuer / McpClient / EntraAgent by mapping the external id → did:aid: via the store, then resolving as did:aid. Exhaustive match (no wildcard), shared resolve_did_aid helper. Deterministic + offline.

2. signer_keyid hex → multibase

  • TrustAuthority::publish now emits the base58btc multibase key id (z…) via KeyPair::from_secret_bytes(..).public_key_multibase(), consistent with Pillars A/C. to_hex removed.

Tests: 13 pass (10 + 3 new); clippy -D warnings clean; fmt clean.

Conscious choices (flagged): multibase is raw-key (no did:key 0xed01 multicodec prefix) — matches A/C, so internally consistent; a did:key-prefixed form would be a codebase-wide change across all three pillars. external_refs uses lazy table creation (non-destructive on existing DBs).

…ner_keyid

- store: add external_refs(kind, external_id, did_aid) table + register/
  resolve_external_ref; created lazily via CREATE TABLE IF NOT EXISTS
- resolver: WebBotAuthKey/Ap2Issuer/McpClient/EntraAgent now map their
  external id -> did:aid via the store, then resolve as did:aid
  (exhaustive match, shared resolve_did_aid helper)
- authority: signer_keyid hex -> base58btc multibase (KeyPair::
  from_secret_bytes(..).public_key_multibase()), consistent with A/C
- 3 new tests (mapped/unmapped envelope resolve, multibase keyid); 13 total

Co-Authored-By: TechBlaze <info@techblaze.com.au>
@pratyushsood24
pratyushsood24 merged commit a4a71e9 into main Jun 27, 2026
5 checks passed
@pratyushsood24
pratyushsood24 deleted the feat/kya-followups branch June 27, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant