IResolver.resolveDid() method

Resolves DID and returns DID Document

Signature:
resolveDid(args: ResolveDidArgs): Promise<DIDDocument>;

Parameters

ParameterTypeDescription
argsResolveDidArgsInput arguments for resolving a DID
Returns:

Promise<DIDDocument>

Example

const doc = await agent.resolveDid({
didUrl: 'did:ethr:rinkeby:0xb09b66026ba5909a7cfe99b76875431d2b8d5190',
})
expect(doc).toEqual({
'@context': 'https://w3id.org/did/v1',
id: 'did:ethr:rinkeby:0xb09b66026ba5909a7cfe99b76875431d2b8d5190',
publicKey: [
{
id: 'did:ethr:rinkeby:0xb09b66026ba5909a7cfe99b76875431d2b8d5190#controller',
type: 'Secp256k1VerificationKey2018',
controller: 'did:ethr:rinkeby:0xb09b66026ba5909a7cfe99b76875431d2b8d5190',
ethereumAddress: '0xb09b66026ba5909a7cfe99b76875431d2b8d5190',
},
],
authentication: [
{
type: 'Secp256k1SignatureAuthentication2018',
publicKey: 'did:ethr:rinkeby:0xb09b66026ba5909a7cfe99b76875431d2b8d5190#controller',
},
],
})