This creates a verifiable Presentation using following method. The weightage for this API is 200
Create Verifiable Presentation
Creates a new Verifiable Presentation under the given instance.
{
Data: {
address: '0xe5376601b62fa8Dc2ee775b5d7C26605C797d2a8',
algorithm: 'ECC_SECG_P256K1',
createdAt: '2023-07-11T16:59:26.895989263Z',
instanceId: 'INS_WA_12_2023711',
lastUsed: '0001-01-01T00:00:00Z',
region: 'ap-south-1',
serviceApiKey: '3a8059d8-ab7c-4bb0-af41-b7d6ab62d40e',
uniqueId: '70a734a9-480c-439d-80f6-dba8a8623b76',
vault: 'aws',
walletName: 'sample-test-1234'
},
Message: 'Wallet created successfully',
Status: 'SUCCESS'
}
{
Status: 'FAILURE',
Code: 400,
Message: 'Custodial Wallets deployments limits exceeds'
}
{
Status: 'FAILURE',
Code: 401,
Message: 'subId with apiKey not matching'
}
{ Status: 'FAILURE', Code: 400, Message: 'insufficient balance' }
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/createVP' \
--header 'Authorization: xxxxxxxxxxxxx' \
--header 'DappId: xxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"credentialId": "string",
"holderId": "string"
}'
var axios = require('axios');
var data = JSON.stringify({
"credentialId": "string",
"holderId": "string"
});
var config = {
method: 'post',
url: 'https://api.krypcore.com/api/v0/did/createVP',
headers: {
'Authorization': 'xxxxxxxxxxxxx',
'DappId': 'xxxxxxxxxxxxx',
'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/createVP"
payload = json.dumps({
"credentialId": "string",
"holderId": "string"
})
headers = {
'Authorization': 'xxxxxxxxxxxxx',
'DappId': 'xxxxxxxxxxxxx',
'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/createVP"
method := "POST"
payload := strings.NewReader(`{
"credentialId": "string",
"holderId": "string"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "xxxxxxxxxxxxx")
req.Header.Add("DappId", "xxxxxxxxxxxxx")
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))
}