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

fix: make revocation status list inline with the spec #1421

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/anoncreds/src/models/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface AnonCredsRevocationRegistryDefinition {

export interface AnonCredsRevocationStatusList {
issuerId: string
revRegId: string
revRegDefId: string
revocationList: number[]
currentAccumulator: string
timestamp: number
Expand Down
2 changes: 1 addition & 1 deletion packages/anoncreds/tests/anoncreds.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const existingRevocationStatusLists = {
currentAccumulator: 'ab81257c-be63-4051-9e21-c7d384412f64',
issuerId: 'VsKV7grR1BUE29mG2Fm2kX',
revocationList: [1, 0, 1],
revRegId: 'VsKV7grR1BUE29mG2Fm2kX:4:VsKV7grR1BUE29mG2Fm2kX:3:CL:75206:TAG:CL_ACCUM:TAG',
revRegDefId: 'VsKV7grR1BUE29mG2Fm2kX:4:VsKV7grR1BUE29mG2Fm2kX:3:CL:75206:TAG:CL_ACCUM:TAG',
timestamp: 10123,
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/indy-sdk/src/anoncreds/utils/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export function anonCredsRevocationStatusListFromIndySdk(
return {
issuerId: revocationRegistryDefinition.issuerId,
currentAccumulator: delta.value.accum,
revRegId: revocationRegistryDefinitionId,
revRegDefId: revocationRegistryDefinitionId,
revocationList,
timestamp,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ describe('IndySdkAnonCredsRegistry', () => {
issuerId: legacyIssuerId,
currentAccumulator:
'1 0000000000000000000000000000000000000000000000000000000000000000 1 0000000000000000000000000000000000000000000000000000000000000000 2 095E45DDF417D05FB10933FFC63D474548B7FFFF7888802F07FFFFFF7D07A8A8 1 0000000000000000000000000000000000000000000000000000000000000000 1 0000000000000000000000000000000000000000000000000000000000000000 1 0000000000000000000000000000000000000000000000000000000000000000',
revRegId: legacyRevocationRegistryId,
revRegDefId: legacyRevocationRegistryId,
revocationList: [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Expand All @@ -329,7 +329,7 @@ describe('IndySdkAnonCredsRegistry', () => {
issuerId: didIndyIssuerId,
currentAccumulator:
'1 0000000000000000000000000000000000000000000000000000000000000000 1 0000000000000000000000000000000000000000000000000000000000000000 2 095E45DDF417D05FB10933FFC63D474548B7FFFF7888802F07FFFFFF7D07A8A8 1 0000000000000000000000000000000000000000000000000000000000000000 1 0000000000000000000000000000000000000000000000000000000000000000 1 0000000000000000000000000000000000000000000000000000000000000000',
revRegId: didIndyRevocationRegistryId,
revRegDefId: didIndyRevocationRegistryId,
revocationList: [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Expand Down
2 changes: 1 addition & 1 deletion packages/indy-vdr/src/anoncreds/utils/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function anonCredsRevocationStatusListFromIndyVdr(
return {
issuerId: revocationRegistryDefinition.issuerId,
currentAccumulator: delta.accum,
revRegId: revocationRegistryDefinitionId,
revRegDefId: revocationRegistryDefinitionId,
revocationList,
timestamp,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ describe('IndyVdrAnonCredsRegistry', () => {
revocationStatusList: {
issuerId: legacyIssuerId,
currentAccumulator: '1',
revRegId: legacyRevocationRegistryId,
revRegDefId: legacyRevocationRegistryId,
revocationList: [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Expand All @@ -344,7 +344,7 @@ describe('IndyVdrAnonCredsRegistry', () => {
revocationStatusList: {
issuerId: didIndyIssuerId,
currentAccumulator: '1',
revRegId: didIndyRevocationRegistryId,
revRegDefId: didIndyRevocationRegistryId,
revocationList: [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Expand Down