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

Initial implementation of a database status manager #1

Merged
merged 33 commits into from
Sep 4, 2024

Conversation

kezike
Copy link
Collaborator

@kezike kezike commented Jan 31, 2024

This PR addresses digitalcredentials/credential-status-manager-git#22, by adding support for a database status manager.

…goDB credential status manager methods; refines base credential status manager methods; adds and throws additional error types
…entialSiteOrigin and makes it required; removes deployStatusCredentialWebsite method; improves error handling
…asePassword as required config options; refactors hasAuthority; adds code to error classes
@kezike kezike requested a review from jchartrand January 31, 2024 17:39
Copy link
Contributor

@jchartrand jchartrand left a comment

Choose a reason for hiding this comment

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

Looks great! Amazingly comprehensive error checking.

…abaseTablesProperlyConfigured to getDatabaseState; adds check in getDatabaseState for match between value of statusCredentialSiteOrigin property in createStatusManager and preexisting value thereof in config database table; returns error message in getDatabaseState; adds support for undefined status credential ID in getStatusCredential; fixes update logic for allCredentialsIssuedCounter; changes read concern for database transactions from majority to local; implements WriteConflictError in order to enable continued attempts of update transactions; adds minor copy updates to variable names and comments
…st-test scripts; renames embedCredentialStatus to attachCredentialStatus; adds newUserCredential field to attachCredentialStatus output type in order to prevent unnecessary event creations; improves error reporting for mismatches in credential accounting; moves generateStatusCredentialId implementation back to class method; updates lint rules; fixes lint errors
… from vc 1 to vc 2; validates credential as vc 1 or vc 2 during status allocation; updates interface of allocateStatus to be accept an object parameter with credential and statusPurpose; implements allocateRevocationStatus; implements revokeCredential; implements allocateSuspensionStatus; implements suspendCredential; removes credentialStatus and proof properties from credential during status allocation; signs credentials in tests; updates license info
@dmitrizagidulin
Copy link
Member

PR looks good, though please use jsdoc style function comments (instead of the current // style).

kezike added 12 commits March 12, 2024 08:30
…s allocateStatus method to accept an array of purposes instead of a single purpose; replaces credentialState with statusPurpose and invalidate in updateStatus input; replaces checkStatus with getStatus; adds full support for allocating and updating multiple status purposes
…cordById for untracked ids; implements getCredentialInfo as alias for getUserCredentialRecordById; renames allocateAllStatuses to allocateSupportedStatuses
… and explains credential counter check in getDatabaseState
@alexfigtree
Copy link
Member

This PR is waiting on changes from @jchartrand and should not be merged yet.

@jchartrand jchartrand merged commit d0a3ad9 into main Sep 4, 2024
2 checks passed
@alexfigtree
Copy link
Member

Done, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done (Deployed)
Development

Successfully merging this pull request may close these issues.

4 participants