Skip to content

feat: resolve did:plc #477

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

feat: resolve did:plc #477

wants to merge 2 commits into from

Conversation

fforbeck
Copy link
Member

@fforbeck fforbeck commented May 27, 2025

DID PLC Resolver

Overview

Created a DID resolver helper to support both Web and PLC DID resolution. The resolver uses an optional options object and has dedicated resolution functions for each DID method that can be easily extended.

Main Changes

  • Refactored createDidResolver to use optional options object
  • Added separate resolveDIDWeb and resolveDIDPlc functions
  • Added proper parsing of PLC verification methods using multikey format

Usage

const resolver = createDidResolver({
  principalMapping, // optional mapping of Web DIDs to DID keys
  plcClient        // optional PLC client for PLC DID resolution
})

// Can also be called with no options
const resolver = createDidResolver()

Related: storacha/project-tracking#463

@fforbeck fforbeck requested a review from alanshaw May 30, 2025 18:31
@fforbeck fforbeck marked this pull request as ready for review June 2, 2025 12:58
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.

2 participants