dhiway / cord-agent-app-v1

Agent (REST API endpoint) for cord.js sdk
Apache License 2.0
9 stars 7 forks source link

RFE: Prepare VP from 'request' -> 'submit' flow #14

Open amarts opened 2 years ago

amarts commented 2 years ago

As a holder of verifiable credentials, I should be able to respond to a request by submitting a verifiable presentation, with only fields asked in request (selective disclosure), from the asked Issuers.

ishivanshgoel commented 2 years ago

As demonstrated in the demo-vs.js, a new schema and a stream are getting created before creating a verifiable credential.

For this endpoint, what should be the flow?

  1. Getting only schema and space identifiers in the request body and getting their corresponding entities from DB to form a VC.
  2. Getting whole schema properties in the request body and creating a new schema.

And the vc holder's address should be in the request body as well right?

amarts commented 2 years ago

The flow is something like below:

  1. Schema is anchored by policy makers. It is agreed upon by everyone 'issuing' VCs.
  2. Space is created by orgs/entities about to issue VC as per their convenience (about how they group). Can be done by entity admin.
  3. The issuer of VC would use the above anchored reference (only space and schema identifiers) while issuing the VC.

Now, coming to this issue:

the assumption is, the 'holder' entity already has the VC json with them, and is preparing a VP from VC. The flow is mostly important for verifier to holder communcations.