MyInfo VC Verifier aims to simplify consumer's integration effort with MyInfoBiz Corporate VC. This package provides the functionality to verify a verifiable credential using @mattrglobal jsonld-signatures-bbs.
To install via NPM:
npm install myinfo-vc-verifier
var MyInfoVcVerifier = require('myinfo-vc-verifier');
This method takes in the verifiable credential to verify and return true/false.
/**
* [Verify Verifiable Credential]
* @param {Object} signedDocument [signed verifiable credential OR signed verifiable Presentation]
* @param {Object} OPTIONAL: Array of context object [context object]
* @return {Promise} Promise object represents verification result [verified status]
*/
MyInfoVcVerifier.verify(signedDocument, customDocuments) // { verified: true, results: [ { proof: [Object], verified: true } ] }
Performs revocation status checks on the VC's credentialStatus and return true/false.
/**
* [Get Revoke Status]
* @param {Object} signedVC [verifiable credential]
* @param {Object} OPTIONAL - opts: {"refreshCache": true | false} Default to false
* @return {Promise} Promise object represents Boolean [the revoke status]
*/
MyInfoVcVerifier.getRevokeStatus(signedVC, opts) // true/false
Generates signature for code challenges. Returns String.
/**
* [Ethereum Signing Message]
* @param {Object} privateKey [the private key]
* @param {Object} message [the message]
* @return {String} [the signature]
*/
MyInfoVcVerifier.ethereumSign(privateKey, message);
You may contact our support for any other technical issues, and we will respond to you within 5 working days.