Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Kenyon <[email protected]>
  • Loading branch information
TheTreek committed Apr 21, 2022
1 parent 669cee4 commit b29efea
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ export class RevocationService {
): Promise<void> {
this.logger.info('Processing revocation notification v1', { message: messageContext.message })
// ThreadID = indy::<revocation_registry_id>::<credential_revocation_id>
const threadRegex = /(indy)::((?:[\dA-z]{21,22}):4:(?:[\dA-z]{21,22}):3:[Cc][Ll]:(?:(?:[1-9][0-9]*)|(?:[\dA-z]{21,22}:2:.+:[0-9.]+))(?::[\dA-z]+)?:CL_ACCUM:(?:[\dA-z-]+))::(\d+)$/
const threadRegex =
/(indy)::((?:[\dA-z]{21,22}):4:(?:[\dA-z]{21,22}):3:[Cc][Ll]:(?:(?:[1-9][0-9]*)|(?:[\dA-z]{21,22}:2:.+:[0-9.]+))(?::[\dA-z]+)?:CL_ACCUM:(?:[\dA-z-]+))::(\d+)$/
const threadId = messageContext.message.issueThread
try {
const threadIdGroups = threadId.match(threadRegex)
Expand Down Expand Up @@ -95,7 +96,8 @@ export class RevocationService {
): Promise<void> {
this.logger.info('Processing revocation notification v2', { message: messageContext.message })
// CredentialId = <revocation_registry_id>::<credential_revocation_id>
const credentialIdRegex = /((?:[\dA-z]{21,22}):4:(?:[\dA-z]{21,22}):3:[Cc][Ll]:(?:(?:[1-9][0-9]*)|(?:[\dA-z]{21,22}:2:.+:[0-9.]+))(?::[\dA-z]+)?:CL_ACCUM:(?:[\dA-z-]+))::(\d+)$/
const credentialIdRegex =
/((?:[\dA-z]{21,22}):4:(?:[\dA-z]{21,22}):3:[Cc][Ll]:(?:(?:[1-9][0-9]*)|(?:[\dA-z]{21,22}:2:.+:[0-9.]+))(?::[\dA-z]+)?:CL_ACCUM:(?:[\dA-z-]+))::(\d+)$/
const credentialId = messageContext.message.credentialId
try {
const credentialIdGroups = credentialId.match(credentialIdRegex)
Expand Down

0 comments on commit b29efea

Please sign in to comment.