-
Notifications
You must be signed in to change notification settings - Fork 57
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
Updates to status list 2021 PR #486
Updates to status list 2021 PR #486
Conversation
|
*/ | ||
export type StatusListCredentialCreateOptions = { | ||
statusListCredentialId: string, | ||
issuer: string, | ||
statusPurpose: StatusPurpose, | ||
issuedCredentials: VerifiableCredential[] | ||
revokedCredentials: VerifiableCredential[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A credential can be revoked, suspeneded, or any other word actually. Status Purpose should actually probably just be a string.
so maybe a better name is includedCredentials
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, though the action of suspend or revoke result in the same bit flip to 1, this would probably go away if you decide to take my other PR suggestion of have revoke()
, for now I'll rename to credentialsToDisable
. Happy to discuss but I don't think includedCredentials
is it.
const statusListIndexes: string[] = this.prepareCredentialsForStatusList(statusPurpose, issuedCredentials); | ||
const bitString = this.bitstringGeneration(statusListIndexes); | ||
const { statusListCredentialId, issuer, statusPurpose, revokedCredentials } = options; | ||
const indexOfCredentialsToRevoke: number[] = this.validateStatusListEntryIndexesAreAllUnique(statusPurpose, revokedCredentials); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const indexOfCredentialsToRevoke: number[] = this.validateStatusListEntryIndexesAreAllUnique(statusPurpose, revokedCredentials); | |
const indexsOfCredentialsToRevoke: number[] = this.validateStatusListEntryIndexesAreAllUnique(statusPurpose, revokedCredentials); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, done!
*/ | ||
export interface StatusList2021Entry extends ICredentialStatus { | ||
export interface CredentialStatusModel { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following our spec, and for clarity I think it should e called StatusList2021Entry
https://github.com/TBD54566975/web5-spec/blob/main/spec/vc.md
There is a different credStatusModel that will be for vc data model 2.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted! I had strong opinion on this, but you win on this one! We can chat about it next week.
Looks good, little nits, and we can sync on some nuances next week if needed. Thanks for this! |
* status list cred impl * pnpm install * fix linter * test vector * update * update * Updates to status list 2021 PR (#486) * updates * updates * updating timeout * updates * add changeset * update * Delete packages/credentials/.vscode/settings.json * update * update * lint * update * lint * doc warning * Exported status list related libs * Docs --------- Co-authored-by: Henry Tsai <henrytsai@outlook.com>
No description provided.