Skip to content

Commit

Permalink
Merge pull request #191 from identity-com/develop
Browse files Browse the repository at this point in the history
Updated to support issuer DIDs
  • Loading branch information
explicit-projects authored May 17, 2022
2 parents c5310e3 + e0b2238 commit 276d074
Show file tree
Hide file tree
Showing 65 changed files with 12,225 additions and 3,982 deletions.
28 changes: 0 additions & 28 deletions .babelrc

This file was deleted.

8 changes: 5 additions & 3 deletions __integrations__/credentials/VerifiableCredential.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ const { Claim } = require('../../src/claim/Claim');
const VC = require('../../src/creds/VerifiableCredential');
const { schemaLoader, CVCSchemaLoader } = require('../../src');

const credentialSubject = 'did:sol:J2vss1hB3kgEfQMSSdvvjwRm3JdyFWp7S7dbX5mudS4V';

jest.setTimeout(200000);

describe('Integration Tests for Verifiable Credentials', () => {
Expand All @@ -19,7 +21,7 @@ describe('Integration Tests for Verifiable Credentials', () => {
{ givenNames: 'Joao', otherNames: 'Barbosa', familyNames: 'Santos' });

const dob = await Claim.create('claim-cvc:Identity.dateOfBirth-v1', { day: 20, month: 3, year: 1978 });
const cred = await VC.create('credential-cvc:Identity-v1', uuidv4(), null, [name, dob], 1);
const cred = await VC.create('credential-cvc:Identity-v3', uuidv4(), null, credentialSubject, [name, dob]);
return cred.requestAnchor().then((updated) => {
expect(updated.proof.anchor.type).toBe('temporary');
expect(updated.proof.anchor.value).not.toBeDefined();
Expand All @@ -34,7 +36,7 @@ describe('Integration Tests for Verifiable Credentials', () => {
{ givenNames: 'Joao', otherNames: 'Barbosa', familyNames: 'Santos' });

const dob = await Claim.create('claim-cvc:Identity.dateOfBirth-v1', { day: 20, month: 3, year: 1978 });
const cred = await VC.create('credential-cvc:Identity-v1', uuidv4(), null, [name, dob], 1);
const cred = await VC.create('credential-cvc:Identity-v3', uuidv4(), null, credentialSubject, [name, dob]);
return cred.requestAnchor().then((updated) => {
expect(updated.proof.anchor).toBeDefined();
return updated.updateAnchor().then((newUpdated) => {
Expand All @@ -50,7 +52,7 @@ describe('Integration Tests for Verifiable Credentials', () => {
{ givenNames: 'Joao', otherNames: 'Barbosa', familyNames: 'Santos' });

const dob = await Claim.create('claim-cvc:Identity.dateOfBirth-v1', { day: 20, month: 3, year: 1978 });
const cred = await VC.create('credential-cvc:Identity-v1', uuidv4(), null, [name, dob], 1);
const cred = await VC.create('credential-cvc:Identity-v3', uuidv4(), null, credentialSubject, [name, dob]);
await cred.requestAnchor();
await cred.updateAnchor();
const validation = await cred.verifyAttestation();
Expand Down
594 changes: 361 additions & 233 deletions __test__/creds/VerifiableCredential.test.js

Large diffs are not rendered by default.

Loading

0 comments on commit 276d074

Please sign in to comment.