Create Verifiable Credentials

This creates a verifiable credentails using following method. The weightage for this API is 10

API Specification

Create Verifiable Credentials

POST https://api.krypcore.com/api/v0/did/createVC

Creates a new Verifiable Credentials under the given instance.

Headers

Name
Type
Description

Authorization*

String

User Auth Key obtained from Dash

DappId*

String

DappId

Request Body

Name
Type
Description

subjectDid*

String

Subject DID

issuerDid*

String

Issuer DID

proofType*

String

Type Of proof

statusType*

String

Type Of status

templateId*

String

template id

{
    "Data": {
        "@context": ["https://www.w3.org/2018/credentials/v1", "https://w3id.org/security/suites/jws-2020/v1"],
        "config": {
            "issuerDid": "did:key:z6MkhNjTaHAmf1fx9JuWXHUqGU7k4tX6RKCHkvHnXdrxZqGa",
            "proofType": "LD_PROOF",
            "statusType": "StatusList2021Entry",
            "subjectDid": "did:key:z6MkjcRg1BFymuFVcZdHp2f7m6ZchZsqhGVQXnQckucCAACQ"
        },
        "credentialData": {},
        "credentialStatus": {
            "id": "http://127.0.0.1:7001/v1/credentials/status/revocation#1",
            "statusListCredential": "http://127.0.0.1:7001/v1/credentials/status/revocation",
            "statusListIndex": "1",
            "statusPurpose": "revocation",
            "type": "StatusList2021Entry"
        },
        "credentialSubject": {
            "additionalProp1": {},
            "id": "did:key:z6MkjcRg1BFymuFVcZdHp2f7m6ZchZsqhGVQXnQckucCAACQ"
        },
        "id": "urn:uuid:3d58a9a7-cd75-4e1b-90c9-97da654daf9d",
        "issuanceDate": "2023-09-21T07:11:47Z",
        "issued": "2023-09-21T07:11:47Z",
        "issuer": "did:key:z6MkhNjTaHAmf1fx9JuWXHUqGU7k4tX6RKCHkvHnXdrxZqGa",
        "proof": {
            "created": "2023-09-21T07:11:47Z",
            "creator": "did:key:z6MkhNjTaHAmf1fx9JuWXHUqGU7k4tX6RKCHkvHnXdrxZqGa",
            "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..SZbcEn7l_UyX9PPai3RcedNuwu4xOTWnJxvuK0obSr-jeWp-8PumgeMlxhajgjPJol3XN8In3qH8aOmn2nQwBg",
            "type": "JsonWebSignature2020",
            "verificationMethod": "did:key:z6MkhNjTaHAmf1fx9JuWXHUqGU7k4tX6RKCHkvHnXdrxZqGa#z6MkhNjTaHAmf1fx9JuWXHUqGU7k4tX6RKCHkvHnXdrxZqGa"
        },
        "templateId": "PermanentResidentCard",
        "type": ["VerifiableCredential"],
        "validFrom": "2023-09-21T07:11:47Z"
    },
    "Message": "VC Created",
    "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/createVC' \
--header 'Authorization: xxxxxxxxxxx' \
--header 'DappId: xxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
  "config": {
    "issuerDid": "did:key:z6MkqXwdB44PL2W5xHABsMR5MeXFq2Z2xhdBoT2VuvDdow3n",
    "proofType": "LD_PROOF",
    "statusType": "StatusList2021Entry",
    "subjectDid": "did:key:z6MkqXwdB44PL2W5xHABsMR5MeXFq2Z2xhdBoT2VuvDdow3n"
  },
  "credentialData": {
    "credentialSubject": {
      "additionalProp1": {}
    }
  },
  "templateId": "VerifiableId"
}'

Last updated