decentralized-identity / decentralized-identity/web5-js

Change validateDefinition and validateSubmission to throw error and remove Results object

Open
#427 0 comments 0 reactions 1 assignee Claimed by @nitro-neal View on GitHub
package: credentials w3c-vc-dm-2.0
Dominant language
TypeScript
Stars
142
Forks
56
PR merge metrics
No merged PRs in 30d

Description

Change these functions:

```js
PresentationExchange.validateDefinition({ presentationDefinition })
PresentationExchange.validateSubmission({ presentationSubmission })
```

to throw an exception rather than return a results object if there is a problem with the submission or definition.

Optionally can refactor to:
```js
PresentationExchange.validate(PresentationDefinition | PresentationSubmission)
```

to make the api surface area even smaller

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.