Skip to content

DCKA-5494 normalize cheqd DID documents from universal resolver so BB…#538

Merged
maycon-mello merged 1 commit into
masterfrom
DCKA-5494-fix-uniresolver-bbs-keys
Jun 1, 2026
Merged

DCKA-5494 normalize cheqd DID documents from universal resolver so BB…#538
maycon-mello merged 1 commit into
masterfrom
DCKA-5494-fix-uniresolver-bbs-keys

Conversation

@maycon-mello

Copy link
Copy Markdown
Collaborator

No description provided.

…S+ keys are verifiable

The universal resolver fallback returns cheqd offchain (BBS+) keys as
JSON-stringified blobs in assertionMethod instead of proper objects in
verificationMethod, leaving publicKeyBase58 unreachable for BBS+ verification.
Normalize resolved documents before caching to lift these inline keys into
verificationMethod, matching the on-chain resolver behaviour.
@maycon-mello
maycon-mello force-pushed the DCKA-5494-fix-uniresolver-bbs-keys branch from b296e25 to f1b106a Compare May 29, 2026 18:11
@maycon-mello
maycon-mello requested a review from Copilot May 29, 2026 18:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Normalizes DID documents returned by the universal resolver so that cheqd offchain BBS+ keys—delivered as JSON-stringified blobs inside verification relationship arrays—are lifted into verificationMethod objects, matching the on-chain resolver's shape. This fixes downstream consumers (e.g., jsonld.frame) that need to read publicKeyBase58 from a real verification method.

Changes:

  • Adds normalizeDIDDocument helper that unwraps double-JSON-stringified verification method blobs from relationship arrays into verificationMethod, replacing the inlined entry with the method's id.
  • Applies the normalization in CachedDIDResolver for both initial resolve and background refresh paths so cached values are consistent.
  • Adds integration tests verifying BBS+ keys are reachable via both the fallback (universal) and on-chain resolvers.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/wasm/src/services/blockchain/normalize-did-document.ts New normalization helper that lifts inline BBS+ verification methods out of relationship arrays.
packages/wasm/src/services/blockchain/cached-did-resolver.ts Wraps resolver results with normalizeDIDDocument on resolve and background refresh.
integration-tests/did-resolution.test.ts Adds tests asserting BBS+ key reachability through both resolver paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@maycon-mello
maycon-mello merged commit c02f6e2 into master Jun 1, 2026
7 of 9 checks passed
@maycon-mello
maycon-mello deleted the DCKA-5494-fix-uniresolver-bbs-keys branch June 1, 2026 18:40
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.

3 participants