vc-api icon indicating copy to clipboard operation
vc-api copied to clipboard

Add examples showing an exchange client sending different VPRs with only `acceptedCryptosuites` or `acceptedEnvelopes`

Open dlongley opened this issue 1 year ago • 1 comments

In the examples, each with VPR should accept any VC that will have one or more matching cryptosuites, per "acceptedCryptosuites", or one matching envelope per "acceptedEnvelopes".

The example should show that a client (e.g., wallet) can start an exchange (if the server supports it) by sending a VPR indicating what they will accept instead of an empty object ({}):

// in this example, the client will accept a number of options from the issuer
{
  "verifiablePresentationRequest": {
    "query": {
      "type": "QueryByExample",
      // allows any VC(s) from the issuer, so no specific "credentialQuery" property;
      // "credentialQuery" ... not present
      "acceptedCryptosuites": [
        "Ed25519Signature2020",
        "eddsa-rdfc-2022",
        "ecdsa-rdfc-2019",
        "bbs-2023",
        "ecdsa-sd-2023"
      ],
      "acceptedEnvelopes": [
        "application/jwt"
      ]
    }
  }
}
// in this example, the client will accept only an enveloped VC using VC-JWT
{
  "verifiablePresentationRequest": {
    "query": {
      "type": "QueryByExample",
      // allows any VC(s) from the issuer, so no specific "credentialQuery" property;
      // "credentialQuery" ... not present
      "acceptedEnvelopes": [
        "application/jwt"
      ]
    }
  }
}

dlongley avatar Jul 16 '24 18:07 dlongley