Skip to content

feat: Add local driver class instantiation support for did:proof#553

Open
PaperProofLabs wants to merge 1 commit into
decentralized-identity:mainfrom
PaperProofLabs:main
Open

feat: Add local driver class instantiation support for did:proof#553
PaperProofLabs wants to merge 1 commit into
decentralized-identity:mainfrom
PaperProofLabs:main

Conversation

@PaperProofLabs

Copy link
Copy Markdown

This PR adds support for the did:proof method to the Universal Resolver by introducing a new local driver. The did:proof method is designed as part of the PaperProof ecosystem and resolves DIDs by retrieving DID Documents with embedded proof metadata.

Driver Details:

Key Features:

  • Local Driver Class Instantiation: This PR introduces support for registering drivers via local Java class instantiation (not just HTTP endpoints), enabling more efficient driver loading.
  • DID Pattern Validation: The driver validates did:proof identifiers using the pattern ^(did:proof:z[A-Za-z0-9]{20,})$
  • Query Parameter Parsing: Supports optional query parameters for customizing resolution behavior
  • Full Driver Interface Implementation: Implements all required Driver interface methods including resolve(), dereference(), properties(), testIdentifiers(), and traits()

Resolution Flow:

  1. The Universal Resolver routes did:proof identifiers to this driver
  2. The driver validates the DID format and extracts the method-specific ID
  3. The driver constructs a DID Document with proof-related metadata
  4. The DID Document is returned in compliance with DID Core resolution format

Framework Changes:

  • Extended LocalUniResolverConfigurator to support driverClass field for local instantiation
  • Updated Spring Boot configuration in WebAppConfig to handle local drivers
  • Added driverClass property binding in DriverConfigs
  • Maintained backward compatibility with existing HTTP-based drivers

Extend driver configuration to support driverClass for loading drivers from
the classpath, enabling the did:proof driver and other local implementations
to register directly without HTTP wrapping.

Changes:
- Add driverClass field and accessors to DriverConfigs
- Implement driver instantiation in WebAppConfig and LocalUniResolverConfigurator
- Add did:proof driver configuration example in application.yml
- Add example-config.json demonstrating mixed local and HTTP driver configuration

Backward compatible: Existing HTTP driver configuration unchanged.
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