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

Add credential schema #301

Merged
merged 1 commit into from
Apr 19, 2024
Merged

Add credential schema #301

merged 1 commit into from
Apr 19, 2024

Conversation

nitro-neal
Copy link
Contributor

Implement Credential Schema

A credential schema defines the structure and content of the data, enabling verifiers to assess if the data adheres to the established schema.

https://www.w3.org/TR/vc-data-model/#data-schemas

  • Add CredentialSchema type
  • Add optional field to VcCreateOptions
  • Update KYC unit test to have latest kyc cred

@codecov-commenter
Copy link

Codecov Report

Merging #301 (ca0ef94) into main (bf27a24) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #301      +/-   ##
==========================================
+ Coverage   73.54%   73.58%   +0.04%     
==========================================
  Files          45       45              
  Lines        2158     2162       +4     
  Branches      401      402       +1     
==========================================
+ Hits         1587     1591       +4     
  Misses        376      376              
  Partials      195      195              
Components Coverage Δ
credentials 81.27% <100.00%> (+0.14%) ⬆️
crypto 49.16% <ø> (ø)
dids 80.50% <ø> (ø)
common 65.21% <ø> (ø)

expirationDate = expirationCalendar.time,
data = KnownCustomerCredential(id = subjectDid.uri, country_of_residence = "US", tier = "Tier 1"),
credentialSchema = CredentialSchema(
id = "https://schema.org/PFI",
Copy link
Member

Choose a reason for hiding this comment

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

we should use a real schema here and update the verification logic to resolve and verify the json schema against the credential

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Verification pr will be coming next 👍

Copy link
Member

@decentralgabe decentralgabe left a comment

Choose a reason for hiding this comment

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

approving to unblock merge, noting verification will come in a separate pr

@nitro-neal nitro-neal merged commit 9023afa into main Apr 19, 2024
8 checks passed
@nitro-neal nitro-neal deleted the add-credential-schema branch April 19, 2024 16:53
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