TBD54566975 / web5-kt

Apache License 2.0
7 stars 9 forks source link

Update create vector #294

Open nitro-neal opened 3 months ago

nitro-neal commented 3 months ago

Overview

Updated the way VerifiableCredential.create() works

Description

The input are the fields for the actual input fields of a vc with the VerifiableCredential.create() method. The output is the comparison of the VcDataModel object to what is expected.

Web5-Spec changes - https://github.com/TBD54566975/web5-spec/pull/149 Example test vector:

      "description":"valid simple credential",
      "input":{
        "credential":{
          "type":"SimpleCred",
          "issuer":"did:example:issuer",
          "subject":"did:example:subject",
          "credentialSubject":{
            "legit":true
          }
        }
      },
      "output":{
        "@context":[
          "https://www.w3.org/2018/credentials/v1"
        ],
        "type":[
          "VerifiableCredential",
          "SimpleCred"
        ],
        "id":"urn:uuid:ea74b564-fbe0-4b80-bd60-cd465d433e12",
        "issuer":"did:example:issuer",
        "credentialSubject":{
          "id":"did:example:subject",
          "legit":true
        }
      }
    },