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

Feature/167437546/initial setup #1

Merged
merged 4 commits into from
Jul 23, 2019
Merged

Conversation

mi-xu
Copy link
Contributor

@mi-xu mi-xu commented Jul 22, 2019

This PR is to set up a new library responsible for creating JWTs that adhere to the W3C Verifiable Credentials and Presentation data models.

At the moment, there are 2 functions: createVerifiableCredential() and createPresentation(). Their primary responsibility is to enforce the specs at compile-time through type definitions and runtime validation of the input attributes.

Other functionality to be added may include:

  • verify vcs and presentations
  • builder patterns to construct the data models (alternative to passing in the objects directly)
  • objects to manipulate and query information from a vc or presentation
  • cli commands for performing creating and verifying vcs and presentations
  • tools for working with claim schemas/semantics?
  • functions to convert to/from json[-ld] vcs?

Copy link
Member

@mirceanis mirceanis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Copy link
Member

@awoie awoie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we provide the ability pass the VC @context?

Update: just recognized the feature is there, so the PR is fine by me

Copy link
Member

@awoie awoie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@mi-xu
Copy link
Contributor Author

mi-xu commented Jul 23, 2019

Set up the initial project

  • typescript

  • linting and formatting

  • microbundle for builds

  • jest for testing

  • function to create a Verifiable Credential JWT with required fields

  • function to create a Presentation JWT with required fields

The first iteration of these functions requires the user to supply the entire JWT payload data structure as an input (with type completion). Future iterations will allow also provide runtime validation of the attributes, and improved developer experience by supporting construction through a builder pattern.

Testing

  • added snapshot tests of creating valid JWTs
  • verify that the functionality works correctly in the mouro-client-cli

@mi-xu mi-xu changed the title [WIP] Feature/167437546/initial setup Feature/167437546/initial setup Jul 23, 2019
@mi-xu mi-xu merged commit 0bbd806 into master Jul 23, 2019
@mi-xu mi-xu deleted the feature/167437546/initial-setup branch July 23, 2019 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants