diff --git a/tests/10-vc-di.js b/tests/10-vc-di.js index 36af09a..6cd9e00 100644 --- a/tests/10-vc-di.js +++ b/tests/10-vc-di.js @@ -2,13 +2,12 @@ * Copyright (c) 2022 Digital Bazaar, Inc. All rights reserved. */ import { - createInitialVc, createRequestBody, testBadRequestError } from './helpers.js'; import chai from 'chai'; +import {ed25519Vector} from './vectors.js'; import {filterByTag} from 'vc-test-suite-implementations'; -import {issuerName} from './test-config.js'; import {klona} from 'klona'; const should = chai.should(); @@ -18,10 +17,6 @@ const tag = 'vc-api'; const { match: matchingVerifiers } = filterByTag({property: 'verifiers', tags: [tag]}); -const {match: matchingIssuers} = filterByTag({ - property: 'issuers', - tags: [tag] -}); describe('Verify Credential - Data Integrity', function() { const summaries = new Set(); @@ -40,12 +35,7 @@ describe('Verify Credential - Data Integrity', function() { const verifier = verifiers.find( verifier => verifier.tags.has(tag)); describe(verifierName, function() { - let validVc; - before(async function() { - const issuer = matchingIssuers.get(issuerName).issuers.find( - issuer => issuer.tags.has('vc-api')); - validVc = await createInitialVc({issuer}); - }); + const validVc = ed25519Vector; it('MUST verify a valid VC.', async function() { // this tells the test report which cell in the interop matrix // the result goes in diff --git a/tests/vectors.js b/tests/vectors.js new file mode 100644 index 0000000..cf9fe03 --- /dev/null +++ b/tests/vectors.js @@ -0,0 +1,37 @@ +/*! + * Copyright (c) 2024 Digital Bazaar, Inc. All rights reserved. + */ +/* Note: This file contains data generated from the vc-di-ecdsa specification +test vectors. */ + +/* eslint-disable max-len */ +/* eslint-disable quote-props */ +/* eslint-disable quotes */ + +export const ed25519Vector = { + "@context": [ + "https://www.w3.org/ns/credentials/v2", + "https://www.w3.org/ns/credentials/examples/v2", + "https://w3id.org/security/suites/ed25519-2020/v1" + ], + "id": "urn:uuid:58172aac-d8ba-11ed-83dd-0b3aef56cc33", + "type": [ + "VerifiableCredential", + "AlumniCredential" + ], + "name": "Alumni Credential", + "description": "A minimum viable example of an Alumni Credential.", + "issuer": "https://vc.example/issuers/5678", + "validFrom": "2023-01-01T00:00:00Z", + "credentialSubject": { + "id": "did:example:abcdefgh", + "alumniOf": "The School of Examples" + }, + "proof": { + "type": "Ed25519Signature2020", + "created": "2023-02-24T23:36:38Z", + "verificationMethod": "did:key:z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2#z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2", + "proofPurpose": "assertionMethod", + "proofValue": "z57Mm1vboMtZiCyJ4aReZsv8co4Re64Y8GEjL1ZARzMbXZgkARFLqFs1P345NpPGG2hgCrS4nNdvJhpwnrNyG3kEF" + } +};