For the complete documentation index, see llms.txt. This page is also available as Markdown.

Verify

VCDM verification

VCDM verification is usually done in context of a presentation request as documented with the presentations endpoint. You probably do not want to call the verify endpoint directly.

This route allows manual verification of issued/received credentials and presentations. Verification will check that the JSON-LD document's cryptographic proof is correct and that it has not been revoked. It will return a verification status with a boolean verified result.

A verifier upon receiving a verifiable presentation verifies the validity of each credential in the presentation. This includes checking the correctness of the data model of the credential, the authenticity by verifying the issuer's signature and revocation status if the credential is revocable. It then checks whether the presentation contains the signature from the holder on the presentation, including the given challenge.

Parameters

Name
In
Type
Required
Description

body

body

true

Provide as the body a verifiable credential or verifiable presentation JSON-LD document.

Verify a credential or presentation

post
/verify

Verifies a VCDM credential or presentation as JSON or JWT string. More info about Verify Credentials/Presentations

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
objectOptional
Responses
200

The verification result

application/json

Whether a credential/presentation/anchor is verified or not

verifiedbooleanOptional
resultsobject[]Optional
post/verify
POST /verify HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 7401

{
  "description": "Verifiable Presentation that has been signed",
  "type": "object",
  "properties": {
    "@context": {
      "description": "JSON-LD context array of strings or single string",
      "example": "https://docknetwork.github.io/vc-schemas/basic-credential.json-ld",
      "oneOf": [
        {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object"
              }
            ]
          }
        },
        {
          "type": "string"
        }
      ],
      "title": "Context"
    },
    "id": {
      "type": "string",
      "format": "uri"
    },
    "type": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "verifiableCredential": {
      "oneOf": [
        {
          "type": "object",
          "description": "Verifiable (signed) Credential returned by API. The current set of properties is almost complete",
          "properties": {
            "@context": {
              "description": "JSON-LD context array of strings or single string",
              "example": "https://docknetwork.github.io/vc-schemas/basic-credential.json-ld",
              "oneOf": [
                {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object"
                      }
                    ]
                  }
                },
                {
                  "type": "string"
                }
              ],
              "title": "Context"
            },
            "id": {
              "type": "string"
            },
            "type": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "credentialSubject": {
              "oneOf": [
                {
                  "type": "object"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              ]
            },
            "issuer": {
              "oneOf": [
                {
                  "type": "string",
                  "description": "DID as fully qualified, typically. `did:cheqd:`",
                  "maxLength": 512,
                  "example": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59",
                  "title": "DID"
                },
                {
                  "type": "object"
                }
              ]
            },
            "issuanceDate": {
              "type": "string",
              "format": "date-time"
            },
            "expirationDate": {
              "type": "string",
              "format": "date-time"
            },
            "credentialStatus": {
              "description": "Revocation registry id or user supplied status object",
              "oneOf": [
                {
                  "type": "object"
                },
                {
                  "type": "string"
                }
              ]
            },
            "proof": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "description": "Type of signature (NOTE: EcdsaSecp256k1Signature2019, Sr25519Signature2020 are deprecated)",
                      "type": "string",
                      "enum": [
                        "Ed25519Signature2018",
                        "Ed25519Signature2020",
                        "Bls12381BBS+SignatureDock2022",
                        "Bls12381BBS+SignatureProofDock2022",
                        "Bls12381BBDT16MACDock2024",
                        "Bls12381BBSSignatureDock2023",
                        "Bls12381BBSVerificationKeyDock2023",
                        "BJJSignature2021",
                        "EcdsaSecp256k1Signature2019",
                        "Sr25519Signature2020"
                      ],
                      "title": "SigType"
                    },
                    "proofPurpose": {
                      "description": "Purpose of credential",
                      "type": "string",
                      "enum": [
                        "assertionMethod",
                        "authentication"
                      ],
                      "title": "ProofPurpose"
                    },
                    "verificationMethod": {
                      "type": "string"
                    },
                    "created": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "proofValue": {
                      "type": "string"
                    }
                  },
                  "title": "VerifiableProof"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "description": "Type of signature (NOTE: EcdsaSecp256k1Signature2019, Sr25519Signature2020 are deprecated)",
                        "type": "string",
                        "enum": [
                          "Ed25519Signature2018",
                          "Ed25519Signature2020",
                          "Bls12381BBS+SignatureDock2022",
                          "Bls12381BBS+SignatureProofDock2022",
                          "Bls12381BBDT16MACDock2024",
                          "Bls12381BBSSignatureDock2023",
                          "Bls12381BBSVerificationKeyDock2023",
                          "BJJSignature2021",
                          "EcdsaSecp256k1Signature2019",
                          "Sr25519Signature2020"
                        ],
                        "title": "SigType"
                      },
                      "proofPurpose": {
                        "description": "Purpose of credential",
                        "type": "string",
                        "enum": [
                          "assertionMethod",
                          "authentication"
                        ],
                        "title": "ProofPurpose"
                      },
                      "verificationMethod": {
                        "type": "string"
                      },
                      "created": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "proofValue": {
                        "type": "string"
                      }
                    },
                    "title": "VerifiableProof"
                  }
                }
              ]
            }
          },
          "title": "VerifiableCredential"
        },
        {
          "type": "array",
          "items": {
            "type": "object",
            "description": "Verifiable (signed) Credential returned by API. The current set of properties is almost complete",
            "properties": {
              "@context": {
                "description": "JSON-LD context array of strings or single string",
                "example": "https://docknetwork.github.io/vc-schemas/basic-credential.json-ld",
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "object"
                        }
                      ]
                    }
                  },
                  {
                    "type": "string"
                  }
                ],
                "title": "Context"
              },
              "id": {
                "type": "string"
              },
              "type": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "credentialSubject": {
                "oneOf": [
                  {
                    "type": "object"
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  }
                ]
              },
              "issuer": {
                "oneOf": [
                  {
                    "type": "string",
                    "description": "DID as fully qualified, typically. `did:cheqd:`",
                    "maxLength": 512,
                    "example": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59",
                    "title": "DID"
                  },
                  {
                    "type": "object"
                  }
                ]
              },
              "issuanceDate": {
                "type": "string",
                "format": "date-time"
              },
              "expirationDate": {
                "type": "string",
                "format": "date-time"
              },
              "credentialStatus": {
                "description": "Revocation registry id or user supplied status object",
                "oneOf": [
                  {
                    "type": "object"
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "proof": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "description": "Type of signature (NOTE: EcdsaSecp256k1Signature2019, Sr25519Signature2020 are deprecated)",
                        "type": "string",
                        "enum": [
                          "Ed25519Signature2018",
                          "Ed25519Signature2020",
                          "Bls12381BBS+SignatureDock2022",
                          "Bls12381BBS+SignatureProofDock2022",
                          "Bls12381BBDT16MACDock2024",
                          "Bls12381BBSSignatureDock2023",
                          "Bls12381BBSVerificationKeyDock2023",
                          "BJJSignature2021",
                          "EcdsaSecp256k1Signature2019",
                          "Sr25519Signature2020"
                        ],
                        "title": "SigType"
                      },
                      "proofPurpose": {
                        "description": "Purpose of credential",
                        "type": "string",
                        "enum": [
                          "assertionMethod",
                          "authentication"
                        ],
                        "title": "ProofPurpose"
                      },
                      "verificationMethod": {
                        "type": "string"
                      },
                      "created": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "proofValue": {
                        "type": "string"
                      }
                    },
                    "title": "VerifiableProof"
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "description": "Type of signature (NOTE: EcdsaSecp256k1Signature2019, Sr25519Signature2020 are deprecated)",
                          "type": "string",
                          "enum": [
                            "Ed25519Signature2018",
                            "Ed25519Signature2020",
                            "Bls12381BBS+SignatureDock2022",
                            "Bls12381BBS+SignatureProofDock2022",
                            "Bls12381BBDT16MACDock2024",
                            "Bls12381BBSSignatureDock2023",
                            "Bls12381BBSVerificationKeyDock2023",
                            "BJJSignature2021",
                            "EcdsaSecp256k1Signature2019",
                            "Sr25519Signature2020"
                          ],
                          "title": "SigType"
                        },
                        "proofPurpose": {
                          "description": "Purpose of credential",
                          "type": "string",
                          "enum": [
                            "assertionMethod",
                            "authentication"
                          ],
                          "title": "ProofPurpose"
                        },
                        "verificationMethod": {
                          "type": "string"
                        },
                        "created": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "proofValue": {
                          "type": "string"
                        }
                      },
                      "title": "VerifiableProof"
                    }
                  }
                ]
              }
            },
            "title": "VerifiableCredential"
          }
        }
      ]
    },
    "proof": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "description": "Type of signature (NOTE: EcdsaSecp256k1Signature2019, Sr25519Signature2020 are deprecated)",
              "type": "string",
              "enum": [
                "Ed25519Signature2018",
                "Ed25519Signature2020",
                "Bls12381BBS+SignatureDock2022",
                "Bls12381BBS+SignatureProofDock2022",
                "Bls12381BBDT16MACDock2024",
                "Bls12381BBSSignatureDock2023",
                "Bls12381BBSVerificationKeyDock2023",
                "BJJSignature2021",
                "EcdsaSecp256k1Signature2019",
                "Sr25519Signature2020"
              ],
              "title": "SigType"
            },
            "proofPurpose": {
              "description": "Purpose of credential",
              "type": "string",
              "enum": [
                "assertionMethod",
                "authentication"
              ],
              "title": "ProofPurpose"
            },
            "verificationMethod": {
              "type": "string"
            },
            "created": {
              "type": "string",
              "format": "date-time"
            },
            "proofValue": {
              "type": "string"
            }
          },
          "title": "VerifiableProof"
        },
        {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "description": "Type of signature (NOTE: EcdsaSecp256k1Signature2019, Sr25519Signature2020 are deprecated)",
                "type": "string",
                "enum": [
                  "Ed25519Signature2018",
                  "Ed25519Signature2020",
                  "Bls12381BBS+SignatureDock2022",
                  "Bls12381BBS+SignatureProofDock2022",
                  "Bls12381BBDT16MACDock2024",
                  "Bls12381BBSSignatureDock2023",
                  "Bls12381BBSVerificationKeyDock2023",
                  "BJJSignature2021",
                  "EcdsaSecp256k1Signature2019",
                  "Sr25519Signature2020"
                ],
                "title": "SigType"
              },
              "proofPurpose": {
                "description": "Purpose of credential",
                "type": "string",
                "enum": [
                  "assertionMethod",
                  "authentication"
                ],
                "title": "ProofPurpose"
              },
              "verificationMethod": {
                "type": "string"
              },
              "created": {
                "type": "string",
                "format": "date-time"
              },
              "proofValue": {
                "type": "string"
              }
            },
            "title": "VerifiableProof"
          }
        }
      ]
    }
  },
  "title": "VerifiablePresentation"
}
{
  "verified": true,
  "results": [
    {
      "proof": {
        "@context": [
          "https://www.w3.org/2018/credentials/v1",
          "https://www.w3.org/2018/credentials/examples/v1"
        ],
        "type": "Sr25519Signature2020",
        "created": "2022-01-14T19:45:12Z",
        "verificationMethod": "did:cheqd:testnet:f48d2ace-4947-4cb7-8550-1cef3d63e651#keys-1",
        "proofPurpose": "assertionMethod",
        "proofValue": "z7zTs4pVjGyj68WwsnJ6bCoK2CnWFBW5xmSBin7LxcgoYfzET4YXAZcTF9qQBTVhfVC5hK4FUWp9XAedq8Tep8J6"
      },
      "verified": true,
      "verificationMethod": {
        "@context": "https://w3id.org/security/v2",
        "id": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59#keys-1",
        "type": "sec:Sr25519VerificationKey2020",
        "controller": {
          "id": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59",
          "assertionMethod": [
            "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59#keys-1"
          ],
          "authentication": [
            "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59#keys-1"
          ],
          "publicKey": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59#keys-1"
        },
        "publicKeyBase58": "HLc4pieaW9njdLk6zitziVYU7LgVpqKDxDrDRCJCB1er"
      }
    }
  ]
}

Last updated

Was this helpful?