Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve usePresentationRequest example #704

Open
alegomes opened this issue Aug 21, 2024 · 0 comments
Open

Improve usePresentationRequest example #704

alegomes opened this issue Aug 21, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@alegomes
Copy link
Contributor

Is your feature request related to a problem? Please describe.

The example provided in the /wallet-api/wallet/{wallet}/exchange/usePresentationRequest endpoint is not instructive enough for a first-time user.

The did field is easy to guess. But, what about the presentationRequest, the selectedCredentials or the disclosures fields?

{
  "did": "string",
  "presentationRequest": "string",
  "selectedCredentials": [
    "string"
  ],
  "disclosures": {
    "additionalProp1": [
      "string"
    ],
    "additionalProp2": [
      "string"
    ],
    "additionalProp3": [
      "string"
    ]
  },
  "note": "string"
}

I think there is room for improvement. The way it is it's more a spec reference than an example.

Describe the solution you'd like

Suggestion based on the docs.

{
  // DID of user for signature generation
  "did": "did:xxx:xxxxx",
   // response from previous call to resolvePresentationRequest 
  "presentationRequest": "openid4vp://...",
   // List of credential id's to share
  "selectedCredentials": [
    "urn:uuid:0382f5fb...56db2d07683e"
  ],
  // Some explanation
  "disclosures": {
     "urn:uuid:9b2ea981-0501-4de2-b2f9-c886a6cbb143" : ["WyJiZ1I5OTdnRUVRNEU5bFpXNEhwVjRRPT0iLCJuYW1lIiwiSkZGIHggdmMtZWR1IFBsdWdGZXN0IDMgSW50ZXJvcGVyYWJpbGl0eSJd"]
  },
  "note": "a note for what?"
}
@alegomes alegomes added the enhancement New feature or request label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant