IResolver.resolveDid() method
Resolves DID and returns DID Resolution Result
Signature:
resolveDid(args: ResolveDidArgs): Promise<DIDResolutionResult>;
Parameters
Parameter | Type | Description |
---|---|---|
args | ResolveDidArgs | Input arguments for resolving a DID |
Returns:
Promise<DIDResolutionResult>
Example
const doc = await agent.resolveDid({
didUrl: 'did:ethr:0xb09b66026ba5909a7cfe99b76875431d2b8d5190',
})
expect(doc.didDocument).toEqual({
'@context': expect.anything(),
id: 'did:ethr:0xb09b66026ba5909a7cfe99b76875431d2b8d5190',
verificationMethod: [
{
id: 'did:ethr:0xb09b66026ba5909a7cfe99b76875431d2b8d5190#controller',
type: 'EcdsaSecp256k1RecoveryMethod2020',
controller: 'did:ethr:0xb09b66026ba5909a7cfe99b76875431d2b8d5190',
blockchainAccountId: 'eip155:1:0xb09B66026bA5909A7CFE99b76875431D2b8D5190',
},
],
authentication: ['did:ethr:0xb09b66026ba5909a7cfe99b76875431d2b8d5190#controller'],
assertionMethod: ['did:ethr:0xb09b66026ba5909a7cfe99b76875431d2b8d5190#controller'],
})