Skip to content

Commit

Permalink
Remove support for legacy OBv3 JFF VCs.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrizagidulin committed Aug 4, 2024
1 parent 7fd95ea commit 88e4eec
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@digitalcredentials/jsonld-signatures": "~11.0.0",
"@digitalcredentials/open-badges-context": "^2.1.0",
"credentials-context": "^2.0.0",
"ed25519-signature-2018-context": "^1.1.0",
"ed25519-signature-2018-context": "^1.1.0"
},
"devDependencies": {
"@digitalbazaar/credentials-examples-context": "^1.0.0",
Expand All @@ -43,8 +43,6 @@
"@digitalbazaar/ed25519-verification-key-2018": "^4.0.0",
"@digitalbazaar/multikey-context": "^1.0.0",
"@digitalbazaar/odrl-context": "^1.0.0",
"@digitalcredentials/ed25519-signature-2020": "^5.0.0",
"@digitalcredentials/security-document-loader": "digitalcredentials/security-document-loader#add-vc-2.0-context",
"@npmcli/package-json": "^5.0.0",
"chai": "^4.3.7",
"cross-env": "^7.0.3",
Expand Down
22 changes: 0 additions & 22 deletions test/10-verify.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@ import {createSkewedTimeStamp} from './helpers.js';
import {CredentialIssuancePurpose} from '../lib/CredentialIssuancePurpose.js';
import {DataIntegrityProof} from '@digitalbazaar/data-integrity';
import {Ed25519Signature2018} from '@digitalbazaar/ed25519-signature-2018';
import {Ed25519Signature2020} from '@digitalcredentials/ed25519-signature-2020';
import {
Ed25519VerificationKey2018
} from '@digitalbazaar/ed25519-verification-key-2018';
import {invalidContexts} from './contexts/index.js';
import jsigs from '@digitalcredentials/jsonld-signatures';
import mockCredentialLegacyObV3 from './mocks/credential-legacy-obv3.js';
import {securityLoader} from '@digitalcredentials/security-document-loader';
import {v4 as uuid} from 'uuid';
import {VeresOneDriver} from 'did-veres-one';
import {versionedCredentials} from './mocks/credential.js';
Expand Down Expand Up @@ -429,25 +426,6 @@ for(const [version, mockCredential] of versionedCredentials) {
result.verified.should.be.true;
});

it('should verify an OBv3 vc', async () => {
const result = await vc.verifyCredential({
credential: mockCredentialLegacyObV3,
suite: new Ed25519Signature2020(),
documentLoader: securityLoader().build()
});

if(result.error) {
throw result.error;
}
result.verified.should.be.true;

result.results[0].log.should.eql([
{id: 'expiration', valid: true},
{id: 'valid_signature', valid: true},
{id: 'issuer_did_resolves', valid: true}
]);
});

it('should verify a vc with a positive status check', async () => {
const credential = mockCredential();
credential['@context'].push({
Expand Down

0 comments on commit 88e4eec

Please sign in to comment.