1. DIF Universal Resolver
There are two ways to use DIF Universal Resolver.
e.g.
Your DID is did:ccp:ceNobbK6Me9F5zwyE3MKY88QZLw
1.1. Web UI
You can visit DIF Universal Resolver: https://uniresolver.io.
1.2. DIF API
Use curl
cmd like below:
curl https://uniresolver.io/1.0/identifiers/did:ccp:ceNobbK6Me9F5zwyE3MKY88QZLw
The resolve result is:
{
"redirect": null,
"didDocument": {
"@context": "https://www.w3.org/2019/did/v1",
"id": "did:ccp:ceNobbK6Me9F5zwyE3MKY88QZLw",
"service": [
{
"type": "DIDResolve",
"serviceEndpoint": "https://did.baidu.com"
}
],
"authentication": [
{
"type": "Secp256k1",
"publicKey": [
"did:ccp:ceNobbK6Me9F5zwyE3MKY88QZLw#key-1"
]
}
],
"publicKey": [
{
"id": "did:ccp:ceNobbK6Me9F5zwyE3MKY88QZLw#key-1",
"type": "Secp256k1",
"publicKeyHex": "046fcbedd1107ca45be3e81fc445e5a366886a89e7087fe3d128e6236302f31594740f250433ebe9f0abcbd04dbf9c5979e270a0772ad1cc502cec2d5de9504c8c"
},
{
"id": "did:ccp:ceNobbK6Me9F5zwyE3MKY88QZLw#key-2",
"type": "Secp256k1",
"publicKeyHex": "0496712d16b0836684aacd5ab6ba3d489c35efa31f414a1c6a455fc6b37ff28e5fa97ac29c1021b76e5b78e2bbceac1dfc4ec98e6b2b3e65a29f7f1cd4944dfb93"
}
]
},
"resolverMetadata": {
"duration": 1154,
"driverId": "driver-15-hello2mao/driver-did-ccp",
"driver": "HttpDriver",
"didUrl": {
"didUrlString": "did:ccp:ceNobbK6Me9F5zwyE3MKY88QZLw",
"did": {
"didString": "did:ccp:ceNobbK6Me9F5zwyE3MKY88QZLw",
"method": "ccp",
"methodSpecificId": "ceNobbK6Me9F5zwyE3MKY88QZLw",
"parseTree": null,
"parseRuleCount": null
},
"parameters": null,
"parametersMap": {},
"path": "",
"query": null,
"fragment": null,
"parseTree": null,
"parseRuleCount": null
}
},
"methodMetadata": {
"version": 2,
"proof": {
"creator": "did:ccp:ceNobbK6Me9F5zwyE3MKY88QZLw#key-1",
"type": "Secp256k1",
"signatureValue": "30440220211ffc76ae2858d6baa29faa9b576d6b2e048e8f4f7767ee1c2fba7ae6c2a78102205f5b56cd1431830b45109d716631638d961e5b252c2c2354d8bb96782d8a62ef"
},
"created": "2019-10-21T11:12:13.065Z",
"updated": "2019-10-21T11:17:49.379Z"
}
}
2. Baidu DID Resolver
You can also use Baidu DID Resolver
to resolve your DID.
e.g.
Your DID is did:ccp:ceNobbK6Me9F5zwyE3MKY88QZLw
, then use curl
cmd like below:
curl https://did.baidu.com/v1/did/resolve/did:ccp:ceNobbK6Me9F5zwyE3MKY88QZLw
The resolve result is:
{
"code": 0,
"message": "ok",
"requestId": "",
"content": {
"didDocument": {
"@context": "https://w3id.org/did/v1",
"id": "did:ccp:ceNobbK6Me9F5zwyE3MKY88QZLw",
"version": 2,
"created": "2019-10-21T11:12:13.065Z",
"updated": "2019-10-21T11:17:49.379Z",
"publicKey": [
{
"id": "did:ccp:ceNobbK6Me9F5zwyE3MKY88QZLw#key-1",
"type": "Secp256k1",
"publicKeyHex": "046fcbedd1107ca45be3e81fc445e5a366886a89e7087fe3d128e6236302f31594740f250433ebe9f0abcbd04dbf9c5979e270a0772ad1cc502cec2d5de9504c8c"
},
{
"id": "did:ccp:ceNobbK6Me9F5zwyE3MKY88QZLw#key-2",
"type": "Secp256k1",
"publicKeyHex": "0496712d16b0836684aacd5ab6ba3d489c35efa31f414a1c6a455fc6b37ff28e5fa97ac29c1021b76e5b78e2bbceac1dfc4ec98e6b2b3e65a29f7f1cd4944dfb93"
}
],
"authentication": ["did:ccp:ceNobbK6Me9F5zwyE3MKY88QZLw#key-1"],
"recovery": ["did:ccp:ceNobbK6Me9F5zwyE3MKY88QZLw#key-2"],
"service": [
{
"id": "did:ccp:ceNobbK6Me9F5zwyE3MKY88QZLw#resolver",
"type": "DIDResolve",
"serviceEndpoint": "https://did.baidu.com"
}
],
"proof": {
"type": "Secp256k1",
"creator": "did:ccp:ceNobbK6Me9F5zwyE3MKY88QZLw#key-1",
"signatureValue": "30440220211ffc76ae2858d6baa29faa9b576d6b2e048e8f4f7767ee1c2fba7ae6c2a78102205f5b56cd1431830b45109d716631638d961e5b252c2c2354d8bb96782d8a62ef"
}
}
}
}