Resolve DID
This method resolves the DID . The weightage for this API is 10
API Specification
Resolve DID
POST
https://api.krypcore.com/api/v0/did/resolveDid
Resolves DID under the given instance.
Headers
Name
Type
Description
Authorization*
String
User Auth Key obtained from Dash
DappId*
String
DappId
Request Body
Name
Type
Description
did*
String
DID key from the dashboard
{
"Data": {
"@context": ["https://www.w3.org/ns/did/v1"],
"assertionMethod": [{
"controller": "",
"id": "did:key:z6MkrEw67utfitESqL3Nvs8XruTrLv3EY8S2sR73wsqc7G5D#z6MkrEw67utfitESqL3Nvs8XruTrLv3EY8S2sR73wsqc7G5D",
"type": ""
}],
"authentication": [{
"controller": "",
"id": "did:key:z6MkrEw67utfitESqL3Nvs8XruTrLv3EY8S2sR73wsqc7G5D#z6MkrEw67utfitESqL3Nvs8XruTrLv3EY8S2sR73wsqc7G5D",
"type": ""
}],
"capabilityDelegation": [{
"controller": "",
"id": "did:key:z6MkrEw67utfitESqL3Nvs8XruTrLv3EY8S2sR73wsqc7G5D#z6MkrEw67utfitESqL3Nvs8XruTrLv3EY8S2sR73wsqc7G5D",
"type": ""
}],
"capabilityInvocation": [{
"controller": "",
"id": "did:key:z6MkrEw67utfitESqL3Nvs8XruTrLv3EY8S2sR73wsqc7G5D#z6MkrEw67utfitESqL3Nvs8XruTrLv3EY8S2sR73wsqc7G5D",
"type": ""
}],
"id": "did:key:z6MkrEw67utfitESqL3Nvs8XruTrLv3EY8S2sR73wsqc7G5D",
"keyAgreement": [{
"controller": "",
"id": "did:key:z6MkrEw67utfitESqL3Nvs8XruTrLv3EY8S2sR73wsqc7G5D#z6LSrnZ9gN7Ctn6BdEQCZLsDwJfxSocT3DHBaZmsLwW8CHxE",
"type": ""
}],
"verificationMethod": [{
"controller": "did:key:z6MkrEw67utfitESqL3Nvs8XruTrLv3EY8S2sR73wsqc7G5D",
"id": "did:key:z6MkrEw67utfitESqL3Nvs8XruTrLv3EY8S2sR73wsqc7G5D#z6MkrEw67utfitESqL3Nvs8XruTrLv3EY8S2sR73wsqc7G5D",
"publicKeyBase58": "Cng3XfeEPLjyiqCgFJAh1ourXLmP8FBgBQC87bsbC3Hq",
"type": "Ed25519VerificationKey2019"
}, {
"controller": "did:key:z6MkrEw67utfitESqL3Nvs8XruTrLv3EY8S2sR73wsqc7G5D",
"id": "did:key:z6MkrEw67utfitESqL3Nvs8XruTrLv3EY8S2sR73wsqc7G5D#z6LSrnZ9gN7Ctn6BdEQCZLsDwJfxSocT3DHBaZmsLwW8CHxE",
"publicKeyBase58": "G7NzA4JLoKNSXr2S2hMGciTUbf5LLc72hb4BrUrbUvBU",
"type": "X25519KeyAgreementKey2019"
}]
},
"Message": "",
"Status": "SUCCESS"
}
{
"Data": {
"details": [],
"status": 500,
"title": "Unknown Multibase type: ",
"type": null
},
"Message": "",
"Status": "SUCCESS"
}
Take a look at how you might call this method using our official libraries, or via curl
:
curl --location --request POST 'https://api.krypcore.com/api/v0/did/resolveDid' \
--header 'Authorization: xxxxxxxxxxxxxxx' \
--header 'DappId: xxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"did": "did:key:z6MkqXwdB44PL2W5xHABsMR5MeXFq2Z2xhdBoT2VuvDdow3n"
}'
var axios = require('axios');
var data = JSON.stringify({
"did": "did:key:z6MkqXwdB44PL2W5xHABsMR5MeXFq2Z2xhdBoT2VuvDdow3n"
});
var config = {
method: 'post',
url: 'https://api.krypcore.com/api/v0/did/resolveDid',
headers: {
'Authorization': 'xxxxxxxxxxxxxxx',
'DappId': 'xxxxxxxxxxxxxxx',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
import json
url = "https://api.krypcore.com/api/v0/did/resolveDid"
payload = json.dumps({
"did": "did:key:z6MkqXwdB44PL2W5xHABsMR5MeXFq2Z2xhdBoT2VuvDdow3n"
})
headers = {
'Authorization': 'xxxxxxxxxxxxxxx',
'DappId': 'xxxxxxxxxxxxxxx',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.krypcore.com/api/v0/did/resolveDid"
method := "POST"
payload := strings.NewReader(`{
"did": "did:key:z6MkqXwdB44PL2W5xHABsMR5MeXFq2Z2xhdBoT2VuvDdow3n"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "xxxxxxxxxxxxxxx")
req.Header.Add("DappId", "xxxxxxxxxxxxxxx")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Last updated