DID method routing is how the Vidos resolver service allows you to work with many different types of Decentralized Identifiers (DIDs) through a single, consistent API. Instead of implementing separate resolution logic for each DID type, you can rely on the resolver to handle the complexities of different methods.
When you integrate with decentralized identity systems, you'll encounter many DID methods - from cryptographic (did:key, did:jwk) to blockchain-based (did:ethr, did:ion) to web-based (did:web). Each has unique characteristics and resolution requirements.
DID method routing provides you with:
This approach lets you focus on using DIDs in your application without implementing separate resolution logic for each method you want to support.
When you send a DID to the resolver API, the first step identifies which method you're trying to resolve:
This validation ensures that:
If you use an invalid or disabled method, you'll receive a clear error methodNotSupported
. This check happens before any method-specific processing begins, providing quick feedback on basic validation issues.
You can control DID methods through configuration, enabling or disabling specific methods based on your requirements. For details on configuring methods, see the Method Configurationdocumentation.
The resolver service uses a layered architecture that separates the API interface from the method-specific resolution logic:
This architecture offers several advantages from an API consumer's perspective:
This design allows your applications to work with different DID methods using the same code path, while the resolver service handles the method-specific details internally.
When you resolve a DID through the API, your request goes through these steps to produce a standardized response:
This process offers several advantages for your application:
This approach eliminates the need for your code to implement different resolution logic for each DID method you want to support, significantly simplifying integration.
For a comprehensive list of supported DID methods and their specific capabilities, see the Supported DID Methods.
The resolver handles various error conditions consistently:
This standardized approach ensures that your applications receive consistent error responses regardless of which DID method you try to resolve.
Always implement proper error handling in your application code to gracefully handle resolution failures. The standardized error responses help you detect and respond to specific error conditions.
The resolver's method routing capability enhances your ability to work with other components in the Vidos ecosystem:
By leveraging these integrations, you can build powerful verification workflows without implementing the intricacies of each DID method's resolution process.
DID method routing enables you to resolve multiple types of DIDs through a single consistent API. You benefit from:
This approach simplifies your application code by eliminating the need to implement method-specific handling, while still providing the flexibility to work with a wide range of DID methods as your requirements evolve.