Credential Verification
Validate Verifiable Credentials using Verification Service.
Supported Languages
Package: @affinidi-tdk/credential-verification-client
npm install @affinidi-tdk/credential-verification-client --save
You can check the latest version of this module on the NPM repository or view the source code at the GitHub repository.
Classes and Methods
Default API
Verify Verifiable Credentials and Verifiable Presentations.
verifyCredentials
Generate and issue a credentil offer to the user.
Parameters
VerifyCredentialInput [Object]
JSON object to provide the Verifiable Credentials to validate.
Example
import { DefaultApi, Configuration, VerifyCredentialInput } from '@affinidi-tdk/credential-verification-client'
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})
const api = new DefaultApi(authConfiguration)
const request: VerifyCredentialInput = {
"verifiableCredentials": [
{
...
}
]
}
const { data } = await api.verifyCredentials(request)
verifyPresentation
Generate and issue a credentil offer to the user.
Parameters
VerifyPresentationInput [Object]
JSON object to provide the Verifiable Presentation to validate.
Example
import { DefaultApi, Configuration, VerifyPresentationInput } from '@affinidi-tdk/credential-verification-client'
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})
const api = new DefaultApi(authConfiguration)
const request: VerifyPresentationInput = {
"verifiablePresentation": {...}
}
const { data } = await api.verifyPresentation(projectId, request)
Was this page helpful?
Glad to hear it! Please tell us how we can improve more.
Sorry to hear that. Please tell us how we can improve.
Thank you for sharing your feedback so we can improve your experience.