TBD54566975 / web5-spec

Web5 Spec
https://tbd54566975.github.io/web5-spec/
Apache License 2.0
7 stars 5 forks source link

Create a new test vector for invalid issuer #117

Closed nitro-neal closed 6 months ago

nitro-neal commented 7 months ago
      const issuerDid = await DidDht.create();

      const vc = await VerifiableCredential.create({
        type    : 'StreetCred',
        issuer  : 'did:fakeissuer:123',
        subject : 'did:subject:123',
        data    : new StreetCredibility('high', true),
      });

      const vcJwt = await vc.sign({ did: issuerDid });

      await VerifiableCredential.verify({ vcJwt });

image

Make sure that this fails verify() if the issuer is not the same as the issuer in the vc payload