@aries-framework/anoncreds
Advanced tools
Comparing version 0.5.0-alpha.86 to 0.5.0-alpha.87
@@ -16,1 +16,2 @@ import 'reflect-metadata'; | ||
export { storeLinkSecret } from './utils/linkSecret'; | ||
export { dateToTimestamp } from './utils'; |
@@ -17,3 +17,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.storeLinkSecret = exports.assertBestPracticeRevocationInterval = exports.generateLegacyProverDidLikeString = exports.AnonCredsApi = exports.AnonCredsModuleConfig = exports.AnonCredsModule = void 0; | ||
exports.dateToTimestamp = exports.storeLinkSecret = exports.assertBestPracticeRevocationInterval = exports.generateLegacyProverDidLikeString = exports.AnonCredsApi = exports.AnonCredsModuleConfig = exports.AnonCredsModule = void 0; | ||
require("reflect-metadata"); | ||
@@ -40,2 +40,4 @@ __exportStar(require("./models"), exports); | ||
Object.defineProperty(exports, "storeLinkSecret", { enumerable: true, get: function () { return linkSecret_1.storeLinkSecret; } }); | ||
var utils_1 = require("./utils"); | ||
Object.defineProperty(exports, "dateToTimestamp", { enumerable: true, get: function () { return utils_1.dateToTimestamp; } }); | ||
//# sourceMappingURL=index.js.map |
@@ -36,5 +36,5 @@ export interface AnonCredsSchema { | ||
revRegDefId: string; | ||
revocationList: number[]; | ||
revocationList: Array<number>; | ||
currentAccumulator: string; | ||
timestamp: number; | ||
} |
@@ -1,2 +0,2 @@ | ||
import type { AnonCredsOperationStateWait, AnonCredsOperationStateFailed, AnonCredsOperationStateFinished, AnonCredsResolutionMetadata, Extensible } from './base'; | ||
import type { AnonCredsOperationStateWait, AnonCredsOperationStateFailed, AnonCredsOperationStateFinished, AnonCredsResolutionMetadata, Extensible, AnonCredsOperationStateAction } from './base'; | ||
import type { AnonCredsRevocationRegistryDefinition } from '../../models/registry'; | ||
@@ -13,2 +13,6 @@ export interface GetRevocationRegistryDefinitionReturn { | ||
} | ||
export interface RegisterRevocationRegistryDefinitionReturnStateAction extends AnonCredsOperationStateAction { | ||
revocationRegistryDefinition: AnonCredsRevocationRegistryDefinition; | ||
revocationRegistryDefinitionId: string; | ||
} | ||
export interface RegisterRevocationRegistryDefinitionReturnStateFailed extends AnonCredsOperationStateFailed { | ||
@@ -18,2 +22,6 @@ revocationRegistryDefinition?: AnonCredsRevocationRegistryDefinition; | ||
} | ||
export interface RegisterRevocationRegistryDefinitionReturnStateWait extends AnonCredsOperationStateWait { | ||
revocationRegistryDefinition?: AnonCredsRevocationRegistryDefinition; | ||
revocationRegistryDefinitionId?: string; | ||
} | ||
export interface RegisterRevocationRegistryDefinitionReturnStateFinished extends AnonCredsOperationStateFinished { | ||
@@ -23,11 +31,7 @@ revocationRegistryDefinition: AnonCredsRevocationRegistryDefinition; | ||
} | ||
export interface RegisterRevocationRegistryDefinitionReturnState extends AnonCredsOperationStateWait { | ||
revocationRegistryDefinition?: AnonCredsRevocationRegistryDefinition; | ||
revocationRegistryDefinitionId?: string; | ||
} | ||
export interface RegisterRevocationRegistryDefinitionReturn { | ||
jobId?: string; | ||
revocationRegistryDefinitionState: RegisterRevocationRegistryDefinitionReturnStateFailed | RegisterRevocationRegistryDefinitionReturnStateFinished | RegisterRevocationRegistryDefinitionReturnState; | ||
revocationRegistryDefinitionState: RegisterRevocationRegistryDefinitionReturnStateWait | RegisterRevocationRegistryDefinitionReturnStateAction | RegisterRevocationRegistryDefinitionReturnStateFailed | RegisterRevocationRegistryDefinitionReturnStateFinished; | ||
revocationRegistryDefinitionMetadata: Extensible; | ||
registrationMetadata: Extensible; | ||
} |
@@ -1,3 +0,4 @@ | ||
import type { AnonCredsOperationStateWait, AnonCredsOperationStateFailed, AnonCredsOperationStateFinished, AnonCredsResolutionMetadata, Extensible } from './base'; | ||
import type { AnonCredsOperationStateWait, AnonCredsOperationStateFailed, AnonCredsOperationStateFinished, AnonCredsResolutionMetadata, Extensible, AnonCredsOperationStateAction } from './base'; | ||
import type { AnonCredsRevocationStatusList } from '../../models/registry'; | ||
import type { Optional } from '@aries-framework/core'; | ||
export interface GetRevocationStatusListReturn { | ||
@@ -8,23 +9,25 @@ revocationStatusList?: AnonCredsRevocationStatusList; | ||
} | ||
export type AnonCredsRevocationStatusListWithoutTimestamp = Omit<AnonCredsRevocationStatusList, 'timestamp'>; | ||
export type AnonCredsRevocationStatusListWithOptionalTimestamp = Optional<AnonCredsRevocationStatusList, 'timestamp'>; | ||
export interface RegisterRevocationStatusListOptions { | ||
revocationStatusList: Omit<AnonCredsRevocationStatusList, 'timestamp'>; | ||
revocationStatusList: AnonCredsRevocationStatusListWithoutTimestamp; | ||
options: Extensible; | ||
} | ||
export interface RegisterRevocationStatusListReturnStateAction extends AnonCredsOperationStateAction { | ||
revocationStatusList: AnonCredsRevocationStatusListWithOptionalTimestamp; | ||
} | ||
export interface RegisterRevocationStatusListReturnStateFailed extends AnonCredsOperationStateFailed { | ||
revocationStatusList?: AnonCredsRevocationStatusList; | ||
timestamp?: string; | ||
revocationStatusList?: AnonCredsRevocationStatusListWithOptionalTimestamp; | ||
} | ||
export interface RegisterRevocationStatusListReturnStateWait extends AnonCredsOperationStateWait { | ||
revocationStatusList?: AnonCredsRevocationStatusListWithOptionalTimestamp; | ||
} | ||
export interface RegisterRevocationStatusListReturnStateFinished extends AnonCredsOperationStateFinished { | ||
revocationStatusList: AnonCredsRevocationStatusList; | ||
timestamp: string; | ||
} | ||
export interface RegisterRevocationStatusListReturnState extends AnonCredsOperationStateWait { | ||
revocationStatusList?: AnonCredsRevocationStatusList; | ||
timestamp?: string; | ||
} | ||
export interface RegisterRevocationStatusListReturn { | ||
jobId?: string; | ||
revocationStatusListState: RegisterRevocationStatusListReturnStateFailed | RegisterRevocationStatusListReturnStateFinished | RegisterRevocationStatusListReturnState; | ||
revocationStatusListState: RegisterRevocationStatusListReturnStateWait | RegisterRevocationStatusListReturnStateAction | RegisterRevocationStatusListReturnStateFailed | RegisterRevocationStatusListReturnStateFinished; | ||
revocationStatusListMetadata: Extensible; | ||
registrationMetadata: Extensible; | ||
} |
@@ -11,4 +11,4 @@ export declare const unqualifiedSchemaIdRegex: RegExp; | ||
export declare function getUnqualifiedSchemaId(unqualifiedDid: string, name: string, version: string): string; | ||
export declare function getUnqualifiedCredentialDefinitionId(unqualifiedDid: string, seqNo: string | number, tag: string): string; | ||
export declare function getUnqualifiedRevocationRegistryId(unqualifiedDid: string, seqNo: string | number, credentialDefinitionTag: string, revocationRegistryTag: string): string; | ||
export declare function getUnqualifiedCredentialDefinitionId(unqualifiedDid: string, schemaSeqNo: string | number, tag: string): string; | ||
export declare function getUnqualifiedRevocationRegistryDefinitionId(unqualifiedDid: string, schemaSeqNo: string | number, credentialDefinitionTag: string, revocationRegistryTag: string): string; | ||
export declare function isUnqualifiedCredentialDefinitionId(credentialDefinitionId: string): boolean; | ||
@@ -15,0 +15,0 @@ export declare function isUnqualifiedRevocationRegistryId(revocationRegistryId: string): boolean; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parseIndyRevocationRegistryId = exports.parseIndyCredentialDefinitionId = exports.parseIndySchemaId = exports.parseIndyDid = exports.isDidIndyRevocationRegistryId = exports.isDidIndyCredentialDefinitionId = exports.isDidIndySchemaId = exports.isUnqualifiedSchemaId = exports.isUnqualifiedRevocationRegistryId = exports.isUnqualifiedCredentialDefinitionId = exports.getUnqualifiedRevocationRegistryId = exports.getUnqualifiedCredentialDefinitionId = exports.getUnqualifiedSchemaId = exports.didIndyRegex = exports.didIndyRevocationRegistryIdRegex = exports.unqualifiedRevocationRegistryIdRegex = exports.didIndyCredentialDefinitionIdRegex = exports.unqualifiedCredentialDefinitionIdRegex = exports.unqualifiedIndyDidRegex = exports.unqualifiedSchemaVersionRegex = exports.didIndySchemaIdRegex = exports.unqualifiedSchemaIdRegex = void 0; | ||
exports.parseIndyRevocationRegistryId = exports.parseIndyCredentialDefinitionId = exports.parseIndySchemaId = exports.parseIndyDid = exports.isDidIndyRevocationRegistryId = exports.isDidIndyCredentialDefinitionId = exports.isDidIndySchemaId = exports.isUnqualifiedSchemaId = exports.isUnqualifiedRevocationRegistryId = exports.isUnqualifiedCredentialDefinitionId = exports.getUnqualifiedRevocationRegistryDefinitionId = exports.getUnqualifiedCredentialDefinitionId = exports.getUnqualifiedSchemaId = exports.didIndyRegex = exports.didIndyRevocationRegistryIdRegex = exports.unqualifiedRevocationRegistryIdRegex = exports.didIndyCredentialDefinitionIdRegex = exports.unqualifiedCredentialDefinitionIdRegex = exports.unqualifiedIndyDidRegex = exports.unqualifiedSchemaVersionRegex = exports.didIndySchemaIdRegex = exports.unqualifiedSchemaIdRegex = void 0; | ||
const core_1 = require("@aries-framework/core"); | ||
@@ -16,3 +16,3 @@ const didIndyAnonCredsBase = /(did:indy:((?:[a-z][_a-z0-9-]*)(?::[a-z][_a-z0-9-]*)?):([1-9A-HJ-NP-Za-km-z]{21,22}))\/anoncreds\/v0/; | ||
exports.didIndyCredentialDefinitionIdRegex = new RegExp(`^${didIndyAnonCredsBase.source}/CLAIM_DEF/([1-9][0-9]*)/(.+)$`); | ||
// <namespaceIdentifier>:4:<schemaSeqNo>:3:CL:<credentialDefinitionTag>:CL_ACCUM:<revocationRegistryTag> | ||
// <namespaceIdentifier>:4:<namespaceIdentifier>:3:CL:<schemaSeqNo>:<credentialDefinitionTag>:CL_ACCUM:<revocationRegistryTag> | ||
exports.unqualifiedRevocationRegistryIdRegex = /^([a-zA-Z0-9]{21,22}):4:[a-zA-Z0-9]{21,22}:3:CL:([1-9][0-9]*):(.+):CL_ACCUM:(.+)$/; | ||
@@ -26,11 +26,11 @@ // did:indy:<namespace>:<namespaceIdentifier>/anoncreds/v0/REV_REG_DEF/<schemaSeqNo>/<credentialDefinitionTag>/<revocationRegistryTag> | ||
exports.getUnqualifiedSchemaId = getUnqualifiedSchemaId; | ||
function getUnqualifiedCredentialDefinitionId(unqualifiedDid, seqNo, tag) { | ||
return `${unqualifiedDid}:3:CL:${seqNo}:${tag}`; | ||
function getUnqualifiedCredentialDefinitionId(unqualifiedDid, schemaSeqNo, tag) { | ||
return `${unqualifiedDid}:3:CL:${schemaSeqNo}:${tag}`; | ||
} | ||
exports.getUnqualifiedCredentialDefinitionId = getUnqualifiedCredentialDefinitionId; | ||
// TZQuLp43UcYTdtc3HewcDz:4:TZQuLp43UcYTdtc3HewcDz:3:CL:98158:BaustellenzertifikateNU1:CL_ACCUM:1-100 | ||
function getUnqualifiedRevocationRegistryId(unqualifiedDid, seqNo, credentialDefinitionTag, revocationRegistryTag) { | ||
return `${unqualifiedDid}:4:${unqualifiedDid}:3:CL:${seqNo}:${credentialDefinitionTag}:CL_ACCUM:${revocationRegistryTag}`; | ||
function getUnqualifiedRevocationRegistryDefinitionId(unqualifiedDid, schemaSeqNo, credentialDefinitionTag, revocationRegistryTag) { | ||
return `${unqualifiedDid}:4:${unqualifiedDid}:3:CL:${schemaSeqNo}:${credentialDefinitionTag}:CL_ACCUM:${revocationRegistryTag}`; | ||
} | ||
exports.getUnqualifiedRevocationRegistryId = getUnqualifiedRevocationRegistryId; | ||
exports.getUnqualifiedRevocationRegistryDefinitionId = getUnqualifiedRevocationRegistryDefinitionId; | ||
function isUnqualifiedCredentialDefinitionId(credentialDefinitionId) { | ||
@@ -37,0 +37,0 @@ return exports.unqualifiedCredentialDefinitionIdRegex.test(credentialDefinitionId); |
@@ -5,3 +5,3 @@ { | ||
"types": "build/index", | ||
"version": "0.5.0-alpha.86+1d333770", | ||
"version": "0.5.0-alpha.87+ee34fe71", | ||
"files": [ | ||
@@ -28,3 +28,3 @@ "build" | ||
"dependencies": { | ||
"@aries-framework/core": "0.5.0-alpha.86+1d333770", | ||
"@aries-framework/core": "0.5.0-alpha.87+ee34fe71", | ||
"bn.js": "^5.2.1", | ||
@@ -36,3 +36,3 @@ "class-transformer": "0.5.1", | ||
"devDependencies": { | ||
"@aries-framework/node": "0.5.0-alpha.86+1d333770", | ||
"@aries-framework/node": "0.5.0-alpha.87+ee34fe71", | ||
"indy-sdk": "^1.16.0-dev-1636", | ||
@@ -43,3 +43,3 @@ "rimraf": "^4.4.0", | ||
}, | ||
"gitHead": "1d333770dcc9e261446b43b5f4cd5626fa7ac4a7" | ||
"gitHead": "ee34fe71780a0787db96e28575eeedce3b4704bd" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
841576
10898