Verifying credential
See original GitHub issueHi all,
I am having some trouble trying to issue and verify a credential. Following the markdown of vc-js, i have implemented the code below:
const keyPair = await Ed25519KeyPair.generate();
keyPair.id = "https://4d0db69c3dc4.ngrok.io/api/vc/did.json";
keyPair.controller = "https://4d0db69c3dc4.ngrok.io/api/vc/did.json";
const suite = new Ed25519Signature2018({
verificationMethod: keyPair.id,
key: keyPair
});
// Sample unsigned credential
const credential = {
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1"
],
"id": "https://example.com/credentials/1872",
"type": ["VerifiableCredential", "AlumniCredential"],
"issuer": "https://example.edu/issuers/565049",
"issuanceDate": "2010-01-01T19:23:24Z",
"credentialSubject": {
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
"alumniOf": "Example University"
}
};
const signdVC = await vc.issue({credential, suite});
console.log(JSON.stringify(signdVC, null, 2));
console.log("Verifying...");
// const result = "";
const result = await vc.verifyCredential({credential: signdVC, suite});
console.log(result);
This resulted in a {verified false} and the error: “Error”, “message”: "Document loader unable to load URL "https://4d0db69c3dc4.ngrok.io/api/vc/did.json\“.”
My did.json:
{
"@context": "https://www.w3.org/ns/did/v1",
"id": "did:web:4d0db69c3dc4.ngrok.io:api:vc",
"publicKey": [{
"id": "did:web:4d0db69c3dc4.ngrok.io:api:vc#owner",
"type": "Secp256k1VerificationKey2018",
"owner": "did:web:4d0db69c3dc4.ngrok.io:api:vc",
"ethereumAddress": "0xb9c5714089478a327f09197987f16f9e5d936e8a"
}],
"authentication": [{
"type": "Secp256k1SignatureAuthentication2018",
"publicKey": "did:web:4d0db69c3dc4.ngrok.io:api:vc#owner"
}]
}
My did.json is not correct, I got a similar did from another website and modified it a bit just to test this prototype. I left the context as it was though. I have also tried with https://identity.foundation/.well-known/did.json but with the same error.
Can somebody help me if I am doing something wrong and in what direction i can move to resolve this issue?
Thank you in advance
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (3 by maintainers)
Top Results From Across the Web
How Do I Verify a Credential? - Accredible Help Center
The Credential View Click on the 'Verify' button to the right of the image of the Certificate or Badge. Our system will then...
Read more >Best Practices for Verifying Credentials
Many companies and organizations that need to verify an applicant's credentials – be it education, professional license, driver's license, ...
Read more >Verified Credentials
Trusted Background Screening Services Since 1984. Get fast, accurate background checks, verifications and drug testing at www.verifiedcredentials.com!
Read more >Certification - Verify Credentials - Trailhead - Salesforce
Verify a credential to confirm skills and experience. Or check your account linking status and any upcoming maintenance requirements.
Read more >Credential Verification - Active Screening
Credential verification is how you find out if what's on your applicants resume is really true. Human resource departments nationwide depend on activescre....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you. This is very helpful.
I had progress by the way so if you need any help let me know!